{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///delegated ./node_modules/react/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/index.ts","webpack:///./node_modules/core-js/modules/es.symbol.js","webpack:///./node_modules/core-js/modules/es.object.to-string.js","webpack:///./node_modules/core-js/modules/es.array.iterator.js","webpack:///./node_modules/core-js/modules/web.dom-collections.iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.description.js","webpack:///./node_modules/core-js/modules/es.string.iterator.js","webpack:///./node_modules/core-js/modules/es.symbol.iterator.js","webpack:///./node_modules/core-js/modules/es.array.concat.js","webpack:///./node_modules/core-js/modules/es.array.filter.js","webpack:///./node_modules/core-js/modules/es.object.get-prototype-of.js","webpack:///./node_modules/core-js/modules/es.object.set-prototype-of.js","webpack:///./app/infrastructure/ui/index.ts","webpack:///./app/area/case/selectors/child-values/index.ts","webpack:///./app/area/case/selectors/risk-values-case-level/index.ts","webpack:///./app/area/case/selectors/risk-values-consequence-level/index.ts","webpack:///./app/area/case/selectors/url/index.ts","webpack:///./app/area/case/selectors/entities/index.ts","webpack:///./app/area/case/selectors/entity-type-keys/entity-type-keys.ts","webpack:///./app/area/case/selectors/child-entity-count/index.ts","webpack:///./app/area/case/selectors/comment-values/index.ts","webpack:///./app/area/case/selectors/expand-complex-value-prop/index.ts","webpack:///./app/area/case/selectors/primary-key/primary-key-from-context.ts","webpack:///./app/area/case/selectors/primary-key/primary-key-from-entity.ts","webpack:///./app/area/case/selectors/case-permissions/index.ts","webpack:///./app/area/case/selectors/field-values/index.ts","webpack:///./app/area/case/selectors/case-listing/index.ts","webpack:///./app/area/case/selectors/connected-cases/connected-cases-max-sequence.ts","webpack:///./app/area/case/selectors/connected-cases/connected-cases-sort-value.ts","webpack:///./app/area/case/selectors/connected-cases/connected-drafts.ts","webpack:///./app/area/case/selectors/connected-cases/connected-cases-risk-values.ts","webpack:///./app/area/case/selectors/connected-cases/connected-cases-integrity-values.ts","webpack:///./app/area/case/selectors/connected-cases/connected-cases-ids.ts","webpack:///./app/area/case/selectors/connected-cases/connected-cases-action-count.ts","webpack:///./app/area/case/selectors/connected-cases/connected-cases-permissions.ts","webpack:///./app/area/case/selectors/child-entity-field-value-as-options/index.ts","webpack:///./app/area/case/selectors/entity-id/entity-id.ts","webpack:///./app/area/case/selectors/case-id/case-id.ts","webpack:///./app/area/case/selectors/tile-header-title/index.ts","webpack:///./app/area/case/selectors/child-entity-values/index.ts","webpack:///./app/area/case/selectors/child-values-aggregate/index.ts","webpack:///./app/area/case/selectors/attach-link-values/index.ts","webpack:///./app/area/case/selectors/reference-field-value/index.ts","webpack:///./app/area/case/selectors/reference-code-data-tag/index.ts","webpack:///./app/area/case/selectors/reference-modal-temp-data/index.ts","webpack:///./app/area/case/selectors/integrity-values/index.ts","webpack:///./app/area/case/selectors/template-url/data-context.ts","webpack:///./app/area/case/selectors/template-url/template-url.ts","webpack:///./app/area/case/selectors/template-url/domain-template-url.ts","webpack:///./app/area/case/selectors/current-user/current-user.ts","webpack:///./app/area/case/selectors/validation-descendants/index.ts","webpack:///./app/area/case/selectors/active-section/index.ts","webpack:///./app/area/case/selectors/change-case-type/index.ts","webpack:///./app/area/case/selectors/checklist-values/index.ts","webpack:///./app/area/case/selectors/print-value/index.ts","webpack:///./app/area/case/selectors/expand-all/index.ts","webpack:///./app/area/case/selectors/domain-metadata/index.ts","webpack:///./app/area/case/selectors/initial-values-from-context/connected-pk-from-context.ts","webpack:///./app/area/case/selectors/header-visibility-configuration/index.ts","webpack:///./app/area/case/selectors/copy-iterator-props/index.ts","webpack:///./app/area/case/selectors/required-search-fields-filled/index.ts","webpack:///./app/area/case/selectors/pending-delete-ids/index.ts","webpack:///./app/area/case/selectors/report-category/index.ts","webpack:///./app/area/case/selectors/factbox-links/factbox-links.ts","webpack:///./app/area/case/selectors/active-child-item/index.ts","webpack:///./app/area/case/selectors/edit-document-item-visibility/index.ts","webpack:///./app/area/case/selectors/shared-state/index.ts","webpack:///./app/area/case/selectors/index.ts","webpack:///./node_modules/core-js/modules/es.object.keys.js","webpack:///./app/infrastructure/redux/index.ts","webpack:///./app/area/case/case-data-model.ts","webpack:///./node_modules/core-js/modules/web.dom-collections.for-each.js","webpack:///./app/infrastructure/ui/component-configuration.tsx","webpack:///./node_modules/core-js/modules/es.array.map.js","webpack:///./app/constants.ts","webpack:///./node_modules/core-js/modules/es.object.get-own-property-descriptor.js","webpack:///./node_modules/core-js/modules/es.object.get-own-property-descriptors.js","webpack:///./app/routes/route-constants.ts","webpack:///delegated ./node_modules/lodash/get.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/modules/es.regexp.to-string.js","webpack:///./app/area/shared/navigation.ts","webpack:///./app/infrastructure/ui/renderer/resolvers.ts","webpack:///./app/infrastructure/remote-data/index.ts","webpack:///delegated ./node_modules/react-router/es/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/modules/es.object.assign.js","webpack:///./app/infrastructure/ui/builder/component-actions.ts","webpack:///./node_modules/core-js/modules/es.array.from.js","webpack:///./node_modules/core-js/modules/es.promise.js","webpack:///./node_modules/core-js/modules/es.array.find.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./app/infrastructure/notifications/user-messages/reducers.ts","webpack:///./app/infrastructure/notifications/user-messages/user-messages-middleware.ts","webpack:///./app/infrastructure/notifications/user-messages/index.ts","webpack:///./app/infrastructure/log/index.ts","webpack:///./app/components/message-panel/message-panel.tsx","webpack:///./app/components/code-selector/big-svg-checkbox.tsx","webpack:///./app/components/code-selector/select-option-button.tsx","webpack:///./app/components/code-selector/multiple-code-selector.tsx","webpack:///./app/components/comment/comment-tile-view/comment-input/comment-input.tsx","webpack:///./app/components/comment/comment-tile-view/comment-tile-view.tsx","webpack:///./app/components/comment/comment-tile/comment-tile.tsx","webpack:///./app/components/case-header-panel/panels/left-panel.tsx","webpack:///./app/components/case-header-panel/case-header-panel.tsx","webpack:///./app/components/category-tile-view/category-tile.tsx","webpack:///./app/components/category-tile-view/category-tile-view.tsx","webpack:///./app/components/display-safe-anchor/display-safe-anchor.tsx","webpack:///./app/components/safe-anchor/safe-anchor.tsx","webpack:///./app/components/compact-code-title-tile/index.tsx","webpack:///./app/components/display-codes-unit-of-measure/index.tsx","webpack:///./app/components/display-number-unit-of-measure/index.tsx","webpack:///./app/components/risk-matrix/HighChartsExtension.ts","webpack:///./app/components/title-wrapper/index.tsx","webpack:///./app/components/risk-matrix/risk-matrix.tsx","webpack:///./app/components/risk-matrix/calculate-height.ts","webpack:///./app/components/add-document-item-link-button/add-document-item-link-button.tsx","webpack:///./app/components/processing-log/common/log-link-button/log-link-button.tsx","webpack:///./app/components/processing-log/processing-log-link.tsx","webpack:///./app/components/processing-log/common/log-view/log-view.tsx","webpack:///./app/components/processing-log/common/log-details/log-details.tsx","webpack:///./app/components/processing-log/mail-log-link.tsx","webpack:///./app/components/processing-log/case-log-link/case-log-link.tsx","webpack:///./app/components/compact-tile-header/compact-tile-header.tsx","webpack:///./app/components/index.ts","webpack:///./app/infrastructure/remote-data/remote-data.ts","webpack:///./app/infrastructure/js/deep-equals.ts","webpack:///./app/infrastructure/js/functional.ts","webpack:///./app/infrastructure/js/index.ts","webpack:///./ui/common/index.tsx","webpack:///./app/infrastructure/data/number.ts","webpack:///./node_modules/core-js/modules/es.array.index-of.js","webpack:///./app/types-shared.ts","webpack:///./app/infrastructure/validation/date.ts","webpack:///./app/infrastructure/data/date.ts","webpack:///./app/infrastructure/platform/print.ts","webpack:///./app/infrastructure/platform/locale.ts","webpack:///./app/infrastructure/platform/text.ts","webpack:///./app/infrastructure/platform/index.ts","webpack:///./node_modules/core-js/internals/export.js","webpack:///external \"vendor_1207535b092eed21482d\"","webpack:///./app/shell/components/mobile-nav/mobile-nav.scss?441d","webpack:///./app/infrastructure/data/codes.ts","webpack:///./app/infrastructure/universal/cache.ts","webpack:///./app/infrastructure/universal/index.ts","webpack:///./app/infrastructure/store/query.ts","webpack:///./app/infrastructure/hosting/app-settings.ts","webpack:///./app/startup/default/appsettings.ts","webpack:///./app/infrastructure/translate/action-types.ts","webpack:///./app/infrastructure/translate/reducers.ts","webpack:///./app/infrastructure/translate/api.ts","webpack:///./app/infrastructure/translate/actions.ts","webpack:///./app/infrastructure/translate/index.ts","webpack:///./node_modules/core-js/modules/es.function.name.js","webpack:///./app/shell/action-types.ts","webpack:///./app/infrastructure/hosting/index.ts","webpack:///./node_modules/react-icon-base/lib/index.js","webpack:///./node_modules/core-js/modules/es.number.constructor.js","webpack:///./node_modules/core-js/internals/an-object.js","webpack:///./app/infrastructure/store/entity.ts","webpack:///./app/components/modal-wrapper/modal-wrapper.tsx","webpack:///./ui/common/key-code-types.ts","webpack:///./app/infrastructure/data/sanitize.ts","webpack:///./ui/common/validation/types.ts","webpack:///./node_modules/core-js/internals/is-pure.js","webpack:///./node_modules/core-js/modules/es.array.slice.js","webpack:///./node_modules/core-js/modules/es.array.join.js","webpack:///./ui/common/select/types.tsx","webpack:///./app/area/favourite/constants.ts","webpack:///./app/area/import/import-view.scss?49d7","webpack:///delegated ./node_modules/react-hotkeys/index.es.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/react-redux/es/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/area/case/draft/action-types.ts","webpack:///./ui/file-uploader/file-uploader.scss?d3f5","webpack:///./app/infrastructure/ui/form/action-types.ts","webpack:///delegated ./node_modules/redux/es/redux.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/react-toastify/lib/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/react-icons/lib/md/add.js","webpack:///./app/area/case/endpoints.ts","webpack:///./node_modules/core-js/modules/es.string.trim.js","webpack:///./app/area/my-downloads/my-downloads.scss?56bd","webpack:///./node_modules/core-js/internals/fails.js","webpack:///./app/infrastructure/notifications/user-messages/action-types.ts","webpack:///./node_modules/core-js/internals/iterate.js","webpack:///./app/infrastructure/store/mutate.ts","webpack:///./app/infrastructure/store/index.ts","webpack:///./node_modules/core-js/modules/es.array.find-index.js","webpack:///./node_modules/core-js/modules/es.string.split.js","webpack:///./node_modules/core-js/internals/well-known-symbol.js","webpack:///./node_modules/core-js/internals/global.js","webpack:///./app/infrastructure/validation/url.ts","webpack:///./app/area/case/features/connected-cases/sequence.ts","webpack:///./app/area/case/action-types.ts","webpack:///delegated ./node_modules/lodash/debounce.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/area/codetable/common/index.ts","webpack:///./node_modules/core-js/modules/es.string.replace.js","webpack:///./node_modules/core-js/internals/a-function.js","webpack:///./app/infrastructure/notifications/notify-user.tsx","webpack:///./app/infrastructure/data/wireformat.ts","webpack:///./node_modules/core-js/modules/es.string.search.js","webpack:///./app/components/spin-loader/index.tsx","webpack:///delegated ./node_modules/react-dom/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/hex-converter.ts","webpack:///./app/infrastructure/platform/routing.ts","webpack:///./app/infrastructure/platform/json.ts","webpack:///./ui/common/icon/index.tsx","webpack:///./app/shell/constants.ts","webpack:///./app/infrastructure/ui/types-uischema.ts","webpack:///./app/area/shared/endpoints.ts","webpack:///./app/area/shared/api.ts","webpack:///./app/area/shared/default-value-handler.ts","webpack:///./app/area/case/draft/api.ts","webpack:///./app/area/case/draft/actions.ts","webpack:///./node_modules/core-js/internals/is-object.js","webpack:///./ui/common/element-loader/element-loader.tsx","webpack:///./ui/slider-rating/slider-rating.scss?7a30","webpack:///./app/area/reports/containers/dnd.scss?bd60","webpack:///./node_modules/core-js/internals/function-bind-context.js","webpack:///./app/area/case/features/resolvers.ts","webpack:///./app/area/case/features/connected-cases/actions.ts","webpack:///./app/area/case/features/connected-cases/connected-cases.tsx","webpack:///./app/area/case/features/file-upload/selectors.ts","webpack:///./app/area/case/features/file-upload/actions.ts","webpack:///./app/area/case/features/file-upload/constants.ts","webpack:///./app/area/case/features/file-upload/file-download.ts","webpack:///./app/area/case/features/risk-matrix/risk-matrix.ts","webpack:///./app/area/case/features/share-case/constants.ts","webpack:///./app/area/case/features/share-case/with-sharing.ts","webpack:///./app/area/case/features/share-case/api.ts","webpack:///./app/area/case/features/share-case/share-preset.ts","webpack:///./app/area/case/features/case-log-download/case-log-download.ts","webpack:///./app/area/case/features/search-cases/api.ts","webpack:///./app/area/case/features/search-cases/search-cases-to-connect.ts","webpack:///./app/area/case/features/search-external-provider/api.ts","webpack:///./app/area/case/features/search-external-provider/selectors.ts","webpack:///./app/area/case/features/search-external-provider/actions.ts","webpack:///./app/components/enhancers/with-not-selected-option-included.tsx","webpack:///./app/components/enhancers/with-option-loading.tsx","webpack:///./app/components/enhancers/with-hide-if-prop-value-not-in-visible-for-values.tsx","webpack:///./app/components/enhancers/with-primary-key-as-option-iterator-id.tsx","webpack:///./app/components/enhancers/with-primary-key-as-option-category-id.tsx","webpack:///./app/components/enhancers/with-row-field-initial-value.tsx","webpack:///./app/components/enhancers/with-link.tsx","webpack:///./app/components/enhancers/with-print.tsx","webpack:///./app/components/enhancers/with-property.tsx","webpack:///./app/components/enhancers/with-render-active-section.tsx","webpack:///./app/components/tabs/visibility-observer.ts","webpack:///./ui/common/portal.tsx","webpack:///./app/components/enhancers/with-section-tab.tsx","webpack:///./app/components/enhancers/with-document-title.tsx","webpack:///./app/components/enhancers/with-section-keyboard-paging.tsx","webpack:///./app/components/enhancers/with-class-on-first-tab.tsx","webpack:///./app/components/enhancers/with-render-on-first-tab.tsx","webpack:///./ui/common/svg-icons/chain.tsx","webpack:///./app/area/case/components/connected-cases/connect-case-selector.tsx","webpack:///./app/area/case/components/connected-cases/connected-cases-tile-view.tsx","webpack:///./app/area/case/components/connected-cases/connected-cases-tile.tsx","webpack:///./app/area/case/components/fact-box/renderers.tsx","webpack:///./app/area/case/components/fact-box/section.ts","webpack:///./app/area/case/components/fact-box/fact-items.tsx","webpack:///./app/area/case/components/fact-box/thumbnail.tsx","webpack:///./app/area/case/components/fact-box/fact-box.tsx","webpack:///./app/area/case/components/fact-box/props-builder.ts","webpack:///./app/area/case/components/fact-box/connected-cases-factbox/connected-cases-factbox.tsx","webpack:///./app/area/case/components/loss-potential/loss-potential-evaluation.tsx","webpack:///./app/area/case/components/loss-potential/loss-potential-evaluation-tile-view.tsx","webpack:///./app/area/case/components/loss-potential/loss-potential-consequence-evaluation.tsx","webpack:///./app/area/case/components/section-summary/section-summary-panel.tsx","webpack:///./app/area/case/components/preselected-code-tile-view/preselected-code-tile-view.tsx","webpack:///./app/area/case/components/attach-link/attach-link-selector/attach-link-selector.tsx","webpack:///./app/area/case/components/attach-link/attach-link-tile-view/attach-link-tile-view.tsx","webpack:///./app/area/case/components/attach-link/attach-link-tile/attach-link-tile.tsx","webpack:///./app/area/case/components/summary-tile-view/summary-tile-view.tsx","webpack:///./app/area/case/components/reference-select-tile-view/multi-select-reference-modal.tsx","webpack:///./app/area/case/components/reference-select-tile-view/reference-select-tile-view.tsx","webpack:///./app/area/case/components/add-new-case-button/add-new-case-button.tsx","webpack:///./app/area/case/components/enhancers/navigate-to-new-draft.tsx","webpack:///./app/area/case/components/case-listing-button/case-listing-button.tsx","webpack:///./app/area/case/components/check-for-duplicate-registrations-button/check-for-duplicate-registrations-button.tsx","webpack:///./app/area/case/components/search-external-provider/search-result-item.tsx","webpack:///./app/area/case/components/search-external-provider/search-result-list.tsx","webpack:///./app/area/case/components/search-external-provider/search-external-provider.tsx","webpack:///./app/area/case/components/connect-to-bowtie-button/connect-to-bowtie-button.tsx","webpack:///./app/infrastructure/ui/debug-render.tsx","webpack:///./app/infrastructure/ui/component-mappings/read.ts","webpack:///./app/infrastructure/ui/component-mappings/edit.ts","webpack:///./app/area/case/features/trigger-validation/index.ts","webpack:///./app/area/case/features/file-upload/file-upload.ts","webpack:///./app/area/case/components/enhancers/case-sign-readonly.tsx","webpack:///./app/area/case/features/search-external-provider/search-external-provider.ts","webpack:///./app/area/case/components/enhancers/readonly-when-signed.tsx","webpack:///./app/infrastructure/ui/component-mappings/report.ts","webpack:///./app/infrastructure/ui/component-mappings/embedded-report.ts","webpack:///./app/infrastructure/ui/component-registry.tsx","webpack:///./app/infrastructure/ui/builder/attribute-parser.ts","webpack:///./app/infrastructure/ui/builder/property-builder.ts","webpack:///./app/infrastructure/ui/builder/default-values.tsx","webpack:///./app/infrastructure/ui/builder/schema-builder.ts","webpack:///./app/infrastructure/ui/builder/index.ts","webpack:///./app/shell/modal-host-types.ts","webpack:///./app/shell/components/desktop-nav/desktop-nav.scss?6b29","webpack:///./node_modules/core-js/internals/descriptors.js","webpack:///./node_modules/core-js/internals/has.js","webpack:///./ui/common/on-click-outside.tsx","webpack:///./ui/common/tooltip/tooltip.tsx","webpack:///./app/infrastructure/platform/browser-dom.tsx","webpack:///./ui/common/dialog-expander/dialog-expander.tsx","webpack:///./ui/common/enhancers/with-class-names.tsx","webpack:///./ui/common/enhancers/with-size.tsx","webpack:///./ui/common/enhancers/index.ts","webpack:///./app/infrastructure/auth/init.ts","webpack:///./app/infrastructure/auth/index.ts","webpack:///./app/infrastructure/ui/form/selectors.ts","webpack:///./app/infrastructure/data/convert.ts","webpack:///./node_modules/core-js/internals/get-built-in.js","webpack:///./ui/common/input-control-context/input-control-context.tsx","webpack:///./app/infrastructure/notifications/toast-factory.tsx","webpack:///./app/area/case/constants.ts","webpack:///./app/area/case/draft/connected-state.ts","webpack:///./app/area/shared/route-urls.ts","webpack:///./app/area/case/components/fact-box/fact-box.scss?0b50","webpack:///./ui/tile/tile.scss?db21","webpack:///./app/area/case-listing/case-listing.scss?43e1","webpack:///./app/shell/components/footer/footer.scss?ea0c","webpack:///./app/area/user-profile/my-notifications/consent-item.scss?3905","webpack:///./node_modules/core-js/internals/to-length.js","webpack:///./node_modules/core-js/internals/object-define-property.js","webpack:///./ui/common/button/button.tsx","webpack:///./app/area/saved-reports/create-report.scss?1ba2","webpack:///./ui/common/button/button-input-group.tsx","webpack:///./ui/common/button/close-button.tsx","webpack:///./ui/common/button/index.tsx","webpack:///./ui/common/select/select-type.ts","webpack:///./app/components/favourite-layout/data-layout/tile-view-favourite.scss?b3e2","webpack:///./app/area/reports/containers/chart/chart-container.scss?0d00","webpack:///./node_modules/core-js/modules/es.array.sort.js","webpack:///./app/infrastructure/universal/runtime.ts","webpack:///./node_modules/react-icons/lib/fa/angle-down.js","webpack:///./app/infrastructure/remote-data/blob-cache.ts","webpack:///./app/infrastructure/remote-data/http.ts","webpack:///./app/infrastructure/remote-data/constants.ts","webpack:///./app/area/auth/auth.scss?86ac","webpack:///./node_modules/core-js/internals/to-object.js","webpack:///./node_modules/core-js/internals/redefine.js","webpack:///./app/infrastructure/universal/color.ts","webpack:///./app/shell/api.ts","webpack:///./app/shell/default/actions.ts","webpack:///./ui/expandable/utils.ts","webpack:///./ui/expandable/index.tsx","webpack:///./app/shell/components/sticky-header/sticky-header.tsx","webpack:///./app/infrastructure/ui/renderer/fallback.scss?0936","webpack:///./ui/attachment-viewer/attachment-viewer.scss?ebc9","webpack:///./ui/compact-tile/compact-tile.scss?fc61","webpack:///./node_modules/core-js/internals/to-indexed-object.js","webpack:///./node_modules/core-js/modules/es.array.includes.js","webpack:///./app/components/fixed-document.tsx","webpack:///./node_modules/react-icons/lib/md/close.js","webpack:///./node_modules/react-icons/lib/md/arrow-drop-down.js","webpack:///./ui/common/icons/scroll-up-symbol.tsx","webpack:///./ui/scroll-to-top/scroll-to-top.tsx","webpack:///delegated ./node_modules/clone/clone.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/infrastructure/store/entity-route.ts","webpack:///./app/startup/default/auth.ts","webpack:///./app/area/administration/edit/edit.scss?c823","webpack:///./app/area/case/features/connected-cases/action-types.ts","webpack:///./app/components/filters/filters-panel/filter-panel.scss?e4c3","webpack:///./ui/date-time/time/time.scss?ca17","webpack:///./ui/access-card/access-switch-item.scss?e790","webpack:///./app/components/code-selector/select-option-link.scss?6bf8","webpack:///./app/area/codetable/item/translation/main-language/main-language.scss?20a5","webpack:///./node_modules/core-js/internals/create-non-enumerable-property.js","webpack:///./node_modules/core-js/internals/require-object-coercible.js","webpack:///./node_modules/core-js/internals/species-constructor.js","webpack:///./node_modules/core-js/modules/es.array.splice.js","webpack:///./node_modules/core-js/modules/es.string.match.js","webpack:///./node_modules/core-js/modules/es.string.includes.js","webpack:///./app/infrastructure/auth/token-manager.ts","webpack:///./app/area/case/types-store.ts","webpack:///./app/area/shared/response-caching/endpoints.ts","webpack:///./app/area/shared/response-caching/api.ts","webpack:///./app/area/shared/response-caching/actions.ts","webpack:///./app/area/shared/response-caching/constants.ts","webpack:///delegated ./node_modules/lodash/isdate.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/code-table/get-options-or-default.ts","webpack:///./app/infrastructure/store/constants.ts","webpack:///./app/infrastructure/store/normalize.ts","webpack:///./app/area/case/features/search-external-provider/action-types.ts","webpack:///./ui/common/tooltip/tooltip.scss?37bd","webpack:///./app/components/code-title-tile/code-title-tile.scss?5ee6","webpack:///./app/components/display-selected-options/display-selected-options.scss?9117","webpack:///./node_modules/core-js/modules/es.parse-int.js","webpack:///./node_modules/core-js/internals/array-method-uses-to-length.js","webpack:///./node_modules/core-js/internals/get-map-iterator.js","webpack:///./app/infrastructure/platform/browser.ts","webpack:///./ui/common/button/button-tertiary.tsx","webpack:///./ui/common/switch/switch.tsx","webpack:///./ui/common/close-on-blur.tsx","webpack:///./node_modules/react-icons/lib/md/expand-more.js","webpack:///./ui/common/debounce-render.tsx","webpack:///delegated ./node_modules/lodash/isnumber.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/constants.ts","webpack:///delegated ./node_modules/resize-sensor/ResizeSensor.min.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/permission.tsx","webpack:///./app/area/case/components/search-external-provider/search-external-provider.scss?1d10","webpack:///./app/area/favourite/favourite.scss?0eb0","webpack:///./ui/common/select/option/option-btn-next-level.tsx","webpack:///./ui/common/select/option/option-icon.tsx","webpack:///./ui/common/select/option/option-description.tsx","webpack:///./ui/common/select/option/option-select-mark.tsx","webpack:///./ui/common/select/option/index.tsx","webpack:///delegated ./node_modules/highcharts/highcharts.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/shell/components/regenerate-aggregated/regenerate-aggregated-modal.scss?f12d","webpack:///./ui/sort-order/sort-by-list/sort-by-item/sort-by-item.scss?03fb","webpack:///./ui/display-codes/display-codes.scss?d67c","webpack:///./ui/display-codes-hierarchy/display-codes-hierarchy.scss?97fc","webpack:///./app/area/startup/components/new-case-banner/new-case-banner.scss?7e48","webpack:///./node_modules/core-js/internals/internal-state.js","webpack:///./node_modules/core-js/internals/classof-raw.js","webpack:///./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack:///./app/infrastructure/js/template.ts","webpack:///./app/infrastructure/redux/error-safe.ts","webpack:///./ui/common/input-control-context/index.ts","webpack:///./app/area/codetable/common/endpoints.ts","webpack:///./app/area/codetable/common/api.ts","webpack:///./node_modules/react-icons/lib/md/keyboard-arrow-right.js","webpack:///delegated ./node_modules/react-dnd/lib/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/react-icons/lib/fa/info.js","webpack:///./app/area/case/api.ts","webpack:///./app/area/dashboard/dashboard.scss?3bb6","webpack:///./ui/common/tabs/tabs.scss?aa11","webpack:///./ui/scroll-container/scroll-container.scss?d906","webpack:///./app/components/tabs/tab-container/tab-container.scss?9247","webpack:///./app/components/code-selector/select-option-button.scss?98a0","webpack:///./app/components/risk-matrix/risk-matrix.scss?a617","webpack:///./app/area/list-view-code-selector/list-view-folder.scss?973c","webpack:///./ui/common/button/add-button.tsx","webpack:///./app/components/overlay/overlay.tsx","webpack:///./app/components/prompt-unsaved/prompt-unsaved.tsx","webpack:///./ui/common/breadcrumb/breadcrumb-item.tsx","webpack:///./ui/common/breadcrumb/breadcrumb.tsx","webpack:///./ui/common/dropdown-menu/with-dropdown-menu.tsx","webpack:///./ui/common/dropdown-menu/index.ts","webpack:///./app/infrastructure/auth/token-cache.ts","webpack:///./node_modules/react-icons/lib/md/expand-less.js","webpack:///./ui/common/dialog-expander/expander-background/expander-background.tsx","webpack:///./app/infrastructure/store/path.ts","webpack:///delegated ./node_modules/lodash/set.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/area/reports/selection-report.scss?68ba","webpack:///./ui/common/keep-focus-on-element.tsx","webpack:///./ui/common/select/select-options-expander.tsx","webpack:///./ui/common/select/select-input.tsx","webpack:///./ui/common/select/constants.ts","webpack:///./ui/common/select/selected-options/selected-options.tsx","webpack:///./ui/common/select/scroll-into-view-if-necessary.tsx","webpack:///./ui/common/select/hierarchy-options/hierarchy-options.tsx","webpack:///./ui/common/select/index-options/index-group.tsx","webpack:///./ui/common/select/index-options/tiles-index/tiles-item.tsx","webpack:///./ui/common/select/index-options/tiles-index/tiles-index.tsx","webpack:///./ui/common/select/index-options/index-options.tsx","webpack:///./ui/common/select/options-resolver.tsx","webpack:///./ui/common/select/hierarchy-options/options-to-hierarchy.ts","webpack:///./ui/common/select/keyboard-support.tsx","webpack:///./ui/common/select/select-base-component.tsx","webpack:///./ui/common/display-text-with-links/display-text-with-links.tsx","webpack:///./ui/common/display-text-with-links/index.ts","webpack:///./app/infrastructure/notifications/user-messages/get-user-message.ts","webpack:///delegated ./node_modules/lodash/isstring.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/validation/validation.scss?7cf4","webpack:///./app/area/shared/response-caching/action-types.ts","webpack:///./app/area/case/draft/change-casetype/action-types.ts","webpack:///./app/area/codetable/common/codetable-options-handler/action-types.ts","webpack:///./ui/common/select/select-options-expander.scss?300d","webpack:///./ui/date-time/date/date.scss?1fb2","webpack:///./ui/tile-view/tile-view.scss?7c10","webpack:///./app/area/case/components/attach-link/attach-link-tile/attach-link-tile.scss?50db","webpack:///./app/components/favourite-layout/data-layout/table/cell.scss?4c40","webpack:///./app/area/reports/components/drag-tag.scss?9580","webpack:///./app/area/administration/list/filters/filter-panel.scss?fa13","webpack:///./app/area/codetable/list/list-items/codetable-item.scss?6dc7","webpack:///./app/area/codetable/list/list-items/codetable-item-content.scss?0f10","webpack:///./app/area/codetable/item/sticky-header/codetable-sticky-header.scss?e916","webpack:///./node_modules/core-js/modules/es.array.flat.js","webpack:///./node_modules/core-js/modules/es.array.unscopables.flat.js","webpack:///./node_modules/core-js/internals/to-integer.js","webpack:///./node_modules/core-js/internals/set-to-string-tag.js","webpack:///./node_modules/core-js/modules/es.regexp.constructor.js","webpack:///./node_modules/core-js/modules/es.string.link.js","webpack:///./node_modules/core-js/modules/es.number.is-finite.js","webpack:///./node_modules/core-js/internals/get-set-iterator.js","webpack:///./app/area/case/actions.ts","webpack:///./ui/common/validation/validation.tsx","webpack:///./ui/common/validation/flex-validation.tsx","webpack:///./ui/common/validation/index.ts","webpack:///./ui/object-fit-image/object-fit-image.tsx","webpack:///./ui/object-fit-image/index.tsx","webpack:///./app/infrastructure/notifications/index.ts","webpack:///./app/infrastructure/translate/translate.ts","webpack:///./ui/common/select/flat-options/flat-options.tsx","webpack:///./app/area/case/features/risk-matrix/risk-matrix-definition.ts","webpack:///./ui/remote-blob/remote-blob.tsx","webpack:///./ui/remote-blob/remote-image.tsx","webpack:///./ui/remote-blob/index.ts","webpack:///./app/components/tabs/child-observer.ts","webpack:///./app/components/tabs/index.ts","webpack:///./app/area/case/components/connected-cases/connect-case-selector.scss?fe56","webpack:///./node_modules/react-icons/lib/md/trending-up.js","webpack:///./app/shell/components/messages-to-user/message-to-user.scss?035c","webpack:///./app/area/favourite/components/display-options.scss?18d7","webpack:///./ui/common/prompt-confirmation/prompt-confirmation.scss?3743","webpack:///./ui/display-number/display-number.scss?d440","webpack:///./ui/display-text/display-text.scss?99e4","webpack:///./ui/display-boolean/display-boolean.scss?1dd6","webpack:///./ui/badge-list/badge-list.scss?d0ac","webpack:///./ui/access-card/access-card.scss?39d7","webpack:///./app/area/case/components/summary-tile-view/summary-tile-view.scss?eeca","webpack:///./app/components/message-panel/toastify-override.scss?74a8","webpack:///./app/components/code-selector/fullscreen-code-selector.scss?225c","webpack:///./app/components/category-tile-view/category-tile.scss?4e37","webpack:///./app/components/favourite-layout/data-layout/tile/tile-field.scss?1afd","webpack:///./app/area/codetable/list/codetable-list.scss?d5ac","webpack:///./node_modules/core-js/internals/add-to-unscopables.js","webpack:///./node_modules/core-js/modules/es.array.reverse.js","webpack:///./node_modules/core-js/internals/to-primitive.js","webpack:///./node_modules/core-js/internals/create-property-descriptor.js","webpack:///./node_modules/core-js/internals/is-array.js","webpack:///./node_modules/core-js/internals/object-create.js","webpack:///./node_modules/core-js/internals/array-iteration.js","webpack:///./ui/link/link.tsx","webpack:///./ui/link/index.ts","webpack:///./app/infrastructure/universal/url.ts","webpack:///./app/infrastructure/redux/container-factory.ts","webpack:///./ui/common/button/button-inline.tsx","webpack:///./ui/common/label/label.tsx","webpack:///./ui/common/prompt-confirmation/prompt-confirmation-modal.tsx","webpack:///./ui/section-panel/section-panel.tsx","webpack:///./ui/common/icons/slide-arrow.tsx","webpack:///./ui/attachment-viewer/attachment-viewer.tsx","webpack:///delegated ./node_modules/react-intl/lib/index.es.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/infrastructure/js/cancelable-promise.ts","webpack:///./ui/common/select/select-options.tsx","webpack:///delegated ./node_modules/uuid/dist/esm-browser/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/lodash/sortby.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/infrastructure/validation/email.ts","webpack:///./node_modules/react-icons/lib/md/folder.js","webpack:///delegated ./node_modules/react-waypoint/es/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/components/break-lines/break-lines.tsx","webpack:///./ui/common/select/select-option.tsx","webpack:///delegated ./node_modules/lodash/isobject.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/infrastructure/translate/translations.ts","webpack:///./ui/button-list/button-list.scss?2640","webpack:///./app/area/case/features/connected-cases/api.ts","webpack:///./node_modules/node-libs-browser/node_modules/util/util.js","webpack:///./app/area/case/create/action-types.ts","webpack:///./node_modules/react-icons/lib/md/account-circle.js","webpack:///./ui/tile/copy-options.tsx","webpack:///./ui/tile/context-menu.tsx","webpack:///./ui/common/select/selected-options/selected-option.scss?6c7c","webpack:///./ui/display-date/display-date.scss?951b","webpack:///./ui/link-heading/link-heading.scss?4468","webpack:///./ui/section-panel/section-panel.scss?fe83","webpack:///./ui/expandable-panel/expandable-panel.scss?5121","webpack:///./ui/drawer-with-bar/drawer-with-bar.scss?3ff9","webpack:///./ui/info-banner/info-banner.scss?4265","webpack:///./app/components/comment/comment-tile/comment-tile.scss?c432","webpack:///./app/shell/components/sticky-header/sticky-header.scss?5ff4","webpack:///./app/area/saved-reports/create-folder/create-folder.scss?3b74","webpack:///./app/components/favourite-layout/data-layout/table/footer.scss?6222","webpack:///./app/area/dashboard/favourite-container.scss?a62c","webpack:///./app/shell/components/about-modal/about-modal.scss?f10e","webpack:///./app/shell/header.scss?026a","webpack:///./app/area/reports/components/expandable-box.scss?54b0","webpack:///./node_modules/core-js/internals/hidden-keys.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names.js","webpack:///./node_modules/core-js/internals/is-forced.js","webpack:///./node_modules/core-js/internals/an-instance.js","webpack:///./node_modules/core-js/internals/iterators.js","webpack:///./node_modules/core-js/internals/array-method-is-strict.js","webpack:///./node_modules/core-js/internals/create-property.js","webpack:///./node_modules/core-js/internals/array-method-has-species-support.js","webpack:///delegated ./node_modules/prop-types/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/info/info-text.tsx","webpack:///./app/components/code-selector/select-option-link.tsx","webpack:///./app/components/code-selector/fullscreen-code-selector.tsx","webpack:///delegated ./node_modules/react-router-redux/lib/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/react-icons/lib/md/keyboard-arrow-down.js","webpack:///./node_modules/react-icons/lib/fa/repeat.js","webpack:///./app/area/user-profile/my-notifications/consents/add-sms-consent.scss?a081","webpack:///./app/infrastructure/ui/renderer/conditional-render.tsx","webpack:///./app/infrastructure/ui/renderer/fallback.tsx","webpack:///./app/infrastructure/ui/renderer/property-cache.ts","webpack:///./app/infrastructure/ui/builder/event-builder.ts","webpack:///./app/infrastructure/ui/renderer/iterator-cache.ts","webpack:///./app/infrastructure/ui/renderer/activator.tsx","webpack:///./app/infrastructure/ui/renderer/iterator.tsx","webpack:///./app/infrastructure/ui/renderer/field-connector.ts","webpack:///./app/infrastructure/ui/renderer/field.tsx","webpack:///./app/infrastructure/ui/form/form-context.tsx","webpack:///./app/infrastructure/ui/renderer/property-panel.tsx","webpack:///./app/infrastructure/ui/renderer/inspection-panel.tsx","webpack:///./app/infrastructure/ui/renderer/entity-view.tsx","webpack:///./app/infrastructure/ui/renderer/index.tsx","webpack:///./ui/common/switch/switch.scss?4fb5","webpack:///./ui/common/dialog-expander/details-expander/details-expander.scss?6729","webpack:///./ui/common/dialog-expander/header/header-with-toolbar.scss?d032","webpack:///./ui/common/select/select-option.scss?85f3","webpack:///delegated ./node_modules/filesize/lib/filesize.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/badge/badge.scss?a188","webpack:///./app/components/tabs/tab-item/tab-item.scss?8d93","webpack:///./app/area/case/components/case-listing-button/case-listing-button.scss?d58d","webpack:///./app/components/overlay/overlay.scss?4228","webpack:///./app/components/code-selector/big-svg-checkbox.scss?c734","webpack:///./app/components/comment/comment-tile-view/comment-input/comment-input.scss?1f8f","webpack:///./app/components/compact-code-title-tile/compact-code-title-tile.scss?b216","webpack:///./app/components/display-number-unit-of-measure/display-number-unit-of-measure.scss?9550","webpack:///./app/area/case/draft/connected-cases.scss?495e","webpack:///./app/area/company-report/report-view.scss?acd3","webpack:///./app/area/startup/components/open-case/open-case.scss?9bed","webpack:///./app/area/administration/list/search-tile/tile-info.scss?4845","webpack:///./app/area/administration/edit/user/alternative-id/alternative-id-item.scss?d970","webpack:///./app/components/metro-line/metro-line-section.scss?7885","webpack:///./app/area/codetable/list/list-items/common/codetable-item-lines.scss?bbce","webpack:///./app/area/list-view-code-selector/list-view-column-container.scss?c4cb","webpack:///./app/area/list-view-code-selector/list-view-item.scss?1d9d","webpack:///./app/area/user-profile/my-notifications/consents/sms-modal.scss?1f46","webpack:///./app/area/user-profile/user-profile-heading.scss?41d3","webpack:///./app/area/messages/messages.scss?de72","webpack:///./node_modules/core-js/internals/uid.js","webpack:///./node_modules/core-js/internals/shared-key.js","webpack:///./node_modules/core-js/internals/indexed-object.js","webpack:///./node_modules/core-js/internals/get-iterator-method.js","webpack:///./node_modules/core-js/internals/object-keys.js","webpack:///./node_modules/core-js/internals/array-species-create.js","webpack:///./node_modules/core-js/internals/object-get-prototype-of.js","webpack:///./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","webpack:///./node_modules/core-js/internals/regexp-exec.js","webpack:///./node_modules/core-js/internals/regexp-exec-abstract.js","webpack:///./node_modules/core-js/modules/web.url.js","webpack:///./node_modules/core-js/internals/get-iterator.js","webpack:///./node_modules/core-js/modules/es.array.last-index-of.js","webpack:///./node_modules/core-js/modules/es.map.js","webpack:///./node_modules/core-js/modules/esnext.map.delete-all.js","webpack:///./node_modules/core-js/modules/esnext.map.every.js","webpack:///./node_modules/core-js/modules/esnext.map.filter.js","webpack:///./node_modules/core-js/modules/esnext.map.find.js","webpack:///./node_modules/core-js/modules/esnext.map.find-key.js","webpack:///./node_modules/core-js/modules/esnext.map.includes.js","webpack:///./node_modules/core-js/modules/esnext.map.key-of.js","webpack:///./node_modules/core-js/modules/esnext.map.map-keys.js","webpack:///./node_modules/core-js/modules/esnext.map.map-values.js","webpack:///./node_modules/core-js/modules/esnext.map.merge.js","webpack:///./node_modules/core-js/modules/esnext.map.reduce.js","webpack:///./node_modules/core-js/modules/esnext.map.some.js","webpack:///./node_modules/core-js/modules/esnext.map.update.js","webpack:///./node_modules/core-js/internals/create-html.js","webpack:///./node_modules/core-js/internals/string-html-forced.js","webpack:///./app/infrastructure/translate/with-translation.tsx","webpack:///./ui/fullscreen-modal-header/fullscreen-modal-header.tsx","webpack:///./ui/textbox/textbox.tsx","webpack:///./ui/common/dialog-expander/select-expander/select-expander.tsx","webpack:///./ui/common/dialog-expander/details-expander/details-expander.tsx","webpack:///./ui/common/dialog-expander/footer/footer.tsx","webpack:///./ui/common/button/button-primary.tsx","webpack:///./ui/common/button/button-secondary.tsx","webpack:///./ui/common/button/button-call-to-action.tsx","webpack:///./ui/common/dialog-expander/header/header-with-toolbar.tsx","webpack:///./ui/common/prompt-confirmation/prompt-confirmation.tsx","webpack:///./ui/common/dropdown-menu/dropdown-menu.tsx","webpack:///./ui/common/dropdown-menu/meatball-menu.tsx","webpack:///./ui/expandable/expandable.tsx","webpack:///./ui/select-single/select-single.tsx","webpack:///./ui/tile-view/index.ts","webpack:///./ui/display-number/display-number.tsx","webpack:///./app/components/enhancers/with-option-category-support.tsx","webpack:///./ui/common/enhancers/with-open-state.tsx","webpack:///./app/area/case/case.tsx","webpack:///./app/area/case/draft/reducers.ts","webpack:///./app/area/case/draft/change-casetype/reducers.ts","webpack:///./app/area/case/edit/reducers.ts","webpack:///./app/area/case/create/reducers.ts","webpack:///./app/area/case/features/connected-cases/reducers.ts","webpack:///./app/area/case/features/search-external-provider/reducers.ts","webpack:///./app/infrastructure/store/patch.ts","webpack:///./app/infrastructure/ui/form/reducers.ts","webpack:///./app/area/case/reducers.ts","webpack:///./ui/common/debounce-textarea/debounce-textarea.tsx","webpack:///./ui/textarea/textarea.tsx","webpack:///./ui/textarea/index.ts","webpack:///./app/area/case/features/share-case/share-case-modal/share-case-modal.tsx","webpack:///./app/area/case/features/share-case/share-case.tsx","webpack:///./app/infrastructure/js/retry.ts","webpack:///./app/infrastructure/redux/when-idle.ts","webpack:///./ui/select-multiple/select-multiple.tsx","webpack:///./ui/select-multiple/index.ts","webpack:///./ui/scroll-container/scroll-container.tsx","webpack:///./ui/scroll-container/index.ts","webpack:///./ui/badge/badge.tsx","webpack:///./ui/badge/index.tsx","webpack:///./ui/badge-list/badge-list.tsx","webpack:///./ui/badge-list/index.tsx","webpack:///./ui/display-color/display-color.tsx","webpack:///./ui/display-color/index.tsx","webpack:///./ui/info-banner/info-banner.tsx","webpack:///./ui/info-banner/index.ts","webpack:///./app/components/code-title-tile/code-title-tile.tsx","webpack:///./app/components/code-title-tile/index.ts","webpack:///./app/components/code-selector-tile-view/code-selector-tile-view.tsx","webpack:///./app/components/code-selector-tile-view/index.ts","webpack:///./app/components/document-item-from-multiselect/document-item-from-multiselect.tsx","webpack:///./app/components/document-item-from-multiselect/index.ts","webpack:///./ui/common/input-label/input-label.tsx","webpack:///./ui/common/input-label/index.ts","webpack:///./app/components/tabs/tab-item/tab-icon.ts","webpack:///./app/components/tabs/tab-item/tab-item.tsx","webpack:///./app/components/tabs/tab-container/toggle.tsx","webpack:///./app/components/tabs/tab-container/tab-container.tsx","webpack:///./app/area/case/components/multi-emails/multi-emails.tsx","webpack:///./app/area/case/components/multi-emails/index.ts","webpack:///./app/infrastructure/notifications/crash-notification.tsx","webpack:///./app/infrastructure/auth/constants.ts","webpack:///./app/infrastructure/log/client-info.ts","webpack:///./node_modules/hammerjs/hammer.js","webpack:///./ui/file-uploader/file-uploader-item-progress.tsx","webpack:///delegated ./node_modules/react-textarea-autosize/dist/react-textarea-autosize.esm.browser.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/debounce-input.tsx","webpack:///./ui/common/force-update-terminal.tsx","webpack:///./ui/common/select/selected-options/selected-option.tsx","webpack:///./ui/common/select/index-options/tiles-index/tiles-index.scss?a5d6","webpack:///./app/components/contexts/link-context.ts","webpack:///./ui/common/prompt-confirmation/input-modal-host.tsx","webpack:///./app/area/case/entity-filters/index.ts","webpack:///./app/infrastructure/ui/renderer/iterator-resolvers.ts","webpack:///./app/area/case-listing/report-to-category-mapping.ts","webpack:///./app/area/case-listing/types.ts","webpack:///./app/components/section-pager/section-pager.tsx","webpack:///./node_modules/react-icons/lib/md/format-list-numbered.js","webpack:///./node_modules/react-icons/lib/md/group.js","webpack:///./app/area/case/edit/action-types.ts","webpack:///./app/area/bowtie/tooltip/bowtie-connections.scss?b95e","webpack:///./app/area/case/case-view.tsx","webpack:///./app/infrastructure/ui/form/actions.ts","webpack:///./node_modules/react-icons/lib/fa/refresh.js","webpack:///./node_modules/react-icons/lib/md/equalizer.js","webpack:///./node_modules/react-icons/lib/md/search.js","webpack:///./node_modules/react-icons/lib/md/build.js","webpack:///./node_modules/react-icons/lib/fa/sitemap.js","webpack:///./node_modules/ua-parser-js/src/ua-parser.js","webpack:///./ui/fullscreen-modal-header/fullscreen-modal-header.scss?5b49","webpack:///./ui/object-fit-image/image.scss?3ed5","webpack:///./ui/common/info/info-text.scss?b329","webpack:///./ui/common/dialog-expander/select-expander/select-expander.scss?9c79","webpack:///./ui/common/button/add-button.scss?6949","webpack:///./ui/common/select/select-input.scss?f63a","webpack:///./app/components/modal-wrapper/modal-wrapper.scss?1e43","webpack:///./ui/expandable/expandable.scss?6581","webpack:///delegated ./node_modules/react-day-picker/DayPicker.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/fluid-panel/fluid-panel.scss?33c3","webpack:///./ui/display-child-values/display-child-values.scss?24c2","webpack:///./ui/password/password.scss?4c6d","webpack:///./ui/display-numeric-header/display-numeric-header.scss?f471","webpack:///./ui/icon-list/icon-list.scss?309c","webpack:///./ui/toggle-button/toggle-button.scss?2d7f","webpack:///./app/infrastructure/notifications/notify-user.scss?7513","webpack:///./app/components/section-pager/section-pager.scss?0d99","webpack:///./app/components/document-item-from-multiselect/document-item-from-multiselect.scss?47fd","webpack:///./app/area/case/components/add-new-case-button/add-new-case-button.scss?9b6e","webpack:///./app/components/case-header-panel/case-header-panel.scss?2ec7","webpack:///./app/components/processing-log/common/log-link-button/log-link-button.scss?8a1c","webpack:///./app/components/processing-log/common/log-view/log-view.scss?36dd","webpack:///./app/area/saved-reports/copy-link/copy-link.scss?6b2f","webpack:///./app/area/case-listing/case-listing-tile.scss?f766","webpack:///./app/area/administration/list/search-container/search-layout.scss?cf4e","webpack:///./app/components/visible-for-fields/visible-for-fields.scss?db62","webpack:///./app/area/administration/edit/role/role.scss?0645","webpack:///./app/area/codetable/list/list-items/common/codetable-item-loader.scss?f1b7","webpack:///./app/area/codetable/list/list-items/common/codetable-item-row.scss?d70a","webpack:///./app/area/codetable/list/search/codetable-search.scss?3e01","webpack:///delegated ./node_modules/lodash/isequal.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/area/list-view-code-selector/list-view-code-selector.scss?c59c","webpack:///delegated ./node_modules/webpack/buildin/global.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/internals/to-absolute-index.js","webpack:///./node_modules/core-js/internals/to-string-tag-support.js","webpack:///./node_modules/core-js/internals/shared.js","webpack:///./node_modules/core-js/internals/set-global.js","webpack:///./node_modules/core-js/internals/document-create-element.js","webpack:///./node_modules/core-js/internals/native-symbol.js","webpack:///./node_modules/core-js/internals/inspect-source.js","webpack:///./node_modules/core-js/internals/classof.js","webpack:///./node_modules/core-js/internals/object-property-is-enumerable.js","webpack:///./node_modules/core-js/internals/array-includes.js","webpack:///./node_modules/core-js/internals/enum-bug-keys.js","webpack:///./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack:///./node_modules/core-js/internals/redefine-all.js","webpack:///./node_modules/core-js/internals/set-species.js","webpack:///./node_modules/core-js/internals/check-correctness-of-iteration.js","webpack:///./node_modules/core-js/internals/engine-v8-version.js","webpack:///./node_modules/core-js/internals/define-well-known-symbol.js","webpack:///./node_modules/core-js/internals/define-iterator.js","webpack:///./node_modules/core-js/internals/object-set-prototype-of.js","webpack:///./node_modules/core-js/internals/regexp-flags.js","webpack:///./node_modules/core-js/internals/string-multibyte.js","webpack:///./node_modules/core-js/internals/string-trim.js","webpack:///./node_modules/core-js/internals/whitespaces.js","webpack:///./node_modules/core-js/internals/inherit-if-required.js","webpack:///./node_modules/core-js/internals/advance-string-index.js","webpack:///./node_modules/core-js/internals/is-regexp.js","webpack:///./node_modules/core-js/internals/internal-metadata.js","webpack:///./node_modules/core-js/modules/es.set.js","webpack:///./node_modules/core-js/modules/esnext.set.add-all.js","webpack:///./node_modules/core-js/modules/esnext.set.delete-all.js","webpack:///./node_modules/core-js/modules/esnext.set.difference.js","webpack:///./node_modules/core-js/modules/esnext.set.every.js","webpack:///./node_modules/core-js/modules/esnext.set.filter.js","webpack:///./node_modules/core-js/modules/esnext.set.find.js","webpack:///./node_modules/core-js/modules/esnext.set.intersection.js","webpack:///./node_modules/core-js/modules/esnext.set.is-disjoint-from.js","webpack:///./node_modules/core-js/modules/esnext.set.is-subset-of.js","webpack:///./node_modules/core-js/modules/esnext.set.is-superset-of.js","webpack:///./node_modules/core-js/modules/esnext.set.join.js","webpack:///./node_modules/core-js/modules/esnext.set.map.js","webpack:///./node_modules/core-js/modules/esnext.set.reduce.js","webpack:///./node_modules/core-js/modules/esnext.set.some.js","webpack:///./node_modules/core-js/modules/esnext.set.symmetric-difference.js","webpack:///./node_modules/core-js/modules/esnext.set.union.js","webpack:///delegated ./node_modules/memoize-one/dist/memoize-one.esm.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/highcharts/modules/heatmap.js","webpack:///delegated ./node_modules/url/url.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/debounce-textarea/textarea.scss?9355","webpack:///./ui/common/element-loader/element-loader.scss?3725","webpack:///./ui/common/button/button-input-group.scss?305e","webpack:///./ui/common/dropdown-menu/dropdown-menu.scss?3f6f","webpack:///./ui/common/select/index-options/index-group.scss?337d","webpack:///./ui/common/select/options-resolver.scss?544d","webpack:///./ui/common/slider-readonly/slider-readonly.scss?8e5a","webpack:///./ui/file-selector/file-selector.scss?66e8","webpack:///./ui/expandable-text/expandable-text.scss?e59d","webpack:///./ui/group-panel/group-panel.scss?6b73","webpack:///./ui/checkbox-list/checkbox-list-item.scss?16ae","webpack:///./ui/tile/copy-options.scss?19ee","webpack:///./ui/access-card/access-label.scss?c33c","webpack:///./ui/flex-row-panel/flex-row-panel.scss?5e69","webpack:///./ui/checkbox/checkbox.scss?ce9c","webpack:///./node_modules/react-icons/lib/md/trending-neutral.js","webpack:///./app/area/case/components/loss-potential/loss-potential-consequence-evaluation.scss?2982","webpack:///./app/area/case/components/attach-link/attach-link-selector/attach-link-selector.scss?160f","webpack:///./app/components/comment/comment-tile-view/comment-tile-view.scss?9cec","webpack:///./app/components/case-header-panel/panels/left-panel.scss?3eea","webpack:///./app/components/processing-log/common/log-details/log-details.scss?3ea6","webpack:///./app/components/processing-log/mail-log-link.scss?b17c","webpack:///./app/components/compact-tile-header/compact-tile-header.scss?0658","webpack:///delegated ./node_modules/lodash/isempty.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/area/bowtie/overlay/bowtie-overlay.scss?e7f8","webpack:///delegated ./node_modules/lodash/isplainobject.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/infrastructure/ui/form/form-context.scss?73af","webpack:///./ui/scroll-to-top/scroll-to-top.scss?ae30","webpack:///./app/area/case/case-receipt.scss?cb59","webpack:///./app/components/favourite-layout/favourite/chart-data-options/chart-favourite.scss?f138","webpack:///./app/components/favourite-layout/data-layout/table-view-favourite.scss?11da","webpack:///./node_modules/react-icons/lib/md/keyboard-arrow-up.js","webpack:///./app/shell/layout.scss?2ade","webpack:///delegated ./node_modules/react-dnd-multi-backend/lib/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/area/reports/components/drop-area.scss?74c2","webpack:///./app/area/reports/containers/group-by/components/selection-types/period.scss?c234","webpack:///./app/area/reports/containers/group-by/components/selection-types/aggregate-category.scss?3e51","webpack:///./app/area/reports/containers/chart/components/choose-chart-type.scss?8fd4","webpack:///./app/area/administration/list/filters/search-filters.scss?61d3","webpack:///./app/area/administration/list/search-container/search-attributes.scss?cf10","webpack:///./app/area/administration/list/search-container/search-result.scss?599a","webpack:///./app/components/search-tile/search-tile.scss?bf52","webpack:///./app/area/administration/list/components/person-meatball-menu.scss?4bce","webpack:///./app/components/access-panel/options-panel/options-panel-dialog.scss?8daa","webpack:///./app/area/administration/edit/components/top-panel.scss?2680","webpack:///./app/components/access-panel/default-values/add-default-values.scss?159e","webpack:///./app/components/access-panel/default-values/card-value.scss?81ef","webpack:///./app/area/administration/edit/user/roles/panel-role-access.scss?bb23","webpack:///./app/area/codetable/item/translation/translations/ui/language-name.scss?1ee0","webpack:///./app/components/section-header/section-header.scss?884a","webpack:///./app/area/codetable/item/translation/translations/translations-toggle.scss?27d8","webpack:///./app/area/codetable/item/code-fields/code-exclude.scss?85ea","webpack:///./app/area/list-view-code-selector/list-view-column.scss?0411","webpack:///./app/area/user-profile/my-notifications/consents/push-modal.scss?37e2","webpack:///./node_modules/core-js/internals/shared-store.js","webpack:///./node_modules/core-js/internals/ie8-dom-define.js","webpack:///./node_modules/core-js/internals/use-symbol-as-uid.js","webpack:///./node_modules/core-js/internals/copy-constructor-properties.js","webpack:///./node_modules/core-js/internals/own-keys.js","webpack:///./node_modules/core-js/internals/path.js","webpack:///./node_modules/core-js/internals/object-keys-internal.js","webpack:///./node_modules/core-js/internals/is-array-iterator-method.js","webpack:///./node_modules/core-js/internals/call-with-safe-iteration-closing.js","webpack:///./node_modules/core-js/internals/task.js","webpack:///./node_modules/core-js/internals/html.js","webpack:///./node_modules/core-js/internals/engine-is-ios.js","webpack:///./node_modules/core-js/internals/engine-user-agent.js","webpack:///./node_modules/core-js/internals/new-promise-capability.js","webpack:///delegated ./node_modules/process/browser.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/internals/object-define-properties.js","webpack:///./node_modules/core-js/internals/well-known-symbol-wrapped.js","webpack:///./node_modules/core-js/internals/create-iterator-constructor.js","webpack:///./node_modules/core-js/internals/iterators-core.js","webpack:///./node_modules/core-js/internals/correct-prototype-getter.js","webpack:///./node_modules/core-js/internals/dom-iterables.js","webpack:///./node_modules/core-js/internals/regexp-sticky-helpers.js","webpack:///./node_modules/core-js/internals/same-value.js","webpack:///./node_modules/core-js/internals/native-url.js","webpack:///./node_modules/core-js/internals/object-assign.js","webpack:///./node_modules/core-js/internals/array-from.js","webpack:///./node_modules/core-js/internals/collection.js","webpack:///./node_modules/core-js/internals/freezing.js","webpack:///./node_modules/core-js/internals/collection-strong.js","webpack:///./node_modules/core-js/internals/collection-delete-all.js","webpack:///./node_modules/core-js/modules/es.string.fixed.js","webpack:///./node_modules/core-js/internals/not-a-regexp.js","webpack:///./node_modules/core-js/internals/correct-is-regexp-logic.js","webpack:///./app/infrastructure/redux/access-to-state.ts","webpack:///./app/infrastructure/redux/background-save.ts","webpack:///./app/infrastructure/redux/log-errors.ts","webpack:///./app/infrastructure/redux/typed-to-plain.ts","webpack:///./ui/textbox/index.ts","webpack:///./node_modules/core-js/modules/es.number.max-safe-integer.js","webpack:///./ui/common/info/index.ts","webpack:///./ui/common/prompt-confirmation/index.ts","webpack:///./ui/common/value-display/value-display.tsx","webpack:///./ui/common/visibility-sensor/visibility-sensor.tsx","webpack:///./ui/select-single/index.ts","webpack:///./ui/display-number/index.tsx","webpack:///./ui/display-text/display-text.tsx","webpack:///./ui/hidden/index.tsx","webpack:///./ui/section-panel/index.tsx","webpack:///./ui/expandable-panel/expandable-panel.tsx","webpack:///./ui/drawer-with-bar/drawer-with-bar.tsx","webpack:///./ui/toggle-button/toggle-button.tsx","webpack:///./node_modules/core-js/modules/es.object.is.js","webpack:///./node_modules/react-multi-email/commonjs/isEmail.js","webpack:///./node_modules/core-js/modules/es.symbol.to-primitive.js","webpack:///./node_modules/core-js/modules/es.date.to-primitive.js","webpack:///./app/area/codetable/common/code-picker/code-single-picker.tsx","webpack:///./app/area/codetable/common/code-picker/code-multiple-picker.tsx","webpack:///./app/area/codetable/common/codetable-options-handler/reducers.ts","webpack:///./app/area/case/case-receipt.tsx","webpack:///./node_modules/core-js/modules/es.reflect.get.js","webpack:///./ui/date-time/date/merge-date.ts","webpack:///./ui/date-time/date/date-format.ts","webpack:///./ui/date-time/date/parse-date.ts","webpack:///./ui/date-time/date/date.tsx","webpack:///./ui/date-time/time/parse-time.ts","webpack:///./ui/date-time/time/format-time.ts","webpack:///./ui/date-time/time/time.tsx","webpack:///./ui/date-time/date-time.tsx","webpack:///./ui/date-time/index.tsx","webpack:///./ui/sort-order/constants.ts","webpack:///./ui/sort-order/sort-order-button.tsx","webpack:///./ui/sort-order/sort-by-select/sort-by-select.tsx","webpack:///./ui/sort-order/sort-by-list/sort-by-item/sort-by-item.tsx","webpack:///./ui/sort-order/sort-by-list/sort-by-list.tsx","webpack:///./ui/sort-order/sort-order-modal.tsx","webpack:///./ui/sort-order/utils.ts","webpack:///./ui/sort-order/sort-order.tsx","webpack:///./ui/sort-order/index.ts","webpack:///./ui/common/slider-readonly/slider-readonly.tsx","webpack:///./ui/slider-rating/slider-caption.tsx","webpack:///./ui/slider-rating/sliding-bar.tsx","webpack:///./ui/slider-rating/utils.ts","webpack:///./ui/slider-rating/sliding-circle.tsx","webpack:///./ui/slider-rating/ResizeObserver.tsx","webpack:///./ui/slider-rating/slider-rating.tsx","webpack:///./ui/slider-rating/index.ts","webpack:///./ui/file-uploader/file-uploader-item-edit-title.tsx","webpack:///./ui/file-uploader/file-uploader-item.tsx","webpack:///./ui/file-uploader/enums.ts","webpack:///./ui/file-uploader/file-uploader-attach-button.tsx","webpack:///./ui/file-uploader/with-dragdrop.tsx","webpack:///./ui/file-uploader/file.ts","webpack:///./ui/file-uploader/file-uploader.tsx","webpack:///./ui/file-uploader/index.ts","webpack:///./ui/access-card/access-switch-item.tsx","webpack:///./ui/access-card/data.ts","webpack:///./ui/access-card/access-switch.tsx","webpack:///./ui/access-card/access-label.tsx","webpack:///./ui/access-card/access-card.tsx","webpack:///./ui/access-card/index.ts","webpack:///./ui/common/tabs/selectors.ts","webpack:///./ui/common/tabs/tab-button.tsx","webpack:///./ui/common/tabs/tabs.tsx","webpack:///./ui/common/tabs/index.ts","webpack:///./ui/select-single-short-list/select-single-radio-button/select-single-radio-button.tsx","webpack:///./ui/select-single-short-list/select-single-short-list.tsx","webpack:///./ui/select-single-short-list/index.ts","webpack:///./ui/button-list/button-list-button.tsx","webpack:///./ui/button-list/button-list.tsx","webpack:///./ui/button-list/index.ts","webpack:///./ui/common/display-control-context/index.tsx","webpack:///./ui/group-panel/group-panel.tsx","webpack:///./ui/group-panel/index.tsx","webpack:///./ui/checkbox-list/checkbox-list-item.tsx","webpack:///./ui/checkbox-list/checkbox-list.tsx","webpack:///./ui/checkbox-list/index.ts","webpack:///./ui/numberbox/numberbox.tsx","webpack:///./ui/numberbox/index.ts","webpack:///./ui/select-single-hierarchy/select-single-hierarchy.tsx","webpack:///./ui/select-single-hierarchy/index.ts","webpack:///./ui/select-multiple-hierarchy/select-multiple-hierarchy.tsx","webpack:///./ui/select-multiple-hierarchy/index.ts","webpack:///./ui/search/search.tsx","webpack:///./ui/search/index.ts","webpack:///./ui/file-selector/file-selector.tsx","webpack:///./ui/file-selector/index.tsx","webpack:///./ui/display-date/display-date.tsx","webpack:///./ui/display-date/index.tsx","webpack:///./ui/display-boolean/display-boolean.tsx","webpack:///./ui/display-boolean/index.tsx","webpack:///./ui/link-heading/link-heading.tsx","webpack:///./ui/link-heading/index.tsx","webpack:///./ui/fluid-panel/fluid-panel.tsx","webpack:///./ui/fluid-panel/index.tsx","webpack:///./ui/expandable-text/expandable-text.tsx","webpack:///./ui/expandable-text/index.tsx","webpack:///./ui/process-panel/process-panel.tsx","webpack:///./ui/process-panel/index.tsx","webpack:///./ui/flex-panel/flex-panel.tsx","webpack:///./ui/flex-panel/index.ts","webpack:///./ui/columns-panel/columns-panel.tsx","webpack:///./ui/columns-panel/index.tsx","webpack:///./ui/paper/paper.tsx","webpack:///./ui/paper/index.tsx","webpack:///./ui/detail-form-panel/detail-form-panel.tsx","webpack:///./ui/detail-form-panel/index.tsx","webpack:///./ui/display-child-values/display-child-values.tsx","webpack:///./ui/display-child-values/index.tsx","webpack:///./ui/password/password.tsx","webpack:///./ui/password/index.ts","webpack:///./ui/display-numeric-header/display-numeric-header.tsx","webpack:///./ui/display-numeric-header/index.tsx","webpack:///./ui/tile/tile.tsx","webpack:///./ui/tile/index.ts","webpack:///./ui/display-codes/display-codes.tsx","webpack:///./ui/display-codes/index.tsx","webpack:///./ui/display-codes-hierarchy/display-codes-hierarchy.tsx","webpack:///./ui/display-codes-hierarchy/index.tsx","webpack:///./ui/flex-row-panel/flex-row-panel.tsx","webpack:///./ui/flex-row-panel/index.tsx","webpack:///./ui/checkbox/checkbox.tsx","webpack:///./ui/checkbox/index.ts","webpack:///./ui/long-description/long-description.tsx","webpack:///./ui/long-description/index.tsx","webpack:///./ui/icon-list/icon-list.tsx","webpack:///./ui/icon-list/index.tsx","webpack:///./ui/tile-top-zone/tile-top-zone.tsx","webpack:///./ui/tile-top-zone/index.tsx","webpack:///./ui/compact-tile/compact-tile.tsx","webpack:///./ui/compact-tile/index.tsx","webpack:///./ui/common/triangle/triangle.tsx","webpack:///./ui/common/triangle/index.tsx","webpack:///./ui/common/check-symbol/check-symbol.tsx","webpack:///./ui/common/check-symbol/index.tsx","webpack:///./ui/common/icons/radio-symbol.tsx","webpack:///./ui/common/icons/index.tsx","webpack:///./ui/common/no-value-dash/no-value-dash.tsx","webpack:///./ui/common/no-value-dash/index.tsx","webpack:///./ui/tile-view/tile-view-validation.tsx","webpack:///./ui/tile-view/tile-view.tsx","webpack:///./app/area/codetable/common/codetable-options-handler/map-to-store.ts","webpack:///./app/area/codetable/common/codetable-options-handler/actions.ts","webpack:///delegated ./node_modules/querystring-es3/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/redux-thunk/es/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/react-linkify/dist/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/tlds/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/input-control-context/input-control-context.scss?e810","webpack:///delegated ./node_modules/react-dynamic-number/release/dynamicNumber.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/numberbox/numberbox.scss?3846","webpack:///./ui/common/dialog-expander/footer/footer.scss?ef86","webpack:///./ui/common/button/button.scss?eeeb","webpack:///./ui/common/button/button-tertiary.scss?7835","webpack:///./ui/common/button/button-inline.scss?e32b","webpack:///./ui/common/button/button-call-to-action.scss?ed9a","webpack:///./ui/common/button/close-button.scss?d619","webpack:///./node_modules/react-icons/lib/fa/caret-down.js","webpack:///./ui/common/select/selected-options/selected-options.scss?42d6","webpack:///./node_modules/react-icons/lib/md/home.js","webpack:///./ui/common/select/option/option-btn-next-level.scss?6911","webpack:///./ui/common/select/option/option-icon.scss?21e9","webpack:///./ui/common/select/select-options.scss?3d74","webpack:///./ui/common/select/hierarchy-options/hierarchy-options.scss?7756","webpack:///./ui/common/label/label.scss?ee6a","webpack:///./node_modules/react-icons/lib/md/keyboard-control.js","webpack:///./ui/common/dropdown-menu/meatball-menu.scss?50fc","webpack:///./ui/common/triangle/triangle.scss?82af","webpack:///./ui/common/no-value-dash/no-value-dash.scss?519f","webpack:///delegated ./node_modules/react-intersection-visible/lib/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/common/select/select-base-component.scss?1536","webpack:///./ui/select-single-short-list/select-single-short-list.scss?f8eb","webpack:///./node_modules/react-icons/lib/fa/search.js","webpack:///./ui/search/search.scss?8462","webpack:///./node_modules/react-icons/lib/fa/calendar.js","webpack:///delegated ./node_modules/react-timepicker/timepicker.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/react-icons/lib/fa/clock-o.js","webpack:///./node_modules/react-icons/lib/md/star.js","webpack:///delegated ./node_modules/moving-average/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./ui/process-panel/process-panel.scss?9be2","webpack:///./ui/flex-panel/flex-panel.scss?51ee","webpack:///./ui/hidden/hidden.scss?d361","webpack:///./ui/paper/paper.scss?85ca","webpack:///./ui/detail-form-panel/detail-form-panel.scss?6446","webpack:///./ui/sort-order/sort-order-button.scss?1edb","webpack:///./ui/sort-order/sort-by-select/sort-by-select.scss?d367","webpack:///./ui/sort-order/sort-by-list/sort-by-list.scss?5a71","webpack:///./node_modules/react-icons/lib/md/remove-red-eye.js","webpack:///./ui/common/dialog-expander/expander-background/expander-background.scss?d541","webpack:///./ui/long-description/long-description.scss?5afa","webpack:///./ui/display-color/display-color.scss?520f","webpack:///./ui/tile-top-zone/tile-top-zone.scss?97f3","webpack:///delegated ./node_modules/lodash/maxby.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/lodash/minby.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/react-multi-email/commonjs/index.js","webpack:///./app/area/case/components/multi-emails/multi-emails.scss?6406","webpack:///./node_modules/react-icons/lib/md/arrow-back.js","webpack:///./node_modules/react-icons/lib/md/flash-on.js","webpack:///./node_modules/react-icons/lib/md/check-box.js","webpack:///./node_modules/react-icons/lib/md/attach-file.js","webpack:///./app/area/case/components/loss-potential/loss-potential-evaluation.scss?65c0","webpack:///./app/area/case/components/loss-potential/loss-potential-evaluation-tile-view.scss?a308","webpack:///./app/area/case/components/section-summary/section-summary.scss?0235","webpack:///./app/components/spin-loader/spin-loader.scss?1e1b","webpack:///./app/components/category-tile-view/category-tile-view.scss?0153","webpack:///./app/components/display-safe-anchor/display-safe-anchor.scss?bb8c","webpack:///./app/components/add-document-item-link-button/add-document-item-link-button.scss?8a0b","webpack:///./node_modules/react-icons/lib/md/history.js","webpack:///./node_modules/history/lib/index.js","webpack:///./node_modules/rtl-detect/index.js","webpack:///./app/area/bowtie/tooltip/bowtie-tooltip.scss?2786","webpack:///./app/area/bowtie/bowtie.scss?5af5","webpack:///./app/area/case/index.ts","webpack:///./node_modules/@use-it/event-listener/dist/event-listener.m.js","webpack:///./app/components/filters/filters-panel/filter-types/filter-error/filter-error.scss?ded8","webpack:///./app/components/filters/filters-panel/filter-types/filter-date-range/filter-date-range.scss?ac9f","webpack:///./app/components/filters/add-filters/add-filters-button.scss?f959","webpack:///./app/area/filters/filters.scss?db9e","webpack:///delegated ./node_modules/lodash/findindex.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/dot-object/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/lodash/partial.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/lodash/merge.js from dll-reference vendor_1207535b092eed21482d","webpack:///./app/components/favourite-layout/favourite-layout-component-factory.scss?74d4","webpack:///./node_modules/react-icons/lib/fa/sign-out.js","webpack:///./node_modules/react-icons/lib/md/menu.js","webpack:///./node_modules/react-icons/lib/md/file-download.js","webpack:///./node_modules/react-icons/lib/md/help.js","webpack:///./node_modules/react-icons/lib/md/mail-outline.js","webpack:///./node_modules/react-icons/lib/md/feedback.js","webpack:///./node_modules/react-icons/lib/md/playlist-add-check.js","webpack:///./node_modules/react-icons/lib/md/assignment.js","webpack:///./node_modules/react-dnd-multi-backend/lib/HTML5toTouch.js","webpack:///./node_modules/react-icons/lib/md/remove.js","webpack:///./ui/common/dropdown-menu/dropdown-menu-item.scss?c636","webpack:///./app/area/reports/components/dropdown-field.scss?7a01","webpack:///./app/area/reports/containers/group-by/components/group-by-sort.scss?f2bf","webpack:///./app/area/reports/containers/chart/components/attributes/attributes-selector.scss?0e16","webpack:///./app/area/reports/containers/distribution/components/distribution-field.scss?ad69","webpack:///./app/area/administration/list/filters/filter-panel-menu.scss?7397","webpack:///./app/area/administration/list/filters/filter-item.scss?41f1","webpack:///./app/components/search-tile/tile-link.scss?1a58","webpack:///./app/area/administration/list/users/user-toolbar.scss?1cd6","webpack:///./app/area/administration/list/filters/filter-date-range.scss?217b","webpack:///./app/components/tabs-panel/tabs-panel.scss?f0c6","webpack:///./app/components/confirmation-box/confirmation-box.scss?07b7","webpack:///./app/area/administration/edit/components/admin-paper.scss?3ab5","webpack:///./app/components/access-panel/options-panel/options-panel.scss?4716","webpack:///./app/area/administration/edit/user/user-edit-menu/change-id.scss?182a","webpack:///./app/components/metro-line/with-metro-line.scss?ef2a","webpack:///./app/area/administration/edit/user/alternative-id/alternative-id.scss?0a73","webpack:///./app/area/administration/edit/role/details.scss?81b5","webpack:///./app/components/tag/tag.scss?3443","webpack:///./app/area/codetable/list/list-items/codetable-list-items.scss?2109","webpack:///./app/area/codetable/list/search/number-of-results.scss?9122","webpack:///./node_modules/react-icons/lib/md/delete.js","webpack:///./app/area/codetable/item/translation/translations.scss?4d00","webpack:///./app/area/codetable/item/codetable-item-form.scss?f2c9","webpack:///delegated ./node_modules/lodash/isboolean.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/lodash/isnil.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/react-icons/lib/md/insert-drive-file.js","webpack:///./node_modules/react-icons/lib/io/android-arrow-dropright.js","webpack:///./node_modules/react-icons/lib/md/phone.js","webpack:///./node_modules/react-icons/lib/md/notifications.js","webpack:///./app/area/user-profile/my-notifications/consents/edit-sms-consent.scss?872a","webpack:///./app/area/user-profile/my-notifications/consents/edit-push-consent.scss?e586","webpack:///./app/area/user-profile/my-notifications/top-panel.scss?4764","webpack:///./app/area/user-profile/my-notifications/info-messages.scss?cc23","webpack:///./app/area/user-profile/my-notifications/my-notifications.scss?5cee","webpack:///./app/area/user-profile/no-content.scss?052f","webpack:///./node_modules/core-js/internals/native-weak-map.js","webpack:///./node_modules/core-js/internals/object-to-string.js","webpack:///./node_modules/core-js/internals/native-promise-constructor.js","webpack:///./node_modules/core-js/internals/microtask.js","webpack:///./node_modules/core-js/internals/promise-resolve.js","webpack:///./node_modules/core-js/internals/host-report-errors.js","webpack:///./node_modules/core-js/internals/perform.js","webpack:///delegated ./node_modules/isomorphic-fetch/fetch-npm-browserify.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/internals/object-get-own-property-names-external.js","webpack:///./node_modules/core-js/internals/a-possible-prototype.js","webpack:///./node_modules/core-js/internals/string-trim-forced.js","webpack:///./node_modules/core-js/modules/es.regexp.exec.js","webpack:///./node_modules/core-js/internals/string-punycode-to-ascii.js","webpack:///./node_modules/core-js/modules/web.url-search-params.js","webpack:///./node_modules/core-js/internals/array-for-each.js","webpack:///./node_modules/core-js/modules/esnext.array.last-index.js","webpack:///./node_modules/core-js/internals/array-last-index-of.js","webpack:///./node_modules/core-js/internals/same-value-zero.js","webpack:///delegated ./node_modules/oidc-client/lib/oidc-client.min.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/modules/es.string.starts-with.js","webpack:///delegated ./node_modules/linkify-it/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/internals/flatten-into-array.js","webpack:///./node_modules/core-js/internals/number-is-finite.js","webpack:///./node_modules/core-js/internals/number-parse-int.js","webpack:///./ui/common/breadcrumb/breadcrumb-item.scss?9e48","webpack:///delegated ./node_modules/react-day-picker/lib/style.css from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/react-timepicker/timepicker.css from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/modules/es.math.sign.js","webpack:///./node_modules/core-js/internals/math-sign.js","webpack:///./node_modules/core-js/modules/es.object.freeze.js","webpack:///./node_modules/core-js/modules/es.string.raw.js","webpack:///./node_modules/react-multi-email/commonjs/ReactMultiEmail.js","webpack:///./node_modules/react-multi-email/style.css","webpack:///./node_modules/css-loader/lib/css-base.js","webpack:///./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js","webpack:///./node_modules/inherits/inherits_browser.js","webpack:///./node_modules/core-js/internals/date-to-primitive.js","webpack:///./node_modules/redux-freeze/lib/middleware.js","webpack:///./node_modules/deep-freeze-strict/index.js","webpack:///delegated ./node_modules/history/lib/LocationUtils.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/createBrowserHistory.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/createHashHistory.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/createMemoryHistory.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/useBasename.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/history/lib/useBeforeUnload.js","webpack:///delegated ./node_modules/invariant/browser.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/DOMUtils.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/ExecutionEnvironment.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/useQueries.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/history/lib/Actions.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/rtl-detect/lib/rtl-detect.js","webpack:///./node_modules/core-js/internals/collection-add-all.js","webpack:///delegated ./node_modules/react-editable-json-tree/dist/JsonTree.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/modules/es.number.is-integer.js","webpack:///./node_modules/core-js/internals/is-integer.js","webpack:///./node_modules/highcharts/modules/exporting.js","webpack:///delegated ./node_modules/jspdf-yworks/dist/jspdf.min.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/svg2pdf.js/dist/svg2pdf.min.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/highcharts/modules/offline-exporting.js","webpack:///./node_modules/core-js/modules/es.string.small.js","webpack:///delegated ./node_modules/react-dnd-html5-backend/lib/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/react-dnd-touch-backend/dist/Touch.js from dll-reference vendor_1207535b092eed21482d","webpack:///delegated ./node_modules/dnd-multi-backend/lib/index.js from dll-reference vendor_1207535b092eed21482d","webpack:///./node_modules/core-js/modules/es.string.anchor.js","webpack:///./app/shell/app-shell.ts","webpack:///./app/infrastructure/universal/execution.ts","webpack:///./app/shell/reducers.ts","webpack:///./app/area/favourite/action-types.ts","webpack:///./app/area/favourite/reducers.ts","webpack:///./app/area/dashboard/action-types.ts","webpack:///./app/area/dashboard/reducers.ts","webpack:///./app/area/company-report/action-types.ts","webpack:///./app/area/company-report/reducers.ts","webpack:///./app/area/case-listing/action-types.ts","webpack:///./app/area/case-listing/reducers.ts","webpack:///./app/area/shared/response-caching/reducers.ts","webpack:///./app/area/reports/containers/aggregation/action-types.ts","webpack:///./app/area/reports/containers/aggregation/reducers.ts","webpack:///./app/area/reports/containers/distribution/action-types.ts","webpack:///./app/area/reports/containers/distribution/reducers.ts","webpack:///./app/area/reports/containers/group-by/action-types.ts","webpack:///./app/area/reports/containers/group-by/types-fields.ts","webpack:///./app/area/reports/constants.ts","webpack:///./app/area/reports/containers/group-by/actions.mapper.ts","webpack:///./app/area/reports/containers/group-by/reducers.ts","webpack:///./app/area/reports/containers/target/action-types.ts","webpack:///./app/area/reports/containers/target/reducers.ts","webpack:///./app/area/reports/containers/chart/action-types.ts","webpack:///./app/area/reports/containers/chart/reducers.ts","webpack:///./app/infrastructure/redux/merge-reducers.ts","webpack:///./app/area/reports/reducers.ts","webpack:///./app/area/user-profile/settings/action-types.ts","webpack:///./app/infrastructure/simple-form/action-types.ts","webpack:///./app/infrastructure/simple-form/reducers.ts","webpack:///./app/area/user-profile/settings/reducers.ts","webpack:///./app/components/options-handler/action-types.ts","webpack:///./app/components/options-handler/reducers.ts","webpack:///./app/components/options-handler/api.ts","webpack:///./app/components/options-handler/actions.ts","webpack:///./app/components/options-handler/with-options.ts","webpack:///./app/area/codetable/list/action-types.ts","webpack:///./app/area/codetable/list/selectors.ts","webpack:///./app/area/codetable/common/action-types.ts","webpack:///./app/area/codetable/list/mapping/map-delete.ts","webpack:///./app/area/codetable/list/mapping/map-to-decreased-children-count.ts","webpack:///./app/area/codetable/list/reducers-helpers.ts","webpack:///./app/area/codetable/list/reducers.ts","webpack:///./app/area/codetable/item/action-types.ts","webpack:///./app/area/codetable/item/reducers.ts","webpack:///./app/area/codetable/action-types.ts","webpack:///./app/area/codetable/reducers.ts","webpack:///./app/area/user-profile/default-values/action-types.ts","webpack:///./app/components/access-panel/validation/validation-messages.ts","webpack:///./app/area/user-profile/default-values/reducers.ts","webpack:///./app/area/administration/edit/user/action-types.ts","webpack:///./app/area/administration/edit/user/reducers.ts","webpack:///./app/area/administration/list/action-types.ts","webpack:///./app/area/administration/list/types-store.ts","webpack:///./app/area/administration/list/reducers.ts","webpack:///./app/area/administration/edit/role/action-types.ts","webpack:///./app/area/administration/edit/role/reducers.ts","webpack:///./app/area/filters/action-types.ts","webpack:///./app/area/filters/types.ts","webpack:///./app/area/filters/reducers.ts","webpack:///./app/area/bowtie/action-types.ts","webpack:///./app/area/bowtie/reducers.ts","webpack:///./app/area/saved-reports/action-types.ts","webpack:///./app/area/saved-reports/reducers.ts","webpack:///./app/area/my-downloads/exports/exports-view/action-types.ts","webpack:///./app/area/my-downloads/exports/exports-view/reducers.ts","webpack:///./app/area/my-downloads/reports-view/action-types.ts","webpack:///./app/area/my-downloads/reports-view/reducers.ts","webpack:///./app/area/my-downloads/exports/export-to-zip-modal/action-types.ts","webpack:///./app/area/my-downloads/exports/export-to-zip-modal/reducers.ts","webpack:///./app/area/my-downloads/reducers.ts","webpack:///./app/area/user-profile/my-notifications/action-types.ts","webpack:///./app/area/user-profile/my-notifications/reducers.ts","webpack:///./app/area/import/action-types.ts","webpack:///./app/area/import/reducers.ts","webpack:///./app/area/code-selector/action-types.ts","webpack:///./app/area/code-selector/reducers.ts","webpack:///./app/infrastructure/remote-data/action-types.ts","webpack:///./app/infrastructure/remote-data/reducers.ts","webpack:///./app/factory-default.ts","webpack:///./app/startup/default/reducers.ts","webpack:///./app/infrastructure/configure-store.ts","webpack:///./app/startup/runtime-configuration.ts","webpack:///./app/components/lang-dir/index.tsx","webpack:///./app/area/bowtie/mapping/map-bowtie.ts","webpack:///./app/area/bowtie/mapping/map-inspection.ts","webpack:///./app/area/bowtie/constants.ts","webpack:///./app/area/bowtie/endpoints.ts","webpack:///./app/area/bowtie/api.ts","webpack:///./app/area/bowtie/actions.ts","webpack:///./app/area/bowtie/types.ts","webpack:///./app/area/bowtie/overlay/bowtie-overlay.tsx","webpack:///./app/area/bowtie/mapping/map-anchor.ts","webpack:///./app/area/bowtie/mapping/map-draft.ts","webpack:///./app/area/bowtie/mapping/map-case.ts","webpack:///./app/area/bowtie/mapping/map-connected-cases.ts","webpack:///./app/area/bowtie/mapping/map-model.ts","webpack:///./app/area/bowtie/tooltip/bowtie-connections-item.tsx","webpack:///./app/area/bowtie/tooltip/bowtie-connections.tsx","webpack:///./app/area/bowtie/tooltip/bowtie-tooltip.tsx","webpack:///./app/area/bowtie/bowtie.tsx","webpack:///./app/area/case/create/api.ts","webpack:///./app/area/case/create/actions.ts","webpack:///./app/area/case/create/index.tsx","webpack:///./app/area/case/draft/constants.ts","webpack:///./app/area/case/draft/connected-case-info-modal.tsx","webpack:///./app/area/favourite/api.ts","webpack:///./app/area/favourite/mapping.ts","webpack:///./app/area/favourite/selectors.ts","webpack:///./app/area/favourite/actions.ts","webpack:///./app/area/case-listing/constants.ts","webpack:///./app/area/case-listing/api.ts","webpack:///./app/area/case-listing/actions.ts","webpack:///./app/components/filters/types.ts","webpack:///./app/components/filters/filters-panel/constants.ts","webpack:///./app/area/filters/filters-mapping.ts","webpack:///./app/area/filters/mapping.ts","webpack:///./app/infrastructure/simple-form/types.ts","webpack:///./app/area/filters/constants.ts","webpack:///./app/infrastructure/simple-form/api.ts","webpack:///./app/infrastructure/simple-form/validation/types.ts","webpack:///./app/infrastructure/simple-form/validation/constants.ts","webpack:///./app/infrastructure/simple-form/utils.ts","webpack:///./app/infrastructure/simple-form/validation/rules.ts","webpack:///./app/infrastructure/validation/phone.ts","webpack:///./app/infrastructure/simple-form/validation/validation.ts","webpack:///./app/infrastructure/simple-form/validation/convert.ts","webpack:///./app/infrastructure/simple-form/actions.ts","webpack:///./app/infrastructure/simple-form/field-types.ts","webpack:///./app/infrastructure/simple-form/common/select-single-hierarchy.tsx","webpack:///./app/infrastructure/simple-form/common/select-single.tsx","webpack:///./app/infrastructure/simple-form/common/select-multiple.tsx","webpack:///./app/infrastructure/simple-form/common/select-multiple-hierarchy.tsx","webpack:///./app/infrastructure/simple-form/common/date-time.tsx","webpack:///./app/infrastructure/simple-form/common/textarea.tsx","webpack:///./app/infrastructure/simple-form/common/checkbox-list.tsx","webpack:///./app/infrastructure/simple-form/common/password.tsx","webpack:///./app/infrastructure/simple-form/common/checkbox.tsx","webpack:///./app/infrastructure/simple-form/common/decimal-number.tsx","webpack:///./app/infrastructure/simple-form/simple-form.tsx","webpack:///./app/infrastructure/simple-form/serialize.ts","webpack:///./app/infrastructure/simple-form/with-simple-form.ts","webpack:///./app/components/display-selected-options/display-selected-options.tsx","webpack:///./app/area/filters/api.ts","webpack:///./app/infrastructure/simple-form/selectors.ts","webpack:///./app/area/filters/actions.ts","webpack:///./app/components/filters/filters-panel/filter-menu-options.ts","webpack:///./app/components/filters/filters-panel/filter-panel.tsx","webpack:///./app/components/filters/filters-panel/required-field.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-error/filter-error.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-decimal/create-initial-decimal-field-conditions.ts","webpack:///./app/components/filters/filters-panel/filter-configuration.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-code-hierarchy/filter-code-hierarchy.tsx","webpack:///./app/components/filters/filters-panel/filter-types/trim-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-code-hierarchy/create-condition-value.ts","webpack:///./app/components/filters/filters-panel/conditions/create-advanced-field.ts","webpack:///./app/components/filters/filters-panel/conditions/create-conditions.ts","webpack:///./app/components/filters/filters-panel/filter-types/get-condition.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-code-hierarchy/select-multiple-hierarchy.ts","webpack:///./app/components/filters/filters-panel/filter-types/create-initial-default-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-checkbox/filter-checkbox.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-checkbox/create-condition-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-checkbox/checkbox.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-date-range/create-initial-date-field-conditions.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-date-range/filter-date-range.tsx","webpack:///./app/components/filters/filters-panel/filter-types/get-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-date-range/create-date-condition.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-date-range/date-field.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-decimal/filter-decimal.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-decimal/decimal-number.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-code/filter-code.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-code/create-condition-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-code/select-multiple.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/filter-domain.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/create-condition-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/user-profile.ts","webpack:///./app/components/filters/filters-panel/filter-types/default-condition-types-value-data.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/my-location.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/my-person.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/my-unit.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-number/filter-number.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-number/create-number-field-condition.ts","webpack:///./app/components/filters/filters-panel/option-type-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-number/number-field.ts","webpack:///./app/area/filters/favourite-definition/create-field-option-type.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-predefined-date/filter-predefined-date.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-predefined-date/predefined-date.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-predefined-filters/filter-predefined-filters.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-predefined-filters/predefined-filters.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-text/filter-text.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-text/text-field-data.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-text/create-condition-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-text/create-condition-option-type-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-text/create-condition-sub-option-type-value.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-text/text-field.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-code/filter-code-flat.tsx","webpack:///./app/components/filters/filters-panel/filter-types/filter-code/select-multiple-flat.ts","webpack:///./app/components/filters/filters-panel/filter-types/configuration.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/create-initial-my-location-conditions.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/create-initial-person-conditions.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-domain/create-initial-my-unit-conditions.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-number/create-initial-number-field-conditions.ts","webpack:///./app/components/filters/filters-panel/filter-types/filter-text/create-initial-text-field-conditions.ts","webpack:///./app/components/filters/filters-panel/create-filter-configurations.ts","webpack:///./app/components/filters/filters-panel/selected-options-length.ts","webpack:///./app/components/filters/add-filters/add-filters-button.tsx","webpack:///./app/components/filters/add-filters/add-filters-select.tsx","webpack:///./app/components/filters/add-filters/add-filters.tsx","webpack:///./app/components/filters/filters-panel/filter-validation.ts","webpack:///./app/components/filters/filters-panel/filters-panel.tsx","webpack:///./app/area/filters/favourite-definition/map-connections.ts","webpack:///./app/area/filters/favourite-definition/map-conditions-values.ts","webpack:///./app/area/filters/favourite-definition/map-initial-conditions.ts","webpack:///./app/area/filters/favourite-definition/map-option-type.ts","webpack:///./app/area/filters/favourite-definition/create-range-conditions.ts","webpack:///./app/area/filters/favourite-definition/create-my-value-conditions.ts","webpack:///./app/area/filters/favourite-definition/group-conditions.ts","webpack:///./app/area/filters/favourite-definition/map-to-filters.ts","webpack:///./app/components/filters/filters-panel/conditions/update-filter-conditions.ts","webpack:///./app/area/filters/filters.tsx","webpack:///./app/components/filters/filters-panel/map-to-connections.ts","webpack:///./app/area/filters/filters-drawer.tsx","webpack:///./app/area/saved-reports/constants.ts","webpack:///./app/area/saved-reports/api.ts","webpack:///./app/area/saved-reports/actions.mapper.ts","webpack:///./app/area/saved-reports/create-saved-reports.ts","webpack:///./app/area/saved-reports/actions.ts","webpack:///./app/area/saved-reports/create-folder/create-folder.tsx","webpack:///./app/area/saved-reports/selectors.ts","webpack:///./app/area/saved-reports/copy-link/copy-link.tsx","webpack:///./app/area/saved-reports/generate-copy-link.ts","webpack:///./app/area/saved-reports/create-report.tsx","webpack:///./ui/common/main-grid-container/main-grid-container.tsx","webpack:///./app/area/favourite/favourite-layout.tsx","webpack:///./app/area/favourite/map-report-to-definition.ts","webpack:///./app/area/case-listing/case-listing-tile.tsx","webpack:///./app/area/case-listing/comparers.ts","webpack:///./app/area/case-listing/case-listing.tsx","webpack:///./app/area/case-listing/embedded-case-listing.tsx","webpack:///./app/area/case/draft/index.tsx","webpack:///./app/area/case/duplicate/api.ts","webpack:///./app/area/case/duplicate/actions.ts","webpack:///./app/area/case/duplicate/index.tsx","webpack:///./app/area/case/edit/api.ts","webpack:///./app/area/case/edit/actions.ts","webpack:///./app/area/case/edit/editor.tsx","webpack:///./app/components/favourite-layout/constants.ts","webpack:///./app/area/dashboard/constants.ts","webpack:///./app/components/favourite-layout/favourite/common/favourite-data-adapter.ts","webpack:///./app/components/favourite-layout/favourite/common/favourite-interfaces.ts","webpack:///./app/components/favourite-layout/favourite/common/drill-down-builder.ts","webpack:///./app/components/favourite-layout/favourite/common/favourite-model-component.ts","webpack:///./app/components/favourite-layout/favourite/common/layout-config.ts","webpack:///./app/components/favourite-layout/favourite/common/utils.ts","webpack:///./app/components/favourite-layout/favourite/chart-layout-options/chart-export.ts","webpack:///./app/components/favourite-layout/favourite/chart-layout-options/default-chart-layout-options.ts","webpack:///./app/components/favourite-layout/favourite/chart-layout-options/chart-misc.ts","webpack:///./app/components/favourite-layout/favourite/chart-layout-options/chart-layout-options-builder-factory.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/chart-series-data-options-builder.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/chart-point-data-options-builder.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/default-chart-data-options-builder.ts","webpack:///./app/components/favourite-layout/favourite/common/chart-rows.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/bar-chart-data-options-builder.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/pie-chart-data-options-builder.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/line-and-column-chart-data-options-builder.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/heatmap-chart-data-options-builder.ts","webpack:///./app/components/favourite-layout/favourite/common/favourite-data-options.ts","webpack:///./app/components/favourite-layout/favourite/common/chart-favourite-model-component.ts","webpack:///./app/components/favourite-layout/favourite/chart-data-options/chart-data-options-builder-factory.ts","webpack:///./app/components/favourite-layout/favourite/react/react-favourite-model-component-factory.ts","webpack:///./app/components/favourite-layout/favourite/common/create-model-component.ts","webpack:///./app/components/favourite-layout/chart-favourite.tsx","webpack:///./app/components/favourite-layout/data-layout/constants.ts","webpack:///./app/components/favourite-layout/data-layout/table-favourite-model-component.ts","webpack:///./app/components/favourite-layout/data-layout/tile/tile-field.tsx","webpack:///./app/components/favourite-layout/data-layout/view-model/cell.ts","webpack:///./app/components/favourite-layout/data-layout/view-model/display-total.ts","webpack:///./app/components/favourite-layout/data-layout/view-model/compact-cell.ts","webpack:///./app/components/favourite-layout/data-layout/view-model/row.ts","webpack:///./app/components/favourite-layout/data-layout/view-model/map-to-row.ts","webpack:///./app/components/favourite-layout/data-layout/config.ts","webpack:///./app/components/favourite-layout/data-layout/tile-view-favourite.tsx","webpack:///./app/components/favourite-layout/data-layout/table/cell.tsx","webpack:///./app/components/favourite-layout/data-layout/table-view-favourite.tsx","webpack:///./app/components/favourite-layout/data-layout/table/header.tsx","webpack:///./app/components/favourite-layout/data-layout/table/footer.tsx","webpack:///./app/components/favourite-layout/favourite-layout-component-factory.tsx","webpack:///./app/components/favourite-layout/data-layout/selectors.ts","webpack:///./app/area/dashboard/favourite-container.tsx","webpack:///./app/area/dashboard/dashboard-layout.tsx","webpack:///./app/area/dashboard/types.ts","webpack:///./app/area/dashboard/api.ts","webpack:///./app/area/dashboard/actions.ts","webpack:///./app/area/dashboard/dashboard.tsx","webpack:///./app/area/company-report/constants.ts","webpack:///./app/area/company-report/generate-favourite.ts","webpack:///./app/area/company-report/api.ts","webpack:///./app/area/company-report/actions.ts","webpack:///./app/components/resize-wrapper.tsx","webpack:///./app/area/filters/report/map-to-filters.ts","webpack:///./app/area/filters/filters-report.tsx","webpack:///./app/area/company-report/report-view.tsx","webpack:///./app/area/startup/components/open-case/open-case.tsx","webpack:///./app/area/startup/components/new-case-banner/new-case-banner.tsx","webpack:///./app/area/startup/startup.tsx","webpack:///./app/area/startup/constants.ts","webpack:///./app/components/timer/timer.tsx","webpack:///./app/area/import/constants.ts","webpack:///./app/area/import/api.ts","webpack:///./app/area/import/actions.ts","webpack:///./app/area/import/types.ts","webpack:///./app/area/import/import-context-menu.tsx","webpack:///./app/area/import/import-detail-view.tsx","webpack:///./app/area/import/import-expand-details-button.tsx","webpack:///./app/area/import/import-view-item.tsx","webpack:///./app/area/import/import-add-case.tsx","webpack:///./app/area/import/import-edit-case.tsx","webpack:///./app/area/import/import-view.tsx","webpack:///./app/area/auth/dialog.tsx","webpack:///./app/area/auth/login-progress.tsx","webpack:///./app/area/auth/login-failed.tsx","webpack:///./app/area/auth/logout.tsx","webpack:///./app/area/auth/auth-view.tsx","webpack:///./app/shell/components/dev-error-panel/dev-error-panel.tsx","webpack:///./app/area/user-profile/settings/constants.ts","webpack:///./app/infrastructure/data/validation.ts","webpack:///./app/area/user-profile/settings/endpoints.ts","webpack:///./app/area/user-profile/settings/api.ts","webpack:///./app/area/user-profile/settings/actions.ts","webpack:///./app/area/user-profile/settings/change-password/change-password-modal.tsx","webpack:///./app/area/my-downloads/exports/export-to-zip-modal/constants.ts","webpack:///./app/area/my-downloads/exports/export-to-zip-modal/api.ts","webpack:///./app/area/my-downloads/exports/export-to-zip-modal/actions.ts","webpack:///./app/area/my-downloads/exports/export-to-zip-modal/export-to-zip-modal.tsx","webpack:///./app/shell/components/regenerate-aggregated/env/regenerate-aggregated-env.tsx","webpack:///./app/shell/components/regenerate-aggregated/risk/regenerate-aggregated-risk.tsx","webpack:///./app/shell/modal-host.tsx","webpack:///./app/shell/components/about-modal/about-modal.tsx","webpack:///./app/shell/components/refresh-cache/refresh-cache-modal.tsx","webpack:///./app/shell/notification-toast.tsx","webpack:///./app/shell/components/footer/support-link.tsx","webpack:///./app/shell/components/footer/footer.tsx","webpack:///./app/shell/footer.tsx","webpack:///./app/area/favourite/components/url-to-survey-manager.tsx","webpack:///./app/shell/some-items.ts","webpack:///./app/shell/components/desktop-nav/desktop-nav.tsx","webpack:///./app/shell/components/mobile-nav/mobile-nav.tsx","webpack:///./app/shell/header.tsx","webpack:///./app/shell/selectors.ts","webpack:///./app/shell/components/messages-to-user/message-to-user.tsx","webpack:///./app/shell/components/messages-to-user/message-to-user-list.tsx","webpack:///./app/shell/default/layout.tsx","webpack:///./app/infrastructure/development/system-info.ts","webpack:///./app/area/reports/components/drag-tag.tsx","webpack:///./app/area/reports/types.ts","webpack:///./app/area/reports/components/drag-n-drop-context.tsx","webpack:///./app/area/reports/containers/aggregation/map-to-store.ts","webpack:///./app/area/reports/containers/aggregation/actions.ts","webpack:///./ui/common/dropdown-menu/dropdown-menu-item.tsx","webpack:///./app/area/reports/components/expandable-box.tsx","webpack:///./app/area/reports/components/dropdown-field.tsx","webpack:///./app/area/reports/containers/aggregation/components/aggregation-field.tsx","webpack:///./app/area/reports/components/drop-panel.tsx","webpack:///./app/area/reports/components/drag-panel.tsx","webpack:///./app/area/reports/components/button-select-multiple-dialog.tsx","webpack:///./app/area/reports/components/drop-area.tsx","webpack:///./app/components/enhancers/with-cached-translation.tsx","webpack:///./app/area/reports/containers/aggregation/components/aggregation-panel.tsx","webpack:///./app/area/reports/selected-report.ts","webpack:///./app/area/reports/containers/aggregation/map-to-definition.ts","webpack:///./app/area/reports/containers/aggregation/aggregation-container.tsx","webpack:///./app/area/reports/containers/group-by/map-to-store.ts","webpack:///./app/area/reports/containers/group-by/actions.ts","webpack:///./app/area/reports/containers/group-by/fields-map.tsx","webpack:///./app/area/reports/containers/group-by/components/selection-types/actual-value.tsx","webpack:///./app/area/reports/containers/group-by/components/selection-types/interval.tsx","webpack:///./app/area/reports/containers/group-by/components/selection-types/period.tsx","webpack:///./app/area/reports/containers/group-by/components/selection-types/aggregate-value.tsx","webpack:///./app/area/reports/containers/group-by/components/selection-types/aggregate-category.tsx","webpack:///./app/area/reports/containers/group-by/components/selection-types/configuration-selection-type.tsx","webpack:///./app/area/reports/containers/group-by/components/selection-types/not-selected.tsx","webpack:///./app/area/reports/containers/group-by/components/group-by-sort.tsx","webpack:///./app/area/reports/containers/group-by/components/selections-field.tsx","webpack:///./app/area/reports/containers/group-by/components/sortable/sort-item.tsx","webpack:///./app/area/reports/containers/group-by/components/group-by-panel.tsx","webpack:///./app/area/reports/containers/group-by/map-to-definition.ts","webpack:///./app/area/reports/containers/group-by/group-by-container.tsx","webpack:///./app/area/reports/containers/target/map-to-store.ts","webpack:///./app/area/reports/containers/target/actions.ts","webpack:///./app/area/reports/containers/target/map-to-definition.ts","webpack:///./app/area/reports/containers/target/components/target-field.tsx","webpack:///./app/area/reports/containers/target/components/target-panel.tsx","webpack:///./app/area/reports/containers/target/target-container.tsx","webpack:///./app/area/reports/containers/chart/map-to-store.ts","webpack:///./app/area/reports/containers/chart/actions.ts","webpack:///./app/area/reports/containers/chart/components/attributes/types.ts","webpack:///./app/area/reports/containers/chart/components/choose-chart-type.tsx","webpack:///./app/area/reports/containers/chart/components/attributes/constants.ts","webpack:///./app/area/reports/containers/chart/components/attributes/map-to-options.ts","webpack:///./app/area/reports/containers/chart/components/attributes/map-to-attributes.ts","webpack:///./app/area/reports/containers/chart/components/attributes/attributes-selector.tsx","webpack:///./app/area/reports/containers/chart/components/attributes/attributes-picker.tsx","webpack:///./app/area/reports/containers/chart/components/chart-area.tsx","webpack:///./app/area/reports/containers/chart/components/error-boundarie.tsx","webpack:///./app/area/reports/containers/chart/components/selection-report-chart.tsx","webpack:///./app/area/reports/containers/chart/map-to-definition.ts","webpack:///./app/area/reports/containers/chart/chart-container.tsx","webpack:///./app/area/reports/containers/chart/selectors.ts","webpack:///./app/area/reports/caseTypeIds.ts","webpack:///./app/area/reports/selection/api.ts","webpack:///./app/area/reports/selection/actions.ts","webpack:///./app/area/reports/containers/aggregation/aggregation-field.ts","webpack:///./app/area/reports/containers/aggregation/get-selected-options.ts","webpack:///./app/area/reports/containers/group-by/get-selected-options.ts","webpack:///./app/area/reports/containers/distribution/get-selected-options.ts","webpack:///./app/area/reports/containers/target/get-selected-options.ts","webpack:///./app/area/reports/components/selected-options.tsx","webpack:///./app/area/reports/selection/selection-report-container.tsx","webpack:///./app/area/reports/frequency/api.ts","webpack:///./app/area/reports/containers/distribution/actions.ts","webpack:///./app/area/reports/containers/distribution/map-to-store.ts","webpack:///./app/area/reports/containers/distribution/components/distribution-field.tsx","webpack:///./app/area/reports/containers/distribution/components/distribution-panel.tsx","webpack:///./app/area/reports/containers/distribution/map-to-definition.ts","webpack:///./app/area/reports/containers/distribution/distribution-container.tsx","webpack:///./app/area/reports/frequency/actions.ts","webpack:///./app/area/reports/frequency/frequency-report-container.tsx","webpack:///./app/area/favourite/favourite-result.tsx","webpack:///./app/area/favourite/components/url-to-excel.ts","webpack:///./app/area/favourite/components/favourite-excel-links.tsx","webpack:///./app/area/favourite/components/favourite-context-menu.tsx","webpack:///./app/area/favourite/components/display-options.tsx","webpack:///./app/area/favourite/map-query-to-definition.ts","webpack:///./app/area/favourite/map-sort-to-definition.ts","webpack:///./app/area/favourite/compare.ts","webpack:///./app/area/favourite/favourite.tsx","webpack:///./app/area/favourite/search-query.ts","webpack:///./app/area/administration/list/constants.ts","webpack:///./app/area/administration/constants.ts","webpack:///./app/area/administration/list/filters/types.ts","webpack:///./app/area/administration/list/filters/filter-panel.tsx","webpack:///./app/area/administration/list/filters/filter-panel-menu.tsx","webpack:///./app/area/administration/list/filters/filter-item-field.tsx","webpack:///./app/area/administration/list/filters/selectors.ts","webpack:///./app/area/administration/list/filters/filter-item.tsx","webpack:///./app/area/administration/list/filters/filter-predefined.tsx","webpack:///./app/area/administration/list/filters/create-date.ts","webpack:///./app/area/administration/list/filters/map-to-summary.ts","webpack:///./app/area/administration/list/filters/search-filters.tsx","webpack:///./app/area/administration/list/search-container/search-attributes.tsx","webpack:///./app/area/administration/list/search-container/search-layout.tsx","webpack:///./app/area/administration/list/search-container/search-result.tsx","webpack:///./app/area/administration/list/search-container/search-container.tsx","webpack:///./app/area/administration/list/endpoints.ts","webpack:///./app/area/administration/list/api.ts","webpack:///./app/area/administration/shared/endpoints.ts","webpack:///./app/area/administration/shared/api.ts","webpack:///./app/infrastructure/platform/file.ts","webpack:///./app/area/shared/actions-utils.ts","webpack:///./app/area/administration/list/actions.ts","webpack:///./app/area/administration/shared/types.ts","webpack:///./app/components/search-tile/search-tile.tsx","webpack:///./app/components/search-tile/tile-link.tsx","webpack:///./app/area/administration/list/search-tile/tile-info.tsx","webpack:///./app/area/administration/list/components/person-meatball-menu.tsx","webpack:///./app/area/administration/list/users/user-tile.tsx","webpack:///./app/area/administration/list/users/user-toolbar.tsx","webpack:///./app/area/administration/list/users/user-filter-configuration.ts","webpack:///./app/area/administration/list/serialize.ts","webpack:///./app/area/administration/list/filters/filter-code-hierarchy.tsx","webpack:///./app/area/administration/list/filters/filter-checkbox.tsx","webpack:///./app/area/administration/list/filters/filter-input.tsx","webpack:///./app/area/administration/list/filters/validators/filter-validation.tsx","webpack:///./app/area/administration/list/filters/validators/number-validator.ts","webpack:///./app/area/administration/list/filters/filter-date-range.tsx","webpack:///./app/area/administration/list/filters/constants.ts","webpack:///./app/area/administration/list/filter-configuration.ts","webpack:///./app/area/administration/list/users/user-search.tsx","webpack:///./app/area/administration/edit/constants.ts","webpack:///./app/area/administration/edit/endpoints.ts","webpack:///./app/area/administration/edit/user/api.ts","webpack:///./app/area/administration/edit/api.ts","webpack:///./app/components/access-panel/sf-names.ts","webpack:///./app/components/access-panel/validation/normalize.ts","webpack:///./app/area/administration/edit/user/actions.util.ts","webpack:///./app/area/administration/edit/user/actions.ts","webpack:///./app/components/access-panel/shared/types.ts","webpack:///./app/components/tabs-panel/tabs-panel.tsx","webpack:///./app/components/confirmation-box/confirmation-box.tsx","webpack:///./app/components/access-panel/role-based-access/role-based-access.tsx","webpack:///./app/components/access-panel/role-based-access/selectors.ts","webpack:///./app/components/access-panel/options-panel/options-panel-dialog.tsx","webpack:///./app/components/access-panel/shared/validation.ts","webpack:///./app/components/access-panel/options-panel/single-option-panel.tsx","webpack:///./app/area/administration/edit/components/top-panel.tsx","webpack:///./app/area/administration/edit/components/admin-paper.tsx","webpack:///./app/area/administration/edit/components/admin-paper-top-panel.tsx","webpack:///./app/components/access-panel/access-to-administrate-user-group.tsx","webpack:///./app/components/access-panel/options-panel/options-panel.utils.ts","webpack:///./app/components/access-panel/types.ts","webpack:///./app/components/access-panel/options-panel/option-panel.tsx","webpack:///./app/components/access-panel/options-panel/option-card.tsx","webpack:///./app/components/access-panel/options-panel/options-panel.tsx","webpack:///./app/components/access-panel/access-to-screen.tsx","webpack:///./app/components/access-panel/extended-access.tsx","webpack:///./app/components/access-panel/operation.tsx","webpack:///./app/components/access-panel/notifications.tsx","webpack:///./app/components/access-panel/restricted-access.tsx","webpack:///./app/components/access-panel/extra-info/constants.ts","webpack:///./app/components/access-panel/extra-info/configuration.ts","webpack:///./app/components/access-panel/extra-info/extra-info-item.tsx","webpack:///./app/components/access-panel/extra-info/map-extra-info.ts","webpack:///./app/components/access-panel/extra-info/create-extra-info-values.ts","webpack:///./app/components/access-panel/extra-info/extra-info-panel.tsx","webpack:///./app/components/access-panel/extra-info/selectors.ts","webpack:///./app/components/access-panel/extra-info/extra-info.tsx","webpack:///./app/components/access-panel/extra-info/serialize.ts","webpack:///./app/components/access-panel/default-values/panel-default-values-utils.ts","webpack:///./app/components/access-panel/default-values/add-default-value.tsx","webpack:///./app/components/access-panel/default-values/card-value.tsx","webpack:///./app/components/access-panel/default-values/panel-default-values.tsx","webpack:///./app/components/access-panel/default-values/default-values.tsx","webpack:///./app/components/access-panel/default-values/serialize.ts","webpack:///./app/components/access-panel/access-to-assign-roles.tsx","webpack:///./app/components/visible-for-fields/selectors.ts","webpack:///./app/components/visible-for-fields/visible-for-fields.tsx","webpack:///./app/components/access-panel/user-occurence/user-occurence-panel.tsx","webpack:///./app/components/access-panel/user-occurence/selectors.ts","webpack:///./app/components/access-panel/user-occurence/user-occurence.tsx","webpack:///./app/components/access-panel/options-panel/serialize.ts","webpack:///./app/area/administration/edit/serialize.ts","webpack:///./app/area/administration/edit/user/user-edit-menu/types.ts","webpack:///./app/area/administration/edit/user/user-edit-menu/change-id.tsx","webpack:///./app/area/administration/edit/user/user-edit-menu/change-password.tsx","webpack:///./app/area/administration/edit/user/user-edit-menu/change-db-account.tsx","webpack:///./app/area/administration/edit/user/user-edit-menu/user-edit-menu.tsx","webpack:///./app/area/administration/edit/sf-names.ts","webpack:///./app/area/administration/edit/user/user-edit-configuration.ts","webpack:///./app/area/administration/edit/access-data-validation.ts","webpack:///./app/area/administration/edit/compare-access.ts","webpack:///./app/area/administration/edit/user/user-type-group.tsx","webpack:///./app/components/metro-line/types.ts","webpack:///./app/area/administration/edit/user/unit-location-lang.tsx","webpack:///./app/components/metro-line/tab-item-wrapper.tsx","webpack:///./app/components/metro-line/helpers.ts","webpack:///./app/components/metro-line/metro-line.tsx","webpack:///./app/components/metro-line/with-metro-line.tsx","webpack:///./app/area/administration/edit/user/types.ts","webpack:///./app/area/administration/edit/user/alternative-id/constants.ts","webpack:///./app/area/administration/edit/user/alternative-id/alternative-id-item.tsx","webpack:///./app/area/administration/edit/user/alternative-id/alternative-id.tsx","webpack:///./app/area/administration/edit/user/details.tsx","webpack:///./app/components/metro-line/metro-line-section.tsx","webpack:///./app/area/administration/edit/user/roles/panel-role-access.tsx","webpack:///./app/area/administration/edit/user/user-edit-form.tsx","webpack:///./app/area/administration/edit/user/configuration.tsx","webpack:///./app/area/administration/edit/user/user-edit.tsx","webpack:///./app/area/administration/edit/user/has-access.ts","webpack:///./app/area/administration/edit/user/user-edit-factory.tsx","webpack:///./app/area/case/draft/change-casetype/api.ts","webpack:///./app/area/case/draft/change-casetype/actions.ts","webpack:///./app/area/case/draft/change-casetype/index.tsx","webpack:///./app/area/my-downloads/reports-view/constants.ts","webpack:///./app/area/my-downloads/reports-view/api.ts","webpack:///./app/area/my-downloads/reports-view/actions.ts","webpack:///./app/area/my-downloads/reports-view/types-store.ts","webpack:///./app/area/my-downloads/extensions.ts","webpack:///./app/area/my-downloads/reports-view/reports-view-item.tsx","webpack:///./app/area/my-downloads/reports-view/reports-view.tsx","webpack:///./app/area/my-downloads/exports/exports-view/types.ts","webpack:///./app/area/my-downloads/exports/exports-view/exports-view-item.tsx","webpack:///./app/area/my-downloads/exports/exports-view/constants.ts","webpack:///./app/area/my-downloads/exports/exports-view/api.ts","webpack:///./app/area/my-downloads/exports/exports-view/actions.ts","webpack:///./app/area/my-downloads/exports/exports-view/exports-view.tsx","webpack:///./app/area/my-downloads/my-downloads.tsx","webpack:///./app/area/my-downloads/constants.ts","webpack:///./app/area/administration/edit/role/api.ts","webpack:///./app/area/administration/edit/role/actions.ts","webpack:///./app/area/administration/edit/role/types.ts","webpack:///./app/area/administration/edit/role/role-edit-menu.tsx","webpack:///./app/area/administration/edit/role/details.tsx","webpack:///./app/area/administration/edit/role/role-edit-form.tsx","webpack:///./app/area/administration/edit/role/configuration.tsx","webpack:///./app/area/administration/edit/role/role-edit.tsx","webpack:///./app/area/administration/list/roles/role-filter-configuration.ts","webpack:///./app/area/administration/list/roles/role-tile.tsx","webpack:///./app/area/administration/list/roles/role-toolbar.tsx","webpack:///./app/area/administration/list/roles/role-search.tsx","webpack:///./app/area/codetable/endpoints.ts","webpack:///./app/area/codetable/api.ts","webpack:///./app/area/codetable/constants.ts","webpack:///./app/area/codetable/actions.ts","webpack:///./app/area/codetable/selectors.ts","webpack:///./app/area/codetable/codetable-base.tsx","webpack:///./app/area/codetable/list/list-items/common/codetable-item-loader.tsx","webpack:///./app/area/codetable/list/list-items/common/codetable-item-row.tsx","webpack:///./app/area/codetable/list/list-items/codetable-list-items-container.tsx","webpack:///./app/components/tag/tag.tsx","webpack:///./app/area/codetable/common/disabled-tag/disabled-tag.tsx","webpack:///./app/area/codetable/list/list-items/common/codetable-item-lines.tsx","webpack:///./app/area/codetable/list/list-items/common/constants.ts","webpack:///./app/area/codetable/list/list-items/codetable-item-content.tsx","webpack:///./app/area/codetable/list/list-items/codetable-item.tsx","webpack:///./app/area/codetable/list/list-items/codetable-list-items.tsx","webpack:///./app/area/codetable/list/search/codetable-search.tsx","webpack:///./app/area/codetable/list/search/code-category.tsx","webpack:///./app/area/codetable/list/search/number-of-results.tsx","webpack:///./app/area/codetable/list/mapping/map-list-to-store.ts","webpack:///./app/area/code-selector/api.ts","webpack:///./app/area/codetable/list/actions.ts","webpack:///./app/area/codetable/list/constants.ts","webpack:///./app/area/codetable/list/action-helpers.ts","webpack:///./app/area/codetable/list/codetable-list.tsx","webpack:///./app/area/codetable/item/sticky-header/codetable-sticky-header.tsx","webpack:///./app/area/codetable/item/mapping/map-code-to-store.ts","webpack:///./app/area/codetable/item/endpoints.ts","webpack:///./app/area/codetable/item/api.ts","webpack:///./app/area/codetable/item/mapping/map-code-to-wire.ts","webpack:///./app/area/codetable/item/mapping/create-empty-code-item.ts","webpack:///./app/area/codetable/item/actions-helpers.ts","webpack:///./app/area/codetable/item/mapping/main-language.ts","webpack:///./app/area/codetable/item/mapping/copy-translations.ts","webpack:///./app/area/codetable/item/validation/has-validation-errors.ts","webpack:///./app/area/codetable/item/translation/translations/has-translations-valid.ts","webpack:///./app/area/codetable/helpers.ts","webpack:///./app/area/codetable/item/actions.ts","webpack:///./app/area/codetable/item/translation/translations/ui/language-name.tsx","webpack:///./app/area/codetable/item/translation/translations/translation-row.tsx","webpack:///./app/area/codetable/item/translation/constants.ts","webpack:///./app/area/codetable/item/translation/translations/update-languages.ts","webpack:///./app/components/section-header/section-header.tsx","webpack:///./app/area/codetable/item/translation/translations/get-language-validation.ts","webpack:///./app/area/codetable/item/translation/main-language/main-language.tsx","webpack:///./app/area/codetable/item/translation/translations/translations-toggle.tsx","webpack:///./app/area/codetable/item/codetable-item-form-render-helpers.ts","webpack:///./app/area/codetable/item/translation/translations.tsx","webpack:///./app/area/codetable/item/code-pickers/helpers.ts","webpack:///./app/area/codetable/item/code-pickers/code-case-types.tsx","webpack:///./app/area/codetable/item/code-pickers/code-node.tsx","webpack:///./app/area/codetable/item/code-pickers/code-parent.tsx","webpack:///./app/area/codetable/item/code-pickers/code-user-groups.tsx","webpack:///./app/area/codetable/item/code-pickers/code-category.tsx","webpack:///./app/area/codetable/item/code-fields/code-sequence.tsx","webpack:///./app/area/codetable/item/code-fields/code-disabled.tsx","webpack:///./app/area/codetable/types-store.ts","webpack:///./app/area/codetable/item/code-additional-fields/code-number-additional-field.tsx","webpack:///./app/area/codetable/item/code-additional-fields/code-string-additional-field.tsx","webpack:///./app/area/codetable/item/code-additional-fields/code-additional-fields.tsx","webpack:///./app/area/codetable/item/details/details.tsx","webpack:///./app/area/codetable/item/code-fields/code-exclude.tsx","webpack:///./app/area/codetable/item/types.ts","webpack:///./app/area/codetable/item/code-fields/get-disabled-options.ts","webpack:///./app/area/codetable/item/visibility/visibility.tsx","webpack:///./app/area/codetable/item/code-pickers/code-type.tsx","webpack:///./app/area/codetable/item/codetable-item-form.tsx","webpack:///./app/area/codetable/item/selectors.ts","webpack:///./app/area/codetable/item/codetable-item-helpers.ts","webpack:///./app/area/codetable/item/validation/validate.ts","webpack:///./app/area/codetable/item/configuration.tsx","webpack:///./app/area/codetable/item/codetable-item.tsx","webpack:///./app/area/saved-reports/edit-folder/edit-folder.tsx","webpack:///./app/area/saved-reports/select-saved-report.tsx","webpack:///./app/area/code-selector/constants.ts","webpack:///./app/area/code-selector/actions.ts","webpack:///./app/area/list-view-code-selector/list-view-column.tsx","webpack:///./app/area/list-view-code-selector/list-view-folder.tsx","webpack:///./app/area/list-view-code-selector/list-view-item.tsx","webpack:///./app/area/list-view-code-selector/constants.ts","webpack:///./app/area/list-view-code-selector/list-view-column-container.tsx","webpack:///./app/area/list-view-code-selector/list-view-code-selector.tsx","webpack:///./app/area/code-selector/code-selector.tsx","webpack:///./app/area/user-profile/my-notifications/endpoints.ts","webpack:///./app/area/user-profile/my-notifications/api.ts","webpack:///./app/area/user-profile/my-notifications/types.ts","webpack:///./app/area/user-profile/my-notifications/constants.ts","webpack:///./app/area/user-profile/my-notifications/actions.ts","webpack:///./app/area/user-profile/my-notifications/consent-item.tsx","webpack:///./app/area/user-profile/my-notifications/consents/sms-modal.tsx","webpack:///./app/area/user-profile/my-notifications/consents/edit-sms-consent.tsx","webpack:///./app/infrastructure/push/hasPropertyValues.ts","webpack:///./app/infrastructure/push/configuration-data.ts","webpack:///./app/area/user-profile/my-notifications/configuration-access.ts","webpack:///./app/area/user-profile/my-notifications/consents/channel-permission.ts","webpack:///./app/infrastructure/push/context.ts","webpack:///./app/area/user-profile/my-notifications/consents/get-push-name.ts","webpack:///./app/area/user-profile/my-notifications/notification-permission.ts","webpack:///./app/area/user-profile/my-notifications/consents/push-modal.tsx","webpack:///./app/area/user-profile/my-notifications/consents/edit-push-consent.tsx","webpack:///./app/area/user-profile/my-notifications/consent-list.tsx","webpack:///./app/area/user-profile/my-notifications/consents/add-sms-consent.tsx","webpack:///./app/area/user-profile/my-notifications/consents/add-push-consent.tsx","webpack:///./app/area/user-profile/my-notifications/top-panel.tsx","webpack:///./app/area/user-profile/my-notifications/info-messages.tsx","webpack:///./app/area/user-profile/user-profile-heading.tsx","webpack:///./app/area/user-profile/my-notifications/my-notifications.tsx","webpack:///./app/area/user-profile/settings/settings.tsx","webpack:///./app/area/user-profile/no-content.tsx","webpack:///./app/area/user-profile/user-profile-tabs.tsx","webpack:///./app/area/user-profile/default-values/constants.ts","webpack:///./app/area/user-profile/default-values/endpoints.ts","webpack:///./app/area/user-profile/default-values/api.ts","webpack:///./app/area/user-profile/default-values/actions.ts","webpack:///./app/area/user-profile/default-values/access-panel.tsx","webpack:///./app/area/user-profile/default-values/serialize.ts","webpack:///./app/area/user-profile/default-values/default-values.tsx","webpack:///./app/area/user-profile/user-profile.tsx","webpack:///./app/area/user-profile/configuration.ts","webpack:///./app/area/user-profile/constants.ts","webpack:///./app/area/messages/messages.tsx","webpack:///./app/routes/wait-for-access-info.tsx","webpack:///./app/routes/default.tsx","webpack:///./app/startup/default/routes.ts","webpack:///./app/area/dashboard/dashboard-view.tsx","webpack:///./app/infrastructure/push/init.ts","webpack:///./app/infrastructure/push/messaging-provider.tsx","webpack:///./app/startup/index.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","installedCssChunks","3","__webpack_require__","exports","module","l","e","promises","Promise","resolve","reject","href","fullhref","p","existingLinkTags","document","getElementsByTagName","dataHref","tag","getAttribute","rel","existingStyleTags","linkTag","createElement","type","onload","onerror","event","request","target","src","err","Error","code","parentNode","removeChild","appendChild","then","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","jsonpScriptSrc","error","clearTimeout","chunk","errorType","realSrc","message","name","undefined","setTimeout","head","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","window","oldJsonpFunction","slice","s","$","global","getBuiltIn","IS_PURE","DESCRIPTORS","NATIVE_SYMBOL","USE_SYMBOL_AS_UID","fails","has","isArray","isObject","anObject","toObject","toIndexedObject","toPrimitive","createPropertyDescriptor","nativeObjectCreate","objectKeys","getOwnPropertyNamesModule","getOwnPropertyNamesExternal","getOwnPropertySymbolsModule","getOwnPropertyDescriptorModule","definePropertyModule","propertyIsEnumerableModule","createNonEnumerableProperty","redefine","shared","sharedKey","hiddenKeys","uid","wellKnownSymbol","wrappedWellKnownSymbolModule","defineWellKnownSymbol","setToStringTag","InternalStateModule","$forEach","forEach","HIDDEN","TO_PRIMITIVE","setInternalState","set","getInternalState","getterFor","ObjectPrototype","$Symbol","$stringify","nativeGetOwnPropertyDescriptor","f","nativeDefineProperty","nativeGetOwnPropertyNames","nativePropertyIsEnumerable","AllSymbols","ObjectPrototypeSymbols","StringToSymbolRegistry","SymbolToStringRegistry","WellKnownSymbolsStore","QObject","USE_SETTER","findChild","setSymbolDescriptor","this","a","O","P","Attributes","ObjectPrototypeDescriptor","wrap","description","symbol","isSymbol","it","$defineProperty","$defineProperties","Properties","properties","keys","concat","$getOwnPropertySymbols","$propertyIsEnumerable","V","$getOwnPropertyDescriptor","descriptor","$getOwnPropertyNames","names","result","IS_OBJECT_PROTOTYPE","TypeError","arguments","String","setter","configurable","unsafe","forced","sham","stat","string","keyFor","sym","useSetter","useSimple","defineProperties","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","stringify","replacer","space","$replacer","args","index","apply","valueOf","TO_STRING_TAG_SUPPORT","toString","addToUnscopables","Iterators","defineIterator","Array","iterated","kind","state","done","Arguments","DOMIterables","ArrayIteratorMethods","ITERATOR","TO_STRING_TAG","ArrayValues","values","COLLECTION_NAME","Collection","CollectionPrototype","METHOD_NAME","copyConstructorProperties","NativeSymbol","EmptyStringDescriptionStore","SymbolWrapper","symbolPrototype","constructor","symbolToString","native","regexp","desc","replace","charAt","point","toLength","createProperty","arraySpeciesCreate","arrayMethodHasSpeciesSupport","V8_VERSION","IS_CONCAT_SPREADABLE","IS_CONCAT_SPREADABLE_SUPPORT","array","SPECIES_SUPPORT","isConcatSpreadable","spreadable","proto","arg","k","len","E","A","$filter","filter","arrayMethodUsesToLength","HAS_SPECIES_SUPPORT","USES_TO_LENGTH","callbackfn","nativeGetPrototypeOf","CORRECT_PROTOTYPE_GETTER","getPrototypeOf","setPrototypeOf","childValues","caseState","uiEngineProps","componentDescriptor","children","child","dataTag","map","resolvers","riskValues","riskArea","valueItem","riskWeight","riskAreaRest","riskWeightRest","consequenceRiskValues","caseData","entityContext","entity","getById","contextToStorePath","entityType","getEntityTypeFromStorePath","id","riskAreaField","tableName","lossPotentialEvaluationConsequence","riskWeightField","urlToConnectedCase","config","withBaseUrl","componentEntityType","entityTypePath","connectedCases","entities","casePk","hostProps","entityId","idPath","resolveContext","path","indexKey","find","Number","split","connectedCase","editing","caseNumber","url","routeConstants","caseViewFor","toAbsoluteUrl","urlOpenNew","openNew","urlToCase","urlToChildEntity","caseItem","tblTrans","routeFromStoreItemPath","RenderMode","read","selectEntities","getEntityTypeFromPath","getCaseData","getEntityContext","storePath","getStorePath","filteredEntities","getChildEntities","entityFilter","childEntities","rowEntity","childEntityTypeKeys","fullState","existingKeys","primaryKey","childEntityCount","propMappings","propObject","prop","entityPath","allRows","getValue","propName","count","commentValues","currentUser","app","userInfo","valueFormatter","text","comment","submittedComment","submittedBy","submittedDate","createUTCDate","expandComplexValueProp","valueName","minLevelName","complexValue","minLevel","primaryKeyFromContext","primaryKeyFromContextExpanded","casePermissions","permissions","results","relevantCase","enabledEntityOperations","edit","delete","bowtie","surveyManager","permissionsLoaded","fieldValues","fieldObject","componentValues","fieldName","valueObject","caseListingComponent","connectedCasesMaxSequence","connectionTypeId","pathToConnectionType","trans","connectionTypes","connections","maxSeq","maxSequenceEntity","maxSequence","sequence","connectedCasesSortValue","sortValue","entityValue","columnName","connectedSequence","connectedDrafts","connectedCasesRiskValues","connectedRiskArea","connectedRiskWeight","connectedRiskAreaRest","connectedRiskWeightRest","connectedCasesIntegrityValues","connectedIntegrityStatus","connectedIntegrityScore","connectedIntegrityStatusBarrierEval","connectedCasesIds","getAllEntitiesAtPath","some","connectedCasesActionCount","actionEntities","connectedActionView","closedActionEntities","numberOfConnectedClosedActions","actionCount","closedActionCount","connectedCasePermissions","connectedCaseId","stateForCaseIds","childEntityFieldValueAsOptions","options","reduce","prev","findIndex","v","caseId","caseIdValue","getCaseId","tileHeaderPrimaryKey","showPrimaryKey","headerTitle","tileHeaderPrimaryKeyWithReportKeyLabel","rtnProps","props","showReportKeyLabel","reportKeyLabel","childEntityValuesAsProperty","propertyName","valueItems","x","sum","acc","current","childValuesAggregate","aggregateColumn","aggregateFunction","rows","getIteratorChildItems","IteratorType","DataRows","entityStoreKey","valuesForAllRows","childValuesTotals","diffFieldValueAndChildValuesTotals","childValuesAggrSum","fieldValue","difference","attachLinkValues","title","linkUrl","link","referenceFieldFromEntity","referenceCodeDataTag","context","referenceFieldValue","referenceField","categoryId","referenceType","referenceFieldValueAsPrimaryKey","codeDataTag","referenceModalTempData","getComponentData","fetchingModalOptions","fetching","referenceModalOptions","integrityValues","integrityStatus","integrityScore","integrityStatusBarrierEval","createContext","appState","server","AppSetting","ApplicationUrl","Integrations","templateURL","templateUrl","urlFromTemplateString","compile","RX_MATCH_INTERPOLATE_CONTENT","test","domainTemplateUrl","urlFromContext","encodeURI","compileEach","identifier","domainIdOrDescriptor","JSON","parse","isFinite","SchemaBuilder","renderMode","uiDefinition","getComponentValues","log","isValidUrl","validationDescendants","domainMetadata","resolveDomainMetadata","detailsViewDescriptor","childValidationErrors","aggregatedErrorList","validations","matchesCurrentValidationContext","mapToValidationProps","messages","inferHostSectionOfChildEntity","sections","matches","sameEntityPathAndRootLevelOrIterator","toLowerCase","iterate","childHavingPath","item","findFirstSectionHostingEntity","sort","b","firstSectionId","availableSections","firstSection","resolveVisibleSections","inferActiveSectionId","memoize","activeChildItem","isDeepLink","visibleSections","resolvedSection","getEntityTypePathFromStorePath","activeSectionState","invalidSections","activeSection","expandAll","submitFailed","sectionId","nextAndPreviousSection","previousSection","nextSection","activeIndex","invalidSectionIds","selectValidationDescendants","val","level","ValidationLevel","validState","_","hasValidationErrors","hasValidationWarnings","valid","warnings","warning","changeCaseTypeActionCreator","draftId","onChangeCaseType","navigate","checklistValues","transPath","allChecklistItems","checklistCategory","aggr","curr","checklist","evaluations","evaluationsGroupedByValue","group","tooltip","backgroundColor","getEvaluationGroupDetails","CheckListEvaluation","checklistEvaluations","numberOfChecklistItems","print","hostprops","viewMode","ViewMode","scroll","domainId","meta","connectedPkFromContext","pk","connectedPkValueTag","initialValues","visibilityConfigPerRenderMode","report","meatballMenu","open","duplicate","share","panel","changeCaseType","headerVisibilityConfiguration","applicationState","sharedState","authState","AuthState","Anonymous","visibilityConfig","translate","make","copies","createCopies","copy","cancel","copyIteratorProps","texts","getText","createDescriptionSelector","copyIterator","requiredSearchFieldsFilled","requiredFieldsForSearch","field","dotNotated","dotNotationToDataTag","allEntities","pendingDeleteIds","hasNoPendingDelete","connectedCasesPendingDeleteIds","getPrimaryEntityId","reportCategory","reportIdToReportCategoryId","factboxLinks","caseTypeId","applicationId","uiDefinitions","childDomain","links","action","section","consequences","assessment","attachmentType","causes","involvedDrug","involvedPerson","lossPotentialEvaluation","lossPotentialResidualEvaluation","uiProps","editDocumentItemVisibility","showDetailsEditButton","mapSharedState","nativeKeys","green","checkListInteraction","drugReactionInteraction","signature","economy","transLog","numberOfClosedActions","numberOfActions","actionCompletedDate","actionDueStatus","docName","blob","contentType","size","thumbnailSize","attachedBy","attachedAt","mainImage","numberOfFiles","numberOfComments","validFrom","numberOfCauses","numberOfInvolvedPersons","actConsConsequenceIcons","actConsLoss","actConsGain","anchorIndicator","numberOfLinks","numberOfInvolvedDrugs","envValSubstance","envValSubstanceCategory","signaturePerson","signatureType","signatureDate","costEstimate","checkListEvaluation","numberOfAssessments","caseLogs","caseLogNo","confidential","confidentialIndicator","connectionType","statusIndicator","superior","subordinate","propNameConnectionType","numberOfSuperiorCases","numberOfSubordinateCases","ControlType","componentDefaults","NotImplemented","attributeKey","events","View","COMPONENT_ACTIONS","onSelectDocumentItem","Panel","Section","CallToAction","ActionBar","Schema","DateTime","onChange","TextBox","NumberBox","SelectMultiple","onLoadOptions","SelectMultipleHierarchy","SelectSingle","SelectSingleHierarchy","TextArea","TileView","onAddDocumentItem","SelectSingleShortList","EntityKeyCategorySelectSingleShortList","CommentTile","onDeleteDocumentItem","CommentTileView","SliderRating","scheduleUpdate","EntityKeyCategorySliderRating","ButtonList","HeaderPanel","onEditDocument","onDeleteDocument","onDuplicateDocument","onLoadBowtie","onSubmitDocument","onCloseDocument","onLoadPermissions","DisplayCodes","DisplayCodesUnitOfMeasure","DisplayDate","DisplayNumber","DisplayNumberUnitOfMeasure","DisplayText","LinkHeading","FluidPanel","ExpandableText","ProcessPanel","GroupPanel","FlexPanel","ColumnsPanel","DisplayChildValues","FactBox","Badge","ConnectedCasesTileView","FileUploader","CodeSelectorTileView","LossPotentialEvaluation","onCopyDocumentItem","LossPotentialEvaluationTileView","CodeTitleTile","LossPotentialConsequenceEvaluation","LossPotentialConsequenceEvaluationTileView","rowClassName","CategoryTileView","CategoryTile","DetailForm","DisplayNumericHeader","Tile","onEditDocumentItem","DisplayCodesHierarchy","DisplayBoolean","ConsequenceTypeTileView","ConsequenceTypeTile","ConsequenceTileView","CheckBox","LongDescription","ConnectedCasesTile","CauseCategoryTileView","CheckListCategoryTileView","CheckListCategoryTile","SectionSummaryPanel","TileTopZone","DisplayNumericSum","strong","AttachLinkTileView","DisplaySafeAnchor","AttachLinkTile","enabledChildEntityOperations","remove","CheckListEvaluationPanel","SubstanceCategoryTileView","EnvironmentalValuesTileView","SafeAnchor","InteractionTileView","InteractionTile","CausesTileView","CompactCodeTitleTile","SummaryTileView","TitleWrapperPrimaryKey","InteractionTileViewDrugReaction","ReferenceTileView","ReferenceTile","ReferenceDate","ReferenceTextBox","ReferenceNumberBox","ReferenceEntityKeyCategorySelectSingleShortList","ReferenceCheckBox","ReferenceDateTime","ReferenceSelectSingleHierarchy","ReferenceSelectSingle","SurveyLink","Signature","SectionPanel","noConditionalRender","RiskMatrix","DisplayInsuranceBalance","IndicatorCodeSelectorTileView","AddDocumentItemLinkButton","ProcessingLogView","ProcessingLogDetails","ProcessingLogLink","CaseLogLink","MailLogDetails","MailLogLink","AddNewCaseButton","CompactTileHeader","ConnectedCasesFactbox","Link","CheckForDuplicateRegistrationsButton","DisplaySurveyLink","LinkSearchExternalProvider","CompactTile","ConnectToBowtieButton","BarrierInspectionTileView","DisplayNumberBarrierInspection","DisplayCodesStatus","SelectSingleSignature","$map","STATE","startupArea","startupAnonymousArea","dashboard","case","responseCaching","favourite","userSettings","userProfile","administrationCodetable","userDefaultValues","administrationSearch","administrationEdit","administrationRoleEdit","companyReport","caseListing","selectionReport","filters","savedReport","myDownloads","import","codeSelector","myNotifications","remoteData","textCollection","TOKEN_KEY","ID_TOKEN_KEY","debounceExecuteFavouriteWait","FAILS_ON_PRIMITIVES","ownKeys","getOwnPropertyDescriptors","UserProfileSectionType","CodeSelectorFor","ConnectedCaseType","CaseType","Dashboard","SavedReport","CompanyReport","ChangeCaseType","CodetableAdministration","routeName","Administration","Bowtie","Case","CreateDraft","CaseReceipt","Draft","Favourite","UserProfile","Select","MyDownloads","Import","Help","MessagesToUser","codetableBreadcrumbs","breadcrumbs","breadcrumb","startupView","draftView","draftViewFor","createCase","caseType","createDraft","changeCaseTypeTo","favouriteFor","favouriteId","favouriteDraft","favouriteDraftNew","openReportState","new","casesView","casesViewFor","caseView","caseReceipt","caseReceiptFor","caseEdit","caseEditFor","caseDuplicate","caseDuplicateFor","dashboardView","dashboardFor","dashboardType","savedReportView","companyReportView","savedReportFor","companyReportFor","userProfileActiveSection","userProfileMainView","userProfileMainViewFocus","userProfileViewWithFocusFor","userSearchView","roleAdd","roleAddSection","roleAddFor","roleAddSectionFor","rolesView","roleEdit","roleEditFor","roleEditSectionFor","userAdd","userAddFor","actionType","userAddSectionFor","userEdit","userEditFor","userNumber","userEditSectionFor","userDuplicate","userDuplicateFor","userDuplicateSectionFor","codetableAdministration","codetableAdministrationFor","codetableAdministrationOptionsCollection","codetableAdministrationCode","codetableAdministrationCodeFor","codeId","codetableAdministrationAddCodeFor","parentId","codetableAdministrationCodeSectionFor","codetableAdministrationAddCodeSectionFor","bowtieView","draftPath","casePath","caseSection","select","selectCodetableId","selectDashboard","selectCompanyReports","selectCaseType","selectChangeCaseType","selectConnectedCaseType","selectSavedReports","selectCodetableAdministration","myDownloadsView","importView","messagesToUserView","flags","RegExpPrototype","RegExp","nativeToString","NOT_GENERIC","source","INCORRECT_NAME","R","rf","historySingleton","useHistory","historyObject","toStartupView","to","toCaseView","replaceCurrent","routeUrls","toCaseEdit","getCurrentLocation","pathname","search","toCaseDuplicate","toCodeSelectView","toPrintCaseView","caseUrl","createHref","query","toDraft","queryParams","toCaseListing","toUpdateSavedReport","toBowtie","newWindow","toBowtieConnection","searchArg","internal","toAdminUsersList","toAdminRoleList","toDuplicateUser","toSelectConnected","toConnectionInitiator","route","returnToSection","toSelectChangeCaseType","toSearch","toSectionURL","explicitPath","currentPath","toSection","currentQuery","toPrepareSubmit","location","toChildItem","routeArg","toMetroLineSection","isRouteInPath","reg","defaultArray","operation","entityOperation","REMOVE","inclPendingDeletes","storeKey","isEditing","readData","overrideDataTag","valueSelector","defaultValueGetter","getLevel","ValidationMessageLevel","levels","Math","max","label","resolveHasAnyValidations","hasErrors","hasWarnings","Warning","resolveWarnings","assign","getComponentMetadata","domainAttributes","resolvedDomainAttributes","readOnly","matchesCurrentContext","requiredField","hidden","validationResult","validation","resolveValidations","currentContext","match","globalMatch","entityPaths","row","every","tablePk","getComponentUid","componentContext","toJSON","componentDataKey","getComponentDataKey","componentOptions","tempdata","getInspectorPropsWhenDebugging","ComponentDebug","actions","$inspectedComponent","preview","$inspectedChanges","onClick","onSearch","from","checkCorrectnessOfIteration","iterable","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","NativePromise","redefineAll","setSpecies","aFunction","anInstance","classof","inspectSource","speciesConstructor","task","microtask","promiseResolve","hostReportErrors","newPromiseCapabilityModule","perform","isForced","SPECIES","PROMISE","getInternalPromiseState","PromiseConstructor","process","$fetch","newPromiseCapability","newGenericPromiseCapability","IS_NODE","DISPATCH_EVENT","createEvent","dispatchEvent","FORCED","PromiseRejectionEvent","FakePromise","exec","INCORRECT_ITERATION","isThenable","notify","isReject","notified","chain","reactions","ok","exited","reaction","handler","fail","domain","rejection","onHandleUnhandled","enter","exit","onUnhandled","reason","initEvent","isUnhandled","emit","parent","fn","unwrap","internalReject","internalResolve","wrapper","executor","onFulfilled","onRejected","C","that","fetch","input","capability","$promiseResolve","counter","remaining","alreadyCalled","race","$find","SKIPS_HOLES","Op","hasOwn","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","inModule","runtime","regeneratorRuntime","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","GeneratorFunctionPrototype","Generator","GeneratorFunction","displayName","isGeneratorFunction","genFun","ctor","mark","__proto__","awrap","__await","defineIteratorMethods","AsyncIterator","async","innerFn","outerFn","self","tryLocsList","iter","next","reverse","pop","Context","reset","skipTempReset","sent","_sent","delegate","method","tryEntries","resetTryEntry","isNaN","stop","rootRecord","completion","rval","dispatchException","exception","handle","loc","caught","record","entry","tryLoc","hasCatch","hasFinally","catchLoc","finallyLoc","abrupt","finallyEntry","complete","afterLoc","finish","thrown","delegateYield","resultName","nextLoc","protoGenerator","generator","_invoke","doneResult","delegateResult","maybeInvokeDelegate","tryCatch","makeInvokeMethod","obj","previousPromise","callInvokeWithMethodAndArg","invoke","unwrapped","return","info","pushTryEntry","locs","iteratorMethod","Function","reducers","ACTION","DISPLAY_USER_MESSAGE","deepEquals","DELETE_USER_MESSAGE","reducer","userMessages","store","errorMessages","dispatch","ErrorNotification","getState","DeleteUserMessage","debug","isDevelopment","getEnvironmentVariable","ENVIRONMENT_VAR","ClientDebugLog","hasDebug","deconstruct","errorOrMessage","response","join","statustext","strategy","defined","messageOrError","details","notifyError","fatal","errorMessage","DEFAULT_PROD_MESSAGE","invariant","condition","rest","CustomCloseButton","toastProps","closeToast","validProps","MessagePanel","prevProps","currentMessages","pendingMessages","toast","dismiss","icon","width","height","indexOf","mgs","className","styles","success","position","POSITION","TOP_LEFT","closeButton","progressClassName","successProgress","errorProgress","style","zIndex","autoClose","hideProgressBar","newestOnTop","container","closeOnClick","pauseOnHover","React","BigSVGCheckbox","bigCheckbox","isChecked","viewBox","transform","fill","check","border","SelectOptionButton","preventDefault","onExpand","checkbox","selectCodeBtnIcon","folder","isFolder","descendants","isCheckedClass","checkedState","notChecked","selectOptionCheckbox","selectCodeBtn","selectFolder","longDescription","selectCodeBtnTitle","MultipleCodeSelector","adding","setState","onCodeSelected","textDone","onClose","renderCodeList","renderCode","option","isSelected","selectedOptions","sc","onSelectCode","loadOptions","CommentInput","commentIsEmpty","componentId","textAddItem","placeholder","add","maxLength","userImg","userIcon","textArea","commentInput","wait","addButton","disabled","handleAddComment","commentInputContainer","userIconWrapper","textNoData","commentCount","commentView","visible","commentHeading","validationError","textConfirmDelete","textCancel","textDelete","deleteConfirmationModal","continueText","cancelText","onContinue","handleDeleteComment","contextMenu","requireAny","commentMenu","requireAll","isListElement","svgTriangle","svgArrow","points","commentTile","commentWrapper","LeftPanel","newLine","aria-hidden","contentRight","disableAllEntityOperations","enableStickyHeader","leftPanelContents","rightSideContent","headerWrapper","headerSticky","PrintLink","withDropdownMenu","handleDropdownHide","ReadModeRightContent","visibilityConfiguration","panelConfig","meatballMenuConfig","caseURL","fetchPermissions","textEditCase","onExpandMenu","textOpenCase","textDeleteCaseTitle","textDeleteCaseDescription","textDeleteCaseContinue","textDeleteCaseCancel","textDuplicateCaseTitle","textOpenBowtieTitle","onOpen","share_case","textPrintCase","access","send","linkText","textOpenInSurveyManager","EditModeRightContent","textSubmit","textChangeCaseType","ReadHeaderPanel","isConfidential","textTitle","textConfidentialTitle","textDescription","textConfidentialDescription","EditHeaderPanel","numberOfEntitiesInCategory","canBeRemoved","categoryTile","categoryTileHeading","displayCodes","hasMeatball","valueWithCount","withMeatballStyles","displayIcon","renderContextMenu","textDeleteMessage","textContinue","tileDropdown","handleDelete","fullWidth","categoryTileView","anchorLink","displaySafeAnchor","trim","anchorValue","invalidAnchor","textInvalidAnchor","errorParams","onBlur","controlLabel","compactCodeTile","withMeatballMenu","removableFieldStyles","shouldRenderContextMenu","H","propClone","number","numberWithUnit","classNames","unit","TitleWrapper","titleDescription","heatmap","Highcharts","Series","proceed","series","hideLabels","selected","plotX","xAxis","pos","y","plotY","yAxis","chart","renderer","circle","attr","dataLabels","color","element","chartElement","ResizeSensor","parentElement","reflowChart","renderChart","createHeatmapOptionsFromDefinition","riskMatrixDefinition","preselectedValues","hasChildErrors","hasChildWarnings","fontFamily","enabled","formatter","tooltipWrapper","useHTML","shadow","borderColor","legend","credits","exporting","newProps","updateOptions","cells","getAxesWaitingForExternalValueSelect","reflow","initialRender","destroy","createdChart","definition","createHighchartsOptions","setOptions","axisLabelsOptions","axis","axisIndex","axisLabelMode","fontSize","axisTitleOptions","getAxis","lineWidth","gridLineWidth","tickWidth","borderWidth","categories","labels","getAxisIndex","xAxisLabelMode","yAxisLabelMode","xIndex","yIndex","click","editable","onSelectedXChanged","codetableId","onSelectedYChanged","states","hover","brightness","labelOffset","hideRiskWeight","axisValues","readOnlyCell","cellReadOnly","cellColor","cellRgb","numericColorToRgb","cellColorBrightness","numericColorBrightness","preselectedCell","blackText","isFF","isFirefox","axes","g","cursor","rotation","mouseOver","textOutline","textShadow","weight","align","padding","cell","readOnlyX","readOnlyY","setAxisOptions","setSeriesOptions","setSeriesData","axisId","renderInvalidConfig","renderWaitingForValue","renderMatrixElement","matrixContainer","infoText","invalidDefinition","waitForXValueSelect","waitForAxisValueSelect","waitForYValueSelect","waitForZValueSelect","z","axesWaitingForSelect","waitForXValueDescription","pleaseSelectDescription","waitForYValueDescription","waitForZValueDescription","errors","getRiskMatrixValidationStyle","rowCount","calculateHeight","heightStyle","ref","onChartElementReady","getErrors","getWarnings","detach","selectAddedItem","showItemAddedMessage","textItemAdded","toasts","toastFactory","TYPE","SUCCESS","buttonWrapper","handleClick","LogLinkButtonComponent","isOpen","close","inline","childItems","items","logModal","btnTitle","closeModal","onDone","largeSize","linkButton","logLinkButtonWrapper","withOpenState","hasItems","processingLogs","MdHistory","ReadProcessingLogLink","LogView","logView","LogDetails","logDetailsWrapper","logDetails","collapsed","contents","mailLogContainer","textDisplayMore","textDisplayLess","buttonContainer","content","expander","useMargin","buttonPosition","ExpandableButtonPosition","top","downloading","stopPropagation","button","blobId","initialName","textDownloadName","appendedWithChildValues","downloadName","createDownloader","onDownloadCaseLog","tileHeader","connectToStore","newStore","makeHttpRequest","http","authProvider","processResponse","resolveUrl","baseUrl","urlObject","paths","concatUrl","format","single","baseURL","endpoint","headers","importance","targetUrl","fetchJson","status","HttpStatusCodes","NO_CONTENT","NOT_MODIFIED","json","etag","expires","post","params","fetchLocationId","body","OK","CREATED","caseEntityUrl","remoteDataError","put","httpDelete","ResourceWrapper","resourceUrl","authHeaders","requestAuthentication","UNAUTHORIZED","headerItems","res","getLocation","RemoteData","auth","ApiBaseUrl","reAuthenticate","RemoteAdminData","AdminApiBaseUrl","RemoteNotificationsData","NotificationsApiBaseUrl","ca","cb","Date","getTime","multiline","lastIndex","ignoreCase","isArguments","ka","kb","cal","j","anyOf","fns","memoizer","memoizeOne","require","isNumeric","isPositiveNumeric","parseInt","isDefinedIncludingZero","$indexOf","arrayMethodIsStrict","nativeIndexOf","NEGATIVE_ZERO","STRICT_METHOD","ACCESSORS","1","searchElement","ConstraintResponseType","REGEX_ISO8601_DATEFORMAT","REGEX_ISO8601_NO_TZ","toISODatewithoutTimezone","date","toISOString","cloneAsUTC","UTC","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","parseAsDateUTC","dateString","year","month","day","hours","minutes","seconds","toUpperCase","milliseconds","applyDateCalculation","rawInput","now","shortcut","sign","num","setUTCDate","getUTCDate","setUTCMonth","getUTCMonth","setUTCFullYear","getUTCFullYear","parseDate","expression","dateToUTC","dateValues","calendarValues","formatDateAsUTC","locale","dt","intlOptions","Intl","DateTimeFormat","timeZone","DEFAULT_DATE_FORMAT","weekday","DEFAULT_TIME_FORMAT","hour","minute","createFormatters","formatDate","formatTime","formatNumber","NumberFormat","triggerPrintDialog","execCommand","openPrintDialog","isPrintQuery","afterprint","addEventListener","globalVar","addListener","mql","removeEventListener","userLocales","nav","languages","localeFallbacks","no","nb","nn","inferPrimaryIntlLocale","languageCodesFromRequest","AcceptedLanguage","isSupported","supportedLocalesOf","isSupportedWithFallback","getLanguageFromIetfLanguageTag","inferContentLanguage","allLanguages","primary","unshift","getHttpHeaderLanguages","language","userLanguage","browserLanguage","lang","getAcceptedLanguages","loadLocale","currentLang","addLocaleData","catch","concatFinder","pipeFinder","softhypenFinder","insertOptionalWordbreaks","removeSoftHyphens","segmentFinder","replaceTemplateString","setGlobal","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","noTargetGet","vendor_1207535b092eed21482d","codeItemToStoreValue","rawValue","ld","allLevelDescription","ald","foregroundColor","ml","ctg","extra","owner","sharedThroughUserGroup","ret","mapToOptionsRequestParams","siblingId","displayNotSelected","iteratorId","sortDirection","mapToOptionsRequestContext","getItemKey","getStampKey","ClientCache","getItem","stamp","setItem","expiresDate","fromJSON","clear","removeItem","removed","clientCache","isBrowser","getIds","getCaseContextId","storeData","caseContextField","caseContext","caseContextId","caseNoField","CaseNo","getDraftId","getParentId","childPath","getAllChildEntities","parentStorePath","childEntityType","lastItemKey","maxChildEntityId","settings","applicationSettingsKey","RequestTextCollection","ReceiveTextCollection","textCollectionReducer","textsLanguage","textsFetching","api","area","resource","withId","textCollectionActionCreators","loadTextCollection","areaId","alreadyRequested","languageId","translations","areValid","FunctionPrototype","FunctionPrototypeToString","nameRE","RequestUserInfo","ReceiveUserInfo","ReceiveShellConfig","FailUserInfo","ReceiveToken","ReceiveLogout","AuthenticationFailed","DisplayModal","ChangeUserLocale","RefreshCache","ReceiveRefreshCache","FailRefreshCache","RegenerateAggregatedEnv","RegenerateAggregatedRisk","RequestMessagesToUserInfo","ReceiveMessagesToUserInfo","UpdateMessageStatus","FixedHeaderStatus","REQUEST_LOAD_CONSENTS","RECEIVE_LOAD_CONSENTS","FAIL_LOAD_CONSENTS","UserLocaleChange","version","supportEmailAddress","adminPanelAccess","toolsInfo","surveyManagerAccess","helpUrl","manageSurveysUrl","feedbackUrl","messagesToUserInfo","updating","fixed","RequestLoadConsents","ReceiveLoadConsents","consents","FailLoadConsents","includeHostName","separator","startsWith","prefix","getApplicationUrl","getHostingPath","HostingPath","getNotificationsApiUrl","isVeracityEnabled","FeatureToggle","veracityEnabled","configureSystemImport","hostingPath","__webpack_public_path__","_extends","_react2","_interopRequireDefault","_propTypes2","default","IconBase","_ref","_ref2","_objectWithoutProperties","_ref2$reactIconBase","reactIconBase","computedSize","preserveAspectRatio","verticalAlign","propTypes","oneOfType","contextTypes","shape","inheritIfRequired","NativeNumber","NumberPrototype","BROKEN_CLASSOF","toNumber","argument","first","third","radix","maxCode","digits","charCodeAt","NaN","NumberWrapper","dummy","Boolean","last","highestModalZindex","FocusWaitTypes","ModalWrapper","closeOnDone","elementWithScrollbar","currentTarget","clientWidth","clientX","clientHeight","clientY","activeElement","nodeName","preventBackgroundClick","clickedScrollbar","canCloseOnBackground","relative","relatedTarget","zindex","titleRef","focus","isDisabled","isCancelDisabled","showDoneButton","showActionButton","onAction","showCancelButton","btnCancelTitle","styleOverride","modalBackground","modalWrapper","onClickBackground","onFocus","onBackgroundFocus","tabIndex","modalDialog","data-tabindex","role","btnActionTitle","handleDone","keyCodeTypes","Enter","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Esc","Backspace","Space","keyCode","safeNumericString","safeParam","createValidationErrors","toAbsoluteIndex","0","nativeSlice","start","end","Constructor","fin","IndexedObject","nativeJoin","ES3_STRINGS","SelectType","OptionsType","reportTypes","searchTranslation","open_case","edit_case","assigned_to","search_title","filters_title","filters_included","filters_excluded","input_placeholder","search_no_hits","search_hits","loading","view_as","case_delete_title","case_delete_description","case_delete_continue","case_delete_cancel","case_duplicate_title","cases_results","case_report_title","sort_order_title","sort_order_button_add_sort_param","sort_order_button_done","sort_order_sort_by","sort_order_menu_option_remove","sort_order_menu_option_move_up","sort_order_menu_option_move_down","sort_order_asc","sort_order_desc","sort_order_select_text_select_from_list","sort_order_no_sort_options","create_report_title","update_report_title","show_details","hide_details","export_title","no_options_found","excel_edit_cases","excel_edit_cases_with_actions","excel_modal_title","excel_modal_description","excel_modal_ok_button","excel_modal_cancel_button","download_frequency_report_title","download_selection_report_title","download_report_wait","download_report_success","open_in_survey_manager","print_displayed","favouriteReportSortOptions","favouriteDefinition","searchFavouriteDefinition","connectedCasesFavouriteDefinition","duplicateRegistrationsFavouriteDefinition","specialReport","downloadReportToExcel","getExternalUrl","externalUrlId","loadUsersMetadata","searchInAllFieldsDomain","REQUEST_DRAFT_DOC","RECEIVE_DRAFT_DOC","FAIL_DRAFT_DOC","ENTER_DRAFT_EDIT","LEAVE_DRAFT_EDIT","ADD_DOCUMENT_ITEM","COPY_DOCUMENT_ITEM","DELETE_DOCUMENT_ITEM","SELECT_DOCUMENT_ITEM","ENTER_CONNECTED_DRAFT_EDIT","SHOW_CONFIRM_WARNINGS","WARNINGS_CONFIRMED","TRIGGER_VALIDATION","RECEIVE_UI_DEFINITION","TriggerValidation","WarningsConfirmed","ShowConfirmWarnings","EnterDraftEdit","CopyDocumentItem","documentItemPath","AddDocumentItem","parentKeys","childId","DeleteDocumentItem","childKey","LeaveDraftEdit","RequestDraftDocument","ReceiveDraftDocument","metadata","FailDraftDocument","EnterConnectedDraftEdit","ReceiveUiDefinition","VALUE_CHANGE","BACKGROUND_SAVE","BACKGROUND_SAVE_OK","BACKGROUND_SAVE_ERROR","REQUEST_IMMEDIATE_BACKGROUND_SAVE","CASE_SUBMIT","REQUEST_CASE_SUBMIT","CASE_SUBMIT_OK","CASE_SUBMIT_ERROR","ITEMS_SAVED","INSPECT_COMPONENT","INSPECT_PREVIEW_EDIT","LOAD_CODES","LOAD_CODES_OK","LOAD_CODES_ERROR","ValueChange","newValue","RequestCodetable","searchTerm","RequestCodetableError","ReceiveCodetable","BeginBackgroundSave","BackgroundSaveComplete","RequestImmediateBackgroundSave","BackgroundSaveFailed","BeginCaseSave","RequestCaseSave","CaseSaveFailed","InspectComponent","payload","InspectPreviewEdit","_reactIconBase2","bowtieSupported","ui","riskMatrix","draft","codetable","casetypeId","caseLog","surveyManagerSupported","$trim","forcedStringTrimMethod","getUserMessage","SuccessNotification","isArrayIteratorMethod","getIteratorMethod","callWithSafeIterationClosing","Result","stopped","AS_ENTRIES","IS_ITERATOR","iterFn","step","boundFunction","createChild","childType","insertChild","remainingItems","parentIndex","splice","deleteChild","childIndex","copyChild","copyOne","entityToCopy","keyOfNewParentEntity","parentIdOfCopyTarget","maxChildId","ActionCreatedDate","targetId","newChild","$findIndex","fixRegExpWellKnownSymbolLogic","isRegExp","requireObjectCoercible","advanceStringIndex","callRegExpExec","regexpExec","arrayPush","min","SUPPORTS_Y","SPLIT","nativeSplit","maybeCallNative","internalSplit","limit","lim","lastLength","output","unicode","sticky","lastLastIndex","separatorCopy","splitter","rx","S","unicodeMatching","q","createWellKnownSymbol","withoutSetter","globalThis","raw","PROTOCOL","AUTH","HOST","INTERNAL_HOST","IPV4","IPV6","PORT","PATH","RX_URL","RX_URL_PUBLIC","allowInternalHostNames","connection","maxBy","minSequenceEntity","minBy","nextSequenceValue","isNumber","REQUEST_CASE","RECEIVE_CASE","RECEIVE_CASE_PERMISSIONS","FAIL_CASE_DATA","REQUEST_CASE_RISK_MATRIX_DEFINITION","RECEIVE_CASE_RISK_MATRIX_DEFINITION","CHANGE_VIEW_MODE","ChildItemSelection","RequestCase","ReceiveCase","LoadCaseFailure","ReceiveCasePermissions","RequestCaseRiskMatrixDefinition","ChangeViewMode","ReceiveCaseRiskMatrixDefinition","toInteger","regExpExec","floor","SUBSTITUTION_SYMBOLS","SUBSTITUTION_SYMBOLS_NO_NAMED","REPLACE","nativeReplace","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","REPLACE_KEEPS_$0","UNSAFE_SUBSTITUTE","searchValue","replaceValue","functionalReplace","fullUnicode","accumulatedResult","nextSourcePosition","matched","captures","namedCaptures","groups","replacerArgs","replacement","getSubstitution","str","tailPos","symbols","ch","capture","notifyUser","explicitOptions","bodyClassName","progress","render","INFO","ERROR","getField","fields","memo","fv","toLocaleDateString","sameValue","SEARCH","nativeSearch","searcher","previousLastIndex","SpinLoader","spinLoader","toHex","component","hexToDigit","defaultScrollRestoration","scrollTo","scrollToTopExceptInternal","isInternal","isBackFwd","scrollToTopAlways","Response","statusText","cycleReplacer","stack","thisPos","Infinity","serializer","Icon","IconDisplay","headerTranslation","about","new_case","new_report","reports_company","reports_saved","user_profile","dashboards","reports","logout","menu","codetable_administration","user_administration","role_administration","refresh_cache_title","my_downloads_title","import_title","regenerate_aggregated_environmental_data","regenerate_aggregated_risk_data","help","notifications","manage_surveys","administration","tools","feedback","layoutTranslation","about_title","about_close","about_copyrights","about_info","refresh_cache_description","refresh_cache_submit_button","refresh_cache_cancel","refresh_cache_success","regenerate_aggregated_environmental_title","regenerate_aggregated_risk_title","regenerate_aggregated_environmental_description","regenerate_aggregated_risk_description","regenerate_aggregated_submit_button","regenerate_aggregated_cancel","regenerate_aggregated_enviromental_success","regenerate_aggregated_risk_success","notification_toast_title","notification_toast_subtitle","notification_toast_link","notification_banner_title","notification_banner_button","unread_messages","mark_as_read","mark_as_unread","footerTranslation","contact_information","any_problems","your_location","your_user_group","your_unit","about_synergi","messagesToUserTranslation","no_messages","read_messages","no_unread_messages","no_read_messages","message_date","messageStatusOptions","unread","DefaultValueFunction","dbFunction","utcOffset","defaultValueHandlers","codeValue","dateValue","dateRegex","defaultValueHandler","valueFunction","fallbackHandler","includeFailedConstraints","deleteDraft","caseDraftId","eTag","withIfMatch","saveDraft","save","transNo","businessType","submitCase","parameters","draftWillBeConnected","readAccessToSubmittedCase","createErrorHandler","customErrorMessage","draftNotAvaliable","validationErrors","LoggedError","caseArea","caseNo","getLocationOfInitiator","serviceMessages","loadDraft","loadValidationMetadata","toStore","toMetadata","actionCreators","editDraft","connectToDraft","handleDraftError","getCaseTypeId","caseActionCreators","caseRiskMatrixDefinition","responseCachingActionCreators","getUiDefinition","uiDef","valueChanged","immediateSave","errorSafe","requestImmediateSave","loadOptionsParams","copyDocumentItem","addDocumentItem","parentPath","defaultValues","newItemNo","defaultValue","newItem","selectDocumentItem","deleteDocumentItem","selectParentItem","childItemPath","backgroundSave","handleDraftErrors","fromStore","currentCaseContextId","getCaseContextIdStoreData","nextCaseContextId","changeViewMode","viewModeCacheKey","childItem","childOfCase","sectionFromStoreItemPath","onSubmit","onCancel","pendingConnectedDraft","draftData","submitDocument","domains","caseTranslations","message_case_error","warningsConfirmed","successText","message_case_success","notAuthorizedText","message_not_authorized_to_read_case","prevItem","connectedCaseApi","addCaseConnection","confirmWarnings","unconfirmWarnings","doWhenIdle","func","textSavingInfo","toastMessage","whenIdle","ElementLoader","elementLoader","elementLoading","getChildEntitiesFromPath","levelsUp","statePath","changeSequence","steps","direction","absSteps","abs","originalConnections","updatedConnections","clone","sorted","sortBy","sortConnections","currentIndex","startingIndex","safeIndex","setSequence","newSequence","currIdx","stepRow","currentSequence","stepRowSequence","changed","findChangedConnections","updateChanged","changedConnections","newSeq","connectedCaseActionCreators","RequestCaseEntityId","caseEntityId","ReceiveCaseEntityId","FailRequestCaseEntityId","connectedCaseIds","ids","fetchingPermissions","RequestConnectedCasePermissions","permission","supported","ReceiveConnectedCasePermissions","tableObject","entityRowsSelector","selectFromState","draftActionCreators","currentMainImages","updateImage","imageId","withFileDownload","connect","uploadedFiles","documentUrl","loadBlob","fetchAttachment","withRiskMatrix","storeDefinition","riskMatrixDefinitions","getDefinitionFromStore","transformToComponentFormat","preselectedRiskMatrixValues","dataPath","changeAxisValue","axisCodetableId","immediateSaveOnValueChange","axisComponent","share_case_by_email","select_users_info","recipients","message_to_receiver","case_was_shared","share_failed","no_user_email_exists","go_to_profile","external_recipients","textClose","textOptionsDone","textOptionsLoadError","textOptionsNotFound","textOptionsTitle","textSelectFromList","textSuggestions","withSharing","mapPropsFromTranslations","userEmail","email","getUsers","shareDocument","getUsersForShareLink","linkPath","SharePreset","filterText","withCaseLogDownload","caseLogUrl","caseEndpoint","createSearchForCasesToConnect","favouriteEndpoint","withSearchCasesToConnect","searchExternalProvider","searchParameters","conditions","selectEntityFieldValues","executeSearch","entityFieldValues","inputFields","dataProviderInputFields","searchConditions","requiredFields","RequestSearchExternalProvider","ReceiveSearchExternalProvider","FailSearchExternalProvider","textInvalidSearchKeys","textGeneralError","withNotSelectedOptionIncluded","WrappedComponent","withOptionLoading","withHideIfPropValueNotInVisibleForValues","valuePropName","visibleForValues","ct","withPrimaryKeyAsOptionIteratorId","withPrimaryKeyAsOptionCategoryId","withRowFieldInitialValue","valuePropertyPath","withLink","withPrint","metaKey","ctrlKey","handleKeyboardEvent","loadingImages","querySelectorAll","childList","subtree","observer","disconnect","MutationObserver","observe","addListeners","removeListeners","withProperty","propertyPath","modifiedProps","withRenderActiveSection","page","previousButtonTooltip","nextButtonTooltip","isActive","onNext","handleNext","onPrevious","handlePrevious","hide","ScrollDirection","findTopMostVisible","updates","nextUpdate","previousUpdate","el","scrollDirection","Down","previous","u","isIntersecting","boundingClientRect","Up","intersectionRect","bottom","rootBounds","indexOfHidden","activeIdSelector","callback","findPredicate","active","Portal","getElementById","toElement","forceUpdate","ReactDOM","forwardKey","scrollToSection","forceTop","getWindowScroller","offsetTop","withSectionTab","activate","scrollSectionIntoView","shouldScrollToTop","visibleSection","scrollIfNeeded","shouldActivate","iconUrl","TabContainerDomId","handleSelect","onUpdate","handleActivate","originTitle","withDocumentTitleFromProps","prefixPropPath","segments","infoPrefix","limitedContentLength","substring","nextTitle","updateTitle","withSectionKeyboardPaging","shiftKey","handleKeyboardShortcut","withClassOnFirstTab","notFirstTab","withRenderOnFirstTabOnly","firstSectionSelected","Chain","stroke","strokeWidth","debounceTime","ConnectCaseSelectorComponent","addConnection","caseIdToConnect","debounce","validStateForCaseId","getStateForCaseId","validateCaseId","getNextSequenceValue","closeDialog","loadPromise","makeCancelable","isCanceled","serializeConnectionState","textConnect","textDisconnect","caseAlreadyConnected","pendingDelete","removeConnection","addConnectionByCaseId","caseIdToRemove","parentEntityPath","keyMap","onEnter","handlers","placeholderSearch","textAddExisting","textNoConnectionToItself","titleSearch","textInvalidRangeError","isClosing","searchEnabled","CaseListingComponent","inputWrapper","inputSearch","entityForCaseId","fetchingEntityId","unknownEntityId","sameCaseId","addButtonText","closingAnimation","caseIdChanged","useThousand","primaryActionComponentFactory","renderActionComponent","required","textAddNew","connectCaseSelector","addButtons","MdAdd","addConnectionToNewCase","openCasesToConnect","renderSelectDialog","allowConnectCases","allowDisconnectCases","moveConnectionUp","moveConnectionDown","textMoveUp","textMoveDown","enabledConnectionOperations","textOpenBowtie","restProps","sequenceContextMenuOperations","moveUp","moveDown","openBowtie","connectedCaseTile","extendedContextMenuOperations","Fact","factItem","FactBadgeList","useNestedIndicator","factProps","FactIconList","iconLine","icons","defaultIcon","FactBadge","badgeProps","sectionFor","IconsConsequences","defaultIconConsequences","titleConsequences","childValueItems","ActConsConsequenceIcons","BadgeListActions","tooltipNumberOfActions","tooltipClosedActions","titleActions","iconActions","BadgeListAttachments","tooltipNumberOfAttachments","titleAttachments","iconAttachments","BadgeListConnectedCases","tooltipNumberOfConnectedCases","titleConnectedCases","iconAbsolutePath","iconConnectedCases","BadgeListComments","tooltipNumberOfComments","titleComments","iconAbsolutPath","iconComments","BadgeListCauses","tooltipNumberOfCauses","titleCauses","iconCauses","BadgeListInvolvedPersons","tooltipNumberOfInvolvedPersons","titleInvolvedPersons","iconInvolvedPersons","BadgeListInvolvedDrugs","tooltipNumberOfInvolvedDrugs","titleInvolvedDrugs","iconInvolvedDrugs","BadgeListIntegrityStatus","titleIntegrityStatus","iconIntegrityStatus","BadgeListIntegrityStatusBarrierEval","titleIntegrityStatusBarrierEval","BadgeListChecklists","titleChecklists","tooltipNumberOfChecklistItems","splittedVisibleForValues","filteredChecklistEvaluations","resultingItems","BadgeListAssessments","tooltipNumberOfAssessments","titleAssessments","iconAssessments","getFirstAttachedImage","images","selectedImage","getBlobFetcher","firstAttachedImage","FactboxThumbnail","viewerOpen","setViewerStatus","files","firstFile","openViewer","objectUrl","thumbnailButton","factImage","initialSelected","titleRiskArea","titleRiskAreaRest","badgePropsRiskArea","filled","badgePropsRiskAreaRest","numberOfAttachments","numberOfConnectedCases","numberOfConsequences","totalsExceptActions","createFactboxProps","wrapperStyleClass","consequenceWide","tbl","ReportCategory","NumeratorReport","factBoxList","FactboxItems","factBox","ConnectedFact","factLink","ConnectedBadge","ConnectedBadgeList","ConnectedBadgeListIntegrityStatus","badgeListPropsConnectedIntegrityStatus","ConnectedBadgeListIntegrityStatusBarrierEval","badgeListPropsConnectedIntegrityStatusBarrierEval","ConnectedBadgeListActions","badgeListPropsConnectedActions","badgePropsConnectedRiskArea","badgePropsConnectedRiskAreaRest","bgColor","list","partialPath","lastChild","evaluation","isActiveChildOrHasActiveDescendent","hasActiveDescendant","isLastChildAndDoesntHaveActiveSibling","hasActiveSibling","primaryKeyAsCode","createDate","PotRiskEvValidFrom","ResPotRiskEvValidFrom","defaultMatchingId","textValidFrom","selectEvaluation","selectElement","validFromFieldName","dateIntlOption","getMatchingId","handleChange","textRate","textRiskArea","riskAreaClass","rateButton","hasRiskArea","riskAreaNode","tooltipDirection","TooltipDirections","rateLabel","SectionSummary","sectionSummary","PreselectedCodeTileView","AttachLinkSelectorComponent","inputTitle","inputLinkUrl","invalidUrl","requiredErrorTitle","requiredErrorLink","isValueEmpty","allowAddingLinkItem","textLinkTitle","textLinkUrl","textInvalidUrlMessage","placeholderLinkUrl","textRequiredError","labelLinkTitle","labelLinkUrl","errorParamsInvalidUrl","errorParamsRequired","validationTitle","validationLinkUrl","titleTextarea","onChangeTitle","linkUrlTextarea","onChangeLinkUrl","onBlurLinkUrl","addLinkItem","selectExpander","hasFooter","addSelectorContents","mdPlus","onClickOutside","attachLinkSelector","doneEditing","handleDeleteItem","editButton","onEdit","textEditItem","attachLinkMenu","editMode","attachLinkTile","readMode","attachLinkTileWrapper","doubleWidth","hideLabelIfNoData","itemsWrapper","summaryTileView","hasChildren","noContentsWrapper","shouldHideLabelIfNoData","showLabel","MultiSelectReferenceModal","selectedOptionsPerReference","mostRecentLoadOptionsPerReference","multipleSelectReferencesToBeAdded","referenceOptionDataTag","reference","referenceId","onSelectedOptionsChanged","textPlaceholderSearch","createOnChange","createLoadOptions","referenceSelectors","renderReferenceOptionsSelector","ReferenceSelectTileView","prevState","textMultiSelectOptionsModalTitle","multipleSelectModal","clearMultipleSelectReferencesToBeAdded","onAddReference","AddNewCaseButtonComponent","navigateToNewDraft","validationErrorStyle","containerFactory","CaseListingButtonComponent","openCaseListing","createFavourite","textMissingSearchArguments","textSearchTitle","waitingForSearchFavourite","SearchResultItem","setValuesFromResult","textConfirmSelection","searchResultContainer","left","showStacked","right","SearchResultList","textItemNotFound","warningMessage","SearchExternalProviderComponent","clearResults","textDialogHeader","canSearch","onCloseDialog","SearchExternalProvider","Dummy","isContainer","borderBottom","borderTop","opacity","margin","fontStyle","openPanelStyle","marginBottom","marginTop","OpenPanel","Enhance","AppEnhance","UIEnhance","readModeComponents","configType","UI","selectors","enhancers","aria-expanded","aria-selected","withSize","md","lg","xl","withClassNames","withTileSize","appComponents","withExpandAllSize","AddFeature","caseComponents","CodeTable","FlexRowPanel","DisplayCodesReference","CaseLogNo","editModeComponents","sm","triggerValidation","Component","ConnectedCasePermissions","getPermissions","minSeq","createUploader","addItem","deleteItem","updateItemTitle","setItemAsMain","withOptionCategorySupport","readOnlyOverride","rowUser","resultItems","ClearSearchExternalProviderResults","reportModeComponents","embeddedReportModeComponents","resolveRenderModes","registry","components","parentMode","embeddedReport","currentMode","resolveComponentForMode","typeId","componentsForMode","parseAttributeValue","numeric","prefixRegexCache","Map","parsePrefixed","attributes","prefixRegex","commonDefaultAttributes","infoLong","PropertyBuilder","sharedKeys","parsedMap","resolvedAttributes","hiddenModes","currentModeInList","rm","nameOfCurrentMode","sharedPropertyBuilder","componentType","controlType","builderConfig","builder","buildSharedProperties","buildComponentProperties","resolveComponentDefaultValues","rootDescriptor","addDefaultValue","entityTypePathEquals","iterateChildren","schemaCache","throwIfConfigIsInvalid","resolver","modeResolver","contextId","domainContext","mapComponents","cloned","clonePrototype","rootComponent","ComponentSchema","fromConfiguration","rootDomain","build","nested","root","sectionVisibleForCase","memoizedFunction","innerMode","innerConfig","usingModeResolver","memoized","componentName","componentClass","resolveComponent","resolveComponentEnhancers","resolveComponentSelectors","componentEvents","eventsForMode","knownType","resolveComponentEvents","componentDefaultProps","buildProperties","iteratorConfig","resolveComponentIteration","MODAL","changePassword","refreshCache","exportToZip","regenerateAggregatedEnv","regenerateAggregatedRisk","none","OnClickOutside","documentElement","node","wrapperRef","contains","handleClickOutside","setWrapperRef","Tooltip","center","narrow","delayed","tooltiptext","splitTooltip","tooltipArrow","getScrollOptions","behavior","offsetHeight","block","supports","supportsScrollOptions","bestOptions","scrollIntoView","DialogExpander","onConfirm","hasLongDescription","switchButton","extraFooterActions","additionalClasses","onlyWhenNested","sizes","sizeClasses","isInTile","processToken","history","initialize","locationObj","hash","processSigninResponse","signingResponse","logoutRoute","processSignoutResponse","logoutLandingPage","LogoutLandingPage","externalRedirect","hasToken","signin","EMPTY_ARRAY","model","isValue","is","maybe","selectedValues","typedValue","optionals","defaultValueStrategy","variable","namespace","InputControlContext","readOnlyStyle","groupClassname","getValidationStyle","defaultConfiguration","configuration","toastId","update","message_cannot_find_case_draft","message_draft_success","message_case_delete_success","case_menu","switch_to_tab","switch_to_scroll","public_case_submitted","public_follow_up","public_info_case_password","public_enter_password","public_case_password","public_open_case","deserializeConnectionState","queue","qs","lastItem","toCreateCase","toSearchViewWithQuery","encodeURIComponent","toDashboardView","IE8_DOM_DEFINE","Button","btnType","onKeyDown","data-dismiss","dataDismiss","data-toggle","dataToggle","data-target","dataTarget","aria-controls","ariaControls","autoFocus","btnIcon","iconStyle","ButtonInputGroup","btnInputGroup","callToAction","callToActionStyling","CloseButton","autofocus","isHierarchy","selectType","singleHierarchy","multipleHierarchy","isMultiple","multiple","isSingle","nativeSort","FAILS_ON_UNDEFINED","FAILS_ON_NULL","comparefn","isNode","env","AnonymousApplicationUrl","AnonymousApiBaseUrl","GoogleRecaptchaSiteKey","VeracityProfileLink","OidcServiceUrl","OidcClientId","OidcScope","OidcDefaultProviderId","OidcDontLoadUserInfo","Translations","UseLocalStorageTokenCache","WebPush","setEnvironmentVariable","BlobCache","sizeLimitMB","sizeLimit","defaultHttpOptions","defaultHttpHeaders","Accept","fetchOptions","checkStatus","attachmentCache","thumbnail","thumbnailUrl","blobUrl","cached","Headers","h","append","xhr","XMLHttpRequest","setRequestHeader","enforceInternalState","enforce","TEMPLATE","simple","asRgb","convertNumericColorToHex","recipientId","adminEndpoint","toolsEndpoint","remote","userAdminAccess","withImportance","userToolsInfo","urlTemplate","messagesToUser","updateMessageStatus","loadConsents","loadUserInfo","adminUserAccess","displayModal","removeModal","changeUserLocale","executeRefreshCache","shellState","executeRegenerateAggregatedEnv","executeRegenerateAggregatedRisk","getMessagesToUser","updateFixedHeaderStatus","ShouldTruncate","CreateRenderer","StickyHeader","htmlProps","isInternetExplorer","header","shellActions","StickyHeaderButtonContainer","$includes","includes","FixedDocument","overflow","ScrollUpSymbol","data-name","cx","cy","scroller","scrollUp","ScrollToTop","setVisible","useEventListener","pageYOffset","mapDataKeyToLocationKey","mappings","storeItemPathFromRoute","overrideParams","routes","firstRoute","routeForEntity","childMatches","childEntity","childEntityId","itemKey","schema","getIdToken","getAccessToken","authorization","setAuthorization","getAuthorization","REQUEST_CASE_ENTITY_ID","RECEIVE_CASE_ENTITY_ID","FAIL_REQUEST_CASE_ENTITY_ID","REQUEST_CONNECTED_CASE_PERMISSIONS","RECEIVE_CONNECTED_CASE_PERMISSIONS","defaultConstructor","deleteCount","insertCount","actualDeleteCount","actualStart","argumentsLength","MATCH","nativeMatch","matcher","matchStr","notARegExp","correctIsRegExpLogic","searchString","signinResponse","client","redirectStarted","logoutPath","applicationUrl","lastIndexOf","OidcClient","authority","client_id","redirect_uri","post_logout_redirect_uri","scope","response_type","filterProtocolClaims","routerPath","hostPosition","locationPosition","locationPath","hostingPathPosition","hostingPathLength","clearCachedToken","logAsDifferentUser","storeCurrentRouterPath","redirectUrl","providerId","prompt","acr_values","createSigninRequest","cacheAccessToken","access_token","cacheIdToken","id_token","signout","createSignoutRequest","id_token_hint","endpoints","withIfNoneMatch","responseCachingState","timestamp","RequestUiDefinition","uiDefinitionResponse","newUiDefinition","newETag","FailUiDefinition","getOptionsOrDefault","optionsContainValue","caseStoreConst","mapCaseData","mapFields","mapValues","mapDataToItem","rootPath","dataKey","isValidPrimaryKey","subtables","subtable","mapSubtables","subTables","caseDataToStore","mapDomainMetadata","metaData","mapReadOnlyDomains","mapRequiredFields","mapHiddenDomains","mapFailedConstraints","readOnlyDomains","entityPathsToCompositeKeys","requiredFieldDomainsValue","requiredFieldDomains","requiredFieldDomainsForStatusChangeValue","requiredFieldDomainsForStatusChange","hiddenDomains","failedDomainConstraints","responseType","domainText","ep","caseMetadataToStore","mapItemToCaseData","lastElementIndex","lastPathElement","lastPathValue","storeToCaseData","fullPath","table","currentsubtable","othersubtables","REQUEST_SEARCH_EXTERNAL_PROVIDER","RECEIVE_SEARCH_EXTERNAL_PROVIDER","FAIL_SEARCH_EXTERNAL_PROVIDER","CLEAR_SEARCH_EXTERNAL_PROVIDER_RESULTS","parseIntImplementation","cache","thrower","argument0","argument1","getIterator","entries","ensureIntl","browserCompatibility","requestAnimationFrame","navigator","msSaveBlob","URL","createObjectURL","anchor","download","revokeObjectURL","copyToClipboard","textField","innerText","userAgent","MSInputMethodContext","documentMode","ButtonTertiary","btnTertiary","Switch","switchContainer","switch","switchLabel","checked","slider","CloseOnBlur","windowHasFocus","componentDidBlur","isChild","nativeEvent","timeoutHandle","delayedBlurEvent","shouldTriggerOnBlur","windowBlur","elementInFocus","handleFocus","handleBlur","debounceRender","ComponentToDebounce","debounceArgs","maxWait","requestRender","ANIMATE_OUT_SPEED","Permission","OptionBtnNextLevel","uiNextLevelBtn","OptionIcon","optionIcon","OptionDescription","showIcons","selectSymbol","hideSelection","htmlFor","OptionSelectMark","onSelect","charCode","handleOnChange","onKeyPress","handleOnKeyPress","NATIVE_WEAK_MAP","objectHas","WeakMap","wmget","wmhas","wmset","templateString","templateVariables","valueEncoder","capturedIdentifier","actionCreator","dispatchOnError","loadCodeItems","loadParams","startIndex","maxResults","fieldOptions","includeCodeDataOnly","searchParams","category","loadPath","deleteCodeItem","deleteCase","AddButton","OverlayComponent","displayOverlay","keyEvent","overlay","iconAsBg","overlayText","overlayBg","withPrompt","ComponentWithPrompt","pendingRoute","shouldPrompt","promptText","returnValue","isBackFromConnectedCase","navigatingInterally","router","nextRoute","onAppClose","setRouteLeaveHook","onLeave","wrappedComponentRef","remainingProps","continue","shouldDisplayModal","hoistStatics","withRouter","BreadcrumbItem","onItemClick","onClickItem","home","Breadcrumb","onClickBreadcrumbHome","renderHome","renderItem","ComponentWithDropdown","PropTypes","NonPersistedStorage","storage","token","ExpanderBackground","expanderBackground","componentPath","allowUnmatchedIds","pathType","pathIndex","KeepFocusOnElement","hasFocus","divRef","setDivRef","SelectOptionsExpanderComponent","loadingOptions","loadOptionsError","switchLongDescriptionAvailable","showLongDescription","onShowLongDescription","searchRequiredMessage","notEnoughInputWhenSearchRequired","dialogContent","optionsMessage","searchRequired","loadError","notFound","doNotRenderExpander","noExpander","selectSwitch","hasSwitchStyles","hasSwitch","dialogExpander","selectHeader","SelectOptionsExpander","TextareaWithForceUpdateConsumer","withForceUpdateConsumer","Textarea","SelectInput","onOpenOptions","offsetLeft","FaCaretDown","inputValue","hasSelectedOptions","inputRef","hasSelectedOptionsStyle","textarea","renderOpenOptions","numberOfLevels","showIndexWhenItemCountIsAbove","hideIndexWhenItemCountIsAbove","sortSelectItemByDescription","n1","n2","SelectedOptions","removedItem","valueIsValid","showItem","hasValidationError","hasError","handleOnClick","onRemove","handleOnRemove","selectedSortedOptions","listOfItems","scrollIntoViewIfNecessary","rect","getBoundingClientRect","innerHeight","defaultEmptyArray","HierarchyOptions","onSelectOption","allLevelsDescriptionPrefix","enableSelection","loadOptionsByParentId","showSelectionMark","longDescriptionValue","breadcrumbStack","leafNodeOnly","hasDescendants","onBreadcrumbItemClick","hierarchyOptions","showLongDescriptions","TileType","Group","onClickHeader","bookmarkId","alphabetSection","alphabetSectionLetter","alphabetControlBtn","TilesIndex","onClickTile","alphabetControl","indexList","IndexOptions","currentGroup","groupList","firstChar","getFirstUpperCaseChar","createNewGroup","createOrUpdateGroup","shortcutView","anchorToSelectedGroup","scrollToSelectedGroup","tiles","onSelectedShortcut","renderGroup","createGroupStructure","renderShortcuts","renderIndexList","OptionsResolver","itemsLength","optionsDisplaySetting","indexMin","indexMax","auto","flat","searchRequiredOptionsLimit","optionsResult","textSearchRequired","searchRequiredErrorOptions","exceedsMaxResultWhenSearchRequired","originOptions","descriptionAllLevels","returnedOptions","findOptionsAndBuildBreadcrumbStack","addParentItemToStack","parentItem","buildStack","haveNotFoundSelectedOption","previousValue","currentValue","optionsToHierarchy","setTypeIfOptionTypeAuto","KeyboardSupport","closeOptions","loadAndOpenOptions","handleKeyDown","getValueItem","SelectBaseComponent","minLength","searchRequiredMinLength","achievedMinLengthCondition","debounceOnLoad","isEmpty","resetPreviousValueWhenEmpty","handleBlurComponent","alwaysOpen","moveFocus","loadSingleHierarchyOptions","searchMode","initiallyShowLongDescription","onLoadOptionsDelay","previousValueItem","previousDescription","nextValueItem","nextDescription","shouldRenderAsOpen","hideSearchInput","hideAlphabeticIndex","thinnerWrapperClass","wrapperThin","longDescriptionExists","hasNewInputValue","handleInputChange","handleFocusInput","onClickedOpenOptions","getInputRef","linkify","tlds","fuzzyLink","fuzzyEmail","DisplayTextWithLinks","decoratedHref","decoratedText","matchDecorator","matchLinks","componentDecorator","renderLink","linkifyValidUrls","REQUEST_UI_DEFINITION","FAIL_UI_DEFINITION","CHANGE_CASE_TYPE","CHANGE_CASE_TYPE_FAILURE","CHANGE_CASE_TYPE_SUCCESS","ChangeCaseTypeSuccess","ChangeCaseTypeFailure","REQUEST_CODETABLE","RECEIVE_CODETABLE","FAIL_CODETABLE","codes","FailCodetable","flattenIntoArray","depthArg","sourceLen","ceil","TAG","getFlags","stickyHelpers","NativeRegExp","re1","re2","CORRECT_NEW","UNSUPPORTED_Y","RegExpWrapper","pattern","thisIsRegExp","patternIsRegExp","flagsAreUndefined","proxy","createHTML","forcedStringHTMLMethod","Set","getCaseNo","areaState","selectedId","entityPathRoute","riskDefState","riskMatrixDef","mapRiskMatrixDefinitionToStoreFormat","editDocument","editDocumentItem","loadCase","deleteDocument","duplicateDocument","loadBowtie","isNavigatingFromChild","currentCase","Validation","messageWrapper","warningIcon","ValidationSummary","validationSummary","FlexValidation","flexValidation","supportObjectFit","propToStyle","ObjectFitImage","alt","cover","sizingStyle","contain","styleClassName","containerSize","backgroundImage","aria-label","fallback","applicationDidMount","crashNotification","enableNotifications","dispatcher","enableStartupCrashNotifications","collection","FlatOptions","wireFormat","categoryFilter","consequenceType","createAxes","def","defaultAxisConfig","fakeAxis","requiredAxisId","baseDef","combinations","getCombinations","accumulatedCombinations","otherOption","vals","createAxisValueCombinations","comb","severity","recurrence","likelihood","getAxisComponent","RemoteBlob","onLoad","onError","RemoteImage","targetRegistry","observerRegistry","removeInstance","getInstance","initialValue","ChildObserver","rootMargin","threshold","IntersectionObserver","handleUpdatedIntersection","targets","startObserving","stopObserving","restartObserving","UNSCOPABLES","ArrayPrototype","nativeReverse","PREFERRED_STRING","bitmap","writable","activeXDocument","enumBugKeys","html","documentCreateElement","IE_PROTO","EmptyConstructor","scriptTag","LT","NullProtoObject","ActiveXObject","iframeDocument","iframe","write","temp","parentWindow","NullProtoObjectViaActiveX","display","contentWindow","F","createMethod","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$this","specificCreate","displayText","url1","base","substr","mapPropsFromSelectors","injectSelectors","selectorProps","selector","injectTranslations","textProps","textSelector","translationMap","textMap","mapTextPropsFromState","injectIntl","areaComponent","withTranslation","componentState","appsettingsTexts","stateAndSelectorProps","translation","bindActionCreators","ButtonInline","buttonInline","Label","colon","withColon","PromptConfirmationComponentModal","handleHide","escapeKey","handlerHotkeys","handleContinue","handleCancel","isMain","sectionHeading","sectionHeadingParent","sectionInfoText","sectionValidation","SlideArrowSymbol","pointLeft","createLoader","AttachmentThumbnail","clicker","imageContainer","findImages","AttachmentViewer","imageContainerRef","manager","Hammer","recognizers","on","onSwipe","getIndex","goToNext","goToPrev","autoScrollThumbnails","velocityX","delta","deltaY","scrollLeft","thumbnailContainerRef","querySelector","attachments","prevInitialSelected","setupListeners","viewer","image","progressContainer","indeterminate","fitImage","directionButton","thumbnailContainer","thumbnailList","onWheel","onThumbnailScroll","onThumbnailLoaded","selectImage","hasCanceled","SelectOptions","fullWidthOptions","isValidEmail","mail","isValidListOfEmails","emails","BreakLines","lines","lineBreakChar","SelectOption","selectTypeClass","selectCheck","hasChildrenClass","selectHasChildren","getCollectionKey","hasValid","clearBy","descriptors","formatRegExp","isString","objects","inspect","isNull","deprecate","msg","noDeprecation","warned","throwDeprecation","traceDeprecation","trace","debugEnviron","debugs","opts","ctx","seen","stylize","stylizeNoColor","depth","colors","isBoolean","showHidden","_extend","isUndefined","customInspect","stylizeWithColor","formatValue","styleType","recurseTimes","isFunction","primitive","formatPrimitive","visibleKeys","idx","arrayToHash","isError","formatError","isDate","braces","toUTCString","formatProperty","formatArray","cur","numLinesEst","reduceToSingleString","line","ar","re","objectToString","pad","debuglog","NODE_DEBUG","pid","isNullOrUndefined","isPrimitive","isBuffer","months","time","inherits","origin","kCustomPromisifiedSymbol","callbackifyOnRejected","newReason","promisify","original","promiseReject","custom","callbackify","callbackified","maybeCb","nextTick","rej","CREATE_NEW_DRAFT","CREATE_NEW_DRAFT_FAILURE","CreateNewDraft","CreateNewDraftFailure","DefaultCopyOptions","setCount","contextMenuModal","grayShadow","enabledFeatures","onDelete","ContextMenu","internalObjectKeys","feature","detection","normalize","POLYFILL","NATIVE","propertyKey","foo","InfoType","InfoText","helpIcon","infoTextTrigger","SelectOptionLink","dropdownOpen","urlResolver","dropdownItems","labelItems","folderClickHandler","selectOption","expanded","meatballContainer","whiteDots","expandDropdown","onCloseMenu","closeDropdown","labelContainer","findNestedSelectOption","rtn","updateState","rootTemplate","currentFolder","rvb","firstEl","levelOptions","rootValueOfBreadcrumb","FullscreenCodeSelector","newBreadcrumb","routeHandler","selectedFolderId","infoMessage","itemDropdownRender","itemLabelRender","selectOptions","selectItem","breadcrumbElement","onClickBreadcrumbItem","showBreadcrumb","titleElement","fullscreenCodeSelector","handleClickClose","navbarInfoMessage","selectCaseContainer","selectTitle","backgroundCloseBtn","withConditionalRender","defaultObj","withFallback","FallbackProvider","focusInspected","findDOMNode","scrollY","isBeeingInspected","popoverWrapper","inspectionMode","popoverTitle","inspectError","inspectorStyle","marginRight","inspected","componentCanBeInspected","showComponentInspector","renderErrorPlaceholder","renderWithInspector","getCacheKey","appId","getSubCacheKey","cacheKey","subCachekey","getMemoized","subCacheKey","getFromCache","changedProps","actionForEvent","getDefaultValue","buildEvents","eventMap","componentEvent","valueArg","finalValue","eventType","isValidValueObject","isPlainObject","isValidValueArray","isValidPlainValue","pathFromOptions","noOfCopies","actionCreatorName","entityTypePathMatchesContextPath","eventName","childContext","virtual","addEvent","iteratorCache","clearComponentCache","Activator","lastActiveChildItem","activateIfNeeded","shouldActivateItself","addRef","only","getConnectedRowComponent","rowProps","mapStateToProps","rowId","rowComponent","createStateToPropsSelector","aggrComponent","cacheid","addComponentToCache","createChildPropsFromParentProps","childDescriptor","createDateAsUtc","cloneDate","optionalProps","renderRowComponentWithChildren","TileOrRow","DetailsComponent","fieldsInsideDetailsComponent","detailFieldDescriptor","fieldProps","Field","renderDetailsView","fieldsPerColumn","fieldDescriptor","renderFieldsPerColumn","createIterator","ContainerComponent","containerProps","tileOrRowDescriptor","containerDescriptor","getMasterViewDescriptor","getDetailsViewDescriptor","rowDataContext","createRowDataContext","activatorKey","componentAsyncData","componentData","propsFromRegisteredSelectors","extraWrapperProps","aggrProps","readOnlyProps","metaDataPropsFromStore","requiredProps","visibleProps","validationErrorsAsValidationProp","enabledChildTableOperations","propsSpecificToThisComponent","valueProps","metadataProps","inspectorProps","dateFunctions","configProps","currentLocale","intl","currentUiProps","getIteratorContext","cachedProps","finalStateAsProps","connectComponent","rootProps","createComponent","enhancedComponent","applyMandatoryEnhancers","Expand","ConnectedComponent","FieldComponent","componentTree","reconnect","FormContext","submit","submitting","overlay_text","formContent","formBody","noValidate","JsonTree","PropertyPanel","$inspectedError","exportProps","clientInfo","onUpdatePreview","runtimeProps","scrollableParent","scrollable","prepare","isNodeReadOnly","onFullyUpdate","updatePreview","InspectionPanel","popoverMessage","popoverContent","handlePreviewEdit","renderCaseTabs","EntityViewComponent","moreThanOneTab","finalProps","TabControl","renderTabs","postfix","random","propertyIsEnumerable","originalArray","REPLACE_SUPPORTS_NAMED_GROUPS","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","KEY","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","methods","nativeMethod","arg2","forceStringMethod","stringMethod","regexMethod","regexpFlags","nativeExec","patchedExec","UPDATES_LAST_INDEX_WRONG","BROKEN_CARET","NPCG_INCLUDED","reCopy","charsAdded","strCopy","EOF","USE_NATIVE_URL","arrayFrom","codeAt","toASCII","URLSearchParamsModule","NativeURL","URLSearchParams","getInternalSearchParamsState","getInternalURLState","pow","ALPHA","ALPHANUMERIC","DIGIT","HEX_START","OCT","DEC","HEX","FORBIDDEN_HOST_CODE_POINT","FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT","LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE","TAB_AND_NEW_LINE","parseHost","codePoints","parseIPv6","host","isSpecial","parseIPv4","percentEncode","C0ControlPercentEncodeSet","partsLength","numbers","part","ipv4","parts","numbersSeen","ipv4Piece","swaps","swap","address","pieceIndex","compress","pointer","char","serializeHost","ignore0","ipv6","maxIndex","currStart","currLength","findLongestZeroSequence","fragmentPercentEncodeSet","pathPercentEncodeSet","userinfoPercentEncodeSet","specialSchemes","ftp","file","https","ws","wss","scheme","includesCredentials","username","password","cannotHaveUsernamePasswordPort","cannotBeABaseURL","isWindowsDriveLetter","normalized","second","startsWithWindowsDriveLetter","shortenURLsPath","pathSize","isSingleDot","segment","SCHEME_START","SCHEME","NO_SCHEME","SPECIAL_RELATIVE_OR_AUTHORITY","PATH_OR_AUTHORITY","RELATIVE","RELATIVE_SLASH","SPECIAL_AUTHORITY_SLASHES","SPECIAL_AUTHORITY_IGNORE_SLASHES","AUTHORITY","HOSTNAME","FILE","FILE_SLASH","FILE_HOST","PATH_START","CANNOT_BE_A_BASE_URL_PATH","QUERY","FRAGMENT","parseURL","stateOverride","bufferCodePoints","failure","buffer","seenAt","seenBracket","seenPasswordToken","port","fragment","codePoint","encodedCodePoints","URLConstructor","baseState","urlString","searchParamsState","updateSearchParams","updateURL","serializeURL","getOrigin","protocol","getProtocol","getUsername","getPassword","getHost","hostname","getHostname","getPort","getPathname","getSearch","getSearchParams","getHash","URLPrototype","accessorDescriptor","nativeCreateObjectURL","nativeRevokeObjectURL","collectionStrong","init","collectionDeleteAll","real","deleteAll","getMapIterator","newMap","findKey","sameValueZero","keyOf","mapKeys","merge","noInitial","accumulator","isPresentInMap","quot","attribute","p1","LazyTranslationProvider","Authenticated","validAuthState","FullscreenModalHeader","previousUrl","Textbox","SelectExpander","collapseContainer","DetailsExpander","detailsExpander","noShadow","Footer","expanderFooter","ButtonPrimary","ButtonSecondary","ButtonCallToAction","btnCallToAction","HeaderWithRightToolbar","headerClassName","expanderHeader","longDescriptionTitle","expanderCloseX","promptConfirmationComponent","messageList","confirmMessages","confirmationStyle","DropdownMenu","dropdownExpanded","offsetX","closeOnDemand","onClickHandler","closeAfterClick","menuItem","dropdownNode","adjustmentStyle","dropdownWrapper","dropdownMenu","onAnimationEnd","onOpenDone","isRequired","MeatballMenu","meatballDropdownWrapper","Expandable","buttonMore","useMargins","expandableLink","noText","toggleExpander","compose","childProps","stackedColumn","invertStrong","hideIfNoValue","formattedNumber","useGrouping","maximumFractionDigits","maxDecimals","alignContent","alignToEnd","alignEnd","animated","createStateObject","onClosedCallback","setClosedState","CaseComponent","uiEngineActions","nextCaseNumber","caseProps","canRender","saving","hasChanges","persistedValues","nextValues","newCaseValues","showConfirmWarnings","CREATE_EDIT_DRAFT","reduceFromExisting","hasProperty","applyLocalChanges","userData","serverData","changes","diff","was","INITIAL_EDIT_STATE","pristine","caseEquals","localChild","savedChild","rootCodes","currentEditing","targetEntity","currentValues","immediateSaveRequests","savedValues","incomingEntity","pendingDeletes","entitiesRemovedOnServer","lastServerSavedValues","getPatchedState","modified","reducerPredicate","INITIAL_CASE_STATE","tabs","docValues","uiEngineReducers","allCaseReducers","draftReducer","editReducer","createReducer","caseConnectionReducer","searchExternalProviderReducer","DebounceTextarea","debounceOnChange","eventClone","autoExpandable","maxRows","minRows","ShareCaseModal","users","noSelectedValues","validate","selectedUsers","externalRecipients","allRecipients","userEmailExists","atLeastOneRecipientSelected","atLeastOneExternalRecipientSelected","removeEmail","data-tag","data-tag-handle","multiExternalRecipients","handleChangeExternalRecipients","getLabel","getExternalRecipientsLabel","handleSave","loadRecipients","handleEmailChanged","setMessage","ShareCase","modalProps","retry","interval","initialWait","retryAttemptsOnError","runWhenIdle","ScrollContainer","toggleScrollIndicators","handleScroll","sensor","addListensers","scrollWidth","scrollPct","scrollHeight","scrollTop","acum","indicator","horizontal","vertical","textFill","tooltipOverwrite","badgeWrapper","Circle","countCircle","BadgeList","badgelistWrapper","circleItems","DisplayColor","displayColor","hexColor","InfoBanner","infoBanner","infoImage","bannerTitle","bannerDescription","ConfidentialBanner","CasePasswordBanner","casePasswordBanner","showPrimaryKeyLongDescription","linkifyLongDescription","showDetailsButton","textShowDetails","textHideDetails","codeTitleTile","codeTitleTileCard","main","renderAsOpened","renderHeader","openDetailsHandler","handleDeselect","activeStyling","activeTile","detailsButton","getDetailsButtonStyle","DocumentItemFromMultiSelectComponent","selectedItems","clearSelectedItems","excludeSelectedOptions","handleClose","handleEnter","textCodeSelectorTitle","toggleSwitchButton","filteredOptions","canHideSearchInput","onCodesSelected","documentItemFromMultiSelect","btnWrapper","openCodeSelector","renderCodeSelector","l2","InputLabel","TabItem","activeTab","invalidTab","warningTab","urlToIcon","tabIconForDomain","tabItem","iconWrapper","visibility","ToggleMode","expandText","collapseText","handleToggle","ToggleOpen","mobileToggle","btnArrowLeft","btnLabel","TabContainer","menuIsOpen","menuIsClosing","closeMobileMenu","handleMobileTabSelect","userDidSelect","renderList","menuStateStyles","withClosedMenu","closeAnimation","animateOut","viewStyle","tabPanel","tabSectionWrapper","toggleMobileMenu","tabSection","switchViewButton","mobileBackground","MultiEmails","multiEmails","hasCrashedAlready","renderView","readyState","platform","cookieEnabled","onLine","browser","timezone","getTimezoneOffset","online","exportName","VENDOR_PREFIXES","TEST_ELEMENT","TYPE_FUNCTION","round","setTimeoutContext","bindFn","invokeArrayArg","each","deprecationMessage","warn","nextKey","extend","dest","inherit","childP","baseP","_super","boolOrFn","ifUndefined","val1","val2","addEventListeners","types","splitStr","removeEventListeners","hasParent","inStr","inArray","findByKey","toArray","uniqueArray","prefixed","camelProp","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","COMPUTE_INTERVAL","INPUT_START","INPUT_MOVE","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","Input","inputTarget","domHandler","ev","enable","inputHandler","pointersLen","pointers","changedPointersLen","changedPointers","isFirst","isFinal","session","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","getCenter","timeStamp","deltaTime","angle","getAngle","distance","getDistance","offset","offsetDelta","prevDelta","prevInput","deltaX","computeDeltaXY","offsetDirection","getDirection","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","scale","getRotation","maxPointers","velocity","velocityY","lastInterval","computeIntervalInputData","srcEvent","computeInputData","recognize","p2","sqrt","atan2","PI","evEl","evTarget","evWin","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","MouseInput","pressed","which","pointerType","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","2","4","5","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","PointerEventInput","pointerEvents","MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","SingleTouchInput","started","normalizeSingleTouches","touches","changedTouches","TOUCH_INPUT_MAP","TOUCH_TARGET_EVENTS","TouchInput","targetIds","getTouches","allTouches","targetTouches","changedTargetTouches","touch","DEDUP_TIMEOUT","DEDUP_DISTANCE","TouchMouseInput","mouse","primaryTouch","lastTouches","recordTouches","eventData","setLastTouch","lastTouch","lts","isSyntheticEvent","dx","dy","inputEvent","inputData","isMouse","sourceCapabilities","firesTouchEvents","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","touchMap","cssSupports","CSS","getTouchActionProps","TouchAction","compute","touchAction","recognizer","getTouchAction","hasPanX","hasPanY","cleanTouchActions","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","Recognizer","defaults","simultaneous","requireFail","stateStr","directionStr","getRecognizerByNameIfManager","otherRecognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","preset","Manager","recognizeWith","dropRecognizeWith","requireFailure","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","attrTest","optionPointers","isRecognized","isValid","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","taps","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","inputClass","cssProps","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","oldCssProps","toggleCssProps","force","curRecognizer","existing","off","gestureEvent","gesture","triggerDomEvent","STATE_FAILED","Tap","Pan","Swipe","Pinch","Rotate","Press","FileItemProgress","determinate","controlledValue","DebounceInput","ForceUpdateTerminalContext","withForceUpdateTerminal","WrappedComponentProps","forceUpdateHash","Provider","refreshForceUpdateHash","handleRefreshForceUpdateHash","Consumer","updateHash","updatehash","SelectedOption","selectTag","notRemovable","selectTagRemove","onKeyUp","LinkContextProvider","LinkContextConsumer","InputModalComponent","openModal","contextPrimaryKey","contextCategoryEqualsPkCategory","contextCategoryEqualsFieldNameValue","getDataRowsIteratorChildItems","sortEntities","getCodetableIteratorChildItems","dataRowItems","reportIdMapping","reportId","SectionPager","sectionPager","CreateEditDraft","CaseView","actionTypes","MODEL","NAME","VENDOR","MOBILE","TABLET","util","regexes","extensions","mergedRegexes","str1","str2","lowerize","major","mapper","rgx","ua","arrays","regex","maps","oldsafari","device","amazon","sprint","vendor","os","windows","cpu","engine","UAParser","uastring","getResult","rgxmap","getBrowser","getCPU","architecture","getDevice","getEngine","getOS","getUA","setUA","BROWSER","MAJOR","CPU","ARCHITECTURE","DEVICE","CONSOLE","SMARTTV","WEARABLE","EMBEDDED","ENGINE","OS","jQuery","Zepto","parser","integer","copyright","EXISTS","functionToString","classofRaw","CORRECT_ARGUMENTS","tryGet","callee","NASHORN_BUG","IS_INCLUDES","fromIndex","CONSTRUCTOR_NAME","SAFE_CLOSING","called","iteratorWithReturn","SKIP_CLOSING","ITERATION_SUPPORT","versions","v8","createIteratorConstructor","IteratorsCore","BUGGY_SAFARI_ITERATORS","returnThis","Iterable","IteratorConstructor","DEFAULT","IS_SET","CurrentIteratorPrototype","getIterationMethod","KIND","defaultIterator","IterablePrototype","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","aPossiblePrototype","CORRECT_SETTER","dotAll","CONVERT_TO_STRING","whitespace","ltrim","rtrim","Wrapper","NewTarget","NewTargetPrototype","FREEZING","METADATA","isExtensible","setMetadata","objectID","weakData","REQUIRED","fastKey","getWeakData","onFreeze","collectionAddAll","addAll","newSet","remover","getSetIterator","adder","intersection","hasCheck","isDisjointFrom","isSubsetOf","otherSet","isSupersetOf","sep","symmetricDifference","union","w","Axis","Chart","Legend","LegendSymbolMixin","noop","pick","ColorAxis","defaultColorAxisOptions","minPadding","maxPadding","tickPixelInterval","startOnTick","endOnTick","marker","animation","duration","minColor","maxColor","tickLength","showInLegend","keepProps","layout","coll","side","reversed","opposite","showEmpty","dataClasses","initDataClasses","initStops","horiz","zoomEnabled","defaultLegendLength","colorCount","legendItems","dataClassColor","colorIndex","tweenTo","setTickPositions","stops","crosshair","setAxisSize","legendSymbol","chartWidth","chartHeight","symbolWidth","symbolHeight","normalizedValue","isLog","val2lin","toColor","dataClass","getOffset","legendGroup","axisOffset","axisParent","added","labelLeft","labelRight","setLegendColor","legendColor","linearGradient","x1","y1","x2","y2","drawLegendSymbol","labelPadding","itemDistance","baseline","legendItemWidth","legendItemHeight","getSeriesExtremes","dataMin","dataMax","valueMin","valueMax","drawCrosshair","toPixels","colorKey","cross","addClass","getPlotLinePath","isDirtyData","allItems","isDataClass","isDirtyLegend","userOptions","legendItem","colorizeItem","destroyItem","getDataClassLegendSymbols","valueDecimals","valueSuffix","numberFormat","drawRectangle","Fx","elem","colorAxis","seriesTypes","colorPointMixin","Point","graphic","colorSeriesMixin","pointArrayMap","axisTypes","optionalAxis","trackerGroups","getSymbol","parallelArrays","pointAttribs","column","translateColors","nullColor","colorAttribs","colorProp","seriesType","inside","crop","pointRange","pointFormat","normal","halo","hasPointSpecificOptions","getExtremesFromAll","directTouch","scatter","colsize","axisPointRange","rowsize","generatePoints","shapeType","shapeArgs","drawPoints","animate","getBox","alignDataLabel","getExtremes","valueData","ENTRIES","returnMethod","defer","channel","IS_IOS","setImmediate","clearImmediate","MessageChannel","Dispatch","run","runner","listener","postMessage","port2","port1","onmessage","importScripts","PromiseCapability","$$resolve","$$reject","PrototypeOfArrayIteratorPrototype","arrayIterator","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","RE","nativeAssign","B","chr","T","arrayLike","mapfn","mapping","InternalMetadataModule","common","IS_WEAK","ADDER","NativeConstructor","NativePrototype","exported","fixMethod","getConstructor","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","setStrong","preventExtensions","internalStateGetterFor","define","getEntry","ITERATOR_NAME","getInternalCollectionState","getInternalIteratorState","wasDeleted","allDeleted","accessToState","isIdle","submitIsPending","forcedSaveIsPending","createSaveMiddleware","saveCallback","submitCallback","timer","saveAction","uiState","removeTimer","clearInterval","shouldSubmit","shouldSaveImmediatly","shouldSaveOnNextInterval","setInterval","addTimer","ACTION_ERROR","logErrors","typedToPlain","MAX_SAFE_INTEGER","ValueDisplay","suffix","shouldTruncate","doTruncation","VisibilitySensor","onShow","handleShow","leading","trailing","onHide","showAsComment","textComment","textPrefix","hideComponent","displayNoValueDash","Hidden","ExpandablePanelComponent","expandablePanel","panelHeader","ExpandablePanel","DrawerWithBarComponent","isOpenDrawer","initiallyOpen","barContent","animateOutStyles","btnOpen","filterOpenState","drawerBar","drawerBarBtn","toggle","searchContent","handleAnimationEnd","drawerContent","DrawerWithBar","ToggleButton","valueResolver","textLabel","textLabelToggle","buttonText","ValueComponent","ButtonComponent","signedStyles","signed","toggleWrapper","__assign","defaultFqdnOptions","requireTld","allowUnderscores","allowTrailingDot","defaultEmailOptions","allowDisplayName","requireDisplayName","allowUtf8LocalPart","emailUserPart","quotedEmailUser","emailUserUtf8Part","quotedEmailUserUtf8","isByteLength","displayEmail","lowerDomain","user","tld","isFQDN","userParts","dateToPrimitive","DatePrototype","CodeSinglePicker","loadedOptions","fetchingOptions","search_required_message","CodeMultiplePicker","codetableOptions","CaseReceiptComponent","anonCtx","receipt","casePassword","receiver","baseDate","datePart","timePart","isValidDay","isValidTime","setTime","setUTCHours","getUTCHours","setUTCMinutes","getUTCMinutes","getMonthsShort","getWeekDaysShort","createDateParser","getInputFormatFromLocale","calendarLocale","parseInputIntoYMDArray","yearIndex","monthIndex","inputF","isYMDValidDateArgs","parseToNewDate","dateInput","getInputFormatDescriptor","dateParts","addDaysFromUserShortcut","operator","days","daysToAdd","addMonthsFromUserShortcut","monthsToAdd","addYearsFromUserShortcut","years","yearsToAdd","parseDateInputOrUserShortcut","matchedDayShortcut","matchedDayShortcutDayPart","matchedDayShortcutOperatorPart","matchedDayShortcutDaysPart","calculatedDateFromDayShortcut","matchedMonthShortcut","calculatedDateFromMonthShortcut","matchedYearShortcut","parseDateFromUserShortcut","isValidDate","DatePicker","additionalState","usersCurrentDateInput","formattedForDisplay","formattedForInput","selectedDay","fireOnChange","inputFormatted","clearState","inputHasFocus","parsedDateInput","updateInternalState","closePicker","showDatePicker","DateUtils","isSameDay","hidePicker","toLocaleString","disablePast","isPastDay","monthNames","currentMonth","currentYear","captionMonth","captionYear","weekDayNames","currentFormat","modifiers","handleSelectedDay","Caption","renderDatePickerCustomDisplay","currentDisplayValue","datePicker","pickerWrapper","weekdaysShort","onDayClick","handleDayClick","disabledDays","enableOutsideDays","initialMonth","renderDay","renderDayString","captionElement","showOutsideDays","dateIconClickHandler","togglePicker","handleInputFocus","handleInputBlur","FaCalendar","picker","displayValueWhenInputHasFocus","timeParser","use12hr","meridiemCache","am","pm","getAmPmSuffixFromCurrentLocaleIfAny","toLocaleTimeString","dateStringWithAM","dateStringWithPM","matchForAM","matchForPM","parseTimeStringAs24Hr","timeString","parseTimeStringAs12Hr","defaultMeridian","ampm","addHoursAndReturnHours","addHoursAndReturnHoursAndMeridien","addHour","newHour","overHour","AM","ndble","addHoursFromUserShortcut","use24HourTime","parseStringAndReturnHhMMAndSuffix","time24hr","time12hr","hours24","parseTimeInputOrUserShortcut","isShortcut","calculatedTime","parsedTime","parseStringAs12HoursAndReturnHours","userInput","convert12To24","meridian","convert24To12","getAmPmSuffixesFromUserInput","timeFormatter","hour12","numericDisplay","formatTimePicker","numInCurrentLocale","prefixZeroInCurrentLocale","TimePicker","enterKey","meridianAm","meridianPm","valueProp","valueInCurrentLocale","getDisplayValue","selectedHours","use12HrTime","selectedHours24","selectedMinutes","showClock","selectedMeridian","emptyDateError","meridiem","timeHasChanged","fireOnChangeCallback","parsedTimeInput","parsedTimeIsValid","resetState","selectHours","calculateInitialOrUpdatedState","oldValue","lastPropValue","amButton","amDefault","switchToAm","pmButton","pmDefault","switchToPm","doneButton","doneButtonWrapper","doneBtn","labelConfirmTimeSelection","clockPicker","clockWrapper","onChangeMode","handleModeChange","militaryTime","timeIconOnClick","placeholderTime","placeholderTime12hr","placeholderTime24hr","textEmptyDateError","FaClockO","currentProps","useTime","onChangeDate","timePicker","onChangeTime","dateComponent","readOnlyView","moveSortOrderType","SortOrderButton","sortOrderButton","sortOrderType","SortBySelect","sortBySelect","SortByListItem","oldSortByItem","sortByItem","newSortByItem","onDefaultOrderChange","onDefaultOrderRemove","domainNode","onMove","UP","DOWN","defaultSortOrder","orderBySequence","sortMeatballMenu","handleRemove","minNumber","onMoveUp","maxNumber","onMoveDown","sortByTile","sortByTileTop","sortLabel","renderMenu","sortByWrapper","uiSortByTileTitle","onSelectedOptions","sortOrderList","onSortOrderTypeChange","ascLabel","descLabel","SortByList","sortByListItems","onAdd","sortOptions","SortOrderModal","onDoneCb","handleToggleCb","useState","optionsState","setOptionsState","useEffect","domainValue","newOptions","domainNumber","updated","used","sortDefaultSortOrder","maxOrderBySequence","newSortArgument","getNotSelectedOptions","SortOrder","setIsOpen","SliderReadonly","colorToDisplayFromBackend","convertedColor","utils","background","sliderReadOnly","colorDot","SliderCaptionItem","labelRef","debouncedResize","useTooltip","showTooltip","caption","captionOuterBox","SliderCaption","captionBox","bars","SlidingBar","colorOfValue","classes","barSegment","barBox","getTouchPosition","pageX","getMousePosition","findClosestCenter","arrayOfElements","currentElement","SlidingCircle","centers","dragOffset","addDocumentMouseEvents","dragging","updateActiveOption","delayedUpdate","closest","nextIndex","removeDocumentEvents","moveToClosest","addDocumentTouchEvents","componentRef","circleWidth","stopImmediatePropagation","transition","animatedTransition","withoutTransition","onMouseMove","onMouseUp","onTouchMove","onTouchUp","dataSource","circleRef","onTouchStart","passive","calculatedStyle","onMouseDown","abortClick","ResizeObserver","onResize","handleResize","elementsToRender","closestCenter","containerRef","selectedItem","nextActivePosition","updateWidth","generateSegmentsMetadata","needsOptions","sortOptionsDirection","slideLeft","slideRight","activeElementIndex","newWidth","currentWidth","offsetWidth","forceUpdateWhenWidthIsReady","elements","segmentCount","segmentWidth","centerOffset","offsetValue","newElementsToRender","nextProps","nextState","nextOptions","nextValue","nextReadOnly","nextCenters","nextAP","centerEqual","useOptionsColors","compactModeTreshold","containerSpacer","hasColors","box","inverse","breakStyle","break","handleBarClicked","boundary","handleUpdatedCaption","innerStyle","FileUploaderItemEditTitle","editInputContainer","editInput","editDoneBtn","XMLHttpRequestReadyState","FileUploaderItem","editingTitle","newTitle","attachmentExt","extension","textNotAvailable","filesize","secs","mins","hrs","textHourPostfix","textMinutePostfix","textSecondPostfix","uploaded","uploadRate","estimate","humanize","editTitle","onEditTitle","textEditTitle","downloadItem","onDownload","textDownloadFile","setAsMainImage","onSetMainImage","textUseAsMainImage","progressBar","clickAction","onClickThrough","itemWrapper","notEditing","attachment","attachmentImg","displayExtension","marked","attachmentBody","renderTitle","renderMetadata","renderProgressInfo","dropdown","renderMeatballMenu","FileUploaderAddButton","fileList","handleUpload","inputElement","addButtonSection","onInputElementReady","onUpload","makeProgressFile","isWaiting","uniqueId","uuid","makeItemPropsFromProgressFile","progressFile","addItemPropsFromUploadedFile","uploadedItem","makeItemPropsFromUploadedFile","uploadedFile","FileUploaderBase","showMoreItems","viewAttachment","errorMsg","errorMessageTimeout","removeProgressInfo","fillQueue","ma","MA","updateFileState","formData","FormData","upload","onprogress","lengthComputable","fileProgress","loaded","movingAverage","onreadystatechange","DONE","addError","textFileUploadError","resp","documents","progressValue","uploadQueue","uploadsInProgress","uploadsInParallel","xhrSend","grouped","maxSizeMB","tooLarge","textFileTooLargeError","newProgressItems","progressItem","allMessages","getAllMessages","makePropsForUploadsInProgress","itemProps","itemsToRender","maxItemsToShow","showLess","handleToggleItemExpand","textHideMore","textShowMore","textAddButton","newItemList","prepareItems","dragClass","dragActive","dragInfo","textFileUploadInfoLine1","textFileUploadInfoLine2","handleClosingViewer","fileUploader","fileHeading","renderErrors","listWrapper","renderAddButton","dragBox","dragDropIcon","dragDropText","renderItems","textNoFilesAttached","renderExpander","Wrapped","dataTransfer","dropEffect","wrappedComponent","onDragOver","onDragLeave","onDrop","setRef","AccessSwitchItem","readOnlyLabel","changeHandler","useCallback","switchComponent","invalidSwitchComponent","switchLabelDisabled","uiSwitchDisabled","mergeOptions","additionalOptions","getUniqueMessages","AccessSwitch","invalidOptions","initialValueItems","memoizedOptions","useMemo","invalidOption","AccessLabel","validAccess","invalidAccess","AccessCard","removeLabel","useLabelOption","errorStyle","hasDanger","shouldRenderHeader","accessCardContainer","accessCard","accessHeader","accessContent","contentPanelId","labelId","TabButton","readOnlyActive","selectable","Tabs","selectedOption","tabsContainer","aria-labelledby","SelectSingleRadioButton","componentUuid","selectShortList","renderOptions","ButtonListButton","statusSelectorOption","aria-pressed","shouldTriggerValidation","buttons","statusSelector","buttonsReadOnly","readOnlyText","DisplayControlContext","groupPanel","withoutChildren","CheckboxListItem","CheckboxList","Numberbox","evt","modelValue","lastCharacter","lessThanMinValue","minValue","valueIsEmpty","decimalInput","decimalSeparator","numOfDecimals","exceedsMaxDecimals","exceedsMaxValue","numericMaxValue","valueIsOutOfRange","IsTrailingZero","allowUpdates","prevValue","unformattedNumberValue","thousandSeparator","isPositive","maxValue","isNegative","isMaxValueExponential","storeValueOrDefault","dynamicNumber","numberbox","fraction","positive","negative","thousand","handleOnBlur","notNumberReg","Search","targetObj","FaSearch","FileSelector","onSelected","textSelectFile","importFileLabel","handleSelectFileClick","fileTitle","importFileInput","accept","handleChangeFileUploader","weekdayFormat","dayFormat","monthFormat","yearFormat","dateIntlOptions","formattedDate","formattedTime","formattedValue","labelAndBoolean","textCheckedValue","textUncheckedValue","valueText","parentLink","primaryTitle","ExternalLinkHeading","inlineStyle","childCount","separatedChildren","childWithoutSeparator","withoutDelimiter","withDelimiter","fluidPanel","visibleTextLength","displayBottomLine","currentStyle","paddingBottom","borderBottomWidth","borderBottomStyle","expandableTextPrintOnly","expandableText","contentRender","processPanel","flexPanel","columns","Paper","paperStyle","DetailFormPanel","detailFormPanel","truncatedItems","displayValues","renderListItems","separatorString","accumulated","standardTextLimit","hideIfNoValues","labelText","doTruncate","separatedValues","expanderRender","Password","passwordShown","newText","textInput","passwordInput","debouncedOnChange","togglePasswordMask","passwordRef","passwordFocus","textRef","textFocus","eyeIcon","eyeIconClick","numericText","numericHeader","DefaultHeader","TileComponent","hideImmediately","shouldRenderOpenDetailView","detailsButtonStyle","showDetails","hideDetails","textKeyLabel","textDetailsEditButton","primaryKeyValue","dialogTitle","titleStyle","tileContentClassNamesWhenPrimaryKeyIsShown","tileWithKey","contextMenuClassNames","canActivate","detailsEditButton","handleEdit","detailView","editButtonExpandAll","openDetailWrapperStyles","tileWrapperClasses","tileWrapper","expandDetailsButton","renderDetailsButton","tile","tileContent","tileValuesWrapper","styleFromProps","displayIconLeft","displayBackgroundColor","backgroundColorOfValue","foregroundColorOfValue","iconUrlOfValue","displayIconRight","colorStyles","styledColorsFromComponentValue","Checkbox","inputControl","IconList","iconlistWrapper","data-children","topZoneColor","tileTopZone","CompactTileComponent","childrenHasErrors","childrenHasWarnings","validationClass","wrapperStyle","compactTileWrapper","compactTile","contentWrapper","showKey","Triangle","triangle","CheckSymbol","RadioSymbol","NoValueDash","dash","TileViewValidationSummary","TileViewComponent","addTile","validationStyle","tileView","tileViewContainer","tileHeading","tileWithChildren","mapListToStore","codeItems","mergePathWithList","descendantCount","loadCodetableOptions","wireCodes","pathCodes","storeCodes","isEmail_1","isEmail","ReactMultiEmail_1","ReactMultiEmail","locationsAreEqual","Actions","useQueries","useBeforeUnload","useBasename","createMemoryHistory","createHashHistory","createHistory","_LocationUtils","_createBrowserHistory2","_createHashHistory3","_createMemoryHistory3","_useBasename3","_useBeforeUnload3","_useQueries3","_Actions","newObj","_interopRequireWildcard","rtlDetect","isRtlLang","getLangDir","_reactDndHtml5Backend","_reactDndTouchBackend","_dndMultiBackend","_default","backends","backend","MouseTransition","enableMouseEvents","TouchTransition","flush","macrotask","WebKitMutationObserver","queueMicrotaskDescriptor","queueMicrotask","createTextNode","characterData","promiseCapability","windowNames","getWindowNames","whitespaces","regexNonASCII","regexSeparators","OVERFLOW_ERROR","stringFromCharCode","fromCharCode","digitToBasic","digit","adapt","numPoints","firstTime","baseMinusTMin","encode","inputLength","ucs2decode","bias","basicLength","handledCPCount","handledCPCountPlusOne","RangeError","qMinusT","baseMinusT","encoded","getInternalParamsState","URL_SEARCH_PARAMS","plus","sequences","percentSequence","bytes","percentDecode","decodeURIComponent","deserialize","serialize","parseSearchParams","validateArgumentsLength","passed","URLSearchParamsIterator","URLSearchParamsConstructor","entryIterator","entryNext","URLSearchParamsPrototype","getAll","found","entriesIndex","sliceIndex","nativeLastIndexOf","nativeStartsWith","CORRECT_IS_REGEXP_LOGIC","thisArg","targetIndex","sourceIndex","mapFn","globalIsFinite","$parseInt","hex","nativeFreeze","freeze","template","rawTemplate","literalSegments","extendStatics","__extends","__","_this","focused","findEmailAddress","isEnter","validateEmail","validEmails","addEmails","arr","onChangeInputValue","handleOnKeydown","handleOnKeyup","handleOnFocus","emailInputRef","createRef","getDerivedStateFromProps","propsEmails","_a","_b","_c","useSourceMap","cssMapping","btoa","sourceMapping","sourceMap","unescape","sourceURLs","sources","sourceRoot","cssWithMappingToString","mediaQuery","alreadyImportedModules","readUInt8","superCtor","super_","TempCtor","hint","freezeStoreState","_deepFreezeStrict","_deepFreezeStrict2","deepFreeze","oIsFunction","hasOwnProp","isFrozen","_invariant","_invariant2","_DOMUtils","_ExecutionEnvironment","canUseDOM","listeners","stopListener","getPromptMessage","listenBeforeUnload","handleBeforeUnload","startListener","RtlDetectLib","_escapeRegExpPattern","_toLowerCase","reserveReturnValue","_toUpperCase","_trim","delimiter","patterns","addPatterns","patternDelimiter","_parseLocale","strLocale","countryCode","objLocale","_BIDI_RTL_LANGS","isInteger","defaultOptions","I","removeEvent","fireEvent","discardElement","css","D","G","objectEach","J","isTouchDevice","win","K","Renderer","printChart","downloadPNG","downloadJPEG","downloadPDF","downloadSVG","contextButtonTitle","navigation","buttonOptions","theme","symbolSize","symbolX","symbolY","buttonSpacing","menuStyle","menuItemStyle","menuItemHoverStyle","symbolFill","symbolStroke","symbolStrokeWidth","printMaxWidth","contextButton","menuClassName","_titleKey","menuItems","menuItemDefinitions","textKey","onclick","exportChart","enctype","sanitizeSVG","allowHTML","getChartHTML","innerHTML","getSVG","createElementNS","renderTo","sourceWidth","sourceHeight","forExport","enableMouseTracking","showCheckbox","internalKey","uniqueKey","userMin","userMax","setExtremes","getSVGForExport","borderRadius","chartOptions","filename","svg","formAttributes","childNodes","isPrinting","setSize","nodeType","MozBoxShadow","WebkitBoxShadow","boxShadow","openMenu","exportEvents","hideTimer","inClass","onmouseover","onmouseout","exportDivElements","exportMenuWidth","exportMenuHeight","alignOptions","btnCount","exportSVGElements","translateX","translateY","paddingLeft","buttonOffset","destroyExport","ontouchstart","renderExporting","isDirtyExporting","callbacks","redraw","webkitURL","CanVGRenderer","dataURLtoBlob","atob","ArrayBuffer","Uint8Array","Blob","downloadURL","msSaveOrOpenBlob","svgToDataUrl","imageToDataUrl","Image","getContext","drawImage","toDataURL","crossOrigin","downloadSVGLocal","jsPDF","baseVal","svg2pdf","removeInvalid","firstChild","libURL","getOptions","MSBlobBuilder","getBlob","drawSvg","msToBlob","canvg","getSVGForLocalExport","imageElement","setAttributeNS","cloneNode","getAttributeNS","exportChartLocal","fallbackToExportServer","small","injectTransientSettings","AppShell","fetchingAccessInfo","userGroup","restUserInfo","adminPanel","emailAddress","updatingMessagesToUser","LoggedOut","selectedModal","fetchingRefreshCache","fetchingRegenerateAggregated","fixedHeader","fetchingLoadConsents","errorsReducer","ClearResults","RequestReportCategory","ReceiveReportCategory","RequestSortOptions","ReceiveSortOptions","RequestFavouriteDefinition","ReceiveFavouriteDefinition","UpdateWorkingDefinition","LoadFavouriteDefinitionFailure","RequestDownloadReport","ReceiveDownloadReport","FailDownloadReport","RequestUrlMultipleSuppliers","ReceiveUrlMultipleSuppliers","urlMultipleSuppliers","FailReceiveUrlMultipleSuppliers","RequestSearchRequiredUsers","ReceiveSearchRequiredUsers","searchRequiredUsers","fetchingReportCategory","fetchingSortOptions","fetchingDefinition","workingDefinition","RequestExecuteFavourite","mainFavouriteId","containerFavouriteId","ReceiveExecuteFavourite","FailedExecuteFavourite","RequestContainerDefinitions","ReceiveContainerDefinitions","dashboardDefinition","containerFavouriteDefinitions","FailedContainerDefinitions","RequestMainFavouriteDefinition","ReceiveMainFavouriteDefinition","ClearMainFavouriteDefinition","FailedMainFavouriteDefinition","UpdateMainFavouriteDefinition","RequestDrillDown","drillDownModel","INITIAL_STATE","layouts","workingDefinitionRequestId","mainFavourite","fetchingMainFavourite","favouriteContainers","fetchingDataModel","favouriteDataModel","containerDefinitions","errorFetchingMainFavourite","RequestFavouriteDefinitionTemplate","ReceiveFavouriteDefinitionTemplate","favouriteDefinitionTemplate","RequestSendScheduledReport","ReceiveScheduledReport","FailedToSendScheduledReport","RequestMetadata","ReceiveMetadata","usePredefDate","SetEmailValue","ClearForm","UpdateFiltersFavourite","ValidateReportFilters","fetchingReport","fetchingMetadata","emailsValidation","validateFilters","ReceivePermissions","requestId","RequestUiDefinitions","ReceiveUiDefinitions","ReceiveRiskMatrixDefinitions","RequestCases","ReceiveCases","caseResults","totalNumberOfResults","RequestRemoveItem","itemId","ReceiveRemoveItem","FailRemoveItem","FailExecuteFavourite","errorsExecuteFailed","SetRenderMode","INITIAL_CASE_LISTING_STATE","existingDefinition","receivedDefinition","deleted","INITIAL_UI_DEFINITION_STATE","ClearAggregationState","RequestAggregateDefaultFields","ResponseAggregateDefaultFields","UpdateAggregateDefaultFields","ResponseAggregateFields","SetAggregateField","selectedFieldItem","RemoveAggregateField","SetAggregateFunction","selectedAggregateItem","initialized","defaultAggregateFields","additionalAggregateFields","selectedAggregateField","aggregationReducers","updatedSelectedAggregateField","ClearDistributionState","RequestDistributionDefaultFields","ResponseDistributionDefaultFields","UpdateDistributionDefaultFields","ResponseDistributionFields","SetDistributionField","selectedValue","RemoveDistributionField","defaultFields","additionalFields","selectedField","distributionReducers","updatedSelectedValue","SelectionType","ClearGroupByState","RequestGroupByDefaultFields","ResponseGroupByDefaultFields","UpdateGroupByDefaultFields","RequestGroupBySortOrderType","ResponseGroupBySortOrderType","ResponseGroupByFields","RequestGroupBySelections","ResponseGroupBySelections","placeholderField","ModifyGroupBySelections","selectedGroupByFields","selectionReportId","frequencyReportId","defaultIntervalValue","selectionReportTranslations","selection_report_extend_btn","aggregation_area_title","aggregation_field_info","aggregation_btn_open_dialog","aggregation_dialog_title","aggregation_done","aggregation_drag_n_drop","aggregation_remove","aggregation_options_not_found","aggregation_search","aggregation_how_to_aggregate","distribution_title","distribution_area_title","distribution_field_info","distribution_btn_open_dialog","distribution_dialog_title","distribution_done","distribution_drag_n_drop","distribution_remove","distribution_options_not_found","distribution_search","distribution_for_every","distribution_percent_inrease","group_by_title","group_by_area_title","group_by_btn_open_dialog","group_by_dialog_title","group_by_done","group_by_confirm","group_by_drag_n_drop_panel","group_by_remove","group_by_move_up","group_by_move_down","group_by_options_not_found","group_by_search","group_by_adjust_to_filters","group_by_level","group_by_rolling_average","group_by_show_missing_values","group_by_hide_missing_values","group_by_missing_values_are_included","group_by_interval_value_not_valid","group_by_limit_to_category","group_by_sort","target_title","target_area_title","target_btn_open_dialog","target_dialog_title","target_done","target_drag_n_drop","target_remove","target_options_not_found","target_search","toggle_info_description","toggle_info_subtitle","toggle_info_title","toggle_info_load_options","execute_failed_info_description","result_cannnot_be_displayed","choose_chart_type_limit_message_singular","choose_chart_type_limit_message_plural","favourite_unsupported_presentation_type","favourite_not_present_type_favourite","chart_not_supported_type","no_search_result","attribute_field_labels","attribute_quantities","attribute_groups","attribute_wide_layout","attribute_totals","attribute_suppress_repeating_rows","attribute_xAxis_labels_enabled","attribute_yAxis_labels_enabled","show_label","generateLevelOptions","maxLevel","textLevel","additionalLevel","domainNodeToComplexType","dn","fieldValueToComplexType","allowRollingAverage","rollingAverageDescription","uom","mapSelectionType","maxLevels","periods","defaultSelected","fillOutGroupId","sameValueIdCounter","groupId","getDefaultField","selectedFields","addingField","setDefaultValue","selections","defaultSelection","period","Interval","defaultGroupByFields","additionalGroupByFields","sortOrderTypes","groupByReducers","ClearTargetState","RequestTargetDefaultFields","ResponseTargetDefaultFields","UpdateTargetDefaultFields","ResponseTargetFields","SetTargetField","RemoveTargetField","targetReducers","ClearSelectionReportState","InitializationDataStart","InitializationDataEnd","FetchingExecuteStart","FetchingExecuteEnd","SetLayoutType","layoutType","RequestLayoutTypes","ResponseLayoutTypes","FavouriteNotValid","favouriteValid","layoutTypes","selectedLayoutType","selectionReportLayout","initializationStart","initializationEnd","initiallyExecuted","fetchingExecute","executeRequestId","executeFailed","chartReducers","aggregateFieldState","distributionFieldState","groupByFieldState","targetFieldState","chartState","currentRootState","previousBranchState","currentBranchState","ValidationChange","loadCondition","InsertValueToStore","InsertComponentDataToStore","validationProps","ClearValueInStore","ResetChangesListener","ClearAllValues","INITIAL_SIMPLEFORM_STATE","simpleForm","newValues","currentValidation","INITIAL_SETTINGS_STATE","withOptionsReducer","componentEndpoint","optionsParams","actionCreatorsFactory","createMapDispatchToProps","withOptions","RequestCodeItems","ReceiveCodeItems","numberOfResults","clearList","FailCodeItems","RequestCodetableAdministrationList","ReceiveCodetableAdministrationList","FailCodetableAdministrationList","ExpandCodeItem","InvalidateCodeItems","UpdateCategory","UpdateQuery","compareStateWithRequestedProps","fetchingCodetableId","RequestCodeItemDelete","ReceiveCodeItemDelete","FailCodeItemDelete","removeDescendants","listBranch","itemDescendantsIds","branch","removeItemFromBranch","codeListBranch","itemToDelete","collectItemDescendants","itemBranch","mapToStatus","deletingCodeItem","decreaseChildrenCount","childrenCount","sourceBranch","sourceItem","sourceItemIndex","resultItem","resultBranchWithoutSourceItem","resultBranch","resultCodeListBranchWithoutResultBranch","getDirectParentsList","parents","filterOwnId","getDirectParentsListInternal","newParents","setLoadingState","branchesState","isLoading","isUpdatingParent","INITIAL_CODETABLE_LIST_STATE","fetchingBreadcrumbsCodetableId","codeListBranchState","codetableOptionsReducer","currentBranch","currentCodeItems","needsReload","COMMON_ACTION","mapToRequestDeletingStatus","codeListBranchDecreasedChildren","mapToDecreasedChildrenCount","mapToDeletedState","codeListBranchUpdated","codeListBranchStateUpdated","mapToFailedDeletingStatus","codeState","listReducer","RequestCodeItem","ReceiveCodeItem","FailCodeItem","RequestCreateCodeItem","ReceiveCreateCodeItem","codeItem","FailCreateCodeItem","UpdateListNode","UpdateParent","UpdateDescription","UpdateLongDescription","UpdateDisabled","UpdateUserGroups","userGroups","UpdateExcludedFields","excludedFields","UpdateCaseTypes","caseTypes","UpdateCodetableTypes","codetableTypes","UpdateCodeCategory","codeCategory","UpdateSequence","UpdateAdditionalField","additionalFieldId","RequestSaveCodetableItem","ReceiveSaveCodetableItem","FailSaveCodetableItem","CopyDescriptionToAllTranslations","CopyLongDescriptionToAllTranslations","UpdateValidation","ResetValidation","ResetDescriptionValidation","ResetLongDescriptionValidation","ResetAllDescriptionsValidation","ResetAllLongDescriptionsValidation","ClearValidation","SwitchTranslationsToggle","toggled","ClearCodetableOptions","INITIAL_CODETABLE_ITEM_STATE","fetchingCodeId","fetchingCreateOptions","savingCodetableItem","originalCodeItem","hasTranslationsToggled","excludeFields","itemReducer","FailMetadata","INITIAL_CODETABLE_METADATA_STATE","metadataReducer","INITIAL_CODETABLE_STATE","formName","RequestLoadDefaultValues","ReceiveLoadDefaultValues","FailLoadDefaultValues","RequestSaveDefaultValues","ReceiveSaveDefaultValues","FailDefaultValuesExecute","ClearDefaultValuesData","ProcessDefaultValuesFailed","RequestRole","ReceiveRole","FailRole","UpdateAccessData","accessItem","getUpdatedValidationMessages","clearValidation","INITIAL_USER_DEFAULT_VALUES_STATE","rolePanelAccess","accessData","fetchingLoadDefaultValues","fetchingSaveDefaultValues","RequestLoadUser","ReceiveLoadUser","FailLoadUser","RequestLoadUserAccess","ReceiveLoadUserAccess","accessPerson","FailLoadUserAccess","RequestAddUser","ReceiveAddUser","RequestUpdateUser","ReceiveUpdateUser","FailUserExecute","ClearUserData","RequestChangePersonId","ReceiveChangePersonId","personId","FailChangePersonId","RequestExtraInfo","ReceiveExtraInfo","FailExtraInfo","RequestPersonOptions","ReceivePersonOptions","FailPersonOptions","RequestRolePanelAccess","ReceiveRolePanelAccess","FailRolePanelAccess","RequestChangeDatabaseAccount","ReceiveChangeDatabaseAccount","FailChangeDatabaseAccount","INITIAL_ADMINISTRATION_STATE","extraInfoCodes","personOptionsCodes","fetchingLoadUser","fetchingSaveUser","fetchingDatabaseAccount","fetchingChangePersonId","mainUserGroup","currentUserGroup","userType","accessRole","simpleFormReducer","SearchArea","ClearList","RequestPersonAccess","ReceivePersonAccess","FailPersonAccess","ClearPersonAccess","RequestList","ReceiveList","total","FailList","RequestDelete","ReceiveDelete","FailDelete","RequestExportExcel","ReceiveExportExcel","FailExportExcel","UpdateSearchDefinition","predefined","UpdateFilterValues","UpdateFilterMenuValues","UpdateFilterValidation","filterValidation","ClearAllFilters","OpenCloseFilter","UpdateQueryValue","SetQueryValues","ClearQuery","INITIAL_ADMINISTRATION_LIST_STATE","itemPersonAccess","requestedSearchModel","searchDefinition","queryValues","filterValues","filterMenuValues","filterOpen","exportExcelFetching","existingValidation","RequestAddRole","ReceiveAddRole","RequestUpdateRole","ReceiveUpdateRole","FailRoleExecute","RequestRoleDelete","RequestLoadRole","ReceiveLoadRole","FailLoadRole","RequestLoadRoleAccess","ReceiveLoadRoleAccess","FailLoadRoleAccess","ProcessRoleFailed","ClearRoleData","INITIAL_ADMINISTRATION_ROLE_EDIT_STATE","fetchingLoadRole","fetchingSaveRole","FilterOptionType","RequestFilterDomains","ReceiveFilterDomains","UpdateFilters","ReceiveAdvancedSearchTypes","ReceiveAdvancedSearchOptions","SetFilterOpenState","SetFilterOption","filterOptionType","ClearFilterOptions","ClearAllFilterOptions","ClearAll","currentList","filterDomains","advancedSearchFields","advancedSearchTypes","reportData","selectedIndex","filtersBefore","modifiedFilter","MENU_OPTION","menuOptions","OPTION_TYPE","optionType","subOptionTypes","SUB_OPTION_TYPE","filtersAfter","RequestBowtie","ReceiveBowtie","caseDataModel","caseTemplate","FailBowtie","RequestDraft","ReceiveDraft","FailDraft","FailCase","CleanData","RequestConnectDraft","ReceiveConnectDraft","FailConnectDraft","INITIAL_BOWTIE_STATE","fetchingBowtie","fetchingDraft","connectingDraft","inspectionEvaluations","evaluationStatuses","RequestExecuteReport","RequestFailed","RequestNewFolder","ClearNewFolder","RequestReports","RequestFolderFavourite","ReceiveFolderFavourite","ClearFolderData","ReceiveReports","fetchingCreateFolder","folderDefinition","fetchingFolder","RequestExportStatus","ReceiveExportStatus","exportStatus","FailExportStatus","RequestDownloadCaseExportPackage","exportId","ReceiveDownloadCaseExportPackage","FailDownloadCaseExportPackage","INITIAL_EXPORTS_VIEW_STATE","exportsView","RequestReportStatus","ReceiveReportStatus","reportStatus","FailReportStatus","RequestDownloadReportPackage","ReceiveDownloadReportPackage","FailDownloadReportPackage","INITIAL_REPORTS_VIEW_STATE","reportsView","fetchingReportStatus","RequestExportCases","ReceiveExportCases","FailExportCases","exportsModal","INITIAL_EXPORTS_STATE","RequestDeleteConsent","ReceiveDeleteConsent","FailDeleteConsent","RequestVerifyCode","ReceiveVerifyCode","FailVerifyCode","RequestSaveSubscription","ReceiveSaveSubscription","FailSaveSubscription","RequestLoadPermission","ReceiveLoadPermission","FailLoadPermission","RequestLoadConsent","ReceiveLoadConsent","consent","FailLoadConsent","ProcessConsentFailed","ClearConsent","INITIAL_NOTIFICATIONS_STATE","fetchingLoadConsent","fetchingDeleteConsent","fetchingVerifyCode","fetchingSaveSubscription","fetchingLoadPermission","RequestImportList","ReceiveImportList","importList","FailImportList","RequestLoadEditImport","importCaseId","ReceiveLoadEditImport","importCase","FailLoadEditImport","RequestAddImport","ReceiveAddImport","FailAddImport","RequestUpdateImport","ReceiveUpdateImport","serializeData","FailUpdateImport","ClearEditImport","RequestRetryImport","ReceiveRetryImport","FailRetryImport","RequestDeleteImport","ReceiveDeleteImport","FailDeleteImport","ClearImportCase","fetchingImportList","fetchingAddImportCase","editedImportId","updatedImportCases","comments","RequestCodes","ReceiveCodes","INITIAL_REMOTE_DATA_STATE","queryParam","INITIAL_APP_STATE","fallbackLocale","NotAuthenticated","userProfileArea","reducersConfiguration","CaseReducers","SelectionReportReducers","AdministrationCodetableReducers","AdminSearchReducer","AdministrationEditReducers","AdministrationRoleEditReducers","allExportsReducers","exportToZipModal","reducersConfigurationDefault","configureStore","enabledMiddleware","thunkModule","draftActions","routerMiddleware","browserHistory","createStoreWithMiddleware","middlewares","devToolsExtension","addDevtoolsIfApplicable","applyMiddleware","composer","createStore","allReducers","keyedReducers","combineReducers","combineSliceAndGlobalReducers","routing","routerReducer","messageReducer","buildRootReducer","configureEnvironment","configureReactHotkeys","ignoreTags","useRouterHistory","basename","syncHistoryWithStore","connectHistoryToRouter","LangDir","dir","mapBowtieData","bowtieData","cases","layoutTypeAttributes","layoutTypeAttributesCaseType","BussinesType","getFirstFieldValue","mergeEvaluations","firstCollection","secondCollection","firstItem","secondItem","curentValue","getChecklistEvaluation","TblCheckList","TblChecklistBarrierInspView","inspection","noOfInspectionsField","CheckListBarrInspNoOfInspect","noOfInspections","evaluationField","CheckListBarrInspEvaluation","getChecklistItemEvaluation","getInspections","TblCheckListCategory","loadDraftConnectionOptions","generalCategory","addDraftConnection","removeDraftConnection","BowtieTooltipType","connectionData","clean","BowtieOverlay","flattenConnectedCases","connecteCase","subordinateCases","subordinateCase","connected","flattenAnchorRoots","roots","mapDraftConnection","TblConnectionTypes","TblTransConnected","conn","getConnectionsToCase","mapBowtieCaseConnection","otherConnections","bc","removeDuplicateFromDraft","bowtieConnections","draftCaseNo","casesNotFromDraft","createBowtieDataModel","caseNumbers","anchors","caseConnections","allConnections","draftConnection","existingIndex","mapConnectedCases","BowtieConnectionItem","connectCase","disconnectCase","Item","connectionItem","BowtieConnections","select_connection_type","connectionContainer","renderConnection","BowtieTooltipView","refCallback","bowtieTooltipBg","getRect","BowtieTooltip","parentRect","tooltipRect","maxWidth","maxHeight","fetchingEvaluation","getBound","renderCaseData","BowtieComponent","loadEvaluations","canvas","Canvas","showMeatball","hideTooltip","drawBowtie","resetZoom","dataModel","connectMode","draw","bowtie_connect_cases","addBowtieCanvas","connected_cases","inspection_evaluation","fetching_evaluation","no_evaluation_data","bodyParameters","queryParameters","captchaToken","withHeader","includeDraftData","isValidParent","parentConnection","CaseCreator","copyFrom","returnedCaseTypeId","returnedCaseContextId","newCaseSpecificTexts","case_confirmation_title","case_confirmation_description","case_confirmation_continue","case_confirmation_cancel","existingCaseSpecificTexts","connectedCaseOverrides","ConnectedCaseInfoModal","connectCaseDisplay","connectedCaseHeader","you_are_connecting_a_new_case","connectedCaseBg","createDraftDefinition","createSearchDefinition","saveFavouriteDefinition","loadFavouriteDefinition","downloadReport","multipleSuppliersUrl","createSortOrder","mappedNewSortOrder","shouldCreateDraftDefinition","isExternalLink","forceCreateDraft","loadReportCategory","loadSortOptions","updatedSortOptions","definitionPromise","routerActions","loadFavouriteDefinitionEmbedded","updateWorkingDefinition","displayExportToZip","translationDescription","newDefinition","selectedReport","successMessage","getMulitpleSuppliersUrl","getSearchRequiredUsers","caseListingTranslation","case_deleted_success","executeReport","FilterTypes","FilterDomains","ConnectionsOperatorTypes","filterDomainChildren","includedDomains","localRequestId","getUiDefinitions","compareUiDefinitionKey","uniqueIds","uiDefinitionsToGet","uiDefinitionKey","includedDomainsForCaseType","filteredDomainHierarchy","getRiskMatrixDefinitions","uniqueCaseTypes","newCaseTypes","apiResults","executeFavouriteDefinition","loadPermissions","toUiDefinitionParams","getCaseNumber","setRenderMode","ConditionValuesOperator","ConditionValuesDbFunction","ConditionValueTypes","FilterMenuOptionsTypes","FilterMenuOptions","OptionTypes","SubOptionTypes","ExactLevelTypes","postfixOperator","include","exclude","customFilterFieldPostfix","fixedPeriod","dateIntervalFrom","dateIntervalTo","decimalFrom","decimalTo","predefDate","notSpecified","storePostfix","userProfileProperties","caseTypeDomainId","validationTranslations","numberFieldOperators","mapToAdvancedSearchOptions","advancedSearchType","mapToSelectedOptions","formatters","SelectMultipleFlat","TextField","DateField","NumberField","DecimalNumber","MyUnit","MyLocation","Person","PredefFilters","selectedOptionsByFilterItem","filterList","valueFirst","valueSecond","descriptions","filterListItem","filters_checkbox_checked","filters_checkbox_unchecked","createDescription","titles","createTitle","excludedValues","Exclude","filter_summary_exclude","ExcludeSubLevels","filter_summary_exclude_sub","createExcludedValues","getSelectedOptionsIds","editingValues","filterDomainId","editingValue","createFilteredValues","ApiToUse","filtersTranslations","filters_predefined_filters","filters_predefined_date","filters_search_placeholder","filters_date_range_to","filters_date_range_from","filters_date_range_date_interval","filters_date_range_date_fixed_period","add_filters_button_title","add_filters_modal_add_button","add_filters_modal_title","remove_filter","filters_error_message","filters_exclude","filters_include","filter_menu_options_desc_exclude","filter_menu_options_desc_exclude_sub","filter_menu_option_include","filter_menu_option_exclude","filter_menu_option_include_sub","filter_menu_option_exclude_sub","filters_decimal_range","filters_my_unit","filters_my_location","filters_person","filters_specific_numbers_ranges_title","filters_specific_numbers_ranges_subtitle","filters_contains_word","filters_contains_word_exact","filters_specified_period","filters_not_specified_title","filters_not_specified_subtitle","filters_must_be_withing_range","disclaimer_message","clear_filters","filterDomainIds","SerializeType","PRIMITIVE_VALUE","V_VALUE","MULTIPLE_V_VALUES","VALUE_PAIRS","ValidationType","apiToUse","ADMINAPI","normalizeValue","getNormalized","requiredValidation","equalsValidation","otherFields","otherField","validatePhoneNumber","rule","convertion","Required","Email","Equals","Unique","uniqueValidation","nullConvertion","convertToValidationRule","validationProp","FIELD_TYPE","complexResponseWithFilteredOutZero","simpleResponse","insertValueToStore","insertComponentDataToStore","clearValueInStore","clearAllValues","resetChangesListener","configurationObject","validationRules","validationClear","selectSingleHierarchyCreator","fieldMethods","fieldState","buildLabel","getValidation","getProperty","select_one_option","optionsEndpoint","createRefToScrollableComponent","isFetching","selectSingleCreator","selectMultipleCreator","selectMultipleHierarchyCreator","dateTimeCreator","textareaCreator","checkboxListCreator","fieldData","staticOptions","CHECKBOX_LIST","CHECKBOX","passwordCreator","checkboxCreator","decimalNumberCreator","simpleFieldForPath","SimpleField","refName","displayNotSelectedOption","API","isFocusedAndFetchingDidntStartYet","refsToScrollableComponent","typeMaps","TEXTAREA","SELECT_SINGLE_HIERARCHY","SELECT_SINGLE","SELECT_MULTIPLE","SELECT_MULTIPLE_HIERARCHY","DATE_TIME","PASSWORD","DECIMAL_NUMBER","loadOptionsForEndpoint","prevSerialize","prevValidation","updateComponent","buildField","serializeMapping","valueKey","defaultSerializeMappings","storeValue","currentWireOutput","allValues","groupValue","groupField","groupKey","ownProps","createActions","withSimpleForm","formValues","DisplaySelectedOptions","isExpanded","isOverflowing","overflowHeight","valueWithAdditionalInformation","additionalInformation","optionItemValue","setExcludedOptionValue","filtersSelected","setOptionItemValue","listRef","collapseButton","toggleExpand","ieMaxWidthFix","shouldCollapse","renderOptionItem","shadowBox","loadFilters","loadDefaultPredefDate","loadAdvancedSearchTypes","loadAdvancedSearchFields","loadAdvancedSearchFieldsSearch","valuesSelector","updateFilters","predefDateDefaultValue","defaultPredefDate","filterDomain","reportTypeDescription","filtersState","optionsIds","setFilterOpenState","setFilterOption","clearFilterOptions","clearAllFilterOptions","clearValues","clearAll","createFilterMenuOptions","allDefaultOptions","Clear","Include","allSubLevelOptions","IncludeSubLevels","PredefDate","FilterPanel","animationPlayed","onFilterMenuOption","MainLevel","SubLevel","filterMeatballMenu","hasPermission","handleInclude","hasEmptyMenuOptionsType","handleExclude","handleIncludeSublevels","handleExcludeSublevels","filterPanel","isOpenStyles","isClosed","newlyAdded","renderMenuOptions","FilterError","uiFilterError","filterConfiguration","FilterCodeHierarchy","SimpleForm","simpleFormComponent","trimValue","conditionValue","getFavouriteConditionValue","newConditionValue","advancedField","myValue","periodPredef","valueOperator","dbFunctionValue","createConditionValue","createAdvancedField","conditionOperator2","exactLevel","createFavouriteCondition","condValues","originalCondition","domainDbFunction","dbFunctionDomain","valueListOperator","conditionOperator","getConditionForOperator","selectMultipleHierarchyConfiguration","createInitialDefaultValue","favouriteConditionValue","conditionValues","FilterCheckbox","checkboxConfiguration","FilterDateRange","onFilterOptionType","NotSpecified","SpecificPeriodRange","fixedPeriodValue","FixedPeriod","handleOptionChange","specificPeriodValue","dateGroup","renderFixedPeriod","renderSpecificPeriod","renderNotSpecified","createDateFieldCondition","dateFieldConfiguration","FilterDecimal","SpecificNumbersOrRanges","renderDecimalNumbers","decimalNumberConfiguration","FilterCode","selectMultipleConfiguration","FilterDomain","optionPropertyName","getOptionPropertyName","optionPropertyTitle","getOptionPropertyTitle","createOptionPropertyValue","createOptionProperty","useProfileValue","userProfileConditionMapper","filterType","getConditionTypesValueData","myValueFilter","myValueSelector","maxId","getDefaultConditionTypesValueData","myLocationConfiguration","myPersonConfiguration","myUnitConfiguration","FilterNumber","renderSpecificNumbersOrRanges","createNumberFieldCondition","trimmedValue","splitedValues","setNumberSingleValue","numberValues","numberSingle","numberSingleLargerOrEqual","numberSingleLess","rangeValues","number2","numberRange","setNumberRangeValues","setNumberValue","numberValue","getOptionTypeValue","initialOptionType","numberFieldConfiguration","createNumberData","conditionValueType","largerOrEqual","dbFunctionValue2","lessOrEqual","valueOperator2","valueOperator3","dbFunctionValue3","createFieldOptionType","empty","FilterPredefinedDate","filters_date_placeholder","predefinedDateConfiguration","FilterPredefinedFilters","predefinedFiltersConfiguration","FilterText","selectedSubOptions","getSelectedSubOptions","selectedSubOption","newSubTypes","MatchExact","handleSubOptionChange","ContainsWords","renderMatchExact","setDefaultSubOptionType","renderContainsWords","getTextFieldConditionTypesValueData","conditionValueSubType","mappedConditionTypes","matchExact","createConditionOptionTypeValue","mapped","createConditionSubOptionTypeValue","initialSubOptionType","getSubOptionTypeValue","subOptionType","textFieldConfiguration","FilterCodeFlat","condValIndex","originalFromCondition","valueFrom","conditionFrom","originalToCondition","valueTo","conditionTo","originalFixedCondition","less","numberData","conditionValuesOperators","equal","between","or","optionTypeOperator","optionTypeValue","conditionOptionTypeValue","conditionSubOptionTypeValue","subOptionTypeValue","isMatchExactOperator","isMatchExactDbFunction","upper","createSubOptionTypeValue","filterConfigurations","createFilterConfigurations","getFilterSelectedOptionsLength","hasValue","AddFiltersButton","addFiltersButton","AddFiltersSelect","onLoadAdvancedSearchFields","AddFilters","onAddNewFilters","clearValueItems","handleAddValueItems","onFiltersListChange","renderFiltersModal","matchNumberAndSeparators","numberFieldValidation","predefDateFieldValidation","createFilterValidation","FiltersPanel","validationConfig","filtersDefinition","FilterComponent","filteredValues","setOpenState","getCaseTypeSelectedOptionsIds","hasChangesEditingValues","hasChangesValidations","colClasses","cols","colContainer","col","onAdvancedSearchFields","onAddFilters","renderDomainFilters","filtersPanel","createRows","mapConnections","mapInitialConditionsValues","mapInitialConditions","mapOptionType","createRangeConditions","remainingConditions","secondConditionOperator","additionalCondition","groupedConditions","cond","domexactLevelain","createMyValueConditions","groupConditions","isRangeCondition","isMyValueCondition","filtersIdCounter","initialFilter","mapMenuOptions","updateFilterConditions","templateConditions","filterMapping","orderedFilters","FiltersContainerComponent","newFilters","mapToFilter","predefinedLabel","predefinedFilter","emptyFilters","condidtionFilters","placeholderIndex","createFiltersDefinition","updateDefinition","templateConnections","predefinedFilterId","predefinedFilterInclude","predefinedFilterExclude","editingValuesInclude","editingValuesExclude","includeValues","excludeValues","informationPanel","onRemoveFilters","FiltersDrawerContainerComponent","dropdownOptions","existinOptionItem","localeCompare","mapToDisplaySelectedOptions","valueKeys","mapToFilterList","summary","hideDisclaimerMessage","filterCountInidicator","savedReportTranslation","create_folder_button","create_folder_link","create_report_input_placeholder","search_placeholder","link_to_report","share_with","user_group","report_title","succes_message_report","succes_message_folder","validation_error","must_be_filled","link_copy_success","link_copy_fail","copy_to_clipboard","saved_reports_title","back","move_report","move_folder","remove_report","confirm_remove","success_remove_report","remove_folder","confirm_remove_folder","update_report_button","edit_report","shared_report","shared_report_group","update_report_are_you_sure","update_report_other_users","update_report_not_undone","success_report_updated","edit_folder","folder_title","save_folder","shared_folder_group","shared_folder_user","folder_updated","update_owners","share_contents","copy_sharing","form","create_folder_input","formFolder","updateOwner","updateSharing","saveReport","saveFolder","updateFolder","folderId","removeReport","moveReport","loadOwnerOptions","loadUsersOptions","loadUserGroupsOptions","loadFolderOptions","loadSavedReports","unshare","SavedReportsTypes","mapCreateReport","serializedFormData","updateExisting","UpdateExistingValidFavourite","sharedUsers","sharedUserGroups","mapUpdateFolder","parentFolder","updateOwnerForAllDescendants","updateShareInformationForAllDescendants","ensureEmptyFoldersHaveChildrenProp","FOLDER","redirectId","savedReportState","saveFolderFavourite","loadFolderData","favouriteApi","clearFolderData","copySharingInformation","sharedWithUserGroups","sharedWithUsers","copyLinkNotification","isSuccess","CreateFolder","selectedFolder","onToggle","onCreate","loader","shouldClear","CopyLink","notification","copyStatus","generateCopyLink","appUrl","CreateReportComponent","confirmSave","originalFavouritId","updateReport","closeReportCreator","copyFolderSharing","createFolder","parentFavourite","onCopySharing","validFavourite","confirmSaveMessage","originalId","spacing","createReport","renderFields","onCancelUpdate","footer","onGetUpdateConfirmation","MainGridContainer","wide","FavouriteLayout","isCreateReportOpen","updateExistingReport","initiallyOpenFilters","searchResults","drawerWithBar","updateDefinitionWithReport","CaseListingTileComponent","handleEditCase","handleDuplicateCase","handleDeleteCase","handleBowtie","handleLoadPermissions","buildProps","caseListingTile","renderContent","canFetchMoreData","thereAreMoreResults","CaseListingContainer","execute","autoExecute","clearPreviousResult","debouncedExecute","cachedUiDefinition","uiToggleInfo","subTitle","warningInfo","warningMsg","warningDescription","requestedRenderMode","windowAsScrollableAncestor","canFetchMore","noResults","renderCaseListingTile","fetchMoreData","scrollableAncestor","bottomOffset","uiSearchLoader","reportStyleClass","hasExecuteFailedErrors","resultOrInfo","renderFailExecuteInformation","renderResultList","renderInformation","resultCount","uiSearchHits","hits","toggleAutoExecution","EmbeddedCaseListingComponent","loadDefinition","clearData","embeddedCaseListing","spacer","renderCasesResult","favouriteActionCreators","DraftComponent","draftProps","shouldConfirmWarnings","warning_dialog_title","warning_dialog_description","warning_dialog_submit","warning_dialog_cancel","EmbeddedCaseListing","case_saving","draft_saving","draft_not_changed","unsaved_changes","really_exit","duplicateCase","caseIdToDuplicate","CaseDuplicate","editCase","Editor","PresentationType","ColumnType","Period","dashboardTranslation","dashboard_not_render_description","favourite_no_layout_model","favourite_not_render","chartType","COLUMN","PIE","LINE","BAR","HEATMAP","stackingOptions","AggregationType","FavouriteDataAdapter","aggrRollAvgColIndex","targetColIndex","layoutConfig","noValueText","setupForDataModel","fallbackNumberFormatter","buildNumberFormatter","extremes","checkColumnType","columnMetaData","prepareColumns","uomDomain","aggrColIndex","uomColIndex","colValue","aggrSequence","hasSequence","hasIcon","bgColour","hasBgColour","fgColour","hasFgColour","colCategories","extreme","dataType","columnCategories","columnExtremes","tableIndexes","columnType","selection","compactColumnIndex","indexesToCompare","colExtremes","isAggrTargetOrRollAvg","isAggrColumn","selectionCount","numberOfDecimals","selectionType","buildDateFormatter","aggregationType","aggregationRollAvg","aggregation","dateFormatOptions","buildDateFormatOptionsFromPeriod","Quarter","quarter","useDigitGrouping","minimumFractionDigits","Month","Day","week","Week","Weekday","axisColIndex","colIndex","columnIndex","DrillDownHandler","drillDown","favouriteDataAdapter","rowIndex","skipColumns","aggrColumn","outputReport","getOutputReport","aggrValue","getAggregateValue","modelBuilder","DrillDownModelBuilder","withAggregationFilter","withFilter","Minimum","Maximum","selectedRow","aggregationColumn","aggregationValue","aggregationDomain","columnValue","validateSelectionColumn","flgExactCodeCondition","FavouriteModelComponent","errorHandler","caseview","dataAdapter","drillDownHandler","LayoutConfig","layoutAttributes","DotObject","ifMissing","Text","RowCount","HideRowCount","Filter","HideFilter","drillDownSetting","ChartLayoutConfig","HighchartsStyle","setTickInterval","compareRowValues","seqA","seqB","Collator","compare","wrapText","chartConfig","lengthSetting","truncSetting","brk","wordwrapConfig","chartStyle","cut","truncLimit","wordwrap","escapeHtml","entityMap","createDefaultChartExportOptions","isExportEnabled","addExportOptions","highchartsOptions","libUrl","afterPrint","classList","exportFailedMessage","chartH","chartAnim","imgMenus","imgMenuItem","mimeType","DefaultChartLayoutOptionsBuilder","setColors","setExport","miscOptions","exportOptions","createChartLayoutOptionsBuilder","ChartSeriesDataOptionsBuilder","seriesCol","seriesValues","seriesNamePrefix","appendSeriesValues","typeStr","dashStyle","seriesObject","makeSeriesName","addSeriesDrillDownHandler","addSpecialSeriesConfig","synDataRowIndex","HighchartsSeries","ind","seriesIndex","ChartPointDataOptionsBuilder","seriesDataOptionsBuilder","splitCol","seriesTypeBaseIndex","columnMap","ignoreNullValues","ignoreNullValuesForDataPoints","createDataPoint","hasRollingAverage","rollingAverageSeries","hasTarget","targetSeries","dataArray","dataPoint","colType","rowVal","hasCategories","cat","shouldAddColorToDataPoint","shouldAdjustDataPointLabelColor","addStaticDataPointProperties","DefaultChartDataOptionsBuilder","dataOptions","pointDataOptionsBuilder","columnMappings","createColumnMap","minTargetCol","maxTargetCol","hasBgColors","hasIcons","useHtml","emptyPlaceholder","overrideColor","DEFAULT_ICON_DIMENSIONS","seriesTypeMappings","mainSeries","columnList","selColName","splitRow","colIndexOf","prepareSeries","createDataPoints","sortData","removeEmptyData","setHeight","legendTitleHandler","getColumnTitle","useLegendTitle","titleText","legendTitle","titleMargin","currentY","fontWeight","itemStyle","labelFormatter","getExtraGraphHeight","graphTitle","iconHtml","createIconOrColourDiv","addSpanWrapper","isLegendEnabled","addLegend","addTooltipOptions","addSeriesToColumnMap","createSeriesOptions","typeName","axisList","axisName","createFakeAxisHandler","axisObj","createAxis","maxTicks","ceiling","tickInterval","tickmarkPlacement","getAxisMin","getAxisMax","minTickInterval","allowDecimals","catIndex","extraHtml","createAxisHandler","crosshairs","tooltipFormat","sender","seriesColumn","tooltipBold","currentCat","formatColumn","columnCat","createDefaultChartDataOptionsBuilder","seriesOptionsBuilder","pointOptionsBuilder","getNumberOfRows","axisColumn","numberOfCategories","rowsWithValues","firstRowValue","lastRowValue","plotOptions","bar","stacking","BarChartDataOptionsBuilder","sel1","sel2","sel3","chartDataOptionsBuilder","chartDataOptions","getStackingOptionValue","stackingOption","categorySum","rowHeight","allowedNumberOfRows","xColumnIndex","PieChartDataOptionsBuilder","defineAggregationValueFormatter","pie","percentageFormatter","labelValue","percentage","xColIndex","partial","catName","xColInner","Value","xCol","LineAndColumnChartDataOptionsBuilder","HeatmapChartDataOptionsBuilder","axisType","tickPositioner","positions","tick","useDataPointColors","hasYAxis","yCol","createFakeAxis","yColumnIndex","FavouriteDataOptions","setting","colTitles","columnTitles","columnTitleSetting","selectionTypes","disableColumnTitle","shortText","showLongColumnDescription","extraText","showExtraColumnText","rollingAverageText","targetText","highchartsExporting","highchartsOfflineExporting","ChartFavouriteModelComponent","chartLayoutOptionsBuilder","sharedHighchartsOptions","mergeStaticConfig","createChart","showLoading","addLoadingOnDrillDown","createChartDataOptionsBuilder","splitRows","hideLoading","originalDrillDownFunction","onDrillDownToCaseListing","drillDownFunction","splitOrSeriesCategories","createReactChartFavouriteModelComponent","createChartFavouriteModelComponent","ChartFavourite","isRiskMatrix","getChartTypeFromConfig","requestCustomWidth","graph","containerWidth","containerHeight","factor","removeAttribute","setChartElement","prepareModel","isChartTypeSupported","receiveData","expandWidth","fixSizeInPrint","cleanupAfterPrint","dirty","receiveLayout","CountableAggregationTypes","Count","Total","DaysSinceLast","DaysSinceFirst","textMappings","configMappings","TableFavouriteModelComponent","noExp","noTar","TileField","tileValue","tileWithDrilldown","tileNoDrilldown","tileColorbox","bgColourDark","tileDarkBackground","tileLabel","createOnClickHandler","aggregatedColumnIndex","createUrl","mapCell","isAggregationColumn","unitOfMeasureColumnIndex","cellValue","renderAggregatedText","textValue","titleAttributeValue","titleTooltip","getTooltip","getHeaderTitle","aggregatedValue","shouldDisplayTotal","aggrType","mapAggregateValues","mapSubvalue","subValue","currentRow","calculateSubtotal","mapRollingAverage","mapTarget","groupRowsForCompactView","selectionDataColumns","previousRow","mapToRows","compactView","aggregateColumnIndex","rollingAvarageColumnIndex","targetColumnIndex","renderInCompactMode","aggregateValue","rollingAvarage","selectionValues","mapRow","configFactory","attributesReader","reader","suppressRepeatingRows","hideAggrColumns","hideHeader","hideTotals","wideLayout","tileConfig","tableConfig","Table","TileViewFavourite","getFooterColumnTextAndValue","totalLabel","totalValue","tileWide","tileNarrow","renderSubvalue","tileFields","renderRegularField","renderAggregateArea","tileFieldWide","smallFontSize","tileAggregationValue","aggregateField","renderTotal","tileAreaWide","tileAreaNarrow","renderTile","renderCell","cellClassName","iconColumn","valueClassName","drillDownCol","colorBox","renderAggregateCell","aggregateCell","boxContainer","TableViewFavourite","pc","pi","toCaseListingWithAllCases","hideAggregateColumns","renderTableHeader","renderTableBody","footerRowStyle","footerRow","colSpan","totalText","renderTableFooter","footerClickHandler","isPresentationTypeSupported","presentationType","createFavouriteComponent","wrapperClassName","contentHeightStyle","getComponent","noRows","getFavouriteLayoutAttributes","layoutTypeContext","getSelectedReport","getLayoutAttributes","layoutTypeId","layoutAttributeExist","FavouriteComponent","shouldLoadDataModel","loadFavouriteDataModel","dashboardModelFavourite","shouldReloadDataModel","widthPercent","containerStyle","createStyleFromDashboardModel","favouriteContent","layoutModel","favouriteContainer","flexBasis","favouriteProps","favouriteLayoutAttributes","fallbackContent","dashFav","favId","stateObj","mainFavouriteWorkingDefinition","DashboardAccessType","DashboardLayout","layoutRef","calculateWidths","dashboardFavourites","customWidths","dataset","ordered","rowList","minWidth","rowWidth","correctedItems","flatList","remain","favouritesLayoutExpander","favouritesLayout","fav","renderFavouriteContainer","favouriteModel","executeFavourite","dashboardId","connectedFavourite","dashboardLayoutDefinition","layoutTypeContextId","createMainFavourite","updateMainDefinition","loadMainFavourite","readonlyDashboard","mainFavouriteDefinition","queryWithoutFav","loadContainerFavourites","typeDefinition","df","mainFavouriteRequestId","stateBeforeFetch","stateAfterFetch","drillDownToCaseListing","updateMainFavourite","clearMainFavourite","DashboardComponent","containerDefinition","updatedDefinition","debounceExecute","updateDashboards","mainFavouriteReadonly","shouldLoadMainFavourite","shouldLoadContainerFavourites","containerLayout","isValidDashboardType","showDescription","hideFilters","renderDescription","favouritesWrapper","hideDisclaimer","OpenDashboard","handleUpdateDefinition","headerContainer","onPrint","reportTranslation","report_subtitle","generate_title","generate_button","must_be_filled_out","report_generated","report_not_generated","report_started","report_success","generateFavourite","reportFavouriteOptions","favDef","reportTypeId","notModifiedReport","modifiedReport","emailSubscribers","loadFavouriteDefinitionTemplate","loadMetadata","sendReport","loadUsePredefDate","reportState","favouriteTemplate","setEmail","clearForm","updateFiltersDefinition","validateReportFilters","ResizeWrapper","windowWidth","innerWidth","createReportDefinition","ReportComponent","predefinedTitle","predefinedFilterValues","predefinedFilterValue","modifiedDefinition","currentListFilteredOnUsingPredefDate","cl","subtitle","emailReport","cannotSaveReport","onChangeEmail","sendReportSection","generateButton","generateReportSection","downloadReportWrapper","reportPanel","eMailReport","OpenCaseNumber","textCaseNo","expandInputField","setCaseNumber","onOpenCase","inputSection","expand","btnOpenCase","RX_REPLACELINK","NewCaseBanner","textHeader","textBtnRegisterNewCase","textOpenCaseHeader","textOpenCaseDescription","newCaseBanner","newCasePanel","newCaseContainer","inputToBottom","btnRegisterNewCase","caseNumberTitle","StartupComponent","new_case_header","new_case_description","new_case_register","open_case_header","open_case_description","open_case_case_no","startupDashboardTypeId","startupDashboardId","Timer","importTranslations","import_number_of_errors","import_show_details","import_hide_details","import_status_successful","import_status_failed","import_status_pending","import_status","import_no_of_cases","import_no_of_ok_cases","import_no_of_failed_cases","import_date","import_load_date","import_file_name","import_cancel","import_submit","import_file_description","import_choose_file","import_set","import_file_to_synergi_life","import_add_to_import","import_retry","import_delete","import_delete_title","import_delete_desc","import_delete_success","import_edit_title","import_search_placeholder","import_success","import_retry_success","import_update_success","import_details_error","import_details_case_number","import_details_db","import_modal_wait","import_modal_done","no_imports","importset","loadImportList","loadEditImport","importFileId","retryImport","updateImport","importCaseUpdateData","deleteImport","importFile","ImportFileStatus","clearEditImport","saveImport","importFormData","importSet","clearImportCase","ImportContextMenu","importStatus","handleRetry","canEdit","failed","ImportDetailView","importTranses","importErrors","importDetailsTile","detailsTileFooter","importTransId","importDatabaseId","ImportExpandDetailsButton","ImportViewItem","parsedDate","pending","completed","createdAtUtc","modifiedAtUtc","transCount","transCountOk","transCountError","fetchingItem","importItemStatus","getStatusClass","getStatusText","retryButton","FaRepeat","tileDataZone","tileData","dateFormatter","canEditItem","renderBody","importDetailView","ImportAddCaseComponent","importFileWrapper","ImportEditCaseComponent","ImportViewComponent","showImportAddCase","handleShowEditImportCase","handleCloseEditModal","pendingApiOperations","displayImportList","renderImportList","importContainer","tileSection","handleAddFile","renderImportAddModal","renderImportEditModal","Dialog","baseView","LoginProgressComponent","fadeInUp","loginProgressDialogTitle","loginProgressTitle","LoginFailedComponent","errorIcon","loginFailTitle","loginFailBody","onClickTryAgain","FaRefresh","loginFailRefresh","LogoutComponent","successIcon","logoutTitle","onClickLogIn","logoutButton","onClickLogInAsDifferentUser","logoutButtonDifferentUser","AuthViewComponent","DevErrorPanel","allErrors","isJsError","toggleIn","userSettingsTranslations","profile_saved","sub_title","main_title","usergroup","must_be_equal","cancel_changes","undo_all","go_back_to_profile","are_you_sure","old_password","change_password","new_password","repeat_new_password","change","password_changed","info_text_location","info_text_unit","edit_veracity_profile","validationFromServer","serverErrors","complexValidationFromServer","saveSettings","profileData","passwordData","simpleFormActionCreators","simpleFormActions","saveChanges","ChangePassword","changePasswordValidationConfig","exportToZipTranslations","export_modal_cancel","export_modal_status_started","export_modal_status_pending","export_modal_submit","export_modal_comment","export_modal_description_1","export_modal_description_2","export_modal_title","export_modal_wait","export_success","exportCases","serializedData","favoruriteDefinition","ExportToZipModalComponent","RegenerateAggregatedEnvModal","regenerateAggregatedModal","regenerateAggregatedModalBody","regenerateAggregatedModalFooter","RegenerateAggregatedRiskModal","ModalRegistry","aboutModal","aboutModalBody","versionInfo","modalSubtext","aboutModalFooter","ChangePasswordModal","ExportToZipModal","ModalHost","otherProps","Instance","NotificationToast","textDecoration","Notifications","showNotificationChannelsInfo","shouldLoadConsents","showPanel","SupportLink","shouldRenderLink","showFooter","shouldRenderLinks","onAboutModal","isAuthenticated","routesWithNoFooterLinks","routesWithNoFooter","urlToSurveyManager","haveSomeItems","menuAccess","DropDownButton","hasMaxWidth","navItemIcon","navItemText","navItem","AuthorizedUserProfileItems","Settings","manageSurveys","AuthorizedToolsItems","onRefreshCache","onRegenerateAggregatedEnv","onRegenerateAggregatedRisk","userAdministration","roleAdministration","imports","regenerateAggregateTables","Tools","dropdownLi","MdBuild","MdUser","AddNewCase","btnNewCase","AuthorizedMenuItems","MdTrendingUp","DesktopNav","itemsContainer","desktopNav","MobileNav","closeMenu","mobileNav","hamburger","closeBtn","dropdownList","dropdownButton","dropdownLabel","down","up","subMenu","HeaderComponent","fix","navbarWrapper","brand","userInfoNotLoaded","VisibilityState","MessageToUserComponent","messageStatus","messageId","messageText","messageSubject","messageDate","textMarkAsRead","textMarkAsUnread","dateLabel","textMessageStatus","statusStyle","updatingStyle","MessagesToUserComponent","visibilityState","onGetMessages","showUnreadMessagesOnly","showNoItemsMessage","messageComponents","subject","wrapInMainGrid","unreadContainer","MessagesToUserUnread","LayoutComponent","localStorage","groupEnd","hideUserMessages","exportAndImport","showBanner","LayoutContainer","ItemTypes","DragTag","setAnimationPlayed","activeClassName","dragndropTagActive","dragndropTag","dragSymbol","addRemoveIcon","DragNDropContextComponent","AGREGATION_FIELD","GROUPBY_FIELD","DragNDropContext","DragDropContext","MultiBackend","HTML5toTouch","getAggregationState","aggregationFunction","createAggregateField","selectedInitialFunction","addToDefaultFields","fieldItems","setInitialData","setAggregateField","loadAggregateFunctionOptions","codetables","setAggregationFunction","loadAggregateDefaultFields","loadAggregateFields","updateDefaultAggregateFields","DropdownMenuItem","ExpandableBox","contentMessage","expandedChildren","showContent","expandableBox","hideBottomBorder","renderMenuItem","expandButton","MdExpandMore","mapToMenuItem","DropdownField","dropdownField","AggregationField","textRemove","textHowToAggregate","menuItemsForAggregation","dropPanelForItemType","itemType","DropTarget","drop","monitor","connectDropTarget","dropTarget","isOver","canDrop","dragPanelForItemType","DragPanelComponent","connectDragSource","DragSource","beginDrag","dragSource","isDragging","ButtonSelectMultipleDialogComponent","handleOnDone","textConfirm","handleOpenDialog","textButtonAdd","renderDialog","ButtonSelectMultipleDialog","DropArea","dragndropArea","dragToBox","withCachedTranslation","AggregateDropPanel","AggregateDragField","AggregationPanel","fieldItem","onSelectAggregationField","removedRedundandItems","onUpdateDefaultAggregateFields","onLoadAggregateFields","selectedFieldValue","dragTagContainer","dragTag","handleOnSelect","dropBox","onSelectAggregationFunction","orderNumber","updateSelectedReport","fieldsToUpdate","transformSelectedReport","existingTransform","reportFieldsToUpdate","newDef","updateAggregation","updatedReportFields","AggregationContainerComponent","containerFor","getGroupByState","rollingAverage","setLevelAccToCond","selectedCode","fillEmpty","selectionItems","setSelections","loadGroupByDefaultFields","updateDefaultGroupByFields","loadGroupBySortOrderType","loadGroupByFields","loadGroupBySelections","updatedSelectedField","loadGroupBySelection","textAdjustToFilters","fieldToUpdate","showMissingValues","modifyGroupBySelections","fieldsMap","canMoveUp","moveFieldUp","indexOfItem","moveField","canMoveDown","moveFieldDown","modifiedLGroupByFields","updatedItem","sourceId","newIndex","sourceField","nextField","nextItem","modifiedFields","ActualValue","selectionField","selectionItem","validated","handleInputOnChange","selectedoption","stringValue","textInputId","inputDescription","inputRow","handleChangeRollingAverage","aria-describedby","isFirstSelection","selectedPeriodOption","periodOptions","onSelectPeriod","hasMoreFields","renderRollingAverage","AggregateValue","selectedLevelOption","AggregateCategory","existingCategory","selectedLevel","onSelectLevel","selectedCategory","getCategoryOrDefault","toLocaleLowerCase","aggregateCategory","categoryList","handleLoadOptions","selectionTypeConfiguration","NotSelected","GroupBySort","sortItem","isSingleElement","sortItems","handleSortOrderChange","sortArea","SelectionsField","onModifyGroupBySelections","indexOfModifiedItem","onChangeSelectionField","SelectionTypeComponent","onChangeSelectionType","handleOnLoadMenuItems","renderSelection","SortItemComponent","isHover","GROUPBY_SORT","findField","overId","shallow","SortItem","GroupByDropPanel","GroupByDragField","GroupByPanel","maxSelectionCriteria","addingAvailable","onSelectGroupBy","modifiedItem","onUpdateDefaultGroupByFields","droppedId","destinationId","updatedFields","onLoadGroupByFields","onSelectGroupBySingle","onRemoveSelectionsField","findFieldIndex","updateGroupBy","returnedReport","aggregateValueSelection","aggregateCategorySelection","mapToSelectionDefinition","firstSelection","getRollingAverage","GroupByContainerComponent","lt","targetState","targetApp","fieldDoesntExistInDefaults","getAggregationTypeId","clearValue","onSelectField","loadDefaultFields","aggregationTypeId","loadTargetDefaultFields","loadFields","loadTargetFields","updateDefaultFields","updateTarget","TargetField","TargetDropPanel","TARGET_FIELD","TargetDragField","TargetPanel","onUpdateDefaultFields","onLoadFields","TargetContainerComponent","getLayoutType","fetchingStart","fetchingEnd","setInitialLayoutType","listOfActions","loadLayoutTypes","setLayoutType","favouriteNotValid","reportLayout","LayoutAttributes","ChooseChartType","amount","amountOfSelectionCriterias","onSetLayoutType","chartOption","tooltipMessage","chartSelector","renderLayoutTypeBlock","tileOptions","fieldLabels","quantities","totals","tileAttributeMappings","tableOptions","tableAttributeMappings","heatmapOptions","yAxisLabelsEnabled","xAxisLabelsEnabled","heatmapAttributeMappings","mapLayoutAttributesToOptions","allOptions","mapOptionsToLayoutAttributes","LayoutAttributesSelector","attributesMapping","newValueItems","translatedOptions","AttributesPicker","onAttributeChange","ReportArea","ErrorBoundaries","SelectionReportContainer","amountOfSelectionCriteria","tableWrapper","updateFavouriteLayoutAttributes","at","SelectionReportContainerComponent","debounceUpdateDefinition","isSelectionReportOptionsChanged","updateLayoutType","isExecutedByExternalChange","showResult","chartContainer","updateLayoutAttributes","caseTypeIds","caseTypeCondition","aggregationId","selectionAggrType","aggregationActionCreators","aggregationActionCreatorsFor","groupByActionCreators","groupByActionCreatorsFor","targetActionCreators","targetActionCreatorsFor","chartActionCreators","chartActionCreatorsFor","selectionActionCreators","loadInitialData","updateTargetDefaultFields","aggregationFieldChanged","prevAggregateFieldState","prevSelectedField","getAggregationSelectedOption","getGroupBySelectedOption","getSelectionTypeDesc","getDistributionSelectedOption","forEvery","percentIncrese","getTargetSelectedOption","selctedField","ReportSelectedOptions","distribution","groupBy","optionItems","selectedOptionsByReportValues","AggregationContainer","AggregationContainerForApi","GroupByContainer","GroupByContainerForApi","TargetContainer","TargetContainerForApi","ChartContainer","ChartContainerForApi","selectionReportDefinition","disabledTarget","panels","additionalAggregateDefinitionUpdate","selectionReportView","loadDistributionDefaultFields","loadDistributionFields","applicaitonId","exposureApplication","exposureFactor","exposurePercent","fetchDefaults","exposureFactorDefault","exposreFactorIncreaseDefault","updateSelectedField","updateDefaultDistributionFields","DistributionField","onUpdateField","handleChangeForEvery","handleChangePercentIncrease","DistributionDropPanel","DISTRIBUTION_FIELD","DistributionDragField","DistributionPanel","updateDistribution","DistributionContainerComponent","distributionActionCreators","distributionActionCreatorsFor","shouldLoadDefaultFields","frequencyActionCreators","updateGroupByDefaultFields","DistributionContainer","DistributionContainerForApi","arraysAreEqual","array1","array2","FrequencyReportContainerComponent","distributionSelectedField","prevDistributionSelectedField","prevSelectedAggregateField","prevWorkingDefinition","defaultGroupByFieldShouldBeUpdated","disabledGroupBy","additionalDistributionDefinitionUpdate","renderers","frequencyReport","FrequencyReportContainer","mergedReport","FavouriteResult","urlToExcel","serverUrl","searchId","ExcelLink","handleExcel","ExcelLinks","excelAddIn","FavouriteContextItem","FavouriteContextMenu","meatball","fetchMultipleSuppliersUrl","onCreateReport","showUpdate","onUpdateReport","export","onDownloadReport","DisplayOptionsLink","DisplayOptions","sortOrder","updateSortOptions","viewAs","outerLabel","updateQueryCondition","originalConditions","forceExists","updateDefinitionWithQuery","updateDefinitionWithSort","getFavouriteDefinitionData","getRawValue","getConditionData","getConnectionData","getReportData","uomSetDomain","getSelectionData","excludedOptions","extraSqlCondition","getConditionValueData","searchQuery","searchQueryTemp","currentDefinition","definitionB","dataA","dataB","searchTransform","editFavourite","modifier","initiallyOpenFilter","isDefinitionChanged","setSearchQuery","searchQueryDomainCondition","returnSearchQuery","searchField","uiDisplayOptions","favouriteOwnerId","onCloseReport","searchHeader","renderSearch","queryFilters","userPredefinedFilters","filterId","fieldType","commonTranslations","delete_user","delete_user_desc","user_successfully_deleted","delete_role","delete_role_desc","role_successfully_deleted","duplicate_user","email_address","user_id","disabled_date","change_password_button","user_type","main_user_group","current_user_group","default_language","add_button","export_excel","cancel_button","save_button","PredefinedIds","CustomFilterType","FilterType","OptionType","SubOptionType","searchTranslations","search_no_users","search_no_roles","add_user","add_role","new_role","search_on","role_id","alternative_id","alternative_id_name","clear_all","inactive_users","users_administrated_by_me","without_email","without_alternative_id","responsible_for_unit","extended_access","restricted_access","access_to_operation","access_to_screen","access_to_administrate_user_group","my_unit","my_location","application_or_case_type","case_type","screen","exclude_inherited_from_role","clear_filter","filter_menu_option_include_parent","filter_menu_option_exclude_parent","filter_summary_exclude_parent","number_validator_error","excel_export_item_text","excel_started","excel_success","no_access_has_been_granted","no_access_to_role_administration","no_access_to_user_administration","openCloseFilter","FilterPanelMenu","excludeChildren","excludeParents","displayExclude","excludeInclude","displayExcludeChildren","excludeIncludeChildren","displayExcludeParents","excludeIncludeParents","onClear","onIncludeExclude","onIncludeExcludeChildren","onIncludeExcludeParents","renderText","FilterItemField","filterSettings","onFilterValidationChange","menuValues","onChangeMenu","typeMappings","hasMenuOptions","getFieldId","fieldTypeId","countFilter","includeInSummary","fieldId","FilterItem","openFilters","filterItem","divider","emptyList","FilterPredefined","onChangeInclude","onChangeExclude","createDateValue","maptCustomFieldValues","dateFromValue","dateFrom","dateToValue","dateTo","TEXT_RANGE","DATE_RANGE","isFilterValid","dataToMap","mapCustomFilters","filterFields","mapCustomField","mapToSummary","mapPredefinedFilters","SearchFilters","predefinedOptions","countText","clearAllFilters","SearchAttributes","onChangeQueryValue","attributeSelector","SearchLayout","rightToolbar","querySettings","onChangeQuery","searchToolbar","SearchResult","noHitLabel","canDuplicate","resultTile","onFetchMore","onLoadPersonAccess","onClearPersonAccess","searchHits","emptyFilter","SearchContainer","onLoadData","prevQuery","prevQueryValues","prevFilterValues","prevFilterMenuValues","prevFilterConfiguration","getRoles","exportToExcel","sharedApi","deleteUser","deleteRole","userAccess","roleAccess","downloadFile","filenameWithExtension","blockAccess","blockAccessParams","translationId","getErrorMessage","isForbiddenStatus","FORBIDDEN","UserEditType","clearPersonAccess","loadUserAccess","loadRoleAccess","loadUsers","loadRoles","roles","updateSearchDefinition","updateFilterValues","updateFilterMenuValues","updateFilterValidation","updateQuery","updateQueryValue","setQueryValues","clearQuery","SearchTile","searchTile","searchTileDeleted","TileLink","tileTitle","TileInfo","mainGroup","tileInfo","tileInfoContent","tileId","tilePersonId","PersonMeatballMenu","labelDuplicate","labelDelete","labelCancel","labelDescription","labelNoAccess","canDelete","hasNoAccess","handleLoadPersonAccess","handleClearPersonAccess","UserTile","UserToolbar","totalResultHits","onExportToExcel","canCreate","canRead","userQueryFilters","enableAlternativeId","alternativeId","alternativeName","defaultFilters","inactiveUsers","serializeMenuValues","negated","ignoreHierarchy","serializeCodeFilter","selectedIds","removeLastComma","serializeFilter","SELECTED_IDS","rootId","rootHasValues","application","applicationHasValues","excludeInheritedId","excludeInherited","applyRoleAccess","applicationFilter","range","serializedRange","serializeSingleValue","dateTimeRange","excludeNullValues","serializeDateRangeValue","dataToSerialize","searchInName","searchInPersonId","searchInAlternativeId","searchInAlternativeName","searchInEmail","serializeQuery","excludeInactiveUsers","withoutEmailAddress","excludeUsersWithEmail","withoutAlternativeID","usersWithAlternativeId","administratedByMe","usersFromGroupsAdministratedByMe","serializePredefined","serializeCodes","FilterInput","specified","onChangeDateFrom","onChangeDateTo","renderSpecifiedPeriod","inputFilter","dateRangeFilter","codeFilter","codeHierarchyFilter","codeHierarchyParentsFilter","checkboxFilter","typeMapping","codeHierarchy","codeHierarchyParents","dateRange","UserSearch","searchModel","alternativeIdPanel","predefinedFilters","userRole","extendedAccess","includeSynergiLifeApplication","restrictedAccess","responsibleForUnit","accessToOperation","accessToScreen","myUnit","myLocation","accessToUserGroup","userCode","disabledDate","userFilters","createUserAccess","readUserAccess","userToolbar","administrationEditTranslations","user_administration_label","role_administration_label","do_you_want_to_provide","remove_all_role_based","authorisation","unit_location_usergroup","user_type_and_group","latest_login","created","required_fields","validation_required","added_user","not_added_user","updated_user","not_updated_user","duplicated_user","dont_save","go_back","application_or_case","choose_application_or_case","must_be_unique","confirm_password","reset_password","change_id_disclaimer","new_user","edit_user","user_and_person_fields","user_groups","user_occurrence_in_preson_field_lists","update_user","no_additional_info_has_been_added","no_fields_available","default_values","default_value","code_table","access_base_on_role","not_selected","edit_details_title","default_value_already_set","default_value_add_new","default_value_add_new_fields","default_value_add_another","edit_role_title","edit_role_details_role_id","edit_role_details_role_name","edit_role_details_code","edit_role_add_role","edit_role_update_role","edit_role_save_role","additional_information","choose_extra_fields","extra_fields","extra_field","must_be_withing_range","role_updated","user_load_failed_msg","role_load_failed_msg","new_role_msg","no_roles_has_been_added","remove_all_role_based_access","change_user_id","old_user_id","new_user_id","user_id_changed","save_user_load_overlay_text","save_role_load_overlay_text","access_card_settings_to_selected_roles","access_selection_panel_switch_custom_message_first","access_selection_panel_switch_custom_message_second","access_selection_panel_switch_role_based_message_first","access_selection_panel_switch_role_based_message_second","role_base_access_custom_button_tab","role_base_access_role_button_tab","access_selection_panel_switch_custom_button","access_selection_panel_switch_role_based_button","no_alternative_id_has_been_added","database_user_delete_button","database_user_reset_button","database_user_create_button","database_user_delete_modal_title","database_user_delete_modal_desc","database_user_reset_modal_title","database_user_create_modal_title","database_user_create_message","database_user_reset_message","database_user_delete_message","database_create_user_info","database_can_not_change_user_id_info","access_to_assign_roles_title","access_to_assign_roles_field","access_to_assign_roles_group","password_policy_user_account","password_policy_db_account","add_default_value_button_text","add_default_value_disclaimer","add_user_group_button_text","add_case_type_button_text","add_application_or_case_type_button_text","add_user_and_person_fields_button_text","add_roles_button_text","add_units_button_text","duplicate_user_title","duplicate_user_save_text","operation_required_message","usertype","mainUsergroup","currentUsergroup","selectedMainUsergroup","applications","operations","accesstoscreen","optionsCollections","optionsCollectionId","valuesFields","accessToUserGroups","extraInfoOptions","extraInfoId","roleOptions","getUser","getRole","addUser","updateUser","changePersonId","getRoleOptions","saveDatabaseAccount","resetDatabaseAccount","deleteDatabaseAccount","editApi","getExtraInfo","getPersonOptions","sfNames","accessOperations","responsibleForUnits","personExcluded","accessToAssignRoles","sfParameters","codeTable","extraInfo","subset","dataItemToValidation","compareParam","dataObject","validationObject","param","normalizeValidationParameters","validationItem","dataItem","copyParametersForApplication","copyParametersForDefaultValueCodetable","copyParametersForDefaultValueField","normalizeValidation","validationWire","normalizedItem","validationItems","itemKeys","storeItem","storeItemKeys","normalizeValidationItems","dispatchValidationError","administrationEditArea","dispatchSaveError","validationErrorText","AccessMode","ExtraInfoType","loadExtraInfo","loadPersonOptions","personOptions","loadRole","loadRolePanelAccess","userRoleOptions","loadUser","updatedData","duplicateUser","onSuccess","updateAccessData","validateCustomData","accessPanelDataValidation","TabsPanel","tabsPanel","ConfirmationBox","modeInformation","withRoleBasedAccess","RoleBasedComponent","tab","customData","roleBaseData","roleSelected","roleValue","hasValues","hasExtraInfo","customState","changeCustomState","onChangeCustomState","fetchingRoleValue","onChangeRoleBasedState","renderCustomMode","tabsOptions","onChangeTab","renderRoleBasedMode","OptionsPanelDialog","showSelectDialog","closeSelectDialog","linkSelector","openSelectDialog","doneButtonText","mapInvalidOptions","valueFieldName","SingleOptionPanel","sv","buildInitialState","valueOptionsEndpoint","formComponent","valueLabel","panelLabel","addValuesPanel","addValues","accessCardPanel","updateValues","deleteAccessCard","TopPanel","topPanel","userInformationDetails","AdminPaper","useradminPaper","AdminPaperTopPanelComponent","AdminPaperTopPanel","AdminPaperSubPanel","AccessToAdministrateUserGroup","roleBasedData","fetchingRoleBasedData","GroupingType","addToArrayIfNotAlreadyThere","groupSelectorFieldName","groupingName","updateSelectedValues","addSelectedValues","prevSelectedValues","selectedGroupKey","prevGroup","pv","OptionPanel","useStaticOptions","groupingValue","prevGroupingValue","groupingLabel","groupingOptionsEndpoint","groupingType","valuesOptionsEndpoint","addGroup","selectedPanel","selectedPanelValue","selectedGroupValue","showValueFields","groupFields","Single","valueFields","cardName","emptyOptions","OptionCard","removeGroup","opt","cardValidation","fieldGroupingName","validationMessages","mapValidation","OptionsPanelComponent","newSelectedOptions","newSelectedValues","groupSelectorName","valueSelectorName","selectedGroup","buildInitalState","singleStepAccess","addSubButtonText","accessCards","optionPanel","OptionsPanel","AccessToScreen","Multiple","ExtendedAccess","Operation","RestrictedAccess","ExtraInfoFieldName","extraInfoConfig","toDataMapping","wireData","valueString","toWireMapping","formConfiguration","valueDate","valueInteger","float","valueFloat","valueCode","unknown","getConfiguration","ExtraInfoItem","codeOptionsEndpoint","formConfig","datatype","fieldDesc","fromWireFormat","extraInfoValues","extraInfoValue","extraInfoDataType","createExtraInfoValues","extraInfoCodesValues","ExtraInfoPanel","formValue","hasExtraInfoValues","ExtraInfo","hasExtraInfoCodes","serializeExtraInfo","simpleFormNames","copyCodeValue","readSelectionParams","optionsColection","defaultValueFields","defaultValueFieldsValue","dv","selectDefaultValue","defaultValueGroup","getAllFieldsForCaseType","getDuplicatedFields","existingFields","exisitingField","getUniqueFields","existingField","updateDefaultValue","exisitingDefaultValue","newDefaultValue","mapValueToComplexType","mapToStore","defaultValuesReturnTypes","getCurrentFieldId","defaultValueFieldIds","valueIds","checkFormValues","formNames","AddDefaultValue","showModal","hideAddDefaultValueModal","isUserTypeRequired","optionsCollectionsValue","optionsCollectionSearchRequired","SearchRequired","showAddDefaultValueModal","disclaimerPanel","isValueFieldsReadOnly","userTypeContext","CardValue","handleClickAddButton","serverValidation","caseTypeValue","defaultValueField","createServerValidation","cardValueAddFields","PanelDefaultValues","duplicatedFields","existingGroup","uniqueFields","currentFieldId","prevSelections","DefaultValues","serializeDefaultValues","AccessToAssignRoles","revertValueItems","VisibleForFields","loadingText","onEmptyOptions","mergedOptions","excludedItems","UserOccurencePanel","hasPersonOptionsCodes","UserOccurence","serializeValue","serializeKeyAndValue","keyName","keyValue","serializeAccessData","DatabaseAccount","ChangePersonId","newPersonId","setPersonId","editingSelf","textOldPersonId","textNewPersonId","textDoneButton","textDisclaimer","handleNewPersonIdChange","confirmedPassword","confirmedPasswordValidation","setPassword","textMustBeEqual","textPassword","textConfirmPassword","textPasswordHint","handlePasswordChange","handleConfirmedPasswordChange","ChangeDatabaseAccount","onSave","UserEditMenu","changingPassword","changingId","databaseAccount","onChangePassword","handleDisablePasswordMode","onSaveDatabaseAccount","handleDisableDatabaseAccount","onResetDatabaseAccount","onDeleteDatabaseAccount","loggedUserId","onChangePersonId","disableChangingPersonId","handleEnableDatabaseAccount","handleDuplicate","handleEnablePasswordMode","dbAccess","enableChangingPersonId","createDatabaseAccount","handleDeleteDatabaseAccount","handleSetPassword","handleSaveDatabaseAccount","handleResetDatabaseAccount","alternativeIds","addUserValidationConfig","editUserValidationConfig","accessDataValidation","filteredSelectedValues","applicationIds","compareAccess","newAccess","dataValue","getMainUserGroup","UserTypeGroup","prevMainUserGroup","nextMainUserGroup","UnitLocationLang","TabItemWrapper","activeMode","navigateToSection","itemRef","anchorId","updateActiveSection","getSectionId","MetroLine","forceMode","tabsFactory","UserEditSectionType","withMetroLine","fromTop","configurationItem","sectionRef","hasBigStickyHeader","scrollViewUrl","newMode","currentConfiguration","scrollToSectionHandler","currentSectionPosition","removeFocus","blur","sectionConfiguration","currentSection","sectionToRender","initialMode","initialSection","getRef","shouldRenderSection","getNextSection","getPreviousSection","goToNextSection","goToPreviousSection","alternativeIdFieldName","AlternativeIdItem","validateFields","personIdFormValue","nameFormValue","validationPersonId","validationName","hasPersonIdErrors","hasNameErrors","AlternativeId","fieldIds","addAlternativeId","removeAlternativeId","Details","showPersonId","readOnlyVeracity","MetroLineSection","sectionType","hiddenSection","bigStickyHeaderAnchor","RoleAccess","roleBasedId","highlightedBox","removeAll","UserEditFormComponent","extraInfoPanel","selectedUserType","administrationCentral","restrictedAccessPanel","displayRolePanel","displayAssignRolePanel","panelProps","AccessToOperation","UserEditForm","getScrollViewUrl","UserEdit","showUserEditMenu","hasAccess","onLoadUser","showUserInfoNotifications","detailsSectionRef","accessToOperationSectionRef","accessToScreenSectionRef","extendedAccessSectionRef","restrictedAccessRef","accessToAdministrateUserGroupRef","accessToAssignRolesSectionRef","defaultValuesSectionRef","userOccurenceSectionRef","notificationsRef","metroLineConfiguration","saveButtonText","showUserId","inEditMode","accessDataErrors","conf","performUpdateUser","ChangeCaseTypeComponent","loadReportStatus","downloadReportPackage","reportFileId","ReportFileStatus","fileExtension","getFileExtension","ReportsViewItem","createdDate","isPending","buttonBody","myDownloadsTileExtWrapper","fileExtention","myDownloadsDownloadContent","myDownloadsDownloadItemTitle","myDownloadsDownloadMetadata","myDownloadsDownloadItem","downloadItemBody","finished","report_download_title","report_download_description","report_download_submit","report_download_cancel","ReportsComponent","myDownloadsListItem","displayReportList","renderExportsList","report_no_data","myDownloadsWrapper","downloadHeading","ExportFileStatus","ExportsViewItem","downloadCaseExportPackage","numberOfCases","exportStartedAt","exports_number_of_cases_multi","exports_number_of_cases_single","export_download_title","export_download_description","export_download_submit","export_download_cancel","loadExportStatus","ExportsComponent","displayExportList","exports_no_data","MyDownloadsComponent","downloadItemsWrapper","my_downloads_subtitle","addRole","updateRole","RoleEditSectionType","checkAccess","RoleEditMenu","detailsContainer","RoleEditFormComponent","RoleEditForm","RoleEdit","hasTextsLoaded","performUpdateRole","roleQueryFilters","RoleTile","RoleToolbar","RoleSearch","roleCode","roleFilters","createRoleAccess","roleToolbar","codetableAdministrationTranslation","add_new","add_child","add_sibling","no_access_to_codetable_administration","no_codetable","no_code","no_category","update_code","add_code","delete_code_item","delete_confirm","delete_with_descendants_confirm","code_item_successfully_deleted","new_code_item","translations_header","copy_description_to_all","copy_long_description_to_all","copied_description_to_all","copied_long_description_to_all","descriptions_and_translations","show_translations","parent_code","list_code","visible_for_case_types","visible_for_user_groups","visible_for_fields","long_description","same_for_all_languages_confirmation_box","switch_to_translated_per_language","translated_per_language_confirmation_box","switch_to_same_for_all_languages","same_for_all_languages","translated_per_language","saving_code","deleting_code","updated_successfully","saved_successfully","NOT_ACCEPTABLE","breadcrumbsKeys","getCodetableMetadata","CodetableBaseComponent","getCodetableId","currentCodetableId","CodetableItemLoader","isZebra","zebra","loaderText","CodetableItemRow","treeDepthLevel","isLoader","codeRow","CodetableListItemWaypoint","onLoadMore","CodetableListItemsContainer","loadCode","appendToList","codeBranch","codeBranchState","loadFromParent","Tag","DisabledTag","CodetableItemLines","renderLine","maxTreeDepthLevel","currentTreeDepthLevel","hierarchyMetadata","codeItemHierarchyMetadata","depthLevel","isLastChild","leftPosition","getLeftPosition","shortLine","shouldRenderShortLine","shouldHideLine","hiddenLine","shouldRenderHorizontalLine","horizontalLine","CodetableItemContent","isHierarchyMode","refetching","contentClass","hierarchyContent","leftSide","rightSide","disabledTag","CodetableItem","expandCodeItem","shouldShowZebra","expanderButtonContainer","expanderButton","CodetableListItems","currentCodeItem","codeItemState","showSpinner","isZebraValue","hierarchyMetadataUpdated","deleting","CodetableSearch","searchSection","CodeCategory","codetableCategory","features","codeOptions","NumberOfResults","rootBranch","connectedCaseTypes","savedReports","companyReports","codetableAdministrationList","codetableOptionsActionCreators","loadCodetableAdministrationList","codeSelectorApi","codeItemsResponse","commonApi","invalidateCodeItems","updateCaseCategory","buildBreadcrumbs","rawBreadcrumbs","resultBreadcrumbs","filteredRawBreadcrumbs","breadcrumbItemPath","breadcrumbItem","CodetableListComponent","reload","shouldBuildBreadcrumbs","newQuery","newQueryClear","queryClear","codetableMetadata","buildGoBackBreadcrumbs","breadcrumbsCopy","loadNewState","hasCategoryMetadata","hasSelectedCategory","hierarchy","shouldRenderSpinLoader","shouldRenderList","shouldRenderBreadcrumbs","codetableHeader","breadcrumbRow","goBackToCodeSelector","goBackToHomeCodeSelector","breadcrumbPlaceholder","updateCategory","listItemsContainer","hierarchyResults","listItems","CodetableStickyHeader","codetableName","actionTitleContainer","actionTitle","longDescriptionContainer","hiddenLongDescriptionContainer","longDescriptionRef","mapCodeToStore","codeItemWire","colour","class","companyRegisterId","scoreCalcWeight","loadCodeItem","createCodetableItem","saveCodetableItem","mapLanguageToWire","codeToWire","mapCodeToWire","descriptionToWire","longDescriptionToWire","descriptionLanguageIds","longDescriptionLanguageIds","longDescriptionId","languageIds","mapLanguages","ug","createCaseType","caseTypesOptions","createExcludeFields","createCodetableTypes","codetableClass","createParent","createCategory","createAdditionalFields","createUserGroups","userGroupsOptions","createDescriptions","languagesOptions","createEmptyCodeItem","loadAllOptions","shouldLoadParentOptions","shouldLoadUserGroups","shouldLoadCaseTypes","loadLanguages","shouldLoadDescriptions","getPath","findParent","parentCodes","getParent","getParentFullPath","getCategory","shouldGetCategory","loadParentCategory","getMainLanguageDescription","mainLanguage","getMainLanguageLongDescription","mapCopyTranslations","languageOptions","missingLanguages","getMissingLanguages","mainLanguageDescription","mainLanguageDescriptionText","mainLanguageLongDescription","mainLanguageLongDescriptionText","compared","validationKey","hasTranslationsValid","translationsValidation","createCodeItem","storedCategory","parentFullPath","parentWithFullPath","BAD_REQUEST","updateListNode","updateParent","updateDescription","updateLongDescription","updateDisabled","updateUserGroups","updateExcludedFields","updateCaseTypes","updateCodetableTypes","updateCodeCategory","updateSequence","updateAdditionalField","resetCodeItem","copyDescriptionToAllTranslations","copyLongDescriptionToAllTranslations","validationErrorMessage","codetableFound","shouldCreateCodetableItem","successfulSaveText","savedSuccessfully","updateValidation","switchTranslationsToggle","LanguageName","TranslationRow","onDescriptionChange","onLongDescriptionChange","descriptionLabel","descriptionValidation","longDescriptionValidation","onChangeDescription","onChangeLongDescription","updateLanguages","existingValues","existingDescription","newDescription","updatedValues","SectionHeader","sectionHeader","sectionSeparator","getLanguageValidation","validationMessage","validationValue","MainLanguage","languageDescriptionValidation","languageLongDescriptionValidation","mainLanguageContainer","mainLanguageInput","mainLanguageInputWrapper","mainLanguageButtonContainer","mainLanguageButton","TranslationsToggle","isToggled","translationsToggleContainer","shouldRenderTypes","shouldRenderDetails","codetableNode","shouldRenderVisibility","shouldRenderTranslations","trimmedDescription","trimmedLongDescription","sectionHeaderContainer","getValidationWithoutDuplicates","filterMessageDuplicates","filterMessageDuplicatesInternal","messageOcurrencesMap","isAlreadyInMessages","markMessageAsPresent","CodeCaseTypes","caseTypesValidation","CodeNode","nodeValidation","CodeParent","parentValidation","CodeUserGroups","userGroupsValidation","isCodeEditing","categoryValidation","CodeSequence","CodetableAdditionalFieldId","CodetableAdditionalFieldType","CodeDisabled","CodeNumberAdditionalField","additionalFieldData","CodeStringAdditionalField","CodeAdditionalFields","additionalField","STRING","createAdditionalFieldOnChange","getAdditionalFieldValue","NUMBER","additionalFieldsRenderer","CodeEditSectionType","CodeExclude","excludableFieldsOptions","excludableFields","disabledOptions","excludeField","getDisabledOptions","excludeValidation","invalidOptionIds","clearRows","codeExcludeLabel","Visibility","CodeCodetableTypes","typeOptions","CodetableItemFormComponent","renderTranslationsOnTop","shouldRenderTranslationsOnTop","shouldRenderTypesSection","codetableItemForm","Types","CodetableItemForm","comparableByDescription","isNil","removePropertyFromDiff","propertyInDiffIndex","removeUndefinedProperty","isUndefinedPropertyMissing","isNotDefined","isDescriptionProperty","filterDescriptionUndefineds","isDefinedAfterTrim","filterUndefineds","hasEqualDescriptions","comparedProperty","isPropertyEqual","originalCodeItemProperty","codeItemProperty","shouldCompareDeeply","isEqual","validOriginalValues","validCurrentValues","filterUndefinedValues","originalValue","arePropertiesEqual","isAdditionalFields","getObjectsDiff","isDefinedPropertyMissing","addDefinedPropertyToDiff","removeEqualPropertiesFromDiff","isNotEmpty","initializeCodeItem","shouldCreateNewCodeItem","validateDescriptions","validateNode","validateCategory","emptyTranslations","visibilitySectionRef","translationsSectionRef","typesRef","translationsIndex","CodetableItemComponent","userLanguageDescription","getPropsWithCodetableId","previousPayload","hasPayloadChanged","resetForm","codeItemDisplayedName","getCodeItemDisplayedName","getUserLanguageTranslation","commonSelectors","codeItemSelectors","EditFolderComponent","noMargin","createMenuItem","SelectSavedReportSelector","itemToMove","owned","handleRequestDelete","goBack","textGoBack","renderItemDropdown","renderItemLabel","handleCancelDelete","handleConfirmDelete","closeEditFolder","closeMoveFolder","moveFolder","codeSelectorTranslations","select_case_type","change_case_type","change_case_type_info_message","loadCaseTypes","loadConnectedCaseTypes","draftIds","connectionTypeIds","loadDashboards","loadCompanyReports","ListViewColumn","listViewColumn","flexible","ListViewFolder","listViewFolder","listViewFolderActive","listViewFolderMainContent","listViewFolderIcon","listViewFolderIconActive","listViewFolderTitle","listViewFolderArrow","listViewFolderArrowActive","ListViewItem","listViewItem","breadcrumbsItem","listViewItemIcon","listViewItemTitle","columnWidth","ListViewColumnContainer","canRenderColumns","initialColumnData","maximumVisibleColumsCount","columnsAmountSourceRef","allColumns","getAllColumns","visibleColumns","getVisibleColumns","listViewColumnContainer","listViewColumnContainerMobile","listViewColumnContainerContent","listViewColumnContainerContentMobile","optionIndex","isOptionInBreadcrumbs","navigateToFolder","ListViewCodeSelector","titleContainer","titleBreadcrumb","includeQueryParams","CodeSelector","codeSelectorPropsCreator","ConsentType","NotificationPermissionType","loadPermission","loadConsent","deleteConsent","verifyCode","subscription","addSubscription","updateSubscription","myNotificationsTranslations","consents_title","consents_disclaimer","consent_delete_description","consent_delete","consent_delete_success","consent_sms_add_success","consent_sms_update_success","consent_push_add_success","consent_push_update_success","consent_push_not_active_message","consent_push_browser_allow_message","sms_text","sms_phone_label","push_name","push_text","add_sms_title","add_push_title","edit_push_title","push_token_exists_info","new_phone_number","previous_phone_number","change_phone_number","sms_disclaimer","verification_code","verification_code_success","verification_code_message","refresh_page","send_code","code_info","no_data","phone_number_info","email_invalid","sms","previousPhoneNumber","phoneNumber","verificationCode","countdownTimer","intervalTime","phoneNumberMinLength","pushNameMinLength","saveSubscription","clearConsent","ConsentItem","typeText","nameText","MdPhone","MdNotifications","IconComponent","consentItemWrapper","consentItem","isChannelActive","consentItemActive","consentItemInactive","consentTopPanel","displayColorWrapper","consentHeaderPanel","headerKey","leftPanel","leftPanelInfo","isPushActive","pushActiveStyles","consentName","SmsModal","validPhoneNumber","serializedForm","verificationMessage","counterOnDemand","countdown","onGenerateCode","requiredProperties","hasRequiredValues","EditSmsConsentComponent","firebaseConfig","webPushCertificate","b64PublicKey","configurationAccess","req","FmcContext","getPushName","getNotificationPermission","permissionType","Notification","Granted","Denied","Unknown","NotSupported","PushModal","fmcToken","requestPermission","EditPushConsentComponent","fetchingSubscribePush","ConsentList","allowedConsents","channelActive","activePushConsent","EditSmsConsent","EditPushConsent","renderEditView","AddSmsConsent","AddPushConsent","loadData","InfoMessagePanel","infoMessagePanel","InfoMessages","UserProfileHeading","sectionTitle","disclaimer","showVeracityProfileLink","veracityProfileLinkTitle","veracityProfileLink","flexContainer","headerPanel","MyNotificationsComponent","consentsContainer","UserSettingsComponent","initDelayed","myProfileAllowChangingName","myProfileAllowChangingEmailAddress","setInitialValue","onChangePasswordModal","NoContent","no_content","userProfileTabsFactory","userDefaultValuesTranslations","updated_default_values","getDefaultValues","saveDefaultValues","loadDefaultValues","onSucces","clearDefaultValues","AccessPanel","UserDefaultValuesComponent","shouldRender","performDefaultValues","UserProfileComponent","renderUserProfileTabs","menu_text","activeSectionData","UserSettings","MyNotifications","UserDefaultValues","settings_text","default_values_text","notifications_text","renderTabContainer","renderActiveSection","MessagesComponent","messagesView","messageSection","withWaitForAccessInfo","accessInfoChecker","withLoadedAccessInfo","Startup","CaseDraftCreator","CaseEditCreator","CaseDuplicateCreator","CompanyReportView","UserProfileView","UsersSearchView","RoleSearchView","CodetableBase","CodetableList","UserEditView","RoleEditView","ImportView","Messages","logoutNotFoundError","registerServiceWorker","firebase","initializeApp","messaging","usePublicVapidKey","serviceWorker","register","swRegistration","useServiceWorker","onMessage","ready","registration","showNotification","redirect_url","click_action","initFmc","getRegistrations","registrations","unregister","MessagingProvider","fmcMessaging","getToken","onTokenRefresh","postInitFmc","executeCallback","refreshedToken","installGlobalErrorHandler","sltoken","shell","safely"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,I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sJ,SAC1B,gBAAC,IAAD,KACE,gBAAC,WAAD,CAAUxhB,MAAOA,GACf,gBAAC,eAAD,CAAcwhB,OAAQgsJ,EAAShsJ,QAC7B,gBAAC,SAAD,CAAQs6B,SAAUlX,IAA0BkhD,QAASryH,IAAOgnG,QAASA,EAASv5F,SAAUmkG,UAI3F5zG,SAASkpF,eAAe,cA1BjC,4C,uB3sBzBO,SAAP,mC2sBsDAynQ,E,+CAAuBrvV,KAAKkvV,KAA2BlvV,MAAK,kBAG1D4C,QAAQqa,IAAR,2zDAyCG60C,OAAM,SAAC7zD,GAAD,OAAO2E,QAAQqa,IAAR,wCAA6Chf","file":"main.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t3: 0\n \t}\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t3: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"\" + ({\"1\":\"IntlPolyfill\",\"2\":\"bowtie\",\"4\":\"vendors~IntlPolyfill\",\"5\":\"vendors~bowtie\"}[chunkId]||chunkId) + \".\" + {\"0\":\"ab24f707\",\"1\":\"4a017b5d\",\"2\":\"1bc42a8d\",\"4\":\"1f300305\",\"5\":\"1417eb6e\",\"6\":\"32a0fe66\",\"7\":\"5ee34c5f\",\"8\":\"afb69597\",\"9\":\"ddd9f803\",\"10\":\"b2fa2116\",\"11\":\"4fa8bf01\",\"12\":\"88ef5da4\",\"13\":\"018e706a\",\"14\":\"1dad6b66\",\"15\":\"07607d30\",\"16\":\"42b087cb\",\"17\":\"97cee51b\",\"18\":\"6e7324f6\",\"19\":\"01bc77e9\",\"20\":\"285acbdc\",\"21\":\"43a6d4ec\",\"22\":\"f282cdc1\",\"23\":\"ff190e93\",\"24\":\"2fdc9f69\",\"25\":\"e3b5ffa5\",\"26\":\"834f8128\",\"27\":\"3209feb3\",\"28\":\"dd423fd5\",\"29\":\"1d1583d0\",\"30\":\"3b4604f3\",\"31\":\"17731772\",\"32\":\"4fd61304\",\"33\":\"34adbe60\",\"34\":\"f2cb1842\",\"35\":\"e92abf5b\",\"36\":\"278f8deb\",\"37\":\"fcf28f9a\",\"38\":\"079c96a7\",\"39\":\"a6df6db1\",\"40\":\"32455a77\",\"41\":\"2ae737e8\",\"42\":\"5ef80aa3\",\"43\":\"947cae4e\",\"44\":\"870ca3cc\",\"45\":\"e172f57d\",\"46\":\"494aa1db\",\"47\":\"f99ad725\",\"48\":\"bcb946d9\",\"49\":\"d0e6498e\",\"50\":\"563c27d5\",\"51\":\"ef1e4f21\",\"52\":\"0046b92d\",\"53\":\"8e3d4c32\",\"54\":\"68158fe5\",\"55\":\"39e8f9fd\",\"56\":\"ce90cd8f\",\"57\":\"6b900837\",\"58\":\"65069ca7\",\"59\":\"1aebe19d\",\"60\":\"4563ac10\",\"61\":\"4c9c7e52\",\"62\":\"a9d151ce\",\"63\":\"e4108f61\",\"64\":\"cd48829b\",\"65\":\"425b1968\",\"66\":\"51cab201\",\"67\":\"3c9813ce\",\"68\":\"e3dcbadb\",\"69\":\"496e61df\",\"70\":\"caaeaec7\",\"71\":\"f27f1f69\",\"72\":\"cabcacdc\",\"73\":\"bf37010f\",\"74\":\"7d8bb9f5\",\"75\":\"6471aefb\",\"76\":\"c7514353\",\"77\":\"8cd62b6e\",\"78\":\"9aa83304\",\"79\":\"0f77fd1a\",\"80\":\"fa2b2b29\",\"81\":\"68b56bfb\",\"82\":\"6108799a\",\"83\":\"d5f9bbf0\",\"84\":\"157cdc66\",\"85\":\"92c5f561\",\"86\":\"87d72690\",\"87\":\"23f7aee8\",\"88\":\"b2520d4d\",\"89\":\"1787dc10\",\"90\":\"43f0f5b4\",\"91\":\"68dd3067\",\"92\":\"6ffc57fc\",\"93\":\"cf1c5b6f\",\"94\":\"963d801d\",\"95\":\"dd33ebfc\",\"96\":\"55e5ec8c\",\"97\":\"0d81e8f9\",\"98\":\"876a9506\",\"99\":\"77eb1cc6\",\"100\":\"6fc1426c\",\"101\":\"b8708e02\",\"102\":\"66f64c7b\",\"103\":\"2df92748\",\"104\":\"cfb4b2a1\",\"105\":\"dd4caf03\",\"106\":\"b6eb8e20\",\"107\":\"390d5bcd\",\"108\":\"426e2f6b\",\"109\":\"6674113d\",\"110\":\"bb005c71\",\"111\":\"64def7e8\",\"112\":\"40fc4cc1\",\"113\":\"7bc61599\",\"114\":\"76b3652e\",\"115\":\"f109a697\",\"116\":\"0f041d05\",\"117\":\"eedeedf8\",\"118\":\"c0ce9c22\",\"119\":\"cbfed4b2\",\"120\":\"bba16ec7\",\"121\":\"76e8af82\",\"122\":\"f999a2af\",\"123\":\"c4e59bb7\",\"124\":\"7c78db28\",\"125\":\"1cfe7691\",\"126\":\"fcca3dc5\",\"127\":\"15faed9d\",\"128\":\"e1e8c9ee\",\"129\":\"4a293fd5\",\"130\":\"7aa3d3fc\",\"131\":\"3a8c9df4\",\"132\":\"3fc2479b\",\"133\":\"01e2a1a3\",\"134\":\"58402c59\",\"135\":\"8b924001\",\"136\":\"b7e98fa4\",\"137\":\"592ba602\",\"138\":\"476c6672\",\"139\":\"fd04ef01\",\"140\":\"0e092b0f\",\"141\":\"5d1c82ab\",\"142\":\"72733e80\",\"143\":\"03188e1c\",\"144\":\"d5ed0057\",\"145\":\"abef9180\",\"146\":\"48f1d3dd\",\"147\":\"7c95f48e\",\"148\":\"052b3d8f\",\"149\":\"7a14cbeb\",\"150\":\"0fd1d0e8\",\"151\":\"b460096d\",\"152\":\"4511f2f2\",\"153\":\"d78a78ac\",\"154\":\"deb62d4f\",\"155\":\"5fa7a8a4\",\"156\":\"ed32ccb1\",\"157\":\"a386cec3\",\"158\":\"185ada30\",\"159\":\"786522cf\",\"160\":\"d4dfac8f\",\"161\":\"6e8945f7\",\"162\":\"10ca5318\",\"163\":\"c3b1247a\",\"164\":\"da19f5e6\",\"165\":\"57b30734\",\"166\":\"0b3e9e5c\",\"167\":\"d197f6d6\",\"168\":\"47643f59\",\"169\":\"9df946ed\",\"170\":\"f8a38f73\",\"171\":\"b613c4d8\",\"172\":\"f5172788\",\"173\":\"dd5daa57\",\"174\":\"4bce8391\",\"175\":\"ec37d441\",\"176\":\"39ea1840\",\"177\":\"80b72d31\",\"178\":\"8475a23f\",\"179\":\"a749f39c\",\"180\":\"b95c4733\",\"181\":\"a994d02f\",\"182\":\"d34fd8ed\",\"183\":\"18fd0f43\",\"184\":\"7807e80a\",\"185\":\"b1e1052e\",\"186\":\"175fb193\",\"187\":\"9fb150fc\",\"188\":\"914567f8\",\"189\":\"a9e73498\",\"190\":\"44ea0209\",\"191\":\"60efe09b\",\"192\":\"bbe4706e\",\"193\":\"4d5a232e\",\"194\":\"25675261\",\"195\":\"69341e43\",\"196\":\"9e40e889\",\"197\":\"69f8071c\",\"198\":\"8126fa94\",\"199\":\"9c3963f8\",\"200\":\"616bb1fd\",\"201\":\"3b46479a\",\"202\":\"3844b856\",\"203\":\"fe50e7b8\",\"204\":\"4cb1968f\",\"205\":\"d343ac0c\",\"206\":\"c9e899a3\",\"207\":\"8ca455dc\",\"208\":\"9fd2578c\",\"209\":\"75ee473e\",\"210\":\"45d07fff\",\"211\":\"e3be1eb6\",\"212\":\"f3773987\",\"213\":\"af88c617\",\"214\":\"54235a5b\",\"215\":\"cc0136b5\",\"216\":\"1922fb10\",\"217\":\"cdd03caa\",\"218\":\"dc0f6cfc\",\"219\":\"3ed31325\",\"220\":\"8020accd\",\"221\":\"afa8194b\",\"222\":\"c3d91e86\",\"223\":\"fccd2624\",\"224\":\"08891b0c\",\"225\":\"8fd28569\",\"226\":\"81dd6637\",\"227\":\"93839428\",\"228\":\"e1c0b0b2\",\"229\":\"d585c333\",\"230\":\"fc9201b5\",\"231\":\"93a9b753\",\"232\":\"b9b22cfc\",\"233\":\"78fe5078\",\"234\":\"bc28071e\",\"235\":\"3c4118a1\",\"236\":\"5f093a49\",\"237\":\"418cfb18\",\"238\":\"f8d10f47\",\"239\":\"8474b612\",\"240\":\"939f58cb\",\"241\":\"7cbf2962\",\"242\":\"0f76ec70\",\"243\":\"27df98f3\",\"244\":\"b5f51f02\",\"245\":\"01293658\",\"246\":\"9aae78af\",\"247\":\"056d7188\",\"248\":\"6456518d\",\"249\":\"4307160f\",\"250\":\"d66f3e31\",\"251\":\"2fa9fbe7\",\"252\":\"26003b29\",\"253\":\"55430fe5\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"2\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"\" + chunkId + \".shell.css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 849);\n","module.exports = (__webpack_require__(49))(1);","export * from './attachment-viewer/attachment-viewer';\r\nexport * from './textarea';\r\nexport * from './textbox';\r\nexport * from './numberbox';\r\nexport * from './select-multiple';\r\nexport * from './select-single';\r\nexport * from './select-single-hierarchy';\r\nexport * from './select-multiple-hierarchy';\r\nexport * from './select-single-short-list';\r\nexport * from './common';\r\nexport * from './search';\r\nexport * from './date-time';\r\nexport * from './tile-view';\r\nexport * from './slider-rating';\r\nexport * from './file-uploader';\r\nexport * from './file-selector';\r\nexport * from './scroll-container';\r\nexport * from './button-list';\r\nexport * from './display-date';\r\nexport * from './display-number';\r\nexport * from './display-text/display-text';\r\nexport * from './display-boolean';\r\nexport * from './link-heading';\r\nexport * from './fluid-panel';\r\nexport * from './expandable';\r\nexport * from './expandable-text';\r\nexport * from './process-panel';\r\nexport * from './group-panel';\r\nexport * from './flex-panel';\r\nexport * from './columns-panel';\r\nexport * from './hidden';\r\nexport * from './paper';\r\nexport * from './detail-form-panel';\r\nexport * from './sort-order';\r\nexport * from './display-child-values';\r\nexport * from './badge';\r\nexport * from './badge-list';\r\nexport * from './password';\r\nexport * from './checkbox-list';\r\nexport * from './display-numeric-header';\r\nexport * from './tile';\r\nexport * from './display-codes';\r\nexport * from './display-codes-hierarchy';\r\nexport * from './access-card';\r\nexport * from './section-panel';\r\nexport * from './flex-row-panel';\r\nexport * from './checkbox';\r\nexport * from './long-description';\r\nexport * from './expandable-panel/expandable-panel';\r\nexport * from './drawer-with-bar/drawer-with-bar';\r\nexport * from './common/element-loader/element-loader';\r\nexport * from './icon-list';\r\nexport * from './display-color';\r\nexport * from './tile-top-zone';\r\nexport * from './link';\r\nexport * from './toggle-button/toggle-button';\r\nexport * from './info-banner';\r\nexport * from './compact-tile';\r\nexport * from './fullscreen-modal-header/fullscreen-modal-header';\r\nexport * from './object-fit-image';\r\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars\n stringify: function stringify(it, replacer, space) {\n var args = [it];\n var index = 1;\n var $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return $stringify.apply(null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar redefine = require('../internals/redefine');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.github.io/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}\n","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.iterator` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.iterator\ndefineWellKnownSymbol('iterator');\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n concat: function concat(arg) { // eslint-disable-line no-unused-vars\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n// Edge 14- issue\nvar USES_TO_LENGTH = arrayMethodUsesToLength('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toObject = require('../internals/to-object');\nvar nativeGetPrototypeOf = require('../internals/object-get-prototype-of');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {\n getPrototypeOf: function getPrototypeOf(it) {\n return nativeGetPrototypeOf(toObject(it));\n }\n});\n\n","var $ = require('../internals/export');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n setPrototypeOf: setPrototypeOf\n});\n","export * from './component-configuration';\r\n","import * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ComponentDescriptor } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const childValues = (caseState, uiEngineProps) => {\r\n const descriptor: ComponentDescriptor = uiEngineProps.componentDescriptor;\r\n const values =\r\n descriptor && descriptor.children &&\r\n descriptor.children\r\n .filter(child => child.dataTag) // Only children that has a dataTag\r\n .map(child =>\r\n resolvers.getComponentValues(caseState, uiEngineProps, child.dataTag)\r\n );\r\n\r\n return {\r\n childValues: values\r\n };\r\n};\r\n","import * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ComplexValue, ValueProperty } from 'ui';\r\n\r\nexport const riskValues = (caseState, uiEngineProps) => ({\r\n riskArea: resolvers.getComponentValues(caseState, uiEngineProps, 'RiskArea').valueItem,\r\n riskWeight: resolvers.getComponentValues(caseState, uiEngineProps, 'Weight').value,\r\n riskAreaRest: resolvers.getComponentValues(caseState, uiEngineProps, 'RiskAreaResidual').valueItem,\r\n riskWeightRest: resolvers.getComponentValues(caseState, uiEngineProps, 'RiskWeightResidual').value \r\n});\r\n\r\nexport interface RiskValueShape {\r\n riskArea: ComplexValue<number>;\r\n riskWeight: ValueProperty;\r\n riskAreaRest: ComplexValue<number>;\r\n riskWeightRest: ValueProperty;\r\n}\r\n","import * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { StoreData } from 'app/types-shared';\r\nimport { getById } from 'app/infrastructure/store/query';\r\nimport { getEntityTypeFromStorePath } from 'app/infrastructure/store/entity';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { contextToStorePath } from 'app/infrastructure/ui/renderer/resolvers';\r\n\r\n//This is a very temporary selector that replaces the Risk Matrix for the first release. Do not use!\r\nexport const consequenceRiskValues = (caseState, uiEngineProps) => {\r\n const caseData: StoreData = resolvers.getCaseData(caseState, uiEngineProps);\r\n\r\n const entityContext = resolvers.getEntityContext(caseState, uiEngineProps);\r\n\r\n const entity = getById(\r\n caseData,\r\n contextToStorePath(uiEngineProps.componentDescriptor, entityContext)\r\n );\r\n\r\n const entityType = entity && getEntityTypeFromStorePath(entity.id);\r\n\r\n const riskAreaField =\r\n entityType === tableName.lossPotentialEvaluationConsequence\r\n ? 'PotRiskRiskArea'\r\n : 'ResPotRiskRiskArea';\r\n const riskWeightField =\r\n entityType === tableName.lossPotentialEvaluationConsequence\r\n ? 'PotRiskWeight'\r\n : 'ResPotRiskWeight';\r\n\r\n return {\r\n riskArea: resolvers.getComponentValues(\r\n caseState,\r\n uiEngineProps,\r\n riskAreaField\r\n ).valueItem,\r\n riskWeight: resolvers.getComponentValues(\r\n caseState,\r\n uiEngineProps,\r\n riskWeightField\r\n ).value\r\n };\r\n};\r\n","import { routeConstants } from 'app/routes/route-constants';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport get from 'lodash/get';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { routeFromStoreItemPath } from 'app/infrastructure/store/entity-route';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport { getById } from 'app/infrastructure/store/query';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\n\r\nexport interface UrlOptions{\r\n withBaseUrl: boolean;\r\n openNew?: boolean;\r\n}\r\n\r\n/**\r\n * Injects a valid URL for the current connected case\r\n *\r\n * @param config - `withBaseUrl:true` will include the virtual directory name when\r\n * hosted outside root.\r\n * @param state\r\n * @param uiEngineProps\r\n */\r\nexport const urlToConnectedCase = (config:UrlOptions = {withBaseUrl:false}) => (\r\n state: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n const componentEntityType =\r\n uiEngineProps.componentDescriptor.entityTypePath &&\r\n uiEngineProps.componentDescriptor.entityTypePath.slice(-1)[0];\r\n \r\n if (componentEntityType && componentEntityType !== tableName.connectedCases) {\r\n return undefined;\r\n }\r\n\r\n if (!state.entities) {\r\n return undefined;\r\n }\r\n\r\n const casePk = uiEngineProps.hostProps().entityId;\r\n const idPath = uiEngineProps.resolveContext.path;\r\n \r\n // Workaround for connected cases in case listing\r\n const indexKey = state.entities[casePk] ? casePk : Object.keys(state.entities).find(key => Number(key.split('-')[0]) === casePk);\r\n \r\n const connectedCase = getById(\r\n state.editing ? state.editing.values : state.entities[indexKey],\r\n idPath\r\n );\r\n const caseNumber = get(connectedCase, 'ConnectedCaseNo[0].value');\r\n let url = caseNumber ? routeConstants.caseViewFor(caseNumber) : undefined;\r\n if(config.withBaseUrl && url){\r\n url = toAbsoluteUrl(url);\r\n }\r\n return {url, urlOpenNew: config.openNew};\r\n};\r\n/**\r\n * Injects a URL for the current case, regardless of read or edit mode\r\n *\r\n * @param state\r\n * @param uiEngineProps\r\n */\r\nexport const urlToCase = (config: UrlOptions = { withBaseUrl: false }) => (\r\n state: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n if (uiEngineProps.url) {\r\n return undefined;\r\n }\r\n let url = routeConstants.caseViewFor(uiEngineProps.hostProps().caseNumber);\r\n if (config.withBaseUrl) {\r\n url = toAbsoluteUrl(url);\r\n }\r\n return { url, urlOpenNew: config.openNew };\r\n};\r\n\r\n/**\r\n * Injects a deep link url for the entity specified by resolveContext and hostProps().caseNumber\r\n * @param state\r\n * @param uiEngineProps\r\n */\r\nexport const urlToChildEntity = (\r\n state: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n const path = [...uiEngineProps.resolveContext.path];\r\n if (!path || !path.length) {\r\n return undefined;\r\n }\r\n const caseItem = { ...path[0] };\r\n caseItem.tblTrans = uiEngineProps.hostProps().caseNumber;\r\n path[0] = caseItem;\r\n return { url: `${routeFromStoreItemPath(path, RenderMode.read)}` };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport {\r\n getCaseData,\r\n getEntityContext\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { StoreData } from 'app/types-shared';\r\nimport { entityFilter } from 'app/area/case/entity-filters';\r\nimport { getStorePath } from 'app/infrastructure/store/path';\r\nimport { getEntityTypeFromPath } from 'app/infrastructure/store/entity';\r\nimport { getChildEntities, getById } from 'app/infrastructure/store/query';\r\n\r\nconst selectEntities = (\r\n entityTypePath: string[],\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n const entityType = getEntityTypeFromPath(entityTypePath);\r\n\r\n if (!entityType) {\r\n throw new Error(\r\n `Expected entityTypePath to be configured for component ${\r\n uiEngineProps.componentDescriptor.id\r\n }.`\r\n );\r\n }\r\n\r\n const caseData: StoreData = getCaseData(caseState, uiEngineProps);\r\n const entityContext = getEntityContext(caseState, uiEngineProps);\r\n const storePath = getStorePath(entityTypePath, entityContext.path);\r\n\r\n const storeEntities = getChildEntities(caseData, storePath, entityType);\r\n const filteredEntities = storeEntities.filter(e =>\r\n entityFilter(e, uiEngineProps)\r\n );\r\n\r\n return {\r\n childEntities: filteredEntities ? filteredEntities : []\r\n };\r\n};\r\n\r\n/**\r\n * Provide all store entities at a specific path.\r\n */\r\n\r\nexport const entities = (entityTypePath: string[]) => (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n return selectEntities(entityTypePath, caseState, uiEngineProps);\r\n};\r\n\r\n/**\r\n * Provide all store child entities of the current component.\r\n */\r\n\r\nexport const childEntities = (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n const entityTypePath = uiEngineProps.componentDescriptor.entityTypePath;\r\n\r\n return selectEntities(entityTypePath, caseState, uiEngineProps);\r\n};\r\n\r\nexport const rowEntity = (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n const caseData: StoreData = getCaseData(caseState, uiEngineProps);\r\n const entityContext = getEntityContext(caseState, uiEngineProps);\r\n return { rowEntity: getById(caseData, entityContext.path) };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { childEntities } from 'app/area/case/selectors/entities';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const childEntityTypeKeys = (state: CaseState, uiEngineProps: ConnectedComponentProps, fullState: any) => {\r\n\r\n const result = childEntities(state, uiEngineProps);\r\n\r\n const existing = result && result.childEntities.map(e => e.primaryKey);\r\n\r\n return { \r\n existingKeys: existing || []\r\n };\r\n};\r\n","import { getEntityTypeFromPath } from 'app/infrastructure/store/entity';\r\nimport { getValue } from 'app/infrastructure/ui/form/selectors';\r\nimport { StoreData } from 'app/types-shared';\r\nimport {\r\n getCaseData,\r\n getEntityContext\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { getStorePath } from 'app/infrastructure/store/path';\r\nimport { getChildEntities } from 'app/infrastructure/store/query';\r\n\r\n/**\r\n * Provide aggregated count for a child table of Case\r\n */\r\n\r\nexport interface ChildCountMapping {\r\n /**\r\n * The name to use for the aggregation result\r\n */\r\n propName: string;\r\n /**\r\n * Only select rows where this column has a value.\r\n * If not defined, count all entities in the target table\r\n */\r\n dataTag?: string;\r\n /**\r\n * This is the data path with optional ids to match for each entity.\r\n * The ancestors with no specified id will be matched by using the component context.\r\n */\r\n entityPath: { entityType: string; id?: number }[];\r\n}\r\n\r\n/**\r\n * Provide aggregated count for a child table of Case or Draft\r\n */\r\n\r\nexport const childEntityCount = (propMappings: ChildCountMapping[]) => (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n const propObject = {};\r\n\r\n propMappings.forEach(prop => {\r\n const entityTypePath = prop.entityPath.map(d => d.entityType);\r\n const caseData: StoreData = getCaseData(caseState, uiEngineProps);\r\n const entityContext = getEntityContext(caseState, uiEngineProps);\r\n const storePath = getStorePath(entityTypePath, entityContext.path, true);\r\n\r\n const path = prop.entityPath\r\n .map(d => {\r\n const pathItem = storePath.find(p => !!p[d.entityType]);\r\n return pathItem || (d.id && { [d.entityType]: d.id });\r\n })\r\n .filter(d => d);\r\n\r\n const entityType = getEntityTypeFromPath(entityTypePath);\r\n const allRows = getChildEntities(caseData, path, entityType);\r\n const filteredRows =\r\n prop.dataTag && allRows.filter(e => !!getValue(e, prop.dataTag).value);\r\n\r\n const result = filteredRows || allRows;\r\n propObject[prop.propName] = {\r\n count: result.length,\r\n propName: prop.propName\r\n };\r\n });\r\n\r\n return propObject;\r\n};\r\n\r\nexport interface ChildEntityCountShape {\r\n count: number;\r\n propName: string;\r\n}\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport * as caseData from 'app/area/case/case-data-model';\r\nimport { createUTCDate } from 'app/infrastructure/data/date';\r\n\r\nexport interface CommentContainerProps { \r\n initialValues: {[indexer: string]: any};\r\n}\r\n\r\nexport const commentValues = (state: CaseState, uiEngineProps: any, fullState: ApplicationState ) => {\r\n\r\n const currentUser = fullState.app.userInfo.id;\r\n\r\n return { \r\n valueFormatter: (text: string) => ({\r\n [(caseData.columnName[caseData.tableName.comment] as any).submittedComment]: [{ value: text }],\r\n [(caseData.columnName[caseData.tableName.comment] as any).submittedBy]: [{ value: currentUser }],\r\n [(caseData.columnName[caseData.tableName.comment] as any).submittedDate]: [{value: createUTCDate()}] \r\n })\r\n }; \r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport get from 'lodash/get';\r\nimport { ComplexValue } from 'ui';\r\n\r\nexport const expandComplexValueProp = (valueName: string, minLevelName: string, propName: string) => \r\n (state: CaseState, uiEngineProps: any) => {\r\n\r\n const complexValue = get(uiEngineProps, propName) as ComplexValue<any>;\r\n \r\n return { \r\n [valueName]: complexValue && complexValue.value,\r\n [minLevelName]: complexValue && complexValue.minLevel\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport get from 'lodash/get';\r\nimport { ComplexValue } from 'ui';\r\nimport { expandComplexValueProp } from 'app/area/case/selectors/expand-complex-value-prop';\r\n\r\nexport const primaryKeyFromContext = (propName: string = 'primaryKey') => \r\n (state: CaseState, uiEngineProps: any) => {\r\n\r\n const primaryKey = get(uiEngineProps, 'resolveContext.primaryKey') as ComplexValue<number>;\r\n \r\n return { \r\n [propName]: primaryKey\r\n };\r\n};\r\n\r\nexport const primaryKeyFromContextExpanded = \r\n (valueName: string = 'value', minLevelName: string = 'minLevel') => \r\n (state: CaseState, uiEngineProps: any) => {\r\n return expandComplexValueProp(valueName, minLevelName, 'pk')(state, primaryKeyFromContext('pk')(state, uiEngineProps));\r\n};\r\n","import { StoreData } from 'app/types-shared';\r\nimport * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getById } from 'app/infrastructure/store/query';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { contextToStorePath } from 'app/infrastructure/ui/renderer/resolvers';\r\n\r\nexport const primaryKeyFromEntity = (propName: string = 'primaryKey') => (\r\n state: CaseState,\r\n uiEngineProps: any\r\n) => {\r\n const caseData: StoreData = resolvers.getCaseData(state, uiEngineProps);\r\n\r\n const entityContext = resolvers.getEntityContext(state, uiEngineProps);\r\n\r\n const entity = getById(\r\n caseData,\r\n contextToStorePath(uiEngineProps.componentDescriptor, entityContext)\r\n );\r\n\r\n return {\r\n [propName]: entity && entity.primaryKey\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseListingStoreState } from 'app/area/case-listing/types-store';\r\n\r\nexport interface EnabledEntityOperations {\r\n edit: boolean;\r\n delete: boolean;\r\n bowtie: boolean;\r\n surveyManager: boolean;\r\n}\r\n\r\nexport const casePermissions =\r\n (state: CaseState | CaseListingStoreState, uiEngineProps: ConnectedComponentProps):\r\n { enabledEntityOperations: EnabledEntityOperations, permissionsLoaded:boolean } => {\r\n const { tblTrans: entityId } = uiEngineProps.resolveContext.path[0];\r\n\r\n let permissions;\r\n\r\n//TODO: Ideally these states would both store the permissions in a way that can be accessed the same way.\r\n if ((state as CaseListingStoreState).results) {\r\n const relevantCase = (state as CaseListingStoreState).results.find(r => r.entityId === entityId);\r\n permissions = relevantCase && state.permissions && state.permissions[relevantCase.caseNumber];\r\n } else {\r\n permissions = (state as CaseState).permissions;\r\n }\r\n\r\n return {\r\n enabledEntityOperations: permissions ? {\r\n edit: permissions.edit as boolean,\r\n delete: permissions.delete as boolean,\r\n bowtie: permissions.bowtie as boolean,\r\n surveyManager: permissions.surveyManager as boolean\r\n } :\r\n { edit: false, delete: false, bowtie: false, surveyManager: false },\r\n permissionsLoaded: !!permissions\r\n };\r\n };\r\n","import * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport interface FieldValuesMappings { \r\n /**\r\n * The name to use for the field\r\n */\r\n fieldName : string;\r\n\r\n /**\r\n * Only select rows where this column has a value. \r\n * If not defined, count all entities in the target table\r\n */\r\n dataTag: string;\r\n}\r\n\r\nexport const fieldValues = (propMappings : FieldValuesMappings[]) => \r\n (caseState: CaseState, uiEngineProps: ConnectedComponentProps) => { \r\n const fieldObject = {};\r\n\r\n propMappings.forEach((p) => { \r\n const componentValues = resolvers.getComponentValues(caseState, uiEngineProps, p.dataTag);\r\n fieldObject[p.fieldName] = {valueObject: componentValues, propName: p.fieldName}; \r\n }); \r\n\r\n return fieldObject;\r\n};\r\n","export const caseListingComponent = (state: any, uiEngineProps: any) => ({\r\n caseListingComponent: uiEngineProps.hostProps().caseListingComponent\r\n});\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { sequence, maxSequenceEntity } from 'app/area/case/features/connected-cases/sequence';\r\nimport { StoreData } from 'app/types-shared';\r\nimport { getCaseData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { getChildEntities } from 'app/infrastructure/store/query';\r\n\r\nexport const connectedCasesMaxSequence = \r\n (state: CaseState, uiEngineProps: any) => {\r\n const caseData: StoreData = getCaseData(state, uiEngineProps);\r\n const hostProps = uiEngineProps.hostProps();\r\n const connectionTypeId = uiEngineProps.componentDescriptor.properties.connectionTypeId;\r\n const pathToConnectionType = [{[tableName.trans]: hostProps.entityId}, {[tableName.connectionTypes]: connectionTypeId}];\r\n const connections = getChildEntities(caseData, pathToConnectionType, tableName.connectedCases);\r\n \r\n const maxSeq = maxSequenceEntity(connections);\r\n\r\n return {\r\n maxSequence: sequence(maxSeq)\r\n };\r\n };\r\n","import { columnName, tableName } from 'app/area/case/case-data-model';\r\nimport { entityValue } from 'app/infrastructure/store/entity';\r\nimport { Entity } from 'app/types-shared';\r\n\r\nexport const connectedCasesSortValue = () => \r\n ({ sortValue: (c: Entity) => Number(entityValue(c, columnName[tableName.connectedCases].connectedSequence)) });\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport get from 'lodash/get';\r\n\r\nexport const connectedDrafts = \r\n (state: CaseState) => ({ connectedDrafts: get(state, 'editing.connectedDrafts') as any[] });\r\n","import * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ComplexValue, ValueProperty } from 'ui';\r\n\r\nexport const connectedCasesRiskValues = (caseState, uiEngineProps) => ({\r\n connectedRiskArea: resolvers.getComponentValues(caseState, uiEngineProps, 'ConnectedRiskArea').valueItem, \r\n connectedRiskWeight: resolvers.getComponentValues(caseState, uiEngineProps, 'ConnectedRiskWeight').value,\r\n connectedRiskAreaRest: resolvers.getComponentValues(caseState, uiEngineProps, 'ConnectedRiskAreaRest').valueItem,\r\n connectedRiskWeightRest: resolvers.getComponentValues(caseState, uiEngineProps, 'ConnectedRiskWeightRest').value \r\n});\r\n\r\nexport interface ConnectedCasesRiskValueShape {\r\n connectedRiskArea: ComplexValue<number>; \r\n connectedRiskWeight: ValueProperty;\r\n connectedRiskAreaRest: ComplexValue<number>;\r\n connectedRiskWeightRest: ValueProperty; \r\n}\r\n","import * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ComplexValue, ValueProperty } from 'ui';\r\n\r\nexport const connectedCasesIntegrityValues = (caseState, uiEngineProps) => ({ \r\n connectedIntegrityStatus: resolvers.getComponentValues(caseState, uiEngineProps, 'ConnectedIntegrityStatus').valueItem,\r\n connectedIntegrityScore: resolvers.getComponentValues(caseState, uiEngineProps, 'ConnectedIntegrityScore').value, \r\n connectedIntegrityStatusBarrierEval: resolvers.getComponentValues(caseState, uiEngineProps, 'ConnectIntegStatusBarrierEv').valueItem \r\n});\r\n\r\nexport interface ConnectedCasesIntegrityValueShape { \r\n connectedIntegrityStatus: ComplexValue<number>;\r\n connectedIntegrityScore: ValueProperty;\r\n connectedIntegrityStatusBarrierEval: ComplexValue<number>; \r\n}\r\n","import { getAllEntitiesAtPath } from 'app/infrastructure/store';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { getCaseData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { InitialUiEngineProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\ninterface ConnectedCaseIdsProps extends InitialUiEngineProps {\r\n connectionTypeId?: number;\r\n}\r\n\r\nexport const connectedCasesIds = (caseState: CaseState, uiEngineProps: ConnectedCaseIdsProps) => {\r\n const connectionTypeId = uiEngineProps.connectionTypeId || \r\n uiEngineProps.componentDescriptor.properties.connectionTypeId;\r\n\r\n return {\r\n connectedCasesIds: \r\n getAllEntitiesAtPath(\r\n getCaseData(caseState, uiEngineProps), \r\n [tableName.trans, tableName.connectionTypes, tableName.connectedCases]\r\n )\r\n .filter(e => e.id.some(i => i[tableName.connectionTypes] === connectionTypeId))\r\n .map(e => e.primaryKey.value)\r\n };\r\n};\r\nexport interface ConnectedCasesIdsShape {\r\n connectedCasesIds: any;\r\n}\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { getAllEntitiesAtPath } from 'app/infrastructure/store';\r\nimport { getValue } from 'app/infrastructure/ui/form/selectors';\r\nimport { getCaseData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { tableName, columnName } from 'app/area/case/case-data-model';\r\n\r\nexport const connectedCasesActionCount = (caseState: CaseState, uiEngineProps: any) => {\r\n const resolveContext = uiEngineProps.resolveContext;\r\n const data = getCaseData(caseState, uiEngineProps);\r\n const actionEntities = getAllEntitiesAtPath(data, [...resolveContext.path, tableName.connectedActionView]);\r\n const closedActionEntities = actionEntities.filter(e => !!getValue(e, columnName[tableName.connectedActionView as any]\r\n .numberOfConnectedClosedActions).value);\r\n\r\n return {\r\n actionCount: actionEntities.length,\r\n closedActionCount: closedActionEntities.length\r\n };\r\n};\r\n\r\nexport interface ConnectedCasesActionCountShape {\r\n actionCount: number;\r\n closedActionCount: number;\r\n}\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const connectedCasePermissions = (caseState: CaseState, uiEngineProps: ConnectedComponentProps) => {\r\n const connectedCaseId = uiEngineProps.primaryKey.value;\r\n const permissions = (caseState.stateForCaseIds && caseState.stateForCaseIds[connectedCaseId])\r\n ? caseState.stateForCaseIds[connectedCaseId].permissions\r\n : undefined;\r\n\r\n return {\r\n permissions\r\n };\r\n};\r\n","import { StoreData } from 'app/types-shared';\r\nimport * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getChildEntities } from 'app/infrastructure/store/query';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\n\r\nexport const childEntityFieldValueAsOptions = (\r\n tableName: string,\r\n fieldName: string\r\n) => (state: CaseState, uiEngineProps: ConnectedComponentProps) => {\r\n const caseData: StoreData = resolvers.getCaseData(state, uiEngineProps);\r\n const entityContext = resolvers.getEntityContext(state, uiEngineProps);\r\n\r\n const entities = getChildEntities(caseData, entityContext.path, tableName);\r\n\r\n const fieldValues =\r\n entities &&\r\n entities\r\n .filter(e => e[fieldName] && (e[fieldName] as any).length)\r\n .map(e => {\r\n return e[fieldName] && (e[fieldName][0] as ComplexValue<number>);\r\n })\r\n .reduce((prev, c, index) => {\r\n prev.findIndex(v => v.value === c.value) === -1 && prev.push(c);\r\n return prev;\r\n }, []);\r\n\r\n return {\r\n options: fieldValues\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\n\r\nexport const entityId = (state: CaseState, uiEngineProps: any) => {\r\n\r\n const hostProps = uiEngineProps.hostProps();\r\n \r\n return { \r\n entityId: hostProps && hostProps.entityId\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { StoreData } from 'app/types-shared';\r\nimport { getCaseData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getCaseId } from 'app/infrastructure/store/query';\r\n\r\nexport const caseId = (caseState: CaseState, uiEngineProps: any) => {\r\n const caseData: StoreData = getCaseData(caseState, uiEngineProps);\r\n\r\n const caseIdValue = getCaseId(caseData);\r\n\r\n return {\r\n ...(caseIdValue && { caseId: caseIdValue })\r\n };\r\n};\r\n","import { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { ComplexValue } from 'ui';\r\nimport get from 'lodash/get';\r\n\r\nexport const tileHeaderPrimaryKey = (state: any, uiEngineProps: ConnectedComponentProps) => {\r\n const props = get(uiEngineProps, 'componentDescriptor.properties');\r\n\r\n if(!props.showPrimaryKey) {\r\n return {};\r\n }\r\n const primaryKey = get(uiEngineProps, 'resolveContext.primaryKey') as ComplexValue<number>;\r\n return {\r\n headerTitle: '#'+primaryKey.value\r\n };\r\n};\r\n\r\nexport const tileHeaderPrimaryKeyWithReportKeyLabel = (state: any, uiEngineProps:any) => {\r\n const rtnProps = tileHeaderPrimaryKey(state, uiEngineProps);\r\n const props = get(uiEngineProps, 'componentDescriptor.properties');\r\n if (rtnProps.headerTitle && props.showReportKeyLabel) {\r\n rtnProps.headerTitle = `${props.reportKeyLabel} ${rtnProps.headerTitle}`;\r\n }\r\n return rtnProps;\r\n};\r\n","import { getEntityTypeFromPath } from 'app/infrastructure/store/entity';\r\nimport { StoreData } from 'app/types-shared';\r\nimport {\r\n getCaseData,\r\n getEntityContext\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { getStorePath } from 'app/infrastructure/store/path';\r\nimport { getChildEntities } from 'app/infrastructure/store/query';\r\n\r\nexport interface ChildValueItemsMapping {\r\n /**\r\n * The name to use for the aggregation result\r\n */\r\n propName: string;\r\n /**\r\n * This is the data path with optional ids to match for each entity.\r\n * The ancestors with no specified id will be matched by using the component context.\r\n */\r\n entityPath: { entityType: string; id?: number }[];\r\n}\r\n\r\n/**\r\n * Returns an object map with values, for each defined property to aggreate, of a child entity type\r\n */\r\n\r\nexport const childEntityValuesAsProperty = (\r\n propertyName: string,\r\n propMappings: ChildValueItemsMapping[]\r\n) => (caseState: CaseState, uiEngineProps: ConnectedComponentProps) => {\r\n const valueItems = {};\r\n\r\n propMappings.forEach(prop => {\r\n const entityTypePath = prop.entityPath.map(d => d.entityType);\r\n\r\n const caseData: StoreData = getCaseData(caseState, uiEngineProps);\r\n const entityContext = getEntityContext(caseState, uiEngineProps);\r\n const storePath = getStorePath(entityTypePath, entityContext.path, true);\r\n const entityType = getEntityTypeFromPath(entityTypePath);\r\n const allRows = getChildEntities(caseData, storePath, entityType);\r\n\r\n valueItems[prop.propName] =\r\n allRows &&\r\n allRows\r\n .map(p =>\r\n Array.isArray(p[prop.propName]) ? p[prop.propName][0] : undefined\r\n )\r\n .filter(x => x);\r\n });\r\n\r\n return { [propertyName]: valueItems };\r\n};\r\n\r\nexport interface ChildValueItemsShape {\r\n childValueItems: any;\r\n}\r\n","import { IteratorType } from 'app/infrastructure/ui';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { getIteratorChildItems } from 'app/infrastructure/ui/renderer/iterator-resolvers';\r\nimport * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { getById } from 'app/infrastructure/store/query';\r\n\r\nexport const sum = values => {\r\n if (!Array.isArray(values)) {\r\n return 0;\r\n }\r\n return values\r\n .filter(x => x && x.value)\r\n .reduce((acc, current) => {\r\n if (current && current.value) {\r\n return acc + Number(current.value);\r\n }\r\n return current;\r\n }, 0);\r\n};\r\n\r\nconst max = values => {\r\n if (!Array.isArray(values)) {\r\n return 0;\r\n }\r\n return values\r\n .filter(x => x)\r\n .reduce((currMax, current) => {\r\n if (current && current.value && currMax < current.value) {\r\n return Number(current.value);\r\n }\r\n return currMax;\r\n }, 0);\r\n};\r\n\r\nconst childValuesAggregate = (\r\n propertyName: string,\r\n aggregateColumn: string\r\n) => (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps,\r\n aggregateFunction: (values: any[]) => number\r\n) => {\r\n // row id's for every row in table matched by entityTypePath, resolveContext should be correct if we are currently iterating\r\n const rowIds = getIteratorChildItems(\r\n IteratorType.DataRows,\r\n caseState,\r\n uiEngineProps\r\n );\r\n\r\n // the actual row with values\r\n const rows = rowIds.map(r =>\r\n getById(\r\n (caseState.editing && caseState.editing.values) ||\r\n caseState.entities[uiEngineProps.hostProps().entityId] ||\r\n caseState.entities[uiEngineProps.hostProps().entityStoreKey],\r\n r.storePath\r\n )\r\n );\r\n\r\n if (aggregateColumn && rows.length) {\r\n const valuesForAllRows = rows.map(r =>\r\n Array.isArray(r[aggregateColumn]) ? r[aggregateColumn][0] : 0\r\n );\r\n return {\r\n [propertyName]: { value: aggregateFunction(valuesForAllRows) }\r\n };\r\n }\r\n\r\n return {};\r\n};\r\n\r\nexport const childValuesTotals = (propertyName: string) => (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) =>\r\n childValuesAggregate(propertyName, uiEngineProps.componentDescriptor.dataTag)(\r\n caseState,\r\n uiEngineProps,\r\n sum\r\n );\r\n\r\nexport const childValuesMax = (propertyName: string, fieldName: string) => (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) =>\r\n childValuesAggregate(propertyName, fieldName)(caseState, uiEngineProps, max);\r\n\r\nexport const diffFieldValueAndChildValuesTotals = (\r\n propertyName: string,\r\n fieldName: string\r\n) => (\r\n caseState: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n): { [propertyName: string]: { value: number } } => {\r\n const childValuesAggrSum = childValuesAggregate(\r\n propertyName,\r\n uiEngineProps.componentDescriptor.dataTag\r\n )(caseState, uiEngineProps, sum);\r\n const fieldValue = resolvers.getComponentValues(\r\n caseState,\r\n uiEngineProps,\r\n fieldName\r\n );\r\n let result: number = 0;\r\n if (fieldValue && childValuesAggrSum[propertyName]) {\r\n const difference =\r\n fieldValue && fieldValue.value - childValuesAggrSum[propertyName].value;\r\n result = difference > 0 ? difference : 0;\r\n } else {\r\n result = fieldValue && !!fieldValue.value && fieldValue.value;\r\n }\r\n return {\r\n [propertyName]: { value: result }\r\n };\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport * as caseData from 'app/area/case/case-data-model';\r\n\r\nexport interface AttachLinkContainerProps { \r\n initialValues: {[indexer: string]: any};\r\n}\r\n\r\nexport const attachLinkValues = (state: CaseState, uiEngineProps: any, fullState: ApplicationState ) => {\r\n \r\n return { \r\n valueFormatter: (title: string, linkUrl: string) => ({\r\n [(caseData.columnName[caseData.tableName.link] as any).title]: [{ value: title }],\r\n [(caseData.columnName[caseData.tableName.link] as any).linkUrl]: [{ value: linkUrl }] \r\n })\r\n }; \r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport {\r\n getCaseData,\r\n getEntityContext,\r\n contextToStorePath\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { StoreData, StoreField } from 'app/types-shared';\r\nimport { getById } from 'app/infrastructure/store/query';\r\n\r\nconst referenceFieldFromEntity = (state: CaseState, uiEngineProps: any) => {\r\n const properties =\r\n uiEngineProps.componentDescriptor &&\r\n uiEngineProps.componentDescriptor.properties;\r\n const referenceCodeDataTag = properties && properties.referenceCodeDataTag;\r\n\r\n if (!referenceCodeDataTag) {\r\n return undefined;\r\n }\r\n\r\n const caseData: StoreData = getCaseData(state, uiEngineProps);\r\n const context = getEntityContext(state, uiEngineProps);\r\n\r\n const entity = getById(\r\n caseData,\r\n contextToStorePath(uiEngineProps.componentDescriptor, context)\r\n );\r\n\r\n return entity && (entity[referenceCodeDataTag] as StoreField[]);\r\n};\r\n\r\nexport const referenceFieldValue = (state: CaseState, uiEngineProps: any) => {\r\n const referenceField = referenceFieldFromEntity(state, uiEngineProps);\r\n\r\n return {\r\n categoryId:\r\n referenceField && referenceField.length > 0 && referenceField[0].value,\r\n referenceType:\r\n referenceField &&\r\n referenceField.length > 0 &&\r\n referenceField[0].categoryId\r\n };\r\n};\r\n\r\nexport const referenceFieldValueAsPrimaryKey = (\r\n state: CaseState,\r\n uiEngineProps: any\r\n) => {\r\n const referenceField = referenceFieldFromEntity(state, uiEngineProps);\r\n\r\n return {\r\n primaryKey: referenceField && referenceField.length > 0 && referenceField[0]\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\n\r\nexport const referenceCodeDataTag = (state: CaseState, uiEngineProps: any) => {\r\n\r\n const descriptor = uiEngineProps && uiEngineProps.componentDescriptor;\r\n\r\n return {\r\n codeDataTag: descriptor && descriptor.properties && descriptor.properties.referenceCodeDataTag\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { getEntityContext, getComponentData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ComponentDescriptor } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const referenceModalTempData = (state: CaseState, uiEngineProps: any) => {\r\n\r\n const options = getComponentData(state, { id: 11938 } as ComponentDescriptor, getEntityContext(state, uiEngineProps));\r\n\r\n return {\r\n fetchingModalOptions: !!(options && options.fetching),\r\n referenceModalOptions: (options && !options.fetching && options.data) || []\r\n };\r\n};\r\n","import * as resolvers from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ComplexValue, ValueProperty } from 'ui';\r\n\r\nexport const integrityValues = (caseState, uiEngineProps) => ({\r\n integrityStatus: resolvers.getComponentValues(caseState, uiEngineProps, 'IntegrityStatus').valueItem,\r\n integrityScore: resolvers.getComponentValues(caseState, uiEngineProps, 'IntegrityScore').value,\r\n integrityStatusBarrierEval: resolvers.getComponentValues(caseState, uiEngineProps, 'IntegrityStatusBarrierEva').valueItem \r\n});\r\n\r\nexport interface IntegrityValuesShape {\r\n integrityStatus: ComplexValue<number>;\r\n integrityScore: ValueProperty;\r\n integrityStatusBarrierEval: ComplexValue<number>; \r\n}\r\n","import { AppSetting } from 'dependencies/appsettings';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ComplexValue, UserInfo } from 'app/types-shared';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const createContext = (appState: ApplicationState, props: ConnectedComponentProps) => ({\r\n caseId: props.hostProps().entityId,\r\n fieldValue: props.value,\r\n userInfo: appState.app.userInfo,\r\n server: AppSetting.ApplicationUrl,\r\n ...(AppSetting.Integrations as any)\r\n});\r\n\r\nexport interface TemplateUrlDataContext{\r\n /**\r\n * Resolved from hostprops.entityId()\r\n */\r\n caseId: number;\r\n /**\r\n * UI Engine resolved value for the domain\r\n */\r\n fieldValue: string | Date | boolean | ComplexValue<any>;\r\n /**\r\n * User profile information from the Store\r\n */\r\n userInfo: UserInfo;\r\n /**\r\n * ENVIRONMENT_VAR.ApplicationUrl\r\n *\r\n * Resolved from explicit appSetting `ApplicationUrl` or if not set, by the ASP.NET runtime\r\n */\r\n server: string;\r\n /**\r\n * Configured key-value pairs retreived from appSettings key `Integrations`\r\n */\r\n integrations: {\r\n [key:string] : string;\r\n };\r\n}\r\n","import { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport {compile, RX_MATCH_INTERPOLATE_CONTENT} from 'app/infrastructure/js/template';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { createContext } from 'app/area/case/selectors/template-url/data-context';\r\n\r\n/**\r\n * A selector that compiles a template url string against a predefined data context \r\n * the template may select values from. \r\n * Selected values replace it's matching template literals in the `templateUrl`.\r\n * \r\n * `templateUrl` is retreived from the domain's attributes.\r\n * \r\n * @param caseState \r\n * @param uiEngineProps \r\n * @param appState \r\n */\r\nexport const templateURL = \r\n (caseState: CaseState, uiEngineProps: ConnectedComponentProps, appState: ApplicationState) => { \r\n const {templateUrl} = uiEngineProps.componentDescriptor.properties;\r\n let urlFromTemplateString = compile(templateUrl as string, createContext(appState,uiEngineProps));\r\n if(RX_MATCH_INTERPOLATE_CONTENT.test(urlFromTemplateString)){\r\n urlFromTemplateString = undefined;\r\n }\r\n return {\r\n urlFromTemplateString\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { compile, compileEach } from 'app/infrastructure/js';\r\nimport { SchemaBuilder } from 'app/infrastructure/ui/builder';\r\nimport { getComponentValues } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { log } from 'app/infrastructure/log';\r\nimport { createContext } from 'app/area/case/selectors/template-url/data-context';\r\nimport { isValidUrl } from 'app/infrastructure/validation/url';\r\n\r\n/**\r\n * Formats a template string with placeholders pointing to specific domain id's as well as \r\n * placeholders resolved from a value context object of type `TemplateUrlDataContext`.\r\n * \r\n * @example\r\n * \r\n * resolve argument `d` from domain 106 (Location):\r\n * \r\n * \"https://${server}/file?arg=${userInfo.language.description}&d=${106}\"\r\n * \r\n * \r\n * @param caseState \r\n * @param uiEngineProps \r\n * @param appState \r\n */\r\nexport const domainTemplateUrl = (\r\n caseState: CaseState, \r\n uiEngineProps: ConnectedComponentProps, \r\n appState: ApplicationState) => { \r\n\r\n const encoder = (s:string) => encodeURI(s);\r\n const context = createContext(appState, uiEngineProps);\r\n const {templateUrl} = uiEngineProps.componentDescriptor.properties;\r\n const urlFromContext = templateUrl && compile(templateUrl as string, context, encoder);\r\n\r\n if(!urlFromContext ){\r\n return undefined;\r\n }\r\n \r\n const url = compileEach(urlFromContext, (identifier:string) => {\r\n\r\n if(!identifier){\r\n return ''; \r\n }\r\n \r\n try{\r\n const domainIdOrDescriptor = JSON.parse(identifier);\r\n\r\n if(Number.isFinite(domainIdOrDescriptor)){\r\n const schema = SchemaBuilder.create(caseState.renderMode, caseState.uiDefinition);\r\n const componentDescriptor = schema.getById(domainIdOrDescriptor);\r\n \r\n // Basic domain value support\r\n const valueObject = getComponentValues(caseState, {\r\n ...uiEngineProps,\r\n componentDescriptor\r\n }\r\n );\r\n const hasValue = valueObject && valueObject.value !== undefined;\r\n return hasValue ? encodeURI(valueObject.value) : '';\r\n }\r\n }catch(err){\r\n log(err);\r\n }\r\n \r\n return '${' + identifier + '}';\r\n\r\n });\r\n \r\n if( !isValidUrl(url as string) ){ /*?url*/\r\n return undefined;\r\n }\r\n\r\n return {url};\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ApplicationState } from 'app/types-store';\r\n\r\nexport const currentUser = (state: CaseState, uiEngineProps: any, appState: ApplicationState) => {\r\n \r\n return { \r\n currentUser: {\r\n description: appState.app.userInfo.name,\r\n value: appState.app.userInfo.id\r\n }\r\n };\r\n};\r\n","import get from 'lodash/get';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps, ComponentDescriptor } from 'app/infrastructure/ui/types-uischema';\r\nimport { getEntityContext, resolveDomainMetadata, matchesCurrentValidationContext, mapToValidationProps } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ValidationProps } from 'ui/common/validation/types';\r\nimport { ValidationDomainMatch } from 'app/types-shared';\r\n\r\nexport const validationDescendants = (\r\n state: CaseState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n\r\n const context = getEntityContext(state, uiEngineProps);\r\n const domainMetadata = resolveDomainMetadata(context, state, uiEngineProps);\r\n const children = uiEngineProps.componentDescriptor.children ? uiEngineProps.componentDescriptor.children\r\n .concat(\r\n uiEngineProps.detailsViewDescriptor ?\r\n uiEngineProps.detailsViewDescriptor.children :\r\n []\r\n ) : [];\r\n\r\n if (!context || !domainMetadata || !children) {\r\n return undefined;\r\n }\r\n\r\n const childValidationErrors: ValidationProps[] = [];\r\n\r\n const aggregatedErrorList = (child: ComponentDescriptor) => {\r\n const allValidations = get(domainMetadata, `[${child.id}].validations`, []) as ValidationDomainMatch[];\r\n const validations = allValidations.filter(v => matchesCurrentValidationContext(context, v));\r\n validations.length && childValidationErrors.push(mapToValidationProps(child.id, validations));\r\n\r\n child.children && child.children.filter(x => x).map(aggregatedErrorList);\r\n };\r\n\r\n const onlyUniqueMessages = (v, i, a) => i === a.findIndex( f => JSON.stringify(v.messages) === JSON.stringify(f.messages) );\r\n\r\n children.map(aggregatedErrorList);\r\n\r\n return { validationDescendants: childValidationErrors.filter( onlyUniqueMessages ) };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ComponentDescriptor, ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { getEntityTypePathFromStorePath } from 'app/infrastructure/store/entity';\r\nimport { resolveVisibleSections } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { validationDescendants as selectValidationDescendants } from 'app/area/case/selectors/validation-descendants';\r\nimport { memoize } from 'app/infrastructure/js';\r\nimport { StoreItemPath } from 'app/types-shared';\r\nimport { SchemaBuilder } from 'app/infrastructure/ui/builder';\r\nimport { ValidationLevel } from 'ui';\r\n\r\nexport const findFirstSectionHostingEntity = (sections, path) => {\r\n\r\n const sameEntityPathAndRootLevelOrIterator = c =>\r\n c.entityTypePath\r\n && JSON.stringify(c.entityTypePath).toLowerCase() === path\r\n && (c.entityTypePath.length === 1 || !!c.iterate);\r\n\r\n const childHavingPath = (item) => {\r\n return item.children && (\r\n item.children.find(sameEntityPathAndRootLevelOrIterator) || item.children.some(childHavingPath) );\r\n };\r\n return sections.filter(childHavingPath);\r\n};\r\n\r\nexport const inferHostSectionOfChildEntity = ({ sections, entityTypePath }:\r\n { sections: ComponentDescriptor[]; entityTypePath: string[]; }) => {\r\n const path = JSON.stringify( entityTypePath ).toLowerCase();\r\n const matches = findFirstSectionHostingEntity(sections, path);\r\n return Array.isArray(matches) ? matches.sort( (a, b) => (a.id - b.id) )[0] : undefined;\r\n};\r\n\r\nexport const firstSectionId = (caseState: CaseState, uiEngineProps: any) => {\r\n if(!caseState.uiDefinition){\r\n return undefined;\r\n }\r\n const availableSections = SchemaBuilder.create(caseState.renderMode, caseState.uiDefinition).availableSections;\r\n const visibleSections = resolveVisibleSections(availableSections, caseState, uiEngineProps);\r\n const section = visibleSections[0];\r\n return { firstSection : section.id };\r\n};\r\n\r\nconst inferActiveSectionId = memoize((caseState: CaseState, uiEngineProps: ConnectedComponentProps, activeChildItem: StoreItemPath[]) => {\r\n const isDeepLink = Array.isArray(activeChildItem) && activeChildItem.length > 1;\r\n const availableSections = SchemaBuilder.create(caseState.renderMode, caseState.uiDefinition).availableSections;\r\n const visibleSections = resolveVisibleSections(availableSections, caseState, uiEngineProps);\r\n const resolvedSection = isDeepLink ?\r\n inferHostSectionOfChildEntity(\r\n { sections: visibleSections, entityTypePath: getEntityTypePathFromStorePath(activeChildItem) })\r\n :\r\n visibleSections[0];\r\n\r\n if(resolvedSection) {\r\n return Number(resolvedSection.id);\r\n }\r\n\r\n return undefined;\r\n\r\n});\r\n\r\n/**\r\n * Since the domain id of the default section is dynamic, it must be resolved\r\n * explicitly from UI definition when the url only contains caseId or draftId\r\n *\r\n * If there are validation errors in store, the section of the first validation error\r\n * domain parent section must be activated\r\n */\r\nexport const activeSectionState = (caseState: CaseState, uiEngineProps: ConnectedComponentProps) => {\r\n const {\r\n hostProps,\r\n invalidSections\r\n } = uiEngineProps;\r\n const {\r\n activeSection,\r\n expandAll\r\n } = hostProps();\r\n\r\n const submitFailed = invalidSections && invalidSections.length > 0;\r\n let sectionId = (!activeSection && submitFailed) ? invalidSections[0] : activeSection;\r\n // Never infer when there are pending validation errors\r\n if(!sectionId && caseState.uiDefinition && !submitFailed) {\r\n sectionId = inferActiveSectionId(caseState, uiEngineProps, hostProps().activeChildItem);\r\n }\r\n return { activeSection: sectionId, expandAll };\r\n};\r\n\r\nexport const nextAndPreviousSection = (caseState: CaseState, uiEngineProps: ConnectedComponentProps) => {\r\n const { activeSection } = uiEngineProps;\r\n\r\n if(!activeSection || !caseState.uiDefinition){\r\n return { previousSection: undefined, nextSection: undefined };\r\n }\r\n\r\n const availableSections = SchemaBuilder.create(caseState.renderMode, caseState.uiDefinition).availableSections;\r\n const sections = resolveVisibleSections(availableSections, caseState, uiEngineProps);\r\n const activeIndex = sections.findIndex( c => c.id === activeSection );\r\n\r\n return activeIndex > -1 && sections.length > 1 ? {\r\n previousSection: sections[activeIndex - 1],\r\n nextSection: sections[activeIndex + 1]\r\n } : undefined;\r\n};\r\n\r\nexport const invalidSectionIds = memoize((caseState: CaseState, uiEngineProps: ConnectedComponentProps) => {\r\n const havingErrors = (componentDescriptor: ComponentDescriptor) => {\r\n const v = selectValidationDescendants(\r\n caseState, { hostProps: uiEngineProps.hostProps, componentDescriptor } as any\r\n ).validationDescendants;\r\n return v && v.length && v.some(val => val.level === ValidationLevel.error);\r\n };\r\n const availableSections = SchemaBuilder.create(caseState.renderMode, caseState.uiDefinition).availableSections;\r\n const invalidSections = resolveVisibleSections(availableSections, caseState, uiEngineProps).filter(havingErrors).map(s => s.id);\r\n return { invalidSections };\r\n});\r\n\r\nexport const validState = (_, uiEngineProps: ConnectedComponentProps) => {\r\n const {\r\n validationDescendants,\r\n hasValidationErrors =\r\n validationDescendants &&\r\n validationDescendants.length &&\r\n validationDescendants.some(v => v.level === ValidationLevel.error),\r\n hasValidationWarnings =\r\n validationDescendants &&\r\n validationDescendants.length &&\r\n validationDescendants.some(v => v.level === ValidationLevel.warning)\r\n } = uiEngineProps;\r\n\r\n return {\r\n valid: !hasValidationErrors,\r\n warnings: hasValidationWarnings\r\n };\r\n\r\n};\r\n","\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const changeCaseTypeActionCreator = (\r\n _, \r\n uiEngineProps: ConnectedComponentProps\r\n) => { \r\n const {draftId} = uiEngineProps.hostProps();\r\n \r\n return {\r\n ...({\r\n onChangeCaseType: navigate.toSelectChangeCaseType(draftId)\r\n })\r\n };\r\n};\r\n","import { getChildEntities } from 'app/infrastructure/store/query';\r\nimport {\r\n getCaseData,\r\n getEntityContext\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { Entity, StoreField } from 'app/types-shared';\r\n\r\nexport const getEvaluations = (checkListItems: Entity[]) => { \r\n return checkListItems\r\n .map(r => r.CheckListEvaluation)\r\n .map(r => r && r[0]) // select first\r\n .filter(r => !!r); // remove undefined\r\n};\r\n\r\nexport const getEvaluationGroupDetails = (evaluations: StoreField[]) => {\r\n\r\n const evaluationsGroupedByValue = !!evaluations.length && evaluations.reduce((aggr, curr) => {\r\n aggr[curr.value] = aggr[curr.value] || [];\r\n aggr[curr.value].push(curr);\r\n return aggr;\r\n }, {});\r\n\r\n const evaluationValueGroups = Object.keys(evaluationsGroupedByValue)\r\n .map(e => evaluationsGroupedByValue[e]); //now convert the grouped objects to array\r\n\r\n return evaluationValueGroups.map(group => ({\r\n key: group[0].value,\r\n value: group.length,\r\n tooltip: group[0].description,\r\n backgroundColor: group[0].backgroundColor\r\n })); //set the result object having desired properties\r\n};\r\n\r\nexport const checklistValues = (caseState, uiEngineProps) => {\r\n const caseData = getCaseData(caseState, uiEngineProps);\r\n const entityContext = getEntityContext(caseState, uiEngineProps);\r\n\r\n const transPath = entityContext.path.slice(0, 1);\r\n\r\n const categories = getChildEntities(\r\n caseData,\r\n transPath,\r\n tableName.checklistCategory\r\n );\r\n const allChecklistItems = categories.reduce((aggr, curr) => {\r\n return [...aggr, ...getChildEntities(caseData, curr.id, tableName.checklist)];\r\n }, [] as Entity[]);\r\n const evaluations = getEvaluations(allChecklistItems);\r\n\r\n const result = getEvaluationGroupDetails(evaluations);\r\n \r\n return {\r\n checklistEvaluations: result,\r\n numberOfChecklistItems: !!result.length ? allChecklistItems.length : 0\r\n };\r\n};\r\n\r\nexport interface ChecklistValuesShape {\r\n numberOfChecklistItems: number;\r\n checklistEvaluations: any;\r\n}\r\n","import { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const print = (caseState, uiEngineProps:ConnectedComponentProps) => {\r\n const hostprops = uiEngineProps.hostProps();\r\n\r\n return {\r\n print: hostprops && hostprops.print\r\n };\r\n};\r\n","import { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseState, ViewMode } from 'app/area/case/types-store';\r\n\r\nexport const expandAll = (caseState:CaseState, uiEngineProps:ConnectedComponentProps) => {\r\n const hostprops = uiEngineProps.hostProps();\r\n return {\r\n expandAll: (hostprops && hostprops.expandAll) || caseState.viewMode === ViewMode.scroll\r\n };\r\n};\r\n","import get from 'lodash/get';\r\nimport { CaseState } from 'app/area/case/types-store';\r\n\r\nexport const domainMetadata = (domainId: number, prop: string) =>\r\n(\r\n state: CaseState\r\n) => {\r\n const meta = get(state, `editing.metadata.domains[${domainId}]`);\r\n return { [prop]: get(meta, `${prop}.globalMatch`) };\r\n};\r\n","import { primaryKeyFromContext } from 'app/area/case/selectors';\r\nimport { CaseState } from 'app/area/case/types-store';\r\n\r\nexport const connectedPkFromContext = (state: CaseState, uiEngineProps: any) => {\r\n const { pk } = primaryKeyFromContext('pk')(state, uiEngineProps);\r\n const { componentDescriptor } = uiEngineProps;\r\n const connectedPkValueTag = componentDescriptor.properties.connectedPkValueTag;\r\n\r\n return {\r\n initialValues: {\r\n [connectedPkValueTag]: [pk]\r\n }\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseListingStoreState } from 'app/area/case-listing/types-store';\r\nimport { HeaderVisibilityConfiguration } from 'app/components';\r\nimport { RenderMode, AuthState } from 'app/types-shared';\r\n\r\nconst visibilityConfigPerRenderMode: { [key:string]: HeaderVisibilityConfiguration } = {\r\n [RenderMode.report]: {\r\n meatballMenu: { open: true, edit: true, delete: true, duplicate: true, bowtie: true, share: true, print: true }\r\n },\r\n [RenderMode.read]: {\r\n panel: { edit: true },\r\n meatballMenu: { open: false, delete: true, duplicate: true, bowtie: true, share: true, print: true }\r\n },\r\n [RenderMode.edit]: {\r\n meatballMenu: { changeCaseType: true }\r\n }\r\n};\r\n\r\nexport const headerVisibilityConfiguration = \r\n (state: CaseState | CaseListingStoreState, uiEngineProps: ConnectedComponentProps, applicationState):\r\n { headerVisibilityConfiguration: HeaderVisibilityConfiguration } => {\r\n\r\n const authState = uiEngineProps.sharedState && uiEngineProps.sharedState.authState as AuthState;\r\n if (authState === AuthState.Anonymous) {\r\n return { headerVisibilityConfiguration: { panel: { edit: true } } };\r\n }\r\n\r\n const { headerVisibilityConfiguration: visibilityConfig } = uiEngineProps.hostProps();\r\n const { renderMode } = state;\r\n\r\n return {\r\n headerVisibilityConfiguration: visibilityConfig || visibilityConfigPerRenderMode[renderMode]\r\n };\r\n };\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\n\r\nconst translate = {\r\n make: 8108,\r\n copies: 8109,\r\n createCopies: 8110,\r\n copy: 7842,\r\n cancel: 3273\r\n};\r\n/**\r\n * Injects props for the feature \"copy\" [iterator]\r\n *\r\n * @param state\r\n * @param uiEngineProps\r\n */\r\nexport const copyIteratorProps = (\r\n state: CaseState\r\n) => {\r\n const {texts} = state;\r\n const result = {};\r\n const getText = createDescriptionSelector(texts);\r\n Object.keys(translate).forEach(t => result[t] = getText(translate[t]));\r\n return {\r\n copyIterator: result\r\n };\r\n};\r\n","import { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport get from 'lodash/get';\r\nimport { StoreData, Entity } from 'app/types-shared';\r\nimport { getCaseData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getAllEntitiesAtPath } from 'app/infrastructure/store';\r\nimport { entityValue } from 'app/infrastructure/store/entity';\r\n\r\nexport const requiredSearchFieldsFilled = (caseState: CaseState, uiEngineProps: ConnectedComponentProps) => {\r\n\r\n const requiredFieldsForSearch = get(uiEngineProps, 'componentDescriptor.properties.requiredFieldsForSearch') as string;\r\n\r\n if (!requiredFieldsForSearch) {\r\n return { requiredSearchFieldsFilled: true };\r\n }\r\n\r\n const dotNotationToEntityTypePath = (dotNotated: string) => dotNotated.split('.').slice(0, -1);\r\n const dotNotationToDataTag = (dotNotated: string) => dotNotated.split('.').slice(-1)[0];\r\n\r\n const allFieldsFilled = requiredFieldsForSearch.split(',').reduce((aggr, field) => {\r\n const entityTypePath = dotNotationToEntityTypePath(field);\r\n const dataTag = dotNotationToDataTag(field);\r\n\r\n const caseData: StoreData = getCaseData(caseState, uiEngineProps);\r\n const allEntities = getAllEntitiesAtPath(caseData, ['tblTrans', ...entityTypePath.slice(1)]);\r\n\r\n const valueFilled = (entity: Entity) => !!entityValue(entity, dataTag);\r\n\r\n return aggr && allEntities.reduce((a, c) => a || valueFilled(c), false);\r\n\r\n }, true);\r\n\r\n return { requiredSearchFieldsFilled: allFieldsFilled };\r\n};\r\n","import { getCaseData, hasNoPendingDelete } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { getPrimaryEntityId } from 'app/infrastructure/store/entity';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { InitialUiEngineProps } from 'app/infrastructure/ui/types-uischema';\r\n\r\nexport const pendingDeleteIds = (caseState: CaseState, uiEngineProps: InitialUiEngineProps) => ({\r\n pendingDeleteIds: \r\n getCaseData(caseState, uiEngineProps, true)\r\n .filter(e => !hasNoPendingDelete(e))\r\n});\r\n\r\ninterface ConnectedCasesPendingDeleteIdsProps extends InitialUiEngineProps {\r\n connectionTypeId?: number;\r\n}\r\n\r\nexport const connectedCasesPendingDeleteIds = (caseState: CaseState, uiEngineProps: ConnectedCasesPendingDeleteIdsProps) => {\r\n const connectionTypeId = uiEngineProps.connectionTypeId || \r\n uiEngineProps.componentDescriptor.properties.connectionTypeId;\r\n\r\n return {\r\n connectedCasesPendingDeleteIds: pendingDeleteIds(caseState, uiEngineProps)\r\n .pendingDeleteIds\r\n .filter(e => \r\n e.id.findIndex(i => !!i[tableName.connectedCases]) > -1 &&\r\n e.id.some(i => i[tableName.connectionTypes] === connectionTypeId)\r\n )\r\n .map(e => getPrimaryEntityId(e))\r\n };\r\n};\r\n","import { CaseListingStoreState } from 'app/area/case-listing/types-store';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport get from 'lodash/get';\r\nimport { reportIdToReportCategoryId } from 'app/area/case-listing/report-to-category-mapping';\r\n\r\nexport const reportCategory = (state: CaseState | CaseListingStoreState, uiEngineProps: ConnectedComponentProps, appState:any) => {\r\n return {\r\n reportCategory: reportIdToReportCategoryId(get(appState, 'favourite.workingDefinition.selectedReport.v'))\r\n };\r\n};\r\n","\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseListingStoreState } from 'app/area/case-listing/types-store';\r\n\r\nexport const factboxLinks = (\r\n state: CaseState & CaseListingStoreState,\r\n uiEngineProps: ConnectedComponentProps\r\n) => {\r\n const caseTypeId = uiEngineProps.resolveContext.applicationId;\r\n const uiDefinition = state.uiDefinition || ( state.uiDefinitions ? state.uiDefinitions[caseTypeId] : undefined);\r\n \r\n if(!uiDefinition){\r\n return undefined;\r\n }\r\n \r\n const valueOf = (childDomain:string) => {\r\n const val = Number(uiEngineProps.componentDescriptor.properties[`linkDomain${childDomain}`]);\r\n return Number.isFinite(val) ? Number(val) : undefined;\r\n };\r\n\r\n const links = [ \r\n {\r\n id: tableName.action,\r\n section: valueOf('Actions')\r\n },\r\n {\r\n id: tableName.consequences,\r\n section: valueOf('Consequences')\r\n },\r\n {\r\n id: tableName.assessment,\r\n section: valueOf('Assessments')\r\n },\r\n {\r\n id: tableName.attachmentType,\r\n section: valueOf('Attachments')\r\n },\r\n {\r\n id: tableName.causes,\r\n section: valueOf('Causes')\r\n },\r\n {\r\n id: tableName.checklist,\r\n section: valueOf('Checklists')\r\n },\r\n {\r\n id: tableName.comment,\r\n section: valueOf('Comments')\r\n },\r\n {\r\n id: tableName.connectedCases,\r\n section: valueOf('ConnectedCases')\r\n },\r\n {\r\n id: tableName.involvedDrug,\r\n section: valueOf('InvolvedDrugs')\r\n },\r\n {\r\n id: tableName.involvedPerson,\r\n section: valueOf('InvolvedPersons')\r\n },\r\n {\r\n id: tableName.lossPotentialEvaluation,\r\n section: valueOf('RiskArea')\r\n },\r\n {\r\n id: tableName.lossPotentialResidualEvaluation,\r\n section: valueOf('RiskAreaRest')\r\n },\r\n {\r\n id: 'BarrierEval',\r\n section: valueOf('IntegrityStatusBarrierEval')\r\n },\r\n {\r\n id: 'IntegrityStatus',\r\n section: valueOf('IntegrityStatus')\r\n }\r\n ];\r\n\r\n return {\r\n links\r\n };\r\n};\r\n","export function activeChildItem(state: any, uiProps: any) {\r\n return {\r\n activeChildItem: uiProps.hostProps().activeChildItem\r\n };\r\n}\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseListingStoreState } from 'app/area/case-listing/types-store';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport { TileProps } from 'ui/tile/tile';\r\n\r\nexport const editDocumentItemVisibility = (\r\n state: CaseState | CaseListingStoreState,\r\n uiEngineProps: ConnectedComponentProps\r\n): Partial<TileProps> => {\r\n const {\r\n showDetailsEditButton\r\n } = uiEngineProps.componentDescriptor.properties;\r\n const { renderMode } = state;\r\n\r\n return {\r\n showDetailsEditButton:\r\n uiEngineProps.enabledEntityOperations && \r\n uiEngineProps.enabledEntityOperations.edit && \r\n showDetailsEditButton && \r\n renderMode === RenderMode.read\r\n };\r\n};\r\n","import { CaseState } from 'app/area/case/types-store';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { CaseListingStoreState } from 'app/area/case-listing/types-store';\r\nimport { SharedState } from 'app/types-shared';\r\nimport { mapSharedState } from 'app/infrastructure/redux';\r\n\r\nexport const sharedState = \r\n (state: CaseState | CaseListingStoreState, uiEngineProps: ConnectedComponentProps, applicationState: any):\r\n { sharedState: SharedState } => {\r\n return { sharedState: mapSharedState(applicationState) };\r\n };\r\n","export * from './child-values';\r\nexport * from './risk-values-case-level';\r\nexport * from './risk-values-consequence-level';\r\nexport * from './url';\r\nexport * from './entity-type-keys';\r\nexport * from './child-entity-count';\r\nexport * from './entities';\r\nexport * from './comment-values';\r\nexport * from './primary-key';\r\nexport * from './case-permissions';\r\nexport * from './field-values';\r\nexport * from './case-listing';\r\nexport * from './connected-cases';\r\nexport * from './child-entity-field-value-as-options';\r\nexport * from './entity-id';\r\nexport * from './case-id';\r\nexport * from './tile-header-title';\r\nexport * from './child-entity-values';\r\nexport * from './child-values-aggregate';\r\nexport * from './attach-link-values';\r\nexport * from './expand-complex-value-prop';\r\nexport * from './reference-field-value';\r\nexport * from './reference-code-data-tag';\r\nexport * from './reference-modal-temp-data';\r\nexport * from './integrity-values';\r\nexport * from './template-url';\r\nexport * from './current-user/current-user';\r\nexport * from './active-section';\r\nexport * from './change-case-type';\r\nexport * from './checklist-values';\r\nexport * from './print-value';\r\nexport * from './expand-all';\r\nexport * from './domain-metadata';\r\nexport * from './initial-values-from-context';\r\nexport * from './header-visibility-configuration';\r\nexport * from './copy-iterator-props';\r\nexport * from './required-search-fields-filled';\r\nexport * from './pending-delete-ids';\r\nexport * from './report-category';\r\nexport * from './factbox-links';\r\nexport * from './active-child-item';\r\nexport * from './edit-document-item-visibility';\r\nexport * from './shared-state';\r\nexport * from './validation-descendants';\r\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","export * from './access-to-state';\r\nexport * from './background-save';\r\nexport * from './container-factory';\r\nexport * from './log-errors';\r\nexport * from './typed-to-plain';\r\nexport * from './error-safe';\r\nexport * from './when-idle';\r\nexport * from './types';\r\n","/**\r\n * Constants for the rare use cases where we are not dynamic, and must know something about\r\n * the data model before we execute any code.\r\n *\r\n * Use cases are typically features that are default and not customizable, such as aggregated counts\r\n */\r\n\r\nexport const tableName = {\r\n trans: 'tblTrans',\r\n action: 'TblAction',\r\n object: 'TblTransObject',\r\n comment: 'TblTransProcComments',\r\n lossPotentialEvaluation: 'TblLossPotEvaluation',\r\n lossPotentialResidualEvaluation: 'TblLossPotEvaluationRest',\r\n lossPotentialEvaluationConsequence: 'TblLossPotEvaluationConseq',\r\n causes: 'TblSynergiCause',\r\n consequences: 'TblConsequence',\r\n connectionTypes: 'TblConnectionTypes',\r\n connectedCases: 'TblTransConnected',\r\n involvedPerson: 'TblInvolvedPerson',\r\n green: 'TblGreen',\r\n checkListInteraction: 'TblInteraction',\r\n link: 'TblTransLink',\r\n attachmentType: 'TblAttachmentType',\r\n involvedDrug: 'TblDrugInvolved',\r\n drugReactionInteraction: 'TblSuspDrugInteraction',\r\n signature: 'TblTransSignature',\r\n economy: 'TblSynergiInsEco',\r\n checklistCategory: 'TblCheckListCategory',\r\n checklist: 'TblCheckList' ,\r\n assessment: 'TblAssessment',\r\n transLog: 'TblTransLog',\r\n connectedActionView: 'TblTransConnectedActionView'\r\n};\r\n\r\nexport const columnName: any = {\r\n\r\n [tableName.action]: {\r\n numberOfClosedActions: 'numberOfClosedActions',\r\n numberOfActions: 'numberOfActions',\r\n actionCompletedDate: 'ActionCompletedDate',\r\n actionDueStatus: 'ActionDueStatus'\r\n },\r\n\r\n [tableName.object]: {\r\n docName: 'AtchDocDocumentName',\r\n title: 'AtchDocTitle',\r\n blob: 'AtchDocObjectBlob',\r\n contentType: 'AtchDocContentType',\r\n size: 'AtchDocSize',\r\n thumbnailSize: 'AtchDocThbSize',\r\n attachedBy: 'AtchDocAttachedBy',\r\n attachedAt: 'AtchDocAttachedDate',\r\n mainImage: 'AtchDocFlgMain',\r\n numberOfFiles: 'numberOfFiles'\r\n },\r\n\r\n [tableName.comment]: {\r\n numberOfComments: 'numberOfComments',\r\n submittedBy: 'CmtBlogSubmittedPerson',\r\n submittedDate: 'CmtBlogSubmittedDate',\r\n submittedComment: 'CmtBlogComments'\r\n },\r\n\r\n [tableName.lossPotentialEvaluation]: {\r\n validFrom: 'PotRiskEvValidFrom'\r\n },\r\n\r\n [tableName.lossPotentialResidualEvaluation]: {\r\n validFrom: 'ResPotRiskEvValidFrom'\r\n },\r\n\r\n [tableName.causes]: {\r\n numberOfCauses: 'numberOfCauses'\r\n },\r\n\r\n [tableName.involvedPerson]: {\r\n numberOfInvolvedPersons: 'numberOfInvolvedPersons'\r\n },\r\n\r\n [tableName.consequences]: {\r\n actConsConsequenceIcons: 'ActConsConsequenceIcons',\r\n actConsLoss: 'ActConsLoss',\r\n actConsGain: 'ActConsGain'\r\n },\r\n\r\n [tableName.connectedCases]: {\r\n connectedSequence: 'ConnectedSequence'\r\n },\r\n\r\n [tableName.link]: {\r\n title: 'AtchLinkTitle',\r\n linkUrl: 'AtchLinkUrl',\r\n anchorIndicator: 'linkUrl',\r\n numberOfLinks: 'numberOfLinks'\r\n },\r\n\r\n [tableName.involvedDrug]: {\r\n numberOfInvolvedDrugs: 'numberOfInvolvedDrugs'\r\n },\r\n\r\n [tableName.green]: {\r\n envValSubstance: 'EnvValSubstance',\r\n envValSubstanceCategory: 'EnvValSubstanceCategory'\r\n },\r\n\r\n [tableName.signature]: {\r\n signaturePerson: 'SignaturePerson',\r\n signatureType: 'SignatureType',\r\n signatureDate: 'SignatureDate'\r\n },\r\n\r\n [tableName.economy]: {\r\n costEstimate: 'InsurCostEstimate'\r\n },\r\n\r\n [tableName.checklist]: {\r\n checkListEvaluation: 'CheckListEvaluation'\r\n },\r\n\r\n [tableName.assessment]: {\r\n numberOfAssessments: 'numberOfAssessments'\r\n },\r\n\r\n [tableName.transLog]: {\r\n caseLogs: 'processingLogs',\r\n caseLogNo: 'CaseLogNo'\r\n },\r\n\r\n [tableName.trans]: {\r\n confidential: 'Confidential',\r\n confidentialIndicator: 'confidential'\r\n },\r\n\r\n [tableName.connectedActionView]: {\r\n numberOfConnectedClosedActions: 'ConnectedCaseActViewActComp'\r\n }\r\n};\r\n\r\nexport const statusIndicatorTable: any = {\r\n [tableName.action]: {\r\n statusIndicator: 'actionDueStatus'\r\n }\r\n};\r\n\r\nexport type CaseConnectionIdentifier = { [name: string] : 1 | 2 };\r\n\r\nexport const connectionType: CaseConnectionIdentifier = {\r\n superior: 1,\r\n subordinate: 2\r\n};\r\n\r\nexport const propNameConnectionType = {\r\n [connectionType.superior]: {\r\n numberOfSuperiorCases: 'numberOfSuperiorCases'\r\n },\r\n [connectionType.subordinate]: {\r\n numberOfSubordinateCases: 'numberOfSubordinateCases'\r\n }\r\n};\r\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}\n","import { COMPONENT_ACTIONS } from 'app/infrastructure/ui/builder/component-actions';\r\nimport { columnName, tableName } from 'app/area/case/case-data-model';\r\nimport { scheduleUpdate } from '../platform';\r\n/**\r\n *\r\n * This is the file where you do all configuration to plug a Synergi Life UI Component into the UI engine\r\n *\r\n */\r\n\r\n/**\r\n * Describes the defaults for a component when it's used in the scope of ui-engine\r\n * The most important is 'key' which is required for all components.\r\n *\r\n * @export\r\n * @interface ComponentConfigurations\r\n */\r\nexport interface ComponentConfigurations{\r\n [indexer: string] : {\r\n props: Object,\r\n /**\r\n * List the events this component supports among those listed in [[]]\r\n *\r\n * @type {string[]}\r\n */\r\n events: string[],\r\n /**\r\n * The identitifer in database persisted domain attributes for this component\r\n * e.g 'dateTime' will resolve all 'dateTime.xxx' keys among domain attributes and spread them onto\r\n * the DateTime component\r\n *\r\n * @type {string}\r\n */\r\n attributeKey: string\r\n };\r\n}\r\n\r\nexport enum IteratorType {\r\n DataRows = 1,\r\n CodeTable = 2\r\n}\r\n\r\n/***\r\n * Maps the numeric db representation of a control to a client side component type.\r\n *\r\n * Add your component plus it's database domain type id here.\r\n */\r\nexport enum ControlType {\r\n\r\n NotImplemented = -1,\r\n View = 52,\r\n Panel = 90,\r\n Section = 55,\r\n CallToAction = 22,\r\n ActionBar = 100,\r\n\r\n Schema = 5000,\r\n TextBox = 5001,\r\n TextArea = 5002,\r\n NumberBox = 5003,\r\n DateTime = 5004,\r\n\r\n SelectMultiple = 5005,\r\n SelectMultipleHierarchy = 5006,\r\n\r\n Button = 5007,\r\n CheckBox = 5008,\r\n Form = 5009,\r\n Hidden = 5011, // is this relevant?\r\n\r\n TileView = 5012,\r\n\r\n SelectSingleHierarchy = 5015,\r\n SelectSingle = 5016,\r\n SelectSingleShortList = 5017,\r\n EntityKeyCategorySelectSingleShortList = 5076,\r\n\r\n CommentTileView = 5018,\r\n CommentTile = 5019,\r\n\r\n SliderRating = 5020,\r\n EntityKeyCategorySliderRating = 5048,\r\n\r\n ButtonList = 5021,\r\n\r\n HeaderPanel = 5022,\r\n DisplayCodes = 5023,\r\n DisplayDate = 5024,\r\n DisplayNumber = 5025,\r\n DisplayText = 5026,\r\n\r\n ProcessPanel = 5027,\r\n GroupPanel = 5028,\r\n\r\n FlexPanel = 5029,\r\n FluidPanel = 5030,\r\n ExpandableText = 5031,\r\n ColumnsPanel = 5032,\r\n LinkHeading = 5033,\r\n SectionPanel = 5053,\r\n FlexRowPanel = 5054,\r\n\r\n DetailForm = 5034,\r\n\r\n DisplayChildValues = 5036,\r\n FactBox = 5035,\r\n Badge = 5037,\r\n\r\n ConnectedCasesTileView = 5038,\r\n\r\n FileUploader = 5040,\r\n\r\n TileTopZone = 5041,\r\n\r\n CodeTitleTile = 5043,\r\n\r\n LossPotentialEvaluation = 5042,\r\n LossPotentialConsequenceEvaluation = 5078,\r\n LossPotentialConsequenceEvaluationTileView = 5044,\r\n\r\n CodeSelectorTileView = 5045,\r\n CategoryTileView = 5046,\r\n\r\n LossPotentialEvaluationTileView = 5047,\r\n\r\n DisplayNumericHeader = 5049,\r\n\r\n Tile = 5050,\r\n\r\n DisplayCodesHierarchy = 5051,\r\n\r\n DisplayBoolean = 5052,\r\n\r\n ConsequenceTypeTileView = 5055,\r\n\r\n ConsequenceTileView = 5056,\r\n\r\n ConsequenceTypeTile = 5057,\r\n\r\n LongDescription = 5058,\r\n\r\n ConnectedCasesTile = 5059,\r\n\r\n CategoryTile = 5060,\r\n\r\n CauseCategoryTileView = 5061,\r\n\r\n SectionSummaryPanel = 5063,\r\n\r\n CheckListCategoryTileView = 5064,\r\n\r\n DisplayNumericSum = 5066,\r\n\r\n AttachLinkTileView = 5065,\r\n\r\n DisplaySafeAnchor = 5067,\r\n\r\n AttachLinkTile = 5069,\r\n\r\n CheckListCategoryTile = 5068,\r\n\r\n SafeAnchor = 5070,\r\n\r\n CheckListEvaluationPanel = 5071,\r\n\r\n SubstanceCategoryTileView = 5072,\r\n\r\n EnvironmentalValuesTileView = 5073,\r\n\r\n InteractionTileView = 5074,\r\n\r\n InteractionTile = 5075,\r\n\r\n CausesTileView = 5077,\r\n\r\n DisplayCodesUnitOfMeasure = 5079,\r\n\r\n DisplayNumberUnitOfMeasure = 5080,\r\n\r\n CompactCodeTitleTile = 5081,\r\n\r\n SummaryTileView = 5082,\r\n\r\n TitleWrapperPrimaryKey = 5083,\r\n\r\n LabelPanel = 5084,\r\n\r\n InteractionTileViewDrugReaction = 5085,\r\n\r\n ReferenceTileView = 5086,\r\n\r\n ReferenceDate = 5087,\r\n\r\n ReferenceTextBox = 5088,\r\n\r\n ReferenceNumberBox = 5089,\r\n\r\n ReferenceEntityKeyCategorySelectSingleShortList = 5090,\r\n\r\n ReferenceCheckBox = 5091,\r\n\r\n ReferenceSelectSingleHierarchy = 5092,\r\n\r\n Signature = 5093,\r\n\r\n SurveyLink = 5094,\r\n\r\n ReferenceDateTime = 5095,\r\n\r\n ReferenceSelectSingle = 5096,\r\n\r\n DisplayCodesReference = 5097,\r\n\r\n ReferenceTile = 5098,\r\n\r\n RiskMatrix = 5099,\r\n\r\n DisplayInsuranceBalance = 5102,\r\n\r\n IndicatorCodeSelectorTileView = 5103,\r\n\r\n AddDocumentItemLinkButton = 5104,\r\n\r\n ProcessingLogView = 5105,\r\n ProcessingLogDetails = 5106,\r\n ProcessingLogLink = 5107,\r\n\r\n MailLogLink = 5108,\r\n MailLogDetails = 5109,\r\n CaseLogLink = 5110,\r\n\r\n AddNewCaseButton = 5111,\r\n\r\n CompactTileHeader = 5112,\r\n ConnectedCasesFactbox = 5113,\r\n\r\n CheckForDuplicateRegistrationsButton = 5114,\r\n Link = 5115,\r\n DisplaySurveyLink = 5116,\r\n\r\n LinkSearchExternalProvider = 5117,\r\n\r\n CompactTile = 5118,\r\n\r\n ConnectToBowtieButton = 5119,\r\n\r\n BarrierInspectionTileView = 5220,\r\n\r\n DisplayNumberBarrierInspection = 5221,\r\n\r\n DisplayCodesStatus = 5222,\r\n\r\n SelectSingleSignature = 5223\r\n}\r\n\r\n/**\r\n * This defines the default behaviour for a component, independent of render mode.\r\n *\r\n * Add your prefix for domain attributes (follow the existing pattern) and relevant 'onChange' handler.\r\n *\r\n * NOTE: onBlur and onFocus events gets applied to all components that edit so no need to set them explicitly.\r\n *\r\n */\r\nexport const componentDefaults: ComponentConfigurations = {\r\n\r\n [ControlType.NotImplemented]: {\r\n attributeKey: 'NA',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.View]: {\r\n attributeKey: 'NA',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem]\r\n },\r\n\r\n [ControlType.Panel]: {\r\n attributeKey: 'NA',\r\n events: [],\r\n props: {}\r\n },\r\n\r\n [ControlType.Section]: {\r\n attributeKey: 'NA',\r\n events: [],\r\n props: {}\r\n },\r\n [ControlType.CallToAction]: {\r\n attributeKey: 'NA',\r\n events: [],\r\n props: {}\r\n },\r\n [ControlType.ActionBar]: {\r\n attributeKey: 'NA',\r\n events: [],\r\n props: {}\r\n },\r\n\r\n [ControlType.Schema]: {\r\n attributeKey: 'NA',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DateTime]: {\r\n attributeKey: 'dateTime',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.TextBox]: {\r\n attributeKey: 'textBox',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.NumberBox]: {\r\n attributeKey: 'numberBox',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.SelectMultiple]: {\r\n attributeKey: 'selectMultiple',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.SelectMultipleHierarchy]: {\r\n attributeKey: 'selectMultipleHierarchy',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.SelectSingle]: {\r\n attributeKey: 'selectSingle',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.SelectSingleHierarchy]: {\r\n attributeKey: 'selectSingleHierarchy',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.TextArea]: {\r\n attributeKey: 'textArea',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.TileView]: {\r\n attributeKey: 'tileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.SelectSingleShortList]: {\r\n attributeKey: 'selectSingleShortList',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.EntityKeyCategorySelectSingleShortList]: {\r\n attributeKey: 'selectSingleShortList',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.CommentTile]: {\r\n attributeKey: 'commentTile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.CommentTileView]: {\r\n attributeKey: 'commentTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.SliderRating]: {\r\n attributeKey: 'sliderRating',\r\n props: { scheduleUpdate },\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.EntityKeyCategorySliderRating]: {\r\n attributeKey: 'sliderRating',\r\n props: { scheduleUpdate },\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.ButtonList]: {\r\n attributeKey: 'buttonList',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.HeaderPanel]: {\r\n attributeKey: 'headerPanel',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onEditDocument, COMPONENT_ACTIONS.onDeleteDocument, COMPONENT_ACTIONS.onDuplicateDocument,\r\n COMPONENT_ACTIONS.onLoadBowtie, COMPONENT_ACTIONS.onSubmitDocument, COMPONENT_ACTIONS.onCloseDocument,\r\n COMPONENT_ACTIONS.onLoadPermissions]\r\n },\r\n\r\n [ControlType.DisplayCodes]: {\r\n attributeKey: 'displayCodes',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayCodesUnitOfMeasure]: {\r\n attributeKey: 'displayCodesUnitOfMeasure',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayDate]: {\r\n attributeKey: 'displayDate',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayNumber]: {\r\n attributeKey: 'displayNumber',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayNumberUnitOfMeasure]: {\r\n attributeKey: 'displayNumberUnitOfMeasure',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayText]: {\r\n attributeKey: 'displayText',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.LinkHeading]: {\r\n attributeKey: 'primaryTitle',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.FluidPanel]: {\r\n attributeKey: 'fluidPanel',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ExpandableText]: {\r\n attributeKey: 'expandableText',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ProcessPanel]: {\r\n attributeKey: 'processPanel',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem]\r\n },\r\n\r\n [ControlType.GroupPanel]: {\r\n attributeKey: 'groupPanel',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.FlexPanel]: {\r\n attributeKey: 'flexPanel',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.FluidPanel]: {\r\n attributeKey: 'fluidPanel',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ColumnsPanel]: {\r\n attributeKey: 'columnsPanel',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayChildValues]: {\r\n attributeKey: 'displayCommaSeparatedValues',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.FactBox]: {\r\n attributeKey: 'factBox',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.Badge]: {\r\n attributeKey: 'badge',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ConnectedCasesTileView]: {\r\n attributeKey: 'connectedCasesTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem, COMPONENT_ACTIONS.onSelectDocumentItem]\r\n },\r\n\r\n [ControlType.FileUploader]: {\r\n attributeKey: 'fileUploader',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.CodeSelectorTileView]: {\r\n attributeKey: 'codeSelectorTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.LossPotentialEvaluation]: {\r\n attributeKey: 'lossPotentialEvaluation',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem, COMPONENT_ACTIONS.onCopyDocumentItem]\r\n },\r\n\r\n [ControlType.LossPotentialEvaluationTileView]: {\r\n attributeKey: 'lossPotentialEvaluationTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem, COMPONENT_ACTIONS.onSelectDocumentItem]\r\n },\r\n\r\n [ControlType.CodeTitleTile]: {\r\n attributeKey: 'codeTitleTile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.LossPotentialConsequenceEvaluation]: {\r\n attributeKey: 'lossPotentialConsequenceEvaluation',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem]\r\n },\r\n\r\n [ControlType.LossPotentialConsequenceEvaluationTileView]: {\r\n attributeKey: 'lossPotentialConsequenceEvaluationTileView',\r\n props: { rowClassName: 'col-12 col-sm-6 col-lg-4' },\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.CategoryTileView]: {\r\n attributeKey: 'categoryTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.CategoryTile]: {\r\n attributeKey: 'categoryTile',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DetailForm]: {\r\n attributeKey: 'detailForm',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayNumericHeader]: {\r\n attributeKey: 'displayNumericHeader',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.Tile]: {\r\n attributeKey: 'tile',\r\n props: {},\r\n events: [\r\n COMPONENT_ACTIONS.onSelectDocumentItem,\r\n COMPONENT_ACTIONS.onEditDocumentItem,\r\n COMPONENT_ACTIONS.onDeleteDocumentItem,\r\n COMPONENT_ACTIONS.onCopyDocumentItem\r\n ]\r\n },\r\n\r\n [ControlType.DisplayCodesHierarchy]: {\r\n attributeKey: 'displayCodesHierarchy',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayBoolean]: {\r\n attributeKey: 'displayBoolean',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ConsequenceTypeTileView]: {\r\n attributeKey: 'consequenceTypeTileView',\r\n props: { rowClassName: 'col-12' },\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.ConsequenceTypeTile]: {\r\n attributeKey: 'consequenceTypeTile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.ConsequenceTileView]: {\r\n attributeKey: 'consequenceTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem, COMPONENT_ACTIONS.onSelectDocumentItem]\r\n },\r\n\r\n [ControlType.CheckBox]: {\r\n attributeKey: 'checkBox',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.LongDescription]: {\r\n attributeKey: 'longDescription',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ConnectedCasesTile]: {\r\n attributeKey: 'tile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.CauseCategoryTileView]: {\r\n attributeKey: 'categoryTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.CheckListCategoryTileView]: {\r\n attributeKey: 'categoryTileView',\r\n props: { rowClassName: 'col-12' },\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.CheckListCategoryTile]: {\r\n attributeKey: 'categoryTile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.SectionSummaryPanel]: {\r\n attributeKey: 'sectionSummary',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.TileTopZone]: {\r\n attributeKey: 'tileTopZone',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayNumericSum]: {\r\n attributeKey: 'displayNumericSum',\r\n props: {\r\n strong: true\r\n },\r\n events: []\r\n },\r\n\r\n [ControlType.AttachLinkTileView]: {\r\n attributeKey: 'attachLinkTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.DisplaySafeAnchor]: {\r\n attributeKey: 'displaySafeAnchor',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.AttachLinkTile]: {\r\n attributeKey: 'attachLinkTile',\r\n props: {\r\n enabledChildEntityOperations: { remove: false }\r\n },\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.CheckListEvaluationPanel]: {\r\n attributeKey: 'checkListEvaluationPanel',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.SubstanceCategoryTileView]: {\r\n attributeKey: 'categoryTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.EnvironmentalValuesTileView]: {\r\n attributeKey: 'codeSelectorTileView',\r\n props: { codeDataTag: columnName[tableName.green].envValSubstance },\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.SafeAnchor]: {\r\n attributeKey: 'safeAnchor',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.InteractionTileView]: {\r\n attributeKey: 'categoryTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.InteractionTile]: {\r\n attributeKey: 'codeTitleTile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.CausesTileView]: {\r\n attributeKey: 'codeSelectorTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.CompactCodeTitleTile]: {\r\n attributeKey: 'codeTitleTile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.SummaryTileView]: {\r\n attributeKey: 'summaryTileView',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.TitleWrapperPrimaryKey]: {\r\n attributeKey: 'titleWrapper',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.InteractionTileViewDrugReaction]: {\r\n attributeKey: 'interactionTileViewDrugReaction',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.ReferenceTileView]: {\r\n attributeKey: 'codeSelectorTileView',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.ReferenceTile]: {\r\n attributeKey: 'codeTitleTile',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.ReferenceDate]: {\r\n attributeKey: 'dateTime',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.ReferenceTextBox]: {\r\n attributeKey: 'textBox',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.ReferenceNumberBox]: {\r\n attributeKey: 'numberBox',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.ReferenceEntityKeyCategorySelectSingleShortList]: {\r\n attributeKey: 'selectSingleShortList',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.ReferenceCheckBox]: {\r\n attributeKey: 'checkBox',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.ReferenceDateTime]: {\r\n attributeKey: 'dateTime',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.ReferenceSelectSingleHierarchy]: {\r\n attributeKey: 'selectSingleHierarchy',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.ReferenceSelectSingle]: {\r\n attributeKey: 'selectSingle',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.SurveyLink]: {\r\n attributeKey: 'link',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.Signature]: {\r\n attributeKey: 'signature',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange]\r\n },\r\n\r\n [ControlType.SectionPanel]: {\r\n attributeKey: 'sectionPanel',\r\n props: {\r\n // opt out from null rendering since hide criterias messes up tab ordering\r\n noConditionalRender: true\r\n },\r\n events: [COMPONENT_ACTIONS.onSelectDocumentItem]\r\n },\r\n\r\n [ControlType.RiskMatrix]: {\r\n attributeKey: 'riskMatrix',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n },\r\n\r\n [ControlType.DisplayInsuranceBalance]: {\r\n attributeKey: 'displayInsuranceBalance',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.IndicatorCodeSelectorTileView]: {\r\n attributeKey: 'indicatorCodeSelectorTileView',\r\n props: { rowClassName: 'col-md-6 col-xl-4' },\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions, COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.AddDocumentItemLinkButton]: {\r\n attributeKey: 'addDocumentItemLinkButton',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem]\r\n },\r\n\r\n [ControlType.ProcessingLogView]: {\r\n attributeKey: 'processingLogView',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ProcessingLogDetails]: {\r\n attributeKey: 'processingLogDetails',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ProcessingLogLink]: {\r\n attributeKey: 'processingLogLink',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.CaseLogLink]: {\r\n attributeKey: 'caseLogLink',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.MailLogDetails]: {\r\n attributeKey: 'mailLogDetails',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.MailLogLink]: {\r\n attributeKey: 'mailLogLink',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.AddNewCaseButton]: {\r\n attributeKey: 'addNewCaseButton',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.CompactTileHeader]: {\r\n attributeKey: 'compactTileHeader',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.ConnectedCasesFactbox]: {\r\n attributeKey: 'connectedCasesFactbox',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.Link]: {\r\n attributeKey: 'link',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.CheckForDuplicateRegistrationsButton]: {\r\n attributeKey: 'checkForDuplicateRegistrationsButton',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onAddDocumentItem, COMPONENT_ACTIONS.onDeleteDocumentItem]\r\n },\r\n\r\n [ControlType.DisplaySurveyLink]: {\r\n attributeKey: 'displaySurveyLink',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.LinkSearchExternalProvider]: {\r\n attributeKey: 'linkSearchExternalProvider',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.CompactTile]: {\r\n attributeKey: 'compactTile',\r\n props: {},\r\n events: [\r\n COMPONENT_ACTIONS.onSelectDocumentItem,\r\n COMPONENT_ACTIONS.onEditDocumentItem,\r\n COMPONENT_ACTIONS.onDeleteDocumentItem,\r\n COMPONENT_ACTIONS.onCopyDocumentItem\r\n ]\r\n },\r\n\r\n [ControlType.ConnectToBowtieButton]: {\r\n attributeKey: 'connectToBowtieButton',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.BarrierInspectionTileView]: {\r\n attributeKey: 'barrierInspectionTileView',\r\n props: { rowClassName: 'col-12 col-sm-6 col-lg-4' },\r\n events: []\r\n },\r\n\r\n [ControlType.DisplayNumberBarrierInspection]: {\r\n attributeKey: 'displayNumberBarrierInspection',\r\n props: {},\r\n events: []\r\n },\r\n \r\n [ControlType.DisplayCodesStatus]: {\r\n attributeKey: 'displayCodesStatus',\r\n props: {},\r\n events: []\r\n },\r\n\r\n [ControlType.SelectSingleSignature]: {\r\n attributeKey: 'selectSingleSignature',\r\n props: {},\r\n events: [COMPONENT_ACTIONS.onChange, COMPONENT_ACTIONS.onLoadOptions]\r\n }\r\n};\r\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n// FF49- issue\nvar USES_TO_LENGTH = arrayMethodUsesToLength('map');\n\n// `Array.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","/**\r\n * Exports a set of constants matching the reducer composition that container use to define\r\n * what part of the state shape they operate on\r\n */\r\nexport const STATE = {\r\n app: 'app',\r\n startupArea: 'startupArea',\r\n startupAnonymousArea: 'startupAnonymousArea',\r\n dashboard: 'dashboard',\r\n case: 'caseArea',\r\n responseCaching: 'responseCaching',\r\n favourite: 'favourite',\r\n userSettings: 'userSettings',\r\n userProfile: 'userProfileArea',\r\n administrationCodetable: 'administrationCodetable',\r\n userDefaultValues: 'userDefaultValues',\r\n administrationSearch: 'administrationSearch',\r\n administrationEdit: 'administrationEditArea',\r\n administrationRoleEdit: 'administrationRoleEdit',\r\n companyReport: 'companyReport',\r\n caseListing: 'caseListing',\r\n selectionReport: 'selectionReport',\r\n filters: 'filters',\r\n bowtie: 'bowtie',\r\n savedReport: 'savedReport',\r\n myDownloads: 'myDownloads',\r\n import: 'import',\r\n codeSelector: 'codeSelector',\r\n myNotifications: 'myNotifications',\r\n remoteData: 'remoteDataArea'\r\n};\r\n\r\nexport const textCollection = {\r\n [STATE.app]: 1,\r\n [STATE.startupArea]: 2,\r\n [STATE.startupAnonymousArea]: 20,\r\n [STATE.case]: 7,\r\n [STATE.favourite]: 4,\r\n [STATE.dashboard]: 6,\r\n [STATE.userSettings]: 9,\r\n [STATE.companyReport]: 10,\r\n [STATE.administrationCodetable]: 26,\r\n [STATE.administrationSearch]: 11,\r\n [STATE.administrationEdit]: 12,\r\n [STATE.administrationRoleEdit]: 12,\r\n [STATE.caseListing]: 4,\r\n [STATE.selectionReport]: 15,\r\n [STATE.filters]: 16,\r\n [STATE.savedReport]: 17,\r\n [STATE.myDownloads]: 18,\r\n [STATE.import]: 19,\r\n [STATE.codeSelector]: 21,\r\n [STATE.myNotifications]: 22,\r\n [STATE.bowtie]: 23,\r\n [STATE.userProfile]: 24,\r\n [STATE.userDefaultValues]: 25\r\n};\r\n\r\nexport const TOKEN_KEY = 'sl:access_token';\r\nexport const ID_TOKEN_KEY = 'sl:id_token';\r\n\r\nexport const debounceExecuteFavouriteWait = 300;\r\n","var $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });\nvar FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\n$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {\n return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);\n }\n});\n","var $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar ownKeys = require('../internals/own-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar createProperty = require('../internals/create-property');\n\n// `Object.getOwnPropertyDescriptors` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {\n var O = toIndexedObject(object);\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n var keys = ownKeys(O);\n var result = {};\n var index = 0;\n var key, descriptor;\n while (keys.length > index) {\n descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);\n if (descriptor !== undefined) createProperty(result, key, descriptor);\n }\n return result;\n }\n});\n","import { openReportState } from 'app/area/favourite/constants';\r\n\r\nexport const CodeSelectorFor = {\r\n ConnectedCaseType: 'connectedcasetype',\r\n CaseType: 'casetype',\r\n Dashboard: 'dashboard',\r\n SavedReport: 'savedreport',\r\n CompanyReport: 'companyreport',\r\n ChangeCaseType: 'changecasetype',\r\n CodetableAdministration: 'codetableadministration'\r\n};\r\n\r\nexport const routeName = {\r\n Administration: 'administration',\r\n Bowtie: 'bowtie',\r\n Case: 'case',\r\n CreateDraft: 'create',\r\n CaseReceipt: 'receipt',\r\n ChangeCaseType: 'change-casetype',\r\n Dashboard: 'dashboard',\r\n Draft: 'draft',\r\n Favourite: 'favourite',\r\n UserProfile: 'userprofile',\r\n SavedReport: 'savedreport',\r\n CompanyReport: 'companyreport',\r\n Select: 'select',\r\n MyDownloads: 'mydownloads',\r\n Import: 'import',\r\n Help: 'help',\r\n MessagesToUser: 'messages'\r\n};\r\n\r\nexport enum UserProfileSectionType {\r\n Settings = 'settings',\r\n Notifications = 'notifications',\r\n DefaultValues = 'defaultvalues'\r\n}\r\n\r\nexport const codetableBreadcrumbsPlaceholder = () =>\r\n '(:codetableId0)(/:codetableId1)(/:codetableId2)(/:codetableId3)(/:codetableId4)(/:codetableId5)(/:codetableId6)(/:codetableId7)';\r\n\r\nexport const codetableBreadcrumbs = (breadcrumbs: number[]) =>\r\n !!breadcrumbs && breadcrumbs.length > 0 ? breadcrumbs.reduce((result, breadcrumb) => `${result}/${breadcrumb}`, '') : '';\r\n\r\nexport const routeConstants = {\r\n\r\n startupView: '/',\r\n\r\n draftView: `/${routeName.Draft}/:id(/:level1/:level1)(/:level2/:level2)(/:level3/:level3)(/:level4/:level4)`,\r\n draftViewFor: (draftId: number) => `/${routeName.Draft}/${draftId}`,\r\n\r\n createCase: (caseType: number) => `/${routeName.CreateDraft}/${caseType}`,\r\n createDraft: `/${routeName.CreateDraft}/:caseTypeId`,\r\n\r\n changeCaseTypeTo: (caseType: number) => `/${routeName.ChangeCaseType}/${caseType}`,\r\n changeCaseType: `/${routeName.ChangeCaseType}/:caseTypeId`,\r\n\r\n favouriteFor: (favouriteId: number) => {\r\n return `/${routeName.Favourite}/${favouriteId}`;\r\n },\r\n favouriteDraft: `/${routeName.Favourite}/draft`,\r\n favouriteDraftNew: `/${routeName.Favourite}/${openReportState.new}`,\r\n\r\n casesView: `/${routeName.Favourite}/draft/:favouriteId`,\r\n casesViewFor: (favouriteId: number) => {\r\n return `/${routeName.Favourite}/draft/${favouriteId}`;\r\n },\r\n\r\n caseView: `/${routeName.Case}/:id(/:level1/:level1)(/:level2/:level2)(/:level3/:level3)(/:level4/:level4)`,\r\n caseViewFor: caseNumber => `/${routeName.Case}/${caseNumber}`,\r\n\r\n caseReceipt: `${routeName.CaseReceipt}/:id`,\r\n caseReceiptFor: caseNumber => `/${routeName.CaseReceipt}/${caseNumber}`,\r\n\r\n caseEdit: `/${routeName.Case}/:id(/:level1/:level1)(/:level2/:level2)(/:level3/:level3)(/:level4/:level4)/edit`,\r\n caseEditFor: (caseNumber: number) => {\r\n return `/${routeName.Case}/${caseNumber}/edit`;\r\n },\r\n\r\n caseDuplicate: `/${routeName.Case}/:id/duplicate`,\r\n caseDuplicateFor: (caseNumber: number) => `/${routeName.Case}/${caseNumber}/duplicate`,\r\n\r\n dashboardView: `/${routeName.Dashboard}/:dashboardType/favourite/draft(/:favouriteId)`,\r\n dashboardFor: (dashboardType: number) => {\r\n return `/${routeName.Dashboard}/${dashboardType}/favourite/draft`;\r\n },\r\n\r\n savedReportView: `/${routeName.Favourite}/:favouriteId(/:modifier)`,\r\n\r\n companyReportView: `/${routeName.CompanyReport}/:reportId`,\r\n\r\n savedReportFor: (favouriteId: number) => {\r\n return `/${routeName.Favourite}/${favouriteId}`;\r\n },\r\n companyReportFor: (id: number) => {\r\n return `/${routeName.CompanyReport}/${id}`;\r\n },\r\n\r\n userProfileActiveSection: (activeSection: string) => `/${routeName.UserProfile}/${activeSection}`,\r\n userProfileMainView: `/${routeName.UserProfile}`,\r\n userProfileMainViewFocus: `/${routeName.UserProfile}/:focus`,\r\n userProfileViewWithFocusFor: (id: string) => `/${routeName.UserProfile}/settings?focus=${id}`,\r\n\r\n userSearchView: `/${routeName.Administration}/list`,\r\n roleAdd: `/${routeName.Administration}/role`,\r\n roleAddSection: `/${routeName.Administration}/role(/section/:section)`,\r\n roleAddFor: () => `/${routeName.Administration}/role`,\r\n roleAddSectionFor: (section: string) => `/${routeName.Administration}/role/section/${section}`,\r\n rolesView: `/${routeName.Administration}/roles`,\r\n roleEdit: `/${routeName.Administration}/role/:id(/section/:section)`,\r\n roleEditFor: (id: number) => `/${routeName.Administration}/role/${id}`,\r\n roleEditSectionFor: (id: number, section: string) => `/${routeName.Administration}/role/${id}/section/${section}`,\r\n userAdd: `/${routeName.Administration}/user/:actionType(/section/:section)`,\r\n userAddFor: (actionType: string) => `/${routeName.Administration}/user/${actionType}`,\r\n userAddSectionFor: (section: string) => `/${routeName.Administration}/user/add/section/${section}`,\r\n userEdit: `/${routeName.Administration}/user/:id/:actionType(/section/:section)`,\r\n userEditFor: (userNumber: number) => `/${routeName.Administration}/user/${userNumber}/edit`,\r\n userEditSectionFor: (userNumber: number, section: string) => `/${routeName.Administration}/user/${userNumber}/edit/section/${section}`,\r\n\r\n userDuplicate: `/${routeName.Administration}/user/:id/:actionType(/section/:section)`,\r\n userDuplicateFor: (userNumber: number) => `/${routeName.Administration}/user/${userNumber}/duplicate`,\r\n userDuplicateSectionFor: (userNumber: number, section: string) => `/${routeName.Administration}/user/${userNumber}/duplicate/section/${section}`,\r\n\r\n codetableAdministration: `/${routeName.Administration}/optionsCollection/`,\r\n codetableAdministrationFor: (breadcrumbs: number[]) => `/${routeName.Administration}/optionsCollection${codetableBreadcrumbs(breadcrumbs)}`,\r\n codetableAdministrationOptionsCollection: codetableBreadcrumbsPlaceholder(),\r\n codetableAdministrationCode: `${codetableBreadcrumbsPlaceholder()}/code(/:codeId)(/section/:section)`,\r\n codetableAdministrationCodeFor: (breadcrumbs: number[], codeId: number) =>\r\n `/${routeName.Administration}/optionsCollection${codetableBreadcrumbs(breadcrumbs)}/code/${codeId}`,\r\n codetableAdministrationAddCodeFor: (breadcrumbs: number[], parentId?: number) =>\r\n `/${routeName.Administration}/optionsCollection${codetableBreadcrumbs(breadcrumbs)}/code`\r\n + (parentId !== undefined ? `?parentId=${parentId}` : ''),\r\n codetableAdministrationCodeSectionFor: (breadcrumbs: number[], codeId: number, section: string) =>\r\n `/${routeName.Administration}/optionsCollection${codetableBreadcrumbs(breadcrumbs)}/code/${codeId}/section/${section}`,\r\n codetableAdministrationAddCodeSectionFor: (breadcrumbs: number[], section: string) =>\r\n `/${routeName.Administration}/optionsCollection${codetableBreadcrumbs(breadcrumbs)}/code/add/section/${section}`,\r\n\r\n bowtie: `/${routeName.Bowtie}`,\r\n bowtieView: `/${routeName.Bowtie}/:id`,\r\n\r\n draftPath: `/${routeName.Draft}/:id/:level1/:level1(/:level2/:level2)(/:level3/:level3)`,\r\n casePath: `/${routeName.Case}/:id/:level1/:level1(/:level2/:level2)(/:level3/:level3)(/:level4/:level4)`,\r\n caseSection: (sectionId, expandAll) => `?section=${sectionId}${expandAll ? '&expandAll' : ''}`,\r\n\r\n select: `/${routeName.Select}/:type`,\r\n selectCodetableId: `/${routeName.Select}/:type/${codetableBreadcrumbsPlaceholder()}`,\r\n selectDashboard: `/${routeName.Select}/${CodeSelectorFor.Dashboard}`,\r\n selectCompanyReports: `/${routeName.Select}/${CodeSelectorFor.CompanyReport}`,\r\n selectCaseType: `/${routeName.Select}/${CodeSelectorFor.CaseType}`,\r\n selectChangeCaseType: `/${routeName.Select}/${CodeSelectorFor.ChangeCaseType}`,\r\n selectConnectedCaseType: `/${routeName.Select}/${CodeSelectorFor.ConnectedCaseType}`,\r\n selectSavedReports: `/${routeName.Select}/${CodeSelectorFor.SavedReport}`,\r\n selectCodetableAdministration: `/${routeName.Select}/${CodeSelectorFor.CodetableAdministration}`,\r\n\r\n myDownloadsView: `/${routeName.MyDownloads}`,\r\n importView: `/${routeName.Import}`,\r\n messagesToUserView: `/${routeName.MessagesToUser}`\r\n};\r\n","module.exports = (__webpack_require__(49))(134);","'use strict';\nvar redefine = require('../internals/redefine');\nvar anObject = require('../internals/an-object');\nvar fails = require('../internals/fails');\nvar flags = require('../internals/regexp-flags');\n\nvar TO_STRING = 'toString';\nvar RegExpPrototype = RegExp.prototype;\nvar nativeToString = RegExpPrototype[TO_STRING];\n\nvar NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });\n// FF44- RegExp#toString has a wrong name\nvar INCORRECT_NAME = nativeToString.name != TO_STRING;\n\n// `RegExp.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring\nif (NOT_GENERIC || INCORRECT_NAME) {\n redefine(RegExp.prototype, TO_STRING, function toString() {\n var R = anObject(this);\n var p = String(R.source);\n var rf = R.flags;\n var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);\n return '/' + p + '/' + f;\n }, { unsafe: true });\n}\n","import { routeConstants, codetableBreadcrumbs } from '../../routes/route-constants';\r\nimport isObject from 'lodash/isobject';\r\nimport { Location, History } from 'history';\r\nimport * as routeUrls from './route-urls';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\n\r\nlet historySingleton: any;\r\n\r\n/**\r\n * Instead of relying on the history instance react-router assigns to props\r\n * we ensure that we use that same, configured store for scenarios where we\r\n * don't have component props avaliable.\r\n */\r\nexport function useHistory(historyObject: History) {\r\n historySingleton = historyObject;\r\n}\r\n\r\nexport function toStartupView(replaceCurrent: boolean = false) {\r\n replaceCurrent ? replace(routeConstants.startupView) : to(routeConstants.startupView);\r\n}\r\n\r\nexport function toCaseView(caseNumber: number, replaceCurrent: boolean = false) {\r\n const url = routeUrls.toCaseView(caseNumber);\r\n replaceCurrent ? replace(url) : to(url);\r\n}\r\n\r\nexport function toCaseEdit(caseNumber: number, entityPath: string = '') {\r\n const l = historySingleton.getCurrentLocation();\r\n to({ pathname: routeUrls.toCaseEdit(caseNumber, entityPath), search: l.search });\r\n}\r\n\r\nexport function toCaseDuplicate(caseNumber: number) {\r\n to(routeUrls.toCaseDuplicate(caseNumber));\r\n}\r\n\r\nexport function toCodeSelectView(breadcrumbs: number[]) {\r\n to(routeUrls.toCodeSelectView(codetableBreadcrumbs(breadcrumbs)));\r\n}\r\n\r\nexport function toCreateCase(caseTypeId: number) {\r\n replace(routeUrls.toCreateCase(caseTypeId));\r\n}\r\n\r\nexport function toPrintCaseView(caseUrl: string) {\r\n const current = historySingleton.getCurrentLocation();\r\n\r\n const url = historySingleton.createHref({\r\n pathname: caseUrl || current.pathname,\r\n query: {\r\n ...current.query,\r\n expandAll: true,\r\n print: true\r\n }\r\n });\r\n if (window) {\r\n window.open(url,\r\n 'Print window',\r\n 'menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=800,height=800');\r\n }\r\n}\r\n\r\n/**\r\n * Redirect to a draft, with a optional query string parameter\r\n * @param draftId\r\n * @param querystring passing undefined preserces the current client `location.search` as query string\r\n */\r\nexport function toDraft(draftId: number, queryParams?: any, entityPath: string = '') {\r\n const { query } = queryParams || historySingleton.getCurrentLocation();\r\n replace({ pathname: routeUrls.toDraft(draftId, entityPath), query });\r\n}\r\n\r\nexport function toCaseListing(favouriteId: number) {\r\n to(routeUrls.toCaseListing(favouriteId));\r\n}\r\nexport function toUpdateSavedReport(favouriteId: number) {\r\n to(routeUrls.toUpdateSavedReport(favouriteId));\r\n}\r\n\r\nexport function toSearchView() {\r\n to(routeConstants.favouriteDraft);\r\n}\r\n\r\nexport function toSearchViewWithQuery(query: string) {\r\n to(routeUrls.toSearchViewWithQuery(query));\r\n}\r\n\r\nexport function toDashboardView(dashboardType: number) {\r\n to(routeUrls.toDashboardView(dashboardType));\r\n}\r\n\r\nexport function toBowtie(caseNumber: number, newWindow: boolean = false) {\r\n const url = `/bowtie/${caseNumber}`;\r\n newWindow ? window.open(toAbsoluteUrl(url)) : to(url);\r\n}\r\n\r\nexport function toBowtieConnection(caseNumber: number, searchArg: string) {\r\n const { query } = historySingleton.getCurrentLocation();\r\n const search = `${searchArg}` + (query.section ? `&returnToSection=${query.section}` : '');\r\n to({ pathname: `${routeConstants.bowtie}/${caseNumber}`, search, state: { internal: true } });\r\n}\r\n\r\nexport function toAdminUsersList(internal: boolean = true) {\r\n to({ pathname: routeConstants.userSearchView, state: { internal } });\r\n}\r\n\r\nexport function toAdminRoleList(internal: boolean = true) {\r\n to({ pathname: routeConstants.rolesView, state: { internal } });\r\n}\r\n\r\nexport function toDuplicateUser(id: number) {\r\n to({ pathname: routeConstants.userDuplicateFor(id), state: { internal: false } });\r\n}\r\n\r\nexport function toSelectConnected(searchArg: string) {\r\n const { query } = historySingleton.getCurrentLocation();\r\n const search = `${searchArg}&returnToSection=${query.section}`;\r\n to({ pathname: routeConstants.selectConnectedCaseType, search, state: { internal: true } });\r\n}\r\n\r\nexport function toConnectionInitiator(route: Partial<Location>) {\r\n const { query } = historySingleton.getCurrentLocation();\r\n const search = route.search ? `${route.search}§ion=${query.returnToSection}` : `?section=${query.returnToSection}`;\r\n to({ ...route, search });\r\n}\r\n\r\nexport function toSelectChangeCaseType(draftId: number) {\r\n return () => to({\r\n pathname: routeConstants.selectChangeCaseType,\r\n query: { draftId: draftId.toString() },\r\n state: { internal: true }\r\n }\r\n );\r\n}\r\n\r\nexport const toSearch = (options: { [key: string]: string }) => {\r\n\r\n const { pathname, query } = historySingleton.getCurrentLocation();\r\n const routeArg = { pathname: pathname, query: { ...query, ...options } } as Location;\r\n\r\n to(routeArg);\r\n};\r\n\r\nexport function toSectionURL(id: number | string, explicitPath?: string) {\r\n const { pathname: currentPath } = historySingleton.getCurrentLocation();\r\n const pathname = explicitPath || currentPath;\r\n return `${pathname}?section=${id}`;\r\n}\r\n\r\nexport function toSection(id: number | string, explicitPath?: string) {\r\n const { query: currentQuery, pathname: currentPath } = historySingleton.getCurrentLocation();\r\n if (currentQuery.section === id) {\r\n return;\r\n }\r\n const pathname = explicitPath || currentPath;\r\n // Assume we should clear params of source view when outside path\r\n const query = explicitPath ? undefined : currentQuery;\r\n // Only replace when navigating internally within a document\r\n const route = explicitPath ? to : replace;\r\n route({ pathname, query: { ...query, section: id }, state: { internal: !explicitPath } });\r\n}\r\n\r\nexport function toAllSections() {\r\n const { query, pathname } = historySingleton.getCurrentLocation();\r\n replace({ pathname, query: { ...query, expandAll: true }, state: { internal: true } });\r\n}\r\n\r\nexport function toCurrentSection() {\r\n const { query, pathname } = historySingleton.getCurrentLocation();\r\n const { expandAll: ignored, ...other } = query;\r\n replace({ pathname, query: { ...other }, state: { internal: true } });\r\n}\r\n/**\r\n * Resets the current deep link so that we can open the first invalid section after a server validate response\r\n */\r\nexport function toPrepareSubmit() {\r\n const { pathname, query: { section, ...other } = { section: undefined } } = historySingleton.getCurrentLocation();\r\n replace({ pathname, query: { ...other }, state: { internal: true } });\r\n}\r\n\r\n/**\r\n * Navigates to a new resource, creating a new entry in the browser history\r\n *\r\n * @param route route as string, or a <see ref=\"Location\"/> object\r\n */\r\nexport function to(route: Partial<Location> | string) {\r\n let location = route;\r\n if (!isObject(route)) {\r\n location = { pathname: route as string, state: { internal: false } } as Location;\r\n }\r\n historySingleton.push(location);\r\n}\r\n\r\n/**\r\n * Updates the current browser URL, without adding a new entry in the browser history.\r\n * This prevents the user using\r\n * the back button to come back to the url that *was replaced*.\r\n * @param route\r\n */\r\nexport function replace(route: any) {\r\n let location: Location = route;\r\n if (!isObject(route)) {\r\n location = { pathname: route as string, state: { internal: false } } as Location;\r\n }\r\n historySingleton.replace(location);\r\n}\r\n/**\r\n * Used only when navigating within the case/draft entity hierarchy using deep linking to child entities\r\n */\r\nexport function toChildItem(route: any, sectionId: number, replaceCurrent: boolean = true) {\r\n const { query } = historySingleton.getCurrentLocation();\r\n const routeArg = { pathname: route, query: { ...query, section: sectionId || query.section }, state: { internal: true } } as Location;\r\n replaceCurrent ? replace(routeArg) : to(routeArg);\r\n}\r\n\r\nexport function toMetroLineSection(route: any) {\r\n const { query } = historySingleton.getCurrentLocation();\r\n const routeArg = { pathname: route, query, state: { internal: true } } as Location;\r\n replace(routeArg);\r\n}\r\n\r\nexport function isRouteInPath(path: string, route: string) {\r\n const reg = new RegExp(`^\\/?${route}`);\r\n const search = path.search(reg);\r\n\r\n return search === 0;\r\n}\r\n","import { AppSetting } from 'dependencies/appsettings';\r\nimport { UiState } from '../form/types';\r\nimport { StoreData, StoreDomainMeta, StoreDomainMatch, Entity, RenderMode, ValidationDomainMatch, ValidationMessageLevel } from 'app/types-shared';\r\nimport { toJSON } from 'app/infrastructure/platform';\r\nimport get from 'lodash/get';\r\nimport { getValue as defaultValueGetter } from '../form/selectors';\r\nimport {\r\n ComponentDescriptor, ComponentMetadata, ConnectedComponentProps,\r\n InitialUiEngineProps, ComponentContext, ChildComponentContext\r\n} from '../types-uischema';\r\nimport { ComponentAsyncData } from 'app/infrastructure/ui/form/types';\r\nimport { entityOperation, getById } from 'app/infrastructure/store';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ValidationProps, ValidationLevel } from 'ui';\r\nimport { getStorePath } from 'app/infrastructure/store/path';\r\n\r\n// performance enhancer for immutable data\r\nexport const defaultArray: any = [];\r\n\r\n/**\r\n * Filter entities marked for deletion\r\n * @param item entity to test\r\n */\r\nexport const hasNoPendingDelete = (item: Entity) => item.operation !== entityOperation.REMOVE;\r\n\r\n/**\r\n * Resolves a Entity from the redux store\r\n *\r\n * @param state component application state\r\n * @param props component props\r\n */\r\nexport const getCaseData = (\r\n state: CaseState,\r\n props: InitialUiEngineProps | ConnectedComponentProps,\r\n inclPendingDeletes?: boolean\r\n ): StoreData => {\r\n const hostProps = props.hostProps();\r\n const storeKey = hostProps.entityStoreKey;\r\n\r\n const isEditing = state.editing && Array.isArray(state.editing.values);\r\n const readData = state.entities && state.entities[storeKey];\r\n\r\n return isEditing ? state.editing.values.filter(i => inclPendingDeletes || hasNoPendingDelete(i)) : readData;\r\n};\r\n/**\r\n * Creates a unique ID trail from the current entity.\r\n *\r\n * The ID trails is a combination of application and entity used in callbacks (further used in API calls)\r\n * to identify the current caller context.\r\n *\r\n * If iterating, returns the current id\r\n *\r\n * @param state component application state\r\n * @param props component props of the currently connected component\r\n */\r\nexport const getEntityContext = (state: any, props: any): ComponentContext => {\r\n\r\n if (props.resolveContext) {\r\n // iterated items will have the context pre-baked at this stage\r\n return props.resolveContext;\r\n }\r\n\r\n const hostProps = props.hostProps && props.hostProps() || undefined;\r\n const entityId = !!hostProps && hostProps.entityId;\r\n\r\n if (!state) {\r\n return { path: [], applicationId: undefined, mode: 0 };\r\n }\r\n\r\n return {\r\n path: [{ tblTrans: Number(entityId) }],\r\n applicationId: Number(hostProps && hostProps.applicationId || 0),\r\n mode: state.renderMode\r\n };\r\n};\r\n\r\n/**\r\n * Helper function to get the store path from a component descriptor and its current context.\r\n * @returns Store path or the context path if store path can't be resolved. This happens when the descriptor doesn't have an entityTypePath.\r\n */\r\nexport const contextToStorePath = ({ entityTypePath }: ComponentDescriptor, context: ComponentContext) => {\r\n return getStorePath(entityTypePath, context.path) || context.path;\r\n};\r\n\r\n/**\r\n * Return a value shape with\r\n * - value : number | string | boolean | Date\r\n * - valueItem: ComplexValue\r\n * - valueItems ComplexValue[]\r\n *\r\n * properties for a component\r\n *\r\n * @param state component application state\r\n * @param props component props of the currently connected component\r\n * @param overrideDataTag possibility to override the configured datatag from a container. Used in\r\n * scenarios for e.g data aggregation, that cannot be implemented with the default component configuration.\r\n */\r\nexport const getComponentValues = (\r\n appState: any,\r\n props: any,\r\n overrideDataTag?: string\r\n) => {\r\n const getValue = props.valueSelector || defaultValueGetter;\r\n const caseData: StoreData = getCaseData(appState, props);\r\n const context = getEntityContext(appState, props);\r\n\r\n // Fall back to using the UI context as path.\r\n const entity = getById(caseData, contextToStorePath(props.componentDescriptor, context));\r\n\r\n return getValue(\r\n entity,\r\n overrideDataTag || props.componentDescriptor.dataTag\r\n );\r\n};\r\n\r\nexport const resolveValidations = (\r\n context: ComponentContext, \r\n props: Partial<ConnectedComponentProps>,\r\n domainMetadata: StoreDomainMeta): Partial<ComponentMetadata> => {\r\n\r\n if (!props || !props.componentDescriptor) {\r\n return {};\r\n }\r\n\r\n const domainId = props.componentDescriptor.id;\r\n const allValidations = get(domainMetadata, `[${domainId}].validations`, []) as ValidationDomainMatch[];\r\n const validations = allValidations.filter(v => matchesCurrentValidationContext(context, v));\r\n const validationResult = validations.length && mapToValidationProps(domainId, validations);\r\n\r\n return {\r\n ...(validationResult && { validation: validationResult })\r\n };\r\n};\r\n\r\nexport const mapToValidationProps = (domainId: number, validations: ValidationDomainMatch[]): ValidationProps => {\r\n function getLevel(level: ValidationMessageLevel): ValidationLevel {\r\n return level === ValidationMessageLevel.Error ?\r\n ValidationLevel.error :\r\n ValidationLevel.warning;\r\n }\r\n\r\n function getMaxLevel(levels: ValidationLevel[]): ValidationLevel {\r\n return Math.max(...levels) as ValidationLevel;\r\n }\r\n\r\n return {\r\n domainId,\r\n level: getMaxLevel(validations.map(v => getLevel(v.level))),\r\n messages: validations.map(v => ({\r\n level: getLevel(v.level),\r\n label: v.label,\r\n message: v.message\r\n }))\r\n };\r\n};\r\n\r\nexport const resolveDomainMetadata = \r\n (context: ComponentContext, state: UiState, props: Partial<ConnectedComponentProps>): StoreDomainMeta => \r\n props.renderMode === RenderMode.edit || props.hostProps().renderMode === RenderMode.edit\r\n ?\r\n get(state, 'editing.metadata.domains', {}) as StoreDomainMeta\r\n :\r\n get(state, `metadata[${context.path[0].tblTrans}].domains`, {}) as StoreDomainMeta;\r\n\r\nexport const resolveHasAnyValidations = (domainMetadata: StoreDomainMeta): { hasErrors: boolean, hasWarnings: boolean } => \r\n Object.keys(domainMetadata)\r\n .reduce((aggr, current) => {\r\n aggr.hasErrors = aggr.hasErrors || (!!domainMetadata[current].validations && \r\n domainMetadata[current].validations.some(v => v.level === ValidationMessageLevel.Error));\r\n aggr.hasWarnings = aggr.hasWarnings || (!!domainMetadata[current].validations &&\r\n domainMetadata[current].validations.some(v => v.level === ValidationMessageLevel.Warning));\r\n return aggr;\r\n }, {\r\n hasErrors: false,\r\n hasWarnings: false\r\n });\r\n\r\nexport const resolveWarnings = (domainMetadata: StoreDomainMeta) => { \r\n let warnings: any = []; \r\n Object.keys(domainMetadata).map(item => { \r\n !!domainMetadata[item].validations && warnings.push(domainMetadata[item].validations\r\n .filter(v=>v.level === ValidationMessageLevel.Warning)); \r\n }); \r\n warnings = warnings && warnings.reduce((aggr, curr)=>aggr.concat(curr),[]) //merge list of warnings in a single array\r\n .map((item, i)=>Object.assign({key: i}, item)); //assign unique key to all rows to handle duplicate rows\r\n \r\n return warnings;\r\n};\r\n\r\n/**\r\n * Returns metadata properties (validationErrors and readonly attributes) for a component\r\n *\r\n * @param state component application state\r\n * @param props component props of the currently connected component\r\n */\r\nexport const getComponentMetadata = (\r\n state: UiState,\r\n props: Partial<ConnectedComponentProps>\r\n ): ComponentMetadata => {\r\n\r\n if (!state || !props || !props.componentDescriptor) {\r\n return {};\r\n }\r\n\r\n const context = getEntityContext(state, props);\r\n const domainMetadata = resolveDomainMetadata(context, state, props);\r\n\r\n const domainAttributes = domainMetadata[props.componentDescriptor.id];\r\n const resolvedDomainAttributes: Partial<ComponentMetadata> = {};\r\n\r\n if (domainAttributes && domainAttributes.readOnly) {\r\n resolvedDomainAttributes.readOnly = matchesCurrentContext(context, domainAttributes.readOnly);\r\n }\r\n if (domainAttributes && domainAttributes.requiredField) {\r\n resolvedDomainAttributes.requiredField = matchesCurrentContext(context, domainAttributes.requiredField);\r\n }\r\n if (domainAttributes && domainAttributes.hidden) {\r\n resolvedDomainAttributes.hidden = matchesCurrentContext(context, domainAttributes.hidden);\r\n }\r\n\r\n return {\r\n ...resolveValidations(context, props, domainMetadata),\r\n ...resolvedDomainAttributes\r\n };\r\n};\r\n\r\n/**\r\n * For validations, we want a validation to be returned if it matches the current context fully.\r\n * If we're rendering a panel on case level, context = { tblTrans: x }\r\n * A validation fails for an action, which has entityPath { tblTrans: x, TblAction: 4 }\r\n * We want this validation to be returned.\r\n * @param currentContext Current resolveContext being rendered\r\n * @param match Current criteria match to check\r\n */\r\nexport function matchesCurrentValidationContext(currentContext: ComponentContext, match: StoreDomainMatch) {\r\n if (match.globalMatch) {\r\n return true;\r\n }\r\n const entityPaths = match.entityPaths;\r\n return (\r\n !!entityPaths &&\r\n entityPaths.some(\r\n row =>\r\n currentContext.path.filter(p => !p.tblTrans).every(c =>\r\n row.some(tablePk => {\r\n const key = Object.keys(tablePk)[0];\r\n return key && c[key] === tablePk[key];\r\n })\r\n )\r\n )\r\n );\r\n}\r\n\r\n/**\r\n * For readOnly, hide, etc. we want a match to be returned if the entityPath is fully matched by the current context.\r\n * Let's say we're rendering a sub-table of the action table:\r\n * context = { tblTrans: x, TblAction: 5, TblActionSubTable: 4 }\r\n * We have a hide criteria that has returned a match that goes for the whole action:\r\n * entityPath { tblTrans: x, TblAction: 5 }\r\n * We want this to match, even tho the current context is \"deeper\".\r\n * @param currentContext Current resolveContext being rendered\r\n * @param match Current criteria match to check\r\n */\r\nexport function matchesCurrentContext(currentContext: ComponentContext, match: StoreDomainMatch) {\r\n if (match.globalMatch) {\r\n return true;\r\n }\r\n const entityPaths = match.entityPaths;\r\n return (\r\n !!entityPaths &&\r\n entityPaths.some( // at least one entitypath...\r\n row =>\r\n row.every( // ...must have a row that completely matches the current context\r\n tablePk => currentContext.path.some(\r\n c => {\r\n const key = Object.keys(tablePk)[0];\r\n return key && c[key] === tablePk[key];\r\n }\r\n )\r\n )\r\n )\r\n );\r\n}\r\n\r\nexport const resolveVisibleSections = (availableSections: ComponentDescriptor[], state: CaseState, props: any): ComponentDescriptor[] => {\r\n return availableSections.filter(s =>\r\n !getComponentMetadata(state, {\r\n componentDescriptor: s,\r\n renderMode: state.renderMode,\r\n resolveContext: props.resolveContext,\r\n hostProps: () => ({renderMode: state.renderMode}) }).hidden\r\n );\r\n};\r\n\r\nexport const getComponentUid = (componentContext: ComponentContext): string =>\r\n componentContext ? toJSON({\r\n path: componentContext.path,\r\n mode: componentContext.mode,\r\n applicationId: componentContext.applicationId,\r\n primaryKey: (componentContext as ChildComponentContext).primaryKey\r\n }) : undefined;\r\n\r\nexport const getComponentDataKey = (descriptor: ComponentDescriptor, componentContext: ComponentContext) => {\r\n\r\n return toJSON({\r\n applicationId: componentContext.applicationId,\r\n path: componentContext.path,\r\n domainId: descriptor.id\r\n });\r\n};\r\n\r\n/**\r\n * Get temporary data stored for component, typically async-fetched **code table data**\r\n */\r\nexport const getComponentData = (state: any, descriptor: ComponentDescriptor, componentContext: ComponentContext): ComponentAsyncData => {\r\n\r\n const componentDataKey = getComponentDataKey(descriptor, componentContext);\r\n\r\n let componentOptions =\r\n state && state.tempdata ? state.tempdata[componentDataKey] : defaultArray;\r\n\r\n if (componentOptions === undefined) {\r\n componentOptions = defaultArray;\r\n }\r\n\r\n return componentOptions;\r\n};\r\n\r\n/**\r\n * Our built-in inspector needs these extra props to render\r\n */\r\nexport const getInspectorPropsWhenDebugging = (state: UiState, props: InitialUiEngineProps) =>\r\n AppSetting.ComponentDebug ?\r\n ({\r\n // Used by our component inspector\r\n actions: props.actions,\r\n componentDescriptor: props.componentDescriptor,\r\n $inspectedComponent: (state as any).$inspectedComponent,\r\n preview: get(state, '$inspectedChanges.componentId') === get(props, 'componentDescriptor.id') && state.$inspectedChanges\r\n }) : ({});\r\n","export * from './remote-data';\r\nexport * from './http';\r\nexport * from './constants';\r\n","module.exports = (__webpack_require__(49))(538);","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","\r\n/**\r\n * Possible external events a component can support\r\n *\r\n * Name of event may be a DOM event, or a custom component event\r\n */\r\nexport const COMPONENT_ACTIONS = {\r\n\r\n onChange: 'onChange',\r\n onClick: 'onClick',\r\n\r\n onLoadOptions: 'onLoadOptions',\r\n onSearch: 'onSearch',\r\n\r\n onAddDocumentItem: 'onAddDocumentItem',\r\n onEditDocumentItem: 'onEditDocumentItem',\r\n onDeleteDocumentItem: 'onDeleteDocumentItem',\r\n onSelectDocumentItem: 'onSelectDocumentItem',\r\n onCopyDocumentItem: 'onCopyDocumentItem',\r\n\r\n onEditDocument: 'onEditDocument',\r\n onDeleteDocument: 'onDeleteDocument',\r\n onDuplicateDocument: 'onDuplicateDocument',\r\n\r\n onSubmitDocument: 'onSubmitDocument',\r\n onCloseDocument: 'onCloseDocument',\r\n\r\n onLoadBowtie: 'onLoadBowtie',\r\n onLoadPermissions: 'onLoadPermissions'\r\n};\r\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar classof = require('../internals/classof-raw');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = NativePromise;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = getBuiltIn('fetch');\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar IS_NODE = classof(process) == 'process';\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);\n if (!GLOBAL_CORE_JS_PROMISE) {\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (V8_VERSION === 66) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;\n }\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n return !(promise.then(function () { /* empty */ }) instanceof FakePromise);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (promise, state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(promise, state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (handler = global['on' + name]) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (promise, state) {\n task.call(global, function () {\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (promise, state) {\n task.call(global, function () {\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, promise, state, unwrap) {\n return function (value) {\n fn(promise, state, value, unwrap);\n };\n};\n\nvar internalReject = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(promise, state, true);\n};\n\nvar internalResolve = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, promise, wrapper, state),\n bind(internalReject, promise, wrapper, state)\n );\n } catch (error) {\n internalReject(promise, wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(promise, state, false);\n }\n } catch (error) {\n internalReject(promise, { done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n } catch (error) {\n internalReject(this, state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(this, state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, promise, state);\n this.reject = bind(internalReject, promise, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && typeof NativePromise == 'function') {\n nativeThen = NativePromise.prototype.then;\n\n // wrap native Promise#then for native async functions\n redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // wrap fetch result\n if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars\n fetch: function fetch(input /* , init */) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n }\n });\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.github.io/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.github.io/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.github.io/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.github.io/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $find = require('../internals/array-iteration').find;\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar FIND = 'find';\nvar SKIPS_HOLES = true;\n\nvar USES_TO_LENGTH = arrayMethodUsesToLength(FIND);\n\n// Shouldn't skip holes\nif (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.find` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.find\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND);\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n!(function(global) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n var inModule = typeof module === \"object\";\n var runtime = global.regeneratorRuntime;\n if (runtime) {\n if (inModule) {\n // If regeneratorRuntime is defined globally and we're in a module,\n // make the exports object identical to regeneratorRuntime.\n module.exports = runtime;\n }\n // Don't bother evaluating the rest of this file if the runtime was\n // already defined globally.\n return;\n }\n\n // Define the runtime globally (as expected by generated code) as either\n // module.exports (if we're in a module) or a new, empty object.\n runtime = global.regeneratorRuntime = inModule ? module.exports : {};\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n runtime.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n runtime.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n runtime.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n runtime.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return Promise.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return Promise.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration. If the Promise is rejected, however, the\n // result for this iteration will be rejected with the same\n // reason. Note that rejections of yielded Promises are not\n // thrown back into the generator function, as is the case\n // when an awaited Promise is rejected. This difference in\n // behavior between yield and await is important, because it\n // allows the consumer to decide what to do with the yielded\n // rejection (swallow it and continue, manually .throw it back\n // into the generator, abandon iteration, whatever). With\n // await, by contrast, there is no opportunity to examine the\n // rejection reason outside the generator function, so the\n // only option is to throw it from the await expression, and\n // let the generator function handle the exception.\n result.value = unwrapped;\n resolve(result);\n }, reject);\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n runtime.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n runtime.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return runtime.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n if (delegate.iterator.return) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n runtime.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n runtime.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n})(\n // In sloppy mode, unbound `this` refers to the global object, fallback to\n // Function constructor if we're in global strict mode. That is sadly a form\n // of indirect eval which violates Content Security Policy.\n (function() { return this })() || Function(\"return this\")()\n);\n","import { Reducer } from 'redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ACTION, DeleteUserMessage, SuccessNotification } from './action-types';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\n\r\n/**\r\n * Reducers for user messages.\r\n */\r\nconst reducers = {\r\n\r\n /**\r\n * Add user messages\r\n */\r\n [ACTION.DISPLAY_USER_MESSAGE]: (state: any, action: SuccessNotification | ErrorNotification) => {\r\n\r\n return {\r\n ...state,\r\n ...{\r\n app: {\r\n ...state.app,\r\n messages: [\r\n // prevent duplicates\r\n ...state.app.messages.filter(m => !deepEquals(m.data, action.message)),\r\n action.message\r\n ]\r\n }\r\n }\r\n };\r\n\r\n },\r\n\r\n /**\r\n * Removes user message from the ui\r\n */\r\n [ACTION.DELETE_USER_MESSAGE]: (state: any, action: DeleteUserMessage) => {\r\n return {\r\n ...state,\r\n ...{\r\n app: {\r\n ...state.app,\r\n messages: state.app.messages.filter(m => !deepEquals(m, action.message))\r\n }\r\n }\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<any> = (state : ApplicationState, action: any) => {\r\n\r\n const r: any = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { ACTION, DeleteUserMessage, ErrorNotification } from './action-types';\r\n\r\nexport const removeAfter = 5000;\r\n\r\nimport get from 'lodash/get';\r\n\r\nexport const userMessages = (store: Redux.Store<any>) => (next: any) => (action: any) => {\r\n const errorMessages = get(action, 'error.userMessages');\r\n\r\n if (Array.isArray(errorMessages)) {\r\n\r\n errorMessages.forEach(m => {\r\n store.dispatch(new ErrorNotification(\r\n m.message\r\n ));\r\n });\r\n }\r\n\r\n if (action && !!action.message && action.type === ACTION.DISPLAY_USER_MESSAGE) {\r\n \r\n if (!!store.getState() && !!store.getState().app && Array.isArray(store.getState().app.messages)) {\r\n\r\n const isDuplicate = store.getState().app.messages.some(message => \r\n message.message === action.message.message && message.type === action.message.type);\r\n \r\n if (isDuplicate) {\r\n return;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * The UX is more consistent if we show and dispose messages, otherwise they might re-appear when re-rendering\r\n */\r\n setTimeout(() => {\r\n store.dispatch(new DeleteUserMessage(action.message));\r\n }, removeAfter);\r\n\r\n }\r\n\r\n next(action);\r\n};\r\n","export * from './action-types';\r\nexport * from './reducers';\r\nexport * from './user-messages-middleware';\r\n","import { isDevelopment, ENVIRONMENT_VAR, getEnvironmentVariable } from '../universal';\r\nimport { notifyError } from 'app/infrastructure/notifications';\r\n\r\n/* tslint:disable */\r\n\r\n/**\r\n * IMPORTANT NOTE: Logging is considered a side-effect from a functional perspective.\r\n *\r\n * Logging should therefore never be performed from withing a reducer or an execution path\r\n * originating from within a reducer\r\n */\r\n\r\n/**\r\n * Log detailed info only visible in development or when appsetting ClientDebugLog is true.\r\n * This should be a app setting loaded from server.\r\n *\r\n * console.debug wrapper with fallback to console.log\r\n * @export\r\n * @param {string} message\r\n * @param {...any[]} args\r\n */\r\nexport function debug(message: string, ...args: any[]) {\r\n\r\n if (\r\n !isDevelopment &&\r\n !getEnvironmentVariable(ENVIRONMENT_VAR.ClientDebugLog)) {\r\n\r\n return;\r\n }\r\n\r\n if (typeof (console) === \"undefined\") return;\r\n const hasDebug = console && typeof console.debug !== \"undefined\";\r\n hasDebug ? console.debug(message, ...args) : console.log(message, ...args);\r\n\r\n}\r\n\r\n/**\r\n * Note: non-pure code with side effects\r\n *\r\n * Use for centralized logging about application state and execution\r\n *\r\n * @export\r\n * @param {string} message\r\n * @param {...any[]} args\r\n */\r\nexport function log(message: string, ...args: any[]) {\r\n console.log(message, ...args);\r\n}\r\n\r\nfunction deconstruct(errorOrMessage: any, ...args: any[]): string[]{\r\n\r\n if (typeof errorOrMessage === 'string'){\r\n return [errorOrMessage, ...args];\r\n }\r\n\r\n const errorStrategies = [\r\n\r\n function httpErrorWithMessages(err: any): string[]{\r\n if (err && err.response){\r\n if (Array.isArray(err.userMessages)){\r\n return [err.message, err.userMessages.join('\\n')];\r\n }\r\n return [err.message, err.response.statustext];\r\n }\r\n return undefined;\r\n },\r\n\r\n function normalError(err: any): string[]{\r\n return [err.message];\r\n }\r\n\r\n ];\r\n\r\n return errorStrategies.map(strategy => strategy(errorOrMessage)).filter(defined=>defined)[0];\r\n\r\n}\r\n\r\n/**\r\n * NOTE: non-pure with side-effects. Do not use from reducer. Use `log()` instead.\r\n *\r\n * Used for centralized handling of *unexpected* errors in a try-catch context.\r\n *\r\n * Forwards the error to logging mechanisms\r\n *\r\n * @export\r\n * @param {string} message\r\n * @param {...any[]} args\r\n */\r\nexport function error(messageOrError: string, ...args: any[]) {\r\n\r\n if (console && console.error) {\r\n console.error(messageOrError, ...args);\r\n } else if (console) {\r\n console.log(messageOrError, ...args);\r\n }\r\n const [message, ...details] = deconstruct(messageOrError, ...args);\r\n notifyError( message, details.join(' ') );\r\n}\r\n\r\n/**\r\n * DO NOT USE - unless you know what you are doing\r\n *\r\n * Fatal errors only occurs on application start, or in\r\n * selected exceptional states\r\n *\r\n * > This message cannot be translated as the app may not have the app itself mounted\r\n */\r\nexport function fatal(errorMessage: string, ...args: any[]){\r\n\r\n const details: string = args.length ? args[0] : '';\r\n\r\n notifyError('Synergi life encountered a fatal error', `${errorMessage} ${details}` );\r\n\r\n // cannot use error() here as it will overflow\r\n console.error(errorMessage, ...args);\r\n\r\n}\r\n\r\n/**\r\n * Use invariant() to assert state which your program assumes to be true.\r\n * The invariant message is stripped in production and replaced with a generic message.\r\n *\r\n * @param {boolean} condition The condition expected to be *true*. If false then the error will be thrown.\r\n */\r\nconst DEFAULT_PROD_MESSAGE = 'Error (invariant violation)';\r\nexport function invariant(condition: boolean, message: string, ...rest: any[]) {\r\n if (!condition) {\r\n if (!isDevelopment) {\r\n throw new Error(DEFAULT_PROD_MESSAGE);\r\n }\r\n const err = new Error(`${message} \\n ${rest.join('\\n')}`);\r\n err.name = 'Invariant violation';\r\n throw err;\r\n }\r\n}\r\n/* tslint:enable */\r\n","import * as React from 'react';\r\nimport { UserMessage } from 'app/types-shared';\r\nimport { ToastContainer, toast } from 'react-toastify';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport MdClose from 'react-icons/lib/md/close';\r\nimport styles from './toastify-override.scss';\r\n\r\ninterface MessageProps {\r\n messages: UserMessage[];\r\n}\r\n\r\nconst CustomCloseButton = (toastProps: any) => {\r\n const { closeToast, ...validProps } = toastProps;\r\n return <MdClose {...validProps} />;\r\n};\r\n\r\nexport class MessagePanel extends React.PureComponent<MessageProps> {\r\n public componentDidUpdate(prevProps: MessageProps) {\r\n const { messages: currentMessages } = prevProps;\r\n const { messages: pendingMessages = [] } = this.props;\r\n\r\n if (\r\n deepEquals(currentMessages, pendingMessages) ||\r\n !pendingMessages.length\r\n ) {\r\n return;\r\n }\r\n\r\n pendingMessages.forEach(message => toast.dismiss(message.id));\r\n\r\n const icon = <CustomCloseButton width=\"20\" height=\"20\" />;\r\n\r\n pendingMessages\r\n .filter(m => currentMessages.indexOf(m) === -1)\r\n .forEach(m => {\r\n const mgs = (\r\n <div>\r\n {m.title && <div className={styles.title}>{m.title}</div>}\r\n <div>{m.message}</div>\r\n </div>\r\n );\r\n\r\n if (m.type === 'success') {\r\n toast.success(mgs, {\r\n position: toast.POSITION.TOP_LEFT,\r\n closeButton: icon,\r\n className: styles.success,\r\n progressClassName: styles.successProgress\r\n });\r\n }\r\n if (m.type === 'error') {\r\n toast.error(mgs, {\r\n position: toast.POSITION.TOP_LEFT,\r\n closeButton: icon,\r\n className: styles.error,\r\n progressClassName: styles.errorProgress\r\n });\r\n }\r\n });\r\n }\r\n\r\n public componentWillUnmount() {\r\n const { messages = [] } = this.props;\r\n messages.forEach(message => toast.dismiss(message.id));\r\n }\r\n\r\n public render() {\r\n\r\n return <ToastContainer\r\n position=\"top-left\"\r\n style={{ zIndex: '2001' }}\r\n autoClose={5000}\r\n hideProgressBar={false}\r\n newestOnTop={false}\r\n className={styles.container}\r\n closeOnClick\r\n pauseOnHover\r\n />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport styles from './big-svg-checkbox.scss';\r\n\r\nexport interface BigSVGCheckboxProps {\r\n isChecked: boolean;\r\n}\r\n\r\nexport const BigSVGCheckbox = (props:BigSVGCheckboxProps) => (\r\n <div className={`${styles.bigCheckbox} big ${props.isChecked ? styles.isChecked : ''}`}>\r\n <svg viewBox=\"8742 1111 22 22\" height=\"22px\" width=\"22px\">\r\n <g transform=\"translate(7701 554)\">\r\n <rect fill=\"#fff\" width=\"20\" height=\"20\" transform=\"translate(1042 558)\"/>\r\n <path className={styles.check}\r\n // tslint:disable-next-line:max-line-length\r\n d=\"M798.656,976.4a2.219,2.219,0,0,1,1.711.733,2.413,2.413,0,0,1,.733,1.711v17.111a2.506,2.506,0,0,1-2.444,2.445H781.545a2.22,2.22,0,0,1-1.711-.733,2.413,2.413,0,0,1-.733-1.711V978.845a2.506,2.506,0,0,1,2.445-2.444Zm-11,17.111,11-11-1.711-1.833-9.289,9.289-4.4-4.4-1.711,1.711Z\"\r\n transform=\"translate(261.9 -419.4)\" />\r\n <path className={styles.border}\r\n // tslint:disable-next-line:max-line-length\r\n d=\"M835.656,976.4a2.506,2.506,0,0,1,2.444,2.444v17.111a2.506,2.506,0,0,1-2.444,2.445H818.544a2.506,2.506,0,0,1-2.444-2.445V978.845a2.506,2.506,0,0,1,2.444-2.444Zm0,2.444H818.544v17.111h17.111Z\" transform=\"translate(224.9 -419.4)\" />\r\n </g>\r\n </svg>\r\n </div>\r\n);\r\n","import * as React from 'react';\r\nimport MdArrowDropDown from 'react-icons/lib/md/arrow-drop-down';\r\nimport MdFolder from 'react-icons/lib/md/folder';\r\nimport { Tooltip } from 'ui/common/tooltip/tooltip';\r\nimport { BigSVGCheckbox } from 'app/components/code-selector/big-svg-checkbox';\r\nimport { SelectOptionValue } from 'app/area/code-selector/types';\r\nimport styles from './select-option-button.scss';\r\n\r\nexport interface SelectOptionButtonProps {\r\n data: SelectOptionValue;\r\n onClick: (caseType: SelectOptionValue) => void;\r\n onExpand: (item: SelectOptionValue) => void;\r\n checkbox: {checkedState: boolean};\r\n}\r\n\r\nexport class SelectOptionButton extends React.PureComponent<SelectOptionButtonProps, any> {\r\n private onClick = (e: any) => {\r\n e.preventDefault();\r\n if (this.props.onClick) {\r\n this.props.onClick(this.props.data);\r\n }\r\n }\r\n\r\n private onExpand = (e: any) => {\r\n e.preventDefault();\r\n this.props.onExpand(this.props.data);\r\n }\r\n\r\n public render() {\r\n const { data, checkbox } = this.props;\r\n\r\n const icon = !!data.icon && <img className={`${styles.selectCodeBtnIcon}`} src={data.icon} />;\r\n const folder = <MdFolder className={`${styles.selectCodeBtnIcon}`} />;\r\n\r\n const isFolder = !!data.descendants && data.descendants.length > 0;\r\n\r\n const isCheckedClass = !!checkbox && !!checkbox.checkedState ? styles.isChecked : styles.notChecked;\r\n\r\n return (<li className={`col-6 col-md-4 col-lg-3 col-xl-2 ${styles.selectOptionCheckbox} select-option ${isCheckedClass}`}>\r\n <button onClick={isFolder ? this.onExpand : this.onClick}>\r\n <Tooltip className={`${styles.selectCodeBtn} ${isFolder && styles.selectFolder}`} title={data.longDescription}>\r\n {isFolder ? folder : icon}\r\n <span className={`${styles.selectCodeBtnTitle}`}>{data.description}{isFolder && <MdArrowDropDown />}</span>\r\n { !!checkbox && !isFolder && <BigSVGCheckbox isChecked={!!checkbox.checkedState}/> }\r\n </Tooltip>\r\n </button>\r\n </li>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport { MultiKeyValueComponent } from 'ui';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { SelectOptionButton } from 'app/components/code-selector/select-option-button';\r\nimport { ElementLoader } from 'ui/common/element-loader/element-loader';\r\n\r\nexport interface MultipleCodeSelectorProps extends MultiKeyValueComponent<number> {\r\n title: string;\r\n selectedOptions: ComplexValue<number>[];\r\n onClose: () => void;\r\n onCodeSelected: (code: ComplexValue<number>) => void;\r\n textDone: string;\r\n}\r\n\r\nexport interface MultipleCodeSelectorState {\r\n adding: boolean;\r\n}\r\n\r\nexport class MultipleCodeSelector extends React.Component<MultipleCodeSelectorProps, MultipleCodeSelectorState> {\r\n public static defaultProps: Partial<MultipleCodeSelectorProps> = {\r\n loadOptions: { query: '' },\r\n readOnly: false\r\n };\r\n\r\n public static getDerivedPropsFromState(props:MultipleCodeSelectorProps, state:MultipleCodeSelectorState) {\r\n return {\r\n adding: false\r\n };\r\n }\r\n\r\n public state: Readonly<MultipleCodeSelectorState> = {\r\n adding: false\r\n };\r\n\r\n private onSelectCode = (code: any) => {\r\n if (!this.state.adding && !!code) {\r\n this.setState({\r\n ...this.state,\r\n adding: true\r\n }, () => this.props.onCodeSelected(code));\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: MultipleCodeSelectorProps) {\r\n if(this.props !== prevProps) {\r\n this.setState({adding: false});\r\n }\r\n }\r\n\r\n public render() {\r\n const { options, textDone } = this.props;\r\n\r\n return (<div>\r\n <DialogExpander\r\n title={this.props.title}\r\n onClose={this.props.onClose}\r\n textDone={textDone}\r\n >\r\n {this.renderCodeList(options)}\r\n </DialogExpander>\r\n </div>);\r\n }\r\n\r\n private renderCodeList(options: ComplexValue<number>[]) {\r\n\r\n return (\r\n <ul className=\"row align-items-stretch\">\r\n {!options ? <ElementLoader /> : options.map(c => this.renderCode(c))}\r\n </ul>\r\n );\r\n }\r\n\r\n private renderCode(option: ComplexValue<number>) {\r\n const isSelected = !!this.props.selectedOptions.find(sc => option.value === sc.value);\r\n const checkbox = { checkedState: isSelected };\r\n\r\n return <SelectOptionButton\r\n key={`${option.value}`}\r\n data={option}\r\n onClick={!isSelected && this.onSelectCode}\r\n onExpand={undefined}\r\n checkbox={checkbox}\r\n />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { RowContainerComponentProps, Textarea, ButtonPrimary } from 'ui';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport styles from './comment-input.scss';\r\n\r\n/**\r\n * Creates CommentInput component. Represents input field for adding comments.\r\n *\r\n */\r\n\r\n interface CommentInputTranslations {\r\n /**\r\n * The label text for the add button\r\n */\r\n textAddItem?: string;\r\n /**\r\n * Placeholder text for the input\r\n */\r\n placeholder?: string;\r\n }\r\n\r\nexport interface CommentInputProps extends RowContainerComponentProps, CommentInputTranslations {\r\n\r\n onAddDocumentItem?: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n /**\r\n * Function that will transform the input text into the final argument passed into onAddDocumentItem callback as argument\r\n */\r\n valueFormatter?: (text: string) => any;\r\n /**\r\n * Maximum length of characters allowed in the text field. Default is 4000.\r\n */\r\n maxLength?: number;\r\n}\r\n\r\nexport class CommentInput extends React.PureComponent<CommentInputProps, any> {\r\n public static defaultProps: Partial<CommentInputProps> = {\r\n maxLength: 4000\r\n };\r\n\r\n public state: Readonly<any> = {\r\n input: ''\r\n };\r\n\r\n private onChange = (value: string) => {\r\n this.setState({input: value});\r\n }\r\n\r\n private commentIsEmpty = (): boolean => !(this.state.input && !(this.state.input.match(/^\\s+$/)));\r\n\r\n private handleAddComment = () => {\r\n\r\n if (this.props.onAddDocumentItem && !this.commentIsEmpty()) {\r\n const args = this.props.valueFormatter && this.props.valueFormatter(this.state.input);\r\n this.props.onAddDocumentItem(false, { initialValues: args } as AddDocumentItemOptions);\r\n this.setState({input: ''});\r\n }\r\n }\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n textAddItem,\r\n placeholder,\r\n enabledChildEntityOperations = { add: false },\r\n maxLength\r\n } = this.props;\r\n\r\n const userImg = <div className={styles.userIcon}/>;\r\n\r\n const textArea = <Textarea componentId={componentId} className={styles.commentInput}\r\n value={this.state.input} onChange={this.onChange} placeholder={placeholder}\r\n wait={100} maxLength = {maxLength}/>;\r\n\r\n const addButton = <div className=\"input-group-btn\">\r\n <ButtonPrimary disabled={this.commentIsEmpty()} onClick={this.handleAddComment}>\r\n {textAddItem}\r\n </ButtonPrimary>\r\n </div>;\r\n\r\n return (\r\n <div className={`${styles.commentInputContainer} form-group`}>\r\n <div className={styles.userIconWrapper}>\r\n {userImg}\r\n {textArea}\r\n </div>\r\n {enabledChildEntityOperations.add && addButton}\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { CommentInput } from './comment-input/comment-input';\r\nimport { RowContainerComponentProps, ValidationSummary } from 'ui';\r\nimport styles from './comment-tile-view.scss';\r\n\r\n/**\r\n * Creates Comment component. Consists of comments list and an input field.\r\n *\r\n */\r\ninterface CommentTileViewTranslations {\r\n /**\r\n * The label text for the add button\r\n */\r\n textAddItem?: string;\r\n /**\r\n * fallback text if no comments have been added\r\n */\r\n textNoData?: string;\r\n /**\r\n * The placeholder text for input area\r\n */\r\n placeholder?: string;\r\n /**\r\n * The maximum number of characters allowed to input. Default is 4000.\r\n */\r\n maxLength?: number;\r\n}\r\n\r\nexport type CommentTileViewProps = RowContainerComponentProps & CommentTileViewTranslations;\r\n\r\nexport class CommentTileView extends React.PureComponent<CommentTileViewProps, any> {\r\n\r\n public render() {\r\n const {componentId,\r\n readOnly,\r\n children,\r\n enabledChildEntityOperations = { add: false },\r\n textAddItem,\r\n textNoData,\r\n placeholder,\r\n validation,\r\n label,\r\n maxLength,\r\n className} = this.props;\r\n\r\n const commentCount = React.Children.count(children);\r\n const rows = React.Children.map(children, child => {\r\n return <li>{child}</li>;\r\n });\r\n\r\n return <div id={componentId} className={`${styles.commentView} ${className}`}>\r\n {label && label.text && label.visible && <h3 className={styles.commentHeading}>{label.text}</h3>}\r\n <ValidationSummary validationError={validation}/>\r\n {commentCount > 0 && <ul>{rows}</ul>}\r\n {commentCount === 0 && textNoData && <p className=\"no-content\">{textNoData}</p>}\r\n {!readOnly && enabledChildEntityOperations.add &&\r\n <CommentInput textAddItem={textAddItem} placeholder={placeholder} maxLength={maxLength}{...this.props}/>\r\n }\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { RowComponentProps } from 'ui/common/types';\r\nimport { MeatballMenu, Permission, PromptConfirmationModal } from 'ui';\r\n\r\nimport styles from './comment-tile.scss';\r\n\r\n/**\r\n * @interface CommentTileProps\r\n * Properties for Comment component.\r\n */\r\ninterface CommentTileTranslations {\r\n /**\r\n * The text for title in the confimation modal\r\n */\r\n textTitle?: string;\r\n /**\r\n * The text for description in the confimation modal\r\n */\r\n textConfirmDelete?: string;\r\n /**\r\n * The label text for the cancel button in the confimation modal\r\n */\r\n textCancel?: string;\r\n /**\r\n * The label text for the delete button in the confimation modal\r\n */\r\n textDelete?: string;\r\n}\r\n\r\nexport type CommentTileProps = RowComponentProps & CommentTileTranslations;\r\n\r\n/**\r\n * Creates Comment component. Represents each block of listed comments.\r\n *\r\n */\r\nexport class CommentTile extends React.PureComponent<CommentTileProps, any> {\r\n public static defaultProps: Partial<CommentTileProps> = {\r\n enabledChildEntityOperations: { remove: false}\r\n };\r\n\r\n private handleDeleteComment = (e?: React.MouseEvent<any>) => {\r\n if (this.props.onDeleteDocumentItem) {\r\n this.props.onDeleteDocumentItem();\r\n }\r\n }\r\n\r\n public render() {\r\n const {enabledChildEntityOperations, textConfirmDelete, textCancel, textDelete} = this.props;\r\n const deleteConfirmationModal =\r\n <PromptConfirmationModal\r\n title={textDelete}\r\n description={textConfirmDelete}\r\n continueText={textDelete}\r\n cancelText={textCancel}\r\n onContinue={this.handleDeleteComment}>\r\n\r\n <button type=\"button\" className=\"dropdown-item\">{textDelete}</button>\r\n </PromptConfirmationModal>;\r\n\r\n const contextMenu =\r\n <Permission requireAny=\"remove\" permissions={enabledChildEntityOperations}>\r\n <div className={styles.commentMenu}>\r\n <MeatballMenu>\r\n <Permission requireAll=\"remove\" permissions={enabledChildEntityOperations} isListElement={true}>\r\n {deleteConfirmationModal}\r\n </Permission>\r\n </MeatballMenu>\r\n </div>\r\n </Permission>;\r\n\r\n const userImg = <div className={styles.userIcon}/>;\r\n const svgTriangle = <svg viewBox=\"0 0 20 20\" className={styles.svgArrow}>\r\n <polygon points=\"2 1,21 1,21 22\" /> </svg>;\r\n\r\n const commentTile = <div className={styles.comment}>\r\n {contextMenu}\r\n {this.props.children}\r\n </div>;\r\n\r\n return (\r\n <div id={this.props.componentId} className={styles.commentWrapper}>\r\n {userImg}\r\n {svgTriangle}\r\n {commentTile}\r\n </div>\r\n\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport styles from './left-panel.scss';\r\nimport get from 'lodash/get';\r\n\r\nexport const LeftPanel = (props) => {\r\n const children = React.Children.map(props.children, (child) => child);\r\n const wrapToNewLine = get(children[children.length-1], 'props.componentDescriptor.properties.wrapToNewLine');\r\n\r\n let newLine = null;\r\n if (wrapToNewLine) {\r\n newLine = children.pop();\r\n }\r\n return (<>\r\n <div className={styles.info}>\r\n {children.map((child, index) => (<span key={index}>{child} </span>))}\r\n </div>\r\n {newLine && <div className={styles.title} aria-hidden={true}>\r\n {newLine}\r\n </div>}\r\n </>);\r\n};\r\n","// tslint:disable:jsx-no-lambda\r\nimport * as React from 'react';\r\nimport { MeatballMenu, PromptConfirmationModal, ValidationSummary, ComponentProps, withDropdownMenu, ButtonTertiary } from 'ui/common';\r\nimport { LeftPanel } from './panels/left-panel';\r\nimport { Permission } from 'ui/common/permission';\r\nimport { ButtonCallToAction, ValidationProps } from 'ui';\r\nimport { Link } from 'react-router';\r\nimport { ShareCase } from 'app/area/case/features/share-case/share-case';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { ConfidentialBanner } from 'ui/info-banner';\r\nimport { ComplexValue } from 'app/types-shared';\r\n\r\nimport styles from './case-header-panel.scss';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { StickyHeader, StickyHeaderButtonContainer } from 'app/shell/components/sticky-header/sticky-header';\r\nimport { isValidUrl } from 'app/infrastructure/validation/url';\r\nimport { Link as ExternalLink } from 'ui';\r\nimport { SharedState } from 'app/types-shared';\r\n\r\nexport interface HeaderPanelProps extends ComponentProps {\r\n /**\r\n * Translations\r\n */\r\n textOpenCase?: string;\r\n textEditCase?: string;\r\n textDeleteCaseTitle?: string;\r\n textDeleteCaseDescription?: string;\r\n textDeleteCaseContinue?: string;\r\n textDeleteCaseCancel?: string;\r\n textDuplicateCaseTitle?: string;\r\n textOpenBowtieTitle?: string;\r\n textPrintCase?: string;\r\n textChangeCaseType?: string;\r\n textConfidentialTitle?: string;\r\n textConfidentialDescription?: string;\r\n textConnectCase?: string;\r\n textSubmit?: string;\r\n textOpenInSurveyManager?: string;\r\n\r\n /**\r\n *\r\n * Content to include in the right panel\r\n */\r\n url?: string;\r\n contentRight?: any;\r\n onEditDocument?: () => void;\r\n onDeleteDocument?: () => void;\r\n onDuplicateDocument?: () => void;\r\n onLoadBowtie?: () => void;\r\n onChangeCaseType?: () => void;\r\n onConnectCase?: () => void;\r\n onSubmitDocument: () => void;\r\n onCloseDocument: () => void;\r\n onLoadPermissions: (caseNumber:number) => void;\r\n permissionsLoaded?: boolean;\r\n disableAllEntityOperations?: boolean;\r\n enabledEntityOperations?: { edit: boolean, delete: boolean, bowtie: boolean };\r\n validation?: ValidationProps;\r\n readOnly?: boolean;\r\n caseId?: number;\r\n translate?: {[key:string]: string};\r\n confidential?: ComplexValue<boolean>;\r\n enableStickyHeader?:boolean;\r\n urlFromTemplateString?: string;\r\n sharedState: SharedState;\r\n}\r\n\r\nconst HeaderPanel: React.SFC<HeaderPanelProps> = (props) => {\r\n const {\r\n componentId,\r\n className,\r\n validation,\r\n contentRight,\r\n disableAllEntityOperations,\r\n enableStickyHeader\r\n } = props;\r\n\r\n const leftPanelContents = <LeftPanel {...props} />;\r\n\r\n return <>\r\n <StickyHeader id={componentId} disabled={!enableStickyHeader} rightSideContent={!disableAllEntityOperations && contentRight}\r\n className={`${className} ${styles.headerWrapper} ${enableStickyHeader ? styles.headerSticky : ''} header-panel`}>\r\n {leftPanelContents}\r\n </StickyHeader>\r\n <div className={styles.validation}>\r\n <ValidationSummary validationError={validation}/>\r\n </div>\r\n </>;\r\n};\r\n\r\nconst PrintLink: any = withDropdownMenu(props => {\r\n const onPrintCase = () => {\r\n const {handleDropdownHide, url} = props;\r\n handleDropdownHide && handleDropdownHide();\r\n navigate.toPrintCaseView(url);\r\n };\r\n return <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={onPrintCase}>\r\n {props.text}\r\n </button>\r\n </li>;\r\n});\r\n\r\nconst ReadModeRightContent = (props: HeaderPanelProps, visibilityConfiguration: HeaderVisibilityConfiguration = {}) => {\r\n const panelConfig = visibilityConfiguration.panel;\r\n const meatballMenuConfig = visibilityConfiguration.meatballMenu;\r\n\r\n const caseURL = routeConstants.caseViewFor(props.caseId);\r\n\r\n const fetchPermissions = () => {\r\n if (!props.permissionsLoaded && props.onLoadPermissions) {\r\n props.onLoadPermissions(props.caseId);\r\n }\r\n };\r\n\r\n return <>\r\n { panelConfig && <Permission requireAll=\"edit\" permissions={props.enabledEntityOperations}>\r\n {panelConfig.edit && <StickyHeaderButtonContainer>\r\n <ButtonCallToAction id=\"editcasebutton\"\r\n onClick={props.onEditDocument}>\r\n {props.textEditCase}\r\n </ButtonCallToAction>\r\n </StickyHeaderButtonContainer>}\r\n </Permission>}\r\n { meatballMenuConfig && <MeatballMenu onExpandMenu={fetchPermissions}>\r\n {meatballMenuConfig.open && caseURL && <Link to={caseURL} className=\"btn dropdown-item\">{props.textOpenCase}</Link>}\r\n <Permission requireAll=\"edit\" permissions={props.enabledEntityOperations}>\r\n {meatballMenuConfig.edit &&\r\n <button type=\"button\" className=\"dropdown-item\" onClick={props.onEditDocument}>\r\n {props.textEditCase}\r\n </button>}\r\n </Permission>\r\n <Permission requireAll=\"delete\" permissions={props.enabledEntityOperations} isListElement={true}>\r\n {meatballMenuConfig.delete && <PromptConfirmationModal\r\n title={props.textDeleteCaseTitle}\r\n description={props.textDeleteCaseDescription}\r\n continueText={props.textDeleteCaseContinue}\r\n cancelText={props.textDeleteCaseCancel}\r\n onContinue={props.onDeleteDocument}>\r\n <button type=\"button\" className=\"dropdown-item\">{props.textDeleteCaseTitle}</button>\r\n </PromptConfirmationModal>}\r\n </Permission>\r\n <Permission requireAll=\"edit\" permissions={props.enabledEntityOperations} isListElement={true}>\r\n {meatballMenuConfig.duplicate &&\r\n <button type=\"button\" className=\"dropdown-item\" onClick={props.onDuplicateDocument}>\r\n {props.textDuplicateCaseTitle}\r\n </button>}\r\n </Permission>\r\n <Permission requireAll=\"bowtie\" permissions={props.enabledEntityOperations} isListElement={true}>\r\n {meatballMenuConfig.bowtie &&\r\n <button type=\"button\" className=\"dropdown-item\" onClick={props.onLoadBowtie}>\r\n {props.textOpenBowtieTitle}\r\n </button>}\r\n </Permission>\r\n <Permission requireAll=\"edit\" permissions={props.enabledEntityOperations} isListElement={true}>\r\n {meatballMenuConfig.share &&\r\n <ShareCase {...props}>\r\n {\r\n ({onOpen}) => <button type=\"button\" className=\"dropdown-item\" onClick={onOpen}>{props.translate.share_case}</button>\r\n }\r\n </ShareCase>\r\n }\r\n </Permission>\r\n {meatballMenuConfig.print &&\r\n <PrintLink text={props.textPrintCase} url={caseURL}/>\r\n }\r\n <Permission requireAll=\"surveyManager\" permissions={props.enabledEntityOperations} isListElement={true}>\r\n {props.sharedState.access && \r\n props.sharedState.access.surveyManager.send && \r\n isValidUrl(props.urlFromTemplateString) &&\r\n <ExternalLink url={props.urlFromTemplateString} linkText={props.textOpenInSurveyManager} className={'dropdown-item'} />}\r\n </Permission>\r\n </MeatballMenu>\r\n }\r\n </>;\r\n};\r\n\r\nexport type HeaderVisibilityConfiguration = {\r\n panel?: {\r\n edit?: boolean;\r\n },\r\n meatballMenu?: {\r\n open?: boolean;\r\n edit?: boolean;\r\n delete?: boolean;\r\n duplicate?: boolean;\r\n bowtie?: boolean;\r\n changeCaseType?: boolean;\r\n share?: boolean;\r\n print?: boolean;\r\n }\r\n};\r\n\r\nconst EditModeRightContent = (props: HeaderPanelProps, visibilityConfiguration: HeaderVisibilityConfiguration = {}) => {\r\n const meatballMenuConfig = visibilityConfiguration.meatballMenu;\r\n\r\n return <>\r\n <StickyHeaderButtonContainer>\r\n <ButtonTertiary onClick={props.onCloseDocument}>\r\n {props.textDeleteCaseCancel}\r\n </ButtonTertiary>\r\n <ButtonCallToAction id=\"form-submit\" onClick={props.onSubmitDocument}>\r\n {props.textSubmit}\r\n </ButtonCallToAction>\r\n </StickyHeaderButtonContainer>\r\n {\r\n !props.readOnly && meatballMenuConfig && meatballMenuConfig.changeCaseType &&\r\n <MeatballMenu>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={props.onChangeCaseType}>\r\n {props.textChangeCaseType}\r\n </button>\r\n </MeatballMenu>\r\n }\r\n </>;\r\n};\r\n\r\nexport const ReadHeaderPanel = (props: any) => {\r\n const isConfidential = props.confidential && props.confidential.valueObject && props.confidential.valueObject.value;\r\n\r\n return (\r\n <>\r\n {!!isConfidential &&\r\n <ConfidentialBanner textTitle={props.textConfidentialTitle} textDescription={props.textConfidentialDescription}/>}\r\n <HeaderPanel contentRight={ReadModeRightContent(props, props.headerVisibilityConfiguration)} {...props} />\r\n </>);\r\n};\r\n\r\nexport const EditHeaderPanel = (props: any) => {\r\n return <HeaderPanel contentRight={EditModeRightContent(props, props.headerVisibilityConfiguration)} {...props} />;\r\n};\r\n","import * as React from 'react';\r\nimport { TileProps } from 'ui/tile/tile';\r\nimport { Permission, MeatballMenu, PromptConfirmationModal, DisplayCodes } from 'ui';\r\n\r\nimport styles from './category-tile.scss';\r\n\r\ninterface CategoryTileProps extends TileProps {\r\n numberOfEntitiesInCategory: number;\r\n}\r\n\r\nexport class CategoryTile extends React.PureComponent<CategoryTileProps> {\r\n\r\n private handleDelete = (e?: any) => {\r\n this.props.onDeleteDocumentItem && this.props.onDeleteDocumentItem();\r\n }\r\n\r\n public render() {\r\n const { componentId, className, primaryKey, children, numberOfEntitiesInCategory,\r\n canBeRemoved, enabledChildEntityOperations } = this.props;\r\n const { categoryTile, categoryTileHeading, displayCodes, longDescription, hasMeatball } = styles;\r\n\r\n const count = numberOfEntitiesInCategory ? ` (${numberOfEntitiesInCategory})` : '';\r\n\r\n const valueWithCount = {...primaryKey, description: `${primaryKey.description}${count}`};\r\n const withMeatballStyles = enabledChildEntityOperations.remove ? hasMeatball : '';\r\n\r\n return (\r\n <div key={`${componentId}-${primaryKey.value}`} className={`${categoryTile} ${className}`}>\r\n <div className={`${categoryTileHeading} ${withMeatballStyles}`}>\r\n <h3>\r\n <DisplayCodes\r\n componentId={`${componentId}-code`}\r\n className={displayCodes}\r\n valueItems={[valueWithCount]}\r\n displayIcon={'left'}\r\n options={undefined}\r\n onChange={undefined}\r\n />\r\n\r\n {primaryKey.longDescription &&\r\n <div className={longDescription}>\r\n {primaryKey.longDescription}\r\n </div>}\r\n </h3>\r\n {!canBeRemoved && this.renderContextMenu()}\r\n </div>\r\n <div className=\"row\">{children}</div>\r\n </div>\r\n );\r\n }\r\n\r\n private renderContextMenu() {\r\n const { enabledChildEntityOperations, textDelete, textDeleteMessage, textContinue, textCancel } = this.props;\r\n const { tileDropdown } = styles;\r\n\r\n return (\r\n <Permission requireAny=\"remove\" permissions={enabledChildEntityOperations}>\r\n <div className={tileDropdown}>\r\n <MeatballMenu>\r\n <Permission requireAll=\"remove\" permissions={enabledChildEntityOperations} isListElement={true}>\r\n <PromptConfirmationModal\r\n title={textDelete}\r\n description={textDeleteMessage}\r\n continueText={textContinue}\r\n cancelText={textCancel}\r\n onContinue={this.handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">{textDelete}</button>\r\n </PromptConfirmationModal>\r\n </Permission>\r\n </MeatballMenu>\r\n </div>\r\n </Permission>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Options } from 'ui';\r\nimport styles from './category-tile-view.scss';\r\nimport { CodeSelectorTileViewProps, CodeSelectorTileView } from 'app/components';\r\n\r\ninterface CategoryTileViewProps extends CodeSelectorTileViewProps, Options<number> {\r\n /**\r\n * Make flex item take full width on a row\r\n */\r\n fullWidth?: boolean;\r\n leafNodeOnly?: boolean;\r\n}\r\n\r\nexport const CategoryTileView: React.SFC<CategoryTileViewProps> = (props) => {\r\n const { componentId, className, rowClassName, fullWidth } = props;\r\n\r\n return (\r\n <div id={componentId} className={`${className} ${styles.categoryTileView}`}>\r\n <CodeSelectorTileView \r\n {...props} componentId={`${componentId}-sections`} \r\n rowClassName={ rowClassName || fullWidth ? 'col-12' : 'col-12 col-lg-6' }\r\n />\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { SingleValueComponent } from 'ui/common/types';\r\nimport{isValidUrl} from 'app/infrastructure/validation/url'; \r\nimport styles from './display-safe-anchor.scss';\r\n\r\nexport const DisplaySafeAnchor: React.SFC<SingleValueComponent<string>> = (props: SingleValueComponent<string>) => {\r\n \r\n const anchorLink = \r\n <a href={props.value} target=\"_blank\" rel=\"noopener noreferrer\" className={styles.displaySafeAnchor}> \r\n {props.value} \r\n </a>; \r\n\r\n return (\r\n <div className={props.className} id={props.componentId}>\r\n {isValidUrl(props.value) ? anchorLink : props.value}\r\n </div>\r\n ); \r\n };\r\n","import * as React from 'react';\r\nimport {Textbox} from 'ui/textbox/textbox';\r\nimport {SingleValueComponent} from 'ui/common';\r\nimport { ValidationLevel } from 'ui/common';\r\nimport{isValidUrl} from 'app/infrastructure/validation/url';\r\n\r\ninterface SafeAnchorProps extends SingleValueComponent<string>{\r\n textInvalidAnchor?: string;\r\n maxLength?: number;\r\n}\r\n\r\ninterface SafeAnchorState {\r\n anchorValue: string;\r\n invalidAnchor: boolean;\r\n}\r\n\r\nexport class SafeAnchor extends React.Component<SafeAnchorProps, SafeAnchorState> {\r\n\r\n constructor(props: SafeAnchorProps) {\r\n super(props);\r\n this.state = {anchorValue: props.value || '', invalidAnchor: false};\r\n }\r\n\r\n private onChange = (value: string)=> {\r\n\r\n if(!isValidUrl(value.trim())) {\r\n this.setState({anchorValue: value.trim(), invalidAnchor: true});\r\n return;\r\n }\r\n this.setState({anchorValue: value.trim(), invalidAnchor: false});\r\n this.props.onChange(value.trim());\r\n }\r\n\r\n private onBlur = (value: string)=> {\r\n if(!isValidUrl(value.trim())) {\r\n this.setState({invalidAnchor: true});\r\n return false;\r\n }\r\n this.setState({anchorValue: value.trim(), invalidAnchor: false});\r\n return true;\r\n }\r\n\r\n public componentDidUpdate(prevProps:SafeAnchorProps) {\r\n if(this.props.value !== prevProps.value) {\r\n this.setState({anchorValue: this.props.value});\r\n }\r\n }\r\n\r\n public render() {\r\n const {maxLength, textInvalidAnchor} = this.props;\r\n const {invalidAnchor, anchorValue} = this.state;\r\n\r\n const errorParams = {level: ValidationLevel.error,\r\n messages: [{level: ValidationLevel.error, message: `${textInvalidAnchor}`}]\r\n };\r\n\r\n return (\r\n <Textbox\r\n {...this.props}\r\n value={anchorValue}\r\n onChange={this.onChange}\r\n maxLength={maxLength}\r\n onBlur={this.onBlur}\r\n validation={invalidAnchor && errorParams}\r\n />\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { DisplayCodes, Permission, MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport styles from './compact-code-title-tile.scss';\r\nimport { TileProps } from 'ui/tile/tile';\r\n\r\nexport class CompactCodeTitleTile extends React.PureComponent<TileProps, void> {\r\n\r\n public static defaultProps: Partial<TileProps> = {\r\n enabledChildEntityOperations: { remove: false }\r\n };\r\n\r\n private handleDelete = (e?: any) => {\r\n e && e.preventDefault();\r\n this.props.onDeleteDocumentItem && this.props.onDeleteDocumentItem();\r\n }\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n primaryKey,\r\n children,\r\n showPrimaryKey = true\r\n } = this.props;\r\n\r\n const { controlLabel, compactCodeTile, withMeatballMenu } = styles;\r\n const removableFieldStyles = this.shouldRenderContextMenu() ? withMeatballMenu : '';\r\n\r\n return (\r\n <div id={componentId} className={`className ${compactCodeTile} ${removableFieldStyles}`}>\r\n {showPrimaryKey && <DisplayCodes\r\n componentId={`${componentId}-code`}\r\n className={controlLabel}\r\n valueItems={[primaryKey]}\r\n displayIcon={'left'}\r\n options={undefined}\r\n onChange={undefined}\r\n />}\r\n {this.renderContextMenu()}\r\n {children}\r\n </div>\r\n );\r\n }\r\n\r\n private shouldRenderContextMenu = () => {\r\n const { enabledChildEntityOperations } = this.props;\r\n\r\n return enabledChildEntityOperations && Object.keys(enabledChildEntityOperations)\r\n .reduce((acc, key) => acc || enabledChildEntityOperations[key], false);\r\n }\r\n\r\n // TODO: Move this (and the copy in CodeTitleTile) to a shared enhancer.\r\n private renderContextMenu() {\r\n\r\n if (!this.shouldRenderContextMenu()) {\r\n return undefined;\r\n }\r\n\r\n const { enabledChildEntityOperations, textDelete, textDeleteMessage, textContinue, textCancel } = this.props;\r\n const { tileDropdown } = styles;\r\n\r\n return (\r\n <Permission requireAny=\"remove\" permissions={enabledChildEntityOperations}>\r\n <div className={tileDropdown}>\r\n <MeatballMenu>\r\n <Permission requireAll=\"remove\" permissions={enabledChildEntityOperations} isListElement={true}>\r\n <PromptConfirmationModal\r\n title={textDelete}\r\n description={textDeleteMessage}\r\n continueText={textContinue}\r\n cancelText={textCancel}\r\n onContinue={this.handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">{textDelete}</button>\r\n </PromptConfirmationModal>\r\n </Permission>\r\n </MeatballMenu>\r\n </div>\r\n </Permission>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { DisplayCodes } from 'ui';\r\nimport { DisplayCodesProps } from 'ui/display-codes/display-codes';\r\n\r\nexport const DisplayCodesUnitOfMeasure = (props: DisplayCodesProps) => \r\n <DisplayCodes {...props} label={{...props.label, visible: false}}/>;\r\n","import * as React from 'react';\r\nimport { DisplayNumber, DisplayNumberProps } from 'ui/display-number/display-number';\r\nimport styles from './display-number-unit-of-measure.scss';\r\nimport { Label } from 'ui';\r\n\r\nexport const DisplayNumberUnitOfMeasure = (props: DisplayNumberProps) => {\r\n const {className} = props;\r\n const propClone = {...props, className: styles.number};\r\n return <div id={props.componentId} className={`${className} ${styles.numberWithUnit}`}>\r\n <Label label={props.label} classNames=\"label\" />\r\n <div className={styles.container}>\r\n <DisplayNumber {...propClone} label={{ ...props.label, visible: false }} />\r\n <span className={styles.unit}>{props.children}</span>\r\n </div>\r\n </div>;\r\n };\r\n","export const ReplaceDataLabelsWithDot = (H:any) => {\r\n H.wrap(H.Series.prototype, 'drawDataLabels', function(proceed:any) {\r\n // tslint:disable-next-line\r\n const series:any = this;\r\n if (series.options.hideLabels) {\r\n const selected = series.data.find(item => item.selected);\r\n if (selected) {\r\n const x = selected.plotX + series.xAxis.pos;\r\n const y = selected.plotY + series.yAxis.pos;\r\n series.chart.renderer.circle(x, y, 10).attr({\r\n fill: selected.dataLabels.color,\r\n zIndex: 100\r\n }).add();\r\n }\r\n } else {\r\n proceed.apply(series, Array.prototype.slice.call(arguments, 1));\r\n }\r\n });\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, ComponentProps } from 'ui';\r\n\r\ntype TitleWrapperProps = { title: string | ComplexValue<any> } & ComponentProps;\r\n\r\nexport const TitleWrapper: React.SFC<TitleWrapperProps> = (props) => {\r\n const { title, children } = props;\r\n\r\n const titleDescription = (title && (title as ComplexValue<any>).description) || title;\r\n\r\n return <div id={props.componentId} className={props.className}>\r\n <label className=\"label\">{titleDescription}</label>\r\n {children}\r\n </div>;\r\n\r\n};\r\n","import * as React from 'react';\r\nimport get from 'lodash/get';\r\nimport { ComponentProps, ComplexValue } from 'ui';\r\nimport Highcharts from 'highcharts';\r\nimport ResizeSensor from 'resize-sensor';\r\n\r\nimport heatmap from 'highcharts/modules/heatmap';\r\nheatmap(Highcharts);\r\n\r\nimport { ReplaceDataLabelsWithDot } from 'app/components/risk-matrix/HighChartsExtension';\r\nReplaceDataLabelsWithDot(Highcharts);\r\n\r\nimport styles from './risk-matrix.scss';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { numericColorBrightness, numericColorToRgb } from 'app/infrastructure/universal/color';\r\nimport { RiskMatrixDefinition, RiskMatrixCell, RiskMatrixAxis } from 'app/area/case/types-store';\r\nimport { isFirefox } from 'app/infrastructure/platform';\r\nimport { calculateHeight } from 'app/components/risk-matrix/calculate-height';\r\nimport { ValidationLevel, FlexValidation } from 'ui/common';\r\n\r\ntype AxisLabelMode = 'all' | 'selected';\r\n\r\nexport interface RiskMatrixProps extends ComponentProps {\r\n readOnly: boolean;\r\n hideRiskWeight?: boolean;\r\n xAxisLabelMode: AxisLabelMode;\r\n yAxisLabelMode: AxisLabelMode;\r\n riskMatrixDefinition: RiskMatrixDefinition;\r\n onSelectedXChanged: (x: number, axisCodetableId: number) => void;\r\n onSelectedYChanged: (y: number, axisCodetableId: number) => void;\r\n /**\r\n * Values per axis.\r\n * Assumed to follow the same order as cell values in definition.\r\n */\r\n preselectedValues: number[];\r\n optionToCellValue: (option: ComplexValue<number>) => number;\r\n}\r\n\r\ninterface HighChartsSeriesExtended extends Highcharts.IndividualSeriesOptions {\r\n hideLabels?:boolean;\r\n}\r\n\r\ninterface HighChartsOptionsExtended extends Highcharts.Options {\r\n series: HighChartsSeriesExtended[];\r\n}\r\n\r\nexport class RiskMatrix extends React.Component<RiskMatrixProps, void> {\r\n\r\n private chartElement: HTMLElement;\r\n private chart: Highcharts.ChartObject;\r\n private initialRender:boolean = true;\r\n\r\n private createHighchartsOptions(): Highcharts.Options {\r\n return {\r\n title: { text: '' },\r\n chart: {\r\n type: 'heatmap',\r\n style: {\r\n fontFamily: '\"Avenir Next\", \"Arial\", \"sans-serif\"'\r\n }\r\n },\r\n tooltip: {\r\n enabled: false,\r\n formatter: function () { // NB: Do not change to arrow. 'this' is the point object when used as formatter.\r\n return `<div class=\"${styles.tooltipWrapper}\">\r\n <b>${this.point.value}</b>\r\n </div>`;\r\n },\r\n useHTML: true,\r\n shadow: false,\r\n backgroundColor: 'rgba(0,0,0,0)',\r\n borderColor: 'rgba(0,0,0,0)',\r\n style: { color: 'rgba(0,0,0,0)' }\r\n },\r\n legend: { enabled: false },\r\n credits: { enabled: false },\r\n exporting: { enabled: false }\r\n };\r\n }\r\n\r\n public shouldComponentUpdate(newProps: RiskMatrixProps) {\r\n let updateOptions = false;\r\n\r\n if (!this.chartElement || !this.props.riskMatrixDefinition || this.props.riskMatrixDefinition.cells.length === 0 ||\r\n !!this.getAxesWaitingForExternalValueSelect(this.props.riskMatrixDefinition, this.props.preselectedValues) ||\r\n !!this.getAxesWaitingForExternalValueSelect(newProps.riskMatrixDefinition, newProps.preselectedValues) ||\r\n !deepEquals(this.props.validationDescendants, newProps.validationDescendants)) {\r\n return true;\r\n }\r\n\r\n if (!deepEquals(this.props.riskMatrixDefinition, newProps.riskMatrixDefinition)) {\r\n updateOptions = true;\r\n }\r\n\r\n if (!updateOptions && !deepEquals(this.props.preselectedValues, newProps.preselectedValues)) {\r\n updateOptions = true;\r\n // It should be possible to use the chart API to update this without recreating the chart\r\n // but this means a lot more complexity. It might possibly improve performance however.\r\n }\r\n\r\n if (updateOptions) {\r\n const options = this.createHeatmapOptionsFromDefinition(newProps.riskMatrixDefinition, newProps.preselectedValues);\r\n this.renderChart(options);\r\n } else if (this.chart) {\r\n this.chart.reflow();\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public componentWillUnmount() {\r\n //Destroy chart before unmount.\r\n this.initialRender = true;\r\n this.destroy();\r\n }\r\n\r\n private onChartElementReady = (element: HTMLElement) => {\r\n //If a render has happened, this might be null for older callbacks.\r\n if (element) {\r\n this.chartElement = element;\r\n // tslint:disable-next-line:no-unused-expression\r\n new ResizeSensor(element.parentElement, () => this.reflowChart());\r\n this.renderChart(this.createHeatmapOptionsFromDefinition(this.props.riskMatrixDefinition, this.props.preselectedValues));\r\n }\r\n }\r\n\r\n private renderChart(options: Highcharts.Options) {\r\n if (this.chart) {\r\n this.chart.destroy();\r\n this.chart = null;\r\n }\r\n Highcharts.chart(this.chartElement, options, (createdChart: Highcharts.ChartObject) => {\r\n this.chart = createdChart;\r\n });\r\n }\r\n\r\n private reflowChart() {\r\n if (this.chart) {\r\n this.chart.reflow();\r\n }\r\n }\r\n\r\n private createHeatmapOptionsFromDefinition(definition: RiskMatrixDefinition, preselectedValues: number[]) {\r\n const options = this.createHighchartsOptions();\r\n\r\n if (definition && preselectedValues) {\r\n this.setOptions(options, definition, preselectedValues);\r\n }\r\n\r\n return options;\r\n }\r\n\r\n private setAxisOptions(options: Highcharts.Options, definition: RiskMatrixDefinition, preselectedValues: number[]) {\r\n\r\n const axisLabelsOptions = (axis: RiskMatrixAxis, axisIndex: number, axisLabelMode: AxisLabelMode) => ({\r\n formatter: function() {\r\n if (axisLabelMode === 'all') {\r\n return `${this.value}`;\r\n }\r\n else if (axisLabelMode === 'selected') {\r\n if (preselectedValues[axisIndex] === axis.data.options[this.pos].value) {\r\n return `${this.value}`;\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n\r\n return '';\r\n },\r\n style: {\r\n fontSize: '15px'\r\n }\r\n });\r\n\r\n const axisTitleOptions = (axis: RiskMatrixAxis) => (axis.data.description ? {\r\n text: axis.data.description\r\n } : null);\r\n\r\n options.xAxis = {\r\n title: axisTitleOptions(this.getAxis(definition, 0)),\r\n lineWidth: 0,\r\n gridLineWidth: 0,\r\n tickWidth: 0,\r\n borderWidth: 0,\r\n shadow: false,\r\n categories: this.getAxis(definition, 0).data.options.map(o => o.description),\r\n labels: axisLabelsOptions(this.getAxis(definition, 0), this.getAxisIndex(definition, 0), this.props.xAxisLabelMode)\r\n } as Highcharts.AxisOptions;\r\n\r\n options.yAxis = {\r\n title: axisTitleOptions(this.getAxis(definition, 1)),\r\n lineWidth: 0,\r\n gridLineWidth: 0,\r\n tickWidth: 0,\r\n borderWidth: 0,\r\n shadow: false,\r\n categories: this.getAxis(definition, 1).data.options.map(o => o.description),\r\n labels: axisLabelsOptions(this.getAxis(definition, 1), this.getAxisIndex(definition, 1), this.props.yAxisLabelMode)\r\n } as Highcharts.AxisOptions;\r\n }\r\n\r\n private setSeriesOptions(\r\n options: Highcharts.Options, definition: RiskMatrixDefinition, preselectedValues: number[]\r\n ) {\r\n const xIndex = this.getAxisIndex(definition, 0);\r\n const yIndex = this.getAxisIndex(definition, 1);\r\n const xAxis = this.getAxis(definition, 0);\r\n const yAxis = this.getAxis(definition, 1);\r\n\r\n const setConsequenceValues = (x: number, y: number) => {\r\n if(xAxis.editable && (yAxis.editable || yAxis.data.options[y].value === preselectedValues[yIndex])) {\r\n this.props.onSelectedXChanged(xAxis.data.options[x].value, xAxis.data.codetableId);\r\n }\r\n if(yAxis.editable && (xAxis.editable || xAxis.data.options[x].value === preselectedValues[xIndex])) {\r\n this.props.onSelectedYChanged(yAxis.data.options[y].value, yAxis.data.codetableId);\r\n }\r\n return;\r\n };\r\n\r\n options.series = [{\r\n borderWidth: 0,\r\n shadow: false,\r\n point: {\r\n events: {\r\n\r\n click: !this.props.readOnly && ((event: Highcharts.AreaClickEvent) => {\r\n setConsequenceValues(event.point.x, event.point.y);\r\n return false;\r\n })\r\n }\r\n },\r\n states: {\r\n hover: !this.props.readOnly && {\r\n brightness: 0.4\r\n }\r\n }\r\n } as Highcharts.HeatMapSeriesOptions];\r\n }\r\n private setSeriesData(\r\n options: HighChartsOptionsExtended, definition: RiskMatrixDefinition,\r\n preselectedValues: number[]\r\n ) {\r\n const xIndex = this.getAxisIndex(definition, 0);\r\n const yIndex = this.getAxisIndex(definition, 1);\r\n\r\n const columnCount = get(options, 'xAxis.categories.length');\r\n let labelOffset = columnCount < 7 ? 0 : -1;\r\n if(this.initialRender) {\r\n labelOffset -= 1;\r\n }\r\n\r\n options.series[0].hideLabels = this.props.hideRiskWeight;\r\n options.series[0].data = definition.cells\r\n .filter( // Filter to only show those that are selectable axes in matrix or match the preselected values.\r\n c => c.axisValues.reduce(\r\n (acc, v, i) => (acc && (i === xIndex || i === yIndex || v.value === preselectedValues[i])), true)\r\n )\r\n .map(\r\n c => {\r\n const readOnlyCell = this.cellReadOnly(c, definition, preselectedValues);\r\n const cellColor = c && c.data.riskArea.backgroundColor;\r\n const cellRgb = numericColorToRgb(cellColor);\r\n const cellColorBrightness = numericColorBrightness(cellColor);\r\n const preselectedCell = preselectedValues &&\r\n c.axisValues[xIndex].value === preselectedValues[xIndex] &&\r\n c.axisValues[yIndex].value === preselectedValues[yIndex];\r\n\r\n const blackText = cellColorBrightness > 125;\r\n\r\n /**\r\n * Detect firefox to select htmlRendering of numbers.\r\n * Numbers get missplaced in firefox when using svg rendering.\r\n */\r\n const isFF = isFirefox();\r\n return {\r\n x: definition.axes[xIndex].data.options.findIndex(v => v.value === (c.axisValues[xIndex] ? c.axisValues[xIndex].value : 0)),\r\n y: definition.axes[yIndex].data.options.findIndex(v => v.value === (c.axisValues[yIndex] ? c.axisValues[yIndex].value : 0)),\r\n color: readOnlyCell ? `rgba(${cellRgb.r},${cellRgb.g},${cellRgb.b},0.5)` : `rgba(${cellRgb.r},${cellRgb.g},${cellRgb.b},1)`,\r\n borderColor: '#FFF',\r\n borderWidth: 2,\r\n cursor: readOnlyCell ? 'default' : 'pointer',\r\n shadow: false,\r\n rotation:0,\r\n selected: preselectedCell,\r\n events: {\r\n mouseOver: (event: Event) => {\r\n // TODO: Hovering over a point that is not selected should show risk weight text.\r\n return false;\r\n }\r\n },\r\n dataLabels: {\r\n enabled: true,\r\n color: blackText ? '#000' : '#FFF',\r\n className: 'test black ',\r\n style: {\r\n fontSize: '16px',\r\n textOutline: blackText ? '' : '.5px rgba(0,0,0,.25)',\r\n textShadow: blackText ? '' :'0 0 16px rgba(0, 0, 0, .5)'\r\n },\r\n formatter: () => {\r\n if (readOnlyCell) {\r\n return undefined;\r\n }\r\n else if (preselectedCell) {\r\n return !isFF ?\r\n String(c.data.weight)\r\n :\r\n `<span class=\"content ${blackText ? 'blacktext' : ''}\">${String(c.data.weight)}</span>`;\r\n }\r\n return undefined;\r\n },\r\n align: 'center',\r\n useHTML: isFF,\r\n padding: 0,\r\n x: labelOffset\r\n },\r\n value: c.data.weight\r\n } as Highcharts.DataPoint;\r\n });\r\n\r\n this.initialRender = false;\r\n if(options.series[0].data.length === 0) {\r\n return; // TODO: Make emtpy pretty matrix.\r\n }\r\n }\r\n\r\n private cellReadOnly(cell: RiskMatrixCell, definition: RiskMatrixDefinition, preselectedValues: number[]) {\r\n if(!preselectedValues || !cell) {\r\n return false;\r\n }\r\n\r\n const xAxis = this.getAxis(definition, 0);\r\n const xIndex = this.getAxisIndex(definition, 0);\r\n const yAxis = this.getAxis(definition, 1);\r\n const yIndex = this.getAxisIndex(definition, 1);\r\n\r\n const readOnlyX = xAxis.editable || preselectedValues[xIndex] === undefined ?\r\n false : preselectedValues[xIndex] !== cell.axisValues[xIndex].value;\r\n const readOnlyY = yAxis.editable || preselectedValues[yIndex] === undefined ?\r\n false : preselectedValues[yIndex] !== cell.axisValues[yIndex].value;\r\n\r\n return readOnlyX || readOnlyY;\r\n }\r\n\r\n private setOptions(options: Highcharts.Options, definition: RiskMatrixDefinition, preselectedValues: number[]) {\r\n\r\n if (!definition || !definition.axes || !definition.cells) {\r\n return;\r\n }\r\n\r\n this.setAxisOptions(options, definition, preselectedValues);\r\n this.setSeriesOptions(options, definition, preselectedValues);\r\n this.setSeriesData(options as HighChartsOptionsExtended, definition, preselectedValues);\r\n }\r\n\r\n private getAxis(definition: RiskMatrixDefinition, axisId: number) {\r\n return definition.axes[definition.axes.findIndex(a => a.id === axisId)];\r\n }\r\n\r\n private getAxisIndex(definition: RiskMatrixDefinition, axisId: number) {\r\n return definition.axes.findIndex(a => a.id === axisId);\r\n }\r\n\r\n private waitForAxisValueSelect(definition: RiskMatrixDefinition, axisId: number, preselectedValues: number[]) {\r\n const axis = definition && this.getAxis(definition, axisId);\r\n const axisIndex = definition && axis && this.getAxisIndex(definition, axis.id);\r\n\r\n return axis && !axis.editable && axisIndex >= 0 && preselectedValues[axisIndex] <= 0;\r\n }\r\n\r\n public render() {\r\n return this.renderInvalidConfig() || this.renderWaitingForValue() || this.renderMatrixElement();\r\n }\r\n\r\n private invalidDefinition() {\r\n const { riskMatrixDefinition } = this.props;\r\n\r\n return !riskMatrixDefinition || riskMatrixDefinition.cells.length === 0;\r\n }\r\n\r\n private renderInvalidConfig() {\r\n const { matrixContainer, infoText } = styles;\r\n\r\n if(!this.invalidDefinition()) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n <div className={matrixContainer}>\r\n <p className={infoText}>Cannot render matrix. Invalid configuration.</p>\r\n </div>\r\n );\r\n }\r\n\r\n private getAxesWaitingForExternalValueSelect(definition: RiskMatrixDefinition, preselectedValues: number[]) {\r\n\r\n const waitForXValueSelect = this.waitForAxisValueSelect(definition, 0, preselectedValues);\r\n const waitForYValueSelect = this.waitForAxisValueSelect(definition, 1, preselectedValues);\r\n const waitForZValueSelect = this.waitForAxisValueSelect(definition, 2, preselectedValues);\r\n\r\n if(!waitForXValueSelect && !waitForYValueSelect && !waitForZValueSelect) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n x: waitForXValueSelect,\r\n y: waitForYValueSelect,\r\n z: waitForZValueSelect\r\n };\r\n }\r\n\r\n private hasChildErrors () {\r\n const {validationDescendants} = this.props;\r\n return validationDescendants && !!validationDescendants.length && validationDescendants.some(v => v.level === ValidationLevel.error);\r\n }\r\n\r\n private hasChildWarnings() {\r\n const {validationDescendants} = this.props;\r\n return validationDescendants && !!validationDescendants.length && validationDescendants.some(v => v.level === ValidationLevel.warning);\r\n }\r\n\r\n private getErrors = () => {\r\n return this.props.validationDescendants && this.props.validationDescendants\r\n .filter(v=>v.level===ValidationLevel.error).map((v, i) => <FlexValidation key={i}{...v}/>);\r\n }\r\n\r\n private getWarnings = () => {\r\n return this.props.validationDescendants && this.props.validationDescendants\r\n .filter(v=>v.level===ValidationLevel.warning).map((v, i) => <FlexValidation key={i}{...v}/>);\r\n }\r\n\r\n private getRiskMatrixValidationStyle = () => {\r\n return this.hasChildErrors() ? styles.hasChildErrors : (this.hasChildWarnings() ? styles.hasChildWarnings : '');\r\n }\r\n\r\n private renderWaitingForValue() {\r\n\r\n const { riskMatrixDefinition, preselectedValues, validationDescendants } = this.props;\r\n const { matrixContainer, infoText } = styles;\r\n\r\n const axesWaitingForSelect = this.getAxesWaitingForExternalValueSelect(riskMatrixDefinition, preselectedValues);\r\n\r\n if(!axesWaitingForSelect) {\r\n return undefined;\r\n }\r\n\r\n const waitForXValueDescription = axesWaitingForSelect.x && this.getAxis(riskMatrixDefinition, 0).data.pleaseSelectDescription;\r\n const waitForYValueDescription = axesWaitingForSelect.y && this.getAxis(riskMatrixDefinition, 1).data.pleaseSelectDescription;\r\n const waitForZValueDescription = axesWaitingForSelect.z && this.getAxis(riskMatrixDefinition, 2).data.pleaseSelectDescription; \r\n const errors = validationDescendants && \r\n validationDescendants.filter(v=>v.level===ValidationLevel.error).map((v, i) => <FlexValidation key={i} {...v}/>);\r\n const warnings = validationDescendants && \r\n validationDescendants.filter(v=>v.level===ValidationLevel.warning).map((v, i) => <FlexValidation key={i} {...v}/>);\r\n \r\n return (\r\n <div className={`${matrixContainer} ${this.getRiskMatrixValidationStyle()}`}>\r\n {axesWaitingForSelect.x && !axesWaitingForSelect.y && !axesWaitingForSelect.z &&\r\n <p className={infoText}>{waitForXValueDescription}</p>}\r\n {axesWaitingForSelect.y && !axesWaitingForSelect.z &&\r\n <p className={infoText}>{waitForYValueDescription}</p>}\r\n {axesWaitingForSelect.z &&\r\n <p className={infoText}>{waitForZValueDescription}</p>}\r\n {this.hasChildErrors() && errors}\r\n {this.hasChildWarnings() && warnings}\r\n </div>\r\n );\r\n }\r\n\r\n private renderMatrixElement() {\r\n const { riskMatrixDefinition } = this.props;\r\n const { matrixContainer } = styles;\r\n\r\n const yAxis = riskMatrixDefinition && this.getAxis(riskMatrixDefinition, 1);\r\n const rowCount = get(yAxis, 'data.options.length');\r\n const height = calculateHeight(rowCount);\r\n const heightStyle = !!height ? `${height}px` : undefined;\r\n\r\n return (\r\n <div className={`${matrixContainer} ${this.getRiskMatrixValidationStyle()}`}>\r\n <div style={{height: heightStyle}} ref={this.onChartElementReady} />\r\n {this.props.children}\r\n {this.hasChildErrors() && this.getErrors()}\r\n {this.hasChildWarnings() && this.getWarnings()}\r\n </div>\r\n );\r\n }\r\n\r\n public destroy() {\r\n if (this.chart) {\r\n this.chart.destroy();\r\n this.chart = null;\r\n }\r\n\r\n if (this.chartElement && this.chartElement.parentElement) {\r\n ResizeSensor.detach(this.chartElement.parentElement);\r\n }\r\n this.chartElement = null;\r\n }\r\n}\r\n","export const calculateHeight = (rowCount: number): number => {\r\n\r\n if (rowCount > 5) {\r\n return undefined;\r\n }\r\n\r\n const rowHeight = 45;\r\n const extraHeight = 30;\r\n\r\n return rowHeight*rowCount+extraHeight;\r\n};\r\n","import * as React from 'react';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { ComponentProps, ButtonSecondary } from 'ui';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\nimport { toast } from 'react-toastify';\r\n\r\nimport styles from './add-document-item-link-button.scss';\r\n\r\ninterface AddDocumentItemLinkButtonProps extends ComponentProps {\r\n readOnly?: boolean;\r\n selectAddedItem?: boolean;\r\n showItemAddedMessage?: boolean;\r\n textItemAdded?: string;\r\n initialValues?: { [key: string]: any };\r\n onAddDocumentItem?: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n}\r\n\r\nexport class AddDocumentItemLinkButton extends React.PureComponent<AddDocumentItemLinkButtonProps, void> {\r\n\r\n private handleClick = (e?: any) => {\r\n const { selectAddedItem, showItemAddedMessage, textItemAdded } = this.props;\r\n e && e.preventDefault();\r\n\r\n this.props.onAddDocumentItem &&\r\n this.props.onAddDocumentItem(selectAddedItem, { initialValues: this.props.initialValues });\r\n\r\n if(showItemAddedMessage) {\r\n const toasts = toastFactory({ autoClose: 5000 });\r\n toasts.dispatch('', toast.TYPE.SUCCESS);\r\n toasts.success(textItemAdded);\r\n }\r\n }\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n className,\r\n label,\r\n readOnly\r\n } = this.props;\r\n\r\n const {\r\n buttonWrapper\r\n } = styles;\r\n\r\n return (\r\n readOnly ? null :\r\n <div id={componentId} className={`${buttonWrapper} ${className}`}>\r\n <ButtonSecondary id={`${componentId}-button`} onClick={this.handleClick}>\r\n {label && label.text}\r\n </ButtonSecondary>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui/common';\r\nimport { ButtonTertiary } from 'ui/common/button/button-tertiary';\r\nimport { ButtonInline } from 'ui/common/button/button-inline';\r\nimport styles from './log-link-button.scss';\r\nimport { withOpenState, OpenStateInjectedProps } from 'ui/common/enhancers';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport ArrowRight from 'react-icons/lib/md/keyboard-arrow-right';\r\n\r\nexport interface LogLinkButtonComponentTranslations {\r\n textDone?: string;\r\n textTitle?: string;\r\n}\r\n\r\nexport interface LogLinkButtonProps {\r\n icon?: React.ComponentClass<any, any>;\r\n inline?:boolean;\r\n visible?: boolean;\r\n}\r\n\r\nexport type LogLinkButtonComponentProps = ComponentProps & OpenStateInjectedProps\r\n & LogLinkButtonProps & LogLinkButtonComponentTranslations;\r\n\r\nexport class LogLinkButtonComponent extends React.Component<LogLinkButtonComponentProps> {\r\n private closeModal = () => {\r\n const {isOpen, close} = this.props;\r\n\r\n isOpen && close();\r\n }\r\n\r\n public render() {\r\n\r\n const {\r\n componentId,\r\n label,\r\n children,\r\n isOpen,\r\n open,\r\n textDone,\r\n textTitle,\r\n icon,\r\n inline,\r\n visible=true\r\n } = this.props;\r\n\r\n if (!visible) {\r\n return null;\r\n }\r\n\r\n const childItems =\r\n <ul className={styles.items}>\r\n {\r\n React.Children.map(children, (child, i) =>\r\n <li className={styles.item}>\r\n {child}\r\n </li>\r\n )\r\n }\r\n </ul>;\r\n\r\n const logModal =\r\n <ModalWrapper\r\n headerTitle={textTitle}\r\n btnTitle={textDone}\r\n onClose={this.closeModal}\r\n onDone={this.closeModal}\r\n largeSize={false}>\r\n {childItems}\r\n </ModalWrapper>;\r\n\r\n const linkButton = (\r\n inline ?\r\n <ButtonInline onClick={open} icon={icon}>\r\n {label && label.text}{!icon ? <ArrowRight/> : ''}\r\n </ButtonInline>\r\n :\r\n <ButtonTertiary onClick={open} icon={icon}>\r\n {label && label.text}\r\n </ButtonTertiary>\r\n );\r\n\r\n return (\r\n <div id={componentId} className={`${styles.logLinkButtonWrapper}`}>\r\n {linkButton}\r\n {isOpen && logModal}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst c = withOpenState()(LogLinkButtonComponent);\r\n\r\nexport { c as LogLinkButton };\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui/common';\r\nimport MdHistory from 'react-icons/lib/md/history';\r\nimport { LogLinkButton } from './common/log-link-button';\r\nimport { ChildEntityCountShape } from 'app/area/case/selectors';\r\nimport './processing-log-link.scss';\r\n\r\nexport interface ProcessingLogLinkProps {\r\n textDone?: string;\r\n textTitle?: string;\r\n processingLogs?: ChildEntityCountShape;\r\n inline?: boolean; \r\n}\r\n\r\nexport type ProcessingLogLinkComponentProps = ComponentProps & ProcessingLogLinkProps;\r\n\r\nexport const ProcessingLogLink: React.SFC<ProcessingLogLinkComponentProps> = props => {\r\n \r\n const {\r\n textDone,\r\n textTitle,\r\n inline = false\r\n } = props;\r\n \r\n const hasItems = props.processingLogs && props.processingLogs.count > 0;\r\n \r\n return (\r\n <div className={`${props.className}`}>\r\n <LogLinkButton {...props} inline={inline} icon={MdHistory} textTitle={textTitle} textDone={textDone} \r\n visible={hasItems}/>\r\n </div>\r\n );\r\n};\r\n\r\nexport const ReadProcessingLogLink: React.SFC<ProcessingLogLinkComponentProps> = props => <ProcessingLogLink {...props} inline={true}/>;\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui';\r\nimport styles from './log-view.scss';\r\n\r\nexport const LogView: React.SFC<ComponentProps> = (props) => {\r\n\r\n const {\r\n componentId,\r\n className,\r\n children\r\n } = props;\r\n\r\n const childItems = <ul className={styles.items}>\r\n {\r\n React.Children.map(children, (child, i) =>\r\n <li className={styles.item} key={i}>\r\n {child}\r\n </li>\r\n )\r\n }\r\n </ul>;\r\n\r\n return (children && React.Children.count(children) !== 0 ?\r\n <div id={componentId} className={`${className} ${styles.logView}`}>\r\n {childItems}\r\n </div>\r\n : null);\r\n};\r\n","import * as React from 'react';\r\nimport { RowComponentProps } from 'ui/common/types';\r\nimport styles from './log-details.scss';\r\n\r\nexport const LogDetails: React.SFC<RowComponentProps> = props => {\r\n\r\n const {\r\n componentId,\r\n className,\r\n children\r\n } = props;\r\n\r\n return(\r\n <div id={componentId} className={`${className} ${styles.logDetailsWrapper}`}>\r\n <div className={`log-details ${styles.logDetails}`}>\r\n {children}\r\n </div>\r\n </div>\r\n );\r\n };\r\n","import * as React from 'react';\r\nimport { ComponentProps, ComplexValue } from 'ui/common';\r\nimport { Expandable } from 'ui';\r\nimport { ExpandableButtonPosition } from 'ui/expandable/expandable';\r\nimport styles from './mail-log-link.scss';\r\n\r\nexport interface MailLogLinkProps extends ComponentProps{\r\n value?: ComplexValue<number>;\r\n textDisplayMore?: string;\r\n textDisplayLess?: string;\r\n}\r\n\r\nexport class MailLogLink extends React.Component<MailLogLinkProps> {\r\n private expander = (collapsed: boolean) => {\r\n const contents = <div className={styles.mailLogContainer}>{this.props.children}</div>;\r\n return !collapsed ? contents: null;\r\n }\r\n\r\n public render() {\r\n\r\n const {\r\n componentId,\r\n value,\r\n textDisplayMore,\r\n textDisplayLess\r\n } = this.props;\r\n\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div id={componentId} className={styles.buttonContainer}>\r\n <Expandable\r\n content={this.expander}\r\n useMargin={false}\r\n buttonPosition={ExpandableButtonPosition.top}\r\n textDisplayMore={textDisplayMore}\r\n textDisplayLess={textDisplayLess} />\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent, ComplexValue } from 'ui';\r\nimport ArrowRight from 'react-icons/lib/md/keyboard-arrow-right';\r\nimport { CaseLogDownloadContainerProps } from 'app/area/case/features/case-log-download';\r\nimport { ButtonInline } from 'ui/common/button/button-inline';\r\n\r\nexport interface LinkDownloadProps {\r\n createDownloader?: (blobId: number, name?: string) => Promise<void>;\r\n}\r\n\r\nexport interface LinkDownloadTranslations {\r\n textDownloadName?: string;\r\n\r\n /**\r\n * @internal\r\n */\r\n childValues?: any;\r\n primaryKey?: ComplexValue<number>;\r\n}\r\n\r\nexport interface LinkDownloadState {\r\n downloading: boolean;\r\n}\r\n\r\nexport type CaseLogLinkProps = CaseLogDownloadContainerProps & LinkDownloadProps &\r\n LinkDownloadTranslations & SingleKeyValueComponent<number>;\r\n\r\nexport class CaseLogLink extends React.Component<CaseLogLinkProps, LinkDownloadState> {\r\n public state: Readonly<LinkDownloadState> = {\r\n downloading: false\r\n };\r\n\r\n private onDownloadCaseLog = async (event: any) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (event.button !== 0) {\r\n return;\r\n }\r\n\r\n if (!this.state.downloading && this.props.valueItem.value) {\r\n const key = this.props.primaryKey && this.props.primaryKey.value;\r\n const blobId = this.props.valueItem.value;\r\n const initialName = this.props.textDownloadName + '-' + key;\r\n const appendedWithChildValues = this.props.childValues.map(v=>v.value.toString()).join('-');\r\n const downloadName = initialName + '-' + appendedWithChildValues;\r\n\r\n this.setState({ downloading: true } );\r\n await this.props.createDownloader(blobId, downloadName);\r\n this.setState({ downloading: false });\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const {label, valueItem} = this.props;\r\n\r\n return (\r\n valueItem && valueItem.value ?\r\n <ButtonInline onClick={this.onDownloadCaseLog}>\r\n {label && label.text} <ArrowRight/>\r\n </ButtonInline>\r\n :null);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui';\r\nimport { LeftPanel } from 'app/components/case-header-panel/panels/left-panel';\r\nimport styles from './compact-tile-header.scss';\r\n\r\nexport interface CompactTileHeaderProps extends ComponentProps {\r\n children: any;\r\n headerTitle?:String;\r\n}\r\n\r\nexport const CompactTileHeader: React.SFC<CompactTileHeaderProps> = (props: CompactTileHeaderProps) => {\r\n\r\n const {\r\n componentId,\r\n className,\r\n children,\r\n headerTitle\r\n } = props;\r\n\r\n return (\r\n <div id={componentId} className={`${className} ${styles.tileHeader} compact row get(props, 'primaryKey.value')`}>\r\n {headerTitle && <div className={styles.key}>\r\n {headerTitle}\r\n </div> }\r\n <LeftPanel>{children}</LeftPanel>\r\n </div>\r\n );\r\n};\r\n","export * from './spin-loader';\r\nexport * from './message-panel/message-panel';\r\nexport * from './overlay/overlay';\r\nexport * from './prompt-unsaved/prompt-unsaved';\r\nexport * from './code-title-tile';\r\nexport * from './code-selector';\r\nexport * from './comment';\r\nexport * from './case-header-panel';\r\nexport * from './document-item-from-multiselect';\r\nexport * from './category-tile-view';\r\nexport * from './code-selector-tile-view';\r\nexport * from './display-safe-anchor';\r\nexport * from './safe-anchor';\r\nexport * from './compact-code-title-tile';\r\nexport * from './display-codes-unit-of-measure';\r\nexport * from './display-number-unit-of-measure';\r\nexport * from './title-wrapper';\r\nexport * from './tabs';\r\nexport * from './risk-matrix';\r\nexport * from './add-document-item-link-button';\r\nexport * from './case-header-panel';\r\nexport * from './processing-log';\r\nexport * from './compact-tile-header';\r\n","import { fetchJson, http, HttpOptions } from './http';\r\nimport { format, parse } from 'url';\r\nimport { remoteDataError } from 'app/infrastructure/remote-data/http';\r\nimport { concatUrl } from 'app/infrastructure/universal/url';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { authProvider } from 'dependencies/auth';\r\nimport { HttpStatusCodes } from './constants';\r\nimport { STATE } from 'app/constants';\r\n\r\nexport type Id = number | string;\r\n\r\nlet store: Redux.Store<any> = undefined;\r\nexport function connectToStore(newStore: Redux.Store<any>) {\r\n store = newStore;\r\n}\r\n\r\nexport interface Resource<T> {\r\n all(): Promise<T>;\r\n single(): Promise<T>;\r\n response(): Promise<T>;\r\n create(obj: Object, getLocation?: boolean): Promise<T>; // post && returns new id or header.location resource\r\n save(obj?: Object): Promise<T>;\r\n httpDelete(obj: Object): Promise<T>;\r\n blob(obj?: Object): Promise<T>;\r\n all(): Promise<T>;\r\n withId(id: Id): Resource<T>;\r\n withIfMatch(etag: string): Resource<T>;\r\n withIfNoneMatch(etag: string): Resource<T>;\r\n withHeader(name: string, value: string): Resource<T>;\r\n withImportance(importance: 'low' | 'high'): Resource<T>;\r\n filter(keyValues: Object): Resource<T>;\r\n}\r\n\r\nexport interface RemoteDataFn<T> {\r\n (): Resource<T>;\r\n}\r\n\r\nfunction makeHttpRequest(url: string, options: HttpOptions = {}): Promise<Response> {\r\n return http(url, authProvider.processResponse, options);\r\n}\r\n\r\n/**\r\n * Resolve a clean URL from baseUrl, path and querystring\r\n */\r\nexport function resolveUrl(baseUrl: string, query?: Object, ...paths: any[]) {\r\n\r\n const urlObject: any = parse(baseUrl || '/');\r\n\r\n urlObject.pathname = concatUrl(urlObject.pathname, ...paths);\r\n urlObject.query = query;\r\n\r\n return format(urlObject);\r\n}\r\n\r\n/**\r\n * Return one remote entity using fetch() and json()\r\n *\r\n * @template T\r\n * @param {string} url\r\n * @param {Id} [id]\r\n * @param {string} [query]\r\n * @returns {Promise<T>}\r\n */\r\nasync function single<T>(\r\n baseURL: string, \r\n endpoint: string, \r\n headers: ResourceHeader, \r\n id?: Id, \r\n query?: Object, \r\n importance?: string): Promise<T> {\r\n\r\n const targetUrl = resolveUrl(baseURL, query, endpoint, id);\r\n const result = await fetchJson(targetUrl, authProvider.processResponse, { headers, importance });\r\n if (Array.isArray(result)) {\r\n return result[0];\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Return everything form the result.body using fetch().json()\r\n *\r\n * @template T\r\n * @param {string} url\r\n * @param {Id} [id]\r\n * @param {string} [query]\r\n * @returns {Promise<T>}\r\n */\r\nasync function all<T>(\r\n baseURL: string, \r\n endpoint: string, \r\n headers: ResourceHeader, \r\n id?: Id, \r\n query?: Object, \r\n importance?: string): Promise<T> {\r\n\r\n const targetUrl = resolveUrl(baseURL, query, endpoint, id);\r\n return fetchJson(targetUrl, authProvider.processResponse, { headers, importance });\r\n}\r\n\r\n/**\r\n * Return HttpResponse using fetch()\r\n *\r\n * @template T\r\n * @param {string} url\r\n * @param {Id} [id]\r\n * @param {string} [query]\r\n * @returns {Promise<T>}\r\n */\r\nasync function response<T>(\r\n baseURL: string, \r\n endpoint: string, \r\n headers: ResourceHeader, \r\n id?: Id, \r\n query?: Object, \r\n importance?: string): Promise<T> {\r\n\r\n const targetUrl = resolveUrl(baseURL, query, endpoint, id);\r\n\r\n const response = await makeHttpRequest(targetUrl, { headers, importance });\r\n\r\n const json = response.status !== HttpStatusCodes.NO_CONTENT && response.status !== HttpStatusCodes.NOT_MODIFIED\r\n ? await response.json() : undefined;\r\n\r\n return {\r\n json: json,\r\n status: response.status,\r\n ...(response.headers.has('ETag') ? { etag: response.headers.get('ETag') } : {}),\r\n ...(!!response.headers.has('Expires') && { expires: response.headers.get('Expires') })\r\n } as any;\r\n}\r\n\r\n/**\r\n * Perform a http POST and return the response of fetching header.location,\r\n * or if `; returnLocation` is false, returns the response\r\n *\r\n * @template T\r\n * @param {string} url the url to POST the request to\r\n * @param {Object} [params] body form values to post\r\n * @param {boolean} returnLocation return the resource specified by header.location when statusCode is 201 CREATED. default is true.\r\n * @param {Id} [id]\r\n * @param {string} [query]\r\n * @returns {Promise<T>}\r\n */\r\nasync function post(\r\n baseURL: string, \r\n endpoint: string, \r\n headers: ResourceHeader, \r\n params: Object,\r\n fetchLocationId: boolean = false, \r\n id?: Id, \r\n query?: Object, \r\n importance?: string): Promise<Response | { location: string, response: any }> {\r\n\r\n const result = await makeHttpRequest(resolveUrl(baseURL, query, endpoint, id), { method: 'post', body: params, headers, importance });\r\n\r\n if (!fetchLocationId) {\r\n return Promise.resolve(result);\r\n }\r\n\r\n if (result.ok && (result.status === HttpStatusCodes.OK || result.status === HttpStatusCodes.CREATED)) {\r\n const caseEntityUrl = result.headers.get('Location');\r\n if (!caseEntityUrl) {\r\n throw remoteDataError('Header \"Location\" is not exposed for CORS', result);\r\n }\r\n\r\n return Promise.resolve({\r\n location: caseEntityUrl.match(/(?:[^\\\\/](?!(\\\\|\\/)))+$/)[0],\r\n response: await result.json()\r\n });\r\n }\r\n\r\n return Promise.resolve(result);\r\n}\r\n\r\n/**\r\n * Perform a http PUT and return the response\r\n *\r\n * @template T\r\n * @param {string} url the url to PUT the request to\r\n * @param {ResourceHeader} headers\r\n * @param {Object} params body form values to post\r\n * @param {Id} [id]\r\n * @param {string} [query]\r\n * @returns {Promise<T>}\r\n */\r\nasync function put<T>(\r\n baseURL: string, \r\n endpoint: string, \r\n headers: ResourceHeader, \r\n params?: Object, \r\n id?: Id, \r\n query?: Object, \r\n importance?: string): Promise<T> {\r\n\r\n const response = await makeHttpRequest(\r\n resolveUrl(baseURL, query, endpoint, id),\r\n { method: 'put', body: params || {}, headers: headers, importance }\r\n );\r\n\r\n // response 204 may be null\r\n const body = await response.text();\r\n\r\n return {\r\n json: (body.length ? JSON.parse(body) : undefined),\r\n ...(response.headers.has('ETag') ? { etag: response.headers.get('ETag') } : {})\r\n } as any;\r\n}\r\n\r\n/**\r\n * Perform a http DELETE and return the response.\r\n * Delete is reserved word in JS, thus function name breaking the convention.\r\n *\r\n * @template T\r\n * @param {string} url the url to DELETE the request to\r\n * @param {ResourceHeader} headers\r\n * @param {Object} params body form values to post\r\n * @param {Id} [id]\r\n * @param {string} [query]\r\n * @returns {Promise<T>}\r\n */\r\nasync function httpDelete(\r\n baseURL: string, \r\n endpoint: string,\r\n headers: ResourceHeader, \r\n params: Object, \r\n id?: Id, \r\n query?: Object, \r\n importance?: string): Promise<Response> {\r\n \r\n return await makeHttpRequest(resolveUrl(baseURL, query, endpoint, id), { method: 'delete', body: params, headers, importance });\r\n}\r\n\r\n/**\r\n * Perform a http request and return blob response\r\n *\r\n * @template T\r\n * @param {string} url\r\n * @param {ResourceHeader} headers\r\n * @param {string} [query]\r\n * @param {Object} [params]\r\n * @returns {Promise<T>}\r\n */\r\nasync function blob(\r\n baseURL: string, \r\n endpoint: string, \r\n headers: ResourceHeader, \r\n query?: Object, \r\n params?: Object, \r\n importance?: string): Promise<Blob> {\r\n \r\n const response = await makeHttpRequest(resolveUrl(baseURL, query, endpoint),\r\n params\r\n ? { method: 'post', body: params, headers, importance }\r\n : { headers, importance }\r\n );\r\n return response.blob();\r\n}\r\n\r\n/**\r\n * Typed builder class for a fluent construction of REST requests\r\n *\r\n * @class ResourceWrapper\r\n * @implements {Resource<T>}\r\n * @template T\r\n */\r\ninterface ResourceHeader {\r\n 'If-Match': string;\r\n}\r\n\r\nclass ResourceWrapper<T> implements Resource<T> {\r\n\r\n private baseUrl: string;\r\n private resourceUrl: string;\r\n private authHeaders: {};\r\n private id: Id;\r\n private query: Object = {};\r\n private headerItems: ResourceHeader = {\r\n 'If-Match': ''\r\n };\r\n private requestAuthentication: () => void;\r\n private importance: string = 'high';\r\n\r\n private get headers() {\r\n return {\r\n ...this.authHeaders,\r\n ...this.headerItems\r\n };\r\n }\r\n\r\n constructor(baseUrl: string, resourceUrl: string, authHeaders: {}, requestAuthentication: () => void) {\r\n this.baseUrl = baseUrl;\r\n this.resourceUrl = resourceUrl;\r\n this.authHeaders = authHeaders;\r\n this.requestAuthentication = requestAuthentication;\r\n\r\n if (store) {\r\n const state = store.getState()[STATE.remoteData];\r\n if (state) {\r\n this.query = {\r\n ...this.query,\r\n ...state.query\r\n };\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Adds the parameter as a route parameter\r\n *\r\n * @example\r\n * ```\r\n * .withId(123); => /your/url / 123\r\n * ```\r\n *\r\n * @param {Id} id\r\n * @returns\r\n *\r\n * @memberOf ResourceWrapper\r\n */\r\n public withId = (id: Id) => {\r\n this.id = id;\r\n return this as Resource<T>;\r\n }\r\n\r\n /**\r\n * Set your last known entity Etag for every GET, POST, PUT, PATCH avoid errors\r\n * and improve user agent caching\r\n */\r\n public withIfMatch(etag: string) {\r\n this.headerItems['If-Match'] = etag;\r\n return this as Resource<T>;\r\n }\r\n\r\n /**\r\n * Set your last known entity Etag for every GET avoid errors\r\n * and improve user agent caching\r\n */\r\n public withIfNoneMatch(etag: string) {\r\n this.headerItems['If-None-Match'] = etag;\r\n return this as Resource<T>;\r\n }\r\n\r\n public withHeader(name: string, value: string) {\r\n if (name && value) {\r\n this.headerItems[name] = value;\r\n }\r\n return this as Resource<T>;\r\n }\r\n\r\n public withImportance(importance: 'low' | 'high') {\r\n this.importance = importance;\r\n return this;\r\n }\r\n\r\n /**\r\n * Adds a query string to the URL\r\n *\r\n *\r\n * ```\r\n * {\r\n * someparam: 'ok' // => results in: /your/url?someparam=ok\r\n * }\r\n * ```\r\n * @param map\r\n * @returns\r\n *\r\n * @memberOf ResourceWrapper\r\n */\r\n public filter(map: any) {\r\n this.query = Object.keys(map)\r\n .filter(p => !!p)\r\n .reduce((res, prop: any) => {\r\n if (map[prop] !== undefined && map[prop] !== null) {\r\n res[prop] = map[prop];\r\n }\r\n return res;\r\n }, this.query || {});\r\n return this as Resource<T>;\r\n }\r\n\r\n private invoke = async (fn: any) => {\r\n try {\r\n return fn();\r\n } catch (err) {\r\n if (err && err.status === HttpStatusCodes.UNAUTHORIZED) {\r\n this.requestAuthentication();\r\n } else {\r\n throw err;\r\n }\r\n }\r\n }\r\n /**\r\n * Return one (or the first) single entity from the service result\r\n *\r\n * @returns {Promise<T>}\r\n *\r\n * @memberOf ResourceWrapper\r\n */\r\n public async single(): Promise<T> {\r\n return this.invoke(() => single<T>(this.baseUrl, this.resourceUrl, this.headers, this.id, this.query, this.importance));\r\n }\r\n\r\n /**\r\n * Return all of response.body as json from the service result\r\n *\r\n * @returns {Promise<T>}\r\n *\r\n * @memberOf ResourceWrapper\r\n */\r\n public async all(): Promise<T> {\r\n return this.invoke(() => all<T>(this.baseUrl, this.resourceUrl, this.headers, this.id, this.query, this.importance));\r\n }\r\n\r\n /**\r\n * Return response from the service result\r\n *\r\n * @returns {Promise<T>}\r\n *\r\n * @memberOf ResourceWrapper\r\n */\r\n public async response(): Promise<T> {\r\n return this.invoke(() => response<T>(this.baseUrl, this.resourceUrl, this.headers, this.id, this.query, this.importance));\r\n }\r\n\r\n /**\r\n * Create a new resource with http POST\r\n */\r\n public async create(params: Object, getLocation: boolean = false): Promise<T> {\r\n return this.invoke(() => post(this.baseUrl, this.resourceUrl, this.headers, params, getLocation, this.id, this.query, this.importance));\r\n }\r\n\r\n /**\r\n * Create a new resource with http PUT\r\n */\r\n public async save(params?: Object): Promise<T> {\r\n return this.invoke(() => put<T>(this.baseUrl, this.resourceUrl, this.headers, params, this.id, this.query, this.importance));\r\n }\r\n\r\n /**\r\n * Deletes resource with http DELETE\r\n */\r\n public async httpDelete(params: Object): Promise<T> {\r\n return this.invoke(() => httpDelete(this.baseUrl, this.resourceUrl, this.headers, params, this.id, this.query, this.importance));\r\n }\r\n\r\n /**\r\n * Return response with blob\r\n */\r\n\r\n public async blob(params?: Object): Promise<T> {\r\n return this.invoke(() => blob(this.baseUrl, this.resourceUrl, this.headers, this.query, params, this.importance));\r\n }\r\n}\r\n\r\nexport interface RemoteDataOptions {\r\n baseUrl: string;\r\n endpoint: string;\r\n referenceToken?: string;\r\n}\r\n\r\n/**\r\n * Offers a typed fluent interface over a remote REST api\r\n *\r\n * @export\r\n * @class RemoteData\r\n */\r\nexport class RemoteData {\r\n public config: RemoteDataOptions;\r\n public auth: any;\r\n\r\n //TODO: decide if RemoteData should live in the application layer, or have url and token parameterized\r\n constructor(endpoint: string) {\r\n this.auth = authProvider;\r\n this.config = {\r\n baseUrl: AppSetting.ApiBaseUrl,\r\n endpoint: endpoint\r\n };\r\n }\r\n\r\n /**\r\n * Returns a wrapping object for the generic resource type to build a remote request\r\n *\r\n * @template T\r\n * @returns {Resource<T>}\r\n *\r\n * @memberOf RemoteData\r\n */\r\n public resource<T>(): Resource<T> {\r\n return new ResourceWrapper<T>(this.config.baseUrl, this.config.endpoint, this.auth.headers, this.auth.reAuthenticate);\r\n }\r\n}\r\n\r\nexport class RemoteAdminData extends RemoteData {\r\n\r\n constructor(endpoint: string) {\r\n super(endpoint);\r\n this.config.baseUrl = AppSetting.AdminApiBaseUrl;\r\n }\r\n}\r\n\r\nexport class RemoteNotificationsData extends RemoteData {\r\n\r\n constructor(endpoint: string) {\r\n super(endpoint);\r\n this.config.baseUrl = AppSetting.NotificationsApiBaseUrl;\r\n }\r\n}\r\n","\r\n/**\r\n * Deep compare two objects and exclude comparison checks for functions.\r\n * \r\n * @export\r\n * @param {*} a\r\n * @param {*} b\r\n * @param {*} [ca=[]]\r\n * @param {any[]} [cb=[]]\r\n * @returns {boolean}\r\n */\r\nexport function deepEquals(a: any, b: any, ca: any = [], cb: any[] = []): boolean {\r\n // Partially extracted from node-deeper and adapted to exclude comparison\r\n // checks for functions.\r\n // https://github.com/othiym23/node-deeper\r\n if (a === b) {\r\n return true;\r\n } else if (typeof a === 'function' || typeof b === 'function') {\r\n // Assume all functions are equivalent\r\n return true;\r\n } else if (typeof a !== 'object' || typeof b !== 'object') {\r\n return false;\r\n } else if (a === null || b === null) {\r\n return false;\r\n } else if (a instanceof Date && b instanceof Date) {\r\n return a.getTime() === b.getTime();\r\n } else if (a instanceof RegExp && b instanceof RegExp) {\r\n return a.source === b.source &&\r\n a.global === b.global &&\r\n a.multiline === b.multiline &&\r\n a.lastIndex === b.lastIndex &&\r\n a.ignoreCase === b.ignoreCase;\r\n } else if (isArguments(a) || isArguments(b)) {\r\n if (!(isArguments(a) && isArguments(b))) {\r\n return false;\r\n }\r\n const slice = Array.prototype.slice;\r\n return deepEquals(slice.call(a), slice.call(b), ca, cb);\r\n } else {\r\n if (a.constructor !== b.constructor) {\r\n return false;\r\n }\r\n\r\n const ka = Object.keys(a);\r\n const kb = Object.keys(b);\r\n // don't bother with stack acrobatics if there's nothing there\r\n if (ka.length === 0 && kb.length === 0) {\r\n return true;\r\n }\r\n if (ka.length !== kb.length) {\r\n return false;\r\n }\r\n\r\n let cal = ca.length;\r\n while (cal--) {\r\n if (ca[cal] === a) {\r\n return cb[cal] === b;\r\n }\r\n }\r\n ca.push(a);\r\n cb.push(b);\r\n\r\n ka.sort();\r\n kb.sort();\r\n for (let j = ka.length - 1; j >= 0; j--) {\r\n if (ka[j] !== kb[j]) {\r\n return false;\r\n }\r\n }\r\n\r\n let key: any;\r\n for (let k = ka.length - 1; k >= 0; k--) {\r\n key = ka[k];\r\n if (!deepEquals(a[key], b[key], ca, cb)) {\r\n return false;\r\n }\r\n }\r\n\r\n ca.pop();\r\n cb.pop();\r\n\r\n return true;\r\n }\r\n}\r\n\r\nfunction isArguments (object: any) {\r\n return Object.prototype.toString.call(object) === '[object Arguments]';\r\n}\r\n","/**\r\n * Returns the result of the first function in @see `fns` that returns a truthy value for the arguments applied\r\n * \r\n * @param {Function[]} fns to execute in search of a truthy value\r\n */\r\nexport const anyOf = (fns: Function[], ...args) => fns.reduce( (r, fn) => !r ? fn(...args) : r , null);\r\n","export * from './deep-equals';\r\nexport * from './functional';\r\nexport * from './template';\r\n\r\n// re-export default exported modules to support both webpack and unit-test environment\r\nimport memoizeOne from 'memoize-one';\r\nconst memoizer = memoizeOne || require('memoize-one');\r\nexport {memoizer as memoize};\r\n","export * from './types';\r\nexport * from './info';\r\nexport * from './input-control-context';\r\nexport * from './input-label';\r\nexport * from './label/label';\r\nexport * from './validation';\r\nexport * from './button';\r\nexport * from './prompt-confirmation';\r\nexport * from './dropdown-menu';\r\nexport * from './permission';\r\nexport * from './value-display/value-display';\r\nexport * from './triangle';\r\nexport * from './check-symbol';\r\nexport * from './icons';\r\nexport * from './no-value-dash';\r\nexport * from './visibility-sensor/visibility-sensor';\r\nexport * from './tabs';\r\n","\r\n/*\r\n * Returns true if the input can be converted to a number, including numeric 0\r\n */\r\nexport const isNumeric = (s: string | number) => typeof s === 'number' && Number.isFinite(s) || \r\n (typeof s === 'string' && s.trim() !== '' && Number.isFinite(Number(s)) );\r\n/*\r\n * Returns true if the input can be converted to a positive number, including numeric 0.\r\n */\r\nexport const isPositiveNumeric = (s: string) => isNumeric(s) && parseInt(s, 10) > -1; \r\n\r\n/**\r\n * Return true if value is defined, including zero.\r\n */\r\nexport const isDefinedIncludingZero = (value: any) => !!value || value === 0;\r\n","'use strict';\nvar $ = require('../internals/export');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.indexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","import { Consent } from 'app/area/user-profile/my-notifications/types';\r\n\r\n/**\r\n * This file should only contain simple shared types with no external dependencies\r\n * DO NOT ADD imports TO THIS FILE, since that will easily create circular dependencies.\r\n */\r\n\r\n/**\r\n * Supported view render modes\r\n * Must be defined here due to TS circ-refs\r\n */\r\nexport enum RenderMode {\r\n read = 0,\r\n edit = 1,\r\n report = 2,\r\n embeddedReport = 3\r\n}\r\n\r\n/**\r\n * A single text entry in a text collection\r\n *\r\n * @export\r\n * @interface Text\r\n */\r\nexport interface Text {\r\n id: TextId;\r\n description: string;\r\n}\r\n\r\n/**\r\n * Application texts are retreived per logical area as TextCollections\r\n *\r\n * @export\r\n * @class TextCollection\r\n */\r\nexport class TextCollection {\r\n public id: number;\r\n public description: string;\r\n public texts: Text[];\r\n}\r\n\r\nexport interface Entity {\r\n id: CompositeKeys;\r\n operation?: EntityOperations;\r\n primaryKey?: ComplexValue<number>;\r\n [field: string]: StoreField[] | ChildEntityReference | CompositeKeys | EntityOperations | ComplexValue<number>;\r\n}\r\n\r\nexport interface StoreItemPath {\r\n [entityType: string]: number;\r\n}\r\n\r\n/**\r\n * CompositeKeys attempts to describe the legacy database compound keys as Primary Key for a Case\r\n */\r\nexport type CompositeKeys = StoreItemPath[];\r\n\r\nexport type EntityOperations = 'Remove' | undefined;\r\n\r\nexport interface ComplexValue<T extends ValueProperty> {\r\n readonly value: T;\r\n readonly description?: string;\r\n readonly longDescription?: string;\r\n readonly icon?: string;\r\n readonly backgroundColor?: number;\r\n readonly foregroundColor?: number;\r\n readonly descendants?: ComplexValue<T>[];\r\n readonly allLevelDescription?: string;\r\n readonly minLevel?: number;\r\n readonly title?: string;\r\n readonly categoryId?: number;\r\n readonly extra?: { [key: string]: number | string | boolean };\r\n readonly owner?: ComplexValue<T>;\r\n readonly sharedThroughUserGroup?:boolean;\r\n}\r\n\r\nexport interface StoreField {\r\n value: number | string;\r\n description?: string;\r\n categoryId?: number;\r\n}\r\n\r\n/**\r\n * Type for `value` property within a ComplexValue shape\r\n */\r\nexport type ValueProperty = string | number | boolean | Date; // Should we support list of selected date or bool?\r\n\r\nexport type ChildEntityReference = number[];\r\n\r\n/**\r\n * Permissions settings for Case only, not draft documents\r\n */\r\nexport interface CasePermissions {\r\n caseId?: number;\r\n [indexer: string]: boolean | number;\r\n}\r\n\r\n/**\r\n * The Id for a text\r\n *\r\n * @export\r\n * @interface TextId\r\n */\r\nexport interface TextId {\r\n no: number;\r\n textSet: number;\r\n}\r\n\r\n/**\r\n * Code table value - JSON wire format\r\n */\r\nexport interface Value {\r\n v: any;\r\n d?: string;\r\n ld?: string;\r\n ald?: string;\r\n i?: string;\r\n f?: number;\r\n b?: number;\r\n c?: number;\r\n}\r\n\r\n/**\r\n * Typed argument object to use when constructing a\r\n * code table API request\r\n */\r\nexport interface LoadOptions {\r\n domainId?: number;\r\n searchTerm?: string;\r\n sort?: 'asc' | 'desc';\r\n parentId?: number;\r\n siblingId?: number;\r\n levels?: number;\r\n query?: any;\r\n categoryId?: number;\r\n displayNotSelected?: boolean;\r\n iteratorId?: number;\r\n}\r\n\r\n/*\r\n * This type can be used as a hint on action creators so that its 'dispatch' and 'getState' params are\r\n * correctly typed to match your store.\r\n */\r\nexport interface ActionDispatching<TAction, TState> {\r\n (dispatch: (action: TAction) => void, getState: () => TState): void;\r\n}\r\n\r\nexport interface ApiResponse<T> {\r\n readonly data: T;\r\n readonly messages?: ServerMessages;\r\n}\r\n\r\nexport interface ServerMessages {\r\n readonly userMessages?: any;\r\n readonly validationErrors?: any;\r\n}\r\n\r\nexport interface HttpResponse<T> {\r\n readonly json: ApiResponse<T>;\r\n readonly status: number;\r\n readonly etag?: string;\r\n readonly expires?: string;\r\n}\r\n\r\nexport interface BowtieSupported {\r\n caseId: number;\r\n supported: boolean;\r\n}\r\n\r\n/**\r\n * StoreData is the flattened array format that data is stored in, in the redux store\r\n *\r\n * This is mapped back and fort between the legacy wire format and the flat format in `normalize` module\r\n */\r\nexport type StoreData = Entity[];\r\n\r\n/**\r\n * Domain specific metadata parsed from case metaData (readOnlyDomains, requiredFieldDomains)\r\n */\r\nexport type StoreDomainMeta = {\r\n [key: number]: {\r\n readOnly?: StoreDomainMatch,\r\n requiredField?: StoreDomainMatch,\r\n hidden?: StoreDomainMatch,\r\n validations?: ValidationDomainMatch[]\r\n }\r\n};\r\n\r\n/**\r\n * A domain can either match globally (for the whole case), or for specific entityPaths.\r\n * If globalMatch = true, it will match globally for the whole case. If globalMatch = false,\r\n * it only matches for sub parts of the case where the entity context matches one of the entityPaths.\r\n */\r\nexport interface StoreDomainMatch {\r\n globalMatch: boolean;\r\n entityPaths: CompositeKeys[];\r\n}\r\n\r\nexport enum ValidationMessageLevel {\r\n Error = 1,\r\n Warning = 2\r\n}\r\n\r\n/**\r\n * A validation includes additional information like message, level and label\r\n */\r\nexport interface ValidationDomainMatch extends StoreDomainMatch {\r\n level: ValidationMessageLevel;\r\n label?: string;\r\n message?: string;\r\n}\r\n\r\n/**\r\n * Store entry point for metadata - contains information for store entities and global domains\r\n */\r\nexport interface StoreMetadata {\r\n domains?: StoreDomainMeta;\r\n}\r\n\r\n/**\r\n * Case data JSON formats\r\n */\r\nexport interface PrimaryKey {\r\n v: number;\r\n d?: string;\r\n ld?: string;\r\n ctg?: number;\r\n i?: string;\r\n}\r\n\r\nexport interface EntityPath {\r\n tbl: string;\r\n pk: number;\r\n}\r\n\r\nexport interface FieldValue {\r\n values: Value[];\r\n}\r\n\r\nexport interface Status {\r\n currentStatus: Value;\r\n validNextStatuses?: Value[];\r\n}\r\n\r\nexport interface Fields {\r\n [indexer: string]: FieldValue;\r\n}\r\n\r\nexport interface SubTable {\r\n primaryKey: PrimaryKey;\r\n fields: Fields;\r\n subTables?: SubTables;\r\n}\r\n\r\nexport interface SubTables {\r\n [indexer: string]: SubTable[];\r\n}\r\n\r\nexport interface CaseData {\r\n primaryKey: PrimaryKey;\r\n caseType: Value;\r\n caseContext: Value;\r\n metaData?: Metadata;\r\n status: Status;\r\n fields: Fields;\r\n subTables?: SubTables;\r\n}\r\n\r\nexport interface DomainMetadata {\r\n domainId: number;\r\n dataTag?: string;\r\n entityPaths?: EntityPath[][];\r\n}\r\n\r\nexport enum ConstraintResponseType {\r\n Error = 1,\r\n Warning = 2\r\n}\r\n\r\nexport interface FailedDomainConstraintEntityPath {\r\n entityType: string;\r\n entityId: number;\r\n}\r\n\r\nexport interface FailedDomainConstraintMetaData {\r\n domainId: number;\r\n responseType: ConstraintResponseType;\r\n domainText?: string;\r\n message?: string;\r\n entityPaths?: FailedDomainConstraintEntityPath[][];\r\n}\r\n\r\nexport interface Metadata {\r\n readOnlyDomains?: DomainMetadata[];\r\n requiredFieldDomains?: DomainMetadata[];\r\n requiredFieldDomainsForStatusChange?: DomainMetadata[];\r\n hiddenDomains?: DomainMetadata[];\r\n failedDomainConstraints?: FailedDomainConstraintMetaData[];\r\n}\r\n\r\n/**\r\n * Favourite definition\r\n */\r\nexport interface FavouriteDefinition {\r\n emailSubscribers?: string; //only for special reports\r\n favourite?: Value;\r\n selectedReport: Value;\r\n conditions: FavouriteCondition[];\r\n connections: FavouriteConnections[];\r\n exposureApplication?: Value;\r\n exposureFactor?: number;\r\n exposurePercent?: number;\r\n reports: ReportDefinition[];\r\n validState?: any;\r\n}\r\n\r\nexport interface SelectionDefinition {\r\n id: number;\r\n domain: Value;\r\n levels?: number;\r\n interval?: number;\r\n period?: Value;\r\n type: Value;\r\n setLevelAccToCond?: boolean;\r\n fillEmpty?: number;\r\n selectedCode?: number;\r\n sortOrderType?: Value;\r\n}\r\n\r\nexport interface ReportDefinition {\r\n report: Value;\r\n aggregationType: Value;\r\n targetApp?: Value;\r\n aggregationDomain: Value;\r\n specialReport?: Value; //only for special reports\r\n layoutType: Value;\r\n layoutAttributes: FavouriteLayoutAttributes[];\r\n uomSetDomain?: Value; //user of mesurement, not neccesary\r\n type: Value;\r\n sort?: any[];\r\n selections: SelectionDefinition[];\r\n options?: any[];\r\n excludedOptions?: any[];\r\n rollingAverage?: number;\r\n predefDate?: Date; //only for special reports\r\n}\r\n\r\nexport interface FavouriteLayoutAttributes {\r\n layoutTypeId: number;\r\n layoutTypeContext: number;\r\n name: string;\r\n value: string | boolean;\r\n}\r\n\r\n/**\r\n * Favourite connections\r\n */\r\nexport interface FavouriteConnections {\r\n connected: Value;\r\n operator: Value;\r\n}\r\n\r\n/**\r\n * Favourite condition\r\n */\r\nexport interface FavouriteCondition {\r\n id?: number;\r\n domainDbFunction?: Value;\r\n domain?: Value;\r\n valueOperator?: Value;\r\n conditionOperator?: Value;\r\n conditionOperator2?: Value; // Probably has to be deleted\r\n extraSqlCondition?: string;\r\n exactLevel?: boolean;\r\n forceExists?: boolean;\r\n values?: FavouriteConditionValue[];\r\n advancedSearchType?: number;\r\n searchRequired?: boolean;\r\n}\r\n\r\n/**\r\n * Favourite condition value\r\n */\r\nexport interface FavouriteConditionValue {\r\n id?: number;\r\n dbFunction?: Value;\r\n operator?: Value;\r\n periodPredef?: Value;\r\n code?: Value;\r\n number?: number;\r\n number2?: number;\r\n string?: string;\r\n date?: any;\r\n type?: string;\r\n myValue?: boolean;\r\n}\r\n\r\n/**\r\n * Favourite options\r\n */\r\ninterface DomainNode {\r\n description: string;\r\n value: number;\r\n}\r\n\r\nexport interface DefaultSortOrder {\r\n domainNode: DomainNode;\r\n orderBySequence: number;\r\n sortOrderType: number;\r\n}\r\n\r\nexport interface SortOptions {\r\n sortOptions: DomainNode[];\r\n defaultSortOrder: DefaultSortOrder[];\r\n}\r\n\r\nexport interface FavouriteOptions {\r\n report?: number;\r\n sort?: { [report: number]: DefaultSortOrder[] };\r\n conditions?: FavouriteCondition[];\r\n connections?: FavouriteConnections[];\r\n query?: string;\r\n predefDate?: string;\r\n}\r\n\r\n/**\r\n * Favourite result\r\n */\r\nexport interface FavouriteResult {\r\n metadata: any;\r\n results: any[];\r\n}\r\n\r\nexport interface FavouriteLayoutModel {\r\n dashboardType: number;\r\n layoutType: number;\r\n layoutTypeContext: number;\r\n presentationType: number;\r\n layoutTypeAttributes: { [key: string]: string | boolean };\r\n}\r\n\r\nexport interface AdvancedSearchTypes {\r\n id?: Value;\r\n conditionOperator?: Value;\r\n dbFunctionDomain?: Value;\r\n dbFunctionValue?: Value;\r\n dbFunctionValue2?: Value;\r\n dbFunctionValue3?: Value;\r\n valueOperator?: Value;\r\n valueOperator2?: Value;\r\n valueOperator3?: Value;\r\n dbFunctionDomain2?: Value;\r\n valueListOperator?: Value;\r\n}\r\n\r\n/**\r\n * Contextual information about the authenticated user\r\n *\r\n * @export\r\n * @interface UserInfo\r\n */\r\nexport interface UserInfo {\r\n id: number;\r\n userName: string;\r\n name: string;\r\n email: string;\r\n language: ComplexValue<number>;\r\n unit: ComplexValue<number>;\r\n location: ComplexValue<number>;\r\n userGroup: ComplexValue<number>;\r\n startupDashboardId: number;\r\n startupDashboardTypeId: number;\r\n access: AccessInfoData;\r\n showNotificationChannelsInfo: boolean;\r\n myProfileAllowChangingName: boolean;\r\n myProfileAllowChangingEmailAddress: boolean;\r\n}\r\n\r\n/**\r\n * Email address of support\r\n *\r\n * @export\r\n * @interface SupportEmailAddress\r\n */\r\n\r\nexport interface SupportEmailAddress {\r\n data: SupportEmailAddressData;\r\n}\r\n\r\nexport interface SupportEmailAddressData {\r\n emailAddress: string;\r\n}\r\n\r\n/**\r\n * Access info\r\n */\r\nexport interface AccessInfoData {\r\n adminPanel?: AdminInfoData;\r\n tools?: ToolsInfoData;\r\n surveyManager?: SurveyManagerAccessInfoData;\r\n}\r\n\r\nexport interface AdminInfoData {\r\n user: AccessAdminInfoData;\r\n role: AccessAdminInfoData;\r\n codetable: AccessAdminInfoData;\r\n alternativeIdPanel: boolean;\r\n extraInfoPanel: boolean;\r\n restrictedAccessPanel: boolean;\r\n}\r\n\r\nexport interface AccessAdminInfoData {\r\n create: boolean;\r\n read: boolean;\r\n administration: boolean;\r\n administrationCentral: boolean;\r\n}\r\n\r\n/**\r\n * Tools info\r\n *\r\n * @export\r\n * @interface ToolsInfo\r\n */\r\n\r\nexport interface ToolsInfo {\r\n messages: Object;\r\n data: ToolsInfoData;\r\n}\r\n\r\nexport interface ToolsInfoData {\r\n refreshCache: boolean;\r\n regenerateAggregateTables: boolean;\r\n excelAddIn: boolean;\r\n exportAndImport: ToolsInfoDataExportAndImport;\r\n notifications: boolean;\r\n}\r\n\r\nexport interface ToolsInfoDataExportAndImport {\r\n export: boolean;\r\n import: boolean;\r\n}\r\n\r\n/**\r\n * Global state of the authentication\r\n *\r\n * @export\r\n * @interface AuthState\r\n */\r\nexport enum AuthState {\r\n NotAuthenticated,\r\n Authenticated,\r\n Anonymous,\r\n AuthenticationFailed,\r\n LoggedOut\r\n}\r\n\r\n/**\r\n * The value representation passed as ...spread props to a UI-component\r\n */\r\nexport interface SelectedValue {\r\n readonly value: ValueProperty;\r\n readonly valueItem: ComplexValue<string> | ComplexValue<number>;\r\n readonly valueItems: (ComplexValue<string> | ComplexValue<number>)[];\r\n}\r\n\r\n/**\r\n * Shape for a more readable mapping of the Code wire format\r\n */\r\n\r\nexport interface CurrentEditState {\r\n etag: string;\r\n hasChanges?: boolean;\r\n persistedValues: {};\r\n values: any[];\r\n}\r\n\r\n/**\r\n * The server configuration wire format\r\n *\r\n * UiDefinition\r\n * Domain\r\n * DomainAttributes\r\n *\r\n * @export\r\n * @interface UiDefinition\r\n */\r\n\r\n/**\r\n * State required by most container components, shared across state slices\r\n */\r\nexport interface SharedState extends UserInfo {\r\n locale: string;\r\n authState: AuthState;\r\n}\r\n\r\n/**\r\n * Settings with origin on server, potentially cached locally in client storage\r\n */\r\nexport interface ClientConfig {\r\n fallbackLocale: string;\r\n utcOffset: number;\r\n baseUrl: string;\r\n}\r\n\r\nexport interface TranslatedState {\r\n texts?: TextCollection;\r\n textsLanguage?: number;\r\n textsFetching?: boolean;\r\n}\r\n\r\n/**\r\n * Re-exports and rollup file to ease the job for configure-store to setup redux\r\n * Note that there is a Circular Dep between this file and areas\r\n * to be able to strong-type the ApplicationState, which is rather cruicial\r\n */\r\n\r\nexport interface ShellState extends TranslatedState {\r\n settings: ClientConfig;\r\n userInfo?: UserInfo;\r\n authState: AuthState;\r\n fetching: boolean;\r\n fetchingAccessInfo?: boolean;\r\n errors: ErrorState[];\r\n messages: UserMessage[];\r\n version?: string;\r\n selectedModal?: string;\r\n supportEmailAddress?: string;\r\n helpUrl?: string;\r\n consents?: Consent[];\r\n locale?: string;\r\n fetchingRefreshCache?: boolean;\r\n fetchingRegenerateAggregated?: boolean;\r\n fetchingLoadConsents?: boolean;\r\n messagesToUser?: MessagesToUserInfo[];\r\n updatingMessagesToUser?: boolean;\r\n fixedHeader?: boolean;\r\n manageSurveysUrl?: string;\r\n feedbackUrl?: string;\r\n}\r\n\r\nexport interface MessagesToUserInfo {\r\n id: number;\r\n status: any;\r\n messageDate: Date;\r\n subject?: string;\r\n message?: string;\r\n updating?:boolean;\r\n}\r\n\r\nexport interface ErrorState {\r\n message: string;\r\n error: any;\r\n}\r\n\r\nexport interface UserMessage {\r\n id: number;\r\n title?: string;\r\n message: string;\r\n type: 'success' | 'error';\r\n}\r\n\r\nexport interface SurveyManagerAccessInfoData {\r\n administration: boolean;\r\n read: boolean;\r\n send: boolean;\r\n edit: boolean;\r\n}\r\n\r\nexport interface SurveyManagerSupportedData {\r\n caseId: number;\r\n supported: boolean;\r\n}\r\n","/* tslint:disable */\r\n/**\r\n * Correct Date.parse compliant regex to validate if a date string is in ISO 8610 format\r\n * Complete time HH:mm:ss is required. Timezone is required, either as `Z` or `+/-(HH:mm)`.\r\n * Supports gregorian calendar. Handles leap years.\r\n * \r\n * Examples of valid date strings:\r\n * \r\n * \r\n * 2015-01-17T18:23:02+06:45\r\n * \r\n * 2015-01-17T18:23:02Z\r\n * \r\n * 2015-01-17T18:23:02-00:00 \r\n * \r\n */\r\nexport const REGEX_ISO8601_DATEFORMAT = /^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d{1,3})?(?:Z|[+-][01]\\d:[0-5]\\d)$/;\r\n\r\n/**\r\n * Matches if the format is ISO JSON date, timezone-less ISO 8610. e.g \r\n * \r\n * `2012-12-22T00:00:00`\r\n * \r\n * `2012-12-22T00:00:00.544`\r\n * \r\n * NOTE that any date string in this format will be constructed as a UTC date by JavaScript Date constructor and must thus be normalized to flip\r\n * this into a locale date.\r\n *\r\n */\r\nexport const REGEX_ISO8601_NO_TZ = /^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(\\.\\d{1,3})?$/;\r\n\r\n/**\r\n * Matches if the format is JSON ISO date without the time part, e.g\r\n * \r\n * `20012-12-22`\r\n */\r\nexport const REGEX_ISO8691_NO_TIME_PART = /^(?:[1-9]\\d{3}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-02-29)/;\r\n\r\nconst FORMAT_ISO_8601_DATE = 'yyyy-MM-dd';\r\n\r\n/* tslint:enable */\r\n/**\r\n * Validates if a user input string contains both year, month and day in positions defined by the formatString argument.\r\n * \r\n * The separator char is ignored and may be any non-numeric character,\r\n * \r\n * such as `-`, `/`, `.`\r\n * \r\n * Can be used to validate if the string can be parsed into a valid Date object with time part set to 00.\r\n * \r\n * If no format is given, then ISO yyyy-MM-dd is assumed\r\n * \r\n * @example\r\n * \r\n * `\r\n * isValidDateString('2012-12-24') // returns true\r\n * \r\n * isValidDateString('2012-24-12', 'yyyy-dd-MM') // returns true\r\n * \r\n * isValidDateString('24/12/2012', 'dd-MM-yyyy') // returns true, separator char is ignored\r\n * `\r\n */\r\nexport function isValidDateString(dateString: string, formatString: string = FORMAT_ISO_8601_DATE ) {\r\n try{\r\n const format = formatString.split(/\\W/);\r\n const date = dateString.split('T')[0].split(/\\W/);\r\n //console.log(format);\r\n let m: any;\r\n let d: any;\r\n let y: any;\r\n\r\n for (let i = 0, len = format.length; i < len; i++) { //tslint:disable-line\r\n if (/[Mm]/.test(format[i])) {\r\n m = Number(date[i]);\r\n } else if (/[Dd]/.test(format[i])) {\r\n d = Number(date[i]);\r\n } else if (/[Yy]/.test(format[i])) {\r\n y = Number(date[i]);\r\n }\r\n }\r\n //console.log(y, m, d);\r\n return (m > 0 && m < 13 && y && y > 1970 && d > 0 && d <= new Date(y, m, 0).getDate()) === true;\r\n\r\n }catch (e){\r\n return false;\r\n }\r\n}\r\n","import { REGEX_ISO8601_NO_TZ, REGEX_ISO8601_DATEFORMAT } from '../validation/date';\r\nimport { anyOf } from '../js';\r\nimport { DateFormatters } from 'app/infrastructure/data/types';\r\n\r\n/**\r\n * Removes the 'Z' UTC indicator from a date, since our API cannot handle it\r\n * \r\n * >Note: This creates a closure around the provided date, so it must \r\n * be assigned at a point in time when it cannot be mutated anymore.\r\n * Assigning it as .toJSON when added to the immutable store you ensure that JSON.stringify\r\n * will use the current value. \r\n * \r\n * Monkeypatching is not an option, as this codebase might be using different APIs,\r\n * where some might handle dates differently\r\n */\r\nexport const toISODatewithoutTimezone = (date: Date) => () => {\r\n return !!date && (date instanceof Date) ? date.toISOString().replace('Z', '') : '';\r\n};\r\n\r\n/**\r\n * Clones a local date into a UTC Date - with GMT indicator in the string output.\r\n * The returned date will have year, month, day, hours and minutes assigned\r\n * from parameter `date` LOCAL time\r\n */\r\nconst cloneAsUTC = (date: Date) => (new Date(Date.UTC(\r\n date.getFullYear(), \r\n date.getMonth(), \r\n date.getDate(),\r\n date.getHours(),\r\n date.getMinutes(),\r\n date.getSeconds(),\r\n date.getMilliseconds()\r\n)));\r\n\r\nfunction dateFromISO8601(isoDateString: string) {\r\n const [ \r\n year, \r\n month, \r\n day, \r\n hours = 0, \r\n minutes = 0, \r\n seconds = 0, \r\n milliseconds = 0 ] = isoDateString.match(/\\d+/g).map((s) => Number(s)); \r\n\r\n return createUTCDate({\r\n year,\r\n // parsed calendar dates are +1 compared to how JavaScript count months\r\n month: month - 1,\r\n day,\r\n hours,\r\n minutes,\r\n seconds,\r\n milliseconds\r\n });\r\n}\r\n\r\n/**\r\n * Converts a timezone or non-timezone aware ISO8601 date string to a Date object.\r\n * \r\n * For legacy resons we must completely ignore timezones as suffix when persisting\r\n */\r\nexport function parseAsDateUTC(dateString: string) : Date {\r\n\r\n if (typeof dateString !== 'string'){\r\n return undefined;\r\n }\r\n\r\n if ( REGEX_ISO8601_DATEFORMAT.test(dateString.toUpperCase())\r\n || REGEX_ISO8601_NO_TZ.test(dateString.toUpperCase()) ){\r\n\r\n return dateFromISO8601(dateString);\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nexport const applyDateCalculation = (rawInput: string, now: Date) => {\r\n /**\r\n * Matches: \"d+1\", \"m-22\", \"y+1\" ....\r\n * > Case insensitive\r\n */\r\n const DMY_WITH_SIGN_AND_COUNT = /^(d|m|y)([+-]){1}([0-9]){0,4}$/i; \r\n /**\r\n * Matches: \"d\", \"m\", \"y\"\r\n * > Case insensitive\r\n */\r\n const DMY_ONLY = /^(d|m|y){1}$/i;\r\n \r\n if(typeof rawInput !== 'string' || !now){\r\n return undefined;\r\n }\r\n\r\n const input = rawInput.trim();\r\n const [, \r\n shortcut = undefined, \r\n sign = undefined, \r\n count = undefined\r\n ] = input.match(DMY_WITH_SIGN_AND_COUNT) || input.match(DMY_ONLY) || [];\r\n \r\n if(!shortcut){\r\n return undefined;\r\n }\r\n\r\n if(sign && count){\r\n let num = Number(count);\r\n if(sign === '-' && num > 0) { num = num*-1; }\r\n\r\n (shortcut === 'd') && now.setUTCDate(now.getUTCDate() + num);\r\n (shortcut === 'm') && now.setUTCMonth(now.getUTCMonth() + num);\r\n (shortcut === 'y') && now.setUTCFullYear(now.getUTCFullYear() + num);\r\n }\r\n\r\n return now;\r\n};\r\n\r\n/**\r\n * Parses a ISO8601 date string to a Date object.\r\n * Can also parse a date math expression such as `d+1` where Date.now() is used used as \r\n * value for `d` and any additions are made to the UTC values of the Date object returned\r\n * \r\n * @param expression {string} one of `d`, `m` or `y` modifiers. Optionally a addition or subtraction can be added in the\r\n * form of `+<n>` or `-<n>` where n is a integer. `d+1`, `d-10`, `m+3`, `y-1` would all be valid. The operator sign is **required**\r\n * and the expression is invalid if omitted. An expression with the length of 2 is always invalid.\r\n * @param date {Date} Optional. Defaults to Date.now instanciated as UTC/GMT date.\r\n */\r\nexport const parseDate = (expression, date = cloneAsUTC(new Date())) => anyOf([\r\n applyDateCalculation, \r\n parseAsDateUTC\r\n ], expression, date);\r\n\r\n/**\r\n * When 3rd party code creates new Date objects, this function will ensure\r\n * it's handled consistently troughout it's client lifetime.\r\n */\r\nexport function dateToUTC(date: Date){\r\n return cloneAsUTC(date);\r\n}\r\n\r\n/**\r\n * Creates a date as UTC intead of local time.\r\n * \r\n * All code must create new Dates using this function, to\r\n * ensure we have control if future changes to database \r\n * handling of dates are changed.\r\n * @param dateValues Passed in values will be set to the UTC time and date values. If not defined, Date.now() is used as UTC time and date.\r\n */\r\nexport function createUTCDate(dateValues: {\r\n year?: number, \r\n month?: number, \r\n day?: number, \r\n hours?: number, \r\n minutes?: number,\r\n seconds?: number,\r\n milliseconds?: number\r\n} = {}){\r\n\r\n if (dateValues.year && dateValues.year < 1900){\r\n throw new Error('Use four digit year');\r\n }\r\n if (dateValues.month > 11 || dateValues.month < 0){\r\n throw new Error('Invalid month. Use JavaScript month indexer, 0-11');\r\n }\r\n const now = new Date();\r\n const calendarValues = {\r\n year: now.getFullYear(),\r\n month: now.getMonth(),\r\n day: now.getDate(),\r\n hours: now.getHours(),\r\n minutes: now.getMinutes(),\r\n seconds: now.getSeconds(),\r\n milliseconds: now.getMilliseconds(),\r\n ...(dateValues)\r\n }; \r\n return cloneAsUTC(new Date(\r\n calendarValues.year, \r\n calendarValues.month, \r\n calendarValues.day, \r\n calendarValues.hours, \r\n calendarValues.minutes, \r\n calendarValues.seconds, \r\n calendarValues.milliseconds\r\n ));\r\n}\r\n\r\n/**\r\n * Format a Date as string with UTC time\r\n * \r\n * @param locale Intl locale string\r\n * @param dt The date to format. If undefined, an empty string will be returned\r\n * @param intlOptions Any overriding options merged onto the default {timeZone: 'UTC'} option object\r\n */\r\nexport function formatDateAsUTC( locale: string, dt: Date, intlOptions?: Intl.DateTimeFormatOptions){\r\n return (dt instanceof Date) ? new Intl.DateTimeFormat(locale, {timeZone: 'UTC', ...intlOptions}).format(dt) : '';\r\n}\r\n\r\nexport const DEFAULT_DATE_FORMAT = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };\r\nexport const DEFAULT_TIME_FORMAT = {hour: 'numeric', minute: 'numeric'};\r\n\r\n/**\r\n * Create formatters for Date, Time and Numbers, as a partial application based on passed in locale and existing intl.\r\n * TODO Needs more work to not be coupled to react-intl and component props assumptions\r\n * @param props \r\n */\r\nexport const createFormatters = (\r\n locale: string\r\n): DateFormatters => {\r\n\r\n return {\r\n formatDate: ( dt: Date, intlOptions: Intl.DateTimeFormatOptions = DEFAULT_DATE_FORMAT) => formatDateAsUTC(locale, dt, intlOptions),\r\n formatTime: ( dt: Date, intlOptions: Intl.DateTimeFormatOptions = DEFAULT_TIME_FORMAT) => formatDateAsUTC(locale, dt, intlOptions),\r\n // TODO: we really don't want number stuff here\r\n formatNumber: (n: number, intlOptions: Intl.NumberFormatOptions ) => new Intl.NumberFormat(locale, intlOptions).format(n)\r\n }; \r\n};\r\n","import {globalVar} from '../universal';\r\n\r\n/**\r\n * Automaticlly close window after media have toggled print mode and back.\r\n * Have fallback timer for browsers that don't print in window.\r\n */\r\nconst listenForPrintEnd = () => {\r\n let isPrintQuery = undefined;\r\n let timeout:any = 0;\r\n const close = () => {\r\n window.close();\r\n clearTimeout(timeout);\r\n };\r\n const afterprint = () => {\r\n /**\r\n * setTimeout is used to avoid Edge closes the window before the print dialog opens\r\n * and blocks the thread. This is also used to make sure android don´t close the window\r\n * before the print is done.\r\n */\r\n timeout = setTimeout(close, 200);\r\n };\r\n\r\n addEventListener('afterprint', afterprint);\r\n\r\n /**\r\n * If matchMedia is available listen for toggle of print media query.\r\n * This is used when chrome is printing, because it keeps the same window,\r\n * and switches the mediaquery to print makes the print and switches\r\n * back again.\r\n */\r\n if(globalVar('matchMedia')) {\r\n const mediaPrint = globalVar('matchMedia')('print');\r\n mediaPrint.addListener( (mql) => {\r\n // avoid afterprint and mediaquery battling.\r\n removeEventListener('afterprint', afterprint);\r\n if (isPrintQuery === true && mql.matches === false) {\r\n close();\r\n }\r\n isPrintQuery = mql.matches;\r\n });\r\n }\r\n};\r\n\r\n/**\r\n * A cross-device safe method to open print dialogs.\r\n */\r\nexport const triggerPrintDialog = () => {\r\n /**\r\n * Safari have a bug where it ignores window.print(), but it can trigger\r\n * the print dialog with execCommand.\r\n *\r\n * Chrome throws a error if you do it so it needs a try catch.\r\n * Firefox just returns false, so the if is used to call window.print after\r\n * execCommand is called.\r\n */\r\n try {\r\n if(document.execCommand('print', false, null)) {\r\n return;\r\n }\r\n } catch (e) {\r\n //tslint ignore\r\n }\r\n\r\n window.print();\r\n};\r\n\r\n/**\r\n * A cross-device safe method to open print dialogs.\r\n * And close the window when printing is done.\r\n */\r\nexport const openPrintDialog = () => {\r\n listenForPrintEnd();\r\n\r\n /**\r\n * Additional debounce to avoid components not being completely rendered.\r\n * And to avoid afterprint being fired before listerens are initialized.\r\n */\r\n\r\n setTimeout(() => {\r\n triggerPrintDialog();\r\n }, 200);\r\n};\r\n","import { debug, error } from '../log';\r\nimport { globalVar } from '../universal';\r\nimport { addLocaleData } from 'react-intl';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\n\r\n/**\r\n * For browsers that does not support navigator.languages, ensure empty array is resolved\r\n */\r\nconst userLocales = () => {\r\n const nav = globalVar('navigator');\r\n return (nav.languages && nav.languages.length) ? nav.languages : [];\r\n};\r\n\r\n/**\r\n * Languages that does not have a primary written language e.g Norwegian, where\r\n * \"no\" is not valid for INTL, but only the specific language nb-NO or nb-NN\r\n */\r\nconst localeFallbacks: any = {\r\n no: 'nb-NO',\r\n nb: 'nb-NO',\r\n nn: 'nn-NO'\r\n};\r\n\r\n/**\r\n * Retrive the users browser preferences for content display language as an array.\r\n * Future: This should not be necessary once we've added language and locale to the user profile\r\n */\r\nfunction getAcceptedLanguages(): string[] {\r\n let matches: string[] = [];\r\n const nav = globalVar('navigator');\r\n if (nav) {\r\n matches = (nav.languages && nav.languages.length ? [nav.languages[0]] : undefined)\r\n || [ nav.language || nav.userLanguage || nav.browserLanguage || 'en' ];\r\n matches = matches.filter(x => !!x);\r\n }\r\n\r\n // now, matches may contain either `language` (en) or `language-country-<optional>` (nb-NO-(...))\r\n // to be able to load polyfills, ensure the language is at position 0\r\n const lang = getLanguageFromIetfLanguageTag(matches[0]);\r\n if ( lang !== matches[0] ) {\r\n matches.unshift(lang);\r\n }\r\n return matches;\r\n}\r\n\r\n/**\r\n * Resolve HTTP header `accept-language` from app settings global\r\n */\r\nfunction getHttpHeaderLanguages() : string[] {\r\n const allLanguages = AppSetting.AcceptedLanguage;\r\n\r\n if (!allLanguages) {\r\n return [];\r\n }\r\n\r\n const result = allLanguages.toString().split(',').map( (s: string) => s.split(';')[0]);\r\n const primary = getLanguageFromIetfLanguageTag(result[0]);\r\n if (primary !== result[0]) {\r\n result.unshift(primary);\r\n }\r\n return result;\r\n}\r\n\r\n/**\r\n * Returns the users preferred locale, with fallback to http request language used as locale (IE, Edge)\r\n * Future: This should not be necessary in auth scenarios once we've added language and locale to the user profile.\r\n * Once read from userprofile should always be avaliable from localStorage\r\n */\r\nexport function inferPrimaryIntlLocale(){\r\n\r\n const httpRequestLanguages = AppSetting.AcceptedLanguage || 'en';\r\n const languageCodesFromRequest = httpRequestLanguages.toString().split(',').map( (s: string) => s.split(';')[0]);\r\n const locales = userLocales().length ? userLocales() : languageCodesFromRequest;\r\n\r\n const supported = locales.map((locale: string) => {\r\n\r\n const isSupported = (Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\r\n Intl.NumberFormat.supportedLocalesOf(locale).length);\r\n\r\n const isSupportedWithFallback = (Intl.DateTimeFormat.supportedLocalesOf(localeFallbacks[locale]).length &&\r\n Intl.NumberFormat.supportedLocalesOf(localeFallbacks[locale]).length);\r\n\r\n if (isSupported){\r\n return locale;\r\n }\r\n\r\n if (isSupportedWithFallback){\r\n return localeFallbacks[locale];\r\n }\r\n\r\n return 'no';\r\n\r\n }).filter( (defined: any) => defined );\r\n\r\n return supported[0];\r\n}\r\n\r\nfunction getLanguageFromIetfLanguageTag(locale: string) {\r\n if (locale && locale.indexOf('-') > -1) {\r\n const parts = locale.split('-');\r\n return parts[0];\r\n }\r\n return locale;\r\n}\r\n\r\n/**\r\n * Return first locale match in HTTP header \"Accept-Language\"\" value\r\n * Only used for messages in non-auth scenarios\r\n */\r\nexport function inferContentLanguage() {\r\n return getHttpHeaderLanguages()[0] || getAcceptedLanguages()[0];\r\n}\r\n\r\n/**\r\n * Loads the given react-intl bullshit locale on demand from a code-split bundle\r\n * to have date and number formatting in the UI that reflects the users current language locale\r\n *\r\n * The react-intl locale data files are provide per language, e.g.\r\n * en.js, but they contain data for all locales in that language, e.g. en-US, en-GB, etc.\r\n *\r\n * Future: aim to remove react-intl - probably overkill\r\n *\r\n * @export\r\n * @param {string} locale\r\n * @returns Promise<any>\r\n */\r\nexport function loadLocale(): Promise<any> {\r\n\r\n function loadLocaleData(): Promise<any> {\r\n\r\n const currentLang = inferContentLanguage();\r\n\r\n debug('loading intl settings for ' + currentLang);\r\n\r\n return new Promise((resolve) => {\r\n importIntlFormats(currentLang, resolve);\r\n });\r\n }\r\n\r\n return loadLocaleData().then(l => debug('Locale loaded')).catch(e => error(`Error loading locale: ${e}`));\r\n\r\n}\r\n\r\n/**\r\n * Loads the react-intl formats for locale on demand\r\n */\r\n// tslint:disable\r\nfunction importIntlFormats(locale: string, done: Function) {\r\n require.ensure([], (require:any) => {\r\n // Note that react-intl and intl are separate libraries. Intl is only a polyfill for browsers not supporting intl.\r\n // They use different language tags for their locale data. Intl uses IETF language tags, while react-intl locale-data files\r\n // are named by the language only.\r\n const request: any = require( 'bundle-loader?lazy!react-intl/locale-data/' + locale );\r\n request((m: any) => {\r\n addLocaleData(m);\r\n done();\r\n });\r\n });\r\n}\r\n","// finds instances where words have been joind together with / \\ or -\r\nconst concatFinder = /([^ \\n\\r])([-\\/\\\\;&])([^ \\n\\r])/g;\r\nconst pipeFinder = /\\|/g;\r\nconst softhypenFinder = /\\||\\u00AD/g;\r\n\r\nexport const insertOptionalWordbreaks = (value:string) => {\r\n return value && value.replace(concatFinder, '$1$2\\u200B$3')\r\n .replace(pipeFinder, '\\u00AD');\r\n};\r\n\r\nexport const removeSoftHyphens = (value:string) => {\r\n return value && value.replace(softhypenFinder, '');\r\n};\r\n\r\nconst segmentFinder = /{(\\d+)}/g;\r\nexport const replaceTemplateString = (text:string, ...rest) => {\r\n return text && text.replace(segmentFinder, (match:string, group:string) => {\r\n return rest[group];\r\n });\r\n};\r\n","export * from './browser';\r\nexport * from './print';\r\nexport * from './locale';\r\nexport * from './json';\r\nexport * from './text';\r\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = vendor_1207535b092eed21482d;","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"mobile-nav__visuallyhidden--3Smyc\",\"focusable\":\"mobile-nav__focusable--2GDkk\",\"mobile-nav\":\"mobile-nav__mobile-nav--KNlNQ\",\"mobileNav\":\"mobile-nav__mobile-nav--KNlNQ\",\"hamburger\":\"mobile-nav__hamburger--KZqdv\",\"nav-item-icon\":\"mobile-nav__nav-item-icon--13s6g\",\"navItemIcon\":\"mobile-nav__nav-item-icon--13s6g\",\"closeBtn\":\"mobile-nav__closeBtn--2yKCn\",\"dropdown-list\":\"mobile-nav__dropdown-list--301xV\",\"dropdownList\":\"mobile-nav__dropdown-list--301xV\",\"slideOpen\":\"mobile-nav__slideOpen--2Yajh\",\"animate-out\":\"mobile-nav__animate-out--2kqsS\",\"animateOut\":\"mobile-nav__animate-out--2kqsS\",\"slideClose\":\"mobile-nav__slideClose--arPl6\",\"sub-menu\":\"mobile-nav__sub-menu--3x97o\",\"subMenu\":\"mobile-nav__sub-menu--3x97o\",\"up\":\"mobile-nav__up--2JH4l\",\"down\":\"mobile-nav__down--o2h-k\",\"dropdown-label\":\"mobile-nav__dropdown-label--3WuBI\",\"dropdownLabel\":\"mobile-nav__dropdown-label--3WuBI\",\"dropdown-button\":\"mobile-nav__dropdown-button--2CuUJ\",\"dropdownButton\":\"mobile-nav__dropdown-button--2CuUJ\",\"nav-item-text\":\"mobile-nav__nav-item-text--dfKuO\",\"navItemText\":\"mobile-nav__nav-item-text--dfKuO\",\"small\":\"mobile-nav__small--1huWF\",\"background\":\"mobile-nav__background--12F11\",\"fadeIn\":\"mobile-nav__fadeIn--2tsrW\",\"fadeOut\":\"mobile-nav__fadeOut--1hfaT\"};","import { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { OptionsRequestParams, OptionsRequestContext } from '../ui/form/types';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport {\r\n ComponentContext, ComponentDescriptor,\r\n ChildComponentContext\r\n} from 'app/infrastructure/ui/types-uischema';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\n\r\n/**\r\n * Maps the Code table value item from JSON wire format to a client store value object\r\n *\r\n * @param code The Code Table item to import\r\n */\r\nexport const codeItemToStoreValue = (code: CodetableWireFormat): ComplexValue<any> => {\r\n\r\n const rawValue: ComplexValue<number> = {\r\n value: code.v,\r\n description: code.d,\r\n longDescription: code.ld,\r\n allLevelDescription: code.ald,\r\n backgroundColor: code.b,\r\n foregroundColor: code.f,\r\n icon: code.i && toAbsoluteUrl(code.i),\r\n descendants: !!code.children ? code.children.map(codeItemToStoreValue) : undefined,\r\n minLevel: code.ml,\r\n categoryId: code.ctg,\r\n extra: code.extra,\r\n owner: !!code.owner ? codeItemToStoreValue(code.owner) : undefined,\r\n sharedThroughUserGroup: code.sharedThroughUserGroup\r\n };\r\n\r\n const value = Object.keys(rawValue).reduce((ret, key) => {\r\n if (rawValue[key] !== undefined) {\r\n ret[key] = rawValue[key];\r\n }\r\n return ret;\r\n }, {} as ComplexValue<any>);\r\n\r\n return Object.keys(value).length ? value : undefined;\r\n};\r\n\r\nexport const mapToOptionsRequestParams = (loadOptions: LoadOptions): OptionsRequestParams => {\r\n const { sort, query, parentId, siblingId, levels, categoryId, displayNotSelected, iteratorId } = (loadOptions || {} as LoadOptions);\r\n return {\r\n sortDirection: sort ? sort : undefined,\r\n query: !!query && query.trim() ? query.trim() : null,\r\n parentId,\r\n siblingId,\r\n levels,\r\n categoryId,\r\n displayNotSelected,\r\n iteratorId\r\n };\r\n};\r\n\r\nexport const mapToOptionsRequestContext = (\r\n context: ComponentContext | ChildComponentContext, descriptor: ComponentDescriptor, loadOptions: LoadOptions\r\n): OptionsRequestContext => {\r\n\r\n return {\r\n applicationId: context.applicationId,\r\n path: context.path,\r\n domainId: (loadOptions && loadOptions.domainId) || descriptor.id // default to the descriptor domain id.\r\n };\r\n};\r\n","import { globalVar, isBrowser } from './runtime';\r\nimport { fromJSON, toJSON } from '../platform/json';\r\n\r\nconst STORE_PREFIX = 'SL';\r\nconst STORE_STAMP_SUFFIX = 'Expires';\r\n\r\nconst getItemKey = (key: string) => `${STORE_PREFIX}.${key}`;\r\nconst getStampKey = (key: string) => `${getItemKey(key)}.${STORE_STAMP_SUFFIX}`;\r\n\r\ninterface CacheStorage {\r\n has(key: string): boolean;\r\n clear(): void;\r\n clearBy(regex: RegExp): void;\r\n getItem(key: string): any;\r\n removeItem(key: string): any;\r\n setItem(key: string, data: any, stamp?: string): void;\r\n hasValid(key: string): boolean;\r\n}\r\n\r\n/**\r\n * Abstraction over localStorage\r\n * \r\n * @class ClientCache\r\n */\r\nexport class ClientCache implements CacheStorage {\r\n\r\n public store: Storage = globalVar('localStorage');\r\n\r\n public has(key: string): boolean { return !!this.store.getItem(getItemKey(key)); }\r\n\r\n public setItem(key: string, data: any, stamp?: string): void {\r\n\r\n try {\r\n this.store.setItem(getItemKey(key), toJSON(data));\r\n\r\n if (!!stamp) {\r\n this.store.setItem(getStampKey(key), toJSON(stamp));\r\n }\r\n } catch (e) {\r\n throw new Error('Could not persist. localStorage might be full.\\n\\n' + e);\r\n }\r\n }\r\n\r\n public hasValid(key: string): boolean {\r\n\r\n const stamp = this.store.getItem(getStampKey(key));\r\n\r\n const expiresDate = !!stamp && new Date(fromJSON(stamp));\r\n \r\n return !!expiresDate && expiresDate.getTime() > new Date().getTime() && this.has(key);\r\n }\r\n\r\n public getItem(key: string) {\r\n return fromJSON(this.store.getItem(getItemKey(key)));\r\n }\r\n\r\n public clear() {\r\n this.store.clear();\r\n }\r\n \r\n public clearBy(regexp: RegExp) {\r\n for(let i =0; i < this.store.length; i++){\r\n const key = this.store.key(i);\r\n if(regexp.test(key)){\r\n this.store.removeItem(key);\r\n }\r\n }\r\n }\r\n\r\n public async removeItem(key: string) {\r\n const removed = this.getItem(key);\r\n this.store.removeItem(getItemKey(key));\r\n this.store.removeItem(getStampKey(key));\r\n return removed;\r\n }\r\n}\r\n\r\nclass NullStorage implements CacheStorage {\r\n public length: number = 0;\r\n public has = (key: string): boolean => false;\r\n public clear = (): void => undefined;\r\n public clearBy = (regexp: RegExp): void => undefined;\r\n public getItem = (key: string): any => undefined;\r\n public removeItem = (key: string): any => undefined;\r\n public setItem = (key: string, data: any, stamp?: string): void => undefined;\r\n public hasValid = (key: string): boolean => false;\r\n}\r\n\r\nconst clientCache = isBrowser ? new ClientCache() : new NullStorage();\r\n\r\nexport { clientCache };\r\n","export * from './cache';\r\nexport * from './runtime';\r\nexport * from './url';\r\n","import { StoreData, CompositeKeys, Entity, StoreField, StoreItemPath } from 'app/types-shared';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { getPrimaryEntityId } from 'app/infrastructure/store/entity';\r\n\r\n/**\r\n * Returns an array of CompositeKeys for all entities in provided StoreData\r\n * @param data array of store data\r\n */\r\nexport const getIds = (data: StoreData) =>\r\n data.reduce(\r\n (res, value) => ({\r\n ...res,\r\n [JSON.stringify(value.id)]: value.id\r\n }),\r\n {} as { [x: string]: CompositeKeys }\r\n );\r\n\r\n/**\r\n * Finds Entity for given CompositeKey\r\n *\r\n * @param {StoreData} data store state\r\n * @param {CompositeKeys} path path to item to be found\r\n * @returns {StoreItem} store item at the given path\r\n */\r\nexport const getById = (data: StoreData, keys: CompositeKeys): Entity => {\r\n return data\r\n ? Array.isArray(data) && data.find(item => deepEquals(item.id, keys))\r\n : undefined;\r\n};\r\n\r\n/**\r\n * Resolves the caseContextId and returns it as a typed `number`\r\n * @param storeData data store state\r\n */\r\nexport const getCaseContextId = (storeData: StoreData): number => {\r\n const entity = Array.isArray(storeData) ? storeData[0] : storeData;\r\n const caseContextField = entity && entity.caseContext;\r\n const caseContextId = \r\n caseContextField && caseContextField[0] && (caseContextField[0] as StoreField).value;\r\n return caseContextField && caseContextId ? Number(caseContextId) : undefined;\r\n};\r\n\r\n/**\r\n * Resolves the CaseNo property and returns it as a typed `number`\r\n * @param storeData The case Entity, or the Entity array for a complete case\r\n */\r\nexport const getCaseId = (storeData: StoreData): number => {\r\n const entity = Array.isArray(storeData) ? storeData[0] : storeData;\r\n const caseNoField = entity && entity.CaseNo;\r\n const no =\r\n caseNoField && caseNoField[0] && (caseNoField[0] as StoreField).value;\r\n return caseNoField && no ? Number(no) : undefined;\r\n};\r\n\r\n/**\r\n * Resolves the Primary Key (Trans) from the root table (tblTrans)\r\n * @param storeData The case Entity, or the Entity array for a complete case\r\n */\r\nexport const getDraftId = (storeData: StoreData) => {\r\n const entity = Array.isArray(storeData) ? storeData[0] : storeData;\r\n const id =\r\n entity &&\r\n Array.isArray(entity.id) &&\r\n entity.id.length &&\r\n Number(entity.id[0].tblTrans);\r\n return entity && id ? id : undefined;\r\n};\r\n/**\r\n * Return the parent id of the child identified by a path\r\n * @param childPath\r\n */\r\nexport const getParentId = (childPath: CompositeKeys) => {\r\n return childPath && childPath.length > 1\r\n ? childPath.slice(0, childPath.length - 1)\r\n : undefined;\r\n};\r\n/**\r\n * Get first level of child entities in store that has a given parent\r\n * @param data\r\n * @param parentStorePath\r\n */\r\nexport const getAllChildEntities = (\r\n data: StoreData,\r\n parentStorePath: CompositeKeys\r\n): Entity[] => {\r\n return data.filter(\r\n e =>\r\n e.id.length > 1 &&\r\n !deepEquals(parentStorePath, e.id) && //Exclude parent.\r\n deepEquals(parentStorePath, e.id.slice(0, e.id.length - 1)) //Compare with part of path shared with parent.\r\n );\r\n};\r\n\r\n/**\r\n * Select all child entities at given store path\r\n *\r\n * @param {StoreData} data store state\r\n * @param {CompositeKeys} parentKeys path to the parent\r\n * @param {string} childEntityType the type of the entity to be found\r\n * @returns {StoreItem} store item at the given path\r\n */\r\nexport const getChildEntities = (\r\n data: StoreData,\r\n parentStorePath: CompositeKeys,\r\n childEntityType: string\r\n) => {\r\n return data && parentStorePath\r\n ? data.filter(item => {\r\n if (\r\n !item ||\r\n !item.id ||\r\n item.id.length !== parentStorePath.length + 1\r\n ) {\r\n return false;\r\n }\r\n const key = item.id.slice(0, parentStorePath.length);\r\n const lastItemKey = Object.keys(item.id[item.id.length - 1]);\r\n const childType = lastItemKey.length === 1 && lastItemKey[0];\r\n return (\r\n childType === childEntityType && deepEquals(key, parentStorePath)\r\n );\r\n })\r\n : [];\r\n};\r\n\r\n/**\r\n * Select all child entities at a given path, regardless of ids at each level.\r\n *\r\n * @param {StoreData} data store state\r\n * @returns {string[]} entity type path\r\n */\r\nexport const getAllEntitiesAtPath = (\r\n data: StoreData,\r\n entityTypePath: (string | StoreItemPath)[]\r\n) => {\r\n return data && entityTypePath\r\n ? data.filter(item => {\r\n if (\r\n !item ||\r\n !item.id ||\r\n item.id.length !== entityTypePath.length\r\n ) {\r\n return false;\r\n }\r\n return item.id.every(\r\n (i, index) =>\r\n (typeof entityTypePath[index] === 'string') ?\r\n Object.keys(i)[0] === entityTypePath[index] :\r\n deepEquals(i, entityTypePath[index])\r\n );\r\n })\r\n : [];\r\n};\r\n\r\n/**\r\n * Gets the max value from the child reference array\r\n *\r\n * @param parent The parent entity.\r\n * @param childEntityType the name of the entity type to find ID for\r\n */\r\nexport const maxChildEntityId = (\r\n data: StoreData,\r\n parentStorePath: CompositeKeys,\r\n childEntityType: string\r\n) => {\r\n const children = getChildEntities(data, parentStorePath, childEntityType).map(\r\n getPrimaryEntityId\r\n );\r\n\r\n if (!children || !children.length) {\r\n return 0;\r\n }\r\n\r\n return Math.max(...children);\r\n};\r\n","import { globalVar, applicationSettingsKey, ENVIRONMENT_VAR } from 'app/infrastructure/universal';\r\n\r\nexport const AppSetting: typeof ENVIRONMENT_VAR = {} as any;\r\n\r\nconst settings = globalVar ? globalVar(applicationSettingsKey, {}) : {};\r\n\r\nObject.keys(ENVIRONMENT_VAR).forEach(key=>AppSetting[key] = settings[ENVIRONMENT_VAR[key]]);\r\n","export { AppSetting } from 'app/infrastructure/hosting/app-settings';\r\n","export const ACTION = {\r\n RequestTextCollection: 'SHELL:REQUEST_TEXTCOLLECTION',\r\n ReceiveTextCollection: 'SHELL:RECEIVE_TEXTCOLLECTION'\r\n};\r\n\r\nexport class RequestTextCollection {\r\n public type: string = ACTION.RequestTextCollection;\r\n public path: string;\r\n public language: number;\r\n\r\n constructor(path: string, language: number) {\r\n\r\n this.path = path;\r\n this.language = language;\r\n }\r\n}\r\n\r\nexport class ReceiveTextCollection {\r\n public type: string = ACTION.ReceiveTextCollection;\r\n public texts: any;\r\n public path: string;\r\n public language: number;\r\n\r\n constructor(path: string, language: number, texts: any) {\r\n\r\n this.path = path;\r\n this.language = language;\r\n this.texts = texts;\r\n }\r\n}\r\n","import { ACTION } from './action-types';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { Reducer } from 'redux';\r\n\r\n/**\r\n * Special reducers that can handle changes on any part of our state object, as opposed to\r\n * default redux with combineReducers that operate on their individual slice of the store\r\n */\r\nexport const textCollectionReducer: Reducer<ApplicationState> = (state: ApplicationState, action: any) => {\r\n\r\n if (ACTION.ReceiveTextCollection === action.type) {\r\n\r\n return !!state[action.path] && state[action.path].textsLanguage === action.language ? {\r\n ...state,\r\n [action.path]: {\r\n ...state[action.path],\r\n texts: action.texts,\r\n textsFetching: false\r\n }\r\n } : state;\r\n\r\n }\r\n\r\n if (ACTION.RequestTextCollection === action.type) {\r\n\r\n return {\r\n ...state,\r\n [action.path]: {\r\n ...state[action.path],\r\n textsLanguage: action.language,\r\n textsFetching: true\r\n }\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n","import { TextCollection, ApiResponse, HttpResponse } from 'app/types-shared';\r\nimport { RemoteData } from 'app/infrastructure/remote-data';\r\n\r\nexport const api = {\r\n\r\n /**\r\n * Fetch tranlated texts for a given application area and language\r\n */\r\n textCollection: async (language: number, area: number): Promise<HttpResponse<ApiResponse<TextCollection>>> => {\r\n\r\n return await new RemoteData('text/collection')\r\n .resource<HttpResponse<ApiResponse<TextCollection>>>()\r\n .withId(area)\r\n .filter({ language })\r\n .response();\r\n }\r\n\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { TranslatedState } from 'app/types-shared';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { ReceiveTextCollection, RequestTextCollection } from './action-types';\r\nimport { api } from './api';\r\nimport { textCollection } from 'app/constants';\r\nimport { translations } from './translations';\r\nimport get from 'lodash/get';\r\n\r\nexport type TextCollectionActions = ReceiveTextCollection | RequestTextCollection;\r\n\r\nexport const textCollectionActionCreators = {\r\n\r\n /**\r\n * Load the miminum set of data needed for the current view location.\r\n */\r\n loadTextCollection: (paths: string[], language: number):\r\n ActionDispatching<TextCollectionActions, any> => async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n const area: string = paths[0];\r\n const areaId: number = textCollection[area];\r\n const state: TranslatedState = getState()[area];\r\n\r\n const alreadyRequested = state.textsLanguage === language && \r\n (!!state.texts && Object.keys(state.texts).length > 0) ||\r\n state.textsFetching;\r\n\r\n if (!language || alreadyRequested || !areaId) {\r\n return;\r\n }\r\n const languageId = [area, language];\r\n\r\n dispatch(new RequestTextCollection(area, language));\r\n\r\n if (translations.areValid(languageId)) {\r\n dispatch(new ReceiveTextCollection(area, language, translations.get(languageId))); \r\n return;\r\n }\r\n\r\n const response = await api.textCollection(language, Number(areaId));\r\n const texts = get(response, 'json.data');\r\n const expires = response.expires;\r\n\r\n if (!!texts && !!response.expires) {\r\n translations.add(languageId, texts, expires);\r\n }\r\n\r\n dispatch(new ReceiveTextCollection(area, language, texts));\r\n }\r\n};\r\n","export * from './translate';\r\nexport * from './with-translation';\r\nexport * from './reducers';\r\nexport * from './actions';\r\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","import { UserInfo, MessagesToUserInfo, SurveyManagerAccessInfoData, SupportEmailAddressData, AdminInfoData, ToolsInfoData } from 'app/types-shared';\r\nimport { Consent } from 'app/area/user-profile/my-notifications/types';\r\n\r\nexport const ACTION = {\r\n RequestUserInfo: 'SHELL:REQUEST_USER_INFO',\r\n ReceiveUserInfo: 'SHELL:RECEIVE_USER_INFO',\r\n ReceiveShellConfig: 'SHELL:RECEIVE_SHELL_CONFIG',\r\n FailUserInfo: 'SHELL:FAIL_USER_INFO',\r\n ReceiveToken: 'SHELL:RECEIVE_TOKEN',\r\n ReceiveLogout: 'SHELL:RECEIVE_LOGOUT',\r\n AuthenticationFailed: 'SHELL:AUTHENTICATION_FAILED',\r\n DisplayModal: 'SHELL:DISPLAY_MODAL',\r\n ChangeUserLocale: 'SHELL:CHANGE_USER_LOCALE',\r\n RefreshCache: 'SHELL:REFRESH_CACHE',\r\n ReceiveRefreshCache: 'SHELL:RECEIVE_REFRESH_CACHE',\r\n FailRefreshCache: 'SHELL:FAIL_REFRESH_CACHE',\r\n RegenerateAggregatedEnv: 'SHEll:REGENERATE_AGGREGATED_ENV',\r\n RegenerateAggregatedRisk: 'SHEll:REGENERATE_AGGREGATED_RISK',\r\n RequestMessagesToUserInfo: 'SHELL:REQUEST_MESSAGES_TO_USER',\r\n ReceiveMessagesToUserInfo: 'SHELL:RECEIVE_MESSAGES_TO_USER',\r\n UpdateMessageStatus: 'SHELL:MESSAGES_TO_USER_UPDATE_MESSAGE_STATUS',\r\n FixedHeaderStatus: 'SHELL:FIXED_HEADER_STATUS',\r\n REQUEST_LOAD_CONSENTS: 'NOTIFICATION_PANEL:REQUEST_LOAD_CONSENTS',\r\n RECEIVE_LOAD_CONSENTS: 'NOTIFICATION_PANEL:RECEIVE_LOAD_CONSENTS',\r\n FAIL_LOAD_CONSENTS: 'NOTIFICATION_PANEL:FAIL_LOAD_CONSENTS'\r\n};\r\n\r\nexport class UserLocaleChange {\r\n public type: string = ACTION.ChangeUserLocale;\r\n public locale: string;\r\n constructor(locale: string) {\r\n this.locale = locale;\r\n }\r\n}\r\n\r\nexport class ReceiveShellConfig {\r\n public type: string = ACTION.ReceiveShellConfig;\r\n\r\n constructor(\r\n public version?: string,\r\n public supportEmailAddress?: SupportEmailAddressData,\r\n public adminPanelAccess?: AdminInfoData | boolean,\r\n public toolsInfo?: ToolsInfoData,\r\n public surveyManagerAccess?: SurveyManagerAccessInfoData,\r\n public helpUrl?: string,\r\n public manageSurveysUrl?: string,\r\n public feedbackUrl?: string) {}\r\n}\r\n\r\nexport class ReceiveUserInfo {\r\n public type: string = ACTION.ReceiveUserInfo;\r\n \r\n constructor(public userInfo: UserInfo) {}\r\n}\r\n\r\nexport class RequestUserInfo {\r\n public type: string = ACTION.RequestUserInfo;\r\n}\r\n\r\nexport class FailUserInfo {\r\n public type: string = ACTION.FailUserInfo;\r\n}\r\n\r\nexport class ReceiveToken {\r\n public type: string = ACTION.ReceiveToken;\r\n}\r\n\r\nexport class ReceiveLogout {\r\n public type: string = ACTION.ReceiveLogout;\r\n}\r\n\r\nexport class AuthenticationFailed {\r\n public type: string = ACTION.AuthenticationFailed;\r\n}\r\n\r\nexport class DisplayModal {\r\n public type: string = ACTION.DisplayModal;\r\n public name: string;\r\n\r\n constructor(name: string) {\r\n this.name = name;\r\n }\r\n}\r\n\r\nexport class RefreshCache {\r\n public type: string = ACTION.RefreshCache;\r\n public fetching: boolean = true;\r\n}\r\n\r\nexport class ReceiveRefreshCache {\r\n public type: string = ACTION.ReceiveRefreshCache;\r\n}\r\n\r\nexport class FailRefreshCache {\r\n public type: string = ACTION.FailRefreshCache;\r\n}\r\n\r\nexport class RegenerateAggregatedEnv {\r\n public type: string = ACTION.RegenerateAggregatedEnv;\r\n constructor(public fetching: boolean) { }\r\n}\r\n\r\nexport class RegenerateAggregatedRisk {\r\n public type: string = ACTION.RegenerateAggregatedRisk;\r\n constructor(public fetching: boolean) { }\r\n}\r\n\r\nexport class RequestMessagesToUserInfo {\r\n public type: string = ACTION.RequestMessagesToUserInfo;\r\n}\r\n\r\nexport class ReceiveMessagesToUserInfo {\r\n public type: string = ACTION.ReceiveMessagesToUserInfo;\r\n public messagesToUserInfo: MessagesToUserInfo[];\r\n\r\n constructor(messagesToUserInfo: MessagesToUserInfo[]) {\r\n this.messagesToUserInfo = messagesToUserInfo;\r\n }\r\n}\r\nexport class UpdateMessageStatus {\r\n public type: string = ACTION.UpdateMessageStatus;\r\n constructor(public updating: boolean, public id?:number) {}\r\n}\r\n\r\nexport class FixedHeaderStatus {\r\n public type: string = ACTION.FixedHeaderStatus;\r\n constructor(public fixed: boolean) {}\r\n}\r\n\r\nexport class RequestLoadConsents {\r\n public type: string = ACTION.REQUEST_LOAD_CONSENTS;\r\n}\r\n\r\nexport class ReceiveLoadConsents {\r\n public type: string = ACTION.RECEIVE_LOAD_CONSENTS;\r\n constructor(public consents: Consent[]) { }\r\n}\r\n\r\nexport class FailLoadConsents {\r\n public type: string = ACTION.FAIL_LOAD_CONSENTS;\r\n}\r\n","import { debug } from 'app/infrastructure/log';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { concatUrl } from 'app/infrastructure/universal/url';\r\nimport { globalVar } from 'app/infrastructure/universal';\r\n\r\n/**\r\n * Adds the hosting path in front of the provided URL.\r\n * Use only with trusted URLs since it will not handle escaping and encoding.\r\n */\r\nexport const toAbsoluteUrl = (url: string, includeHostName: boolean = false) => {\r\n if (!url) {\r\n return url;\r\n }\r\n const separator = url.startsWith('/') ? '' : '/';\r\n const prefix = includeHostName ? getApplicationUrl() : getHostingPath();\r\n return `${prefix}${separator}${url}`;\r\n};\r\n\r\n/**\r\n * Returns the application base path setting from app.config\r\n */\r\nexport function getHostingPath() {\r\n return globalVar('baseUrl') || AppSetting.HostingPath;\r\n}\r\n\r\n/**\r\n * Returns the full application url including hosting path\r\n */\r\nexport function getApplicationUrl() {\r\n return AppSetting.ApplicationUrl;\r\n}\r\n\r\nexport function getAdminApiUrl() {\r\n\r\n return AppSetting.AdminApiBaseUrl;\r\n\r\n}\r\n\r\nexport function getNotificationsApiUrl() {\r\n\r\n return AppSetting.NotificationsApiBaseUrl;\r\n\r\n}\r\n\r\nexport function isVeracityEnabled() {\r\n return !!(AppSetting.FeatureToggle || {} as any).veracityEnabled;\r\n}\r\n\r\n/**\r\n * Webpack workaround to support hosting in a virtual dir\r\n * Sets the webpack require base path.\r\n * Used when lazy loading files after app start.\r\n */\r\nexport function configureSystemImport() {\r\n\r\n const hostingPath = AppSetting.HostingPath;\r\n\r\n if (!hostingPath) {\r\n return;\r\n }\r\n\r\n __webpack_public_path__ = `${concatUrl(hostingPath, __webpack_public_path__)}/`;\r\n debug('System import base is', __webpack_public_path__);\r\n\r\n}\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar IconBase = function IconBase(_ref, _ref2) {\n var children = _ref.children;\n var color = _ref.color;\n var size = _ref.size;\n var style = _ref.style;\n var width = _ref.width;\n var height = _ref.height;\n\n var props = _objectWithoutProperties(_ref, ['children', 'color', 'size', 'style', 'width', 'height']);\n\n var _ref2$reactIconBase = _ref2.reactIconBase;\n var reactIconBase = _ref2$reactIconBase === undefined ? {} : _ref2$reactIconBase;\n\n var computedSize = size || reactIconBase.size || '1em';\n return _react2.default.createElement('svg', _extends({\n children: children,\n fill: 'currentColor',\n preserveAspectRatio: 'xMidYMid meet',\n height: height || computedSize,\n width: width || computedSize\n }, reactIconBase, props, {\n style: _extends({\n verticalAlign: 'middle',\n color: color || reactIconBase.color\n }, reactIconBase.style || {}, style)\n }));\n};\n\nIconBase.propTypes = {\n color: _propTypes2.default.string,\n size: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n height: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n style: _propTypes2.default.object\n};\n\nIconBase.contextTypes = {\n reactIconBase: _propTypes2.default.shape(IconBase.propTypes)\n};\n\nexports.default = IconBase;\nmodule.exports = exports['default'];","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.github.io/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.github.io/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","import { StoreItemPath, Entity, StoreField } from 'app/types-shared';\r\n\r\nexport const entityValue = (entity: Entity, dataTag: string) => {\r\n return (\r\n entity &&\r\n entity[dataTag] &&\r\n (entity[dataTag] as StoreField[]).length &&\r\n (entity[dataTag] as StoreField[])[0].value\r\n );\r\n};\r\n\r\n/**\r\n * The last item represents the type (subTable)\r\n * @param entityTypePath The path to the entity in data.\r\n */\r\nexport const getEntityTypeFromPath = (entityTypePath: string[]) => {\r\n return entityTypePath && entityTypePath[entityTypePath.length - 1];\r\n};\r\n\r\n/**\r\n * The indexer of the last item represents the type (subTable)\r\n * @param storePath The path to the entity in the store data.\r\n */\r\nexport const getEntityTypeFromStorePath = (storePath: StoreItemPath[]) => {\r\n return (\r\n storePath &&\r\n storePath[storePath.length - 1] &&\r\n Object.keys(storePath[storePath.length - 1])[0]\r\n );\r\n};\r\n\r\n/**\r\n * Converts a full entity path containing id's to only return the entity type names, preserving the\r\n * same order\r\n */\r\nexport const getEntityTypePathFromStorePath = (storePath: StoreItemPath[]) => {\r\n return (\r\n storePath && storePath.map(p => p && Object.keys(p)[0]).filter(Boolean)\r\n );\r\n};\r\n\r\n/**\r\n * Returns the numeric primary key for the entity. If this is a child entity, the entities primary key is returned.\r\n * @param entity Entity to retrieve the numeric id for\r\n */\r\nexport const getPrimaryEntityId = (entity: Entity): number => {\r\n if (!entity || !entity.id || !entity.id.length) {\r\n return undefined;\r\n }\r\n const last = entity.id[entity.id.length - 1];\r\n return last[Object.keys(last)[0]];\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonPrimary, CloseButton, ButtonTertiary } from 'ui/common/button';\r\nimport { FixedDocument } from 'app/components/fixed-document';\r\nimport styles from './modal-wrapper.scss';\r\nimport { ButtonSecondary } from 'ui/common/button/button-secondary';\r\n\r\nlet highestModalZindex: number = 300;\r\n\r\nexport interface ModalWrapperProps {\r\n headerTitle?: string;\r\n btnTitle?: string;\r\n btnActionTitle?: string;\r\n btnCancelTitle?: string;\r\n onClose: () => void;\r\n onDone?: () => void;\r\n onAction?: () => void;\r\n isDisabled?: boolean | (() => boolean);\r\n isCancelDisabled?: boolean | (() => boolean);\r\n largeSize?: boolean;\r\n closeOnDone?: boolean;\r\n canCloseOnBackground?: boolean;\r\n}\r\n\r\ninterface ModalWrapperState {\r\n preventBackgroundClick: boolean;\r\n}\r\n\r\nconst FocusWaitTypes = ['TEXTAREA', 'INPUT'];\r\n\r\nexport class ModalWrapper extends React.Component<ModalWrapperProps, ModalWrapperState> {\r\n private zindex: number = highestModalZindex;\r\n private titleRef: React.RefObject<HTMLDivElement> = React.createRef();\r\n public static defaultProps: Partial<ModalWrapperProps> = {\r\n closeOnDone: true,\r\n largeSize: true,\r\n canCloseOnBackground: true\r\n };\r\n\r\n private handleDone = () => {\r\n this.props.closeOnDone && this.props.onClose();\r\n this.props.onDone();\r\n }\r\n\r\n private clickedScrollbar = (e: React.MouseEvent<HTMLDivElement>) => {\r\n const elementWithScrollbar = e.currentTarget;\r\n\r\n return !!elementWithScrollbar && (elementWithScrollbar.clientWidth <= e.clientX || elementWithScrollbar.clientHeight <= e.clientY);\r\n }\r\n\r\n private onClickBackground = (e: React.MouseEvent<HTMLDivElement>) => {\r\n if(e.target !== e.currentTarget || FocusWaitTypes.indexOf(document.activeElement.nodeName) !== -1) {\r\n return;\r\n }\r\n\r\n if(this.state && this.state.preventBackgroundClick) {\r\n this.setState({preventBackgroundClick: false});\r\n return;\r\n }\r\n\r\n if (!this.clickedScrollbar(e) && this.props.canCloseOnBackground) {\r\n this.props.onClose();\r\n }\r\n }\r\n\r\n public componentDidMount () {\r\n highestModalZindex++;\r\n this.zindex = highestModalZindex;\r\n\r\n if (this.titleRef && this.titleRef.current) {\r\n this.titleRef.current.focus();\r\n }\r\n }\r\n\r\n private onBackgroundFocus = (e:React.FocusEvent<HTMLDivElement>) => {\r\n const relative = e.relatedTarget as HTMLElement;\r\n if (relative && e.target === e.currentTarget && FocusWaitTypes.indexOf(relative.nodeName) !== -1) {\r\n this.setState({preventBackgroundClick: true});\r\n }\r\n }\r\n\r\n private isDisabled ():boolean {\r\n if (typeof this.props.isDisabled === 'function') {\r\n return this.props.isDisabled();\r\n }\r\n return !!this.props.isDisabled;\r\n }\r\n\r\n private isCancelDisabled ():boolean {\r\n if (typeof this.props.isCancelDisabled === 'function') {\r\n return this.props.isCancelDisabled();\r\n }\r\n return !!this.props.isCancelDisabled;\r\n }\r\n\r\n public render() {\r\n const showDoneButton = !!this.props.onDone;\r\n const showActionButton = !!this.props.onAction;\r\n const showCancelButton = !!this.props.btnCancelTitle;\r\n\r\n const styleOverride = { zIndex: this.zindex };\r\n\r\n return (\r\n <FixedDocument>\r\n <div className={`modal-background ${styles.modalBackground}`} style={styleOverride}>\r\n <div className={`modal ${styles.modalWrapper}`}\r\n onClick={this.onClickBackground}\r\n onFocus={this.onBackgroundFocus}\r\n tabIndex={-1}>\r\n <div className={`modal-dialog ${this.props.largeSize ? 'modal-lg' : ''} ${styles.modalDialog}`}\r\n data-tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\r\n <div className=\"modal-content\" role=\"document\">\r\n <div className=\"modal-header\" tabIndex={-1} ref={this.titleRef}>\r\n <h5 className=\"modal-title\">\r\n {this.props.headerTitle}\r\n </h5>\r\n <CloseButton onClick={this.props.onClose} tabIndex={-1}/>\r\n </div>\r\n <div className=\"modal-body\">\r\n {this.props.children}\r\n </div>\r\n {\r\n (showDoneButton || showCancelButton || showActionButton) && <div className=\"modal-footer\">\r\n {showCancelButton && <ButtonTertiary\r\n disabled={this.isCancelDisabled()}\r\n onClick={this.props.onClose}>\r\n {this.props.btnCancelTitle}\r\n </ButtonTertiary>}\r\n {showActionButton && <ButtonSecondary\r\n disabled={this.isDisabled()}\r\n onClick={this.props.onAction}>\r\n {this.props.btnActionTitle}\r\n </ButtonSecondary>}\r\n {showDoneButton && <ButtonPrimary\r\n disabled={this.isDisabled()}\r\n onClick={this.handleDone}>\r\n {this.props.btnTitle}\r\n </ButtonPrimary>}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </FixedDocument>\r\n );\r\n }\r\n}\r\n","export const keyCodeTypes = {\r\n Enter: 'enter',\r\n ArrowUp: 'up',\r\n ArrowDown: 'down',\r\n ArrowLeft: 'left',\r\n ArrowRight: 'right',\r\n Esc: 'esc',\r\n Backspace: 'backspace',\r\n Space: 'space'\r\n};\r\nexport const keyCode = {\r\n Enter: 13,\r\n Space: 32,\r\n ArrowDown: 40,\r\n ArrowLeft: 37,\r\n ArrowRight: 39,\r\n ArrowUp: 38,\r\n Esc: 27\r\n};\r\n","import { isNumeric } from './number';\r\n\r\n/**\r\n * Handle numeric string input safely.\r\n */\r\nexport const safeNumericString = (input: string) => isNumeric(input) ? Number(input) : '';\r\n/**\r\n * Handle any string parameter safely\r\n */\r\nexport const safeParam = (input: string) => input && input.replace(/([^a-z0-9]+)/gi, '');\r\n","/**\r\n * Describes how the single validation item is displayed.\r\n */\r\nexport interface ValidationMessage {\r\n /**\r\n * Define the validation status of the message.\r\n */\r\n level: ValidationLevel;\r\n label?: string;\r\n message: string;\r\n parameters?: any;\r\n}\r\n\r\n/**\r\n * Describes how the Validation component is displayed.\r\n */\r\nexport interface ValidationProps {\r\n /**\r\n * Define the primary validation status of component.\r\n */\r\n level: ValidationLevel;\r\n /**\r\n * Define list of validation message [[ValidationMessage]]. It consist of level and text message.\r\n */\r\n messages: ValidationMessage[];\r\n /**\r\n * Optional. Directly connecting the error to a domain by it's id.\r\n */\r\n domainId?: number;\r\n}\r\n\r\n/**\r\n * Describes different validation levels.\r\n */\r\nexport enum ValidationLevel {\r\n 'success' = 1,\r\n 'warning',\r\n 'error'\r\n}\r\n\r\nexport const createValidationErrors = (errors: string[]): ValidationProps => {\r\n return {\r\n level: ValidationLevel.error,\r\n messages: errors.map(error => ({ level: ValidationLevel.error, message: error }))\r\n };\r\n};\r\n","module.exports = false;\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","import { ComplexValue } from '../types';\r\n\r\nexport interface Translations {\r\n textSelectFromList?: string;\r\n textOptionsTitle?: string;\r\n textOptionsNotFound?: string;\r\n textOptionsDone?: string;\r\n textOptionsLoadError?: string;\r\n textSearchRequired?: string;\r\n}\r\n\r\nexport interface SelectCommonProps extends Translations {\r\n /**\r\n * @private Define whether options list is open.\r\n * Allows overriding the component state from the outside.\r\n */\r\n isOpen?: boolean;\r\n /**\r\n * It overrides optionsDisplaySetting props and makes that options list is always flat list.\r\n */\r\n hideAlphabeticIndex?: boolean;\r\n /**\r\n * TODO: determine if this should be controlled by onLoadOptions parameter instead\r\n * \r\n * [[OptionsDisplaySetting]] Define how options list is displayed.\r\n *\r\n * Depend on optionsParam.type, we have possibility:\r\n * - simple: displays a simple list.\r\n * - index: displays a list with index tiles.\r\n * - auto: displays a list simple or index which are depend on indexMin and indexMax params.\r\n */\r\n optionsDisplaySetting?: OptionsDisplaySetting;\r\n /**\r\n * Set options list on always open.\r\n *\r\n * Example\r\n * - You can use for mobile view where component will be on a whole view.\r\n */\r\n alwaysOpen?: boolean;\r\n /**\r\n * @private Set min length of input text to call search. Default is '2'.\r\n * \r\n */\r\n minLength?: number;\r\n disabled?: boolean;\r\n showIcons?: boolean;\r\n /**\r\n * It allow user to change internal state to show long description inside options.\r\n * If all of options doesn't have long description then long description won't show. \r\n * Default is true.\r\n */\r\n longDescription?: boolean;\r\n /**\r\n * It determines whether long description switch is enabled.\r\n * Default is true.\r\n */\r\n initiallyShowLongDescription?: boolean;\r\n \r\n searchRequired?: boolean; \r\n categoryId?: number;\r\n}\r\n\r\nexport interface GroupData {\r\n name: string;\r\n items: SelectItem[];\r\n bookmarkId: string;\r\n}\r\n\r\nexport type ValueItem = ComplexValue<number | string>;\r\n\r\nexport interface SelectItem extends ValueItem {\r\n isSelected?: boolean;\r\n title?: string;\r\n}\r\n\r\nexport enum SelectType {\r\n single = 0,\r\n multiple = 1,\r\n singleHierarchy = 2,\r\n multipleHierarchy = 3\r\n}\r\n\r\nexport enum OptionsType {\r\n flat = 0,\r\n index = 1,\r\n auto = 2,\r\n hierarchy = 3\r\n}\r\n\r\nexport interface OptionsDisplaySetting {\r\n type?: OptionsType;\r\n indexMin?: number;\r\n indexMax?: number;\r\n}\r\n","export const searchTranslation = {\r\n open_case: 7437,\r\n edit_case: 7485,\r\n assigned_to: 7438,\r\n search_title: 5537,\r\n filters_title: 7556,\r\n filters_included: 7643,\r\n filters_excluded: 7642,\r\n input_placeholder: 7475,\r\n search_no_hits: 7548,\r\n search_hits: 7474,\r\n loading: 7486,\r\n view_as: 7546,\r\n case_delete_title: 5790,\r\n case_delete_description: 7489,\r\n case_delete_continue: 5790,\r\n case_delete_cancel: 3273,\r\n case_duplicate_title: 7492,\r\n cases_results: 7499,\r\n case_report_title: 7500,\r\n sort_order_title: 7545,\r\n sort_order_button_add_sort_param: 7543,\r\n sort_order_button_done: 7338,\r\n sort_order_sort_by: 7534,\r\n sort_order_menu_option_remove: 5913,\r\n sort_order_menu_option_move_up: 7743,\r\n sort_order_menu_option_move_down: 7538,\r\n sort_order_asc: 7537,\r\n sort_order_desc: 7536,\r\n sort_order_select_text_select_from_list: 7535,\r\n sort_order_no_sort_options: 7552,\r\n create_report_title: 7775,\r\n update_report_title: 8322,\r\n show_details: 7640,\r\n hide_details: 7641,\r\n export_title: 7869,\r\n no_options_found: 7644,\r\n done: 7338,\r\n excel_edit_cases: 6798,\r\n excel_edit_cases_with_actions: 6806,\r\n excel_modal_title: 7955,\r\n excel_modal_description: 7954,\r\n excel_modal_ok_button: 7953,\r\n excel_modal_cancel_button: 7956,\r\n download_frequency_report_title: 7996,\r\n download_selection_report_title: 7997,\r\n download_report_wait: 8012,\r\n download_report_success: 7873,\r\n open_in_survey_manager: 7122,\r\n print_displayed: 8362\r\n};\r\n\r\nexport const endpoint = {\r\n reportCategory: 'report/options',\r\n favouriteReportSortOptions: 'case/report/sortOptions',\r\n favouriteDefinition: 'favourite/definition/draft',\r\n searchFavouriteDefinition: 'favourite/definition/draft/template/search',\r\n connectedCasesFavouriteDefinition: 'favourite/definition/draft/template/connectedCases',\r\n duplicateRegistrationsFavouriteDefinition: 'favourite/definition/draft/template/connectedCases',\r\n specialReport: 'report/specialReport',\r\n downloadReportToExcel: 'statisticalReport/excel',\r\n getExternalUrl: (externalUrlId: number) => `externalUrl/${externalUrlId}`,\r\n loadUsersMetadata: 'favourite/definition/draft/options/users/metadata'\r\n};\r\n\r\nexport const debounceTime = 80;\r\n\r\nexport enum reportTypes {\r\n selectionReport = 6,\r\n frequencyReport = 10,\r\n mergedReport = 13\r\n}\r\n\r\nexport enum openReportState {\r\n new = 'new',\r\n edit = 'edit'\r\n}\r\n\r\nexport const searchInAllFieldsDomain = 3613;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"import-view__visuallyhidden--1twjR\",\"focusable\":\"import-view__focusable--zPV3X\",\"import-container\":\"import-view__import-container--2VNZJ\",\"importContainer\":\"import-view__import-container--2VNZJ\",\"tile-section\":\"import-view__tile-section--3QTDp\",\"tileSection\":\"import-view__tile-section--3QTDp\",\"import-item\":\"import-view__import-item--3yAfG\",\"importItem\":\"import-view__import-item--3yAfG\",\"import-item-status\":\"import-view__import-item-status--1OxuE\",\"importItemStatus\":\"import-view__import-item-status--1OxuE\",\"completed\":\"import-view__completed--21sRH\",\"failed\":\"import-view__failed--6lk1n\",\"pending\":\"import-view__pending--32iO_\",\"retry-button\":\"import-view__retry-button--2PxsX\",\"retryButton\":\"import-view__retry-button--2PxsX\",\"import-details-tile\":\"import-view__import-details-tile--2iiRh\",\"importDetailsTile\":\"import-view__import-details-tile--2iiRh\",\"import-detail-view\":\"import-view__import-detail-view--274jh\",\"importDetailView\":\"import-view__import-detail-view--274jh\",\"error-message\":\"import-view__error-message--1BwKW\",\"errorMessage\":\"import-view__error-message--1BwKW\",\"details-tile-footer\":\"import-view__details-tile-footer--1C5l5\",\"detailsTileFooter\":\"import-view__details-tile-footer--1C5l5\",\"import-details-number-of-error\":\"import-view__import-details-number-of-error--2uM4-\",\"importDetailsNumberOfError\":\"import-view__import-details-number-of-error--2uM4-\",\"import-details-error\":\"import-view__import-details-error--34npo\",\"importDetailsError\":\"import-view__import-details-error--34npo\",\"nav-item-icon\":\"import-view__nav-item-icon--3d0M6\",\"navItemIcon\":\"import-view__nav-item-icon--3d0M6\",\"import-add-to-import\":\"import-view__import-add-to-import--2jweZ\",\"importAddToImport\":\"import-view__import-add-to-import--2jweZ\",\"import-filename\":\"import-view__import-filename--yQT1g\",\"importFilename\":\"import-view__import-filename--yQT1g\",\"import-file-wrapper\":\"import-view__import-file-wrapper--3ZUbU\",\"importFileWrapper\":\"import-view__import-file-wrapper--3ZUbU\",\"import-to-zip-modal-footer\":\"import-view__import-to-zip-modal-footer--2iLoj\",\"importToZipModalFooter\":\"import-view__import-to-zip-modal-footer--2iLoj\",\"tile-wrapper\":\"import-view__tile-wrapper--2el4V\",\"tileWrapper\":\"import-view__tile-wrapper--2el4V\",\"tile\":\"import-view__tile--1-mXj\",\"active-tile\":\"import-view__active-tile--2Be0N\",\"activeTile\":\"import-view__active-tile--2Be0N\",\"details-button\":\"import-view__details-button--3y0XL\",\"detailsButton\":\"import-view__details-button--3y0XL\",\"tile-content\":\"import-view__tile-content--2FzJt\",\"tileContent\":\"import-view__tile-content--2FzJt\",\"tile-values-wrapper\":\"import-view__tile-values-wrapper--3sM89\",\"tileValuesWrapper\":\"import-view__tile-values-wrapper--3sM89\",\"tile-header\":\"import-view__tile-header--2OTTP\",\"tileHeader\":\"import-view__tile-header--2OTTP\",\"tile-data-zone\":\"import-view__tile-data-zone--1B_sj\",\"tileDataZone\":\"import-view__tile-data-zone--1B_sj\",\"tile-data\":\"import-view__tile-data--1Q3pr\",\"tileData\":\"import-view__tile-data--1Q3pr\",\"error-style\":\"import-view__error-style--YxtSl\",\"errorStyle\":\"import-view__error-style--YxtSl\"};","module.exports = (__webpack_require__(49))(547);","module.exports = (__webpack_require__(49))(535);","import { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\nimport { StoreData, StoreMetadata, CompositeKeys, StoreField, ComplexValue, StoreItemPath } from 'app/types-shared';\r\nimport { CaseConnectionParam, CopyDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\n\r\nexport const ACTION = {\r\n REQUEST_DRAFT_DOC: 'DRAFT:REQUEST_DRAFT_DOC',\r\n RECEIVE_DRAFT_DOC: 'DRAFT:RECEIVE_DRAFT_DOC',\r\n FAIL_DRAFT_DOC: 'DRAFT:FAIL_DRAFT_DOC',\r\n ENTER_DRAFT_EDIT: 'DRAFT:ENTER_DRAFT_EDIT',\r\n LEAVE_DRAFT_EDIT: 'DRAFT:LEAVE_DRAFT_EDIT',\r\n ADD_DOCUMENT_ITEM: 'DRAFT:ADD_DOCUMENT_ITEM',\r\n COPY_DOCUMENT_ITEM: 'DRAFT:COPY_DOCUMENT_ITEM',\r\n DELETE_DOCUMENT_ITEM: 'DRAFT:DELETE_DOCUMENT_ITEM',\r\n SELECT_DOCUMENT_ITEM: 'DRAFT:SELECT_ITEM', \r\n ENTER_CONNECTED_DRAFT_EDIT: 'DRAFT:ENTER_CONNECTED_DRAFT_EDIT',\r\n SHOW_CONFIRM_WARNINGS: 'DRAFT:SHOW_CONFIRM_WARNINGS',\r\n WARNINGS_CONFIRMED: 'DRAFT:WARNINGS_CONFIRMED',\r\n TRIGGER_VALIDATION: 'DRAFT:TRIGGER_VALIDATION',\r\n RECEIVE_UI_DEFINITION: 'DRAFT:RECEIVE_UI_DEFINITION'\r\n};\r\n\r\nexport class TriggerValidation {\r\n public type: string = ACTION.TRIGGER_VALIDATION;\r\n}\r\n\r\nexport class WarningsConfirmed {\r\n public type: string = ACTION.WARNINGS_CONFIRMED;\r\n public value: boolean;\r\n constructor(value: boolean = true) {\r\n this.value = value;\r\n }\r\n}\r\n\r\nexport class ShowConfirmWarnings {\r\n public type: string = ACTION.SHOW_CONFIRM_WARNINGS;\r\n \r\n constructor(public value: boolean = true, public warnings: [] = undefined) {\r\n }\r\n}\r\n\r\nexport class EnterDraftEdit {\r\n public type: string = ACTION.ENTER_DRAFT_EDIT;\r\n public id: number;\r\n public uiDefinition: UiDefinition;\r\n constructor(id: number, definition: UiDefinition) {\r\n this.id = id;\r\n this.uiDefinition = definition;\r\n }\r\n}\r\n\r\nexport class CopyDocumentItem {\r\n public type: string = ACTION.COPY_DOCUMENT_ITEM;\r\n constructor(\r\n public documentItemPath: StoreItemPath[],\r\n public options: CopyDocumentItemOptions\r\n ){}\r\n}\r\n\r\nexport class AddDocumentItem {\r\n public type: string = ACTION.ADD_DOCUMENT_ITEM;\r\n public parentKeys: CompositeKeys; \r\n public entityType: string;\r\n public childId: number;\r\n /**\r\n * `property:value` mapping of any default values to apply to the new entity\r\n */\r\n public initialValues: {[indexer: string]: StoreField[] | ComplexValue<number>};\r\n \r\n constructor(\r\n parentKeys: CompositeKeys, \r\n entityType: string, \r\n childId?: number, \r\n initialValues?: {[indexer: string]: StoreField[] | ComplexValue<number>\r\n }\r\n ) {\r\n this.parentKeys = parentKeys;\r\n this.entityType = entityType;\r\n this.childId = childId;\r\n this.initialValues = initialValues;\r\n }\r\n}\r\n\r\nexport class DeleteDocumentItem{\r\n public type: string = ACTION.DELETE_DOCUMENT_ITEM;\r\n public childKey: CompositeKeys; \r\n\r\n constructor(childKey: CompositeKeys) {\r\n this.childKey = childKey; \r\n }\r\n}\r\n\r\nexport class LeaveDraftEdit {\r\n public type: string = ACTION.LEAVE_DRAFT_EDIT;\r\n}\r\n\r\nexport class RequestDraftDocument {\r\n public id: number;\r\n public type: string = ACTION.REQUEST_DRAFT_DOC;\r\n constructor(id: number) {\r\n this.id = id;\r\n }\r\n}\r\n\r\nexport class ReceiveDraftDocument {\r\n public type: string = ACTION.RECEIVE_DRAFT_DOC;\r\n public draftId: number;\r\n public data: StoreData;\r\n public metadata: StoreMetadata;\r\n public etag: string;\r\n constructor(draftId: number, data: StoreData, metadata: StoreMetadata, etag: string) {\r\n this.draftId = draftId;\r\n this.data = data;\r\n this.metadata = metadata;\r\n this.etag = etag;\r\n }\r\n}\r\n\r\nexport class FailDraftDocument {\r\n public type: string = ACTION.FAIL_DRAFT_DOC;\r\n}\r\nexport class ChildItemSelection {\r\n public type: string = ACTION.SELECT_DOCUMENT_ITEM;\r\n public key: CompositeKeys;\r\n constructor(key: CompositeKeys){\r\n this.key = key;\r\n }\r\n}\r\n\r\nexport class EnterConnectedDraftEdit{\r\n public type: string = ACTION.ENTER_CONNECTED_DRAFT_EDIT;\r\n constructor(\r\n public connections: CaseConnectionParam[]\r\n ){}\r\n}\r\n\r\nexport class ReceiveUiDefinition {\r\n public type: string = ACTION.RECEIVE_UI_DEFINITION;\r\n constructor(public definition: UiDefinition) {}\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"file-uploader__visuallyhidden--1czLS\",\"focusable\":\"file-uploader__focusable--iZP1J\",\"file-heading\":\"file-uploader__file-heading--3BrMk\",\"fileHeading\":\"file-uploader__file-heading--3BrMk\",\"list-wrapper\":\"file-uploader__list-wrapper--17BKu\",\"listWrapper\":\"file-uploader__list-wrapper--17BKu\",\"item-wrapper\":\"file-uploader__item-wrapper--3Wv07\",\"itemWrapper\":\"file-uploader__item-wrapper--3Wv07\",\"marked\":\"file-uploader__marked--HgRtg\",\"dropdown\":\"file-uploader__dropdown--2nChE\",\"progress-container\":\"file-uploader__progress-container--1fdDr\",\"progressContainer\":\"file-uploader__progress-container--1fdDr\",\"file-uploader\":\"file-uploader__file-uploader--2t_vS\",\"fileUploader\":\"file-uploader__file-uploader--2t_vS\",\"flex-validation\":\"file-uploader__flex-validation--3ZokU\",\"flexValidation\":\"file-uploader__flex-validation--3ZokU\",\"drag-box\":\"file-uploader__drag-box--34LCl\",\"dragBox\":\"file-uploader__drag-box--34LCl\",\"drag-drop-icon\":\"file-uploader__drag-drop-icon--1HQb_\",\"dragDropIcon\":\"file-uploader__drag-drop-icon--1HQb_\",\"drag-drop-text\":\"file-uploader__drag-drop-text--ttiPt\",\"dragDropText\":\"file-uploader__drag-drop-text--ttiPt\",\"drag-active\":\"file-uploader__drag-active--18yP1\",\"dragActive\":\"file-uploader__drag-active--18yP1\",\"drag-active-animation\":\"file-uploader__drag-active-animation--1F_uS\",\"dragActiveAnimation\":\"file-uploader__drag-active-animation--1F_uS\",\"attachment\":\"file-uploader__attachment--1-tEk\",\"attachment-body\":\"file-uploader__attachment-body--2hS-T\",\"attachmentBody\":\"file-uploader__attachment-body--2hS-T\",\"attachment-img\":\"file-uploader__attachment-img--3Z6GO\",\"attachmentImg\":\"file-uploader__attachment-img--3Z6GO\",\"attachment-ext\":\"file-uploader__attachment-ext--jPDEy\",\"attachmentExt\":\"file-uploader__attachment-ext--jPDEy\",\"metadata\":\"file-uploader__metadata--23vYC\",\"add-button-section\":\"file-uploader__add-button-section--34EFt\",\"addButtonSection\":\"file-uploader__add-button-section--34EFt\",\"info-text\":\"file-uploader__info-text--1jGuU\",\"infoText\":\"file-uploader__info-text--1jGuU\",\"progress\":\"file-uploader__progress--ERUpT\",\"determinate\":\"file-uploader__determinate--2aQuu\",\"indeterminate\":\"file-uploader__indeterminate--2VWu0\",\"running-progress\":\"file-uploader__running-progress--YXKSs\",\"runningProgress\":\"file-uploader__running-progress--YXKSs\",\"is-editing\":\"file-uploader__is-editing--1wAUM\",\"isEditing\":\"file-uploader__is-editing--1wAUM\",\"not-editing\":\"file-uploader__not-editing--204O5\",\"notEditing\":\"file-uploader__not-editing--204O5\",\"show-less\":\"file-uploader__show-less--37LUa\",\"showLess\":\"file-uploader__show-less--37LUa\",\"edit-input-container\":\"file-uploader__edit-input-container--2FanJ\",\"editInputContainer\":\"file-uploader__edit-input-container--2FanJ\",\"edit-input\":\"file-uploader__edit-input--25rs6\",\"editInput\":\"file-uploader__edit-input--25rs6\",\"edit-done-btn\":\"file-uploader__edit-done-btn--1T_uL\",\"editDoneBtn\":\"file-uploader__edit-done-btn--1T_uL\"};","import { OptionsRequestContext, OptionsRequestParams } from './types';\r\nimport { StoreData, StoreMetadata, StoreField, StoreItemPath } from 'app/types-shared';\r\n\r\nexport const ACTION = {\r\n VALUE_CHANGE: 'UI:VALUE_CHANGE',\r\n BACKGROUND_SAVE: 'UI:BACKGROUND_SAVE',\r\n BACKGROUND_SAVE_OK: 'UI:BACKGROUND_SAVE_SUCCESS',\r\n BACKGROUND_SAVE_ERROR: 'UI:BACKGROUND_SAVE_ERROR',\r\n REQUEST_IMMEDIATE_BACKGROUND_SAVE: 'UI:REQUEST_IMMEDIATE_BACKGROUND_SAVE',\r\n CASE_SUBMIT: 'UI:CASE_SUBMIT',\r\n REQUEST_CASE_SUBMIT: 'UI:REQUEST_CASE_SUBMIT',\r\n CASE_SUBMIT_OK: 'UI:CASE_SUBMIT_OK',\r\n CASE_SUBMIT_ERROR: 'UI:CASE_SUBMIT_ERROR',\r\n ITEMS_SAVED: 'UI:ITEMS_SAVED',\r\n INSPECT_COMPONENT: 'UI:INSPECT_COMPONENT',\r\n INSPECT_PREVIEW_EDIT: 'UI:INSPECTOR_PREVIEW_EDIT',\r\n LOAD_CODES: 'UI:REQUEST_CODETABLE',\r\n LOAD_CODES_OK: 'UI:RECEIVE_CODETABLE',\r\n LOAD_CODES_ERROR: 'UI:REQUEST_CODETABLE_ERROR'\r\n};\r\n\r\nexport class ValueChange {\r\n\r\n public type: string = ACTION.VALUE_CHANGE;\r\n public storePath: StoreItemPath[];\r\n public value: StoreField[];\r\n public dataTag: string;\r\n\r\n constructor(storePath: StoreItemPath[], dataTag: string, newValue: StoreField[]) {\r\n this.storePath = storePath;\r\n this.value = newValue;\r\n this.dataTag = dataTag;\r\n }\r\n}\r\n\r\nexport class RequestCodetable {\r\n public type: string = ACTION.LOAD_CODES;\r\n public loadOptions: string;\r\n public context: OptionsRequestContext;\r\n\r\n constructor(context: OptionsRequestContext, searchTerm?: string) {\r\n this.loadOptions = searchTerm;\r\n this.context = context;\r\n }\r\n}\r\n\r\nexport class RequestCodetableError {\r\n public type: string = ACTION.LOAD_CODES_ERROR;\r\n public context: OptionsRequestContext;\r\n public loadOptions: OptionsRequestParams;\r\n\r\n constructor(context: OptionsRequestContext, loadOptions: OptionsRequestParams) {\r\n this.context = context;\r\n this.loadOptions = loadOptions;\r\n }\r\n}\r\n\r\nexport class ReceiveCodetable {\r\n public type: string = ACTION.LOAD_CODES_OK;\r\n public data: any;\r\n public context: OptionsRequestContext;\r\n public loadOptions: OptionsRequestParams;\r\n\r\n constructor(context: OptionsRequestContext, loadOptions: OptionsRequestParams, data?: any) {\r\n this.data = data;\r\n this.context = context;\r\n this.loadOptions = loadOptions;\r\n }\r\n}\r\n\r\nexport class BeginBackgroundSave {\r\n public type: string = ACTION.BACKGROUND_SAVE;\r\n}\r\n\r\nexport class BackgroundSaveComplete {\r\n public type: string = ACTION.BACKGROUND_SAVE_OK;\r\n public data: StoreData;\r\n public metadata: StoreMetadata;\r\n public etag: string;\r\n\r\n constructor(data: StoreData, metadata: StoreMetadata, etag: string) {\r\n this.data = data;\r\n this.metadata = metadata;\r\n this.etag = etag;\r\n }\r\n}\r\n\r\nexport class RequestImmediateBackgroundSave {\r\n public type: string = ACTION.REQUEST_IMMEDIATE_BACKGROUND_SAVE;\r\n}\r\n\r\nexport class BackgroundSaveFailed {\r\n public type: string = ACTION.BACKGROUND_SAVE_ERROR;\r\n public errors: any;\r\n\r\n constructor(errors: any) {\r\n this.errors = errors;\r\n }\r\n}\r\n\r\nexport class BeginCaseSave {\r\n public type: string = ACTION.CASE_SUBMIT;\r\n}\r\n\r\nexport class RequestCaseSave {\r\n public type: string = ACTION.REQUEST_CASE_SUBMIT;\r\n}\r\n\r\nexport class CaseSaveComplete {\r\n public type: string = ACTION.CASE_SUBMIT_OK;\r\n}\r\n\r\nexport class CaseSaveFailed {\r\n public type: string = ACTION.CASE_SUBMIT_ERROR;\r\n}\r\n\r\nexport class InspectComponent {\r\n public type: string = ACTION.INSPECT_COMPONENT;\r\n public payload: any;\r\n public error: any;\r\n\r\n constructor(payload: any, error: any) {\r\n this.payload = payload;\r\n this.error = error;\r\n }\r\n}\r\n\r\nexport class InspectPreviewEdit {\r\n public type: string = ACTION.INSPECT_PREVIEW_EDIT;\r\n public payload: any;\r\n\r\n constructor(payload: any) {\r\n this.payload = payload;\r\n }\r\n}\r\n","module.exports = (__webpack_require__(49))(118);","module.exports = (__webpack_require__(49))(550);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdAdd = function MdAdd(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z' })\n )\n );\n};\n\nexports.default = MdAdd;\nmodule.exports = exports['default'];","\r\nexport const endpoint = {\r\n case: 'case',\r\n casePermissions: 'case/access',\r\n bowtieSupported: 'case/bowtie/supported',\r\n ui: 'case/ui',\r\n riskMatrix: 'matrixDefinition/risk',\r\n draft: 'case/draft',\r\n codetable: 'codetable',\r\n changeCaseType: (draftId, casetypeId) => `case/draft/${draftId}/casetype/${casetypeId}`,\r\n caseLog: (isEditing: boolean, id: number) => `case/${isEditing ? 'draft/' : ''}${id}/log`,\r\n document: (isEditing: boolean, id: number) => `case/${isEditing ? 'draft/' : ''}${id}/document`,\r\n surveyManagerSupported: 'case/surveymanager/supported'\r\n};\r\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"my-downloads__visuallyhidden--SGPaP\",\"focusable\":\"my-downloads__focusable--17B5O\",\"download-heading\":\"my-downloads__download-heading--3S26S\",\"downloadHeading\":\"my-downloads__download-heading--3S26S\",\"my-downloads-view\":\"my-downloads__my-downloads-view--11zqE\",\"myDownloadsView\":\"my-downloads__my-downloads-view--11zqE\",\"my-downloads-download-item\":\"my-downloads__my-downloads-download-item--BBm0I\",\"myDownloadsDownloadItem\":\"my-downloads__my-downloads-download-item--BBm0I\",\"download-item-body\":\"my-downloads__download-item-body--3kG-F\",\"downloadItemBody\":\"my-downloads__download-item-body--3kG-F\",\"failed\":\"my-downloads__failed--18UEB\",\"my-downloads-wrapper\":\"my-downloads__my-downloads-wrapper--g6g5t\",\"myDownloadsWrapper\":\"my-downloads__my-downloads-wrapper--g6g5t\",\"my-downloads-list-item\":\"my-downloads__my-downloads-list-item--1eMZA\",\"myDownloadsListItem\":\"my-downloads__my-downloads-list-item--1eMZA\",\"progress\":\"my-downloads__progress--9f5lz\",\"progress-bar\":\"my-downloads__progress-bar--3rY3c\",\"progressBar\":\"my-downloads__progress-bar--3rY3c\",\"loading\":\"my-downloads__loading--3lbzD\",\"my-downloads-tile-ext-wrapper\":\"my-downloads__my-downloads-tile-ext-wrapper--2Eywv\",\"myDownloadsTileExtWrapper\":\"my-downloads__my-downloads-tile-ext-wrapper--2Eywv\",\"file-extention\":\"my-downloads__file-extention--1vxYA\",\"fileExtention\":\"my-downloads__file-extention--1vxYA\",\"my-downloads-download-item-title\":\"my-downloads__my-downloads-download-item-title--36WC9\",\"myDownloadsDownloadItemTitle\":\"my-downloads__my-downloads-download-item-title--36WC9\",\"my-downloads-download-metadata\":\"my-downloads__my-downloads-download-metadata--2BqMv\",\"myDownloadsDownloadMetadata\":\"my-downloads__my-downloads-download-metadata--2BqMv\",\"my-downloads-download-content\":\"my-downloads__my-downloads-download-content--1Q0fg\",\"myDownloadsDownloadContent\":\"my-downloads__my-downloads-download-content--1Q0fg\"};","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","import { UserMessage } from 'app/types-shared';\r\nimport { getUserMessage } from './get-user-message';\r\n\r\nexport const ACTION = {\r\n DISPLAY_USER_MESSAGE: 'USER_NOTIFICATION:DISPLAY_MESSAGE',\r\n DELETE_USER_MESSAGE: 'USER_NOTIFICATION:DELETE_MESSAGE'\r\n};\r\nexport class ErrorNotification {\r\n public type: string = ACTION.DISPLAY_USER_MESSAGE;\r\n public message: UserMessage;\r\n\r\n constructor(message: string | UserMessage[]) {\r\n this.message = { id: Date.now(), type: 'error', message: getUserMessage(message) };\r\n }\r\n}\r\n\r\nexport class SuccessNotification {\r\n public type: string = ACTION.DISPLAY_USER_MESSAGE;\r\n public message: UserMessage;\r\n\r\n constructor(message: string | UserMessage[]) {\r\n this.message = { id: Date.now(), type: 'success', message: getUserMessage(message) };\r\n }\r\n}\r\n/**\r\n * Internal usage. After a timeout the user message is removed from store.\r\n */\r\nexport class DeleteUserMessage {\r\n public type: string = ACTION.DELETE_USER_MESSAGE;\r\n public message: UserMessage;\r\n\r\n constructor(message: UserMessage) {\r\n this.message = message;\r\n }\r\n}\r\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, next, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES\n ? boundFunction(anObject(step = iterable[index])[0], step[1])\n : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};\n","import {\r\n Entity,\r\n CompositeKeys,\r\n ComplexValue,\r\n StoreField,\r\n StoreData\r\n} from 'app/types-shared';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { getEntityTypeFromStorePath, getPrimaryEntityId } from './entity';\r\nimport {\r\n getParentId,\r\n getById,\r\n getAllChildEntities,\r\n maxChildEntityId\r\n} from 'app/infrastructure/store/query';\r\nimport get from 'lodash/get';\r\n\r\nexport const entityOperation = {\r\n REMOVE: 'Remove'\r\n};\r\n\r\n/**\r\n * Create a child of a Case of the given entity type\r\n * @param storeData The array representing the full case\r\n * @param parentId The CompositeKey of the case to add child for\r\n * @param childType This becomes the child entity type\r\n * @param childId This becomes the id of the new child entity.\r\n */\r\nexport const createChild = (\r\n parentId: CompositeKeys,\r\n childType: string,\r\n childId: number,\r\n initialValues?: { [indexer: string]: StoreField[] | ComplexValue<number> }\r\n): Entity => ({\r\n id: [\r\n ...parentId,\r\n {\r\n [childType]: childId\r\n }\r\n ],\r\n ...initialValues\r\n});\r\n\r\n/**\r\n * Insert a new child into the store\r\n *\r\n * @param storeData List of entities in store\r\n * @param child The entity to insert\r\n */\r\nexport const insertChild = (storeData: StoreData, child: Entity) => {\r\n if (getById(storeData, child.id)) {\r\n return undefined;\r\n }\r\n const parentId = getParentId(child.id);\r\n const parent: any = { id: parentId, ...getById(storeData, parentId) };\r\n const remainingItems = storeData.slice();\r\n const parentIndex = storeData.indexOf(getById(storeData, parentId));\r\n\r\n //Support missing intermediate parent of child to insert.\r\n remainingItems.splice(\r\n parentIndex >= 0 ? parentIndex : storeData.length,\r\n 1,\r\n parent\r\n );\r\n return [...remainingItems, child];\r\n};\r\n\r\n/**\r\n * Decorate a child entity with operation=[Remove] and delete it\\'s parent reference.\r\n * The operation attribute will trigger a delete server side on the next background save.\r\n */\r\nexport const deleteChild = (storeData: StoreData, childKey: CompositeKeys) => {\r\n //Delete children of child, and so on.\r\n getAllChildEntities(storeData, childKey).forEach(c => {\r\n storeData = deleteChild(storeData, c.id);\r\n });\r\n\r\n const child: Entity = getById(storeData, childKey);\r\n if (!child) {\r\n throw new Error('Child entity does not exist');\r\n }\r\n\r\n const parentId = getParentId(child.id);\r\n\r\n const parent = getById(storeData, parentId);\r\n\r\n //Copy the store data.\r\n const remainingItems = storeData.slice();\r\n\r\n //Find the original parent object and replace it with changed copy.\r\n const parentIndex = storeData.indexOf(\r\n storeData.find(s => deepEquals(s.id, parentId))\r\n );\r\n remainingItems.splice(parentIndex, 1, parent);\r\n\r\n //Find the original child object and replace it with changed copy.\r\n const childIndex = storeData.indexOf(child);\r\n remainingItems.splice(childIndex, 1, {\r\n ...child,\r\n ...{ operation: entityOperation.REMOVE }\r\n } as Entity);\r\n\r\n return remainingItems;\r\n};\r\n\r\nconst copyOne = (\r\n storeData: StoreData,\r\n entityToCopy: Entity,\r\n keyOfNewParentEntity?: CompositeKeys\r\n) => {\r\n const { id, ...initialValues } = entityToCopy;\r\n const parentIdOfCopyTarget = getParentId(entityToCopy.id);\r\n const childType = getEntityTypeFromStorePath(entityToCopy.id);\r\n const maxChildId =\r\n maxChildEntityId(storeData, keyOfNewParentEntity, childType) ||\r\n maxChildEntityId(storeData, parentIdOfCopyTarget, childType);\r\n \r\n if (maxChildId === 0) {\r\n throw new Error('Invalid store data or path');\r\n }\r\n\r\n // TODO: Remove this very ugly hardcoding when implementing feature 136280\r\n if (initialValues.ActionCreatedDate) {\r\n // tslint:disable-next-line\r\n delete initialValues['ActionCreatedDate'];\r\n }\r\n \r\n const entityIsCodeIterator = !!get(entityToCopy, 'primaryKey.description');\r\n const targetId = entityIsCodeIterator ? getPrimaryEntityId(entityToCopy) : maxChildId + 1;/*?targetId*/\r\n const newChild = createChild(\r\n keyOfNewParentEntity || parentIdOfCopyTarget,\r\n childType,\r\n targetId,\r\n initialValues as any\r\n );\r\n\r\n storeData = insertChild(storeData, newChild);\r\n\r\n getAllChildEntities(storeData, entityToCopy.id).forEach(child => {\r\n storeData = copyOne(storeData, child, newChild.id);\r\n });\r\n\r\n return storeData;\r\n};\r\n\r\n/**\r\n * Creates a copy of a child entity. Children of the entity are also copied.\r\n * @returns A mutated version of the passed in StoreData containing the newly copied entities.\r\n */\r\nexport const copyChild = (storeData: StoreData, childKey: CompositeKeys) => {\r\n if (!Array.isArray(childKey) || childKey.length < 2) {\r\n throw new Error('Invalid child key');\r\n }\r\n const child = getById(storeData, childKey);\r\n if (!child) {\r\n return storeData;\r\n }\r\n return copyOne(storeData, child);\r\n};\r\n","export * from './mutate';\r\nexport * from './query';\r\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\nvar USES_TO_LENGTH = arrayMethodUsesToLength(FIND_INDEX);\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\n\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SUPPORTS_Y);\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","// tslint:disable: no-multiline-string\r\n\r\nconst r = String.raw;\r\n\r\n// protocol identifier (optional)\r\nconst PROTOCOL = r`(?:(?:(ftps?|file|https?):)\\/\\/)`;\r\n\r\n// user:pass BasicAuth (optional)\r\nconst AUTH = r`(?:\\S+(?::\\S*)?@)?`;\r\n\r\nconst HOST = [\r\n\r\n // host & domain names, may end with dot\r\n // can be replaced by a shortest alternative\r\n r`(?:`,\r\n r`(?:`,\r\n r`[a-z0-9\\u00a1-\\uffff]`,\r\n r`[a-z0-9\\u00a1-\\uffff_-]{0,62}`,\r\n r`)?`,\r\n r`[a-z0-9\\u00a1-\\uffff]\\.`,\r\n r`)+`,\r\n\r\n // TLD identifier name, may end with dot\r\n r`(?:[a-z\\u00a1-\\uffff]{2,}\\.?)`\r\n\r\n].join('');\r\n\r\nconst INTERNAL_HOST = r`(?:[a-z0-9\\u00a1-\\uffff]\\.{0,2})`;\r\n\r\n// IP address dotted notation octets\r\n// excludes loopback network 0.0.0.0\r\n// excludes reserved space >= 224.0.0.0\r\n// excludes network & broacast addresses\r\n// (first & last IP address of each class)\r\nconst IPV4 = '(?:' + [\r\n // first octet\r\n r`(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])`,\r\n\r\n // second and third octets\r\n r`(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}`,\r\n\r\n // fourth octet\r\n r`(?:\\.(?:1\\d\\d|2[0-4]\\d|25[0-4]|[1-9]\\d?))`\r\n].join('') + ')';\r\n\r\n// the IPv6 matching part is from here: https://gist.github.com/syzdek/6086792\r\n// IPv6 address in URLs are wrapped with []s\r\nconst IPV6 = r`\\[(?:` + [\r\n // 1:2:3:4:5:6:7:8\r\n r`(?:[\\da-f]{1,4}:){7,7}[\\da-f]{1,4}`,\r\n\r\n // 2001:db8:3:4::192.0.2.33 64:ff9b::192.0.2.33 (IPv4-Embedded IPv6 Address)\r\n r`(?:[\\da-f]{1,4}:){1,4}:${IPV4}`,\r\n\r\n // ::255.255.255.255 ::ffff:255.255.255.255 ::ffff:0:255.255.255.255 (IPv4-mapped IPv6 addresses)\r\n r`::(?:ffff(?::0{1,4}){0,1}:){0,1}${IPV4}`,\r\n\r\n // 1::3:4:5:6:7:8 1::3:4:5:6:7:8 1::8\r\n r`[\\da-f]{1,4}:(?:(?::[\\da-f]{1,4}){1,6})`,\r\n\r\n // 1::4:5:6:7:8 1:2::4:5:6:7:8 1:2::8\r\n r`(?:[\\da-f]{1,4}:){1,2}(?::[\\da-f]{1,4}){1,5}`,\r\n\r\n // 1::5:6:7:8 1:2:3::5:6:7:8 1:2:3::8\r\n r`(?:[\\da-f]{1,4}:){1,3}(?::[\\da-f]{1,4}){1,4}`,\r\n\r\n // 1::6:7:8 1:2:3:4::6:7:8 1:2:3:4::8\r\n r`(?:[\\da-f]{1,4}:){1,4}(?::[\\da-f]{1,4}){1,3}`,\r\n\r\n // 1::7:8 1:2:3:4:5::7:8 1:2:3:4:5::8\r\n r`(?:[\\da-f]{1,4}:){1,5}(?::[\\da-f]{1,4}){1,2}`,\r\n\r\n // 1::8 1:2:3:4:5:6::8 1:2:3:4:5:6::8\r\n r`(?:[\\da-f]{1,4}:){1,6}:[\\da-f]{1,4}`,\r\n\r\n // 1::\r\n r`(?:[\\da-f]{1,4}:){1,7}:`,\r\n\r\n // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::\r\n r`:(?:(?::[\\da-f]{1,4}){1,7}|:)`\r\n\r\n].join('|') + r`)\\]`;\r\n\r\n// port number (optional)\r\nconst PORT = r`(?::\\d{2,5})?`;\r\n\r\n// resource path (optional)\r\nconst PATH = r`(?:[/?#]\\S*)?`;\r\n\r\n// This will allow internal server host names, and filtered IP ranges\r\nconst RX_URL = new RegExp(\r\n r`${PROTOCOL}${AUTH}(?:${IPV4}|${IPV6}|(?:${INTERNAL_HOST}|${HOST}))${PORT}${PATH}`,\r\n 'i'\r\n);\r\n\r\nconst RX_URL_PUBLIC = new RegExp(\r\n r`${PROTOCOL}${AUTH}(?:${IPV4}|${IPV6}|${HOST})${PORT}${PATH}`,\r\n 'i'\r\n);\r\n\r\n/**\r\n * Validates if an URL string conforms to standard a URL format that \r\n * is limited one of the schemes `http: https: file:`\r\n * \r\n * @param url string to validate\r\n */\r\nexport const isValidUrl = (url: string, allowInternalHostNames = true) => url && \r\n allowInternalHostNames ? RX_URL.test(url) : RX_URL_PUBLIC.test(url);\r\n","import { entityValue } from 'app/infrastructure/store/entity';\r\nimport { columnName, tableName } from 'app/area/case/case-data-model';\r\nimport { Entity } from 'app/types-shared';\r\nimport maxBy from 'lodash/maxby';\r\nimport minBy from 'lodash/minby';\r\nimport isNumber from 'lodash/isnumber';\r\n\r\nexport const sequence = (connection: Entity) => {\r\n return Number(entityValue(connection, columnName[tableName.connectedCases].connectedSequence));\r\n};\r\n\r\nexport const maxSequenceEntity = (connections: Entity[]) => {\r\n return maxBy(connections, c => sequence(c));\r\n};\r\n\r\nexport const minSequenceEntity = (connections: Entity[]) => {\r\n return minBy(connections, c => sequence(c));\r\n};\r\n\r\nexport const nextSequenceValue = (maxSequence: number) => {\r\n return (maxSequence && isNumber(maxSequence)) ? maxSequence + 1 : 1;\r\n};\r\n","import { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\nimport { CaseData, CompositeKeys, CasePermissions } from 'app/types-shared';\r\nimport { RiskMatrixDefinition, ViewMode } from 'app/area/case/types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_CASE: 'CASE:REQUEST_CASE',\r\n RECEIVE_CASE: 'CASE:RECEIVE_CASE',\r\n RECEIVE_CASE_PERMISSIONS: 'CASE:RECEIVE_CASE_PERMISSIONS',\r\n FAIL_CASE_DATA: 'CASE:FAIL_CASE_DATA',\r\n REQUEST_CASE_RISK_MATRIX_DEFINITION: 'CASE:REQUEST_CASE_RISK_MATRIX_DEFINITION',\r\n RECEIVE_CASE_RISK_MATRIX_DEFINITION: 'CASE:RECEIVE_CASE_RISK_MATRIX_DEFINITION',\r\n SELECT_DOCUMENT_ITEM: 'CASE:SELECT_ITEM',\r\n CHANGE_VIEW_MODE: 'CASE:CHANGE_VIEW_MODE'\r\n};\r\n\r\nexport class ChildItemSelection {\r\n public type: string = ACTION.SELECT_DOCUMENT_ITEM;\r\n public key: CompositeKeys;\r\n constructor(key: CompositeKeys){\r\n this.key = key;\r\n }\r\n}\r\n\r\nexport class RequestCase {\r\n public type: string = ACTION.REQUEST_CASE;\r\n public caseNumber: number;\r\n constructor(caseNumber: number) {\r\n this.caseNumber = caseNumber;\r\n }\r\n}\r\n\r\nexport class ReceiveCase {\r\n public type: string = ACTION.RECEIVE_CASE;\r\n public caseNumber: number;\r\n public data: CaseData;\r\n public uiDefinition: UiDefinition;\r\n\r\n constructor(caseNumber: number, data: CaseData, uiDefinition: UiDefinition) {\r\n this.caseNumber = caseNumber;\r\n this.data = data;\r\n this.uiDefinition = uiDefinition;\r\n }\r\n}\r\n\r\nexport class LoadCaseFailure{\r\n public type: string = ACTION.FAIL_CASE_DATA;\r\n}\r\n\r\nexport class ReceiveCasePermissions {\r\n public type: string = ACTION.RECEIVE_CASE_PERMISSIONS;\r\n public caseNumber: number;\r\n public data: CasePermissions;\r\n\r\n constructor(caseNumber: number, data: CasePermissions) {\r\n this.caseNumber = caseNumber;\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class RequestCaseRiskMatrixDefinition {\r\n public type: string = ACTION.REQUEST_CASE_RISK_MATRIX_DEFINITION;\r\n public caseTypeId: number;\r\n\r\n constructor(caseTypeId: number) {\r\n this.caseTypeId = caseTypeId;\r\n }\r\n}\r\n\r\nexport class ChangeViewMode {\r\n public type: string = ACTION.CHANGE_VIEW_MODE;\r\n public mode: ViewMode;\r\n\r\n constructor(mode: ViewMode) {\r\n this.mode = mode;\r\n }\r\n}\r\n\r\nexport class ReceiveCaseRiskMatrixDefinition {\r\n public type: string = ACTION.RECEIVE_CASE_RISK_MATRIX_DEFINITION;\r\n public caseTypeId: number;\r\n public riskMatrixDefinition: RiskMatrixDefinition;\r\n\r\n constructor(caseTypeId: number, riskMatrixDefinition: RiskMatrixDefinition) {\r\n this.caseTypeId = caseTypeId;\r\n this.riskMatrixDefinition = riskMatrixDefinition;\r\n }\r\n}\r\n","module.exports = (__webpack_require__(49))(369);","export { CodeSinglePicker } from './code-picker/code-single-picker';\r\nexport { CodeMultiplePicker } from './code-picker/code-multiple-picker';\r\n\r\nexport { actionCreators as codetableOptionsActionCreators } from './codetable-options-handler/actions';\r\nexport { reducers as codetableOptionsReducer } from './codetable-options-handler/reducers';\r\nexport * from './codetable-options-handler/types';\r\n\r\nexport { api } from './api';\r\nexport * from './types';\r\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {\n var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;\n var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n if (\n (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||\n (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)\n ) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n }\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return nativeReplace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","import { toast, ToastOptions } from 'react-toastify';\r\nimport styles from './notify-user.scss';\r\n\r\n// tslint:disable-next-line:prefer-const\r\nlet options: ToastOptions = {\r\n autoClose: 5000\r\n};\r\n\r\n/**\r\n * Displays a toast notification with a default visibility duration of 5 seconds\r\n */\r\nexport const notifyUser = {\r\n\r\n set: (explicitOptions: ToastOptions) => {\r\n options = explicitOptions;\r\n return notifyUser;\r\n },\r\n\r\n info: (message: JSX.Element | string) => toast(message, {\r\n className: styles.info,\r\n bodyClassName: styles.body,\r\n progressClassName: styles.progress,\r\n render: message,\r\n type: toast.TYPE.INFO,\r\n position: toast.POSITION.TOP_LEFT,\r\n zIndex: '2001',\r\n ...options\r\n } as any),\r\n\r\n success: (message: string) => toast(message, {\r\n type: toast.TYPE.SUCCESS,\r\n position: toast.POSITION.TOP_LEFT,\r\n zIndex: '2001',\r\n ...options\r\n } as any),\r\n\r\n error: (message: string) => toast(message, {\r\n type: toast.TYPE.ERROR,\r\n position: toast.POSITION.TOP_LEFT,\r\n zIndex: '2001',\r\n ...options\r\n } as any)\r\n};\r\n","import { CaseData } from 'app/types-shared';\r\nimport { parseAsDateUTC } from './date';\r\n\r\nconst getValue = values => values.reduce(\r\n (memo: string, fv) => {\r\n const date = parseAsDateUTC(fv.v);\r\n const value = (date && date.toLocaleDateString(undefined, {timeZone: 'UTC'})) || fv.d || fv.v;\r\n return memo + (memo.length ? ' ' : '') + value;\r\n }, '');\r\n\r\nexport const getField = (item, field) => item && item.fields && item.fields[field] && item.fields[field].values\r\n ? getValue(item.fields[field].values)\r\n : '';\r\n\r\n/**\r\n * Receives the entity ID for the current wire JSON format\r\n */\r\nexport function primaryKey(entity: CaseData) : number {\r\n return entity.primaryKey && entity.primaryKey.v;\r\n}\r\n\r\nexport function caseTypeId(entity: CaseData): number {\r\n return entity.caseType && entity.caseType.v;\r\n}\r\n\r\nexport function caseContextId(entity: CaseData): number {\r\n return entity.caseContext && entity.caseContext.v;\r\n}\r\n\r\nexport function caseNumber(entity: CaseData): number {\r\n return Number(getField(entity, 'CaseNo'));\r\n}\r\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","import * as React from 'react';\r\n\r\nimport styles from './spin-loader.scss';\r\n\r\nexport const SpinLoader = (props: any) => <div className={`${styles.spinLoader}`}/>;\r\n","module.exports = (__webpack_require__(49))(69);","export function toHex(num: number) {\r\n if(!num){\r\n return '';\r\n }\r\n // tslint:disable\r\n num >>>= 0;\r\n const b = num & 0xFF;\r\n const g = (num & 0xFF00) >>> 8;\r\n const r = (num & 0xFF0000) >>> 16;\r\n return '#' + [r, g, b].map((component) => { return hexToDigit(component); }).join('');\r\n // tslint:enable\r\n}\r\n\r\nfunction hexToDigit(num: number) { //tslint:disable-line\r\n let str = num.toString(16);\r\n if (str.length < 2) {\r\n str = '0' + str;\r\n }\r\n return str;\r\n}\r\n","import get from 'lodash/get';\r\n\r\n/**\r\n * Default app scroll-restoration for react-router\r\n */\r\nexport const defaultScrollRestoration = (args?: any) => {\r\n // tslint:disable-next-line:no-invalid-this\r\n if ( get(this, 'state.location.action') === 'PUSH'){\r\n window.scrollTo(0, 0);\r\n }\r\n};\r\n\r\nexport const scrollToTopExceptInternal = (next: any) => { \r\n if (!window){\r\n return;\r\n }\r\n const isInternal = get(next, 'location.state.internal') === true;\r\n const isBackFwd = get(next, 'location.action') === 'POP';\r\n const shouldScroll = !isInternal && !isBackFwd;\r\n shouldScroll && window.scrollTo(0, 0);\r\n};\r\n\r\nexport const scrollToTopAlways = () => window && window.scrollTo(0, 0);\r\n","import { error } from 'app/infrastructure/log';\r\nimport { parseAsDateUTC } from '../data/date';\r\n\r\n/**\r\n * Wrapper for JSON.stringify to \r\n * \r\n * - handle errors \r\n * - avoiding circular reference errors\r\n * - ignore functions\r\n * - ensure that Date objects where created correctly \r\n */\r\nexport function toJSON(obj: any, space?: string | number){\r\n try{\r\n\r\n if ( obj instanceof Error ){\r\n return JSON.stringify(obj, ['message', 'arguments', 'type', 'name', 'stack', 'response']);\r\n }\r\n\r\n if ( obj instanceof Response ){\r\n return JSON.stringify({ statusText: obj.statusText, status: obj.status, url: obj.url, type: obj.type });\r\n }\r\n\r\n return JSON.stringify(obj, serializer((key: string, value: any): any => {\r\n\r\n if (Array.isArray(value)){\r\n return value.filter(v => v || v === 0 || v === false);\r\n }\r\n \r\n return value;\r\n\r\n }, null), space);\r\n\r\n } catch (err) {\r\n error(err);\r\n }\r\n return '';\r\n}\r\n\r\n/**\r\n * Deserialize and object from a JSON string, handling JavaScript Date values\r\n */\r\nexport function fromJSON(json: string){\r\n try{\r\n return JSON.parse(json, (key: any, value: any) => {\r\n return parseAsDateUTC(value) || value;\r\n });\r\n }catch (err){\r\n error(err);\r\n }\r\n return undefined;\r\n}\r\n\r\n/**\r\n * NOTE the function returned is stateful, do not re-use it in the calling function\r\n * \r\n * Copyright (c) Isaac Z. Schlueter and Contributors\r\n * https://github.com/isaacs/json-stringify-safe\r\n */\r\nfunction serializer(replacer: any, cycleReplacer: any) {\r\n const stack: any = [];\r\n const keys: any = [];\r\n\r\n if (cycleReplacer == null){\r\n cycleReplacer = (key: any, value: any) => {\r\n if (stack[0] === value) {\r\n return '[Circular ~]';\r\n }\r\n return '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']';\r\n };\r\n }\r\n\r\n /* tslint:disable */\r\n return function(key: any, value: any) {\r\n if (stack.length > 0) {\r\n const thisPos = stack.indexOf(this);\r\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\r\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\r\n if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value);\r\n }\r\n else stack.push(value);\r\n\r\n return replacer == null ? value : replacer.call(this, key, value);\r\n };\r\n /* tslint:enable */\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface IconProps {\r\n url: string;\r\n className?: string;\r\n}\r\n\r\nexport class Icon extends React.Component<IconProps, any> {\r\n public render() {\r\n return <img className={this.props.className} src={this.props.url} />;\r\n }\r\n}\r\n\r\nexport const IconDisplay = ({visible, url, classNames}) => url && visible ? <Icon className={classNames} url={url} /> : null;\r\n","export const cacheKeys = {\r\n userLanguage: 'user.language'\r\n};\r\n\r\nexport const headerTranslation = {\r\n about: 7409,\r\n title: 4033,\r\n new_case: 3028,\r\n new_report: 8195,\r\n reports_company: 5330,\r\n reports_saved: 7827,\r\n user_profile: 4011,\r\n dashboards: 6779,\r\n reports: 3537,\r\n logout: 7428,\r\n menu: 7429,\r\n search: 5537,\r\n codetable_administration: 8268,\r\n user_administration: 5241,\r\n role_administration: 8038,\r\n refresh_cache_title: 7859,\r\n my_downloads_title: 7870,\r\n import_title: 7891,\r\n regenerate_aggregated_environmental_data: 7883,\r\n regenerate_aggregated_risk_data: 7882,\r\n help: 3062,\r\n notifications: 8197,\r\n messages: 3632,\r\n manage_surveys: 7092,\r\n administration: 8384,\r\n tools: 8390,\r\n feedback: 8406\r\n};\r\n\r\nexport const layoutTranslation = {\r\n about_title: 718,\r\n about_close: 4329,\r\n about_copyrights: 7444,\r\n about_info: 5554,\r\n refresh_cache_title: 7859,\r\n refresh_cache_description: 7858,\r\n refresh_cache_submit_button: 7859,\r\n refresh_cache_cancel: 7860,\r\n refresh_cache_success: 7861,\r\n regenerate_aggregated_environmental_title: 7883,\r\n regenerate_aggregated_risk_title: 7882,\r\n regenerate_aggregated_environmental_description: 7887,\r\n regenerate_aggregated_risk_description: 7886,\r\n regenerate_aggregated_submit_button: 7888,\r\n regenerate_aggregated_cancel: 7860,\r\n regenerate_aggregated_enviromental_success: 7885,\r\n regenerate_aggregated_risk_success: 7884,\r\n \r\n notification_toast_title: 8264,\r\n notification_toast_subtitle: 8263,\r\n notification_toast_link: 8262,\r\n\r\n my_downloads_title: 7870,\r\n notification_banner_title: 8170,\r\n notification_banner_button: 8169,\r\n import_title: 7891,\r\n unread_messages: 8227,\r\n mark_as_read: 8223,\r\n mark_as_unread: 8233\r\n};\r\n\r\nexport const footerTranslation = {\r\n contact_information: 7422,\r\n any_problems: 7423,\r\n your_location: 7424,\r\n your_user_group: 7425,\r\n your_unit: 7427,\r\n about_synergi: 7409,\r\n language: 8023\r\n};\r\n\r\nexport const messagesToUserTranslation = {\r\n messages: 3632,\r\n no_messages: 5923,\r\n mark_as_read: 8223,\r\n read_messages: 8230,\r\n unread_messages: 8227,\r\n no_unread_messages: 8231,\r\n mark_as_unread: 8233,\r\n no_read_messages: 8234,\r\n message_date: 8235\r\n};\r\n\r\nexport const messageStatusOptions = {\r\n unread: 1,\r\n read: 2\r\n};\r\n","import { ComplexValue, CompositeKeys, LoadOptions } from 'app/types-shared';\r\nimport * as React from 'react';\r\n\r\nimport { ControlType, IteratorType } from './component-configuration';\r\nimport { ValidationProps } from 'ui';\r\nimport { HeaderVisibilityConfiguration } from 'app/components';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\n\r\nexport interface IteratorConfig {\r\n type: IteratorType;\r\n defaultValues?: UiDefaultValueDefinition[];\r\n}\r\n\r\n////////////////////////////////////////////////////////////////////////////////////////////////////\r\n//\r\n// Now, all above should be interpreted by the UI Builder and rendered into a UI Schema\r\n\r\n// A UI Builder is:\r\n// - a function that takes a UI Definition and selector/map function as input\r\n// and returns a strong typed UI schema to render\r\n\r\n// The UI schema \r\n// - will contain a concrete component constuctor function as Type\r\n\r\n// The strategy for when UI Schema will be created and cached is: \r\n// - build one schema per applicationId\r\n//\r\n////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n/**\r\n * The root level UI Schema describing what to render based on configuration and runtime evaluations\r\n * \r\n * @export\r\n * @interface UiSchema\r\n */\r\nexport interface UiSchema {\r\n contextId: number; //domainContext\r\n applicationId: number;\r\n id: string;\r\n children: ComponentDescriptor[]; // added by sequence\r\n availableSections: ComponentDescriptor[];\r\n getById(domainId:number):ComponentDescriptor;\r\n}\r\n\r\n/**\r\n * Describes how the component should render and behave\r\n * \r\n * @export\r\n * @interface ComponentDescriptor\r\n */\r\nexport interface ComponentDescriptor {\r\n /**\r\n * Domain number from config \r\n */\r\n id: number; \r\n /**\r\n * Name of connected entity property whose value is represented by this component\r\n */ \r\n dataTag: string; \r\n /**\r\n * Path of ancestor entities for this component. Left to right, highest to lowest level.\r\n */\r\n entityTypePath: string[]; \r\n /**\r\n * Translated label text. Resolved server side.\r\n */ \r\n label?: string; \r\n /**\r\n * Child components. Order is determined server side.\r\n */ \r\n children?: ComponentDescriptor[]; \r\n /**\r\n * strong typed attributes parsed (parsed per type) from UiDefinition.attributes\r\n */\r\n properties?: ComponentProps; \r\n /**\r\n * Display/render order. Determined server side.\r\n */ \r\n sequence: number; \r\n /**\r\n * The react component that renders the visual representation\r\n */\r\n componentClass: any; // The resolved react component\r\n /**\r\n * List of higher order components that the componentClass will be wrapped in.\r\n */\r\n enhancers?: ((componentClass: React.ComponentClass<any> | React.SFC<any>, props?: InitialUiEngineProps) => \r\n React.ComponentClass<any> | React.SFC<any>)[];\r\n /**\r\n * Array of selectors providing extra props, usually selected from the provided state, to the components.\r\n */ \r\n selectors?: (( state: {}, // State slice for the current stateArea\r\n props: ConnectedComponentProps, \r\n store: {} /* All of ApplicationState */) => {})[];\r\n /**\r\n * Friendly name of the React component. Resolved from name of [ControlType] enum.\r\n */ \r\n componentName: string; \r\n /**\r\n * Client side events the component would like to have callbacks provided by the ui engine\r\n */ \r\n componentEvents: string[];\r\n /**\r\n * Default props passed into the representing React component, independent of which component performs the rendering\r\n */ \r\n componentDefaultProps: Object;\r\n /**\r\n * Configuration for iterator components.\r\n */\r\n iterate?: IteratorConfig;\r\n /**\r\n * When this components value is a reference to a code. \r\n * This is the id of the codetable where codes are loaded from.\r\n */ \r\n codetable?: number;\r\n /**\r\n * A descriptor on how to calculate or fetch the default value for component.\r\n */ \r\n defaultValue?: DefaultValueDefinition;\r\n}\r\n\r\nexport interface DefaultValueDefinition {\r\n /**\r\n * id of the function that should handle creating this default value.\r\n * The existence of the other parameters often relies on this\r\n */\r\n valueFunction: DefaultValueFunction;\r\n /**\r\n * the default value, if available\r\n */\r\n value?: number | CodetableWireFormat | string;\r\n /**\r\n * expression to evaluate \r\n */\r\n dateRegex?: string;\r\n /**\r\n * if the expression cannot be evaluated or is empty, an API call must\r\n * be performed to calculate the value\r\n */\r\n dbFunction?: number;\r\n}\r\n\r\nexport enum DefaultValueFunction {\r\n codeValue = 'codeValue',\r\n dateValue = 'dateValue'\r\n}\r\n\r\nexport type UiDefaultValueDefinition = {dataTag: string, defaultValue: DefaultValueDefinition};\r\n\r\nexport interface ComponentCallbacks {\r\n [indexer: string]: Function;\r\n}\r\n\r\n/**\r\n * Configuration attributes mapped as strong typed props of the resolved component\r\n * \r\n * @export\r\n * @interface ComponentProps\r\n */\r\nexport interface ComponentProps {\r\n [indexer: string]: boolean | number | string;\r\n}\r\n\r\n/**\r\n * Describes all default settings for a component that is plugged into the ui engine\r\n * \r\n * @export\r\n * @interface PropertyBuilderMap\r\n */\r\nexport interface PropertyBuilderMap {\r\n [index: number]: { attributeKey: string, builder?: Function };\r\n}\r\n\r\nexport interface ComponentRegistry {\r\n components: ComponentSet[];\r\n}\r\n\r\nexport interface ComponentSet {\r\n mode: number;\r\n parentMode?: number;\r\n components: ComponentIndex;\r\n}\r\n\r\nexport interface ComponentIndex {\r\n [indexer: number]: ComponentType;\r\n}\r\n\r\nexport interface ComponentType {\r\n component: any;\r\n selectors?: ((state: {}, props: any, fullState?: {}) => ( {[indexer: string]: any}) )[];\r\n enhancers?: ((componentClass: React.ComponentClass<any> | React.SFC<any>, props?: any) => React.ComponentClass<any> | React.SFC<any>)[];\r\n iterate?: { type: IteratorType };\r\n configType: ControlType;\r\n events?: string[];\r\n}\r\n/**\r\n * Describes the current entity data context, and rendermode\r\n */\r\nexport interface ComponentContext {\r\n path: CompositeKeys;\r\n applicationId?: number;\r\n mode?: number;\r\n}\r\n\r\nexport interface ChildComponentContext extends ComponentContext {\r\n primaryKey: ComplexValue<number>;\r\n /** \r\n * A child component lives within a context that is created by the iterator. \r\n * \r\n * When an iterator is just rendering one component per entity in the subtable,\r\n * this flag would be false, because it maps to a physical entity.\r\n * \r\n * When an iterator uses another datasource than the entities in a subtable, such as a list of codes\r\n * it is creating \"virtual\" contexts to render the components.\r\n * \r\n * This flag simply indicates that there is not (or not yet) an associated entity in the data, and the component\r\n * may have to take action, such as adding the entity itself, before it can interact with the data.\r\n */\r\n virtual: boolean;\r\n /**\r\n * Children may need to add the physical item, so they need to know the default values for their context.\r\n */\r\n defaultValues: UiDefaultValueDefinition[];\r\n}\r\n\r\nexport interface ComponentMetadata {\r\n readOnly?: boolean;\r\n requiredField?: boolean;\r\n hidden?: boolean;\r\n validation?: ValidationProps;\r\n validationDescendants?: ValidationProps[];\r\n}\r\n\r\nexport type ComponentWrapper = (component: React.Component<any, any>, props: ConnectedComponentProps) => any;\r\n\r\n/**\r\n * The format that ui-engine uses when it passes async loaded data into a component\r\n */\r\nexport interface ComponentDataShape{\r\n options: ComplexValue<any>[];\r\n loadOptions: LoadOptions;\r\n loadOptionsError: boolean;\r\n fetching: boolean;\r\n}\r\n\r\nexport interface ObjectMap{\r\n [indexer: string]: any;\r\n}\r\n/**\r\n * Configuration props passed as configuration to initialize ui-engine\r\n */\r\nexport interface InitialUiEngineProps {\r\n componentDescriptor?: ComponentDescriptor;\r\n\r\n /**\r\n * Only passed in for components rendered in an iterator.\r\n * This will be the ComponentDescriptor representing the details.\r\n */\r\n detailsViewDescriptor?: ComponentDescriptor;\r\n /**\r\n * Iterators pass an explicit resolvecontext downwards\r\n */\r\n resolveContext?: ComponentContext; \r\n /**\r\n * Reconnect is a flag to re-build the whole Virtual DOM tree\r\n */\r\n reconnect?: boolean;\r\n /**\r\n * Path, in store, to start when resolving entity data.\r\n */\r\n statePath: string;\r\n /**\r\n * Action creators passed in from the outermost host container for a Field\r\n */\r\n actions: {};\r\n intl?: any;\r\n entityId?: number;\r\n entityStoreKey: string;\r\n /**\r\n * Case number of the entity (if it exists)\r\n * DEPRECATED, instead use hostProps to resolve\r\n */\r\n caseNumber?: number;\r\n /**\r\n * Application id for the current entity.\r\n */\r\n applicationId?: number;\r\n /**\r\n * Configuration to be used by \"header\" children of the host.\r\n */\r\n headerVisibilityConfiguration?: HeaderVisibilityConfiguration;\r\n /**\r\n * Explicitly enabling/disabling of add and remove for iterator scenarios\r\n */\r\n enabledChildEntityOperations?: EnabledChildEntityOperations;\r\n /**\r\n * Updated props as a lazy resolver, we should gracefully migrate the above properties to be \r\n * returned by this function instead.\r\n */\r\n hostProps?: () => InitialUiEngineProps;\r\n}\r\n/**\r\n * Components connected to ui-engine will have these props spread onto them\r\n */\r\nexport interface ConnectedComponentProps\r\n{\r\n actions?: ObjectMap;\r\n\r\n componentId: string;\r\n className?: string;\r\n componentName: string;\r\n componentDescriptor?: ComponentDescriptor;\r\n \r\n /**\r\n * Explicitly enabling/disabling of add and remove for iterator scenarios\r\n */\r\n enabledChildEntityOperations?: EnabledChildEntityOperations;\r\n\r\n formatDate: (dt: Date) => string;\r\n formatTime: (dt: Date) => string;\r\n formatNumber: (n: number) => string;\r\n parseAsDateUTC: (dateString: string) => Date;\r\n cloneDate: (localDate: Date) => Date;\r\n createUTCDate(dateValues: {\r\n year?: number, \r\n month?: number, \r\n day?: number, \r\n hours?: number, \r\n minutes?: number,\r\n seconds?: number,\r\n milliseconds?: number\r\n });\r\n\r\n intl: ObjectMap;\r\n \r\n //TODO These should be grouped and have type ComponentDataShape\r\n options?: ComplexValue<any>[];\r\n loadOptions?: ObjectMap; \r\n fetching?: boolean;\r\n\r\n statePath: string;\r\n hostProps: () => ObjectMap; \r\n locale: string;\r\n resolveContext: ComponentContext;\r\n sequence?: number;\r\n\r\n onSelectDocumentItem?: (itemKey?: CompositeKeys) => void;\r\n onAddDocumentItem?: (initialValues?: ObjectMap) => void;\r\n onDeleteDocumentItem?: () => void;\r\n onEditDocument?: () => void;\r\n onDeleteDocument?: () => void;\r\n onDuplicateDocument?: () => void;\r\n onChange?: (value: string | Date | Number | ComplexValue<number>) => void;\r\n onBlur?: () => void;\r\n onLoadOptions?: (search?: LoadOptions) => void;\r\n onLoadBowtie: () => void;\r\n\r\n // Other, dynamic stuff\r\n [index: string] : any;\r\n\r\n}\r\n\r\nexport interface EnabledChildEntityOperations{\r\n add: boolean;\r\n remove: boolean;\r\n}\r\n","\r\nexport const endpoint = {\r\n date: 'date'\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data';\r\nimport { ApiResponse } from 'app/types-shared';\r\nimport { endpoint } from 'app/area/shared/endpoints';\r\n\r\nexport const api = {\r\n date: async (dbFunction: number, utcOffset: number): Promise<string> => {\r\n\r\n const response = await new RemoteData(endpoint.date).resource<ApiResponse<any>>()\r\n .withId(dbFunction)\r\n .filter({\r\n utcOffset\r\n })\r\n .single();\r\n\r\n return response && response.data && response.data.date;\r\n }\r\n};\r\n","import { DefaultValueDefinition, DefaultValueFunction } from 'app/infrastructure/ui/types-uischema';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { api } from 'app/area/shared/api';\r\nimport { StoreField } from 'app/types-shared';\r\nimport { error } from 'app/infrastructure/log';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport { parseDate } from '../../infrastructure/data/date';\r\n\r\nexport type DefaultValueHandlerSettings = {utcOffset?: number};\r\nexport type DefaultValueHandler = (request: DefaultValueDefinition, settings?: DefaultValueHandlerSettings) => any;\r\n\r\nconst defaultValueHandlers: {[key:string]: DefaultValueHandler} = {\r\n\r\n [DefaultValueFunction.codeValue]: (request: DefaultValueDefinition) => {\r\n return request.value && codeItemToStoreValue(request.value as CodetableWireFormat);\r\n },\r\n\r\n [DefaultValueFunction.dateValue]: async (request: DefaultValueDefinition, settings: DefaultValueHandlerSettings = {}) => {\r\n let date = undefined;\r\n\r\n if (request.dateRegex) {\r\n date = parseDate(request.dateRegex);\r\n }\r\n \r\n if (!date && request.dbFunction) { \r\n date = await api.date(request.dbFunction, settings.utcOffset);\r\n }\r\n\r\n return date && { value: date } as StoreField;\r\n }\r\n\r\n};\r\n\r\nconst fallbackHandler = (request: DefaultValueDefinition) => undefined;\r\n\r\nexport const defaultValueHandler = (request: DefaultValueDefinition, settings: DefaultValueHandlerSettings) => {\r\n try {\r\n return defaultValueHandlers[request.valueFunction](request, settings) || fallbackHandler(request);\r\n } catch(err) {\r\n error('Error in defaultValueHandler', err);\r\n return undefined;\r\n }\r\n};\r\n","import { CaseData, CasePermissions, ApiResponse, HttpResponse } from 'app/types-shared';\r\nimport { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { primaryKey } from 'app/infrastructure/data/wireformat';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\nimport { OptionsRequestParams } from 'app/infrastructure/ui/form/types';\r\n\r\nexport const api = {\r\n draft: async (id: number, includeFailedConstraints: boolean = false): Promise<HttpResponse<CaseData>> => {\r\n\r\n return new RemoteData(endpoint.draft).resource<HttpResponse<CaseData>>()\r\n .withId(id)\r\n .filter({ includeFailedConstraints })\r\n .response();\r\n },\r\n\r\n deleteDraft: async (caseDraftId: number, eTag: string) => {\r\n return new RemoteData(endpoint.draft)\r\n .resource<ApiResponse<CaseData>>()\r\n .withId(caseDraftId)\r\n .withIfMatch(eTag)\r\n .httpDelete(caseDraftId);\r\n },\r\n\r\n saveDraft: async (data: CaseData, eTag: string, includeFailedConstraints: boolean = false) => {\r\n\r\n return new RemoteData(endpoint.draft)\r\n .resource<HttpResponse<CaseData>>()\r\n .withId(primaryKey(data))\r\n .withIfMatch(eTag)\r\n .filter({ includeFailedConstraints })\r\n .save(data);\r\n },\r\n \r\n permissions: async (caseNumber: number): Promise<CasePermissions[]> => {\r\n \r\n const response = await new RemoteData(endpoint.casePermissions).resource<ApiResponse<CasePermissions[]>>()\r\n .filter({ caseId: caseNumber })\r\n .single();\r\n \r\n return response.data;\r\n },\r\n\r\n options: async (transNo: number, domainId: number, params: OptionsRequestParams, search: boolean) => {\r\n return new RemoteData(`case/draft/${transNo}/field/${domainId}/options${search ? '/search' : ''}`).resource()\r\n .filter({\r\n ...params,\r\n ...{\r\n businessType: 1 //This will be part of case metadata in the future.\r\n }\r\n }).all();\r\n },\r\n\r\n submitCase: async (parameters) => {\r\n const response: any = await new RemoteData(endpoint.case).resource<ApiResponse<CaseData>>()\r\n .filter(parameters)\r\n .create(undefined, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data.caseId;\r\n }\r\n \r\n};\r\n","// #region imports\r\nimport { CaseState, ViewMode } from 'app/area/case/types-store';\r\nimport {\r\n ChildItemSelection,\r\n ReceiveCasePermissions,\r\n ChangeViewMode\r\n} from 'app/area/case/action-types';\r\nimport { actionCreators as caseActionCreators } from 'app/area/case/actions';\r\nimport { caseTranslations, viewModeCacheKey } from 'app/area/case/constants';\r\nimport { getLocationOfInitiator } from 'app/area/case/draft/connected-state';\r\nimport { defaultValueHandler } from 'app/area/shared/default-value-handler';\r\nimport { replace } from 'app/area/shared/navigation';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { maxChildEntityId, getCaseContextId as getCaseContextIdStoreData } from 'app/infrastructure/store/query';\r\nimport { caseTypeId as getCaseTypeId, caseContextId as getCaseContextId } from 'app/infrastructure/data/wireformat';\r\nimport { debug } from 'app/infrastructure/log';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { errorSafe, LoggedError, whenIdle } from 'app/infrastructure/redux';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport {\r\n BackgroundSaveComplete,\r\n BeginBackgroundSave,\r\n BeginCaseSave,\r\n CaseSaveFailed,\r\n ReceiveCodetable,\r\n RequestCaseSave,\r\n RequestCodetable,\r\n RequestCodetableError,\r\n RequestImmediateBackgroundSave,\r\n ValueChange,\r\n BackgroundSaveFailed\r\n} from 'app/infrastructure/ui/form/action-types';\r\nimport {\r\n caseDataToStore as toStore,\r\n caseMetadataToStore as toMetadata,\r\n storeToCaseData as fromStore\r\n} from 'app/infrastructure/store/normalize';\r\nimport {\r\n AddDocumentItemOptions,\r\n CaseConnectionParam,\r\n OptionsRequestContext,\r\n OptionsRequestParams,\r\n UiState,\r\n CopyDocumentItemOptions\r\n} from 'app/infrastructure/ui/form/types';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport {\r\n CompositeKeys,\r\n RenderMode,\r\n StoreField,\r\n StoreItemPath,\r\n ActionDispatching,\r\n CasePermissions\r\n} from 'app/types-shared';\r\nimport get from 'lodash/get';\r\n\r\nimport { log } from 'app/infrastructure/log';\r\nimport { RemoteResult } from 'app/infrastructure/remote-data/http';\r\nimport {\r\n AddDocumentItem,\r\n DeleteDocumentItem,\r\n EnterConnectedDraftEdit,\r\n EnterDraftEdit,\r\n FailDraftDocument,\r\n LeaveDraftEdit,\r\n ReceiveDraftDocument,\r\n RequestDraftDocument,\r\n CopyDocumentItem,\r\n ShowConfirmWarnings,\r\n WarningsConfirmed,\r\n ReceiveUiDefinition\r\n} from './action-types';\r\nimport { api } from './api';\r\nimport { api as connectedCaseApi } from 'app/area/case/features/connected-cases/api';\r\nimport {\r\n routeFromStoreItemPath,\r\n sectionFromStoreItemPath\r\n} from 'app/infrastructure/store/entity-route';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport { getCaseId, getDraftId } from 'app/infrastructure/store';\r\nimport { clientCache } from 'app/infrastructure/universal';\r\nimport { actionCreators as responseCachingActionCreators } from 'app/area/shared/response-caching/actions';\r\nimport { resolveHasAnyValidations, resolveWarnings } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { Action } from 'redux';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\n//#endregion\r\n\r\nconst draftWillBeConnected = (state: CaseState) =>\r\n !!get(state, 'editing.connectedDrafts.length');\r\n\r\nconst readAccessToSubmittedCase = (\r\n caseId: number,\r\n casePermissions: CasePermissions[]\r\n) =>\r\n casePermissions.length > 0 &&\r\n (casePermissions.find(a => a.caseId === caseId) || {}).read;\r\n\r\n/**\r\n * A higher order function that can handle messages related to saving and submitting drafts\r\n *\r\n * This code is not cleanly separated, and needs more work\r\n * @param dispatch\r\n * @param getState\r\n */\r\nconst createErrorHandler = (dispatch: any, getState: any) => (\r\n error: RemoteResult,\r\n customErrorMessage?: string\r\n) => {\r\n const code = get(error, 'response.status');\r\n const draftNotAvaliable = code > 400 && code <= 499;\r\n const isValidationError =\r\n code === 400 && error.validationErrors && error.validationErrors.length;\r\n\r\n // To ensure the user gets a notification even after navigation,\r\n // if draft was deleted under our feets, or other unexpected errors occured\r\n !isValidationError && dispatch(new LoggedError(error));\r\n\r\n if (draftNotAvaliable) {\r\n const state = getState().caseArea;\r\n const caseNo = state.editing && getCaseId(state.editing.values);\r\n\r\n const connectedCase =\r\n state.editing && getLocationOfInitiator(state.editing.connectedDrafts);\r\n if (connectedCase) {\r\n replace(connectedCase);\r\n return;\r\n }\r\n\r\n dispatch(new LeaveDraftEdit());\r\n\r\n if (caseNo) {\r\n // If an existing case was beeing edited, return to read mode\r\n navigate.toCaseView(caseNo as any, true);\r\n } else {\r\n navigate.toStartupView(true);\r\n }\r\n } else {\r\n // this should probly be a concern of the calling action creator, but edge cases makes this correct for now\r\n const { userMessages } = error;\r\n const serviceMessages =\r\n userMessages && userMessages.length\r\n ? userMessages.map(m => m.message).join('\\n')\r\n : undefined;\r\n dispatch(\r\n new ErrorNotification(\r\n customErrorMessage || serviceMessages || error.message\r\n )\r\n );\r\n }\r\n};\r\n\r\nasync function loadDraft(dispatch: any, draftId: number, caseState: UiState) {\r\n dispatch(new RequestDraftDocument(draftId));\r\n \r\n const res = await api.draft(draftId, !!caseState.editing && !!caseState.editing.loadValidationMetadata);\r\n const draft = res.json.data;\r\n const etag = res.etag;\r\n const entities = toStore(draft);\r\n const no = getCaseId(entities);\r\n \r\n dispatch(new ReceiveDraftDocument(draftId, entities, toMetadata(draft), etag));\r\n \r\n return { draft, no };\r\n}\r\n\r\nexport const actionCreators = {\r\n /**\r\n * When user requests to load the draft to begin editing\r\n */\r\n editDraft: (\r\n draftId: number,\r\n connectToDraft?: CaseConnectionParam[]\r\n ): ActionDispatching<any, ApplicationState> => async (\r\n dispatch: any,\r\n getState: any\r\n ) => {\r\n let casePermissions = { edit: true, delete: true };\r\n const handleDraftError = createErrorHandler(dispatch, getState);\r\n\r\n try {\r\n const { draft, no } = await loadDraft(dispatch, draftId, getState);\r\n\r\n const caseType = getCaseTypeId(draft);\r\n const caseContextId = getCaseContextId(draft);\r\n dispatch(caseActionCreators.caseRiskMatrixDefinition(caseType));\r\n const uiDef = await dispatch(responseCachingActionCreators.getUiDefinition(caseType, caseContextId));\r\n\r\n if (!uiDef) {\r\n dispatch(new FailDraftDocument());\r\n return;\r\n }\r\n\r\n if (no) {\r\n casePermissions = (await api.permissions(no)) as any;\r\n }\r\n\r\n dispatch(new ReceiveCasePermissions(no, casePermissions as any));\r\n\r\n dispatch(new EnterDraftEdit(draftId, { ...uiDef, applicationId: caseType }));\r\n\r\n connectToDraft && dispatch(new EnterConnectedDraftEdit(connectToDraft));\r\n } catch (err) {\r\n handleDraftError(err);\r\n dispatch(new FailDraftDocument());\r\n }\r\n },\r\n\r\n /**\r\n * Components defining a onChange event gets an onChange callback assigned.\r\n * onChange calls into this action creator whenever the components value is changed.\r\n * The redux store will be updated with the new value;\r\n */\r\n valueChanged: (\r\n storePath: StoreItemPath[],\r\n dataTag: string,\r\n newValue: StoreField[],\r\n immediateSave?: boolean\r\n ): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new ValueChange(storePath, dataTag, newValue));\r\n immediateSave && dispatch(actionCreators.requestImmediateSave());\r\n }),\r\n\r\n /**\r\n * Components defining an onLoadOptions event gets a callback assigned.\r\n * The callback assigned calls into this action creator to load code table data into the redux store.\r\n * The related reducer will store the data using the componentContext as id in a temporary store slice.\r\n */\r\n loadOptions: (\r\n componentContext: OptionsRequestContext,\r\n loadOptionsParams: OptionsRequestParams\r\n ): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodetable(componentContext, loadOptionsParams.query));\r\n\r\n try {\r\n const transNo = get(componentContext.path, '[0].tblTrans');\r\n //TODO: It might make more sense to send this down from whoever is calling this action, but I don't see an easy way to do it.\r\n //The way it is now it ties the \"path\" ordering to the concept of a transNo, which isn't optimal.\r\n\r\n const response: any = await api.options(\r\n transNo,\r\n componentContext.domainId,\r\n loadOptionsParams,\r\n !!loadOptionsParams.query\r\n );\r\n dispatch(\r\n new ReceiveCodetable(\r\n componentContext,\r\n loadOptionsParams,\r\n response !== null ? response.data : null\r\n )\r\n );\r\n } catch (error) {\r\n dispatch(new LoggedError(error));\r\n dispatch(\r\n new RequestCodetableError(componentContext, loadOptionsParams)\r\n );\r\n }\r\n }),\r\n\r\n /**\r\n * This is the action creator invoked for components requesting injected action callback for \"onCopyDocumentItem\".\r\n */\r\n copyDocumentItem: (\r\n documentItemPath: StoreItemPath[],\r\n options: CopyDocumentItemOptions\r\n ): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any) => {\r\n dispatch(new CopyDocumentItem(documentItemPath, options));\r\n dispatch(actionCreators.requestImmediateSave());\r\n }),\r\n\r\n /**\r\n * This is the action creator invoked for components requesting injected action callback for \"onAddDocumentItem\".\r\n * Adds an entity of the specified entityType.\r\n * If no child id is provided in options, the default is to increment the max existing id by 1.\r\n */\r\n\r\n addDocumentItem: (\r\n parentPath: StoreItemPath[],\r\n entityType: string,\r\n selectAddedItem: boolean,\r\n options: AddDocumentItemOptions\r\n ): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const state = getState();\r\n\r\n if (!state.caseArea.editing) {\r\n // TODO:\r\n // Async operation (file-uploader) fires callback after navigation occured. UI is no longer in edit mode.\r\n // This would not happen if the operation was moved out of the component and into actionCreator.\r\n return;\r\n }\r\n\r\n const { childId, initialValues, defaultValues } = options;\r\n const { utcOffset } = state.app.settings;\r\n const { values } = state.caseArea.editing;\r\n\r\n const newItemNo =\r\n childId || maxChildEntityId(values, parentPath, entityType) + 1;\r\n\r\n await dispatch(\r\n new AddDocumentItem(parentPath, entityType, newItemNo, {\r\n primaryKey: { value: newItemNo },\r\n ...initialValues\r\n })\r\n );\r\n\r\n if (defaultValues && defaultValues.length) {\r\n await Promise.all(\r\n defaultValues.map(async d => {\r\n const defaultValue = await defaultValueHandler(d.defaultValue, {\r\n utcOffset\r\n });\r\n\r\n // Check for undefined to support boolean values.\r\n defaultValue !== undefined &&\r\n dispatch(\r\n new ValueChange(\r\n [...parentPath, { [entityType]: newItemNo }],\r\n d.dataTag,\r\n [defaultValue]\r\n )\r\n );\r\n\r\n return d;\r\n })\r\n );\r\n }\r\n\r\n dispatch(actionCreators.requestImmediateSave());\r\n\r\n if (selectAddedItem) {\r\n const newItem = [...parentPath, { [entityType]: newItemNo }];\r\n\r\n dispatch(actionCreators.selectDocumentItem(newItem));\r\n }\r\n }),\r\n\r\n /**\r\n * Components asking to have a injected action callback for \"onDeleteDocumentItem\", ¨this is the action invoked.\r\n * Marks the entity as deleted in the store, awaitig next background save or submit\r\n */\r\n deleteDocumentItem: (\r\n selectParentItem: boolean = true,\r\n childItemPath: StoreItemPath[]\r\n ): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const path = [...childItemPath];\r\n await dispatch(new DeleteDocumentItem(path));\r\n\r\n dispatch(actionCreators.requestImmediateSave());\r\n\r\n // Select parent item, or fallback to current draft\r\n selectParentItem && dispatch(\r\n actionCreators.selectDocumentItem(childItemPath.slice(0, -1) || null)\r\n );\r\n }),\r\n\r\n /**\r\n * - Whenever rows are added in a table, or removed from a table,\r\n * the webclient should immediately run a background save (without waiting the normal 5 seconds for it).\r\n * - Whenever there is already a background save running,\r\n * there should be queued a new background save the moment the previous one finishes.\r\n */\r\n requestImmediateSave: (): ActionDispatching<any, any> => async (\r\n dispatch: any,\r\n getState: () => any\r\n ) => {\r\n dispatch(new RequestImmediateBackgroundSave());\r\n },\r\n\r\n /**\r\n * The ActionCreator passed to the middleware that handles background saving.\r\n * This actionCreator can only be called by the save middleware.\r\n */\r\n backgroundSave: (): ActionDispatching<any, any> => async (\r\n dispatch: any,\r\n getState: () => any\r\n ) => {\r\n debug('saving...');\r\n\r\n const handleDraftErrors = createErrorHandler(dispatch, getState);\r\n const state = getState().caseArea as UiState;\r\n const caseData = fromStore(state.editing.values);\r\n\r\n try {\r\n dispatch(new BeginBackgroundSave());\r\n\r\n const response = await api.saveDraft(\r\n caseData,\r\n state.editing.etag,\r\n !!state.editing.loadValidationMetadata\r\n );\r\n const draft = response.json.data;\r\n const etag = response.etag;\r\n\r\n const currentCaseContextId = getCaseContextIdStoreData(state.editing.values);\r\n const nextCaseContextId = getCaseContextId(draft);\r\n const caseType = getCaseTypeId(draft);\r\n if (currentCaseContextId !== nextCaseContextId) {\r\n // We need to load new ui definition\r\n const uiDef = await dispatch(responseCachingActionCreators.getUiDefinition(caseType, nextCaseContextId));\r\n dispatch(new ReceiveUiDefinition(uiDef));\r\n }\r\n\r\n dispatch(\r\n new BackgroundSaveComplete(toStore(draft), toMetadata(draft), etag)\r\n );\r\n } catch (error) {\r\n dispatch(new BackgroundSaveFailed(error));\r\n handleDraftErrors(error);\r\n }\r\n },\r\n\r\n changeViewMode: (mode: ViewMode): ActionDispatching<any, any> =>\r\n errorSafe((dispatch: any, getState: any) => {\r\n clientCache.setItem(viewModeCacheKey, mode);\r\n dispatch(new ChangeViewMode(mode));\r\n }),\r\n\r\n /**\r\n * An item in a child table of a case is selected by the user.\r\n * Ensure this is reflected in the state and routing\r\n */\r\n selectDocumentItem: (childItem: CompositeKeys): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const state = getState().caseArea;\r\n\r\n dispatch(new ChildItemSelection(childItem));\r\n\r\n // if there is no selection, fallback to the current case\r\n const draft = !childItem && [\r\n { tblTrans: getDraftId(state.editing.values) }\r\n ];\r\n const childOfCase = routeFromStoreItemPath(\r\n childItem || draft,\r\n RenderMode.edit\r\n );\r\n\r\n const { renderMode, uiDefinition } = getState().caseArea;\r\n const section = sectionFromStoreItemPath(\r\n childItem,\r\n renderMode,\r\n uiDefinition\r\n );\r\n\r\n navigate.toChildItem(childOfCase, section && section.id);\r\n }),\r\n\r\n /**\r\n * Sets the flag that submit is about to begin.\r\n * To handle pending background saves.\r\n */\r\n onSubmit: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new ChildItemSelection(null));\r\n navigate.toPrepareSubmit();\r\n dispatch(new BeginCaseSave());\r\n }),\r\n\r\n /**\r\n * Interupt editing by navigating away\r\n */\r\n onCancel: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const state: CaseState = getState().caseArea;\r\n const caseId = getCaseId(state.editing.values);\r\n\r\n const pendingConnectedDraft = getLocationOfInitiator(\r\n state.editing.connectedDrafts\r\n );\r\n if (pendingConnectedDraft) {\r\n replace(pendingConnectedDraft);\r\n return;\r\n }\r\n\r\n if (caseId) {\r\n navigate.toCaseView(caseId as any, true);\r\n } else {\r\n navigate.toStartupView(true);\r\n }\r\n }),\r\n\r\n /**\r\n * Delete the active draft document on server\r\n */\r\n deleteDraft: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const state = getState().caseArea;\r\n const draftData = state.editing.values;\r\n const draft = getDraftId(draftData);\r\n\r\n dispatch(new LeaveDraftEdit());\r\n const result = (await api.deleteDraft(draft, state.editing.etag)) as any;\r\n\r\n if (result && result.status === 204) {\r\n log(`Draft ${draft} deleted`);\r\n }\r\n }),\r\n\r\n /**\r\n * The actual submit process, after pending background saves has been handled\r\n *\r\n * This turns the draft into a saved Case, making changes avaliable to other users\r\n *\r\n *\r\n */\r\n submitDocument: (): ActionDispatching<any, ApplicationState> => async (\r\n dispatch: any,\r\n getState: () => ApplicationState\r\n ) => {\r\n dispatch(new RequestCaseSave());\r\n\r\n let state = getState().caseArea as UiState;\r\n const translate = createDescriptionSelector(state.texts);\r\n const handleDraftErrors = createErrorHandler(dispatch, getState);\r\n const editing = state.editing;\r\n const { utcOffset } = getState().app.settings;\r\n try {\r\n const draftId = getDraftId(state.editing.values);\r\n\r\n await loadDraft(dispatch, draftId, state);\r\n\r\n state = getState().caseArea as UiState;\r\n\r\n const domainMetadata = state.editing.metadata && state.editing.metadata.domains || {};\r\n\r\n const { hasErrors, hasWarnings } = resolveHasAnyValidations(domainMetadata);\r\n \r\n if (hasErrors) {\r\n dispatch(new ErrorNotification(translate(caseTranslations.message_case_error)));\r\n dispatch(new CaseSaveFailed());\r\n return;\r\n }\r\n\r\n if (hasWarnings && !state.editing.warningsConfirmed) { \r\n const warnings = resolveWarnings(domainMetadata); \r\n dispatch(new ShowConfirmWarnings(true, warnings));\r\n dispatch(new CaseSaveFailed());\r\n return;\r\n }\r\n\r\n const caseId = await api.submitCase({\r\n caseDraftId: draftId,\r\n utcOffset\r\n });\r\n\r\n const casePermissions = await api.permissions(caseId);\r\n\r\n if (!readAccessToSubmittedCase(caseId, casePermissions)) {\r\n const successText = translate(caseTranslations.message_case_success);\r\n const notAuthorizedText = translate(\r\n caseTranslations.message_not_authorized_to_read_case\r\n );\r\n notifyUser.success(`${successText} - ${notAuthorizedText || ''}`);\r\n }\r\n\r\n dispatch(new LeaveDraftEdit());\r\n\r\n if (draftWillBeConnected(state)) {\r\n const prevItem = editing.connectedDrafts.slice(-1)[0];\r\n await connectedCaseApi.addCaseConnection(\r\n prevItem.draftId,\r\n caseId,\r\n prevItem.connectionTypeId,\r\n prevItem.sequence\r\n );\r\n navigate.toConnectionInitiator(getLocationOfInitiator(editing.connectedDrafts));\r\n } else {\r\n navigate.toCaseView(caseId, true);\r\n }\r\n } catch (err) {\r\n handleDraftErrors(err, translate(caseTranslations.message_case_error));\r\n dispatch(\r\n new CaseSaveFailed()\r\n );\r\n }\r\n },\r\n\r\n /**\r\n * Confirms that the user accepts all warnings and wants to go on with the submit\r\n */\r\n confirmWarnings: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new ShowConfirmWarnings(false));\r\n dispatch(new WarningsConfirmed(true));\r\n dispatch(actionCreators.submitDocument());\r\n }),\r\n \r\n /**\r\n * User cancelled the submit from confirm warnings dialog. Go back to edit.\r\n */\r\n unconfirmWarnings: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new ShowConfirmWarnings(false));\r\n dispatch(new WarningsConfirmed(false));\r\n }), \r\n\r\n /**\r\n * Executes a function when background saving is completed.\r\n */\r\n doWhenIdle: (func: ()=>void, textSavingInfo: string): ActionDispatching<any, ApplicationState> => {\r\n\r\n const config = {hideProgressBar: false, autoClose: true};\r\n const toastMessage = toastFactory(config);\r\n toastMessage.dispatch(textSavingInfo);\r\n\r\n return whenIdle(async (dispatch: (action: Action) => void, getState: () => ApplicationState) => {\r\n toastMessage.close(); \r\n try { \r\n func(); \r\n toastMessage.close(); \r\n } catch (err) { \r\n dispatch(new ErrorNotification(err.message)); \r\n }\r\n });\r\n }\r\n};\r\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","import * as React from 'react';\r\nimport styles from './element-loader.scss';\r\n\r\nexport const ElementLoader = () => (\r\n <div className={styles.elementLoader}>\r\n <ul className={styles.elementLoading}>\r\n <li/>\r\n <li/>\r\n <li/>\r\n </ul>\r\n </div>\r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"slider-rating__visuallyhidden--YINsd\",\"focusable\":\"slider-rating__focusable--2s4aD\",\"box\":\"slider-rating__box--3lops\",\"container-spacer\":\"slider-rating__container-spacer--1i9AJ\",\"containerSpacer\":\"slider-rating__container-spacer--1i9AJ\",\"circle\":\"slider-rating__circle--3TysY\",\"bar-box\":\"slider-rating__bar-box--IfNPX\",\"barBox\":\"slider-rating__bar-box--IfNPX\",\"bar-segment\":\"slider-rating__bar-segment--1jU2I\",\"barSegment\":\"slider-rating__bar-segment--1jU2I\",\"active\":\"slider-rating__active--2KzyG\",\"line\":\"slider-rating__line--3TRUW\",\"caption-box\":\"slider-rating__caption-box--1g6_V\",\"captionBox\":\"slider-rating__caption-box--1g6_V\",\"caption-outer-box\":\"slider-rating__caption-outer-box--212b3\",\"captionOuterBox\":\"slider-rating__caption-outer-box--212b3\",\"caption\":\"slider-rating__caption--1IpX9\",\"boundary\":\"slider-rating__boundary--ED1d8\",\"break\":\"slider-rating__break--OXQwo\",\"inverse\":\"slider-rating__inverse--B2RG6\",\"tooltip-overwrite\":\"slider-rating__tooltip-overwrite--2oc9x\",\"tooltipOverwrite\":\"slider-rating__tooltip-overwrite--2oc9x\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"dnd__visuallyhidden--24pw3\",\"focusable\":\"dnd__focusable--bPBkD\",\"drop-box\":\"dnd__drop-box--2wBn-\",\"dropBox\":\"dnd__drop-box--2wBn-\",\"drag-tag-container\":\"dnd__drag-tag-container--2Pxla\",\"dragTagContainer\":\"dnd__drag-tag-container--2Pxla\",\"drag-tag\":\"dnd__drag-tag--1Faly\",\"dragTag\":\"dnd__drag-tag--1Faly\"};","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","import { StoreData } from 'app/types-shared';\r\nimport {\r\n getCaseData,\r\n getEntityContext\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getChildEntities } from 'app/infrastructure/store/query';\r\n\r\nexport const getChildEntitiesFromPath = (\r\n appState: any,\r\n uiEngineProps: any,\r\n levelsUp: number,\r\n tableName: string\r\n) => {\r\n const hostProps = uiEngineProps.hostProps();\r\n const caseState = appState[hostProps.statePath];\r\n const caseData: StoreData = getCaseData(caseState, uiEngineProps);\r\n const entityContext = getEntityContext(caseState, uiEngineProps);\r\n\r\n const path = !!levelsUp\r\n ? entityContext.path.slice(0, -levelsUp)\r\n : entityContext.path;\r\n\r\n return getChildEntities(caseData, path, tableName);\r\n};\r\n","import { \r\n RequestCaseEntityId, ReceiveCaseEntityId, FailRequestCaseEntityId, \r\n ReceiveConnectedCasePermissions, RequestConnectedCasePermissions } from './action-types';\r\nimport { api } from './api';\r\nimport { ActionDispatching, Entity, CasePermissions } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { ValueChange } from 'app/infrastructure/ui/form/action-types';\r\nimport { columnName, tableName } from 'app/area/case/case-data-model';\r\nimport { getEntityContext, getCaseData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getChildEntitiesFromPath } from 'app/area/case/features/resolvers';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport clone from 'clone';\r\nimport sortBy from 'lodash/sortby';\r\nimport { sequence } from 'app/area/case/features/connected-cases/sequence';\r\nimport { getAllEntitiesAtPath } from 'app/infrastructure/store';\r\nimport { CaseState } from 'app/area/case/types-store';\r\n\r\nconst findChangedConnections = (updatedConnections: Entity[], originalConnections: Entity[]) => {\r\n const changed = [];\r\n\r\n for(const connection of updatedConnections) {\r\n const newSeq = sequence(connection);\r\n if(newSeq !== sequence(originalConnections.find(c => deepEquals(c.id, connection.id)))) {\r\n changed.push(connection);\r\n }\r\n }\r\n\r\n return changed;\r\n};\r\n\r\nconst sortConnections = (connections: Entity[], direction: number) => {\r\n // Stable sort to preserve ordering beyond sequence.\r\n const sorted = sortBy(connections, c => sequence(c));\r\n\r\n if(direction > 0) {\r\n sorted.reverse();\r\n }\r\n\r\n return sorted;\r\n};\r\n\r\n/**\r\n * Works by swapping sequence with the next connection until the number of steps is reached.\r\n * Does nothing in the special case where the neighbour has the same sequence. \r\n * Deal with this by providing a step count that is one greater than the number of identical sequence neighbours in the direction of change.\r\n */\r\nexport const changeSequence = (appState: any, uiEngineProps: any, steps: number) => {\r\n\r\n if(steps === 0) {\r\n return [];\r\n }\r\n\r\n const direction = Math.sign(steps);\r\n const absSteps = Math.abs(steps);\r\n const resolveContext = getEntityContext(appState, uiEngineProps);\r\n const originalConnections = getChildEntitiesFromPath(appState, uiEngineProps, 1, tableName.connectedCases);\r\n\r\n // Sort connections on sequence and reverse if we are moving downwards.\r\n const updatedConnections = clone(sortConnections(originalConnections, direction)) as Entity[];\r\n\r\n // Since we sorted we can work in one direction from now on on the array.\r\n const currentIndex = () => updatedConnections.findIndex(c => deepEquals(c.id, resolveContext.path));\r\n const startingIndex = currentIndex();\r\n\r\n if(startingIndex === updatedConnections.length - 1) {\r\n // Already at the edge. Do nothing.\r\n return [];\r\n }\r\n\r\n const safeIndex = (index: number) => updatedConnections.length > index && index >= 0;\r\n const row = (index: number) => safeIndex(index) && updatedConnections[index];\r\n\r\n const setSequence = (index: number, newSequence: number) => \r\n updatedConnections[index][columnName[tableName.connectedCases].connectedSequence] = [{ value: newSequence }];\r\n \r\n let currIdx = currentIndex();\r\n\r\n while(safeIndex(currIdx + 1) && currIdx - startingIndex < absSteps) {\r\n const stepRow = row(currIdx + 1);\r\n \r\n // Swap with the next.\r\n const currentSequence = sequence(row(currIdx));\r\n let stepRowSequence = sequence(stepRow);\r\n\r\n // Tie-breaker. Clamp to 0 even if it means that two connections with the same 0 sequence cannot be swapped.\r\n if(currentSequence === stepRowSequence) {\r\n stepRowSequence = Math.max(0, stepRowSequence -= direction);\r\n }\r\n\r\n setSequence(currIdx, stepRowSequence);\r\n setSequence(currIdx + 1, currentSequence);\r\n \r\n // Move to avoid skipping index later.\r\n updatedConnections.splice(currIdx + 1, 0, updatedConnections.splice(currIdx, 1)[0]);\r\n\r\n currIdx = currentIndex();\r\n }\r\n\r\n return findChangedConnections(updatedConnections, originalConnections);\r\n};\r\n\r\nconst updateChanged = (dispatch: any, changedConnections: Entity[]) => {\r\n for(const connection of changedConnections) {\r\n const newSeq = sequence(connection);\r\n dispatch(new ValueChange(connection.id, columnName[tableName.connectedCases].connectedSequence, [{ value: newSeq }]));\r\n }\r\n};\r\n\r\nexport const connectedCaseActionCreators = {\r\n validateCaseId: (caseId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n try {\r\n dispatch(new RequestCaseEntityId(caseId));\r\n const entityId = await api.caseEntityId(caseId);\r\n dispatch(new ReceiveCaseEntityId(caseId, entityId));\r\n } catch {\r\n dispatch(new FailRequestCaseEntityId(caseId));\r\n }\r\n },\r\n changeConnectionSequence: (uiEngineProps: any, steps: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const appState = getState();\r\n const changed = changeSequence(appState, uiEngineProps, steps);\r\n updateChanged(dispatch, changed);\r\n }),\r\n getPermissions: (uiEngineProps: any): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const appState = getState();\r\n const caseState = appState.caseArea as CaseState;\r\n\r\n const connectedCaseIds = getAllEntitiesAtPath(\r\n getCaseData(caseState, uiEngineProps), \r\n [tableName.trans, tableName.connectionTypes, tableName.connectedCases]\r\n )\r\n .map(e => e.primaryKey.value);\r\n \r\n const ids = connectedCaseIds.filter(id =>\r\n (\r\n !caseState.stateForCaseIds ||\r\n !caseState.stateForCaseIds[id] ||\r\n (\r\n caseState.stateForCaseIds && \r\n caseState.stateForCaseIds[id] && \r\n !caseState.stateForCaseIds[id].fetchingPermissions &&\r\n !caseState.stateForCaseIds[id].permissions\r\n )\r\n )\r\n );\r\n\r\n if (!ids || ids.length === 0) {\r\n return;\r\n }\r\n\r\n dispatch(new RequestConnectedCasePermissions(ids));\r\n\r\n const [casePermissions, bowtieSupported] = await Promise.all([\r\n api.casePermissions(ids),\r\n api.bowtieSupported(ids)\r\n ]);\r\n \r\n const permissions = ids.reduce((result, id) => {\r\n const permission = casePermissions.find(p => p.caseId === id);\r\n const bowtie = bowtieSupported.find(p => p.caseId === id);\r\n return {\r\n ...result,\r\n [id]: {\r\n ...permission,\r\n bowtie: !!bowtie && bowtie.supported\r\n }\r\n };\r\n }, {} as {[id: number]: CasePermissions});\r\n \r\n dispatch(new ReceiveConnectedCasePermissions(permissions));\r\n })\r\n };\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { connect } from 'react-redux';\r\nimport { connectedCaseActionCreators } from './actions';\r\nimport { ConnectedCasesTileViewProps, ConnectedCasesTileProps } from 'app/area/case/components';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport { getEntityContext } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getChildEntitiesFromPath } from 'app/area/case/features/resolvers';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { sequence, maxSequenceEntity, minSequenceEntity } from 'app/area/case/features/connected-cases/sequence';\r\nimport * as React from 'react';\r\n\r\nexport const withConnectedCases = (component: any, uiEngineProps: any) => {\r\n\r\n const stateToProps = (appState: ApplicationState): Partial<ConnectedCasesTileViewProps> => {\r\n const connections = getChildEntitiesFromPath(appState, uiEngineProps, 0, tableName.connectedCases);\r\n const maxSeq = maxSequenceEntity(connections);\r\n\r\n return {\r\n maxSequence: sequence(maxSeq),\r\n stateForCaseIds: appState.caseArea.stateForCaseIds\r\n };\r\n };\r\n\r\n const dispatchToProps = (dispatch: any): Partial<ConnectedCasesTileViewProps> => {\r\n return {\r\n validateCaseId: (caseId: number) => \r\n dispatch(connectedCaseActionCreators.validateCaseId(caseId))\r\n };\r\n };\r\n\r\n return connect<any, any, any>(stateToProps, dispatchToProps)(component);\r\n};\r\n\r\nexport const withConnectionSequenceUpdate = (component: any, uiEngineProps: any) => {\r\n \r\n const stateToProps = (appState: ApplicationState): Partial<ConnectedCasesTileProps> => {\r\n\r\n const connections = getChildEntitiesFromPath(appState, uiEngineProps, 1, tableName.connectedCases);\r\n const maxSeq = maxSequenceEntity(connections);\r\n const minSeq = minSequenceEntity(connections);\r\n const resolveContext = getEntityContext(appState, uiEngineProps);\r\n\r\n const connection = connections.find(c => deepEquals(c.id, resolveContext.path));\r\n return {\r\n enabledConnectionOperations: {\r\n moveUp: sequence(minSeq) !== sequence(connection),\r\n moveDown: sequence(maxSeq) !== sequence(connection)\r\n }\r\n };\r\n };\r\n\r\n const dispatchToProps = (dispatch: any): Partial<ConnectedCasesTileProps> => {\r\n return { \r\n // TODO: When implementing drag and drop support, it should be possible to calculate the number of steps\r\n // and pass that in to the action creator.\r\n moveConnectionUp: (steps: number) => \r\n dispatch(connectedCaseActionCreators.changeConnectionSequence(uiEngineProps, steps)),\r\n moveConnectionDown: (steps: number) => \r\n dispatch(connectedCaseActionCreators.changeConnectionSequence(uiEngineProps, -steps))\r\n };\r\n };\r\n\r\n return connect<any, any, any>(stateToProps, dispatchToProps)(component);\r\n};\r\n\r\ninterface ConnectedCasePermissionsProps {\r\n getPermissions: () => void;\r\n}\r\n\r\nexport const withConnectedCasePermissions = (Component: any, uiEngineProps: any) => {\r\n class ConnectedCasePermissions extends React.Component<ConnectedCasePermissionsProps> {\r\n public componentDidMount() {\r\n this.props.getPermissions && this.props.getPermissions();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.props.getPermissions && this.props.getPermissions();\r\n }\r\n\r\n public render() {\r\n const { getPermissions, ...rest } = this.props;\r\n return <Component {...rest} />;\r\n }\r\n }\r\n\r\n const dispatchToProps = (dispatch: any) => {\r\n return { \r\n getPermissions: () => dispatch(connectedCaseActionCreators.getPermissions(uiEngineProps))\r\n };\r\n };\r\n\r\n return connect<any, any, any>(undefined, dispatchToProps)(ConnectedCasePermissions);\r\n};\r\n","import { getPrimaryEntityId } from 'app/infrastructure/store/entity';\r\nimport { Entity, ComplexValue } from 'app/types-shared';\r\nimport { getValue } from 'app/infrastructure/ui/form/selectors';\r\nimport { columnName, tableName } from 'app/area/case/case-data-model';\r\n\r\nconst tableObject = columnName[tableName.object];\r\n\r\nexport function entityRowsSelector(entities: Entity[]) {\r\n return entities.map((entity) => {\r\n return {\r\n id: getPrimaryEntityId(entity),\r\n name: getValue(entity, tableObject.docName).value as string,\r\n title: getValue(entity, tableObject.title).value as string,\r\n blobId: getValue(entity, tableObject.blob).value as number,\r\n type: getValue(entity, tableObject.contentType).value as string,\r\n size: getValue(entity, tableObject.size).value as number,\r\n thumbnailSize: getValue(entity, tableObject.thumbnailSize).value as number,\r\n attachedBy: getValue(entity, tableObject.attachedBy).valueItem as ComplexValue<number>,\r\n attachedAt: getValue(entity, tableObject.attachedAt).value as Date,\r\n mainImage: getValue(entity, tableObject.mainImage).value === 1\r\n };\r\n });\r\n}\r\n","import { actionCreators as draftActionCreators } from 'app/area/case/draft/actions';\r\nimport { getEntityContext, contextToStorePath } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { tableName, columnName } from 'app/area/case/case-data-model';\r\nimport { getChildEntitiesFromPath } from 'app/area/case/features/resolvers';\r\nimport { entityRowsSelector } from 'app/area/case/features/file-upload/selectors';\r\n\r\nfunction selectFromState(state: any, uiEngineProps: any) {\r\n const hostProps = uiEngineProps.hostProps();\r\n const caseState = state[uiEngineProps.hostProps().statePath];\r\n const context = getEntityContext(caseState, uiEngineProps);\r\n\r\n return {\r\n state,\r\n hostProps,\r\n caseState,\r\n context\r\n };\r\n}\r\n\r\n// These can probably be replaced with the default ui-engine actionCreators\r\nexport const actionCreators = {\r\n addAttachment: (uiEngineProps, blobId, title) =>\r\n (dispatch: any, getState: any) => {\r\n const {\r\n context\r\n } = selectFromState(getState(), uiEngineProps);\r\n\r\n //TODO: use caseData model constants\r\n const initialValues = {\r\n 'AtchDocTitle': [{ value: title }],\r\n 'AtchDocObjectBlob': [{ value: blobId }]\r\n };\r\n\r\n const parentPath = contextToStorePath(uiEngineProps.componentDescriptor, context);\r\n\r\n dispatch(draftActionCreators.addDocumentItem(parentPath, tableName.object, false, { initialValues }));\r\n },\r\n\r\n deleteAttachment: (uiEngineProps, id) =>\r\n (dispatch: any, getState: any) => {\r\n const {\r\n context\r\n } = selectFromState(getState(), uiEngineProps);\r\n\r\n const storePath =\r\n [\r\n ...contextToStorePath(uiEngineProps.componentDescriptor, context),\r\n {[tableName.object]: id}\r\n ];\r\n\r\n dispatch(draftActionCreators.deleteDocumentItem(true, storePath));\r\n },\r\n\r\n updateAttachmentTitle: (uiEngineProps, id, title) =>\r\n (dispatch: any, getState: any) => {\r\n const {\r\n context\r\n } = selectFromState(getState(), uiEngineProps);\r\n\r\n const storePath =\r\n [\r\n ...contextToStorePath(uiEngineProps.componentDescriptor, context),\r\n {[tableName.object]: id}\r\n ];\r\n\r\n dispatch(\r\n draftActionCreators.valueChanged(\r\n storePath,\r\n (columnName[tableName.object] as { title: string }).title,\r\n [{ value: title }]\r\n ));\r\n },\r\n setMainAttachmentImage: (uiEngineProps, id) =>\r\n (dispatch: any, getState: any) => {\r\n const state = getState();\r\n const { context } = selectFromState(state, uiEngineProps);\r\n\r\n const entities = getChildEntitiesFromPath(state, uiEngineProps, 0, tableName.object);\r\n\r\n const rows = entityRowsSelector(entities);\r\n\r\n const currentMainImages = rows.filter(item => item.mainImage);\r\n\r\n const updateImage = (imageId: number, value) => {\r\n const storePath = [\r\n ...contextToStorePath(uiEngineProps.componentDescriptor, context),\r\n {[tableName.object]: imageId}\r\n ];\r\n\r\n dispatch(\r\n draftActionCreators.valueChanged(\r\n storePath,\r\n (columnName[tableName.object]).mainImage,\r\n [{ value: value }]\r\n ));\r\n };\r\n\r\n currentMainImages.forEach(item => {\r\n updateImage(item.id, 0);\r\n });\r\n\r\n updateImage(id, 1);\r\n }\r\n};\r\n","export const endpoint = {\r\n uploadFor: (id:number) => `/case/draft/${id}/document`\r\n};\r\n","import { entityRowsSelector } from './selectors';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { createDownloader } from 'app/infrastructure/platform/browser';\r\nimport { fetchAttachment } from 'app/infrastructure/remote-data/http';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\nimport { UploadedFile } from './file-upload';\r\nimport { connect } from 'react-redux';\r\nimport { tableName } from '../../case-data-model';\r\nimport { getChildEntitiesFromPath } from 'app/area/case/features/resolvers';\r\n\r\nexport interface FileDownloadContainerProps {\r\n uploadedFiles?: UploadedFile[];\r\n createDownloader?: (blobId: number, name: string) => Promise<void>;\r\n loadBlob?: (blobId: number, thumbnail?: boolean) => Promise<Blob>;\r\n}\r\n\r\nexport const withFileDownload = (component: any, uiEngineProps: any) => {\r\n const stateToProps = (state: ApplicationState): Partial<FileDownloadContainerProps> => {\r\n const entities = getChildEntitiesFromPath(state, uiEngineProps, 0, tableName.object);\r\n\r\n const rows = entityRowsSelector(entities);\r\n\r\n return {\r\n uploadedFiles: rows.sort((a, b) => b.id - a.id)\r\n };\r\n };\r\n\r\n const dispatchToProps = (dispatch: any): Partial<FileDownloadContainerProps> => {\r\n const hostProps = uiEngineProps.hostProps();\r\n const isEditing = !!uiEngineProps.editing;\r\n const id = isEditing ? hostProps.entityId : hostProps.caseNumber;\r\n const documentUrl = endpoint.document(isEditing, id);\r\n\r\n return {\r\n createDownloader: createDownloader(documentUrl),\r\n loadBlob: fetchAttachment(documentUrl)\r\n };\r\n };\r\n\r\n return connect<any, any, any>(stateToProps, dispatchToProps)(component);\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { connect } from 'react-redux';\r\nimport { RiskMatrixProps } from 'app/components/risk-matrix';\r\nimport { transformToComponentFormat, preselectedRiskMatrixValues } from 'app/area/case/features/risk-matrix/risk-matrix-definition';\r\nimport { actionCreators } from 'app/area/case/draft/actions';\r\n\r\nconst getDefinitionFromStore = (state: ApplicationState, uiEngineProps: any) => {\r\n const hostProps = uiEngineProps && uiEngineProps.hostProps();\r\n const applicationId = hostProps.applicationId;\r\n return state[uiEngineProps.statePath].riskMatrixDefinitions[applicationId];\r\n};\r\n\r\nexport const withRiskMatrix = (component: any, uiEngineProps: any) => {\r\n\r\n const stateToProps = (state: ApplicationState): Partial<RiskMatrixProps> => {\r\n const storeDefinition = getDefinitionFromStore(state, uiEngineProps);\r\n\r\n const definition = transformToComponentFormat(storeDefinition, uiEngineProps);\r\n return {\r\n riskMatrixDefinition: definition,\r\n preselectedValues: preselectedRiskMatrixValues(state[uiEngineProps.statePath], uiEngineProps, definition)\r\n };\r\n };\r\n \r\n const dispatchToProps = (dispatch: any): Partial<RiskMatrixProps> => {\r\n const dataPath = uiEngineProps.resolveContext.path;\r\n const changeAxisValue = (v: number, axisCodetableId: number) => {\r\n const immediateSave = uiEngineProps.componentDescriptor.properties \r\n && uiEngineProps.componentDescriptor.properties.immediateSaveOnValueChange;\r\n const axisComponent = uiEngineProps.componentDescriptor.children.find(c => c.codetable === axisCodetableId);\r\n dispatch(actionCreators.valueChanged(dataPath, axisComponent.dataTag, [{ value: v}], !!immediateSave));\r\n return;\r\n };\r\n\r\n return {\r\n onSelectedXChanged: changeAxisValue,\r\n onSelectedYChanged: changeAxisValue\r\n };\r\n };\r\n\r\n return connect<any, any, any>(stateToProps, dispatchToProps)(component);\r\n};\r\n","\r\nconst DOMAIN_NO_RECEIVERS_TO = 8942;\r\n\r\nexport const endpoint = {\r\n usersWithEmail: ({caseId, query}) => `/case/${caseId}/field/${DOMAIN_NO_RECEIVERS_TO}/options/emailaddress${ query ? '/search' : ''}`,\r\n shareDocument: ({caseId}) => `/case/${caseId}/emails`\r\n};\r\n\r\nexport const translations = {\r\n share_case: 8064,\r\n share_case_by_email: 8065,\r\n select_users_info: 8066,\r\n recipients: 8067,\r\n message_to_receiver: 8068,\r\n cancel: 3273,\r\n send: 5863,\r\n case_was_shared: 8074,\r\n share_failed: 8075,\r\n no_user_email_exists: 8082,\r\n go_to_profile: 8083,\r\n external_recipients: 8289,\r\n \r\n textClose: 4329,\r\n textOptionsDone: 7338,\r\n textOptionsLoadError: 7524,\r\n textOptionsNotFound: 7644,\r\n textOptionsTitle: 7344,\r\n textSelectFromList: 7343,\r\n textSuggestions: 7346\r\n};\r\n","import { connect} from 'react-redux';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { mapPropsFromTranslations } from 'app/infrastructure/redux/container-factory';\r\nimport { translations } from './constants';\r\nimport { ShareCaseConfig, ShareCaseArgs } from './types';\r\n\r\nexport const withSharing = (config:ShareCaseConfig) => (component: any, uiEngineProps: ConnectedComponentProps) => {\r\n const path = uiEngineProps.hostProps().statePath; \r\n\r\n const mapStateToProps = (state:ApplicationState) => ({\r\n translate: mapPropsFromTranslations(translations, state[path]),\r\n url: uiEngineProps.url,\r\n userEmail: state.app.userInfo.email\r\n });\r\n\r\n const mapDispatchToProps = () => ({ \r\n getUsers: config.getUsers,\r\n shareDocument: async (args: ShareCaseArgs, translate) => config.shareDocument(uiEngineProps, args, translate)\r\n });\r\n\r\n return connect(mapStateToProps, mapDispatchToProps)(component);\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data';\r\nimport { ApiResponse } from 'app/types-shared';\r\nimport { endpoint } from './constants';\r\nimport { ShareCaseArgs } from './types';\r\n\r\nexport const api = {\r\n getUsersForShareLink: async(caseId: number, query?:string) => {\r\n const response = await new RemoteData(endpoint.usersWithEmail({caseId, query})).resource<ApiResponse<any>>().filter({query}).all();\r\n return response.data;\r\n },\r\n shareDocument: async(args: ShareCaseArgs) => new RemoteData(endpoint.shareDocument(args)).resource<any>().create([{\r\n recipients: args.recipients,\r\n message: args.message,\r\n linkPath: args.linkPath\r\n }]) \r\n};\r\n","import { ShareCaseConfig, ShareCaseArgs } from './types';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport { api } from './api';\r\nimport { error } from 'app/infrastructure/log';\r\nimport { getUserMessage } from 'app/infrastructure/notifications/user-messages/get-user-message';\r\n\r\nexport const SharePreset: {[key:string]: ShareCaseConfig} = {\r\n \r\n case: {\r\n \r\n getUsers: async (\r\n caseNumber: number, \r\n filterText?: string\r\n ) => {\r\n try {\r\n return await api.getUsersForShareLink(caseNumber, filterText);\r\n }\r\n catch (err) {\r\n notifyUser.error( getUserMessage(err.userMessages) );\r\n return [];\r\n }\r\n },\r\n\r\n shareDocument: async (\r\n props: ConnectedComponentProps & {caseNumber: number},\r\n args: Partial<ShareCaseArgs>,\r\n translate: {[key:string]:string}\r\n ) => { \r\n try{\r\n await api.shareDocument({\r\n caseId: props.caseNumber,\r\n linkPath: routeConstants.caseViewFor(props.caseNumber),\r\n message: args.message,\r\n recipients: args.recipients\r\n }); \r\n notifyUser.success(translate.case_was_shared);\r\n }catch (err){\r\n error(err); \r\n notifyUser.error( getUserMessage(err.userMessages) || translate.share_failed);\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n","import { createDownloader } from 'app/infrastructure/platform/browser';\r\nimport { connect } from 'react-redux';\r\nimport { endpoint as caseEndpoint } from 'app/area/case/endpoints';\r\n\r\nexport interface CaseLogDownloadContainerProps { \r\n createDownloader?: (blobId: number, name: string) => Promise<void>; \r\n}\r\n\r\nexport const withCaseLogDownload = (component: any, uiEngineProps: any) => {\r\n \r\n const dispatchToProps = (): Partial<CaseLogDownloadContainerProps> => {\r\n const hostProps = uiEngineProps.hostProps();\r\n const isEditing = !!uiEngineProps.editing;\r\n const id = isEditing ? hostProps.entityId : hostProps.caseNumber; \r\n const caseLogUrl = caseEndpoint.caseLog(isEditing, id);\r\n \r\n return {\r\n createDownloader: createDownloader(caseLogUrl)\r\n };\r\n };\r\n\r\n return connect<any, any, any>(dispatchToProps)(component);\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/index';\r\nimport { endpoint as favouriteEndpoint } from 'app/area/favourite/constants';\r\n\r\nexport const api = {\r\n\r\n createSearchForCasesToConnect: async (caseDraftId: number, connectionTypeId: number): Promise<number> => {\r\n const result = await new RemoteData(`${favouriteEndpoint.connectedCasesFavouriteDefinition}`)\r\n .resource<any>()\r\n .filter({\r\n caseDraftId,\r\n connectionTypeId\r\n })\r\n .create(undefined);\r\n const obj = await result.json();\r\n return obj.data;\r\n }\r\n\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { ConnectedCasesTileViewProps } from 'app/area/case/components';\r\nimport { api } from 'app/area/case/features/search-cases/api';\r\nimport { actionCreators as draftActionCreators } from 'app/area/case/draft/actions';\r\nimport { whenIdle } from 'app/infrastructure/redux/when-idle';\r\nimport { debug } from 'app/infrastructure/log';\r\n\r\nexport const withSearchCasesToConnect = (component: any, uiEngineProps: any) => {\r\n const dispatchToProps = (dispatch: any): Partial<ConnectedCasesTileViewProps> => {\r\n return {\r\n createSearchForCasesToConnect: async (caseDraftId: number, connectionTypeId: number) => {\r\n debug('createSearchForCasesToConnect', 'Saving..');\r\n dispatch(draftActionCreators.requestImmediateSave());\r\n return await dispatch(\r\n whenIdle(async (_: any, getState: any) => {\r\n debug('createSearchForCasesToConnect', 'Done saving.');\r\n return api.createSearchForCasesToConnect(caseDraftId, connectionTypeId);\r\n })\r\n );\r\n }\r\n };\r\n };\r\n\r\n return connect<any, any, any>(\r\n undefined,\r\n dispatchToProps\r\n )(component);\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/index';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\nimport { SearchExternalSearchCondition, SearchExternalResultValue } from 'app/area/case/types-store';\r\n\r\nexport const api = {\r\n searchExternalProvider: async (caseDraftId: number, domainId: number, searchParameters: SearchExternalSearchCondition[]):\r\n Promise<SearchExternalResultValue[][]> => {\r\n const response = await new RemoteData(`${endpoint.draft}/${caseDraftId}/field/${domainId}/externalData/search`)\r\n .resource<any>()\r\n .create({ conditions: searchParameters }, false);\r\n \r\n const obj = await response.json();\r\n return obj.data.items;\r\n }\r\n};\r\n","import { Entity } from 'app/types-shared';\r\n\r\nexport const selectEntityFieldValues = (entity: Entity): { dataTag: string, value: string }[] => \r\n Object\r\n .keys(entity)\r\n .filter(dataTag => \r\n dataTag !== 'id' && entity[dataTag] && entity[dataTag][0] &&\r\n entity[dataTag][0].value !== undefined && entity[dataTag][0].value !== null &&\r\n entity[dataTag][0].value !== '')\r\n .map(dataTag => (\r\n { \r\n dataTag, \r\n value: entity[dataTag][0].value.toString() \r\n })\r\n );\r\n","import { api } from 'app/area/case/features/search-external-provider/api';\r\nimport { debug } from 'app/infrastructure/log';\r\nimport { whenIdle } from 'app/infrastructure/redux';\r\nimport { actionCreators as draftActionCreators } from 'app/area/case/draft/actions';\r\nimport { getEntityContext, getCaseData } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getById } from 'app/infrastructure/store/query';\r\nimport {\r\n RequestSearchExternalProvider,\r\n ReceiveSearchExternalProvider,\r\n FailSearchExternalProvider,\r\n ClearSearchExternalProviderResults\r\n} from './action-types';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { selectEntityFieldValues } from 'app/area/case/features/search-external-provider/selectors';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { SearchExternalResultValue } from 'app/area/case/types-store';\r\n\r\nconst executeSearch = async (dispatch: any, getState: () => ApplicationState, uiEngineProps: ConnectedComponentProps) => {\r\n debug('searchExternalProvider', 'Done saving.');\r\n\r\n const appState = getState();\r\n const caseState = appState[uiEngineProps.hostProps().statePath];\r\n const caseData = getCaseData(caseState, uiEngineProps);\r\n const resolveContext = getEntityContext(appState, uiEngineProps);\r\n const entity = getById(caseData, resolveContext.path);\r\n\r\n const caseDraftId = resolveContext.path[0].tblTrans;\r\n const domainId = uiEngineProps.componentDescriptor.id;\r\n const entityFieldValues = selectEntityFieldValues(entity);\r\n const properties = uiEngineProps.componentDescriptor.properties;\r\n const inputFields = properties.dataProviderInputFields as string;\r\n let searchConditions = [];\r\n if (inputFields) {\r\n const requiredFields = inputFields.split(',').map(r => r.trim());\r\n searchConditions = entityFieldValues.filter(v => requiredFields.some(r => v.dataTag === r));\r\n }\r\n\r\n if (searchConditions.length === 0) {\r\n return;\r\n }\r\n\r\n debug('searchExternalProvider', 'Executing search..');\r\n try {\r\n dispatch(new RequestSearchExternalProvider(caseDraftId, domainId, searchConditions));\r\n const result = await api.searchExternalProvider(caseDraftId, domainId, searchConditions);\r\n dispatch(new ReceiveSearchExternalProvider(caseDraftId, domainId, result));\r\n } catch (error) {\r\n if (error && error.status === 400) {\r\n dispatch(\r\n new FailSearchExternalProvider(\r\n caseDraftId,\r\n domainId,\r\n (properties && properties.textInvalidSearchKeys) || error\r\n )\r\n );\r\n } else {\r\n dispatch(\r\n new FailSearchExternalProvider(caseDraftId, domainId, (properties && properties.textGeneralError) || error)\r\n );\r\n }\r\n }\r\n debug('searchExternalProvider', 'Done executing search..');\r\n};\r\n\r\nexport const searchExternalProvider = (uiEngineProps: ConnectedComponentProps) => async (\r\n dispatch: any,\r\n getState: () => ApplicationState\r\n) => {\r\n debug('searchExternalProvider', 'Saving..');\r\n dispatch(draftActionCreators.requestImmediateSave());\r\n\r\n return await dispatch(\r\n whenIdle(async () =>\r\n await executeSearch(dispatch, getState, uiEngineProps)\r\n )\r\n );\r\n};\r\n\r\nexport const clearResults = () => new ClearSearchExternalProviderResults();\r\n\r\nexport const setValuesFromResult = (\r\n uiEngineProps: ConnectedComponentProps,\r\n result: SearchExternalResultValue[]\r\n) => async (dispatch: any, getState: () => ApplicationState) => {\r\n const appState = getState();\r\n const resolveContext = getEntityContext(appState, uiEngineProps);\r\n\r\n for (const v of result) {\r\n dispatch(draftActionCreators.valueChanged(resolveContext.path, v.dataTag, [{ value: v.value }]));\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { LoadOptions, Options } from 'ui';\r\n\r\n/**\r\n * Includes the Not Selected code in calls to load options.\r\n */\r\nexport function withNotSelectedOptionIncluded<P extends Partial<Options<any>>>(\r\n WrappedComponent: React.ComponentClass<P>\r\n): React.ComponentClass<P> {\r\n return class extends React.Component<P> {\r\n private onLoadOptions = (options: LoadOptions): void => {\r\n if (this.props.onLoadOptions) {\r\n this.props.onLoadOptions({ displayNotSelected: true, ...options });\r\n }\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent {...this.props} {...{onLoadOptions: this.onLoadOptions}} />;\r\n }\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport { ValueProperty } from 'app/types-shared';\r\nimport { Options, LoadOptions } from 'ui';\r\n\r\nexport interface LoadOptionsProps {\r\n sortDirection?: 'asc' | 'desc';\r\n displayNotSelected?: boolean;\r\n}\r\n\r\n/**\r\n * Loads options after component is mounted.\r\n */\r\nexport const withOptionLoading = <TOptionValue extends ValueProperty> () => <TProps extends Options<TOptionValue> & LoadOptionsProps>(\r\n WrappedComponent: React.ComponentClass<TProps>\r\n): React.ComponentClass<TProps> => {\r\n return class extends React.Component<TProps> {\r\n public componentDidMount() {\r\n const loadOptions : LoadOptions = {\r\n sort: this.props.sortDirection,\r\n displayNotSelected: this.props.displayNotSelected\r\n };\r\n\r\n !this.props.options && this.props.onLoadOptions(loadOptions);\r\n }\r\n\r\n public render() {\r\n return (\r\n <WrappedComponent {...this.props} />\r\n );\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport get from 'lodash/get';\r\nimport { isNumber } from 'util';\r\n\r\nexport function withHideIfPropValueNotInVisibleForValues<P>(valuePropName: string) {\r\n return (\r\n WrappedComponent: React.ComponentClass<P> | React.SFC<P>\r\n ): React.ComponentClass<P> => {\r\n return class extends React.Component<P & { visibleForValues: number[] }> {\r\n \r\n public render() {\r\n const { visibleForValues } = this.props;\r\n\r\n const value = get(this.props, valuePropName);\r\n\r\n const isVisible = !visibleForValues || !isNumber(value) ||\r\n (value && String(visibleForValues).split(',').findIndex(ct => Number(ct) === value) > -1);\r\n\r\n return isVisible ? \r\n <WrappedComponent {...this.props} /> \r\n : null;\r\n }\r\n };\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport { LoadOptions, Options, ComplexValue } from 'ui';\r\n\r\n/**\r\n * Includes the primary key as iterator id in calls to load options.\r\n */\r\nexport function withPrimaryKeyAsOptionIteratorId<P extends Partial<Options<any> & { primaryKey: ComplexValue<number> }>>(\r\n WrappedComponent: React.ComponentClass<P>\r\n): React.ComponentClass<P> {\r\n return class extends React.Component<P> {\r\n private onLoadOptions = (options: LoadOptions): void => {\r\n if (this.props.onLoadOptions) {\r\n const { primaryKey } = this.props;\r\n this.props.onLoadOptions({ iteratorId: primaryKey && primaryKey.value, ...options });\r\n }\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent {...this.props} {...{onLoadOptions: this.onLoadOptions}} />;\r\n }\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport { LoadOptions, Options, ComplexValue } from 'ui';\r\n\r\n/**\r\n * Includes the primary key as category id in calls to load options.\r\n */\r\nexport function withPrimaryKeyAsOptionCategoryId<P extends Partial<Options<any> & { primaryKey: ComplexValue<number> }>>(\r\n WrappedComponent: React.ComponentClass<P>\r\n): React.ComponentClass<P> {\r\n return class extends React.Component<P> {\r\n private onLoadOptions = (options: LoadOptions): void => {\r\n if (this.props.onLoadOptions) {\r\n const { primaryKey } = this.props;\r\n this.props.onLoadOptions({ categoryId: primaryKey && primaryKey.value, ...options });\r\n }\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent {...this.props} {...{onLoadOptions: this.onLoadOptions}} />;\r\n }\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport get from 'lodash/get';\r\n\r\n/**\r\n * Inserts a field using the @param`fieldName` as key, with the object returned \r\n * from @param`valuePropertyPath` as the fields value when onAddDocumentItem is called.\r\n * \r\n * This supports the pattern where rows are filtered based on their category.\r\n */\r\nexport const withRowFieldInitialValue = (fieldName: string, valuePropertyPath: string) => <P extends { \r\n onAddDocumentItem: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void \r\n}>(\r\n WrappedComponent: React.ComponentClass<P>\r\n): React.ComponentClass<P> => {\r\n return class extends React.Component<P> {\r\n private onAddDocumentItem = (selectAddedItem?: boolean, options: AddDocumentItemOptions = {}) => {\r\n const value = get(this.props, valuePropertyPath);\r\n\r\n const initialValues = fieldName && value && { \r\n ...(options && options.initialValues),\r\n [fieldName]: [{ value }]\r\n };\r\n\r\n this.props.onAddDocumentItem(selectAddedItem, {\r\n ...options, \r\n initialValues: initialValues || options.initialValues\r\n });\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent {...this.props} {...{onAddDocumentItem: this.onAddDocumentItem}} />;\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { LinkContextProvider } from 'app/components/contexts/link-context';\r\n\r\nexport function withLink<P>(WrappedComponent: React.ComponentClass<P> | React.SFC<P>) {\r\n return (props) => (\r\n props.url ?\r\n <Link to={props.url}>\r\n <LinkContextProvider value={true}>\r\n <WrappedComponent {...props}/>\r\n </LinkContextProvider>\r\n </Link>\r\n : <WrappedComponent {...props} />\r\n );\r\n }\r\n","import * as React from 'react';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { openPrintDialog } from 'app/infrastructure/platform';\r\nimport { AuthState } from 'app/types-shared';\r\nimport get from 'lodash/get';\r\n\r\nexport function withPrint<P>(){\r\n return (\r\n WrappedComponent: React.ComponentClass<P> | React.SFC<P>\r\n ) => {\r\n\r\n return class extends React.Component<P & { url: string, print: boolean }> {\r\n private ref:React.RefObject<HTMLDivElement> = React.createRef();\r\n\r\n public addListeners () {\r\n window.addEventListener('keydown', this.handleKeyboardEvent);\r\n }\r\n\r\n public removeListeners () {\r\n window.removeEventListener('keydown', this.handleKeyboardEvent);\r\n }\r\n\r\n private handleKeyboardEvent = (e:KeyboardEvent) => {\r\n if ((e.metaKey || e.ctrlKey) && e.keyCode === 80 && get(this.props, 'sharedState.authState') as AuthState !== AuthState.Anonymous) {\r\n const {url} = this.props;\r\n\r\n e.preventDefault();\r\n navigate.toPrintCaseView(url);\r\n }\r\n }\r\n\r\n public componentDidMount () {\r\n const { print } = this.props;\r\n\r\n if (print) {\r\n const loadingImages = document.querySelectorAll('.image-loading');\r\n let loading = loadingImages.length;\r\n const config = {childList: true, subtree:true};\r\n\r\n const call = (_, observer) => {\r\n loading--;\r\n observer.disconnect();\r\n if (loading === 0) {\r\n openPrintDialog();\r\n }\r\n };\r\n\r\n loadingImages.forEach(placeholder => {\r\n const observer = new MutationObserver(call);\r\n observer.observe(placeholder.parentElement, config);\r\n });\r\n\r\n if(loading === 0) {\r\n openPrintDialog();\r\n }\r\n } else {\r\n this.addListeners();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.removeListeners();\r\n }\r\n\r\n public render() {\r\n if (this.props.print) {\r\n return <div ref={this.ref}><WrappedComponent ref={this.ref} {...this.props} /></div>;\r\n }\r\n\r\n return <WrappedComponent ref={this.ref} {...this.props} />;\r\n }\r\n };\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport set from 'lodash/set';\r\n\r\nexport function withProperty<P extends object>(propertyPath: string, value: Date | string | number | boolean | Function ) {\r\n\r\n return (WrappedComponent: React.ComponentClass<P> | React.SFC<P>) => {\r\n return (props) => {\r\n const modifiedProps: P = {...props};\r\n set(modifiedProps, propertyPath, value);\r\n return <WrappedComponent { ...modifiedProps } />;\r\n };\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { ComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { scrollToTopAlways } from 'app/infrastructure/platform/routing';\r\nimport {\r\n RenderSectionProps,\r\n SectionPager\r\n} from 'app/components/section-pager/section-pager';\r\n\r\nexport interface ActiveSectionRenderProps extends ComponentProps {\r\n expandAll: boolean;\r\n activeSection: number;\r\n //@ts-ignore\r\n previousSection: RenderSectionProps;\r\n //@ts-ignore\r\n nextSection: RenderSectionProps;\r\n //@ts-ignore\r\n onSelectDocumentItem: (arg: null) => void;\r\n\r\n previousButtonTooltip?:string;\r\n nextButtonTooltip?:string;\r\n}\r\n\r\n/**\r\n * If the current section is the selected one, it's domains will be rendered as a section\r\n * in addition to beeing the active/selected one\r\n */\r\nexport function withRenderActiveSection() {\r\n return (\r\n WrappedComponent: React.ComponentClass<any> | React.SFC<{}>\r\n ): React.ComponentClass<{}> => {\r\n return class extends React.Component<ActiveSectionRenderProps> {\r\n\r\n private page = (sectionId: number) => {\r\n navigate.toSection(sectionId);\r\n this.props.onSelectDocumentItem(null);\r\n scrollToTopAlways();\r\n };\r\n\r\n private handlePrevious = (e: React.MouseEvent<any>) => {\r\n e.preventDefault();\r\n this.page(this.props.previousSection.id);\r\n };\r\n\r\n private handleNext = (e: React.MouseEvent<any>) => {\r\n e.preventDefault();\r\n this.page(this.props.nextSection.id);\r\n };\r\n\r\n public render() {\r\n const {\r\n activeSection,\r\n componentId,\r\n expandAll,\r\n nextSection,\r\n previousSection,\r\n previousButtonTooltip,\r\n nextButtonTooltip\r\n } = this.props;\r\n\r\n const isActive = activeSection === Number(componentId);\r\n const shouldRender = expandAll || isActive;\r\n return shouldRender ? (\r\n <>\r\n <WrappedComponent {...this.props} />\r\n <SectionPager\r\n onNext={this.handleNext}\r\n onPrevious={this.handlePrevious}\r\n nextButtonTooltip={nextButtonTooltip}\r\n nextSection={nextSection}\r\n previousSection={previousSection}\r\n previousButtonTooltip={previousButtonTooltip}\r\n hide={expandAll}\r\n />\r\n </>\r\n ) : null;\r\n }\r\n };\r\n };\r\n}\r\n","\r\nenum ScrollDirection{\r\n Up,\r\n Down\r\n}\r\n\r\nexport const findTopMostVisible =\r\n(\r\n updates: IntersectionObserverEntry[],\r\n nextUpdate: IntersectionObserverEntry[],\r\n previousUpdate: IntersectionObserverEntry[]\r\n)=> {\r\n\r\n let scrollDirection = ScrollDirection.Down;\r\n const current = updates[0];\r\n const previous = previousUpdate && previousUpdate.find(p => p.target.id === current.target.id);\r\n const exitsUpwards = el => el.intersectionRect.bottom < el.rootBounds.height && !el.isIntersecting;\r\n\r\n if(!previousUpdate){\r\n // First invocation, select the topmost visible\r\n return updates.find(u => u.isIntersecting);\r\n }\r\n\r\n if(previous){\r\n scrollDirection = current.boundingClientRect.top <= previous.boundingClientRect.top ? ScrollDirection.Down : ScrollDirection.Up;\r\n }\r\n\r\n if(scrollDirection === ScrollDirection.Down && exitsUpwards(current)){\r\n const indexOfHidden = nextUpdate.findIndex(x => x.target === current.target);\r\n return nextUpdate.find((u, i) => i > indexOfHidden && u.isIntersecting );\r\n }\r\n const currentIndex = nextUpdate.findIndex(x => x.target === current.target);\r\n return currentIndex > 0 ? nextUpdate.find((u,i) => i < currentIndex && u.isIntersecting) : current;\r\n};\r\n\r\n/**\r\n * Returns the DOM element id of the observed target matched by the findPredicate\r\n * @param callback callback function invoked when the matched DOM target element is found\r\n * @param findPredicate defaults to findTopMostVisible\r\n */\r\nexport const activeIdSelector = (callback: (id: number) => void, findPredicate = findTopMostVisible) =>\r\n(\r\n updates: IntersectionObserverEntry[],\r\n nextUpdate: IntersectionObserverEntry[],\r\n previousUpdate: IntersectionObserverEntry[]\r\n) => {\r\n\r\n const active = findPredicate(updates,nextUpdate, previousUpdate);\r\n active && active.target && callback( Number(active.target.id) );\r\n return active;\r\n};\r\n","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\n\r\nexport interface PortalProps{\r\n toElement: string;\r\n forwardKey?: string;\r\n children?:any;\r\n}\r\n/**\r\n * Support rendering children into a VDOM parent\r\n *\r\n * While waiting for an official React.Portal\r\n * https://github.com/facebook/react/issues/10711\r\n */\r\nexport class Portal extends React.Component<PortalProps> {\r\n private el:Element;\r\n\r\n public componentDidMount(){\r\n this.el = document.getElementById(this.props.toElement);\r\n this.el && this.forceUpdate();\r\n }\r\n public render(){\r\n return this.el ? ReactDOM.createPortal(this.props.children, this.el, this.props.forwardKey) : null;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { getWindowScroller } from 'app/infrastructure/platform/browser-dom';\r\nimport { ChildObserver, TabItem, TabContainerDomId } from 'app/components/tabs';\r\nimport { activeIdSelector } from 'app/components/tabs/visibility-observer';\r\nimport { Portal } from 'ui/common/portal';\r\nimport { scheduleUpdate } from 'app/infrastructure/platform';\r\n\r\n/**\r\n * Scrolls DOM element with given id into view.\r\n *\r\n * if `forceTop` is true then a window scroll to 0,0 is performed instead of the default `el.scrollIntoView`\r\n *\r\n * @param componentId\r\n * @param forceTop\r\n */\r\nconst scrollToSection = (componentId: number | string, forceTop?: boolean) => {\r\n const scrollTo = getWindowScroller();\r\n let target: number = 0;\r\n const el = document.getElementById(`${componentId}`);\r\n if (!forceTop && el) {\r\n target = el.offsetTop - 120;\r\n }\r\n scrollTo(target);\r\n};\r\n\r\nexport interface ExpectedSelectorProps extends ComponentProps {\r\n activeSection: number;\r\n firstSection: number;\r\n valid: boolean;\r\n warnings: boolean;\r\n expandAll: boolean;\r\n forceActive: boolean;\r\n visible: boolean;\r\n onSelectDocumentItem: (item: null) => void;\r\n hostProps: () => {\r\n activeChildItem: any[];\r\n };\r\n iconUrl?: any;\r\n}\r\n\r\n// tslint:disable:max-func-body-length\r\nexport function withSectionTab<P extends ExpectedSelectorProps>() {\r\n return (\r\n WrappedComponent: React.ComponentClass<P> | React.SFC<P>\r\n ): React.ComponentClass<P> => {\r\n interface TabState {\r\n visibleSection?: number;\r\n }\r\n\r\n return class extends React.Component<P, TabState> {\r\n public constructor(props: P) {\r\n super(props);\r\n this.state = {};\r\n }\r\n\r\n public componentDidMount() {\r\n this.scrollIfNeeded();\r\n }\r\n\r\n public componentDidUpdate(prevProps: P) {\r\n if (this.props.expandAll && !prevProps.expandAll) {\r\n this.scrollIfNeeded();\r\n }\r\n if(prevProps.activeSection &&\r\n prevProps.activeSection !== this.props.activeSection){\r\n this.shouldActivate() && this.activate();\r\n }\r\n }\r\n\r\n private scrollIfNeeded() {\r\n this.shouldActivate() &&\r\n scheduleUpdate(this.scrollSectionIntoView);\r\n }\r\n\r\n private shouldActivate = () => {\r\n const { activeSection, componentId } = this.props;\r\n return activeSection && activeSection === Number(componentId);\r\n };\r\n\r\n private handleSelect = (e: React.MouseEvent<any>) => {\r\n e && e.preventDefault();\r\n this.activate();\r\n };\r\n\r\n private activate = () => {\r\n const { componentId } = this.props;\r\n navigate.toSection(componentId);\r\n this.scrollSectionIntoView();\r\n }\r\n\r\n private scrollSectionIntoView = () => {\r\n const { componentId, firstSection } = this.props;\r\n const shouldScrollToTop = Number(componentId) === firstSection;\r\n scrollToSection(componentId, shouldScrollToTop);\r\n };\r\n\r\n private handleActivate: any = activeIdSelector(\r\n (visibleSection: number) => {\r\n visibleSection &&\r\n visibleSection !== this.state.visibleSection &&\r\n this.setState({ visibleSection });\r\n }\r\n );\r\n\r\n public render() {\r\n const {\r\n label,\r\n componentId,\r\n activeSection,\r\n valid,\r\n warnings,\r\n expandAll,\r\n visible,\r\n iconUrl\r\n } = this.props;\r\n\r\n const id = Number(componentId);\r\n const scrollActive = expandAll && this.state.visibleSection === id;\r\n const tabbedActive = !expandAll && id === activeSection;\r\n const active = scrollActive || tabbedActive;\r\n const url = routeConstants.caseSection(componentId, expandAll);\r\n\r\n return (\r\n <>\r\n {\r\n <Portal forwardKey={`${id}`} toElement={TabContainerDomId}>\r\n <TabItem\r\n key={`tabitem-${id}`}\r\n id={id}\r\n url={url}\r\n onClick={this.handleSelect}\r\n active={active}\r\n label={label}\r\n visible={visible}\r\n valid={valid}\r\n warnings={warnings}\r\n iconUrl={iconUrl}\r\n />\r\n </Portal>\r\n }\r\n <ChildObserver\r\n name={TabContainerDomId}\r\n active={expandAll}\r\n id={id}\r\n onUpdate={this.handleActivate}\r\n >\r\n <WrappedComponent {...this.props} />\r\n </ChildObserver>\r\n </>\r\n );\r\n }\r\n };\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport get from 'lodash/get';\r\n\r\nlet originTitle = '';\r\n\r\nexport function withDocumentTitleFromProps<P> (...prefixPropPath: string[]){\r\n return (\r\n WrappedComponent: React.ComponentClass<P> | React.SFC<P>\r\n ) => {\r\n return class extends React.Component<P & { url: string }> {\r\n\r\n private segments: string[] = [];\r\n\r\n public constructor(props: P & { url: string }){\r\n super(props);\r\n if(!originTitle){\r\n originTitle = document.title;\r\n }\r\n }\r\n\r\n private updateTitle = () => {\r\n this.segments.push(originTitle);\r\n prefixPropPath.forEach(p=>{\r\n const infoPrefix = get(this.props, p);\r\n if(infoPrefix){\r\n const limitedContentLength = infoPrefix.toString().substring(0,50);\r\n this.segments.push(limitedContentLength);\r\n }\r\n });\r\n const nextTitle = this.segments.reverse().join(' • ');\r\n if(nextTitle && nextTitle !== document.title){\r\n document.title = nextTitle;\r\n }\r\n }\r\n\r\n public componentDidMount(){\r\n this.updateTitle();\r\n }\r\n\r\n public componentWillUnmount(){\r\n document.title = originTitle;\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent {...this.props} />;\r\n }\r\n };\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { scrollToTopAlways } from 'app/infrastructure/platform/routing';\r\nimport { keyCode } from 'ui/common/key-code-types';\r\n\r\nexport function withSectionKeyboardPaging() {\r\n\r\n return (\r\n WrappedComponent: React.ComponentClass<any> | React.SFC<{}>\r\n ): React.ComponentClass<{}> => {\r\n\r\n /**\r\n * Using enhancers/HOC to register window event listeners seems like\r\n * a fragile approach. This should probably be changed when better\r\n * ways surface.\r\n * The reason is the nature of addEventListener and the chance of losing the\r\n * correct memory reference to the event handler when unregistering. That\r\n * is why keydown is added and removed on every update, since there was\r\n * duplicate event handlers firing.\r\n */\r\n return class extends React.PureComponent<any> {\r\n\r\n public constructor(props: any) {\r\n super(props);\r\n }\r\n\r\n public componentDidMount() {\r\n addEventListener('keydown', this.handleKeyboardShortcut);\r\n }\r\n\r\n public componentWillUnmount() {\r\n removeEventListener('keydown', this.handleKeyboardShortcut);\r\n }\r\n\r\n private page = (sectionId: number) => {\r\n navigate.toSection(sectionId);\r\n this.props.onSelectDocumentItem(null);\r\n scrollToTopAlways();\r\n };\r\n\r\n private handleKeyboardShortcut = (event: KeyboardEvent) => {\r\n const { previousSection, nextSection, expandAll } = this.props;\r\n if (! (event.ctrlKey && event.shiftKey) || expandAll) {\r\n return;\r\n }\r\n\r\n if (event.keyCode === keyCode.ArrowLeft && previousSection) {\r\n event.preventDefault();\r\n this.page(previousSection.id);\r\n }\r\n if (event.keyCode === keyCode.ArrowRight && nextSection) {\r\n event.preventDefault();\r\n this.page(nextSection.id);\r\n }\r\n };\r\n\r\n public render(){\r\n return <WrappedComponent {...this.props} />;\r\n }\r\n };\r\n };\r\n}\r\n","import * as React from 'react';\r\n\r\nexport function withClassOnFirstTab<P>(notFirstTab:boolean = false) {\r\n\r\n return (WrappedComponent: React.ComponentClass<P> | React.SFC<P>) => {\r\n\r\n return (props) => {\r\n const {\r\n firstSection,\r\n expandAll,\r\n activeSection\r\n } = props as any;\r\n\r\n const modifiedProps: any = { ...props as any };\r\n\r\n if ((expandAll || (activeSection && firstSection && activeSection === firstSection)) !== notFirstTab) {\r\n modifiedProps.className = !notFirstTab ? 'first-tab' : 'not-first-tab';\r\n }\r\n\r\n return <WrappedComponent { ...modifiedProps } /> ;\r\n };\r\n };\r\n}\r\n","import * as React from 'react';\r\n\r\nexport function withRenderOnFirstTabOnly<P>(){\r\n return ( WrappedComponent: any\r\n ): React.ComponentClass<P> => {\r\n\r\n return class extends React.Component<P> {\r\n public constructor(props: P) {\r\n super(props);\r\n }\r\n\r\n private get firstSectionSelected() {\r\n const {\r\n firstSection,\r\n expandAll,\r\n activeSection\r\n } = this.props as any;\r\n if (!expandAll && activeSection && firstSection) {\r\n return activeSection === firstSection;\r\n }\r\n return expandAll;\r\n }\r\n\r\n public render() {\r\n return this.firstSectionSelected ? <WrappedComponent {...this.props}/> : null;\r\n }\r\n };\r\n };\r\n}\r\n","import Icon from 'react-icon-base';\r\nimport * as React from 'react';\r\n\r\nexport const Chain = props => (\r\n\r\n <Icon viewBox=\"0 0 22.6 22.6\" {...props}>\r\n <path transform=\"rotate(-45 11.31 11.31)\" fill=\"none\" stroke=\"#fff\" d=\"M10.8 5.8h1v11h-1z\"/>\r\n <path\r\n fill=\"none\"\r\n stroke=\"#fff\"\r\n strokeWidth=\"1.5\"\r\n // tslint:disable-next-line:max-line-length\r\n d=\"M16.4 10.4l4.2 4.2c.5.5.5 1.3 0 1.8l-4.2 4.2c-.5.5-1.3.5-1.8 0l-4.2-4.2c-.5-.5-.5-1.3 0-1.8l4.2-4.2c.6-.5 1.4-.5 1.8 0zM8 1.9l4.2 4.2c.5.5.5 1.3 0 1.8L8 12.2c-.5.5-1.3.5-1.8 0L1.9 8c-.5-.5-.5-1.3 0-1.8L6.1 2c.6-.5 1.4-.5 1.9-.1z\"\r\n />\r\n </Icon>\r\n);\r\n\r\n/*\r\n<svg id=\"shape\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 22.6 22.6\">\r\n\r\n</svg>\r\n*/\r\n","import * as React from 'react';\r\nimport { withOpenState, OpenStateInjectedProps } from 'ui/common/enhancers';\r\nimport { AddDocumentItemOptions, DeleteDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { serializeConnectionState } from 'app/area/case/draft/connected-state';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { ButtonPrimary, AddButton, Numberbox, ButtonTertiary } from 'ui';\r\nimport MdAdd from 'react-icons/lib/md/add';\r\nimport get from 'lodash/get';\r\nimport styles from './connect-case-selector.scss';\r\nimport { StoreField } from 'app/types-shared';\r\nimport { tableName, columnName } from 'app/area/case/case-data-model';\r\nimport { Chain } from 'ui/common/svg-icons/chain';\r\nimport { CancelablePromise, makeCancelable } from 'app/infrastructure/js/cancelable-promise';\r\nimport { PrimaryActionComponentProps } from 'app/area/case-listing/types';\r\nimport { nextSequenceValue } from 'app/area/case/features/connected-cases/sequence';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport debounce from 'lodash/debounce';\r\n\r\nconst debounceTime = 500;\r\n\r\nexport interface ConnectCaseSelectorProps {\r\n entityId: number;\r\n caseId: number;\r\n connectionTypeId: number;\r\n maxSequence: number;\r\n textAddExisting: string;\r\n textAddNew: string;\r\n textNoConnectionToItself: string;\r\n textConnect: string;\r\n textDisconnect: string;\r\n placeholderSearch: string;\r\n titleSearch: string;\r\n textInvalidRangeError: string;\r\n readOnly?: boolean;\r\n required?: boolean;\r\n stateForCaseIds: {[caseId: string]: { valid: boolean, fetching: boolean }};\r\n validateCaseId: (caseId: number) => void;\r\n onAddDocumentItem: (selectAddedItem: boolean, options: AddDocumentItemOptions) => void;\r\n onDeleteDocumentItem: (selectParentItem: boolean, options: DeleteDocumentItemOptions) => void;\r\n createSearchForCasesToConnect: () => Promise<number>;\r\n locale?: string;\r\n formatNumber?: (n: number, options?: Intl.NumberFormatOptions) => string;\r\n connectedDrafts?: any[];\r\n searchEnabled?: boolean;\r\n reportId?: number;\r\n connectedCasesIds?: number[];\r\n connectedCasesPendingDeleteIds?: number[];\r\n caseListingComponent: React.ComponentClass<any, any>;\r\n}\r\n\r\ninterface ConnectCaseSelectorState {\r\n caseIdToConnect: number;\r\n favouriteId?: number;\r\n}\r\n\r\nclass ConnectCaseSelectorComponent\r\n extends React.PureComponent<ConnectCaseSelectorProps & OpenStateInjectedProps, ConnectCaseSelectorState> {\r\n private keyMap: any;\r\n private handlers: any;\r\n private loadPromise: CancelablePromise<number>;\r\n\r\n public constructor(props: ConnectCaseSelectorProps & OpenStateInjectedProps) {\r\n super(props);\r\n this.state = {\r\n caseIdToConnect: undefined\r\n };\r\n\r\n this.keyMap = {\r\n onEnter: [keyCodeTypes.Enter]\r\n };\r\n this.handlers = {\r\n onEnter: (event) => this.onEnter(event)\r\n };\r\n }\r\n\r\n public componentWillUnmount() {\r\n if (this.loadPromise) {\r\n this.loadPromise.cancel();\r\n this.loadPromise = undefined;\r\n }\r\n }\r\n\r\n private onEnter = (event?:KeyboardEvent) => {\r\n if (event) {\r\n event.preventDefault();\r\n }\r\n this.addConnection();\r\n }\r\n\r\n private closeDialog = () => {\r\n const {close} = this.props;\r\n\r\n close(() => {\r\n this.setState({\r\n ...this.state,\r\n ...{\r\n caseIdToConnect: undefined,\r\n favouriteId: undefined\r\n }\r\n });\r\n });\r\n }\r\n\r\n private getStateForCaseId(): { valid: boolean, fetching: boolean } {\r\n return get(this.props, `stateForCaseIds[${this.state.caseIdToConnect}]`) || {};\r\n }\r\n\r\n private caseIdChanged: (caseIdToConnect: number) => void = debounce((caseIdToConnect: number) => {\r\n this.setState({\r\n ...this.state,\r\n ...{ caseIdToConnect }\r\n }, () => {\r\n const validStateForCaseId = this.getStateForCaseId();\r\n if(this.state.caseIdToConnect > 0 && !validStateForCaseId.fetching) {\r\n this.props.validateCaseId(this.state.caseIdToConnect);\r\n }\r\n });\r\n }, debounceTime);\r\n\r\n private getNextSequenceValue = () => nextSequenceValue(this.props.maxSequence);\r\n\r\n private addConnection = () => {\r\n const { onAddDocumentItem } = this.props;\r\n\r\n const validStateForCaseId = this.getStateForCaseId();\r\n\r\n if (onAddDocumentItem && validStateForCaseId.valid && !validStateForCaseId.fetching) {\r\n onAddDocumentItem(true, {\r\n childId: this.state.caseIdToConnect,\r\n initialValues: {\r\n [columnName[tableName.connectedCases].connectedSequence]: [{ value: this.getNextSequenceValue() }] as StoreField[]\r\n }\r\n });\r\n this.closeDialog();\r\n }\r\n }\r\n\r\n private openCasesToConnect = async () => {\r\n this.props.open();\r\n try {\r\n this.loadPromise = makeCancelable(this.props.createSearchForCasesToConnect());\r\n const favouriteId = await this.loadPromise.promise;\r\n this.setState({\r\n favouriteId\r\n });\r\n this.loadPromise = undefined;\r\n }\r\n catch (e) {\r\n if (e && e.isCanceled) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n private addConnectionToNewCase = () => {\r\n const {entityId: draftId, connectionTypeId, connectedDrafts = []} = this.props;\r\n\r\n navigate.toSelectConnected(\r\n serializeConnectionState([\r\n {draftId, connectionTypeId, sequence: this.getNextSequenceValue()},\r\n ...connectedDrafts\r\n ])\r\n );\r\n }\r\n\r\n private renderActionComponent = (props: PrimaryActionComponentProps) => {\r\n const { textConnect, textDisconnect, connectedCasesIds, connectedCasesPendingDeleteIds } = this.props;\r\n\r\n const caseAlreadyConnected = connectedCasesIds && connectedCasesIds.indexOf(props.caseId) > -1;\r\n const pendingDelete = connectedCasesPendingDeleteIds && connectedCasesPendingDeleteIds.indexOf(props.caseId) > -1;\r\n\r\n return caseAlreadyConnected ?\r\n <ButtonTertiary onClick={this.removeConnection(props.caseId)}>{textDisconnect}</ButtonTertiary> :\r\n <ButtonPrimary onClick={this.addConnectionByCaseId(props.caseId)} disabled={pendingDelete}>{textConnect}</ButtonPrimary>;\r\n }\r\n\r\n private addConnectionByCaseId = (caseIdToConnect: number) => () => {\r\n const { onAddDocumentItem } = this.props;\r\n\r\n onAddDocumentItem(false, {\r\n childId: caseIdToConnect,\r\n initialValues: {\r\n [columnName[tableName.connectedCases].connectedSequence]: [{ value: this.getNextSequenceValue() }] as StoreField[]\r\n }\r\n });\r\n }\r\n\r\n private removeConnection = (caseIdToRemove: number) => () => {\r\n const { entityId, onDeleteDocumentItem, connectionTypeId } = this.props;\r\n onDeleteDocumentItem && onDeleteDocumentItem(\r\n false,\r\n {\r\n entityType: tableName.connectedCases,\r\n parentEntityPath: [\r\n {[tableName.trans]: entityId},\r\n {[tableName.connectionTypes]: connectionTypeId}\r\n ],\r\n childId: caseIdToRemove\r\n });\r\n }\r\n\r\n private renderSelectDialog() {\r\n const { caseId, placeholderSearch, textAddExisting, textNoConnectionToItself, titleSearch,\r\n textInvalidRangeError, formatNumber, locale, isClosing, searchEnabled,\r\n caseListingComponent: CaseListingComponent } = this.props;\r\n const { caseIdToConnect } = this.state;\r\n const { inputWrapper, inputSearch } = styles;\r\n\r\n const entityForCaseId = this.getStateForCaseId();\r\n const fetchingEntityId = entityForCaseId.fetching;\r\n const unknownEntityId = !entityForCaseId.valid && !fetchingEntityId;\r\n const sameCaseId = caseIdToConnect && caseId === caseIdToConnect;\r\n\r\n const addButtonText = sameCaseId ? textNoConnectionToItself : textAddExisting;\r\n const closingAnimation = isClosing ? 'animate-out' : '';\r\n\r\n return (\r\n <div className={closingAnimation}>\r\n <ModalWrapper {...this.props}\r\n headerTitle={titleSearch}\r\n onClose={this.closeDialog}\r\n largeSize={true}\r\n >\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n <div className={inputWrapper}>\r\n <Numberbox\r\n componentId={'caseid-input'}\r\n className={`${inputSearch}`}\r\n placeholder={placeholderSearch}\r\n onChange={this.caseIdChanged}\r\n value={caseIdToConnect}\r\n formatNumber={formatNumber}\r\n locale={locale}\r\n useThousand={false}\r\n textInvalidRangeError={textInvalidRangeError}\r\n />\r\n <span className=\"input-group-btn\">\r\n <ButtonPrimary\r\n onClick={this.addConnection}\r\n disabled={caseIdToConnect <= 0 || fetchingEntityId || unknownEntityId || sameCaseId}>\r\n {addButtonText}\r\n </ButtonPrimary>\r\n </span>\r\n </div>\r\n {searchEnabled && this.state.favouriteId &&\r\n <CaseListingComponent\r\n {...this.props}\r\n primaryActionComponentFactory={this.renderActionComponent}\r\n favouriteId={this.state.favouriteId} />}\r\n </HotKeys>\r\n </ModalWrapper>\r\n </div>\r\n );\r\n }\r\n\r\n public render() {\r\n const {\r\n readOnly,\r\n required,\r\n isOpen,\r\n textAddExisting,\r\n textAddNew\r\n } = this.props;\r\n\r\n const {\r\n connectCaseSelector, addButton\r\n } = styles;\r\n\r\n if (readOnly) {\r\n return null;\r\n }\r\n\r\n const addButtons =\r\n <div className={addButton}>\r\n <AddButton icon={MdAdd} onClick={this.addConnectionToNewCase} required={required}>{textAddNew}</AddButton>\r\n <AddButton icon={Chain} onClick={this.openCasesToConnect} required={required}>{textAddExisting}</AddButton>\r\n </div>;\r\n\r\n return (\r\n <div className={connectCaseSelector}>\r\n {addButtons}\r\n {isOpen && this.renderSelectDialog()}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst c = withOpenState(true)(ConnectCaseSelectorComponent);\r\n\r\nexport { c as ConnectCaseSelector };\r\n","import * as React from 'react';\r\nimport { TileViewProps } from 'ui/tile-view';\r\nimport { AddDocumentItemOptions, DeleteDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { ConnectCaseSelector } from 'app/area/case/components/connected-cases/connect-case-selector';\r\nimport { TileView } from 'ui';\r\n\r\nexport interface ConnectedCasesTileViewProps extends TileViewProps {\r\n entityId: number;\r\n caseId: number;\r\n connectionTypeId: number;\r\n maxSequence: number;\r\n stateForCaseIds: {[caseId: string]: { valid: boolean, fetching: boolean }};\r\n validateCaseId: (caseId: number) => void;\r\n onAddDocumentItem: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n onDeleteDocumentItem: (selectParentItem: boolean, options?: DeleteDocumentItemOptions) => void;\r\n createSearchForCasesToConnect: (draftId: number, connectionTypeId: number) => Promise<number>;\r\n allowConnectCases: boolean;\r\n allowDisconnectCases: boolean;\r\n textAddExisting: string;\r\n textAddNew: string;\r\n textNoConnectionToItself: string;\r\n textConnect: string;\r\n textDisconnect: string;\r\n placeholderSearch: string;\r\n titleSearch: string;\r\n textInvalidRangeError: string;\r\n connectedDrafts?: any[];\r\n caseListingComponent: React.ComponentClass<any, any>;\r\n}\r\n\r\nexport class ConnectedCasesTileView extends React.PureComponent<ConnectedCasesTileViewProps, {}> {\r\n\r\n public static defaultProps: Partial<ConnectedCasesTileViewProps> = {\r\n allowConnectCases: false,\r\n allowDisconnectCases: false\r\n };\r\n\r\n private createSearchForCasesToConnect = (): Promise<number> => {\r\n return this.props.createSearchForCasesToConnect(this.props.entityId, this.props.connectionTypeId);\r\n }\r\n\r\n public render() {\r\n const {\r\n connectionTypeId,\r\n allowConnectCases\r\n } = this.props;\r\n\r\n const required = this.props.label && this.props.label.required;\r\n\r\n const addButton = !!allowConnectCases &&\r\n <ConnectCaseSelector {\r\n ...{\r\n ...this.props, required, children: undefined,\r\n connectionTypeId,\r\n createSearchForCasesToConnect: this.createSearchForCasesToConnect\r\n }}\r\n />;\r\n\r\n return (\r\n <TileView {...{...this.props, readOnly: !allowConnectCases, addButton}} />\r\n );\r\n }\r\n}\r\n\r\n// tslint:disable: max-line-length no-console\r\nexport const ConnectedCasesTileViewEdit = (props: any) => <ConnectedCasesTileView allowConnectCases={!props.readOnly} allowDisconnectCases={!props.readOnly} {...props} />;\r\n","import * as React from 'react';\r\nimport { CompactTile } from 'ui';\r\nimport { TileProps } from 'ui/tile/tile';\r\nimport * as navigate from 'app/area/shared/navigation';\r\n\r\nimport styles from './connect-case-selector.scss';\r\nimport { CasePermissions } from 'app/types-shared';\r\n\r\nexport interface ConnectedCasesTileTranslations {\r\n textMoveUp: string;\r\n textMoveDown: string;\r\n textOpenBowtie: string;\r\n}\r\n\r\nexport interface ConnectedCasesTileProps extends TileProps, ConnectedCasesTileTranslations {\r\n enabledConnectionOperations: { moveUp: boolean, moveDown: boolean };\r\n moveConnectionUp: (steps: number) => void;\r\n moveConnectionDown: (steps: number) => void;\r\n\r\n entityId: number;\r\n maxSequence: number;\r\n connectionTypeId: number;\r\n connectedDrafts?: any[];\r\n permissions: CasePermissions;\r\n}\r\n\r\nexport class ConnectedCasesTile extends React.PureComponent<ConnectedCasesTileProps> {\r\n\r\n private moveConnectionUp = () => this.props.moveConnectionUp(1);\r\n private moveConnectionDown = () => this.props.moveConnectionDown(1);\r\n\r\n private openBowtie = () => {\r\n const { primaryKey } = this.props;\r\n navigate.toBowtie(primaryKey.value, true);\r\n }\r\n\r\n public render() {\r\n const { textMoveUp, textMoveDown, enabledConnectionOperations, \r\n enabledChildEntityOperations, textOpenBowtie, permissions, ...restProps } = this.props;\r\n\r\n const sequenceContextMenuOperations = [];\r\n enabledConnectionOperations && enabledConnectionOperations.moveUp &&\r\n sequenceContextMenuOperations.push({ text: textMoveUp, callback: this.moveConnectionUp });\r\n enabledConnectionOperations && enabledConnectionOperations.moveDown &&\r\n sequenceContextMenuOperations.push({ text: textMoveDown, callback: this.moveConnectionDown });\r\n permissions && permissions.bowtie &&\r\n sequenceContextMenuOperations.push({ text: textOpenBowtie, callback: this.openBowtie });\r\n\r\n return <CompactTile\r\n {...restProps}\r\n className={styles.connectedCaseTile}\r\n extendedContextMenuOperations={sequenceContextMenuOperations}\r\n enabledChildEntityOperations={{ ...enabledChildEntityOperations, ...{ add: false } }} />;\r\n }\r\n}\r\n","import { BadgeList, IconList, Badge } from 'ui';\r\nimport * as React from 'react';\r\nimport { BadgeProps } from 'ui/badge/badge';\r\nimport styles from './fact-box.scss';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { FactboxItemProps, FactBoxProps } from 'app/area/case/components/fact-box/types';\r\nimport { Link } from 'react-router';\r\n\r\nconst Fact = ({classNames='',section, children, url}) => {\r\n return section || url ? <Link className={`${styles.factItem} ${classNames} fact-item`}\r\n to={navigate.toSectionURL(section,url)}>\r\n {children}\r\n </Link> : <div className={`${styles.factItem} ${classNames} fact-item`}>\r\n {children}\r\n </div>;\r\n};\r\n\r\ninterface FactBadgeListProps {\r\n icon: JSX.Element;\r\n title: string;\r\n valueItems: FactboxItemProps[];\r\n classNames?: string;\r\n useNestedIndicator?: boolean;\r\n section?:number;\r\n factProps?: FactBoxProps;\r\n}\r\n\r\nexport const FactBadgeList = ({\r\n icon,\r\n title,\r\n valueItems,\r\n classNames,\r\n useNestedIndicator,\r\n section,\r\n factProps}:FactBadgeListProps\r\n) => <Fact classNames={classNames || ''} section={section} url={factProps ? factProps.url : undefined}>\r\n <BadgeList\r\n icon={icon}\r\n title={title}\r\n valueItems={valueItems}\r\n useNestedIndicator={useNestedIndicator}\r\n />\r\n </Fact>;\r\n\r\ninterface FactIconListProps {\r\n title: string;\r\n //@ts-ignore\r\n icons: FactboxItemProps[];\r\n defaultIcon: any;\r\n section:number;\r\n url:string;\r\n iconLine?: boolean;\r\n [key: string]: any;\r\n}\r\nexport const FactIconList = (\r\n {title, iconLine, icons,defaultIcon, section, url}: FactIconListProps\r\n) => {\r\n return (\r\n <Fact classNames={iconLine ? styles.iconLine : ''} section={section} url={url}>\r\n <IconList title={title} valueItems={icons as any} defaultIcon={defaultIcon} />\r\n </Fact>\r\n );\r\n};\r\n\r\ninterface FactBadgeProps {\r\n badgeProps: BadgeProps;\r\n section?: number;\r\n [key: string]: any;\r\n}\r\nexport const FactBadge = ({badgeProps, section, url}:FactBadgeProps) => {\r\n return (\r\n <Fact section={section} url={url}>\r\n <Badge\r\n {...badgeProps}\r\n />\r\n </Fact>\r\n );\r\n};\r\n","import get from 'lodash/get';\r\nimport { FactboxLink } from 'app/area/case/components/fact-box/types';\r\n\r\nexport const sectionFor = (props: FactboxLink, id:string):number =>\r\n props.links \r\n ? \r\n get(props.links.find(l => l.id === id),'section') \r\n : \r\n undefined;\r\n","import * as React from 'react';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\nimport { Icon } from 'ui/common/icon';\r\nimport { FactIconList, FactBadgeList } from 'app/area/case/components/fact-box/renderers';\r\nimport {sectionFor} from './section';\r\nimport * as MdFlashOn from 'react-icons/lib/md/flash-on';\r\nimport * as MdCheck from 'react-icons/lib/md/check-box';\r\nimport * as MdActions from 'react-icons/lib/md/format-list-numbered';\r\nimport * as MdAttachments from 'react-icons/lib/md/attach-file';\r\nimport * as MdInvolvedPersons from 'react-icons/lib/md/group';\r\nimport { FactBoxProps } from 'app/area/case/components/fact-box/types';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\n\r\nexport const IconsConsequences = (props:FactBoxProps) => {\r\n const defaultIconConsequences = <MdFlashOn />;\r\n return <FactIconList title={props.titleConsequences} iconLine={true} icons={props.childValueItems.ActConsConsequenceIcons}\r\n defaultIcon={defaultIconConsequences} section={sectionFor(props, tableName.consequences)} url={props.url} />;\r\n};\r\n\r\nexport const BadgeListActions = (props: FactBoxProps) => {\r\n const {\r\n numberOfClosedActions,\r\n tooltipNumberOfActions,\r\n tooltipClosedActions,\r\n titleActions,\r\n count\r\n } = props;\r\n const iconActions = <MdActions />;\r\n const items = [\r\n { value: count as number, tooltip: tooltipNumberOfActions },\r\n {\r\n value: numberOfClosedActions.count as number,\r\n tooltip: tooltipClosedActions,\r\n classNames: numberOfClosedActions.propName\r\n }\r\n ];\r\n\r\n return <FactBadgeList icon={iconActions} title={titleActions} valueItems={items} classNames={'action-badge'}\r\n section={sectionFor(props, tableName.action)} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListAttachments = (props: FactBoxProps) => {\r\n const { tooltipNumberOfAttachments, titleAttachments, count } = props;\r\n const iconAttachments = <MdAttachments />;\r\n const items = [\r\n { value: count as number, tooltip: tooltipNumberOfAttachments }\r\n ];\r\n return <FactBadgeList icon={iconAttachments} title={titleAttachments} valueItems={items}\r\n section={sectionFor(props, tableName.attachmentType)} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListConnectedCases = (\r\n props: FactBoxProps\r\n) => {\r\n const { tooltipNumberOfConnectedCases, titleConnectedCases, count } = props;\r\n const iconAbsolutePath = toAbsoluteUrl('i/connected-cases.svg');\r\n const iconConnectedCases = <Icon url={iconAbsolutePath} />;\r\n const items = [\r\n {\r\n value: count as number,\r\n tooltip: tooltipNumberOfConnectedCases\r\n }\r\n ];\r\n\r\n return <FactBadgeList icon={iconConnectedCases} title={titleConnectedCases} valueItems={items}\r\n section={sectionFor(props, tableName.connectedCases)} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListComments = (props: FactBoxProps) => {\r\n const { tooltipNumberOfComments, titleComments, count } = props;\r\n const iconAbsolutPath = toAbsoluteUrl('i/comments.svg');\r\n const iconComments = <Icon url={iconAbsolutPath} />;\r\n const items = [\r\n { value: count as number, tooltip: tooltipNumberOfComments }\r\n ];\r\n\r\n return <FactBadgeList icon={iconComments} title={titleComments} valueItems={items}\r\n section={sectionFor(props, tableName.comment)} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListCauses = (props: FactBoxProps) => {\r\n const { tooltipNumberOfCauses, titleCauses, count } = props;\r\n const iconAbsolutPath = toAbsoluteUrl('i/causes-icon.svg');\r\n const iconCauses = <Icon url={iconAbsolutPath} />;\r\n const items = [\r\n { value: count as number, tooltip: tooltipNumberOfCauses }\r\n ];\r\n return <FactBadgeList icon={iconCauses} title={titleCauses} valueItems={items}\r\n section={sectionFor(props, tableName.causes)} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListInvolvedPersons = (\r\n props:FactBoxProps\r\n) => {\r\n const { tooltipNumberOfInvolvedPersons, titleInvolvedPersons, count } = props;\r\n const iconInvolvedPersons = <MdInvolvedPersons />;\r\n const items = [\r\n {\r\n value: count,\r\n tooltip: tooltipNumberOfInvolvedPersons\r\n }\r\n ];\r\n\r\n return <FactBadgeList icon={iconInvolvedPersons} title={titleInvolvedPersons} valueItems={items as any}\r\n section={sectionFor(props, tableName.involvedPerson)} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListInvolvedDrugs = (props: FactBoxProps) => {\r\n const { count } = props;\r\n const { tooltipNumberOfInvolvedDrugs, titleInvolvedDrugs } = props;\r\n const iconAbsolutePath = toAbsoluteUrl('i/drug-icon.svg');\r\n const iconInvolvedDrugs = <Icon url={iconAbsolutePath} />;\r\n const items = [\r\n {\r\n value: count,\r\n tooltip: tooltipNumberOfInvolvedDrugs\r\n }\r\n ];\r\n\r\n return <FactBadgeList icon={iconInvolvedDrugs} title={titleInvolvedDrugs} valueItems={items as any}\r\n section={sectionFor(props, tableName.involvedDrug)} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListIntegrityStatus = (props: FactBoxProps) => {\r\n const { titleIntegrityStatus, integrityStatus, integrityScore } = props;\r\n const iconIntegrityStatus = integrityStatus && (\r\n <Icon url={integrityStatus.icon} />\r\n );\r\n const score = integrityScore ? integrityScore as number: undefined;\r\n const tooltipIntegrityStatus = integrityStatus && integrityStatus.description;\r\n const items = [{ value: score, tooltip: tooltipIntegrityStatus }];\r\n\r\n return <FactBadgeList icon={iconIntegrityStatus} title={titleIntegrityStatus} valueItems={items}\r\n useNestedIndicator={false} section={sectionFor(props, 'IntegrityStatus')}\r\n factProps={props}/>;\r\n};\r\n\r\nexport const BadgeListIntegrityStatusBarrierEval = (props: FactBoxProps) => {\r\n const { titleIntegrityStatusBarrierEval, integrityStatusBarrierEval } = props;\r\n const iconIntegrityStatus = integrityStatusBarrierEval && (\r\n <Icon url={integrityStatusBarrierEval.icon} />\r\n );\r\n const tooltipIntegrityStatusBarrrierEval =\r\n integrityStatusBarrierEval && integrityStatusBarrierEval.description;\r\n const items = [\r\n { value: undefined, tooltip: tooltipIntegrityStatusBarrrierEval }\r\n ];\r\n return <FactBadgeList icon={iconIntegrityStatus} title={titleIntegrityStatusBarrierEval} valueItems={items}\r\n useNestedIndicator={false} section={sectionFor(props, 'BarrierEval')} factProps={props} />;\r\n};\r\n\r\nexport const BadgeListChecklists = (props: FactBoxProps) => {\r\n const {\r\n titleChecklists,\r\n checklistEvaluations,\r\n count,\r\n tooltipNumberOfChecklistItems,\r\n visibleForValues\r\n } = props;\r\n const icon = <MdCheck />;\r\n const splittedVisibleForValues = !!visibleForValues && String(visibleForValues)\r\n .split(',')\r\n .map(e => Number(e));\r\n const filteredChecklistEvaluations = !!splittedVisibleForValues && !!splittedVisibleForValues.length &&\r\n checklistEvaluations.filter(r => splittedVisibleForValues.indexOf(r.key) > -1\r\n );\r\n const totalChecklistItems = [\r\n {\r\n value: count,\r\n tooltip: tooltipNumberOfChecklistItems\r\n }\r\n ];\r\n const resultingItems = [\r\n ...totalChecklistItems,\r\n ...filteredChecklistEvaluations\r\n ];\r\n\r\n return <FactBadgeList icon={icon} title={titleChecklists} valueItems={resultingItems}\r\n useNestedIndicator={true} section={sectionFor(props, tableName.checklist)}\r\n factProps={props}/>;\r\n};\r\n\r\nexport const BadgeListAssessments = (props: FactBoxProps) => {\r\n const { tooltipNumberOfAssessments, titleAssessments } = props;\r\n const iconAbsolutePath = toAbsoluteUrl('i/Assessment.svg');\r\n const iconAssessments = <Icon url={iconAbsolutePath} />;\r\n const items = [\r\n { value: props.count as number, tooltip: tooltipNumberOfAssessments }\r\n ];\r\n return <FactBadgeList icon={iconAssessments} title={titleAssessments} valueItems={items}\r\n section={sectionFor(props, tableName.assessment)}\r\n factProps={props} />;\r\n};\r\n","import { RemoteImage } from 'ui/remote-blob';\r\nimport styles from './fact-box.scss';\r\nimport * as React from 'react';\r\nimport { AttachmentViewer } from 'ui/attachment-viewer/attachment-viewer';\r\n\r\nexport const getFirstAttachedImage = props => {\r\n const images = props && props.uploadedFiles.filter(i => i.thumbnailSize && i.thumbnailSize > 0);\r\n\r\n if (!images) {\r\n return null;\r\n }\r\n\r\n const selectedImage = images.find(i => i.mainImage);\r\n if (selectedImage) {\r\n return selectedImage;\r\n }\r\n\r\n return images[0];\r\n};\r\n\r\nexport const getBlobFetcher = (props) => () => {\r\n const firstAttachedImage = getFirstAttachedImage(props);\r\n return firstAttachedImage\r\n ? props.loadBlob(firstAttachedImage.blobId, true) as Promise<Blob>\r\n : Promise.resolve(undefined) as Promise<Blob>;\r\n};\r\n\r\nexport const FactboxThumbnail = props => {\r\n const [viewerOpen, setViewerStatus] = React.useState(false);\r\n const files = props.numberOfFiles ? props.numberOfFiles.count : 0;\r\n const firstFile = getFirstAttachedImage(props);\r\n\r\n if (!files || !firstFile) {\r\n return null;\r\n }\r\n\r\n const openViewer = () => {\r\n setViewerStatus(true);\r\n };\r\n const closeViewer = () => {\r\n setViewerStatus(false);\r\n };\r\n\r\n return (<>\r\n <RemoteImage loadBlob={getBlobFetcher(props)}>\r\n {(objectUrl) => (\r\n <button type=\"button\" className={styles.thumbnailButton} onClick={openViewer}>\r\n <img src={objectUrl} className={styles.factImage} />\r\n </button>\r\n )\r\n }\r\n </RemoteImage>\r\n {viewerOpen && <AttachmentViewer loadBlob={props.loadBlob}\r\n uploadedFiles={props.uploadedFiles} initialSelected={firstFile.id} onClose={closeViewer}/> }\r\n </>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { toHex } from 'ui/common/hex-converter';\r\nimport styles from './fact-box.scss';\r\nimport {\r\n IconsConsequences,\r\n BadgeListActions,\r\n BadgeListAttachments,\r\n BadgeListConnectedCases,\r\n BadgeListComments,\r\n BadgeListCauses,\r\n BadgeListInvolvedPersons,\r\n BadgeListInvolvedDrugs,\r\n BadgeListIntegrityStatus,\r\n BadgeListIntegrityStatusBarrierEval,\r\n BadgeListChecklists,\r\n BadgeListAssessments\r\n} from 'app/area/case/components/fact-box/fact-items';\r\nimport {sectionFor} from 'app/area/case/components/fact-box/section';\r\nimport { FactboxThumbnail } from 'app/area/case/components/fact-box/thumbnail';\r\nimport { FactBoxProps } from 'app/area/case/components/fact-box/types';\r\nimport { FactBadge } from 'app/area/case/components/fact-box/renderers';\r\nimport { createFactboxProps } from 'app/area/case/components/fact-box/props-builder';\r\nimport { tableName as tbl } from 'app/area/case/case-data-model';\r\nimport { ReportCategory } from 'app/area/case-listing/types';\r\n\r\nconst FactboxItems = (props:FactBoxProps) => {\r\n\r\n const {\r\n totalsExceptActions,\r\n numberOfActions,\r\n numberOfAssessments,\r\n numberOfAttachments,\r\n numberOfCauses,\r\n numberOfChecklistItems,\r\n numberOfComments,\r\n numberOfConnectedCases,\r\n numberOfConsequences,\r\n numberOfInvolvedDrugs,\r\n numberOfInvolvedPersons,\r\n badgePropsRiskArea,\r\n badgePropsRiskAreaRest\r\n } = createFactboxProps(props);\r\n\r\n const {\r\n riskArea,\r\n riskWeight,\r\n riskWeightRest,\r\n integrityStatus,\r\n integrityStatusBarrierEval\r\n } = props;\r\n\r\n const compact = String(props.className).indexOf('compact') !== -1;\r\n\r\n const wrapperStyleClass =\r\n !compact && numberOfConsequences && numberOfConsequences > 4\r\n ? styles.consequenceWide\r\n : '';\r\n\r\n const items = [\r\n numberOfConsequences > 0 && <IconsConsequences key={1} {...props as any} />,\r\n\r\n riskWeight > 0 && <FactBadge key={3} badgeProps={badgePropsRiskArea} section={sectionFor(props, tbl.lossPotentialEvaluation)}\r\n url={props.url} />,\r\n\r\n riskWeightRest > 0 && <FactBadge key={4} badgeProps={badgePropsRiskAreaRest}\r\n section={sectionFor(props, tbl.lossPotentialResidualEvaluation)} url={props.url}/>,\r\n\r\n (numberOfActions > 0 && props.reportCategory !== ReportCategory.NumeratorReport) &&\r\n <BadgeListActions key={5} count={numberOfActions} {...props as any} />,\r\n\r\n numberOfAttachments > 0 && <BadgeListAttachments key={6} count={numberOfAttachments} {...props as any} />,\r\n\r\n numberOfConnectedCases > 0 && <BadgeListConnectedCases key={7} count={numberOfConnectedCases} {...props as any} />,\r\n\r\n numberOfComments > 0 && <BadgeListComments key={8} count={numberOfComments} {...props as any} />,\r\n\r\n numberOfCauses > 0 && <BadgeListCauses key={9} count={numberOfCauses} {...props as any} />,\r\n\r\n numberOfInvolvedPersons > 0 && <BadgeListInvolvedPersons key={10} count={numberOfInvolvedPersons} {...props as any} />,\r\n\r\n numberOfInvolvedDrugs > 0 && <BadgeListInvolvedDrugs key={11} count={numberOfInvolvedDrugs} {...props as any} />,\r\n\r\n integrityStatus && !!integrityStatus.value && <BadgeListIntegrityStatus key={12} {...props as any} />,\r\n\r\n integrityStatusBarrierEval && !!integrityStatusBarrierEval.value &&\r\n <BadgeListIntegrityStatusBarrierEval key={13} {...props as any} />,\r\n\r\n numberOfChecklistItems > 0 && <BadgeListChecklists key={14} count={numberOfChecklistItems} {...props as any} />,\r\n\r\n numberOfAssessments > 0 && <BadgeListAssessments key={15} count={numberOfAssessments} {...props as any} />\r\n ].filter(i => i);\r\n\r\n const color = riskArea && riskArea.value && riskArea.backgroundColor ? riskArea.backgroundColor : undefined;\r\n\r\n return items.length !== 0 ? <div\r\n className={`${styles.factBoxList} ${wrapperStyleClass} item-count-${totalsExceptActions}`}\r\n style={{ borderColor: toHex(color) }}>\r\n {items}\r\n </div> : null;\r\n};\r\n\r\nexport const FactBox = (props: FactBoxProps) => {\r\n const items = FactboxItems(props);\r\n\r\n return (items || props.numberOfFiles) ? (\r\n <div\r\n id={`${props.componentId}`}\r\n className={`${props.className} ${styles.factBox}`}>\r\n\r\n <FactboxThumbnail {...props}/>\r\n {items}\r\n </div>\r\n ) : null;\r\n};\r\n","export const createFactboxProps = props => {\r\n\r\n const {\r\n riskArea,\r\n riskWeight,\r\n titleRiskArea,\r\n riskAreaRest,\r\n riskWeightRest,\r\n titleRiskAreaRest,\r\n numberOfChecklistItems\r\n } = props;\r\n\r\n const badgePropsRiskArea = {\r\n title: riskArea ? titleRiskArea : undefined,\r\n tooltip: riskArea ? riskArea.description : undefined,\r\n text: !props.hideRiskWeight ? riskWeight : '',\r\n filled: true,\r\n backgroundColor: riskArea ? riskArea.backgroundColor : undefined,\r\n foregroundColor: riskArea ? riskArea.foregroundColor : undefined\r\n };\r\n\r\n const badgePropsRiskAreaRest = {\r\n title: riskAreaRest ? titleRiskAreaRest : undefined,\r\n tooltip: riskAreaRest ? riskAreaRest.description : undefined,\r\n text: !props.hideRiskWeight ? riskWeightRest : '',\r\n filled: false,\r\n backgroundColor: (!!riskAreaRest && !!riskAreaRest.value && riskAreaRest.backgroundColor) ? riskAreaRest.backgroundColor : undefined\r\n };\r\n\r\n const numberOfActions =\r\n props.numberOfActions ? props.numberOfActions.count : 0;\r\n\r\n const numberOfAttachments =\r\n (props.numberOfFiles && props.numberOfFiles.count) +\r\n (props.numberOfLinks && props.numberOfLinks.count);\r\n\r\n const numberOfConnectedCases =\r\n (props.connectedCasesIds && props.connectedCasesIds.length);\r\n\r\n const numberOfComments =\r\n (props.numberOfComments && props.numberOfComments.count) || 0;\r\n\r\n const numberOfCauses =\r\n (props.numberOfCauses && props.numberOfCauses.count) || 0;\r\n\r\n const numberOfInvolvedPersons =\r\n (props.numberOfInvolvedPersons &&\r\n props.numberOfInvolvedPersons.count) ||\r\n 0;\r\n\r\n const numberOfConsequences =\r\n (props.childValueItems &&\r\n props.childValueItems.ActConsConsequenceIcons.length) ||\r\n 0;\r\n\r\n const numberOfInvolvedDrugs =\r\n (props.numberOfInvolvedDrugs &&\r\n props.numberOfInvolvedDrugs.count) ||\r\n 0;\r\n\r\n const numberOfAssessments =\r\n (props.numberOfAssessments &&\r\n props.numberOfAssessments.count) ||\r\n 0;\r\n\r\n // Used to hide empty factboxes using css\r\n const numberOfFiles =\r\n (props.numberOfFiles && props.numberOfFiles.count) || 0;\r\n\r\n const totalsExceptActions =\r\n numberOfFiles +\r\n numberOfAttachments +\r\n numberOfCauses +\r\n numberOfComments +\r\n numberOfInvolvedPersons +\r\n numberOfConnectedCases +\r\n numberOfConsequences +\r\n numberOfInvolvedPersons;\r\n\r\n return {\r\n badgePropsRiskArea,\r\n badgePropsRiskAreaRest,\r\n totalsExceptActions,\r\n numberOfActions,\r\n numberOfAssessments,\r\n numberOfAttachments,\r\n numberOfCauses,\r\n numberOfChecklistItems,\r\n numberOfComments,\r\n numberOfConnectedCases,\r\n numberOfConsequences,\r\n numberOfFiles,\r\n numberOfInvolvedDrugs,\r\n numberOfInvolvedPersons\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { ComponentProps} from 'ui/common/types';\r\nimport { Badge } from 'ui/badge';\r\nimport { BadgeList } from 'ui/badge-list';\r\nimport { ConnectedCasesRiskValueShape, ConnectedCasesIntegrityValueShape, ChildValueItemsShape,\r\n ConnectedCasesActionCountShape} from 'app/area/case/selectors';\r\nimport { Icon } from 'ui/common/icon';\r\nimport MdActions from 'react-icons/lib/md/format-list-numbered';\r\nimport styles from '../fact-box.scss';\r\nimport { toHex } from 'ui/common/hex-converter';\r\nimport {tableName, columnName} from 'app/area/case/case-data-model';\r\nimport { FactboxBadgeProps, FactboxBadgeListProps, FactboxLink, FactBoxHideRiskWeight } from 'app/area/case/components/fact-box/types';\r\nimport { Link } from 'ui/link';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { sectionFor } from 'app/area/case/components/fact-box/section';\r\n\r\nconst ConnectedFact = ({classNames='',section, url, children, urlOpenNew}) => {\r\n const href = section && url ? `${url}?section=${section}` : url;\r\n\r\n const navigateToSection = (e:React.MouseEvent<HTMLElement>) => {\r\n if(e.ctrlKey || e.metaKey) {\r\n return;\r\n }\r\n\r\n if (!urlOpenNew) {\r\n e && e.preventDefault();\r\n section && navigate.toSection(section, url);\r\n }\r\n };\r\n return <li className={`${styles.factItem} ${classNames} ${styles.factLink}`} onClick={navigateToSection}>\r\n <Link url={href} className={styles.factLink}>\r\n {children}\r\n </Link>\r\n </li>;\r\n};\r\n\r\nconst ConnectedBadge = (props: FactboxBadgeProps) => {\r\n const section = props.section;\r\n\r\n return(\r\n <ConnectedFact section={section} url={props.url} urlOpenNew={props.urlOpenNew}>\r\n <Badge\r\n tooltip={props.tooltip}\r\n backgroundColor={props.backgroundColor}\r\n foregroundColor={props.foregroundColor}\r\n filled={props.filled}\r\n text={props.value}\r\n title={props.title}\r\n />\r\n </ConnectedFact>);\r\n};\r\n\r\nconst ConnectedBadgeList = (props: FactboxBadgeListProps) => {\r\n const { classNames, section } = props;\r\n\r\n return(\r\n <ConnectedFact classNames={classNames} url={props.url} section={section} urlOpenNew={props.urlOpenNew}>\r\n <BadgeList\r\n icon={props.icon}\r\n valueItems={props.valueItems}\r\n title={props.title}\r\n />\r\n </ConnectedFact>);\r\n};\r\n\r\nconst ConnectedBadgeListIntegrityStatus = props => {\r\n const {connectedIntegrityStatus, connectedIntegrityScore, titleIntegrityStatus} = props;\r\n\r\n const iconIntegrityStatus = connectedIntegrityStatus ? <Icon url={connectedIntegrityStatus.icon}/> : null;\r\n const score = connectedIntegrityScore && connectedIntegrityScore;\r\n const tooltipIntegrityStatus = connectedIntegrityStatus && connectedIntegrityStatus.description;\r\n const items = [{key: 1, value: score, tooltip: tooltipIntegrityStatus}];\r\n const badgeListPropsConnectedIntegrityStatus = {\r\n title: titleIntegrityStatus,\r\n icon: iconIntegrityStatus,\r\n valueItems: items,\r\n links: props.links,\r\n url: props.url,\r\n urlOpenNew: props.urlOpenNew\r\n };\r\n\r\n return <ConnectedBadgeList \r\n {...badgeListPropsConnectedIntegrityStatus} \r\n classNames=\"\" \r\n section={sectionFor(props, 'IntegrityStatus')} />;\r\n};\r\n\r\nconst ConnectedBadgeListIntegrityStatusBarrierEval= props => {\r\n const { titleIntegrityStatusBarrierEval, integrityStatusBarrierEval } = props;\r\n const iconIntegrityStatus = integrityStatusBarrierEval && (\r\n <Icon url={integrityStatusBarrierEval.icon} />\r\n );\r\n const tooltipIntegrityStatusBarrrierEval =\r\n integrityStatusBarrierEval && integrityStatusBarrierEval.description;\r\n const items = [\r\n { key: 1, value: undefined, tooltip: tooltipIntegrityStatusBarrrierEval }\r\n ];\r\n\r\n const badgeListPropsConnectedIntegrityStatusBarrierEval = {\r\n title: titleIntegrityStatusBarrierEval,\r\n icon: iconIntegrityStatus,\r\n valueItems: items,\r\n links: props.links,\r\n url: props.url,\r\n urlOpenNew: props.urlOpenNew\r\n };\r\n\r\n return <ConnectedBadgeList\r\n {...badgeListPropsConnectedIntegrityStatusBarrierEval}\r\n classNames=\"\"\r\n section={sectionFor(props, 'BarrierEval')} />;\r\n};\r\n\r\nconst ConnectedBadgeListActions = props => {\r\n const {actionCount, closedActionCount, tooltipClosedActions, tooltipNumberOfActions, titleActions} = props;\r\n const items = [{key: 1, value: actionCount, tooltip: tooltipNumberOfActions},\r\n {key: 2, value: closedActionCount , tooltip: tooltipClosedActions,\r\n classNames: (columnName[tableName.action] as any).numberOfClosedActions}];\r\n const badgeListPropsConnectedActions = {\r\n icon: <MdActions/>,\r\n title: titleActions,\r\n valueItems: items,\r\n links: props.links,\r\n url: props.url,\r\n urlOpenNew: props.urlOpenNew\r\n };\r\n\r\n return <ConnectedBadgeList\r\n {...badgeListPropsConnectedActions}\r\n classNames=\"actions-badge\"\r\n section={sectionFor(props, tableName.action)} />;\r\n};\r\n\r\nexport const ConnectedCasesFactbox: React.SFC<ConnectedCasesFooterProps> = props => {\r\n\r\n const renderList = () => {\r\n const {\r\n connectedRiskArea, connectedRiskWeight, connectedRiskAreaRest, connectedRiskWeightRest, connectedIntegrityStatus,\r\n actionCount, titleRiskArea, titleRiskAreaRest, connectedIntegrityStatusBarrierEval, hideRiskWeight } = props;\r\n\r\n const badgePropsConnectedRiskArea = connectedRiskArea && {\r\n title: titleRiskArea,\r\n tooltip: connectedRiskArea.description,\r\n backgroundColor: connectedRiskArea.backgroundColor,\r\n foregroundColor: connectedRiskArea.foregroundColor,\r\n value: !hideRiskWeight ? connectedRiskWeight : '',\r\n links: props.links,\r\n url: props.url,\r\n urlOpenNew: props.urlOpenNew\r\n };\r\n\r\n const badgePropsConnectedRiskAreaRest = connectedRiskAreaRest && {\r\n title: titleRiskAreaRest,\r\n tooltip: connectedRiskAreaRest.description,\r\n filled: false,\r\n backgroundColor: connectedRiskAreaRest.backgroundColor,\r\n value: !hideRiskWeight ? connectedRiskWeightRest : '',\r\n links: props.links,\r\n url: props.url,\r\n urlOpenNew: props.urlOpenNew\r\n };\r\n const bgColor = connectedRiskArea && connectedRiskArea.value && connectedRiskArea.backgroundColor;\r\n const items = [\r\n connectedRiskArea && !!connectedRiskArea.value && \r\n <ConnectedBadge \r\n key=\"1\"\r\n {...badgePropsConnectedRiskArea} \r\n section={sectionFor(props, tableName.lossPotentialEvaluation)} />,\r\n\r\n connectedRiskAreaRest && !!connectedRiskAreaRest.value && \r\n <ConnectedBadge \r\n key=\"2\"\r\n {...badgePropsConnectedRiskAreaRest} \r\n section={sectionFor(props, tableName.lossPotentialResidualEvaluation)} />,\r\n\r\n connectedIntegrityStatus && !!connectedIntegrityStatus.value && \r\n <ConnectedBadgeListIntegrityStatus \r\n key=\"3\"\r\n {...props} />,\r\n \r\n !!actionCount && \r\n <ConnectedBadgeListActions \r\n key=\"4\"\r\n {...props} />,\r\n\r\n connectedIntegrityStatusBarrierEval && !!connectedIntegrityStatusBarrierEval.value && \r\n <ConnectedBadgeListIntegrityStatusBarrierEval \r\n key=\"5\"\r\n {...props} />\r\n ].filter(item => item);\r\n return items.length !== 0 ? (\r\n <ul className={styles.factBoxList} style={{borderColor: toHex(bgColor)}}>\r\n {items}\r\n </ul>\r\n ) : null;\r\n };\r\n\r\n const list = renderList();\r\n return list ? (\r\n <div id={props.componentId} className={`${props.className} ${styles.factBox}`}>\r\n {list}\r\n </div>\r\n ) : null;\r\n};\r\nexport interface ConnectedCasesFooterTranslations extends ComponentProps {\r\n tooltipNumberOfActions: string;\r\n tooltipClosedActions: string;\r\n titleRiskArea?: string;\r\n titleRiskAreaRest?: string;\r\n titleIntegrityStatus?: string;\r\n titleActions?: string;\r\n}\r\n\r\nexport type ConnectedCasesFooterProps =\r\nConnectedCasesRiskValueShape &\r\nConnectedCasesIntegrityValueShape &\r\nConnectedCasesActionCountShape &\r\nChildValueItemsShape &\r\nConnectedCasesFooterTranslations &\r\nComponentProps &\r\nFactBoxHideRiskWeight &\r\nFactboxLink;\r\n","import * as React from 'react';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { getEntityTypeFromStorePath } from 'app/infrastructure/store/entity';\r\nimport styles from './loss-potential-evaluation.scss';\r\nimport { TileProps } from 'ui/tile/tile';\r\nimport { CodeTitleTile } from 'app/components/code-title-tile';\r\n\r\nexport interface LossPotentialEvaluationProps extends TileProps {\r\n lastChild: boolean;\r\n}\r\n\r\nexport class LossPotentialEvaluation extends React.PureComponent<LossPotentialEvaluationProps, any> {\r\n\r\n private hasActiveSibling() {\r\n const { resolveContext } = (this.props as any);\r\n const { activeChildItem } = (this.props as any).hostProps();\r\n\r\n if (activeChildItem && activeChildItem.length > 1) {\r\n\r\n // Select those path elements that might be shared for later comparison.\r\n const partialPath = activeChildItem.slice(0, resolveContext.path.length);\r\n\r\n const activeType = getEntityTypeFromStorePath(partialPath);\r\n const thisType = getEntityTypeFromStorePath(resolveContext.path);\r\n\r\n return activeType === thisType && !deepEquals(partialPath, resolveContext.path);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private hasActiveDescendant() {\r\n const { resolveContext } = (this.props as any);\r\n const { activeChildItem } = (this.props as any).hostProps();\r\n\r\n if (activeChildItem) {\r\n const partialPath = activeChildItem.slice(0, resolveContext.path.length);\r\n return deepEquals(resolveContext.path, partialPath);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public render() {\r\n const { activate, lastChild, label, primaryKey } = this.props;\r\n const { evaluation } = styles;\r\n\r\n // There are two main cases where this should render itself.\r\n const isActiveChildOrHasActiveDescendent = activate || this.hasActiveDescendant();\r\n const isLastChildAndDoesntHaveActiveSibling = lastChild && !this.hasActiveSibling();\r\n\r\n if (!isActiveChildOrHasActiveDescendent && !isLastChildAndDoesntHaveActiveSibling) {\r\n return null;\r\n }\r\n\r\n const primaryKeyAsCode = primaryKey && { description: `${label.text} ${primaryKey.value}`, value: primaryKey.value };\r\n\r\n return (\r\n <CodeTitleTile\r\n {...this.props} primaryKey={primaryKeyAsCode} className={`losspotentialtile ${evaluation}`}\r\n />\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { tableName, columnName } from 'app/area/case/case-data-model';\r\nimport { Entity } from 'app/types-shared';\r\nimport { getPrimaryEntityId, getEntityTypeFromStorePath } from 'app/infrastructure/store/entity';\r\nimport { getValue } from 'app/infrastructure/ui/form/selectors';\r\nimport { TileViewProps } from 'ui/tile-view';\r\nimport { TileView } from 'ui';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { ComponentDescriptor } from 'app/infrastructure/ui/types-uischema';\r\nimport styles from './loss-potential-evaluation-tile-view.scss';\r\n\r\nexport interface LossPotentialEvaluationTileViewProps extends TileViewProps {\r\n componentDescriptor: ComponentDescriptor;\r\n onSelectDocumentItem?: (path?: any) => void;\r\n onAddDocumentItem: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n childEntities: Entity[];\r\n textValidFrom: string;\r\n expandAll?: boolean;\r\n}\r\n\r\nexport class LossPotentialEvaluationTileView extends React.PureComponent<LossPotentialEvaluationTileViewProps, any> {\r\n private dateIntlOption: any = { weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' };\r\n\r\n private handleChange = (e: any) => {\r\n const { onSelectDocumentItem, childEntities } = this.props;\r\n onSelectDocumentItem && childEntities &&\r\n onSelectDocumentItem(childEntities.find(c => JSON.stringify(c.id) === e.target.value).id);\r\n }\r\n\r\n private onAddDocumentItem = () => {\r\n const { createDate, componentDescriptor } = this.props;\r\n const { entityTypePath } = componentDescriptor;\r\n\r\n let initialValues = undefined;\r\n\r\n if (entityTypePath[entityTypePath.length - 1] === tableName.lossPotentialEvaluation) {\r\n initialValues = {\r\n PotRiskEvValidFrom: [{ value: createDate() }]\r\n };\r\n } else {\r\n initialValues = {\r\n ResPotRiskEvValidFrom: [{ value: createDate() }]\r\n };\r\n }\r\n\r\n this.props.onAddDocumentItem(true, {\r\n initialValues\r\n });\r\n }\r\n\r\n private getMatchingId() {\r\n const { childEntities } = this.props;\r\n const { activeChildItem } = (this.props as any).hostProps();\r\n\r\n if (!childEntities || childEntities.length === 0) {\r\n return '';\r\n }\r\n\r\n // By default we select the last item if a descendant is not active.\r\n const defaultMatchingId = childEntities.reverse()[childEntities.length - 1].id;\r\n\r\n // 1. There is no active child item or it is the top level item.\r\n if (!activeChildItem || activeChildItem.length === 1) {\r\n return defaultMatchingId;\r\n }\r\n\r\n // Select those path elements that might be shared for later comparison.\r\n const partialPath = activeChildItem.slice(0, defaultMatchingId.length);\r\n\r\n const activeType = getEntityTypeFromStorePath(partialPath);\r\n const thisType = getEntityTypeFromStorePath(defaultMatchingId);\r\n\r\n // 2. The active child item might be a descendant.\r\n if (activeType === thisType) {\r\n return partialPath;\r\n }\r\n\r\n return defaultMatchingId;\r\n }\r\n\r\n public render() {\r\n const { childEntities, textValidFrom, formatDate, componentDescriptor } = this.props;\r\n const { selectEvaluation } = styles;\r\n const { entityTypePath } = componentDescriptor;\r\n\r\n let selectElement = undefined;\r\n\r\n if (childEntities && childEntities.length > 0) {\r\n const validFromFieldName = (columnName[entityTypePath[entityTypePath.length - 1]] as { validFrom: string }).validFrom;\r\n\r\n const values = childEntities.reverse().map(child => {\r\n const pk = getPrimaryEntityId(child);\r\n const validFrom = getValue(child, validFromFieldName).value;\r\n\r\n return <option key={`option-${pk}`} value={JSON.stringify(child.id)}>\r\n #{pk} - {textValidFrom} {formatDate(validFrom as Date, this.dateIntlOption)}\r\n </option>;\r\n });\r\n\r\n selectElement = values.length > 1 && (\r\n <div className={`d-flex justify-content-end ${selectEvaluation}`}>\r\n <div className=\"select-wrapper\">\r\n <select className=\"form-control\" id=\"select-evaluation\"\r\n value={JSON.stringify(this.getMatchingId())}\r\n onChange={this.handleChange}>\r\n <option disabled hidden value=\"\" />\r\n {values}\r\n </select>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n return (\r\n <TileView {...this.props}\r\n onAddDocumentItem={this.onAddDocumentItem} rowClassName=\"col-12\"\r\n >\r\n <div>\r\n {selectElement}\r\n {this.props.children}\r\n </div>\r\n </TileView>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { RiskValueShape } from 'app/area/case/selectors';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { Badge, ButtonSecondary } from 'ui';\r\nimport { TooltipDirections } from 'ui/common/tooltip/tooltip';\r\nimport styles from './loss-potential-consequence-evaluation.scss';\r\n\r\ninterface Translations {\r\n textRiskArea: string;\r\n textRate: string;\r\n}\r\n\r\nexport interface LossPotentialConsequenceEvaluationProps extends ConnectedComponentProps, RiskValueShape, Translations { }\r\n\r\nexport class LossPotentialConsequenceEvaluation extends React.PureComponent<LossPotentialConsequenceEvaluationProps, any> {\r\n\r\n private handleSelect = (e?: any) => {\r\n e && e.preventDefault();\r\n\r\n this.props.onSelectDocumentItem && this.props.onSelectDocumentItem();\r\n }\r\n\r\n public render() {\r\n const {\r\n textRate, riskArea, riskWeight, textRiskArea\r\n } = this.props;\r\n\r\n const { riskArea: riskAreaClass, rateButton } = styles;\r\n\r\n const hasRiskArea = !!riskArea && !!riskArea.value;\r\n\r\n const riskAreaNode = hasRiskArea && <div className={riskAreaClass}>\r\n <Badge\r\n title={textRiskArea}\r\n tooltip={riskArea.description}\r\n tooltipDirection={TooltipDirections.top}\r\n backgroundColor={riskArea.backgroundColor}\r\n foregroundColor={riskArea.foregroundColor}\r\n filled={true}\r\n text={riskWeight as any}\r\n /></div>;\r\n\r\n const rateLabel = !hasRiskArea && <ButtonSecondary onClick={this.handleSelect} style={rateButton}>{textRate}</ButtonSecondary>;\r\n\r\n return riskAreaNode || rateLabel;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui';\r\nimport styles from './section-summary.scss';\r\nimport { Label } from 'ui';\r\n\r\n /**\r\n * Renders a simplified non-connect'ed component for each child, with the purpose of re-using the configured\r\n * domain type and domain attributes for each child when displaying the summary.\r\n */\r\nexport const SectionSummary: React.SFC<ComponentProps> = (props) => {\r\n const {\r\n className, \r\n label, \r\n componentId,\r\n children\r\n } = props;\r\n \r\n const contents = React.Children.map(children, (child, i) => {\r\n return <li>{child}</li>;\r\n });\r\n\r\n return (\r\n contents && contents.length ?\r\n <div id={componentId} className={className}> \r\n <div className={styles.sectionSummary}> \r\n {label && label.visible && \r\n <h3><Label label={props.label}/></h3>} \r\n <ul>{contents}</ul>\r\n </div>\r\n </div>\r\n : null);\r\n};\r\n","import * as React from 'react';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport { CodeSelectorTileView, CodeSelectorTileViewProps } from 'app/components/code-selector-tile-view';\r\n\r\nexport interface PreselectedCodeTileViewProps extends CodeSelectorTileViewProps {\r\n codeDataTag: string;\r\n}\r\n\r\nexport class PreselectedCodeTileView extends React.PureComponent<PreselectedCodeTileViewProps, any> {\r\n\r\n private onAddDocumentItem = (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => {\r\n\r\n const { codeDataTag } = this.props;\r\n\r\n const code = options.initialValues.primaryKey as ComplexValue<number>;\r\n\r\n const initialValues = codeDataTag && {\r\n [codeDataTag]: [code]\r\n };\r\n\r\n this.props.onAddDocumentItem(selectAddedItem, {\r\n childId: undefined, //Numerator, ignore the code id from code selector tile view.\r\n initialValues\r\n });\r\n }\r\n\r\n public render() {\r\n return (\r\n <CodeSelectorTileView {...this.props}\r\n onAddDocumentItem={this.onAddDocumentItem}\r\n existingKeys={[]}\r\n rowClassName={this.props.rowClassName || 'col-12'}\r\n />\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport { OnClickOutside } from 'ui/common/on-click-outside';\r\nimport { ButtonPrimary, Textbox } from 'ui';\r\nimport { ValidationLevel } from 'ui/common';\r\nimport { withOpenState, OpenStateInjectedProps } from 'ui/common/enhancers';\r\nimport { AddButton } from 'ui';\r\nimport { isValidUrl } from 'app/infrastructure/validation/url'; \r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport styles from './attach-link-selector.scss';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { HotKeys } from 'react-hotkeys';\r\n\r\ninterface AttachLinkSelectorTranslationsProps {\r\n textAddItem?: string; \r\n textLinkTitle?: string;\r\n textLinkUrl?: string;\r\n textDone?: string;\r\n textInvalidUrlMessage?: string;\r\n placeholderLinkUrl?: string;\r\n textRequiredError?: string; \r\n}\r\n\r\nexport interface AttachLinkSelectorProps extends AttachLinkSelectorTranslationsProps{ \r\n readOnly?: boolean;\r\n required?: boolean; \r\n onAddDocumentItem?: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void; \r\n valueFormatter?: (title: string, linkUrl: string) => any;\r\n onSelectDocumentItem?: (path?: any) => void;\r\n details?: () => void;\r\n}\r\n\r\ninterface AttachLinkSelectorState {\r\n inputTitle: string;\r\n inputLinkUrl: string;\r\n invalidUrl: boolean;\r\n requiredErrorTitle?: boolean;\r\n requiredErrorLink?: boolean;\r\n}\r\n\r\nexport class AttachLinkSelectorComponent \r\n extends React.PureComponent<AttachLinkSelectorProps & OpenStateInjectedProps, AttachLinkSelectorState> {\r\n private keyMap: any;\r\n private handlers: any;\r\n public constructor(props: AttachLinkSelectorProps & OpenStateInjectedProps) {\r\n super(props); \r\n this.state = {inputTitle: '', inputLinkUrl: '', invalidUrl: false, requiredErrorTitle: false, requiredErrorLink: false};\r\n \r\n this.keyMap = {\r\n onEnter: [keyCodeTypes.Enter]\r\n };\r\n \r\n this.handlers = {\r\n onEnter: (event) => this.addLinkItem()\r\n };\r\n }\r\n\r\n private closeDialog = () => { \r\n const {isOpen, close} = this.props;\r\n if (!isOpen) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n ...this.state,\r\n ...{\r\n inputTitle: '', \r\n inputLinkUrl: '',\r\n invalidUrl: false,\r\n requiredErrorTitle: false,\r\n requiredErrorLink: false \r\n }\r\n }, () => close());\r\n }\r\n\r\n private onChangeTitle = (value: string) => { \r\n if(this.isValueEmpty(value)) {\r\n this.setState({ inputTitle: value, requiredErrorTitle: true});\r\n return;\r\n } \r\n this.setState({inputTitle: value, requiredErrorTitle: false});\r\n }\r\n\r\n private onChangeLinkUrl = (value: string) => {\r\n if(this.isValueEmpty(value)) {\r\n this.setState({ inputLinkUrl: value, requiredErrorLink: true});\r\n return;\r\n } \r\n this.setState({inputLinkUrl: value, invalidUrl: false, requiredErrorLink: false}); \r\n }\r\n\r\n private isValueEmpty = (value: string): boolean => { \r\n return !(value.trim().length);\r\n }\r\n\r\n private onBlurLinkUrl = (value: string)=> {\r\n if(!isValidUrl(value)) {\r\n this.setState({invalidUrl: true});\r\n return false; \r\n }\r\n this.setState({inputLinkUrl: value, invalidUrl: false});\r\n return true;\r\n }\r\n \r\n private addLinkItem = () => {\r\n const {inputTitle, inputLinkUrl} = this.state; \r\n const allowAddingLinkItem = isValidUrl(inputLinkUrl) && !this.isValueEmpty(inputTitle);\r\n\r\n this.isValueEmpty(inputTitle) && this.setState({requiredErrorTitle: true});\r\n this.isValueEmpty(inputLinkUrl) && this.setState({requiredErrorLink: true});\r\n !isValidUrl(inputLinkUrl.trim()) && this.setState({invalidUrl: true});\r\n \r\n if(this.props.onAddDocumentItem && allowAddingLinkItem) { \r\n const args = this.props.valueFormatter \r\n && this.props.valueFormatter(this.state.inputTitle, this.state.inputLinkUrl);\r\n this.props.onAddDocumentItem(false, { initialValues: args } as AddDocumentItemOptions);\r\n this.closeDialog(); \r\n } \r\n }\r\n\r\n private addSelectorContents = () => {\r\n const { textDone, textLinkTitle, textLinkUrl, textInvalidUrlMessage, placeholderLinkUrl, textRequiredError} = this.props;\r\n const {inputTitle, inputLinkUrl, invalidUrl, requiredErrorTitle, requiredErrorLink} = this.state;\r\n const labelLinkTitle = {visible: true, text: textLinkTitle, required: true};\r\n const labelLinkUrl = {visible: true, text: textLinkUrl, required: true}; \r\n const errorParamsInvalidUrl = {level: ValidationLevel.error,\r\n messages: [{level: ValidationLevel.error, message: `${textInvalidUrlMessage}`}]\r\n }; \r\n const errorParamsRequired = {level: ValidationLevel.error,\r\n messages: [{level: ValidationLevel.error, message: `${textRequiredError}`}]\r\n };\r\n const validationTitle = this.isValueEmpty(inputTitle) && requiredErrorTitle && errorParamsRequired;\r\n const validationLinkUrl = (this.isValueEmpty(inputLinkUrl) && requiredErrorLink) && errorParamsRequired \r\n || invalidUrl && errorParamsInvalidUrl; \r\n \r\n const titleTextarea = <Textbox \r\n componentId={'link-title'}\r\n className={`${'input-link-title'}`} \r\n value={inputTitle}\r\n onChange={this.onChangeTitle}\r\n label={labelLinkTitle} \r\n maxLength={4000} \r\n validation={validationTitle} \r\n />;\r\n\r\n const linkUrlTextarea = <Textbox \r\n componentId={'link-url'}\r\n className={`${'input-link-url'}`} \r\n value={inputLinkUrl} \r\n onChange={this.onChangeLinkUrl}\r\n onBlur={this.onBlurLinkUrl}\r\n label={labelLinkUrl}\r\n validation={validationLinkUrl}\r\n placeholder={placeholderLinkUrl} \r\n maxLength={4000} \r\n />; \r\n \r\n const addButton = <div className=\"d-flex justify-content-end\">\r\n <ButtonPrimary onClick={this.addLinkItem} >\r\n {textDone}\r\n </ButtonPrimary>\r\n </div>;\r\n \r\n return(<>\r\n {titleTextarea}\r\n {linkUrlTextarea}\r\n {addButton} \r\n </>);\r\n }\r\n\r\n private renderSelectDialog() { \r\n \r\n return (\r\n <DialogExpander selectExpander={true} onClose={this.closeDialog} hasFooter={false}> \r\n {this.props.onAddDocumentItem && this.addSelectorContents()} \r\n </DialogExpander>\r\n );\r\n }\r\n\r\n public render() {\r\n const {\r\n open, \r\n readOnly, \r\n required,\r\n isOpen,\r\n textAddItem \r\n } = this.props;\r\n\r\n if (readOnly) {\r\n return null;\r\n }\r\n\r\n const addButton = <AddButton icon={mdPlus} onClick={open} required={required}>\r\n {textAddItem}\r\n </AddButton>;\r\n \r\n return isOpen ? \r\n \r\n <OnClickOutside onClickOutside={this.closeDialog}>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}> \r\n <div className={styles.attachLinkSelector}> \r\n {this.props.onAddDocumentItem && addButton} \r\n {this.renderSelectDialog()} \r\n </div> \r\n </HotKeys>\r\n </OnClickOutside>\r\n \r\n :\r\n\r\n <div className={styles.attachLinkSelector}> \r\n {this.props.onAddDocumentItem && addButton} \r\n </div>; \r\n }\r\n}\r\n\r\nconst c = withOpenState()(AttachLinkSelectorComponent);\r\n\r\nexport { c as AttachLinkSelector };\r\n","import * as React from 'react';\r\nimport { RowContainerComponentProps } from 'ui/common/types';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { TileView } from 'ui';\r\nimport { AttachLinkSelector } from '../attach-link-selector/attach-link-selector';\r\n\r\nexport interface AttachLinkTileViewProps extends RowContainerComponentProps {\r\n onAddDocumentItem: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n textAddItem: string;\r\n textLinkTitle?: string;\r\n textLinkUrl?: string;\r\n textDone?: string;\r\n textInvalidUrlMessage?: string; \r\n placeholderLinkUrl?: string; \r\n}\r\n\r\nexport const AttachLinkTileView: React.SFC<AttachLinkTileViewProps> = (props: AttachLinkTileViewProps) => {\r\n \r\n const required = props.label && props.label.required;\r\n \r\n const addButton = <AttachLinkSelector {\r\n ...{\r\n required, children: undefined, ...props\r\n }} \r\n />;\r\n \r\n return ( \r\n <div id={props.componentId} className={`col-12 ${props.className}`}>\r\n <div className=\"row\">\r\n <TileView {...{addButton, rowClassName:'col-md-6', ...props}}/>\r\n </div>\r\n </div>\r\n );\r\n };\r\n","import * as React from 'react';\r\nimport { RowComponentProps } from 'ui/common/types';\r\nimport { MeatballMenu, Permission, PromptConfirmationModal } from 'ui';\r\nimport { ButtonPrimary } from 'ui';\r\nimport { isValidUrl } from 'app/infrastructure/validation/url';\r\nimport styles from './attach-link-tile.scss';\r\nimport { OnClickOutside } from 'ui/common/on-click-outside';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { HotKeys } from 'react-hotkeys';\r\n\r\n/**\r\n * @interface AttachLinkTileProps\r\n * Properties for AttachLinkTile component.\r\n */\r\nexport interface AttachLinkTileProps extends RowComponentProps {\r\n /**\r\n * The text for title in the confimation modal\r\n */\r\n textTitle?: string;\r\n /**\r\n * The text for description in the confimation modal\r\n */\r\n textConfirmDelete?: string;\r\n /**\r\n * The label text for the cancel button in the confimation modal\r\n */\r\n textCancel?: string;\r\n /**\r\n * The label text for the delete button in the confimation modal\r\n */\r\n textDelete?: string;\r\n /**\r\n * The label text for the edit button in the context menu\r\n */\r\n textEditItem?: string; \r\n /**\r\n * The label text for the done button when editing a link\r\n */\r\n textDone?: string;\r\n\r\n onSelectDocumentItem?: (path?: any) => void;\r\n\r\n /**\r\n * @internal\r\n */\r\n children?: any;\r\n linkUrl?: any;\r\n}\r\n\r\nexport interface AttachLinkTileState {\r\n isEditing: boolean; \r\n}\r\n\r\n/**\r\n * Creates AttachLinkTile component. Represents each block of listed attached links.\r\n *\r\n */\r\nexport class AttachLinkTile extends React.Component<AttachLinkTileProps, AttachLinkTileState> { \r\n private keyMap: any;\r\n private handlers: any;\r\n constructor(props: AttachLinkTileProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isEditing: false\r\n };\r\n this.keyMap = {\r\n onEnter: [keyCodeTypes.Enter]\r\n };\r\n \r\n this.handlers = {\r\n onEnter: (event) => this.doneEditing()\r\n };\r\n }\r\n\r\n private handleDeleteItem = (e?: React.MouseEvent<any>) => {\r\n if (this.props.onDeleteDocumentItem) {\r\n this.props.onDeleteDocumentItem();\r\n }\r\n };\r\n\r\n private onEdit = (e: any) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.setState({ isEditing: true } as AttachLinkTileState);\r\n }\r\n\r\n private doneEditing = () => { \r\n this.setState({\r\n isEditing: false\r\n });\r\n }\r\n\r\n public render() {\r\n\r\n const deleteConfirmationModal =\r\n <PromptConfirmationModal\r\n title={this.props.textDelete}\r\n description={this.props.textConfirmDelete}\r\n continueText={this.props.textDelete}\r\n cancelText={this.props.textCancel}\r\n onContinue={this.handleDeleteItem}>\r\n\r\n <button type=\"button\" className=\"dropdown-item\">{this.props.textDelete}</button>\r\n </PromptConfirmationModal>;\r\n\r\n const editButton = <button type=\"button\" className=\"dropdown-item\" onClick={this.onEdit}>\r\n {this.props.textEditItem}\r\n </button>;\r\n\r\n const contextMenu = this.state.isEditing ? null :\r\n <Permission requireAny=\"remove\" permissions={this.props.enabledChildEntityOperations}>\r\n <div className={styles.attachLinkMenu}>\r\n <MeatballMenu>\r\n <Permission permissions={this.props.enabledChildEntityOperations} isListElement={true}>\r\n {editButton}\r\n </Permission>\r\n <Permission requireAll=\"remove\" permissions={this.props.enabledChildEntityOperations} isListElement={true}>\r\n {deleteConfirmationModal}\r\n </Permission> \r\n </MeatballMenu>\r\n </div>\r\n </Permission>;\r\n\r\n const url = this.props.linkUrl && this.props.linkUrl.valueObject && this.props.linkUrl.valueObject.value;\r\n\r\n const editMode = <div className={`${styles.attachLinkTile} ${styles.editMode}`}> \r\n <OnClickOutside onClickOutside={this.doneEditing}>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n {this.props.details}\r\n <div className=\"d-flex justify-content-end\">\r\n <ButtonPrimary onClick={this.doneEditing}>{this.props.textDone}</ButtonPrimary>\r\n </div>\r\n </HotKeys>\r\n </OnClickOutside>\r\n </div>;\r\n\r\n const readMode = isValidUrl(url) ?\r\n <a href={url} target=\"_blank\" rel=\"noopener noreferrer\" className={styles.attachLinkTile}>{this.props.children}</a>\r\n :\r\n <div className={`${styles.attachLinkTile} ${styles.invalidUrl}`}>{this.props.children}</div>;\r\n\r\n return (\r\n <div id={this.props.componentId} className={styles.attachLinkTileWrapper}>\r\n {contextMenu}\r\n {this.state.isEditing ? editMode : readMode }\r\n </div>\r\n );\r\n }\r\n\r\n}\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui';\r\nimport styles from './summary-tile-view.scss';\r\n\r\ninterface SummaryTileViewProps extends ComponentProps {\r\n /**\r\n * The displayed text when there is no data to display\r\n */\r\n textNoData?: string;\r\n doubleWidth?: boolean;\r\n hideLabelIfNoData?: boolean;\r\n}\r\n\r\nexport const SummaryTileView: React.SFC<SummaryTileViewProps> = (props) => {\r\n const {\r\n componentId,\r\n className,\r\n label,\r\n children,\r\n textNoData,\r\n doubleWidth,\r\n hideLabelIfNoData\r\n } = props;\r\n\r\n const { container, items, item, itemsWrapper, summaryTileView } = styles;\r\n const hasChildren = !!React.Children.count(props.children);\r\n\r\n const childItems = <div className={itemsWrapper}>\r\n <div className={items}>\r\n {\r\n React.Children.map(children, (child, i) =>\r\n <span className={`${item} ${doubleWidth ? styles.doubleWidth : ''}`}>\r\n {child}\r\n </span>\r\n )\r\n }\r\n </div>\r\n </div>;\r\n\r\n const noContentsWrapper = <p className=\"no-content\">{textNoData}</p>;\r\n const contents = hasChildren ? childItems : noContentsWrapper; \r\n const shouldHideLabelIfNoData = hideLabelIfNoData && !hasChildren;\r\n const showLabel = label && label.visible && !shouldHideLabelIfNoData; \r\n\r\n return <div id={componentId} className={`col-12 ${className} ${summaryTileView}`}>\r\n <div className={container}>\r\n {showLabel && <h3>{label.text}</h3>}\r\n {contents}\r\n </div>\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { ModalWrapper, ModalWrapperProps } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { ComplexValue, SelectMultipleHierarchy, LoadOptions, DisplayCodes } from 'ui';\r\nimport { isNumeric } from 'app/infrastructure/data/number';\r\nimport { Translations } from 'ui/common/select/types';\r\n\r\nexport interface MultiSelectReferenceModalTranslations extends Translations {\r\n textTitle: string;\r\n textPlaceholderSearch: string;\r\n}\r\n\r\nexport interface MultiSelectReferenceModalProps extends ModalWrapperProps, MultiSelectReferenceModalTranslations {\r\n multipleSelectReferencesToBeAdded: ComplexValue<number>[];\r\n fetchingModalOptions: boolean;\r\n referenceModalOptions: ComplexValue<number>[];\r\n onLoadOptions: (loadOptions: LoadOptions) => void;\r\n onAddDocumentItem: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n referenceCodeDataTag: string;\r\n referenceOptionDataTag: string;\r\n}\r\n\r\nexport interface MultiSelectReferenceModalState {\r\n fetching: boolean;\r\n selectedOptionsPerReference: { [reference: number]: ComplexValue<number>[] };\r\n mostRecentLoadOptionsPerReference: { [reference: number]: LoadOptions };\r\n}\r\n\r\nexport class MultiSelectReferenceModal extends React.PureComponent<MultiSelectReferenceModalProps, MultiSelectReferenceModalState> {\r\n public state: Readonly<MultiSelectReferenceModalState> = {\r\n fetching: false,\r\n selectedOptionsPerReference: {},\r\n mostRecentLoadOptionsPerReference: {}\r\n };\r\n\r\n private onDone = () => {\r\n\r\n const { multipleSelectReferencesToBeAdded, referenceCodeDataTag, referenceOptionDataTag } = this.props;\r\n\r\n if (!referenceCodeDataTag || !referenceOptionDataTag) {\r\n return;\r\n }\r\n\r\n for (const reference of multipleSelectReferencesToBeAdded) {\r\n const selectedOptions = this.state.selectedOptionsPerReference[reference.value];\r\n\r\n if (!selectedOptions) {\r\n continue;\r\n }\r\n\r\n for (const option of selectedOptions) {\r\n\r\n this.props.onAddDocumentItem(false,\r\n {\r\n initialValues: {\r\n [referenceCodeDataTag]: [reference],\r\n [referenceOptionDataTag]: [option]\r\n }\r\n }\r\n );\r\n }\r\n }\r\n }\r\n\r\n private onLoadOptions = (loadOptions: LoadOptions, referenceId: number) => {\r\n // This is a hack to support hiearchical selectors.\r\n // It would be much cleaner if the \"options\" prop included the options used to fetch it.\r\n this.setState({\r\n ...this.state,\r\n mostRecentLoadOptionsPerReference: {\r\n ...this.state.mostRecentLoadOptionsPerReference,\r\n [referenceId]: loadOptions\r\n }\r\n });\r\n // This hardcoded domain is to get reference options.\r\n this.props.onLoadOptions({...loadOptions, domainId: 11938, categoryId: referenceId});\r\n }\r\n\r\n private onSelectedOptionsChanged = (options: ComplexValue<number>[], referenceId: number) => {\r\n this.setState({\r\n ...this.state,\r\n selectedOptionsPerReference: {\r\n ...this.state.selectedOptionsPerReference,\r\n [referenceId]: options\r\n }\r\n });\r\n }\r\n\r\n private createOnChange = (referenceId: number) => values => this.onSelectedOptionsChanged(values, referenceId);\r\n\r\n private createLoadOptions = (referenceId: number) => (loadOptions: LoadOptions) => this.onLoadOptions(loadOptions, referenceId);\r\n\r\n private renderReferenceOptionsSelector(reference: ComplexValue<number>) {\r\n const {\r\n textOptionsDone,\r\n textOptionsLoadError,\r\n textOptionsNotFound,\r\n textOptionsTitle,\r\n textSelectFromList,\r\n textPlaceholderSearch,\r\n fetchingModalOptions,\r\n referenceModalOptions\r\n } = this.props;\r\n const { selectedOptionsPerReference, mostRecentLoadOptionsPerReference } = this.state;\r\n const referenceId = reference.value;\r\n\r\n return <div key={`${referenceId}-wrapper`}>\r\n <DisplayCodes {...({componentId: `${referenceId}-code`, className: 'display-codes-read', valueItems: [reference] } as any)} />\r\n <SelectMultipleHierarchy\r\n componentId={`${referenceId}-selector`} className={undefined}\r\n valueItems={selectedOptionsPerReference[reference.value] || []}\r\n options={referenceModalOptions || []}\r\n fetching={fetchingModalOptions}\r\n onChange={this.createOnChange(referenceId)}\r\n onLoadOptions={this.createLoadOptions(referenceId)}\r\n textOptionsDone={textOptionsDone} textOptionsLoadError={textOptionsLoadError}\r\n textOptionsNotFound={textOptionsNotFound} textOptionsTitle={textOptionsTitle}\r\n textSelectFromList={textSelectFromList}\r\n loadOptions={mostRecentLoadOptionsPerReference[referenceId]}\r\n placeholder={textPlaceholderSearch}\r\n />\r\n </div>;\r\n }\r\n\r\n public render() {\r\n const {\r\n multipleSelectReferencesToBeAdded,\r\n textTitle,\r\n textOptionsDone\r\n } = this.props;\r\n\r\n const referenceSelectors = multipleSelectReferencesToBeAdded &&\r\n multipleSelectReferencesToBeAdded\r\n .filter(r => isNumeric(r.value))\r\n .map(r => this.renderReferenceOptionsSelector(r));\r\n\r\n return (\r\n <ModalWrapper {...this.props}\r\n headerTitle={textTitle}\r\n btnTitle={textOptionsDone}\r\n onDone={this.onDone}\r\n >\r\n {referenceSelectors}\r\n </ModalWrapper>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { ComplexValue } from 'ui';\r\nimport { PreselectedCodeTileViewProps, PreselectedCodeTileView } from 'app/area/case/components';\r\nimport { MultiSelectReferenceModal } from './multi-select-reference-modal';\r\nimport { StoreField } from 'app/types-shared';\r\nimport { Translations } from 'ui/common/select/types';\r\n\r\nexport interface ReferenceSelectTileViewTranslations extends Translations {\r\n textMultiSelectOptionsModalTitle: string;\r\n}\r\n\r\nexport interface ReferenceSelectTileViewProps extends PreselectedCodeTileViewProps, ReferenceSelectTileViewTranslations {\r\n fetchingModalOptions: boolean;\r\n referenceModalOptions: ComplexValue<number>[];\r\n referenceOptionDataTag: string;\r\n}\r\n\r\nexport interface ReferenceSelectTileViewState {\r\n multipleSelectReferencesToBeAdded: ComplexValue<number>[];\r\n}\r\n\r\nexport class ReferenceSelectTileView extends React.PureComponent<ReferenceSelectTileViewProps, any> {\r\n\r\n public state: Readonly<any> = {\r\n multipleSelectReferencesToBeAdded: []\r\n };\r\n\r\n private onAddReference = (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => {\r\n\r\n const { codeDataTag } = this.props;\r\n\r\n const codeValue = options.initialValues && options.initialValues[codeDataTag] as StoreField[];\r\n\r\n // Special handling of multiple select reference type.\r\n if(codeValue && codeValue[0] && codeValue[0].categoryId === 5) {\r\n this.setState((prevState) => ({\r\n ...prevState,\r\n multipleSelectReferencesToBeAdded: [\r\n ...prevState.multipleSelectReferencesToBeAdded,\r\n codeValue[0]\r\n ]\r\n }));\r\n }\r\n else {\r\n this.props.onAddDocumentItem(selectAddedItem, options);\r\n }\r\n }\r\n\r\n private clearMultipleSelectReferencesToBeAdded = () => {\r\n this.setState({\r\n ...this.state,\r\n multipleSelectReferencesToBeAdded: []\r\n });\r\n }\r\n\r\n public render() {\r\n const { multipleSelectReferencesToBeAdded } = this.state;\r\n const {\r\n codeDataTag: referenceCodeDataTag,\r\n onLoadOptions, onAddDocumentItem,\r\n textDone: textOptionsDone, placeholderSearch,\r\n textMultiSelectOptionsModalTitle\r\n } = this.props;\r\n\r\n const multipleSelectModal =\r\n multipleSelectReferencesToBeAdded && multipleSelectReferencesToBeAdded.length > 0 &&\r\n <MultiSelectReferenceModal\r\n {...this.props}\r\n textTitle={textMultiSelectOptionsModalTitle}\r\n textOptionsDone={textOptionsDone}\r\n multipleSelectReferencesToBeAdded={multipleSelectReferencesToBeAdded}\r\n referenceCodeDataTag={referenceCodeDataTag}\r\n onClose={this.clearMultipleSelectReferencesToBeAdded}\r\n onDone={this.clearMultipleSelectReferencesToBeAdded}\r\n onLoadOptions={onLoadOptions}\r\n onAddDocumentItem={onAddDocumentItem}\r\n textPlaceholderSearch={placeholderSearch}\r\n />;\r\n\r\n return (\r\n <>\r\n {multipleSelectModal}\r\n <PreselectedCodeTileView {...this.props}\r\n onAddDocumentItem={this.onAddReference}\r\n existingKeys={[]}\r\n rowClassName={this.props.rowClassName || 'col-md-6 col-xl-4'}\r\n />\r\n </>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComponentProps, ButtonSecondary, Validation, ValidationLevel, ValidationProps } from 'ui';\r\nimport styles from './add-new-case-button.scss';\r\nimport { NavigateToNewDraftInjectedProps, withNavigateToNewDraft } from 'app/area/case/components/enhancers/navigate-to-new-draft';\r\nimport { containerFactory } from 'app/infrastructure/redux/container-factory';\r\nimport { actionCreators } from 'app/area/case/draft/actions';\r\nimport { STATE } from 'app/constants';\r\n\r\ninterface AddNewCaseButtonProps extends ComponentProps, NavigateToNewDraftInjectedProps {\r\n readOnly?: boolean;\r\n validation?: ValidationProps;\r\n doWhenIdle: (func: any, info: string)=>void;\r\n textSavingInfo: string;\r\n}\r\n\r\nclass AddNewCaseButtonComponent extends React.PureComponent<AddNewCaseButtonProps> {\r\n public static statePath: string = STATE.app;\r\n\r\n private handleClick = (e?: any) => {\r\n const {doWhenIdle, navigateToNewDraft, textSavingInfo} = this.props;\r\n e && e.preventDefault();\r\n\r\n doWhenIdle && doWhenIdle(navigateToNewDraft, textSavingInfo) ;\r\n }\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n className,\r\n label,\r\n readOnly,\r\n validation\r\n } = this.props;\r\n\r\n const {\r\n buttonWrapper\r\n } = styles;\r\n\r\n const errorParams = {\r\n level: ValidationLevel.error,\r\n messages: [{level: ValidationLevel.error,\r\n message: validation && validation.messages && validation.messages.map(m=>`${m.label}: ${m.message}`).join('\\n')}]\r\n };\r\n\r\n const hasValidationErrors = (validation && !!validation.messages.length);\r\n const validationErrorStyle = hasValidationErrors && styles.validationError;\r\n\r\n return (\r\n readOnly ? null :\r\n <div id={componentId} className={`${styles.buttonContainer} ${className}`}>\r\n <div className={`${buttonWrapper} ${className}`}>\r\n <ButtonSecondary id={`${componentId}-button`} classNames={validationErrorStyle} onClick={this.handleClick}>\r\n {label && label.required && <span className=\"asterisk-required\">* </span>}\r\n {label && label.text}\r\n </ButtonSecondary>\r\n {validation && <Validation {...errorParams}/>}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst c = containerFactory(withNavigateToNewDraft(AddNewCaseButtonComponent), actionCreators, undefined);\r\n\r\nexport { c as AddNewCaseButton };\r\n","import * as React from 'react';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { serializeConnectionState } from 'app/area/case/draft/connected-state';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { nextSequenceValue } from 'app/area/case/features/connected-cases/sequence';\r\nimport { STATE } from 'app/constants';\r\n\r\n/**\r\n * This interface is used by the wrapped component to know what to expect from this higher-order component.\r\n */\r\nexport interface NavigateToNewDraftInjectedProps {\r\n navigateToNewDraft: () => void;\r\n}\r\n\r\ninterface NavigateToNewDraftProps {\r\n entityId: number;\r\n caseType: number;\r\n connectionTypeId: number;\r\n maxSequence: number;\r\n connectedDrafts?: any[];\r\n}\r\n\r\n/**\r\n * Provides property to navigate to a new draft of the provided case type.\r\n */\r\nexport const withNavigateToNewDraft = <P extends {}> (\r\n WrappedComponent: (React.ComponentClass<P & NavigateToNewDraftInjectedProps> | React.SFC<P & NavigateToNewDraftInjectedProps>)\r\n): React.ComponentClass<P & NavigateToNewDraftProps> => {\r\n return class extends React.PureComponent<P & NavigateToNewDraftProps> {\r\n public static statePath: string = STATE.app;\r\n\r\n private getNextSequenceValue = () => nextSequenceValue(this.props.maxSequence);\r\n\r\n private navigateToNewDraft = () => {\r\n const { entityId: draftId, caseType, connectionTypeId, connectedDrafts = []} = this.props;\r\n caseType &&\r\n navigate.to({\r\n pathname: routeConstants.createCase(caseType),\r\n search: serializeConnectionState([\r\n {draftId, connectionTypeId, sequence: this.getNextSequenceValue() },\r\n ...connectedDrafts\r\n ]),\r\n state: { internal: true }\r\n });\r\n };\r\n\r\n public render() {\r\n\r\n return (\r\n <WrappedComponent {...this.props } navigateToNewDraft={this.navigateToNewDraft} />\r\n );\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { ComponentProps, ButtonSecondary, ElementLoader } from 'ui';\r\nimport styles from './case-listing-button.scss';\r\nimport { withOpenState, OpenStateInjectedProps } from 'ui/common/enhancers';\r\nimport { CancelablePromise, makeCancelable } from 'app/infrastructure/js/cancelable-promise';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { PrimaryActionComponentProps } from 'app/area/case-listing/types';\r\n\r\ninterface CaseListingButtonProps extends ComponentProps, OpenStateInjectedProps {\r\n readOnly?: boolean;\r\n textMissingSearchArguments: string;\r\n textSearchTitle: string;\r\n requiredSearchFieldsFilled: boolean;\r\n caseListingComponent: React.ComponentClass<any, any>;\r\n renderActionComponent: (props: PrimaryActionComponentProps) => JSX.Element;\r\n createFavourite: () => Promise<number>;\r\n}\r\n\r\ninterface CaseListingButtonState {\r\n favouriteId?: number;\r\n}\r\n\r\nclass CaseListingButtonComponent\r\n extends React.Component<CaseListingButtonProps, CaseListingButtonState> {\r\n private loadPromise: CancelablePromise<number>;\r\n\r\n public state: Readonly<CaseListingButtonState> = {\r\n favouriteId: undefined\r\n };\r\n\r\n public componentWillUnmount() {\r\n if (this.loadPromise) {\r\n this.loadPromise.cancel();\r\n this.loadPromise = undefined;\r\n }\r\n }\r\n\r\n private handleClick = (e?: any) => {\r\n e && e.preventDefault();\r\n\r\n const { close, isOpen } = this.props;\r\n\r\n isOpen ? close() : this.openCaseListing();\r\n }\r\n\r\n private closeDialog = () => {\r\n const {close} = this.props;\r\n\r\n close(() => {\r\n this.setState({\r\n ...this.state,\r\n ...{\r\n favouriteId: undefined\r\n }\r\n });\r\n });\r\n }\r\n\r\n private openCaseListing = async () => {\r\n const { open, createFavourite, requiredSearchFieldsFilled } = this.props;\r\n\r\n open();\r\n\r\n if(!requiredSearchFieldsFilled) {\r\n return;\r\n }\r\n\r\n try {\r\n this.loadPromise = makeCancelable(createFavourite());\r\n const favouriteId = await this.loadPromise.promise;\r\n this.setState({\r\n favouriteId\r\n });\r\n this.loadPromise = undefined;\r\n }\r\n catch (e) {\r\n if (e && e.isCanceled) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n className,\r\n label,\r\n isOpen,\r\n readOnly,\r\n requiredSearchFieldsFilled,\r\n textMissingSearchArguments,\r\n textSearchTitle,\r\n caseListingComponent: CaseListingComponent,\r\n renderActionComponent\r\n } = this.props;\r\n\r\n const {\r\n buttonWrapper,\r\n button\r\n } = styles;\r\n\r\n const waitingForSearchFavourite = !this.state.favouriteId && this.loadPromise;\r\n return (\r\n readOnly ? null :\r\n <div id={componentId} className={`form-group col-lg-4 col-xl-4 ${className} ${styles.buttonContainer}`}>\r\n <div className={`input-wrapper ${buttonWrapper}`}>\r\n <ButtonSecondary id={`${componentId}-button`} onClick={this.handleClick} classNames={button}>\r\n {label && label.text}\r\n </ButtonSecondary>\r\n {isOpen && <ModalWrapper {...this.props}\r\n headerTitle={textSearchTitle}\r\n onClose={this.closeDialog}\r\n largeSize={true}\r\n >\r\n {!requiredSearchFieldsFilled && <div className={styles.errorMessage}>{textMissingSearchArguments}</div>}\r\n {requiredSearchFieldsFilled &&\r\n <div>\r\n { waitingForSearchFavourite ? <ElementLoader /> :\r\n <CaseListingComponent\r\n {...this.props}\r\n primaryActionComponentFactory={renderActionComponent}\r\n favouriteId={this.state.favouriteId}\r\n />}\r\n </div>}\r\n </ModalWrapper>\r\n }\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst c = withOpenState(true)(CaseListingButtonComponent);\r\n\r\nexport { c as CaseListingButton };\r\n","import * as React from 'react';\r\nimport { ComponentProps, ButtonTertiary, ButtonPrimary } from 'ui';\r\nimport { OpenStateInjectedProps } from 'ui/common/enhancers';\r\nimport { PrimaryActionComponentProps } from 'app/area/case-listing/types';\r\nimport { nextSequenceValue } from 'app/area/case/features/connected-cases/sequence';\r\nimport { columnName, tableName } from 'app/area/case/case-data-model';\r\nimport { StoreField } from 'app/types-shared';\r\nimport { AddDocumentItemOptions, DeleteDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { CaseListingButton } from 'app/area/case/components/case-listing-button';\r\n\r\ninterface CheckForDuplicateRegistrationsButtonProps extends ComponentProps, OpenStateInjectedProps {\r\n readOnly?: boolean;\r\n entityId: number;\r\n connectionTypeId: number;\r\n maxSequence: number;\r\n textConnect: string;\r\n textDisconnect: string;\r\n textMissingSearchArguments: string;\r\n textSearchTitle: string;\r\n reportId: number;\r\n connectedCasesPendingDeleteIds?: number[];\r\n connectedCasesIds?: number[];\r\n requiredSearchFieldsFilled: boolean;\r\n createSearchForCasesToConnect: (draftId: number, connectionTypeId: number) => Promise<number>;\r\n onAddDocumentItem: (selectAddedItem: boolean, options: AddDocumentItemOptions) => void;\r\n onDeleteDocumentItem: (selectParentItem: boolean, options: DeleteDocumentItemOptions) => void;\r\n caseListingComponent: React.ComponentClass<any, any>;\r\n}\r\n\r\ninterface CheckForDuplicateRegistrationsButtonState {\r\n favouriteId?: number;\r\n}\r\n\r\nexport class CheckForDuplicateRegistrationsButton\r\n extends React.Component<CheckForDuplicateRegistrationsButtonProps, CheckForDuplicateRegistrationsButtonState> {\r\n\r\n private getNextSequenceValue = () => nextSequenceValue(this.props.maxSequence);\r\n\r\n private renderActionComponent = (props: PrimaryActionComponentProps) => {\r\n const caseAlreadyConnected = this.props.connectedCasesIds.indexOf(props.caseId) > -1;\r\n const pendingDelete = this.props.connectedCasesPendingDeleteIds.indexOf(props.caseId) > -1;\r\n\r\n return caseAlreadyConnected ?\r\n <ButtonTertiary onClick={this.removeConnection(props.caseId)}>{this.props.textDisconnect}</ButtonTertiary> :\r\n <ButtonPrimary onClick={this.addConnection(props.caseId)} disabled={pendingDelete}>{this.props.textConnect}</ButtonPrimary>;\r\n }\r\n\r\n private addConnection = (caseIdToConnect: number) => () => {\r\n const { entityId, onAddDocumentItem, connectionTypeId } = this.props;\r\n\r\n if (onAddDocumentItem && caseIdToConnect) {\r\n onAddDocumentItem(false, {\r\n entityType: tableName.connectedCases,\r\n childId: caseIdToConnect,\r\n parentEntityPath: [{[tableName.trans]: entityId}, {[tableName.connectionTypes]: connectionTypeId}],\r\n initialValues: {\r\n [columnName[tableName.connectedCases].connectedSequence]: [{ value: this.getNextSequenceValue() }] as StoreField[]\r\n }\r\n });\r\n }\r\n }\r\n\r\n private removeConnection = (caseIdToRemove: number) => () => {\r\n const { entityId, onDeleteDocumentItem, connectionTypeId } = this.props;\r\n onDeleteDocumentItem && onDeleteDocumentItem(\r\n false,\r\n {\r\n entityType: tableName.connectedCases,\r\n parentEntityPath: [\r\n {[tableName.trans]: entityId},\r\n {[tableName.connectionTypes]: connectionTypeId}\r\n ],\r\n childId: caseIdToRemove\r\n });\r\n }\r\n\r\n private createFavourite = () => this.props.createSearchForCasesToConnect(this.props.entityId, this.props.connectionTypeId);\r\n\r\n public render() {\r\n return <CaseListingButton \r\n {...this.props}\r\n renderActionComponent={this.renderActionComponent}\r\n createFavourite={this.createFavourite}\r\n />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { DisplayText, ButtonPrimary, FlexRowPanel, Tile, EditableComponentProps, ComplexValue } from 'ui';\r\nimport {\r\n SetValuesFromResultType\r\n} from 'app/area/case/features/search-external-provider/types';\r\nimport styles from './search-external-provider.scss';\r\nimport { SearchExternalResultValue } from 'app/area/case/types-store';\r\n\r\ninterface SearchResultItemProps extends EditableComponentProps<ComplexValue<string>> {\r\n values: SearchExternalResultValue[];\r\n setValuesFromResult: SetValuesFromResultType;\r\n textConfirmSelection?: string;\r\n}\r\n\r\n// tslint:disable-next-line:function-name\r\nexport const SearchResultItem = ({\r\n values,\r\n setValuesFromResult,\r\n textConfirmSelection,\r\n componentId,\r\n className,\r\n onChange\r\n}: SearchResultItemProps) => {\r\n function onSelect() {\r\n setValuesFromResult(values);\r\n }\r\n\r\n return (\r\n <div className={styles.searchResultContainer}>\r\n <Tile componentId={componentId} className={styles.left}>\r\n <FlexRowPanel componentId={componentId} className={className}>\r\n {values.map(v => (\r\n <DisplayText\r\n componentId={componentId}\r\n className=\"displaytext col-sm-6 col-xl-4\"\r\n onChange={onChange}\r\n options={undefined}\r\n showStacked={true}\r\n label={{ text: v.description || v.dataTag, visible: true }}\r\n valueItem={{ value: v.value }}\r\n />\r\n ))}\r\n </FlexRowPanel>\r\n </Tile>\r\n <div className={styles.right}>\r\n <ButtonPrimary onClick={onSelect}>{textConfirmSelection}</ButtonPrimary>\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { TileView, EditableComponentProps, ComplexValue } from 'ui';\r\nimport {\r\n SetValuesFromResultType\r\n} from 'app/area/case/features/search-external-provider/types';\r\nimport styles from './search-external-provider.scss';\r\nimport { SearchResultItem } from 'app/area/case/components/search-external-provider/search-result-item';\r\nimport { SearchExternalResultValue } from 'app/area/case/types-store';\r\n\r\ninterface SearchResultListProps extends EditableComponentProps<ComplexValue<string>> {\r\n results: SearchExternalResultValue[][];\r\n setValuesFromResult: SetValuesFromResultType;\r\n textConfirmSelection?: string;\r\n textItemNotFound?: string;\r\n}\r\n\r\nexport const SearchResultList = ({\r\n results,\r\n setValuesFromResult,\r\n textConfirmSelection,\r\n textItemNotFound,\r\n componentId,\r\n className,\r\n onChange\r\n}: SearchResultListProps) => {\r\n return results && results.length ? (\r\n <TileView>\r\n {results.map(result => (\r\n <SearchResultItem\r\n values={result}\r\n setValuesFromResult={setValuesFromResult}\r\n textConfirmSelection={textConfirmSelection}\r\n componentId={componentId}\r\n className={className}\r\n onChange={onChange}\r\n />\r\n ))}\r\n </TileView>\r\n ) : (\r\n <div className={styles.warningMessage}>{textItemNotFound}</div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonSecondary } from 'ui/common/button';\r\nimport { ElementLoader, EditableComponentProps, ComplexValue } from 'ui';\r\nimport { withOpenState, OpenStateInjectedProps } from 'ui/common/enhancers';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { SearchResultList } from 'app/area/case/components/search-external-provider/search-result-list';\r\n\r\nimport styles from './search-external-provider.scss';\r\nimport { \r\n SetValuesFromResultType, \r\n SearchExternalProviderType, ClearResultsType } from 'app/area/case/features/search-external-provider/types';\r\nimport { SearchExternalResultValue } from 'app/area/case/types-store';\r\n\r\nexport interface SearchExternalProviderProps extends EditableComponentProps<ComplexValue<string>>, OpenStateInjectedProps {\r\n searchExternalProvider: SearchExternalProviderType;\r\n clearResults: ClearResultsType;\r\n setValuesFromResult: SetValuesFromResultType;\r\n fetching?: boolean;\r\n canSearch?: boolean;\r\n results?: SearchExternalResultValue[][];\r\n textDialogHeader?: string;\r\n textConfirmSelection?: string;\r\n textItemNotFound?: string;\r\n error?: string;\r\n}\r\n\r\nclass SearchExternalProviderComponent extends React.Component<SearchExternalProviderProps> {\r\n\r\n public componentWillUnmount() {\r\n this.props.clearResults && this.props.clearResults();\r\n }\r\n\r\n private onClick = () => {\r\n this.props.searchExternalProvider && this.props.searchExternalProvider();\r\n this.props.open();\r\n };\r\n\r\n private onCloseDialog = () => {\r\n this.props.close(this.props.clearResults);\r\n }\r\n\r\n private setValuesFromResult = (values: SearchExternalResultValue[]) => {\r\n this.props.setValuesFromResult && this.props.setValuesFromResult(values);\r\n this.props.close();\r\n }\r\n\r\n public render() {\r\n const { componentId, className, textDialogHeader,\r\n label, fetching, isOpen, results, canSearch,\r\n textConfirmSelection, error, textItemNotFound } = this.props;\r\n const { button, buttonWrapper } = styles;\r\n\r\n return (\r\n <div id={componentId} className={`form-group col-lg-4 col-xl-4 ${className}`}>\r\n <div className={`input-wrapper ${buttonWrapper}`}>\r\n <ButtonSecondary \r\n onClick={this.onClick}\r\n classNames={button}\r\n disabled={fetching || !canSearch}>\r\n {label && label.text}\r\n </ButtonSecondary>\r\n {isOpen && (\r\n <ModalWrapper \r\n headerTitle={textDialogHeader}\r\n onClose={this.onCloseDialog} \r\n largeSize={true}>\r\n {error && <div className={styles.errorMessage}>{error}</div>}\r\n {!error && <div>\r\n {fetching ? <ElementLoader /> :\r\n <SearchResultList\r\n results={results}\r\n setValuesFromResult={this.setValuesFromResult}\r\n textConfirmSelection={textConfirmSelection}\r\n textItemNotFound={textItemNotFound}\r\n onChange={this.props.onChange}\r\n componentId={this.props.componentId}\r\n className={this.props.className}\r\n />\r\n }\r\n </div>}\r\n </ModalWrapper>\r\n )}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport const SearchExternalProvider = withOpenState(true)(SearchExternalProviderComponent);\r\n","import * as React from 'react';\r\nimport { ComponentProps, ButtonPrimary } from 'ui';\r\nimport { OpenStateInjectedProps } from 'ui/common/enhancers';\r\nimport { PrimaryActionComponentProps } from 'app/area/case-listing/types';\r\nimport { CaseListingButton } from '../case-listing-button';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { serializeConnectionState } from 'app/area/case/draft/connected-state';\r\n\r\ninterface ConnectToBowtieButtonProps extends ComponentProps, OpenStateInjectedProps {\r\n readOnly?: boolean;\r\n entityId: number;\r\n textMissingSearchArguments: string;\r\n textOpenBowtie: string;\r\n textSearchTitle: string;\r\n requiredSearchFieldsFilled: boolean;\r\n createSearchForCasesToConnect: (draftId: number) => Promise<number>;\r\n caseListingComponent: React.ComponentClass<any, any>;\r\n}\r\n\r\nexport class ConnectToBowtieButton extends React.Component<ConnectToBowtieButtonProps> {\r\n\r\n private createFavourite = (): Promise<number> => {\r\n const { createSearchForCasesToConnect, entityId: draftId } = this.props;\r\n return createSearchForCasesToConnect(draftId);\r\n }\r\n\r\n private renderActionComponent = (props: PrimaryActionComponentProps) => {\r\n const openBowtie = () => {\r\n const { entityId: draftId } = this.props;\r\n const state = serializeConnectionState([\r\n { draftId }\r\n ]);\r\n navigate.toBowtieConnection(props.caseId, state);\r\n };\r\n return props.permissions && props.permissions.bowtie ?\r\n <ButtonPrimary onClick={openBowtie}>{this.props.textOpenBowtie}</ButtonPrimary> :\r\n null;\r\n }\r\n\r\n public render() {\r\n return <CaseListingButton\r\n {...this.props}\r\n renderActionComponent={this.renderActionComponent}\r\n createFavourite={this.createFavourite}\r\n />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { toJSON } from 'app/infrastructure/platform';\r\n\r\nconst shouldDisplayPlaceholders = () => AppSetting.ComponentDebug;\r\n\r\nexport const flexStyle =\r\n 'd-lg-flex flex-wrap align-self-center align-content-around justify-content-between';\r\n\r\nexport const Dummy = (p: any) => {\r\n const placeHolderStyle = {\r\n border: '2px lightgray dashed',\r\n color: 'lightgray',\r\n padding: '5px',\r\n margin: '5px',\r\n opacity: 0.85,\r\n fontSize: '10px',\r\n fontStyle: 'italic'\r\n };\r\n\r\n const containerStyle = {\r\n borderBottom: '2px lightgray dashed',\r\n borderTop: '2px lightgray dashed',\r\n color: 'lightgray',\r\n fontSize: '10px',\r\n opacity: 1\r\n };\r\n\r\n const isContainer = p.children && p.children.length;\r\n\r\n if (shouldDisplayPlaceholders()) {\r\n return (\r\n <div\r\n // className = { flexStyle }\r\n key={p.sequence}\r\n style={isContainer ? containerStyle : placeHolderStyle}\r\n >\r\n {<label>{p.label && p.label.text}</label>}\r\n {<div>Placeholder for domain {p.componentId}</div>}\r\n {p.children}\r\n </div>\r\n );\r\n }\r\n\r\n return p.children || null;\r\n};\r\n\r\nexport const JsonView = (p: any) => (\r\n <div key={p.sequence}>\r\n <label>{p.label && p.label.text}</label>\r\n <div>Placeholder for domain {p.componentId}</div>\r\n <span>{p.value && toJSON(p.value)}</span>\r\n <div>{p.children}</div>\r\n </div>\r\n);\r\n\r\nexport const DebugPanel = (p: any) => (\r\n <div className=\"card\">\r\n <div className=\"card-header\">{p.label && p.label.text}</div>\r\n <div className=\"card-block\">{p.children}</div>\r\n </div>\r\n);\r\n\r\n// Bootstrap styles will be customized in SASS variables. For the time being inline styles are here instead.\r\nconst openPanelStyle = {\r\n marginBottom: '10px',\r\n marginTop: '20px'\r\n};\r\n\r\n// Temporary panel for non-migrated domains rendered when inspecting\r\nexport const OpenPanel = (p: any) => (\r\n <div style={openPanelStyle}>\r\n <span>open panel</span>\r\n {p.children}\r\n </div>\r\n);\r\n\r\n// Temporary panel for non-migrated sections when inspecting\r\nexport const ReadPanel = (p: any) => (\r\n // tslint:disable-next-line:max-line-length\r\n <div className=\"container panel\">\r\n <span>read panel</span>\r\n <div className=\"panel-heading\">\r\n <h4 role=\"presentation\" className=\"panel-title\">\r\n <a role=\"tab\" aria-expanded=\"true\" aria-selected=\"true\">\r\n {p.label && p.label.text}\r\n </a>\r\n </h4>\r\n </div>\r\n <div\r\n role=\"tabpanel\"\r\n className=\"panel-collapse collapse in\"\r\n aria-hidden=\"false\"\r\n >\r\n <div className=\"panel-body\">{p.children}</div>\r\n </div>\r\n </div>\r\n);\r\n","import * as UI from 'ui';\r\nimport * as AddFeature from 'app/area/case/features';\r\nimport * as Select from 'app/area/case/selectors';\r\nimport * as AppEnhance from 'app/components/enhancers';\r\nimport * as UIEnhance from 'ui/common/enhancers';\r\nimport {tableName, columnName} from 'app/area/case/case-data-model';\r\nimport * as caseComponents from 'app/area/case/components';\r\nimport * as appComponents from 'app/components';\r\nimport { ControlType, IteratorType } from 'app/infrastructure/ui';\r\nimport { ComponentIndex } from 'app/infrastructure/ui/types-uischema';\r\nimport { Dummy, OpenPanel, ReadPanel } from 'app/infrastructure/ui/debug-render';\r\nimport { SharePreset } from 'app/area/case/features';\r\n\r\nconst Enhance = {...AppEnhance, ...UIEnhance};\r\n\r\nexport const readModeComponents: ComponentIndex = {\r\n\r\n [ControlType.NotImplemented]: {\r\n component: Dummy,\r\n configType: ControlType.NotImplemented\r\n },\r\n [ControlType.View]: {\r\n component: UI.Paper,\r\n selectors: [\r\n Select.sharedState,\r\n Select.activeSectionState,\r\n Select.nextAndPreviousSection,\r\n Select.caseId,\r\n Select.print,\r\n Select.fieldValues([{dataTag: 'Title', fieldName: 'title'}])\r\n ],\r\n enhancers: [\r\n Enhance.withDocumentTitleFromProps('title.valueObject.value', 'caseId'),\r\n Enhance.withSectionKeyboardPaging(),\r\n Enhance.withPrint()\r\n ],\r\n configType: ControlType.View\r\n },\r\n [ControlType.Panel]: {\r\n component: OpenPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.Section]: {\r\n component: ReadPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.CallToAction]: {\r\n component: OpenPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.ActionBar]: {\r\n component: OpenPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.TextBox]: {\r\n component: UI.DisplayText,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-text-read')],\r\n configType: ControlType.TextBox\r\n },\r\n [ControlType.TextArea]: {\r\n component: UI.DisplayText,\r\n enhancers: [Enhance.withSize({xl: 8}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-text-read')],\r\n configType: ControlType.TextArea\r\n },\r\n [ControlType.NumberBox]: {\r\n component: UI.DisplayNumber,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withTileSize({md: 6, lg: 4, xl: 3}),\r\n Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-number-read')],\r\n configType: ControlType.NumberBox\r\n },\r\n\r\n [ControlType.DateTime]: {\r\n component: UI.DisplayDate,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-date-read')],\r\n configType: ControlType.DateTime\r\n },\r\n\r\n [ControlType.CheckBox]: {\r\n component: UI.DisplayBoolean,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-boolean-read')],\r\n configType: ControlType.CheckBox\r\n },\r\n\r\n [ControlType.SelectMultiple]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-codes-read')],\r\n configType: ControlType.SelectMultiple\r\n },\r\n [ControlType.SelectMultipleHierarchy]: {\r\n component: UI.DisplayCodesHierarchy,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-codes-hierarchy-read')],\r\n configType: ControlType.SelectMultipleHierarchy\r\n },\r\n [ControlType.SelectSingle]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withTileSize({md: 6, lg: 4}),\r\n Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-codes-read')],\r\n configType: ControlType.SelectSingle\r\n },\r\n [ControlType.SelectSingleHierarchy]: {\r\n component: UI.DisplayCodesHierarchy,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-codes-hierarchy-read')],\r\n configType: ControlType.SelectSingleHierarchy\r\n },\r\n [ControlType.SelectSingleShortList]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-codes-read')],\r\n configType: ControlType.SelectSingleShortList\r\n },\r\n\r\n [ControlType.EntityKeyCategorySelectSingleShortList]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-codes-read')],\r\n configType: ControlType.EntityKeyCategorySelectSingleShortList\r\n },\r\n\r\n [ControlType.TileView]: {\r\n component: UI.TileView,\r\n configType: ControlType.TileView,\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.Tile]: {\r\n component: UI.Tile,\r\n selectors: [\r\n Select.primaryKeyFromContext(),\r\n Select.expandAll,\r\n Select.casePermissions,\r\n Select.editDocumentItemVisibility\r\n ],\r\n configType: ControlType.Tile\r\n },\r\n\r\n [ControlType.CommentTileView]: {\r\n component: appComponents.CommentTileView,\r\n configType: ControlType.CommentTileView,\r\n enhancers: [Enhance.withSize({lg: 8})],\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CommentTile]: {\r\n component: appComponents.CommentTile,\r\n configType: ControlType.CommentTile\r\n },\r\n\r\n [ControlType.SliderRating]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withClassNames('display-codes-read')],\r\n configType: ControlType.DisplayCodes\r\n },\r\n\r\n [ControlType.EntityKeyCategorySliderRating]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withExpandAllSize({md:12}), Enhance.withClassNames('display-codes-read')],\r\n configType: ControlType.DisplayCodes\r\n },\r\n\r\n [ControlType.ButtonList]: {\r\n component: UI.Hidden,\r\n configType: ControlType.ButtonList\r\n },\r\n\r\n [ControlType.HeaderPanel]: {\r\n component: appComponents.ReadHeaderPanel,\r\n enhancers: [AddFeature.withSharing(SharePreset.case), Enhance.withProperty('enableStickyHeader', true)],\r\n selectors: [\r\n Select.sharedState,\r\n Select.headerVisibilityConfiguration,\r\n Select.casePermissions,\r\n Select.urlToCase(),\r\n Select.caseId,\r\n Select.expandAll,\r\n Select.templateURL,\r\n Select.fieldValues([\r\n {fieldName: (columnName[tableName.trans]).confidentialIndicator,\r\n dataTag: (columnName[tableName.trans]).confidential}\r\n ])\r\n ],\r\n configType: ControlType.HeaderPanel\r\n },\r\n\r\n [ControlType.DisplayDate]: {\r\n component: UI.DisplayDate,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayDate\r\n },\r\n\r\n [ControlType.DisplayNumber]: {\r\n component: UI.DisplayNumber,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4}), Enhance.withSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayNumber\r\n },\r\n\r\n [ControlType.DisplayNumberUnitOfMeasure]: {\r\n component: appComponents.DisplayNumberUnitOfMeasure,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayNumberUnitOfMeasure\r\n },\r\n\r\n [ControlType.DisplayText]: {\r\n component: UI.DisplayText,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayText\r\n },\r\n\r\n [ControlType.DisplayCodes]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayCodes\r\n },\r\n\r\n [ControlType.DisplayCodesUnitOfMeasure]: {\r\n component: appComponents.DisplayCodesUnitOfMeasure,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayCodesUnitOfMeasure\r\n },\r\n\r\n [ControlType.DisplayCodesHierarchy]: {\r\n component: UI.DisplayCodesHierarchy,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayCodesHierarchy\r\n },\r\n\r\n [ControlType.DisplayBoolean]: {\r\n component: UI.DisplayBoolean,\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayBoolean\r\n },\r\n\r\n [ControlType.LinkHeading]: {\r\n component: UI.LinkHeading,\r\n selectors: [Select.urlToConnectedCase()],\r\n enhancers: [Enhance.withClassNames('compact', true)],\r\n configType: ControlType.LinkHeading\r\n },\r\n\r\n [ControlType.FluidPanel]: {\r\n component: UI.FluidPanel,\r\n configType: ControlType.FluidPanel\r\n },\r\n\r\n [ControlType.ExpandableText]: {\r\n component: UI.ExpandableText,\r\n selectors: [Select.expandAll],\r\n configType: ControlType.ExpandableText\r\n },\r\n\r\n [ControlType.ProcessPanel]: {\r\n component: UI.ProcessPanel,\r\n configType: ControlType.ProcessPanel\r\n },\r\n\r\n [ControlType.GroupPanel]: {\r\n component: UI.GroupPanel,\r\n enhancers: [Enhance.withSize({xl: 12}), Enhance.withProperty('label.required', false)],\r\n configType: ControlType.GroupPanel\r\n },\r\n\r\n [ControlType.FlexPanel]: {\r\n component: UI.FlexPanel,\r\n selectors: [Select.firstSectionId, Select.activeSectionState],\r\n enhancers: [Enhance.withRenderOnFirstTabOnly()],\r\n configType: ControlType.FlexPanel\r\n },\r\n\r\n [ControlType.FluidPanel]: {\r\n component: UI.FluidPanel,\r\n configType: ControlType.FluidPanel\r\n },\r\n\r\n [ControlType.ColumnsPanel]: {\r\n component: UI.ColumnsPanel,\r\n configType: ControlType.ColumnsPanel\r\n },\r\n\r\n [ControlType.DetailForm]: {\r\n component: UI.DetailFormPanel,\r\n configType: ControlType.DetailForm\r\n },\r\n\r\n [ControlType.DisplayChildValues]: {\r\n component: UI.DisplayChildValues,\r\n selectors: [Select.childValues],\r\n enhancers: [Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.DisplayChildValues\r\n },\r\n\r\n [ControlType.FactBox]: {\r\n component: caseComponents.FactBox,\r\n selectors: [\r\n Select.factboxLinks,\r\n Select.riskValues,\r\n Select.childEntityValuesAsProperty('childValueItems', [\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.consequences }],\r\n propName: (columnName[tableName.consequences] as any).actConsConsequenceIcons\r\n }]),\r\n Select.childEntityCount([\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.action }],\r\n propName: (columnName[tableName.action] as any).numberOfActions\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.action }],\r\n propName: (columnName[tableName.action] as any).numberOfClosedActions,\r\n dataTag: (columnName[tableName.action] as any).actionCompletedDate\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.object }],\r\n propName: (columnName[tableName.object] as any).numberOfFiles\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.comment }],\r\n propName: (columnName[tableName.comment] as any).numberOfComments\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.causes }],\r\n propName: (columnName[tableName.causes] as any).numberOfCauses\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.involvedPerson }],\r\n propName: (columnName[tableName.involvedPerson] as any).numberOfInvolvedPersons\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans },\r\n { entityType: tableName.attachmentType, id: 2},\r\n { entityType: tableName.link }],\r\n propName: (columnName[tableName.link] as any).numberOfLinks\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.involvedDrug }],\r\n propName: (columnName[tableName.involvedDrug] as any).numberOfInvolvedDrugs\r\n },\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.assessment }],\r\n propName: (columnName[tableName.assessment] as any).numberOfAssessments\r\n }\r\n ]),\r\n Select.integrityValues,\r\n Select.checklistValues,\r\n Select.connectedCasesIds\r\n ],\r\n enhancers: [AddFeature.withFileDownload],\r\n configType: ControlType.FactBox\r\n },\r\n\r\n [ControlType.Badge]: {\r\n component: UI.Badge,\r\n configType: ControlType.Badge\r\n },\r\n\r\n [ControlType.ConnectedCasesTileView]: {\r\n component : caseComponents.ConnectedCasesTileView,\r\n selectors: [\r\n Select.entityId, Select.connectedDrafts,\r\n Select.connectedCasesSortValue,\r\n Select.activeChildItem\r\n ],\r\n configType: ControlType.ConnectedCasesTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ConnectedCasesTile]: {\r\n component: caseComponents.ConnectedCasesTile,\r\n selectors: [Select.primaryKeyFromContext()],\r\n configType: ControlType.ConnectedCasesTile\r\n },\r\n\r\n [ControlType.FileUploader]: {\r\n component: UI.FileUploader,\r\n selectors: [Select.print],\r\n enhancers: [AddFeature.withFileDownload],\r\n configType: ControlType.FileUploader\r\n },\r\n\r\n [ControlType.CodeSelectorTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [Select.childEntityTypeKeys, Select.activeChildItem],\r\n configType: ControlType.CodeSelectorTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CodeTitleTile]: {\r\n component: appComponents.CodeTitleTile,\r\n selectors: [Select.primaryKeyFromContext(), Select.expandAll],\r\n configType: ControlType.CodeTitleTile\r\n },\r\n\r\n [ControlType.LossPotentialEvaluation]: {\r\n component: caseComponents.LossPotentialEvaluation,\r\n selectors: [Select.primaryKeyFromContext()],\r\n configType: ControlType.LossPotentialEvaluation\r\n },\r\n\r\n [ControlType.LossPotentialEvaluationTileView]: {\r\n component: caseComponents.LossPotentialEvaluationTileView,\r\n selectors: [Select.childEntities, Select.activeChildItem],\r\n configType: ControlType.LossPotentialEvaluationTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.LossPotentialConsequenceEvaluation]: {\r\n component: caseComponents.LossPotentialConsequenceEvaluation,\r\n selectors: [Select.consequenceRiskValues],\r\n configType: ControlType.LossPotentialConsequenceEvaluation\r\n },\r\n\r\n [ControlType.LossPotentialConsequenceEvaluationTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n configType: ControlType.LossPotentialConsequenceEvaluationTileView,\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CauseCategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n selectors: [Select.childEntityFieldValueAsOptions(tableName.causes, 'CauseCategory'), Select.activeChildItem],\r\n configType: ControlType.CauseCategoryTileView,\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.CheckListCategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n configType: ControlType.CheckListCategoryTileView,\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CheckListCategoryTile]: {\r\n component: appComponents.CategoryTile,\r\n selectors: [Select.primaryKeyFromContext()],\r\n configType: ControlType.CheckListCategoryTile\r\n },\r\n\r\n [ControlType.CheckListEvaluationPanel]: {\r\n component: UI.FlexPanel,\r\n configType: ControlType.CheckListEvaluationPanel,\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('value')]\r\n },\r\n\r\n [ControlType.CategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n configType: ControlType.CategoryTileView,\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CategoryTile]: {\r\n component: appComponents.CategoryTile,\r\n selectors: [Select.primaryKeyFromContext()],\r\n configType: ControlType.CategoryTile\r\n },\r\n\r\n [ControlType.DisplayNumericHeader]: {\r\n component: UI.DisplayNumericHeader,\r\n configType: ControlType.DisplayNumericHeader\r\n },\r\n\r\n [ControlType.ConsequenceTypeTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n configType: ControlType.ConsequenceTypeTileView,\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ConsequenceTypeTile]: {\r\n component: appComponents.CodeTitleTile,\r\n selectors: [Select.primaryKeyFromContext()],\r\n configType: ControlType.ConsequenceTypeTile\r\n },\r\n\r\n [ControlType.ConsequenceTileView]: {\r\n component: UI.TileView,\r\n selectors: [Select.primaryKeyFromContextExpanded('consequenceType'), Select.activeChildItem],\r\n configType: ControlType.ConsequenceTileView,\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('consequenceType')],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.SectionPanel]: {\r\n component: UI.SectionPanel,\r\n selectors: [\r\n Select.firstSectionId,\r\n Select.activeSectionState,\r\n Select.nextAndPreviousSection\r\n ],\r\n enhancers: [\r\n Enhance.withRenderActiveSection(),\r\n Enhance.withSectionTab()\r\n ],\r\n configType: ControlType.SectionPanel\r\n },\r\n\r\n [ControlType.FlexRowPanel]: {\r\n component: UI.FlexRowPanel,\r\n configType: ControlType.FlexRowPanel\r\n },\r\n\r\n [ControlType.LongDescription]: {\r\n component: UI.LongDescription,\r\n configType: ControlType.LongDescription\r\n },\r\n\r\n [ControlType.SectionSummaryPanel]: {\r\n component: caseComponents.SectionSummary,\r\n enhancers: [Enhance.withSize({md: 12})],\r\n configType: ControlType.SectionSummaryPanel\r\n },\r\n\r\n [ControlType.TileTopZone]: {\r\n component: UI.TileTopZone,\r\n configType: ControlType.TileTopZone\r\n },\r\n\r\n [ControlType.DisplayNumericSum]: {\r\n component: UI.DisplayNumber,\r\n selectors: [Select.childValuesTotals('valueItem')],\r\n configType: ControlType.DisplayNumericSum\r\n },\r\n\r\n [ControlType.AttachLinkTileView]: {\r\n component: caseComponents.AttachLinkTileView,\r\n selectors: [Select.attachLinkValues, Select.activeChildItem],\r\n configType: ControlType.AttachLinkTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.DisplaySafeAnchor]: {\r\n component: appComponents.DisplaySafeAnchor,\r\n configType: ControlType.DisplaySafeAnchor\r\n },\r\n\r\n [ControlType.AttachLinkTile]: {\r\n component: caseComponents.AttachLinkTile,\r\n selectors: [Select.fieldValues([\r\n {\r\n fieldName: (columnName[tableName.link]).anchorIndicator,\r\n dataTag: (columnName[tableName.link]).linkUrl\r\n }])],\r\n configType: ControlType.AttachLinkTile\r\n },\r\n\r\n [ControlType.SubstanceCategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n selectors: [Select.childEntityFieldValueAsOptions(tableName.green, 'EnvValSubstanceCategory'), Select.activeChildItem],\r\n configType: ControlType.SubstanceCategoryTileView,\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.EnvironmentalValuesTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [Select.primaryKeyFromContextExpanded('categoryId'), Select.activeChildItem],\r\n configType: ControlType.EnvironmentalValuesTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.SafeAnchor]: {\r\n component: appComponents.SafeAnchor,\r\n enhancers: [Enhance.withSize({xl: 8})],\r\n configType: ControlType.SafeAnchor\r\n },\r\n\r\n [ControlType.InteractionTileView]: {\r\n component: appComponents.CategoryTileView,\r\n selectors: [Select.childEntityFieldValueAsOptions(tableName.checkListInteraction, 'CheckListInteraction'), Select.activeChildItem],\r\n configType: ControlType.InteractionTileView,\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.InteractionTileViewDrugReaction]: {\r\n component: UI.TileView,\r\n selectors: [Select.childEntityFieldValueAsOptions(tableName.drugReactionInteraction, 'DrgReacInteraction'), Select.activeChildItem],\r\n configType: ControlType.InteractionTileViewDrugReaction,\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.InteractionTile]: {\r\n component: appComponents.CompactCodeTitleTile,\r\n selectors: [Select.primaryKeyFromContext()],\r\n configType: ControlType.InteractionTile\r\n },\r\n\r\n [ControlType.CausesTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [Select.childEntityTypeKeys, Select.activeChildItem],\r\n configType: ControlType.CausesTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CompactCodeTitleTile]: {\r\n component: appComponents.CompactCodeTitleTile,\r\n selectors: [Select.primaryKeyFromContext()],\r\n configType: ControlType.CompactCodeTitleTile\r\n },\r\n\r\n [ControlType.SummaryTileView]: {\r\n component: caseComponents.SummaryTileView,\r\n configType: ControlType.SummaryTileView,\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.TitleWrapperPrimaryKey]: {\r\n component: appComponents.TitleWrapper,\r\n selectors: [Select.primaryKeyFromContext('title')],\r\n configType: ControlType.TitleWrapperPrimaryKey\r\n },\r\n\r\n [ControlType.ReferenceTileView]: {\r\n component: caseComponents.ReferenceSelectTileView,\r\n selectors: [Select.activeChildItem],\r\n configType: ControlType.ReferenceTileView,\r\n enhancers: [Enhance.withPrimaryKeyAsOptionIteratorId, Enhance.withSize({lg: 12})],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ReferenceTile]: {\r\n component: appComponents.CompactCodeTitleTile,\r\n selectors: [Select.referenceCodeDataTag, Select.referenceFieldValueAsPrimaryKey],\r\n configType: ControlType.ReferenceTile,\r\n enhancers: []\r\n },\r\n\r\n [ControlType.DisplayCodesReference]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withTileSize({md: 6, xl: 4})],\r\n configType: ControlType.DisplayCodesReference\r\n },\r\n\r\n [ControlType.ReferenceDate]: {\r\n component: UI.DisplayDate,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.ReferenceDate\r\n },\r\n\r\n [ControlType.ReferenceDateTime]: {\r\n component: UI.DisplayDate,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withTileSize({md: 6, lg: 8})],\r\n configType: ControlType.ReferenceDateTime\r\n },\r\n\r\n [ControlType.ReferenceTextBox]: {\r\n component: UI.DisplayText,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.ReferenceTextBox\r\n },\r\n\r\n [ControlType.ReferenceNumberBox]: {\r\n component: UI.DisplayNumber,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.ReferenceNumberBox\r\n },\r\n\r\n [ControlType.ReferenceEntityKeyCategorySelectSingleShortList]: {\r\n component: UI.DisplayCodes,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.ReferenceEntityKeyCategorySelectSingleShortList\r\n },\r\n\r\n [ControlType.ReferenceCheckBox]: {\r\n component: UI.DisplayCodes,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.ReferenceCheckBox\r\n },\r\n\r\n [ControlType.ReferenceSelectSingleHierarchy]: {\r\n component: UI.DisplayCodesHierarchy,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.ReferenceSelectSingleHierarchy\r\n },\r\n\r\n [ControlType.ReferenceSelectSingle]: {\r\n component: UI.DisplayCodes,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceSelectSingle\r\n },\r\n\r\n [ControlType.SurveyLink]: {\r\n component: UI.Link,\r\n selectors: [Select.templateURL],\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3})],\r\n configType: ControlType.SurveyLink\r\n },\r\n\r\n [ControlType.DisplaySurveyLink]: {\r\n component: UI.Link,\r\n selectors: [Select.templateURL],\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3})],\r\n configType: ControlType.SurveyLink\r\n },\r\n\r\n [ControlType.Link]: {\r\n component: UI.Link,\r\n selectors: [Select.domainTemplateUrl],\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3})],\r\n configType: ControlType.Link\r\n },\r\n\r\n [ControlType.Signature]: {\r\n component: UI.DisplayDate,\r\n selectors: [],\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.Signature\r\n },\r\n\r\n [ControlType.RiskMatrix]: {\r\n component: appComponents.RiskMatrix,\r\n selectors: [() => ({ readOnly: true })],\r\n enhancers: [AddFeature.withRiskMatrix],\r\n configType: ControlType.RiskMatrix\r\n },\r\n\r\n [ControlType.DisplayInsuranceBalance]: {\r\n component: UI.DisplayNumber,\r\n selectors: [Select.diffFieldValueAndChildValuesTotals('valueItem', (columnName[tableName.economy]).costEstimate)],\r\n enhancers: [Enhance.withProperty('hideIfNoValue', true), Enhance.withClassNames('display-number-read')],\r\n configType: ControlType.DisplayInsuranceBalance\r\n },\r\n\r\n [ControlType.IndicatorCodeSelectorTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [Select.childEntityTypeKeys, Select.activeChildItem],\r\n configType: ControlType.IndicatorCodeSelectorTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.AddDocumentItemLinkButton]: {\r\n component: UI.Hidden,\r\n configType: ControlType.AddDocumentItemLinkButton\r\n },\r\n\r\n [ControlType.ProcessingLogView]: {\r\n component: appComponents.LogView,\r\n configType: ControlType.ProcessingLogView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ProcessingLogDetails]: {\r\n component: appComponents.LogDetails,\r\n configType: ControlType.ProcessingLogDetails\r\n },\r\n\r\n [ControlType.ProcessingLogLink]: {\r\n component: appComponents.ReadProcessingLogLink,\r\n selectors: [Select.childEntityCount([\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.transLog }],\r\n propName: (columnName[tableName.transLog] as any).caseLogs,\r\n dataTag: (columnName[tableName.transLog] as any).CaseLogNo\r\n }])],\r\n configType: ControlType.ProcessingLogLink\r\n },\r\n\r\n [ControlType.MailLogLink]: {\r\n component: appComponents.MailLogLink,\r\n configType: ControlType.MailLogLink\r\n },\r\n\r\n [ControlType.CaseLogLink]: {\r\n component: appComponents.CaseLogLink,\r\n enhancers: [AddFeature.withCaseLogDownload],\r\n selectors: [Select.childValues, Select.primaryKeyFromContext()],\r\n configType: ControlType.CaseLogLink\r\n },\r\n\r\n [ControlType.MailLogDetails]: {\r\n component: appComponents.LogDetails,\r\n configType: ControlType.MailLogDetails\r\n },\r\n\r\n [ControlType.AddNewCaseButton]: {\r\n component: UI.Hidden,\r\n configType: ControlType.AddNewCaseButton\r\n },\r\n\r\n [ControlType.CompactTileHeader]: {\r\n component: appComponents.CompactTileHeader,\r\n selectors: [Select.tileHeaderPrimaryKey],\r\n configType: ControlType.CompactTileHeader\r\n },\r\n\r\n [ControlType.ConnectedCasesFactbox]: {\r\n component: caseComponents.ConnectedCasesFactbox,\r\n configType: ControlType.ConnectedCasesFactbox,\r\n enhancers: [Enhance.withClassNames('compact')],\r\n selectors: [\r\n Select.connectedCasesRiskValues,\r\n Select.connectedCasesIntegrityValues,\r\n Select.connectedCasesActionCount,\r\n Select.factboxLinks,\r\n Select.urlToConnectedCase()\r\n ]},\r\n\r\n [ControlType.CheckForDuplicateRegistrationsButton]: {\r\n component: UI.Hidden,\r\n configType: ControlType.CheckForDuplicateRegistrationsButton\r\n },\r\n\r\n [ControlType.CompactTile]: {\r\n component: UI.CompactTile,\r\n selectors: [\r\n Select.primaryKeyFromContext(),\r\n Select.expandAll,\r\n Select.casePermissions,\r\n Select.editDocumentItemVisibility\r\n ],\r\n configType: ControlType.CompactTile\r\n },\r\n\r\n [ControlType.BarrierInspectionTileView]: {\r\n component: caseComponents.SummaryTileView,\r\n configType: ControlType.BarrierInspectionTileView,\r\n selectors: [ Select.activeChildItem ],\r\n enhancers: [ Enhance.withProperty('doubleWidth', true)],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.DisplayNumberBarrierInspection]: {\r\n component: UI.DisplayNumber,\r\n enhancers: [Enhance.withSize({lg: 12})],\r\n configType: ControlType.DisplayNumber\r\n },\r\n\r\n [ControlType.DisplayCodesStatus]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withProperty('displayBackgroundColor', 'false'), \r\n Enhance.withProperty('style', 'primary')],\r\n configType: ControlType.DisplayCodesStatus\r\n },\r\n\r\n [ControlType.SelectSingleSignature]: {\r\n component: UI.DisplayCodes,\r\n selectors: [],\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3}), Enhance.withTileSize({md: 6, lg: 4})],\r\n configType: ControlType.SelectSingleSignature\r\n }\r\n};\r\n","import * as UI from 'ui';\r\nimport * as AddFeature from 'app/area/case/features';\r\nimport * as Select from 'app/area/case/selectors';\r\nimport { ControlType } from 'app/infrastructure/ui/component-configuration';\r\nimport {\r\n Dummy,\r\n OpenPanel\r\n} from 'app/infrastructure/ui/debug-render';\r\nimport * as AppEnhance from 'app/components/enhancers';\r\nimport * as UIEnhance from 'ui/common/enhancers';\r\n\r\nimport { tableName, columnName } from 'app/area/case/case-data-model';\r\nimport * as caseComponents from 'app/area/case/components';\r\nimport * as appComponents from 'app/components';\r\nimport { IteratorType } from 'app/infrastructure/ui';\r\nimport { ComponentIndex } from 'app/infrastructure/ui/types-uischema';\r\nimport { createUTCDate } from 'app/infrastructure/data/date';\r\nimport { caseSignReadonly } from 'app/area/case/components/enhancers/case-sign-readonly';\r\nimport { readonlyWhenSigned } from 'app/area/case/components/enhancers/readonly-when-signed';\r\n\r\nconst Enhance = {...AppEnhance, ...UIEnhance};\r\n\r\nexport const editModeComponents: ComponentIndex = {\r\n\r\n [ControlType.NotImplemented]: {\r\n component: Dummy,\r\n configType: ControlType.NotImplemented\r\n },\r\n [ControlType.View]: {\r\n component: UI.Paper,\r\n selectors: [\r\n Select.activeSectionState,\r\n Select.nextAndPreviousSection,\r\n Select.caseId,\r\n Select.fieldValues([{dataTag: 'Title', fieldName: 'title'}])\r\n ],\r\n enhancers: [\r\n Enhance.withDocumentTitleFromProps('title.valueObject.value', 'caseId'),\r\n Enhance.withSectionKeyboardPaging()\r\n ],\r\n configType: ControlType.View\r\n },\r\n [ControlType.Panel]: {\r\n component: UI.FlexPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.Section]: {\r\n component: OpenPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.CallToAction]: {\r\n component: OpenPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.ActionBar]: {\r\n component: OpenPanel,\r\n configType: ControlType.Panel\r\n },\r\n [ControlType.TextBox]: {\r\n component: UI.Textbox,\r\n enhancers: [Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.TextBox\r\n },\r\n\r\n [ControlType.CheckBox]: {\r\n component: UI.Checkbox,\r\n enhancers: [Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.CheckBox\r\n },\r\n\r\n [ControlType.NumberBox]: {\r\n component: UI.Numberbox,\r\n enhancers: [Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.NumberBox\r\n },\r\n\r\n [ControlType.TextArea]: {\r\n component: UI.Textarea,\r\n enhancers: [Enhance.withSize({xl: 8})],\r\n configType: ControlType.TextArea\r\n },\r\n\r\n [ControlType.SelectSingle]: {\r\n component: UI.SelectSingle,\r\n selectors: [Select.primaryKeyFromContext()],\r\n enhancers: [Enhance.withPrimaryKeyAsOptionIteratorId, Enhance.withSize({md:6, xl: 4}), Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.SelectSingle\r\n },\r\n\r\n [ControlType.SelectSingleHierarchy]: {\r\n component: UI.SelectSingleHierarchy,\r\n selectors: [Select.primaryKeyFromContext()],\r\n enhancers: [Enhance.withPrimaryKeyAsOptionIteratorId, Enhance.withSize({md:6, xl: 4})],\r\n configType: ControlType.SelectSingleHierarchy\r\n },\r\n\r\n [ControlType.SelectMultiple]: {\r\n component: UI.SelectMultiple,\r\n selectors: [Select.primaryKeyFromContext()],\r\n enhancers: [Enhance.withPrimaryKeyAsOptionIteratorId, Enhance.withSize({md:6, xl: 4})],\r\n configType: ControlType.SelectMultiple\r\n },\r\n\r\n [ControlType.SelectMultipleHierarchy]: {\r\n component: UI.SelectMultipleHierarchy,\r\n selectors: [Select.primaryKeyFromContext()],\r\n enhancers: [Enhance.withPrimaryKeyAsOptionIteratorId, Enhance.withSize({md:6, xl: 4})],\r\n configType: ControlType.SelectMultipleHierarchy\r\n },\r\n\r\n [ControlType.DateTime]: {\r\n component: UI.DateTime,\r\n enhancers: [Enhance.withSize({lg: 6, xl: 8})],\r\n configType: ControlType.DateTime\r\n },\r\n\r\n [ControlType.TileView]: {\r\n component: UI.TileView,\r\n configType: ControlType.TileView,\r\n selectors: [ Select.activeChildItem ],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.Tile]: {\r\n component: UI.Tile,\r\n selectors: [\r\n Select.validationDescendants,\r\n Select.primaryKeyFromContext(),\r\n Select.copyIteratorProps,\r\n Select.editDocumentItemVisibility\r\n ],\r\n configType: ControlType.Tile\r\n },\r\n\r\n [ControlType.SelectSingleShortList]: {\r\n component: UI.SelectSingleShortList,\r\n selectors: [Select.primaryKeyFromContext()],\r\n enhancers: [Enhance.withPrimaryKeyAsOptionIteratorId, Enhance.withSize({xl: 8})],\r\n configType: ControlType.SelectSingleShortList\r\n },\r\n\r\n [ControlType.EntityKeyCategorySelectSingleShortList]: {\r\n component: UI.SelectSingleShortList,\r\n selectors: [Select.primaryKeyFromContext()],\r\n enhancers: [\r\n Enhance.withPrimaryKeyAsOptionCategoryId,\r\n Enhance.withPrimaryKeyAsOptionIteratorId,\r\n Enhance.withSize({xl: 8})\r\n ],\r\n configType: ControlType.EntityKeyCategorySelectSingleShortList\r\n },\r\n\r\n [ControlType.CommentTileView]: {\r\n component: appComponents.CommentTileView,\r\n configType: ControlType.CommentTileView,\r\n iterate: { type: IteratorType.DataRows },\r\n enhancers: [Enhance.withSize({lg: 8})],\r\n selectors: [Select.commentValues, Select.activeChildItem]\r\n },\r\n\r\n [ControlType.CommentTile]: {\r\n component: appComponents.CommentTile,\r\n configType: ControlType.CommentTile\r\n },\r\n\r\n [ControlType.SliderRating]: {\r\n component: UI.SliderRating,\r\n enhancers: [Enhance.withSize({lg: 12}), Enhance.withNotSelectedOptionIncluded],\r\n configType: ControlType.SliderRating\r\n },\r\n\r\n [ControlType.EntityKeyCategorySliderRating]: {\r\n component: UI.SliderRating,\r\n selectors: [Select.primaryKeyFromContext()],\r\n enhancers: [\r\n Enhance.withPrimaryKeyAsOptionCategoryId,\r\n Enhance.withPrimaryKeyAsOptionIteratorId,\r\n Enhance.withNotSelectedOptionIncluded,\r\n Enhance.withSize({lg: 12})\r\n ],\r\n configType: ControlType.EntityKeyCategorySliderRating\r\n },\r\n\r\n [ControlType.ButtonList]: {\r\n component: UI.ButtonList,\r\n enhancers: [\r\n Enhance.withSize({lg: 12}),\r\n AddFeature.withTriggerValidation\r\n ],\r\n configType: ControlType.ButtonList\r\n },\r\n\r\n [ControlType.HeaderPanel]: {\r\n component: appComponents.EditHeaderPanel,\r\n selectors: [\r\n Select.sharedState,\r\n Select.headerVisibilityConfiguration,\r\n Select.activeSectionState,\r\n Select.firstSectionId,\r\n Select.changeCaseTypeActionCreator,\r\n Select.expandAll,\r\n Select.domainMetadata(100,'readOnly')\r\n ],\r\n enhancers: [\r\n Enhance.withClassOnFirstTab(true),\r\n Enhance.withProperty('enableStickyHeader', true)\r\n ],\r\n configType: ControlType.HeaderPanel\r\n },\r\n\r\n [ControlType.DisplayDate]: {\r\n component: UI.DisplayDate,\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayDate\r\n },\r\n\r\n [ControlType.DisplayNumber]: {\r\n component: UI.DisplayNumber,\r\n enhancers: [Enhance.withSize({md: 6, xl: 4}), Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayNumber\r\n },\r\n\r\n [ControlType.DisplayNumberUnitOfMeasure]: {\r\n component: appComponents.DisplayNumberUnitOfMeasure,\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayNumberUnitOfMeasure\r\n },\r\n\r\n [ControlType.DisplayText]: {\r\n component: UI.DisplayText,\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayText\r\n },\r\n\r\n [ControlType.DisplayCodes]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayCodes\r\n },\r\n\r\n [ControlType.DisplayCodesUnitOfMeasure]: {\r\n component: appComponents.DisplayCodesUnitOfMeasure,\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayCodesUnitOfMeasure\r\n },\r\n\r\n [ControlType.DisplayCodesHierarchy]: {\r\n component: UI.DisplayCodesHierarchy,\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayCodesHierarchy\r\n },\r\n\r\n [ControlType.DisplayBoolean]: {\r\n component: UI.DisplayBoolean,\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayBoolean\r\n },\r\n\r\n [ControlType.LinkHeading]: {\r\n component: UI.ExternalLinkHeading,\r\n selectors: [Select.urlToConnectedCase({withBaseUrl:true})],\r\n enhancers: [Enhance.withClassNames('compact', true)],\r\n configType: ControlType.LinkHeading\r\n },\r\n\r\n [ControlType.ExpandableText]: {\r\n component: UI.ExpandableText,\r\n configType: ControlType.ExpandableText\r\n },\r\n\r\n [ControlType.ProcessPanel]: {\r\n component: UI.ProcessPanel,\r\n selectors: [\r\n Select.validationDescendants,\r\n Select.invalidSectionIds,\r\n Select.activeSectionState,\r\n Select.nextAndPreviousSection,\r\n Select.validState\r\n ],\r\n enhancers: [Enhance.withRenderActiveSection(), Enhance.withSectionTab()],\r\n configType: ControlType.ProcessPanel\r\n },\r\n\r\n [ControlType.GroupPanel]: {\r\n component: UI.GroupPanel,\r\n enhancers: [Enhance.withSize({md: 12})],\r\n configType: ControlType.GroupPanel\r\n },\r\n\r\n [ControlType.FlexPanel]: {\r\n component: UI.Hidden,\r\n configType: ControlType.FlexPanel\r\n },\r\n\r\n [ControlType.FluidPanel]: {\r\n component: UI.FluidPanel,\r\n configType: ControlType.FluidPanel\r\n },\r\n\r\n [ControlType.ColumnsPanel]: {\r\n component: UI.ColumnsPanel,\r\n configType: ControlType.ColumnsPanel\r\n },\r\n\r\n [ControlType.DetailForm]: {\r\n component: UI.DetailFormPanel,\r\n configType: ControlType.DetailForm\r\n },\r\n\r\n [ControlType.Badge]: {\r\n component: UI.Badge,\r\n configType: ControlType.Badge\r\n },\r\n\r\n [ControlType.ConnectedCasesTileView]: {\r\n component : caseComponents.ConnectedCasesTileViewEdit,\r\n selectors: [\r\n Select.entityId, Select.caseId,\r\n Select.connectedCasesSortValue,\r\n Select.primaryKeyFromContextExpanded('connectionTypeId'),\r\n Select.connectedDrafts,\r\n Select.connectedCasesIds,\r\n Select.connectedCasesPendingDeleteIds,\r\n Select.caseListingComponent,\r\n Select.activeChildItem\r\n ],\r\n enhancers: [\r\n AddFeature.withConnectedCases,\r\n AddFeature.withSearchCasesToConnect,\r\n AddFeature.withConnectedCasePermissions\r\n ],\r\n configType: ControlType.ConnectedCasesTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ConnectedCasesTile]: {\r\n component: caseComponents.ConnectedCasesTile,\r\n selectors: [\r\n Select.validationDescendants,\r\n Select.primaryKeyFromContext(),\r\n Select.primaryKeyFromContextExpanded('connectionTypeId'),\r\n Select.entityId,\r\n Select.connectedCasesMaxSequence,\r\n Select.connectedDrafts,\r\n Select.connectedCasePermissions\r\n ],\r\n enhancers: [AddFeature.withConnectionSequenceUpdate],\r\n configType: ControlType.ConnectedCasesTile\r\n },\r\n\r\n [ControlType.DisplayChildValues]: {\r\n component: UI.DisplayChildValues,\r\n selectors: [Select.childValues],\r\n enhancers: [Enhance.withTileSize({sm: 6, xl: 4})],\r\n configType: ControlType.DisplayChildValues\r\n },\r\n\r\n [ControlType.FileUploader]: {\r\n component: UI.FileUploader,\r\n enhancers: [AddFeature.withFileUpload, AddFeature.withFileDownload],\r\n configType: ControlType.FileUploader\r\n },\r\n\r\n [ControlType.CodeSelectorTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [\r\n Select.primaryKeyFromContextExpanded('categoryId'),\r\n Select.childEntityTypeKeys,\r\n Select.activeChildItem\r\n ],\r\n configType: ControlType.CodeSelectorTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CodeTitleTile]: {\r\n component: appComponents.CodeTitleTile,\r\n selectors: [Select.validationDescendants, Select.primaryKeyFromContext()],\r\n configType: ControlType.CodeTitleTile\r\n },\r\n\r\n [ControlType.LossPotentialEvaluation]: {\r\n component: caseComponents.LossPotentialEvaluation,\r\n selectors: [Select.primaryKeyFromContext(), Select.validationDescendants],\r\n configType: ControlType.LossPotentialEvaluation\r\n },\r\n\r\n [ControlType.LossPotentialEvaluationTileView]: {\r\n component: caseComponents.LossPotentialEvaluationTileView,\r\n selectors: [Select.childEntities, Select.activeChildItem],\r\n configType: ControlType.LossPotentialEvaluationTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.LossPotentialConsequenceEvaluation]: {\r\n component: caseComponents.LossPotentialConsequenceEvaluation,\r\n selectors: [Select.consequenceRiskValues],\r\n configType: ControlType.LossPotentialConsequenceEvaluation\r\n },\r\n\r\n [ControlType.LossPotentialConsequenceEvaluationTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [Select.childEntityTypeKeys, Select.activeChildItem],\r\n configType: ControlType.LossPotentialConsequenceEvaluationTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CauseCategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n configType: ControlType.CauseCategoryTileView,\r\n enhancers: [Enhance.withOptionLoading<number>()],\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.CheckListCategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n selectors: [Select.childEntityTypeKeys, Select.activeChildItem],\r\n configType: ControlType.CheckListCategoryTileView,\r\n enhancers: [Enhance.withOptionLoading<number>()],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CheckListCategoryTile]: {\r\n component: appComponents.CategoryTile,\r\n selectors: [Select.validationDescendants, Select.primaryKeyFromContext()],\r\n configType: ControlType.CheckListCategoryTile\r\n },\r\n\r\n [ControlType.CheckListEvaluationPanel]: {\r\n component: UI.FlexPanel,\r\n configType: ControlType.CheckListEvaluationPanel,\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('value')]\r\n },\r\n\r\n [ControlType.CategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n configType: ControlType.CategoryTileView,\r\n enhancers: [Enhance.withOptionLoading<number>()],\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.CategoryTile]: {\r\n component: appComponents.CategoryTile,\r\n selectors: [Select.validationDescendants, Select.primaryKeyFromContext()],\r\n configType: ControlType.CategoryTile\r\n },\r\n\r\n [ControlType.DisplayNumericHeader]: {\r\n component: UI.DisplayNumericHeader,\r\n enhancers: [Enhance.withSize({lg: 12})],\r\n configType: ControlType.DisplayNumericHeader\r\n },\r\n\r\n [ControlType.ConsequenceTypeTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [Select.childEntityTypeKeys, Select.activeChildItem],\r\n configType: ControlType.ConsequenceTypeTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ConsequenceTypeTile]: {\r\n component: appComponents.CodeTitleTile,\r\n selectors: [Select.validationDescendants, Select.primaryKeyFromContext()],\r\n configType: ControlType.ConsequenceTypeTile\r\n },\r\n\r\n [ControlType.ConsequenceTileView]: {\r\n component: UI.TileView,\r\n selectors: [Select.primaryKeyFromContextExpanded('consequenceType'), Select.activeChildItem],\r\n configType: ControlType.ConsequenceTileView,\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('consequenceType')],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.SectionPanel]: {\r\n component: UI.SectionPanel,\r\n selectors: [\r\n Select.validationDescendants,\r\n Select.invalidSectionIds,\r\n Select.firstSectionId,\r\n Select.activeSectionState,\r\n Select.nextAndPreviousSection,\r\n Select.validState\r\n ],\r\n enhancers: [\r\n Enhance.withRenderActiveSection(),\r\n Enhance.withSectionTab()\r\n ],\r\n configType: ControlType.SectionPanel\r\n },\r\n\r\n [ControlType.FlexRowPanel]: {\r\n component: UI.FlexRowPanel,\r\n configType: ControlType.FlexRowPanel\r\n },\r\n\r\n [ControlType.LongDescription]: {\r\n component: UI.LongDescription,\r\n configType: ControlType.LongDescription\r\n },\r\n\r\n [ControlType.SectionSummaryPanel]: {\r\n component: caseComponents.SectionSummary,\r\n enhancers: [Enhance.withSize({md: 12})],\r\n configType: ControlType.SectionSummaryPanel\r\n },\r\n\r\n [ControlType.TileTopZone]: {\r\n component: UI.TileTopZone,\r\n configType: ControlType.TileTopZone\r\n },\r\n\r\n [ControlType.DisplayNumericSum]: {\r\n component: UI.DisplayNumber,\r\n selectors: [Select.childValuesTotals('valueItem')],\r\n configType: ControlType.DisplayNumericSum\r\n },\r\n\r\n [ControlType.AttachLinkTileView]: {\r\n component: caseComponents.AttachLinkTileView,\r\n selectors: [Select.attachLinkValues, Select.activeChildItem],\r\n configType: ControlType.AttachLinkTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.DisplaySafeAnchor]: {\r\n component: appComponents.DisplaySafeAnchor,\r\n configType: ControlType.DisplaySafeAnchor\r\n },\r\n\r\n [ControlType.AttachLinkTile]: {\r\n component: caseComponents.AttachLinkTile,\r\n selectors: [Select.fieldValues([\r\n {\r\n fieldName: (columnName[tableName.link]).anchorIndicator,\r\n dataTag: (columnName[tableName.link]).linkUrl\r\n }])],\r\n configType: ControlType.AttachLinkTile\r\n },\r\n\r\n [ControlType.SubstanceCategoryTileView]: {\r\n component: appComponents.CategoryTileView,\r\n configType: ControlType.SubstanceCategoryTileView,\r\n enhancers: [Enhance.withOptionLoading<number>()],\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.EnvironmentalValuesTileView]: {\r\n component: caseComponents.PreselectedCodeTileView,\r\n selectors: [Select.primaryKeyFromContextExpanded('categoryId'), Select.activeChildItem],\r\n configType: ControlType.EnvironmentalValuesTileView,\r\n enhancers: [\r\n Enhance.withPrimaryKeyAsOptionIteratorId,\r\n Enhance.withRowFieldInitialValue(columnName[tableName.green].envValSubstanceCategory, 'categoryId')\r\n ],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.SafeAnchor]: {\r\n component: appComponents.SafeAnchor,\r\n enhancers: [Enhance.withSize({xl: 8})],\r\n configType: ControlType.SafeAnchor\r\n },\r\n\r\n [ControlType.InteractionTileView]: {\r\n component: appComponents.CategoryTileView,\r\n configType: ControlType.InteractionTileView,\r\n selectors: [Select.primaryKeyFromContextExpanded('categoryId'), Select.activeChildItem],\r\n enhancers: [Enhance.withOptionLoading<number>()],\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.InteractionTileViewDrugReaction]: {\r\n component: UI.TileView,\r\n configType: ControlType.InteractionTileViewDrugReaction,\r\n enhancers: [Enhance.withOptionLoading<number>()],\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.CodeTable }\r\n },\r\n\r\n [ControlType.InteractionTile]: {\r\n component: appComponents.CompactCodeTitleTile,\r\n selectors: [Select.validationDescendants, Select.primaryKeyFromContext()],\r\n configType: ControlType.InteractionTile\r\n },\r\n\r\n [ControlType.CausesTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [\r\n Select.primaryKeyFromContextExpanded('categoryId'),\r\n Select.childEntityTypeKeys,\r\n Select.activeChildItem\r\n ],\r\n configType: ControlType.CausesTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.CompactCodeTitleTile]: {\r\n component: appComponents.CompactCodeTitleTile,\r\n selectors: [Select.validationDescendants, Select.primaryKeyFromContext()],\r\n enhancers: [Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.CompactCodeTitleTile\r\n },\r\n\r\n [ControlType.SummaryTileView]: {\r\n component: caseComponents.SummaryTileView,\r\n configType: ControlType.SummaryTileView,\r\n selectors: [Select.activeChildItem],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.TitleWrapperPrimaryKey]: {\r\n component: appComponents.TitleWrapper,\r\n selectors: [Select.primaryKeyFromContext('title')],\r\n configType: ControlType.TitleWrapperPrimaryKey\r\n },\r\n\r\n [ControlType.ReferenceTileView]: {\r\n component: caseComponents.ReferenceSelectTileView,\r\n selectors: [Select.referenceCodeDataTag, Select.referenceModalTempData, Select.activeChildItem],\r\n configType: ControlType.ReferenceTileView,\r\n enhancers: [Enhance.withPrimaryKeyAsOptionIteratorId, Enhance.withSize({lg: 12})],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ReferenceTile]: {\r\n component: appComponents.CompactCodeTitleTile,\r\n selectors: [Select.validationDescendants, Select.referenceCodeDataTag, Select.referenceFieldValueAsPrimaryKey],\r\n configType: ControlType.ReferenceTile,\r\n enhancers: []\r\n },\r\n\r\n [ControlType.DisplayCodesReference]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withTileSize({md: 6, xl: 4})],\r\n configType: ControlType.DisplayCodesReference\r\n },\r\n\r\n [ControlType.ReferenceDate]: {\r\n component: UI.DateTime,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'),\r\n Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceDate\r\n },\r\n\r\n [ControlType.ReferenceDateTime]: {\r\n component: UI.DateTime,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'),\r\n Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceDateTime\r\n },\r\n\r\n [ControlType.ReferenceTextBox]: {\r\n component: UI.Textbox,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceTextBox\r\n },\r\n\r\n [ControlType.ReferenceNumberBox]: {\r\n component: UI.Numberbox,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceNumberBox\r\n },\r\n\r\n [ControlType.ReferenceEntityKeyCategorySelectSingleShortList]: {\r\n component: UI.SelectSingleShortList,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceEntityKeyCategorySelectSingleShortList\r\n },\r\n\r\n [ControlType.ReferenceCheckBox]: {\r\n component: UI.Checkbox,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceCheckBox\r\n },\r\n\r\n [ControlType.ReferenceSelectSingleHierarchy]: {\r\n component: UI.SelectSingleHierarchy,\r\n selectors: [\r\n Select.referenceFieldValue\r\n ],\r\n enhancers: [\r\n Enhance.withOptionCategorySupport,\r\n Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withSize({md: 6, xl: 4})\r\n ],\r\n configType: ControlType.ReferenceSelectSingleHierarchy\r\n },\r\n\r\n [ControlType.ReferenceSelectSingle]: {\r\n component: UI.SelectSingle,\r\n selectors: [Select.referenceFieldValue],\r\n enhancers: [Enhance.withHideIfPropValueNotInVisibleForValues('referenceType'), Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.ReferenceSelectSingle\r\n },\r\n\r\n [ControlType.SurveyLink]: {\r\n component: UI.Numberbox,\r\n selectors: [],\r\n enhancers: [Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.SurveyLink\r\n },\r\n\r\n [ControlType.DisplaySurveyLink]: {\r\n component: UI.Link,\r\n selectors: [Select.templateURL],\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3})],\r\n configType: ControlType.SurveyLink\r\n },\r\n\r\n [ControlType.Link]: {\r\n component: UI.Link,\r\n selectors: [Select.domainTemplateUrl],\r\n enhancers: [Enhance.withSize({md: 6, xl: 4})],\r\n configType: ControlType.Link\r\n },\r\n\r\n [ControlType.Signature]: {\r\n component: UI.ToggleButton,\r\n selectors: [Select.rowEntity, Select.currentUser],\r\n enhancers: [\r\n Enhance.withProperty('valueResolver', ()=> createUTCDate() ),\r\n caseSignReadonly(),\r\n Enhance.withSize({md: 6, xl: 4})\r\n ],\r\n configType: ControlType.Signature\r\n },\r\n\r\n [ControlType.RiskMatrix]: {\r\n component: appComponents.RiskMatrix,\r\n selectors: [Select.validationDescendants],\r\n enhancers: [AddFeature.withRiskMatrix],\r\n configType: ControlType.RiskMatrix\r\n },\r\n\r\n [ControlType.DisplayInsuranceBalance]: {\r\n component: UI.DisplayNumber,\r\n selectors: [Select.diffFieldValueAndChildValuesTotals('valueItem', (columnName[tableName.economy]).costEstimate)],\r\n configType: ControlType.DisplayInsuranceBalance\r\n },\r\n\r\n [ControlType.IndicatorCodeSelectorTileView]: {\r\n component: appComponents.CodeSelectorTileView,\r\n selectors: [Select.childEntityTypeKeys, Select.activeChildItem],\r\n configType: ControlType.IndicatorCodeSelectorTileView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.AddDocumentItemLinkButton]: {\r\n component: appComponents.AddDocumentItemLinkButton,\r\n selectors: [Select.connectedPkFromContext],\r\n configType: ControlType.AddDocumentItemLinkButton\r\n },\r\n\r\n [ControlType.ProcessingLogView]: {\r\n component: appComponents.LogView,\r\n configType: ControlType.ProcessingLogView,\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.ProcessingLogDetails]: {\r\n component: appComponents.LogDetails,\r\n configType: ControlType.ProcessingLogDetails\r\n },\r\n\r\n [ControlType.ProcessingLogLink]: {\r\n component: appComponents.ProcessingLogLink,\r\n selectors: [Select.childEntityCount([\r\n {\r\n entityPath: [{ entityType: tableName.trans }, { entityType: tableName.transLog }],\r\n propName: (columnName[tableName.transLog] as any).caseLogs,\r\n dataTag: (columnName[tableName.transLog] as any).CaseLogNo\r\n }])],\r\n enhancers:[Enhance.withSize({md:4, lg:6, xl:6})],\r\n configType: ControlType.ProcessingLogLink\r\n },\r\n\r\n [ControlType.MailLogLink]: {\r\n component: appComponents.MailLogLink,\r\n configType: ControlType.MailLogLink\r\n },\r\n\r\n [ControlType.CaseLogLink]: {\r\n component: appComponents.CaseLogLink,\r\n enhancers: [AddFeature.withCaseLogDownload],\r\n selectors: [Select.childValues, Select.primaryKeyFromContext()],\r\n configType: ControlType.CaseLogLink\r\n },\r\n\r\n [ControlType.MailLogDetails]: {\r\n component: appComponents.LogDetails,\r\n configType: ControlType.MailLogDetails\r\n },\r\n\r\n [ControlType.AddNewCaseButton]: {\r\n component: caseComponents.AddNewCaseButton,\r\n selectors: [\r\n Select.entityId, Select.connectedCasesMaxSequence, Select.connectedDrafts\r\n ],\r\n configType: ControlType.AddNewCaseButton\r\n },\r\n\r\n [ControlType.MailLogDetails]: {\r\n component: appComponents.LogDetails,\r\n configType: ControlType.MailLogDetails\r\n },\r\n\r\n [ControlType.CompactTileHeader]: {\r\n component: appComponents.CompactTileHeader,\r\n configType: ControlType.CompactTileHeader,\r\n selectors: [Select.tileHeaderPrimaryKey]\r\n },\r\n\r\n [ControlType.ConnectedCasesFactbox]: {\r\n component: caseComponents.ConnectedCasesFactbox,\r\n configType: ControlType.ConnectedCasesFactbox,\r\n enhancers: [Enhance.withClassNames('compact')],\r\n selectors: [\r\n Select.connectedCasesRiskValues,\r\n Select.connectedCasesIntegrityValues,\r\n Select.connectedCasesActionCount,\r\n Select.factboxLinks,\r\n Select.urlToConnectedCase({withBaseUrl:true, openNew: true})\r\n ]},\r\n\r\n [ControlType.CheckForDuplicateRegistrationsButton]: {\r\n component: caseComponents.CheckForDuplicateRegistrationsButton,\r\n selectors: [\r\n Select.entityId,\r\n Select.connectedCasesMaxSequence,\r\n Select.requiredSearchFieldsFilled,\r\n Select.connectedCasesIds,\r\n Select.connectedCasesPendingDeleteIds,\r\n Select.caseListingComponent\r\n ],\r\n enhancers: [\r\n AddFeature.withSearchCasesToConnect\r\n ],\r\n configType: ControlType.CheckForDuplicateRegistrationsButton\r\n },\r\n\r\n [ControlType.LinkSearchExternalProvider]: {\r\n component: caseComponents.SearchExternalProvider,\r\n configType: ControlType.LinkSearchExternalProvider,\r\n enhancers: [ AddFeature.withSearchExternalProvider ]\r\n },\r\n\r\n [ControlType.CompactTile]: {\r\n component: UI.CompactTile,\r\n selectors: [\r\n Select.validationDescendants,\r\n Select.copyIteratorProps,\r\n Select.editDocumentItemVisibility,\r\n Select.primaryKeyFromContext()\r\n ],\r\n configType: ControlType.CompactTile\r\n },\r\n\r\n [ControlType.ConnectToBowtieButton]: {\r\n component: caseComponents.ConnectToBowtieButton,\r\n selectors: [\r\n Select.entityId,\r\n Select.connectedCasesMaxSequence,\r\n Select.requiredSearchFieldsFilled,\r\n Select.connectedCasesIds,\r\n Select.connectedCasesPendingDeleteIds,\r\n Select.caseListingComponent\r\n ],\r\n enhancers: [\r\n AddFeature.withSearchCasesToConnect\r\n ],\r\n configType: ControlType.ConnectToBowtieButton\r\n },\r\n\r\n [ControlType.BarrierInspectionTileView]: {\r\n component: caseComponents.SummaryTileView,\r\n configType: ControlType.BarrierInspectionTileView,\r\n selectors: [ Select.activeChildItem ],\r\n enhancers: [ Enhance.withProperty('doubleWidth', true)],\r\n iterate: { type: IteratorType.DataRows }\r\n },\r\n\r\n [ControlType.DisplayNumberBarrierInspection]: {\r\n component: UI.DisplayNumber,\r\n enhancers: [Enhance.withSize({lg: 12})],\r\n configType: ControlType.DisplayNumber\r\n },\r\n\r\n [ControlType.DisplayCodesStatus]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withProperty('displayBackgroundColor', 'false'), \r\n Enhance.withProperty('style', 'primary')],\r\n configType: ControlType.DisplayCodesStatus\r\n },\r\n\r\n [ControlType.SelectSingleSignature]: {\r\n component: UI.SelectSingle,\r\n selectors: [Select.rowEntity],\r\n enhancers: [ \r\n readonlyWhenSigned(),\r\n Enhance.withSize({md: 6, xl: 4})\r\n ],\r\n configType: ControlType.SelectSingleSignature\r\n }\r\n};\r\n","import { connect } from 'react-redux';\r\nimport { TriggerValidation } from 'app/area/case/draft/action-types';\r\n\r\nexport const withTriggerValidation = (component: any, uiEngineProps: any) => {\r\n \r\n const dispatchToProps = (dispatch: any): any => {\r\n return {\r\n triggerValidation: () => dispatch(new TriggerValidation())\r\n };\r\n };\r\n\r\n return connect<any, any, any>(undefined, dispatchToProps)(component);\r\n};\r\n","\r\nimport { connect } from 'react-redux';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { actionCreators } from './actions';\r\nimport { createUploader } from 'app/infrastructure/remote-data';\r\nimport { endpoint } from 'app/area/case/features/file-upload/constants';\r\n\r\nexport const withFileUpload = (component: any, uiEngineProps: any) => {\r\n const dispatchToProps = (dispatch: any): Partial<FileUploadContainerProps> => {\r\n const hostProps = uiEngineProps.hostProps();\r\n const entityId = hostProps.entityId;\r\n\r\n return {\r\n createUploader: () => createUploader(endpoint.uploadFor(entityId)),\r\n addItem: (blobId: number, title: string) =>\r\n dispatch(actionCreators.addAttachment(uiEngineProps, blobId, title)),\r\n deleteItem: (id: number) =>\r\n dispatch(actionCreators.deleteAttachment(uiEngineProps, id)),\r\n updateItemTitle: (id: number, title: string) =>\r\n dispatch(actionCreators.updateAttachmentTitle(uiEngineProps, id, title)),\r\n setItemAsMain: (id: number) =>\r\n dispatch(actionCreators.setMainAttachmentImage(uiEngineProps, id))\r\n };\r\n };\r\n\r\n return connect<any, any, any>(null, dispatchToProps)(component);\r\n};\r\n\r\nexport interface UploadedFile {\r\n id?: number; // No. column of attachment row\r\n blobId?: number; // Blob id of attachment row if the file has been uploaded\r\n name: string;\r\n title: string;\r\n type: string;\r\n size: number;\r\n thumbnailSize?: number;\r\n attachedBy?: ComplexValue<number>;\r\n attachedAt?: Date;\r\n mainImage?: Boolean;\r\n}\r\n\r\nexport interface FileUploadContainerProps {\r\n createUploader?: () => XMLHttpRequest;\r\n addItem?: (blobId: number, name: string) => void;\r\n deleteItem?: (id: number) => void;\r\n updateItemTitle?: (id: number, name: string) => void;\r\n setItemAsMain?: (id: number) => void;\r\n}\r\n","import * as React from 'react';\r\nimport set from 'lodash/set';\r\nimport get from 'lodash/get';\r\nimport { columnName, tableName } from '../../case-data-model';\r\n\r\nexport function caseSignReadonly<P extends object>() {\r\n\r\n return (WrappedComponent: React.ComponentClass<P> | React.SFC<P>) => {\r\n\r\n return class extends React.PureComponent<P> {\r\n public render() {\r\n const {\r\n readOnly,\r\n currentUser,\r\n rowEntity,\r\n value\r\n } = this.props as any;\r\n\r\n let readOnlyOverride = undefined;\r\n const modifiedProps: P = {...this.props as any};\r\n const rowUser = get(rowEntity, `${columnName[tableName.signature].signaturePerson}[0].value`);\r\n const signatureType = get(rowEntity, `${columnName[tableName.signature].signatureType}[0].value`);\r\n\r\n if(!signatureType){\r\n readOnlyOverride = true;\r\n }\r\n\r\n // user > 0, but not current user on row\r\n if(rowUser && rowUser !== currentUser.value){\r\n readOnlyOverride = true;\r\n }\r\n\r\n // date and no user: hide (awaiting name as default value from server)\r\n if(value && !rowUser) {\r\n readOnlyOverride = true;\r\n }\r\n\r\n // domain criteria, typically effect of beeing a case administrator\r\n if(readOnly === false) {\r\n readOnlyOverride = false;\r\n }\r\n\r\n // signaturetype, date and user === current user: show\r\n // case admin for others rows: do nothing (let server provide readonly for unsign)\r\n if (readOnlyOverride !== undefined) {\r\n set(modifiedProps as P, 'readOnly', readOnlyOverride);\r\n }\r\n\r\n return <WrappedComponent { ...modifiedProps } /> ;\r\n }\r\n };\r\n };\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { SearchExternalProviderProps } from 'app/area/case/components';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport * as actions from './actions';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { getCaseData, getEntityContext } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getById } from 'app/infrastructure/store';\r\nimport { selectEntityFieldValues } from 'app/area/case/features/search-external-provider/selectors';\r\nimport { SearchExternalResultValue } from 'app/area/case/types-store';\r\n\r\nexport const withSearchExternalProvider = (component: any, uiEngineProps: ConnectedComponentProps) => {\r\n const stateToProps = (appState: ApplicationState): Partial<SearchExternalProviderProps> => {\r\n const caseState = appState[uiEngineProps.hostProps().statePath];\r\n const searchExternalProvider = caseState.searchExternalProvider;\r\n const caseData = getCaseData(caseState, uiEngineProps);\r\n const resolveContext = getEntityContext(appState, uiEngineProps);\r\n const entity = getById(caseData, resolveContext.path);\r\n\r\n const inputFields = uiEngineProps.componentDescriptor.properties && \r\n uiEngineProps.componentDescriptor.properties.dataProviderInputFields as string;\r\n\r\n let canSearch = false;\r\n\r\n if (inputFields) {\r\n const entityFieldValues = selectEntityFieldValues(entity);\r\n const requiredFields = inputFields.split(',').map(f => f.trim());\r\n canSearch = requiredFields.some(r => entityFieldValues.some(e => e.dataTag === r));\r\n }\r\n \r\n return {\r\n fetching: searchExternalProvider && searchExternalProvider.fetching,\r\n results: searchExternalProvider && searchExternalProvider.resultItems,\r\n error: searchExternalProvider && searchExternalProvider.error,\r\n canSearch\r\n };\r\n };\r\n\r\n const dispatchToProps = (dispatch: any, props: ConnectedComponentProps): Partial<SearchExternalProviderProps> => {\r\n return {\r\n searchExternalProvider: () => dispatch(actions.searchExternalProvider(props)),\r\n clearResults: () => dispatch(actions.clearResults()),\r\n setValuesFromResult: (result: SearchExternalResultValue[]) => dispatch(actions.setValuesFromResult(props, result))\r\n };\r\n };\r\n\r\n return connect<any, any, any>(stateToProps, dispatchToProps)(component);\r\n};\r\n","import * as React from 'react';\r\nimport set from 'lodash/set';\r\nimport get from 'lodash/get';\r\nimport { columnName, tableName } from '../../case-data-model';\r\n\r\nexport function readonlyWhenSigned<P extends object>() {\r\n\r\n return (WrappedComponent: React.ComponentClass<P> | React.SFC<P>) => {\r\n\r\n return class extends React.PureComponent<P> {\r\n public render() {\r\n const {\r\n readOnly,\r\n rowEntity,\r\n value\r\n } = this.props as any;\r\n\r\n let readOnlyOverride = undefined;\r\n const modifiedProps: P = {...this.props as any};\r\n const signatureDate = get(rowEntity, `${columnName[tableName.signature].signatureDate}[0].value`); \r\n\r\n if(value && signatureDate){\r\n readOnlyOverride = true;\r\n }\r\n\r\n // domain criteria, typically effect of being a case administrator\r\n if(readOnly === false) {\r\n readOnlyOverride = false;\r\n }\r\n\r\n // case admin for others rows: do nothing (let server provide readonly for unsign)\r\n if (readOnlyOverride !== undefined) {\r\n set(modifiedProps as P, 'readOnly', readOnlyOverride);\r\n }\r\n\r\n return <WrappedComponent { ...modifiedProps } /> ;\r\n }\r\n };\r\n };\r\n}\r\n","import * as UI from 'ui';\r\nimport * as Select from 'app/area/case/selectors';\r\nimport * as appComponents from 'app/components';\r\nimport { Dummy } from 'app/infrastructure/ui/debug-render';\r\nimport * as AppEnhance from 'app/components/enhancers';\r\nimport * as UIEnhance from 'ui/common/enhancers';\r\nimport * as caseComponents from 'app/area/case/components';\r\nimport * as AddFeature from 'app/area/case/features';\r\nimport * as caseData from 'app/area/case/case-data-model';\r\nimport { SharePreset } from 'app/area/case/features';\r\nimport { ControlType } from 'app/infrastructure/ui';\r\nimport { ComponentIndex } from 'app/infrastructure/ui/types-uischema';\r\n\r\nconst Enhance = {...AppEnhance, ...UIEnhance};\r\n\r\nexport const reportModeComponents: ComponentIndex = {\r\n\r\n [ControlType.NotImplemented]: {\r\n component: Dummy,\r\n configType: ControlType.NotImplemented\r\n },\r\n\r\n [ControlType.SectionPanel]: {\r\n component: Dummy,\r\n configType: ControlType.SectionPanel\r\n },\r\n\r\n [ControlType.View]: {\r\n component: UI.Paper,\r\n enhancers: [Enhance.withClassNames('compact')],\r\n configType: ControlType.View\r\n },\r\n\r\n [ControlType.LinkHeading]: {\r\n component: UI.LinkHeading,\r\n enhancers: [Enhance.withClassNames('compact')],\r\n selectors: [Select.urlToConnectedCase(), Select.urlToCase()],\r\n configType: ControlType.LinkHeading\r\n },\r\n\r\n [ControlType.HeaderPanel]: {\r\n component: appComponents.ReadHeaderPanel,\r\n enhancers: [Enhance.withClassNames('compact'), AddFeature.withSharing(SharePreset.case)],\r\n selectors: [Select.headerVisibilityConfiguration, Select.casePermissions, Select.urlToCase(), Select.caseId,\r\n Select.templateURL, Select.sharedState],\r\n configType: ControlType.HeaderPanel\r\n },\r\n\r\n [ControlType.FlexPanel]: {\r\n component: UI.FlexPanel,\r\n configType: ControlType.FlexPanel\r\n },\r\n\r\n [ControlType.Tile]: {\r\n component: Enhance.withLink(UI.Tile),\r\n configType: ControlType.Tile,\r\n selectors: [\r\n Select.urlToChildEntity,\r\n Select.primaryKeyFromContext(),\r\n Select.editDocumentItemVisibility\r\n ]\r\n },\r\n\r\n [ControlType.FactBox]: {\r\n component: caseComponents.FactBox,\r\n selectors: [\r\n Select.riskValues,\r\n Select.childEntityValuesAsProperty('childValueItems', [\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.consequences }],\r\n propName: (caseData.columnName[caseData.tableName.consequences] as any).actConsConsequenceIcons\r\n }]),\r\n Select.childEntityCount([\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.action }],\r\n propName: (caseData.columnName[caseData.tableName.action] as any).numberOfActions\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.action }],\r\n propName: (caseData.columnName[caseData.tableName.action] as any).numberOfClosedActions,\r\n dataTag: (caseData.columnName[caseData.tableName.action] as any).actionCompletedDate\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.object }],\r\n propName: (caseData.columnName[caseData.tableName.object] as any).numberOfFiles\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.comment }],\r\n propName: (caseData.columnName[caseData.tableName.comment] as any).numberOfComments\r\n },\r\n {\r\n entityPath: [\r\n { entityType: caseData.tableName.trans },\r\n { entityType: caseData.tableName.connectionTypes, id: 1},\r\n { entityType: caseData.tableName.connectedCases}\r\n ],\r\n propName: (caseData.propNameConnectionType[caseData.connectionType.superior] as any).numberOfSuperiorCases\r\n },\r\n {\r\n entityPath: [\r\n { entityType: caseData.tableName.trans },\r\n { entityType: caseData.tableName.connectionTypes, id: 2},\r\n { entityType: caseData.tableName.connectedCases}\r\n ],\r\n propName: (caseData.propNameConnectionType[caseData.connectionType.subordinate] as any).numberOfSubordinateCases\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.causes }],\r\n propName: (caseData.columnName[caseData.tableName.causes] as any).numberOfCauses\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.involvedPerson }],\r\n propName: (caseData.columnName[caseData.tableName.involvedPerson] as any).numberOfInvolvedPersons\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans },\r\n { entityType: caseData.tableName.attachmentType, id: 2},\r\n { entityType: caseData.tableName.link }],\r\n propName: (caseData.columnName[caseData.tableName.link] as any).numberOfLinks\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.involvedDrug }],\r\n propName: (caseData.columnName[caseData.tableName.involvedDrug] as any).numberOfInvolvedDrugs\r\n },\r\n {\r\n entityPath: [{ entityType: caseData.tableName.trans }, { entityType: caseData.tableName.assessment }],\r\n propName: (caseData.columnName[caseData.tableName.assessment] as any).numberOfAssessments\r\n }\r\n ]),\r\n Select.integrityValues,\r\n Select.checklistValues,\r\n Select.factboxLinks,\r\n Select.urlToCase(),\r\n Select.reportCategory,\r\n Select.connectedCasesIds\r\n ],\r\n enhancers: [Enhance.withClassNames('compact'), AddFeature.withFileDownload],\r\n configType: ControlType.FactBox\r\n },\r\n\r\n [ControlType.SurveyLink]: {\r\n component: UI.Link,\r\n selectors: [Select.templateURL],\r\n enhancers: [],\r\n configType: ControlType.SurveyLink\r\n },\r\n\r\n [ControlType.Link]: {\r\n component: UI.Link,\r\n selectors: [Select.domainTemplateUrl],\r\n enhancers: [Enhance.withSize({md: 6, lg:4, xl:3})],\r\n configType: ControlType.Link\r\n },\r\n\r\n [ControlType.Signature]: {\r\n component: UI.DisplayDate,\r\n selectors: [],\r\n enhancers: [],\r\n configType: ControlType.Signature\r\n },\r\n\r\n [ControlType.CompactTile]: {\r\n component: Enhance.withLink(UI.CompactTile),\r\n configType: ControlType.CompactTile,\r\n selectors: [\r\n Select.urlToChildEntity,\r\n Select.editDocumentItemVisibility\r\n ]\r\n },\r\n\r\n [ControlType.CompactTileHeader]: {\r\n component: appComponents.CompactTileHeader,\r\n selectors: [Select.tileHeaderPrimaryKeyWithReportKeyLabel],\r\n configType: ControlType.CompactTileHeader\r\n },\r\n\r\n [ControlType.DisplayCodesStatus]: {\r\n component: UI.DisplayCodes,\r\n enhancers: [Enhance.withProperty('style', 'secondary')],\r\n configType: ControlType.DisplayCodesStatus\r\n }\r\n\r\n};\r\n","import * as UI from 'ui';\r\nimport * as Select from 'app/area/case/selectors';\r\nimport { Dummy } from 'app/infrastructure/ui/debug-render';\r\nimport * as AppEnhance from 'app/components/enhancers';\r\nimport * as UIEnhance from 'ui/common/enhancers';\r\nimport { ControlType } from 'app/infrastructure/ui';\r\nimport { ComponentIndex } from 'app/infrastructure/ui/types-uischema';\r\n\r\nconst Enhance = {...AppEnhance, ...UIEnhance};\r\n\r\nexport const embeddedReportModeComponents: ComponentIndex = {\r\n\r\n [ControlType.NotImplemented]: {\r\n component: Dummy,\r\n configType: ControlType.NotImplemented\r\n },\r\n\r\n [ControlType.Tile]: {\r\n component: UI.Tile,\r\n selectors: [\r\n Select.primaryKeyFromContext(),\r\n Select.expandAll,\r\n Select.casePermissions,\r\n Select.editDocumentItemVisibility\r\n ],\r\n configType: ControlType.Tile\r\n },\r\n\r\n [ControlType.CompactTile]: {\r\n component: UI.CompactTile,\r\n selectors: [\r\n Select.primaryKeyFromContext(),\r\n Select.expandAll,\r\n Select.casePermissions,\r\n Select.editDocumentItemVisibility\r\n ],\r\n configType: ControlType.CompactTile\r\n },\r\n\r\n [ControlType.LinkHeading]: {\r\n component: UI.ExternalLinkHeading,\r\n enhancers: [Enhance.withClassNames('compact')],\r\n selectors: [Select.urlToCase({withBaseUrl: true, openNew: true})],\r\n configType: ControlType.LinkHeading\r\n }\r\n\r\n};\r\n","import { ComponentRegistry, ComponentType } from './types-uischema';\r\nimport { readModeComponents } from './component-mappings/read';\r\nimport { editModeComponents } from './component-mappings/edit';\r\nimport { reportModeComponents } from './component-mappings/report';\r\nimport { embeddedReportModeComponents } from './component-mappings/embedded-report';\r\nimport { ControlType } from '.';\r\nimport { componentDefaults } from 'app/infrastructure/ui/component-configuration';\r\nimport { RenderMode } from 'app/types-shared';\r\n\r\n/**\r\n * \r\n * A mapping between a set of Configuration `control types` and the \r\n * react component that should render\r\n * \r\n */\r\nexport const registry: ComponentRegistry = {\r\n\r\n components: [\r\n\r\n /**\r\n * a set of controls for read mode \r\n */\r\n {\r\n mode: RenderMode.read,\r\n\r\n components: readModeComponents\r\n },\r\n\r\n /**\r\n * A set of controls for edit mode\r\n */\r\n {\r\n mode: RenderMode.edit,\r\n\r\n components: editModeComponents\r\n },\r\n\r\n {\r\n mode: RenderMode.report,\r\n parentMode: RenderMode.read,\r\n\r\n components: reportModeComponents\r\n },\r\n\r\n {\r\n mode: RenderMode.embeddedReport,\r\n parentMode: RenderMode.report,\r\n\r\n components: embeddedReportModeComponents\r\n }\r\n ]\r\n\r\n};\r\n\r\nexport function* resolveRenderModes(mode: RenderMode): IterableIterator<RenderMode> {\r\n let currentMode = mode;\r\n while (currentMode === 0 || currentMode) {\r\n yield currentMode;\r\n currentMode = registry.components.find(s => s.mode === currentMode).parentMode;\r\n }\r\n}\r\n\r\nfunction resolveComponentForMode(typeId: number, mode: RenderMode): ComponentType {\r\n const componentsForMode = registry.components.find(s => s.mode === mode);\r\n const descriptor = componentsForMode.components[typeId];\r\n if (!descriptor && (componentsForMode.parentMode === 0 || componentsForMode.parentMode)) {\r\n return resolveComponentForMode(typeId, componentsForMode.parentMode);\r\n }\r\n return descriptor;\r\n}\r\n\r\n/**\r\n * Returns component and render metadata for given type and render mode \r\n * \r\n * @export\r\n * @param {string} typeString\r\n * @param {string} mode\r\n * @returns\r\n */\r\nexport function resolveComponent(typeId: number, mode: RenderMode): ComponentType {\r\n const descriptor = resolveComponentForMode(typeId, mode);\r\n return (descriptor && descriptor.component)\r\n ?\r\n descriptor.component :\r\n resolveComponentForMode(ControlType.NotImplemented, mode).component;\r\n}\r\n\r\n/**\r\n * Returns custom higher order components that a component should be wrapped in when connecting the UI\r\n * \r\n * @param typeId\r\n * @param mode \r\n */\r\nexport function resolveComponentEnhancers(typeId: number, mode: RenderMode) {\r\n const descriptor = resolveComponentForMode(typeId, mode);\r\n return (descriptor && descriptor.enhancers)\r\n ?\r\n descriptor.enhancers :\r\n resolveComponentForMode(ControlType.NotImplemented, mode).enhancers;\r\n}\r\n\r\n/**\r\n * The lightweight extra props seelctors\r\n */\r\nexport function resolveComponentSelectors(typeId: number, mode: RenderMode) {\r\n const descriptor = resolveComponentForMode(typeId, mode);\r\n return (descriptor && descriptor.selectors)\r\n ?\r\n descriptor.selectors :\r\n resolveComponentForMode(ControlType.NotImplemented, mode).selectors;\r\n}\r\n\r\n/**\r\n * Returns an array of event names that a component should have assigned\r\n */\r\nexport function resolveComponentEvents(typeId: number, mode: RenderMode) {\r\n const descriptor = resolveComponentForMode(typeId, mode);\r\n const hasModeEvents = descriptor && descriptor.events;\r\n const eventsForMode = hasModeEvents ? descriptor.events : [];\r\n const knownType = componentDefaults[typeId];\r\n if (!knownType) {\r\n return [];\r\n }\r\n return knownType.events.concat(eventsForMode);\r\n}\r\n\r\n/**\r\n * Returns an object of props that applies to the component independent of render mode\r\n */\r\nexport function resolveComponentDefaultProps(typeId: number) {\r\n return (componentDefaults[typeId] ? componentDefaults[typeId].props : undefined) || {};\r\n}\r\n\r\nexport function resolveComponentIteration(typeId: number, mode: RenderMode) {\r\n const descriptor = resolveComponentForMode(typeId, mode);\r\n \r\n return descriptor && descriptor.iterate;\r\n}\r\n","import { DomainAttributes } from '../types-uidefinition';\r\n\r\n/**\r\n * Performance optimized attribute value parsing\r\n */\r\nexport const parseAttributeValue = (raw:string) => {\r\n const value = raw && raw.trim();\r\n if(value === 'null') { return null; }\r\n if(value === '' || value === 'undefined') { return undefined; } \r\n const numeric = Number(value);\r\n if(Number.isFinite(numeric)) { return numeric; }\r\n if(typeof value === 'string' && \r\n ( value.match(/^(true|false)$/i) )\r\n ){\r\n return JSON.parse(value.toLowerCase() );\r\n }\r\n return value; \r\n};\r\n\r\n/**\r\n * Return an object representing prefixed attribute strings, matched case insensitive\r\n * \r\n * example\r\n * \r\n * input: \r\n * \r\n * [ {name:'label.Showlabel', value: 'True'}, {name: 'label.text', value:\"false\"} ] \r\n * \r\n * \r\n * // Note how Showlabel will be invalid component prop due to it's casing\r\n * returns: {Showlabel=true, text=false}\r\n */\r\nconst prefixRegexCache = new Map();\r\nexport function parsePrefixed(prefix: string, attributes: DomainAttributes[]): any {\r\n if (!prefixRegexCache.has(prefix)) {\r\n const prefixRegex = new RegExp(`^${prefix}\\.`, 'i');\r\n prefixRegexCache.set(prefix, prefixRegex);\r\n }\r\n \r\n if (!attributes || !attributes.length ){\r\n return {};\r\n }\r\n\r\n return attributes\r\n .filter(a => a.name.match(prefixRegexCache.get(prefix)))\r\n .reduce((aggr: {}, v: DomainAttributes) => {\r\n const prop = v.name.split('.')[1]; \r\n aggr[prop] = parseAttributeValue(v.value as string);\r\n return aggr;\r\n }, {});\r\n}\r\n","import { DomainAttributes, Domain } from '../types-uidefinition';\r\nimport { parsePrefixed } from './attribute-parser';\r\nimport { clonePrototype as clone } from 'clone';\r\nimport { componentDefaults } from 'app/infrastructure/ui/component-configuration';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport { resolveRenderModes } from 'app/infrastructure/ui/component-registry';\r\n\r\n/**\r\n * Shared component attributes default object\r\n * \r\n * Ensures shared properties are defined\r\n * \r\n * Pattern for key.property is: camelCasing.camelCase\r\n * \r\n * Object path follows a pattern\r\n * \r\n * Object paths resolves to attribute name:\r\n * \r\n * > commonDefaultAttributes.label.text = :populated from: 'label.text'\r\n */\r\nexport const commonDefaultAttributes: Object = {\r\n\r\n component: {\r\n visible: undefined,\r\n readOnly: undefined,\r\n required: undefined\r\n },\r\n\r\n label: {\r\n text: undefined, // assigned from domain.label\r\n visible: undefined,\r\n required: undefined // assigned from component.required\r\n },\r\n\r\n info: {\r\n text: undefined,\r\n visible: undefined,\r\n type: undefined // 1: Button, 0: Text\r\n },\r\n\r\n infoLong: {\r\n text: undefined,\r\n visible: undefined,\r\n type: undefined // 1: Button, 0: Text\r\n }\r\n\r\n};\r\n\r\n/**\r\n * Reads component attributes that applies to all UI components\r\n */\r\nfunction sharedPropertyBuilder(config: Domain, renderMode: RenderMode) {\r\n\r\n const defaultProps = {\r\n label: {},\r\n info: {},\r\n infoLong: {}\r\n };\r\n\r\n const attributes = config.attributes;\r\n const sharedKeys = Object.keys(commonDefaultAttributes);\r\n const parsedMap = clone(commonDefaultAttributes);\r\n\r\n if (attributes && attributes.length) {\r\n\r\n sharedKeys.forEach((key) => {\r\n const resolvedAttributes = parsePrefixed(key, attributes);\r\n\r\n parsedMap[key] = {\r\n ...parsedMap[key],\r\n ...resolvedAttributes\r\n };\r\n });\r\n }\r\n\r\n const { component, ...propsFromAttributes } = parsedMap;\r\n const result = {\r\n ...defaultProps,\r\n ...component,\r\n ...propsFromAttributes\r\n };\r\n\r\n // Map label required to the value of component.required\r\n result.label.required = parsedMap.component.required;\r\n result.label.text = config.label;\r\n\r\n // Determine visibility based on the current RenderMode \r\n result.visible = true;\r\n if (result.hiddenModes) {\r\n const renderModeList = Array.from(resolveRenderModes(renderMode));\r\n const nameOfCurrentModes = renderModeList.map(rm => RenderMode[rm]);\r\n const currentModeInList = nameOfCurrentModes.some(nameOfCurrentMode => result.hiddenModes.split(',').indexOf( nameOfCurrentMode ) > -1);\r\n result.visible = !currentModeInList;\r\n }\r\n\r\n // Default to visible when text is defined \r\n ['label', 'info', 'infoLong'].forEach((item: any) => {\r\n if (result[item].visible === undefined) {\r\n result[item].visible = !!result[item].text;\r\n }\r\n });\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Resolves a component builder and attribute prefix key for the component given\r\n */\r\nfunction componentPropertyBuilder(componentType: number, attributes: DomainAttributes[]) {\r\n const builderConfig = componentDefaults[componentType];\r\n\r\n if (!attributes || !attributes.length) {\r\n return {};\r\n }\r\n\r\n if (!builderConfig || !builderConfig.attributeKey) {\r\n\r\n // Logging is a side effect and can only be used in development\r\n //debug(`ComponentType ${componentType} has no configured attribute prefix key`);\r\n\r\n return {};\r\n }\r\n\r\n const builderFn = parsePrefixed;\r\n const builder = builderFn.bind(null, builderConfig.attributeKey, attributes);\r\n\r\n return builder();\r\n}\r\n\r\n/**\r\n * Bridging of generic configuration to component spesific props \r\n * to allow for render target independency.\r\n */\r\nexport class PropertyBuilder {\r\n private renderMode: RenderMode;\r\n\r\n private config: Domain;\r\n\r\n constructor(config: Domain, renderMode: RenderMode) {\r\n this.renderMode = renderMode;\r\n this.config = config;\r\n }\r\n\r\n get properties() {\r\n return {\r\n ...this.buildSharedProperties(),\r\n ...this.buildComponentProperties()\r\n };\r\n }\r\n\r\n public buildSharedProperties() {\r\n return sharedPropertyBuilder(this.config, this.renderMode);\r\n }\r\n\r\n public buildComponentProperties() {\r\n return componentPropertyBuilder(this.config.controlType, this.config.attributes);\r\n }\r\n}\r\n","import { ComponentDescriptor, UiDefaultValueDefinition } from 'app/infrastructure/ui/types-uischema';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\n\r\n/**\r\n * When adding a child, all default values must also be calculated and added.\r\n * The information about whether to add a default value is part of the component descriptors.\r\n */\r\nexport function resolveComponentDefaultValues\r\n (rootDescriptor: ComponentDescriptor): UiDefaultValueDefinition[] {\r\n\r\n const entityTypePathEquals = (descriptor: ComponentDescriptor) => {\r\n return deepEquals(descriptor.entityTypePath, rootDescriptor.entityTypePath);\r\n };\r\n\r\n const addDefaultValue = (descriptor: ComponentDescriptor, defaultValues: UiDefaultValueDefinition[]) => { \r\n if (descriptor.defaultValue && entityTypePathEquals(descriptor)) {\r\n defaultValues.push({ dataTag: descriptor.dataTag, defaultValue: descriptor.defaultValue});\r\n }\r\n };\r\n \r\n // Get definitions recursively based on entityPath. Stop at children empty or domain iterate === true.\r\n const iterateChildren = (defaultValues: UiDefaultValueDefinition[], descriptor: ComponentDescriptor) => {\r\n if (!descriptor.iterate) {\r\n addDefaultValue(descriptor, defaultValues);\r\n \r\n descriptor.children && descriptor.children.map(child => iterateChildren(defaultValues, child));\r\n }\r\n\r\n return defaultValues;\r\n };\r\n\r\n return rootDescriptor.children && rootDescriptor.children.reduce(iterateChildren, []);\r\n}\r\n","// tslint:disable no-use-before-declare\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { invariant } from 'app/infrastructure/log';\r\nimport { ControlType, IteratorType } from 'app/infrastructure/ui/component-configuration';\r\nimport { \r\n InitialUiEngineProps, \r\n DefaultValueDefinition, \r\n UiDefaultValueDefinition, \r\n UiSchema, \r\n ComponentDescriptor,\r\n ConnectedComponentProps,\r\n ComponentProps,\r\n ComponentCallbacks\r\n} from 'app/infrastructure/ui/types-uischema';\r\nimport { UiDefinition as UiConfiguration, Domain } from 'app/infrastructure/ui/types-uidefinition';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport { clonePrototype } from 'clone';\r\nimport {\r\n resolveComponent,\r\n resolveComponentDefaultProps,\r\n resolveComponentEvents,\r\n resolveComponentEnhancers,\r\n resolveComponentSelectors,\r\n resolveComponentIteration\r\n} from 'app/infrastructure/ui/component-registry';\r\nimport { PropertyBuilder } from './property-builder';\r\nimport { resolveComponentDefaultValues } from 'app/infrastructure/ui/builder/default-values';\r\nimport { memoize } from 'app/infrastructure/js';\r\n\r\n/**\r\n * Repeated calls to build a schema returns the same instance given the \r\n * equal object references for config, and value reference for mode\r\n * for the same combination of applicationId, domainContext and rootDomain\r\n */\r\nconst schemaCache = new Map();\r\nconst memoized = (mode: RenderMode, config: UiConfiguration) => {\r\n const key = JSON.stringify([mode, config.applicationId, config.domainContext]);\r\n if (!schemaCache.has(key)) {\r\n const memoizedFunction = memoize((innerMode: RenderMode, innerConfig: UiConfiguration) => new SchemaBuilder()\r\n .usingModeResolver(() => innerMode)\r\n .fromConfiguration(innerConfig)\r\n .build()\r\n );\r\n schemaCache.set(key, memoizedFunction);\r\n }\r\n return schemaCache.get(key)(mode, config);\r\n};\r\n\r\n/**\r\n * SchemaBuilder builds a typed render schema from a JSON configuration\r\n * \r\n * @export\r\n * @class SchemaBuilder\r\n */\r\nexport class SchemaBuilder implements UiSchema {\r\n public contextId: number;\r\n public applicationId: number;\r\n public id: string;\r\n public children: ComponentDescriptor[];\r\n private config: UiConfiguration;\r\n private modeResolver: (controlType: number, componentId: number) => RenderMode;\r\n\r\n // tslint:disable-next-line:function-name\r\n public static create(mode: RenderMode, config: UiConfiguration) : UiSchema {\r\n if (!config) {\r\n return undefined;\r\n }\r\n return memoized(mode, config); \r\n }\r\n\r\n /**\r\n * Use this method to assign the configuration that the UI schema \r\n * should be built from\r\n * \r\n * @param {UiConfiguration} config\r\n * @returns {Schema}\r\n * \r\n * @memberOf Schema\r\n */\r\n public fromConfiguration(config: UiConfiguration): SchemaBuilder {\r\n this.config = config;\r\n this.throwIfConfigIsInvalid();\r\n return this;\r\n }\r\n\r\n /**\r\n * The resolver allows every single component to ask for it's render mode.\r\n * By providing it's id we are flexible in terms of overriding individual component modes at runtime, e.g inline edit\r\n * Passed trough to the component descriptor builder\r\n * \r\n * @param {(componentId: number) => string} resolverFunction\r\n * \r\n * @memberOf Schema\r\n */\r\n public usingModeResolver(resolver: (controlType: number, componentId: number) => RenderMode) {\r\n this.modeResolver = resolver;\r\n return this;\r\n }\r\n\r\n /**\r\n * Builds the actual UiSchema and Component descriptors\r\n * \r\n * @returns {UiSchema}\r\n * \r\n * @memberOf Schema\r\n */\r\n public build(): UiSchema {\r\n invariant( typeof this.modeResolver === 'function', 'modeResolver is required');\r\n this.applicationId = this.config.applicationId;\r\n this.contextId = this.config.domainContext;\r\n this.children = [] as ComponentDescriptor[];\r\n this.mapComponents();\r\n return this;\r\n }\r\n\r\n /**\r\n * When serializing it's not neccessary to include e.g the configuration\r\n * as a duplicate so it will be removed\r\n * \r\n * @returns\r\n * \r\n * @memberOf Schema\r\n */\r\n public toJSON() {\r\n const excluded = ['config'];\r\n const cloned: any = clonePrototype(this as UiSchema);\r\n excluded.forEach((p: any) => delete cloned[p]);\r\n return cloned;\r\n }\r\n\r\n private mapComponents() {\r\n const rootComponent = new ComponentSchema()\r\n .fromConfiguration(this.config.rootDomain)\r\n .build(this.modeResolver);\r\n this.children.push(rootComponent);\r\n }\r\n\r\n private throwIfConfigIsInvalid() {\r\n const s = this.config;\r\n const missingProps = !s.domainContext || !s.rootDomain || !s.rootDomain.children;\r\n if (missingProps) {\r\n throw new Error(`Required properties missing in UiConfiguration ${s.rootDomain}`);\r\n }\r\n }\r\n\r\n private sectionVisibleForCase = \r\n (section: ComponentDescriptor & {config: {[key:string]:any}} ) => \r\n section.properties.visible && \r\n ( section.config.controlType === ControlType.SectionPanel || section.config.controlType === ControlType.ProcessPanel);\r\n\r\n public get availableSections() : ComponentDescriptor[] {\r\n return this.children[0].children.filter(this.sectionVisibleForCase);\r\n }\r\n\r\n /**\r\n * Returns the Schema config for the child with id matching `domainId`\r\n * @param domainId \r\n */ \r\n public getById(domainId: number) : ComponentDescriptor { \r\n\r\n const findChild = (children:ComponentDescriptor[] = []) =>{\r\n for(const child of children){\r\n if(child.id === domainId){\r\n return child;\r\n }\r\n const nested = findChild(child.children);\r\n if(nested){\r\n return nested;\r\n }\r\n }\r\n };\r\n\r\n for(const root of this.children){\r\n if(root.id === domainId){\r\n return root;\r\n }\r\n const child = findChild(root.children);\r\n if(child){\r\n return child;\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\n/**\r\n * The typed representation of Components in the UiSchema format\r\n * \r\n * @class ComponentSchema\r\n * @implements {ComponentDescriptor}\r\n */\r\nexport class ComponentSchema implements ComponentDescriptor {\r\n\r\n /**\r\n * The persisted primary key. aka \"Domain id\"\r\n */\r\n public id: number;\r\n /**\r\n * Translated label text. Resolved server side.\r\n */\r\n public label: string;\r\n /**\r\n * Name of connected entities property whose value is represented by this component\r\n */\r\n public dataTag: string;\r\n /**\r\n * Path of ancestor entities for this component. Left to right, highest to lowest level.\r\n */\r\n public entityTypePath: string[];\r\n /**\r\n * The react component that renders the visual representation\r\n */\r\n public componentClass: any;\r\n /**\r\n * List of higher order components that the componentClass will be wrapped in.\r\n * Prefer selectors where the props are based on the state data.\r\n */\r\n public enhancers: ((componentClass: React.ComponentClass<any> | React.SFC<any>, props?: InitialUiEngineProps) => \r\n React.ComponentClass<any> | React.SFC<any>)[];\r\n /**\r\n * Array of selectors providing extra props, usually selected from the provided state, to the components.\r\n */\r\n public selectors: (( state: CaseState, props: ConnectedComponentProps, fullState: ApplicationState) => any)[];\r\n /**\r\n * Friendly name of the React component. Resolved from name of [ControlType] enum.\r\n */\r\n public componentName: string;\r\n /**\r\n * Display/render order. Determined server side.\r\n */\r\n public sequence: number;\r\n /**\r\n * Child components. Not used for leaf nodes.\r\n */\r\n public children: ComponentDescriptor[];\r\n /**\r\n * Intepreted and typed mappings of server side \"Domain Attributes\"\r\n */\r\n public properties: ComponentProps;\r\n /**\r\n * Functions or Actions the React component rendering this can execute\r\n */\r\n public callbacks: ComponentCallbacks;\r\n /**\r\n * Client side events the component would like to have callbacks provided by the ui engine\r\n */\r\n public componentEvents: string[];\r\n /**\r\n * Default props passed into the representing React component, independent of which component performs the rendering\r\n */\r\n public componentDefaultProps: Object;\r\n /**\r\n * Configuration for iterator components.\r\n */\r\n public iterate: { type: IteratorType, defaultValues: UiDefaultValueDefinition[] };\r\n /**\r\n * When this components value is a reference to a code. \r\n * This is the id of the codetable where codes are loaded from.\r\n */\r\n public codetable: number;\r\n \r\n /**\r\n * definition of how to calculate or fetch the default value for component.\r\n */\r\n public defaultValue: DefaultValueDefinition;\r\n \r\n private config: Domain;\r\n\r\n /**\r\n * Use this method to provide the specific part of configuration\r\n * that this component should be built from.\r\n * \r\n * @param {Domain} config\r\n * @returns\r\n * \r\n * @memberOf ComponentSchema\r\n */\r\n public fromConfiguration(config: Domain) {\r\n this.config = config;\r\n return this;\r\n }\r\n\r\n /**\r\n * Builds the representation of the Component from configuration\r\n * \r\n * @returns {ComponentDescriptor}\r\n * \r\n * @memberOf ComponentSchema\r\n */\r\n public build(modeResolver: (controlType: number, componentId: number) => RenderMode): ComponentDescriptor {\r\n this.id = this.config.domainId;\r\n this.label = this.config.label;\r\n this.dataTag = this.config.dataTag;\r\n this.entityTypePath = this.config.entityTypePath;\r\n this.sequence = this.config.sequence;\r\n this.componentName = ControlType[this.config.controlType];\r\n const mode = modeResolver(this.config.controlType, this.id);\r\n this.componentClass = resolveComponent(this.config.controlType, mode);\r\n this.enhancers = resolveComponentEnhancers(this.config.controlType, mode);\r\n this.selectors = resolveComponentSelectors(this.config.controlType, mode);\r\n this.componentEvents = resolveComponentEvents(this.config.controlType, mode);\r\n this.componentDefaultProps = resolveComponentDefaultProps(this.config.controlType);\r\n this.codetable = this.config.codetable;\r\n this.defaultValue = this.config.defaultValue;\r\n \r\n invariant(!!this.componentClass, `componentClass did not fall back to a default component for ${this.config.controlType}:${mode}`);\r\n\r\n this.buildProperties(mode);\r\n\r\n if (this.config.children) {\r\n this.children =\r\n this.config.children.slice(0)\r\n .map(config => new ComponentSchema().fromConfiguration(config).build(modeResolver));\r\n }\r\n\r\n const iteratorConfig = resolveComponentIteration(this.config.controlType, mode);\r\n\r\n this.iterate = iteratorConfig && {\r\n ...iteratorConfig,\r\n defaultValues: resolveComponentDefaultValues(this)\r\n };\r\n\r\n return this;\r\n }\r\n\r\n private buildProperties(renderMode: RenderMode){\r\n \r\n const builder = new PropertyBuilder(this.config, renderMode);\r\n\r\n this.properties = builder.properties as any;\r\n\r\n }\r\n\r\n /**\r\n * When serializing it's not neccessary to include e.g the configuration\r\n * as a duplicate so it will be removed\r\n * \r\n * @returns\r\n * \r\n * @memberOf Schema\r\n */\r\n public toJSON() {\r\n const excluded = ['config'];\r\n const cloned: any = clonePrototype(this);\r\n excluded.forEach((p: any) => delete cloned[p]);\r\n return cloned;\r\n }\r\n\r\n}\r\n","export * from './schema-builder';\r\n","export const MODAL = {\r\n about: 'about',\r\n changePassword: 'changePassword',\r\n refreshCache: 'refreshCache',\r\n exportToZip: 'exportToZip',\r\n regenerateAggregatedEnv:'regenerateAggregatedEnv',\r\n regenerateAggregatedRisk:'regenerateAggregatedRisk',\r\n none: ''\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"desktop-nav__visuallyhidden--3vbMz\",\"focusable\":\"desktop-nav__focusable--2raO8\",\"items-container\":\"desktop-nav__items-container--2CTZm\",\"itemsContainer\":\"desktop-nav__items-container--2CTZm\",\"btn-new-case\":\"desktop-nav__btn-new-case--1zQi0\",\"btnNewCase\":\"desktop-nav__btn-new-case--1zQi0\",\"nav-item\":\"desktop-nav__nav-item--3_BWB\",\"navItem\":\"desktop-nav__nav-item--3_BWB\",\"desktop-nav\":\"desktop-nav__desktop-nav--d7gJ7\",\"desktopNav\":\"desktop-nav__desktop-nav--d7gJ7\",\"nav-item-icon\":\"desktop-nav__nav-item-icon--1SKs3\",\"navItemIcon\":\"desktop-nav__nav-item-icon--1SKs3\",\"nav-item-text\":\"desktop-nav__nav-item-text--1CSz7\",\"navItemText\":\"desktop-nav__nav-item-text--1CSz7\",\"has-max-width\":\"desktop-nav__has-max-width--3WdU4\",\"hasMaxWidth\":\"desktop-nav__has-max-width--3WdU4\"};","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","import * as React from 'react';\r\n\r\nexport interface OnClickOutsideProps {\r\n className?: string;\r\n onClickOutside: () => void;\r\n tabIndex?: number;\r\n}\r\nexport interface OnClickOutsideState {\r\n clickedInside: boolean;\r\n}\r\n\r\nexport class OnClickOutside extends React.Component<OnClickOutsideProps, OnClickOutsideState> {\r\n private wrapperRef: HTMLDivElement;\r\n\r\n public componentDidMount() {\r\n document.addEventListener('mousedown', this.handleClickOutside);\r\n }\r\n\r\n public componentWillUnmount() {\r\n document.removeEventListener('mousedown', this.handleClickOutside);\r\n }\r\n\r\n private clickedScrollbar = (event: any) => {\r\n return document.documentElement.clientWidth <= event.clientX || document.documentElement.clientHeight <= event.clientY;\r\n }\r\n\r\n /**\r\n * Set the wrapper ref\r\n */\r\n public setWrapperRef = (node: HTMLDivElement) => {\r\n this.wrapperRef = node;\r\n }\r\n\r\n /**\r\n * Alert if clicked on outside of element\r\n */\r\n public handleClickOutside = (event: any) => {\r\n if (!this.clickedScrollbar(event)\r\n && this.wrapperRef\r\n && !this.wrapperRef.contains(event.target)) {\r\n this.props.onClickOutside();\r\n }\r\n }\r\n\r\n public render() {\r\n return (<div ref={this.setWrapperRef} className={this.props.className} >\r\n {this.props.children}\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport styles from './tooltip.scss';\r\n\r\nexport interface TooltipProps {\r\n title?: string;\r\n center?: boolean;\r\n narrow?: boolean;\r\n delayed?: boolean;\r\n className?: string;\r\n direction?: TooltipDirections;\r\n onClick?: () => void;\r\n}\r\n\r\nexport enum TooltipDirections {\r\n default,\r\n top,\r\n left,\r\n right,\r\n bottom\r\n}\r\n\r\nexport class Tooltip extends React.Component<TooltipProps, any> {\r\n public splitTooltip(text: string) {\r\n // Two ways for detecting the line breaks\r\n if (text.indexOf('\\n') > -1) {\r\n return text.split('\\n');\r\n }\r\n return text.split('\\\\n');\r\n }\r\n\r\n public render() {\r\n const {title, children, className, onClick, center, narrow, delayed, direction} = this.props;\r\n\r\n const tooltip = <div className={`tooltip-text ${styles.tooltiptext}`}>\r\n {title && this.splitTooltip(title).map((text, index) => <p key={index}>{text}</p>)}\r\n </div>;\r\n\r\n const classNames = [\r\n styles.tooltip,\r\n className,\r\n center && styles.center,\r\n narrow && styles.narrow,\r\n delayed && styles.delayed,\r\n (direction && direction === TooltipDirections.left) && styles.left,\r\n (direction && direction === TooltipDirections.right) && styles.right,\r\n (direction && direction === TooltipDirections.top) && styles.top,\r\n (direction && direction === TooltipDirections.bottom) && styles.narrow\r\n ].filter(item => item);\r\n\r\n return (<div className={classNames.join(' ')} onClick={onClick}>\r\n {children}\r\n {!!title && <div className={`${styles.tooltipArrow}`} />}\r\n {!!title && tooltip}\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport const offsetFromMiddleOfScreen = (\r\n e: React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>\r\n) => {\r\n const middleOfScreen = window.innerWidth / 2;\r\n const boundingContext = e.currentTarget.getBoundingClientRect();\r\n\r\n return (\r\n boundingContext.left + e.currentTarget.clientWidth / 2 - middleOfScreen\r\n );\r\n};\r\n\r\nconst getScrollOptions = () => {\r\n // smooth causes terrible lag on data rich documents\r\n const smoothBehaviourWillPerform = document.documentElement.offsetHeight < 10000;\r\n const behavior = smoothBehaviourWillPerform ? 'smooth' : 'instant';\r\n return { behavior, block: 'start', inline: 'start' };\r\n};\r\n/**\r\n * Returns the optimal scroll function, taking client support and current document size into account\r\n */\r\nexport const getWindowScroller = () => {\r\n\r\n if (!supportsScrollOptions()) {\r\n return (y: number) => window.scrollTo(0, y);\r\n }\r\n\r\n const bestOptions:{} = getScrollOptions();\r\n\r\n return (y: number) => window.scrollTo({ ...bestOptions, top: y, left: 0 });\r\n};\r\n\r\nexport const scrollIntoView = (target:HTMLElement, options:{} = {}) => {\r\n const bestOptions:{} = getScrollOptions();\r\n target.scrollIntoView({...bestOptions, ...options, inline: 'end'});\r\n};\r\n\r\n/**\r\n * IE/Edge bug detection\r\n * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15534521/\r\n */\r\nfunction supportsScrollOptions() {\r\n let supports = false;\r\n try {\r\n const div = document.createElement('div');\r\n div.scrollTo({\r\n top: 0,\r\n get behavior() {\r\n supports = true;\r\n return 'smooth' as any;\r\n }\r\n });\r\n // tslint:disable-next-line:no-empty\r\n } catch (err) {}\r\n return supports;\r\n}\r\n\r\n/**\r\n * Removes the child DOM elements of a given DOM element\r\n */\r\nexport const removeChildrenOf = (elementId: string) => {\r\n const root = document.getElementById(elementId);\r\n root.childNodes.forEach(n => n.remove());\r\n};\r\n","import * as React from 'react';\r\nimport { CloseButton } from 'ui';\r\nimport { SelectExpander } from './select-expander/select-expander';\r\nimport { DetailsExpander } from './details-expander/details-expander';\r\nimport { Footer } from './footer/footer';\r\nimport { HeaderWithRightToolbar } from './header/header-with-toolbar';\r\n\r\nexport interface DialogExpanderProps {\r\n id?: string;\r\n title?: string;\r\n onClose: () => void;\r\n onConfirm?: () => void;\r\n className?: string;\r\n hasFooter?: boolean;\r\n textDone?: string;\r\n selectExpander?: boolean;\r\n switchButton?: JSX.Element;\r\n extraFooterActions?: JSX.Element[];\r\n hasLongDescription?: boolean;\r\n expandAll?: boolean;\r\n}\r\n\r\nexport class DialogExpander extends React.Component<DialogExpanderProps, any> {\r\n public static defaultProps: Partial<DialogExpanderProps> = {\r\n className: '',\r\n hasFooter: true\r\n };\r\n\r\n public render() {\r\n const {\r\n id,\r\n title,\r\n className,\r\n textDone,\r\n hasFooter,\r\n children,\r\n onConfirm,\r\n onClose,\r\n selectExpander,\r\n hasLongDescription,\r\n expandAll\r\n } = this.props;\r\n\r\n const content = <>\r\n <HeaderWithRightToolbar title={title} className={className} hasLongDescription={hasLongDescription}>\r\n {this.props.switchButton}\r\n {!expandAll && <CloseButton onClick={onClose}/>}\r\n </HeaderWithRightToolbar>\r\n {children}\r\n {(hasFooter && !expandAll) && \r\n <Footer onClose={onClose} onConfirm={onConfirm} textDone={textDone}>\r\n {this.props.extraFooterActions}\r\n </Footer>}\r\n </>;\r\n\r\n return (\r\n <>\r\n { selectExpander ?\r\n <SelectExpander id={id} className={className}>\r\n {content}\r\n </SelectExpander>\r\n : <DetailsExpander id={id} expandAll={expandAll} className={className} onClose={onClose}>\r\n {content}\r\n </DetailsExpander>}\r\n </>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\n/**\r\n * Injects additional css classnames into the existing prop `classNames` which was\r\n * added by ui-engine by convention.\r\n *\r\n * Injected class must be defined **globally**.\r\n *\r\n * Global css classes should be the correct usage, to use for e.g modes, or sizing\r\n */\r\nexport const withClassNames = (additionalClasses: string, onlyWhenNested?:boolean) =>\r\n<P extends {}>(\r\n WrappedComponent: (React.ComponentClass<P> | React.SFC<P>),\r\n uiEngineProps\r\n): React.SFC<P & { className: string }> => (props:any) => {\r\n\r\n const addClasses = !onlyWhenNested || (uiEngineProps.resolveContext && uiEngineProps.resolveContext.path.length > 1);\r\n const className = addClasses ? `${props.className} ${additionalClasses}` : props.className;\r\n\r\n return <WrappedComponent {...props} className={className}/>;\r\n};\r\n","import * as React from 'react';\r\n\r\nexport interface ColumnSizeMap {\r\n /**\r\n * Xtra small screen size\r\n */\r\n xs?: string | number;\r\n /**\r\n * Small screen size\r\n */\r\n sm?: string | number;\r\n /**\r\n * Medium small screen size\r\n */\r\n md?: string | number;\r\n /**\r\n * Large screen size, 992px +\r\n */\r\n lg?: string | number;\r\n /**\r\n * 1200px +\r\n */\r\n xl?: string | number;\r\n}\r\n\r\n/**\r\n * Define a set of responsive column sizes per screen size, and transform those\r\n * into valid css flexbox classes\r\n * @param size\r\n */\r\nexport const withSize = (sizes: ColumnSizeMap) =>\r\n <P extends {}>(\r\n WrappedComponent: (React.ComponentClass<P> | React.SFC<P>)\r\n ): React.SFC<P & { className: string }> =>\r\n (props: any) => {\r\n\r\n const toClass = (size: string) => sizes[size] ? `col-${size}-${sizes[size]}` : '';\r\n const sizeClasses = sizes ? Object.keys(sizes).map(toClass).join(' ') : '';\r\n\r\n return (\r\n <WrappedComponent\r\n {...props}\r\n className = {`${props.className} ${sizeClasses}`}\r\n />\r\n );\r\n};\r\n\r\n/**\r\n * Define a set of responsive column sizes in Tile, and transform those\r\n * into valid css flexbox classes\r\n * @param size\r\n */\r\nexport const withTileSize = (sizes: ColumnSizeMap) =>\r\n <P extends {}>(\r\n WrappedComponent: (React.ComponentClass<P> | React.SFC<P>),\r\n uiEngineProps\r\n ): React.SFC<P & { className: string }> =>\r\n (props: any) => {\r\n\r\n const isInTile = uiEngineProps.resolveContext && uiEngineProps.resolveContext.path.length > 1;\r\n const toClass = (size: string) => sizes[size] ? `custom-col-${size}-${sizes[size]}` : '';\r\n const sizeClasses = sizes && isInTile ? Object.keys(sizes).map(toClass).join(' ') : '';\r\n\r\n return (\r\n <WrappedComponent {...props} className={`${props.className} ${sizeClasses}`} />\r\n );\r\n};\r\n\r\nexport const withExpandAllSize = (sizes: ColumnSizeMap) =>\r\n <P extends {}>(\r\n WrappedComponent: (React.ComponentClass<P> | React.SFC<P>),\r\n uiEngineProps\r\n ): React.SFC<P & { className: string }> =>\r\n (props: any) => {\r\n\r\n const hostprops = uiEngineProps.hostProps();\r\n\r\n const toClass = (size: string) => sizes[size] ? `custom-col-${size}-${sizes[size]}` : '';\r\n const sizeClasses = sizes && (hostprops && hostprops.expandAll) ? Object.keys(sizes).map(toClass).join(' ') : '';\r\n\r\n return (\r\n <WrappedComponent {...props} className={`${props.className} ${sizeClasses}`} />\r\n );\r\n};\r\n","export * from './with-class-names';\r\nexport * from './with-open-state';\r\nexport * from './with-size';\r\n","import { History } from 'history';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { globalVar } from 'app/infrastructure/universal/runtime';\r\nimport { debug, fatal } from 'app/infrastructure/log';\r\nimport { initialize, signin, processSigninResponse, processSignoutResponse } from './token-manager';\r\nimport { logoutRoute } from './constants';\r\nimport { ReceiveToken, ReceiveLogout, AuthenticationFailed } from 'app/shell/action-types';\r\nimport { hasToken } from 'app/infrastructure/auth/token-cache';\r\nimport { externalRedirect } from 'app/infrastructure/platform';\r\n\r\nexport async function processToken(store: Redux.Store<ApplicationState>, history: History) {\r\n\r\n initialize();\r\n\r\n const locationObj = globalVar('location');\r\n\r\n if (locationObj && locationObj.hash && locationObj.hash.indexOf('access_token') !== -1) {\r\n\r\n // processing token response\r\n try {\r\n\r\n debug('processToken', 'access_token found in url');\r\n const signingResponse = await processSigninResponse();\r\n\r\n store.dispatch(new ReceiveToken());\r\n\r\n if (signingResponse) {\r\n debug('processToken', 'redirecting after login', signingResponse);\r\n history.replace(signingResponse);\r\n }\r\n\r\n } catch (err) {\r\n fatal('Failed to process login response. Did you use HTTP instead of HTTPS..?', err);\r\n\r\n store.dispatch(new AuthenticationFailed());\r\n }\r\n\r\n } else if (locationObj && locationObj.pathname && locationObj.pathname.indexOf(logoutRoute) !== -1) {\r\n\r\n // processing logout response\r\n try {\r\n\r\n debug('processToken', 'logout path found in url');\r\n\r\n await processSignoutResponse();\r\n\r\n const logoutLandingPage = AppSetting.LogoutLandingPage;\r\n\r\n if (!!logoutLandingPage) {\r\n externalRedirect(logoutLandingPage);\r\n } else {\r\n store.dispatch(new ReceiveLogout());\r\n history.replace('/logout');\r\n }\r\n } catch (err) {\r\n fatal('unable to process signout response', err);\r\n\r\n store.dispatch(new AuthenticationFailed());\r\n }\r\n\r\n } else {\r\n\r\n // use cached token & abort\r\n if (hasToken()) {\r\n store.dispatch(new ReceiveToken());\r\n return;\r\n }\r\n\r\n // redirect for token\r\n try {\r\n\r\n debug('processToken', 'create redirect for token');\r\n await signin();\r\n\r\n } catch (err) {\r\n fatal('unable to redirect for token', err);\r\n\r\n store.dispatch(new AuthenticationFailed());\r\n }\r\n }\r\n}\r\n","export { signin, signout, reAuthenticate } from './token-manager';\r\nexport * from './token-cache';\r\nexport * from './init';\r\n","import { typedValue } from 'app/infrastructure/data/convert';\r\nimport { Value, SelectedValue } from 'app/types-shared';\r\n\r\nimport get from 'lodash/get';\r\nconst EMPTY_ARRAY: any[] = [];\r\n\r\nexport function getValue(model: any, path: string): SelectedValue {\r\n \r\n const match: any = get(model, path) || [];\r\n\r\n return defaultValueStrategy(match);\r\n}\r\n\r\n/**\r\n * Partially applied function that extends the Value with a presedence strategy to get the \r\n * value depening on the existence of V and D properties.\r\n * Idea is make it easier for\r\n * components to get their DisplayValue, options and current value in a predictable way.\r\n * \r\n * This can probably be refactored into a common selector\r\n * \r\n * - value: is `value` property of first item in valueitems\r\n * - valueItems is an array of values mapped to type ComplexValue\r\n */\r\nfunction defaultValueStrategy(values: Value[]): SelectedValue {\r\n\r\n if (!Array.isArray(values)) {\r\n throw new Error('value must be an array');\r\n }\r\n\r\n const isValue = (value: any) => !(Object.is(value, null) || Object.is(value, undefined)); \r\n const maybe = (value: any, prop: string) => isValue(value) ? { [prop]: value } : {} ;\r\n\r\n const selectedValues: SelectedValue[] = values.map((item: any) => {\r\n\r\n if ( !isValue( Object(item).value ) ){\r\n return undefined;\r\n }\r\n\r\n const description = item.description || ''; \r\n const value = typedValue(item.value);\r\n\r\n const optionals = {\r\n ...maybe(item.longDescription, 'longDescription'),\r\n ...maybe(item.icon, 'icon'), \r\n ...maybe(item.backgroundColor, 'backgroundColor'),\r\n ...maybe(item.foregroundColor, 'foregroundColor')\r\n };\r\n\r\n return {\r\n value,\r\n description, \r\n ...optionals\r\n };\r\n\r\n }).filter( isValue ) as any;\r\n\r\n const firstItemsValue: any = (selectedValues.length ?\r\n selectedValues[0].value : undefined);\r\n\r\n return {\r\n\r\n // the .value property of the first item\r\n value: firstItemsValue,\r\n\r\n // the first item object\r\n valueItem: selectedValues.length ? selectedValues[0] : undefined,\r\n\r\n // all item objects as array\r\n valueItems: selectedValues.length ? selectedValues : EMPTY_ARRAY\r\n\r\n } as any;\r\n\r\n}\r\n","import { fromJSON, toJSON } from 'app/infrastructure/platform/json';\r\n\r\n/**\r\n * Return a default fallback value when possible\r\n */\r\nexport function typedValue(value: any) {\r\n let result: any = undefined;\r\n\r\n if (!value) { //no point in converting 0, false, undefined, null\r\n return value;\r\n }\r\n\r\n result = fromJSON(toJSON(value));\r\n\r\n if (JSON.stringify(result) === '{}') {\r\n return undefined;\r\n }\r\n\r\n return result;\r\n}\r\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","import * as React from 'react';\r\nimport { InfoText, InfoTextProps } from '../info/info-text';\r\nimport { Validation, ValidationProps, getValidationStyle } from '../validation';\r\nimport styles from './input-control-context.scss';\r\nimport { LabelConfig } from 'ui/common/types';\r\nimport { InputLabel } from 'ui/common/input-label';\r\n\r\n/**\r\n * Describes how the InputControlContext component is displayed.\r\n * It wraps describing components in one context component.\r\n */\r\nexport interface InputControlContextProps {\r\n /**\r\n * Id of component\r\n */\r\n componentId: string;\r\n /**\r\n * Set css class of main tag. Default is null.\r\n */\r\n className?: string;\r\n /**\r\n * Define label of component which is described by [[LabelProps]]. Default is null. \r\n */\r\n label?: LabelConfig;\r\n /**\r\n * Define short description of component which is described by [[InfoTextProps]]. Default is null.\r\n */\r\n info?: InfoTextProps;\r\n /**\r\n * Define long description of component which is described by [[InfoTextProps]]. Default is null.\r\n */\r\n infoLong?: InfoTextProps;\r\n /**\r\n * Internal. Define validation status of component which is described by [[ValidationProps]]. Default is null.\r\n */\r\n validation?: ValidationProps;\r\n /**\r\n * Value is true when input is disabled.\r\n */\r\n readOnly?: boolean;\r\n}\r\n\r\nexport const InputControlContext: React.SFC<InputControlContextProps> = (props) => {\r\n const {\r\n validation,\r\n className = '',\r\n readOnly,\r\n componentId,\r\n label,\r\n info,\r\n children,\r\n infoLong\r\n } = props;\r\n\r\n const {readOnlyStyle} = styles;\r\n\r\n const level = validation && validation.level;\r\n const groupClassname = `${className} ${level !== undefined && 'has-' + getValidationStyle(level) || 'valid'}`;\r\n\r\n return (\r\n <div className={`form-group ${groupClassname} ${readOnly ? readOnlyStyle : ''}`} id={componentId} >\r\n <InputLabel { ...label}>\r\n <InfoText {...info} />\r\n </InputLabel>\r\n {children}\r\n <Validation {...validation} />\r\n <InfoText {...infoLong} />\r\n </div >\r\n );\r\n};\r\n\r\nInputControlContext.displayName = 'InputControlContext';\r\n","import * as React from 'react';\r\nimport { toast } from 'react-toastify';\r\nimport MdClose from 'react-icons/lib/md/close';\r\n\r\nconst CustomCloseButton = (toastProps: any) => {\r\n const { closeToast, ...validProps } = toastProps;\r\n return <MdClose {...validProps} />;\r\n};\r\n\r\nconst defaultConfiguration = {\r\n position: toast.POSITION.TOP_LEFT,\r\n autoClose: false,\r\n closeButton: <CustomCloseButton />,\r\n zIndex: '2001'\r\n};\r\n\r\nexport const toastFactory = (configuration?: any) => {\r\n let toastId = null;\r\n\r\n const config = {...defaultConfiguration, ...configuration};\r\n\r\n return {\r\n dispatch: (message: string, type: string = toast.TYPE.INFO) => toastId = toast(message || '', {\r\n ...config,\r\n type\r\n }),\r\n\r\n success: (message: HTMLElement | string) => {\r\n return toastId && toast.update(toastId, {\r\n ...config,\r\n render: message,\r\n type: toast.TYPE.SUCCESS\r\n });\r\n },\r\n\r\n error: (message: string) => {\r\n return toastId && toast.update(toastId, {\r\n ...config,\r\n render: message,\r\n type: toast.TYPE.ERROR\r\n });\r\n },\r\n\r\n close: () => {\r\n return toastId && toast.dismiss(toastId);\r\n }\r\n };\r\n};\r\n","\r\n/**\r\n * The key will be injected as a prop on the component with the translated text as value\r\n *\r\n * Example:\r\n *\r\n * React component will recive `props.translation` where\r\n *\r\n * `translation.edit: 'Edit' `\r\n */\r\nexport const caseTranslations = {\r\n message_cannot_find_case_draft: 7441,\r\n message_draft_success: 7442,\r\n message_case_success: 7440,\r\n message_case_delete_success: 7472,\r\n message_case_error: 7439,\r\n message_not_authorized_to_read_case: 3276,\r\n case_menu: 7969,\r\n switch_to_tab: 7978,\r\n switch_to_scroll: 7977,\r\n public_case_submitted: 8245,\r\n public_follow_up: 8246,\r\n public_info_case_password: 8247,\r\n public_enter_password: 8248,\r\n public_case_password: 8249,\r\n public_open_case: 8250\r\n};\r\n\r\nexport const viewModeCacheKey:string = 'caseViewMode';\r\n","import { routeName } from 'app/routes/route-constants';\r\nimport { CaseConnectionParam } from 'app/infrastructure/ui/form/types';\r\nimport * as History from 'history';\r\nimport { LocationDescriptorObject } from 'history';\r\n\r\n/**\r\n * Serialize router query parameters to a object array, in reverse/chronological order\r\n * @param query \r\n */\r\n// tslint:disable-next-line:one-variable-per-declaration\r\nexport const deserializeConnectionState = (query: History.Query) : CaseConnectionParam[] => (\r\n \r\n Array.isArray(query.draftId) ?\r\n\r\n query.draftId.map( (val,i) => ({ \r\n draftId: Number(val),\r\n connectionTypeId: Number(query.connectionTypeId[i]),\r\n sequence: Number(query.sequence[i])\r\n }))\r\n : \r\n query.draftId ? \r\n\r\n [{\r\n draftId: Number(query.draftId),\r\n connectionTypeId: Number(query.connectionTypeId),\r\n sequence: Number(query.sequence)\r\n }]\r\n :\r\n undefined \r\n);\r\n\r\n/**\r\n * Serialize as query string\r\n * \r\n * @param queue \r\n */\r\nexport const serializeConnectionState = (queue: CaseConnectionParam[]) => {\r\n if(!queue || !queue.length){\r\n return '';\r\n }\r\n // TODO: It seems like there always has to be connectionTypeId and sequence for each draft in the stack for deserialize to work\r\n const qs = queue.reverse().map( \r\n item => `draftId=${item.draftId}&connectionTypeId=${item.connectionTypeId || 0}&sequence=${item.sequence || 0}`\r\n ).join('&');\r\n\r\n return qs ? `?${qs}` : '';\r\n};\r\n\r\n/**\r\n * Create a routable link to the previous item in the case connection chain, preserving it's queue state\r\n * \r\n * @param queue \r\n */\r\nexport const getLocationOfInitiator = (queue: CaseConnectionParam[]): LocationDescriptorObject => {\r\n if(!queue || !queue.length){\r\n return undefined;\r\n }\r\n const { [queue.length -1] : lastItem } = queue;\r\n if(!lastItem || !lastItem.draftId){\r\n throw new Error('Invalid id for draft location');\r\n }\r\n return ({ \r\n pathname: `/${routeName.Draft}/${lastItem.draftId}`,\r\n state: {internal: false} ,\r\n search: serializeConnectionState(queue.slice(0, -1))\r\n });\r\n};\r\n","import { routeConstants, routeName } from '../../routes/route-constants';\r\nimport { openReportState } from 'app/area/favourite/constants';\r\n\r\nexport function toCodeSelectView(breadcrumbs: string): string {\r\n return `/select/codetableadministration${breadcrumbs}`;\r\n}\r\n\r\nexport function toCaseView(caseNumber: number): string {\r\n return `/case/${caseNumber}`;\r\n}\r\n\r\nexport function toCaseEdit(caseNumber: number, entityPath: string): string {\r\n return `/case/${caseNumber}${entityPath}/edit`;\r\n}\r\n\r\nexport function toCaseDuplicate(caseNumber: number): string {\r\n return `/case/${caseNumber}/duplicate`;\r\n}\r\n\r\nexport function toCreateCase(caseTypeId: number): string {\r\n return `/create/${caseTypeId}`;\r\n}\r\n\r\nexport function toDraft(draftId: number, entityPath: string): string {\r\n return `/draft/${draftId}${entityPath}`;\r\n}\r\n\r\nexport function toCaseListing(favouriteId: number): string {\r\n return `/${routeName.Favourite}/draft/${favouriteId}`;\r\n}\r\n\r\nexport function toUpdateSavedReport(favouriteId: number): string {\r\n return `/${routeName.Favourite}/${favouriteId}/${openReportState.edit}`;\r\n}\r\n\r\nexport function toSearchViewWithQuery(query: string): string {\r\n return `${routeConstants.favouriteDraft}?query=${encodeURIComponent(query)}`;\r\n}\r\n\r\nexport function toDashboardView(dashboardType: number): string {\r\n return `/dashboard/${dashboardType}/favourite/draft`;\r\n}\r\n\r\nexport function toBowtie(caseNumber: number): string {\r\n return `/bowtie/${caseNumber}`;\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"fact-box__visuallyhidden--3F1_t\",\"focusable\":\"fact-box__focusable--1n3R6\",\"fact-box\":\"fact-box__fact-box--1omDy\",\"factBox\":\"fact-box__fact-box--1omDy\",\"fact-box-list\":\"fact-box__fact-box-list--2qURr\",\"factBoxList\":\"fact-box__fact-box-list--2qURr\",\"fact-link\":\"fact-box__fact-link--3h-g6\",\"factLink\":\"fact-box__fact-link--3h-g6\",\"fact-item\":\"fact-box__fact-item--1QoWp\",\"factItem\":\"fact-box__fact-item--1QoWp\",\"icon-line\":\"fact-box__icon-line--2vG9N\",\"iconLine\":\"fact-box__icon-line--2vG9N\",\"thumbnail-button\":\"fact-box__thumbnail-button--28WTW\",\"thumbnailButton\":\"fact-box__thumbnail-button--28WTW\",\"consequence-wide\":\"fact-box__consequence-wide--1umFk\",\"consequenceWide\":\"fact-box__consequence-wide--1umFk\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tile__visuallyhidden--1uCj4\",\"focusable\":\"tile__focusable--1YX3M\",\"tile-wrapper\":\"tile__tile-wrapper--1NkKM\",\"tileWrapper\":\"tile__tile-wrapper--1NkKM\",\"tile\":\"tile__tile--29Oyh\",\"expanded-details\":\"tile__expanded-details--39w23\",\"expandedDetails\":\"tile__expanded-details--39w23\",\"active-tile\":\"tile__active-tile--3oRuv\",\"activeTile\":\"tile__active-tile--3oRuv\",\"details-button\":\"tile__details-button--1LlDa\",\"detailsButton\":\"tile__details-button--1LlDa\",\"tile-content\":\"tile__tile-content--1tkZx\",\"tileContent\":\"tile__tile-content--1tkZx\",\"key\":\"tile__key--tCQYW\",\"tile-dropdown\":\"tile__tile-dropdown--1Vecq\",\"tileDropdown\":\"tile__tile-dropdown--1Vecq\",\"tile-values-wrapper\":\"tile__tile-values-wrapper--tJo2z\",\"tileValuesWrapper\":\"tile__tile-values-wrapper--tJo2z\",\"has-meatball\":\"tile__has-meatball--2rQdB\",\"hasMeatball\":\"tile__has-meatball--2rQdB\",\"tile-with-key\":\"tile__tile-with-key--3zuJI\",\"tileWithKey\":\"tile__tile-with-key--3zuJI\",\"details-expander\":\"tile__details-expander--1gj1T\",\"detailsExpander\":\"tile__details-expander--1gj1T\",\"styling-for-label\":\"tile__styling-for-label--2coXi\",\"stylingForLabel\":\"tile__styling-for-label--2coXi\",\"edit-button-expand-all\":\"tile__edit-button-expand-all--1o65N\",\"editButtonExpandAll\":\"tile__edit-button-expand-all--1o65N\",\"edit-button\":\"tile__edit-button--3-rGn\",\"editButton\":\"tile__edit-button--3-rGn\",\"has-child-errors\":\"tile__has-child-errors--2qQOc\",\"hasChildErrors\":\"tile__has-child-errors--2qQOc\",\"has-child-warnings\":\"tile__has-child-warnings--3sg0u\",\"hasChildWarnings\":\"tile__has-child-warnings--3sg0u\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"case-listing__visuallyhidden--3id00\",\"focusable\":\"case-listing__focusable--uJkSz\",\"ui-search-hits\":\"case-listing__ui-search-hits--1UbtT\",\"uiSearchHits\":\"case-listing__ui-search-hits--1UbtT\",\"hits\":\"case-listing__hits--3Sq03\",\"switch\":\"case-listing__switch--1t0Rc\",\"ui-toggle-info\":\"case-listing__ui-toggle-info--3FkSV\",\"uiToggleInfo\":\"case-listing__ui-toggle-info--3FkSV\",\"title\":\"case-listing__title--3aTzr\",\"sub-title\":\"case-listing__sub-title--1EQTj\",\"subTitle\":\"case-listing__sub-title--1EQTj\",\"description\":\"case-listing__description--_iHL_\",\"ui-search-loader\":\"case-listing__ui-search-loader--3Vf4c\",\"uiSearchLoader\":\"case-listing__ui-search-loader--3Vf4c\",\"warning-info\":\"case-listing__warning-info--2fEca\",\"warningInfo\":\"case-listing__warning-info--2fEca\",\"warning-msg\":\"case-listing__warning-msg--1fdlE\",\"warningMsg\":\"case-listing__warning-msg--1fdlE\",\"warning-description\":\"case-listing__warning-description--3ybkr\",\"warningDescription\":\"case-listing__warning-description--3ybkr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"footer__visuallyhidden--1-81g\",\"focusable\":\"footer__focusable--1tRXq\",\"footer\":\"footer__footer--2fC-s\",\"head\":\"footer__head--2sv5b\",\"icon\":\"footer__icon--gQ8W6\",\"panel\":\"footer__panel--2t0UI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"consent-item__visuallyhidden--1dncy\",\"focusable\":\"consent-item__focusable--2x6UH\",\"consent-item-wrapper\":\"consent-item__consent-item-wrapper--e6Jgo\",\"consentItemWrapper\":\"consent-item__consent-item-wrapper--e6Jgo\",\"consent-item\":\"consent-item__consent-item--29azz\",\"consentItem\":\"consent-item__consent-item--29azz\",\"consent-item-active\":\"consent-item__consent-item-active--8Qdvh\",\"consentItemActive\":\"consent-item__consent-item-active--8Qdvh\",\"consent-item-inactive\":\"consent-item__consent-item-inactive--lUpC-\",\"consentItemInactive\":\"consent-item__consent-item-inactive--lUpC-\",\"consent-name\":\"consent-item__consent-name--3DDt_\",\"consentName\":\"consent-item__consent-name--3DDt_\",\"consent-top-panel\":\"consent-item__consent-top-panel--1ae6g\",\"consentTopPanel\":\"consent-item__consent-top-panel--1ae6g\",\"display-color-wrapper\":\"consent-item__display-color-wrapper--2eGKb\",\"displayColorWrapper\":\"consent-item__display-color-wrapper--2eGKb\",\"sms-styles\":\"consent-item__sms-styles--3oQMA\",\"smsStyles\":\"consent-item__sms-styles--3oQMA\",\"push-styles\":\"consent-item__push-styles--13-Q0\",\"pushStyles\":\"consent-item__push-styles--13-Q0\",\"consent-header-panel\":\"consent-item__consent-header-panel--gafaH\",\"consentHeaderPanel\":\"consent-item__consent-header-panel--gafaH\",\"header-key\":\"consent-item__header-key--1HkfZ\",\"headerKey\":\"consent-item__header-key--1HkfZ\",\"left-panel\":\"consent-item__left-panel--DGo6D\",\"leftPanel\":\"consent-item__left-panel--DGo6D\",\"left-panel-info\":\"consent-item__left-panel-info--vvaZY\",\"leftPanelInfo\":\"consent-item__left-panel-info--vvaZY\",\"code\":\"consent-item__code--2hw7r\",\"push-active-styles\":\"consent-item__push-active-styles--96ngZ\",\"pushActiveStyles\":\"consent-item__push-active-styles--96ngZ\",\"context-menu\":\"consent-item__context-menu--2AYFD\",\"contextMenu\":\"consent-item__context-menu--2AYFD\"};","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","import * as React from 'react';\r\nimport styles from './button.scss';\r\n\r\nexport interface ButtonProps extends Partial<HTMLElement>{\r\n icon?: React.ComponentClass<any>;\r\n iconStyle?: string;\r\n onClick?: (event: any) => void;\r\n inputGroupBtn?: boolean;\r\n disabled?: boolean;\r\n dataDismiss?: string;\r\n dataToggle?: string;\r\n dataTarget?: string;\r\n ariaControls?: string;\r\n autoFocus?: boolean;\r\n children?: any;\r\n classNames?: string;\r\n tabIndex?: number;\r\n}\r\n\r\ninterface ButtonComponentProps extends ButtonProps {\r\n btnType: string;\r\n}\r\n\r\nexport class Button extends React.Component<ButtonComponentProps> {\r\n private onKeyDown = (e: any) => {\r\n // On press enter\r\n if (e.keyCode === 13) {\r\n e.preventDefault();\r\n this.props.onClick(e);\r\n }\r\n }\r\n\r\n public render() {\r\n const Icon = this.props.icon;\r\n\r\n return (\r\n <button\r\n id={this.props.id}\r\n type=\"button\"\r\n className={`${this.props.btnType ? 'btn ' + this.props.btnType: ''} ${this.props.classNames ? this.props.classNames : ''}`}\r\n onClick={this.props.onClick}\r\n onKeyDown={this.onKeyDown}\r\n disabled={this.props.disabled}\r\n data-dismiss={this.props.dataDismiss}\r\n data-toggle={this.props.dataToggle}\r\n data-target={this.props.dataTarget}\r\n aria-controls={this.props.ariaControls}\r\n autoFocus={this.props.autoFocus}\r\n tabIndex={this.props.tabIndex}>\r\n {this.props.icon && <Icon className={`${styles.btnIcon} ${this.props.iconStyle}`} />}\r\n { React.Children.count(this.props.children) !== 0 ? <span>{this.props.children}</span> : null }\r\n </button>\r\n );\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"create-report__visuallyhidden--2SBpH\",\"focusable\":\"create-report__focusable--uPPFQ\",\"footer\":\"create-report__footer--aK8F9\",\"create-report\":\"create-report__create-report--2dVt0\",\"createReport\":\"create-report__create-report--2dVt0\",\"create-folder\":\"create-report__create-folder--2WCbp\",\"createFolder\":\"create-report__create-folder--2WCbp\",\"no-margin\":\"create-report__no-margin--1mzFk\",\"noMargin\":\"create-report__no-margin--1mzFk\",\"label\":\"create-report__label--3-2e9\",\"original-id\":\"create-report__original-id--3Sd99\",\"originalId\":\"create-report__original-id--3Sd99\",\"spacing\":\"create-report__spacing--3XTtr\",\"default-icon\":\"create-report__default-icon--2qwCn\",\"defaultIcon\":\"create-report__default-icon--2qwCn\"};","import * as React from 'react';\r\nimport { Button } from './button';\r\nimport styles from './button-input-group.scss';\r\nexport interface ButtonInputGroupProps {\r\n icon: React.ComponentClass<any>;\r\n onClick?: (event: any) => void;\r\n disabled?: boolean;\r\n callToAction?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport const ButtonInputGroup : React.SFC<ButtonInputGroupProps> = props => (\r\n <Button\r\n icon={props.icon}\r\n onClick={props.onClick}\r\n btnType=\"button-input-group\"\r\n classNames={`${styles.btnInputGroup}\r\n ${props.callToAction ? styles.callToActionStyling : ''}\r\n ${props.className ? props.className : ''}`}\r\n disabled={props.disabled}\r\n />\r\n);\r\n\r\nButtonInputGroup.displayName = 'ButtonInputGroup';\r\n","// tslint:disable variable-name\r\nimport * as React from 'react';\r\nimport { Button } from './button';\r\nimport MdClose from 'react-icons/lib/md/close';\r\nimport styles from './close-button.scss';\r\n\r\nexport interface CloseButtonProps {\r\n onClick: (event: any) => void;\r\n autofocus?: boolean;\r\n tabIndex?: number;\r\n}\r\n\r\nexport class CloseButton extends React.PureComponent<CloseButtonProps> {\r\n public static defaultProps: Partial<CloseButtonProps> = {\r\n autofocus: true\r\n };\r\n\r\n public render() {\r\n\r\n return (\r\n <Button btnType={styles.closeButton} onClick={this.props.onClick} autoFocus={this.props.autofocus} tabIndex={this.props.tabIndex}>\r\n {/* Needs translation? */}\r\n <span className=\"visuallyhidden\">Close</span>\r\n <MdClose/>\r\n </Button>\r\n );\r\n }\r\n}\r\n","export { ButtonPrimary } from './button-primary';\r\nexport { ButtonSecondary } from './button-secondary';\r\nexport { ButtonTertiary } from './button-tertiary';\r\nexport { ButtonInline } from './button-inline';\r\nexport { ButtonInputGroup } from './button-input-group';\r\nexport { ButtonCallToAction } from './button-call-to-action';\r\nexport { AddButton } from './add-button';\r\nexport { CloseButton } from './close-button';\r\n","import { SelectType } from 'ui/common/select/types';\r\n\r\nexport const isHierarchy = (selectType: SelectType) => {\r\n return selectType === SelectType.singleHierarchy || selectType === SelectType.multipleHierarchy;\r\n};\r\n\r\nexport const isMultiple = (selectType: SelectType) => {\r\n return selectType === SelectType.multipleHierarchy\r\n || selectType === SelectType.multiple;\r\n};\r\n\r\nexport const isSingle = (selectType: SelectType) => {\r\n return selectType === SelectType.singleHierarchy\r\n || selectType === SelectType.single;\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tile-view-favourite__visuallyhidden--2xg2w\",\"focusable\":\"tile-view-favourite__focusable--3N8ZS\",\"tile-area-narrow\":\"tile-view-favourite__tile-area-narrow--3Z3cR\",\"tileAreaNarrow\":\"tile-view-favourite__tile-area-narrow--3Z3cR\",\"tile\":\"tile-view-favourite__tile--2sogC\",\"tile-narrow\":\"tile-view-favourite__tile-narrow--FHB4-\",\"tileNarrow\":\"tile-view-favourite__tile-narrow--FHB4-\",\"tile-wide\":\"tile-view-favourite__tile-wide--yGSKe\",\"tileWide\":\"tile-view-favourite__tile-wide--yGSKe\",\"tile-with-drilldown\":\"tile-view-favourite__tile-with-drilldown--28QmZ\",\"tileWithDrilldown\":\"tile-view-favourite__tile-with-drilldown--28QmZ\",\"tile-fields\":\"tile-view-favourite__tile-fields--QG4D6\",\"tileFields\":\"tile-view-favourite__tile-fields--QG4D6\",\"tile-no-drilldown\":\"tile-view-favourite__tile-no-drilldown--rL0Mq\",\"tileNoDrilldown\":\"tile-view-favourite__tile-no-drilldown--rL0Mq\",\"tile-aggregation-value\":\"tile-view-favourite__tile-aggregation-value--2cpL1\",\"tileAggregationValue\":\"tile-view-favourite__tile-aggregation-value--2cpL1\",\"small-font-size\":\"tile-view-favourite__small-font-size--1efwG\",\"smallFontSize\":\"tile-view-favourite__small-font-size--1efwG\",\"total-label\":\"tile-view-favourite__total-label--2gsv_\",\"totalLabel\":\"tile-view-favourite__total-label--2gsv_\",\"total-value\":\"tile-view-favourite__total-value--2JYvu\",\"totalValue\":\"tile-view-favourite__total-value--2JYvu\",\"spin-loader\":\"tile-view-favourite__spin-loader--15V1B\",\"spinLoader\":\"tile-view-favourite__spin-loader--15V1B\",\"spin\":\"tile-view-favourite__spin--1wT_1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"chart-container__visuallyhidden--3WDZq\",\"focusable\":\"chart-container__focusable--3XChn\",\"chart-container\":\"chart-container__chart-container--G4Wrj\",\"chartContainer\":\"chart-container__chart-container--G4Wrj\",\"switch\":\"chart-container__switch--10SRd\",\"select-switch\":\"chart-container__select-switch--1MqrS\",\"selectSwitch\":\"chart-container__select-switch--1MqrS\",\"ui-toggle-info\":\"chart-container__ui-toggle-info--3XG6f\",\"uiToggleInfo\":\"chart-container__ui-toggle-info--3XG6f\",\"title\":\"chart-container__title--312yR\",\"sub-title\":\"chart-container__sub-title--14xH9\",\"subTitle\":\"chart-container__sub-title--14xH9\",\"description\":\"chart-container__description--PRLQ2\",\"warning-info\":\"chart-container__warning-info--3LrfY\",\"warningInfo\":\"chart-container__warning-info--3LrfY\",\"warning-msg\":\"chart-container__warning-msg--3SkKa\",\"warningMsg\":\"chart-container__warning-msg--3SkKa\",\"warning-description\":\"chart-container__warning-description--5fqnN\",\"warningDescription\":\"chart-container__warning-description--5fqnN\"};","'use strict';\nvar $ = require('../internals/export');\nvar aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar fails = require('../internals/fails');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar test = [];\nvar nativeSort = test.sort;\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD;\n\n// `Array.prototype.sort` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? nativeSort.call(toObject(this))\n : nativeSort.call(toObject(this), aFunction(comparefn));\n }\n});\n","import get from 'lodash/get';\r\ndeclare var process: any;\r\ndeclare var global: any;\r\n\r\n/**\r\n *\r\n * Determine if we are executing in Browser or Node\r\n *\r\n */\r\nconst hasProcess = (typeof process === 'object') && process.env;\r\nexport const isNode = (hasProcess && Object.prototype.toString.call(process) === '[object process]');\r\nexport const isBrowser = !isNode;\r\n\r\n/**\r\n * Populated appsettings script output by the asp.net core tag helper\r\n */\r\nexport const applicationSettingsKey = '__application__';\r\n\r\n/**\r\n * Environment variables on the global __application__ object\r\n * populated by the server environment\r\n */\r\nexport const ENVIRONMENT_VAR = {\r\n // TODO: These keys shouldn't need to be here. Temporary workaround until we can have\r\n // different variables per application in our deployments.\r\n AnonymousApplicationUrl: 'anonymousApplicationUrl',\r\n AnonymousApiBaseUrl: 'anonymousApiBaseUrl',\r\n GoogleRecaptchaSiteKey: 'googleRecaptchaSiteKey',\r\n\r\n AcceptedLanguage: 'acceptLanguage',\r\n HostingPath: 'hostingPath',\r\n ApiBaseUrl: 'apiBaseUrl',\r\n AdminApiBaseUrl: 'adminApiBaseUrl',\r\n NotificationsApiBaseUrl: 'notificationsApiBaseUrl',\r\n LogoutLandingPage: 'logoutLandingPage',\r\n VeracityProfileLink: 'veracityProfileLink',\r\n ApplicationUrl: 'applicationUrl',\r\n ClientDebugLog: 'clientDebugLog',\r\n OidcServiceUrl: 'oidcServiceUrl',\r\n OidcClientId: 'oidcClientId',\r\n OidcScope: 'oidcScope',\r\n OidcDefaultProviderId: 'oidcDefaultProviderId',\r\n OidcDontLoadUserInfo: 'oidcDontLoadUserInfo',\r\n ComponentDebug: 'componentDebug',\r\n Translations: 'translations',\r\n Integrations: 'integrations',\r\n UseLocalStorageTokenCache: 'useLocalStorageTokenCache',\r\n FeatureToggle: 'featureToggle',\r\n WebPush: 'webPush'\r\n};\r\n\r\n/**\r\n * Resolve the global var for the current runtime, node or browser\r\n */\r\nfunction getGlobal() {\r\n return isNode ? global : (window || {});\r\n}\r\n\r\n/**\r\n * Isomorphic retreival of a global variable\r\n * - with an optional default value as fallback.\r\n *\r\n * For browsers it's read from 'window'\r\n * For node.js it's read from 'global'\r\n *\r\n * @param {string} name - The global variable to lookup\r\n * @param {any} defaultValue - if [name] is null, emtpy or undefined then defaultValue will be returned\r\n */\r\nexport function globalVar(name: string, defaultValue?: any) {\r\n const globalObj = getGlobal();\r\n return globalObj[name] || defaultValue;\r\n}\r\n\r\n/**\r\n * DEPRECATED | Reads settings from settings global\r\n *\r\n */\r\nexport function getEnvironmentVariable(name: string): any {\r\n //TODO: regex replace in all files with AppSetting.[name]\r\n const settings = globalVar(applicationSettingsKey, {});\r\n return get(settings, name);\r\n}\r\n\r\n/**\r\n * Unofficial function\r\n * @internal\r\n *\r\n * Allows transient overriding of whitelisted server settings client side\r\n */\r\nexport function setEnvironmentVariable(name: string, value: any) {\r\n\r\n const whitelist = [\r\n ENVIRONMENT_VAR.ClientDebugLog,\r\n ENVIRONMENT_VAR.ComponentDebug\r\n ];\r\n\r\n if (whitelist.indexOf(name) === -1) {\r\n return;\r\n }\r\n\r\n const settings = globalVar(applicationSettingsKey);\r\n settings[name] = value;\r\n}\r\n\r\n/**\r\n *\r\n * Determine if we are executing in development or production environment.\r\n * Use the value for NODE_ENV replaced by webpack when bundling\r\n *\r\n */\r\nexport const isDevelopment = (process.env.NODE_ENV as string).trim().toLowerCase() !== 'production';\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaAngleDown = function FaAngleDown(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31 16.4q0 0.3-0.2 0.5l-10.4 10.4q-0.3 0.3-0.5 0.3t-0.6-0.3l-10.4-10.4q-0.2-0.2-0.2-0.5t0.2-0.5l1.2-1.1q0.2-0.2 0.5-0.2t0.5 0.2l8.8 8.8 8.7-8.8q0.3-0.2 0.5-0.2t0.6 0.2l1.1 1.1q0.2 0.2 0.2 0.5z' })\n )\n );\n};\n\nexports.default = FaAngleDown;\nmodule.exports = exports['default'];","\r\ninterface BlobItem {\r\n blob: Blob;\r\n key: string;\r\n}\r\n\r\nexport class BlobCache {\r\n public size:number = 0;\r\n private sizeLimit:number = 15000000;\r\n\r\n private list: BlobItem[] = [];\r\n\r\n constructor(sizeLimitMB?:number) {\r\n if (sizeLimitMB) {\r\n this.sizeLimit = sizeLimitMB * 1000000;\r\n }\r\n }\r\n\r\n public add (key: string, blob:Blob) {\r\n const object:BlobItem = {key, blob};\r\n this.size += blob.size;\r\n\r\n this.list = [object, ...this.list];\r\n while (this.size > this.sizeLimit) {\r\n const last = this.list.pop();\r\n this.size -= last.blob.size;\r\n }\r\n }\r\n\r\n public remove (key:string) {\r\n this.list = this.list.filter(item => item.key !== key);\r\n }\r\n\r\n private getItem (key:string) {\r\n const index = this.list.findIndex(i => i && i.key === key);\r\n const item = this.list[index];\r\n if(index > 0) {\r\n this.list = [item, ...this.list.filter(i => i !== item)];\r\n }\r\n\r\n return item;\r\n }\r\n\r\n public get (key:string) {\r\n const item = this.getItem(key);\r\n return item ? item.blob : null;\r\n }\r\n}\r\n","import { debug } from '../log';\r\nimport { toJSON } from '../platform/json';\r\nimport { concatUrl } from '../universal';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { authProvider } from 'dependencies/auth';\r\nimport { HttpStatusCodes } from './constants';\r\nimport { BlobCache } from 'app/infrastructure/remote-data/blob-cache';\r\n\r\nconst defaultHttpOptions = {\r\n method: 'GET'\r\n};\r\n\r\nconst defaultHttpHeaders = {\r\n Accept: 'application/json; charset=UTF-8',\r\n 'content-type': 'application/json; charset=UTF-8'\r\n};\r\n\r\n/**\r\n * Specific error info for http request errors\r\n *\r\n * @export\r\n * @class RemoteDataError\r\n * @extends {Error}\r\n */\r\n\r\nexport interface RemoteResult {\r\n message: string;\r\n response: any;\r\n userMessages?: any;\r\n validationErrors?: any;\r\n}\r\n\r\n/**\r\n * The legacy reponse model includes body messages to the user for non-200 reponses.\r\n * This function deconstructs the response\r\n * @param message\r\n * @param response\r\n */\r\nexport function remoteDataError(message: string, response: any) {\r\n let result: RemoteResult = { message, response };\r\n\r\n return response.json().then((body: any) => {\r\n if (body.messages && body.messages.userMessages) {\r\n result = { ...result, userMessages: body.messages.userMessages };\r\n }\r\n if (body.data && body.data.validationErrors) {\r\n result = { ...result, validationErrors: body.data.validationErrors };\r\n }\r\n return result;\r\n }).catch(err => result);\r\n}\r\n\r\n/**\r\n * Universal JSON data fetch\r\n *\r\n * @export\r\n * @param {string} url\r\n * @param {string} [httpMethod]\r\n * @returns {Promise<any>}\r\n */\r\nexport async function fetchJson(\r\n url: string,\r\n processResponse: (response: Response) => Promise<Response>,\r\n options: HttpOptions): Promise<any> {\r\n\r\n const request = http(url, processResponse, options);\r\n \r\n return request.then(r => {\r\n if (r.status === HttpStatusCodes.NO_CONTENT || r.status === HttpStatusCodes.NOT_MODIFIED) {\r\n return null;\r\n }\r\n return r.json();\r\n });\r\n}\r\n\r\nexport interface HttpOptions {\r\n body?: any;\r\n headers?: any;\r\n method?: string;\r\n referenceToken?: string;\r\n importance?: string;\r\n}\r\n\r\nexport function http(\r\n url: string,\r\n processResponse: (response: Response) => Promise<Response>,\r\n options: HttpOptions = {}): Promise<Response> {\r\n\r\n debug('http', 'requesting', url, options);\r\n\r\n const fetchOptions = Object.assign({}, defaultHttpOptions, options);\r\n fetchOptions.body = toJSON(fetchOptions.body);\r\n fetchOptions.headers = {\r\n ...defaultHttpHeaders,\r\n ...options.headers\r\n };\r\n\r\n debug('http options', fetchOptions);\r\n\r\n if (!fetchOptions.method || !fetchOptions.headers) {\r\n throw new Error('method and headers must be defined for fetch');\r\n }\r\n\r\n const checkStatus = async (response: Response) => {\r\n if (response.status >= HttpStatusCodes.OK && response.status < 300 || response.status === HttpStatusCodes.NOT_MODIFIED) {\r\n return response;\r\n } else {\r\n if (response.status === HttpStatusCodes.UNAUTHORIZED) {\r\n //TODO: let the caller initiate the side-effect. There is no need to\r\n // manually handle the http BODY\r\n //auth.reAuthenticate();\r\n return Promise.reject(response);\r\n }\r\n const err = await remoteDataError(response.statusText, response);\r\n return Promise.reject(err);\r\n }\r\n };\r\n\r\n return fetch(url, fetchOptions).then(processResponse).then(checkStatus);\r\n\r\n}\r\n/**\r\n * Returns a native `blob` response from a GET request\r\n *\r\n * @param url a relative URL. The current API base url will be prepended before the request is made.\r\n */\r\nconst attachmentCache = new BlobCache(25);\r\n\r\nexport const fetchAttachment = (url: string) => async (id: number, thumbnail: boolean): Promise<Blob> => {\r\n // TODO: kill this and make caller use RemoteData instead\r\n const baseUrl = AppSetting.ApiBaseUrl;\r\n const thumbnailUrl = thumbnail ? '/thumbnail' : undefined;\r\n const blobUrl = concatUrl(baseUrl, url, id, thumbnailUrl);\r\n\r\n const cached = attachmentCache.get(blobUrl);\r\n if(cached) {\r\n return cached;\r\n }\r\n\r\n const authHeaders = authProvider.headers;\r\n const headers = new Headers();\r\n authHeaders && Object.keys(authHeaders).forEach(h => headers.append(h, authHeaders[h]));\r\n const response = await fetch(blobUrl, { headers });\r\n const blob = await response.blob();\r\n attachmentCache.add(blobUrl, blob);\r\n\r\n return blob;\r\n};\r\n/**\r\n * Creates a async cancellable XMLHttpRequest for a POST request\r\n *\r\n * @param url a relative URL. The current API base url will be prepended before the request is made.\r\n */\r\nexport const createUploader = (url: string): XMLHttpRequest => {\r\n // TODO: inject deps from a higher level or abstract the function to a higher level module.\r\n const baseUrl = AppSetting.ApiBaseUrl;\r\n const authHeaders = authProvider.headers;\r\n const xhr = new XMLHttpRequest();\r\n xhr.open('POST', concatUrl(baseUrl, url));\r\n authHeaders && Object.keys(authHeaders).forEach(h => xhr.setRequestHeader(h, authHeaders[h]));\r\n return xhr;\r\n};\r\n","export enum HttpStatusCodes {\r\n OK = 200,\r\n CREATED = 201,\r\n NO_CONTENT = 204,\r\n NOT_MODIFIED = 304,\r\n BAD_REQUEST = 400,\r\n UNAUTHORIZED = 401,\r\n FORBIDDEN = 403,\r\n NOT_ACCEPTABLE = 406,\r\n SERVER_ERROR = 500\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"baseView\":\"auth__baseView--24yNN\",\"icon-as-bg\":\"auth__icon-as-bg--11QF0\",\"iconAsBg\":\"auth__icon-as-bg--11QF0\",\"spin-loader\":\"auth__spin-loader--1QMB6\",\"spinLoader\":\"auth__spin-loader--1QMB6\",\"spin\":\"auth__spin--3rrtR\",\"success-icon\":\"auth__success-icon--1Uyy5\",\"successIcon\":\"auth__success-icon--1Uyy5\",\"error-icon\":\"auth__error-icon--1_s2f\",\"errorIcon\":\"auth__error-icon--1_s2f\",\"fadeInUp\":\"auth__fadeInUp--Q_8i9\",\"button-wrapper\":\"auth__button-wrapper--3u4Jd\",\"buttonWrapper\":\"auth__button-wrapper--3u4Jd\"};","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","// As suggested in https://www.w3.org/TR/AERT/#color-contrast\r\nexport const brightness = (r, g, b) => {\r\n return (r * 299 + g * 587 + b * 114) / 1000;\r\n};\r\n\r\n/* tslint:disable */\r\nexport const numericColorToRgb = (color: number) => {\r\n color >>>= 0;\r\n return { \r\n r: (color & 0xFF0000) >>> 16,\r\n g: (color & 0xFF00) >>> 8,\r\n b: color & 0xFF\r\n };\r\n};\r\n/* tslint:enable */\r\n\r\nexport const numericColorBrightness = (color: number) => {\r\n const asRgb = numericColorToRgb(color);\r\n return brightness(asRgb.r, asRgb.g, asRgb.b);\r\n};\r\n\r\nconst hexToDigit = (num: number) => {\r\n let str = num.toString(16);\r\n if (str.length < 2) {\r\n str = '0' + str;\r\n }\r\n return str;\r\n};\r\n\r\nexport const convertNumericColorToHex = (color: number, a?: number) => {\r\n const asRgb = numericColorToRgb(color);\r\n return `#${hexToDigit(asRgb.r)}${hexToDigit(asRgb.g)}${hexToDigit(asRgb.b)}${typeof a === 'number' ? hexToDigit(a) : ''}`;\r\n};\r\n","import { \r\n UserInfo, ApiResponse, MessagesToUserInfo, SurveyManagerAccessInfoData, \r\n SupportEmailAddressData, AdminInfoData, ToolsInfoData \r\n} from 'app/types-shared';\r\nimport { RemoteData, RemoteAdminData, RemoteNotificationsData } from '../infrastructure/remote-data';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport { Consent } from 'app/area/user-profile/my-notifications/types';\r\n\r\nconst endpoint = {\r\n userInfo: 'user/current',\r\n supportEmailAddress: 'help/support/emailAddress',\r\n version: 'version',\r\n refreshCache: 'cache/refresh',\r\n regenerateAggregatedEnv: 'case/aggregatedata/environmental',\r\n regenerateAggregatedRisk: 'case/aggregatedata/risk',\r\n helpUrl: 'help/url',\r\n messagesToUser: 'user/current/message',\r\n loadConsents: (recipientId: number) => `Recipient/${recipientId}/channel`,\r\n surveyManagerAccess: 'user/current/access/surveyManager',\r\n getExternalUrl: (externalUrlId: number) => `externalUrl/${externalUrlId}`,\r\n feedbackUrl: 'feedback/url'\r\n};\r\n\r\nconst adminEndpoint = {\r\n adminPanelAccess: 'user/adminPanelAccess'\r\n};\r\n\r\nconst toolsEndpoint = {\r\n toolsAccess: 'user/current/access/tools'\r\n};\r\n\r\nexport const api = {\r\n\r\n /**\r\n * Fetch userinfo based on authentication context\r\n */\r\n userInfo: async (): Promise<UserInfo> => {\r\n const remote = new RemoteData(endpoint.userInfo);\r\n const response = await remote.resource<ApiResponse<UserInfo>>().single();\r\n return response.data;\r\n },\r\n\r\n userAdminAccess: async (): Promise<AdminInfoData | boolean> => {\r\n if (!AppSetting.AdminApiBaseUrl) {\r\n return false;\r\n }\r\n let response = undefined;\r\n const remote = new RemoteAdminData(adminEndpoint.adminPanelAccess);\r\n try {\r\n response = await remote.resource<ApiResponse<AdminInfoData>>().withImportance('low').single();\r\n } catch{\r\n // admin api misconfiguration should not break app login\r\n return false;\r\n }\r\n return response.data;\r\n },\r\n\r\n userToolsInfo: async (): Promise<ToolsInfoData> => {\r\n const remote = new RemoteData(toolsEndpoint.toolsAccess);\r\n const response = await remote.resource<ApiResponse<ToolsInfoData>>().withImportance('low').single();\r\n return response.data;\r\n },\r\n\r\n supportEmailAddress: async (): Promise<SupportEmailAddressData> => {\r\n const remote = new RemoteData(endpoint.supportEmailAddress);\r\n const response = await remote.resource<ApiResponse<SupportEmailAddressData>>().withImportance('low').single();\r\n return response.data;\r\n },\r\n\r\n version: async (): Promise<any> => {\r\n const response = await new RemoteData(endpoint.version)\r\n .resource<any>()\r\n .withImportance('low')\r\n .single();\r\n return response.version;\r\n },\r\n\r\n refreshCache: async (): Promise<any> => {\r\n const response = await new RemoteData(endpoint.refreshCache).resource<any>().create('');\r\n\r\n return await response;\r\n },\r\n\r\n regenerateAggregatedEnv: async (): Promise<any> => {\r\n const response = await new RemoteData(endpoint.regenerateAggregatedEnv).resource<any>().create('');\r\n\r\n return await response;\r\n },\r\n\r\n regenerateAggregatedRisk: async (): Promise<any> => {\r\n const response = await new RemoteData(endpoint.regenerateAggregatedRisk).resource<any>().create('');\r\n\r\n return await response;\r\n },\r\n\r\n helpUrl: async (): Promise<string> => {\r\n const response = await new RemoteData(endpoint.helpUrl)\r\n .resource<ApiResponse<{ urlTemplate: string }>>()\r\n .withImportance('low')\r\n .single();\r\n\r\n return response.data.urlTemplate;\r\n },\r\n\r\n messagesToUser: async (): Promise<MessagesToUserInfo[]> => {\r\n const response = await new RemoteData(endpoint.messagesToUser)\r\n .resource<ApiResponse<MessagesToUserInfo>>()\r\n .withImportance('low')\r\n .single();\r\n\r\n return await (response.data) as any;\r\n },\r\n\r\n updateMessageStatus: async (id: number, status: CodetableWireFormat): Promise<any> => {\r\n const response = await new RemoteData(endpoint.messagesToUser).resource<any>()\r\n .withId(id)\r\n .save({ status });\r\n return await response;\r\n },\r\n\r\n loadConsents: async (recipientId: number): Promise<Consent[]> => {\r\n return await new RemoteNotificationsData(endpoint.loadConsents(recipientId))\r\n .resource<Consent[]>()\r\n .withImportance('low')\r\n .all();\r\n },\r\n\r\n surveyManagerAccess: async (): Promise<SurveyManagerAccessInfoData> => {\r\n const response = await new RemoteData(endpoint.surveyManagerAccess)\r\n .resource<ApiResponse<SurveyManagerAccessInfoData>>()\r\n .withImportance('low')\r\n .single();\r\n\r\n return await (response.data) as any;\r\n },\r\n \r\n manageSurveysUrl: async (): Promise<string> => {\r\n const response = await new RemoteData(endpoint.getExternalUrl(4))\r\n .resource<ApiResponse<{ urlTemplate: string }>>()\r\n .withImportance('low')\r\n .single();\r\n \r\n return response.data.urlTemplate;\r\n },\r\n\r\n feedbackUrl: async (): Promise<string> => {\r\n const response = await new RemoteData(endpoint.feedbackUrl)\r\n .resource<ApiResponse<{ urlTemplate: string }>>() \r\n .withImportance('low')\r\n .single();\r\n\r\n return response.data.urlTemplate;\r\n }\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching, ShellState } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { api } from '../api';\r\nimport {\r\n ReceiveUserInfo,\r\n RequestUserInfo,\r\n FailUserInfo,\r\n UserLocaleChange,\r\n RefreshCache,\r\n RegenerateAggregatedEnv,\r\n ReceiveRefreshCache,\r\n FailRefreshCache,\r\n RequestMessagesToUserInfo,\r\n ReceiveMessagesToUserInfo,\r\n UpdateMessageStatus,\r\n FixedHeaderStatus,\r\n RequestLoadConsents,\r\n ReceiveLoadConsents,\r\n FailLoadConsents,\r\n ReceiveShellConfig\r\n} from '../action-types';\r\nimport { DisplayModal, RegenerateAggregatedRisk } from 'app/shell/action-types';\r\nimport { MODAL } from 'app/shell/modal-host-types';\r\nimport { SuccessNotification, ErrorNotification } from 'app/infrastructure/notifications/user-messages/action-types';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/index';\r\nimport { layoutTranslation } from 'app/shell/constants';\r\nimport { translations } from 'app/infrastructure/translate/translations';\r\n\r\nexport const actionCreators = {\r\n loadUserInfo: (): ActionDispatching<any, any> => async (\r\n dispatch: any,\r\n getState: any\r\n ) => {\r\n try {\r\n dispatch(new RequestUserInfo());\r\n const userInfo = await api.userInfo();\r\n\r\n dispatch(new ReceiveUserInfo(userInfo));\r\n\r\n const loadShellConfig = async () => {\r\n try {\r\n const [\r\n adminUserAccess,\r\n toolsInfo,\r\n version,\r\n supportEmailAddress,\r\n surveyManagerAccess,\r\n helpUrl,\r\n manageSurveysUrl,\r\n feedbackUrl\r\n ] = await Promise.all([\r\n api.userAdminAccess(),\r\n api.userToolsInfo(),\r\n api.version(),\r\n api.supportEmailAddress(),\r\n api.surveyManagerAccess(),\r\n api.helpUrl(),\r\n api.manageSurveysUrl(),\r\n api.feedbackUrl()\r\n ]);\r\n\r\n await dispatch(\r\n new ReceiveShellConfig(\r\n version,\r\n supportEmailAddress,\r\n adminUserAccess,\r\n toolsInfo,\r\n surveyManagerAccess,\r\n helpUrl,\r\n manageSurveysUrl,\r\n feedbackUrl\r\n )\r\n );\r\n } catch (err) {\r\n dispatch(new FailUserInfo());\r\n }\r\n };\r\n\r\n setTimeout(loadShellConfig, 50);\r\n\r\n } catch (err) {\r\n dispatch(new FailUserInfo());\r\n throw err;\r\n }\r\n },\r\n\r\n displayModal: (name: string): any => {\r\n return new DisplayModal(name);\r\n },\r\n\r\n removeModal: (): any => {\r\n return new DisplayModal(MODAL.none);\r\n },\r\n\r\n changeUserLocale: (\r\n locale: string\r\n ): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new UserLocaleChange(locale));\r\n }),\r\n\r\n executeRefreshCache: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const shellState = getState().app as ShellState;\r\n const translate = createDescriptionSelector(shellState.texts);\r\n\r\n dispatch(new RefreshCache());\r\n\r\n try {\r\n const result = await api.refreshCache();\r\n\r\n if (result) {\r\n dispatch(actionCreators.removeModal());\r\n dispatch(new ReceiveRefreshCache());\r\n dispatch(new SuccessNotification(translate(layoutTranslation.refresh_cache_success)));\r\n translations.clear();\r\n }\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new FailRefreshCache());\r\n }\r\n },\r\n\r\n executeRegenerateAggregatedEnv: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const shellState = getState().app as ShellState;\r\n const translate = createDescriptionSelector(shellState.texts);\r\n\r\n dispatch(new RegenerateAggregatedEnv(true));\r\n\r\n try {\r\n const result = await api.regenerateAggregatedEnv();\r\n\r\n if (result) {\r\n dispatch(actionCreators.removeModal());\r\n dispatch(new RegenerateAggregatedEnv(false));\r\n dispatch(new SuccessNotification(translate(layoutTranslation.regenerate_aggregated_enviromental_success)));\r\n }\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new RegenerateAggregatedEnv(false));\r\n }\r\n },\r\n\r\n executeRegenerateAggregatedRisk: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const shellState = getState().app as ShellState;\r\n const translate = createDescriptionSelector(shellState.texts);\r\n\r\n dispatch(new RegenerateAggregatedRisk(true));\r\n\r\n try {\r\n const result = await api.regenerateAggregatedRisk();\r\n\r\n if (result) {\r\n dispatch(actionCreators.removeModal());\r\n dispatch(new RegenerateAggregatedRisk(false));\r\n dispatch(new SuccessNotification(translate(layoutTranslation.regenerate_aggregated_risk_success)));\r\n }\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new RegenerateAggregatedRisk(false));\r\n }\r\n },\r\n\r\n getMessagesToUser: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new RequestMessagesToUserInfo());\r\n const messagesToUser = await api.messagesToUser();\r\n dispatch(new ReceiveMessagesToUserInfo(messagesToUser));\r\n }),\r\n\r\n updateMessageStatus: (id: number, status: number) =>\r\n async (dispatch: any, getState: any): Promise<void> => {\r\n\r\n dispatch(new UpdateMessageStatus(true, id));\r\n\r\n try {\r\n await api.updateMessageStatus(id, { v: status });\r\n const messagesToUser = await api.messagesToUser();\r\n dispatch(new ReceiveMessagesToUserInfo(messagesToUser));\r\n dispatch(new UpdateMessageStatus(false, id));\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new UpdateMessageStatus(false, id));\r\n }\r\n },\r\n updateFixedHeaderStatus: (fixed: boolean) =>\r\n (dispatch: any, getState: any) => {\r\n dispatch(new FixedHeaderStatus(fixed));\r\n },\r\n loadConsents: (recipientId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n dispatch(new RequestLoadConsents());\r\n\r\n try {\r\n const response = await api.loadConsents(recipientId);\r\n dispatch(new ReceiveLoadConsents(response));\r\n } catch {\r\n dispatch(new FailLoadConsents());\r\n }\r\n }\r\n};\r\n","\r\nexport const standardTextLimit = 200;\r\nexport const ShouldTruncate = (text: string, limit: number = standardTextLimit) => {\r\n return text.length > limit;\r\n};\r\n\r\nexport const CreateRenderer = (text: string, limit: number = standardTextLimit) => {\r\n return (collapsed: boolean) => collapsed ? `${text.substring(0, limit)}...` : text;\r\n};\r\n","export { Expandable } from './expandable';\r\nexport * from './utils';\r\n","import * as React from 'react';\r\nimport { actionCreators as shellActions } from 'app/shell/default/actions';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { STATE } from 'app/constants';\r\n\r\nimport styles from './sticky-header.scss';\r\nimport { isInternetExplorer } from 'app/infrastructure/platform';\r\n\r\ninterface StickyHeaderProps {\r\n className?: string;\r\n updateFixedHeaderStatus?: (fixed: boolean) => void;\r\n id?:string;\r\n disabled?: boolean;\r\n rightSideContent?: any;\r\n children?:React.ReactNode;\r\n}\r\n\r\nconst StickyHeader: React.SFC<StickyHeaderProps> = (props:StickyHeaderProps) => {\r\n const {children, className, id, disabled, rightSideContent} = props;\r\n const htmlProps = {id};\r\n\r\n React.useEffect(()=> {\r\n if (!props.disabled && !isInternetExplorer()) {\r\n props.updateFixedHeaderStatus(false);\r\n }\r\n\r\n return () => {\r\n if (!props.disabled) {\r\n props.updateFixedHeaderStatus(true);\r\n }\r\n };\r\n }, []);\r\n\r\n return <div className={`${className || ''} ${styles.header} ${!disabled ? styles.sticky + ' sticky' : ''}`} {...htmlProps}>\r\n <div className={`main-grid ${styles.wrapper} ${isInternetExplorer() ? 'container' : ''}`}>\r\n <div className={styles.left}>\r\n {children}\r\n </div>\r\n {rightSideContent}\r\n </div>\r\n </div>;\r\n};\r\n//@ts-ignore\r\nStickyHeader.statePath = STATE.app;\r\nconst container = containerFactory<StickyHeaderProps>(\r\n StickyHeader,\r\n shellActions,\r\n null,\r\n null) as any;\r\n\r\nexport { container as StickyHeader };\r\n\r\nexport const StickyHeaderButtonContainer = ({children}) => <div className={styles.buttonContainer}>{children}</div>;\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"inspection-mode\":\"fallback__inspection-mode--2a2uC\",\"inspectionMode\":\"fallback__inspection-mode--2a2uC\",\"popover-title\":\"fallback__popover-title--r9_yQ\",\"popoverTitle\":\"fallback__popover-title--r9_yQ\",\"popover-wrapper\":\"fallback__popover-wrapper--2_Dj_\",\"popoverWrapper\":\"fallback__popover-wrapper--2_Dj_\",\"popover-content\":\"fallback__popover-content--B3umb\",\"popoverContent\":\"fallback__popover-content--B3umb\",\"popover-message\":\"fallback__popover-message--3uO05\",\"popoverMessage\":\"fallback__popover-message--3uO05\",\"jsonkey\":\"fallback__jsonkey--2B0y1\",\"jsonvalue\":\"fallback__jsonvalue--1ANuT\",\"jsonstring\":\"fallback__jsonstring--2cMSC\",\"componentinfopanel\":\"fallback__componentinfopanel--28Ftn\",\"scrollable-parent\":\"fallback__scrollable-parent--P7w5Z\",\"scrollableParent\":\"fallback__scrollable-parent--P7w5Z\",\"scrollable\":\"fallback__scrollable--1eGeg\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"attachment-viewer__visuallyhidden--3uIZA\",\"focusable\":\"attachment-viewer__focusable--3N1MO\",\"viewer\":\"attachment-viewer__viewer--2Jb10\",\"image\":\"attachment-viewer__image--2nmyl\",\"fit-image\":\"attachment-viewer__fit-image--19eAl\",\"fitImage\":\"attachment-viewer__fit-image--19eAl\",\"direction-button\":\"attachment-viewer__direction-button--3AD6_\",\"directionButton\":\"attachment-viewer__direction-button--3AD6_\",\"next\":\"attachment-viewer__next--1sf8X\",\"thumbnail-container\":\"attachment-viewer__thumbnail-container--oR6gg\",\"thumbnailContainer\":\"attachment-viewer__thumbnail-container--oR6gg\",\"thumbnail\":\"attachment-viewer__thumbnail--xtBLU\",\"image-container\":\"attachment-viewer__image-container--1k6u4\",\"imageContainer\":\"attachment-viewer__image-container--1k6u4\",\"thumbnail-list\":\"attachment-viewer__thumbnail-list--3YNsw\",\"thumbnailList\":\"attachment-viewer__thumbnail-list--3YNsw\",\"progress-container\":\"attachment-viewer__progress-container--3dE4z\",\"progressContainer\":\"attachment-viewer__progress-container--3dE4z\",\"download-button-container\":\"attachment-viewer__download-button-container--3Pq56\",\"downloadButtonContainer\":\"attachment-viewer__download-button-container--3Pq56\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"compact-tile__visuallyhidden--3GXmE\",\"focusable\":\"compact-tile__focusable--eZ9d9\",\"active-tile\":\"compact-tile__active-tile--2JQIW\",\"activeTile\":\"compact-tile__active-tile--2JQIW\",\"compact-tile-wrapper\":\"compact-tile__compact-tile-wrapper--148us\",\"compactTileWrapper\":\"compact-tile__compact-tile-wrapper--148us\",\"button-container\":\"compact-tile__button-container--YbYYk\",\"buttonContainer\":\"compact-tile__button-container--YbYYk\",\"compact-tile\":\"compact-tile__compact-tile--3nm58\",\"compactTile\":\"compact-tile__compact-tile--3nm58\",\"details-button\":\"compact-tile__details-button--25g4B\",\"detailsButton\":\"compact-tile__details-button--25g4B\",\"has-child-errors\":\"compact-tile__has-child-errors--2wep_\",\"hasChildErrors\":\"compact-tile__has-child-errors--2wep_\",\"has-child-warnings\":\"compact-tile__has-child-warnings--1OdWe\",\"hasChildWarnings\":\"compact-tile__has-child-warnings--1OdWe\",\"tile-dropdown\":\"compact-tile__tile-dropdown--3s4X-\",\"tileDropdown\":\"compact-tile__tile-dropdown--3s4X-\",\"content-wrapper\":\"compact-tile__content-wrapper--1IqUz\",\"contentWrapper\":\"compact-tile__content-wrapper--1IqUz\",\"context-menu\":\"compact-tile__context-menu--_HGwo\",\"contextMenu\":\"compact-tile__context-menu--_HGwo\",\"edit-button-expand-all\":\"compact-tile__edit-button-expand-all--3seid\",\"editButtonExpandAll\":\"compact-tile__edit-button-expand-all--3seid\",\"edit-button\":\"compact-tile__edit-button--1XcpL\",\"editButton\":\"compact-tile__edit-button--1XcpL\"};","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $includes = require('../internals/array-includes').includes;\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.includes\n$({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('includes');\n","import * as React from 'react';\r\n\r\nexport class FixedDocument extends React.Component<any> {\r\n\r\n public componentDidMount() {\r\n if (document) {\r\n document.body.style.overflow = 'hidden';\r\n }\r\n }\r\n\r\n public componentWillUnmount(){\r\n if (document){\r\n document.body.style.overflow = '';\r\n }\r\n }\r\n\r\n public render() {\r\n return this.props.children;\r\n }\r\n}\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdClose = function MdClose(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31.6 10.7l-9.3 9.3 9.3 9.3-2.3 2.3-9.3-9.3-9.3 9.3-2.3-2.3 9.3-9.3-9.3-9.3 2.3-2.3 9.3 9.3 9.3-9.3z' })\n )\n );\n};\n\nexports.default = MdClose;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdArrowDropDown = function MdArrowDropDown(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm11.6 16.6h16.8l-8.4 8.4z' })\n )\n );\n};\n\nexports.default = MdArrowDropDown;\nmodule.exports = exports['default'];","import * as React from 'react';\r\n\r\nexport const ScrollUpSymbol = (props) => (\r\n<svg width=\"63.1\" className={props.className} onClick={props.onClick} height=\"63.1\" viewBox=\"0 0 63.1 63.1\">\r\n <g id=\"Group_9942_1_\" transform=\"translate(-14.949 -575.95)\">\r\n <g id=\"Ellipse_2787_1_\" transform=\"translate(15 576)\">\r\n <circle id=\"Ellipse_2793\" data-name=\"Ellipse 2793\" className=\"icon-background\" cx=\"29.8\" cy=\"29.5\" r=\"29.8\"\r\n transform=\"translate(1.7 1.7)\" fill=\"none\" stroke=\"#0067c5\" strokeWidth=\"3.5\"/>\r\n </g>\r\n <g id=\"outline-call_made-24px_1_\" transform=\"translate(16.029 594) rotate(-45)\">\r\n <path id=\"Path_9079_1_\" d=\"M6.7,18.8v3.5H18.2L-2,42.6.5,45.1,20.8,24.8V36.3h3.5V18.8Z\" fill=\"#0067c5\"/>\r\n </g>\r\n </g>\r\n</svg>);\r\n","import * as React from 'react';\r\nimport useEventListener from '@use-it/event-listener';\r\nimport { ScrollUpSymbol } from 'ui/common/icons/scroll-up-symbol';\r\n\r\nimport styles from './scroll-to-top.scss';\r\nimport { getWindowScroller } from 'app/infrastructure/platform/browser-dom';\r\n\r\nconst scroller = getWindowScroller();\r\nconst scrollUp = () => {\r\n scroller(0);\r\n};\r\n\r\nexport const ScrollToTop = React.memo(() => {\r\n const [visible, setVisible] = React.useState(false);\r\n\r\n useEventListener('scroll', () => {\r\n const newValue = window.pageYOffset !== 0;\r\n if(newValue !== visible) {\r\n setVisible(newValue);\r\n }\r\n });\r\n\r\n return <ScrollUpSymbol onClick={scrollUp} className={`${styles.button} ${visible ? styles.visible : ''}`}/>;\r\n});\r\n","module.exports = (__webpack_require__(49))(637);","import { RenderMode, StoreItemPath } from 'app/types-shared';\r\nimport { SchemaBuilder } from 'app/infrastructure/ui/builder';\r\nimport { inferHostSectionOfChildEntity } from 'app/area/case/selectors';\r\nimport { getEntityTypePathFromStorePath } from 'app/infrastructure/store/entity';\r\nimport { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\n\r\n/**\r\n * For legacy reasons, the first level always maps to tblTrans under the route alias of /draft or /case\r\n * @param mode RenderMode to resolve for\r\n */\r\nconst mapDataKeyToLocationKey = (mode: RenderMode) => (route: string) => {\r\n const mappings = {\r\n tblTrans: (mode === RenderMode.edit ? 'draft' : 'case'),\r\n id: 'tblTrans'\r\n };\r\n const match = Object.keys(mappings).find( key => route.toLowerCase() === key.toLowerCase() );\r\n return mappings[match] || route;\r\n};\r\n\r\n/**\r\n * Simply map routes to CompositeKeys to be able to deep link to child items.\r\n * \r\n * e.g '/draft/1/TblAction/2' => {tblTrans:1, tblAction: 2}\r\n * \r\n * @param params Params from e.g react-router\r\n * @param mode RenderMode to use when resolving legacy route keys\r\n * @param overrideParams Use to override values in @params. E.g. \r\n * read mode of case we need to use the Primary key for tblTrans when route params contains case number\r\n */\r\nexport const storeItemPathFromRoute = (\r\n params: {[route: string] : string}, \r\n mode: RenderMode, \r\n overrideParams = {}) => {\r\n \r\n const result = [];\r\n const routes = Object.keys(params);\r\n const firstRoute = mapDataKeyToLocationKey(mode)(routes[0]);\r\n\r\n // By convention. Push first route item as case (trans).\r\n result.push( { [firstRoute] : Number( overrideParams[routes[0]] || params[routes[0]]) } );\r\n \r\n // Add children of case\r\n routes.forEach(route => {\r\n const routeForEntity = mapDataKeyToLocationKey(mode)(route); \r\n const childMatches = params[routeForEntity];\r\n const childEntity = Array.isArray(childMatches) ? childMatches[0] : undefined;\r\n const childEntityId = Array.isArray(childMatches) ? childMatches[1] : childMatches; \r\n \r\n if (childEntity) { \r\n result.push( { [ childEntity ] : Number( childEntityId ) } );\r\n }\r\n });\r\n\r\n return result;\r\n};\r\n\r\n/**\r\n * Build a location from a CompositeKeys object. \r\n * \r\n * E.g `{tblTrans: 123, tblAction: 4} => '/draft/123/TblAction/4`\r\n * @param paths \r\n */\r\nexport const routeFromStoreItemPath = (paths: StoreItemPath[], mode: RenderMode) => \r\n Array.isArray(paths) ? \r\n paths.reduce(\r\n (prev: any, path: StoreItemPath, index: number, all: StoreItemPath[]) => {\r\n const itemKey = Object.keys(path)[0]; \r\n return [\r\n ...prev,\r\n ...[ \r\n mapDataKeyToLocationKey(mode)(itemKey), \r\n path[itemKey] ]\r\n ];\r\n }, ['']).join('/') : ''; \r\n\r\n/**\r\n * Find the first section associated with an entity. 'Associated' usually means the first section with an iterator for the same entity type.\r\n */\r\nexport const sectionFromStoreItemPath = (entityPath: StoreItemPath[], renderMode: any, uiDefinition: UiDefinition) => {\r\n if(!entityPath) {\r\n return;\r\n }\r\n \r\n const schema = SchemaBuilder.create(renderMode, uiDefinition);\r\n return inferHostSectionOfChildEntity({ sections: schema.availableSections, entityTypePath: getEntityTypePathFromStorePath(entityPath) });\r\n};\r\n","import { reAuthenticate, getAccessToken, getIdToken, processToken } from 'app/infrastructure/auth';\r\n\r\nexport const authProvider = {\r\n reAuthenticate: reAuthenticate,\r\n get idToken(){return getIdToken();},\r\n processToken: processToken,\r\n get headers(){\r\n const token = getAccessToken();\r\n if (token) {\r\n return {\r\n authorization: `Bearer ${getAccessToken()}`\r\n };\r\n }\r\n return {};\r\n },\r\n processResponse: async (response: Response) => response,\r\n // Noop with standard authentication. Used by anonymous client for case password.\r\n setAuthorization: (auth: string) => undefined,\r\n getAuthorization: (): string => undefined\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"edit__visuallyhidden--1oN3A\",\"focusable\":\"edit__focusable--1DyTr\",\"container\":\"edit__container--2m_tD\",\"action-title\":\"edit__action-title--1p9br\",\"actionTitle\":\"edit__action-title--1p9br\",\"section\":\"edit__section--2u2uD\",\"add-operation\":\"edit__add-operation--xwzFx\",\"addOperation\":\"edit__add-operation--xwzFx\",\"firstColumnWithoutPadding\":\"edit__firstColumnWithoutPadding--32X9S\",\"secondColumnWithoutPadding\":\"edit__secondColumnWithoutPadding--1we3U\",\"disclaimer-panel\":\"edit__disclaimer-panel--1limS\",\"disclaimerPanel\":\"edit__disclaimer-panel--1limS\",\"info\":\"edit__info--36rX8\",\"id\":\"edit__id--2zye1\",\"title\":\"edit__title--3R9jQ\"};","import { CasePermissions } from 'app/types-shared';\r\n\r\nexport const ACTION = {\r\n REQUEST_CASE_ENTITY_ID:  'REQUEST_CASE_ENTITY_ID',\r\n RECEIVE_CASE_ENTITY_ID:  'RECEIVE_CASE_ENTITY_ID',\r\n FAIL_REQUEST_CASE_ENTITY_ID: 'FAIL_REQUEST_CASE_ENTITY_ID',\r\n REQUEST_CONNECTED_CASE_PERMISSIONS: 'REQUEST_CONNECTED_CASE_PERMISSIONS',\r\n RECEIVE_CONNECTED_CASE_PERMISSIONS: 'RECEIVE_CONNECTED_CASE_PERMISSIONS'\r\n};\r\n\r\nexport class RequestCaseEntityId {\r\n public type: string = ACTION.REQUEST_CASE_ENTITY_ID;\r\n public caseId: number;\r\n\r\n constructor(caseId: number) {\r\n this.caseId = caseId;\r\n }\r\n}\r\n\r\nexport class ReceiveCaseEntityId {\r\n public type: string = ACTION.RECEIVE_CASE_ENTITY_ID;\r\n public caseId: number;\r\n public entityId: number;\r\n\r\n constructor(caseId: number, entityId: number) {\r\n this.caseId = caseId;\r\n this.entityId = entityId;\r\n }\r\n}\r\n\r\nexport class FailRequestCaseEntityId {\r\n public type: string = ACTION.FAIL_REQUEST_CASE_ENTITY_ID;\r\n public caseId: number;\r\n constructor(caseId: number) {\r\n this.caseId = caseId;\r\n }\r\n}\r\n\r\nexport class RequestConnectedCasePermissions {\r\n public type: string = ACTION.REQUEST_CONNECTED_CASE_PERMISSIONS;\r\n constructor(public ids: number[]) {}\r\n}\r\n\r\nexport class ReceiveConnectedCasePermissions {\r\n public type: string = ACTION.RECEIVE_CONNECTED_CASE_PERMISSIONS;\r\n constructor(public permissions: {[id: number]: CasePermissions}) {}\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"filter-panel__visuallyhidden--2xC6C\",\"focusable\":\"filter-panel__focusable--1Up71\",\"filter-panel\":\"filter-panel__filter-panel--31LBX\",\"filterPanel\":\"filter-panel__filter-panel--31LBX\",\"title-style\":\"filter-panel__title-style--17KAA\",\"titleStyle\":\"filter-panel__title-style--17KAA\",\"content\":\"filter-panel__content--cUJ3r\",\"content-wrapper\":\"filter-panel__content-wrapper--IzBb9\",\"contentWrapper\":\"filter-panel__content-wrapper--IzBb9\",\"is-open\":\"filter-panel__is-open--3ECje\",\"isOpen\":\"filter-panel__is-open--3ECje\",\"slideOpen\":\"filter-panel__slideOpen--2EViI\",\"animate-out\":\"filter-panel__animate-out--3nFhZ\",\"animateOut\":\"filter-panel__animate-out--3nFhZ\",\"slideClose\":\"filter-panel__slideClose--bUgUP\",\"is-closed\":\"filter-panel__is-closed--1AsGU\",\"isClosed\":\"filter-panel__is-closed--1AsGU\",\"filter-meatball-menu\":\"filter-panel__filter-meatball-menu--DFpCn\",\"filterMeatballMenu\":\"filter-panel__filter-meatball-menu--DFpCn\",\"added\":\"filter-panel__added--1ASgS\",\"flash-in\":\"filter-panel__flash-in--1bIRl\",\"flashIn\":\"filter-panel__flash-in--1bIRl\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"time__visuallyhidden--KeFVw\",\"focusable\":\"time__focusable--HSqqZ\",\"wrapper\":\"time__wrapper--3WQFB\",\"picker-wrapper\":\"time__picker-wrapper--Q3n4-\",\"pickerWrapper\":\"time__picker-wrapper--Q3n4-\",\"clock-wrapper\":\"time__clock-wrapper--5hg7g\",\"clockWrapper\":\"time__clock-wrapper--5hg7g\",\"done-button-wrapper\":\"time__done-button-wrapper--48BDN\",\"doneButtonWrapper\":\"time__done-button-wrapper--48BDN\",\"am\":\"time__am--3Is3q\",\"pm\":\"time__pm--2vsz_\",\"am-default\":\"time__am-default--2QzFG\",\"amDefault\":\"time__am-default--2QzFG\",\"pm-default\":\"time__pm-default--15T4Y\",\"pmDefault\":\"time__pm-default--15T4Y\",\"picker\":\"time__picker--MjYlv\",\"icon-clock\":\"time__icon-clock--3Zgsj\",\"iconClock\":\"time__icon-clock--3Zgsj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"access-switch-item__visuallyhidden--zkUEj\",\"focusable\":\"access-switch-item__focusable--1-0p7\",\"switch-component\":\"access-switch-item__switch-component--2fMB1\",\"switchComponent\":\"access-switch-item__switch-component--2fMB1\",\"invalid-switch-component\":\"access-switch-item__invalid-switch-component--3M2Ex\",\"invalidSwitchComponent\":\"access-switch-item__invalid-switch-component--3M2Ex\",\"switch-label\":\"access-switch-item__switch-label--BTT06\",\"switchLabel\":\"access-switch-item__switch-label--BTT06\",\"slider\":\"access-switch-item__slider--1qjpq\",\"switch\":\"access-switch-item__switch--2Kkt9\",\"switch-label-disabled\":\"access-switch-item__switch-label-disabled--3sPJ1\",\"switchLabelDisabled\":\"access-switch-item__switch-label-disabled--3sPJ1\",\"switch-container\":\"access-switch-item__switch-container--17jYG\",\"switchContainer\":\"access-switch-item__switch-container--17jYG\",\"ui-switch-disabled\":\"access-switch-item__ui-switch-disabled--3nLVT\",\"uiSwitchDisabled\":\"access-switch-item__ui-switch-disabled--3nLVT\",\"info-text-trigger\":\"access-switch-item__info-text-trigger--2zrih\",\"infoTextTrigger\":\"access-switch-item__info-text-trigger--2zrih\",\"tooltip-arrow\":\"access-switch-item__tooltip-arrow--1H7JY\",\"tooltipArrow\":\"access-switch-item__tooltip-arrow--1H7JY\",\"info-text\":\"access-switch-item__info-text--37iIq\",\"infoText\":\"access-switch-item__info-text--37iIq\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-option-link__visuallyhidden--xNrmH\",\"focusable\":\"select-option-link__focusable--nBUc8\",\"meatball-container\":\"select-option-link__meatball-container--1RPLv\",\"meatballContainer\":\"select-option-link__meatball-container--1RPLv\",\"select-code-btn\":\"select-option-link__select-code-btn--2V33s\",\"selectCodeBtn\":\"select-option-link__select-code-btn--2V33s\",\"select-code-btn-icon\":\"select-option-link__select-code-btn-icon--3of1-\",\"selectCodeBtnIcon\":\"select-option-link__select-code-btn-icon--3of1-\",\"select-code-btn-title\":\"select-option-link__select-code-btn-title--2WqMV\",\"selectCodeBtnTitle\":\"select-option-link__select-code-btn-title--2WqMV\",\"select-folder\":\"select-option-link__select-folder--1nQbF\",\"selectFolder\":\"select-option-link__select-folder--1nQbF\",\"select-option\":\"select-option-link__select-option--3Qvij\",\"selectOption\":\"select-option-link__select-option--3Qvij\",\"white-dots\":\"select-option-link__white-dots--3_ZF3\",\"whiteDots\":\"select-option-link__white-dots--3_ZF3\",\"expanded\":\"select-option-link__expanded--3oY-e\",\"label-container\":\"select-option-link__label-container--1HfwS\",\"labelContainer\":\"select-option-link__label-container--1HfwS\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"main-language__visuallyhidden--wDsu2\",\"focusable\":\"main-language__focusable--2Qvvk\",\"main-language\":\"main-language__main-language--3dpi8\",\"mainLanguage\":\"main-language__main-language--3dpi8\",\"main-language-container\":\"main-language__main-language-container--lC3E_\",\"mainLanguageContainer\":\"main-language__main-language-container--lC3E_\",\"main-language-input\":\"main-language__main-language-input--3XCA_\",\"mainLanguageInput\":\"main-language__main-language-input--3XCA_\",\"main-language-button\":\"main-language__main-language-button--302co\",\"mainLanguageButton\":\"main-language__main-language-button--302co\",\"main-language-button-container\":\"main-language__main-language-button-container--2kGAX\",\"mainLanguageButtonContainer\":\"main-language__main-language-button-container--2kGAX\",\"main-language-input-wrapper\":\"main-language__main-language-input-wrapper--zkAoq\",\"mainLanguageInputWrapper\":\"main-language__main-language-input-wrapper--zkAoq\",\"button-container\":\"main-language__button-container--1T3xl\",\"buttonContainer\":\"main-language__button-container--1T3xl\",\"short-button\":\"main-language__short-button--1znUZ\",\"shortButton\":\"main-language__short-button--1znUZ\",\"short-button-container\":\"main-language__short-button-container--31JQn\",\"shortButtonContainer\":\"main-language__short-button-container--31JQn\"};","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\n// `String.prototype.includes` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~String(requireObjectCoercible(this))\n .indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","import { isBrowser, globalVar } from 'app/infrastructure/universal';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { externalRedirect } from 'app/infrastructure/platform';\r\nimport { SigninRequestSettings } from './types';\r\nimport { logoutRoute } from './constants';\r\nimport { clearCachedToken, cacheAccessToken } from 'app/infrastructure/auth/token-cache';\r\nimport { cacheIdToken, getIdToken } from 'app/infrastructure/auth';\r\n\r\nlet signinResponse: any;\r\nlet client: any;\r\n\r\n// prevent paralell requests triggering multiple redirects to auth provider\r\nlet redirectStarted: boolean;\r\n\r\nconst logoutPath = (applicationUrl: string) => {\r\n return (applicationUrl.lastIndexOf('/') === applicationUrl.length - 1\r\n ? applicationUrl.slice(0, -1) : applicationUrl)\r\n + logoutRoute;\r\n};\r\n\r\nexport function initialize() {\r\n if (!isBrowser || client) {\r\n return;\r\n }\r\n\r\n const { OidcClient } = require('oidc-client');\r\n client = new OidcClient({\r\n authority: AppSetting.OidcServiceUrl,\r\n client_id: AppSetting.OidcClientId,\r\n redirect_uri: AppSetting.ApplicationUrl,\r\n post_logout_redirect_uri: logoutPath(AppSetting.ApplicationUrl),\r\n scope: AppSetting.OidcScope,\r\n response_type: 'id_token token',\r\n\r\n filterProtocolClaims: true,\r\n loadUserInfo: !AppSetting.OidcDontLoadUserInfo\r\n });\r\n}\r\n\r\nexport const routerPath = (href: string, hostingPath: string) => {\r\n if (href === undefined || href === null) {\r\n return '/';\r\n }\r\n\r\n const hostPosition = href.indexOf('://') !== -1 ? href.indexOf('://') + 3 : 0;\r\n const locationPosition = href.indexOf('/', hostPosition);\r\n const locationPath = locationPosition !== -1 ? href.substring(locationPosition) : '/';\r\n\r\n if (hostingPath === undefined || hostingPath === null || hostingPath.length === 0) {\r\n return locationPath;\r\n }\r\n\r\n const hostingPathPosition = locationPath.toLowerCase().indexOf(hostingPath.toLowerCase());\r\n const hostingPathLength = hostingPath.length - (hostingPath.lastIndexOf('/') === hostingPath.length - 1 ? 1 : 0);\r\n return hostingPathPosition === -1 || locationPath.length === hostingPathPosition + hostingPathLength\r\n ? '/'\r\n : locationPath.substring(hostingPathPosition + hostingPathLength);\r\n};\r\n\r\nexport function reAuthenticate() {\r\n if (redirectStarted) {\r\n return;\r\n }\r\n redirectStarted = true;\r\n clearCachedToken();\r\n signin(true, true);\r\n}\r\n\r\nexport async function signin(logAsDifferentUser: boolean = false, storeCurrentRouterPath: boolean = true) {\r\n\r\n initialize();\r\n\r\n const path = storeCurrentRouterPath\r\n ? routerPath(globalVar('location').href, AppSetting.HostingPath)\r\n : '/';\r\n\r\n const settings: SigninRequestSettings = {\r\n state: { redirectUrl: path }\r\n };\r\n\r\n const providerId = AppSetting.OidcDefaultProviderId;\r\n\r\n if (logAsDifferentUser) {\r\n settings.prompt = 'login';\r\n } else if (providerId) {\r\n settings.acr_values = 'idp:' + providerId;\r\n }\r\n\r\n const request = await client.createSigninRequest(settings);\r\n\r\n if (!request || !request.url) {\r\n throw new Error('Unable to create signin request');\r\n }\r\n externalRedirect(request.url);\r\n}\r\n\r\nexport async function processSigninResponse(): Promise<string> {\r\n initialize();\r\n signinResponse = await client.processSigninResponse();\r\n cacheAccessToken(signinResponse.access_token);\r\n cacheIdToken(signinResponse.id_token);\r\n return signinResponse && signinResponse.state && signinResponse.state.redirectUrl;\r\n}\r\n\r\nexport async function signout() {\r\n initialize();\r\n const request = await client.createSignoutRequest({\r\n id_token_hint: getIdToken()\r\n });\r\n if (!request || !request.url) {\r\n throw new Error('Unable to create signout request');\r\n }\r\n\r\n externalRedirect(request.url);\r\n}\r\n\r\nexport async function processSignoutResponse() {\r\n initialize();\r\n clearCachedToken();\r\n await client.processSignoutResponse();\r\n signinResponse = undefined;\r\n}\r\n","import { \r\n CasePermissions, \r\n TextCollection, \r\n RenderMode,\r\n CompositeKeys,\r\n Entity,\r\n StoreMetadata,\r\n ComplexValue\r\n} from 'app/types-shared';\r\nimport { EditState } from 'app/infrastructure/ui/form/types';\r\nimport { UiSchema } from 'app/infrastructure/ui/types-uischema';\r\nimport { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\n\r\nexport interface CaseState {\r\n schema?: UiSchema;\r\n selectedId?: number;\r\n stateForCaseIds?: { \r\n [caseId: string]: { valid: boolean, fetching: boolean, fetchingPermissions?: boolean, permissions: CasePermissions } \r\n };\r\n entities?: { [transId: string] : Entity[] };\r\n texts?: TextCollection;\r\n editing?: EditState;\r\n riskMatrixDefinitions?: { [index: string]: { definition: RiskMatrixDefinition, fetching: boolean } };\r\n uiDefinition?: UiDefinition; // to be able to re-build the schema on demand without re-fetching\r\n permissions?: CasePermissions;\r\n renderMode?: RenderMode;\r\n fetching?: boolean;\r\n tempdata?: any; // per-component temporary data, such as code table data\r\n activeChildItem?: CompositeKeys;\r\n metadata?: StoreMetadata;\r\n searchExternalProvider?: SearchExternalDataProviderState;\r\n viewMode?: ViewMode;\r\n}\r\n\r\nexport interface RiskMatrixDefinition {\r\n type: number;\r\n axes: RiskMatrixAxis[];\r\n cells: RiskMatrixCell[];\r\n}\r\n\r\nexport interface RiskMatrixAxis {\r\n id: number;\r\n editable: boolean;\r\n /**\r\n * Fake axes are a client-only concept for supporting 1-dimensional matrix configurations.\r\n */\r\n fakeAxis?: boolean;\r\n data: {\r\n description: string,\r\n codetableId: number,\r\n options: ComplexValue<number>[],\r\n pleaseSelectDescription: string\r\n };\r\n}\r\n\r\nexport interface RiskMatrixCell {\r\n axisValues: ComplexValue<number>[];\r\n data: RiskMatrixCellData;\r\n}\r\n\r\nexport interface RiskMatrixCellData {\r\n riskArea: ComplexValue<number>;\r\n weight: number;\r\n}\r\n\r\nexport enum ViewMode {\r\n tabs,\r\n scroll\r\n}\r\n\r\nexport interface SearchExternalDataProviderState {\r\n fetching?: boolean;\r\n caseDraftId?: number;\r\n domainId?: number;\r\n searchConditions?: SearchExternalSearchCondition[];\r\n resultItems?: SearchExternalResultValue[][];\r\n error?: string;\r\n}\r\n\r\nexport interface SearchExternalSearchCondition {\r\n dataTag: string;\r\n value: string;\r\n}\r\n\r\nexport interface SearchExternalResultValue {\r\n description: string;\r\n dataTag: string;\r\n value: string;\r\n}\r\n","export const endpoints = {\r\n ui: 'case/ui'\r\n};\r\n","import { HttpResponse } from 'app/types-shared';\r\nimport { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\nimport { RemoteData } from 'app/infrastructure/remote-data';\r\nimport { endpoints } from './endpoints';\r\n\r\nexport const api = {\r\n\r\n uiDefinition: async (caseTypeId: number, caseContextId?: number, eTag?: string): Promise<HttpResponse<UiDefinition>> => {\r\n\r\n const remoteData = new RemoteData(endpoints.ui).resource<HttpResponse<UiDefinition>>()\r\n .withId(caseTypeId);\r\n\r\n if (caseContextId) {\r\n remoteData.filter({ caseContextId });\r\n }\r\n\r\n if (eTag) {\r\n remoteData.withIfNoneMatch(eTag);\r\n }\r\n\r\n return await remoteData.response();\r\n }\r\n};\r\n","import { AnyAction } from 'redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { HttpStatusCodes } from 'app/infrastructure/remote-data';\r\nimport { RequestUiDefinition, ReceiveUiDefinition, FailUiDefinition } from './action-types';\r\nimport { api } from './api';\r\nimport { uiDefinitionExpirationTime } from './constants';\r\n\r\nexport const actionCreators = {\r\n\r\n getUiDefinition: (caseTypeId: number, caseContextId: number): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n\r\n const responseCachingState = getState().responseCaching;\r\n\r\n const uiDefinition = responseCachingState && responseCachingState.uiDefinitions &&\r\n responseCachingState.uiDefinitions.find(ui => ui.id === caseTypeId && ui.caseContextId === caseContextId);\r\n\r\n if (uiDefinition && uiDefinition.definition && uiDefinition.timestamp) {\r\n\r\n const currentTimestamp = new Date().getTime();\r\n\r\n if (currentTimestamp < uiDefinition.timestamp + uiDefinitionExpirationTime) {\r\n return uiDefinition.definition;\r\n }\r\n }\r\n\r\n dispatch(new RequestUiDefinition(caseTypeId, caseContextId));\r\n\r\n try {\r\n\r\n const eTag = uiDefinition && !!uiDefinition.definition && uiDefinition.eTag;\r\n const uiDefinitionResponse = await api.uiDefinition(caseTypeId, caseContextId, eTag);\r\n\r\n const newUiDefinition = uiDefinitionResponse.status === HttpStatusCodes.NOT_MODIFIED\r\n ? uiDefinition && uiDefinition.definition\r\n : uiDefinitionResponse.json.data;\r\n\r\n const newETag = uiDefinitionResponse.status === HttpStatusCodes.NOT_MODIFIED\r\n ? uiDefinition && uiDefinition.eTag\r\n : uiDefinitionResponse.etag;\r\n\r\n dispatch(new ReceiveUiDefinition(caseTypeId, caseContextId, newUiDefinition, newETag));\r\n\r\n return newUiDefinition;\r\n\r\n } catch (err) {\r\n\r\n dispatch(new FailUiDefinition(caseTypeId, caseContextId));\r\n throw err;\r\n }\r\n }\r\n};\r\n","export const uiDefinitionExpirationTime = 60 * 60 * 1000;\r\n","module.exports = (__webpack_require__(49))(417);","import { ComplexValue } from '../types';\r\nexport function optionsContainValue(options: any, value: any) {\r\n return options.filter((e) => e.value === value).length > 0 ? true : false;\r\n}\r\nconst defaultValue = [];\r\nexport function getOptionsOrDefault(valueItem: ComplexValue<number>, options: ComplexValue<number>[]) {\r\n let res = defaultValue;\r\n\r\n if (valueItem && options && optionsContainValue(options, valueItem.value)) {\r\n res = options;\r\n } else {\r\n if (valueItem && Object.keys(valueItem).length) {\r\n res = (options || defaultValue).concat(valueItem);\r\n } else if (options) {\r\n res = options;\r\n }\r\n }\r\n return res;\r\n}\r\n","export const caseStoreConst = {\r\n id: 'id',\r\n tblTrans: 'tblTrans',\r\n primaryKey: 'primaryKey',\r\n caseType: 'caseType',\r\n caseContext: 'caseContext',\r\n operation: 'operation'\r\n};\r\n","import { caseStoreConst } from './constants';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport {\r\n CaseData,\r\n SubTables,\r\n SubTable,\r\n Fields,\r\n FieldValue,\r\n StoreData,\r\n StoreMetadata,\r\n StoreDomainMeta,\r\n EntityPath,\r\n CompositeKeys,\r\n StoreField,\r\n StoreItemPath,\r\n Entity,\r\n ComplexValue,\r\n ConstraintResponseType,\r\n ValidationMessageLevel\r\n} from 'app/types-shared';\r\nimport { toISODatewithoutTimezone } from 'app/infrastructure/data/date';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\n\r\n/*\r\n * Flatten CaseData to store format\r\n */\r\nconst mapCaseData = (data: CaseData) => ({\r\n ...(data.caseType && {\r\n [caseStoreConst.caseType]: [codeItemToStoreValue(data.caseType)],\r\n [caseStoreConst.caseContext]: [codeItemToStoreValue(data.caseContext)]\r\n })\r\n});\r\n\r\nconst mapValues = (key: string, field: FieldValue) =>\r\n field && field.values\r\n ? {\r\n [key]: field.values\r\n .map(v => codeItemToStoreValue(v))\r\n .filter(v => v !== undefined)\r\n }\r\n : ({} as { [x: string]: StoreField[] });\r\n\r\nconst mapFields = (fields: Fields) =>\r\n fields\r\n ? Object.keys(fields).reduce(\r\n (item: { [x: string]: StoreField[] }, key) => ({\r\n ...item,\r\n ...mapValues(key, fields[key])\r\n }),\r\n {}\r\n )\r\n : {};\r\n\r\nfunction mapSubtables(\r\n subtables: SubTables,\r\n rootPath: StoreItemPath[]\r\n): StoreData {\r\n return subtables\r\n ? Object.keys(subtables).reduce(\r\n (storeData: StoreData, key) =>\r\n subtables[key]\r\n ? [\r\n ...storeData,\r\n ...subtables[key].reduce(\r\n (item, subtable) => [\r\n ...item,\r\n ...mapDataToItem(subtable, rootPath, key)\r\n ],\r\n []\r\n )\r\n ]\r\n : storeData,\r\n []\r\n )\r\n : [];\r\n}\r\n\r\nfunction mapDataToItem(\r\n data: CaseData | SubTable,\r\n rootPath: StoreItemPath[],\r\n dataKey: string\r\n) {\r\n if (!data) {\r\n return [];\r\n }\r\n\r\n // null/undefined are not legal as primary key value in Synergi Life.\r\n const isValidPrimaryKey =\r\n data.primaryKey && typeof data.primaryKey.v === 'number';\r\n\r\n // calculate current path\r\n const path = isValidPrimaryKey && [\r\n ...rootPath,\r\n { [dataKey]: data.primaryKey.v }\r\n ];\r\n\r\n let primaryKey = undefined;\r\n\r\n //Add readonly primary key. Preserve code information that is lost when added to the path.\r\n if (isValidPrimaryKey) {\r\n const value = data.primaryKey.v;\r\n const description = data.primaryKey.d;\r\n const longDescription = data.primaryKey.ld;\r\n const categoryId = data.primaryKey.ctg;\r\n const icon = data.primaryKey.i && toAbsoluteUrl(data.primaryKey.i);\r\n\r\n primaryKey = {\r\n value,\r\n ...(description && { description }),\r\n ...(longDescription && { longDescription }),\r\n ...(categoryId && { categoryId }),\r\n ...(icon && { icon })\r\n } as ComplexValue<number>;\r\n }\r\n\r\n const fields = {\r\n ...(path && { id: path }),\r\n ...(primaryKey && { primaryKey }),\r\n ...mapFields(data.fields),\r\n //...(path && mapLinks(data.subTables)),\r\n ...mapCaseData(data as CaseData)\r\n };\r\n\r\n // create current element and add fields\r\n return Object.keys(fields).length !== 0\r\n ? [fields, ...mapSubtables(data.subTables, path)]\r\n : [];\r\n}\r\n\r\n/**\r\n * Converts case data sent over wire to flat redux store format\r\n *\r\n * @param {CaseData} caseData case data in wire format\r\n * @returns {StoreData} store state\r\n */\r\nexport const caseDataToStore = (caseData: CaseData): StoreData =>\r\n mapDataToItem(caseData, [], caseStoreConst.tblTrans);\r\n\r\n/*\r\n * Flatten CaseData metadata to store format\r\n */\r\nconst mapDomainMetadata = (data: CaseData): StoreDomainMeta => {\r\n if (!data || !data.metaData) {\r\n return {};\r\n }\r\n\r\n let metaData = mapReadOnlyDomains({}, data);\r\n metaData = mapRequiredFields(metaData, data);\r\n metaData = mapHiddenDomains(metaData, data);\r\n metaData = mapFailedConstraints(metaData, data);\r\n\r\n return metaData;\r\n};\r\n\r\nconst mapReadOnlyDomains = (metaData: StoreDomainMeta, data: CaseData): StoreDomainMeta => {\r\n const readOnlyDomains = data.metaData.readOnlyDomains || [];\r\n return readOnlyDomains.reduce((memo, current) => {\r\n memo[current.domainId] = {\r\n ...memo[current.domainId],\r\n readOnly: {\r\n globalMatch: !current.entityPaths,\r\n entityPaths: entityPathsToCompositeKeys(current.entityPaths)\r\n }\r\n };\r\n\r\n return memo;\r\n }, metaData);\r\n};\r\n\r\nconst mapRequiredFields = (metaData: StoreDomainMeta, data: CaseData): StoreDomainMeta => {\r\n const requiredFieldDomainsValue = data.metaData.requiredFieldDomains || [];\r\n const requiredFieldDomainsForStatusChangeValue =\r\n data.metaData.requiredFieldDomainsForStatusChange || [];\r\n\r\n const requiredFieldDomains = [\r\n ...requiredFieldDomainsValue,\r\n ...requiredFieldDomainsForStatusChangeValue.filter(\r\n d => requiredFieldDomainsValue.indexOf(d) < 0\r\n )\r\n ];\r\n\r\n return requiredFieldDomains.reduce((memo, current) => {\r\n memo[current.domainId] = {\r\n ...memo[current.domainId],\r\n requiredField: {\r\n globalMatch: !current.entityPaths,\r\n entityPaths: entityPathsToCompositeKeys(current.entityPaths)\r\n }\r\n };\r\n return memo;\r\n }, metaData);\r\n};\r\n\r\nconst mapHiddenDomains = (metaData: StoreDomainMeta, data: CaseData): StoreDomainMeta => {\r\n const hiddenDomainsValue = data.metaData.hiddenDomains || [];\r\n return hiddenDomainsValue.reduce((memo, current) => {\r\n memo[current.domainId] = {\r\n ...memo[current.domainId],\r\n hidden: {\r\n globalMatch: !current.entityPaths,\r\n entityPaths: entityPathsToCompositeKeys(current.entityPaths)\r\n }\r\n };\r\n return memo;\r\n }, metaData);\r\n};\r\n\r\nconst mapFailedConstraints = (metaData: StoreDomainMeta, data: CaseData): StoreDomainMeta => {\r\n function getLevel(responseType: ConstraintResponseType): ValidationMessageLevel {\r\n return responseType === ConstraintResponseType.Error ?\r\n ValidationMessageLevel.Error : \r\n ValidationMessageLevel.Warning;\r\n }\r\n\r\n const failedDomainConstraintsValue = data.metaData.failedDomainConstraints || [];\r\n return failedDomainConstraintsValue.reduce((memo, current) => {\r\n memo[current.domainId] = {\r\n ...memo[current.domainId],\r\n validations: [\r\n ...(memo[current.domainId] && memo[current.domainId].validations || []),\r\n {\r\n globalMatch: !current.entityPaths,\r\n entityPaths: entityPathsToCompositeKeys(\r\n current.entityPaths && \r\n current.entityPaths.map(p => p.map(e => ({ tbl: e.entityType, pk: e.entityId })))\r\n ),\r\n level: getLevel(current.responseType),\r\n label: current.domainText,\r\n message: current.message\r\n }\r\n ]\r\n };\r\n return memo;\r\n }, metaData);\r\n};\r\n\r\nfunction entityPathsToCompositeKeys(\r\n entityPaths: EntityPath[][]\r\n): CompositeKeys[] {\r\n if (!entityPaths) {\r\n return undefined;\r\n }\r\n\r\n return entityPaths.map(ep =>\r\n ep.map(row => ({\r\n [row.tbl]: row.pk\r\n }))\r\n );\r\n}\r\n\r\n/**\r\n * Extracts metadata from case data sent over wire to flat redux store format.\r\n * Metadata is merging lazy props surch as readonly.\r\n *\r\n * @param {CaseData} caseData case data in wire format\r\n * @returns {StoreMetadata} store metadata\r\n */\r\nexport const caseMetadataToStore = (caseData: CaseData): StoreMetadata => ({\r\n domains: mapDomainMetadata(caseData)\r\n});\r\n\r\nexport const valueToCaseValue = (value: string | number | Date) => {\r\n if (value instanceof Date) {\r\n return {\r\n ...value,\r\n toJSON: toISODatewithoutTimezone(value)\r\n };\r\n }\r\n return value;\r\n};\r\n\r\n/*\r\n * Unflatten store format to CaseData\r\n */\r\n\r\nconst mapItemToCaseData = (item: Entity) =>\r\n Object.keys(item).reduce((data: CaseData, key) => {\r\n const value = item[key] as StoreField[];\r\n let field;\r\n\r\n switch (key) {\r\n case caseStoreConst.id:\r\n const lastElementIndex = value.length - 1;\r\n const lastPathElement = item[key][lastElementIndex] as StoreItemPath;\r\n const lastPathValue = lastPathElement[Object.keys(lastPathElement)[0]];\r\n field = typeof lastPathValue === 'number' && {\r\n primaryKey: { v: lastPathValue }\r\n };\r\n break;\r\n\r\n case caseStoreConst.caseType:\r\n field = { caseType: { v: Array.isArray(value) && value[0].value } };\r\n break;\r\n\r\n case caseStoreConst.caseContext:\r\n field = { caseContext: { v: Array.isArray(value) && value[0].value } };\r\n break;\r\n\r\n case caseStoreConst.operation:\r\n field = { operation: value };\r\n break;\r\n\r\n case caseStoreConst.primaryKey:\r\n field = {};\r\n break;\r\n\r\n default:\r\n if (value && typeof value[0] === 'number') {\r\n break;\r\n }\r\n field = {\r\n fields: {\r\n ...(data.fields || {}),\r\n [key]: {\r\n values: Array.isArray(value) && value.map(v => ({ v: v.value }))\r\n }\r\n }\r\n };\r\n break;\r\n }\r\n\r\n return {\r\n ...data,\r\n ...field\r\n };\r\n }, {});\r\n\r\n/**\r\n * Converts store data into wire case format\r\n *\r\n * @param {StoreData} storeData store data\r\n * @returns {CaseData} case data in wire format\r\n */\r\nexport const storeToCaseData = (storeData: StoreData): CaseData =>\r\n storeData\r\n ? storeData.reduce(\r\n (caseData, item) => {\r\n let ret: CaseData = caseData;\r\n\r\n let current: CaseData | SubTable = ret;\r\n const fullPath = (item && item.id) || [{}];\r\n\r\n for (const path of fullPath) {\r\n const table = Object.keys(path)[0];\r\n\r\n if (table === caseStoreConst.tblTrans || !table) {\r\n if (\r\n fullPath !== item.id ||\r\n path === item.id[item.id.length - 1]\r\n ) {\r\n ret = {\r\n ...ret,\r\n ...mapItemToCaseData(item)\r\n };\r\n }\r\n current = ret;\r\n } else {\r\n let currentsubtable =\r\n (current.subTables &&\r\n current.subTables[table] &&\r\n current.subTables[table].find(\r\n s => s.primaryKey && s.primaryKey.v === path[table]\r\n )) ||\r\n ({} as SubTable);\r\n\r\n if (path === item.id[item.id.length - 1]) {\r\n currentsubtable = {\r\n ...currentsubtable,\r\n ...mapItemToCaseData(item)\r\n };\r\n }\r\n\r\n const othersubtables =\r\n (current.subTables &&\r\n current.subTables[table] &&\r\n current.subTables[table].filter(\r\n s => !s.primaryKey || s.primaryKey.v !== path[table]\r\n )) ||\r\n [];\r\n\r\n current.subTables = {\r\n ...(current.subTables || {}),\r\n [table]: [...othersubtables, currentsubtable]\r\n };\r\n current = currentsubtable;\r\n }\r\n }\r\n\r\n return ret;\r\n },\r\n {} as CaseData\r\n )\r\n : ({} as CaseData);\r\n","import { SearchExternalSearchCondition, SearchExternalResultValue } from 'app/area/case/types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_SEARCH_EXTERNAL_PROVIDER: 'REQUEST_SEARCH_EXTERNAL_PROVIDER',\r\n RECEIVE_SEARCH_EXTERNAL_PROVIDER: 'RECEIVE_SEARCH_EXTERNAL_PROVIDER',\r\n FAIL_SEARCH_EXTERNAL_PROVIDER: 'FAIL_SEARCH_EXTERNAL_PROVIDER',\r\n CLEAR_SEARCH_EXTERNAL_PROVIDER_RESULTS: 'CLEAR_SEARCH_EXTERNAL_PROVIDER_RESULTS'\r\n};\r\n\r\nexport class RequestSearchExternalProvider {\r\n public type: string = ACTION.REQUEST_SEARCH_EXTERNAL_PROVIDER;\r\n\r\n constructor(\r\n public caseDraftId: number, \r\n public domainId: number, \r\n public searchConditions: SearchExternalSearchCondition[]) {}\r\n}\r\n\r\nexport class ReceiveSearchExternalProvider {\r\n public type: string = ACTION.RECEIVE_SEARCH_EXTERNAL_PROVIDER;\r\n\r\n constructor(\r\n public caseDraftId: number,\r\n public domainId: number,\r\n public resultItems: SearchExternalResultValue[][]) {}\r\n}\r\n\r\nexport class FailSearchExternalProvider {\r\n public type: string = ACTION.FAIL_SEARCH_EXTERNAL_PROVIDER;\r\n\r\n constructor(\r\n public caseDraftId: number,\r\n public domainId: number,\r\n public error: string) {}\r\n}\r\n\r\nexport class ClearSearchExternalProviderResults {\r\n public type: string = ACTION.CLEAR_SEARCH_EXTERNAL_PROVIDER_RESULTS;\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tooltip__visuallyhidden--1apSt\",\"focusable\":\"tooltip__focusable--iVMFZ\",\"tooltip\":\"tooltip__tooltip--1kIcF\",\"left\":\"tooltip__left--3hEx2\",\"tooltiptext\":\"tooltip__tooltiptext--3APIC\",\"tooltip-arrow\":\"tooltip__tooltip-arrow--2TkNo\",\"tooltipArrow\":\"tooltip__tooltip-arrow--2TkNo\",\"right\":\"tooltip__right--2cnOD\",\"top\":\"tooltip__top--vs6sv\",\"center\":\"tooltip__center--1TX_1\",\"bottom\":\"tooltip__bottom--2sxSB\",\"narrow\":\"tooltip__narrow--270q5\",\"delayed\":\"tooltip__delayed--3qDFe\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"code-title-tile__visuallyhidden--2KPDx\",\"focusable\":\"code-title-tile__focusable--hoZBK\",\"header\":\"code-title-tile__header--13gT0\",\"display-codes\":\"code-title-tile__display-codes--182C9\",\"displayCodes\":\"code-title-tile__display-codes--182C9\",\"long-description\":\"code-title-tile__long-description--34Tzg\",\"longDescription\":\"code-title-tile__long-description--34Tzg\",\"code-title-tile\":\"code-title-tile__code-title-tile--2CXxL\",\"codeTitleTile\":\"code-title-tile__code-title-tile--2CXxL\",\"code-title-tile-card\":\"code-title-tile__code-title-tile-card--2R19E\",\"codeTitleTileCard\":\"code-title-tile__code-title-tile-card--2R19E\",\"has-child-errors\":\"code-title-tile__has-child-errors--3dh9i\",\"hasChildErrors\":\"code-title-tile__has-child-errors--3dh9i\",\"has-child-warnings\":\"code-title-tile__has-child-warnings--VhnUw\",\"hasChildWarnings\":\"code-title-tile__has-child-warnings--VhnUw\",\"main\":\"code-title-tile__main---gVBN\",\"risk-area\":\"code-title-tile__risk-area--3PFZK\",\"riskArea\":\"code-title-tile__risk-area--3PFZK\",\"active-tile\":\"code-title-tile__active-tile--2WtwO\",\"activeTile\":\"code-title-tile__active-tile--2WtwO\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-selected-options__visuallyhidden--M_ChZ\",\"focusable\":\"display-selected-options__focusable--2sK2J\",\"ie-max-width-fix\":\"display-selected-options__ie-max-width-fix--2BTq2\",\"ieMaxWidthFix\":\"display-selected-options__ie-max-width-fix--2BTq2\",\"should-collapse\":\"display-selected-options__should-collapse--2qm-k\",\"shouldCollapse\":\"display-selected-options__should-collapse--2qm-k\",\"toggle-expand\":\"display-selected-options__toggle-expand--RgZrD\",\"toggleExpand\":\"display-selected-options__toggle-expand--RgZrD\",\"shadow-box\":\"display-selected-options__shadow-box--3cd8R\",\"shadowBox\":\"display-selected-options__shadow-box--3cd8R\",\"filter-list\":\"display-selected-options__filter-list--1DAxQ\",\"filterList\":\"display-selected-options__filter-list--1DAxQ\",\"option-item-value\":\"display-selected-options__option-item-value--21_Vh\",\"optionItemValue\":\"display-selected-options__option-item-value--21_Vh\",\"expanded\":\"display-selected-options__expanded--2E4Qv\",\"collapsed\":\"display-selected-options__collapsed--3xERj\",\"filters-selected\":\"display-selected-options__filters-selected--2X-5c\",\"filtersSelected\":\"display-selected-options__filters-selected--2X-5c\",\"additional-information\":\"display-selected-options__additional-information--1isiC\",\"additionalInformation\":\"display-selected-options__additional-information--1isiC\"};","var $ = require('../internals/export');\nvar parseIntImplementation = require('../internals/number-parse-int');\n\n// `parseInt` method\n// https://tc39.github.io/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt != parseIntImplementation }, {\n parseInt: parseIntImplementation\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\n\nvar defineProperty = Object.defineProperty;\nvar cache = {};\n\nvar thrower = function (it) { throw it; };\n\nmodule.exports = function (METHOD_NAME, options) {\n if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];\n if (!options) options = {};\n var method = [][METHOD_NAME];\n var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;\n var argument0 = has(options, 0) ? options[0] : thrower;\n var argument1 = has(options, 1) ? options[1] : undefined;\n\n return cache[METHOD_NAME] = !!method && !fails(function () {\n if (ACCESSORS && !DESCRIPTORS) return true;\n var O = { length: -1 };\n\n if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });\n else O[1] = 1;\n\n method.call(O, argument0, argument1);\n });\n};\n","var IS_PURE = require('../internals/is-pure');\nvar getIterator = require('../internals/get-iterator');\n\nmodule.exports = IS_PURE ? getIterator : function (it) {\n // eslint-disable-next-line no-undef\n return Map.prototype.entries.call(it);\n};\n","import {globalVar, isBrowser, isNode} from '../universal';\r\nimport { fetchAttachment } from '../remote-data/http';\r\n\r\n/**\r\n * Make sure Intl is supported, especially for safari 9.x on all platforms, and for V8 SSR\r\n * Locale-sensitive collation (string comparison), number formatting, and date and time formatting.\r\n * http://caniuse.com/#search=Intl\r\n */\r\nconst ensureIntl = () => {\r\n return new Promise((resolve, reject) => {\r\n const property = 'Intl';\r\n\r\n if (globalVar('Intl') || isNode) {\r\n resolve();\r\n return;\r\n }\r\n\r\n // ensure that webpack creates a separate output js bundle file for this\r\n // polyfill, so we only load it if needed\r\n (require as any).ensure(['intl'],\r\n // tslint:disable-next-line\r\n (require: any) => {\r\n //@ts-ignore\r\n let intl = globalVar(property);\r\n intl = require('intl');\r\n resolve();\r\n }, 'IntlPolyfill');\r\n\r\n });\r\n};\r\n\r\n/**\r\n * Ensure runtime browser features Intl are polyfilled if missing\r\n */\r\nexport function browserCompatibility() {\r\n\r\n return Promise.all([ensureIntl()]);\r\n\r\n}\r\n\r\n/**\r\n * Centralized handling of external redirects with guard checks for server side render.\r\n * Uses location.href when running in a browser\r\n * @export\r\n * @param {string} url - The url to redirect to\r\n */\r\nexport function externalRedirect(url : string) {\r\n if (isBrowser) {\r\n location.href = url;\r\n }\r\n}\r\n\r\n/**\r\n * Queues a rAF within a second rAF to ensure it will be executed in the next browser paint frame.​\r\n *\r\n * This can be used to align with updates from React´s internal scheduling\r\n * mechanisms, e.g: instead of using setTimeout to wait for DOM elements to paint and\r\n * be reachable by document.getElementById\r\n *\r\n * @param fn a function containing work to perform before next repaint\r\n */\r\nexport const scheduleUpdate = (fn: ()=>void) => {\r\n requestAnimationFrame( () =>\r\n requestAnimationFrame(fn)\r\n );\r\n};\r\n\r\nexport const createDownloader = (url: string) => async (blobId: number, name: string): Promise<void> => {\r\n const blob = await fetchAttachment(url)(blobId, false);\r\n\r\n if (navigator.msSaveBlob) {\r\n // Edge requires this\r\n navigator.msSaveBlob(blob, name);\r\n }\r\n else {\r\n const objectUrl = window.URL.createObjectURL(blob);\r\n const anchor = document.createElement('a');\r\n anchor.href = objectUrl;\r\n anchor.download = name;\r\n // Firefox requires the anchor to be added in the document\r\n document.body.appendChild(anchor);\r\n anchor.click();\r\n setTimeout(() => {\r\n // Firefox needs this to be in a timeout\r\n document.body.removeChild(anchor);\r\n window.URL.revokeObjectURL(objectUrl);\r\n }, 0);\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @param value value to copy\r\n * @returns Status if the copy was a success\r\n *\r\n */\r\nexport const copyToClipboard = (value: string) : boolean => {\r\n try {\r\n const textField = document.createElement('textarea');\r\n textField.innerText = value;\r\n textField.style.opacity = '0';\r\n document.body.appendChild(textField);\r\n textField.select();\r\n document.execCommand('copy');\r\n document.body.removeChild(textField);\r\n return true;\r\n } catch (err) {\r\n return false;\r\n }\r\n};\r\n\r\n/**\r\n * Detect if browser is Firefox\r\n * @returns returns true if the browser is firefox\r\n */\r\nexport const isFirefox = () => {\r\n return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\r\n};\r\n\r\nexport const isInternetExplorer = () => {\r\n //@ts-ignore\r\n return !!window.MSInputMethodContext && !!document.documentMode;\r\n};\r\n","import * as React from 'react';\r\nimport { Button, ButtonProps } from './button';\r\nimport styles from './button-tertiary.scss';\r\n\r\nexport const ButtonTertiary: React.SFC<ButtonProps> = props => { \r\n const { children, ...rest } = props;\r\n \r\n return (\r\n <Button btnType={styles.btnTertiary} {...rest}>\r\n {children}\r\n </Button>);\r\n };\r\n","import * as React from 'react';\r\nimport styles from './switch.scss';\r\n\r\nexport interface SwitchProps {\r\n className: string;\r\n enabled: boolean;\r\n label?:string;\r\n onChange: (enabled: boolean) => void;\r\n}\r\n\r\nexport class Switch extends React.Component<SwitchProps, {}> {\r\n public static defaultProps: Partial<SwitchProps> = {\r\n className: ''\r\n };\r\n private onChange = () => {\r\n this.props.onChange(!this.props.enabled);\r\n }\r\n public render(): JSX.Element {\r\n const {label} = this.props;\r\n return (\r\n <div className={`${this.props.className} ${styles.switchContainer}`}>\r\n <label className={`${styles.switch}`}>\r\n {label && <div className={styles.switchLabel}>{label}</div>}\r\n <input className=\"visuallyhidden\" type=\"checkbox\" checked={!!this.props.enabled} onChange={this.onChange} />\r\n <span className={`${styles.slider} slider`} />\r\n </label>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface CloseOnBlurProps {\r\n onBlur: (clicked: boolean) => void;\r\n}\r\nexport interface CloseOnBlurState {\r\n windowHasFocus: boolean;\r\n componentDidBlur: boolean;\r\n}\r\n\r\nexport class CloseOnBlur extends React.Component<CloseOnBlurProps, CloseOnBlurState> {\r\n private timeoutHandle: any;\r\n public state:Readonly<CloseOnBlurState> = {\r\n windowHasFocus: true,\r\n componentDidBlur: false\r\n };\r\n\r\n public componentWillUnmount() {\r\n window.removeEventListener('blur', this.windowBlur);\r\n clearTimeout(this.timeoutHandle);\r\n }\r\n\r\n private windowBlur = (e: any) => {\r\n this.setState({\r\n windowHasFocus: false\r\n });\r\n }\r\n\r\n private isChild(elementInFocus: any, parent: HTMLDivElement) {\r\n let node = elementInFocus;\r\n while (node) {\r\n if (node === parent) {\r\n return true;\r\n }\r\n node = node.parentNode;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Swaps the execution order of window.blur and component.blur by delaying events by one tick.\r\n * DOM nodes can now be inspected while debugging.\r\n */\r\n private handleBlur = (event: any) => {\r\n const componentDidBlur = !this.isChild(\r\n event.nativeEvent.relatedTarget ? event.nativeEvent.relatedTarget : document.activeElement,\r\n event.currentTarget\r\n );\r\n\r\n this.setState({\r\n componentDidBlur\r\n });\r\n clearTimeout(this.timeoutHandle);\r\n this.timeoutHandle = setTimeout(this.delayedBlurEvent, 1);\r\n }\r\n\r\n private delayedBlurEvent = () => {\r\n\r\n const shouldTriggerOnBlur = this.state.componentDidBlur && this.state.windowHasFocus;\r\n\r\n window.removeEventListener('blur', this.windowBlur);\r\n this.setState({ componentDidBlur: false });\r\n if (shouldTriggerOnBlur) {\r\n this.props.onBlur(false);\r\n }\r\n }\r\n\r\n private handleFocus = (e: React.FormEvent<HTMLDivElement>) => {\r\n window.removeEventListener('blur', this.windowBlur);\r\n window.addEventListener('blur', this.windowBlur);\r\n this.setState({\r\n windowHasFocus: true\r\n });\r\n }\r\n\r\n public render() {\r\n return (<div\r\n onFocus={this.handleFocus}\r\n onBlur={this.handleBlur}\r\n >\r\n {this.props.children}\r\n </div>);\r\n }\r\n}\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdExpandMore = function MdExpandMore(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm27.7 14.3l2.3 2.3-10 10-10-10 2.3-2.3 7.7 7.7z' })\n )\n );\n};\n\nexports.default = MdExpandMore;\nmodule.exports = exports['default'];","import * as React from 'react';\r\nimport debounce from 'lodash/debounce';\r\n\r\ninterface DebouncedFunction extends Function{\r\n cancel:()=>void;\r\n}\r\ninterface DebouncedArgs {\r\n wait?: number;\r\n maxWait?: number;\r\n}\r\nexport function debounceRender<P>(ComponentToDebounce: React.ComponentClass, debounceArgs: DebouncedArgs = {wait: 5, maxWait: 200}) {\r\n class DebouncedContainer extends React.Component<any>{\r\n private requestRender: DebouncedFunction;\r\n\r\n public constructor(props: any) {\r\n super(props);\r\n\r\n this.requestRender = debounce(p => {\r\n this.forceUpdate();\r\n }, debounceArgs.wait, debounceArgs as any);\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.requestRender.cancel();\r\n }\r\n\r\n public shouldComponentUpdate() {\r\n this.requestRender();\r\n return false;\r\n }\r\n\r\n public render(): JSX.Element {\r\n return <ComponentToDebounce { ...this.props } />;\r\n }\r\n }\r\n\r\n return DebouncedContainer;\r\n}\r\n","module.exports = (__webpack_require__(49))(422);","export const ANIMATE_OUT_SPEED = 200;\r\n","module.exports = (__webpack_require__(49))(632);","import * as React from 'react';\r\n\r\nexport interface PermissionProps {\r\n /**\r\n * The permission object to evaluate against\r\n */\r\n permissions: { [x: string]: boolean };\r\n /**\r\n * Single value, or comma-separated list of permissions ALL required for the child component to render\r\n */\r\n requireAll?: string;\r\n /**\r\n * Single value, or comma-separated list of permissions where at least ONE required for the child component to render\r\n */\r\n requireAny?: string;\r\n /**\r\n * Returns the value inside a <li> instead of <div>\r\n */\r\n isListElement?: boolean;\r\n}\r\n/**\r\n * Prevents child components from rendering if required permissions are not present\r\n */\r\nexport class Permission extends React.PureComponent<PermissionProps, any>{\r\n\r\n public render() {\r\n\r\n if (!this.props.permissions){\r\n return null;\r\n }\r\n\r\n if (!!this.props.requireAll &&\r\n this.props.requireAll.split(',').reduce((memo, p) => memo || !this.props.permissions[p], false)) {\r\n return null;\r\n }\r\n\r\n if (!!this.props.requireAny &&\r\n this.props.requireAny.split(',').reduce((memo, p) => memo && !this.props.permissions[p], true)) {\r\n return null;\r\n }\r\n\r\n return this.props.isListElement ?\r\n <li>{this.props.children}</li>\r\n : <div>{this.props.children}</div>;\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"search-external-provider__visuallyhidden--1ihYY\",\"focusable\":\"search-external-provider__focusable--3YVgZ\",\"button-wrapper\":\"search-external-provider__button-wrapper--3ss53\",\"buttonWrapper\":\"search-external-provider__button-wrapper--3ss53\",\"button\":\"search-external-provider__button--1D9zP\",\"error-message\":\"search-external-provider__error-message--39LPd\",\"errorMessage\":\"search-external-provider__error-message--39LPd\",\"warning-message\":\"search-external-provider__warning-message--3eVUH\",\"warningMessage\":\"search-external-provider__warning-message--3eVUH\",\"search-result-container\":\"search-external-provider__search-result-container--NStOF\",\"searchResultContainer\":\"search-external-provider__search-result-container--NStOF\",\"left\":\"search-external-provider__left--3DZ2t\",\"right\":\"search-external-provider__right--2LXsI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"favourite__visuallyhidden--2aOcJ\",\"focusable\":\"favourite__focusable--xKlIn\",\"search-header\":\"favourite__search-header--1phFc\",\"searchHeader\":\"favourite__search-header--1phFc\",\"search-field\":\"favourite__search-field--26BXX\",\"searchField\":\"favourite__search-field--26BXX\",\"ui-search-container\":\"favourite__ui-search-container--3n3RS\",\"uiSearchContainer\":\"favourite__ui-search-container--3n3RS\",\"ui-display-options\":\"favourite__ui-display-options--2lPI4\",\"uiDisplayOptions\":\"favourite__ui-display-options--2lPI4\",\"search-results\":\"favourite__search-results--2CoN6\",\"searchResults\":\"favourite__search-results--2CoN6\",\"drawer-with-bar\":\"favourite__drawer-with-bar--1z848\",\"drawerWithBar\":\"favourite__drawer-with-bar--1z848\",\"embedded-case-listing\":\"favourite__embedded-case-listing--32Aed\",\"embeddedCaseListing\":\"favourite__embedded-case-listing--32Aed\",\"spacer\":\"favourite__spacer--9oLuc\"};","import * as React from 'react';\r\nimport MaArrowDropDown from 'react-icons/lib/md/arrow-drop-down';\r\nimport { SelectItem } from '../types';\r\nimport styles from './option-btn-next-level.scss';\r\n\r\nexport interface OptionBtnNextLevelProps {\r\n item: SelectItem;\r\n onClick: (item: SelectItem) => void;\r\n}\r\n\r\nexport const OptionBtnNextLevel = React.memo((props:OptionBtnNextLevelProps) => {\r\n const onClick = (e: React.FormEvent<HTMLButtonElement>) => {\r\n props.onClick(props.item);\r\n };\r\n\r\n return <button className={`btn ${styles.uiNextLevelBtn}`} type=\"button\" onClick={onClick}>\r\n <MaArrowDropDown className=\"material-icons ui-rotate-270\" />\r\n </button>;\r\n});\r\n","import * as React from 'react';\r\nimport styles from './option-icon.scss';\r\nexport interface OptionIconProps {\r\n iconUrl: string;\r\n}\r\n\r\nexport class OptionIcon extends React.Component<OptionIconProps, any> {\r\n public render() {\r\n const { iconUrl } = this.props;\r\n return <img className={styles.optionIcon} src={iconUrl} />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { OptionIcon } from 'ui/common/select/option/option-icon';\r\nimport { SelectItem } from '../types';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\n\r\nexport interface OptionDescriptionProps {\r\n item: SelectItem;\r\n showIcons: boolean;\r\n selectSymbol?: JSX.Element;\r\n hideSelection?: boolean;\r\n}\r\n\r\nexport class OptionDescription extends React.Component<OptionDescriptionProps, any> {\r\n public render() {\r\n const {\titem, showIcons, selectSymbol, hideSelection } = this.props;\r\n const { value, description, icon } = item;\r\n return <label htmlFor={`select-option-${value}`}\r\n className={`form-check-label ${hideSelection ? 'no-select' : ''} ${(!selectSymbol && !(showIcons && !!icon)) ? 'no-icon' : '' }`}>\r\n {selectSymbol}\r\n <span>\r\n {showIcons && !!icon && <OptionIcon iconUrl={icon} />}\r\n {insertOptionalWordbreaks(description)}\r\n </span>\r\n </label>;\r\n }\r\n}\r\n","// tslint:disable:jsx-no-lambda\r\nimport * as React from 'react';\r\nimport { SelectItem, SelectType } from '../types';\r\nimport { isMultiple } from '../select-type';\r\n\r\nexport interface OptionSelectMarkProps {\r\n item: SelectItem;\r\n isSelected: boolean;\r\n selectType: SelectType;\r\n onSelect: (item: SelectItem) => void;\r\n}\r\n\r\nexport class OptionSelectMark extends React.Component<OptionSelectMarkProps, any> {\r\n\r\n private handleOnChange = (e: React.FormEvent<HTMLInputElement>) => {\r\n this.props.onSelect(this.props.item);\r\n }\r\n\r\n private handleOnKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\r\n if (e.charCode === 13) {\r\n this.props.onSelect(this.props.item);\r\n }\r\n }\r\n\r\n public render() {\r\n const {\r\n selectType,\r\n item: { value },\r\n isSelected\r\n } = this.props;\r\n return <input id={`select-option-${value}`}\r\n type={isMultiple(selectType) ? 'checkbox' : 'radio'}\r\n className=\"form-check-input visuallyhidden\"\r\n checked={isSelected}\r\n onChange={this.handleOnChange}\r\n name={`select-option-${value}`}\r\n onKeyPress={this.handleOnKeyPress}\r\n />;\r\n }\r\n}\r\n","export * from './option-btn-next-level';\r\nexport * from './option-description';\r\nexport * from './option-select-mark';\r\n","module.exports = (__webpack_require__(49))(339);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"regenerate-aggregated-modal__visuallyhidden--24Jse\",\"focusable\":\"regenerate-aggregated-modal__focusable--1_vDj\",\"regenerate-aggregated-modal\":\"regenerate-aggregated-modal__regenerate-aggregated-modal--3HpSU\",\"regenerateAggregatedModal\":\"regenerate-aggregated-modal__regenerate-aggregated-modal--3HpSU\",\"regenerate-aggregated-modal-body\":\"regenerate-aggregated-modal__regenerate-aggregated-modal-body--19NM7\",\"regenerateAggregatedModalBody\":\"regenerate-aggregated-modal__regenerate-aggregated-modal-body--19NM7\",\"loader\":\"regenerate-aggregated-modal__loader--22jbE\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"sort-by-item__visuallyhidden--3Uh1a\",\"focusable\":\"sort-by-item__focusable--31hnk\",\"sort-by-tile\":\"sort-by-item__sort-by-tile--3vMCu\",\"sortByTile\":\"sort-by-item__sort-by-tile--3vMCu\",\"ui-btn-with-icon-small\":\"sort-by-item__ui-btn-with-icon-small--DuLT3\",\"uiBtnWithIconSmall\":\"sort-by-item__ui-btn-with-icon-small--DuLT3\",\"ui-sort-by-type-case-number\":\"sort-by-item__ui-sort-by-type-case-number--3zzKQ\",\"uiSortByTypeCaseNumber\":\"sort-by-item__ui-sort-by-type-case-number--3zzKQ\",\"dropdown\":\"sort-by-item__dropdown--28_9-\",\"sort-meatball-menu\":\"sort-by-item__sort-meatball-menu--3p-76\",\"sortMeatballMenu\":\"sort-by-item__sort-meatball-menu--3p-76\",\"ui-sort-order-type-list\":\"sort-by-item__ui-sort-order-type-list--333jo\",\"uiSortOrderTypeList\":\"sort-by-item__ui-sort-order-type-list--333jo\",\"sort-by-wrapper\":\"sort-by-item__sort-by-wrapper--2TW2D\",\"sortByWrapper\":\"sort-by-item__sort-by-wrapper--2TW2D\",\"ui-sort-by-tile-title\":\"sort-by-item__ui-sort-by-tile-title--2Iyau\",\"uiSortByTileTitle\":\"sort-by-item__ui-sort-by-tile-title--2Iyau\",\"sort-by-tile-top\":\"sort-by-item__sort-by-tile-top--3cbP0\",\"sortByTileTop\":\"sort-by-item__sort-by-tile-top--3cbP0\",\"sort-label\":\"sort-by-item__sort-label--MYka-\",\"sortLabel\":\"sort-by-item__sort-label--MYka-\",\"sort-order-list\":\"sort-by-item__sort-order-list--BCOsV\",\"sortOrderList\":\"sort-by-item__sort-order-list--BCOsV\",\"asc-label\":\"sort-by-item__asc-label--PT2pA\",\"ascLabel\":\"sort-by-item__asc-label--PT2pA\",\"desc-label\":\"sort-by-item__desc-label--1sTVR\",\"descLabel\":\"sort-by-item__desc-label--1sTVR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-codes__visuallyhidden--1DIkd\",\"focusable\":\"display-codes__focusable--2Dluu\",\"code\":\"display-codes__code--DfVly\",\"label\":\"display-codes__label--28tEa\",\"description\":\"display-codes__description--3D-7U\",\"stacked-column\":\"display-codes__stacked-column--15OpJ\",\"stackedColumn\":\"display-codes__stacked-column--15OpJ\",\"primary\":\"display-codes__primary--PZ76P\",\"secondary\":\"display-codes__secondary--BOYWS\",\"invert-strong\":\"display-codes__invert-strong--1-Dj1\",\"invertStrong\":\"display-codes__invert-strong--1-Dj1\",\"strong\":\"display-codes__strong--NDYg8\",\"display-icon-left\":\"display-codes__display-icon-left--6bAi4\",\"displayIconLeft\":\"display-codes__display-icon-left--6bAi4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-codes-hierarchy__visuallyhidden--3PKpK\",\"focusable\":\"display-codes-hierarchy__focusable--1vcOS\",\"code\":\"display-codes-hierarchy__code--14J-6\",\"label\":\"display-codes-hierarchy__label--1Teym\",\"description\":\"display-codes-hierarchy__description--2sT7w\",\"stacked-column\":\"display-codes-hierarchy__stacked-column--2yGiy\",\"stackedColumn\":\"display-codes-hierarchy__stacked-column--2yGiy\",\"primary\":\"display-codes-hierarchy__primary--u_VUV\",\"secondary\":\"display-codes-hierarchy__secondary--ISFLh\",\"invert-strong\":\"display-codes-hierarchy__invert-strong--qStSm\",\"invertStrong\":\"display-codes-hierarchy__invert-strong--qStSm\",\"strong\":\"display-codes-hierarchy__strong--1vMBw\",\"display-icon-left\":\"display-codes-hierarchy__display-icon-left--nuIJZ\",\"displayIconLeft\":\"display-codes-hierarchy__display-icon-left--nuIJZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"new-case-banner__visuallyhidden--3NTOu\",\"focusable\":\"new-case-banner__focusable--QmrnO\",\"new-case-banner\":\"new-case-banner__new-case-banner--1bxN1\",\"newCaseBanner\":\"new-case-banner__new-case-banner--1bxN1\",\"new-case-panel\":\"new-case-banner__new-case-panel--3aY63\",\"newCasePanel\":\"new-case-banner__new-case-panel--3aY63\",\"input-to-bottom\":\"new-case-banner__input-to-bottom--1V46P\",\"inputToBottom\":\"new-case-banner__input-to-bottom--1V46P\",\"new-case-container\":\"new-case-banner__new-case-container--23Sf7\",\"newCaseContainer\":\"new-case-banner__new-case-container--23Sf7\",\"btn-register-new-case\":\"new-case-banner__btn-register-new-case--3-iuQ\",\"btnRegisterNewCase\":\"new-case-banner__btn-register-new-case--3-iuQ\",\"description\":\"new-case-banner__description--z3abW\",\"caseNumberTitle\":\"new-case-banner__caseNumberTitle--xoSzx\"};","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","import get from 'lodash/get';\r\n\r\nexport const RX_MATCH_INTERPOLATE_CONTENT = /\\${{?(.*?)}}?/gi;\r\n\r\n/**\r\n * Replaces occurrences of ES6 template literals within `templateString` with the corresponding data\r\n * from `templateVariables`. Object paths may be used. JavaScript expressions are not supported by design.\r\n * Template and data is decoded for XSS injections.\r\n * \r\n * @param templateString the template string\r\n * @param templateVariables the data context to resolve from\r\n * @param decodeFn Function to strip content in the initial template string\r\n * .defaults to use DOMParser. override this for mocking purposes when testing in node environment\r\n * @param valueEncoder Function to modify or encode each interpolated value.\r\n */\r\nexport const compile = (\r\n templateString: string, \r\n templateVariables: { [k:string]: object | number | string | boolean}, \r\n valueEncoder = (x:string)=>x\r\n) => \r\n \r\n !!templateString \r\n ? \r\n templateString.replace( RX_MATCH_INTERPOLATE_CONTENT, ( _, capturedIdentifier ) => {\r\n const value = get(templateVariables, capturedIdentifier); \r\n return value ? valueEncoder(value as string) : '${' + capturedIdentifier + '}' ;\r\n } \r\n ) \r\n : undefined;\r\n\r\n/**\r\n * Replaces occurrences of ES6 template literals within `templateString` with the value\r\n * returned from the `replacer` function. The `replacer` is invoked once for every template literal occurence.\r\n * \r\n * Template and replacer return values are decoded for XSS injections.\r\n * \r\n * @param templateString the template string\r\n * @param replacer function called for each template literal found. The return value will be the replacement value.\r\n * @param decodeFn defaults to use DOMParser. override this for mocking purposes when testing in node environment\r\n */\r\nexport const compileEach = (templateString: string, replacer: (capturedIdentifier:string) => string) => \r\n !!templateString ? \r\n templateString.replace( RX_MATCH_INTERPOLATE_CONTENT, \r\n (_, capturedIdentifier) => replacer(capturedIdentifier))\r\n : undefined;\r\n","import {LoggedError} from './';\r\n\r\n/**\r\n * Wraps any async action creator body to ensure it dispatches an Error action if anything unexpected happens\r\n * \r\n * Do NOT use this higher order function if you use try-catch inside your action creator, as error stack will be messed up.\r\n */\r\nexport const errorSafe = (actionCreator: any) => {\r\n \r\n const dispatchOnError = async (fn: any, dispatch: any, ...args: any[]) => {\r\n \r\n try {\r\n \r\n await fn(dispatch, ...args);\r\n \r\n } catch (err) {\r\n \r\n dispatch(new LoggedError(err));\r\n \r\n }\r\n };\r\n \r\n return async (dispatch: any, getState: any) => dispatchOnError(actionCreator, dispatch, getState);\r\n};\r\n","export * from './input-control-context';\r\n","export const endpoints = {\r\n optionsCollection: (codetableId: number) => `optionsCollection/${codetableId}/search`,\r\n deleteCodeItem: (codetableId: number, codeId: number) => `optionsCollection/${codetableId}/code/${codeId}`,\r\n optionPath: (codetableId: number, codeId: number) => `optionsCollection/${codetableId}/code/${codeId}/path`\r\n};\r\n","import { ApiResponse } from 'app/types-shared';\r\nimport { RemoteAdminData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport { endpoints } from './endpoints';\r\nimport { CodeListWire, LoadCodeItemsParams } from './types';\r\n\r\nexport const api = {\r\n\r\n loadCodeItems: async (loadParams: LoadCodeItemsParams): Promise<CodeListWire> => {\r\n\r\n const { id, parentId, siblingId, categoryId, query, displayNotSelected, startIndex, maxResults } = loadParams;\r\n\r\n const response = await new RemoteAdminData(endpoints.optionsCollection(id)).resource<Response>()\r\n .filter({\r\n ...(startIndex !== undefined && { startIndex }),\r\n ...(maxResults !== undefined && { maxResults }),\r\n ...(parentId !== undefined && { parentId }),\r\n ...(siblingId !== undefined && { siblingId }),\r\n ...(displayNotSelected !== undefined && { displayNotSelected })\r\n })\r\n .create({\r\n fieldOptions: {\r\n includeCodeDataOnly: true\r\n },\r\n searchParams: {\r\n ...(!!query && {\r\n query: {\r\n text: query\r\n }\r\n }),\r\n ...(categoryId !== undefined && {\r\n category: {\r\n id: categoryId\r\n }\r\n })\r\n }\r\n\r\n });\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n loadPath: async (codetableId: number, codeId: number): Promise<CodetableWireFormat> => {\r\n\r\n const response = await new RemoteAdminData(endpoints.optionPath(codetableId, codeId))\r\n .resource<ApiResponse<CodetableWireFormat>>()\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n deleteCodeItem: async (codetableId: number, codeId: number): Promise<any> => {\r\n return await new RemoteAdminData(endpoints.deleteCodeItem(codetableId, codeId))\r\n .resource<ApiResponse<any>>()\r\n .httpDelete({});\r\n }\r\n\r\n};\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdKeyboardArrowRight = function MdKeyboardArrowRight(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm14.3 27.3l7.7-7.7-7.7-7.7 2.3-2.3 10 10-10 10z' })\n )\n );\n};\n\nexports.default = MdKeyboardArrowRight;\nmodule.exports = exports['default'];","module.exports = (__webpack_require__(49))(231);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaInfo = function FaInfo(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm27.3 30v2.9q0 0.5-0.4 1t-1 0.4h-11.5q-0.6 0-1-0.4t-0.4-1v-2.9q0-0.6 0.4-1t1-0.4h1.5v-8.6h-1.5q-0.6 0-1-0.4t-0.4-1v-2.9q0-0.6 0.4-1t1-0.4h8.6q0.6 0 1 0.4t0.4 1v12.9h1.5q0.5 0 1 0.4t0.4 1z m-2.9-25.7v4.3q0 0.6-0.4 1t-1 0.4h-5.7q-0.6 0-1-0.4t-0.4-1v-4.3q0-0.6 0.4-1t1-0.4h5.7q0.6 0 1 0.4t0.4 1z' })\n )\n );\n};\n\nexports.default = FaInfo;\nmodule.exports = exports['default'];","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\n\r\nimport { CaseData, ApiResponse, CasePermissions, BowtieSupported, SurveyManagerSupportedData } from 'app/types-shared';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\nimport { RiskMatrixDefinition } from 'app/area/case/types-store';\r\n\r\nexport const api = {\r\n caseRiskMatrixDefinition: async (caseTypeId: number): Promise<RiskMatrixDefinition> => {\r\n\r\n //TODO: use ETag caching for ui-definitions\r\n const response = await new RemoteData(endpoint.riskMatrix).resource<ApiResponse<RiskMatrixDefinition>>()\r\n .withId(caseTypeId)\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n case: async (id: number): Promise<CaseData> => {\r\n\r\n //TODO: use ETag caching for data\r\n const response = await new RemoteData(endpoint.case).resource<ApiResponse<CaseData>>()\r\n .withId(id)\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n casePermissions: async (id: number): Promise<CasePermissions> => {\r\n\r\n const response = await new RemoteData(endpoint.casePermissions).resource<ApiResponse<CasePermissions[]>>()\r\n .filter({ caseId: id })\r\n .single();\r\n \r\n return response.data[0];\r\n },\r\n\r\n bowtieSupported: async (id: number): Promise<BowtieSupported> => {\r\n\r\n const response = await new RemoteData(endpoint.bowtieSupported).resource<ApiResponse<BowtieSupported[]>>()\r\n .filter({ caseId: id })\r\n .single();\r\n\r\n return response.data[0];\r\n },\r\n\r\n deleteCase: async (caseId: number) => {\r\n return new RemoteData(endpoint.case)\r\n .resource<ApiResponse<CaseData>>()\r\n .withId(caseId)\r\n .httpDelete(caseId);\r\n },\r\n\r\n surveyManagerSupported: async (id: number): Promise<SurveyManagerSupportedData> => {\r\n \r\n const response = await new RemoteData(endpoint.surveyManagerSupported).resource<ApiResponse<SurveyManagerSupportedData[]>>()\r\n .filter({ caseId: id })\r\n .single();\r\n\r\n return await response.data[0] as any;\r\n }\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"dashboard__visuallyhidden--16JzR\",\"focusable\":\"dashboard__focusable--33QJW\",\"dashboard-view\":\"dashboard__dashboard-view--16gyl\",\"dashboardView\":\"dashboard__dashboard-view--16gyl\",\"dashboard\":\"dashboard__dashboard--2Z1I5\",\"favourites-wrapper\":\"dashboard__favourites-wrapper--1k32e\",\"favouritesWrapper\":\"dashboard__favourites-wrapper--1k32e\",\"favourites-layout\":\"dashboard__favourites-layout--3uFpR\",\"favouritesLayout\":\"dashboard__favourites-layout--3uFpR\",\"favourites-layout-expander\":\"dashboard__favourites-layout-expander--3jXIh\",\"favouritesLayoutExpander\":\"dashboard__favourites-layout-expander--3jXIh\",\"header-container\":\"dashboard__header-container--1L2Yt\",\"headerContainer\":\"dashboard__header-container--1L2Yt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tabs__visuallyhidden--3Ym7y\",\"focusable\":\"tabs__focusable--ZhkD-\",\"tabs\":\"tabs__tabs--1ZmVh\",\"tabs-container\":\"tabs__tabs-container--1EoBn\",\"tabsContainer\":\"tabs__tabs-container--1EoBn\",\"selectable\":\"tabs__selectable--3Mm_L\",\"active\":\"tabs__active--1uPDb\",\"read-only-active\":\"tabs__read-only-active--2eMct\",\"readOnlyActive\":\"tabs__read-only-active--2eMct\",\"read-only\":\"tabs__read-only--24Wik\",\"readOnly\":\"tabs__read-only--24Wik\",\"content\":\"tabs__content--pymgE\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"indicator\":\"scroll-container__indicator--2Eeso\",\"vertical\":\"scroll-container__vertical--1VqII\",\"horizontal\":\"scroll-container__horizontal--ly50S\",\"start\":\"scroll-container__start--6sUJN\",\"end\":\"scroll-container__end--3BNuD\",\"container\":\"scroll-container__container--1pg5y\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tab-container__visuallyhidden--2JQjk\",\"focusable\":\"tab-container__focusable--nz0kk\",\"tab-panel\":\"tab-container__tab-panel--2fYgg\",\"tabPanel\":\"tab-container__tab-panel--2fYgg\",\"tab-section-wrapper\":\"tab-container__tab-section-wrapper--eEfiD\",\"tabSectionWrapper\":\"tab-container__tab-section-wrapper--eEfiD\",\"switch-view-button\":\"tab-container__switch-view-button--1UxGC\",\"switchViewButton\":\"tab-container__switch-view-button--1UxGC\",\"tab-section\":\"tab-container__tab-section--2gaXP\",\"tabSection\":\"tab-container__tab-section--2gaXP\",\"mobile-toggle\":\"tab-container__mobile-toggle--n_Azd\",\"mobileToggle\":\"tab-container__mobile-toggle--n_Azd\",\"btn-arrow-left\":\"tab-container__btn-arrow-left--192-a\",\"btnArrowLeft\":\"tab-container__btn-arrow-left--192-a\",\"btn-label\":\"tab-container__btn-label--soFjO\",\"btnLabel\":\"tab-container__btn-label--soFjO\",\"slideInText\":\"tab-container__slideInText--z2Q5D\",\"with-closed-menu\":\"tab-container__with-closed-menu--2OXjP\",\"withClosedMenu\":\"tab-container__with-closed-menu--2OXjP\",\"animate-out\":\"tab-container__animate-out--2yBOx\",\"animateOut\":\"tab-container__animate-out--2yBOx\",\"mobile-background\":\"tab-container__mobile-background--2ogA9\",\"mobileBackground\":\"tab-container__mobile-background--2ogA9\",\"fadeIn\":\"tab-container__fadeIn--HsDLY\",\"fadeOut\":\"tab-container__fadeOut--19DLV\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-option-button__visuallyhidden--1SmaP\",\"focusable\":\"select-option-button__focusable--2zCuI\",\"select-code-btn\":\"select-option-button__select-code-btn--1w2gH\",\"selectCodeBtn\":\"select-option-button__select-code-btn--1w2gH\",\"select-code-btn-icon\":\"select-option-button__select-code-btn-icon--5QB8X\",\"selectCodeBtnIcon\":\"select-option-button__select-code-btn-icon--5QB8X\",\"select-code-btn-title\":\"select-option-button__select-code-btn-title--1vsB0\",\"selectCodeBtnTitle\":\"select-option-button__select-code-btn-title--1vsB0\",\"select-folder\":\"select-option-button__select-folder--Z_NT1\",\"selectFolder\":\"select-option-button__select-folder--Z_NT1\",\"select-option-checkbox\":\"select-option-button__select-option-checkbox--3dvxR\",\"selectOptionCheckbox\":\"select-option-button__select-option-checkbox--3dvxR\",\"not-checked\":\"select-option-button__not-checked--1GCOD\",\"notChecked\":\"select-option-button__not-checked--1GCOD\",\"is-checked\":\"select-option-button__is-checked--3w4EL\",\"isChecked\":\"select-option-button__is-checked--3w4EL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"risk-matrix__visuallyhidden--1vRNe\",\"focusable\":\"risk-matrix__focusable--2teXV\",\"matrix-container\":\"risk-matrix__matrix-container--3mRal\",\"matrixContainer\":\"risk-matrix__matrix-container--3mRal\",\"static-height\":\"risk-matrix__static-height--RjpsO\",\"staticHeight\":\"risk-matrix__static-height--RjpsO\",\"info-text\":\"risk-matrix__info-text--3EsLq\",\"infoText\":\"risk-matrix__info-text--3EsLq\",\"circle-wrapper\":\"risk-matrix__circle-wrapper--28fPz\",\"circleWrapper\":\"risk-matrix__circle-wrapper--28fPz\",\"text-wrapper\":\"risk-matrix__text-wrapper--1ai_5\",\"textWrapper\":\"risk-matrix__text-wrapper--1ai_5\",\"read-only-cell-text\":\"risk-matrix__read-only-cell-text--3oVzc\",\"readOnlyCellText\":\"risk-matrix__read-only-cell-text--3oVzc\",\"selected-cell-text\":\"risk-matrix__selected-cell-text--_JrSI\",\"selectedCellText\":\"risk-matrix__selected-cell-text--_JrSI\",\"cell-text\":\"risk-matrix__cell-text--XtJjI\",\"cellText\":\"risk-matrix__cell-text--XtJjI\",\"tooltip-wrapper\":\"risk-matrix__tooltip-wrapper--TfRmE\",\"tooltipWrapper\":\"risk-matrix__tooltip-wrapper--TfRmE\",\"wrapper\":\"risk-matrix__wrapper--3bdUM\",\"has-child-errors\":\"risk-matrix__has-child-errors--2I29S\",\"hasChildErrors\":\"risk-matrix__has-child-errors--2I29S\",\"has-child-warnings\":\"risk-matrix__has-child-warnings--3DvCb\",\"hasChildWarnings\":\"risk-matrix__has-child-warnings--3DvCb\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"list-view-folder__visuallyhidden--2LzeL\",\"focusable\":\"list-view-folder__focusable--xYycs\",\"list-view-folder\":\"list-view-folder__list-view-folder--1JM7u\",\"listViewFolder\":\"list-view-folder__list-view-folder--1JM7u\",\"list-view-folder-main-content\":\"list-view-folder__list-view-folder-main-content--CB1OI\",\"listViewFolderMainContent\":\"list-view-folder__list-view-folder-main-content--CB1OI\",\"list-view-folder-title\":\"list-view-folder__list-view-folder-title--pGTrW\",\"listViewFolderTitle\":\"list-view-folder__list-view-folder-title--pGTrW\",\"list-view-folder-active\":\"list-view-folder__list-view-folder-active--1MtU5\",\"listViewFolderActive\":\"list-view-folder__list-view-folder-active--1MtU5\",\"list-view-folder-icon\":\"list-view-folder__list-view-folder-icon--1Si7D\",\"listViewFolderIcon\":\"list-view-folder__list-view-folder-icon--1Si7D\",\"list-view-folder-arrow\":\"list-view-folder__list-view-folder-arrow--eH9Or\",\"listViewFolderArrow\":\"list-view-folder__list-view-folder-arrow--eH9Or\",\"icon\":\"list-view-folder__icon--2BIoK\"};","import * as React from 'react';\r\nimport { Button } from './button';\r\n\r\nimport styles from './add-button.scss';\r\n\r\nexport interface AddButtonProps {\r\n icon: React.ComponentClass<any> | React.SFC<any>;\r\n onClick: (event: any) => void;\r\n required?: boolean;\r\n children?: React.ReactNode;\r\n disabled?: boolean;\r\n}\r\n\r\nexport const AddButton = (props:AddButtonProps) => {\r\n const Icon = props.icon;\r\n const required = props.required;\r\n\r\n return (\r\n <div className=\"add-button\">\r\n {required && <span className=\"asterisk-required\">* </span>}\r\n <Button\r\n btnType={styles.addButton}\r\n onClick={props.onClick}\r\n disabled={props.disabled}>\r\n {props.icon && <span className={`${styles.iconStyle}`}><Icon /></span>}\r\n <span className={`${styles.addButtonText}`}>{props.children}</span>\r\n </Button>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport styles from './overlay.scss';\r\n\r\nexport interface WithOverlayProps {\r\n displayOverlay: boolean;\r\n overlayText: string;\r\n}\r\n\r\nexport class OverlayComponent extends React.PureComponent<WithOverlayProps, any> {\r\n private keyEvent = (e: React.SyntheticEvent<any>) => {\r\n if (this.props.displayOverlay) {\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n public render() {\r\n return (<div onKeyDown={this.keyEvent}>\r\n {this.props.displayOverlay && <div className={styles.overlay}>\r\n <div className={`${styles.iconAsBg} ${styles.spinLoader}`} />\r\n <h1>{this.props.overlayText}</h1>\r\n <div className={styles.overlayBg} />\r\n </div>}\r\n {this.props.children}\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { withRouter, InjectedRouter, PlainRoute } from 'react-router';\r\nimport hoistStatics from 'hoist-non-react-statics';\r\nimport { Location } from 'History';\r\nimport get from 'lodash/get';\r\n\r\nexport interface PromptProps {\r\n continue: (e: React.SyntheticEvent<any>) => void;\r\n cancel: () => void;\r\n shouldDisplayModal: boolean;\r\n}\r\n\r\nexport interface WithPromptProps {\r\n wrappedComponentRef: () => any;\r\n shouldPrompt: boolean;\r\n promptText: string;\r\n onContinue?: () => void;\r\n route: PlainRoute;\r\n router: InjectedRouter & {location:Location};\r\n}\r\nexport interface WithPromptState {\r\n pendingRoute?: Location;\r\n internal?: Boolean;\r\n}\r\nexport const withPrompt = (Component: any) => {\r\n\r\n const ComponentWithPrompt = class PromptUnsavedComponent extends React.PureComponent<WithPromptProps, WithPromptState> {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {};\r\n }\r\n /**\r\n * Newer browsers does not show the error message due to security reasons\r\n */\r\n private onAppClose = (e: any) => {\r\n if (this.state.pendingRoute || !this.props.shouldPrompt) {\r\n return undefined;\r\n }\r\n const message = this.props.promptText;\r\n if (e) {\r\n e.returnValue = message;\r\n }\r\n return message;\r\n }\r\n\r\n private onLeave = (route: Location) => {\r\n // 16.4 HACK for connected cases - must be cleaned up as separate user story\r\n const isBackFromConnectedCase = get(route,'action') === 'POP' && get(this.props, 'router.location.query.connectionTypeId');\r\n const navigatingInterally = get(route, 'state.internal') && !isBackFromConnectedCase;\r\n if (this.state.pendingRoute || !this.props.shouldPrompt || navigatingInterally) {\r\n // do not prompt\r\n return true;\r\n }\r\n this.setState({ pendingRoute: route });\r\n return false;\r\n }\r\n\r\n private continue = () => {\r\n\r\n if (this.props.onContinue) {\r\n this.props.onContinue();\r\n }\r\n const {router} = this.props;\r\n const pendingRoute = this.state.pendingRoute || {} as Location;\r\n const nextRoute = pendingRoute.pathname + pendingRoute.search;\r\n const action = get(this.state, 'pendingRoute.action');\r\n // TODO: investigate the underlying design problem\r\n // The history frame is \"duplicated\" into next history stack frame by connected cases with\r\n // a replace(), when returning from the newly connected case:\r\n // Initially, a history push is needed to open the connected case type selector (support browser-back from select modal).\r\n // Once you come back from a new CC we only want unique entries in the stack.\r\n const method:string = action === 'PUSH' ? 'push' : 'replace';\r\n router[method](nextRoute);\r\n this.setState({ pendingRoute: undefined });\r\n }\r\n\r\n private cancel = () => {\r\n this.setState({ pendingRoute: undefined });\r\n // required to restore the url\r\n this.props.router.replace(this.props.router.location);\r\n }\r\n\r\n public componentDidMount() {\r\n window.addEventListener('beforeunload', this.onAppClose);\r\n\r\n this\r\n .props\r\n .router\r\n .setRouteLeaveHook(this.props.route, this.onLeave);\r\n }\r\n\r\n public componentWillUnmount() {\r\n window.removeEventListener('beforeunload', this.onAppClose);\r\n }\r\n\r\n public render() {\r\n const { wrappedComponentRef, ...remainingProps } = this.props;\r\n return <Component\r\n continue={this.continue}\r\n cancel={this.cancel}\r\n shouldDisplayModal={!!this.state.pendingRoute}\r\n {...remainingProps}\r\n ref={wrappedComponentRef} />;\r\n }\r\n };\r\n\r\n return hoistStatics(withRouter(ComponentWithPrompt), Component);\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue } from '../types';\r\nimport MdHome from 'react-icons/lib/md/home';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\nimport './breadcrumb-item.scss';\r\n\r\nexport type BreadcrumbValue = ComplexValue<number>;\r\n\r\nexport interface BreadcrumbItemProps {\r\n item: BreadcrumbValue;\r\n onClickItem: (item: BreadcrumbValue) => void;\r\n last: boolean;\r\n home?: boolean;\r\n onClickBreadcrumbHome?: () => void;\r\n}\r\n\r\nexport const BreadcrumbItem = (props: BreadcrumbItemProps) => {\r\n const onItemClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\r\n e.preventDefault();\r\n props.onClickItem(props.item);\r\n };\r\n\r\n if (props.home || props.item.description === '') {\r\n return <li className=\"breadcrumb-item breadcrumb-home\">\r\n {<a href=\"#\" onClick={onItemClick} className=\"standalone-link\"><MdHome /></a>}\r\n </li>;\r\n }\r\n\r\n return <li className=\"breadcrumb-item\">\r\n {\r\n props.last\r\n ? insertOptionalWordbreaks(props.item.description)\r\n : <a href=\"#\" className=\"standalone-link\" onClick={onItemClick}>{insertOptionalWordbreaks(props.item.description)}</a>\r\n }\r\n </li>;\r\n};\r\n","import * as React from 'react';\r\nimport { BreadcrumbValue, BreadcrumbItem } from './breadcrumb-item';\r\n\r\nexport interface BreadcrumbProps {\r\n items: BreadcrumbValue[];\r\n onClickItem: (item: BreadcrumbValue) => void;\r\n home?: boolean;\r\n onClickBreadcrumbHome?: () => void;\r\n}\r\n\r\ninterface RenderBreadcrumbProps {\r\n item?: BreadcrumbValue;\r\n index?: number;\r\n}\r\n\r\nexport class Breadcrumb extends React.Component<BreadcrumbProps, any> {\r\n\r\n private renderItem = ({ item, index }: RenderBreadcrumbProps) => {\r\n return <BreadcrumbItem\r\n key={item.value}\r\n item={item}\r\n onClickItem={this.props.onClickItem}\r\n last={index + 1 === this.props.items.length} />;\r\n }\r\n\r\n private renderHome = () => {\r\n return <BreadcrumbItem\r\n home={this.props.home}\r\n key={'home'}\r\n item={undefined}\r\n onClickItem={this.props.onClickBreadcrumbHome}\r\n last={this.props.items.length === 0} />;\r\n }\r\n\r\n public render() {\r\n const { items, home } = this.props;\r\n return (<ol className=\"breadcrumb\">\r\n {home ? this.renderHome() : null}\r\n {items.map((item, index) => this.renderItem({ item, index }))}\r\n </ol>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport hoistStatics from 'hoist-non-react-statics';\r\nimport { DropdownMenuContext } from './types';\r\nimport * as PropTypes from 'prop-types';\r\n\r\nexport const withDropdownMenu = (Component: any) => {\r\n\r\n class ComponentWithDropdown extends React.Component<any, any> {\r\n\r\n public static contextTypes: React.ValidationMap<DropdownMenuContext> = {\r\n handleDropdownHide: PropTypes.func\r\n };\r\n\r\n public render() {\r\n const { wrappedComponentRef, ...remainingProps } = this.props;\r\n return <Component\r\n {...remainingProps}\r\n handleDropdownHide={this.context.handleDropdownHide}\r\n ref={wrappedComponentRef} />;\r\n }\r\n }\r\n\r\n return hoistStatics(ComponentWithDropdown, Component);\r\n};\r\n","export { DropdownMenu } from './dropdown-menu';\r\nexport { MeatballMenu } from './meatball-menu';\r\nexport { withDropdownMenu } from './with-dropdown-menu';\r\n","import { AppSetting } from 'dependencies/appsettings';\r\nimport { TOKEN_KEY, ID_TOKEN_KEY } from 'app/constants';\r\nimport { globalVar } from 'app/infrastructure/universal';\r\n\r\ninterface TokenStorage {\r\n getItem: (key: string) => string;\r\n setItem: (key: string, value: string) => void;\r\n removeItem: (key: string) => void;\r\n}\r\n\r\nclass NonPersistedStorage implements TokenStorage {\r\n private cache: Map<string, string> = new Map();\r\n\r\n public getItem = (key: string) => this.cache.get(key);\r\n public setItem = (key: string, value: string) => this.cache.set(key, value);\r\n public removeItem = (key: string) => this.cache.delete(key);\r\n}\r\n\r\nclass PersistedStorage implements TokenStorage {\r\n private cache: any = globalVar('localStorage', new NonPersistedStorage());\r\n\r\n public getItem = (key: string) => this.cache.getItem(key);\r\n public setItem = (key: string, value: string) => this.cache.setItem(key, value);\r\n public removeItem = (key: string) => this.cache.removeItem(key);\r\n}\r\n\r\nconst storage: TokenStorage = !!AppSetting.UseLocalStorageTokenCache ?\r\n new PersistedStorage() :\r\n new NonPersistedStorage();\r\n\r\nexport const getAccessToken = () => storage.getItem(TOKEN_KEY);\r\n\r\n/**\r\n * The id_token is **only** used for sign-out requests\r\n */\r\nexport const getIdToken = () => storage.getItem(ID_TOKEN_KEY);\r\n\r\nexport const clearCachedToken = () => {\r\n storage.removeItem(TOKEN_KEY);\r\n storage.removeItem(ID_TOKEN_KEY);\r\n};\r\n\r\nexport const cacheAccessToken = (token: string) => storage.setItem(TOKEN_KEY, token);\r\n\r\n/**\r\n * The id_token is **only** used for sign-out requests\r\n */\r\nexport const cacheIdToken = (token: string) => storage.setItem(ID_TOKEN_KEY, token);\r\n\r\nexport const hasToken = () => !!getAccessToken();\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdExpandLess = function MdExpandLess(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 13.4l10 10-2.3 2.3-7.7-7.7-7.7 7.7-2.3-2.3z' })\n )\n );\n};\n\nexports.default = MdExpandLess;\nmodule.exports = exports['default'];","import * as React from 'react';\r\nimport styles from './expander-background.scss';\r\n\r\nexport interface DetailsExpanderProps {\r\n onClick: () => void;\r\n}\r\n\r\nexport const ExpanderBackground: React.SFC<DetailsExpanderProps> = ({onClick}) => {\r\n return (\r\n <div>\r\n <div tabIndex={0} className={styles.expanderBackground} onClick={onClick} onFocus={onClick}/>\r\n </div>\r\n );\r\n};\r\n","import { StoreItemPath } from 'app/types-shared';\r\nimport { getEntityTypeFromPath } from 'app/infrastructure/store/entity';\r\n\r\n/**\r\n * Because data can be structured differently from how components are placed in their hierarchy, e.g. with intermediate non-key components,\r\n * it is necessary to combine the data path with the key values in the component hierarchy to produce the actual store path.\r\n * @param entityTypePath The data path describes the keys that an object needs and the order in which they are expected.\r\n * @param componentPath The component path describes the physical location in the component hierarchy, with key values.\r\n */\r\nexport const getStorePath = (\r\n entityTypePath: string[], \r\n componentPath: StoreItemPath[], \r\n allowUnmatchedIds: boolean = false): StoreItemPath[] => {\r\n\r\n if (!entityTypePath) {\r\n return undefined;\r\n }\r\n\r\n const entityType = getEntityTypeFromPath(entityTypePath);\r\n\r\n // A component will always have a context within the form.\r\n const path = componentPath.slice().reverse();\r\n const parentPath = [];\r\n \r\n // The data path must be matched with concrete ids from the current component path.\r\n entityTypePath.slice().map((pathType, index) => {\r\n\r\n const pathIndex = path.findIndex(c => Object.keys(c)[0].toLowerCase() === pathType.toLowerCase());\r\n // The first match, if found, is used as the key for that level.\r\n if (pathIndex > -1) {\r\n parentPath.push(path[pathIndex]);\r\n } \r\n // The only entity that we allow no match for is the current, because this is possible to calculate when adding children.\r\n // All other unmatched items indicate misconfiguration.\r\n else if (!allowUnmatchedIds && pathType !== entityType) {\r\n throw new Error(\r\n `Could not find a match for the data path item ${entityType} \r\n in component path ${JSON.stringify(componentPath)}. Check configuration.`\r\n );\r\n }\r\n });\r\n \r\n return parentPath;\r\n};\r\n","module.exports = (__webpack_require__(49))(367);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"selection-report__visuallyhidden--3tfyo\",\"focusable\":\"selection-report__focusable--3l8NP\",\"selection-report-view\":\"selection-report__selection-report-view--3Jg8X\",\"selectionReportView\":\"selection-report__selection-report-view--3Jg8X\",\"openFilters\":\"selection-report__openFilters--1t1f9\",\"closeFilters\":\"selection-report__closeFilters--2QiCS\",\"selection-report\":\"selection-report__selection-report--1VaXo\",\"selectionReport\":\"selection-report__selection-report--1VaXo\",\"table-wrapper\":\"selection-report__table-wrapper--2mH5K\",\"tableWrapper\":\"selection-report__table-wrapper--2mH5K\"};","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface KeepFocusOnElementComponentProps { }\r\n\r\ninterface KeepFocusOnElementComponentState {\r\n hasFocus: boolean;\r\n }\r\n\r\nclass KeepFocusOnElementComponent extends React.Component<KeepFocusOnElementComponentProps, KeepFocusOnElementComponentState> {\r\n private divRef: HTMLDivElement;\r\n public state: Readonly<KeepFocusOnElementComponentState> = {\r\n hasFocus: false\r\n };\r\n\r\n private handleFocus = () => {\r\n this.setState({\r\n hasFocus: true\r\n });\r\n }\r\n private handleBlur = () => {\r\n this.setState({\r\n hasFocus: false\r\n });\r\n }\r\n\r\n public componentDidUpdate() {\r\n if (this.state.hasFocus) {\r\n const el:any = ReactDOM.findDOMNode(this);\r\n if (!el.contains(document.activeElement)) {\r\n !!this.divRef && this.divRef.focus();\r\n }\r\n }\r\n }\r\n\r\n private setDivRef = (el: HTMLDivElement) => {\r\n this.divRef = el;\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (<div\r\n onFocus={this.handleFocus}\r\n onBlur={this.handleBlur}\r\n ref={this.setDivRef}\r\n tabIndex={-1}\r\n >\r\n {this.props.children}\r\n </div>);\r\n }\r\n}\r\n\r\nexport const KeepFocusOnElement = KeepFocusOnElementComponent;\r\n","import * as React from 'react';\r\nimport { ElementLoader } from '../element-loader/element-loader';\r\nimport { Switch } from 'ui/common/switch/switch';\r\nimport {\r\n SelectExpander,\r\n Footer\r\n} from 'ui/common/dialog-expander';\r\nimport { CloseButton } from 'ui';\r\nimport styles from './select-options-expander.scss';\r\nimport { KeepFocusOnElement } from '../keep-focus-on-element';\r\n\r\nexport interface SelectOptionsExpanderTexts {\r\n title: string;\r\n loadError: string;\r\n notFound: string;\r\n done: string;\r\n searchRequired: string;\r\n}\r\n\r\nexport interface SelectOptionsExpanderProps {\r\n onClose: () => void;\r\n loadingOptions: boolean;\r\n loadOptionsError?: boolean;\r\n texts: SelectOptionsExpanderTexts;\r\n doNotRenderExpander?: boolean;\r\n switchLongDescriptionAvailable: boolean;\r\n showLongDescription: boolean;\r\n onShowLongDescription: (enabled: boolean) => void;\r\n notEnoughInputWhenSearchRequired?: boolean;\r\n}\r\n\r\nconst SelectOptionsExpanderComponent: React.SFC<SelectOptionsExpanderProps> = (props) => {\r\n const {\r\n onClose, loadingOptions, texts, children, loadOptionsError, switchLongDescriptionAvailable,\r\n showLongDescription, onShowLongDescription\r\n } = props;\r\n const searchRequiredMessage = props.notEnoughInputWhenSearchRequired && styles.searchRequiredMessage;\r\n const dialogContent = (\r\n loadingOptions\r\n ? <ElementLoader />\r\n : children\r\n ? children\r\n : (\r\n <div className={`${styles.optionsMessage} ${searchRequiredMessage}`}>\r\n {props.notEnoughInputWhenSearchRequired ? texts.searchRequired :\r\n loadOptionsError ? texts.loadError : texts.notFound\r\n } \r\n </div>\r\n )\r\n );\r\n\r\n if (props.doNotRenderExpander) {\r\n return <div className={styles.noExpander}>{dialogContent}</div>;\r\n }\r\n\r\n const switchButton = switchLongDescriptionAvailable\r\n && <Switch className={styles.selectSwitch}\r\n enabled={showLongDescription}\r\n onChange={onShowLongDescription}\r\n />;\r\n\r\n const hasSwitchStyles = switchLongDescriptionAvailable ? styles.hasSwitch : '';\r\n\r\n return (\r\n <SelectExpander className={`${styles.dialogExpander} ${hasSwitchStyles}`}>\r\n <div className={`row justify-content-end ${styles.selectHeader}`}>\r\n <div className=\"col col-auto\">{switchButton}</div>\r\n <div className=\"col col-auto\"><CloseButton onClick={onClose} autofocus={false} /></div>\r\n </div>\r\n <KeepFocusOnElement>\r\n {dialogContent}\r\n </KeepFocusOnElement>\r\n <Footer onClose={onClose} textDone={texts.done} />\r\n </SelectExpander>\r\n );\r\n};\r\n\r\nSelectOptionsExpanderComponent.displayName = 'SelectOptionsExpander'; // Added it to fix test.\r\nexport const SelectOptionsExpander = SelectOptionsExpanderComponent;\r\n","import * as React from 'react';\r\nimport FaCaretDown from 'react-icons/lib/fa/caret-down';\r\nimport { ButtonInputGroup } from '../button';\r\nimport styles from './select-input.scss';\r\nimport Textarea, { TextareaAutosizeProps } from 'react-textarea-autosize';\r\nimport { withForceUpdateConsumer } from 'ui/common/force-update-terminal';\r\nimport { removeSoftHyphens } from 'app/infrastructure/platform';\r\n\r\nconst TextareaWithForceUpdateConsumer = withForceUpdateConsumer<TextareaAutosizeProps>(Textarea);\r\n\r\nexport interface SelectInputProps {\r\n inputValue: string;\r\n placeholder: string;\r\n onChange: (value: string, openOptionsView?: boolean) => void;\r\n onFocus?: (inputOffsetLeft: number) => void;\r\n onBlur?: () => void;\r\n onOpenOptions?: (onOpenOptionsButtonOffsetLeft: number) => void;\r\n focus?: boolean;\r\n readOnly?: boolean;\r\n disabled?: boolean;\r\n hasSelectedOptions?: boolean;\r\n inputRef?: (node: HTMLTextAreaElement) => void;\r\n}\r\n\r\nexport interface SelectInputState {\r\n hasFocus: boolean;\r\n}\r\n\r\nexport class SelectInput extends React.PureComponent<SelectInputProps, SelectInputState> {\r\n public state: Readonly<SelectInputState> = {\r\n hasFocus: false\r\n };\r\n\r\n private onOpenOptions = (e: React.FormEvent<HTMLSpanElement>) => {\r\n const currentTarget = e.currentTarget;\r\n this.props.onOpenOptions(currentTarget.offsetLeft);\r\n }\r\n\r\n private onFocus = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n const currentTarget = e.currentTarget;\r\n this.setState({\r\n hasFocus: true\r\n }, () => {\r\n this.props.onFocus && this.props.onFocus(currentTarget.offsetLeft);\r\n });\r\n }\r\n\r\n private onBlur = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n this.setState({ hasFocus: false });\r\n this.props.onBlur && this.props.onBlur();\r\n }\r\n\r\n private renderOpenOptions = () => {\r\n if (!this.props.onOpenOptions) {\r\n return null;\r\n }\r\n return (\r\n <span className=\"input-group-btn\">\r\n <ButtonInputGroup disabled={this.props.readOnly} onClick={this.onOpenOptions} icon={FaCaretDown} />\r\n </span>\r\n );\r\n }\r\n\r\n private onChange = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n const currentTarget = e.currentTarget;\r\n this.props.onChange(removeSoftHyphens(currentTarget.value));\r\n }\r\n public render() {\r\n const { placeholder, focus, readOnly, inputValue, hasSelectedOptions, inputRef } = this.props;\r\n const {\r\n hasSelectedOptionsStyle,\r\n readOnlyStyle,\r\n textarea\r\n } = styles;\r\n return (\r\n <div className={`input-group\r\n ${readOnly ? readOnlyStyle : ''}\r\n ${hasSelectedOptions ? hasSelectedOptionsStyle : ''}`}>\r\n <div className={`form-control\r\n ${this.state.hasFocus ? 'form-control-focus' : ''}`}\r\n >\r\n <TextareaWithForceUpdateConsumer\r\n autoFocus={focus}\r\n className={textarea}\r\n placeholder={placeholder}\r\n onChange={this.onChange}\r\n onFocus={this.onFocus}\r\n onBlur={this.onBlur}\r\n disabled={readOnly}\r\n value={removeSoftHyphens(inputValue || '')}\r\n maxLength={254}\r\n inputRef={inputRef}\r\n />\r\n </div>\r\n {this.renderOpenOptions()}\r\n </div>\r\n );\r\n }\r\n}\r\n","export const selectCommonDefaultProps = {\r\n minLength: 2,\r\n showIcons: true,\r\n loadOptions: { query: '' },\r\n longDescription: true,\r\n isOpen: false,\r\n readOnly: false\r\n};\r\n\r\nexport const selectCommonDefaultState = {\r\n inputValue: '',\r\n indexOfFocusedOption: -1,\r\n showLongDescription: false\r\n};\r\n\r\nexport const minLengthToExecuteSearch = 2;\r\n\r\n/** \r\n * numberOfLevels determine how many levels \r\n * are fetched during asking about hierarchy options.\r\n */\r\nexport const numberOfLevels = 2;\r\n\r\nexport const showIndexWhenItemCountIsAbove = 20; \r\nexport const hideIndexWhenItemCountIsAbove = 500; \r\n","import * as React from 'react';\r\nimport { SelectItem } from '../types';\r\nimport { SelectedOption } from './selected-option';\r\nimport { LoadOptions } from '../..';\r\nimport { numberOfLevels } from '../constants';\r\nimport styles from './selected-options.scss';\r\nimport { isNumeric } from 'app/infrastructure/data/number';\r\nimport { ValidationProps } from 'ui/common/validation';\r\n\r\nexport const sortSelectItemByDescription = (n1: SelectItem, n2: SelectItem) => {\r\n if (n1.description > n2.description) {\r\n return 1;\r\n }\r\n if (n1.description < n2.description) {\r\n return -1;\r\n }\r\n return 0;\r\n};\r\n\r\nexport interface SelectedOptionsProps {\r\n items: SelectItem[];\r\n loadOptions?: (loadOptions: LoadOptions) => void;\r\n readOnly?: boolean;\r\n onChange: (items: SelectItem[]) => void;\r\n validation?: ValidationProps;\r\n}\r\n\r\nexport class SelectedOptions extends React.Component<SelectedOptionsProps> {\r\n\r\n private handleOnClick = (item: SelectItem) => {\r\n this.props.loadOptions({\r\n siblingId: Number(item.value),\r\n levels: numberOfLevels\r\n });\r\n }\r\n\r\n private handleOnRemove = (removedItem: SelectItem) => {\r\n if (this.props.readOnly) {\r\n return;\r\n }\r\n const items = this.props.items.filter(item => item.value !== removedItem.value);\r\n this.props.onChange(items);\r\n }\r\n\r\n private renderItem = (index: number, item: SelectItem) => {\r\n const valueIsValid = isNumeric(item.value) ? item.value > -1 : !!item.value;\r\n const showItem = item.value !== null && item.value !== undefined && valueIsValid;\r\n const hasValidationError = !!this.props.validation && !!this.props.validation.messages &&\r\n this.props.validation.messages.find(message => !!message.parameters && message.parameters.id === item.value);\r\n\r\n return showItem\r\n && <SelectedOption\r\n key={index}\r\n item={item}\r\n hasError={!!hasValidationError}\r\n onClick={this.handleOnClick}\r\n onRemove={this.handleOnRemove}\r\n readOnly={this.props.readOnly} />;\r\n }\r\n public render() {\r\n const { items = [] } = this.props;\r\n const hasItems = !!items && items.length > 0;\r\n const selectedSortedOptions = hasItems && items.slice().sort(sortSelectItemByDescription);\r\n\r\n return hasItems ? <div className={styles.listOfItems}>\r\n {selectedSortedOptions.map((item, index) => this.renderItem(index, item))}\r\n </div> : null;\r\n }\r\n}\r\n","\r\nimport * as ReactDOM from 'react-dom';\r\n\r\nexport const scrollIntoViewIfNecessary = (component: any) => {\r\n const el: any = ReactDOM.findDOMNode(component);\r\n if (!!el) {\r\n const rect = el.getBoundingClientRect();\r\n if (!!window && !!rect && (window.innerHeight < rect.top || rect.top < 0)) {\r\n el.scrollIntoView();\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { CheckSymbol, RadioSymbol } from 'ui';\r\nimport { Breadcrumb } from '../../breadcrumb/breadcrumb';\r\nimport { LoadOptions } from '../../types';\r\nimport { OptionBtnNextLevel, OptionDescription, OptionSelectMark } from '../option';\r\nimport { SelectOption } from '../select-option';\r\nimport { SelectOptions } from '../select-options';\r\nimport { SelectItem, SelectType } from '../types';\r\nimport styles from './hierarchy-options.scss';\r\nimport { isMultiple } from '../select-type';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nconst defaultEmptyArray = [];\r\n\r\nexport interface HierarchyOptionsProps {\r\n options: SelectItem[];\r\n valueItems: SelectItem[];\r\n showIcons: boolean;\r\n onSelectOption: (item: SelectItem) => void;\r\n breadcrumbStack: SelectItem[];\r\n selectType: SelectType;\r\n onLoadOptions?: (loadOptions: LoadOptions) => void;\r\n minLevel: number;\r\n leafNodeOnly: boolean;\r\n descriptionAllLevels: boolean;\r\n showLongDescription: boolean;\r\n allLevelsDescriptionPrefix?: string;\r\n categoryId?: number;\r\n}\r\nexport class HierarchyOptions extends React.Component<HierarchyOptionsProps> {\r\n private readonly numberOfLevels: number = 2;\r\n\r\n private hasDescendants(item: SelectItem) {\r\n return item.descendants && item.descendants.length > 0;\r\n }\r\n\r\n private enableSelection(item: SelectItem) {\r\n const { minLevel, breadcrumbStack, leafNodeOnly } = this.props;\r\n\r\n if (leafNodeOnly && this.hasDescendants(item)) {\r\n return false;\r\n }\r\n return breadcrumbStack.length >= minLevel;\r\n }\r\n\r\n private onSelect = (item: SelectItem) => {\r\n const { onSelectOption, allLevelsDescriptionPrefix = '' } = this.props;\r\n\r\n if (this.enableSelection(item)) {\r\n onSelectOption({\r\n ...item,\r\n description: allLevelsDescriptionPrefix + item.description\r\n });\r\n }\r\n }\r\n\r\n private loadOptionsByParentId = (parentId: number) => {\r\n const categoryId = this.props.categoryId && { categoryId: this.props.categoryId };\r\n\r\n this.props.onLoadOptions({\r\n parentId: parentId,\r\n levels: this.numberOfLevels,\r\n ...(categoryId)\r\n }\r\n );\r\n }\r\n\r\n private onExpand = (item: SelectItem) => {\r\n this.loadOptionsByParentId(item.value as number);\r\n }\r\n\r\n private onBreadcrumbItemClick = (item: SelectItem) => {\r\n const categoryId = this.props.categoryId && { categoryId: this.props.categoryId };\r\n\r\n if (item.value === 0) {\r\n this.props.onLoadOptions({\r\n levels: this.numberOfLevels,\r\n ...(isDefinedIncludingZero(this.props.categoryId) && { categoryId: this.props.categoryId }),\r\n ...(categoryId)\r\n });\r\n } else {\r\n this.loadOptionsByParentId(item.value as number);\r\n }\r\n }\r\n\r\n private renderItem = (item: SelectItem, selectedValues: number[]) => {\r\n const {\r\n selectType,\r\n showIcons,\r\n showLongDescription\r\n } = this.props;\r\n\r\n const hasChildren = !!item.descendants && item.descendants.length > 0;\r\n const showSelectionMark = this.enableSelection(item);\r\n const longDescriptionValue = showLongDescription && !!item.longDescription\r\n ? item.longDescription\r\n : '';\r\n\r\n const selectSymbol = isMultiple(selectType) ? <CheckSymbol /> : <RadioSymbol />;\r\n\r\n return <SelectOption\r\n key={item.value}\r\n selectType={selectType}\r\n hasChildren={hasChildren}\r\n longDescription={longDescriptionValue}\r\n >\r\n {showSelectionMark && <OptionSelectMark\r\n selectType={selectType}\r\n item={item}\r\n onSelect={this.onSelect}\r\n isSelected={selectedValues.indexOf(item.value as number) > -1}\r\n />}\r\n <OptionDescription item={item} showIcons={showIcons} selectSymbol={selectSymbol} hideSelection={!showSelectionMark} />\r\n {hasChildren && <OptionBtnNextLevel item={item} onClick={this.onExpand} />}\r\n </SelectOption>;\r\n }\r\n\r\n public render() {\r\n const { breadcrumbStack = defaultEmptyArray, options = defaultEmptyArray } = this.props;\r\n const breadcrumb = <Breadcrumb items={breadcrumbStack}\r\n onClickItem={this.onBreadcrumbItemClick} />;\r\n\r\n const selectedValues = this.props.valueItems.map(i => i.value as number);\r\n\r\n return (\r\n <div className={styles.hierarchyOptions}>\r\n {breadcrumbStack.length > 1 && breadcrumb}\r\n <SelectOptions showLongDescriptions={this.props.showLongDescription}>\r\n {options.map(i => this.renderItem(i, selectedValues))}\r\n </SelectOptions>\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { CheckSymbol, RadioSymbol } from '../..';\r\nimport { OptionDescription, OptionSelectMark } from '../option';\r\nimport { SelectOption } from '../select-option';\r\nimport { SelectOptions } from '../select-options';\r\nimport { GroupData, SelectItem, SelectType } from '../types';\r\nimport { TileData } from './tiles-index/tiles-item';\r\nimport { isMultiple } from '../select-type';\r\nimport styles from './index-group.scss';\r\n\r\nexport interface GroupProps {\r\n valueItems: SelectItem[];\r\n data: GroupData;\r\n onClickHeader: (item: TileData) => void;\r\n onSelectOption: (item: SelectItem) => void;\r\n selectType?: SelectType;\r\n}\r\n\r\nexport class Group extends React.Component<GroupProps, any> {\r\n private renderItem = (item: SelectItem, selectedValues: number[]) => {\r\n const { selectType, onSelectOption } = this.props;\r\n const selectSymbol = isMultiple(selectType) ? <CheckSymbol /> : <RadioSymbol /> ;\r\n\r\n return <SelectOption key={item.value} selectType={selectType} hasChildren={false}>\r\n <OptionSelectMark selectType={selectType} item={item} onSelect={onSelectOption}\r\n isSelected={selectedValues.indexOf(item.value as number) > -1}\r\n />\r\n <OptionDescription item={item} showIcons={false} selectSymbol={selectSymbol} />\r\n </SelectOption>;\r\n }\r\n\r\n private onClickHeader = (e: React.MouseEvent<HTMLDivElement>) => {\r\n this.props.onClickHeader(this.props.data);\r\n }\r\n\r\n public render() {\r\n const selectedValues = this.props.valueItems.map(i=>i.value as number);\r\n return (\r\n <div id={this.props.data.bookmarkId} className={`row ${styles.alphabetSection}`}>\r\n <div className=\"col col-auto\">\r\n <div className={styles.alphabetSectionLetter} onClick={this.onClickHeader} >{this.props.data.name}</div>\r\n </div>\r\n <div className=\"col\">\r\n <SelectOptions>\r\n {this.props.data.items.map((item, index) => this.renderItem(item, selectedValues))}\r\n </SelectOptions>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport styles from './tiles-index.scss';\r\n\r\nexport enum TileType {\r\n shortcut,\r\n indexList\r\n}\r\n\r\nexport interface TileData {\r\n name: string;\r\n bookmarkId?: string;\r\n}\r\n\r\nexport interface TileProps {\r\n item: TileData;\r\n type: TileType;\r\n onClick?: (item: TileData) => void;\r\n}\r\n\r\nexport const Tile = (props: TileProps) => {\r\n const onClick = (e: React.MouseEvent<HTMLButtonElement>) => {\r\n e.preventDefault();\r\n props.onClick(props.item);\r\n };\r\n\r\n return (\r\n <button className={`btn ${styles.alphabetControlBtn}`} onClick={onClick}>\r\n {props.item.name}\r\n </button>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { TileData, Tile, TileType } from './tiles-item';\r\nimport styles from './tiles-index.scss';\r\n\r\nexport interface TilesIndexProps {\r\n options: TileData[];\r\n onClick: (item: TileData) => void;\r\n}\r\n\r\nexport const TilesIndex = (props:TilesIndexProps) => {\r\n const onClickTile = (item: TileData) => {\r\n props.onClick(item);\r\n };\r\n\r\n return (\r\n <div className={styles.alphabetControl}>\r\n {props.options.map(item =>\r\n <Tile key={item.bookmarkId} item={item} onClick={onClickTile} type={TileType.indexList} />\r\n )}\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { Group } from './index-group';\r\nimport { TilesIndex } from './tiles-index/tiles-index';\r\nimport { SelectItem, GroupData, SelectType } from '../types';\r\nimport { TileData } from 'ui/common/select/index-options/tiles-index/tiles-item';\r\n\r\nexport interface IndexOptionsProps {\r\n options: SelectItem[];\r\n valueItems: SelectItem[];\r\n shortcutView?: boolean;\r\n selectType?: SelectType;\r\n onClickHeader?: (item: TileData) => void;\r\n onSelectOption: (item: SelectItem) => void;\r\n}\r\n\r\nexport interface IndexOptionsState {\r\n shortcutView: boolean;\r\n}\r\n\r\nexport class IndexOptions extends React.Component<IndexOptionsProps, IndexOptionsState> {\r\n private groupList: GroupData[] = [];\r\n private currentGroup: GroupData;\r\n private scrollToSelectedGroup: boolean = false;\r\n private anchorToSelectedGroup: string = '';\r\n\r\n constructor(props: IndexOptionsProps) {\r\n super(props);\r\n this.state = {\r\n shortcutView: !!this.props.shortcutView ? this.props.shortcutView : false\r\n } as IndexOptionsState;\r\n this.createGroupStructure(this.props.options);\r\n }\r\n\r\n private getFirstUpperCaseChar = (text: string) => {\r\n return text.substring(0, 1).toUpperCase();\r\n }\r\n\r\n private createNewGroup = (name: string, item: SelectItem) => {\r\n this.currentGroup = {\r\n name: name,\r\n items: [item],\r\n bookmarkId: `bookmark-${name}`\r\n } as GroupData;\r\n this.groupList.push(this.currentGroup);\r\n }\r\n\r\n private createOrUpdateGroup = (item: SelectItem) => {\r\n const firstChar = this.getFirstUpperCaseChar(item.description);\r\n if (firstChar === this.currentGroup.name) {\r\n this.currentGroup.items.push(item);\r\n } else {\r\n this.createNewGroup(firstChar, item);\r\n }\r\n }\r\n\r\n private createGroupStructure = (items: SelectItem[]) => {\r\n this.groupList = [];\r\n if (items && items.length > 0) {\r\n let item = items[0];\r\n const firstChar = this.getFirstUpperCaseChar(item.description);\r\n this.createNewGroup(firstChar, item);\r\n\r\n for (let i = 1; i < items.length; i++) {\r\n item = items[i];\r\n this.createOrUpdateGroup(item);\r\n }\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: IndexOptionsProps) {\r\n if(this.props !== prevProps) {\r\n this.createGroupStructure(this.props.options);\r\n }\r\n\r\n if (this.scrollToSelectedGroup) {\r\n const element = document.getElementById(this.anchorToSelectedGroup);\r\n if (element) {\r\n element.scrollIntoView();\r\n this.scrollToSelectedGroup = false;\r\n }\r\n }\r\n }\r\n\r\n private onSelectedShortcut = (item: TileData) => {\r\n this.setState({\r\n shortcutView: false\r\n } as IndexOptionsState);\r\n\r\n this.anchorToSelectedGroup = item.bookmarkId;\r\n this.scrollToSelectedGroup = true;\r\n }\r\n\r\n private renderShortcuts = () => {\r\n const tiles: TileData[] = [];\r\n this.groupList.forEach(item => tiles.push(\r\n {\r\n name: item.name,\r\n bookmarkId: item.bookmarkId\r\n } as TileData));\r\n return <TilesIndex options={tiles} onClick={this.onSelectedShortcut} />;\r\n }\r\n\r\n private onClickHeader = (item: TileData) => {\r\n this.setState({\r\n shortcutView: true\r\n } as IndexOptionsState);\r\n }\r\n\r\n private renderGroup = (index: number, data: GroupData) => {\r\n const { onSelectOption, selectType, valueItems } = this.props;\r\n return <Group\r\n key={data.name}\r\n data={data}\r\n valueItems={valueItems}\r\n onClickHeader={this.onClickHeader}\r\n onSelectOption={onSelectOption}\r\n selectType={selectType}\r\n\r\n />;\r\n }\r\n\r\n private renderIndexList = () => {\r\n return this.groupList.map((item, index) => this.renderGroup(index, item));\r\n }\r\n\r\n public render() {\r\n return (\r\n <div>\r\n {this.renderShortcuts()}\r\n {this.renderIndexList()}\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { HierarchyOptions } from './hierarchy-options/hierarchy-options';\r\nimport { FlatOptions } from './flat-options/flat-options';\r\nimport { SelectType, SelectItem, OptionsType, OptionsDisplaySetting } from './types';\r\nimport { Options, ComplexValue } from '../types';\r\nimport { IndexOptions } from './index-options/index-options';\r\nimport { showIndexWhenItemCountIsAbove, hideIndexWhenItemCountIsAbove } from './constants';\r\nimport { optionsToHierarchy } from './hierarchy-options/options-to-hierarchy';\r\nimport { isHierarchy } from './select-type';\r\nimport styles from './options-resolver.scss';\r\n\r\nexport interface OptionsResolverProps extends Options<number | string> {\r\n onSelectOption: (item: SelectItem) => void;\r\n valueItems: SelectItem[];\r\n selectType: SelectType;\r\n minLevel: number;\r\n leafNodeOnly: boolean;\r\n descriptionAllLevels: boolean;\r\n optionsDisplaySetting?: OptionsDisplaySetting;\r\n showIcons: boolean;\r\n showLongDescription: boolean;\r\n searchRequired?: boolean;\r\n textSearchRequired?: string;\r\n notEnoughInputWhenSearchRequired?: boolean;\r\n categoryId?: number;\r\n}\r\n\r\nexport class OptionsResolver extends React.PureComponent<OptionsResolverProps> {\r\n\r\n private searchRequiredOptionsLimit: number = 500;\r\n\r\n private setTypeIfOptionTypeAuto = (type: OptionsType, itemsLength: number) => {\r\n const { indexMin = showIndexWhenItemCountIsAbove,\r\n indexMax = hideIndexWhenItemCountIsAbove } = !!this.props.optionsDisplaySetting && this.props.optionsDisplaySetting;\r\n if (type === OptionsType.auto) {\r\n return (itemsLength > indexMin && itemsLength < indexMax)\r\n ? OptionsType.index\r\n : OptionsType.flat;\r\n }\r\n return type;\r\n }\r\n\r\n public exceedsMaxResultWhenSearchRequired = (options: ComplexValue<string | number>[]) => {\r\n return this.props.searchRequired && options && options.length > this.searchRequiredOptionsLimit;\r\n }\r\n\r\n public render() {\r\n\r\n const { type = OptionsType.auto } = !!this.props.optionsDisplaySetting && this.props.optionsDisplaySetting;\r\n const { loadOptions, selectType, textSearchRequired, options, notEnoughInputWhenSearchRequired, categoryId } = this.props;\r\n const { query = '' } = loadOptions;\r\n let optionsResult;\r\n const displaySearchRequiredErrorFromOptions: boolean = notEnoughInputWhenSearchRequired\r\n || this.exceedsMaxResultWhenSearchRequired(options);\r\n const searchRequiredErrorOptions = !!displaySearchRequiredErrorFromOptions &&\r\n <div className={styles.errorMessage}>{textSearchRequired}</div>;\r\n\r\n if (isHierarchy(selectType)) {\r\n if (!query) {\r\n const {\r\n allLevelsDescriptionPrefix, breadcrumbStack, returnedOptions\r\n } = optionsToHierarchy({\r\n originOptions: this.props.options,\r\n loadOptions: this.props.loadOptions,\r\n descriptionAllLevels: this.props.descriptionAllLevels\r\n });\r\n\r\n const displaySearchRequiredErrorFromReturnedOptions: boolean = notEnoughInputWhenSearchRequired\r\n || this.exceedsMaxResultWhenSearchRequired(returnedOptions);\r\n\r\n const searchRequiredErrorReturnedOptions = !!displaySearchRequiredErrorFromReturnedOptions &&\r\n <div className={styles.errorMessage}>{textSearchRequired}</div>;\r\n\r\n optionsResult = searchRequiredErrorReturnedOptions || <HierarchyOptions {...this.props}\r\n categoryId={categoryId}\r\n breadcrumbStack={breadcrumbStack}\r\n allLevelsDescriptionPrefix={allLevelsDescriptionPrefix}\r\n options={returnedOptions} />;\r\n } else {\r\n optionsResult = searchRequiredErrorOptions || <FlatOptions {...this.props} />;\r\n }\r\n } else {\r\n const optionsType: OptionsType = this.setTypeIfOptionTypeAuto(type, this.props.options.length);\r\n\r\n if (optionsType === OptionsType.flat) {\r\n optionsResult = searchRequiredErrorOptions || <FlatOptions {...this.props} />;\r\n } else {\r\n optionsResult = searchRequiredErrorOptions || <IndexOptions {...this.props} />;\r\n }\r\n }\r\n return optionsResult;\r\n }\r\n}\r\n","import { SelectItem } from '../types';\r\nimport { LoadOptions } from '../../types';\r\n\r\nconst haveNotFoundSelectedOption = (returnedOptions: SelectItem[], originOptions: SelectItem[]) => {\r\n return !returnedOptions.length && !!originOptions.length;\r\n};\r\n\r\nexport const optionsToHierarchy = (params: {\r\n originOptions: SelectItem[],\r\n loadOptions: LoadOptions,\r\n descriptionAllLevels: boolean\r\n}) => {\r\n const { originOptions, loadOptions, descriptionAllLevels } = params;\r\n const { parentId, siblingId } = loadOptions;\r\n const breadcrumbStack = [];\r\n let returnedOptions = [];\r\n let allLevelsDescriptionPrefix = '';\r\n const findOptionsAndBuildBreadcrumbStack = (addParentItemToStack: () => void, parentItem: SelectItem, items: SelectItem[]) => {\r\n const buildStack = () => {\r\n if (addParentItemToStack !== undefined) {\r\n breadcrumbStack.unshift(parentItem);\r\n addParentItemToStack();\r\n }\r\n };\r\n\r\n for (let i = 0; i < items.length; i++) {\r\n const item = items[i];\r\n\r\n if (item.value === parentId) {\r\n breadcrumbStack.unshift(item);\r\n buildStack();\r\n returnedOptions = item.descendants;\r\n }\r\n\r\n if (item.value === siblingId) {\r\n buildStack();\r\n returnedOptions = items;\r\n }\r\n\r\n if (item.descendants && item.descendants.length > 0) {\r\n findOptionsAndBuildBreadcrumbStack(buildStack, item, item.descendants);\r\n }\r\n }\r\n return [];\r\n };\r\n\r\n if (originOptions && (siblingId !== undefined || parentId !== undefined)) {\r\n findOptionsAndBuildBreadcrumbStack(undefined, undefined, originOptions);\r\n if (haveNotFoundSelectedOption(returnedOptions, originOptions)) {\r\n returnedOptions = originOptions;\r\n }\r\n } else {\r\n returnedOptions = originOptions;\r\n }\r\n\r\n allLevelsDescriptionPrefix = !!descriptionAllLevels\r\n ? breadcrumbStack.reduce((previousValue, currentValue) => {\r\n return previousValue + currentValue.description + ' - ';\r\n }, '')\r\n : '';\r\n\r\n breadcrumbStack.unshift({ value: 0, description: '' } as SelectItem);\r\n\r\n return {\r\n allLevelsDescriptionPrefix,\r\n breadcrumbStack,\r\n returnedOptions\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { LoadOptions } from '..';\r\nimport { keyCode } from '../key-code-types';\r\n\r\ninterface KeyboardSupportComponentProps {\r\n inputValue: string;\r\n closeOptions: () => void;\r\n loadAndOpenOptions: (loadOptions: LoadOptions) => void;\r\n}\r\n\r\nclass KeyboardSupportComponent extends React.Component<KeyboardSupportComponentProps> {\r\n private handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n switch (e.keyCode) {\r\n case keyCode.Esc:\r\n this.props.closeOptions();\r\n break;\r\n case keyCode.ArrowDown:\r\n this.props.loadAndOpenOptions({ query: this.props.inputValue });\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (<div tabIndex={-1} onKeyDown={this.handleKeyDown}>\r\n {this.props.children}\r\n </div>);\r\n }\r\n}\r\n\r\nexport const KeyboardSupport = KeyboardSupportComponent;\r\n","import * as React from 'react';\r\nimport { Options, LoadOptions } from '../types';\r\nimport { SelectOptionsExpander } from './select-options-expander';\r\nimport { InputControlContext, InputControlContextProps } from '../input-control-context';\r\nimport { SelectInput } from './select-input';\r\nimport { SelectItem, SelectType, SelectCommonProps, OptionsType } from './types';\r\nimport { SelectedOptions } from './selected-options/selected-options';\r\nimport { CloseOnBlur } from '../close-on-blur';\r\nimport { scrollIntoViewIfNecessary } from './scroll-into-view-if-necessary';\r\nimport debounce from 'lodash/debounce';\r\nimport { OptionsResolver } from './options-resolver';\r\nimport { isHierarchy, isMultiple, isSingle } from './select-type';\r\nimport { KeyboardSupport } from './keyboard-support';\r\nimport styles from './select-base-component.scss';\r\nimport { numberOfLevels } from './constants';\r\nimport { ANIMATE_OUT_SPEED } from 'ui/constants';\r\nimport { KeepFocusOnElement } from 'ui/common/keep-focus-on-element';\r\n\r\nexport const getValueItem = (valueItems: SelectItem[]) => {\r\n return !!valueItems && !!valueItems.length ? valueItems[0] : undefined;\r\n};\r\n\r\n/**\r\n * SelectSingle component let you choose one option from list of options.\r\n *\r\n * > It supports common InputControlContext component.\r\n */\r\nexport interface SelectBaseComponentProps extends InputControlContextProps, SelectCommonProps, Options<number | string> {\r\n selectType: SelectType;\r\n\r\n placeholder?: string;\r\n readOnly?: boolean;\r\n focus?: boolean;\r\n\r\n valueItems?: SelectItem[];\r\n onChange: (data: SelectItem | SelectItem[]) => void;\r\n\r\n hideSearchInput?: boolean;\r\n\r\n // hierarchy props\r\n minLevel?: number;\r\n leafNodeOnly?: boolean;\r\n breadcrumbStack?: SelectItem[];\r\n descriptionAllLevels?: boolean;\r\n resetPreviousValueWhenEmpty?: boolean;\r\n}\r\n\r\nexport interface SelectPrevState {\r\n isOpen?: boolean;\r\n longDescription?: boolean;\r\n valueItems?: SelectItem[];\r\n}\r\nexport interface SelectState {\r\n inputValue?: string;\r\n isOpen: boolean;\r\n showLongDescription: boolean;\r\n allLevelsDescriptionPrefix?: string;\r\n breadcrumbStack?: SelectItem[];\r\n isClosing: boolean;\r\n searchMode: boolean;\r\n prev: SelectPrevState;\r\n}\r\n\r\nexport class SelectBaseComponent extends React.Component<SelectBaseComponentProps, SelectState> {\r\n\r\n private debounceOnLoad: any;\r\n private timeoutHandle: any;\r\n private inputRef: HTMLTextAreaElement;\r\n private searchRequiredMinLength: number = 2;\r\n\r\n public static defaultProps: Partial<SelectBaseComponentProps> = {\r\n minLength: 2,\r\n showIcons: true,\r\n loadOptions: { query: '' },\r\n longDescription: true,\r\n initiallyShowLongDescription: true,\r\n isOpen: false,\r\n readOnly: false,\r\n minLevel: 0,\r\n descriptionAllLevels: false,\r\n leafNodeOnly: false,\r\n hideSearchInput: false,\r\n hideAlphabeticIndex: false,\r\n onLoadOptionsDelay: 500,\r\n resetPreviousValueWhenEmpty: false\r\n };\r\n\r\n public static getDerivedStateFromProps(props: SelectBaseComponentProps, state: SelectState) {\r\n const prev = { longDescription: props.longDescription, isOpen: props.isOpen, valueItems: props.valueItems };\r\n if (isMultiple(props.selectType)) {\r\n if (props.longDescription !== state.prev.longDescription) {\r\n return {\r\n ...(props.isOpen !== state.prev.isOpen ? { isOpen: props.isOpen } : {}),\r\n ...(props.longDescription !== state.prev.longDescription ? { showLongDescription: props.longDescription } : {}),\r\n prev\r\n };\r\n }\r\n } else {\r\n const previousValueItem = getValueItem(state.prev.valueItems);\r\n const previousDescription = !!previousValueItem && !!previousValueItem.description ? previousValueItem.description : '';\r\n const nextValueItem = getValueItem(props.valueItems);\r\n const nextDescription = !!nextValueItem && !!nextValueItem.description ? nextValueItem.description : '';\r\n if (previousDescription !== nextDescription\r\n || props.isOpen !== state.prev.isOpen\r\n || props.longDescription !== state.prev.longDescription\r\n ) {\r\n return {\r\n ...(!state.searchMode && previousDescription !== nextDescription\r\n ? { inputValue: nextDescription } : {}),\r\n ...(props.isOpen !== state.prev.isOpen ? { isOpen: props.isOpen } : {}),\r\n ...(props.longDescription !== state.prev.longDescription ? { showLongDescription: props.longDescription } : {}),\r\n prev\r\n };\r\n }\r\n }\r\n\r\n return {};\r\n }\r\n\r\n constructor(props: SelectBaseComponentProps) {\r\n super(props);\r\n\r\n const valueItem = getValueItem(props.valueItems);\r\n\r\n this.state = {\r\n isOpen: props.isOpen,\r\n inputValue: !this.isMultiple && !!valueItem ? valueItem.description : '',\r\n showLongDescription: props.longDescription && props.initiallyShowLongDescription,\r\n isClosing: false,\r\n searchMode: false,\r\n prev: {\r\n longDescription: props.longDescription,\r\n isOpen: props.isOpen,\r\n valueItems: props.valueItems\r\n }\r\n };\r\n\r\n this.debounceOnLoad = debounce((query: string) => {\r\n this.loadOptions({ query: !!query ? query.trim() : query });\r\n }, this.props.onLoadOptionsDelay);\r\n }\r\n\r\n private getInputRef = (node: HTMLTextAreaElement) => {\r\n this.inputRef = node;\r\n }\r\n\r\n get isHierarchy(): boolean { return isHierarchy(this.props.selectType); }\r\n get isMultiple(): boolean { return isMultiple(this.props.selectType); }\r\n get isSingle(): boolean { return isSingle(this.props.selectType); }\r\n get shouldRenderAsOpen() { return this.props.isOpen || this.props.alwaysOpen; }\r\n\r\n private achievedMinLengthCondition = (inputValue: string) => {\r\n return inputValue !== undefined && inputValue.length >= this.props.minLength;\r\n }\r\n\r\n public componentDidMount() {\r\n if (this.shouldRenderAsOpen) {\r\n this.loadOptions();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.inputRef = null;\r\n clearTimeout(this.timeoutHandle);\r\n }\r\n\r\n private loadOptions = (loadOptions: LoadOptions = { query: '' }) => {\r\n const categoryId = this.props.categoryId && { categoryId: this.props.categoryId };\r\n\r\n if (this.props.searchRequired) {\r\n if (this.state.inputValue && this.state.inputValue.length >= this.searchRequiredMinLength) {\r\n this.props.onLoadOptions({\r\n query: this.state.inputValue,\r\n ...(categoryId)\r\n });\r\n }\r\n }\r\n else {\r\n this.props.onLoadOptions({\r\n ...loadOptions,\r\n ...(categoryId)\r\n });\r\n }\r\n this.setState({ isOpen: true });\r\n };\r\n\r\n private isEmpty = (value: string) => {\r\n return value === '' || (!!value && value.trim() === '');\r\n }\r\n\r\n private handleInputChange = (value: string) => {\r\n\r\n this.setState({\r\n inputValue: value\r\n }, () => {\r\n if (this.achievedMinLengthCondition(value)) {\r\n this.debounceOnLoad(value);\r\n } else {\r\n this.debounceOnLoad.cancel();\r\n if (this.isEmpty(value)) {\r\n if (this.isSingle) {\r\n if (this.props.resetPreviousValueWhenEmpty) {\r\n this.debounceOnLoad(value);\r\n this.handleBlurComponent();\r\n }\r\n else {\r\n this.props.onChange(undefined);\r\n }\r\n }\r\n if (this.props.alwaysOpen) {\r\n this.debounceOnLoad('');\r\n } else {\r\n this.closeOptions();\r\n }\r\n }\r\n }\r\n });\r\n }\r\n\r\n private closeOptions = (moveFocus: boolean = true) => {\r\n if (this.state.isOpen && !this.props.alwaysOpen) {\r\n this.setState({ isClosing: true });\r\n if (this.inputRef && moveFocus) {\r\n this.inputRef.focus();\r\n }\r\n\r\n clearTimeout(this.timeoutHandle);\r\n this.timeoutHandle = setTimeout(() => {\r\n this.setState({\r\n isOpen: false,\r\n isClosing: false\r\n });\r\n scrollIntoViewIfNecessary(this);\r\n }, ANIMATE_OUT_SPEED);\r\n }\r\n }\r\n\r\n private onShowLongDescription = (enabled: boolean) => {\r\n this.setState({\r\n showLongDescription: enabled\r\n });\r\n }\r\n\r\n /**\r\n * If component has singleHierarchy type and has selected item than\r\n * in case of openning options should set selected level on hierarchy tree.\r\n */\r\n private loadSingleHierarchyOptions = () => {\r\n const valueItem = getValueItem(this.props.valueItems);\r\n const categoryId = this.props.categoryId && { categoryId: this.props.categoryId };\r\n\r\n if (!!valueItem && !!valueItem.value) {\r\n this.loadOptions({\r\n siblingId: Number(valueItem.value),\r\n levels: numberOfLevels,\r\n ...(categoryId)\r\n });\r\n } else {\r\n this.loadOptions({\r\n siblingId: 0,\r\n levels: numberOfLevels,\r\n ...(categoryId)\r\n });\r\n }\r\n }\r\n\r\n private onClickedOpenOptions = () => {\r\n if (this.state.isOpen) {\r\n this.closeOptions();\r\n } else {\r\n if (this.props.selectType === SelectType.singleHierarchy) {\r\n this.loadSingleHierarchyOptions();\r\n } else if (this.props.selectType === SelectType.multipleHierarchy) {\r\n this.loadOptions({\r\n levels: numberOfLevels\r\n });\r\n } else {\r\n this.loadOptions();\r\n }\r\n }\r\n }\r\n\r\n private onSelectOption = (item: SelectItem) => {\r\n const { valueItems = [], onChange } = this.props;\r\n\r\n if (this.isMultiple) {\r\n const selectedItemIndex = valueItems.find(i => i.value === item.value);\r\n if (selectedItemIndex) {\r\n onChange([...valueItems.filter(i => i.value !== item.value)]);\r\n } else {\r\n onChange([...valueItems, item]);\r\n }\r\n } else {\r\n this.setState({ isClosing: true });\r\n if (this.inputRef) {\r\n this.inputRef.focus();\r\n }\r\n\r\n onChange(item);\r\n\r\n clearTimeout(this.timeoutHandle);\r\n this.timeoutHandle = setTimeout(() => {\r\n scrollIntoViewIfNecessary(this);\r\n this.setState({\r\n isOpen: false,\r\n inputValue: item.description,\r\n isClosing: false\r\n });\r\n }, ANIMATE_OUT_SPEED);\r\n }\r\n }\r\n\r\n private handleFocusInput = () => {\r\n if (this.state.isOpen) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n searchMode: true\r\n }, () => {\r\n if (this.achievedMinLengthCondition(this.state.inputValue)) {\r\n this.loadOptions({ query: this.state.inputValue });\r\n }\r\n });\r\n }\r\n\r\n private handleBlurComponent = () => {\r\n const valueItem = getValueItem(this.props.valueItems);\r\n if (!this.props.alwaysOpen) {\r\n this.setState({\r\n searchMode: false,\r\n inputValue: this.isMultiple ? ''\r\n : !!valueItem\r\n ? valueItem.description\r\n : ''\r\n }, () => {\r\n this.closeOptions(false);\r\n });\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const {\r\n fetching, loadOptionsError, valueItems, placeholder, focus, readOnly, hideSearchInput, options, disabled, alwaysOpen,\r\n longDescription, selectType, onLoadOptions, loadOptions, minLevel, leafNodeOnly, descriptionAllLevels, optionsDisplaySetting,\r\n showIcons, hideAlphabeticIndex, searchRequired, textSearchRequired, validation\r\n } = this.props;\r\n\r\n const {\r\n inputValue, isOpen, showLongDescription\r\n } = this.state;\r\n\r\n const thinnerWrapperClass = readOnly && this.isMultiple && valueItems.length > 0 ? styles.wrapperThin : '';\r\n\r\n const { textOptionsTitle: title, textOptionsLoadError: loadError,\r\n textOptionsNotFound: notFound, textOptionsDone: done, categoryId } = this.props;\r\n\r\n const longDescriptionExists = options && options.some(i => !!i.longDescription);\r\n\r\n const closingAnimation = this.state.isClosing ? 'animate-out' : '';\r\n\r\n const notEnoughInputWhenSearchRequired = searchRequired &&\r\n (!inputValue || inputValue && inputValue.length < this.searchRequiredMinLength);\r\n\r\n const hasNewInputValue = !notEnoughInputWhenSearchRequired && !!loadOptions && loadOptions.query\r\n && inputValue && inputValue !== loadOptions.query;\r\n\r\n return <InputControlContext {...this.props}>\r\n <CloseOnBlur onBlur={this.handleBlurComponent}>\r\n <KeepFocusOnElement>\r\n <KeyboardSupport inputValue={inputValue} closeOptions={this.closeOptions} loadAndOpenOptions={this.loadOptions}>\r\n <div className={`input-wrapper select-base-component ${thinnerWrapperClass}`}>\r\n {\r\n this.isMultiple && <SelectedOptions items={valueItems} loadOptions={this.loadOptions}\r\n onChange={this.props.onChange} readOnly={readOnly} validation={validation} />\r\n }\r\n {\r\n !hideSearchInput &&\r\n <SelectInput\r\n placeholder={!readOnly ? placeholder : undefined} inputValue={inputValue} onChange={this.handleInputChange}\r\n onFocus={this.handleFocusInput} focus={focus} readOnly={readOnly} disabled={disabled}\r\n onOpenOptions={alwaysOpen ? null : this.onClickedOpenOptions}\r\n hasSelectedOptions={this.isMultiple && valueItems.length > 0}\r\n inputRef={this.getInputRef}\r\n />\r\n }\r\n </div>\r\n {!readOnly && isOpen &&\r\n <div className={closingAnimation}>\r\n <SelectOptionsExpander\r\n loadingOptions={fetching || hasNewInputValue}\r\n loadOptionsError={loadOptionsError}\r\n onClose={this.closeOptions}\r\n texts={{ title, loadError, notFound, done, searchRequired: textSearchRequired }}\r\n doNotRenderExpander={!!alwaysOpen}\r\n switchLongDescriptionAvailable={longDescription && longDescriptionExists}\r\n showLongDescription={showLongDescription}\r\n onShowLongDescription={this.onShowLongDescription}\r\n notEnoughInputWhenSearchRequired={notEnoughInputWhenSearchRequired}\r\n >\r\n {!!options && !!options.length && <OptionsResolver\r\n valueItems={valueItems}\r\n options={options}\r\n optionsDisplaySetting={hideAlphabeticIndex ? { type: OptionsType.flat } : optionsDisplaySetting}\r\n showIcons={showIcons}\r\n categoryId={categoryId}\r\n onSelectOption={this.onSelectOption}\r\n selectType={selectType}\r\n onLoadOptions={onLoadOptions}\r\n loadOptions={loadOptions}\r\n minLevel={minLevel}\r\n leafNodeOnly={leafNodeOnly}\r\n descriptionAllLevels={descriptionAllLevels}\r\n showLongDescription={this.state.showLongDescription && longDescriptionExists}\r\n searchRequired={searchRequired}\r\n textSearchRequired={textSearchRequired}\r\n notEnoughInputWhenSearchRequired={notEnoughInputWhenSearchRequired}\r\n />\r\n }\r\n </SelectOptionsExpander>\r\n </div>\r\n }\r\n </KeyboardSupport>\r\n </KeepFocusOnElement>\r\n </CloseOnBlur>\r\n </InputControlContext>;\r\n }\r\n}\r\n","// tslint:disable:no-http-string\r\nimport * as React from 'react';\r\nimport Linkify from 'react-linkify';\r\nimport { Link, SingleValueComponent } from 'ui';\r\nimport tlds from 'tlds';\r\n\r\nexport const linkify = require('linkify-it')();\r\n\r\nlinkify.tlds(tlds);\r\nlinkify \r\n .add('file:', 'http:') // Add `file:` protocol \r\n .add('ftps:', 'http:') // Add `ftps:` protocol \r\n .add('mailto:', null) // Disable `mailto:` protocol \r\n .set({ fuzzyLink: false, // Don't recognize URL-s without http(s):// head.\r\n fuzzyEmail: false }); // Don't recognize emails without mailto\r\n\r\nexport interface DisplayTextWithLinksProps extends Partial<SingleValueComponent<string>>{\r\n text: string;\r\n className?: string;\r\n linkify?: boolean;\r\n}\r\n\r\nexport class DisplayTextWithLinks extends React.Component<DisplayTextWithLinksProps, any> {\r\n\r\n public static defaultProps: Partial<DisplayTextWithLinksProps> = {\r\n linkify: true\r\n };\r\n\r\n private renderLink = (decoratedHref: string, decoratedText: string, key: number) => {\r\n return (\r\n <Link url={decoratedHref} key={key}>\r\n {decoratedText}\r\n </Link>);\r\n }\r\n\r\n private matchLinks = (text: string): object[] => {\r\n return linkify.match(text);\r\n }\r\n\r\n private linkifyValidUrls = (text: string) => {\r\n return this.props.linkify ? \r\n <Linkify matchDecorator={this.matchLinks} componentDecorator={this.renderLink}>{text}</Linkify> : \r\n text;\r\n } \r\n\r\n public render() { \r\n \r\n return (\r\n this.props.text ? \r\n <div id={this.props.componentId} className={this.props.className}>\r\n {this.linkifyValidUrls(this.props.text)}\r\n </div> : null\r\n );}\r\n}\r\n","export * from './display-text-with-links';\r\n","import { UserMessage } from 'app/types-shared';\r\n\r\nexport const getUserMessage = (message: string | UserMessage[]) => Array.isArray(message)\r\n ? message.map(m => m.message).join('\\n') : message;\r\n","module.exports = (__webpack_require__(49))(424);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"validation__visuallyhidden--2rEEJ\",\"focusable\":\"validation__focusable--G7neT\",\"warning-icon\":\"validation__warning-icon--3LHig\",\"warningIcon\":\"validation__warning-icon--3LHig\",\"validation-summary\":\"validation__validation-summary--2G6sG\",\"validationSummary\":\"validation__validation-summary--2G6sG\",\"message-wrapper\":\"validation__message-wrapper--2xIdV\",\"messageWrapper\":\"validation__message-wrapper--2xIdV\",\"messages\":\"validation__messages--18-zU\",\"flex-validation\":\"validation__flex-validation--1nino\",\"flexValidation\":\"validation__flex-validation--1nino\"};","import { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\n\r\nexport const ACTION = {\r\n REQUEST_UI_DEFINITION: 'UI_DEFINITION:REQUEST_UI_DEFINITION',\r\n RECEIVE_UI_DEFINITION: 'UI_DEFINITION:RECEIVE_UI_DEFINITION',\r\n FAIL_UI_DEFINITION: 'UI_DEFINITION:FAIL_UI_DEFINITION'\r\n};\r\n\r\nexport class RequestUiDefinition {\r\n public type: string = ACTION.REQUEST_UI_DEFINITION;\r\n constructor(public caseTypeId: number, public caseContextId: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveUiDefinition {\r\n public type: string = ACTION.RECEIVE_UI_DEFINITION;\r\n constructor(public caseTypeId: number, public caseContextId: number, public uiDefinition: UiDefinition, public eTag: string) {\r\n }\r\n}\r\n\r\nexport class FailUiDefinition {\r\n public type: string = ACTION.FAIL_UI_DEFINITION;\r\n constructor(public caseTypeId: number, public caseContextId: number) {\r\n }\r\n}\r\n","\r\nexport const ACTION = {\r\n CHANGE_CASE_TYPE: 'CASE:CHANGE_CASE_TYPE',\r\n CHANGE_CASE_TYPE_FAILURE: 'CASE:FAIL_CHANGE_CASE_TYPE',\r\n CHANGE_CASE_TYPE_SUCCESS: 'CASE:SUCCESS_CHANGE_CASE_TYPE'\r\n};\r\n\r\nexport class ChangeCaseType {\r\n public type: string = ACTION.CHANGE_CASE_TYPE;\r\n public caseTypeId: number;\r\n public draftId: number;\r\n\r\n constructor(caseTypeId: number, draftId: number) {\r\n this.caseTypeId = caseTypeId;\r\n this.draftId = draftId;\r\n }\r\n}\r\n\r\nexport class ChangeCaseTypeSuccess {\r\n public type: string = ACTION.CHANGE_CASE_TYPE_SUCCESS;\r\n public caseTypeId: number;\r\n public draftId: number;\r\n public etag: string;\r\n constructor(caseTypeId: number, draftId: number, etag: string) {\r\n this.caseTypeId = caseTypeId;\r\n this.draftId = draftId; \r\n this.etag = etag;\r\n }\r\n}\r\n\r\nexport class ChangeCaseTypeFailure {\r\n public type: string = ACTION.CHANGE_CASE_TYPE_FAILURE;\r\n public draftId: number;\r\n constructor(caseTypeId: number, draftId: number) {\r\n this.draftId = draftId; \r\n }\r\n}\r\n","import { LoadOptions, ComplexValue } from 'app/types-shared';\r\n\r\nexport const ACTION = {\r\n REQUEST_CODETABLE: 'CODETABLE_ADMINISTRATION:REQUEST_CODETABLE',\r\n RECEIVE_CODETABLE: 'CODETABLE_ADMINISTRATION:RECEIVE_CODETABLE',\r\n FAIL_CODETABLE: 'CODETABLE_ADMINISTRATION:FAIL_CODETABLE'\r\n};\r\n\r\nexport class RequestCodetable {\r\n public type: string = ACTION.REQUEST_CODETABLE;\r\n constructor(public id: string, public loadOptionsParams: LoadOptions) {\r\n }\r\n}\r\n\r\nexport class ReceiveCodetable {\r\n public type: string = ACTION.RECEIVE_CODETABLE;\r\n\r\n constructor(public id: string, public loadOptionsParams: LoadOptions, public codes: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class FailCodetable {\r\n public type: string = ACTION.FAIL_CODETABLE;\r\n\r\n constructor(public id: string, public loadOptionsParams: LoadOptions) {\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-options-expander__visuallyhidden--2SKVE\",\"focusable\":\"select-options-expander__focusable--2W6hc\",\"dialog-expander\":\"select-options-expander__dialog-expander--12d03\",\"dialogExpander\":\"select-options-expander__dialog-expander--12d03\",\"options-message\":\"select-options-expander__options-message--2slqT\",\"optionsMessage\":\"select-options-expander__options-message--2slqT\",\"search-required-message\":\"select-options-expander__search-required-message--UfFgg\",\"searchRequiredMessage\":\"select-options-expander__search-required-message--UfFgg\",\"has-switch\":\"select-options-expander__has-switch--ErrLv\",\"hasSwitch\":\"select-options-expander__has-switch--ErrLv\",\"select-header\":\"select-options-expander__select-header--2VP60\",\"selectHeader\":\"select-options-expander__select-header--2VP60\",\"no-expander\":\"select-options-expander__no-expander--pxzFd\",\"noExpander\":\"select-options-expander__no-expander--pxzFd\",\"select-switch\":\"select-options-expander__select-switch--36xdp\",\"selectSwitch\":\"select-options-expander__select-switch--36xdp\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"date__visuallyhidden--3CoHx\",\"focusable\":\"date__focusable--Qor43\",\"wrapper\":\"date__wrapper--144u8\",\"picker\":\"date__picker---yfRm\",\"picker-wrapper\":\"date__picker-wrapper--3B3nx\",\"pickerWrapper\":\"date__picker-wrapper--3B3nx\",\"caption-month\":\"date__caption-month--3LYrZ\",\"captionMonth\":\"date__caption-month--3LYrZ\",\"caption-year\":\"date__caption-year--2E30t\",\"captionYear\":\"date__caption-year--2E30t\",\"date-input\":\"date__date-input--2yv96\",\"dateInput\":\"date__date-input--2yv96\",\"icon-calendar\":\"date__icon-calendar--21LSU\",\"iconCalendar\":\"date__icon-calendar--21LSU\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tile-view__visuallyhidden--28Rp5\",\"focusable\":\"tile-view__focusable--1HZI4\",\"tile-view-container\":\"tile-view__tile-view-container--2rBok\",\"tileViewContainer\":\"tile-view__tile-view-container--2rBok\",\"tile-heading\":\"tile-view__tile-heading--Cqg9M\",\"tileHeading\":\"tile-view__tile-heading--Cqg9M\",\"tile-view\":\"tile-view__tile-view--2Nmny\",\"tileView\":\"tile-view__tile-view--2Nmny\",\"tile-with-children\":\"tile-view__tile-with-children--2ZMyb\",\"tileWithChildren\":\"tile-view__tile-with-children--2ZMyb\",\"add-tile\":\"tile-view__add-tile--35IRg\",\"addTile\":\"tile-view__add-tile--35IRg\",\"col-12\":\"tile-view__col-12--NUzQ-\",\"col12\":\"tile-view__col-12--NUzQ-\",\"has-errors\":\"tile-view__has-errors--sdVqn\",\"hasErrors\":\"tile-view__has-errors--sdVqn\",\"has-warnings\":\"tile-view__has-warnings--2QxHg\",\"hasWarnings\":\"tile-view__has-warnings--2QxHg\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"attach-link-tile__visuallyhidden--30_gn\",\"focusable\":\"attach-link-tile__focusable--WPBzI\",\"attach-link-tile-wrapper\":\"attach-link-tile__attach-link-tile-wrapper--3DoW7\",\"attachLinkTileWrapper\":\"attach-link-tile__attach-link-tile-wrapper--3DoW7\",\"attach-link-tile\":\"attach-link-tile__attach-link-tile--1xkF9\",\"attachLinkTile\":\"attach-link-tile__attach-link-tile--1xkF9\",\"invalid-url\":\"attach-link-tile__invalid-url--1H7Ym\",\"invalidUrl\":\"attach-link-tile__invalid-url--1H7Ym\",\"edit-mode\":\"attach-link-tile__edit-mode--22hv0\",\"editMode\":\"attach-link-tile__edit-mode--22hv0\",\"attach-link-menu\":\"attach-link-tile__attach-link-menu--xpVbl\",\"attachLinkMenu\":\"attach-link-tile__attach-link-menu--xpVbl\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"cell__visuallyhidden--pPAWi\",\"focusable\":\"cell__focusable--11ZB1\",\"colorBox\":\"cell__colorBox--2iX6A\",\"boxContainer\":\"cell__boxContainer--1Xs6-\",\"drillDownCol\":\"cell__drillDownCol--3BBoG\",\"iconColumn\":\"cell__iconColumn--3FLOp\",\"text\":\"cell__text--1gde9\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"drag-tag__visuallyhidden--1CvHX\",\"focusable\":\"drag-tag__focusable--3lljR\",\"dragndrop-tag\":\"drag-tag__dragndrop-tag--3F2oe\",\"dragndropTag\":\"drag-tag__dragndrop-tag--3F2oe\",\"title\":\"drag-tag__title--2eqqu\",\"drag-symbol\":\"drag-tag__drag-symbol--zYrfm\",\"dragSymbol\":\"drag-tag__drag-symbol--zYrfm\",\"add-remove-icon\":\"drag-tag__add-remove-icon--1ZHJY\",\"addRemoveIcon\":\"drag-tag__add-remove-icon--1ZHJY\",\"dragndrop-tag-active\":\"drag-tag__dragndrop-tag-active--3Bkq-\",\"dragndropTagActive\":\"drag-tag__dragndrop-tag-active--3Bkq-\",\"added\":\"drag-tag__added--2i_LR\",\"flash-in\":\"drag-tag__flash-in--2HboM\",\"flashIn\":\"drag-tag__flash-in--2HboM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"filter-panel__visuallyhidden--1oI3A\",\"focusable\":\"filter-panel__focusable--2Y4p0\",\"filter-panel\":\"filter-panel__filter-panel--19Jv2\",\"filterPanel\":\"filter-panel__filter-panel--19Jv2\",\"title-style\":\"filter-panel__title-style--1eiho\",\"titleStyle\":\"filter-panel__title-style--1eiho\",\"content\":\"filter-panel__content--2TMnS\",\"content-wrapper\":\"filter-panel__content-wrapper--1dgNj\",\"contentWrapper\":\"filter-panel__content-wrapper--1dgNj\",\"is-open\":\"filter-panel__is-open--2xEhw\",\"isOpen\":\"filter-panel__is-open--2xEhw\",\"slideOpen\":\"filter-panel__slideOpen--109H2\",\"animate-out\":\"filter-panel__animate-out--16UjA\",\"animateOut\":\"filter-panel__animate-out--16UjA\",\"slideClose\":\"filter-panel__slideClose--1cBY0\",\"is-closed\":\"filter-panel__is-closed--37lqT\",\"isClosed\":\"filter-panel__is-closed--37lqT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-item__visuallyhidden--SWxM2\",\"focusable\":\"codetable-item__focusable--19vXh\",\"expander-button-container\":\"codetable-item__expander-button-container--2Iezt\",\"expanderButtonContainer\":\"codetable-item__expander-button-container--2Iezt\",\"expander-button\":\"codetable-item__expander-button--2iuPZ\",\"expanderButton\":\"codetable-item__expander-button--2iuPZ\",\"zebra\":\"codetable-item__zebra--3aZTX\",\"hidden\":\"codetable-item__hidden--3zVu1\",\"open\":\"codetable-item__open--lXY0G\",\"meatball\":\"codetable-item__meatball--3aatn\",\"meatball-container\":\"codetable-item__meatball-container--Q7UBs\",\"meatballContainer\":\"codetable-item__meatball-container--Q7UBs\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-item-content__visuallyhidden--1Dkjy\",\"focusable\":\"codetable-item-content__focusable--3pWLY\",\"children-count\":\"codetable-item-content__children-count--2c9Xg\",\"childrenCount\":\"codetable-item-content__children-count--2c9Xg\",\"code-zero\":\"codetable-item-content__code-zero--3mixm\",\"codeZero\":\"codetable-item-content__code-zero--3mixm\",\"content\":\"codetable-item-content__content--1qgUR\",\"hierarchy-content\":\"codetable-item-content__hierarchy-content--QcwCJ\",\"hierarchyContent\":\"codetable-item-content__hierarchy-content--QcwCJ\",\"left-side\":\"codetable-item-content__left-side--19vPf\",\"leftSide\":\"codetable-item-content__left-side--19vPf\",\"right-side\":\"codetable-item-content__right-side--3i0TS\",\"rightSide\":\"codetable-item-content__right-side--3i0TS\",\"disabled-tag\":\"codetable-item-content__disabled-tag---Lm_K\",\"disabledTag\":\"codetable-item-content__disabled-tag---Lm_K\",\"container\":\"codetable-item-content__container--15L_Y\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-sticky-header__visuallyhidden--3A8V6\",\"focusable\":\"codetable-sticky-header__focusable--AI5ap\",\"tooltip\":\"codetable-sticky-header__tooltip--2rHX2\",\"id\":\"codetable-sticky-header__id--2OrlV\",\"action-title\":\"codetable-sticky-header__action-title--3de0E\",\"actionTitle\":\"codetable-sticky-header__action-title--3de0E\",\"action-title-container\":\"codetable-sticky-header__action-title-container--2WsM9\",\"actionTitleContainer\":\"codetable-sticky-header__action-title-container--2WsM9\",\"title\":\"codetable-sticky-header__title--2ZkY3\",\"hidden-long-description-container\":\"codetable-sticky-header__hidden-long-description-container--Jzjzl\",\"hiddenLongDescriptionContainer\":\"codetable-sticky-header__hidden-long-description-container--Jzjzl\",\"long-description\":\"codetable-sticky-header__long-description--176Gh\",\"longDescription\":\"codetable-sticky-header__long-description--176Gh\",\"long-description-container\":\"codetable-sticky-header__long-description-container--GJMSz\",\"longDescriptionContainer\":\"codetable-sticky-header__long-description-container--GJMSz\",\"exclamation-mark\":\"codetable-sticky-header__exclamation-mark--2yabS\",\"exclamationMark\":\"codetable-sticky-header__exclamation-mark--2yabS\"};","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://github.com/tc39/proposal-flatMap\n$({ target: 'Array', proto: true }, {\n flat: function flat(/* depthArg = 1 */) {\n var depthArg = arguments.length ? arguments[0] : undefined;\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));\n return A;\n }\n});\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\naddToUnscopables('flat');\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar setInternalState = require('../internals/internal-state').set;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.github.io/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var sticky;\n\n if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n return pattern;\n }\n\n if (CORRECT_NEW) {\n if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n } else if (pattern instanceof RegExpWrapper) {\n if (flagsAreUndefined) flags = getFlags.call(pattern);\n pattern = pattern.source;\n }\n\n if (UNSUPPORTED_Y) {\n sticky = !!flags && flags.indexOf('y') > -1;\n if (sticky) flags = flags.replace(/y/g, '');\n }\n\n var result = inheritIfRequired(\n CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n thisIsRegExp ? this : RegExpPrototype,\n RegExpWrapper\n );\n\n if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });\n\n return result;\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.github.io/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.link` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.link\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {\n link: function link(url) {\n return createHTML(this, 'a', 'href', url);\n }\n});\n","var $ = require('../internals/export');\nvar numberIsFinite = require('../internals/number-is-finite');\n\n// `Number.isFinite` method\n// https://tc39.github.io/ecma262/#sec-number.isfinite\n$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });\n","var IS_PURE = require('../internals/is-pure');\nvar getIterator = require('../internals/get-iterator');\n\nmodule.exports = IS_PURE ? getIterator : function (it) {\n // eslint-disable-next-line no-undef\n return Set.prototype.values.call(it);\n};\n","import { api } from './api';\r\nimport {\r\n RequestCase,\r\n ReceiveCase,\r\n LoadCaseFailure,\r\n ReceiveCasePermissions,\r\n ChildItemSelection,\r\n RequestCaseRiskMatrixDefinition,\r\n ReceiveCaseRiskMatrixDefinition,\r\n ChangeViewMode\r\n} from './action-types';\r\nimport {\r\n LoggedError,\r\n errorSafe\r\n} from 'app/infrastructure/redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { CompositeKeys, RenderMode, StoreItemPath } from 'app/types-shared';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { caseTypeId as getCaseTypeId, caseContextId as getCaseContextId } from 'app/infrastructure/data/wireformat';\r\nimport { getCaseId } from 'app/infrastructure/store';\r\nimport { SuccessNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { caseTranslations, viewModeCacheKey } from 'app/area/case/constants';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/index';\r\nimport { routeFromStoreItemPath, sectionFromStoreItemPath } from 'app/infrastructure/store/entity-route';\r\nimport { mapRiskMatrixDefinitionToStoreFormat } from 'app/area/case/features/risk-matrix/risk-matrix-definition';\r\nimport { ViewMode } from 'app/area/case/types-store';\r\nimport { clientCache } from 'app/infrastructure/universal';\r\nimport { actionCreators as responseCachingActionCreators } from 'app/area/shared/response-caching/actions';\r\n\r\nconst getCaseNo = (state: ApplicationState) => {\r\n const areaState = state.caseArea;\r\n const draftId = areaState.selectedId;\r\n return getCaseId(areaState.entities[draftId]);\r\n};\r\n\r\nconst entityPathRoute = (entityPath: StoreItemPath[]) => {\r\n\r\n const exceptTblTrans = s => Object.keys(s)[0] !== 'tblTrans';\r\n const makePath = (aggr, curr) => `${aggr}/${Object.keys(curr)[0]}/${curr[Object.keys(curr)[0]]}`;\r\n\r\n return !entityPath ? undefined : entityPath.filter(exceptTblTrans).reduce(makePath, '');\r\n};\r\n\r\nexport const actionCreators = {\r\n /**\r\n * Get risk matrix-definition for a case type.\r\n */\r\n caseRiskMatrixDefinition: (caseTypeId: number): ActionDispatching<any, any> => errorSafe(\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCaseRiskMatrixDefinition(caseTypeId));\r\n\r\n //TODO: Implement support for clearing and refetching outdated risk matrix-definitions based on eTag.\r\n const riskDefState = getState().caseArea.riskMatrixDefinitions[caseTypeId];\r\n const riskMatrixDef = (riskDefState && !riskDefState.fetching && riskDefState.definition) ||\r\n await api.caseRiskMatrixDefinition(caseTypeId);\r\n\r\n dispatch(new ReceiveCaseRiskMatrixDefinition(caseTypeId, mapRiskMatrixDefinitionToStoreFormat(riskMatrixDef)));\r\n }),\r\n /**\r\n * Edit case - right now, passed down to edit component\r\n */\r\n editDocument: (): ActionDispatching<any, ApplicationState> => async (\r\n dispatch: any,\r\n getState: any\r\n ) => {\r\n const caseNo = getCaseNo(getState());\r\n navigate.toCaseEdit(caseNo);\r\n },\r\n /**\r\n * Edit case - right now, passed down to edit component\r\n */\r\n editDocumentItem: (entityPath: StoreItemPath[]): ActionDispatching<any, ApplicationState> => async (\r\n dispatch: any,\r\n getState: any\r\n ) => {\r\n const caseNo = getCaseNo(getState());\r\n navigate.toCaseEdit(caseNo, entityPathRoute(entityPath));\r\n },\r\n /**\r\n * Loads **read data** for the given case\r\n * Once data is available, the UI definition is retreived from cache or server\r\n */\r\n loadCase: (\r\n caseNumber: number\r\n ): ActionDispatching<any, ApplicationState> => async (\r\n dispatch: any,\r\n getState: any\r\n ) => {\r\n try {\r\n\r\n dispatch(new RequestCase(caseNumber));\r\n\r\n const [caseData, casePermissions, bowtieSupported, surveyManagerSupported] = await Promise.all([\r\n api.case(caseNumber),\r\n api.casePermissions(caseNumber),\r\n api.bowtieSupported(caseNumber),\r\n api.surveyManagerSupported(caseNumber)\r\n ]);\r\n\r\n if (!caseData) {\r\n dispatch(new LoadCaseFailure());\r\n return;\r\n }\r\n\r\n const caseType = getCaseTypeId(caseData);\r\n const caseContextId = getCaseContextId(caseData);\r\n \r\n dispatch(actionCreators.caseRiskMatrixDefinition(caseType));\r\n const uiDef = await dispatch(responseCachingActionCreators.getUiDefinition(caseType, caseContextId));\r\n\r\n if (!uiDef) {\r\n dispatch(new LoadCaseFailure());\r\n return;\r\n }\r\n\r\n dispatch(new ReceiveCasePermissions(caseNumber, {\r\n ...casePermissions,\r\n bowtie: !!bowtieSupported && bowtieSupported.supported,\r\n surveyManager: !!surveyManagerSupported && surveyManagerSupported.supported\r\n }));\r\n dispatch(new ReceiveCase(caseNumber, caseData, { ...uiDef, applicationId: caseType }));\r\n\r\n } catch (err) {\r\n dispatch(new LoggedError(err));\r\n dispatch(new LoadCaseFailure());\r\n }\r\n },\r\n /**\r\n * Explicitly deleting a case\r\n */\r\n deleteDocument: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const state = getState().caseArea;\r\n const caseNo = getCaseNo(getState());\r\n const translate = createDescriptionSelector(state.texts);\r\n\r\n navigate.toStartupView();\r\n const result = (await api.deleteCase(caseNo)) as any;\r\n if (result && result.status === 204) {\r\n dispatch(\r\n new SuccessNotification(translate(caseTranslations.message_case_delete_success))\r\n );\r\n }\r\n }),\r\n /**\r\n * Duplicate case\r\n */\r\n duplicateDocument: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const caseNo = getCaseNo(getState());\r\n navigate.toCaseDuplicate(caseNo);\r\n }),\r\n\r\n /**\r\n * Navigate to bowtie\r\n */\r\n loadBowtie: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const caseNo = getCaseNo(getState());\r\n navigate.toBowtie(caseNo);\r\n }),\r\n\r\n changeViewMode: (mode: ViewMode): ActionDispatching<any, any> =>\r\n errorSafe((dispatch: any, getState: any) => {\r\n clientCache.setItem(viewModeCacheKey, mode);\r\n dispatch(new ChangeViewMode(mode));\r\n }),\r\n\r\n /**\r\n * An item in a child table of a case is selected by the user.\r\n * Ensure this is reflected in the state and routing\r\n */\r\n selectDocumentItem: (childItem: CompositeKeys): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n const { activeChildItem, entities, selectedId, renderMode, uiDefinition } = getState().caseArea;\r\n\r\n const isNavigatingFromChild = Array.isArray(activeChildItem);\r\n\r\n dispatch(new ChildItemSelection(childItem));\r\n\r\n // Use case number instead of id for the read mode route\r\n const currentCase = [{ tblTrans: getCaseId(entities[selectedId]) }];\r\n const childOfCase = childItem && [...currentCase, ...childItem.slice(1)];\r\n\r\n const section = sectionFromStoreItemPath(childOfCase, renderMode, uiDefinition);\r\n\r\n navigate.toChildItem(routeFromStoreItemPath(\r\n childOfCase || currentCase, RenderMode.read),\r\n section && section.id,\r\n isNavigatingFromChild\r\n );\r\n })\r\n};\r\n","import * as React from 'react';\r\nimport { ValidationProps, ValidationLevel } from './types';\r\n\r\nimport styles from './validation.scss';\r\nimport get from 'lodash/get';\r\n\r\nexport const getValidationStyle = level => level === ValidationLevel.error\r\n ? 'danger'\r\n : ValidationLevel[level];\r\n\r\nexport class Validation extends React.PureComponent<ValidationProps>{\r\n \r\n public render() {\r\n return (\r\n <div className={styles.messageWrapper}>\r\n <div className={styles.warningIcon}/>\r\n {Array.isArray(this.props.messages) &&\r\n <ul className={styles.messages}>\r\n {this.props.messages.map((item, index) => (\r\n <li key={index} className={`${!!item.level && 'list-group-item-' + getValidationStyle(item.level)}`}>\r\n {item.message}\r\n </li>))}\r\n </ul>\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Renders a validation summary panel, with one or multiple sets of validation errors\r\n * This is not the same as rendering <Validation/>, as this one wraps everything in a panel\r\n * @param props \r\n */\r\nexport const ValidationSummary: React.SFC<{validationError?: ValidationProps, validationErrors?: ValidationProps[]}> = props => {\r\n \r\n return get(props.validationError, 'messages.length') || get(props.validationErrors, 'length') ?\r\n <div>\r\n {props.validationErrors && props.validationErrors.map(validationError =>\r\n <div className={`alert-${validationError.level} ${styles.validationSummary} validationsummary`}> \r\n {\r\n <Validation {...validationError}/> \r\n }\r\n </div>)\r\n }\r\n\r\n {props.validationError && <div className={`alert-${getValidationStyle(props.validationError.level)} ${styles.validationSummary} validationsummary`}>\r\n {\r\n <Validation {...props.validationError}/>\r\n }\r\n </div>\r\n }\r\n </div>: null;\r\n};\r\n","import * as React from 'react';\r\nimport { ValidationProps } from './types';\r\nimport { getValidationStyle } from './validation';\r\n\r\nimport styles from './validation.scss';\r\n\r\n/**\r\n * Renders a validation summary in a flex layout.\r\n * Should always be used directly inside a <div> with class=\"row\".\r\n */\r\nexport const FlexValidation: React.SFC<ValidationProps> = ({messages}) =>\r\n Array.isArray(messages) && messages.length ? (\r\n <div className={`col-12 ${styles.flexValidation}`}>\r\n <ul>\r\n {messages.map((item, index) => (\r\n <li key={index} className={`${!!item.level && 'list-group-item-' + getValidationStyle(item.level)}`}>\r\n {`${item.label ? `${item.label}: ` : ''}${item.message}`}\r\n </li>))}\r\n </ul>\r\n </div>) : null;\r\n","export * from './validation';\r\nexport * from './flex-validation';\r\nexport * from './types';\r\n","import * as React from 'react';\r\nimport styles from './image.scss';\r\n\r\ninterface ObjectFitPolyfillProps{\r\n src: string;\r\n alt?: string;\r\n className?: string;\r\n cover?: boolean;\r\n [prop: string]: any;\r\n}\r\n\r\nconst supportObjectFit = 'objectFit' in document.documentElement.style === true;\r\n\r\nconst propToStyle = (target, source, propName) => {\r\n if(source[propName]) {\r\n if(String(source[propName]).indexOf('%') !== -1) {\r\n target[propName] = source[propName];\r\n } else {\r\n target[propName] = source[propName] + 'px';\r\n }\r\n }\r\n};\r\n\r\nexport const ObjectFitImage = ({src, alt, className, cover, ...rest}:ObjectFitPolyfillProps) => {\r\n const sizingStyle = cover ? styles.cover : styles.contain;\r\n const styleClassName = `image ${sizingStyle} ${className}`;\r\n\r\n if (supportObjectFit) {\r\n return <img src={src} alt={alt} className={styleClassName} {...rest} />;\r\n }\r\n\r\n const containerSize = {backgroundImage: `url(${src})`};\r\n propToStyle(containerSize, rest, 'width');\r\n propToStyle(containerSize, rest, 'height');\r\n\r\n return <div id={rest.id} role=\"image\" aria-label={alt}\r\n className={`${styles.fallback} ${styleClassName} `} style={containerSize}/>;\r\n\r\n};\r\n","export {ObjectFitImage} from './object-fit-image';\r\n","import { crashNotification } from './crash-notification';\r\nimport { isBrowser } from 'app/infrastructure/universal';\r\nimport { fatal, error } from 'app/infrastructure/log';\r\n\r\nlet applicationDidMount = false;\r\nlet dispatch: (obj: {}) => void = null;\r\n\r\n/**\r\n * Notify\r\n * \r\n * >Dispatches a user notification to be displayed\r\n * \r\n * In the case of type `ERROR`:\r\n * \r\n * -If application has rendered, dispatch an error action.\r\n * -Otherwise trigger a panic bar.\r\n */\r\nfunction notify(message: string, details?: string, type: string = 'ERROR'){\r\n \r\n if (applicationDidMount && !!message){\r\n dispatch({type, message, error: details });\r\n return;\r\n }\r\n \r\n // In case we are still in the critical startup execution phase\r\n if ( type === 'ERROR'){\r\n crashNotification(message, details);\r\n }\r\n\r\n}\r\n\r\n/**\r\n * Notify the user about a potentially recoverable error\r\n * \r\n * >Dispatches a redux action to trigger the notification visually\r\n * \r\n * -If application has rendered at the time of the error, dispatch an error action.\r\n * -Otherwise trigger a crash notification.\r\n */\r\nexport function notifyError(message: string, details?: string){\r\n notify(message, details, 'ERROR');\r\n}\r\n\r\n/**\r\n * Must be called by the application root component to signal that we are \r\n * mounted and ready to notify users trough react and redux\r\n */\r\nexport function enableNotifications(element: any, dispatcher: any){\r\n applicationDidMount = true;\r\n dispatch = dispatcher;\r\n}\r\n\r\n/**\r\n * Offers a visual notification if anything fails during app startup\r\n */\r\nexport function enableStartupCrashNotifications(){\r\n if (!isBrowser){\r\n return (f: any) => f;\r\n }\r\n window.onerror = fatal; \r\n return () => {\r\n // the critical path is now done, reset to default error behaviour \r\n window.onerror = error;\r\n };\r\n}\r\n","import { TextCollection } from 'app/types-shared';\r\n\r\nfunction textDescription(collection: TextCollection, id: number): string {\r\n if (!collection || !collection.texts) {\r\n return '';\r\n }\r\n const text = collection.texts.find(t => !!t.id && t.id.no === id);\r\n return (text && text.description) || '';\r\n}\r\n\r\n/**\r\n * Partial function to retreive description property from props.\r\n * \r\n * @export\r\n * @param predicate to return {TextDictionary} texts\r\n * @returns\r\n */\r\nexport function createDescriptionSelector(collection: TextCollection) {\r\n return (id: number) => textDescription(collection, id);\r\n}\r\n","import * as React from 'react';\r\nimport { SelectItem, SelectType } from '../types';\r\nimport { SelectOption } from '../select-option';\r\nimport { OptionSelectMark, OptionDescription } from '../option';\r\nimport { SelectOptions } from '../select-options';\r\nimport { RadioSymbol, CheckSymbol } from 'ui';\r\nimport { isMultiple } from '../select-type';\r\n\r\nexport interface FlatOptionsProps {\r\n options: SelectItem[];\r\n valueItems: SelectItem[];\r\n showIcons: boolean;\r\n selectType?: SelectType;\r\n showLongDescription?: boolean;\r\n onSelectOption: (item: SelectItem) => void;\r\n}\r\n\r\nexport class FlatOptions extends React.Component<FlatOptionsProps> {\r\n\r\n private renderItem = (item: SelectItem, selectedValues: (string|number)[]) => {\r\n const { selectType, showIcons, showLongDescription, onSelectOption } = this.props;\r\n const longDescriptionValue = showLongDescription && !!item.longDescription ? item.longDescription : '';\r\n const selectSymbol = isMultiple(selectType) ? <CheckSymbol /> : <RadioSymbol /> ;\r\n\r\n return <SelectOption key={item.value} selectType={selectType} hasChildren={false} longDescription={longDescriptionValue}>\r\n <OptionSelectMark selectType={selectType}\r\n item={item}\r\n onSelect={onSelectOption}\r\n isSelected={selectedValues.indexOf(item.value) > -1}\r\n />\r\n <OptionDescription item={item} showIcons={showIcons} selectSymbol={selectSymbol}/>\r\n </SelectOption>;\r\n }\r\n\r\n public render() {\r\n const selectedValues = this.props.valueItems.map(i=>i.value);\r\n return (\r\n <SelectOptions showLongDescriptions={this.props.showLongDescription}>\r\n {this.props.options.map(item => this.renderItem(item, selectedValues))}\r\n </SelectOptions>\r\n );\r\n }\r\n}\r\n","import { CaseState, RiskMatrixAxis, RiskMatrixDefinition } from 'app/area/case/types-store';\r\nimport { entityValue } from 'app/infrastructure/store/entity';\r\nimport { getById } from 'app/infrastructure/store/query';\r\nimport {\r\n contextToStorePath,\r\n getEntityContext,\r\n getCaseData\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { StoreData, ComplexValue } from 'app/types-shared';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\n\r\nexport const mapRiskMatrixDefinitionToStoreFormat = (wireFormat: any) => {\r\n return {\r\n ...wireFormat,\r\n ...{\r\n axes: [\r\n ...wireFormat.axes.map(a => ({\r\n ...a,\r\n data: {\r\n ...a.data,\r\n options: a.data.options.map(o => codeItemToStoreValue(o))\r\n }\r\n }))\r\n ],\r\n cells: [\r\n ...wireFormat.cells.map(c => ({\r\n axisValues: c.axisValues,\r\n data: {\r\n riskArea: codeItemToStoreValue(c.data.riskArea),\r\n weight: c.data.weight\r\n }\r\n }))\r\n ]\r\n }\r\n } as RiskMatrixDefinition;\r\n};\r\n\r\nconst categoryFilter = consequenceType => o =>\r\n o.categoryId === undefined || o.categoryId === consequenceType;\r\n\r\nexport const createAxes = (\r\n def: RiskMatrixDefinition,\r\n consequenceType: number\r\n) => {\r\n const defaultAxisConfig = {\r\n editable: false,\r\n fakeAxis: true,\r\n data: {\r\n description: '',\r\n options: [{ value: 1, description: '' } as ComplexValue<number>],\r\n codetableId: 0,\r\n pleaseSelectDescription: ''\r\n }\r\n };\r\n\r\n const createAxisConfig = (axisId: number) => {\r\n const axisIndex = def.axes.findIndex(a => a.id === axisId);\r\n const axis =\r\n axisIndex > -1\r\n ? def.axes[axisIndex]\r\n : { ...defaultAxisConfig, id: axisId };\r\n return {\r\n ...axis,\r\n data: {\r\n ...axis.data,\r\n options: axis.data.options.filter(categoryFilter(consequenceType))\r\n }\r\n };\r\n };\r\n\r\n const axes = def.axes.map(a => createAxisConfig(a.id));\r\n\r\n // Create default axis if one is missing\r\n const requiredAxisIds = [0, 1];\r\n\r\n requiredAxisIds\r\n .filter(\r\n requiredAxisId => axes.findIndex(a => a.id === requiredAxisId) === -1\r\n )\r\n .map(requiredAxisId =>\r\n axes.push({ ...defaultAxisConfig, id: requiredAxisId })\r\n );\r\n\r\n return axes;\r\n};\r\n\r\nexport const createAxisValueCombinations = (\r\n axes: RiskMatrixAxis[],\r\n consequenceType: number\r\n) => {\r\n // Recursively select.\r\n const getCombinations = (axisIndex, axisValues, accumulatedCombinations) => {\r\n const axis = axes[axisIndex];\r\n // Add every combination for every other axis.\r\n for (const otherOption of axis.data.options.filter(\r\n categoryFilter(consequenceType)\r\n )) {\r\n const vals = [...axisValues, otherOption];\r\n\r\n if (axisIndex + 1 < axes.length) {\r\n getCombinations(axisIndex + 1, vals, accumulatedCombinations);\r\n } else {\r\n accumulatedCombinations.push([...axisValues, otherOption]);\r\n }\r\n }\r\n };\r\n\r\n const combinations = [];\r\n getCombinations(0, [], combinations);\r\n\r\n return combinations;\r\n};\r\n\r\nexport const transformToComponentFormat = (\r\n storeDefinition: { definition: RiskMatrixDefinition; fetching: boolean },\r\n uiEngineProps: any\r\n): RiskMatrixDefinition => {\r\n const consequenceType = uiEngineProps.resolveContext.primaryKey.value;\r\n\r\n if (storeDefinition.fetching) {\r\n return undefined;\r\n }\r\n\r\n const baseDef = storeDefinition.definition;\r\n\r\n const conseqOptionToValue = o =>\r\n (o.extra && o.extra.severity) ||\r\n (o.extra && o.extra.recurrence) ||\r\n (o.extra && o.extra.likelihood) ||\r\n o.value;\r\n\r\n const axes = createAxes(baseDef, consequenceType);\r\n const combinations = createAxisValueCombinations(axes, consequenceType);\r\n\r\n return {\r\n ...baseDef,\r\n axes,\r\n cells:\r\n baseDef.cells.length === 0\r\n ? []\r\n : combinations.map(comb => ({\r\n axisValues: [...comb],\r\n data: baseDef.cells.find(c =>\r\n baseDef.axes.reduce(\r\n (acc, v) =>\r\n acc && c.axisValues[v.id] === conseqOptionToValue(comb[v.id]),\r\n true\r\n )\r\n ).data\r\n }))\r\n };\r\n};\r\n\r\nexport const preselectedRiskMatrixValues = (\r\n state: CaseState,\r\n uiEngineProps: any,\r\n definition: RiskMatrixDefinition\r\n) => {\r\n if (!definition) {\r\n return [];\r\n }\r\n\r\n const caseData: StoreData = getCaseData(state, uiEngineProps);\r\n const context = getEntityContext(state, uiEngineProps);\r\n\r\n const getAxisComponent = (axisId: number) => {\r\n const axis = definition.axes.find(a => a.id === axisId);\r\n return uiEngineProps.componentDescriptor.children.find(\r\n c => c.codetable === axis.data.codetableId\r\n );\r\n };\r\n\r\n return definition.axes.reduce((acc, axis) => {\r\n if (axis.fakeAxis) {\r\n // For fake axes we default to selecting the first option.\r\n const value =\r\n axis.data &&\r\n axis.data.options &&\r\n axis.data.options.length > 0 &&\r\n axis.data.options[0].value;\r\n acc.push(value || 0);\r\n } else {\r\n const axisComponent = getAxisComponent(axis.id);\r\n const entity =\r\n axisComponent &&\r\n getById(caseData, contextToStorePath(axisComponent, context));\r\n\r\n const value = (entity &&\r\n entityValue(entity, axisComponent.dataTag)) as number;\r\n acc.push(value || 0);\r\n }\r\n\r\n return acc;\r\n }, []);\r\n};\r\n","import * as React from 'react';\r\nimport {\r\n makeCancelable,\r\n CancelablePromise\r\n} from 'app/infrastructure/js/cancelable-promise';\r\nimport { error } from 'app/infrastructure/log';\r\n\r\nexport interface RemoteBlobProps {\r\n loadBlob: () => Promise<Blob>;\r\n children(props: RemoteBlobInjectedProps): JSX.Element;\r\n onLoad?: () => void;\r\n onError?: () => void;\r\n}\r\n\r\nexport interface RemoteBlobState {\r\n objectUrl?: string;\r\n error: boolean;\r\n}\r\n\r\nexport interface RemoteBlobInjectedProps {\r\n objectUrl?: string;\r\n error: boolean;\r\n}\r\n\r\nexport class RemoteBlob extends React.Component<\r\n RemoteBlobProps,\r\n RemoteBlobState\r\n> {\r\n private loadPromise: CancelablePromise<Blob>;\r\n\r\n constructor(props: RemoteBlobProps) {\r\n super(props);\r\n\r\n this.state = {\r\n objectUrl: undefined,\r\n error: false\r\n };\r\n }\r\n\r\n public async componentDidMount() {\r\n try {\r\n this.loadPromise = makeCancelable(this.props.loadBlob());\r\n const blob = await this.loadPromise.promise;\r\n blob && this.setState({ objectUrl: window.URL.createObjectURL(blob) });\r\n this.loadPromise = undefined;\r\n this.props.onLoad && this.props.onLoad();\r\n } catch (e) {\r\n if (e && e.isCanceled) {\r\n return;\r\n }\r\n error(e);\r\n this.setState({ error: true });\r\n this.props.onError && this.props.onError();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n if (this.state.objectUrl) {\r\n window.URL.revokeObjectURL(this.state.objectUrl);\r\n }\r\n if (this.loadPromise) {\r\n this.loadPromise.cancel();\r\n this.loadPromise = undefined;\r\n }\r\n }\r\n\r\n public render() {\r\n return (\r\n this.props.children &&\r\n this.props.children({\r\n objectUrl: this.state.objectUrl,\r\n error: this.state.error\r\n })\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport {RemoteBlob} from './remote-blob';\r\n\r\nexport const RemoteImage = (props) => {\r\n const {children, ...rest} = props;\r\n\r\n return (<RemoteBlob {...rest}>\r\n {({ objectUrl, error }) =>\r\n error || !objectUrl ? <div className=\"image-loading\"/> :\r\n children ? children(objectUrl) : <img className=\"img-fluid\" src={objectUrl} />\r\n }\r\n </RemoteBlob>);\r\n};\r\n","export { RemoteBlob } from './remote-blob';\r\nexport { RemoteImage } from './remote-image';\r\n","import * as React from 'react';\r\nimport { scheduleUpdate } from 'app/infrastructure/platform/browser';\r\n\r\n/**\r\n * The internal singleton registry to re-use one observer for multiple\r\n * observed targets\r\n */\r\nexport const targetRegistry = {};\r\nexport const observerRegistry = {};\r\nconst removeInstance = (registry, name) => delete registry[name];\r\nconst getInstance = <T>(registry, name, initialValue: T) => {\r\n registry[name] = registry[name] || initialValue;\r\n return registry[name];\r\n};\r\n\r\nexport interface ChildObserverProps{\r\n options?: Partial<IntersectionObserverInit>;\r\n name: string;\r\n active: boolean;\r\n id: number | string;\r\n onUpdate: (\r\n current:IntersectionObserverEntry[],\r\n nextUpdate: IntersectionObserverEntry[],\r\n previousUpdate: IntersectionObserverEntry[]\r\n ) => void;\r\n children: any;\r\n}\r\n\r\n/**\r\n * A component that can observe multiple children using one single observer.\r\n * Also supports children of type null becoming observed when rendered as component.\r\n * Each observed child target can provide it's own callback function to receive\r\n * updates when visibility tresholds are crossed.\r\n * This allows one callback to receive all observed children on every update.\r\n */\r\nexport class ChildObserver extends React.Component<ChildObserverProps>{\r\n\r\n private options: IntersectionObserverInit = {\r\n root: null,\r\n rootMargin: '-200px 0px',\r\n threshold: [.01, .05, .1, .2, .5, 1 ]\r\n };\r\n\r\n private targets: {id: number | string, callback: (...args:any) => void }[];\r\n private previousUpdate: IntersectionObserverEntry[];\r\n private observer:IntersectionObserver;\r\n\r\n constructor(props:ChildObserverProps){\r\n super(props);\r\n this.options = {...this.options, ...props.options};\r\n }\r\n\r\n public componentDidMount(){\r\n this.props.active &&\r\n this.props.children &&\r\n this.startObserving();\r\n }\r\n\r\n /**\r\n * Starts observing all queued children.\r\n *\r\n * By design, observe may be called multiple times for the same\r\n * dom element but still holding only one observer slot\r\n */\r\n private startObserving = () => {\r\n const {name, id, onUpdate} = this.props;\r\n this.observer = getInstance(\r\n observerRegistry,\r\n name,\r\n new IntersectionObserver(this.handleUpdatedIntersection, this.options)\r\n );\r\n this.targets = getInstance(targetRegistry, name, []);\r\n this.targets.push({id:id, callback: onUpdate});\r\n scheduleUpdate( ()=>\r\n this.targets.forEach(\r\n target => {\r\n const el = document.getElementById(`${target.id}`);\r\n el && this.observer.observe(el);\r\n })\r\n );\r\n }\r\n\r\n public componentWillUnmount(){\r\n this.stopObserving();\r\n }\r\n\r\n private stopObserving = () => {\r\n const {name} = this.props;\r\n this.observer && this.observer.disconnect();\r\n removeInstance(observerRegistry, name);\r\n removeInstance(targetRegistry, name);\r\n }\r\n\r\n private restartObserving(){\r\n this.stopObserving();\r\n this.startObserving();\r\n }\r\n\r\n public componentDidUpdate(prev: ChildObserverProps){\r\n if( prev.active !== this.props.active ){\r\n this.props.active ? this.startObserving() : this.stopObserving();\r\n }\r\n if(prev.children === null && this.props.children){\r\n this.restartObserving();\r\n }\r\n }\r\n\r\n /**\r\n * When the amount of a target element which is visible within the root element crosses one of the visibility thresholds\r\n */\r\n public handleUpdatedIntersection = (updates:IntersectionObserverEntry[]) => {\r\n\r\n const nextUpdate = [\r\n ...(this.previousUpdate || updates)\r\n ];\r\n\r\n if(this.previousUpdate){\r\n updates.forEach(update => {\r\n const i = nextUpdate.findIndex(x => x.target.id === update.target.id);\r\n i > -1 && nextUpdate.splice(i, 1, update );\r\n });\r\n }\r\n\r\n this.targets.forEach(target => target.callback(updates, nextUpdate, this.previousUpdate) );\r\n this.previousUpdate = nextUpdate;\r\n }\r\n\r\n public render(){\r\n return this.props.children;\r\n }\r\n\r\n}\r\n","export * from './tab-item/tab-item';\r\nexport * from './tab-container/tab-container';\r\nexport * from './child-observer';\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"connect-case-selector__visuallyhidden--1N6PF\",\"focusable\":\"connect-case-selector__focusable--1LluY\",\"input-wrapper\":\"connect-case-selector__input-wrapper--3m0zh\",\"inputWrapper\":\"connect-case-selector__input-wrapper--3m0zh\",\"small-icon\":\"connect-case-selector__small-icon--1nThv\",\"smallIcon\":\"connect-case-selector__small-icon--1nThv\",\"add-button\":\"connect-case-selector__add-button--_bqEQ\",\"addButton\":\"connect-case-selector__add-button--_bqEQ\",\"connected-case-tile\":\"connect-case-selector__connected-case-tile--q07vI\",\"connectedCaseTile\":\"connect-case-selector__connected-case-tile--q07vI\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdTrendingUp = function MdTrendingUp(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm26.6 10h10v10l-3.8-3.8-10.5 10.4-6.6-6.6-10 10-2.3-2.3 12.3-12.4 6.6 6.7 8.2-8.2z' })\n )\n );\n};\n\nexports.default = MdTrendingUp;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"message-to-user__visuallyhidden--1LR_R\",\"focusable\":\"message-to-user__focusable--1m2C-\",\"messages-to-user-panel\":\"message-to-user__messages-to-user-panel--2AocS\",\"messagesToUserPanel\":\"message-to-user__messages-to-user-panel--2AocS\",\"header\":\"message-to-user__header--1TFfT\",\"message-container\":\"message-to-user__message-container--31KZv\",\"messageContainer\":\"message-to-user__message-container--31KZv\",\"unread-container\":\"message-to-user__unread-container--2KBKc\",\"unreadContainer\":\"message-to-user__unread-container--2KBKc\",\"message\":\"message-to-user__message--2jnAc\",\"message-text\":\"message-to-user__message-text--2sTkX\",\"messageText\":\"message-to-user__message-text--2sTkX\",\"date\":\"message-to-user__date--3GwZF\",\"updating\":\"message-to-user__updating--2I6de\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-options__visuallyhidden--3c6aU\",\"focusable\":\"display-options__focusable--1oj6u\",\"main\":\"display-options__main--3CKhi\",\"sort-order\":\"display-options__sort-order--2_jNB\",\"sortOrder\":\"display-options__sort-order--2_jNB\",\"view-as\":\"display-options__view-as--PQama\",\"viewAs\":\"display-options__view-as--PQama\",\"meatball\":\"display-options__meatball--1QJLL\",\"outer-label\":\"display-options__outer-label--Necc6\",\"outerLabel\":\"display-options__outer-label--Necc6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"prompt-confirmation__visuallyhidden--1SvLZ\",\"focusable\":\"prompt-confirmation__focusable--3axrA\",\"text\":\"prompt-confirmation__text--1SMtw\",\"warning\":\"prompt-confirmation__warning--yjWHn\",\"label\":\"prompt-confirmation__label--34XpJ\",\"message\":\"prompt-confirmation__message--2-sOa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-number__visuallyhidden--1dJ_e\",\"focusable\":\"display-number__focusable--3cPbx\",\"number\":\"display-number__number--4SIhL\",\"label\":\"display-number__label--2qQjl\",\"stacked-column\":\"display-number__stacked-column--1p25n\",\"stackedColumn\":\"display-number__stacked-column--1p25n\",\"primary\":\"display-number__primary--tCZa5\",\"secondary\":\"display-number__secondary--2Nnhs\",\"strong\":\"display-number__strong--xmBJG\",\"align-end\":\"display-number__align-end--1MGJZ\",\"alignEnd\":\"display-number__align-end--1MGJZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-text__visuallyhidden--oGeM8\",\"focusable\":\"display-text__focusable--3dCLv\",\"text\":\"display-text__text--3bmPJ\",\"text-comment\":\"display-text__text-comment--3ZntB\",\"textComment\":\"display-text__text-comment--3ZntB\",\"stacked-column\":\"display-text__stacked-column--2Jc8M\",\"stackedColumn\":\"display-text__stacked-column--2Jc8M\",\"primary\":\"display-text__primary--rB-S0\",\"secondary\":\"display-text__secondary--1ADuy\",\"invert-strong\":\"display-text__invert-strong--2DAZv\",\"invertStrong\":\"display-text__invert-strong--2DAZv\",\"strong\":\"display-text__strong--3X4sg\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-boolean__visuallyhidden--2qb-u\",\"focusable\":\"display-boolean__focusable--Ffcf_\",\"label-and-boolean\":\"display-boolean__label-and-boolean--3IFMh\",\"labelAndBoolean\":\"display-boolean__label-and-boolean--3IFMh\",\"stacked-column\":\"display-boolean__stacked-column--b3n0a\",\"stackedColumn\":\"display-boolean__stacked-column--b3n0a\",\"strong\":\"display-boolean__strong--3xFRO\",\"secondary\":\"display-boolean__secondary--1CpDb\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"badge-list__visuallyhidden--3LyvA\",\"focusable\":\"badge-list__focusable--2f8sI\",\"badgelist-wrapper\":\"badge-list__badgelist-wrapper--cqgnP\",\"badgelistWrapper\":\"badge-list__badgelist-wrapper--cqgnP\",\"count-circle\":\"badge-list__count-circle--3K6S8\",\"countCircle\":\"badge-list__count-circle--3K6S8\",\"label\":\"badge-list__label--Dg9bL\",\"strong\":\"badge-list__strong--2Y-Dh\",\"tooltip-overwrite\":\"badge-list__tooltip-overwrite--28OjB\",\"tooltipOverwrite\":\"badge-list__tooltip-overwrite--28OjB\",\"items\":\"badge-list__items--214ik\",\"single\":\"badge-list__single--1nahw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"access-card__visuallyhidden--1gEFw\",\"focusable\":\"access-card__focusable--BYmk9\",\"access-header\":\"access-card__access-header--3GmfZ\",\"accessHeader\":\"access-card__access-header--3GmfZ\",\"access-card\":\"access-card__access-card--fUXH4\",\"accessCard\":\"access-card__access-card--fUXH4\",\"access-card-container\":\"access-card__access-card-container--29QeN\",\"accessCardContainer\":\"access-card__access-card-container--29QeN\",\"access-content\":\"access-card__access-content---N8-e\",\"accessContent\":\"access-card__access-content---N8-e\",\"has-danger\":\"access-card__has-danger--2n6BB\",\"hasDanger\":\"access-card__has-danger--2n6BB\",\"read-only\":\"access-card__read-only--3eOY8\",\"readOnly\":\"access-card__read-only--3eOY8\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"summary-tile-view__visuallyhidden--3u0LN\",\"focusable\":\"summary-tile-view__focusable--1QblP\",\"container\":\"summary-tile-view__container--3d5Ac\",\"summary-tile-view\":\"summary-tile-view__summary-tile-view--1VrJ6\",\"summaryTileView\":\"summary-tile-view__summary-tile-view--1VrJ6\",\"items-wrapper\":\"summary-tile-view__items-wrapper--3XM8T\",\"itemsWrapper\":\"summary-tile-view__items-wrapper--3XM8T\",\"items\":\"summary-tile-view__items--39Hi6\",\"item\":\"summary-tile-view__item--3Crrm\",\"double-width\":\"summary-tile-view__double-width--3vGPp\",\"doubleWidth\":\"summary-tile-view__double-width--3vGPp\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"toastify-override__visuallyhidden--sKZgp\",\"focusable\":\"toastify-override__focusable--1A7tH\",\"container\":\"toastify-override__container--1AwJb\",\"error\":\"toastify-override__error--1WHGF\",\"success\":\"toastify-override__success--3ZvLy\",\"title\":\"toastify-override__title--24va-\",\"error-progress\":\"toastify-override__error-progress--3fMaa\",\"errorProgress\":\"toastify-override__error-progress--3fMaa\",\"success-progress\":\"toastify-override__success-progress--1xVHa\",\"successProgress\":\"toastify-override__success-progress--1xVHa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"fullscreen-code-selector__visuallyhidden--37a7K\",\"focusable\":\"fullscreen-code-selector__focusable--15In-\",\"fullscreen-code-selector\":\"fullscreen-code-selector__fullscreen-code-selector--FYUA5\",\"fullscreenCodeSelector\":\"fullscreen-code-selector__fullscreen-code-selector--FYUA5\",\"select-case-container\":\"fullscreen-code-selector__select-case-container--CueLW\",\"selectCaseContainer\":\"fullscreen-code-selector__select-case-container--CueLW\",\"select-title\":\"fullscreen-code-selector__select-title--1hY66\",\"selectTitle\":\"fullscreen-code-selector__select-title--1hY66\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"category-tile__visuallyhidden--1ximm\",\"focusable\":\"category-tile__focusable--2Pl61\",\"category-tile-heading\":\"category-tile__category-tile-heading--3I1AF\",\"categoryTileHeading\":\"category-tile__category-tile-heading--3I1AF\",\"display-codes\":\"category-tile__display-codes--mavaz\",\"displayCodes\":\"category-tile__display-codes--mavaz\",\"category-tile\":\"category-tile__category-tile--3O8lT\",\"categoryTile\":\"category-tile__category-tile--3O8lT\",\"long-description\":\"category-tile__long-description--2tyHJ\",\"longDescription\":\"category-tile__long-description--2tyHJ\",\"has-meatball\":\"category-tile__has-meatball--1EpA5\",\"hasMeatball\":\"category-tile__has-meatball--1EpA5\",\"category-tile-view\":\"category-tile__category-tile-view--25PmN\",\"categoryTileView\":\"category-tile__category-tile-view--25PmN\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tile-field__visuallyhidden--vhsBd\",\"focusable\":\"tile-field__focusable--3G7vE\",\"tile-value\":\"tile-field__tile-value--1UwSk\",\"tileValue\":\"tile-field__tile-value--1UwSk\",\"tile-colorbox\":\"tile-field__tile-colorbox--2Tdq6\",\"tileColorbox\":\"tile-field__tile-colorbox--2Tdq6\",\"tile-dark-background\":\"tile-field__tile-dark-background--2L3iQ\",\"tileDarkBackground\":\"tile-field__tile-dark-background--2L3iQ\",\"tile-no-drilldown\":\"tile-field__tile-no-drilldown--XZuFB\",\"tileNoDrilldown\":\"tile-field__tile-no-drilldown--XZuFB\",\"tile-with-drilldown\":\"tile-field__tile-with-drilldown--30FV1\",\"tileWithDrilldown\":\"tile-field__tile-with-drilldown--30FV1\",\"tile-label\":\"tile-field__tile-label--71CIr\",\"tileLabel\":\"tile-field__tile-label--71CIr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-list__visuallyhidden--169Ty\",\"focusable\":\"codetable-list__focusable--2P1lO\",\"breadcrumb-row\":\"codetable-list__breadcrumb-row--2k6w2\",\"breadcrumbRow\":\"codetable-list__breadcrumb-row--2k6w2\",\"codetable-header\":\"codetable-list__codetable-header--2QMto\",\"codetableHeader\":\"codetable-list__codetable-header--2QMto\",\"list-items-container\":\"codetable-list__list-items-container--1PyNn\",\"listItemsContainer\":\"codetable-list__list-items-container--1PyNn\",\"list-items\":\"codetable-list__list-items--Mv5YJ\",\"listItems\":\"codetable-list__list-items--Mv5YJ\",\"hierarchy-results\":\"codetable-list__hierarchy-results--3b5LD\",\"hierarchyResults\":\"codetable-list__hierarchy-results--3b5LD\",\"breadcrumb-placeholder\":\"codetable-list__breadcrumb-placeholder--2vbfR\",\"breadcrumbPlaceholder\":\"codetable-list__breadcrumb-placeholder--2vbfR\"};","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar isArray = require('../internals/is-array');\n\nvar nativeReverse = [].reverse;\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n reverse: function reverse() {\n // eslint-disable-next-line no-self-assign\n if (isArray(this)) this.length = this.length;\n return nativeReverse.call(this);\n }\n});\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.github.io/ecma262/#sec-isarray\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6)\n};\n","import * as React from 'react';\r\nimport { SingleValueComponent, LabelConfig } from '../common';\r\n\r\n/**\r\n * Link to internal or external url. Opened in new tab or window.\r\n */\r\nexport interface LinkProps extends Partial<SingleValueComponent<string>>{\r\n /**\r\n * @internal\r\n */\r\n url?: string;\r\n /**\r\n * Overrides the displayed link text if no label.text is provided\r\n */\r\n linkText?: string;\r\n /**\r\n * Standard label config. label.text is the primary source for displayed link text.\r\n */\r\n label?: LabelConfig;\r\n /**\r\n * @internal\r\n */\r\n urlFromTemplateString?: string;\r\n /**\r\n * Optional styles.\r\n * @internal\r\n */\r\n style?: any;\r\n}\r\n\r\n/**\r\n * Component to open a link with target _blank\r\n */\r\nexport const Link: React.SFC<LinkProps> = (props) => {\r\n const {\r\n componentId,\r\n children,\r\n className,\r\n url,\r\n linkText,\r\n value,\r\n label,\r\n style,\r\n urlFromTemplateString\r\n } = props;\r\n\r\n const linkUrl = url || urlFromTemplateString;\r\n const displayText = label && label.text ? label.text : linkText || value || linkUrl;\r\n return linkUrl ? <a id={componentId} className={className} style={style} target=\"_blank\" rel=\"noopener noreferrer\" href={linkUrl}>\r\n {children || displayText}\r\n </a> : <div className={className} style={style}>{children || displayText}</div>;\r\n};\r\n","export * from './link';\r\n","\r\n/**\r\n * Combine absolute and relative URLs\r\n * \r\n * example\r\n * \r\n * concat('http://domain.com/', '/aweful/WICKED/', '/hard/', '/to/', 'join/', 'these', 'variants', '?considering=how', '&easy=it', '&is')\r\n * \r\n * >http://domain.com/aweful/WICKED/hard/to/join/these/variants?considering=how&easy=it&is\r\n */\r\nexport function concatUrl(url1: string, ...paths: any[]):string{\r\n const base = url1.substr(-1) === '/' ? url1 : `${url1}/`;\r\n \r\n return (paths || []).reduce((prev, current) => {\r\n if (current === undefined || current === null ){\r\n return prev;\r\n }\r\n const path = current.toString().match(/[^\\/\\\\]+/g).join('/');\r\n return /[\\?|\\&|\\=]/.test(path) || /\\/$/.test(prev) ? `${prev}${path}` : `${prev}/${path}`; \r\n }, base);\r\n}\r\n","import { injectIntl } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { createDescriptionSelector, textCollectionActionCreators } from '../translate';\r\nimport { withTranslation } from '../translate/with-translation';\r\nimport { invariant } from '../log/index';\r\nimport { bindActionCreators } from 'redux';\r\nimport { ComponentClass } from 'react';\r\nimport { AppSetting } from 'app/startup/default/appsettings';\r\n\r\nexport interface TextMap { [index: string]: number; }\r\nexport type TextMapResolver = (props: any) => TextMap;\r\n\r\n/**\r\n * Return a object with a prop for each defined language code constant,\r\n * where the object property name corresponds to the constant name (instead\r\n * of the numeric language code)\r\n *\r\n * @param textSelector\r\n * @param translationMap Object map, or function returning an object map: (props) => objectmap\r\n * @param props\r\n */\r\n// tslint:disable-next-line:one-variable-per-declaration\r\nexport const mapTextPropsFromState = (\r\n textSelector: (key: number) => string,\r\n translationMap: TextMap | TextMapResolver,\r\n props\r\n) => {\r\n\r\n const textProps = {};\r\n const textMap = typeof translationMap === 'function' ? translationMap(props) : translationMap;\r\n\r\n Object.keys(textMap).forEach((name, index) => {\r\n textProps[name] = textSelector(\r\n textMap[name]\r\n ) || '';\r\n });\r\n return textProps;\r\n};\r\n\r\nexport const mapSharedState = (state: ApplicationState)=>({\r\n ...state.app.userInfo,\r\n locale: state.app.locale,\r\n authState: state.app.authState,\r\n settings: state.app.settings\r\n});\r\n\r\nexport const mapPropsFromSelectors = (injectSelectors, state, props) => {\r\n const selectorProps = {};\r\n if (injectSelectors) {\r\n Object.keys(injectSelectors).forEach((selector) => {\r\n selectorProps[selector] = injectSelectors[selector](state, props);\r\n });\r\n }\r\n return selectorProps;\r\n};\r\n\r\nexport const mapPropsFromTranslations = (injectTranslations, props) => {\r\n let textProps = {};\r\n if(injectTranslations){\r\n textProps = mapTextPropsFromState(\r\n createDescriptionSelector(props.texts),\r\n injectTranslations,\r\n props\r\n );\r\n }\r\n return textProps;\r\n};\r\n\r\n/**\r\n * Connects a component using redux `connect()`, plus:\r\n * - connects to the slice of state given by 'statePath' static property of component\r\n * - adding translated language texts as individual component props\r\n * - adds application shared state as `props.sharedState`\r\n */\r\nexport function containerFactory<TProps>(\r\n component: any,\r\n actionCreators: any = {},\r\n injectSelectors: any = {},\r\n injectTranslations: TextMap | TextMapResolver = {}): ComponentClass<TProps> {\r\n\r\n //TODO: deprecate the usage of static `statePath`. We want to move forward in a pure/functional direction and\r\n // remove the requirement of class usage. statePath might just as well be passed in as parameter, to remove the coupling\r\n // of a component to a specific state slice\r\n invariant(component.statePath, `Container component ${component.name} must define a static property named \"statePath\"`);\r\n\r\n const stateToProps = (state: ApplicationState, props: any) => {\r\n\r\n const componentState = state[component.statePath];\r\n const appsettingsTexts = AppSetting.Translations[component.statePath] as any;\r\n\r\n // Not throwing errors risks sending the application into a infinite loop\r\n invariant( !!componentState,\r\n `The state slice \"${component.statePath}\" does not exist.\r\n Most probably you forgot to set default reducer state or forgot to return state in reducer.`);\r\n\r\n const stateAndSelectorProps = {\r\n\r\n statePath: component.statePath,\r\n\r\n sharedState: mapSharedState(state),\r\n\r\n ...componentState,\r\n\r\n ...mapPropsFromSelectors(injectSelectors, componentState, props)\r\n\r\n };\r\n\r\n return {\r\n ...stateAndSelectorProps,\r\n translation: {\r\n ...appsettingsTexts,\r\n ...mapPropsFromTranslations(injectTranslations, stateAndSelectorProps)\r\n }\r\n };\r\n };\r\n\r\n const mapDispatchToProps = (dispatch: any) => {\r\n const actions = { ...actionCreators, ...textCollectionActionCreators };\r\n return { dispatch, ...bindActionCreators(actions, dispatch) };\r\n };\r\n\r\n const target: any = injectIntl(component);\r\n\r\n const areaComponent = withTranslation(target, component.statePath);\r\n\r\n return connect(\r\n stateToProps,\r\n mapDispatchToProps\r\n )(areaComponent);\r\n}\r\n","import * as React from 'react';\r\nimport { Button, ButtonProps } from './button';\r\nimport styles from './button-inline.scss';\r\n\r\nexport const ButtonInline: React.SFC<ButtonProps> = props => {\r\n const { children, ...rest } = props;\r\n\r\n return (\r\n <Button btnType=\"\" classNames={`standalone-link ${styles.buttonInline}`} {...rest}>\r\n {children}\r\n </Button>);\r\n };\r\nButtonInline.displayName = 'ButtonInline';\r\n","import * as React from 'react';\r\nimport { LabelConfig } from 'ui';\r\nimport styles from './label.scss';\r\n\r\ninterface LabelProps{\r\n label: LabelConfig;\r\n classNames?: string;\r\n htmlFor?: string;\r\n selectSymbol?: JSX.Element;\r\n }\r\n\r\n/**\r\n * Display the label if configured as visible\r\n * @internal\r\n */\r\n\r\nexport const Label = ({ label, classNames, selectSymbol, ...rest } : LabelProps) =>\r\n(label && label.visible) ? \r\n <label {...rest} className={`${classNames} label`}>\r\n {selectSymbol}\r\n {label.text}\r\n {!!label.colon && <span className={styles.withColon}>:</span>} \r\n </label> \r\n : null;\r\n","import * as React from 'react';\r\nimport { OnClickOutside } from '../on-click-outside';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { PromptConfirmation } from './prompt-confirmation';\r\nimport { PromptConfirmationProps, PromptModalState } from './types';\r\nimport { withDropdownMenu } from 'ui/common/dropdown-menu';\r\nimport { DropdownMenuContext } from '../dropdown-menu/types';\r\n\r\n/**\r\n * DEPRECATED. Use input-modal-host instead.\r\n */\r\nexport class PromptConfirmationComponentModal extends React.Component<PromptConfirmationProps & DropdownMenuContext, PromptModalState> {\r\n public state: Readonly<PromptModalState> = {\r\n isOpen: false\r\n };\r\n\r\n public handleClick = (e: React.SyntheticEvent<any>) => {\r\n e && e.preventDefault();\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n });\r\n }\r\n\r\n private handleHide = () => {\r\n this.props.handleDropdownHide && this.props.handleDropdownHide();\r\n this.setState({\r\n isOpen: false\r\n });\r\n }\r\n\r\n private handleContinue = (e: React.SyntheticEvent<any>) => {\r\n this.handleHide();\r\n this.props.onContinue && this.props.onContinue();\r\n }\r\n\r\n private handleCancel = (e: React.SyntheticEvent<any>) => {\r\n this.handleHide();\r\n if (this.props.onCancel) {\r\n this.props.onCancel();\r\n }\r\n }\r\n\r\n private keyMap: any = {\r\n escapeKey: ['esc']\r\n };\r\n\r\n private handlerHotkeys: any = {\r\n escapeKey: (e: React.SyntheticEvent<any>) => this.handleHide()\r\n };\r\n\r\n public render() {\r\n\r\n if (!this.state.isOpen) {\r\n return React.cloneElement(this.props.children as React.ReactElement<any>, { onClick: this.handleClick });\r\n }\r\n\r\n return <HotKeys keyMap={this.keyMap} handlers={this.handlerHotkeys}>\r\n <OnClickOutside onClickOutside={this.handleHide}>\r\n {this.props.children}\r\n <PromptConfirmation {...this.props} onContinue={this.handleContinue} onCancel={this.handleCancel} />\r\n </OnClickOutside>\r\n </HotKeys>;\r\n }\r\n}\r\n\r\nconst component = withDropdownMenu(PromptConfirmationComponentModal);\r\n\r\nexport { component as PromptConfirmationModal };\r\n","import * as React from 'react';\r\nimport { ComponentProps } from 'ui';\r\nimport styles from './section-panel.scss';\r\nimport { ValidationSummary, ValidationProps } from '../common';\r\nimport { DisplayTextWithLinks } from 'ui/common/display-text-with-links';\r\n\r\nexport interface SectionPanelProps extends ComponentProps {\r\n children: any;\r\n validation: ValidationProps; \r\n isMain?: boolean;\r\n}\r\n\r\nexport const SectionPanel: React.SFC<SectionPanelProps> = (props: SectionPanelProps) => {\r\n\r\n const {\r\n componentId,\r\n children,\r\n label={},\r\n validation,\r\n info,\r\n isMain\r\n } = props;\r\n \r\n const infoText = <DisplayTextWithLinks componentId={`${componentId}_infotext`} text={info && info.text} linkify={info && info.linkify}/>;\r\n\r\n return (\r\n <section id={componentId} className={`${styles.section}`}>\r\n {label.visible && \r\n <h2 className={`${styles.sectionHeading} ${isMain && styles.sectionHeadingParent} main-grid`}>{label.text}\r\n {info.visible && <div className={`${styles.sectionInfoText}`}>{infoText}</div>}\r\n </h2>} \r\n <div className={styles.sectionValidation}>\r\n <ValidationSummary validationError={validation}/>\r\n </div>\r\n <div className=\"main-grid\">\r\n {children}\r\n </div>\r\n </section>\r\n );\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface SlideArrowSymbolProps {\r\n className?: string;\r\n pointLeft?: boolean;\r\n onClick?: (e:any)=> void;\r\n}\r\n\r\nexport const SlideArrowSymbol = (props:SlideArrowSymbolProps) => (\r\n<svg width=\"63.1\" className={props.className} onClick={props.onClick} x=\"0px\" y=\"0px\" viewBox=\"0 0 42.7 30.5\">\r\n <path transform={`rotate(${props.pointLeft ? '-180' : '0'}, 21, 15)`}\r\n fill=\"#0067C5\" d=\"M26.6,2.3l-2.5,2.5l8.1,8.1L3.6,13v3.5h28.7l-8.1,8.1l2.5,2.5l12.4-12.4L26.6,2.3z\"/>\r\n</svg>);\r\n","import * as React from 'react';\r\nimport { UploadedFile } from 'app/area/case/features';\r\nimport { RemoteBlob } from 'ui/remote-blob';\r\nimport * as Hammer from 'hammerjs';\r\n\r\nimport styles from './attachment-viewer.scss';\r\nimport { FixedDocument } from 'app/components/fixed-document';\r\nimport { FullscreenModalHeader } from 'ui/fullscreen-modal-header/fullscreen-modal-header';\r\nimport { FileItemProgress } from 'ui/file-uploader/file-uploader-item-progress';\r\nimport { SlideArrowSymbol } from 'ui/common/icons/slide-arrow';\r\nimport { keyCode } from 'ui/common/key-code-types';\r\nimport { ObjectFitImage } from 'ui/object-fit-image';\r\n\r\nexport interface AttachmentViewerProps {\r\n createDownloader?: (blobId: number, name: string) => Promise<void>;\r\n loadBlob?: (blobId: number, thumbnail?: boolean) => Promise<Blob>;\r\n uploadedFiles?: UploadedFile[];\r\n onClose: () => void;\r\n initialSelected?: number;\r\n}\r\n\r\nexport interface AttachmentViewerState {\r\n selected?: UploadedFile;\r\n files?: UploadedFile[];\r\n prevInitialSelected?: number;\r\n}\r\n\r\nconst createLoader = (loadBlob, id, thumbnail = false) => () => {\r\n return loadBlob(id, thumbnail);\r\n};\r\n\r\nconst AttachmentThumbnail = ({loadBlob, item, onClick, onLoad, selected}) => {\r\n const clicker = () => onClick(item);\r\n return <RemoteBlob onLoad={onLoad} loadBlob={createLoader(loadBlob, item.blobId, true)}>\r\n {({ objectUrl, error }) =>\r\n error || !objectUrl ? null : (\r\n <button type=\"button\" className={`${styles.thumbnail}`} tabIndex={0} aria-selected={selected} onClick={clicker}>\r\n <ObjectFitImage className={styles.imageContainer} src={objectUrl} alt={item.name} cover={true}/>\r\n </button>\r\n )}\r\n </RemoteBlob>;\r\n};\r\n\r\nconst findImages = (files:UploadedFile[]):UploadedFile[] => {\r\n return files && files.filter(item => item.type && item.type.indexOf('image') !== -1);\r\n};\r\nexport class AttachmentViewer extends React.PureComponent<AttachmentViewerProps, AttachmentViewerState> {\r\n\r\n private imageContainerRef: React.RefObject<HTMLDivElement> = React.createRef();\r\n private thumbnailContainerRef: React.RefObject<HTMLDivElement> = React.createRef();\r\n private manager:HammerManager;\r\n public state:Readonly<AttachmentViewerState> = {\r\n files: [],\r\n selected: null\r\n };\r\n\r\n public static getDerivedStateFromProps(props:AttachmentViewerProps, state:AttachmentViewerState) {\r\n const attachments = findImages(props.uploadedFiles);\r\n\r\n if(state.prevInitialSelected !== props.initialSelected) {\r\n const selected = attachments.find(item => item.id === props.initialSelected);\r\n return {files: attachments, selected: selected, prevInitialSelected: props.initialSelected};\r\n }\r\n\r\n return {files: attachments, prevInitialSelected: props.initialSelected};\r\n }\r\n\r\n constructor (props:AttachmentViewerProps) {\r\n super(props);\r\n\r\n if (props.uploadedFiles) {\r\n const files = findImages(props.uploadedFiles);\r\n const selected = files.find(item => item.id === props.initialSelected);\r\n this.state = {files, selected};\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n this.setupListeners();\r\n }\r\n\r\n public componentWillUnmount () {\r\n this.removeListeners();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.autoScrollThumbnails();\r\n this.setupListeners();\r\n\r\n }\r\n\r\n private setupListeners = () => {\r\n if (this.imageContainerRef.current && !this.manager) {\r\n this.manager = new Hammer.Manager(this.imageContainerRef.current, {\r\n recognizers: [[Hammer.Swipe,{ direction: Hammer.DIRECTION_HORIZONTAL }]]\r\n });\r\n this.manager.on('swipe', this.onSwipe);\r\n document.addEventListener('keydown', this.onKeyDown);\r\n }\r\n }\r\n\r\n private removeListeners = () => {\r\n if (this.manager) {\r\n this.manager.destroy();\r\n this.manager = null;\r\n document.removeEventListener('keydown', this.onKeyDown);\r\n }\r\n }\r\n\r\n private selectImage = (item:UploadedFile) => {\r\n this.setState({selected: item});\r\n }\r\n\r\n private goToNext = (e:React.MouseEvent) => {\r\n e && e.preventDefault();\r\n const {selected, files} = this.state;\r\n const getIndex = files.indexOf(selected);\r\n\r\n this.setState({selected: files[(getIndex+1) % files.length]});\r\n }\r\n\r\n private goToPrev = (e:React.MouseEvent) => {\r\n e && e.preventDefault();\r\n const {selected, files} = this.state;\r\n const getIndex = files.indexOf(selected);\r\n this.setState({selected: files[(getIndex > 0) ? getIndex -1 : files.length-1]});\r\n }\r\n\r\n private onClose = () => {\r\n const { onClose } = this.props;\r\n this.setState({selected: null});\r\n this.removeListeners();\r\n onClose && onClose();\r\n }\r\n\r\n private onKeyDown = (e:KeyboardEvent) => {\r\n switch (e.keyCode) {\r\n case keyCode.ArrowRight:\r\n this.goToNext(null);\r\n break;\r\n case keyCode.ArrowLeft:\r\n this.goToPrev(null);\r\n break;\r\n case keyCode.Esc:\r\n this.onClose();\r\n break;\r\n default:\r\n break;\r\n }\r\n };\r\n\r\n private onThumbnailLoaded = () => {\r\n this.autoScrollThumbnails();\r\n }\r\n\r\n private onSwipe = (e:any) => {\r\n if (e.velocityX < 0) {\r\n this.goToNext(null);\r\n } else {\r\n this.goToPrev(null);\r\n }\r\n }\r\n\r\n private onThumbnailScroll = (event:any) => {\r\n if (event.currentTarget) {\r\n const container = event.currentTarget;\r\n\r\n const ev:WheelEvent = event.nativeEvent;\r\n const delta = ev.deltaY;\r\n\r\n container.scrollLeft += delta;\r\n }\r\n }\r\n\r\n private autoScrollThumbnails = () => {\r\n if (this.thumbnailContainerRef && this.thumbnailContainerRef.current) {\r\n const container = this.thumbnailContainerRef.current;\r\n const thumbnail = container.querySelector('[aria-selected=\"true\"]');\r\n if (thumbnail) {\r\n thumbnail.scrollIntoView({behavior: 'smooth', inline: 'center'});\r\n }\r\n }\r\n }\r\n\r\n public render () {\r\n const { loadBlob } = this.props;\r\n const { files } = this.state;\r\n\r\n const selected = this.state && this.state.selected;\r\n return selected ? <FixedDocument>\r\n <div className={styles.viewer} tabIndex={1}>\r\n <FullscreenModalHeader onClose={this.onClose}>\r\n {selected && selected.title}\r\n </FullscreenModalHeader>\r\n <div className={`${styles.image} container`} ref={this.imageContainerRef}>\r\n {selected &&\r\n <RemoteBlob key={selected.id} loadBlob={createLoader(loadBlob, selected.blobId)}>\r\n {(props) => props.error || !props.objectUrl ?\r\n <div className={styles.progressContainer}><FileItemProgress indeterminate={true}/></div> : (\r\n <ObjectFitImage src={props.objectUrl} className={styles.fitImage} width=\"100%\" height=\"100%\"/>\r\n )\r\n }\r\n </RemoteBlob>}\r\n {files.length > 1 && <button className={`${styles.directionButton} ${styles.next}`} onClick={this.goToNext}>\r\n <SlideArrowSymbol/>\r\n </button> }\r\n {files.length > 1 && <button className={`${styles.directionButton} ${styles.prev}`} onClick={this.goToPrev}>\r\n <SlideArrowSymbol pointLeft={true}/>\r\n </button>}\r\n </div>\r\n <div className={styles.thumbnailContainer}>\r\n <div className={`${styles.thumbnailList} thumbnail-list container`}\r\n ref={this.thumbnailContainerRef} onWheel={this.onThumbnailScroll}>\r\n { files.map( item => <AttachmentThumbnail onLoad={this.onThumbnailLoaded} key={item.id}\r\n selected={selected && selected.id === item.id} loadBlob={loadBlob} item={item} onClick={this.selectImage}/>)}\r\n </div>\r\n </div>\r\n </div>\r\n </FixedDocument> : null;\r\n }\r\n}\r\n","module.exports = (__webpack_require__(49))(593);","module.exports = (__webpack_require__(49))(80);","export interface CancelablePromise<T> {\r\n promise: Promise<T>;\r\n cancel(): void;\r\n}\r\n\r\nexport function makeCancelable<T>(promise: Promise<T>): CancelablePromise<T> {\r\n let hasCanceled = false;\r\n\r\n const wrappedPromise = new Promise<T>((resolve, reject) => {\r\n promise.then(\r\n val => (hasCanceled ? reject({ isCanceled: true }) : resolve(val)),\r\n error => (hasCanceled ? reject({ isCanceled: true }) : reject(error))\r\n );\r\n });\r\n\r\n return {\r\n promise: wrappedPromise,\r\n cancel() {\r\n hasCanceled = true;\r\n }\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport styles from './select-options.scss';\r\n\r\nexport interface SelectOptionsProps {\r\n showLongDescriptions?: boolean;\r\n}\r\n\r\nexport class SelectOptions extends React.PureComponent<SelectOptionsProps, any> {\r\n public render() {\r\n return <ul className={`grid-200 ${this.props.showLongDescriptions ? styles.fullWidthOptions : ''}`}>\r\n {this.props.children}\r\n </ul>;\r\n }\r\n}\r\n","module.exports = (__webpack_require__(49))(635);","module.exports = (__webpack_require__(49))(464);","export const isValidEmail = (mail: string) => /^[^\\s]+@[^.][\\w.-]*\\.[\\w-]{2,63}$/u.test(mail);\r\nexport const isValidListOfEmails = (emails?: string) => emails && emails.trim().split(/\\s*[;|,]\\s*/).every(isValidEmail);\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdFolder = function MdFolder(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm16.6 6.6l3.4 3.4h13.4c1.8 0 3.2 1.6 3.2 3.4v16.6c0 1.8-1.4 3.4-3.2 3.4h-26.8c-1.8 0-3.2-1.6-3.2-3.4v-20c0-1.8 1.4-3.4 3.2-3.4h10z' })\n )\n );\n};\n\nexports.default = MdFolder;\nmodule.exports = exports['default'];","module.exports = (__webpack_require__(49))(629);","import * as React from 'react';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\n\r\nexport interface LineBreakProps {\r\n /**\r\n * Text to split by ``linebreakChar`\r\n */\r\n text: string;\r\n /**\r\n * Defaults to newline char `\\n`\r\n */\r\n lineBreakChar?: string;\r\n}\r\n\r\nexport const BreakLines = (props: LineBreakProps) => {\r\n const lines = !!props.text &&\r\n insertOptionalWordbreaks(props.text).split( props.lineBreakChar || '\\\\n' );\r\n\r\n return <>\r\n {lines && lines.map((item, key) =>\r\n <React.Fragment key={key}>\r\n {item}{lines.length - 1 === key ? null : <br />}\r\n </React.Fragment>)}\r\n </>;\r\n};\r\n","import * as React from 'react';\r\nimport { SelectType } from './types';\r\nimport styles from './select-option.scss';\r\nimport { BreakLines } from 'app/components/break-lines';\r\n\r\nexport interface SelectOptionProps {\r\n selectType?: SelectType;\r\n hasChildren?: boolean;\r\n longDescription?: string;\r\n}\r\n\r\nexport class SelectOption extends React.Component<SelectOptionProps> {\r\n\r\n public render() {\r\n const { hasChildren, children, longDescription } = this.props;\r\n const selectTypeClass = styles && styles.selectCheck;\r\n const hasChildrenClass = hasChildren ? styles.selectHasChildren : '';\r\n\r\n return <li className={`form-check ${selectTypeClass}`}>\r\n <div className={hasChildrenClass}>{children}</div>\r\n {!!longDescription && <div className={styles.longDescription}>\r\n <BreakLines text={longDescription} />\r\n </div>}\r\n </li>;\r\n }\r\n}\r\n","module.exports = (__webpack_require__(49))(423);","import { clientCache } from '../universal';\r\n\r\nconst COLLECTION_KEY = 'texts';\r\n\r\nconst getCollectionKey = keys => `${keys.join('.')}.${COLLECTION_KEY}`;\r\n\r\nexport const translations = {\r\n\r\n areValid: (languageId) =>{\r\n return clientCache.hasValid(getCollectionKey(languageId));\r\n },\r\n add: (languageId, texts, expires)=>{\r\n clientCache.setItem(getCollectionKey(languageId), texts, expires);\r\n },\r\n get: (languageId) => {\r\n return clientCache.getItem(getCollectionKey(languageId));\r\n },\r\n clear: ()=> {\r\n clientCache.clearBy(\r\n new RegExp(`\\.${COLLECTION_KEY}\\.?`)\r\n );\r\n }\r\n};\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"button-list__visuallyhidden--2IRWg\",\"focusable\":\"button-list__focusable--1bNtx\",\"status-selector\":\"button-list__status-selector--V2Kzt\",\"statusSelector\":\"button-list__status-selector--V2Kzt\",\"status-selector-option\":\"button-list__status-selector-option--23ByJ\",\"statusSelectorOption\":\"button-list__status-selector-option--23ByJ\",\"active\":\"button-list__active--Nydnn\",\"read-only-text\":\"button-list__read-only-text--5qTlr\",\"readOnlyText\":\"button-list__read-only-text--5qTlr\"};","import { ApiResponse, CasePermissions, BowtieSupported } from 'app/types-shared';\r\nimport { RemoteData } from 'app/infrastructure/remote-data/index';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\n\r\nexport const api = {\r\n \r\n caseEntityId: async (caseId: number): Promise<number> => {\r\n\r\n return (await new RemoteData(`${endpoint.case}/${caseId}/primaryEntityId`)\r\n .resource<ApiResponse<number>>()\r\n .single() as any).data;\r\n },\r\n \r\n addCaseConnection: async (draftId: number, connectedCaseId: number, connectionTypeId: number, sequence: number) => {\r\n await new RemoteData(`${endpoint.draft}/${draftId}/connections`)\r\n .resource<any>()\r\n .filter({\r\n caseId: connectedCaseId,\r\n connectionTypeId,\r\n sequence\r\n })\r\n .create({});\r\n },\r\n\r\n casePermissions: async (ids: number[]): Promise<CasePermissions[]> => {\r\n\r\n const response = await new RemoteData(endpoint.casePermissions).resource<ApiResponse<CasePermissions[]>>()\r\n .filter({ caseId: ids })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n bowtieSupported: async (ids: number[]): Promise<BowtieSupported[]> => {\r\n\r\n const response = await new RemoteData(endpoint.bowtieSupported).resource<ApiResponse<BowtieSupported[]>>()\r\n .filter({ caseId: ids })\r\n .single();\r\n\r\n return response.data;\r\n }\r\n};\r\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb, null, ret) },\n function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","\r\nexport const ACTION = {\r\n CREATE_NEW_DRAFT: 'CASE:NEW_DRAFT',\r\n CREATE_NEW_DRAFT_FAILURE: 'CASE:FAIL_NEW_DRAFT'\r\n};\r\n\r\nexport class CreateNewDraft {\r\n public type: string = ACTION.CREATE_NEW_DRAFT;\r\n public caseTypeId: number;\r\n\r\n constructor(caseTypeId: number) {\r\n this.caseTypeId = caseTypeId;\r\n }\r\n}\r\n\r\nexport class CreateNewDraftFailure {\r\n public type: string = ACTION.CREATE_NEW_DRAFT_FAILURE;\r\n public id: number;\r\n public error: any;\r\n public constructor(id: number, error: any) {\r\n this.id = id;\r\n this.error = error;\r\n }\r\n}\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdAccountCircle = function MdAccountCircle(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 32c4.1 0 7.8-2.2 10-5.4-0.1-3.2-6.7-5.1-10-5.1-3.4 0-9.9 1.9-10 5.1 2.2 3.2 5.9 5.4 10 5.4z m0-23.6c-2.7 0-5 2.2-5 5s2.3 5 5 5 5-2.3 5-5-2.3-5-5-5z m0-5c9.2 0 16.6 7.4 16.6 16.6s-7.4 16.6-16.6 16.6-16.6-7.4-16.6-16.6 7.4-16.6 16.6-16.6z' })\n )\n );\n};\n\nexports.default = MdAccountCircle;\nmodule.exports = exports['default'];","import * as React from 'react';\r\nimport { CloseButton, ButtonTertiary, ButtonPrimary } from 'ui';\r\nimport style from './copy-options.scss';\r\nimport { RadioSymbol } from 'ui/common';\r\n\r\nexport const DefaultCopyOptions = ({translate, handleCancel, handleContinue}) => {\r\n const [count, setCount] = React.useState(1);\r\n const onChange = e => { \r\n setCount( e.target.value ); \r\n };\r\n const onContinue = e => handleContinue(e,count);\r\n return ( \r\n <div className={`modal ${style.contextMenuModal}`}>\r\n <div className=\"modal-dialog\" role=\"document\">\r\n <div className=\"modal-content\">\r\n <div className=\"modal-header\">\r\n <h5>{translate.copy}</h5>\r\n <CloseButton data-dismiss=\"modal\" onClick={handleCancel} />\r\n </div>\r\n <div className={'modal-body'}>\r\n <div className={`form-check ${style.grayShadow}`}> \r\n <input type=\"radio\" checked={true} className=\"form-check-input visuallyhidden\" id=\"option-copy\"/>\r\n <label htmlFor=\"option-copy\">\r\n <RadioSymbol/> {translate.make} <input \r\n type=\"number\" \r\n id=\"copyCount\" \r\n step=\"1\" \r\n min=\"1\" \r\n max=\"99\" \r\n value={count} \r\n onChange={onChange}/> {translate.copies}</label>\r\n </div>\r\n </div> \r\n <div className={'modal-footer'}>\r\n <ButtonTertiary dataDismiss=\"modal\" onClick={handleCancel}>\r\n {translate.cancel}\r\n </ButtonTertiary>\r\n <ButtonPrimary onClick={onContinue}>\r\n {translate.createCopies}\r\n </ButtonPrimary>\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"modal-background\"/>\r\n </div>);\r\n};\r\n","import * as React from 'react';\r\nimport { Permission, MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport { InputModalHost } from 'ui/common/prompt-confirmation/input-modal-host';\r\nimport { DefaultCopyOptions } from 'ui/tile/copy-options';\r\nimport styles from './tile.scss';\r\n\r\nconst enabledFeatures = [\r\n\r\n (props,key) => (<Permission key={key} requireAll=\"remove\" permissions={props.enabledChildEntityOperations} isListElement={true}>\r\n <PromptConfirmationModal\r\n title={props.textDelete}\r\n description={props.textDeleteMessage}\r\n continueText={props.textContinue}\r\n cancelText={props.textCancel}\r\n onContinue={props.onDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">{props.textDelete}</button>\r\n </PromptConfirmationModal>\r\n </Permission>),\r\n\r\n (props,key) => (<Permission key={key} requireAll=\"add\" permissions={props.enabledChildEntityOperations} isListElement={true}>\r\n <InputModalHost {...props} onContinue={props.onCopyDocumentItem}>\r\n { ({isOpen, onOpen, onContinue, onCancel}) => {\r\n return (\r\n <>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={onOpen}>{props.copyIterator.copy}</button>\r\n {isOpen && \r\n <DefaultCopyOptions \r\n {...props} \r\n handleContinue={onContinue} \r\n handleCancel={onCancel} \r\n translate={props.copyIterator}/>}\r\n </>\r\n );\r\n }}\r\n </InputModalHost>\r\n </Permission>)\r\n];\r\n\r\nexport const ContextMenu = (props) => (\r\n <Permission requireAny=\"remove\" permissions={props.enabledChildEntityOperations}>\r\n <div className={`${styles.tileDropdown} ${props.className ? props.className : ''}`}>\r\n <MeatballMenu>\r\n\r\n {enabledFeatures.map((f,key) => f(props,key))}\r\n\r\n {props.extendedContextMenuOperations &&\r\n props.extendedContextMenuOperations.map((operation, i) =>\r\n <button key={`button-${i}`} type=\"button\" className=\"dropdown-item\" onClick={operation.callback}>\r\n {operation.text}\r\n </button>)\r\n }\r\n </MeatballMenu>\r\n </div>\r\n </Permission>\r\n);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"selected-option__visuallyhidden--3Wu2r\",\"focusable\":\"selected-option__focusable--10OLX\",\"close-expander\":\"selected-option__close-expander--14zdC\",\"closeExpander\":\"selected-option__close-expander--14zdC\",\"select-tag\":\"selected-option__select-tag--1QYxj\",\"selectTag\":\"selected-option__select-tag--1QYxj\",\"select-tag-remove\":\"selected-option__select-tag-remove--3NB_5\",\"selectTagRemove\":\"selected-option__select-tag-remove--3NB_5\",\"read-only\":\"selected-option__read-only--FFNE4\",\"readOnly\":\"selected-option__read-only--FFNE4\",\"not-removable\":\"selected-option__not-removable--jnPfP\",\"notRemovable\":\"selected-option__not-removable--jnPfP\",\"error\":\"selected-option__error--22PW5\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-date__visuallyhidden--3dVsg\",\"focusable\":\"display-date__focusable--29Tel\",\"date\":\"display-date__date--6kJoK\",\"label\":\"display-date__label--28vpX\",\"stacked-column\":\"display-date__stacked-column--vTkxp\",\"stackedColumn\":\"display-date__stacked-column--vTkxp\",\"primary\":\"display-date__primary--3C00e\",\"secondary\":\"display-date__secondary--UC166\",\"strong\":\"display-date__strong--3MDHN\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"link-heading__visuallyhidden--1Qti2\",\"focusable\":\"link-heading__focusable--3iFn_\",\"link\":\"link-heading__link--1SkNs\",\"primary-title\":\"link-heading__primary-title--bB7YR\",\"primaryTitle\":\"link-heading__primary-title--bB7YR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"section-panel__visuallyhidden--2ZVxW\",\"focusable\":\"section-panel__focusable--3VHAT\",\"section\":\"section-panel__section--SVS_X\",\"section-heading\":\"section-panel__section-heading--3QbsA\",\"sectionHeading\":\"section-panel__section-heading--3QbsA\",\"section-heading-parent\":\"section-panel__section-heading-parent--1-R82\",\"sectionHeadingParent\":\"section-panel__section-heading-parent--1-R82\",\"section-validation\":\"section-panel__section-validation--18pJx\",\"sectionValidation\":\"section-panel__section-validation--18pJx\",\"section-info-text\":\"section-panel__section-info-text--2qetB\",\"sectionInfoText\":\"section-panel__section-info-text--2qetB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"expandable-panel__visuallyhidden--1rpwu\",\"focusable\":\"expandable-panel__focusable--26g31\",\"expandable-panel\":\"expandable-panel__expandable-panel--am3pO\",\"expandablePanel\":\"expandable-panel__expandable-panel--am3pO\",\"panel-header\":\"expandable-panel__panel-header--3pdoI\",\"panelHeader\":\"expandable-panel__panel-header--3pdoI\",\"content\":\"expandable-panel__content--2YsPW\",\"slideOpen\":\"expandable-panel__slideOpen--3tp2C\",\"animate-out\":\"expandable-panel__animate-out--1fPSW\",\"animateOut\":\"expandable-panel__animate-out--1fPSW\",\"slideClose\":\"expandable-panel__slideClose--zaOFI\",\"hide\":\"expandable-panel__hide--gtiw0\",\"filter-meatball-menu\":\"expandable-panel__filter-meatball-menu--12pbY\",\"filterMeatballMenu\":\"expandable-panel__filter-meatball-menu--12pbY\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"drawer-with-bar__visuallyhidden--MwaZR\",\"focusable\":\"drawer-with-bar__focusable--FeoSi\",\"drawer-bar\":\"drawer-with-bar__drawer-bar--2C7YN\",\"drawerBar\":\"drawer-with-bar__drawer-bar--2C7YN\",\"drawer-bar-btn\":\"drawer-with-bar__drawer-bar-btn---NZVC\",\"drawerBarBtn\":\"drawer-with-bar__drawer-bar-btn---NZVC\",\"btn-open\":\"drawer-with-bar__btn-open--EegLp\",\"btnOpen\":\"drawer-with-bar__btn-open--EegLp\",\"bar-content\":\"drawer-with-bar__bar-content--XzGPd\",\"barContent\":\"drawer-with-bar__bar-content--XzGPd\",\"search-content\":\"drawer-with-bar__search-content--16uqH\",\"searchContent\":\"drawer-with-bar__search-content--16uqH\",\"openFilters\":\"drawer-with-bar__openFilters--1IGGe\",\"closeFilters\":\"drawer-with-bar__closeFilters--3lMWn\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"info-banner__visuallyhidden--io95H\",\"focusable\":\"info-banner__focusable--cUMFM\",\"info-banner\":\"info-banner__info-banner--1cmeu\",\"infoBanner\":\"info-banner__info-banner--1cmeu\",\"banner-title\":\"info-banner__banner-title--2lxNE\",\"bannerTitle\":\"info-banner__banner-title--2lxNE\",\"info-image\":\"info-banner__info-image--2ht2c\",\"infoImage\":\"info-banner__info-image--2ht2c\",\"banner-description\":\"info-banner__banner-description--YCWJB\",\"bannerDescription\":\"info-banner__banner-description--YCWJB\",\"case-password-banner\":\"info-banner__case-password-banner--a5c_u\",\"casePasswordBanner\":\"info-banner__case-password-banner--a5c_u\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"comment-tile__visuallyhidden--3JSaZ\",\"focusable\":\"comment-tile__focusable--2sISc\",\"comment-wrapper\":\"comment-tile__comment-wrapper--1dyLA\",\"commentWrapper\":\"comment-tile__comment-wrapper--1dyLA\",\"user-icon\":\"comment-tile__user-icon--3Dhbr\",\"userIcon\":\"comment-tile__user-icon--3Dhbr\",\"svg-arrow\":\"comment-tile__svg-arrow--2G8bW\",\"svgArrow\":\"comment-tile__svg-arrow--2G8bW\",\"comment\":\"comment-tile__comment--3Swli\",\"cancel-btn\":\"comment-tile__cancel-btn--3WVKZ\",\"cancelBtn\":\"comment-tile__cancel-btn--3WVKZ\",\"delete-btn\":\"comment-tile__delete-btn--39tGx\",\"deleteBtn\":\"comment-tile__delete-btn--39tGx\",\"circle\":\"comment-tile__circle--39rav\",\"comment-menu\":\"comment-tile__comment-menu--2OiHL\",\"commentMenu\":\"comment-tile__comment-menu--2OiHL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"sticky-header__visuallyhidden--32umC\",\"focusable\":\"sticky-header__focusable--1Vq1_\",\"header\":\"sticky-header__header--1lqtb\",\"sticky\":\"sticky-header__sticky--2uUW_\",\"wrapper\":\"sticky-header__wrapper--2t7tM\",\"left\":\"sticky-header__left--2J-2k\",\"button-container\":\"sticky-header__button-container--1KOHQ\",\"buttonContainer\":\"sticky-header__button-container--1KOHQ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"create-folder__visuallyhidden--oo0Tt\",\"focusable\":\"create-folder__focusable--2B9Wc\",\"wrapper\":\"create-folder__wrapper--30vP1\",\"link\":\"create-folder__link--3zekz\",\"button\":\"create-folder__button--2Jqt5\",\"loader\":\"create-folder__loader--1f2jI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"footer__visuallyhidden--3RZ7m\",\"focusable\":\"footer__focusable--kFAzj\",\"footer-row\":\"footer__footer-row--2Kuds\",\"footerRow\":\"footer__footer-row--2Kuds\",\"total\":\"footer__total--3E-Ic\",\"totalText\":\"footer__totalText--2qVrN\",\"totalValue\":\"footer__totalValue--Qkocx\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"favourite-container__visuallyhidden--Og6Ji\",\"focusable\":\"favourite-container__focusable--3IOD2\",\"favourite-container\":\"favourite-container__favourite-container--1Zgxi\",\"favouriteContainer\":\"favourite-container__favourite-container--1Zgxi\",\"header\":\"favourite-container__header--3Oejc\",\"static-height\":\"favourite-container__static-height--1Mhx_\",\"staticHeight\":\"favourite-container__static-height--1Mhx_\",\"fallback-content\":\"favourite-container__fallback-content--3Nq55\",\"fallbackContent\":\"favourite-container__fallback-content--3Nq55\",\"wrapper\":\"favourite-container__wrapper---3r64\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"about-modal__visuallyhidden--ZZfNU\",\"focusable\":\"about-modal__focusable--LUqYF\",\"about-modal\":\"about-modal__about-modal--1a3pa\",\"aboutModal\":\"about-modal__about-modal--1a3pa\",\"about-modal-body\":\"about-modal__about-modal-body--2Ceyx\",\"aboutModalBody\":\"about-modal__about-modal-body--2Ceyx\",\"version-info\":\"about-modal__version-info--vLPnI\",\"versionInfo\":\"about-modal__version-info--vLPnI\",\"modal-subtext\":\"about-modal__modal-subtext--2RvBB\",\"modalSubtext\":\"about-modal__modal-subtext--2RvBB\",\"about-modal-footer\":\"about-modal__about-modal-footer--2YK2W\",\"aboutModalFooter\":\"about-modal__about-modal-footer--2YK2W\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"header__visuallyhidden--1ieFG\",\"focusable\":\"header__focusable--13mgu\",\"navigation\":\"header__navigation--3vcYD\",\"fix\":\"header__fix--1RbWY\",\"header\":\"header__header--r-zj0\",\"navbar-wrapper\":\"header__navbar-wrapper--g-Yqu\",\"navbarWrapper\":\"header__navbar-wrapper--g-Yqu\",\"brand\":\"header__brand--3BYyg\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"expandable-box__visuallyhidden--3W-_E\",\"focusable\":\"expandable-box__focusable--3d_GW\",\"expandable-box\":\"expandable-box__expandable-box--6v3ZJ\",\"expandableBox\":\"expandable-box__expandable-box--6v3ZJ\",\"header\":\"expandable-box__header--gpPFG\",\"hide-bottom-border\":\"expandable-box__hide-bottom-border--kM4QJ\",\"hideBottomBorder\":\"expandable-box__hide-bottom-border--kM4QJ\",\"content\":\"expandable-box__content--JJ-K2\",\"expand-button\":\"expandable-box__expand-button--s1oSU\",\"expandButton\":\"expandable-box__expand-button--s1oSU\"};","module.exports = {};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","module.exports = {};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","module.exports = (__webpack_require__(49))(0);","/* tslint:disable */\r\nimport * as React from 'react';\r\nimport styles from './info-text.scss';\r\nimport { DisplayTextWithLinks } from 'ui/common/display-text-with-links';\r\n\r\nexport enum InfoType {\r\nText,\r\nButton\r\n}\r\n/**\r\n* Describes how the Info text component is displayed.\r\n* > Without define visible prop component does not appear.\r\n*/\r\nexport interface InfoTextProps {\r\n/**\r\n* Define whether the content of component should be visible. Default is 'undefined'.\r\n*/\r\nvisible?: boolean;\r\n/**\r\n* Define content of component. Default is 'undefined'.\r\n*/\r\ntext?: string;\r\n/**\r\n* Define type of component. Default is 'undefined'.\r\n*/\r\ntype?: InfoType;\r\n/**\r\n* Define wheteher the urls in the text should be clickable. Default is 'true'.\r\n*/\r\nlinkify?: boolean;\r\n}\r\n\r\nexport const InfoText: React.SFC<InfoTextProps> = (props) => {\r\n const {\r\n visible,\r\n text,\r\n linkify = true\r\n } = props;\r\n\r\n const helpIcon = <svg viewBox=\"0 0 20 20\">\r\n <path className={styles.tooltipArrow} d=\"M4,0H16L10,6Z\" transform=\"translate(-4)\"/>\r\n <path fill=\"#0f204b\" d=\"M10,7.1623a5.806,5.806,0,1,0,5.806,5.806h0A5.808,5.808,0,0,0,10,7.1623Z\" transform=\"translate(-4)\"/>\r\n <rect fill=\"white\" x=\"5.4185\" y=\"15.9023\" width=\"1.162\" height=\"1.161\"/>\r\n <path fill=\"white\" d=\"M11.78,12.5633l-.521.53a1.977,1.977,0,0,0-.679,1.643H9.4185v-.29a2.337,2.337,0,0,1,.675-1.639l.72-.732a1.135,1.135,0,0,0,.343-.819,1.161,1.161,0,1,0-2.322,0H7.6775a2.3225,2.3225,0,0,1,4.645,0,1.848,1.848,0,0,1-.541,1.308Z\" transform=\"translate(-4)\"/>\r\n </svg>;\r\n\r\n const infoText = <DisplayTextWithLinks text={text} linkify={linkify}/>\r\n\r\n return visible ?\r\n <span className={styles.infoTextTrigger}>\r\n {helpIcon}\r\n <div className={`${styles.infoText} infotext`}>{infoText}</div>\r\n </span> : null\r\n\r\n};\r\n\r\nInfoText.displayName = 'InfoText';\r\n","\r\nimport * as React from 'react';\r\nimport MdArrowDropDown from 'react-icons/lib/md/arrow-drop-down';\r\nimport MdFolder from 'react-icons/lib/md/folder';\r\n\r\nimport { Tooltip } from 'ui/common/tooltip/tooltip';\r\nimport { Link } from 'react-router';\r\nimport { MeatballMenu } from 'ui';\r\nimport styles from './select-option-link.scss';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\nimport { SelectOptionValue } from 'app/area/code-selector/types';\r\n\r\nexport interface SelectOptionLinkProps {\r\n data: SelectOptionValue;\r\n onClick?: (itemId: number) => void;\r\n onExpand: (item: SelectOptionValue) => void;\r\n urlResolver: (value: number) => Object;\r\n dropdownItems?: React.ReactNode;\r\n labelItems?: React.ReactNode;\r\n defaultIcon?: React.ReactNode;\r\n}\r\n\r\ninterface SelectOptionLinkState {\r\n dropdownOpen: boolean;\r\n}\r\n\r\nexport class SelectOptionLink extends React.Component<SelectOptionLinkProps, SelectOptionLinkState> {\r\n\r\n public state:Readonly<SelectOptionLinkState> = {\r\n dropdownOpen: false\r\n };\r\n\r\n private onClick = (e: React.MouseEvent<any>) => {\r\n if (this.props.onClick) {\r\n e.preventDefault();\r\n this.props.onClick(this.props.data.value);\r\n }\r\n }\r\n\r\n private expandDropdown = () => {\r\n this.setState({dropdownOpen: true});\r\n }\r\n\r\n private closeDropdown = () => {\r\n this.setState({dropdownOpen: false});\r\n }\r\n\r\n private onExpand = (e: any) => {\r\n e.preventDefault();\r\n this.props.onExpand(this.props.data);\r\n }\r\n\r\n public render() {\r\n const { urlResolver, data, dropdownItems, labelItems, defaultIcon } = this.props;\r\n const { dropdownOpen } = this.state;\r\n\r\n const icon = !!data.icon ? <img className={`${styles.selectCodeBtnIcon}`} src={data.icon} /> : defaultIcon;\r\n const folder = <MdFolder className={`${styles.selectCodeBtnIcon} ${styles.defaultIcon}`} />;\r\n\r\n const isFolder = !!data.descendants;\r\n const folderClickHandler = isFolder ? this.onExpand : this.onClick;\r\n const url = urlResolver && urlResolver(data.value);\r\n return (<li className={`col-6 col-md-4 col-lg-3 col-xl-2 ${styles.selectOption} ${dropdownOpen ? styles.expanded : ''} select-option`}>\r\n {dropdownItems && <div className={styles.meatballContainer}>\r\n <MeatballMenu className={isFolder ? styles.whiteDots : ''} onExpandMenu={this.expandDropdown} onCloseMenu={this.closeDropdown}>\r\n {dropdownItems}\r\n </MeatballMenu>\r\n </div>}\r\n {labelItems && <div className={styles.labelContainer}>{labelItems}</div>}\r\n <Link to={!isFolder ? url : '#'} onClick={folderClickHandler}>\r\n <Tooltip className={`${styles.selectCodeBtn} ${isFolder && styles.selectFolder}`} title={data.longDescription}>\r\n {isFolder ? folder : icon}\r\n <span className={`${styles.selectCodeBtnTitle}`}>\r\n {insertOptionalWordbreaks(data.description)}{isFolder && <MdArrowDropDown />}\r\n </span>\r\n </Tooltip>\r\n </Link>\r\n </li>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SelectOptionLink } from './select-option-link';\r\nimport { SelectOptionValue } from 'app/area/code-selector/types';\r\nimport { ElementLoader } from 'ui/common/element-loader/element-loader';\r\nimport { Breadcrumb } from 'ui/common/breadcrumb/breadcrumb';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { FixedDocument } from 'app/components/fixed-document';\r\nimport styles from './fullscreen-code-selector.scss';\r\nimport { FullscreenModalHeader } from 'ui';\r\n\r\nexport const findNestedSelectOption = (current:SelectOptionValue, target:number):SelectOptionValue[] => {\r\n if (current.value === target) {\r\n return [current];\r\n } else if(current.descendants) {\r\n for(let i = 0; i < current.descendants.length; i ++) {\r\n const rtn = findNestedSelectOption(current.descendants[i], target);\r\n if (rtn) {\r\n return [current, ...rtn];\r\n }\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nconst updateState = (rootTemplate, options: SelectOptionValue[], currentFolder?:number) => {\r\n\r\n const rvb:SelectOptionValue = { ...rootTemplate, descendants:options };\r\n const breadcrumb = findNestedSelectOption(rvb, currentFolder) || [rvb];\r\n\r\n if (!!options && options.length === 1 && breadcrumb.length === 1) {\r\n const firstEl = options[0];\r\n if (!!firstEl.descendants && firstEl.descendants.length > 0) {\r\n return {\r\n levelOptions: firstEl.descendants,\r\n breadcrumb: [rvb, firstEl]\r\n };\r\n }\r\n }\r\n return {\r\n levelOptions: breadcrumb[breadcrumb.length-1].descendants || [],\r\n breadcrumb,\r\n options\r\n };\r\n};\r\n\r\nexport interface FullscreenCodeSelectorProps {\r\n title: string;\r\n options: SelectOptionValue[];\r\n fetching: boolean;\r\n onClose?: () => void;\r\n onOpen?: () => void;\r\n urlResolver: (value: number) => string | {pathname: string; query: Object};\r\n textGoBack: string;\r\n infoMessage?: string;\r\n routeHandler?: (route: Object)=> void;\r\n query?: {[key:string]: string};\r\n itemDropdownRender?: (item:SelectOptionValue) => React.ReactNode;\r\n itemLabelRender?: (item:SelectOptionValue) => React.ReactNode;\r\n defaultIcon?: React.ReactNode;\r\n}\r\n\r\nexport interface ExpandingCodeSelectorState {\r\n levelOptions: SelectOptionValue[];\r\n breadcrumb: SelectOptionValue[];\r\n options?: SelectOptionValue[];\r\n}\r\n\r\nconst rootValueOfBreadcrumb: SelectOptionValue = { value: 0, description: '' };\r\nexport class FullscreenCodeSelector extends React.Component<FullscreenCodeSelectorProps, ExpandingCodeSelectorState> {\r\n\r\n private keyMap: any;\r\n private handlers: any;\r\n\r\n public static getDerivedStateFromProps(props:FullscreenCodeSelectorProps, state:ExpandingCodeSelectorState) {\r\n const { options = []} = props;\r\n\r\n if (state.options !== options) {\r\n const selectedFolderId = state.breadcrumb ? state.breadcrumb[state.breadcrumb.length-1].value : 0;\r\n return updateState(rootValueOfBreadcrumb, props.options, selectedFolderId);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n constructor(props: FullscreenCodeSelectorProps) {\r\n super(props);\r\n\r\n this.state = updateState(rootValueOfBreadcrumb, props.options);\r\n\r\n this.keyMap = {\r\n closeOptions: [keyCodeTypes.Esc]\r\n };\r\n\r\n this.handlers = {\r\n closeOptions: (event) => this.props.onClose()\r\n };\r\n }\r\n\r\n public componentDidMount(){\r\n const {fetching, onOpen} = this.props;\r\n\r\n if(!fetching){\r\n onOpen && onOpen();\r\n }\r\n }\r\n\r\n private onExpand = (item: SelectOptionValue) => {\r\n this.setState({\r\n levelOptions: [...item.descendants],\r\n breadcrumb: [...this.state.breadcrumb, item]\r\n });\r\n }\r\n\r\n private onClickBreadcrumbItem = (item: SelectOptionValue) => {\r\n const newBreadcrumb = [...this.state.breadcrumb];\r\n\r\n while (newBreadcrumb[newBreadcrumb.length - 1].value !== item.value) {\r\n newBreadcrumb.pop();\r\n }\r\n\r\n this.setState({\r\n levelOptions: item.descendants,\r\n breadcrumb: newBreadcrumb\r\n } as ExpandingCodeSelectorState);\r\n }\r\n\r\n /**\r\n * Override the default select linking since user shold not navigate back to the\r\n * selector\r\n */\r\n private selectItem = (item: number)=>{\r\n const {urlResolver, routeHandler} = this.props;\r\n routeHandler && routeHandler(urlResolver(item));\r\n }\r\n\r\n private handleClickClose = () => {\r\n this.props.onClose && this.props.onClose();\r\n }\r\n\r\n public render() {\r\n const { breadcrumb, levelOptions} = this.state;\r\n const { urlResolver, fetching, title, infoMessage, routeHandler, itemDropdownRender, itemLabelRender, defaultIcon} = this.props;\r\n\r\n const selectOptions = levelOptions && levelOptions.map((item) => {\r\n return <SelectOptionLink key={item.value}\r\n data={item}\r\n urlResolver={urlResolver}\r\n onExpand={this.onExpand}\r\n onClick={ routeHandler ? this.selectItem : undefined}\r\n dropdownItems={itemDropdownRender ? itemDropdownRender(item) : null}\r\n labelItems={itemLabelRender ? itemLabelRender(item) : null}\r\n defaultIcon={defaultIcon}\r\n />;\r\n }\r\n );\r\n\r\n const breadcrumbElement = <Breadcrumb items={breadcrumb} onClickItem={this.onClickBreadcrumbItem} />;\r\n const showBreadcrumb = breadcrumb.length > 1;\r\n const titleElement = !!title && <label>{title}</label>;\r\n\r\n return (\r\n <FixedDocument>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n\r\n <div className={styles.fullscreenCodeSelector} >\r\n <FullscreenModalHeader onClose={this.handleClickClose}>\r\n <div className={styles.navbarInfoMessage}>{infoMessage}</div>\r\n </FullscreenModalHeader>\r\n\r\n <div className={`container ${styles.modalWrapper}`}>\r\n <div className={`main-grid ${styles.selectCaseContainer}`}>\r\n <div className={styles.selectTitle} >\r\n {showBreadcrumb ? breadcrumbElement : titleElement}\r\n </div>\r\n <ul className=\"row select-options\">\r\n {fetching ? <ElementLoader /> : selectOptions}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <a className={styles.backgroundCloseBtn}\r\n onClick={this.handleClickClose}\r\n aria-label=\"Close dialog window\"\r\n />\r\n\r\n </div>\r\n </HotKeys>\r\n </FixedDocument>\r\n );\r\n }\r\n}\r\n","module.exports = (__webpack_require__(49))(590);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdKeyboardArrowDown = function MdKeyboardArrowDown(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm12.3 13l7.7 7.7 7.7-7.7 2.3 2.4-10 10-10-10z' })\n )\n );\n};\n\nexports.default = MdKeyboardArrowDown;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaRepeat = function FaRepeat(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm37.3 5.7v10q0 0.6-0.4 1t-1 0.4h-10q-1 0-1.4-0.9-0.3-0.8 0.4-1.5l3-3.1q-3.3-3-7.8-3-2.3 0-4.4 0.9t-3.6 2.4-2.5 3.7-0.9 4.4 0.9 4.4 2.5 3.7 3.6 2.4 4.4 0.9q2.7 0 5.1-1.1t4-3.3q0.1-0.2 0.5-0.3 0.3 0 0.5 0.2l3.1 3.1q0.2 0.2 0.2 0.5t-0.2 0.5q-2.4 2.9-5.9 4.5t-7.3 1.6q-3.4 0-6.6-1.3t-5.5-3.7-3.6-5.4-1.4-6.7 1.4-6.7 3.6-5.4 5.5-3.7 6.6-1.3q3.3 0 6.4 1.2t5.5 3.5l2.9-2.9q0.6-0.7 1.5-0.3 0.9 0.4 0.9 1.3z' })\n )\n );\n};\n\nexports.default = FaRepeat;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapper\":\"add-sms-consent__wrapper--12xxc\"};","// tslint:disable: max-line-length\r\nimport * as React from 'react';\r\n\r\n/**\r\n * Prevents a component from rendering to the VDOM if param @fn returns falsy\r\n * @param Component \r\n */\r\nexport const withConditionalRender = (\r\n Component: React.ComponentClass<any>,\r\n fn: (props: any) => boolean\r\n) => (props: any) => (\r\n fn(props) !== true ? \r\n \r\n props.noConditionalRender ? \r\n <Component {...props} label={{visible:false}} visible={false}>{null}</Component> \r\n : \r\n null\r\n\r\n : \r\n <Component {...props} />);\r\n","import { ConnectedComponentProps } from '../types-uischema';\r\nimport * as React from 'react';\r\nimport {error} from '../../log';\r\nimport {findDOMNode} from 'react-dom';\r\nimport { debounceRender } from 'ui/common/debounce-render';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { scrollIntoView } from 'app/infrastructure/platform/browser-dom';\r\nimport styles from './fallback.scss';\r\n\r\nconst defaultObj = {};\r\n/**\r\n * Provide a placeholder if a component fails to render\r\n *\r\n * Show a inspect button if componentDebug is enable\r\n *\r\n * @export\r\n * @param {*} component\r\n */\r\n// tslint:disable-next-line\r\nexport function withFallback(Component : React.ComponentClass<ConnectedComponentProps>) :\r\nReact.ComponentClass<ConnectedComponentProps>{\r\n\r\n /**\r\n * Internal Higher Order Component that provides a wrapping context and error messages for react components\r\n * that fails to render\r\n */\r\n class FallbackProvider extends React.Component<ConnectedComponentProps, any > {\r\n private showComponentInspector: boolean = !!AppSetting.ComponentDebug;\r\n public state: Readonly<any> = {\r\n preview: {}\r\n };\r\n\r\n public componentDidCatch(err: any) {\r\n this.setState({\r\n error: err\r\n });\r\n\r\n error(err);\r\n\r\n console.log('Failed to render', Component.name || Component.displayName, Component, this.props); // tslint:disable-line\r\n }\r\n\r\n public inspect = () => {\r\n this.props.actions.inspect(this.props);\r\n this.focusInspected();\r\n }\r\n\r\n public inspectError = () => {\r\n this.props.actions.inspect(this.props, this.state.error);\r\n this.focusInspected();\r\n }\r\n\r\n private focusInspected = () => {\r\n (scrollIntoView(findDOMNode(this) as HTMLElement));\r\n window.scroll(0, window.scrollY - 30);\r\n }\r\n\r\n private renderErrorPlaceholder = (componentName: string, id: any, isBeeingInspected: boolean) => {\r\n\r\n return (\r\n <div className={`form-group ${styles.popoverWrapper} ${isBeeingInspected && styles.inspectionMode}`}>\r\n\r\n <div className={ styles.popoverTitle } onClick={this.inspectError} title=\"Click to view details\">\r\n { `âš ï¸ Component ${componentName} ${id} is not properly configured` }\r\n </div>\r\n\r\n </div>);\r\n }\r\n\r\n private renderWithInspector = (isBeeingInspected: boolean) => {\r\n\r\n const inspectorStyle = {\r\n fontSize: '18px',\r\n marginRight: '7px',\r\n border: this.state.inspected ? '1px dashed blue' : ''\r\n };\r\n\r\n return (\r\n <div className={`${styles.popoverWrapper} ${isBeeingInspected && styles.inspectionMode}`} >\r\n\r\n <span title=\"Click to inspect\"\r\n className=\"pull-left inspect-cogwheel\"\r\n style={inspectorStyle}\r\n onClick={this.inspect}>âš™</span>\r\n\r\n <Component {...{...this.props, ...this.props.preview}} />\r\n\r\n </div>);\r\n }\r\n\r\n /**\r\n * When componentDebug flag is set, allow any valid component to be inspected\r\n * Having componentName indicates that this domains ControlType maps to a configured ui-component.\r\n * If not a debug renderer is beeing used and inspection is meaningless\r\n */\r\n public render(){\r\n\r\n const {componentName, id} = this.props.componentDescriptor || defaultObj as any;\r\n const componentCanBeInspected = this.showComponentInspector && !!componentName;\r\n const isBeeingInspected = this.props.$inspectedComponent &&\r\n this.props.$inspectedComponent.componentDescriptor.id === id;\r\n\r\n if ( this.state.error ){\r\n return this.renderErrorPlaceholder(componentName, id, isBeeingInspected);\r\n }\r\n\r\n if (componentCanBeInspected){\r\n return this.renderWithInspector(isBeeingInspected);\r\n }\r\n\r\n return <Component {...this.props} />;\r\n }\r\n\r\n }\r\n\r\n return debounceRender(FallbackProvider) as any;\r\n}\r\n","import { deepEquals } from 'app/infrastructure/js';\r\nimport { toJSON } from 'app/infrastructure/platform';\r\nimport { ComponentContext } from '../types-uischema';\r\n\r\nexport const cache: any = {};\r\n\r\nconst getCacheKey = (entityContext: ComponentContext): string => {\r\n const [pk] = (entityContext && entityContext.path) || [undefined];\r\n return toJSON({ pk, appId: entityContext && entityContext.applicationId, mode: entityContext && entityContext.mode });\r\n};\r\n\r\nconst getSubCacheKey = (entityContext: ComponentContext): string => {\r\n const [, ...rest] = (entityContext && entityContext.path) || [undefined];\r\n return toJSON(rest);\r\n};\r\n\r\nexport const getFromCache = (entityContext: ComponentContext, id: number) => {\r\n\r\n const cacheKey = getCacheKey(entityContext);\r\n const subCacheKey = getSubCacheKey(entityContext);\r\n\r\n if (!cache[cacheKey] || !cache[cacheKey][subCacheKey]) {\r\n return undefined;\r\n }\r\n\r\n return cache[cacheKey][subCacheKey][id];\r\n};\r\n\r\n/**\r\n * Adding a components props to cache on it's first render, future mapStateToProps invocations may then\r\n * use getMemoized\r\n * \r\n * @param entityContext of the current rendered entity\r\n * @param id Domain id\r\n * @param props props to cache\r\n */\r\nexport const memoize = (entityContext: ComponentContext, id: number, props: any) => {\r\n\r\n if (!entityContext || !entityContext.path || !entityContext.path.length) {\r\n return;\r\n }\r\n\r\n const cacheKey = getCacheKey(entityContext);\r\n const subCachekey = getSubCacheKey(entityContext);\r\n\r\n // Clear other entities cache\r\n Object.keys(cache).forEach(key => key !== cacheKey && delete cache[key]);\r\n\r\n cache[cacheKey] = cache[cacheKey] || {};\r\n cache[cacheKey][subCachekey] = cache[cacheKey][subCachekey] || {};\r\n cache[cacheKey][subCachekey][id] = props;\r\n};\r\n\r\n/**\r\n * For performance reasons this caches functions and arrays, scenarios that react-redux shallow equality cannot handle.\r\n * In addition a custom deepEquals for the value properties and options is performed to determine \r\n * if cached *props* should be returned or not.\r\n *\r\n * If any of properties are modified since last render (using deep equality check), the cache will **not** be used\r\n * \r\n * @param entityContext \r\n * @param id \r\n * @param props \r\n */\r\nexport const getMemoized = (entityContext: ComponentContext, id: number, props: any) => {\r\n\r\n const cached = getFromCache(entityContext, id);\r\n\r\n if (!cached) {\r\n return undefined;\r\n }\r\n\r\n const changedProps = cached && Object.keys(props).find(key => !deepEquals(props[key], cached[key]));\r\n\r\n if (props.hostProps !== cached.hostProps) {\r\n // If entity-view has been recreated, hostProps will be a new function referring to a completely new `this`!\r\n // We cannot reuse the cached props in this case.\r\n return undefined;\r\n }\r\n\r\n const isValid = changedProps === undefined;\r\n\r\n return isValid ? cached : undefined;\r\n};\r\n","import {\r\n ComponentContext, ChildComponentContext,\r\n ComponentDescriptor\r\n} from 'app/infrastructure/ui/types-uischema';\r\nimport { debug, error } from 'app/infrastructure/log';\r\nimport { LoadOptions } from 'app/types-shared';\r\nimport { mapToOptionsRequestParams, mapToOptionsRequestContext } from 'app/infrastructure/data/codes';\r\nimport { AddDocumentItemOptions, DeleteDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { contextToStorePath } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getEntityTypeFromPath } from 'app/infrastructure/store/entity';\r\nimport isPlainObject from 'lodash/isplainobject';\r\nimport { COMPONENT_ACTIONS } from 'app/infrastructure/ui/builder/component-actions';\r\n\r\ninterface EventToActionType {\r\n [event: string]: string;\r\n}\r\n\r\ninterface BoundActionCreatorMap {\r\n [name: string]: (context: Object, ...args: any[]) => void;\r\n}\r\n\r\n/**\r\n * What actionCreator to fire for a component event that was defined as prop\r\n */\r\nconst actionForEvent: EventToActionType = {\r\n onChange: 'valueChanged',\r\n onBlur: 'componentLostFocus',\r\n onFocus: 'componentHasFocus',\r\n onLoadOptions: 'loadOptions',\r\n onEditDocument: 'editDocument',\r\n onDeleteDocument: 'deleteDocument',\r\n onDuplicateDocument: 'duplicateDocument',\r\n onAddDocumentItem: 'addDocumentItem',\r\n onCopyDocumentItem: 'copyDocumentItem',\r\n onDeleteDocumentItem: 'deleteDocumentItem',\r\n onEditDocumentItem: 'editDocumentItem',\r\n onSubmitDocument: 'onSubmit',\r\n onCloseDocument: 'onCancel',\r\n getDefaultValue: 'getDefaultValue',\r\n onSelectDocumentItem: 'selectDocumentItem',\r\n onLoadBowtie: 'loadBowtie',\r\n onLoadPermissions: 'loadPermissions'\r\n};\r\n// tslint:disable max-func-body-length\r\n\r\n/**\r\n * Dynamic creation of callbacks and functions for component events\r\n *\r\n * @param dispatch: function - the redux store dispatch function to fire action creators\r\n * @returns Object map describing the different events callbacks\r\n */\r\nexport const eventBuilder = (actionCreators: BoundActionCreatorMap) => {\r\n\r\n // return a function that when called returns the function for the given\r\n // component event\r\n return (\r\n context: ComponentContext | ChildComponentContext,\r\n descriptor: ComponentDescriptor,\r\n componentEvent: string\r\n ) => {\r\n\r\n const actions: any = {\r\n /**\r\n * The callback function that fires a redux action when components value changes\r\n *\r\n */\r\n onChange: (valueArg: any) => {\r\n\r\n try {\r\n let finalValue = [];\r\n\r\n // eventType is the redux action creator to run e.g. onChange, onBlur,\r\n const eventType = actionForEvent[componentEvent];\r\n const action: Function = actionCreators[eventType];\r\n\r\n debug('dispatching', eventType, context, descriptor, valueArg);\r\n\r\n // some components passes simple values, some passes objects, some passes arrays of objects\r\n const isValue = (x: any) => !Object.is(x, undefined) && !Object.is(x, null);\r\n const isValidValueObject = isPlainObject(valueArg) && isValue(valueArg.value);\r\n const isValidValueArray = Array.isArray(valueArg) && valueArg.every(isValue);\r\n const isValidPlainValue = !isPlainObject(valueArg) && !isValidValueObject && !isValidValueArray;\r\n\r\n if (isValidValueObject) {\r\n finalValue = [valueArg];\r\n }\r\n\r\n if (isValidValueArray) {\r\n finalValue = valueArg;\r\n }\r\n\r\n if (isValidPlainValue && isValue(valueArg)) {\r\n finalValue = [{ value: valueArg }];\r\n }\r\n\r\n const immediateSave = descriptor.properties && descriptor.properties.immediateSaveOnValueChange;\r\n\r\n action(contextToStorePath(descriptor, context), descriptor.dataTag, finalValue, immediateSave);\r\n } catch (err) {\r\n error('Error in onChange', err);\r\n }\r\n },\r\n /**\r\n * When a child entity is selected in the UI, e.g a Card or Row\r\n */\r\n onSelectDocumentItem: (itemKey?: any) => {\r\n try {\r\n debug('onSelectDocumentItem', itemKey);\r\n const eventType = actionForEvent[componentEvent];\r\n const action = actionCreators[eventType];\r\n\r\n // Optionally de-selecting by providing explicit null\r\n action && action( itemKey === null ? undefined : (itemKey || context.path));\r\n\r\n } catch (err) {\r\n error('Error in onSelectDocumentItem', err);\r\n }\r\n },\r\n /**\r\n * When a child entity should be edited\r\n */\r\n onEditDocumentItem: () => {\r\n try {\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n\r\n actionCreator(context.path);\r\n } catch (err) {\r\n error('Error in onEditDocumentItem', err);\r\n }\r\n },\r\n /**\r\n * Deletes a child entity from a Case\r\n */\r\n onDeleteDocumentItem: (\r\n selectParentItem: boolean = true,\r\n options: DeleteDocumentItemOptions = {}\r\n ) => {\r\n\r\n try {\r\n debug('onDeleteDocumentItem');\r\n const eventType = actionForEvent[componentEvent];\r\n const action = actionCreators[eventType];\r\n\r\n const pathFromOptions = options.parentEntityPath && options.entityType && options.childId;\r\n const entityPath = pathFromOptions ?\r\n [...options.parentEntityPath, { [options.entityType]: options.childId }] :\r\n contextToStorePath(descriptor, context);\r\n\r\n action && action(selectParentItem, entityPath);\r\n\r\n } catch (err) {\r\n error('Error in onDeleteDocumentItem', err);\r\n }\r\n },\r\n onCopyDocumentItem: (noOfCopies: number) => {\r\n\r\n try {\r\n debug('onCopyDocumentItem');\r\n const eventType = actionForEvent[componentEvent];\r\n const action = actionCreators[eventType];\r\n\r\n action && action(contextToStorePath(descriptor, context), {noOfCopies});\r\n\r\n } catch (err) {\r\n error('Error in onCopyDocumentItem', err);\r\n }\r\n },\r\n /**\r\n * Adds an child entity to the Case\r\n */\r\n onAddDocumentItem: (\r\n selectAddedItem: boolean = true,\r\n options: AddDocumentItemOptions = {}\r\n ) => {\r\n try {\r\n\r\n debug('onAddDocumentItem', options);\r\n\r\n const actionCreatorName = actionForEvent[componentEvent];\r\n const action = actionCreators[actionCreatorName];\r\n\r\n const entityType = options.entityType || getEntityTypeFromPath(descriptor.entityTypePath);\r\n const entityTypePathMatchesContextPath = \r\n descriptor.entityTypePath && descriptor.entityTypePath.every(p => context.path.some(c => c[p]));\r\n\r\n // Because we do not support nesting a table in itself, we need to remove ancestors that share this type.\r\n const parentPath = options.parentEntityPath || contextToStorePath(descriptor, context).filter(p => !p[entityType]);\r\n\r\n // If this is an iterator trying to add, it should use the default values in its descriptor.\r\n // In other cases it should use the context default values, if available.\r\n let defaultValues = descriptor.iterate && descriptor.iterate.defaultValues;\r\n if (!defaultValues && (context as ChildComponentContext).defaultValues && entityTypePathMatchesContextPath) {\r\n defaultValues = (context as ChildComponentContext).defaultValues;\r\n }\r\n\r\n action && action(parentPath, entityType, selectAddedItem, {\r\n ...options,\r\n defaultValues\r\n });\r\n\r\n } catch (err) {\r\n error('Error in onAddDocumentItem', err);\r\n }\r\n },\r\n /**\r\n * The callback for when a component requests a code table lookup or search\r\n */\r\n onLoadOptions: (loadOptions?: LoadOptions) => {\r\n\r\n try {\r\n\r\n // eventType is the redux action creator to run e.g. onChange, onBlur,etc\r\n const eventType = actionForEvent[componentEvent];\r\n\r\n debug('dispatching', eventType, context, descriptor.codetable, loadOptions);\r\n\r\n const actionCreator: Function = actionCreators[eventType];\r\n\r\n actionCreator(\r\n mapToOptionsRequestContext(context, descriptor, loadOptions),\r\n mapToOptionsRequestParams(loadOptions)\r\n );\r\n\r\n } catch (err) {\r\n error('Error in onLoadOptions', err);\r\n }\r\n },\r\n /**\r\n * Redirect to draft edit route\r\n */\r\n onEditDocument: () => {\r\n try {\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n actionCreator();\r\n } catch (err) {\r\n error('Error in onEditDocument', err);\r\n }\r\n },\r\n /**\r\n * Fire a delete api request\r\n */\r\n onDeleteDocument: () => {\r\n try {\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n actionCreator();\r\n } catch (err) {\r\n error('Error in onDeleteDocument', err);\r\n }\r\n },\r\n /**\r\n * Redirect to the case duplicate route\r\n */\r\n onDuplicateDocument: () => {\r\n try {\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n actionCreator();\r\n } catch (err) {\r\n error('Error in onDuplicateDocument', err);\r\n }\r\n },\r\n onSubmitDocument: () => {\r\n try {\r\n\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n\r\n actionCreator();\r\n } catch (err) {\r\n error('Error submitting document', err);\r\n }\r\n\r\n },\r\n onCloseDocument: () => {\r\n try {\r\n\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n actionCreator();\r\n } catch (err) {\r\n error('Error closing document', err);\r\n }\r\n },\r\n onLoadPermissions: () => {\r\n try {\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n\r\n actionCreator();\r\n } catch (err) {\r\n error('Error loading permissions', err);\r\n }\r\n },\r\n /**\r\n * Redirect to bowtie\r\n */\r\n onLoadBowtie: () => {\r\n try {\r\n const eventType = actionForEvent[componentEvent];\r\n const actionCreator: Function = actionCreators[eventType];\r\n actionCreator();\r\n } catch (err) {\r\n error('Error in onLoadBowtie', err);\r\n }\r\n }\r\n };\r\n\r\n return actions[componentEvent];\r\n\r\n };\r\n};\r\n\r\n/**\r\n * Build events for the described component type, based on included events in the `componentEvents` array\r\n * @param actions actionCreators to be called from the predefined actions\r\n * @param descriptor ComponentDescriptor for the component to connect\r\n * @param resolveContext Execution context to create a closure for the callback\r\n */\r\nexport const buildEvents = (\r\n actions: {[action: string] : () => void},\r\n descriptor: ComponentDescriptor,\r\n resolveContext: ComponentContext | ChildComponentContext\r\n) => {\r\n\r\n const eventMap: any = {};\r\n const createEvent = eventBuilder(actions);\r\n descriptor.componentEvents.filter(Boolean).forEach((eventName: string) =>\r\n {\r\n const event = createEvent(resolveContext, descriptor, eventName);\r\n const childContext = resolveContext as ChildComponentContext;\r\n\r\n if (childContext.virtual && eventName === COMPONENT_ACTIONS.onChange) {\r\n // Components in a virtual context must add themselves before changes can be made.\r\n const addEvent = createEvent(resolveContext, descriptor, COMPONENT_ACTIONS.onAddDocumentItem);\r\n eventMap[COMPONENT_ACTIONS.onChange] = (...args: any[]) => {\r\n\r\n // Add item.\r\n addEvent(false,\r\n { childId: childContext.primaryKey && childContext.primaryKey.value }\r\n );\r\n\r\n // Call onChange on newly created item.\r\n event(...args);\r\n };\r\n } else {\r\n eventMap[eventName] = event;\r\n }\r\n\r\n });\r\n\r\n return eventMap;\r\n};\r\n","import { ComponentContext } from '../types-uischema';\r\nimport { ComplexValue } from 'ui';\r\n\r\n/**\r\n * Render cache for connected components when iterating rows of data.\r\n * We re-use the same component for a column, instead of recreating it for each row.\r\n */\r\nexport interface CacheComponentContext extends ComponentContext {\r\n primaryKey?: ComplexValue<number>;\r\n}\r\n\r\nexport interface CacheKey {\r\n context: CacheComponentContext;\r\n id: number;\r\n name: string;\r\n statePath: string;\r\n}\r\n\r\n/**\r\n * max size to avoid memory leaks\r\n */\r\nconst CACHE_SIZE = 10000;\r\n\r\n/**\r\n * LRU cache would not make any sense since we have to clear whenever UI is re-built\r\n */\r\nconst iteratorCache = new Map();\r\n\r\nexport const getCachedComponent = (id: CacheKey) => iteratorCache.get(JSON.stringify(id));\r\n\r\nexport const clearComponentCache = (): void => iteratorCache.clear();\r\n\r\nexport const getCacheSize = (): number => iteratorCache.size;\r\n\r\nexport const addComponentToCache = (id: CacheKey, item: React.ComponentClass<any>) => {\r\n\r\n const cacheid = JSON.stringify(id);\r\n \r\n if ( iteratorCache.size >= CACHE_SIZE) {\r\n iteratorCache.clear();\r\n }\r\n\r\n if (iteratorCache.has(cacheid) === false) {\r\n iteratorCache.set(cacheid, item);\r\n }\r\n};\r\n","import { Component } from 'react';\r\nimport * as React from 'react';\r\nimport { findDOMNode } from 'react-dom';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { scrollIntoView } from 'app/infrastructure/platform/browser-dom';\r\n\r\n/**\r\n * Higher Order Component that evaluates if `props.hostProps().activeChildItem` is the current. If so, it activates\r\n * scrollIntoView animation to focus the UI element for the user, and passes the prop `activate:boolean` downwards\r\n */\r\nexport class Activator extends Component<any, any> {\r\n private element: any;\r\n public state: Readonly<any> = {\r\n lastActiveChildItem: undefined\r\n };\r\n\r\n public componentDidMount() {\r\n this.activateIfNeeded();\r\n }\r\n\r\n private get isActive(){\r\n const { activeChildItem } = this.props;\r\n\r\n if (activeChildItem && this.props.resolveContext.path && this.props.resolveContext.path.length > 1 ) {\r\n const partialPath = activeChildItem.slice(0, this.props.resolveContext.path.length);\r\n return deepEquals(this.props.resolveContext.path, partialPath);\r\n }\r\n return false;\r\n }\r\n\r\n private get shouldActivateItself(){\r\n const { activeChildItem } = this.props;\r\n const hasChanged = !deepEquals(this.state.lastActiveChildItem, activeChildItem);\r\n return hasChanged && this.isActive;\r\n }\r\n\r\n public componentDidUpdate(prevProps:any) {\r\n if(this.props !== prevProps) {\r\n this.activateIfNeeded();\r\n }\r\n }\r\n\r\n private activateIfNeeded(){\r\n const { activeChildItem } = this.props;\r\n if (this.shouldActivateItself && this.element) {\r\n this.activate();\r\n this.setState({lastActiveChildItem: activeChildItem});\r\n }\r\n }\r\n\r\n private activate = () => {\r\n scrollIntoView(findDOMNode(this.element) as HTMLElement, {\r\n time: 500\r\n });\r\n }\r\n\r\n public addRef = (el: any) => {\r\n if (el) {\r\n this.element = el;\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n // To avoid react-router instances being cloned (breaks the router), we add the existing router and history\r\n const { router, route, history } = this.props;\r\n\r\n return (\r\n <div ref={this.addRef}>\r\n {React.cloneElement(React.Children.only(this.props.children as any), {router, route, history, ...{activate: this.isActive}})}\r\n </div>\r\n );\r\n\r\n }\r\n}\r\n","import { addComponentToCache, CacheKey, getCachedComponent } from './iterator-cache';\r\nimport { Activator } from 'app/infrastructure/ui/renderer/activator';\r\nimport { \r\n connectIteratorComponent, \r\n createStateToPropsSelector \r\n} from 'app/infrastructure/ui/renderer/field-connector';\r\nimport * as React from 'react';\r\nimport { \r\n ComponentDescriptor, ConnectedComponentProps, \r\n ChildComponentContext, ComponentContext } from '../types-uischema';\r\nimport { Field } from './field';\r\nimport { getComponentUid } from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { ChildItem, RowProps } from 'app/infrastructure/ui/renderer/iterator-types';\r\n\r\n/**\r\n * Create the correct child CompositeKeys object\r\n * @param props the outermost host props\r\n * @param keys calculated CompositeKeys for the child row\r\n */\r\nexport const createRowDataContext = ({\r\n applicationId,\r\n path,\r\n primaryKey,\r\n virtual,\r\n defaultValues,\r\n mode\r\n}: ChildComponentContext): ChildComponentContext => {\r\n if (!Number.isFinite(applicationId)) {\r\n throw Error('Invalid applicationId');\r\n }\r\n if (!Array.isArray(path) && !virtual) {\r\n throw Error('Invalid contextual path');\r\n }\r\n return ({\r\n applicationId,\r\n path,\r\n primaryKey,\r\n virtual,\r\n defaultValues,\r\n mode\r\n });\r\n};\r\n\r\n/**\r\n * In the legacy data structure, it's a Parent of the actual render container that has the `iterate` property defined\r\n * \r\n * So.. we traverse a bit.\r\n * \r\n * Convention #1 - let first descriptor children be the UI definition for our \"master\" UI\r\n * \r\n * @param containersProps \r\n */\r\nexport const getMasterViewDescriptor = (containerDescriptor: ComponentDescriptor) => {\r\n const { children } = containerDescriptor;\r\n return children && children.length && children[0];\r\n };\r\n\r\n/**\r\n * In the legacy data structure, it's a Parent of the actual render container that has the `iterate` property defined\r\n * \r\n * So.. we traverse a bit.\r\n * \r\n * Convention #2 - let second descriptor children be the UI definition for our \"details\" UI\r\n * \r\n * @param containersProps \r\n */\r\nexport const getDetailsViewDescriptor = (containerDescriptor: ComponentDescriptor) => {\r\n const { children } = containerDescriptor;\r\n return children && children.length > 1 ? children[1] : undefined;\r\n};\r\n\r\n/**\r\n * Creats a new connected component, or returns one from the cache if it already exists.\r\n * The caching is to prevent the reconciler from mounting and unmounting components, since\r\n * react-redux connect() uses createElement internally. \r\n * \r\n * Note that this need for caching may indicate a design flaw..\r\n * \r\n */\r\nexport const getConnectedRowComponent = (rowProps: RowProps) => {\r\n const rowId: CacheKey = {\r\n context: { \r\n path: rowProps.resolveContext.path, \r\n applicationId: rowProps.resolveContext.applicationId, \r\n mode: rowProps.resolveContext.mode,\r\n primaryKey: (rowProps.resolveContext as ChildComponentContext).primaryKey\r\n },\r\n id: rowProps.componentDescriptor.id,\r\n name: rowProps.componentDescriptor.componentName,\r\n statePath: rowProps.statePath\r\n };\r\n const { componentClass, enhancers } = rowProps.componentDescriptor;\r\n let rowComponent = getCachedComponent(rowId);\r\n if (!rowComponent && componentClass) {\r\n rowComponent = connectIteratorComponent(createStateToPropsSelector(rowProps as any))(componentClass);\r\n \r\n if (enhancers) {\r\n rowComponent = enhancers\r\n .reduce((aggrComponent, wrapper) => wrapper(aggrComponent, rowProps as any), rowComponent);\r\n } \r\n\r\n addComponentToCache(rowId, rowComponent);\r\n }\r\n return rowComponent || null;\r\n};\r\n\r\n/**\r\n * Iterating downwards in the hierarchy requires that we base props on it's parent props before \r\n * connecting the component. This ensures that `connectComponent` has the props it needs to \r\n * establish the connection between the Component and the redux Store.\r\n * \r\n * @param parentProps Parent components props. \r\n * `actions, activate, hostProps, date utilitites, permissions` will be the included in the return object\r\n * @param childDescriptor Component descriptor to use\r\n * @param resolveContext ResolveContext with current data path\r\n * @param optionalProps Any extra to include\r\n */\r\nconst createChildPropsFromParentProps = (\r\n {\r\n actions,\r\n activate,\r\n activeChildItem,\r\n hostProps,\r\n formatDate, formatNumber, formatTime, createDateAsUtc, cloneDate, parseAsDateUTC,\r\n enabledChildEntityOperations,\r\n statePath\r\n }: ConnectedComponentProps,\r\n childDescriptor: ComponentDescriptor,\r\n resolveContext: ComponentContext,\r\n optionalProps: { [key: string]: any } = {}\r\n\r\n) => ({\r\n actions,\r\n activate,\r\n activeChildItem,\r\n formatDate, formatNumber, formatTime, createDateAsUtc, cloneDate, parseAsDateUTC,\r\n hostProps,\r\n enabledChildEntityOperations,\r\n statePath,\r\n componentDescriptor: childDescriptor,\r\n resolveContext,\r\n ...optionalProps\r\n} as any);\r\n\r\n/**\r\n * The Fields in the Form/View that expands when an item is selected\r\n * \r\n * @param containerProps The outermost props\r\n * @param rowProps The Tile`s props\r\n * @param keys CompositeKeys to the source data row\r\n */\r\nexport const renderDetailsView = (rowProps: RowProps) => {\r\n const detailsViewDescriptor = rowProps.detailsViewDescriptor;\r\n const DetailsComponent =\r\n (detailsViewDescriptor && detailsViewDescriptor.componentClass) || null;\r\n\r\n if (!DetailsComponent) {\r\n return null;\r\n }\r\n\r\n const uid = getComponentUid(rowProps.resolveContext);\r\n\r\n const fieldsInsideDetailsComponent = detailsViewDescriptor.children && detailsViewDescriptor.children.map(\r\n (detailFieldDescriptor: ComponentDescriptor, index: number) => {\r\n const fieldProps = createChildPropsFromParentProps(\r\n rowProps,\r\n detailFieldDescriptor,\r\n rowProps.resolveContext\r\n );\r\n\r\n return (\r\n <Field\r\n {...fieldProps}\r\n key={`${detailFieldDescriptor.id}`}\r\n />\r\n );\r\n }\r\n );\r\n\r\n return (\r\n <DetailsComponent\r\n key={`${uid}-details`}\r\n {...rowProps}\r\n >\r\n {fieldsInsideDetailsComponent}\r\n </DetailsComponent>\r\n );\r\n};\r\n\r\n/**\r\n * One Field is rendered per column of data in the source table\r\n */\r\nexport const renderFieldsPerColumn = (rowProps: RowProps) =>\r\n rowProps.componentDescriptor && rowProps.componentDescriptor.children &&\r\n rowProps.componentDescriptor.children.map(\r\n (fieldDescriptor: ComponentDescriptor, index: number) => {\r\n const fieldProps: ConnectedComponentProps = createChildPropsFromParentProps(\r\n rowProps,\r\n fieldDescriptor,\r\n rowProps.resolveContext\r\n );\r\n \r\n return <Field {...fieldProps} key={index} />;\r\n }\r\n );\r\n\r\n/**\r\n * Renders the concrete React component representing the row hosting field components per column. \r\n * \r\n * @param tileOrRowDescriptor \r\n * @param keys \r\n * @param rowProps \r\n */\r\nexport const renderRowComponentWithChildren = (rowProps: RowProps) => {\r\n const TileOrRow = getConnectedRowComponent(rowProps);\r\n const details = renderDetailsView(rowProps);\r\n const fieldsPerColumn = renderFieldsPerColumn(rowProps);\r\n\r\n const uid = getComponentUid(rowProps.resolveContext);\r\n\r\n return (\r\n <TileOrRow key={uid} details={details} {...rowProps}>\r\n {fieldsPerColumn}\r\n </TileOrRow>\r\n );\r\n};\r\n\r\n/**\r\n * - Invoked when a `ComponentDescriptor` in the hierarchy as a defined `iterate` property. \r\n * \r\n * - This property contains the name of a *child table* to produce one UI element per *row of data*. \r\n * Each row UI element has one or more `Fields` connected to a *Column in that row*. \r\n *\r\n * - The children of a Iterator has configuration to describe what columns in that row of data should be \r\n * presented in the UI. This can be thought of as a \"row template\".\r\n *\r\n * - The \"row template\" must be repeated for each row in the *child table* that the iterating component defines.\r\n * - Children in configuration is used to create row templates for iterative rendering\r\n * - By convention, **first child** is the master data view, **second child** is the detail data view\r\n *\r\n * > Why we do this:\r\n * >- Configuration only describes what *columns* to display for each row of data, so we'll have to create \r\n * a \"template function\" to call for each row of data in the target \"child table\".\r\n * >- The convention of first and second child mentioned is unfortunatly a *coincidential design choice* and should\r\n * be target in future improvements to config migration and format.\r\n * \r\n */\r\nexport const createIterator = (ContainerComponent: React.ComponentClass<any> | null) =>\r\n /**\r\n * @param containerProps {ConnectedComponentProps} The redux connect-ed props of the parent container. \r\n * For a Iterator could be e.g a TileView, and createIterator will invoke render functions for each Tile and \r\n * it's children, per row of data in `containerProps.childItems`\r\n */\r\n (\r\n containerProps: ConnectedComponentProps\r\n ) => {\r\n const { resolveContext, componentDescriptor } = containerProps;\r\n\r\n const applicationId = resolveContext && resolveContext.applicationId;\r\n const tileOrRowDescriptor = componentDescriptor && getMasterViewDescriptor(componentDescriptor);\r\n const detailsViewDescriptor = componentDescriptor && getDetailsViewDescriptor(componentDescriptor);\r\n const defaultValues = componentDescriptor && componentDescriptor.iterate && componentDescriptor.iterate.defaultValues;\r\n const mode = resolveContext && resolveContext.mode ? resolveContext.mode : 0;\r\n \r\n /**\r\n * Renders a UI element for *one* row of data. \r\n * This is typically a `Tile` or `Row` UI element.\r\n * Child elements representing each column gets rendered as children.\r\n * @param path \r\n */\r\n const renderRow = (childItem: ChildItem, index: number) => {\r\n \r\n // The store path is only present if this is a physical data row.\r\n // For virtual rows, there will not be a context, and it will not be possible to bind data within the tile.\r\n const path = childItem.storePath;\r\n const primaryKey = childItem.primaryKey;\r\n\r\n const rowDataContext = createRowDataContext({ applicationId, path, primaryKey, virtual: childItem.virtual, defaultValues, mode });\r\n const lastChild = index === containerProps.childItems.length - 1;\r\n const rowProps = createChildPropsFromParentProps(\r\n containerProps,\r\n tileOrRowDescriptor,\r\n rowDataContext,\r\n { detailsViewDescriptor, lastChild }\r\n ) as RowProps;\r\n\r\n const activatorKey = `activator${path && '-'}${JSON.stringify(path)}-${JSON.stringify(\r\n tileOrRowDescriptor.id\r\n )}`;\r\n\r\n return (\r\n <Activator {...rowProps} key={activatorKey}>\r\n {renderRowComponentWithChildren(rowProps)}\r\n </Activator>\r\n );\r\n };\r\n\r\n // There are no childrows present, don't bother render the TileView/Grid host component\r\n if (!containerProps.childItems) {\r\n return null;\r\n }\r\n\r\n const children = containerProps.childItems.map(renderRow);\r\n\r\n return (\r\n <ContainerComponent key={containerProps.componentId} {...containerProps}>\r\n {children}\r\n </ContainerComponent>\r\n );\r\n };\r\n","// tslint:disable max-func-body-length\r\n// tslint:disable:max-line-length\r\n// #region imports\r\nimport { createFormatters, createUTCDate, dateToUTC, parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { invariant } from 'app/infrastructure/log';\r\nimport { \r\n ComponentDataShape, ConnectedComponentProps, \r\n ObjectMap, EnabledChildEntityOperations,\r\n ComponentMetadata\r\n} from 'app/infrastructure/ui/types-uischema';\r\nimport { withConditionalRender } from 'app/infrastructure/ui/renderer/conditional-render';\r\nimport { withFallback } from 'app/infrastructure/ui/renderer/fallback';\r\nimport { getMemoized, memoize } from 'app/infrastructure/ui/renderer/property-cache';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { connect } from 'react-redux';\r\nimport { buildEvents } from '../builder/event-builder';\r\nimport { ComponentAsyncData, UiState } from '../form/types';\r\nimport { InitialUiEngineProps } from '../types-uischema';\r\nimport { createIterator } from './iterator';\r\nimport {\r\n getComponentData,\r\n getComponentMetadata,\r\n getComponentValues,\r\n getEntityContext,\r\n getInspectorPropsWhenDebugging\r\n} from './resolvers';\r\nimport { getIteratorContext } from './iterator-resolvers';\r\n\r\n// #endregion\r\n\r\n/**\r\n * Convert async loaded component data from store format to the component interface data shape\r\n * \r\n * @param componentData {ComponentAsyncData} store data\r\n */\r\nconst componentAsyncData = (componentData: ComponentAsyncData): ComponentDataShape => (componentData && {\r\n options: componentData.data,\r\n loadOptions: componentData.args,\r\n loadOptionsError: componentData.error || undefined,\r\n fetching: componentData.fetching\r\n});\r\n\r\n/**\r\n * Components might register `selectors` where they can select extra props\r\n * from the redux store to apply to a specialized component. If so, we\r\n * run the selectors here and return the props to merge as component props.\r\n */\r\nconst propsFromRegisteredSelectors = (state: UiState, props: ConnectedComponentProps, fullState: ApplicationState) => {\r\n let extraWrapperProps = {};\r\n if (props.componentDescriptor.selectors) {\r\n extraWrapperProps = props.componentDescriptor\r\n .selectors.reduce(\r\n (aggrProps, wrapper) => ({ \r\n ...aggrProps, \r\n ...wrapper(state, { ...props, ...aggrProps }, fullState) \r\n }), {}\r\n );\r\n }\r\n return extraWrapperProps;\r\n};\r\n\r\n/**\r\n * ReadOnly settings from db config has precedence over metadata in store, meaning that\r\n * setting readonly in config overrides every later value.\r\n * Store metadata contains read-only information both from case data fields and domains list.\r\n */\r\nconst readOnlyProps = (metaDataPropsFromStore: ComponentMetadata, properties: ObjectMap) => ({\r\n readOnly: properties.readOnly || metaDataPropsFromStore.readOnly\r\n});\r\n\r\n/**\r\n * Domains are required always or may become so after data changes. \r\n * This information is part of case metadata for each domain, and may change between temp saves.\r\n */\r\nconst requiredProps = (metaDataPropsFromStore: ComponentMetadata, properties: ObjectMap) => ({\r\n label: metaDataPropsFromStore.requiredField ? {\r\n ...(properties && properties.label),\r\n ...{\r\n required: metaDataPropsFromStore.requiredField\r\n }\r\n } : properties && properties.label\r\n});\r\n\r\nconst visibleProps = (metaDataPropsFromStore: ComponentMetadata, properties: ObjectMap) => ({\r\n visible: properties.visible && !metaDataPropsFromStore.hidden\r\n});\r\n\r\n/**\r\n * Validation errors from store\r\n */\r\nconst validationErrorsAsValidationProp = ({ validation, validationDescendants }: Partial<ComponentMetadata>) => ({ validation, validationDescendants });\r\n\r\n/**\r\n * Returns object containing enabled features, such as add/remove.\r\n * When **enabledFeatures** param is not set or current domain is explicitly marked as read only\r\n * returns { add: false, remove: false }.\r\n */\r\nconst enabledChildTableOperations = (metaDataPropsFromStore: any, enabledFeatures: EnabledChildEntityOperations) => ({\r\n enabledChildEntityOperations: (!!enabledFeatures && !metaDataPropsFromStore.readOnly\r\n ? { ...enabledFeatures }\r\n : { add: false, remove: false })\r\n});\r\n\r\n/**\r\n * Extract relevant props from redux store based on current State and host component settings\r\n */\r\nconst propsSpecificToThisComponent = (state: UiState, props: InitialUiEngineProps ) => ({\r\n resolveContext: getEntityContext(state, props),\r\n valueProps: getComponentValues(state, props),\r\n metadataProps: getComponentMetadata(state, props),\r\n componentData: getComponentData(state, props.componentDescriptor, getEntityContext(state, props)),\r\n inspectorProps: getInspectorPropsWhenDebugging(state, props)\r\n});\r\n\r\n/**\r\n * Locale dependent date formatting and parsing functions that components must use to creat eand format dates, and parse date input\r\n * \r\n * @param locale \r\n */\r\nconst dateFunctions = (locale: string) => ({\r\n ...createFormatters(locale),\r\n ...{\r\n createDate: createUTCDate,\r\n cloneDate: dateToUTC,\r\n parseDate: parseAsDateUTC\r\n }\r\n});\r\n\r\n/**\r\n * This is the final **mapStateToProps** function where the projection of configuration and data defines \r\n * what and how a component renders\r\n * \r\n * @param hostProps react props of the component hosting this individual component\r\n */\r\nexport function createStateToPropsSelector(\r\n configProps: InitialUiEngineProps) {\r\n\r\n return (appState: ApplicationState): ConnectedComponentProps => {\r\n\r\n const areaState = appState[configProps.statePath];\r\n\r\n invariant(!!areaState, `Containers state path \"${configProps.statePath}\" does not exist. Check reducers and default state shape.`);\r\n\r\n const {\r\n resolveContext,\r\n valueProps,\r\n metadataProps,\r\n componentData,\r\n inspectorProps\r\n } = propsSpecificToThisComponent(areaState, configProps);\r\n\r\n const hostProps = configProps.hostProps();\r\n const { locale: currentLocale = hostProps.intl.locale } = appState.app;\r\n const enabledChildEntityOperations = hostProps.enabledChildEntityOperations || configProps.enabledChildEntityOperations;\r\n const { componentDescriptor, detailsViewDescriptor, actions } = configProps;\r\n const { sequence, componentName, properties, id, componentDefaultProps } = componentDescriptor;\r\n\r\n // All props that could be changed dynamically when user does something,\r\n // (on every componentWillReceiveProps) \r\n // should be passed as props to cache for [deep] equality check on next cache lookup\r\n // This way we only re-render individual components, instead of a complete tree branch\r\n let currentUiProps = {\r\n resolveContext,\r\n ...valueProps,\r\n ...{ hostProps: configProps.hostProps },\r\n ...{ componentDescriptor, detailsViewDescriptor },\r\n ...readOnlyProps(metadataProps, properties),\r\n ...requiredProps(metadataProps, properties),\r\n ...visibleProps(metadataProps, properties),\r\n ...validationErrorsAsValidationProp(metadataProps),\r\n ...enabledChildTableOperations(metadataProps, enabledChildEntityOperations),\r\n ...componentAsyncData(componentData)\r\n };\r\n\r\n // use merged props as argument to selectors, not props\r\n currentUiProps = { ...currentUiProps, ...propsFromRegisteredSelectors(areaState, currentUiProps, appState) };\r\n\r\n // iterator props are resolved using both configured props and the dynamically generated props.\r\n // This allows the iterator to display children based on selections from the case data.\r\n const iteratorProps = getIteratorContext(areaState, configProps, currentUiProps);\r\n currentUiProps = { ...currentUiProps, ...iteratorProps };\r\n\r\n // Avoid wasted re-renders, immutable comparisions would invalidate props \r\n const cachedProps = getMemoized(resolveContext, id, currentUiProps);\r\n if (cachedProps) {\r\n return { ...cachedProps, ...inspectorProps };\r\n }\r\n\r\n // Resulting props for the components first render. Future renders will receive props trough cache merge.\r\n const finalStateAsProps: ConnectedComponentProps = {\r\n ...componentDefaultProps,\r\n\r\n // Components may use this for tabIndex for the relevant input control\r\n sequence,\r\n\r\n // Useful when inspecting\r\n componentName,\r\n\r\n // CSS identifier for the rendered component type\r\n className: (componentName || 'not-a-control-type').toLowerCase(),\r\n\r\n // Active locale\r\n locale: currentLocale,\r\n\r\n // Consistently apply id on root element of component. Stringify to avoid react warning.\r\n componentId: Number(id).toString(),\r\n\r\n // allow runtime inspection\r\n ...inspectorProps,\r\n\r\n // add properties built from \"domain attributes\"\r\n ...properties,\r\n\r\n // event handlers\r\n ...buildEvents(actions, componentDescriptor, resolveContext),\r\n\r\n // opt-in selectors for components\r\n ...currentUiProps,\r\n\r\n // Components may use formatters to format date, time and numbers\r\n ...dateFunctions(currentLocale)\r\n };\r\n\r\n memoize(resolveContext, id, finalStateAsProps);\r\n\r\n return finalStateAsProps;\r\n\r\n };\r\n}\r\n\r\nexport function createComponent(props: InitialUiEngineProps) {\r\n const { componentDescriptor } = props;\r\n let component = componentDescriptor.componentClass || null;\r\n\r\n if (componentDescriptor.enhancers) {\r\n component = componentDescriptor\r\n .enhancers\r\n .reduce((aggrComponent, wrapper) => wrapper(aggrComponent, props), component);\r\n }\r\n\r\n if (componentDescriptor.iterate) {\r\n component = createIterator(component);\r\n }\r\n return component;\r\n}\r\n\r\nexport function applyMandatoryEnhancers(component: React.ComponentClass<ConnectedComponentProps>) {\r\n let enhancedComponent: any = withConditionalRender(component, (props: any) => props.visible !== false);\r\n enhancedComponent = withFallback(enhancedComponent);\r\n return enhancedComponent;\r\n}\r\n\r\n/**\r\n * Provides a individual Field in a View with data using provide/connect to map dynamic props to the component\r\n * Any property derived from state or data is built and resolved here\r\n */\r\nexport function connectComponent(rootProps: InitialUiEngineProps) {\r\n let component = createComponent(rootProps);\r\n component = applyMandatoryEnhancers(component);\r\n const mapStateToProps = createStateToPropsSelector(rootProps);\r\n return connect(mapStateToProps)(component);\r\n}\r\n\r\n/**\r\n * Hides redux-connect dependency from callers\r\n */\r\nexport function connectIteratorComponent(mapStateToProps: (state: ApplicationState) => ConnectedComponentProps) {\r\n return (Component: React.ComponentClass<any>) => {\r\n return connect(mapStateToProps)(Component);\r\n };\r\n}\r\n","// tslint:disable no-use-before-declare no-console\r\nimport * as React from 'react';\r\nimport { ConnectedComponentProps, InitialUiEngineProps } from '../types-uischema';\r\nimport { debounceRender } from 'ui/common/debounce-render';\r\nimport { connectComponent } from 'app/infrastructure/ui/renderer/field-connector';\r\n\r\n/**\r\n * Connects a field to the redux store and recurses it's children\r\n *\r\n * @param hostProps props of the component hosting the root Field instance, usually the EntityView\r\n */\r\nexport const Expand = (hostProps: InitialUiEngineProps): JSX.Element => {\r\n const descriptor = hostProps.componentDescriptor;\r\n const ConnectedComponent = connectComponent(hostProps);\r\n\r\n let children = descriptor.children && descriptor.children.map((c: any) =>\r\n <Field key={`${c.id}`} {...hostProps} componentDescriptor={c} />\r\n );\r\n\r\n if ( Array.isArray(children) && !children.length){\r\n children = null;\r\n }\r\n\r\n return <ConnectedComponent>{children}</ConnectedComponent>;\r\n\r\n};\r\n\r\n/**\r\n * Field is data value connected to a single component.\r\n *\r\n * - It can recurse additional Fields from prop `children`\r\n *\r\n */\r\nexport class FieldComponent extends React.Component<InitialUiEngineProps | ConnectedComponentProps>{\r\n\r\n private componentTree: any;\r\n\r\n /**\r\n * We build our UI once, and never again as long as the UI definition has not changed\r\n * @param props\r\n */\r\n constructor(props: any) {\r\n super(props);\r\n this.componentTree = Expand(props);\r\n }\r\n\r\n /**\r\n * If a parent components tells us to render the view\r\n * we obey.\r\n * @param next\r\n */\r\n public componentDidUpdate(prev: any) {\r\n if (this.props.reconnect && !(prev as any).reconnect) {\r\n this.componentTree = Expand(this.props as any);\r\n }\r\n }\r\n\r\n /**\r\n * As long as nothing indicates that different components\r\n * should render to display our view, we return the already\r\n * calculated VDOM tree, otherwise the CPU will go nuts\r\n */\r\n public render(): any {\r\n return this.componentTree;\r\n }\r\n}\r\n\r\nexport const Field = debounceRender(FieldComponent);\r\n","// tslint:disable max-line-length\r\nimport * as React from 'react';\r\nimport { UiState } from './types';\r\nimport { OverlayComponent } from 'app/components';\r\nimport styles from './form-context.scss';\r\n\r\nexport interface FormProps {\r\n translation: {submit: string, cancel: string, overlay_text: string};\r\n submit: () => any;\r\n cancel: () => any;\r\n}\r\n\r\nexport const FormContext: React.SFC<FormProps & UiState> = ({\r\n editing,\r\n translation: text,\r\n children,\r\n cancel,\r\n submit\r\n}) => {\r\n\r\n return (\r\n <OverlayComponent\r\n displayOverlay={editing.submitting}\r\n overlayText={text.overlay_text}\r\n >\r\n <div className={styles.formContent}>\r\n <div className={styles.formBody}>\r\n <form key={'form-context-form'} noValidate>\r\n {children}\r\n </form>\r\n </div>\r\n </div>\r\n </OverlayComponent>\r\n );\r\n};\r\n","import { toJSON, fromJSON } from 'app/infrastructure/platform/json';\r\nimport { clientInfo } from 'app/infrastructure/log/client-info';\r\nimport * as React from 'react';\r\nimport styles from './fallback.scss';\r\n\r\nconst JsonTree: any = require('react-editable-json-tree').JsonTree;\r\n\r\n/**\r\n * Property panel displays details about the selected UI components configuration\r\n */\r\nexport class PropertyPanel extends React.PureComponent<any, any>{\r\n private exportProps: any = null;\r\n public state: Readonly<any> = {};\r\n\r\n /**\r\n * Allow user to copy config to clipboard\r\n */\r\n public copy = () => {\r\n\r\n // error objects cannot be serialized to JSON without deconstructing them first\r\n const error = this.props.$inspectedError && fromJSON(toJSON(this.props.$inspectedError));\r\n\r\n const textField = document.createElement('textarea');\r\n textField.value = toJSON({ ...this.exportProps, error, clientInfo: clientInfo() }, 4);\r\n document.body.appendChild(textField);\r\n textField.select();\r\n document.execCommand('copy');\r\n textField.remove();\r\n }\r\n\r\n public updatePreview = (props: any) => {\r\n if (this.props.onUpdatePreview) {\r\n this.props.onUpdatePreview(props);\r\n }\r\n }\r\n\r\n private prepare = (data: any) => {\r\n\r\n const {\r\n ...cloned\r\n } = data;\r\n\r\n if (!cloned.value) {\r\n // prevent react uncontrolled\r\n cloned.value = null;\r\n }\r\n\r\n Object.keys(cloned).forEach((prop: string) => {\r\n if (typeof cloned[prop] === 'function') {\r\n cloned[prop] = data[prop].toString().substr(0, 50) + '...';\r\n }\r\n });\r\n return cloned;\r\n }\r\n\r\n private isNodeReadOnly = (key: string, data: any, path: string[], depth: number, type: string) => {\r\n return type === 'function' ||\r\n ['children',\r\n 'sequence',\r\n 'componentId',\r\n 'resolveContext',\r\n 'loadOptions',\r\n 'formatter',\r\n 'formatters'].indexOf(key) >= 0;\r\n }\r\n\r\n public render() {\r\n\r\n // Since this is'nt a end-user feature we allow inner html\r\n // tslint:disable react-no-dangerous-html\r\n\r\n const { config, properties } = this.props.componentDescriptor;\r\n const { ...runtimeProps } = this.props;\r\n this.exportProps = { config, properties, runtimeProps };\r\n\r\n return <div className=\"card\" style={{ padding: 0, color: '#000' }}>\r\n\r\n <ul className={`list-group ${styles.scrollableParent}`} >\r\n <div style={{ display: 'inline-block' }}>\r\n <a href=\"#\" onClick={this.copy} className=\"pull-right\" title=\"Copy\">Copy to clipboard</a>\r\n </div>\r\n <div className={`${styles.scrollable}`}>\r\n <div className=\"card\" style={{ padding: 0 }}>\r\n <div className=\"card-header\">\r\n Server Configuration\r\n </div>\r\n <div className=\"card-block\">\r\n <JsonTree readOnly={true} data={config} />\r\n </div>\r\n </div>\r\n\r\n <div className=\"card\" style={{ padding: 0 }}>\r\n <div className=\"card-header\">\r\n Component Configuration\r\n </div>\r\n <div className=\"card-block\">\r\n <JsonTree readOnly={true} data={properties} />\r\n </div>\r\n </div>\r\n\r\n <div className=\"card\" style={{ padding: 0 }}>\r\n <div className=\"card-header\">\r\n Component Props\r\n </div>\r\n <div className=\"card-block\">\r\n <JsonTree\r\n data={this.prepare(runtimeProps)}\r\n readOnly={this.isNodeReadOnly}\r\n style={{ color: 'black' }}\r\n onFullyUpdate={this.updatePreview}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </ul>\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { PropertyPanel } from 'app/infrastructure/ui/renderer/property-panel';\r\nimport styles from './fallback.scss';\r\n\r\n/**\r\n * A debugging panel to inspect errors or component properties\r\n */\r\nexport class InspectionPanel extends React.PureComponent<any, any>{\r\n public hide = () => {\r\n this.props.actions.inspect(undefined);\r\n }\r\n\r\n private handlePreviewEdit = (preview: any) => {\r\n this.props.actions.preview(preview);\r\n }\r\n\r\n public render(){\r\n\r\n const title = this.props.$inspectedError ?\r\n <div className={styles.popoverMessage}> âš ï¸ <strong> Problem:</strong> {this.props.$inspectedError.message}</div> :\r\n <div className={styles.popoverMessage}>\r\n Inspecting <strong>{this.props.$inspectedComponent.componentDescriptor.label}</strong></div>;\r\n\r\n return <div className={styles.popoverContent}>\r\n\r\n <button style={{color: 'rgba(211, 216, 55, 0.57)', opacity: 1}} onClick={this.hide}\r\n type=\"button\" className=\"close\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span>\r\n </button>\r\n\r\n {title}\r\n\r\n <PropertyPanel\r\n {...this.props.$inspectedComponent}\r\n $inspectedError={this.props.$inspectedError}\r\n onUpdatePreview={this.handlePreviewEdit}\r\n />\r\n </div>;\r\n }\r\n}\r\n","import { clearComponentCache } from './iterator-cache';\r\nimport * as React from 'react';\r\nimport { Field } from './';\r\nimport { UiDefinition } from '../types-uidefinition';\r\nimport { UiSchema, EnabledChildEntityOperations } from '../types-uischema';\r\nimport { invariant } from '../../log';\r\nimport { RenderMode, SelectedValue } from 'app/types-shared';\r\nimport { FormContext } from 'app/infrastructure/ui/form/form-context';\r\nimport { debug } from 'app/infrastructure/log';\r\nimport { InspectionPanel } from 'app/infrastructure/ui/renderer/inspection-panel';\r\nimport { TabContainer, TabContainerDomId } from 'app/components';\r\nimport { SchemaBuilder } from '../builder';\r\nimport { EditState } from '../form/types';\r\nimport { ViewMode } from 'app/area/case/types-store';\r\n\r\nconst renderCaseTabs = (onClick) => <ul id={TabContainerDomId} role=\"tablist\" onClick={onClick} />;\r\n\r\n/**\r\n * Determine if component tree should be re-populated and re-connected to the store\r\n */\r\nconst shouldComponentsReconnect = (prev: ViewProps, next: ViewProps) => {\r\n return prev.renderMode !== next.renderMode || prev.schema !== next.schema;\r\n};\r\n\r\n/**\r\n * Indicates that we need to refactor\r\n */\r\nconst resolveRootDescriptor = (schema: UiSchema) => schema.children[0];\r\n\r\n/**\r\n * Connects a root entity to the store and establishes a wrapping operating context.\r\n *\r\n * @export\r\n * @class View\r\n * @extends {React.Component<any, any>}\r\n */\r\nclass EntityViewComponent extends React.PureComponent<ViewProps, any> {\r\n\r\n constructor(props: ViewProps) {\r\n super(props);\r\n invariant(\r\n !!this.props.schema && !!this.props.schema.children.length,\r\n 'Both dataSelector and schema must be supplied as props'\r\n );\r\n this.state = {};\r\n }\r\n\r\n public componentDidUpdate(prevProps: ViewProps) {\r\n debug('EntityView', 'new props', prevProps);\r\n const reconnect = shouldComponentsReconnect(prevProps, this.props);\r\n if (reconnect){\r\n debug('Will re-create VDOM');\r\n clearComponentCache();\r\n }\r\n this.setState({ reconnect });\r\n }\r\n\r\n public componentWillUnmount(){\r\n clearComponentCache();\r\n }\r\n\r\n private get finalProps() {\r\n return {\r\n ...this.props,\r\n ...{\r\n reconnect: this.state.reconnect,\r\n componentDescriptor: resolveRootDescriptor(this.props.schema)\r\n }\r\n } as any;\r\n }\r\n\r\n public render() {\r\n const {renderMode, uiDefinition} = this.props;\r\n const schema = SchemaBuilder.create(renderMode, uiDefinition);\r\n const moreThanOneTab = schema.availableSections.length > 1;\r\n const props = this.finalProps;\r\n props.hostProps = () => this.finalProps;\r\n\r\n // hide tabcontainer when rendering in print mode\r\n const TabControl = !props.print && <TabContainer\r\n label={this.props.translation.case_menu}\r\n visible={moreThanOneTab}\r\n renderTabs={renderCaseTabs}\r\n {...props} />;\r\n\r\n if (this.props.renderMode === RenderMode.edit) {\r\n return (\r\n <div className=\"entity-view\">\r\n\r\n {TabControl}\r\n\r\n <FormContext\r\n key=\"edit-form\"\r\n editing={this.props.editing}\r\n submit={this.props.onSubmit}\r\n cancel={this.props.onCancel}\r\n translation={this.props.translation}\r\n >\r\n <Field key=\"root-node\" {...props} />\r\n </FormContext>\r\n\r\n {(this.props as any).$inspectedComponent && <InspectionPanel {...props} />}\r\n </div>\r\n );\r\n }\r\n return (\r\n <div className=\"entity-view\">\r\n {TabControl}\r\n <Field {...props}/>\r\n {(this.props as any).$inspectedComponent && <InspectionPanel {...props} />}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport { EntityViewComponent as EntityView };\r\n\r\nexport interface ViewProps {\r\n valueSelector?: (\r\n state: any,\r\n propertyPath: string,\r\n resolveContext?: any\r\n ) => SelectedValue;\r\n statePath: string;\r\n schema: UiSchema;\r\n actions: {};\r\n intl: any;\r\n editing: EditState;\r\n onSubmit: () => any;\r\n onCancel: () => any;\r\n renderMode: RenderMode;\r\n translation: any;\r\n enabledChildEntityOperations?: EnabledChildEntityOperations;\r\n uiDefinition: UiDefinition;\r\n changeViewMode: (mode: ViewMode) => void;\r\n}\r\n","export * from './field';\r\nexport * from './entity-view';\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"switch__visuallyhidden--2SlNl\",\"focusable\":\"switch__focusable--35wnR\",\"switch\":\"switch__switch--2aBtK\",\"slider\":\"switch__slider--147IP\",\"switch-label\":\"switch__switch-label--3iB3P\",\"switchLabel\":\"switch__switch-label--3iB3P\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"details-expander__visuallyhidden--32n2U\",\"focusable\":\"details-expander__focusable--12xB5\",\"details-expander\":\"details-expander__details-expander--3cVbC\",\"detailsExpander\":\"details-expander__details-expander--3cVbC\",\"collapse-container\":\"details-expander__collapse-container--1dg95\",\"collapseContainer\":\"details-expander__collapse-container--1dg95\",\"expander\":\"details-expander__expander--2gzWP\",\"no-shadow\":\"details-expander__no-shadow--2h7Po\",\"noShadow\":\"details-expander__no-shadow--2h7Po\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"header-with-toolbar__visuallyhidden--3w_GO\",\"focusable\":\"header-with-toolbar__focusable--3vnJ4\",\"expander-header\":\"header-with-toolbar__expander-header--ZSAZv\",\"expanderHeader\":\"header-with-toolbar__expander-header--ZSAZv\",\"long-description-title\":\"header-with-toolbar__long-description-title--teaAs\",\"longDescriptionTitle\":\"header-with-toolbar__long-description-title--teaAs\",\"title\":\"header-with-toolbar__title--3zfcJ\",\"expander-close-x\":\"header-with-toolbar__expander-close-x--3FKw8\",\"expanderCloseX\":\"header-with-toolbar__expander-close-x--3FKw8\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-option__visuallyhidden--2vwcz\",\"focusable\":\"select-option__focusable--3F2x1\",\"select-check\":\"select-option__select-check--3foFd\",\"selectCheck\":\"select-option__select-check--3foFd\",\"select-has-children\":\"select-option__select-has-children--2X71P\",\"selectHasChildren\":\"select-option__select-has-children--2X71P\",\"long-description\":\"select-option__long-description--1C1rN\",\"longDescription\":\"select-option__long-description--1C1rN\"};","module.exports = (__webpack_require__(49))(633);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"badge__visuallyhidden--1GmTZ\",\"focusable\":\"badge__focusable--lwgb_\",\"label\":\"badge__label--YtruC\",\"strong\":\"badge__strong--1ksmt\",\"badge-wrapper\":\"badge__badge-wrapper--3Oc-v\",\"badgeWrapper\":\"badge__badge-wrapper--3Oc-v\",\"tooltip-overwrite\":\"badge__tooltip-overwrite--1YLkR\",\"tooltipOverwrite\":\"badge__tooltip-overwrite--1YLkR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tab-item__visuallyhidden--19dJ6\",\"focusable\":\"tab-item__focusable--32qlc\",\"tab-item\":\"tab-item__tab-item--24PcH\",\"tabItem\":\"tab-item__tab-item--24PcH\",\"icon-wrapper\":\"tab-item__icon-wrapper--3gQAe\",\"iconWrapper\":\"tab-item__icon-wrapper--3gQAe\",\"invalid-tab\":\"tab-item__invalid-tab--1ESxs\",\"invalidTab\":\"tab-item__invalid-tab--1ESxs\",\"warning-tab\":\"tab-item__warning-tab--1ZeUN\",\"warningTab\":\"tab-item__warning-tab--1ZeUN\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"case-listing-button__visuallyhidden--2vShW\",\"focusable\":\"case-listing-button__focusable--30kWC\",\"button-container\":\"case-listing-button__button-container--1yyOB\",\"buttonContainer\":\"case-listing-button__button-container--1yyOB\",\"button-wrapper\":\"case-listing-button__button-wrapper--2SMBU\",\"buttonWrapper\":\"case-listing-button__button-wrapper--2SMBU\",\"button\":\"case-listing-button__button--1N3SO\",\"error-message\":\"case-listing-button__error-message--14UOg\",\"errorMessage\":\"case-listing-button__error-message--14UOg\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"overlay\":\"overlay__overlay--FD0uJ\",\"overlayBg\":\"overlay__overlayBg--20PSr\",\"icon-as-bg\":\"overlay__icon-as-bg--DyVnY\",\"iconAsBg\":\"overlay__icon-as-bg--DyVnY\",\"spin-loader\":\"overlay__spin-loader--1Fo1B\",\"spinLoader\":\"overlay__spin-loader--1Fo1B\",\"spin\":\"overlay__spin--2iz3o\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"big-svg-checkbox__visuallyhidden--ePc1i\",\"focusable\":\"big-svg-checkbox__focusable--fa7TB\",\"big-checkbox\":\"big-svg-checkbox__big-checkbox--1GzRe\",\"bigCheckbox\":\"big-svg-checkbox__big-checkbox--1GzRe\",\"border\":\"big-svg-checkbox__border--8r3XZ\",\"check\":\"big-svg-checkbox__check--QrPNt\",\"is-checked\":\"big-svg-checkbox__is-checked--3FE5i\",\"isChecked\":\"big-svg-checkbox__is-checked--3FE5i\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"comment-input__visuallyhidden--1uWDF\",\"focusable\":\"comment-input__focusable--ZXSuo\",\"comment-input-container\":\"comment-input__comment-input-container--3Cyd8\",\"commentInputContainer\":\"comment-input__comment-input-container--3Cyd8\",\"user-icon-wrapper\":\"comment-input__user-icon-wrapper--2I0nA\",\"userIconWrapper\":\"comment-input__user-icon-wrapper--2I0nA\",\"comment-input\":\"comment-input__comment-input--2R9ei\",\"commentInput\":\"comment-input__comment-input--2R9ei\",\"user-icon\":\"comment-input__user-icon--12nE2\",\"userIcon\":\"comment-input__user-icon--12nE2\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"compact-code-title-tile__visuallyhidden--GzwZf\",\"focusable\":\"compact-code-title-tile__focusable--1JrRl\",\"compact-code-tile\":\"compact-code-title-tile__compact-code-tile--sDkLS\",\"compactCodeTile\":\"compact-code-title-tile__compact-code-tile--sDkLS\",\"control-label\":\"compact-code-title-tile__control-label--iiSns\",\"controlLabel\":\"compact-code-title-tile__control-label--iiSns\",\"with-meatball-menu\":\"compact-code-title-tile__with-meatball-menu--2hHnz\",\"withMeatballMenu\":\"compact-code-title-tile__with-meatball-menu--2hHnz\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-number-unit-of-measure__visuallyhidden--1i3OK\",\"focusable\":\"display-number-unit-of-measure__focusable--XPaOJ\",\"number-with-unit\":\"display-number-unit-of-measure__number-with-unit--2M4dR\",\"numberWithUnit\":\"display-number-unit-of-measure__number-with-unit--2M4dR\",\"number\":\"display-number-unit-of-measure__number--J99WD\",\"container\":\"display-number-unit-of-measure__container--1EzuZ\",\"unit\":\"display-number-unit-of-measure__unit--1bIeP\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"connected-cases__visuallyhidden--1UO8f\",\"focusable\":\"connected-cases__focusable--1fDdY\",\"connected-case-header\":\"connected-cases__connected-case-header--1i_-_\",\"connectedCaseHeader\":\"connected-cases__connected-case-header--1i_-_\",\"connected-case-id\":\"connected-cases__connected-case-id--13kMf\",\"connectedCaseId\":\"connected-cases__connected-case-id--13kMf\",\"connect-case-display\":\"connected-cases__connect-case-display--Fesy7\",\"connectCaseDisplay\":\"connected-cases__connect-case-display--Fesy7\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"report-view__visuallyhidden--5Jcyb\",\"focusable\":\"report-view__focusable--ilj_U\",\"report-panel\":\"report-view__report-panel--3jLwu\",\"reportPanel\":\"report-view__report-panel--3jLwu\",\"generate-button\":\"report-view__generate-button--3vaEE\",\"generateButton\":\"report-view__generate-button--3vaEE\",\"download-report-wrapper\":\"report-view__download-report-wrapper--z5omT\",\"downloadReportWrapper\":\"report-view__download-report-wrapper--z5omT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"open-case__visuallyhidden--2Qn8x\",\"focusable\":\"open-case__focusable--1vQeT\",\"input-section\":\"open-case__input-section--13Kmv\",\"inputSection\":\"open-case__input-section--13Kmv\",\"input-element\":\"open-case__input-element--1HuPH\",\"inputElement\":\"open-case__input-element--1HuPH\",\"expand\":\"open-case__expand--cdHr3\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tile-info__visuallyhidden--2qCdc\",\"focusable\":\"tile-info__focusable--3aCwz\",\"tile-info\":\"tile-info__tile-info--BAxUA\",\"tileInfo\":\"tile-info__tile-info--BAxUA\",\"tile-info-content\":\"tile-info__tile-info-content--wzNz4\",\"tileInfoContent\":\"tile-info__tile-info-content--wzNz4\",\"tile-id\":\"tile-info__tile-id--1ncvs\",\"tileId\":\"tile-info__tile-id--1ncvs\",\"tile-person-id\":\"tile-info__tile-person-id--5yfdT\",\"tilePersonId\":\"tile-info__tile-person-id--5yfdT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"alternative-id-item__visuallyhidden--j-GVW\",\"focusable\":\"alternative-id-item__focusable--gvBPZ\",\"item\":\"alternative-id-item__item--34bZW\",\"header\":\"alternative-id-item__header--2v9Sn\",\"validation\":\"alternative-id-item__validation---89qR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"section\":\"metro-line-section__section--HIT6a\",\"hidden-section\":\"metro-line-section__hidden-section--3yCfP\",\"hiddenSection\":\"metro-line-section__hidden-section--3yCfP\",\"anchor\":\"metro-line-section__anchor--1Mftl\",\"big-sticky-header-anchor\":\"metro-line-section__big-sticky-header-anchor--1e993\",\"bigStickyHeaderAnchor\":\"metro-line-section__big-sticky-header-anchor--1e993\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-item-lines__visuallyhidden--2yuck\",\"focusable\":\"codetable-item-lines__focusable--q0l0T\",\"line\":\"codetable-item-lines__line--2eGds\",\"hidden-line\":\"codetable-item-lines__hidden-line--3GZkI\",\"hiddenLine\":\"codetable-item-lines__hidden-line--3GZkI\",\"short-line\":\"codetable-item-lines__short-line--3GuWq\",\"shortLine\":\"codetable-item-lines__short-line--3GuWq\",\"horizontal-line\":\"codetable-item-lines__horizontal-line--pY6ID\",\"horizontalLine\":\"codetable-item-lines__horizontal-line--pY6ID\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"list-view-column-container__visuallyhidden--1Uud0\",\"focusable\":\"list-view-column-container__focusable--1J8p1\",\"center\":\"list-view-column-container__center--rEnR_\",\"list-view-column-container\":\"list-view-column-container__list-view-column-container--2vHhi\",\"listViewColumnContainer\":\"list-view-column-container__list-view-column-container--2vHhi\",\"list-view-column-container-mobile\":\"list-view-column-container__list-view-column-container-mobile--2JvKS\",\"listViewColumnContainerMobile\":\"list-view-column-container__list-view-column-container-mobile--2JvKS\",\"list-view-column-container-content\":\"list-view-column-container__list-view-column-container-content--Diyrm\",\"listViewColumnContainerContent\":\"list-view-column-container__list-view-column-container-content--Diyrm\",\"list-view-column-container-content-mobile\":\"list-view-column-container__list-view-column-container-content-mobile--2vBH1\",\"listViewColumnContainerContentMobile\":\"list-view-column-container__list-view-column-container-content-mobile--2vBH1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"list-view-item__visuallyhidden--mJ0Bj\",\"focusable\":\"list-view-item__focusable--3I27r\",\"list-view-item\":\"list-view-item__list-view-item--3WIOQ\",\"listViewItem\":\"list-view-item__list-view-item--3WIOQ\",\"list-view-item-title\":\"list-view-item__list-view-item-title--1Wd6d\",\"listViewItemTitle\":\"list-view-item__list-view-item-title--1Wd6d\",\"list-view-item-title-active\":\"list-view-item__list-view-item-title-active--14G_K\",\"listViewItemTitleActive\":\"list-view-item__list-view-item-title-active--14G_K\",\"list-view-item-icon\":\"list-view-item__list-view-item-icon--1Mu1T\",\"listViewItemIcon\":\"list-view-item__list-view-item-icon--1Mu1T\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"sms-modal__visuallyhidden--3WBFe\",\"focusable\":\"sms-modal__focusable--G7_yy\",\"wrapper\":\"sms-modal__wrapper--DtL9p\",\"input\":\"sms-modal__input--2-4b5\",\"right\":\"sms-modal__right--yvbAk\",\"readOnly\":\"sms-modal__readOnly--2FeeK\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"user-profile-heading__visuallyhidden--3a9Bp\",\"focusable\":\"user-profile-heading__focusable--2rjkp\",\"header-wrapper\":\"user-profile-heading__header-wrapper--3brM6\",\"headerWrapper\":\"user-profile-heading__header-wrapper--3brM6\",\"header-panel\":\"user-profile-heading__header-panel--7tpMh\",\"headerPanel\":\"user-profile-heading__header-panel--7tpMh\",\"section-heading\":\"user-profile-heading__section-heading--d0Q5r\",\"sectionHeading\":\"user-profile-heading__section-heading--d0Q5r\",\"flex-container\":\"user-profile-heading__flex-container--nob_f\",\"flexContainer\":\"user-profile-heading__flex-container--nob_f\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"messages__visuallyhidden--16D06\",\"focusable\":\"messages__focusable--Hpg0-\",\"messages-view\":\"messages__messages-view--cpabF\",\"messagesView\":\"messages__messages-view--cpabF\",\"header\":\"messages__header--29H6z\",\"message-section\":\"messages__message-section--2qlpc\",\"messageSection\":\"messages__message-section--2qlpc\"};","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar regexpExec = require('../internals/regexp-exec');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$<a>') !== '7';\n});\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\nvar REPLACE = wellKnownSymbol('replace');\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !(\n REPLACE_SUPPORTS_NAMED_GROUPS &&\n REPLACE_KEEPS_$0 &&\n !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n )) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }, {\n REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n }\n\n if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);\n};\n","'use strict';\nvar regexpFlags = require('./regexp-flags');\nvar stickyHelpers = require('./regexp-sticky-helpers');\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = String(str).slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.string.iterator');\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar global = require('../internals/global');\nvar defineProperties = require('../internals/object-define-properties');\nvar redefine = require('../internals/redefine');\nvar anInstance = require('../internals/an-instance');\nvar has = require('../internals/has');\nvar assign = require('../internals/object-assign');\nvar arrayFrom = require('../internals/array-from');\nvar codeAt = require('../internals/string-multibyte').codeAt;\nvar toASCII = require('../internals/string-punycode-to-ascii');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar URLSearchParamsModule = require('../modules/web.url-search-params');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar NativeURL = global.URL;\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar floor = Math.floor;\nvar pow = Math.pow;\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[A-Za-z]/;\nvar ALPHANUMERIC = /[\\d+\\-.A-Za-z]/;\nvar DIGIT = /\\d/;\nvar HEX_START = /^(0x|0X)/;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\dA-Fa-f]+$/;\n// eslint-disable-next-line no-control-regex\nvar FORBIDDEN_HOST_CODE_POINT = /[\\u0000\\u0009\\u000A\\u000D #%/:?@[\\\\]]/;\n// eslint-disable-next-line no-control-regex\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\u0000\\u0009\\u000A\\u000D #/:?@[\\\\]]/;\n// eslint-disable-next-line no-control-regex\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u001F ]+|[\\u0000-\\u001F ]+$/g;\n// eslint-disable-next-line no-control-regex\nvar TAB_AND_NEW_LINE = /[\\u0009\\u000A\\u000D]/g;\nvar EOF;\n\nvar parseHost = function (url, input) {\n var result, codePoints, index;\n if (input.charAt(0) == '[') {\n if (input.charAt(input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(input.slice(1, -1));\n if (!result) return INVALID_HOST;\n url.host = result;\n // opaque host\n } else if (!isSpecial(url)) {\n if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n url.host = result;\n } else {\n input = toASCII(input);\n if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n url.host = result;\n }\n};\n\nvar parseIPv4 = function (input) {\n var parts = input.split('.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.pop();\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && part.charAt(0) == '0') {\n radix = HEX_START.test(part) ? 16 : 8;\n part = part.slice(radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;\n number = parseInt(part, radix);\n }\n numbers.push(number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = numbers.pop();\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// eslint-disable-next-line max-statements\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var char = function () {\n return input.charAt(pointer);\n };\n\n if (char() == ':') {\n if (input.charAt(1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (char()) {\n if (pieceIndex == 8) return;\n if (char() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && HEX.test(char())) {\n value = value * 16 + parseInt(char(), 16);\n pointer++;\n length++;\n }\n if (char() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (char()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (char() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!DIGIT.test(char())) return;\n while (DIGIT.test(char())) {\n number = parseInt(char(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (char() == ':') {\n pointer++;\n if (!char()) return;\n } else if (char()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n result.unshift(host % 256);\n host = floor(host / 256);\n } return result.join('.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += host[index].toString(16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (char, set) {\n var code = codeAt(char, 0);\n return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);\n};\n\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nvar isSpecial = function (url) {\n return has(specialSchemes, url.scheme);\n};\n\nvar includesCredentials = function (url) {\n return url.username != '' || url.password != '';\n};\n\nvar cannotHaveUsernamePasswordPort = function (url) {\n return !url.host || url.cannotBeABaseURL || url.scheme == 'file';\n};\n\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && ALPHA.test(string.charAt(0))\n && ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));\n};\n\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (\n string.length == 2 ||\n ((third = string.charAt(2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\nvar shortenURLsPath = function (url) {\n var path = url.path;\n var pathSize = path.length;\n if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.pop();\n }\n};\n\nvar isSingleDot = function (segment) {\n return segment === '.' || segment.toLowerCase() === '%2e';\n};\n\nvar isDoubleDot = function (segment) {\n segment = segment.toLowerCase();\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\n// eslint-disable-next-line max-statements\nvar parseURL = function (url, input, stateOverride, base) {\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, char, bufferCodePoints, failure;\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = input.replace(TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n char = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (char && ALPHA.test(char)) {\n buffer += char.toLowerCase();\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {\n buffer += char.toLowerCase();\n } else if (char == ':') {\n if (stateOverride && (\n (isSpecial(url) != has(specialSchemes, buffer)) ||\n (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (isSpecial(url) && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (isSpecial(url)) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n url.path.push('');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && char == '#') {\n url.scheme = base.scheme;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (char == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (char == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (char == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '/' || (char == '\\\\' && isSpecial(url))) {\n state = RELATIVE_SLASH;\n } else if (char == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = base.path.slice();\n url.path.pop();\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (isSpecial(url) && (char == '/' || char == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (char == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (char != '/' && char != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (char == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += char;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (char == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url))\n ) {\n if (isSpecial(url) && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;\n failure = parseHost(url, buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (char == '[') seenBracket = true;\n else if (char == ']') seenBracket = false;\n buffer += char;\n } break;\n\n case PORT:\n if (DIGIT.test(char)) {\n buffer += char;\n } else if (\n char == EOF || char == '/' || char == '?' || char == '#' ||\n (char == '\\\\' && isSpecial(url)) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (char == '/' || char == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (char == EOF) {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n } else if (char == '?') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.host = base.host;\n url.path = base.path.slice();\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n url.host = base.host;\n url.path = base.path.slice();\n shortenURLsPath(url);\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (char == '/' || char == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {\n if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (char == EOF || char == '/' || char == '\\\\' || char == '?' || char == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = parseHost(url, buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += char;\n break;\n\n case PATH_START:\n if (isSpecial(url)) {\n state = PATH;\n if (char != '/' && char != '\\\\') continue;\n } else if (!stateOverride && char == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n state = PATH;\n if (char != '/') continue;\n } break;\n\n case PATH:\n if (\n char == EOF || char == '/' ||\n (char == '\\\\' && isSpecial(url)) ||\n (!stateOverride && (char == '?' || char == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n shortenURLsPath(url);\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else if (isSingleDot(buffer)) {\n if (char != '/' && !(char == '\\\\' && isSpecial(url))) {\n url.path.push('');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = buffer.charAt(0) + ':'; // normalize windows drive letter\n }\n url.path.push(buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n url.path.shift();\n }\n }\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(char, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (char == '?') {\n url.query = '';\n state = QUERY;\n } else if (char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && char == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (char != EOF) {\n if (char == \"'\" && isSpecial(url)) url.query += '%27';\n else if (char == '#') url.query += '%23';\n else url.query += percentEncode(char, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLConstructor, 'URL');\n var base = arguments.length > 1 ? arguments[1] : undefined;\n var urlString = String(url);\n var state = setInternalState(that, { type: 'URL' });\n var baseState, failure;\n if (base !== undefined) {\n if (base instanceof URLConstructor) baseState = getInternalURLState(base);\n else {\n failure = parseURL(baseState = {}, String(base));\n if (failure) throw TypeError(failure);\n }\n }\n failure = parseURL(state, urlString, null, baseState);\n if (failure) throw TypeError(failure);\n var searchParams = state.searchParams = new URLSearchParams();\n var searchParamsState = getInternalSearchParamsState(searchParams);\n searchParamsState.updateSearchParams(state.query);\n searchParamsState.updateURL = function () {\n state.query = String(searchParams) || null;\n };\n if (!DESCRIPTORS) {\n that.href = serializeURL.call(that);\n that.origin = getOrigin.call(that);\n that.protocol = getProtocol.call(that);\n that.username = getUsername.call(that);\n that.password = getPassword.call(that);\n that.host = getHost.call(that);\n that.hostname = getHostname.call(that);\n that.port = getPort.call(that);\n that.pathname = getPathname.call(that);\n that.search = getSearch.call(that);\n that.searchParams = getSearchParams.call(that);\n that.hash = getHash.call(that);\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar serializeURL = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (includesCredentials(url)) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n};\n\nvar getOrigin = function () {\n var url = getInternalURLState(this);\n var scheme = url.scheme;\n var port = url.port;\n if (scheme == 'blob') try {\n return new URL(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !isSpecial(url)) return 'null';\n return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');\n};\n\nvar getProtocol = function () {\n return getInternalURLState(this).scheme + ':';\n};\n\nvar getUsername = function () {\n return getInternalURLState(this).username;\n};\n\nvar getPassword = function () {\n return getInternalURLState(this).password;\n};\n\nvar getHost = function () {\n var url = getInternalURLState(this);\n var host = url.host;\n var port = url.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n};\n\nvar getHostname = function () {\n var host = getInternalURLState(this).host;\n return host === null ? '' : serializeHost(host);\n};\n\nvar getPort = function () {\n var port = getInternalURLState(this).port;\n return port === null ? '' : String(port);\n};\n\nvar getPathname = function () {\n var url = getInternalURLState(this);\n var path = url.path;\n return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';\n};\n\nvar getSearch = function () {\n var query = getInternalURLState(this).query;\n return query ? '?' + query : '';\n};\n\nvar getSearchParams = function () {\n return getInternalURLState(this).searchParams;\n};\n\nvar getHash = function () {\n var fragment = getInternalURLState(this).fragment;\n return fragment ? '#' + fragment : '';\n};\n\nvar accessorDescriptor = function (getter, setter) {\n return { get: getter, set: setter, configurable: true, enumerable: true };\n};\n\nif (DESCRIPTORS) {\n defineProperties(URLPrototype, {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n href: accessorDescriptor(serializeURL, function (href) {\n var url = getInternalURLState(this);\n var urlString = String(href);\n var failure = parseURL(url, urlString);\n if (failure) throw TypeError(failure);\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n origin: accessorDescriptor(getOrigin),\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n protocol: accessorDescriptor(getProtocol, function (protocol) {\n var url = getInternalURLState(this);\n parseURL(url, String(protocol) + ':', SCHEME_START);\n }),\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n username: accessorDescriptor(getUsername, function (username) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(username));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n password: accessorDescriptor(getPassword, function (password) {\n var url = getInternalURLState(this);\n var codePoints = arrayFrom(String(password));\n if (cannotHaveUsernamePasswordPort(url)) return;\n url.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n }),\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n host: accessorDescriptor(getHost, function (host) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(host), HOST);\n }),\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n hostname: accessorDescriptor(getHostname, function (hostname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n parseURL(url, String(hostname), HOSTNAME);\n }),\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n port: accessorDescriptor(getPort, function (port) {\n var url = getInternalURLState(this);\n if (cannotHaveUsernamePasswordPort(url)) return;\n port = String(port);\n if (port == '') url.port = null;\n else parseURL(url, port, PORT);\n }),\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n pathname: accessorDescriptor(getPathname, function (pathname) {\n var url = getInternalURLState(this);\n if (url.cannotBeABaseURL) return;\n url.path = [];\n parseURL(url, pathname + '', PATH_START);\n }),\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n search: accessorDescriptor(getSearch, function (search) {\n var url = getInternalURLState(this);\n search = String(search);\n if (search == '') {\n url.query = null;\n } else {\n if ('?' == search.charAt(0)) search = search.slice(1);\n url.query = '';\n parseURL(url, search, QUERY);\n }\n getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);\n }),\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n searchParams: accessorDescriptor(getSearchParams),\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n hash: accessorDescriptor(getHash, function (hash) {\n var url = getInternalURLState(this);\n hash = String(hash);\n if (hash == '') {\n url.fragment = null;\n return;\n }\n if ('#' == hash.charAt(0)) hash = hash.slice(1);\n url.fragment = '';\n parseURL(url, hash, FRAGMENT);\n })\n });\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\nredefine(URLPrototype, 'toJSON', function toJSON() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\nredefine(URLPrototype, 'toString', function toString() {\n return serializeURL.call(this);\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {\n return nativeCreateObjectURL.apply(NativeURL, arguments);\n });\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n // eslint-disable-next-line no-unused-vars\n if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {\n return nativeRevokeObjectURL.apply(NativeURL, arguments);\n });\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n","var anObject = require('../internals/an-object');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\nmodule.exports = function (it) {\n var iteratorMethod = getIteratorMethod(it);\n if (typeof iteratorMethod != 'function') {\n throw TypeError(String(it) + ' is not iterable');\n } return anObject(iteratorMethod.call(it));\n};\n","var $ = require('../internals/export');\nvar lastIndexOf = require('../internals/array-last-index-of');\n\n// `Array.prototype.lastIndexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof\n$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {\n lastIndexOf: lastIndexOf\n});\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Map` constructor\n// https://tc39.github.io/ecma262/#sec-map-objects\nmodule.exports = collection('Map', function (init) {\n return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar collectionDeleteAll = require('../internals/collection-delete-all');\n\n// `Map.prototype.deleteAll` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n deleteAll: function deleteAll(/* ...elements */) {\n return collectionDeleteAll.apply(this, arguments);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar bind = require('../internals/function-bind-context');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.every` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n every: function every(callbackfn /* , thisArg */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n return !iterate(iterator, function (key, value) {\n if (!boundFunction(value, key, map)) return iterate.stop();\n }, undefined, true, true).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar bind = require('../internals/function-bind-context');\nvar speciesConstructor = require('../internals/species-constructor');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.filter` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n filter: function filter(callbackfn /* , thisArg */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();\n var setter = aFunction(newMap.set);\n iterate(iterator, function (key, value) {\n if (boundFunction(value, key, map)) setter.call(newMap, key, value);\n }, undefined, true, true);\n return newMap;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar bind = require('../internals/function-bind-context');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.find` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n find: function find(callbackfn /* , thisArg */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n return iterate(iterator, function (key, value) {\n if (boundFunction(value, key, map)) return iterate.stop(value);\n }, undefined, true, true).result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar bind = require('../internals/function-bind-context');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.findKey` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n findKey: function findKey(callbackfn /* , thisArg */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n return iterate(iterator, function (key, value) {\n if (boundFunction(value, key, map)) return iterate.stop(key);\n }, undefined, true, true).result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar sameValueZero = require('../internals/same-value-zero');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.includes` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n includes: function includes(searchElement) {\n return iterate(getMapIterator(anObject(this)), function (key, value) {\n if (sameValueZero(value, searchElement)) return iterate.stop();\n }, undefined, true, true).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.includes` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n keyOf: function keyOf(searchElement) {\n return iterate(getMapIterator(anObject(this)), function (key, value) {\n if (value === searchElement) return iterate.stop(key);\n }, undefined, true, true).result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar bind = require('../internals/function-bind-context');\nvar speciesConstructor = require('../internals/species-constructor');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.mapKeys` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n mapKeys: function mapKeys(callbackfn /* , thisArg */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();\n var setter = aFunction(newMap.set);\n iterate(iterator, function (key, value) {\n setter.call(newMap, boundFunction(value, key, map), value);\n }, undefined, true, true);\n return newMap;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar bind = require('../internals/function-bind-context');\nvar speciesConstructor = require('../internals/species-constructor');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.mapValues` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n mapValues: function mapValues(callbackfn /* , thisArg */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();\n var setter = aFunction(newMap.set);\n iterate(iterator, function (key, value) {\n setter.call(newMap, key, boundFunction(value, key, map));\n }, undefined, true, true);\n return newMap;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.merge` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n // eslint-disable-next-line no-unused-vars\n merge: function merge(iterable /* ...iterbles */) {\n var map = anObject(this);\n var setter = aFunction(map.set);\n var i = 0;\n while (i < arguments.length) {\n iterate(arguments[i++], setter, map, true);\n }\n return map;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Map.prototype.reduce` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var noInitial = arguments.length < 2;\n var accumulator = noInitial ? undefined : arguments[1];\n aFunction(callbackfn);\n iterate(iterator, function (key, value) {\n if (noInitial) {\n noInitial = false;\n accumulator = value;\n } else {\n accumulator = callbackfn(accumulator, value, key, map);\n }\n }, undefined, true, true);\n if (noInitial) throw TypeError('Reduce of empty map with no initial value');\n return accumulator;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar bind = require('../internals/function-bind-context');\nvar getMapIterator = require('../internals/get-map-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.some` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n some: function some(callbackfn /* , thisArg */) {\n var map = anObject(this);\n var iterator = getMapIterator(map);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n return iterate(iterator, function (key, value) {\n if (boundFunction(value, key, map)) return iterate.stop();\n }, undefined, true, true).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\n\n// `Set.prototype.update` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {\n update: function update(key, callback /* , thunk */) {\n var map = anObject(this);\n var length = arguments.length;\n aFunction(callback);\n var isPresentInMap = map.has(key);\n if (!isPresentInMap && length < 3) {\n throw TypeError('Updating absent value');\n }\n var value = isPresentInMap ? map.get(key) : aFunction(length > 2 ? arguments[2] : undefined)(key, map);\n map.set(key, callback(value, key, map));\n return map;\n }\n});\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar quot = /\"/g;\n\n// B.2.3.2.1 CreateHTML(string, tag, attribute, value)\n// https://tc39.github.io/ecma262/#sec-createhtml\nmodule.exports = function (string, tag, attribute, value) {\n var S = String(requireObjectCoercible(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '</' + tag + '>';\n};\n","var fails = require('../internals/fails');\n\n// check the existence of a method, lowercase\n// of a tag and escaping quotes in arguments\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n var test = ''[METHOD_NAME]('\"');\n return test !== test.toLowerCase() || test.split('\"').length > 3;\n });\n};\n","import * as React from 'react';\r\nimport { AuthState } from 'app/types-shared';\r\nimport hoistStatics from 'hoist-non-react-statics';\r\n\r\nimport get from 'lodash/get';\r\n\r\n/**\r\n * Async load text translations once authenticated and user language becomes avaliable\r\n * \r\n * @param WrappedComponent The react component to inject props onto\r\n * @param translateMap Dictionary of {prop_name: language_text_id}\r\n */\r\nexport function withTranslation(WrappedComponent: any, path: string) {\r\n\r\n class LazyTranslationProvider extends React.Component<any> {\r\n\r\n private validAuthState(): boolean {\r\n return this.props.sharedState.authState === AuthState.Authenticated || \r\n this.props.sharedState.authState === AuthState.Anonymous;\r\n }\r\n // Load language etc when containers mount\r\n public componentDidMount() {\r\n\r\n const language = get(this.props, 'sharedState.language.value');\r\n if (this.validAuthState() && !!language) {\r\n this.props.loadTextCollection([path], language);\r\n }\r\n }\r\n\r\n // Load language when user settings is changed\r\n public componentDidUpdate(prevProps: any) {\r\n\r\n const language = get(this.props, 'sharedState.language.value');\r\n\r\n if (this.validAuthState()\r\n && !!language\r\n && language !== get(prevProps, 'sharedState.language.value')) {\r\n this.props.loadTextCollection([path], language);\r\n }\r\n }\r\n\r\n public render() {\r\n return (<WrappedComponent {...this.props} />);\r\n }\r\n\r\n }\r\n\r\n return hoistStatics(LazyTranslationProvider, WrappedComponent);\r\n}\r\n","import * as React from 'react';\r\n\r\nimport MaClose from 'react-icons/lib/md/close';\r\nimport { Link } from 'react-router';\r\n\r\nimport styles from './fullscreen-modal-header.scss';\r\nimport { LocationDescriptorObject } from 'history';\r\n\r\nexport interface FullscreenModalHeaderProps {\r\n componentId?: string;\r\n children?: any;\r\n previousUrl?: LocationDescriptorObject;\r\n onClose?: () => void;\r\n}\r\n\r\nexport const FullscreenModalHeader = (props: FullscreenModalHeaderProps) => {\r\n\r\n const onClose = (e: React.MouseEvent<any, MouseEvent>) => {\r\n if (props.onClose) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n\r\n props.onClose();\r\n }\r\n };\r\n return (\r\n <div className={`${styles.header} container`}>\r\n <div className={`main-grid ${styles.info} info`}>\r\n {props.children}\r\n </div>\r\n <Link to={props.previousUrl} onClick={onClose} className={`btn ${styles.closeButton}`} aria-label=\"Close dialog window\">\r\n <MaClose />\r\n </Link>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { SingleValueComponent } from '../common';\r\nimport { InputControlContext } from '../common/input-control-context/input-control-context';\r\nimport { DebounceInput } from '../common/debounce-input';\r\n\r\n/**\r\n * Simple component for text input.\r\n *\r\n * > It supports common InputControlContext component.\r\n */\r\nexport interface TextboxProps extends SingleValueComponent<string> {\r\n /**\r\n * Define max length of content text. Default is unlimited.\r\n */\r\n maxLength?: number;\r\n \r\n}\r\n\r\nexport class Textbox extends React.Component<TextboxProps, any> {\r\n\r\n private onBlur = (e: React.FormEvent<HTMLInputElement>) => {\r\n const currentTarget = e.currentTarget; \r\n this.props.onBlur && this.props.onBlur(currentTarget.value);\r\n }\r\n\r\n public render() {\r\n\r\n const {\r\n componentId,\r\n maxLength,\r\n readOnly,\r\n value,\r\n placeholder\r\n } = this.props;\r\n\r\n return (\r\n <InputControlContext\r\n componentId={componentId}\r\n className={this.props.className}\r\n label={this.props.label}\r\n info={this.props.info}\r\n infoLong={this.props.infoLong}\r\n validation={this.props.validation}\r\n readOnly={readOnly}\r\n >\r\n <div className=\"input-wrapper\">\r\n <DebounceInput\r\n className=\"form-control\"\r\n maxLength={maxLength}\r\n readOnly={readOnly}\r\n value={value}\r\n placeholder={!readOnly ? placeholder : undefined}\r\n onChange={this.props.onChange} \r\n focus={this.props.focus} \r\n onBlur={this.onBlur}/>\r\n </div>\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport styles from './select-expander.scss';\r\nimport { Triangle } from 'ui';\r\n\r\nexport interface SelectExpanderProps {\r\n id?: string;\r\n className?: string;\r\n}\r\n\r\nexport const SelectExpander: React.SFC<SelectExpanderProps> = ({id, className, children}) => {\r\n return (\r\n <div className={`${styles.selectExpander} select-expander scale-animate`}>\r\n <Triangle/>\r\n <div id={id} className={`${styles.collapseContainer} ${className} collapse show container dialog-expander`}>\r\n <div className={styles.expander}>\r\n {children}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport styles from './details-expander.scss';\r\nimport { Triangle } from 'ui';\r\n\r\nexport interface DetailsExpanderProps {\r\n id?: string;\r\n className?: string;\r\n expandAll?: boolean;\r\n onClose: () => void;\r\n}\r\n\r\nexport const DetailsExpander: React.SFC<DetailsExpanderProps> = ({id, className, children, onClose, expandAll}) => {\r\n return (\r\n <div className={`${styles.detailsExpander} details-expander`}>\r\n {!expandAll && <Triangle/>}\r\n <div id={id} className={`${!expandAll ? styles.collapseContainer : ''} ${className} collapse show container dialog-expander`}>\r\n <div className={`${styles.expander} ${expandAll ? styles.noShadow : ''}`}>\r\n {children}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport styles from './footer.scss';\r\nimport {ButtonPrimary} from '../../button';\r\n\r\nexport interface FooterProps {\r\n onClose: () => void;\r\n onConfirm?: () => void;\r\n textDone?: string;\r\n}\r\n\r\nexport const Footer: React.SFC<FooterProps> = ({onClose, onConfirm, textDone, children}) => {\r\n return (\r\n <div className={styles.expanderFooter}>\r\n {children}\r\n <ButtonPrimary onClick={onConfirm ? onConfirm : onClose}>{textDone}</ButtonPrimary>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { Button, ButtonProps } from './button';\r\n\r\nexport const ButtonPrimary = (props: ButtonProps) => {\r\n const { children, ...rest } = props;\r\n return (\r\n <Button btnType=\"btn-primary\" {...rest}>\r\n {children}\r\n </Button>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { Button, ButtonProps } from './button';\r\n\r\nexport const ButtonSecondary = (props: ButtonProps) => {\r\n const { children, ...rest } = props;\r\n return (\r\n <Button btnType=\"btn-secondary\" {...rest}>\r\n {children}\r\n </Button>\r\n );\r\n};\r\n","// tslint:disable variable-name\r\nimport * as React from 'react';\r\nimport { Button, ButtonProps } from './button';\r\n\r\nimport styles from './button-call-to-action.scss';\r\n\r\nexport const ButtonCallToAction = (props:ButtonProps) => {\r\n const { children, ...rest } = props;\r\n\r\n return (\r\n <Button btnType={styles.btnCallToAction} {...rest}>\r\n {children}\r\n </Button>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport styles from './header-with-toolbar.scss';\r\n\r\nexport interface HeaderWithToolbarProps {\r\n title?: string;\r\n className?: string;\r\n headerClassName?: string;\r\n hasLongDescription?: boolean;\r\n}\r\n\r\nexport const HeaderWithRightToolbar: React.SFC<HeaderWithToolbarProps> = ({ \r\n title, className, headerClassName, hasLongDescription, children }) => {\r\n \r\n const titleElement = !!title && <h3 className={className}>{title}</h3>;\r\n \r\n return (\r\n <div className={`row flex-nowrap justify-content-between ${styles.expanderHeader} \r\n ${!!title ? 'has-title' : ''} ${hasLongDescription && styles.longDescriptionTitle} ${headerClassName} dialog-expander-header`}>\r\n <div className={`col ${styles.title}`}>{titleElement}</div>\r\n <div className={` col col-auto ${styles.expanderCloseX} expander-close-x`}>\r\n <div className=\"d-flex\">\r\n {children}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { PromptConfirmationProps } from './types';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\n\r\nimport styles from './prompt-confirmation.scss';\r\n\r\nconst promptConfirmationComponent = (props: PromptConfirmationProps) => {\r\n\r\n const renderMessage = (key: number, label: string, text: string) => {\r\n \r\n return (\r\n <li key={key} className={styles[props.confirmationStyle]}>\r\n <span className={ `${styles[props.confirmationStyle]} ${styles.label}`}>{label}</span>\r\n <span className={ `${styles[props.confirmationStyle]} ${styles.message}`}>{text} </span>\r\n </li>\r\n ); \r\n }; \r\n\r\n const messageList = props.confirmMessages && props.confirmMessages.map(e=>renderMessage(e.key, e.label, e.message));\r\n\r\n return (\r\n <ModalWrapper\r\n headerTitle={props.title}\r\n btnCancelTitle={props.cancelText}\r\n btnTitle={props.continueText}\r\n onClose={props.onCancel}\r\n onDone={props.onContinue}\r\n largeSize={false}>\r\n <p className={styles.text}>{props.description}</p>\r\n <p>{messageList}</p>\r\n </ModalWrapper>\r\n );\r\n};\r\n\r\nexport { promptConfirmationComponent as PromptConfirmation };\r\n","import * as React from 'react';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { CloseOnBlur } from '../close-on-blur';\r\nimport { DropdownMenuProps, DropdownMenuState, DropdownMenuContext } from './types';\r\nimport { ButtonSecondary } from 'ui';\r\nimport * as PropTypes from 'prop-types';\r\nimport { OnClickOutside } from '../on-click-outside';\r\n\r\nimport styles from './dropdown-menu.scss';\r\n\r\nexport class DropdownMenu extends React.Component<DropdownMenuProps, DropdownMenuState> {\r\n public state: Readonly<DropdownMenuState> = {\r\n dropdownExpanded: false\r\n };\r\n\r\n public static childContextTypes: React.ValidationMap<DropdownMenuContext> = {\r\n handleDropdownHide: PropTypes.func.isRequired\r\n };\r\n\r\n public componentDidUpdate(prevProps: DropdownMenuProps, prevState: DropdownMenuState) {\r\n if (!!this.props.onExpandMenu && this.state.dropdownExpanded && !prevState.dropdownExpanded) {\r\n this.props.onExpandMenu();\r\n }\r\n\r\n if (!!this.props.onCloseMenu && !this.state.dropdownExpanded && prevState.dropdownExpanded) {\r\n this.setState({ offsetX: 0 });\r\n this.props.onCloseMenu();\r\n }\r\n\r\n if (this.props.closeOnDemand === false && !prevProps.closeOnDemand === false) {\r\n this.setState({ offsetX: 0, dropdownExpanded: false });\r\n }\r\n }\r\n\r\n public getChildContext() {\r\n return {\r\n handleDropdownHide: this.handleHide\r\n };\r\n }\r\n\r\n private handleClick = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.setState({\r\n dropdownExpanded: !this.state.dropdownExpanded\r\n });\r\n }\r\n\r\n private handleHide = () => {\r\n if (this.state.dropdownExpanded) {\r\n this.setState({\r\n dropdownExpanded: false\r\n });\r\n }\r\n }\r\n\r\n private keyMap: any = {\r\n escapeKey: ['esc']\r\n };\r\n\r\n private handlerHotkeys: any = {\r\n escapeKey: (e: React.SyntheticEvent<any>) => this.handleHide()\r\n };\r\n\r\n private onOpenDone = (e: React.AnimationEvent) => {\r\n const rect = e.currentTarget.getBoundingClientRect();\r\n if (rect.left < 0) {\r\n this.setState({ offsetX: -rect.left });\r\n }\r\n };\r\n\r\n public render() {\r\n const { dropdownExpanded, offsetX } = this.state;\r\n const onClickHandler = !!this.props.closeAfterClick ? this.handleHide : undefined;\r\n\r\n const menuItem =\r\n <div className=\"dropdown-trigger\">\r\n <ButtonSecondary onClick={this.handleClick}>\r\n {this.props.dropdownNode}\r\n </ButtonSecondary>\r\n </div>;\r\n\r\n const adjustmentStyle = offsetX ? { transform: `translateX(${offsetX}px)` } : {};\r\n\r\n return (<div id={this.props.id} className={`dropdown-wrapper ${styles.dropdownWrapper}`}>\r\n {dropdownExpanded ?\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlerHotkeys}>\r\n <OnClickOutside onClickOutside={this.handleHide}>\r\n <CloseOnBlur onBlur={this.handleHide}>\r\n <div className={`dropdown ${dropdownExpanded ? 'show' : ''}`}>\r\n {menuItem}\r\n <ul className={`dropdown-menu ${styles.dropdownMenu}`} onClick={onClickHandler}\r\n onAnimationEnd={this.onOpenDone} style={adjustmentStyle}>\r\n {this.props.children}\r\n </ul>\r\n </div>\r\n </CloseOnBlur>\r\n </OnClickOutside>\r\n </HotKeys> : <div className=\"dropdown\">{menuItem}</div>}\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport MdKeyboardControl from 'react-icons/lib/md/keyboard-control';\r\nimport { DropdownMenuProps } from './types';\r\nimport { DropdownMenu } from './dropdown-menu';\r\nimport styles from './meatball-menu.scss';\r\n\r\nexport interface MeatballMenuProps extends DropdownMenuProps {\r\n className?: string;\r\n}\r\n\r\nexport class MeatballMenu extends React.Component<MeatballMenuProps, any> {\r\n public render() {\r\n\r\n return <div className={`${styles.meatballDropdownWrapper} ${this.props.className ? this.props.className : ''} meatball-menu`}>\r\n <DropdownMenu dropdownNode={<MdKeyboardControl />} {...this.props} />\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport MdExpandMore from 'react-icons/lib/md/expand-more';\r\nimport MdExpandLess from 'react-icons/lib/md/expand-less';\r\n\r\nimport styles from './expandable.scss';\r\n\r\nexport enum ExpandableButtonPosition{\r\n bottom = 'bottom',\r\n top = 'top'\r\n}\r\nexport interface ExpandableProps {\r\n textDisplayMore?: String;\r\n textDisplayLess?: String;\r\n useMargin?: boolean;\r\n buttonPosition?: ExpandableButtonPosition;\r\n content: (collapsed: boolean) => React.ReactNode;\r\n}\r\n\r\nexport interface ExpandableState {\r\n collapsed: boolean;\r\n}\r\n\r\nexport class Expandable extends React.Component<ExpandableProps, ExpandableState> {\r\n public state: Readonly<ExpandableState> = {\r\n collapsed: true\r\n };\r\n\r\n private toggleExpander = (e: React.SyntheticEvent<HTMLAnchorElement>) => {\r\n e.preventDefault();\r\n this.setState({\r\n collapsed: !this.state.collapsed\r\n });\r\n }\r\n\r\n public render () {\r\n const {content, textDisplayMore, textDisplayLess, useMargin = true, buttonPosition = ExpandableButtonPosition.bottom} = this.props;\r\n const {collapsed} = this.state;\r\n\r\n const text = collapsed ? textDisplayMore : textDisplayLess;\r\n\r\n const buttonMore = <span className={`expandable ${useMargin ? styles.useMargins : ''} ${styles.expandableLink}`}>\r\n {text ? ' ' : ''}\r\n <a href=\"#\" className={`${!text ? styles.noText : ''}`} onClick={this.toggleExpander}>\r\n {text}{collapsed ? <MdExpandMore /> : <MdExpandLess />}\r\n </a></span>;\r\n\r\n if (buttonPosition === ExpandableButtonPosition.top) {\r\n return <>\r\n {buttonMore}\r\n {content && content(collapsed)}\r\n </>;\r\n }\r\n return <>\r\n {content && content(collapsed)}\r\n {buttonMore}\r\n </>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent } from '../common/types';\r\nimport { SelectType, SelectCommonProps } from '../common/select/types';\r\nimport { SelectBaseComponent } from '../common/select/select-base-component';\r\n\r\n/**\r\n * SelectSingle component let you choose one option from list of options.\r\n *\r\n * > It supports common InputControlContext component.\r\n */\r\nexport interface SelectSingleProps extends SingleKeyValueComponent<number>, SelectCommonProps {\r\n /**\r\n * Reset to previous selected value when the field is cleared.\r\n * Default is false.\r\n */\r\n resetPreviousValueWhenEmpty?: boolean;\r\n}\r\n\r\nexport class SelectSingle extends React.Component<SelectSingleProps> {\r\n public render() {\r\n return <SelectBaseComponent\r\n {...this.props}\r\n selectType={SelectType.single}\r\n valueItems={!!this.props.valueItem ? [this.props.valueItem] : []}\r\n />;\r\n }\r\n}\r\n","export { TileView } from './tile-view';\r\nexport * from './types';\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent } from 'ui/common';\r\nimport { compose } from 'redux';\r\nimport styles from './display-number.scss';\r\nimport { Label, NoValueDash } from 'ui/common';\r\n\r\nexport interface DisplayNumberProps extends SingleKeyValueComponent<number> {\r\n /**\r\n * Determine locale used. Default is fallback to current browser settings. Default is English.\r\n */\r\n locale?: any;\r\n /**\r\n * Predefined possible styles by the design handbook\r\n */\r\n style?: 'primary' | 'secondary';\r\n /**\r\n * When true, the label font is normal and the value font is bold\r\n */\r\n strong?: boolean; \r\n /**\r\n * When true, a predefined style class to render the label above the value is applied\r\n */\r\n showStacked: boolean;\r\n /**\r\n * When true, the component gets hidden when value is empty\r\n */\r\n hideIfNoValue?: boolean;\r\n /**\r\n * When true, thousand separator is enabled and separate values depending on the locale being used. Default is true.\r\n * -If decimal separator supported by the locale is dot then thousand separator is comma.\r\n * -If decimal separator supported by the locale is comma then thousand separator is dot. \r\n */\r\n useThousand?: boolean;\r\n /**\r\n * A prefix string to render in front of the number\r\n */\r\n prefix?: string;\r\n /**\r\n * When true, the component gets aligned to the end.\r\n * Hence, when LTR(left-to-right direction) is in effect it's pulled to the right end, else pulled to the left end.\r\n */\r\n alignToEnd?: boolean;\r\n /**\r\n * When true, both the label and the value fonts are bold and label is in uppercase. \r\n * Casing of numbers does not make sense, therefore the inversion is applied to the label instead.\r\n */\r\n invertStrong?: boolean;\r\n /**\r\n * Set maximum number of digits in decimals part. Default is 3.\r\n */\r\n maxDecimals?: number;\r\n \r\n /**\r\n * @internal\r\n */\r\n children?: any; \r\n}\r\n\r\n/*\r\n * Returns true if the input can be converted to a number, including numeric 0\r\n */\r\nexport const isNumeric = (s: string | number) => typeof s === 'number' && Number.isFinite(s) || \r\n (typeof s === 'string' && s.trim() !== '' && Number.isFinite(Number(s)) );\r\n\r\n/**\r\n * Displaying a databound text value consist of rendering a label, and the value.\r\n * \r\n * This component is responsible for the composition of the two.\r\n * \r\n * @param props \r\n */\r\nconst DisplayNumberComponent = (props: Partial<DisplayNumberProps>) => { \r\n const {\r\n className,\r\n componentId, \r\n hideIfNoValue = false,\r\n useThousand = true, \r\n label,\r\n valueItem,\r\n prefix='' \r\n } = props;\r\n \r\n const isValidNumber = !!valueItem && isNumeric(valueItem.value);\r\n\r\n//Do not render the component if the input is an invalid number and hideIfNoValue is false.\r\n if (!isValidNumber && !!hideIfNoValue) {\r\n return null;\r\n } \r\n \r\n const formattedNumber = !!valueItem && new Intl.NumberFormat(props.locale, {useGrouping: useThousand, \r\n maximumFractionDigits: props.maxDecimals}).format(valueItem.value); \r\n const alignContent = props.alignToEnd && styles.alignEnd; \r\n\r\n return ( \r\n <div className={`${className} ${alignContent}`} id={componentId}>\r\n <Label label={label} /> \r\n <span className={'value-number'}>\r\n {formattedNumber ? `${prefix}${formattedNumber}` : <NoValueDash/>}\r\n </span>\r\n </div>\r\n );\r\n};\r\n\r\n/**\r\n * A utility that maps known props to a known style and appends them to a list.\r\n * \r\n * The list of final style classes are concatenated into a valid JSX className string attribute\r\n * \r\n * @param props \r\n */\r\nconst styleFromProps = (props: DisplayNumberProps) =>\r\n [\r\n styles.number,\r\n props.className,\r\n styles[props.style] && styles[props.style], \r\n props.showStacked && styles.stackedColumn, \r\n props.strong && styles.strong,\r\n props.invertStrong && 'invert-strong'\r\n ].filter(s => s).join(' ');\r\n\r\n/**\r\n * Higher order component to override the final className\r\n * @param Component the component to decorate\r\n */\r\nconst styleVariations = (Component: any) => ({children, ...childProps}: DisplayNumberProps) => (\r\n <Component {...childProps} className={styleFromProps(childProps)}>\r\n {children}\r\n </Component>\r\n);\r\n\r\nexport const DisplayNumber = compose(styleVariations)(DisplayNumberComponent);\r\n","import * as React from 'react';\r\nimport { LoadOptions } from 'ui';\r\n\r\nexport interface OptionsCategoryFilterProps {\r\n categoryId: number;\r\n}\r\n\r\n/**\r\n * Adds the passed in categoryId prop as an option in calls to onLoadOptions.\r\n */\r\n\r\nexport const withOptionCategorySupport = <P extends { onLoadOptions?: (loadOptions: LoadOptions) => void }>(\r\n WrappedComponent: React.ComponentClass<P>\r\n): React.ComponentClass<P & OptionsCategoryFilterProps> => {\r\n return class extends React.Component<P & OptionsCategoryFilterProps> {\r\n private onLoadOptions = (options: LoadOptions): void => {\r\n if (this.props.onLoadOptions) {\r\n this.props.onLoadOptions({ categoryId: this.props.categoryId, ...options });\r\n }\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent {...this.props} {...{onLoadOptions: this.onLoadOptions}} />;\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { ANIMATE_OUT_SPEED } from 'ui/constants';\r\n\r\n/**\r\n * This interface is used by the wrapped component to know what to expect from this higher-order component.\r\n */\r\nexport interface OpenStateInjectedProps {\r\n isOpen: boolean;\r\n isClosing: boolean;\r\n open: () => void;\r\n close: (onClosedCallback?: () => void) => void;\r\n}\r\n\r\nexport interface OpenStateState extends React.ComponentState {\r\n isOpen: boolean;\r\n isClosing: boolean;\r\n}\r\n\r\nexport const withOpenState = (animated: boolean = false) =>\r\n<P extends {}>(\r\n WrappedComponent: (React.ComponentClass<P & OpenStateInjectedProps> | React.SFC<P & OpenStateInjectedProps>)\r\n): React.ComponentClass<P> => {\r\n return class extends React.Component<P, OpenStateState> {\r\n\r\n constructor(props: P) {\r\n super(props);\r\n\r\n this.state = this.createStateObject(false);\r\n }\r\n\r\n private createStateObject(isOpen: boolean, isClosing: boolean = false) {\r\n return {\r\n isOpen,\r\n isClosing\r\n } as Readonly<OpenStateState>;\r\n }\r\n\r\n private open = () => { \r\n if (this.state.isOpen) {\r\n return;\r\n }\r\n\r\n this.setState(this.createStateObject(true));\r\n }\r\n\r\n private close = (onClosedCallback: () => void) => {\r\n if (!this.state.isOpen) {\r\n return;\r\n }\r\n\r\n this.setState(this.createStateObject(true, true));\r\n\r\n const setClosedState = () =>\r\n this.setState(\r\n this.createStateObject(false, false), \r\n onClosedCallback\r\n );\r\n\r\n if(animated) {\r\n setTimeout(setClosedState, ANIMATE_OUT_SPEED);\r\n } else {\r\n setClosedState();\r\n }\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent\r\n {...this.props} {...{ isOpen: this.state.isOpen, close: this.close, open: this.open} as any}\r\n />;\r\n }\r\n };\r\n};\r\n","import { CaseView } from 'app/area/case/case-view';\r\nimport { caseTranslations } from 'app/area/case/constants';\r\nimport { CaseContainerProps } from 'app/area/case/types';\r\nimport { CaseState, ViewMode } from 'app/area/case/types-store';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { SpinLoader } from 'app/components/spin-loader';\r\nimport { STATE } from 'app/constants';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { actionCreators as uiEngineActions } from 'app/infrastructure/ui/form/actions';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport * as React from 'react';\r\nimport { withRouter } from 'react-router';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nimport { actionCreators } from './actions';\r\nimport { storeItemPathFromRoute } from 'app/infrastructure/store/entity-route';\r\n\r\n/**\r\n * Renders a single entity View component in read mode for a single case\r\n *\r\n * @export\r\n * @class CaseComponent\r\n * @extends {Component<CaseProps, any>}\r\n */\r\nexport class CaseComponent extends React.Component<\r\n CaseContainerProps & typeof actionCreators,\r\n CaseState\r\n> {\r\n public static statePath: string = STATE.case;\r\n\r\n private actions: Object;\r\n\r\n public constructor(props: any) {\r\n super(props);\r\n\r\n this.actions = bindActionCreators(\r\n {\r\n ...actionCreators,\r\n ...uiEngineActions\r\n },\r\n props.dispatch\r\n );\r\n }\r\n\r\n public componentDidMount() {\r\n if (this.props.caseNumber) {\r\n this.props.loadCase(this.props.caseNumber);\r\n }\r\n }\r\n\r\n public componentDidUpdate(prev: CaseContainerProps) {\r\n const nextCaseNumber = safeNumericString(this.props.params.id);\r\n\r\n if (nextCaseNumber && nextCaseNumber !== prev.caseNumber) {\r\n this.props.loadCase(nextCaseNumber);\r\n }\r\n\r\n if (!this.props.selectedId && !this.props.fetching) {\r\n navigate.toStartupView();\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const caseProps = { ...this.props, actions: this.actions };\r\n\r\n return this.props.canRender\r\n ? <div>\r\n <CaseView {...caseProps} />\r\n </div>\r\n : this.props.fetching && <SpinLoader />;\r\n }\r\n}\r\n\r\nconst selectors = {\r\n\r\n statePath: () => CaseComponent.statePath,\r\n\r\n applicationId: (state: CaseState, props: CaseContainerProps) => state.uiDefinition ? state.uiDefinition.applicationId : undefined,\r\n\r\n caseNumber: (state: CaseState, props: any) =>\r\n safeNumericString(props.params.id),\r\n\r\n entityId: (state: CaseState) => state.selectedId,\r\n\r\n entityStoreKey: (state: CaseState) => state.selectedId,\r\n\r\n canRender: (state: CaseState, props: any) => state.schema && !state.fetching,\r\n\r\n activeChildItem: (state: CaseState, props: CaseContainerProps) =>\r\n storeItemPathFromRoute(props.params, RenderMode.read, { id: state.selectedId}),\r\n\r\n activeSection: (_, props: CaseContainerProps) => Number(props.location.query.section),\r\n\r\n expandAll: (state: CaseState, props:any) =>\r\n (Object.keys(props.location.query) as any).includes('expandAll') ||\r\n state.viewMode === ViewMode.scroll,\r\n\r\n print: (_, props: CaseContainerProps) => (Object.keys(props.location.query) as any).includes('print')\r\n\r\n};\r\n\r\nconst container = containerFactory(\r\n withRouter(CaseComponent),\r\n actionCreators,\r\n selectors,\r\n caseTranslations\r\n);\r\n\r\nexport { container as Case };\r\n","import {\r\n ACTION,\r\n EnterDraftEdit,\r\n LeaveDraftEdit,\r\n RequestDraftDocument,\r\n ReceiveDraftDocument,\r\n FailDraftDocument,\r\n AddDocumentItem,\r\n ChildItemSelection,\r\n DeleteDocumentItem,\r\n EnterConnectedDraftEdit,\r\n CopyDocumentItem,\r\n ShowConfirmWarnings,\r\n WarningsConfirmed,\r\n TriggerValidation,\r\n ReceiveUiDefinition\r\n} from './action-types';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { SchemaBuilder } from 'app/infrastructure/ui/builder';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport { ActionMap } from 'app/area/case';\r\nimport {\r\n insertChild,\r\n createChild,\r\n deleteChild,\r\n copyChild\r\n} from 'app/infrastructure/store';\r\nimport { reducers as changeCaseTypeReducers } from './change-casetype/reducers';\r\n\r\nexport const reducers: ActionMap = {\r\n ...changeCaseTypeReducers,\r\n\r\n [ACTION.ENTER_DRAFT_EDIT]: (\r\n state: CaseState,\r\n action: EnterDraftEdit\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n renderMode: RenderMode.edit,\r\n schema: SchemaBuilder.create(RenderMode.edit, action.uiDefinition),\r\n uiDefinition: action.uiDefinition,\r\n activeChildItem: undefined\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_DRAFT_DOC]: (\r\n state: CaseState,\r\n action: RequestDraftDocument\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n fetching: true\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_DRAFT_DOC]: (\r\n state: CaseState,\r\n action: ReceiveDraftDocument\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n fetching: false,\r\n editing: {\r\n ...state.editing,\r\n\r\n saving: false,\r\n etag: action.etag,\r\n hasChanges: false,\r\n persistedValues: action.data,\r\n values: action.data,\r\n metadata: action.metadata\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DRAFT_DOC]: (\r\n state: CaseState,\r\n action: FailDraftDocument\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n fetching: false,\r\n editing: undefined\r\n }\r\n };\r\n },\r\n\r\n [ACTION.LEAVE_DRAFT_EDIT]: (\r\n state: CaseState,\r\n action: LeaveDraftEdit\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n editing: undefined,\r\n renderMode: RenderMode.read,\r\n schema: undefined,\r\n activeChildItem: undefined\r\n };\r\n },\r\n\r\n [ACTION.COPY_DOCUMENT_ITEM]: (\r\n state: CaseState,\r\n action: CopyDocumentItem\r\n ): CaseState => {\r\n let nextValues = state.editing.values;\r\n for(let i = 0; i < action.options.noOfCopies; i++){\r\n nextValues = copyChild(nextValues,action.documentItemPath);\r\n }\r\n return {\r\n ...state,\r\n ...{\r\n editing: {\r\n ...state.editing,\r\n\r\n hasChanges: true,\r\n\r\n values: nextValues\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.ADD_DOCUMENT_ITEM]: (\r\n state: CaseState,\r\n action: AddDocumentItem\r\n ): CaseState => {\r\n const newChild = createChild(\r\n action.parentKeys,\r\n action.entityType,\r\n action.childId,\r\n action.initialValues\r\n );\r\n\r\n const newCaseValues = insertChild(state.editing.values, newChild);\r\n\r\n // Unchanged state if the child was not inserted. This happens when there is already a child by the same id.\r\n if (!newCaseValues) {\r\n return { ...state };\r\n }\r\n\r\n return {\r\n ...state,\r\n ...{\r\n editing: {\r\n ...state.editing,\r\n\r\n hasChanges: true,\r\n\r\n values: newCaseValues\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.DELETE_DOCUMENT_ITEM]: (\r\n state: CaseState,\r\n action: DeleteDocumentItem\r\n ): CaseState => {\r\n const newCaseValues = deleteChild(state.editing.values, action.childKey);\r\n\r\n return {\r\n ...state,\r\n ...{\r\n editing: {\r\n ...state.editing,\r\n\r\n hasChanges: true,\r\n\r\n values: newCaseValues\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.SELECT_DOCUMENT_ITEM]: (\r\n state: CaseState,\r\n action: ChildItemSelection\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n activeChildItem: action.key\r\n }\r\n };\r\n },\r\n\r\n [ACTION.ENTER_CONNECTED_DRAFT_EDIT]: (\r\n state: CaseState,\r\n action: EnterConnectedDraftEdit\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n editing: {\r\n ...state.editing,\r\n connectedDrafts: action.connections\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.SHOW_CONFIRM_WARNINGS]: (\r\n state: CaseState,\r\n action: ShowConfirmWarnings\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n showConfirmWarnings: action.value,\r\n warnings: action.warnings\r\n }\r\n };\r\n },\r\n\r\n [ACTION.WARNINGS_CONFIRMED]: (\r\n state: CaseState,\r\n action: WarningsConfirmed\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n warningsConfirmed: action.value\r\n }\r\n };\r\n },\r\n\r\n [ACTION.TRIGGER_VALIDATION]: (\r\n state: CaseState,\r\n action: TriggerValidation\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n loadValidationMetadata: true\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_UI_DEFINITION]: (\r\n state: CaseState,\r\n action: ReceiveUiDefinition\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n schema: SchemaBuilder.create(RenderMode.edit, action.definition),\r\n uiDefinition: action.definition\r\n };\r\n }\r\n};\r\n","import { ACTION, ChangeCaseType, ChangeCaseTypeFailure, ChangeCaseTypeSuccess } from './action-types';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { ActionMap } from 'app/area/case';\r\n\r\nexport const reducers: ActionMap = {\r\n\r\n [ACTION.CHANGE_CASE_TYPE]: (state: CaseState, action: ChangeCaseType): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n fetching: true\r\n } \r\n };\r\n },\r\n [ACTION.CHANGE_CASE_TYPE_SUCCESS]: (state: CaseState, action: ChangeCaseTypeSuccess): CaseState => {\r\n return {\r\n ...state, \r\n ...{\r\n fetching: false\r\n },\r\n editing: {\r\n ...state.editing,\r\n ...{\r\n etag: action.etag\r\n }\r\n }\r\n };\r\n },\r\n [ACTION.CHANGE_CASE_TYPE_FAILURE]: (state: CaseState, action: ChangeCaseTypeFailure): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n fetching: false\r\n }\r\n };\r\n\r\n } \r\n\r\n};\r\n","import {ACTION, CreateEditDraft} from './action-types';\r\nimport {CaseState} from 'app/area/case/types-store';\r\nimport { ActionMap} from 'app/area/case';\r\nexport const reducers: ActionMap = {\r\n\r\n [ACTION.CREATE_EDIT_DRAFT]: (state: CaseState, action: CreateEditDraft): CaseState => {\r\n return {\r\n ...state,\r\n fetching: true\r\n };\r\n }\r\n\r\n};\r\n","import { ACTION, CreateNewDraft, CreateNewDraftFailure } from './action-types';\r\nimport { CaseState } from '../types-store';\r\nimport { ActionMap } from 'app/area/case';\r\n\r\nexport const reducers: ActionMap = {\r\n\r\n [ACTION.CREATE_NEW_DRAFT]: (state: CaseState, action: CreateNewDraft): CaseState => {\r\n return {\r\n ...state,\r\n schema: undefined,\r\n uiDefinition: undefined,\r\n fetching: true,\r\n activeChildItem: undefined,\r\n editing: undefined\r\n };\r\n },\r\n \r\n [ACTION.CREATE_NEW_DRAFT_FAILURE]: (state: CaseState, action: CreateNewDraftFailure): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n fetching: false\r\n }\r\n };\r\n\r\n } \r\n\r\n};\r\n","import { \r\n ACTION, RequestCaseEntityId, ReceiveCaseEntityId, \r\n FailRequestCaseEntityId, ReceiveConnectedCasePermissions, \r\n RequestConnectedCasePermissions } from './action-types';\r\nimport { ActionMap } from 'app/area/case/types';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { CasePermissions } from 'app/types-shared';\r\n\r\nconst reduceFromExisting = (state: CaseState, caseId: number, entityId: number, fetching: boolean) => {\r\n return {\r\n ...state,\r\n stateForCaseIds: {\r\n ...(state.stateForCaseIds || {}),\r\n [caseId]: {\r\n ...(state.stateForCaseIds || {})[caseId],\r\n valid: !!entityId, \r\n fetching\r\n }\r\n }\r\n };\r\n};\r\n\r\nexport const reducers: ActionMap = {\r\n\r\n [ACTION.REQUEST_CASE_ENTITY_ID]: (state: CaseState, action: RequestCaseEntityId): CaseState => {\r\n return {\r\n ...reduceFromExisting(state, action.caseId, undefined, true)\r\n };\r\n },\r\n \r\n [ACTION.RECEIVE_CASE_ENTITY_ID]: (state: CaseState, action: ReceiveCaseEntityId): CaseState => {\r\n return {\r\n ...reduceFromExisting(state, action.caseId, action.entityId, false)\r\n };\r\n },\r\n \r\n [ACTION.FAIL_REQUEST_CASE_ENTITY_ID]: (state: CaseState, action: FailRequestCaseEntityId): CaseState => {\r\n return {\r\n ...reduceFromExisting(state, action.caseId, undefined, false)\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_CONNECTED_CASE_PERMISSIONS]: (state: CaseState, action: RequestConnectedCasePermissions): CaseState => {\r\n return {\r\n ...state,\r\n stateForCaseIds: {\r\n ...state.stateForCaseIds,\r\n ...action.ids.reduce((aggr, id) => ({\r\n ...aggr,\r\n [id]: {\r\n ...(state.stateForCaseIds || {})[id],\r\n fetchingPermissions: true,\r\n permissions: undefined\r\n }\r\n }), {})\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CONNECTED_CASE_PERMISSIONS]: (state: CaseState, action: ReceiveConnectedCasePermissions): CaseState => {\r\n return {\r\n ...state,\r\n stateForCaseIds: {\r\n ...state.stateForCaseIds,\r\n ...Object.keys(action.permissions).reduce((aggr, id) => ({\r\n ...aggr,\r\n [id]: {\r\n ...(state.stateForCaseIds || {})[id],\r\n fetchingPermissions: false,\r\n permissions: action.permissions[id]\r\n }\r\n }), {} as { [caseId: string]: { valid: boolean, fetching: boolean, permissions: CasePermissions } })\r\n }\r\n };\r\n }\r\n};\r\n","import { \r\n ACTION, RequestSearchExternalProvider, ReceiveSearchExternalProvider, \r\n FailSearchExternalProvider } from './action-types';\r\nimport { ActionMap } from 'app/area/case/types';\r\nimport { CaseState } from 'app/area/case/types-store';\r\n\r\nexport const reducers: ActionMap = {\r\n [ACTION.REQUEST_SEARCH_EXTERNAL_PROVIDER]: (state: CaseState, action: RequestSearchExternalProvider): CaseState => ({\r\n ...state,\r\n searchExternalProvider: {\r\n fetching: true,\r\n caseDraftId: action.caseDraftId,\r\n domainId: action.domainId,\r\n searchConditions: action.searchConditions,\r\n resultItems: undefined,\r\n error: undefined\r\n }\r\n }),\r\n [ACTION.RECEIVE_SEARCH_EXTERNAL_PROVIDER]: (state: CaseState, action: ReceiveSearchExternalProvider): CaseState => ({\r\n ...state,\r\n searchExternalProvider: {\r\n ...(state.searchExternalProvider || {}),\r\n fetching: false,\r\n caseDraftId: action.caseDraftId,\r\n domainId: action.domainId,\r\n searchConditions: undefined,\r\n resultItems: action.resultItems\r\n }\r\n }),\r\n [ACTION.FAIL_SEARCH_EXTERNAL_PROVIDER]: (state: CaseState, action: FailSearchExternalProvider): CaseState => ({\r\n ...state,\r\n searchExternalProvider: {\r\n fetching: false,\r\n caseDraftId: action.caseDraftId,\r\n domainId: action.domainId,\r\n error: action.error\r\n }\r\n }),\r\n [ACTION.CLEAR_SEARCH_EXTERNAL_PROVIDER_RESULTS]: (state: CaseState): CaseState => ({\r\n ...state,\r\n searchExternalProvider: undefined\r\n })\r\n};\r\n","import { StoreData, Entity } from 'app/types-shared';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { debug } from 'app/infrastructure/log';\r\nimport isEmpty from 'lodash/isempty';\r\nimport { getIds, getById } from 'app/infrastructure/store/query';\r\n\r\nconst hasProperty = (obj: Object, key: string) =>\r\n obj && (Object.keys(obj) as any).includes(key);\r\n\r\n/**\r\n * Calculates and patches local changes in userData objects, if any, onto the serverData objects\r\n *\r\n * @param userData\r\n * @param serverData\r\n * @param sent\r\n */\r\nconst applyLocalChanges = (\r\n userData: Entity,\r\n serverData: Entity,\r\n sent: Entity\r\n) => {\r\n // Compare each local field value to the value that was sent off to server, ensure that a resolution row from server exists\r\n let changes: Entity = userData\r\n ? Object.keys(userData)\r\n .filter(prop => {\r\n // - Field is not present in values returned from server, and was never sent-off for save, so it must be a local change\r\n if (!hasProperty(serverData, prop) && !hasProperty(sent, prop)) {\r\n return true;\r\n }\r\n // - Given local data and sent off data, any diff is consider a local change\r\n return userData && sent && !deepEquals(userData[prop], sent[prop]);\r\n })\r\n .reduce(\r\n (res, prop) => ({\r\n ...res,\r\n [prop]: userData[prop]\r\n }),\r\n {} as Entity\r\n )\r\n : undefined;\r\n\r\n changes = isEmpty(changes) ? undefined : changes;\r\n\r\n if (changes) {\r\n // Assist debugging this module\r\n const diff = Object.keys(changes).map(c => ({\r\n [c]: {\r\n was: sent ? sent[c] : undefined,\r\n is: changes[c],\r\n // highlight missing handling of [] compared to [{value:''}] etc, pending improvement\r\n diff:\r\n JSON.stringify(sent ? sent[c] : undefined) !==\r\n JSON.stringify(changes[c])\r\n }\r\n }));\r\n diff.length && debug('Pending user changes', diff);\r\n }\r\n\r\n // return current server values with detected local changes spreaded on top\r\n const result = {\r\n ...serverData,\r\n ...changes\r\n };\r\n\r\n // throw away entities without id, or props\r\n return isEmpty(result) || !result.id ? undefined : result;\r\n};\r\n\r\n/**\r\n * Compare store data with server request and response and return updated state\r\n *\r\n * @param {StoreData} userData current store state\r\n * @param {StoreData} serverData server response state\r\n * @param {StoreData} base server request state\r\n * @returns {StoreData} new store state\r\n */\r\nexport const getPatchedState = (\r\n userData: StoreData,\r\n serverData: StoreData,\r\n base: StoreData\r\n): StoreData => {\r\n const ids = {\r\n ...getIds(userData),\r\n ...getIds(serverData)\r\n };\r\n\r\n return Object.keys(ids)\r\n .reduce(\r\n (res, key) => [\r\n ...res,\r\n applyLocalChanges(\r\n getById(userData, ids[key]),\r\n getById(serverData, ids[key]),\r\n getById(base, ids[key])\r\n )\r\n ],\r\n []\r\n\r\n //applyLocalChanges may return undefined, filter those\r\n )\r\n .filter(x => x);\r\n};\r\n","import {\r\n ACTION,\r\n ValueChange,\r\n RequestImmediateBackgroundSave\r\n} from './action-types';\r\nimport { Reducer } from 'redux';\r\nimport {\r\n RequestCodetable,\r\n RequestCodetableError,\r\n ReceiveCodetable\r\n} from './action-types';\r\nimport {\r\n BeginBackgroundSave,\r\n BackgroundSaveComplete,\r\n BackgroundSaveFailed,\r\n BeginCaseSave,\r\n RequestCaseSave,\r\n CaseSaveComplete,\r\n CaseSaveFailed\r\n} from './action-types';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { toJSON } from 'app/infrastructure/platform';\r\nimport { UiState, EditState } from './types';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { codeItemToStoreValue } from '../../data/codes';\r\nimport { StoreData } from 'app/types-shared';\r\nimport { getById } from 'app/infrastructure/store/query';\r\nimport { getPatchedState } from 'app/infrastructure/store/patch';\r\n\r\ninterface ActionMap<T> {\r\n [indexer: string]: Reducer<T>;\r\n}\r\n\r\nconst INITIAL_EDIT_STATE: EditState = {\r\n // current values\r\n values: [],\r\n\r\n // current metadata\r\n metadata: { domains: {} },\r\n\r\n // validation errors returned from api\r\n loadValidationMetadata: false,\r\n\r\n // etag from last save\r\n etag: null,\r\n\r\n // used to mark that api operation was triggered and should not begin another one\r\n fetching: false,\r\n\r\n // used to mark that case submitting was triggered in ui\r\n submitting: false,\r\n\r\n // the delta of persisted and current\r\n hasChanges: false,\r\n\r\n // used to revert pending changes, avaliable until background save is done\r\n // processing\r\n persistedValues: [],\r\n\r\n // No background saves has run yet\r\n pristine: true\r\n};\r\n\r\n/**\r\n * Compares master and details entities in 2 arrays of entities, where the first item is always\r\n * the master entity and the rest the child entities.\r\n * Normally this would be an array compare, but the order of entities are not guaranteed in\r\n * the store or response, so there must be an individual one-way lookup comparing\r\n * the incoming with the existing.\r\n * @param first\r\n * @param second\r\n */\r\nconst caseEquals = (a: StoreData, b: StoreData) =>\r\n a.every(localChild => {\r\n // With local changes a as source, find matches and deep equal check each object\r\n //\r\n // NOTE: to prevent an double save loop due to incoming calculations triggering an\r\n // autosave, we would need metadata on those fields up-front.\r\n // That is: field1:'yo' dispatched, the server calculates field2:'yo that' then this code\r\n // would not accept that without triggering yet another background save upon return\r\n const savedChild = b.find(\r\n el => JSON.stringify(el.id) === JSON.stringify(localChild.id)\r\n );\r\n return deepEquals(localChild, savedChild);\r\n });\r\n\r\n/**\r\n * Reducers for case. Pattern to be able to extract modules when it grows.\r\n */\r\nconst reducers: ActionMap<UiState> = {\r\n /**\r\n * Run when a component wants codetable data\r\n */\r\n [ACTION.LOAD_CODES]: (state: UiState, action: RequestCodetable): UiState => {\r\n return {\r\n ...state,\r\n ...{\r\n tempdata: {\r\n ...state.tempdata,\r\n ...{\r\n [toJSON(action.context)]: {\r\n ...state.tempdata[toJSON(action.context)],\r\n fetching: true\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Runs if a codetable data request failed\r\n */\r\n [ACTION.LOAD_CODES_ERROR]: (\r\n state: UiState,\r\n action: RequestCodetableError\r\n ): UiState => {\r\n return {\r\n ...state,\r\n ...{\r\n tempdata: {\r\n ...state.tempdata,\r\n ...{\r\n [toJSON(action.context)]: {\r\n ...state.tempdata[toJSON(action.context)],\r\n data: null,\r\n args: action.loadOptions,\r\n fetching: false,\r\n error: true\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component receives its code data\r\n */\r\n [ACTION.LOAD_CODES_OK]: (state: any, action: ReceiveCodetable): CaseState => {\r\n const codes =\r\n action.data &&\r\n action.data.rootCodes &&\r\n action.data.rootCodes.map(codeItemToStoreValue);\r\n\r\n return {\r\n ...state,\r\n\r\n ...{\r\n tempdata: {\r\n ...state.tempdata,\r\n ...{\r\n [toJSON(action.context)]: {\r\n data: codes,\r\n args: action.loadOptions,\r\n fetching: false,\r\n error: null\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component fires a onChange event\r\n */\r\n [ACTION.VALUE_CHANGE]: (state: UiState, action: ValueChange): UiState => {\r\n const currentEditing = state.editing || INITIAL_EDIT_STATE;\r\n\r\n const targetEntity = getById(currentEditing.values, action.storePath);\r\n const currentIndex = currentEditing.values.indexOf(targetEntity);\r\n\r\n const currentValues = [\r\n ...currentEditing.values.slice(0, currentIndex),\r\n {\r\n ...targetEntity,\r\n [action.dataTag]: action.value\r\n },\r\n ...currentEditing.values.slice(currentIndex + 1)\r\n ];\r\n\r\n const modified = !caseEquals(currentValues, currentEditing.persistedValues);\r\n\r\n return {\r\n ...state,\r\n editing: {\r\n ...currentEditing,\r\n values: currentValues,\r\n hasChanges: modified\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_IMMEDIATE_BACKGROUND_SAVE]: (\r\n state: UiState,\r\n action: RequestImmediateBackgroundSave\r\n ): UiState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n\r\n // If a background save is already in process, we queue up another one\r\n // to fire immediately after the current (2). If not, we set the counter to 1.\r\n immediateSaveRequests: state.editing.fetching ? 2 : 1\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component wants to save the data\r\n */\r\n [ACTION.BACKGROUND_SAVE]: (\r\n state: UiState,\r\n action: BeginBackgroundSave\r\n ): UiState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n savedValues: state.editing.values,\r\n fetching: true\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component finished saving the data\r\n */\r\n [ACTION.BACKGROUND_SAVE_OK]: (\r\n state: UiState,\r\n action: BackgroundSaveComplete\r\n ): UiState => {\r\n if (!state.editing) {\r\n return state;\r\n }\r\n\r\n // incoming is the saved case entity returned from the last save request\r\n const incomingEntity = action.data;\r\n\r\n // If a delete was initiated, it must be removed client side after the server save succeeds.\r\n // However, there are edge cases. If an item was both added and deleted in the timeframe of a\r\n // background save, we're in a trickier situation. This would call for a correlation id.\r\n\r\n // Deletes that are pending locally should be left in state.editing.values.\r\n // Deletes that have been sent to the server (eg. existed in state.editing.savedValues) should be removed\r\n const pendingDeletesInSavedValues = (item: any) =>\r\n !item.operation ||\r\n !state.editing.savedValues.find(\r\n e => !!e.operation && deepEquals(e.id, item.id)\r\n );\r\n\r\n // All deletes that were pending in state.editing.savedValues should be removed.\r\n const pendingDeletes = (item: any) => !item.operation;\r\n const savedValues = state.editing.savedValues || [];\r\n // if an entity is not part of the server data and it was part of the latest save, we interpret it as a server-side removal.\r\n const entitiesRemovedOnServer = savedValues.filter(\r\n item =>\r\n pendingDeletes(item) &&\r\n !incomingEntity.find(e => deepEquals(e.id, item.id))\r\n );\r\n\r\n // To really know if *user* editing has occured while saving in the background, we'll merge\r\n // ( 1. local values + 2. returned server values + 3. values sent to server on last save)\r\n // and then compare again with current values.\r\n //\r\n // NOTE: this merge does not support server calculations, they are detected as local changes for time being\r\n const userData = state.editing.values.filter(pendingDeletesInSavedValues);\r\n const lastServerSavedValues = savedValues.filter(\r\n pendingDeletes\r\n );\r\n\r\n const currentValues = getPatchedState(\r\n userData,\r\n incomingEntity,\r\n lastServerSavedValues\r\n )\r\n // except entities that were removed server-side\r\n .filter(\r\n item => !entitiesRemovedOnServer.find(e => deepEquals(e.id, item.id))\r\n );\r\n\r\n const modified = !caseEquals(currentValues, incomingEntity);\r\n\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n savedValues: undefined,\r\n values: currentValues,\r\n etag: action.etag,\r\n persistedValues: incomingEntity,\r\n hasChanges: modified,\r\n metadata: action.metadata,\r\n fetching: false,\r\n pristine: false, // indicate that user has changed the draft at least once\r\n immediateSaveRequests: state.editing.immediateSaveRequests\r\n ? state.editing.immediateSaveRequests - 1\r\n : 0\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component was not able to save the data\r\n */\r\n [ACTION.BACKGROUND_SAVE_ERROR]: (\r\n state: UiState,\r\n action: BackgroundSaveFailed\r\n ): UiState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n savedValues: undefined,\r\n values: state.editing ? state.editing.persistedValues : undefined,\r\n fetching: false,\r\n hasChanges: false,\r\n immediateSaveRequests:\r\n state.editing && state.editing.immediateSaveRequests\r\n ? (state.editing.immediateSaveRequests - 1)\r\n : 0\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when user triggers submit case for a draft\r\n */\r\n [ACTION.CASE_SUBMIT]: (state: UiState, action: BeginCaseSave): UiState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n loadValidationMetadata: true,\r\n submitting: true\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when case save api is called\r\n */\r\n [ACTION.REQUEST_CASE_SUBMIT]: (\r\n state: UiState,\r\n action: RequestCaseSave\r\n ): UiState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n submitting: true,\r\n fetching: true\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when case saving is finished\r\n */\r\n [ACTION.CASE_SUBMIT_OK]: (\r\n state: UiState,\r\n action: CaseSaveComplete\r\n ): UiState => {\r\n return {\r\n ...state,\r\n editing: undefined\r\n };\r\n },\r\n\r\n /**\r\n * Run when case saving failed\r\n */\r\n [ACTION.CASE_SUBMIT_ERROR]: (\r\n state: UiState,\r\n action: CaseSaveFailed\r\n ): UiState => {\r\n return {\r\n ...state,\r\n editing: {\r\n ...state.editing,\r\n loadValidationMetadata: true,\r\n submitting: false,\r\n fetching: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.INSPECT_COMPONENT]: (state: UiState, action: any): UiState => {\r\n return {\r\n ...state,\r\n ...{\r\n $inspectedComponent: action.payload,\r\n $inspectedError: action.error\r\n }\r\n } as any;\r\n },\r\n\r\n [ACTION.INSPECT_PREVIEW_EDIT]: (state: UiState, action: any): UiState => {\r\n return {\r\n ...state,\r\n ...{\r\n $inspectedChanges: action.payload\r\n }\r\n } as any;\r\n }\r\n};\r\n\r\n/**\r\n * Export a function that maps the given action to our ActionMap\r\n */\r\nexport const createUiReducers = (\r\n reducerPredicate: (action: any) => boolean\r\n): Reducer<UiState> => {\r\n return (state: UiState = {} as any, action: any) => {\r\n const r = reducerPredicate(action) && reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n };\r\n};\r\n","import {\r\n ACTION,\r\n RequestCase,\r\n ReceiveCase,\r\n LoadCaseFailure,\r\n ReceiveCasePermissions,\r\n ChildItemSelection,\r\n RequestCaseRiskMatrixDefinition,\r\n ReceiveCaseRiskMatrixDefinition,\r\n ChangeViewMode\r\n} from './action-types';\r\nimport { CaseState, ViewMode } from './types-store';\r\nimport { Reducer } from 'redux';\r\nimport { SchemaBuilder } from 'app/infrastructure/ui/builder';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport {\r\n caseDataToStore,\r\n caseMetadataToStore\r\n} from 'app/infrastructure/store/normalize';\r\nimport { reducers as draftReducer } from './draft/reducers';\r\nimport { reducers as editReducer } from './edit/reducers';\r\nimport { reducers as createReducer } from './create/reducers';\r\nimport { reducers as caseConnectionReducer } from './features/connected-cases/reducers';\r\nimport { reducers as searchExternalProviderReducer } from './features/search-external-provider/reducers';\r\nimport { ActionMap } from 'app/area/case';\r\nimport { createUiReducers } from 'app/infrastructure/ui/form/reducers';\r\nimport { getDraftId } from 'app/infrastructure/store/query';\r\nimport { clientCache } from 'app/infrastructure/universal';\r\nimport { viewModeCacheKey } from 'app/area/case/constants';\r\n\r\nexport const INITIAL_CASE_STATE: CaseState = {\r\n editing: null,\r\n stateForCaseIds: {},\r\n entities: {},\r\n renderMode: RenderMode.read,\r\n fetching: true,\r\n schema: null,\r\n riskMatrixDefinitions: {},\r\n texts: {} as any,\r\n tempdata: {},\r\n metadata: undefined,\r\n viewMode: clientCache.getItem(viewModeCacheKey) || ViewMode.tabs\r\n};\r\n\r\n/**\r\n * Reducers for case. Pattern to be able to extract modules when it grows.\r\n */\r\nconst reducers: ActionMap = {\r\n /**\r\n * Run when case starts requesting data\r\n */\r\n [ACTION.REQUEST_CASE]: (state: CaseState, action: RequestCase): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n schema: undefined,\r\n selectedId: undefined,\r\n uiDefinition: undefined,\r\n permissions: undefined,\r\n fetching: true,\r\n activeChildItem: undefined,\r\n metadata: undefined\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when case has finished requesting data\r\n */\r\n [ACTION.RECEIVE_CASE]: (state: CaseState, action: ReceiveCase): CaseState => {\r\n const docValues: any = caseDataToStore(action.data);\r\n const metadata = caseMetadataToStore(action.data);\r\n const pk = getDraftId(docValues);\r\n\r\n return {\r\n ...state,\r\n ...{\r\n selectedId: pk,\r\n entities: {\r\n [pk]: docValues\r\n },\r\n metadata: {\r\n [pk]: metadata\r\n },\r\n schema: SchemaBuilder.create(state.renderMode, action.uiDefinition),\r\n uiDefinition: action.uiDefinition,\r\n fetching: false\r\n }\r\n } as CaseState;\r\n },\r\n\r\n /**\r\n * Run when case has failed to download data\r\n */\r\n [ACTION.FAIL_CASE_DATA]: (\r\n state: CaseState,\r\n action: LoadCaseFailure\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n selectedId: null,\r\n fetching: false,\r\n schema: null\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when case has finished requesting access data\r\n */\r\n [ACTION.RECEIVE_CASE_PERMISSIONS]: (\r\n state: CaseState,\r\n action: ReceiveCasePermissions\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n permissions: action.data\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Clear the previous risk matrix definition and await the next requested\r\n */\r\n [ACTION.REQUEST_CASE_RISK_MATRIX_DEFINITION]: (\r\n state: CaseState,\r\n action: RequestCaseRiskMatrixDefinition\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n riskMatrixDefinitions: {\r\n ...state.riskMatrixDefinitions,\r\n ...{\r\n [action.caseTypeId]: {\r\n fetching: true\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Once the risk matrix definition is available, add it to store.\r\n */\r\n [ACTION.RECEIVE_CASE_RISK_MATRIX_DEFINITION]: (\r\n state: CaseState,\r\n action: ReceiveCaseRiskMatrixDefinition\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n riskMatrixDefinitions: {\r\n ...state.riskMatrixDefinitions,\r\n ...{\r\n [action.caseTypeId]: {\r\n definition: {\r\n ...action.riskMatrixDefinition,\r\n ...{ applicationId: action.caseTypeId }\r\n },\r\n fetching: false\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.SELECT_DOCUMENT_ITEM]: (\r\n state: CaseState,\r\n action: ChildItemSelection\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n ...{\r\n activeChildItem: action.key\r\n }\r\n };\r\n },\r\n [ACTION.CHANGE_VIEW_MODE]: (\r\n state: CaseState,\r\n action: ChangeViewMode\r\n ): CaseState => {\r\n return {\r\n ...state,\r\n viewMode: action.mode\r\n };\r\n }\r\n};\r\n\r\nconst uiEngineReducers = createUiReducers((action: any) => true);\r\n\r\n/**\r\n * Export a function that maps the given action to our ActionMap\r\n */\r\nexport const reducer: Reducer<CaseState> = (\r\n state: CaseState = INITIAL_CASE_STATE,\r\n action: any\r\n) => {\r\n const allCaseReducers = {\r\n ...reducers,\r\n\r\n ...draftReducer,\r\n\r\n ...editReducer,\r\n\r\n ...createReducer,\r\n\r\n ...caseConnectionReducer,\r\n\r\n ...searchExternalProviderReducer\r\n };\r\n\r\n const r: any = allCaseReducers[action.type] || uiEngineReducers;\r\n\r\n return (r && r(state, action)) || state;\r\n};\r\n","import * as React from 'react';\r\nimport Textarea from 'react-textarea-autosize';\r\nimport debounce from 'lodash/debounce';\r\nimport styles from './textarea.scss';\r\n\r\nexport interface DebounceTextareaProps {\r\n id?: string;\r\n type?: string;\r\n className?: string;\r\n style?: any;\r\n value: string;\r\n placeholder: string;\r\n readOnly?: boolean;\r\n maxLength?: number;\r\n focus?: boolean;\r\n onChange: (value: string, openOptionsView?: boolean) => void;\r\n onFocus?: (e: React.FormEvent<HTMLTextAreaElement>) => void;\r\n onBlur?: (e: React.FormEvent<HTMLTextAreaElement>) => void;\r\n\r\n rows?: number;\r\n autoExpandable?: boolean;\r\n wait?: number;\r\n}\r\n\r\nexport interface DebounceTextareaState {\r\n height?: number;\r\n value?: string;\r\n hasFocus?: boolean;\r\n}\r\n\r\nexport class DebounceTextarea extends React.Component<DebounceTextareaProps, DebounceTextareaState> {\r\n public static defaultProps: Partial<DebounceTextareaProps> = {\r\n wait: 500,\r\n rows: 1,\r\n autoExpandable: true\r\n };\r\n\r\n public static getDerivedStateFromProps(props:DebounceTextareaProps, state: DebounceTextareaState) {\r\n // The user might be typing, only set value from server if we're blurred.\r\n if (!state.hasFocus && props.value !== state.value) {\r\n return {\r\n value: props.value\r\n };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private debounceOnChange: any;\r\n\r\n constructor(props: DebounceTextareaProps) {\r\n super(props);\r\n this.state = {\r\n value: this.props.value,\r\n hasFocus: false,\r\n height: 0\r\n } as DebounceTextareaState;\r\n\r\n this.debounceOnChange = debounce((value: string) => {\r\n this.props.onChange(value);\r\n }, this.props.wait);\r\n }\r\n\r\n private onChange = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n const currentTarget = e.currentTarget;\r\n this.setState({\r\n value: currentTarget.value\r\n } as DebounceTextareaState, () => {\r\n this.debounceOnChange(currentTarget.value);\r\n });\r\n }\r\n\r\n private onFocus = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n const eventClone = Object.assign({}, e);\r\n this.setState({ hasFocus: true }, () => {\r\n this.props.onFocus && this.props.onFocus(eventClone);\r\n });\r\n }\r\n\r\n private onBlur = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n const eventClone = Object.assign({}, e);\r\n if (this.props.value !== this.state.value) {\r\n this.props.onChange && this.props.onChange(this.state.value, false);\r\n }\r\n this.setState({ hasFocus: false }, () => {\r\n this.props.onBlur && this.props.onBlur(eventClone);\r\n });\r\n }\r\n\r\n public render() {\r\n const {\r\n autoExpandable,\r\n maxLength,\r\n readOnly,\r\n placeholder,\r\n rows,\r\n focus\r\n } = this.props;\r\n\r\n const { readOnlyStyle, textarea } = styles;\r\n\r\n const maxRows = !autoExpandable ? 1 : undefined;\r\n return (<div className={`form-control ${readOnly ? readOnlyStyle : ''}\r\n ${this.state.hasFocus ? 'form-control-focus' : ''}`}>\r\n <Textarea\r\n autoFocus={focus}\r\n className={textarea}\r\n value={this.state.value}\r\n readOnly={readOnly}\r\n disabled={readOnly}\r\n maxLength={maxLength}\r\n placeholder={!readOnly ? placeholder : undefined}\r\n onChange={this.onChange}\r\n onBlur={this.onBlur}\r\n onFocus={this.onFocus}\r\n minRows={readOnly ? 1 : rows}\r\n maxRows={maxRows}\r\n />\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { InputControlContext } from '../common/input-control-context/input-control-context';\r\nimport { DebounceTextarea } from '../common/debounce-textarea/debounce-textarea';\r\nimport { SingleValueComponent } from 'ui/common/types';\r\n\r\n/**\r\n * The Component allows you to enter multiline text. It may be configured to grow in height automatically as the user enters more text.\r\n *\r\n * > It supports common InputControlContext component.\r\n */\r\nexport interface TextareaProps extends SingleValueComponent<string> {\r\n /**\r\n * Define max length of content text. Default is unlimited.\r\n */\r\n maxLength?: number;\r\n /**\r\n * Define amount of rows. Default is 1.\r\n */\r\n rows?: number;\r\n /**\r\n * Define whether component is expandable. Default is disabled.\r\n */\r\n autoExpandable?: boolean;\r\n /**\r\n * The number of milliseconds to delay onChange event. Default is 500.\r\n */\r\n wait?: number;\r\n}\r\n\r\nexport class Textarea extends React.Component<TextareaProps, {}> {\r\n public static defaultProps: Partial<TextareaProps> = {\r\n wait: 500,\r\n rows: 1,\r\n autoExpandable: true\r\n };\r\n\r\n private onFocus = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n const currentTarget = e.currentTarget;\r\n // tslint:disable-next-line:no-unused-expression\r\n this.props.onFocus && this.props.onFocus(currentTarget.offsetLeft);\r\n }\r\n\r\n private onBlur = (e: React.FormEvent<HTMLTextAreaElement>) => {\r\n const currentTarget = e.currentTarget;\r\n this.props.onBlur && this.props.onBlur(currentTarget.value);\r\n }\r\n\r\n public render() {\r\n const {\r\n autoExpandable,\r\n maxLength,\r\n readOnly,\r\n placeholder,\r\n rows,\r\n focus,\r\n value = '',\r\n wait\r\n } = this.props;\r\n\r\n return (\r\n <InputControlContext\r\n componentId={this.props.componentId}\r\n className={this.props.className}\r\n label={this.props.label}\r\n info={this.props.info}\r\n infoLong={this.props.infoLong}\r\n validation={this.props.validation}\r\n readOnly={readOnly}\r\n >\r\n <div className=\"input-wrapper\">\r\n <div className=\"input-group\">\r\n <DebounceTextarea\r\n placeholder={placeholder}\r\n onChange={this.props.onChange}\r\n onFocus={this.onFocus}\r\n focus={focus}\r\n readOnly={readOnly}\r\n value={value}\r\n autoExpandable={autoExpandable}\r\n maxLength={maxLength}\r\n rows={rows}\r\n wait={wait}\r\n onBlur={this.onBlur}\r\n />\r\n </div>\r\n </div>\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","export {Textarea} from './textarea';\r\n","import * as React from 'react';\r\nimport { isValidListOfEmails } from 'app/infrastructure/validation/email';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport { ShareCaseArgs } from 'app/area/case/features/share-case/types';\r\nimport { Link } from 'react-router';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport { SelectMultiple } from 'ui/select-multiple';\r\nimport { Textarea } from 'ui/textarea';\r\nimport { MultiEmails } from 'app/area/case/components/multi-emails';\r\n\r\nexport interface ShareCaseModalProps {\r\n translate?: {[key:string] : string};\r\n userEmail?: string;\r\n caseId?: number;\r\n onCancel?: () => void;\r\n onContinue?: () => void;\r\n getUsers: (caseNumber: number, query?: string) => CodetableWireFormat[];\r\n shareDocument: (args: Partial<ShareCaseArgs>, translations: {[key:string]:string}) => void;\r\n recipients?: ComplexValue<string>[];\r\n message?: string;\r\n}\r\n\r\nexport interface ShareCaseModalState{\r\n options?: ComplexValue<string>[];\r\n recipients: ComplexValue<string>[];\r\n message?: string;\r\n valid?: boolean;\r\n externalRecipients?: string[];\r\n}\r\n\r\nexport class ShareCaseModal extends React.Component<ShareCaseModalProps, ShareCaseModalState>{\r\n\r\n public constructor(props: ShareCaseModalProps){\r\n super(props);\r\n this.state = {\r\n recipients: (props.recipients || []),\r\n message: props.message,\r\n externalRecipients: []\r\n };\r\n this.validate();\r\n }\r\n\r\n private loadRecipients = async ({query} : {query:string}) => {\r\n const users = await this.props.getUsers(this.props.caseId, query);\r\n this.setState({ options: users.map(codeItemToStoreValue) });\r\n }\r\n\r\n private handleEmailChanged = (values:any) => {\r\n const emails = values && values.map(v => v.value).join(',');\r\n const noSelectedValues = !values || !emails.length;\r\n if( isValidListOfEmails(emails) || noSelectedValues ){\r\n this.setState(\r\n {recipients: values}\r\n ,\r\n this.validate\r\n );\r\n }\r\n }\r\n\r\n private handleSave = async ()=> {\r\n const {valid, recipients: selectedUsers, message, externalRecipients} = this.state;\r\n const {shareDocument, onContinue, translate} = this.props;\r\n if(valid){\r\n const allRecipients = [...selectedUsers.map(r => r.value),...externalRecipients];\r\n //build unique array of recipients\r\n const recipients = allRecipients.filter((item,index) => allRecipients.indexOf(item) === index);\r\n shareDocument && shareDocument({recipients, message}, translate);\r\n onContinue && onContinue();\r\n }\r\n }\r\n\r\n private handleCancel = async () => {\r\n this.props.onCancel();\r\n }\r\n\r\n private validate = () => {\r\n const userEmailExists = !!this.props.userEmail;\r\n const atLeastOneRecipientSelected = this.state.recipients.filter(r => Boolean(r.value) ).length > 0;\r\n const atLeastOneExternalRecipientSelected = this.state.externalRecipients.length > 0;\r\n this.setState({\r\n valid: (userEmailExists && atLeastOneRecipientSelected) || atLeastOneExternalRecipientSelected\r\n });\r\n }\r\n\r\n private setMessage = (value:any) => {\r\n this.setState({\r\n message: value\r\n },\r\n this.validate\r\n );\r\n }\r\n\r\n private handleChangeExternalRecipients = (emails: string[]) => {\r\n this.setState({\r\n externalRecipients: emails },\r\n this.validate\r\n );\r\n }\r\n\r\n private getExternalRecipientsLabel = (email: string, index: number, removeEmail: (index: number) => void ) => {\r\n const handleClick = () => removeEmail(index);\r\n\r\n return (\r\n <div data-tag key={index}>\r\n {email}\r\n <span data-tag-handle onClick={handleClick}>\r\n ×\r\n </span>\r\n </div>\r\n );\r\n };\r\n\r\n public render(){\r\n const {\r\n translate,\r\n userEmail\r\n } = this.props;\r\n const {\r\n options,\r\n recipients,\r\n message,\r\n externalRecipients,\r\n valid\r\n } = this.state;\r\n\r\n const multiExternalRecipients =\r\n <div className={'form-group email-recipients'}>\r\n <MultiEmails\r\n componentId={'multiple-external-recipients'}\r\n className={'multiple-external-recipients'}\r\n emails={externalRecipients}\r\n onChange={this.handleChangeExternalRecipients}\r\n getLabel={this.getExternalRecipientsLabel}\r\n label={{text: translate.external_recipients, visible: true}}\r\n />\r\n </div>;\r\n\r\n return (\r\n <ModalWrapper\r\n headerTitle={translate.share_case_by_email}\r\n btnTitle={translate.send}\r\n btnCancelTitle={translate.cancel}\r\n onClose={this.handleCancel}\r\n onDone={this.handleSave}\r\n isDisabled={!valid}\r\n closeOnDone={false}\r\n canCloseOnBackground={false}>\r\n {\r\n !userEmail ?\r\n <div className=\"alert alert-error\">\r\n <p>{translate.no_user_email_exists}</p>\r\n <Link to={routeConstants.userProfileMainView}>{translate.go_to_profile}</Link>\r\n </div>\r\n :\r\n <>\r\n <p>{translate.select_users_info}</p>\r\n <SelectMultiple\r\n focus={true}\r\n hideAlphabeticIndex={false}\r\n className={'email-recipients'}\r\n componentId={'email-recipients'}\r\n options={options}\r\n label={{text: translate.recipients, visible: true}}\r\n valueItems={recipients}\r\n onLoadOptions={this.loadRecipients}\r\n onChange={this.handleEmailChanged}\r\n {...translate}\r\n />\r\n {multiExternalRecipients}\r\n <Textarea\r\n onChange={this.setMessage}\r\n maxLength={3900}\r\n value={message}\r\n label={ {text:translate.message_to_receiver, visible: true} }/>\r\n </>\r\n }\r\n </ModalWrapper>\r\n );\r\n }\r\n}\r\n","import { InputModalHost } from 'ui/common/prompt-confirmation/input-modal-host';\r\nimport * as React from 'react';\r\nimport { ShareCaseModal } from './share-case-modal';\r\n\r\n/**\r\n * Conditionally render the component as a modal, or a UI element to trigger the modal\r\n */\r\nexport const ShareCase = props => (\r\n\r\n <InputModalHost {...props}>\r\n {\r\n modalProps => modalProps.isOpen\r\n ?\r\n <ShareCaseModal {...props} {...modalProps} />\r\n : \r\n typeof props.children === 'function' ? props.children(modalProps) : null\r\n }\r\n </InputModalHost>\r\n);\r\n","/**\r\n * Retry a function on a given interval as long as it does not throw an error.\r\n * \r\n * @param interval Time between retry attempts in milliseconds. Default 500ms.\r\n * @param initialWait Time to wait for first attempt. Default 500ms.\r\n * @param retryAttemptsOnError Maxium number of retries if the wrapped function throws. Default is 2.\r\n */\r\n// tslint:disable: no-string-based-set-timeout\r\nexport async function retry<T>(\r\n fn: () => Promise<T>,\r\n interval: number = 500,\r\n initialWait: number = 0,\r\n retryAttemptsOnError: number = 2\r\n): Promise<T> {\r\n try {\r\n initialWait && await new Promise(r => setTimeout(r, initialWait));\r\n // Await to close in errors thrown. This enables retry-on-error.\r\n return await fn(); \r\n } catch (error) {\r\n if (retryAttemptsOnError > 0) { \r\n await new Promise(r => setTimeout(r, interval));\r\n return retry(\r\n fn,\r\n interval, \r\n initialWait, \r\n retryAttemptsOnError - 1\r\n );\r\n } else {\r\n throw new Error('Reached max retries due to Error: ' + error.message);\r\n }\r\n }\r\n}\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { retry } from 'app/infrastructure/js/retry';\r\n\r\n/**\r\n * Wraps an action creator and delays it's execution until any pending changes has been saved.\r\n * This can be used to avoid race conditions due to paralell api requests, each using different etags.\r\n * A retry function allows the waiting process to be async awaitable.\r\n */\r\nexport const whenIdle = (actionCreator: any) => {\r\n const runWhenIdle = async (fn: any, dispatch: any, getState: () => ApplicationState, ...args: any[]) => {\r\n const { editing } = getState().caseArea;\r\n if (editing && (editing.saving || editing.hasChanges)) {\r\n // return a wait-promise instead of running the actionCreator\r\n return retry(() => runWhenIdle(actionCreator, dispatch, getState), 500, 500);\r\n }\r\n // Run the actionCreator\r\n return await fn(dispatch, getState, ...args);\r\n };\r\n\r\n // Wraps the actionCreator\r\n return async (dispatch: any, getState: any) => runWhenIdle(actionCreator, dispatch, getState);\r\n};\r\n","import * as React from 'react';\r\nimport { MultiKeyValueComponent } from '../common/types';\r\nimport { SelectType, SelectCommonProps } from '../common/select/types';\r\nimport { SelectBaseComponent } from '../common/select/select-base-component';\r\n\r\n/**\r\n * SelectMulti component let you choose more than one option from list of options.\r\n *\r\n * > Each selected option can be removed by click on cross.\r\n * > It supports common InputControlContext component.\r\n */\r\nexport interface SelectMultipleProps extends MultiKeyValueComponent<number | string>, SelectCommonProps {\r\n}\r\n\r\nexport class SelectMultiple extends React.Component<SelectMultipleProps> {\r\n public render() {\r\n return <SelectBaseComponent\r\n {...this.props}\r\n selectType={SelectType.multiple}\r\n />;\r\n }\r\n}\r\n","export { SelectMultiple } from './select-multiple';\r\n","import * as React from 'react';\r\nimport ResizeSensor from 'resize-sensor';\r\nimport styles from './scroll-container.scss';\r\n\r\nexport interface ScrollContainerProps {\r\n children?: any;\r\n height?: number;\r\n}\r\n\r\nexport interface ScrollContainerState {\r\n left: boolean;\r\n right: boolean;\r\n top: boolean;\r\n bottom: boolean;\r\n}\r\n\r\nexport class ScrollContainer extends React.PureComponent<ScrollContainerProps, ScrollContainerState> {\r\n private container: React.RefObject<HTMLDivElement> = React.createRef();\r\n private sensor:any;\r\n\r\n public state: Readonly<ScrollContainerState> = {left: false, right: false, top: false, bottom: false};\r\n\r\n private addListensers() {\r\n if(this.container && this.container.current) {\r\n this.container.current.addEventListener('scroll', this.handleScroll);\r\n this.sensor = new ResizeSensor(this.container.current, this.handleScroll);\r\n this.toggleScrollIndicators();\r\n }\r\n }\r\n private removeListeners() {\r\n if(this.container && this.container.current) {\r\n this.container.current.removeEventListener('scroll', this.handleScroll);\r\n this.sensor.detach();\r\n }\r\n }\r\n\r\n public componentWillUnmount () {\r\n this.removeListeners();\r\n }\r\n\r\n public componentDidMount() {\r\n this.addListensers();\r\n }\r\n\r\n private handleScroll = (e:any) => {\r\n this.toggleScrollIndicators();\r\n }\r\n\r\n private toggleScrollIndicators() {\r\n if (this.container.current) {\r\n\r\n const el:HTMLDivElement = this.container.current;\r\n const rtn:ScrollContainerState = {left: false, right: false, top: false, bottom: false};\r\n if (el.clientWidth !== el.scrollWidth) {\r\n const scrollPct = el.scrollLeft / (el.scrollWidth - el.clientWidth);\r\n rtn.left = scrollPct > 0;\r\n rtn.right = scrollPct < 1;\r\n }\r\n\r\n if (el.clientHeight !== el.scrollHeight) {\r\n const scrollPct = el.scrollTop / (el.scrollHeight - el.clientHeight);\r\n rtn.top = scrollPct > 0;\r\n rtn.bottom = scrollPct < 1;\r\n }\r\n\r\n const changed = Object.keys(this.state).reduce((acum, key) => acum || rtn[key] !== this.state[key], false);\r\n\r\n if (changed) {\r\n this.setState(rtn);\r\n }\r\n }\r\n }\r\n\r\n public render () {\r\n const {children, height} = this.props;\r\n const {left, right, top, bottom} = this.state;\r\n\r\n let style:any;\r\n if (height) {\r\n style = {height};\r\n }\r\n\r\n return <div className={styles.indicator}>\r\n <div className={styles.container} style={style} ref={this.container}>{children}</div>\r\n {(left || right) && <div className={`${styles.horizontal} ${left ? styles.start : ''} ${right ? styles.end : ''}`}/>}\r\n {(top || bottom) && <div className={`${styles.vertical} ${top ? styles.start : ''} ${bottom ? styles.end : ''}`}/>}\r\n </div>;\r\n }\r\n}\r\n","export {ScrollContainer} from './scroll-container';\r\n","import * as React from 'react';\r\nimport { ValueProperty } from '../common/types';\r\nimport { toHex } from 'ui/common/hex-converter';\r\nimport styles from './badge.scss';\r\nimport { Tooltip, TooltipDirections } from 'ui/common/tooltip/tooltip';\r\n\r\nexport interface BadgeProps {\r\n title?: string;\r\n tooltip?: string;\r\n tooltipDirection?: TooltipDirections;\r\n filled?: boolean;\r\n backgroundColor?: number;\r\n foregroundColor?: number;\r\n text?: ValueProperty;\r\n}\r\n\r\nexport class Badge extends React.PureComponent<BadgeProps> {\r\n public static defaultProps: Partial<BadgeProps> = {\r\n filled: true\r\n };\r\n\r\n public render() {\r\n const {\r\n title,\r\n filled,\r\n tooltip,\r\n tooltipDirection,\r\n text,\r\n backgroundColor,\r\n foregroundColor\r\n } = this.props;\r\n\r\n const fill = !!filled ? backgroundColor && toHex(backgroundColor) : 'transparent';\r\n const stroke = !!filled ? 'transparent' : !!backgroundColor && toHex(backgroundColor);\r\n const textFill = !!foregroundColor ? toHex(foregroundColor) : 'black';\r\n\r\n const circle = <svg className=\"badge-illustration\" viewBox=\"0 0 50 50\" preserveAspectRatio=\"\">\r\n <circle cx=\"25\" cy=\"25\" r=\"23\" fill={fill} stroke={stroke} strokeWidth=\"4px\"/>\r\n <text className={styles.strong} x=\"25\" y=\"32\" fill={textFill} fontSize=\"22\">{text}</text>\r\n </svg>;\r\n\r\n return (\r\n <Tooltip className={styles.tooltipOverwrite} title={tooltip} delayed={true} direction={tooltipDirection} narrow={true} center={true}>\r\n <div className={`${styles.badgeWrapper} badge-wrapper`}>\r\n <label className={styles.label}>{title}</label>\r\n {circle}\r\n </div>\r\n </Tooltip>\r\n );\r\n }\r\n}\r\n","export {Badge} from './badge';\r\n","import * as React from 'react';\r\nimport styles from './badge-list.scss';\r\nimport { toHex } from 'ui/common/hex-converter';\r\nimport { Tooltip } from 'ui/common/tooltip/tooltip';\r\n\r\ninterface BadgelistItemProps{\r\n index?: number;\r\n value?: number | string;\r\n tooltip?: string;\r\n classNames?: string;\r\n backgroundColor?: number;\r\n}\r\n\r\nconst Circle = (props: BadgelistItemProps & {useNestedIndicator?:boolean;}) => {\r\n const {index, classNames, useNestedIndicator, backgroundColor} = props;\r\n\r\n return (props.value>=0 ?\r\n <div className={classNames} key={index}>\r\n <svg className={styles.countCircle} viewBox=\"0 0 50 50\" preserveAspectRatio=\"xMinYMin meet\">\r\n <circle cx=\"25\" cy=\"25\" r=\"23\" fill=\"white\" stroke=\"#CBD5E8\" strokeWidth=\"2\"/>\r\n <text x=\"25\" y=\"33\" fontSize=\"25\" fill=\"black\">{props.value}</text>\r\n {\r\n useNestedIndicator && backgroundColor &&\r\n <circle cx=\"40\" cy=\"40\" r=\"8\" fill={backgroundColor && toHex(backgroundColor)} stroke=\"white\"\r\n strokeWidth=\"2\"/>\r\n }\r\n </svg>\r\n <svg className=\"green-check-icon\" viewBox=\"-17351.9 -19165 13.135 10\">\r\n <path fill=\"#36842d\"\r\n d=\"M266.279,882.51l7.91-7.91,1.045,1.045-8.955,8.955-4.179-4.179,1.045-1.045Z\"\r\n transform=\"translate(-17614 -20039.6)\"/>\r\n </svg>\r\n </div> : null\r\n );\r\n};\r\n\r\nexport class BadgeList extends React.PureComponent<BadgeListProps> {\r\n private infoText = (items: BadgelistItemProps[]) => {\r\n return items.map(item => `${item.value>=0 ? item.value : ''} ${item.tooltip}`).join('\\n');\r\n }\r\n\r\n private circleItems = (items: BadgelistItemProps[]) => {\r\n return items.map((item, index) => <Circle key={index} {...item} {...this.props} />);\r\n }\r\n\r\n public render() {\r\n const {\r\n title,\r\n icon,\r\n valueItems\r\n } = this.props;\r\n return (\r\n <Tooltip className={styles.tooltipOverwrite} title={this.infoText(valueItems)} delayed={true} center={true} narrow={true}>\r\n <div className={`${styles.badgelistWrapper} badge-list-wrapper`}>\r\n <label className={styles.label}>{title}</label>\r\n <div className=\"badge-illustration\">\r\n {icon}\r\n <div className={`${styles.items} ${valueItems && valueItems.length === 1 ? styles.single : ''}`}>\r\n {!!valueItems && this.circleItems(valueItems)}\r\n </div>\r\n </div>\r\n </div>\r\n </Tooltip>\r\n );\r\n }\r\n}\r\nexport interface BadgeListProps {\r\n icon: any;\r\n valueItems: BadgelistItemProps[];\r\n title?: string;\r\n useNestedIndicator?: boolean;\r\n}\r\n","export {BadgeList} from './badge-list';\r\n","import * as React from 'react';\r\nimport styles from './display-color.scss';\r\n\r\nexport interface DisplayColorProps {\r\n /**\r\n * hex color code\r\n */\r\n hexColor: string;\r\n}\r\n\r\nexport const DisplayColor = (props: DisplayColorProps) => { \r\n \r\n return (\r\n <div className={styles.displayColor} style={{backgroundColor:`${props.hexColor}`}}/> \r\n ); \r\n};\r\n","export {DisplayColor} from './display-color';\r\n","import * as React from 'react';\r\nimport styles from './info-banner.scss';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\n\r\nexport interface InfoBannerProps {\r\n textTitle?: string;\r\n textDescription?: string;\r\n children?: any;\r\n iconUrl?: string;\r\n className?: string;\r\n}\r\n\r\nexport const InfoBanner = (props: InfoBannerProps) => (\r\n <div className={`main-grid ${styles.infoBanner} ${props.className || ''}`}>\r\n {props.iconUrl && <div className={`${styles.infoImage}`}>\r\n <img src={toAbsoluteUrl(props.iconUrl)} />\r\n </div>}\r\n <div>\r\n <h2 className={styles.bannerTitle}>{props.textTitle}</h2>\r\n <div className={styles.bannerDescription}>\r\n {props.textDescription}\r\n {props.children}\r\n </div>\r\n </div>\r\n </div>\r\n);\r\n\r\nexport const ConfidentialBanner = (props: InfoBannerProps) => \r\n <InfoBanner {...props} iconUrl=\"i/confidential_icon.svg\" />;\r\n\r\nexport const CasePasswordBanner = (props: InfoBannerProps) =>\r\n <InfoBanner {...props} iconUrl=\"i/case-receipt-checkbox.svg\" className={styles.casePasswordBanner} />;\r\n","export * from './info-banner';\r\n","import * as React from 'react';\r\nimport { Permission, MeatballMenu, PromptConfirmationModal, DisplayCodes } from 'ui';\r\nimport { ButtonTertiary } from 'ui/common/button/button-tertiary';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport ArrowDown from 'react-icons/lib/md/keyboard-arrow-down';\r\nimport styles from './code-title-tile.scss';\r\nimport { TileProps } from 'ui/tile/tile';\r\nimport { ExpanderBackground } from 'ui/common/dialog-expander/expander-background/expander-background';\r\nimport { ValidationLevel } from 'ui/common';\r\nimport { DisplayTextWithLinks } from 'ui/common/display-text-with-links';\r\n\r\nexport class CodeTitleTile extends React.PureComponent<TileProps, any> {\r\n\r\n public static defaultProps: Partial<TileProps> = {\r\n enabledChildEntityOperations: { remove: false }\r\n };\r\n\r\n private handleSelect = (e?: any) => {\r\n e && e.preventDefault();\r\n\r\n this.props.onSelectDocumentItem && this.props.onSelectDocumentItem();\r\n }\r\n\r\n private handleDeselect = (e?: any) => {\r\n e && e.preventDefault();\r\n\r\n if (this.props.activate) {\r\n this.props.onSelectDocumentItem && this.props.onSelectDocumentItem(null);\r\n }\r\n }\r\n\r\n private handleDelete = (e?: any) => {\r\n e && e.preventDefault();\r\n this.props.onDeleteDocumentItem && this.props.onDeleteDocumentItem();\r\n }\r\n\r\n private hasChildErrors () {\r\n const {validationDescendants} = this.props;\r\n return validationDescendants && validationDescendants.length && validationDescendants.some(v => v.level === ValidationLevel.error);\r\n }\r\n\r\n private hasChildWarnings() {\r\n const {validationDescendants} = this.props;\r\n return validationDescendants && validationDescendants.length && validationDescendants.some(v => v.level === ValidationLevel.warning);\r\n }\r\n\r\n private getDetailsButtonStyle = () => (\r\n this.hasChildErrors() ?\r\n styles.hasChildErrors :\r\n (this.hasChildWarnings() ? styles.hasChildWarnings : ''));\r\n\r\n public render() {\r\n const {\r\n componentId, primaryKey, details, children, activate,\r\n showPrimaryKey = true,\r\n showPrimaryKeyLongDescription = true,\r\n linkifyLongDescription = true,\r\n showDetailsButton = true,\r\n textShowDetails, textHideDetails, textDone, className, expandAll\r\n } = this.props;\r\n const { codeTitleTile, codeTitleTileCard, header, displayCodes, main } = styles;\r\n\r\n const renderAsOpened = showDetailsButton && activate && details;\r\n const renderHeader = showPrimaryKey || this.shouldRenderContextMenu();\r\n const openDetailsHandler = renderAsOpened ? this.handleDeselect : this.handleSelect;\r\n const activeStyling = renderAsOpened ? styles.activeTile : '';\r\n\r\n const detailsButton = showDetailsButton && details && <ButtonTertiary classNames={`btn-block ${this.getDetailsButtonStyle()}`}\r\n onClick={openDetailsHandler}>\r\n {renderAsOpened ? textHideDetails : textShowDetails}\r\n <ArrowDown/>\r\n </ButtonTertiary>;\r\n\r\n return (\r\n <>\r\n {renderAsOpened ? <div tabIndex={0} onFocus={this.handleDeselect}/> : ''}\r\n <div className={`${className} ${codeTitleTile} ${activeStyling}`}>\r\n <div id={componentId} className={codeTitleTileCard}>\r\n {renderHeader && <div className={header}>\r\n {showPrimaryKey && <h3>\r\n <DisplayCodes\r\n componentId={`${componentId}-code`}\r\n className={displayCodes}\r\n valueItems={[primaryKey]}\r\n displayIcon={'left'}\r\n options={undefined}\r\n onChange={undefined}\r\n />\r\n </h3>}\r\n {\r\n showPrimaryKey && showPrimaryKeyLongDescription && primaryKey.longDescription &&\r\n <DisplayTextWithLinks \r\n className={styles.longDescription} \r\n linkify={linkifyLongDescription} \r\n text={primaryKey.longDescription} />\r\n }\r\n {this.renderContextMenu()}\r\n </div>}\r\n {children && (<div className={`${main} row`}>\r\n {children}\r\n </div>)}\r\n {expandAll && details && <div className=\"col-12\">{details}</div>}\r\n {!expandAll && detailsButton}\r\n\r\n </div>\r\n\r\n {renderAsOpened && <DialogExpander title={showPrimaryKey ? primaryKey.description : undefined} hasLongDescription={true}\r\n onClose={this.handleDeselect} textDone={textDone}>\r\n {details}\r\n </DialogExpander>}\r\n {renderAsOpened && <ExpanderBackground onClick={this.handleDeselect}/>}\r\n </div>\r\n </>\r\n );\r\n }\r\n\r\n private shouldRenderContextMenu = () => {\r\n const { enabledChildEntityOperations } = this.props;\r\n\r\n return enabledChildEntityOperations && Object.keys(enabledChildEntityOperations)\r\n .reduce((acc, key) => acc || enabledChildEntityOperations[key], false);\r\n }\r\n\r\n private renderContextMenu() {\r\n\r\n if (!this.shouldRenderContextMenu()) {\r\n return undefined;\r\n }\r\n\r\n const { enabledChildEntityOperations, textDelete, textDeleteMessage, textContinue, textCancel } = this.props;\r\n const { tileDropdown } = styles;\r\n\r\n return (\r\n <Permission requireAny=\"remove\" permissions={enabledChildEntityOperations}>\r\n <div className={tileDropdown}>\r\n <MeatballMenu>\r\n <Permission requireAll=\"remove\" permissions={enabledChildEntityOperations} isListElement={true}>\r\n <PromptConfirmationModal\r\n title={textDelete}\r\n description={textDeleteMessage}\r\n continueText={textContinue}\r\n cancelText={textCancel}\r\n onContinue={this.handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">{textDelete}</button>\r\n </PromptConfirmationModal>\r\n </Permission>\r\n </MeatballMenu>\r\n </div>\r\n </Permission>\r\n );\r\n }\r\n}\r\n","export * from './code-title-tile';\r\n","import * as React from 'react';\r\nimport { TileViewProps, TileView } from 'ui/tile-view';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { DocumentItemFromMultiSelectProps, DocumentItemFromMultiSelect } from 'app/components/document-item-from-multiselect';\r\n\r\nexport interface CodeSelectorTileViewProps extends DocumentItemFromMultiSelectProps, TileViewProps {\r\n textCodeSelectorTitle: string;\r\n textDone: string;\r\n categoryId?: number;\r\n minLevel?: number;\r\n existingKeys: ComplexValue<number>[];\r\n onAddDocumentItem: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n leafNodeOnly?: boolean;\r\n}\r\n\r\nexport const CodeSelectorTileView: React.SFC<CodeSelectorTileViewProps> = (props) => {\r\n const { label, categoryId, minLevel, readOnly, enabledChildEntityOperations, leafNodeOnly } = props;\r\n\r\n const required = label && label.required;\r\n \r\n const addButton = !readOnly && enabledChildEntityOperations.add &&\r\n <DocumentItemFromMultiSelect \r\n {...props}\r\n categoryId={categoryId}\r\n minLevel={minLevel}\r\n required={required}\r\n children={undefined}\r\n leafNodeOnly={leafNodeOnly}\r\n />; \r\n\r\n return (\r\n <TileView {...props} addButton={addButton} rowClassName={props.rowClassName}/>\r\n );\r\n};\r\n","export * from './code-selector-tile-view';\r\n","import * as React from 'react';\r\nimport add from 'react-icons/lib/md/add';\r\nimport { AddButton, Options, SelectMultipleHierarchy } from 'ui';\r\nimport { OpenStateInjectedProps, withOpenState } from 'ui/common/enhancers/with-open-state';\r\nimport { CloseOnBlur } from 'ui/common/close-on-blur';\r\nimport { withOptionCategorySupport } from 'app/components/enhancers/with-option-category-support';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport { AddDocumentItemOptions } from 'app/infrastructure/ui/form/types';\r\nimport styles from './document-item-from-multiselect.scss';\r\nimport { Switch } from 'ui/common/switch/switch';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { HotKeys } from 'react-hotkeys';\r\n\r\nexport interface DocumentItemFromMultiSelectProps extends Options<number> {\r\n textAddItem: string;\r\n textDone: string;\r\n textCodeSelectorTitle: string;\r\n required?: boolean;\r\n minLevel?: number;\r\n existingKeys: ComplexValue<number>[];\r\n onAddDocumentItem: (selectAddedItem?: boolean, options?: AddDocumentItemOptions) => void;\r\n textOptionsNotFound?: string;\r\n placeholderSearch?: string;\r\n leafNodeOnly?: boolean;\r\n}\r\n\r\ninterface DocumentItemFromMultiSelectState {\r\n selectedItems: ComplexValue<number>[];\r\n showLongDescription: boolean;\r\n}\r\n\r\n/**\r\n * This component implements a common pattern for subtables of a case:\r\n * when the keys in a subtable are codes and the selection should be limited by existing keys.\r\n */\r\nclass DocumentItemFromMultiSelectComponent\r\n extends React.PureComponent<DocumentItemFromMultiSelectProps & OpenStateInjectedProps, DocumentItemFromMultiSelectState> {\r\n private keyMap: any;\r\n private handlers: any;\r\n\r\n public constructor(props: DocumentItemFromMultiSelectProps & OpenStateInjectedProps) {\r\n super(props);\r\n this.state = {\r\n selectedItems: [],\r\n showLongDescription: false\r\n };\r\n\r\n this.keyMap = {\r\n handleClose: [keyCodeTypes.Esc],\r\n handleEnter: [keyCodeTypes.Enter]\r\n };\r\n\r\n this.handlers = {\r\n handleClose: this.onClose,\r\n handleEnter: this.onClose\r\n };\r\n }\r\n\r\n private onCodesSelected = (codes: ComplexValue<number>[]) => {\r\n this.setState({\r\n selectedItems: codes\r\n });\r\n }\r\n\r\n private onConfirm = () => {\r\n const codes = this.state.selectedItems.map(c => {\r\n return {\r\n childId: c.value,\r\n initialValues: { primaryKey: c }\r\n };\r\n });\r\n if (!!codes && codes.length) {\r\n // TODO: The add document action should be able to take multiple values\r\n codes.forEach(c => this.props.onAddDocumentItem(false, c));\r\n }\r\n this.clearSelectedItems();\r\n }\r\n\r\n private onClose = () => {\r\n const { close } = this.props;\r\n\r\n this.onConfirm();\r\n \r\n close();\r\n };\r\n\r\n private openCodeSelector = (event: any) => {\r\n if (!this.props.isOpen) {\r\n this.setState({\r\n showLongDescription: false\r\n });\r\n this.props.open();\r\n }\r\n }\r\n\r\n private clearSelectedItems = () => {\r\n if (this.props.isOpen) {\r\n this.setState({\r\n selectedItems: []\r\n });\r\n }\r\n }\r\n\r\n private toggleSwitchButton = () => {\r\n this.setState({\r\n showLongDescription: !this.state.showLongDescription\r\n });\r\n }\r\n\r\n private excludeSelectedOptions = (options: ComplexValue<number>[]): ComplexValue<number>[] => {\r\n let returnedOptions: ComplexValue<number>[] = [];\r\n\r\n returnedOptions = options.filter(c => this.props.existingKeys.findIndex(key => key.value === c.value) < 0)\r\n .map(element => {\r\n if (!!element.descendants) {\r\n return {\r\n ...element,\r\n descendants: this.excludeSelectedOptions(element.descendants)\r\n };\r\n }\r\n return element;\r\n });\r\n return returnedOptions;\r\n }\r\n\r\n private renderCodeSelector() {\r\n const {\r\n textDone,\r\n textCodeSelectorTitle,\r\n minLevel,\r\n options,\r\n onLoadOptions,\r\n fetching,\r\n loadOptions,\r\n loadOptionsError,\r\n textOptionsNotFound,\r\n placeholderSearch,\r\n isClosing,\r\n leafNodeOnly\r\n } = this.props;\r\n\r\n const longDescriptionExists = options && options.some(i => !!i.longDescription);\r\n const switchButton = longDescriptionExists && <Switch className={styles.selectSwitch}\r\n enabled={this.state.showLongDescription}\r\n onChange={this.toggleSwitchButton}\r\n />;\r\n\r\n const filteredOptions = options && this.excludeSelectedOptions(options);\r\n const allOptionsSelected = !(filteredOptions && filteredOptions.length > 0);\r\n const canHideSearchInput = allOptionsSelected && !(loadOptions && loadOptions.query);\r\n const closingAnimation = isClosing ? 'animate-out': '';\r\n\r\n return (\r\n <div className={closingAnimation}>\r\n <DialogExpander\r\n onClose={this.onClose}\r\n title={textCodeSelectorTitle}\r\n textDone={textDone}\r\n selectExpander={true}\r\n switchButton={switchButton}>\r\n <SelectMultipleHierarchy\r\n componentId={'multi-select'}\r\n className={null}\r\n onLoadOptions={onLoadOptions}\r\n options={filteredOptions}\r\n valueItems={this.state.selectedItems}\r\n onChange={this.onCodesSelected}\r\n alwaysOpen={true}\r\n fetching={fetching}\r\n minLevel={minLevel}\r\n loadOptions={loadOptions}\r\n loadOptionsError={loadOptionsError}\r\n longDescription={this.state.showLongDescription}\r\n placeholder={placeholderSearch}\r\n textOptionsNotFound={textOptionsNotFound}\r\n hideSearchInput={canHideSearchInput}\r\n leafNodeOnly={leafNodeOnly}\r\n />\r\n </DialogExpander>\r\n </div>\r\n );\r\n }\r\n\r\n public render() {\r\n const { required, isOpen, textAddItem } = this.props;\r\n const { documentItemFromMultiSelect, btnWrapper } = styles;\r\n\r\n return (\r\n <CloseOnBlur onBlur={this.onClose}>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}> \r\n <div className={documentItemFromMultiSelect}>\r\n <div className={btnWrapper}>\r\n <AddButton icon={add}\r\n onClick={this.openCodeSelector}\r\n required={required}>\r\n {textAddItem}\r\n </AddButton>\r\n </div>\r\n {isOpen && this.renderCodeSelector()}\r\n </div>\r\n </HotKeys>\r\n </CloseOnBlur>\r\n );\r\n }\r\n}\r\n\r\nconst l = withOpenState(true)(DocumentItemFromMultiSelectComponent);\r\nconst l2 = withOptionCategorySupport(l);\r\n\r\nexport { l2 as DocumentItemFromMultiSelect };\r\n","export * from './document-item-from-multiselect';\r\n","import * as React from 'react';\r\nimport { LabelConfig } from '../types';\r\n\r\nexport const InputLabel = (props: LabelConfig) => {\r\n return props.visible !== false ?\r\n <div className=\"control-label\">\r\n {props.required ? <span className=\"asterisk-required\">* </span> : null}\r\n {props.icon ? <span className={`default-icon ${props.icon}`} /> : null}\r\n {props.text}\r\n {props.children}\r\n </div> : null; \r\n};\r\n","export * from './input-label';\r\n","import { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\n\r\n/**\r\n * Temporary icon support until database has the mapping\r\n */\r\nexport const tabIconForDomain = (id) => {\r\n\r\n const file = {\r\n [8500]: 'actions',\r\n [8778]: 'attachments',\r\n [340]: 'causes',\r\n [4089]: 'check-list',\r\n [8668]: 'comments',\r\n [11774]: 'connected-cases',\r\n [159]: 'general-classifications',\r\n [8660]: 'involved-drugs', \r\n [124]: 'involved-persons', \r\n [316]: 'loss-potential', \r\n [8670]: 'signatures', \r\n [172]: 'consequences', \r\n [104]: 'where-and-what'\r\n }[id] || 'default';\r\n\r\n return toAbsoluteUrl(`i/case-sections/${file}.svg`);\r\n};\r\n","import * as React from 'react';\r\nimport { LabelConfig } from 'ui';\r\nimport { Icon } from 'ui/common/icon';\r\nimport styles from './tab-item.scss';\r\nimport { tabIconForDomain } from './tab-icon';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\n\r\nexport interface TabItemProps{\r\n /**\r\n * The *domain* id of the tab item's section represention\r\n */\r\n id: number;\r\n /**\r\n * Tab display text. Output is limited to 30 rendered characters\r\n */\r\n label: LabelConfig;\r\n /**\r\n * True if the tab has selected active styling\r\n */\r\n active: boolean;\r\n /**\r\n * When false, invalid styling is applied\r\n */\r\n valid: boolean;\r\n /**\r\n * When true, one or more components inside the tab has warnings attached\r\n */\r\n warnings?: boolean;\r\n /**\r\n * Url to set as location when selected\r\n */\r\n url: string;\r\n /**\r\n * Relative url to icon\r\n */\r\n iconUrl?: string;\r\n /**\r\n * When false null will be rendered\r\n */\r\n visible: boolean;\r\n onClick: (e: React.MouseEvent<any>)=>void;\r\n}\r\n\r\nexport const TabItem: React.SFC<TabItemProps> = props => {\r\n const {\r\n id,\r\n label,\r\n active,\r\n valid,\r\n warnings,\r\n url,\r\n iconUrl,\r\n onClick,\r\n visible\r\n } = props;\r\n\r\n const activeTab = active && valid !== false && warnings !== true ? 'active':'';\r\n const invalidTab = valid === false ? styles.invalidTab : (warnings === true ? styles.warningTab : '');\r\n const tabIndex = active ? -1 : 0;\r\n const urlToIcon = iconUrl ? toAbsoluteUrl(iconUrl) : tabIconForDomain(id);\r\n\r\n return visible ? <li key={`${id}`} id={`tab-${id}`}>\r\n <a href={url} onClick={onClick} className={`${styles.tabItem} ${activeTab} ${invalidTab}`}\r\n tabIndex={tabIndex} role=\"tab\" aria-selected={active}>\r\n <div className={styles.iconWrapper}><Icon url={urlToIcon}/></div>\r\n <span>{ insertOptionalWordbreaks(label.text) }</span>\r\n </a>\r\n </li>\r\n :\r\n // when hidden, the correct element type and key must be preserved to retain tab order\r\n <li key={`${id}`} style={{visibility:'collapse'}}/>;\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonTertiary } from 'ui/common/button';\r\nimport { ViewMode } from 'app/area/case/types-store';\r\nimport ArrowLeft from 'react-icons/lib/md/arrow-back';\r\n\r\nexport const ToggleMode = ({expandAll, expandText, collapseText, changeViewMode})=> {\r\n\r\n const handleToggle = event => {\r\n event.preventDefault();\r\n expandAll ?\r\n changeViewMode(ViewMode.tabs)\r\n :\r\n changeViewMode(ViewMode.scroll);\r\n };\r\n return expandAll ?\r\n <ButtonTertiary onClick={handleToggle}>{collapseText}</ButtonTertiary>\r\n :\r\n <ButtonTertiary onClick={handleToggle}>{expandText}</ButtonTertiary>;\r\n};\r\n\r\nexport const ToggleOpen = ({\r\n styles,\r\n onClick,\r\n label\r\n }) => <button className={styles.mobileToggle} type=\"button\" onClick={onClick}>\r\n <div>\r\n <span className={styles.btnArrowLeft}><ArrowLeft/></span>\r\n <span className={styles.btnLabel}>{label}</span>\r\n </div>\r\n </button>;\r\n","import * as React from 'react';\r\nimport styles from './tab-container.scss';\r\nimport { ToggleMode, ToggleOpen } from './toggle';\r\nimport { ViewMode } from 'app/area/case/types-store';\r\n\r\n/**\r\n * TabContainer's DOM identifier, must be predefined due\r\n * to how portals work at time of coding\r\n */\r\nexport const TabContainerDomId = 'tabcontainer';\r\n\r\nexport interface TabContainerProps {\r\n label: string;\r\n visible: boolean;\r\n expandAll: boolean;\r\n activeSection: number | string;\r\n translation: { [key: string]: string };\r\n changeViewMode?: (mode: ViewMode) => void;\r\n renderTabs: (onClick: (event: React.MouseEvent) => void) => React.ReactNode;\r\n}\r\nexport interface TabContainerState {\r\n menuIsOpen: boolean;\r\n menuIsClosing: boolean;\r\n}\r\nexport class TabContainer extends React.Component<TabContainerProps, TabContainerState> {\r\n public state: Readonly<TabContainerState> = {\r\n menuIsOpen: false,\r\n menuIsClosing: false\r\n };\r\n\r\n public componentDidUpdate(prevProps: TabContainerProps) {\r\n this.handleMobileTabSelect(prevProps);\r\n }\r\n\r\n private toggleMobileMenu = () => {\r\n if (this.state.menuIsOpen) {\r\n this.closeMobileMenu();\r\n } else {\r\n this.setState({\r\n menuIsOpen: true\r\n });\r\n }\r\n }\r\n\r\n private closeMobileMenu = (e?: React.MouseEvent<any>) => {\r\n this.setState({ menuIsClosing: true });\r\n setTimeout(() => {\r\n this.setState({\r\n menuIsOpen: false,\r\n menuIsClosing: false\r\n });\r\n }, 300);\r\n }\r\n\r\n private handleMobileTabSelect(prevProps: TabContainerProps) {\r\n const { activeSection, expandAll } = this.props;\r\n const userDidSelect = activeSection && prevProps.activeSection !== activeSection\r\n || prevProps.expandAll !== expandAll;\r\n this.state.menuIsOpen && userDidSelect && this.setState({ menuIsOpen: false });\r\n }\r\n\r\n public render() {\r\n const {\r\n label,\r\n visible,\r\n expandAll,\r\n translation,\r\n changeViewMode,\r\n renderTabs: renderList\r\n } = this.props;\r\n const {\r\n menuIsClosing,\r\n menuIsOpen\r\n } = this.state;\r\n\r\n const menuStateStyles = menuIsOpen ? '' : styles.withClosedMenu;\r\n const closeAnimation = menuIsClosing ? styles.animateOut : '';\r\n const viewStyle = this.props.expandAll ? 'scroll-view' : 'tab-view';\r\n\r\n return (visible && <div className={`${styles.tabPanel} ${menuStateStyles} ${closeAnimation} ${viewStyle}`}>\r\n\r\n <div className={styles.tabSectionWrapper}>\r\n\r\n <ToggleOpen\r\n styles={styles}\r\n label={label}\r\n onClick={this.toggleMobileMenu}\r\n />\r\n\r\n <section className={styles.tabSection}>\r\n <h2>{label}</h2>\r\n {renderList(this.closeMobileMenu)}\r\n {!!changeViewMode && <div className={styles.switchViewButton}>\r\n <ToggleMode\r\n collapseText={translation.switch_to_tab}\r\n expandText={translation.switch_to_scroll}\r\n expandAll={expandAll}\r\n changeViewMode={changeViewMode}\r\n />\r\n </div>}\r\n </section>\r\n </div>\r\n\r\n {menuIsOpen && <div className={`${styles.mobileBackground} ${closeAnimation}`} tabIndex={0} onClick={this.closeMobileMenu} />}\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComponentProps, InputControlContext } from 'ui';\r\nimport { ReactMultiEmail } from 'react-multi-email';\r\nimport 'react-multi-email/style.css';\r\nimport styles from './multi-emails.scss';\r\n \r\ninterface MultiEmailsProps extends ComponentProps {\r\n placeholder?: string;\r\n emails?: string[];\r\n onChange: (emails: string[]) => void;\r\n getLabel: ( email: string, index: number, removeEmail: (index: number) => void ) => void;\r\n}\r\n\r\nexport class MultiEmails extends React.Component<MultiEmailsProps, any> {\r\n \r\n public render() { \r\n const {\r\n componentId,\r\n className,\r\n label,\r\n info,\r\n infoLong\r\n } = this.props;\r\n\r\n const multiEmails =\r\n <ReactMultiEmail \r\n emails={this.props.emails}\r\n onChange={this.props.onChange} \r\n getLabel={this.props.getLabel}\r\n className={styles.multiEmails} \r\n />;\r\n \r\n return ( \r\n <InputControlContext\r\n componentId={componentId}\r\n label={label}\r\n info={info}\r\n infoLong={infoLong} \r\n className={className}> \r\n <div className=\"input-wrapper\">\r\n {multiEmails} \r\n </div>\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","export {MultiEmails} from './multi-emails';\r\n","import * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { isBrowser } from 'app/infrastructure/universal';\r\n\r\nlet hasCrashedAlready = false;\r\n/**\r\n *\r\n * Application crash is when we are in a \"non-recoverable application state\"\r\n *\r\n * A crash would only be expected when:\r\n *\r\n * - Application cannot start and crashes before react mounts the root component\r\n *\r\n * But may also happen when\r\n *\r\n * - A reducer throws an unhandled exception and puts redux into zombie mode due to missing state. Note\r\n * that all action creators should be wrapped in a tryDispatch() wrapper so this should never happen.\r\n * - 3rd party code causes a TypeError that stops execution and bubbles up the stack possibly breaks e.g React.\r\n *\r\n * When a crash happens, it's ok to replace the whole application with an error message as we are not able to\r\n * recover anyway. User shuld in those cases be offered help, e.g a reload link.\r\n *\r\n */\r\nexport const crashNotification = (message: string, details?: string) => {\r\n\r\n if (!isBrowser || hasCrashedAlready) {\r\n return;\r\n }\r\n\r\n hasCrashedAlready = true;\r\n\r\n const renderView = () => {\r\n\r\n ReactDOM.render(\r\n <div className=\"alert alert-warning\" >\r\n <div className=\"card\">\r\n <div className=\"card-header\">\r\n {message && message.toString()}\r\n </div>\r\n <div className=\"card-block\">\r\n {details && <div className=\"card\"><ul className=\"list-group list-group-flush\">{details && details.toString()}</ul></div>}\r\n </div>\r\n </div>\r\n </div>\r\n , document.getElementById('react-app'));\r\n };\r\n\r\n // The error might have fired in a script before window was loaded\r\n if (document.readyState === 'complete') {\r\n renderView();\r\n } else {\r\n window.onload = renderView;\r\n }\r\n\r\n};\r\n","export const logoutRoute = '/logout';\r\n","import { isBrowser } from 'app/infrastructure/universal';\r\n\r\n/**\r\n * Resolve client platform and browser info without intepretations\r\n */\r\nexport function clientInfo() {\r\n\r\n if (!isBrowser) {\r\n return { platform: 'node' };\r\n }\r\n\r\n try {\r\n \r\n let { platform, userAgent, cookieEnabled, onLine, language, languages, userLanguage} = (navigator as any); // tslint:disable-line\r\n\r\n return {\r\n browser: userAgent,\r\n cookieEnabled,\r\n language: { language, languages, userLanguage },\r\n platform,\r\n timezone: new Date().getTimezoneOffset(),\r\n online: onLine,\r\n url: window.location.href\r\n };\r\n\r\n } catch (err) {\r\n console.error('Failed to obtain client info', err.message);\r\n return {};\r\n }\r\n}\r\n","/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n 'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function() {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n var log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n\n var i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n}\n\nInput.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function() { },\n\n /**\n * bind the events\n */\n init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity, velocityX, velocityY, direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n var pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0, y = 0, i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n});\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n\n Input.apply(this, arguments);\n\n this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n\n Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n\n Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target;\n\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n Input.apply(this, arguments);\n\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n\n this.primaryTouch = null;\n this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n});\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {x: touch.clientX, y: touch.clientY};\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n var removeLastTouch = function() {\n var i = lts.indexOf(lastTouch);\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n}\n\nTouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function() {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n\n this.state = STATE_POSSIBLE;\n\n this.simultaneous = {};\n this.requireFail = [];\n}\n\nRecognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function() {\n var i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function(inputData) { }, // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function() { },\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n\n this.pX = null;\n this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n },\n\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n },\n\n emit: function(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n\n emit: function(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n Recognizer.apply(this, arguments);\n\n this._timer = null;\n this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_AUTO];\n },\n\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers == this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n\n emit: function(input) {\n var direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n Recognizer.apply(this, arguments);\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_MANIPULATION];\n },\n\n process: function(input) {\n var options = this.options;\n\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {enable: false}],\n [PinchRecognizer, {enable: false}, ['rotate']],\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n [PressRecognizer]\n ],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, function(item) {\n var recognizer = this.add(new (item[0])(item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n}\n\nManager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n var recognizer;\n var recognizers = this.recognizers;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function(recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n }\n\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function(recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function(events, handler) {\n if (events === undefined) {\n return;\n }\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function(events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n if (!element.style) {\n return;\n }\n var prop;\n each(manager.options.cssProps, function(value, name) {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n define(function() {\n return Hammer;\n });\n} else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n} else {\n window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n","import * as React from 'react';\r\nimport styles from './file-uploader.scss';\r\n\r\nexport interface FileItemProgressProps {\r\n progress?: number;\r\n indeterminate?: boolean;\r\n}\r\n\r\nexport const FileItemProgress = (props:FileItemProgressProps) => (\r\n <div className={styles.progress}>\r\n {props.indeterminate ?\r\n <div className={styles.indeterminate}/> :\r\n <div className={styles.determinate} style={{ width: Math.min(props.progress, 100) + '%' }} />\r\n }\r\n </div>\r\n);\r\n","module.exports = (__webpack_require__(49))(620);","// tslint:disable:no-unused-expression\r\nimport * as React from 'react';\r\nimport debounce from 'lodash/debounce';\r\n\r\nexport interface DebounceInputProps {\r\n id?: string;\r\n type?: string;\r\n className?: string;\r\n style?: any;\r\n value: string;\r\n placeholder: string;\r\n readOnly?: boolean;\r\n maxLength?: number;\r\n required?: boolean;\r\n focus?: boolean;\r\n onChange: (value: string) => void;\r\n onFocus?: (e: React.FormEvent<HTMLInputElement>) => void;\r\n onBlur?: (e: React.FormEvent<HTMLInputElement>) => void;\r\n /**\r\n * The number of milliseconds to delay onChange event. Default is 500.\r\n */\r\n wait?: number;\r\n}\r\n\r\nexport interface DebounceInputState {\r\n inputValue?: string;\r\n previousValue?: string;\r\n hasFocus?: boolean;\r\n}\r\n\r\n/**\r\n * Prevent react warnings about uncontrolled components when value is undefined\r\n * @param input\r\n */\r\nconst controlledValue = (input: any) => input === undefined ? '' : input;\r\n\r\n/**\r\n *\r\n * Component behaves like HTML input tag with delayed onChange function.\r\n *\r\n */\r\nexport class DebounceInput extends React.Component<DebounceInputProps, DebounceInputState> {\r\n public static getDerivedStateFromProps(props:DebounceInputProps, state:DebounceInputState) {\r\n if (!state.hasFocus || (state.inputValue === '' && state.previousValue !== props.value)) {\r\n return {\r\n inputValue: controlledValue(props.value),\r\n previousValue: props.value\r\n };\r\n }\r\n return {previousValue: props.value};\r\n }\r\n\r\n public static defaultProps: Partial<DebounceInputProps> = {\r\n wait: 500,\r\n type: 'text'\r\n };\r\n private debounceOnChange: any;\r\n\r\n constructor(props: DebounceInputProps) {\r\n super(props);\r\n\r\n this.state = {\r\n inputValue: controlledValue(props.value),\r\n previousValue: props.value,\r\n hasFocus: false\r\n };\r\n\r\n this.debounceOnChange = debounce((value: string) => {\r\n this.props.onChange(value);\r\n }, this.props.wait);\r\n }\r\n\r\n private onChange = (e: React.FormEvent<HTMLInputElement>) => {\r\n const eventClone = Object.assign({}, e);\r\n this.setState({\r\n inputValue: controlledValue(eventClone.currentTarget.value)\r\n }, () => {\r\n this.debounceOnChange(eventClone.currentTarget.value);\r\n });\r\n }\r\n\r\n private onFocus = (e: React.FormEvent<HTMLInputElement>) => {\r\n this.setState({hasFocus: true});\r\n this.props.onFocus && this.props.onFocus(e);\r\n }\r\n\r\n private onBlur = (e: React.FormEvent<HTMLInputElement>) => {\r\n this.setState({hasFocus: false});\r\n this.props.onBlur && this.props.onBlur(e);\r\n if (this.props.value !== this.state.inputValue) {\r\n this.props.onChange && this.props.onChange(this.state.inputValue);\r\n }\r\n }\r\n\r\n public render() {\r\n return (<input\r\n type={this.props.type}\r\n autoFocus={this.props.focus}\r\n className={this.props.className}\r\n style={this.props.style}\r\n value={this.state.inputValue}\r\n readOnly={this.props.readOnly}\r\n disabled={this.props.readOnly}\r\n maxLength={this.props.maxLength}\r\n placeholder={this.props.placeholder}\r\n required={this.props.required}\r\n onChange={this.onChange}\r\n onFocus={this.onFocus}\r\n onBlur={this.onBlur}\r\n />);\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface ForceUpdateTerminalProps {\r\n refreshForceUpdateHash?: () => void;\r\n}\r\n\r\ninterface ForceUpdateTerminalState {\r\n forceUpdateHash: string;\r\n}\r\n\r\nexport const ForceUpdateTerminalContext = React.createContext('');\r\n\r\n/**\r\n * HOC withForceUpdateTerminal let us trigger udpate of sibblings components which are wrapped\r\n * by HOC withForceUpdateConsumer. It is done by providing new value of props by react context.\r\n * We should use it ONLY for cases when we aren't able to trigger update of component from inside.\r\n *\r\n * Use case:\r\n * - 3th part library react-textarea-autosize(RTA) and css animation somewhere in parent component.\r\n * To correctly calculate height of RTA all related animations have to be finished.\r\n * In a place where animation was added, I attached to 'animationend' event and then calculation\r\n * (by HOC withForceUpdateTerminal) of new textarea height is triggered.\r\n * Problem is also described here:\r\n * https://github.com/andreypopp/react-textarea-autosize/issues/48\r\n */\r\n\r\nexport const withForceUpdateTerminal = <T extends {}>(Component: React.ComponentType<T>) => {\r\n const WrappedComponentProps:React.ComponentType<T & ForceUpdateTerminalProps> = Component;\r\n return class ForceUpdateTermianlComponent extends React.Component<T, ForceUpdateTerminalState> {\r\n public state: Readonly<ForceUpdateTerminalState> = {\r\n forceUpdateHash: ''\r\n };\r\n\r\n private handleRefreshForceUpdateHash = () => {\r\n this.setState({\r\n forceUpdateHash: Date.now().toString()\r\n });\r\n }\r\n\r\n public render() {\r\n return (\r\n <ForceUpdateTerminalContext.Provider value={this.state.forceUpdateHash} >\r\n <WrappedComponentProps {...this.props} refreshForceUpdateHash={this.handleRefreshForceUpdateHash} />\r\n </ForceUpdateTerminalContext.Provider>\r\n );\r\n }\r\n };\r\n};\r\n\r\nexport interface ForceUpdateConsumerProps {\r\n updatehash?: string;\r\n}\r\n\r\nexport const withForceUpdateConsumer = <T extends {}>(Component: React.ComponentType<T>) => {\r\n const WrappedComponentProps:React.ComponentType<T & ForceUpdateConsumerProps> = Component;\r\n return class ForceUpdateConsumerComponent extends React.Component<T> {\r\n public static displayName:string = `withForceUpdateConsumer(${Component.name})`;\r\n public render() {\r\n return (\r\n <ForceUpdateTerminalContext.Consumer >\r\n {updateHash =>\r\n <WrappedComponentProps {...this.props} updatehash={updateHash} />}\r\n </ForceUpdateTerminalContext.Consumer>\r\n );\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { SelectItem } from '../types';\r\nimport MdClose from 'react-icons/lib/md/close';\r\nimport { keyCode } from 'ui/common/key-code-types';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\n\r\nimport styles from './selected-option.scss';\r\n\r\nexport interface SelectedOptionProps {\r\n item: SelectItem;\r\n onClick?: (item: SelectItem) => void;\r\n onRemove: (item: SelectItem) => void;\r\n readOnly?: boolean;\r\n hasError?: boolean;\r\n}\r\n\r\nexport class SelectedOption extends React.Component<SelectedOptionProps>{\r\n private onRemove = (e: any) => {\r\n e.stopPropagation();\r\n this.props.onRemove(this.props.item);\r\n }\r\n\r\n private onClick = () => {\r\n if (this.props.onClick && !this.props.readOnly) {\r\n this.props.onClick(this.props.item);\r\n }\r\n }\r\n\r\n private onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\r\n if (e.keyCode === keyCode.Enter || e.keyCode === keyCode.Space) {\r\n e.preventDefault();\r\n this.onRemove(e);\r\n }\r\n }\r\n\r\n public render() {\r\n return (<span className={`\r\n ${styles.selectTag}\r\n ${this.props.readOnly ? styles.readOnly : ''}\r\n ${this.props.onRemove ? '' : styles.notRemovable}\r\n ${this.props.hasError ? styles.error : ''}`}\r\n onClick={this.onClick}>\r\n\r\n <span>{insertOptionalWordbreaks(this.props.item.description)}</span>\r\n {this.props.onRemove &&\r\n <i className={`${styles.selectTagRemove} material-icons`}\r\n onKeyUp={this.onKeyDown}\r\n onClick={this.onRemove}\r\n tabIndex={0}\r\n ><MdClose />\r\n </i>\r\n }\r\n </span>);\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tiles-index__visuallyhidden--3NJdp\",\"focusable\":\"tiles-index__focusable--ehtjB\",\"alphabet-control\":\"tiles-index__alphabet-control--wQdo8\",\"alphabetControl\":\"tiles-index__alphabet-control--wQdo8\",\"alphabet-control-btn\":\"tiles-index__alphabet-control-btn--2heWG\",\"alphabetControlBtn\":\"tiles-index__alphabet-control-btn--2heWG\",\"disabled\":\"tiles-index__disabled--1aQPj\"};","import {createContext} from 'react';\r\nexport const {Provider:LinkContextProvider, Consumer:LinkContextConsumer} = createContext(false);\r\n","import * as React from 'react';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { PromptModalState, InputModalHostProps } from './types';\r\nimport { withDropdownMenu } from 'ui/common/dropdown-menu';\r\nimport { DropdownMenuContext } from 'ui/common/dropdown-menu/types';\r\n\r\nexport class InputModalComponent extends React.Component<InputModalHostProps & DropdownMenuContext, PromptModalState> {\r\n public state: Readonly<PromptModalState> = {\r\n isOpen: false\r\n };\r\n\r\n public openModal = (e: React.SyntheticEvent<any>) => {\r\n e && e.preventDefault();\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n });\r\n }\r\n\r\n private closeModal = () => {\r\n this.props.handleDropdownHide && this.props.handleDropdownHide();\r\n this.setState({\r\n isOpen: false\r\n });\r\n }\r\n\r\n private handleContinue = (e: React.SyntheticEvent<any>, ...args:number[]|string[]) => {\r\n e && e.preventDefault();\r\n this.closeModal();\r\n this.props.onContinue && this.props.onContinue(...args);\r\n }\r\n\r\n private handleCancel = (e: React.SyntheticEvent<any>) => {\r\n e && e.preventDefault();\r\n this.closeModal();\r\n this.props.onCancel && this.props.onCancel();\r\n }\r\n\r\n private keyMap: any = {\r\n escapeKey: ['esc']\r\n };\r\n\r\n private handlerHotkeys: any = {\r\n escapeKey: () => this.closeModal()\r\n };\r\n\r\n public render() {\r\n\r\n return (\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlerHotkeys}>\r\n {\r\n this.props.children\r\n ?\r\n this.props.children({\r\n ...this.props,\r\n ...this.state,\r\n ...{\r\n onOpen: this.openModal ,\r\n onContinue: this.handleContinue,\r\n onCancel: this.handleCancel\r\n }\r\n })\r\n :\r\n null\r\n }\r\n </HotKeys>);\r\n }\r\n}\r\n/**\r\n * Host for components that need to open in modal state.\r\n * If the component was opened from a temporarily rendered component (dropdown menu etc), this component\r\n * will call `props.handleDropDownHide()` if avaliable.\r\n */\r\nconst component = withDropdownMenu(InputModalComponent);\r\nexport { component as InputModalHost };\r\n","import { Entity } from 'app/types-shared';\r\nimport { InitialUiEngineProps, ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { getEntityTypeFromStorePath } from 'app/infrastructure/store/entity';\r\nimport { tableName } from 'app/area/case/case-data-model';\r\nimport get from 'lodash/get';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { invariant } from 'app/infrastructure/log';\r\n\r\nexport function entityFilter(entity: Entity, props: InitialUiEngineProps | ConnectedComponentProps): boolean {\r\n const childEntityType = getEntityTypeFromStorePath(entity.id);\r\n const primaryKey = get(props, 'resolveContext.primaryKey');\r\n switch (childEntityType) {\r\n case tableName.causes:\r\n return contextCategoryEqualsPkCategory(entity, primaryKey);\r\n case tableName.green:\r\n return contextCategoryEqualsFieldNameValue('EnvValSubstance', entity, primaryKey);\r\n default:\r\n return true;\r\n }\r\n}\r\n\r\nfunction contextCategoryEqualsPkCategory(entity: Entity, contextPrimaryKey: ComplexValue<number>) {\r\n invariant(!!contextPrimaryKey, 'invalid primary key');\r\n invariant(!!entity.primaryKey, 'invalid primary key');\r\n\r\n return entity.primaryKey && entity.primaryKey.categoryId === contextPrimaryKey.value;\r\n}\r\n\r\nfunction contextCategoryEqualsFieldNameValue(fieldName: string, entity: Entity, contextPrimaryKey: ComplexValue<number>) {\r\n invariant(!!contextPrimaryKey, 'invalid context primary key');\r\n invariant(!!entity[fieldName], `field name ${fieldName} is not a property on entity`);\r\n invariant(Array.isArray(entity[fieldName]) && !!entity[fieldName][0], \r\n `${fieldName}: ${JSON.stringify(entity[fieldName])} is not a valid value`);\r\n\r\n return entity[fieldName] && entity[fieldName][0].categoryId === contextPrimaryKey.value;\r\n}\r\n","import {\r\n getCaseData,\r\n contextToStorePath,\r\n defaultArray\r\n} from 'app/infrastructure/ui/renderer/resolvers';\r\nimport { getEntityTypeFromPath } from 'app/infrastructure/store/entity';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { IteratorType } from 'app/infrastructure/ui';\r\nimport { ConnectedComponentProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { entityFilter } from 'app/area/case/entity-filters';\r\nimport { Entity } from 'app/types-shared';\r\nimport sortBy from 'lodash/sortby';\r\nimport { getChildEntities } from 'app/infrastructure/store/query';\r\nimport { ChildItem, IteratorContext } from 'app/infrastructure/ui/renderer/iterator-types';\r\n\r\nconst sortEntities = (\r\n props: ConnectedComponentProps,\r\n entities: Entity[]\r\n): Entity[] => {\r\n // Using lodash sortBy for stable sort to preserve ordering beyond the value provided.\r\n if (props.sortValue) {\r\n return sortBy(entities, props.sortValue);\r\n }\r\n\r\n return entities;\r\n};\r\n\r\nconst getDataRowsIteratorChildItems = (\r\n state: any,\r\n props: ConnectedComponentProps\r\n): ChildItem[] => {\r\n const descriptor = props.componentDescriptor;\r\n const context = props.resolveContext;\r\n const entities = getCaseData(state, props);\r\n const childEntityType = getEntityTypeFromPath(descriptor.entityTypePath);\r\n\r\n const childEntities = sortEntities(\r\n props,\r\n getChildEntities(\r\n entities,\r\n contextToStorePath(descriptor, context),\r\n childEntityType\r\n )\r\n );\r\n\r\n return (\r\n (childEntities\r\n .filter(e => entityFilter(e, props))\r\n .map(i => ({\r\n storePath: i.id,\r\n primaryKey: i.primaryKey\r\n })) as ChildItem[]) || defaultArray\r\n );\r\n};\r\n\r\nconst getCodetableIteratorChildItems = (\r\n state: any,\r\n props: ConnectedComponentProps\r\n): ChildItem[] => {\r\n const { componentDescriptor: descriptor, options } = props;\r\n const context = props.resolveContext;\r\n const childEntityType = getEntityTypeFromPath(descriptor.entityTypePath);\r\n\r\n const dataRowItems = getDataRowsIteratorChildItems(state, props);\r\n\r\n const rowIsVirtual = (option: ComplexValue<number>) => {\r\n return !dataRowItems.find(\r\n d => d.primaryKey && d.primaryKey.value === option.value\r\n );\r\n };\r\n\r\n return (\r\n (options &&\r\n options.map(c => {\r\n // If this iterator does not have a type, we cannot infer the storePath so we default to the current context.\r\n const storePath = [...context.path];\r\n\r\n if (childEntityType) {\r\n storePath.push({ [childEntityType]: c.value });\r\n }\r\n\r\n return {\r\n storePath,\r\n primaryKey: c,\r\n ...(rowIsVirtual(c) ? { virtual: true } : undefined)\r\n };\r\n })) ||\r\n defaultArray\r\n );\r\n};\r\n\r\nexport const getIteratorChildItems = (\r\n type: IteratorType,\r\n state: any,\r\n props: ConnectedComponentProps\r\n): ChildItem[] => {\r\n switch (type) {\r\n case IteratorType.DataRows:\r\n return getDataRowsIteratorChildItems(state, props);\r\n case IteratorType.CodeTable:\r\n return getCodetableIteratorChildItems(state, props);\r\n default:\r\n return defaultArray;\r\n }\r\n};\r\n\r\n/**\r\n * Props required by a iterator component to be able to enumerate child data in the correct context\r\n *\r\n * @param state component application state\r\n * @param configProps component props of the currently connected component\r\n * @param currentUiProps iterator behavior sometimes depend on props that are resolved specifically for the component,\r\n * for instance when selected from data.\r\n */\r\nexport const getIteratorContext = (\r\n state: any,\r\n configProps: any,\r\n currentUiProps: ConnectedComponentProps\r\n): IteratorContext => {\r\n const descriptor = configProps.componentDescriptor;\r\n const connectingAnIterator = !!descriptor.iterate;\r\n if (connectingAnIterator) {\r\n const childItems: ChildItem[] = getIteratorChildItems(\r\n descriptor.iterate.type,\r\n state,\r\n currentUiProps\r\n );\r\n\r\n return {\r\n // actions are used for binding action creators in\r\n // callbacks\r\n actions: configProps.actions,\r\n childItems,\r\n statePath: configProps.statePath\r\n };\r\n }\r\n\r\n return {};\r\n};\r\n","import { ReportCategory } from 'app/area/case-listing/types';\r\n\r\nconst reportIdMapping = {\r\n [2]: ReportCategory.NumeratorReport\r\n};\r\n// This is a temporary solution, awaiting backend to support category\r\nexport const reportIdToReportCategoryId = (reportId) => {\r\n return reportIdMapping[reportId];\r\n};\r\n","import { CasePermissions, FavouriteDefinition, RenderMode } from 'app/types-shared';\r\nimport { HeaderVisibilityConfiguration } from 'app/components';\r\n\r\n/**\r\n * Case Listing component props\r\n */\r\nexport interface CaseListingExternalProps {\r\n\r\n workingDefinition: FavouriteDefinition;\r\n\r\n reportCategory?: ReportCategory;\r\n\r\n primaryActionComponentFactory?: PrimaryActionComponentFactory;\r\n\r\n headerVisibilityConfiguration?: HeaderVisibilityConfiguration;\r\n\r\n windowAsScrollableAncestor?: boolean;\r\n\r\n requestedRenderMode?: RenderMode;\r\n\r\n}\r\n\r\nexport interface PrimaryActionComponentProps {\r\n caseId: number;\r\n permissions?: CasePermissions;\r\n}\r\n\r\nexport type PrimaryActionComponentFactory = (props: PrimaryActionComponentProps) => JSX.Element;\r\n\r\nexport enum ReportCategory {\r\n CaseReport = 1,\r\n NumeratorReport = 2,\r\n StatisticalReport = 3,\r\n DashboardReport = 4,\r\n SpecialReport = 5,\r\n CodeTableReport = 6,\r\n Administrative = 7,\r\n ModificationReport = 8,\r\n PersonReport = 9,\r\n ExportInport = 10,\r\n CaseReportIntegrations = 11,\r\n CaseReportInternalUse = 12\r\n}\r\n","import * as React from 'react';\r\nimport MdTrendingNeutral from 'react-icons/lib/md/trending-neutral';\r\nimport styles from './section-pager.scss';\r\n\r\nexport interface RenderSectionProps{\r\n id: number;\r\n label: string;\r\n}\r\n\r\nexport interface SectionPagerProps{\r\n hide: boolean;\r\n previousButtonTooltip?: string;\r\n previousSection: RenderSectionProps;\r\n nextButtonTooltip?: string;\r\n nextSection: RenderSectionProps;\r\n onNext: (e: React.MouseEvent<any>)=>void;\r\n onPrevious: (e: React.MouseEvent<any>)=>void;\r\n}\r\n\r\nexport const SectionPager: React.SFC<SectionPagerProps> = ({\r\n hide,\r\n previousButtonTooltip,\r\n previousSection,\r\n nextButtonTooltip,\r\n nextSection,\r\n onNext,\r\n onPrevious\r\n}:SectionPagerProps) =>\r\n\r\n !hide && ( previousSection || nextSection)\r\n ? <div className={`${styles.sectionPager} main-grid`}>\r\n { previousSection &&\r\n <div className={styles.previous}>\r\n <a href=\"#\" className=\"standalone-link\" onClick={onPrevious} title={previousButtonTooltip}>\r\n <MdTrendingNeutral/> {previousSection.label}\r\n </a>\r\n </div>\r\n }\r\n { nextSection &&\r\n <div className={styles.next}>\r\n <a href=\"#\" className=\"standalone-link\" onClick={onNext} title={nextButtonTooltip}>\r\n {nextSection.label} <MdTrendingNeutral/>\r\n </a>\r\n </div>\r\n }\r\n </div>\r\n : null;\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdFormatListNumbered = function MdFormatListNumbered(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm11.6 21.6v-3.2h23.4v3.2h-23.4z m0 10v-3.2h23.4v3.2h-23.4z m0-23.2h23.4v3.2h-23.4v-3.2z m-8.2 10v-1.8h5v1.6l-3.1 3.4h3.1v1.8h-5v-1.6l2.9-3.4h-2.9z m1.6-5v-5h-1.6v-1.8h3.2v6.8h-1.6z m-1.6 15v-1.8h5v6.8h-5v-1.8h3.2v-0.7h-1.6v-1.8h1.6v-0.7h-3.2z' })\n )\n );\n};\n\nexports.default = MdFormatListNumbered;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdGroup = function MdGroup(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm26.6 21.6q2.2 0 4.8 0.7t4.8 2 2.2 3.2v4.1h-10v-4.1q0-3.4-3.3-5.8 0.5-0.1 1.5-0.1z m-13.2 0q2.1 0 4.7 0.7t4.8 2 2.1 3.2v4.1h-23.4v-4.1q0-1.8 2.2-3.2t4.8-2 4.8-0.7z m0-3.2q-2.1 0-3.6-1.5t-1.4-3.5 1.4-3.6 3.6-1.4 3.4 1.4 1.5 3.6-1.5 3.5-3.4 1.5z m13.2 0q-2 0-3.5-1.5t-1.5-3.5 1.5-3.6 3.5-1.4 3.6 1.4 1.4 3.6-1.4 3.5-3.6 1.5z' })\n )\n );\n};\n\nexports.default = MdGroup;\nmodule.exports = exports['default'];","export const ACTION = {\r\n CREATE_EDIT_DRAFT:  'CASE:NEW_EDIT_DRAFT'\r\n};\r\n\r\nexport class CreateEditDraft{\r\n public type: string = ACTION.CREATE_EDIT_DRAFT;\r\n public caseId: number;\r\n\r\n constructor(caseId: number) {\r\n this.caseId = caseId;\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"bowtie-connections__visuallyhidden--3XG2T\",\"focusable\":\"bowtie-connections__focusable--qjmYg\",\"connection-container\":\"bowtie-connections__connection-container--3U4OX\",\"connectionContainer\":\"bowtie-connections__connection-container--3U4OX\",\"connection-item\":\"bowtie-connections__connection-item--25M1M\",\"connectionItem\":\"bowtie-connections__connection-item--25M1M\"};","import * as React from 'react';\r\nimport { EntityView } from 'app/infrastructure/ui/renderer';\r\nimport {SpinLoader} from 'app/components/spin-loader';\r\nimport { ScrollToTop } from 'ui/scroll-to-top/scroll-to-top';\r\n\r\nexport const CaseView = (props : any) => {\r\n\r\n if (!props.schema || !props.entityId) {\r\n return <SpinLoader />;\r\n }\r\n\r\n return <><EntityView\r\n key={props.entityId}\r\n {...props}\r\n />\r\n <ScrollToTop/>\r\n </>;\r\n\r\n};\r\n","import * as actionTypes from 'app/infrastructure/ui/form/action-types';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { ActionDispatching } from 'app/types-shared';\r\n\r\nexport const actionCreators = {\r\n \r\n /**\r\n * Opens a application internal debugging panel to inspect properties of a rendered or failing UI component\r\n */\r\n inspect: (componentContext: any, error?: any): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actionTypes.InspectComponent(componentContext, error));\r\n }),\r\n\r\n preview: (props: any): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actionTypes.InspectPreviewEdit(props));\r\n })\r\n};\r\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaRefresh = function FaRefresh(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm36.7 23.6q0 0.1 0 0.1-1.4 6-6 9.7t-10.6 3.7q-3.3 0-6.4-1.2t-5.4-3.5l-2.9 2.9q-0.4 0.4-1 0.4t-1-0.4-0.4-1v-10q0-0.6 0.4-1t1-0.4h10q0.6 0 1 0.4t0.5 1-0.5 1l-3 3q1.6 1.5 3.6 2.3t4.1 0.8q3 0 5.6-1.4t4.2-4q0.2-0.4 1.2-2.6 0.1-0.5 0.6-0.5h4.3q0.3 0 0.5 0.2t0.2 0.5z m0.6-17.9v10q0 0.6-0.4 1t-1 0.4h-10q-0.6 0-1-0.4t-0.5-1 0.5-1l3-3.1q-3.3-3-7.8-3-2.9 0-5.5 1.4t-4.2 4q-0.2 0.4-1.2 2.6-0.2 0.5-0.6 0.5h-4.5q-0.3 0-0.5-0.2t-0.2-0.5v-0.1q1.5-6 6-9.7t10.7-3.7q3.3 0 6.4 1.2t5.4 3.5l3-2.9q0.4-0.4 1-0.4t1 0.4 0.4 1z' })\n )\n );\n};\n\nexports.default = FaRefresh;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdEqualizer = function MdEqualizer(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm26.6 15h6.8v18.4h-6.8v-18.4z m-20 18.4v-13.4h6.8v13.4h-6.8z m10 0v-26.8h6.8v26.8h-6.8z' })\n )\n );\n};\n\nexports.default = MdEqualizer;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdSearch = function MdSearch(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm15.9 23.4c4.1 0 7.5-3.4 7.5-7.5s-3.4-7.5-7.5-7.5-7.5 3.3-7.5 7.5 3.3 7.5 7.5 7.5z m10 0l8.2 8.2-2.5 2.5-8.2-8.2v-1.4l-0.5-0.4c-1.9 1.6-4.4 2.5-7 2.5-6.1 0-10.9-4.7-10.9-10.7s4.8-10.9 10.9-10.9 10.7 4.8 10.7 10.9c0 2.6-0.9 5.1-2.5 7l0.4 0.5h1.4z' })\n )\n );\n};\n\nexports.default = MdSearch;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdBuild = function MdBuild(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm37.8 31.6c0.7 0.5 0.7 1.7-0.1 2.4l-3.9 3.8c-0.7 0.7-1.6 0.7-2.3 0l-15.2-15.1c-3.8 1.4-8.3 0.7-11.5-2.5-3.3-3.4-4.2-8.4-2.1-12.4l7.3 7.2 5-5-7.2-7.2c4-1.8 9-1.2 12.4 2.2 3.2 3.2 3.9 7.7 2.5 11.5z' })\n )\n );\n};\n\nexports.default = MdBuild;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaSitemap = function FaSitemap(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm40 27.9v7.1q0 0.9-0.6 1.5t-1.5 0.6h-7.2q-0.9 0-1.5-0.6t-0.6-1.5v-7.1q0-0.9 0.6-1.6t1.5-0.6h2.2v-4.3h-11.5v4.3h2.2q0.9 0 1.5 0.6t0.6 1.6v7.1q0 0.9-0.6 1.5t-1.5 0.6h-7.2q-0.9 0-1.5-0.6t-0.6-1.5v-7.1q0-0.9 0.6-1.6t1.5-0.6h2.2v-4.3h-11.5v4.3h2.2q0.9 0 1.5 0.6t0.6 1.6v7.1q0 0.9-0.6 1.5t-1.5 0.6h-7.2q-0.9 0-1.5-0.6t-0.6-1.5v-7.1q0-0.9 0.6-1.6t1.5-0.6h2.2v-4.3q0-1.1 0.8-2t2-0.8h11.5v-4.3h-2.2q-0.9 0-1.5-0.6t-0.6-1.6v-7.1q0-0.9 0.6-1.5t1.5-0.6h7.2q0.9 0 1.5 0.6t0.6 1.5v7.1q0 0.9-0.6 1.6t-1.5 0.6h-2.2v4.3h11.5q1.1 0 2 0.8t0.8 2v4.3h2.2q0.9 0 1.5 0.6t0.6 1.6z' })\n )\n );\n};\n\nexports.default = FaSitemap;\nmodule.exports = exports['default'];","/*!\n * UAParser.js v0.7.20\n * Lightweight JavaScript-based User-Agent string parser\n * https://github.com/faisalman/ua-parser-js\n *\n * Copyright © 2012-2019 Faisal Salman <f@faisalman.com>\n * Licensed under MIT License\n */\n\n(function (window, undefined) {\n\n 'use strict';\n\n //////////////\n // Constants\n /////////////\n\n\n var LIBVERSION = '0.7.20',\n EMPTY = '',\n UNKNOWN = '?',\n FUNC_TYPE = 'function',\n UNDEF_TYPE = 'undefined',\n OBJ_TYPE = 'object',\n STR_TYPE = 'string',\n MAJOR = 'major', // deprecated\n MODEL = 'model',\n NAME = 'name',\n TYPE = 'type',\n VENDOR = 'vendor',\n VERSION = 'version',\n ARCHITECTURE= 'architecture',\n CONSOLE = 'console',\n MOBILE = 'mobile',\n TABLET = 'tablet',\n SMARTTV = 'smarttv',\n WEARABLE = 'wearable',\n EMBEDDED = 'embedded';\n\n\n ///////////\n // Helper\n //////////\n\n\n var util = {\n extend : function (regexes, extensions) {\n var mergedRegexes = {};\n for (var i in regexes) {\n if (extensions[i] && extensions[i].length % 2 === 0) {\n mergedRegexes[i] = extensions[i].concat(regexes[i]);\n } else {\n mergedRegexes[i] = regexes[i];\n }\n }\n return mergedRegexes;\n },\n has : function (str1, str2) {\n if (typeof str1 === \"string\") {\n return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1;\n } else {\n return false;\n }\n },\n lowerize : function (str) {\n return str.toLowerCase();\n },\n major : function (version) {\n return typeof(version) === STR_TYPE ? version.replace(/[^\\d\\.]/g,'').split(\".\")[0] : undefined;\n },\n trim : function (str) {\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n };\n\n\n ///////////////\n // Map helper\n //////////////\n\n\n var mapper = {\n\n rgx : function (ua, arrays) {\n\n var i = 0, j, k, p, q, matches, match;\n\n // loop through all regexes maps\n while (i < arrays.length && !matches) {\n\n var regex = arrays[i], // even sequence (0,2,4,..)\n props = arrays[i + 1]; // odd sequence (1,3,5,..)\n j = k = 0;\n\n // try matching uastring with regexes\n while (j < regex.length && !matches) {\n\n matches = regex[j++].exec(ua);\n\n if (!!matches) {\n for (p = 0; p < props.length; p++) {\n match = matches[++k];\n q = props[p];\n // check if given property is actually array\n if (typeof q === OBJ_TYPE && q.length > 0) {\n if (q.length == 2) {\n if (typeof q[1] == FUNC_TYPE) {\n // assign modified match\n this[q[0]] = q[1].call(this, match);\n } else {\n // assign given value, ignore regex match\n this[q[0]] = q[1];\n }\n } else if (q.length == 3) {\n // check whether function or regex\n if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {\n // call function (usually string mapper)\n this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined;\n } else {\n // sanitize match using given regex\n this[q[0]] = match ? match.replace(q[1], q[2]) : undefined;\n }\n } else if (q.length == 4) {\n this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined;\n }\n } else {\n this[q] = match ? match : undefined;\n }\n }\n }\n }\n i += 2;\n }\n },\n\n str : function (str, map) {\n\n for (var i in map) {\n // check if array\n if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {\n for (var j = 0; j < map[i].length; j++) {\n if (util.has(map[i][j], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n } else if (util.has(map[i], str)) {\n return (i === UNKNOWN) ? undefined : i;\n }\n }\n return str;\n }\n };\n\n\n ///////////////\n // String map\n //////////////\n\n\n var maps = {\n\n browser : {\n oldsafari : {\n version : {\n '1.0' : '/8',\n '1.2' : '/1',\n '1.3' : '/3',\n '2.0' : '/412',\n '2.0.2' : '/416',\n '2.0.3' : '/417',\n '2.0.4' : '/419',\n '?' : '/'\n }\n }\n },\n\n device : {\n amazon : {\n model : {\n 'Fire Phone' : ['SD', 'KF']\n }\n },\n sprint : {\n model : {\n 'Evo Shift 4G' : '7373KT'\n },\n vendor : {\n 'HTC' : 'APA',\n 'Sprint' : 'Sprint'\n }\n }\n },\n\n os : {\n windows : {\n version : {\n 'ME' : '4.90',\n 'NT 3.11' : 'NT3.51',\n 'NT 4.0' : 'NT4.0',\n '2000' : 'NT 5.0',\n 'XP' : ['NT 5.1', 'NT 5.2'],\n 'Vista' : 'NT 6.0',\n '7' : 'NT 6.1',\n '8' : 'NT 6.2',\n '8.1' : 'NT 6.3',\n '10' : ['NT 6.4', 'NT 10.0'],\n 'RT' : 'ARM'\n }\n }\n }\n };\n\n\n //////////////\n // Regex map\n /////////////\n\n\n var regexes = {\n\n browser : [[\n\n // Presto based\n /(opera\\smini)\\/([\\w\\.-]+)/i, // Opera Mini\n /(opera\\s[mobiletab]+).+version\\/([\\w\\.-]+)/i, // Opera Mobi/Tablet\n /(opera).+version\\/([\\w\\.]+)/i, // Opera > 9.80\n /(opera)[\\/\\s]+([\\w\\.]+)/i // Opera < 9.80\n ], [NAME, VERSION], [\n\n /(opios)[\\/\\s]+([\\w\\.]+)/i // Opera mini on iphone >= 8.0\n ], [[NAME, 'Opera Mini'], VERSION], [\n\n /\\s(opr)\\/([\\w\\.]+)/i // Opera Webkit\n ], [[NAME, 'Opera'], VERSION], [\n\n // Mixed\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /(lunascape|maxthon|netfront|jasmine|blazer)[\\/\\s]?([\\w\\.]*)/i,\n // Lunascape/Maxthon/Netfront/Jasmine/Blazer\n\n // Trident based\n /(avant\\s|iemobile|slim|baidu)(?:browser)?[\\/\\s]?([\\w\\.]*)/i,\n // Avant/IEMobile/SlimBrowser/Baidu\n /(?:ms|\\()(ie)\\s([\\w\\.]+)/i, // Internet Explorer\n\n // Webkit/KHTML based\n /(rekonq)\\/([\\w\\.]*)/i, // Rekonq\n /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\\/([\\w\\.-]+)/i\n // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon\n ], [NAME, VERSION], [\n\n /(konqueror)\\/([\\w\\.]+)/i // Konqueror\n ], [[NAME, 'Konqueror'], VERSION], [\n\n /(trident).+rv[:\\s]([\\w\\.]+).+like\\sgecko/i // IE11\n ], [[NAME, 'IE'], VERSION], [\n\n /(edge|edgios|edga|edg)\\/((\\d+)?[\\w\\.]+)/i // Microsoft Edge\n ], [[NAME, 'Edge'], VERSION], [\n\n /(yabrowser)\\/([\\w\\.]+)/i // Yandex\n ], [[NAME, 'Yandex'], VERSION], [\n\n /(puffin)\\/([\\w\\.]+)/i // Puffin\n ], [[NAME, 'Puffin'], VERSION], [\n\n /(focus)\\/([\\w\\.]+)/i // Firefox Focus\n ], [[NAME, 'Firefox Focus'], VERSION], [\n\n /(opt)\\/([\\w\\.]+)/i // Opera Touch\n ], [[NAME, 'Opera Touch'], VERSION], [\n\n /((?:[\\s\\/])uc?\\s?browser|(?:juc.+)ucweb)[\\/\\s]?([\\w\\.]+)/i // UCBrowser\n ], [[NAME, 'UCBrowser'], VERSION], [\n\n /(comodo_dragon)\\/([\\w\\.]+)/i // Comodo Dragon\n ], [[NAME, /_/g, ' '], VERSION], [\n\n /(windowswechat qbcore)\\/([\\w\\.]+)/i // WeChat Desktop for Windows Built-in Browser\n ], [[NAME, 'WeChat(Win) Desktop'], VERSION], [\n\n /(micromessenger)\\/([\\w\\.]+)/i // WeChat\n ], [[NAME, 'WeChat'], VERSION], [\n\n /(brave)\\/([\\w\\.]+)/i // Brave browser\n ], [[NAME, 'Brave'], VERSION], [\n\n /(qqbrowserlite)\\/([\\w\\.]+)/i // QQBrowserLite\n ], [NAME, VERSION], [\n\n /(QQ)\\/([\\d\\.]+)/i // QQ, aka ShouQ\n ], [NAME, VERSION], [\n\n /m?(qqbrowser)[\\/\\s]?([\\w\\.]+)/i // QQBrowser\n ], [NAME, VERSION], [\n\n /(BIDUBrowser)[\\/\\s]?([\\w\\.]+)/i // Baidu Browser\n ], [NAME, VERSION], [\n\n /(2345Explorer)[\\/\\s]?([\\w\\.]+)/i // 2345 Browser\n ], [NAME, VERSION], [\n\n /(MetaSr)[\\/\\s]?([\\w\\.]+)/i // SouGouBrowser\n ], [NAME], [\n\n /(LBBROWSER)/i // LieBao Browser\n ], [NAME], [\n\n /xiaomi\\/miuibrowser\\/([\\w\\.]+)/i // MIUI Browser\n ], [VERSION, [NAME, 'MIUI Browser']], [\n\n /;fbav\\/([\\w\\.]+);/i // Facebook App for iOS & Android\n ], [VERSION, [NAME, 'Facebook']], [\n\n /safari\\s(line)\\/([\\w\\.]+)/i, // Line App for iOS\n /android.+(line)\\/([\\w\\.]+)\\/iab/i // Line App for Android\n ], [NAME, VERSION], [\n\n /headlesschrome(?:\\/([\\w\\.]+)|\\s)/i // Chrome Headless\n ], [VERSION, [NAME, 'Chrome Headless']], [\n\n /\\swv\\).+(chrome)\\/([\\w\\.]+)/i // Chrome WebView\n ], [[NAME, /(.+)/, '$1 WebView'], VERSION], [\n\n /((?:oculus|samsung)browser)\\/([\\w\\.]+)/i\n ], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser\n\n /android.+version\\/([\\w\\.]+)\\s+(?:mobile\\s?safari|safari)*/i // Android Browser\n ], [VERSION, [NAME, 'Android Browser']], [\n\n /(sailfishbrowser)\\/([\\w\\.]+)/i // Sailfish Browser\n ], [[NAME, 'Sailfish Browser'], VERSION], [\n\n /(chrome|omniweb|arora|[tizenoka]{5}\\s?browser)\\/v?([\\w\\.]+)/i\n // Chrome/OmniWeb/Arora/Tizen/Nokia\n ], [NAME, VERSION], [\n\n /(dolfin)\\/([\\w\\.]+)/i // Dolphin\n ], [[NAME, 'Dolphin'], VERSION], [\n\n /((?:android.+)crmo|crios)\\/([\\w\\.]+)/i // Chrome for Android/iOS\n ], [[NAME, 'Chrome'], VERSION], [\n\n /(coast)\\/([\\w\\.]+)/i // Opera Coast\n ], [[NAME, 'Opera Coast'], VERSION], [\n\n /fxios\\/([\\w\\.-]+)/i // Firefox for iOS\n ], [VERSION, [NAME, 'Firefox']], [\n\n /version\\/([\\w\\.]+).+?mobile\\/\\w+\\s(safari)/i // Mobile Safari\n ], [VERSION, [NAME, 'Mobile Safari']], [\n\n /version\\/([\\w\\.]+).+?(mobile\\s?safari|safari)/i // Safari & Safari Mobile\n ], [VERSION, NAME], [\n\n /webkit.+?(gsa)\\/([\\w\\.]+).+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Google Search Appliance on iOS\n ], [[NAME, 'GSA'], VERSION], [\n\n /webkit.+?(mobile\\s?safari|safari)(\\/[\\w\\.]+)/i // Safari < 3.0\n ], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [\n\n /(webkit|khtml)\\/([\\w\\.]+)/i\n ], [NAME, VERSION], [\n\n // Gecko based\n /(navigator|netscape)\\/([\\w\\.-]+)/i // Netscape\n ], [[NAME, 'Netscape'], VERSION], [\n /(swiftfox)/i, // Swiftfox\n /(icedragon|iceweasel|camino|chimera|fennec|maemo\\sbrowser|minimo|conkeror)[\\/\\s]?([\\w\\.\\+]+)/i,\n // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror\n /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([\\w\\.-]+)$/i,\n\n // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix\n /(mozilla)\\/([\\w\\.]+).+rv\\:.+gecko\\/\\d+/i, // Mozilla\n\n // Other\n /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\\/\\s]?([\\w\\.]+)/i,\n // Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Sleipnir\n /(links)\\s\\(([\\w\\.]+)/i, // Links\n /(gobrowser)\\/?([\\w\\.]*)/i, // GoBrowser\n /(ice\\s?browser)\\/v?([\\w\\._]+)/i, // ICE Browser\n /(mosaic)[\\/\\s]([\\w\\.]+)/i // Mosaic\n ], [NAME, VERSION]\n ],\n\n cpu : [[\n\n /(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\\)]/i // AMD64\n ], [[ARCHITECTURE, 'amd64']], [\n\n /(ia32(?=;))/i // IA32 (quicktime)\n ], [[ARCHITECTURE, util.lowerize]], [\n\n /((?:i[346]|x)86)[;\\)]/i // IA32\n ], [[ARCHITECTURE, 'ia32']], [\n\n // PocketPC mistakenly identified as PowerPC\n /windows\\s(ce|mobile);\\sppc;/i\n ], [[ARCHITECTURE, 'arm']], [\n\n /((?:ppc|powerpc)(?:64)?)(?:\\smac|;|\\))/i // PowerPC\n ], [[ARCHITECTURE, /ower/, '', util.lowerize]], [\n\n /(sun4\\w)[;\\)]/i // SPARC\n ], [[ARCHITECTURE, 'sparc']], [\n\n /((?:avr32|ia64(?=;))|68k(?=\\))|arm(?:64|(?=v\\d+[;l]))|(?=atmel\\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i\n // IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC\n ], [[ARCHITECTURE, util.lowerize]]\n ],\n\n device : [[\n\n /\\((ipad|playbook);[\\w\\s\\),;-]+(rim|apple)/i // iPad/PlayBook\n ], [MODEL, VENDOR, [TYPE, TABLET]], [\n\n /applecoremedia\\/[\\w\\.]+ \\((ipad)/ // iPad\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [\n\n /(apple\\s{0,1}tv)/i // Apple TV\n ], [[MODEL, 'Apple TV'], [VENDOR, 'Apple']], [\n\n /(archos)\\s(gamepad2?)/i, // Archos\n /(hp).+(touchpad)/i, // HP TouchPad\n /(hp).+(tablet)/i, // HP Tablet\n /(kindle)\\/([\\w\\.]+)/i, // Kindle\n /\\s(nook)[\\w\\s]+build\\/(\\w+)/i, // Nook\n /(dell)\\s(strea[kpr\\s\\d]*[\\dko])/i // Dell Streak\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /(kf[A-z]+)\\sbuild\\/.+silk\\//i // Kindle Fire HD\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n /(sd|kf)[0349hijorstuw]+\\sbuild\\/.+silk\\//i // Fire Phone\n ], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [\n /android.+aft([bms])\\sbuild/i // Fire TV\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, SMARTTV]], [\n\n /\\((ip[honed|\\s\\w*]+);.+(apple)/i // iPod/iPhone\n ], [MODEL, VENDOR, [TYPE, MOBILE]], [\n /\\((ip[honed|\\s\\w*]+);/i // iPod/iPhone\n ], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [\n\n /(blackberry)[\\s-]?(\\w+)/i, // BlackBerry\n /(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\\s_-]?([\\w-]*)/i,\n // BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron\n /(hp)\\s([\\w\\s]+\\w)/i, // HP iPAQ\n /(asus)-?(\\w+)/i // Asus\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n /\\(bb10;\\s(\\w+)/i // BlackBerry 10\n ], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [\n // Asus Tablets\n /android.+(transfo[prime\\s]{4,10}\\s\\w+|eeepc|slider\\s\\w+|nexus 7|padfone|p00c)/i\n ], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [\n\n /(sony)\\s(tablet\\s[ps])\\sbuild\\//i, // Sony\n /(sony)?(?:sgp.+)\\sbuild\\//i\n ], [[VENDOR, 'Sony'], [MODEL, 'Xperia Tablet'], [TYPE, TABLET]], [\n /android.+\\s([c-g]\\d{4}|so[-l]\\w+)(?=\\sbuild\\/|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [\n\n /\\s(ouya)\\s/i, // Ouya\n /(nintendo)\\s([wids3u]+)/i // Nintendo\n ], [VENDOR, MODEL, [TYPE, CONSOLE]], [\n\n /android.+;\\s(shield)\\sbuild/i // Nvidia\n ], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [\n\n /(playstation\\s[34portablevi]+)/i // Playstation\n ], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [\n\n /(sprint\\s(\\w+))/i // Sprint Phones\n ], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [\n\n /(htc)[;_\\s-]+([\\w\\s]+(?=\\)|\\sbuild)|\\w+)/i, // HTC\n /(zte)-(\\w*)/i, // ZTE\n /(alcatel|geeksphone|nexian|panasonic|(?=;\\s)sony)[_\\s-]?([\\w-]*)/i\n // Alcatel/GeeksPhone/Nexian/Panasonic/Sony\n ], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [\n\n /(nexus\\s9)/i // HTC Nexus 9\n ], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [\n\n /d\\/huawei([\\w\\s-]+)[;\\)]/i,\n /(nexus\\s6p)/i // Huawei\n ], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [\n\n /(microsoft);\\s(lumia[\\s\\w]+)/i // Microsoft Lumia\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /[\\s\\(;](xbox(?:\\sone)?)[\\s\\);]/i // Microsoft Xbox\n ], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [\n /(kin\\.[onetw]{3})/i // Microsoft Kin\n ], [[MODEL, /\\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [\n\n // Motorola\n /\\s(milestone|droid(?:[2-4x]|\\s(?:bionic|x2|pro|razr))?:?(\\s4g)?)[\\w\\s]+build\\//i,\n /mot[\\s-]?(\\w*)/i,\n /(XT\\d{3,4}) build\\//i,\n /(nexus\\s6)/i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [\n /android.+\\s(mz60\\d|xoom[\\s2]{0,2})\\sbuild\\//i\n ], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [\n\n /hbbtv\\/\\d+\\.\\d+\\.\\d+\\s+\\([\\w\\s]*;\\s*(\\w[^;]*);([^;]*)/i // HbbTV devices\n ], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [\n\n /hbbtv.+maple;(\\d+)/i\n ], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [\n\n /\\(dtv[\\);].+(aquos)/i // Sharp\n ], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [\n\n /android.+((sch-i[89]0\\d|shw-m380s|gt-p\\d{4}|gt-n\\d+|sgh-t8[56]9|nexus 10))/i,\n /((SM-T\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung\n /smart-tv.+(samsung)/i\n ], [VENDOR, [TYPE, SMARTTV], MODEL], [\n /((s[cgp]h-\\w+|gt-\\w+|galaxy\\snexus|sm-\\w[\\w\\d]+))/i,\n /(sam[sung]*)[\\s-]*(\\w+-?[\\w-]*)/i,\n /sec-((sgh\\w+))/i\n ], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [\n\n /sie-(\\w*)/i // Siemens\n ], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [\n\n /(maemo|nokia).*(n900|lumia\\s\\d+)/i, // Nokia\n /(nokia)[\\s_-]?([\\w-]*)/i\n ], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [\n\n /android[x\\d\\.\\s;]+\\s([ab][1-7]\\-?[0178a]\\d\\d?)/i // Acer\n ], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [\n\n /android.+([vl]k\\-?\\d{3})\\s+build/i // LG Tablet\n ], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [\n /android\\s3\\.[\\s\\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet\n ], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [\n /(lg) netcast\\.tv/i // LG SmartTV\n ], [VENDOR, MODEL, [TYPE, SMARTTV]], [\n /(nexus\\s[45])/i, // LG\n /lg[e;\\s\\/-]+(\\w*)/i,\n /android.+lg(\\-?[\\d\\w]+)\\s+build/i\n ], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [\n\n /(lenovo)\\s?(s(?:5000|6000)(?:[\\w-]+)|tab(?:[\\s\\w]+))/i // Lenovo tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n /android.+(ideatab[a-z0-9\\-\\s]+)/i // Lenovo\n ], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [\n /(lenovo)[_\\s-]?([\\w-]+)/i\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /linux;.+((jolla));/i // Jolla\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /((pebble))app\\/[\\d\\.]+\\s/i // Pebble\n ], [VENDOR, MODEL, [TYPE, WEARABLE]], [\n\n /android.+;\\s(oppo)\\s?([\\w\\s]+)\\sbuild/i // OPPO\n ], [VENDOR, MODEL, [TYPE, MOBILE]], [\n\n /crkey/i // Google Chromecast\n ], [[MODEL, 'Chromecast'], [VENDOR, 'Google']], [\n\n /android.+;\\s(glass)\\s\\d/i // Google Glass\n ], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [\n\n /android.+;\\s(pixel c)[\\s)]/i // Google Pixel C\n ], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [\n\n /android.+;\\s(pixel( [23])?( xl)?)[\\s)]/i // Google Pixel\n ], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [\n\n /android.+;\\s(\\w+)\\s+build\\/hm\\1/i, // Xiaomi Hongmi 'numeric' models\n /android.+(hm[\\s\\-_]*note?[\\s_]*(?:\\d\\w)?)\\s+build/i, // Xiaomi Hongmi\n /android.+(mi[\\s\\-_]*(?:a\\d|one|one[\\s_]plus|note lte)?[\\s_]*(?:\\d?\\w?)[\\s_]*(?:plus)?)\\s+build/i, \n // Xiaomi Mi\n /android.+(redmi[\\s\\-_]*(?:note)?(?:[\\s_]*[\\w\\s]+))\\s+build/i // Redmi Phones\n ], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [\n /android.+(mi[\\s\\-_]*(?:pad)(?:[\\s_]*[\\w\\s]+))\\s+build/i // Mi Pad tablets\n ],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [\n /android.+;\\s(m[1-5]\\snote)\\sbuild/i // Meizu\n ], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [\n /(mz)-([\\w-]{2,})/i\n ], [[VENDOR, 'Meizu'], MODEL, [TYPE, MOBILE]], [\n\n /android.+a000(1)\\s+build/i, // OnePlus\n /android.+oneplus\\s(a\\d{4})\\s+build/i\n ], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(RCT[\\d\\w]+)\\s+build/i // RCA Tablets\n ], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [\n\n /android.+[;\\/\\s]+(Venue[\\d\\s]{2,7})\\s+build/i // Dell Venue Tablets\n ], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Q[T|M][\\d\\w]+)\\s+build/i // Verizon Tablet\n ], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(Barnes[&\\s]+Noble\\s+|BN[RT])(V?.*)\\s+build/i // Barnes & Noble Tablet\n ], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s+(TM\\d{3}.*\\b)\\s+build/i // Barnes & Noble Tablet\n ], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [\n\n /android.+;\\s(k88)\\sbuild/i // ZTE K Series Tablet\n ], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(gen\\d{3})\\s+build.*49h/i // Swiss GEN Mobile\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [\n\n /android.+[;\\/]\\s*(zur\\d{3})\\s+build/i // Swiss ZUR Tablet\n ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((Zeki)?TB.*\\b)\\s+build/i // Zeki Tablets\n ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [\n\n /(android).+[;\\/]\\s+([YR]\\d{2})\\s+build/i,\n /android.+[;\\/]\\s+(Dragon[\\-\\s]+Touch\\s+|DT)(\\w{5})\\sbuild/i // Dragon Touch Tablet\n ], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(NS-?\\w{0,9})\\sbuild/i // Insignia Tablets\n ], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*((NX|Next)-?\\w{0,9})\\s+build/i // NextBook Tablets\n ], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Xtreme\\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\\s+build/i\n ], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones\n\n /android.+[;\\/]\\s*(LVTEL\\-)?(V1[12])\\s+build/i // LvTel Phones\n ], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [\n\n /android.+;\\s(PH-1)\\s/i\n ], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [ // Essential PH-1\n\n /android.+[;\\/]\\s*(V(100MD|700NA|7011|917G).*\\b)\\s+build/i // Envizen Tablets\n ], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Le[\\s\\-]+Pan)[\\s\\-]+(\\w{1,9})\\s+build/i // Le Pan Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trio[\\s\\-]*.*)\\s+build/i // MachSpeed Tablets\n ], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*(Trinity)[\\-\\s]*(T\\d{3})\\s+build/i // Trinity Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /android.+[;\\/]\\s*TU_(1491)\\s+build/i // Rotor Tablets\n ], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [\n\n /android.+(KS(.+))\\s+build/i // Amazon Kindle Tablets\n ], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [\n\n /android.+(Gigaset)[\\s\\-]+(Q\\w{1,9})\\s+build/i // Gigaset Tablets\n ], [VENDOR, MODEL, [TYPE, TABLET]], [\n\n /\\s(tablet|tab)[;\\/]/i, // Unidentifiable Tablet\n /\\s(mobile)(?:[;\\/]|\\ssafari)/i // Unidentifiable Mobile\n ], [[TYPE, util.lowerize], VENDOR, MODEL], [\n\n /[\\s\\/\\(](smart-?tv)[;\\)]/i // SmartTV\n ], [[TYPE, SMARTTV]], [\n\n /(android[\\w\\.\\s\\-]{0,9});.+build/i // Generic Android Device\n ], [MODEL, [VENDOR, 'Generic']]\n ],\n\n engine : [[\n\n /windows.+\\sedge\\/([\\w\\.]+)/i // EdgeHTML\n ], [VERSION, [NAME, 'EdgeHTML']], [\n\n /webkit\\/537\\.36.+chrome\\/(?!27)/i // Blink\n ], [[NAME, 'Blink']], [\n\n /(presto)\\/([\\w\\.]+)/i, // Presto\n /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i, \n // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m/Goanna\n /(khtml|tasman|links)[\\/\\s]\\(?([\\w\\.]+)/i, // KHTML/Tasman/Links\n /(icab)[\\/\\s]([23]\\.[\\d\\.]+)/i // iCab\n ], [NAME, VERSION], [\n\n /rv\\:([\\w\\.]{1,9}).+(gecko)/i // Gecko\n ], [VERSION, NAME]\n ],\n\n os : [[\n\n // Windows based\n /microsoft\\s(windows)\\s(vista|xp)/i // Windows (iTunes)\n ], [NAME, VERSION], [\n /(windows)\\snt\\s6\\.2;\\s(arm)/i, // Windows RT\n /(windows\\sphone(?:\\sos)*)[\\s\\/]?([\\d\\.\\s\\w]*)/i, // Windows Phone\n /(windows\\smobile|windows)[\\s\\/]?([ntce\\d\\.\\s]+\\w)/i\n ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [\n /(win(?=3|9|n)|win\\s9x\\s)([nt\\d\\.]+)/i\n ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [\n\n // Mobile/Embedded OS\n /\\((bb)(10);/i // BlackBerry 10\n ], [[NAME, 'BlackBerry'], VERSION], [\n /(blackberry)\\w*\\/?([\\w\\.]*)/i, // Blackberry\n /(tizen)[\\/\\s]([\\w\\.]+)/i, // Tizen\n /(android|webos|palm\\sos|qnx|bada|rim\\stablet\\sos|meego|sailfish|contiki)[\\/\\s-]?([\\w\\.]*)/i\n // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki/Sailfish OS\n ], [NAME, VERSION], [\n /(symbian\\s?os|symbos|s60(?=;))[\\/\\s-]?([\\w\\.]*)/i // Symbian\n ], [[NAME, 'Symbian'], VERSION], [\n /\\((series40);/i // Series 40\n ], [NAME], [\n /mozilla.+\\(mobile;.+gecko.+firefox/i // Firefox OS\n ], [[NAME, 'Firefox OS'], VERSION], [\n\n // Console\n /(nintendo|playstation)\\s([wids34portablevu]+)/i, // Nintendo/Playstation\n\n // GNU/Linux based\n /(mint)[\\/\\s\\(]?(\\w*)/i, // Mint\n /(mageia|vectorlinux)[;\\s]/i, // Mageia/VectorLinux\n /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\\/\\s-]?(?!chrom)([\\w\\.-]*)/i,\n // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware\n // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus\n /(hurd|linux)\\s?([\\w\\.]*)/i, // Hurd/Linux\n /(gnu)\\s?([\\w\\.]*)/i // GNU\n ], [NAME, VERSION], [\n\n /(cros)\\s[\\w]+\\s([\\w\\.]+\\w)/i // Chromium OS\n ], [[NAME, 'Chromium OS'], VERSION],[\n\n // Solaris\n /(sunos)\\s?([\\w\\.\\d]*)/i // Solaris\n ], [[NAME, 'Solaris'], VERSION], [\n\n // BSD based\n /\\s([frentopc-]{0,4}bsd|dragonfly)\\s?([\\w\\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly\n ], [NAME, VERSION],[\n\n /(haiku)\\s(\\w+)/i // Haiku\n ], [NAME, VERSION],[\n\n /cfnetwork\\/.+darwin/i,\n /ip[honead]{2,4}(?:.*os\\s([\\w]+)\\slike\\smac|;\\sopera)/i // iOS\n ], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [\n\n /(mac\\sos\\sx)\\s?([\\w\\s\\.]*)/i,\n /(macintosh|mac(?=_powerpc)\\s)/i // Mac OS\n ], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [\n\n // Other\n /((?:open)?solaris)[\\/\\s-]?([\\w\\.]*)/i, // Solaris\n /(aix)\\s((\\d)(?=\\.|\\)|\\s)[\\w\\.])*/i, // AIX\n /(plan\\s9|minix|beos|os\\/2|amigaos|morphos|risc\\sos|openvms|fuchsia)/i,\n // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS/OpenVMS/Fuchsia\n /(unix)\\s?([\\w\\.]*)/i // UNIX\n ], [NAME, VERSION]\n ]\n };\n\n\n /////////////////\n // Constructor\n ////////////////\n var UAParser = function (uastring, extensions) {\n\n if (typeof uastring === 'object') {\n extensions = uastring;\n uastring = undefined;\n }\n\n if (!(this instanceof UAParser)) {\n return new UAParser(uastring, extensions).getResult();\n }\n\n var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY);\n var rgxmap = extensions ? util.extend(regexes, extensions) : regexes;\n\n this.getBrowser = function () {\n var browser = { name: undefined, version: undefined };\n mapper.rgx.call(browser, ua, rgxmap.browser);\n browser.major = util.major(browser.version); // deprecated\n return browser;\n };\n this.getCPU = function () {\n var cpu = { architecture: undefined };\n mapper.rgx.call(cpu, ua, rgxmap.cpu);\n return cpu;\n };\n this.getDevice = function () {\n var device = { vendor: undefined, model: undefined, type: undefined };\n mapper.rgx.call(device, ua, rgxmap.device);\n return device;\n };\n this.getEngine = function () {\n var engine = { name: undefined, version: undefined };\n mapper.rgx.call(engine, ua, rgxmap.engine);\n return engine;\n };\n this.getOS = function () {\n var os = { name: undefined, version: undefined };\n mapper.rgx.call(os, ua, rgxmap.os);\n return os;\n };\n this.getResult = function () {\n return {\n ua : this.getUA(),\n browser : this.getBrowser(),\n engine : this.getEngine(),\n os : this.getOS(),\n device : this.getDevice(),\n cpu : this.getCPU()\n };\n };\n this.getUA = function () {\n return ua;\n };\n this.setUA = function (uastring) {\n ua = uastring;\n return this;\n };\n return this;\n };\n\n UAParser.VERSION = LIBVERSION;\n UAParser.BROWSER = {\n NAME : NAME,\n MAJOR : MAJOR, // deprecated\n VERSION : VERSION\n };\n UAParser.CPU = {\n ARCHITECTURE : ARCHITECTURE\n };\n UAParser.DEVICE = {\n MODEL : MODEL,\n VENDOR : VENDOR,\n TYPE : TYPE,\n CONSOLE : CONSOLE,\n MOBILE : MOBILE,\n SMARTTV : SMARTTV,\n TABLET : TABLET,\n WEARABLE: WEARABLE,\n EMBEDDED: EMBEDDED\n };\n UAParser.ENGINE = {\n NAME : NAME,\n VERSION : VERSION\n };\n UAParser.OS = {\n NAME : NAME,\n VERSION : VERSION\n };\n\n ///////////\n // Export\n //////////\n\n\n // check js environment\n if (typeof(exports) !== UNDEF_TYPE) {\n // nodejs env\n if (typeof module !== UNDEF_TYPE && module.exports) {\n exports = module.exports = UAParser;\n }\n exports.UAParser = UAParser;\n } else {\n // requirejs env (optional)\n if (typeof(define) === 'function' && define.amd) {\n define(function () {\n return UAParser;\n });\n } else if (window) {\n // browser env\n window.UAParser = UAParser;\n }\n }\n\n // jQuery/Zepto specific (optional)\n // Note:\n // In AMD env the global scope should be kept clean, but jQuery is an exception.\n // jQuery always exports to global scope, unless jQuery.noConflict(true) is used,\n // and we should catch that.\n var $ = window && (window.jQuery || window.Zepto);\n if (typeof $ !== UNDEF_TYPE && !$.ua) {\n var parser = new UAParser();\n $.ua = parser.getResult();\n $.ua.get = function () {\n return parser.getUA();\n };\n $.ua.set = function (uastring) {\n parser.setUA(uastring);\n var result = parser.getResult();\n for (var prop in result) {\n $.ua[prop] = result[prop];\n }\n };\n }\n\n})(typeof window === 'object' ? window : this);\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"fullscreen-modal-header__visuallyhidden--6gpNM\",\"focusable\":\"fullscreen-modal-header__focusable--1euLu\",\"header\":\"fullscreen-modal-header__header--2Efry\",\"info\":\"fullscreen-modal-header__info--hniNk\",\"close-button\":\"fullscreen-modal-header__close-button--26v9W\",\"closeButton\":\"fullscreen-modal-header__close-button--26v9W\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"object-fit-image\":\"image__object-fit-image--2pklj\",\"objectFitImage\":\"image__object-fit-image--2pklj\",\"fallback\":\"image__fallback--3tkrX\",\"cover\":\"image__cover--3j6Up\",\"contain\":\"image__contain--1LM9e\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"info-text__visuallyhidden--3gRGb\",\"focusable\":\"info-text__focusable--2UtBC\",\"info-text-trigger\":\"info-text__info-text-trigger--2_cEW\",\"infoTextTrigger\":\"info-text__info-text-trigger--2_cEW\",\"tooltip-arrow\":\"info-text__tooltip-arrow--2TgFe\",\"tooltipArrow\":\"info-text__tooltip-arrow--2TgFe\",\"info-text\":\"info-text__info-text--3wlmI\",\"infoText\":\"info-text__info-text--3wlmI\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-expander__visuallyhidden--2MSGY\",\"focusable\":\"select-expander__focusable--3OFPj\",\"select-expander\":\"select-expander__select-expander--rh7qm\",\"selectExpander\":\"select-expander__select-expander--rh7qm\",\"collapse-container\":\"select-expander__collapse-container--2tTqw\",\"collapseContainer\":\"select-expander__collapse-container--2tTqw\",\"expander\":\"select-expander__expander--2-T70\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"add-button__visuallyhidden--2R_pn\",\"focusable\":\"add-button__focusable--2YjZP\",\"add-button\":\"add-button__add-button--o3Izz\",\"addButton\":\"add-button__add-button--o3Izz\",\"icon-style\":\"add-button__icon-style--2M59-\",\"iconStyle\":\"add-button__icon-style--2M59-\",\"add-button-text\":\"add-button__add-button-text--2mdPv\",\"addButtonText\":\"add-button__add-button-text--2mdPv\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-input__visuallyhidden--3bkxj\",\"focusable\":\"select-input__focusable--24ZaR\",\"has-selected-options-style\":\"select-input__has-selected-options-style--134sI\",\"hasSelectedOptionsStyle\":\"select-input__has-selected-options-style--134sI\",\"read-only-style\":\"select-input__read-only-style--1Q6BU\",\"readOnlyStyle\":\"select-input__read-only-style--1Q6BU\",\"textarea\":\"select-input__textarea--2tDTr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"modal-wrapper__visuallyhidden--2ZI34\",\"focusable\":\"modal-wrapper__focusable--20NCr\",\"modal-background\":\"modal-wrapper__modal-background--3xK7e\",\"modalBackground\":\"modal-wrapper__modal-background--3xK7e\",\"modal-wrapper\":\"modal-wrapper__modal-wrapper--3w_fK\",\"modalWrapper\":\"modal-wrapper__modal-wrapper--3w_fK\",\"modal-footer\":\"modal-wrapper__modal-footer--1-tG_\",\"modalFooter\":\"modal-wrapper__modal-footer--1-tG_\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"expandable__visuallyhidden--288Yf\",\"focusable\":\"expandable__focusable--3Grry\",\"expandable-link\":\"expandable__expandable-link--1tuD8\",\"expandableLink\":\"expandable__expandable-link--1tuD8\",\"useMargins\":\"expandable__useMargins--3yHfa\",\"no-text\":\"expandable__no-text--1JyOg\",\"noText\":\"expandable__no-text--1JyOg\",\"material-icons\":\"expandable__material-icons--3Rqv6\",\"materialIcons\":\"expandable__material-icons--3Rqv6\"};","module.exports = (__webpack_require__(49))(622);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"fluid-panel__visuallyhidden--2dmg0\",\"focusable\":\"fluid-panel__focusable--3rfBd\",\"fluid-panel\":\"fluid-panel__fluid-panel--W6G1G\",\"fluidPanel\":\"fluid-panel__fluid-panel--W6G1G\",\"ui-bold\":\"fluid-panel__ui-bold--QsSvp\",\"uiBold\":\"fluid-panel__ui-bold--QsSvp\",\"with-delimiter\":\"fluid-panel__with-delimiter--1qIY1\",\"withDelimiter\":\"fluid-panel__with-delimiter--1qIY1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-child-values__visuallyhidden--39ubi\",\"focusable\":\"display-child-values__focusable--153F-\",\"separated-values\":\"display-child-values__separated-values--1xOk-\",\"separatedValues\":\"display-child-values__separated-values--1xOk-\",\"item\":\"display-child-values__item--yI83A\",\"wrapper\":\"display-child-values__wrapper--3ff_X\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"password__visuallyhidden--jUPS9\",\"focusable\":\"password__focusable--LRI8C\",\"wrapper\":\"password__wrapper--3J4Bl\",\"eye-icon\":\"password__eye-icon--1PWGO\",\"eyeIcon\":\"password__eye-icon--1PWGO\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-numeric-header__visuallyhidden--2dcFJ\",\"focusable\":\"display-numeric-header__focusable--25-Y4\",\"numericHeader\":\"display-numeric-header__numericHeader--Fjn8r\",\"label\":\"display-numeric-header__label--mfWv7\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"icon-list__visuallyhidden--2CXgt\",\"focusable\":\"icon-list__focusable--3KqRl\",\"label\":\"icon-list__label--1ae9c\",\"iconlist-wrapper\":\"icon-list__iconlist-wrapper--2PQYx\",\"iconlistWrapper\":\"icon-list__iconlist-wrapper--2PQYx\",\"tooltip-overwrite\":\"icon-list__tooltip-overwrite--351QH\",\"tooltipOverwrite\":\"icon-list__tooltip-overwrite--351QH\",\"has-one-item\":\"icon-list__has-one-item--1DO8X\",\"hasOneItem\":\"icon-list__has-one-item--1DO8X\",\"has-two-items\":\"icon-list__has-two-items--2DJZf\",\"hasTwoItems\":\"icon-list__has-two-items--2DJZf\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"toggle-button__visuallyhidden--2hkg5\",\"focusable\":\"toggle-button__focusable--1q1go\",\"toggle-wrapper\":\"toggle-button__toggle-wrapper--3LvZR\",\"toggleWrapper\":\"toggle-button__toggle-wrapper--3LvZR\",\"signed\":\"toggle-button__signed--fxHnH\",\"validation-error\":\"toggle-button__validation-error--1Mwya\",\"validationError\":\"toggle-button__validation-error--1Mwya\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"info\":\"notify-user__info--upao-\",\"body\":\"notify-user__body--KhUlU\",\"progress\":\"notify-user__progress--gAMqj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"section-pager__visuallyhidden--17VDW\",\"focusable\":\"section-pager__focusable--1Cy1v\",\"section-pager\":\"section-pager__section-pager--4uiGl\",\"sectionPager\":\"section-pager__section-pager--4uiGl\",\"previous\":\"section-pager__previous--amqL-\",\"next\":\"section-pager__next--1re97\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"document-item-from-multiselect__visuallyhidden--3ufRk\",\"focusable\":\"document-item-from-multiselect__focusable--1af7-\",\"document-item-from-multi-select\":\"document-item-from-multiselect__document-item-from-multi-select--1cLMr\",\"documentItemFromMultiSelect\":\"document-item-from-multiselect__document-item-from-multi-select--1cLMr\",\"btn-wrapper\":\"document-item-from-multiselect__btn-wrapper--jKgmn\",\"btnWrapper\":\"document-item-from-multiselect__btn-wrapper--jKgmn\",\"select-switch\":\"document-item-from-multiselect__select-switch--15UUe\",\"selectSwitch\":\"document-item-from-multiselect__select-switch--15UUe\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"add-new-case-button__visuallyhidden--1ec9Y\",\"focusable\":\"add-new-case-button__focusable--_WZ6y\",\"button-wrapper\":\"add-new-case-button__button-wrapper--3flVO\",\"buttonWrapper\":\"add-new-case-button__button-wrapper--3flVO\",\"validation-error\":\"add-new-case-button__validation-error--21TFF\",\"validationError\":\"add-new-case-button__validation-error--21TFF\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"case-header-panel__visuallyhidden--2D4T3\",\"focusable\":\"case-header-panel__focusable--RR3Df\",\"header-wrapper\":\"case-header-panel__header-wrapper--1-RW_\",\"headerWrapper\":\"case-header-panel__header-wrapper--1-RW_\",\"header-panel\":\"case-header-panel__header-panel--M1Qvr\",\"headerPanel\":\"case-header-panel__header-panel--M1Qvr\",\"edit-status\":\"case-header-panel__edit-status--K4ncn\",\"editStatus\":\"case-header-panel__edit-status--K4ncn\",\"validation\":\"case-header-panel__validation--1TCRN\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"log-link-button__visuallyhidden--21gk8\",\"focusable\":\"log-link-button__focusable--cKIW1\",\"log-link-button-wrapper\":\"log-link-button__log-link-button-wrapper--ZGk1E\",\"logLinkButtonWrapper\":\"log-link-button__log-link-button-wrapper--ZGk1E\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"log-view__visuallyhidden--2iaTQ\",\"focusable\":\"log-view__focusable--1xms7\",\"log-view\":\"log-view__log-view--2L8pa\",\"logView\":\"log-view__log-view--2L8pa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"copy-link__visuallyhidden--1CIqe\",\"focusable\":\"copy-link__focusable--3pknV\",\"box\":\"copy-link__box--EBcOt\",\"link\":\"copy-link__link--1JkuU\",\"input\":\"copy-link__input--3pCWe\",\"button\":\"copy-link__button--16lYh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"case-listing-tile__visuallyhidden--3Wm_P\",\"focusable\":\"case-listing-tile__focusable--2BL8P\",\"caseListingTile\":\"case-listing-tile__caseListingTile--3QM60\",\"left\":\"case-listing-tile__left--1Snl7\",\"right\":\"case-listing-tile__right--2nQch\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"search-layout__visuallyhidden--1Zmg1\",\"focusable\":\"search-layout__focusable--2N5Cw\",\"search-header\":\"search-layout__search-header--3yOPU\",\"searchHeader\":\"search-layout__search-header--3yOPU\",\"search-field\":\"search-layout__search-field--2o9my\",\"searchField\":\"search-layout__search-field--2o9my\",\"search-toolbar\":\"search-layout__search-toolbar--2Y4BC\",\"searchToolbar\":\"search-layout__search-toolbar--2Y4BC\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"visible-for-fields__visuallyhidden--3a2Lb\",\"focusable\":\"visible-for-fields__focusable--2az5b\",\"loading\":\"visible-for-fields__loading--1WI8o\",\"loading-text\":\"visible-for-fields__loading-text--3qngO\",\"loadingText\":\"visible-for-fields__loading-text--3qngO\",\"spin-loader\":\"visible-for-fields__spin-loader--1I6_W\",\"spinLoader\":\"visible-for-fields__spin-loader--1I6_W\",\"spin\":\"visible-for-fields__spin--2rq60\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"role__visuallyhidden--3Yvj4\",\"focusable\":\"role__focusable--3Gz9J\",\"action-title\":\"role__action-title--BQZmH\",\"actionTitle\":\"role__action-title--BQZmH\",\"info\":\"role__info--2s0A6\",\"id\":\"role__id--3UKHT\",\"title\":\"role__title--1IXmp\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-item-loader__visuallyhidden--2kRXw\",\"focusable\":\"codetable-item-loader__focusable--3_g24\",\"loader-text\":\"codetable-item-loader__loader-text--1y-Pu\",\"loaderText\":\"codetable-item-loader__loader-text--1y-Pu\",\"spin-loader\":\"codetable-item-loader__spin-loader--2Hnku\",\"spinLoader\":\"codetable-item-loader__spin-loader--2Hnku\",\"spin\":\"codetable-item-loader__spin--1JVJg\",\"zebra\":\"codetable-item-loader__zebra--32sLR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-item-row__visuallyhidden--yNMUF\",\"focusable\":\"codetable-item-row__focusable--2tiZH\",\"code-row\":\"codetable-item-row__code-row--2qsIG\",\"codeRow\":\"codetable-item-row__code-row--2qsIG\",\"is-loader\":\"codetable-item-row__is-loader--3xOoM\",\"isLoader\":\"codetable-item-row__is-loader--3xOoM\",\"zebra\":\"codetable-item-row__zebra--MERQ_\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-search__visuallyhidden--3gt_0\",\"focusable\":\"codetable-search__focusable--2sJ7i\",\"search-section\":\"codetable-search__search-section--1TfX0\",\"searchSection\":\"codetable-search__search-section--1TfX0\",\"search-field\":\"codetable-search__search-field--12CMz\",\"searchField\":\"codetable-search__search-field--12CMz\",\"search-toolbar\":\"codetable-search__search-toolbar--EX39e\",\"searchToolbar\":\"codetable-search__search-toolbar--EX39e\"};","module.exports = (__webpack_require__(49))(420);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"list-view-code-selector__visuallyhidden--1E78S\",\"focusable\":\"list-view-code-selector__focusable--KGMib\",\"title-container\":\"list-view-code-selector__title-container--2JVgp\",\"titleContainer\":\"list-view-code-selector__title-container--2JVgp\",\"title-text\":\"list-view-code-selector__title-text--OY7f9\",\"titleText\":\"list-view-code-selector__title-text--OY7f9\"};","module.exports = (__webpack_require__(49))(22);","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.4',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","exports.f = Object.getOwnPropertySymbols;\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","var anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","var hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + ++id, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n","'use strict';\nvar collection = require('../internals/collection');\nvar collectionStrong = require('../internals/collection-strong');\n\n// `Set` constructor\n// https://tc39.github.io/ecma262/#sec-set-objects\nmodule.exports = collection('Set', function (init) {\n return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };\n}, collectionStrong);\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar collectionAddAll = require('../internals/collection-add-all');\n\n// `Set.prototype.addAll` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n addAll: function addAll(/* ...elements */) {\n return collectionAddAll.apply(this, arguments);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar collectionDeleteAll = require('../internals/collection-delete-all');\n\n// `Set.prototype.deleteAll` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n deleteAll: function deleteAll(/* ...elements */) {\n return collectionDeleteAll.apply(this, arguments);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar speciesConstructor = require('../internals/species-constructor');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.difference` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n difference: function difference(iterable) {\n var set = anObject(this);\n var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set);\n var remover = aFunction(newSet['delete']);\n iterate(iterable, function (value) {\n remover.call(newSet, value);\n });\n return newSet;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar bind = require('../internals/function-bind-context');\nvar getSetIterator = require('../internals/get-set-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.every` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n every: function every(callbackfn /* , thisArg */) {\n var set = anObject(this);\n var iterator = getSetIterator(set);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n return !iterate(iterator, function (value) {\n if (!boundFunction(value, value, set)) return iterate.stop();\n }, undefined, false, true).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar bind = require('../internals/function-bind-context');\nvar speciesConstructor = require('../internals/species-constructor');\nvar getSetIterator = require('../internals/get-set-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.filter` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n filter: function filter(callbackfn /* , thisArg */) {\n var set = anObject(this);\n var iterator = getSetIterator(set);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var newSet = new (speciesConstructor(set, getBuiltIn('Set')))();\n var adder = aFunction(newSet.add);\n iterate(iterator, function (value) {\n if (boundFunction(value, value, set)) adder.call(newSet, value);\n }, undefined, false, true);\n return newSet;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar bind = require('../internals/function-bind-context');\nvar getSetIterator = require('../internals/get-set-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.find` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n find: function find(callbackfn /* , thisArg */) {\n var set = anObject(this);\n var iterator = getSetIterator(set);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n return iterate(iterator, function (value) {\n if (boundFunction(value, value, set)) return iterate.stop(value);\n }, undefined, false, true).result;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar speciesConstructor = require('../internals/species-constructor');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.intersection` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n intersection: function intersection(iterable) {\n var set = anObject(this);\n var newSet = new (speciesConstructor(set, getBuiltIn('Set')))();\n var hasCheck = aFunction(set.has);\n var adder = aFunction(newSet.add);\n iterate(iterable, function (value) {\n if (hasCheck.call(set, value)) adder.call(newSet, value);\n });\n return newSet;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.isDisjointFrom` method\n// https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n isDisjointFrom: function isDisjointFrom(iterable) {\n var set = anObject(this);\n var hasCheck = aFunction(set.has);\n return !iterate(iterable, function (value) {\n if (hasCheck.call(set, value) === true) return iterate.stop();\n }).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar getIterator = require('../internals/get-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.isSubsetOf` method\n// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n isSubsetOf: function isSubsetOf(iterable) {\n var iterator = getIterator(this);\n var otherSet = anObject(iterable);\n var hasCheck = otherSet.has;\n if (typeof hasCheck != 'function') {\n otherSet = new (getBuiltIn('Set'))(iterable);\n hasCheck = aFunction(otherSet.has);\n }\n return !iterate(iterator, function (value) {\n if (hasCheck.call(otherSet, value) === false) return iterate.stop();\n }, undefined, false, true).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.isSupersetOf` method\n// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n isSupersetOf: function isSupersetOf(iterable) {\n var set = anObject(this);\n var hasCheck = aFunction(set.has);\n return !iterate(iterable, function (value) {\n if (hasCheck.call(set, value) === false) return iterate.stop();\n }).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar getSetIterator = require('../internals/get-set-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.join` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n join: function join(separator) {\n var set = anObject(this);\n var iterator = getSetIterator(set);\n var sep = separator === undefined ? ',' : String(separator);\n var result = [];\n iterate(iterator, result.push, result, false, true);\n return result.join(sep);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar bind = require('../internals/function-bind-context');\nvar speciesConstructor = require('../internals/species-constructor');\nvar getSetIterator = require('../internals/get-set-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.map` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n map: function map(callbackfn /* , thisArg */) {\n var set = anObject(this);\n var iterator = getSetIterator(set);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var newSet = new (speciesConstructor(set, getBuiltIn('Set')))();\n var adder = aFunction(newSet.add);\n iterate(iterator, function (value) {\n adder.call(newSet, boundFunction(value, value, set));\n }, undefined, false, true);\n return newSet;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar getSetIterator = require('../internals/get-set-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.reduce` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n var set = anObject(this);\n var iterator = getSetIterator(set);\n var noInitial = arguments.length < 2;\n var accumulator = noInitial ? undefined : arguments[1];\n aFunction(callbackfn);\n iterate(iterator, function (value) {\n if (noInitial) {\n noInitial = false;\n accumulator = value;\n } else {\n accumulator = callbackfn(accumulator, value, value, set);\n }\n }, undefined, false, true);\n if (noInitial) throw TypeError('Reduce of empty set with no initial value');\n return accumulator;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar anObject = require('../internals/an-object');\nvar bind = require('../internals/function-bind-context');\nvar getSetIterator = require('../internals/get-set-iterator');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.some` method\n// https://github.com/tc39/proposal-collection-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n some: function some(callbackfn /* , thisArg */) {\n var set = anObject(this);\n var iterator = getSetIterator(set);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n return iterate(iterator, function (value) {\n if (boundFunction(value, value, set)) return iterate.stop();\n }, undefined, false, true).stopped;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar speciesConstructor = require('../internals/species-constructor');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.symmetricDifference` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n symmetricDifference: function symmetricDifference(iterable) {\n var set = anObject(this);\n var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set);\n var remover = aFunction(newSet['delete']);\n var adder = aFunction(newSet.add);\n iterate(iterable, function (value) {\n remover.call(newSet, value) || adder.call(newSet, value);\n });\n return newSet;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar getBuiltIn = require('../internals/get-built-in');\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar speciesConstructor = require('../internals/species-constructor');\nvar iterate = require('../internals/iterate');\n\n// `Set.prototype.union` method\n// https://github.com/tc39/proposal-set-methods\n$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {\n union: function union(iterable) {\n var set = anObject(this);\n var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set);\n iterate(iterable, aFunction(newSet.add), newSet);\n return newSet;\n }\n});\n","module.exports = (__webpack_require__(49))(642);","/*\r\n Highcharts JS v5.0.14 (2017-07-28)\r\n\r\n (c) 2009-2017 Torstein Honsi\r\n\r\n License: www.highcharts.com/license\r\n*/\r\n(function(p){\"object\"===typeof module&&module.exports?module.exports=p:p(Highcharts)})(function(p){(function(b){var h=b.Axis,r=b.Chart,k=b.color,n,d=b.each,w=b.extend,x=b.isNumber,l=b.Legend,g=b.LegendSymbolMixin,q=b.noop,u=b.merge,v=b.pick,t=b.wrap;n=b.ColorAxis=function(){this.init.apply(this,arguments)};w(n.prototype,h.prototype);w(n.prototype,{defaultColorAxisOptions:{lineWidth:0,minPadding:0,maxPadding:0,gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},\r\nwidth:.01,color:\"#999999\"},labels:{overflow:\"justify\",rotation:0},minColor:\"#e6ebf5\",maxColor:\"#003399\",tickLength:5,showInLegend:!0},keepProps:[\"legendGroup\",\"legendItemHeight\",\"legendItemWidth\",\"legendItem\",\"legendSymbol\"].concat(h.prototype.keepProps),init:function(a,c){var e=\"vertical\"!==a.options.legend.layout,f;this.coll=\"colorAxis\";f=u(this.defaultColorAxisOptions,{side:e?2:1,reversed:!e},c,{opposite:!e,showEmpty:!1,title:null});h.prototype.init.call(this,a,f);c.dataClasses&&this.initDataClasses(c);\r\nthis.initStops();this.horiz=e;this.zoomEnabled=!1;this.defaultLegendLength=200},initDataClasses:function(a){var c=this.chart,e,f=0,m=c.options.chart.colorCount,b=this.options,y=a.dataClasses.length;this.dataClasses=e=[];this.legendItems=[];d(a.dataClasses,function(a,d){a=u(a);e.push(a);a.color||(\"category\"===b.dataClassColor?(d=c.options.colors,m=d.length,a.color=d[f],a.colorIndex=f,f++,f===m&&(f=0)):a.color=k(b.minColor).tweenTo(k(b.maxColor),2>y?.5:d/(y-1)))})},setTickPositions:function(){if(!this.dataClasses)return h.prototype.setTickPositions.call(this)},\r\ninitStops:function(){this.stops=this.options.stops||[[0,this.options.minColor],[1,this.options.maxColor]];d(this.stops,function(a){a.color=k(a[1])})},setOptions:function(a){h.prototype.setOptions.call(this,a);this.options.crosshair=this.options.marker},setAxisSize:function(){var a=this.legendSymbol,c=this.chart,e=c.options.legend||{},f,m;a?(this.left=e=a.attr(\"x\"),this.top=f=a.attr(\"y\"),this.width=m=a.attr(\"width\"),this.height=a=a.attr(\"height\"),this.right=c.chartWidth-e-m,this.bottom=c.chartHeight-\r\nf-a,this.len=this.horiz?m:a,this.pos=this.horiz?e:f):this.len=(this.horiz?e.symbolWidth:e.symbolHeight)||this.defaultLegendLength},normalizedValue:function(a){this.isLog&&(a=this.val2lin(a));return 1-(this.max-a)/(this.max-this.min||1)},toColor:function(a,c){var e=this.stops,f,m,b=this.dataClasses,d,g;if(b)for(g=b.length;g--;){if(d=b[g],f=d.from,e=d.to,(void 0===f||a>=f)&&(void 0===e||a<=e)){m=d.color;c&&(c.dataClass=g,c.colorIndex=d.colorIndex);break}}else{a=this.normalizedValue(a);for(g=e.length;g--&&\r\n!(a>e[g][0]););f=e[g]||e[g+1];e=e[g+1]||f;a=1-(e[0]-a)/(e[0]-f[0]||1);m=f.color.tweenTo(e.color,a)}return m},getOffset:function(){var a=this.legendGroup,c=this.chart.axisOffset[this.side];a&&(this.axisParent=a,h.prototype.getOffset.call(this),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=c)},setLegendColor:function(){var a,c=this.reversed;a=c?1:0;c=c?0:1;a=this.horiz?[a,0,c,0]:[0,c,0,a];this.legendColor={linearGradient:{x1:a[0],y1:a[1],x2:a[2],\r\ny2:a[3]},stops:this.stops}},drawLegendSymbol:function(a,c){var e=a.padding,f=a.options,b=this.horiz,d=v(f.symbolWidth,b?this.defaultLegendLength:12),g=v(f.symbolHeight,b?12:this.defaultLegendLength),q=v(f.labelPadding,b?16:30),f=v(f.itemDistance,10);this.setLegendColor();c.legendSymbol=this.chart.renderer.rect(0,a.baseline-11,d,g).attr({zIndex:1}).add(c.legendGroup);this.legendItemWidth=d+e+(b?f:q);this.legendItemHeight=g+e+(b?q:0)},setState:q,visible:!0,setVisible:q,getSeriesExtremes:function(){var a=\r\nthis.series,c=a.length;this.dataMin=Infinity;for(this.dataMax=-Infinity;c--;)void 0!==a[c].valueMin&&(this.dataMin=Math.min(this.dataMin,a[c].valueMin),this.dataMax=Math.max(this.dataMax,a[c].valueMax))},drawCrosshair:function(a,c){var e=c&&c.plotX,b=c&&c.plotY,d,g=this.pos,q=this.len;c&&(d=this.toPixels(c[c.series.colorKey]),d<g?d=g-2:d>g+q&&(d=g+q+2),c.plotX=d,c.plotY=this.len-d,h.prototype.drawCrosshair.call(this,a,c),c.plotX=e,c.plotY=b,this.cross&&(this.cross.addClass(\"highcharts-coloraxis-marker\").add(this.legendGroup),\r\nthis.cross.attr({fill:this.crosshair.color})))},getPlotLinePath:function(a,c,e,b,d){return x(d)?this.horiz?[\"M\",d-4,this.top-6,\"L\",d+4,this.top-6,d,this.top,\"Z\"]:[\"M\",this.left,d,\"L\",this.left-6,d+6,this.left-6,d-6,\"Z\"]:h.prototype.getPlotLinePath.call(this,a,c,e,b)},update:function(a,c){var e=this.chart,b=e.legend;d(this.series,function(a){a.isDirtyData=!0});a.dataClasses&&b.allItems&&(d(b.allItems,function(a){a.isDataClass&&a.legendGroup&&a.legendGroup.destroy()}),e.isDirtyLegend=!0);e.options[this.coll]=\r\nu(this.userOptions,a);h.prototype.update.call(this,a,c);this.legendItem&&(this.setLegendColor(),b.colorizeItem(this,!0))},remove:function(){this.legendItem&&this.chart.legend.destroyItem(this);h.prototype.remove.call(this)},getDataClassLegendSymbols:function(){var a=this,c=this.chart,e=this.legendItems,f=c.options.legend,t=f.valueDecimals,h=f.valueSuffix||\"\",l;e.length||d(this.dataClasses,function(f,u){var m=!0,k=f.from,n=f.to;l=\"\";void 0===k?l=\"\\x3c \":void 0===n&&(l=\"\\x3e \");void 0!==k&&(l+=b.numberFormat(k,\r\nt)+h);void 0!==k&&void 0!==n&&(l+=\" - \");void 0!==n&&(l+=b.numberFormat(n,t)+h);e.push(w({chart:c,name:l,options:{},drawLegendSymbol:g.drawRectangle,visible:!0,setState:q,isDataClass:!0,setVisible:function(){m=this.visible=!m;d(a.series,function(a){d(a.points,function(a){a.dataClass===u&&a.setVisible(m)})});c.legend.colorizeItem(this,m)}},f))});return e},name:\"\"});d([\"fill\",\"stroke\"],function(a){b.Fx.prototype[a+\"Setter\"]=function(){this.elem.attr(a,k(this.start).tweenTo(k(this.end),this.pos),null,\r\n!0)}});t(r.prototype,\"getAxes\",function(a){var c=this.options.colorAxis;a.call(this);this.colorAxis=[];c&&new n(this,c)});t(l.prototype,\"getAllItems\",function(a){var c=[],b=this.chart.colorAxis[0];b&&b.options&&(b.options.showInLegend&&(b.options.dataClasses?c=c.concat(b.getDataClassLegendSymbols()):c.push(b)),d(b.series,function(a){a.options.showInLegend=!1}));return c.concat(a.call(this))});t(l.prototype,\"colorizeItem\",function(a,c,b){a.call(this,c,b);b&&c.legendColor&&c.legendSymbol.attr({fill:c.legendColor})});\r\nt(l.prototype,\"update\",function(a){a.apply(this,[].slice.call(arguments,1));this.chart.colorAxis[0]&&this.chart.colorAxis[0].update({},arguments[2])})})(p);(function(b){var h=b.defined,r=b.each,k=b.noop,n=b.seriesTypes;b.colorPointMixin={isValid:function(){return null!==this.value},setVisible:function(b){var d=this,h=b?\"show\":\"hide\";r([\"graphic\",\"dataLabel\"],function(b){if(d[b])d[b][h]()})},setState:function(d){b.Point.prototype.setState.call(this,d);this.graphic&&this.graphic.attr({zIndex:\"hover\"===\r\nd?1:0})}};b.colorSeriesMixin={pointArrayMap:[\"value\"],axisTypes:[\"xAxis\",\"yAxis\",\"colorAxis\"],optionalAxis:\"colorAxis\",trackerGroups:[\"group\",\"markerGroup\",\"dataLabelsGroup\"],getSymbol:k,parallelArrays:[\"x\",\"y\",\"value\"],colorKey:\"value\",pointAttribs:n.column.prototype.pointAttribs,translateColors:function(){var b=this,h=this.options.nullColor,k=this.colorAxis,l=this.colorKey;r(this.data,function(d){var g=d[l];if(g=d.options.color||(d.isNull?h:k&&void 0!==g?k.toColor(g,d):d.color||b.color))d.color=\r\ng})},colorAttribs:function(b){var d={};h(b.color)&&(d[this.colorProp||\"fill\"]=b.color);return d}}})(p);(function(b){var h=b.colorPointMixin,r=b.each,k=b.merge,n=b.noop,d=b.pick,p=b.Series,x=b.seriesType,l=b.seriesTypes;x(\"heatmap\",\"scatter\",{animation:!1,borderWidth:0,nullColor:\"#f7f7f7\",dataLabels:{formatter:function(){return this.point.value},inside:!0,verticalAlign:\"middle\",crop:!1,overflow:!1,padding:0},marker:null,pointRange:null,tooltip:{pointFormat:\"{point.x}, {point.y}: {point.value}\\x3cbr/\\x3e\"},\r\nstates:{normal:{animation:!0},hover:{halo:!1,brightness:.2}}},k(b.colorSeriesMixin,{pointArrayMap:[\"y\",\"value\"],hasPointSpecificOptions:!0,getExtremesFromAll:!0,directTouch:!0,init:function(){var b;l.scatter.prototype.init.apply(this,arguments);b=this.options;b.pointRange=d(b.pointRange,b.colsize||1);this.yAxis.axisPointRange=b.rowsize||1},translate:function(){var b=this.options,d=this.xAxis,h=this.yAxis,k=function(b,a,c){return Math.min(Math.max(a,b),c)};this.generatePoints();r(this.points,function(g){var a=\r\n(b.colsize||1)/2,c=(b.rowsize||1)/2,e=k(Math.round(d.len-d.translate(g.x-a,0,1,0,1)),-d.len,2*d.len),a=k(Math.round(d.len-d.translate(g.x+a,0,1,0,1)),-d.len,2*d.len),f=k(Math.round(h.translate(g.y-c,0,1,0,1)),-h.len,2*h.len),c=k(Math.round(h.translate(g.y+c,0,1,0,1)),-h.len,2*h.len);g.plotX=g.clientX=(e+a)/2;g.plotY=(f+c)/2;g.shapeType=\"rect\";g.shapeArgs={x:Math.min(e,a),y:Math.min(f,c),width:Math.abs(a-e),height:Math.abs(c-f)}});this.translateColors()},drawPoints:function(){l.column.prototype.drawPoints.call(this);\r\nr(this.points,function(b){b.graphic.attr(this.colorAttribs(b))},this)},animate:n,getBox:n,drawLegendSymbol:b.LegendSymbolMixin.drawRectangle,alignDataLabel:l.column.prototype.alignDataLabel,getExtremes:function(){p.prototype.getExtremes.call(this,this.valueData);this.valueMin=this.dataMin;this.valueMax=this.dataMax;p.prototype.getExtremes.call(this)}}),h)})(p)});\r\n","module.exports = (__webpack_require__(49))(330);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"textarea__visuallyhidden--2VlnP\",\"focusable\":\"textarea__focusable--3ea1t\",\"textarea\":\"textarea__textarea--1hO0S\",\"read-only-style\":\"textarea__read-only-style--1z4Cc\",\"readOnlyStyle\":\"textarea__read-only-style--1z4Cc\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"element-loader\":\"element-loader__element-loader--12FXJ\",\"elementLoader\":\"element-loader__element-loader--12FXJ\",\"element-loading\":\"element-loader__element-loading--3QnDA\",\"elementLoading\":\"element-loader__element-loading--3QnDA\",\"preload\":\"element-loader__preload--3ArFM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"button-input-group__visuallyhidden--1L6Jt\",\"focusable\":\"button-input-group__focusable--2oAmG\",\"btn-input-group\":\"button-input-group__btn-input-group--1KKqG\",\"btnInputGroup\":\"button-input-group__btn-input-group--1KKqG\",\"call-to-action-styling\":\"button-input-group__call-to-action-styling--k2Kdf\",\"callToActionStyling\":\"button-input-group__call-to-action-styling--k2Kdf\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"dropdown-menu__visuallyhidden--1wIHb\",\"focusable\":\"dropdown-menu__focusable--21_42\",\"dropdown-wrapper\":\"dropdown-menu__dropdown-wrapper--2yKZQ\",\"dropdownWrapper\":\"dropdown-menu__dropdown-wrapper--2yKZQ\",\"dropdown-menu\":\"dropdown-menu__dropdown-menu--18vgQ\",\"dropdownMenu\":\"dropdown-menu__dropdown-menu--18vgQ\",\"scaleOpen\":\"dropdown-menu__scaleOpen--1WVV5\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"index-group__visuallyhidden--18JtT\",\"focusable\":\"index-group__focusable--nYzKf\",\"alphabet-section\":\"index-group__alphabet-section--1q_N8\",\"alphabetSection\":\"index-group__alphabet-section--1q_N8\",\"alphabet-section-letter\":\"index-group__alphabet-section-letter--53iDw\",\"alphabetSectionLetter\":\"index-group__alphabet-section-letter--53iDw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"options-resolver__visuallyhidden--3xBM8\",\"focusable\":\"options-resolver__focusable--3cwqr\",\"error-message\":\"options-resolver__error-message--2iuZk\",\"errorMessage\":\"options-resolver__error-message--2iuZk\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"slider-readonly__visuallyhidden--1GQII\",\"focusable\":\"slider-readonly__focusable--36v5n\",\"slider-read-only\":\"slider-readonly__slider-read-only--1Buy_\",\"sliderReadOnly\":\"slider-readonly__slider-read-only--1Buy_\",\"color-dot\":\"slider-readonly__color-dot--24yt4\",\"colorDot\":\"slider-readonly__color-dot--24yt4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"import-file-input\":\"file-selector__import-file-input--3qH40\",\"importFileInput\":\"file-selector__import-file-input--3qH40\",\"import-file-label\":\"file-selector__import-file-label--3wUWv\",\"importFileLabel\":\"file-selector__import-file-label--3wUWv\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"expandable-text__visuallyhidden--3lWWy\",\"focusable\":\"expandable-text__focusable---o2vq\",\"expandable-text\":\"expandable-text__expandable-text--2G8Tw\",\"expandableText\":\"expandable-text__expandable-text--2G8Tw\",\"expandable-text-print-only\":\"expandable-text__expandable-text-print-only--DXbqJ\",\"expandableTextPrintOnly\":\"expandable-text__expandable-text-print-only--DXbqJ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"group-panel__visuallyhidden--1VLne\",\"focusable\":\"group-panel__focusable--1yVjg\",\"group-panel\":\"group-panel__group-panel--3mR8-\",\"groupPanel\":\"group-panel__group-panel--3mR8-\",\"without-children\":\"group-panel__without-children--1L7TL\",\"withoutChildren\":\"group-panel__without-children--1L7TL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"checkbox-list-item__visuallyhidden--3byAQ\",\"focusable\":\"checkbox-list-item__focusable--29Od0\",\"label\":\"checkbox-list-item__label--3u_AV\",\"description\":\"checkbox-list-item__description--2Pgba\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"copy-options__visuallyhidden--1oOhH\",\"focusable\":\"copy-options__focusable--3Fql3\",\"context-menu-modal\":\"copy-options__context-menu-modal--2EhEJ\",\"contextMenuModal\":\"copy-options__context-menu-modal--2EhEJ\",\"gray-shadow\":\"copy-options__gray-shadow--2Mf-g\",\"grayShadow\":\"copy-options__gray-shadow--2Mf-g\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"access-label__visuallyhidden--2m7NE\",\"focusable\":\"access-label__focusable--3_6Eg\",\"valid-access\":\"access-label__valid-access--3n3l4\",\"validAccess\":\"access-label__valid-access--3n3l4\",\"invalid-access\":\"access-label__invalid-access--23SDR\",\"invalidAccess\":\"access-label__invalid-access--23SDR\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"flex-row-panel__visuallyhidden--l_skj\",\"focusable\":\"flex-row-panel__focusable--2gG9O\",\"without-children\":\"flex-row-panel__without-children--383XF\",\"withoutChildren\":\"flex-row-panel__without-children--383XF\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"checkbox__visuallyhidden--3q9Pa\",\"focusable\":\"checkbox__focusable--15vKM\",\"input-control\":\"checkbox__input-control--2B7cx\",\"inputControl\":\"checkbox__input-control--2B7cx\",\"wrapper\":\"checkbox__wrapper--2gVNM\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdTrendingNeutral = function MdTrendingNeutral(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm36.6 20l-6.6 6.6v-5h-25v-3.2h25v-5z' })\n )\n );\n};\n\nexports.default = MdTrendingNeutral;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"loss-potential-consequence-evaluation__visuallyhidden--2wUkJ\",\"focusable\":\"loss-potential-consequence-evaluation__focusable--fuluD\",\"rate-button\":\"loss-potential-consequence-evaluation__rate-button--21i71\",\"rateButton\":\"loss-potential-consequence-evaluation__rate-button--21i71\",\"risk-area\":\"loss-potential-consequence-evaluation__risk-area--2zItW\",\"riskArea\":\"loss-potential-consequence-evaluation__risk-area--2zItW\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"attach-link-selector__visuallyhidden--2EbiS\",\"focusable\":\"attach-link-selector__focusable--2PVDI\",\"attach-link-selector\":\"attach-link-selector__attach-link-selector--1tm4s\",\"attachLinkSelector\":\"attach-link-selector__attach-link-selector--1tm4s\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"comment-tile-view__visuallyhidden--10bGX\",\"focusable\":\"comment-tile-view__focusable--3EK3P\",\"comment-heading\":\"comment-tile-view__comment-heading--2Lb2E\",\"commentHeading\":\"comment-tile-view__comment-heading--2Lb2E\",\"comment-view\":\"comment-tile-view__comment-view--3xwUK\",\"commentView\":\"comment-tile-view__comment-view--3xwUK\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"left-panel__visuallyhidden--2-bjx\",\"focusable\":\"left-panel__focusable--Zt1Fa\",\"info\":\"left-panel__info--1QEWh\",\"title\":\"left-panel__title--zqYD5\",\"left-panel\":\"left-panel__left-panel--2ozzy\",\"leftPanel\":\"left-panel__left-panel--2ozzy\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"log-details__visuallyhidden--1hQ51\",\"focusable\":\"log-details__focusable--1X8Co\",\"log-details\":\"log-details__log-details--Zm9QZ\",\"logDetails\":\"log-details__log-details--Zm9QZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"mail-log-link__visuallyhidden--qQEFd\",\"focusable\":\"mail-log-link__focusable--2k8t7\",\"mail-log-container\":\"mail-log-link__mail-log-container--2vyXn\",\"mailLogContainer\":\"mail-log-link__mail-log-container--2vyXn\",\"button-container\":\"mail-log-link__button-container--1nN6h\",\"buttonContainer\":\"mail-log-link__button-container--1nN6h\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"compact-tile-header__visuallyhidden--3p0pi\",\"focusable\":\"compact-tile-header__focusable--3mQdA\",\"tile-header\":\"compact-tile-header__tile-header--2czk9\",\"tileHeader\":\"compact-tile-header__tile-header--2czk9\",\"key\":\"compact-tile-header__key--xgq3P\"};","module.exports = (__webpack_require__(49))(419);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"bowtie-overlay__visuallyhidden--2IWv3\",\"focusable\":\"bowtie-overlay__focusable--3xnTV\",\"fullscreen-code-selector\":\"bowtie-overlay__fullscreen-code-selector--1yJRc\",\"fullscreenCodeSelector\":\"bowtie-overlay__fullscreen-code-selector--1yJRc\"};","module.exports = (__webpack_require__(49))(371);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"form-context__visuallyhidden--2tS-S\",\"focusable\":\"form-context__focusable--3wQ-q\",\"tag\":\"form-context__tag--33rut\",\"warning\":\"form-context__warning--3LSBv\",\"danger\":\"form-context__danger--2pnnB\",\"formContent\":\"form-context__formContent--M1TJG\",\"form-footer\":\"form-context__form-footer--3sK5q\",\"formFooter\":\"form-context__form-footer--3sK5q\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"scroll-to-top__visuallyhidden--Zp5ss\",\"focusable\":\"scroll-to-top__focusable--1mFto\",\"button\":\"scroll-to-top__button--1slGu\",\"visible\":\"scroll-to-top__visible--2vXi1\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"case-receipt__visuallyhidden--3xGyr\",\"focusable\":\"case-receipt__focusable--2phl9\",\"receipt\":\"case-receipt__receipt--tjD_H\",\"case-password\":\"case-receipt__case-password--2ynyL\",\"casePassword\":\"case-receipt__case-password--2ynyL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"chart-favourite__visuallyhidden--3y4kc\",\"focusable\":\"chart-favourite__focusable--3Xhd5\",\"tooltip-bold\":\"chart-favourite__tooltip-bold--2KE30\",\"tooltipBold\":\"chart-favourite__tooltip-bold--2KE30\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"table-view-favourite__visuallyhidden--3ADEk\",\"focusable\":\"table-view-favourite__focusable--3rs81\",\"result\":\"table-view-favourite__result--3SsUh\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdKeyboardArrowUp = function MdKeyboardArrowUp(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm12.3 25.7l-2.3-2.3 10-10 10 10-2.3 2.3-7.7-7.7z' })\n )\n );\n};\n\nexports.default = MdKeyboardArrowUp;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"layout__visuallyhidden--6zNEU\",\"focusable\":\"layout__focusable--3LrQU\",\"content-wrapper\":\"layout__content-wrapper--2btdg\",\"contentWrapper\":\"layout__content-wrapper--2btdg\",\"layout\":\"layout__layout--3ypW3\"};","module.exports = (__webpack_require__(49))(516);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"drop-area__visuallyhidden--1ikmm\",\"focusable\":\"drop-area__focusable--1hDUk\",\"dragndrop-area\":\"drop-area__dragndrop-area--R8sUC\",\"dragndropArea\":\"drop-area__dragndrop-area--R8sUC\",\"drag-to-box\":\"drop-area__drag-to-box--3tOC9\",\"dragToBox\":\"drop-area__drag-to-box--3tOC9\",\"drag-active-animation\":\"drop-area__drag-active-animation--27Xd4\",\"dragActiveAnimation\":\"drop-area__drag-active-animation--27Xd4\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"period__visuallyhidden--1HlXK\",\"focusable\":\"period__focusable--34fwl\",\"rolling-average\":\"period__rolling-average--1paMX\",\"rollingAverage\":\"period__rolling-average--1paMX\",\"input-row\":\"period__input-row--2Go_S\",\"inputRow\":\"period__input-row--2Go_S\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"aggregate-category__visuallyhidden--2hZMQ\",\"focusable\":\"aggregate-category__focusable--3e10e\",\"aggregate-category\":\"aggregate-category__aggregate-category--HGRCU\",\"aggregateCategory\":\"aggregate-category__aggregate-category--HGRCU\",\"category-list\":\"aggregate-category__category-list--aIOgh\",\"categoryList\":\"aggregate-category__category-list--aIOgh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"choose-chart-type__visuallyhidden--24oV8\",\"focusable\":\"choose-chart-type__focusable--1t9l_\",\"chart-selector\":\"choose-chart-type__chart-selector--HGnqs\",\"chartSelector\":\"choose-chart-type__chart-selector--HGnqs\",\"chart-option\":\"choose-chart-type__chart-option--3zQZZ\",\"chartOption\":\"choose-chart-type__chart-option--3zQZZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"search-filters__visuallyhidden--EBdsK\",\"focusable\":\"search-filters__focusable--3nM9j\",\"information-panel\":\"search-filters__information-panel--2c1lL\",\"informationPanel\":\"search-filters__information-panel--2c1lL\",\"search-results\":\"search-filters__search-results--2SKyy\",\"searchResults\":\"search-filters__search-results--2SKyy\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"search-attributes__visuallyhidden--3d-G1\",\"focusable\":\"search-attributes__focusable--NhaIv\",\"show-label\":\"search-attributes__show-label--JzD38\",\"showLabel\":\"search-attributes__show-label--JzD38\",\"attribute-selector\":\"search-attributes__attribute-selector--1eBUs\",\"attributeSelector\":\"search-attributes__attribute-selector--1eBUs\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"search-result__visuallyhidden--3_KHV\",\"focusable\":\"search-result__focusable--2HLgr\",\"search-hits\":\"search-result__search-hits--3nX3h\",\"searchHits\":\"search-result__search-hits--3nX3h\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"search-tile__visuallyhidden--18565\",\"focusable\":\"search-tile__focusable--20PSH\",\"search-tile\":\"search-tile__search-tile--Eytew\",\"searchTile\":\"search-tile__search-tile--Eytew\",\"search-tile-deleted\":\"search-tile__search-tile-deleted--2U1Hh\",\"searchTileDeleted\":\"search-tile__search-tile-deleted--2U1Hh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"person-meatball-menu__visuallyhidden--3taUh\",\"focusable\":\"person-meatball-menu__focusable--kRyY1\",\"label-no-access\":\"person-meatball-menu__label-no-access--1eTv5\",\"labelNoAccess\":\"person-meatball-menu__label-no-access--1eTv5\",\"loader\":\"person-meatball-menu__loader--2Yk-k\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"options-panel-dialog__visuallyhidden--26ZV3\",\"focusable\":\"options-panel-dialog__focusable--1K2YN\",\"button-container\":\"options-panel-dialog__button-container--2e3OK\",\"buttonContainer\":\"options-panel-dialog__button-container--2e3OK\",\"dialog-expander\":\"options-panel-dialog__dialog-expander--C9Sb0\",\"dialogExpander\":\"options-panel-dialog__dialog-expander--C9Sb0\",\"options-message\":\"options-panel-dialog__options-message--1SdDv\",\"optionsMessage\":\"options-panel-dialog__options-message--1SdDv\",\"has-switch\":\"options-panel-dialog__has-switch--17OKE\",\"hasSwitch\":\"options-panel-dialog__has-switch--17OKE\",\"select-header\":\"options-panel-dialog__select-header--1mNXN\",\"selectHeader\":\"options-panel-dialog__select-header--1mNXN\",\"no-expander\":\"options-panel-dialog__no-expander--1dXIH\",\"noExpander\":\"options-panel-dialog__no-expander--1dXIH\",\"select-switch\":\"options-panel-dialog__select-switch--1F12P\",\"selectSwitch\":\"options-panel-dialog__select-switch--1F12P\",\"link-selector\":\"options-panel-dialog__link-selector--2J0g0\",\"linkSelector\":\"options-panel-dialog__link-selector--2J0g0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"top-panel__visuallyhidden--1VRyl\",\"focusable\":\"top-panel__focusable--2RQAE\",\"user-information-details\":\"top-panel__user-information-details--WL0xk\",\"userInformationDetails\":\"top-panel__user-information-details--WL0xk\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"add-default-values__visuallyhidden--3sfYR\",\"focusable\":\"add-default-values__focusable--2HBlZ\",\"add-button\":\"add-default-values__add-button--pXPv7\",\"addButton\":\"add-default-values__add-button--pXPv7\",\"disclaimer-panel\":\"add-default-values__disclaimer-panel--R-OK3\",\"disclaimerPanel\":\"add-default-values__disclaimer-panel--R-OK3\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"card-value__visuallyhidden--15i-r\",\"focusable\":\"card-value__focusable--2bZ1u\",\"card-value-add-fields\":\"card-value__card-value-add-fields--3xHYK\",\"cardValueAddFields\":\"card-value__card-value-add-fields--3xHYK\",\"dialog-expander\":\"card-value__dialog-expander--h6EWl\",\"dialogExpander\":\"card-value__dialog-expander--h6EWl\",\"options-message\":\"card-value__options-message--1Umb8\",\"optionsMessage\":\"card-value__options-message--1Umb8\",\"has-switch\":\"card-value__has-switch--2_nay\",\"hasSwitch\":\"card-value__has-switch--2_nay\",\"select-header\":\"card-value__select-header--1DUCd\",\"selectHeader\":\"card-value__select-header--1DUCd\",\"no-expander\":\"card-value__no-expander--3ektR\",\"noExpander\":\"card-value__no-expander--3ektR\",\"select-switch\":\"card-value__select-switch--fCz3e\",\"selectSwitch\":\"card-value__select-switch--fCz3e\",\"link-selector\":\"card-value__link-selector--2X6X0\",\"linkSelector\":\"card-value__link-selector--2X6X0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"panel-role-access__visuallyhidden--uuYkq\",\"focusable\":\"panel-role-access__focusable--2-2et\",\"highlighted-box\":\"panel-role-access__highlighted-box--18IW0\",\"highlightedBox\":\"panel-role-access__highlighted-box--18IW0\",\"link\":\"panel-role-access__link--18_ds\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"language-name__visuallyhidden--5p0NC\",\"focusable\":\"language-name__focusable--njuGq\",\"label-container\":\"language-name__label-container--3Tcwb\",\"labelContainer\":\"language-name__label-container--3Tcwb\",\"label-text\":\"language-name__label-text--2yd1O\",\"labelText\":\"language-name__label-text--2yd1O\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"section-header__visuallyhidden--OX-Wq\",\"focusable\":\"section-header__focusable--3Onnb\",\"section-header\":\"section-header__section-header--2bkT9\",\"sectionHeader\":\"section-header__section-header--2bkT9\",\"section-separator\":\"section-header__section-separator--2Q_bp\",\"sectionSeparator\":\"section-header__section-separator--2Q_bp\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"translations-toggle__visuallyhidden--ow9BC\",\"focusable\":\"translations-toggle__focusable--2mwH7\",\"label\":\"translations-toggle__label--1DI6f\",\"translations-toggle-container\":\"translations-toggle__translations-toggle-container--2a-7N\",\"translationsToggleContainer\":\"translations-toggle__translations-toggle-container--2a-7N\",\"translations-toggle-label\":\"translations-toggle__translations-toggle-label--2w71z\",\"translationsToggleLabel\":\"translations-toggle__translations-toggle-label--2w71z\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"code-exclude-label\":\"code-exclude__code-exclude-label--3XpJB\",\"codeExcludeLabel\":\"code-exclude__code-exclude-label--3XpJB\",\"clear-rows\":\"code-exclude__clear-rows--7jw5L\",\"clearRows\":\"code-exclude__clear-rows--7jw5L\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"list-view-column__visuallyhidden--3ctYp\",\"focusable\":\"list-view-column__focusable--dwlno\",\"list-view-column\":\"list-view-column__list-view-column--3j4zy\",\"listViewColumn\":\"list-view-column__list-view-column--3j4zy\",\"flexible\":\"list-view-column__flexible--3VmfB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"push-modal__visuallyhidden--iXKlr\",\"focusable\":\"push-modal__focusable--ptR28\",\"wrapper\":\"push-modal__wrapper--3FyQa\",\"input\":\"push-modal__input--j7DI3\",\"readOnly\":\"push-modal__readOnly--QWPug\"};","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var anObject = require('../internals/an-object');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classof(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && !fails(post)) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","module.exports = (__webpack_require__(49))(329);","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","'use strict';\n\nvar fails = require('./fails');\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\n// so we use an intermediate function.\nfunction RE(s, f) {\n return RegExp(s, f);\n}\n\nexports.UNSUPPORTED_Y = fails(function () {\n // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\n var re = RE('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = RE('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","// `SameValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-samevalue\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://теÑÑ‚').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign;\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\nmodule.exports = !nativeAssign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : nativeAssign;\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.github.io/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n nativeMethod.call(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n nativeMethod.call(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n // eslint-disable-next-line max-len\n if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n })))) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n return Object.isExtensible(Object.preventExtensions({}));\n});\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar redefineAll = require('../internals/redefine-all');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/define-iterator');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // 23.1.3.6 Map.prototype.get(key)\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // 23.1.3.9 Map.prototype.set(key, value)\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return { value: undefined, done: true };\n }\n // return step by kind\n if (kind == 'keys') return { value: entry.key, done: false };\n if (kind == 'values') return { value: entry.value, done: false };\n return { value: [entry.key, entry.value], done: false };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\n\n// https://github.com/tc39/collection-methods\nmodule.exports = function (/* ...elements */) {\n var collection = anObject(this);\n var remover = aFunction(collection['delete']);\n var allDeleted = true;\n var wasDeleted;\n for (var k = 0, len = arguments.length; k < len; k++) {\n wasDeleted = remover.call(collection, arguments[k]);\n allDeleted = allDeleted && wasDeleted;\n }\n return !!allDeleted;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.fixed` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.fixed\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {\n fixed: function fixed() {\n return createHTML(this, 'tt', '', '');\n }\n});\n","var isRegExp = require('../internals/is-regexp');\n\nmodule.exports = function (it) {\n if (isRegExp(it)) {\n throw TypeError(\"The method doesn't accept regular expressions\");\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (e) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (f) { /* empty */ }\n } return false;\n};\n","/**\r\n * Middlware for cross-cutting concerns when a reducer needs access to multiple parts of the state shape\r\n */\r\nexport const accessToState = (store: any) => (next: any) => (action: any) => {\r\n next( Object.assign({}, action, {getState: store.getState }));\r\n};\r\n","import { debug } from 'app/infrastructure/log/index';\r\nimport { isBrowser } from 'app/infrastructure/universal/runtime';\r\nimport get from 'lodash/get';\r\nimport { ApplicationState } from 'app/types-store';\r\n\r\n// Time before background save will be performed in ms\r\nexport const backgroundSaveFrequency = 5000;\r\n\r\n// An improvement worth investigating altho time consuming, is to\r\n// create middleware that debounces every VALUE_CHANGE instead of using a fixed timer interval.\r\n\r\nconst isIdle = (state: EditableState) => !get(state, 'editing.fetching');\r\n\r\nconst hasChanges = (state: EditableState) => get(state, 'editing.hasChanges');\r\n\r\nconst submitIsPending = (state: EditableState) => get(state, 'editing.submitting');\r\n\r\nconst forcedSaveIsPending = (state: EditableState) => get(state, 'editing.immediateSaveRequests');\r\n\r\nconst shouldSaveOnNextInterval = (state: EditableState) => \r\n isIdle(state) && hasChanges(state) && !submitIsPending(state) && !forcedSaveIsPending(state);\r\n\r\nconst shouldSaveImmediatly = (state: EditableState) => \r\n isIdle(state) && hasChanges(state) && (submitIsPending(state) || forcedSaveIsPending(state));\r\n\r\nconst shouldSubmit = (state: EditableState) => \r\n isIdle(state) && !hasChanges(state) && submitIsPending(state);\r\n\r\nexport const createSaveMiddleware = (\r\n saveCallback: () => (dispatch: Redux.Dispatch<any>, getState: () => ApplicationState) => void,\r\n submitCallback: () => (dispatch: Redux.Dispatch<any>, getState: () => ApplicationState) => void,\r\n area: string) => {\r\n\r\n let timer: any;\r\n\r\n const saveAction = (store: Redux.Store<ApplicationState>) => {\r\n\r\n const uiState: EditableState = store.getState()[area];\r\n\r\n if (hasChanges(uiState)) {\r\n debug('saving data for ' + area);\r\n saveCallback()(store.dispatch, store.getState);\r\n }\r\n };\r\n\r\n const removeTimer = () => {\r\n\r\n if (timer) {\r\n\r\n debug('removeTimer for ' + area);\r\n clearInterval(timer);\r\n timer = undefined;\r\n }\r\n };\r\n\r\n const addTimer = (store: Redux.Store<ApplicationState>) => {\r\n\r\n if (timer) {\r\n return;\r\n }\r\n\r\n debug('addTimer for ' + area);\r\n timer = setInterval(() => {\r\n saveAction(store);\r\n }, backgroundSaveFrequency);\r\n\r\n };\r\n\r\n return (store: Redux.Store<ApplicationState>) => (next: any) => (action: any) => {\r\n\r\n // next middleware is called first, as the state needed to be updated\r\n next(action);\r\n\r\n if (!isBrowser) {\r\n return;\r\n }\r\n\r\n const state: EditableState = store.getState()[area];\r\n\r\n if (shouldSubmit(state)) {\r\n debug('submit data for ' + area);\r\n submitCallback()(store.dispatch, store.getState);\r\n return;\r\n }\r\n\r\n if (shouldSaveImmediatly(state)) {\r\n removeTimer();\r\n saveAction(store);\r\n return;\r\n }\r\n\r\n if (shouldSaveOnNextInterval(state)) {\r\n addTimer(store);\r\n return;\r\n }\r\n\r\n removeTimer();\r\n };\r\n\r\n};\r\n\r\ninterface EditableState {\r\n editing: {\r\n /** \r\n * True if user has requested the data to be submitted\r\n */\r\n submitting: boolean;\r\n /** \r\n * True if data is fetching or a save is running (I knoow...)\r\n */\r\n fetching: boolean;\r\n /**\r\n * Incremented but never more than 2, each time a forced save is requested by the application\r\n */\r\n immediateSaveRequests: 0|1|2;\r\n /**\r\n * True if there is a diff between persisted state, and current state\r\n */\r\n hasChanges: boolean;\r\n };\r\n}\r\n","import { isDevelopment } from 'app/infrastructure/universal';\r\nimport { debug } from 'app/infrastructure/log';\r\nimport { clientInfo } from 'app/infrastructure/log/client-info';\r\nimport { toJSON, fromJSON } from 'app/infrastructure/platform/json';\r\n\r\nexport const ACTION_ERROR = 'ERROR';\r\n/**\r\n * Error dispatched will be logged to server by a middleware\r\n */\r\nexport class LoggedError {\r\n public type: string = ACTION_ERROR;\r\n public error: any;\r\n public message: string;\r\n\r\n constructor(error: any, message?: string) {\r\n this.error = error;\r\n this.message = message;\r\n }\r\n}\r\n\r\n/**\r\n * Middlware to log any error to server that occurs in actions\r\n */\r\nexport const logErrors = (store: any) => (next: any) => (action: any) => {\r\n if (action.type === ACTION_ERROR){\r\n \r\n debug('logging ERROR action to server..');\r\n \r\n const report = {\r\n client: clientInfo(),\r\n // without this deconstruct the error cannot be serialized later\r\n error: fromJSON(toJSON(action.error)), \r\n state: store.getState()\r\n };\r\n\r\n if (isDevelopment){\r\n console.error(action.error);\r\n debug('error report', report);\r\n }\r\n \r\n }\r\n next(action);\r\n};\r\n","\r\n/**\r\n * Middleware for transforming Typed Actions into plain actions since redux\r\n * checks for is-plain-object\r\n */\r\nexport const typedToPlain = (store: any) => (next: any) => (action: any) => {\r\n next((Object as any).assign({}, action));\r\n};\r\n","export { Textbox } from './textbox';\r\n","var $ = require('../internals/export');\n\n// `Number.MAX_SAFE_INTEGER` constant\n// https://tc39.github.io/ecma262/#sec-number.max_safe_integer\n$({ target: 'Number', stat: true }, {\n MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF\n});\n","export * from './info-text';\r\n","export * from './types';\r\nexport * from './prompt-confirmation';\r\nexport * from './prompt-confirmation-modal';\r\n","import * as React from 'react';\r\nimport { ValueItem } from 'ui/common/select/types';\r\nimport { ComplexValue } from 'ui';\r\nimport { Expandable, ShouldTruncate, CreateRenderer } from 'ui/expandable';\r\n\r\ninterface ValueDisplay {\r\n valueItem?: ComplexValue<string> | ComplexValue<number>;\r\n prefix?: string;\r\n suffix?: string;\r\n classNames?: string;\r\n style?: {[prop:string]: string};\r\n shouldTruncate?: boolean;\r\n textDisplayMore?: string;\r\n textDisplayLess?: string;\r\n}\r\n\r\nexport const ValueDisplay = (props: ValueDisplay) => {\r\n const {\r\n valueItem,\r\n prefix,\r\n suffix,\r\n classNames = '',\r\n style,\r\n textDisplayMore,\r\n textDisplayLess,\r\n shouldTruncate = false\r\n } = props;\r\n\r\n if(!valueItem) {\r\n return null;\r\n }\r\n const {description, value} = valueItem;\r\n const text = [\r\n description && prefix,\r\n description,\r\n !description && value,\r\n suffix\r\n ].filter(val => val).join('');\r\n\r\n const doTruncation = shouldTruncate && ShouldTruncate(text);\r\n const render = CreateRenderer(text);\r\n\r\n return (<span className={`${classNames} value-display`} style={style}>\r\n { doTruncation ? <Expandable content={render} {...{textDisplayMore, textDisplayLess}}/> : text }\r\n </span>\r\n );\r\n};\r\n\r\ninterface MultipleValueDisplay {\r\n valueItems?: ValueItem[];\r\n classNames?: string;\r\n}\r\n\r\nexport const MultipleValueDisplay = ({ valueItems, classNames = '' }: MultipleValueDisplay) => (\r\n <span className={`${classNames}`}>\r\n {valueItems && valueItems.map(vi => vi.description).join(', ')}\r\n </span>);\r\n","import * as React from 'react';\r\nimport IntersectionVisible from 'react-intersection-visible';\r\nimport debounce from 'lodash/debounce';\r\n\r\n/**\r\n * Uses intersection observer API to determine if the element is visible within\r\n * viewport, and runs a debounced callback when visible. If the element is quickly\r\n * hidden again, the callback is cancelled.\r\n * \r\n * NB: Edge has a bug where it will not trigger intersections for elements with 0 height.\r\n * \r\n * @param param0 \r\n */\r\nexport const VisibilitySensor = ({onShow, wait=200, children}) => {\r\n const handleShow = debounce(onShow, wait, {leading:false, trailing:true});\r\n \r\n const cancelShow = ()=> {\r\n handleShow && handleShow.cancel(); \r\n };\r\n\r\n return <IntersectionVisible onShow={handleShow} onHide={cancelShow}>\r\n { children}\r\n </IntersectionVisible>;\r\n};\r\n","export * from './select-single';\r\n","export {DisplayNumber} from './display-number';\r\n","import { ValueDisplay } from 'ui/common';\r\nimport * as React from 'react';\r\nimport { SingleKeyValueComponent } from 'ui/common';\r\nimport { compose } from 'redux';\r\nimport styles from './display-text.scss';\r\nimport { Label, NoValueDash } from 'ui/common';\r\n\r\nexport interface DisplayTextProps extends SingleKeyValueComponent<string> {\r\n /**\r\n * Predefined possible styles by the design handbook\r\n */\r\n style?: 'primary' | 'secondary';\r\n /**\r\n * When true, the label font is normal and the value font is bold\r\n */\r\n strong?: boolean;\r\n /**\r\n * When true, the label font is normal and the value font is bold and uppercase\r\n */\r\n invertStrong?: boolean;\r\n /**\r\n * When true, the predefined style class for comment text style is applied\r\n */\r\n showAsComment?: boolean;\r\n /**\r\n * A prefix string to render in front of the text value\r\n */\r\n textPrefix?: string;\r\n /**\r\n * When true, a predefined style class to render the label above the value is applied\r\n */\r\n showStacked: boolean;\r\n /**\r\n * When true, the component gets hidden when value is empty\r\n */\r\n hideIfNoValue?: boolean;\r\n\r\n /**\r\n * Truncate value after 200 characters\r\n */\r\n shouldTruncate?: boolean;\r\n\r\n /**\r\n * Text on button to see the whole text\r\n */\r\n textDisplayMore?: string;\r\n\r\n /**\r\n * Text on button to collapse again\r\n */\r\n textDisplayLess?: string;\r\n\r\n /**\r\n * @internal\r\n */\r\n children?: any;\r\n}\r\n\r\n/**\r\n * Displaying a databound text value consist of rendering a label, and the value.\r\n *\r\n * This component is responsible for the composition of the two.\r\n *\r\n * @param props\r\n */\r\nconst DisplayTextComponent = (props: Partial<DisplayTextProps>) => {\r\n const {\r\n className,\r\n componentId,\r\n hideIfNoValue = false,\r\n label,\r\n valueItem,\r\n textPrefix,\r\n shouldTruncate,\r\n textDisplayMore,\r\n textDisplayLess\r\n } = props;\r\n \r\n const hideComponent = hideIfNoValue && !(valueItem && valueItem.value);\r\n const displayNoValueDash = !hideIfNoValue && !(valueItem && valueItem.value) && label && label.visible; \r\n\r\n return (\r\n !hideComponent &&\r\n <div className={className} id={componentId}>\r\n <Label label={label} />\r\n <ValueDisplay\r\n valueItem={valueItem}\r\n prefix={textPrefix}\r\n {...{shouldTruncate, textDisplayMore, textDisplayLess}}\r\n />\r\n {displayNoValueDash && <NoValueDash/>}\r\n </div>\r\n );\r\n};\r\n\r\n/**\r\n * A utility that maps known props to a known style and appends them to a list.\r\n *\r\n * The list of final style classes are concatenated into a valid JSX className string attribute\r\n *\r\n * @param props\r\n */\r\nconst styleFromProps = (props: DisplayTextProps) =>\r\n [\r\n styles.text,\r\n props.className,\r\n styles[props.style],\r\n props.showStacked && styles.stackedColumn,\r\n props.showAsComment && styles.textComment,\r\n props.invertStrong && styles.invertStrong,\r\n props.strong && !props.invertStrong && styles.strong\r\n ].filter(s => s).join(' ');\r\n\r\n/**\r\n * Higher order component to override the final className\r\n * @param Component the component to decorate\r\n */\r\nconst styleVariations = (Component: any) => ({children, ...childProps}: DisplayTextProps) => (\r\n <Component {...childProps} className={styleFromProps(childProps)}>\r\n {children}\r\n </Component>\r\n);\r\n\r\nexport const DisplayText = compose(\r\n styleVariations\r\n)(DisplayTextComponent);\r\n","import * as React from 'react';\r\nimport { ComponentProps } from '../common/types';\r\nimport styles from './hidden.scss';\r\n\r\nexport const Hidden = (props: ComponentProps) => ( //tslint:disable-line\r\n <div id={props.componentId} className={styles.hidden}/>\r\n);\r\n","export { SectionPanel } from './section-panel';\r\n","import * as React from 'react';\r\nimport FaAngleDown from 'react-icons/lib/fa/angle-down';\r\nimport styles from './expandable-panel.scss';\r\n\r\ninterface ExpandablePanelComponentProps {\r\n title: string;\r\n isOpen?: boolean;\r\n}\r\n\r\ninterface ExpandablePanelComponentState {\r\n isOpen: boolean;\r\n isClosing: boolean;\r\n}\r\n\r\nclass ExpandablePanelComponent extends React.Component<ExpandablePanelComponentProps, ExpandablePanelComponentState> {\r\n public static defaultProps: Partial<ExpandablePanelComponentProps> = {\r\n isOpen: true\r\n };\r\n\r\n constructor(props: ExpandablePanelComponentProps) {\r\n super(props);\r\n this.state = {\r\n isOpen: props.isOpen,\r\n isClosing: false\r\n };\r\n }\r\n\r\n private onClick = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n\r\n if (this.state.isOpen) {\r\n this.setState({ isClosing: true });\r\n setTimeout(() => {\r\n this.setState({\r\n isOpen: false,\r\n isClosing: false\r\n });\r\n }, 300);\r\n } else {\r\n this.setState({ isOpen: true });\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { expandablePanel, panelHeader, content } = styles;\r\n const { title, children } = this.props;\r\n const { isOpen, isClosing } = this.state;\r\n return (\r\n <div className={expandablePanel}>\r\n <button type=\"button\" className={`${panelHeader} ${isOpen && 'active'}`} onClick={this.onClick}>\r\n {title}\r\n <FaAngleDown className={isOpen ? 'expand-icon-down' : 'expand-icon-up'} />\r\n </button>\r\n <div className={`${content} ${isClosing ? styles.animateOut : ''} ${!isOpen ? styles.hide : ''}`}>\r\n {children}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport const ExpandablePanel = ExpandablePanelComponent;\r\n","import * as React from 'react';\r\nimport styles from './drawer-with-bar.scss';\r\nimport { ButtonTertiary } from 'ui';\r\nimport FaAngleDown from 'react-icons/lib/fa/angle-down';\r\nimport { withForceUpdateTerminal, ForceUpdateTerminalProps } from 'ui/common/force-update-terminal';\r\n\r\ninterface DrawerWithBarComponentProps {\r\n title: string;\r\n barContent?: React.ReactNode;\r\n drawerContent: React.ReactNode;\r\n initiallyOpen?: boolean;\r\n}\r\n\r\ntype DrawerWithBarProps = DrawerWithBarComponentProps & ForceUpdateTerminalProps;\r\n\r\ninterface DrawerWithBarComponentState {\r\n isOpenDrawer: boolean;\r\n initiallyOpen: boolean;\r\n isClosing: boolean;\r\n}\r\n\r\nclass DrawerWithBarComponent extends React.Component<DrawerWithBarProps, DrawerWithBarComponentState> {\r\n constructor(props: DrawerWithBarProps) {\r\n super(props);\r\n this.state = {\r\n isOpenDrawer: !!props.initiallyOpen,\r\n initiallyOpen: !!props.initiallyOpen,\r\n isClosing: false\r\n };\r\n }\r\n\r\n private toggle = (e: React.MouseEvent<HTMLElement>) => {\r\n e.preventDefault();\r\n if (this.state.isOpenDrawer) {\r\n this.setState({ isClosing: true });\r\n\r\n setTimeout(() => {\r\n this.setState({\r\n isOpenDrawer: !this.state.isOpenDrawer,\r\n initiallyOpen: true,\r\n isClosing: false\r\n } as DrawerWithBarComponentState);\r\n }, 500);\r\n\r\n } else {\r\n this.setState({\r\n isOpenDrawer: !this.state.isOpenDrawer,\r\n initiallyOpen: true\r\n } as DrawerWithBarComponentState);\r\n }\r\n }\r\n\r\n private handleAnimationEnd = (e: React.AnimationEvent<HTMLDivElement>) => {\r\n if (e.target === e.currentTarget) {\r\n this.props.refreshForceUpdateHash();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { isOpenDrawer, isClosing } = this.state;\r\n const { barContent } = this.props;\r\n\r\n const animateOutStyles = isClosing ? 'closing-animation' : '';\r\n const btnOpen = isOpenDrawer && !isClosing ? styles.btnOpen : '';\r\n const filterOpenState = isOpenDrawer ? 'with-open-filters' : 'with-closed-filters';\r\n\r\n return <>\r\n <div className={styles.drawerBar}>\r\n <div className={`${styles.drawerBarBtn} drawer-button ${btnOpen}`}\r\n data-toggle=\"collapse\" onClick={this.toggle}>\r\n <ButtonTertiary>\r\n <span>{this.props.title}</span>\r\n <FaAngleDown />\r\n </ButtonTertiary>\r\n </div>\r\n <div className={styles.barContent}>\r\n {!!barContent && barContent}\r\n </div>\r\n </div>\r\n <div className={`${styles.searchContent} ${animateOutStyles} ${filterOpenState}`} onAnimationEnd={this.handleAnimationEnd}>\r\n <div className=\"filters\" onAnimationEnd={this.handleAnimationEnd}>\r\n {this.props.drawerContent}\r\n </div>\r\n {this.props.children}\r\n </div>\r\n </>;\r\n }\r\n}\r\n\r\nexport const DrawerWithBar = withForceUpdateTerminal<DrawerWithBarProps>(DrawerWithBarComponent);\r\n","import * as React from 'react';\r\nimport { ButtonTertiary, SingleValueComponent, ButtonPrimary, Validation } from 'ui/common';\r\nimport { DisplayDate, DisplayText } from 'ui';\r\nimport styles from './toggle-button.scss';\r\n\r\nexport interface ToggleButtonProps extends SingleValueComponent<Date | string | number>{\r\n textLabel: string;\r\n textLabelToggle: string;\r\n valueResolver: () => Date | string | number;\r\n}\r\n\r\nexport const ToggleButton: React.SFC<ToggleButtonProps> = props => {\r\n\r\n const {\r\n value,\r\n valueResolver,\r\n readOnly,\r\n textLabel,\r\n textLabelToggle,\r\n componentId,\r\n className,\r\n onChange,\r\n validation\r\n } = props;\r\n\r\n const buttonText = value ? textLabelToggle : textLabel;\r\n\r\n const handleChange = () => {\r\n onChange && valueResolver &&\r\n onChange( value === undefined ? valueResolver() : undefined );\r\n };\r\n\r\n const ValueComponent:any = (value instanceof Date) ? DisplayDate : DisplayText;\r\n const ButtonComponent:any = value ? ButtonTertiary : ButtonPrimary;\r\n const signedStyles = value ? styles.signed : ''; \r\n const hasValidationErrors = (validation && !!validation.messages.length);\r\n const validationErrorStyle = hasValidationErrors && styles.validationError; \r\n\r\n return (\r\n <div className={`form-group ${className}`}>\r\n <div className={`${styles.toggleWrapper} ${signedStyles} ${validationErrorStyle}`}>\r\n <ValueComponent {...props} className=\"has-bg-color\" value={value} showStacked={true}/>\r\n <ButtonComponent\r\n id={componentId}\r\n className={className}\r\n disabled={readOnly}\r\n onClick={handleChange}\r\n >{buttonText}\r\n </ButtonComponent> \r\n </div>\r\n {hasValidationErrors && <Validation {...validation}/>} \r\n </div>);\r\n};\r\n","var $ = require('../internals/export');\nvar is = require('../internals/same-value');\n\n// `Object.is` method\n// https://tc39.github.io/ecma262/#sec-object.is\n$({ target: 'Object', stat: true }, {\n is: is\n});\n","\"use strict\";\n// forked from https://github.com/chriso/validator.js\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar defaultFqdnOptions = {\n requireTld: true,\n allowUnderscores: false,\n allowTrailingDot: false,\n};\nvar defaultEmailOptions = {\n allowDisplayName: false,\n requireDisplayName: false,\n allowUtf8LocalPart: true,\n requireTld: true,\n};\nvar displayName = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\.\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\,\\.\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF\\s]*<(.+)>$/i;\nvar emailUserPart = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]+$/i;\nvar quotedEmailUser = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]))*$/i;\nvar emailUserUtf8Part = /^[a-z\\d!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+$/i;\nvar quotedEmailUserUtf8 = /^([\\s\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f\\x21\\x23-\\x5b\\x5d-\\x7e\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]|(\\\\[\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))*$/i;\n/* eslint-disable prefer-rest-params */\nfunction isByteLength(str, options) {\n var min = 0;\n var max;\n var len = encodeURI(str).split(/%..|./).length - 1;\n if (options) {\n min = Number(options.min) || 0;\n max = Number(options.max);\n }\n return len >= min && (typeof max === 'undefined' || len <= max);\n}\nfunction isFQDN(str, options) {\n options = __assign({}, defaultFqdnOptions, options);\n /* Remove the optional trailing dot before checking validity */\n if (options.allowTrailingDot && str[str.length - 1] === '.') {\n str = str.substring(0, str.length - 1);\n }\n var parts = str.split('.');\n if (options.requireTld) {\n var tld = '' + parts.pop();\n if (!parts.length ||\n !/^([a-z\\u00a1-\\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {\n return false;\n }\n // disallow spaces\n if (/[\\s\\u2002-\\u200B\\u202F\\u205F\\u3000\\uFEFF\\uDB40\\uDC20]/.test(tld)) {\n return false;\n }\n }\n for (var part = void 0, i = 0; i < parts.length; i++) {\n part = parts[i];\n if (options.allowUnderscores) {\n part = part.replace(/_/g, '');\n }\n if (!/^[a-z\\u00a1-\\uffff0-9-]+$/i.test(part)) {\n return false;\n }\n // disallow full-width chars\n if (/[\\uff01-\\uff5e]/.test(part)) {\n return false;\n }\n if (part[0] === '-' || part[part.length - 1] === '-') {\n return false;\n }\n }\n return true;\n}\nfunction isEmail(str, options) {\n options = __assign({}, defaultEmailOptions, options);\n if (options.requireDisplayName || options.allowDisplayName) {\n var displayEmail = str.match(displayName);\n if (displayEmail) {\n str = displayEmail[1];\n }\n else if (options.requireDisplayName) {\n return false;\n }\n }\n var parts = str.split('@');\n var domain = '' + parts.pop();\n var lowerDomain = domain.toLowerCase();\n var user = parts.join('@');\n if (lowerDomain === 'gmail.com' || lowerDomain === 'googlemail.com') {\n user = user.replace(/\\./g, '').toLowerCase();\n }\n if (!isByteLength(user, { max: 64 }) || !isByteLength(domain, { max: 254 })) {\n return false;\n }\n if (!isFQDN(domain, { requireTld: options.requireTld })) {\n return false;\n }\n if (user[0] === '\"') {\n user = user.slice(1, user.length - 1);\n return options.allowUtf8LocalPart\n ? quotedEmailUserUtf8.test(user)\n : quotedEmailUser.test(user);\n }\n var pattern = options.allowUtf8LocalPart\n ? emailUserUtf8Part\n : emailUserPart;\n var userParts = user.split('.');\n for (var i = 0; i < userParts.length; i++) {\n if (!pattern.test(userParts[i])) {\n return false;\n }\n }\n return true;\n}\nexports.default = isEmail;\n","var defineWellKnownSymbol = require('../internals/define-well-known-symbol');\n\n// `Symbol.toPrimitive` well-known symbol\n// https://tc39.github.io/ecma262/#sec-symbol.toprimitive\ndefineWellKnownSymbol('toPrimitive');\n","var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar dateToPrimitive = require('../internals/date-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar DatePrototype = Date.prototype;\n\n// `Date.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-date.prototype-@@toprimitive\nif (!(TO_PRIMITIVE in DatePrototype)) {\n createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive);\n}\n","import * as React from 'react';\r\nimport { SelectSingleHierarchy, ValidationProps } from 'ui';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { CodePickerProps, CodePickerState } from './types';\r\n\r\ninterface CodeSinglePickerProps extends CodePickerProps {\r\n valueItem: ComplexValue<number>;\r\n onChange: (value: ComplexValue<number>) => void;\r\n validation?: ValidationProps;\r\n readOnly?: boolean;\r\n}\r\n\r\nexport class CodeSinglePicker extends React.PureComponent<CodeSinglePickerProps, CodePickerState> {\r\n\r\n public readonly state: Readonly<CodePickerState> = { loadedOptions: {} };\r\n\r\n private onLoadOptions = (options: LoadOptions) => {\r\n\r\n const { id, onLoadOptions } = this.props;\r\n\r\n onLoadOptions(id, options);\r\n this.setState({ loadedOptions: options });\r\n }\r\n\r\n public render() {\r\n\r\n const { id, label, valueItem, options, fetchingOptions, translation,\r\n onChange, required, searchRequired, validation, readOnly } = this.props;\r\n\r\n return <div className=\"col-lg-6 col-sm-12\">\r\n <SelectSingleHierarchy\r\n componentId={id}\r\n className={undefined}\r\n label={label ? { text: label, required: !!required } : undefined}\r\n readOnly={readOnly}\r\n valueItem={valueItem}\r\n searchRequired={searchRequired}\r\n onChange={onChange}\r\n\r\n descriptionAllLevels={true}\r\n\r\n validation={validation}\r\n\r\n options={options}\r\n fetching={fetchingOptions}\r\n loadOptions={this.state.loadedOptions}\r\n onLoadOptions={this.onLoadOptions}\r\n\r\n textOptionsNotFound={translation && translation.no_options_found}\r\n textOptionsDone={translation && translation.done}\r\n textSearchRequired={translation && translation.search_required_message}\r\n placeholder={translation && translation.search}\r\n />\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SelectMultipleHierarchy, ValidationProps } from 'ui';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { CodePickerProps, CodePickerState } from './types';\r\n\r\ninterface CodeMultiplePickerProps extends CodePickerProps {\r\n validation?: ValidationProps;\r\n valueItems: ComplexValue<number>[];\r\n onChange: (value: ComplexValue<number>[]) => void;\r\n readOnly?: boolean;\r\n}\r\n\r\nexport class CodeMultiplePicker extends React.PureComponent<CodeMultiplePickerProps, CodePickerState> {\r\n\r\n public readonly state: Readonly<CodePickerState> = { loadedOptions: {} };\r\n\r\n private onLoadOptions = (options: LoadOptions) => {\r\n\r\n const { id, onLoadOptions } = this.props;\r\n\r\n onLoadOptions(id, options);\r\n this.setState({ loadedOptions: options });\r\n }\r\n\r\n public render() {\r\n\r\n const { id, label, valueItems, options, fetchingOptions, translation, onChange, validation, searchRequired, readOnly } = this.props;\r\n\r\n return <div className=\"col-lg-6 col-sm-12\">\r\n <SelectMultipleHierarchy\r\n componentId={id}\r\n className={undefined}\r\n label={label ? { text: label } : undefined}\r\n validation={validation}\r\n valueItems={valueItems || []}\r\n onChange={onChange}\r\n searchRequired={searchRequired}\r\n descriptionAllLevels={true}\r\n readOnly={readOnly}\r\n\r\n options={options}\r\n fetching={fetchingOptions}\r\n loadOptions={this.state.loadedOptions}\r\n onLoadOptions={this.onLoadOptions}\r\n textSearchRequired={translation && translation.search_required_message}\r\n textOptionsNotFound={translation && translation.no_options_found}\r\n textOptionsDone={translation && translation.done}\r\n placeholder={translation && translation.search}\r\n />\r\n </div>;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { CodetableOptions } from './types';\r\nimport { ACTION, RequestCodetable, ReceiveCodetable, FailCodetable } from './action-types';\r\n\r\ninterface CodetableItemState {\r\n codetableOptions: { [key: string]: CodetableOptions };\r\n}\r\n\r\nexport const reducers: { [indexer: string]: Reducer<CodetableItemState> } = {\r\n\r\n /**\r\n * Run when a component wants codetable data\r\n */\r\n [ACTION.REQUEST_CODETABLE]: (state: CodetableItemState, action: RequestCodetable): CodetableItemState => {\r\n return {\r\n ...state,\r\n codetableOptions: {\r\n ...(state.codetableOptions || {}),\r\n [action.id]: {\r\n fetching: true,\r\n loadOptionsParams: action.loadOptionsParams,\r\n codes: undefined\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component receives its code data\r\n */\r\n [ACTION.RECEIVE_CODETABLE]: (state: CodetableItemState, action: ReceiveCodetable): CodetableItemState => {\r\n\r\n if (!state.codetableOptions || !state.codetableOptions[action.id] ||\r\n !deepEquals(state.codetableOptions[action.id].loadOptionsParams, action.loadOptionsParams)) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n codetableOptions: {\r\n ...state.codetableOptions,\r\n [action.id]: {\r\n ...state.codetableOptions[action.id],\r\n fetching: false,\r\n codes: action.codes\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component fails to download codetable data\r\n */\r\n [ACTION.FAIL_CODETABLE]: (state: CodetableItemState, action: FailCodetable): CodetableItemState => {\r\n\r\n if (!state.codetableOptions || !state.codetableOptions[action.id] ||\r\n !deepEquals(state.codetableOptions[action.id].loadOptionsParams, action.loadOptionsParams)) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n codetableOptions: {\r\n ...state.codetableOptions,\r\n [action.id]: {\r\n ...state.codetableOptions[action.id],\r\n fetching: false\r\n }\r\n }\r\n };\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { Case } from './case';\r\nimport styles from './case-receipt.scss';\r\nimport { CasePasswordBanner } from 'ui';\r\nimport { STATE } from 'app/constants';\r\nimport { withRouter, WithRouterProps } from 'react-router';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { caseTranslations } from 'app/area/case/constants';\r\nimport { toCaseEdit } from 'app/area/shared/route-urls';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\nimport { authProvider } from 'dependencies/auth';\r\nimport { CaseState } from 'app/area/case/types-store';\r\nimport { globalVar } from 'app/infrastructure/universal';\r\n\r\ninterface CaseReceiptComponentProps {\r\n params: any;\r\n canRender: boolean;\r\n translation: any;\r\n}\r\n\r\nclass CaseReceiptComponent extends React.Component<CaseReceiptComponentProps & WithRouterProps> {\r\n public static statePath: string = STATE.case;\r\n\r\n public render() {\r\n const { params, canRender, translation } = this.props;\r\n const id = params.id;\r\n const anonCtx = globalVar('sessionStorage').getItem('anonCtx');\r\n\r\n const url = toAbsoluteUrl(toCaseEdit(id, ''), true) + \r\n (anonCtx ? `?anonCtx=${anonCtx}` : '');\r\n\r\n return (\r\n <>\r\n {canRender && <div className={`container ${styles.receipt}`}>\r\n <CasePasswordBanner textTitle={translation.public_case_submitted}>\r\n <p>{translation.public_follow_up}</p>\r\n <p><a href={url}>{url}</a></p>\r\n <p>{translation.public_info_case_password}</p>\r\n <p className={styles.casePassword}>{authProvider.getAuthorization()}</p>\r\n </CasePasswordBanner>\r\n </div>}\r\n <Case {...this.props} />\r\n </>\r\n );\r\n }\r\n}\r\n\r\nconst selectors = {\r\n canRender: (state: CaseState, props: any) => state.schema && !state.fetching\r\n};\r\n\r\nexport const CaseReceipt = containerFactory(\r\n withRouter(CaseReceiptComponent),\r\n undefined,\r\n selectors,\r\n caseTranslations\r\n);\r\n","var $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar has = require('../internals/has');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\n\n// `Reflect.get` method\n// https://tc39.github.io/ecma262/#sec-reflect.get\nfunction get(target, propertyKey /* , receiver */) {\n var receiver = arguments.length < 3 ? target : arguments[2];\n var descriptor, prototype;\n if (anObject(target) === receiver) return target[propertyKey];\n if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')\n ? descriptor.value\n : descriptor.get === undefined\n ? undefined\n : descriptor.get.call(receiver);\n if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);\n}\n\n$({ target: 'Reflect', stat: true }, {\n get: get\n});\n","\r\nexport const merge = (baseDate: Date, datePart: Date, timePart: Date) => {\r\n \r\n if ( !datePart ){\r\n return undefined;\r\n }\r\n \r\n const d = baseDate; \r\n const isValidDay = datePart && !isNaN(datePart.getTime());\r\n const isValidTime = timePart && !isNaN(timePart.getDate());\r\n\r\n if (isValidDay ){\r\n d.setTime(datePart.getTime()); \r\n d.setUTCHours(0, 0, 0, 0);\r\n }\r\n \r\n // set hours from time component, without affecting the selected date in case of crossing 24hrs timeline\r\n if (isValidTime){\r\n d.setUTCHours(timePart.getUTCHours());\r\n d.setUTCMinutes(timePart.getUTCMinutes());\r\n }\r\n \r\n return d;\r\n };\r\n","\r\nexport const getMonthsShort = (locale: string): any => {\r\n const result = [];\r\n for (let m = 0; m < 12; m++) {\r\n result.push(new Intl.DateTimeFormat(locale, { month: 'short' }).format(new Date(2012, m, 20, 12, 0, 0, 0)));\r\n }\r\n return result;\r\n};\r\n\r\nexport const getWeekDaysShort = (locale: string): any => {\r\n const result = []; \r\n for (let d = 2; d < 9; d++) {\r\n result.push(new Intl.DateTimeFormat(locale, { weekday: 'narrow' }).format(new Date(2012, 11, d, 12, 0, 0, 0)));\r\n } \r\n return result;\r\n};\r\n","export const createDateParser = (\r\n locale: string,\r\n createDate: (\r\n values?: {\r\n year?: number;\r\n month?: number;\r\n day?: number;\r\n hours?: number;\r\n minutes?: number;\r\n seconds?: number;\r\n milliseconds?: number;\r\n }\r\n ) => Date,\r\n parseDate: (dt: string) => Date,\r\n formatDate: (dt: Date, intlOptions?: any) => string\r\n) : DateParser => {\r\n const getInputFormatFromLocale = (): string => {\r\n // ensure we use gregorian calender always\r\n const hasCalendar = locale.indexOf('-gregory') > -1;\r\n const calendarLocale = hasCalendar ? locale : `${locale}-u-ca-gregory`;\r\n const d = new Intl.DateTimeFormat(calendarLocale, { timeZone: 'UTC' });\r\n // create a new date with fixed day, month and year\r\n const dt = createDate({ year: 2001, month: 4, day: 22 });\r\n // let the gregorian Intl format format our date\r\n const placeholder = d.format(dt); // e.g \"2/3/2001\"\r\n // replace day, month and year with y/m/d placeholders\r\n return placeholder\r\n .replace(/2001/, 'YYYY')\r\n .replace(/0?5/, 'MM')\r\n .replace(/2?2/, 'DD');\r\n };\r\n\r\n const getInputFormatDescriptor: any = () => {\r\n try {\r\n //goal: split \"yyyy-MM-dd\" into {year:0, month:1, day:2}\r\n const format = getInputFormatFromLocale()\r\n .split(/\\W/)\r\n .filter(x => !!x);\r\n const index = { y: 0, m: 0, d: 0 };\r\n\r\n for (let i = 0; i < format.length; i++) {\r\n //tslint:disable-line\r\n if (/[MM]/.test(format[i])) {\r\n index.m = i;\r\n } else if (/[DD]/.test(format[i])) {\r\n index.d = i;\r\n } else if (/[YYYY]/.test(format[i])) {\r\n index.y = i;\r\n }\r\n }\r\n return index;\r\n } catch (e) {\r\n return [];\r\n }\r\n };\r\n\r\n // tslint:disable-next-line:max-func-body-length\r\n const parseInputIntoYMDArray = (\r\n input: string,\r\n yearIndex: number,\r\n monthIndex: number\r\n ): string[] => {\r\n // TODO: return date\r\n //TODO: split into parsers-per-date-format, function is too big \r\n let inputF = input.replace(/[\\s]/g, '');\r\n switch (yearIndex) {\r\n case 0:\r\n monthIndex === 1\r\n ? (inputF =\r\n inputF.length === 7\r\n ? Number(inputF.substr(4, 2)) > 12\r\n ? inputF.replace(/^(\\d\\d\\d\\d)(\\d?\\d)(\\d\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d\\d\\d\\d)(\\d\\d)(\\d?\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d\\d\\d\\d)(\\d?\\d)(\\d?\\d)$/, '$1 $2 $3'))\r\n : (inputF =\r\n inputF.length === 7 && Number(inputF.substr(5, 2)) <= 12\r\n ? inputF.replace(/^(\\d\\d\\d\\d)(\\d?\\d)(\\d\\d)$/, '$1 $2 $3') \r\n : inputF.length === 6\r\n ? inputF.replace(/^(\\d\\d\\d\\d)(\\d)(\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d\\d\\d\\d)(\\d?\\d)(\\d?\\d)$/, '$1 $2 $3'));\r\n break;\r\n case 1:\r\n monthIndex === 0\r\n ? (inputF =\r\n inputF.length === 7\r\n ? Number(inputF.substr(0, 2)) > 12\r\n ? inputF.replace(/^(\\d?\\d)(\\d\\d\\d\\d)(\\d\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d\\d)(\\d\\d\\d\\d)(\\d?\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d?\\d)(\\d\\d\\d\\d)(\\d?\\d)$/, '$1 $2 $3'))\r\n : (inputF =\r\n inputF.length === 7 && Number(inputF.substr(5, 2)) <= 12\r\n ? inputF.replace(/^(\\d?\\d)(\\d\\d\\d\\d)(\\d\\d)$/, '$1 $2 $3') \r\n : inputF.length === 6\r\n ? inputF.replace(/^(\\d)(\\d\\d\\d\\d)(\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d?\\d)(\\d\\d\\d\\d)(\\d?\\d)$/, '$1 $2 $3'));\r\n break;\r\n case 2:\r\n monthIndex === 0\r\n ? (inputF =\r\n inputF.length === 7\r\n ? Number(inputF.substr(0, 2)) > 12\r\n ? inputF.replace(/^(\\d?\\d)(\\d\\d)(\\d\\d\\d\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d\\d)(\\d?\\d)(\\d\\d\\d\\d)$/, '$1 $2 $3') \r\n : inputF.length === 6\r\n ? inputF.replace(/^(\\d\\d)(\\d\\d)(\\d\\d)$/, '$1 $2 $3') \r\n : Number(inputF.substr(0, 2)) > 12\r\n ? inputF.replace(/^(\\d)(\\d?\\d)(\\d*)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d\\d)(\\d?\\d)(\\d\\d\\d\\d)$/, '$1 $2 $3'))\r\n : (inputF =\r\n inputF.length === 7 && Number(inputF.substr(1, 2)) <= 12\r\n ? inputF.replace(/^(\\d?\\d)(\\d\\d)(\\d\\d\\d\\d)$/, '$1 $2 $3') \r\n : inputF.length === 6\r\n ? inputF.replace(/^(\\d\\d)(\\d\\d)(\\d\\d)$/, '$1 $2 $3') \r\n : inputF.replace(/^(\\d?\\d)(\\d?\\d)(\\d\\d\\d\\d)$/, '$1 $2 $3'));\r\n break;\r\n default:\r\n break;\r\n }\r\n return inputF.split(/\\W/).filter(s => !!s).map(w=>w.length > 4 ? w.substr(0,4) : w);\r\n };\r\n\r\n const isYMDValidDateArgs = (year: number, month: number, day: number): boolean => {\r\n if (!year || month < 0 || !day) {\r\n return false;\r\n }\r\n\r\n if (\r\n isNaN(year) ||\r\n isNaN(month) ||\r\n isNaN(day)\r\n ) {\r\n return false;\r\n }\r\n\r\n if (\r\n year < 1900 || year > 9999 || \r\n month < 0 || month > 11 //JavaScript months are 0-11\r\n || day < 1 || day > 31\r\n ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n const parseToNewDate = (dateInput: string): Date => {\r\n try {\r\n const descriptor = getInputFormatDescriptor();\r\n const dateParts = parseInputIntoYMDArray(\r\n dateInput,\r\n descriptor.y,\r\n descriptor.m\r\n );\r\n \r\n let year = Number(dateParts[descriptor.y]);\r\n const month = Number(dateParts[descriptor.m]) - 1; // Calendar month vs JavaScript month\r\n const day = Number(dateParts[descriptor.d]);\r\n \r\n // 2-digit years to 4-digit, handle as 2000+\r\n if (year < 100 ){\r\n year = (new Date().getUTCFullYear() - year) + year;\r\n }\r\n\r\n const isValidInput = isYMDValidDateArgs(year, month, day);\r\n return isValidInput ? createDate({year, month, day, hours: 0, minutes: 0, seconds: 0, milliseconds: 0}) : undefined;\r\n\r\n } catch (e) {\r\n return undefined;\r\n }\r\n };\r\n\r\n /**\r\n * \r\n * @param shortcut example: ['d', '+', '1'] => add one day\r\n */\r\n const addDaysFromUserShortcut: any = ([shortcut, operator, days]: RegExpMatchArray): Date => {\r\n if (!shortcut || !shortcut.length) { \r\n return undefined;\r\n }\r\n\r\n const result = createDate({\r\n hours: 0,\r\n minutes: 0,\r\n seconds: 0,\r\n milliseconds: 0\r\n });\r\n \r\n let daysToAdd: number = Number(days) || 0;\r\n \r\n if (`${shortcut}`.match(/tomorrow/i)) {\r\n daysToAdd = 1;\r\n operator = '+';\r\n }\r\n\r\n if (`${shortcut}`.match(/yesterday/i)) {\r\n daysToAdd = 1;\r\n operator = '-';\r\n }\r\n \r\n if (operator && operator === '+'){\r\n result.setUTCDate(result.getUTCDate() + daysToAdd);\r\n }\r\n\r\n if (operator === '-'){\r\n result.setUTCDate(result.getUTCDate() - daysToAdd);\r\n } \r\n \r\n return isYMDValidDateArgs(result.getUTCFullYear(), result.getUTCMonth(), result.getUTCDate()) ? result : undefined;\r\n };\r\n\r\n const addMonthsFromUserShortcut: any = ([shortcut, operator, months]: RegExpMatchArray): Date => {\r\n if (!shortcut || !shortcut.length) {\r\n return undefined;\r\n }\r\n const result = createDate({\r\n hours: 0,\r\n minutes: 0,\r\n seconds: 0,\r\n milliseconds: 0\r\n });\r\n \r\n const monthsToAdd = Number(months) || 0; \r\n \r\n if ( operator === '+'){\r\n result.setUTCMonth(result.getUTCMonth() + monthsToAdd);\r\n }\r\n\r\n if ( operator === '-'){\r\n result.setUTCMonth(result.getUTCMonth() - monthsToAdd);\r\n } \r\n \r\n return isYMDValidDateArgs(result.getUTCFullYear(), result.getUTCMonth(), result.getUTCDate()) ? result : undefined; \r\n };\r\n\r\n const addYearsFromUserShortcut: any = ([shortcut, operator, years]: RegExpMatchArray) : Date => {\r\n if (!shortcut || !shortcut.length) {\r\n return undefined;\r\n }\r\n const result = createDate({\r\n hours: 0,\r\n minutes: 0,\r\n seconds: 0,\r\n milliseconds: 0\r\n });\r\n \r\n const yearsToAdd: number = Number(years) || 0; \r\n \r\n if (operator === '+'){\r\n result.setUTCFullYear(result.getUTCFullYear() + yearsToAdd);\r\n }\r\n \r\n if (operator === '-'){\r\n result.setUTCFullYear(result.getUTCFullYear() - yearsToAdd);\r\n }\r\n\r\n return isYMDValidDateArgs(result.getUTCFullYear(), result.getUTCMonth(), result.getUTCDate()) ? result : undefined; \r\n };\r\n\r\n const parseDateFromUserShortcut = (input: string): Date => {\r\n \r\n const hasSpecialCharacters = input.match(/[!@#$%^&*(),.?\":{}|<>]/g);\r\n if(hasSpecialCharacters){\r\n return undefined;\r\n }\r\n const matchedDayShortcut = input.match(\r\n /^\\s*?(now|today|tomorrow|yesterday|d|n|t)?(?![\\w\\d])(\\+|\\-)?(\\d*)?\\s?/i\r\n );\r\n const matchedDayShortcutDayPart = matchedDayShortcut && matchedDayShortcut.slice(1)[0] || 'd'; //default to 'd'\r\n const matchedDayShortcutOperatorPart = matchedDayShortcut && matchedDayShortcut.slice(1)[1];\r\n const matchedDayShortcutDaysPart = matchedDayShortcut && matchedDayShortcut.slice(1)[2]; \r\n const calculatedDateFromDayShortcut: Date = matchedDayShortcut && \r\n addDaysFromUserShortcut([matchedDayShortcutDayPart, matchedDayShortcutOperatorPart, matchedDayShortcutDaysPart]);\r\n \r\n const matchedMonthShortcut = input.match(/^\\s*?([m])(\\+|\\-)?(\\d*)?\\s?/i);\r\n const calculatedDateFromMonthShortcut = matchedMonthShortcut && addMonthsFromUserShortcut(matchedMonthShortcut.slice(1));\r\n \r\n const matchedYearShortcut = input.match(/^\\s*?([y])(\\+|\\-)?(\\d*)?\\s?/i);\r\n const calculatedDateFromYearShortcut = matchedYearShortcut && addYearsFromUserShortcut(matchedYearShortcut.slice(1));\r\n\r\n const [calculatedDateFromUserShortcut] = [\r\n calculatedDateFromDayShortcut, calculatedDateFromMonthShortcut, calculatedDateFromYearShortcut\r\n ].filter( (x: Date) => (x instanceof Date)); \r\n \r\n return calculatedDateFromUserShortcut;\r\n };\r\n\r\n const parseDateInputOrUserShortcut = (input: string) : Date => {\r\n if (!input) {\r\n return undefined;\r\n }\r\n const parsedDate: any = parseToNewDate(input) || parseDateFromUserShortcut(input);\r\n \r\n return parsedDate || undefined;\r\n };\r\n\r\n const isValidDate = (input: Date): boolean => !!input && !isNaN(input.getTime());\r\n \r\n //TODO: if a function must parse string into string, then it's a mix of parser and formatter, or a transformer\r\n // all parsers should create a Date from a string. This should be cleaned up to keep code maintainable.\r\n return {\r\n parseDateInputOrUserShortcut,\r\n parseInputIntoYMDArray,\r\n addYearsFromUserShortcut,\r\n addMonthsFromUserShortcut,\r\n addDaysFromUserShortcut,\r\n getInputFormatFromLocale,\r\n isValidDate\r\n };\r\n};\r\n\r\nexport interface DateParser{\r\n parseDateInputOrUserShortcut: (input: string) => Date;\r\n \r\n parseInputIntoYMDArray: ( //Note: only exposed due to existing unit tests. Should be fixed\r\n input: string,\r\n yearIndex: number,\r\n monthIndex: number) => string[];\r\n\r\n addYearsFromUserShortcut: (match: RegExpMatchArray) => Date;\r\n addMonthsFromUserShortcut: (match: RegExpMatchArray) => Date;\r\n addDaysFromUserShortcut: (match: RegExpMatchArray) => Date;\r\n getInputFormatFromLocale: () => string;\r\n isValidDate: (dt: Date) => boolean;\r\n}\r\n","import { getWeekDaysShort, getMonthsShort } from './date-format';\r\nimport * as React from 'react';\r\nimport DayPicker, { DateUtils } from 'react-day-picker/DayPicker';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { DateTimeProps } from '../date-time-props';\r\nimport FaCalendar from 'react-icons/lib/fa/calendar';\r\nimport { ButtonInputGroup } from '../../common';\r\nimport { createDateParser, DateParser } from './parse-date';\r\nimport isDate from 'lodash/isdate';\r\nimport 'react-day-picker/lib/style.css';\r\nimport { Triangle } from 'ui';\r\nimport { OnClickOutside } from 'ui/common/on-click-outside';\r\nimport styles from './date.scss';\r\nimport { ANIMATE_OUT_SPEED } from 'ui/constants';\r\n\r\ninterface DatePickerState {\r\n /**\r\n * Whenever the user types something, it's stored and later parsed, triggered by a separate event\r\n */\r\n\r\n usersCurrentDateInput?: string;\r\n /**\r\n * When input does not have focus, the selected date is displayed in this friendly display format\r\n */\r\n formattedForDisplay?: string;\r\n /**\r\n * When input has focus, the selected date is shown in the format users should enter dates manually\r\n */\r\n formattedForInput?: string;\r\n /**\r\n * True when datepicker calendar is open\r\n */\r\n showDatePicker?: boolean;\r\n /**\r\n * The current value\r\n */\r\n selectedDay?: Date;\r\n /**\r\n * When focused, input displays the value in the current date *input format*\r\n */\r\n inputHasFocus?: boolean;\r\n /**\r\n * True after close was triggered and before DOM removal. Used for outro animation.\r\n */\r\n isClosing?: boolean;\r\n}\r\n\r\nexport class DatePicker extends React.Component<DateTimeProps, DatePickerState> {\r\n private parser: DateParser;\r\n private monthNames: string[];\r\n private weekDayNames: string[];\r\n private calendarLocale: string;\r\n private currentFormat: string;\r\n\r\n /**\r\n * Creates a Date component.\r\n *\r\n */\r\n constructor(props: DateTimeProps) {\r\n super(props);\r\n\r\n this.parser = createDateParser(\r\n props.locale,\r\n props.createDate,\r\n props.parseDate,\r\n props.formatDate\r\n );\r\n this.calendarLocale = `${props.locale}-u-ca-gregory`;\r\n this.monthNames = getMonthsShort(this.calendarLocale);\r\n this.weekDayNames = getWeekDaysShort(this.calendarLocale);\r\n this.currentFormat = this.parser.getInputFormatFromLocale();\r\n\r\n this.state = {\r\n formattedForDisplay: '',\r\n formattedForInput: '',\r\n selectedDay: props.value,\r\n showDatePicker: false,\r\n inputHasFocus: false,\r\n isClosing: false\r\n };\r\n }\r\n\r\n public componentDidMount() {\r\n this.updateInternalState(this.props.value);\r\n }\r\n\r\n public UNSAFE_componentWillReceiveProps(props: DateTimeProps) {\r\n const newIsDate = isDate(props.value);\r\n const newValue = newIsDate && props.value.getTime();\r\n const oldValue = isDate(this.props.value) && this.props.value.getTime();\r\n if (oldValue !== newValue) {\r\n this.updateInternalState(props.value);\r\n }\r\n }\r\n\r\n /**\r\n * @private Clears state to default\r\n *\r\n */\r\n private clearState = (additionalState: Partial<DatePickerState> = {}) => {\r\n this.setState(\r\n {\r\n usersCurrentDateInput: '',\r\n formattedForDisplay: '',\r\n formattedForInput: '',\r\n selectedDay: undefined,\r\n isClosing: false,\r\n ...additionalState\r\n },\r\n () => {\r\n this.props.onChange && this.props.onChange(this.state.selectedDay);\r\n }\r\n );\r\n }\r\n\r\n /**\r\n * @private Calculated display and input strings based on the current selected Date\r\n * Clears state if date argument is invalid\r\n *\r\n */\r\n private updateInternalState = (\r\n date: Date,\r\n additionalState: Partial<DatePickerState> = {},\r\n fireOnChange?: boolean\r\n ) => {\r\n if (this.parser.isValidDate(date)) {\r\n const { formatDate } = this.props;\r\n const inputFormatted = formatDate(date, {\r\n day: 'numeric',\r\n month: 'numeric',\r\n year: 'numeric'\r\n });\r\n this.setState({\r\n formattedForDisplay: formatDate(date, {\r\n weekday: 'short',\r\n day: 'numeric',\r\n month: 'short',\r\n year: 'numeric'\r\n }),\r\n formattedForInput: inputFormatted,\r\n usersCurrentDateInput: inputFormatted,\r\n selectedDay: date,\r\n ...additionalState\r\n });\r\n fireOnChange && this.props.onChange && this.props.onChange(date);\r\n } else {\r\n this.clearState(additionalState);\r\n }\r\n }\r\n\r\n /**\r\n * @private Handles blur event for date input.\r\n */\r\n private handleInputBlur = () => {\r\n this.setState({ inputHasFocus: false });\r\n\r\n // prevent firing on every focus+blur if users did not change anything\r\n if (this.state.usersCurrentDateInput !== this.state.formattedForInput) {\r\n\r\n const parsedDateInput = this.parser.parseDateInputOrUserShortcut(\r\n this.state.usersCurrentDateInput\r\n );\r\n\r\n this.updateInternalState(\r\n parsedDateInput,\r\n { selectedDay: parsedDateInput },\r\n true\r\n ); //TODO: true as named parameter\r\n\r\n }\r\n }\r\n /**\r\n * @private Handles if there is any input change for date.\r\n *\r\n */\r\n private handleInputChange = (e: React.SyntheticEvent<any>) => {\r\n const { value } = e.target as HTMLInputElement;\r\n this.setState({ usersCurrentDateInput: value });\r\n }\r\n\r\n private handleInputFocus = (e: React.SyntheticEvent<any>) => {\r\n this.setState({\r\n inputHasFocus: true\r\n });\r\n this.closePicker();\r\n }\r\n\r\n /**\r\n * @private Handles selecting date from date picker\r\n *\r\n */\r\n private handleDayClick = (\r\n day: Date,\r\n { selected, disabled }: any,\r\n e: React.SyntheticEvent<any>\r\n ) => {\r\n if (disabled) {\r\n return;\r\n }\r\n\r\n this.setState({ isClosing: true });\r\n this.updateInternalState(day, { showDatePicker: true, isClosing: true }, true);\r\n\r\n setTimeout(() => {\r\n this.setState({ isClosing: false, showDatePicker: false });\r\n }, ANIMATE_OUT_SPEED);\r\n\r\n }\r\n\r\n /**\r\n * Callback used by 3rd party component\r\n */\r\n private handleSelectedDay = (day: Date) => {\r\n return DateUtils.isSameDay(this.state.selectedDay, day);\r\n }\r\n\r\n /**\r\n * @private Handles when to hide the date picker\r\n *\r\n */\r\n private hidePicker = (e: React.SyntheticEvent<any>) => {\r\n this.closePicker();\r\n }\r\n\r\n private keyMap: any = {\r\n escapeKey: ['esc']\r\n };\r\n\r\n private handlerHotkeys: any = {\r\n escapeKey: (e: React.SyntheticEvent<any>) => this.hidePicker(e)\r\n };\r\n\r\n private renderDayString = (day: Date) => {\r\n return day.getDate().toLocaleString(this.props.locale);\r\n }\r\n\r\n private disabled = () => this.props.disablePast && DateUtils.isPastDay;\r\n\r\n private closePicker = () => {\r\n if (this.state.showDatePicker) {\r\n this.setState({ isClosing: true });\r\n\r\n setTimeout(() => {\r\n this.setState({\r\n showDatePicker: false,\r\n isClosing: false\r\n });\r\n }, ANIMATE_OUT_SPEED);\r\n }\r\n }\r\n\r\n private togglePicker = (e: React.SyntheticEvent<any>) => {\r\n if (this.state.showDatePicker) {\r\n this.closePicker();\r\n } else {\r\n this.setState({ showDatePicker: true });\r\n }\r\n }\r\n\r\n private get currentDisplayValue() {\r\n //unless user has typed something, show the date in the format user should enter dates\r\n // input gets cleared on blur, and only the input format and display format is kept\r\n let displayValueWhenInputHasFocus = this.state.usersCurrentDateInput;\r\n if (displayValueWhenInputHasFocus === undefined) {\r\n displayValueWhenInputHasFocus = this.state.formattedForInput;\r\n }\r\n\r\n return this.state.inputHasFocus\r\n ? displayValueWhenInputHasFocus\r\n : this.state.formattedForDisplay;\r\n }\r\n\r\n private renderDatePickerCustomDisplay = ({ date }: { date?: Date }) => {\r\n const months = this.monthNames;\r\n\r\n // Fallback to users local current year and month for use as navigation in the calendar\r\n const currentMonth = date ? date.getUTCMonth() : new Date().getUTCMonth();\r\n const currentYear = date\r\n ? date\r\n .getUTCFullYear()\r\n .toLocaleString(this.props.locale)\r\n .replace(/[\\s \\, \\.]/g, '')\r\n : new Date().getFullYear();\r\n\r\n return (\r\n <div className=\"DayPicker-Caption\">\r\n <div className={styles.captionMonth}>\r\n {months[currentMonth]}\r\n </div>\r\n <div className={styles.captionYear}>\r\n {currentYear}\r\n </div>\r\n </div>\r\n );\r\n }\r\n public render() {\r\n const modifiers = { selected: this.handleSelectedDay };\r\n const Caption = this.renderDatePickerCustomDisplay; //tslint:disable-line\r\n\r\n if (this.props.readOnly) {\r\n return <div className={`input-wrapper ${styles.wrapper}`}>\r\n <div className=\"input-group form-control-padding\">{this.currentDisplayValue || '\\u00A0'}</div>\r\n </div>;\r\n }\r\n\r\n const datePicker = (\r\n <div className={styles.pickerWrapper}>\r\n <DayPicker\r\n locale={this.calendarLocale}\r\n months={this.monthNames}\r\n weekdaysShort={this.weekDayNames}\r\n onDayClick={this.handleDayClick}\r\n modifiers={modifiers}\r\n disabledDays={this.disabled()}\r\n enableOutsideDays={true}\r\n initialMonth={this.state.selectedDay}\r\n renderDay={this.renderDayString}\r\n captionElement={<Caption />}\r\n showOutsideDays\r\n />\r\n </div>\r\n );\r\n\r\n const dateIconClickHandler = !this.props.readOnly\r\n ? this.togglePicker\r\n : undefined;\r\n\r\n const animateOut = this.state.isClosing ? 'animate-out' : '';\r\n\r\n return (\r\n <OnClickOutside onClickOutside={this.closePicker}>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlerHotkeys}>\r\n <div\r\n className={`input-wrapper ${styles.wrapper}`}\r\n >\r\n <div className=\"input-group\">\r\n <input\r\n type=\"text\"\r\n className={`form-control ${styles.dateInput}`}\r\n placeholder={!this.props.readOnly && this.currentFormat}\r\n value={this.currentDisplayValue}\r\n onChange={this.handleInputChange}\r\n onFocus={this.handleInputFocus}\r\n readOnly={this.props.readOnly}\r\n disabled={this.props.readOnly}\r\n onBlur={this.handleInputBlur}\r\n autoFocus={this.props.focus}\r\n />\r\n <span className=\"input-group-btn\">\r\n <ButtonInputGroup\r\n disabled={this.props.readOnly}\r\n onClick={dateIconClickHandler}\r\n icon={FaCalendar}\r\n />\r\n </span>\r\n </div>\r\n </div>\r\n {this.state.showDatePicker &&\r\n <div className={`${styles.picker} scale-animate ${animateOut}`}>\r\n <Triangle />\r\n {datePicker}\r\n </div>\r\n }\r\n </HotKeys>\r\n </OnClickOutside>\r\n );\r\n }\r\n}\r\n","\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const timeParser = (\r\n locale: string,\r\n use12hr: boolean,\r\n formatDate: (dt: Date) => string,\r\n createDate: (\r\n values?: {\r\n year?: number;\r\n month?: number;\r\n day?: number;\r\n hours?: number;\r\n minutes?: number;\r\n seconds?: number;\r\n }\r\n ) => Date\r\n) => {\r\n\r\n const meridiemCache = { am: '', pm: '' };\r\n\r\n const getAmPmSuffixFromCurrentLocaleIfAny = (): {am: string; pm: string; } => {\r\n \r\n if (!!meridiemCache.am){\r\n return meridiemCache;\r\n }\r\n\r\n const is24hr = new Date(Date.UTC(2017, 1, 1, 15, 0, 0, 0)).toLocaleTimeString(locale, {timeZone: 'UTC'}).indexOf('15') > -1;\r\n if (is24hr) {\r\n //not using 12hr clock\r\n return {am: '', pm: ''};\r\n }\r\n\r\n const dateStringWithAM = new Date(Date.UTC(2017, 1, 1, 0, 0, 0, 0))\r\n .toLocaleTimeString(locale, {timeZone: 'UTC'});\r\n const dateStringWithPM = new Date(Date.UTC(2017, 1, 1, 15, 0, 0, 0))\r\n .toLocaleTimeString(locale, {timeZone: 'UTC'});\r\n\r\n //TODO: cleanup and simplify rest of this\r\n let matchForAM = dateStringWithAM.match(/([^\\d:\\s\\.])/gi).slice(-2); //to get around empty strings in IE\r\n let matchForPM = dateStringWithPM.match(/([^\\d:\\s\\.])/gi).slice(-2); //to get around empty strings in IE\r\n let am = matchForAM[0] && matchForAM[1] ? matchForAM.join('') : '';\r\n let pm = matchForPM[0] && matchForPM[1] ? matchForPM.join('') : '';\r\n \r\n if (!am && !/\\d/.test(dateStringWithAM)) {\r\n matchForAM = dateStringWithAM.match(dateStringWithAM.substring(0, dateStringWithAM.indexOf(' ')));\r\n matchForPM = dateStringWithPM.match(dateStringWithAM.substring(0, dateStringWithPM.indexOf(' ')));\r\n\r\n const index = dateStringWithAM.indexOf(' ', dateStringWithAM.indexOf(' '));\r\n if (index >= 0) {\r\n am = dateStringWithAM.substr(index + 1);\r\n pm = dateStringWithPM.substr(index + 1);\r\n }\r\n }\r\n meridiemCache.am = am;\r\n meridiemCache.pm = pm;\r\n return meridiemCache;\r\n };\r\n\r\n const parseTimeStringAs24Hr = (timeString: string) => {\r\n let time = timeString.match(/^\\s*?(\\d?\\d):?\\s?(\\d?\\d?)/);\r\n if (timeString.length === 0 || !time) {\r\n return [undefined, undefined];\r\n }\r\n\r\n let hours = Number(time[1]);\r\n let minutes = Number(time[2]) || 0;\r\n\r\n if (hours > 24) {\r\n // if input is in different format e.g., 'hm, or hmm, etc.' than standard 'hh:mm'\r\n time = timeString.match(/(\\d)(\\d?\\d?)/);\r\n minutes = Number(time[2]) || 0;\r\n //add +1 to hour if minute parsed input exceeds 60 limit\r\n hours = minutes > 60 ? Number(time[1]) + 1 : Number(time[1]);\r\n }\r\n minutes = minutes > 60 ? 0 : minutes;\r\n\r\n return [hours, minutes];\r\n };\r\n\r\n /**\r\n * @private 12 hr clock parsing\r\n *\r\n */\r\n const parseTimeStringAs12Hr = (timeString: string) => {\r\n let time = String(timeString).match(/^\\W*?(\\d?\\d):?\\s?(\\d?\\d?)?\\W*?/i);\r\n const {am, pm} = getAmPmSuffixFromCurrentLocaleIfAny();\r\n const defaultMeridian = pm;\r\n\r\n if (!time) {\r\n return [undefined, undefined];\r\n }\r\n let hours = Number(time[1]);\r\n let minutes = Number(time[2]) || 0;\r\n\r\n //TODO: This. is. crazy. Unreadable.\r\n const ampm =\r\n timeString.includes(am) ||\r\n timeString.includes(am.toLowerCase())\r\n ? am\r\n : timeString.includes(pm) ||\r\n timeString.includes(pm.toLowerCase())\r\n ? pm\r\n : defaultMeridian;\r\n\r\n if (hours > 12) {\r\n // if input is in different format e.g., 'hm, or hmm, etc.' than standard 'hh:mm'\r\n time = timeString.match(/(\\d)(\\d?\\d?)/);\r\n minutes = Number(time[2]) || 0;\r\n //add +1 to hour if minute parsed input exceeds 60 limit\r\n hours = minutes > 60 ? Number(time[1]) + 1 : Number(time[1]);\r\n }\r\n minutes = minutes > 60 ? 0 : minutes;\r\n\r\n return [hours, minutes, ampm];\r\n };\r\n\r\n const addHoursAndReturnHours: any = (hours: number, operator: string) => {\r\n\r\n const now = createDate();\r\n\r\n if (operator === '+') {\r\n now.setUTCHours(now.getUTCHours() + hours);\r\n return now.getUTCHours();\r\n }\r\n if (operator === '-') {\r\n now.setUTCHours(now.getUTCHours() - hours);\r\n return now.getUTCHours();\r\n } \r\n\r\n return now.getUTCHours();\r\n \r\n };\r\n\r\n //TODO: what is the meaning of this method?\r\n const addHoursAndReturnHoursAndMeridien = (addHour: number) => {\r\n addHour = addHour ? addHour : 0;\r\n\r\n const time = createDate(); \r\n let AM = true;\r\n let ndble = 0;\r\n let hours;\r\n let newHour;\r\n let overHour;\r\n\r\n //TODO: there is a function here for this, convert12To24\r\n //change form 24 to 12 hour clock\r\n if (time.getUTCHours() >= 13) {\r\n hours = time.getUTCHours() - 12;\r\n AM = hours > 12 ? true : false;\r\n } else {\r\n hours = time.getUTCHours();\r\n AM = hours > 12 ? false : true;\r\n }\r\n //set hour\r\n if (hours + addHour >= 13 || hours + addHour <= 0) {\r\n overHour = (hours + addHour) % 12;\r\n ndble = Math.floor(Math.abs((hours + addHour) / 12));\r\n if (overHour <= 0) {\r\n newHour = overHour + 12;\r\n if (overHour === 0) {\r\n ndble++;\r\n }\r\n } else {\r\n if (overHour === 0) {\r\n newHour = 12;\r\n ndble++;\r\n } else {\r\n ndble++;\r\n newHour = overHour;\r\n }\r\n }\r\n AM = (ndble + 1) % 2 === 0 ? AM : !AM;\r\n } else {\r\n AM = hours + addHour === 12 ? !AM : AM;\r\n newHour = hours + addHour;\r\n }\r\n const {am, pm} = getAmPmSuffixFromCurrentLocaleIfAny();\r\n const ampm = AM ? am : pm;\r\n return [newHour, ampm];\r\n };\r\n\r\n /**\r\n * @private Shortcuts for time\r\n *\r\n */\r\n const addHoursFromUserShortcut = (\r\n shortcut: string[],\r\n use24HourTime: boolean\r\n ) : any[] => {\r\n if (!shortcut) {\r\n return undefined;\r\n }\r\n \r\n const operator = shortcut[1];\r\n const hours = Number(shortcut[2]);\r\n const now = createDate();\r\n const minutes = now.getUTCMinutes();\r\n\r\n if (shortcut[0] && !operator && !hours) {\r\n \r\n if (use24HourTime) {\r\n const hoursR = addHoursAndReturnHours(0, '');\r\n return [hoursR, minutes];\r\n } else {\r\n const hoursR = addHoursAndReturnHoursAndMeridien(0)[0];\r\n const ttPart = addHoursAndReturnHoursAndMeridien(0)[1];\r\n \r\n return [hoursR, minutes, ttPart];\r\n }\r\n }\r\n if (operator === '+') {\r\n if (use24HourTime) {\r\n const hoursR = addHoursAndReturnHours(hours, '+');\r\n return [hoursR, minutes];\r\n } else {\r\n const hoursR = addHoursAndReturnHoursAndMeridien(hours)[0];\r\n const ttPart = addHoursAndReturnHoursAndMeridien(hours)[1];\r\n return [hoursR, minutes, ttPart];\r\n }\r\n }\r\n if (operator === '-') {\r\n if (use24HourTime) {\r\n const hoursR = addHoursAndReturnHours(hours, '-');\r\n return [hoursR, minutes];\r\n } else {\r\n const hoursR = addHoursAndReturnHoursAndMeridien(-hours)[0];\r\n const ttPart = addHoursAndReturnHoursAndMeridien(-hours)[1];\r\n return [hoursR, minutes, ttPart];\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n };\r\n\r\n const parseStringAndReturnHhMMAndSuffix = (time24hr: string) => {\r\n const time12hr = { hours: 0, minutes: 0, ampm: '' };\r\n const hours24 = Number(time24hr.split(':')[0]);\r\n const {am, pm} = getAmPmSuffixFromCurrentLocaleIfAny();\r\n\r\n time12hr.hours = (hours24 + 11) % 12 + 1;\r\n time12hr.minutes = Number(time24hr.split(':')[1]);\r\n time12hr.ampm = hours24 >= 12 ? pm : am;\r\n\r\n return time12hr;\r\n };\r\n\r\n const convert24To12 = (hours: number) => {\r\n return (hours + 11) % 12 + 1;\r\n };\r\n\r\n const convert12To24 = (\r\n hours: number,\r\n minutes: number,\r\n meridian: string\r\n ): number => {\r\n const {am, pm} = getAmPmSuffixFromCurrentLocaleIfAny();\r\n\r\n if (!am){\r\n return hours;\r\n }\r\n\r\n let hours24 = hours;\r\n if (meridian === pm && hours < 12) {\r\n hours24 = hours + 12;\r\n } else if (meridian === am && hours === 12) {\r\n hours24 = 0;\r\n }\r\n\r\n return hours24;\r\n };\r\n\r\n const parseStringAs12HoursAndReturnHours = (userInput: string) => {\r\n return parseStringAndReturnHhMMAndSuffix(userInput).hours;\r\n };\r\n\r\n const getAmPmSuffixesFromUserInput = (userInput: string) => {\r\n return use12hr ? parseStringAndReturnHhMMAndSuffix(userInput).ampm : '';\r\n };\r\n\r\n const parseTimeInputOrUserShortcut: any = (input: string) => {\r\n const isShortcut = String(input).match(/\\b([h|n|t])(\\+|\\-)?(\\d\\d?)?\\s?/i);\r\n const calculatedTime =\r\n isShortcut && addHoursFromUserShortcut(isShortcut.slice(1), !use12hr);\r\n const parsedTime =\r\n !isShortcut &&\r\n input &&\r\n (!use12hr ? parseTimeStringAs24Hr(input) : parseTimeStringAs12Hr(input));\r\n\r\n return calculatedTime || parsedTime || undefined;\r\n };\r\n\r\n //TODO: there is no reason these functions should return anything but UTC date objects\r\n //TODO: fix duplicates below\r\n return {\r\n parseTimeInputOrUserShortcut,\r\n parseStringAs12HoursAndReturnHours,\r\n convert12To24,\r\n convert24To12, \r\n parseStringAndReturnHhMMAndSuffix,\r\n addHoursFromUserShortcut,\r\n addHoursAndReturnHoursAndMeridien,\r\n addHoursAndReturnHours,\r\n parseTimeStringAs12Hr,\r\n parseTimeStringAs24Hr,\r\n getAmPmSuffixesFromUserInput, \r\n getAmPmSuffixFromCurrentLocaleIfAny\r\n };\r\n};\r\n","export const timeFormatter = (\r\n locale: string,\r\n hour12: boolean,\r\n createDate: (\r\n values?: {\r\n year?: number;\r\n month?: number;\r\n day?: number;\r\n hours?: number;\r\n minutes?: number;\r\n seconds?: number;\r\n }\r\n ) => Date,\r\n formatDate: (dt: Date, options?: any) => string\r\n) => {\r\n \r\n const formatTime = (\r\n hours: number,\r\n minutes: number\r\n ): string => {\r\n return formatDate(\r\n createDate(\r\n { year: 1996, month: 11, day: 1, hours, minutes }),\r\n {\r\n hour: '2-digit',\r\n minute: '2-digit',\r\n hour12 // setting 12 or 24 hour format\r\n }\r\n );\r\n };\r\n\r\n const numericDisplay = (num: Number) => {\r\n return Number(num).toLocaleString(locale);\r\n };\r\n\r\n // TODO should be merged with formatTime above\r\n const formatTimePicker = (\r\n num: number,\r\n mode: 'info' | 'clock' = 'clock'\r\n ): string => { \r\n let numInCurrentLocale = numericDisplay(num);\r\n const prefixZeroInCurrentLocale = numericDisplay(0); \r\n\r\n if (mode === 'info') {\r\n if(num < 9) {\r\n numInCurrentLocale = prefixZeroInCurrentLocale + numInCurrentLocale;\r\n }\r\n }\r\n return numInCurrentLocale;\r\n };\r\n\r\n return {\r\n formatTimePicker,\r\n formatTime,\r\n numericDisplay\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport {Timepicker} from 'react-timepicker';\r\nimport 'react-timepicker/timepicker.css';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { DateTimeProps } from '../date-time-props';\r\nimport FaClockO from 'react-icons/lib/fa/clock-o';\r\nimport { ButtonInputGroup, ButtonPrimary, Validation, ValidationLevel } from '../../common';\r\nimport { timeParser } from './parse-time';\r\nimport { timeFormatter } from 'ui/date-time/time/format-time';\r\nimport isDate from 'lodash/isdate';\r\nimport { Triangle } from 'ui';\r\nimport styles from './time.scss';\r\nimport { ANIMATE_OUT_SPEED } from 'ui/constants';\r\nimport { OnClickOutside } from 'ui/common/on-click-outside';\r\n\r\ninterface TimePickerState{\r\n selectedHours?: number;\r\n selectedHours24?: number;\r\n selectedMinutes?: number;\r\n value?: string;\r\n showClock?: boolean;\r\n isClosing: boolean;\r\n selectedMeridian?: string; //TODO: check if it can be removed. Should be a formatting concern\r\n selectHours?: boolean; // used to force overriding the internal hours/minutes state of the ugly time picker\r\n emptyDateError?: boolean;\r\n}\r\n\r\nexport class TimePicker extends React.Component <DateTimeProps, TimePickerState> {\r\n private meridianAm: string ;\r\n private meridianPm: string;\r\n private keyMap: any = { escapeKey: ['esc'], enterKey: ['enter'] };\r\n private use12HrTime: boolean = !!(this.meridianAm || this.meridianPm);\r\n private parser: any; //TODO: not gonna type this before next refactor\r\n private formatter: any;\r\n /**\r\n * Creates a Time component with default state.\r\n *\r\n */\r\n constructor(props: DateTimeProps) {\r\n super(props);\r\n\r\n // TODO: fix the double timeParser initialize\r\n this.parser = timeParser(props.locale, false, props.formatDate, props.createDate);\r\n\r\n this.meridianAm = this.parser.getAmPmSuffixFromCurrentLocaleIfAny().am; //no need for this here, todo: this.parser.amSuffix\r\n this.meridianPm = this.parser.getAmPmSuffixFromCurrentLocaleIfAny().pm; //no need for this here, todo: this.parser.pmSuffix\r\n this.use12HrTime = !!(this.meridianAm || this.meridianPm); // todo: this.use12hour = this.parser.currentLocaleIs12hour\r\n this.parser = timeParser(props.locale, this.use12HrTime, props.formatDate, props.createDate);\r\n\r\n this.formatter = timeFormatter(props.locale, this.use12HrTime, props.createDate, props.formatDate );\r\n this.state = this.calculateInitialOrUpdatedState(props.value);\r\n }\r\n\r\n public UNSAFE_componentWillReceiveProps(props: DateTimeProps) {\r\n const newValue = isDate(props.value) ? props.value.getTime() : undefined;\r\n const oldValue = isDate(this.props.value) ? this.props.value.getTime() : undefined;\r\n if(!newValue) {\r\n this.setState({value: ''});\r\n return;\r\n }\r\n const valueDidChange = !!newValue && newValue !== oldValue;\r\n if (valueDidChange) {\r\n this.setState(this.calculateInitialOrUpdatedState(props.value));\r\n }\r\n }\r\n\r\n private calculateInitialOrUpdatedState = (valueProp: Date) => {\r\n let hours, hours24, minutes, meridian, valueInCurrentLocale; //tslint:disable-line\r\n\r\n if (valueProp instanceof Date) {\r\n minutes = valueProp.getUTCMinutes();\r\n hours24 = valueProp.getUTCHours();\r\n valueInCurrentLocale = this.getDisplayValue(hours24, minutes);\r\n meridian = this.parser.getAmPmSuffixesFromUserInput(hours24 + ':' + minutes);\r\n }\r\n hours = this.use12HrTime ? this.parser.convert24To12(hours24) : hours24;\r\n return {\r\n selectedHours: hours,\r\n selectedHours24: hours24,\r\n selectedMinutes: minutes,\r\n value: valueInCurrentLocale,\r\n showClock: false,\r\n selectedMeridian: meridian,\r\n isClosing: false,\r\n emptyDateError: false\r\n };\r\n }\r\n\r\n private getDisplayValue = (hours: number, minutes: number) => {\r\n return this.formatter.formatTime(hours, minutes);\r\n }\r\n\r\n private update = (hours: number, minutes: number, meridiem: string, additionalState: Partial<TimePickerState> = {}) => {\r\n const hours24 = this.parser.convert12To24(hours, minutes, meridiem);\r\n const timeHasChanged = hours24 !== this.state.selectedHours24 || minutes !== this.state.selectedMinutes;\r\n\r\n this.setState({\r\n selectedHours: hours,\r\n selectedHours24: hours24,\r\n selectedMinutes: minutes,\r\n selectedMeridian: meridiem,\r\n value: this.getDisplayValue(hours24, minutes),\r\n isClosing: false,\r\n ...additionalState\r\n }, () => {\r\n if (timeHasChanged){\r\n this.fireOnChangeCallback(hours24, minutes);\r\n }\r\n });\r\n }\r\n\r\n private resetState = () => {\r\n this.setState({ value: '',\r\n selectedHours: 0,\r\n selectedHours24: 0,\r\n selectedMinutes: 0,\r\n selectedMeridian: ''\r\n });\r\n this.fireOnChangeCallback(0, 0);\r\n }\r\n\r\n /**\r\n * @private Handles blur event for time input.\r\n *\r\n */\r\n private handleInputBlur = () => {\r\n const value: string = this.state.value;\r\n\r\n // clear\r\n if (value === '' && this.state.selectedHours){\r\n this.fireOnChangeCallback();\r\n return;\r\n }\r\n\r\n // TODO: cleanup all below\r\n // use array destruct\r\n const parsedTimeInput = this.parser.parseTimeInputOrUserShortcut(value);\r\n if (parsedTimeInput) {\r\n const meridian = parsedTimeInput[2];\r\n const minutes = parsedTimeInput[1];\r\n const hours = !this.use12HrTime ? this.parser.convert12To24(parsedTimeInput[0], minutes, meridian) : parsedTimeInput[0];\r\n const parsedTimeIsValid = hours !== undefined && minutes !== undefined;\r\n if (parsedTimeIsValid){\r\n const valueDidChange = parsedTimeIsValid && (hours !== this.state.selectedHours ||\r\n minutes !== this.state.selectedMinutes ||\r\n !!meridian && meridian !== this.state.selectedMeridian);\r\n if (valueDidChange){\r\n this.update(hours, minutes, meridian);\r\n }\r\n else {\r\n this.update(this.state.selectedHours24, this.state.selectedMinutes, this.state.selectedMeridian);\r\n }\r\n\r\n }else{\r\n this.resetState();\r\n }\r\n }else{\r\n this.resetState();\r\n }\r\n }\r\n\r\n // this should not take arguments, it's inconsistent to not always use the current state when firing\r\n // external change\r\n private fireOnChangeCallback(hours?: number, minutes?: number) {\r\n const lastPropValue = this.props.value;\r\n\r\n if (lastPropValue && hours !== undefined && minutes !== undefined){\r\n lastPropValue.setUTCHours(hours);\r\n lastPropValue.setUTCMinutes(minutes);\r\n this.props.onChange(lastPropValue);\r\n }\r\n }\r\n\r\n private handleInputChange = (e: React.SyntheticEvent<any>) => {\r\n //TODO: handle like it's handled in Date.tsx.. postponed\r\n if(!this.props.value) {\r\n this.setState({emptyDateError: true});\r\n return;\r\n }\r\n const { value } = e.target as HTMLInputElement;\r\n this.setState({ value, emptyDateError: false });\r\n }\r\n\r\n private handleChange = (hours: number, minutes: number) => {\r\n //TODO: handle input and parsing like it's handled in Date.tsx.. postponed\r\n if (hours !== this.state.selectedHours || minutes !== this.state.selectedMinutes){\r\n this.update(hours, minutes, this.state.selectedMeridian);\r\n }\r\n }\r\n\r\n private switchToAm = () => {\r\n this.update(this.state.selectedHours, this.state.selectedMinutes, this.meridianAm);\r\n }\r\n\r\n private switchToPm = () => {\r\n this.update(this.state.selectedHours, this.state.selectedMinutes, this.meridianPm);\r\n }\r\n\r\n private handlerHotkeys: any = { escapeKey: (event: any) => this.setState({ showClock: false }) };\r\n\r\n private closePicker = () => {\r\n if (this.state.showClock){\r\n\r\n this.setState({ isClosing: true });\r\n\r\n setTimeout(() => {\r\n this.setState({\r\n showClock: false,\r\n isClosing: false\r\n });\r\n }, ANIMATE_OUT_SPEED);\r\n }\r\n this.setState({emptyDateError: false});\r\n }\r\n\r\n private onFocus = () => {\r\n //TODO: handle like it's handled in Date.tsx.. postponed\r\n this.closePicker();\r\n }\r\n\r\n private togglePicker = (e: React.SyntheticEvent<any>) => {\r\n if (this.state.showClock) {\r\n this.closePicker();\r\n } else {\r\n if(!this.props.value) {\r\n this.setState({emptyDateError: true});\r\n return;\r\n }\r\n this.setState({\r\n showClock: !this.state.showClock,\r\n emptyDateError: false\r\n });\r\n }\r\n\r\n this.setState({\r\n selectHours: true\r\n });\r\n }\r\n\r\n private handleModeChange = (mode: boolean) => {\r\n // when we are in minutes mode, we want wait 10ms,\r\n // then override 3rdparty internal state, caused by internal click events\r\n setTimeout(() => {\r\n this.setState({selectHours: this.state.selectHours ? mode : false });\r\n }, 10);\r\n }\r\n\r\n public render() {\r\n\r\n if (this.props.readOnly){\r\n return (\r\n <div className={`input-wrapper ${styles.wrapper}`}>\r\n <div className=\"input-group form-control-padding\">{this.state.value || '\\u00A0'}</div>\r\n </div>\r\n );\r\n }\r\n\r\n const meridian = this.state.selectedMeridian;\r\n\r\n const amButton = <button className={(meridian === this.meridianAm ? styles.am : styles.amDefault)} type=\"button\" onClick={this.switchToAm}>{this.meridianAm}</button>; //tslint:disable-line\r\n const pmButton = <button className={meridian === this.meridianPm ? styles.pm : styles.pmDefault} type=\"button\" onClick={this.switchToPm}>{this.meridianPm}</button>; //tslint:disable-line\r\n\r\n const doneButton = <div className={styles.doneButtonWrapper}>\r\n <ButtonPrimary style={styles.doneBtn} onClick={this.closePicker}>\r\n {this.props.labelConfirmTimeSelection}\r\n </ButtonPrimary>\r\n </div>;\r\n\r\n const am = this.use12HrTime && amButton;\r\n const pm = this.use12HrTime && pmButton;\r\n\r\n const clockPicker = (<div className={styles.pickerWrapper}>\r\n <div className={`${styles.clockWrapper}`}>\r\n {am && amButton}\r\n {pm && pmButton}\r\n <Timepicker\r\n className={this.props.className}\r\n onChange={this.handleChange}\r\n onChangeMode={this.handleModeChange}\r\n hours={this.state.selectedHours}\r\n minutes={this.state.selectedMinutes}\r\n militaryTime={!this.use12HrTime}\r\n mode={this.state.selectHours}\r\n formatNumber={this.formatter.formatTimePicker}\r\n />\r\n {doneButton}\r\n </div>\r\n </div>);\r\n\r\n const timeIconOnClick = !this.props.readOnly ? this.togglePicker : undefined;\r\n\r\n const placeholderTime = !this.state.selectedMeridian ? this.props.placeholderTime24hr : this.props.placeholderTime12hr;\r\n\r\n const closingAnimation = this.state.isClosing ? 'animate-out' : '';\r\n\r\n const errorParams = {\r\n level: ValidationLevel.error,\r\n messages: [{level: ValidationLevel.error, message: `${this.props.textEmptyDateError}`}]\r\n };\r\n\r\n return (\r\n <OnClickOutside onClickOutside={this.closePicker}>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlerHotkeys}>\r\n <div className={`input-wrapper ${styles.wrapper}`}>\r\n <div className=\"input-group\">\r\n <input type=\"text\"\r\n className=\"form-control\"\r\n placeholder={!this.props.readOnly && placeholderTime}\r\n value={this.state.value || ''}\r\n onChange={this.handleInputChange}\r\n readOnly={this.props.readOnly}\r\n disabled={this.props.readOnly}\r\n onBlur={this.handleInputBlur}\r\n onFocus={this.onFocus} //workaround for a bug caused by onClickOutside()\r\n />\r\n <span className=\"input-group-btn\">\r\n <ButtonInputGroup\r\n icon={FaClockO}\r\n disabled={this.props.readOnly}\r\n onClick={timeIconOnClick} />\r\n </span>\r\n </div>\r\n </div>\r\n {this.state.showClock &&\r\n <div className={`${styles.picker} scale-animate ${closingAnimation}`}>\r\n <Triangle/>\r\n {clockPicker}\r\n </div>\r\n }\r\n {this.state.emptyDateError && <Validation {...errorParams}/>}\r\n </HotKeys>\r\n </OnClickOutside>\r\n );\r\n }\r\n}\r\n","import { merge } from './date/merge-date';\r\nimport * as React from 'react';\r\nimport { InputControlContext } from '../common/input-control-context/input-control-context';\r\nimport { DatePicker } from './date/date';\r\nimport { TimePicker } from './time/time';\r\nimport { DateTimeProps } from 'ui/date-time/date-time-props';\r\n\r\ninterface DateTimeState{\r\n date?: Date;\r\n time?: Date;\r\n}\r\n\r\n/**\r\n * @private get browser culture when component does not receive locale as prop\r\n */\r\nexport const getLocaleFromBrowser = (): string => {\r\n const nav: any = navigator;\r\n return (nav.languages && nav.languages.length ? nav.languages[0] : nav.language)\r\n || nav.userLanguage || nav.browserLanguage || 'no';\r\n};\r\n\r\nexport class DateTime extends React.PureComponent<DateTimeProps, DateTimeState> {\r\n\r\n /**\r\n * Creates a DateTime component.\r\n * @constructor.\r\n */\r\n constructor(props: DateTimeProps) {\r\n super(props);\r\n this.state = { time: props.value, date: props.value};\r\n }\r\n\r\n public UNSAFE_componentWillReceiveProps(props: DateTimeProps) {\r\n if(props.value !== this.state.date ){\r\n this.setState({ time: props.value, date: props.value });\r\n }\r\n }\r\n\r\n /**\r\n * Nested components may provide partial parts of the final Date we provide as\r\n * final callback argument. Merged here.\r\n *\r\n * @private\r\n * @param timeOrDate\r\n */\r\n private fireOnChangeCallback = () => {\r\n const { date, time } = this.state;\r\n const value = merge(this.props.createDate(), date, time);\r\n this.props.onChange(value);\r\n }\r\n\r\n private onChangeTime = (date: Date) => {\r\n this.setState((prevState) => ({\r\n // only allow value for time if there is a date part as well\r\n time: prevState.date ? date : null\r\n }), () => this.fireOnChangeCallback());\r\n }\r\n\r\n private onChangeDate = (date: Date) => {\r\n this.setState((prevState: any, currentProps: DateTimeProps) => ({\r\n date,\r\n // clear time if date was cleared. If date was set after it was empty, don't keep the stored time\r\n time: date && currentProps.value ? prevState.time : null\r\n }), () => this.fireOnChangeCallback());\r\n }\r\n\r\n public render() {\r\n const { useTime, locale = getLocaleFromBrowser(), readOnly, componentId, label, info, infoLong, validation } = this.props;\r\n\r\n const datePicker = <DatePicker {\r\n ...{\r\n ...this.props,\r\n ...{\r\n useTime,\r\n locale,\r\n onChange: readOnly !== true && this.onChangeDate\r\n }\r\n }\r\n } />;\r\n\r\n const timePicker = <TimePicker {\r\n ...{\r\n ...this.props,\r\n ...{\r\n value: this.state.time,\r\n useTime,\r\n locale,\r\n onChange: readOnly !== true && this.onChangeTime\r\n }\r\n }\r\n } />;\r\n\r\n const dateComponent = !!useTime ?\r\n <div className=\"row\">\r\n <div className=\"col-12 col-sm-8 col-lg-7 col-xl-8 field-group-left-sm\" key={1}>{datePicker}</div>\r\n <div className=\"col-12 col-sm-4 col-lg-5 col-xl-4 field-group-right-sm\" key={2}>{timePicker}</div>\r\n </div>\r\n :\r\n <div className=\"row\">\r\n <div className=\"col-12\" key={1}>{datePicker}</div>\r\n </div>;\r\n\r\n const readOnlyView = <div className=\"flex\">\r\n <div className={!useTime ? 'flex-grow' : ''} key={1}>{datePicker}</div>\r\n {useTime ? <div className=\"flex-grow\" key={2}>{timePicker}</div> : null}\r\n </div>;\r\n\r\n return (\r\n <InputControlContext\r\n componentId={componentId}\r\n label={label}\r\n info={info}\r\n infoLong={infoLong}\r\n validation={validation}\r\n readOnly={readOnly}\r\n className={`${this.props.className}`}\r\n >\r\n {readOnly ? readOnlyView : dateComponent}\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","export {DateTime} from './date-time';\r\n","export const sortOrderType = {\r\n ASC: 1,\r\n DESC: 2\r\n};\r\n\r\nexport enum moveSortOrderType {\r\n UP,\r\n DOWN\r\n}\r\n","import * as React from 'react';\r\nimport { ButtonSecondary } from 'ui';\r\nimport styles from './sort-order-button.scss';\r\n\r\nexport interface SortOrderButtonProps {\r\n title?: string;\r\n onOpen: () => void;\r\n disabled?: boolean;\r\n}\r\n\r\nexport const SortOrderButton = (props:SortOrderButtonProps) => (\r\n <div className={styles.sortOrderButton}>\r\n <ButtonSecondary onClick={props.onOpen} disabled={props.disabled}>\r\n {props.title}\r\n </ButtonSecondary>\r\n </div>\r\n);\r\n","import * as React from 'react';\r\nimport { SelectSingle } from 'ui/select-single/select-single';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport { OptionsType } from 'ui/common/select/types';\r\nimport styles from './sort-by-select.scss';\r\n\r\nexport interface SortBySelectProps {\r\n translation: any;\r\n valueItem: ComplexValue<number>;\r\n options: ComplexValue<number>[];\r\n onChange: (valueItem: ComplexValue<number>) => void;\r\n}\r\n\r\nexport class SortBySelect extends React.Component<SortBySelectProps> {\r\n\r\n private onLoadOptions = () => {\r\n return;\r\n }\r\n\r\n public render() {\r\n\r\n const label = {\r\n visible: true,\r\n isRequired: true\r\n };\r\n\r\n return <div className={styles.sortBySelect}>\r\n <SelectSingle\r\n componentId={'1'}\r\n className={'select-single'}\r\n label={label}\r\n valueItem={this.props.valueItem}\r\n options={this.props.options}\r\n optionsDisplaySetting={{ type: OptionsType.flat }}\r\n showIcons={true}\r\n onChange={this.props.onChange}\r\n onLoadOptions={this.onLoadOptions}\r\n readOnly={false}\r\n disabled={true}\r\n placeholder={''}\r\n textSelectFromList={this.props.translation && this.props.translation.sort_order_select_text_select_from_list}\r\n textOptionsTitle={this.props.translation && this.props.translation.sort_order_sort_by}\r\n textOptionsDone={this.props.translation && this.props.translation.done}\r\n />\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { DefaultSortOrder, DomainNode, SortOptions } from 'ui/sort-order/types';\r\nimport { SortBySelect } from 'ui/sort-order/sort-by-select/sort-by-select';\r\nimport { moveSortOrderType, sortOrderType } from 'ui/sort-order/constants';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport { MeatballMenu, RadioSymbol } from 'ui';\r\nimport styles from './sort-by-item.scss';\r\n\r\nexport interface SortByListItemProps {\r\n sortByItem: DefaultSortOrder;\r\n options: SortOptions;\r\n translation: any;\r\n index: number;\r\n onSelectedOptions: (sortByItem: DefaultSortOrder) => DomainNode[];\r\n onMove: (type: number, value: number) => void;\r\n onDefaultOrderChange: (sortByItem: DefaultSortOrder) => void;\r\n onDefaultOrderRemove: (index: number) => void;\r\n}\r\n\r\nexport interface SortByListItemState {\r\n value: number;\r\n}\r\n\r\nexport class SortByListItem extends React.Component<SortByListItemProps, SortByListItemState> {\r\n\r\n public static getDerivedStateFromProps (props: SortByListItemProps) {\r\n return {\r\n value: props.sortByItem.sortOrderType\r\n };\r\n }\r\n\r\n constructor(props: SortByListItemProps) {\r\n super(props);\r\n this.state = {\r\n value: props.sortByItem.sortOrderType\r\n };\r\n }\r\n\r\n private onSortOrderTypeChange = (e: React.SyntheticEvent<any>) => {\r\n this.setState({\r\n value: parseInt(e.currentTarget.value, 10)\r\n } as SortByListItemState);\r\n\r\n const oldSortByItem = this.props.sortByItem;\r\n\r\n const newSortByItem = Object.assign({}, oldSortByItem, {\r\n sortOrderType: parseInt(e.currentTarget.value, 10)\r\n });\r\n\r\n this.props.onDefaultOrderChange(newSortByItem);\r\n }\r\n\r\n private handleRemove = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onDefaultOrderRemove(this.props.index);\r\n }\r\n\r\n private onChange = (item: ComplexValue<number>) => {\r\n this.props.onDefaultOrderChange(!item ? this.props.sortByItem : Object.assign({},\r\n this.props.sortByItem, {\r\n domainNode: {\r\n value: item.value,\r\n description: item.description\r\n }\r\n }));\r\n }\r\n\r\n private onMoveUp = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onMove(this.props.sortByItem.domainNode.value, moveSortOrderType.UP);\r\n }\r\n\r\n private onMoveDown = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onMove(this.props.sortByItem.domainNode.value, moveSortOrderType.DOWN);\r\n }\r\n\r\n private minNumber = () => {\r\n return Math.min(...this.props.options.defaultSortOrder.map((curr) => {\r\n return curr.orderBySequence;\r\n }));\r\n }\r\n\r\n private maxNumber = () => {\r\n return Math.max(...this.props.options.defaultSortOrder.map((curr) => {\r\n return curr.orderBySequence;\r\n }));\r\n }\r\n\r\n private renderMenu = () => (\r\n <div className={styles.sortMeatballMenu}>\r\n <MeatballMenu closeAfterClick>\r\n <span>\r\n <li><button type=\"button\" className=\"dropdown-item\" onClick={this.handleRemove}>\r\n {this.props.translation.sort_order_menu_option_remove}\r\n </button></li>\r\n {this.props.sortByItem.orderBySequence !== this.minNumber()\r\n ? <li><button type=\"button\" className=\"dropdown-item\" onClick={this.onMoveUp}>\r\n {this.props.translation.sort_order_menu_option_move_up}\r\n </button></li> : null}\r\n {this.props.sortByItem.orderBySequence !== this.maxNumber()\r\n ? <li><button type=\"button\" className=\"dropdown-item\" onClick={this.onMoveDown}>\r\n {this.props.translation.sort_order_menu_option_move_down}\r\n </button></li> : null}\r\n </span>\r\n </MeatballMenu>\r\n </div>)\r\n\r\n public render() {\r\n return (<div className={styles.sortByTile}>\r\n <div className={styles.sortByTileTop}>\r\n <span className={`control-label ${styles.sortLabel}`}>\r\n {this.props.translation.sort_order_sort_by}\r\n </span>\r\n {this.props.options.defaultSortOrder.length !== 1 ? this.renderMenu() : null}\r\n </div>\r\n <div className={styles.sortByWrapper}>\r\n <div className={styles.uiSortByTileTitle}>\r\n <SortBySelect\r\n options={this.props.onSelectedOptions(this.props.sortByItem)}\r\n translation={this.props.translation}\r\n valueItem={this.props.sortByItem.domainNode}\r\n onChange={this.onChange} />\r\n </div>\r\n <fieldset className={styles.sortOrderList}>\r\n <legend className=\"visuallyhidden\">\r\n {this.props.translation.sort_order_sort_by}\r\n </legend>\r\n <div className=\"form-check form-check-inline\">\r\n <input type=\"radio\" id={`asc_${String(this.props.index)}`}\r\n name={String(this.props.index)}\r\n className=\"form-check-input visuallyhidden\"\r\n value={sortOrderType.ASC}\r\n checked={this.state.value === sortOrderType.ASC}\r\n onChange={this.onSortOrderTypeChange} />\r\n <label htmlFor={`asc_${String(this.props.index)}`} className=\"form-check-label media\">\r\n <RadioSymbol/>\r\n {this.props.translation.sort_order_asc}\r\n <div className={`${styles.ascLabel}`}/>\r\n </label>\r\n </div>\r\n <div className=\"form-check form-check-inline\">\r\n <input type=\"radio\" id={`desc_${String(this.props.index)}`}\r\n name={String(this.props.index)}\r\n className=\"form-check-input visuallyhidden\"\r\n value={sortOrderType.DESC}\r\n checked={this.state.value === sortOrderType.DESC}\r\n onChange={this.onSortOrderTypeChange}/>\r\n <label htmlFor={`desc_${String(this.props.index)}`} className=\"form-check-label media\">\r\n <RadioSymbol/>\r\n {this.props.translation.sort_order_desc}\r\n <div className={`${styles.descLabel}`}/>\r\n </label>\r\n </div>\r\n </fieldset>\r\n </div>\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SortByListItem } from 'ui/sort-order/sort-by-list/sort-by-item/sort-by-item';\r\nimport { DefaultSortOrder, SortOptions } from 'ui/sort-order/types';\r\nimport styles from './sort-by-list.scss';\r\nexport interface SortByListProps {\r\n options: SortOptions;\r\n translation: any;\r\n onAdd: (e: React.SyntheticEvent<any>) => void;\r\n onMove: (type: number, value: number) => void;\r\n onDefaultOrderChange: (sortByItem: DefaultSortOrder) => void;\r\n onDefaultOrderRemove: (index: number) => void;\r\n onSelectedOptions: (sortByItem: DefaultSortOrder) => any;\r\n}\r\n\r\nexport const SortByList = (props: SortByListProps) => {\r\n const items = [...props.options.defaultSortOrder]\r\n .sort((a, b) => a.orderBySequence - b.orderBySequence)\r\n .map((sortByItem, index) => <div key={index}>\r\n <SortByListItem\r\n onDefaultOrderChange={props.onDefaultOrderChange}\r\n onDefaultOrderRemove={props.onDefaultOrderRemove}\r\n onSelectedOptions={props.onSelectedOptions}\r\n onMove={props.onMove}\r\n translation={props.translation}\r\n index={index}\r\n sortByItem={sortByItem}\r\n options={props.options} />\r\n </div>);\r\n\r\n return (<div>\r\n <div className={styles.sortByListItems}>\r\n {items}\r\n </div>\r\n <a href=\"#\" className=\"ui-standalone-link\" onClick={props.onAdd}>\r\n {props.options.defaultSortOrder.filter((e) => e.domainNode.value === -1).length === 0\r\n && props.options.sortOptions.length !== props.options.defaultSortOrder.length\r\n ? '+ ' + props.translation.sort_order_button_add_sort_param : ''}\r\n </a>\r\n </div>);\r\n};\r\n","import * as React from 'react';\r\nimport { useState, useEffect } from 'react';\r\nimport { sortOrderType } from 'ui/sort-order/constants';\r\nimport { DefaultSortOrder, DomainNode, SortOptions } from 'ui/sort-order/types';\r\nimport { getNotSelectedOptions, sortDefaultSortOrder } from 'ui/sort-order/utils';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { SortByList } from 'ui/sort-order/sort-by-list/sort-by-list';\r\n\r\ninterface SortOrderModalProps {\r\n options?: SortOptions;\r\n translation?: any;\r\n onDone?: (options: SortOptions) => any;\r\n handleToggle: () => void;\r\n loadOptions: () => void;\r\n}\r\n\r\n// tslint:disable-next-line: max-func-body-length\r\nconst SortOrderModal = ({ options, translation, onDone: onDoneCb, handleToggle: handleToggleCb, loadOptions }: SortOrderModalProps) => {\r\n const [optionsState, setOptionsState] = useState(options);\r\n useEffect(() => {\r\n loadOptions();\r\n }, []);\r\n\r\n useEffect(() => {\r\n setOptionsState(options);\r\n }, [options]);\r\n\r\n const handleAddSortArgument = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n const newOptions = { ...optionsState };\r\n const defaultSortOrder = [...optionsState.defaultSortOrder];\r\n\r\n const orderBySequence = defaultSortOrder.map((curr) => {\r\n return curr.orderBySequence;\r\n });\r\n\r\n const maxOrderBySequence = (orderBySequence && orderBySequence.length) > 0 ? Math.max(...orderBySequence) : 0;\r\n const newSortArgument = {\r\n domainNode: {\r\n value: -1,\r\n description: ''\r\n },\r\n sortOrderType: sortOrderType.DESC,\r\n orderBySequence: maxOrderBySequence + 1\r\n };\r\n\r\n newOptions.defaultSortOrder = defaultSortOrder.concat(newSortArgument);\r\n\r\n setOptionsState(newOptions);\r\n };\r\n\r\n const handleDefaultOrderRemove = (index: number) => {\r\n const newOptions = { ...optionsState };\r\n const defaultSortOrder = [...optionsState.defaultSortOrder];\r\n\r\n defaultSortOrder.splice(index, 1);\r\n\r\n newOptions.defaultSortOrder = defaultSortOrder.filter((element) => {\r\n return element.orderBySequence < newOptions.defaultSortOrder[index].orderBySequence;\r\n }).concat(\r\n defaultSortOrder.filter((element) => {\r\n return element.orderBySequence > newOptions.defaultSortOrder[index].orderBySequence;\r\n }).map((curr) => {\r\n return Object.assign({}, curr, {\r\n orderBySequence: curr.orderBySequence - 1\r\n });\r\n }));\r\n\r\n setOptionsState(newOptions);\r\n };\r\n\r\n const handleDefaultOrderChange = (sortByItem: DefaultSortOrder) => {\r\n const newOptions = { ...optionsState };\r\n const defaultSortOrder = [...optionsState.defaultSortOrder];\r\n\r\n newOptions.defaultSortOrder = defaultSortOrder\r\n .filter((element) => element.orderBySequence !== sortByItem.orderBySequence)\r\n .concat(sortByItem);\r\n\r\n setOptionsState(newOptions);\r\n };\r\n\r\n const handleNotSelectedOptions = (sortByItem: DefaultSortOrder): DomainNode[] => {\r\n return getNotSelectedOptions(\r\n sortByItem,\r\n optionsState.defaultSortOrder,\r\n optionsState.sortOptions\r\n );\r\n };\r\n\r\n const handleMove = (domainValue: number, type: number) => {\r\n const newOptions = { ...optionsState };\r\n newOptions.defaultSortOrder = sortDefaultSortOrder(domainValue, newOptions.defaultSortOrder, type);\r\n\r\n setOptionsState(newOptions);\r\n };\r\n\r\n const isDisabled = () => {\r\n return optionsState.defaultSortOrder.filter((element) => element.domainNode.value === -1).length > 0 ? true : false;\r\n };\r\n\r\n const onDone = () => {\r\n onDoneCb(optionsState);\r\n };\r\n\r\n const handleToggle = () => {\r\n handleToggleCb();\r\n };\r\n\r\n return !!optionsState && !!optionsState.sortOptions &&\r\n <ModalWrapper\r\n headerTitle={translation.sort_order_title}\r\n btnTitle={translation.sort_order_button_done}\r\n onClose={handleToggle}\r\n onDone={onDone}\r\n isDisabled={isDisabled}>\r\n {optionsState.sortOptions.length > 0 ?\r\n <SortByList\r\n options={optionsState}\r\n translation={translation}\r\n onMove={handleMove}\r\n onAdd={handleAddSortArgument}\r\n onDefaultOrderChange={handleDefaultOrderChange}\r\n onDefaultOrderRemove={handleDefaultOrderRemove}\r\n onSelectedOptions={handleNotSelectedOptions} />\r\n : <div>{translation.sort_order_no_sort_options}</div>}\r\n </ModalWrapper>;\r\n};\r\n\r\nexport { SortOrderModal };\r\n","import { DefaultSortOrder, DomainNode } from './types';\r\nimport { moveSortOrderType } from 'ui/sort-order/constants';\r\nimport clone from 'clone';\r\n\r\nexport function getNotSelectedOptions(\r\n sortByItem: DefaultSortOrder,\r\n defaultSortOrder: DefaultSortOrder[],\r\n sortOptions: DomainNode[]\r\n): DomainNode[] {\r\n const selected: any = defaultSortOrder\r\n .map((curr) => curr.domainNode.value)\r\n .filter((element) => element !== sortByItem.domainNode.value);\r\n\r\n return sortOptions\r\n .filter((element) => !selected.includes(element.value) ? element : null);\r\n}\r\n\r\nexport function sortDefaultSortOrder(\r\n domainNumber: number,\r\n collection: DefaultSortOrder[],\r\n type: moveSortOrderType): DefaultSortOrder[] {\r\n\r\n let updated = [];\r\n const c = clone(collection);\r\n const current = c.find((element) => element.domainNode.value === domainNumber);\r\n const prev = c.find((element) => element.orderBySequence === current.orderBySequence - 1);\r\n const next = c.find((element) => element.orderBySequence === current.orderBySequence + 1);\r\n \r\n if (type === moveSortOrderType.UP) {\r\n current.orderBySequence = current.orderBySequence - 1;\r\n prev.orderBySequence = prev.orderBySequence + 1;\r\n updated = [current, prev]; \r\n } else {\r\n current.orderBySequence = current.orderBySequence + 1;\r\n next.orderBySequence = next.orderBySequence - 1;\r\n updated = [current, next];\r\n }\r\n\r\n const used = updated.map((item) => item.domainNode.value);\r\n const rest = c.filter((element) => used.indexOf(element.domainNode.value) === -1 ? element : null);\r\n\r\n return updated.concat(rest);\r\n}\r\n","import * as React from 'react';\r\nimport { SortOrderButton } from './sort-order-button';\r\nimport { SortOptions } from './types';\r\nimport { SortOrderModal } from 'ui/sort-order/sort-order-modal';\r\n\r\ninterface SortOrderProps {\r\n componentId?: string;\r\n loadOptions: () => void;\r\n options?: SortOptions;\r\n translation?: any;\r\n onDone?: (options: SortOptions) => any;\r\n fetching?: boolean;\r\n}\r\n\r\nexport const SortOrder = (props:SortOrderProps) => {\r\n const [isOpen, setIsOpen] = React.useState(false);\r\n const { componentId, translation, options, loadOptions, onDone, fetching } = props;\r\n const handleToggle = () => {\r\n setIsOpen(!isOpen);\r\n };\r\n\r\n return (\r\n <div id={componentId}>\r\n <SortOrderButton\r\n title={translation && translation.sort_order_title || ''}\r\n onOpen={handleToggle}\r\n disabled={fetching} />\r\n {isOpen &&\r\n <SortOrderModal\r\n options={options}\r\n translation={translation}\r\n onDone={onDone}\r\n handleToggle={handleToggle}\r\n loadOptions={loadOptions} />}\r\n </div>\r\n );\r\n};\r\n","export * from './sort-order';\r\n","import * as React from 'react';\r\nimport * as utils from '../../common/hex-converter';\r\nimport styles from './slider-readonly.scss';\r\n\r\n/* Shared display layer between slider\r\n in readOnly mode, and placeholder for non-edit modes */\r\nexport interface SliderReadonlyProps {\r\n valueItem: any;\r\n textNoData?: string; // \"not selected\"\r\n}\r\n\r\nexport const SliderReadonly = (props: SliderReadonlyProps) => {\r\n if (!props.valueItem) {\r\n return(null);\r\n }\r\n\r\n let colorToDisplayFromBackend = {};\r\n\r\n if (props.valueItem.backgroundColor && props.valueItem.description.length) {\r\n const convertedColor = utils.toHex(props.valueItem.backgroundColor);\r\n colorToDisplayFromBackend = {\r\n background: `${convertedColor} `,\r\n display: 'block'\r\n };\r\n }\r\n return(\r\n <div className={styles.sliderReadOnly}>\r\n <div className = {styles.colorDot }\r\n style = { colorToDisplayFromBackend }\r\n />\r\n { !!props.valueItem ? props.valueItem.description : <p className=\"no-content\">{props.textNoData}</p> }\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport styles from './slider-rating.scss';\r\nimport {Tooltip} from 'ui/common/tooltip/tooltip';\r\nimport debounce from 'lodash/debounce';\r\n\r\nexport interface SliderCaptionProps {\r\n bars: { description: string }[];\r\n active: number;\r\n}\r\ninterface SliderCaptionItemProps {\r\n description: string;\r\n active: boolean;\r\n}\r\n\r\ninterface SliderCaptionItemState {\r\n tooltip: boolean;\r\n}\r\nexport class SliderCaptionItem extends React.Component<SliderCaptionItemProps, SliderCaptionItemState> {\r\n private labelRef:React.RefObject<HTMLDivElement>;\r\n private debouncedResize: any;\r\n\r\n constructor(props:SliderCaptionItemProps){\r\n super(props);\r\n\r\n this.state = {\r\n tooltip: false\r\n };\r\n\r\n this.labelRef = React.createRef();\r\n\r\n this.debouncedResize = debounce(()=>{\r\n this.useTooltip();\r\n }, 200);\r\n }\r\n\r\n private useTooltip() {\r\n const el = this.labelRef.current;\r\n if (!el) {\r\n return;\r\n }\r\n const showTooltip = el.offsetHeight !== el.scrollHeight;\r\n\r\n if (showTooltip !== this.state.tooltip) {\r\n this.setState({tooltip: showTooltip});\r\n }\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.useTooltip();\r\n }\r\n\r\n public componentDidMount() {\r\n this.useTooltip();\r\n window.addEventListener('resize', this.debouncedResize);\r\n }\r\n\r\n public componentWillUnmount() {\r\n window.removeEventListener('resize', this.debouncedResize);\r\n }\r\n\r\n public render () {\r\n const {description, active} = this.props;\r\n const {tooltip} = this.state;\r\n\r\n const label = <div ref={this.labelRef} className={styles.caption}>\r\n {description}\r\n </div>;\r\n\r\n return (\r\n <div className = { `${styles.captionOuterBox} ${active ? styles.active : ''}`}>\r\n {tooltip ? (\r\n <Tooltip className={styles.tooltipOverwrite} title={description} center delayed>\r\n {label}\r\n </Tooltip>)\r\n :\r\n label\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport const SliderCaption:React.SFC<SliderCaptionProps> = props => {\r\n return (\r\n <div className={styles.captionBox}>\r\n {props.bars.map((item, index) => (\r\n <SliderCaptionItem active={index === props.active} description={item.description} key={index}/>\r\n ))}\r\n </div>\r\n );\r\n};\r\nSliderCaption.displayName = 'SliderCaption';\r\n","import * as React from 'react';\r\nimport * as utils from '../common/hex-converter';\r\nimport styles from './slider-rating.scss';\r\n\r\nexport interface SlidingBarProps {\r\n bars: any[];\r\n active: number;\r\n}\r\n\r\nexport class SlidingBar extends React.Component<SlidingBarProps, any> {\r\n\r\n private renderItem = (index: number, color: number) => {\r\n let colorOfValue = {};\r\n\r\n /**\r\n * Bar display differs depending if `backgroundColour` has been received\r\n * from backend - we override the CSS with inline\r\n */\r\n\r\n if (color) {\r\n const convertedColor = utils.toHex(color);\r\n colorOfValue = { background: `${convertedColor} ` };\r\n }\r\n const classes = [styles.barSegment];\r\n if (index < this.props.active) {\r\n classes.push(styles.line);\r\n }\r\n if (index === this.props.active) {\r\n classes.push(styles.active);\r\n }\r\n\r\n return <div\r\n className={classes.join(' ')}\r\n style={colorOfValue}\r\n key={index}\r\n />;\r\n }\r\n\r\n public render() {\r\n return this.props.bars && this.props.bars.length ? (\r\n <div className={styles.barBox}>\r\n {this.props.bars.map((item, index) => this.renderItem(index, item.backgroundColor))}\r\n </div>\r\n ) : null;\r\n }\r\n}\r\n","export function isValueOutOfRange(value: number, { min, max}: any) {\r\n return value < min || value > max;\r\n}\r\n\r\nexport function isNotTouchEvent(e: TouchEvent) {\r\n return e.touches.length > 1 ||\r\n (e.type.toLowerCase() === 'touchend' && e.touches.length > 0);\r\n}\r\n\r\nexport function getTouchPosition(e: TouchEvent) {\r\n return e.touches[0].pageX;\r\n}\r\n\r\nexport function getMousePosition(e: MouseEvent) {\r\n return e.clientX;\r\n}\r\n\r\nexport function calculateClickOffset(e: any) {\r\n const position = getMousePosition(e);\r\n const handlePosition = e.target.offsetLeft;\r\n return position - handlePosition;\r\n}\r\n\r\nexport function calculateTouchOffset(e: any) {\r\n const position = getTouchPosition(e);\r\n const handlePosition = e.target.offsetLeft;\r\n return position - handlePosition;\r\n}\r\n\r\nexport function findClosestCenter(arrayOfElements: any[], currentElement: any) {\r\n if (!Array.isArray(arrayOfElements) || arrayOfElements.length === 0) {\r\n return 0;\r\n }\r\n return arrayOfElements.reduce((prev, curr) =>\r\n Math.abs(curr - currentElement) < Math.abs(prev - currentElement) ? curr : prev\r\n );\r\n}\r\n\r\nexport function calculateSegmentCenters(width: number, segmentCount:number, offset?:number): number[] {\r\n const segmentWidth = width / segmentCount;\r\n const centerOffset = segmentWidth/2;\r\n const offsetValue = offset || 0;\r\n // tslint:disable-next-line: prefer-array-literal\r\n const rtn:number[] = new Array(segmentCount);\r\n\r\n for(let i = 0; i < segmentCount; i++) {\r\n rtn[i] = Math.floor((i*segmentWidth)+centerOffset+offsetValue);\r\n }\r\n\r\n return rtn;\r\n}\r\n\r\nexport function calculateCenters(node: HTMLElement, circleWidth: number) {\r\n return !node ? {crossPoints: [], sum: 0} : [].reduce.call(node.childNodes, (prev, currentNode) => {\r\n prev.crossPoints.push(currentNode.offsetWidth / 2 + prev.sum - circleWidth);\r\n prev.sum = prev.sum + currentNode.offsetWidth;\r\n return prev;\r\n }, {crossPoints: [], sum: 0}).crossPoints;\r\n}\r\n","import * as React from 'react';\r\nimport * as utils from './utils';\r\nimport styles from './slider-rating.scss';\r\n\r\nexport interface SlidingCircleProps {\r\n centers: number[];\r\n active: number;\r\n updateActiveOption: (next:number) => void;\r\n handleChange: (option: number) => void;\r\n // parent is passing the ref down, suspicious\r\n componentRef: HTMLDivElement;\r\n scheduleUpdate?: Function;\r\n}\r\n\r\nexport interface SlidingCircleState{\r\n centers: number[];\r\n offset: number;\r\n transition: string;\r\n offsetLeft?: number;\r\n dragging?: boolean;\r\n}\r\n\r\nexport class SlidingCircle extends React.Component<SlidingCircleProps, SlidingCircleState> {\r\n\r\n private dragOffset: any;\r\n private withoutTransition: string = 'none';\r\n private animatedTransition: string = 'left 250ms ease-out, box-shadow 150ms ease-out';\r\n private circleWidth: number = 20;\r\n\r\n private circleRef: React.RefObject<HTMLDivElement> = React.createRef();\r\n\r\n public static getDerivedStateFromProps (props: SlidingCircleProps, state: SlidingCircleState) {\r\n const rtn:any = {};\r\n if (props.centers !== state.centers) {\r\n rtn.centers = props.centers;\r\n }\r\n if(!state.dragging) {\r\n rtn.offsetLeft = props.centers[props.active];\r\n }\r\n\r\n return rtn;\r\n }\r\n\r\n constructor(props: SlidingCircleProps) {\r\n super(props);\r\n this.state = {\r\n centers: [],\r\n offset: 0,\r\n transition: this.animatedTransition\r\n };\r\n }\r\n\r\n /**\r\n * We're calculating the distance from the beginning of the circle\r\n * to the place, where it was clicked to avoid moving circle on click\r\n */\r\n private onMouseDown = (e: React.MouseEvent<HTMLElement>) => {\r\n\r\n if (e.button !== 0) {\r\n return;\r\n }\r\n\r\n if (this.props.centers.length > 1) {\r\n this.dragOffset = utils.calculateClickOffset(e);\r\n this.addDocumentMouseEvents();\r\n }\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n this.setState({dragging: true});\r\n };\r\n\r\n private delayedUpdate (callback:Function) {\r\n if (callback) {\r\n if (this.props.scheduleUpdate) {\r\n this.props.scheduleUpdate(callback);\r\n } else {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n private onMouseMove:any = (e: MouseEvent) => {\r\n e.preventDefault();\r\n\r\n const {centers, active, updateActiveOption} = this.props;\r\n let offsetLeft = utils.getMousePosition(e);\r\n\r\n const min = centers[0];\r\n const max = centers[centers.length - 1];\r\n offsetLeft = offsetLeft - this.dragOffset;\r\n offsetLeft = offsetLeft < min ? min : offsetLeft;\r\n offsetLeft = offsetLeft > max ? max : offsetLeft;\r\n\r\n this.delayedUpdate(() =>\r\n this.setState({\r\n offsetLeft: offsetLeft\r\n })\r\n );\r\n\r\n const closest = utils.findClosestCenter(centers, offsetLeft);\r\n const next = centers.indexOf(closest);\r\n if (active !== next) {\r\n updateActiveOption(next);\r\n }\r\n };\r\n\r\n private abortClick = (e: React.MouseEvent<HTMLElement>) => {\r\n e.stopPropagation();\r\n }\r\n\r\n private onMouseUp = (e: MouseEvent) => {\r\n /**\r\n * We're moving to the closest based on state, not from MouseEvent, because\r\n * on touch end, there's no position of finishing touch and I wanted to keep\r\n * these similar\r\n */\r\n const nextIndex = this.props.centers[this.props.active];\r\n this.removeDocumentEvents();\r\n this.delayedUpdate(() => {\r\n this.moveToClosest(nextIndex);\r\n });\r\n\r\n this.setState({dragging: false});\r\n };\r\n\r\n private onTouchStart = (e: any) => {\r\n if (utils.isNotTouchEvent(e)) {\r\n return;\r\n }\r\n if (this.props.centers.length > 1) {\r\n this.dragOffset = utils.calculateTouchOffset(e);\r\n this.addDocumentTouchEvents();\r\n }\r\n e.preventDefault();\r\n this.setState({dragging: true});\r\n };\r\n\r\n private onTouchMove = (e: TouchEvent) => {\r\n const {componentRef, centers, active, updateActiveOption} = this.props;\r\n let offsetLeft = utils.getTouchPosition(e);\r\n const min = componentRef.getBoundingClientRect().left + centers[0] + this.circleWidth;\r\n const max = componentRef.getBoundingClientRect().left + centers[this.props.centers.length - 1] + this.circleWidth;\r\n offsetLeft = offsetLeft < min ? min : offsetLeft;\r\n offsetLeft = offsetLeft > max ? max : offsetLeft;\r\n\r\n this.setState({\r\n offsetLeft: offsetLeft - this.dragOffset\r\n });\r\n\r\n const closest = utils.findClosestCenter(\r\n centers,\r\n offsetLeft - this.dragOffset\r\n );\r\n if (active !== centers.indexOf(closest)) {\r\n updateActiveOption(centers.indexOf(closest));\r\n }\r\n };\r\n\r\n private onTouchUp = (e: MouseEvent) => {\r\n //TODO: why is this beeing removed and added on every interaction?\r\n e.stopPropagation();\r\n e.stopImmediatePropagation();\r\n this.removeDocumentEvents();\r\n this.delayedUpdate(() => {\r\n this.moveToClosest(this.state.offsetLeft);\r\n });\r\n this.setState({dragging: false});\r\n };\r\n\r\n private addDocumentMouseEvents() {\r\n /**\r\n * After mouse down we start to listen to mouse move. We want the circle\r\n * to follow the mouse 1:1, therefore without transition\r\n */\r\n this.setState({\r\n transition: this.withoutTransition\r\n });\r\n addEventListener('mousemove', this.onMouseMove, false);\r\n addEventListener('mouseup', this.onMouseUp, false);\r\n }\r\n\r\n private addDocumentTouchEvents() {\r\n /**\r\n * After touch down we start to listen to touch move.\r\n */\r\n\r\n this.setState({\r\n transition: this.withoutTransition\r\n });\r\n addEventListener('touchmove', this.onTouchMove, true);\r\n addEventListener('touchend', this.onTouchUp, true);\r\n }\r\n\r\n private removeDocumentEvents() {\r\n /**\r\n * After releasing click or touch, we want to drag the\r\n * circle to closest center of the bar\r\n */\r\n removeEventListener('mousemove', this.onMouseMove, false);\r\n removeEventListener('mouseup', this.onMouseUp, false);\r\n removeEventListener('touchmove', this.onTouchMove, true);\r\n removeEventListener('touchend', this.onTouchUp, true);\r\n }\r\n\r\n private moveToClosest(position: Number, dataSource?: {centers: number[]}) {\r\n const closest = dataSource\r\n ? utils.findClosestCenter(dataSource.centers, position)\r\n : utils.findClosestCenter(this.props.centers, position);\r\n\r\n closest && Array.isArray(this.props.centers)\r\n && this.props.handleChange(this.props.centers.indexOf(closest));\r\n\r\n this.setState({\r\n transition: this.animatedTransition,\r\n offsetLeft: closest\r\n });\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.removeDocumentEvents();\r\n if(this.circleRef.current) {\r\n this.circleRef.current.removeEventListener('touchstart', this.onTouchStart);\r\n }\r\n }\r\n public componentDidMount() {\r\n if(this.props.centers) {\r\n this.setState({centers: this.props.centers, offsetLeft: this.props.centers[this.props.active]});\r\n }\r\n if(this.circleRef.current) {\r\n this.circleRef.current.addEventListener('touchstart', this.onTouchStart, {passive:false});\r\n }\r\n }\r\n\r\n public render() {\r\n const calculatedStyle = {\r\n left: this.state.offsetLeft + 'px',\r\n transition: this.state.transition\r\n };\r\n\r\n return (\r\n <div\r\n id=\"circle\"\r\n ref={this.circleRef}\r\n className={styles.circle}\r\n onMouseDown={this.onMouseDown}\r\n onClick={this.abortClick}\r\n style={calculatedStyle}\r\n />\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport ResizeSensor from 'resize-sensor';\r\n\r\ninterface ResizeObserverProps {\r\n onResize?:() => void;\r\n children?: any;\r\n}\r\n\r\nexport class ResizeObserver extends React.PureComponent<ResizeObserverProps> {\r\n private sensor: ResizeSensor;\r\n private ref:React.RefObject<HTMLDivElement> = React.createRef();\r\n\r\n private handleResize = () => {\r\n this.props.onResize && this.props.onResize();\r\n }\r\n\r\n public componentDidMount () {\r\n this.sensor = new ResizeSensor(this.ref.current, this.handleResize);\r\n }\r\n\r\n public componentWillUnmount () {\r\n this.sensor.detach();\r\n this.sensor = null;\r\n }\r\n\r\n public render () {\r\n const { children } = this.props;\r\n return <div className={'resize-sensor'} ref={this.ref}>\r\n {children}\r\n </div>;\r\n }\r\n}\r\n","import get from 'lodash/get';\r\nimport * as React from 'react';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { VisibilitySensor } from 'ui/common';\r\nimport { getOptionsOrDefault } from 'ui/common/code-table/get-options-or-default';\r\nimport { ElementLoader } from 'ui/common/element-loader/element-loader';\r\nimport { InputControlContext } from 'ui/common/input-control-context';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { SliderReadonly } from 'ui/common/slider-readonly/slider-readonly';\r\nimport { ComplexValue, SingleKeyValueComponent } from 'ui/common/types';\r\nimport { SliderCaption } from './slider-caption';\r\nimport { SlidingBar } from './sliding-bar';\r\nimport { SlidingCircle } from './sliding-circle';\r\nimport * as utils from './utils';\r\nimport styles from './slider-rating.scss';\r\nimport { ResizeObserver } from 'ui/slider-rating/ResizeObserver';\r\n\r\nexport interface SliderRatingProps extends SingleKeyValueComponent<number> {\r\n innerStyle: string;\r\n useOptionsColors: boolean;\r\n compactModeTreshold: number;\r\n sortOptionsDirection: 'asc' | 'desc';\r\n scheduleUpdate?: Function;\r\n}\r\nexport interface SliderState{\r\n centers: number[];\r\n initialValue: number;\r\n /**\r\n * When a value is hovered when sliding, the caption is updated\r\n * before onChange is triggered\r\n */\r\n nextActivePosition?: number;\r\n}\r\n\r\nexport class SliderRating extends React.Component<SliderRatingProps, SliderState> {\r\n\r\n private keyMap: {[key:string]: string[]};\r\n private handlers: {[shortcut:string]: (e:any)=>void };\r\n\r\n constructor(props: SliderRatingProps) {\r\n super(props);\r\n\r\n this.state = {\r\n centers: [],\r\n initialValue: 0\r\n };\r\n\r\n this.keyMap = {\r\n slideLeft: [keyCodeTypes.ArrowLeft],\r\n slideRight: [keyCodeTypes.ArrowRight]\r\n };\r\n\r\n this.containerRef = React.createRef<HTMLDivElement>();\r\n\r\n this.handlers = {\r\n slideLeft: event => {\r\n event.preventDefault();\r\n const activeIndex = this.activeElementIndex();\r\n this.handleChange(activeIndex - 1);\r\n },\r\n slideRight: event => {\r\n event.preventDefault();\r\n const activeIndex = this.activeElementIndex();\r\n this.handleChange(activeIndex + 1);\r\n }\r\n };\r\n }\r\n\r\n public static defaultProps?: Partial<SliderRatingProps> = {\r\n innerStyle: '',\r\n useOptionsColors: true,\r\n compactModeTreshold: 4,\r\n sortOptionsDirection: 'desc'\r\n };\r\n private circleWidth: number = 20;\r\n private currentWidth: number = 0;\r\n private containerRef:React.RefObject<HTMLDivElement>;\r\n private forceUpdateWhenWidthIsReady: boolean = false;\r\n\r\n private updateWidth () {\r\n const ref = this.containerRef.current;\r\n if (ref) {\r\n const newWidth = this.currentWidth !== ref.offsetWidth;\r\n this.currentWidth = ref.offsetWidth;\r\n if (this.forceUpdateWhenWidthIsReady || newWidth) {\r\n this.forceUpdateWhenWidthIsReady = false;\r\n this.generateSegmentsMetadata();\r\n }\r\n }\r\n }\r\n\r\n public componentDidUpdate(){\r\n this.updateWidth();\r\n }\r\n\r\n private activeElementIndex = () => {\r\n const elementsToRender = getOptionsOrDefault(\r\n this.props.valueItem,\r\n this.props.options\r\n );\r\n if (this.props.valueItem) {\r\n return elementsToRender.findIndex(\r\n e => e.value === this.props.valueItem.value\r\n );\r\n } else {\r\n return elementsToRender.findIndex(e => e.value === 0);\r\n }\r\n };\r\n\r\n private generateSegmentsMetadata(elements?:any) {\r\n const elementsToRender = elements || getOptionsOrDefault(\r\n this.props.valueItem,\r\n this.props.options\r\n );\r\n\r\n if (this.currentWidth) {\r\n const centers = utils.calculateSegmentCenters(\r\n this.currentWidth,\r\n elementsToRender.length,\r\n -this.circleWidth);\r\n\r\n // TODO: don't use local state\r\n // The source of most bugs in this component is using state\r\n // for calculation results, instead of memoizing calculating functions\r\n this.setState({\r\n centers: centers\r\n });\r\n } else if(elementsToRender.length !== 0) {\r\n // in the case if the data is ready, but the component have not found a width.\r\n // Set a flag that is used in updateWidth when the width is set.\r\n this.forceUpdateWhenWidthIsReady = true;\r\n }\r\n }\r\n\r\n private delayedUpdate (callback:Function) {\r\n if (callback) {\r\n if (this.props.scheduleUpdate) {\r\n this.props.scheduleUpdate(callback);\r\n } else {\r\n callback();\r\n }\r\n }\r\n }\r\n\r\n private handleBarClicked = (e: React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>) => {\r\n const {centers} = this.state;\r\n const {changedTouches} = e as React.TouchEvent<HTMLElement>;\r\n const {pageX} = e as React.MouseEvent<HTMLElement>;\r\n\r\n const xOffset = pageX || changedTouches[0].pageX;\r\n const closestCenter = utils.findClosestCenter(\r\n centers,\r\n xOffset -\r\n this.containerRef.current.getBoundingClientRect().left -\r\n this.circleWidth\r\n );\r\n const index = centers.findIndex( x => x === closestCenter);\r\n if(Number.isFinite(index)){\r\n this.delayedUpdate( () => this.handleChange(index) );\r\n }\r\n };\r\n\r\n private handleChange = (option: number) => {\r\n const {valueItem, options, onChange} = this.props;\r\n const selectedItem = getOptionsOrDefault(valueItem, options)[option];\r\n selectedItem && onChange(selectedItem);\r\n };\r\n\r\n private handleUpdatedCaption = (option: number) => {\r\n this.setState({nextActivePosition: option});\r\n }\r\n\r\n private onResize = () => {\r\n this.updateWidth();\r\n this.generateSegmentsMetadata();\r\n };\r\n\r\n private loadOptions = () => {\r\n const { options, onLoadOptions } = this.props;\r\n const needsOptions = !options || !options.length;\r\n\r\n if (onLoadOptions && needsOptions) {\r\n this.props.onLoadOptions({ sort: this.props.sortOptionsDirection });\r\n }\r\n };\r\n\r\n public componentDidMount() {\r\n this.forceUpdateWhenWidthIsReady = true;\r\n this.updateWidth();\r\n }\r\n\r\n public UNSAFE_componentWillReceiveProps(props: SliderRatingProps) {\r\n if (this.props.valueItem && get(this.props, 'valueItem.value') !== get(props, 'valueItem.value') ) {\r\n this.setState({nextActivePosition: undefined});\r\n }\r\n if(props && this.props && props.options != null) {\r\n const newElementsToRender = getOptionsOrDefault(\r\n props.valueItem,\r\n props.options\r\n );\r\n\r\n const prevElementsToRender = getOptionsOrDefault(\r\n this.props.valueItem,\r\n this.props.options\r\n );\r\n if ( prevElementsToRender.length !== newElementsToRender.length || newElementsToRender.length !== this.state.centers.length ) {\r\n this.generateSegmentsMetadata(newElementsToRender);\r\n return;\r\n }\r\n }\r\n\r\n if ( !this.props.options && props.options ) {\r\n this.generateSegmentsMetadata();\r\n }\r\n }\r\n\r\n private centerEqual (a:number[], b:number[]) {\r\n if (!a || !b || a.length !== b.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < a.length; i++) {\r\n if (a[i] !== b[i]){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n public shouldComponentUpdate (nextProps:SliderRatingProps, nextState:SliderState) {\r\n const {options, valueItem, readOnly} = this.props;\r\n const {options:nextOptions, valueItem:nextValue, readOnly:nextReadOnly} = nextProps;\r\n const {centers, nextActivePosition} = this.state;\r\n const {centers:nextCenters, nextActivePosition:nextAP} = nextState;\r\n const {validation} = nextProps;\r\n\r\n if (\r\n validation === this.props.validation &&\r\n get(options, 'length') === get(nextOptions, 'length') &&\r\n get(valueItem, 'value') === get(nextValue, 'value') &&\r\n nextActivePosition === nextAP &&\r\n this.centerEqual(centers, nextCenters) &&\r\n readOnly === nextReadOnly) {\r\n \r\n return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n private hasColors = (items: ComplexValue<number>[]) => items.some(item => !!item.backgroundColor);\r\n\r\n public render() {\r\n const {\r\n valueItem,\r\n options,\r\n useOptionsColors,\r\n compactModeTreshold,\r\n readOnly,\r\n scheduleUpdate\r\n } = this.props;\r\n const {\r\n centers,\r\n nextActivePosition\r\n } = this.state;\r\n if (\r\n !options ||\r\n !options.length ||\r\n !centers\r\n ) {\r\n return <div className={styles.containerSpacer} ref={this.containerRef}>\r\n <VisibilitySensor onShow={this.loadOptions}>\r\n <ElementLoader />\r\n </VisibilitySensor>\r\n </div>;\r\n }\r\n\r\n const elementsToRender = getOptionsOrDefault(\r\n valueItem,\r\n options\r\n );\r\n if (elementsToRender.length === 0) {\r\n return <InputControlContext {...this.props} />;\r\n }\r\n const activeIndex = Number.isFinite(nextActivePosition) && nextActivePosition >= 0 ? nextActivePosition : this.activeElementIndex();\r\n const classNames =\r\n useOptionsColors && this.hasColors(elementsToRender)\r\n ? `${styles.box} ${styles.inverse}`\r\n : styles.box;\r\n const breakStyle =\r\n compactModeTreshold < elementsToRender.length\r\n ? styles.break\r\n : '';\r\n\r\n const slider = (\r\n <div\r\n className={`${classNames} ${breakStyle}`}\r\n ref={this.containerRef}\r\n onClick={this.handleBarClicked}\r\n >\r\n\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n <SliderCaption\r\n bars={elementsToRender}\r\n active={activeIndex}\r\n />\r\n <div className={styles.boundary} tabIndex={0}>\r\n <SlidingBar\r\n bars={elementsToRender}\r\n active={activeIndex}\r\n />\r\n <SlidingCircle\r\n componentRef={this.containerRef.current}\r\n active={activeIndex}\r\n centers={centers}\r\n handleChange={this.handleChange}\r\n updateActiveOption={this.handleUpdatedCaption}\r\n scheduleUpdate={scheduleUpdate}\r\n />\r\n </div>\r\n <SliderCaption\r\n bars={elementsToRender}\r\n active={activeIndex}\r\n />\r\n </HotKeys>\r\n </div>\r\n );\r\n\r\n return (\r\n <InputControlContext {...this.props}>\r\n <ResizeObserver onResize={this.onResize}>\r\n {readOnly ? (\r\n <SliderReadonly valueItem={this.props.valueItem} />\r\n ) : (\r\n slider\r\n )}\r\n </ResizeObserver>\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","export { SliderRating } from './slider-rating';\r\n","import * as React from 'react';\r\nimport { ButtonPrimary, Textarea } from 'ui';\r\nimport { CloseOnBlur } from 'ui/common/close-on-blur';\r\nimport { OnClickOutside } from 'ui/common/on-click-outside';\r\nimport styles from './file-uploader.scss';\r\n\r\nexport interface FileUploaderEditTitleProps {\r\n title: string;\r\n textDone: string;\r\n onChange: (newValue: string) => void;\r\n}\r\n\r\nexport interface FileUploaderEditTitleState {\r\n title: string;\r\n}\r\n\r\nexport class FileUploaderItemEditTitle extends React.Component<FileUploaderEditTitleProps, FileUploaderEditTitleState> {\r\n\r\n constructor(props: any) {\r\n super(props);\r\n this.state = {\r\n title: props.title\r\n };\r\n }\r\n\r\n private onChange = (newValue: string) => { \r\n this.setState({\r\n title: newValue\r\n });\r\n }\r\n\r\n private onDone = () => {\r\n this.props.onChange(this.state.title);\r\n }\r\n\r\n private onCancel = () => {\r\n this.props.onChange(this.props.title);\r\n }\r\n\r\n public render() {\r\n return (\r\n <CloseOnBlur onBlur={this.onCancel}>\r\n <OnClickOutside onClickOutside={this.onCancel}> \r\n <div className={`${styles.editInputContainer} form-group`}>\r\n <Textarea className={styles.editInput} value={this.state.title} onChange={this.onChange} wait={100} focus={true}/> \r\n <span className={`${styles.editDoneBtn} input-group-button`}>\r\n <ButtonPrimary onClick={this.onDone}>\r\n {this.props.textDone}\r\n </ButtonPrimary>\r\n </span>\r\n </div>\r\n </OnClickOutside>\r\n </CloseOnBlur>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport { ComplexValue, ComponentProps } from 'ui';\r\nimport * as filesize from 'filesize';\r\nimport { FileItemProgress } from 'ui/file-uploader/file-uploader-item-progress';\r\nimport { RemoteImage } from 'ui/remote-blob';\r\nimport { FileUploaderItemEditTitle } from 'ui/file-uploader/file-uploader-item-edit-title';\r\n\r\nimport MdStar from 'react-icons/lib/md/star';\r\n\r\nimport styles from './file-uploader.scss';\r\nimport { ObjectFitImage } from 'ui/object-fit-image';\r\n\r\nexport interface FileUploaderItemProps extends ComponentProps {\r\n id?: number;\r\n blobId?: number;\r\n title: string;\r\n name?: string;\r\n extension?: string;\r\n type: string;\r\n attachedBy: ComplexValue<number>;\r\n attachedAt: Date;\r\n size?: number;\r\n thumbnailSize?: number;\r\n isWaiting: boolean;\r\n uploaded?: number;\r\n uploadRate?: number;\r\n mainImage?: boolean;\r\n print?: boolean;\r\n createDownloader?: (blobId: number, name: string) => Promise<void>;\r\n loadBlob: (blobId: number, thumbnail: boolean) => Promise<Blob>;\r\n textHourPostfix?: string;\r\n textMinutePostfix?: string;\r\n textSecondPostfix?: string;\r\n textNotAvailable?: string;\r\n textDone?: string;\r\n textEditTitle?: string;\r\n textDownloadFile?: string;\r\n textDelete?: string;\r\n textDeleteMessage?: string;\r\n textUseAsMainImage?: string;\r\n textContinue?: string;\r\n textCancel?: string;\r\n deleteItem?: (id: number) => void;\r\n updateItemTitle?: (id: number, name: string) => void;\r\n onClick: ( id:number ) => void;\r\n setItemAsMain?: (id: number) => void;\r\n}\r\n\r\nexport interface FileUploaderItemState {\r\n downloading: boolean;\r\n editingTitle: boolean;\r\n}\r\n\r\nexport class FileUploaderItem extends React.Component<FileUploaderItemProps, FileUploaderItemState> {\r\n public state: Readonly<FileUploaderItemState> = {\r\n downloading: false,\r\n editingTitle: false\r\n };\r\n private meatballContainer:React.RefObject<HTMLDivElement> = React.createRef();\r\n\r\n private onClickThrough = () => {\r\n this.props.onClick(this.props.id);\r\n };\r\n\r\n private onDownload = async (event: any) => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n\r\n this.meatballContainer && this.meatballContainer.current && this.meatballContainer.current.focus();\r\n\r\n if (\r\n !this.state.downloading &&\r\n !!this.props.attachedAt &&\r\n this.props.blobId\r\n ) {\r\n this.setState({ downloading: true } as FileUploaderItemState);\r\n await this.props.createDownloader(this.props.blobId, this.props.name);\r\n this.setState({ downloading: false } as FileUploaderItemState);\r\n }\r\n };\r\n\r\n private onSetMainImage = () => {\r\n this.props.setItemAsMain && this.props.setItemAsMain(this.props.id);\r\n this.meatballContainer && this.meatballContainer.current && this.meatballContainer.current.focus();\r\n };\r\n\r\n private displayExtension() {\r\n if (this.props.thumbnailSize && this.props.thumbnailSize > 0) {\r\n return null;\r\n }\r\n\r\n return <div className={styles.attachmentExt}>{this.props.extension}</div>;\r\n }\r\n\r\n private renderMetadata() {\r\n if (!this.props.attachedAt) {\r\n return null;\r\n }\r\n\r\n const attachedAt = this.props.attachedAt\r\n ? this.props.formatDate(this.props.attachedAt) +\r\n ', ' +\r\n this.props.formatTime(this.props.attachedAt)\r\n : this.props.textNotAvailable;\r\n const attachedBy = this.props.attachedBy\r\n ? this.props.attachedBy.description\r\n : '';\r\n const size = filesize(this.props.size || 0);\r\n\r\n return (\r\n <ul className={styles.metadata}>\r\n {attachedBy && <li>{attachedBy}</li>}\r\n {attachedAt && <li>{attachedAt}</li>}\r\n {size && <li>{size}</li>}\r\n </ul>\r\n );\r\n }\r\n\r\n private humanize(duration: number) {\r\n const secs = Math.floor(duration / 1000);\r\n const mins = Math.floor(secs / 60);\r\n const hrs = Math.floor(mins / 60);\r\n\r\n if (hrs === Infinity) {\r\n return this.props.textNotAvailable;\r\n }\r\n\r\n if (hrs > 0) {\r\n return hrs + this.props.textHourPostfix;\r\n }\r\n if (mins > 0) {\r\n return (mins % 60) + this.props.textMinutePostfix;\r\n }\r\n const rest = secs % 60;\r\n return (rest >= 0 ? rest : 0) + this.props.textSecondPostfix;\r\n }\r\n\r\n private renderProgressInfo() {\r\n if (!!this.props.attachedAt) {\r\n return null;\r\n }\r\n\r\n const size = filesize(this.props.size || 0);\r\n const uploaded = filesize(this.props.uploaded || 0);\r\n const uploadRate =\r\n this.props.uploadRate !== Infinity && this.props.uploadRate > 0\r\n ? filesize(this.props.uploadRate || 0) + '/s'\r\n : this.props.textNotAvailable;\r\n const estimate = this.humanize(\r\n ((this.props.size - this.props.uploaded) / this.props.uploadRate) * 1000\r\n );\r\n\r\n return (\r\n <ul className={styles.metadata}>\r\n <li>{uploaded + ' / ' + size}</li>\r\n <li>{uploadRate}</li>\r\n <li>{estimate}</li>\r\n </ul>\r\n );\r\n }\r\n\r\n private onEditTitle = (e: any) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.setState({ editingTitle: true } as FileUploaderItemState);\r\n };\r\n\r\n private onChangeTitle = (newTitle: string) => {\r\n if (!newTitle.trim()) {\r\n // We never want blank file titles.\r\n // In case of blank title, we reset to filename with extension.\r\n newTitle = this.props.name.substring(0, this.props.name.lastIndexOf('.'));\r\n }\r\n if (newTitle !== this.props.title) {\r\n this.props.updateItemTitle(this.props.id, newTitle);\r\n }\r\n this.setState({ editingTitle: false } as FileUploaderItemState);\r\n };\r\n\r\n private handleDelete = () => {\r\n this.props.deleteItem(this.props.id);\r\n };\r\n\r\n private loadBlob = () => {\r\n return this.props.loadBlob(this.props.blobId, !this.props.print);\r\n };\r\n\r\n private renderMeatballMenu() {\r\n if (this.state.editingTitle || !this.props.attachedAt) {\r\n return false;\r\n }\r\n\r\n const editTitle = !!this.props.updateItemTitle ? (\r\n <li>\r\n <button\r\n type=\"button\"\r\n className=\"dropdown-item\"\r\n onClick={this.onEditTitle}\r\n >\r\n {this.props.textEditTitle}\r\n </button>\r\n </li>\r\n ) : null;\r\n\r\n const downloadItem = (<li>\r\n <button\r\n type=\"button\"\r\n className=\"dropdown-item\"\r\n onClick={this.onDownload}\r\n >\r\n {this.props.textDownloadFile}\r\n </button>\r\n </li>);\r\n\r\n const setAsMainImage = this.props.setItemAsMain && this.props.thumbnailSize && !this.props.mainImage && (<li>\r\n <button\r\n type=\"button\"\r\n className=\"dropdown-item\"\r\n onClick={this.onSetMainImage}\r\n >\r\n {this.props.textUseAsMainImage}\r\n </button>\r\n </li>);\r\n\r\n const deleteItem = !!this.props.deleteItem ? (\r\n <PromptConfirmationModal\r\n title={this.props.textDelete}\r\n description={this.props.textDeleteMessage}\r\n continueText={this.props.textContinue}\r\n cancelText={this.props.textCancel}\r\n onContinue={this.handleDelete}\r\n >\r\n <li>\r\n <button type=\"button\" className=\"dropdown-item\">\r\n {this.props.textDelete}\r\n </button>\r\n </li>\r\n </PromptConfirmationModal>\r\n ) : null;\r\n\r\n return (\r\n <MeatballMenu closeAfterClick={false}>\r\n {editTitle}\r\n {downloadItem}\r\n {setAsMainImage}\r\n {deleteItem}\r\n </MeatballMenu>\r\n );\r\n }\r\n\r\n private renderTitle() {\r\n if (!this.state.editingTitle) {\r\n return <h5>{this.props.title}</h5>;\r\n }\r\n return (\r\n <FileUploaderItemEditTitle\r\n title={this.props.title}\r\n textDone={this.props.textDone}\r\n onChange={this.onChangeTitle}\r\n />\r\n );\r\n }\r\n\r\n public render() {\r\n const progress = (this.props.uploaded / this.props.size) * 100;\r\n const progressBar = (\r\n <FileItemProgress\r\n progress={progress}\r\n indeterminate={this.state.downloading || progress >= 100}\r\n />\r\n );\r\n\r\n const thumbnail = this.props.thumbnailSize &&\r\n this.props.thumbnailSize > 0 && (\r\n <RemoteImage loadBlob={this.loadBlob}>\r\n {(objectUrl) => <ObjectFitImage src={objectUrl} cover={true}/>}\r\n </RemoteImage>\r\n );\r\n\r\n const clickAction = this.props.type && this.props.type.indexOf('image') !== -1 ? this.onClickThrough : this.onDownload;\r\n\r\n return (\r\n <div className={styles.itemWrapper}>\r\n <div\r\n tabIndex={0}\r\n className={`${\r\n this.state.editingTitle ? styles.isEditing : styles.notEditing\r\n } ${this.props.mainImage ? styles.main : ''} ${styles.attachment}`}\r\n onClick={this.state.editingTitle ? undefined : clickAction}\r\n >\r\n <div className={styles.attachmentImg}>\r\n {thumbnail}\r\n {this.displayExtension()}\r\n { this.props.mainImage && <div className={styles.marked}><MdStar /></div> }\r\n </div>\r\n <div className={styles.attachmentBody}>\r\n {this.renderTitle()}\r\n {this.renderMetadata()}\r\n {this.renderProgressInfo()}\r\n\r\n </div>\r\n </div>\r\n <div className={styles.dropdown} tabIndex={-1} ref={this.meatballContainer}>{this.renderMeatballMenu()}</div>\r\n\r\n <div className={styles.progressContainer}>\r\n {!this.props.attachedAt || this.state.downloading\r\n ? progressBar\r\n : null}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","export enum XMLHttpRequestReadyState {\r\n UNSENT,\r\n OPENED,\r\n HEADERS_RECEIVED,\r\n LOADING,\r\n DONE\r\n}\r\n","import * as React from 'react';\r\nimport { AddButton } from 'ui';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport styles from './file-uploader.scss';\r\n\r\nexport class FileUploaderAddButton extends React.Component<any, any> {\r\n private inputElement: HTMLElement;\r\n\r\n private handleUpload(fileList: FileList) {\r\n this.props.handleUpload(fileList);\r\n }\r\n\r\n private onUpload = (event: any) => {\r\n event.preventDefault();\r\n const fileList: FileList = event.target.files;\r\n if (fileList && fileList.length) {\r\n this.handleUpload(fileList);\r\n }\r\n\r\n // There is no react specific way of clearing or controlling a file input. This will\r\n // make sure it's possible to re-select the same file, and still have onChange fire.\r\n // https://stackoverflow.com/questions/42192346/how-to-reset-reacjs-file-input\r\n event.target.value = null;\r\n }\r\n\r\n private onClick = (event: any) => {\r\n if (this.inputElement) {\r\n this.inputElement.click();\r\n }\r\n }\r\n\r\n private onInputElementReady = (element: HTMLElement) => {\r\n if (element) {\r\n this.inputElement = element;\r\n }\r\n }\r\n\r\n public render() {\r\n return (\r\n <div className={`col-sm-12 ${styles.addButtonSection}`}>\r\n <input\r\n ref={this.onInputElementReady}\r\n onChange={this.onUpload}\r\n type=\"file\"\r\n multiple />\r\n <AddButton\r\n onClick={this.onClick}\r\n icon={mdPlus}\r\n required={this.props.required}\r\n >\r\n {this.props.addButtonText}\r\n </AddButton>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\n\r\nexport interface DragDropProps {\r\n dragActive?: boolean;\r\n}\r\n\r\ninterface DragDropState {\r\n dragActive?: boolean;\r\n}\r\n\r\nexport const withDragDrop = (Wrapped: React.ComponentClass<any>) => {\r\n return class DragDropContainer extends React.Component<any, DragDropState> {\r\n private wrappedComponent: any;\r\n public state: Readonly<DragDropState> = {\r\n dragActive: false\r\n };\r\n\r\n private onDragLeave = (e: any) => {\r\n e.preventDefault();\r\n this.setState({\r\n dragActive: false\r\n });\r\n }\r\n\r\n private onDragOver = (e: any) => {\r\n e.preventDefault();\r\n try {\r\n // This throws on IE...\r\n e.dataTransfer.dropEffect = 'copy';\r\n }\r\n // tslint:disable-next-line:no-empty\r\n catch { }\r\n\r\n this.setState({\r\n dragActive: true\r\n });\r\n }\r\n\r\n private onDrop = (e: any) => {\r\n e.preventDefault();\r\n\r\n let files;\r\n if (e.dataTransfer) {\r\n files = e.dataTransfer.files;\r\n } else if (e.target) {\r\n files = e.target.files;\r\n }\r\n\r\n if (this.wrappedComponent && this.wrappedComponent.handleUpload) {\r\n this.wrappedComponent.handleUpload(files);\r\n }\r\n\r\n this.setState({\r\n dragActive: false\r\n });\r\n }\r\n\r\n private setRef() {\r\n return (c) => this.wrappedComponent = c;\r\n }\r\n\r\n public render() {\r\n return (\r\n <div\r\n id={this.props.componentId}\r\n onDragOver={this.onDragOver}\r\n onDragLeave={this.onDragLeave}\r\n onDrop={this.onDrop}\r\n className=\"col-12\">\r\n <Wrapped\r\n ref={this.setRef()}\r\n {...this.props}\r\n dragActive={this.state.dragActive} />\r\n </div>\r\n );\r\n }\r\n };\r\n};\r\n","import { v1 as uuid } from 'uuid';\r\nimport { ComplexValue } from 'ui/common/types';\r\n\r\ninterface UploadedFile{\r\n id?: number; // No. column of attachment row\r\n blobId?: number; // Blob id of attachment row if the file has been uploaded\r\n name: string;\r\n title: string;\r\n type: string;\r\n size: number;\r\n thumbnailSize?: number;\r\n attachedBy?: ComplexValue<number>;\r\n attachedAt?: Date;\r\n mainImage?: boolean;\r\n}\r\n\r\nexport interface ProgressFile extends UploadedFile{\r\n uploaded?: number;\r\n uploadRate?: number;\r\n isWaiting?: boolean;\r\n uniqueId: string;\r\n file?: File;\r\n xhr?: XMLHttpRequest;\r\n}\r\n\r\nexport const makeProgressFile = (file: File): ProgressFile => {\r\n return {\r\n file,\r\n name: file.name,\r\n title: file.name.substring(0, file.name.lastIndexOf('.')),\r\n type: file.type,\r\n size: file.size,\r\n uploaded: 0,\r\n uploadRate: 0,\r\n isWaiting: true,\r\n uniqueId: uuid()\r\n };\r\n};\r\n\r\nexport const makeItemPropsFromProgressFile = (progressFile: ProgressFile) => {\r\n return {\r\n id: -1,\r\n key: progressFile.uniqueId,\r\n title: progressFile.title,\r\n name: progressFile.name,\r\n extension: progressFile.name.substring(progressFile.name.lastIndexOf('.')),\r\n type: progressFile.type,\r\n size: progressFile.size,\r\n attachedBy: progressFile.attachedBy,\r\n attachedAt: progressFile.attachedAt,\r\n isWaiting: progressFile.isWaiting,\r\n uploaded: progressFile.uploaded,\r\n uploadRate: progressFile.uploadRate\r\n };\r\n};\r\n\r\nexport const addItemPropsFromUploadedFile = (props: any, uploadedItem: UploadedFile) => {\r\n return {\r\n ...props,\r\n ...{\r\n id: uploadedItem.id,\r\n blobId: uploadedItem.blobId,\r\n title: uploadedItem.title,\r\n thumbnailSize: uploadedItem.thumbnailSize,\r\n attachedBy: uploadedItem.attachedBy,\r\n attachedAt: uploadedItem.attachedAt,\r\n isWaiting: false\r\n }\r\n };\r\n};\r\n\r\nexport const makeItemPropsFromUploadedFile = (uploadedFile: UploadedFile) => {\r\n return {\r\n id: uploadedFile.id,\r\n blobId: uploadedFile.blobId,\r\n key: uploadedFile.id.toString(),\r\n title: uploadedFile.title,\r\n name: uploadedFile.name,\r\n extension: uploadedFile.name && uploadedFile.name.substring(uploadedFile.name.lastIndexOf('.')),\r\n type: uploadedFile.type,\r\n size: uploadedFile.size,\r\n thumbnailSize: uploadedFile.thumbnailSize,\r\n attachedBy: uploadedFile.attachedBy,\r\n attachedAt: uploadedFile.attachedAt,\r\n isWaiting: false,\r\n uploaded: uploadedFile.size,\r\n uploadRate: 0,\r\n mainImage: uploadedFile.mainImage\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { RowContainerComponentProps } from '../common/types';\r\nimport { FileUploaderItem } from './file-uploader-item';\r\nimport { XMLHttpRequestReadyState } from './enums';\r\nimport { FileUploaderAddButton } from 'ui/file-uploader/file-uploader-attach-button';\r\nimport * as MA from 'moving-average';\r\nimport { withDragDrop, DragDropProps } from 'ui/file-uploader/with-dragdrop';\r\nimport FaAngleDown from 'react-icons/lib/fa/angle-down';\r\nimport styles from './file-uploader.scss';\r\nimport {\r\n makeProgressFile,\r\n makeItemPropsFromProgressFile,\r\n addItemPropsFromUploadedFile,\r\n makeItemPropsFromUploadedFile,\r\n ProgressFile\r\n} from 'ui/file-uploader/file';\r\nimport { AttachmentViewer } from 'ui/attachment-viewer/attachment-viewer';\r\n\r\ninterface FileUploaderState {\r\n progress?: ProgressFile[];\r\n errors: string[];\r\n showMoreItems: boolean;\r\n viewAttachment?: number;\r\n}\r\n\r\ninterface UploadedFile {\r\n id?: number; // No. column of attachment row\r\n blobId?: number; // Blob id of attachment row if the file has been uploaded\r\n name: string;\r\n title: string;\r\n type: string;\r\n size: number;\r\n thumbnailSize?: number;\r\n attachedAt?: Date;\r\n}\r\n\r\n/**\r\n * FileUploader component let you upload multiple files when clicked on browse button\r\n */\r\nexport interface FileUploaderComponentProps {\r\n /**\r\n * Information text about what is the maximum file size\r\n */\r\n textFileUploadInfoLine1?: string;\r\n /**\r\n * Information text about what is the maximum file size\r\n */\r\n textFileUploadInfoLine2?: string;\r\n /**\r\n * Browse button text\r\n */\r\n textAddButton?: string;\r\n /**\r\n * Error message to show if the user tries to upload a file that is too large\r\n */\r\n textFileTooLargeError?: string;\r\n /**\r\n * Error message to show if any other error occurs while uploading the file\r\n */\r\n textFileUploadError?: string;\r\n /**\r\n * Used when displaying time left (eg. 1h)\r\n */\r\n textHourPostfix?: string;\r\n /**\r\n * Used when displaying time left (eg. 1m)\r\n */\r\n textMinutePostfix?: string;\r\n /**\r\n * Used when displaying time left (eg. 1s)\r\n */\r\n textSecondPostfix?: string;\r\n /**\r\n * Used when a value can not be calculated (eg. n/a)\r\n */\r\n textNotAvailable?: string;\r\n /**\r\n * Label for button to confirm the edited title\r\n */\r\n textDone?: string;\r\n /**\r\n * Dropdown text for edit title\r\n */\r\n textEditTitle?: string;\r\n /**\r\n * Dropdown text for delete attachment\r\n */\r\n textDelete?: string;\r\n /**\r\n * Dialog message for confirmation of deleting attachment\r\n */\r\n textDeleteMessage?: string;\r\n /**\r\n * Dropdown text for download file\r\n */\r\n textDownloadFile?: string;\r\n textUseAsMainImage?: string;\r\n /**\r\n * Continue button text\r\n */\r\n textContinue?: string;\r\n /**\r\n * Cancel button text\r\n */\r\n textCancel?: string;\r\n /**\r\n * The text to show when items are collapsed behind a show more link\r\n */\r\n textShowMore?: string;\r\n /**\r\n * The text to show when items are expanded\r\n */\r\n textHideMore?: string;\r\n /**\r\n * Max amount of items to show before collapsing behind a \"show more\" link\r\n */\r\n maxItemsToShow: number;\r\n /**\r\n * Maximum files the client will upload in parallell. Default 6.\r\n */\r\n uploadsInParallel: number;\r\n /**\r\n * Maximum file size the client can upload in MB. Default 100.\r\n */\r\n maxSizeMB: number;\r\n /**\r\n * How long error messsages should appear before they are cleared from the UI (in ms)\r\n * @internal\r\n */\r\n errorMessageTimeout?: number;\r\n /**\r\n * Optional. Default is `false`.\r\n * If the component should display in a read-only state. This means not allowed to add / remove attachments.\r\n */\r\n readOnly?: boolean;\r\n /**\r\n * Text displayed when no files have been attached\r\n */\r\n textNoFilesAttached?: string;\r\n print?: boolean;\r\n /**\r\n * @internal\r\n */\r\n createUploader?: ()=> XMLHttpRequest;\r\n /**\r\n * @internal\r\n */\r\n addItem?: (blobId: number, name: string) => void;\r\n /**\r\n * @internal\r\n */\r\n deleteItem?: (id: number) => void;\r\n /**\r\n * @internal\r\n */\r\n updateItemTitle?: (id: number, name: string) => void;\r\n setItemAsMain?: (id:number) => void;\r\n /**\r\n * @internal\r\n */\r\n uploadedFiles?: UploadedFile[];\r\n /**\r\n * @internal\r\n */\r\n createDownloader?: (blobId: number, name: string) => Promise<void>;\r\n /**\r\n * @internal\r\n */\r\n loadBlob?: (blobId: number, thumbnail?: boolean) => Promise<Blob>;\r\n}\r\n\r\nexport type FileUploaderProps = FileUploaderComponentProps &\r\n DragDropProps &\r\n RowContainerComponentProps;\r\n\r\nexport class FileUploaderBase extends React.Component<FileUploaderProps, FileUploaderState> {\r\n\r\n public static defaultProps: Partial<FileUploaderProps> = {\r\n maxItemsToShow: 10,\r\n uploadsInParallel: 6,\r\n maxSizeMB: 100,\r\n errorMessageTimeout: 6000\r\n };\r\n\r\n public state: Readonly<FileUploaderState> = {\r\n progress: [],\r\n errors: [],\r\n showMoreItems: false,\r\n viewAttachment: undefined\r\n };\r\n\r\n public componentDidUpdate(prevProps: FileUploaderProps) {\r\n if (this.props.uploadedFiles &&\r\n this.props.uploadedFiles !== prevProps.uploadedFiles &&\r\n this.state.progress &&\r\n this.state.progress.length) {\r\n this.setState((prevState: FileUploaderState): FileUploaderState => {\r\n const newItemList = prevState.progress.filter(p => !this.props.uploadedFiles.some(u => p.blobId === u.blobId && !!u.attachedAt));\r\n if (newItemList.length !== prevState.progress.length) {\r\n return {\r\n progress: newItemList\r\n } as FileUploaderState;\r\n }\r\n\r\n return undefined as FileUploaderState;\r\n }, this.fillQueue);\r\n }\r\n }\r\n\r\n private addError = (progressFile: ProgressFile, error: string) => {\r\n const errorMsg = `${progressFile.file.name}: ${error}`;\r\n\r\n if (!this.state.errors.find(e => e === errorMsg)) {\r\n // In some cases we end up here both from onreadystatechange and onerror\r\n this.setState({\r\n errors: [errorMsg, ...this.state.errors]\r\n } as FileUploaderState);\r\n }\r\n\r\n setTimeout(() => {\r\n this.setState({\r\n errors: this.state.errors.filter(e => e !== errorMsg)\r\n } as FileUploaderState);\r\n }, this.props.errorMessageTimeout);\r\n\r\n this.removeProgressInfo(progressFile);\r\n }\r\n\r\n private removeProgressInfo = (progressFile: ProgressFile) => {\r\n this.setState((prevState: FileUploaderState): FileUploaderState => (\r\n {\r\n progress: prevState.progress.filter(p => p.file !== progressFile.file)\r\n } as FileUploaderState),\r\n this.fillQueue);\r\n }\r\n\r\n private updateFileState = (progressFile: ProgressFile, data: {}, callback?: () => any) => {\r\n this.setState((prevState: FileUploaderState): FileUploaderState => {\r\n const current = prevState.progress.find(p => p.file === progressFile.file);\r\n const currentIndex = prevState.progress.indexOf(current);\r\n const progress = [\r\n ...prevState.progress.slice(0, currentIndex),\r\n {\r\n ...current,\r\n ...data\r\n },\r\n ...prevState.progress.slice(currentIndex + 1)\r\n ];\r\n return {\r\n progress\r\n } as FileUploaderState;\r\n }, callback);\r\n }\r\n\r\n //TODO: move this side effect to actionCreator. This allows a redux dispatch one it completes and removes the memory leak\r\n // caused by component unmount while upload is running\r\n private xhrSend = (progressFile: ProgressFile) => {\r\n const file = progressFile.file;\r\n\r\n const ma = MA(1000); // Moving average over 1 second\r\n const xhr = this.props.createUploader();\r\n this.updateFileState(progressFile, { isWaiting: false, xhr });\r\n const formData = new FormData();\r\n formData.append('file', file);\r\n\r\n xhr.upload.onprogress = (e) => {\r\n if (e.lengthComputable) {\r\n const fileProgress = this.state.progress.find(p => p.file === file);\r\n if (fileProgress) {\r\n ma.push(Date.now(), e.loaded - fileProgress.uploaded); // Update moving average\r\n this.updateFileState(progressFile, { uploaded: e.loaded, uploadRate: ma.movingAverage() });\r\n }\r\n }\r\n };\r\n\r\n xhr.onreadystatechange = () => {\r\n if (xhr.readyState === XMLHttpRequestReadyState.DONE) {\r\n // NB: it seems like readyState DONE might fire more than once for one file.\r\n const fileProgress = this.state.progress.find(p => p.file === file);\r\n\r\n if (xhr.status >= 400 || xhr.status === 0) {\r\n // When a request is aborted, its readyState is changed to 4 (XMLHttpRequest.DONE)\r\n // and the status code (XMLHttpRequest.status) is set to 0.\r\n\r\n //tslint:disable no-console\r\n console.log('error', xhr.status, xhr.statusText);\r\n this.addError(progressFile, this.props.textFileUploadError);\r\n } else if (xhr.response && fileProgress) {\r\n const resp = JSON.parse(xhr.response);\r\n const blobId = resp.data.documents[0].blobId;\r\n if (blobId === 0) {\r\n this.addError(progressFile, resp.data.documents[0].error);\r\n }\r\n else {\r\n this.props.addItem(blobId, fileProgress.title);\r\n this.updateFileState(progressFile, { progressValue: 100, blobId: blobId });\r\n }\r\n }\r\n }\r\n };\r\n\r\n xhr.upload.onerror = xhr.onerror = (e) => {\r\n this.addError(progressFile, this.props.textFileUploadError);\r\n //tslint:disable no-console\r\n console.log('onerror', e);\r\n };\r\n\r\n xhr.send(formData);\r\n }\r\n\r\n private fillQueue = () => {\r\n const uploadQueue = this.state.progress.filter(p => p.isWaiting);\r\n const uploadsInProgress = this.state.progress.filter(p => !p.isWaiting);\r\n\r\n if (uploadsInProgress.length < this.props.uploadsInParallel && uploadQueue.length) {\r\n uploadQueue\r\n .slice(0, this.props.uploadsInParallel - uploadsInProgress.length)\r\n .forEach(p => this.xhrSend(p));\r\n }\r\n }\r\n\r\n private handleUpload = (fileList: FileList) => {\r\n if (!this.props.createUploader || this.props.readOnly) {\r\n return;\r\n }\r\n\r\n const newFiles = Array.from(fileList || []);\r\n const grouped = newFiles.map(makeProgressFile).reduce((aggr, item) => {\r\n const size = Math.floor(item.file.size / 1024 / 1024);\r\n if (size <= this.props.maxSizeMB) {\r\n aggr.ok.push(item);\r\n }\r\n else {\r\n aggr.tooLarge.push(item);\r\n }\r\n return aggr;\r\n }, { ok: [], tooLarge: [] });\r\n\r\n for (const tooLarge of grouped.tooLarge) {\r\n this.addError(tooLarge, this.props.textFileTooLargeError);\r\n }\r\n\r\n const newProgressItems: ProgressFile[] = grouped.ok;\r\n\r\n this.setState((prevState: FileUploaderState): FileUploaderState =>\r\n ({ progress: [...newProgressItems, ...prevState.progress] }) as FileUploaderState,\r\n this.fillQueue);\r\n }\r\n\r\n private makePropsForUploadsInProgress = (progressItem: ProgressFile) => {\r\n let props = makeItemPropsFromProgressFile(progressItem);\r\n\r\n const uploadedItem = this.props.uploadedFiles.find(u => u.blobId === progressItem.blobId);\r\n if (uploadedItem) {\r\n props = addItemPropsFromUploadedFile(props, uploadedItem);\r\n }\r\n return props;\r\n }\r\n\r\n private getAllMessages(): string[] {\r\n const { validation } = this.props;\r\n const { errors } = this.state;\r\n\r\n return [\r\n ...(errors ? errors : []),\r\n ...(validation && validation.messages.length ? validation.messages.map(m => m.message) : [])\r\n ];\r\n }\r\n\r\n private renderErrors = () => {\r\n const allMessages = this.getAllMessages();\r\n\r\n if (allMessages.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className={`alert-danger ${styles.flexValidation}`}>\r\n <ul>\r\n {allMessages.map(i => <li className=\"list-group-item-danger\">{i}</li>)}\r\n </ul>\r\n </div>\r\n );\r\n }\r\n\r\n private handleToggleItemExpand = (e: any) => {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.setState({\r\n showMoreItems: !this.state.showMoreItems\r\n } as FileUploaderState);\r\n }\r\n\r\n private prepareItems = () => {\r\n // items will be a merge of rows from props, and progress items from state\r\n return this.state.progress.map(this.makePropsForUploadsInProgress)\r\n .concat(\r\n this.props.uploadedFiles ? this.props.uploadedFiles\r\n .filter(r => !this.state.progress.some(p => p.blobId === r.blobId))\r\n .map(makeItemPropsFromUploadedFile) : []\r\n );\r\n }\r\n private selectImage = (index:number) => {\r\n this.setState({viewAttachment: index});\r\n }\r\n\r\n private handleClosingViewer = () => {\r\n this.setState({viewAttachment: undefined});\r\n }\r\n\r\n private renderItems = (itemProps: any) => {\r\n\r\n let itemsToRender = itemProps;\r\n if (!this.props.print && !this.state.showMoreItems) {\r\n itemsToRender = itemProps.slice(0, Math.min(itemProps.length, this.props.maxItemsToShow));\r\n }\r\n\r\n return itemsToRender.map(p => <FileUploaderItem\r\n key={p.key}\r\n createDownloader={this.props.createDownloader}\r\n loadBlob={this.props.loadBlob}\r\n textHourPostfix={this.props.textHourPostfix}\r\n textMinutePostfix={this.props.textMinutePostfix}\r\n textSecondPostfix={this.props.textSecondPostfix}\r\n textNotAvailable={this.props.textNotAvailable}\r\n textDone={this.props.textDone}\r\n textEditTitle={this.props.textEditTitle}\r\n textDelete={this.props.textDelete}\r\n textDeleteMessage={this.props.textDeleteMessage}\r\n textDownloadFile={this.props.textDownloadFile}\r\n textContinue={this.props.textContinue}\r\n textUseAsMainImage={this.props.textUseAsMainImage}\r\n textCancel={this.props.textCancel}\r\n deleteItem={!this.props.readOnly && this.props.deleteItem}\r\n updateItemTitle={!this.props.readOnly && this.props.updateItemTitle}\r\n setItemAsMain={!this.props.readOnly && this.props.setItemAsMain}\r\n formatDate={this.props.formatDate}\r\n formatNumber={this.props.formatNumber}\r\n formatTime={this.props.formatTime}\r\n onClick={this.selectImage}\r\n print={this.props.print}\r\n {...p} />);\r\n }\r\n\r\n private renderExpander = (itemProps: any) => {\r\n return !this.props.print && itemProps.length > this.props.maxItemsToShow\r\n ? <button type=\"button\"\r\n className={`standalone-link ${this.state.showMoreItems ? styles.showLess : ''}`}\r\n onClick={this.handleToggleItemExpand}>\r\n {this.state.showMoreItems ? this.props.textHideMore : this.props.textShowMore}\r\n <FaAngleDown />\r\n </button>\r\n : null;\r\n }\r\n\r\n private renderAddButton = () => {\r\n if (!this.props.createUploader || this.props.readOnly) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className=\"row\">\r\n <FileUploaderAddButton\r\n addButtonText={this.props.textAddButton}\r\n handleUpload={this.handleUpload}\r\n required={this.props.label.required} />\r\n </div>\r\n );\r\n }\r\n\r\n public render() {\r\n const { validation } = this.props;\r\n\r\n const itemProps = this.prepareItems();\r\n const dragClass = !this.props.readOnly && !!this.props.createUploader && this.props.dragActive ? styles.dragActive : '';\r\n const dragInfo = [\r\n <p key={0}>{this.props.textFileUploadInfoLine1}</p>,\r\n <p key={1}>{this.props.textFileUploadInfoLine2}</p>\r\n ];\r\n\r\n return (\r\n <>\r\n <AttachmentViewer uploadedFiles={this.props.uploadedFiles} loadBlob={this.props.loadBlob}\r\n onClose={this.handleClosingViewer} initialSelected={this.state.viewAttachment}/>\r\n <div id={this.props.componentId} className={`${styles.fileUploader} ${validation && validation.messages.length ? 'has-errors' : ''}`}>\r\n <h3 className={styles.fileHeading}>{this.props.label.text}</h3>\r\n\r\n <div className={this.getAllMessages().length ? 'has-errors' : ''}>\r\n {this.renderErrors()}\r\n <div className={styles.listWrapper}>\r\n {\r\n this.renderAddButton()!! &&\r\n <div className={styles.itemWrapper}>\r\n <div className={`${styles.dragBox} ${dragClass}`}>\r\n <div className={styles.dragDropIcon} />\r\n <div className={styles.dragDropText}>\r\n {dragInfo}\r\n\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n {this.renderItems(itemProps)}\r\n {(this.props.uploadedFiles &&\r\n !this.props.uploadedFiles.length &&\r\n (!this.props.createUploader || this.props.readOnly)) &&\r\n <p className=\"no-content\">\r\n {this.props.textNoFilesAttached}\r\n </p>\r\n }\r\n </div>\r\n {this.renderExpander(itemProps)}\r\n </div>\r\n {this.renderAddButton()}\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n\r\nexport const FileUploader = withDragDrop(FileUploaderBase);\r\n","export { FileUploader } from './file-uploader';\r\n","import React, { useCallback } from 'react';\r\nimport { AccessSwitchItemProps } from './types';\r\n\r\nimport styles from './access-switch-item.scss';\r\n\r\nexport const AccessSwitchItem: React.FC<AccessSwitchItemProps> = ({\r\n item, disabled, checked, isValid, readOnly, readOnlyLabel, onChange\r\n}) => {\r\n\r\n const changeHandler = !readOnlyLabel\r\n ? useCallback(\r\n () => {\r\n onChange(item, !checked);\r\n }, [item, checked, onChange])\r\n : undefined;\r\n\r\n return (<li className={isValid ? styles.switchComponent : styles.invalidSwitchComponent} key={item.value}>\r\n <span className={`${styles.switchLabel} ${disabled ? styles.switchLabelDisabled : ''}`}>{item.description}</span>\r\n <div className={styles.switchContainer}>\r\n <label className={`${styles.switch} ${readOnlyLabel ? styles.infoTextTrigger : ''}`}>\r\n <input\r\n type=\"checkbox\"\r\n className=\"visuallyhidden\"\r\n name={JSON.stringify(item.value)}\r\n onChange={changeHandler}\r\n checked={checked}\r\n readOnly={readOnly}\r\n tabIndex={readOnlyLabel ? -1 : 0}\r\n />\r\n <span className={`${styles.slider} ${readOnly ? styles.uiSwitchDisabled : ''}`} />\r\n {!!readOnlyLabel && <>\r\n <svg viewBox=\"0 0 20 20\">\r\n <path className={styles.tooltipArrow} d=\"M4,0H16L10,6Z\" transform=\"translate(-4)\" />\r\n </svg>\r\n <div className={styles.infoText}>{readOnlyLabel}</div>\r\n </>}\r\n </label>\r\n </div>\r\n </li>);\r\n};\r\n","import { ComplexValue } from 'ui/common/types';\r\nimport { ValidationMessage } from 'ui/common/validation/types';\r\n\r\nexport const mergeOptions = (options: ComplexValue<number>[] = [], valueItems: ComplexValue<number>[]) => {\r\n\r\n if (!valueItems || valueItems.length === 0 || valueItems === options) {\r\n return options;\r\n }\r\n\r\n const additionalOptions = valueItems.filter(i => !options.some(o => o.value === i.value));\r\n\r\n return additionalOptions.length === 0\r\n ? options\r\n : [\r\n ...options,\r\n ...additionalOptions\r\n ];\r\n};\r\n\r\nexport const getUniqueMessages = (messages: ValidationMessage[]) =>\r\n messages && messages.reduce((result, message) => {\r\n\r\n return result.some(r => r.message === message.message)\r\n ? result\r\n : [...result, message];\r\n }, [] as ValidationMessage[]) || [];\r\n","import React, { useCallback, useMemo } from 'react';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport { AccessSwitchItem } from './access-switch-item';\r\nimport { AccessSwitchProps } from './types';\r\nimport { mergeOptions } from './data';\r\n\r\nexport const AccessSwitch: React.FC<AccessSwitchProps> = ({\r\n options = [], invalidOptions = [],\r\n valueItems = [], initialValueItems = [],\r\n onChange, readOnly, readOnlyLabel }) => {\r\n\r\n const changeHandler = useCallback(\r\n (value: ComplexValue<number>, checked: boolean) => {\r\n\r\n if (checked) {\r\n onChange([...valueItems, value]);\r\n } else {\r\n onChange(valueItems.filter(item => item.value !== value.value));\r\n }\r\n }, [valueItems, onChange]);\r\n\r\n const memoizedOptions = useMemo(\r\n () => mergeOptions(options, initialValueItems),\r\n [options, initialValueItems]);\r\n\r\n return <>\r\n {memoizedOptions.map(option => {\r\n\r\n const disabled = !options.some(v => v.value === option.value);\r\n const checked = valueItems.some(v => v.value === option.value);\r\n const isValid = readOnly || !invalidOptions.some(invalidOption => option.value === invalidOption.value);\r\n\r\n return <AccessSwitchItem\r\n key={option.value}\r\n item={option}\r\n disabled={disabled}\r\n checked={checked}\r\n isValid={isValid}\r\n readOnly={readOnly}\r\n readOnlyLabel={readOnlyLabel}\r\n onChange={changeHandler}\r\n />;\r\n })}\r\n </>;\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport { SelectedOption } from 'ui/common/select/selected-options/selected-option';\r\nimport { AccessLabelProps } from './types';\r\n\r\nimport styles from './access-label.scss';\r\n\r\nexport const AccessLabel: React.FC<AccessLabelProps> = ({ options = [],\r\n invalidOptions = [],\r\n onChange, readOnly }) => {\r\n\r\n if (options.length === 0) {\r\n return null;\r\n }\r\n\r\n const onRemove = useCallback(\r\n (item: ComplexValue<number>) => {\r\n\r\n const value = options.filter(i => i.value !== item.value);\r\n onChange(value);\r\n },\r\n [options, onChange]\r\n );\r\n\r\n return <>\r\n {options.map(\r\n option => {\r\n\r\n const isValid = readOnly || !invalidOptions.some(invalidOption => option.value === invalidOption.value);\r\n\r\n return (<li key={option.value} className={isValid ? styles.validAccess : styles.invalidAccess}>\r\n <SelectedOption item={option} onRemove={onRemove} readOnly={readOnly} />\r\n </li>);\r\n }\r\n )}\r\n </>;\r\n};\r\n","import React, { useEffect } from 'react';\r\nimport { MeatballMenu, getValidationStyle, Validation, ValidationLevel } from 'ui';\r\nimport { AccessCardProps } from './types';\r\nimport { AccessSwitch } from './access-switch';\r\nimport { AccessLabel } from './access-label';\r\nimport { getUniqueMessages } from './data';\r\n\r\nimport styles from './access-card.scss';\r\n\r\nexport const AccessCard: React.FC<AccessCardProps> = (props) => {\r\n\r\n const { componentId, readOnly, label, readOnlyLabel, removeLabel,\r\n useLabelOption = false, fetching, options, invalidOptions,\r\n valueItems, initialValueItems,\r\n onChange, onDelete, onLoadOptions,\r\n validation: { messages = [] } = {},\r\n children\r\n } = props;\r\n\r\n useEffect(\r\n () => {\r\n if ((!useLabelOption || !options) && onLoadOptions) {\r\n onLoadOptions(undefined);\r\n }\r\n },\r\n [componentId]\r\n );\r\n\r\n if (fetching || ((useLabelOption || !valueItems) && !options)) {\r\n return <div id={componentId} />;\r\n }\r\n\r\n const level = messages && messages[0] && messages[0].level;\r\n const errorStyle = getValidationStyle(level) === 'danger' ? styles.hasDanger : '';\r\n const readOnlyStyle = readOnly ? styles.readOnly : '';\r\n\r\n const groupClassname = `col-lg-6 ${level !== undefined || 'valid'}`;\r\n const shouldRenderHeader = !!label || !!messages.length || (!readOnly && !!onDelete);\r\n\r\n return <div className={groupClassname} id={componentId}>\r\n <div className={styles.accessCardContainer}>\r\n <div className={`${styles.accessCard} ${errorStyle} ${readOnlyStyle}`}>\r\n {shouldRenderHeader && <div className={styles.accessHeader}>\r\n <div>\r\n {!!label && <h3>{label.text}</h3>}\r\n {!!messages.length && <Validation level={ValidationLevel.error} messages={getUniqueMessages(messages)} />}\r\n </div>\r\n {!readOnly && !!onDelete && <MeatballMenu closeAfterClick>\r\n <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={onDelete}>\r\n {removeLabel}\r\n </button>\r\n </li>\r\n </MeatballMenu>}\r\n </div>}\r\n <ol className={styles.accessContent}>\r\n {useLabelOption\r\n ? <AccessLabel options={options} invalidOptions={invalidOptions} onChange={onChange} readOnly={readOnly} />\r\n : <AccessSwitch options={options} invalidOptions={invalidOptions}\r\n valueItems={valueItems} initialValueItems={initialValueItems}\r\n onChange={onChange} readOnly={readOnly} readOnlyLabel={readOnlyLabel} />}\r\n </ol>\r\n {children}\r\n </div>\r\n </div>\r\n </div>;\r\n};\r\n","export { AccessCard } from './access-card';\r\nexport { mergeOptions } from './data';\r\n","export const contentPanelId = (id: string) => `tabpanel_${id}`;\r\nexport const labelId = (id: string, value: number) => `tabpanel_${id}_tab_${value}`;\r\n","import * as React from 'react';\r\nimport { TabButtonProps } from './types';\r\nimport { contentPanelId, labelId } from './selectors';\r\n\r\nimport style from './tabs.scss';\r\n\r\nexport class TabButton extends React.PureComponent<TabButtonProps> {\r\n\r\n public onChange = (event: React.MouseEvent) => {\r\n\r\n event.preventDefault();\r\n\r\n const { option, onChange } = this.props;\r\n onChange && onChange(option);\r\n }\r\n\r\n public render() {\r\n\r\n const { id, option: { description, value }, readOnly, selected } = this.props;\r\n\r\n return <li>\r\n {readOnly\r\n ? <span className={selected ? style.readOnlyActive : style.readOnly}\r\n id={labelId(id, value)}\r\n aria-selected={selected}\r\n aria-controls={selected ? contentPanelId(id) : undefined}\r\n role=\"tab\">\r\n {description}\r\n </span>\r\n : <a href=\"#\" className={selected ? style.active : style.selectable} onClick={this.onChange}\r\n id={labelId(id, value)}\r\n aria-selected={selected}\r\n aria-controls={selected ? contentPanelId(id) : undefined}\r\n role=\"tab\">\r\n {description}\r\n </a>}\r\n </li>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { TabsProps } from './types';\r\nimport { TabButton } from './tab-button';\r\nimport { contentPanelId, labelId } from './selectors';\r\n\r\nimport style from './tabs.scss';\r\n\r\nexport const Tabs: React.SFC<TabsProps> = (props) => {\r\n\r\n const { id, options, selectedOption, readOnly, onChange, children } = props;\r\n\r\n if (!options || options.length === 0) {\r\n return null;\r\n }\r\n\r\n const active = selectedOption || options[0];\r\n\r\n return <div className={style.tabsContainer}>\r\n <div className={style.tabs}>\r\n <ul role=\"tablist\">\r\n {options.map((option) => {\r\n\r\n const isSelected = option.value === active.value;\r\n\r\n return <TabButton\r\n id={id}\r\n key={option.value}\r\n option={option}\r\n selected={isSelected}\r\n readOnly={readOnly}\r\n onChange={!isSelected && onChange}\r\n />;\r\n })}\r\n </ul>\r\n </div>\r\n <div className={style.content} id={contentPanelId(id)} role=\"tabpanel\" aria-labelledby={labelId(id, active.value)} >\r\n {children}\r\n </div>\r\n </div>;\r\n};\r\n","export * from './tabs';\r\n","import * as React from 'react';\r\nimport { ComplexValue } from '../../common/types';\r\nimport { RadioSymbol } from '../..';\r\nimport { v1 as uuid } from 'uuid';\r\n\r\nexport interface SelectSingleRadioButtonProps {\r\n componentId: string;\r\n option: ComplexValue<number>;\r\n onChange: any;\r\n isSelected: boolean;\r\n readOnly?: boolean;\r\n}\r\n\r\nexport class SelectSingleRadioButton extends React.Component<SelectSingleRadioButtonProps, any> {\r\n constructor(props: SelectSingleRadioButtonProps) {\r\n super(props);\r\n this.state = {\r\n componentUuid: uuid()\r\n };\r\n }\r\n\r\n public onChange = () => {\r\n this.props.onChange(this.props.option);\r\n }\r\n\r\n public render() {\r\n const { componentId } = this.props;\r\n const { componentUuid } = this.state;\r\n\r\n return (\r\n <div className=\"form-check form-check-inline\">\r\n <input id={`input-${componentId}-${componentUuid}`} type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={this.props.option.value}\r\n checked={this.props.isSelected}\r\n onChange={this.onChange}\r\n disabled={this.props.readOnly} />\r\n <label htmlFor={`input-${componentId}-${componentUuid}`} className=\"form-check-label media\">\r\n <RadioSymbol />\r\n {this.props.option.description}\r\n </label>\r\n </div>\r\n );\r\n\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent, ComplexValue } from '../common/types';\r\nimport { getOptionsOrDefault } from '../common/code-table/get-options-or-default';\r\nimport { SelectSingleRadioButton } from './select-single-radio-button/select-single-radio-button';\r\nimport { InputControlContext } from '../common/input-control-context/input-control-context';\r\nimport styles from './select-single-short-list.scss';\r\nimport get from 'lodash/get';\r\nimport { VisibilitySensor } from '../common';\r\nimport { ElementLoader } from '../common/element-loader/element-loader';\r\n\r\ninterface SelectSingleShortListProps extends SingleKeyValueComponent<number> {\r\n textOptionsNotFound?: string;\r\n textOptionsLoadError?: string;\r\n}\r\n\r\nexport class SelectSingleShortList extends React.PureComponent<SelectSingleShortListProps, any> {\r\n private loadOptions = () => {\r\n const {onLoadOptions, options} = this.props;\r\n const needsOptions = !options || !options.length;\r\n if (needsOptions && onLoadOptions) {\r\n onLoadOptions(undefined);\r\n }\r\n }\r\n\r\n private renderOptions() {\r\n return getOptionsOrDefault(this.props.valueItem, this.props.options)\r\n .map((item, index) => item.value !== 0 && this.renderItem(index, item, this.props.valueItem));\r\n }\r\n\r\n private renderItem = (index: number, item: ComplexValue<number>, selectedOption?: ComplexValue<number>) => {\r\n const path = JSON.stringify(get(this.props, 'resolveContext.path'));\r\n\r\n return <div className=\"col col-auto\" key={index}>\r\n <SelectSingleRadioButton\r\n componentId={`${this.props.componentId}-${path}-${item.value}-radio`}\r\n onChange={this.props.onChange}\r\n readOnly={this.props.readOnly}\r\n isSelected={selectedOption ? item.value === selectedOption.value : false}\r\n option={item} />\r\n </div>;\r\n }\r\n\r\n public render() {\r\n const {options, fetching, loadOptionsError, textOptionsNotFound, textOptionsLoadError} = this.props;\r\n if(!options || !options.length){\r\n return (\r\n <InputControlContext {...this.props as any}>\r\n <VisibilitySensor onShow={this.loadOptions}>\r\n {fetching ?\r\n <ElementLoader/> :\r\n (loadOptionsError ?\r\n textOptionsLoadError :\r\n textOptionsNotFound\r\n )\r\n }\r\n </VisibilitySensor>\r\n </InputControlContext>\r\n );\r\n }\r\n return (\r\n <InputControlContext {...this.props as any}>\r\n <div className={styles.selectShortList}>\r\n <div className=\"row\">\r\n {this.renderOptions()}\r\n </div>\r\n </div>\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","export { SelectSingleShortList } from './select-single-short-list';\r\n","import * as React from 'react';\r\nimport { ComplexValue } from '../common/types';\r\nimport styles from './button-list.scss';\r\n\r\nexport interface ButtonListButtonProps {\r\n name: string;\r\n option: ComplexValue<number>;\r\n onChange: any;\r\n isSelected: boolean;\r\n}\r\n\r\nexport class ButtonListButton extends React.Component<ButtonListButtonProps, any> {\r\n\r\n public onChange = () => {\r\n this.props.onChange(this.props.option);\r\n }\r\n\r\n public render() {\r\n return(\r\n <div className={`btn ${styles.statusSelectorOption}`}>\r\n <input type=\"radio\"\r\n className={`form-check-input form-inline visuallyhidden ${this.props.isSelected ? styles.active : ''}`}\r\n name={this.props.name}\r\n value={this.props.option.value}\r\n checked={this.props.isSelected}\r\n onChange={this.onChange}\r\n id={`status-select-${this.props.name}-${this.props.option.value}`}/>\r\n <label\r\n htmlFor={`status-select-${this.props.name}-${this.props.option.value}`}\r\n aria-pressed={this.props.isSelected ? 'true' : 'false'}>\r\n {this.props.option.description}\r\n </label>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent, ComplexValue } from '../common/types';\r\nimport { getOptionsOrDefault } from '../common/code-table/get-options-or-default';\r\nimport { ButtonListButton } from './button-list-button';\r\nimport { InputControlContext } from '../common/input-control-context/input-control-context';\r\nimport styles from './button-list.scss';\r\n\r\nexport interface ButtonListProps extends SingleKeyValueComponent<number> {\r\n textNoData?: string;\r\n shouldTriggerValidation?: boolean;\r\n triggerValidation?: () => void;\r\n}\r\n\r\nexport class ButtonList extends React.PureComponent<ButtonListProps, any> {\r\n\r\n public componentDidMount() {\r\n const {onLoadOptions, options} = this.props;\r\n const needsOptions = !options || !options.length;\r\n if (needsOptions && onLoadOptions) {\r\n this.props.onLoadOptions(undefined);\r\n }\r\n }\r\n\r\n private onChange = (value: ComplexValue<number>) => {\r\n const { onChange, shouldTriggerValidation, triggerValidation } = this.props;\r\n shouldTriggerValidation && triggerValidation && triggerValidation();\r\n onChange && onChange(value);\r\n }\r\n\r\n private renderOptions() {\r\n return getOptionsOrDefault(this.props.valueItem, this.props.options)\r\n .map((item, index) => item.value !== 0 ? this.renderItem(index, item, this.props.valueItem) : null);\r\n }\r\n\r\n private renderItem = (index: number, item: ComplexValue<number>, selectedOption?: ComplexValue<number>) => {\r\n return <ButtonListButton\r\n key={item.value}\r\n name={this.props.componentId}\r\n onChange={this.onChange}\r\n isSelected={selectedOption ? item.value === selectedOption.value : false}\r\n option={item} />;\r\n }\r\n\r\n public render() {\r\n const buttons = <div className={`${styles.statusSelector} btn-group grid-200`} data-toggle=\"buttons\">\r\n {this.renderOptions()}\r\n </div>;\r\n const buttonsReadOnly = !!this.props.valueItem ?\r\n <p className={styles.readOnlyText}>{this.props.valueItem.description}</p>\r\n : <p className=\"no-content\">{this.props.textNoData}</p>;\r\n return (\r\n <InputControlContext\r\n {...this.props as any}>\r\n {this.props.readOnly ? buttonsReadOnly : buttons}\r\n </InputControlContext>);\r\n }\r\n}\r\n","export { ButtonList } from './button-list';\r\n","import * as React from 'react';\r\nimport {InputLabel, ValidationSummary} from 'ui';\r\n\r\nexport const DisplayControlContext = props => ( \r\n <div id={props.componentId} className={props.className}>\r\n <ValidationSummary validationError={props.validation}/>\r\n <InputLabel {...props.label} />\r\n {props.children}\r\n </div>);\r\n","import * as React from 'react';\r\nimport { DisplayControlContext } from 'ui/common/display-control-context';\r\nimport styles from './group-panel.scss';\r\nimport { InfoText } from 'ui';\r\nimport { ComponentProps } from 'ui';\r\n\r\nexport const GroupPanel: React.SFC<ComponentProps> = props => (\r\n <DisplayControlContext {...props}>\r\n {\r\n React.Children.count(props.children) ?\r\n <div className={styles.groupPanel}>\r\n <div className=\"row\">{props.children}</div>\r\n </div> \r\n : \r\n <div className={styles.withoutChildren}/>\r\n }\r\n <InfoText {...props.info} />\r\n <InfoText {...props.infoLong} />\r\n </DisplayControlContext>\r\n);\r\n","export {GroupPanel} from './group-panel';\r\n","import * as React from 'react';\r\nimport { ComplexValue, CheckSymbol } from 'ui';\r\nimport styles from './checkbox-list-item.scss';\r\n\r\nexport interface CheckboxListItemOption extends ComplexValue<number> {\r\n title?: string;\r\n}\r\n\r\nexport interface CheckboxListItemProps {\r\n name: string;\r\n option: CheckboxListItemOption;\r\n isSelected: boolean;\r\n onChange: (option: ComplexValue<number>, isSelected: boolean) => any;\r\n}\r\n\r\nexport class CheckboxListItem extends React.Component<CheckboxListItemProps> {\r\n public onChange = () => {\r\n this.props.onChange && this.props.onChange(this.props.option, !this.props.isSelected);\r\n }\r\n\r\n public render() {\r\n return (\r\n <div>\r\n <input type=\"checkbox\"\r\n id={this.props.name + '_' + this.props.option.value}\r\n className=\"form-check-input visuallyhidden\"\r\n value={this.props.option.value}\r\n checked={this.props.isSelected}\r\n onChange={this.onChange} />\r\n <label\r\n htmlFor={`${this.props.name}_${this.props.option.value}`}\r\n className={`${styles.label} form-check-label media`}>\r\n <CheckSymbol />\r\n {this.props.option.title && this.props.option.title}\r\n </label>\r\n <div className={styles.description}>\r\n {this.props.option.allLevelDescription || this.props.option.description}\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { CheckboxListItem } from 'ui/checkbox-list/checkbox-list-item';\r\nimport { MultiKeyValueComponent, ComplexValue } from 'ui/common/types';\r\n\r\n/**\r\n * Creates CheckboxList component.\r\n *\r\n */\r\n\r\nexport class CheckboxList extends React.PureComponent<MultiKeyValueComponent<number>, any> {\r\n private onChange = (option: ComplexValue<number>, isSelected: boolean) => {\r\n const valueItems = this.props.valueItems || [];\r\n this.props.onChange(isSelected ? valueItems.concat(option) :\r\n this.props.valueItems.filter(item => item.value !== option.value));\r\n }\r\n\r\n private renderItem = (index: number, item: ComplexValue<number>, isSelected: boolean) => {\r\n return <li key={index}>\r\n <CheckboxListItem\r\n name={this.props.componentId}\r\n onChange={this.onChange}\r\n option={item}\r\n isSelected={isSelected} />\r\n </li>;\r\n }\r\n\r\n public renderOptions = () => {\r\n return !!this.props.options && this.props.options.length > 0 &&\r\n this.props.options.map((item, index) => {\r\n const isSelected = !!this.props.valueItems && this.props.valueItems.some(option => option.value === item.value);\r\n return this.renderItem(index, item, isSelected);\r\n });\r\n }\r\n\r\n public render() {\r\n return (\r\n <ul id={this.props.componentId} className={this.props.className}>\r\n {this.renderOptions()}\r\n </ul>\r\n );\r\n }\r\n}\r\n","export { CheckboxList } from './checkbox-list';\r\n","import * as React from 'react';\r\nimport { InputControlContext } from '../common/input-control-context';\r\nimport DynamicNumber from 'react-dynamic-number';\r\nimport debounce from 'lodash/debounce';\r\nimport styles from './numberbox.scss';\r\nimport { SingleValueComponent } from 'ui/common/types';\r\nimport { ValidationLevel } from 'ui/common/validation/types';\r\nimport { Validation } from 'ui/common/validation';\r\n\r\n/**\r\n * Describes how the Number box component is displayed.\r\n *\r\n */\r\nexport interface NumberboxProps extends SingleValueComponent<number> {\r\n /**\r\n * Determine locale used. Default is fallback to current browser settings. Default is English.\r\n */\r\n locale: string;\r\n /**\r\n * Set the minimum value for the number input. Default is 0.\r\n */\r\n minValue?: number;\r\n /**\r\n * Set the maximum value for the number input. Default is 9007199254740991(MAX_SAFE_INTEGER).\r\n */\r\n maxValue?: number;\r\n /**\r\n * Set maximum number of digits in decimals part. Default is 0.\r\n */\r\n maxDecimals?: number;\r\n /**\r\n * Define if thousand separator should be enabled. Default is true.\r\n * When ' ' (space) - thousand separator is enabled and separate values by space.\r\n * When true, thousand separator is enabled and separate values depending on the locale being used.\r\n * -If decimal separator supported by the locale is dot then thousand separator is comma.\r\n * -If decimal separator supported by the locale is comma then thousand separator is dot.\r\n */\r\n useThousand?: boolean | ' ';\r\n /**\r\n * Translation text for invalid range error.\r\n */\r\n textInvalidRangeError?: string;\r\n}\r\n\r\nexport interface NumberboxState {\r\n valueIsOutOfRange: boolean;\r\n prevValue: number;\r\n}\r\n\r\nexport class Numberbox extends React.Component<NumberboxProps, NumberboxState> {\r\n private debounceOnChange: any;\r\n public static defaultProps: Partial<NumberboxProps> = {\r\n maxValue: Number.MAX_SAFE_INTEGER,\r\n minValue: 0,\r\n maxDecimals: 0\r\n };\r\n private decimalSeparator: string;\r\n private thousandSeparator: string;\r\n private isPositive: boolean;\r\n private isNegative: boolean;\r\n private numericMaxValue: number;\r\n private allowUpdates:boolean;\r\n\r\n public static getDerivedStateFromProps(props: NumberboxProps, state:NumberboxState) {\r\n if(props.value !== state.prevValue) {\r\n return {\r\n prevValue: props.value\r\n };\r\n }\r\n\r\n return {};\r\n }\r\n\r\n constructor(props: NumberboxProps) {\r\n super(props);\r\n\r\n this.state = {\r\n valueIsOutOfRange: false,\r\n prevValue: props.value\r\n };\r\n this.debounceOnChange = debounce((value: number) => {\r\n this.props.onChange(value);\r\n }, 100);\r\n\r\n this.allowUpdates = true;\r\n\r\n this.decimalSeparator = (new Intl.NumberFormat(this.props.locale)).format(0.1).split('')[1];\r\n this.thousandSeparator = !this.props.useThousand ? this.decimalSeparator === '.' ? ',' : '.'\r\n : this.props.useThousand === ' ' ? ' ' : '';\r\n this.isPositive = this.props.maxValue > 0; //is positive until maxValue > 0\r\n this.isNegative = this.props.minValue < 0; // is negative until minValue < 0\r\n const isMaxValueExponential = String(this.props.maxValue).split(/[eE]/).length > 1;\r\n this.numericMaxValue = !isMaxValueExponential ? Number(this.props.maxValue) : Number.MAX_SAFE_INTEGER;\r\n }\r\n\r\n /**\r\n * Handles if there is any input change.\r\n *\r\n */\r\n private handleOnChange = (evt: React.SyntheticEvent<HTMLInputElement>, modelValue: number) => {\r\n const inputValue: string = evt.currentTarget.value;\r\n const lastCharacter = inputValue.slice(-1);\r\n const lessThanMinValue = modelValue < this.props.minValue;\r\n const valueIsEmpty = !String(modelValue).length || !inputValue.length;\r\n const decimalInput = inputValue && inputValue.split(this.decimalSeparator)[1];\r\n const numOfDecimals = decimalInput && decimalInput.length;\r\n const exceedsMaxDecimals = numOfDecimals && numOfDecimals > this.props.maxDecimals;\r\n const exceedsMaxValue = modelValue > this.numericMaxValue;\r\n const valueIsOutOfRange = exceedsMaxValue || lessThanMinValue;\r\n const IsTrailingZero = decimalInput && decimalInput.slice(-1) === '0';\r\n\r\n this.allowUpdates = false;\r\n\r\n //NB: modelValue is empty for string inputs and 0 for empty inputs by design\r\n if(valueIsEmpty) {\r\n this.debounceOnChange(undefined);\r\n this.setState({\r\n prevValue: undefined,\r\n valueIsOutOfRange: false\r\n });\r\n return;\r\n }\r\n\r\n if(isNaN(Number(lastCharacter)) || IsTrailingZero ) {\r\n return;\r\n }\r\n\r\n if(exceedsMaxDecimals || exceedsMaxValue) {\r\n evt.stopPropagation();\r\n if(valueIsOutOfRange) {\r\n this.setState({valueIsOutOfRange: true});\r\n }\r\n return;\r\n }\r\n this.debounceOnChange(modelValue);\r\n this.setState({valueIsOutOfRange: false, prevValue: modelValue});\r\n }\r\n\r\n private handleOnBlur = (evt: React.SyntheticEvent<HTMLInputElement>) => {\r\n this.allowUpdates = true;\r\n const currentTarget: string = evt.currentTarget.value;\r\n const unformattedNumberValue: number = currentTarget &&\r\n Number(currentTarget.split(this.thousandSeparator).join('').replace(this.decimalSeparator, '.'));\r\n\r\n if(currentTarget && unformattedNumberValue < this.props.minValue) {\r\n this.setState({valueIsOutOfRange: true});\r\n this.debounceOnChange(undefined);\r\n return;\r\n }\r\n this.setState({valueIsOutOfRange: false});\r\n }\r\n\r\n public shouldComponentUpdate() {\r\n return this.allowUpdates;\r\n }\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n className,\r\n label,\r\n info,\r\n infoLong,\r\n readOnly,\r\n value,\r\n placeholder,\r\n validation,\r\n maxValue,\r\n minValue,\r\n maxDecimals,\r\n useThousand = true,\r\n textInvalidRangeError\r\n } = this.props;\r\n\r\n const {valueIsOutOfRange} = this.state;\r\n\r\n const storeValueOrDefault = !isNaN(value) ? value : '';\r\n const finalValue = !isNaN(this.state.prevValue) ? this.state.prevValue : storeValueOrDefault;\r\n\r\n const dynamicNumber =\r\n <DynamicNumber\r\n className={`form-control ${styles.numberbox}`}\r\n value={finalValue} //If value is '' then input is empty. Default is 0.\r\n readOnly={readOnly}\r\n placeholder={!readOnly ? placeholder : undefined}\r\n onChange={this.handleOnChange}\r\n integer={String(this.numericMaxValue).length}\r\n fraction={maxDecimals}\r\n positive={this.isPositive}\r\n negative={this.isNegative}\r\n thousand={useThousand}\r\n separator={this.decimalSeparator}\r\n disabled={readOnly}\r\n onBlur={this.handleOnBlur}\r\n />;\r\n\r\n const errorParams = {\r\n level: ValidationLevel.error,\r\n messages: [{level: ValidationLevel.error,\r\n message: `${textInvalidRangeError} ${' ['} ${minValue} ${'-'} ${maxValue} ${']'}`}]\r\n };\r\n\r\n return (\r\n <InputControlContext\r\n componentId={componentId}\r\n label={label}\r\n info={info}\r\n infoLong={infoLong}\r\n validation={validation}\r\n readOnly={readOnly}\r\n className={className}\r\n >\r\n <div className=\"input-wrapper\">\r\n {dynamicNumber}\r\n {valueIsOutOfRange && <Validation {...errorParams}/>}\r\n </div>\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","export {Numberbox} from './numberbox';\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent } from '../common/types';\r\nimport { SelectType, SelectCommonProps } from '../common/select/types';\r\nimport { SelectBaseComponent } from '../common/select/select-base-component';\r\n\r\nexport interface SelectSingleHierarchyProps extends SingleKeyValueComponent<number>, SelectCommonProps {\r\n /**\r\n * It allow user to select node from min level of hierarchy codes.\r\n * Default is 0.\r\n */\r\n minLevel?: number;\r\n /**\r\n * It allow user to select only leaf in hierarchy codes.\r\n * Default is false.\r\n */\r\n leafNodeOnly?: boolean;\r\n /**\r\n * It show whole path from root in description of selected option.\r\n * Default is false.\r\n */\r\n descriptionAllLevels?: boolean;\r\n /**\r\n * Reset to previous selected value when the field is cleared.\r\n * Default is false.\r\n */\r\n resetPreviousValueWhenEmpty?: boolean;\r\n}\r\n\r\nexport class SelectSingleHierarchy extends React.Component<SelectSingleHierarchyProps> {\r\n public render() {\r\n return <SelectBaseComponent\r\n {...this.props}\r\n selectType={SelectType.singleHierarchy}\r\n valueItems={!!this.props.valueItem ? [this.props.valueItem] : []}\r\n />;\r\n }\r\n}\r\n","export { SelectSingleHierarchy } from './select-single-hierarchy';\r\n","import * as React from 'react';\r\nimport { MultiKeyValueComponent } from '../common/types';\r\nimport { SelectType, SelectCommonProps } from '../common/select/types';\r\nimport { SelectBaseComponent } from '../common/select/select-base-component';\r\n\r\nexport interface SelectMultipleHierarchyProps extends MultiKeyValueComponent<number|string>, SelectCommonProps {\r\n /**\r\n * It allow user to select node from min level of hierarchy codes.\r\n * Default is 0.\r\n */\r\n minLevel?: number;\r\n /**\r\n * It allow user to select only leaf in hierarchy codes.\r\n * Default is false.\r\n */\r\n leafNodeOnly?: boolean;\r\n /**\r\n * It show whole path from root in description of selected option.\r\n * Default is false.\r\n */\r\n descriptionAllLevels?: boolean;\r\n\r\n /**\r\n * @internal\r\n */\r\n hideSearchInput?: boolean;\r\n}\r\n\r\nexport class SelectMultipleHierarchy extends React.Component<SelectMultipleHierarchyProps> {\r\n public render() {\r\n return <SelectBaseComponent\r\n {...this.props}\r\n selectType={SelectType.multipleHierarchy}\r\n />;\r\n }\r\n}\r\n","export { SelectMultipleHierarchy } from './select-multiple-hierarchy';\r\n","import * as React from 'react';\r\nimport { SingleValueComponent } from '../common/types';\r\nimport FaSearch from 'react-icons/lib/fa/search';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { keyCodeTypes } from '../common/key-code-types';\r\nimport { ButtonInputGroup } from '../common';\r\n\r\nimport styles from './search.scss';\r\nimport { DebounceInput } from 'ui/common/debounce-input';\r\n\r\nconst notNumberReg = /[^0-9\\s,-]/g;\r\n\r\n/**\r\n * Search component is a part view for searching feature.\r\n */\r\nexport interface SearchProps extends SingleValueComponent<string> {\r\n /**\r\n * Define callback method which is called after click on search icon.\r\n */\r\n onSearch: () => void;\r\n maxLength?: number;\r\n minLength?: number;\r\n wait?: number;\r\n}\r\n\r\nexport class Search extends React.Component<SearchProps> {\r\n private keyMap: any;\r\n private handlers: any;\r\n constructor(props: SearchProps) {\r\n super(props);\r\n this.keyMap = {\r\n onEnter: [keyCodeTypes.Enter]\r\n };\r\n this.handlers = {\r\n onEnter: this.onSearch\r\n };\r\n }\r\n\r\n private onSearch = () => {\r\n if (!this.isDisabled()) {\r\n this.props.onSearch();\r\n }\r\n }\r\n\r\n private isDisabled() {\r\n const { minLength, value } = this.props;\r\n\r\n return minLength !== undefined && (value.length === 0 || (value.length < minLength && value.search(notNumberReg) !== -1));\r\n }\r\n\r\n private onFocus = (event: React.FormEvent<any>) => {\r\n // fix for setting the cursor at the end of value for chrome\r\n const targetObj = event.target as HTMLInputElement;\r\n const value = targetObj.value;\r\n targetObj.value = '';\r\n targetObj.value = value;\r\n }\r\n\r\n public render() {\r\n\r\n return (\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n <div className={this.props.className} id={this.props.componentId}>\r\n <div className=\"input-group\">\r\n <DebounceInput\r\n type=\"search\"\r\n className=\"form-control\"\r\n maxLength={this.props.maxLength}\r\n value={this.props.value}\r\n placeholder={this.props.placeholder}\r\n onChange={this.props.onChange}\r\n focus={this.props.focus}\r\n onFocus={this.onFocus}\r\n wait={this.props.wait} />\r\n <span className=\"input-group-btn\">\r\n <ButtonInputGroup\r\n className={styles.button}\r\n icon={FaSearch}\r\n onClick={this.props.onSearch}\r\n callToAction={true}\r\n disabled={this.isDisabled()} />\r\n </span>\r\n </div>\r\n </div>\r\n </HotKeys>\r\n );\r\n }\r\n}\r\n","export { Search } from './search';\r\n","import * as React from 'react';\r\nimport { AddButton } from 'ui/common';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport styles from './file-selector.scss';\r\nimport get from 'lodash/get';\r\n\r\nexport interface FileSelectorProps {\r\n disabled?: boolean;\r\n textSelectFile: string;\r\n onSelected?: (f:File) => void;\r\n}\r\n\r\ninterface FileSelectorState {\r\n file:File;\r\n}\r\n\r\nexport class FileSelector extends React.Component<FileSelectorProps, FileSelectorState> {\r\n private inputRef:React.RefObject<HTMLInputElement> = React.createRef();\r\n\r\n public state: Readonly<FileSelectorState> = {\r\n file: null\r\n };\r\n\r\n private handleSelectFileClick = (e:React.MouseEvent) => {\r\n e.preventDefault();\r\n\r\n if (this.inputRef && this.inputRef.current) {\r\n this.inputRef.current.click();\r\n }\r\n }\r\n\r\n private handleChangeFileUploader = (e: any) => {\r\n const file = get(e, 'target.files[0]');\r\n\r\n this.setState({ file });\r\n if (this.props.onSelected) {\r\n this.props.onSelected(file);\r\n }\r\n\r\n // There is no react specific way of clearing or controlling a file input. This will\r\n // make sure it's possible to re-select the same file, and still have onChange fire.\r\n // https://stackoverflow.com/questions/42192346/how-to-reset-reacjs-file-input\r\n e.target.value = null;\r\n }\r\n\r\n private fileTitle () {\r\n if (this.state && this.state.file) {\r\n const file = this.state.file;\r\n return file.name;\r\n }\r\n return this.props.textSelectFile;\r\n }\r\n\r\n public render () {\r\n const {disabled} = this.props;\r\n\r\n return <>\r\n <label htmlFor=\"fileinput\" className={styles.importFileLabel}>\r\n <AddButton\r\n icon={mdPlus}\r\n onClick={this.handleSelectFileClick}>\r\n {this.fileTitle()}\r\n </AddButton>\r\n </label>\r\n <input\r\n className={`form-control-file ${styles.importFileInput}`}\r\n accept=\"application/zip\"\r\n id=\"fileinput\"\r\n type=\"file\"\r\n ref={this.inputRef}\r\n onChange={this.handleChangeFileUploader}\r\n disabled={disabled} />\r\n </>;\r\n }\r\n}\r\n","export {FileSelector} from './file-selector';\r\n","import * as React from 'react';\r\nimport { DateTimeProps } from '../date-time/date-time-props';\r\nimport { compose } from 'redux';\r\nimport styles from './display-date.scss';\r\nimport { Label, NoValueDash } from 'ui/common';\r\n\r\nexport interface DisplayDateProps extends DateTimeProps {\r\n /**\r\n * Predefined possible styles by the design handbook\r\n */\r\n style?: 'primary' | 'secondary';\r\n /**\r\n * When true, the label font is normal and the value font is bold\r\n */\r\n strong?: boolean; \r\n /**\r\n * When true, a predefined style class to render the label above the value is applied\r\n */\r\n showStacked: boolean;\r\n /**\r\n * Predefined intl format option for weekday. Default is 'long'\r\n */\r\n weekdayFormat?: string;\r\n /**\r\n * Predefined intl format option for day. Default is 'numeric'\r\n */\r\n dayFormat?: string;\r\n /**\r\n * Predefined intl format option for month. Default is 'long'\r\n */ \r\n monthFormat?: string;\r\n /**\r\n * Predefined intl format option for year. Default is 'numeric'\r\n */\r\n yearFormat?: string;\r\n /**\r\n * When true, the component gets hidden when value is empty\r\n */\r\n hideIfNoValue?: boolean;\r\n\r\n /**\r\n * @internal\r\n */\r\n children?: any;\r\n}\r\n\r\n/**\r\n * Displaying a databound text value consist of rendering a label, and the value.\r\n * \r\n * This component is responsible for the composition of the two.\r\n * \r\n * @param props \r\n */\r\nconst DisplayDateComponent = (props: Partial<DisplayDateProps>) => { \r\n const {\r\n className,\r\n componentId, \r\n hideIfNoValue = false,\r\n weekdayFormat = 'long',\r\n dayFormat = 'numeric',\r\n monthFormat = 'long',\r\n yearFormat = 'numeric', \r\n label,\r\n value,\r\n useTime \r\n } = props; \r\n \r\n const isDate = value && value.getUTCHours;\r\n const hideComponent = hideIfNoValue && !isDate;\r\n\r\n if (hideComponent) {\r\n return null;\r\n }\r\n\r\n const dateIntlOptions = { weekday: weekdayFormat, \r\n day: dayFormat ,\r\n month: monthFormat,\r\n year: yearFormat\r\n }; \r\n \r\n const formattedDate = props.formatDate(value, dateIntlOptions);\r\n const formattedTime = props.useTime && props.formatTime(value); \r\n const formattedValue = !!useTime ? `${formattedDate} ${formattedTime}` : `${formattedDate}`; \r\n\r\n return ( \r\n <div className={`${className}`} id={componentId}>\r\n <Label label={label} />\r\n {formattedValue ? \r\n <span className={'value-date'}>\r\n {formattedValue}\r\n </span>\r\n : <NoValueDash/>\r\n }\r\n </div>\r\n);\r\n};\r\n\r\n/**\r\n * A utility that maps known props to a known style and appends them to a list.\r\n * \r\n * The list of final style classes are concatenated into a valid JSX className string attribute\r\n * \r\n * @param props \r\n */\r\nconst styleFromProps = (props: DisplayDateProps) =>\r\n [\r\n styles.date,\r\n props.className,\r\n styles[props.style] && styles[props.style], \r\n props.showStacked && styles.stackedColumn, \r\n props.strong && styles.strong \r\n ].filter(s => s).join(' ');\r\n\r\n/**\r\n * Higher order component to override the final className\r\n * @param Component the component to decorate\r\n */\r\nconst styleVariations = (Component: any) => ({children, ...childProps}: DisplayDateProps) => (\r\n <Component {...childProps} className={styleFromProps(childProps)}>\r\n {children}\r\n </Component>\r\n);\r\n\r\nexport const DisplayDate = compose(styleVariations)(DisplayDateComponent);\r\n","export {DisplayDate} from './display-date';\r\n","import * as React from 'react';\r\nimport { SingleValueComponent } from '../common';\r\nimport styles from './display-boolean.scss';\r\nimport { compose } from 'redux';\r\nimport { Label } from 'ui/common';\r\n\r\nexport interface DisplayBooleanProps extends SingleValueComponent<number>{\r\n /**\r\n * Display modes defined by design handbook\r\n */\r\n style?: 'secondary';\r\n /**\r\n * When true, a predefined style class to render the label above the value is applied\r\n */\r\n showStacked: boolean;\r\n /**\r\n * When true, the label font is normal and the value font is bold\r\n */\r\n strong?: boolean; \r\n /**\r\n * When true, the component gets hidden when value is empty\r\n */\r\n hideIfNoValue?: boolean;\r\n /**\r\n * translation text if the value is selected\r\n */\r\n textCheckedValue?: string;\r\n /**\r\n * translation text if the value is not selected\r\n */\r\n textUncheckedValue?: string;\r\n\r\n /**\r\n * @internal\r\n */\r\n children?: any;\r\n}\r\n\r\n/**\r\n * A utility that maps known props to a known style and appends them to a list.\r\n * \r\n * The list of final style classes are concatenated into a valid JSX className string attribute\r\n * \r\n * @param props \r\n */\r\nconst styleFromProps = (props: DisplayBooleanProps) =>\r\n [\r\n styles.labelAndBoolean,\r\n props.className,\r\n props.strong && styles.strong,\r\n props.showStacked && styles.stackedColumn,\r\n !!styles[props.style] && styles[props.style] \r\n ].filter(s => s).join(' ');\r\n\r\nconst DisplayBooleanComponent = (props: DisplayBooleanProps) => {\r\n const {hideIfNoValue, label, value, textCheckedValue, textUncheckedValue} = props;\r\n const hideComponent = hideIfNoValue && !value;\r\n const valueText = !!value ? !!textCheckedValue && textCheckedValue\r\n : !!textUncheckedValue && textUncheckedValue;\r\n return(\r\n !hideComponent &&\r\n <div id={props.componentId} className={`${props.className} ${styles.labelAndBoolean}`}>\r\n <Label label={label} />\r\n <span className={'value-boolean'}>\r\n {valueText}\r\n </span>\r\n </div> \r\n );\r\n};\r\n\r\n/**\r\n * Higher order component to override the final className\r\n * @param Component the component to decorate\r\n */\r\nconst styleVariations = (Component: any) => ({children, ...childProps}: DisplayBooleanProps) => (\r\n <Component {...childProps} className={styleFromProps(childProps)}>\r\n {children}\r\n </Component>\r\n);\r\n\r\nexport const DisplayBoolean = compose(styleVariations)(DisplayBooleanComponent);\r\n","export { DisplayBoolean } from './display-boolean';\r\n","import * as React from 'react';\r\nimport { SingleValueComponent } from '../common/types';\r\nimport { Link as RouterLink } from 'react-router';\r\nimport { Link as ExternalLink } from 'ui/link';\r\nimport styles from './link-heading.scss';\r\nimport { LinkContextConsumer } from 'app/components/contexts/link-context';\r\n\r\nexport interface PrimaryTitleProps extends SingleValueComponent<string> {\r\n url?: any;\r\n openInNewTab?: boolean;\r\n children?: any;\r\n}\r\n\r\nexport const LinkHeading: React.FunctionComponent<PrimaryTitleProps> = (props:PrimaryTitleProps) => {\r\n\r\n const {className, value, url} = props;\r\n const classes = props.url ? styles.link : '';\r\n\r\n return (\r\n <LinkContextConsumer>\r\n {parentLink => parentLink || !url ?\r\n <h1 id={props.componentId} className={`${styles.primaryTitle} ${className}`}>\r\n {value}\r\n </h1>\r\n :\r\n <RouterLink to={url} className={classes}>\r\n <h1 id={props.componentId} className={`${styles.primaryTitle} ${className}`}>\r\n {value}\r\n </h1>\r\n </RouterLink>\r\n }\r\n </LinkContextConsumer>);\r\n};\r\n\r\nexport const ExternalLinkHeading: React.FunctionComponent<PrimaryTitleProps> = (props:PrimaryTitleProps) => {\r\n\r\n const {className, value, url} = props;\r\n const inlineStyle = props.url ? styles.link: '';\r\n\r\n return (\r\n <ExternalLink url={url} className={inlineStyle}>\r\n <h1 id={props.componentId} className={`${styles.primaryTitle} ${className}`}>\r\n {value}\r\n </h1>\r\n </ExternalLink>);\r\n\r\n};\r\n","export * from './link-heading';\r\n","import * as React from 'react';\r\nimport { ComponentProps } from '../common/types';\r\nimport { ValidationSummary, ValidationProps } from 'ui';\r\n\r\nimport styles from './fluid-panel.scss';\r\n\r\nexport interface FluidPanelProps extends ComponentProps {\r\n displayBottomLine?: boolean;\r\n validation?: ValidationProps;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport const FluidPanel = (props:FluidPanelProps) => {\r\n const {validation, children} = props;\r\n const childCount = React.Children.count(children);\r\n const separatedChildren = React.Children.map(children, (child, i) => {\r\n const childWithoutSeparator = <li className={styles.withoutDelimiter}>\r\n {child}\r\n </li>;\r\n return (i === childCount - 1) ? childWithoutSeparator : <li className={styles.withDelimiter}> {child}</li>;\r\n });\r\n\r\n return (\r\n <div id={props.componentId} className={`fluid-panel ${styles.fluidPanel}`}>\r\n <ValidationSummary validationError={validation}/>\r\n <ul>\r\n {separatedChildren}\r\n </ul>\r\n </div>\r\n );\r\n};\r\n","export { FluidPanel } from './fluid-panel';\r\n","import * as React from 'react';\r\nimport { SingleValueComponent } from '../common';\r\nimport { Expandable, ShouldTruncate } from 'ui/expandable';\r\nimport styles from './expandable-text.scss';\r\n\r\nimport { CSSProperties } from 'react';\r\n\r\nexport interface ExpandableTextProps extends SingleValueComponent<string> {\r\n textDisplayMore?: string;\r\n textDisplayLess?: string;\r\n visibleTextLength?: number;\r\n displayBottomLine?: boolean;\r\n expandAll?:boolean;\r\n}\r\n\r\nexport class ExpandableText extends React.Component<ExpandableTextProps> {\r\n public static defaultProps: Partial<ExpandableTextProps> = {\r\n visibleTextLength: 250,\r\n displayBottomLine: true\r\n };\r\n\r\n private contentRender = (collapsed: boolean) => {\r\n const value = this.props.value || '';\r\n const visibleText = collapsed ? value.substring(0, this.props.visibleTextLength) : value;\r\n\r\n return visibleText + (collapsed ? '...' : '');\r\n }\r\n\r\n public render() {\r\n const {textDisplayMore, textDisplayLess, displayBottomLine, componentId, className, visibleTextLength, expandAll} = this.props;\r\n\r\n const value = this.props.value || '';\r\n\r\n const defaultStyle: CSSProperties = {borderBottomWidth: '1px', borderBottomStyle: 'solid'};\r\n const currentStyle = displayBottomLine === false ? {paddingBottom: '0'} : defaultStyle;\r\n const shouldTruncate = ShouldTruncate(value, visibleTextLength) && !expandAll;\r\n\r\n return value ? ( \r\n <div>\r\n {shouldTruncate ?\r\n <p className={`${styles.expandableTextPrintOnly}`}>\r\n {value}\r\n </p>\r\n :\r\n null\r\n }\r\n <p id={componentId} style={currentStyle}\r\n className={`${className} ${styles.expandableText}`}>\r\n {shouldTruncate ?\r\n <Expandable content={this.contentRender} textDisplayMore={textDisplayMore} textDisplayLess={textDisplayLess} />\r\n :\r\n value\r\n }\r\n </p>\r\n </div>\r\n ) : null;\r\n }\r\n}\r\n","export { ExpandableText } from './expandable-text';\r\n","import * as React from 'react';\r\nimport { ValidationSummary } from 'ui';\r\n\r\nimport styles from './process-panel.scss';\r\n\r\nexport class ProcessPanel extends React.PureComponent<any, any> {\r\n\r\n public render() {\r\n const {\r\n componentId ,\r\n validation\r\n } = this.props; \r\n\r\n return (\r\n <section id={componentId} className={styles.processPanel}> \r\n <ValidationSummary validationError={validation}/>\r\n <div className=\"main-grid\">\r\n <div className=\"row\">\r\n {this.props.children}\r\n </div> \r\n </div> \r\n </section>\r\n );\r\n }\r\n }\r\n","export {ProcessPanel} from './process-panel';\r\n","import * as React from 'react';\r\nimport { ValidationSummary } from 'ui';\r\nimport styles from './flex-panel.scss';\r\n\r\nexport class FlexPanel extends React.PureComponent<any, any> {\r\n\r\n public render() {\r\n const {\r\n componentId ,\r\n validation\r\n } = this.props;\r\n\r\n return (\r\n <div className={`${styles.flexPanel} ${this.props.className}`} id={ componentId }>\r\n <ValidationSummary validationError={validation}/>\r\n <div className=\"main-grid\">\r\n <div className=\"row justify-content-between\">\r\n {this.props.children}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n }\r\n","export { FlexPanel } from './flex-panel';\r\n","import * as React from 'react';\r\nimport { ComponentProps, ValidationSummary, ValidationProps } from 'ui';\r\n\r\nexport interface ColumnsPanelProps extends ComponentProps {\r\n /** \r\n * The flexbox column size (1-12)\r\n */\r\n columns: number;\r\n children: any;\r\n validation?: ValidationProps;\r\n}\r\n\r\nexport const ColumnsPanel: React.SFC<ColumnsPanelProps> = (props: ColumnsPanelProps) => {\r\n\r\n const {\r\n componentId,\r\n children,\r\n columns='auto',\r\n validation\r\n } = props;\r\n\r\n if( (typeof columns === 'number') && (columns < 1 || columns > 12)){\r\n throw new Error('configured columns must be between 1 and 12 for ColumnsPanel');\r\n }\r\n\r\n return (\r\n <div id={componentId} className={`col-lg-${columns}`}>\r\n <ValidationSummary validationError={validation}/>\r\n {children} \r\n </div> \r\n );\r\n};\r\n","export { ColumnsPanel } from './columns-panel';\r\n","import * as React from 'react';\r\nimport { ComponentProps } from '../common';\r\nimport styles from './paper.scss';\r\n\r\nexport const Paper = (props:ComponentProps) => (\r\n <div className={`container ${styles.paperStyle} ${props.className}`} id={props.componentId}>\r\n {props.children}\r\n </div>\r\n);\r\n","export { Paper } from './paper';\r\n","import * as React from 'react';\r\nimport { ValidationSummary } from 'ui';\r\nimport styles from './detail-form-panel.scss';\r\n\r\n/**\r\n * An expandable inline form to edit a child entity\r\n */\r\nexport const DetailFormPanel = (props:any) => (\r\n <div className={`row ${styles.detailFormPanel}`}>\r\n <ValidationSummary validationError={props.validation}/>\r\n {props.children}\r\n </div>\r\n);\r\n","export * from './detail-form-panel';\r\n","import { ValueProperty } from '../common/index';\r\nimport * as React from 'react';\r\nimport { ComponentProps, SingleKeyValueComponent, NoValueDash } from '../common';\r\nimport styles from './display-child-values.scss';\r\nimport { Expandable, standardTextLimit, ShouldTruncate } from 'ui/expandable';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\n\r\nexport class DisplayChildValues extends React.Component<DisplayChildValuesProps<any>, DisplayChildValuesState> {\r\n public static getDerivedStateFromProps(props:DisplayChildValuesProps<any>) {\r\n const {childValues = [], separator = ', '} = props;\r\n const displayValues = childValues.filter(child => child && child.valueItem && !!child.valueItem.value);\r\n\r\n const items:string[] = displayValues.map((child, i) => {\r\n const separatorString = (displayValues.length > 1 && i < displayValues.length - 1 ) ? separator : '';\r\n return `${child.valueItem.description || child.valueItem.value}${separatorString}`;\r\n });\r\n\r\n let accumulated: number = 0;\r\n const truncatedItems = items.map(item => {\r\n const delta = standardTextLimit - accumulated;\r\n accumulated = item.length;\r\n if (delta < 0) {\r\n return null;\r\n }\r\n return item.length < delta ? item : item.substr(0, delta) + '...';\r\n }).filter(item => item);\r\n\r\n return {items, truncatedItems};\r\n }\r\n\r\n public state:Readonly<DisplayChildValuesState> = {\r\n items: [],\r\n truncatedItems: []\r\n };\r\n\r\n private renderListItems = (displayValues: string[]) => {\r\n return displayValues.map((value: string, index) => <span className={`${styles.item} item-value`} key={index}>\r\n {insertOptionalWordbreaks(value)}{'\\u200B'}\r\n </span>);\r\n }\r\n\r\n private expanderRender = (collapsed: boolean) => {\r\n const {items, truncatedItems} = this.state;\r\n if (!collapsed) {\r\n return this.renderListItems(items);\r\n }\r\n return this.renderListItems(truncatedItems);\r\n };\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n className,\r\n label,\r\n hideIfNoValues = false,\r\n textDisplayMore,\r\n textDisplayLess,\r\n shouldTruncate = false\r\n } = this.props;\r\n\r\n const {items} = this.state;\r\n const labelText = (label && label.visible !== false) && label.text;\r\n const doTruncate = shouldTruncate && ShouldTruncate(items.join(''));\r\n\r\n if(hideIfNoValues && !items.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div id={componentId} className={`${styles.separatedValues} ${className}`}>\r\n {labelText && <label className=\"label\">{labelText}</label>}\r\n {items.length ?\r\n <div className={styles.wrapper}>\r\n {doTruncate ? <Expandable\r\n content={this.expanderRender}\r\n {...{textDisplayLess, textDisplayMore}}/>\r\n :\r\n this.renderListItems(items)\r\n }\r\n </div>\r\n : <NoValueDash/>\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n\r\ninterface DisplayChildValuesState {\r\n items: string[];\r\n truncatedItems: string[];\r\n}\r\n\r\nexport interface DisplayChildValuesProps<T extends ValueProperty> extends ComponentProps{\r\n childValues: SingleKeyValueComponent<T>[];\r\n separator?: string;\r\n hideIfNoValues?: boolean;\r\n textDisplayMore?: string;\r\n textDisplayLess?: string;\r\n shouldTruncate?: boolean;\r\n}\r\n","export {DisplayChildValues} from './display-child-values';\r\n","import * as React from 'react';\r\nimport { InputControlContext } from '../common/input-control-context/input-control-context';\r\nimport { SingleValueComponent } from '../common';\r\nimport styles from './password.scss';\r\nimport MdRemoveRedEye from 'react-icons/lib/md/remove-red-eye';\r\nimport { ButtonTertiary } from 'ui/common/button/button-tertiary';\r\nimport debounce from 'lodash/debounce';\r\n\r\nconst debounceTime = 500;\r\n\r\ninterface PasswordState {\r\n passwordShown: boolean;\r\n value: string;\r\n hasFocus?: boolean;\r\n}\r\n\r\nexport class Password extends React.Component<SingleValueComponent<string>, PasswordState> {\r\n public state: Readonly<PasswordState> = {\r\n passwordShown: false,\r\n value: ''\r\n };\r\n\r\n private passwordInput: HTMLInputElement;\r\n private textInput: HTMLInputElement;\r\n\r\n private togglePasswordMask() {\r\n this.setState({ passwordShown: !this.state.passwordShown });\r\n }\r\n\r\n private debouncedOnChange: any = debounce((value) => {\r\n this.props.onChange(value);\r\n }, debounceTime);\r\n\r\n private onChange = () => {\r\n const newText = this.state.passwordShown ? this.textInput.value : this.passwordInput.value;\r\n this.setState({ value: newText });\r\n this.debouncedOnChange(newText);\r\n }\r\n\r\n private textFocus(): React.EventHandler<React.FocusEvent<HTMLInputElement>> {\r\n return () => this.setState({ hasFocus: true });\r\n }\r\n\r\n private textRef(): React.Ref<HTMLInputElement> {\r\n return input => this.textInput = input;\r\n }\r\n\r\n private passwordRef(): React.Ref<HTMLInputElement> {\r\n return input => this.passwordInput = input;\r\n }\r\n\r\n private passwordFocus(): React.EventHandler<React.FocusEvent<HTMLInputElement>> {\r\n return () => this.setState({ hasFocus: true });\r\n }\r\n\r\n private onBlur(): React.EventHandler<React.FocusEvent<HTMLInputElement>> {\r\n return () => this.setState({ hasFocus: false }, () => {\r\n this.props.onChange(this.state.value);\r\n });\r\n }\r\n\r\n public render() {\r\n const {\r\n placeholder\r\n } = this.props;\r\n const { passwordShown, value } = this.state;\r\n return (\r\n <InputControlContext\r\n {...this.props}>\r\n <div className={`${styles.wrapper} input-wrapper`}>\r\n <div className=\"input-group\">\r\n <div className={`form-control ${this.state.hasFocus ? 'form-control-focus' : ''}`}>\r\n <input\r\n type=\"password\"\r\n ref={this.passwordRef()}\r\n value={value}\r\n name={!passwordShown ? name : ''}\r\n placeholder={placeholder}\r\n style={{ display: !passwordShown ? 'block' : 'none' }}\r\n onChange={this.onChange}\r\n onFocus={this.passwordFocus()}\r\n onBlur={this.onBlur()}\r\n />\r\n\r\n <input\r\n type=\"text\"\r\n ref={this.textRef()}\r\n value={value}\r\n name={passwordShown ? name : ''}\r\n placeholder={placeholder}\r\n style={{ display: passwordShown ? 'block' : 'none' }}\r\n onChange={this.onChange}\r\n onFocus={this.textFocus()}\r\n onBlur={this.onBlur()}\r\n />\r\n\r\n <ButtonTertiary classNames={styles && styles.eyeIcon} onClick={this.eyeIconClick}>\r\n <MdRemoveRedEye size={20}/>\r\n </ButtonTertiary>\r\n </div>\r\n </div>\r\n </div>\r\n </InputControlContext>\r\n );\r\n }\r\n\r\n private eyeIconClick = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n return this.togglePasswordMask();\r\n }\r\n\r\n}\r\n","export { Password } from './password';\r\n","import * as React from 'react';\r\nimport { DisplayNumberProps } from 'ui/display-number/display-number';\r\nimport styles from './display-numeric-header.scss';\r\n\r\nexport const DisplayNumericHeader: React.FunctionComponent<DisplayNumberProps> = (props: DisplayNumberProps) => { \r\n \r\n const { className, componentId, label, valueItem, formatNumber, maxDecimals, useThousand } = props; \r\n const labelText = (label && label.visible !== false) && label.text; \r\n const intlOptions = { maximumFractionDigits: maxDecimals, useGrouping: useThousand as boolean };\r\n const numericText = !!valueItem && !!valueItem.value && formatNumber(valueItem.value, intlOptions); \r\n \r\n return (\r\n !!valueItem && !!valueItem.value && !isNaN(Number(valueItem.value)) && \r\n <h3 className={`${styles.numericHeader} ${className}`} id={componentId}>\r\n {label && <span className={`${styles.label}`}>{labelText}</span>}\r\n <span className={`${styles.numericText}`}>{numericText}</span> \r\n </h3>\r\n );\r\n};\r\n","export {DisplayNumericHeader} from './display-numeric-header';\r\n","import * as React from 'react';\r\nimport { findDOMNode } from 'react-dom';\r\nimport MdExpandMore from 'react-icons/lib/md/expand-more';\r\nimport MdExpandLess from 'react-icons/lib/md/expand-less';\r\nimport { scrollIntoView } from 'app/infrastructure/platform/browser-dom';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport { ComplexValue, RowComponentProps } from 'ui/common/types';\r\nimport { ButtonTertiary } from 'ui';\r\nimport styles from './tile.scss';\r\nimport { debounceRender } from 'ui/common/debounce-render';\r\nimport { ExpanderBackground } from 'ui/common/dialog-expander/expander-background/expander-background';\r\nimport { ContextMenu } from 'ui/tile/context-menu';\r\nimport { ButtonSecondary, ValidationLevel } from 'ui/common';\r\n\r\nconst DefaultHeader = ({primaryKey, showPrimaryKey}) => primaryKey && showPrimaryKey ?\r\n <div className={`${styles.key}`}>#{primaryKey.value}</div> : null;\r\n\r\nclass TileComponent extends React.Component<TileProps, TileState> {\r\n private ref: HTMLElement;\r\n public static defaultProps: Partial<TileProps> = {\r\n enabledChildEntityOperations: { remove: false },\r\n textKeyLabel: ''\r\n };\r\n\r\n public state: Readonly<TileState> = {\r\n hideImmediately: false\r\n };\r\n\r\n private handleSelect = (e?: React.MouseEvent<any>) => {\r\n this.setState({hideImmediately: false}, () =>\r\n this.props.onSelectDocumentItem && this.props.onSelectDocumentItem()\r\n );\r\n scrollIntoView( findDOMNode(this.ref) as HTMLElement);\r\n }\r\n\r\n private handleEdit = (e?: React.MouseEvent<any>) => {\r\n this.props.onEditDocumentItem && this.props.onEditDocumentItem();\r\n }\r\n\r\n private handleDelete = (e?: React.MouseEvent<any>) => {\r\n this.props.onDeleteDocumentItem && this.props.onDeleteDocumentItem();\r\n }\r\n\r\n private handleClose = () => {\r\n if (this.props.activate) {\r\n this.setState({hideImmediately: true}, () =>\r\n this.props.onSelectDocumentItem && this.props.onSelectDocumentItem(null) );\r\n }\r\n }\r\n\r\n private addRef = (el: HTMLElement) => this.ref = el;\r\n\r\n private hasChildErrors () {\r\n const {validationDescendants} = this.props;\r\n return validationDescendants && validationDescendants.length && validationDescendants.some(v => v.level === ValidationLevel.error);\r\n }\r\n\r\n private hasChildWarnings() {\r\n const {validationDescendants} = this.props;\r\n return validationDescendants && validationDescendants.length && validationDescendants.some(v => v.level === ValidationLevel.warning);\r\n }\r\n\r\n private renderDetailsButton = (shouldRenderOpenDetailView: boolean) => {\r\n const { details, textShowDetails, textHideDetails } = this.props;\r\n\r\n const detailsButtonStyle = this.hasChildErrors() ?\r\n styles.hasChildErrors :\r\n (this.hasChildWarnings() ? styles.hasChildWarnings : '');\r\n\r\n const showDetails = details ? <div className={styles.detailsButton}>\r\n <ButtonTertiary classNames={detailsButtonStyle} onClick={this.handleSelect}>\r\n {textShowDetails}<MdExpandMore/>\r\n </ButtonTertiary>\r\n </div> : null;\r\n const hideDetails = <div className={`${styles.detailsButton}`}>\r\n <ButtonTertiary classNames={detailsButtonStyle} onClick={this.handleClose}>\r\n {textHideDetails}<MdExpandLess/>\r\n </ButtonTertiary>\r\n </div>;\r\n return shouldRenderOpenDetailView ? hideDetails : showDetails;\r\n }\r\n\r\n // The Tile has become to procedurally heavy.\r\n // It takes on too many concerns and carries the logical weight of all it's use cases combined.\r\n // Refactoring should take place when changing the UX from expander to modal dialogs.\r\n // The inline comments are added to assist that refactoring later on.\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n details,\r\n children,\r\n activate,\r\n primaryKey,\r\n showPrimaryKey = true,\r\n showDetailsButton = true,\r\n showDetailsEditButton = false,\r\n textKeyLabel,\r\n textDone,\r\n textDetailsEditButton,\r\n print,\r\n expandAll\r\n } = this.props;\r\n // Detail dialog styles and title when primaryKey prop is provided\r\n const primaryKeyValue = (primaryKey && primaryKey.value) || '';\r\n const dialogTitle = `${textKeyLabel} #${primaryKeyValue}`;\r\n const titleStyle = React.Children.toArray(children).length > 1 ? 'has-title' : '';\r\n const tileContentClassNamesWhenPrimaryKeyIsShown = (showPrimaryKey && primaryKey) ? styles.tileWithKey : '';\r\n\r\n // Specific styles when a context menu is rendered\r\n const contextMenuClassNames = this.props.enabledChildEntityOperations.remove ? styles.hasMeatball : '';\r\n\r\n const canActivate = showDetailsButton && !this.state.hideImmediately;\r\n const isActivated = canActivate && activate;\r\n const shouldRenderOpenDetailView = details && (print || expandAll || isActivated);\r\n\r\n const shouldRenderDetailsEditButton = shouldRenderOpenDetailView && showDetailsEditButton;\r\n const detailsEditButton = shouldRenderDetailsEditButton ?\r\n <ButtonSecondary classNames={styles.editButton} onClick={this.handleEdit}>{textDetailsEditButton}</ButtonSecondary> : null;\r\n\r\n // From above logical evaluations; construct a expander to display details\r\n const detailView = shouldRenderOpenDetailView ?\r\n <DialogExpander\r\n expandAll={expandAll}\r\n onClose={this.handleClose}\r\n title={dialogTitle}\r\n textDone={textDone}\r\n extraFooterActions={[detailsEditButton]}\r\n className=\"tile-details-view\">\r\n {expandAll && <ContextMenu {...this.props} onDelete={this.handleDelete}/>}\r\n {details}\r\n {expandAll && <div className={styles.editButtonExpandAll}>{detailsEditButton}</div>}\r\n </DialogExpander>\r\n : null;\r\n\r\n // Details wrapper style\r\n const openDetailWrapperStyles = shouldRenderOpenDetailView && !expandAll ? styles.activeTile : '';\r\n\r\n // Tile styling - conditional based on open state + conditional child components to render.\r\n const tileWrapperClasses = `${this.props.className} ${styles.tileWrapper} ${openDetailWrapperStyles}`;\r\n const expandDetailsButton = this.renderDetailsButton(shouldRenderOpenDetailView);\r\n\r\n if (expandAll && details) {\r\n // Only show details - no header, no context menu - no modal backdrop\r\n return <div id={componentId} ref={this.addRef} className={tileWrapperClasses}>\r\n {detailView}\r\n </div>;\r\n }\r\n\r\n return <>\r\n {/* When expanded/open - render the close handle before the tile */}\r\n {shouldRenderOpenDetailView ? <div tabIndex={0} onFocus={this.handleClose}/> : ''}\r\n\r\n <div id={componentId} ref={this.addRef} className={tileWrapperClasses}>\r\n <div className={`${styles.tile} ${contextMenuClassNames}`}>\r\n <div className={`${styles.tileContent} ${tileContentClassNamesWhenPrimaryKeyIsShown}`}>\r\n {/* Tile content - header, context menu and children*/}\r\n <DefaultHeader {...this.props as any} />\r\n <ContextMenu {...this.props} onDelete={this.handleDelete}/>\r\n <div className={`tilevalues ${styles.tileValuesWrapper} ${titleStyle}`}>\r\n {children}\r\n </div>\r\n </div>\r\n {/* Button to expand is not part of the content - but rendered below */}\r\n {showDetailsButton && expandDetailsButton}\r\n </div>\r\n {/* If expanded (active, expand-all, print) - renders the details */}\r\n {detailView}\r\n {/* Modal backdrop */}\r\n {(shouldRenderOpenDetailView && !(print || expandAll)) && <ExpanderBackground onClick={this.handleClose}/>}\r\n </div>\r\n </>;\r\n }\r\n}\r\n\r\n/**\r\n * Required translated texts for this component\r\n */\r\nexport interface TileTranslations {\r\n textDelete: string;\r\n textDeleteMessage: string;\r\n textContinue: string;\r\n textCancel: string;\r\n textKeyLabel?: string;\r\n textDone?: string;\r\n textShowDetails?: string;\r\n textHideDetails?: string;\r\n textDetailsEditButton?: string;\r\n}\r\n\r\n/**\r\n * @interface TileProps\r\n * Required properties for Tile component.\r\n */\r\nexport interface TileProps extends RowComponentProps, TileTranslations {\r\n primaryKey: ComplexValue<number>;\r\n showPrimaryKey?: boolean;\r\n showPrimaryKeyLongDescription?: boolean;\r\n linkifyLongDescription?: boolean;\r\n showDetailsButton?: boolean;\r\n showDetailsEditButton?: boolean;\r\n extendedContextMenuOperations?: { text: string, callback: () => void }[];\r\n print: boolean;\r\n expandAll: boolean;\r\n}\r\n\r\nexport interface TileState {\r\n /**\r\n * When expanded, don't wait the redux store update. Just close the view. UX optimization.\r\n */\r\n hideImmediately?: boolean;\r\n}\r\n\r\nconst t = debounceRender(TileComponent);\r\nexport {t as Tile};\r\n","export {Tile} from './tile';\r\n","import { MultiKeyValueComponent, NoValueDash } from '../common';\r\nimport * as React from 'react';\r\nimport { toHex } from 'ui/common/hex-converter';\r\nimport { IconDisplay } from 'ui/common/icon';\r\nimport { Label } from 'ui/common/label/label';\r\nimport { ValueDisplay } from 'ui';\r\nimport { compose } from 'redux';\r\nimport get from 'lodash/get';\r\nimport styles from './display-codes.scss';\r\n\r\nexport interface DisplayCodesProps extends MultiKeyValueComponent<number> {\r\n /**\r\n * Display modes defined by design handbook\r\n */\r\n style?: 'primary' | 'secondary';\r\n /**\r\n * When true, label font is normal and the value font is bold and uppercase\r\n */\r\n invertStrong?: boolean;\r\n /**\r\n * When true, the label is displayed normal and the value font is bold\r\n */\r\n strong?: boolean;\r\n /**\r\n * When true, the background color defined for the current value is used as background color\r\n */\r\n displayBackgroundColor?: boolean;\r\n /**\r\n * Currently only 'left' is supported\r\n */\r\n displayIcon?: 'left' | 'right';\r\n /**\r\n * When true, the label is positioned above the value, as opposed to default, where label is to the left of the value\r\n */\r\n showStacked?: boolean;\r\n /**\r\n * When true, the component gets hidden when value is empty\r\n */\r\n hideIfNoValue?: boolean;\r\n}\r\n\r\nconst DisplayCodesComponent = (props: DisplayCodesProps) => {\r\n const {\r\n className,\r\n componentId,\r\n displayBackgroundColor = true,\r\n displayIcon,\r\n hideIfNoValue = false,\r\n label,\r\n valueItems } = props;\r\n\r\n const backgroundColorOfValue = (valueItem) => (displayBackgroundColor === true && valueItem) && toHex(valueItem.backgroundColor);\r\n const foregroundColorOfValue = (valueItem) => valueItem && toHex(valueItem.foregroundColor);\r\n const iconUrlOfValue = (valueItem) => displayIcon && get(valueItem, 'icon');\r\n\r\n const iconStyle = displayIcon === 'left' ? styles.displayIconLeft : styles.displayIconRight;\r\n\r\n const items = (valueItems || []).filter(n => n && n.value > 0).map( (valueItem, i) => {\r\n const separatorString = (valueItems.length > 1 && i < valueItems.length-1 ) ? ', ' : '';\r\n const colorStyles = {backgroundColor: `${backgroundColorOfValue(valueItem)}`,\r\n borderColor: `${backgroundColorOfValue(valueItem)}`,\r\n color: `${foregroundColorOfValue(valueItem)}`};\r\n return (\r\n !!valueItem.description &&\r\n <span key={i} className={backgroundColorOfValue(valueItem) ? 'has-bg-color' : ''} style={colorStyles}>\r\n <IconDisplay classNames={iconStyle} visible={displayIcon} url={iconUrlOfValue(valueItem)} />\r\n <ValueDisplay valueItem={valueItem} suffix={separatorString}/>\r\n </span>);\r\n });\r\n\r\n return (\r\n !(hideIfNoValue && !items.length) &&\r\n <div className={className} id={componentId}>\r\n <Label label={label} />\r\n {items.length ? <div>{items}</div> : <NoValueDash/>}\r\n </div>\r\n );\r\n};\r\n\r\n/**\r\n * A utility that maps known props to a known style and appends them to a list.\r\n *\r\n * The list of final style classes are concatenated into a valid JSX className string attribute\r\n *\r\n * @param props\r\n */\r\nconst styleFromProps = (props: DisplayCodesProps) =>\r\n [\r\n styles.code,\r\n props.className,\r\n props.showStacked && styles.stackedColumn,\r\n props.invertStrong && styles.invertStrong,\r\n props.strong && !props.invertStrong && styles.strong,\r\n !!styles[props.style] && `${styles[props.style]} display-codes-styled` ,\r\n !!get(props, 'valueItem.icon') && props.displayIcon === 'left' && styles.displayIconLeft\r\n ].filter(s => s).join(' ');\r\n\r\n/**\r\n * Higher order component to override the final className\r\n * @param Component the component to decorate\r\n */\r\nconst styleVariations = (Component: any) => (props: DisplayCodesProps) => (\r\n <Component {...props} className={styleFromProps(props)} />\r\n);\r\n\r\nexport const DisplayCodes = compose(styleVariations)(DisplayCodesComponent);\r\n","export { DisplayCodes } from './display-codes';\r\n","import { MultiKeyValueComponent, NoValueDash } from 'ui/common';\r\nimport * as React from 'react';\r\nimport { toHex } from 'ui/common/hex-converter';\r\nimport { IconDisplay } from 'ui/common/icon';\r\nimport { Label } from 'ui/common/label/label';\r\nimport { ValueDisplay } from 'ui';\r\nimport { compose } from 'redux';\r\nimport get from 'lodash/get';\r\nimport styles from './display-codes-hierarchy.scss';\r\n\r\nexport interface DisplayCodesHierachyProps extends MultiKeyValueComponent<number> {\r\n /**\r\n * Display modes defined by design handbook\r\n */\r\n style?: 'primary' | 'secondary';\r\n /**\r\n * When true, label font is normal and the value font is bold and uppercase\r\n */\r\n invertStrong?: boolean;\r\n /**\r\n * When true, the label is displayed normal and the value font is bold\r\n */\r\n strong?: boolean;\r\n /**\r\n * When true, the background color defined for the current value is used as background color\r\n */\r\n displayBackgroundColor?: boolean;\r\n /**\r\n * Currently only 'left' is supported\r\n */\r\n displayIcon?: 'left' | 'right';\r\n /**\r\n * When true, the label is positioned above the value, as opposed to default, where label is to the left of the value\r\n */\r\n showStacked?: boolean;\r\n /**\r\n * When true, the component gets hidden when value is empty\r\n */\r\n hideIfNoValue?: boolean; \r\n}\r\n\r\nconst DisplayCodesHierarchyComponent = (props: DisplayCodesHierachyProps) => {\r\n const {\r\n className,\r\n componentId,\r\n displayBackgroundColor = true,\r\n displayIcon,\r\n hideIfNoValue = false,\r\n label,\r\n valueItems } = props;\r\n\r\n const backgroundColorOfValue = (valueItem) => (displayBackgroundColor && valueItem) && toHex(valueItem.backgroundColor);\r\n const foregroundColorOfValue = (valueItem) => valueItem && toHex(valueItem.foregroundColor);\r\n const iconUrlOfValue = valueItem => displayIcon && get(valueItem, 'icon');\r\n\r\n const iconStyle = displayIcon === 'left' ? styles.displayIconLeft : styles.displayIconRight;\r\n \r\n const items = (valueItems || []).filter(n => n.value > 0).map( (valueItem, i) => {\r\n const separatorString = (valueItems.length > 1 && i < valueItems.length-1 ) ? ', ' : '';\r\n const styledColorsFromComponentValue = {\r\n backgroundColor: `${backgroundColorOfValue(valueItem)}`,\r\n color: `${foregroundColorOfValue(valueItem)}`\r\n };\r\n return ( \r\n !!valueItem.description &&\r\n <span key={i} style={styledColorsFromComponentValue}>\r\n <IconDisplay classNames={iconStyle} visible={displayIcon} url={iconUrlOfValue(valueItem)} /> \r\n <ValueDisplay valueItem={valueItem} suffix={separatorString}/>\r\n </span>);\r\n });\r\n \r\n return (\r\n !(hideIfNoValue && !items.length) && \r\n <div id={componentId} className={className} >\r\n <Label label={label} />\r\n {items.length ? <div>{items}</div> : <NoValueDash/>}\r\n </div>\r\n );\r\n};\r\n\r\n/**\r\n * A utility that maps known props to a known style and appends them to a list.\r\n * \r\n * The list of final style classes are concatenated into a valid JSX className string attribute\r\n * \r\n * @param props \r\n */\r\nconst styleFromProps = (props: DisplayCodesHierachyProps) =>\r\n [\r\n styles.code,\r\n props.className,\r\n props.showStacked && styles.stackedColumn,\r\n props.invertStrong && styles.invertStrong,\r\n props.strong && !props.invertStrong && styles.strong,\r\n !!styles[props.style] && styles[props.style] ,\r\n !!get(props, 'valueItem.icon') && props.displayIcon === 'left' && styles.displayIconLeft \r\n ].filter(s => s).join(' ');\r\n\r\n/**\r\n * Higher order component to override the final className\r\n * @param Component the component to decorate\r\n */\r\nconst styleVariations = (Component: any) => (props: DisplayCodesHierachyProps) => (\r\n <Component {...props} className={styleFromProps(props)} />\r\n);\r\n\r\nexport const DisplayCodesHierarchy = compose(styleVariations)(DisplayCodesHierarchyComponent);\r\n","export { DisplayCodesHierarchy } from './display-codes-hierarchy';\r\n","import * as React from 'react';\r\nimport { ComponentProps, FlexValidation, ValidationProps } from 'ui';\r\nimport styles from './flex-row-panel.scss';\r\n\r\nexport interface FlexRowPanelProps extends ComponentProps {\r\n children: any;\r\n validation?: ValidationProps;\r\n}\r\n\r\nexport const FlexRowPanel: React.SFC<FlexRowPanelProps> = (props: FlexRowPanelProps) => {\r\n\r\n const {\r\n componentId,\r\n children,\r\n validation\r\n } = props;\r\n\r\n return (React.Children.count(children) ?\r\n <div id={componentId} className={`row flex-row-panel ${styles.panel}`}>\r\n <FlexValidation {...validation}/>\r\n {children}\r\n </div> :\r\n <div className={styles.withoutChildren}/>\r\n );\r\n};\r\n","export { FlexRowPanel } from './flex-row-panel';\r\n","import * as React from 'react';\r\nimport { SingleValueComponent } from 'ui/common/types';\r\nimport { Label, CheckSymbol } from 'ui/common';\r\nimport { InputControlContext } from 'ui/common/input-control-context/input-control-context';\r\nimport styles from './checkbox.scss';\r\nimport { v1 as uuid } from 'uuid';\r\n\r\n/**\r\n * Creates Checkbox component.\r\n *\r\n */\r\n\r\nexport interface CheckboxProps extends SingleValueComponent<number> {\r\n /**\r\n * translation text if the value is selected\r\n */\r\n textCheckedValue?: string;\r\n /**\r\n * translation text if the value is not selected\r\n */\r\n textUncheckedValue?: string;\r\n}\r\n\r\nexport class Checkbox extends React.Component<CheckboxProps, any> {\r\n\r\n constructor(props: SingleValueComponent<number>) {\r\n super(props);\r\n this.state = {\r\n componentUuid: uuid()\r\n };\r\n }\r\n\r\n private onChange = () => {\r\n this.props.onChange && this.props.onChange(Number(!this.props.value));\r\n }\r\n\r\n public render() {\r\n const {className, label, value, componentId, validation, readOnly, info, infoLong} = this.props;\r\n const {componentUuid} = this.state;\r\n\r\n return (\r\n <InputControlContext\r\n componentId={componentId}\r\n className={`${className} ${styles.inputControl}`}\r\n validation={validation}\r\n info={info}\r\n infoLong={infoLong}>\r\n <div className={styles.wrapper}>\r\n <input id={`checkbox-${componentId}-${componentUuid}`}\r\n type=\"checkbox\"\r\n checked={!!value}\r\n disabled={readOnly}\r\n onChange={this.onChange}\r\n className=\"visuallyhidden form-check-input\"/>\r\n <Label htmlFor={`checkbox-${componentId}-${componentUuid}`}\r\n classNames=\"form-check-label\"\r\n label={label}\r\n selectSymbol={<CheckSymbol/>}/>\r\n </div>\r\n </InputControlContext>\r\n );\r\n }\r\n}\r\n","export { Checkbox } from './checkbox';\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent } from '../common';\r\nimport styles from './long-description.scss';\r\n\r\nexport const LongDescription = (props:SingleKeyValueComponent<number>) => {\r\n const { className, componentId, valueItem } = props;\r\n const hasLongDescription = !!valueItem && !!valueItem.longDescription;\r\n\r\n return (\r\n !!hasLongDescription &&\r\n <p id={componentId} className={`col-12 ${styles.longDescription} ${className}`}>\r\n {valueItem.longDescription}\r\n </p>\r\n );\r\n};\r\n","export {LongDescription} from './long-description';\r\n","import * as React from 'react';\r\nimport { ComplexValue } from '../common/types';\r\nimport { Icon } from 'ui/common/icon';\r\nimport styles from './icon-list.scss';\r\nimport { Tooltip } from 'ui/common/tooltip/tooltip';\r\n\r\nexport interface IconListProps {\r\n valueItems: ComplexValue<number>[];\r\n title?: string;\r\n defaultIcon?: JSX.Element;\r\n}\r\n\r\nconst icon = (valueItem: any, defaultIcon) => {\r\n return (<div className={`${valueItem.propName || ''} icon-list-item`} key={valueItem.value}>\r\n {valueItem.icon ? <Icon url={valueItem.icon}/> : defaultIcon}\r\n </div>);\r\n};\r\n\r\nconst icons = (valueItems: any, defaultIcon) => {\r\n return valueItems.map((valueItem) => icon(valueItem, defaultIcon));\r\n};\r\n\r\nexport const IconList = ({title, valueItems, defaultIcon}:IconListProps ) => (\r\n <Tooltip\r\n className={styles.tooltipOverwrite}\r\n title={valueItems.map(item => item.description).join('\\n')}\r\n delayed={true}\r\n center={true}\r\n narrow={true}>\r\n <div className={`${styles.iconlistWrapper} icon-list-wrapper`}>\r\n <label className={styles.label}>{title}</label>\r\n <div className=\"icon-list\" data-children={valueItems.length}>\r\n {!!valueItems && icons(valueItems, defaultIcon)}\r\n </div>\r\n </div>\r\n </Tooltip>\r\n);\r\n","export {IconList} from './icon-list';\r\n","import * as React from 'react';\r\nimport { SingleKeyValueComponent } from 'ui/common';\r\nimport { toHex } from 'ui/common/hex-converter';\r\nimport { DisplayColor } from 'ui/display-color';\r\nimport styles from './tile-top-zone.scss';\r\n\r\nexport const TileTopZone: React.SFC<SingleKeyValueComponent<number>> = (props: SingleKeyValueComponent<number>) => {\r\n const topZoneColor = props.valueItem && toHex(props.valueItem.backgroundColor);\r\n \r\n return ( \r\n <div className={`${props.className} ${styles.tileTopZone}`} id={props.componentId}> \r\n <DisplayColor {...props} hexColor={topZoneColor}/>\r\n </div>\r\n ); \r\n};\r\n","export {TileTopZone} from './tile-top-zone';\r\n","import * as React from 'react';\r\nimport { findDOMNode } from 'react-dom';\r\nimport MdExpandMore from 'react-icons/lib/md/expand-more';\r\nimport MdExpandLess from 'react-icons/lib/md/expand-less';\r\nimport { scrollIntoView } from 'app/infrastructure/platform/browser-dom';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport { ButtonTertiary } from 'ui';\r\nimport styles from './compact-tile.scss';\r\nimport { debounceRender } from 'ui/common/debounce-render';\r\nimport { ExpanderBackground } from 'ui/common/dialog-expander/expander-background/expander-background';\r\nimport { ContextMenu } from 'ui/tile/context-menu';\r\nimport { ButtonSecondary, ValidationLevel } from 'ui/common';\r\nimport { TileProps, TileState } from 'ui/tile/tile';\r\n\r\nclass CompactTileComponent extends React.Component<TileProps, TileState> {\r\n private ref: HTMLElement;\r\n public static defaultProps: Partial<TileProps> = {\r\n enabledChildEntityOperations: { remove: false },\r\n textKeyLabel: ''\r\n };\r\n public state: Readonly<TileState> = {\r\n hideImmediately: false\r\n };\r\n\r\n private handleSelect = (e?: React.MouseEvent<any>) => {\r\n this.setState({hideImmediately: false}, () =>\r\n this.props.onSelectDocumentItem && this.props.onSelectDocumentItem()\r\n );\r\n scrollIntoView( findDOMNode(this.ref) as HTMLElement);\r\n }\r\n\r\n private handleEdit = (e?: React.MouseEvent<any>) => {\r\n this.props.onEditDocumentItem && this.props.onEditDocumentItem();\r\n }\r\n\r\n private handleDelete = (e?: React.MouseEvent<any>) => {\r\n this.props.onDeleteDocumentItem && this.props.onDeleteDocumentItem();\r\n }\r\n\r\n private handleClose = () => {\r\n if (this.props.activate) {\r\n this.setState({hideImmediately: true}, () =>\r\n this.props.onSelectDocumentItem && this.props.onSelectDocumentItem(null) );\r\n }\r\n }\r\n\r\n private renderDetailsButton = (showDetails:boolean) => {\r\n const {textShowDetails, textHideDetails, validationDescendants} = this.props;\r\n\r\n const childrenHasErrors = validationDescendants &&\r\n validationDescendants.length &&\r\n validationDescendants.some(v => v.level === ValidationLevel.error);\r\n\r\n const childrenHasWarnings = validationDescendants &&\r\n validationDescendants.length &&\r\n validationDescendants.some(v => v.level === ValidationLevel.warning);\r\n\r\n const validationClass = childrenHasErrors ?\r\n styles.hasChildErrors :\r\n (childrenHasWarnings ? styles.hasChildWarnings : '');\r\n\r\n return <div className={styles.buttonContainer}>\r\n <ButtonTertiary\r\n classNames={`${styles.detailsButton} ${validationClass}`}\r\n onClick={showDetails ? this.handleSelect : this.handleClose}>\r\n {showDetails ?\r\n <>{textShowDetails}<MdExpandMore/></> :\r\n <>{textHideDetails}<MdExpandLess/></> }\r\n </ButtonTertiary>\r\n </div>;\r\n }\r\n\r\n private addRef = (el: HTMLElement) => this.ref = el;\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n details,\r\n children,\r\n activate,\r\n primaryKey,\r\n showPrimaryKey = true,\r\n showDetailsButton = true,\r\n showDetailsEditButton = false,\r\n textKeyLabel,\r\n textDone,\r\n textDetailsEditButton,\r\n print,\r\n expandAll\r\n } = this.props;\r\n // Detail dialog styles and title when primaryKey prop is provided\r\n const primaryKeyValue = (primaryKey && primaryKey.value) || '';\r\n const dialogTitle = `${textKeyLabel} #${primaryKeyValue}`;\r\n\r\n const canActivate = showDetailsButton && !this.state.hideImmediately;\r\n const isActivated = canActivate && activate;\r\n const shouldRenderOpenDetailView = details && (print || expandAll || isActivated);\r\n\r\n const shouldRenderDetailsEditButton = shouldRenderOpenDetailView && showDetailsEditButton;\r\n const detailsEditButton = shouldRenderDetailsEditButton ?\r\n <ButtonSecondary classNames={styles.editButton} onClick={this.handleEdit}>{textDetailsEditButton}</ButtonSecondary> : null;\r\n\r\n // From above logical evaluations; construct a expander to display details\r\n const detailView = shouldRenderOpenDetailView ?\r\n <DialogExpander\r\n expandAll={expandAll}\r\n onClose={this.handleClose}\r\n title={dialogTitle}\r\n textDone={textDone}\r\n extraFooterActions={[detailsEditButton]}\r\n className=\"tile-details-view\">\r\n {expandAll && <ContextMenu {...this.props} onDelete={this.handleDelete}/>}\r\n {details}\r\n {expandAll && <div className={styles.editButtonExpandAll}>{detailsEditButton}</div>}\r\n </DialogExpander>\r\n : null;\r\n\r\n const expandDetailsButton = details && this.renderDetailsButton(!shouldRenderOpenDetailView);\r\n\r\n const wrapperStyle = `${styles.compactTileWrapper} ${shouldRenderOpenDetailView && !expandAll ? styles.activeTile : ''}`;\r\n\r\n if (expandAll && details) {\r\n // Only show details - no header, no context menu - no modal backdrop\r\n return <div id={componentId} className={`${wrapperStyle} compact compact-tile`} ref={this.addRef}>\r\n {detailView}\r\n </div>;\r\n }\r\n\r\n return <>\r\n {/* When expanded/open - render the close handle before the tile */}\r\n {shouldRenderOpenDetailView ? <div tabIndex={0} onFocus={this.handleClose}/> : ''}\r\n\r\n <div id={componentId} className={`${wrapperStyle} compact compact-tile`} ref={this.addRef}>\r\n <div className={`${styles.compactTile}`}>\r\n {/* Tile content - header, context menu and children*/}\r\n <ContextMenu {...this.props} className={styles.contextMenu} onDelete={this.handleDelete}/>\r\n <div className={`${styles.contentWrapper} ${showPrimaryKey ? styles.showKey : ''}`}>\r\n {children}\r\n </div>\r\n {/* Button to expand is not part of the content - but rendered below */}\r\n {showDetailsButton && expandDetailsButton}\r\n </div>\r\n {/* If expanded (active, expand-all, print) - renders the details */}\r\n {detailView}\r\n {/* Modal backdrop */}\r\n {(shouldRenderOpenDetailView && !(print || expandAll)) && <ExpanderBackground onClick={this.handleClose}/>}\r\n </div>\r\n </>;\r\n }\r\n}\r\n\r\nconst t = debounceRender(CompactTileComponent);\r\nexport {t as CompactTile};\r\n","export {CompactTile} from './compact-tile';\r\n","import * as React from 'react';\r\nimport styles from './triangle.scss';\r\n\r\nexport const Triangle = () => (\r\n <svg className={`${styles.triangle} triangle`} viewBox=\"0 0 40 20\" height=\"20px\" width=\"40px\">\r\n <polygon className=\"triangle-border\" fill=\"#98ADD2\" points=\"37.3,16 30.8,10 20,0 9.2,10 2.7,16 \t\"/>\r\n <polygon className=\"triangle-fill\" fill=\"#fff\" points=\"20,1.5 30,10.8 40,20 20,20 0,20 10,10.8 \t\"/>\r\n </svg>\r\n);\r\n","export * from './triangle';\r\n","import * as React from 'react';\r\n\r\nexport const CheckSymbol = () => (\r\n <svg viewBox=\"0 0 40 40\" height=\"20\" width=\"20\" className=\"check-symbol\">\r\n\r\n <g id=\"unchecked\" >\r\n <path fill=\"#0067c5\"\r\n // tslint:disable-next-line:max-line-length\r\n d=\"M851.655,976.4a4.556,4.556,0,0,1,4.444,4.444v31.111a4.557,4.557,0,0,1-4.444,4.444H820.544a4.557,4.557,0,0,1-4.444-4.444V980.844a4.556,4.556,0,0,1,4.444-4.444Zm0,4.444H820.544v31.111h31.111Z\" \r\n transform=\"translate(-816.1 -976.4)\"\r\n />\r\n </g>\r\n\r\n <g id=\"checked\">\r\n <rect fill=\"#fff\" width=\"40\" height=\"40\" />\r\n <path fill=\"#0067c5\"\r\n // tslint:disable-next-line:max-line-length\r\n d=\"M38.525,3H7.441A4.453,4.453,0,0,0,3,7.441V38.525a4.453,4.453,0,0,0,4.441,4.441H38.525a4.453,4.453,0,0,0,4.441-4.441V7.441A4.453,4.453,0,0,0,38.525,3ZM18.543,34.084,7.441,23.408l3.109-2.987,7.994,7.686L35.418,11.884l3.106,2.987Z\" \r\n transform=\"translate(-2.965 -3)\"\r\n />\r\n </g>\r\n </svg>\r\n);\r\n","export * from './check-symbol';\r\n","import * as React from 'react';\r\n\r\nexport const RadioSymbol = () => (\r\n <svg viewBox=\"0 0 21 21\" height=\"21\" width=\"21\" className=\"radio-symbol\">\r\n <g id=\"radio-circle\" transform=\"translate(.5 0)\">\r\n <circle id=\"radio-dot\" fill=\"#0067C5\" cx=\"10\" cy=\"10\" r=\"5.7\"/>\r\n <circle cx=\"10\" cy=\"10\" r=\"8.9\" stroke=\"#0067C5\" strokeWidth=\"2\" fill=\"transparent\"/>\r\n </g>\r\n </svg>\r\n);\r\n","export * from './radio-symbol';\r\n","import * as React from 'react';\r\nimport styles from './no-value-dash.scss';\r\n\r\nexport const NoValueDash = () => (\r\n <div className={`no-value ${styles.dash}`}>–</div>\r\n);\r\n","export * from './no-value-dash';\r\n","import * as React from 'react';\r\nimport { TileViewProps } from './types';\r\nimport { FlexValidation } from 'ui';\r\n\r\nexport const TileViewValidationSummary:React.SFC<TileViewProps> = props => {\r\n const { validation } = props;\r\n return <FlexValidation {...validation}/>;\r\n};\r\n","import * as React from 'react';\r\nimport { AddButton, ValidationLevel } from 'ui';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport styles from './tile-view.scss';\r\nimport { TileViewProps } from './types';\r\nimport { TileViewValidationSummary } from './tile-view-validation';\r\nimport { debounceRender } from 'ui/common/debounce-render';\r\n\r\n/**\r\n * TileView is the container component for all iterators\r\n */\r\nexport class TileViewComponent extends React.Component<TileViewProps, any> {\r\n\r\n private addItem = () => {\r\n this.props.onAddDocumentItem && this.props.onAddDocumentItem();\r\n }\r\n\r\n private renderAddButton() {\r\n const {\r\n addButton,\r\n enabledChildEntityOperations = { add: false },\r\n readOnly, textAddItem, label\r\n } = this.props;\r\n\r\n const shouldRenderAddButton = !readOnly && enabledChildEntityOperations.add;\r\n\r\n return shouldRenderAddButton &&\r\n <div className={styles.addTile}>\r\n {\r\n addButton || <AddButton icon={mdPlus} onClick={this.addItem} required={label.required}>{ textAddItem }</AddButton>\r\n }\r\n </div>;\r\n }\r\n\r\n public render() {\r\n const {\r\n componentId,\r\n children,\r\n childItems,\r\n textNoData,\r\n rowClassName,\r\n label,\r\n expandAll,\r\n validation\r\n } = this.props;\r\n\r\n const hasChildren = childItems && childItems.length;\r\n\r\n const addButton = this.renderAddButton();\r\n\r\n const validationStyle = validation && (validation.level === ValidationLevel.error ? styles.hasErrors : \r\n (validation.level === ValidationLevel.warning ? styles.hasWarnings : ''));\r\n\r\n return <div className={`col-12 ${styles.tileView} ${validationStyle} tile-view`}>\r\n <div id={componentId} className={`${styles.tileViewContainer} ${this.props.className}`}>\r\n {\r\n label && label.text && label.visible &&\r\n <h3 className={styles.tileHeading}>\r\n {label.text}\r\n </h3>\r\n }\r\n\r\n <div>\r\n\r\n <div className=\"row expanders-in-equal-cols\">\r\n {\r\n !addButton && !hasChildren && textNoData &&\r\n <div className=\"col-12\">\r\n <p className=\"no-content\">\r\n {textNoData}\r\n </p>\r\n </div>\r\n }\r\n {\r\n React.Children.map(children, (child, i) => (\r\n <div key={i} className={`${(!expandAll && rowClassName) || 'col-12'} ${styles.tileWithChildren} tile-view-children`}>\r\n {child}\r\n </div>\r\n )\r\n )\r\n }\r\n </div>\r\n </div>\r\n\r\n {addButton}\r\n\r\n <div className=\"row\">\r\n <TileViewValidationSummary {...this.props}/>\r\n </div>\r\n </div>\r\n </div>;\r\n }\r\n}\r\n\r\nconst t = debounceRender(TileViewComponent);\r\nexport {t as TileView};\r\n","import { ComplexValue } from 'app/types-shared';\r\nimport { CodeListItemWire } from '../types';\r\n\r\nconst mergePathWithList = (codes: ComplexValue<number>[], path: ComplexValue<number>): ComplexValue<number>[] => {\r\n\r\n if (!path || codes.some(code => code.value === path.value)) {\r\n return codes;\r\n }\r\n\r\n return [{\r\n ...path,\r\n descendants: mergePathWithList(codes, path.descendants && path.descendants[0])\r\n }];\r\n};\r\n\r\nexport const mapListToStore = (codeItems: CodeListItemWire[], path: ComplexValue<number>): ComplexValue<number>[] => {\r\n\r\n const codeList = codeItems && codeItems\r\n .map(item => ({\r\n value: item.code && item.code.v,\r\n description: item.code && item.code.d,\r\n descendants: item.code && item.descendantCount ? [{ value: -1 }] : undefined\r\n })) || [] as ComplexValue<number>[];\r\n\r\n return mergePathWithList(codeList, path);\r\n};\r\n","import { ActionDispatching, LoadOptions } from 'app/types-shared';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { api } from '../api';\r\nimport { RequestCodetable, ReceiveCodetable, FailCodetable } from './action-types';\r\nimport { mapListToStore } from './map-to-store';\r\n\r\nexport const actionCreators = {\r\n\r\n loadCodetableOptions: (\r\n id: string,\r\n codetableId: number,\r\n loadOptionsParams: LoadOptions): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestCodetable(id, loadOptionsParams));\r\n\r\n try {\r\n const query = loadOptionsParams && loadOptionsParams.query || undefined;\r\n const parentId = loadOptionsParams && loadOptionsParams.parentId || undefined;\r\n const siblingId = loadOptionsParams && loadOptionsParams.siblingId || undefined;\r\n const displayNotSelected = loadOptionsParams && loadOptionsParams.displayNotSelected || undefined;\r\n const [codes, path] = await Promise.all([\r\n api.loadCodeItems({\r\n id: codetableId,\r\n parentId,\r\n siblingId,\r\n query,\r\n displayNotSelected\r\n }),\r\n siblingId !== undefined || parentId !== undefined\r\n ? api.loadPath(codetableId, siblingId || parentId)\r\n : Promise.resolve(undefined)]);\r\n\r\n const wireCodes = codes && codes.results || [];\r\n const pathCodes = codeItemToStoreValue(path || {});\r\n const storeCodes = mapListToStore(wireCodes, pathCodes);\r\n\r\n dispatch(new ReceiveCodetable(id, loadOptionsParams, storeCodes));\r\n } catch (err) {\r\n\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n dispatch(new FailCodetable(id, loadOptionsParams));\r\n }\r\n }\r\n};\r\n","module.exports = (__webpack_require__(49))(333);","module.exports = (__webpack_require__(49))(549);","module.exports = (__webpack_require__(49))(608);","module.exports = (__webpack_require__(49))(618);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"input-control-context__visuallyhidden--1Ebcx\",\"focusable\":\"input-control-context__focusable--186v5\"};","module.exports = (__webpack_require__(49))(703);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"numberbox__visuallyhidden--1vcac\",\"focusable\":\"numberbox__focusable--1W9GR\",\"numberbox\":\"numberbox__numberbox--2A8j_\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"footer__visuallyhidden--zIQrw\",\"focusable\":\"footer__focusable--3AXuy\",\"expander-footer\":\"footer__expander-footer--1intM\",\"expanderFooter\":\"footer__expander-footer--1intM\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"button__visuallyhidden--39YTx\",\"focusable\":\"button__focusable--AwD6p\",\"btn-icon\":\"button__btn-icon--2h1nr\",\"btnIcon\":\"button__btn-icon--2h1nr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"button-tertiary__visuallyhidden--2JbkF\",\"focusable\":\"button-tertiary__focusable--2qT-C\",\"btn-tertiary\":\"button-tertiary__btn-tertiary--CvN7M\",\"btnTertiary\":\"button-tertiary__btn-tertiary--CvN7M\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"button-inline\":\"button-inline__button-inline--3CFtB\",\"buttonInline\":\"button-inline__button-inline--3CFtB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"button-call-to-action__visuallyhidden--65lt6\",\"focusable\":\"button-call-to-action__focusable--2_fF2\",\"btn-call-to-action\":\"button-call-to-action__btn-call-to-action--2ajM0\",\"btnCallToAction\":\"button-call-to-action__btn-call-to-action--2ajM0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"close-button__visuallyhidden--25Nz0\",\"focusable\":\"close-button__focusable--1OPKJ\",\"close-button\":\"close-button__close-button--2kNKf\",\"closeButton\":\"close-button__close-button--2kNKf\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaCaretDown = function FaCaretDown(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31.4 15.7q0 0.6-0.5 1l-10 10q-0.4 0.4-1 0.4t-1-0.4l-10-10q-0.4-0.4-0.4-1t0.4-1 1-0.4h20q0.6 0 1 0.4t0.5 1z' })\n )\n );\n};\n\nexports.default = FaCaretDown;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"selected-options__visuallyhidden--11vEM\",\"focusable\":\"selected-options__focusable--2Fv7w\",\"list-of-items\":\"selected-options__list-of-items--1mOKk\",\"listOfItems\":\"selected-options__list-of-items--1mOKk\",\"slideDown\":\"selected-options__slideDown--2keOr\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdHome = function MdHome(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm16.6 33.4h-8.2v-13.4h-5l16.6-15 16.6 15h-5v13.4h-8.2v-10h-6.8v10z' })\n )\n );\n};\n\nexports.default = MdHome;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"option-btn-next-level__visuallyhidden--2bcrb\",\"focusable\":\"option-btn-next-level__focusable--1iin-\",\"ui-next-level-btn\":\"option-btn-next-level__ui-next-level-btn--2ahF5\",\"uiNextLevelBtn\":\"option-btn-next-level__ui-next-level-btn--2ahF5\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"option-icon__visuallyhidden--1AO6A\",\"focusable\":\"option-icon__focusable--1gGTy\",\"option-icon\":\"option-icon__option-icon--WRTNH\",\"optionIcon\":\"option-icon__option-icon--WRTNH\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-options__visuallyhidden--25ZkC\",\"focusable\":\"select-options__focusable--2FHps\",\"full-width-options\":\"select-options__full-width-options--dbnv6\",\"fullWidthOptions\":\"select-options__full-width-options--dbnv6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"hierarchy-options__visuallyhidden--dRPIS\",\"focusable\":\"hierarchy-options__focusable--2Ce8D\",\"hierarchy-options\":\"hierarchy-options__hierarchy-options--vT_1G\",\"hierarchyOptions\":\"hierarchy-options__hierarchy-options--vT_1G\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"label__visuallyhidden--2CBnw\",\"focusable\":\"label__focusable--1Uzwl\",\"with-colon\":\"label__with-colon--39KsR\",\"withColon\":\"label__with-colon--39KsR\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdKeyboardControl = function MdKeyboardControl(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 16.6q1.3 0 2.3 1.1t1.1 2.3-1.1 2.3-2.3 1.1-2.3-1.1-1.1-2.3 1.1-2.3 2.3-1.1z m10 0q1.3 0 2.3 1.1t1.1 2.3-1.1 2.3-2.3 1.1-2.3-1.1-1.1-2.3 1.1-2.3 2.3-1.1z m-20 0q1.3 0 2.3 1.1t1.1 2.3-1.1 2.3-2.3 1.1-2.3-1.1-1.1-2.3 1.1-2.3 2.3-1.1z' })\n )\n );\n};\n\nexports.default = MdKeyboardControl;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"meatball-menu__visuallyhidden--H0zRK\",\"focusable\":\"meatball-menu__focusable--1jj1v\",\"meatball-dropdown-wrapper\":\"meatball-menu__meatball-dropdown-wrapper--23TCQ\",\"meatballDropdownWrapper\":\"meatball-menu__meatball-dropdown-wrapper--23TCQ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"triangle__visuallyhidden--Z_iAZ\",\"focusable\":\"triangle__focusable--3HoBN\",\"triangle\":\"triangle__triangle--3c-x2\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"no-value-dash__visuallyhidden--17AFL\",\"focusable\":\"no-value-dash__focusable--31nUl\",\"dash\":\"no-value-dash__dash--C4e4U\"};","module.exports = (__webpack_require__(49))(630);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-base-component__visuallyhidden--1hCcH\",\"focusable\":\"select-base-component__focusable--2TBzX\",\"wrapper-thin\":\"select-base-component__wrapper-thin--2LQHP\",\"wrapperThin\":\"select-base-component__wrapper-thin--2LQHP\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"select-single-short-list__visuallyhidden--2hlK8\",\"focusable\":\"select-single-short-list__focusable--21wk2\",\"select-short-list\":\"select-single-short-list__select-short-list--35LuN\",\"selectShortList\":\"select-single-short-list__select-short-list--35LuN\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaSearch = function FaSearch(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm27.2 18.6q0-4.2-2.9-7.1t-7.1-2.9-7 2.9-3 7.1 2.9 7 7.1 3 7.1-3 2.9-7z m11.4 18.5q0 1.2-0.8 2.1t-2 0.8q-1.2 0-2-0.8l-7.7-7.7q-4 2.8-8.9 2.8-3.2 0-6.1-1.3t-5-3.3-3.4-5-1.2-6.1 1.2-6.1 3.4-5.1 5-3.3 6.1-1.2 6.1 1.2 5 3.3 3.4 5.1 1.2 6.1q0 4.9-2.7 8.9l7.6 7.6q0.8 0.9 0.8 2z' })\n )\n );\n};\n\nexports.default = FaSearch;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"search__visuallyhidden--3n4fR\",\"focusable\":\"search__focusable--AFX6h\",\"button\":\"search__button--3BM7H\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaCalendar = function FaCalendar(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm4.4 37.1h6.4v-6.4h-6.4v6.4z m7.8 0h7.2v-6.4h-7.2v6.4z m-7.8-7.8h6.4v-7.2h-6.4v7.2z m7.8 0h7.2v-7.2h-7.2v7.2z m-7.8-8.6h6.4v-6.4h-6.4v6.4z m16.4 16.4h7.1v-6.4h-7.1v6.4z m-8.6-16.4h7.2v-6.4h-7.2v6.4z m17.2 16.4h6.4v-6.4h-6.4v6.4z m-8.6-7.8h7.1v-7.2h-7.1v7.2z m-7.9-19.3v-6.4q0-0.3-0.2-0.5t-0.5-0.2h-1.4q-0.3 0-0.5 0.2t-0.2 0.5v6.4q0 0.3 0.2 0.5t0.5 0.2h1.4q0.3 0 0.5-0.2t0.2-0.5z m16.5 19.3h6.4v-7.2h-6.4v7.2z m-8.6-8.6h7.1v-6.4h-7.1v6.4z m8.6 0h6.4v-6.4h-6.4v6.4z m0.7-10.7v-6.4q0-0.3-0.2-0.5t-0.5-0.2h-1.5q-0.3 0-0.5 0.2t-0.2 0.5v6.4q0 0.3 0.2 0.5t0.5 0.2h1.5q0.2 0 0.5-0.2t0.2-0.5z m8.5-1.4v28.5q0 1.2-0.8 2.1t-2 0.8h-31.4q-1.2 0-2.1-0.9t-0.8-2v-28.5q0-1.2 0.8-2t2.1-0.9h2.8v-2.1q0-1.5 1.1-2.6t2.5-1h1.4q1.5 0 2.5 1.1t1.1 2.5v2.1h8.6v-2.1q0-1.5 1-2.6t2.5-1h1.5q1.4 0 2.5 1.1t1 2.5v2.1h2.9q1.1 0 2 0.9t0.8 2z' })\n )\n );\n};\n\nexports.default = FaCalendar;\nmodule.exports = exports['default'];","module.exports = (__webpack_require__(49))(621);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaClockO = function FaClockO(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm23 12.1v10q0 0.4-0.2 0.6t-0.5 0.2h-7.2q-0.3 0-0.5-0.2t-0.2-0.6v-1.4q0-0.3 0.2-0.5t0.5-0.2h5v-7.9q0-0.3 0.2-0.5t0.6-0.2h1.4q0.3 0 0.5 0.2t0.2 0.5z m9.3 7.9q0-3.3-1.6-6.1t-4.5-4.4-6.1-1.6-6.1 1.6-4.4 4.4-1.6 6.1 1.6 6.1 4.4 4.4 6.1 1.6 6.1-1.6 4.5-4.4 1.6-6.1z m5 0q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z' })\n )\n );\n};\n\nexports.default = FaClockO;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdStar = function MdStar(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 28.8l-10.3 6.2 2.7-11.7-9-7.9 11.9-1 4.7-11 4.7 11 11.9 1-9 7.9 2.7 11.7z' })\n )\n );\n};\n\nexports.default = MdStar;\nmodule.exports = exports['default'];","module.exports = (__webpack_require__(49))(634);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"process-panel__visuallyhidden--3v6T8\",\"focusable\":\"process-panel__focusable--1o3S2\",\"process-panel\":\"process-panel__process-panel--23XqJ\",\"processPanel\":\"process-panel__process-panel--23XqJ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"flex-panel__visuallyhidden--3THu8\",\"focusable\":\"flex-panel__focusable--26IKh\",\"flex-panel\":\"flex-panel__flex-panel--35-RZ\",\"flexPanel\":\"flex-panel__flex-panel--35-RZ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"hidden__visuallyhidden--2PTFz\",\"focusable\":\"hidden__focusable--37oSR\",\"hidden\":\"hidden__hidden--2EBOe\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"paper__visuallyhidden--1qWwr\",\"focusable\":\"paper__focusable--193nO\",\"paper-style\":\"paper__paper-style--2Bvtm\",\"paperStyle\":\"paper__paper-style--2Bvtm\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"detail-form-panel__visuallyhidden--8Pf5d\",\"focusable\":\"detail-form-panel__focusable--1-0xX\",\"detail-form-panel\":\"detail-form-panel__detail-form-panel--1ayG5\",\"detailFormPanel\":\"detail-form-panel__detail-form-panel--1ayG5\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"sort-order-button__visuallyhidden--Sdng_\",\"focusable\":\"sort-order-button__focusable--2OP8Z\",\"sort-order-button\":\"sort-order-button__sort-order-button--fPzzK\",\"sortOrderButton\":\"sort-order-button__sort-order-button--fPzzK\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"sort-by-select\":\"sort-by-select__sort-by-select--1pZBy\",\"sortBySelect\":\"sort-by-select__sort-by-select--1pZBy\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"sort-by-list-items\":\"sort-by-list__sort-by-list-items--30nYj\",\"sortByListItems\":\"sort-by-list__sort-by-list-items--30nYj\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdRemoveRedEye = function MdRemoveRedEye(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 15q2 0 3.5 1.5t1.5 3.5-1.5 3.5-3.5 1.5-3.5-1.5-1.5-3.5 1.5-3.5 3.5-1.5z m0 13.4q3.4 0 5.9-2.5t2.5-5.9-2.5-5.9-5.9-2.5-5.9 2.5-2.5 5.9 2.5 5.9 5.9 2.5z m0-20.9q6.2 0 11.2 3.4t7.2 9.1q-2.2 5.6-7.2 9.1t-11.2 3.4-11.2-3.4-7.2-9.1q2.2-5.6 7.2-9.1t11.2-3.4z' })\n )\n );\n};\n\nexports.default = MdRemoveRedEye;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"expander-background__visuallyhidden--1uJBh\",\"focusable\":\"expander-background__focusable--2asbc\",\"expander-background\":\"expander-background__expander-background--2Nlhp\",\"expanderBackground\":\"expander-background__expander-background--2Nlhp\",\"fadeIn\":\"expander-background__fadeIn--2RzLU\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"long-description__visuallyhidden--19eGW\",\"focusable\":\"long-description__focusable--3JIvz\",\"longDescription\":\"long-description__longDescription--3SDjo\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-color__visuallyhidden--cTdfT\",\"focusable\":\"display-color__focusable--2w6Tf\",\"display-color\":\"display-color__display-color--3GeNV\",\"displayColor\":\"display-color__display-color--3GeNV\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tile-top-zone__visuallyhidden--2cmVX\",\"focusable\":\"tile-top-zone__focusable--1hnFh\",\"tile-top-zone\":\"tile-top-zone__tile-top-zone--K4GBC\",\"tileTopZone\":\"tile-top-zone__tile-top-zone--K4GBC\"};","module.exports = (__webpack_require__(49))(469);","module.exports = (__webpack_require__(49))(471);","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar isEmail_1 = require(\"./isEmail\");\nexports.isEmail = isEmail_1.default;\nvar ReactMultiEmail_1 = require(\"./ReactMultiEmail\");\nexports.ReactMultiEmail = ReactMultiEmail_1.default;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"multi-emails__visuallyhidden--2lhHg\",\"focusable\":\"multi-emails__focusable--1yvKG\",\"multi-emails\":\"multi-emails__multi-emails--KMpDr\",\"multiEmails\":\"multi-emails__multi-emails--KMpDr\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdArrowBack = function MdArrowBack(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm33.4 18.4v3.2h-20.4l9.3 9.4-2.3 2.4-13.4-13.4 13.4-13.4 2.3 2.4-9.3 9.4h20.4z' })\n )\n );\n};\n\nexports.default = MdArrowBack;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdFlashOn = function MdFlashOn(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm11.6 3.4h16.8l-6.8 13.2h6.8l-11.8 20v-15h-5v-18.2z' })\n )\n );\n};\n\nexports.default = MdFlashOn;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdCheckBox = function MdCheckBox(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm16.6 28.4l15-15-2.3-2.5-12.7 12.7-5.9-5.9-2.3 2.3z m15-23.4c1.9 0 3.4 1.6 3.4 3.4v23.2c0 1.8-1.5 3.4-3.4 3.4h-23.2c-1.9 0-3.4-1.6-3.4-3.4v-23.2c0-1.8 1.5-3.4 3.4-3.4h23.2z' })\n )\n );\n};\n\nexports.default = MdCheckBox;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdAttachFile = function MdAttachFile(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm27.5 10h2.5v19.1c0 5.1-4.1 9.3-9.1 9.3s-9.3-4.2-9.3-9.3v-20.7c0-3.7 3.1-6.8 6.8-6.8s6.6 3.1 6.6 6.8v17.5c0 2.2-1.9 4.1-4.1 4.1s-4.3-1.9-4.3-4.1v-15.9h2.5v15.9c0 0.9 0.8 1.6 1.8 1.6s1.6-0.7 1.6-1.6v-17.5c0-2.3-1.9-4.3-4.1-4.3s-4.3 2-4.3 4.3v20.7c0 3.7 3.1 6.8 6.8 6.8s6.6-3.1 6.6-6.8v-19.1z' })\n )\n );\n};\n\nexports.default = MdAttachFile;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"loss-potential-evaluation__visuallyhidden--1qUWa\",\"focusable\":\"loss-potential-evaluation__focusable--1Vwpg\",\"evaluation\":\"loss-potential-evaluation__evaluation--lDSac\",\"tile-dropdown\":\"loss-potential-evaluation__tile-dropdown--14ntT\",\"tileDropdown\":\"loss-potential-evaluation__tile-dropdown--14ntT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"loss-potential-evaluation-tile-view__visuallyhidden--vMy_H\",\"focusable\":\"loss-potential-evaluation-tile-view__focusable--ZXdcT\",\"select-evaluation\":\"loss-potential-evaluation-tile-view__select-evaluation--3Nm8z\",\"selectEvaluation\":\"loss-potential-evaluation-tile-view__select-evaluation--3Nm8z\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"section-summary__visuallyhidden--10mkB\",\"focusable\":\"section-summary__focusable--WVbn8\",\"section-summary\":\"section-summary__section-summary--3x-rt\",\"sectionSummary\":\"section-summary__section-summary--3x-rt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"spin-loader\":\"spin-loader__spin-loader--3cAZq\",\"spinLoader\":\"spin-loader__spin-loader--3cAZq\",\"spin\":\"spin-loader__spin--BSHYT\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"category-tile-view__visuallyhidden--2u6pb\",\"focusable\":\"category-tile-view__focusable--miKtG\",\"category-tile-view\":\"category-tile-view__category-tile-view---JFaa\",\"categoryTileView\":\"category-tile-view__category-tile-view---JFaa\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"display-safe-anchor__visuallyhidden--2I6pv\",\"focusable\":\"display-safe-anchor__focusable--1cV6h\",\"display-safe-anchor\":\"display-safe-anchor__display-safe-anchor--Hg6KB\",\"displaySafeAnchor\":\"display-safe-anchor__display-safe-anchor--Hg6KB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"add-document-item-link-button__visuallyhidden--3spHW\",\"focusable\":\"add-document-item-link-button__focusable--6okVD\",\"button-wrapper\":\"add-document-item-link-button__button-wrapper--3h3zn\",\"buttonWrapper\":\"add-document-item-link-button__button-wrapper--3h3zn\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdHistory = function MdHistory(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 13.4h2.5v7l5.9 3.5-1.3 2-7.1-4.3v-8.2z m1.6-8.4q6.2 0 10.6 4.4t4.4 10.6-4.4 10.6-10.6 4.4-10.5-4.4l2.3-2.4q3.5 3.4 8.2 3.4 4.9 0 8.3-3.4t3.5-8.2-3.5-8.2-8.3-3.4-8.2 3.4-3.4 8.2h5l-6.7 6.7-0.2-0.2-6.5-6.5h5q0-6.2 4.5-10.6t10.5-4.4z' })\n )\n );\n};\n\nexports.default = MdHistory;\nmodule.exports = exports['default'];","'use strict';\n\nexports.__esModule = true;\nexports.locationsAreEqual = exports.Actions = exports.useQueries = exports.useBeforeUnload = exports.useBasename = exports.createMemoryHistory = exports.createHashHistory = exports.createHistory = undefined;\n\nvar _LocationUtils = require('./LocationUtils');\n\nObject.defineProperty(exports, 'locationsAreEqual', {\n enumerable: true,\n get: function get() {\n return _LocationUtils.locationsAreEqual;\n }\n});\n\nvar _createBrowserHistory = require('./createBrowserHistory');\n\nvar _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);\n\nvar _createHashHistory2 = require('./createHashHistory');\n\nvar _createHashHistory3 = _interopRequireDefault(_createHashHistory2);\n\nvar _createMemoryHistory2 = require('./createMemoryHistory');\n\nvar _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);\n\nvar _useBasename2 = require('./useBasename');\n\nvar _useBasename3 = _interopRequireDefault(_useBasename2);\n\nvar _useBeforeUnload2 = require('./useBeforeUnload');\n\nvar _useBeforeUnload3 = _interopRequireDefault(_useBeforeUnload2);\n\nvar _useQueries2 = require('./useQueries');\n\nvar _useQueries3 = _interopRequireDefault(_useQueries2);\n\nvar _Actions2 = require('./Actions');\n\nvar _Actions = _interopRequireWildcard(_Actions2);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.createHistory = _createBrowserHistory2.default;\nexports.createHashHistory = _createHashHistory3.default;\nexports.createMemoryHistory = _createMemoryHistory3.default;\nexports.useBasename = _useBasename3.default;\nexports.useBeforeUnload = _useBeforeUnload3.default;\nexports.useQueries = _useQueries3.default;\nexports.Actions = _Actions;","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nvar rtlDetect = require('./lib/rtl-detect');\n\nmodule.exports = {\n\n isRtlLang: rtlDetect.isRtlLang,\n\n getLangDir: rtlDetect.getLangDir\n\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"bowtie-tooltip__visuallyhidden--3IXmS\",\"focusable\":\"bowtie-tooltip__focusable--2RIW3\",\"bowtie-tooltip-bg\":\"bowtie-tooltip__bowtie-tooltip-bg--r2c4D\",\"bowtieTooltipBg\":\"bowtie-tooltip__bowtie-tooltip-bg--r2c4D\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"bowtie__visuallyhidden--Cb5DA\",\"focusable\":\"bowtie__focusable--2zH0A\",\"bowtie\":\"bowtie__bowtie--1Dqy3\"};","export * from './case';\r\nexport * from './case-receipt';\r\nexport * from './api';\r\nexport * from './types';\r\nexport * from './reducers';\r\nexport * from './actions';\r\nexport * from './constants';\r\n","import{useRef as n,useEffect as t}from\"react\";export default function(e,r,i){void 0===i&&(i=global);var o=n();t(function(){o.current=r},[r]),t(function(){if(i&&i.addEventListener){var n=function(n){return o.current(n)};return i.addEventListener(e,n),function(){i.removeEventListener(e,n)}}},[e,i])}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"ui-filter-error\":\"filter-error__ui-filter-error--kBGaH\",\"uiFilterError\":\"filter-error__ui-filter-error--kBGaH\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"filter-date-range__visuallyhidden--1Mhmg\",\"focusable\":\"filter-date-range__focusable--21yAa\",\"date-group\":\"filter-date-range__date-group--1hCRr\",\"dateGroup\":\"filter-date-range__date-group--1hCRr\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"add-filters-button\":\"add-filters-button__add-filters-button--3FuPo\",\"addFiltersButton\":\"add-filters-button__add-filters-button--3FuPo\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"filters__visuallyhidden--P-0Bi\",\"focusable\":\"filters__focusable--1OXwh\",\"information-panel\":\"filters__information-panel--3czFd\",\"informationPanel\":\"filters__information-panel--3czFd\"};","module.exports = (__webpack_require__(49))(372);","module.exports = (__webpack_require__(49))(636);","module.exports = (__webpack_require__(49))(439);","module.exports = (__webpack_require__(49))(426);","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"favourite-layout-component-factory__visuallyhidden--DkOOr\",\"focusable\":\"favourite-layout-component-factory__focusable--3WoPs\",\"no-rows\":\"favourite-layout-component-factory__no-rows--1wRSV\",\"noRows\":\"favourite-layout-component-factory__no-rows--1wRSV\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar FaSignOut = function FaSignOut(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm16.8 32.1q0 0.1 0 0.5t0 0.6 0 0.5-0.3 0.4-0.4 0.2h-7.2q-2.6 0-4.5-1.9t-1.9-4.5v-15.8q0-2.6 1.9-4.5t4.5-1.9h7.2q0.3 0 0.5 0.2t0.2 0.5q0 0.1 0 0.5t0 0.6 0 0.5-0.3 0.4-0.4 0.2h-7.2q-1.4 0-2.5 1t-1 2.5v15.8q0 1.4 1 2.5t2.5 1h7l0.2 0.1 0.3 0 0.2 0.1 0.1 0.2 0.1 0.3z m20.7-12.1q0 0.6-0.4 1l-12.2 12.1q-0.4 0.5-1 0.5t-1-0.5-0.4-1v-6.4h-10q-0.6 0-1-0.4t-0.4-1v-8.6q0-0.6 0.4-1t1-0.4h10v-6.4q0-0.6 0.4-1t1-0.5 1 0.5l12.2 12.1q0.4 0.4 0.4 1z' })\n )\n );\n};\n\nexports.default = FaSignOut;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdMenu = function MdMenu(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm5 10h30v3.4h-30v-3.4z m0 11.6v-3.2h30v3.2h-30z m0 8.4v-3.4h30v3.4h-30z' })\n )\n );\n};\n\nexports.default = MdMenu;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdFileDownload = function MdFileDownload(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm8.4 30h23.2v3.4h-23.2v-3.4z m23.2-15l-11.6 11.6-11.6-11.6h6.6v-10h10v10h6.6z' })\n )\n );\n};\n\nexports.default = MdFileDownload;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdHelp = function MdHelp(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm25.1 18.8c0.9-1 1.5-2.3 1.5-3.8 0-3.7-2.9-6.6-6.6-6.6s-6.6 2.9-6.6 6.6h3.2c0-1.8 1.6-3.4 3.4-3.4s3.4 1.6 3.4 3.4c0 0.9-0.4 1.7-1.1 2.3l-2 2.2c-1.2 1.2-1.9 2.8-1.9 4.6v0.9h3.2c0-2.5 0.8-3.4 2-4.7z m-3.5 12.8v-3.2h-3.2v3.2h3.2z m-1.6-28.2c9.2 0 16.6 7.4 16.6 16.6s-7.4 16.6-16.6 16.6-16.6-7.4-16.6-16.6 7.4-16.6 16.6-16.6z' })\n )\n );\n};\n\nexports.default = MdHelp;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdMailOutline = function MdMailOutline(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm20 18.4l13.4-8.4h-26.8z m13.4 11.6v-16.6l-13.4 8.2-13.4-8.2v16.6h26.8z m0-23.4c1.8 0 3.2 1.6 3.2 3.4v20c0 1.8-1.4 3.4-3.2 3.4h-26.8c-1.8 0-3.2-1.6-3.2-3.4v-20c0-1.8 1.4-3.4 3.2-3.4h26.8z' })\n )\n );\n};\n\nexports.default = MdMailOutline;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdFeedback = function MdFeedback(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm21.6 16.6v-6.6h-3.2v6.6h3.2z m0 6.8v-3.4h-3.2v3.4h3.2z m11.8-20q1.3 0 2.3 0.9t0.9 2.3v20q0 1.4-0.9 2.4t-2.3 1h-23.4l-6.6 6.6v-30q0-1.3 0.9-2.3t2.3-0.9h26.8z' })\n )\n );\n};\n\nexports.default = MdFeedback;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdPlaylistAddCheck = function MdPlaylistAddCheck(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm35.9 19.1l2.5 2.5-11.7 11.8-7.6-7.5 2.5-2.5 5.1 5z m-32.5 7.5v-3.2h13.2v3.2h-13.2z m20-16.6v3.4h-20v-3.4h20z m0 6.6v3.4h-20v-3.4h20z' })\n )\n );\n};\n\nexports.default = MdPlaylistAddCheck;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdAssignment = function MdAssignment(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm28.4 15v-3.4h-16.8v3.4h16.8z m0 6.6v-3.2h-16.8v3.2h16.8z m-5 6.8v-3.4h-11.8v3.4h11.8z m-3.4-23.4c-0.9 0-1.6 0.7-1.6 1.6s0.7 1.8 1.6 1.8 1.6-0.8 1.6-1.8-0.7-1.6-1.6-1.6z m11.6 0c1.8 0 3.4 1.6 3.4 3.4v23.2c0 1.8-1.6 3.4-3.4 3.4h-23.2c-1.8 0-3.4-1.6-3.4-3.4v-23.2c0-1.8 1.6-3.4 3.4-3.4h6.9c0.7-2 2.5-3.4 4.7-3.4s4 1.4 4.7 3.4h6.9z' })\n )\n );\n};\n\nexports.default = MdAssignment;\nmodule.exports = exports['default'];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _reactDndHtml5Backend = _interopRequireDefault(require(\"react-dnd-html5-backend\"));\n\nvar _reactDndTouchBackend = _interopRequireDefault(require(\"react-dnd-touch-backend\"));\n\nvar _dndMultiBackend = require(\"dnd-multi-backend\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n backends: [{\n backend: _reactDndHtml5Backend.default,\n transition: _dndMultiBackend.MouseTransition\n }, {\n backend: (0, _reactDndTouchBackend.default)({\n enableMouseEvents: true\n }),\n preview: true,\n transition: _dndMultiBackend.TouchTransition\n }]\n};\nexports.default = _default;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdRemove = function MdRemove(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31.6 21.6h-23.2v-3.2h23.2v3.2z' })\n )\n );\n};\n\nexports.default = MdRemove;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"dropdown-menu-item__visuallyhidden--2kwcO\",\"focusable\":\"dropdown-menu-item__focusable--130qn\",\"disabled\":\"dropdown-menu-item__disabled--3CKQN\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"dropdown-field__visuallyhidden--2CIlE\",\"focusable\":\"dropdown-field__focusable--3z0zf\",\"dropdown-field\":\"dropdown-field__dropdown-field--1Krqs\",\"dropdownField\":\"dropdown-field__dropdown-field--1Krqs\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"group-by-sort__visuallyhidden--24lso\",\"focusable\":\"group-by-sort__focusable--3CR96\",\"sort-area\":\"group-by-sort__sort-area--3nAjQ\",\"sortArea\":\"group-by-sort__sort-area--3nAjQ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"attributes-selector__visuallyhidden--1cf7F\",\"focusable\":\"attributes-selector__focusable--3laL_\",\"show-label\":\"attributes-selector__show-label--g7DY9\",\"showLabel\":\"attributes-selector__show-label--g7DY9\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"panel\":\"distribution-field__panel--3YeRi\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"filter-panel-menu__visuallyhidden--3ypfg\",\"focusable\":\"filter-panel-menu__focusable--Zl1bY\",\"filter-meatball-menu\":\"filter-panel-menu__filter-meatball-menu--25S9E\",\"filterMeatballMenu\":\"filter-panel-menu__filter-meatball-menu--25S9E\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"filter-item__visuallyhidden--35NKD\",\"focusable\":\"filter-item__focusable--JAC7r\",\"filter-item\":\"filter-item__filter-item--20IGe\",\"filterItem\":\"filter-item__filter-item--20IGe\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tile-link__visuallyhidden--2YmIB\",\"focusable\":\"tile-link__focusable--3UJw-\",\"tile-title\":\"tile-link__tile-title--10BtL\",\"tileTitle\":\"tile-link__tile-title--10BtL\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"meatball\":\"user-toolbar__meatball--2IzMU\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"filter-date-range__visuallyhidden--27kMg\",\"focusable\":\"filter-date-range__focusable--27CgV\",\"date-group\":\"filter-date-range__date-group--WRpR7\",\"dateGroup\":\"filter-date-range__date-group--WRpR7\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tabs-panel__visuallyhidden--18_j4\",\"focusable\":\"tabs-panel__focusable--1vdti\",\"tabs-panel\":\"tabs-panel__tabs-panel--1rY5K\",\"tabsPanel\":\"tabs-panel__tabs-panel--1rY5K\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"confirmation-box__visuallyhidden--2w7KI\",\"focusable\":\"confirmation-box__focusable--J2IhB\",\"mode-information\":\"confirmation-box__mode-information--1cqTt\",\"modeInformation\":\"confirmation-box__mode-information--1cqTt\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"useradmin-paper\":\"admin-paper__useradmin-paper--1eeAj\",\"useradminPaper\":\"admin-paper__useradmin-paper--1eeAj\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"option-panel\":\"options-panel__option-panel--S9qzY\",\"optionPanel\":\"options-panel__option-panel--S9qzY\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"change-id__visuallyhidden--2WzPG\",\"focusable\":\"change-id__focusable--PoSR_\",\"disclaimer-panel\":\"change-id__disclaimer-panel--3Zn5H\",\"disclaimerPanel\":\"change-id__disclaimer-panel--3Zn5H\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapped-component\":\"with-metro-line__wrapped-component--woQ7B\",\"wrappedComponent\":\"with-metro-line__wrapped-component--woQ7B\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"alternative-id__visuallyhidden--2ddDk\",\"focusable\":\"alternative-id__focusable--86VgH\",\"section\":\"alternative-id__section--3jKMk\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"details__visuallyhidden--3YT0y\",\"focusable\":\"details__focusable--2vdZ_\",\"details-container\":\"details__details-container--gNEco\",\"detailsContainer\":\"details__details-container--gNEco\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"tag__visuallyhidden--1RHW6\",\"focusable\":\"tag__focusable--43mYy\",\"tag\":\"tag__tag--1XMKw\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"codetable-list-items__visuallyhidden--2nULK\",\"focusable\":\"codetable-list-items__focusable--34XCO\",\"deleting\":\"codetable-list-items__deleting--3I-g6\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"number-of-results__visuallyhidden--2S5uH\",\"focusable\":\"number-of-results__focusable--3x_tn\",\"search-hits\":\"number-of-results__search-hits--24OQ3\",\"searchHits\":\"number-of-results__search-hits--24OQ3\"};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdDelete = function MdDelete(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm31.6 6.6v3.4h-23.2v-3.4h5.7l1.8-1.6h8.2l1.8 1.6h5.7z m-21.6 25v-20h20v20c0 1.8-1.6 3.4-3.4 3.4h-13.2c-1.8 0-3.4-1.6-3.4-3.4z' })\n )\n );\n};\n\nexports.default = MdDelete;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"translations__visuallyhidden--2-QN9\",\"focusable\":\"translations__focusable--Bwgi0\",\"section-header-container\":\"translations__section-header-container--3I_2f\",\"sectionHeaderContainer\":\"translations__section-header-container--3I_2f\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"codetable-item-form\":\"codetable-item-form__codetable-item-form--231NO\",\"codetableItemForm\":\"codetable-item-form__codetable-item-form--231NO\"};","module.exports = (__webpack_require__(49))(416);","module.exports = (__webpack_require__(49))(421);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdInsertDriveFile = function MdInsertDriveFile(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm21.6 15h9.3l-9.3-9.1v9.1z m-11.6-11.6h13.4l10 10v20q0 1.3-1.1 2.3t-2.3 0.9h-20q-1.3 0-2.3-0.9t-1.1-2.3l0.1-26.8q0-1.3 1-2.3t2.3-0.9z' })\n )\n );\n};\n\nexports.default = MdInsertDriveFile;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar IoAndroidArrowDropright = function IoAndroidArrowDropright(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm15 10l10 10-10 10v-20z' })\n )\n );\n};\n\nexports.default = IoAndroidArrowDropright;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdPhone = function MdPhone(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm11 18c2.4 4.7 6.3 8.6 11 11l3.7-3.7c0.5-0.5 1.2-0.6 1.7-0.4 1.9 0.6 3.9 1 6 1 0.9 0 1.6 0.7 1.6 1.6v5.9c0 0.9-0.7 1.6-1.6 1.6-15.7 0-28.4-12.7-28.4-28.4 0-0.9 0.7-1.6 1.6-1.6h5.9c0.9 0 1.6 0.7 1.6 1.6 0 2.2 0.4 4.1 1 6 0.1 0.5 0.1 1.2-0.4 1.7z' })\n )\n );\n};\n\nexports.default = MdPhone;\nmodule.exports = exports['default'];","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactIconBase = require('react-icon-base');\n\nvar _reactIconBase2 = _interopRequireDefault(_reactIconBase);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar MdNotifications = function MdNotifications(props) {\n return _react2.default.createElement(\n _reactIconBase2.default,\n _extends({ viewBox: '0 0 40 40' }, props),\n _react2.default.createElement(\n 'g',\n null,\n _react2.default.createElement('path', { d: 'm30 26.6l3.4 3.4v1.6h-26.8v-1.6l3.4-3.4v-8.2c0-5.2 2.7-9.4 7.5-10.6v-1.2c0-1.4 1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5v1.2c4.8 1.2 7.5 5.5 7.5 10.6v8.2z m-10 10c-1.9 0-3.4-1.4-3.4-3.2h6.8c0 1.8-1.6 3.2-3.4 3.2z' })\n )\n );\n};\n\nexports.default = MdNotifications;\nmodule.exports = exports['default'];","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapper\":\"edit-sms-consent__wrapper--W0C10\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapper\":\"edit-push-consent__wrapper--1ZsKE\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"top-panel__visuallyhidden--1yJj1\",\"focusable\":\"top-panel__focusable--17aLX\",\"button-container\":\"top-panel__button-container--4UA6z\",\"buttonContainer\":\"top-panel__button-container--4UA6z\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"info-messages__visuallyhidden--3cXKH\",\"focusable\":\"info-messages__focusable--MbPVX\",\"info-message-panel\":\"info-messages__info-message-panel--zjuIF\",\"infoMessagePanel\":\"info-messages__info-message-panel--zjuIF\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"my-notifications__visuallyhidden--3KAmr\",\"focusable\":\"my-notifications__focusable--2XnRf\",\"consents-container\":\"my-notifications__consents-container--18xCB\",\"consentsContainer\":\"my-notifications__consents-container--18xCB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapper\":\"no-content__wrapper--3q95L\"};","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar classof = require('../internals/classof-raw');\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar IS_NODE = classof(process) == 'process';\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n } else if (MutationObserver && !IS_IOS) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","module.exports = (__webpack_require__(49))(336);","var toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : nativeGetOwnPropertyNames(toIndexedObject(it));\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n","'use strict';\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\nvar floor = Math.floor;\nvar stringFromCharCode = String.fromCharCode;\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n for (; delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\n// eslint-disable-next-line max-statements\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n output.push(delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n for (var k = base; /* no condition */; k += base) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n return output.join('');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = input.toLowerCase().replace(regexSeparators, '\\u002E').split('.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);\n }\n return encoded.join('.');\n};\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar getBuiltIn = require('../internals/get-built-in');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar hasOwn = require('../internals/has');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $fetch = getBuiltIn('fetch');\nvar Headers = getBuiltIn('Headers');\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = it.replace(plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = result.replace(percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replace = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replace[match];\n};\n\nvar serialize = function (it) {\n return encodeURIComponent(it).replace(find, replacer);\n};\n\nvar parseSearchParams = function (result, query) {\n if (query) {\n var attributes = query.split('&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = attribute.split('=');\n result.push({\n key: deserialize(entry.shift()),\n value: deserialize(entry.join('='))\n });\n }\n }\n }\n};\n\nvar updateSearchParams = function (query) {\n this.entries.length = 0;\n parseSearchParams(this.entries, query);\n};\n\nvar validateArgumentsLength = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n});\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n var that = this;\n var entries = [];\n var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;\n\n setInternalState(that, {\n type: URL_SEARCH_PARAMS,\n entries: entries,\n updateURL: function () { /* empty */ },\n updateSearchParams: updateSearchParams\n });\n\n if (init !== undefined) {\n if (isObject(init)) {\n iteratorMethod = getIteratorMethod(init);\n if (typeof iteratorMethod === 'function') {\n iterator = iteratorMethod.call(init);\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = entryNext.call(entryIterator)).done ||\n (second = entryNext.call(entryIterator)).done ||\n !entryNext.call(entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n entries.push({ key: first.value + '', value: second.value + '' });\n }\n } else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });\n } else {\n parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');\n }\n }\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\nredefineAll(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.appent` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n state.entries.push({ key: name + '', value: value + '' });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) entries.splice(index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) result.push(entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = name + '';\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = name + '';\n var val = value + '';\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) entries.splice(index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) entries.push({ key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n var entries = state.entries;\n // Array#sort is not stable in some engines\n var slice = entries.slice();\n var entry, entriesIndex, sliceIndex;\n entries.length = 0;\n for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {\n entry = slice[sliceIndex];\n for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {\n if (entries[entriesIndex].key > entry.key) {\n entries.splice(entriesIndex, 0, entry);\n break;\n }\n }\n if (entriesIndex === sliceIndex) entries.push(entry);\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\nredefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\nredefine(URLSearchParamsPrototype, 'toString', function toString() {\n var entries = getInternalParamsState(this).entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n result.push(serialize(entry.key) + '=' + serialize(entry.value));\n } return result.join('&');\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` for correct work with polyfilled `URLSearchParams`\n// https://github.com/zloirock/core-js/issues/674\nif (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {\n $({ global: true, enumerable: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n var args = [input];\n var init, body, headers;\n if (arguments.length > 1) {\n init = arguments[1];\n if (isObject(init)) {\n body = init.body;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headers.has('content-type')) {\n headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n init = create(init, {\n body: createPropertyDescriptor(0, String(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n }\n args.push(init);\n } return $fetch.apply(this, args);\n }\n });\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\nmodule.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar defineProperty = require('../internals/object-define-property').f;\n\n// `Array.prototype.lastIndex` getter\n// https://github.com/keithamus/proposal-array-last\nif (DESCRIPTORS && !('lastIndex' in [])) {\n defineProperty(Array.prototype, 'lastIndex', {\n configurable: true,\n get: function lastIndex() {\n var O = toObject(this);\n var len = toLength(O.length);\n return len == 0 ? 0 : len - 1;\n }\n });\n\n addToUnscopables('lastIndex');\n}\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar min = Math.min;\nvar nativeLastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\n// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : nativeLastIndexOf;\n","// `SameValueZero` abstract operation\n// https://tc39.github.io/ecma262/#sec-samevaluezero\nmodule.exports = function (x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y || x != x && y != y;\n};\n","module.exports = (__webpack_require__(49))(338);","'use strict';\nvar $ = require('../internals/export');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar toLength = require('../internals/to-length');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\nvar IS_PURE = require('../internals/is-pure');\n\nvar nativeStartsWith = ''.startsWith;\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = String(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = String(searchString);\n return nativeStartsWith\n ? nativeStartsWith.call(that, search, index)\n : that.slice(index, index + search.length) === search;\n }\n});\n","module.exports = (__webpack_require__(49))(268);","'use strict';\nvar isArray = require('../internals/is-array');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","var global = require('../internals/global');\n\nvar globalIsFinite = global.isFinite;\n\n// `Number.isFinite` method\n// https://tc39.github.io/ecma262/#sec-number.isfinite\nmodule.exports = Number.isFinite || function isFinite(it) {\n return typeof it == 'number' && globalIsFinite(it);\n};\n","var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = global.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;\n\n// `parseInt` method\n// https://tc39.github.io/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n var S = trim(String(string));\n return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"visuallyhidden\":\"breadcrumb-item__visuallyhidden--1aW9u\",\"focusable\":\"breadcrumb-item__focusable--1W5TP\"};","module.exports = (__webpack_require__(49))(323);","module.exports = (__webpack_require__(49))(324);","var $ = require('../internals/export');\nvar sign = require('../internals/math-sign');\n\n// `Math.sign` method\n// https://tc39.github.io/ecma262/#sec-math.sign\n$({ target: 'Math', stat: true }, {\n sign: sign\n});\n","// `Math.sign` method implementation\n// https://tc39.github.io/ecma262/#sec-math.sign\nmodule.exports = Math.sign || function sign(x) {\n // eslint-disable-next-line no-self-compare\n return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;\n};\n","var $ = require('../internals/export');\nvar FREEZING = require('../internals/freezing');\nvar fails = require('../internals/fails');\nvar isObject = require('../internals/is-object');\nvar onFreeze = require('../internals/internal-metadata').onFreeze;\n\nvar nativeFreeze = Object.freeze;\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });\n\n// `Object.freeze` method\n// https://tc39.github.io/ecma262/#sec-object.freeze\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {\n freeze: function freeze(it) {\n return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;\n }\n});\n","var $ = require('../internals/export');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `String.raw` method\n// https://tc39.github.io/ecma262/#sec-string.raw\n$({ target: 'String', stat: true }, {\n raw: function raw(template) {\n var rawTemplate = toIndexedObject(template.raw);\n var literalSegments = toLength(rawTemplate.length);\n var argumentsLength = arguments.length;\n var elements = [];\n var i = 0;\n while (literalSegments > i) {\n elements.push(String(rawTemplate[i++]));\n if (i < argumentsLength) elements.push(String(arguments[i]));\n } return elements.join('');\n }\n});\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar React = require(\"react\");\nvar isEmail_1 = require(\"./isEmail\");\nvar ReactMultiEmail = /** @class */ (function (_super) {\n __extends(ReactMultiEmail, _super);\n function ReactMultiEmail(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n focused: false,\n emails: [],\n inputValue: '',\n };\n _this.findEmailAddress = function (value, isEnter) {\n var validateEmail = _this.props.validateEmail;\n var validEmails = [];\n var inputValue = '';\n var re = /[ ,;]/g;\n var isEmail = validateEmail || isEmail_1.default;\n var addEmails = function (email) {\n var emails = _this.state.emails;\n for (var i = 0, l = emails.length; i < l; i++) {\n if (emails[i] === email) {\n return false;\n }\n }\n validEmails.push(email);\n return true;\n };\n if (value !== '') {\n if (re.test(value)) {\n var arr = value.split(re).filter(function (n) {\n return n !== '' && n !== undefined && n !== null;\n });\n do {\n if (isEmail('' + arr[0])) {\n addEmails('' + arr.shift());\n }\n else {\n if (arr.length === 1) {\n /// 마지막 ì•„ì´í…œì´ë©´ inputValueë¡œ 남겨ë‘기\n inputValue = '' + arr.shift();\n }\n else {\n arr.shift();\n }\n }\n } while (arr.length);\n }\n else {\n if (isEnter) {\n if (isEmail(value)) {\n addEmails(value);\n }\n else {\n inputValue = value;\n }\n }\n else {\n inputValue = value;\n }\n }\n }\n _this.setState({\n emails: _this.state.emails.concat(validEmails),\n inputValue: inputValue,\n });\n if (validEmails.length && _this.props.onChange) {\n _this.props.onChange(_this.state.emails.concat(validEmails));\n }\n };\n _this.onChangeInputValue = function (value) {\n _this.findEmailAddress(value);\n };\n _this.removeEmail = function (index) {\n _this.setState(function (prevState) {\n return {\n emails: prevState.emails.slice(0, index).concat(prevState.emails.slice(index + 1)),\n };\n }, function () {\n if (_this.props.onChange) {\n _this.props.onChange(_this.state.emails);\n }\n });\n };\n _this.handleOnKeydown = function (e) {\n switch (e.which) {\n case 13:\n e.preventDefault();\n break;\n case 8:\n if (!e.currentTarget.value) {\n _this.removeEmail(_this.state.emails.length - 1);\n }\n break;\n default:\n }\n };\n _this.handleOnKeyup = function (e) {\n switch (e.which) {\n case 13:\n _this.findEmailAddress(e.currentTarget.value, true);\n break;\n default:\n }\n };\n _this.handleOnChange = function (e) {\n return _this.onChangeInputValue(e.currentTarget.value);\n };\n _this.handleOnBlur = function (e) {\n _this.setState({ focused: false });\n _this.findEmailAddress(e.currentTarget.value, true);\n };\n _this.handleOnFocus = function () {\n return _this.setState({\n focused: true,\n });\n };\n _this.emailInputRef = React.createRef();\n return _this;\n }\n ReactMultiEmail.getDerivedStateFromProps = function (nextProps, prevState) {\n if (prevState.propsEmails !== nextProps.emails) {\n return {\n propsEmails: nextProps.emails || [],\n emails: nextProps.emails || [],\n inputValue: '',\n focused: false,\n };\n }\n return null;\n };\n ReactMultiEmail.prototype.render = function () {\n var _this = this;\n var _a = this.state, focused = _a.focused, emails = _a.emails, inputValue = _a.inputValue;\n var _b = this.props, style = _b.style, getLabel = _b.getLabel, _c = _b.className, className = _c === void 0 ? '' : _c, placeholder = _b.placeholder;\n // removeEmail\n return (React.createElement(\"div\", { className: className + \" react-multi-email \" + (focused ? 'focused' : '') + \" \" + (inputValue === '' && emails.length === 0 ? 'empty' : ''), style: style, onClick: function () {\n if (_this.emailInputRef.current) {\n _this.emailInputRef.current.focus();\n }\n } },\n placeholder ? React.createElement(\"span\", { \"data-placeholder\": true }, placeholder) : null,\n emails.map(function (email, index) {\n return getLabel(email, index, _this.removeEmail);\n }),\n React.createElement(\"input\", { ref: this.emailInputRef, type: \"text\", value: inputValue, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, onChange: this.handleOnChange, onKeyDown: this.handleOnKeydown, onKeyUp: this.handleOnKeyup })));\n };\n return ReactMultiEmail;\n}(React.Component));\nexports.default = ReactMultiEmail;\n","exports = module.exports = require(\"../css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".react-multi-email {\\n margin: 0;\\n max-width: 100%;\\n -webkit-box-flex: 1;\\n -ms-flex: 1 0 auto;\\n flex: 1 0 auto;\\n outline: 0;\\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\\n text-align: left;\\n line-height: 1.21428571em;\\n padding: 0.4em 0.5em;\\n background: #fff;\\n border: 1px solid rgba(34, 36, 38, 0.15);\\n color: rgba(0, 0, 0, 0.87);\\n border-radius: 0.28571429rem;\\n -webkit-transition: box-shadow 0.1s ease, border-color 0.1s ease;\\n transition: box-shadow 0.1s ease, border-color 0.1s ease;\\n font-size: 13px;\\n position: relative;\\n}\\n.react-multi-email > span[data-placeholder] {\\n display: none;\\n position: absolute;\\n left: 0.5em;\\n top: 0.4em;\\n padding: 0.4em;\\n line-height: 1.21428571em;\\n}\\n.react-multi-email.focused {\\n border-color: #85b7d9;\\n background: #fff;\\n}\\n\\n.react-multi-email.empty > span[data-placeholder] {\\n display: inline;\\n color: #ccc;\\n}\\n.react-multi-email.focused > span[data-placeholder] {\\n display: none;\\n}\\n\\n.react-multi-email > input {\\n width: auto !important;\\n outline: none !important;\\n border: 0 none !important;\\n display: inline-block !important;\\n line-height: 1;\\n vertical-align: baseline !important;\\n padding: 0.4em 0.1em !important;\\n}\\n\\n.react-multi-email [data-tag] {\\n display: inline-block;\\n line-height: 1;\\n vertical-align: baseline;\\n margin: 0 0.14285714em;\\n background-color: #f3f3f3;\\n background-image: none;\\n padding: 0.5833em 0.833em;\\n color: rgba(0, 0, 0, 0.6);\\n text-transform: none;\\n font-weight: 600;\\n border: 0 solid transparent;\\n border-radius: 0.28571429rem;\\n -webkit-transition: background 0.1s ease;\\n -o-transition: background 0.1s ease;\\n transition: background 0.1s ease;\\n font-size: 0.8rem;\\n}\\n.react-multi-email [data-tag]:first-child {\\n margin-left: 0;\\n}\\n.react-multi-email [data-tag] [data-tag-handle] {\\n margin-left: 0.833em;\\n cursor: pointer;\\n}\\n\", \"\"]);\n\n// exports\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== 'number' && hint !== 'default') {\n throw TypeError('Incorrect hint');\n } return toPrimitive(anObject(this), hint !== 'number');\n};\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports['default'] = freeze;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _deepFreezeStrict = require('deep-freeze-strict');\n\nvar _deepFreezeStrict2 = _interopRequireDefault(_deepFreezeStrict);\n\n/**\n * Middleware that prevents state from being mutated anywhere in the app.\n */\n\nfunction freeze(store) {\n freezeStoreState(store);\n return function (next) {\n return function (action) {\n freezeStoreState(store);\n try {\n return next(action);\n } finally {\n freezeStoreState(store);\n }\n };\n };\n}\n\nfunction freezeStoreState(store) {\n var state = store.getState();\n if (isFreezable(state)) {\n (0, _deepFreezeStrict2['default'])(state);\n }\n}\n\nfunction isFreezable(value) {\n return value !== null && typeof value === 'object';\n}\nmodule.exports = exports['default'];","module.exports = function deepFreeze (o) {\n Object.freeze(o);\n\n var oIsFunction = typeof o === \"function\";\n var hasOwnProp = Object.prototype.hasOwnProperty;\n\n Object.getOwnPropertyNames(o).forEach(function (prop) {\n if (hasOwnProp.call(o, prop)\n && (oIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true )\n && o[prop] !== null\n && (typeof o[prop] === \"object\" || typeof o[prop] === \"function\")\n && !Object.isFrozen(o[prop])) {\n deepFreeze(o[prop]);\n }\n });\n \n return o;\n};\n","module.exports = (__webpack_require__(49))(52);","module.exports = (__webpack_require__(49))(316);","module.exports = (__webpack_require__(49))(317);","module.exports = (__webpack_require__(49))(315);","module.exports = (__webpack_require__(49))(129);","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _invariant = require('invariant');\n\nvar _invariant2 = _interopRequireDefault(_invariant);\n\nvar _DOMUtils = require('./DOMUtils');\n\nvar _ExecutionEnvironment = require('./ExecutionEnvironment');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar startListener = function startListener(getPromptMessage) {\n var handleBeforeUnload = function handleBeforeUnload(event) {\n var message = getPromptMessage();\n\n if (typeof message === 'string') {\n (event || window.event).returnValue = message;\n return message;\n }\n\n return undefined;\n };\n\n (0, _DOMUtils.addEventListener)(window, 'beforeunload', handleBeforeUnload);\n\n return function () {\n return (0, _DOMUtils.removeEventListener)(window, 'beforeunload', handleBeforeUnload);\n };\n};\n\n/**\n * Returns a new createHistory function that can be used to create\n * history objects that know how to use the beforeunload event in web\n * browsers to cancel navigation.\n */\nvar useBeforeUnload = function useBeforeUnload(createHistory) {\n !_ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? (0, _invariant2.default)(false, 'useBeforeUnload only works in DOM environments') : (0, _invariant2.default)(false) : void 0;\n\n return function (options) {\n var history = createHistory(options);\n\n var listeners = [];\n var stopListener = void 0;\n\n var getPromptMessage = function getPromptMessage() {\n var message = void 0;\n for (var i = 0, len = listeners.length; message == null && i < len; ++i) {\n message = listeners[i].call();\n }return message;\n };\n\n var listenBeforeUnload = function listenBeforeUnload(listener) {\n if (listeners.push(listener) === 1) stopListener = startListener(getPromptMessage);\n\n return function () {\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n\n if (listeners.length === 0 && stopListener) {\n stopListener();\n stopListener = null;\n }\n };\n };\n\n return _extends({}, history, {\n listenBeforeUnload: listenBeforeUnload\n });\n };\n};\n\nexports.default = useBeforeUnload;","module.exports = (__webpack_require__(49))(2);","module.exports = (__webpack_require__(49))(105);","module.exports = (__webpack_require__(49))(162);","module.exports = (__webpack_require__(49))(128);","module.exports = (__webpack_require__(49))(79);","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nvar self;\nvar RtlDetectLib = self = { // eslint-disable-line consistent-this\n\n // Private functions - star\n _escapeRegExpPattern: function (str) {\n if (typeof str !== 'string') {\n return str;\n }\n return str.replace(/([\\.\\*\\+\\^\\$\\[\\]\\\\\\(\\)\\|\\{\\}\\,\\-\\:\\?])/g, '\\\\$1'); // eslint-disable-line no-useless-escape\n },\n _toLowerCase: function (str, reserveReturnValue) {\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n return str.toLowerCase();\n },\n _toUpperCase: function (str, reserveReturnValue) {\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n return str.toUpperCase();\n },\n _trim: function (str, delimiter, reserveReturnValue) {\n var patterns = [];\n var regexp;\n var addPatterns = function (pattern) {\n // Build trim RegExp pattern and push it to patterns array\n patterns.push('^' + pattern + '+|' + pattern + '+$');\n };\n\n // fix reserveReturnValue value\n if (typeof delimiter === 'boolean') {\n reserveReturnValue = delimiter;\n delimiter = null;\n }\n\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n\n // Trim based on delimiter array values\n if (Array.isArray(delimiter)) {\n // Loop through delimiter array\n delimiter.map(function (item) {\n // Escape delimiter to be valid RegExp Pattern\n var pattern = self._escapeRegExpPattern(item);\n // Push pattern to patterns array\n addPatterns(pattern);\n });\n }\n\n // Trim based on delimiter string value\n if (typeof delimiter === 'string') {\n // Escape delimiter to be valid RegExp Pattern\n var patternDelimiter = self._escapeRegExpPattern(delimiter);\n // push pattern to patterns array\n addPatterns(patternDelimiter);\n }\n\n // If delimiter is not defined, Trim white spaces\n if (!delimiter) {\n // Push white space pattern to patterns array\n addPatterns('\\\\s');\n }\n\n // Build RegExp pattern\n var pattern = '(' + patterns.join('|') + ')';\n // Build RegExp object\n regexp = new RegExp(pattern, 'g');\n\n // trim string for all patterns\n while (str.match(regexp)) {\n str = str.replace(regexp, '');\n }\n\n // Return trim string\n return str;\n },\n\n _parseLocale : function (strLocale) {\n // parse locale regex object\n var regex = /^([a-zA-Z]*)([_\\-a-zA-Z]*)$/;\n var matches = regex.exec(strLocale); // exec regex\n var parsedLocale;\n var lang;\n var countryCode;\n\n if (!strLocale || !matches) {\n return;\n }\n\n // fix countryCode string by trimming '-' and '_'\n matches[2] = self._trim(matches[2], ['-', '_']);\n\n lang = self._toLowerCase(matches[1]);\n countryCode = self._toUpperCase(matches[2]) || countryCode;\n\n // object with lang, countryCode properties\n parsedLocale = {\n lang: lang,\n countryCode: countryCode\n };\n\n // return parsed locale object\n return parsedLocale;\n },\n // Private functions - End\n\n // Public functions - star\n isRtlLang: function (strLocale) {\n var objLocale = self._parseLocale(strLocale);\n if (!objLocale) {\n return;\n }\n // return true if the intel string lang exists in the BID RTL LANGS array else return false\n return (self._BIDI_RTL_LANGS.indexOf(objLocale.lang) >= 0);\n },\n\n getLangDir: function (strLocale) {\n // return 'rtl' if the intel string lang exists in the BID RTL LANGS array else return 'ltr'\n return self.isRtlLang(strLocale) ? 'rtl' : 'ltr';\n }\n\n // Public functions - End\n};\n\n// Const BIDI_RTL_LANGS Array\n// BIDI_RTL_LANGS ref: http://en.wikipedia.org/wiki/Right-to-left\n// Table of scripts in Unicode: https://en.wikipedia.org/wiki/Script_(Unicode)\nObject.defineProperty(self, '_BIDI_RTL_LANGS', {\n value: [\n 'ae',\t/* Avestan */\n 'ar', /* 'العربية', Arabic */\n 'arc', /* Aramaic */\n 'bcc', /* 'بلوچی مکرانی', Southern Balochi */\n 'bqi', /* 'بختياري', Bakthiari */\n 'ckb', /* 'Soranî / کوردی', Sorani */\n 'dv', /* Dhivehi */\n 'fa', /* 'Ùارسی', Persian */\n 'glk', /* 'گیلکی', Gilaki */\n 'he', /* 'עברית', Hebrew */\n 'ku', /* 'Kurdî / كوردی', Kurdish */\n 'mzn', /* 'مازÙرونی', Mazanderani */\n 'nqo', /* N'Ko */\n 'pnb', /* 'پنجابی', Western Punjabi */\n 'ps', /* 'پښتو', Pashto, */\n 'sd', /* 'سنڌي', Sindhi */\n 'ug', /* 'Uyghurche / ئۇيغۇرچە', Uyghur */\n 'ur', /* 'اردو', Urdu */\n 'yi' /* 'ייִדיש', Yiddish */\n ],\n writable: false,\n enumerable: true,\n configurable: false\n});\n\n\nmodule.exports = RtlDetectLib;\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\n\n// https://github.com/tc39/collection-methods\nmodule.exports = function (/* ...elements */) {\n var set = anObject(this);\n var adder = aFunction(set.add);\n for (var k = 0, len = arguments.length; k < len; k++) {\n adder.call(set, arguments[k]);\n }\n return set;\n};\n","module.exports = (__webpack_require__(49))(643);","var $ = require('../internals/export');\nvar isInteger = require('../internals/is-integer');\n\n// `Number.isInteger` method\n// https://tc39.github.io/ecma262/#sec-number.isinteger\n$({ target: 'Number', stat: true }, {\n isInteger: isInteger\n});\n","var isObject = require('../internals/is-object');\n\nvar floor = Math.floor;\n\n// `Number.isInteger` method implementation\n// https://tc39.github.io/ecma262/#sec-number.isinteger\nmodule.exports = function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n","/*\r\n Highcharts JS v5.0.14 (2017-07-28)\r\n Exporting module\r\n\r\n (c) 2010-2017 Torstein Honsi\r\n\r\n License: www.highcharts.com/license\r\n*/\r\n(function(k){\"object\"===typeof module&&module.exports?module.exports=k:k(Highcharts)})(function(k){(function(f){var k=f.defaultOptions,p=f.doc,B=f.Chart,x=f.addEvent,I=f.removeEvent,F=f.fireEvent,r=f.createElement,C=f.discardElement,v=f.css,n=f.merge,D=f.pick,h=f.each,G=f.objectEach,t=f.extend,J=f.isTouchDevice,E=f.win,H=E.navigator.userAgent,K=f.Renderer.prototype.symbols;/Edge\\/|Trident\\/|MSIE /.test(H);/firefox/i.test(H);t(k.lang,{printChart:\"Print chart\",downloadPNG:\"Download PNG image\",downloadJPEG:\"Download JPEG image\",\r\ndownloadPDF:\"Download PDF document\",downloadSVG:\"Download SVG vector image\",contextButtonTitle:\"Chart context menu\"});k.navigation={buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:\"right\",buttonSpacing:3,height:22,verticalAlign:\"top\",width:24}};n(!0,k.navigation,{menuStyle:{border:\"1px solid #999999\",background:\"#ffffff\",padding:\"5px 0\"},menuItemStyle:{padding:\"0.5em 1em\",background:\"none\",color:\"#333333\",fontSize:J?\"14px\":\"11px\",transition:\"background 250ms, color 250ms\"},menuItemHoverStyle:{background:\"#335cad\",\r\ncolor:\"#ffffff\"},buttonOptions:{symbolFill:\"#666666\",symbolStroke:\"#666666\",symbolStrokeWidth:3,theme:{fill:\"#ffffff\",stroke:\"none\",padding:5}}});k.exporting={type:\"image/png\",url:\"https://export.highcharts.com/\",printMaxWidth:780,scale:2,buttons:{contextButton:{className:\"highcharts-contextbutton\",menuClassName:\"highcharts-contextmenu\",symbol:\"menu\",_titleKey:\"contextButtonTitle\",menuItems:\"printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG\".split(\" \")}},menuItemDefinitions:{printChart:{textKey:\"printChart\",\r\nonclick:function(){this.print()}},separator:{separator:!0},downloadPNG:{textKey:\"downloadPNG\",onclick:function(){this.exportChart()}},downloadJPEG:{textKey:\"downloadJPEG\",onclick:function(){this.exportChart({type:\"image/jpeg\"})}},downloadPDF:{textKey:\"downloadPDF\",onclick:function(){this.exportChart({type:\"application/pdf\"})}},downloadSVG:{textKey:\"downloadSVG\",onclick:function(){this.exportChart({type:\"image/svg+xml\"})}}}};f.post=function(a,b,e){var c=r(\"form\",n({method:\"post\",action:a,enctype:\"multipart/form-data\"},\r\ne),{display:\"none\"},p.body);G(b,function(a,b){r(\"input\",{type:\"hidden\",name:b,value:a},null,c)});c.submit();C(c)};t(B.prototype,{sanitizeSVG:function(a,b){if(b&&b.exporting&&b.exporting.allowHTML){var e=a.match(/<\\/svg>(.*?$)/);e&&e[1]&&(e='\\x3cforeignObject x\\x3d\"0\" y\\x3d\"0\" width\\x3d\"'+b.chart.width+'\" height\\x3d\"'+b.chart.height+'\"\\x3e\\x3cbody xmlns\\x3d\"http://www.w3.org/1999/xhtml\"\\x3e'+e[1]+\"\\x3c/body\\x3e\\x3c/foreignObject\\x3e\",a=a.replace(\"\\x3c/svg\\x3e\",e+\"\\x3c/svg\\x3e\"))}a=a.replace(/zIndex=\"[^\"]+\"/g,\r\n\"\").replace(/isShadow=\"[^\"]+\"/g,\"\").replace(/symbolName=\"[^\"]+\"/g,\"\").replace(/jQuery[0-9]+=\"[^\"]+\"/g,\"\").replace(/url\\((\"|")(\\S+)(\"|")\\)/g,\"url($2)\").replace(/url\\([^#]+#/g,\"url(#\").replace(/<svg /,'\\x3csvg xmlns:xlink\\x3d\"http://www.w3.org/1999/xlink\" ').replace(/ (NS[0-9]+\\:)?href=/g,\" xlink:href\\x3d\").replace(/\\n/,\" \").replace(/<\\/svg>.*?$/,\"\\x3c/svg\\x3e\").replace(/(fill|stroke)=\"rgba\\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\\.]+)\\)\"/g,'$1\\x3d\"rgb($2)\" $1-opacity\\x3d\"$3\"').replace(/ /g,\r\n\"\\u00a0\").replace(/­/g,\"\\u00ad\");return a=a.replace(/<IMG /g,\"\\x3cimage \").replace(/<(\\/?)TITLE>/g,\"\\x3c$1title\\x3e\").replace(/height=([^\" ]+)/g,'height\\x3d\"$1\"').replace(/width=([^\" ]+)/g,'width\\x3d\"$1\"').replace(/hc-svg-href=\"([^\"]+)\">/g,'xlink:href\\x3d\"$1\"/\\x3e').replace(/ id=([^\" >]+)/g,' id\\x3d\"$1\"').replace(/class=([^\" >]+)/g,'class\\x3d\"$1\"').replace(/ transform /g,\" \").replace(/:(path|rect)/g,\"$1\").replace(/style=\"([^\"]+)\"/g,function(a){return a.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},\r\ngetSVG:function(a){var b,e,c,w,m,g=n(this.options,a);p.createElementNS||(p.createElementNS=function(a,b){return p.createElement(b)});e=r(\"div\",null,{position:\"absolute\",top:\"-9999em\",width:this.chartWidth+\"px\",height:this.chartHeight+\"px\"},p.body);c=this.renderTo.style.width;m=this.renderTo.style.height;c=g.exporting.sourceWidth||g.chart.width||/px$/.test(c)&&parseInt(c,10)||600;m=g.exporting.sourceHeight||g.chart.height||/px$/.test(m)&&parseInt(m,10)||400;t(g.chart,{animation:!1,renderTo:e,forExport:!0,\r\nrenderer:\"SVGRenderer\",width:c,height:m});g.exporting.enabled=!1;delete g.data;g.series=[];h(this.series,function(a){w=n(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});w.isInternal||g.series.push(w)});h(this.axes,function(a){a.userOptions.internalKey||(a.userOptions.internalKey=f.uniqueKey())});b=new f.Chart(g,this.callback);a&&h([\"xAxis\",\"yAxis\",\"series\"],function(c){var d={};a[c]&&(d[c]=a[c],b.update(d))});h(this.axes,function(a){var c=f.find(b.axes,function(b){return b.options.internalKey===\r\na.userOptions.internalKey}),d=a.getExtremes(),e=d.userMin,d=d.userMax;!c||void 0===e&&void 0===d||c.setExtremes(e,d,!0,!1)});c=b.getChartHTML();c=this.sanitizeSVG(c,g);g=null;b.destroy();C(e);return c},getSVGForExport:function(a,b){var e=this.options.exporting;return this.getSVG(n({chart:{borderRadius:0}},e.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||e.sourceWidth,sourceHeight:a&&a.sourceHeight||e.sourceHeight}}))},exportChart:function(a,b){b=this.getSVGForExport(a,b);a=n(this.options.exporting,\r\na);f.post(a.url,{filename:a.filename||\"chart\",type:a.type,width:a.width||0,scale:a.scale,svg:b},a.formAttributes)},print:function(){var a=this,b=a.container,e=[],c=b.parentNode,f=p.body,m=f.childNodes,g=a.options.exporting.printMaxWidth,d,u;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null,0);F(a,\"beforePrint\");if(u=g&&a.chartWidth>g)d=[a.options.chart.width,void 0,!1],a.setSize(g,void 0,!1);h(m,function(a,b){1===a.nodeType&&(e[b]=a.style.display,a.style.display=\"none\")});f.appendChild(b);E.focus();\r\nE.print();setTimeout(function(){c.appendChild(b);h(m,function(a,b){1===a.nodeType&&(a.style.display=e[b])});a.isPrinting=!1;u&&a.setSize.apply(a,d);F(a,\"afterPrint\")},1E3)}},contextMenu:function(a,b,e,c,w,m,g){var d=this,u=d.options.navigation,k=d.chartWidth,q=d.chartHeight,n=\"cache-\"+a,l=d[n],y=Math.max(w,m),z,A;l||(d[n]=l=r(\"div\",{className:a},{position:\"absolute\",zIndex:1E3,padding:y+\"px\"},d.container),z=r(\"div\",{className:\"highcharts-menu\"},null,l),v(z,t({MozBoxShadow:\"3px 3px 10px #888\",WebkitBoxShadow:\"3px 3px 10px #888\",\r\nboxShadow:\"3px 3px 10px #888\"},u.menuStyle)),A=function(){v(l,{display:\"none\"});g&&g.setState(0);d.openMenu=!1},d.exportEvents.push(x(l,\"mouseleave\",function(){l.hideTimer=setTimeout(A,500)}),x(l,\"mouseenter\",function(){clearTimeout(l.hideTimer)}),x(p,\"mouseup\",function(b){d.pointer.inClass(b.target,a)||A()})),h(b,function(a){\"string\"===typeof a&&(a=d.options.exporting.menuItemDefinitions[a]);if(f.isObject(a,!0)){var b;a.separator?b=r(\"hr\",null,null,z):(b=r(\"div\",{className:\"highcharts-menu-item\",\r\nonclick:function(b){b&&b.stopPropagation();A();a.onclick&&a.onclick.apply(d,arguments)},innerHTML:a.text||d.options.lang[a.textKey]},null,z),b.onmouseover=function(){v(this,u.menuItemHoverStyle)},b.onmouseout=function(){v(this,u.menuItemStyle)},v(b,t({cursor:\"pointer\"},u.menuItemStyle)));d.exportDivElements.push(b)}}),d.exportDivElements.push(z,l),d.exportMenuWidth=l.offsetWidth,d.exportMenuHeight=l.offsetHeight);b={display:\"block\"};e+d.exportMenuWidth>k?b.right=k-e-w-y+\"px\":b.left=e-y+\"px\";c+m+d.exportMenuHeight>\r\nq&&\"top\"!==g.alignOptions.verticalAlign?b.bottom=q-c-y+\"px\":b.top=c+m-y+\"px\";v(l,b);d.openMenu=!0},addButton:function(a){var b=this,e=b.renderer,c=n(b.options.navigation.buttonOptions,a),f=c.onclick,m=c.menuItems,g,d,k=c.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]);if(!1!==c.enabled){var h=c.theme,q=h.states,p=q&&q.hover,q=q&&q.select,l;delete h.states;f?l=function(a){a.stopPropagation();f.call(b,a)}:m&&(l=function(){b.contextMenu(d.menuClassName,\r\nm,d.translateX,d.translateY,d.width,d.height,d);d.setState(2)});c.text&&c.symbol?h.paddingLeft=D(h.paddingLeft,25):c.text||t(h,{width:c.width,height:c.height,padding:0});d=e.button(c.text,0,0,l,h,p,q).addClass(a.className).attr({\"stroke-linecap\":\"round\",title:b.options.lang[c._titleKey],zIndex:3});d.menuClassName=a.menuClassName||\"highcharts-menu-\"+b.btnCount++;c.symbol&&(g=e.symbol(c.symbol,c.symbolX-k/2,c.symbolY-k/2,k,k).addClass(\"highcharts-button-symbol\").attr({zIndex:1}).add(d),g.attr({stroke:c.symbolStroke,\r\nfill:c.symbolFill,\"stroke-width\":c.symbolStrokeWidth||1}));d.add().align(t(c,{width:d.width,x:D(c.x,b.buttonOffset)}),!0,\"spacingBox\");b.buttonOffset+=(d.width+c.buttonSpacing)*(\"right\"===c.align?-1:1);b.exportSVGElements.push(d,g)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;var e=b.exportDivElements,c=b.exportEvents,f;a&&(h(a,function(a,c){a&&(a.onclick=a.ontouchstart=null,f=\"cache-\"+a.menuClassName,b[f]&&delete b[f],b.exportSVGElements[c]=a.destroy())}),a.length=0);e&&\r\n(h(e,function(a,c){clearTimeout(a.hideTimer);I(a,\"mouseleave\");b.exportDivElements[c]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;C(a)}),e.length=0);c&&(h(c,function(a){a()}),c.length=0)}});K.menu=function(a,b,e,c){return[\"M\",a,b+2.5,\"L\",a+e,b+2.5,\"M\",a,b+c/2+.5,\"L\",a+e,b+c/2+.5,\"M\",a,b+c-1.5,\"L\",a+e,b+c-1.5]};B.prototype.renderExporting=function(){var a=this,b=a.options.exporting,e=b.buttons,c=a.isDirtyExporting||!a.exportSVGElements;a.buttonOffset=0;a.isDirtyExporting&&a.destroyExport();\r\nc&&!1!==b.enabled&&(a.exportEvents=[],G(e,function(b){a.addButton(b)}),a.isDirtyExporting=!1);x(a,\"destroy\",a.destroyExport)};B.prototype.callbacks.push(function(a){a.renderExporting();x(a,\"redraw\",a.renderExporting);h([\"exporting\",\"navigation\"],function(b){a[b]={update:function(e,c){a.isDirtyExporting=!0;n(!0,a.options[b],e);D(c,!0)&&a.redraw()}}})})})(k)});\r\n","module.exports = (__webpack_require__(49))(704);","module.exports = (__webpack_require__(49))(705);","/*\r\n Highcharts JS v5.0.14 (2017-07-28)\r\n Client side exporting module\r\n\r\n (c) 2015 Torstein Honsi / Oystein Moseng\r\n\r\n License: www.highcharts.com/license\r\n*/\r\n(function(n){\"object\"===typeof module&&module.exports?module.exports=n:n(Highcharts)})(function(n){(function(c){function n(a,c){var d=t.getElementsByTagName(\"head\")[0],b=t.createElement(\"script\");b.type=\"text/javascript\";b.src=a;b.onload=c;b.onerror=function(){console.error(\"Error loading script\",a)};d.appendChild(b)}var C=c.merge,e=c.win,r=e.navigator,t=e.document,z=c.each,w=e.URL||e.webkitURL||e,B=/Edge\\/|Trident\\/|MSIE /.test(r.userAgent),D=/Edge\\/\\d+/.test(r.userAgent),E=B?150:0;c.CanVGRenderer=\r\n{};c.dataURLtoBlob=function(a){if(e.atob&&e.ArrayBuffer&&e.Uint8Array&&e.Blob&&w.createObjectURL){a=a.match(/data:([^;]*)(;base64)?,([0-9A-Za-z+/]+)/);for(var c=e.atob(a[3]),d=new e.ArrayBuffer(c.length),d=new e.Uint8Array(d),b=0;b<d.length;++b)d[b]=c.charCodeAt(b);a=new e.Blob([d],{type:a[1]});return w.createObjectURL(a)}};c.downloadURL=function(a,f){var d=t.createElement(\"a\"),b;if(\"string\"===typeof a||a instanceof String||!r.msSaveOrOpenBlob){if(D||2E6<a.length)if(a=c.dataURLtoBlob(a),!a)throw\"Data URL length limit reached\";\r\nif(void 0!==d.download)d.href=a,d.download=f,t.body.appendChild(d),d.click(),t.body.removeChild(d);else try{if(b=e.open(a,\"chart\"),void 0===b||null===b)throw\"Failed to open window\";}catch(u){e.location.href=a}}else r.msSaveOrOpenBlob(a,f)};c.svgToDataUrl=function(a){var c=-1<r.userAgent.indexOf(\"WebKit\")&&0>r.userAgent.indexOf(\"Chrome\");try{if(!c&&0>r.userAgent.toLowerCase().indexOf(\"firefox\"))return w.createObjectURL(new e.Blob([a],{type:\"image/svg+xml;charset-utf-16\"}))}catch(d){}return\"data:image/svg+xml;charset\\x3dUTF-8,\"+\r\nencodeURIComponent(a)};c.imageToDataUrl=function(a,c,d,b,u,l,k,m,p){var g=new e.Image,h,f=function(){setTimeout(function(){var e=t.createElement(\"canvas\"),f=e.getContext&&e.getContext(\"2d\"),x;try{if(f){e.height=g.height*b;e.width=g.width*b;f.drawImage(g,0,0,e.width,e.height);try{x=e.toDataURL(c),u(x,c,d,b)}catch(F){h(a,c,d,b)}}else k(a,c,d,b)}finally{p&&p(a,c,d,b)}},E)},q=function(){m(a,c,d,b);p&&p(a,c,d,b)};h=function(){g=new e.Image;h=l;g.crossOrigin=\"Anonymous\";g.onload=f;g.onerror=q;g.src=a};\r\ng.onload=f;g.onerror=q;g.src=a};c.downloadSVGLocal=function(a,f,d,b){function u(b,a){a=new e.jsPDF(\"l\",\"pt\",[b.width.baseVal.value+2*a,b.height.baseVal.value+2*a]);e.svg2pdf(b,a,{removeInvalid:!0});return a.output(\"datauristring\")}function l(){y.innerHTML=a;var e=y.getElementsByTagName(\"text\"),g,f=y.getElementsByTagName(\"svg\")[0].style;z(e,function(b){z([\"font-family\",\"font-size\"],function(a){!b.style[a]&&f[a]&&(b.style[a]=f[a])});b.style[\"font-family\"]=b.style[\"font-family\"]&&b.style[\"font-family\"].split(\" \").splice(-1);\r\ng=b.getElementsByTagName(\"title\");z(g,function(a){b.removeChild(a)})});e=u(y.firstChild,0);try{c.downloadURL(e,v),b&&b()}catch(G){d()}}var k,m,p=!0,g,h=f.libURL||c.getOptions().exporting.libURL,y=t.createElement(\"div\"),q=f.type||\"image/png\",v=(f.filename||\"chart\")+\".\"+(\"image/svg+xml\"===q?\"svg\":q.split(\"/\")[1]),A=f.scale||1,h=\"/\"!==h.slice(-1)?h+\"/\":h;if(\"image/svg+xml\"===q)try{r.msSaveOrOpenBlob?(m=new MSBlobBuilder,m.append(a),k=m.getBlob(\"image/svg+xml\")):k=c.svgToDataUrl(a),c.downloadURL(k,v),\r\nb&&b()}catch(x){d()}else\"application/pdf\"===q?e.jsPDF&&e.svg2pdf?l():(p=!0,n(h+\"jspdf.js\",function(){n(h+\"svg2pdf.js\",function(){l()})})):(k=c.svgToDataUrl(a),g=function(){try{w.revokeObjectURL(k)}catch(x){}},c.imageToDataUrl(k,q,{},A,function(a){try{c.downloadURL(a,v),b&&b()}catch(F){d()}},function(){var f=t.createElement(\"canvas\"),u=f.getContext(\"2d\"),l=a.match(/^<svg[^>]*width\\s*=\\s*\\\"?(\\d+)\\\"?[^>]*>/)[1]*A,k=a.match(/^<svg[^>]*height\\s*=\\s*\\\"?(\\d+)\\\"?[^>]*>/)[1]*A,m=function(){u.drawSvg(a,0,0,\r\nl,k);try{c.downloadURL(r.msSaveOrOpenBlob?f.msToBlob():f.toDataURL(q),v),b&&b()}catch(H){d()}finally{g()}};f.width=l;f.height=k;e.canvg?m():(p=!0,n(h+\"rgbcolor.js\",function(){n(h+\"canvg.js\",function(){m()})}))},d,d,function(){p&&g()}))};c.Chart.prototype.getSVGForLocalExport=function(a,e,d,b){var f=this,l,k=0,m,p,g,h,n,q=function(a,c,d){++k;d.imageElement.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\",a);k===l.length&&b(f.sanitizeSVG(m.innerHTML,p))};c.wrap(c.Chart.prototype,\"getChartHTML\",\r\nfunction(a){var b=a.apply(this,Array.prototype.slice.call(arguments,1));p=this.options;m=this.container.cloneNode(!0);return b});f.getSVGForExport(a,e);l=m.getElementsByTagName(\"image\");try{if(l.length)for(h=0,n=l.length;h<n;++h)g=l[h],c.imageToDataUrl(g.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\"),\"image/png\",{imageElement:g},a.scale,q,d,d,d);else b(f.sanitizeSVG(m.innerHTML,p))}catch(v){d()}};c.Chart.prototype.exportChartLocal=function(a,e){var d=this,b=c.merge(d.options.exporting,a),f=\r\nfunction(){if(!1===b.fallbackToExportServer)if(b.error)b.error(b);else throw\"Fallback to export server disabled\";else d.exportChart(b)};B&&(\"application/pdf\"===b.type||d.container.getElementsByTagName(\"image\").length&&\"image/svg+xml\"!==b.type)||\"application/pdf\"===b.type&&d.container.getElementsByTagName(\"image\").length?f():d.getSVGForLocalExport(b,e,f,function(a){-1<a.indexOf(\"\\x3cforeignObject\")&&\"image/svg+xml\"!==b.type?f():c.downloadSVGLocal(a,b,f)})};C(!0,c.getOptions().exporting,{libURL:\"https://code.highcharts.com/5.0.14/lib/\",\r\nmenuItemDefinitions:{downloadPNG:{textKey:\"downloadPNG\",onclick:function(){this.exportChartLocal()}},downloadJPEG:{textKey:\"downloadJPEG\",onclick:function(){this.exportChartLocal({type:\"image/jpeg\"})}},downloadSVG:{textKey:\"downloadSVG\",onclick:function(){this.exportChartLocal({type:\"image/svg+xml\"})}},downloadPDF:{textKey:\"downloadPDF\",onclick:function(){this.exportChartLocal({type:\"application/pdf\"})}}}})})(n)});\r\n","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.small` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.small\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {\n small: function small() {\n return createHTML(this, 'small', '', '');\n }\n});\n","module.exports = (__webpack_require__(49))(524);","module.exports = (__webpack_require__(49))(534);","module.exports = (__webpack_require__(49))(242);","'use strict';\nvar $ = require('../internals/export');\nvar createHTML = require('../internals/create-html');\nvar forcedStringHTMLMethod = require('../internals/string-html-forced');\n\n// `String.prototype.anchor` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.anchor\n$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {\n anchor: function anchor(name) {\n return createHTML(this, 'a', 'name', name);\n }\n});\n","import {browserCompatibility, loadLocale, inferContentLanguage, inferPrimaryIntlLocale} from 'app/infrastructure/platform';\r\nimport {ENVIRONMENT_VAR, globalVar} from 'app/infrastructure/universal';\r\nimport { parse } from 'querystring';\r\nimport { setEnvironmentVariable } from 'app/infrastructure/universal/runtime';\r\n\r\n/**\r\n * Inject selected whitelisted flags from url\r\n * \r\n * url has querystring containing `?debug` or `&debug`:\r\n * - enables configuration info panels for components\r\n * - enables debug logging\r\n */\r\nfunction injectTransientSettings(){\r\n \r\n const location = globalVar('location');\r\n \r\n if (!location){\r\n return;\r\n }\r\n\r\n const query = location.search ? location.search.slice(1) : null;\r\n const params = parse(query);\r\n\r\n if (params.debug !== undefined){\r\n setEnvironmentVariable(ENVIRONMENT_VAR.ComponentDebug, true);\r\n setEnvironmentVariable(ENVIRONMENT_VAR.ClientDebugLog, true);\r\n }\r\n\r\n}\r\n\r\n/**\r\n * AppShell is responsible for work to be performed before first render\r\n */\r\nexport class AppShell {\r\n\r\n /**\r\n * Two letter ISO 639 code. The first in the list of users current (UI) languages. \r\n * Resolved from \r\n * \r\n * - 1: language from the Accept-Language header\r\n * - 2: language from the browser locale setting\r\n */\r\n public static language: string;\r\n /**\r\n * IETF language tag. \r\n * Resolved from:\r\n * - 1: browser setting navigator.languages \r\n * - 2: fallbacks resolving from accept-language HTTP header\r\n */\r\n public static locale: string;\r\n\r\n /**\r\n * Ensure browser compatibility and loading of Intl formats\r\n */\r\n public async initialize() {\r\n\r\n await browserCompatibility();\r\n\r\n AppShell.language = inferContentLanguage();\r\n \r\n await loadLocale();\r\n \r\n AppShell.locale = inferPrimaryIntlLocale();\r\n\r\n injectTransientSettings();\r\n }\r\n}\r\n","import { error } from 'app/infrastructure/log';\r\n\r\n/**\r\n * Safely wraps an async/await or promise returning function that might fail\r\n */\r\nexport async function safely(fn: any, ...args: any[]): Promise<any>{\r\n \r\n return Promise.resolve()\r\n .then(!args || !args.length ? fn : () => fn(...args))\r\n .then(result => result)\r\n .catch(error);\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ShellState, AuthState, AdminInfoData } from 'app/types-shared';\r\nimport {\r\n ACTION,\r\n AuthenticationFailed,\r\n DisplayModal,\r\n FailUserInfo,\r\n ReceiveLogout,\r\n ReceiveToken,\r\n ReceiveUserInfo,\r\n RequestUserInfo,\r\n UserLocaleChange,\r\n RefreshCache,\r\n ReceiveRefreshCache,\r\n FailRefreshCache,\r\n RegenerateAggregatedEnv,\r\n RegenerateAggregatedRisk,\r\n ReceiveMessagesToUserInfo,\r\n UpdateMessageStatus,\r\n FixedHeaderStatus,\r\n RequestLoadConsents,\r\n FailLoadConsents,\r\n ReceiveShellConfig\r\n} from './action-types';\r\nimport { codeItemToStoreValue } from '../infrastructure/data/codes';\r\nimport { ACTION_ERROR } from 'app/infrastructure/redux';\r\nimport { reducersConfiguration } from 'dependencies/reducers';\r\nimport { ReceiveLoadConsents } from 'app/area/user-profile/my-notifications/action-types';\r\n\r\nconst reducers: { [indexer: string]: Reducer<ShellState> } = {\r\n\r\n [ACTION.RequestUserInfo]: (state: ShellState, action: RequestUserInfo): ShellState => {\r\n return {\r\n ...state,\r\n fetching: true,\r\n fetchingAccessInfo: true\r\n };\r\n },\r\n\r\n [ACTION.ReceiveUserInfo]: (state: ShellState, action: ReceiveUserInfo): ShellState => {\r\n const { userInfo: { language, location, unit, userGroup, ...restUserInfo }} = action as any;\r\n return {\r\n ...state,\r\n fetching: false,\r\n userInfo: {\r\n language: codeItemToStoreValue(language),\r\n location: codeItemToStoreValue(location),\r\n unit: codeItemToStoreValue(unit),\r\n userGroup: codeItemToStoreValue(userGroup),\r\n ...restUserInfo\r\n }\r\n };\r\n },\r\n\r\n [ACTION.ReceiveShellConfig]: (state: ShellState, action: ReceiveShellConfig): ShellState => {\r\n const { \r\n adminPanelAccess, toolsInfo, supportEmailAddress, \r\n version, surveyManagerAccess, helpUrl, manageSurveysUrl, feedbackUrl\r\n } = action;\r\n\r\n return {\r\n ...state,\r\n fetchingAccessInfo: false,\r\n userInfo: {\r\n ...state.userInfo,\r\n access: { adminPanel: adminPanelAccess as AdminInfoData, tools: toolsInfo, surveyManager: surveyManagerAccess }\r\n },\r\n version: version,\r\n supportEmailAddress: supportEmailAddress.emailAddress,\r\n helpUrl,\r\n manageSurveysUrl,\r\n feedbackUrl\r\n };\r\n },\r\n\r\n [ACTION.FailUserInfo]: (state: ShellState, action: FailUserInfo): ShellState => {\r\n return {\r\n ...state,\r\n authState: AuthState.AuthenticationFailed\r\n };\r\n },\r\n\r\n [ACTION.ReceiveMessagesToUserInfo]: (state: ShellState, action: ReceiveMessagesToUserInfo): ShellState => {\r\n\r\n return {\r\n ...state,\r\n messagesToUser: action.messagesToUserInfo\r\n };\r\n },\r\n\r\n [ACTION.UpdateMessageStatus]: (state: ShellState, action: UpdateMessageStatus): ShellState => {\r\n return {\r\n ...state,\r\n updatingMessagesToUser: action.updating,\r\n messagesToUser: state.messagesToUser.map(item => item.id === action.id ? {...item, updating: action.updating} : item)\r\n };\r\n },\r\n\r\n [ACTION.ReceiveToken]: (state: ShellState, action: ReceiveToken): ShellState => {\r\n\r\n return {\r\n ...state,\r\n authState: AuthState.Authenticated\r\n };\r\n },\r\n\r\n [ACTION.ReceiveLogout]: (state: ShellState, action: ReceiveLogout): ShellState => {\r\n\r\n return { ...state,\r\n authState: AuthState.LoggedOut\r\n };\r\n },\r\n\r\n [ACTION.AuthenticationFailed]: (state: ShellState, action: AuthenticationFailed): ShellState => {\r\n\r\n return {\r\n ...state,\r\n authState: AuthState.AuthenticationFailed\r\n };\r\n },\r\n\r\n [ACTION.DisplayModal]: (state: ShellState, action: DisplayModal): ShellState => {\r\n return {\r\n ...state,\r\n selectedModal: action.name\r\n };\r\n },\r\n\r\n [ACTION.ChangeUserLocale]: (state: ShellState, action: UserLocaleChange): ShellState => {\r\n return {\r\n ...state,\r\n locale: action.locale\r\n };\r\n },\r\n\r\n [ACTION.RefreshCache]: (state: ShellState, action: RefreshCache): ShellState => {\r\n return {\r\n ...state,\r\n fetchingRefreshCache: true\r\n };\r\n },\r\n [ACTION.ReceiveRefreshCache]: (state: ShellState, action: ReceiveRefreshCache): ShellState => {\r\n return {\r\n ...state,\r\n fetchingRefreshCache: false\r\n };\r\n },\r\n [ACTION.FailRefreshCache]: (state: ShellState, action: FailRefreshCache): ShellState => {\r\n return {\r\n ...state,\r\n fetchingRefreshCache: false\r\n };\r\n },\r\n\r\n [ACTION.RegenerateAggregatedEnv]: (state: ShellState, action: RegenerateAggregatedEnv): ShellState => {\r\n return {\r\n ...state,\r\n fetchingRegenerateAggregated: action.fetching\r\n };\r\n },\r\n\r\n [ACTION.RegenerateAggregatedRisk]: (state: ShellState, action: RegenerateAggregatedRisk): ShellState => {\r\n return {\r\n ...state,\r\n fetchingRegenerateAggregated: action.fetching\r\n };\r\n },\r\n\r\n [ACTION.FixedHeaderStatus]: (state: ShellState, action: FixedHeaderStatus): ShellState => {\r\n return {\r\n ...state,\r\n fixedHeader: action.fixed\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_LOAD_CONSENTS]: (state: ShellState, action: RequestLoadConsents): ShellState => {\r\n return {\r\n ...state,\r\n fetchingLoadConsents: true,\r\n consents: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_CONSENTS]: (state: ShellState, action: ReceiveLoadConsents): ShellState => {\r\n return {\r\n ...state,\r\n consents: action.consents,\r\n fetchingLoadConsents: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LOAD_CONSENTS]: (state: ShellState, action: FailLoadConsents): ShellState => {\r\n return {\r\n ...state,\r\n fetchingLoadConsents: false\r\n };\r\n }\r\n};\r\nexport const reducer: Reducer<ShellState> = (state: ShellState = reducersConfiguration.INITIAL_APP_STATE.app, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n\r\n// Manage appState when actionCreators throws an error\r\nexport const errorsReducer: Reducer<ApplicationState> = (state: ApplicationState, action: any) => {\r\n\r\n if (action.type !== ACTION_ERROR) {\r\n return state;\r\n }\r\n\r\n return {\r\n\r\n ...state,\r\n\r\n ...{\r\n\r\n app: {\r\n ...state.app,\r\n\r\n errors: [\r\n ...state.app.errors,\r\n ...[\r\n { error: action.error, message: action.message }\r\n ]\r\n ]\r\n\r\n }\r\n\r\n }\r\n };\r\n};\r\n","import { SortOptions, FavouriteDefinition, StoreField } from 'app/types-shared';\r\nimport { LoadFavouriteDefinitionParams } from 'app/area/favourite/types';\r\n\r\nexport const ACTION = {\r\n CLEAR_RESULTS: 'SEARCH:CLEAR_RESULTS',\r\n REQUEST_REPORT_CATEGORY: 'SEARCH:REQUEST_REPORT_CATEGORY',\r\n RECEIVE_REPORT_CATEGORY: 'SEARCH:RECEIVE_REPORT_CATEGORY',\r\n REQUEST_SORT_OPTIONS: 'SEARCH:REQUEST_SORT_OPTIONS',\r\n RECEIVE_SORT_OPTIONS: 'SEARCH:RECEIVE_SORT_OPTIONS',\r\n RECEIVE_ADVANCED_SEARCH_OPTIONS: 'SEARCH:RECEIVE_ADVANCED_SEARCH_OPTIONS',\r\n REQUEST_FAVOURITE_DEFINITION: 'SEARCH:REQUEST_FAVOURITE_DEFINITION',\r\n RECEIVE_FAVOURITE_DEFINITION: 'SEARCH:RECEIVE_FAVOURITE_DEFINITION',\r\n UPDATE_WORKING_DEFINITION: 'SEARCH:UPDATE_WORKING_DEFINITION',\r\n LOAD_FAVOURITE_DEFINITION_FAILURE: 'SEARCH:LOAD_FAVOURITE_DEFINITION_FAILURE',\r\n REQUEST_DOWNLOAD_REPORT: 'SEARCH:REQUEST_DOWNLOAD_REPORT',\r\n RECEIVE_DOWNLOAD_REPORT: 'SEARCH:RECEIVE_DOWNLOAD_REPORT',\r\n FAIL_DOWNLOAD_REPORT: 'SEARCH:FAIL_DOWNLOAD_REPORT',\r\n REQUEST_URL_MULTIPLE_SUPPLIERS: 'SEARCH:REQUEST_URL_MULTIPLE_SUPPLIERS',\r\n RECEIVE_URL_MULTIPLE_SUPPLIERS: 'SEARCH:RECEIVE_URL_MULTIPLE_SUPPLIERS',\r\n FAIL_RECEIVE_URL_MULTIPLE_SUPPLIERS: 'SEARCH:FAIL_LOAD_MULTIPLE_SUPPLIERS',\r\n REQUEST_SEARCH_REQUIRED_USERS: 'SEARCH:REQUEST_SEARCH_REQUIRED_USERS',\r\n RECEIVE_SEARCH_REQUIRED_USERS: 'SEARCH:RECEIVE_SEARCH_REQUIRED_USERS'\r\n};\r\n\r\nexport class ClearResults {\r\n public type: string = ACTION.CLEAR_RESULTS;\r\n}\r\n\r\nexport class RequestReportCategory {\r\n public type: string = ACTION.REQUEST_REPORT_CATEGORY;\r\n}\r\n\r\nexport class ReceiveReportCategory {\r\n public type: string = ACTION.RECEIVE_REPORT_CATEGORY;\r\n public data: StoreField[];\r\n\r\n constructor(data: StoreField[]) {\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class RequestSortOptions {\r\n public type: string = ACTION.REQUEST_SORT_OPTIONS;\r\n}\r\n\r\nexport class ReceiveSortOptions {\r\n public type: string = ACTION.RECEIVE_SORT_OPTIONS;\r\n public options: SortOptions;\r\n\r\n constructor(options: SortOptions) {\r\n this.options = options;\r\n }\r\n}\r\n\r\nexport class RequestFavouriteDefinition {\r\n public type: string = ACTION.REQUEST_FAVOURITE_DEFINITION;\r\n}\r\n\r\nexport class ReceiveFavouriteDefinition {\r\n public type: string = ACTION.RECEIVE_FAVOURITE_DEFINITION;\r\n public definition: FavouriteDefinition;\r\n public favouriteId: string | number;\r\n\r\n constructor(definition: FavouriteDefinition, favouriteId: string | number) {\r\n this.definition = definition;\r\n this.favouriteId = favouriteId;\r\n }\r\n}\r\n\r\nexport class UpdateWorkingDefinition {\r\n public type: string = ACTION.UPDATE_WORKING_DEFINITION;\r\n public definition: FavouriteDefinition;\r\n\r\n constructor(definition: FavouriteDefinition) {\r\n this.definition = definition;\r\n }\r\n}\r\n\r\nexport class LoadFavouriteDefinitionFailure {\r\n public type: string = ACTION.LOAD_FAVOURITE_DEFINITION_FAILURE;\r\n public params: LoadFavouriteDefinitionParams;\r\n public error: any;\r\n public constructor(params: LoadFavouriteDefinitionParams, error: any) {\r\n this.params = params;\r\n this.error = error;\r\n }\r\n}\r\n\r\nexport class RequestDownloadReport {\r\n public type: string = ACTION.REQUEST_DOWNLOAD_REPORT;\r\n}\r\n\r\nexport class ReceiveDownloadReport {\r\n public type: string = ACTION.RECEIVE_DOWNLOAD_REPORT;\r\n}\r\n\r\nexport class FailDownloadReport {\r\n public type: string = ACTION.FAIL_DOWNLOAD_REPORT;\r\n}\r\n\r\nexport class RequestUrlMultipleSuppliers {\r\n public type: string = ACTION.REQUEST_URL_MULTIPLE_SUPPLIERS;\r\n}\r\n\r\nexport class ReceiveUrlMultipleSuppliers {\r\n public type: string = ACTION.RECEIVE_URL_MULTIPLE_SUPPLIERS;\r\n\r\n public urlMultipleSuppliers: string;\r\n\r\n constructor(urlMultipleSuppliers: string) {\r\n this.urlMultipleSuppliers = urlMultipleSuppliers;\r\n }\r\n}\r\n\r\nexport class FailReceiveUrlMultipleSuppliers {\r\n public type: string = ACTION.FAIL_RECEIVE_URL_MULTIPLE_SUPPLIERS;\r\n public error: any;\r\n \r\n public constructor(error: any) { \r\n this.error = error;\r\n }\r\n}\r\n\r\nexport class RequestSearchRequiredUsers {\r\n public type: string = ACTION.REQUEST_SEARCH_REQUIRED_USERS;\r\n}\r\n\r\nexport class ReceiveSearchRequiredUsers {\r\n public type: string = ACTION.RECEIVE_SEARCH_REQUIRED_USERS;\r\n\r\n public searchRequiredUsers: boolean;\r\n\r\n constructor(searchRequiredUsers: boolean) {\r\n this.searchRequiredUsers = searchRequiredUsers;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { FavouriteState } from './types-store';\r\nimport { LoadMultipleSuppliers, LoadUsersMetadata } from './types';\r\n\r\nconst INITIAL_CASE_STATE: FavouriteState = {\r\n fetchingReportCategory: false,\r\n reportCategory: undefined,\r\n fetchingSortOptions: false,\r\n sortOptions: undefined,\r\n fetchingDefinition: false,\r\n definition: undefined,\r\n workingDefinition: undefined,\r\n texts: {} as any\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<FavouriteState> } = {\r\n\r\n /**\r\n * Run when search query value is cleared\r\n */\r\n [ACTION.CLEAR_RESULTS]: (state: FavouriteState, action: actions.ClearResults): FavouriteState => {\r\n return {\r\n ...state,\r\n fetchingSortOptions: false,\r\n sortOptions: undefined,\r\n fetchingDefinition: false,\r\n definition: undefined,\r\n workingDefinition: undefined\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_REPORT_CATEGORY]: (state: FavouriteState, action: actions.RequestReportCategory): FavouriteState => {\r\n\r\n return {\r\n ...state,\r\n fetchingReportCategory: true,\r\n reportCategory: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_REPORT_CATEGORY]: (state: FavouriteState, action: actions.ReceiveReportCategory): FavouriteState => {\r\n\r\n return {\r\n ...state,\r\n fetchingReportCategory: false,\r\n reportCategory: action.data\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_SORT_OPTIONS]: (state: FavouriteState, action: actions.RequestSortOptions): FavouriteState => {\r\n\r\n return {\r\n ...state,\r\n fetchingSortOptions: true,\r\n sortOptions: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_SORT_OPTIONS]: (state: FavouriteState, action: actions.ReceiveSortOptions): FavouriteState => {\r\n\r\n return {\r\n ...state,\r\n fetchingSortOptions: false,\r\n sortOptions: action.options\r\n };\r\n },\r\n\r\n /**\r\n * Run when starting fetching definition data for a case report favourite.\r\n */\r\n [ACTION.REQUEST_FAVOURITE_DEFINITION]: (state: FavouriteState, action: actions.RequestFavouriteDefinition): FavouriteState => {\r\n\r\n return {\r\n ...state,\r\n fetchingDefinition: true,\r\n definition: undefined,\r\n workingDefinition: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_FAVOURITE_DEFINITION]: (state: FavouriteState, action: actions.ReceiveFavouriteDefinition): FavouriteState => {\r\n\r\n return {\r\n ...state,\r\n definition: action.definition,\r\n workingDefinition: action.definition,\r\n fetchingDefinition: false\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_WORKING_DEFINITION]: (state: FavouriteState, action: actions.ReceiveFavouriteDefinition): FavouriteState => {\r\n\r\n return {\r\n ...state,\r\n workingDefinition: action.definition\r\n };\r\n },\r\n\r\n [ACTION.LOAD_FAVOURITE_DEFINITION_FAILURE]:\r\n (state: FavouriteState, action: actions.LoadFavouriteDefinitionFailure): FavouriteState => {\r\n return {\r\n ...state,\r\n ...INITIAL_CASE_STATE\r\n };\r\n\r\n },\r\n\r\n [ACTION.REQUEST_DOWNLOAD_REPORT]: (state: FavouriteState, action: actions.RequestDownloadReport): FavouriteState => {\r\n\r\n return state;\r\n },\r\n \r\n [ACTION.RECEIVE_DOWNLOAD_REPORT]: (state: FavouriteState, action: actions.ReceiveDownloadReport): FavouriteState => {\r\n \r\n return state;\r\n },\r\n \r\n [ACTION.FAIL_DOWNLOAD_REPORT]: (state: FavouriteState, action: actions.FailDownloadReport): FavouriteState => {\r\n \r\n return state;\r\n },\r\n\r\n [ACTION.REQUEST_URL_MULTIPLE_SUPPLIERS]: (state: FavouriteState, action: actions.RequestUrlMultipleSuppliers): FavouriteState => {\r\n\r\n return state;\r\n },\r\n \r\n [ACTION.RECEIVE_URL_MULTIPLE_SUPPLIERS]: (state: FavouriteState, action: actions.ReceiveUrlMultipleSuppliers)\r\n : FavouriteState & LoadMultipleSuppliers => { \r\n \r\n return {\r\n ...state,\r\n urlMultipleSuppliers: action.urlMultipleSuppliers\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_SEARCH_REQUIRED_USERS]: (state: FavouriteState, action: actions.ReceiveSearchRequiredUsers): FavouriteState => {\r\n\r\n return state;\r\n },\r\n \r\n [ACTION.RECEIVE_SEARCH_REQUIRED_USERS]: (state: FavouriteState, action: actions.ReceiveSearchRequiredUsers)\r\n : FavouriteState & LoadUsersMetadata => { \r\n \r\n return {\r\n ...state,\r\n searchRequiredUsers: action.searchRequiredUsers\r\n };\r\n }\r\n\r\n};\r\n\r\nexport const reducer: Reducer<FavouriteState> = (state: FavouriteState = INITIAL_CASE_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","\r\nimport { DashboardLayoutDefinition } from './types-store';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { FavouriteDataModel } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\nimport { DrillDownModel } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\n/** \r\n * ACTIONS - These are serializable (hence replayable) descriptions of state transitions.\r\n * They do not themselves have any side-effects; they just describe something that is going to happen.\r\n * Use @typeName and isActionType for type detection that works even after serialization/deserialization.\r\n */\r\n\r\nexport const ACTION = {\r\n REQUEST_EXECUTE_FAVOURITE: 'DASHBOARD:REQUEST_EXECUTE_FAVOURITE',\r\n RECEIVE_EXECUTE_FAVOURITE: 'DASHBOARD:RECEIVE_EXECUTE_FAVOURITE',\r\n FAILED_EXECUTE_FAVOURITE: 'DASHBOARD:FAILED_EXECUTE_FAVOURITE',\r\n REQUEST_CONTAINER_DEFINITIONS: 'DASHBOARD:REQUEST_CONTAINER_DEFINITIONS',\r\n RECEIVE_CONTAINER_DEFINITIONS: 'DASHBOARD:RECEIVE_CONTAINER_DEFINITIONS',\r\n FAILED_CONTAINER_DEFINITIONS: 'DASHBOARD:FAILED_CONTAINER_DEFUINITIONS',\r\n REQUEST_MAIN_FAVOURITE_DEFINITION: 'DASHBOARD:REQUEST_MAIN_FAVOURITE_DEFINITION',\r\n RECEIVE_MAIN_FAVOURITE_DEFINITION: 'DASHBOARD:RECEIVE_MAIN_FAVOURITE_DEFINITION',\r\n CLEAR_MAIN_FAVOURITE_DEFINITION: 'DASHBOARD:CLEAR_MAIN_FAVOURITE_DEFINITION',\r\n FAILED_MAIN_FAVOURITE_DEFINITION: 'DASHBOARD:FAILED_MAIN_FAVOURITE_DEFINITION',\r\n UPDATE_MAIN_FAVOURITE_DEFINITION: 'DASHBOARD:UPDATE_MAIN_FAVOURITE_DEFINITION',\r\n REQUEST_DRILLDOWN: 'DASHBOARD:REQUEST_DRILLDOWN'\r\n};\r\n\r\nexport class RequestExecuteFavourite {\r\n public type: string = ACTION.REQUEST_EXECUTE_FAVOURITE;\r\n public mainFavouriteId: number;\r\n public containerFavouriteId: number;\r\n\r\n constructor(mainFavouriteId: number, containerFavouriteId: number) {\r\n this.mainFavouriteId = mainFavouriteId;\r\n this.containerFavouriteId = containerFavouriteId;\r\n }\r\n}\r\n\r\nexport class ReceiveExecuteFavourite {\r\n public type: string = ACTION.RECEIVE_EXECUTE_FAVOURITE;\r\n public mainFavouriteId: number;\r\n public containerFavouriteId: number;\r\n public data: FavouriteDataModel;\r\n\r\n constructor(mainFavouriteId: number, containerFavouriteId: number, data: FavouriteDataModel) {\r\n this.mainFavouriteId = mainFavouriteId;\r\n this.containerFavouriteId = containerFavouriteId;\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class FailedExecuteFavourite {\r\n public type: string = ACTION.FAILED_EXECUTE_FAVOURITE;\r\n\r\n constructor(public mainFavouriteId: number, public containerFavouriteId: number) {}\r\n}\r\n\r\nexport class RequestContainerDefinitions {\r\n public type: string = ACTION.REQUEST_CONTAINER_DEFINITIONS;\r\n public dashboardType: number;\r\n\r\n constructor(dashboardType: number) {\r\n this.dashboardType = dashboardType;\r\n }\r\n}\r\n\r\nexport class ReceiveContainerDefinitions {\r\n public type: string = ACTION.RECEIVE_CONTAINER_DEFINITIONS;\r\n public dashboardType: number;\r\n public dashboardDefinition: DashboardLayoutDefinition;\r\n public containerFavouriteDefinitions: FavouriteDefinition[];\r\n\r\n constructor(dashboardType: number, dashboardDefinition: DashboardLayoutDefinition,\r\n containerFavouriteDefinitions: FavouriteDefinition[]) {\r\n this.dashboardType = dashboardType;\r\n this.dashboardDefinition = dashboardDefinition;\r\n this.containerFavouriteDefinitions = containerFavouriteDefinitions;\r\n }\r\n}\r\n\r\nexport class FailedContainerDefinitions {\r\n public type: string = ACTION.FAILED_CONTAINER_DEFINITIONS;\r\n\r\n constructor(public dashboardType: number) {}\r\n}\r\n\r\nexport class RequestMainFavouriteDefinition {\r\n public type: string = ACTION.REQUEST_MAIN_FAVOURITE_DEFINITION;\r\n}\r\n\r\nexport class ReceiveMainFavouriteDefinition {\r\n public type: string = ACTION.RECEIVE_MAIN_FAVOURITE_DEFINITION;\r\n public mainFavouriteId: number;\r\n public favouriteDefinition: FavouriteDefinition;\r\n\r\n constructor(mainFavouriteId: number, favouriteDefinition: FavouriteDefinition) {\r\n this.mainFavouriteId = mainFavouriteId;\r\n this.favouriteDefinition = favouriteDefinition;\r\n }\r\n}\r\nexport class ClearMainFavouriteDefinition {\r\n public type: string = ACTION.CLEAR_MAIN_FAVOURITE_DEFINITION;\r\n constructor(public mainFavouriteId: number) { }\r\n}\r\n\r\nexport class FailedMainFavouriteDefinition {\r\n public type: string = ACTION.FAILED_MAIN_FAVOURITE_DEFINITION;\r\n public mainFavouriteId: number;\r\n\r\n constructor(mainFavouriteId: number) {\r\n this.mainFavouriteId = mainFavouriteId;\r\n }\r\n}\r\n\r\nexport class UpdateMainFavouriteDefinition {\r\n public type: string = ACTION.UPDATE_MAIN_FAVOURITE_DEFINITION;\r\n\r\n constructor(public favouriteDefinition: FavouriteDefinition) { }\r\n}\r\n\r\nexport class RequestDrillDown {\r\n public type: string = ACTION.REQUEST_DRILLDOWN;\r\n public mainFavouriteId: number;\r\n public containerFavouriteId: number;\r\n public drillDownModel: DrillDownModel;\r\n\r\n constructor(mainFavouriteId: number, containerFavouriteId: number, drillDownModel: DrillDownModel) {\r\n this.mainFavouriteId = mainFavouriteId;\r\n this.containerFavouriteId = containerFavouriteId;\r\n this.drillDownModel = drillDownModel;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport {\r\n ACTION, RequestExecuteFavourite, ReceiveExecuteFavourite, RequestContainerDefinitions, ReceiveContainerDefinitions,\r\n RequestMainFavouriteDefinition, ReceiveMainFavouriteDefinition, FailedMainFavouriteDefinition, \r\n ClearMainFavouriteDefinition,\r\n UpdateMainFavouriteDefinition,\r\n FailedExecuteFavourite,\r\n FailedContainerDefinitions\r\n} from './action-types';\r\nimport { DashboardState } from './types-store';\r\n\r\nconst INITIAL_STATE: DashboardState = {\r\n layouts: {},\r\n workingDefinitionRequestId: 0,\r\n mainFavourite: undefined,\r\n fetchingMainFavourite: false,\r\n texts: {}\r\n};\r\n\r\n/** \r\n * REDUCER - For a given state and action, returns the new state. \r\n * To support time travel, this must not mutate the old state.\r\n */\r\nconst reducers: ActionMap = {\r\n\r\n [ACTION.REQUEST_EXECUTE_FAVOURITE]: (state: DashboardState, action: RequestExecuteFavourite): DashboardState => {\r\n return {\r\n ...state,\r\n mainFavourite: {\r\n ...state.mainFavourite,\r\n ... {\r\n favouriteContainers: {\r\n ...(!!state.mainFavourite && state.mainFavourite.favouriteContainers),\r\n ...{\r\n [action.containerFavouriteId]: {\r\n ...(!!state.mainFavourite && state.mainFavourite.favouriteContainers[action.containerFavouriteId]),\r\n fetchingDataModel: true\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_EXECUTE_FAVOURITE]: (state: DashboardState, action: ReceiveExecuteFavourite): DashboardState => {\r\n if (!state.mainFavourite) {\r\n return state;\r\n }\r\n return {\r\n ...state,\r\n mainFavourite: {\r\n ...state.mainFavourite,\r\n ... {\r\n favouriteContainers: {\r\n ...state.mainFavourite.favouriteContainers,\r\n ...{\r\n [action.containerFavouriteId]: {\r\n favouriteDataModel: {\r\n ...action.data,\r\n id: action.containerFavouriteId\r\n },\r\n fetchingDataModel: false\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAILED_EXECUTE_FAVOURITE]: (state: DashboardState, action: FailedExecuteFavourite): DashboardState => {\r\n if (!state.mainFavourite) {\r\n return state;\r\n }\r\n return {\r\n ...state,\r\n mainFavourite: {\r\n ...state.mainFavourite,\r\n ... {\r\n favouriteContainers: {\r\n ...state.mainFavourite.favouriteContainers,\r\n ...{\r\n [action.containerFavouriteId]: {\r\n fetchingDataModel: false,\r\n error: true\r\n }\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_CONTAINER_DEFINITIONS]: (state: DashboardState, action: RequestContainerDefinitions): DashboardState => {\r\n return {\r\n ...state,\r\n layouts: {\r\n ...state.layouts,\r\n [action.dashboardType]: {\r\n ...state.layouts[action.dashboardType],\r\n fetching: true\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CONTAINER_DEFINITIONS]: (state: DashboardState, action: ReceiveContainerDefinitions): DashboardState => {\r\n return {\r\n ...state,\r\n layouts: {\r\n ...state.layouts,\r\n [action.dashboardType]: {\r\n definition: action.dashboardDefinition,\r\n containerDefinitions: action.containerFavouriteDefinitions,\r\n fetching: false\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAILED_CONTAINER_DEFINITIONS]: (state: DashboardState, action: FailedContainerDefinitions): DashboardState => {\r\n return {\r\n ...state,\r\n layouts: {\r\n ...state.layouts,\r\n [action.dashboardType]: {\r\n containerDefinitions: undefined,\r\n fetching: false,\r\n error: true\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_MAIN_FAVOURITE_DEFINITION]: (state: DashboardState, action: RequestMainFavouriteDefinition): DashboardState => {\r\n return {\r\n ...state,\r\n fetchingMainFavourite: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_MAIN_FAVOURITE_DEFINITION]: (state: DashboardState, action: ReceiveMainFavouriteDefinition): DashboardState => {\r\n return {\r\n ...state,\r\n mainFavourite: {\r\n ...state.mainFavourite,\r\n favouriteContainers: {},\r\n definition: action.favouriteDefinition,\r\n workingDefinition: action.favouriteDefinition\r\n },\r\n fetchingMainFavourite: false\r\n };\r\n },\r\n [ACTION.CLEAR_MAIN_FAVOURITE_DEFINITION]: (state: DashboardState, action: ClearMainFavouriteDefinition): DashboardState => {\r\n return {\r\n ...state,\r\n layouts: {},\r\n workingDefinitionRequestId: state.workingDefinitionRequestId + 1,\r\n mainFavourite: undefined\r\n };\r\n },\r\n\r\n [ACTION.FAILED_MAIN_FAVOURITE_DEFINITION]: (state: DashboardState, action: FailedMainFavouriteDefinition): DashboardState => {\r\n\r\n return {\r\n ...state,\r\n layouts: {},\r\n mainFavourite: undefined,\r\n fetchingMainFavourite: false,\r\n errorFetchingMainFavourite: true\r\n };\r\n },\r\n [ACTION.UPDATE_MAIN_FAVOURITE_DEFINITION]: (state: DashboardState, action: UpdateMainFavouriteDefinition)\r\n : DashboardState => {\r\n \r\n return {\r\n ...state,\r\n workingDefinitionRequestId: state.workingDefinitionRequestId + 1,\r\n mainFavourite: {\r\n ...state.mainFavourite,\r\n workingDefinition: action.favouriteDefinition\r\n }\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<DashboardState> = (state: DashboardState = INITIAL_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n\r\ninterface ActionMap {\r\n [indexer: string]: Reducer<DashboardState>;\r\n}\r\n","import { FavouriteDefinition, FavouriteOptions } from 'app/types-shared';\r\nimport { ValidationProps } from 'ui';\r\nimport { Metadata } from 'app/area/company-report/types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_FAVOURITE_DEFINITION_TEMPLATE: 'COMPANY_REPORT:REQUEST_FAVOURITE_DEFINITION_TEMPLATE',\r\n RECEIVE_FAVOURITE_DEFINITION_TEMPLATE: 'COMPANY_REPORT:RECEIVE_FAVOURITE_DEFINITION_TEMPLATE',\r\n REQUEST_SEND_SCHEDULED_REPORT: 'COMPANY_REPORT:REQUEST_SEND_SCHEDULED_REPORT',\r\n RECEIVE_SCHEDULED_REPORT: 'COMPANY_REPORT:RECEIVE_SCHEDULED_REPORT',\r\n FAILED_TO_SEND_SCHEDULED_REPORT: 'COMPANY_REPORT:FAILED_TO_SEND_SCHEDULED_REPORT',\r\n REQUEST_METADATA: 'COMPANY_REPORT:REQUEST_METADATA',\r\n RECEIVE_METADATA: 'COMPANY_REPORT:RECEIVE_METADATA',\r\n SET_EMAIL_VALUE: 'COMPANY_REPORT:SET_EMAIL_VALUE',\r\n CLEAR_FORM: 'COMPANY_REPORT:CLEAR_FORM',\r\n UPDATE_FILTERS_FAVOURITE: 'COMPANY_REPORT:UPDATE_FILTERS_FAVOURITE',\r\n VALIDATE_REPORT_FILTERS: 'COMPANY_REPORT:VALIDATE_REPORT_FILTERS'\r\n};\r\n\r\nexport class RequestFavouriteDefinitionTemplate {\r\n public type: string = ACTION.REQUEST_FAVOURITE_DEFINITION_TEMPLATE;\r\n}\r\n\r\nexport class ReceiveFavouriteDefinitionTemplate {\r\n public type: string = ACTION.RECEIVE_FAVOURITE_DEFINITION_TEMPLATE;\r\n public favouriteDefinitionTemplate: FavouriteDefinition;\r\n\r\n constructor(favouriteDefinitionTemplate: FavouriteDefinition) {\r\n this.favouriteDefinitionTemplate = favouriteDefinitionTemplate;\r\n }\r\n}\r\n\r\nexport class RequestSendScheduledReport {\r\n public type: string = ACTION.REQUEST_SEND_SCHEDULED_REPORT;\r\n}\r\n\r\nexport class ReceiveScheduledReport {\r\n public type: string = ACTION.RECEIVE_SCHEDULED_REPORT;\r\n}\r\n\r\nexport class FailedToSendScheduledReport {\r\n public type: string = ACTION.FAILED_TO_SEND_SCHEDULED_REPORT;\r\n}\r\n\r\nexport class RequestMetadata {\r\n public type: string = ACTION.REQUEST_METADATA;\r\n}\r\n\r\nexport class ReceiveMetadata {\r\n public type: string = ACTION.RECEIVE_METADATA;\r\n public metadata: Metadata;\r\n public usePredefDate: boolean;\r\n \r\n constructor(metadata: Metadata, usePredefDate: boolean) {\r\n this.metadata = metadata;\r\n this.usePredefDate = usePredefDate;\r\n }\r\n}\r\n\r\nexport class SetEmailValue {\r\n public type: string = ACTION.SET_EMAIL_VALUE;\r\n public emails: string;\r\n public validation: ValidationProps;\r\n constructor(value: string, validation?: ValidationProps) {\r\n this.emails = value;\r\n this.validation = validation;\r\n }\r\n}\r\n\r\nexport class ClearForm {\r\n public type: string = ACTION.CLEAR_FORM;\r\n}\r\n\r\nexport class UpdateFiltersFavourite {\r\n public type: string = ACTION.UPDATE_FILTERS_FAVOURITE;\r\n public definition: FavouriteOptions;\r\n constructor(definition: FavouriteOptions) {\r\n this.definition = definition;\r\n }\r\n}\r\n\r\nexport class ValidateReportFilters {\r\n public type: string = ACTION.VALIDATE_REPORT_FILTERS;\r\n}\r\n","import { CompanyReportState } from './types-store';\r\nimport { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\n\r\nexport const INITIAL_STATE: CompanyReportState = {\r\n fetchingReport: false,\r\n fetchingMetadata: false,\r\n reportId: 0,\r\n emails: '',\r\n emailsValidation: undefined,\r\n favouriteDefinitionTemplate: undefined,\r\n metadata: undefined,\r\n texts: {} as any,\r\n validateFilters: false\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<CompanyReportState> } = {\r\n\r\n [ACTION.REQUEST_FAVOURITE_DEFINITION_TEMPLATE]: (state: CompanyReportState,\r\n action: actions.RequestFavouriteDefinitionTemplate): CompanyReportState => {\r\n return {\r\n ...state,\r\n fetchingReport: true,\r\n favouriteDefinitionTemplate: undefined\r\n };\r\n },\r\n [ACTION.RECEIVE_FAVOURITE_DEFINITION_TEMPLATE]: (state: CompanyReportState,\r\n action: actions.ReceiveFavouriteDefinitionTemplate): CompanyReportState => {\r\n return {\r\n ...state,\r\n favouriteDefinitionTemplate: action.favouriteDefinitionTemplate\r\n };\r\n },\r\n [ACTION.REQUEST_SEND_SCHEDULED_REPORT]: (state: CompanyReportState, action: actions.RequestSendScheduledReport): CompanyReportState => {\r\n return {\r\n ...state,\r\n fetchingReport: true\r\n };\r\n },\r\n [ACTION.RECEIVE_SCHEDULED_REPORT]: (state: CompanyReportState,\r\n action: actions.ReceiveScheduledReport): CompanyReportState => {\r\n return {\r\n ...state,\r\n fetchingReport: false\r\n };\r\n },\r\n [ACTION.FAILED_TO_SEND_SCHEDULED_REPORT]: (state: CompanyReportState,\r\n action: actions.FailedToSendScheduledReport): CompanyReportState => {\r\n return {\r\n ...state,\r\n fetchingReport: false\r\n };\r\n },\r\n [ACTION.SET_EMAIL_VALUE]: (state: CompanyReportState, action: actions.SetEmailValue): CompanyReportState => {\r\n return {\r\n ...state,\r\n emails: action.emails,\r\n emailsValidation: action.validation\r\n };\r\n },\r\n [ACTION.CLEAR_FORM]: (state: CompanyReportState, action: actions.ClearForm): CompanyReportState => {\r\n return {\r\n ...state,\r\n emails: '',\r\n emailsValidation: undefined,\r\n definition: undefined,\r\n validateFilters: false\r\n };\r\n },\r\n [ACTION.UPDATE_FILTERS_FAVOURITE]: (state: CompanyReportState, action: actions.UpdateFiltersFavourite): CompanyReportState => {\r\n return {\r\n ...state,\r\n definition: action.definition\r\n };\r\n },\r\n [ACTION.REQUEST_METADATA]: (state: CompanyReportState): CompanyReportState => {\r\n return {\r\n ...state,\r\n fetchingMetadata: true\r\n };\r\n },\r\n [ACTION.RECEIVE_METADATA]: (state: CompanyReportState, action: actions.ReceiveMetadata): CompanyReportState => {\r\n return {\r\n ...state,\r\n fetchingMetadata: false,\r\n metadata: action.metadata,\r\n usePredefDate: action.usePredefDate\r\n };\r\n },\r\n [ACTION.VALIDATE_REPORT_FILTERS]: (state: CompanyReportState, action: actions.ValidateReportFilters): CompanyReportState => {\r\n return {\r\n ...state, \r\n validateFilters: true\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<CompanyReportState> = (state: CompanyReportState = INITIAL_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { CasePermissions, Entity, RenderMode } from 'app/types-shared';\r\nimport { CaseResult } from './types-store';\r\nimport { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\nimport { RiskMatrixDefinition } from 'app/area/case/types-store';\r\n\r\nexport const ACTION = {\r\n CLEAR_RESULT: 'CASE_LISTING:CLEAR_RESULT',\r\n RECEIVE_PERMISSIONS: 'CASE_LISTING:RECEIVE_PERMISSIONS',\r\n REQUEST_UIDEFINITIONS: 'CASE_LISTING:REQUEST_UIDEFINITIONS',\r\n RECEIVE_UIDEFINITIONS: 'CASE_LISTING:RECEIVE_UIDEFINITIONS',\r\n RECEIVE_RISKMATRIXDEFINITIONS: 'CASE_LISTING:RECEIVE_RISKMATRIXDEFINITIONS',\r\n REQUEST_CASES: 'CASE_LISTING:REQUEST_CASES',\r\n RECEIVE_CASES: 'CASE_LISTING:RECEIVE_CASES',\r\n REQUEST_REMOVE_ITEM: 'CASE_LISTING:REQUEST_REMOVE_ITEM',\r\n RECEIVE_REMOVE_ITEM: 'CASE_LISTING:RECEIVE_REMOVE_ITEM',\r\n FAIL_REMOVE_ITEM: 'CASE_LISTING:FAIL_REMOVE_ITEM',\r\n FAIL_EXECUTE_FAVOURITE: 'CASE_LISTING:FAIL_EXECUTE_FAVOURITE',\r\n SET_RENDERMODE: 'CASE_LISTING:SET_RENDERMODE'\r\n};\r\n\r\nexport class ClearResults {\r\n public type: string = ACTION.CLEAR_RESULT;\r\n}\r\n\r\nexport class ReceivePermissions {\r\n public type: string = ACTION.RECEIVE_PERMISSIONS;\r\n public permissions: { [caseNumber: number]: CasePermissions };\r\n public requestId: number;\r\n\r\n constructor(permissions: { [caseNumber: number]: CasePermissions }, requestId: number) {\r\n this.permissions = permissions;\r\n this.requestId = requestId;\r\n }\r\n}\r\n\r\nexport class RequestUiDefinitions {\r\n public type: string = ACTION.REQUEST_UIDEFINITIONS;\r\n constructor(\r\n public uiDefinitions: { caseTypeId: number, caseContextId: number }[],\r\n public requestId: number\r\n ) {}\r\n}\r\n\r\nexport class ReceiveUiDefinitions {\r\n public type: string = ACTION.RECEIVE_UIDEFINITIONS;\r\n constructor(\r\n public uiDefinitions: { caseTypeId: number, caseContextId: number, definition: UiDefinition }[],\r\n public requestId: number\r\n ) {}\r\n}\r\n\r\nexport class ReceiveRiskMatrixDefinitions {\r\n public type: string = ACTION.RECEIVE_RISKMATRIXDEFINITIONS;\r\n public riskMatrixDefinitions: { [caseType: number]: RiskMatrixDefinition };\r\n public requestId: number;\r\n\r\n constructor(riskMatrixDefinitions: { [caseType: number]: RiskMatrixDefinition }, requestId: number) {\r\n this.riskMatrixDefinitions = riskMatrixDefinitions;\r\n this.requestId = requestId;\r\n }\r\n}\r\n\r\nexport class RequestCases {\r\n public type: string = ACTION.REQUEST_CASES; \r\n}\r\n\r\nexport class ReceiveCases {\r\n public type: string = ACTION.RECEIVE_CASES;\r\n public entities: { [entityStoreKey: string]: Entity[] };\r\n public caseResults: CaseResult[];\r\n public totalNumberOfResults: number; \r\n public requestId: number;\r\n\r\n constructor(\r\n entities: { [primaryKey: string]: Entity[] },\r\n caseResults: CaseResult[],\r\n totalNumberOfResults: number,\r\n requestId: number\r\n ) {\r\n this.entities = entities;\r\n this.caseResults = caseResults;\r\n this.totalNumberOfResults = totalNumberOfResults;\r\n this.requestId = requestId;\r\n }\r\n}\r\n\r\nexport class RequestRemoveItem {\r\n public type: string = ACTION.REQUEST_REMOVE_ITEM;\r\n public itemId: number;\r\n\r\n constructor(caseNumber: number) {\r\n this.itemId = caseNumber;\r\n }\r\n}\r\nexport class ReceiveRemoveItem {\r\n public type: string = ACTION.RECEIVE_REMOVE_ITEM;\r\n public itemId: number;\r\n\r\n constructor(caseNumber: number) {\r\n this.itemId = caseNumber;\r\n }\r\n}\r\nexport class FailRemoveItem {\r\n public type: string = ACTION.FAIL_REMOVE_ITEM;\r\n public itemId: number;\r\n\r\n constructor(caseNumber: number) {\r\n this.itemId = caseNumber;\r\n }\r\n}\r\n\r\nexport class FailExecuteFavourite {\r\n public type: string = ACTION.FAIL_EXECUTE_FAVOURITE; \r\n\r\n constructor(public errorsExecuteFailed: string[]) {\r\n this.errorsExecuteFailed = errorsExecuteFailed;\r\n }\r\n}\r\n\r\nexport class SetRenderMode {\r\n public type: string = ACTION.SET_RENDERMODE;\r\n\r\n constructor(public renderMode: RenderMode) {}\r\n}\r\n","import { Reducer } from 'redux';\r\nimport {\r\n ACTION, RequestCases, ReceiveCases, RequestRemoveItem, ReceiveRemoveItem, FailRemoveItem,\r\n ReceivePermissions, ReceiveUiDefinitions, ClearResults, ReceiveRiskMatrixDefinitions, FailExecuteFavourite,\r\n RequestUiDefinitions, SetRenderMode\r\n} from './action-types';\r\nimport { CaseListingStoreState } from './types-store';\r\nimport { RenderMode } from 'app/types-shared';\r\n\r\nexport const INITIAL_CASE_LISTING_STATE: CaseListingStoreState = {\r\n renderMode: RenderMode.report,\r\n fetching: false,\r\n requestId: 0,\r\n totalNumberOfResults: 0,\r\n entities: undefined,\r\n permissions: undefined,\r\n uiDefinitions: undefined,\r\n riskMatrixDefinitions: undefined,\r\n results: undefined,\r\n texts: {} as any,\r\n errorsExecuteFailed: undefined\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<CaseListingStoreState> } = {\r\n\r\n [ACTION.CLEAR_RESULT]: (state: CaseListingStoreState, action: ClearResults): CaseListingStoreState => {\r\n return {\r\n ...state,\r\n fetching: false,\r\n totalNumberOfResults: 0,\r\n entities: undefined,\r\n permissions: undefined,\r\n uiDefinitions: undefined,\r\n riskMatrixDefinitions: undefined,\r\n results: undefined,\r\n requestId: state.requestId + 1,\r\n errorsExecuteFailed: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_PERMISSIONS]: (state: CaseListingStoreState, action: ReceivePermissions): CaseListingStoreState => {\r\n\r\n if (action.requestId !== state.requestId) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n permissions: {\r\n ...(state.permissions || {}),\r\n ...action.permissions\r\n }\r\n };\r\n },\r\n [ACTION.REQUEST_UIDEFINITIONS]: (state: CaseListingStoreState, action: RequestUiDefinitions): CaseListingStoreState => {\r\n \r\n if (action.requestId !== state.requestId) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n uiDefinitions: [\r\n ...(state.uiDefinitions || []).filter(\r\n ui => !action.uiDefinitions.some(a => ui.caseTypeId === a.caseTypeId && ui.caseContextId === a.caseContextId)\r\n ),\r\n ...action.uiDefinitions.map(ui => ({\r\n ...ui,\r\n fetching: true\r\n }))\r\n ]\r\n };\r\n },\r\n [ACTION.RECEIVE_UIDEFINITIONS]: (state: CaseListingStoreState, action: ReceiveUiDefinitions): CaseListingStoreState => {\r\n\r\n if (action.requestId !== state.requestId) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n uiDefinitions: (state.uiDefinitions || []).map(existingDefinition => {\r\n const receivedDefinition = action.uiDefinitions.find(\r\n u => existingDefinition.caseTypeId === u.caseTypeId && existingDefinition.caseContextId === u.caseContextId\r\n );\r\n return receivedDefinition ? \r\n { ...receivedDefinition, fetching: false } : \r\n existingDefinition;\r\n })\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_RISKMATRIXDEFINITIONS]: (state: CaseListingStoreState, action: ReceiveRiskMatrixDefinitions): CaseListingStoreState => {\r\n\r\n if (action.requestId !== state.requestId) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n riskMatrixDefinitions: {\r\n ...(state.riskMatrixDefinitions || {}),\r\n ...action.riskMatrixDefinitions\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when starting fetching data for a case report favourite.\r\n */\r\n [ACTION.REQUEST_CASES]: (state: CaseListingStoreState, action: RequestCases): CaseListingStoreState => {\r\n\r\n return {\r\n ...state,\r\n fetching: true,\r\n requestId: state.requestId + 1\r\n };\r\n },\r\n\r\n /**\r\n * Run when finished fetching data for case report favourite.\r\n */\r\n [ACTION.RECEIVE_CASES]: (state: CaseListingStoreState, action: ReceiveCases): CaseListingStoreState => {\r\n\r\n if (action.requestId !== state.requestId) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n entities: {\r\n ...(state.entities || {}),\r\n ...action.entities\r\n },\r\n results: state.results ? state.results.concat(action.caseResults) : [...action.caseResults],\r\n fetching: false,\r\n totalNumberOfResults: action.totalNumberOfResults,\r\n errorsExecuteFailed: undefined\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_REMOVE_ITEM]: (state: CaseListingStoreState, action: RequestRemoveItem): CaseListingStoreState => {\r\n return {\r\n ...state,\r\n results: state.results.map(item => item.caseNumber !== action.itemId ? item : {\r\n ...item,\r\n deleted: true\r\n }),\r\n totalNumberOfResults: state.totalNumberOfResults - 1\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_REMOVE_ITEM]: (state: CaseListingStoreState, action: ReceiveRemoveItem): CaseListingStoreState => {\r\n return {\r\n ...state,\r\n results: state.results.filter(item => !item.deleted || item.caseNumber !== action.itemId)\r\n };\r\n },\r\n\r\n [ACTION.FAIL_REMOVE_ITEM]: (state: CaseListingStoreState, action: FailRemoveItem): CaseListingStoreState => {\r\n return {\r\n ...state,\r\n results: state.results.map(item => item.caseNumber !== action.itemId ? item : {\r\n ...item,\r\n deleted: false\r\n }),\r\n totalNumberOfResults: state.totalNumberOfResults + 1\r\n };\r\n },\r\n\r\n [ACTION.FAIL_EXECUTE_FAVOURITE]: (state: CaseListingStoreState, action: FailExecuteFavourite): CaseListingStoreState => {\r\n return { \r\n ...state, \r\n errorsExecuteFailed: action.errorsExecuteFailed\r\n }; \r\n },\r\n\r\n [ACTION.SET_RENDERMODE]: (state: CaseListingStoreState, action: SetRenderMode): CaseListingStoreState => {\r\n return {\r\n ...state,\r\n renderMode: action.renderMode\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<CaseListingStoreState> = (state: CaseListingStoreState = INITIAL_CASE_LISTING_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { ResponseCachingState } from './types-store';\r\nimport { ACTION, RequestUiDefinition, ReceiveUiDefinition, FailUiDefinition } from './action-types';\r\n\r\nexport const INITIAL_UI_DEFINITION_STATE: ResponseCachingState = {\r\n uiDefinitions: []\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<ResponseCachingState> } = {\r\n\r\n [ACTION.REQUEST_UI_DEFINITION]: (state: ResponseCachingState, action: RequestUiDefinition): ResponseCachingState => {\r\n\r\n return {\r\n ...state,\r\n uiDefinitions: [\r\n ...state.uiDefinitions.filter(ui => !(ui.id === action.caseTypeId && ui.caseContextId === action.caseContextId)),\r\n {\r\n id: action.caseTypeId,\r\n caseContextId: action.caseContextId,\r\n fetching: true\r\n }\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_UI_DEFINITION]: (state: ResponseCachingState, action: ReceiveUiDefinition): ResponseCachingState => {\r\n\r\n return {\r\n ...state,\r\n uiDefinitions: [\r\n ...state.uiDefinitions.filter(ui => !(ui.id === action.caseTypeId && ui.caseContextId === action.caseContextId)),\r\n {\r\n id: action.caseTypeId,\r\n caseContextId: action.caseContextId,\r\n fetching: false,\r\n definition: action.uiDefinition,\r\n eTag: action.eTag,\r\n timestamp: new Date().getTime()\r\n }\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.FAIL_UI_DEFINITION]: (state: ResponseCachingState, action: FailUiDefinition): ResponseCachingState => {\r\n\r\n return {\r\n ...state,\r\n uiDefinitions: [\r\n ...state.uiDefinitions.filter(ui => !(ui.id === action.caseTypeId && ui.caseContextId === action.caseContextId)),\r\n {\r\n id: action.caseTypeId,\r\n caseContextId: action.caseContextId,\r\n fetching: false\r\n }\r\n ]\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<ResponseCachingState> = (\r\n state: ResponseCachingState = INITIAL_UI_DEFINITION_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { SelectItem } from '../../types';\r\nimport { SelectedAggregateField } from './types-fields';\r\n\r\nexport const ACTION = {\r\n CLEAR_AGGREGATION_STATE: 'SELECTION_REPORT:CLEAR_AGGREGATION_STATE',\r\n REQUEST_AGGREGATE_FIELDS: 'SELECTION_REPORT:REQUEST_AGGREGATE_FIELDS',\r\n RESPONSE_AGGREGATE_FIELDS: 'SELECTION_REPORT:RESPONSE_AGGREGATE_FIELDS',\r\n REQUEST_AGGREGATE_DEFAULT_FIELDS: 'SELECTION_REPORT:REQUEST_AGGREGATE_DEFAULT_FIELDS',\r\n RESPONSE_AGGREGATE_DEFAULT_FIELDS: 'SELECTION_REPORT:RESPONSE_AGGREGATE_DEFAULT_FIELDS',\r\n UPDATE_DEFAULT_AGGREGATE_FIELDS: 'SELECTION_REPORT:UPDATE_DEFAULT_AGGREGATE_FIELDS',\r\n REQUEST_AGGREGATE_FUNC_OPTIONS: 'SELECTION_REPORT:REQUEST_AGGREGATE_FUNCTION_OPTIONS',\r\n SET_AGGREGATE_FIELD: 'SELECTION_REPORT:SET_AGGREGATE_FIELD',\r\n REMOVE_AGGREGATE_FIELD: 'SELECTION_REPORT:REMOVE_AGGREGATE_FIELD',\r\n SET_AGGREGATE_FUNCTION: 'SELECTION_REPORT:SET_AGGREGATE_FUNCTION'\r\n};\r\n\r\nexport class ClearAggregationState {\r\n public type: string = ACTION.CLEAR_AGGREGATION_STATE;\r\n}\r\nexport class RequestAggregateDefaultFields {\r\n public type: string = ACTION.REQUEST_AGGREGATE_DEFAULT_FIELDS;\r\n}\r\nexport class ResponseAggregateDefaultFields {\r\n public type: string = ACTION.RESPONSE_AGGREGATE_DEFAULT_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class UpdateAggregateDefaultFields {\r\n public type: string = ACTION.UPDATE_DEFAULT_AGGREGATE_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class ResponseAggregateFields {\r\n public type: string = ACTION.RESPONSE_AGGREGATE_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class RequestAggregateFunctionOptions {\r\n public type: string = ACTION.REQUEST_AGGREGATE_FUNC_OPTIONS;\r\n}\r\nexport class SetAggregateField {\r\n public type: string = ACTION.SET_AGGREGATE_FIELD;\r\n constructor(public selectedFieldItem: SelectedAggregateField) { }\r\n}\r\nexport class RemoveAggregateField {\r\n public type: string = ACTION.REMOVE_AGGREGATE_FIELD;\r\n}\r\nexport class SetAggregateFunction {\r\n public type: string = ACTION.SET_AGGREGATE_FUNCTION;\r\n constructor(public selectedAggregateItem: SelectItem) { }\r\n}\r\n","\r\nimport { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { AggregationState } from './types-store';\r\nimport { FieldItem } from 'app/area/reports/types';\r\n\r\nexport const INITIAL_STATE: AggregationState = {\r\n fetching: false,\r\n initialized: false,\r\n defaultAggregateFields: undefined,\r\n additionalAggregateFields: [],\r\n selectedAggregateField: undefined\r\n};\r\n\r\nconst aggregationReducers: { [indexer: string]: Reducer<AggregationState> } = {\r\n \r\n [ACTION.CLEAR_AGGREGATION_STATE]: (state: AggregationState,\r\n action: actions.ClearAggregationState\r\n ): AggregationState => {\r\n return {\r\n ...state,\r\n ...INITIAL_STATE\r\n };\r\n },\r\n [ACTION.REQUEST_AGGREGATE_DEFAULT_FIELDS]: (state: AggregationState,\r\n action: actions.RequestAggregateDefaultFields\r\n ): AggregationState => {\r\n return {\r\n ...state,\r\n fetching: true\r\n };\r\n },\r\n [ACTION.RESPONSE_AGGREGATE_DEFAULT_FIELDS]: (state: AggregationState,\r\n action: actions.ResponseAggregateDefaultFields\r\n ): AggregationState => {\r\n return {\r\n ...state,\r\n fetching: false,\r\n initialized: true,\r\n defaultAggregateFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.UPDATE_DEFAULT_AGGREGATE_FIELDS]: (state: AggregationState,\r\n action: actions.UpdateAggregateDefaultFields\r\n ): AggregationState => {\r\n const { selectedAggregateField } = state;\r\n const choosedField = action.options.find(o => !!selectedAggregateField && o.value === selectedAggregateField.field.value);\r\n const updatedSelectedAggregateField = !!choosedField\r\n ? selectedAggregateField\r\n : undefined;\r\n\r\n return {\r\n ...state,\r\n selectedAggregateField: deepEquals(selectedAggregateField, updatedSelectedAggregateField)\r\n ? selectedAggregateField\r\n : updatedSelectedAggregateField,\r\n defaultAggregateFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.RESPONSE_AGGREGATE_FIELDS]: (state: AggregationState,\r\n action: actions.ResponseAggregateFields\r\n ): AggregationState => {\r\n return {\r\n ...state,\r\n additionalAggregateFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.SET_AGGREGATE_FIELD]: (state: AggregationState,\r\n action: actions.SetAggregateField\r\n ): AggregationState => {\r\n return {\r\n ...state,\r\n selectedAggregateField: action.selectedFieldItem\r\n };\r\n },\r\n [ACTION.REMOVE_AGGREGATE_FIELD]: (state: AggregationState,\r\n action: actions.RemoveAggregateField\r\n ): AggregationState => {\r\n return {\r\n ...state,\r\n selectedAggregateField: undefined\r\n };\r\n },\r\n [ACTION.SET_AGGREGATE_FUNCTION]: (state: AggregationState,\r\n action: actions.SetAggregateFunction\r\n ): AggregationState => {\r\n return {\r\n ...state,\r\n selectedAggregateField: !!action.selectedAggregateItem ? {\r\n ...state.selectedAggregateField,\r\n value: action.selectedAggregateItem\r\n } : undefined\r\n };\r\n }\r\n};\r\n\r\nexport const aggregationReducer = (state: AggregationState = INITIAL_STATE, action: any) => {\r\n const r = aggregationReducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { SelectItem } from '../../types';\r\nimport { SelectedField } from './types-fields';\r\n\r\nexport const ACTION = {\r\n CLEAR_DISTRIBUTION_STATE: 'SELECTION_REPORT:CLEAR_DISTRIBUTION_STATE',\r\n REQUEST_DISTRIBUTION_FIELDS: 'SELECTION_REPORT:REQUEST_DISTRIBUTION_FIELDS',\r\n RESPONSE_DISTRIBUTION_FIELDS: 'SELECTION_REPORT:RESPONSE_DISTRIBUTION_FIELDS',\r\n REQUEST_METADATA: 'SELECTION_REPORT:REQUEST_METADATA',\r\n RESPONSE_METADATA: 'SELECTION_REPORT:RESPONSE_METADATA',\r\n REQUEST_DISTRIBUTION_DEFAULT_FIELDS: 'SELECTION_REPORT:REQUEST_DISTRIBUTION_DEFAULT_FIELDS',\r\n RESPONSE_DISTRIBUTION_DEFAULT_FIELDS: 'SELECTION_REPORT:RESPONSE_DISTRIBUTION_DEFAULT_FIELDS',\r\n UPDATE_DEFAULT_DISTRIBUTION_FIELDS: 'SELECTION_REPORT:UPDATE_DEFAULT_DISTRIBUTION_FIELDS',\r\n SET_DISTRIBUTION_FIELD: 'SELECTION_REPORT:SET_DISTRIBUTION_FIELD',\r\n REMOVE_DISTRIBUTION_FIELD: 'SELECTION_REPORT:REMOVE_DISTRIBUTION_FIELD'\r\n};\r\n\r\nexport class ClearDistributionState {\r\n public type: string = ACTION.CLEAR_DISTRIBUTION_STATE;\r\n} \r\nexport class RequestDistributionDefaultFields {\r\n public type: string = ACTION.REQUEST_DISTRIBUTION_DEFAULT_FIELDS;\r\n}\r\nexport class ResponseDistributionDefaultFields {\r\n public type: string = ACTION.RESPONSE_DISTRIBUTION_DEFAULT_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class RequestMetadata {\r\n public type: string = ACTION.REQUEST_METADATA;\r\n}\r\nexport class ResponseMetadata {\r\n public type: string = ACTION.RESPONSE_METADATA;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class UpdateDistributionDefaultFields {\r\n public type: string = ACTION.UPDATE_DEFAULT_DISTRIBUTION_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class ResponseDistributionFields {\r\n public type: string = ACTION.RESPONSE_DISTRIBUTION_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class SetDistributionField {\r\n public type: string = ACTION.SET_DISTRIBUTION_FIELD;\r\n constructor(public selectedValue: SelectedField) { }\r\n}\r\nexport class RemoveDistributionField {\r\n public type: string = ACTION.REMOVE_DISTRIBUTION_FIELD;\r\n}\r\n","\r\nimport { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { deepEquals } from '../../../../infrastructure/js';\r\nimport { DistributionState } from './types-store';\r\nimport { FieldItem } from '../../types';\r\n\r\nexport const INITIAL_STATE: DistributionState = {\r\n fetching: false,\r\n initialized: false,\r\n defaultFields: [],\r\n additionalFields: [],\r\n selectedField: undefined\r\n};\r\n\r\nconst distributionReducers: { [indexer: string]: Reducer<DistributionState> } = {\r\n [ACTION.CLEAR_DISTRIBUTION_STATE]: (state: DistributionState,\r\n action: actions.ClearDistributionState\r\n ): DistributionState => {\r\n return {\r\n ...state,\r\n ...INITIAL_STATE\r\n };\r\n },\r\n [ACTION.REQUEST_DISTRIBUTION_DEFAULT_FIELDS]: (state: DistributionState,\r\n action: actions.RequestDistributionDefaultFields\r\n ): DistributionState => {\r\n return {\r\n ...state,\r\n fetching: true\r\n };\r\n },\r\n [ACTION.RESPONSE_DISTRIBUTION_DEFAULT_FIELDS]: (state: DistributionState,\r\n action: actions.ResponseDistributionDefaultFields\r\n ): DistributionState => {\r\n return {\r\n ...state,\r\n fetching: false,\r\n initialized: true,\r\n defaultFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.UPDATE_DEFAULT_DISTRIBUTION_FIELDS]: (state: DistributionState,\r\n action: actions.UpdateDistributionDefaultFields\r\n ): DistributionState => {\r\n const { selectedField } = state;\r\n const choosedField = action.options.find(o => !!selectedField && o.value === selectedField.field.value);\r\n const updatedSelectedValue = !!choosedField\r\n ? selectedField\r\n : undefined;\r\n\r\n return {\r\n ...state,\r\n selectedField: deepEquals(selectedField, updatedSelectedValue)\r\n ? selectedField\r\n : updatedSelectedValue,\r\n defaultFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.RESPONSE_DISTRIBUTION_FIELDS]: (state: DistributionState,\r\n action: actions.ResponseDistributionFields\r\n ): DistributionState => {\r\n return {\r\n ...state,\r\n additionalFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.SET_DISTRIBUTION_FIELD]: (state: DistributionState,\r\n action: actions.SetDistributionField\r\n ): DistributionState => {\r\n return {\r\n ...state,\r\n selectedField: action.selectedValue\r\n };\r\n },\r\n [ACTION.REMOVE_DISTRIBUTION_FIELD]: (state: DistributionState,\r\n action: actions.RemoveDistributionField\r\n ): DistributionState => {\r\n return {\r\n ...state,\r\n selectedField: undefined\r\n };\r\n }\r\n};\r\n\r\nexport const distributionReducer = (state: DistributionState = INITIAL_STATE, action: any) => {\r\n const r = distributionReducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { SelectItem, FieldItem } from '../../types';\r\nimport { SelectionFieldItem } from './types-fields';\r\n\r\nexport const ACTION = {\r\n CLEAR_GROUP_BY_STATE: 'SELECTION_REPORT:CLEAR_GROUP_BY_STATE',\r\n REQUEST_GROUP_BY_FIELDS: 'SELECTION_REPORT:REQUEST_GROUP_BY_FIELDS',\r\n RESPONSE_GROUP_BY_FIELDS: 'SELECTION_REPORT:RESPONSE_GROUP_BY_FIELDS',\r\n REQUEST_GROUP_BY_DEFAULT_FIELDS: 'SELECTION_REPORT:REQUEST_GROUP_BY_DEFAULT_FIELDS',\r\n RESPONSE_GROUP_BY_DEFAULT_FIELDS: 'SELECTION_REPORT:RESPONSE_GROUP_BY_DEFAULT_FIELDS',\r\n UPDATE_DEFAULT_GROUP_BY_FIELDS: 'SELECTION_REPORT:UPDATE_DEFAULT_GROUP_BY_FIELDS',\r\n REQUEST_GROUP_BY_SORT_ORDER_TYPE: 'SELECTION_REPORT:REQUEST_GROUP_BY_SORT_ORDER_TYPE',\r\n RESPONSE_GROUP_BY_SORT_ORDER_TYPE: 'SELECTION_REPORT:RESPONSE_GROUP_BY_SORT_ORDER_TYPE',\r\n REQUEST_GROUP_BY_SELECTIONS: 'SELECTION_REPORT:REQUEST_GROUP_BY_SELECTIONS',\r\n RESPONSE_GROUP_BY_SELECTIONS: 'SELECTION_REPORT:RESPONSE_GROUP_BY_SELECTIONS',\r\n MODIFY_GROUP_BY_SELECTIONS: 'SELECTION_REPORT:MODIFY_GROUP_BY_SELECTIONS'\r\n};\r\n\r\nexport class ClearGroupByState {\r\n public type: string = ACTION.CLEAR_GROUP_BY_STATE;\r\n}\r\nexport class RequestGroupByDefaultFields {\r\n public type: string = ACTION.REQUEST_GROUP_BY_DEFAULT_FIELDS;\r\n}\r\nexport class ResponseGroupByDefaultFields {\r\n public type: string = ACTION.RESPONSE_GROUP_BY_DEFAULT_FIELDS;\r\n constructor(public options: FieldItem[]) { }\r\n}\r\nexport class UpdateGroupByDefaultFields {\r\n public type: string = ACTION.UPDATE_DEFAULT_GROUP_BY_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class RequestGroupBySortOrderType {\r\n public type: string = ACTION.REQUEST_GROUP_BY_SORT_ORDER_TYPE;\r\n}\r\nexport class ResponseGroupBySortOrderType {\r\n public type: string = ACTION.RESPONSE_GROUP_BY_SORT_ORDER_TYPE;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class ResponseGroupByFields {\r\n public type: string = ACTION.RESPONSE_GROUP_BY_FIELDS;\r\n constructor(public options: FieldItem[]) { }\r\n}\r\nexport class RequestGroupBySelections {\r\n public type: string = ACTION.REQUEST_GROUP_BY_SELECTIONS;\r\n constructor(public selectedField: SelectionFieldItem) { }\r\n}\r\nexport class ResponseGroupBySelections {\r\n public type: string = ACTION.RESPONSE_GROUP_BY_SELECTIONS;\r\n constructor(public selectedField: SelectionFieldItem, public placeholderField: SelectionFieldItem) { }\r\n}\r\nexport class ModifyGroupBySelections {\r\n public type: string = ACTION.MODIFY_GROUP_BY_SELECTIONS;\r\n constructor(public selectedGroupByFields: SelectionFieldItem[]) { }\r\n}\r\n","import { SelectItem, FieldItem } from '../../types';\r\n\r\nexport interface SelectionValue {\r\n rollingAverage?: number;\r\n interval?: number;\r\n level?: SelectItem;\r\n category?: SelectItem;\r\n period?: SelectItem;\r\n type?: SelectionType;\r\n fillEmpty?: boolean;\r\n sortOrderType?: SelectItem;\r\n}\r\n\r\nexport interface SelectionItem {\r\n levels?: SelectItem[];\r\n categories?: SelectItem[];\r\n periods?: SelectItem[];\r\n type?: SelectionType;\r\n label?: string;\r\n defaultSelected?: boolean;\r\n showMissingValues?: boolean;\r\n}\r\n\r\nexport interface SelectionFieldItem {\r\n field: FieldItem;\r\n value?: SelectionValue;\r\n selections?: SelectionItem[];\r\n}\r\n\r\nexport enum SelectionType {\r\n NotSelected = 0,\r\n ActualValue = 1,\r\n Interval = 2,\r\n Period = 3,\r\n AggregateValue = 4,\r\n AggregateCategory = 5\r\n}\r\n","export const selectionReportId = 6;\r\nexport const frequencyReportId = 10;\r\n\r\nexport const defaultIntervalValue = 10;\r\n\r\nexport const adjustToFiltersOptionValue = 0;\r\n\r\nexport const reportLayoutTypeContext = 1;\r\n\r\nexport const selectionReportTranslations = {\r\n selection_report_extend_btn: 7741,\r\n aggregation_area_title: 7732,\r\n aggregation_field_info: 7733,\r\n aggregation_btn_open_dialog: 7734,\r\n aggregation_dialog_title: 3560,\r\n aggregation_done: 7338,\r\n aggregation_drag_n_drop: 7740,\r\n aggregation_remove: 7742,\r\n aggregation_options_not_found: 7644,\r\n aggregation_search: 7345,\r\n aggregation_how_to_aggregate: 7963,\r\n\r\n distribution_title: 7924,\r\n distribution_area_title: 7881,\r\n distribution_field_info: 7733,\r\n distribution_btn_open_dialog: 7734,\r\n distribution_dialog_title: 3560,\r\n distribution_done: 7338,\r\n distribution_drag_n_drop: 7740,\r\n distribution_remove: 7742,\r\n distribution_options_not_found: 7644,\r\n distribution_search: 7345,\r\n distribution_for_every: 7919,\r\n distribution_percent_inrease: 7920,\r\n\r\n group_by_title: 7923,\r\n group_by_area_title: 7736,\r\n group_by_btn_open_dialog: 7737,\r\n group_by_dialog_title: 3560,\r\n group_by_done: 7338,\r\n group_by_confirm: 7739,\r\n group_by_drag_n_drop_panel: 7740,\r\n group_by_remove: 7742,\r\n group_by_move_up: 7743,\r\n group_by_move_down: 7538,\r\n group_by_options_not_found: 7644,\r\n group_by_search: 7345,\r\n group_by_adjust_to_filters: 7751,\r\n group_by_level: 3619,\r\n group_by_rolling_average: 7815,\r\n group_by_show_missing_values: 7822,\r\n group_by_hide_missing_values: 7821,\r\n group_by_missing_values_are_included: 7820,\r\n group_by_interval_value_not_valid: 7951,\r\n group_by_limit_to_category: 7962,\r\n group_by_sort: 8032,\r\n\r\n target_title: 7925,\r\n target_area_title: 7763,\r\n target_btn_open_dialog: 7764,\r\n target_dialog_title: 3560,\r\n target_done: 7338,\r\n target_drag_n_drop: 7740,\r\n target_remove: 7742,\r\n target_options_not_found: 7644,\r\n target_search: 7345,\r\n\r\n toggle_info_description: 7759,\r\n toggle_info_subtitle: 7760,\r\n toggle_info_title: 7761,\r\n toggle_info_load_options: 7762, \r\n execute_failed_info_description: 8331,\r\n\r\n result_cannnot_be_displayed: 7789,\r\n choose_chart_type_limit_message_singular: 7791,\r\n choose_chart_type_limit_message_plural: 7790,\r\n\r\n // selection layout translations\r\n favourite_unsupported_presentation_type: 7478,\r\n favourite_not_present_type_favourite: 7483,\r\n chart_not_supported_type: 7484,\r\n no_search_result: 6778,\r\n show_details: 7640,\r\n hide_details: 7641,\r\n\r\n // layout attributes translations\r\n attribute_field_labels: 7984,\r\n attribute_quantities: 7983,\r\n attribute_groups: 7982,\r\n attribute_wide_layout: 7981,\r\n attribute_totals: 7980,\r\n attribute_suppress_repeating_rows: 7979,\r\n attribute_xAxis_labels_enabled: 8030,\r\n attribute_yAxis_labels_enabled: 8029,\r\n show_label: 7998\r\n};\r\n","import { SelectItem, FieldItem, DomainNode, FieldValue, SelectionTypeResult } from '../../types';\r\nimport { SelectionFieldItem, SelectionItem, SelectionValue, SelectionType } from './types-fields';\r\nimport { defaultIntervalValue } from 'app/area/reports/constants';\r\n\r\nconst generateLevelOptions = (maxLevel: number, textLevel: string, additionalLevel?: SelectItem) => {\r\n const result: SelectItem[] = [];\r\n if (!!additionalLevel) {\r\n result.push(additionalLevel);\r\n }\r\n for (let index = 1; index <= maxLevel; index++) {\r\n result.push({ value: index, description: `${textLevel} ${index}` });\r\n }\r\n return result;\r\n};\r\n\r\nexport const domainNodeToComplexType = (dn: DomainNode): FieldItem => {\r\n return {\r\n value: dn.domain,\r\n description: dn.label,\r\n descendants: !!dn.children ? dn.children.map(domainNodeToComplexType) : undefined\r\n };\r\n};\r\nexport const fieldValueToComplexType = (dn: FieldValue): SelectItem => {\r\n return {\r\n value: dn.v,\r\n description: dn.d,\r\n allowRollingAverage: dn.allowRollingAverage,\r\n rollingAverageDescription: dn.uom,\r\n descendants: !!dn.children ? dn.children.map(fieldValueToComplexType) : undefined\r\n } as SelectItem;\r\n};\r\n\r\nexport const mapSelectionType = (dn: SelectionTypeResult, textLevel: string, additionalLevel?: SelectItem): SelectionItem => {\r\n return {\r\n type: dn.type.v,\r\n label: dn.type.d,\r\n levels: !!dn.maxLevels ? generateLevelOptions(dn.maxLevels, textLevel, additionalLevel) : undefined,\r\n categories: !!dn.categories ? dn.categories.map(fieldValueToComplexType) : undefined,\r\n periods: !!dn.periods ? dn.periods.map(fieldValueToComplexType) : undefined,\r\n defaultSelected: dn.defaultSelected\r\n };\r\n};\r\n\r\nexport const fillOutGroupId = (fields: FieldItem[]) => {\r\n const sameValueIdCounter = {};\r\n\r\n fields.filter(f => !!f.groupId).forEach(f => {\r\n if (!!sameValueIdCounter[f.value]) {\r\n if (sameValueIdCounter[f.value] < f.groupId) {\r\n sameValueIdCounter[f.value] = f.groupId;\r\n }\r\n } else {\r\n sameValueIdCounter[f.value] = 1;\r\n }\r\n });\r\n\r\n return fields.map(f => {\r\n if (!f.groupId) {\r\n if (!!sameValueIdCounter[f.value]) {\r\n sameValueIdCounter[f.value] = sameValueIdCounter[f.value] + 1;\r\n } else {\r\n sameValueIdCounter[f.value] = 1;\r\n }\r\n return {\r\n ...f,\r\n groupId: sameValueIdCounter[f.value]\r\n };\r\n } else {\r\n return f;\r\n }\r\n });\r\n};\r\n\r\nexport const getDefaultField = (selectedFields: SelectionFieldItem[], fields: FieldItem[], addingField: FieldItem) => {\r\n const fieldSelected = (field: FieldItem) => {\r\n return selectedFields.some(f => f.field.value === field.value && f.field.groupId === field.groupId);\r\n };\r\n if (!!addingField.groupId) {\r\n return fields.find(f =>\r\n f.value === addingField.value\r\n && f.groupId === addingField.groupId\r\n );\r\n } else {\r\n return fields.find(f =>\r\n f.value === addingField.value\r\n && !fieldSelected(f)\r\n );\r\n }\r\n};\r\n\r\nexport const setDefaultValue = (selections: SelectionItem[]): SelectionValue => {\r\n const defaultSelection = selections.find(s => s.defaultSelected);\r\n\r\n if (!defaultSelection) {\r\n return {\r\n type: selections[0].type\r\n };\r\n }\r\n\r\n return {\r\n type: defaultSelection.type,\r\n period: defaultSelection.periods && !!defaultSelection.periods.length && defaultSelection.periods[0],\r\n level: defaultSelection.levels && defaultSelection.levels.length ? defaultSelection.levels[0] : undefined,\r\n category: defaultSelection.categories && defaultSelection.categories.length ? defaultSelection.categories[0] : undefined,\r\n interval: defaultSelection.type===SelectionType.Interval ? defaultIntervalValue : undefined\r\n };\r\n};\r\n","\r\nimport { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { fillOutGroupId } from './actions.mapper';\r\nimport { GroupByFieldState } from './types-store';\r\nimport { FieldItem } from '../../types';\r\n\r\nexport const INITIAL_STATE: GroupByFieldState = {\r\n fetching: false,\r\n initialized: false,\r\n defaultGroupByFields: [],\r\n additionalGroupByFields: [],\r\n selectedGroupByFields: [],\r\n sortOrderTypes: []\r\n};\r\n\r\nconst groupByReducers: { [indexer: string]: Reducer<GroupByFieldState> } = {\r\n [ACTION.CLEAR_GROUP_BY_STATE]: (state: GroupByFieldState,\r\n action: actions.ClearGroupByState\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n ...INITIAL_STATE\r\n };\r\n },\r\n [ACTION.REQUEST_GROUP_BY_DEFAULT_FIELDS]: (state: GroupByFieldState,\r\n action: actions.RequestGroupByDefaultFields\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n fetching: true\r\n };\r\n },\r\n [ACTION.RESPONSE_GROUP_BY_DEFAULT_FIELDS]: (state: GroupByFieldState,\r\n action: actions.ResponseGroupByDefaultFields\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n fetching: false,\r\n initialized: true,\r\n defaultGroupByFields: fillOutGroupId(action.options)\r\n };\r\n },\r\n [ACTION.UPDATE_DEFAULT_GROUP_BY_FIELDS]: (state: GroupByFieldState,\r\n action: actions.UpdateGroupByDefaultFields\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n defaultGroupByFields: fillOutGroupId(action.options as FieldItem[])\r\n };\r\n },\r\n [ACTION.REQUEST_GROUP_BY_SORT_ORDER_TYPE]: (state: GroupByFieldState,\r\n action: actions.RequestGroupBySortOrderType\r\n ): GroupByFieldState => {\r\n return state;\r\n },\r\n [ACTION.RESPONSE_GROUP_BY_SORT_ORDER_TYPE]: (state: GroupByFieldState,\r\n action: actions.ResponseGroupBySortOrderType\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n sortOrderTypes: action.options\r\n };\r\n },\r\n [ACTION.RESPONSE_GROUP_BY_FIELDS]: (state: GroupByFieldState,\r\n action: actions.ResponseGroupByFields\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n additionalGroupByFields: action.options\r\n };\r\n },\r\n [ACTION.REQUEST_GROUP_BY_SELECTIONS]: (state: GroupByFieldState,\r\n action: actions.RequestGroupBySelections\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n fetching: true,\r\n selectedGroupByFields: [...state.selectedGroupByFields, action.selectedField]\r\n };\r\n },\r\n [ACTION.RESPONSE_GROUP_BY_SELECTIONS]: (state: GroupByFieldState,\r\n action: actions.ResponseGroupBySelections\r\n ): GroupByFieldState => {\r\n\r\n return {\r\n ...state,\r\n fetching: false,\r\n selectedGroupByFields: state.selectedGroupByFields.map(field => field !== action.placeholderField\r\n ? field\r\n : action.selectedField)\r\n };\r\n },\r\n [ACTION.MODIFY_GROUP_BY_SELECTIONS]: (state: GroupByFieldState,\r\n action: actions.ModifyGroupBySelections\r\n ): GroupByFieldState => {\r\n return {\r\n ...state,\r\n selectedGroupByFields: action.selectedGroupByFields\r\n };\r\n }\r\n};\r\n\r\nexport const groupByReducer = (state: GroupByFieldState = INITIAL_STATE, action: any) => {\r\n const r = groupByReducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { SelectItem, FieldItem } from '../../types';\r\n\r\nexport const ACTION = {\r\n CLEAR_TARGET_STATE: 'SELECTION_REPORT:CLEAR_TARGET_STATE',\r\n REQUEST_TARGET_FIELDS: 'SELECTION_REPORT:REQUEST_TARGET_FIELDS',\r\n RESPONSE_TARGET_FIELDS: 'SELECTION_REPORT:RESPONSE_TARGET_FIELDS',\r\n REQUEST_TARGET_DEFAULT_FIELDS: 'SELECTION_REPORT:REQUEST_TARGET_DEFAULT_FIELDS',\r\n RESPONSE_TARGET_DEFAULT_FIELDS: 'SELECTION_REPORT:RESPONSE_TARGET_DEFAULT_FIELDS',\r\n UPDATE_DEFAULT_TARGET_FIELDS: 'SELECTION_REPORT:UPDATE_DEFAULT_TARGET_FIELDS',\r\n SET_TARGET_FIELD: 'SELECTION_REPORT:SET_TARGET_FIELD',\r\n REMOVE_TARGET_FIELD: 'SELECTION_REPORT:REMOVE_TARGET_FIELD'\r\n};\r\n\r\nexport class ClearTargetState {\r\n public type: string = ACTION.CLEAR_TARGET_STATE;\r\n} \r\nexport class RequestTargetDefaultFields {\r\n public type: string = ACTION.REQUEST_TARGET_DEFAULT_FIELDS;\r\n}\r\nexport class ResponseTargetDefaultFields {\r\n public type: string = ACTION.RESPONSE_TARGET_DEFAULT_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class UpdateTargetDefaultFields {\r\n public type: string = ACTION.UPDATE_DEFAULT_TARGET_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class ResponseTargetFields {\r\n public type: string = ACTION.RESPONSE_TARGET_FIELDS;\r\n constructor(public options: SelectItem[]) { }\r\n}\r\nexport class SetTargetField {\r\n public type: string = ACTION.SET_TARGET_FIELD;\r\n constructor(public selectedValue: FieldItem) { }\r\n}\r\nexport class RemoveTargetField {\r\n public type: string = ACTION.REMOVE_TARGET_FIELD;\r\n}\r\n","\r\nimport { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { deepEquals } from '../../../../infrastructure/js';\r\nimport { TargetState } from './types-store';\r\nimport { FieldItem } from '../../types';\r\n\r\nexport const INITIAL_STATE: TargetState = {\r\n fetching: false,\r\n initialized: false,\r\n defaultFields: [],\r\n additionalFields: [],\r\n selectedField: undefined\r\n};\r\n\r\nconst targetReducers: { [indexer: string]: Reducer<TargetState> } = {\r\n [ACTION.CLEAR_TARGET_STATE]: (state: TargetState,\r\n action: actions.ClearTargetState\r\n ): TargetState => {\r\n return {\r\n ...state,\r\n ...INITIAL_STATE\r\n };\r\n },\r\n [ACTION.REQUEST_TARGET_DEFAULT_FIELDS]: (state: TargetState,\r\n action: actions.RequestTargetDefaultFields\r\n ): TargetState => {\r\n return {\r\n ...state,\r\n fetching: true\r\n };\r\n },\r\n [ACTION.RESPONSE_TARGET_DEFAULT_FIELDS]: (state: TargetState,\r\n action: actions.ResponseTargetDefaultFields\r\n ): TargetState => {\r\n return {\r\n ...state,\r\n fetching: false,\r\n initialized: true,\r\n defaultFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.UPDATE_DEFAULT_TARGET_FIELDS]: (state: TargetState,\r\n action: actions.UpdateTargetDefaultFields\r\n ): TargetState => {\r\n const { selectedField } = state;\r\n const choosedField = action.options.find(o => !!selectedField && o.value === selectedField.value);\r\n const updatedSelectedValue = !!choosedField\r\n ? selectedField\r\n : undefined;\r\n\r\n return {\r\n ...state,\r\n selectedField: deepEquals(selectedField, updatedSelectedValue)\r\n ? selectedField\r\n : updatedSelectedValue,\r\n defaultFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.RESPONSE_TARGET_FIELDS]: (state: TargetState,\r\n action: actions.ResponseTargetFields\r\n ): TargetState => {\r\n return {\r\n ...state,\r\n additionalFields: action.options as FieldItem[]\r\n };\r\n },\r\n [ACTION.SET_TARGET_FIELD]: (state: TargetState,\r\n action: actions.SetTargetField\r\n ): TargetState => {\r\n return {\r\n ...state,\r\n selectedField: action.selectedValue\r\n };\r\n },\r\n [ACTION.REMOVE_TARGET_FIELD]: (state: TargetState,\r\n action: actions.RemoveTargetField\r\n ): TargetState => {\r\n return {\r\n ...state,\r\n selectedField: undefined\r\n };\r\n }\r\n};\r\n\r\nexport const targetReducer = (state: TargetState = INITIAL_STATE, action: any) => {\r\n const r = targetReducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { FavouriteLayoutModel } from 'app/types-shared';\r\nimport { LayoutType } from './types-store';\r\nimport { FavouriteDataModel } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\n\r\nexport const ACTION = {\r\n CLEAR_SELECTION_REPORT_STATE: 'SELECTION_REPORT:CLEAR_STATE',\r\n INITIALIZATION_DATA_START: 'SELECTION_REPORT:INITIALIZATION_DATA_START',\r\n INITIALIZATION_DATA_END: 'SELECTION_REPORT:INITIALIZATION_DATA_END',\r\n FECHING_EXECUTE_START: 'SELECTION_REPORT:FECHING_EXECUTE_START',\r\n FECHING_EXECUTE_END: 'SELECTION_REPORT:FECHING_EXECUTE_END',\r\n REQUEST_LAYOUT_TYPES: 'SELECTION_REPORT:REQUEST_LAYOUT_TYPES',\r\n RESPONSE_LAYOUT_TYPES: 'SELECTION_REPORT:RESPONSE_LAYOUT_TYPES',\r\n FAVOURITE_NOT_VALID: 'SELECTION_REPORT:FAVOURITE_NOT_VALID',\r\n REQUEST_EXECUTE_FAVOURITE: 'SELECTION_REPORT:REQUEST_EXECUTE_FAVOURITE',\r\n RESPONE_EXECUTE_FAVOURITE: 'SELECTION_REPORT:RESPONE_EXECUTE_FAVOURITE',\r\n FAIL_EXECUTE_FAVOURITE: 'SELECTION_REPORT:FAIL_EXECUTE_FAVOURITE',\r\n SET_LAYOUT_TYPE: 'SELECTION_REPORT:SET_LAYOUT_TYPE'\r\n};\r\n\r\n//#region General\r\nexport class ClearSelectionReportState {\r\n public type: string = ACTION.CLEAR_SELECTION_REPORT_STATE;\r\n}\r\nexport class InitializationDataStart {\r\n public type: string = ACTION.INITIALIZATION_DATA_START;\r\n}\r\nexport class InitializationDataEnd {\r\n public type: string = ACTION.INITIALIZATION_DATA_END;\r\n}\r\nexport class FetchingExecuteStart {\r\n public type: string = ACTION.FECHING_EXECUTE_START;\r\n}\r\nexport class FetchingExecuteEnd {\r\n public type: string = ACTION.FECHING_EXECUTE_END;\r\n}\r\nexport class SetLayoutType {\r\n public type: string = ACTION.SET_LAYOUT_TYPE;\r\n constructor(public layoutType: number) { }\r\n}\r\nexport class RequestLayoutTypes {\r\n public type: string = ACTION.REQUEST_LAYOUT_TYPES;\r\n}\r\nexport class ResponseLayoutTypes {\r\n public type: string = ACTION.RESPONSE_LAYOUT_TYPES;\r\n constructor(public data: LayoutType[]) { }\r\n}\r\nexport class FavouriteNotValid {\r\n public type: string = ACTION.FAVOURITE_NOT_VALID;\r\n}\r\nexport class RequestExecuteFavourite {\r\n public type: string = ACTION.REQUEST_EXECUTE_FAVOURITE;\r\n}\r\nexport class ReceiveExecuteFavourite {\r\n public type: string = ACTION.RESPONE_EXECUTE_FAVOURITE;\r\n constructor(public data: FavouriteDataModel, public layout: FavouriteLayoutModel, public requestId: number) { }\r\n}\r\nexport class FailExecuteFavourite {\r\n public type: string = ACTION.FAIL_EXECUTE_FAVOURITE; \r\n\r\n constructor(public errorsExecuteFailed: string[]) { \r\n this.errorsExecuteFailed = errorsExecuteFailed;\r\n }\r\n}\r\n//#endregion General\r\n","\r\nimport { Reducer } from 'redux';\r\nimport { ACTION, RequestExecuteFavourite, ReceiveExecuteFavourite, FailExecuteFavourite } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { ChartState } from './types-store';\r\n\r\nexport const INITIAL_STATE: ChartState = {\r\n favouriteValid: true,\r\n\r\n layoutTypes: undefined,\r\n selectedLayoutType: undefined,\r\n selectionReport: undefined,\r\n selectionReportLayout: undefined,\r\n\r\n initializationStart: false,\r\n initializationEnd: false,\r\n initiallyExecuted: false,\r\n fetchingExecute: false,\r\n executeRequestId: 0,\r\n executeFailed: false,\r\n errorsExecuteFailed: undefined\r\n};\r\n\r\nconst chartReducers: { [indexer: string]: Reducer<ChartState> } = {\r\n //#region General\r\n [ACTION.CLEAR_SELECTION_REPORT_STATE]: (state: ChartState,\r\n action: actions.ClearSelectionReportState\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n ...INITIAL_STATE\r\n };\r\n },\r\n [ACTION.INITIALIZATION_DATA_START]: (state: ChartState,\r\n action: actions.InitializationDataStart\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n initializationStart: true\r\n };\r\n },\r\n [ACTION.INITIALIZATION_DATA_END]: (state: ChartState,\r\n action: actions.InitializationDataEnd\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n initializationEnd: true\r\n };\r\n },\r\n [ACTION.FECHING_EXECUTE_START]: (state: ChartState,\r\n action: actions.FetchingExecuteStart\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n executeFailed: false,\r\n fetchingExecute: true\r\n };\r\n },\r\n [ACTION.FECHING_EXECUTE_END]: (state: ChartState,\r\n action: actions.FetchingExecuteEnd\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n fetchingExecute: false,\r\n selectionReport: undefined\r\n };\r\n },\r\n [ACTION.SET_LAYOUT_TYPE]: (state: ChartState,\r\n action: actions.SetLayoutType\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n selectedLayoutType: action.layoutType,\r\n selectionReportLayout: undefined\r\n };\r\n },\r\n [ACTION.REQUEST_LAYOUT_TYPES]: (state: ChartState,\r\n action: actions.RequestLayoutTypes\r\n ): ChartState => {\r\n return {\r\n ...state\r\n };\r\n },\r\n [ACTION.RESPONSE_LAYOUT_TYPES]: (state: ChartState,\r\n action: actions.ResponseLayoutTypes\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n layoutTypes: action.data\r\n };\r\n },\r\n [ACTION.FAVOURITE_NOT_VALID]: (state: ChartState,\r\n action: actions.FavouriteNotValid\r\n ): ChartState => {\r\n return {\r\n ...state,\r\n favouriteValid: false,\r\n fetchingExecute: false,\r\n selectionReport: undefined\r\n };\r\n },\r\n /**\r\n * Run when starting fetching data for a case report favourite.\r\n */\r\n [ACTION.REQUEST_EXECUTE_FAVOURITE]: (state: ChartState,\r\n action: RequestExecuteFavourite): ChartState => {\r\n\r\n return {\r\n ...state,\r\n favouriteValid: true,\r\n executeFailed: false,\r\n initiallyExecuted: true,\r\n fetchingExecute: true,\r\n executeRequestId: state.executeRequestId + 1\r\n };\r\n },\r\n\r\n /**\r\n * Run when finished fetching data for case report favourite.\r\n */\r\n [ACTION.RESPONE_EXECUTE_FAVOURITE]: (state: ChartState,\r\n action: ReceiveExecuteFavourite): ChartState => {\r\n\r\n if (action.requestId === state.executeRequestId) {\r\n return {\r\n ...state,\r\n fetchingExecute: false,\r\n selectionReport: action.data,\r\n selectionReportLayout: action.layout,\r\n errorsExecuteFailed: undefined\r\n };\r\n }\r\n return state;\r\n },\r\n\r\n [ACTION.FAIL_EXECUTE_FAVOURITE]: (state: ChartState,\r\n action: FailExecuteFavourite): ChartState => {\r\n\r\n return {\r\n ...state,\r\n fetchingExecute: false,\r\n executeFailed: true,\r\n selectionReport: undefined,\r\n selectionReportLayout: undefined,\r\n errorsExecuteFailed: action.errorsExecuteFailed \r\n };\r\n }\r\n //#endregion\r\n};\r\n\r\nexport const chartReducer: Reducer<ChartState> = (state: ChartState = INITIAL_STATE, action: any) => {\r\n const r = chartReducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { Reducer } from 'redux';\r\n\r\n/**\r\n * Works like redux.combineReducers, but does not affect other properties on root level like `texts`\r\n * @param reducers An object whose values correspond to different reducer functions that need to be combined into one\r\n */\r\nexport const mergeReducers = <T extends object>(reducers: { [key: string]: Reducer<any> }): Reducer<T> =>\r\n (state: T, action: any) =>\r\n Object.keys(reducers).reduce((currentRootState: object, key) => {\r\n const previousBranchState = (!!state && state[key]) || undefined;\r\n const currentBranchState = reducers[key](previousBranchState, action);\r\n return currentBranchState === previousBranchState\r\n ? currentRootState\r\n : {\r\n ...currentRootState,\r\n [key]: currentBranchState\r\n };\r\n }, state) as T;\r\n","\r\nimport { Reducer } from 'redux';\r\nimport { mergeReducers } from 'app/infrastructure/redux/merge-reducers';\r\nimport { SelectionReportState } from './types-store';\r\nimport { aggregationReducer, INITIAL_STATE as aggregateFieldState } from './containers/aggregation/reducers';\r\nimport { distributionReducer, INITIAL_STATE as distributionFieldState } from './containers/distribution/reducers';\r\nimport { groupByReducer, INITIAL_STATE as groupByFieldState } from './containers/group-by/reducers';\r\nimport { targetReducer, INITIAL_STATE as targetFieldState } from './containers/target/reducers';\r\nimport { chartReducer, INITIAL_STATE as chartState } from './containers/chart/reducers';\r\n\r\nexport const INITIAL_STATE: SelectionReportState = {\r\n aggregateFieldState,\r\n distributionFieldState,\r\n groupByFieldState,\r\n targetFieldState,\r\n chartState,\r\n texts: undefined\r\n};\r\n\r\nexport const reducer: Reducer<SelectionReportState> = mergeReducers({\r\n aggregateFieldState: aggregationReducer,\r\n distributionFieldState: distributionReducer,\r\n groupByFieldState: groupByReducer,\r\n targetFieldState: targetReducer,\r\n chartState: chartReducer\r\n});\r\n","export const ACTION = {\r\n VALIDATION_CHANGE: 'PROFILE:VALIDATION_CHANGE'\r\n};\r\n\r\nexport class ValidationChange {\r\n\r\n public type: string = ACTION.VALIDATION_CHANGE;\r\n public validation: any;\r\n\r\n constructor(validation: any) {\r\n this.validation = validation;\r\n }\r\n}\r\n","import { ValueToStoreData, SimpleFormSerialize } from './types';\r\nimport { FIELD_TYPE } from './field-types';\r\nimport { SimpleFormValidationProp } from 'app/infrastructure/simple-form/validation/types';\r\n\r\nexport const ACTION: any = {\r\n VALUE_CHANGE: 'SIMPLE_FIELD:VALUE_CHANGE',\r\n LOAD_CODES: 'SIMPLE_FIELD:REQUEST_CODETABLE',\r\n LOAD_CODES_OK: 'SIMPLE_FIELD:RECEIVE_CODETABLE',\r\n LOAD_CODES_FAIL: 'SIMPLE_FIELD:FAIL_CODETABLE',\r\n INSERT_VALUE_TO_STORE: 'SIMPLE_FIELD:INSERT_VALUE_TO_STORE',\r\n INSERT_COMPONENT_DATA_TO_STORE: 'SIMPLE_FIELD:INSERT_COMPONENT_DATA_TO_STORE',\r\n CLEAR_VALUE_IN_STORE: 'SIMPLE_FIELD:CLEAR_VALUE_IN_STORE',\r\n VALIDATION_CHANGE: 'SIMPLE_FIELD:VALIDATION_CHANGE',\r\n RESET_CHANGES_LISTENER: 'SIMPLE_FIELD:RESET_CHANGES_LISTENER',\r\n CLEAR_ALL_VALUES: 'SIMPLE_FIELD:CLEAR_ALL_VALUES'\r\n};\r\n\r\nexport class ValueChange {\r\n public path: string;\r\n public type: string = ACTION.VALUE_CHANGE;\r\n public context: any;\r\n public value: any;\r\n\r\n constructor(path: string, componentContext: any, newValue: any) {\r\n this.context = componentContext;\r\n this.value = newValue;\r\n this.path = path;\r\n }\r\n}\r\n\r\nexport class RequestCodetable {\r\n public path: string;\r\n public type: string = ACTION.LOAD_CODES;\r\n public context: string;\r\n\r\n constructor(path: string, context: string) {\r\n this.path = path;\r\n this.context = context;\r\n }\r\n}\r\n\r\nexport class ReceiveCodetable {\r\n public path: string;\r\n public type: string = ACTION.LOAD_CODES_OK;\r\n public data: any;\r\n public context: string;\r\n public condition: any;\r\n\r\n constructor(path: string, context: string, loadCondition: any, data?: any) {\r\n this.path = path;\r\n this.data = data;\r\n this.context = context;\r\n this.condition = loadCondition;\r\n }\r\n}\r\n\r\nexport class FailCodetable {\r\n public path: string;\r\n public type: string = ACTION.LOAD_CODES_FAIL;\r\n public context: string;\r\n\r\n constructor(path: string, context: string) {\r\n this.path = path;\r\n this.context = context;\r\n }\r\n}\r\n\r\nexport class InsertValueToStore {\r\n public output: ValueToStoreData;\r\n public path: string;\r\n public type: string = ACTION.INSERT_VALUE_TO_STORE;\r\n constructor(path: string, output: any) {\r\n this.path = path;\r\n this.output = output;\r\n\r\n }\r\n}\r\n\r\nexport class InsertComponentDataToStore {\r\n public componentName: string;\r\n public componentType: FIELD_TYPE;\r\n public serialize: SimpleFormSerialize;\r\n public validationProps: SimpleFormValidationProp[];\r\n public path: string;\r\n public type: string = ACTION.INSERT_COMPONENT_DATA_TO_STORE;\r\n constructor(path: string, componentName: string, componentType: FIELD_TYPE,\r\n serialize: SimpleFormSerialize, validationProps: SimpleFormValidationProp[]) {\r\n this.path = path;\r\n this.componentName = componentName;\r\n this.componentType = componentType;\r\n this.serialize = serialize;\r\n this.validationProps = validationProps;\r\n }\r\n}\r\n\r\nexport class ClearValueInStore {\r\n public type: string = ACTION.CLEAR_VALUE_IN_STORE;\r\n public path: string;\r\n public componentName: string;\r\n constructor(path: string, componentName: string) {\r\n this.path = path;\r\n this.componentName = componentName;\r\n }\r\n}\r\n\r\nexport class ResetChangesListener {\r\n public type: string = ACTION.RESET_CHANGES_LISTENER;\r\n public path: string;\r\n constructor(path: string) {\r\n this.path = path;\r\n }\r\n}\r\nexport class ClearAllValues {\r\n public type: string = ACTION.CLEAR_ALL_VALUES;\r\n public path: string;\r\n constructor(path: string) {\r\n this.path = path;\r\n }\r\n}\r\n\r\nexport class ValidationChange {\r\n public type: string = ACTION.VALIDATION_CHANGE;\r\n public path: string;\r\n public validation: any;\r\n\r\n constructor(path: string, validation: any) {\r\n this.path = path;\r\n this.validation = validation;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { ACTION, RequestCodetable, ReceiveCodetable, ValueChange, FailCodetable, InsertComponentDataToStore } from './action-types';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { SimpleFormState } from './types';\r\n\r\nexport const INITIAL_SIMPLEFORM_STATE: any = {\r\n simpleForm: {\r\n tempdata: {},\r\n editing: {\r\n values: null,\r\n persistedValues: null,\r\n hasChanges: false\r\n },\r\n componentData: {\r\n }\r\n }\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<SimpleFormState> } = {\r\n\r\n /**\r\n * Run when a component wants codetable data\r\n */\r\n [ACTION.LOAD_CODES]: (state: SimpleFormState, action: RequestCodetable): SimpleFormState => {\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n tempdata: {\r\n ...state.simpleForm.tempdata,\r\n ...{\r\n [action.context]: {\r\n ...state.simpleForm.tempdata[action.context],\r\n fetching: true\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component receives its code data\r\n */\r\n [ACTION.LOAD_CODES_OK]: (state: SimpleFormState, action: ReceiveCodetable): SimpleFormState => {\r\n const codes = action.data && action.data.map(codeItemToStoreValue);\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n tempdata: {\r\n ...state.simpleForm.tempdata,\r\n ...{\r\n [action.context]: {\r\n data: codes,\r\n args: action.condition,\r\n fetching: false\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component fails to download codetable data\r\n */\r\n [ACTION.LOAD_CODES_FAIL]: (state: SimpleFormState, action: FailCodetable): SimpleFormState => {\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n tempdata: {\r\n ...state.simpleForm.tempdata,\r\n ...{\r\n [action.context]: {\r\n data: undefined,\r\n args: undefined,\r\n fetching: false\r\n }\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component fires a onChange event\r\n */\r\n [ACTION.VALUE_CHANGE]: (state: SimpleFormState, action: ValueChange): SimpleFormState => {\r\n const value = action.value;\r\n const currentEditing = state.simpleForm.editing;\r\n const currentValues = {\r\n ...currentEditing.values,\r\n [action.context]: {\r\n value\r\n }\r\n };\r\n\r\n const modified = !deepEquals(currentValues, currentEditing.persistedValues);\r\n\r\n const newValues = { ...state.simpleForm.editing.values, [action.context]: { value } };\r\n\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n editing: {\r\n ...state.simpleForm.editing,\r\n values: newValues,\r\n hasChanges: modified\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component saves data to form-compatible format\r\n */\r\n [ACTION.INSERT_VALUE_TO_STORE]: (state: SimpleFormState, action: any): SimpleFormState => {\r\n\r\n const currentValidation = state.simpleForm.editing.validation || {};\r\n\r\n // filter outs validation for added fields\r\n const validation = Object.keys(currentValidation).reduce((memo, key) =>\r\n currentValidation[key] && action.output[key]\r\n ? memo\r\n : {\r\n ...memo,\r\n [key]: currentValidation[key]\r\n }\r\n , {});\r\n\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n editing: {\r\n ...state.simpleForm.editing,\r\n values: { ...state.simpleForm.editing.values, ...action.output },\r\n persistedValues: { ...state.simpleForm.editing.persistedValues, ...action.output },\r\n validation\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run during initialization. Used to keep data about components in store.\r\n */\r\n [ACTION.INSERT_COMPONENT_DATA_TO_STORE]: (state: SimpleFormState, action: InsertComponentDataToStore): SimpleFormState => {\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n componentData: {\r\n ...state.simpleForm.componentData,\r\n [action.componentName]: {\r\n componentType: action.componentType,\r\n serialize: action.serialize,\r\n validationProps: action.validationProps\r\n }\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_VALUE_IN_STORE]: (state: SimpleFormState, action: any): SimpleFormState => {\r\n if (!state.simpleForm || !state.simpleForm.editing || !state.simpleForm.editing.values) {\r\n return state;\r\n }\r\n\r\n const { [action.componentName]: _, ...values } = state.simpleForm.editing.values;\r\n const { [action.componentName]: __, ...componentData } = state.simpleForm.componentData;\r\n const { [action.componentName]: ___, ...persistedValues } = state.simpleForm.editing.persistedValues;\r\n\r\n const modified = !deepEquals(values, persistedValues);\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n editing: {\r\n ...state.simpleForm.editing,\r\n values,\r\n persistedValues,\r\n hasChanges: modified\r\n },\r\n componentData\r\n }\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_ALL_VALUES]: (state: SimpleFormState, action: any): SimpleFormState => {\r\n return {\r\n ...state,\r\n ...INITIAL_SIMPLEFORM_STATE\r\n };\r\n },\r\n\r\n [ACTION.RESET_CHANGES_LISTENER]: (state: SimpleFormState, action: any): SimpleFormState => {\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n editing: {\r\n ...state.simpleForm.editing,\r\n hasChanges: false\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.VALIDATION_CHANGE]: (state: SimpleFormState, action: any): SimpleFormState => {\r\n return {\r\n ...state,\r\n simpleForm: {\r\n ...state.simpleForm,\r\n editing: {\r\n ...state.simpleForm.editing,\r\n validation: action.validation\r\n }\r\n }\r\n };\r\n }\r\n\r\n};\r\n\r\nexport const reducer: any = (path: string) => (state: SimpleFormState = INITIAL_SIMPLEFORM_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (action.path === path && r && r(state, action)) || state;\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { ACTION, ValidationChange } from './action-types';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport { SimpleFormAreaState } from 'app/infrastructure/simple-form/types';\r\nimport { TextCollection } from 'app/types-shared';\r\n\r\nexport interface ProfileState {\r\n texts: TextCollection;\r\n simpleForm?: SimpleFormAreaState;\r\n validation: any;\r\n}\r\n\r\nexport const INITIAL_SETTINGS_STATE: any = {\r\n validation: {},\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nexport const reducers: { [indexer: string]: Reducer<ProfileState> } = {\r\n\r\n /**\r\n * Run when a component recieve validation data\r\n */\r\n [ACTION.VALIDATION_CHANGE]: (state: ProfileState, action: ValidationChange): ProfileState => {\r\n\r\n return {\r\n ...state,\r\n validation: action.validation\r\n };\r\n }\r\n\r\n};\r\n\r\nexport const reducer: Reducer<ProfileState> = (state: ProfileState = INITIAL_SETTINGS_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.userSettings)(state, action);\r\n};\r\n","import { OptionsCodes, OptionsAction } from './types';\r\n\r\nexport const ACTION = {\r\n REQUEST_CODETABLE: 'OPTIONS:REQUEST_CODETABLE',\r\n RECEIVE_CODETABLE: 'OPTIONS:RECEIVE_CODETABLE',\r\n FAIL_CODETABLE: 'OPTIONS:FAIL_CODETABLE'\r\n};\r\n\r\nexport class RequestCodetable implements OptionsAction {\r\n public type: string = ACTION.REQUEST_CODETABLE;\r\n constructor(public path: string, public id: string, public query: string) {\r\n }\r\n}\r\n\r\nexport class ReceiveCodetable implements OptionsAction {\r\n public type: string = ACTION.RECEIVE_CODETABLE;\r\n\r\n constructor(public path: string, public id: string, public query: string, public values: OptionsCodes) {\r\n }\r\n}\r\n\r\nexport class FailCodetable implements OptionsAction {\r\n public type: string = ACTION.FAIL_CODETABLE;\r\n\r\n constructor(public path: string, public id: string, public query: string) {\r\n }\r\n}\r\n","import { Reducer, AnyAction } from 'redux';\r\nimport { ACTION, RequestCodetable, ReceiveCodetable, FailCodetable } from './action-types';\r\nimport { OptionsState } from './types';\r\n\r\nconst reducers: { [indexer: string]: Reducer<OptionsState> } = {\r\n\r\n /**\r\n * Run when a component wants codetable data\r\n */\r\n [ACTION.REQUEST_CODETABLE]: (state: OptionsState, action: RequestCodetable): OptionsState => {\r\n return {\r\n ...state,\r\n options: {\r\n ...(state.options || {}),\r\n [action.id]: {\r\n query: action.query,\r\n fetching: true\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component receives its code data\r\n */\r\n [ACTION.RECEIVE_CODETABLE]: (state: OptionsState, action: ReceiveCodetable): OptionsState => {\r\n\r\n if (!state.options || !state.options[action.id] || state.options[action.id].query !== action.query) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n options: {\r\n ...(state.options || {}),\r\n [action.id]: {\r\n codes: action.values,\r\n fetching: false\r\n }\r\n }\r\n };\r\n },\r\n\r\n /**\r\n * Run when a component fails to download codetable data\r\n */\r\n [ACTION.FAIL_CODETABLE]: (state: OptionsState, action: FailCodetable): OptionsState => {\r\n\r\n if (!state.options || !state.options[action.id] || state.options[action.id].query !== action.query) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n options: {\r\n ...(state.options || {}),\r\n [action.id]: {\r\n fetching: false\r\n }\r\n }\r\n };\r\n }\r\n};\r\n\r\nexport const withOptionsReducer = <S>(path: string, reducer: Reducer<S>) =>\r\n (state: S, action: AnyAction) => {\r\n const r = action.path === path && reducers[action.type];\r\n return ((r && r(state as any, action)) || reducer(state, action)) as S;\r\n };\r\n","import { RemoteAdminData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { ApiResponse, HttpResponse } from 'app/types-shared';\r\n\r\nexport const api = {\r\n\r\n getOptions: (\r\n componentEndpoint: string,\r\n loadOptionsParams: any,\r\n optionsParams: any): Promise<HttpResponse<ApiResponse<any>>> =>\r\n\r\n new RemoteAdminData(componentEndpoint)\r\n .resource<HttpResponse<ApiResponse<any>>>()\r\n .filter({\r\n ...loadOptionsParams,\r\n ...optionsParams\r\n }).all()\r\n};\r\n","import { ActionDispatching, LoadOptions } from 'app/types-shared';\r\nimport { mapToOptionsRequestParams, codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { api } from './api';\r\nimport { RequestCodetable, ReceiveCodetable, FailCodetable } from './action-types';\r\n\r\nexport const actionCreatorsFactory = (path: string) => ({\r\n\r\n loadOptions: (\r\n id: string,\r\n componentEndpoint: string,\r\n loadOptionsParams: LoadOptions,\r\n optionsParams?: any): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n const query = loadOptionsParams && loadOptionsParams.query || '';\r\n dispatch(new RequestCodetable(path, id, query));\r\n\r\n try {\r\n const response: any = await api.getOptions(\r\n query\r\n ? `${componentEndpoint}/search`\r\n : componentEndpoint,\r\n mapToOptionsRequestParams(loadOptionsParams),\r\n optionsParams);\r\n const wireCodes = response && response.data && response.data.rootCodes\r\n || (response && response.data) || [];\r\n\r\n dispatch(new ReceiveCodetable(path, id, query, wireCodes.map(codeItemToStoreValue)));\r\n } catch (err) {\r\n\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n dispatch(new FailCodetable(path, id, query));\r\n }\r\n }\r\n});\r\n","import { bindActionCreators } from 'redux';\r\nimport { connect, Component } from 'react-redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { OptionsDispatchProps, OptionsState } from './types';\r\nimport { actionCreatorsFactory } from './actions';\r\n\r\nconst createStateToProps = (path: string) =>\r\n (state: ApplicationState): OptionsState => ({\r\n options: state[path] && state[path].options || {}\r\n });\r\n\r\nconst createMapDispatchToProps = (path: string) => (dispatch: Redux.Dispatch<ApplicationState>) => ({\r\n dispatch,\r\n ...bindActionCreators(actionCreatorsFactory(path), dispatch)\r\n});\r\n\r\nexport const withOptions = <T>(component: Component<T & OptionsState & OptionsDispatchProps> & { statePath: string }) => {\r\n return connect<OptionsState, OptionsDispatchProps, T>(\r\n createStateToProps(component.statePath),\r\n createMapDispatchToProps(component.statePath)\r\n )(component);\r\n};\r\n","import { ComplexValue } from 'app/types-shared';\r\nimport { CodeListItem } from './types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_CODE_ITEMS: 'CODETABLE_ADMINISTRATION:REQUEST_CODE_ITEMS',\r\n RECEIVE_CODE_ITEMS: 'CODETABLE_ADMINISTRATION:RECEIVE_CODE_ITEMS',\r\n FAIL_CODE_ITEMS: 'CODETABLE_ADMINISTRATION:FAIL_CODE_ITEMS',\r\n\r\n REQUEST_CODETABLE_ADMINISTRATION_LIST: 'CODETABLE_ADMINISTRATION:REQUEST_CODETABLE_ADMINISTRATION_LIST',\r\n RECEIVE_CODETABLE_ADMINISTRATION_LIST: 'CODETABLE_ADMINISTRATION:RECEIVE_CODETABLE_ADMINISTRATION_LIST',\r\n FAIL_CODETABLE_ADMINISTRATION_LIST: 'CODETABLE_ADMINISTRATION:FAIL_CODETABLE_ADMINISTRATION_LIST',\r\n\r\n REQUEST_CODE_ITEM_DELETE: 'CODETABLE_ADMINISTRATION:REQUEST_CODE_ITEM_DELETE',\r\n RECEIVE_CODE_ITEM_DELETE: 'CODETABLE_ADMINISTRATION:RECEIVE_CODE_ITEM_DELETE',\r\n FAIL_CODE_ITEM_DELETE: 'CODETABLE_ADMINISTRATION:FAIL_CODE_ITEM_DELETE',\r\n\r\n EXPAND_CODE_ITEM: 'CODETABLE_ADMINISTRATION:EXPAND_CODE_ITEM',\r\n\r\n INVALIDATE_CODE_ITEMS: 'CODETABLE_ADMINISTRATION:INVALIDATE_CODE_ITEMS',\r\n\r\n UPDATE_CATEGORY: 'CODETABLE_ADMINISTRATION:UPDATE_CATEGORY',\r\n UPDATE_QUERY: 'CODETABLE_ADMINISTRATION:UPDATE_QUERY'\r\n};\r\n\r\nexport class RequestCodeItems {\r\n public type: string = ACTION.REQUEST_CODE_ITEMS;\r\n constructor(public codetableId: number, public parentId: number, public categoryId: number, public query: string) {\r\n }\r\n}\r\n\r\nexport class ReceiveCodeItems {\r\n public type: string = ACTION.RECEIVE_CODE_ITEMS;\r\n constructor(public codetableId: number, public parentId: number, public categoryId: number, public query: string,\r\n public codeItems: CodeListItem[], public numberOfResults: number, public clearList: boolean) {\r\n }\r\n}\r\n\r\nexport class FailCodeItems {\r\n public type: string = ACTION.FAIL_CODE_ITEMS;\r\n constructor(public codetableId: number, public parentId: number, public categoryId: number, public query: string) {\r\n }\r\n}\r\n\r\nexport class RequestCodetableAdministrationList {\r\n public type: string = ACTION.REQUEST_CODETABLE_ADMINISTRATION_LIST;\r\n}\r\n\r\nexport class ReceiveCodetableAdministrationList {\r\n public type: string = ACTION.RECEIVE_CODETABLE_ADMINISTRATION_LIST;\r\n constructor(public options: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class FailCodetableAdministrationList {\r\n public type: string = ACTION.FAIL_CODETABLE_ADMINISTRATION_LIST;\r\n}\r\n\r\nexport class ExpandCodeItem {\r\n public type: string = ACTION.EXPAND_CODE_ITEM;\r\n constructor(public parentId: number) {\r\n }\r\n}\r\n\r\nexport class InvalidateCodeItems {\r\n public type: string = ACTION.INVALIDATE_CODE_ITEMS;\r\n}\r\n\r\nexport class UpdateCategory {\r\n public type: string = ACTION.UPDATE_CATEGORY;\r\n constructor(public value: ComplexValue<number>) {\r\n }\r\n}\r\n\r\nexport class UpdateQuery {\r\n public type: string = ACTION.UPDATE_QUERY;\r\n constructor(public value: string) {\r\n }\r\n}\r\n","import { CodetableListState } from './types-store';\r\n\r\nexport const compareStateWithRequestedProps =\r\n (state: CodetableListState, codetableId: number, categoryId: number, query: string) =>\r\n (state ? codetableId === state.fetchingCodetableId : codetableId === undefined) &&\r\n (state && state.category ? categoryId === state.category.value : categoryId === undefined) &&\r\n (state\r\n ? query === state.query ||\r\n ((query === undefined || query === '') && (state.query === undefined || state.query === ''))\r\n : query === undefined || query === '');\r\n","export const ACTION = {\r\n REQUEST_CODE_ITEM_DELETE: 'CODETABLE_ADMINISTRATION:REQUEST_CODE_ITEM_DELETE',\r\n RECEIVE_CODE_ITEM_DELETE: 'CODETABLE_ADMINISTRATION:RECEIVE_CODE_ITEM_DELETE',\r\n FAIL_CODE_ITEM_DELETE: 'CODETABLE_ADMINISTRATION:FAIL_CODE_ITEM_DELETE'\r\n};\r\n\r\nexport class RequestCodeItemDelete {\r\n public type: string = ACTION.REQUEST_CODE_ITEM_DELETE;\r\n constructor(public codetableId: number, public codeId: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveCodeItemDelete {\r\n public type: string = ACTION.RECEIVE_CODE_ITEM_DELETE;\r\n constructor(public codeId: number) {\r\n }\r\n}\r\n\r\nexport class FailCodeItemDelete {\r\n public type: string = ACTION.FAIL_CODE_ITEM_DELETE;\r\n constructor(public codeId: number) {\r\n }\r\n}\r\n","import { CodetableListState, CodeListItem, CodeListBranch } from 'app/area/codetable/list/types-store';\r\nimport { RequestCodeItemDelete, ReceiveCodeItemDelete, FailCodeItemDelete } from 'app/area/codetable/common/action-types';\r\n\r\nexport const mapToRequestDeletingStatus = (state: CodetableListState, action: RequestCodeItemDelete) => mapToStatus(state, action, true);\r\n\r\nexport const mapToDeletedState = (state: CodetableListState, action: ReceiveCodeItemDelete): Partial<CodetableListState> => {\r\n\r\n const sourceBranch = state.codeListBranch.find(branch => branch.items.find(item => item.id === action.codeId));\r\n const itemToDelete = sourceBranch && sourceBranch.items.find(item => item.id === action.codeId);\r\n\r\n const itemDescendantsIds = collectItemDescendants(state.codeListBranch, itemToDelete);\r\n\r\n return {\r\n codeListBranch: removeItemFromBranch(removeDescendants(state.codeListBranch, itemDescendantsIds), sourceBranch, itemToDelete),\r\n codeListBranchState: removeDescendants(state.codeListBranchState, itemDescendantsIds)\r\n };\r\n};\r\n\r\nconst removeDescendants = <T extends { id: number }>(listBranch: T[], itemDescendantsIds: number[]): T[] =>\r\n listBranch.filter(branch => !itemDescendantsIds.includes(branch.id));\r\n\r\nconst removeItemFromBranch = (codeListBranch: CodeListBranch[], branch: CodeListBranch, itemToDelete: CodeListItem): CodeListBranch[] =>\r\n !branch || !itemToDelete\r\n ? codeListBranch\r\n : ([...codeListBranch.filter(listBranch => listBranch.id !== branch.id),\r\n {\r\n ...branch,\r\n items: branch.items.filter(item => item.id !== itemToDelete.id),\r\n numberOfResults: branch.numberOfResults - 1\r\n }\r\n ]);\r\n\r\nexport const collectItemDescendants = (\r\n codeListBranch: CodeListBranch[],\r\n itemToDelete: CodeListItem): number[] => {\r\n if (!itemToDelete) {\r\n return [];\r\n }\r\n const itemBranch = codeListBranch.find(branch => branch.id === itemToDelete.id);\r\n if (itemBranch) {\r\n return itemBranch.items.reduce((ids, item) => [...ids, itemBranch.id, ...collectItemDescendants(codeListBranch, item)], []);\r\n }\r\n return [itemToDelete.id];\r\n};\r\n\r\nexport const mapToFailedDeletingStatus = (state: CodetableListState, action: FailCodeItemDelete) => mapToStatus(state, action, false);\r\n\r\nconst mapToStatus = (\r\n state: CodetableListState,\r\n action: RequestCodeItemDelete | FailCodeItemDelete,\r\n deletingCodeItem: boolean) => state.codeListBranch.map(branch => {\r\n const hasSearchedItem = branch.items.find(item => item.id === action.codeId);\r\n\r\n return hasSearchedItem\r\n ? { ...branch, items: branch.items.map(item => item.id === action.codeId ? { ...item, deletingCodeItem } : item) }\r\n : branch;\r\n });\r\n","import { CodetableListState, CodeListBranch } from 'app/area/codetable/list/types-store';\r\nimport { ReceiveCodeItemDelete } from 'app/area/codetable/common/action-types';\r\n\r\nexport const mapToDecreasedChildrenCount = (state: CodetableListState, action: ReceiveCodeItemDelete): CodeListBranch[] =>\r\n decreaseChildrenCount(state.codeListBranch, action.codeId, undefined);\r\n\r\nconst decreaseChildrenCount = (codeListBranch: CodeListBranch[], codeId: number, childrenCount: number): CodeListBranch[] => {\r\n if (codeId === undefined) {\r\n return codeListBranch;\r\n }\r\n\r\n const sourceBranch = codeListBranch.find(branch => branch.items.find(item => item.id === codeId));\r\n const sourceItem = sourceBranch && sourceBranch.items.find(item => item.id === codeId);\r\n const sourceItemIndex = sourceBranch && sourceBranch.items.findIndex(item => item.id === codeId);\r\n\r\n if (!sourceItem) {\r\n return codeListBranch;\r\n }\r\n\r\n const resultItem = {\r\n ...sourceItem,\r\n childrenCount: childrenCount > 0 ? sourceItem.childrenCount - childrenCount : 0\r\n };\r\n\r\n const resultBranchWithoutSourceItem = sourceBranch.items.filter(item => item.id !== resultItem.id);\r\n\r\n const resultBranchItems = [...resultBranchWithoutSourceItem.slice(0, sourceItemIndex),\r\n resultItem,\r\n ...resultBranchWithoutSourceItem.slice(sourceItemIndex, resultBranchWithoutSourceItem.length)\r\n ];\r\n\r\n const resultBranch = {\r\n ...sourceBranch,\r\n items: resultBranchItems\r\n };\r\n\r\n const resultCodeListBranchWithoutResultBranch = codeListBranch.filter(branch => branch.id !== resultBranch.id);\r\n\r\n const resultCodeListBranch = [\r\n ...resultCodeListBranchWithoutResultBranch,\r\n resultBranch\r\n ];\r\n\r\n return decreaseChildrenCount(resultCodeListBranch, resultBranch.id, childrenCount || sourceItem.childrenCount + 1);\r\n};\r\n","import { CodeListBranchState, CodeListBranch } from 'app/area/codetable/list/types-store';\r\n\r\nexport const getDirectParentsList = (codeListBranch: CodeListBranch[], childId: number, parents: number[] = []): number[] =>\r\n filterOwnId(getDirectParentsListInternal(codeListBranch, childId, parents), childId);\r\n\r\nconst filterOwnId = (parents: number[] = [], id: number): number[] => parents.filter(parent => parent !== id);\r\n\r\nconst getDirectParentsListInternal = (codeListBranch: CodeListBranch[], childId: number, parents: number[] = []): number[] => {\r\n if (childId === undefined) {\r\n return parents;\r\n }\r\n\r\n const sourceBranch = codeListBranch.find(branch => branch.items.find(item => item.id === childId));\r\n const sourceItem = sourceBranch && sourceBranch.items.find(item => item.id === childId);\r\n\r\n if (!sourceItem) {\r\n return parents;\r\n }\r\n\r\n const newParents = [sourceItem.id, ...parents];\r\n\r\n return getDirectParentsListInternal(codeListBranch, sourceBranch.id, newParents);\r\n};\r\n\r\nexport const setLoadingState = (branchesState: CodeListBranchState[], parents: number[], isLoading): CodeListBranchState[] => {\r\n return branchesState.map(branch => ({ ...branch, isUpdatingParent: parents.some(parent => parent === branch.id) ? isLoading : false }));\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { CodetableListState } from './types-store';\r\nimport {\r\n ACTION, RequestCodeItems, ReceiveCodeItems, FailCodeItems,\r\n ExpandCodeItem, InvalidateCodeItems,\r\n UpdateCategory, UpdateQuery, RequestCodetableAdministrationList, ReceiveCodetableAdministrationList, FailCodetableAdministrationList\r\n} from './action-types';\r\nimport { compareStateWithRequestedProps } from './selectors';\r\nimport { codetableOptionsReducer } from '../common';\r\nimport {\r\n ACTION as COMMON_ACTION, RequestCodeItemDelete, ReceiveCodeItemDelete, FailCodeItemDelete\r\n} from 'app/area/codetable/common/action-types';\r\nimport { mapToDeletedState, mapToRequestDeletingStatus, mapToFailedDeletingStatus } from 'app/area/codetable/list/mapping/map-delete';\r\nimport { mapToDecreasedChildrenCount } from 'app/area/codetable/list/mapping/map-to-decreased-children-count';\r\nimport { getDirectParentsList, setLoadingState } from 'app/area/codetable/list/reducers-helpers';\r\n\r\nexport const INITIAL_CODETABLE_LIST_STATE: CodetableListState = {\r\n query: '',\r\n category: undefined,\r\n fetchingCodetableId: undefined,\r\n fetchingBreadcrumbsCodetableId: undefined,\r\n codeListBranchState: [],\r\n codeListBranch: [],\r\n codetableOptions: {},\r\n options: []\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<CodetableListState> } = {\r\n\r\n ...codetableOptionsReducer as { [indexer: string]: Reducer<CodetableListState> },\r\n\r\n [ACTION.REQUEST_CODE_ITEMS]: (state: CodetableListState, action: RequestCodeItems): CodetableListState => {\r\n\r\n const { codetableId, parentId, categoryId, query } = action;\r\n\r\n // if any of request parameter has been changed - reload whole state\r\n if (!compareStateWithRequestedProps(state, codetableId, categoryId, query)) {\r\n return {\r\n ...state,\r\n fetchingCodetableId: codetableId,\r\n codeListBranchState: [\r\n {\r\n id: parentId,\r\n fetching: true,\r\n open: parentId === undefined\r\n }\r\n ],\r\n codeListBranch: []\r\n };\r\n }\r\n\r\n const currentBranchState = state.codeListBranchState.find(s => s.id === parentId) || { open: false };\r\n return {\r\n ...state,\r\n codeListBranchState: [\r\n ...state.codeListBranchState.filter(s => s !== currentBranchState),\r\n {\r\n ...currentBranchState,\r\n id: parentId,\r\n fetching: true,\r\n open: parentId === undefined || currentBranchState.open\r\n }\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CODE_ITEMS]: (state: CodetableListState, action: ReceiveCodeItems): CodetableListState => {\r\n\r\n const { codetableId, parentId, categoryId, query, codeItems, numberOfResults, clearList } = action;\r\n\r\n const currentBranchState = state.codeListBranchState.find(s => s.id === parentId) ||\r\n { id: parentId, fetching: false };\r\n const currentBranch = state.codeListBranch.find(branch => branch.id === parentId);\r\n const currentCodeItems = currentBranch && currentBranch.items || [];\r\n\r\n return currentBranchState.fetching && compareStateWithRequestedProps(state, codetableId, categoryId, query)\r\n ? {\r\n ...state,\r\n codeListBranchState: [\r\n ...state.codeListBranchState.filter(s => s !== currentBranchState),\r\n {\r\n ...currentBranchState,\r\n fetching: false,\r\n needsReload: false\r\n }\r\n ],\r\n codeListBranch: [\r\n ...state.codeListBranch.filter(branch => branch.id !== parentId),\r\n {\r\n id: parentId,\r\n numberOfResults,\r\n items: clearList\r\n ? codeItems\r\n : [\r\n ...currentCodeItems,\r\n ...codeItems\r\n ]\r\n }\r\n ]\r\n }\r\n : state;\r\n },\r\n\r\n [ACTION.FAIL_CODE_ITEMS]: (state: CodetableListState, action: FailCodeItems): CodetableListState => {\r\n\r\n const { codetableId, parentId, categoryId, query } = action;\r\n\r\n const currentBranchState = state.codeListBranchState.find(s => s.id === parentId) ||\r\n { id: parentId, fetching: false };\r\n const currentBranch = state.codeListBranch.find(branch => branch.id === parentId) ||\r\n { id: parentId, numberOfResults: 0, items: [] };\r\n\r\n return currentBranchState.fetching && compareStateWithRequestedProps(state, codetableId, categoryId, query)\r\n ? {\r\n ...state,\r\n codeListBranchState: [\r\n ...state.codeListBranchState.filter(s => s !== currentBranchState),\r\n {\r\n ...currentBranchState,\r\n fetching: false,\r\n needsReload: false\r\n }\r\n ],\r\n codeListBranch: [\r\n ...state.codeListBranch.filter(branch => branch !== currentBranch),\r\n currentBranch\r\n ]\r\n }\r\n : state;\r\n },\r\n\r\n [ACTION.REQUEST_CODETABLE_ADMINISTRATION_LIST]:\r\n (state: CodetableListState, action: RequestCodetableAdministrationList): CodetableListState => {\r\n\r\n return {\r\n ...state,\r\n fetchingBreadcrumbsCodetableId: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CODETABLE_ADMINISTRATION_LIST]:\r\n (state: CodetableListState, action: ReceiveCodetableAdministrationList): CodetableListState => {\r\n\r\n const { options } = action;\r\n\r\n return {\r\n ...state,\r\n fetchingBreadcrumbsCodetableId: false,\r\n options\r\n };\r\n },\r\n\r\n [ACTION.FAIL_CODETABLE_ADMINISTRATION_LIST]:\r\n (state: CodetableListState, action: FailCodetableAdministrationList): CodetableListState => {\r\n\r\n return {\r\n ...state,\r\n fetchingBreadcrumbsCodetableId: false,\r\n options: []\r\n };\r\n },\r\n\r\n [COMMON_ACTION.REQUEST_CODE_ITEM_DELETE]: (state: CodetableListState, action: RequestCodeItemDelete): CodetableListState => {\r\n\r\n const parents = getDirectParentsList(state.codeListBranch, action.codeId);\r\n\r\n const codeListBranchState = setLoadingState(state.codeListBranchState, parents, true);\r\n\r\n const codeListBranch = mapToRequestDeletingStatus(state, action);\r\n\r\n return {\r\n ...state,\r\n codeListBranch,\r\n codeListBranchState\r\n };\r\n },\r\n\r\n [COMMON_ACTION.RECEIVE_CODE_ITEM_DELETE]: (state: CodetableListState, action: ReceiveCodeItemDelete): CodetableListState => {\r\n\r\n const codeListBranchDecreasedChildren = mapToDecreasedChildrenCount(state, action);\r\n const { codeListBranch: codeListBranchUpdated, codeListBranchState: codeListBranchStateUpdated } =\r\n mapToDeletedState({ ...state, codeListBranch: codeListBranchDecreasedChildren }, action);\r\n\r\n const parents = getDirectParentsList(codeListBranchDecreasedChildren, action.codeId);\r\n\r\n const codeListBranchState = setLoadingState(codeListBranchStateUpdated, parents, false);\r\n\r\n return {\r\n ...state,\r\n codeListBranch: codeListBranchUpdated,\r\n codeListBranchState\r\n };\r\n },\r\n\r\n [COMMON_ACTION.FAIL_CODE_ITEM_DELETE]: (state: CodetableListState, action: FailCodeItemDelete): CodetableListState => {\r\n\r\n const codeListBranch = mapToFailedDeletingStatus(state, action);\r\n\r\n const parents = getDirectParentsList(codeListBranch, action.codeId);\r\n\r\n const codeListBranchState = setLoadingState(state.codeListBranchState, parents, false);\r\n\r\n return {\r\n ...state,\r\n codeListBranch,\r\n codeListBranchState\r\n };\r\n },\r\n\r\n [ACTION.EXPAND_CODE_ITEM]: (state: CodetableListState, action: ExpandCodeItem): CodetableListState => {\r\n\r\n const currentBranchState = state.codeListBranchState.find(s => s.id === action.parentId) ||\r\n { id: action.parentId, open: false };\r\n\r\n return {\r\n ...state,\r\n codeListBranchState: [\r\n ...state.codeListBranchState.filter(s => s !== currentBranchState),\r\n {\r\n ...currentBranchState,\r\n open: !currentBranchState.open\r\n }\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.INVALIDATE_CODE_ITEMS]: (state: CodetableListState, action: InvalidateCodeItems): CodetableListState => {\r\n\r\n return {\r\n ...state,\r\n codeListBranchState: state.codeListBranchState.map(codeState => ({\r\n ...codeState,\r\n fetching: false,\r\n needsReload: true\r\n }))\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_CATEGORY]: (state: CodetableListState, action: UpdateCategory): CodetableListState => {\r\n\r\n return {\r\n ...state,\r\n category: action.value\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_QUERY]: (state: CodetableListState, action: UpdateQuery): CodetableListState => {\r\n\r\n return {\r\n ...state,\r\n query: action.value\r\n };\r\n }\r\n};\r\n\r\nexport const listReducer: Reducer<CodetableListState> = (\r\n state: CodetableListState = INITIAL_CODETABLE_LIST_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { ComplexValue } from 'app/types-shared';\r\nimport { CodeItem, ReceiveCodeItemPayload } from './types-store';\r\nimport { ValidationProps } from 'ui/common/validation/types';\r\nimport { CodetableAdditionalFieldId } from 'app/area/codetable/types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_CODE_ITEM: 'CODETABLE_ADMINISTRATION:REQUEST_CODE_ITEM',\r\n RECEIVE_CODE_ITEM: 'CODETABLE_ADMINISTRATION:RECEIVE_CODE_ITEM',\r\n FAIL_CODE_ITEM: 'CODETABLE_ADMINISTRATION:FAIL_CODE_ITEM',\r\n\r\n REQUEST_CREATE_CODE_ITEM: 'CODETABLE_ADMINISTRATION:REQUEST_CREATE_CODE_ITEM',\r\n RECEIVE_CREATE_CODE_ITEM: 'CODETABLE_ADMINISTRATION:RECEIVE_CREATE_CODE_ITEM',\r\n FAIL_CREATE_CODE_ITEM: 'CODETABLE_ADMINISTRATION:FAIL_CREATE_CODE_ITEM',\r\n\r\n REQUEST_SAVE_CODETABLE_ITEM: 'CODETABLE_ADMINISTRATION:REQUEST_SAVE_CODETABLE_ITEM',\r\n RECEIVE_SAVE_CODETABLE_ITEM: 'CODETABLE_ADMINISTRATION:RECEIVE_SAVE_CODETABLE_ITEM',\r\n FAIL_SAVE_CODETABLE_ITEM: 'CODETABLE_ADMINISTRATION:FAIL_SAVE_CODETABLE_ITEM',\r\n\r\n UPDATE_LIST_NODE: 'CODETABLE_ADMINISTRATION:UPDATE_LIST_NODE',\r\n UPDATE_PARENT: 'CODETABLE_ADMINISTRATION:UPDATE_PARENT',\r\n UPDATE_DISABLED: 'CODETABLE_ADMINISTRATION:UPDATE_DISABLED',\r\n UPDATE_USER_GROUPS: 'CODETABLE_ADMINISTRATION:UPDATE_USER_GROUPS',\r\n UPDATE_EXCLUDED_FIELDS: 'CODETABLE_ADMINISTRATION:UPDATE_EXCLUDED_FIELDS',\r\n UPDATE_CASE_TYPES: 'CODETABLE_ADMINISTRATION:UPDATE_CASE_TYPES',\r\n UPDATE_CODE_CATEGORY: 'CODETABLE_ADMINISTRATION:UPDATE_CODE_CATEGORY',\r\n UPDATE_SEQUENCE: 'CODETABLE_ADMINISTRATION:UPDATE_SEQUENCE',\r\n UPDATE_ACTIVE_MODE: 'CODETABLE_ADMINISTRATION:UPDATE_ACTIVE_MODE',\r\n UPDATE_DESCRIPTION: 'CODETABLE_ADMINISTRATION:UPDATE_DESCRIPTION',\r\n UPDATE_LONG_DESCRIPTION: 'CODETABLE_ADMINISTRATION:UPDATE_LONG_DESCRIPTION',\r\n UPDATE_CODETABLE_TYPES: 'CODETABLE_ADMINISTRATION:UPDATE_CODETABLE_TYPES',\r\n UPDATE_ADDITIONAL_FIELD: 'CODETABLE_ADMINISTRATION:UPDATE_ADDITIONAL_FIELD',\r\n\r\n SAVE_FOR_ALL_FIELDS_DESCRIPTION: 'CODETABLE_ADMINISTRATION:SAVE_FOR_ALL_FIELDS_DESCRIPTION',\r\n SAVE_FOR_ALL_FIELDS_LONG_DESCRIPTION: 'CODETABLE_ADMINISTRATION:SAVE_FOR_ALL_FIELDS_LONG_DESCRIPTION',\r\n\r\n COPY_DESCRIPTION_TO_ALL_TRANSLATIONS: 'CODETABLE_ADMINISTRATION:COPY_DESCRIPTION_TO_ALL_TRANSLATIONS',\r\n COPY_LONG_DESCRIPTION_TO_ALL_TRANSLATIONS: 'CODETABLE_ADMINISTRATION:COPY_LONG_DESCRIPTION_TO_ALL_TRANSLATIONS',\r\n\r\n UPDATE_VALIDATION: 'CODETABLE_ADMINISTRATION:UPDATE_VALIDATION',\r\n RESET_VALIDATION: 'CODETABLE_ADMINISTRATION:RESET_VALIDATION',\r\n RESET_DESCRIPTION_VALIDATION: 'CODETABLE_ADMINISTRATION:RESET_DESCRIPTION_VALIDATION',\r\n RESET_LONG_DESCRIPTION_VALIDATION: 'CODETABLE_ADMINISTRATION:RESET_LONG_DESCRIPTION_VALIDATION',\r\n RESET_ALL_DESCRIPTIONS_VALIDATION: 'CODETABLE_ADMINISTRATION:RESET_ALL_DESCRIPTIONS_VALIDATION',\r\n RESET_ALL_LONG_DESCRIPTIONS_VALIDATION: 'CODETABLE_ADMINISTRATION:RESET_ALL_LONG_DESCRIPTIONS_VALIDATION',\r\n CLEAR_VALIDATION: 'CODETABLE_ADMINISTRATION:CLEAR_VALIDATION',\r\n\r\n SWITCH_TRANSLATIONS_TOGGLE: 'CODETABLE_ADMINISTRATION:SWITCH_TRANSLATIONS_TOGGLE',\r\n\r\n CLEAR_CODETABLE_OPTIONS: 'CODETABLE_ADMINISTRATION:CLEAR_CODETABLE_OPTIONS'\r\n};\r\n\r\nexport class RequestCodeItem {\r\n public type: string = ACTION.REQUEST_CODE_ITEM;\r\n constructor(public codetableId: number, public codeId: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveCodeItem {\r\n public type: string = ACTION.RECEIVE_CODE_ITEM;\r\n constructor(public payload: ReceiveCodeItemPayload) {\r\n }\r\n}\r\n\r\nexport class FailCodeItem {\r\n public type: string = ACTION.FAIL_CODE_ITEM;\r\n constructor(public codetableId: number, public codeId: number) {\r\n }\r\n}\r\n\r\nexport class RequestCreateCodeItem {\r\n public type: string = ACTION.REQUEST_CREATE_CODE_ITEM;\r\n}\r\n\r\nexport class ReceiveCreateCodeItem {\r\n public type: string = ACTION.RECEIVE_CREATE_CODE_ITEM;\r\n constructor(public codeItem: CodeItem) {\r\n }\r\n}\r\n\r\nexport class FailCreateCodeItem {\r\n public type: string = ACTION.FAIL_CREATE_CODE_ITEM;\r\n}\r\n\r\nexport class UpdateListNode {\r\n public type: string = ACTION.UPDATE_LIST_NODE;\r\n constructor(public node: ComplexValue<number>) {\r\n }\r\n}\r\n\r\nexport class UpdateParent {\r\n public type: string = ACTION.UPDATE_PARENT;\r\n constructor(public parent: ComplexValue<number>) {\r\n }\r\n}\r\n\r\nexport class UpdateDescription {\r\n public type: string = ACTION.UPDATE_DESCRIPTION;\r\n constructor(public languageId: number, public description: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateLongDescription {\r\n public type: string = ACTION.UPDATE_LONG_DESCRIPTION;\r\n constructor(public languageId: number, public longDescription: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateDisabled {\r\n public type: string = ACTION.UPDATE_DISABLED;\r\n constructor(public disabled: Date) {\r\n }\r\n}\r\n\r\nexport class UpdateUserGroups {\r\n public type: string = ACTION.UPDATE_USER_GROUPS;\r\n constructor(public userGroups: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateExcludedFields {\r\n public type: string = ACTION.UPDATE_EXCLUDED_FIELDS;\r\n constructor(public excludedFields: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateCaseTypes {\r\n public type: string = ACTION.UPDATE_CASE_TYPES;\r\n constructor(public caseTypes: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateCodetableTypes {\r\n public type: string = ACTION.UPDATE_CODETABLE_TYPES;\r\n constructor(public codetableTypes: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateCodeCategory {\r\n public type: string = ACTION.UPDATE_CODE_CATEGORY;\r\n constructor(public codeCategory: ComplexValue<number>) {\r\n }\r\n}\r\n\r\nexport class UpdateSequence {\r\n public type: string = ACTION.UPDATE_SEQUENCE;\r\n constructor(public sequence: number) {\r\n }\r\n}\r\n\r\nexport class UpdateAdditionalField<T> {\r\n public type: string = ACTION.UPDATE_ADDITIONAL_FIELD;\r\n constructor(public additionalFieldId: CodetableAdditionalFieldId, public value: T) {\r\n }\r\n}\r\n\r\nexport class RequestSaveCodetableItem {\r\n public type: string = ACTION.REQUEST_SAVE_CODETABLE_ITEM;\r\n}\r\n\r\nexport class ReceiveSaveCodetableItem {\r\n public type: string = ACTION.RECEIVE_SAVE_CODETABLE_ITEM;\r\n}\r\n\r\nexport class FailSaveCodetableItem {\r\n public type: string = ACTION.FAIL_SAVE_CODETABLE_ITEM;\r\n}\r\n\r\nexport class CopyDescriptionToAllTranslations {\r\n public type: string = ACTION.COPY_DESCRIPTION_TO_ALL_TRANSLATIONS;\r\n constructor(public description: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class CopyLongDescriptionToAllTranslations {\r\n public type: string = ACTION.COPY_LONG_DESCRIPTION_TO_ALL_TRANSLATIONS;\r\n constructor(public longDescription: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateValidation {\r\n public type: string = ACTION.UPDATE_VALIDATION;\r\n constructor(public validation: { [key: string]: ValidationProps }) {\r\n }\r\n}\r\n\r\nexport class ResetValidation {\r\n public type: string = ACTION.RESET_VALIDATION;\r\n constructor(public key: string) {\r\n }\r\n}\r\n\r\nexport class ResetDescriptionValidation {\r\n public type: string = ACTION.RESET_DESCRIPTION_VALIDATION;\r\n constructor(public languageId: number) {\r\n }\r\n}\r\n\r\nexport class ResetLongDescriptionValidation {\r\n public type: string = ACTION.RESET_LONG_DESCRIPTION_VALIDATION;\r\n constructor(public languageId: number) {\r\n }\r\n}\r\n\r\nexport class ResetAllDescriptionsValidation {\r\n public type: string = ACTION.RESET_ALL_DESCRIPTIONS_VALIDATION;\r\n}\r\n\r\nexport class ResetAllLongDescriptionsValidation {\r\n public type: string = ACTION.RESET_ALL_LONG_DESCRIPTIONS_VALIDATION;\r\n}\r\n\r\nexport class ClearValidation {\r\n public type: string = ACTION.CLEAR_VALIDATION;\r\n}\r\n\r\nexport class SwitchTranslationsToggle {\r\n public type: string = ACTION.SWITCH_TRANSLATIONS_TOGGLE;\r\n constructor(public toggled?: boolean) {\r\n }\r\n}\r\n\r\nexport class ClearCodetableOptions {\r\n public type: string = ACTION.CLEAR_CODETABLE_OPTIONS;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { CodetableItemState } from './types-store';\r\nimport {\r\n ACTION,\r\n RequestCodeItem, ReceiveCodeItem, FailCodeItem, CopyDescriptionToAllTranslations,\r\n RequestSaveCodetableItem, ReceiveSaveCodetableItem, FailSaveCodetableItem,\r\n UpdateListNode, UpdateParent, UpdateDisabled, UpdateDescription, UpdateLongDescription, UpdateSequence,\r\n UpdateUserGroups, UpdateExcludedFields, UpdateCaseTypes, UpdateCodeCategory,\r\n RequestCreateCodeItem, ReceiveCreateCodeItem, FailCreateCodeItem,\r\n UpdateValidation, ResetValidation, ResetDescriptionValidation, ResetLongDescriptionValidation,\r\n ClearValidation, CopyLongDescriptionToAllTranslations, SwitchTranslationsToggle,\r\n ClearCodetableOptions, ResetAllDescriptionsValidation, ResetAllLongDescriptionsValidation,\r\n UpdateCodetableTypes, UpdateAdditionalField\r\n} from './action-types';\r\nimport {\r\n ACTION as COMMON_ACTION, RequestCodeItemDelete, ReceiveCodeItemDelete, FailCodeItemDelete\r\n} from 'app/area/codetable/common/action-types';\r\nimport { codetableOptionsReducer } from '../common';\r\nimport { ValidationProps, ValidationLevel } from 'ui/common/validation/types';\r\n\r\nexport const INITIAL_CODETABLE_ITEM_STATE: CodetableItemState = {\r\n fetchingCodetableId: undefined,\r\n fetchingCodeId: undefined,\r\n fetchingCreateOptions: false,\r\n deletingCodeItem: false,\r\n savingCodetableItem: false,\r\n originalCodeItem: undefined,\r\n codeItem: undefined,\r\n codetableOptions: {},\r\n validation: {},\r\n hasTranslationsToggled: undefined\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<CodetableItemState> } = {\r\n\r\n ...codetableOptionsReducer as { [indexer: string]: Reducer<CodetableItemState> },\r\n\r\n [ACTION.REQUEST_CODE_ITEM]: (state: CodetableItemState, action: RequestCodeItem): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n fetchingCodetableId: action.codetableId,\r\n fetchingCodeId: action.codeId\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CODE_ITEM]: (state: CodetableItemState, action: ReceiveCodeItem): CodetableItemState => {\r\n\r\n const { payload: { codeId, codeItem, codetableId } } = action;\r\n\r\n return codetableId === state.fetchingCodetableId && codeId === state.fetchingCodeId\r\n ? {\r\n ...state,\r\n fetchingCodetableId: undefined,\r\n fetchingCodeId: undefined,\r\n codeItem,\r\n originalCodeItem: codeItem\r\n }\r\n : state;\r\n },\r\n\r\n [ACTION.FAIL_CODE_ITEM]: (state: CodetableItemState, action: FailCodeItem): CodetableItemState => {\r\n\r\n return action.codetableId === state.fetchingCodetableId && action.codeId === state.fetchingCodeId\r\n ? {\r\n ...state,\r\n fetchingCodetableId: undefined,\r\n fetchingCodeId: undefined\r\n }\r\n : state;\r\n },\r\n\r\n [ACTION.REQUEST_CREATE_CODE_ITEM]: (state: CodetableItemState, action: RequestCreateCodeItem): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n fetchingCreateOptions: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CREATE_CODE_ITEM]: (state: CodetableItemState, action: ReceiveCreateCodeItem): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n fetchingCreateOptions: false,\r\n codeItem: action.codeItem,\r\n originalCodeItem: action.codeItem\r\n };\r\n },\r\n\r\n [ACTION.FAIL_CREATE_CODE_ITEM]: (state: CodetableItemState, action: FailCreateCodeItem): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n fetchingCreateOptions: false\r\n };\r\n },\r\n\r\n [COMMON_ACTION.REQUEST_CODE_ITEM_DELETE]: (state: CodetableItemState, action: RequestCodeItemDelete): CodetableItemState => {\r\n return {\r\n ...state,\r\n deletingCodeItem: true\r\n };\r\n },\r\n\r\n [COMMON_ACTION.RECEIVE_CODE_ITEM_DELETE]: (state: CodetableItemState, action: ReceiveCodeItemDelete): CodetableItemState => {\r\n return {\r\n ...state,\r\n deletingCodeItem: false\r\n };\r\n },\r\n\r\n [COMMON_ACTION.FAIL_CODE_ITEM_DELETE]: (state: CodetableItemState, action: FailCodeItemDelete): CodetableItemState => {\r\n return {\r\n ...state,\r\n deletingCodeItem: false\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_LIST_NODE]: (state: CodetableItemState, action: UpdateListNode): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n node: action.node\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_PARENT]: (state: CodetableItemState, action: UpdateParent): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n parent: action.parent\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_DISABLED]: (state: CodetableItemState, action: UpdateDisabled): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n disabled: action.disabled\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_USER_GROUPS]: (state: CodetableItemState, action: UpdateUserGroups): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n userGroups: action.userGroups\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_EXCLUDED_FIELDS]: (state: CodetableItemState, action: UpdateExcludedFields): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n excludeFields: action.excludedFields\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_CASE_TYPES]: (state: CodetableItemState, action: UpdateCaseTypes): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n caseTypes: action.caseTypes\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_CODETABLE_TYPES]: (state: CodetableItemState, action: UpdateCodetableTypes): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n codetableTypes: action.codetableTypes\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_SEQUENCE]: (state: CodetableItemState, action: UpdateSequence): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n sequence: action.sequence\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_CODE_CATEGORY]: (state: CodetableItemState, action: UpdateCodeCategory): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n category: action.codeCategory\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_ADDITIONAL_FIELD]: (state: CodetableItemState, action: UpdateAdditionalField<any>): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n additionalFields: {\r\n ...(!!state.codeItem && !!state.codeItem.additionalFields ? state.codeItem.additionalFields : {}),\r\n [action.additionalFieldId]: action.value\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_SAVE_CODETABLE_ITEM]: (state: CodetableItemState, action: RequestSaveCodetableItem): CodetableItemState => {\r\n return {\r\n ...state,\r\n savingCodetableItem: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_SAVE_CODETABLE_ITEM]: (state: CodetableItemState, action: ReceiveSaveCodetableItem): CodetableItemState => {\r\n return {\r\n ...state,\r\n savingCodetableItem: false,\r\n originalCodeItem: state.codeItem\r\n };\r\n },\r\n\r\n [ACTION.FAIL_SAVE_CODETABLE_ITEM]: (state: CodetableItemState, action: FailSaveCodetableItem): CodetableItemState => {\r\n return {\r\n ...state,\r\n savingCodetableItem: false\r\n };\r\n },\r\n\r\n [ACTION.COPY_DESCRIPTION_TO_ALL_TRANSLATIONS]: (\r\n state: CodetableItemState,\r\n action: CopyDescriptionToAllTranslations\r\n ): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n ...(!!action.description && { description: action.description })\r\n }\r\n };\r\n },\r\n\r\n [ACTION.COPY_LONG_DESCRIPTION_TO_ALL_TRANSLATIONS]: (\r\n state: CodetableItemState,\r\n action: CopyLongDescriptionToAllTranslations\r\n ): CodetableItemState => {\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n ...(!!action.longDescription && { longDescription: action.longDescription })\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_VALIDATION]: (state: CodetableItemState, action: UpdateValidation): CodetableItemState => {\r\n return {\r\n ...state,\r\n validation: action.validation\r\n };\r\n },\r\n\r\n [ACTION.RESET_VALIDATION]: (state: CodetableItemState, action: ResetValidation): CodetableItemState => {\r\n const validation = { ...state.validation, [action.key]: undefined };\r\n\r\n return {\r\n ...state,\r\n validation\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_VALIDATION]: (state: CodetableItemState, action: ClearValidation): CodetableItemState => {\r\n return {\r\n ...state,\r\n validation: {}\r\n };\r\n },\r\n\r\n [ACTION.RESET_ALL_DESCRIPTIONS_VALIDATION]: (state: CodetableItemState, action: ResetAllDescriptionsValidation): CodetableItemState => {\r\n\r\n const source: ValidationProps = state.validation.language;\r\n\r\n let validation: { [key: string]: ValidationProps } = undefined;\r\n\r\n if (!!source && !!source.messages && source.messages.length > 0) {\r\n const messages = source.messages.filter(message => !!message.parameters.description);\r\n const level = messages.some(message => message.level === ValidationLevel.error) ? ValidationLevel.error : ValidationLevel.success;\r\n\r\n validation = level === ValidationLevel.success\r\n ? { ...state.validation, language: undefined }\r\n : { ...state.validation, language: { level, messages } };\r\n } else {\r\n validation = { ...state.validation, language: undefined };\r\n }\r\n\r\n return {\r\n ...state,\r\n validation\r\n };\r\n },\r\n\r\n [ACTION.RESET_ALL_DESCRIPTIONS_VALIDATION]: (state: CodetableItemState,\r\n action: ResetAllLongDescriptionsValidation): CodetableItemState => {\r\n\r\n const source: ValidationProps = state.validation.language;\r\n\r\n let validation: { [key: string]: ValidationProps } = undefined;\r\n\r\n if (!!source && !!source.messages && source.messages.length > 0) {\r\n const messages = source.messages.filter(message => !!message.parameters.longDescription);\r\n const level = messages.some(message => message.level === ValidationLevel.error) ? ValidationLevel.error : ValidationLevel.success;\r\n\r\n validation = level === ValidationLevel.success\r\n ? { ...state.validation, language: undefined }\r\n : { ...state.validation, language: { level, messages } };\r\n } else {\r\n validation = { ...state.validation, language: undefined };\r\n }\r\n\r\n return {\r\n ...state,\r\n validation\r\n };\r\n },\r\n\r\n [ACTION.RESET_DESCRIPTION_VALIDATION]: (state: CodetableItemState, action: ResetDescriptionValidation): CodetableItemState => {\r\n\r\n const source: ValidationProps = state.validation.language;\r\n\r\n let validation: { [key: string]: ValidationProps } = undefined;\r\n\r\n if (!!source && !!source.messages && source.messages.length > 0) {\r\n const messages = source.messages.filter(message => message.parameters.description !== action.languageId);\r\n const level = messages.some(message => message.level === ValidationLevel.error) ? ValidationLevel.error : ValidationLevel.success;\r\n\r\n validation = level === ValidationLevel.success\r\n ? { ...state.validation, language: undefined }\r\n : { ...state.validation, language: { level, messages } };\r\n } else {\r\n validation = { ...state.validation, language: undefined };\r\n }\r\n\r\n return {\r\n ...state,\r\n validation\r\n };\r\n },\r\n\r\n [ACTION.RESET_LONG_DESCRIPTION_VALIDATION]: (state: CodetableItemState, action: ResetLongDescriptionValidation): CodetableItemState => {\r\n\r\n const source: ValidationProps = state.validation.language;\r\n\r\n let validation: { [key: string]: ValidationProps } = undefined;\r\n\r\n if (!!source && !!source.messages && source.messages.length > 0) {\r\n const messages = source.messages.filter(message => message.parameters.longDescription !== action.languageId);\r\n const level = messages.some(message => message.level === ValidationLevel.error) ? ValidationLevel.error : ValidationLevel.success;\r\n\r\n validation = level === ValidationLevel.success\r\n ? { ...state.validation, language: undefined }\r\n : { ...state.validation, language: { level, messages } };\r\n } else {\r\n validation = { ...state.validation, language: undefined };\r\n }\r\n\r\n return {\r\n ...state,\r\n validation\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_DESCRIPTION]: (state: CodetableItemState, action: UpdateDescription): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n description: action.description\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_LONG_DESCRIPTION]: (state: CodetableItemState, action: UpdateLongDescription): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n codeItem: {\r\n ...state.codeItem,\r\n longDescription: action.longDescription\r\n }\r\n };\r\n },\r\n\r\n [ACTION.SWITCH_TRANSLATIONS_TOGGLE]: (state: CodetableItemState, action: SwitchTranslationsToggle): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n hasTranslationsToggled: action.toggled === undefined ? !state.hasTranslationsToggled : action.toggled\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_CODETABLE_OPTIONS]: (state: CodetableItemState, action: ClearCodetableOptions): CodetableItemState => {\r\n\r\n return {\r\n ...state,\r\n codetableOptions: {}\r\n };\r\n }\r\n};\r\n\r\nexport const itemReducer: Reducer<CodetableItemState> =\r\n (state: CodetableItemState = INITIAL_CODETABLE_ITEM_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n };\r\n","import { CodetableMetadata } from './types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_METADATA: 'CODETABLE_ADMINISTRATION:REQUEST_METADATA',\r\n RECEIVE_METADATA: 'CODETABLE_ADMINISTRATION:RECEIVE_METADATA',\r\n FAIL_METADATA: 'CODETABLE_ADMINISTRATION:FAIL_METADATA'\r\n};\r\n\r\nexport class RequestMetadata {\r\n public type: string = ACTION.REQUEST_METADATA;\r\n constructor(public id: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveMetadata {\r\n public type: string = ACTION.RECEIVE_METADATA;\r\n constructor(public id: number, public metadata: CodetableMetadata) {\r\n }\r\n}\r\n\r\nexport class FailMetadata {\r\n public type: string = ACTION.FAIL_METADATA;\r\n constructor(public id: number) {\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { STATE } from 'app/constants';\r\nimport { withOptionsReducer } from 'app/components/options-handler';\r\nimport { listReducer } from './list/reducers';\r\nimport { itemReducer } from './item/reducers';\r\nimport { CodetableAdministrationState, CodetableMetadataState } from './types-store';\r\nimport { ACTION, RequestMetadata, ReceiveMetadata, FailMetadata } from './action-types';\r\n\r\nconst INITIAL_CODETABLE_METADATA_STATE: CodetableMetadataState = {\r\n fetching: undefined,\r\n data: undefined\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<CodetableMetadataState> } = {\r\n\r\n [ACTION.REQUEST_METADATA]: (state: CodetableMetadataState, action: RequestMetadata): CodetableMetadataState => {\r\n\r\n return {\r\n ...state,\r\n fetching: action.id\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_METADATA]: (state: CodetableMetadataState, action: ReceiveMetadata): CodetableMetadataState => {\r\n\r\n return action.id === state.fetching\r\n ? {\r\n ...state,\r\n fetching: undefined,\r\n data: action.metadata\r\n }\r\n : state;\r\n },\r\n\r\n [ACTION.FAIL_METADATA]: (state: CodetableMetadataState, action: FailMetadata): CodetableMetadataState => {\r\n\r\n return action.id === state.fetching\r\n ? {\r\n ...state,\r\n fetching: undefined\r\n }\r\n : state;\r\n }\r\n};\r\n\r\nconst metadataReducer: Reducer<CodetableMetadataState> = (\r\n state: CodetableMetadataState = INITIAL_CODETABLE_METADATA_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n\r\nconst INITIAL_CODETABLE_STATE: CodetableAdministrationState = {\r\n metadata: undefined,\r\n list: undefined,\r\n item: undefined,\r\n texts: undefined\r\n};\r\n\r\nconst stateReducer: Reducer<CodetableAdministrationState> = (\r\n state = INITIAL_CODETABLE_STATE, action: any) => {\r\n const metadata = metadataReducer(state.metadata, action);\r\n const list = listReducer(state.list, action);\r\n const item = itemReducer(state.item, action);\r\n\r\n return metadata !== state.metadata || list !== state.list || item !== state.item\r\n ? {\r\n ...state,\r\n metadata,\r\n list,\r\n item\r\n }\r\n : state;\r\n};\r\n\r\nexport const reducer = withOptionsReducer(STATE.administrationCodetable, stateReducer);\r\n","import { AccessItem } from 'app/components/access-panel/shared/types';\r\nimport { Value } from 'app/types-shared';\r\n\r\nexport const ACTION = {\r\n REQUEST_LOAD_DEFAULT_VALUES: 'DEFAULT_VALUES:REQUEST_LOAD_DEFAULT_VALUES',\r\n RECEIVE_LOAD_DEFAULT_VALUES: 'DEFAULT_VALUES:RECEIVE_LOAD_DEFAULT_VALUES',\r\n FAIL_LOAD_DEFAULT_VALUES: 'DEFAULT_VALUES:FAIL_LOAD_DEFAULT_VALUES',\r\n\r\n REQUEST_SAVE_DEFAULT_VALUES: 'DEFAULT_VALUES:REQUEST_SAVE_DEFAULT_VALUES',\r\n RECEIVE_SAVE_DEFAULT_VALUES: 'DEFAULT_VALUES:RECEIVE_SAVE_DEFAULT_VALUES',\r\n FAIL_DEFAULT_VALUES_EXECUTE: 'DEFAULT_VALUES:FAIL_DEFAULT_VALUES_EXECUTE',\r\n\r\n CLEAR_VALIDATION: 'DEFAULT_VALUES:CLEAR_VALIDATION',\r\n PROCESS_DEFAULT_VALUES_FAILED: 'DEFAULT_VALUES:PROCESS_DEFAULT_VALUES_FAILED',\r\n CLEAR_DEFAULT_VALUES_DATA: 'DEFAULT_VALUES:CLEAR_DEFAULT_VALUES_DATA',\r\n\r\n REQUEST_ROLE: 'DEFAULT_VALUES:REQUEST_ROLE',\r\n RECEIVE_ROLE: 'DEFAULT_VALUES:RECEIVE_ROLE',\r\n FAIL_ROLE: 'DEFAULT_VALUES:FAIL_ROLE',\r\n\r\n UPDATE_ACCESS_DATA: 'DEFAULT_VALUES:UPDATE_ACCESS_DATA',\r\n\r\n REQUEST_ROLE_PANEL_ACCESS: 'DEFAULT_VALUES:REQUEST_ROLE_PANEL_ACCESS',\r\n RECEIVE_ROLE_PANEL_ACCESS: 'DEFAULT_VALUES:RECEIVE_ROLE_PANEL_ACCESS',\r\n FAIL_ROLE_PANEL_ACCESS: 'DEFAULT_VALUES:FAIL_ROLE_PANEL_ACCESS'\r\n};\r\n\r\nexport class ClearValidation {\r\n\r\n public type: string = ACTION.CLEAR_VALIDATION;\r\n\r\n constructor(public formName: string,\r\n public parameters: { [key: string]: number | string }) {\r\n }\r\n}\r\n\r\nexport class RequestLoadDefaultValues {\r\n public type: string = ACTION.REQUEST_LOAD_DEFAULT_VALUES;\r\n}\r\n\r\nexport class ReceiveLoadDefaultValues {\r\n public type: string = ACTION.RECEIVE_LOAD_DEFAULT_VALUES;\r\n public data: any;\r\n\r\n constructor(data?: any) {\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class FailLoadDefaultValues {\r\n public type: string = ACTION.FAIL_LOAD_DEFAULT_VALUES;\r\n}\r\n\r\nexport class RequestSaveDefaultValues {\r\n public type: string = ACTION.REQUEST_SAVE_DEFAULT_VALUES;\r\n}\r\n\r\nexport class ReceiveSaveDefaultValues {\r\n public type: string = ACTION.RECEIVE_SAVE_DEFAULT_VALUES;\r\n}\r\n\r\nexport class FailDefaultValuesExecute {\r\n public type: string = ACTION.FAIL_DEFAULT_VALUES_EXECUTE;\r\n}\r\n\r\nexport class ClearDefaultValuesData {\r\n public type: string = ACTION.CLEAR_DEFAULT_VALUES_DATA;\r\n}\r\n\r\nexport class ProcessDefaultValuesFailed {\r\n public type: string = ACTION.PROCESS_DEFAULT_VALUES_FAILED;\r\n public errors: any;\r\n constructor(errors: any) {\r\n this.errors = errors;\r\n }\r\n}\r\n\r\nexport class RequestRole {\r\n public type: string = ACTION.REQUEST_ROLE;\r\n}\r\n\r\nexport class ReceiveRole {\r\n public type: string = ACTION.RECEIVE_ROLE;\r\n constructor(public data: any) {\r\n }\r\n}\r\n\r\nexport class FailRole {\r\n public type: string = ACTION.FAIL_ROLE;\r\n}\r\n\r\nexport class UpdateAccessData {\r\n public type: string = ACTION.UPDATE_ACCESS_DATA;\r\n public key: string;\r\n public accessItem: Partial<AccessItem>;\r\n\r\n constructor(key: string, accessItem: Partial<AccessItem>) {\r\n this.key = key;\r\n this.accessItem = accessItem;\r\n }\r\n}\r\n\r\nexport class RequestRolePanelAccess {\r\n public type: string = ACTION.REQUEST_ROLE_PANEL_ACCESS;\r\n}\r\n\r\nexport class ReceiveRolePanelAccess {\r\n public type: string = ACTION.RECEIVE_ROLE_PANEL_ACCESS;\r\n constructor(public values: Value[]) { }\r\n}\r\n\r\nexport class FailRolePanelAccess {\r\n public type: string = ACTION.FAIL_ROLE_PANEL_ACCESS;\r\n}\r\n","import { ValidationMessage, ValidationProps } from 'ui/common/validation/types';\r\n\r\nconst getUpdatedValidationMessages = (\r\n messages: ValidationMessage[],\r\n parameters: { [key: string]: number | string }) =>\r\n messages.filter(message =>\r\n Object.keys(parameters).length === 0 || Object.keys(parameters).some(key =>\r\n message.parameters[key] !== parameters[key])\r\n );\r\n\r\nexport const clearValidation = (\r\n validation: { [key: string]: ValidationProps },\r\n formName: string,\r\n parameters?: { [key: string]: number | string }\r\n) => {\r\n\r\n if (!validation || !validation[formName]) {\r\n return validation;\r\n }\r\n\r\n if (parameters === undefined) {\r\n return {\r\n ...validation,\r\n [formName]: undefined\r\n };\r\n }\r\n\r\n return {\r\n ...validation,\r\n [formName]: {\r\n level: validation[formName].level,\r\n messages: getUpdatedValidationMessages(validation[formName].messages, parameters)\r\n }\r\n };\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport {\r\n ACTION, RequestLoadDefaultValues, ReceiveLoadDefaultValues, FailLoadDefaultValues,\r\n RequestSaveDefaultValues, ReceiveSaveDefaultValues, FailDefaultValuesExecute,\r\n ClearValidation, RequestRole, ReceiveRole, FailRole,\r\n UpdateAccessData, RequestRolePanelAccess, ReceiveRolePanelAccess, FailRolePanelAccess,\r\n ClearDefaultValuesData\r\n} from './action-types';\r\nimport { UserDefaultValuesState } from './types';\r\nimport { AccessItem } from 'app/components/access-panel/shared/types';\r\nimport { clearValidation } from 'app/components/access-panel/validation/validation-messages';\r\n\r\nexport const INITIAL_USER_DEFAULT_VALUES_STATE: UserDefaultValuesState = {\r\n data: undefined,\r\n role: undefined,\r\n rolePanelAccess: false,\r\n accessData: {},\r\n validation: {},\r\n fetchingLoadDefaultValues: false,\r\n fetchingSaveDefaultValues: false,\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nexport const reducers: { [indexer: string]: Reducer<UserDefaultValuesState> } = {\r\n [ACTION.CLEAR_DEFAULT_VALUES_DATA]: (state: UserDefaultValuesState, action: RequestLoadDefaultValues): UserDefaultValuesState => {\r\n return INITIAL_USER_DEFAULT_VALUES_STATE;\r\n },\r\n\r\n [ACTION.REQUEST_LOAD_DEFAULT_VALUES]: (state: UserDefaultValuesState, action: RequestLoadDefaultValues): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n fetchingLoadDefaultValues: true,\r\n data: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_DEFAULT_VALUES]: (state: UserDefaultValuesState, action: ReceiveLoadDefaultValues): UserDefaultValuesState => {\r\n const { defaultValues } = action.data as any;\r\n return {\r\n ...state,\r\n fetchingLoadDefaultValues: false,\r\n data: { defaultValues }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LOAD_DEFAULT_VALUES]: (state: UserDefaultValuesState, action: FailLoadDefaultValues): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n fetchingLoadDefaultValues: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_SAVE_DEFAULT_VALUES]: (state: UserDefaultValuesState, action: RequestSaveDefaultValues): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n fetchingSaveDefaultValues: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_SAVE_DEFAULT_VALUES]: (state: UserDefaultValuesState, action: ReceiveSaveDefaultValues): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n fetchingSaveDefaultValues: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DEFAULT_VALUES_EXECUTE]: (state: UserDefaultValuesState, action: FailDefaultValuesExecute): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n fetchingSaveDefaultValues: false\r\n };\r\n },\r\n\r\n [ACTION.PROCESS_DEFAULT_VALUES_FAILED]: (state: UserDefaultValuesState, action: any): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n validation: { ...action.errors },\r\n fetchingLoadDefaultValues: false\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_VALIDATION]: (state: UserDefaultValuesState, action: ClearValidation): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n validation: clearValidation(state.validation, action.formName, action.parameters)\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_ROLE]: (state: UserDefaultValuesState, action: RequestRole): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n role: {\r\n fetching: true\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_ROLE]: (state: UserDefaultValuesState, action: ReceiveRole): UserDefaultValuesState => {\r\n\r\n return {\r\n ...state,\r\n role: {\r\n fetching: false,\r\n data: action.data\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_ROLE]: (state: UserDefaultValuesState, action: FailRole): UserDefaultValuesState => {\r\n\r\n return {\r\n ...state,\r\n role: {\r\n fetching: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_ACCESS_DATA]: (state: UserDefaultValuesState, action: UpdateAccessData): UserDefaultValuesState => {\r\n\r\n const accessData = state.accessData || {};\r\n const accessItem = accessData[action.key] || {} as AccessItem;\r\n\r\n return {\r\n ...state,\r\n accessData: {\r\n ...accessData,\r\n [action.key]: {\r\n ...accessItem,\r\n ...action.accessItem\r\n }\r\n }\r\n };\r\n },\r\n [ACTION.REQUEST_ROLE_PANEL_ACCESS]: (state: UserDefaultValuesState, action: RequestRolePanelAccess): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n rolePanelAccess: false\r\n };\r\n },\r\n [ACTION.RECEIVE_ROLE_PANEL_ACCESS]: (state: UserDefaultValuesState, action: ReceiveRolePanelAccess): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n rolePanelAccess: !!action.values.length\r\n };\r\n },\r\n [ACTION.FAIL_ROLE_PANEL_ACCESS]: (state: UserDefaultValuesState, action: FailRolePanelAccess): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n rolePanelAccess: false\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_DEFAULT_VALUES_DATA]: (state: UserDefaultValuesState, action: ClearDefaultValuesData): UserDefaultValuesState => {\r\n return {\r\n ...state,\r\n data: undefined,\r\n accessData: {}\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<UserDefaultValuesState> =\r\n (state: UserDefaultValuesState = INITIAL_USER_DEFAULT_VALUES_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.userDefaultValues)(state, action);\r\n };\r\n","import {\r\n UserWireData, AccessPerson, Person, AccessItem, ExtraInfoCodeValues\r\n} from 'app/components/access-panel/shared/types';\r\nimport { Value } from 'app/types-shared';\r\n\r\nexport const ACTION = {\r\n REQUEST_LOAD_USER: 'ADMINISTRATION_EDIT_USER:REQUEST_LOAD_USER',\r\n RECEIVE_LOAD_USER: 'ADMINISTRATION_EDIT_USER:RECEIVE_LOAD_USER',\r\n FAIL_LOAD_USER: 'ADMINISTRATION_EDIT_USER:FAIL_LOAD_USER',\r\n REQUEST_LOAD_USER_ACCESS: 'ADMINISTRATION_EDIT_USER:REQUEST_LOAD_USER_ACCESS',\r\n RECEIVE_LOAD_USER_ACCESS: 'ADMINISTRATION_EDIT_USER:RECEIVE_LOAD_USER_ACCESS',\r\n FAIL_LOAD_USER_ACCESS: 'ADMINISTRATION_EDIT_USER:FAIL_LOAD_USER_ACCESS',\r\n REQUEST_ADD_USER: 'ADMINISTRATION_EDIT_USER:REQUEST_ADD_USER',\r\n RECEIVE_ADD_USER: 'ADMINISTRATION_EDIT_USER:RECEIVE_ADD_USER',\r\n REQUEST_UPDATE_USER: 'ADMINISTRATION_EDIT_USER:REQUEST_UPDATE_USER',\r\n RECEIVE_UPDATE_USER: 'ADMINISTRATION_EDIT_USER:RECEIVE_UPDATE_USER',\r\n FAIL_USER_EXECUTE: 'ADMINISTRATION_EDIT_USER:FAIL_USER_EXECUTE',\r\n CLEAR_SELECTED_CURRENT_USER_GROUP: 'ADMINISTRATION_EDIT_USER:CLEAR_SELECTED_CURRENT_USER_GROUP',\r\n VALIDATION_CHANGE: 'ADMINISTRATION_EDIT_USER:VALIDATION_CHANGE',\r\n CLEAR_VALIDATION: 'ADMINISTRATION_EDIT_ROLE:CLEAR_VALIDATION',\r\n CLEAR_USER_DATA: 'ADMINISTRATION_EDIT_USER:CLEAR_USER_DATA',\r\n REQUEST_CHANGE_USER_ID: 'ADMINISTRATION_EDIT_USER:REQUEST_CHANGE_USER_ID',\r\n RECEIVE_CHANGE_USER_ID: 'ADMINISTRATION_EDIT_USER:RECEIVE_CHANGE_USER_ID',\r\n FAIL_CHANGE_USER_ID: 'ADMINISTRATION_EDIT_USER:FAIL_CHANGE_USER_ID',\r\n REQUEST_EXTRA_INFO: 'ADMINISTRATION_EDIT_USER:REQUEST_EXTRA_INFO',\r\n RECEIVE_EXTRA_INFO: 'ADMINISTRATION_EDIT_USER:RECEIVE_EXTRA_INFO',\r\n FAIL_EXTRA_INFO: 'ADMINISTRATION_EDIT_USER:FAIL_EXTRA_INFO',\r\n REQUEST_PERSON_OPTIONS: 'ADMINISTRATION_EDIT_USER:REQUEST_PERSON_OPTIONS',\r\n RECEIVE_PERSON_OPTIONS: 'ADMINISTRATION_EDIT_USER:RECEIVE_PERSON_OPTIONS',\r\n FAIL_PERSON_OPTIONS: 'ADMINISTRATION_EDIT_USER:FAIL_PERSON_OPTIONS',\r\n REQUEST_ROLE: 'ADMINISTRATION_EDIT_USER:REQUEST_ROLE',\r\n RECEIVE_ROLE: 'ADMINISTRATION_EDIT_USER:RECEIVE_ROLE',\r\n FAIL_ROLE: 'ADMINISTRATION_EDIT_USER:FAIL_ROLE',\r\n UPDATE_ACCESS_DATA: 'ADMINISTRATION_EDIT_USER:UPDATE_ACCESS_DATA',\r\n REQUEST_ROLE_PANEL_ACCESS: 'ADMINISTRATION_EDIT_USER:REQUEST_ROLE_PANEL_ACCESS',\r\n RECEIVE_ROLE_PANEL_ACCESS: 'ADMINISTRATION_EDIT_USER:RECEIVE_ROLE_PANEL_ACCESS',\r\n FAIL_ROLE_PANEL_ACCESS: 'ADMINISTRATION_EDIT_USER:FAIL_ROLE_PANEL_ACCESS',\r\n REQUEST_CHANGE_DATABASE_ACCOUNT: 'ADMINISTRATION_EDIT_USER:REQUEST_CHANGE_DATABASE_ACCOUNT',\r\n RECEIVE_CHANGE_DATABASE_ACCOUNT: 'ADMINISTRATION_EDIT_USER:RECEIVE_CHANGE_DATABASE_ACCOUNT',\r\n FAIL_CHANGE_DATABASE_ACCOUNT: 'ADMINISTRATION_EDIT_USER:FAIL_CHANGE_DATABASE_ACCOUNT'\r\n};\r\n\r\nexport class ValidationChange {\r\n\r\n public type: string = ACTION.VALIDATION_CHANGE;\r\n public validation: any;\r\n\r\n constructor(validation: any) {\r\n this.validation = validation;\r\n }\r\n}\r\n\r\nexport class ClearValidation {\r\n\r\n public type: string = ACTION.CLEAR_VALIDATION;\r\n\r\n constructor(public formName: string,\r\n public parameters: { [key: string]: number | string }) {\r\n }\r\n}\r\n\r\nexport class RequestLoadUser {\r\n public type: string = ACTION.REQUEST_LOAD_USER;\r\n}\r\n\r\nexport class ReceiveLoadUser {\r\n public type: string = ACTION.RECEIVE_LOAD_USER;\r\n public data: UserWireData;\r\n\r\n constructor(data: UserWireData) {\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class FailLoadUser {\r\n public type: string = ACTION.FAIL_LOAD_USER;\r\n}\r\n\r\nexport class RequestLoadUserAccess {\r\n public type: string = ACTION.REQUEST_LOAD_USER_ACCESS;\r\n}\r\n\r\nexport class ReceiveLoadUserAccess {\r\n public type: string = ACTION.RECEIVE_LOAD_USER_ACCESS;\r\n public accessPerson: AccessPerson;\r\n\r\n constructor(accessPerson: AccessPerson) {\r\n this.accessPerson = accessPerson;\r\n }\r\n}\r\n\r\nexport class FailLoadUserAccess {\r\n public type: string = ACTION.FAIL_LOAD_USER_ACCESS;\r\n}\r\n\r\nexport class RequestAddUser {\r\n public type: string = ACTION.REQUEST_ADD_USER;\r\n}\r\n\r\nexport class ReceiveAddUser {\r\n public type: string = ACTION.RECEIVE_ADD_USER;\r\n}\r\n\r\nexport class RequestUpdateUser {\r\n public type: string = ACTION.REQUEST_UPDATE_USER;\r\n}\r\n\r\nexport class ReceiveUpdateUser {\r\n public type: string = ACTION.RECEIVE_UPDATE_USER;\r\n}\r\n\r\nexport class FailUserExecute {\r\n public type: string = ACTION.FAIL_USER_EXECUTE;\r\n}\r\n\r\nexport class ClearSelectedCurrentUserGroup {\r\n public type: string = ACTION.CLEAR_SELECTED_CURRENT_USER_GROUP;\r\n}\r\n\r\nexport class ClearUserData {\r\n public type: string = ACTION.CLEAR_USER_DATA;\r\n}\r\n\r\nexport class RequestChangePersonId {\r\n public type: string = ACTION.REQUEST_CHANGE_USER_ID;\r\n}\r\n\r\nexport class ReceiveChangePersonId {\r\n public type: string = ACTION.RECEIVE_CHANGE_USER_ID;\r\n public personId: string;\r\n constructor(personId: string) {\r\n this.personId = personId;\r\n }\r\n}\r\n\r\nexport class FailChangePersonId {\r\n public type: string = ACTION.FAIL_CHANGE_USER_ID;\r\n}\r\n\r\nexport class RequestExtraInfo {\r\n public type: string = ACTION.REQUEST_EXTRA_INFO;\r\n}\r\n\r\nexport class ReceiveExtraInfo {\r\n public type: string = ACTION.RECEIVE_EXTRA_INFO;\r\n constructor(public values: ExtraInfoCodeValues[]) { }\r\n}\r\n\r\nexport class FailExtraInfo {\r\n public type: string = ACTION.FAIL_EXTRA_INFO;\r\n}\r\n\r\nexport class RequestPersonOptions {\r\n public type: string = ACTION.REQUEST_PERSON_OPTIONS;\r\n}\r\n\r\nexport class ReceivePersonOptions {\r\n public type: string = ACTION.RECEIVE_PERSON_OPTIONS;\r\n constructor(public values: Value[]) { }\r\n}\r\n\r\nexport class FailPersonOptions {\r\n public type: string = ACTION.FAIL_PERSON_OPTIONS;\r\n}\r\n\r\nexport class RequestRole {\r\n public type: string = ACTION.REQUEST_ROLE;\r\n constructor(public id: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveRole {\r\n public type: string = ACTION.RECEIVE_ROLE;\r\n constructor(public id: number, public data: Person) {\r\n }\r\n}\r\n\r\nexport class FailRole {\r\n public type: string = ACTION.FAIL_ROLE;\r\n constructor(public id: number) {\r\n }\r\n}\r\n\r\nexport class UpdateAccessData {\r\n public type: string = ACTION.UPDATE_ACCESS_DATA;\r\n public key: string;\r\n public accessItem: Partial<AccessItem>;\r\n\r\n constructor(key: string, accessItem: Partial<AccessItem>) {\r\n this.key = key;\r\n this.accessItem = accessItem;\r\n }\r\n}\r\n\r\nexport class RequestRolePanelAccess {\r\n public type: string = ACTION.REQUEST_ROLE_PANEL_ACCESS;\r\n}\r\n\r\nexport class ReceiveRolePanelAccess {\r\n public type: string = ACTION.RECEIVE_ROLE_PANEL_ACCESS;\r\n constructor(public values: Value[]) { }\r\n}\r\n\r\nexport class FailRolePanelAccess {\r\n public type: string = ACTION.FAIL_ROLE_PANEL_ACCESS;\r\n}\r\n\r\nexport class RequestChangeDatabaseAccount {\r\n public type: string = ACTION.REQUEST_CHANGE_DATABASE_ACCOUNT;\r\n}\r\n\r\nexport class ReceiveChangeDatabaseAccount {\r\n public type: string = ACTION.RECEIVE_CHANGE_DATABASE_ACCOUNT;\r\n}\r\n\r\nexport class FailChangeDatabaseAccount {\r\n public type: string = ACTION.FAIL_CHANGE_DATABASE_ACCOUNT;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { withOptionsReducer } from 'app/components/options-handler';\r\nimport { AccessItem } from 'app/components/access-panel/shared/types';\r\nimport {\r\n ACTION, ClearUserData, RequestLoadUser, ReceiveLoadUser, FailLoadUser,\r\n RequestLoadUserAccess, ReceiveLoadUserAccess, FailLoadUserAccess,\r\n RequestAddUser, RequestUpdateUser, ReceiveAddUser, ReceiveUpdateUser, FailUserExecute,\r\n RequestChangePersonId, ReceiveChangePersonId, FailChangePersonId,\r\n RequestExtraInfo, ReceiveExtraInfo, FailExtraInfo,\r\n RequestPersonOptions, ReceivePersonOptions, FailPersonOptions,\r\n RequestRole, ReceiveRole, FailRole, UpdateAccessData,\r\n RequestRolePanelAccess, ReceiveRolePanelAccess, FailRolePanelAccess,\r\n RequestChangeDatabaseAccount, ReceiveChangeDatabaseAccount, FailChangeDatabaseAccount,\r\n ValidationChange, ClearValidation\r\n} from './action-types';\r\nimport { AdministrationUserEditState } from './types-store';\r\nimport { clearValidation } from 'app/components/access-panel/validation/validation-messages';\r\n\r\nexport const INITIAL_ADMINISTRATION_STATE: AdministrationUserEditState = {\r\n data: undefined,\r\n accessPerson: undefined,\r\n role: undefined,\r\n accessData: {},\r\n validation: {},\r\n extraInfoCodes: {\r\n fetching: false,\r\n values: []\r\n },\r\n personOptionsCodes: {\r\n fetching: false,\r\n values: []\r\n },\r\n rolePanelAccess: false,\r\n fetchingLoadUser: false,\r\n fetchingSaveUser: false,\r\n fetchingDatabaseAccount: false,\r\n fetchingChangePersonId: false,\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nexport const reducers: { [indexer: string]: Reducer<AdministrationUserEditState> } = {\r\n\r\n [ACTION.CLEAR_USER_DATA]: (state: AdministrationUserEditState, action: ClearUserData): AdministrationUserEditState => {\r\n return { ...state, ...INITIAL_ADMINISTRATION_STATE };\r\n },\r\n\r\n [ACTION.REQUEST_LOAD_USER]: (state: AdministrationUserEditState, action: RequestLoadUser): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingLoadUser: true,\r\n data: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_USER]: (state: AdministrationUserEditState, action: ReceiveLoadUser): AdministrationUserEditState => {\r\n const { language, location, unit, mainUserGroup, currentUserGroup, userType, accessRole, ...restUserInfo } = action.data as any;\r\n return {\r\n ...state,\r\n fetchingLoadUser: false,\r\n data: {\r\n language: codeItemToStoreValue(language),\r\n location: codeItemToStoreValue(location),\r\n unit: codeItemToStoreValue(unit),\r\n mainUserGroup: codeItemToStoreValue(mainUserGroup),\r\n currentUserGroup: codeItemToStoreValue(currentUserGroup),\r\n userType: codeItemToStoreValue(userType),\r\n accessRole: codeItemToStoreValue(accessRole),\r\n ...restUserInfo\r\n }\r\n };\r\n\r\n },\r\n\r\n [ACTION.FAIL_LOAD_USER]: (state: AdministrationUserEditState, action: FailLoadUser): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingLoadUser: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_LOAD_USER_ACCESS]: (state: AdministrationUserEditState, action: RequestLoadUserAccess): AdministrationUserEditState => {\r\n return state;\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_USER_ACCESS]: (state: AdministrationUserEditState, action: ReceiveLoadUserAccess): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n accessPerson: action.accessPerson\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LOAD_USER_ACCESS]: (state: AdministrationUserEditState, action: FailLoadUserAccess): AdministrationUserEditState => {\r\n return state;\r\n },\r\n\r\n [ACTION.REQUEST_ADD_USER]: (state: AdministrationUserEditState, action: RequestAddUser): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveUser: true\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_UPDATE_USER]: (state: AdministrationUserEditState, action: RequestUpdateUser): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveUser: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_ADD_USER]: (state: AdministrationUserEditState, action: ReceiveAddUser): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveUser: false\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_UPDATE_USER]: (state: AdministrationUserEditState, action: ReceiveUpdateUser): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveUser: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_USER_EXECUTE]: (state: AdministrationUserEditState, action: FailUserExecute): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveUser: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_CHANGE_USER_ID]: (state: AdministrationUserEditState, action: RequestChangePersonId): AdministrationUserEditState => {\r\n\r\n return {\r\n ...state,\r\n fetchingChangePersonId: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CHANGE_USER_ID]: (state: AdministrationUserEditState, action: ReceiveChangePersonId): AdministrationUserEditState => {\r\n\r\n return {\r\n ...state,\r\n fetchingChangePersonId: false,\r\n ...(state.data ? {\r\n data: {\r\n ...state.data,\r\n personId: action.personId\r\n }\r\n } : {})\r\n };\r\n },\r\n\r\n [ACTION.FAIL_CHANGE_USER_ID]: (state: AdministrationUserEditState, action: FailChangePersonId): AdministrationUserEditState => {\r\n\r\n return {\r\n ...state,\r\n fetchingChangePersonId: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_EXTRA_INFO]: (state: AdministrationUserEditState, action: RequestExtraInfo): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n extraInfoCodes: {\r\n fetching: true,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_EXTRA_INFO]: (state: AdministrationUserEditState, action: ReceiveExtraInfo): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n extraInfoCodes: {\r\n fetching: false,\r\n values: action.values\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_EXTRA_INFO]: (state: AdministrationUserEditState, action: FailExtraInfo): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n extraInfoCodes: {\r\n fetching: false,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_PERSON_OPTIONS]: (state: AdministrationUserEditState, action: RequestPersonOptions): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n personOptionsCodes: {\r\n fetching: true,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_PERSON_OPTIONS]: (state: AdministrationUserEditState, action: ReceivePersonOptions): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n personOptionsCodes: {\r\n fetching: false,\r\n values: action.values\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_PERSON_OPTIONS]: (state: AdministrationUserEditState, action: FailPersonOptions): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n personOptionsCodes: {\r\n fetching: false,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_ROLE]: (state: AdministrationUserEditState, action: RequestRole): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n role: {\r\n id: action.id,\r\n fetching: true\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_ROLE]: (state: AdministrationUserEditState, action: ReceiveRole): AdministrationUserEditState => {\r\n\r\n if (!state.role || (action.id !== undefined && action.id !== state.role.id)) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n role: {\r\n id: action.id,\r\n fetching: false,\r\n data: action.data\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_ROLE]: (state: AdministrationUserEditState, action: FailRole): AdministrationUserEditState => {\r\n\r\n if (!state.role || state.role.id !== action.id) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n role: {\r\n id: action.id,\r\n fetching: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_ACCESS_DATA]: (state: AdministrationUserEditState, action: UpdateAccessData): AdministrationUserEditState => {\r\n\r\n const accessData = state.accessData || {};\r\n const accessItem = accessData[action.key] || {} as AccessItem;\r\n\r\n return {\r\n ...state,\r\n accessData: {\r\n ...accessData,\r\n [action.key]: {\r\n ...accessItem,\r\n ...action.accessItem\r\n }\r\n }\r\n };\r\n },\r\n [ACTION.REQUEST_ROLE_PANEL_ACCESS]: (state: AdministrationUserEditState, action: RequestRolePanelAccess): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n rolePanelAccess: false\r\n };\r\n },\r\n [ACTION.RECEIVE_ROLE_PANEL_ACCESS]: (state: AdministrationUserEditState, action: ReceiveRolePanelAccess): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n rolePanelAccess: !!action.values.length\r\n };\r\n },\r\n [ACTION.FAIL_ROLE_PANEL_ACCESS]: (state: AdministrationUserEditState, action: FailRolePanelAccess): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n rolePanelAccess: false\r\n };\r\n },\r\n [ACTION.REQUEST_CHANGE_DATABASE_ACCOUNT]: (state: AdministrationUserEditState,\r\n action: RequestChangeDatabaseAccount): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingDatabaseAccount: true\r\n };\r\n },\r\n [ACTION.RECEIVE_CHANGE_DATABASE_ACCOUNT]: (state: AdministrationUserEditState,\r\n action: ReceiveChangeDatabaseAccount): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingDatabaseAccount: false\r\n };\r\n },\r\n [ACTION.FAIL_CHANGE_DATABASE_ACCOUNT]: (state: AdministrationUserEditState,\r\n action: FailChangeDatabaseAccount): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n fetchingDatabaseAccount: false\r\n };\r\n },\r\n\r\n [ACTION.VALIDATION_CHANGE]: (state: AdministrationUserEditState, action: ValidationChange): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n validation: action.validation\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_VALIDATION]: (state: AdministrationUserEditState, action: ClearValidation): AdministrationUserEditState => {\r\n return {\r\n ...state,\r\n validation: clearValidation(state.validation, action.formName, action.parameters)\r\n };\r\n }\r\n};\r\n\r\nexport const stateReducer: Reducer<AdministrationUserEditState> =\r\n (state: AdministrationUserEditState = INITIAL_ADMINISTRATION_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.administrationEdit)(state, action);\r\n };\r\n\r\nexport const reducer = withOptionsReducer(STATE.administrationEdit, stateReducer);\r\n","import { SearchData, SearchArea, FilterSearchModel } from './types-store';\r\nimport { FilterMenuValues, Filter, FilterValidation, FilterCommonValues, FilterCommonTypes } from './filters/types';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { AccessPerson } from 'app/components/access-panel/shared/types';\r\n\r\nexport const ACTION = {\r\n CLEAR_LIST: 'ADMINISTRATION_SEARCH:CLEAR_LIST',\r\n\r\n REQUEST_PERSON_ACCESS: 'ADMINISTRATION_SEARCH:REQUEST_PERSON_ACCESS',\r\n RECEIVE_PERSON_ACCESS: 'ADMINISTRATION_SEARCH:RECEIVE_PERSON_ACCESS',\r\n FAIL_PERSON_ACCESS: 'ADMINISTRATION_SEARCH:FAIL_PERSON_ACCESS',\r\n CLEAR_PERSON_ACCESS: 'ADMINISTRATION_SEARCH:CLEAR_PERSON_ACCESS',\r\n\r\n REQUEST_LIST: 'ADMINISTRATION_SEARCH:REQUEST_LIST',\r\n RECEIVE_LIST: 'ADMINISTRATION_SEARCH:RECEIVE_LIST',\r\n FAIL_LIST: 'ADMINISTRATION_SEARCH:FAIL_LIST',\r\n\r\n REQUEST_DELETE: 'ADMINISTRATION_SEARCH:REQUEST_DELETE',\r\n RECEIVE_DELETE: 'ADMINISTRATION_SEARCH:RECEIVE_DELETE',\r\n FAIL_DELETE: 'ADMINISTRATION_SEARCH:FAIL_DELETE',\r\n\r\n REQUEST_EXPORT_EXCEL: 'ADMINISTRATION_SEARCH:REQUEST_EXPORT_EXCEL',\r\n RECEIVE_EXPORT_EXCEL: 'ADMINISTRATION_SEARCH:RECEIVE_EXPORT_EXCEL',\r\n FAIL_EXPORT_EXCEL: 'ADMINISTRATION_SEARCH:FAIL_EXPORT_EXCEL',\r\n\r\n UPDATE_SEARCH_DEFINITION: 'ADMINISTRATION_SEARCH:UPDATE_SEARCH_DEFINITION',\r\n\r\n UPDATE_FILTER_VALUES: 'ADMINISTRATION_SEARCH:UPDATE_FILTER_VALUES',\r\n UPDATE_FILTER_MENU_VALUES: 'ADMINISTRATION_SEARCH:UPDATE_FILTER_MENU_VALUES',\r\n UPDATE_FILTER_VALIDATION: 'ADMINISTRATION_SEARCH:UPDATE_FILTER_VALIDATION',\r\n CLEAR_ALL_FILTERS: 'ADMINISTRATION_SEARCH:CLEAR_ALL_FILTERS',\r\n OPEN_CLOSE_FILTER: 'ADMINISTRATION_SEARCH:OPEN_CLOSE_FILTER',\r\n\r\n UPDATE_QUERY: 'ADMINISTRATION_SEARCH:UPDATE_QUERY',\r\n UPDATE_QUERY_VALUE: 'ADMINISTRATION_SEARCH:UPDATE_QUERY_VALUE',\r\n UPDATE_QUERY_VALUES: 'ADMINISTRATION_SEARCH:UPDATE_QUERY_VALUES',\r\n CLEAR_QUERY: 'ADMINISTRATION_SEARCH:CLEAR_QUERY'\r\n};\r\n\r\nexport class ClearList {\r\n public type: string = ACTION.CLEAR_LIST;\r\n constructor(public requestId: number) {\r\n }\r\n}\r\n\r\nexport class RequestPersonAccess {\r\n public type: string = ACTION.REQUEST_PERSON_ACCESS;\r\n}\r\n\r\nexport class ReceivePersonAccess {\r\n public type: string = ACTION.RECEIVE_PERSON_ACCESS;\r\n constructor(public access: AccessPerson) { }\r\n}\r\n\r\nexport class FailPersonAccess {\r\n public type: string = ACTION.FAIL_PERSON_ACCESS;\r\n constructor(public requestId: number) {\r\n }\r\n}\r\n\r\nexport class ClearPersonAccess {\r\n public type: string = ACTION.CLEAR_PERSON_ACCESS;\r\n}\r\n\r\nexport class RequestList {\r\n public type: string = ACTION.REQUEST_LIST;\r\n constructor(public requestId: number, public model: FilterSearchModel, public clearResults: boolean) {\r\n }\r\n}\r\n\r\nexport class ReceiveList {\r\n public type: string = ACTION.RECEIVE_LIST;\r\n constructor(public requestId: number, public list: SearchData[], public total: number) { }\r\n}\r\n\r\nexport class FailList {\r\n public type: string = ACTION.FAIL_LIST;\r\n constructor(public requestId: number) {\r\n }\r\n}\r\n\r\nexport class RequestDelete {\r\n public type: string = ACTION.REQUEST_DELETE;\r\n constructor(public id: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveDelete {\r\n public type: string = ACTION.RECEIVE_DELETE;\r\n constructor(public id: number) {\r\n }\r\n}\r\n\r\nexport class FailDelete {\r\n public type: string = ACTION.FAIL_DELETE;\r\n constructor(public id: number) {\r\n }\r\n}\r\n\r\nexport class RequestExportExcel {\r\n public type: string = ACTION.REQUEST_EXPORT_EXCEL;\r\n}\r\n\r\nexport class ReceiveExportExcel {\r\n public type: string = ACTION.RECEIVE_EXPORT_EXCEL;\r\n}\r\n\r\nexport class FailExportExcel {\r\n public type: string = ACTION.FAIL_EXPORT_EXCEL;\r\n}\r\n\r\nexport class UpdateSearchDefinition {\r\n public type: string = ACTION.UPDATE_SEARCH_DEFINITION;\r\n constructor(public area: SearchArea,\r\n public query: ComplexValue<number | string>[],\r\n public predefined: ComplexValue<number | string>[],\r\n public custom: Filter[]) {\r\n }\r\n}\r\n\r\nexport class UpdateFilterValues {\r\n public type: string = ACTION.UPDATE_FILTER_VALUES;\r\n constructor(public id: string, public values: FilterCommonValues<FilterCommonTypes>[]) {\r\n }\r\n}\r\n\r\nexport class UpdateFilterMenuValues {\r\n public type: string = ACTION.UPDATE_FILTER_MENU_VALUES;\r\n constructor(public id: string, public values: FilterMenuValues) {\r\n }\r\n}\r\n\r\nexport class UpdateFilterValidation {\r\n public type: string = ACTION.UPDATE_FILTER_VALIDATION;\r\n constructor(public filterValidation: FilterValidation) {\r\n }\r\n}\r\n\r\nexport class ClearAllFilters {\r\n public type: string = ACTION.CLEAR_ALL_FILTERS;\r\n}\r\n\r\nexport class OpenCloseFilter {\r\n public type: string = ACTION.OPEN_CLOSE_FILTER;\r\n constructor(public id: string, public open: boolean) {\r\n }\r\n}\r\n\r\nexport class UpdateQuery {\r\n public type: string = ACTION.UPDATE_QUERY;\r\n constructor(public query: string) {\r\n }\r\n}\r\n\r\nexport class UpdateQueryValue {\r\n public type: string = ACTION.UPDATE_QUERY_VALUE;\r\n constructor(public value: ComplexValue<number | string>) {\r\n }\r\n}\r\n\r\nexport class SetQueryValues {\r\n public type: string = ACTION.UPDATE_QUERY_VALUES;\r\n constructor(public values: ComplexValue<number | string>[]) {\r\n }\r\n}\r\n\r\nexport class ClearQuery {\r\n public type: string = ACTION.CLEAR_QUERY;\r\n}\r\n","import { Value, ComplexValue } from 'app/types-shared';\r\nimport { FilterMenuValues, Filter, FilterValidation, FilterPayloadValues, FilterCommonTypes } from './filters/types';\r\nimport { AccessPerson } from 'app/components/access-panel/shared/types';\r\n\r\nexport enum SearchArea {\r\n none = 'none',\r\n user = 'user',\r\n role = 'role'\r\n}\r\n\r\nexport interface AdministrationSearchState {\r\n results: SearchResults;\r\n requestedSearchModel: FilterSearchModel;\r\n query: string;\r\n queryValues: ComplexValue<number | string>[];\r\n filterValues: FilterPayloadValues<FilterCommonTypes>;\r\n filterMenuValues: { [key: string]: FilterMenuValues };\r\n filterValidation: FilterValidation[];\r\n filterOpen: { [key: string]: boolean };\r\n searchDefinition: {\r\n area: SearchArea;\r\n query: ComplexValue<number | string>[];\r\n predefined: ComplexValue<number | string>[];\r\n custom: Filter[];\r\n };\r\n textsFetching?: boolean;\r\n exportExcelFetching?: boolean;\r\n texts?: any;\r\n}\r\n\r\nexport interface ItemPersonAccess {\r\n access?: AccessPerson;\r\n fetching: boolean;\r\n}\r\n\r\nexport interface SearchResults {\r\n fetching: boolean;\r\n list: SearchData[];\r\n itemPersonAccess?: ItemPersonAccess;\r\n total: number;\r\n requestId: number;\r\n}\r\n\r\nexport interface FilterSearchModel {\r\n query?: {\r\n text: string;\r\n searchInName?: boolean;\r\n searchInPersonId?: boolean;\r\n searchInAlternativeId?: boolean;\r\n searchInAlternativeName?: boolean;\r\n searchInEmail?: boolean;\r\n };\r\n [key: string]: any;\r\n}\r\n\r\nexport interface SearchData {\r\n id: number;\r\n personId: string;\r\n name: string;\r\n emailAddress: string;\r\n mainUserGroup: string;\r\n role: Value;\r\n\r\n deleted?: boolean;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport {\r\n ACTION,\r\n ClearList, RequestList, ReceiveList, FailList,\r\n RequestDelete, ReceiveDelete, FailDelete,\r\n UpdateFilterValues, UpdateFilterMenuValues, UpdateFilterValidation, ClearAllFilters, OpenCloseFilter,\r\n UpdateQuery, UpdateQueryValue, SetQueryValues, ClearQuery, UpdateSearchDefinition,\r\n RequestPersonAccess, ReceivePersonAccess, FailPersonAccess, ClearPersonAccess, RequestExportExcel, ReceiveExportExcel, FailExportExcel\r\n} from './action-types';\r\nimport { AdministrationSearchState, SearchArea } from './types-store';\r\nimport { STATE } from 'app/constants';\r\nimport { withOptionsReducer } from 'app/components/options-handler';\r\n\r\nexport const INITIAL_ADMINISTRATION_LIST_STATE: AdministrationSearchState = {\r\n results: {\r\n list: [],\r\n itemPersonAccess: {\r\n fetching: false\r\n },\r\n total: 0,\r\n fetching: false,\r\n requestId: 0\r\n },\r\n requestedSearchModel: undefined,\r\n searchDefinition: {\r\n area: SearchArea.none,\r\n query: [],\r\n predefined: [],\r\n custom: []\r\n },\r\n query: '',\r\n queryValues: [],\r\n filterValues: {},\r\n filterMenuValues: {},\r\n filterValidation: [],\r\n filterOpen: {},\r\n exportExcelFetching: false\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<AdministrationSearchState> } = {\r\n\r\n [ACTION.CLEAR_LIST]: (state: AdministrationSearchState, action: ClearList): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n results: {\r\n list: [],\r\n total: undefined,\r\n fetching: false,\r\n requestId: action.requestId\r\n },\r\n requestedSearchModel: undefined\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_PERSON_ACCESS]: (state: AdministrationSearchState, action: RequestPersonAccess): AdministrationSearchState => {\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n itemPersonAccess: {\r\n fetching: true\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_PERSON_ACCESS]: (state: AdministrationSearchState, action: ReceivePersonAccess): AdministrationSearchState => {\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n itemPersonAccess: {\r\n access: action.access,\r\n fetching: false\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_PERSON_ACCESS]: (state: AdministrationSearchState, action: FailPersonAccess): AdministrationSearchState => {\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n itemPersonAccess: {\r\n fetching: false\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_PERSON_ACCESS]: (state: AdministrationSearchState, action: ClearPersonAccess): AdministrationSearchState => {\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n itemPersonAccess: undefined\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_LIST]: (state: AdministrationSearchState, action: RequestList): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n ...(action.clearResults && {\r\n list: [],\r\n total: undefined\r\n }),\r\n fetching: true,\r\n requestId: action.requestId\r\n },\r\n requestedSearchModel: action.model\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LIST]: (state: AdministrationSearchState, action: ReceiveList): AdministrationSearchState => {\r\n\r\n if (action.requestId !== state.results.requestId) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n fetching: false,\r\n list: [\r\n ...state.results.list,\r\n ...action.list\r\n ],\r\n total: action.total\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LIST]: (state: AdministrationSearchState, action: FailList): AdministrationSearchState => {\r\n\r\n if (action.requestId !== state.results.requestId) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n fetching: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_DELETE]: (state: AdministrationSearchState, action: RequestDelete): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n list: state.results.list.map(item => item.id === action.id\r\n ? {\r\n ...item,\r\n deleted: true\r\n }\r\n : item)\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_DELETE]: (state: AdministrationSearchState, action: ReceiveDelete): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n list: state.results.list.filter(item => item.id !== action.id),\r\n total: state.results.total - 1\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DELETE]: (state: AdministrationSearchState, action: FailDelete): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n results: {\r\n ...state.results,\r\n list: state.results.list.map(item => item.id === action.id\r\n ? {\r\n ...item,\r\n deleted: undefined\r\n }\r\n : item)\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_EXPORT_EXCEL]: (state: AdministrationSearchState, action: RequestExportExcel): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n exportExcelFetching: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_EXPORT_EXCEL]: (state: AdministrationSearchState, action: ReceiveExportExcel): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n exportExcelFetching: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_EXPORT_EXCEL]: (state: AdministrationSearchState, action: FailExportExcel): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n exportExcelFetching: false\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_SEARCH_DEFINITION]: (state: AdministrationSearchState, action: UpdateSearchDefinition): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n searchDefinition: {\r\n area: action.area,\r\n query: action.query,\r\n predefined: action.predefined,\r\n custom: action.custom\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_FILTER_VALUES]: (state: AdministrationSearchState, action: UpdateFilterValues): AdministrationSearchState => {\r\n\r\n const values = action.values && action.values.length > 0 ? action.values : undefined;\r\n if (state.filterValues[action.id] === values) {\r\n return state;\r\n }\r\n\r\n if (!values || !values[0] || values[0].value === undefined || values[0].value === '') {\r\n const { [action.id]: _, ...filteredValues } = state.filterValues;\r\n return {\r\n ...state,\r\n filterValues: filteredValues\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n filterValues: {\r\n ...state.filterValues,\r\n [action.id]: values\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_FILTER_MENU_VALUES]: (state: AdministrationSearchState, action: UpdateFilterMenuValues): AdministrationSearchState => {\r\n\r\n if (state.filterMenuValues[action.id] === action.values) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n filterMenuValues: {\r\n ...state.filterMenuValues,\r\n [action.id]: action.values\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_FILTER_VALIDATION]: (state: AdministrationSearchState, action: UpdateFilterValidation): AdministrationSearchState => {\r\n\r\n const existingValidation = state.filterValidation.find(validation => validation.id === action.filterValidation.id);\r\n\r\n let filterValidation;\r\n\r\n if (existingValidation) {\r\n filterValidation = state.filterValidation.map(validation => validation.id === existingValidation.id ? {\r\n id: existingValidation.id,\r\n validation: action.filterValidation.validation\r\n } : validation);\r\n } else {\r\n filterValidation = [\r\n ...state.filterValidation,\r\n action.filterValidation\r\n ];\r\n }\r\n\r\n return {\r\n ...state,\r\n filterValidation\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_ALL_FILTERS]: (state: AdministrationSearchState, action: ClearAllFilters): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n filterValues: {},\r\n filterMenuValues: {},\r\n filterOpen: {}\r\n };\r\n },\r\n\r\n [ACTION.OPEN_CLOSE_FILTER]: (state: AdministrationSearchState, action: OpenCloseFilter): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n filterOpen: {\r\n ...state.filterOpen,\r\n [action.id]: action.open\r\n }\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_QUERY]: (state: AdministrationSearchState, action: UpdateQuery): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n query: action.query\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_QUERY_VALUE]: (state: AdministrationSearchState, action: UpdateQueryValue): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n queryValues: state.queryValues.some(o => o.value === action.value.value)\r\n ? state.queryValues.filter(o => o.value !== action.value.value)\r\n : [...state.queryValues, action.value]\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_QUERY_VALUES]: (state: AdministrationSearchState, action: SetQueryValues): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n queryValues: action.values\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_QUERY]: (state: AdministrationSearchState, action: ClearQuery): AdministrationSearchState => {\r\n\r\n return {\r\n ...state,\r\n query: '',\r\n queryValues: []\r\n };\r\n }\r\n};\r\n\r\nconst stateReducer: Reducer<AdministrationSearchState> =\r\n (state: AdministrationSearchState = INITIAL_ADMINISTRATION_LIST_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n };\r\n\r\nexport const reducer = withOptionsReducer(STATE.administrationSearch, stateReducer);\r\n","import { Person, AccessPerson, AccessItem, ExtraInfoCodeValues } from 'app/components/access-panel/shared/types';\r\nimport { Value } from 'app/types-shared';\r\n\r\nexport const ACTION = {\r\n REQUEST_LOAD_ROLE: 'ADMINISTRATION_EDIT_ROLE:REQUEST_LOAD_ROLE',\r\n RECEIVE_LOAD_ROLE: 'ADMINISTRATION_EDIT_ROLE:RECEIVE_LOAD_ROLE',\r\n FAIL_LOAD_ROLE: 'ADMINISTRATION_EDIT_ROLE:FAIL_LOAD_ROLE',\r\n REQUEST_LOAD_ROLE_ACCESS: 'ADMINISTRATION_EDIT_ROLE:REQUEST_LOAD_ROLE_ACCESS',\r\n RECEIVE_LOAD_ROLE_ACCESS: 'ADMINISTRATION_EDIT_ROLE:RECEIVE_LOAD_ROLE_ACCESS',\r\n FAIL_LOAD_ROLE_ACCESS: 'ADMINISTRATION_EDIT_ROLE:FAIL_LOAD_ROLE_ACCESS',\r\n REQUEST_ADD_ROLE: 'ADMINISTRATION_EDIT_ROLE:REQUEST_ADD_ROLE',\r\n RECEIVE_ADD_ROLE: 'ADMINISTRATION_EDIT_ROLE:RECEIVE_ADD_ROLE',\r\n REQUEST_UPDATE_ROLE: 'ADMINISTRATION_EDIT_ROLE:REQUEST_UPDATE_ROLE',\r\n RECEIVE_UPDATE_ROLE: 'ADMINISTRATION_EDIT_ROLE:RECEIVE_UPDATE_ROLE',\r\n FAIL_ROLE_SAVE: 'ADMINISTRATION_EDIT_ROLE:FAIL_ROLE_SAVE',\r\n REQUEST_ROLE_DELETE: 'ADMINISTRATION_EDIT_ROLE:REQUEST_ROLE_DELETE',\r\n REQUEST_EXTRA_INFO: 'ADMINISTRATION_EDIT_ROLE:REQUEST_EXTRA_INFO',\r\n RECEIVE_EXTRA_INFO: 'ADMINISTRATION_EDIT_ROLE:RECEIVE_EXTRA_INFO',\r\n FAIL_EXTRA_INFO: 'ADMINISTRATION_EDIT_ROLE:FAIL_EXTRA_INFO',\r\n REQUEST_PERSON_OPTIONS: 'ADMINISTRATION_EDIT_ROLE:REQUEST_PERSON_OPTIONS',\r\n RECEIVE_PERSON_OPTIONS: 'ADMINISTRATION_EDIT_ROLE:RECEIVE_PERSON_OPTIONS',\r\n FAIL_PERSON_OPTIONS: 'ADMINISTRATION_EDIT_ROLE:FAIL_PERSON_OPTIONS',\r\n PROCESS_ROLE_FAILED: 'ADMINISTRATION_EDIT_ROLE:PROCESS_ROLE_FAILED',\r\n CLEAR_ROLE_DATA: 'ADMINISTRATION_EDIT_ROLE:CLEAR_ROLE_DATA',\r\n CLEAR_VALIDATION: 'ADMINISTRATION_EDIT_ROLE:CLEAR_VALIDATION',\r\n UPDATE_ACCESS_DATA: 'ADMINISTRATION_EDIT_ROLE:UPDATE_ACCESS_DATA'\r\n};\r\n\r\nexport class RequestAddRole {\r\n public type: string = ACTION.REQUEST_ADD_ROLE;\r\n}\r\n\r\nexport class ReceiveAddRole {\r\n public type: string = ACTION.RECEIVE_ADD_ROLE;\r\n}\r\n\r\nexport class RequestUpdateRole {\r\n public type: string = ACTION.REQUEST_UPDATE_ROLE;\r\n}\r\n\r\nexport class ReceiveUpdateRole {\r\n public type: string = ACTION.RECEIVE_UPDATE_ROLE;\r\n}\r\n\r\nexport class FailRoleExecute {\r\n public type: string = ACTION.FAIL_ROLE_SAVE;\r\n}\r\n\r\nexport class RequestRoleDelete {\r\n public type: string = ACTION.REQUEST_ROLE_DELETE;\r\n}\r\n\r\nexport class RequestLoadRole {\r\n public type: string = ACTION.REQUEST_LOAD_ROLE;\r\n}\r\n\r\nexport class ReceiveLoadRole {\r\n public type: string = ACTION.RECEIVE_LOAD_ROLE;\r\n public data: Person;\r\n\r\n constructor(data: Person) {\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class FailLoadRole {\r\n public type: string = ACTION.FAIL_LOAD_ROLE;\r\n}\r\n\r\nexport class RequestLoadRoleAccess {\r\n public type: string = ACTION.REQUEST_LOAD_ROLE_ACCESS;\r\n}\r\n\r\nexport class ReceiveLoadRoleAccess {\r\n public type: string = ACTION.RECEIVE_LOAD_ROLE_ACCESS;\r\n public accessPerson: AccessPerson;\r\n\r\n constructor(accessPerson: AccessPerson) {\r\n this.accessPerson = accessPerson;\r\n }\r\n}\r\n\r\nexport class FailLoadRoleAccess {\r\n public type: string = ACTION.FAIL_LOAD_ROLE_ACCESS;\r\n}\r\n\r\nexport class RequestExtraInfo {\r\n public type: string = ACTION.REQUEST_EXTRA_INFO;\r\n}\r\n\r\nexport class ReceiveExtraInfo {\r\n public type: string = ACTION.RECEIVE_EXTRA_INFO;\r\n constructor(public values: ExtraInfoCodeValues[]) { }\r\n}\r\n\r\nexport class FailExtraInfo {\r\n public type: string = ACTION.FAIL_EXTRA_INFO;\r\n}\r\n\r\nexport class RequestPersonOptions {\r\n public type: string = ACTION.REQUEST_PERSON_OPTIONS;\r\n}\r\n\r\nexport class ReceivePersonOptions {\r\n public type: string = ACTION.RECEIVE_PERSON_OPTIONS;\r\n constructor(public values: Value[]) { }\r\n}\r\n\r\nexport class FailPersonOptions {\r\n public type: string = ACTION.FAIL_PERSON_OPTIONS;\r\n}\r\n\r\nexport class ProcessRoleFailed {\r\n public type: string = ACTION.PROCESS_ROLE_FAILED;\r\n public errors: any;\r\n constructor(errors: any) {\r\n this.errors = errors;\r\n }\r\n}\r\n\r\nexport class ClearRoleData {\r\n public type: string = ACTION.CLEAR_ROLE_DATA;\r\n}\r\n\r\nexport class ClearValidation {\r\n\r\n public type: string = ACTION.CLEAR_VALIDATION;\r\n\r\n constructor(public formName: string,\r\n public parameters: { [key: string]: number | string }) {\r\n }\r\n}\r\n\r\nexport class UpdateAccessData {\r\n public type: string = ACTION.UPDATE_ACCESS_DATA;\r\n public key: string;\r\n public accessItem: Partial<AccessItem>;\r\n\r\n constructor(key: string, accessItem: Partial<AccessItem>) {\r\n this.key = key;\r\n this.accessItem = accessItem;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { STATE } from 'app/constants';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { AdministrationRoleEditState } from './types-store';\r\nimport {\r\n ACTION, RequestLoadRole, ReceiveLoadRole, FailLoadRole,\r\n RequestLoadRoleAccess, ReceiveLoadRoleAccess, FailLoadRoleAccess,\r\n RequestExtraInfo, ReceiveExtraInfo, FailExtraInfo,\r\n RequestPersonOptions, ReceivePersonOptions, FailPersonOptions,\r\n RequestAddRole, ReceiveAddRole, FailRoleExecute, ProcessRoleFailed,\r\n RequestUpdateRole, ReceiveUpdateRole, RequestRoleDelete,\r\n ClearRoleData, UpdateAccessData, ClearValidation\r\n} from './action-types'; import { withOptionsReducer } from 'app/components/options-handler';\r\nimport { AccessItem } from 'app/components/access-panel/shared/types';\r\nimport { clearValidation } from 'app/components/access-panel/validation/validation-messages';\r\n\r\nexport const INITIAL_ADMINISTRATION_ROLE_EDIT_STATE: AdministrationRoleEditState = {\r\n fetchingLoadRole: false,\r\n fetchingSaveRole: false,\r\n accessPerson: undefined,\r\n data: undefined,\r\n accessData: {},\r\n validation: {},\r\n extraInfoCodes: {\r\n fetching: false,\r\n values: []\r\n },\r\n personOptionsCodes: {\r\n fetching: false,\r\n values: []\r\n },\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nexport const reducers: { [indexer: string]: Reducer<AdministrationRoleEditState> } = {\r\n [ACTION.REQUEST_ADD_ROLE]: (state: AdministrationRoleEditState, action: RequestAddRole): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveRole: true\r\n };\r\n },\r\n [ACTION.REQUEST_UPDATE_ROLE]: (state: AdministrationRoleEditState, action: RequestUpdateRole): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveRole: true\r\n };\r\n },\r\n [ACTION.RECEIVE_ADD_ROLE]: (state: AdministrationRoleEditState, action: ReceiveAddRole): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveRole: false\r\n };\r\n },\r\n [ACTION.RECEIVE_UPDATE_ROLE]: (state: AdministrationRoleEditState, action: ReceiveUpdateRole): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveRole: false\r\n };\r\n },\r\n [ACTION.FAIL_ROLE_SAVE]: (state: AdministrationRoleEditState, action: FailRoleExecute): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingSaveRole: false\r\n };\r\n },\r\n [ACTION.REQUEST_LOAD_ROLE]: (state: AdministrationRoleEditState, action: RequestLoadRole): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingLoadRole: true\r\n };\r\n },\r\n [ACTION.RECEIVE_LOAD_ROLE]: (state: AdministrationRoleEditState, action: ReceiveLoadRole): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingLoadRole: false,\r\n data: action.data\r\n };\r\n },\r\n [ACTION.FAIL_LOAD_ROLE]: (state: AdministrationRoleEditState, action: FailLoadRole): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingLoadRole: false\r\n };\r\n },\r\n [ACTION.REQUEST_LOAD_ROLE_ACCESS]: (state: AdministrationRoleEditState, action: RequestLoadRoleAccess): AdministrationRoleEditState => {\r\n return state;\r\n },\r\n [ACTION.RECEIVE_LOAD_ROLE_ACCESS]: (state: AdministrationRoleEditState, action: ReceiveLoadRoleAccess): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n accessPerson: action.accessPerson\r\n };\r\n },\r\n [ACTION.FAIL_LOAD_ROLE_ACCESS]: (state: AdministrationRoleEditState, action: FailLoadRoleAccess): AdministrationRoleEditState => {\r\n return state;\r\n },\r\n [ACTION.CLEAR_ROLE_DATA]: (state: AdministrationRoleEditState, action: ClearRoleData): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n ...INITIAL_ADMINISTRATION_ROLE_EDIT_STATE\r\n };\r\n },\r\n [ACTION.PROCESS_ROLE_FAILED]: (state: AdministrationRoleEditState, action: ProcessRoleFailed): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n validation: action.errors,\r\n fetchingLoadRole: false\r\n };\r\n },\r\n [ACTION.REQUEST_ROLE_DELETE]: (state: AdministrationRoleEditState, action: RequestRoleDelete): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n fetchingLoadRole: true,\r\n shouldDisplayModal: false,\r\n ...INITIAL_SIMPLEFORM_STATE\r\n };\r\n },\r\n [ACTION.REQUEST_EXTRA_INFO]: (state: AdministrationRoleEditState, action: RequestExtraInfo): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n extraInfoCodes: {\r\n fetching: true,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_EXTRA_INFO]: (state: AdministrationRoleEditState, action: ReceiveExtraInfo): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n extraInfoCodes: {\r\n fetching: false,\r\n values: action.values\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_EXTRA_INFO]: (state: AdministrationRoleEditState, action: FailExtraInfo): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n extraInfoCodes: {\r\n fetching: false,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_PERSON_OPTIONS]: (state: AdministrationRoleEditState, action: RequestPersonOptions): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n personOptionsCodes: {\r\n fetching: true,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_PERSON_OPTIONS]: (state: AdministrationRoleEditState, action: ReceivePersonOptions): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n personOptionsCodes: {\r\n fetching: false,\r\n values: action.values\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_PERSON_OPTIONS]: (state: AdministrationRoleEditState, action: FailPersonOptions): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n personOptionsCodes: {\r\n fetching: false,\r\n values: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_VALIDATION]: (state: AdministrationRoleEditState, action: ClearValidation): AdministrationRoleEditState => {\r\n return {\r\n ...state,\r\n validation: clearValidation(state.validation, action.formName, action.parameters)\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_ACCESS_DATA]: (state: AdministrationRoleEditState, action: UpdateAccessData): AdministrationRoleEditState => {\r\n\r\n const accessData = state.accessData || {};\r\n const accessItem = accessData[action.key] || {} as AccessItem;\r\n\r\n return {\r\n ...state,\r\n accessData: {\r\n ...accessData,\r\n [action.key]: {\r\n ...accessItem,\r\n ...action.accessItem\r\n }\r\n }\r\n };\r\n }\r\n};\r\n\r\nexport const stateReducer: Reducer<AdministrationRoleEditState> =\r\n (state: AdministrationRoleEditState = INITIAL_ADMINISTRATION_ROLE_EDIT_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.administrationRoleEdit)(state, action);\r\n };\r\n\r\nexport const reducer = withOptionsReducer(STATE.administrationRoleEdit, stateReducer);\r\n","import { AdvancedSearchTypes } from 'app/types-shared';\r\nimport { AdvancedSearchField, FilterOption, Filter, ReportData, FilterDomainNode } from 'app/components/filters/types';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\n\r\nexport const ACTION = {\r\n REQUEST_FILTER_DOMAINS: 'FILTERS:REQUEST_FILTER_DOMAINS',\r\n RECEIVE_FILTER_DOMAINS: 'FILTERS:RECEIVE_FILTER_DOMAINS',\r\n UPDATE_FILTERS: 'FILTERS:UPDATE_FILTERS',\r\n RECEIVE_ADVANCED_SEARCH_TYPES: 'FILTERS:RECEIVE_ADVANCED_SEARCH_TYPES',\r\n RECEIVE_ADVANCED_SEARCH_OPTIONS: 'FILTERS:RECEIVE_ADVANCED_SEARCH_OPTIONS',\r\n SET_FILTER_OPTION: 'FILTERS:SET_FILTER_OPTION',\r\n SET_FILTER_OPEN_STATE: 'FILTERS:SET_FILTER_OPEN_STATE',\r\n CLEAR_FILTER_OPTIONS: 'FILTERS:CLEAR_FILTER_OPTIONS',\r\n CLEAR_ALL_FILTER_OPTIONS: 'FILTERS:CLEAR_ALL_FILTER_OPTIONS',\r\n CLEAR_ALL: 'FILTERS:CLEAR_ALL'\r\n};\r\n\r\nexport class RequestFilterDomains {\r\n public type: string = ACTION.REQUEST_FILTER_DOMAINS;\r\n}\r\n\r\nexport class ReceiveFilterDomains {\r\n public type: string = ACTION.RECEIVE_FILTER_DOMAINS;\r\n public filters: FilterDomainNode[];\r\n public report: ReportData;\r\n constructor(filters: FilterDomainNode[], report?: ReportData) {\r\n this.filters = filters;\r\n this.report = report;\r\n }\r\n}\r\n\r\nexport class UpdateFilters {\r\n public type: string = ACTION.UPDATE_FILTERS;\r\n public data: Filter[];\r\n constructor(data: Filter[]) {\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class ReceiveAdvancedSearchTypes {\r\n public type: string = ACTION.RECEIVE_ADVANCED_SEARCH_TYPES;\r\n public data: any;\r\n constructor(data: AdvancedSearchTypes[]) {\r\n this.data = data;\r\n }\r\n}\r\n\r\nexport class ReceiveAdvancedSearchOptions {\r\n public type: string = ACTION.RECEIVE_ADVANCED_SEARCH_OPTIONS;\r\n public options: AdvancedSearchField[];\r\n\r\n constructor(options: AdvancedSearchField[]) {\r\n this.options = options;\r\n }\r\n}\r\n\r\nexport class SetFilterOpenState {\r\n public type: string = ACTION.SET_FILTER_OPEN_STATE;\r\n public id:string;\r\n public value:boolean;\r\n\r\n constructor(id:string, value:boolean) {\r\n this.id = id;\r\n this.value = value;\r\n }\r\n}\r\n\r\nexport class SetFilterOption {\r\n public type: string = ACTION.SET_FILTER_OPTION;\r\n public option: FilterOption;\r\n public filterOptionType: FilterOptionType;\r\n\r\n constructor(option: FilterOption, filterOptionType: FilterOptionType){\r\n this.option = option;\r\n this.filterOptionType = filterOptionType;\r\n }\r\n}\r\n\r\nexport class ClearFilterOptions {\r\n public type: string = ACTION.CLEAR_FILTER_OPTIONS;\r\n public id: string;\r\n\r\n constructor(id: string){\r\n this.id = id;\r\n }\r\n}\r\n\r\nexport class ClearAllFilterOptions {\r\n public type: string = ACTION.CLEAR_ALL_FILTER_OPTIONS;\r\n}\r\n\r\nexport class ClearAll {\r\n public type: string = ACTION.CLEAR_ALL;\r\n}\r\n","import { ComplexValue, Value } from 'app/types-shared';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { Filter } from 'app/components/filters/types';\r\n\r\nexport interface FilterList {\r\n filter: Filter;\r\n selectedOptions: SelectItem[];\r\n key: string;\r\n}\r\n\r\nexport interface AdvancedSearchOption extends ComplexValue<number>{\r\n advancedSearchType: number; \r\n conditionOperator2?: Value;\r\n exactLevel?: boolean;\r\n searchRequired?: boolean;\r\n}\r\n\r\nexport interface PreDefDateResult {\r\n date: string;\r\n}\r\n\r\nexport enum FilterOptionType {\r\n MENU_OPTION,\r\n OPTION_TYPE,\r\n SUB_OPTION_TYPE\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { FiltersState } from '../../components/filters/types';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\n\r\nexport const INITIAL_STATE: FiltersState = {\r\n currentList: [],\r\n filterDomains: [],\r\n advancedSearchFields: [],\r\n advancedSearchTypes: [],\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<FiltersState> } = {\r\n\r\n [ACTION.REQUEST_FILTER_DOMAINS]: (state: FiltersState, action: actions.RequestFilterDomains): FiltersState => {\r\n return {\r\n ...state\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_FILTER_DOMAINS]: (state: FiltersState, action: actions.ReceiveFilterDomains): FiltersState => {\r\n return {\r\n ...state,\r\n filterDomains: action.filters,\r\n reportData: action.report\r\n };\r\n },\r\n\r\n [ACTION.UPDATE_FILTERS]: (state: FiltersState, action: actions.UpdateFilters): FiltersState => {\r\n return {\r\n ...state,\r\n currentList: action.data\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_ADVANCED_SEARCH_TYPES]: (state: FiltersState, action: actions.ReceiveAdvancedSearchTypes): FiltersState => {\r\n return {\r\n ...state,\r\n advancedSearchTypes: action.data\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_ADVANCED_SEARCH_OPTIONS]: (state: FiltersState, action: actions.ReceiveAdvancedSearchOptions): FiltersState => {\r\n\r\n return {\r\n ...state,\r\n advancedSearchFields: action.options\r\n };\r\n },\r\n\r\n [ACTION.SET_FILTER_OPEN_STATE]: (state:FiltersState, action: actions.SetFilterOpenState): FiltersState => {\r\n return {\r\n ...state,\r\n currentList: state.currentList.map(f => f.id === action.id\r\n ? {\r\n ...f,\r\n isOpen: action.value\r\n } : f)\r\n };\r\n },\r\n\r\n [ACTION.SET_FILTER_OPTION]: (state: FiltersState, action: actions.SetFilterOption): FiltersState => {\r\n const filters = state.currentList;\r\n const selectedIndex = filters.findIndex(f => f.id === action.option.id);\r\n\r\n if (selectedIndex === -1) {\r\n return state;\r\n }\r\n\r\n const filtersBefore = filters.slice(0, selectedIndex);\r\n\r\n const modifiedFilter = {\r\n [FilterOptionType.MENU_OPTION]: {\r\n ...filters[selectedIndex],\r\n menuOptions: [\r\n ...filters[selectedIndex].menuOptions.filter(o => o.type !== action.option.type),\r\n action.option\r\n ]\r\n },\r\n [FilterOptionType.OPTION_TYPE]: {\r\n ...filters[selectedIndex],\r\n optionType: Number(action.option.type),\r\n subOptionTypes: [],\r\n initialValue: []\r\n },\r\n [FilterOptionType.SUB_OPTION_TYPE]: {\r\n ...filters[selectedIndex],\r\n subOptionTypes: action.option.subOptionTypes\r\n }\r\n };\r\n\r\n const filtersAfter = filters.slice(selectedIndex + 1);\r\n\r\n return {\r\n ...state,\r\n currentList: [\r\n ...filtersBefore,\r\n modifiedFilter[action.filterOptionType],\r\n ...filtersAfter\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_FILTER_OPTIONS]: (state: FiltersState, action: actions.ClearFilterOptions): FiltersState => {\r\n return {\r\n ...state,\r\n currentList: state.currentList ? state.currentList.map(f => f.id === action.id\r\n ? {\r\n ...f,\r\n initialValue: [],\r\n menuOptions: [],\r\n optionType: undefined,\r\n subOptionTypes: []\r\n } : f) : []\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_ALL_FILTER_OPTIONS]: (state: FiltersState, action: actions.ClearAllFilterOptions): FiltersState => {\r\n return {\r\n ...state,\r\n currentList: state.currentList ? state.currentList.map(f => ({\r\n ...f,\r\n initialValue: [],\r\n menuOptions: [],\r\n optionType: undefined,\r\n subOptionTypes: []\r\n })) : []\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_ALL_FILTER_OPTIONS]: (state: FiltersState, action: actions.ClearAllFilterOptions): FiltersState => {\r\n return {\r\n ...state,\r\n currentList: state.currentList.map(f => ({\r\n ...f,\r\n initialValue: [],\r\n menuOptions: [],\r\n optionType: undefined,\r\n subOptionTypes: [],\r\n isOpen: false\r\n }))\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_ALL]: (state: FiltersState, action: actions.ClearAll): FiltersState => {\r\n return {\r\n ...state,\r\n ...INITIAL_STATE\r\n };\r\n }\r\n\r\n};\r\n\r\nexport const reducer: Reducer<FiltersState> = (state: FiltersState = INITIAL_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.filters)(state, action);\r\n};\r\n","import { CaseData, ComplexValue } from 'app/types-shared';\r\nimport { BowtieCaseModel, CaseRegistrationTemplate } from './types';\r\n\r\nexport const ACTION = {\r\n REQUEST_BOWTIE: 'BOWTIE:REQUEST_BOWTIE',\r\n RECEIVE_BOWTIE: 'BOWTIE:RECEIVE_BOWTIE',\r\n FAIL_BOWTIE: 'BOWTIE:FAIL_BOWTIE',\r\n REQUEST_DRAFT: 'BOWTIE:REQUEST_DRAFT',\r\n RECEIVE_DRAFT: 'BOWTIE:RECEIVE_DRAFT',\r\n FAIL_DRAFT: 'BOWTIE:FAIL_DRAFT',\r\n REQUEST_CASE: 'BOWTIE:REQUEST_CASE',\r\n RECEIVE_CASE: 'BOWTIE:RECEIVE_CASE',\r\n FAIL_CASE: 'BOWTIE:FAIL_CASE',\r\n CLEAN_DATA: 'BOWTIE:CLEAN_DATA',\r\n REQUEST_CONNECT_DRAFT: 'BOWTIE:REQUEST_CONNECT_DRAFT',\r\n RECEIVE_CONNECT_DRAFT: 'BOWTIE:RECEIVE_CONNECT_DRAFT',\r\n FAIL_CONNECT_DRAFT: 'BOWTIE:FAIL_CONNECT_DRAFT'\r\n};\r\n\r\nexport class RequestBowtie {\r\n public type: string = ACTION.REQUEST_BOWTIE;\r\n constructor(public caseNumber: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveBowtie {\r\n public type: string = ACTION.RECEIVE_BOWTIE;\r\n constructor(public caseNumber: number,\r\n public caseDataModel: BowtieCaseModel,\r\n public caseTemplate: CaseRegistrationTemplate,\r\n public evaluations: { [caseNumber: number]: ComplexValue<number>[] }) {\r\n }\r\n}\r\n\r\nexport class FailBowtie {\r\n public type: string = ACTION.FAIL_BOWTIE;\r\n constructor(public caseNumber: number) {\r\n }\r\n}\r\n\r\nexport class RequestDraft {\r\n public type: string = ACTION.REQUEST_DRAFT;\r\n constructor(public draftId: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveDraft {\r\n public type: string = ACTION.RECEIVE_DRAFT;\r\n constructor(public draftId: number, public data: CaseData, public code: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class FailDraft {\r\n public type: string = ACTION.FAIL_DRAFT;\r\n constructor(public draftId: number) {\r\n }\r\n}\r\n\r\nexport class RequestCase {\r\n public type: string = ACTION.REQUEST_CASE;\r\n constructor(public caseNumber: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveCase {\r\n public type: string = ACTION.RECEIVE_CASE;\r\n constructor(public caseNumber: number, public evaluation: ComplexValue<number>[]) {\r\n }\r\n}\r\n\r\nexport class FailCase {\r\n public type: string = ACTION.FAIL_CASE;\r\n constructor(public caseNumber: number) {\r\n }\r\n}\r\n\r\nexport class CleanData {\r\n public type: string = ACTION.CLEAN_DATA;\r\n}\r\n\r\nexport class RequestConnectDraft {\r\n public type: string = ACTION.REQUEST_CONNECT_DRAFT;\r\n constructor(public caseNumber: number) {\r\n }\r\n}\r\n\r\nexport class ReceiveConnectDraft {\r\n public type: string = ACTION.RECEIVE_CONNECT_DRAFT;\r\n constructor(public caseNumber: number) {\r\n }\r\n}\r\n\r\nexport class FailConnectDraft {\r\n public type: string = ACTION.FAIL_CONNECT_DRAFT;\r\n constructor(public caseNumber: number) {\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport {\r\n ACTION, RequestBowtie, ReceiveBowtie, FailBowtie,\r\n RequestDraft, ReceiveDraft, FailDraft,\r\n RequestConnectDraft, ReceiveConnectDraft, FailConnectDraft,\r\n RequestCase, ReceiveCase, FailCase,\r\n CleanData\r\n} from './action-types';\r\nimport { BowtieState } from './types-store';\r\n\r\nconst INITIAL_BOWTIE_STATE: BowtieState = {\r\n fetchingBowtie: false,\r\n caseDataModel: undefined,\r\n caseTemplate: undefined,\r\n fetchingDraft: false,\r\n draftData: undefined,\r\n connectingDraft: [],\r\n connectionTypes: undefined,\r\n inspectionEvaluations: {\r\n fetching: [],\r\n evaluationStatuses: {}\r\n }\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<BowtieState> } = {\r\n\r\n [ACTION.REQUEST_BOWTIE]: (state: BowtieState, action: RequestBowtie): BowtieState => {\r\n\r\n return {\r\n ...state,\r\n fetchingBowtie: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_BOWTIE]: (state: BowtieState, action: ReceiveBowtie): BowtieState => {\r\n return {\r\n ...state,\r\n fetchingBowtie: false,\r\n caseDataModel: action.caseDataModel,\r\n caseTemplate: action.caseTemplate,\r\n inspectionEvaluations: {\r\n ...state.inspectionEvaluations,\r\n evaluationStatuses: {\r\n ...state.inspectionEvaluations.evaluationStatuses,\r\n ...action.evaluations\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_BOWTIE]: (state: BowtieState, action: FailBowtie): BowtieState => {\r\n return {\r\n ...state,\r\n fetchingBowtie: false,\r\n caseDataModel: undefined,\r\n caseTemplate: undefined\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_DRAFT]: (state: BowtieState, action: RequestDraft): BowtieState => {\r\n\r\n return {\r\n ...state,\r\n fetchingDraft: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_DRAFT]: (state: BowtieState, action: ReceiveDraft): BowtieState => {\r\n return {\r\n ...state,\r\n fetchingDraft: false,\r\n draftData: action.data,\r\n connectionTypes: action.code\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DRAFT]: (state: BowtieState, action: FailDraft): BowtieState => {\r\n return {\r\n ...state,\r\n fetchingDraft: false,\r\n connectionTypes: undefined\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_CASE]: (state: BowtieState, action: RequestCase): BowtieState => {\r\n\r\n return {\r\n ...state,\r\n inspectionEvaluations: {\r\n ...state.inspectionEvaluations,\r\n fetching: [\r\n ...state.inspectionEvaluations.fetching,\r\n action.caseNumber\r\n ]\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CASE]: (state: BowtieState, action: ReceiveCase): BowtieState => {\r\n return {\r\n ...state,\r\n inspectionEvaluations: {\r\n ...state.inspectionEvaluations,\r\n fetching: state.inspectionEvaluations.fetching.filter(caseNumber => caseNumber !== action.caseNumber),\r\n evaluationStatuses: {\r\n ...state.inspectionEvaluations.evaluationStatuses,\r\n [action.caseNumber]: action.evaluation\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_CASE]: (state: BowtieState, action: FailCase): BowtieState => {\r\n return {\r\n ...state,\r\n inspectionEvaluations: {\r\n ...state.inspectionEvaluations,\r\n fetching: state.inspectionEvaluations.fetching.filter(caseNumber => caseNumber !== action.caseNumber)\r\n }\r\n };\r\n },\r\n\r\n [ACTION.CLEAN_DATA]: (state: BowtieState, action: CleanData): BowtieState => {\r\n return {\r\n ...state,\r\n ...INITIAL_BOWTIE_STATE\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_CONNECT_DRAFT]: (state: BowtieState, action: RequestConnectDraft): BowtieState => {\r\n\r\n return state.connectingDraft.some(c => c === action.caseNumber)\r\n ? state\r\n : {\r\n ...state,\r\n connectingDraft: [\r\n ...state.connectingDraft,\r\n action.caseNumber\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_CONNECT_DRAFT]: (state: BowtieState, action: ReceiveConnectDraft): BowtieState => {\r\n return {\r\n ...state,\r\n connectingDraft: state.connectingDraft.filter(c => c !== action.caseNumber)\r\n };\r\n },\r\n\r\n [ACTION.FAIL_CONNECT_DRAFT]: (state: BowtieState, action: FailConnectDraft): BowtieState => {\r\n return {\r\n ...state,\r\n connectingDraft: state.connectingDraft.filter(c => c !== action.caseNumber)\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<BowtieState> = (state: BowtieState = INITIAL_BOWTIE_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","import { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\n\r\nexport const ACTION = {\r\n REQUEST_EXECUTE_REPORT: 'SAVED_REPORTS:REQUEST_EXECUTE_REPORT',\r\n RECEIVE_EXECUTE_REPORT: 'SAVED_REPORTS:RECEIVE_EXECUTE_REPORT',\r\n REQUEST_NEW_FOLDER: 'SAVED_REPORTS:REQUEST_NEW_FOLDER',\r\n REQUEST_FAILED: 'SAVED_REPORT:REQUEST_FAILED',\r\n CLEAR_NEW_FOLDER: 'SAVED_REPORTS:CLEAR_NEW_FOLDER',\r\n CLEAR_ALL: 'SAVED_REPORTS:CLEAR_FORM',\r\n CLEAR_FOLDER_DATA: 'SAVED_REPORTS:CLEAR_FOLDER_DATA',\r\n REQUEST_REPORTS: 'SAVED_REPORTS:REQUEST_REPORTS',\r\n RECEIVE_REPORT: 'SAVED_REPORTS:RECEIVE_REPORTS',\r\n DELETE_REPORT: 'SAVED_REPORTS:DELETED_REPORT',\r\n RECEIVE_FOLDER_FAVOURITE: 'SAVED_REPORTS:RECEIVE_FOLDER_FAVOURITE',\r\n REQUEST_FOLDER_FAVOURITE: 'SAVED_REPORTS:REQUEST_FOLDER_FAVOURITE'\r\n};\r\n\r\nexport class RequestExecuteReport {\r\n public type: string = ACTION.REQUEST_EXECUTE_REPORT;\r\n}\r\nexport class RequestFailed {\r\n public type: string = ACTION.REQUEST_FAILED;\r\n}\r\n\r\nexport class RequestNewFolder {\r\n public type: string = ACTION.REQUEST_NEW_FOLDER;\r\n}\r\n\r\nexport class ClearNewFolder {\r\n public type: string = ACTION.CLEAR_NEW_FOLDER;\r\n}\r\n\r\nexport class ClearAll {\r\n public type: string = ACTION.CLEAR_ALL;\r\n}\r\n\r\nexport class RequestReports {\r\n public type: string = ACTION.REQUEST_REPORTS;\r\n}\r\n\r\nexport class RequestFolderFavourite {\r\n public type: string = ACTION.REQUEST_FOLDER_FAVOURITE;\r\n}\r\n\r\nexport class ReceiveFolderFavourite {\r\n public type: string = ACTION.RECEIVE_FOLDER_FAVOURITE;\r\n constructor(public definition:FavouriteDefinition) {}\r\n}\r\n\r\nexport class ClearFolderData {\r\n public type: string = ACTION.CLEAR_FOLDER_DATA;\r\n}\r\n\r\nexport class ReceiveReports {\r\n public type: string = ACTION.RECEIVE_REPORT;\r\n public reports: CodetableWireFormat[];\r\n\r\n constructor(reports: CodetableWireFormat[]) {\r\n this.reports = reports;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport { ACTION, RequestReports, ReceiveReports, ReceiveFolderFavourite, ClearFolderData } from './action-types';\r\nimport { RequestExecuteReport } from './action-types';\r\nimport { ClearAll, RequestNewFolder, ClearNewFolder } from 'app/area/saved-reports/action-types';\r\nimport { SavedReportState } from './types';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\n\r\nconst INITIAL_STATE: SavedReportState = {\r\n fetching: false,\r\n fetchingCreateFolder: false,\r\n texts: {},\r\n validation: {},\r\n error: false,\r\n reports: {fetching: false, items: []},\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nexport const reducers: { [indexer: string]: Reducer<SavedReportState> } = {\r\n [ACTION.REQUEST_EXECUTE_REPORT]: (state: SavedReportState, action: RequestExecuteReport): SavedReportState => {\r\n return {\r\n ...state,\r\n fetching: true\r\n };\r\n },\r\n [ACTION.REQUEST_FAILED]: (state: SavedReportState, action: RequestExecuteReport): SavedReportState => {\r\n return {\r\n ...state,\r\n fetching: false,\r\n error: true\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_NEW_FOLDER]: (state: SavedReportState, action: RequestNewFolder): SavedReportState => {\r\n return {\r\n ...state,\r\n fetchingCreateFolder: true\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_NEW_FOLDER]: (state: SavedReportState, action: ClearNewFolder): SavedReportState => {\r\n return {\r\n ...state,\r\n fetchingCreateFolder: false\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_ALL]: (state: SavedReportState, action: ClearAll): SavedReportState => {\r\n return {\r\n ...state,\r\n ...INITIAL_STATE\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_FOLDER_DATA]: (state: SavedReportState, action: ClearFolderData): SavedReportState => {\r\n return {\r\n ...state,\r\n folderDefinition: null,\r\n fetchingFolder: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_REPORTS]: (state: SavedReportState, action: RequestReports): SavedReportState => {\r\n\r\n return {\r\n ...state,\r\n folderDefinition: null,\r\n reports: {\r\n fetching: true,\r\n items: []\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_REPORT]: (state: SavedReportState, action: ReceiveReports): SavedReportState => {\r\n\r\n return {\r\n ...state,\r\n reports: {\r\n fetching: false,\r\n items: action.reports.map(codeItemToStoreValue)\r\n }\r\n };\r\n },\r\n [ACTION.REQUEST_FOLDER_FAVOURITE]: (state: SavedReportState, action: ReceiveReports): SavedReportState => {\r\n return {\r\n ...state,\r\n fetchingFolder: true\r\n };\r\n },\r\n [ACTION.RECEIVE_FOLDER_FAVOURITE]: (state: SavedReportState, action: ReceiveFolderFavourite) => {\r\n return {\r\n ...state,\r\n folderDefinition: action.definition,\r\n fetchingFolder: false\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<SavedReportState> = (state: SavedReportState = INITIAL_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.savedReport)(state, action);\r\n};\r\n","import { ExportStatus } from 'app/area/my-downloads/exports/exports-view/types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_EXPORT_STATUS: 'EXPORTS:REQUEST_CASES_LIST',\r\n RECEIVE_EXPORT_STATUS: 'EXPORTS:RECEIVE_CASES_LIST',\r\n FAIL_EXPORT_STATUS: 'EXPORTS:FAIL_EXPORT_STATUS',\r\n REQUEST_DOWNLOAD_CASE_EXPORT_PACKAGE: 'EXPORTS:REQUEST_DOWNLOAD_CASE_EXPORT_PACKAGE',\r\n RECEIVE_DOWNLOAD_CASE_EXPORT_PACKAGE: 'EXPORTS:RECEIVE_DOWNLOAD_CASE_EXPORT_PACKAGE',\r\n FAIL_DOWNLOAD_CASE_EXPORT_PACKAGE: 'EXPORTS:FAIL_DOWNLOAD_CASE_EXPORT_PACKAGE'\r\n};\r\n\r\nexport class RequestExportStatus {\r\n public type: string = ACTION.REQUEST_EXPORT_STATUS;\r\n}\r\n\r\nexport class ReceiveExportStatus {\r\n public type: string = ACTION.RECEIVE_EXPORT_STATUS;\r\n public exportStatus: ExportStatus[];\r\n\r\n constructor(exportStatus: ExportStatus[]) {\r\n this.exportStatus = exportStatus;\r\n }\r\n}\r\n\r\nexport class FailExportStatus {\r\n public type: string = ACTION.FAIL_EXPORT_STATUS;\r\n}\r\n\r\nexport class RequestDownloadCaseExportPackage {\r\n public type: string = ACTION.REQUEST_DOWNLOAD_CASE_EXPORT_PACKAGE;\r\n public exportId: string;\r\n\r\n constructor(exportId: string) {\r\n this.exportId = exportId;\r\n }\r\n}\r\n\r\nexport class ReceiveDownloadCaseExportPackage {\r\n public type: string = ACTION.RECEIVE_DOWNLOAD_CASE_EXPORT_PACKAGE;\r\n public exportId: string;\r\n\r\n constructor(exportId: string) {\r\n this.exportId = exportId;\r\n }\r\n}\r\n\r\nexport class FailDownloadCaseExportPackage {\r\n public type: string = ACTION.FAIL_DOWNLOAD_CASE_EXPORT_PACKAGE;\r\n public exportId: string;\r\n\r\n constructor(exportId: string) {\r\n this.exportId = exportId;\r\n }\r\n}\r\n","import { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { ActionMap } from 'app/area/my-downloads/types';\r\nimport { ExportsViewState } from 'app/area/my-downloads/exports/exports-view/types-store';\r\n\r\nexport const INITIAL_EXPORTS_VIEW_STATE: ExportsViewState = {\r\n exportsView: {\r\n download: undefined,\r\n fetching: false,\r\n exportStatus: undefined\r\n }\r\n};\r\n\r\nexport const reducers: ActionMap = {\r\n\r\n [ACTION.REQUEST_EXPORT_STATUS]: (state: ExportsViewState, action: actions.RequestExportStatus): ExportsViewState => {\r\n\r\n return {\r\n ...state,\r\n exportsView: {\r\n ...state.exportsView,\r\n fetching: true\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_EXPORT_STATUS]: (state: ExportsViewState, action: actions.ReceiveExportStatus): ExportsViewState => {\r\n\r\n return {\r\n ...state,\r\n exportsView: {\r\n ...state.exportsView,\r\n exportStatus: action.exportStatus,\r\n fetching: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_EXPORT_STATUS]: (state: ExportsViewState, action: actions.FailExportStatus): ExportsViewState => {\r\n\r\n return {\r\n ...state,\r\n exportsView: {\r\n ...state.exportsView,\r\n fetching: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_DOWNLOAD_CASE_EXPORT_PACKAGE]: (state: ExportsViewState,\r\n action: actions.RequestDownloadCaseExportPackage): ExportsViewState => {\r\n return {\r\n ...state,\r\n exportsView: {\r\n ...state.exportsView,\r\n download: {\r\n exportId: action.exportId,\r\n fetching: true\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_DOWNLOAD_CASE_EXPORT_PACKAGE]: (state: ExportsViewState,\r\n action: actions.ReceiveDownloadCaseExportPackage): ExportsViewState => {\r\n return {\r\n ...state,\r\n exportsView: {\r\n ...state.exportsView,\r\n download: undefined\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DOWNLOAD_CASE_EXPORT_PACKAGE]: (state: ExportsViewState,\r\n action: actions.FailDownloadCaseExportPackage): ExportsViewState => {\r\n return {\r\n ...state,\r\n exportsView: {\r\n ...state.exportsView,\r\n download: undefined\r\n }\r\n };\r\n }\r\n};\r\n","import { ReportStatus } from 'app/area/my-downloads/reports-view/types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_REPORT_STATUS: 'REPORTS:REQUEST_REPORT_STATUS',\r\n RECEIVE_REPORT_STATUS: 'REPORTS:RECEIVE_REPORT_STATUS',\r\n FAIL_REPORT_STATUS: 'REPORTS:FAIL_REPORT_STATUS',\r\n REQUEST_DOWNLOAD_REPORT_PACKAGE: 'REPORTS:REQUEST_DOWNLOAD_REPORT_PACKAGE',\r\n RECEIVE_DOWNLOAD_REPORT_PACKAGE: 'REPORTS:RECEIVE_DOWNLOAD_REPORT_PACKAGE',\r\n FAIL_DOWNLOAD_REPORT_PACKAGE: 'REPORTS:FAIL_DOWNLOAD_REPORT_PACKAGE'\r\n};\r\n\r\nexport class RequestReportStatus {\r\n public type: string = ACTION.REQUEST_REPORT_STATUS;\r\n}\r\n\r\nexport class ReceiveReportStatus {\r\n public type: string = ACTION.RECEIVE_REPORT_STATUS;\r\n public reportStatus: ReportStatus[];\r\n\r\n constructor(reportStatus: ReportStatus[]) {\r\n this.reportStatus = reportStatus;\r\n }\r\n}\r\n\r\nexport class FailReportStatus {\r\n public type: string = ACTION.FAIL_REPORT_STATUS;\r\n}\r\n\r\nexport class RequestDownloadReportPackage {\r\n public type: string = ACTION.REQUEST_DOWNLOAD_REPORT_PACKAGE;\r\n public reportId: string;\r\n\r\n constructor(reportId: string) {\r\n this.reportId = reportId;\r\n }\r\n}\r\n\r\nexport class ReceiveDownloadReportPackage {\r\n public type: string = ACTION.RECEIVE_DOWNLOAD_REPORT_PACKAGE;\r\n public reportId: string;\r\n\r\n constructor(reportId: string) {\r\n this.reportId = reportId;\r\n }\r\n}\r\n\r\nexport class FailDownloadReportPackage {\r\n public type: string = ACTION.FAIL_DOWNLOAD_REPORT_PACKAGE;\r\n public reportId: string;\r\n\r\n constructor(reportId: string) {\r\n this.reportId = reportId;\r\n }\r\n}\r\n","import { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { ActionMap } from 'app/area/my-downloads/types';\r\nimport { ReportsViewState } from 'app/area/my-downloads/reports-view/types-store';\r\n\r\nexport const INITIAL_REPORTS_VIEW_STATE: any = {\r\n reportsView: {\r\n download: undefined,\r\n fetchingReportStatus: false,\r\n reportStatus: undefined\r\n }\r\n};\r\n\r\nexport const reducers: ActionMap = {\r\n\r\n [ACTION.REQUEST_REPORT_STATUS]: (state: ReportsViewState, action: actions.RequestReportStatus): ReportsViewState => {\r\n\r\n return {\r\n ...state,\r\n reportsView: {\r\n ...state.reportsView,\r\n fetchingReportStatus: true\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_REPORT_STATUS]: (state: ReportsViewState, action: actions.ReceiveReportStatus): ReportsViewState => {\r\n\r\n return {\r\n ...state,\r\n reportsView: {\r\n ...state.reportsView,\r\n reportStatus: action.reportStatus,\r\n fetchingReportStatus: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_REPORT_STATUS]: (state: ReportsViewState, action: actions.FailReportStatus): ReportsViewState => {\r\n\r\n return {\r\n ...state,\r\n reportsView: {\r\n ...state.reportsView,\r\n fetchingReportStatus: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_DOWNLOAD_REPORT_PACKAGE]: (state: ReportsViewState,\r\n action: actions.RequestDownloadReportPackage): ReportsViewState => {\r\n return {\r\n ...state,\r\n reportsView: {\r\n ...state.reportsView,\r\n download: {\r\n reportId: action.reportId,\r\n fetching: true\r\n }\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_DOWNLOAD_REPORT_PACKAGE]: (state: ReportsViewState,\r\n action: actions.ReceiveDownloadReportPackage): ReportsViewState => {\r\n return {\r\n ...state,\r\n reportsView: {\r\n ...state.reportsView,\r\n download: undefined\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DOWNLOAD_REPORT_PACKAGE]: (state: ReportsViewState,\r\n action: actions.FailDownloadReportPackage): ReportsViewState => {\r\n return {\r\n ...state,\r\n reportsView: {\r\n ...state.reportsView,\r\n download: undefined\r\n }\r\n };\r\n }\r\n};\r\n","import { ExportStatus } from 'app/area/my-downloads/exports/exports-view/types-store';\r\n\r\nexport const ACTION = {\r\n REQUEST_EXPORT_CASES: 'EXPORTS_MODAL:REQUEST_EXPORT_CASES',\r\n RECEIVE_EXPORT_CASES: 'EXPORTS_MODAL:RECEIVE_EXPORT_CASES',\r\n FAIL_EXPORT_CASES: 'EXPORTS_MODAL:FAIL_EXPORT_CASES'\r\n};\r\n\r\nexport class RequestExportCases {\r\n public type: string = ACTION.REQUEST_EXPORT_CASES;\r\n}\r\n\r\nexport class ReceiveExportCases {\r\n public type: string = ACTION.RECEIVE_EXPORT_CASES;\r\n public exportStatus: ExportStatus[];\r\n\r\n constructor(exportStatus: ExportStatus[]) {\r\n this.exportStatus = exportStatus;\r\n }\r\n}\r\n\r\nexport class FailExportCases {\r\n public type: string = ACTION.FAIL_EXPORT_CASES;\r\n}\r\n","import { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { ActionMap } from 'app/area/my-downloads/types';\r\nimport { ExportsModalState } from 'app/area/my-downloads/exports/export-to-zip-modal/types-store';\r\n\r\nexport const INITIAL_EXPORTS_MODAL_STATE: any = {\r\n exportsModal: {\r\n fetching: false\r\n }\r\n};\r\n\r\nexport const reducers: ActionMap = {\r\n\r\n [ACTION.REQUEST_EXPORT_CASES]: (state: ExportsModalState, action: actions.RequestExportCases): ExportsModalState => {\r\n\r\n return {\r\n ...state,\r\n exportsModal: {\r\n ...state.exportsModal,\r\n fetching: true\r\n }\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_EXPORT_CASES]: (state: ExportsModalState, action: actions.ReceiveExportCases): ExportsModalState => {\r\n\r\n return {\r\n ...state,\r\n exportsModal: {\r\n ...state.exportsModal,\r\n fetching: false\r\n }\r\n };\r\n },\r\n\r\n [ACTION.FAIL_EXPORT_CASES]: (state: ExportsModalState, action: actions.FailExportCases): ExportsModalState => {\r\n \r\n return {\r\n ...state,\r\n exportsModal: {\r\n ...state.exportsModal,\r\n fetching: false\r\n }\r\n };\r\n }\r\n};\r\n","import { Reducer } from 'redux';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { MyDownloadsState } from './types-store';\r\nimport { reducers as exportsView } from './exports/exports-view/reducers';\r\nimport { reducers as reportsView } from './reports-view/reducers';\r\nimport { reducers as exportToZipModal } from './exports/export-to-zip-modal/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport { INITIAL_EXPORTS_VIEW_STATE } from 'app/area/my-downloads/exports/exports-view/reducers';\r\nimport { INITIAL_EXPORTS_MODAL_STATE } from 'app/area/my-downloads/exports/export-to-zip-modal/reducers';\r\nimport { INITIAL_REPORTS_VIEW_STATE } from 'app/area/my-downloads/reports-view/reducers';\r\n\r\nconst INITIAL_EXPORTS_STATE: MyDownloadsState = {\r\n ...INITIAL_EXPORTS_VIEW_STATE,\r\n ...INITIAL_EXPORTS_MODAL_STATE,\r\n ...INITIAL_REPORTS_VIEW_STATE,\r\n\r\n texts: {},\r\n validation: {},\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nexport const reducer: Reducer<MyDownloadsState> = (state: MyDownloadsState = INITIAL_EXPORTS_STATE, action: any) => {\r\n\r\n const allExportsReducers = {\r\n ...exportsView,\r\n ...exportToZipModal,\r\n ...reportsView\r\n };\r\n\r\n const r: any = allExportsReducers[action.type];\r\n\r\n return (r && r(state, action)) || simpleFormReducer(STATE.myDownloads)(state, action);\r\n};\r\n","import { Consent, ConsentPermission } from 'app/area/user-profile/my-notifications/types';\r\n\r\nexport const ACTION = {\r\n REQUEST_DELETE_CONSENT: 'MY_NOTIFICATIONS:REQUEST_DELETE_CONSENT',\r\n RECEIVE_DELETE_CONSENT: 'MY_NOTIFICATIONS:RECEIVE_DELETE_CONSENT',\r\n FAIL_DELETE_CONSENT: 'MY_NOTIFICATIONS:FAIL_DELETE_CONSENT',\r\n\r\n REQUEST_VERIFY_CODE: 'MY_NOTIFICATIONS:REQUEST_VERIFY_CODE',\r\n RECEIVE_VERIFY_CODE: 'MY_NOTIFICATIONS:RECEIVE_VERIFY_CODE',\r\n FAIL_VERIFY_CODE: 'MY_NOTIFICATIONS:FAIL_VERIFY_CODE',\r\n\r\n REQUEST_SAVE_SUBSCRIPTION: 'MY_NOTIFICATIONS:REQUEST_SAVE_SUBSCRIPTION',\r\n RECEIVE_SAVE_SUBSCRIPTION: 'MY_NOTIFICATIONS:RECEIVE_SAVE_SUBSCRIPTION',\r\n FAIL_SAVE_SUBSCRIPTION: 'MY_NOTIFICATIONS:FAIL_SAVE_SUBSCRIPTION',\r\n\r\n REQUEST_LOAD_PERMISSION: 'MY_NOTIFICATIONS:REQUEST_LOAD_PERMISSION',\r\n RECEIVE_LOAD_PERMISSION: 'MY_NOTIFICATIONS:RECEIVE_LOAD_PERMISSION',\r\n FAIL_LOAD_PERMISSION: 'MY_NOTIFICATIONS:FAIL_LOAD_PERMISSION',\r\n\r\n REQUEST_LOAD_CONSENT: 'MY_NOTIFICATIONS:REQUEST_LOAD_CONSENT',\r\n RECEIVE_LOAD_CONSENT: 'MY_NOTIFICATIONS:RECEIVE_LOAD_CONSENT',\r\n FAIL_LOAD_CONSENT: 'MY_NOTIFICATIONS:FAIL_LOAD_CONSENT',\r\n\r\n REQUEST_LOAD_CONSENTS: 'MY_NOTIFICATIONS:REQUEST_LOAD_CONSENTS',\r\n RECEIVE_LOAD_CONSENTS: 'MY_NOTIFICATIONS:RECEIVE_LOAD_CONSENTS',\r\n FAIL_LOAD_CONSENTS: 'MY_NOTIFICATIONS:FAIL_LOAD_CONSENTS',\r\n\r\n PROCESS_CONSENT_FAILED: 'MY_NOTIFICATIONS:PROCESS_CONSENT_FAILED',\r\n\r\n CLEAR_CONSENT: 'MY_NOTIFICATIONS:CLEAR_CONSENT',\r\n CLEAR_VALIDATION: 'MY_NOTIFICATIONS:CLEAR_VALIDATION'\r\n};\r\n\r\nexport class RequestDeleteConsent {\r\n public type: string = ACTION.REQUEST_DELETE_CONSENT;\r\n}\r\n\r\nexport class ReceiveDeleteConsent {\r\n public type: string = ACTION.RECEIVE_DELETE_CONSENT;\r\n}\r\n\r\nexport class FailDeleteConsent {\r\n public type: string = ACTION.FAIL_DELETE_CONSENT;\r\n}\r\n\r\nexport class RequestVerifyCode {\r\n public type: string = ACTION.REQUEST_VERIFY_CODE;\r\n}\r\n\r\nexport class ReceiveVerifyCode {\r\n public type: string = ACTION.RECEIVE_VERIFY_CODE;\r\n}\r\n\r\nexport class FailVerifyCode {\r\n public type: string = ACTION.FAIL_VERIFY_CODE;\r\n}\r\n\r\nexport class RequestSaveSubscription {\r\n public type: string = ACTION.REQUEST_SAVE_SUBSCRIPTION;\r\n}\r\n\r\nexport class ReceiveSaveSubscription {\r\n public type: string = ACTION.RECEIVE_SAVE_SUBSCRIPTION;\r\n}\r\n\r\nexport class FailSaveSubscription {\r\n public type: string = ACTION.FAIL_SAVE_SUBSCRIPTION;\r\n}\r\nexport class RequestLoadPermission {\r\n public type: string = ACTION.REQUEST_LOAD_PERMISSION;\r\n}\r\n\r\nexport class ReceiveLoadPermission {\r\n public type: string = ACTION.RECEIVE_LOAD_PERMISSION;\r\n constructor(public permission: ConsentPermission) { }\r\n}\r\n\r\nexport class FailLoadPermission {\r\n public type: string = ACTION.FAIL_LOAD_PERMISSION;\r\n}\r\n\r\nexport class RequestLoadConsents {\r\n public type: string = ACTION.REQUEST_LOAD_CONSENTS;\r\n}\r\n\r\nexport class ReceiveLoadConsents {\r\n public type: string = ACTION.RECEIVE_LOAD_CONSENTS;\r\n constructor(public consents: Consent[]) { }\r\n}\r\n\r\nexport class FailLoadConsents {\r\n public type: string = ACTION.FAIL_LOAD_CONSENTS;\r\n}\r\n\r\nexport class RequestLoadConsent {\r\n public type: string = ACTION.REQUEST_LOAD_CONSENT;\r\n}\r\n\r\nexport class ReceiveLoadConsent {\r\n public type: string = ACTION.RECEIVE_LOAD_CONSENT;\r\n constructor(public consent: Consent) { }\r\n}\r\n\r\nexport class FailLoadConsent {\r\n public type: string = ACTION.FAIL_LOAD_CONSENT;\r\n}\r\n\r\nexport class ProcessConsentFailed {\r\n public type: string = ACTION.PROCESS_CONSENT_FAILED;\r\n public errors: any;\r\n constructor(errors: any) {\r\n this.errors = errors;\r\n }\r\n}\r\n\r\nexport class ClearConsent {\r\n public type: string = ACTION.CLEAR_CONSENT;\r\n}\r\n\r\nexport class ClearValidation {\r\n public type: string = ACTION.CLEAR_VALIDATION;\r\n public formName: string;\r\n\r\n constructor(formName: string) {\r\n this.formName = formName;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { STATE } from 'app/constants';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { MyNotificationsState } from './types';\r\n\r\nexport const INITIAL_NOTIFICATIONS_STATE: MyNotificationsState = {\r\n fetchingLoadConsent: false,\r\n fetchingDeleteConsent: false,\r\n fetchingVerifyCode: false,\r\n fetchingSaveSubscription: false,\r\n fetchingLoadConsents: false,\r\n validation: {},\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nexport const reducers: { [indexer: string]: Reducer<MyNotificationsState> } = {\r\n\r\n [ACTION.REQUEST_DELETE_CONSENT]: (state: MyNotificationsState, action: actions.RequestDeleteConsent): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingDeleteConsent: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_DELETE_CONSENT]: (state: MyNotificationsState, action: actions.ReceiveDeleteConsent): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingDeleteConsent: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DELETE_CONSENT]: (state: MyNotificationsState, action: actions.FailDeleteConsent): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingDeleteConsent: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_VERIFY_CODE]: (state: MyNotificationsState, action: actions.RequestVerifyCode): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingVerifyCode: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_VERIFY_CODE]: (state: MyNotificationsState, action: actions.ReceiveVerifyCode): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingVerifyCode: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_VERIFY_CODE]: (state: MyNotificationsState, action: actions.FailVerifyCode): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingVerifyCode: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_SAVE_SUBSCRIPTION]: (state: MyNotificationsState, action: actions.RequestSaveSubscription): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingSaveSubscription: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_SAVE_SUBSCRIPTION]: (state: MyNotificationsState, action: actions.ReceiveSaveSubscription): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingSaveSubscription: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_SAVE_SUBSCRIPTION]: (state: MyNotificationsState, action: actions.FailSaveSubscription): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingSaveSubscription: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_LOAD_PERMISSION]: (state: MyNotificationsState, action: actions.RequestLoadPermission): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingLoadPermission: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_PERMISSION]: (state: MyNotificationsState, action: actions.ReceiveLoadPermission): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n permission: action.permission,\r\n fetchingLoadPermission: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LOAD_PERMISSION]: (state: MyNotificationsState, action: actions.FailLoadPermission): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingLoadPermission: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_LOAD_CONSENTS]: (state: MyNotificationsState, action: actions.RequestLoadConsents): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingLoadConsents: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_CONSENTS]: (state: MyNotificationsState, action: actions.ReceiveLoadConsents): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n consents: action.consents,\r\n fetchingLoadConsents: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LOAD_CONSENTS]: (state: MyNotificationsState, action: actions.FailLoadConsents): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingLoadConsents: false\r\n };\r\n },\r\n\r\n [ACTION.REQUEST_LOAD_CONSENT]: (state: MyNotificationsState, action: actions.RequestLoadConsent): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingLoadConsent: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_CONSENT]: (state: MyNotificationsState, action: actions.ReceiveLoadConsent): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n consent: action.consent,\r\n fetchingLoadConsent: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LOAD_CONSENT]: (state: MyNotificationsState, action: actions.FailLoadConsent): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n fetchingLoadConsent: false\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_CONSENT]: (state: MyNotificationsState, action: actions.ClearConsent): MyNotificationsState => {\r\n\r\n return {\r\n ...state,\r\n consent: undefined\r\n };\r\n },\r\n [ACTION.PROCESS_CONSENT_FAILED]: (state: MyNotificationsState, action: any): MyNotificationsState => {\r\n return {\r\n ...state,\r\n validation: action.errors\r\n };\r\n },\r\n [ACTION.CLEAR_VALIDATION]: (state: MyNotificationsState, action: any): MyNotificationsState => {\r\n const validationCurrent = state.validation && state.validation[action.formName];\r\n\r\n if (!validationCurrent) {\r\n return state;\r\n }\r\n\r\n return {\r\n ...state,\r\n validation: {\r\n ...state.validation,\r\n [action.formName]: undefined\r\n }\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<MyNotificationsState> = (state: MyNotificationsState = INITIAL_NOTIFICATIONS_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.myNotifications)(state, action);\r\n};\r\n","import { ImportCase } from './types-store';\r\nimport { ImportFormData } from 'app/area/import/types';\r\n\r\nexport const ACTION = {\r\n REQUEST_IMPORT_LIST: 'IMPORT:REQUEST_IMPORT_LIST',\r\n RECEIVE_IMPORT_LIST: 'IMPORT:RECEIVE_IMPORT_LIST',\r\n FAIL_IMPORT_LIST: 'IMPORT:FAIL_IMPORT_LIST',\r\n\r\n REQUEST_LOAD_EDIT_IMPORT: 'IMPORT:REQUEST_LOAD_EDIT_IMPORT',\r\n RECEIVE_LOAD_EDIT_IMPORT: 'IMPORT:RECEIVE_LOAD_EDIT_IMPORT',\r\n FAIL_LOAD_EDIT_IMPORT: 'IMPORT:FAIL_LOAD_EDIT_IMPORT',\r\n CLEAR_EDIT_IMPORT: 'IMPORT:CLEAR_EDIT_IMPORT',\r\n\r\n REQUEST_ADD_IMPORT: 'IMPORT:REQUEST_ADD_IMPORT',\r\n RECEIVE_ADD_IMPORT: 'IMPORT:RECEIVE_ADD_IMPORT',\r\n FAIL_ADD_IMPORT: 'IMPORT:FAIL_ADD_IMPORT',\r\n\r\n REQUEST_UPDATE_IMPORT: 'IMPORT:REQUEST_UPDATE_IMPORT',\r\n RECEIVE_UPDATE_IMPORT: 'IMPORT:RECEIVE_UPDATE_IMPORT',\r\n FAIL_UPDATE_IMPORT: 'IMPORT:FAIL_UPDATE_IMPORT',\r\n\r\n REQUEST_RETRY_IMPORT: 'IMPORT:REQUEST_RETRY_IMPORT',\r\n RECEIVE_RETRY_IMPORT: 'IMPORT:RECEIVE_RETRY_IMPORT',\r\n FAIL_RETRY_IMPORT: 'IMPORT:FAIL_RETRY_IMPORT',\r\n\r\n REQUEST_DELETE_IMPORT: 'IMPORT:REQUEST_DELETE_IMPORT',\r\n RECEIVE_DELETE_IMPORT: 'IMPORT:RECEIVE_DELETE_IMPORT',\r\n FAIL_DELETE_IMPORT: 'IMPORT:FAIL_DELETE_IMPORT',\r\n\r\n CLEAR_IMPORT_CASE: 'IMPORT:CLEAR_IMPORT_CASE'\r\n};\r\n\r\nexport class RequestImportList {\r\n public type: string = ACTION.REQUEST_IMPORT_LIST;\r\n}\r\n\r\nexport class ReceiveImportList {\r\n public type: string = ACTION.RECEIVE_IMPORT_LIST;\r\n public importList: ImportCase[];\r\n\r\n constructor(importList: ImportCase[]) {\r\n this.importList = importList;\r\n }\r\n}\r\n\r\nexport class FailImportList {\r\n public type: string = ACTION.FAIL_IMPORT_LIST;\r\n}\r\n\r\nexport class RequestLoadEditImport {\r\n public type: string = ACTION.REQUEST_LOAD_EDIT_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class ReceiveLoadEditImport {\r\n public type: string = ACTION.RECEIVE_LOAD_EDIT_IMPORT;\r\n public importCase: any;\r\n\r\n constructor(importCase: ImportCase) {\r\n this.importCase = importCase;\r\n }\r\n}\r\n\r\nexport class FailLoadEditImport {\r\n public type: string = ACTION.FAIL_LOAD_EDIT_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class RequestAddImport {\r\n public type: string = ACTION.REQUEST_ADD_IMPORT;\r\n}\r\n\r\nexport class ReceiveAddImport {\r\n public type: string = ACTION.RECEIVE_ADD_IMPORT;\r\n}\r\n\r\nexport class FailAddImport {\r\n public type: string = ACTION.FAIL_ADD_IMPORT;\r\n}\r\n\r\nexport class RequestUpdateImport {\r\n public type: string = ACTION.REQUEST_UPDATE_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class ReceiveUpdateImport {\r\n public type: string = ACTION.RECEIVE_UPDATE_IMPORT;\r\n public importCaseId: number;\r\n public serializeData: ImportFormData;\r\n\r\n constructor(importCaseId: number, serializeData: ImportFormData) {\r\n this.importCaseId = importCaseId;\r\n this.serializeData = serializeData;\r\n }\r\n}\r\n\r\nexport class FailUpdateImport {\r\n public type: string = ACTION.FAIL_UPDATE_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class ClearEditImport {\r\n public type: string = ACTION.CLEAR_EDIT_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class RequestRetryImport {\r\n public type: string = ACTION.REQUEST_RETRY_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class ReceiveRetryImport {\r\n public type: string = ACTION.RECEIVE_RETRY_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class FailRetryImport {\r\n public type: string = ACTION.FAIL_RETRY_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class RequestDeleteImport {\r\n public type: string = ACTION.REQUEST_DELETE_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class ReceiveDeleteImport {\r\n public type: string = ACTION.RECEIVE_DELETE_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class FailDeleteImport {\r\n public type: string = ACTION.FAIL_DELETE_IMPORT;\r\n public importCaseId: number;\r\n\r\n constructor(importCaseId: number) {\r\n this.importCaseId = importCaseId;\r\n }\r\n}\r\n\r\nexport class ClearImportCase {\r\n public type: string = ACTION.CLEAR_IMPORT_CASE;\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { ACTION } from './action-types';\r\nimport * as actions from './action-types';\r\nimport { reducer as simpleFormReducer, INITIAL_SIMPLEFORM_STATE } from 'app/infrastructure/simple-form/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport { ImportState } from './types-store';\r\n\r\nexport const INITIAL_STATE: ImportState = {\r\n importList: undefined,\r\n fetchingImportList: undefined,\r\n importCase: undefined,\r\n fetchingAddImportCase: undefined,\r\n editedImportId: undefined,\r\n updatedImportCases: [],\r\n texts: {},\r\n validation: {},\r\n ...INITIAL_SIMPLEFORM_STATE\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<ImportState> } = {\r\n\r\n /**\r\n * Obtaining imports list\r\n */\r\n [ACTION.REQUEST_IMPORT_LIST]: (state: ImportState, action: actions.RequestImportList): ImportState => {\r\n return {\r\n ...state,\r\n fetchingImportList: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_IMPORT_LIST]: (state: ImportState, action: actions.ReceiveImportList): ImportState => {\r\n\r\n return {\r\n ...state,\r\n importList: action.importList,\r\n fetchingImportList: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_IMPORT_LIST]: (state: ImportState, action: actions.FailImportList): ImportState => {\r\n return {\r\n ...state,\r\n fetchingImportList: false\r\n };\r\n },\r\n\r\n /**\r\n * Adding new import\r\n */\r\n [ACTION.REQUEST_ADD_IMPORT]: (state: ImportState, action: actions.RequestAddImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n fetchingAddImportCase: true\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_ADD_IMPORT]: (state: ImportState, action: actions.ReceiveAddImport): ImportState => {\r\n return {\r\n ...state,\r\n fetchingAddImportCase: false\r\n };\r\n },\r\n\r\n [ACTION.FAIL_ADD_IMPORT]: (state: ImportState, action: actions.FailAddImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n fetchingAddImportCase: false\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_IMPORT_CASE]: (state: ImportState, action: actions.ClearImportCase): ImportState => {\r\n\r\n return {\r\n ...state,\r\n fetchingAddImportCase: false\r\n };\r\n },\r\n\r\n /**\r\n * Editing import\r\n */\r\n\r\n // Fetch import data\r\n [ACTION.REQUEST_LOAD_EDIT_IMPORT]: (state: ImportState, action: actions.RequestLoadEditImport): ImportState => {\r\n return {\r\n ...state,\r\n editedImportId: action.importCaseId\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_LOAD_EDIT_IMPORT]: (state: ImportState, action: actions.ReceiveLoadEditImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n importCase: action.importCase\r\n };\r\n },\r\n\r\n [ACTION.FAIL_LOAD_EDIT_IMPORT]: (state: ImportState, action: actions.FailLoadEditImport): ImportState => {\r\n return {\r\n ...state,\r\n importCase: undefined,\r\n editedImportId: undefined\r\n };\r\n },\r\n\r\n // Update import data\r\n [ACTION.REQUEST_UPDATE_IMPORT]: (state: ImportState, action: actions.RequestUpdateImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n updatedImportCases: state.updatedImportCases.some(id => id === action.importCaseId)\r\n ? state.updatedImportCases\r\n : [\r\n ...state.updatedImportCases,\r\n action.importCaseId\r\n ],\r\n importCase: undefined,\r\n editedImportId: undefined\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_UPDATE_IMPORT]: (state: ImportState, action: actions.ReceiveUpdateImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n importList: state.importList\r\n .map(importCase => importCase.id === action.importCaseId\r\n ? {\r\n ...importCase,\r\n comments: action.serializeData.comments\r\n }\r\n : importCase),\r\n updatedImportCases: state.updatedImportCases.filter(id => id !== action.importCaseId)\r\n };\r\n },\r\n\r\n [ACTION.FAIL_UPDATE_IMPORT]: (state: ImportState, action: actions.FailUpdateImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n updatedImportCases: state.updatedImportCases.filter(id => id !== action.importCaseId)\r\n };\r\n },\r\n\r\n [ACTION.CLEAR_EDIT_IMPORT]: (state: ImportState, action: actions.ClearEditImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n importCase: undefined,\r\n editedImportId: undefined\r\n };\r\n },\r\n\r\n /**\r\n * Retry import\r\n */\r\n [ACTION.REQUEST_RETRY_IMPORT]: (state: ImportState, action: actions.RequestRetryImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n updatedImportCases: state.updatedImportCases.some(id => id === action.importCaseId)\r\n ? state.updatedImportCases\r\n : [\r\n ...state.updatedImportCases,\r\n action.importCaseId\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_RETRY_IMPORT]: (state: ImportState, action: actions.ReceiveRetryImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n updatedImportCases: state.updatedImportCases.filter(id => id !== action.importCaseId)\r\n };\r\n },\r\n\r\n [ACTION.FAIL_RETRY_IMPORT]: (state: ImportState, action: actions.FailRetryImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n updatedImportCases: state.updatedImportCases.filter(id => id !== action.importCaseId)\r\n };\r\n },\r\n\r\n /**\r\n * Delete import\r\n */\r\n [ACTION.REQUEST_DELETE_IMPORT]: (state: ImportState, action: actions.RequestDeleteImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n importList: [...state.importList.filter(importCase => importCase.id !== action.importCaseId)],\r\n updatedImportCases: state.updatedImportCases.some(id => id === action.importCaseId)\r\n ? state.updatedImportCases\r\n : [\r\n ...state.updatedImportCases,\r\n action.importCaseId\r\n ]\r\n };\r\n },\r\n\r\n [ACTION.RECEIVE_DELETE_IMPORT]: (state: ImportState, action: actions.ReceiveDeleteImport): ImportState => {\r\n return {\r\n ...state,\r\n updatedImportCases: state.updatedImportCases.filter(id => id !== action.importCaseId)\r\n };\r\n },\r\n\r\n [ACTION.FAIL_DELETE_IMPORT]: (state: ImportState, action: actions.FailDeleteImport): ImportState => {\r\n\r\n return {\r\n ...state,\r\n updatedImportCases: state.updatedImportCases.filter(id => id !== action.importCaseId)\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<ImportState> = (state: ImportState = INITIAL_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || simpleFormReducer(STATE.import)(state, action);\r\n};\r\n","import { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\n\r\nexport const ACTION = {\r\n RequestCodes: 'CODE_SELECTOR:REQUEST_CODES',\r\n ReceiveCodes: 'CODE_SELECTOR:RECEIVE_CODES'\r\n};\r\n\r\nexport class RequestCodes {\r\n public type: string = ACTION.RequestCodes;\r\n}\r\n\r\nexport class ReceiveCodes {\r\n public type: string = ACTION.ReceiveCodes;\r\n public codes: CodetableWireFormat[];\r\n\r\n constructor(codes: CodetableWireFormat[]) {\r\n this.codes = codes;\r\n }\r\n}\r\n","import { Reducer } from 'redux';\r\nimport {\r\n ACTION,\r\n RequestCodes,\r\n ReceiveCodes\r\n} from 'app/area/code-selector/action-types';\r\nimport { SelectOptions, CodeSelectorState } from 'app/area/code-selector/types';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\n\r\nexport const INITIAL_STATE: SelectOptions = {\r\n fetching: false,\r\n items: []\r\n};\r\n\r\nconst reducers: {[indexer: string]: Reducer<SelectOptions> } = {\r\n [ACTION.RequestCodes]: (state: SelectOptions, action: RequestCodes): SelectOptions => {\r\n return {\r\n ...state,\r\n fetching: true,\r\n items: []\r\n };\r\n },\r\n\r\n [ACTION.ReceiveCodes]: (state: SelectOptions, action: ReceiveCodes): CodeSelectorState => {\r\n\r\n return {\r\n ...state,\r\n fetching: false,\r\n items: action.codes.map(codeItemToStoreValue)\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<CodeSelectorState> = (state: CodeSelectorState = INITIAL_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","export const ACTION = {\r\n ADD_QUERY_PARAM: 'REMOTE_DATA:ADD_QUERY_PARAM'\r\n};\r\n\r\nexport class AddQueryParam {\r\n public type: string = ACTION.ADD_QUERY_PARAM;\r\n constructor(public queryParam: string, public value: string) {}\r\n}\r\n","import { Reducer } from 'redux';\r\nimport { RemoteDataAreaState } from './types-store';\r\nimport { ACTION, AddQueryParam } from './action-types';\r\n\r\nexport const INITIAL_REMOTE_DATA_STATE: RemoteDataAreaState = {\r\n query: {}\r\n};\r\n\r\nconst reducers: { [indexer: string]: Reducer<RemoteDataAreaState> } = {\r\n [ACTION.ADD_QUERY_PARAM]: (state: RemoteDataAreaState, action: AddQueryParam): RemoteDataAreaState => {\r\n return {\r\n ...state,\r\n query: {\r\n ...state.query,\r\n [action.queryParam]: action.value\r\n }\r\n };\r\n }\r\n};\r\n\r\nexport const reducer: Reducer<RemoteDataAreaState> = (\r\n state: RemoteDataAreaState = INITIAL_REMOTE_DATA_STATE, action: any) => {\r\n const r = reducers[action.type];\r\n return (r && r(state, action)) || state;\r\n};\r\n","/**\r\n *\r\n * Application wide factory types.\r\n * Do not abuse this scope.\r\n *\r\n */\r\nimport { reducer as ShellReducers } from 'app/shell/reducers';\r\nimport { reducer as CaseReducers } from 'app/area/case/reducers';\r\nimport { reducer as FavouriteReducers } from 'app/area/favourite/reducers';\r\nimport { reducer as DashboardReducers } from 'app/area/dashboard/reducers';\r\nimport { reducer as CompanyReportReducers } from 'app/area/company-report/reducers';\r\nimport { reducer as CaseListingReducers } from 'app/area/case-listing/reducers';\r\nimport { reducer as ResponseCachingReducers } from 'app/area/shared/response-caching/reducers';\r\nimport { reducer as SelectionReportReducers } from 'app/area/reports/reducers';\r\nimport { reducer as ProfileReducers } from 'app/area/user-profile/settings/reducers';\r\nimport { reducer as AdministrationCodetableReducers } from 'app/area/codetable/reducers';\r\nimport { reducer as UserDefaultValues } from 'app/area/user-profile/default-values/reducers';\r\nimport { reducer as AdministrationEditReducers } from 'app/area/administration/edit/user/reducers';\r\nimport { reducer as AdminSearchReducer } from 'app/area/administration/list/reducers';\r\nimport { reducer as AdministrationRoleEditReducers } from 'app/area/administration/edit/role/reducers';\r\nimport { reducer as FiltersReducers } from 'app/area/filters/reducers';\r\nimport { reducer as BowtieReducers } from 'app/area/bowtie/reducers';\r\nimport { reducer as SavedReportsReducers } from 'app/area/saved-reports/reducers';\r\nimport { reducer as MyDownloadReducers } from 'app/area/my-downloads/reducers';\r\nimport { reducer as MyNotificationsReducers } from 'app/area/user-profile/my-notifications/reducers';\r\nimport { reducer as ImportReducers } from 'app/area/import/reducers';\r\nimport { reducer as CodeSelectorReducer} from 'app/area/code-selector/reducers';\r\nimport { reducer as RemoteDataReducers } from 'app/infrastructure/remote-data/reducers';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { AuthState } from 'app/types-shared';\r\nimport { STATE } from 'app/constants';\r\n\r\n/**\r\n * The difference in minutes (as seen from UTC) between UTC and Client's time zone\r\n */\r\nconst clientDateOffset = -1 * new Date().getTimezoneOffset();\r\n\r\n/**\r\n * The initial state of the complete application at root url\r\n */\r\nexport const INITIAL_APP_STATE: ApplicationState = {\r\n app: {\r\n settings: {\r\n baseUrl: '',\r\n utcOffset: clientDateOffset,\r\n fallbackLocale: 'en'\r\n },\r\n authState: AuthState.NotAuthenticated,\r\n texts: {} as any,\r\n fetching: false,\r\n errors: [],\r\n messages: [],\r\n messagesToUser: [],\r\n updatingMessagesToUser: false,\r\n fixedHeader: true\r\n },\r\n userProfileArea: {}\r\n};\r\n\r\n/**\r\n * Whenever an action is dispatched, Redux will update each top-level application state property using\r\n * the reducer with the matching name. It's important that the names match exactly, and that the reducer\r\n * acts on the corresponding ApplicationState property type\r\n */\r\nexport const reducers = {\r\n [STATE.app]: ShellReducers,\r\n // There are currently no active startup reducers in startup, but text collection gets loaded by convention\r\n [STATE.startupArea]: (state: any = {}) => state,\r\n [STATE.case]: CaseReducers,\r\n [STATE.responseCaching]: ResponseCachingReducers,\r\n [STATE.favourite]: FavouriteReducers,\r\n [STATE.dashboard]: DashboardReducers,\r\n [STATE.userSettings]: ProfileReducers,\r\n [STATE.companyReport]: CompanyReportReducers,\r\n [STATE.caseListing]: CaseListingReducers,\r\n [STATE.selectionReport]: SelectionReportReducers,\r\n [STATE.filters]: FiltersReducers,\r\n [STATE.bowtie]: BowtieReducers,\r\n [STATE.administrationCodetable]: AdministrationCodetableReducers,\r\n [STATE.administrationSearch]: AdminSearchReducer,\r\n [STATE.administrationEdit]: AdministrationEditReducers,\r\n [STATE.administrationRoleEdit]: AdministrationRoleEditReducers,\r\n [STATE.savedReport]: SavedReportsReducers,\r\n [STATE.myDownloads]: MyDownloadReducers,\r\n [STATE.import]: ImportReducers,\r\n [STATE.codeSelector]: CodeSelectorReducer,\r\n [STATE.myNotifications]: MyNotificationsReducers,\r\n [STATE.userDefaultValues]: UserDefaultValues,\r\n [STATE.remoteData]: RemoteDataReducers\r\n};\r\n","import * as reducersConfigurationDefault from 'app/factory-default';\r\nexport const reducersConfiguration = reducersConfigurationDefault;\r\n","import {\r\n createStore, applyMiddleware,\r\n compose\r\n , combineReducers\r\n} from 'redux';\r\nimport * as thunkModule from 'redux-thunk';\r\nimport {browserHistory} from 'react-router';\r\nimport { routerMiddleware, routerReducer } from 'react-router-redux';\r\nimport { reducersConfiguration } from 'dependencies/reducers';\r\nimport { STATE } from 'app/constants';\r\nimport { globalVar, isBrowser, isDevelopment } from './universal';\r\nimport { log } from './log';\r\nimport { typedToPlain } from './redux';\r\nimport { textCollectionReducer } from 'app/infrastructure/translate';\r\nimport { errorsReducer } from 'app/shell/reducers';\r\nimport { crashNotification } from 'app/infrastructure/notifications/crash-notification';\r\nimport { logErrors, accessToState, createSaveMiddleware } from 'app/infrastructure/redux';\r\nimport { actionCreators as draftActions } from 'app/area/case/draft/actions';\r\nimport { userMessages, reducer as messageReducer } from 'app/infrastructure/notifications/user-messages';\r\n\r\nexport function configureStore() {\r\n\r\n const enabledMiddleware = [\r\n (thunkModule as any).default,\r\n logErrors,\r\n typedToPlain,\r\n accessToState,\r\n userMessages,\r\n createSaveMiddleware(draftActions.backgroundSave, draftActions.submitDocument, STATE.case),\r\n routerMiddleware(browserHistory)\r\n ];\r\n\r\n if (isDevelopment) {\r\n log('Development mode');\r\n enabledMiddleware.push(require('redux-freeze') as any);\r\n }\r\n\r\n const middlewares = applyMiddleware(...enabledMiddleware);\r\n\r\n const composer = addDevtoolsIfApplicable(middlewares);\r\n\r\n const createStoreWithMiddleware = composer(createStore);\r\n\r\n const { INITIAL_APP_STATE, reducers } = reducersConfiguration;\r\n\r\n // Combine all reducers and instantiate the app-wide store instance\r\n const allReducers: Redux.Reducer<any> = buildRootReducer(reducers);\r\n\r\n const store: Redux.Store<any> = createStoreWithMiddleware(allReducers, INITIAL_APP_STATE) as Redux.Store<any>;\r\n\r\n // Enable Webpack hot module replacement for reducers\r\n if (module.hot) {\r\n module.hot.accept('app/types-store', () => {\r\n const factory = require<any>('app/factory-default');\r\n store.replaceReducer(buildRootReducer(factory.reducers));\r\n });\r\n }\r\n\r\n return store;\r\n}\r\n\r\n/**\r\n * Runs both default reducers, and reducers that operate on full state, for cross-cutting concerns\r\n */\r\nexport function buildRootReducer(allReducers: any) {\r\n\r\n return combineSliceAndGlobalReducers(\r\n {\r\n ...allReducers,\r\n ...{ routing: routerReducer }\r\n },\r\n [textCollectionReducer, errorsReducer, messageReducer]\r\n ) as Redux.Reducer<any>;\r\n}\r\n\r\n/**\r\n * Adds redux devtools if abaliable\r\n *\r\n * @param middlewares\r\n */\r\nfunction addDevtoolsIfApplicable(middlewares: any){\r\n\r\n // Test if redux devTools is avaliable\r\n const devToolsExtension = globalVar('__REDUX_DEVTOOLS_EXTENSION__', (f: any) => f);\r\n\r\n return ( isBrowser && devToolsExtension() )\r\n ?\r\n compose( middlewares, devToolsExtension() ) // Compose with undefined argument fails on safari 9\r\n :\r\n middlewares;\r\n}\r\n\r\n/**\r\n * Creates one function composed by default redux reducers that access their own slice of state, and a set of\r\n * reducers that have access to the full store (ApplicationState)\r\n */\r\nfunction combineSliceAndGlobalReducers(keyedReducers: any = {}, reducers: any[]) {\r\n\r\n return (state = {}, action: any) => {\r\n\r\n let result: any = Object.assign({}, state);\r\n\r\n try{\r\n // assert for any errors, but don't use the result\r\n if (isDevelopment) {\r\n combineReducers(keyedReducers);\r\n }\r\n // run reducers that are specific to top-level keys\r\n Object.keys(keyedReducers).reduce((prev: any, key: any) => {\r\n const reducer = keyedReducers[key];\r\n result[key] = reducer(result[key], action);\r\n }, result);\r\n\r\n // run reducers that access the complete state\r\n reducers.reduce((prev, reducer) => {\r\n result = reducer(result, action);\r\n }, result);\r\n\r\n } catch (err) {\r\n log('A reducer crashed, entering fatal state');\r\n console.error(err);\r\n\r\n crashNotification('We are sorry! Synergi Life has stopped working.', err.message);\r\n }\r\n\r\n return result;\r\n };\r\n}\r\n","import { AppSetting } from 'dependencies/appsettings';\r\nimport { useRouterHistory } from 'react-router';\r\nimport { useHistory } from 'app/area/shared/navigation';\r\nimport { syncHistoryWithStore } from 'react-router-redux';\r\nimport { browserHistory } from 'react-router';\r\nimport { configureSystemImport, getHostingPath } from 'app/infrastructure/hosting';\r\nimport { configureStore } from 'app/infrastructure/configure-store';\r\nimport { createHistory } from 'history';\r\nimport { configure as configureReactHotkeys } from 'react-hotkeys';\r\nimport { connectToStore } from 'app/infrastructure/remote-data';\r\n\r\n/**\r\n * Support hosting in virtual directories\r\n */\r\nexport function connectHistoryToRouter(store: any) {\r\n\r\n const baseUrl = getHostingPath();\r\n let history: any = browserHistory;\r\n\r\n if (baseUrl) {\r\n\r\n // .. and instruct the router to ignore that part when resolving routes\r\n history = useRouterHistory(createHistory)({basename: baseUrl});\r\n }\r\n\r\n // save the instance to separate routing concerns\r\n useHistory(history);\r\n\r\n // configure router to sync with redux store\r\n return syncHistoryWithStore(history, store);\r\n}\r\n\r\n/**\r\n * Handle dev/prod initialization\r\n */\r\nexport function configureEnvironment(): { store: any, history: any } {\r\n\r\n if (!AppSetting.ApiBaseUrl) {\r\n // tslint:disable-next-line\r\n throw new Error(`\"ApiBaseUrl\" in appsettings.json must be a URL pointing to the correct API endpoint.`);\r\n }\r\n\r\n configureReactHotkeys({ ignoreTags: [] });\r\n\r\n configureSystemImport();\r\n\r\n const store = configureStore();\r\n\r\n const history = connectHistoryToRouter(store);\r\n\r\n connectToStore(store);\r\n\r\n return { store, history };\r\n}\r\n","import {getLangDir} from 'rtl-detect';\r\n/**\r\n * Support for RTL languages\r\n * \r\n * Ensures that HTML has the correct `dir` attribute based on the \r\n * current locale whenever the app renders\r\n * \r\n */\r\nexport const LangDir = ({locale}) => {\r\n document.dir = locale ? getLangDir(locale) : '';\r\n return null;\r\n};\r\n","import { BowtieCaseModel } from '../types';\r\nimport get from 'lodash/get';\r\n\r\nexport const mapBowtieData = (bowtieData: BowtieCaseModel): BowtieCaseModel => ({\r\n ...bowtieData,\r\n cases: bowtieData.cases.map(caseData => ({\r\n ...caseData,\r\n caseNumber: caseData.caseNumber || get(caseData, 'fields.CaseNo.values[0].v')\r\n })),\r\n layoutTypeAttributes: bowtieData.layoutTypeAttributes || get(bowtieData, 'layoutModel.layoutTypeAttributes'),\r\n layoutTypeAttributesCaseType: bowtieData.layoutTypeAttributesCaseType || get(bowtieData, 'layoutModel.layoutTypeAttributesCaseType')\r\n});\r\n","import { ComplexValue, CaseData, SubTable, FieldValue, Value } from 'app/types-shared';\r\nimport { BowtieCase } from '../types';\r\n\r\ninterface Evaluation {\r\n no: number;\r\n evaluation: ComplexValue<number>;\r\n}\r\n\r\nconst getFirstFieldValue = (field: FieldValue) => field && field.values && field.values[0] || {} as Value;\r\n\r\n/**\r\n * Returns the list of evalutions for single checklist element\r\n * @param subtable \r\n */\r\nconst getChecklistItemEvaluation = (subtable: SubTable) => {\r\n\r\n const checklistInspections = subtable && subtable.subTables && subtable.subTables.TblChecklistBarrierInspView || [];\r\n\r\n return checklistInspections\r\n .map(inspection => {\r\n\r\n const noOfInspectionsField = inspection.fields && inspection.fields.CheckListBarrInspNoOfInspect;\r\n const noOfInspections = getFirstFieldValue(noOfInspectionsField).v as number || 0;\r\n\r\n const evaluationField = inspection.fields && inspection.fields.CheckListBarrInspEvaluation;\r\n const evaluation = getFirstFieldValue(evaluationField);\r\n\r\n return {\r\n no: noOfInspections,\r\n evaluation: {\r\n value: evaluation.v,\r\n description: evaluation.d,\r\n backgroundColor: evaluation.b,\r\n foregroundColor: evaluation.f,\r\n icon: evaluation.i\r\n }\r\n } as Evaluation;\r\n })\r\n .filter(evaluation => evaluation.no > 0);\r\n};\r\n\r\n/**\r\n * Merges two collections of evaluations and merges data with same value\r\n * @param firstCollection \r\n * @param secondCollection \r\n */\r\nconst mergeEvaluations = (firstCollection: Evaluation[], secondCollection: Evaluation[]) => {\r\n\r\n return secondCollection && secondCollection.length !== 0\r\n ? [\r\n ...firstCollection.filter(\r\n firstItem => !secondCollection.some(\r\n secondItem => secondItem.evaluation.value === firstItem.evaluation.value\r\n )),\r\n ...secondCollection.map(secondItem => {\r\n\r\n const curentValue = firstCollection.find(firstItem => firstItem.evaluation.value === secondItem.evaluation.value);\r\n return curentValue\r\n ? {\r\n evaluation: curentValue.evaluation,\r\n no: curentValue.no + secondItem.no\r\n }\r\n : secondItem;\r\n })\r\n ]\r\n : firstCollection;\r\n};\r\n\r\n/**\r\n * Finds evaluations from given checklist\r\n * @param subtable \r\n */\r\nconst getChecklistEvaluation = (subtable: SubTable) => {\r\n\r\n const checklist = subtable && subtable.subTables && subtable.subTables.TblCheckList || [];\r\n\r\n return checklist.reduce((result, item) => mergeEvaluations(result, getChecklistItemEvaluation(item)), [] as Evaluation[]);\r\n};\r\n\r\n/**\r\n * Gets inspections evaluations for given case\r\n * @param case \r\n */\r\nexport const getInspections = (caseData: CaseData): ComplexValue<number>[] => {\r\n\r\n const checkListCategory = caseData && caseData.subTables && caseData.subTables.TblCheckListCategory || [];\r\n\r\n return checkListCategory\r\n .reduce((result, item) => mergeEvaluations(result, getChecklistEvaluation(item)), [] as Evaluation[])\r\n .map(item => ({\r\n ...item.evaluation,\r\n description: item.evaluation.description\r\n ? `${item.evaluation.description} (${item.no})`\r\n : `(${item.no})`\r\n }))\r\n .sort((a, b) => a.value - b.value);\r\n};\r\n\r\n/**\r\n * Gets inspections evaluations for given cases\r\n * @param cases \r\n */\r\nexport const getInspectionEvaluations = (cases: BowtieCase[]) => cases.reduce((result, caseData) => {\r\n\r\n const evaluation = getInspections(caseData);\r\n\r\n return evaluation && evaluation.length\r\n ? {\r\n ...result,\r\n [caseData.caseNumber]: getInspections(caseData)\r\n }\r\n : result;\r\n}, {} as { [caseNumber: number]: ComplexValue<number>[] });\r\n","export const bowtieTranslations = {\r\n connected_cases: 3021,\r\n done: 7338,\r\n bowtie_connect_cases: 8208,\r\n select_connection_type: 8209,\r\n inspection_evaluation: 8207,\r\n fetching_evaluation: 4501,\r\n no_evaluation_data: 5930\r\n};\r\n\r\nexport enum BussinesType {\r\n notSelected = 0,\r\n generalCategory = 1\r\n}\r\n","export const endpoint = {\r\n bowtie: (id: number) => `case/${id}/bowtie`,\r\n draft: 'case/draft',\r\n case: 'case',\r\n connections: (id: number) => `case/draft/${id}/field/11850/options`\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { Codetable } from 'app/area/reports/types-api';\r\nimport { CaseData, ApiResponse } from 'app/types-shared';\r\nimport { endpoint } from './endpoints';\r\nimport { WireBowtieData } from './types';\r\nimport { BussinesType } from './constants';\r\n\r\nexport const api = {\r\n\r\n loadBowtie: async (caseNumber: number): Promise<WireBowtieData> => {\r\n\r\n const request = await new RemoteData(endpoint.bowtie(caseNumber)).resource<ApiResponse<WireBowtieData>>()\r\n .single();\r\n\r\n return request.data;\r\n },\r\n\r\n loadDraft: async (id: number): Promise<CaseData> => {\r\n\r\n const request = await new RemoteData(endpoint.draft).resource<ApiResponse<CaseData>>()\r\n .withId(id)\r\n .single();\r\n\r\n return request.data;\r\n },\r\n\r\n loadCase: async (caseNumber: number): Promise<CaseData> => {\r\n\r\n const request = await new RemoteData(endpoint.case).resource<ApiResponse<CaseData>>()\r\n .withId(caseNumber)\r\n .single();\r\n\r\n return request.data;\r\n },\r\n\r\n loadDraftConnectionOptions: async (id: number): Promise<Codetable> => {\r\n\r\n const request = await new RemoteData(endpoint.connections(id)).resource<ApiResponse<Codetable>>()\r\n .filter({ businessType: BussinesType.generalCategory })\r\n .single();\r\n\r\n return request.data;\r\n },\r\n\r\n addDraftConnection: async (draftId: number, connectedCaseId: number, connectionTypeId: number) => {\r\n await new RemoteData(`${endpoint.draft}/${draftId}/connections`)\r\n .resource<any>()\r\n .filter({\r\n caseId: connectedCaseId,\r\n connectionTypeId\r\n })\r\n .create({});\r\n },\r\n\r\n removeDraftConnection: async (draftId: number, connectedCaseId: number, connectionTypeId: number) => {\r\n await new RemoteData(`${endpoint.draft}/${draftId}/connections`)\r\n .resource<any>()\r\n .filter({\r\n caseId: connectedCaseId,\r\n connectionTypeId\r\n })\r\n .httpDelete({});\r\n }\r\n};\r\n","import { ActionDispatching } from 'app/types-shared';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { mapBowtieData } from './mapping/map-bowtie';\r\nimport { getInspections, getInspectionEvaluations } from './mapping/map-inspection';\r\nimport { api } from './api';\r\nimport {\r\n RequestBowtie, ReceiveBowtie, FailBowtie,\r\n RequestDraft, ReceiveDraft, FailDraft, CleanData,\r\n RequestConnectDraft, ReceiveConnectDraft, FailConnectDraft,\r\n RequestCase, ReceiveCase, FailCase\r\n} from './action-types';\r\n\r\nexport const actionCreators = {\r\n\r\n loadBowtie: (caseNumber: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestBowtie(caseNumber));\r\n\r\n try {\r\n\r\n const bowtieData = await api.loadBowtie(caseNumber);\r\n\r\n const caseDataModel = mapBowtieData(bowtieData.caseDataModel);\r\n const evaluations = getInspectionEvaluations(caseDataModel.cases);\r\n\r\n dispatch(new ReceiveBowtie(caseNumber, caseDataModel, bowtieData.caseTemplate, evaluations));\r\n\r\n } catch (err) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailBowtie(caseNumber));\r\n }\r\n },\r\n\r\n loadDraft: (draftId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestDraft(draftId));\r\n\r\n try {\r\n const [\r\n draftData,\r\n connectionData\r\n ] = await Promise.all([\r\n api.loadDraft(draftId),\r\n api.loadDraftConnectionOptions(draftId)\r\n ]);\r\n\r\n const codes = connectionData && connectionData.rootCodes && connectionData.rootCodes.map(codeItemToStoreValue);\r\n\r\n dispatch(new ReceiveDraft(draftId, draftData, codes));\r\n\r\n } catch (err) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailDraft(draftId));\r\n }\r\n },\r\n\r\n loadCase: (caseNumber: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestCase(caseNumber));\r\n\r\n try {\r\n\r\n const caseData = await api.loadCase(caseNumber);\r\n dispatch(new ReceiveCase(caseNumber, getInspections(caseData)));\r\n\r\n } catch (err) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailCase(caseNumber));\r\n }\r\n },\r\n\r\n clean: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new CleanData());\r\n },\r\n\r\n addConnection: (draftId: number, caseNumber: number, connectionTypeId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n try {\r\n dispatch(new RequestConnectDraft(caseNumber));\r\n\r\n await api.addDraftConnection(draftId, caseNumber, connectionTypeId);\r\n await dispatch(actionCreators.loadDraft(draftId));\r\n\r\n dispatch(new ReceiveConnectDraft(caseNumber));\r\n\r\n } catch (err) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailConnectDraft(caseNumber));\r\n }\r\n },\r\n\r\n removeConnection: (draftId: number, caseNumber: number, connectionTypeId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n try {\r\n dispatch(new RequestConnectDraft(caseNumber));\r\n\r\n await api.removeDraftConnection(draftId, caseNumber, connectionTypeId);\r\n await dispatch(actionCreators.loadDraft(draftId));\r\n\r\n dispatch(new ReceiveConnectDraft(caseNumber));\r\n\r\n } catch (err) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailConnectDraft(caseNumber));\r\n }\r\n }\r\n};\r\n","import { ComplexValue, CaseData } from 'app/types-shared';\r\nimport { CaseConnectionParam } from 'app/infrastructure/ui/form/types';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\n\r\nexport interface BowtieSelectorProps {\r\n caseNumber: number;\r\n connectedDrafts: CaseConnectionParam[];\r\n}\r\n\r\nexport interface WireBowtieData {\r\n caseDataModel: BowtieCaseModel;\r\n caseTemplate: CaseRegistrationTemplate;\r\n}\r\n\r\nexport interface BowtieAnchorRoot {\r\n caseId: number;\r\n category: number;\r\n connectedCases: BowtieConnectedCases[];\r\n}\r\n\r\nexport interface BowtieConnectedCases {\r\n category: number;\r\n subordinateCases: BowtieSubordinateCases[];\r\n}\r\n\r\nexport interface BowtieSubordinateCases {\r\n caseId: number;\r\n connected?: BowtieConnectedCases[];\r\n}\r\n\r\nexport interface BowtieCaseOtherConnections {\r\n caseId: number;\r\n connectedCaseId: number;\r\n connectionType: CodetableWireFormat;\r\n}\r\n\r\nexport interface BowtieCase extends CaseData {\r\n caseNumber: number;\r\n}\r\n\r\nexport interface BowtieCaseModel {\r\n anchors: BowtieAnchorRoot[];\r\n cases: BowtieCase[];\r\n layoutTypeAttributes: Object;\r\n layoutTypeAttributesCaseType: Object;\r\n otherConnections: BowtieCaseOtherConnections[];\r\n}\r\n\r\ninterface FieldTemplate {\r\n text: string;\r\n}\r\n\r\nexport interface CaseRegistrationTemplate {\r\n caseDataTemplate: {\r\n fields?: {\r\n [key: string]: FieldTemplate\r\n };\r\n };\r\n labels: { [key: string]: FieldTemplate };\r\n}\r\n\r\nexport interface BowtieConnection {\r\n cases: BowtieCase[];\r\n value: number;\r\n}\r\n\r\nexport interface BowtieConnections {\r\n caseNumber: number;\r\n connections: BowtieConnection[];\r\n updating: boolean;\r\n}\r\n\r\nexport interface BowtieAppDataModel {\r\n caseDataModel: BowtieCaseModel;\r\n caseTemplate: CaseRegistrationTemplate;\r\n connections: BowtieConnections[];\r\n}\r\n\r\nexport interface BowtieTooltipData {\r\n caseData: CaseData;\r\n evaluation: ComplexValue<number>[];\r\n fetchingEvaluation: boolean;\r\n}\r\n\r\nexport interface BowtieApp {\r\n draw: (dataModel: BowtieAppDataModel, resetZoom: boolean, connectMode: boolean) => void;\r\n tooltip: (data: BowtieTooltipData, translation: any) => JSX.Element;\r\n}\r\n\r\nexport enum BowtieTooltipType {\r\n caseData,\r\n connections\r\n}\r\n","import * as React from 'react';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { FixedDocument } from 'app/components/fixed-document';\r\n\r\nimport styles from './bowtie-overlay.scss';\r\nimport { FullscreenModalHeader } from 'ui';\r\n\r\ninterface BowtieOverlayProps {\r\n infoMessage?: string;\r\n onClose?: () => void;\r\n}\r\n\r\nexport class BowtieOverlay extends React.Component<BowtieOverlayProps> {\r\n\r\n private keyMap: any;\r\n private handlers: any;\r\n\r\n constructor(props: BowtieOverlayProps) {\r\n super(props);\r\n\r\n this.keyMap = {\r\n closeOptions: [keyCodeTypes.Esc]\r\n };\r\n\r\n this.handlers = {\r\n closeOptions: (event) => this.props.onClose && this.props.onClose()\r\n };\r\n }\r\n\r\n private handleClickClose = () => {\r\n this.props.onClose && this.props.onClose();\r\n }\r\n\r\n public render() {\r\n\r\n const { infoMessage } = this.props;\r\n\r\n return (\r\n <FixedDocument>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n\r\n <div className={styles.fullscreenCodeSelector} >\r\n <FullscreenModalHeader onClose={this.handleClickClose}>\r\n {infoMessage}\r\n </FullscreenModalHeader>\r\n\r\n <div className={`container ${styles.modalWrapper}`}>\r\n {this.props.children}\r\n </div>\r\n\r\n </div>\r\n </HotKeys>\r\n </FixedDocument>\r\n );\r\n }\r\n}\r\n","import { BowtieSubordinateCases, BowtieConnectedCases, BowtieAnchorRoot } from '../types';\r\n\r\nfunction flattenSuboridnateCases(subordinateCases: BowtieSubordinateCases[]): number[] {\r\n return subordinateCases && subordinateCases.length\r\n ? subordinateCases.reduce((result, subordinateCase) => [\r\n ...result,\r\n subordinateCase.caseId,\r\n ...flattenConnectedCases(subordinateCase.connected)\r\n ], [])\r\n : [];\r\n}\r\n\r\nfunction flattenConnectedCases(connectedCases: BowtieConnectedCases[]): number[] {\r\n return connectedCases && connectedCases.length\r\n ? connectedCases.reduce((result, connecteCase) => [\r\n ...result,\r\n ...flattenSuboridnateCases(connecteCase.subordinateCases)\r\n ], [])\r\n : [];\r\n}\r\n\r\nexport const flattenAnchorRoots = (roots: BowtieAnchorRoot[]): number[] =>\r\n roots && roots.length\r\n ? roots.reduce((result, root) => [\r\n ...result,\r\n root.caseId,\r\n ...flattenConnectedCases(root.connectedCases)\r\n ], [])\r\n : [];\r\n","import { CaseData } from 'app/types-shared';\r\n\r\n/**\r\n * Creates case data in format accepted by bowtie for given case\r\n * @param data \r\n */\r\nconst mapDraftToCaseData = (data: CaseData) =>\r\n data && Object.keys(data).length\r\n ? {\r\n primaryKey: data.primaryKey && { v: data.primaryKey.v },\r\n caseType: data.caseType,\r\n caseNumber: data.fields && data.fields.CaseNo && data.fields.CaseNo[0] && data.fields.CaseNo[0].v,\r\n fields: data.fields\r\n }\r\n : {};\r\n\r\n/**\r\n * Finds connections from draft to given case\r\n * @param draft \r\n * @param caseNo \r\n */\r\nconst getConnectionsToCase = (draft: CaseData, caseNo: number) => {\r\n const connectionTypes = draft && draft.subTables && draft.subTables.TblConnectionTypes || [];\r\n\r\n const filteredByCaseNo = connectionTypes.filter(type => type && type.subTables && type.subTables.TblTransConnected &&\r\n type.subTables.TblTransConnected.some(conn => conn && conn.primaryKey && conn.primaryKey.v === caseNo));\r\n\r\n return filteredByCaseNo.map(type => ({\r\n value: type.primaryKey && type.primaryKey.v,\r\n description: type.primaryKey && type.primaryKey.d,\r\n icon: type.primaryKey.i\r\n }));\r\n};\r\n\r\n/**\r\n * Return connection from draft to given case\r\n * @param draft \r\n * @param caseNo \r\n */\r\nexport const mapDraftConnection = (draft: CaseData, caseNo: number) => {\r\n\r\n const connections = getConnectionsToCase(draft, caseNo);\r\n\r\n return connections && connections.length\r\n ? connections.map(connection => ({\r\n ...connection,\r\n cases: [mapDraftToCaseData(draft)]\r\n }))\r\n : [];\r\n};\r\n","import { BowtieCaseModel, BowtieConnection } from '../types';\r\n\r\nexport const mapBowtieCaseConnection = (bowtie: BowtieCaseModel, caseNo: number, excludeCases: number[] = []) => {\r\n\r\n return (bowtie && bowtie.otherConnections || [])\r\n .filter(c => c.caseId === caseNo)\r\n .reduce((result, c) => {\r\n\r\n const existing = result.find(r => c.connectionType && r.value === c.connectionType.v);\r\n\r\n return existing\r\n ? [\r\n ...result.filter(r => r !== existing),\r\n {\r\n ...existing,\r\n cases: [\r\n ...existing.cases,\r\n bowtie.cases.find(bc => bc.primaryKey && bc.primaryKey.v === c.connectedCaseId)\r\n ]\r\n }\r\n ]\r\n : [\r\n ...result,\r\n {\r\n value: c.connectionType.v,\r\n description: c.connectionType.d,\r\n icon: c.connectionType.i,\r\n cases: [\r\n bowtie.cases.find(bc => bc.primaryKey && bc.primaryKey.v === c.connectedCaseId)\r\n ]\r\n }\r\n ];\r\n }, [] as BowtieConnection[]);\r\n};\r\n","import { CaseData } from 'app/types-shared';\r\nimport { BowtieCaseModel, BowtieConnections, BowtieConnection } from '../types';\r\nimport { flattenAnchorRoots } from './map-anchor';\r\nimport { mapDraftConnection } from './map-draft';\r\nimport { mapBowtieCaseConnection } from './map-case';\r\n\r\nconst removeDuplicateFromDraft = (bowtieConnections: BowtieConnection[], draft: CaseData) => {\r\n\r\n const draftCaseNo: number = draft && draft.fields && draft.fields.CaseNo && draft.fields.CaseNo.values &&\r\n draft.fields.CaseNo.values[0] && draft.fields.CaseNo.values[0].v;\r\n\r\n return bowtieConnections\r\n .map(conn => {\r\n\r\n const casesNotFromDraft = conn.cases.filter(c => c && c.caseNumber !== draftCaseNo);\r\n return casesNotFromDraft.length === conn.cases.length\r\n ? conn\r\n : casesNotFromDraft.length === 0\r\n ? undefined\r\n : {\r\n ...conn,\r\n cases: casesNotFromDraft\r\n };\r\n })\r\n .filter(conn => conn);\r\n};\r\n\r\nexport const mapConnectedCases = (bowtie: BowtieCaseModel, draft: CaseData, connectingDraft: number[] = []): BowtieConnections[] => {\r\n\r\n const caseNumbers = [...new Set(flattenAnchorRoots(bowtie.anchors))];\r\n\r\n const connected = caseNumbers.reduce((result, caseNo) => {\r\n\r\n const bowtieConnections = removeDuplicateFromDraft(\r\n mapBowtieCaseConnection(bowtie, caseNo, caseNumbers),\r\n draft);\r\n const draftConnections = mapDraftConnection(draft, caseNo);\r\n\r\n const caseConnections = draftConnections\r\n .reduce(\r\n (allConnections, draftConnection) => {\r\n\r\n const existing = allConnections.find(c => c.value === draftConnection.value);\r\n const existingIndex = allConnections.indexOf(existing);\r\n\r\n return existing\r\n ? [\r\n ...allConnections.filter((_, index) => index < existingIndex),\r\n {\r\n ...draftConnection,\r\n cases: [\r\n ...existing.cases,\r\n ...draftConnection.cases\r\n ]\r\n },\r\n ...allConnections.filter((_, index) => index > existingIndex)\r\n ]\r\n : [\r\n ...allConnections,\r\n draftConnection\r\n ];\r\n }, bowtieConnections);\r\n\r\n return caseConnections.length\r\n ? [\r\n ...result,\r\n {\r\n caseNumber: caseNo,\r\n connections: caseConnections\r\n }\r\n ]\r\n : result;\r\n }, []);\r\n\r\n return connectingDraft.reduce((result, caseNo) => {\r\n\r\n const existing = result.find(c => c.caseNumber === caseNo);\r\n const existingIndex = result.indexOf(existing);\r\n\r\n return existing\r\n ? [\r\n ...result.filter((_, index) => index < existingIndex),\r\n {\r\n ...existing,\r\n updating: true\r\n },\r\n ...result.filter((_, index) => index > existingIndex)\r\n ]\r\n : [\r\n ...result,\r\n {\r\n caseNumber: caseNo,\r\n connections: [],\r\n updating: true\r\n }\r\n ];\r\n }, connected as BowtieConnections[]);\r\n};\r\n","import { BowtieAppDataModel, BowtieCaseModel, CaseRegistrationTemplate } from '../types';\r\nimport { mapConnectedCases } from './map-connected-cases';\r\nimport { CaseData } from 'app/types-shared';\r\n\r\nexport const createBowtieDataModel = (\r\n caseDataModel: BowtieCaseModel,\r\n caseTemplate: CaseRegistrationTemplate,\r\n draftData: CaseData,\r\n connectingDraft: number[]): BowtieAppDataModel => {\r\n\r\n const connections = mapConnectedCases(caseDataModel, draftData, connectingDraft);\r\n\r\n return {\r\n caseDataModel,\r\n caseTemplate,\r\n connections\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonPrimary, ButtonSecondary } from 'ui';\r\n\r\nimport styles from './bowtie-connections.scss';\r\n\r\ninterface BowtieConnectionItemProps {\r\n connectionType: number;\r\n caseNumber: number;\r\n description: string;\r\n icon: string;\r\n connected: boolean;\r\n connectCase: (caseNumber: number, connectionType: number) => void;\r\n disconnectCase: (caseNumber: number, connectionType: number) => void;\r\n}\r\n\r\nexport class BowtieConnectionItem extends React.PureComponent<BowtieConnectionItemProps> {\r\n\r\n private onClick = (ev: React.MouseEvent) => {\r\n\r\n const { caseNumber, connectionType, connected, connectCase, disconnectCase } = this.props;\r\n\r\n ev.preventDefault();\r\n\r\n if (connected) {\r\n disconnectCase(caseNumber, connectionType);\r\n } else {\r\n connectCase(caseNumber, connectionType);\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const { description, icon, connected } = this.props;\r\n\r\n const Item = connected ? ButtonPrimary : ButtonSecondary;\r\n\r\n return <Item\r\n classNames={styles.connectionItem}\r\n onClick={this.onClick}>\r\n {!!icon && <img src={icon} />}\r\n {description}\r\n </Item>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { BowtieCase, BowtieConnection } from '../types';\r\nimport { BowtieConnectionItem } from './bowtie-connections-item';\r\n\r\nimport styles from './bowtie-connections.scss';\r\n\r\ninterface BowtieConnectionsProps {\r\n draftId: number;\r\n caseData: BowtieCase;\r\n connectedCases: BowtieConnection[];\r\n connectionTypes: ComplexValue<number>[];\r\n connectCase: (caseNumber: number, connectionType: number) => void;\r\n disconnectCase: (caseNumber: number, connectionType: number) => void;\r\n translation: any;\r\n}\r\n\r\nexport class BowtieConnections extends React.PureComponent<BowtieConnectionsProps> {\r\n\r\n private renderConnection = (connection: ComplexValue<number>) => {\r\n\r\n const { draftId, caseData, connectedCases, connectCase, disconnectCase } = this.props;\r\n const connections = connectedCases\r\n .filter(conn => conn.cases.some(c => c.primaryKey && c.primaryKey.v === draftId))\r\n .map(conn => conn.value);\r\n const connected = connections.some(conn => connection.value === conn);\r\n\r\n return <BowtieConnectionItem key={connection.value}\r\n connectionType={connection.value}\r\n caseNumber={caseData.caseNumber}\r\n connected={connected}\r\n description={connection.description}\r\n icon={connection.icon}\r\n connectCase={connectCase}\r\n disconnectCase={disconnectCase}\r\n />;\r\n }\r\n\r\n public render() {\r\n\r\n const { draftId, connectionTypes, translation } = this.props;\r\n\r\n if (!connectionTypes || connectionTypes.length === 0) {\r\n return null;\r\n }\r\n\r\n return <>\r\n <p>\r\n {translation.select_connection_type} <b>#{draftId}</b>:\r\n </p>\r\n <div className={styles.connectionContainer}>\r\n {connectionTypes.map(this.renderConnection)}\r\n </div>\r\n </>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { BowtieApp, BowtieCase, BowtieTooltipType, BowtieConnection, BowtieTooltipData } from '../types';\r\nimport { InspectionEvaluations } from '../types-store';\r\nimport { BowtieConnections } from './bowtie-connections';\r\n\r\nimport styles from './bowtie-tooltip.scss';\r\n\r\ninterface BowtieTooltipPosition {\r\n left: number;\r\n top: number;\r\n}\r\n\r\ninterface BowtieTooltipComponentState extends BowtieTooltipPosition {\r\n width: number;\r\n}\r\n\r\ninterface BowtieTooltipViewProps extends BowtieTooltipPosition {\r\n refCallback: (elem: HTMLElement) => void;\r\n width: number;\r\n}\r\n\r\nconst BowtieTooltipView: React.FC<BowtieTooltipViewProps> = ({ left, top, width, refCallback, children }) => {\r\n const inlineStyle: React.CSSProperties = {\r\n left: Math.round(left),\r\n top: Math.round(top),\r\n ...(width ? { width: Math.round(width) } : {})\r\n };\r\n\r\n return <div style={inlineStyle} className={styles.bowtieTooltipBg} ref={refCallback}>\r\n {children}\r\n </div>;\r\n};\r\n\r\ninterface BowtieTooltipComponentProps extends BowtieTooltipPosition {\r\n\r\n draftId: number;\r\n caseData: BowtieCase;\r\n inspectionEvaluations: InspectionEvaluations;\r\n connectedCases: BowtieConnection[];\r\n connectionTypes: ComplexValue<number>[];\r\n connectCase: (caseNumber: number, connectionType: number) => void;\r\n disconnectCase: (caseNumber: number, connectionType: number) => void;\r\n component: BowtieApp;\r\n translation: any;\r\n\r\n right: number;\r\n type: BowtieTooltipType;\r\n}\r\n\r\nconst getRect = (elem: HTMLElement) => {\r\n const rect = elem.getBoundingClientRect();\r\n return ({\r\n left: rect.left,\r\n top: rect.top + window.scrollY,\r\n width: rect.width || rect.right - rect.left,\r\n height: rect.height || rect.bottom - rect.top\r\n });\r\n};\r\n\r\nclass BowtieTooltipContainer extends React.PureComponent<BowtieTooltipComponentProps, BowtieTooltipComponentState> {\r\n public state: Readonly<BowtieTooltipComponentState> = {\r\n left: 0,\r\n top: 0,\r\n width: undefined\r\n };\r\n\r\n private getBound = (elem: HTMLElement) => {\r\n\r\n if (!elem) {\r\n this.setState({\r\n left: 0,\r\n top: 0,\r\n width: undefined\r\n });\r\n return;\r\n }\r\n\r\n const parentRect = getRect(elem.parentElement);\r\n const tooltipRect = getRect(elem);\r\n\r\n let left = this.props.left - parentRect.left;\r\n let top = this.props.top;\r\n const maxWidth = parentRect.width + parentRect.left * 2 - 9;\r\n const maxHeight = parentRect.height - parentRect.top - 9;\r\n\r\n if (this.props.left + tooltipRect.width > maxWidth) {\r\n if (this.props.right > tooltipRect.width) {\r\n left = this.props.right - parentRect.left - tooltipRect.width;\r\n } else {\r\n left = maxWidth - parentRect.left - tooltipRect.width;\r\n }\r\n }\r\n\r\n if (top + tooltipRect.height > maxHeight) {\r\n top = maxHeight - tooltipRect.height;\r\n }\r\n\r\n this.setState({\r\n left: left + 9,\r\n top: top,\r\n width: tooltipRect.width\r\n });\r\n }\r\n\r\n private renderCaseData = () => {\r\n\r\n const { component, caseData, inspectionEvaluations, translation } = this.props;\r\n const evaluation = inspectionEvaluations.evaluationStatuses[caseData.caseNumber] || [];\r\n const fetchingEvaluation = !!inspectionEvaluations.fetching && inspectionEvaluations.fetching.some(c => c === caseData.caseNumber);\r\n\r\n const data: BowtieTooltipData = {\r\n caseData,\r\n evaluation,\r\n fetchingEvaluation\r\n };\r\n\r\n return component.tooltip(data, translation);\r\n }\r\n\r\n public render() {\r\n const { component, draftId, caseData, connectedCases, connectionTypes, connectCase, disconnectCase, translation, type } = this.props;\r\n\r\n if (!component || !caseData) {\r\n return null;\r\n }\r\n\r\n if (type === BowtieTooltipType.connections && (!connectionTypes || connectionTypes.length === 0)) {\r\n return null;\r\n }\r\n\r\n return <BowtieTooltipView {...this.state} refCallback={this.getBound}>\r\n {type === BowtieTooltipType.caseData && this.renderCaseData()}\r\n {type === BowtieTooltipType.connections && <BowtieConnections\r\n draftId={draftId}\r\n caseData={caseData}\r\n connectedCases={connectedCases}\r\n disconnectCase={disconnectCase}\r\n connectionTypes={connectionTypes}\r\n connectCase={connectCase}\r\n translation={translation} />}\r\n </BowtieTooltipView>;\r\n }\r\n}\r\n\r\nconst BowtieTooltip = BowtieTooltipContainer;\r\n\r\nexport { BowtieTooltip };\r\n","import * as React from 'react';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { STATE } from 'app/constants';\r\nimport { deserializeConnectionState, getLocationOfInitiator } from 'app/area/case/draft/connected-state';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { SpinLoader } from 'app/components';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\nimport { actionCreators } from './actions';\r\nimport { BowtieState } from './types-store';\r\nimport { BowtieSelectorProps, BowtieCase, BowtieApp, BowtieTooltipType, BowtieConnection } from './types';\r\nimport { BowtieOverlay } from './overlay/bowtie-overlay';\r\nimport { createBowtieDataModel } from './mapping/map-model';\r\nimport { BowtieTooltip } from './tooltip/bowtie-tooltip';\r\nimport { bowtieTranslations } from './constants';\r\n\r\nimport styles from './bowtie.scss';\r\n\r\ntype BowtieProps = DefaultContainerProps & BowtieSelectorProps & typeof actionCreators & BowtieState;\r\n\r\ninterface BowtieComponentState {\r\n caseData: BowtieCase;\r\n connectedCases: BowtieConnection[];\r\n left: number;\r\n right: number;\r\n top: number;\r\n type: BowtieTooltipType;\r\n}\r\n\r\nexport class BowtieComponent extends React.Component<BowtieProps, BowtieComponentState> {\r\n\r\n public static statePath: string = STATE.bowtie;\r\n\r\n private bowtie: BowtieApp;\r\n\r\n public componentDidMount() {\r\n\r\n if (this.props.caseNumber) {\r\n this.props.loadBowtie(this.props.caseNumber);\r\n this.loadDraft();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clean();\r\n }\r\n\r\n public componentDidUpdate(prevProps: BowtieProps) {\r\n\r\n const { caseNumber, caseDataModel, draftData, connectingDraft, loadBowtie } = this.props;\r\n\r\n if (!!caseNumber && caseNumber !== prevProps.caseNumber) {\r\n\r\n loadBowtie(caseNumber);\r\n this.loadDraft();\r\n\r\n } else if (caseDataModel !== prevProps.caseDataModel ||\r\n draftData !== prevProps.draftData ||\r\n connectingDraft !== prevProps.connectingDraft) {\r\n\r\n this.drawBowtie(false);\r\n }\r\n }\r\n\r\n private getDraftId = () => {\r\n return this.props.connectedDrafts &&\r\n this.props.connectedDrafts.length > 0 &&\r\n this.props.connectedDrafts[0].draftId;\r\n }\r\n\r\n private loadDraft = () => {\r\n const draftId = this.getDraftId();\r\n\r\n if (draftId) {\r\n this.props.loadDraft(draftId);\r\n }\r\n }\r\n\r\n private connectCase = (caseNumber: number, connectionType: number) => {\r\n this.props.addConnection(this.getDraftId(), caseNumber, connectionType);\r\n }\r\n\r\n private disconnectCase = (caseNumber: number, connectionType: number) => {\r\n this.props.removeConnection(this.getDraftId(), caseNumber, connectionType);\r\n }\r\n\r\n private showTooltip = (caseData: BowtieCase, loadEvaluations: boolean, left: number, right: number, top: number) => {\r\n\r\n const { loadCase, inspectionEvaluations } = this.props;\r\n if (loadEvaluations &&\r\n !inspectionEvaluations.evaluationStatuses[caseData.caseNumber] &&\r\n !inspectionEvaluations.fetching.some(caseNumber => caseNumber === caseData.caseNumber)) {\r\n loadCase(caseData.caseNumber);\r\n }\r\n\r\n this.setState({\r\n caseData, left, right, top, type: BowtieTooltipType.caseData\r\n });\r\n }\r\n\r\n private showMeatball = (caseData: BowtieCase, connectedCases: BowtieConnection[], left: number, right: number, top: number) => {\r\n this.setState({\r\n caseData, connectedCases, left, right, top, type: BowtieTooltipType.connections\r\n });\r\n }\r\n\r\n private hideTooltip = () => {\r\n this.setState({\r\n caseData: undefined\r\n });\r\n }\r\n\r\n private addBowtieCanvas = (elem: HTMLElement) => {\r\n\r\n if (!!elem) {\r\n\r\n (require as any).ensure(['app/components/bowtie/components/canvas'], () => {\r\n const canvas = require('app/components/bowtie/components/canvas');\r\n this.bowtie = new canvas.Canvas(elem, AppSetting.ApplicationUrl, {\r\n showTooltip: this.showTooltip,\r\n showMeatball: this.showMeatball,\r\n hideTooltip: this.hideTooltip\r\n });\r\n\r\n this.drawBowtie(true);\r\n }, 'bowtie');\r\n }\r\n }\r\n\r\n private drawBowtie = (resetZoom: boolean) => {\r\n\r\n if (!this.bowtie || this.props.fetchingBowtie || this.props.fetchingDraft) {\r\n return;\r\n }\r\n\r\n const { caseDataModel, caseTemplate, draftData, connectingDraft } = this.props;\r\n\r\n const dataModel = createBowtieDataModel(caseDataModel, caseTemplate, draftData, connectingDraft);\r\n const connectMode = !!draftData;\r\n\r\n this.bowtie.draw(dataModel, resetZoom, connectMode);\r\n }\r\n\r\n private onClose = () => {\r\n\r\n const { caseNumber, connectedDrafts } = this.props;\r\n\r\n if (connectedDrafts && connectedDrafts.length) {\r\n navigate.toConnectionInitiator(getLocationOfInitiator(connectedDrafts));\r\n } else {\r\n navigate.toCaseView(caseNumber);\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const { caseDataModel, connectionTypes, fetchingBowtie, inspectionEvaluations, translation } = this.props;\r\n\r\n const draftId = this.getDraftId();\r\n const msg = draftId ? <span>{translation.bowtie_connect_cases} <b>#{draftId}</b></span> : undefined;\r\n\r\n return <BowtieOverlay onClose={this.onClose} infoMessage={msg as any} >\r\n {fetchingBowtie\r\n ? <SpinLoader />\r\n : <>\r\n {!!caseDataModel && <div className={styles.bowtie} ref={this.addBowtieCanvas} />}\r\n <BowtieTooltip\r\n draftId={draftId}\r\n connectionTypes={connectionTypes}\r\n connectCase={this.connectCase}\r\n disconnectCase={this.disconnectCase}\r\n component={this.bowtie}\r\n translation={translation}\r\n inspectionEvaluations={inspectionEvaluations}\r\n {...this.state} />\r\n </>}\r\n </BowtieOverlay>;\r\n }\r\n}\r\n\r\nconst selectors = {\r\n\r\n caseNumber: (state: BowtieState, props: any) => safeNumericString(props.params.id),\r\n\r\n // TODO: move deserializeConnectionState to infrastructure / common\r\n connectedDrafts: (state: BowtieState, props: any) => deserializeConnectionState(props.router.location.query)\r\n};\r\n\r\nconst container = containerFactory(BowtieComponent, actionCreators, selectors, bowtieTranslations);\r\nexport { container as Bowtie };\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\n\r\nexport interface CreateCaseDraftData {\r\n caseTypeId?: number;\r\n caseId?: number;\r\n caseIdToDuplicate?: number;\r\n\r\n copyFrom?: {\r\n source: {\r\n caseId?: number;\r\n draftId?: number;\r\n },\r\n context: {\r\n connectionTypeId?: number\r\n }\r\n };\r\n}\r\n\r\nexport const api = {\r\n \r\n createCase: async (\r\n bodyParameters: CreateCaseDraftData, \r\n queryParameters?: {[key:string]: string | number},\r\n captchaToken?: string ): Promise<number> => {\r\n return await new RemoteData(endpoint.draft)\r\n .resource<any>()\r\n .withHeader('g-recaptcha-response', captchaToken)\r\n .filter({\r\n ...queryParameters,\r\n includeDraftData: false\r\n })\r\n .create(bodyParameters, true);\r\n }\r\n};\r\n","import * as navigate from 'app/area/shared/navigation';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { actionCreators as responseCachingActionCreators } from 'app/area/shared/response-caching/actions';\r\n\r\nimport { CreateNewDraft, CreateNewDraftFailure } from './action-types';\r\n\r\nconst isValidParent = (parentConnection) => parentConnection && parentConnection.draftId && parentConnection.connectionTypeId;\r\n\r\ntype ParentConnection = { draftId: number, connectionTypeId: number };\r\n\r\nexport const actionCreators = (api: any) => ({\r\n\r\n createCase: (caseTypeId: number, caseContextId?: number, parentConnection?: ParentConnection):\r\n ActionDispatching<any, ApplicationState> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n let copyFrom = undefined;\r\n\r\n if(isValidParent(parentConnection)) {\r\n copyFrom = { \r\n source: { draftId: parentConnection.draftId }, \r\n context: { connectionTypeId: parentConnection.connectionTypeId }\r\n };\r\n }\r\n\r\n const utcOffset = getState().app.settings.utcOffset;\r\n \r\n try {\r\n dispatch(new CreateNewDraft(caseTypeId));\r\n const body: any = { caseTypeId, copyFrom, caseContextId };\r\n if (caseContextId) {\r\n body.caseContextId = caseContextId;\r\n }\r\n \r\n const { location: draftId, response } = await api.createCase(body, { utcOffset });\r\n \r\n // Precache ui-definition\r\n if (response && response.data && response.data.caseContext && response.data.caseType) {\r\n const returnedCaseTypeId = response.data.caseType.v;\r\n const returnedCaseContextId = response.data.caseContext.v;\r\n dispatch(responseCachingActionCreators.getUiDefinition(returnedCaseTypeId, returnedCaseContextId));\r\n }\r\n \r\n navigate.toDraft(draftId);\r\n } catch (err) {\r\n dispatch(new CreateNewDraftFailure(caseTypeId, err));\r\n navigate.toStartupView();\r\n }\r\n }\r\n\r\n});\r\n","import * as React from 'react';\r\nimport { api } from './api';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { STATE } from 'app/constants';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\nimport { SpinLoader } from 'app/components/spin-loader';\r\n\r\n/**\r\n * Runs the action creator to create a new entity then redirects to the draft\r\n *\r\n */\r\nexport class CaseCreator extends React.PureComponent<any> { //TODO: add typing\r\n\r\n public static statePath: string = STATE.case;\r\n\r\n public componentDidMount(){\r\n this.props.createCase(this.props.caseTypeId, this.props.caseContextId, this.props.parentConnection);\r\n }\r\n\r\n public render(): any { return <SpinLoader />; }\r\n}\r\n\r\nconst selectors = {\r\n //react-router flaw, includes querystring when location.replace is used\r\n caseTypeId: (state:any, props:any) => safeNumericString(props.params.caseTypeId.split('?')[0]),\r\n\r\n caseContextId: (state: any, props: any) => props.router.location.query && safeNumericString(props.router.location.query.caseContextId),\r\n\r\n parentConnection: (state: any, props: any) => props.router.location.query && ({\r\n draftId: safeNumericString(props.router.location.query.draftId),\r\n connectionTypeId: safeNumericString(props.router.location.query.connectionTypeId)\r\n })\r\n};\r\n\r\nconst container = containerFactory(CaseCreator, actionCreators(api), selectors);\r\n\r\nexport { container as CaseDraftCreator };\r\n","import { DraftProps } from 'app/area/case/draft/types';\r\n\r\nconst newCaseSpecificTexts = {\r\n case_confirmation_title: 7457,\r\n case_confirmation_description: 7456,\r\n case_confirmation_continue: 7455,\r\n case_confirmation_cancel: 7454,\r\n submit: 7448,\r\n cancel: 3273\r\n};\r\n\r\nconst existingCaseSpecificTexts = {\r\n case_confirmation_title: 7461,\r\n case_confirmation_description: 7460,\r\n case_confirmation_continue: 5792,\r\n case_confirmation_cancel: 7454,\r\n submit: 7497,\r\n cancel: 7498\r\n};\r\n\r\nconst connectedCaseOverrides = {\r\n submit: 7724\r\n};\r\n\r\nexport const draftTranslations = (props: DraftProps) => ({ \r\n case_saving: 7449,\r\n draft_saving: 7450,\r\n draft_not_changed: 7452,\r\n unsaved_changes: 7451,\r\n overlay_text: 7453,\r\n really_exit: 7552,\r\n you_are_connecting_a_new_case: 7723,\r\n case_menu: 7969,\r\n switch_to_tab: 7978,\r\n switch_to_scroll: 7977,\r\n warning_dialog_title: 8325,\r\n warning_dialog_description: 8326,\r\n warning_dialog_submit: 8327,\r\n warning_dialog_cancel: 8328,\r\n ...( props.caseNumber ? existingCaseSpecificTexts : newCaseSpecificTexts ),\r\n ...( props.connectToDraft && props.connectToDraft.length ? connectedCaseOverrides : {})\r\n});\r\n","import * as React from 'react';\r\nimport get from 'lodash/get';\r\nimport { EditState } from 'app/infrastructure/ui/form/types';\r\nimport { getLocationOfInitiator } from 'app/area/case/draft/connected-state';\r\n\r\nimport styles from './connected-cases.scss';\r\nimport { FullscreenModalHeader } from 'ui';\r\nimport { LocationDescriptorObject } from 'history';\r\n\r\n/**\r\n * When a draft is in the state of beeing connected to another case/draft, then this banner renders\r\n * the backdrop view\r\n *\r\n * @param param0\r\n */\r\nexport const ConnectedCaseInfoModal: React.SFC<{\r\n previousUrl?: LocationDescriptorObject, connected?: any[], editing: EditState, translation: {[key:string] : string}\r\n}> = ({\r\n editing,\r\n children,\r\n translation,\r\n connected = get(editing, 'connectedDrafts.length') && editing.connectedDrafts.slice(-1)[0],\r\n previousUrl = getLocationOfInitiator(editing.connectedDrafts)\r\n}) => <div\r\n className={get(connected, 'draftId') ? `connected-case-display ${styles.connectCaseDisplay}` : ''}\r\n >\r\n {\r\n get(connected, 'draftId') &&\r\n <div>\r\n <div className={styles.connectedCaseHeader}>\r\n <FullscreenModalHeader previousUrl={previousUrl}>\r\n { translation.you_are_connecting_a_new_case}\r\n <span className={styles.connectedCaseId}>\r\n #{ get(connected, 'draftId')}\r\n </span>\r\n </FullscreenModalHeader>\r\n </div>\r\n <div className={`modal-background ${styles.connectedCaseBg}`}/>\r\n </div>\r\n }\r\n {children}\r\n </div>;\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { FavouriteDefinition, ApiResponse } from 'app/types-shared';\r\nimport { endpoint } from './constants';\r\nimport { ReportCategory } from 'app/area/favourite/types';\r\n\r\nexport const api = {\r\n\r\n reportCategory: async (): Promise<ReportCategory> => {\r\n\r\n const response = await new RemoteData(endpoint.reportCategory).resource<ApiResponse<any>>()\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n definition: async (id: string | number): Promise<FavouriteDefinition> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteDefinition).resource<ApiResponse<FavouriteDefinition>>()\r\n .withId(id)\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n createDraftDefinition: async (id: string | number): Promise<FavouriteDefinition> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteDefinition)\r\n .resource<any>()\r\n .filter({ favouriteId: id })\r\n .create(undefined, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n createSearchDefinition: async (): Promise<number> => {\r\n\r\n const response = await new RemoteData(endpoint.searchFavouriteDefinition)\r\n .resource<any>()\r\n .create(undefined, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n saveFavouriteDefinition: async (definition: FavouriteDefinition) => {\r\n return new RemoteData(endpoint.favouriteDefinition)\r\n .resource<ApiResponse<FavouriteDefinition>>()\r\n .withId(definition.favourite.v)\r\n .save(definition);\r\n },\r\n\r\n sortOptions: async (id: number): Promise<any> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteReportSortOptions).resource<ApiResponse<any>>()\r\n .filter({ id })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n loadFavouriteDefinition: async (id: string | number): Promise<FavouriteDefinition> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteDefinition).resource<ApiResponse<FavouriteDefinition>>()\r\n .withId(id)\r\n .single();\r\n\r\n return await response.data;\r\n },\r\n\r\n downloadReport: async (definition: FavouriteDefinition): Promise<any> => {\r\n const response = await new RemoteData(endpoint.downloadReportToExcel).resource<ApiResponse<any>>().create(definition, false);\r\n return await response;\r\n },\r\n\r\n multipleSuppliersUrl: async (): Promise<string> => {\r\n const response = await new RemoteData(endpoint.getExternalUrl(2)).resource<ApiResponse<{ urlTemplate: string }>>().single(); \r\n \r\n return response.data.urlTemplate;\r\n }, \r\n \r\n searchRequiredUsers: async (): Promise<boolean> => {\r\n const response = await new RemoteData(endpoint.loadUsersMetadata).resource<ApiResponse<{ searchRequired: boolean }>>().single(); \r\n \r\n return response.data.searchRequired;\r\n }\r\n};\r\n","import { \r\n ReportDefinition, FavouriteDefinition, Value, \r\n DefaultSortOrder, SortOptions } from 'app/types-shared';\r\n\r\nexport interface SortOrder {\r\n domainNode: Value;\r\n sortOrderType: number;\r\n sequence?: number;\r\n orderBySequence?: number;\r\n}\r\n\r\nexport interface ValueSortOptions {\r\n sortOptions: Value[];\r\n defaultSortOrder: SortOrder[];\r\n}\r\n\r\nexport function mapSortOrder(defaultSortOrder: DefaultSortOrder[]): SortOrder[] {\r\n return defaultSortOrder.map(item => ({\r\n domainNode: {\r\n v: item.domainNode.value,\r\n d: item.domainNode.description\r\n },\r\n sortOrderType: item.sortOrderType,\r\n sequence: item.orderBySequence\r\n }));\r\n}\r\n\r\nexport function mapDefaultSortOrder(defaultSortOrder: SortOrder[]): DefaultSortOrder[] {\r\n return defaultSortOrder.map(item => ({\r\n domainNode: {\r\n value: item.domainNode.v,\r\n description: item.domainNode.d\r\n },\r\n sortOrderType: item.sortOrderType,\r\n orderBySequence: item.orderBySequence\r\n }));\r\n}\r\n\r\nexport function mapSortOptions(options: ValueSortOptions): SortOptions {\r\n return {\r\n sortOptions: options.sortOptions.map(item => ({\r\n value: item.v,\r\n description: item.d\r\n })),\r\n defaultSortOrder: mapDefaultSortOrder(options.defaultSortOrder)\r\n };\r\n}\r\n\r\nexport function createSortOrder(\r\n report: ReportDefinition,\r\n defaultSortOrder: DefaultSortOrder[])\r\n : DefaultSortOrder[] {\r\n\r\n const mappedNewSortOrder: DefaultSortOrder[] = report && report.sort.map(item => {\r\n return {\r\n domainNode: item.domainNode,\r\n orderBySequence: item.sequence,\r\n sortOrderType: item.sortOrderType\r\n };\r\n });\r\n return (mappedNewSortOrder && mappedNewSortOrder.length > 0) ? mappedNewSortOrder : defaultSortOrder;\r\n}\r\n\r\ntype FavouriteDefinitionTransform = (definition: FavouriteDefinition) => FavouriteDefinition;\r\n\r\nexport function composeDefinitionTransforms(...definitionTransforms: FavouriteDefinitionTransform[]): FavouriteDefinitionTransform {\r\n return definitionTransforms.reduce(\r\n (previous, transform) => \r\n (definition) => \r\n transform\r\n ? transform(previous(definition))\r\n : previous(definition)\r\n , definition => definition);\r\n}\r\n","import * as H from 'history';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteState } from './types-store';\r\nimport { LoadFavouriteDefinitionParams } from 'app/area/favourite/types';\r\nimport { routeName } from '../../routes/route-constants';\r\n\r\nexport const hasNavigatedToSearch = (props: DefaultContainerProps, nextProps: DefaultContainerProps) => {\r\n return props.location && ((props.location.pathname !== nextProps.location.pathname) ||\r\n (props.location.search.length > 0 && nextProps.location.search.length === 0));\r\n};\r\n\r\nexport const isDefinitionChanged = (props: FavouriteState, nextProps: FavouriteState) => {\r\n return nextProps.definition && (nextProps.definition !== props.definition);\r\n};\r\n\r\nexport const isExternalLink = (location: H.Location) => {\r\n return location && !location.key && location.action === 'POP';\r\n};\r\n\r\nexport const isValidFavouriteLink = (pathname: string) => {\r\n return new RegExp(`${routeName.Favourite}\\/[0-9]`).test(pathname);\r\n};\r\n\r\nexport const shouldCreateDraftDefinition = (params: LoadFavouriteDefinitionParams) => {\r\n return isExternalLink(params.location) || params.forceCreateDraft\r\n || isValidFavouriteLink(params.location.pathname);\r\n};\r\n","import { api } from './api';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { FavouriteDefinition, ActionDispatching } from 'app/types-shared';\r\nimport * as actions from './action-types';\r\nimport { mapSortOptions, createSortOrder } from 'app/area/favourite/mapping';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport * as routerActions from 'app/area/shared/navigation';\r\nimport { shouldCreateDraftDefinition } from './selectors';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { LoadFavouriteDefinitionParams, LoadFavouriteDefinitionEmbeddedParams } from './types';\r\nimport { FavouriteState } from './types-store';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { LoadFavouriteDefinitionFailure } from 'app/area/favourite/action-types';\r\nimport { DisplayModal } from 'app/shell/action-types';\r\nimport { MODAL } from 'app/shell/modal-host-types';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { FavouriteReportDownload } from 'app/area/favourite/types';\r\nimport { searchTranslation } from './constants';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\n\r\nexport const actionCreators = {\r\n\r\n clearResults: (): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearResults());\r\n },\r\n\r\n loadReportCategory: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.RequestReportCategory());\r\n\r\n const reportCategory = await api.reportCategory();\r\n const codes = reportCategory && reportCategory.rootCodes && reportCategory.rootCodes.map(codeItemToStoreValue);\r\n\r\n dispatch(new actions.ReceiveReportCategory(codes));\r\n }),\r\n\r\n loadSortOptions: (reportId: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.RequestSortOptions());\r\n\r\n const state = getState().favourite as FavouriteState;\r\n const report = state.workingDefinition.reports.find(r => r.report.v === reportId);\r\n\r\n const sortOptions = await api.sortOptions(reportId);\r\n const updatedSortOptions = mapSortOptions({\r\n ...sortOptions,\r\n defaultSortOrder: createSortOrder(report, sortOptions.defaultSortOrder)\r\n });\r\n\r\n dispatch(new actions.ReceiveSortOptions(updatedSortOptions));\r\n\r\n }),\r\n\r\n loadFavouriteDefinition: (params: LoadFavouriteDefinitionParams): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n try {\r\n let favouriteId = params.favouriteId;\r\n\r\n dispatch(new actions.RequestFavouriteDefinition());\r\n\r\n if (favouriteId && shouldCreateDraftDefinition(params)) {\r\n const favourite = await api.createDraftDefinition(favouriteId);\r\n favouriteId = favourite.favourite.v;\r\n }\r\n\r\n if (!favouriteId) {\r\n favouriteId = favouriteId || await api.createSearchDefinition();\r\n }\r\n\r\n // Load definition while expensive route change happens below\r\n const definitionPromise = api.definition(favouriteId);\r\n\r\n routerActions.replace({ pathname: routeConstants.casesViewFor(favouriteId), query: { ...params.location.query } });\r\n\r\n const definition = await definitionPromise;\r\n\r\n dispatch(new actions.ReceiveFavouriteDefinition(definition, favouriteId));\r\n\r\n } catch (err) {\r\n dispatch(new LoadFavouriteDefinitionFailure(params, err));\r\n navigate.toStartupView();\r\n }\r\n },\r\n\r\n loadFavouriteDefinitionEmbedded: (params: LoadFavouriteDefinitionEmbeddedParams): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n try {\r\n const favouriteId = params.favouriteId;\r\n\r\n dispatch(new actions.RequestFavouriteDefinition());\r\n\r\n const definition = await api.definition(favouriteId);\r\n\r\n dispatch(new actions.ReceiveFavouriteDefinition(definition, favouriteId));\r\n } catch (err) {\r\n dispatch(new LoadFavouriteDefinitionFailure(params, err));\r\n }\r\n },\r\n\r\n updateWorkingDefinition: (definition: FavouriteDefinition): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n api.saveFavouriteDefinition(definition);\r\n dispatch(new actions.UpdateWorkingDefinition(definition));\r\n }),\r\n\r\n displayExportToZip: (): any => {\r\n return new DisplayModal(MODAL.exportToZip);\r\n },\r\n\r\n downloadReport: (data: FavouriteReportDownload): ActionDispatching<any, ApplicationState> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const toastMessage = toastFactory();\r\n try {\r\n dispatch(new actions.RequestDownloadReport());\r\n const areaState = getState().favourite;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n toastMessage.dispatch(translationDescription(searchTranslation.download_report_wait));\r\n\r\n const definition = await api.loadFavouriteDefinition(data.favouriteId);\r\n\r\n const newDefinition = {\r\n ...definition,\r\n selectedReport: { v: data.reportId }\r\n };\r\n\r\n await api.downloadReport(newDefinition);\r\n\r\n dispatch(new actions.ReceiveDownloadReport());\r\n toastMessage.success(data.successMessage);\r\n\r\n } catch (err) {\r\n dispatch(new actions.FailDownloadReport());\r\n toastMessage.error(err.validationErrors || err.message);\r\n }\r\n },\r\n /**\r\n * Get url for opeining multiple suppliers in survey manager\r\n */\r\n getMulitpleSuppliersUrl: (): ActionDispatching<any, any> =>\r\n (async (dispatch: any, getState: any) => {\r\n try {\r\n dispatch(new actions.RequestUrlMultipleSuppliers());\r\n const multipleSuppliersUrl = await api.multipleSuppliersUrl();\r\n dispatch(new actions.ReceiveUrlMultipleSuppliers(multipleSuppliersUrl)); \r\n }\r\n catch (err) {\r\n dispatch(new actions.FailReceiveUrlMultipleSuppliers(err));\r\n }\r\n }),\r\n\r\n getSearchRequiredUsers: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => { \r\n dispatch(new actions.RequestSearchRequiredUsers());\r\n const searchRequiredUsers = await api.searchRequiredUsers();\r\n dispatch(new actions.ReceiveSearchRequiredUsers(searchRequiredUsers)); \r\n })\r\n };\r\n","export const endpoint = {\r\n case: 'case',\r\n casePermissions: 'case/access',\r\n bowtieSupported: 'case/bowtie/supported',\r\n favouriteReport: 'case/report/favourite',\r\n ui: 'case/ui',\r\n riskMatrix: 'matrixDefinition/risk',\r\n surveyManagerSupported: 'case/surveymanager/supported'\r\n};\r\n\r\nexport const caseListingTranslation = {\r\n search_hits: 7474,\r\n search_no_hits: 7548, \r\n case_deleted_success: 7472,\r\n toggle_info_description: 7759,\r\n toggle_info_subtitle: 7760,\r\n toggle_info_title: 7761,\r\n toggle_info_load_options: 7762,\r\n execute_failed_info_description: 8331\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { \r\n CaseData, ApiResponse, CasePermissions, \r\n BowtieSupported, FavouriteDefinition, FavouriteResult, SurveyManagerSupportedData } from 'app/types-shared';\r\nimport { endpoint } from './constants';\r\nimport { RiskMatrixDefinition } from '../case/types-store';\r\n\r\nexport const api = {\r\n\r\n casePermissions: async (ids: number[]): Promise<CasePermissions[]> => {\r\n\r\n const response = await new RemoteData(endpoint.casePermissions).resource<ApiResponse<CasePermissions[]>>()\r\n .filter({ caseId: ids })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n bowtieSupported: async (ids: number[]): Promise<BowtieSupported[]> => {\r\n\r\n const response = await new RemoteData(endpoint.bowtieSupported).resource<ApiResponse<BowtieSupported[]>>()\r\n .filter({ caseId: ids })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n riskMatrixDefinition: async (caseTypeId: number): Promise<{ caseTypeId: number, definition: RiskMatrixDefinition}> => {\r\n\r\n const response = await new RemoteData(endpoint.riskMatrix).resource<ApiResponse<RiskMatrixDefinition>>()\r\n .withId(caseTypeId)\r\n .single();\r\n\r\n return { caseTypeId, definition: response.data };\r\n },\r\n\r\n executeReport: async (definition: FavouriteDefinition, startIndex: number, maxResults: number): Promise<FavouriteResult> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteReport).resource<any>()\r\n .filter({\r\n startIndex: startIndex,\r\n maxResults: maxResults\r\n })\r\n .create(definition, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n deleteCase: async (caseId: number) => {\r\n return new RemoteData(endpoint.case)\r\n .resource<ApiResponse<CaseData>>()\r\n .withId(caseId)\r\n .httpDelete(caseId);\r\n },\r\n \r\n surveyManagerSupported: async (id: number[]): Promise<SurveyManagerSupportedData[]> => {\r\n \r\n const response = await new RemoteData(endpoint.surveyManagerSupported).resource<ApiResponse<SurveyManagerSupportedData[]>>()\r\n .filter({ caseId: id })\r\n .single();\r\n\r\n return await response.data as any;\r\n }\r\n};\r\n","import { ActionDispatching, FavouriteDefinition, CaseData, RenderMode } from 'app/types-shared';\r\nimport { caseDataToStore } from 'app/infrastructure/store/normalize';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/index';\r\nimport { UiState } from 'app/infrastructure/ui/form/types';\r\nimport { SuccessNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { caseTypeId as getCaseTypeId, caseNumber as getCaseNumber, primaryKey, caseContextId as getCaseContextId } from 'app/infrastructure/data/wireformat';\r\nimport { Domain, UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { STATE } from 'app/constants';\r\nimport { api } from './api';\r\nimport { caseListingTranslation } from './constants';\r\nimport { CaseListingStoreState } from './types-store';\r\nimport {\r\n ReceivePermissions, ReceiveUiDefinitions, RequestCases, ReceiveCases, FailExecuteFavourite,\r\n RequestRemoveItem, ReceiveRemoveItem, FailRemoveItem, ClearResults, ReceiveRiskMatrixDefinitions,\r\n RequestUiDefinitions, SetRenderMode\r\n} from './action-types';\r\nimport { mapRiskMatrixDefinitionToStoreFormat } from 'app/area/case/features/risk-matrix/risk-matrix-definition';\r\nimport { actionCreators as responseCachingActionCreators } from 'app/area/shared/response-caching/actions';\r\n\r\nconst filterDomainChildren = (domain: Domain, includedDomains: number[]): Domain => {\r\n\r\n const children = (domain.children || [])\r\n .map(child => filterDomainChildren(child, includedDomains))\r\n .filter(child =>\r\n includedDomains.some(id => child.domainId === id)\r\n || (!!child.children && !!child.children.length));\r\n\r\n return {\r\n ...domain,\r\n children: !!children && !!children.length ? children : undefined\r\n };\r\n};\r\n\r\nexport const actionCreators = {\r\n /**\r\n * Clears all results in the store.\r\n */\r\n clearResults: (): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new ClearResults());\r\n },\r\n\r\n /**\r\n * Gets cases permissions and bowtie feature support information for given cases\r\n *\r\n * @param ids array of case numbers\r\n * @param requestId current request id\r\n */\r\n getPermissions: (ids: number[], requestId: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n const localRequestId = requestId || getState().caseListing.requestId;\r\n\r\n const [casePermissions, bowtieSupported, surveyManagerSupported] = await Promise.all([\r\n api.casePermissions(ids),\r\n api.bowtieSupported(ids),\r\n api.surveyManagerSupported(ids)\r\n ]);\r\n\r\n const permissions = ids.reduce((result, id) => {\r\n const permission = casePermissions.find(p => p.caseId === id);\r\n const bowtie = bowtieSupported.find(p => p.caseId === id);\r\n const surveyManager = surveyManagerSupported.find(p => p.caseId === id);\r\n return {\r\n ...result,\r\n [id]: {\r\n ...permission,\r\n bowtie: !!bowtie && bowtie.supported,\r\n surveyManager: !!surveyManager && surveyManager.supported\r\n }\r\n };\r\n }, {});\r\n\r\n dispatch(new ReceivePermissions(permissions, localRequestId));\r\n }),\r\n\r\n /**\r\n * Gets ui definitions for given case types and filters them by list of included domains\r\n *\r\n * @param ids array of case type numbers\r\n * @param includedDomains list of domains for each case type that should be included\r\n * @param requestId current request id\r\n */\r\n getUiDefinitions: (ids: {caseTypeId: number, caseContextId: number}[],\r\n includedDomains: { caseTypeId: number, domains: number[] }[],\r\n requestId: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n const areaState = getState()[STATE.caseListing] as CaseListingStoreState;\r\n\r\n const compareUiDefinitionKey = (a, b) => a.caseTypeId === b.caseTypeId && a.caseContextId === b.caseContextId;\r\n\r\n const uniqueIds = ids.reduce(\r\n (aggr, i) => !aggr.some(a => compareUiDefinitionKey(a, i)) ? [...aggr, i] : aggr, []\r\n );\r\n \r\n const uiDefinitionsToGet = uniqueIds.filter(i => \r\n !(areaState.uiDefinitions || []).some(u => compareUiDefinitionKey(u, i))\r\n );\r\n \r\n if (uiDefinitionsToGet.length === 0) {\r\n return;\r\n }\r\n\r\n dispatch(new RequestUiDefinitions(uiDefinitionsToGet, requestId));\r\n\r\n const uiDefinitions = await Promise.all<any>(\r\n uiDefinitionsToGet.map(\r\n async uiDefinitionKey => {\r\n const definition: UiDefinition = await dispatch(\r\n responseCachingActionCreators.getUiDefinition(uiDefinitionKey.caseTypeId, uiDefinitionKey.caseContextId)\r\n );\r\n\r\n const includedDomainsForCaseType = includedDomains.find(domains => domains.caseTypeId === uiDefinitionKey.caseTypeId);\r\n\r\n const filteredDomainHierarchy =\r\n filterDomainChildren(definition.rootDomain, (includedDomainsForCaseType && includedDomainsForCaseType.domains) || []);\r\n \r\n return {\r\n ...uiDefinitionKey,\r\n definition: {\r\n ...definition,\r\n rootDomain: filteredDomainHierarchy\r\n }\r\n };\r\n }\r\n )\r\n );\r\n\r\n dispatch(new ReceiveUiDefinitions(uiDefinitions, requestId));\r\n }),\r\n\r\n /**\r\n * Gets risk matrix definitions for given case types\r\n *\r\n * @param ids array of case type numbers\r\n * @param requestId current request id\r\n */\r\n getRiskMatrixDefinitions: (ids: number[],\r\n requestId: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n const areaState = getState()[STATE.caseListing] as CaseListingStoreState;\r\n\r\n const uniqueCaseTypes = Array.from(new Set(ids));\r\n const newCaseTypes = uniqueCaseTypes.filter(id => !areaState.riskMatrixDefinitions || !areaState.riskMatrixDefinitions[id]);\r\n\r\n if (newCaseTypes.length === 0) {\r\n return;\r\n }\r\n\r\n const apiResults = await Promise.all<any>(\r\n newCaseTypes.map(api.riskMatrixDefinition)\r\n );\r\n\r\n const riskMatrixDefinitions = apiResults.reduce((result, res) => {\r\n return {\r\n ...result,\r\n [res.caseTypeId]: { fetching: false, definition: mapRiskMatrixDefinitionToStoreFormat(res.definition) }\r\n };\r\n }, {});\r\n\r\n dispatch(new ReceiveRiskMatrixDefinitions(riskMatrixDefinitions, requestId));\r\n }),\r\n\r\n /**\r\n * Executes search based on the favourite definition\r\n *\r\n * @param definition FavouriteDefinition\r\n * @param loadPermissions If set to true, permissions will be loaded for all cases\r\n * @param startIndex amount of results from beginning to be skipped\r\n * @param maxResults how many results should be fetched\r\n */\r\n executeFavouriteDefinition: (\r\n definition: FavouriteDefinition, \r\n loadPermissions: boolean, \r\n startIndex: number, \r\n maxResults: number = 25): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestCases());\r\n\r\n const areaState = getState()[STATE.caseListing] as CaseListingStoreState;\r\n const requestId = areaState.requestId;\r\n\r\n try {\r\n const response = await api.executeReport(definition, startIndex, maxResults); \r\n \r\n const { results,\r\n metadata: { domains = [], totalNumberOfResults = 0 } } = response;\r\n \r\n if (!results || !results.length) {\r\n dispatch(new ReceiveCases({}, [], 0, requestId));\r\n return;\r\n }\r\n\r\n const toUiDefinitionParams = (r: CaseData) => ({\r\n caseTypeId: getCaseTypeId(r),\r\n caseContextId: getCaseContextId(r)\r\n });\r\n await Promise.all([\r\n dispatch(actionCreators.getUiDefinitions(results.map(toUiDefinitionParams), domains, requestId)),\r\n dispatch(actionCreators.getRiskMatrixDefinitions(results.map(getCaseTypeId), requestId))\r\n ]);\r\n\r\n const entities = results.reduce((result, caseData: CaseData, i) => ({\r\n ...result,\r\n [`${primaryKey(caseData)}-${startIndex+i}`]: caseDataToStore(caseData)\r\n }), {});\r\n\r\n const caseResults = results.map( (caseData: CaseData, i) => ({\r\n entityId: primaryKey(caseData),\r\n entityStoreKey: `${primaryKey(caseData)}-${startIndex+i}`,\r\n caseNumber: getCaseNumber(caseData),\r\n caseTypeId: getCaseTypeId(caseData),\r\n caseContextId: getCaseContextId(caseData)\r\n }));\r\n\r\n dispatch(new ReceiveCases(entities, caseResults, totalNumberOfResults, requestId));\r\n\r\n if (loadPermissions) {\r\n dispatch(actionCreators.getPermissions(results.map(getCaseNumber), requestId));\r\n }\r\n } \r\n catch (error) {\r\n if(error && error.response.status === 400) {\r\n dispatch( new FailExecuteFavourite(error.userMessages.map(m=>m.message)));\r\n }\r\n }\r\n }),\r\n\r\n /**\r\n * Deletes the case with given case number\r\n *\r\n * @param caseNumber\r\n */\r\n deleteCase: (caseNumber: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new RequestRemoveItem(caseNumber));\r\n\r\n try {\r\n const result = await api.deleteCase(caseNumber) as any;\r\n const areaState = getState().favourite as UiState;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n if (result && result.status === 204) {\r\n dispatch(new SuccessNotification(\r\n translationDescription(caseListingTranslation.case_deleted_success)\r\n ));\r\n dispatch(new ReceiveRemoveItem(caseNumber));\r\n }\r\n } catch (err) {\r\n dispatch({\r\n type: 'ERROR',\r\n error: err\r\n });\r\n\r\n dispatch(new FailRemoveItem(caseNumber));\r\n }\r\n },\r\n\r\n setRenderMode: (renderMode: RenderMode) =>\r\n (dispatch: any, getState: any) => {\r\n dispatch(new SetRenderMode(renderMode));\r\n }\r\n};\r\n","import { Value, AdvancedSearchTypes, FavouriteConditionValue, FavouriteCondition } from 'app/types-shared';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { SelectItem } from 'ui/common/select/types';\r\n\r\nexport interface FilterDomainsResults {\r\n predefDateDefaultValue?: DbFunctionResult;\r\n reportTypeDescription?: string;\r\n usePredefDate?: boolean;\r\n filterDomain: FilterDomainNode[];\r\n}\r\n\r\nexport interface DbFunctionResult {\r\n dbFunction: number;\r\n}\r\n\r\nexport interface FilterDomainNode {\r\n domain: number;\r\n label: string;\r\n sequence?: number;\r\n advancedSearchType: number;\r\n searchRequired?: boolean;\r\n}\r\n\r\nexport interface Filter extends FilterDomainNode {\r\n id: string;\r\n\r\n advancedField: AdvancedSearchTypes;\r\n\r\n initialValue: any;\r\n conditions: FavouriteCondition[];\r\n\r\n optionType: OptionTypes;\r\n subOptionTypes: SubOptionTypes[];\r\n menuOptions: FilterOption[];\r\n\r\n isOpen: boolean;\r\n added?: boolean;\r\n}\r\n\r\nexport interface IFilter {\r\n component: any;\r\n optionsEndpoint: (id?: number) => string;\r\n postfix?: string[];\r\n}\r\n\r\nexport enum FilterTypes {\r\n SelectMultiple = 1,\r\n SelectMultipleHierarchy = 2,\r\n TextField = 5,\r\n DateField = 6,\r\n NumberField = 7,\r\n CheckBox = 8,\r\n DecimalNumber = 10,\r\n MyUnit = 11,\r\n MyLocation = 12,\r\n Person = 13,\r\n SelectMultipleFlat = 14,\r\n PredefDate = 5001,\r\n PredefFilters = 5002\r\n}\r\n\r\nexport interface AdvancedSearchField {\r\n domain: number;\r\n label: string;\r\n advancedSearchType: number;\r\n children?: AdvancedSearchField[];\r\n searchRequired?: boolean;\r\n}\r\n\r\nexport interface FiltersState {\r\n //current list of showed filters inside FilterPanel.\r\n currentList: Filter[];\r\n //available advancedSearchFields which will be input for \"add new filter\" options.\r\n advancedSearchFields: AdvancedSearchField[];\r\n //advancedSearchTypes which will be needed to create favourite conditions.\r\n advancedSearchTypes: AdvancedSearchTypes[];\r\n // predefined list of filters\r\n filterDomains: FilterDomainNode[];\r\n\r\n reportData?: ReportData;\r\n}\r\n\r\nexport interface ReportData {\r\n\r\n reportTypeDescription?: string;\r\n\r\n date: Date;\r\n\r\n usePredefDate: boolean;\r\n}\r\n\r\nexport interface AdvancedSearchFieldResults {\r\n messages: any;\r\n data: AdvancedSearchField[];\r\n}\r\n\r\nexport enum FilterDomains {\r\n PredefFilters = 102,\r\n PredefDate = 103\r\n}\r\n\r\nexport enum ConnectionsOperatorTypes {\r\n include = 0,\r\n exclude = 20\r\n}\r\n\r\nexport const ExactLevelTypes = {\r\n include: false,\r\n exclude: true\r\n};\r\n\r\nexport enum ConditionValuesOperator {\r\n equal = 14,\r\n less = 10,\r\n largerOrEqual = 11,\r\n lessOrEqual = 12,\r\n between = 7,\r\n empty = 5,\r\n or = 2\r\n}\r\n\r\nexport enum ConditionValuesDbFunction {\r\n upper = 6\r\n}\r\n\r\nexport type ConditionValue = number | string | SelectItem[];\r\n\r\nexport interface ConditionTypesValueData {\r\n operator: Value;\r\n dbFunction: Value;\r\n}\r\n\r\nexport interface ConditionTypesValue {\r\n [filterType: number]: {\r\n [valueType: number]: ConditionTypesValueData\r\n };\r\n}\r\n\r\nexport enum ConditionValueTypes {\r\n default,\r\n fixedPeriod,\r\n dateRangeFrom,\r\n dateRangeTo,\r\n userProfile,\r\n numberSingle,\r\n numberSingleLargerOrEqual,\r\n numberSingleLess,\r\n numberRange,\r\n notSpecified,\r\n matchExact,\r\n decimalFrom,\r\n decimalTo\r\n}\r\n\r\nexport interface UserProfile {\r\n id: number;\r\n name: string;\r\n unit: ComplexValue<number>;\r\n location: ComplexValue<number>;\r\n}\r\n\r\nexport interface FilterValues {\r\n [index: number]: {\r\n value: FavouriteConditionValue | FavouriteConditionValue[];\r\n selector?: boolean;\r\n };\r\n}\r\n\r\nexport enum FilterMenuOptionsTypes {\r\n MainLevel,\r\n SubLevel\r\n}\r\n\r\nexport enum FilterMenuOptions {\r\n Clear,\r\n Include,\r\n Exclude,\r\n IncludeSubLevels,\r\n ExcludeSubLevels\r\n}\r\n\r\nexport interface FilterOption {\r\n id: string;\r\n option?: FilterMenuOptions;\r\n type?: FilterMenuOptionsTypes | OptionTypes;\r\n subOptionTypes?: SubOptionTypes[];\r\n}\r\n\r\nexport enum OptionTypes {\r\n FixedPeriod,\r\n SpecificPeriodRange,\r\n NotSpecified,\r\n ContainsWords,\r\n SpecificNumbersOrRanges\r\n}\r\n\r\nexport enum SubOptionTypes {\r\n MatchExact\r\n}\r\n","export const postfixOperator = {\r\n include: '_include',\r\n exclude: '_exclude'\r\n};\r\n\r\nexport const customFilterFieldPostfix = {\r\n fixedPeriod: '_fixedPeriod',\r\n dateIntervalFrom: '_dateIntervalFrom',\r\n dateIntervalTo: '_dateIntervalTo',\r\n userProfile: '_userProfile',\r\n number: '_number',\r\n decimalFrom: '_decimalFrom',\r\n decimalTo: '_decimalTo',\r\n predefDate: '_predefDate',\r\n notSpecified: '_notSpecified'\r\n};\r\n\r\nexport const storePostfix = {\r\n ...postfixOperator,\r\n ...customFilterFieldPostfix\r\n};\r\n\r\nexport const valuePropName = {\r\n text: 'string',\r\n number: 'number'\r\n};\r\n\r\nexport const userProfileProperties = {\r\n unit: 'unit',\r\n location: 'location',\r\n person: 'id'\r\n};\r\n\r\nexport const caseTypeDomainId = 100;\r\n\r\nexport const validationTranslations = {\r\n number_or_separator: 7725,\r\n required_field: 5949\r\n};\r\n\r\nexport const numberFieldOperators = {\r\n largerOrEqual: '<',\r\n less: '>',\r\n between: '-'\r\n};\r\n","\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { Filter, AdvancedSearchField, FilterTypes, FilterOption, FilterMenuOptions } from 'app/components/filters/types';\r\nimport { EditingValues } from 'app/components/filters/filters-panel/types';\r\nimport { postfixOperator, storePostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { createFormatters } from 'app/infrastructure/data/date';\r\nimport { AdvancedSearchOption, FilterList } from 'app/area/filters/types';\r\nimport { AdvancedSearchType } from 'app/area/favourite/types';\r\nimport { OptionItemSelections } from 'app/components/display-selected-options/display-selected-options';\r\n\r\nexport function mapToAdvancedSearchOptions(options: AdvancedSearchField[]): AdvancedSearchOption[] {\r\n return options.map(item => ({\r\n value: item.domain,\r\n description: item.label,\r\n descendants: !!item.children ? mapToAdvancedSearchOptions(item.children) : [],\r\n advancedSearchType: item.advancedSearchType,\r\n searchRequired: item.searchRequired\r\n } as AdvancedSearchOption));\r\n}\r\n\r\nexport function mapToSelectedOptions(value: number | string | Date | SelectItem[], type: FilterTypes, locale: any) {\r\n\r\n const formatters = createFormatters(locale);\r\n const values = {\r\n [FilterTypes.SelectMultiple]: value,\r\n [FilterTypes.SelectMultipleFlat]: value,\r\n [FilterTypes.SelectMultipleHierarchy]: value,\r\n [FilterTypes.TextField]: [{ description: String(value) }],\r\n [FilterTypes.DateField]: value && !!Object.keys(value).length ? [value] :\r\n (value instanceof Date && [{\r\n description: formatters.formatDate(value,\r\n { day: 'numeric', month: 'short', year: 'numeric' })\r\n }]),\r\n [FilterTypes.NumberField]: [{ description: String(value) }],\r\n [FilterTypes.CheckBox]: [{ description: Array.isArray(value) ? value.map(v=>v.value) : value }],\r\n [FilterTypes.DecimalNumber]: [{ description: String(value) }],\r\n [FilterTypes.MyUnit]: value,\r\n [FilterTypes.MyLocation]: value,\r\n [FilterTypes.Person]: value,\r\n [FilterTypes.PredefFilters]: value\r\n };\r\n\r\n return (!!value || value === 0) && values[type];\r\n}\r\n\r\nexport const mapToFilterList = (filters: Filter[], data: EditingValues, translation: any, locale: any): FilterList[] => {\r\n\r\n return data\r\n ? filters.map(filter =>\r\n [\r\n filter.id,\r\n ...Object.keys(storePostfix).map(key => filter.id + storePostfix[key])\r\n ]\r\n .filter(valueKey => data[valueKey] && (Array.isArray(data[valueKey].value)\r\n ? data[valueKey].value.length\r\n : data[valueKey].value || (data[valueKey].value as any) === 0))\r\n .map(valueKey => ({\r\n filter,\r\n selectedOptions: filter ? mapToSelectedOptions(data[valueKey].value, filter.advancedSearchType, locale) : undefined,\r\n key: valueKey.indexOf(postfixOperator.include) > 0 ? '' :\r\n (valueKey.indexOf(postfixOperator.exclude) > 0 ? translation.filters_excluded : null)\r\n }))\r\n )\r\n .reduce((memo, valueKeys) => [...memo, ...valueKeys], [])\r\n : [];\r\n};\r\n\r\nexport const createDescription = (value: ComplexValue<any>, filterList: FilterList, translation?: any) => {\r\n const descriptions = {\r\n [FilterTypes.SelectMultiple]: value.description,\r\n [FilterTypes.SelectMultipleFlat]: value.description,\r\n [FilterTypes.SelectMultipleHierarchy]: value.description,\r\n [FilterTypes.TextField]: value.description,\r\n [FilterTypes.DateField]: value.description,\r\n [FilterTypes.NumberField]: value.description,\r\n [FilterTypes.CheckBox]: String(value.description) === '1' ?\r\n translation && translation.filters_checkbox_checked : translation && translation.filters_checkbox_unchecked,\r\n [FilterTypes.DecimalNumber]: value.description,\r\n [FilterTypes.MyUnit]: value.allLevelDescription || value.description,\r\n [FilterTypes.MyLocation]: value.allLevelDescription || value.description,\r\n [FilterTypes.Person]: value.description,\r\n [FilterTypes.PredefFilters]: `${value.description} ${filterList.key && `[${filterList.key}]`}`\r\n };\r\n\r\n return descriptions[filterList.filter.advancedSearchType];\r\n};\r\n\r\nexport const createTitle = (title: string, filterList: FilterList) => {\r\n const titles = {\r\n [FilterTypes.MyUnit]: title,\r\n [FilterTypes.MyLocation]: title,\r\n [FilterTypes.Person]: title\r\n };\r\n\r\n return titles[filterList.filter.advancedSearchType];\r\n};\r\n\r\nexport const createExcludedValues = (menuOptions: FilterOption, translation: any) => {\r\n const options = {\r\n [FilterMenuOptions.Exclude]: translation.filter_summary_exclude,\r\n [FilterMenuOptions.ExcludeSubLevels]: translation.filter_summary_exclude_sub\r\n };\r\n\r\n return options[menuOptions.option];\r\n};\r\n\r\nexport const selectedOptionsByFilterItem = (filterList: FilterList[], translation: any): OptionItemSelections => {\r\n const values = {\r\n advancedSearchType: filterList[0].filter.advancedSearchType,\r\n descriptions: filterList.map(filterListItem => filterListItem.selectedOptions\r\n .map(option => createDescription(option, filterListItem, translation))),\r\n titles: filterList.map(filterListItem => filterListItem.selectedOptions\r\n .map(option => option.title && createTitle(option.title, filterListItem))),\r\n excludedValues: filterList[0].filter.menuOptions && filterList[0].filter.menuOptions\r\n .map(option => option && createExcludedValues(option, translation))\r\n .filter(option => !!option)\r\n };\r\n\r\n const rangeFormatter = () => {\r\n const valueFirst = values.descriptions[0];\r\n const valueSecond = values.descriptions[1];\r\n\r\n return [(valueFirst && valueSecond) ? (valueFirst + ' - ' + valueSecond) : ((valueFirst && !valueSecond) ? valueFirst : valueSecond)];\r\n };\r\n\r\n const predefinedFiltersFormatter = () => {\r\n return values.descriptions.reduce((previousValue, currentValue) => [...previousValue, ...currentValue]);\r\n };\r\n\r\n const defaultFiltersFormatter = () => {\r\n return values.descriptions.reduce((previousValue, currentValue) => [...currentValue, ...previousValue]);\r\n };\r\n\r\n return {\r\n values: [\r\n FilterTypes.DateField,\r\n FilterTypes.DecimalNumber\r\n ].indexOf(values.advancedSearchType) > -1 ? rangeFormatter() :\r\n (values.advancedSearchType === FilterTypes.PredefFilters ? predefinedFiltersFormatter() : defaultFiltersFormatter()),\r\n titles: values.titles.reduce((previousValue, currentValue) => [...currentValue, ...previousValue]),\r\n excludedValues: values.excludedValues\r\n };\r\n};\r\n\r\nexport const getSelectedOptionsIds = (editingValues: EditingValues, filterDomainId: number) => {\r\n return Object.keys(editingValues)\r\n .filter(key => key.indexOf(String(filterDomainId)) === 0)\r\n .map(key => editingValues[key] && editingValues[key].value)\r\n .reduce((memo, editingValue) => {\r\n return editingValue ? [\r\n ...editingValue.map(v => v.value),\r\n ...memo\r\n ] : memo;\r\n }, []) as number[];\r\n};\r\n\r\nexport function mapToAdvancedSearchTypes(options: AdvancedSearchOption[]): AdvancedSearchType[] {\r\n return options.map(item => ({\r\n domain: item.value,\r\n label: item.description,\r\n advancedSearchType: item.advancedSearchType,\r\n searchRequired: item.searchRequired,\r\n added: true\r\n }));\r\n}\r\n\r\nexport const createFilteredValues = (values: any, validation: any) => {\r\n return Object.keys(values).reduce((memo, key) => {\r\n return validation[key]\r\n ? memo\r\n : {\r\n ...memo,\r\n [key]: values[key]\r\n };\r\n }, {});\r\n};\r\n","import { FilterList } from './types';\r\nimport { selectedOptionsByFilterItem } from 'app/area/filters/filters-mapping';\r\n\r\nexport const mapToDisplaySelectedOptions = (filterList: FilterList[], translation: any) => {\r\n const result = filterList.reduce(\r\n (previous: { [indexer: string]: { value: string, label: string, data: FilterList[] } },\r\n current: FilterList) => {\r\n const existinOptionItem = previous[current.filter.id];\r\n if (existinOptionItem) {\r\n previous[current.filter.id] = {\r\n ...existinOptionItem,\r\n data: [...existinOptionItem.data, current]\r\n };\r\n } else {\r\n previous[current.filter.id] = {\r\n value: current.filter.id,\r\n label: current.filter.label,\r\n data: [current]\r\n };\r\n }\r\n\r\n return previous;\r\n }, {});\r\n\r\n return Object.keys(result).map(item => {\r\n const obj = result[item];\r\n\r\n return {\r\n value: obj.value,\r\n label: obj.label,\r\n selections: selectedOptionsByFilterItem(obj.data.map(value => {\r\n return {\r\n ...value, selectedOptions: [...value.selectedOptions]\r\n .map(code => {\r\n return {\r\n ...code,\r\n value: code.value,\r\n description: code.description || String(code.value)\r\n };\r\n }).sort((a, b) => a.description.localeCompare(b.description))\r\n };\r\n }), translation)\r\n };\r\n });\r\n};\r\n","import { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { OptionsType } from 'ui/common/select/types';\r\nimport { SimpleFormValidation, SimpleFormValidationProp } from './validation';\r\nimport { ValidationProps } from 'ui';\r\n\r\nexport type SimpleFormContainerProps = SimpleFormContainerInternalProps & SimpleFormComponentProps\r\n & SimpleFormContainerState & DefaultContainerProps;\r\n\r\nexport interface SimpleFormContainerState {\r\n loadedOptions: object;\r\n}\r\n\r\nexport enum ApiToUse {\r\n API,\r\n ADMINAPI\r\n}\r\n\r\nexport const SerializeType = {\r\n PRIMITIVE_VALUE: 'PRIMITIVE_VALUE',\r\n V_VALUE: 'V_VALUE',\r\n MULTIPLE_V_VALUES: 'MULTIPLE_V_VALUES',\r\n VALUE_PAIRS: 'VALUE_PAIRS'\r\n};\r\n\r\nexport type SimpleFormSerialize = {\r\n [key: string]: string;\r\n type: string;\r\n formName?: string;\r\n};\r\n\r\nexport type SerializeMapping = {\r\n [key: string]: (storeValue: any, currentWireOutput: FormWireItem, options: SimpleFormSerialize, allValues: any) => any\r\n};\r\n\r\nexport interface SimpleFormValuesStoreData {\r\n [key: string]: {\r\n value: any\r\n };\r\n}\r\n\r\nexport interface SimpleFormEditingStoreData {\r\n values: SimpleFormValuesStoreData;\r\n persistedValues: SimpleFormValuesStoreData;\r\n validation: any;\r\n hasChanges: boolean;\r\n}\r\n\r\nexport interface SimpleFormComponentStoreData {\r\n [name: string]: {\r\n componentType: FIELD_TYPE,\r\n serialize: SimpleFormSerialize,\r\n validationProps?: SimpleFormValidationProp[]\r\n };\r\n}\r\n\r\nexport interface SimpleFormAreaState {\r\n editing: SimpleFormEditingStoreData;\r\n tempdata: any;\r\n componentData: SimpleFormComponentStoreData;\r\n}\r\n\r\nexport interface SimpleFormState {\r\n simpleForm: SimpleFormAreaState;\r\n validation?: any;\r\n texts?: any;\r\n}\r\n\r\nexport interface SimpleFormContainerInternalProps {\r\n simpleForm: SimpleFormAreaState;\r\n validation: any;\r\n}\r\n\r\nexport interface ValueToStoreData { [name: string]: { value: string | number | object }; }\r\n\r\nexport interface TextLabel {\r\n text: string | JSX.Element;\r\n label?: string;\r\n required?: boolean;\r\n}\r\n\r\nexport interface InitialValueObject {\r\n value: number;\r\n description: string;\r\n}\r\n\r\nexport interface SimpleFormComponentProps {\r\n /**\r\n * Fields defined in field-types.ts\r\n * \r\n */\r\n type: FIELD_TYPE;\r\n\r\n /**\r\n * Name - will be used as a property name in store\r\n * \r\n */\r\n name: string;\r\n\r\n /**\r\n * Will be injected to the store as the initial value\r\n * \r\n */\r\n initialValue: any;\r\n\r\n label?: TextLabel;\r\n\r\n /**\r\n * Endpoint for requesting options for Select components\r\n * \r\n */\r\n optionsEndpoint?: string;\r\n optionsParams?: any;\r\n optionsDisplaySetting?: OptionsType;\r\n\r\n /**\r\n * Collection of options\r\n * \r\n */\r\n staticOptions?: any;\r\n\r\n /**\r\n * True - component will be loaded as open\r\n * \r\n */\r\n hasFocus?: boolean;\r\n\r\n /**\r\n * Translations for Select components\r\n * \r\n */\r\n translation?: any;\r\n placeholder?: string;\r\n\r\n /**\r\n * Configuration of DateTime component\r\n * \r\n */\r\n locale?: string;\r\n useTime?: boolean;\r\n\r\n className?: string;\r\n readOnly?: boolean;\r\n readOnlyLabel?: string;\r\n\r\n apiToUse?: ApiToUse;\r\n descriptionAllLevels?: boolean;\r\n initiallyShowLongDescription?: boolean;\r\n serialize?: SimpleFormSerialize;\r\n validationProps?: SimpleFormValidationProp[];\r\n\r\n maxLength?: number;\r\n maxValue?: number;\r\n minValue?: number;\r\n maxDecimals?: number;\r\n errorMessage?: string;\r\n infoText?: string;\r\n\r\n alwaysOpen?: boolean;\r\n searchRequired?: boolean;\r\n resetPreviousValueWhenEmpty?: boolean;\r\n categoryId?: number;\r\n}\r\n\r\nexport type FormValuesType = { [key: string]: number | string | ComplexValue<number> | ComplexValue<number>[] };\r\n\r\nexport interface SimpleFormStateProps {\r\n formValues: FormValuesType;\r\n serialize: (serializeMapping: SerializeMapping) => FormWireData;\r\n validation: { [key: string]: ValidationProps };\r\n}\r\n\r\nexport interface SimpleFormDispatchProps {\r\n validate: SimpleFormValidation;\r\n}\r\n\r\nexport type SimpleFormProps = SimpleFormStateProps & SimpleFormDispatchProps;\r\n\r\nexport interface SimpleFormMethods {\r\n getProperty: (name: string) => any;\r\n getOptions: (name: string) => any;\r\n getValidation: (name: string) => any;\r\n onLoadOptions: (refName: string, optionsEndpoint: string, optionsParams: any) => any;\r\n handleChange: (name: string) => any;\r\n isFetching: (name: string) => any;\r\n createRefToScrollableComponent: (name: string) => any;\r\n buildLabel: (label: TextLabel) => any;\r\n}\r\n\r\nexport interface SimpleFieldFactoryParameters {\r\n displayNotSelectedOption?: boolean;\r\n}\r\n\r\nexport type FormWireValue = { v: number };\r\nexport type FormWireArray = [\r\n { [key: string]: FormWireValue }\r\n];\r\n\r\nexport type FormWireItem = number | string | FormWireValue | FormWireArray;\r\n\r\nexport interface FormWireData {\r\n [key: string]: FormWireItem;\r\n}\r\n","export const filtersTranslations = {\r\n filters_predefined_filters: 7553,\r\n filters_predefined_date: 3853,\r\n filters_search_placeholder: 7557,\r\n filters_date_range_to: 7600,\r\n filters_date_range_from: 7567,\r\n filters_date_range_date_interval: 3707,\r\n filters_date_range_date_fixed_period: 3706,\r\n add_filters_button_title: 7593,\r\n add_filters_modal_add_button: 7338,\r\n add_filters_modal_title: 3560,\r\n remove_filter: 7662,\r\n filters_error_message: 7608,\r\n filters_exclude: 7638,\r\n filters_include: 7639,\r\n filter_menu_options_desc_exclude: 7693,\r\n filter_menu_options_desc_exclude_sub: 7691,\r\n filter_menu_option_include: 7698,\r\n filter_menu_option_exclude: 7693,\r\n filter_menu_option_include_sub: 7696,\r\n filter_menu_option_exclude_sub: 7691,\r\n filter_summary_exclude: 8034,\r\n filter_summary_exclude_sub: 8033,\r\n filters_included: 7643,\r\n filters_excluded: 7642,\r\n filters_decimal_range: 7679,\r\n filters_my_unit: 7714,\r\n filters_my_location: 7715,\r\n filters_person: 7767,\r\n filters_specific_numbers_ranges_title: 7833,\r\n filters_specific_numbers_ranges_subtitle: 7838,\r\n filters_contains_word: 7829,\r\n filters_contains_word_exact: 7837,\r\n filters_specified_period: 7830,\r\n filters_not_specified_title: 7832,\r\n filters_not_specified_subtitle: 7831,\r\n filters_must_be_withing_range: 7939,\r\n no_options_found: 7644,\r\n disclaimer_message: 7960,\r\n done: 7338,\r\n show_details: 7640,\r\n hide_details: 7641,\r\n clear_filters: 8139,\r\n search_required_message: 8146,\r\n filters_checkbox_checked: 7719,\r\n filters_checkbox_unchecked: 7720\r\n};\r\n\r\nexport const filterDomainIds = {\r\n caseType: 100\r\n};\r\n\r\nexport const endpoint = {\r\n filterDomains: 'report/filterDomains',\r\n filterDomainsSpecialReport: (reportId: number) => { return `report/specialReport/${reportId}/filterDomains`; },\r\n periods: 'search/options/periods',\r\n defaultPredefDate: (dbFunction: number) => `date/${dbFunction}`,\r\n predefinedFilters: 'report/predefinedFilters',\r\n favouriteAdvancedSearchTypes: 'favourite/definition/draft/advanced/types',\r\n favouriteAdvancedSearchFields: 'favourite/definition/draft/advanced/fields',\r\n searchFavouriteAdvancedSearchFields: 'favourite/definition/draft/advanced/fields/search',\r\n filterOptionsFor: (domainId: number) => { return `favourite/definition/draft/field/${domainId}/options`; }\r\n};\r\n","import { RemoteAdminData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { ApiResponse, HttpResponse } from 'app/types-shared';\r\nimport { OptionsRequestParams } from '../ui/form/types';\r\nimport { ApiToUse } from 'app/infrastructure/simple-form/types';\r\nimport { RemoteData } from 'app/infrastructure/remote-data';\r\n\r\nexport const api = {\r\n\r\n getOptions: async (componentEndpoint: string, loadOptionsParams: OptionsRequestParams,\r\n optionsParams: any, apiToUse: ApiToUse): Promise<HttpResponse<ApiResponse<any>>> => {\r\n const remote = apiToUse === ApiToUse.ADMINAPI ? RemoteAdminData : RemoteData;\r\n return new remote(componentEndpoint).resource<HttpResponse<ApiResponse<any>>>()\r\n .filter({\r\n ...loadOptionsParams,\r\n ...optionsParams\r\n }).all();\r\n }\r\n};\r\n","export type SimpleFormValidationRule = (data: any, translation: (id: number) => string) => SimpleFormValidationError;\r\n\r\nexport type SimpleFormValidationConfig = SimpleFormValidationRule[];\r\n\r\nexport enum ValidationType {\r\n Required,\r\n Email,\r\n Equals,\r\n Unique\r\n}\r\n\r\nexport interface SimpleFormValidationError {\r\n field: string;\r\n message: string;\r\n}\r\n\r\nexport type SimpleFormValidation = (\r\n configurationObject: SimpleFormValidationConfig,\r\n onContinue?: (any: any) => void,\r\n errorMessage?: string\r\n) => void;\r\n\r\nexport interface SimpleFormValidationProp {\r\n type: ValidationType;\r\n fields?: string | string[];\r\n}\r\n","export const validationTranslations = {\r\n must_be_filled: 5949,\r\n must_be_equal: 7681,\r\n must_be_unique: 8105,\r\n validation_error: 7702,\r\n email_invalid: 7758,\r\n phone_number_invalid: 8287\r\n};\r\n","export const normalizeValue = value => typeof value === 'string' ? value.trim() : value;\r\n","import { validationTranslations } from './constants';\r\nimport { isValidEmail } from '../../validation/email';\r\nimport { isValidPhoneNumber } from '../../validation/phone';\r\nimport { normalizeValue } from 'app/infrastructure/simple-form/utils';\r\n\r\nimport get from 'lodash/get';\r\nconst getNormalized = (t: any, s: string) => normalizeValue(get(t, s));\r\n\r\nexport const requiredValidation = (field: string) => (data: any, translation: (id: number) => string) => {\r\n const value = getNormalized(data, `${field}.value`);\r\n return !value || (value.value === '' || value.value === 0) || value === ''\r\n ? { field, message: translation(validationTranslations.must_be_filled) }\r\n : undefined;\r\n};\r\n\r\nexport const equalsValidation = (field: string, otherFields: string | string[]) => (data: any, translation: (id: number) => string) => {\r\n const value = getNormalized(data, `${field}.value`);\r\n\r\n const notEquals = Array.isArray(otherFields)\r\n ? (otherFields as string[]).some(\r\n otherField => value !== getNormalized(data, `${otherField}.value`))\r\n : value !== getNormalized(data, `${otherFields}.value`);\r\n\r\n return notEquals\r\n ? { field: field, message: translation(validationTranslations.must_be_equal) }\r\n : undefined;\r\n};\r\n\r\nexport const validateEmail = (field: string) => (data: any, translation: (id: number) => string) => {\r\n const value = getNormalized(data, `${field}.value`);\r\n\r\n return value && !isValidEmail(value)\r\n ? { field, message: translation(validationTranslations.email_invalid) }\r\n : undefined;\r\n};\r\n\r\nexport const validatePhoneNumber = (field: string) => (data: any, translation: (id: number) => string) => {\r\n const value = getNormalized(data, `${field}.value`);\r\n\r\n return value && !isValidPhoneNumber(value)\r\n ? { field, message: translation(validationTranslations.phone_number_invalid) }\r\n : undefined;\r\n};\r\n\r\nexport const uniqueValidation = (field: string, otherFields: string | string[]) => (data: any, translation: (id: number) => string) => {\r\n\r\n const value = getNormalized(data, `${field}.value`);\r\n\r\n if (value === undefined || value === '') {\r\n return undefined;\r\n }\r\n\r\n const equlas = Array.isArray(otherFields)\r\n ? (otherFields as string[]).some(otherField => value === getNormalized(data, `${otherField}.value`))\r\n : value === getNormalized(data, `${otherFields}.value`);\r\n\r\n return equlas\r\n ? { field: field, message: translation(validationTranslations.must_be_unique) }\r\n : undefined;\r\n};\r\n","export const isValidPhoneNumber = (phoneNumber: string) => /^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*$/g.test(phoneNumber);\r\n","import { ValidationLevel } from 'ui';\r\nimport { SimpleFormValuesStoreData } from '../types';\r\nimport { SimpleFormValidationConfig } from './types';\r\n\r\nexport const validate = (config: SimpleFormValidationConfig, data: SimpleFormValuesStoreData, translation: (id: number) => string) => {\r\n\r\n return config.reduce((m, rule) => {\r\n const result = rule(data, translation);\r\n\r\n if (result) {\r\n m[result.field] = {\r\n level: ValidationLevel.error,\r\n messages: [\r\n ...(m[result.field] && m[result.field].messages || []),\r\n {\r\n level: ValidationLevel.error,\r\n message: result.message\r\n }\r\n ]\r\n };\r\n }\r\n return m;\r\n }, {});\r\n};\r\n","import { requiredValidation, validateEmail, equalsValidation, uniqueValidation } from './rules';\r\nimport { ValidationType, SimpleFormValidationProp, SimpleFormValidationRule } from './types';\r\n\r\nconst convertion = {\r\n [ValidationType.Required]: (field: string) => requiredValidation(field),\r\n [ValidationType.Email]: (field: string) => validateEmail(field),\r\n [ValidationType.Equals]: (field: string, otherFields: string | string[]) =>\r\n equalsValidation(field, otherFields),\r\n [ValidationType.Unique]: (field: string, otherFields: string | string[]) =>\r\n uniqueValidation(field, otherFields)\r\n};\r\n\r\nconst nullConvertion = (field: string, otherFields: string | string[]) => undefined;\r\n\r\nexport const convertToValidationRule = (field: string, validationProp: SimpleFormValidationProp): SimpleFormValidationRule => {\r\n const converter = convertion[validationProp.type] || nullConvertion;\r\n return converter(field, validationProp.fields);\r\n};\r\n","import { api } from './api';\r\nimport * as actionTypes from './action-types';\r\nimport { ValueToStoreData, ApiToUse, SimpleFormSerialize, SimpleFormState } from './types';\r\nimport { FIELD_TYPE } from './field-types';\r\nimport { mapToOptionsRequestParams } from '../data/codes';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport {\r\n validate, convertToValidationRule,\r\n SimpleFormValidationConfig, SimpleFormValidationProp, SimpleFormValidationRule\r\n} from 'app/infrastructure/simple-form/validation';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe, LoggedError } from 'app/infrastructure/redux';\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const actionCreators = (path: string) => ({\r\n\r\n /**\r\n * Components defining a onChange event gets an onChange callback assigned.\r\n * onChange calls into this action creator whenever the components value is changed.\r\n * The redux store will be updated with the new value;\r\n */\r\n valueChanged: (\r\n componentContext: string,\r\n newValue: any): ActionDispatching<any, any> => errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actionTypes.ValueChange(path, componentContext, newValue));\r\n }),\r\n\r\n /**\r\n * Components defining an onLoadOptions event gets a callback assigned.\r\n * The callback assigned calls into this action creator to load code table data into the redux store.\r\n * The related reducer will store the data using the componentContext as id in a temporary store slice.\r\n */\r\n loadOptions: (\r\n componentContext: string,\r\n componentEndpoint: string,\r\n loadOptionsParams: any,\r\n optionsParams?: any,\r\n apiToUse?: ApiToUse): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actionTypes.RequestCodetable(path, componentContext));\r\n\r\n try {\r\n const response: any = await api.getOptions(\r\n loadOptionsParams && loadOptionsParams.query\r\n ? `${componentEndpoint}/search`\r\n : componentEndpoint,\r\n mapToOptionsRequestParams(loadOptionsParams),\r\n optionsParams,\r\n apiToUse);\r\n const complexResponseWithFilteredOutZero = response &&\r\n response.data &&\r\n response.data.rootCodes;\r\n const simpleResponse = response && response.data ? response.data : null;\r\n\r\n dispatch(new actionTypes.ReceiveCodetable(path, componentContext, loadOptionsParams && loadOptionsParams.query,\r\n complexResponseWithFilteredOutZero || simpleResponse));\r\n } catch (err) {\r\n dispatch(new LoggedError(err));\r\n dispatch(new actionTypes.FailCodetable(path, componentContext));\r\n }\r\n },\r\n\r\n /**\r\n * Component can add certain values (ex. retrieved from current user data) and save it\r\n * as form-compatible initial value \r\n */\r\n insertValueToStore: (\r\n input: ValueToStoreData\r\n ): ActionDispatching<any, any> => errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actionTypes.InsertValueToStore(path, input));\r\n }),\r\n\r\n insertComponentDataToStore: (name: string, type: FIELD_TYPE,\r\n serialize: SimpleFormSerialize,\r\n validationProps: SimpleFormValidationProp[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actionTypes.InsertComponentDataToStore(path, name, type, serialize, validationProps));\r\n }),\r\n\r\n clearValueInStore: (name): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actionTypes.ClearValueInStore(path, name));\r\n }),\r\n\r\n clearAllValues: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actionTypes.ClearAllValues(path));\r\n }),\r\n\r\n resetChangesListener: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actionTypes.ResetChangesListener(path));\r\n }),\r\n\r\n validate: (configurationObject: SimpleFormValidationConfig,\r\n onContinue?: (any: any) => void,\r\n errorMessage?: string): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n const state = getState()[path] as SimpleFormState;\r\n const { simpleForm: {\r\n editing: { values = {} } = {}, componentData = {}\r\n } = {},\r\n texts = {} } = state || {};\r\n\r\n const validationRules = Object.keys(componentData)\r\n .reduce((memo, key) => {\r\n if (componentData[key].validationProps) {\r\n return [\r\n ...memo,\r\n ...componentData[key].validationProps\r\n .map(validationProp => convertToValidationRule(key, validationProp))\r\n ];\r\n }\r\n return memo;\r\n }, [] as SimpleFormValidationRule[]);\r\n\r\n const translate = createDescriptionSelector(texts);\r\n const validation = validate([...configurationObject, ...validationRules], values, translate);\r\n\r\n dispatch(new actionTypes.ValidationChange(path, validation));\r\n\r\n if (!!Object.keys(validation).length) {\r\n\r\n // validation errors - do not send data\r\n if (errorMessage) {\r\n dispatch(new ErrorNotification(errorMessage));\r\n }\r\n return;\r\n }\r\n\r\n if (onContinue) {\r\n dispatch(onContinue);\r\n }\r\n },\r\n\r\n validationClear: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actionTypes.ValidationChange(path, []));\r\n })\r\n\r\n}); \r\n","export enum FIELD_TYPE {\r\n TEXTAREA = 'TEXTAREA',\r\n SELECT_SINGLE_HIERARCHY = 'SELECT_SINGLE_HIERARCHY',\r\n SELECT_SINGLE = 'SELECT_SINGLE',\r\n CHECKBOX_LIST = 'CHECKBOX_LIST',\r\n CHECKBOX = 'CHECKBOX',\r\n SELECT_MULTIPLE_HIERARCHY = 'SELECT_MULTIPLE_HIERARCHY',\r\n SELECT_MULTIPLE = 'SELECT_MULTIPLE',\r\n DATE_TIME = 'DATE_TIME',\r\n PASSWORD = 'PASSWORD',\r\n DECIMAL_NUMBER = 'DECIMAL_NUMBER'\r\n}\r\n","import * as React from 'react';\r\nimport { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { SelectSingleHierarchy } from 'ui';\r\n\r\nexport const selectSingleHierarchyCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState: any) =>\r\n <SelectSingleHierarchy\r\n onChange={fieldMethods.handleChange(props.name)}\r\n componentId={props.name}\r\n className={props.className}\r\n label={fieldMethods.buildLabel(props.label)}\r\n validation={fieldMethods.getValidation(props.name)}\r\n valueItem={fieldMethods.getProperty(props.name) || []}\r\n options={fieldMethods.getOptions(props.name)}\r\n textOptionsTitle={props.translation && props.translation.select_one_option}\r\n textOptionsNotFound={props.translation && props.translation.no_options_found}\r\n textOptionsDone={props.translation && props.translation.done}\r\n placeholder={props.placeholder}\r\n onLoadOptions={fieldMethods.onLoadOptions(props.name, props.optionsEndpoint, props.optionsParams)}\r\n loadOptions={fieldState.loadedOptions[props.name]}\r\n isOpen={props.hasFocus}\r\n ref={fieldMethods.createRefToScrollableComponent(props.name)}\r\n fetching={fieldMethods.isFetching(props.name)}\r\n readOnly={props.readOnly}\r\n descriptionAllLevels={props.descriptionAllLevels}\r\n initiallyShowLongDescription={props.initiallyShowLongDescription}\r\n info={{ text: props.infoText, visible: !!props.infoText }}\r\n alwaysOpen={props.alwaysOpen}\r\n searchRequired={props.searchRequired}\r\n textSearchRequired={props.translation && props.translation.search_required_message}\r\n resetPreviousValueWhenEmpty={props.resetPreviousValueWhenEmpty}\r\n categoryId={props.categoryId}\r\n />;\r\n","import * as React from 'react';\r\nimport { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { SelectSingle } from 'ui';\r\nimport { OptionsType } from 'ui/common/select/types';\r\n\r\nexport const selectSingleCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) =>\r\n <SelectSingle\r\n onChange={fieldMethods.handleChange(props.name)}\r\n componentId={props.name}\r\n className={props.className}\r\n label={fieldMethods.buildLabel(props.label)}\r\n validation={fieldMethods.getValidation(props.name)}\r\n valueItem={fieldMethods.getProperty(props.name) || []}\r\n options={fieldMethods.getOptions(props.name)}\r\n textOptionsTitle={props.translation && props.translation.select_one_option}\r\n textOptionsNotFound={props.translation && props.translation.no_options_found}\r\n textOptionsDone={props.translation && props.translation.done}\r\n placeholder={props.placeholder}\r\n onLoadOptions={fieldMethods.onLoadOptions(props.name, props.optionsEndpoint, props.optionsParams)}\r\n loadOptions={fieldState.loadedOptions[props.name]}\r\n isOpen={props.hasFocus}\r\n ref={fieldMethods.createRefToScrollableComponent(props.name)}\r\n fetching={fieldMethods.isFetching(props.name)}\r\n readOnly={props.readOnly}\r\n optionsDisplaySetting={{ type: OptionsType.flat }}\r\n initiallyShowLongDescription={props.initiallyShowLongDescription}\r\n showIcons={false}\r\n alwaysOpen={props.alwaysOpen}\r\n searchRequired={props.searchRequired}\r\n textSearchRequired={props.translation && props.translation.search_required_message}\r\n resetPreviousValueWhenEmpty={props.resetPreviousValueWhenEmpty}\r\n />;\r\n","import * as React from 'react';\r\nimport { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { SelectMultiple } from 'ui';\r\n\r\nexport const selectMultipleCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) =>\r\n <SelectMultiple\r\n onChange={fieldMethods.handleChange(props.name)}\r\n componentId={props.name}\r\n className={undefined}\r\n label={fieldMethods.buildLabel(props.label)}\r\n validation={fieldMethods.getValidation(props.name)}\r\n valueItems={fieldMethods.getProperty(props.name) || []}\r\n options={fieldMethods.getOptions(props.name)}\r\n textOptionsTitle={props.translation && props.translation.select_one_option}\r\n textOptionsNotFound={props.translation && props.translation.no_options_found}\r\n textOptionsDone={props.translation && props.translation.done}\r\n placeholder={props.placeholder}\r\n onLoadOptions={fieldMethods.onLoadOptions(props.name, props.optionsEndpoint, props.optionsParams)}\r\n loadOptions={fieldState.loadedOptions[props.name]}\r\n isOpen={props.hasFocus}\r\n ref={fieldMethods.createRefToScrollableComponent(props.name)}\r\n fetching={fieldMethods.isFetching(props.name)}\r\n readOnly={props.readOnly}\r\n optionsDisplaySetting={{ type: props.optionsDisplaySetting }}\r\n initiallyShowLongDescription={props.initiallyShowLongDescription}\r\n alwaysOpen={props.alwaysOpen}\r\n searchRequired={props.searchRequired}\r\n textSearchRequired={props.translation && props.translation.search_required_message}\r\n />;\r\n","import * as React from 'react';\r\nimport { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { SelectMultipleHierarchy } from 'ui';\r\n\r\nexport const selectMultipleHierarchyCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) =>\r\n <SelectMultipleHierarchy\r\n onChange={fieldMethods.handleChange(props.name)}\r\n componentId={props.name}\r\n className={undefined}\r\n label={fieldMethods.buildLabel(props.label)}\r\n validation={fieldMethods.getValidation(props.name)}\r\n valueItems={fieldMethods.getProperty(props.name) || []}\r\n options={fieldMethods.getOptions(props.name)}\r\n textOptionsTitle={props.translation && props.translation.select_one_option}\r\n textOptionsNotFound={props.translation && props.translation.no_options_found}\r\n textOptionsDone={props.translation && props.translation.done}\r\n placeholder={props.placeholder}\r\n onLoadOptions={fieldMethods.onLoadOptions(props.name, props.optionsEndpoint, props.optionsParams)}\r\n loadOptions={fieldState.loadedOptions[props.name]}\r\n isOpen={props.hasFocus}\r\n ref={fieldMethods.createRefToScrollableComponent(props.name)}\r\n fetching={fieldMethods.isFetching(props.name)}\r\n readOnly={props.readOnly}\r\n descriptionAllLevels={props.descriptionAllLevels}\r\n initiallyShowLongDescription={props.initiallyShowLongDescription}\r\n alwaysOpen={props.alwaysOpen}\r\n searchRequired={props.searchRequired}\r\n textSearchRequired={props.translation && props.translation.search_required_message}\r\n />;\r\n","import { dateToUTC, parseAsDateUTC, createUTCDate, createFormatters } from 'app/infrastructure/data/date';\r\nimport { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { DateTime } from 'ui';\r\nimport * as React from 'react';\r\n\r\nexport const dateTimeCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) => {\r\n const formatters: any = createFormatters(props.locale);\r\n return <DateTime\r\n onChange={fieldMethods.handleChange(props.name)}\r\n componentId={props.name}\r\n className={props.className}\r\n label={fieldMethods.buildLabel(props.label)}\r\n value={fieldMethods.getProperty(props.name)}\r\n placeholder={props.placeholder}\r\n ref={fieldMethods.createRefToScrollableComponent(props.name)}\r\n locale={props.locale}\r\n useTime={props.useTime}\r\n readOnly={props.readOnly}\r\n validation={fieldMethods.getValidation(props.name)}\r\n createDate={createUTCDate}\r\n parseDate={parseAsDateUTC}\r\n cloneDate={dateToUTC}\r\n {...formatters}\r\n />;\r\n};\r\n","import { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { Textarea } from 'ui';\r\nimport * as React from 'react';\r\n\r\nexport const textareaCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) =>\r\n <Textarea\r\n onChange={fieldMethods.handleChange(props.name)}\r\n componentId={props.name}\r\n className={props.className}\r\n label={fieldMethods.buildLabel(props.label)}\r\n value={fieldMethods.getProperty(props.name)}\r\n placeholder={props.placeholder}\r\n validation={fieldMethods.getValidation(props.name)}\r\n readOnly={props.readOnly}\r\n maxLength={props.maxLength}\r\n />;\r\n","import * as React from 'react';\r\nimport { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { CheckboxList, ComplexValue } from 'ui';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/field-types';\r\n\r\nexport interface CheckboxListOptions {\r\n [x: string]: ComplexValue<number>[];\r\n}\r\n\r\nexport const createCheckboxListOptions = (fieldProps: SimpleFormComponentProps, options: ComplexValue<number>[]) => {\r\n\r\n if (options) {\r\n const values: CheckboxListOptions = {\r\n [FIELD_TYPE.CHECKBOX_LIST]: options,\r\n [FIELD_TYPE.CHECKBOX]: [\r\n {\r\n value: options[0].value\r\n }\r\n ]\r\n };\r\n return values[fieldProps.type];\r\n }\r\n return [];\r\n};\r\n\r\nexport const checkboxListCreator = (fieldData: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) =>\r\n <CheckboxList\r\n className={undefined}\r\n componentId={fieldData.name}\r\n label={fieldMethods.buildLabel(fieldData.label)}\r\n valueItems={fieldMethods.getProperty(fieldData.name)}\r\n options={createCheckboxListOptions(fieldData, fieldData.staticOptions)}\r\n onChange={fieldMethods.handleChange(fieldData.name)}\r\n />;\r\n","import { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { Password } from 'ui';\r\nimport * as React from 'react';\r\n\r\nexport const passwordCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) =>\r\n <Password\r\n onChange={fieldMethods.handleChange(props.name)}\r\n componentId={props.name}\r\n className={props.className}\r\n label={fieldMethods.buildLabel(props.label)}\r\n value={fieldMethods.getProperty(props.name)}\r\n placeholder={props.placeholder}\r\n validation={fieldMethods.getValidation(props.name)}\r\n />;\r\n","import { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { Checkbox } from 'ui';\r\nimport * as React from 'react';\r\n\r\nexport const checkboxCreator = (props: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) => {\r\n \r\n return (\r\n <Checkbox\r\n className={props.className}\r\n componentId={props.name}\r\n value={fieldMethods.getProperty(props.name)}\r\n label={fieldMethods.buildLabel(props.label)}\r\n onChange={fieldMethods.handleChange(props.name)}\r\n />);\r\n};\r\n","import * as React from 'react';\r\nimport { SimpleFormComponentProps, SimpleFormMethods } from 'app/infrastructure/simple-form/types';\r\nimport { Numberbox } from 'ui';\r\n\r\nexport const decimalNumberCreator = (fieldData: SimpleFormComponentProps, fieldMethods: SimpleFormMethods, fieldState?: any) =>\r\n <Numberbox\r\n componentId={fieldData.name}\r\n className={fieldData.className}\r\n locale={fieldData.locale}\r\n placeholder={fieldData.placeholder}\r\n label={fieldMethods.buildLabel(fieldData.label)}\r\n value={fieldMethods.getProperty(fieldData.name)}\r\n onChange={fieldMethods.handleChange(fieldData.name)} \r\n maxDecimals={fieldData.maxDecimals}\r\n maxValue={fieldData.maxValue}\r\n minValue={fieldData.minValue}\r\n readOnly={fieldData.readOnly}\r\n validation={fieldMethods.getValidation(fieldData.name)}\r\n textInvalidRangeError={fieldData.errorMessage}\r\n />;\r\n","import * as React from 'react';\r\nimport { actionCreators } from './actions';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { FIELD_TYPE } from './field-types';\r\nimport { SimpleFormComponentProps, SimpleFormContainerProps, SimpleFormMethods, TextLabel, ApiToUse, SimpleFieldFactoryParameters }\r\n from 'app/infrastructure/simple-form/types';\r\nimport {\r\n textareaCreator, selectSingleCreator, selectSingleHierarchyCreator,\r\n selectMultipleCreator, selectMultipleHierarchyCreator, dateTimeCreator,\r\n passwordCreator, checkboxListCreator, checkboxCreator\r\n} from './common';\r\nimport { LoadOptions } from 'app/types-shared';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { decimalNumberCreator } from 'app/infrastructure/simple-form/common/decimal-number';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport get from 'lodash/get';\r\n\r\n/**\r\n * In order to use that component:\r\n *\r\n * 1. Add following lines in your imports:\r\n *\r\n * > import { FIELD_TYPE, simpleFieldForPath } from 'app/infrastructure/simple-form/'\r\n * import { LoadOptions } from 'app/types';\r\n * import { selectMultipleHierarchyCreator } from './common/selectMultipleHierarchyCreator';\r\n * import { selectMultipleCreator } from './common/selectMultipleCreator';\r\n * > const SimpleForm = simpleFieldForPath(STATE.<<YOUR_PATH_IN_STORE>>);\r\n *\r\n * 2. Configure your reducer to use its own reducers and generated from factory for this component:\r\n *\r\n * > export const reducer: Reducer<ProfileState> = (state: ProfileState = INITIAL_PROFILE_STATE, action: any) => {\r\n * > const r = reducers[action.type];\r\n * > return (r && r(state, action)) || simpleFormReducer(<<YOUR_PATH_IN_STORE>>)(state, action); };\r\n *\r\n * 3. Add SimpleForm to your component:\r\n *\r\n * > <SimpleForm\r\n * > name=\"name\"\r\n * > type={FIELD_TYPE.TEXTAREA}\r\n * > label={{ text: 'Your name', label: 'user' }} />\r\n *\r\n * Description of SimpleForm API is in 'types.ts' SimpleFormComponentData.\r\n *\r\n */\r\n\r\n// tslint:disable:max-func-body-length\r\nexport const simpleFieldForPath = (path: string, parameters: SimpleFieldFactoryParameters = {}) => {\r\n const actions = actionCreators(path);\r\n class SimpleField extends React.Component<SimpleFormContainerProps & typeof actions, any> {\r\n public static statePath: string = path;\r\n public state: Readonly<any> = {\r\n loadedOptions: {}\r\n };\r\n\r\n private refsToScrollableComponent: any = {};\r\n\r\n private getProperty = (name: string) => {\r\n const value = get(this.props, `simpleForm.editing.values[${name}].value`);\r\n return !!value || value === 0 ? value : undefined;\r\n }\r\n\r\n private getOptions = (name: string) => {\r\n return this.props.simpleForm &&\r\n this.props.simpleForm.tempdata && this.props.simpleForm.tempdata[name] && this.props.simpleForm.tempdata[name].data;\r\n }\r\n\r\n private getValidation = (name: string) => {\r\n const componentValidation = get(this.props, `validation[${name}]`);\r\n const simpleFormValidation = get(this.props, `simpleForm.editing.validation[${name}]`);\r\n return { ...componentValidation, ...simpleFormValidation };\r\n }\r\n\r\n private onLoadOptions = (refName: string, optionsEndpoint: string, optionsParams: any) => (event: LoadOptions) => {\r\n this.props.loadOptions(\r\n refName,\r\n optionsEndpoint,\r\n event,\r\n { ...optionsParams, displayNotSelected: parameters.displayNotSelectedOption },\r\n this.props.apiToUse || ApiToUse.API\r\n );\r\n this.setState({ loadedOptions: { [refName]: event } });\r\n return;\r\n }\r\n\r\n private handleChange = (refName: string) => (event: any) => {\r\n this.props.valueChanged(refName, event);\r\n }\r\n\r\n private isFetching = (refName: string) => {\r\n if (!this.props.simpleForm || !this.props.simpleForm.tempdata\r\n || !this.props.simpleForm.tempdata[refName]) {\r\n return false;\r\n }\r\n\r\n const isFetching = this.props.simpleForm.tempdata[refName].fetching;\r\n const isFocusedAndFetchingDidntStartYet = !this.props.simpleForm.tempdata[refName];\r\n\r\n return isFetching || isFocusedAndFetchingDidntStartYet;\r\n }\r\n\r\n private createRefToScrollableComponent = (refName: string) => (target) => {\r\n this.refsToScrollableComponent[refName] = ReactDOM.findDOMNode(target);\r\n }\r\n\r\n private buildLabel = (label: TextLabel) => {\r\n return label && {\r\n text: label.text,\r\n visible: true,\r\n icon: label.label || null,\r\n required: label.required || false\r\n };\r\n }\r\n\r\n private fieldMethods: SimpleFormMethods = {\r\n getProperty: this.getProperty,\r\n getOptions: this.getOptions,\r\n getValidation: this.getValidation,\r\n onLoadOptions: this.onLoadOptions,\r\n handleChange: this.handleChange,\r\n isFetching: this.isFetching,\r\n createRefToScrollableComponent: this.createRefToScrollableComponent,\r\n buildLabel: this.buildLabel\r\n };\r\n\r\n private loadOptionsForEndpoint = () => {\r\n const { name, initialValue } = this.props;\r\n\r\n let loadOptions = null;\r\n\r\n if (initialValue && initialValue.value !== 0) {\r\n loadOptions = { siblingId: initialValue.value, displayNotSelected: parameters.displayNotSelectedOption } as LoadOptions;\r\n this.setState({ loadedOptions: { [name]: loadOptions } });\r\n }\r\n\r\n const { optionsEndpoint, optionsParams } = this.props;\r\n\r\n this.refsToScrollableComponent[name].scrollIntoView();\r\n\r\n this.props.loadOptions(name, optionsEndpoint, loadOptions, optionsParams);\r\n }\r\n\r\n public componentDidUpdate(prevProps: SimpleFormContainerProps) {\r\n const { serialize, validationProps, name, simpleForm } = this.props;\r\n\r\n if (prevProps.hasFocus !== this.props.hasFocus) {\r\n this.loadOptionsForEndpoint();\r\n }\r\n\r\n const componentData = simpleForm && simpleForm.componentData && simpleForm.componentData[name];\r\n const prevSerialize = componentData && componentData.serialize;\r\n const prevValidation = componentData && componentData.validationProps;\r\n\r\n if (!deepEquals(prevSerialize, serialize) || !deepEquals(prevValidation, validationProps)) {\r\n this.updateComponent();\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n const { hasFocus, initialValue, name, insertValueToStore } = this.props;\r\n\r\n if (hasFocus) {\r\n this.loadOptionsForEndpoint();\r\n }\r\n if (initialValue && initialValue.value === 0) {\r\n insertValueToStore({\r\n [name]: {\r\n value: { value: 0, description: '' }\r\n }\r\n });\r\n } else {\r\n insertValueToStore({ [name]: { value: initialValue } });\r\n }\r\n this.updateComponent();\r\n }\r\n\r\n public componentWillUnmount() {\r\n const { name, clearValueInStore } = this.props;\r\n clearValueInStore(name);\r\n }\r\n\r\n private updateComponent = () => {\r\n const { name, type, serialize, validationProps, insertComponentDataToStore } = this.props;\r\n\r\n if (type && name) {\r\n insertComponentDataToStore(name, type, serialize, validationProps);\r\n }\r\n }\r\n\r\n private buildField = () => {\r\n const typeMaps = {\r\n [FIELD_TYPE.TEXTAREA]: textareaCreator,\r\n [FIELD_TYPE.SELECT_SINGLE_HIERARCHY]: selectSingleHierarchyCreator,\r\n [FIELD_TYPE.SELECT_SINGLE]: selectSingleCreator,\r\n [FIELD_TYPE.CHECKBOX_LIST]: checkboxListCreator,\r\n [FIELD_TYPE.CHECKBOX]: checkboxCreator,\r\n [FIELD_TYPE.SELECT_MULTIPLE]: selectMultipleCreator,\r\n [FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY]: selectMultipleHierarchyCreator,\r\n [FIELD_TYPE.DATE_TIME]: dateTimeCreator,\r\n [FIELD_TYPE.PASSWORD]: passwordCreator,\r\n [FIELD_TYPE.DECIMAL_NUMBER]: decimalNumberCreator\r\n };\r\n return this.props.type && this.props.name && typeMaps[this.props.type]\r\n && typeMaps[this.props.type](this.props, this.fieldMethods, this.state) || null;\r\n }\r\n\r\n public render() {\r\n return this.buildField();\r\n }\r\n }\r\n\r\n return connect<any, any, SimpleFormComponentProps>(\r\n (state: any, props: any) => ({ ...state[path], ...{ locale: state.app.locale } }),\r\n dispatch => bindActionCreators(actions, dispatch)\r\n )(SimpleField);\r\n\r\n};\r\n","import {\r\n SimpleFormComponentStoreData,\r\n SerializeType, SimpleFormSerialize, SerializeMapping,\r\n FormWireData, FormWireItem, FormWireArray\r\n} from './types';\r\nimport { normalizeValue } from './utils';\r\n\r\nimport get from 'lodash/get';\r\n\r\nexport const serializeData = (componentData: SimpleFormComponentStoreData, values: any, serializeMapping: SerializeMapping) => {\r\n return Object.keys(componentData).reduce((memo, key) => {\r\n if (componentData[key].serialize) {\r\n const { type, formName } = componentData[key].serialize;\r\n const valueKey = formName || key;\r\n if (values[key]) {\r\n memo[valueKey] = serializeMapping[type](values[key].value, memo[valueKey], componentData[key].serialize, values);\r\n }\r\n }\r\n return memo;\r\n }, {} as FormWireData);\r\n};\r\n\r\nexport const serialize = (path: string, state: any) => (serializeMapping: SerializeMapping) => {\r\n const values = get(state, `${path}.simpleForm.editing.values`) || {};\r\n const componentData: SimpleFormComponentStoreData = get(state, `${path}.simpleForm.componentData`) || {};\r\n return serializeData(componentData, values, serializeMapping);\r\n};\r\n\r\nexport const defaultSerializeMappings = {\r\n [SerializeType.PRIMITIVE_VALUE]:\r\n (storeValue, currentWireOutput: FormWireItem, options: SimpleFormSerialize) => normalizeValue(storeValue),\r\n [SerializeType.V_VALUE]: (storeValue, currentWireOutput: FormWireItem, options: SimpleFormSerialize) =>\r\n (storeValue ? { v: storeValue.value } : {}),\r\n [SerializeType.MULTIPLE_V_VALUES]: (storeValue, currentWireOutput: FormWireItem, options: SimpleFormSerialize) =>\r\n (storeValue ? storeValue.map(v => ({ v: v.value })) : []),\r\n [SerializeType.VALUE_PAIRS]: (storeValue, currentWireOutput: FormWireItem, options: SimpleFormSerialize, allValues: any) => {\r\n const value = normalizeValue(storeValue);\r\n const groupValue = (allValues[options.groupField] || {}).value;\r\n const group = normalizeValue(groupValue);\r\n return [\r\n ...((currentWireOutput || []) as FormWireArray),\r\n ...((!!value) ? [{\r\n [options.valueKey]: value,\r\n [options.groupKey]: group\r\n }] : [])\r\n ] as FormWireArray;\r\n }\r\n};\r\n","import { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { actionCreators } from './actions';\r\nimport { serialize } from './serialize';\r\nimport { SimpleFormStateProps, SimpleFormDispatchProps } from './types';\r\n\r\nimport get from 'lodash/get';\r\n\r\nconst createActions = (path: string) => ({\r\n validate: actionCreators(path).validate\r\n});\r\n\r\nconst getValue = (path: string, state: any) => {\r\n const values = get(state, `${path}.simpleForm.editing.values`) || {};\r\n return Object.keys(values).reduce((memo, key) => {\r\n if (values[key]) {\r\n memo[key] = values[key].value;\r\n }\r\n return memo;\r\n }, {});\r\n};\r\n\r\nconst getValidation = (path: string, state: any, ownProps: any) => {\r\n const validation = get(state, `${path}.simpleForm.editing.validation`) || {};\r\n return {\r\n ...(!!ownProps && ownProps.validation),\r\n ...validation\r\n };\r\n};\r\n\r\nconst createStateToProps = <TOwnProps>(path: string) => (state: any, props?: TOwnProps): SimpleFormStateProps => ({\r\n formValues: getValue(path, state),\r\n serialize: serialize(path, state),\r\n validation: getValidation(path, state, props)\r\n});\r\n\r\nconst createMapDispatchToProps = (path: string) => (dispatch: Redux.Dispatch<ApplicationState>) => ({\r\n dispatch,\r\n ...bindActionCreators(createActions(path), dispatch)\r\n});\r\n\r\nexport const withValidation = (component) => {\r\n return connect<any, any, any>(undefined, createMapDispatchToProps(component.statePath))(component);\r\n};\r\nexport const withSimpleForm = <TOwnProps>(component) => {\r\n return connect<SimpleFormStateProps, SimpleFormDispatchProps, TOwnProps>(\r\n createStateToProps<TOwnProps>(component.statePath),\r\n createMapDispatchToProps(component.statePath)\r\n )(component);\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonTertiary } from 'ui';\r\nimport FaAngleDown from 'react-icons/lib/fa/angle-down';\r\nimport styles from './display-selected-options.scss';\r\n\r\nexport interface OptionItemSelections {\r\n titles: string[];\r\n values: (string | number)[];\r\n excludedValues: string[];\r\n}\r\n\r\nexport interface OptionItem {\r\n value: string;\r\n label: string;\r\n selections: OptionItemSelections;\r\n}\r\n\r\ninterface DisplaySelectedOptionsComponentProps {\r\n selectedOptions: OptionItem[];\r\n textHideDetails: string;\r\n textShowDetails: string;\r\n}\r\n\r\ninterface DisplaySelectedOptionsComponentState {\r\n isOverflowing: boolean;\r\n isExpanded: boolean;\r\n overflowHeight: number;\r\n}\r\n\r\nclass DisplaySelectedOptionsComponent extends React.Component<DisplaySelectedOptionsComponentProps, DisplaySelectedOptionsComponentState> {\r\n\r\n private listRef: React.RefObject<HTMLOListElement> = React.createRef();\r\n\r\n public state:Readonly<DisplaySelectedOptionsComponentState> = {\r\n isExpanded: false,\r\n isOverflowing: false,\r\n overflowHeight: 0\r\n };\r\n\r\n private onClick = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.setState({\r\n isExpanded: !this.state.isExpanded\r\n } as DisplaySelectedOptionsComponentState);\r\n }\r\n\r\n private setOptionItemValue = (title: string, value: string | number) => {\r\n const valueWithAdditionalInformation = <>{title} <span className={styles.additionalInformation}>({value})</span></>;\r\n return <p className={styles.optionItemValue}>{title ? valueWithAdditionalInformation : value}</p>;\r\n }\r\n\r\n private setExcludedOptionValue = (excludedValues: string[]) => {\r\n return excludedValues && excludedValues.length > 0 && '(' + excludedValues.join(', ') + ')';\r\n };\r\n\r\n private renderOptionItem = (item: OptionItem) => {\r\n return <li key={item.value}>\r\n <span>{item.label} {this.setExcludedOptionValue(item.selections.excludedValues)}</span>\r\n <ul className={styles.filtersSelected}>\r\n {item.selections.values.map((value, i) => <li key={i}>\r\n {this.setOptionItemValue(item.selections.titles[i], value)}\r\n </li>)}\r\n </ul>\r\n </li>;\r\n }\r\n\r\n public componentDidUpdate() {\r\n const list = this.listRef.current;\r\n if(list) {\r\n const scrollHeight = list.scrollHeight;\r\n\r\n if (!this.state.isExpanded) {\r\n const overflowHeight = Math.max(list.offsetHeight, this.state.overflowHeight);\r\n const isOverflowing = scrollHeight > overflowHeight;\r\n\r\n if (isOverflowing !== this.state.isOverflowing || overflowHeight !== this.state.overflowHeight) {\r\n this.setState({isOverflowing, overflowHeight});\r\n }\r\n } else if (scrollHeight <= this.state.overflowHeight) {\r\n this.setState({isExpanded: false, isOverflowing: false});\r\n }\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectedOptions,\r\n textHideDetails,\r\n textShowDetails\r\n } = this.props;\r\n const {\r\n isExpanded,\r\n isOverflowing\r\n } = this.state;\r\n\r\n const collapseButton = <div className={styles.toggleExpand}><ButtonTertiary onClick={this.onClick}>\r\n {isExpanded ?\r\n (textHideDetails)\r\n : (textShowDetails)}\r\n <FaAngleDown className={isExpanded ? 'expand-icon-down' : 'expand-icon-up'} />\r\n </ButtonTertiary></div>;\r\n\r\n return ((selectedOptions.length > 0 &&\r\n <div className={`${styles.ieMaxWidthFix} ${isExpanded || isOverflowing ? styles.shouldCollapse : ''}`}>\r\n <ol ref={this.listRef} className={`${styles.filterList} ${isExpanded ? styles.expanded : styles.collapsed}`}>\r\n {selectedOptions.map((item, index) => this.renderOptionItem(item))}\r\n </ol>\r\n {collapseButton}\r\n <div className={styles.shadowBox} />\r\n </div>));\r\n }\r\n}\r\n\r\nexport const DisplaySelectedOptions = DisplaySelectedOptionsComponent;\r\n","import { ApiResponse, AdvancedSearchTypes } from 'app/types-shared';\r\nimport { RemoteData } from '../../infrastructure/remote-data';\r\nimport { endpoint } from './constants';\r\nimport { AdvancedSearchField, FilterDomainsResults } from 'app/components/filters/types';\r\nimport { PreDefDateResult } from './types';\r\n\r\nexport const api = {\r\n loadFilters: async (reportId?: number): Promise<FilterDomainsResults> => {\r\n const response = await new RemoteData(reportId\r\n ? endpoint.filterDomainsSpecialReport(reportId)\r\n : endpoint.filterDomains)\r\n .resource<ApiResponse<any>>()\r\n .all();\r\n\r\n return response.data;\r\n },\r\n\r\n loadDefaultPredefDate: async (dbFunction: number): Promise<string> => {\r\n const response = await new RemoteData(endpoint.defaultPredefDate(dbFunction))\r\n .resource<ApiResponse<PreDefDateResult>>()\r\n .single();\r\n return response.data.date;\r\n },\r\n\r\n loadAdvancedSearchTypes: async (): Promise<AdvancedSearchTypes[]> => {\r\n const response = await new RemoteData(endpoint.favouriteAdvancedSearchTypes)\r\n .resource<ApiResponse<AdvancedSearchTypes[]>>()\r\n .single();\r\n return response.data;\r\n },\r\n\r\n loadAdvancedSearchFields: async (ids: Number[]): Promise<AdvancedSearchField[]> => {\r\n const response = await new RemoteData(endpoint.favouriteAdvancedSearchFields)\r\n .resource<ApiResponse<any>>()\r\n .filter({ applicationId: ids })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n loadAdvancedSearchFieldsSearch: async (ids: Number[], query: string): Promise<AdvancedSearchField[]> => {\r\n const response = await new RemoteData(endpoint.searchFavouriteAdvancedSearchFields)\r\n .resource<ApiResponse<any>>()\r\n .filter({ applicationId: ids, query })\r\n .single();\r\n\r\n return response.data;\r\n }\r\n\r\n};\r\n","export const valuesSelector = state => state.editing && state.editing.values && state.editing.values;\r\n","import { api } from './api';\r\nimport { Filter, FilterOption } from 'app/components/filters/types';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux/index';\r\nimport * as actions from './action-types';\r\nimport * as actionTypes from 'app/infrastructure/simple-form/action-types';\r\nimport { STATE } from 'app/constants';\r\nimport { valuesSelector } from 'app/infrastructure/simple-form/selectors';\r\nimport { filterDomainIds } from 'app/area/filters/constants';\r\nimport { getSelectedOptionsIds } from 'app/area/filters/filters-mapping';\r\nimport { parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\n\r\nexport const actionCreators = {\r\n updateFilters: (filters: Filter[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.UpdateFilters(filters));\r\n }),\r\n\r\n loadFilters: (reportId?: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.RequestFilterDomains());\r\n\r\n const filterDomains = await api.loadFilters(reportId);\r\n\r\n let date: Date;\r\n\r\n if (filterDomains.usePredefDate && !!filterDomains.predefDateDefaultValue) {\r\n const defaultPredefDate = await api.loadDefaultPredefDate(filterDomains.predefDateDefaultValue.dbFunction);\r\n date = parseAsDateUTC(defaultPredefDate);\r\n }\r\n \r\n const { filterDomain, reportTypeDescription } = filterDomains;\r\n const usePredefDate = filterDomains.usePredefDate;\r\n \r\n dispatch(new actions.ReceiveFilterDomains(filterDomain, { reportTypeDescription, date, usePredefDate }));\r\n }),\r\n\r\n loadAdvancedSearchTypes: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n const advancedSearchTypes = await api.loadAdvancedSearchTypes();\r\n\r\n dispatch(new actions.ReceiveAdvancedSearchTypes(advancedSearchTypes));\r\n }),\r\n\r\n loadAdvancedSearchFields: (query?: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n const filtersState = getState().filters as any;\r\n\r\n const { simpleForm } = filtersState;\r\n const editingValues = valuesSelector(simpleForm);\r\n const optionsIds = getSelectedOptionsIds(editingValues, filterDomainIds.caseType);\r\n\r\n const advancedSearchFields = query ? await api.loadAdvancedSearchFieldsSearch(optionsIds, query)\r\n : await api.loadAdvancedSearchFields(optionsIds);\r\n\r\n dispatch(new actions.ReceiveAdvancedSearchOptions(advancedSearchFields));\r\n }),\r\n\r\n setFilterOpenState: (id: string, value: boolean): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.SetFilterOpenState(id, value));\r\n }),\r\n\r\n setFilterOption: (option: FilterOption, type: FilterOptionType): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.SetFilterOption(option, type));\r\n }),\r\n\r\n clearFilterOptions: (id: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearFilterOptions(id));\r\n }),\r\n\r\n clearAllFilterOptions: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearAllFilterOptions());\r\n }),\r\n\r\n clearValues: (ids: string[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n ids.forEach(id => dispatch(new actionTypes.ClearValueInStore(STATE.filters, id)));\r\n }),\r\n\r\n clearAll: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearAll());\r\n })\r\n};\r\n","import { FilterTypes } from 'app/components/filters/types';\r\nimport { FilterMenuOptions } from 'app/components/filters/types';\r\n\r\ninterface FilterMenuOptionsConfiguration {\r\n [option: number]: FilterMenuOptions[];\r\n}\r\n\r\nexport const createFilterMenuOptions = (advancedSearchType: FilterTypes) => {\r\n const allDefaultOptions: FilterMenuOptions[] = [\r\n FilterMenuOptions.Clear,\r\n FilterMenuOptions.Include,\r\n FilterMenuOptions.Exclude\r\n ];\r\n\r\n const allSubLevelOptions: FilterMenuOptions[] = [\r\n FilterMenuOptions.IncludeSubLevels,\r\n FilterMenuOptions.ExcludeSubLevels\r\n ];\r\n\r\n const configuration: FilterMenuOptionsConfiguration = {\r\n [FilterTypes.SelectMultiple]: allDefaultOptions,\r\n [FilterTypes.SelectMultipleFlat]: allDefaultOptions,\r\n [FilterTypes.SelectMultipleHierarchy]: allDefaultOptions.concat(allSubLevelOptions),\r\n [FilterTypes.TextField]: allDefaultOptions,\r\n [FilterTypes.DateField]: allDefaultOptions,\r\n [FilterTypes.NumberField]: allDefaultOptions,\r\n [FilterTypes.DecimalNumber]: allDefaultOptions,\r\n [FilterTypes.CheckBox]: allDefaultOptions,\r\n [FilterTypes.PredefDate]: allDefaultOptions,\r\n [FilterTypes.PredefFilters]: [\r\n FilterMenuOptions.Clear\r\n ],\r\n [FilterTypes.MyUnit]: allDefaultOptions.concat(allSubLevelOptions),\r\n [FilterTypes.MyLocation]: allDefaultOptions.concat(allSubLevelOptions),\r\n [FilterTypes.Person]: allDefaultOptions\r\n };\r\n\r\n return configuration[advancedSearchType];\r\n};\r\n","import * as React from 'react';\r\nimport FaAngleDown from 'react-icons/lib/fa/angle-down';\r\nimport { MeatballMenu } from 'ui';\r\nimport { createFilterMenuOptions } from 'app/components/filters/filters-panel/filter-menu-options';\r\nimport { FilterOption, FilterMenuOptions, FilterMenuOptionsTypes, Filter } from 'app/components/filters/types';\r\nimport { isRequiredField } from 'app/components/filters/filters-panel/required-field';\r\nimport styles from './filter-panel.scss';\r\n\r\nexport interface FilterPanelProps {\r\n id: string;\r\n filter: Filter;\r\n count: number;\r\n isOpen: boolean;\r\n translate: any;\r\n added?:boolean;\r\n onFilterMenuOption?: (id: string, option: FilterMenuOptions, type: FilterMenuOptionsTypes) => void;\r\n onChange: (id: string, value: boolean) => void;\r\n onRemove: (id: string) => void;\r\n}\r\n\r\nexport interface FilterState {\r\n isClosing: boolean;\r\n animationPlayed: boolean;\r\n}\r\n\r\nexport class FilterPanel extends React.Component<FilterPanelProps, FilterState> {\r\n public state: Readonly<FilterState> = {\r\n isClosing: false,\r\n animationPlayed: false\r\n };\r\n\r\n private onClick = (e: React.SyntheticEvent<any>) => {\r\n if (!this.props.onChange) {\r\n return;\r\n }\r\n e.preventDefault();\r\n if (this.props.isOpen) {\r\n this.setState({ isClosing: true });\r\n\r\n setTimeout(() => {\r\n this.setState({\r\n isClosing: false\r\n });\r\n return this.props.onChange(this.props.id, false);\r\n }, 300);\r\n } else {\r\n return this.props.onChange(this.props.id, true);\r\n }\r\n }\r\n\r\n private onAnimationEnd = () => {\r\n this.setState({animationPlayed: true});\r\n }\r\n\r\n private handleRemove = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onRemove(this.props.id);\r\n }\r\n\r\n private handleInclude = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onFilterMenuOption(this.props.id, FilterMenuOptions.Include, FilterMenuOptionsTypes.MainLevel);\r\n }\r\n\r\n private handleExclude = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onFilterMenuOption(this.props.id, FilterMenuOptions.Exclude, FilterMenuOptionsTypes.MainLevel);\r\n }\r\n\r\n private handleIncludeSublevels = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onFilterMenuOption(this.props.id, FilterMenuOptions.IncludeSubLevels, FilterMenuOptionsTypes.SubLevel);\r\n }\r\n\r\n private handleExcludeSublevels = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n this.props.onFilterMenuOption(this.props.id, FilterMenuOptions.ExcludeSubLevels, FilterMenuOptionsTypes.SubLevel);\r\n }\r\n\r\n private hasPermission = (option: FilterMenuOptions, options: FilterMenuOptions[]) => {\r\n return options && options.length > 0 && options.indexOf(option) > -1;\r\n }\r\n\r\n private hasSelectedOptions = (option: FilterMenuOptions, options: FilterOption[]) => {\r\n return options.findIndex(item => item.option === option) > -1;\r\n }\r\n\r\n private hasEmptyMenuOptionsType = (type: FilterMenuOptionsTypes, options: FilterOption[]) => {\r\n return options.findIndex(item => item.type === type) === -1;\r\n }\r\n\r\n // tslint:disable jsx-no-multiline-js max-line-length\r\n private renderMenuOptions = (options: FilterOption[]) => {\r\n const descriptions = {\r\n [FilterMenuOptions.Exclude]: this.props.translate.filter_menu_options_desc_exclude,\r\n [FilterMenuOptions.ExcludeSubLevels]: this.props.translate.filter_menu_options_desc_exclude_sub\r\n };\r\n\r\n return <ul>\r\n {options.map((item, index) => <li key={index}>\r\n <span>{descriptions[item.option]}</span>\r\n </li>)}</ul>;\r\n }\r\n\r\n private renderMenu = (options: FilterMenuOptions[], selectedOptions: FilterOption[]) => (\r\n <div className={styles.filterMeatballMenu}>\r\n <MeatballMenu closeAfterClick>\r\n {this.hasPermission(FilterMenuOptions.Clear, options) &&\r\n <li><button type=\"button\" className=\"dropdown-item\" onClick={this.handleRemove}>\r\n {this.props.translate.remove_filter}\r\n </button></li>}\r\n {this.hasPermission(FilterMenuOptions.Include, options) &&\r\n this.hasSelectedOptions(FilterMenuOptions.Exclude, selectedOptions) &&\r\n <li><button type=\"button\" className=\"dropdown-item\" onClick={this.handleInclude}>\r\n {this.props.translate.filter_menu_option_include}\r\n </button></li>}\r\n {this.hasPermission(FilterMenuOptions.Exclude, options) &&\r\n (this.hasSelectedOptions(FilterMenuOptions.Include, selectedOptions)\r\n || this.hasEmptyMenuOptionsType(FilterMenuOptionsTypes.MainLevel, selectedOptions)) &&\r\n <li><button type=\"button\" className=\"dropdown-item\" onClick={this.handleExclude}>\r\n {this.props.translate.filter_menu_option_exclude}\r\n </button></li>}\r\n {this.hasPermission(FilterMenuOptions.IncludeSubLevels, options) &&\r\n this.hasSelectedOptions(FilterMenuOptions.ExcludeSubLevels, selectedOptions) &&\r\n <li><button type=\"button\" className=\"dropdown-item\" onClick={this.handleIncludeSublevels}>\r\n {this.props.translate.filter_menu_option_include_sub}\r\n </button></li>}\r\n {this.hasPermission(FilterMenuOptions.ExcludeSubLevels, options) &&\r\n (this.hasSelectedOptions(FilterMenuOptions.IncludeSubLevels, selectedOptions)\r\n || this.hasEmptyMenuOptionsType(FilterMenuOptionsTypes.SubLevel, selectedOptions)) &&\r\n <li><button type=\"button\" className=\"dropdown-item\" onClick={this.handleExcludeSublevels}>\r\n {this.props.translate.filter_menu_option_exclude_sub}\r\n </button></li>}\r\n </MeatballMenu>\r\n </div>)\r\n\r\n public render() {\r\n const { filterPanel, titleStyle } = styles;\r\n const { isOpen, count, children, onChange, filter } = this.props;\r\n const { label, advancedSearchType, menuOptions } = this.props.filter;\r\n\r\n const animateOutStyles = this.state.isClosing ? styles.animateOut : '';\r\n const isOpenStyles = isOpen ? styles.isOpen : styles.isClosed;\r\n\r\n const newlyAdded = this.props.added && !this.state.animationPlayed;\r\n\r\n return <div className={`${filterPanel} filter-panel`}>\r\n <button type=\"button\" className={`${titleStyle} ${newlyAdded ? styles.added : ''}`} onClick={this.onClick} onAnimationEnd={this.onAnimationEnd}>\r\n {isRequiredField(filter.advancedSearchType) && <span className=\"asterisk-required\">* </span>}\r\n {label}\r\n {count > 0 && <span> ({count})</span>\r\n }\r\n {onChange && <FaAngleDown className={isOpen && !this.state.isClosing ? 'expand-icon-down' : 'expand-icon-up'}/>}\r\n </button>\r\n\r\n <div className={`${animateOutStyles} ${isOpenStyles} ${styles.contentWrapper}`}>\r\n <div className={styles.content}>\r\n <div className=\"clearfix\">\r\n <div className=\"float-left\">\r\n {menuOptions && this.renderMenuOptions(menuOptions)}\r\n </div>\r\n <div className=\"float-right\">\r\n {menuOptions && this.renderMenu(createFilterMenuOptions(advancedSearchType), menuOptions)}\r\n </div>\r\n </div>\r\n {children}\r\n </div>\r\n </div>\r\n </div>;\r\n }\r\n}\r\n","import { FilterTypes } from 'app/components/filters/types';\r\n\r\nexport const isRequiredField = (type: FilterTypes) => {\r\n return type === FilterTypes.PredefDate;\r\n};\r\n","import * as React from 'react';\r\nimport styles from './filter-error.scss';\r\n\r\nexport interface FilterErrorProps {\r\n label: string;\r\n message: string;\r\n}\r\n\r\nexport const FilterError = (props: FilterErrorProps) => {\r\n return <div className={styles.uiFilterError}>\r\n <b>{props.label}</b>\r\n <p>{props.message}</p>\r\n </div>;\r\n};\r\n","import { OptionTypes, ConditionValuesOperator, FilterTypes } from 'app/components/filters/types';\r\nimport { FavouriteConditionValue } from 'app/types-shared';\r\n\r\nexport const createInitialDecimalFieldConditions = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[]) => {\r\n\r\n if (favouriteConditionValue.operator && favouriteConditionValue.operator.v === ConditionValuesOperator.empty) {\r\n return {\r\n [FilterTypes.DecimalNumber]: { type: OptionTypes.NotSpecified }\r\n };\r\n }\r\n\r\n return {\r\n [FilterTypes.DecimalNumber]: { type: OptionTypes.SpecificNumbersOrRanges, value: favouriteConditionValue.number }\r\n };\r\n};\r\n","import { IFilter } from '../types';\r\n\r\nexport const filterConfiguration = <P>(\r\n component: React.ComponentClass<P>,\r\n optionsEndpoint?: (id: number) => string,\r\n postfix?: string[]\r\n) => {\r\n return {\r\n component,\r\n optionsEndpoint,\r\n postfix\r\n } as IFilter;\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from 'app/components/filters/filters-panel/filter-types/types';\r\n\r\nexport class FilterCodeHierarchy extends React.Component<FilterCommonProps, {}> {\r\n\r\n public render() {\r\n const {\r\n filterDomain,\r\n optionsEndpoint,\r\n optionsParams,\r\n simpleFormComponent: SimpleForm,\r\n translation,\r\n initialValue, \r\n filterDomain: { id: name }\r\n } = this.props;\r\n\r\n return <SimpleForm\r\n name={name}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n initialValue={initialValue}\r\n optionsEndpoint={optionsEndpoint}\r\n placeholder={translation && this.props.translation.filters_search_placeholder}\r\n translation={translation}\r\n optionsParams={optionsParams}\r\n descriptionAllLevels={true}\r\n initiallyShowLongDescription={false}\r\n searchRequired={filterDomain.searchRequired}\r\n />;\r\n }\r\n}\r\n","import { ConditionValue } from 'app/components/filters/types';\r\n\r\nexport const trimValue = (conditionValue: ConditionValue) => {\r\n return typeof conditionValue === 'string' ? conditionValue.trim() : conditionValue;\r\n};\r\n","import { Filter, ConditionValue } from 'app/components/filters/types';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { trimValue } from '../trim-value';\r\n\r\nexport const getFavouriteConditionValue = (id: number, filter: Filter, conditionValue: ConditionValue) => {\r\n const newConditionValue = filter.advancedField && {\r\n id,\r\n code: { v: trimValue(conditionValue) },\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: filter.advancedField.valueOperator,\r\n dbFunction: filter.advancedField.dbFunctionValue\r\n };\r\n\r\n return trimValue(conditionValue) !== '' && newConditionValue;\r\n};\r\n\r\nexport const createConditionValue = (id: number, filter: Filter, value: SelectItem[]) => {\r\n return value && (value instanceof Array\r\n && value.map(v => getFavouriteConditionValue(id++, filter, v.value)) || [getFavouriteConditionValue(id++, filter, value)]);\r\n};\r\n","import { FilterOption, FilterMenuOptions, ConnectionsOperatorTypes, ExactLevelTypes, FilterTypes } from 'app/components/filters/types';\r\nimport { createFilterMenuOptions } from '../filter-menu-options';\r\n\r\nexport const createAdvancedField = (options: FilterOption[], advancedSearchType: FilterTypes) => {\r\n\r\n const menuOptions = createFilterMenuOptions(advancedSearchType);\r\n\r\n const exclude = menuOptions && FilterMenuOptions.Exclude in menuOptions\r\n ? (options && options.some(option => option && option.option === FilterMenuOptions.Exclude)\r\n ? {\r\n conditionOperator2: { v: ConnectionsOperatorTypes.exclude }\r\n }\r\n : {\r\n conditionOperator2: { v: ConnectionsOperatorTypes.include }\r\n })\r\n : {};\r\n\r\n const exactLevel = menuOptions && FilterMenuOptions.ExcludeSubLevels in menuOptions\r\n ? (options && options.some(option => option && option.option === FilterMenuOptions.ExcludeSubLevels)\r\n ? {\r\n exactLevel: ExactLevelTypes.exclude\r\n }\r\n : {\r\n exactLevel: ExactLevelTypes.include\r\n })\r\n : {};\r\n\r\n return {\r\n ...exclude,\r\n ...exactLevel\r\n };\r\n};\r\n","import { FavouriteCondition, FavouriteConditionValue} from 'app/types-shared';\r\nimport { Filter } from 'app/components/filters/types';\r\nimport { createAdvancedField } from 'app/components/filters/filters-panel/conditions/create-advanced-field';\r\n\r\nexport const createFavouriteCondition = (\r\n filter: Filter,\r\n condValues: FavouriteConditionValue[],\r\n originalCondition: FavouriteCondition\r\n): FavouriteCondition => {\r\n\r\n const options = filter.menuOptions;\r\n\r\n return {\r\n ...(!!originalCondition && originalCondition),\r\n domain: { v: filter.domain },\r\n ...(!!filter.advancedField && Object.assign({}, {\r\n domainDbFunction: filter.advancedField.dbFunctionDomain,\r\n valueOperator: filter.advancedField.valueListOperator,\r\n conditionOperator: filter.advancedField.conditionOperator\r\n }, options && createAdvancedField(options, filter.advancedSearchType))),\r\n values: condValues\r\n };\r\n};\r\n","import { FavouriteCondition, Value } from 'app/types-shared';\r\n\r\nexport const getConditionForOperator = (conditions: FavouriteCondition[], operator: Value) =>\r\n conditions &&\r\n conditions.find(condition =>\r\n condition.values &&\r\n condition.values.some(value =>\r\n operator && value.operator && value.operator.v === operator.v)\r\n ) || undefined;\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport { FilterCodeHierarchy } from './filter-code-hierarchy';\r\nimport { createConditionValue } from './create-condition-value';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { getConditionForOperator } from '../get-condition';\r\n\r\nexport const selectMultipleHierarchyConfiguration = {\r\n [FilterTypes.SelectMultipleHierarchy]: filterConfiguration(\r\n FilterCodeHierarchy,\r\n endpoint.filterOptionsFor\r\n )\r\n};\r\n\r\nexport const selectMultipleHierarchyConditionMapper = (editingValues: any) => {\r\n return {\r\n [FilterTypes.SelectMultipleHierarchy]: filter => {\r\n\r\n let condValIndex = 1;\r\n const editingValue = editingValues && editingValues[filter.id];\r\n const value = editingValue && editingValue.value;\r\n const conditionValue = createConditionValue(condValIndex++, filter, value);\r\n const originalCondition = getConditionForOperator(filter.conditions, filter.advancedField.valueOperator);\r\n\r\n return conditionValue ? [createFavouriteCondition(filter, conditionValue, originalCondition)] : [];\r\n }\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\n\r\nexport const createInitialDefaultValue = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[], advancedSearchType?: number) => {\r\n\r\n const code = favouriteConditionValue.code && favouriteConditionValue.code.v;\r\n const description = favouriteConditionValue.code && favouriteConditionValue.code.d;\r\n\r\n if (advancedSearchType === FilterTypes.CheckBox) {\r\n return { value: favouriteConditionValue.number };\r\n }\r\n\r\n return (!!code || code === 0) && {\r\n value: code,\r\n description: description\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\n\r\nimport { FilterCommonProps } from '../types';\r\n\r\nexport class FilterCheckbox extends React.Component<FilterCommonProps, {}> {\r\n\r\n public render() {\r\n const { simpleFormComponent: SimpleForm, initialValue, filterDomain: { id: name, label } } = this.props; \r\n const text: string = label.split(' - ').pop();\r\n \r\n return <SimpleForm\r\n name={name}\r\n label={{text}}\r\n type={FIELD_TYPE.CHECKBOX}\r\n initialValue={initialValue}\r\n staticOptions={[{ value: 1 }]} \r\n />;\r\n }\r\n}\r\n","import { Filter, ConditionValue } from 'app/components/filters/types';\r\nimport { valuePropName } from 'app/components/filters/filters-panel/constants';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { trimValue } from '../trim-value';\r\n\r\nexport const getFavouriteConditionValue = (id: number, filter: Filter, conditionValue: ConditionValue) => {\r\n const newConditionValue = filter.advancedField && {\r\n id,\r\n [valuePropName.number]: trimValue(conditionValue),\r\n operator: filter.advancedField.valueOperator,\r\n dbFunction: filter.advancedField.dbFunctionValue\r\n };\r\n\r\n return trimValue(conditionValue) !== '' && newConditionValue;\r\n};\r\n\r\nexport const createConditionValue = (id: number, filter: Filter, value: SelectItem[]) => {\r\n return value && (value instanceof Array\r\n && value.map(v => getFavouriteConditionValue(id++, filter, v.value)) || [getFavouriteConditionValue(id++, filter, value)]);\r\n};\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes, Filter } from 'app/components/filters/types';\r\nimport { FilterCheckbox } from 'app/components/filters/filters-panel/filter-types/filter-checkbox/filter-checkbox';\r\nimport { createConditionValue } from './create-condition-value';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { EditingValues } from 'app/components/filters/filters-panel/types';\r\nimport { getConditionForOperator } from '../get-condition';\r\n\r\nexport const checkboxConfiguration = {\r\n [FilterTypes.CheckBox]: filterConfiguration(FilterCheckbox)\r\n};\r\n\r\nexport const checkboxConditionMapper = (editingValues: EditingValues) => {\r\n return {\r\n [FilterTypes.CheckBox]: (filter: Filter) => {\r\n let condValIndex = 1;\r\n const editingValue = editingValues && editingValues[filter.id];\r\n const value = editingValue && editingValue.value;\r\n const conditionValue = createConditionValue(condValIndex++, filter, value);\r\n const originalCondition = getConditionForOperator(filter.conditions, filter.advancedField.valueOperator);\r\n\r\n return conditionValue ? [createFavouriteCondition(filter, conditionValue, originalCondition)] : [];\r\n }\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { ConditionValuesOperator, OptionTypes, FilterTypes } from 'app/components/filters/types';\r\n\r\nexport const createInitialDateFieldConditions = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[]) => {\r\n\r\n if (favouriteConditionValue.operator && favouriteConditionValue.operator.v === ConditionValuesOperator.empty) {\r\n return {\r\n [FilterTypes.DateField]: { type: OptionTypes.NotSpecified }\r\n };\r\n }\r\n\r\n if (favouriteConditionValue.operator &&\r\n (favouriteConditionValue.operator.v === ConditionValuesOperator.largerOrEqual ||\r\n favouriteConditionValue.operator.v === ConditionValuesOperator.less)) {\r\n return {\r\n [FilterTypes.DateField]: {\r\n value: favouriteConditionValue.date,\r\n type: OptionTypes.SpecificPeriodRange\r\n }\r\n };\r\n }\r\n\r\n return {\r\n [FilterTypes.DateField]: {\r\n value: favouriteConditionValue.periodPredef ? favouriteConditionValue.periodPredef.v : undefined,\r\n description: favouriteConditionValue.periodPredef ? favouriteConditionValue.periodPredef.d : undefined,\r\n type: OptionTypes.FixedPeriod\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport styles from './filter-date-range.scss';\r\nimport { RadioSymbol } from 'ui';\r\nimport { parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { OptionTypes, FilterOption } from 'app/components/filters/types';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\n\r\nexport interface FilterDateRangeProps extends FilterCommonProps {\r\n onFilterOptionType: (filterOption: FilterOption, filterOptionType: FilterOptionType) => void;\r\n}\r\n\r\nexport class FilterDateRange extends React.Component<FilterDateRangeProps> {\r\n private handleOptionChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const selectedOption = Number(e.currentTarget.value);\r\n\r\n this.props.onFilterOptionType({\r\n id: this.props.filterDomain.id,\r\n type: selectedOption\r\n }, FilterOptionType.OPTION_TYPE);\r\n }\r\n\r\n private renderFixedPeriod = () => {\r\n const { optionsEndpoint, simpleFormComponent: SimpleForm, initialValue, filterDomain: { id: name, optionType } } = this.props;\r\n const selected = optionType !== OptionTypes.NotSpecified && optionType !== OptionTypes.SpecificPeriodRange;\r\n const fixedPeriodValue = initialValue && initialValue.find(item => !!item && item.type === OptionTypes.FixedPeriod);\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-fixed-period`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.FixedPeriod}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-fixed-period`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <b>{this.props.translation.filters_date_range_date_fixed_period}</b>\r\n </label>\r\n\r\n {selected && <SimpleForm\r\n name={name + customFilterFieldPostfix.fixedPeriod}\r\n type={FIELD_TYPE.SELECT_SINGLE}\r\n initialValue={fixedPeriodValue && { value: fixedPeriodValue.value, description: fixedPeriodValue.description }}\r\n optionsEndpoint={optionsEndpoint}\r\n readOnly={!selected}\r\n placeholder={this.props.translation && this.props.translation.filters_search_placeholder}\r\n translation={this.props.translation}\r\n />}\r\n </div>;\r\n }\r\n\r\n private renderSpecificPeriod = () => {\r\n const { simpleFormComponent, initialValue, filterDomain: { id: name, optionType } } = this.props;\r\n const specificPeriodValue = initialValue\r\n && initialValue.findIndex(f => !!f && f.type === OptionTypes.SpecificPeriodRange) > -1 && initialValue;\r\n\r\n //tslint:disable-next-line\r\n const SimpleForm = simpleFormComponent;\r\n const selected = optionType === OptionTypes.SpecificPeriodRange;\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-range`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.SpecificPeriodRange}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-range`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <b>{this.props.translation.filters_date_range_date_interval}</b>\r\n </label>\r\n\r\n {selected && <div className={styles.dateGroup}>\r\n <div>\r\n <label>{this.props.translation.filters_date_range_from}</label>\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.dateIntervalFrom}\r\n type={FIELD_TYPE.DATE_TIME}\r\n initialValue={specificPeriodValue && specificPeriodValue[0] && parseAsDateUTC(specificPeriodValue[0].value)}\r\n readOnly={!selected}\r\n />\r\n </div>\r\n <div>\r\n <label>{this.props.translation.filters_date_range_to}</label>\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.dateIntervalTo}\r\n type={FIELD_TYPE.DATE_TIME}\r\n initialValue={specificPeriodValue && specificPeriodValue[1] && parseAsDateUTC(specificPeriodValue[1].value)}\r\n readOnly={!selected}\r\n />\r\n </div>\r\n </div>}\r\n </div>;\r\n }\r\n\r\n private renderNotSpecified = () => {\r\n const { simpleFormComponent, translation, filterDomain: { id: name, optionType } } = this.props;\r\n const SimpleForm = simpleFormComponent;\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-not-specified`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.NotSpecified}\r\n checked={optionType === OptionTypes.NotSpecified}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-not-specified`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <div>\r\n <b>{translation.filters_not_specified_title}</b>\r\n <p>{translation.filters_not_specified_subtitle}</p>\r\n </div>\r\n {optionType === OptionTypes.NotSpecified\r\n && <div className=\"d-none\">\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.notSpecified}\r\n type={FIELD_TYPE.SELECT_SINGLE}\r\n initialValue={{ description: translation.filters_not_specified_title }}\r\n />\r\n </div>}\r\n </label>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n return <div>\r\n {this.renderFixedPeriod()}\r\n {this.renderSpecificPeriod()}\r\n {this.renderNotSpecified()}\r\n </div>;\r\n }\r\n}\r\n","export const getValue = (filter, editingValues, postfix: string) => {\r\n const valueName = filter.id + postfix;\r\n return !!valueName && !!editingValues[valueName] && editingValues[valueName].value;\r\n};\r\n","import { createUTCDate } from 'app/infrastructure/data/date';\r\n\r\n/**\r\n * Creates favourite condition for date filter\r\n * \r\n * @param value UTC date\r\n */\r\nexport const createDateFieldCondition = (value: Date) => ({\r\n date: !value ? value : createUTCDate({\r\n year: value.getUTCFullYear(), month: value.getUTCMonth(), day: value.getUTCDate(),\r\n hours: 0, minutes: 0, seconds: 0, milliseconds: 0\r\n })\r\n});\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport {\r\n FilterTypes, ConditionValuesOperator, OptionTypes, Filter\r\n} from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { FilterDateRange } from 'app/components/filters/filters-panel/filter-types/filter-date-range/filter-date-range';\r\nimport { getValue } from 'app/components/filters/filters-panel/filter-types/get-value';\r\nimport { createDateFieldCondition } from './create-date-condition';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { FavouriteCondition } from 'app/types-shared';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { getConditionForOperator } from '../get-condition';\r\n\r\nexport interface EditingValues {\r\n [name: string]: {\r\n value: SelectItem | Date;\r\n };\r\n}\r\n\r\nexport const dateFieldConfiguration = {\r\n [FilterTypes.DateField]: filterConfiguration(\r\n FilterDateRange,\r\n () => endpoint.periods,\r\n [\r\n customFilterFieldPostfix.fixedPeriod,\r\n customFilterFieldPostfix.dateIntervalFrom,\r\n customFilterFieldPostfix.dateIntervalTo\r\n ]\r\n )\r\n};\r\n\r\nexport const dateFieldConditionMapper = (editingValues: EditingValues) => {\r\n return {\r\n [FilterTypes.DateField]: (filter: Filter) => {\r\n\r\n const { optionType, advancedField } = filter;\r\n\r\n if (!advancedField) {\r\n return [];\r\n }\r\n\r\n if (optionType === OptionTypes.NotSpecified) {\r\n\r\n const originalCondition = getConditionForOperator(filter.conditions, advancedField.valueOperator3);\r\n\r\n return [\r\n createFavouriteCondition(filter, [{\r\n id: 1,\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: advancedField.valueOperator3,\r\n dbFunction: advancedField.dbFunctionValue3\r\n }], originalCondition)\r\n ];\r\n }\r\n\r\n if (optionType === OptionTypes.SpecificPeriodRange) {\r\n\r\n const originalFromCondition = getConditionForOperator(filter.conditions, advancedField.valueOperator);\r\n const valueFrom = getValue(filter, editingValues, customFilterFieldPostfix.dateIntervalFrom);\r\n const conditionFrom = !!valueFrom\r\n ? createFavouriteCondition(filter, [{\r\n id: 1,\r\n ...createDateFieldCondition(valueFrom),\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: advancedField.valueOperator,\r\n dbFunction: advancedField.dbFunctionValue\r\n }], originalFromCondition)\r\n : undefined;\r\n\r\n const originalToCondition = getConditionForOperator(filter.conditions, advancedField.valueOperator2);\r\n const valueTo = getValue(filter, editingValues, customFilterFieldPostfix.dateIntervalTo);\r\n const conditionTo = !!valueTo\r\n ? createFavouriteCondition(filter, [{\r\n id: conditionFrom ? 2 : 1,\r\n ...createDateFieldCondition(valueTo),\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: advancedField.valueOperator2,\r\n dbFunction: advancedField.dbFunctionValue2\r\n }], originalToCondition)\r\n : undefined;\r\n\r\n return [\r\n ...(!!conditionFrom ? [conditionFrom] : []),\r\n ...(!!conditionTo ? [conditionTo] : [])\r\n ];\r\n }\r\n\r\n const fixedPeriod = getValue(filter, editingValues, customFilterFieldPostfix.fixedPeriod);\r\n const fixedPeriodValue = fixedPeriod && {\r\n periodPredef: {\r\n v: fixedPeriod.value\r\n }\r\n };\r\n\r\n const originalFixedCondition = getConditionForOperator(filter.conditions, { v: 0 });\r\n\r\n return fixedPeriodValue ? [\r\n createFavouriteCondition(filter, [{\r\n id: 1,\r\n ...fixedPeriodValue,\r\n myValue: false,\r\n operator: { v: 0 },\r\n dbFunction: { v: 0 }\r\n }], originalFixedCondition)\r\n ] : [];\r\n }\r\n };\r\n};\r\n\r\nexport const dateFieldOptionType = (condition: FavouriteCondition) => {\r\n\r\n if (condition.values && condition.values.some(v => v.operator && v.operator.v === ConditionValuesOperator.empty)) {\r\n return {\r\n [FilterTypes.DateField]: OptionTypes.NotSpecified\r\n };\r\n }\r\n\r\n if (condition.values\r\n && condition.values.some(\r\n v => v.operator\r\n && (v.operator.v === ConditionValuesOperator.largerOrEqual || v.operator.v === ConditionValuesOperator.less)\r\n )) {\r\n return {\r\n [FilterTypes.DateField]: OptionTypes.SpecificPeriodRange\r\n };\r\n }\r\n\r\n return {\r\n [FilterTypes.DateField]: OptionTypes.FixedPeriod\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { OptionTypes, FilterOption } from 'app/components/filters/types';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\nimport { RadioSymbol } from 'ui';\r\n\r\nexport interface FilterDecimalProps extends FilterCommonProps {\r\n onFilterOptionType: (filterOption: FilterOption, filterOptionType: FilterOptionType) => void;\r\n}\r\n\r\nexport class FilterDecimal extends React.Component<FilterDecimalProps> {\r\n private handleOptionChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const selectedOption = Number(e.currentTarget.value);\r\n\r\n this.props.onFilterOptionType({\r\n id: this.props.filterDomain.id,\r\n type: selectedOption\r\n }, FilterOptionType.OPTION_TYPE);\r\n }\r\n\r\n private renderDecimalNumbers = () => {\r\n const { simpleFormComponent: SimpleForm, initialValue, filterDomain: { id: name, optionType }, translation } = this.props;\r\n\r\n const selected = optionType !== OptionTypes.NotSpecified;\r\n return <div>\r\n <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-specific-numbers-or-ranges`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.SpecificNumbersOrRanges}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-specific-numbers-or-ranges`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <div>\r\n <b>{translation.filters_specific_numbers_ranges_title}</b>\r\n <p>{translation.filters_specific_numbers_ranges_subtitle}</p>\r\n </div>\r\n </label>\r\n\r\n {selected && <>\r\n <h3>{this.props.translation.filters_decimal_range}</h3>\r\n <div className=\"row\">\r\n <div className=\"col col-md-6\">\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.decimalFrom}\r\n type={FIELD_TYPE.DECIMAL_NUMBER}\r\n initialValue={initialValue && initialValue.length > 0 ? initialValue[0].value : ''}\r\n errorMessage={translation.filters_must_be_withing_range}\r\n maxDecimals={4}\r\n />\r\n </div>\r\n <div className=\"col col-md-6\">\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.decimalTo}\r\n type={FIELD_TYPE.DECIMAL_NUMBER}\r\n initialValue={initialValue && initialValue.length > 0 && initialValue[1] ? initialValue[1].value : ''}\r\n errorMessage={translation.filters_must_be_withing_range}\r\n maxDecimals={4}\r\n />\r\n </div>\r\n </div></>}\r\n </div>\r\n </div>;\r\n }\r\n\r\n private renderNotSpecified = () => {\r\n const { simpleFormComponent, translation, filterDomain: { id: name, optionType } } = this.props;\r\n const SimpleForm = simpleFormComponent;\r\n const selected = optionType === OptionTypes.NotSpecified;\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-not-specified`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.NotSpecified}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-not-specified`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <div>\r\n <b>{translation.filters_not_specified_title}</b>\r\n <p>{translation.filters_not_specified_subtitle}</p>\r\n </div>\r\n {selected && <div className=\"d-none\">\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.notSpecified}\r\n type={FIELD_TYPE.TEXTAREA}\r\n initialValue={translation.filters_not_specified_title}\r\n />\r\n </div>}\r\n </label>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n return <>\r\n {this.renderDecimalNumbers()}\r\n {this.renderNotSpecified()}\r\n </>;\r\n }\r\n}\r\n","import { FavouriteCondition } from 'app/types-shared';\r\nimport { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes, OptionTypes, ConditionValuesOperator } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { FilterDecimal } from 'app/components/filters/filters-panel/filter-types/filter-decimal/filter-decimal';\r\nimport { EditingValues } from 'app/components/filters/filters-panel/types';\r\nimport { getValue } from 'app/components/filters/filters-panel/filter-types/get-value';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { getConditionForOperator } from '../get-condition';\r\n\r\nexport const decimalNumberConfiguration = {\r\n [FilterTypes.DecimalNumber]: filterConfiguration(\r\n FilterDecimal,\r\n undefined,\r\n [customFilterFieldPostfix.decimalFrom, customFilterFieldPostfix.decimalTo]\r\n )\r\n};\r\n\r\nexport const decimalNumberConditionMapper = (editingValues: EditingValues) => {\r\n return {\r\n [FilterTypes.DecimalNumber]: filter => {\r\n\r\n const { optionType, advancedField } = filter;\r\n\r\n if (!advancedField) {\r\n return [];\r\n }\r\n\r\n if (optionType === OptionTypes.NotSpecified) {\r\n\r\n const originalCondition = getConditionForOperator(filter.conditions, advancedField.valueOperator3);\r\n return [\r\n createFavouriteCondition(filter, [{\r\n id: 1,\r\n operator: advancedField.valueOperator3,\r\n dbFunction: advancedField.dbFunctionValue3\r\n }], originalCondition)\r\n ];\r\n }\r\n\r\n const originalFromCondition = getConditionForOperator(filter.conditions, advancedField.valueOperator);\r\n const valueFrom = getValue(filter, editingValues, customFilterFieldPostfix.decimalFrom);\r\n const conditionFrom = !!valueFrom || valueFrom === 0\r\n ? createFavouriteCondition(filter, [{\r\n id: 1,\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: advancedField.valueOperator,\r\n dbFunction: advancedField.dbFunctionValue,\r\n number: valueFrom\r\n }], originalFromCondition)\r\n : undefined;\r\n\r\n const originalToCondition = getConditionForOperator(filter.conditions, advancedField.valueOperator2);\r\n const valueTo = getValue(filter, editingValues, customFilterFieldPostfix.decimalTo);\r\n const conditionTo = !!valueTo || valueTo === 0\r\n ? createFavouriteCondition(filter, [{\r\n id: conditionFrom ? 2 : 1,\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: advancedField.valueOperator2,\r\n dbFunction: advancedField.dbFunctionValue2,\r\n number: valueTo\r\n }], originalToCondition)\r\n : undefined;\r\n\r\n return [\r\n ...(!!conditionFrom ? [conditionFrom] : []),\r\n ...(!!conditionTo ? [conditionTo] : [])\r\n ];\r\n\r\n }\r\n };\r\n};\r\n\r\nexport const decimalNumberOptionType = (condition: FavouriteCondition) => {\r\n\r\n if (condition.values && condition.values.some(v => v.operator && v.operator.v === ConditionValuesOperator.empty)) {\r\n return {\r\n [FilterTypes.DecimalNumber]: OptionTypes.NotSpecified\r\n };\r\n }\r\n\r\n return {\r\n [FilterTypes.DecimalNumber]: OptionTypes.SpecificNumbersOrRanges\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\n\r\nexport class FilterCode extends React.Component<FilterCommonProps, {}> {\r\n\r\n public render() {\r\n const {\r\n filterDomain,\r\n optionsEndpoint,\r\n optionsParams,\r\n simpleFormComponent: SimpleForm,\r\n initialValue,\r\n translation,\r\n filterDomain: { id: name }\r\n } = this.props;\r\n\r\n return <SimpleForm\r\n name={name}\r\n type={FIELD_TYPE.SELECT_MULTIPLE}\r\n initialValue={initialValue}\r\n optionsEndpoint={optionsEndpoint}\r\n placeholder={translation && translation.filters_search_placeholder}\r\n translation={translation}\r\n optionsParams={optionsParams}\r\n initiallyShowLongDescription={false}\r\n searchRequired={filterDomain.searchRequired}\r\n />;\r\n }\r\n}\r\n","import { Filter, ConditionValue } from 'app/components/filters/types';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { trimValue } from '../trim-value';\r\n\r\nexport const getFavouriteConditionValue = (id: number, filter: Filter, conditionValue: ConditionValue) => {\r\n const newConditionValue = filter.advancedField && {\r\n id,\r\n code: { v: trimValue(conditionValue) },\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: filter.advancedField.valueOperator,\r\n dbFunction: filter.advancedField.dbFunctionValue\r\n };\r\n\r\n return trimValue(conditionValue) !== '' && newConditionValue;\r\n};\r\n\r\nexport const createConditionValue = (id: number, filter: Filter, value: SelectItem[]) => {\r\n return value && (value instanceof Array\r\n && value.map(v => getFavouriteConditionValue(id++, filter, v.value)) || [getFavouriteConditionValue(id++, filter, value)]);\r\n};\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport { FilterCode } from './filter-code';\r\nimport { createConditionValue } from './create-condition-value';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { getConditionForOperator } from '../get-condition';\r\n\r\nexport const selectMultipleConfiguration = {\r\n [FilterTypes.SelectMultiple]: filterConfiguration(\r\n FilterCode,\r\n endpoint.filterOptionsFor\r\n )\r\n};\r\n\r\nexport const selectMultipleConditionMapper = (editingValues: any) => {\r\n return {\r\n [FilterTypes.SelectMultiple]: filter => {\r\n let condValIndex = 1;\r\n\r\n const editingValue = editingValues && editingValues[filter.id];\r\n const value = editingValue && editingValue.value;\r\n const conditionValue = createConditionValue(condValIndex++, filter, value);\r\n const originalCondition = getConditionForOperator(filter.conditions, filter.advancedField.valueOperator);\r\n\r\n return conditionValue ? [createFavouriteCondition(filter, conditionValue, originalCondition)] : [];\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix, userProfileProperties } from 'app/components/filters/filters-panel/constants';\r\n\r\nexport class FilterDomain extends React.Component<FilterCommonProps, {}> {\r\n\r\n private getOptionPropertyName(type: FilterTypes) {\r\n const types = {\r\n [FilterTypes.MyUnit]: userProfileProperties.unit,\r\n [FilterTypes.MyLocation]: userProfileProperties.location,\r\n [FilterTypes.Person]: userProfileProperties.person\r\n };\r\n\r\n return types[type];\r\n }\r\n\r\n private getOptionPropertyTitle(type: FilterTypes) {\r\n const types = {\r\n [FilterTypes.MyUnit]: this.props.translation.filters_my_unit,\r\n [FilterTypes.MyLocation]: this.props.translation.filters_my_location,\r\n [FilterTypes.Person]: this.props.translation.filters_person\r\n };\r\n\r\n return types[type];\r\n }\r\n\r\n private createOptionPropertyValue(optionPropertyName: string) {\r\n const { userProfile, filterDomain } = this.props;\r\n const types = {\r\n [FilterTypes.Person]: { value: userProfile.id, description: userProfile.name }\r\n };\r\n\r\n return types[filterDomain.advancedSearchType] || userProfile[optionPropertyName];\r\n }\r\n\r\n private createOptionProperty() {\r\n const { filterDomain } = this.props;\r\n const optionPropertyName = this.getOptionPropertyName(filterDomain.advancedSearchType);\r\n const optionPropertyTitle = this.getOptionPropertyTitle(filterDomain.advancedSearchType); \r\n\r\n return { ...this.createOptionPropertyValue(optionPropertyName), title: optionPropertyTitle };\r\n }\r\n\r\n public render() {\r\n const {\r\n filterDomain,\r\n optionsEndpoint,\r\n optionsParams,\r\n simpleFormComponent: SimpleForm,\r\n initialValue,\r\n userProfile,\r\n translation,\r\n filterDomain: { id: name }\r\n } = this.props;\r\n\r\n const staticOptions = [this.createOptionProperty()];\r\n\r\n const useProfileValue = initialValue && initialValue.some(v => v.myValue);\r\n const initialValues = initialValue && initialValue.filter(v => !v.myValue);\r\n\r\n return <div>\r\n {!!userProfile && <SimpleForm\r\n name={name + customFilterFieldPostfix.userProfile}\r\n type={FIELD_TYPE.CHECKBOX_LIST}\r\n initialValue={useProfileValue ? staticOptions : []}\r\n staticOptions={staticOptions.length > 0 && staticOptions}\r\n />}\r\n <SimpleForm\r\n name={name}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n initialValue={initialValues}\r\n optionsEndpoint={optionsEndpoint}\r\n placeholder={translation && translation.filters_search_placeholder}\r\n translation={translation}\r\n optionsParams={optionsParams}\r\n descriptionAllLevels={true}\r\n searchRequired={filterDomain.searchRequired} \r\n />\r\n </div>;\r\n }\r\n}\r\n","import { Filter, ConditionValue } from 'app/components/filters/types';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { trimValue } from '../trim-value';\r\n\r\nexport const getFavouriteConditionValue = (id: number, filter: Filter, conditionValue: ConditionValue) => {\r\n const newConditionValue = filter.advancedField && {\r\n id,\r\n code: { v: trimValue(conditionValue) },\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n operator: filter.advancedField.valueOperator,\r\n dbFunction: filter.advancedField.dbFunctionValue\r\n };\r\n\r\n return trimValue(conditionValue) !== '' && newConditionValue;\r\n};\r\n\r\nexport const createConditionValue = (id: number, filter: Filter, value: SelectItem[]) => {\r\n return value && (value instanceof Array\r\n && value.map(v => getFavouriteConditionValue(id++, filter, v.value)) || [getFavouriteConditionValue(id++, filter, value)]);\r\n};\r\n","import { FilterTypes, ConditionTypesValueData, Filter } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { getValue } from 'app/components/filters/filters-panel/filter-types/get-value';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { createConditionValue } from './create-condition-value';\r\nimport { AdvancedSearchTypes } from 'app/types-shared';\r\n\r\nexport const userProfileConditionMapper = (\r\n editingValues: any,\r\n filterType: FilterTypes,\r\n getConditionTypesValueData: (advancedField: AdvancedSearchTypes) => ConditionTypesValueData\r\n) => {\r\n return {\r\n [filterType]: (filter: Filter) => {\r\n const myValueFilter = getValue(filter, editingValues, customFilterFieldPostfix.userProfile);\r\n const myValue = myValueFilter && myValueFilter[0] && {\r\n periodPredef: { v: 0 },\r\n myValue: true\r\n };\r\n const myValueSelector = myValueFilter && myValueFilter.length > 0;\r\n\r\n const editingValue = editingValues && editingValues[filter.id];\r\n const value = editingValue && editingValue.value;\r\n const conditionValue = createConditionValue(1, filter, value) || [];\r\n\r\n if (myValueSelector) {\r\n const maxId = conditionValue && conditionValue.length ? Math.max(...conditionValue.map(c => c.id)) : 0;\r\n\r\n const favouriteConditionValue = filter.advancedField && {\r\n id: maxId + 1,\r\n code: undefined,\r\n ...myValue,\r\n ...getConditionTypesValueData(filter.advancedField)\r\n };\r\n \r\n conditionValue.push(favouriteConditionValue);\r\n }\r\n\r\n const originalCondition = filter && filter.conditions && filter.conditions[0];\r\n return conditionValue && conditionValue.length ? \r\n [createFavouriteCondition(filter, conditionValue, originalCondition)] : \r\n [];\r\n }\r\n };\r\n};\r\n","import { AdvancedSearchTypes } from 'app/types-shared';\r\nimport { ConditionTypesValueData } from 'app/components/filters/types';\r\n\r\nexport const getDefaultConditionTypesValueData = (advancedField: AdvancedSearchTypes): ConditionTypesValueData => {\r\n return {\r\n operator: advancedField.valueOperator,\r\n dbFunction: advancedField.dbFunctionValue\r\n };\r\n};\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterDomain } from './filter-domain';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { EditingValues } from 'app/components/filters/filters-panel/types';\r\nimport { userProfileConditionMapper } from 'app/components/filters/filters-panel/filter-types/filter-domain/user-profile';\r\nimport { getDefaultConditionTypesValueData } from '../default-condition-types-value-data';\r\n\r\nexport const myLocationConfiguration = {\r\n [FilterTypes.MyLocation]: filterConfiguration(\r\n FilterDomain,\r\n endpoint.filterOptionsFor,\r\n [customFilterFieldPostfix.userProfile]\r\n )\r\n};\r\n\r\nexport const myLocationConditionMapper = (editingValues: EditingValues) =>\r\n userProfileConditionMapper(editingValues, FilterTypes.MyLocation, getDefaultConditionTypesValueData);\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterDomain } from './filter-domain';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { userProfileConditionMapper } from 'app/components/filters/filters-panel/filter-types/filter-domain/user-profile';\r\nimport { EditingValues } from 'app/components/filters/filters-panel/types';\r\nimport { getDefaultConditionTypesValueData } from '../default-condition-types-value-data';\r\n\r\nexport const myPersonConfiguration = {\r\n [FilterTypes.Person]: filterConfiguration(\r\n FilterDomain,\r\n endpoint.filterOptionsFor,\r\n [customFilterFieldPostfix.userProfile]\r\n )\r\n};\r\n\r\nexport const myPersonConditionMapper = (editingValues: EditingValues) =>\r\n userProfileConditionMapper(editingValues, FilterTypes.Person, getDefaultConditionTypesValueData);\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterDomain } from './filter-domain';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { userProfileConditionMapper } from 'app/components/filters/filters-panel/filter-types/filter-domain/user-profile';\r\nimport { getDefaultConditionTypesValueData } from '../default-condition-types-value-data';\r\n\r\nexport const myUnitConfiguration = {\r\n [FilterTypes.MyUnit]: filterConfiguration(\r\n FilterDomain,\r\n endpoint.filterOptionsFor,\r\n [customFilterFieldPostfix.userProfile]\r\n )\r\n};\r\n\r\nexport const myUnitConditionMapper = (editingValues: any) =>\r\n userProfileConditionMapper(editingValues, FilterTypes.MyUnit, getDefaultConditionTypesValueData);\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\nimport { RadioSymbol } from 'ui';\r\nimport { OptionTypes, FilterOption } from 'app/components/filters/types';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\n\r\nexport interface FilterNumberProps extends FilterCommonProps {\r\n onFilterOptionType: (filterOption: FilterOption, filterOptionType: FilterOptionType) => void;\r\n}\r\n\r\nexport class FilterNumber extends React.Component<FilterNumberProps> {\r\n private handleOptionChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const selectedOption = Number(e.currentTarget.value);\r\n\r\n this.props.onFilterOptionType({\r\n id: this.props.filterDomain.id,\r\n type: selectedOption\r\n }, FilterOptionType.OPTION_TYPE);\r\n }\r\n\r\n private renderSpecificNumbersOrRanges = () => {\r\n const { simpleFormComponent: SimpleForm, initialValue, filterDomain: { id: name, optionType }, translation } = this.props;\r\n const selected = optionType !== OptionTypes.NotSpecified;\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-specific-numbers-or-ranges`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.SpecificNumbersOrRanges}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-specific-numbers-or-ranges`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <div>\r\n <b>{translation.filters_specific_numbers_ranges_title}</b>\r\n <p>{translation.filters_specific_numbers_ranges_subtitle}</p>\r\n </div>\r\n </label>\r\n\r\n {selected && <SimpleForm\r\n name={name + customFilterFieldPostfix.number}\r\n type={FIELD_TYPE.TEXTAREA}\r\n initialValue={initialValue && initialValue.length > 0 ? initialValue[0].value : ''}\r\n />}\r\n </div>;\r\n }\r\n\r\n private renderNotSpecified = () => {\r\n const { simpleFormComponent, translation, filterDomain: { id: name, optionType } } = this.props;\r\n const SimpleForm = simpleFormComponent;\r\n const selected = optionType === OptionTypes.NotSpecified;\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-not-specified`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.NotSpecified}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-not-specified`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <div>\r\n <b>{translation.filters_not_specified_title}</b>\r\n <p>{translation.filters_not_specified_subtitle}</p>\r\n </div>\r\n {selected && <div className=\"d-none\">\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.notSpecified}\r\n type={FIELD_TYPE.TEXTAREA}\r\n initialValue={translation.filters_not_specified_title}\r\n />\r\n </div>}\r\n </label>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n return <>\r\n {this.renderSpecificNumbersOrRanges()}\r\n {this.renderNotSpecified()}\r\n </>;\r\n }\r\n}\r\n","import { ConditionValueTypes, OptionTypes } from 'app/components/filters/types';\r\nimport { FavouriteConditionValue } from 'app/types-shared';\r\nimport { isNumeric } from 'app/infrastructure/data/number';\r\nimport { numberFieldOperators } from 'app/components/filters/filters-panel/constants';\r\n\r\nexport interface NumberFieldCondition {\r\n number?: number;\r\n number2?: number;\r\n}\r\n\r\nexport const createNumberFieldCondition = (\r\n value: string,\r\n callback: (favouriteConditionValue: NumberFieldCondition, type?: ConditionValueTypes) => FavouriteConditionValue,\r\n optionType?: OptionTypes\r\n) => {\r\n\r\n const result = [];\r\n const trimmedValue = String(value).replace(/ /g, '');\r\n const splitedValues = trimmedValue.split(',');\r\n\r\n const setNumberEmptyValue = () => {\r\n result.push(callback({}, ConditionValueTypes.notSpecified));\r\n };\r\n\r\n const setNumberSingleValue = (number: string, type: ConditionValueTypes) => {\r\n if (isNumeric(number)) {\r\n result.push(callback({ number: Number(number) }, type));\r\n }\r\n };\r\n\r\n const setNumberRangeValues = (rangeValues: string[]) => {\r\n const number = Number(rangeValues[0]);\r\n const number2 = Number(rangeValues[1]);\r\n\r\n if (isNumeric(number) && isNumeric(number2)) {\r\n result.push(\r\n callback({ number, number2 }, ConditionValueTypes.numberRange)\r\n );\r\n }\r\n };\r\n\r\n const numberValues = {\r\n single: (v: string) => Number(v) >= 0 && setNumberSingleValue(v, ConditionValueTypes.numberSingle),\r\n largerOrEqual: (v: string) => {\r\n const newValue = v.replace(numberFieldOperators.largerOrEqual, '');\r\n return v.indexOf(numberFieldOperators.largerOrEqual) > -1\r\n && setNumberSingleValue(newValue, ConditionValueTypes.numberSingleLargerOrEqual);\r\n },\r\n less: (v: string) => {\r\n const newValue = v.replace(numberFieldOperators.less, '');\r\n return v.indexOf(numberFieldOperators.less) > -1 && setNumberSingleValue(newValue, ConditionValueTypes.numberSingleLess);\r\n },\r\n rangeValues: (v: string) => {\r\n const rangeValues = v.split(numberFieldOperators.between);\r\n return rangeValues.length > 1 && setNumberRangeValues(rangeValues);\r\n },\r\n empty: () => {\r\n return setNumberEmptyValue();\r\n }\r\n };\r\n\r\n const setNumberValue = (numberValue: string) => {\r\n if (optionType === OptionTypes.NotSpecified) {\r\n numberValues.empty();\r\n } else {\r\n numberValues.single(numberValue);\r\n numberValues.largerOrEqual(numberValue);\r\n numberValues.less(numberValue);\r\n numberValues.rangeValues(numberValue);\r\n }\r\n };\r\n\r\n if (splitedValues.length === 1) {\r\n trimmedValue && setNumberValue(trimmedValue);\r\n } else {\r\n splitedValues.forEach(item => setNumberValue(item));\r\n }\r\n\r\n return result;\r\n};\r\n","import { Filter } from 'app/components/filters/types';\r\n\r\nexport const getOptionTypeValue = (filter: Filter) => {\r\n const initialOptionType = filter.initialValue\r\n && filter.initialValue.length > 0\r\n && Array.isArray(filter.initialValue)\r\n && !!filter.initialValue[0]\r\n && filter.initialValue[0].hasOwnProperty('type')\r\n && !filter.initialValue[0].hasOwnProperty('value')\r\n && filter.initialValue[0];\r\n return filter.optionType\r\n || (initialOptionType && initialOptionType.type);\r\n};\r\n\r\nexport const getSubOptionTypeValue = (filter: Filter) => {\r\n const initialSubOptionType = filter.initialValue\r\n && filter.initialValue.length > 0\r\n && Array.isArray(filter.initialValue)\r\n && !!filter.initialValue[0]\r\n && filter.initialValue[0].hasOwnProperty('subOptionTypes')\r\n && filter.initialValue[0];\r\n\r\n return filter.subOptionTypes && filter.subOptionTypes.length > 0 ? filter.subOptionTypes :\r\n (filter.subOptionTypes === undefined ? [] : initialSubOptionType && initialSubOptionType.subOptionTypes);\r\n};\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes, ConditionValueTypes, ConditionValuesOperator, Filter, OptionTypes } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { FilterNumber } from 'app/components/filters/filters-panel/filter-types/filter-number/filter-number';\r\nimport { AdvancedSearchTypes, FavouriteConditionValue, FavouriteCondition } from 'app/types-shared';\r\nimport { getValue } from 'app/components/filters/filters-panel/filter-types/get-value';\r\nimport { createNumberFieldCondition } from 'app/components/filters/filters-panel/filter-types/filter-number/create-number-field-condition';\r\nimport { getOptionTypeValue } from 'app/components/filters/filters-panel/option-type-value';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { getConditionForOperator } from 'app/components/filters/filters-panel/filter-types/get-condition';\r\n\r\nexport const numberFieldConfiguration = {\r\n [FilterTypes.NumberField]: filterConfiguration(\r\n FilterNumber,\r\n undefined,\r\n [customFilterFieldPostfix.number]\r\n )\r\n};\r\n\r\nexport const getNumberConditionTypesValueData = (advancedField: AdvancedSearchTypes, conditionValueType: ConditionValueTypes) => {\r\n return {\r\n [ConditionValueTypes.numberSingle]: {\r\n operator: advancedField.valueOperator,\r\n dbFunction: advancedField.dbFunctionValue\r\n },\r\n\r\n [ConditionValueTypes.numberSingleLargerOrEqual]: {\r\n operator: { v: ConditionValuesOperator.largerOrEqual },\r\n dbFunction: advancedField.dbFunctionValue2\r\n },\r\n\r\n [ConditionValueTypes.numberSingleLess]: {\r\n operator: { v: ConditionValuesOperator.lessOrEqual },\r\n dbFunction: advancedField.dbFunctionValue2\r\n },\r\n\r\n [ConditionValueTypes.numberRange]: {\r\n operator: advancedField.valueOperator2,\r\n dbFunction: advancedField.dbFunctionValue2\r\n },\r\n\r\n [ConditionValueTypes.notSpecified]: {\r\n operator: advancedField.valueOperator3,\r\n dbFunction: advancedField.dbFunctionValue3\r\n }\r\n }[conditionValueType];\r\n};\r\n\r\nexport const createNumberData = (filter: Filter, editingValues: any) => {\r\n let id = 1;\r\n const optionType = getOptionTypeValue(filter);\r\n const selector = !!getValue(filter, editingValues, customFilterFieldPostfix.number) || optionType;\r\n\r\n const value = createNumberFieldCondition(\r\n getValue(filter, editingValues, customFilterFieldPostfix.number),\r\n (favouriteConditionValue: FavouriteConditionValue, type?: ConditionValueTypes) => {\r\n return filter.advancedField && {\r\n id: id++,\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n ...favouriteConditionValue,\r\n ...getNumberConditionTypesValueData(filter.advancedField, Number(type))\r\n };\r\n },\r\n optionType\r\n );\r\n\r\n return { value: selector && value, selector };\r\n};\r\n\r\nexport const numberFieldConditionMapper = (editingValues: any) => {\r\n return {\r\n [FilterTypes.NumberField]: (filter: Filter) => {\r\n const numberData = createNumberData(filter, editingValues);\r\n const originalCondition = numberData.selector && numberData.value && numberData.value[0]\r\n ? getConditionForOperator(filter.conditions, numberData.value[0].operator)\r\n : undefined;\r\n\r\n return numberData.selector ? [\r\n createFavouriteCondition(filter, numberData.value, originalCondition)\r\n ] : [];\r\n }\r\n };\r\n};\r\n\r\nexport const numberFieldOptionType = (condition: FavouriteCondition) => {\r\n\r\n if (condition.values && condition.values.some(v => v.operator && v.operator.v === ConditionValuesOperator.empty)) {\r\n return {\r\n [FilterTypes.NumberField]: OptionTypes.NotSpecified\r\n };\r\n }\r\n\r\n return {\r\n [FilterTypes.NumberField]: OptionTypes.SpecificNumbersOrRanges\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { ConditionValuesOperator, OptionTypes } from 'app/components/filters/types';\r\n\r\nexport const createFieldOptionType = (values: FavouriteConditionValue[]) => {\r\n return values\r\n .map(item => {\r\n const newItem = {\r\n [ConditionValuesOperator.empty]: OptionTypes.NotSpecified\r\n };\r\n return (item.operator && newItem[item.operator.v]);\r\n });\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\n\r\nexport class FilterPredefinedDate extends React.Component<FilterCommonProps, {}> {\r\n\r\n public render() {\r\n const { simpleFormComponent: SimpleForm, filterDomain } = this.props;\r\n\r\n return <SimpleForm\r\n name={filterDomain.id + customFilterFieldPostfix.predefDate}\r\n type={FIELD_TYPE.DATE_TIME}\r\n initialValue={!!filterDomain.initialValue ? filterDomain.initialValue : undefined}\r\n placeholder={this.props.translation && this.props.translation.filters_date_placeholder}\r\n />;\r\n }\r\n}\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { FilterPredefinedDate } from 'app/components/filters/filters-panel/filter-types/filter-predefined-date/filter-predefined-date';\r\n\r\nexport const predefinedDateConfiguration = {\r\n [FilterTypes.PredefDate]: filterConfiguration(\r\n FilterPredefinedDate,\r\n undefined,\r\n [customFilterFieldPostfix.predefDate]\r\n )\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\nimport { postfixOperator } from 'app/components/filters/filters-panel/constants';\r\n\r\nexport class FilterPredefinedFilters extends React.Component<FilterCommonProps, {}> {\r\n\r\n public render() {\r\n const { \r\n simpleFormComponent: SimpleForm,\r\n translation,\r\n optionsParams,\r\n initialValue,\r\n filterDomain: { id: name }\r\n } = this.props;\r\n\r\n return <div>\r\n <h4>{translation.filters_include}</h4>\r\n <SimpleForm\r\n name={name + postfixOperator.include}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n initialValue={initialValue && initialValue.include}\r\n optionsEndpoint={this.props.optionsEndpoint}\r\n placeholder={translation && translation.filters_search_placeholder}\r\n translation={translation}\r\n optionsParams={optionsParams} />\r\n <hr />\r\n <h4>{this.props.translation.filters_exclude}</h4>\r\n <SimpleForm\r\n name={name + postfixOperator.exclude}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n initialValue={initialValue && initialValue.exclude}\r\n optionsEndpoint={this.props.optionsEndpoint}\r\n placeholder={translation && translation.filters_search_placeholder}\r\n translation={translation}\r\n optionsParams={optionsParams} />\r\n </div>;\r\n }\r\n}\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { postfixOperator } from 'app/components/filters/filters-panel/constants';\r\nimport { FilterPredefinedFilters } from './filter-predefined-filters';\r\n\r\nexport const predefinedFiltersConfiguration = {\r\n [FilterTypes.PredefFilters]: filterConfiguration(\r\n FilterPredefinedFilters,\r\n () => endpoint.predefinedFilters,\r\n [postfixOperator.include, postfixOperator.exclude]\r\n )\r\n};\r\n","import * as React from 'react';\r\nimport { FilterCommonProps } from '../types';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { OptionTypes, SubOptionTypes, FilterOption } from 'app/components/filters/types';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\nimport { RadioSymbol, CheckSymbol } from 'ui';\r\nimport { customFilterFieldPostfix } from '../../constants';\r\n\r\nexport interface FilterTextState {\r\n selectedSubOptions?: SubOptionTypes[];\r\n}\r\n\r\nexport interface FilterTextProps extends FilterCommonProps {\r\n onFilterOptionType: (filterOption: FilterOption, filterOptionType: FilterOptionType) => void;\r\n}\r\n\r\nexport class FilterText extends React.Component<FilterTextProps, FilterTextState> {\r\n\r\n constructor(props: FilterTextProps) {\r\n super(props);\r\n\r\n this.state = {\r\n selectedSubOptions: props.initialValue && props.initialValue[0]\r\n && props.initialValue[0].hasOwnProperty('subOptionTypes') ? props.initialValue[0].subOptionTypes : []\r\n };\r\n }\r\n\r\n public componentDidUpdate(prevProps: FilterTextProps) {\r\n if (this.props.filterDomain !== prevProps.filterDomain) {\r\n this.setDefaultSubOptionType();\r\n }\r\n }\r\n\r\n private setDefaultSubOptionType() {\r\n if (this.props.filterDomain.subOptionTypes && this.props.filterDomain.subOptionTypes.length === 0\r\n && ((this.props.filterDomain.initialValue && this.props.filterDomain.initialValue.length === 0)\r\n || !this.props.filterDomain.initialValue)) {\r\n\r\n this.setState({\r\n selectedSubOptions: []\r\n });\r\n }\r\n }\r\n\r\n private getSelectedSubOptions = () => {\r\n const { filterDomain: { optionType }} = this.props;\r\n let selectedSubOptions = this.state.selectedSubOptions;\r\n\r\n if (optionType === OptionTypes.NotSpecified) {\r\n selectedSubOptions = [];\r\n }\r\n\r\n return selectedSubOptions;\r\n }\r\n\r\n private handleOptionChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const selectedOption = Number(e.currentTarget.value);\r\n\r\n this.props.onFilterOptionType({\r\n id: this.props.filterDomain.id,\r\n type: selectedOption\r\n }, FilterOptionType.OPTION_TYPE);\r\n\r\n this.setState({\r\n selectedSubOptions: this.getSelectedSubOptions()\r\n });\r\n }\r\n\r\n private handleSubOptionChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const value = Number(e.currentTarget.value);\r\n const selectedSubOption = e.currentTarget.checked && value;\r\n const newSubTypes = Number.isInteger(selectedSubOption) ? [...this.state.selectedSubOptions, selectedSubOption]\r\n : this.state.selectedSubOptions.filter(item => !selectedSubOption && item !== value);\r\n\r\n this.props.onFilterOptionType({\r\n id: this.props.filterDomain.id,\r\n subOptionTypes: newSubTypes.length > 0 ? newSubTypes : undefined\r\n }, FilterOptionType.SUB_OPTION_TYPE);\r\n\r\n this.setState({\r\n selectedSubOptions: newSubTypes\r\n });\r\n }\r\n\r\n private renderMatchExact = () => {\r\n const { translation } = this.props;\r\n\r\n return <>\r\n <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-match-exact`}\r\n type=\"checkbox\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={SubOptionTypes.MatchExact}\r\n checked={this.state.selectedSubOptions.some(type => type === SubOptionTypes.MatchExact)}\r\n onChange={this.handleSubOptionChange}\r\n />\r\n\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-match-exact`}\r\n className=\"form-check-label media\">\r\n <CheckSymbol />\r\n {translation.filters_contains_word_exact}\r\n </label>\r\n </div>\r\n </>;\r\n }\r\n\r\n private renderContainsWords = () => {\r\n const { simpleFormComponent: SimpleForm, initialValue, filterDomain: { id: name, optionType }, translation } = this.props;\r\n const selected = optionType !== OptionTypes.NotSpecified;\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-contains-words`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.ContainsWords}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-contains-words`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <b>{translation.filters_contains_word}</b>\r\n </label>\r\n\r\n {selected && <>\r\n {this.renderMatchExact()}\r\n <SimpleForm\r\n name={name}\r\n type={FIELD_TYPE.TEXTAREA}\r\n initialValue={initialValue && initialValue.length > 0 && initialValue[0].hasOwnProperty('value') ? initialValue[0].value : ''}\r\n /></>}\r\n </div>;\r\n }\r\n\r\n private renderNotSpecified = () => {\r\n const { simpleFormComponent, translation, filterDomain: { id: name, optionType } } = this.props;\r\n const SimpleForm = simpleFormComponent;\r\n const selected = optionType === OptionTypes.NotSpecified;\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n id={`${this.props.filterDomain.id}-not-specified`}\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionTypes.NotSpecified}\r\n checked={selected}\r\n onChange={this.handleOptionChange} />\r\n <label\r\n htmlFor={`${this.props.filterDomain.id}-not-specified`}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <div>\r\n <b>{translation.filters_not_specified_title}</b>\r\n <p>{translation.filters_not_specified_subtitle}</p>\r\n </div>\r\n {selected && <div className=\"d-none\">\r\n <SimpleForm\r\n name={name + customFilterFieldPostfix.notSpecified}\r\n type={FIELD_TYPE.TEXTAREA}\r\n initialValue={translation.filters_not_specified_title}\r\n />\r\n </div>}\r\n </label>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n return <>\r\n {this.renderContainsWords()}\r\n {this.renderNotSpecified()}\r\n </>;\r\n }\r\n}\r\n","import { ConditionValueTypes } from 'app/components/filters/types';\r\nimport { AdvancedSearchTypes } from 'app/types-shared';\r\n\r\nexport const getTextFieldConditionTypesValueData =\r\n (advancedField: AdvancedSearchTypes,\r\n conditionValueType: ConditionValueTypes,\r\n conditionValueSubType?: ConditionValueTypes[]\r\n ) => {\r\n const mappedConditionTypes = {\r\n [ConditionValueTypes.default]: {\r\n operator: advancedField.valueOperator,\r\n dbFunction: advancedField.dbFunctionValue\r\n },\r\n [ConditionValueTypes.notSpecified]: {\r\n operator: advancedField.valueOperator3,\r\n dbFunction: advancedField.dbFunctionValue3\r\n }\r\n }[conditionValueType];\r\n\r\n const subOptionsValue = conditionValueSubType && conditionValueSubType.length > 0 && {\r\n ...(conditionValueSubType.some(item => item === ConditionValueTypes.matchExact) && {\r\n operator: advancedField.valueOperator2,\r\n dbFunction: advancedField.dbFunctionValue2\r\n })\r\n };\r\n\r\n return subOptionsValue || mappedConditionTypes;\r\n };\r\n","import { Filter, ConditionValueTypes, ConditionValue } from 'app/components/filters/types';\r\nimport { valuePropName } from 'app/components/filters/filters-panel/constants';\r\nimport { getTextFieldConditionTypesValueData } from 'app/components/filters/filters-panel/filter-types/filter-text/text-field-data';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { trimValue } from 'app/components/filters/filters-panel/filter-types/trim-value';\r\n\r\nexport const getFavouriteConditionValue = (id: number, filter: Filter, conditionValue: ConditionValue) => {\r\n const newConditionValue = filter.advancedField && {\r\n id,\r\n [valuePropName.text]: trimValue(conditionValue),\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n ...getTextFieldConditionTypesValueData(filter.advancedField, ConditionValueTypes.default)\r\n };\r\n\r\n return trimValue(conditionValue) !== '' && newConditionValue;\r\n};\r\n\r\nexport const createConditionValue = (id: number, filter: Filter, value: SelectItem[]) => {\r\n return value && (value instanceof Array\r\n && value.map(v => getFavouriteConditionValue(id++, filter, v.value)) || [getFavouriteConditionValue(id++, filter, value)]);\r\n};\r\n","import { getOptionTypeValue } from 'app/components/filters/filters-panel/option-type-value';\r\nimport { Filter, OptionTypes, ConditionValueTypes } from 'app/components/filters/types';\r\nimport { getTextFieldConditionTypesValueData } from 'app/components/filters/filters-panel/filter-types/filter-text/text-field-data';\r\n\r\nexport const createConditionOptionTypeValue = (id: number, filter: Filter) => {\r\n const optionType = getOptionTypeValue(filter);\r\n\r\n const mapped = {\r\n [OptionTypes.NotSpecified]: ConditionValueTypes.notSpecified\r\n };\r\n\r\n const newConditionValue = filter.advancedField && {\r\n id,\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n ...getTextFieldConditionTypesValueData(filter.advancedField, mapped[optionType])\r\n };\r\n\r\n return optionType && mapped[optionType] && [newConditionValue];\r\n};\r\n","import { SelectItem } from 'ui/common/select/types';\r\nimport { getSubOptionTypeValue } from 'app/components/filters/filters-panel/option-type-value';\r\nimport { valuePropName } from 'app/components/filters/filters-panel/constants';\r\nimport { SubOptionTypes, ConditionValueTypes, Filter } from 'app/components/filters/types';\r\nimport { getTextFieldConditionTypesValueData } from 'app/components/filters/filters-panel/filter-types/filter-text/text-field-data';\r\nimport { trimValue } from '../trim-value';\r\n\r\nexport const createConditionSubOptionTypeValue = (id: number, filter: Filter, value: SelectItem[]) => {\r\n const subOptionTypes = getSubOptionTypeValue(filter);\r\n const mapped = subOptionTypes && subOptionTypes.length > 0 && subOptionTypes.map(subOptionType => {\r\n return {\r\n [SubOptionTypes.MatchExact]: ConditionValueTypes.matchExact\r\n }[subOptionType];\r\n });\r\n\r\n const trimmedValue = trimValue(value);\r\n const newValue = value ? {\r\n [valuePropName.text]: trimmedValue\r\n } : {};\r\n\r\n const newConditionValue = trimmedValue && filter.advancedField && {\r\n id,\r\n ...newValue,\r\n myValue: false,\r\n periodPredef: { v: 0 },\r\n ...getTextFieldConditionTypesValueData(filter.advancedField, undefined, mapped)\r\n };\r\n\r\n return trimmedValue && subOptionTypes && subOptionTypes.length > 0 && [newConditionValue];\r\n};\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes, OptionTypes, ConditionValuesOperator, Filter } from 'app/components/filters/types';\r\nimport { FilterText } from 'app/components/filters/filters-panel/filter-types/filter-text/filter-text';\r\nimport { FavouriteCondition } from 'app/types-shared';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { createConditionValue } from './create-condition-value';\r\nimport { createConditionOptionTypeValue } from './create-condition-option-type-value';\r\nimport { createConditionSubOptionTypeValue } from './create-condition-sub-option-type-value';\r\n\r\nexport const textFieldConfiguration = {\r\n [FilterTypes.TextField]: filterConfiguration(FilterText)\r\n};\r\n\r\nexport const textFieldConditionMapper = (editingValues: any) => {\r\n return {\r\n [FilterTypes.TextField]: (filter: Filter) => {\r\n let condValIndex = 1;\r\n\r\n const editingValue = editingValues && editingValues[filter.id];\r\n const value = editingValue && editingValue.value;\r\n\r\n const conditionValue = createConditionValue(condValIndex++, filter, value);\r\n const conditionOptionTypeValue = createConditionOptionTypeValue(condValIndex++, filter);\r\n const conditionSubOptionTypeValue = createConditionSubOptionTypeValue(condValIndex++, filter, value);\r\n const conditionValues = (!conditionSubOptionTypeValue && conditionValue) || conditionSubOptionTypeValue || conditionOptionTypeValue;\r\n const originalCondition = filter.conditions && filter.conditions[0];\r\n\r\n return conditionValues ? [createFavouriteCondition(filter, conditionValues, originalCondition)] : [];\r\n }\r\n };\r\n};\r\n\r\nexport const textFieldOptionType = (condition: FavouriteCondition) => {\r\n\r\n if (condition.values && condition.values.some(v => v.operator && v.operator.v === ConditionValuesOperator.empty)) {\r\n return {\r\n [FilterTypes.TextField]: OptionTypes.NotSpecified\r\n };\r\n }\r\n\r\n return {\r\n [FilterTypes.TextField]: OptionTypes.ContainsWords\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { FilterCommonProps } from '../types';\r\nimport { OptionsType } from 'ui/common/select/types';\r\n\r\nexport class FilterCodeFlat extends React.Component<FilterCommonProps, {}> {\r\n\r\n public render() {\r\n const {\r\n optionsEndpoint,\r\n optionsParams,\r\n simpleFormComponent: SimpleForm,\r\n initialValue,\r\n translation,\r\n filterDomain: { id: name }\r\n } = this.props;\r\n\r\n return <SimpleForm\r\n name={name}\r\n type={FIELD_TYPE.SELECT_MULTIPLE}\r\n initialValue={initialValue}\r\n optionsEndpoint={optionsEndpoint}\r\n placeholder={translation && translation.filters_search_placeholder}\r\n translation={translation}\r\n optionsParams={optionsParams}\r\n optionsDisplaySetting={OptionsType.flat}\r\n />;\r\n }\r\n}\r\n","import { filterConfiguration } from 'app/components/filters/filters-panel/filter-configuration';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { endpoint } from 'app/area/filters/constants';\r\nimport { FilterCodeFlat } from 'app/components/filters/filters-panel/filter-types/filter-code/filter-code-flat';\r\nimport { createConditionValue } from 'app/components/filters/filters-panel/filter-types/filter-code-hierarchy/create-condition-value';\r\nimport { createFavouriteCondition } from 'app/components/filters/filters-panel/conditions/create-conditions';\r\nimport { getConditionForOperator } from '../get-condition';\r\n\r\nexport const selectMultipleFlatConfiguration = {\r\n [FilterTypes.SelectMultipleFlat]: filterConfiguration(\r\n FilterCodeFlat,\r\n endpoint.filterOptionsFor\r\n )\r\n};\r\n\r\nexport const selectMultipleFlatConditionMapper = (editingValues: any) => {\r\n return {\r\n [FilterTypes.SelectMultipleFlat]: filter => {\r\n let condValIndex = 1;\r\n\r\n const editingValue = editingValues && editingValues[filter.id];\r\n const value = editingValue && editingValue.value;\r\n const conditionValue = createConditionValue(condValIndex++, filter, value);\r\n const originalCondition = getConditionForOperator(filter.conditions, filter.advancedField.valueOperator);\r\n\r\n return conditionValue ? [createFavouriteCondition(filter, conditionValue, originalCondition)] : [];\r\n }\r\n };\r\n};\r\n","// tslint:disable:max-line-length\r\nimport { createInitialDecimalFieldConditions } from './filter-decimal/create-initial-decimal-field-conditions';\r\nimport { selectMultipleHierarchyConditionMapper, selectMultipleHierarchyConfiguration } from './filter-code-hierarchy/select-multiple-hierarchy';\r\nimport { createInitialDefaultValue } from './create-initial-default-value';\r\nimport { checkboxConfiguration, checkboxConditionMapper } from './filter-checkbox/checkbox';\r\nimport { createInitialDateFieldConditions } from './filter-date-range/create-initial-date-field-conditions';\r\nimport { dateFieldConditionMapper, dateFieldConfiguration, dateFieldOptionType } from './filter-date-range/date-field';\r\nimport { decimalNumberConfiguration, decimalNumberConditionMapper, decimalNumberOptionType } from './filter-decimal/decimal-number';\r\nimport { selectMultipleConfiguration, selectMultipleConditionMapper } from './filter-code/select-multiple';\r\nimport { myLocationConfiguration } from './filter-domain/my-location';\r\nimport { myPersonConfiguration, myPersonConditionMapper } from './filter-domain/my-person';\r\nimport { myUnitConfiguration, myUnitConditionMapper } from './filter-domain/my-unit';\r\nimport { numberFieldConfiguration, numberFieldConditionMapper, numberFieldOptionType } from './filter-number/number-field';\r\nimport { createInitialNumberFieldConditions } from './filter-number/create-initial-number-field-conditions';\r\nimport { predefinedDateConfiguration } from './filter-predefined-date/predefined-date';\r\nimport { predefinedFiltersConfiguration } from './filter-predefined-filters/predefined-filters';\r\nimport { textFieldConfiguration, textFieldConditionMapper, textFieldOptionType } from './filter-text/text-field';\r\nimport { createInitialTextFieldConditions } from './filter-text/create-initial-text-field-conditions';\r\nimport { myLocationConditionMapper } from './filter-domain/my-location';\r\nimport { createInitialMyLocationConditions } from './filter-domain/create-initial-my-location-conditions';\r\nimport { createInitialPersonConditions } from './filter-domain/create-initial-person-conditions';\r\nimport { createInitialMyUnitConditions } from './filter-domain/create-initial-my-unit-conditions';\r\nimport { selectMultipleFlatConfiguration, selectMultipleFlatConditionMapper } from './filter-code/select-multiple-flat';\r\n\r\nexport const configuration = [\r\n {\r\n configuration: checkboxConfiguration,\r\n mapper: checkboxConditionMapper,\r\n initialValue: undefined\r\n },\r\n {\r\n configuration: selectMultipleConfiguration,\r\n mapper: selectMultipleConditionMapper,\r\n initialValue: undefined\r\n },\r\n {\r\n configuration: selectMultipleFlatConfiguration,\r\n mapper: selectMultipleFlatConditionMapper,\r\n initialValue: undefined\r\n },\r\n {\r\n configuration: selectMultipleHierarchyConfiguration,\r\n mapper: selectMultipleHierarchyConditionMapper,\r\n initialValue: createInitialDefaultValue\r\n },\r\n {\r\n configuration: dateFieldConfiguration,\r\n mapper: dateFieldConditionMapper,\r\n initialValue: createInitialDateFieldConditions,\r\n optionType: dateFieldOptionType\r\n },\r\n {\r\n configuration: decimalNumberConfiguration,\r\n mapper: decimalNumberConditionMapper,\r\n initialValue: createInitialDecimalFieldConditions,\r\n optionType: decimalNumberOptionType\r\n },\r\n {\r\n configuration: myLocationConfiguration,\r\n mapper: myLocationConditionMapper,\r\n initialValue: createInitialMyLocationConditions\r\n },\r\n {\r\n configuration: myPersonConfiguration,\r\n mapper: myPersonConditionMapper,\r\n initialValue: createInitialPersonConditions\r\n },\r\n {\r\n configuration: myUnitConfiguration,\r\n mapper: myUnitConditionMapper,\r\n initialValue: createInitialMyUnitConditions\r\n },\r\n {\r\n configuration: numberFieldConfiguration,\r\n mapper: numberFieldConditionMapper,\r\n initialValue: createInitialNumberFieldConditions,\r\n optionType: numberFieldOptionType\r\n },\r\n {\r\n configuration: predefinedDateConfiguration,\r\n mapper: undefined,\r\n initialValue: undefined\r\n },\r\n {\r\n configuration: predefinedFiltersConfiguration,\r\n mapper: undefined,\r\n initialValue: undefined\r\n },\r\n {\r\n configuration: textFieldConfiguration,\r\n mapper: textFieldConditionMapper,\r\n initialValue: createInitialTextFieldConditions,\r\n optionType: textFieldOptionType\r\n }\r\n];\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { createInitialDefaultValue } from '../create-initial-default-value';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\n\r\nexport const createInitialMyLocationConditions = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[]) => {\r\n\r\n return {\r\n [FilterTypes.MyLocation]: favouriteConditionValue.myValue\r\n ? { myValue: true } : createInitialDefaultValue(favouriteConditionValue, conditionValues)\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { createInitialDefaultValue } from '../create-initial-default-value';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\n\r\nexport const createInitialPersonConditions = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[]) => {\r\n\r\n return {\r\n [FilterTypes.Person]: favouriteConditionValue.myValue\r\n ? { myValue: true } : createInitialDefaultValue(favouriteConditionValue, conditionValues)\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { createInitialDefaultValue } from '../create-initial-default-value';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\n\r\nexport const createInitialMyUnitConditions = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[]) => {\r\n\r\n return {\r\n [FilterTypes.MyUnit]: favouriteConditionValue.myValue\r\n ? { myValue: true } : createInitialDefaultValue(favouriteConditionValue, conditionValues)\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { ConditionValuesOperator, FilterTypes } from 'app/components/filters/types';\r\nimport { numberFieldOperators } from 'app/components/filters/filters-panel/constants';\r\nimport { createFieldOptionType } from 'app/area/filters/favourite-definition/create-field-option-type';\r\n\r\nexport const createNumberFieldValue = (values: FavouriteConditionValue[]) => {\r\n return values\r\n .map(item => {\r\n\r\n const newItem = {\r\n [ConditionValuesOperator.equal]: item.number,\r\n [ConditionValuesOperator.largerOrEqual]: item.number + numberFieldOperators.largerOrEqual,\r\n [ConditionValuesOperator.lessOrEqual]: item.number + numberFieldOperators.less,\r\n [ConditionValuesOperator.between]: item.number + numberFieldOperators.between + item.number2,\r\n [ConditionValuesOperator.or]: item.number\r\n };\r\n\r\n return String(item.operator && newItem[item.operator.v]);\r\n })\r\n .join();\r\n};\r\n\r\nexport const createInitialNumberFieldConditions = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[]) => {\r\n\r\n const conditionValuesOperators = {\r\n [ConditionValuesOperator.empty]: { type: createFieldOptionType(conditionValues)[0] }\r\n };\r\n\r\n const defaultValue = { value: createNumberFieldValue(conditionValues) };\r\n const optionTypeOperator = conditionValues[0] && conditionValues[0].operator;\r\n const optionTypeValue = (optionTypeOperator && conditionValuesOperators[optionTypeOperator.v]);\r\n\r\n return {\r\n [FilterTypes.NumberField]: conditionValues && (optionTypeValue || defaultValue)\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { ConditionValuesOperator, ConditionValuesDbFunction, SubOptionTypes, FilterTypes } from 'app/components/filters/types';\r\nimport { createFieldOptionType } from 'app/area/filters/favourite-definition/create-field-option-type';\r\n\r\nexport const createSubOptionTypeValue = (favouriteConditionValue: FavouriteConditionValue) => {\r\n const operator = favouriteConditionValue && favouriteConditionValue.hasOwnProperty('operator')\r\n && favouriteConditionValue.operator.v;\r\n const dbFunction = favouriteConditionValue && favouriteConditionValue.hasOwnProperty('dbFunction')\r\n && favouriteConditionValue.dbFunction.v;\r\n\r\n const isMatchExactOperator = operator === ConditionValuesOperator.equal;\r\n const isMatchExactDbFunction = dbFunction === ConditionValuesDbFunction.upper;\r\n\r\n return isMatchExactOperator && isMatchExactDbFunction && {\r\n value: favouriteConditionValue.string,\r\n subOptionTypes: [SubOptionTypes.MatchExact]\r\n };\r\n};\r\n\r\nexport const createInitialTextFieldConditions = (favouriteConditionValue: FavouriteConditionValue,\r\n conditionValues: FavouriteConditionValue[]) => {\r\n\r\n const conditionValuesOperators = {\r\n [ConditionValuesOperator.empty]: { type: createFieldOptionType(conditionValues)[0] }\r\n };\r\n\r\n const defaultValue = { value: favouriteConditionValue.string };\r\n const subOptionTypeValue = createSubOptionTypeValue(favouriteConditionValue);\r\n\r\n const optionTypeOperator = conditionValues[0] && conditionValues[0].operator;\r\n const optionTypeValue = (optionTypeOperator && conditionValuesOperators[optionTypeOperator.v]);\r\n\r\n return {\r\n [FilterTypes.TextField]: conditionValues && (optionTypeValue || subOptionTypeValue || defaultValue)\r\n };\r\n};\r\n","import { FilterTypes } from 'app/components/filters/types';\r\nimport { configuration } from './filter-types/configuration';\r\n\r\nconst filterConfigurations = configuration.reduce((result, filter) => ({\r\n ...result,\r\n ...filter.configuration\r\n}), {});\r\n\r\nexport const createFilterConfigurations = (advancedSearchType: FilterTypes) => {\r\n return filterConfigurations[advancedSearchType];\r\n};\r\n","import { OptionTypes } from '../types';\r\nimport isNumber from 'lodash/isnumber';\r\n\r\nexport const getFilterSelectedOptionsLength = (id: string, values: any, postfix?: string[], optionTypeValue?: OptionTypes) => {\r\n return [\r\n id,\r\n ...(!!postfix ? postfix.map(p => id + p) : [])\r\n ].reduce((sum, key) => {\r\n\r\n const hasValue = values && values[key] && values[key].hasOwnProperty('value');\r\n const value = hasValue && values[key].value;\r\n\r\n if (Array.isArray(value)) {\r\n return sum + value.length;\r\n }\r\n\r\n return sum + (hasValue && (!!value || isNumber(value)) ? 1 : 0);\r\n }, 0) + (optionTypeValue === OptionTypes.NotSpecified ? 1 : 0);\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonTertiary } from 'ui';\r\nimport styles from './add-filters-button.scss';\r\n\r\nexport interface AddFiltersButtonProps {\r\n title?: string;\r\n onOpen: () => void;\r\n}\r\n\r\nexport const AddFiltersButton = (props: AddFiltersButtonProps) => {\r\n return (\r\n <div className={styles.addFiltersButton}>\r\n <ButtonTertiary classNames=\"btn-block\" onClick={props.onOpen}>\r\n {props.title}\r\n </ButtonTertiary>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { SelectMultipleHierarchy } from 'ui';\r\n\r\nexport interface AddFiltersSelectProps {\r\n translation: any;\r\n valueItems: ComplexValue<number>[];\r\n options: ComplexValue<number>[];\r\n onChange: (valueItem: ComplexValue<number>[]) => void;\r\n onLoadAdvancedSearchFields: (query?: string) => void;\r\n}\r\n\r\nexport interface AddFiltersSelectState {\r\n loadOptions: LoadOptions;\r\n isFetching: boolean;\r\n}\r\n\r\nexport class AddFiltersSelect extends React.Component<AddFiltersSelectProps, AddFiltersSelectState> {\r\n\r\n public state: Readonly<AddFiltersSelectState> = {\r\n loadOptions: undefined,\r\n isFetching: false\r\n };\r\n\r\n private onLoadOptions = (loadOptions: LoadOptions) => {\r\n this.setState({ loadOptions, isFetching: true }, () => {\r\n this.props.onLoadAdvancedSearchFields(loadOptions.query);\r\n });\r\n }\r\n\r\n public componentDidUpdate (prevProps: AddFiltersSelectProps) {\r\n if (this.props.options !== prevProps.options) {\r\n this.setState({isFetching: false});\r\n }\r\n }\r\n\r\n public render() {\r\n const { valueItems, options, translation, onChange } = this.props;\r\n\r\n return (<SelectMultipleHierarchy\r\n componentId={'1'}\r\n className={'multiple-hierarchy'}\r\n placeholder={translation && translation.filters_search_placeholder}\r\n valueItems={valueItems}\r\n loadOptions={this.state.loadOptions}\r\n options={options}\r\n onChange={onChange}\r\n textOptionsNotFound={translation && translation.no_options_found}\r\n textOptionsDone={translation && translation.done}\r\n onLoadOptions={this.onLoadOptions}\r\n fetching={this.state.isFetching}\r\n alwaysOpen={true}\r\n leafNodeOnly={true}\r\n descriptionAllLevels={true}\r\n />);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { AddFiltersButton } from 'app/components/filters/add-filters/add-filters-button';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { AddFiltersSelect } from 'app/components/filters/add-filters/add-filters-select';\r\nimport { AdvancedSearchOption } from 'app/area/filters/types';\r\nimport { mapToAdvancedSearchTypes } from 'app/area/filters/filters-mapping';\r\n\r\nexport interface AddFiltersProps {\r\n options?: any;\r\n translation?: any;\r\n onAddNewFilters?: (options: any) => any;\r\n onLoadAdvancedSearchFields: (query?: string) => any;\r\n}\r\n\r\nexport interface AddFiltersState {\r\n isOpen: boolean;\r\n valueItems: any;\r\n}\r\n\r\nexport class AddFilters extends React.PureComponent<AddFiltersProps, AddFiltersState> {\r\n public state: Readonly<AddFiltersState> = {\r\n isOpen: false,\r\n valueItems: []\r\n };\r\n\r\n private handleToggle = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n } as AddFiltersState);\r\n }\r\n\r\n private handleAddValueItems = () => {\r\n this.props.onAddNewFilters(mapToAdvancedSearchTypes(this.state.valueItems.map(item => ({\r\n ...item\r\n }))));\r\n this.clearValueItems();\r\n }\r\n\r\n private onFiltersListChange = (valueItems: AdvancedSearchOption[]) => {\r\n this.setState({\r\n valueItems\r\n } as AddFiltersState);\r\n }\r\n\r\n private isDisabled = () => {\r\n return this.state.valueItems.length > 0 ? false : true;\r\n }\r\n\r\n private clearValueItems = () => {\r\n this.setState({\r\n valueItems: []\r\n } as AddFiltersState);\r\n }\r\n\r\n private handleClose = () => {\r\n this.handleToggle();\r\n this.handleAddValueItems();\r\n }\r\n\r\n private renderFiltersModal = () => {\r\n return <ModalWrapper\r\n headerTitle={this.props.translation.add_filters_modal_title}\r\n btnTitle={this.props.translation.add_filters_modal_add_button}\r\n onClose={this.handleClose}\r\n onDone={this.handleAddValueItems}\r\n isDisabled={this.isDisabled}>\r\n {<AddFiltersSelect\r\n translation={this.props.translation}\r\n options={this.props.options}\r\n valueItems={this.state.valueItems}\r\n onChange={this.onFiltersListChange}\r\n onLoadAdvancedSearchFields={this.props.onLoadAdvancedSearchFields}\r\n />}\r\n </ModalWrapper>;\r\n }\r\n\r\n public render() {\r\n return (\r\n <div>\r\n <AddFiltersButton\r\n title={this.props.translation && this.props.translation.add_filters_button_title}\r\n onOpen={this.handleToggle} />\r\n {this.state.isOpen && this.renderFiltersModal()}\r\n </div>\r\n );\r\n }\r\n}\r\n","import { FilterTypes } from 'app/components/filters/types';\r\nimport { validationTranslations, customFilterFieldPostfix } from './constants';\r\nimport { Filter } from '../types';\r\n\r\nimport get from 'lodash/get';\r\n\r\nconst matchNumberAndSeparators = /^[\\d ,<>\\-]+$/m;\r\n\r\nconst numberFieldValidation = (filter: Filter) => (data: any, translation: (id: number) => string) => {\r\n\r\n const valueKey = filter.id + customFilterFieldPostfix.number;\r\n\r\n const value = get(data, `${valueKey}.value`);\r\n return !!value && !(matchNumberAndSeparators.test(value))\r\n ? { field: valueKey, message: translation(validationTranslations.number_or_separator) }\r\n : undefined;\r\n};\r\n\r\nconst predefDateFieldValidation = (filter: Filter) => (data: any, translation: (id: number) => string) => {\r\n\r\n const valueKey = filter.id + customFilterFieldPostfix.predefDate;\r\n const value = get(data, `${valueKey}.value`);\r\n\r\n return !value ? { field: valueKey, message: translation(validationTranslations.required_field) } : undefined;\r\n};\r\n\r\nexport const createFilterValidation = (advancedSearchType: FilterTypes) => {\r\n\r\n const configuration = {\r\n [FilterTypes.NumberField]: numberFieldValidation,\r\n [FilterTypes.PredefDate]: predefDateFieldValidation\r\n };\r\n\r\n return configuration[advancedSearchType];\r\n};\r\n","import * as React from 'react';\r\nimport { FilterPanel } from './filter-panel';\r\nimport { simpleFieldForPath } from 'app/infrastructure/simple-form';\r\nimport { SimpleFormComponentProps, SimpleFieldFactoryParameters } from 'app/infrastructure/simple-form/types';\r\nimport { Filter } from '../types';\r\nimport { FilterError } from './filter-types/filter-error/filter-error';\r\nimport { createFilterConfigurations } from 'app/components/filters/filters-panel/create-filter-configurations';\r\nimport { getFilterSelectedOptionsLength } from 'app/components/filters/filters-panel/selected-options-length';\r\nimport { caseTypeDomainId } from 'app/components/filters/filters-panel/constants';\r\nimport { AddFilters } from 'app/components/filters/add-filters/add-filters';\r\nimport { createFilterValidation } from 'app/components/filters/filters-panel/filter-validation';\r\nimport { getSelectedOptionsIds, createFilteredValues } from 'app/area/filters/filters-mapping';\r\nimport { STATE } from 'app/constants';\r\nimport styles from './filter-panel.scss';\r\nimport { getOptionTypeValue } from 'app/components/filters/filters-panel/option-type-value';\r\nimport { FiltersViewProps } from 'app/components/filters/filters-panel/filters-view-props';\r\n\r\nexport class FiltersPanel extends React.Component<FiltersViewProps> {\r\n private simpleForm: React.ComponentClass<SimpleFormComponentProps>;\r\n\r\n constructor(props: FiltersViewProps) {\r\n super(props);\r\n this.simpleForm = simpleFieldForPath(STATE.filters, {\r\n displayNotSelectedOption: true\r\n } as SimpleFieldFactoryParameters);\r\n }\r\n\r\n private getCaseTypeSelectedOptionsIds = (domainId: number) => {\r\n const ids = this.props.editingValues && domainId !== caseTypeDomainId &&\r\n getSelectedOptionsIds(this.props.editingValues, caseTypeDomainId);\r\n return ids && ids.length > 0 ? { applicationId: ids } : {};\r\n }\r\n\r\n public componentDidUpdate(prevProps: FiltersViewProps) {\r\n const hasChangesEditingValues = this.props.editingValues !== prevProps.editingValues;\r\n const hasChangesValidations = this.props.validateFilters !== prevProps.validateFilters;\r\n\r\n const shouldValidate = this.props.favouriteDefinition ? hasChangesEditingValues :\r\n (hasChangesValidations || hasChangesEditingValues) && this.props.validateFilters;\r\n\r\n if (shouldValidate) {\r\n this.validateFilters();\r\n }\r\n }\r\n\r\n private validateFilters = () => {\r\n const validationConfig = this.props.filtersDefinition.reduce((memo, f) => {\r\n const validation = createFilterValidation(f.advancedSearchType);\r\n\r\n return validation ? [\r\n ...memo,\r\n validation(f)\r\n ] : memo;\r\n }, []);\r\n\r\n this.props.validate(validationConfig);\r\n }\r\n\r\n private renderDomainFilters = (filter: Filter) => {\r\n const filterConfiguration = createFilterConfigurations(filter.advancedSearchType);\r\n\r\n if (filterConfiguration && filterConfiguration.component) {\r\n const FilterComponent = filterConfiguration.component;\r\n\r\n const filteredValues = this.props.editingValues && createFilteredValues(this.props.editingValues, this.props.validation);\r\n const optionTypeValue = getOptionTypeValue(filter);\r\n const count = getFilterSelectedOptionsLength(filter.id, filteredValues, filterConfiguration.postfix, optionTypeValue);\r\n\r\n return <FilterPanel\r\n key={filter.id + '_filter_panel'}\r\n id={filter.id}\r\n filter={filter}\r\n count={count}\r\n isOpen={filter.isOpen}\r\n translate={this.props.translation}\r\n onFilterMenuOption={this.props.onFilterMenuOption}\r\n onChange={this.props.setOpenState}\r\n onRemove={this.props.onRemove}\r\n added={filter.added}>\r\n <FilterComponent\r\n filterDomain={filter}\r\n initialValue={filter.initialValue}\r\n optionsEndpoint={filterConfiguration.optionsEndpoint && filterConfiguration.optionsEndpoint(filter.domain)}\r\n simpleFormComponent={this.simpleForm}\r\n translation={this.props.translation}\r\n userProfile={this.props.userProfile}\r\n optionsParams={this.getCaseTypeSelectedOptionsIds(filter.domain)}\r\n onFilterOptionType={this.props.onFilterOptionType}\r\n />\r\n </FilterPanel>;\r\n } else {\r\n return <div key={filter.domain}>\r\n <FilterError\r\n label={filter.label}\r\n message={this.props.translation.filters_error_message} />\r\n </div>;\r\n }\r\n }\r\n\r\n private createRows(filters: any) {\r\n const lgBreakpoint = 1200;\r\n const colClasses = this.props.width > lgBreakpoint ? 'col-12 col-xl-4' : 'col-12 col-lg-6';\r\n const cols = this.props.width > lgBreakpoint ? 3 : 2;\r\n const colContainer = [];\r\n\r\n for (let i = 0; i < cols; i++) {\r\n const col = <div key={i} className={colClasses}>\r\n {filters.filter((item, index) => { return index % cols === i; })}\r\n </div>;\r\n colContainer.push(col);\r\n }\r\n\r\n return (\r\n <div className=\"row\">\r\n {colContainer}\r\n </div>\r\n );\r\n }\r\n\r\n public render() {\r\n const { filtersDefinition, translation, options, onAdvancedSearchFields, width, onAddFilters } = this.props;\r\n const filters = filtersDefinition\r\n .filter(filter => filter.advancedSearchType !== 0)\r\n .map(this.renderDomainFilters);\r\n\r\n return (<div className={`${styles.filtersPanel} filters-panel`}>\r\n {width ? this.createRows(filters) : filters}\r\n {!!onAddFilters && <AddFilters\r\n translation={translation}\r\n options={options}\r\n onAddNewFilters={onAddFilters}\r\n onLoadAdvancedSearchFields={onAdvancedSearchFields} />}\r\n </div>);\r\n }\r\n}\r\n","import { FavouriteConnections } from 'app/types-shared';\r\nimport { ConnectionsOperatorTypes } from 'app/components/filters/types';\r\n\r\nexport const mapConnections = (connections: FavouriteConnections[] = []) => {\r\n const mapping = (value: any) => {\r\n return value ? value.map(connection => {\r\n return {\r\n value: connection.connected.v,\r\n description: connection.connected.d\r\n };\r\n }) : [];\r\n };\r\n\r\n return {\r\n include: mapping(connections.filter(c => c.operator.v === ConnectionsOperatorTypes.include)),\r\n exclude: mapping(connections.filter(c => c.operator.v === ConnectionsOperatorTypes.exclude))\r\n };\r\n};\r\n","import { FavouriteConditionValue } from 'app/types-shared';\r\nimport { createInitialDefaultValue } from 'app/components/filters/filters-panel/filter-types/create-initial-default-value';\r\nimport { configuration } from 'app/components/filters/filters-panel/filter-types/configuration';\r\n\r\nexport const mapInitialConditionsValues = (\r\n conditionValues: FavouriteConditionValue[],\r\n advancedSearchType: number,\r\n favouriteConditionValue: FavouriteConditionValue\r\n) => {\r\n\r\n const mapping = configuration\r\n .map(item => item.initialValue)\r\n .filter(item => !!item && item)\r\n .reduce((result, initialValue) => ({\r\n ...result,\r\n ...initialValue(favouriteConditionValue, conditionValues)\r\n }), {});\r\n\r\n return mapping[advancedSearchType] || createInitialDefaultValue(favouriteConditionValue, conditionValues, advancedSearchType);\r\n};\r\n","import { FavouriteCondition, StoreField } from 'app/types-shared';\r\nimport { mapInitialConditionsValues } from './map-conditions-values';\r\n\r\nexport interface ConditionsValues extends StoreField {\r\n type?: string;\r\n}\r\n\r\nexport const mapInitialConditions = (conditions: FavouriteCondition[] = []): ConditionsValues[] => {\r\n const values = conditions && conditions\r\n .map(condition => {\r\n return condition.values && condition.values.length > 0\r\n ? condition.values.map(value => mapInitialConditionsValues(condition.values, condition.advancedSearchType, value))\r\n : [];\r\n })\r\n .reduce((memo, curr) => [...memo, ...curr], []);\r\n\r\n return values && values.length ? values : undefined;\r\n};\r\n","import { FavouriteCondition } from 'app/types-shared';\r\nimport { configuration } from 'app/components/filters/filters-panel/filter-types/configuration';\r\n\r\nexport const mapOptionType = (condition: FavouriteCondition): number => {\r\n\r\n const { advancedSearchType } = condition;\r\n\r\n const mapping = configuration\r\n .map(item => item.optionType)\r\n .filter(item => item)\r\n .reduce((result, optionType) => ({\r\n ...result,\r\n ...optionType(condition)\r\n }), {});\r\n\r\n return mapping[advancedSearchType];\r\n};\r\n","import { ConditionValuesOperator, FilterTypes } from 'app/components/filters/types';\r\nimport { FavouriteCondition } from 'app/types-shared';\r\n\r\nexport const isRangeCondition = (condition: FavouriteCondition) => {\r\n return condition.advancedSearchType === FilterTypes.DecimalNumber &&\r\n !condition.values.some(v => v.operator.v === ConditionValuesOperator.empty) ||\r\n (condition.advancedSearchType === FilterTypes.DateField &&\r\n !condition.values.some(v => v.operator.v === ConditionValuesOperator.empty || !!v.periodPredef.v));\r\n};\r\n\r\nexport const createRangeConditions = (result: FavouriteCondition[][],\r\n condition: FavouriteCondition, remainingConditions: FavouriteCondition[]) => {\r\n const isFirstCondition = condition.values.some(v => v.operator.v === ConditionValuesOperator.largerOrEqual);\r\n const secondConditionOperator = !isFirstCondition\r\n ? ConditionValuesOperator.largerOrEqual\r\n : condition.advancedSearchType === FilterTypes.DecimalNumber\r\n ? ConditionValuesOperator.lessOrEqual\r\n : ConditionValuesOperator.less;\r\n\r\n // Find matching condition on the list or create empty one if none exists\r\n const additionalCondition = remainingConditions\r\n .find(c =>\r\n condition.domain.v === c.domain.v\r\n && condition.advancedSearchType === c.advancedSearchType\r\n && condition.conditionOperator2.v === c.conditionOperator2.v\r\n && condition.exactLevel === c.exactLevel\r\n && c.values.some(v => v.operator && v.operator.v === secondConditionOperator)\r\n && !result.some(groupedConditions => groupedConditions.some(cond => cond === c)))\r\n || {\r\n domain: condition.domain,\r\n advancedSearchType: condition.advancedSearchType,\r\n conditionOperator2: condition.conditionOperator2,\r\n domexactLevelain: condition.exactLevel,\r\n values: [{\r\n operator: {\r\n v: secondConditionOperator\r\n }\r\n }]\r\n } as FavouriteCondition;\r\n\r\n // Group conditions with lower bound first (operator = 'Larger or equal')\r\n return condition.values.some(v => v.operator.v === ConditionValuesOperator.largerOrEqual)\r\n ? [condition, additionalCondition]\r\n : [additionalCondition, condition];\r\n};\r\n","import { FavouriteCondition } from 'app/types-shared';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\n\r\nexport const isMyValueCondition = (condition: FavouriteCondition) => {\r\n return condition.advancedSearchType === FilterTypes.MyLocation\r\n || condition.advancedSearchType === FilterTypes.MyUnit\r\n || condition.advancedSearchType === FilterTypes.Person;\r\n};\r\n\r\nexport const createMyValueConditions = (condition: FavouriteCondition, remainingConditions: FavouriteCondition[]) => {\r\n // Find matching condition on the list\r\n const additionalCondition = remainingConditions\r\n .find(c =>\r\n condition.domain.v === c.domain.v\r\n && condition.advancedSearchType === c.advancedSearchType\r\n && condition.conditionOperator2.v === c.conditionOperator2.v\r\n && condition.exactLevel === c.exactLevel\r\n && condition.values[0].myValue !== c.values[0].myValue);\r\n\r\n return additionalCondition\r\n ? [condition, additionalCondition]\r\n : [condition];\r\n};\r\n","import { FavouriteCondition } from 'app/types-shared';\r\nimport { createRangeConditions, isRangeCondition } from './create-range-conditions';\r\nimport { createMyValueConditions, isMyValueCondition } from './create-my-value-conditions';\r\n\r\n/**\r\n * Groups conditions that represent the same filter (e.g. number or date ranges)\r\n * @param conditions List of conditions from favourite definition\r\n */\r\nexport const groupConditions = (conditions: FavouriteCondition[]) => !!conditions\r\n ? conditions.reduce((result, condition, index) => {\r\n\r\n // Check if list already contatins condidtion to avoid duplicates\r\n if (result.some(groupedConditions => groupedConditions.some(c => c === condition))) {\r\n return result;\r\n }\r\n\r\n const remainingConditions = conditions.slice(index + 1);\r\n\r\n // Range conditions\r\n if (isRangeCondition(condition)) {\r\n return [\r\n ...result,\r\n createRangeConditions(result, condition, remainingConditions)\r\n ];\r\n }\r\n\r\n // My value conditions\r\n if (isMyValueCondition(condition)) {\r\n return [\r\n ...result,\r\n createMyValueConditions(condition, remainingConditions)\r\n ];\r\n }\r\n\r\n // No matching condition found\r\n return [\r\n ...result,\r\n [condition]\r\n ];\r\n }, [] as FavouriteCondition[][])\r\n : [];\r\n","import { FavouriteDefinition, FavouriteCondition, AdvancedSearchTypes } from 'app/types-shared';\r\nimport {\r\n Filter, FilterMenuOptions, FilterMenuOptionsTypes,\r\n ConnectionsOperatorTypes, FilterDomains, FilterDomainNode\r\n} from 'app/components/filters/types';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\nimport { mapConnections } from 'app/area/filters/favourite-definition/map-connections';\r\nimport { mapInitialConditions } from 'app/area/filters/favourite-definition/map-initial-conditions';\r\nimport { mapOptionType } from './map-option-type';\r\nimport { groupConditions } from './group-conditions';\r\n\r\nlet filtersIdCounter = 1;\r\n\r\nconst initialFilter = (filterDomain: number) => {\r\n return {\r\n id: filterDomain + '_' + (filtersIdCounter++),\r\n initialValue: undefined,\r\n conditions: [],\r\n menuOptions: [],\r\n optionType: undefined,\r\n subOptionTypes: [],\r\n isOpen: false\r\n };\r\n};\r\n\r\n/**\r\n * Creates filters options menu based on data from favourite definition condition\r\n * @param condition Condition from favourite definition\r\n */\r\nconst mapMenuOptions = (condition: FavouriteCondition) => [\r\n {\r\n id: 'MainLevel',\r\n option: condition.conditionOperator2 && condition.conditionOperator2.v === ConnectionsOperatorTypes.exclude\r\n ? FilterMenuOptions.Exclude\r\n : FilterMenuOptions.Include,\r\n type: FilterMenuOptionsTypes.MainLevel\r\n },\r\n {\r\n id: 'SubLevel',\r\n option: condition.exactLevel\r\n ? FilterMenuOptions.ExcludeSubLevels\r\n : FilterMenuOptions.IncludeSubLevels,\r\n type: FilterMenuOptionsTypes.SubLevel\r\n }\r\n];\r\n\r\n/**\r\n * Extends the filter with unique id and menuOptions holder\r\n * @param filter\r\n */\r\nexport function mapToFilter(filter: Filter): Filter {\r\n return {\r\n ...filter,\r\n ...initialFilter(filter.domain)\r\n };\r\n}\r\n\r\nexport const advancedField = (advancedSearchTypes: AdvancedSearchTypes[], filterType: FilterTypes) =>\r\n advancedSearchTypes && advancedSearchTypes.find(item => item.id.v === filterType)\r\n || undefined;\r\n\r\n/**\r\n * Creates filters list from favourite definition and filterDomains list\r\n * @param definition\r\n * @param filterDomains\r\n * @param predefinedLabel\r\n */\r\nexport const createFiltersDefinition = (\r\n definition: FavouriteDefinition,\r\n filterDomains: FilterDomainNode[],\r\n advancedSearchTypes: AdvancedSearchTypes[],\r\n predefinedLabel: string): Filter[] => {\r\n\r\n // Creates predefine filter\r\n const predefinedFilter: Filter = {\r\n ...initialFilter(FilterDomains.PredefFilters),\r\n domain: FilterDomains.PredefFilters,\r\n label: predefinedLabel,\r\n advancedSearchType: FilterTypes.PredefFilters,\r\n advancedField: advancedField(advancedSearchTypes, FilterTypes.PredefFilters),\r\n initialValue: !!definition && mapConnections(definition.connections)\r\n };\r\n\r\n // Creates list of empty filters based on filterDomains\r\n const emptyFilters: Filter[] = !!filterDomains\r\n ? filterDomains.map(filterDomain => ({\r\n ...filterDomain,\r\n ...initialFilter(filterDomain.domain),\r\n advancedField: advancedField(advancedSearchTypes, filterDomain.advancedSearchType)\r\n }))\r\n : [];\r\n\r\n // Creates list of filters based on favourite definition\r\n const newFilters: Filter[] = !!definition ?\r\n groupConditions(definition.conditions)\r\n .map(conditions => {\r\n const condition = conditions[0];\r\n return {\r\n ...initialFilter(condition.domain.v),\r\n domain: condition.domain.v,\r\n label: !!condition.domain.ald ? condition.domain.ald : condition.domain.d,\r\n advancedSearchType: condition.advancedSearchType,\r\n initialValue: mapInitialConditions(conditions),\r\n menuOptions: mapMenuOptions(condition),\r\n optionType: mapOptionType(condition),\r\n searchRequired: condition.searchRequired,\r\n advancedField: advancedField(advancedSearchTypes, condition.advancedSearchType),\r\n conditions\r\n } as Filter;\r\n })\r\n : [];\r\n\r\n // Replaces empty filters with the one created based on favourite for the same domain\r\n const condidtionFilters = [...emptyFilters, ...newFilters].reduce((memo, filter) => {\r\n const placeholderIndex = memo.findIndex(f => f.domain === filter.domain && !f.initialValue);\r\n\r\n if (placeholderIndex !== -1) {\r\n memo.splice(placeholderIndex, 1, filter);\r\n return memo;\r\n }\r\n return [...memo, filter];\r\n }, [] as Filter[]);\r\n\r\n return [\r\n predefinedFilter,\r\n ...condidtionFilters\r\n ];\r\n};\r\n","import { Filter, FiltersState } from 'app/components/filters/types';\r\nimport { FavouriteCondition } from 'app/types-shared';\r\nimport { configuration } from 'app/components/filters/filters-panel/filter-types/configuration';\r\nimport { EditingValues } from 'app/components/filters/filters-panel/types';\r\n\r\nexport interface FilterMappingType {\r\n [key: string]: (filter: Filter) => FavouriteCondition[];\r\n}\r\n\r\nexport const updateFilterConditions = (\r\n state: FiltersState,\r\n editingValues: EditingValues,\r\n templateConditions: FavouriteCondition[]\r\n): FavouriteCondition[] => {\r\n\r\n const filterMapping: FilterMappingType = configuration\r\n .map(item => item.mapper)\r\n .filter(item => item && item)\r\n .reduce((result, mapper: any) => ({\r\n ...result,\r\n ...mapper(editingValues)\r\n }), {});\r\n\r\n const orderedFilters = state.currentList\r\n .map(filter => filterMapping[filter.advancedSearchType] && filterMapping[filter.advancedSearchType](filter))\r\n .reduce((memo, f) => f ? [...memo, ...f] : memo, [])\r\n .filter(f => f && f.values && f.values.length > 0);\r\n\r\n return [\r\n ...templateConditions.filter(c => !state.currentList.some(f => f.domain === c.domain.v)),\r\n ...orderedFilters\r\n ].map((item, index) => { return { ...item, id: index + 1 }; });\r\n};\r\n","import * as React from 'react';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { STATE } from 'app/constants';\r\nimport { FilterMenuOptions, FilterMenuOptionsTypes, FiltersState, Filter, FilterDomains } from 'app/components/filters/types';\r\nimport { filtersTranslations } from './constants';\r\nimport { SimpleFormAreaState, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { valuesSelector } from 'app/infrastructure/simple-form/selectors';\r\nimport { FiltersPanel } from 'app/components/filters/filters-panel/filters-panel';\r\nimport { withSimpleForm } from 'app/infrastructure/simple-form/with-simple-form';\r\nimport { mapToAdvancedSearchOptions } from './filters-mapping';\r\nimport { mapConnections } from 'app/components/filters/filters-panel/map-to-connections';\r\nimport { createFiltersDefinition, mapToFilter, advancedField } from './favourite-definition/map-to-filters';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\nimport { updateFilterConditions } from 'app/components/filters/filters-panel/conditions/update-filter-conditions';\r\nimport { ButtonInline } from 'ui';\r\n\r\nimport styles from './filters.scss';\r\n\r\nexport interface FiltersProps {\r\n simpleForm?: SimpleFormAreaState;\r\n definition: FavouriteDefinition;\r\n\r\n updateDefinition: (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => void;\r\n}\r\n\r\nexport type FiltersContainerProps = FiltersProps & FiltersState & DefaultContainerProps & typeof actionCreators & SimpleFormProps;\r\n\r\nexport class FiltersContainerComponent extends React.Component<FiltersContainerProps, void> {\r\n public static statePath: string = STATE.filters;\r\n\r\n public componentDidMount() {\r\n this.props.loadFilters();\r\n this.props.loadAdvancedSearchTypes();\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearAll();\r\n }\r\n\r\n public componentDidUpdate(prevProps: FiltersContainerProps) {\r\n\r\n const { definition, currentList, simpleForm, filterDomains, translation, advancedSearchTypes } = this.props;\r\n\r\n if (!definition || !filterDomains || !filterDomains.length || !advancedSearchTypes || !advancedSearchTypes.length) {\r\n return;\r\n }\r\n\r\n /**\r\n * Rebuilds filter list when new definition is fetched from server\r\n */\r\n if (definition !== prevProps.definition ||\r\n prevProps.filterDomains !== filterDomains ||\r\n prevProps.advancedSearchTypes !== advancedSearchTypes) {\r\n\r\n this.props.updateFilters(createFiltersDefinition(definition,\r\n filterDomains, advancedSearchTypes, translation.filters_predefined_filters));\r\n }\r\n\r\n /**\r\n * Executes update, when filters are changed\r\n */\r\n if (simpleForm.editing.values &&\r\n (currentList !== prevProps.currentList || simpleForm.editing.values !== prevProps.simpleForm.editing.values)) {\r\n\r\n const editingValues = simpleForm.editing.values;\r\n\r\n const transform = (workingDefinition: FavouriteDefinition) => {\r\n\r\n const conditions = updateFilterConditions(this.props, editingValues, workingDefinition.conditions) || [];\r\n\r\n const predefinedFilter = currentList.find(item => item.domain === FilterDomains.PredefFilters);\r\n const connections = predefinedFilter ? mapConnections(this.props, editingValues, workingDefinition.connections) :\r\n workingDefinition.connections;\r\n\r\n return {\r\n ...workingDefinition,\r\n conditions,\r\n connections\r\n };\r\n };\r\n\r\n this.props.updateDefinition(transform);\r\n }\r\n }\r\n\r\n private onFilterMenuOption = (id: string, option: FilterMenuOptions, type: FilterMenuOptionsTypes) => {\r\n this.props.setFilterOption({ id, option, type }, FilterOptionType.MENU_OPTION);\r\n }\r\n\r\n private onRemoveFilters = (id: string) => {\r\n const ids = Object.keys(valuesSelector(this.props.simpleForm))\r\n .filter(element => element.indexOf(id) === 0);\r\n\r\n this.props.clearFilterOptions(id);\r\n this.props.clearValues(ids);\r\n }\r\n\r\n private clear = () => {\r\n const ids = Object.keys(valuesSelector(this.props.simpleForm));\r\n\r\n this.props.clearAllFilterOptions();\r\n this.props.clearValues(ids);\r\n }\r\n\r\n private onAddFilters = (newFilters: Filter[]) => {\r\n this.props.updateFilters([\r\n ...this.props.currentList,\r\n ...newFilters.map(filter => ({\r\n ...mapToFilter(filter),\r\n advancedField: advancedField(this.props.advancedSearchTypes, filter.advancedSearchType)\r\n }))\r\n ]);\r\n }\r\n\r\n public render() {\r\n const userProfile = {\r\n id: this.props.sharedState.id,\r\n name: this.props.sharedState.name,\r\n unit: this.props.sharedState.unit,\r\n location: this.props.sharedState.location\r\n };\r\n\r\n const { definition, translation, currentList, advancedSearchFields,\r\n loadAdvancedSearchFields, simpleForm, validate, validation, children } = this.props;\r\n\r\n return currentList && currentList.length > 0 ?\r\n <>\r\n <div className={styles.informationPanel}>\r\n {children}\r\n <div>\r\n <ButtonInline onClick={this.clear}>{translation.clear_filters}</ButtonInline>\r\n </div>\r\n </div>\r\n <FiltersPanel\r\n favouriteDefinition={definition}\r\n translation={translation}\r\n userProfile={userProfile}\r\n options={mapToAdvancedSearchOptions(advancedSearchFields)}\r\n validate={validate}\r\n onRemove={this.onRemoveFilters}\r\n editingValues={simpleForm.editing.values}\r\n filtersDefinition={currentList}\r\n onAdvancedSearchFields={loadAdvancedSearchFields}\r\n onAddFilters={this.onAddFilters}\r\n onFilterMenuOption={this.onFilterMenuOption}\r\n onFilterOptionType={this.props.setFilterOption}\r\n validation={validation}\r\n setOpenState={this.props.setFilterOpenState}\r\n />\r\n </>\r\n : null;\r\n }\r\n}\r\n\r\nconst container = containerFactory<FiltersProps>(withSimpleForm(FiltersContainerComponent), actionCreators, undefined, filtersTranslations);\r\n\r\nexport { container as FiltersContainer };\r\n","import { FilterDomains, FiltersState, ConnectionsOperatorTypes } from 'app/components/filters/types';\r\nimport { postfixOperator } from 'app/components/filters/filters-panel/constants';\r\nimport { EditingValues } from 'app/components/filters/filters-panel/types';\r\nimport { FavouriteConnections } from 'app/types-shared';\r\n\r\nexport function mapConnections(filters: FiltersState,\r\n editingValues: EditingValues,\r\n templateConnections: FavouriteConnections[]\r\n): FavouriteConnections[] {\r\n const predefinedFilter = filters.currentList.find(item => item.domain === FilterDomains.PredefFilters);\r\n\r\n const predefinedFilterId = predefinedFilter && predefinedFilter.id;\r\n const predefinedFilterInclude = predefinedFilterId && (predefinedFilterId + postfixOperator.include);\r\n const predefinedFilterExclude = predefinedFilterId && (predefinedFilterId + postfixOperator.exclude);\r\n\r\n const editingValuesInclude = editingValues && predefinedFilterInclude && editingValues[predefinedFilterInclude];\r\n const editingValuesExclude = editingValues && predefinedFilterExclude && editingValues[predefinedFilterExclude];\r\n\r\n const includeValues = (editingValuesInclude && editingValuesInclude.value) || [];\r\n const excludeValues = (editingValuesExclude && editingValuesExclude.value) || [];\r\n\r\n return [\r\n ...templateConnections.filter(c =>\r\n c.operator.v !== ConnectionsOperatorTypes.include && c.operator.v !== ConnectionsOperatorTypes.exclude),\r\n\r\n ...(includeValues.map(item => ({\r\n connected: { v: item.value },\r\n operator: { v: ConnectionsOperatorTypes.include }\r\n }))),\r\n\r\n ...(excludeValues.map(item => ({\r\n connected: { v: item.value },\r\n operator: { v: ConnectionsOperatorTypes.exclude }\r\n })))\r\n ];\r\n}\r\n","import * as React from 'react';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { STATE } from 'app/constants';\r\nimport { FiltersState } from 'app/components/filters/types';\r\nimport { SimpleFormAreaState } from 'app/infrastructure/simple-form/types';\r\nimport { mapToFilterList } from './filters-mapping';\r\nimport { mapToDisplaySelectedOptions } from './mapping';\r\nimport { filtersTranslations } from './constants';\r\nimport { withSimpleForm } from 'app/infrastructure/simple-form';\r\nimport { createFilteredValues } from 'app/area/filters/filters-mapping';\r\nimport { DisplaySelectedOptions, OptionItem } from 'app/components/display-selected-options/display-selected-options';\r\nimport { DrawerWithBar } from 'ui';\r\nimport { FiltersContainer } from 'app/area/filters/filters';\r\n\r\nexport interface FiltersDrawerProps {\r\n simpleForm?: SimpleFormAreaState;\r\n validation?: { [key: string]: any };\r\n title?: string;\r\n definition: FavouriteDefinition;\r\n hideDisclaimerMessage?: boolean;\r\n initiallyOpen?: boolean;\r\n updateDefinition: (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => void;\r\n}\r\n\r\nexport type FiltersDrawerContainerProps = FiltersDrawerProps & FiltersState & DefaultContainerProps;\r\n\r\nexport class FiltersDrawerContainerComponent extends React.Component<FiltersDrawerContainerProps, {}> {\r\n public static statePath: string = STATE.filters;\r\n\r\n public render() {\r\n\r\n const { currentList, simpleForm, translation, sharedState, validation, children, updateDefinition, title, initiallyOpen } = this.props;\r\n\r\n const values = simpleForm.editing.values;\r\n\r\n const filteredValues = values && createFilteredValues(values, validation);\r\n\r\n const filterList = mapToFilterList(\r\n currentList,\r\n filteredValues,\r\n translation,\r\n sharedState.locale\r\n );\r\n\r\n const dropdownOptions: OptionItem[] = mapToDisplaySelectedOptions(filterList, translation);\r\n\r\n const summary = <DisplaySelectedOptions\r\n selectedOptions={dropdownOptions}\r\n textHideDetails={translation.hide_details}\r\n textShowDetails={translation.show_details}\r\n />;\r\n\r\n const drawerContent = <FiltersContainer\r\n definition={this.props.definition}\r\n updateDefinition={updateDefinition}>\r\n {!this.props.hideDisclaimerMessage && this.props.translation.disclaimer_message}\r\n </FiltersContainer>;\r\n\r\n const filterCountInidicator = dropdownOptions.length ? ` (${dropdownOptions.length})` : '';\r\n\r\n return <DrawerWithBar\r\n title={`${title}${filterCountInidicator}`}\r\n barContent={summary}\r\n drawerContent={drawerContent}\r\n initiallyOpen={initiallyOpen}>\r\n {children}\r\n </DrawerWithBar>;\r\n\r\n }\r\n}\r\n\r\nconst container = containerFactory<FiltersDrawerProps>(withSimpleForm(FiltersDrawerContainerComponent),\r\n undefined, undefined, filtersTranslations);\r\n\r\nexport { container as FiltersDrawer };\r\n","export const savedReportTranslation = {\r\n overlay_text: 7486,\r\n submit: 7779,\r\n cancel: 3273,\r\n create_folder_button: 7786,\r\n create_folder_link: 7787,\r\n create_report_input_placeholder: 7788,\r\n copy: 7842,\r\n search_placeholder: 7557,\r\n link_to_report: 7781,\r\n share_with: 7784,\r\n title: 7775,\r\n users: 3650,\r\n user_group: 7843,\r\n owner: 6439,\r\n folder: 7841,\r\n report_title: 7778,\r\n succes_message_report: 7818,\r\n succes_message_folder: 7819,\r\n validation_error: 7702,\r\n no_options_found: 7644,\r\n must_be_filled: 7551,\r\n link_copy_success: 7826,\r\n link_copy_fail: 7825,\r\n done: 7338,\r\n copy_to_clipboard: 6438,\r\n saved_reports_title: 7827,\r\n back: 7518,\r\n move_report: 8200,\r\n move_folder: 8204,\r\n remove_report: 8160,\r\n confirm_remove: 8161,\r\n success_remove_report: 8162,\r\n remove_folder: 8165,\r\n confirm_remove_folder: 8166,\r\n search_required_message: 8146,\r\n update_report_title: 8322,\r\n update_report_button: 8323,\r\n edit_report: 8329,\r\n shared_report: 8358,\r\n shared_report_group: 8357,\r\n update_report_are_you_sure: 8324,\r\n update_report_other_users: 8335,\r\n update_report_not_undone: 8336,\r\n success_report_updated: 8334,\r\n shared: 8359,\r\n edit_folder: 8367,\r\n folder_title: 8368,\r\n save_folder: 8369,\r\n shared_folder_group: 8370,\r\n shared_folder_user: 8371,\r\n folder_updated: 8372,\r\n update_owners: 8373,\r\n share_contents: 8374,\r\n copy_sharing: 8375\r\n};\r\n\r\nexport const form = {\r\n title: 'title',\r\n folder: 'folder',\r\n owner: 'owner',\r\n user_group: 'user_group',\r\n users: 'users',\r\n link_to_report: 'link_to_report',\r\n create_folder_input: 'create_folder_input'\r\n};\r\n\r\nexport const formFolder = {\r\n title: 'title',\r\n folder: 'folder',\r\n owner: 'owner',\r\n user_group: 'user_group',\r\n users: 'users',\r\n link_to_report: 'link_to_report',\r\n create_folder_input: 'create_folder_input',\r\n updateOwner: 'updateOwnerForAllDescendants',\r\n updateSharing: 'updateShareInformationForAllDescendants'\r\n};\r\n\r\nexport const endpoint = {\r\n saveReport: 'favourite/definition',\r\n saveFolder: 'favourite/definition/folder',\r\n updateFolder: (folderId) => `favourite/definition/folder/${folderId}`,\r\n removeReport: (reportId) => `favourite/definition/${reportId}`,\r\n moveReport: (reportId:number) => `favourite/definition/${reportId}/parent`,\r\n loadOwnerOptions: 'favourite/definition/draft/options/owner',\r\n loadUsersOptions: 'favourite/definition/draft/options/users',\r\n loadUserGroupsOptions: 'favourite/definition/draft/options/userGroups',\r\n loadFolderOptions: 'user/current/options/folders',\r\n loadSavedReports: 'user/current/options/savedFavourites'\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from './constants';\r\nimport { ApiResponse } from 'app/types-shared';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport { NewFolderData, MoveReportData } from 'app/area/saved-reports/types';\r\n\r\nexport const api = {\r\n saveReport: async (data: any): Promise<any> => {\r\n const response = await new RemoteData(endpoint.saveReport).resource<any>().create(data, false);\r\n\r\n return await response;\r\n },\r\n loadSavedReports: async (): Promise<any> => {\r\n const response = await new RemoteData(endpoint.loadSavedReports)\r\n .resource<ApiResponse<CodetableWireFormat[]>>()\r\n .all();\r\n return response.data;\r\n },\r\n removeReport: async (id:number, unshare?:boolean): Promise<any> => {\r\n await new RemoteData(endpoint.removeReport(id))\r\n .resource<void>()\r\n .filter({unshare: unshare})\r\n .httpDelete({});\r\n },\r\n saveFolder: async (data: NewFolderData): Promise<any> => {\r\n const response = await new RemoteData(endpoint.saveFolder).resource<any>().create(data, false);\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n updateFolder: async (data: any, folderId:number): Promise<any> => {\r\n const response = await new RemoteData(endpoint.updateFolder(folderId))\r\n .resource<any>()\r\n .save(data);\r\n\r\n return await response;\r\n },\r\n moveReport: async (id:number, data:MoveReportData): Promise<any> => {\r\n await new RemoteData(endpoint.moveReport(id))\r\n .resource<void>()\r\n .save(data);\r\n }\r\n\r\n};\r\n","export const mapCreateReport = (favouriteId: number, serializedFormData: any, updateExisting:boolean = false) => {\r\n return {\r\n draft: favouriteId,\r\n description: serializedFormData.title,\r\n UpdateExistingValidFavourite: updateExisting,\r\n ...(serializedFormData.owner.hasOwnProperty('v') && {\r\n owner: serializedFormData.owner.v\r\n }),\r\n ...(serializedFormData.users && {\r\n sharedUsers: serializedFormData.users.map(item => item.value)\r\n }),\r\n ...(serializedFormData.user_group && {\r\n sharedUserGroups: serializedFormData.user_group.map(item => item.value)\r\n }),\r\n ...(serializedFormData.folder.hasOwnProperty('v') && {\r\n folder: serializedFormData.folder.v\r\n })\r\n };\r\n};\r\n\r\nexport const mapUpdateFolder = (serializedFormData: any) => {\r\n return {\r\n name: serializedFormData.title,\r\n ...(serializedFormData.owner.hasOwnProperty('v') && {\r\n owner: serializedFormData.owner.v\r\n }),\r\n ...(serializedFormData.users && {\r\n sharedUsers: serializedFormData.users.map(item => item.value)\r\n }),\r\n ...(serializedFormData.user_group && {\r\n sharedUserGroups: serializedFormData.user_group.map(item => item.value)\r\n }),\r\n ...(serializedFormData.folder.hasOwnProperty('v') && {\r\n parentFolder: serializedFormData.folder.v\r\n }),\r\n updateOwnerForAllDescendants: !!serializedFormData.updateOwnerForAllDescendants,\r\n updateShareInformationForAllDescendants: !!serializedFormData.updateShareInformationForAllDescendants\r\n };\r\n};\r\n","import { Value } from 'app/types-shared';\r\n\r\nexport enum SavedReportsTypes {\r\n FOLDER = 3\r\n}\r\n\r\nexport interface SavedReportsValue extends Value {\r\n children?: Value[];\r\n}\r\n\r\nexport const ensureEmptyFoldersHaveChildrenProp = (values: SavedReportsValue[]) => {\r\n const newValues = [];\r\n\r\n values.forEach(value => {\r\n if (value.children || value.c === SavedReportsTypes.FOLDER) {\r\n const children = value.children || [];\r\n\r\n newValues.push({ ...value, children: ensureEmptyFoldersHaveChildrenProp(children) });\r\n } else {\r\n newValues.push(value);\r\n }\r\n });\r\n\r\n return newValues;\r\n};\r\n","import * as actions from './action-types';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from '../../infrastructure/redux';\r\nimport { api } from './api';\r\nimport { api as favouriteApi } from '../favourite/api';\r\nimport { ErrorNotification } from '../../infrastructure/notifications/user-messages';\r\nimport { SavedReportState } from './types';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/index';\r\nimport { savedReportTranslation, form } from 'app/area/saved-reports/constants';\r\nimport { SuccessNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { mapCreateReport, mapUpdateFolder } from 'app/area/saved-reports/actions.mapper';\r\nimport { NewFolderData } from 'app/area/saved-reports/types';\r\nimport * as routerActions from 'app/area/shared/navigation';\r\nimport { routeConstants } from '../../routes/route-constants';\r\nimport { ValueChange } from 'app/infrastructure/simple-form/action-types';\r\nimport { ensureEmptyFoldersHaveChildrenProp } from 'app/area/saved-reports/create-saved-reports';\r\nimport { STATE } from 'app/constants';\r\nimport { replaceTemplateString, insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\nimport { FormWireData } from 'app/infrastructure/simple-form/types';\r\nimport { Value } from 'app/types-shared';\r\n\r\nexport const actionCreators = {\r\n saveReport: (serializedFormData: FormWireData, favouriteId: number,\r\n updateExisting:boolean, redirectId?: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestExecuteReport());\r\n\r\n const savedReportState = getState().savedReport as SavedReportState;\r\n const translate = createDescriptionSelector(savedReportState.texts);\r\n\r\n try {\r\n const result = await api.saveReport(mapCreateReport(favouriteId, serializedFormData, updateExisting));\r\n\r\n if (result && result.status === 200) {\r\n dispatch(new SuccessNotification(updateExisting ?\r\n translate(savedReportTranslation.success_report_updated) :\r\n translate(savedReportTranslation.succes_message_report)\r\n ));\r\n dispatch(actionCreators.clearAll());\r\n routerActions.replace(routeConstants.savedReportFor(redirectId || favouriteId));\r\n }\r\n\r\n } catch (err) {\r\n dispatch(new actions.RequestFailed());\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n }\r\n },\r\n saveFolderFavourite: (serializedFormData: FormWireData, favouriteId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestReports());\r\n const savedReportState = getState().savedReport as SavedReportState;\r\n const translate = createDescriptionSelector(savedReportState.texts);\r\n\r\n try {\r\n await api.updateFolder(mapUpdateFolder(serializedFormData), favouriteId);\r\n\r\n dispatch(new SuccessNotification(\r\n translate(savedReportTranslation.folder_updated)\r\n ));\r\n } catch (err) {\r\n dispatch(new actions.RequestFailed());\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n }\r\n\r\n const reports = await api.loadSavedReports();\r\n dispatch(new actions.ReceiveReports(ensureEmptyFoldersHaveChildrenProp(reports.rootCodes)));\r\n },\r\n removeReport: (id:number, title:string, unshare:boolean = false): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestReports());\r\n try {\r\n await api.removeReport(id, unshare);\r\n const savedReportState = getState().savedReport as SavedReportState;\r\n const translate = createDescriptionSelector(savedReportState.texts);\r\n dispatch(new SuccessNotification(\r\n insertOptionalWordbreaks(replaceTemplateString(translate(savedReportTranslation.success_remove_report),title))\r\n ));\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n }\r\n const reports = await api.loadSavedReports();\r\n dispatch(new actions.ReceiveReports(ensureEmptyFoldersHaveChildrenProp(reports.rootCodes)));\r\n }),\r\n loadFolderData: (id:number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch:any, getState:any) => {\r\n dispatch(new actions.RequestFolderFavourite());\r\n const data = await favouriteApi.loadFavouriteDefinition(id);\r\n dispatch(new actions.ReceiveFolderFavourite(data));\r\n }),\r\n clearFolderData: (): ActionDispatching<any, any> =>\r\n errorSafe((dispatch:any) => {\r\n dispatch(new actions.ClearFolderData());\r\n }),\r\n copySharingInformation: (): ActionDispatching<any, any> =>\r\n errorSafe((dispatch:any, getState: any) => {\r\n const savedReportState = getState().savedReport as SavedReportState;\r\n\r\n const update = (id: string, values: Value[]) => {\r\n const newValue = values && values.map(item => ({value: item.v, description: item.d}));\r\n dispatch(new ValueChange(STATE.savedReport, id, newValue));\r\n };\r\n\r\n const validState = savedReportState.folderDefinition && savedReportState.folderDefinition.validState;\r\n if(validState) {\r\n update(form.user_group, validState.sharedWithUserGroups);\r\n update(form.users, validState.sharedWithUsers);\r\n }\r\n }),\r\n loadSavedReports: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestReports());\r\n const reports = await api.loadSavedReports();\r\n dispatch(new actions.ReceiveReports(ensureEmptyFoldersHaveChildrenProp(reports.rootCodes)));\r\n }),\r\n saveFolder: (data: NewFolderData): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestNewFolder());\r\n\r\n const savedReportState = getState().savedReport as SavedReportState;\r\n const translate = createDescriptionSelector(savedReportState.texts);\r\n\r\n try {\r\n const result = await api.saveFolder(data);\r\n if (result) {\r\n dispatch(new ValueChange(STATE.savedReport, form.folder, {\r\n value: result,\r\n description: data.name\r\n }));\r\n dispatch(new SuccessNotification(translate(savedReportTranslation.succes_message_folder)));\r\n }\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n }\r\n\r\n dispatch(new actions.ClearNewFolder());\r\n },\r\n moveReport: (reportId:number, parentId?:number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestReports());\r\n try{\r\n await api.moveReport(reportId, {\r\n parentFolder: parentId\r\n });\r\n } catch(err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n }\r\n const reports = await api.loadSavedReports();\r\n dispatch(new actions.ReceiveReports(ensureEmptyFoldersHaveChildrenProp(reports.rootCodes)));\r\n }),\r\n\r\n copyLinkNotification: (isSuccess: boolean): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const savedReportState = getState().savedReport as SavedReportState;\r\n const translate = createDescriptionSelector(savedReportState.texts);\r\n\r\n isSuccess ? dispatch(new SuccessNotification(translate(savedReportTranslation.link_copy_success)))\r\n : dispatch(new ErrorNotification(translate(savedReportTranslation.link_copy_fail)));\r\n }),\r\n\r\n clearAll: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearAll());\r\n })\r\n};\r\n","import * as React from 'react';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport { ButtonSecondary, ElementLoader } from 'ui';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/';\r\nimport { SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { simpleFieldForPath, SimpleFormValidationConfig } from 'app/infrastructure/simple-form';\r\nimport { STATE } from 'app/constants';\r\nimport { form } from 'app/area/saved-reports/constants';\r\nimport { requiredValidation } from 'app/infrastructure/simple-form/validation/rules';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { CreateFolderProps } from 'app/area/saved-reports/types';\r\nimport styles from './create-folder.scss';\r\n\r\nexport interface CreateFolderState {\r\n isOpen: boolean;\r\n}\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.savedReport);\r\n\r\nexport class CreateFolder extends React.Component<CreateFolderProps, CreateFolderState> {\r\n private keyMap: any;\r\n private handlers: any;\r\n\r\n constructor(props: CreateFolderProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isOpen: false\r\n };\r\n\r\n this.keyMap = {\r\n onClose: [keyCodeTypes.Esc]\r\n };\r\n\r\n this.handlers = {\r\n onClose: this.onToggle\r\n };\r\n }\r\n\r\n private validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.create_folder_input)\r\n ];\r\n\r\n private onCreate = () => {\r\n const { validate, translation, formValues } = this.props;\r\n const selectedFolder = this.props.formValues[form.folder];\r\n\r\n validate(this.validationConfig, () => {\r\n this.props.saveFolder({\r\n name: formValues[form.create_folder_input],\r\n ...(selectedFolder && selectedFolder.value && {\r\n parentFolder: formValues[form.folder].value\r\n })\r\n });\r\n this.onToggle();\r\n }, translation.validation_error);\r\n }\r\n\r\n private onToggle = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n } as CreateFolderState);\r\n }\r\n\r\n public render() {\r\n const { translation, fetching, className } = this.props;\r\n\r\n return <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n {!this.state.isOpen && !fetching && <button className={styles.link} onClick={this.onToggle}>\r\n + {translation.create_folder_link}\r\n </button>}\r\n {this.state.isOpen && !fetching && <div>\r\n <div className={`${styles.wrapper} ${className || ''}`}>\r\n <div className={`${styles.input}`}>\r\n <SimpleForm\r\n name={form.create_folder_input}\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.create_folder_link }}\r\n placeholder={translation.create_report_input_placeholder}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n initialValue={''} />\r\n </div>\r\n <div className={`${styles.button}`}>\r\n <ButtonSecondary onClick={this.onCreate}>\r\n {translation.create_folder_button}\r\n </ButtonSecondary>\r\n </div>\r\n </div>\r\n </div>}\r\n {fetching && <div className={styles.loader}>\r\n {<ElementLoader />}\r\n </div>}\r\n </HotKeys>;\r\n }\r\n}\r\n","export const shouldClear = (props, nextProps) => !nextProps.error && nextProps.fetching !== props.fetching && nextProps.fetching === false;\r\n","import * as React from 'react';\r\nimport { ButtonSecondary } from 'ui';\r\nimport { CopyLinkProps } from 'app/area/saved-reports/types';\r\nimport { copyToClipboard } from 'app/infrastructure/platform/browser';\r\nimport styles from './copy-link.scss';\r\n\r\nexport const CopyLink = (props: CopyLinkProps) => {\r\n const { translation, initialValue, notification } = props;\r\n\r\n const onClick = () => {\r\n const copyStatus = copyToClipboard(initialValue);\r\n if(notification) {\r\n notification(copyStatus);\r\n }\r\n };\r\n\r\n return <div className=\"form-group\">\r\n <div className=\"control-label\">{translation.link_to_report}</div>\r\n <div className={`input-wrapper ${styles.box}`}>\r\n <div className={`${styles.input}`}>\r\n {initialValue}\r\n </div>\r\n <div className={`${styles.button}`}>\r\n <ButtonSecondary onClick={onClick}>\r\n {translation.copy}\r\n </ButtonSecondary>\r\n </div>\r\n </div>\r\n </div>;\r\n};\r\n","import { AppSetting } from 'dependencies/appsettings';\r\nimport { routeName } from 'app/routes/route-constants';\r\n\r\nexport const generateCopyLink = (favouriteId: number) => {\r\n const appUrl = AppSetting.ApplicationUrl;\r\n const endsWithSlash = appUrl.charAt(appUrl.length -1) === '/';\r\n\r\n return (endsWithSlash ? appUrl : appUrl + '/') + routeName.Favourite + '/' + favouriteId;\r\n};\r\n","import * as React from 'react';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { actionCreators } from './actions';\r\nimport { STATE } from 'app/constants';\r\nimport { SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { CreateFolder } from './create-folder/create-folder';\r\nimport { savedReportTranslation, endpoint } from './constants';\r\nimport { FIELD_TYPE, simpleFieldForPath, SimpleFormValidationConfig, withSimpleForm }\r\n from 'app/infrastructure/simple-form';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { shouldClear } from './selectors';\r\nimport { form } from './constants';\r\nimport { CopyLink } from './copy-link/copy-link';\r\nimport { requiredValidation } from 'app/infrastructure/simple-form/validation/rules';\r\nimport { CreateReportProps, CreateReportState } from 'app/area/saved-reports/types';\r\nimport styles from './create-report.scss';\r\nimport { ButtonCallToAction, ButtonTertiary, ButtonSecondary, PromptConfirmation } from 'ui';\r\nimport { generateCopyLink } from 'app/area/saved-reports/generate-copy-link';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport get from 'lodash/get';\r\n\r\ntype CreateReportComponentProps = DefaultContainerProps & CreateReportProps & typeof actionCreators\r\n & DefaultContainerProps & SimpleFormProps;\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.savedReport);\r\n\r\nclass CreateReportComponent extends React.Component<CreateReportComponentProps, CreateReportState> {\r\n\r\n public static statePath: string = STATE.savedReport;\r\n public state: Readonly<CreateReportState> = {\r\n confirmSave: false\r\n };\r\n\r\n public componentDidUpdate(prevProps: CreateReportComponentProps) {\r\n if (shouldClear(prevProps, this.props)) {\r\n this.onCancel();\r\n }\r\n if (get(prevProps, 'formValues.folder.value') !== get(this.props, 'formValues.folder.value')) {\r\n this.props.clearFolderData();\r\n if(!!get(this.props, 'formValues.folder.value')) {\r\n this.props.loadFolderData(get(this.props, 'formValues.folder.value'));\r\n }\r\n }\r\n }\r\n\r\n private validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.title)\r\n ];\r\n\r\n private onSubmit = () => {\r\n const { validate, serialize, saveReport, definition, translation } = this.props;\r\n const favouriteId = definition.favourite.v;\r\n const originalFavouritId = get(definition, 'validState.validFavourite.v');\r\n\r\n validate(this.validationConfig, () =>\r\n saveReport(\r\n serialize(defaultSerializeMappings),\r\n favouriteId,\r\n this.props.updateReport,\r\n this.props.updateReport ? originalFavouritId : null\r\n ),\r\n translation.validation_error);\r\n }\r\n\r\n private onCancel = () => {\r\n this.props.closeReportCreator();\r\n this.props.clearAll();\r\n }\r\n\r\n private onGetUpdateConfirmation = () => {\r\n this.setState({confirmSave: true});\r\n }\r\n\r\n private onCancelUpdate = () => {\r\n this.setState({confirmSave: false});\r\n }\r\n\r\n private onCopySharing = () => {\r\n this.props.copySharingInformation();\r\n }\r\n\r\n private renderFields = () => {\r\n const { definition, sharedState, translation, fetchingCreateFolder, updateReport, ...rest } = this.props;\r\n const validState = definition.validState;\r\n\r\n const copyFolderSharing = this.props.folderDefinition && get(this.props, 'formValues.folder.value') &&\r\n (!!get(this.props.folderDefinition, 'validState.sharedWithUserGroups[0]') || !!get(this.props.folderDefinition, 'validState.sharedWithUsers[0]'));\r\n\r\n return <div>\r\n <div className=\"page-heading\">\r\n <h1>{updateReport ? translation.update_report_title : translation.title}</h1>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={form.title}\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.report_title, required: true }}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n initialValue={updateReport ? definition.favourite.d : ''} />\r\n </div>\r\n <div className={`${styles.createFolder} col-lg-4`}>\r\n <SimpleForm\r\n name={form.folder}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadFolderOptions}\r\n label={{ text: translation.folder }}\r\n initialValue={updateReport && validState.parentFavourite ? codeItemToStoreValue(validState.parentFavourite) : ''}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.V_VALUE }} />\r\n <CreateFolder\r\n {...rest}\r\n translation={translation}\r\n fetching={fetchingCreateFolder} />\r\n </div>\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={form.owner}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadOwnerOptions}\r\n label={{ text: translation.owner }}\r\n initialValue={{ value: sharedState.id, description: sharedState.name }}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.V_VALUE }} />\r\n </div>\r\n </div>\r\n\r\n <h3>{translation.share_with}</h3>\r\n <hr />\r\n\r\n <div className=\"row\">\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={form.user_group}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadUserGroupsOptions}\r\n label={{ text: translation.user_group }}\r\n initialValue={updateReport && validState.sharedWithUserGroups ? validState.sharedWithUserGroups.map(codeItemToStoreValue) : ''}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />\r\n\r\n <ButtonSecondary disabled={!copyFolderSharing} onClick={this.onCopySharing}>\r\n {translation.copy_sharing}\r\n </ButtonSecondary>\r\n </div>\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={form.users}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadUsersOptions}\r\n label={{ text: translation.users }}\r\n initialValue={updateReport && validState.sharedWithUsers ? validState.sharedWithUsers.map(codeItemToStoreValue) : ''}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n searchRequired={this.props.searchRequiredUsers}/>\r\n </div>\r\n <div className=\"col-lg-4 col-sm-12\">\r\n <CopyLink\r\n translation={translation}\r\n initialValue={!updateReport ?\r\n generateCopyLink(definition.favourite.v) :\r\n generateCopyLink(definition.validState.validFavourite.v)}\r\n value={this.props.formValues[form.link_to_report] as string}\r\n notification={this.props.copyLinkNotification} />\r\n </div>\r\n </div>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n const { translation, fetching, updateReport, definition } = this.props;\r\n const { confirmSave } = this.state;\r\n\r\n const validFavourite = get(definition, 'validState.validFavourite', {});\r\n\r\n const confirmSaveMessage = <>\r\n {translation.update_report_are_you_sure}\r\n <span className={styles.originalId}>{validFavourite.v} - {validFavourite.d}</span>\r\n <span className={styles.spacing}>{translation.update_report_other_users}</span>\r\n {translation.update_report_not_undone}\r\n </>;\r\n\r\n return <div>\r\n <div className={styles.createReport}>\r\n {this.renderFields()}\r\n {confirmSave && <PromptConfirmation\r\n title={translation.update_report_title}\r\n description={confirmSaveMessage}\r\n continueText={translation.update_report_button}\r\n cancelText={translation.cancel}\r\n onCancel={this.onCancelUpdate}\r\n onContinue={this.onSubmit}\r\n /> }\r\n <div className={styles.footer}>\r\n <ButtonTertiary onClick={this.onCancel} disabled={fetching}>\r\n {translation.cancel}\r\n </ButtonTertiary>{' '}\r\n <ButtonCallToAction id=\"form-submit\" onClick={updateReport ? this.onGetUpdateConfirmation : this.onSubmit} disabled={fetching}>\r\n {!updateReport ? translation.submit : translation.update_report_button}\r\n </ButtonCallToAction>\r\n </div>\r\n </div>\r\n\r\n </div>;\r\n }\r\n}\r\nconst container = containerFactory<CreateReportProps>(withSimpleForm(CreateReportComponent),\r\n actionCreators, undefined, savedReportTranslation);\r\n\r\nexport { container as CreateReport };\r\n","import * as React from 'react';\r\nimport { ScrollToTop } from 'ui/scroll-to-top/scroll-to-top';\r\n\r\nexport interface MainGridcontainerProps {\r\n className?: string;\r\n wide?: boolean;\r\n children: React.ReactNode;\r\n}\r\n\r\nexport const MainGridContainer = (props: MainGridcontainerProps) => {\r\n return <div className={`container main-grid ${props.className || ''} ${props.wide ? 'widebreak' : ''}`}>\r\n {props.children}\r\n <ScrollToTop />\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { FavouriteState } from './types-store';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { actionCreators } from './actions';\r\nimport { FiltersDrawer } from 'app/area/filters/filters-drawer';\r\nimport { CreateReport } from '../saved-reports';\r\nimport styles from './favourite.scss';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\ninterface FavouriteLayoutContainerProps {\r\n isCreateReportOpen?: boolean;\r\n updateExistingReport?: boolean;\r\n initiallyOpenFilters?: boolean;\r\n closeReportCreator?: () => void;\r\n updateDefinition: (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => void;\r\n searchRequiredUsers?: boolean;\r\n}\r\n\r\ntype FavouriteLayoutProps = FavouriteState & FavouriteLayoutContainerProps & DefaultContainerProps & typeof actionCreators;\r\n\r\nexport class FavouriteLayout extends React.Component<FavouriteLayoutProps, {}> {\r\n\r\n public componentDidMount () {\r\n this.props.getSearchRequiredUsers && this.props.getSearchRequiredUsers();\r\n }\r\n\r\n public render() {\r\n\r\n const { definition, translation, location, children, updateDefinition,\r\n closeReportCreator, isCreateReportOpen, updateExistingReport, initiallyOpenFilters, searchRequiredUsers } = this.props;\r\n\r\n return <MainGridContainer className={styles.searchResults}>\r\n {isCreateReportOpen && !updateExistingReport && <CreateReport\r\n closeReportCreator={closeReportCreator}\r\n definition={definition}\r\n location={location}\r\n searchRequiredUsers={searchRequiredUsers}\r\n />}\r\n {isCreateReportOpen && updateExistingReport && <CreateReport\r\n closeReportCreator={closeReportCreator}\r\n updateReport={updateExistingReport}\r\n definition={definition}\r\n location={location}\r\n searchRequiredUsers={searchRequiredUsers}\r\n />}\r\n <div className={styles.drawerWithBar}>\r\n <FiltersDrawer\r\n title={translation.filters_title}\r\n updateDefinition={updateDefinition}\r\n definition={definition}\r\n initiallyOpen={initiallyOpenFilters}>\r\n {children}\r\n </FiltersDrawer>\r\n </div>\r\n </MainGridContainer>;\r\n }\r\n}\r\n","import { FavouriteDefinition } from 'app/types-shared';\r\n\r\nexport const updateDefinitionWithReport = (report: number) => (definition: FavouriteDefinition): FavouriteDefinition => {\r\n\r\n return {\r\n ...definition,\r\n\r\n ...(!!report && {\r\n selectedReport: {\r\n v: report\r\n },\r\n\r\n reports: [\r\n ...(definition.reports || []),\r\n ...(!definition.reports || !definition.reports.some(r => r.report.v === report)\r\n ? [{\r\n report: { v: report }\r\n } as any]\r\n : [])\r\n ]\r\n })\r\n };\r\n};\r\n","import { PrimaryActionComponentFactory } from './types';\r\nimport { CaseResult } from './types-store';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { STATE } from 'app/constants';\r\nimport { SchemaBuilder } from 'app/infrastructure/ui/builder';\r\nimport { UiSchema } from 'app/infrastructure/ui/types-uischema';\r\nimport { Field } from 'app/infrastructure/ui/renderer';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { CasePermissions, RenderMode } from 'app/types-shared';\r\nimport * as React from 'react';\r\nimport { InitialUiEngineProps } from 'app/infrastructure/ui/types-uischema';\r\nimport { UiDefinition } from 'app/infrastructure/ui/types-uidefinition';\r\nimport styles from './case-listing-tile.scss';\r\nimport { connect } from 'react-redux';\r\nimport { HeaderVisibilityConfiguration } from 'app/components';\r\n\r\nexport interface CaseListingTileProps {\r\n item: CaseResult;\r\n renderMode: RenderMode;\r\n uiDefinition: UiDefinition;\r\n onDelete?: (caseNumber: number) => void;\r\n onLoadPermissions?: (caseNumber: number[]) => void;\r\n translation: any;\r\n intl: any;\r\n primaryActionComponentFactory?: PrimaryActionComponentFactory;\r\n permissions: CasePermissions;\r\n headerVisibilityConfiguration: HeaderVisibilityConfiguration;\r\n}\r\n\r\nexport interface CaseListingTileState {\r\n schema: UiSchema;\r\n renderMode: RenderMode;\r\n uiDefinition: UiDefinition;\r\n}\r\n\r\nclass CaseListingTileComponent extends React.Component<CaseListingTileProps, CaseListingTileState> {\r\n\r\n public static getDerivedStateFromProps(props: CaseListingTileProps, state: CaseListingTileState):CaseListingTileState {\r\n if (props.uiDefinition !== state.uiDefinition || props.renderMode !== state.renderMode) {\r\n return {\r\n schema: SchemaBuilder.create(props.renderMode, props.uiDefinition),\r\n renderMode: props.renderMode,\r\n uiDefinition: props.uiDefinition\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n constructor(props: CaseListingTileProps) {\r\n super(props);\r\n\r\n this.state = {\r\n schema: SchemaBuilder.create(props.renderMode, props.uiDefinition),\r\n renderMode: props.renderMode,\r\n uiDefinition: props.uiDefinition\r\n };\r\n }\r\n\r\n private handleDeleteCase = () => {\r\n this.props.onDelete(this.props.item.caseNumber);\r\n }\r\n\r\n private handleEditCase = () => {\r\n navigate.toCaseEdit(this.props.item.caseNumber);\r\n }\r\n\r\n private handleDuplicateCase = () => {\r\n navigate.toCaseDuplicate(this.props.item.caseNumber);\r\n }\r\n\r\n private handleBowtie = () => {\r\n navigate.toBowtie(this.props.item.caseNumber);\r\n }\r\n\r\n private handleLoadPermissions = () => {\r\n const {item, onLoadPermissions } = this.props;\r\n onLoadPermissions && onLoadPermissions([item.caseNumber]);\r\n }\r\n\r\n private buildProps = (): InitialUiEngineProps => {\r\n const schema = this.state.schema;\r\n const { intl, item, headerVisibilityConfiguration } = this.props;\r\n\r\n return {\r\n reconnect: false,\r\n statePath: STATE.caseListing,\r\n intl,\r\n entityId: item.entityId,\r\n entityStoreKey: item.entityStoreKey,\r\n caseNumber: item.caseNumber,\r\n applicationId: schema.applicationId,\r\n componentDescriptor: schema.children[0],\r\n actions: {\r\n editDocument: this.handleEditCase,\r\n duplicateDocument: this.handleDuplicateCase,\r\n deleteDocument: this.handleDeleteCase,\r\n loadBowtie: this.handleBowtie,\r\n loadPermissions: this.handleLoadPermissions\r\n },\r\n headerVisibilityConfiguration\r\n };\r\n }\r\n\r\n private renderContent(props: InitialUiEngineProps) {\r\n const { primaryActionComponentFactory } = this.props;\r\n\r\n if (primaryActionComponentFactory) {\r\n return (\r\n <>\r\n <div className={styles.left}><Field {...props} /></div>\r\n <div className={styles.right}>{\r\n primaryActionComponentFactory(\r\n {\r\n caseId: this.props.item.caseNumber,\r\n permissions: this.props.permissions\r\n }\r\n )}\r\n </div>\r\n </>\r\n );\r\n }\r\n else {\r\n return (\r\n <Field {...props} />\r\n );\r\n }\r\n }\r\n\r\n public render() {\r\n if (!this.state.schema) {\r\n return null;\r\n }\r\n\r\n const props = this.buildProps();\r\n props.hostProps = this.buildProps;\r\n\r\n return (\r\n <div className={styles.caseListingTile}>\r\n {this.renderContent(props)}\r\n </div>);\r\n }\r\n}\r\n\r\nconst mapStateToTileProps = (state: ApplicationState, props: any) => {\r\n const caseId = props.item.caseNumber;\r\n\r\n return {\r\n permissions: state.caseListing.permissions && state.caseListing.permissions[caseId]\r\n };\r\n};\r\n\r\nconst container = connect<any, any, any>(mapStateToTileProps)(CaseListingTileComponent);\r\n\r\nexport { container as CaseListingTile };\r\n","import { CaseListingExternalProps } from './types';\r\nimport { CaseListingStoreState } from './types-store';\r\n\r\nexport const isFavouriteOptionsRebuilt = (props: CaseListingExternalProps, nextProps: CaseListingExternalProps) => {\r\n return nextProps.workingDefinition && nextProps.workingDefinition !== props.workingDefinition;\r\n};\r\n\r\nconst thereAreMoreResults = (props: CaseListingStoreState) => {\r\n return props.results.length !== 0 && props.results.length !== props.totalNumberOfResults;\r\n};\r\n\r\nexport const canFetchMoreData = (props: CaseListingExternalProps & CaseListingStoreState) => {\r\n return !!props.workingDefinition && !props.fetching && thereAreMoreResults(props);\r\n};\r\n","import * as React from 'react';\r\nimport { Waypoint } from 'react-waypoint';\r\nimport debounce from 'lodash/debounce';\r\nimport { CaseListingExternalProps } from './types';\r\nimport { CaseResult, CaseListingStoreState } from './types-store';\r\nimport { CaseListingTile } from './case-listing-tile';\r\nimport { canFetchMoreData, isFavouriteOptionsRebuilt } from './comparers';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinition, RenderMode } from 'app/types-shared';\r\nimport { STATE, debounceExecuteFavouriteWait } from 'app/constants';\r\nimport { caseListingTranslation } from './constants';\r\nimport { ElementLoader } from 'ui';\r\nimport { Switch } from 'ui/common/switch/switch';\r\nimport styles from './case-listing.scss';\r\nimport { reportIdToReportCategoryId } from './report-to-category-mapping';\r\n\r\ninterface CaseListingState {\r\n autoExecute: boolean;\r\n}\r\n\r\ntype CaseListingContainerProps = DefaultContainerProps & CaseListingExternalProps & CaseListingStoreState & typeof actionCreators;\r\n\r\nclass CaseListingContainer extends React.Component<CaseListingContainerProps, CaseListingState> {\r\n\r\n public static statePath: string = STATE.caseListing;\r\n\r\n private debouncedExecute: (workingDefinition: FavouriteDefinition, startIndex: number) => void;\r\n\r\n public constructor(props: CaseListingContainerProps) {\r\n super(props);\r\n\r\n const { primaryActionComponentFactory } = props;\r\n\r\n this.debouncedExecute = debounce((workingDefinition: FavouriteDefinition, startIndex: number) => {\r\n this.props.executeFavouriteDefinition(workingDefinition, !!primaryActionComponentFactory, startIndex);\r\n }, debounceExecuteFavouriteWait);\r\n\r\n this.state = {\r\n autoExecute: true\r\n };\r\n }\r\n\r\n public componentDidUpdate(prevProps: CaseListingContainerProps) {\r\n if (this.state.autoExecute && isFavouriteOptionsRebuilt(prevProps, this.props)) {\r\n this.execute(true);\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n this.props.setRenderMode(this.props.requestedRenderMode || RenderMode.report);\r\n this.execute(true);\r\n }\r\n\r\n private fetchMoreData = () => {\r\n if (canFetchMoreData(this.props)) {\r\n this.execute(false);\r\n }\r\n }\r\n\r\n private toggleAutoExecution = () => {\r\n !this.state.autoExecute && this.execute(true);\r\n\r\n this.setState({\r\n autoExecute: !this.state.autoExecute\r\n });\r\n }\r\n\r\n private execute = (clearPreviousResult: boolean) => {\r\n const { results, workingDefinition, clearResults } = this.props;\r\n\r\n if (clearPreviousResult) {\r\n clearResults();\r\n }\r\n\r\n const startIndex = !clearPreviousResult && results ? results.length : 0;\r\n\r\n this.debouncedExecute(workingDefinition, startIndex);\r\n }\r\n\r\n private renderCaseListingTile = (item: CaseResult, index: number) => {\r\n const { \r\n intl, translation, uiDefinitions, deleteCase, \r\n primaryActionComponentFactory, headerVisibilityConfiguration,\r\n renderMode\r\n } = this.props;\r\n\r\n const cachedUiDefinition = uiDefinitions.find(def => \r\n !def.fetching &&\r\n def.caseTypeId === item.caseTypeId && \r\n def.caseContextId === item.caseContextId\r\n );\r\n\r\n return (!item.deleted && <CaseListingTile\r\n key={`${item.caseNumber}-${index}`}\r\n renderMode={renderMode}\r\n item={item}\r\n uiDefinition={cachedUiDefinition ? cachedUiDefinition.definition : undefined}\r\n onDelete={deleteCase}\r\n onLoadPermissions={this.props.getPermissions}\r\n intl={intl}\r\n translation={translation}\r\n headerVisibilityConfiguration={headerVisibilityConfiguration}\r\n primaryActionComponentFactory={primaryActionComponentFactory}\r\n />);\r\n }\r\n\r\n private renderResultList() {\r\n const { results, totalNumberOfResults, fetching, translation, windowAsScrollableAncestor = true } = this.props;\r\n\r\n const canFetchMore = !!results && totalNumberOfResults > 0;\r\n const noResults = !!results && results.length === 0;\r\n\r\n return <div>\r\n {!!results && results.map(this.renderCaseListingTile)}\r\n {canFetchMore && <Waypoint key={`wp${results.length}`}\r\n onEnter={this.fetchMoreData}\r\n scrollableAncestor={windowAsScrollableAncestor ? window : undefined}\r\n bottomOffset=\"-10%\" />}\r\n {fetching\r\n ? <ElementLoader />\r\n : noResults && <div className={styles.uiSearchLoader}>{translation.search_no_hits}</div>}\r\n </div>;\r\n }\r\n\r\n private renderInformation = () => {\r\n return <div className={styles.uiToggleInfo}>\r\n <div className={styles.title}>{this.props.translation.toggle_info_title}</div>\r\n <div className={styles.subTitle}>{this.props.translation.toggle_info_subtitle}</div>\r\n <div className={styles.description}>{this.props.translation.toggle_info_description}</div>\r\n </div>;\r\n }\r\n\r\n private renderFailExecuteInformation = () => {\r\n return <div className={`${styles.uiToggleInfo} ${styles.warningInfo}`}>\r\n <div className={`${styles.title} ${styles.warningMsg}`}>{this.props.translation.toggle_info_title}</div>\r\n <div className={`${styles.subTitle} ${styles.warningMsg}`}>{this.props.errorsExecuteFailed}</div>\r\n <div className={`${styles.warningDescription}`}>{this.props.translation.execute_failed_info_description}</div>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n\r\n const { totalNumberOfResults, fetching, translation, reportCategory, errorsExecuteFailed } = this.props;\r\n const reportStyleClass = reportCategory ? `report-category-${reportCategory}` : ''; \r\n const hasExecuteFailedErrors = !!errorsExecuteFailed && !!errorsExecuteFailed.length;\r\n\r\n const resultOrInfo = this.state.autoExecute ? (hasExecuteFailedErrors ? this.renderFailExecuteInformation() \r\n : (this.renderResultList())) : this.renderInformation();\r\n\r\n const resultCount = !fetching && !hasExecuteFailedErrors && totalNumberOfResults > 0 && this.state.autoExecute;\r\n\r\n return (<div className={`caselisting ${reportStyleClass}`}>\r\n <div className={styles.uiSearchHits}>\r\n <div className={styles.hits}>\r\n {resultCount && `${totalNumberOfResults} ${translation.search_hits}`}\r\n </div>\r\n <div className={styles.switch}>\r\n <Switch\r\n className={styles.selectSwitch}\r\n enabled={this.state.autoExecute}\r\n onChange={this.toggleAutoExecution}\r\n label={translation.toggle_info_load_options}\r\n />\r\n </div>\r\n </div>\r\n {resultOrInfo}\r\n </div>);\r\n }\r\n}\r\n\r\nconst container = containerFactory<CaseListingExternalProps>(\r\n CaseListingContainer,\r\n actionCreators,\r\n { reportCategory: (state, props) => reportIdToReportCategoryId(props.report) },\r\n caseListingTranslation);\r\n\r\nexport { container as CaseListing };\r\n","import * as React from 'react';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinition, RenderMode } from 'app/types-shared';\r\nimport { actionCreators as favouriteActionCreators } from 'app/area/favourite/actions';\r\nimport { actionCreators } from './actions';\r\nimport { STATE } from 'app/constants';\r\nimport { FavouriteState } from 'app/area/favourite/types-store';\r\nimport { searchTranslation } from 'app/area/favourite/constants';\r\nimport { FavouriteLayout } from 'app/area/favourite/favourite-layout';\r\nimport { updateDefinitionWithReport } from 'app/area/favourite/map-report-to-definition';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { CaseListing } from 'app/area/case-listing';\r\nimport styles from 'app/area/favourite/favourite.scss';\r\nimport { PrimaryActionComponentFactory } from 'app/area/case-listing/types';\r\nimport { ElementLoader } from 'ui';\r\n\r\nexport interface EmbeddedCaseListingComponentProps {\r\n favouriteId: number;\r\n reportId: number;\r\n primaryActionComponentFactory?: PrimaryActionComponentFactory;\r\n}\r\n\r\nexport type EmbeddedCaseListingContainerProps = EmbeddedCaseListingComponentProps & FavouriteState &\r\n DefaultContainerProps & typeof favouriteActionCreators;\r\n\r\nexport class EmbeddedCaseListingComponent extends React.Component<EmbeddedCaseListingContainerProps> {\r\n public static statePath: string = STATE.favourite;\r\n\r\n public componentDidMount() {\r\n this.props.loadReportCategory();\r\n this.loadDefinition();\r\n }\r\n\r\n public componentDidUpdate(prevProps: EmbeddedCaseListingContainerProps) {\r\n if (this.props.reportId !== prevProps.reportId) {\r\n this.updateDefinition(updateDefinitionWithReport(this.props.reportId));\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.clearData();\r\n }\r\n\r\n private loadDefinition() {\r\n const { favouriteId } = this.props;\r\n\r\n this.props.loadFavouriteDefinitionEmbedded({\r\n favouriteId\r\n });\r\n }\r\n\r\n private clearData = () => {\r\n this.props.clearResults();\r\n }\r\n\r\n private updateDefinition = (transform: (definition: FavouriteDefinition) => FavouriteDefinition) => {\r\n if (!this.props.workingDefinition) {\r\n return;\r\n }\r\n\r\n transform = transform || (definition => definition);\r\n const newDefinition = transform(this.props.workingDefinition);\r\n\r\n if (!deepEquals(this.props.workingDefinition, newDefinition)) {\r\n this.props.updateWorkingDefinition(newDefinition);\r\n }\r\n }\r\n\r\n private renderCasesResult() {\r\n return <div className={`embeddedcaselisting ${styles.embeddedCaseListing}`}>\r\n <FavouriteLayout\r\n {...this.props}\r\n updateDefinition={this.updateDefinition}>\r\n <CaseListing\r\n requestedRenderMode={RenderMode.embeddedReport}\r\n workingDefinition={this.props.workingDefinition}\r\n primaryActionComponentFactory={this.props.primaryActionComponentFactory}\r\n headerVisibilityConfiguration={{}} /* We send in an empty object to hide meatball menu */\r\n windowAsScrollableAncestor={false} />\r\n </FavouriteLayout>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n\r\n const { definition, fetchingDefinition, fetchingReportCategory } = this.props;\r\n\r\n const fetching = fetchingDefinition || fetchingReportCategory;\r\n\r\n if (fetching || !definition) {\r\n return (\r\n <div className={styles.spacer}>\r\n <ElementLoader />\r\n </div>\r\n );\r\n }\r\n\r\n return this.renderCasesResult();\r\n }\r\n}\r\n\r\nconst selectors = {};\r\n\r\nconst container = containerFactory(\r\n EmbeddedCaseListingComponent, \r\n { ...favouriteActionCreators, ...actionCreators }, \r\n selectors, \r\n searchTranslation\r\n) as any;\r\n\r\nexport {\r\n container as EmbeddedCaseListing\r\n};\r\n","import { CaseView } from 'app/area/case/case-view';\r\nimport { draftTranslations } from 'app/area/case/draft/constants';\r\nimport { DraftProps } from 'app/area/case/draft/types';\r\nimport { withPrompt } from 'app/components';\r\nimport { SpinLoader } from 'app/components/spin-loader';\r\nimport { STATE } from 'app/constants';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { EnabledChildEntityOperations } from 'app/infrastructure/ui/types-uischema';\r\nimport { actionCreators as uiEngineActions } from 'app/infrastructure/ui/form/actions';\r\nimport { RenderMode } from 'app/types-shared';\r\nimport * as React from 'react';\r\nimport { bindActionCreators } from 'redux';\r\nimport { PromptConfirmation } from 'ui';\r\n\r\nimport { CaseState, ViewMode } from 'app/area/case/types-store';\r\nimport { actionCreators } from './actions';\r\nimport { ConnectedCaseInfoModal } from './connected-case-info-modal';\r\nimport { deserializeConnectionState } from './connected-state';\r\nimport { to } from 'app/area/shared/navigation';\r\nimport { log } from 'app/infrastructure/log';\r\nimport { storeItemPathFromRoute } from 'app/infrastructure/store/entity-route';\r\nimport { getCaseId } from 'app/infrastructure/store/query';\r\nimport { EmbeddedCaseListing } from 'app/area/case-listing/embedded-case-listing';\r\n\r\n/**\r\n * Immediatly fetch and edit an identified draft document\r\n */\r\nexport class DraftComponent extends React.PureComponent<\r\n DraftProps & typeof actionCreators,\r\n any\r\n> {\r\n public static statePath: string = STATE.case;\r\n\r\n private actions: Object;\r\n\r\n public constructor(props: any) {\r\n super(props);\r\n\r\n this.actions = bindActionCreators(\r\n {\r\n ...actionCreators,\r\n ...uiEngineActions\r\n },\r\n props.dispatch\r\n );\r\n }\r\n\r\n public componentDidUpdate(prevProps: DraftProps) {\r\n if (this.props && this.props.draftId !== prevProps.entityId && this.props.draftId) {\r\n this.props.editDraft(this.props.draftId, this.props.connectToDraft);\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n if (this.props.draftId){\r\n this.props.editDraft(this.props.draftId, this.props.connectToDraft);\r\n }else{\r\n log('Invalid draft id');\r\n to('/');\r\n }\r\n }\r\n\r\n public render() {\r\n const draftProps = { ...this.props, actions: this.actions };\r\n const text = this.props.translation;\r\n const warnings = this.props.editing && this.props.editing.warnings;\r\n \r\n return this.props.canRender\r\n ? <div>\r\n {this.props.shouldDisplayModal\r\n ? <PromptConfirmation\r\n title={text.case_confirmation_title}\r\n description={text.case_confirmation_description}\r\n continueText={text.case_confirmation_continue}\r\n cancelText={text.case_confirmation_cancel}\r\n onContinue={this.props.continue}\r\n onCancel={this.props.cancel} \r\n />\r\n : ''}\r\n\r\n {this.props.shouldConfirmWarnings &&\r\n <PromptConfirmation\r\n title={text.warning_dialog_title}\r\n description={text.warning_dialog_description}\r\n continueText={text.warning_dialog_submit}\r\n cancelText={text.warning_dialog_cancel}\r\n onCancel={this.props.unconfirmWarnings}\r\n onContinue={this.props.confirmWarnings}\r\n confirmMessages={warnings}\r\n confirmationStyle={'warning'}\r\n />\r\n }\r\n\r\n <ConnectedCaseInfoModal editing={this.props.editing} translation={text}>\r\n <CaseView {...draftProps} />\r\n </ConnectedCaseInfoModal>\r\n </div>\r\n : this.props.fetching && <SpinLoader />;\r\n }\r\n}\r\n\r\nconst selectors = {\r\n statePath: () => DraftComponent.statePath,\r\n\r\n applicationId: (state: CaseState, props: DraftProps) => state.uiDefinition ? state.uiDefinition.applicationId : undefined,\r\n\r\n entityId: (state: any, props: DraftProps) =>\r\n safeNumericString(props.params.id),\r\n\r\n caseNumber: (state: any, props: DraftProps) =>\r\n state.editing && getCaseId(state.editing.values),\r\n\r\n draftId: (state: any, props: DraftProps) =>\r\n safeNumericString(props.params.id),\r\n\r\n canRender: (state: any, props: DraftProps) =>\r\n state.renderMode === RenderMode.edit &&\r\n state.editing &&\r\n !!state.uiDefinition &&\r\n !state.fetching,\r\n\r\n shouldPrompt: (state: CaseState, props: DraftProps) =>\r\n state.renderMode === 1 && !!state.editing && !state.editing.pristine,\r\n\r\n enabledChildEntityOperations: (state: CaseState): EnabledChildEntityOperations => ({ add: true, remove: true }),\r\n\r\n activeChildItem: (state: CaseState, props: DraftProps) =>\r\n [...storeItemPathFromRoute(props.params, RenderMode.edit)],\r\n\r\n connectToDraft: (state: CaseState, props: any) => deserializeConnectionState(props.router.location.query),\r\n\r\n activeSection: (_, props: DraftProps) => Number(props.location.query.section),\r\n\r\n expandAll: (state:CaseState, props: DraftProps) =>\r\n (Object.keys(props.location.query) as any).includes('expandAll') ||\r\n state.viewMode === ViewMode.scroll,\r\n\r\n caseListingComponent: () => EmbeddedCaseListing,\r\n\r\n shouldConfirmWarnings: (state: CaseState) => state.editing && state.editing.showConfirmWarnings\r\n};\r\n\r\nconst { deleteDraft, ...actions } = actionCreators;\r\n\r\nconst container = containerFactory<DraftProps>(\r\n withPrompt(DraftComponent),\r\n { ...actions, onContinue: deleteDraft },\r\n selectors,\r\n draftTranslations\r\n);\r\n\r\nexport { container as Draft };\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { primaryKey } from 'app/infrastructure/data/wireformat';\r\nimport { CaseData } from 'app/types-shared';\r\nimport { endpoint } from '../endpoints';\r\n\r\nexport const api = {\r\n\r\n duplicateCase: async (caseIdToDuplicate: number, queryParameters: {[key:string]: string | number}) => {\r\n const remote = new RemoteData(endpoint.draft);\r\n const response: any = await remote.resource<CaseData>()\r\n .filter(queryParameters)\r\n .create({\r\n caseTypeId: 0,\r\n caseId: 0,\r\n caseIdToDuplicate\r\n }, false);\r\n\r\n const json = await response.json();\r\n\r\n return primaryKey(json.data);\r\n }\r\n\r\n};\r\n","import * as navigate from 'app/area/shared/navigation';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { api } from './api';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\n\r\nexport const actionCreators = {\r\n\r\n duplicateCase: (caseId: number): ActionDispatching<any, ApplicationState> => \r\n async (dispatch: any, getState: ()=> ApplicationState) => {\r\n try{\r\n const { utcOffset } = getState().app.settings;\r\n const draftId = await api.duplicateCase(caseId, {utcOffset});\r\n navigate.toDraft(draftId);\r\n }catch (err){\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n navigate.toCaseView(caseId);\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { STATE } from 'app/constants';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\nimport { SpinLoader } from 'app/components/spin-loader';\r\n\r\n/**\r\n * Runs the action creator to duplicate entity then redirects to the draft\r\n *\r\n */\r\nexport class CaseDuplicate extends React.PureComponent<any> {\r\n\r\n public static statePath: string = STATE.case;\r\n\r\n public componentDidMount() {\r\n this.props.duplicateCase(safeNumericString(this.props.params.id));\r\n }\r\n\r\n public render(): any { return <SpinLoader />; }\r\n}\r\n\r\nconst container = containerFactory(CaseDuplicate, actionCreators);\r\n\r\nexport { container as CaseDuplicateCreator };\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\n\r\nexport const api = {\r\n\r\n editCase: async (caseId: number, caseContextId: number = undefined): Promise<{ location: number, response: any }> => {\r\n const body: any = { caseId };\r\n if (caseContextId) { \r\n body.caseContextId = caseContextId;\r\n }\r\n return await new RemoteData(endpoint.draft)\r\n .resource<any>()\r\n .filter({ includeDraftData: false })\r\n .create(body, true);\r\n }\r\n\r\n};\r\n","import { api } from './api';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { CreateEditDraft } from 'app/area/case/edit/action-types';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { actionCreators as responseCachingActionCreators } from 'app/area/shared/response-caching/actions';\r\n\r\nexport const actionCreators = {\r\n\r\n editCase: (caseId: number, caseContextId: number = undefined, entityPath: string = undefined): \r\n ActionDispatching<any, ApplicationState> => \r\n async (dispatch: any, getState: any) => {\r\n try{\r\n dispatch(new CreateEditDraft(caseId)); \r\n\r\n const { location: draftId, response } = await api.editCase(caseId, caseContextId);\r\n \r\n // Precache ui-definition\r\n if (response && response.data && response.data.caseContext && response.data.caseType) {\r\n const returnedCaseTypeId = response.data.caseType.v;\r\n const returnedCaseContextId = response.data.caseContext.v;\r\n dispatch(responseCachingActionCreators.getUiDefinition(returnedCaseTypeId, returnedCaseContextId));\r\n }\r\n\r\n navigate.toDraft( draftId, undefined, entityPath );\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n navigate.toCaseView(caseId);\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport {containerFactory} from 'app/infrastructure/redux';\r\nimport {actionCreators } from './actions';\r\nimport {safeNumericString} from 'app/infrastructure/data/sanitize';\r\nimport {SpinLoader} from 'app/components/spin-loader';\r\n\r\n/**\r\n * Runs the action creator to create a new entity then redirects to the draft\r\n *\r\n */\r\nexport class Editor extends React.PureComponent<any> {\r\n\r\n public static statePath: string = STATE.case;\r\n\r\n public componentDidMount(){\r\n const {caseNumber, caseContextId, entityPath} = this.props;\r\n\r\n this.props.editCase( caseNumber, caseContextId, entityPath );\r\n }\r\n\r\n public render(): any { return <SpinLoader/>; }\r\n}\r\n\r\nconst selectors = {\r\n caseNumber: (_: any, props: any) => safeNumericString(props.params.id),\r\n\r\n caseContextId: (state: any, props: any) => props.router.location.query && safeNumericString(props.router.location.query.caseContextId),\r\n\r\n entityPath: (_: any, { params }: any) => Object\r\n .keys(params)\r\n .filter(k => k.match(/level\\d/) && !!params[k][0])\r\n .map(k => `/${params[k][0]}/${params[k][1]}`)\r\n .join('')\r\n};\r\n\r\nconst container = containerFactory( Editor, actionCreators, selectors );\r\n\r\nexport {container as CaseEditCreator};\r\n","export const chartType = {\r\n COLUMN: 'column',\r\n PIE: 'pie',\r\n LINE: 'line',\r\n BAR: 'bar',\r\n HEATMAP: 'heatmap'\r\n};\r\n\r\n// Highcharts option constants\r\nexport const stackingOptions = {\r\n NORMAL: 'normal',\r\n PERCENT: 'percent'\r\n};\r\n\r\nexport enum PresentationType {\r\n Table = 1,\r\n Highcharts = 2,\r\n Tile = 4\r\n}\r\n\r\nexport enum ColumnType {\r\n selection = 'selection',\r\n aggregation = 'aggregation',\r\n target = 'target',\r\n aggregationRollAvg = 'aggregationRollAvg'\r\n}\r\n\r\nexport enum Period {\r\n Year = 1,\r\n Quarter = 2,\r\n Month = 3,\r\n Week = 4,\r\n Day = 5,\r\n Weekday = 6\r\n}\r\n\r\nexport const defaultChartHeight = 400;\r\nexport const maxChartHeight = 3000;\r\n","export const dashboardTranslation = {\r\n dashboard_not_render_description: 7477,\r\n\r\n favourite_unsupported_presentation_type: 7478,\r\n favourite_no_layout_model: 7479,\r\n favourite_not_render: 7482,\r\n favourite_not_present_type_favourite: 7483,\r\n\r\n chart_not_supported_type: 7484,\r\n\r\n no_search_result: 6778,\r\n\r\n filters_title: 7556,\r\n print: 8353\r\n};\r\n\r\nexport const dashboardLayoutTypeContext = 2;\r\n","import { FavouriteRowValue, FavouriteDataColumn, FavouriteDataModel } from './favourite-interfaces';\r\nimport { LayoutConfig } from './layout-config';\r\nimport { ColumnType, Period } from '../../constants';\r\n\r\nimport findIndex from 'lodash/findindex';\r\nimport isString from 'lodash/isstring';\r\nimport isNumber from 'lodash/isnumber';\r\nimport isDate from 'lodash/isdate';\r\n\r\ninterface ColumnExtreme { min: any; max: any; sum: number; direction: number; }\r\ninterface CheckColumnType { col: FavouriteDataColumn; extreme: ColumnExtreme; }\r\n\r\nexport interface ColumnMetaData {\r\n hasSequence: boolean;\r\n hasIcon: boolean;\r\n hasBgColour: boolean;\r\n hasFgColour: boolean;\r\n}\r\n\r\nexport class FavouriteDataAdapter {\r\n public layoutConfig: LayoutConfig;\r\n public dataModel: FavouriteDataModel;\r\n\r\n public columnMetaData: ColumnMetaData[];\r\n public columnCategories: FavouriteRowValue[][];\r\n public columnExtremes: ColumnExtreme[];\r\n public aggrColIndex: number = -1;\r\n public aggrRollAvgColIndex: number = -1;\r\n public targetColIndex: number = -1;\r\n public uomColIndex: number = -1;\r\n public selectionCount: number = 0;\r\n public compactColumnIndex: number = -1;\r\n public indexesToCompare: number[] = [];\r\n\r\n public hasRollingAverage = () => this.aggrRollAvgColIndex >= 0;\r\n public hasTarget = () => this.targetColIndex >= 0;\r\n\r\n public static numRegex: RegExp = /^\\d+/;\r\n private noValueText: string;\r\n private formatters: Function[] = [];\r\n public intl: any;\r\n public translation: any;\r\n\r\n constructor(config: LayoutConfig, dataModel: FavouriteDataModel, intl: any, translation: any) {\r\n this.layoutConfig = config;\r\n this.dataModel = dataModel;\r\n this.noValueText = config.text('NoValue', '-- No value --');\r\n this.intl = intl;\r\n this.translation = translation;\r\n this.setupForDataModel();\r\n }\r\n\r\n private setupForDataModel() {\r\n if (!this.dataModel || !this.dataModel.columns) {\r\n return;\r\n }\r\n\r\n // Prepare formatters for numeric and date columns, to be used later\r\n const fallbackNumberFormatter = this.buildNumberFormatter(this.intl, false, 0);\r\n const categories: FavouriteRowValue[][] = [];\r\n const extremes: ColumnExtreme[] = [];\r\n const checkColumnType: CheckColumnType[] = [];\r\n this.columnMetaData = [];\r\n\r\n this.prepareColumns(this.dataModel, categories, extremes, checkColumnType, fallbackNumberFormatter);\r\n\r\n // Handle aggregation column uom (if there is one)\r\n const uomDomain = this.dataModel.columns[this.aggrColIndex].uomDomain;\r\n if (uomDomain > 0) {\r\n const uomColIndex = findIndex(this.dataModel.columns, (col: FavouriteDataColumn) => col.domain === uomDomain); //tslint:disable-line\r\n if (uomColIndex >= 0) {\r\n this.uomColIndex = uomColIndex;\r\n }\r\n }\r\n\r\n for (let r = 0; r < this.dataModel.rows.length; r++) {\r\n // position us down in the structure, and place the value object\r\n for (let c = 0; c < this.dataModel.columns.length; c++) {\r\n const colValue = this.dataModel.rows[r][c];\r\n if (!colValue.hasOwnProperty('value')) {\r\n colValue.value = null;\r\n }\r\n if (colValue.sequence || colValue.aggrSequence) {\r\n this.columnMetaData[c].hasSequence = true;\r\n }\r\n if (colValue.iconUrl) {\r\n this.columnMetaData[c].hasIcon = true;\r\n }\r\n if (colValue.bgColour) {\r\n this.columnMetaData[c].hasBgColour = true;\r\n }\r\n if (colValue.fgColour) {\r\n this.columnMetaData[c].hasFgColour = true;\r\n }\r\n\r\n const colCategories = categories[c];\r\n\r\n if (!colCategories.find(x => x.value === colValue.value)) {\r\n colCategories.push(colValue);\r\n }\r\n if (extremes[c].min == null || extremes[c].min > colValue.value) {\r\n extremes[c].min = colValue.value;\r\n extremes[c].direction = (extremes[c].direction || 0) - 1;\r\n }\r\n if (extremes[c].max == null || extremes[c].max < colValue.value) {\r\n extremes[c].max = colValue.value;\r\n extremes[c].direction = (extremes[c].direction || 0) + 1;\r\n\r\n }\r\n if (c === this.aggrColIndex && isFinite(+colValue.value)) {\r\n extremes[c].sum += colValue.value;\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0; i < checkColumnType.length; i++) {\r\n if (checkColumnType[i].extreme.max < 1) {\r\n checkColumnType[i].col.dataType = 'Float';\r\n }\r\n }\r\n\r\n this.columnCategories = categories;\r\n this.columnExtremes = extremes;\r\n\r\n // prepare table columns\r\n const tableIndexes = this.dataModel.columns\r\n .filter((column, index) => column.columnType === ColumnType.selection && index !== this.uomColIndex)\r\n .map((column, index) => index);\r\n\r\n this.compactColumnIndex = tableIndexes[tableIndexes.length - 1];\r\n this.indexesToCompare = tableIndexes.slice(0, -1);\r\n }\r\n\r\n private prepareColumns(\r\n dataModel: FavouriteDataModel,\r\n categories: FavouriteRowValue[][],\r\n extremes: ColumnExtreme[],\r\n checkColumnType: CheckColumnType[],\r\n fallbackNumberFormatter: (n: number) => string) {\r\n for (let i = 0; i < dataModel.columns.length; i++) {\r\n const column = dataModel.columns[i];\r\n const colExtremes = { min: null, max: null, sum: 0, direction: 0 };\r\n\r\n categories.push([]);\r\n extremes.push(colExtremes);\r\n\r\n this.columnMetaData.push({ hasSequence: false, hasIcon: false, hasBgColour: false, hasFgColour: false });\r\n\r\n // somethimes get datatype ='Float' and sometimes get datatype ='Date' for same searching ,when select day or weekday\r\n const isAggrTargetOrRollAvg = this.isAggrColumn(dataModel.columns, i);\r\n if (column.columnType === 'selection') {\r\n this.selectionCount++;\r\n }\r\n\r\n if (column.columnType === 'target') {\r\n this.formatters[i] = this.buildNumberFormatter(this.intl, true, 2);\r\n } else if ((column.dataType === 'Float' &&\r\n !column.interval && !column.codetable) || (column.dataType === '' && isAggrTargetOrRollAvg)) {\r\n // We use digit grouping only for aggregate columns. Max decimals is always taken from the config.\r\n this.formatters[i] = this.buildNumberFormatter(this.intl, isAggrTargetOrRollAvg, column.numberOfDecimals || 3);\r\n } else if ((column.dataType === 'Integer' || column.dataType === 'BigInteger') && !column.interval && !column.codetable) {\r\n let maxDecimals = 0;\r\n if (column.aggregationType === 3) { // Average\r\n maxDecimals = 1;\r\n }\r\n else if (dataModel.report === 10) { // Frequency report\r\n maxDecimals = column.numberOfDecimals !== null ? column.numberOfDecimals : 1;\r\n if (maxDecimals > 1) {\r\n checkColumnType.push({ col: column, extreme: colExtremes });\r\n }\r\n }\r\n this.formatters[i] = this.buildNumberFormatter(this.intl, isAggrTargetOrRollAvg, maxDecimals);\r\n } else if (column.dataType === 'Date') {\r\n const period = column.period;\r\n const selectionType = column.selectionType;\r\n this.formatters[i] = this.buildDateFormatter(this.intl, selectionType, period);\r\n } else {\r\n this.formatters[i] = (v: any) => v.toString();\r\n } // NOOP formatter\r\n\r\n if (column.columnType === ColumnType.aggregationRollAvg) {\r\n this.aggrRollAvgColIndex = i;\r\n } else if (column.columnType === ColumnType.target) {\r\n this.targetColIndex = i;\r\n } else if (column.columnType === ColumnType.aggregation) {\r\n this.aggrColIndex = i;\r\n }\r\n }\r\n }\r\n\r\n private buildDateFormatter(intl: any, selectionType: number, period: Period) {\r\n const dateFormatOptions = period ? \r\n this.buildDateFormatOptionsFromPeriod(period) : \r\n { timeZone: 'UTC' };\r\n\r\n return (d: any) => {\r\n if (isString(d)) {\r\n return d; // week numbers are now converted to real dates. Treat as string.\r\n }\r\n\r\n if (isNumber(d)) {\r\n d = new Date(d);\r\n }\r\n\r\n if (isDate(d)) {\r\n\r\n // Period\r\n if (selectionType === 3) {\r\n if (period === Period.Quarter) {\r\n\r\n const quarter = Math.floor(((d as Date).getUTCMonth() + 3) / 3);\r\n return intl.formatNumber(quarter) + ' ' + intl.formatDate(d, dateFormatOptions);\r\n }\r\n\r\n return intl.formatDate(d, dateFormatOptions);\r\n }\r\n else {\r\n // Date and time\r\n return intl.formatDate(d, {\r\n year: 'numeric',\r\n month: 'numeric',\r\n day: 'numeric',\r\n hour: 'numeric',\r\n minute: 'numeric',\r\n timeZone: 'UTC'\r\n });\r\n }\r\n }\r\n\r\n return () => d;\r\n };\r\n }\r\n\r\n public buildNumberFormatter(intl: any, useDigitGrouping: boolean, maxDecimals: number, style: string = 'decimal') {\r\n const options = {\r\n style: style,\r\n useGrouping: useDigitGrouping,\r\n minimumFractionDigits: 0,\r\n maximumFractionDigits: maxDecimals\r\n };\r\n\r\n return (num: number) => {\r\n if (style === 'percent') { // the silly Intl formatters expect a number between 0 and 1 when formatting percent\r\n num = num / 100;\r\n }\r\n return intl.formatNumber(num, options);\r\n };\r\n }\r\n\r\n private buildDateFormatOptionsFromPeriod(period: Period) {\r\n return {\r\n year: 'numeric',\r\n month: period === Period.Month\r\n ? 'short'\r\n : period === Period.Day ? 'numeric' : undefined,\r\n day: period === Period.Day ? 'numeric' : undefined,\r\n week: period === Period.Week ? 'numeric' : undefined,\r\n weekday: period === Period.Weekday ? 'short' : undefined,\r\n timeZone: 'UTC'\r\n };\r\n }\r\n\r\n public format(index: number, value: any): string {\r\n if (value === null || value === undefined) {\r\n return this.noValueText;\r\n }\r\n\r\n if (isString(value)) {\r\n return value;\r\n }\r\n\r\n if (index >= this.formatters.length) {\r\n return value.toString();\r\n }\r\n\r\n return this.formatters[index](value);\r\n }\r\n\r\n public hasCategories(axisColIndex: number): boolean {\r\n if (axisColIndex < 0) {\r\n return false;\r\n }\r\n const col = this.dataModel.columns[axisColIndex];\r\n return !(col.dataType === 'Date'\r\n || (col.dataType === 'Float' && col.interval == null && col.codetable == null)\r\n || ((col.dataType === 'Integer' || col.dataType === 'BigInteger') && \r\n col.interval == null && col.codetable == null && col.period == null))\r\n || (col.period === Period.Weekday) || (col.period === Period.Week) || (col.domainNode === 357);\r\n }\r\n\r\n public hasIcons(colIndex: number) {\r\n return this.columnMetaData[colIndex].hasIcon;\r\n }\r\n\r\n public hasBgColors(colIndex: number) {\r\n return this.columnMetaData[colIndex].hasBgColour;\r\n }\r\n\r\n public hasFgColors(colIndex: number) {\r\n return this.columnMetaData[colIndex].hasFgColour;\r\n }\r\n\r\n public isAggrColumn(columns: FavouriteDataColumn[], index: number): boolean {\r\n const col = columns[index];\r\n return col.columnType === 'aggregation' || col.columnType === 'aggregationRollAvg' || col.columnType === 'target';\r\n }\r\n\r\n public columnType(columnIndex: number) {\r\n const col = this.dataModel.columns[columnIndex];\r\n if (col) {\r\n return col.columnType;\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n","export interface FavouriteDataColumn {\r\n columnName: string;\r\n columnType: string;\r\n dataType: string;\r\n numberOfDecimals: number;\r\n domain: number;\r\n domainNode: number;\r\n codetable: number;\r\n text: string;\r\n shortText: string;\r\n extraText: string;\r\n selectionType: number;\r\n levels: number;\r\n period: number;\r\n interval: number;\r\n selectedCode: number;\r\n aggregationType: AggregationType;\r\n targetApplication: number;\r\n targetText: string;\r\n rollingAveragePeriods: number;\r\n rollingAverageText: string;\r\n exposureApplication: number;\r\n exposureApplicationText: string;\r\n exposurePercentInc: number;\r\n urlTemplate: string;\r\n uomDomain: number;\r\n}\r\n\r\nexport interface FavouriteRowValue {\r\n value: any;\r\n code: number;\r\n sequence: number;\r\n aggrSequence: string;\r\n fgColour: number;\r\n bgColour: number;\r\n iconUrl: string;\r\n noExp: boolean;\r\n noTar: boolean;\r\n}\r\n\r\nexport interface FavouriteMetaData {\r\n noExp: boolean;\r\n noTar: boolean;\r\n}\r\n\r\nexport interface FavouriteDataCondition {\r\n conditionNo: number;\r\n domain: number;\r\n text: string;\r\n conditionText: string;\r\n isNegated: boolean;\r\n operator: number;\r\n operator2: number;\r\n favOperator: number;\r\n forceExists: boolean;\r\n exactLevel: boolean;\r\n valueListOperator: number;\r\n valueListSeparator: string;\r\n conditionValues: FavouriteDataConditionValue[];\r\n}\r\n\r\nexport interface FavouriteDataConditionValue {\r\n conditionValueNo: number;\r\n value: any;\r\n operator: number;\r\n dbFunction: number;\r\n periodPredef: number;\r\n}\r\n\r\nexport interface FavouriteDataConnected {\r\n favourite: number;\r\n description: string;\r\n operator: number;\r\n}\r\n\r\n/*\r\n * Detailed favourite data.\r\n */\r\nexport interface FavouriteDataModel {\r\n id: number;\r\n favouriteName: string;\r\n description: string;\r\n report: number;\r\n conditions?: FavouriteDataCondition[];\r\n connected?: FavouriteDataConnected[];\r\n errorMessages?: string[];\r\n maxRows?: number;\r\n columns: FavouriteDataColumn[];\r\n rows: FavouriteRowValue[][];\r\n}\r\n\r\nexport enum AggregationType {\r\n NotSelected = 0,\r\n Count = 1,\r\n Total = 2,\r\n Average = 3,\r\n Minimum = 4,\r\n Maximum = 5,\r\n DaysSinceLast = 7,\r\n DaysSinceFirst = 8\r\n}\r\n","// tslint:disable no-use-before-declare\r\nimport { FavouriteRowValue, FavouriteDataColumn, AggregationType } from './favourite-interfaces';\r\nimport { DrillDownModel, DrillDownCallback, CaseViewCallback } from './drill-down-model';\r\nimport { FavouriteDataAdapter } from './favourite-data-adapter';\r\n\r\nexport class DrillDownHandler {\r\n private readonly drillDown: DrillDownCallback;\r\n private readonly caseView: CaseViewCallback;\r\n private readonly favouriteDataAdapter: FavouriteDataAdapter;\r\n\r\n constructor(drillDown: DrillDownCallback, caseView: CaseViewCallback, favouriteDataAdapter: FavouriteDataAdapter) {\r\n this.drillDown = drillDown;\r\n this.caseView = caseView;\r\n this.favouriteDataAdapter = favouriteDataAdapter;\r\n }\r\n\r\n public toCaseListing(rowIndex: number, skipColumns: number[] = []) {\r\n const aggrColumn = this.favouriteDataAdapter.dataModel.columns[this.favouriteDataAdapter.aggrColIndex];\r\n const outputReport = this.getOutputReport();\r\n const aggrValue = this.getAggregateValue(rowIndex, outputReport, aggrColumn);\r\n\r\n const modelBuilder = new DrillDownModelBuilder(outputReport)\r\n .withAggregationFilter(aggrColumn, aggrValue);\r\n\r\n for (let i = 0; i < this.favouriteDataAdapter.dataModel.columns.length; i++) {\r\n if (this.favouriteDataAdapter.dataModel.columns[i].columnType === 'selection' && skipColumns.indexOf(i) === -1) {\r\n modelBuilder.withFilter(this.favouriteDataAdapter.dataModel.columns[i], this.favouriteDataAdapter.dataModel.rows[rowIndex][i]);\r\n }\r\n }\r\n\r\n this.drillDown(this.favouriteDataAdapter.dataModel.id, modelBuilder.model());\r\n }\r\n\r\n private getAggregateValue(rowIndex: number, outputReport: number, aggrColumn: FavouriteDataColumn) {\r\n\r\n if (outputReport === 1 || outputReport === 2) { \r\n if (rowIndex < 0) {\r\n if (aggrColumn.aggregationType === AggregationType.Minimum) {\r\n return this.favouriteDataAdapter.columnExtremes[this.favouriteDataAdapter.aggrColIndex].min;\r\n }\r\n else if (aggrColumn.aggregationType === AggregationType.Maximum) {\r\n return this.favouriteDataAdapter.columnExtremes[this.favouriteDataAdapter.aggrColIndex].max;\r\n }\r\n }\r\n }\r\n \r\n return this.favouriteDataAdapter.dataModel.rows[rowIndex][this.favouriteDataAdapter.aggrColIndex];\r\n }\r\n\r\n private getOutputReport() {\r\n return null;\r\n }\r\n\r\n public toCaseListingWithAllCases() {\r\n\r\n this.drillDown(this.favouriteDataAdapter.dataModel.id, new DrillDownModelBuilder(this.getOutputReport()).model());\r\n }\r\n\r\n public toCaseView(rowIndex: number, colIndex: number) {\r\n\r\n const selectedRow = this.favouriteDataAdapter.dataModel.rows[rowIndex];\r\n\r\n return this.caseView(selectedRow[colIndex].value);\r\n }\r\n}\r\n\r\nexport class DrillDownModelBuilder {\r\n private readonly drillDownModel: DrillDownModel;\r\n\r\n constructor(outputReport: number) {\r\n this.drillDownModel = {\r\n autoExecute: true,\r\n outputReport\r\n };\r\n }\r\n\r\n private validateSelectionColumn(column: FavouriteDataColumn): boolean {\r\n return column.columnType === 'selection';\r\n }\r\n\r\n public withAggregationFilter(aggregationColumn: FavouriteDataColumn, aggregationValue: FavouriteRowValue): DrillDownModelBuilder {\r\n this.drillDownModel.aggregationDomain = aggregationColumn.domain;\r\n this.drillDownModel.aggregationType = aggregationColumn.aggregationType;\r\n if (aggregationValue) {\r\n this.drillDownModel.aggregationValue = aggregationValue.value;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n public withFilter(column: FavouriteDataColumn, columnValue: FavouriteRowValue): DrillDownModelBuilder {\r\n if (!this.validateSelectionColumn(column)) {\r\n //TODO: Log condition.\r\n return this;\r\n }\r\n\r\n if (!this.drillDownModel.filters) {\r\n this.drillDownModel.filters = [];\r\n }\r\n\r\n this.drillDownModel.filters.push(\r\n {\r\n domain: column.domain,\r\n flgExactCodeCondition: column.codetable && column.selectionType === 1,\r\n value: (column.codetable && column.codetable > 0) ? columnValue.code : columnValue.value,\r\n period: column.period\r\n }\r\n );\r\n\r\n return this;\r\n }\r\n\r\n public model(): DrillDownModel {\r\n return this.drillDownModel;\r\n }\r\n}\r\n","import { FavouriteDataAdapter } from './favourite-data-adapter';\r\nimport { LayoutConfig } from './layout-config';\r\nimport { ErrorHandler } from './error-handler';\r\nimport { DrillDownHandler } from './drill-down-builder';\r\nimport { FavouriteDataModel } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\nimport { DrillDownCallback, CaseViewCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport class FavouriteModelComponent {\r\n public config: LayoutConfig;\r\n protected intl: any;\r\n protected translation: any;\r\n public dataModel: FavouriteDataModel;\r\n\r\n // @ts-ignore\r\n private errorHandler: ErrorHandler;\r\n private drillDown: DrillDownCallback;\r\n private caseview: CaseViewCallback;\r\n\r\n public drillDownHandler: DrillDownHandler;\r\n\r\n protected dataAdapter: FavouriteDataAdapter;\r\n\r\n constructor(config: LayoutConfig, intl: any, translation: any,\r\n errorHandler: ErrorHandler,\r\n drillDown: DrillDownCallback,\r\n caseview: CaseViewCallback) {\r\n this.config = config;\r\n this.intl = intl;\r\n this.errorHandler = errorHandler;\r\n this.drillDown = drillDown;\r\n this.caseview = caseview;\r\n this.translation = translation;\r\n }\r\n\r\n public receiveData(dataModel: FavouriteDataModel) {\r\n this.dataModel = dataModel;\r\n this.dataAdapter = new FavouriteDataAdapter(this.config, dataModel, this.intl, this.translation);\r\n this.drillDownHandler = new DrillDownHandler(this.drillDown, this.caseview, this.dataAdapter);\r\n }\r\n}\r\n","import { FavouriteLayoutAttributes } from '../../types';\r\nimport DotObject from 'dot-object';\r\n\r\nexport class LayoutConfig {\r\n public layoutAttributes: any;\r\n\r\n constructor(layoutAttributes: FavouriteLayoutAttributes) {\r\n this.layoutAttributes = new DotObject('.', false, true, false).object({ ...layoutAttributes });\r\n }\r\n\r\n public text(name: string, ifMissing?: string): string {\r\n if (this.layoutAttributes.Text && this.layoutAttributes.Text.hasOwnProperty(name)) {\r\n return this.layoutAttributes.Text[name];\r\n }\r\n return ifMissing;\r\n }\r\n\r\n public showRowCount(): boolean {\r\n return !this.layoutAttributes.RowCount || !this.layoutAttributes.RowCount.HideRowCount;\r\n }\r\n\r\n public showFilter(): boolean {\r\n return !this.layoutAttributes.Filter || !this.layoutAttributes.Filter.HideFilter;\r\n }\r\n\r\n public drillDownSetting(name: string): any {\r\n if (this.layoutAttributes.drillDown && this.layoutAttributes.drillDown.hasOwnProperty(name)) {\r\n return this.layoutAttributes.drillDown[name];\r\n }\r\n return undefined;\r\n }\r\n\r\n public drillDownSettingBool(name: string, defaultValue: boolean): boolean {\r\n const val = this.drillDownSetting(name);\r\n return (val === undefined)\r\n ? defaultValue\r\n : val as boolean;\r\n }\r\n}\r\n\r\nexport class ChartLayoutConfig extends LayoutConfig {\r\n public chartType(): string {\r\n return this.layoutAttributes.Highcharts && this.layoutAttributes.Highcharts.chart && this.layoutAttributes.Highcharts.chart.type\r\n ? this.layoutAttributes.Highcharts.chart.type\r\n : 'line';\r\n }\r\n\r\n public chartStyle(name: string) {\r\n if (this.layoutAttributes.HighchartsStyle && this.layoutAttributes.HighchartsStyle[name]) {\r\n return this.layoutAttributes.HighchartsStyle[name];\r\n }\r\n return undefined;\r\n }\r\n}\r\n","import { FavouriteRowValue } from './favourite-interfaces';\r\nimport { ChartLayoutConfig } from './layout-config';\r\nimport isString from 'lodash/isstring';\r\nimport isObject from 'lodash/isobject';\r\n\r\nexport function setTickInterval(period: number) {\r\n switch (period) {\r\n case 1:\r\n return 24 * 3600 * 1000 * 365;\r\n case 2:\r\n return 24 * 3600 * 1000 * 30 * 3;\r\n case 3:\r\n return 24 * 3600 * 1000 * 30;\r\n case 4:\r\n return 24 * 3600 * 1000 * 7;\r\n case 5:\r\n return 24 * 3600 * 1000;\r\n case 6:\r\n return 1;\r\n default:\r\n return 24 * 3600 * 1000;\r\n }\r\n}\r\n\r\nexport function compareRowValues(a: FavouriteRowValue | string | number, b: FavouriteRowValue | string | number, locale: string): number {//tslint:disable-line\r\n if (a === b) {\r\n return 0;\r\n }\r\n if (isObject(a) && isObject(b)) {\r\n // We expect the objects to be IFavouriteRowValue objects\r\n let ret = 0;\r\n const seqA = (a as FavouriteRowValue).sequence || (a as FavouriteRowValue).aggrSequence;\r\n const seqB = (b as FavouriteRowValue).sequence || (b as FavouriteRowValue).aggrSequence;\r\n if (seqA && seqB) {\r\n ret = compareRowValues(seqA, seqB, locale);\r\n if (ret !== 0) { // Sort by sequence\r\n return ret;\r\n }\r\n }\r\n return compareRowValues((a as FavouriteRowValue).value, (b as FavouriteRowValue).value, locale); // Fall back to sorting on value\r\n }\r\n if (isString(a) && isString(b)) {\r\n\r\n if (Intl && Intl.Collator) {\r\n return Intl.Collator(locale).compare(a as string, b as string);\r\n } else {\r\n if (a === b) {\r\n return 0;\r\n }\r\n if (a > b) {\r\n return 1;\r\n }\r\n return -1;\r\n }\r\n\r\n }\r\n if (a === null && b !== null) {\r\n return -1;\r\n }\r\n if (a !== null && b === null) {\r\n return 1;\r\n }\r\n if (a < b) {\r\n return -1;\r\n }\r\n if (a > b) {\r\n return 1;\r\n }\r\n return 0;\r\n}\r\n\r\nfunction wordwrap(str: string, width: number, brk: string, cut: boolean, truncLimit: number) {\r\n if ((str === undefined) || (str == null)) {\r\n return '';\r\n }\r\n if (str.length > truncLimit) {\r\n str = str.substring(0, truncLimit) + '…';\r\n }\r\n brk = brk || '\\n';\r\n width = width || 75;\r\n cut = cut || false;\r\n if (!str) {\r\n return str;\r\n }\r\n const regex = '.{1,' + width + '}(\\\\s|$)' + (cut ? '|.{' + width + '}|.+$' : '|\\\\S+?(\\\\s|$)');\r\n return str.match(RegExp(regex, 'g')).join(brk);\r\n}\r\n\r\nexport function wrapText(\r\n chartConfig: ChartLayoutConfig,\r\n str: string,\r\n lengthSetting: string,\r\n truncSetting: string,\r\n brk: string = '<br />'\r\n) {\r\n const wordwrapConfig = chartConfig.chartStyle('wordwrap') || {};\r\n const lengthLimit = wordwrapConfig[lengthSetting] || 30;\r\n const truncLimit = wordwrapConfig[truncSetting] || 150;\r\n return wordwrap(str, lengthLimit, brk, true, truncLimit);\r\n}\r\n\r\nexport function escapeHtml(str: string) {\r\n const entityMap: { [key: string]: string } = {\r\n '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"'\r\n };\r\n return String(str).replace(/[&<>\"]/g, s => entityMap[s]);\r\n}\r\n","import { wrapText, escapeHtml } from '../common/utils';\r\nimport { ChartLayoutConfig } from '../common/layout-config';\r\nimport set from 'lodash/set';\r\n\r\nimport Highcharts from 'highcharts';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\nimport { toast } from 'react-toastify';\r\n\r\nexport interface ChartExportOptions {\r\n isExportEnabled(layoutConfig: ChartLayoutConfig): boolean;\r\n addExportOptions(layoutConfig: ChartLayoutConfig, highchartsOptions: Highcharts.Options): void;\r\n}\r\n\r\nexport function createDefaultChartExportOptions(): ChartExportOptions {\r\n return {\r\n isExportEnabled: (layoutConfig: ChartLayoutConfig) => !!layoutConfig.layoutAttributes.Highcharts &&\r\n !!layoutConfig.layoutAttributes.Highcharts.exporting &&\r\n layoutConfig.layoutAttributes.Highcharts.exporting.enabled,\r\n addExportOptions: (layoutConfig: ChartLayoutConfig, highchartsOptions: Highcharts.Options) => {\r\n\r\n const exporting = !!layoutConfig.layoutAttributes.Highcharts &&\r\n layoutConfig.layoutAttributes.Highcharts.exporting;\r\n\r\n highchartsOptions.exporting = {\r\n buttons: {\r\n contextButton: { menuItems: [] }\r\n },\r\n libUrl: undefined,\r\n error: undefined, // We expect it to throw to decide whether to fall back or not.\r\n ...(exporting || {})\r\n };\r\n\r\n set(highchartsOptions, 'chart.events', {\r\n afterPrint: function() {\r\n // tslint:disable-next-line\r\n const chart = (this as any);\r\n chart.setSize(null, null);\r\n document.body.classList.remove('printing');\r\n }\r\n });\r\n\r\n const sourceWidth = !!exporting && exporting.sourceWidth;\r\n const sourceHeight = !!exporting && exporting.sourceHeight;\r\n const exportFailedMessage = !!exporting && exporting.exportFailedMessage;\r\n const fallbackToExportServer = !!exporting && exporting.fallbackToExportServer;\r\n\r\n const lengthLimit = 'contextMenuTextLengthLimit';\r\n const truncLimit = 'contextMenuTextTruncLimit';\r\n const menu = ((highchartsOptions.exporting.buttons).contextButton.menuItems);\r\n\r\n const menuItem = {\r\n text: wrapText(layoutConfig,\r\n escapeHtml(layoutConfig.text('PrintText')), lengthLimit, truncLimit),\r\n onclick: function () {\r\n // tslint:disable-next-line\r\n const chart = (this as any);\r\n const chartH = chart.chartHeight;\r\n const chartAnim = chart.animation;\r\n chart.animation = false;\r\n document.body.classList.add('printing');\r\n if (sourceWidth && sourceHeight) {\r\n chart.setSize(layoutConfig.layoutAttributes.Highcharts.exporting.sourceWidth,\r\n layoutConfig.layoutAttributes.Highcharts.exporting.sourceHeight);\r\n }\r\n chart.print();\r\n chart.setSize(null, chartH);\r\n chart.animation = chartAnim;\r\n }\r\n } as Highcharts.MenuItem;\r\n\r\n (menu as Highcharts.MenuItem[]).push(menuItem);\r\n\r\n const imgMenus = [\r\n ['ExportPngText', 'image/png'],\r\n ['ExportJpegText', 'image/jpeg'],\r\n ['ExportPdfText', 'application/pdf'],\r\n ['ExportSvgText', 'image/svg+xml']\r\n ];\r\n\r\n for (let i = 0; i < imgMenus.length; i++) {\r\n const imgMenuItem = {\r\n text: wrapText(layoutConfig,\r\n escapeHtml(layoutConfig.text(imgMenus[i][0])), lengthLimit, truncLimit),\r\n onclick: ((mimeType: string) => function () {\r\n try {\r\n // tslint:disable-next-line\r\n this.exportChartLocal({\r\n type: mimeType\r\n });\r\n } catch(e) {\r\n if(!!fallbackToExportServer) {\r\n // tslint:disable-next-line\r\n this.exportChart({\r\n type: mimeType\r\n });\r\n }\r\n else {\r\n toastFactory({ autoClose: 5000 }).dispatch(exportFailedMessage, toast.TYPE.ERROR);\r\n console.exception(e);\r\n }\r\n }\r\n })(imgMenus[i][1])\r\n };\r\n (menu as Highcharts.MenuItem[]).push(imgMenuItem);\r\n }\r\n }\r\n };\r\n}\r\n","import { ChartLayoutOptionsBuilder } from 'app/components/favourite-layout/favourite/chart-layout-options/chart-layout-options-builder';\r\nimport { ChartExportOptions, createDefaultChartExportOptions } from './chart-export';\r\nimport { ChartMiscOptions, createDefaultChartMiscOptions } from './chart-misc';\r\nimport { ChartLayoutConfig } from '../common/layout-config';\r\n\r\nexport class DefaultChartLayoutOptionsBuilder implements ChartLayoutOptionsBuilder {\r\n\r\n private config: ChartLayoutConfig;\r\n\r\n constructor(config: ChartLayoutConfig) {\r\n this.config = config;\r\n }\r\n\r\n public miscOptions: ChartMiscOptions = createDefaultChartMiscOptions();\r\n public exportOptions: ChartExportOptions = createDefaultChartExportOptions();\r\n\r\n public setOptions(options: Highcharts.Options) {\r\n this.setColors(options);\r\n this.setExport(options);\r\n }\r\n\r\n private setColors(options: Highcharts.Options) {\r\n const colors = this.miscOptions.colors(this.config);\r\n\r\n if (colors) {\r\n options.colors = colors;\r\n }\r\n }\r\n\r\n private setExport(options: Highcharts.Options) {\r\n if (this.exportOptions.isExportEnabled(this.config)) {\r\n this.exportOptions.addExportOptions(this.config, options);\r\n options.exporting.enabled = true;\r\n } else {\r\n options.exporting = { enabled: false };\r\n }\r\n }\r\n}\r\n","import { ChartLayoutConfig } from '../common/layout-config';\r\n\r\nexport interface ChartMiscOptions {\r\n colors(layoutConfig: ChartLayoutConfig): string[];\r\n}\r\n\r\nexport function createDefaultChartMiscOptions(): ChartMiscOptions {\r\n return {\r\n colors: (layoutConfig: ChartLayoutConfig) => {\r\n if (layoutConfig.layoutAttributes.Highcharts.theme && layoutConfig.layoutAttributes.Highcharts.theme.colors) {\r\n return layoutConfig.layoutAttributes.Highcharts.theme.colors.split(','); // May define several colors\r\n }\r\n }\r\n };\r\n}\r\n","import { ChartLayoutConfig } from '../common/layout-config';\r\nimport { DefaultChartLayoutOptionsBuilder } from './default-chart-layout-options';\r\nimport { chartType } from '../../constants';\r\nimport { ChartLayoutOptionsBuilder } from 'app/components/favourite-layout/favourite/chart-layout-options/chart-layout-options-builder';\r\n\r\nexport function createChartLayoutOptionsBuilder(layoutConfig: ChartLayoutConfig): ChartLayoutOptionsBuilder {\r\n switch (layoutConfig.chartType()) {\r\n case chartType.LINE:\r\n case chartType.COLUMN:\r\n case chartType.BAR:\r\n case chartType.PIE:\r\n case chartType.HEATMAP:\r\n return new DefaultChartLayoutOptionsBuilder(layoutConfig);\r\n default:\r\n return null;\r\n }\r\n}\r\n","import { convertNumericColorToHex } from 'app/infrastructure/universal/color';\r\nimport { FavouriteRowValue } from '../common/favourite-interfaces';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport { ChartLayoutConfig } from '../common/layout-config';\r\nimport { DrillDownHandler } from '../common/drill-down-builder';\r\n\r\ninterface SynergiHighchartsPointObject extends Highcharts.PointObject {\r\n synDataRowIndex?: number;\r\n}\r\n\r\nexport class ChartSeriesDataOptionsBuilder {\r\n private dataAdapter: FavouriteDataAdapter;\r\n private drillDownHandler: DrillDownHandler;\r\n\r\n constructor(dataAdapter: FavouriteDataAdapter, drillDownHandler: DrillDownHandler) {\r\n this.dataAdapter = dataAdapter;\r\n this.drillDownHandler = drillDownHandler;\r\n }\r\n\r\n public createSeriesOptions(\r\n seriesCol: number,\r\n seriesValues: FavouriteRowValue[],\r\n seriesNamePrefix: string = '',\r\n appendSeriesValues: boolean = true,\r\n typeStr: string = undefined,\r\n dashStyle: string = undefined\r\n ): Highcharts.SeriesOptions[] {\r\n const series: Highcharts.SeriesOptions[] = [];\r\n\r\n for (let j = 0; j < seriesValues.length; j++) {\r\n const seriesObject: Highcharts.SeriesOptions = {\r\n name: this.makeSeriesName(seriesNamePrefix, this.dataAdapter.format(seriesCol, seriesValues[j].value), appendSeriesValues),\r\n data: [],\r\n type: typeStr,\r\n dashStyle: dashStyle\r\n };\r\n\r\n if (seriesValues[j].bgColour) {\r\n seriesObject.color = convertNumericColorToHex(seriesValues[j].bgColour);\r\n }\r\n\r\n this.addSeriesDrillDownHandler(this.drillDownHandler, seriesObject);\r\n this.addSpecialSeriesConfig(this.dataAdapter.layoutConfig as ChartLayoutConfig, seriesObject);\r\n series.push(seriesObject);\r\n }\r\n\r\n return series;\r\n }\r\n\r\n private addSeriesDrillDownHandler(drillDownHandler: DrillDownHandler, series: Highcharts.SeriesOptions) {\r\n if (drillDownHandler == null) {\r\n return;\r\n }\r\n\r\n series.cursor = 'pointer';\r\n series.events = {};\r\n series.events.click = (event) => {\r\n const rowIndex = (event.point as SynergiHighchartsPointObject).synDataRowIndex;\r\n drillDownHandler.toCaseListing(rowIndex);\r\n };\r\n }\r\n\r\n private makeSeriesName(prefix: string, value: string, append: boolean): string {\r\n if (prefix) {\r\n return prefix + (append ? ': ' + value : '');\r\n } else {\r\n return append ? value : '';\r\n }\r\n }\r\n\r\n private addSpecialSeriesConfig(config: ChartLayoutConfig, seriesObject: Highcharts.SeriesOptions, seriesType: string = 'mainSeries') {\r\n if (config.layoutAttributes.HighchartsSeries && config.layoutAttributes.HighchartsSeries[seriesType]) {\r\n Object.keys(config.layoutAttributes.HighchartsSeries[seriesType]).forEach((ind) => {\r\n (seriesObject as any)[ind] = config.layoutAttributes.HighchartsSeries[seriesType][ind];\r\n });\r\n }\r\n }\r\n\r\n public shouldAddColorToDataPoint(seriesIndex: number): boolean {\r\n return seriesIndex < 0; // Set colors directly on each data point if there are no series\r\n }\r\n\r\n // should be overridden with 'return true' if the dataLabels color should be adjusted to data point background color\r\n public shouldAdjustDataPointLabelColor(): boolean {\r\n return false;\r\n }\r\n}\r\n","import { convertNumericColorToHex, numericColorBrightness } from 'app/infrastructure/universal/color';\r\nimport { FavouriteRowValue } from '../common/favourite-interfaces';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport {\r\n ChartSeriesDataOptionsBuilder\r\n} from './chart-series-data-options-builder';\r\nimport {\r\n SeriesTypeColumnMappings,\r\n SeriesTypeBaseIndex\r\n} from './types';\r\n\r\ninterface SynergiHighchartsDataPoint extends Highcharts.DataPoint {\r\n [key: string]: any;\r\n synDataRowIndex?: number;\r\n seriesType: string;\r\n}\r\n\r\nexport class ChartPointDataOptionsBuilder {\r\n private dataAdapter: FavouriteDataAdapter;\r\n private seriesDataOptionsBuilder: ChartSeriesDataOptionsBuilder;\r\n\r\n constructor(\r\n dataAdapter: FavouriteDataAdapter,\r\n seriesDataOptionsBuilder: ChartSeriesDataOptionsBuilder\r\n ) {\r\n this.dataAdapter = dataAdapter;\r\n this.seriesDataOptionsBuilder = seriesDataOptionsBuilder;\r\n }\r\n\r\n public createDataPoints(\r\n options: Highcharts.Options,\r\n splitCol: number,\r\n seriesCol: number,\r\n seriesValues: FavouriteRowValue[],\r\n seriesTypeBaseIndex: SeriesTypeBaseIndex,\r\n columnMap: SeriesTypeColumnMappings,\r\n xIndex: number\r\n ) {\r\n const ignoreNullValues = this.ignoreNullValuesForDataPoints(xIndex);\r\n\r\n this.dataAdapter.dataModel.rows.forEach((row, index) => {\r\n if ((xIndex >= 0) && (row[xIndex].value == null) && ignoreNullValues) {\r\n return;\r\n }\r\n\r\n this.createDataPoint(options, index, seriesCol, seriesValues, row, seriesTypeBaseIndex, columnMap, xIndex);\r\n if (this.dataAdapter.hasRollingAverage() && columnMap.rollingAverageSeries) {\r\n this.createDataPoint(options, index, seriesCol, seriesValues, row, seriesTypeBaseIndex, columnMap, xIndex, 'rollingAverageSeries');\r\n }\r\n if (this.dataAdapter.hasTarget() && columnMap.targetSeries) {\r\n this.createDataPoint(options, index, seriesCol, seriesValues, row, seriesTypeBaseIndex, columnMap, xIndex, 'targetSeries');\r\n }\r\n });\r\n }\r\n\r\n private createDataPoint(\r\n options: Highcharts.Options,\r\n rowIndex: number,\r\n seriesCol: number,\r\n seriesValues: FavouriteRowValue[],\r\n row: FavouriteRowValue[],\r\n seriesTypeBaseIndex: SeriesTypeBaseIndex,\r\n columnMap: SeriesTypeColumnMappings,\r\n xIndex: number,\r\n seriesType: string = 'mainSeries'\r\n ) {\r\n let seriesIndex = seriesCol >= 0 ? seriesValues.findIndex(series => { return series.value === row[seriesCol].value; }) : 0;\r\n seriesIndex += seriesTypeBaseIndex[seriesType];\r\n const dataArray = options.series[seriesIndex].data;\r\n const dataPoint: SynergiHighchartsDataPoint = { seriesType: seriesType };\r\n for (let c = 0; c < columnMap[seriesType].length; c++) {\r\n const colType = columnMap[seriesType][c];\r\n if (colType === 'splitting' || colType === 'series' || !colType) {\r\n continue;\r\n }\r\n const rowVal = row[c];\r\n let val: any = rowVal.value;\r\n if ((colType === 'x' || colType === 'y') && this.dataAdapter.hasCategories(c)) {\r\n val = this.dataAdapter.columnCategories[c].findIndex(cat => { return val === cat.value; });\r\n }\r\n if (this.seriesDataOptionsBuilder.shouldAddColorToDataPoint(seriesCol) && rowVal.bgColour) {\r\n dataPoint.color = convertNumericColorToHex(rowVal.bgColour);\r\n if (this.seriesDataOptionsBuilder.shouldAdjustDataPointLabelColor() && numericColorBrightness(rowVal.bgColour) < 128) {\r\n dataPoint.dataLabels = {\r\n ...(dataPoint.dataLabels || {}),\r\n color: '#ffffff'\r\n };\r\n }\r\n }\r\n dataPoint[columnMap[seriesType][c]] = val;\r\n }\r\n\r\n this.addStaticDataPointProperties(dataPoint);\r\n\r\n if (xIndex >= 0) {\r\n dataPoint.name = this.dataAdapter.format(xIndex, row[xIndex].value);\r\n }\r\n\r\n // We set our own row index property to easily identify which row in the data a point belongs to (used for drilldown)\r\n dataPoint.synDataRowIndex = rowIndex;\r\n\r\n (dataArray as Highcharts.DataPoint[]).push(dataPoint);\r\n }\r\n\r\n public ignoreNullValuesForDataPoints(axisColIndex: number): boolean {\r\n return !this.dataAdapter.hasCategories(axisColIndex);\r\n }\r\n\r\n public addStaticDataPointProperties(dataPoint: Highcharts.DataPoint) {\r\n return;\r\n }\r\n}\r\n","import { ChartDataOptionsBuilder } from './chart-data-options-builder';\r\nimport { ChartSeriesDataOptionsBuilder } from './chart-series-data-options-builder';\r\nimport { ChartPointDataOptionsBuilder } from './chart-point-data-options-builder';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport { FavouriteRowValue } from '../common/favourite-interfaces';\r\nimport { ChartLayoutConfig } from '../common/layout-config';\r\nimport { FavouriteDataOptions } from '../common/favourite-data-options';\r\nimport { compareRowValues, wrapText, escapeHtml, setTickInterval } from '../common/utils';\r\nimport { convertNumericColorToHex } from 'app/infrastructure/universal/color';\r\nimport { DrillDownHandler } from '../common/drill-down-builder';\r\nimport { getHostingPath } from 'app/infrastructure/hosting';\r\nimport { defaultChartHeight, maxChartHeight } from '../../constants';\r\n\r\nimport styles from './chart-favourite.scss';\r\nimport { SeriesTypeColumnMappings, SeriesTypeBaseIndex } from 'app/components/favourite-layout/favourite/chart-data-options/types';\r\n\r\nexport class DefaultChartDataOptionsBuilder implements ChartDataOptionsBuilder {\r\n\r\n private readonly DEFAULT_ICON_DIMENSIONS: number = 16;\r\n private dataOptions: FavouriteDataOptions;\r\n private dataAdapter: FavouriteDataAdapter;\r\n\r\n public columnMap: SeriesTypeColumnMappings;\r\n public seriesTypeBaseIndex: SeriesTypeBaseIndex = {};\r\n\r\n public pointDataOptionsBuilder: ChartPointDataOptionsBuilder;\r\n public seriesDataOptionsBuilder: ChartSeriesDataOptionsBuilder;\r\n\r\n public createAxisHandler: (colIndex: number, axisObj: Highcharts.AxisOptions, axisName: string) => void;\r\n public createFakeAxisHandler: (options: Highcharts.Options, axisType: string) => void;\r\n public legendTitleHandler: (seriesCol: number) => string;\r\n\r\n constructor(\r\n dataOptions: FavouriteDataOptions,\r\n dataAdapter: FavouriteDataAdapter,\r\n seriesDataOptionsBuilder: ChartSeriesDataOptionsBuilder,\r\n pointDataOptionsBuilder: ChartPointDataOptionsBuilder,\r\n columnMappings: SeriesTypeColumnMappings\r\n ) {\r\n this.dataAdapter = dataAdapter;\r\n this.seriesDataOptionsBuilder = seriesDataOptionsBuilder;\r\n this.pointDataOptionsBuilder = pointDataOptionsBuilder;\r\n this.dataOptions = dataOptions;\r\n this.columnMap = this.createColumnMap(columnMappings);\r\n\r\n // We override the extremes based on target - Only used for charts\r\n if (this.dataAdapter.hasTarget()) {\r\n const { columnExtremes, targetColIndex, aggrColIndex } = this.dataAdapter;\r\n const minTargetCol = columnExtremes[targetColIndex].min;\r\n const minAggrCol = columnExtremes[aggrColIndex].min;\r\n if (minTargetCol < minAggrCol) {\r\n columnExtremes[aggrColIndex].min = minTargetCol;\r\n }\r\n\r\n const maxTargetCol = columnExtremes[targetColIndex].max;\r\n const maxAggrCol = columnExtremes[aggrColIndex].max;\r\n if (maxTargetCol > maxAggrCol) {\r\n columnExtremes[aggrColIndex].max = maxTargetCol;\r\n }\r\n }\r\n }\r\n\r\n public useHtml(colIndex: number) {\r\n return this.dataAdapter.hasCategories(colIndex)\r\n && (this.dataAdapter.hasBgColors(colIndex) || this.dataAdapter.hasIcons(colIndex))\r\n && !(this.dataAdapter.layoutConfig as ChartLayoutConfig).chartStyle('disableHtmlLabels');\r\n }\r\n\r\n public anyHtmlColumn(): boolean {\r\n for (let i = 0; i < this.dataAdapter.dataModel.columns.length; i++) {\r\n if (this.useHtml(i)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n public createIconOrColourDiv(colIndex: number, value: FavouriteRowValue,\r\n emptyPlaceholder: boolean = true, overrideColor: string = null): string {\r\n if (this.dataAdapter.hasIcons(colIndex) && value && value.iconUrl) {\r\n return '<img src=\"' +\r\n getHostingPath() + '/' + value.iconUrl +\r\n '\" style=\"width:' + this.DEFAULT_ICON_DIMENSIONS + 'px;height:' + this.DEFAULT_ICON_DIMENSIONS + 'px;\">';\r\n }\r\n if (this.dataAdapter.hasBgColors(colIndex) &&\r\n !this.dataAdapter.hasIcons(colIndex) &&\r\n value && value.bgColour\r\n ) {\r\n return '<div class=\"colorBox\" style=\"background-color:' +\r\n (overrideColor ? overrideColor : convertNumericColorToHex(value.bgColour)) + '\"></div>';\r\n }\r\n if (emptyPlaceholder) { // Return div to take up space even if there is nothing to display\r\n return '<div class=\"colorBox\"></div>';\r\n }\r\n return '';\r\n }\r\n\r\n public addSpanWrapper(str: string, marginRight: number) {\r\n return '<span style=\"vertical-align:middle;' + 'margin-right:' + marginRight + 'px\">' + str + '</span>';\r\n }\r\n\r\n private createColumnMap(columnMappings: SeriesTypeColumnMappings): SeriesTypeColumnMappings {\r\n const seriesTypeMappings: SeriesTypeColumnMappings = { mainSeries: [] };\r\n Object.keys(columnMappings).forEach((seriesType: string) => {\r\n const columnList: any[] = [];\r\n for (let c = 0; c < this.dataAdapter.dataModel.columns.length; c++) {\r\n const col = this.dataAdapter.dataModel.columns[c];\r\n if (col.columnType === 'selection') {\r\n const selColName = 'sel' + (c + 1).toString();\r\n columnList.push(columnMappings[seriesType][selColName]);\r\n } else {\r\n columnList.push(columnMappings[seriesType][col.columnType]);\r\n }\r\n }\r\n seriesTypeMappings[seriesType] = columnList;\r\n });\r\n return seriesTypeMappings;\r\n }\r\n\r\n public setOptions(options: Highcharts.Options, splitRow: FavouriteRowValue, seriesValues: FavouriteRowValue[]) {\r\n const splitCol = this.colIndexOf('splitting');\r\n const seriesCol = this.colIndexOf('series');\r\n const xIndex = this.colIndexOf('x', 'mainSeries');\r\n this.prepareSeries(options, splitCol, splitRow, seriesCol, seriesValues);\r\n this.pointDataOptionsBuilder.createDataPoints(\r\n options, splitCol, seriesCol, seriesValues, this.seriesTypeBaseIndex, this.columnMap, xIndex);\r\n this.sortData(options);\r\n this.removeEmptyData(options);\r\n this.setHeight(options);\r\n }\r\n\r\n public isLegendEnabled(seriesCol: number): boolean {\r\n return !(seriesCol < 0 && this.dataAdapter.targetColIndex < 0 && this.dataAdapter.aggrRollAvgColIndex < 0);\r\n }\r\n\r\n public useLegendTitle(): boolean {\r\n return this.dataAdapter.selectionCount > 1;\r\n }\r\n\r\n public legendTitle(seriesCol: number): string {\r\n return this.legendTitleHandler\r\n ? this.legendTitleHandler(seriesCol)\r\n : this.dataOptions.getColumnTitle(this.colIndexOf(seriesCol < 0 ? 'x' : 'series'), 'legend');\r\n }\r\n\r\n public addLegend(options: Highcharts.Options, seriesCol: number): void {\r\n if (this.useLegendTitle()) {\r\n let titleText =\r\n wrapText((this.dataAdapter.layoutConfig as ChartLayoutConfig), this.legendTitle(seriesCol),\r\n 'legendTitleLengthLimit', 'legendTitleTruncLimit');\r\n options.legend.title = { text: titleText };\r\n\r\n if (this.dataAdapter.hasTarget() && this.columnMap.targetSeries && (this.dataAdapter.selectionCount >= 2)) {\r\n titleText =\r\n wrapText(\r\n (this.dataAdapter.layoutConfig as ChartLayoutConfig),\r\n this.dataOptions.getColumnTitle(this.dataAdapter.targetColIndex,\r\n 'legend'\r\n ),\r\n 'legendTitleLengthLimit', 'legendTitleTruncLimit');\r\n options.legend.title.text += '<br />' + titleText;\r\n }\r\n }\r\n\r\n const layoutAttributes = this.dataAdapter.layoutConfig.layoutAttributes;\r\n if (layoutAttributes.Highcharts && layoutAttributes.Highcharts.legend && layoutAttributes.Highcharts.legend.verticalAlign === 'top') {\r\n // If we have a title we potentially need to \"bump\" the y value for the legend down to avoid overlap\r\n let titleMargin = 15;\r\n if (layoutAttributes.Highcharts.title && layoutAttributes.Highcharts.title.margin) {\r\n titleMargin = layoutAttributes.Highcharts.title.margin;\r\n }\r\n let currentY = layoutAttributes.Highcharts.legend.y || 0;\r\n currentY += titleMargin;\r\n options.legend.y = currentY;\r\n }\r\n\r\n options.legend = {\r\n ...options.legend,\r\n title: {\r\n ...(options.legend.title || {}),\r\n style: {\r\n ...((options.legend.title && options.legend.title.style) || {}),\r\n fontWeight: '600'\r\n }\r\n },\r\n itemStyle: {\r\n ...(options.legend.itemStyle || {}),\r\n fontWeight: '600'\r\n }\r\n };\r\n\r\n const dataAdapter = this.dataAdapter;\r\n // tslint:disable-next-line\r\n options.legend.labelFormatter = function () {\r\n // tslint:disable-next-line\r\n return wrapText((dataAdapter.layoutConfig as ChartLayoutConfig), this.name, 'seriesNameLengthLimit', 'seriesNameTruncLimit');\r\n };\r\n }\r\n\r\n private removeEmptyData(options: Highcharts.Options) {\r\n let j = options.series.length;\r\n while (j--) {\r\n if (options.series[j].data.length === 0) {\r\n options.series.splice(j, 1);\r\n }\r\n }\r\n }\r\n\r\n private setHeight(options: Highcharts.Options) {\r\n\r\n const config = this.dataAdapter.layoutConfig as ChartLayoutConfig;\r\n\r\n if (config.chartStyle('userDefinedHeightEnabled')) {\r\n\r\n const height = this.getExtraGraphHeight(options, this.dataAdapter)\r\n + (config.chartStyle('userDefinedHeightValue') || defaultChartHeight);\r\n options.chart.height = Math.min(height, maxChartHeight);\r\n }\r\n }\r\n\r\n public getExtraGraphHeight(options: Highcharts.Options, dataAdapter: FavouriteDataAdapter): number {\r\n return 0;\r\n }\r\n\r\n public createTitle(splitCol: number, splitRow: FavouriteRowValue, useHtml: boolean) {\r\n const titleText = this.dataOptions.getColumnTitle(splitCol, 'splitting') + ': ';\r\n const valueText = this.dataAdapter.format(splitCol, splitRow.value);\r\n let graphTitle = splitCol >= 0 ?\r\n wrapText((this.dataAdapter.layoutConfig as ChartLayoutConfig),\r\n titleText + valueText,\r\n 'subgraphTitleLengthLimit', 'subgraphTitleTruncLimit')\r\n : null;\r\n\r\n if (useHtml) {\r\n const iconHtml = this.createIconOrColourDiv(splitCol, splitRow, false);\r\n\r\n // TODO: How to deal with line wrapping?\r\n graphTitle = this.addSpanWrapper(titleText, 0) +\r\n (iconHtml.length > 0 ? iconHtml + ' ' : '') +\r\n this.addSpanWrapper(valueText, this.DEFAULT_ICON_DIMENSIONS);\r\n }\r\n\r\n return graphTitle;\r\n }\r\n\r\n private prepareSeries(options: Highcharts.Options, splitCol: number,\r\n splitRow: FavouriteRowValue, seriesCol: number, seriesValues: FavouriteRowValue[]) {\r\n const useHtml = this.useHtml(splitCol);\r\n\r\n options.title = { ...options.title, text: this.createTitle(splitCol, splitRow, useHtml), useHTML: useHtml };\r\n options.series = [];\r\n\r\n this.createAxes(options);\r\n\r\n options.legend = options.legend || {};\r\n if (this.isLegendEnabled(seriesCol)) {\r\n this.addLegend(options, seriesCol);\r\n }\r\n else {\r\n options.legend.enabled = false;\r\n }\r\n\r\n this.addTooltipOptions(options);\r\n\r\n this.addSeriesToColumnMap(options, 'mainSeries');\r\n options.series = options.series.concat(\r\n this.seriesDataOptionsBuilder.createSeriesOptions(seriesCol, seriesValues, '', true)\r\n );\r\n\r\n const appendSeriesValues = this.dataAdapter.selectionCount >= 2;\r\n if (this.dataAdapter.hasRollingAverage()) {\r\n this.addSeriesToColumnMap(options, 'rollingAverageSeries');\r\n options.series = options.series.concat(\r\n this.seriesDataOptionsBuilder.createSeriesOptions(seriesCol, seriesValues,\r\n this.dataOptions.getColumnTitle(this.dataAdapter.aggrRollAvgColIndex, 'series', !appendSeriesValues),\r\n appendSeriesValues, 'line', 'dot')\r\n );\r\n }\r\n if (this.dataAdapter.hasTarget()) {\r\n this.addSeriesToColumnMap(options, 'targetSeries');\r\n options.series = options.series.concat(\r\n this.seriesDataOptionsBuilder.createSeriesOptions(seriesCol, seriesValues,\r\n this.dataOptions.getColumnTitle(this.dataAdapter.targetColIndex, 'series', !appendSeriesValues),\r\n appendSeriesValues, 'line', 'shortdash')\r\n );\r\n }\r\n }\r\n\r\n private addSeriesToColumnMap(options: Highcharts.Options, seriesType: string) {\r\n if (!this.columnMap[seriesType]) {\r\n return;\r\n }\r\n this.seriesTypeBaseIndex[seriesType] = options.series.length;\r\n }\r\n\r\n private sortData(options: Highcharts.Options) {\r\n for (let j = 0; j < options.series.length; j++) {\r\n (options.series[j].data as Highcharts.DataPoint[]).sort((a, b) => {\r\n return compareRowValues(a.x, b.x, this.dataAdapter.intl.locale);\r\n });\r\n }\r\n }\r\n\r\n public colIndexOf(typeName: string, seriesType: string = 'mainSeries') {\r\n return this.columnMap[seriesType].indexOf(typeName);\r\n }\r\n\r\n private createAxes(options: Highcharts.Options) {\r\n const axisList = ['x', 'y'];\r\n for (let a = 0; a < axisList.length; a++) {\r\n const colIndex = this.colIndexOf(axisList[a]);\r\n const axisName = axisList[a];\r\n\r\n if (colIndex < 0) {\r\n this.createFakeAxisHandler && this.createFakeAxisHandler(options, axisList[a]);\r\n continue;\r\n }\r\n\r\n const axisObj: Highcharts.AxisOptions = {};\r\n this.createAxis(colIndex, axisObj, axisName);\r\n (options as any)[axisName + 'Axis'] = axisObj;\r\n }\r\n }\r\n\r\n public getAxisMin(colIndex: number, dataAdapter: FavouriteDataAdapter): number {\r\n return dataAdapter.columnExtremes[colIndex].min;\r\n }\r\n\r\n public getAxisMax(colIndex: number, dataAdapter: FavouriteDataAdapter): number {\r\n return dataAdapter.columnExtremes[colIndex].max;\r\n }\r\n\r\n public createAxis(colIndex: number, axisObj: Highcharts.AxisOptions, axisName: string) {\r\n // tslint:disable-next-line\r\n const dataOptions = this.dataOptions;\r\n const dataAdapter = this.dataAdapter;\r\n axisObj.title = {\r\n text: dataOptions.getColumnTitle(colIndex, 'axes')\r\n };\r\n const maxTicks = (dataOptions.layoutConfig as ChartLayoutConfig).chartStyle('maxTickIn' + axisName.toUpperCase());\r\n if (dataAdapter.hasCategories(colIndex)) {\r\n axisObj.type = 'categories';\r\n axisObj.floor = 0;\r\n axisObj.ceiling = dataAdapter.columnCategories[colIndex].length - 1;\r\n axisObj.categories = dataAdapter.columnCategories[colIndex].map(c => {\r\n return dataAdapter.format(colIndex, c.value);\r\n });\r\n if (maxTicks) {\r\n axisObj.tickInterval = Math.ceil(axisObj.categories.length / maxTicks);\r\n }\r\n axisObj.tickmarkPlacement = 'on';\r\n } else if (dataAdapter.dataModel.columns[colIndex].dataType === 'Date') {\r\n axisObj.type = 'datetime';\r\n const min = this.getAxisMin(colIndex, dataAdapter);\r\n const max = this.getAxisMax(colIndex, dataAdapter);\r\n if (axisName !== 'x') {\r\n axisObj.min = min;\r\n axisObj.max = max;\r\n } else if (dataAdapter.columnExtremes[colIndex].direction < 0) {\r\n axisObj.reversed = true;\r\n }\r\n axisObj.minTickInterval = setTickInterval(dataAdapter.dataModel.columns[colIndex].period);\r\n if (maxTicks && (Math.ceil((max - min) / axisObj.minTickInterval) <= maxTicks)) {\r\n axisObj.tickInterval = axisObj.minTickInterval;\r\n }\r\n } else {\r\n axisObj.type = 'linear';\r\n axisObj.min = this.getAxisMin(colIndex, dataAdapter) >= 0 ? 0 : undefined;\r\n axisObj.max = this.getAxisMax(colIndex, dataAdapter);\r\n if (dataAdapter.dataModel.columns[colIndex].dataType === 'Integer'\r\n || dataAdapter.dataModel.columns[colIndex].dataType === 'BigInteger') {\r\n axisObj.allowDecimals = false;\r\n axisObj.minTickInterval = 1;\r\n }\r\n }\r\n axisObj.labels = {\r\n // tslint:disable-next-line\r\n formatter: (function (c: any) {\r\n return function () {\r\n // tslint:disable-next-line\r\n return dataAdapter.format(c, this.value);\r\n };\r\n })(colIndex)\r\n };\r\n\r\n // adds advanced formatting for labels if Html is allowed, and any axis value contains icon / colour information\r\n if (this.useHtml(colIndex)) {\r\n axisObj.labels.useHTML = true;\r\n // tslint:disable-next-line\r\n const self = this;\r\n\r\n axisObj.labels.formatter = (function (c: any) {\r\n return function () {\r\n // tslint:disable-next-line\r\n let labelText = escapeHtml(dataAdapter.format(c, this.value));\r\n if (self.useHtml(c)) {\r\n // add icon in front of the text\r\n // tslint:disable-next-line\r\n const catIndex = this.axis.categories.indexOf(this.value);\r\n if (catIndex >= 0) {\r\n const cat = dataAdapter.columnCategories[c][catIndex];\r\n const extraHtml = self.createIconOrColourDiv(c, cat, false);\r\n if (extraHtml.length > 0) {\r\n labelText = extraHtml + ' ' + self.addSpanWrapper(labelText, self.DEFAULT_ICON_DIMENSIONS);\r\n }\r\n }\r\n }\r\n return labelText;\r\n };\r\n })(colIndex);\r\n }\r\n\r\n this.createAxisHandler && this.createAxisHandler(colIndex, axisObj, axisName);\r\n }\r\n\r\n public addTooltipOptions(options: Highcharts.Options) {\r\n // tslint:disable-next-line\r\n const self = this;\r\n\r\n options.tooltip = {\r\n crosshairs: [true, true],\r\n backgroundColor: 'rgba(0,0,0,0)',\r\n shadow: false,\r\n borderWidth: 0,\r\n borderColor: 'rgba(0,0,0,0)',\r\n formatter: function () {\r\n return self.tooltipFormat(this);\r\n },\r\n style: {\r\n zIndex: 100\r\n }\r\n };\r\n\r\n options.tooltip.useHTML = true;\r\n }\r\n\r\n //TODO: Fix this abomination.\r\n private tooltipFormat(sender: any) {\r\n let text = '';\r\n let extraHtml = '';\r\n\r\n const seriesColumn = this.colIndexOf('series');\r\n if ((seriesColumn >= 0) || (sender.point.seriesType === 'targetSeries') || (sender.point.seriesType === 'rollingAverageSeries')) {\r\n text += '<span class=\"' + styles.tooltipBold + '\">' + escapeHtml(sender.series.name) + '</span>';\r\n if (this.useHtml(seriesColumn)) {\r\n // First try to look up the category in the cached categories array\r\n const cat = this.dataAdapter.columnCategories[seriesColumn].find(\r\n (currentCat) => { return this.dataAdapter.format(seriesColumn, currentCat.value) === sender.series.name; }\r\n );\r\n extraHtml = this.createIconOrColourDiv(seriesColumn, cat, false, sender.series.color);\r\n if (extraHtml.length > 0) {\r\n text = extraHtml + ' ' + this.addSpanWrapper(text, 0);\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0; i < this.dataAdapter.dataModel.columns.length; i++) {\r\n const colType = this.columnMap.mainSeries[i];\r\n if (!colType || colType === 'series' || sender.point[colType] === undefined) {\r\n continue;\r\n }\r\n if (text.length > 0) {\r\n text += '<br />';\r\n }\r\n let value = sender.point[colType];\r\n let formatColumn = i;\r\n let columnCat: FavouriteRowValue;\r\n if ((colType === 'x' || colType === 'y') && this.dataAdapter.hasCategories(i)) {\r\n columnCat = this.dataAdapter.columnCategories[i][value];\r\n value = this.dataAdapter.format(i, (columnCat && columnCat.value) || value);\r\n } else if (colType === 'y') {\r\n if (this.dataAdapter.hasTarget && (sender.point.seriesType === 'targetSeries')) {\r\n formatColumn = this.dataAdapter.targetColIndex;\r\n } else if (this.dataAdapter.hasRollingAverage() && (sender.point.seriesType === 'rollingAverageSeries')) {\r\n formatColumn = this.dataAdapter.aggrRollAvgColIndex;\r\n }\r\n }\r\n const titleText = escapeHtml(this.dataOptions.getColumnTitle(formatColumn, 'tooltip')) + ': ';\r\n const valueText = ' <span class=\"' + styles.tooltipBold + '\">'\r\n + escapeHtml(this.dataAdapter.format(formatColumn, value)) + '</span>';\r\n extraHtml = '';\r\n if (this.useHtml(i)) {\r\n extraHtml = this.createIconOrColourDiv(i, columnCat, false);\r\n if (extraHtml.length > 0) {\r\n text += this.addSpanWrapper(titleText, 0) +\r\n extraHtml +\r\n this.addSpanWrapper(valueText, this.DEFAULT_ICON_DIMENSIONS);\r\n } else {\r\n text += titleText + valueText;\r\n }\r\n } else {\r\n text += titleText + valueText;\r\n }\r\n }\r\n const style = escapeHtml('background-color: #EBEBEB;color: #4B4949;padding: 5px 10px 5px 10px;border: solid #DADADA 1px;');\r\n\r\n return `<div style=\"${style}\">${text}</div>`;\r\n }\r\n}\r\n\r\nexport function createDefaultChartDataOptionsBuilder(\r\n dataOptions: FavouriteDataOptions,\r\n dataAdapter: FavouriteDataAdapter,\r\n drillDownHandler: DrillDownHandler,\r\n columnMappings: SeriesTypeColumnMappings\r\n): DefaultChartDataOptionsBuilder {\r\n const seriesOptionsBuilder = new ChartSeriesDataOptionsBuilder(dataAdapter, drillDownHandler);\r\n\r\n const pointOptionsBuilder = new ChartPointDataOptionsBuilder(\r\n dataAdapter,\r\n seriesOptionsBuilder\r\n );\r\n\r\n return new DefaultChartDataOptionsBuilder(\r\n dataOptions,\r\n dataAdapter,\r\n seriesOptionsBuilder,\r\n pointOptionsBuilder,\r\n columnMappings\r\n );\r\n}\r\n","import { FavouriteDataAdapter } from './favourite-data-adapter';\r\nimport { setTickInterval } from './utils';\r\n\r\n/**\r\n * Calculates number of rows in chart for given column\r\n * @param options \r\n * @param dataAdapter \r\n * @param axisColumn \r\n */\r\nexport const getNumberOfRows = (options: Highcharts.Options, dataAdapter: FavouriteDataAdapter, axisColumn: number) => {\r\n\r\n let numberOfCategories = dataAdapter.hasCategories(axisColumn)\r\n ? dataAdapter.columnCategories[axisColumn].length\r\n : 0;\r\n\r\n const { columns, rows } = dataAdapter.dataModel;\r\n\r\n if (numberOfCategories === 0 && rows\r\n && columns && columns[axisColumn] && columns[axisColumn].dataType === 'Date') {\r\n\r\n const rowsWithValues = rows.filter(row => row[axisColumn] && row[axisColumn].value);\r\n\r\n if (rowsWithValues.length > 1) {\r\n\r\n const firstRowValue = rowsWithValues[0][axisColumn].value;\r\n const lastRowValue = rowsWithValues[rowsWithValues.length - 1][axisColumn].value;\r\n\r\n numberOfCategories = Math.ceil((lastRowValue - firstRowValue) / setTickInterval(columns[axisColumn].period));\r\n }\r\n }\r\n\r\n const stacking = options.plotOptions\r\n && options.plotOptions.bar\r\n && (options.plotOptions as any).stacking !== null;\r\n\r\n const numberOfSeries = stacking ? 1 : options.series.length;\r\n\r\n return numberOfCategories * numberOfSeries;\r\n};\r\n","import { ChartDataOptionsBuilder } from './chart-data-options-builder';\r\nimport {\r\n createDefaultChartDataOptionsBuilder,\r\n DefaultChartDataOptionsBuilder\r\n} from './default-chart-data-options-builder';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport { FavouriteDataOptions } from '../common/favourite-data-options';\r\nimport { FavouriteRowValue } from '../common/favourite-interfaces';\r\nimport { DrillDownHandler } from '../common/drill-down-builder';\r\nimport { stackingOptions } from '../../constants';\r\nimport { ChartLayoutConfig } from '../common/layout-config';\r\nimport { getNumberOfRows } from '../common/chart-rows';\r\nimport { SeriesTypeColumnMappings } from 'app/components/favourite-layout/favourite/chart-data-options/types';\r\n\r\nexport class BarChartDataOptionsBuilder implements ChartDataOptionsBuilder {\r\n private columnMappings: SeriesTypeColumnMappings = {\r\n mainSeries: {\r\n sel1: 'x',\r\n sel2: 'series',\r\n sel3: 'splitting',\r\n aggregation: 'y'\r\n },\r\n rollingAverageSeries: {\r\n sel1: 'x',\r\n sel2: 'series',\r\n sel3: 'splitting',\r\n aggregationRollAvg: 'y'\r\n },\r\n targetSeries: {\r\n sel1: 'x',\r\n sel2: 'series',\r\n sel3: 'splitting',\r\n target: 'y'\r\n }\r\n };\r\n\r\n private chartDataOptionsBuilder: DefaultChartDataOptionsBuilder;\r\n private chartDataOptions: Highcharts.Options;\r\n\r\n constructor(dataOptions: FavouriteDataOptions, dataAdapter: FavouriteDataAdapter, drillDownHandler: DrillDownHandler) {\r\n this.chartDataOptionsBuilder = createDefaultChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler, this.columnMappings);\r\n this.chartDataOptionsBuilder.getAxisMin = (c, d) => this.getAxisMin(c, d);\r\n this.chartDataOptionsBuilder.getAxisMax = (c, d) => this.getAxisMax(c, d);\r\n this.chartDataOptionsBuilder.getExtraGraphHeight = this.getExtraGraphHeight;\r\n }\r\n\r\n public setOptions(options: Highcharts.Options, splitRow: FavouriteRowValue, seriesValues: FavouriteRowValue[]) {\r\n this.chartDataOptions = options;\r\n this.chartDataOptionsBuilder.setOptions(options, splitRow, seriesValues);\r\n }\r\n\r\n private getStackingOptionValue() {\r\n const { bar: { stacking } = { stacking: undefined } } = this.chartDataOptions.plotOptions;\r\n return stacking;\r\n }\r\n\r\n public colIndexOf(typeName: string, seriesType: string) {\r\n return this.chartDataOptionsBuilder.colIndexOf(typeName, seriesType);\r\n }\r\n\r\n private getAxisMin(colIndex: number, dataAdapter: FavouriteDataAdapter): number {\r\n const stackingOption = this.getStackingOptionValue();\r\n if (stackingOption === stackingOptions.PERCENT) {\r\n return 0;\r\n }\r\n\r\n return dataAdapter.columnExtremes[colIndex].min;\r\n }\r\n\r\n private getAxisMax(colIndex: number, dataAdapter: FavouriteDataAdapter): number {\r\n const stackingOption = this.getStackingOptionValue();\r\n\r\n if (stackingOption === stackingOptions.PERCENT) {\r\n return 100;\r\n } else if (stackingOption === stackingOptions.NORMAL) {\r\n //Because of stacking. \r\n let max = 0;\r\n\r\n for (const category of dataAdapter.columnCategories[0]) {\r\n let categorySum = 0;\r\n\r\n for (const row of dataAdapter.dataModel.rows) {\r\n if (row[0].value === category.value) {\r\n categorySum += row[colIndex].value;\r\n }\r\n }\r\n\r\n if (max < categorySum) {\r\n max = categorySum;\r\n }\r\n }\r\n return max;\r\n }\r\n\r\n return dataAdapter.columnExtremes[colIndex].max;\r\n }\r\n\r\n private getExtraGraphHeight(options: Highcharts.Options, dataAdapter: FavouriteDataAdapter) {\r\n\r\n const config = dataAdapter.layoutConfig as ChartLayoutConfig;\r\n\r\n const rowHeight = config.chartStyle('barChartHeightGrowthPerBar');\r\n const allowedNumberOfRows = config.chartStyle('barChartHeightGrowIfMoreThan') || 0;\r\n const xColumnIndex = this.colIndexOf('x', 'mainSeries');\r\n\r\n return rowHeight\r\n ? Math.max(rowHeight * (getNumberOfRows(options, dataAdapter, xColumnIndex) - allowedNumberOfRows), 0)\r\n : 0;\r\n }\r\n}\r\n","import { ChartDataOptionsBuilder } from './chart-data-options-builder';\r\nimport {\r\n createDefaultChartDataOptionsBuilder,\r\n DefaultChartDataOptionsBuilder\r\n} from './default-chart-data-options-builder';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport { FavouriteDataOptions } from '../common/favourite-data-options';\r\nimport { FavouriteRowValue } from '../common/favourite-interfaces';\r\nimport { DrillDownHandler } from '../common/drill-down-builder';\r\nimport { escapeHtml } from '../common/utils';\r\nimport { SeriesTypeColumnMappings } from 'app/components/favourite-layout/favourite/chart-data-options/types';\r\n\r\nimport partial from 'lodash/partial';\r\n\r\nexport class PieChartDataOptionsBuilder implements ChartDataOptionsBuilder {\r\n private dataAdapter: FavouriteDataAdapter;\r\n private columnMappings: SeriesTypeColumnMappings = {\r\n mainSeries: {\r\n sel1: 'x',\r\n sel2: 'splitting',\r\n aggregation: 'y'\r\n }\r\n };\r\n\r\n private chartDataOptionsBuilder: DefaultChartDataOptionsBuilder;\r\n\r\n constructor(dataOptions: FavouriteDataOptions, dataAdapter: FavouriteDataAdapter, drillDownHandler: DrillDownHandler) {\r\n this.dataAdapter = dataAdapter;\r\n\r\n this.dataAdapter.hasTarget = () => false; // Not supported for pie\r\n this.dataAdapter.hasRollingAverage = () => false; // Not supported for pie\r\n\r\n this.chartDataOptionsBuilder = createDefaultChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler, this.columnMappings);\r\n this.chartDataOptionsBuilder.isLegendEnabled = () => true;\r\n this.chartDataOptionsBuilder.useLegendTitle = () => true;\r\n }\r\n\r\n public setOptions(options: Highcharts.Options, splitRow: FavouriteRowValue, seriesValues: FavouriteRowValue[]) {\r\n this.chartDataOptionsBuilder.setOptions(options, splitRow, seriesValues);\r\n this.defineAggregationValueFormatter(options);\r\n }\r\n\r\n public colIndexOf(typeName: string, seriesType: string) {\r\n return this.chartDataOptionsBuilder.colIndexOf(typeName, seriesType);\r\n }\r\n\r\n private defineAggregationValueFormatter(options: Highcharts.Options): void {\r\n\r\n // The values inside the pie\r\n options.plotOptions.pie = options.plotOptions.pie || {};\r\n options.plotOptions.pie.dataLabels = options.plotOptions.pie.dataLabels || {};\r\n\r\n options.plotOptions.pie.dataLabels.format = undefined;\r\n\r\n const dataAdapter = this.dataAdapter;\r\n const percentageFormatter = dataAdapter.buildNumberFormatter(dataAdapter.intl, true, 1, 'percent');\r\n\r\n const chartDataOptionsBuilder = this.chartDataOptionsBuilder;\r\n const colIndexOf = (typeName: string, seriesType: string) => this.colIndexOf(typeName, seriesType);\r\n\r\n // tslint:disable\r\n options.plotOptions.pie.dataLabels.formatter = function () {\r\n const hidePointName = !!this.series.chart.options.plotOptions.pie.showInLegend;\r\n const label = hidePointName ? '' : escapeHtml(this.point.name) + ': ';\r\n const labelValue = '<b>' + escapeHtml(\r\n dataAdapter.format(dataAdapter.aggrColIndex, this.point.y)) + ' (' + percentageFormatter(this.percentage) + ')</b>';\r\n const xColIndex = colIndexOf('x', 'mainSeries');\r\n if (chartDataOptionsBuilder.useHtml(xColIndex)) {\r\n // try to find a category corresponding to the value, and check if it has an icon\r\n const found = dataAdapter.columnCategories[xColIndex].find(\r\n partial(\r\n (catName, xColInner, current) => {\r\n return catName === dataAdapter.format(xColInner, current.value || (current as any).Value);\r\n },\r\n this.point.name, xColIndex\r\n ));\r\n if (found) {\r\n const extraHtml = chartDataOptionsBuilder.createIconOrColourDiv(xColIndex, found, false);\r\n if (extraHtml.length > 0) {\r\n return extraHtml + ' ' + chartDataOptionsBuilder.addSpanWrapper(label + labelValue, this.DEFAULT_ICON_DIMENSIONS);\r\n }\r\n }\r\n }\r\n return label + labelValue;\r\n };\r\n // tslint:enable\r\n\r\n const xCol = colIndexOf('x', 'mainSeries');\r\n if (chartDataOptionsBuilder.useHtml(xCol)) { // Use HTML labels if we have icons to display\r\n options.plotOptions.pie.dataLabels.useHTML = true;\r\n }\r\n }\r\n}\r\n","import { ChartDataOptionsBuilder } from './chart-data-options-builder';\r\nimport {\r\n createDefaultChartDataOptionsBuilder,\r\n DefaultChartDataOptionsBuilder\r\n} from './default-chart-data-options-builder';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport { FavouriteDataOptions } from '../common/favourite-data-options';\r\nimport { FavouriteRowValue } from '../common/favourite-interfaces';\r\nimport { DrillDownHandler } from '../common/drill-down-builder';\r\nimport { SeriesTypeColumnMappings } from 'app/components/favourite-layout/favourite/chart-data-options/types';\r\n\r\nexport class LineAndColumnChartDataOptionsBuilder implements ChartDataOptionsBuilder {\r\n private columnMappings: SeriesTypeColumnMappings = {\r\n mainSeries: {\r\n sel1: 'x',\r\n sel2: 'series',\r\n sel3: 'splitting',\r\n aggregation: 'y'\r\n },\r\n rollingAverageSeries: {\r\n sel1: 'x',\r\n sel2: 'series',\r\n sel3: 'splitting',\r\n aggregationRollAvg: 'y'\r\n },\r\n targetSeries: {\r\n sel1: 'x',\r\n sel2: 'series',\r\n sel3: 'splitting',\r\n target: 'y'\r\n }\r\n };\r\n\r\n private chartDataOptionsBuilder: DefaultChartDataOptionsBuilder;\r\n\r\n constructor(dataOptions: FavouriteDataOptions, dataAdapter: FavouriteDataAdapter, drillDownHandler: DrillDownHandler) {\r\n this.chartDataOptionsBuilder = createDefaultChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler, this.columnMappings);\r\n }\r\n\r\n public setOptions(options: Highcharts.Options, splitRow: FavouriteRowValue, seriesValues: FavouriteRowValue[]) {\r\n this.chartDataOptionsBuilder.setOptions(options, splitRow, seriesValues);\r\n }\r\n\r\n public colIndexOf(typeName: string, seriesType: string) {\r\n return this.chartDataOptionsBuilder.colIndexOf(typeName, seriesType);\r\n }\r\n}\r\n","import { ChartDataOptionsBuilder } from './chart-data-options-builder';\r\nimport {\r\n createDefaultChartDataOptionsBuilder,\r\n DefaultChartDataOptionsBuilder\r\n} from './default-chart-data-options-builder';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport { FavouriteDataOptions } from '../common/favourite-data-options';\r\nimport { FavouriteRowValue } from '../common/favourite-interfaces';\r\nimport { DrillDownHandler } from '../common/drill-down-builder';\r\nimport { AxisOptions } from 'highcharts';\r\nimport { ChartLayoutConfig } from '../common/layout-config';\r\nimport { getNumberOfRows } from '../common/chart-rows';\r\nimport { SeriesTypeColumnMappings } from 'app/components/favourite-layout/favourite/chart-data-options/types';\r\n\r\nexport class HeatmapChartDataOptionsBuilder implements ChartDataOptionsBuilder {\r\n\r\n private dataOptions: FavouriteDataOptions;\r\n private dataAdapter: FavouriteDataAdapter;\r\n private columnMappings: SeriesTypeColumnMappings = {\r\n mainSeries: {\r\n sel1: 'x',\r\n sel2: 'y',\r\n sel3: 'splitting',\r\n aggregation: 'value'\r\n }\r\n };\r\n\r\n public hasYAxis: boolean;\r\n\r\n private chartDataOptionsBuilder: DefaultChartDataOptionsBuilder;\r\n\r\n constructor(dataOptions: FavouriteDataOptions, dataAdapter: FavouriteDataAdapter, drillDownHandler: DrillDownHandler) {\r\n this.dataOptions = dataOptions;\r\n this.dataAdapter = dataAdapter;\r\n\r\n this.dataAdapter.hasTarget = () => false; // Not supported for heatmap\r\n this.dataAdapter.hasCategories = this.hasCategories;\r\n this.chartDataOptionsBuilder = createDefaultChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler, this.columnMappings);\r\n\r\n const yCol = this.colIndexOf('y', 'mainSeries');\r\n if (yCol >= 0) {\r\n this.hasYAxis = true;\r\n if (this.dataAdapter.hasCategories(yCol)) {\r\n // It looks better to reverse the ordering of y-axis categories in a heatmap if we have a \"real\" category axis\r\n this.dataAdapter.columnCategories[yCol].reverse();\r\n }\r\n }\r\n\r\n this.chartDataOptionsBuilder.pointDataOptionsBuilder.addStaticDataPointProperties = this.addStaticDataPointProperties;\r\n this.chartDataOptionsBuilder.pointDataOptionsBuilder.ignoreNullValuesForDataPoints = this.ignoreNullValuesForDataPoints;\r\n this.chartDataOptionsBuilder.seriesDataOptionsBuilder.shouldAddColorToDataPoint = this.shouldAddColorToDataPoint;\r\n this.chartDataOptionsBuilder.seriesDataOptionsBuilder.shouldAdjustDataPointLabelColor = this.shouldAdjustDataPointLabelColor;\r\n this.chartDataOptionsBuilder.isLegendEnabled = this.isLegendEnabled;\r\n this.chartDataOptionsBuilder.useLegendTitle = this.useLegendTitle;\r\n this.chartDataOptionsBuilder.createAxisHandler = this.createAxis;\r\n this.chartDataOptionsBuilder.createFakeAxisHandler = this.createFakeAxis;\r\n this.chartDataOptionsBuilder.legendTitleHandler = this.legendTitle;\r\n this.chartDataOptionsBuilder.getExtraGraphHeight = this.getExtraGraphHeight;\r\n }\r\n\r\n public setOptions(options: Highcharts.Options, splitRow: FavouriteRowValue, seriesValues: FavouriteRowValue[]) {\r\n this.chartDataOptionsBuilder.setOptions(options, splitRow, seriesValues);\r\n this.defineAggregationValueFormatter(options);\r\n }\r\n\r\n public colIndexOf(typeName: string, seriesType: string) {\r\n return this.chartDataOptionsBuilder.colIndexOf(typeName, seriesType);\r\n }\r\n\r\n private defineAggregationValueFormatter(options: any): void {\r\n\r\n const dataAdapter = this.dataAdapter;\r\n\r\n options.series[0].dataLabels = options.series[0].dataLabels || {};\r\n options.series[0].dataLabels.formatter = function () {\r\n return dataAdapter.format(dataAdapter.aggrColIndex, this.point.value);\r\n };\r\n }\r\n\r\n private createFakeAxis = (options: Highcharts.Options, axisType: string) => {\r\n const axisObj: AxisOptions = {\r\n title: {\r\n text: ''\r\n },\r\n type: 'categories',\r\n categories: ['']\r\n };\r\n options[axisType + 'Axis'] = axisObj;\r\n }\r\n\r\n private createAxis = (colIndex: number, axisObj: Highcharts.AxisOptions, axisName: string) => {\r\n if (this.dataAdapter.hasCategories(colIndex)) {\r\n // Workaround provided by Highcharts for a bug\r\n // https://github.com/highslide-software/highcharts.com/issues/4385#issuecomment-120926087\r\n // http://jsfiddle.net/61343dsm/4/\r\n axisObj.tickPositioner = function () {\r\n const positions: number[] = [];\r\n // tslint:disable-next-line\r\n let tick = Math.floor(this.min);\r\n const increment = 1;\r\n\r\n // tslint:disable-next-line\r\n for (tick; tick - increment < this.max; tick += increment) {\r\n positions.push(tick);\r\n }\r\n return positions;\r\n };\r\n }\r\n }\r\n\r\n private useDataPointColors = () => {\r\n const config = this.dataAdapter.layoutConfig as ChartLayoutConfig;\r\n const useDataPointColors = config.chartStyle('heatmapUseDataPointColors');\r\n\r\n return useDataPointColors === true;\r\n }\r\n\r\n private shouldAdjustDataPointLabelColor = () => {\r\n return this.useDataPointColors();\r\n };\r\n\r\n private isLegendEnabled = () => {\r\n return !this.useDataPointColors();\r\n };\r\n\r\n private useLegendTitle = () => {\r\n return !this.useDataPointColors();\r\n };\r\n\r\n private legendTitle = (seriesCol: number): string => {\r\n return this.dataOptions.getColumnTitle(this.colIndexOf('value', 'mainSeries'), 'legend');\r\n }\r\n\r\n private shouldAddColorToDataPoint = (seriesIndex: number) => {\r\n return this.useDataPointColors();\r\n }\r\n\r\n private addStaticDataPointProperties = (dataPoint: Highcharts.DataPoint) => {\r\n if (!this.hasYAxis) {\r\n dataPoint.y = 0;\r\n }\r\n }\r\n\r\n private ignoreNullValuesForDataPoints = (axisColIndex: number): boolean => {\r\n // Use super.hasCategories to check for datatype the ordinary way\r\n return !this.dataAdapter.hasCategories(axisColIndex);\r\n }\r\n\r\n private hasCategories = (axisColIndex: number): boolean => {\r\n return axisColIndex >= 0;\r\n }\r\n\r\n private getExtraGraphHeight(options: Highcharts.Options, dataAdapter: FavouriteDataAdapter) {\r\n\r\n const config = dataAdapter.layoutConfig as ChartLayoutConfig;\r\n\r\n const rowHeight = config.chartStyle('heatmapHeightGrowthYAxisCategory');\r\n const allowedNumberOfRows = config.chartStyle('heatmapHeightGrowIfMoreThan') || 0;\r\n const yColumnIndex = this.colIndexOf('y', 'mainSeries');\r\n\r\n return rowHeight\r\n ? Math.max(rowHeight * (getNumberOfRows(options, dataAdapter, yColumnIndex) - allowedNumberOfRows), 0)\r\n : 0;\r\n }\r\n}\r\n","import { FavouriteDataAdapter } from './favourite-data-adapter';\r\nimport { LayoutConfig } from './layout-config';\r\n\r\nexport class FavouriteDataOptions {\r\n public layoutConfig: LayoutConfig;\r\n public dataAdapter: FavouriteDataAdapter;\r\n\r\n private columnTitles: any = {};\r\n\r\n constructor(config: LayoutConfig, dataAdapter: FavouriteDataAdapter) {\r\n this.layoutConfig = config;\r\n this.dataAdapter = dataAdapter;\r\n }\r\n\r\n private columnTitleSetting(columnIndex: number, setting: string, section: string): any {\r\n const columnType = this.dataAdapter.columnType(columnIndex);\r\n const colTitles = this.layoutConfig.layoutAttributes.columnTitles;\r\n if (colTitles) {\r\n if (colTitles[section] && colTitles[section][columnType] && colTitles[section][columnType][setting] !== undefined) {\r\n return colTitles[section][columnType][setting];\r\n }\r\n if (colTitles[section] && colTitles[section][setting] !== undefined) {\r\n return colTitles[section][setting];\r\n }\r\n if (colTitles[columnType] && colTitles[columnType][setting] !== undefined) {\r\n return colTitles[columnType][setting];\r\n }\r\n if (colTitles[setting] !== undefined) {\r\n return colTitles[setting];\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n public disableColumnTitle(columnIndex: number, section: string): boolean {\r\n return this.columnTitleSetting(columnIndex, 'disableTitle', section) === true;\r\n }\r\n\r\n public showLongColumnDescription(columnIndex: number, section: string): boolean {\r\n return this.columnTitleSetting(columnIndex, 'showLongDescription', section) === true;\r\n }\r\n\r\n public showExtraColumnText(columnIndex: number, section: string): boolean {\r\n if (this.dataAdapter.columnType(columnIndex) === 'selection') {\r\n const col = this.dataAdapter.dataModel.columns[columnIndex];\r\n const ids = (this.columnTitleSetting(columnIndex, 'hideExtraTextForSelectionTypes', section) || '').toString().split(',');\r\n const selectionTypes: number[] = [];\r\n for (let i = 0; i < ids.length; i++) {\r\n selectionTypes.push(parseInt(ids[i], 10));\r\n }\r\n if (col && (selectionTypes.indexOf(col.selectionType) >= 0)) {\r\n return false;\r\n }\r\n }\r\n return this.columnTitleSetting(columnIndex, 'showExtraText', section) === true;\r\n }\r\n\r\n public getColumnTitle(colIndex: number, section?: string, append: boolean = true): string {\r\n if (colIndex >= this.dataAdapter.dataModel.columns.length) {\r\n return '';\r\n }\r\n\r\n if (!section) {\r\n section = 'default';\r\n }\r\n\r\n if (!this.columnTitles[section] || !this.columnTitles[section][colIndex]) {\r\n if (!this.columnTitles[section]) {\r\n this.columnTitles[section] = [];\r\n this.columnTitles[section].length = this.dataAdapter.dataModel.columns.length;\r\n }\r\n\r\n const column = this.dataAdapter.dataModel.columns[colIndex];\r\n if (!column) {\r\n return undefined;\r\n }\r\n\r\n if (this.disableColumnTitle(colIndex, section)) {\r\n return null;\r\n }\r\n\r\n let text = column.shortText || '';\r\n if (this.showLongColumnDescription(colIndex, section)) {\r\n text = column.text || text;\r\n }\r\n\r\n if (column.extraText && this.showExtraColumnText(colIndex, section)) {\r\n text += (text.length > 0 ? ', ' : '') + column.extraText;\r\n }\r\n\r\n if (column.columnType === 'aggregationRollAvg' && column.rollingAverageText) {\r\n text = column.rollingAverageText;\r\n } else if (column.columnType === 'target' && column.targetText) {\r\n text = column.targetText + (append ? ' - ' + text : '');\r\n }\r\n\r\n this.columnTitles[section][colIndex] = text;\r\n }\r\n return this.columnTitles[section][colIndex];\r\n }\r\n}\r\n","import ResizeSensor from 'resize-sensor';\r\nimport { FavouriteLayoutAttributes } from '../../types';\r\nimport { FavouriteRowValue, FavouriteDataModel } from './favourite-interfaces';\r\nimport { FavouriteModelComponent } from './favourite-model-component';\r\nimport { ChartLayoutConfig } from './layout-config';\r\nimport {\r\n createChartLayoutOptionsBuilder\r\n} from '../chart-layout-options/chart-layout-options-builder-factory';\r\nimport {\r\n createChartDataOptionsBuilder\r\n} from '../chart-data-options/chart-data-options-builder-factory';\r\nimport { FavouriteDataOptions } from './favourite-data-options';\r\nimport { ErrorHandler } from './error-handler';\r\n\r\nimport clone from 'clone';\r\nimport Highcharts from 'highcharts';\r\n\r\nimport { debug } from 'app/infrastructure/log';\r\nimport { ChartLayoutOptionsBuilder } from 'app/components/favourite-layout/favourite/chart-layout-options/chart-layout-options-builder';\r\nimport { ChartDataOptionsBuilder } from 'app/components/favourite-layout/favourite/chart-data-options/chart-data-options-builder';\r\nimport { DrillDownCallback, CaseViewCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nimport merge from 'lodash/merge';\r\n\r\nconst heatmap: any = require('highcharts/modules/heatmap');\r\nheatmap(Highcharts);\r\n\r\nconst highchartsExporting = require('highcharts/modules/exporting');\r\nhighchartsExporting(Highcharts);\r\n\r\n(window as any).jsPDF = require('jspdf-yworks');\r\n(window as any).svg2pdf = require('svg2pdf.js');\r\n\r\nconst highchartsOfflineExporting = require('highcharts/modules/offline-exporting');\r\nhighchartsOfflineExporting(Highcharts);\r\n\r\nexport class ChartFavouriteModelComponent extends FavouriteModelComponent {\r\n private chartLayoutOptionsBuilder: ChartLayoutOptionsBuilder;\r\n private sharedHighchartsOptions: Highcharts.Options;\r\n private chartElement: HTMLElement;\r\n private chart: Highcharts.ChartObject;\r\n\r\n constructor(layoutAttributes: FavouriteLayoutAttributes, intl: any, translation: any,\r\n errorHandler: ErrorHandler, drillDown: DrillDownCallback, caseview: CaseViewCallback) {\r\n super(new ChartLayoutConfig(layoutAttributes), intl, translation, errorHandler, drillDown, caseview);\r\n\r\n this.chartLayoutOptionsBuilder = createChartLayoutOptionsBuilder(this.config as ChartLayoutConfig);\r\n this.sharedHighchartsOptions = this.createHighchartsOptions(intl);\r\n }\r\n\r\n private createHighchartsOptions(intl: any): Highcharts.Options {\r\n const options: Highcharts.Options = {\r\n title: { text: '' },\r\n series: [],\r\n credits: { enabled: false }\r\n };\r\n\r\n if (this.chartLayoutOptionsBuilder) {\r\n this.chartLayoutOptionsBuilder.setOptions(options);\r\n }\r\n\r\n // Override and merge any options that come from layout attributes.\r\n this.mergeStaticConfig(options);\r\n\r\n return options;\r\n }\r\n\r\n public setChartElement(element: HTMLElement) {\r\n\r\n this.chartElement = element;\r\n\r\n if (!this.chart) {\r\n this.createChart(element);\r\n // tslint:disable-next-line:no-unused-expression\r\n new ResizeSensor(element.parentElement, () => this.reflowChart());\r\n }\r\n }\r\n\r\n private createChart(element: HTMLElement) {\r\n Highcharts.chart(element, clone(this.sharedHighchartsOptions), (createdChart: Highcharts.ChartObject) => {\r\n this.chart = createdChart;\r\n this.chart.showLoading();\r\n });\r\n }\r\n\r\n public receiveData(dataModel: FavouriteDataModel) {\r\n super.receiveData(dataModel);\r\n\r\n if (this.chart) {\r\n this.chart.destroy();\r\n }\r\n\r\n this.addLoadingOnDrillDown();\r\n const dataOptions = new FavouriteDataOptions(this.config as ChartLayoutConfig, this.dataAdapter);\r\n const chartDataOptionsBuilder =\r\n createChartDataOptionsBuilder(dataOptions, this.dataAdapter, this.drillDownHandler, this.config as ChartLayoutConfig);\r\n\r\n const splitRows = this.split(chartDataOptionsBuilder);\r\n const seriesValues = this.series(dataOptions, chartDataOptionsBuilder);\r\n\r\n for (let i = 0; i < splitRows.length; i++) {\r\n if (i > 0) {\r\n break; //TODO: Implement multichart split support.\r\n }\r\n\r\n const options = clone(this.sharedHighchartsOptions);\r\n chartDataOptionsBuilder.setOptions(options, splitRows[i], seriesValues);\r\n\r\n // Override and merge any options that come from layout attributes.\r\n this.mergeStaticConfig(options);\r\n Highcharts.chart(this.chartElement, options, (createdChart: Highcharts.ChartObject) => {\r\n this.chart = createdChart;\r\n });\r\n }\r\n\r\n this.chart.hideLoading();\r\n }\r\n\r\n public receiveLayout(layoutAttributes: FavouriteLayoutAttributes) {\r\n this.config = new ChartLayoutConfig(layoutAttributes);\r\n this.chartLayoutOptionsBuilder = createChartLayoutOptionsBuilder(this.config as ChartLayoutConfig);\r\n this.sharedHighchartsOptions = this.createHighchartsOptions(this.intl);\r\n }\r\n\r\n private addLoadingOnDrillDown() {\r\n const originalDrillDownFunction = this.drillDownHandler.toCaseListing.bind(this.drillDownHandler);\r\n this.drillDownHandler.toCaseListing = rowIndex => this.onDrillDownToCaseListing(rowIndex, originalDrillDownFunction);\r\n }\r\n\r\n private onDrillDownToCaseListing(rowIndex: number, drillDownFunction: any) {\r\n this.chart.showLoading();\r\n\r\n drillDownFunction(rowIndex);\r\n }\r\n\r\n public reflowChart() {\r\n if (this.chart) {\r\n this.chart.reflow();\r\n }\r\n }\r\n\r\n private mergeStaticConfig(options: Highcharts.Options): Highcharts.Options {\r\n return merge(options, this.config.layoutAttributes.Highcharts);\r\n }\r\n\r\n private split(chartDataOptionsBuilder: ChartDataOptionsBuilder): FavouriteRowValue[] {\r\n return this.splitOrSeriesCategories('splitting', this.dataAdapter.dataModel.description, chartDataOptionsBuilder);\r\n }\r\n\r\n private series(dataOptions: FavouriteDataOptions, chartDataOptionsBuilder: ChartDataOptionsBuilder): FavouriteRowValue[] {\r\n return this.splitOrSeriesCategories(\r\n 'series',\r\n dataOptions.getColumnTitle(chartDataOptionsBuilder.colIndexOf('x', 'mainSeries'), 'series'),\r\n chartDataOptionsBuilder\r\n );\r\n }\r\n\r\n private splitOrSeriesCategories(col: string, fallback: string, chartDataOptionsBuilder: ChartDataOptionsBuilder): FavouriteRowValue[] {\r\n const colIndex = chartDataOptionsBuilder.colIndexOf(col, 'mainSeries');\r\n if (colIndex >= 0) {\r\n return this.dataAdapter.columnCategories[colIndex];\r\n } else {\r\n return [{ value: fallback } as FavouriteRowValue];\r\n }\r\n }\r\n\r\n public destroy() {\r\n try {\r\n if (this.chart && this.chart.destroy) {\r\n this.chart.destroy();\r\n }\r\n } catch (e) {\r\n debug('Error destroying chart', e);\r\n }\r\n this.chart = null;\r\n\r\n if (this.chartElement) {\r\n ResizeSensor.detach(this.chartElement.parentElement);\r\n }\r\n this.chartElement = null;\r\n }\r\n}\r\n","import { ChartLayoutConfig } from '../common/layout-config';\r\nimport { BarChartDataOptionsBuilder } from './bar-chart-data-options-builder';\r\nimport { PieChartDataOptionsBuilder } from './pie-chart-data-options-builder';\r\nimport { LineAndColumnChartDataOptionsBuilder } from './line-and-column-chart-data-options-builder';\r\nimport { HeatmapChartDataOptionsBuilder } from './heatmap-chart-data-options-builder';\r\nimport { FavouriteDataAdapter } from '../common/favourite-data-adapter';\r\nimport { FavouriteDataOptions } from '../common/favourite-data-options';\r\nimport { DrillDownHandler } from '../common/drill-down-builder';\r\nimport { chartType } from '../../constants';\r\nimport { ChartDataOptionsBuilder } from 'app/components/favourite-layout/favourite/chart-data-options/chart-data-options-builder';\r\n\r\nexport function createChartDataOptionsBuilder(\r\n dataOptions: FavouriteDataOptions,\r\n dataAdapter: FavouriteDataAdapter,\r\n drillDownHandler: DrillDownHandler,\r\n layoutConfig: ChartLayoutConfig\r\n): ChartDataOptionsBuilder {\r\n switch (layoutConfig.chartType()) {\r\n case chartType.LINE:\r\n case chartType.COLUMN:\r\n return new LineAndColumnChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler);\r\n case chartType.BAR:\r\n return new BarChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler);\r\n case chartType.PIE:\r\n return new PieChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler);\r\n case chartType.HEATMAP:\r\n return new HeatmapChartDataOptionsBuilder(dataOptions, dataAdapter, drillDownHandler);\r\n default:\r\n return null;\r\n }\r\n}\r\n","import { ChartFavouriteModelComponent } from '../common/chart-favourite-model-component';\r\nimport { createChartFavouriteModelComponent } from '../common/create-model-component';\r\nimport { ErrorHandler } from '../common/error-handler';\r\nimport { FavouriteLayoutAttributes } from '../../types';\r\nimport { DrillDownCallback, CaseViewCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport function createReactChartFavouriteModelComponent(\r\n layoutAttributes: FavouriteLayoutAttributes,\r\n drillDown: DrillDownCallback,\r\n caseview: CaseViewCallback, \r\n intl: any,\r\n translation: any,\r\n errorHandler: ErrorHandler\r\n): ChartFavouriteModelComponent {\r\n if (!layoutAttributes) {\r\n return undefined;\r\n }\r\n return createChartFavouriteModelComponent(layoutAttributes, intl, translation, errorHandler, drillDown, caseview);\r\n //TODO: Implement context menu.\r\n /*\r\n if (modelComponent !== null && modelComponent !== undefined) {\r\n var context = new (<any>Favourite).FavouriteContextMenu(presentationModel, drillDown);\r\n context.registerContextMenu($panelControl);\r\n }\r\n */\r\n\r\n //return modelComponent;\r\n}\r\n","import { ChartFavouriteModelComponent } from './chart-favourite-model-component';\r\nimport { ErrorHandler } from './error-handler';\r\nimport { FavouriteLayoutAttributes } from '../../types';\r\nimport { DrillDownCallback, CaseViewCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport function createChartFavouriteModelComponent(\r\n layoutAttributes: FavouriteLayoutAttributes,\r\n intl: any,\r\n translation: any,\r\n errorHandler: ErrorHandler,\r\n drillDown: DrillDownCallback,\r\n caseview: CaseViewCallback\r\n): ChartFavouriteModelComponent {\r\n return new ChartFavouriteModelComponent(\r\n layoutAttributes, intl, translation, errorHandler, drillDown, caseview);\r\n}\r\n","import * as React from 'react';\r\nimport { FavouriteLayoutComponentProps, FavouriteLayoutAttributes } from './types';\r\nimport { ChartFavouriteModelComponent } from './favourite/common/chart-favourite-model-component';\r\nimport { ChartLayoutConfig } from './favourite/common/layout-config';\r\nimport { createReactChartFavouriteModelComponent } from './favourite/react/react-favourite-model-component-factory';\r\nimport { chartType } from './constants';\r\n\r\nexport class ChartFavourite extends React.Component<FavouriteLayoutComponentProps> {\r\n private model: ChartFavouriteModelComponent;\r\n private ref:HTMLElement;\r\n constructor(props: FavouriteLayoutComponentProps) {\r\n super(props);\r\n this.model = this.prepareModel(props.layoutAttributes, props.intl, props.translation);\r\n }\r\n\r\n private prepareModel(layoutAttributes: FavouriteLayoutAttributes, intl: any, translation: any) {\r\n return createReactChartFavouriteModelComponent(\r\n layoutAttributes,\r\n this.props.drillDown,\r\n this.props.caseview,\r\n intl,\r\n translation,\r\n null\r\n );\r\n }\r\n\r\n private expandWidth = (props: FavouriteLayoutComponentProps) => {\r\n const {favouriteDataModel} = props;\r\n const isRiskMatrix = !!props.layoutAttributes['HighchartsStyle.heatmapUseDataPointColors'];\r\n\r\n if (this.getChartTypeFromConfig() === chartType.HEATMAP\r\n && favouriteDataModel\r\n && this.props.requestCustomWidth\r\n && !isRiskMatrix) {\r\n\r\n this.props.requestCustomWidth(favouriteDataModel.id, Math.ceil(favouriteDataModel.rows.length / 15) * 500);\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n if (this.isChartTypeSupported() && this.props.favouriteDataModel) {\r\n this.model.receiveData(this.props.favouriteDataModel);\r\n this.expandWidth(this.props);\r\n }\r\n window.addEventListener('beforeprint', this.fixSizeInPrint);\r\n window.addEventListener('afterprint', this.cleanupAfterPrint);\r\n }\r\n\r\n private fixSizeInPrint = () => {\r\n const container = this.ref.querySelector('.highcharts-container') as HTMLDivElement;\r\n if(container) {\r\n const graph = container.querySelector('svg') as SVGElement;\r\n\r\n const containerWidth = container.offsetWidth;\r\n const containerHeight = container.offsetHeight;\r\n const factor = containerHeight / containerWidth;\r\n\r\n const spans = container.querySelectorAll('span');\r\n spans.forEach(item => {\r\n if ( item.style.top && item.style.left) {\r\n item.setAttribute('data-left', item.style.left);\r\n item.setAttribute('data-top', item.style.top);\r\n item.style.left = (item.offsetLeft / containerWidth) * 100 + '%';\r\n item.style.top = (item.offsetTop / containerHeight) * 100 + '%';\r\n }\r\n });\r\n\r\n container.style.height = '0px';\r\n container.style.paddingBottom = factor*100+'%';\r\n\r\n graph.style.position = 'absolute';\r\n graph.style.height = '100%';\r\n }\r\n }\r\n\r\n private cleanupAfterPrint = () => {\r\n const container = this.ref.querySelector('.highcharts-container') as HTMLDivElement;\r\n if(container) {\r\n const graph = container.querySelector('svg') as SVGElement;\r\n\r\n const spans = container.querySelectorAll('span');\r\n\r\n spans.forEach(item => {\r\n item.style.left = item.getAttribute('data-left');\r\n item.style.top = item.getAttribute('data-top');\r\n item.removeAttribute('data-left');\r\n item.removeAttribute('data-top');\r\n });\r\n\r\n container.style.height = null;\r\n container.style.paddingBottom = null;\r\n\r\n graph.style.position = 'static';\r\n graph.style.height = null;\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps:FavouriteLayoutComponentProps) {\r\n let dirty: boolean = false;\r\n if (this.props.layoutAttributes) {\r\n if (prevProps.layoutAttributes !== this.props.layoutAttributes) {\r\n this.model.receiveLayout(this.props.layoutAttributes);\r\n dirty = true;\r\n }\r\n\r\n if (!this.props.fetchingDataModel && prevProps.favouriteDataModel !== this.props.favouriteDataModel) {\r\n\r\n this.expandWidth(this.props);\r\n this.model.receiveData(this.props.favouriteDataModel);\r\n dirty = true;\r\n }\r\n }\r\n\r\n if (dirty) {\r\n this.forceUpdate();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n if (this.model) {\r\n //Destroy chart before unmount.\r\n this.model.destroy();\r\n }\r\n\r\n window.removeEventListener('beforeprint', this.fixSizeInPrint);\r\n window.removeEventListener('afterprint', this.cleanupAfterPrint);\r\n }\r\n\r\n private getChartTypeFromConfig() {\r\n return (this.model.config as ChartLayoutConfig).chartType();\r\n }\r\n\r\n private isChartTypeSupported() {\r\n switch (this.getChartTypeFromConfig()) {\r\n case chartType.COLUMN:\r\n case chartType.PIE:\r\n case chartType.LINE:\r\n case chartType.BAR:\r\n case chartType.HEATMAP:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n private onChartElementReady = (element: HTMLElement) => {\r\n //If a render has happened, this might be null for older callbacks.\r\n if (element) {\r\n this.ref = element;\r\n this.model.setChartElement(element);\r\n }\r\n }\r\n\r\n public render() {\r\n return (\r\n this.isChartTypeSupported()\r\n ? <div>\r\n <div ref={this.onChartElementReady} />\r\n </div>\r\n : <div>{this.props.translation.chart_not_supported_type}</div>\r\n );\r\n }\r\n}\r\n","import { AggregationType } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\n\r\n/**\r\n * List of Aggregation Types that can be totalized\r\n */\r\nexport const CountableAggregationTypes = [\r\n AggregationType.Count,\r\n AggregationType.Total,\r\n AggregationType.Minimum,\r\n AggregationType.Maximum,\r\n AggregationType.DaysSinceLast,\r\n AggregationType.DaysSinceFirst\r\n];\r\n\r\nexport const textMappings = {\r\n minimum: 'MinText',\r\n maximum: 'MaxText',\r\n total: 'TotalText',\r\n noExposureValue: 'NoExposureValue',\r\n noTargetValue: 'NoTargetValue'\r\n};\r\n\r\nexport const configMappings = {\r\n suppressRepeatingRows: 'SuppressRepeatingRows',\r\n compactView: 'CompactView',\r\n hideAggrColumns: 'HideAggrColumns',\r\n hideHeader: 'HideHeader',\r\n hideTotals: 'HideTotals',\r\n wideLayout: 'WideLayout'\r\n};\r\n\r\nexport const tooltipSection = 'tootltip';\r\n","import { FavouriteModelComponent } from '../favourite/common/favourite-model-component';\r\nimport { FavouriteDataAdapter } from '../favourite/common/favourite-data-adapter';\r\nimport { FavouriteDataOptions } from '../favourite/common/favourite-data-options';\r\nimport { ErrorHandler } from '../favourite/common/error-handler';\r\nimport { LayoutConfig } from '../favourite/common/layout-config';\r\nimport { FavouriteLayoutAttributes } from '../types';\r\nimport { ColumnType } from '../constants';\r\nimport { textMappings, tooltipSection } from './constants';\r\nimport { FavouriteDataModel, AggregationType } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\nimport { CaseViewCallback, DrillDownCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport class TableFavouriteModelComponent extends FavouriteModelComponent {\r\n\r\n public dataAdapter: FavouriteDataAdapter;\r\n private dataOptions: FavouriteDataOptions;\r\n\r\n constructor(layoutAttributes: FavouriteLayoutAttributes, intl: any, translation: any,\r\n errorHandler: ErrorHandler, drillDown: DrillDownCallback, caseview: CaseViewCallback) {\r\n\r\n const config = new LayoutConfig(layoutAttributes);\r\n\r\n super(config, intl, translation, errorHandler, drillDown, caseview);\r\n\r\n this.dataOptions = new FavouriteDataOptions(config, this.dataAdapter);\r\n }\r\n\r\n public receiveData(dataModel: FavouriteDataModel) {\r\n super.receiveData(dataModel);\r\n\r\n this.dataOptions = new FavouriteDataOptions(this.config, this.dataAdapter);\r\n }\r\n\r\n public format(columnIndex: number, value: any) {\r\n if (value !== null && value !== undefined && value.value !== undefined) {\r\n if (this.dataModel.columns[columnIndex].columnType === ColumnType.aggregation && this.dataModel.report === 10 && value.noExp) {\r\n return this.config.text(textMappings.noExposureValue);\r\n }\r\n if (this.dataModel.columns[columnIndex].columnType === ColumnType.target && value.noTar) {\r\n return this.config.text(textMappings.noTargetValue);\r\n }\r\n return this.dataAdapter.format(columnIndex, value.value);\r\n }\r\n return this.dataAdapter.format(columnIndex, value);\r\n }\r\n\r\n /**\r\n * Returns footer label and value\r\n * @param aggregationType \r\n */\r\n public getFooterColumnTextAndValue(aggregationType: AggregationType): {\r\n label: string,\r\n value: string\r\n } {\r\n\r\n const { aggrColIndex, columnExtremes } = this.dataAdapter;\r\n switch (aggregationType) {\r\n\r\n case AggregationType.Minimum:\r\n case AggregationType.DaysSinceLast:\r\n return {\r\n label: this.config.text(textMappings.minimum),\r\n value: this.format(aggrColIndex, columnExtremes[aggrColIndex].min)\r\n };\r\n\r\n case AggregationType.Maximum:\r\n case AggregationType.DaysSinceFirst:\r\n return {\r\n label: this.config.text(textMappings.maximum),\r\n value: this.format(aggrColIndex, columnExtremes[aggrColIndex].max)\r\n };\r\n\r\n default:\r\n return {\r\n label: this.config.text(textMappings.total),\r\n value: this.format(aggrColIndex, columnExtremes[aggrColIndex].sum)\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * Returns header title\r\n * @param colIndex column number in table\r\n */\r\n public getHeaderTitle(colIndex: number): string {\r\n return this.dataOptions.getColumnTitle(colIndex);\r\n }\r\n\r\n /**\r\n * Returns cell tooltip\r\n * @param colIndex column number in table\r\n */\r\n public getTooltip(colIndex: number): string {\r\n return this.dataOptions.getColumnTitle(colIndex, tooltipSection);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport styles from './tile-field.scss';\r\nimport { Link } from 'react-router';\r\n\r\ninterface TileFieldProps {\r\n className?: string;\r\n tooltip: string;\r\n label?: string;\r\n value: string;\r\n iconUrl?: string;\r\n bgColour?: string;\r\n bgColourDark?: boolean;\r\n onClick?: () => void;\r\n url?: string;\r\n}\r\n\r\nexport const TileField = (props: TileFieldProps) => {\r\n\r\n const className = styles.tileValue\r\n + ' ' + ((props.onClick || props.url) ? styles.tileWithDrilldown : styles.tileNoDrilldown)\r\n + (props.bgColour ? ' ' + styles.tileColorbox : '')\r\n + (props.bgColourDark ? ' ' + styles.tileDarkBackground : '');\r\n\r\n const style = props.bgColour ? { backgroundColor: props.bgColour } : undefined;\r\n\r\n const value = props.url ?\r\n <Link tabIndex={0} to={props.url}>{props.value}</Link> :\r\n props.value;\r\n\r\n return <div title={props.tooltip}\r\n className={props.className}\r\n onClick={props.onClick}>\r\n {!!props.label && <p className={styles.tileLabel}>{props.label}</p>}\r\n <p className={className} style={style}>\r\n {!props.bgColour && !!props.iconUrl && <img src={props.iconUrl} />}\r\n {value}\r\n </p>\r\n </div>;\r\n};\r\n","import { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\nimport { FavouriteDataAdapter } from '../../favourite/common/favourite-data-adapter';\r\nimport { convertNumericColorToHex, numericColorBrightness } from 'app/infrastructure/universal/color';\r\nimport { FavouriteDataColumn } from '../../favourite/common/favourite-interfaces';\r\nimport { TableFavouriteModelComponent } from '../table-favourite-model-component';\r\nimport { ColumnType } from '../../constants';\r\nimport { RegularField } from '../types';\r\nimport { DataRow } from './types';\r\n\r\nconst createOnClickHandler = (model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n data: DataRow,\r\n column: number,\r\n aggregatedColumnIndex?: number\r\n) => {\r\n if (model.drillDownHandler && (aggregatedColumnIndex !== undefined || columns[column].columnType === ColumnType.aggregation)) {\r\n return () => model.drillDownHandler.toCaseListing(data.index);\r\n }\r\n return undefined;\r\n};\r\n\r\nconst createUrl = (model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n data: DataRow,\r\n column: number\r\n): string => {\r\n if (model.drillDownHandler && columns[column].urlTemplate) {\r\n return model.drillDownHandler.toCaseView(data.index, column);\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const mapCell = (dataAdapter: FavouriteDataAdapter,\r\n model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n data: DataRow,\r\n column: number,\r\n aggregatedColumnIndex?: number\r\n): RegularField => {\r\n\r\n const {\r\n isAggrColumn: isAggregationColumn,\r\n uomColIndex: unitOfMeasureColumnIndex\r\n } = dataAdapter;\r\n\r\n const cellValue = data.row[column];\r\n const renderAggregatedText = aggregatedColumnIndex !== undefined;\r\n\r\n /**\r\n * Calculates displayed values\r\n */\r\n let textValue = model.format(column, cellValue);\r\n if (unitOfMeasureColumnIndex >= 0 && isAggregationColumn(columns, column)) {\r\n textValue += ' ' + model.format(unitOfMeasureColumnIndex, data.row[unitOfMeasureColumnIndex]);\r\n }\r\n\r\n let aggrValue: string = undefined;\r\n if (renderAggregatedText) {\r\n aggrValue = model.format(aggregatedColumnIndex, data.row[aggregatedColumnIndex]);\r\n if (unitOfMeasureColumnIndex >= 0 && isAggregationColumn(columns, aggregatedColumnIndex)) {\r\n aggrValue += ' ' + model.format(unitOfMeasureColumnIndex, data.row[unitOfMeasureColumnIndex]);\r\n }\r\n }\r\n\r\n /**\r\n * Calculates tooltip \r\n */\r\n const titleTooltip = model.getTooltip(column);\r\n let titleAttributeValue: string;\r\n if (renderAggregatedText) {\r\n const aggrTitle = model.getTooltip(aggregatedColumnIndex);\r\n titleAttributeValue = aggrTitle + '\\n' + titleTooltip + ':\\n' + textValue;\r\n } else {\r\n titleAttributeValue = titleTooltip + ':\\n' + textValue;\r\n }\r\n\r\n return {\r\n tooltip: titleAttributeValue,\r\n label: model.getHeaderTitle(column),\r\n value: textValue,\r\n aggregatedValue: aggrValue,\r\n onClick: createOnClickHandler(model, columns, data, column, aggregatedColumnIndex),\r\n url: createUrl(model, columns, data, column),\r\n iconUrl: cellValue.iconUrl ? toAbsoluteUrl(cellValue.iconUrl) : undefined,\r\n bgColour: cellValue.bgColour ? convertNumericColorToHex(cellValue.bgColour) : undefined,\r\n bgColourDark: !!cellValue.bgColour && numericColorBrightness(cellValue.bgColour) < 128,\r\n columnType: columns[column].columnType\r\n };\r\n};\r\n","import { CountableAggregationTypes } from '../constants';\r\nimport { FavouriteDataAdapter } from '../../favourite/common/favourite-data-adapter';\r\nimport { FavouriteDataColumn } from '../../favourite/common/favourite-interfaces';\r\n\r\nexport const shouldDisplayTotal = (dataAdapter: FavouriteDataAdapter, columns: FavouriteDataColumn[], report: number) => {\r\n const { uomColIndex, aggrColIndex } = dataAdapter;\r\n\r\n const aggrType = columns[aggrColIndex].aggregationType;\r\n return uomColIndex < 0 && (report !== 10) && CountableAggregationTypes.some(type => type === aggrType);\r\n};\r\n","import { FavouriteDataAdapter } from '../../favourite/common/favourite-data-adapter';\r\nimport { FavouriteDataColumn, AggregationType } from '../../favourite/common/favourite-interfaces';\r\nimport { TableFavouriteModelComponent } from '../table-favourite-model-component';\r\nimport { AggregatedField, RegularField } from '../types';\r\nimport { DataRow } from './types';\r\nimport { mapCell } from './cell';\r\nimport { shouldDisplayTotal } from './display-total';\r\n\r\nconst calculateSubtotal = (dataAdapter: FavouriteDataAdapter,\r\n report: number,\r\n columns: FavouriteDataColumn[],\r\n row: DataRow[]) => {\r\n\r\n const { aggrColIndex } = dataAdapter;\r\n\r\n const aggrType = columns[aggrColIndex].aggregationType;\r\n\r\n if (!shouldDisplayTotal(dataAdapter, columns, report)) {\r\n return undefined;\r\n }\r\n\r\n return row.reduce((memo, currentRow) => {\r\n\r\n const aggregatedValue = currentRow.row[aggrColIndex].value;\r\n\r\n if (memo === undefined && aggregatedValue !== undefined) {\r\n return aggregatedValue;\r\n }\r\n\r\n if (!aggregatedValue) {\r\n return memo;\r\n }\r\n\r\n switch (aggrType) {\r\n case AggregationType.Count:\r\n case AggregationType.Total:\r\n return memo + aggregatedValue;\r\n\r\n case AggregationType.Minimum:\r\n case AggregationType.DaysSinceLast:\r\n return aggregatedValue < memo ? aggregatedValue : memo;\r\n\r\n case AggregationType.Maximum:\r\n case AggregationType.DaysSinceFirst:\r\n return aggregatedValue > memo ? aggregatedValue : memo;\r\n\r\n default:\r\n return memo;\r\n }\r\n }, undefined);\r\n};\r\n\r\nexport const mapAggregateValues = (dataAdapter: FavouriteDataAdapter,\r\n model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n data: DataRow[],\r\n column: number): AggregatedField => {\r\n\r\n const { aggrColIndex } = dataAdapter;\r\n\r\n return {\r\n tooltip: model.getTooltip(aggrColIndex),\r\n label: model.getHeaderTitle(column),\r\n values: data.map(r => mapCell(dataAdapter, model, columns, r, column, aggrColIndex)),\r\n columnType: columns[column].columnType\r\n };\r\n};\r\n\r\nexport const mapSubvalue = (dataAdapter: FavouriteDataAdapter,\r\n model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n data: DataRow[],\r\n column: number): RegularField => {\r\n\r\n const { aggrColIndex } = dataAdapter;\r\n\r\n const subValue = calculateSubtotal(dataAdapter, model.dataModel.report, columns, data);\r\n\r\n const onClick = !!model.drillDownHandler ? () => {\r\n model.drillDownHandler.toCaseListing(data[0].index, [column]);\r\n } : undefined;\r\n\r\n return subValue !== undefined ? {\r\n tooltip: model.getTooltip(aggrColIndex) + ':\\n' + model.format(aggrColIndex, subValue),\r\n label: model.getHeaderTitle(aggrColIndex),\r\n onClick,\r\n value: model.format(aggrColIndex, subValue),\r\n columnType: columns[aggrColIndex].columnType\r\n } : undefined;\r\n};\r\n\r\nexport const mapRollingAverage = (dataAdapter: FavouriteDataAdapter,\r\n model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n data: DataRow[],\r\n column: number): AggregatedField => {\r\n\r\n const { aggrRollAvgColIndex } = dataAdapter;\r\n\r\n return aggrRollAvgColIndex >= 0 ? {\r\n tooltip: model.getTooltip(aggrRollAvgColIndex),\r\n label: model.getHeaderTitle(aggrRollAvgColIndex),\r\n values: data.map(r => mapCell(dataAdapter, model, columns, r, column, aggrRollAvgColIndex)),\r\n columnType: columns[aggrRollAvgColIndex].columnType\r\n } : undefined;\r\n};\r\n\r\nexport const mapTarget = (dataAdapter: FavouriteDataAdapter,\r\n model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n data: DataRow[],\r\n column: number): AggregatedField => {\r\n\r\n const { targetColIndex } = dataAdapter;\r\n\r\n return targetColIndex >= 0 ? {\r\n tooltip: model.getTooltip(targetColIndex),\r\n label: model.getHeaderTitle(targetColIndex),\r\n values: data.map(r => mapCell(dataAdapter, model, columns, r, column, targetColIndex)),\r\n columnType: columns[targetColIndex].columnType\r\n } : undefined;\r\n};\r\n","import { FavouriteDataAdapter } from '../../favourite/common/favourite-data-adapter';\r\nimport { FavouriteDataColumn } from '../../favourite/common/favourite-interfaces';\r\nimport { TableFavouriteModelComponent } from '../table-favourite-model-component';\r\nimport { FavouriteRow, RegularField } from '../types';\r\nimport { DataRow } from './types';\r\nimport { mapAggregateValues, mapSubvalue, mapRollingAverage, mapTarget } from './compact-cell';\r\nimport { mapCell } from './cell';\r\n\r\nexport const mapRow = (dataAdapter: FavouriteDataAdapter,\r\n model: TableFavouriteModelComponent,\r\n columns: FavouriteDataColumn[],\r\n compactView: boolean,\r\n row: DataRow[]): FavouriteRow => {\r\n\r\n const {\r\n isAggrColumn: isAggregationColumn,\r\n uomColIndex: unitOfMeasureColumnIndex,\r\n compactColumnIndex,\r\n aggrColIndex: aggregateColumnIndex,\r\n aggrRollAvgColIndex: rollingAvarageColumnIndex,\r\n targetColIndex: targetColumnIndex\r\n } = dataAdapter;\r\n\r\n const renderInCompactMode = compactView && compactColumnIndex >= 0;\r\n\r\n return {\r\n\r\n ...(renderInCompactMode\r\n ? {\r\n aggregateValue: mapAggregateValues(dataAdapter, model, columns, row, compactColumnIndex),\r\n subValue: mapSubvalue(dataAdapter, model, columns, row, compactColumnIndex),\r\n rollingAvarage: mapRollingAverage(dataAdapter, model, columns, row, compactColumnIndex),\r\n target: mapTarget(dataAdapter, model, columns, row, compactColumnIndex)\r\n }\r\n : {\r\n ...(aggregateColumnIndex >= 0 && {\r\n subValue: mapCell(dataAdapter, model, columns, row[0], aggregateColumnIndex)\r\n }),\r\n ...(rollingAvarageColumnIndex >= 0 && {\r\n rollingAvarage: mapCell(dataAdapter, model, columns, row[0], rollingAvarageColumnIndex)\r\n }),\r\n ...(targetColumnIndex >= 0 && {\r\n target: mapCell(dataAdapter, model, columns, row[0], targetColumnIndex)\r\n })\r\n }),\r\n\r\n selectionValues: columns\r\n .reduce((result, column, columnIndex) => {\r\n\r\n /**\r\n * Skips aggregated columns, unit of measure column or compact column in compactView mode\r\n */\r\n const isAggregateColumn = isAggregationColumn(columns, columnIndex);\r\n const isCompactColumn = renderInCompactMode && compactColumnIndex === columnIndex;\r\n const isUnitOfMeasureColumn = columnIndex === unitOfMeasureColumnIndex;\r\n\r\n return isAggregateColumn || isCompactColumn || isUnitOfMeasureColumn\r\n ? result\r\n : [\r\n ...result,\r\n mapCell(dataAdapter, model, columns, row[0], columnIndex)\r\n ];\r\n }, [] as RegularField[])\r\n };\r\n};\r\n","import { FavouriteRowValue, FavouriteDataColumn } from '../../favourite/common/favourite-interfaces';\r\nimport { FavouriteDataAdapter } from '../../favourite/common/favourite-data-adapter';\r\nimport { TableFavouriteModelComponent } from '../table-favourite-model-component';\r\nimport { DataRow } from './types';\r\nimport { mapRow } from './row';\r\n\r\nconst groupRowsForCompactView = (rows: FavouriteRowValue[][], selectionDataColumns: number[]) => {\r\n\r\n const compareRows = (currentRow: FavouriteRowValue[], previousRow: FavouriteRowValue[]) =>\r\n selectionDataColumns.length === 0 ||\r\n selectionDataColumns.every(column => currentRow[column].value === previousRow[column].value);\r\n\r\n return rows\r\n .reduce((result, row, index) => {\r\n\r\n if (result.length === 0 || !compareRows(row, result[result.length - 1][0].row)) {\r\n result.push([{ index, row }]);\r\n } else {\r\n result[result.length - 1].push({ index, row });\r\n }\r\n\r\n return result;\r\n }, [] as DataRow[][]);\r\n};\r\n\r\nexport const mapToRows = (dataAdapter: FavouriteDataAdapter,\r\n model: TableFavouriteModelComponent,\r\n rows: FavouriteRowValue[][],\r\n columns: FavouriteDataColumn[],\r\n compactView: boolean) => {\r\n\r\n const {\r\n indexesToCompare: selectionDataColumns\r\n } = dataAdapter;\r\n\r\n const groupedRows = compactView\r\n ? groupRowsForCompactView(rows, selectionDataColumns)\r\n : rows.map((row, index) => [{ row, index }]);\r\n\r\n return groupedRows.map(row => mapRow(dataAdapter, model, columns, compactView, row));\r\n};\r\n","import { FavouriteLayoutAttributes } from '../types';\r\nimport { configMappings } from './constants';\r\nimport { LayoutConfig } from '../favourite/common/layout-config';\r\n\r\nconst tileAttributesReader = (config: LayoutConfig) => (name: string) => {\r\n if (config.layoutAttributes.Tile && config.layoutAttributes.Tile.hasOwnProperty(name)) {\r\n return config.layoutAttributes.Tile[name];\r\n }\r\n return undefined;\r\n};\r\n\r\nconst tableAttributesReader = (config: LayoutConfig) => (name: string) => {\r\n if (config.layoutAttributes.Table && config.layoutAttributes.Table.hasOwnProperty(name)) {\r\n return config.layoutAttributes.Table[name];\r\n }\r\n return undefined;\r\n};\r\n\r\nconst configFactory = (attributesReader: typeof tileAttributesReader) => (layoutAttributes: FavouriteLayoutAttributes) => {\r\n\r\n const config = new LayoutConfig(layoutAttributes);\r\n const reader = attributesReader(config);\r\n\r\n return {\r\n suppressRepeatingRows: reader(configMappings.suppressRepeatingRows) === true,\r\n compactView: reader(configMappings.compactView) === true,\r\n hideAggrColumns: reader(configMappings.hideAggrColumns) === true,\r\n hideHeader: reader(configMappings.hideHeader) === true,\r\n hideTotals: reader(configMappings.hideTotals) === true,\r\n wideLayout: reader(configMappings.wideLayout) === true\r\n };\r\n};\r\n\r\nexport const tileConfig = configFactory(tileAttributesReader);\r\nexport const tableConfig = configFactory(tableAttributesReader);\r\n","import * as React from 'react';\r\nimport { FavouriteLayoutComponentProps } from '../types';\r\nimport { TableFavouriteModelComponent } from './table-favourite-model-component';\r\nimport { TileField } from './tile';\r\nimport { mapToRows, shouldDisplayTotal } from './view-model';\r\nimport { FavouriteRow, RegularField, AggregatedField } from './types';\r\nimport { tileConfig } from './config';\r\n\r\nimport styles from './tile-view-favourite.scss';\r\nimport { Link } from 'react-router';\r\n\r\nexport class TileViewFavourite extends React.PureComponent<FavouriteLayoutComponentProps> {\r\n private model: TableFavouriteModelComponent;\r\n\r\n constructor(props: FavouriteLayoutComponentProps) {\r\n super(props);\r\n this.model = new TableFavouriteModelComponent(\r\n props.layoutAttributes, props.intl, props.translation, undefined, this.props.drillDown, this.props.caseview);\r\n\r\n if (props.favouriteDataModel) {\r\n this.model.receiveData(props.favouriteDataModel);\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: FavouriteLayoutComponentProps) {\r\n if (this.props.layoutAttributes) {\r\n if (!this.props.fetchingDataModel && this.props.favouriteDataModel !== prevProps.favouriteDataModel) {\r\n this.model.receiveData(this.props.favouriteDataModel);\r\n }\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n if (!this.model || !this.model.dataModel || !this.model.dataModel.rows || this.model.dataModel.rows.length === 0) {\r\n return <div className={styles.spinLoader} />;\r\n }\r\n const { dataModel: { columns, rows, report }, dataAdapter } = this.model;\r\n const { compactView, wideLayout, hideHeader, hideAggrColumns, hideTotals } = tileConfig(this.props.layoutAttributes);\r\n\r\n const data = mapToRows(dataAdapter, this.model, rows, columns, compactView);\r\n\r\n return <div>\r\n {!hideTotals && shouldDisplayTotal(dataAdapter, columns, report) && this.renderTotal()}\r\n <div className={wideLayout ? styles.tileAreaWide : `${styles.tileAreaNarrow} grid-250`}>\r\n {data.map((tile, index) => this.renderTile(tile, wideLayout, hideHeader, hideAggrColumns, index))}\r\n </div>\r\n </div>;\r\n }\r\n\r\n private renderTotal = () => {\r\n const { dataModel: { columns }, dataAdapter: { aggrColIndex } } = this.model;\r\n const total = this.model.getFooterColumnTextAndValue(columns[aggrColIndex].aggregationType);\r\n\r\n return total.value !== undefined && <p>\r\n {!!total.label && <span className={styles.totalLabel}>{total.label}: </span>}\r\n <span className={styles.totalValue}>{total.value}</span></p>;\r\n }\r\n\r\n private renderTile = (tile: FavouriteRow, wideLayout: boolean, hideHeader: boolean, hideAggrColumns: boolean, key: number) => {\r\n\r\n // Check if there is anything to render\r\n if ((hideAggrColumns || (!tile.subValue && !tile.rollingAvarage && !tile.target))\r\n && tile.selectionValues.length === 0\r\n && !tile.aggregateValue) {\r\n return null;\r\n }\r\n\r\n return <div key={key} className={wideLayout ? styles.tileWide : styles.tileNarrow}>\r\n {!hideAggrColumns && !!tile.subValue && this.renderSubvalue(tile.subValue, wideLayout)}\r\n <div className={`${styles.tileFields} grid-150`}>\r\n {tile.selectionValues.map((field, index) => this.renderRegularField(field, wideLayout, hideHeader, index))}\r\n {!!tile.aggregateValue && this.renderAggregateArea(tile.aggregateValue, wideLayout, hideHeader)}\r\n {!hideAggrColumns && !!tile.rollingAvarage && this.renderAggregateArea(tile.rollingAvarage, wideLayout, hideHeader)}\r\n {!hideAggrColumns && !!tile.target && this.renderAggregateArea(tile.target, wideLayout, hideHeader)}\r\n </div>\r\n </div>;\r\n }\r\n\r\n private renderRegularField = (field: RegularField, wideLayout: boolean, hideHeader: boolean, key?: number) => {\r\n return <TileField\r\n key={key}\r\n className={wideLayout ? styles.tileFieldWide : undefined}\r\n tooltip={field.tooltip}\r\n label={!hideHeader && field.label}\r\n value={field.value}\r\n iconUrl={field.iconUrl}\r\n bgColour={field.bgColour}\r\n bgColourDark={field.bgColourDark}\r\n onClick={field.onClick}\r\n url={field.url} />;\r\n }\r\n\r\n private renderSubvalue = (field: RegularField, wideLayout: boolean) => {\r\n const smallFontSize = field.value.length > 6 ? styles.smallFontSize : '';\r\n const value = field.url ?\r\n <Link tabIndex={0} to={field.url}>{field.value}</Link> :\r\n field.value;\r\n\r\n return <div title={field.tooltip}\r\n onClick={field.onClick}\r\n className={`${(field.onClick || field.url) ? styles.tileWithDrilldown : styles.tileNoDrilldown}`}>\r\n <p className={`${styles.tileAggregationValue} ${smallFontSize}`}\r\n style={field.bgColour && { color: field.bgColour }}>{value}</p>\r\n </div>;\r\n }\r\n\r\n private renderAggregateArea = (field: RegularField | AggregatedField, wideLayout: boolean, hideHeader: boolean) => {\r\n\r\n const aggregateField = field as AggregatedField;\r\n\r\n if (aggregateField.values) {\r\n return <div title={field.tooltip} className={wideLayout ? styles.tileFieldWide : undefined}>\r\n {aggregateField.values.map((f, i) => <TileField\r\n key={i}\r\n tooltip={f.tooltip}\r\n label={!hideHeader && i === 0 && field.label}\r\n value={`${f.value} (${f.aggregatedValue})`}\r\n iconUrl={f.iconUrl}\r\n bgColour={f.bgColour}\r\n bgColourDark={f.bgColourDark}\r\n onClick={f.onClick} />)}\r\n </div>;\r\n }\r\n\r\n return this.renderRegularField(field as RegularField, wideLayout, hideHeader);\r\n };\r\n}\r\n","import * as React from 'react';\r\nimport { RegularField, AggregatedField } from '../types';\r\nimport { Link } from 'react-router';\r\n\r\nimport styles from './cell.scss';\r\n\r\nexport const renderCell = (cell: RegularField, index?: number) => {\r\n\r\n const cellClassName = [\r\n cell.columnType,\r\n ...((!!(cell.iconUrl || cell.bgColour) && [styles.iconColumn]) || [])\r\n ].join(' ');\r\n\r\n const valueClassName = [\r\n styles.text,\r\n ...(((!!cell.onClick || !!cell.url) && [styles.drillDownCol]) || [])\r\n ].join(' ');\r\n\r\n const icon = !!cell.iconUrl && <img src={cell.iconUrl} alt={cell.value} />;\r\n\r\n const value = cell.url ?\r\n <Link tabIndex={0} className={valueClassName} to={cell.url}>{cell.value}</Link> :\r\n <span className={valueClassName}>{cell.value}</span>;\r\n\r\n const colorBox = !cell.iconUrl && !!cell.bgColour && <div\r\n className={styles.colorBox}\r\n style={{ backgroundColor: cell.bgColour }} />;\r\n\r\n return <td key={index}\r\n className={cellClassName}\r\n title={cell.tooltip}\r\n onClick={cell.onClick}\r\n tabIndex={!!cell.onClick ? 0 : null}>\r\n {icon}\r\n {value}\r\n {colorBox}\r\n </td>;\r\n};\r\n\r\nexport const renderAggregateCell = (cell: RegularField | AggregatedField) => {\r\n\r\n const aggregateCell = cell as AggregatedField;\r\n\r\n if (aggregateCell.values) {\r\n return <td title={cell.tooltip} className=\"aggregate-cell\">\r\n {aggregateCell.values.map((f, i) => <React.Fragment key={i}><div\r\n className={styles.boxContainer}\r\n onClick={f.onClick}\r\n title={f.tooltip}>\r\n {!!f.iconUrl && <img src={f.iconUrl} />}\r\n {!f.iconUrl && !!f.bgColour && <div\r\n className={styles.colorBox}\r\n style={{ backgroundColor: f.bgColour }} />}\r\n {!f.iconUrl && !f.bgColour && <span>{f.value} </span>}\r\n {!!f.aggregatedValue && <span className={styles.drillDownCol}>{f.aggregatedValue}</span>}\r\n </div>{' '}</React.Fragment>)}\r\n </td>;\r\n }\r\n\r\n return renderCell(cell as RegularField);\r\n};\r\n","import * as React from 'react';\r\nimport { TableFavouriteModelComponent } from './table-favourite-model-component';\r\nimport { FavouriteLayoutComponentProps } from '../types';\r\nimport { FavouriteRow } from './types';\r\nimport { mapToRows, shouldDisplayTotal } from './view-model';\r\nimport { renderCell, renderAggregateCell, renderTableHeader, renderTableFooter } from './table';\r\nimport { tableConfig } from './config';\r\nimport { ScrollContainer } from 'ui/scroll-container';\r\n\r\nimport styles from './table-view-favourite.scss';\r\n\r\nexport class TableViewFavourite extends React.PureComponent<FavouriteLayoutComponentProps> {\r\n private model: TableFavouriteModelComponent;\r\n\r\n constructor(props: FavouriteLayoutComponentProps) {\r\n super(props);\r\n this.model = new TableFavouriteModelComponent(\r\n props.layoutAttributes, props.intl, props.translation, undefined, this.props.drillDown, this.props.caseview);\r\n\r\n if (props.favouriteDataModel) {\r\n this.model.receiveData(props.favouriteDataModel);\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: FavouriteLayoutComponentProps) {\r\n if (this.props.layoutAttributes) {\r\n if (!this.props.fetchingDataModel && prevProps.favouriteDataModel !== this.props.favouriteDataModel) {\r\n this.model.receiveData(this.props.favouriteDataModel);\r\n this.forceUpdate();\r\n }\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n if (!this.model || !this.model.dataModel || !this.model.dataModel.rows || this.model.dataModel.rows.length === 0) {\r\n return <div className={styles.spinLoader} />;\r\n }\r\n const { dataModel: { columns, rows, report }, dataAdapter } = this.model;\r\n const { hideAggrColumns, hideHeader, hideTotals, compactView, suppressRepeatingRows } = tableConfig(this.props.layoutAttributes);\r\n\r\n const data = mapToRows(dataAdapter, this.model, rows, columns, compactView);\r\n return <ScrollContainer height={this.props.height}>\r\n <table className={styles.result}>\r\n {!hideHeader && renderTableHeader(data[0], hideAggrColumns, compactView)}\r\n <tbody>\r\n {data.map((r, i) => this.renderTableBody(r, i > 0 && data[i - 1], i, suppressRepeatingRows, hideAggrColumns))}\r\n {!hideAggrColumns && !hideTotals && shouldDisplayTotal(dataAdapter, columns, report)\r\n && renderTableFooter(this.model, data[0], hideAggrColumns, this.footerClickHandler)}\r\n </tbody>\r\n </table>\r\n </ScrollContainer>;\r\n }\r\n\r\n private renderTableBody = (row: FavouriteRow, previousRow: FavouriteRow, index: number,\r\n suppressRepeatingRows: boolean, hideAggrColumns: boolean) => {\r\n return <tr key={index}>\r\n {row.selectionValues.map((c, i) => {\r\n const suppressRepeating = suppressRepeatingRows && !!previousRow &&\r\n previousRow.selectionValues\r\n .filter((pc, pi) => pi <= i)\r\n .every((pc, pi) => pc.value === row.selectionValues[pi].value);\r\n return suppressRepeating ? <td key={i} />\r\n : renderCell(c, i);\r\n })}\r\n {!!row.aggregateValue && renderAggregateCell(row.aggregateValue)}\r\n {!hideAggrColumns && !!row.subValue && renderCell(row.subValue)}\r\n {!hideAggrColumns && !!row.rollingAvarage && renderAggregateCell(row.rollingAvarage)}\r\n {!hideAggrColumns && !!row.target && renderAggregateCell(row.target)}\r\n </tr>;\r\n }\r\n\r\n private footerClickHandler = () => {\r\n\r\n const { drillDownHandler } = this.model;\r\n drillDownHandler && drillDownHandler.toCaseListingWithAllCases();\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FavouriteRow } from '../types';\r\n\r\nexport const renderTableHeader = (row: FavouriteRow, hideAggregateColumns: boolean, compactView: boolean) => {\r\n return <thead>\r\n <tr>\r\n {row.selectionValues.map((f, i) => <th className={f.columnType} key={i}>\r\n {f.label}\r\n </th>)}\r\n {!!row.aggregateValue && <th className={row.aggregateValue.columnType}>\r\n {row.aggregateValue.label}\r\n </th>}\r\n {!hideAggregateColumns && !!row.subValue && <th className={row.subValue.columnType}>\r\n {row.subValue.label}\r\n </th>}\r\n {!hideAggregateColumns && !!row.rollingAvarage && <th className={!compactView && row.rollingAvarage.columnType}>\r\n {row.rollingAvarage.label}\r\n </th>}\r\n {!hideAggregateColumns && !!row.target && <th className={!compactView && row.target.columnType}>\r\n {row.target.label}\r\n </th>}\r\n </tr>\r\n </thead>;\r\n};\r\n","import * as React from 'react';\r\nimport { TableFavouriteModelComponent } from '../table-favourite-model-component';\r\nimport { FavouriteRow } from '../types';\r\n\r\nimport styles from './footer.scss';\r\n\r\nexport const renderTableFooter = (model: TableFavouriteModelComponent, row: FavouriteRow,\r\n hideAggregateColumns: boolean, onClick: () => void) => {\r\n\r\n const { dataModel: { columns }, dataAdapter: { aggrColIndex } } = model;\r\n const total = model.getFooterColumnTextAndValue(columns[aggrColIndex].aggregationType);\r\n const tooltip = model.getTooltip(aggrColIndex);\r\n\r\n if (aggrColIndex < 0) {\r\n return false;\r\n }\r\n\r\n return <tr className={`${styles.footerRowStyle} ${styles.footerRow}`} >\r\n {aggrColIndex > 0 && <td colSpan={aggrColIndex} />}\r\n <td onClick={onClick}\r\n title={tooltip}\r\n className={`aggregation ${styles.total}`}>\r\n <span className={styles.totalText}>\r\n {total.label}\r\n </span>\r\n <span className={styles.totalValue}>\r\n {total.value}\r\n </span>\r\n </td>\r\n {!hideAggregateColumns && !!row.rollingAvarage && <td colSpan={1} />}\r\n {!hideAggregateColumns && !!row.target && <td colSpan={1} />}\r\n </tr>;\r\n};\r\n","import * as React from 'react';\r\nimport { FavouriteLayoutComponentProps } from './types';\r\nimport { PresentationType } from './constants';\r\nimport { ChartFavourite } from './chart-favourite';\r\nimport { TileViewFavourite, TableViewFavourite } from './data-layout';\r\nimport styles from './favourite-layout-component-factory.scss';\r\n\r\nexport const isPresentationTypeSupported = (presentationType: number) => {\r\n\r\n return presentationType === PresentationType.Table ||\r\n presentationType === PresentationType.Tile ||\r\n presentationType === PresentationType.Highcharts;\r\n};\r\n\r\nconst getComponent = (presentationType: number):\r\n typeof TableViewFavourite | typeof TileViewFavourite | typeof ChartFavourite => {\r\n\r\n if (!isPresentationTypeSupported(presentationType)) {\r\n return undefined;\r\n }\r\n\r\n if (presentationType === PresentationType.Highcharts) {\r\n return ChartFavourite;\r\n }\r\n\r\n if (presentationType === PresentationType.Table) {\r\n return TableViewFavourite;\r\n }\r\n\r\n if (presentationType === PresentationType.Tile) {\r\n return TileViewFavourite;\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const createFavouriteComponent = (presentationType: number, props: FavouriteLayoutComponentProps, wrapperClassName: string) => {\r\n\r\n const Component = getComponent(presentationType);\r\n if (!Component) {\r\n return (<div>{props.translation.favourite_not_present_type_favourite}</div>);\r\n }\r\n\r\n if (props.favouriteDataModel && props.favouriteDataModel.rows && props.favouriteDataModel.rows.length === 0) {\r\n return <div className={styles.noRows}>{props.translation.no_search_result}</div>;\r\n }\r\n\r\n let contentHeightStyle:any;\r\n const layoutAttributes = {...props.layoutAttributes};\r\n if (props.height) {\r\n\r\n if (layoutAttributes) {\r\n layoutAttributes['HighchartsStyle.userDefinedHeightEnabled'] = true;\r\n layoutAttributes['Highcharts.chart.height'] = props.height;\r\n layoutAttributes['HighchartsStyle.userDefinedHeightValue'] = props.height;\r\n } else {\r\n contentHeightStyle.overflow = 'auto';\r\n contentHeightStyle = {maxHeight: props.height+1};\r\n }\r\n }\r\n\r\n return <div className={wrapperClassName} style={contentHeightStyle}>\r\n <Component {...{...props, layoutAttributes}} />\r\n </div>;\r\n};\r\n","import { FavouriteDefinition, FavouriteLayoutAttributes, ReportDefinition } from 'app/types-shared';\r\n\r\nconst getSelectedReport = (definition: FavouriteDefinition) => !!definition && !!definition.reports && definition.reports\r\n .find(r => !!r.report && !!definition.selectedReport && r.report.v === definition.selectedReport.v);\r\n\r\nconst getLayoutAttributes = (report: ReportDefinition) => !!report && report.layoutAttributes;\r\n\r\nconst layoutAttributeExist = (layoutAttributes: FavouriteLayoutAttributes[], layoutType: number, layoutTypeContext: number, name: string) =>\r\n layoutAttributes.some(attr =>\r\n attr.layoutTypeId === layoutType &&\r\n attr.layoutTypeContext === layoutTypeContext &&\r\n attr.name === name\r\n );\r\n\r\n/**\r\n * Returns dictionary of layout attributes for selected report (from definition), layoutType and layoutTypeContext.\r\n * It also adds matching attributes with layoutTypeContext === 1.\r\n * \r\n * @param definition Favourite definition\r\n * @param layoutType \r\n * @param layoutTypeContext \r\n */\r\nexport const getFavouriteLayoutAttributes = (definition: FavouriteDefinition,\r\n layoutType: number,\r\n layoutTypeContext: number) => {\r\n\r\n const report = getSelectedReport(definition);\r\n const layoutAttributes = getLayoutAttributes(report);\r\n\r\n const attr = !!layoutAttributes && layoutAttributes\r\n .filter(a => a.layoutTypeId === layoutType && (a.layoutTypeContext === 1\r\n || (a.layoutTypeContext === layoutTypeContext && !layoutAttributeExist(report.layoutAttributes, layoutType, 1, a.name))))\r\n .reduce((result, a) => {\r\n result[a.name] = a.value;\r\n return result;\r\n }, {} as { [key: string]: string | boolean });\r\n\r\n return !!attr && Object.keys(attr).length > 0\r\n ? attr\r\n : undefined;\r\n};\r\n","import * as React from 'react';\r\nimport { FavouriteContainerProps, FavouriteContainerExternalProps } from './types';\r\nimport { DashboardState } from './types-store';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { dashboardTranslation } from 'app/area/dashboard/constants';\r\nimport { isPresentationTypeSupported, createFavouriteComponent } from 'app/components/favourite-layout';\r\nimport styles from './favourite-container.scss';\r\nimport { ElementLoader } from 'ui';\r\nimport { Link } from 'react-router';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { FavouriteLayoutComponentProps } from 'app/components/favourite-layout/types';\r\n\r\nclass FavouriteComponent extends React.Component<FavouriteContainerProps> {\r\n public static statePath: string = STATE.dashboard;\r\n\r\n public componentDidMount() {\r\n if (this.shouldLoadDataModel()) {\r\n this.props.loadFavouriteDataModel(this.props.dashboardModelFavourite.favourite);\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: FavouriteContainerProps) {\r\n if (this.shouldReloadDataModel(prevProps)) {\r\n prevProps.loadFavouriteDataModel(prevProps.dashboardModelFavourite.favourite);\r\n }\r\n }\r\n\r\n private shouldLoadDataModel() {\r\n return !this.props.fetchingDataModel &&\r\n this.props.dashboardModelFavourite &&\r\n this.props.loadFavouriteDataModel &&\r\n this.props.mainFavouriteId &&\r\n !this.props.favouriteDataModel;\r\n }\r\n\r\n private shouldReloadDataModel(newProps: FavouriteContainerProps) {\r\n return !this.props.error && !this.props.fetchingDataModel &&\r\n newProps.dashboardModelFavourite &&\r\n newProps.dashboardModelFavourite.favourite !== this.props.dashboardModelFavourite.favourite;\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: FavouriteContainerProps) {\r\n return this.props.fetchingDataModel !== nextProps.fetchingDataModel\r\n || this.props.favouriteDataModel !== nextProps.favouriteDataModel\r\n || this.props.dashboardModelFavourite.widthPercent !== nextProps.dashboardModelFavourite.widthPercent;\r\n }\r\n\r\n public render() {\r\n const {\r\n dashboardModelFavourite,\r\n translation: { favourite_not_render, favourite_no_layout_model }\r\n } = this.props;\r\n\r\n if (!dashboardModelFavourite) {\r\n return <div>{favourite_not_render}</div>;\r\n }\r\n\r\n const containerStyle = this.createStyleFromDashboardModel();\r\n let favouriteContent = !!dashboardModelFavourite.layoutModel ?\r\n this.renderContent() : favourite_no_layout_model;\r\n\r\n favouriteContent = this.props.fetchingDataModel ? <ElementLoader /> : favouriteContent;\r\n\r\n return (\r\n <div className={styles.favouriteContainer} style={containerStyle}>\r\n <div className={styles.wrapper}>\r\n <Link to={routeConstants.favouriteFor(dashboardModelFavourite.favourite)}>\r\n <h3 className={styles.header}>\r\n {dashboardModelFavourite.description}\r\n </h3>\r\n </Link>\r\n {favouriteContent}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private createStyleFromDashboardModel() {\r\n const flexBasis = this.props.dashboardModelFavourite.widthPercent > 0 ?\r\n this.props.dashboardModelFavourite.widthPercent + '%' :\r\n 0;\r\n return {\r\n width:\r\n `${flexBasis}`\r\n };\r\n }\r\n\r\n private renderContent() {\r\n const presentationType = this.props.dashboardModelFavourite.layoutModel.presentationType;\r\n\r\n const favouriteProps: FavouriteLayoutComponentProps = {\r\n layoutAttributes: {\r\n ...this.props.dashboardModelFavourite.layoutModel.layoutTypeAttributes,\r\n ...this.props.favouriteLayoutAttributes\r\n },\r\n favouriteDataModel: this.props.favouriteDataModel,\r\n drillDown: this.props.drillDown,\r\n caseview: this.props.caseview,\r\n intl: this.props.intl,\r\n translation: this.props.translation,\r\n requestCustomWidth: this.props.requestCustomWidth,\r\n height: this.props.dashboardModelFavourite.height\r\n };\r\n\r\n if (!isPresentationTypeSupported(presentationType)) {\r\n return <div className={styles.fallbackContent}>\r\n {`${this.props.translation.favourite_unsupported_presentation_type} ${presentationType}`}\r\n </div>;\r\n }\r\n else {\r\n return createFavouriteComponent(presentationType, favouriteProps, styles.content);\r\n }\r\n }\r\n}\r\n\r\nfunction selectFromState(state: DashboardState, dashFav: number, favId: number) {\r\n return state.mainFavourite &&\r\n state.mainFavourite.favouriteContainers[favId] &&\r\n state.mainFavourite.favouriteContainers[favId];\r\n}\r\n\r\nconst selectors = {\r\n favouriteDataModel: (state: DashboardState, props: FavouriteContainerProps) => {\r\n const stateObj = selectFromState(state, props.mainFavouriteId, props.dashboardModelFavourite.favourite);\r\n return stateObj && stateObj.favouriteDataModel;\r\n },\r\n fetchingDataModel: (state, props: FavouriteContainerProps) => {\r\n const stateObj = selectFromState(state, props.mainFavouriteId, props.dashboardModelFavourite.favourite);\r\n return stateObj && stateObj.fetchingDataModel;\r\n },\r\n mainFavouriteWorkingDefinition: (state: DashboardState, props: any) => {\r\n return !!state.mainFavourite\r\n && !!state.mainFavourite.workingDefinition\r\n && state.mainFavourite.workingDefinition;\r\n }\r\n};\r\n\r\nconst container: React.ComponentClass<FavouriteContainerExternalProps> =\r\n containerFactory(FavouriteComponent, null, selectors, dashboardTranslation) as any;\r\n\r\nexport { container as FavouriteContainer };\r\n","import * as React from 'react';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { DashboardFavouriteLayout } from './types-store';\r\nimport { dashboardLayoutTypeContext } from './constants';\r\nimport { FavouriteContainer } from './favourite-container';\r\nimport { getFavouriteLayoutAttributes } from 'app/components/favourite-layout';\r\nimport styles from './dashboard.scss';\r\nimport { DrillDownCallback, CaseViewCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\ninterface DashboardLayoutProps {\r\n mainFavouriteId: number;\r\n dashboardFavourites: DashboardFavouriteLayout[];\r\n containerDefinitions: FavouriteDefinition[];\r\n loadFavouriteDataModel: (favouriteId: number) => void;\r\n drillDown: DrillDownCallback;\r\n caseview: CaseViewCallback;\r\n intl: any;\r\n translation?: any;\r\n}\r\ninterface CustomWidths {\r\n [s:number]:number;\r\n}\r\ninterface DashboardLayoutState {\r\n width: number;\r\n items: DashboardFavouriteLayout[];\r\n customWidths: CustomWidths;\r\n}\r\n\r\nexport class DashboardLayout extends React.Component<DashboardLayoutProps, DashboardLayoutState> {\r\n\r\n private layoutRef:React.RefObject<HTMLDivElement> = React.createRef();\r\n\r\n constructor(props:DashboardLayoutProps) {\r\n super(props);\r\n\r\n this.state = {\r\n width: 0,\r\n items: props && props.dashboardFavourites ? this.calculateWidths(props.dashboardFavourites, 500, {}) : [],\r\n customWidths: {}\r\n };\r\n }\r\n\r\n private handleResize = () => {\r\n if ((this.layoutRef &&\r\n this.layoutRef.current &&\r\n this.layoutRef.current.offsetWidth !== this.state.width) &&\r\n this.layoutRef.current.offsetWidth !== 0\r\n ) {\r\n const width = this.layoutRef.current.offsetWidth;\r\n const items = this.calculateWidths(this.props.dashboardFavourites, width, this.state.customWidths);\r\n\r\n this.setState({width, items});\r\n }\r\n }\r\n\r\n private calculateWidths = (\r\n dataset:DashboardFavouriteLayout[],\r\n width:number = 500,\r\n customWidths:CustomWidths): DashboardFavouriteLayout[] => {\r\n\r\n if (!dataset && width !== 0) {\r\n return null;\r\n }\r\n const clone = dataset.map(item => ({...item}));\r\n const ordered = clone.sort((a, b) => {\r\n if (a.sequence < b.sequence) {\r\n return -1;\r\n }\r\n if (a.sequence > b.sequence) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n\r\n const rows = ordered.reduce((rowList, item) => {\r\n let row = rowList[rowList.length-1];\r\n const minWidth = customWidths[item.id] || item.minWidth;\r\n if (row.rowWidth + minWidth > width) {\r\n row = {items:[], rowWidth: 0};\r\n rowList.push(row);\r\n }\r\n row.items.push(item);\r\n item.minWidth = minWidth;\r\n row.rowWidth += minWidth;\r\n\r\n return rowList;\r\n }, [{items:[], rowWidth: 0}]);\r\n\r\n const correctedItems = rows.reduce((flatList, row, index) => {\r\n const remain = (width - row.rowWidth) / row.items.length;\r\n row.items.forEach(item => {\r\n item.widthPercent = ((item.minWidth + remain) / width)*100;\r\n flatList.push(item);\r\n });\r\n return flatList;\r\n }, []);\r\n return (correctedItems);\r\n }\r\n\r\n private requestCustomWidth = (id:number, val:any) => {\r\n\r\n if (this.state.customWidths[id] !== val) {\r\n const customWidths = {...this.state.customWidths, [id]: val};\r\n this.setState({\r\n items: this.calculateWidths(this.props.dashboardFavourites, this.state.width, customWidths),\r\n customWidths\r\n });\r\n }\r\n }\r\n public componentDidUpdate() {\r\n const items = this.calculateWidths(this.props.dashboardFavourites, this.state.width || 500, this.state.customWidths);\r\n const isItemsNew = items.reduce((returnValue, item, index) => {\r\n if (returnValue &&\r\n this.state.items[index] &&\r\n this.state.items[index].minWidth === item.minWidth\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }, true);\r\n if (!isItemsNew) {\r\n this.setState({\r\n items: this.calculateWidths(this.props.dashboardFavourites, this.state.width || 500, this.state.customWidths)\r\n });\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n window.addEventListener('resize', this.handleResize);\r\n this.handleResize();\r\n }\r\n\r\n public componentWillUnmount() {\r\n window.removeEventListener('resize', this.handleResize);\r\n }\r\n public render() {\r\n return (\r\n <div className={styles.favouritesLayoutExpander}>\r\n <div ref={this.layoutRef} className={`favourites-layout ${styles.favouritesLayout}`}>\r\n {this.state.items.map(fav => { return this.renderFavouriteContainer(fav); })}\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private renderFavouriteContainer(favouriteModel: DashboardFavouriteLayout) {\r\n\r\n const definition = !!this.props.containerDefinitions &&\r\n this.props.containerDefinitions.find(f => !!f.favourite && f.favourite.v === favouriteModel.id);\r\n const attr = !!favouriteModel.layoutModel && getFavouriteLayoutAttributes(definition,\r\n favouriteModel.layoutModel.layoutType, dashboardLayoutTypeContext);\r\n\r\n return (<FavouriteContainer\r\n\r\n key={`fav${this.props.mainFavouriteId}_${favouriteModel.id}`}\r\n mainFavouriteId={this.props.mainFavouriteId}\r\n dashboardModelFavourite={favouriteModel}\r\n favouriteLayoutAttributes={attr}\r\n loadFavouriteDataModel={this.props.loadFavouriteDataModel}\r\n drillDown={this.props.drillDown}\r\n caseview={this.props.caseview}\r\n intl={this.props.intl}\r\n translation={this.props.translation}\r\n requestCustomWidth={this.requestCustomWidth}\r\n />);\r\n }\r\n}\r\n","import { DashboardFavouriteLayout, FavouriteContainerState } from 'app/area/dashboard/types-store';\r\nimport { DrillDownCallback, CaseViewCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport interface DashboardContainerExternalProps {\r\n dashboardType: number;\r\n mainFavouriteId?: number;\r\n showDescription: boolean;\r\n location: {\r\n pathname: string;\r\n query: any;\r\n };\r\n hideFilters?: boolean;\r\n}\r\n\r\nexport type FavouriteContainerProps = FavouriteContainerExternalProps & FavouriteContainerState;\r\n\r\nexport interface FavouriteContainerExternalProps {\r\n mainFavouriteId: number;\r\n dashboardModelFavourite: DashboardFavouriteLayout;\r\n favouriteLayoutAttributes: { [key: string]: string | boolean };\r\n loadFavouriteDataModel: (favouriteId: number) => void;\r\n drillDown: DrillDownCallback;\r\n caseview: CaseViewCallback;\r\n intl: any;\r\n translation: any;\r\n requestCustomWidth?: (id:number, width: number) => void;\r\n}\r\n\r\n/*\r\n * The definition of the dashboard, including basic favourite layout information.\r\n */\r\nexport enum DashboardAccessType {\r\n LimitedAccess = 1,\r\n OpenDashboard = 2\r\n}\r\n","\r\nimport { Id, RemoteData } from 'app/infrastructure/remote-data';\r\nimport { DashboardLayoutDefinition } from './types-store';\r\nimport { FavouriteDefinition, ApiResponse, TextCollection } from 'app/types-shared';\r\nimport { DrillDownModel, DrillDownResult } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport const endpoint = {\r\n dashboard: 'dashboard',\r\n dashboardFavouriteDefinition: 'favourite/definition/draft',\r\n dashboardMainDefinition: 'favourite/definition/draft/template/dashboard',\r\n updateMainDefinition: 'favourite/definition/draft',\r\n favourite: 'statisticalReport'\r\n};\r\n\r\nexport const api = {\r\n\r\n /**\r\n * Fetch a favourite in the context of a dashboard.\r\n */\r\n executeFavourite: async (definition: FavouriteDefinition, dashboardId: number) => {\r\n\r\n const request = {\r\n favouriteDefinition: definition,\r\n connectedFavourite: dashboardId\r\n };\r\n\r\n const response = await new RemoteData(`${endpoint.dashboard}/${dashboardId}/favourite/${definition.favourite.v}`)\r\n .resource<any>()\r\n .create(request, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n /**\r\n * Fetch the dashboard type definition.\r\n */\r\n dashboardLayoutDefinition: async (dashboardType: Id, layoutTypeContextId: number): Promise<DashboardLayoutDefinition> => {\r\n const response = await new RemoteData(endpoint.dashboard)\r\n .resource<ApiResponse<DashboardLayoutDefinition>>()\r\n .withId(dashboardType)\r\n .filter({\r\n layoutTypeContextId: layoutTypeContextId\r\n })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n /**\r\n * Creates dashboard main favourite and return its number.\r\n */\r\n createMainFavourite: async (dashboardType: Id): Promise<number> => {\r\n\r\n const response = await new RemoteData(endpoint.dashboardMainDefinition)\r\n .resource<any>()\r\n .filter({\r\n dashboardType\r\n })\r\n .create(undefined, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n /**\r\n * Fetch the dashboard favourite definition for given id.\r\n */\r\n favouriteDefinition: async (id: Id): Promise<FavouriteDefinition> => {\r\n const response = await new RemoteData(endpoint.dashboardFavouriteDefinition)\r\n .resource<ApiResponse<FavouriteDefinition>>()\r\n .withId(id)\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n updateMainDefinition: async (definition: FavouriteDefinition) => {\r\n return new RemoteData(endpoint.updateMainDefinition)\r\n .resource<ApiResponse<FavouriteDefinition>>()\r\n .withId(definition.favourite.v)\r\n .save(definition);\r\n },\r\n\r\n /**\r\n * Drill down from dashboard.\r\n */\r\n drillDown: async (dashboardId: number, favouriteId: number, drillDownModel: DrillDownModel): Promise<DrillDownResult> => {\r\n const response: any = await new RemoteData(`${endpoint.dashboard}/${dashboardId}/favourite/${favouriteId}/drilldown`)\r\n .resource<ApiResponse<DrillDownResult>>()\r\n .create(drillDownModel, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n /**\r\n * Fetch tranlated texts for a given application area\r\n */\r\n textCollection: async (area: number): Promise<TextCollection> => {\r\n const remote = new RemoteData('text/collection');\r\n const response: any = await remote.resource<TextCollection>().withId(area).single();\r\n return response.data;\r\n }\r\n};\r\n","\r\nimport { api } from './api';\r\nimport { errorSafe, LoggedError } from 'app/infrastructure/redux';\r\nimport {\r\n RequestExecuteFavourite,\r\n ReceiveExecuteFavourite,\r\n RequestContainerDefinitions,\r\n ReceiveContainerDefinitions,\r\n RequestMainFavouriteDefinition,\r\n ReceiveMainFavouriteDefinition,\r\n FailedMainFavouriteDefinition,\r\n RequestDrillDown,\r\n ClearMainFavouriteDefinition,\r\n UpdateMainFavouriteDefinition,\r\n FailedContainerDefinitions,\r\n FailedExecuteFavourite\r\n} from './action-types';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching, FavouriteDefinition } from 'app/types-shared';\r\nimport * as routerActions from 'app/area/shared/navigation';\r\nimport { DrillDownModel } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\n/**\r\n * \"The only way to change the state tree is to emit an action, an object describing what happened.\"\r\n *\r\n * ACTION CREATORS - These are functions exposed to UI components that will trigger a state transition.\r\n * They don't directly mutate state, but they can have external side-effects (such as loading data).\r\n */\r\nexport const actionCreators = {\r\n\r\n /**\r\n * Creates (if needed) and loads definition for dashboard main favourite.\r\n * \r\n * @param {number} dashboardType - dashboard favourite type - used to generate new favourite when mainFavouriteId is not provided\r\n * @param {number} mainFavouriteId - main dashboard favourite id - used to get dashboard favourite definition\r\n * @param {boolean} readonlyDashboard - if dashboard is readonly it will not update location with favourite id\r\n * @param {{ pathname: string; query: any }} location - browser location object - used to redirects\r\n */\r\n loadMainFavourite: (dashboardType: number, mainFavouriteId: number, readonlyDashboard: boolean,\r\n location: { pathname: string; query: any }):\r\n ActionDispatching<any, ApplicationState> => async (dispatch, getState) => {\r\n\r\n dispatch(new RequestMainFavouriteDefinition());\r\n\r\n if (!mainFavouriteId) {\r\n\r\n try {\r\n\r\n mainFavouriteId = await api.createMainFavourite(dashboardType);\r\n } catch (err) {\r\n\r\n dispatch(new LoggedError(err));\r\n return;\r\n }\r\n }\r\n\r\n try {\r\n\r\n const mainFavouriteDefinition = await api.favouriteDefinition(mainFavouriteId);\r\n\r\n if (!readonlyDashboard) {\r\n\r\n routerActions.replace({ pathname: location.pathname + '/' + mainFavouriteId });\r\n }\r\n\r\n dispatch(new ReceiveMainFavouriteDefinition(mainFavouriteId, mainFavouriteDefinition));\r\n\r\n } catch (err) {\r\n\r\n const { fav, ...queryWithoutFav } = location.query;\r\n\r\n routerActions.replace({ pathname: location.pathname, query: queryWithoutFav });\r\n\r\n dispatch(new FailedMainFavouriteDefinition(mainFavouriteId));\r\n }\r\n },\r\n\r\n /**\r\n * Loads dashboard container favourites definitions.\r\n * \r\n * @param {number} typeId - the dashboard type id to get definition for.\r\n * @param {number} layoutTypeContextId - the context that this layout will be shown in.\r\n */\r\n loadContainerFavourites: (typeId: number, layoutTypeContextId: number):\r\n ActionDispatching<any, ApplicationState> => errorSafe(\r\n async (dispatch, getState) => {\r\n\r\n dispatch(new RequestContainerDefinitions(typeId));\r\n\r\n try {\r\n const typeDefinition = await api.dashboardLayoutDefinition(typeId, layoutTypeContextId);\r\n\r\n typeDefinition.dashboardFavourites.forEach(x => x.id = x.favourite);\r\n\r\n const containerFavouriteDefinitions = await Promise.all(typeDefinition.dashboardFavourites.map(\r\n df => api.favouriteDefinition(df.favourite)));\r\n\r\n dispatch(new ReceiveContainerDefinitions(typeId, typeDefinition, containerFavouriteDefinitions));\r\n }\r\n catch (err) {\r\n dispatch(new FailedContainerDefinitions(typeId));\r\n }\r\n }),\r\n\r\n /**\r\n * Executes dashboard favourite.\r\n * \r\n * @param {FavouriteDefinition} definition - container favourite definition to be executed\r\n * @param {number} mainFavouriteId - main dashboard favourite id\r\n * @param {number} containerFavouriteId - container favourite id\r\n */\r\n executeFavourite: (definition: FavouriteDefinition,\r\n mainFavouriteId: number,\r\n containerFavouriteId: number,\r\n mainFavouriteRequestId?: number):\r\n ActionDispatching<any, ApplicationState> => errorSafe(\r\n async (dispatch, getState) => {\r\n\r\n try {\r\n dispatch(new RequestExecuteFavourite(mainFavouriteId, containerFavouriteId));\r\n\r\n const stateBeforeFetch = (getState() as ApplicationState).dashboard;\r\n if (!!mainFavouriteRequestId && stateBeforeFetch.workingDefinitionRequestId !== mainFavouriteRequestId) {\r\n return;\r\n }\r\n const favourite = await api.executeFavourite(definition, mainFavouriteId);\r\n\r\n const stateAfterFetch = (getState() as ApplicationState).dashboard;\r\n if (!!mainFavouriteRequestId && stateAfterFetch.workingDefinitionRequestId !== mainFavouriteRequestId) {\r\n return;\r\n }\r\n dispatch(new ReceiveExecuteFavourite(mainFavouriteId, containerFavouriteId, favourite));\r\n }\r\n catch(err) {\r\n dispatch(new FailedExecuteFavourite(mainFavouriteId, containerFavouriteId));\r\n }\r\n }),\r\n\r\n /**\r\n * Drilldown from dashboard\r\n * \r\n * @param {number} mainFavouriteId - main dashboard favourite id\r\n * @param {number} containerFavouriteId - container favourite id\r\n * @param {DrillDownModel} drillDownModel - parameters to drilldown\r\n */\r\n drillDownToCaseListing: (mainFavouriteId: number, containerFavouriteId: number, drillDownModel: DrillDownModel):\r\n ActionDispatching<any, ApplicationState> => errorSafe(\r\n async (dispatch, getState) => {\r\n\r\n dispatch(new RequestDrillDown(mainFavouriteId, containerFavouriteId, drillDownModel));\r\n\r\n const result = await api.drillDown(mainFavouriteId, containerFavouriteId, drillDownModel);\r\n\r\n //TODO: Deal with errors by dispatching action to dashboard or in case listing component or in a different route?\r\n routerActions.toCaseListing(result.favourite);\r\n }),\r\n updateMainFavourite: (definition: FavouriteDefinition, containerDefinitions: FavouriteDefinition[]):\r\n ActionDispatching<any, ApplicationState> => errorSafe(\r\n async (dispatch, getState) => { \r\n try {\r\n dispatch(new UpdateMainFavouriteDefinition(definition));\r\n const {workingDefinitionRequestId} = (getState() as ApplicationState).dashboard;\r\n\r\n await api.updateMainDefinition(definition);\r\n\r\n const { workingDefinitionRequestId: workingDefinitionRequestIdAfter } = (getState() as ApplicationState).dashboard;\r\n if (workingDefinitionRequestIdAfter !== workingDefinitionRequestId) {\r\n return;\r\n }\r\n\r\n containerDefinitions.forEach(d => dispatch(\r\n actionCreators.executeFavourite(\r\n d,\r\n definition.favourite.v,\r\n d.favourite.v,\r\n workingDefinitionRequestId\r\n )\r\n ));\r\n }\r\n catch(err) {\r\n dispatch(new FailedMainFavouriteDefinition(definition.favourite.v));\r\n }\r\n\r\n }),\r\n clearMainFavourite: (mainFavouriteId: number):\r\n ActionDispatching<any, ApplicationState> => errorSafe(\r\n async (dispatch, getState) => {\r\n dispatch(new ClearMainFavouriteDefinition(mainFavouriteId));\r\n })\r\n};\r\n","import * as React from 'react';\r\nimport debounce from 'lodash/debounce';\r\nimport { SpinLoader } from 'app/components/spin-loader';\r\nimport { DashboardLayout } from './dashboard-layout';\r\nimport { STATE, debounceExecuteFavouriteWait } from 'app/constants';\r\nimport {\r\n DashboardContainerExternalProps,\r\n DashboardAccessType\r\n} from './types';\r\nimport {\r\n DashboardLayoutDefinition,\r\n DashboardState\r\n} from './types-store';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { dashboardTranslation, dashboardLayoutTypeContext } from './constants';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport * as routeUrls from 'app/area/shared/route-urls';\r\nimport { FiltersDrawer } from 'app/area/filters/filters-drawer';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport styles from './dashboard.scss';\r\nimport get from 'lodash/get';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\nimport { DrillDownModel } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\nimport { MeatballMenu } from 'ui';\r\nimport { triggerPrintDialog } from 'app/infrastructure/platform';\r\n\r\ninterface DashboardSelectorProps {\r\n containerLayout: DashboardLayoutDefinition;\r\n mainFavouriteId?: number;\r\n mainFavouriteReadonly: boolean;\r\n containerDefinitions: FavouriteDefinition[];\r\n mainFavouriteDefinition: FavouriteDefinition;\r\n mainFavouriteWorkingDefinition: FavouriteDefinition;\r\n}\r\n\r\ntype DashboardContainerProps = DashboardContainerExternalProps & DefaultContainerProps & DashboardState\r\n & DashboardSelectorProps & typeof actionCreators;\r\n\r\nexport class DashboardComponent extends React.Component<DashboardContainerProps> {\r\n private debounceExecute: any;\r\n public static statePath: string = STATE.dashboard;\r\n\r\n constructor(props: DashboardContainerProps) {\r\n super(props);\r\n this.debounceExecute = debounce((definition: FavouriteDefinition, containerDefinitions: FavouriteDefinition[]) => {\r\n this.props.updateMainFavourite(definition, containerDefinitions);\r\n }, debounceExecuteFavouriteWait);\r\n }\r\n\r\n public componentDidMount() {\r\n this.updateDashboards();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.updateDashboards();\r\n }\r\n\r\n public componentWillUnmount() {\r\n !!this.props.mainFavouriteId && this.props.clearMainFavourite(this.props.mainFavouriteId);\r\n }\r\n\r\n private updateDashboards() {\r\n const { dashboardType, mainFavouriteId, mainFavouriteReadonly, location } = this.props;\r\n\r\n if (this.shouldLoadMainFavourite()) {\r\n this.props.loadMainFavourite(dashboardType, mainFavouriteId, mainFavouriteReadonly, location);\r\n }\r\n if (this.shouldLoadContainerFavourites()) {\r\n this.props.loadContainerFavourites(dashboardType, dashboardLayoutTypeContext);\r\n }\r\n }\r\n\r\n private isValidDashboardType(dashboardType: number) {\r\n return dashboardType && dashboardType > 0;\r\n }\r\n\r\n private shouldLoadContainerFavourites() {\r\n const { dashboardType, layouts = [], containerLayout } = this.props;\r\n\r\n return !(layouts[dashboardType] && layouts[dashboardType].error) && \r\n this.isValidDashboardType(dashboardType) &&\r\n (!layouts[dashboardType] || !layouts[dashboardType].fetching) &&\r\n !containerLayout;\r\n }\r\n\r\n private shouldLoadMainFavourite() {\r\n const { \r\n dashboardType, fetchingMainFavourite, \r\n errorFetchingMainFavourite, mainFavourite \r\n } = this.props;\r\n\r\n return !errorFetchingMainFavourite && (!!dashboardType && !fetchingMainFavourite && !mainFavourite);\r\n }\r\n\r\n private loadFavouriteDataModel = (favouriteId: number) => {\r\n const containerDefinition = this.props.containerDefinitions.find(d => d.favourite.v === favouriteId);\r\n this.props.executeFavourite(containerDefinition, this.props.mainFavouriteId, favouriteId);\r\n }\r\n\r\n private drillDown = (favouriteId: number, model: DrillDownModel) => {\r\n const { drillDownToCaseListing, mainFavouriteId } = this.props;\r\n drillDownToCaseListing(mainFavouriteId, favouriteId, model);\r\n }\r\n\r\n private caseview = (caseNumber: number) => routeUrls.toCaseView(caseNumber);\r\n\r\n private handleUpdateDefinition = (transform: any) => {\r\n const { containerDefinitions = [], mainFavouriteDefinition, mainFavouriteWorkingDefinition } = this.props;\r\n const definition = !!mainFavouriteDefinition && mainFavouriteDefinition;\r\n const updatedDefinition: FavouriteDefinition = transform(definition);\r\n\r\n if (!deepEquals(mainFavouriteWorkingDefinition, updatedDefinition)) {\r\n this.debounceExecute(updatedDefinition, containerDefinitions);\r\n }\r\n }\r\n\r\n public render() {\r\n const { containerDefinitions = [], dashboardType, mainFavouriteId, containerLayout, fetchingMainFavourite,\r\n showDescription, intl, translation = {}, mainFavouriteDefinition, hideFilters = false } = this.props;\r\n const description = this.isValidDashboardType(dashboardType) ?\r\n (showDescription ? this.renderDescription() : null) : translation.dashboard_not_render_description;\r\n\r\n const dashboardFavourites = (!fetchingMainFavourite && containerLayout && containerLayout.dashboardFavourites) || [];\r\n const favouritesLayout = <div className={styles.favouritesWrapper}>\r\n <DashboardLayout\r\n mainFavouriteId={mainFavouriteId}\r\n dashboardFavourites={dashboardFavourites}\r\n containerDefinitions={containerDefinitions}\r\n loadFavouriteDataModel={this.loadFavouriteDataModel}\r\n drillDown={this.drillDown}\r\n caseview={this.caseview}\r\n intl={intl}\r\n translation={translation}\r\n />\r\n </div>;\r\n\r\n const hideDisclaimer = get(this.props,'containerLayout.dashboardAccessType.v') === DashboardAccessType.OpenDashboard;\r\n\r\n return (\r\n <MainGridContainer className={styles.dashboard} wide={!this.props.hideFilters}>\r\n {description}\r\n {hideFilters ?\r\n favouritesLayout\r\n : <FiltersDrawer\r\n title={translation.filters_title}\r\n definition={mainFavouriteDefinition}\r\n updateDefinition={this.handleUpdateDefinition}\r\n hideDisclaimerMessage={hideDisclaimer}>\r\n {favouritesLayout}\r\n </FiltersDrawer>}\r\n </MainGridContainer>\r\n );\r\n }\r\n\r\n private onPrint = () => {\r\n triggerPrintDialog();\r\n }\r\n\r\n private renderDescription() {\r\n return (<div className={styles.headerContainer}><h1 className=\"page-heading\">\r\n {this.props.containerLayout ? this.props.containerLayout.description : <SpinLoader />}\r\n </h1>\r\n <MeatballMenu closeAfterClick={true}>\r\n <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onPrint}>\r\n {this.props.translation.print}\r\n </button>\r\n </li>\r\n </MeatballMenu>\r\n </div>);\r\n }\r\n}\r\n\r\nconst selectors = {\r\n containerLayout: (state: DashboardState, props: DashboardContainerProps) =>\r\n state.layouts[props.dashboardType] &&\r\n state.layouts[props.dashboardType].definition,\r\n containerDefinitions: (state: DashboardState, props: DashboardContainerProps) =>\r\n state.layouts[props.dashboardType] &&\r\n state.layouts[props.dashboardType].containerDefinitions,\r\n mainFavouriteReadonly: (state: DashboardState, props: DashboardContainerProps) =>\r\n !!props.mainFavouriteId,\r\n mainFavouriteDefinition: (state: DashboardState, props: DashboardContainerProps) => {\r\n return !!state.mainFavourite\r\n && !!state.mainFavourite.definition\r\n && state.mainFavourite.definition;\r\n },\r\n mainFavouriteWorkingDefinition: (state: DashboardState, props: DashboardContainerProps) => {\r\n return !!state.mainFavourite\r\n && !!state.mainFavourite.workingDefinition\r\n && state.mainFavourite.workingDefinition;\r\n }\r\n};\r\n\r\nconst container: React.ComponentClass<DashboardContainerExternalProps> =\r\n containerFactory(DashboardComponent, actionCreators, selectors, dashboardTranslation) as any;\r\n\r\nexport { container as Dashboard };\r\n","export const reportTranslation = {\r\n filters_predefined_date: 3853,\r\n filters_search_placeholder: 7557,\r\n filters_date_placeholder: 7562,\r\n filters_date_range_to: 7600,\r\n filters_date_range_from: 7567,\r\n filters_date_range_date_interval: 3707,\r\n filters_date_range_date_fixed_period: 3706,\r\n filters_decimal_range: 7679,\r\n filters_exclude: 7638,\r\n filters_include: 7639, \r\n filter_menu_options_desc_exclude: 7693,\r\n filter_menu_options_desc_exclude_sub: 7691,\r\n filter_menu_option_include: 7698,\r\n filter_menu_option_exclude: 7693,\r\n filter_menu_option_include_sub: 7696,\r\n filter_menu_option_exclude_sub: 7691,\r\n filters_my_unit: 7714,\r\n filters_my_location: 7715,\r\n report_title: 7731,\r\n report_subtitle: 7563,\r\n generate_title: 7565,\r\n generate_button: 7564,\r\n no_options_found: 7644,\r\n select_one_option: 7347,\r\n must_be_filled_out: 7598,\r\n report_generated: 7599,\r\n report_not_generated: 7634,\r\n report_started: 7993,\r\n report_success: 7873,\r\n remove_filter: 7662,\r\n done: 7338 \r\n};\r\n\r\nexport const specialReportId = 11;\r\n\r\nexport const maxLengthOfEmailsInputValue = 4000;\r\n","import { FavouriteDefinition, FavouriteCondition } from 'app/types-shared';\r\nimport { specialReportId } from 'app/area/company-report/constants';\r\n\r\nexport interface ReportFavouriteOptions {\r\n email?: string;\r\n favDef: FavouriteDefinition;\r\n reportTypeId: number;\r\n conditions: FavouriteCondition[];\r\n predefDate?: string;\r\n}\r\n\r\nexport const generateFavourite = (reportFavouriteOptions: ReportFavouriteOptions) => {\r\n const { email, favDef, reportTypeId, conditions, predefDate } = reportFavouriteOptions;\r\n\r\n const notModifiedReport = favDef.reports.filter(r => r.report.v !== specialReportId);\r\n const toModifyReport = favDef.reports.find(r => r.report.v === specialReportId);\r\n\r\n const modifiedReport = {\r\n ...toModifyReport,\r\n report: { v: specialReportId },\r\n specialReport: { v: reportTypeId },\r\n ...(!!predefDate && { predefDate })\r\n };\r\n\r\n return Object.assign({}, favDef, {\r\n ...(!!email && { emailSubscribers: email }),\r\n selectedReport: { v: specialReportId },\r\n reports: [modifiedReport, ...notModifiedReport],\r\n conditions: conditions\r\n } as FavouriteDefinition); \r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data';\r\nimport { FavouriteDefinition, ApiResponse } from 'app/types-shared';\r\nimport { Metadata } from 'app/area/company-report/types-store';\r\n\r\nexport const endpoint = {\r\n favouriteDefinition: 'favourite/definition/draft',\r\n favouriteDefinitionTemplate: 'favourite/definition/draft/template/search',\r\n specialReportExecute: 'specialreport',\r\n specialReportMetadata: (id: number | string) => `specialReport/${id}/metadata`,\r\n filterDomainsSpecialReport: (reportId: number) => `report/specialReport/${reportId}/filterDomains`\r\n};\r\n\r\nexport const api = {\r\n\r\n loadFavouriteDefinitionTemplate: async (): Promise<number> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteDefinitionTemplate)\r\n .resource<any>()\r\n .create(undefined, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n loadMetadata: async (id: number): Promise<any> => {\r\n const response = await new RemoteData(endpoint.specialReportMetadata(id))\r\n .resource<ApiResponse<Metadata>>()\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n definition: async (id: string | number): Promise<FavouriteDefinition> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteDefinition).resource<ApiResponse<FavouriteDefinition>>()\r\n .withId(id)\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n sendReport: async (favouriteDefinition: FavouriteDefinition): Promise<ApiResponse<FavouriteDefinition>> => {\r\n return await new RemoteData(endpoint.specialReportExecute)\r\n .resource<ApiResponse<FavouriteDefinition>>()\r\n .create(favouriteDefinition, false);\r\n },\r\n\r\n loadUsePredefDate: async (reportId?: number): Promise<boolean> => {\r\n const response = await new RemoteData(endpoint.filterDomainsSpecialReport(reportId)) \r\n .resource<ApiResponse<any>>()\r\n .all();\r\n\r\n return response.data.usePredefDate;\r\n }\r\n};\r\n","import { reportTranslation } from 'app/area/company-report/constants';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { generateFavourite } from './generate-favourite';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/index';\r\nimport { isValidListOfEmails } from 'app/infrastructure/validation/email';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { FavouriteOptions, ActionDispatching } from 'app/types-shared';\r\nimport { ValidationLevel, ValidationProps } from 'ui';\r\nimport * as actions from './action-types';\r\nimport { api } from './api';\r\nimport { SuccessNotification, ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\n\r\nexport const actionCreators = {\r\n\r\n loadMetadata: (reportId: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any) => {\r\n\r\n dispatch(new actions.RequestMetadata());\r\n \r\n const [\r\n metadata,\r\n usePredefDate\r\n ] = await Promise.all([\r\n api.loadMetadata(reportId),\r\n api.loadUsePredefDate(reportId)\r\n ]);\r\n\r\n dispatch(new actions.ReceiveMetadata(metadata, usePredefDate));\r\n }),\r\n\r\n saveReport: (reportId: number, definition: FavouriteOptions, successMessage): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n const reportState = getState().companyReport;\r\n const translate = createDescriptionSelector(reportState.texts);\r\n\r\n try {\r\n dispatch(new actions.RequestFavouriteDefinitionTemplate());\r\n const toastMessage = toastFactory();\r\n toastMessage.dispatch(translate(reportTranslation.report_started));\r\n\r\n const favouriteId = await api.loadFavouriteDefinitionTemplate();\r\n\r\n const favouriteTemplate = await api.definition(favouriteId);\r\n\r\n dispatch(new actions.ReceiveFavouriteDefinitionTemplate(favouriteTemplate));\r\n\r\n const favouriteDefinition = generateFavourite({\r\n favDef: favouriteTemplate,\r\n reportTypeId: reportId,\r\n conditions: definition && definition.conditions,\r\n predefDate: definition && definition.predefDate\r\n });\r\n\r\n dispatch(new actions.RequestSendScheduledReport());\r\n\r\n await api.sendReport(favouriteDefinition);\r\n\r\n toastMessage.success(successMessage);\r\n dispatch(new actions.ReceiveScheduledReport());\r\n\r\n } catch (err) {\r\n dispatch(new actions.FailedToSendScheduledReport());\r\n\r\n const errorMessage = translate(reportTranslation.report_not_generated);\r\n dispatch(new ErrorNotification(errorMessage));\r\n }\r\n },\r\n\r\n sendReport: (emails: string, reportId: number, definition: FavouriteOptions): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n const reportState = getState().companyReport;\r\n const translate = createDescriptionSelector(reportState.texts);\r\n\r\n try {\r\n\r\n if (isValidListOfEmails(emails)) {\r\n\r\n dispatch(new actions.RequestFavouriteDefinitionTemplate());\r\n\r\n const favouriteId = await api.loadFavouriteDefinitionTemplate();\r\n\r\n const favouriteTemplate = await api.definition(favouriteId);\r\n\r\n dispatch(new actions.ReceiveFavouriteDefinitionTemplate(favouriteTemplate));\r\n\r\n const favouriteDefinition = generateFavourite({\r\n email: emails,\r\n favDef: favouriteTemplate,\r\n reportTypeId: reportId,\r\n conditions: definition.conditions,\r\n predefDate: definition.predefDate\r\n });\r\n \r\n dispatch(new actions.RequestSendScheduledReport());\r\n\r\n await api.sendReport(favouriteDefinition);\r\n dispatch(new SuccessNotification(translate(reportTranslation.report_generated)));\r\n dispatch(new actions.ReceiveScheduledReport());\r\n\r\n } else {\r\n const validationProps: ValidationProps = {\r\n level: ValidationLevel.error,\r\n messages: [{ message: translate(reportTranslation.must_be_filled_out), level: ValidationLevel.error }]\r\n };\r\n dispatch(new actions.SetEmailValue(emails, validationProps));\r\n }\r\n } catch (err) {\r\n dispatch(new actions.FailedToSendScheduledReport());\r\n\r\n const errorMessage = translate(reportTranslation.report_not_generated);\r\n dispatch(new ErrorNotification(errorMessage));\r\n }\r\n },\r\n\r\n setEmail: (value: string, validation?: ValidationProps): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.SetEmailValue(value, validation));\r\n }),\r\n\r\n clearForm: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.ClearForm());\r\n }),\r\n\r\n updateFiltersDefinition: (definition: FavouriteOptions): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.UpdateFiltersFavourite(definition));\r\n },\r\n\r\n validateReportFilters: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.ValidateReportFilters());\r\n })\r\n};\r\n","import * as React from 'react';\r\n\r\nexport interface ResizeWrapperState {\r\n windowWidth: number;\r\n} \r\n\r\nexport class ResizeWrapper extends React.Component<{}, ResizeWrapperState> {\r\n\r\n constructor(props: {}) {\r\n super(props);\r\n this.state = {\r\n windowWidth: window.innerWidth\r\n };\r\n }\r\n\r\n public componentDidMount() {\r\n window.addEventListener('resize', this.handleResize);\r\n }\r\n\r\n public componentWillUnmount(){\r\n window.removeEventListener('resize', this.handleResize);\r\n }\r\n\r\n private handleResize = () => {\r\n this.setState({\r\n windowWidth: window.innerWidth\r\n });\r\n }\r\n\r\n public render() { \r\n return React.cloneElement(React.Children.only(this.props.children as any), { width: this.state.windowWidth });\r\n }\r\n}\r\n","import { AdvancedSearchTypes } from 'app/types-shared';\r\nimport { Filter, FilterDomains, FilterDomainNode } from 'app/components/filters/types';\r\nimport { FilterTypes } from 'app/components/filters/types';\r\n\r\nlet filtersIdCounter = 1;\r\n\r\nconst advancedField = (advancedSearchTypes: AdvancedSearchTypes[], filterType: FilterTypes) =>\r\n advancedSearchTypes.find(item => item.id.v === filterType);\r\n\r\nexport const createReportDefinition = (\r\n filterDomains: FilterDomainNode[],\r\n advancedSearchTypes: AdvancedSearchTypes[],\r\n predefDate: Date,\r\n predefinedLabel: string,\r\n open: boolean = false): Filter[] => {\r\n\r\n const predefinedFilter: Filter = {\r\n id: FilterDomains.PredefDate + '_' + (filtersIdCounter++),\r\n domain: FilterDomains.PredefDate,\r\n label: predefinedLabel,\r\n advancedSearchType: FilterTypes.PredefDate,\r\n advancedField: advancedField(advancedSearchTypes, FilterTypes.PredefDate),\r\n initialValue: predefDate,\r\n conditions: [],\r\n menuOptions: [],\r\n optionType: undefined,\r\n subOptionTypes: [],\r\n sequence: 0,\r\n isOpen: open,\r\n searchRequired: undefined\r\n };\r\n\r\n const emptyFilters: Filter[] = filterDomains.map(f => ({\r\n id: f.domain + '_' + (filtersIdCounter++),\r\n domain: f.domain,\r\n label: f.label,\r\n advancedSearchType: f.advancedSearchType,\r\n advancedField: advancedField(advancedSearchTypes, f.advancedSearchType),\r\n initialValue: undefined,\r\n conditions: [],\r\n menuOptions: [],\r\n optionType: undefined,\r\n subOptionTypes: [],\r\n sequence: f.sequence,\r\n isOpen: open,\r\n searchRequired: f.searchRequired\r\n }));\r\n\r\n return [\r\n predefinedFilter,\r\n ...emptyFilters\r\n ].sort((a, b) => a.sequence - b.sequence);\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { actionCreators } from './actions';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { FiltersPanel } from 'app/components/filters/filters-panel/filters-panel';\r\nimport { ResizeWrapper } from 'app/components/resize-wrapper';\r\nimport { valuesSelector } from 'app/infrastructure/simple-form/selectors';\r\nimport { FilterMenuOptions, FilterMenuOptionsTypes, FiltersState, FilterDomains } from 'app/components/filters/types';\r\nimport { withSimpleForm } from 'app/infrastructure/simple-form';\r\nimport { SimpleFormProps, SimpleFormAreaState } from 'app/infrastructure/simple-form/types';\r\nimport { filtersTranslations } from './constants';\r\nimport { createReportDefinition } from './report/map-to-filters';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { customFilterFieldPostfix } from 'app/components/filters/filters-panel/constants';\r\nimport { FilterOptionType } from 'app/area/filters/types';\r\nimport { updateFilterConditions } from 'app/components/filters/filters-panel/conditions/update-filter-conditions';\r\n\r\nexport interface ReportComponentProps {\r\n simpleForm?: SimpleFormAreaState;\r\n updateDefinition: (definition: Partial<FavouriteDefinition>) => void;\r\n reportId: number;\r\n title: string;\r\n subtitle: string;\r\n predefinedTitle: string;\r\n validateFilters?: boolean;\r\n}\r\n\r\ninterface FiltersContainerState {\r\n definition: Partial<FavouriteDefinition>;\r\n}\r\n\r\nexport type ReportContainerProps = ReportComponentProps & FiltersState & DefaultContainerProps & typeof actionCreators & SimpleFormProps;\r\n\r\nexport class ReportComponent extends React.Component<ReportContainerProps, FiltersContainerState> {\r\n public static statePath: string = STATE.filters;\r\n\r\n public componentDidMount() {\r\n const { filterDomains, advancedSearchTypes, reportData, predefinedTitle, reportId } = this.props;\r\n\r\n this.props.clearAll();\r\n this.props.loadFilters(reportId);\r\n this.props.loadAdvancedSearchTypes();\r\n this.setState({\r\n definition: {\r\n conditions: []\r\n }\r\n });\r\n\r\n if (!!filterDomains && filterDomains.length > 0 &&\r\n !!advancedSearchTypes && advancedSearchTypes.length > 0\r\n && !!reportData && !!reportData.usePredefDate) {\r\n this.props.updateFilters(createReportDefinition(filterDomains,\r\n advancedSearchTypes, reportData.date, predefinedTitle, true));\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: ReportContainerProps) {\r\n\r\n if (prevProps.reportId !== this.props.reportId) { \r\n this.props.clearAll();\r\n this.props.loadFilters(this.props.reportId);\r\n this.props.loadAdvancedSearchTypes();\r\n this.setState({\r\n definition: {\r\n conditions: []\r\n }\r\n });\r\n return;\r\n }\r\n\r\n const { filterDomains, advancedSearchTypes, reportData, predefinedTitle, simpleForm, currentList } = this.props;\r\n\r\n if (!!filterDomains && filterDomains.length > 0 && reportData &&\r\n !!advancedSearchTypes && advancedSearchTypes.length > 0 &&\r\n (prevProps.filterDomains !== filterDomains ||\r\n prevProps.advancedSearchTypes !== advancedSearchTypes ||\r\n reportData.usePredefDate !== (prevProps.reportData && prevProps.reportData.usePredefDate))) {\r\n\r\n this.props.updateFilters(createReportDefinition(filterDomains, advancedSearchTypes, reportData.date, predefinedTitle, true));\r\n }\r\n\r\n /**\r\n * Executes update, when filters are changed\r\n */\r\n if (simpleForm.editing.values && currentList && currentList.length > 0 &&\r\n (currentList !== prevProps.currentList || simpleForm.editing.values !== prevProps.simpleForm.editing.values)) {\r\n\r\n const editingValues = simpleForm.editing.values;\r\n\r\n const conditions = updateFilterConditions(this.props, editingValues, []) || [];\r\n\r\n const predefinedFilter = currentList.find(item => item.domain === FilterDomains.PredefDate);\r\n const predefinedFilterValues = simpleForm.editing.values[predefinedFilter.id + customFilterFieldPostfix.predefDate];\r\n const predefinedFilterValue = predefinedFilterValues && predefinedFilterValues.value;\r\n\r\n const modifiedDefinition = {\r\n conditions,\r\n ...(!!predefinedFilterValue && { predefDate: predefinedFilterValue })\r\n };\r\n\r\n // Check if data definition has been changed to avoid unecessary calls (e.g. when set exclude without selected value)\r\n if (!deepEquals(this.state.definition, modifiedDefinition)) {\r\n this.props.updateDefinition(modifiedDefinition);\r\n this.setState({ definition: modifiedDefinition });\r\n }\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearAll();\r\n }\r\n\r\n private onFilterMenuOption = (id: string, option: FilterMenuOptions, type: FilterMenuOptionsTypes) => {\r\n this.props.setFilterOption({ id, option, type }, FilterOptionType.MENU_OPTION);\r\n }\r\n\r\n private onRemoveFilters = (id: string) => {\r\n const ids = Object.keys(valuesSelector(this.props.simpleForm))\r\n .filter(element => element.indexOf(id) === 0);\r\n\r\n this.props.clearFilterOptions(id);\r\n this.props.clearValues(ids);\r\n }\r\n\r\n public render() { \r\n const { currentList, simpleForm, validation, reportData } = this.props;\r\n const userProfile = {\r\n id: this.props.sharedState.id,\r\n name: this.props.sharedState.name,\r\n unit: this.props.sharedState.unit,\r\n location: this.props.sharedState.location\r\n };\r\n\r\n const currentListFilteredOnUsingPredefDate = reportData && !reportData.usePredefDate ?\r\n currentList.filter(cl => cl.domain !== FilterDomains.PredefDate) : currentList;\r\n return !!currentListFilteredOnUsingPredefDate && currentListFilteredOnUsingPredefDate.length > 0 &&\r\n <div>\r\n <div className=\"page-heading\">\r\n <h1>{this.props.reportData.reportTypeDescription}</h1>\r\n <h3>{this.props.title}</h3>\r\n </div>\r\n <h3 className=\"tertiary-group-title\">{this.props.subtitle}</h3>\r\n <ResizeWrapper>\r\n <FiltersPanel\r\n filtersDefinition={currentListFilteredOnUsingPredefDate}\r\n editingValues={simpleForm.editing.values}\r\n translation={this.props.translation}\r\n userProfile={userProfile}\r\n onFilterMenuOption={this.onFilterMenuOption}\r\n onRemove={this.onRemoveFilters}\r\n validate={this.props.validate}\r\n validation={validation}\r\n onFilterOptionType={this.props.setFilterOption} \r\n validateFilters={this.props.validateFilters}\r\n />\r\n </ResizeWrapper>\r\n </div>;\r\n }\r\n}\r\n\r\nconst container = containerFactory<ReportComponentProps>(withSimpleForm(ReportComponent), actionCreators, undefined, filtersTranslations);\r\n\r\nexport { container as FiltersReport };\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { actionCreators } from './actions';\r\nimport { FavouriteOptions } from 'app/types-shared';\r\nimport { CompanyReportState } from './types-store';\r\nimport { reportTranslation, maxLengthOfEmailsInputValue } from './constants';\r\nimport { ButtonPrimary, Textarea } from 'ui';\r\nimport { SpinLoader } from 'app/components';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport styles from './report-view.scss';\r\nimport { FiltersReport } from 'app/area/filters/filters-report';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\nexport interface CompanyReportComponentProps {\r\n reportId: number;\r\n}\r\n\r\nexport type CompanyReportContainerProps = CompanyReportComponentProps & CompanyReportState & DefaultContainerProps & typeof actionCreators;\r\n\r\nexport class ReportComponent extends React.Component<CompanyReportContainerProps, {}> {\r\n public static statePath: string = STATE.companyReport;\r\n private keyMap: any;\r\n private handlers: any; \r\n\r\n constructor(props: CompanyReportContainerProps) {\r\n super(props);\r\n\r\n this.keyMap = {\r\n onEnter: [keyCodeTypes.Enter]\r\n };\r\n this.handlers = {\r\n onEnter: (event) => this.onEnter(event)\r\n }; \r\n }\r\n\r\n private onEnter = (e: React.FormEvent<any>) => {\r\n const { metadata: emailReport } = this.props;\r\n e.preventDefault();\r\n !!emailReport && this.sendReport();\r\n }\r\n\r\n public componentDidMount() {\r\n const { reportId, loadMetadata, sharedState } = this.props;\r\n\r\n this.onChangeEmail(sharedState.email);\r\n loadMetadata(reportId);\r\n }\r\n\r\n public componentDidUpdate(prevProps: CompanyReportContainerProps) {\r\n if (prevProps.reportId !== this.props.reportId) {\r\n this.props.clearForm();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearForm();\r\n }\r\n\r\n private onChangeEmail = (value: string) => {\r\n this.props.setEmail(value.trim());\r\n }\r\n\r\n private sendReport = () => {\r\n const { emails, reportId, definition, sendReport } = this.props;\r\n this.isValid() && sendReport(emails, reportId, definition);\r\n }\r\n\r\n private saveReport = () => {\r\n const { reportId, definition, saveReport, translation } = this.props; \r\n !this.cannotSaveReport() ? \r\n saveReport(reportId, definition, () => <Link\r\n style={{ color: '#fff' }}\r\n to={routeConstants.myDownloadsView}>\r\n {translation.report_success}\r\n </Link>) : this.props.validateReportFilters();\r\n }\r\n\r\n private updateDefinition = (definition: FavouriteOptions) => {\r\n this.props.updateFiltersDefinition(definition);\r\n }\r\n\r\n private isValid = () => {\r\n return this.props.definition && this.props.definition.predefDate && this.props.emails;\r\n }\r\n\r\n private cannotSaveReport = () => {\r\n return this.props.usePredefDate && (!this.props.definition || this.props.definition && !this.props.definition.predefDate);\r\n }\r\n\r\n public render() {\r\n const { metadata, translation } = this.props;\r\n \r\n const sendReportSection = <>\r\n <div>\r\n <h3 className=\"tertiary-group-title\">{translation.generate_title}</h3>\r\n </div>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n <div>\r\n <div className=\"row\">\r\n <div className=\"col-12 col-md-7\">\r\n <Textarea\r\n componentId=\"0\"\r\n className=\"email-input\"\r\n onChange={this.onChangeEmail}\r\n readOnly={this.props.fetchingReport}\r\n validation={this.props.emailsValidation}\r\n value={this.props.emails}\r\n maxLength={maxLengthOfEmailsInputValue}\r\n />\r\n </div>\r\n <div className=\"col-12 col-md-5\">\r\n <div className={styles.generateButton}>\r\n <ButtonPrimary onClick={this.sendReport} disabled={!this.isValid()}>\r\n {translation.generate_button}\r\n </ButtonPrimary>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </HotKeys>\r\n </>;\r\n\r\n const generateReportSection = <div className={styles.downloadReportWrapper}>\r\n <div className={styles.generateButton}>\r\n <ButtonPrimary onClick={this.saveReport}>\r\n {translation.generate_button}\r\n </ButtonPrimary>\r\n </div>\r\n </div>;\r\n \r\n return (\r\n <MainGridContainer className={styles.reportPanel}>\r\n <FiltersReport\r\n updateDefinition={this.updateDefinition}\r\n reportId={this.props.reportId}\r\n title={translation.report_title}\r\n subtitle={translation.report_subtitle}\r\n predefinedTitle={translation.filters_predefined_date}\r\n validateFilters={this.props.validateFilters} />\r\n\r\n {!metadata || this.props.fetchingMetadata\r\n ? null\r\n : !!metadata.eMailReport\r\n ? sendReportSection\r\n : generateReportSection}\r\n\r\n {(this.props.fetchingReport || this.props.fetchingMetadata) && <SpinLoader />}\r\n </MainGridContainer>);\r\n }\r\n}\r\n\r\nconst selectors = {\r\n reportId: (state, props) => props.params.reportId\r\n};\r\n\r\nconst container = containerFactory(ReportComponent, actionCreators, selectors, reportTranslation);\r\n\r\nexport { container as CompanyReportView };\r\n","import * as React from 'react';\r\nimport { useState } from 'react';\r\nimport * as navigation from 'app/area/shared/navigation';\r\nimport { ButtonPrimary } from 'ui';\r\n\r\nimport styles from './open-case.scss';\r\n\r\nexport interface OpenCaseProps {\r\n textCaseNo: string;\r\n textOpenCase: string;\r\n expandInputField?: boolean;\r\n}\r\n\r\nexport const OpenCaseNumber = ({textCaseNo, textOpenCase, expandInputField}:OpenCaseProps) => {\r\n const [ caseNumber, setCaseNumber ] = useState('');\r\n\r\n const isInteger = caseNumber.match(/^\\d+$/) && caseNumber.length < 17 && Number(caseNumber) <= Number.MAX_SAFE_INTEGER;\r\n\r\n function onChangeValue(event: React.ChangeEvent<HTMLInputElement>) {\r\n event.preventDefault();\r\n if (event && event.target) {\r\n setCaseNumber(event.target.value);\r\n }\r\n }\r\n\r\n function onOpenCase(event: React.FormEvent) {\r\n event.preventDefault();\r\n if (!!Number(caseNumber) && isInteger) {\r\n navigation.toCaseView(Number(caseNumber));\r\n }\r\n }\r\n\r\n return (\r\n <div className={`input-wrapper ${styles.inputSection}`}>\r\n <form onSubmit={onOpenCase} id=\"openCase\">\r\n <input\r\n id=\"caseNumber\"\r\n name=\"caseNumber\"\r\n className={`form-control ${styles.inputElement} ${expandInputField ? styles.expand : ''}`}\r\n type=\"number\"\r\n placeholder={textCaseNo}\r\n value={caseNumber}\r\n onChange={onChangeValue}\r\n />\r\n <ButtonPrimary\r\n onClick={onOpenCase}\r\n id=\"open_case\"\r\n disabled={!isInteger || !Number(caseNumber)}\r\n className={`btn btn-call-to-action ${styles.btnOpenCase}`}\r\n >\r\n {textOpenCase}\r\n </ButtonPrimary>\r\n </form>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\n\r\nimport styles from './new-case-banner.scss';\r\nimport { OpenCaseNumber } from 'app/area/startup/components/open-case/open-case';\r\n\r\nconst RX_REPLACELINK = /\\{(.+?)\\}/g;\r\n\r\nconst insertLink = (text) => {\r\n const split = text.split(RX_REPLACELINK);\r\n return split.map((item, index) => {\r\n if (!(index % 2)) {\r\n return item;\r\n } else {\r\n return <Link key={index} to={routeConstants.favouriteDraft}>{item}</Link>;\r\n }\r\n });\r\n};\r\n\r\nexport interface NewCaseBannerProps {\r\n textHeader: string;\r\n textDescription: string;\r\n textBtnRegisterNewCase: string;\r\n textOpenCaseHeader: string;\r\n textOpenCaseDescription: string;\r\n textCaseNo: string;\r\n textOpenCase: string;\r\n}\r\n\r\nexport const NewCaseBanner = ({\r\n textHeader,\r\n textDescription,\r\n textBtnRegisterNewCase,\r\n textOpenCaseHeader,\r\n textOpenCaseDescription,\r\n textCaseNo,\r\n textOpenCase\r\n }: NewCaseBannerProps) => (\r\n <div className={`${styles.newCaseBanner}`}>\r\n <div className={`row ${styles.newCasePanel}`}>\r\n <div className={`col-md-6 ${styles.newCaseContainer} ${styles.inputToBottom}`}>\r\n <div>\r\n <h1>{textHeader}</h1>\r\n <div className={styles.description}>\r\n {textDescription}\r\n </div>\r\n </div>\r\n <div>\r\n\r\n <Link to={routeConstants.selectCaseType} id=\"register_case\"\r\n className={`btn btn-call-to-action ${styles.btnRegisterNewCase}`}>\r\n {textBtnRegisterNewCase}\r\n </Link>\r\n </div>\r\n </div>\r\n <div className={`col-md-6 ${styles.inputToBottom}`}>\r\n <div>\r\n <h2 className={`h1 ${styles.caseNumberTitle}`}>{textOpenCaseHeader}</h2>\r\n <div className={styles.description}>\r\n {insertLink(textOpenCaseDescription)}\r\n </div>\r\n </div>\r\n <div>\r\n <OpenCaseNumber textCaseNo={textCaseNo} textOpenCase={textOpenCase} expandInputField={true}/>\r\n </div>\r\n </div>\r\n </div>\r\n </div>);\r\n","import { Dashboard } from 'app/area/dashboard/dashboard';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport * as React from 'react';\r\n\r\nimport { startupTranslation } from './constants';\r\nimport { StartupState } from './types-store';\r\nimport { NewCaseBanner } from 'app/area/startup/components/new-case-banner';\r\n\r\ntype StartupProps = StartupState & DefaultContainerProps;\r\n\r\nexport class StartupComponent extends React.Component<StartupProps> {\r\n public static statePath: string = STATE.startupArea;\r\n\r\n public render() {\r\n const { translation } = this.props;\r\n\r\n return (\r\n <>\r\n <div className=\"container main-grid\">\r\n <NewCaseBanner\r\n textHeader={translation.new_case_header}\r\n textDescription={translation.new_case_description}\r\n textBtnRegisterNewCase={translation.new_case_register}\r\n textOpenCaseHeader={translation.open_case_header}\r\n textOpenCaseDescription={translation.open_case_description}\r\n textCaseNo={translation.open_case_case_no}\r\n textOpenCase={translation.open_case}\r\n />\r\n </div>\r\n <div>\r\n <Dashboard\r\n dashboardType={this.props.sharedState.startupDashboardTypeId}\r\n mainFavouriteId={this.props.sharedState.startupDashboardId}\r\n showDescription={false}\r\n location={this.props.location}\r\n hideFilters={true}\r\n />\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory(StartupComponent, undefined, null, startupTranslation);\r\nexport { container as Startup };\r\n","export const startupTranslation = {\r\n new_case_header: 7434,\r\n new_case_description: 7433,\r\n new_case_register: 5328,\r\n\r\n open_case_header: 8298,\r\n open_case_description: 8317,\r\n open_case_case_no: 8299,\r\n open_case: 8300\r\n};\r\n","import * as React from 'react';\r\n\r\ninterface TimerComponentProps {\r\n interval: number;\r\n callback: () => void;\r\n}\r\n\r\nclass TimerComponent extends React.Component<TimerComponentProps> {\r\n private interval: any;\r\n\r\n public componentDidMount() {\r\n this.props.callback();\r\n this.interval = setInterval(this.props.callback, this.props.interval);\r\n }\r\n\r\n public componentDidCatch() {\r\n clearInterval(this.interval);\r\n }\r\n\r\n public componentWillUnmount() {\r\n clearInterval(this.interval);\r\n }\r\n\r\n public render() {\r\n return this.props.children;\r\n }\r\n}\r\n\r\nexport const Timer = TimerComponent;\r\n","export const importTranslations = {\r\n import_title: 7891,\r\n import_number_of_errors: 7892,\r\n import_show_details: 7893,\r\n import_hide_details: 7916,\r\n import_status_successful: 7894,\r\n import_status_failed: 7895,\r\n import_status_pending: 7896,\r\n import_status: 7897,\r\n import_no_of_cases: 7898,\r\n import_no_of_ok_cases: 7901,\r\n import_no_of_failed_cases: 7899,\r\n import_date: 7900,\r\n import_load_date: 7902,\r\n import_file_name: 7903,\r\n import_cancel: 7904,\r\n import_submit: 7905,\r\n import_file_description: 7906,\r\n import_choose_file: 7907,\r\n import_set: 7908,\r\n import_file_to_synergi_life: 7909,\r\n import_add_to_import: 7910,\r\n import_retry: 7914,\r\n import_delete: 7915,\r\n import_delete_title: 7918,\r\n import_delete_desc: 7917,\r\n import_delete_success: 7934,\r\n import_edit_title: 7921,\r\n import_search_placeholder: 7557,\r\n import_success: 7922,\r\n import_retry_success: 7930,\r\n import_update_success: 7931,\r\n import_details_error: 7926,\r\n import_details_case_number: 7927,\r\n import_details_db: 7928,\r\n import_modal_wait: 7957,\r\n import_modal_done: 7958,\r\n no_imports: 7913,\r\n validation_error: 7702,\r\n no_options_found: 7644,\r\n must_be_filled: 5949,\r\n done: 7338\r\n};\r\n\r\nexport const endpoint = {\r\n caseImport: 'case/import',\r\n retryImport:'case/import',\r\n updateImport:'case/import',\r\n deleteImport:'case/import',\r\n loadCaseImport: 'case/import',\r\n loadImportSetOptions: 'case/import/importset/options',\r\n loadEditImport: (importCase) => { return `case/import/${importCase}`; }\r\n};\r\n\r\nexport const form = {\r\n importset: 'importset',\r\n comments: 'comments'\r\n};\r\n\r\nexport const importStatusPollingInterval = 5000;\r\n","import { RemoteData } from 'app/infrastructure/remote-data';\r\nimport { ApiResponse } from 'app/types-shared';\r\nimport { endpoint } from './constants';\r\nimport { ImportCaseUpdateData } from './types';\r\nimport { ImportCase } from 'app/area/import/types-store';\r\n\r\nexport const api = {\r\n loadImportList: async (): Promise<ImportCase[]> => {\r\n const response = await new RemoteData(endpoint.loadCaseImport)\r\n .resource<ApiResponse<ImportCase[]>>()\r\n .single();\r\n return response.data;\r\n },\r\n\r\n loadEditImport: async (importFileId: number): Promise<ImportCase> => {\r\n const response = await new RemoteData(endpoint.loadEditImport(importFileId))\r\n .resource<ApiResponse<ImportCase>>()\r\n .single();\r\n return response.data;\r\n },\r\n\r\n retryImport: async (importFileId: number) => {\r\n return await new RemoteData(endpoint.retryImport)\r\n .resource()\r\n .withId(importFileId)\r\n .create(undefined, false);\r\n },\r\n\r\n updateImport: async (importCaseUpdateData: ImportCaseUpdateData) => {\r\n return new RemoteData(endpoint.updateImport)\r\n .resource()\r\n .save(importCaseUpdateData);\r\n },\r\n\r\n deleteImport: async (importFileId: number) => {\r\n return new RemoteData(endpoint.deleteImport)\r\n .resource()\r\n .filter({ importFile: importFileId })\r\n .httpDelete(importFileId);\r\n }\r\n};\r\n","// tslint:disable:no-unused-expression\r\nimport { toast } from 'react-toastify';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { api } from 'app/area/import/api';\r\nimport * as actions from './action-types';\r\nimport {\r\n RequestDeleteImport, ReceiveDeleteImport, FailDeleteImport,\r\n RequestImportList\r\n} from 'app/area/import/action-types';\r\nimport { SuccessNotification, ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/translate';\r\nimport { importTranslations, endpoint } from 'app/area/import/constants';\r\nimport { ImportFormData } from './types';\r\nimport { ImportState } from './types-store';\r\nimport { RequestUpdateImport } from 'app/area/import/action-types';\r\nimport { UiState } from 'app/infrastructure/ui/form/types';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\nimport { createUploader } from 'app/infrastructure/remote-data/http';\r\n\r\nexport const actionCreators = {\r\n\r\n loadImportList: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const importState = getState().import as ImportState;\r\n\r\n if (importState.fetchingImportList) {\r\n return;\r\n }\r\n\r\n dispatch(new RequestImportList());\r\n try {\r\n const importList = await api.loadImportList();\r\n dispatch(new actions.ReceiveImportList(importList));\r\n } catch {\r\n dispatch(new actions.FailImportList());\r\n }\r\n },\r\n\r\n loadEditImport: (importCaseId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestLoadEditImport(importCaseId));\r\n try {\r\n const response = await api.loadEditImport(importCaseId);\r\n\r\n dispatch(new actions.ReceiveLoadEditImport(response));\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new actions.FailLoadEditImport(importCaseId));\r\n }\r\n },\r\n\r\n clearEditImport: (importFileId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearEditImport(importFileId));\r\n },\r\n\r\n saveImport: (importFormData: ImportFormData, file: File, onClose: () => any):\r\n ActionDispatching<any, ApplicationState> => async (dispatch, getState) => {\r\n try {\r\n dispatch(new actions.RequestAddImport());\r\n\r\n const {texts} = getState().import;\r\n const translationDescription = createDescriptionSelector(texts);\r\n\r\n const toastMessage = toastFactory();\r\n\r\n toastMessage.dispatch(translationDescription(importTranslations.import_modal_wait));\r\n\r\n const xhr = createUploader(endpoint.caseImport);\r\n const data = new FormData();\r\n\r\n data.append('ImportPackage', file);\r\n data.append('ImportSet', importFormData.importset.v);\r\n data.append('Comments', importFormData.comments);\r\n\r\n xhr.onload = () => {\r\n if (xhr.status === 200) {\r\n dispatch(new actions.ReceiveAddImport());\r\n toastMessage.success(translationDescription(importTranslations.import_success));\r\n onClose();\r\n } else {\r\n const error = JSON.parse(xhr.response);\r\n toastMessage.close();\r\n\r\n error && error.messages && error.messages.userMessages\r\n && error.messages.userMessages.forEach(err =>\r\n dispatch(new ErrorNotification(err.message))\r\n );\r\n\r\n error && error.messages && error.messages.validationErrors && error.messages.validationErrors\r\n .filter(item => item.errors && item.errors.length > 0)\r\n .map(errors => errors && errors.errors.forEach(err =>\r\n dispatch(new ErrorNotification(err.errorMessage))\r\n ));\r\n\r\n dispatch(new actions.FailAddImport());\r\n }\r\n };\r\n\r\n xhr.send(data);\r\n } catch (err) {\r\n dispatch({\r\n type: 'ERROR',\r\n error: err\r\n });\r\n\r\n dispatch(new actions.FailAddImport());\r\n }\r\n },\r\n\r\n updateImport: (importFileId: number, serializeData: ImportFormData):\r\n ActionDispatching<any, ApplicationState> => async (dispatch, getState) => {\r\n dispatch(new RequestUpdateImport(importFileId));\r\n\r\n try {\r\n const areaState = getState().import;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n const toastMessage = toastFactory();\r\n\r\n const importCaseUpdateData = {\r\n importFileId,\r\n importSet: serializeData.importset.v,\r\n ...(serializeData.comments && {\r\n comments: serializeData.comments\r\n })\r\n };\r\n\r\n await api.updateImport(importCaseUpdateData);\r\n\r\n dispatch(new actions.ReceiveUpdateImport(importFileId, serializeData));\r\n\r\n toastMessage.dispatch(\r\n translationDescription(importTranslations.import_update_success),\r\n toast.TYPE.SUCCESS);\r\n\r\n } catch (err) {\r\n dispatch({\r\n type: 'ERROR',\r\n error: err\r\n });\r\n\r\n dispatch(new actions.FailUpdateImport(importFileId));\r\n }\r\n },\r\n\r\n retryImport: (importCaseId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestRetryImport(importCaseId));\r\n try {\r\n await api.retryImport(importCaseId);\r\n const areaState = getState().import as UiState;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n dispatch(new SuccessNotification(\r\n translationDescription(importTranslations.import_retry_success)\r\n ));\r\n\r\n dispatch(new actions.ReceiveRetryImport(importCaseId));\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new actions.FailRetryImport(importCaseId));\r\n }\r\n },\r\n\r\n deleteImport: (importCase: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new RequestDeleteImport(importCase));\r\n\r\n try {\r\n await api.deleteImport(importCase) as any;\r\n const areaState = getState().import as UiState;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n dispatch(new SuccessNotification(\r\n translationDescription(importTranslations.import_delete_success)\r\n ));\r\n\r\n dispatch(new ReceiveDeleteImport(importCase));\r\n } catch (err) {\r\n dispatch({\r\n type: 'ERROR',\r\n error: err\r\n });\r\n\r\n dispatch(new FailDeleteImport(importCase));\r\n }\r\n },\r\n\r\n clearImportCase: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearImportCase());\r\n }\r\n};\r\n","import { Value } from 'app/types-shared';\r\n\r\nexport interface ImportCaseUpdateData {\r\n comments: string;\r\n importSet: number;\r\n importFileId: number;\r\n}\r\n\r\nexport interface ImportFormData {\r\n importset: Value;\r\n comments: string;\r\n}\r\n\r\nexport enum ImportFileStatus {\r\n notSelected,\r\n notImported,\r\n failed,\r\n completed,\r\n pending\r\n}\r\n","import * as React from 'react';\r\nimport { MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport { ImportFileStatus } from 'app/area/import/types';\r\nimport styles from './import-view.scss';\r\nimport { Value } from 'app/types-shared';\r\n\r\nexport interface ImportContextMenuProps {\r\n id: number;\r\n importStatus: Value;\r\n translation: any;\r\n canEdit: boolean;\r\n handleEdit: (id: number) => void;\r\n handleRetry: () => void;\r\n handleDelete: () => void;\r\n}\r\n\r\nexport const ImportContextMenu: React.SFC<ImportContextMenuProps> = (props: ImportContextMenuProps) => {\r\n const { id, importStatus, handleRetry, handleDelete, translation } = props;\r\n const handleEdit = () => props.handleEdit(id);\r\n\r\n return (\r\n <div className={styles.tileDropdown}>\r\n <MeatballMenu>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={handleEdit} disabled={!props.canEdit}>\r\n {translation.import_edit_title}\r\n </button>\r\n <PromptConfirmationModal\r\n title={translation.import_delete_title}\r\n description={translation.import_delete_desc}\r\n continueText={translation.import_submit}\r\n cancelText={translation.import_cancel}\r\n onContinue={handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">{translation.import_delete}</button>\r\n </PromptConfirmationModal>\r\n {importStatus && importStatus.v === ImportFileStatus.failed\r\n && <button type=\"button\" className=\"dropdown-item\" onClick={handleRetry}>{translation.import_retry}</button>}\r\n </MeatballMenu>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport styles from './import-view.scss';\r\nimport { ImportTranses } from './types-store';\r\nimport { NoValueDash } from 'ui/common';\r\n\r\nexport interface ImportDetailViewProps {\r\n importTranses: ImportTranses[];\r\n transCountError: number;\r\n transCount: number;\r\n showDetails: boolean;\r\n translation: any;\r\n handleClose: () => void;\r\n}\r\n\r\nexport const ImportDetailView: React.SFC<ImportDetailViewProps> = (props: ImportDetailViewProps) => {\r\n return props.showDetails ?\r\n <DialogExpander\r\n onClose={props.handleClose}\r\n hasFooter={false}\r\n className=\"tile-details-view\">\r\n {props.importTranses && <>\r\n {[...props.importTranses]\r\n .filter(item => item.importErrors.length > 0)\r\n .map((item, index) => <div key={index} className={styles.importDetailsTile}>\r\n <div className={styles.errorMessage}>\r\n <label>{props.translation.import_details_error}</label>\r\n {item.importErrors.length > 0 ? [...item.importErrors].map((error, i) => \r\n <p key={i}>{error}</p>)\r\n : <NoValueDash/>\r\n }\r\n </div>\r\n\r\n <ul className={styles.detailsTileFooter}>\r\n <li>\r\n <span>{props.translation.import_details_case_number}: </span>\r\n <span>{item.importTransId}</span>\r\n </li>\r\n <li>\r\n <span>{props.translation.import_details_db}: </span>\r\n <span>{item.importDatabaseId}</span>\r\n </li>\r\n </ul>\r\n </div>)}\r\n </>}\r\n </DialogExpander>\r\n : null;\r\n};\r\n","import * as React from 'react';\r\nimport styles from './import-view.scss';\r\nimport { ButtonTertiary } from 'ui';\r\nimport MdExpandMore from 'react-icons/lib/md/expand-more';\r\nimport MdExpandLess from 'react-icons/lib/md/expand-less';\r\n\r\nexport interface ImportExpandDetailsButtonProps {\r\n id: number;\r\n showDetails: boolean;\r\n translation: any;\r\n handleClose: () => void;\r\n handleSelect: () => void;\r\n}\r\n\r\nexport const ImportExpandDetailsButton: React.SFC<ImportExpandDetailsButtonProps> = (props: ImportExpandDetailsButtonProps) => {\r\n const showDetails = props.id && <div className={styles.detailsButton}>\r\n <ButtonTertiary classNames=\"btn-block\" onClick={props.handleSelect}>\r\n {props.translation.import_show_details}<MdExpandMore />\r\n </ButtonTertiary>\r\n </div>;\r\n\r\n const hideDetails = <div className={styles.detailsButton}>\r\n <ButtonTertiary classNames=\"btn-block\" onClick={props.handleClose}>\r\n {props.translation.import_hide_details}<MdExpandLess />\r\n </ButtonTertiary>\r\n </div>;\r\n\r\n return props.showDetails ? hideDetails : showDetails;\r\n};\r\n","import * as React from 'react';\r\nimport FaRepeat from 'react-icons/lib/fa/repeat';\r\nimport { findDOMNode } from 'react-dom';\r\nimport { scrollIntoView } from 'app/infrastructure/platform/browser-dom';\r\nimport { ElementLoader } from 'ui';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { ImportFileStatus } from 'app/area/import/types';\r\nimport { ImportCase } from 'app/area/import/types-store';\r\nimport { ImportContextMenu } from 'app/area/import/import-context-menu';\r\nimport { ImportDetailView } from 'app/area/import/import-detail-view';\r\nimport { ImportExpandDetailsButton } from 'app/area/import/import-expand-details-button';\r\nimport { NoValueDash, ButtonTertiary } from 'ui/common';\r\nimport styles from './import-view.scss';\r\nimport { ExpanderBackground } from 'ui/common/dialog-expander/expander-background/expander-background';\r\nimport { DEFAULT_DATE_FORMAT } from 'app/infrastructure/data/date';\r\n\r\nexport interface ImportViewItemProps {\r\n item: ImportCase;\r\n fetchingItem: boolean;\r\n canEditItem: boolean;\r\n handleEdit: (id: number) => void;\r\n retryImport: (importCaseId: number) => void;\r\n deleteImport: (importCaseId: number) => void;\r\n}\r\n\r\nexport interface ImportViewItemState {\r\n showDetails?: boolean;\r\n}\r\n\r\nconst DefaultHeader = ({ primaryKey, showPrimaryKey }) => primaryKey && showPrimaryKey ?\r\n <div className={`${styles.key}`}>#{primaryKey.value}</div> : null;\r\n\r\nexport type ImportContainerProps = ImportViewItemProps & DefaultContainerProps;\r\n\r\nexport class ImportViewItem extends React.Component<ImportContainerProps, ImportViewItemState> {\r\n private ref: HTMLElement;\r\n\r\n public state: Readonly<ImportViewItemState> = {\r\n showDetails: false\r\n };\r\n\r\n private handleSelect = () => {\r\n this.setState({ showDetails: !this.state.showDetails });\r\n scrollIntoView(findDOMNode(this.ref) as HTMLElement);\r\n }\r\n\r\n private handleDelete = () => {\r\n this.props.deleteImport(this.props.item.id);\r\n }\r\n\r\n private handleClose = () => {\r\n this.setState({ showDetails: false });\r\n }\r\n\r\n private addRef = (el: HTMLElement) => this.ref = el;\r\n\r\n private handleRetry = () => {\r\n this.props.retryImport(this.props.item.id);\r\n }\r\n\r\n private dateFormatter = (date: string) => {\r\n const parsedDate = new Date(date);\r\n const formattedDate = this.props.intl.formatDate(parsedDate, DEFAULT_DATE_FORMAT);\r\n const formattedTime = this.props.intl.formatTime(parsedDate);\r\n return formattedDate + ' ' + formattedTime;\r\n }\r\n\r\n private getStatusClass = (status: ImportFileStatus) => {\r\n return {\r\n [ImportFileStatus.pending]: 'pending',\r\n [ImportFileStatus.completed]: 'completed',\r\n [ImportFileStatus.failed]: 'failed'\r\n }[status];\r\n }\r\n\r\n private getStatusText = (status: ImportFileStatus) => {\r\n const { translation } = this.props;\r\n return {\r\n [ImportFileStatus.pending]: translation.import_status_pending,\r\n [ImportFileStatus.completed]: translation.import_status_successful,\r\n [ImportFileStatus.failed]: translation.import_status_failed\r\n }[status];\r\n }\r\n\r\n private renderBody = () => {\r\n const {\r\n filename,\r\n comments,\r\n createdAtUtc,\r\n modifiedAtUtc,\r\n importStatus,\r\n importSet,\r\n transCount,\r\n transCountOk,\r\n transCountError\r\n } = this.props.item;\r\n\r\n const { fetchingItem, translation } = this.props;\r\n\r\n return <>\r\n <div className={`col-lg-4 ${styles.tileHeader}`}>\r\n <label>{translation.import_file_name}</label>\r\n <h3>{filename}</h3>\r\n {!fetchingItem && <div className={`${styles.importItemStatus} ${importStatus && styles[this.getStatusClass(importStatus.v)]}`}>\r\n {importStatus && this.getStatusText(importStatus.v)}\r\n </div>}\r\n {!fetchingItem && importStatus && importStatus.v === ImportFileStatus.failed && <div className={styles.retryButton}>\r\n <ButtonTertiary onClick={this.handleRetry} icon={FaRepeat}>\r\n {translation.import_retry}\r\n </ButtonTertiary>\r\n </div>}\r\n </div>\r\n {fetchingItem\r\n ? <div className=\"col-lg-8 row\">\r\n <ElementLoader />\r\n </div>\r\n : <div className={`${styles.tileDataZone} col-lg-8 row`}>\r\n <ul className=\"col-12\">\r\n <li className={`${styles.tileData} ${transCountError > 0 ? styles.errorStyle : ''}`}>\r\n <span>{transCountError} </span>\r\n {translation.import_no_of_failed_cases}\r\n </li>\r\n <li className={styles.tileData}>\r\n <span>{transCountOk} </span>\r\n {translation.import_no_of_ok_cases}\r\n </li>\r\n <li className={styles.tileData}>\r\n <span>{transCount} </span>\r\n {translation.import_no_of_cases}\r\n </li>\r\n </ul>\r\n\r\n <div className={`col-sm-6 col-md-4 ${styles.tileData}`}>\r\n <label>{translation.import_load_date}</label>\r\n {createdAtUtc ? <p>{this.dateFormatter(createdAtUtc).trim()}</p> : <NoValueDash />}\r\n </div>\r\n <div className={`col-sm-6 col-md-4 ${styles.tileData}`}>\r\n <label>{translation.import_date}</label>\r\n {modifiedAtUtc ? <p>{this.dateFormatter(modifiedAtUtc).trim()}</p> : <NoValueDash />}\r\n </div>\r\n <div className={`col-sm-6 col-md-4 ${styles.tileData}`}>\r\n <label>{translation.import_set}</label>\r\n <p>{importSet && importSet.d}</p>\r\n </div>\r\n\r\n {comments && <div className={`col-sm-6 col-md-4 ${styles.tileData}`}>\r\n <label>{translation.import_file_description}</label>\r\n <p>{comments}</p>\r\n </div>}\r\n\r\n <div className={`col-md-6 col-md-4 ${styles.tileData}`}>\r\n <label>{translation.import_status}</label>\r\n <p>{importStatus && importStatus.d}</p>\r\n </div>\r\n </div>}\r\n </>;\r\n }\r\n\r\n public render() {\r\n const { id, transCount, transCountError, importTranses, importStatus } = this.props.item;\r\n const { fetchingItem, translation } = this.props;\r\n\r\n return <>\r\n {this.state.showDetails ? <div tabIndex={0} onFocus={this.handleClose} /> : ''}\r\n <div ref={this.addRef} className={`${styles.tileWrapper} ${this.state.showDetails ? styles.activeTile : ''}`}>\r\n <div className={`${styles.tile} ${this.state.showDetails ? styles.activeTile : ''}`}>\r\n <div className={`${styles.tileContent}`}>\r\n <DefaultHeader {...this.props as any} />\r\n {!fetchingItem && importStatus && importStatus.v !== ImportFileStatus.pending\r\n && <ImportContextMenu\r\n id={id}\r\n importStatus={importStatus}\r\n canEdit={this.props.canEditItem}\r\n handleEdit={this.props.handleEdit}\r\n handleRetry={this.handleRetry}\r\n handleDelete={this.handleDelete}\r\n translation={translation}\r\n />}\r\n <div className={`${styles.tileValuesWrapper} row`}>\r\n {this.renderBody()}\r\n </div>\r\n </div>\r\n\r\n {!fetchingItem && transCountError > 0 && <ImportExpandDetailsButton\r\n id={id}\r\n showDetails={this.state.showDetails}\r\n handleClose={this.handleClose}\r\n handleSelect={this.handleSelect}\r\n translation={translation}\r\n />}\r\n </div>\r\n\r\n <div className={styles.importDetailView}>\r\n <ImportDetailView\r\n importTranses={importTranses}\r\n transCountError={transCountError}\r\n transCount={transCount}\r\n showDetails={this.state.showDetails}\r\n handleClose={this.handleClose}\r\n translation={translation} />\r\n </div>\r\n\r\n {this.state.showDetails && <ExpanderBackground onClick={this.handleClose}/> }\r\n </div>\r\n </>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE, withSimpleForm } from 'app/infrastructure/simple-form';\r\nimport { endpoint, importTranslations, form } from 'app/area/import/constants';\r\nimport { SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { STATE } from 'app/constants';\r\nimport { simpleFieldForPath } from 'app/infrastructure/simple-form/';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { requiredValidation } from 'app/infrastructure/simple-form/validation/rules';\r\nimport { SimpleFormValidationConfig } from 'app/infrastructure/simple-form/validation/types';\r\nimport styles from './import-view.scss';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { FileSelector } from 'ui';\r\n\r\nexport interface ImportAddCaseComponentProps {\r\n fetching: boolean;\r\n onClose: () => void;\r\n onDone: (formData: any, file: File, onClose: () => any) => void;\r\n}\r\n\r\nexport interface ImportAddCaseState {\r\n file: File;\r\n}\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.import);\r\n\r\nexport type ImportAddCaseContainerProps = ImportAddCaseComponentProps & DefaultContainerProps & SimpleFormProps;\r\nexport class ImportAddCaseComponent extends React.Component<ImportAddCaseContainerProps, ImportAddCaseState> {\r\n\r\n public static statePath: string = STATE.import;\r\n\r\n public state: Readonly<ImportAddCaseState> = {\r\n file: undefined\r\n };\r\n\r\n private validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.importset)\r\n ];\r\n\r\n private onSubmit = () => {\r\n const { validate, serialize, onDone, onClose, translation } = this.props;\r\n\r\n validate(this.validationConfig,\r\n () => onDone(serialize(defaultSerializeMappings), this.state.file, onClose),\r\n translation.validation_error);\r\n }\r\n\r\n private handleChangeFileUploader = (file:File) => {\r\n this.setState({ file });\r\n }\r\n\r\n public render() {\r\n const {fetching, translation, onClose, formValues } = this.props;\r\n const disabled = !formValues.importset || !this.state.file || fetching;\r\n\r\n return (\r\n <ModalWrapper\r\n headerTitle={translation.import_file_to_synergi_life}\r\n btnTitle={translation.import_submit}\r\n btnCancelTitle={translation.import_cancel}\r\n onDone={this.onSubmit}\r\n closeOnDone={false}\r\n onClose={onClose}\r\n largeSize={false}\r\n isDisabled={disabled}\r\n isCancelDisabled={disabled}>\r\n <SimpleForm\r\n name={form.importset}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadImportSetOptions}\r\n label={{ text: translation.import_set, required: true }}\r\n initialValue={undefined}\r\n translation={translation}\r\n placeholder={translation.import_search_placeholder}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={fetching} />\r\n\r\n <div className=\"control-label\">\r\n <span className=\"asterisk-required\">* </span>{translation.import_choose_file}\r\n </div>\r\n\r\n <div className={`input-wrapper ${styles.importFileWrapper}`}>\r\n <FileSelector\r\n textSelectFile={translation.import_choose_file}\r\n onSelected={this.handleChangeFileUploader}\r\n disabled={fetching}\r\n />\r\n </div>\r\n <br />\r\n\r\n <SimpleForm\r\n name={form.comments}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.import_file_description }}\r\n initialValue={''}\r\n translation={translation}\r\n maxLength={254}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n readOnly={fetching} />\r\n </ModalWrapper>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory<ImportAddCaseComponentProps>(withSimpleForm(ImportAddCaseComponent), {}, undefined, importTranslations);\r\nexport { container as ImportAddCase };\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE, withSimpleForm, requiredValidation } from 'app/infrastructure/simple-form';\r\nimport { endpoint, importTranslations, form } from 'app/area/import/constants';\r\nimport { SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { STATE } from 'app/constants';\r\nimport { simpleFieldForPath } from 'app/infrastructure/simple-form/';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { ImportFormData, ImportFileStatus } from 'app/area/import/types';\r\nimport { ImportCase } from 'app/area/import/types-store';\r\nimport { SimpleFormValidationConfig } from 'app/infrastructure/simple-form/validation/types';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\n\r\nexport interface ImportEditCaseComponentProps {\r\n importCase?: ImportCase;\r\n onClose: (importCaseId: number) => void;\r\n onDone: (importFormData: ImportFormData) => void;\r\n}\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.import);\r\n\r\nexport type ImportEditCaseContainerProps = ImportEditCaseComponentProps & DefaultContainerProps & SimpleFormProps;\r\nexport class ImportEditCaseComponent extends React.Component<ImportEditCaseContainerProps> {\r\n\r\n public static statePath: string = STATE.import;\r\n\r\n private validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.importset)\r\n ];\r\n\r\n private onSubmit = () => {\r\n const { validate, serialize, onDone, translation } = this.props;\r\n validate(this.validationConfig,\r\n () => onDone(serialize(defaultSerializeMappings) as any), translation.validation_error);\r\n }\r\n\r\n private onClose = () => {\r\n this.props.onClose(this.props.importCase.id);\r\n }\r\n\r\n public render() {\r\n const { importCase, translation } = this.props;\r\n\r\n return (\r\n <ModalWrapper\r\n headerTitle={translation.import_file_to_synergi_life}\r\n btnTitle={translation.import_submit}\r\n btnCancelTitle={translation.import_cancel}\r\n onClose={this.onClose}\r\n onDone={this.onSubmit}\r\n largeSize={false}\r\n closeOnDone={false}>\r\n <SimpleForm\r\n name={form.importset}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadImportSetOptions}\r\n label={{ text: translation.import_set, required: true }}\r\n initialValue={importCase.importSet && { value: importCase.importSet.v, description: importCase.importSet.d }}\r\n translation={translation}\r\n placeholder={translation.import_search_placeholder}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={importCase.importStatus && importCase.importStatus.v === ImportFileStatus.completed ? true : false} />\r\n <SimpleForm\r\n name={form.comments}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.import_file_description }}\r\n initialValue={importCase.comments}\r\n translation={translation}\r\n maxLength={254}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />\r\n </ModalWrapper>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory<ImportEditCaseComponentProps>(withSimpleForm(ImportEditCaseComponent), {},\r\n undefined, importTranslations);\r\nexport { container as ImportEditCase };\r\n","import * as React from 'react';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { AddButton, ElementLoader } from 'ui';\r\nimport { STATE } from 'app/constants';\r\nimport { Timer } from 'app/components/timer/timer';\r\nimport { actionCreators } from './actions';\r\nimport { importTranslations, importStatusPollingInterval } from './constants';\r\nimport { ImportViewItem } from './import-view-item';\r\nimport { ImportFormData } from './types';\r\nimport { ImportState } from './types-store';\r\nimport { ImportAddCase } from './import-add-case';\r\nimport { ImportEditCase } from './import-edit-case';\r\n\r\nimport styles from './import-view.scss';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\ninterface ImportViewComponentState {\r\n showImportAddCase: boolean;\r\n}\r\n\r\nexport type ImportViewComponentProps = ImportState & DefaultContainerProps & typeof actionCreators;\r\n\r\nclass ImportViewComponent extends React.Component<ImportViewComponentProps, ImportViewComponentState> {\r\n public static statePath: string = STATE.import;\r\n\r\n public state: Readonly<ImportViewComponentState> = {\r\n showImportAddCase: false\r\n };\r\n\r\n public componentDidMount() {\r\n this.props.loadImportList();\r\n }\r\n\r\n private handleAddFile = () => {\r\n this.setState({\r\n showImportAddCase: true\r\n });\r\n }\r\n\r\n private handleClose = () => {\r\n this.setState({\r\n showImportAddCase: false\r\n });\r\n this.props.clearImportCase();\r\n }\r\n\r\n private handleShowEditImportCase = (id: number) => {\r\n\r\n this.props.loadEditImport(id);\r\n }\r\n\r\n private handleCloseEditModal = (id: number) => {\r\n this.props.clearEditImport(id);\r\n }\r\n\r\n private updateImport = (importFormData: ImportFormData) => {\r\n this.props.updateImport(this.props.importCase.id, importFormData);\r\n }\r\n\r\n private renderImportList = () => {\r\n const { importList, updatedImportCases } = this.props;\r\n return [...importList].map((item, index) =>\r\n <div key={index} className={'col-md-12'}>\r\n <ImportViewItem\r\n {...this.props}\r\n item={item}\r\n fetchingItem={item.id === this.props.editedImportId || updatedImportCases.some(id => id === item.id)}\r\n canEditItem={this.props.editedImportId === undefined}\r\n handleEdit={this.handleShowEditImportCase}\r\n />\r\n </div>);\r\n };\r\n\r\n private renderImportAddModal() {\r\n return this.state.showImportAddCase\r\n && <ImportAddCase\r\n {...this.props}\r\n fetching={this.props.fetchingAddImportCase}\r\n onClose={this.handleClose}\r\n onDone={this.props.saveImport} />;\r\n }\r\n\r\n private renderImportEditModal() {\r\n const { importCase } = this.props;\r\n\r\n return importCase && <ImportEditCase\r\n {...this.props}\r\n importCase={importCase}\r\n onClose={this.handleCloseEditModal}\r\n onDone={this.updateImport} />;\r\n }\r\n\r\n public render() {\r\n const { importCase, importList, translation, editedImportId, updatedImportCases } = this.props;\r\n const pendingApiOperations = importCase || editedImportId !== undefined || updatedImportCases.length > 0;\r\n const displayImportList = importList && importList.length > 0\r\n ? this.renderImportList()\r\n : (!this.props.importList\r\n ? <ElementLoader />\r\n : <div className=\"col-md-12\">{translation.no_imports}</div>);\r\n\r\n return (<MainGridContainer className={styles.importContainer}>\r\n <div className=\"page-heading\"><h1>{translation.import_title}</h1></div>\r\n\r\n <div className={styles.tileSection}>\r\n <AddButton icon={mdPlus} onClick={this.handleAddFile}>\r\n {translation.import_add_to_import}\r\n </AddButton>\r\n\r\n <div className=\"row\">\r\n {!pendingApiOperations ? <Timer\r\n callback={this.props.loadImportList}\r\n interval={importStatusPollingInterval}>\r\n {displayImportList}\r\n </Timer> : displayImportList}\r\n </div>\r\n </div>\r\n\r\n {this.renderImportAddModal()}\r\n {this.renderImportEditModal()}\r\n </MainGridContainer>);\r\n }\r\n}\r\n\r\nconst container = containerFactory<ImportViewComponentProps>(ImportViewComponent, actionCreators, undefined, importTranslations);\r\nexport { container as ImportView };\r\n","import * as React from 'react';\r\nimport styles from './auth.scss';\r\n\r\nexport const Dialog = ({children}) => (\r\n <div className={`container d-flex flex-column justify-content-around ${styles.baseView}`}>\r\n {children}\r\n </div>);\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { Dialog } from './dialog';\r\nimport styles from './auth.scss';\r\n\r\ntype LoginProgressProps = DefaultContainerProps;\r\n\r\nexport class LoginProgressComponent extends React.Component<LoginProgressProps, any> {\r\n public static statePath: string = STATE.app;\r\n\r\n public render() {\r\n const {translation} = this.props;\r\n return (\r\n <Dialog>\r\n <div>\r\n <div className={`${styles.iconAsBg} ${styles.spinLoader}`} />\r\n <div className={`${styles.fadeInUp}`}>\r\n <h1>{translation.loginProgressDialogTitle}</h1>\r\n <p>{translation.loginProgressTitle}</p>\r\n </div>\r\n </div>\r\n </Dialog>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory(LoginProgressComponent, null);\r\nexport { container as LoginProgress };\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { Dialog } from './dialog';\r\nimport { signin } from 'app/infrastructure/auth/token-manager';\r\nimport { ButtonPrimary } from 'ui';\r\nimport FaRefresh from 'react-icons/lib/fa/refresh';\r\n\r\nimport styles from './auth.scss';\r\n\r\ntype LoginFailedProps = DefaultContainerProps;\r\n\r\nexport class LoginFailedComponent extends React.Component<LoginFailedProps, any> {\r\n public static statePath: string = STATE.app;\r\n\r\n private onClickTryAgain = () => {\r\n signin(true, true);\r\n }\r\n\r\n public render() {\r\n return (\r\n <Dialog>\r\n <div>\r\n <div className={`${styles.iconAsBg} ${styles.errorIcon}`}/>\r\n <h1>{this.props.translation.loginFailTitle}</h1>\r\n <p>{this.props.translation.loginFailBody}</p>\r\n\r\n <div className={`${styles.buttonWrapper}`}>\r\n <ButtonPrimary onClick={this.onClickTryAgain} icon={FaRefresh}>\r\n {this.props.translation.loginFailRefresh}\r\n </ButtonPrimary>\r\n </div>\r\n </div>\r\n </Dialog>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory(LoginFailedComponent, null);\r\n\r\nexport { container as LoginFailed };\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { Dialog } from './dialog';\r\nimport { signin } from 'app/infrastructure/auth';\r\nimport { ButtonPrimary, ButtonTertiary } from 'ui';\r\n\r\nimport styles from './auth.scss';\r\n\r\ntype LogoutProps = DefaultContainerProps;\r\n\r\nexport class LogoutComponent extends React.Component<LogoutProps, any> {\r\n public static statePath: string = STATE.app;\r\n\r\n private onClickLogIn = () => {\r\n signin(false, false);\r\n }\r\n\r\n private onClickLogInAsDifferentUser = () => {\r\n signin(true, false);\r\n }\r\n\r\n public render() {\r\n return (\r\n <Dialog>\r\n <div >\r\n <div className={`${styles.iconAsBg} ${styles.successIcon}`} />\r\n <h1>\r\n {this.props.translation.logoutTitle}\r\n </h1>\r\n <div className={`${styles.buttonWrapper}`}>\r\n <ButtonPrimary classNames=\"btn-block\" onClick={this.onClickLogIn}>\r\n {this.props.translation.logoutButton}\r\n </ButtonPrimary>\r\n <ButtonTertiary classNames=\"btn-block\" onClick={this.onClickLogInAsDifferentUser}>\r\n {this.props.translation.logoutButtonDifferentUser}\r\n </ButtonTertiary>\r\n </div>\r\n </div>\r\n </Dialog>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory(LogoutComponent, null);\r\n\r\nexport { container as Logout };\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { ShellState, AuthState } from 'app/types-shared';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { LoginProgress } from './login-progress';\r\nimport { LoginFailed } from './login-failed';\r\nimport { Logout } from './logout';\r\n\r\ntype AuthViewContainerProps = ShellState & DefaultContainerProps;\r\n\r\nexport class AuthViewComponent extends React.Component<AuthViewContainerProps, any> {\r\n public static statePath: string = STATE.app;\r\n\r\n public render() {\r\n if (this.props.authState === AuthState.NotAuthenticated\r\n || (this.props.authState === AuthState.Authenticated && !this.props.userInfo)) {\r\n return (<LoginProgress />);\r\n }\r\n\r\n if (this.props.authState === AuthState.LoggedOut) {\r\n return (<Logout />);\r\n }\r\n\r\n if (this.props.authState === AuthState.AuthenticationFailed) {\r\n return (<LoginFailed />);\r\n }\r\n\r\n return null;\r\n }\r\n}\r\n\r\nconst container = containerFactory(AuthViewComponent, null);\r\nexport { container as AuthView };\r\n","import * as React from 'react';\r\nimport { isDevelopment } from 'app/infrastructure/universal';\r\nimport { toJSON } from 'app/infrastructure/platform/json';\r\n\r\n/**\r\n * Global errors represents a non-recoverable application state and is visualized on top of the application layout.\r\n *\r\n * This is a developer/testers error panel\r\n *\r\n * This is not to be used for predictable use errors such as validation or errors that contain translated hints/messages for the user.\r\n *\r\n * - JavaScript error message must never be shown to the user since they're not translated\r\n *\r\n */\r\nexport class DevErrorPanel extends React.PureComponent<any, any>{\r\n public state: Readonly<any> = {\r\n expand: false,\r\n hide: false\r\n };\r\n\r\n private toggleIn = (e:any) => {\r\n e.preventDefault();\r\n this.setState({ expand: !this.state.expand });\r\n }\r\n\r\n private close = ()=> this.setState({\r\n expand: false,\r\n hide: true\r\n });\r\n\r\n public render() {\r\n\r\n if (!isDevelopment){\r\n return null;\r\n }\r\n\r\n if (!this.state.expand && this.state.hide\r\n ) {\r\n return null;\r\n }\r\n\r\n if (!this.props.errors || !this.props.errors.length ){\r\n return null;\r\n }\r\n\r\n const allErrors: any = Array.from(new Set(this.props.errors));\r\n\r\n const details = allErrors.map((err: any, i: number) => {\r\n\r\n const isJsError = err.error && err.error.message;\r\n\r\n return <li key={i} className=\"list-group-item\">\r\n\r\n <strong>\r\n {isJsError ? err.error.message.toString() : err.message}\r\n </strong>\r\n\r\n {\r\n // userMessages will be handled by redux middleware and separate ui component\r\n err.error.userMessages && err.error.userMessages.length ?\r\n\r\n err.error.userMessages.map((m: any) => m.message).join('\\n')\r\n :\r\n <i> {toJSON(err.error) || err.message} </i>\r\n }\r\n </li>;\r\n });\r\n\r\n const header = <div className=\"alert alert-warning\" onClick={this.toggleIn}>\r\n <span className=\"badge\">{allErrors.length}</span>\r\n <small>Problems detected. Click for details</small>\r\n </div>;\r\n\r\n if (!this.state.expand) {\r\n return header;\r\n }\r\n\r\n const closeButton = <span onClick={this.close}>Dismiss</span>;\r\n\r\n return (\r\n <div className={this.state.expand ? 'collapse show' : 'collapse'}>\r\n\r\n <div className=\"card cardblock\">\r\n\r\n <ul className=\"list-group list-group-flush\">\r\n\r\n {details}\r\n\r\n <li className=\"list-group-item\">\r\n\r\n {closeButton}\r\n\r\n </li>\r\n </ul>\r\n </div>\r\n\r\n </div>\r\n );\r\n }\r\n}\r\n","export const userSettingsTranslations = {\r\n profile_saved: 7527,\r\n done: 7338,\r\n sub_title: 7529,\r\n main_title: 7794,\r\n location: 8025,\r\n usergroup: 8024,\r\n unit: 8026,\r\n language: 5336,\r\n name: 7533,\r\n email: 7532,\r\n must_be_filled: 5949,\r\n must_be_equal: 7681,\r\n select_one_option: 7344,\r\n no_options_found: 7644,\r\n search: 7345,\r\n cancel_changes: 7558,\r\n undo_all: 5792,\r\n go_back_to_profile: 7560,\r\n are_you_sure: 7460,\r\n old_password: 3627,\r\n change_password: 3637,\r\n new_password: 3628,\r\n repeat_new_password: 3629,\r\n change: 5432,\r\n password_changed: 7673,\r\n about_close: 4329,\r\n validation_error: 7702,\r\n info_text_location: 8027,\r\n info_text_unit: 8028,\r\n edit_veracity_profile: 8401,\r\n save: 5589,\r\n cancel: 7956\r\n};\r\n\r\nexport type UserSettingsTranslation = {\r\n readonly [T in keyof typeof userSettingsTranslations]: string\r\n};\r\n","import { ValidationLevel, ValidationProps } from 'ui';\r\n\r\nexport interface ServerValidationMessage {\r\n message: string;\r\n parameters: any;\r\n}\r\n\r\nexport type ServerValidationTypes = (ServerValidationMessage | string)[];\r\nexport interface ServerValidationErrors {\r\n [propertyName: string]: ServerValidationTypes;\r\n}\r\n\r\nexport const validationFromServer = (serverErrors: any) =>\r\n\r\n Object.keys(serverErrors).reduce((m, field) => {\r\n return {\r\n ...m,\r\n [field]: {\r\n level: ValidationLevel.error,\r\n messages: [\r\n {\r\n level: ValidationLevel.error,\r\n message: serverErrors[field][0]\r\n }\r\n ]\r\n }\r\n };\r\n }, {} as { [key: string]: ValidationProps });\r\n\r\n export const mapValidationErrorsFromServer = (messages: ServerValidationTypes): ValidationProps => {\r\n return {\r\n level: ValidationLevel.error,\r\n messages: Array.isArray(messages) ? messages.map(m => (\r\n typeof m === 'object'\r\n ? {\r\n level: ValidationLevel.error,\r\n message: m.message,\r\n parameters: m.parameters\r\n }\r\n : {\r\n level: ValidationLevel.error,\r\n message: m\r\n }\r\n )) \r\n : [{\r\n level: ValidationLevel.error,\r\n message: messages\r\n }]\r\n };\r\n };\r\n \r\n export const complexValidationFromServer = (serverErrors: ServerValidationErrors): { [propertyName: string]: ValidationProps } => {\r\n return Object.keys(serverErrors).reduce((prev, propertyName) => {\r\n const errors = serverErrors[propertyName];\r\n return {\r\n ...prev,\r\n [propertyName]: mapValidationErrorsFromServer(errors)\r\n };\r\n }, {});\r\n };\r\n \r\n export const createValidationError = (message?: string): ValidationProps => {\r\n return {\r\n level: ValidationLevel.error,\r\n messages: message ? [{\r\n level: ValidationLevel.error,\r\n message: message\r\n }] : []\r\n };\r\n };\r\n","\r\nexport const endpoint = {\r\n currentUser: 'user/current',\r\n options: {\r\n unit: 'user/current/options/unit',\r\n language: 'user/current/options/language',\r\n location: 'user/current/options/location',\r\n usergroup: 'user/current/options/userGroups'\r\n },\r\n changePassword: 'user/current/password'\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { ApiResponse, HttpResponse } from 'app/types-shared';\r\nimport { endpoint } from './endpoints';\r\n\r\nexport const api = {\r\n\r\n getOptions: async (component, loadOptionsParams): Promise<HttpResponse<ApiResponse<any>>> => {\r\n return new RemoteData(endpoint.options[component]).resource<HttpResponse<ApiResponse<any>>>()\r\n .filter({\r\n ...loadOptionsParams\r\n }).all();\r\n },\r\n \r\n saveSettings: async (profileData: any) => {\r\n\r\n return new RemoteData(endpoint.currentUser)\r\n .resource<HttpResponse<ApiResponse<any>>>()\r\n .save(profileData);\r\n },\r\n\r\n changePassword: async (passwordData: any) => {\r\n return new RemoteData(endpoint.changePassword)\r\n .resource<HttpResponse<ApiResponse<any>>>()\r\n .create(passwordData);\r\n }\r\n \r\n};\r\n","import { ValidationChange } from './action-types';\r\nimport { SuccessNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { userSettingsTranslations } from './constants';\r\nimport { STATE } from 'app/constants';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport * as simpleFormActions from 'app/infrastructure/simple-form/actions';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/index';\r\nimport { validationFromServer } from 'app/infrastructure/data/validation';\r\nimport * as shellActions from 'app/shell/default/actions';\r\nimport { api } from './api';\r\nimport { ActionDispatching } from 'app/types-shared';\r\n\r\nconst simpleFormActionCreators = simpleFormActions.actionCreators(STATE.userSettings);\r\n\r\nexport const actionCreators = {\r\n\r\n /**\r\n * Component can save profile data\r\n */\r\n saveChanges: (query): ActionDispatching<any, any> => async (dispatch: any, getState: any) => {\r\n const translate = createDescriptionSelector(getState().userSettings.texts);\r\n try {\r\n const result = await api.saveSettings(query) as any;\r\n if (result) {\r\n dispatch(simpleFormActionCreators.resetChangesListener());\r\n dispatch(shellActions.actionCreators.loadUserInfo());\r\n dispatch(new SuccessNotification(translate(userSettingsTranslations.profile_saved)));\r\n\r\n const state = getState();\r\n if (query.language && (query.language.v !== state.app.userInfo.language.value)) {\r\n window.location.href = window.location.pathname;\r\n }\r\n }\r\n } catch (err) {\r\n dispatch(new ValidationChange(err.validationErrors ? validationFromServer(err.validationErrors) : []));\r\n }\r\n },\r\n\r\n changePassword: (query): ActionDispatching<any, any> => async (dispatch: any, getState: any) => {\r\n const translationDescription = createDescriptionSelector(getState().userSettings.texts);\r\n try {\r\n const result = await api.changePassword(query) as any;\r\n if (result) {\r\n dispatch(shellActions.actionCreators.removeModal());\r\n dispatch(new SuccessNotification(translationDescription(userSettingsTranslations.password_changed)));\r\n dispatch(shellActions.actionCreators.displayModal(''));\r\n }\r\n } catch (err) {\r\n dispatch(new ValidationChange(err.validationErrors ? validationFromServer(err.validationErrors) : []));\r\n\r\n }\r\n },\r\n\r\n displayModal: (name: string): ActionDispatching<any, any> => errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(simpleFormActionCreators.validationClear());\r\n dispatch(new ValidationChange([]));\r\n dispatch(shellActions.actionCreators.displayModal(name));\r\n }),\r\n\r\n clearValidation: ():ActionDispatching<any, any> => errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(simpleFormActionCreators.validationClear());\r\n dispatch(new ValidationChange([]));\r\n })\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE, simpleFieldForPath, equalsValidation,\r\n SimpleFormValidationConfig, requiredValidation, withSimpleForm } from 'app/infrastructure/simple-form';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { actionCreators } from '../actions';\r\nimport { userSettingsTranslations, UserSettingsTranslation } from '../constants';\r\nimport { SimpleFormProps, SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.userSettings);\r\n\r\nexport interface ChangePasswordModalProps {\r\n version: string;\r\n translation?: UserSettingsTranslation;\r\n onClose: () => void;\r\n changePassword: (serialize: any) => void;\r\n validate: any;\r\n}\r\n\r\nexport class ChangePassword extends React.PureComponent<ChangePasswordModalProps & SimpleFormProps, any> {\r\n public static statePath: string = STATE.userSettings;\r\n\r\n private changePasswordValidationConfig: SimpleFormValidationConfig = [\r\n requiredValidation('oldPassword'),\r\n requiredValidation('newPassword'),\r\n requiredValidation('confirmPassword'),\r\n equalsValidation('newPassword', 'confirmPassword')\r\n ];\r\n\r\n private changePassword = () => {\r\n const { validate, serialize, changePassword, translation } = this.props;\r\n validate(this.changePasswordValidationConfig, () => changePassword(serialize(defaultSerializeMappings)), translation.validation_error);\r\n }\r\n\r\n public render () {\r\n const { translation, onClose } = this.props;\r\n\r\n return <ModalWrapper\r\n headerTitle={translation.change_password}\r\n btnTitle={translation.change}\r\n btnCancelTitle={translation.cancel}\r\n onClose={onClose}\r\n onDone={this.changePassword}\r\n largeSize={false}\r\n closeOnDone={false}>\r\n <form>\r\n <SimpleForm\r\n name=\"oldPassword\"\r\n type={FIELD_TYPE.PASSWORD}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n label={{ text: translation.old_password, required: true }}\r\n initialValue=\"\"\r\n />\r\n <SimpleForm\r\n name=\"newPassword\"\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n type={FIELD_TYPE.PASSWORD}\r\n label={{ text: translation.new_password, required: true }}\r\n initialValue=\"\"\r\n />\r\n <SimpleForm\r\n name=\"confirmPassword\"\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n type={FIELD_TYPE.PASSWORD}\r\n label={{ text: translation.repeat_new_password, required: true }}\r\n initialValue=\"\"\r\n />\r\n </form>\r\n </ModalWrapper>;\r\n }\r\n}\r\n\r\nconst container = containerFactory(withSimpleForm(ChangePassword), actionCreators, null, userSettingsTranslations);\r\n\r\nexport { container as ChangePasswordModal };\r\n","export const exportToZipTranslations = {\r\n export_modal_cancel: 7862,\r\n export_modal_status_started: 7863,\r\n export_modal_status_pending: 7864,\r\n export_modal_submit: 7865,\r\n export_modal_comment: 7866,\r\n export_modal_description_1: 7868,\r\n export_modal_description_2: 7867,\r\n export_modal_title: 7869,\r\n export_modal_wait: 7948,\r\n export_success: 7873\r\n};\r\n\r\nexport const endpoint = {\r\n exportCases: 'case/export',\r\n favouriteDefinition: 'favourite/definition/draft'\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from './constants';\r\nimport { ApiResponse, FavouriteDefinition } from 'app/types-shared';\r\n\r\nexport const api = {\r\n\r\n exportCases: async (definition: FavouriteDefinition): Promise<any> => {\r\n const response = await new RemoteData(endpoint.exportCases).resource<ApiResponse<any>>().create(definition, false);\r\n return await response;\r\n },\r\n\r\n loadFavouriteDefinition: async (id: string | number): Promise<FavouriteDefinition> => {\r\n\r\n const response = await new RemoteData(endpoint.favouriteDefinition).resource<ApiResponse<FavouriteDefinition>>()\r\n .withId(id)\r\n .single();\r\n\r\n return await response.data;\r\n }\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport * as actions from './action-types';\r\nimport { api } from './api';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate/index';\r\nimport { UiState } from 'app/infrastructure/ui/form/types';\r\nimport { exportToZipTranslations } from 'app/area/my-downloads/exports/export-to-zip-modal/constants';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\n\r\nexport const actionCreators = {\r\n\r\n exportCases: (favouriteId: string, serializedData, successMessage): ActionDispatching<any, ApplicationState> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n const toastMessage = toastFactory();\r\n\r\n try {\r\n dispatch(new actions.RequestExportCases());\r\n const areaState = getState().myDownloads as UiState;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n toastMessage.dispatch(translationDescription(exportToZipTranslations.export_modal_wait));\r\n\r\n const definition = await api.loadFavouriteDefinition(favouriteId);\r\n\r\n const newDefinition = {\r\n ...definition,\r\n comments: serializedData.comments,\r\n selectedReport: { v: 9 }\r\n };\r\n\r\n const favoruriteDefinition = await api.exportCases(newDefinition);\r\n\r\n dispatch(new actions.ReceiveExportCases(favoruriteDefinition));\r\n toastMessage.success(successMessage);\r\n\r\n } catch (err) {\r\n dispatch(new actions.FailExportCases());\r\n toastMessage.error(err.validationErrors || err.message);\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { STATE } from 'app/constants';\r\nimport { withSimpleForm } from 'app/infrastructure/simple-form/with-simple-form';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/field-types';\r\nimport { SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { simpleFieldForPath } from 'app/infrastructure/simple-form/';\r\nimport { ExportsModalState } from 'app/area/my-downloads/exports/export-to-zip-modal/types-store';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { exportToZipTranslations } from 'app/area/my-downloads/exports/export-to-zip-modal/constants';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nexport interface ExportToZipModalProps extends ExportsModalState {\r\n onClose: () => void;\r\n}\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.myDownloads);\r\n\r\nexport type ExportsContainerProps = ExportToZipModalProps & typeof actionCreators & DefaultContainerProps & SimpleFormProps;\r\n\r\nexport class ExportToZipModalComponent extends React.Component<ExportsContainerProps, any> {\r\n\r\n public static statePath: string = STATE.myDownloads;\r\n\r\n private onSubmit = () => {\r\n const { params, serialize, translation } = this.props;\r\n this.props.exportCases(\r\n params.favouriteId,\r\n serialize(defaultSerializeMappings),\r\n () => <Link\r\n style={{ color: '#fff' }}\r\n to={routeConstants.myDownloadsView}>\r\n {translation.export_success}\r\n </Link>);\r\n this.props.onClose();\r\n }\r\n\r\n public render() {\r\n const { onClose, translation, exportsModal } = this.props;\r\n return <ModalWrapper\r\n headerTitle={translation.export_modal_title}\r\n btnTitle={translation.export_modal_submit}\r\n btnCancelTitle={translation.export_modal_cancel}\r\n isDisabled={exportsModal.fetching}\r\n onDone={this.onSubmit}\r\n onClose={onClose}\r\n largeSize={false}\r\n closeOnDone={false}>\r\n <p>{translation.export_modal_description_1}</p>\r\n <p>{translation.export_modal_description_2}</p>\r\n <SimpleForm\r\n name=\"comments\"\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.export_modal_comment }}\r\n initialValue={''}\r\n maxLength={254}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />\r\n </ModalWrapper>;\r\n\r\n }\r\n}\r\n\r\nconst container = containerFactory<ExportToZipModalComponent>(withSimpleForm(ExportToZipModalComponent),\r\n actionCreators, undefined, exportToZipTranslations);\r\n\r\nexport { container as ExportToZipModal };\r\n","import * as React from 'react';\r\nimport { ButtonSecondary, CloseButton, ButtonPrimary, ElementLoader } from 'ui';\r\nimport styles from '../regenerate-aggregated-modal.scss';\r\n\r\nexport interface RegenerateAggregatedModalProps {\r\n translation?: any;\r\n onClose: () => void;\r\n fetchingRegenerateAggregated: boolean;\r\n executeRegenerateAggregatedEnv: () => void;\r\n}\r\n\r\nexport class RegenerateAggregatedEnvModal extends React.PureComponent<RegenerateAggregatedModalProps, any> {\r\n public render() {\r\n const { fetchingRegenerateAggregated, translation } = this.props;\r\n\r\n return (\r\n <div className={`modal ${styles.regenerateAggregatedModal}`}>\r\n <div className=\"modal-dialog\" role=\"document\">\r\n <div className=\"modal-content\">\r\n <div className=\"modal-header\">\r\n <h5>{translation.regenerate_aggregated_environmental_title}</h5>\r\n <CloseButton data-dismiss=\"modal\" onClick={this.props.onClose} />\r\n </div>\r\n <div className={`modal-body ${styles.regenerateAggregatedModalBody}`}>\r\n {fetchingRegenerateAggregated ? <div className={styles.loader}>\r\n {<ElementLoader />}\r\n </div> : translation.regenerate_aggregated_environmental_description}\r\n </div>\r\n <div className={`modal-footer ${styles.regenerateAggregatedModalFooter}`}>\r\n <ButtonSecondary dataDismiss=\"modal\" onClick={this.props.onClose} disabled={fetchingRegenerateAggregated}>\r\n {translation.regenerate_aggregated_cancel}\r\n </ButtonSecondary>\r\n <ButtonPrimary onClick={this.props.executeRegenerateAggregatedEnv} disabled={fetchingRegenerateAggregated}>\r\n {translation.regenerate_aggregated_submit_button}\r\n </ButtonPrimary>\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"modal-background\" onClick={this.props.onClose} />\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ButtonSecondary, CloseButton, ButtonPrimary, ElementLoader } from 'ui';\r\nimport styles from '../regenerate-aggregated-modal.scss';\r\n\r\nexport interface RegenerateAggregatedModalProps {\r\n translation?: any;\r\n onClose: () => void;\r\n fetchingRegenerateAggregated: boolean;\r\n executeRegenerateAggregatedRisk: () => void;\r\n}\r\n\r\nexport class RegenerateAggregatedRiskModal extends React.PureComponent<RegenerateAggregatedModalProps, any> {\r\n public render() {\r\n const { fetchingRegenerateAggregated, translation } = this.props;\r\n\r\n return (\r\n <div className={`modal ${styles.regenerateAggregatedModal}`}>\r\n <div className=\"modal-dialog\" role=\"document\">\r\n <div className=\"modal-content\">\r\n <div className=\"modal-header\">\r\n <h5>{translation.regenerate_aggregated_risk_title}</h5>\r\n <CloseButton data-dismiss=\"modal\" onClick={this.props.onClose} />\r\n </div>\r\n <div className={`modal-body ${styles.regenerateAggregatedModalBody}`}>\r\n {fetchingRegenerateAggregated ? <div className={styles.loader}>\r\n {<ElementLoader />}\r\n </div> : translation.regenerate_aggregated_risk_description}\r\n </div>\r\n <div className={`modal-footer ${styles.regenerateAggregatedModalFooter}`}>\r\n <ButtonSecondary dataDismiss=\"modal\" onClick={this.props.onClose} disabled={fetchingRegenerateAggregated}>\r\n {translation.regenerate_aggregated_cancel}\r\n </ButtonSecondary>\r\n <ButtonPrimary onClick={this.props.executeRegenerateAggregatedRisk} disabled={fetchingRegenerateAggregated}>\r\n {translation.regenerate_aggregated_submit_button}\r\n </ButtonPrimary>\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"modal-background\" onClick={this.props.onClose} />\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { AboutModal } from 'app/shell/components/about-modal';\r\nimport { ChangePasswordModal } from 'app/area/user-profile/settings/change-password/change-password-modal';\r\nimport { FixedDocument } from 'app/components/fixed-document';\r\nimport { RefreshCacheModal } from 'app/shell/components/refresh-cache/refresh-cache-modal';\r\nimport { ExportToZipModal } from 'app/area/my-downloads/exports/export-to-zip-modal/export-to-zip-modal';\r\nimport { RegenerateAggregatedEnvModal } from 'app/shell/components/regenerate-aggregated/env/regenerate-aggregated-env';\r\nimport { RegenerateAggregatedRiskModal } from 'app/shell/components/regenerate-aggregated/risk/regenerate-aggregated-risk';\r\nimport { MODAL } from 'app/shell/modal-host-types';\r\n\r\nconst ModalRegistry = {\r\n [MODAL.about]: AboutModal,\r\n [MODAL.changePassword]: ChangePasswordModal,\r\n [MODAL.refreshCache]: RefreshCacheModal,\r\n [MODAL.exportToZip]: ExportToZipModal,\r\n [MODAL.regenerateAggregatedEnv]: RegenerateAggregatedEnvModal,\r\n [MODAL.regenerateAggregatedRisk]: RegenerateAggregatedRiskModal,\r\n [MODAL.none]: ''\r\n};\r\n\r\nexport const modalFor = (modal: string) => {\r\n return ModalRegistry[modal];\r\n};\r\n\r\nexport interface ModalHostProps {\r\n selectedModal: string;\r\n name: string;\r\n version?: string;\r\n onClose: () => void;\r\n}\r\n\r\nexport const ModalHost = (props: ModalHostProps) => {\r\n const {\r\n selectedModal,\r\n ...otherProps\r\n } = props;\r\n\r\n if (!selectedModal) {\r\n return null;\r\n }\r\n\r\n const Instance = modalFor(selectedModal) as any;\r\n\r\n return <FixedDocument>\r\n <Instance {...otherProps}/>\r\n </FixedDocument>;\r\n};\r\n","import * as React from 'react';\r\nimport { ButtonSecondary, CloseButton } from 'ui';\r\nimport styles from './about-modal.scss';\r\n\r\nexport interface AboutModalProps {\r\n version: string;\r\n translation?: any;\r\n onClose: () => void;\r\n}\r\n\r\nexport const AboutModal = (props:AboutModalProps) => (\r\n <div className={`modal ${styles.aboutModal}`}>\r\n <div className=\"modal-dialog\" role=\"document\">\r\n <div className=\"modal-content\">\r\n <div className=\"modal-header\">\r\n <h5>{props.translation.about_title}</h5>\r\n <CloseButton data-dismiss=\"modal\" onClick={props.onClose}/>\r\n </div>\r\n <div className={`modal-body ${styles.aboutModalBody}`}>\r\n <p className={`${styles.versionInfo}`}>\r\n {props.translation.about_info} {props.version}\r\n </p>\r\n <p className={`${styles.modalSubtext}`}>© {props.translation.about_copyrights}</p>\r\n </div>\r\n <div className={`modal-footer ${styles.aboutModalFooter}`}>\r\n <ButtonSecondary dataDismiss=\"modal\" onClick={props.onClose}>{props.translation.about_close}</ButtonSecondary>\r\n </div>\r\n </div>\r\n </div>\r\n <div className=\"modal-background\" onClick={props.onClose}/>\r\n </div>\r\n );\r\n","import * as React from 'react';\r\nimport { ElementLoader } from 'ui';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\n\r\nexport interface RefreshCacheModalProps {\r\n translation?: any;\r\n onClose: () => void;\r\n fetchingRefreshCache: boolean;\r\n executeRefreshCache: () => void;\r\n}\r\n\r\nexport const RefreshCacheModal: React.SFC<RefreshCacheModalProps> = (props: RefreshCacheModalProps) => {\r\n const { fetchingRefreshCache, translation } = props;\r\n return (\r\n <ModalWrapper\r\n headerTitle={translation.refresh_cache_title}\r\n btnTitle={props.translation.refresh_cache_submit_button}\r\n btnCancelTitle={props.translation.refresh_cache_cancel}\r\n onDone={props.executeRefreshCache}\r\n onClose={props.onClose}\r\n closeOnDone={false}\r\n isDisabled={fetchingRefreshCache}\r\n largeSize={false}>\r\n {fetchingRefreshCache ? <div>\r\n {<ElementLoader />}\r\n </div> : props.translation.refresh_cache_description}\r\n </ModalWrapper>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport * as H from 'history';\r\nimport { Link } from 'react-router';\r\nimport { routeConstants, UserProfileSectionType } from 'app/routes/route-constants';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport { getNotificationsApiUrl } from 'app/infrastructure/hosting';\r\nimport { UserInfo, SharedState } from 'app/types-shared';\r\nimport { Consent } from 'app/area/user-profile/my-notifications/types';\r\n\r\ninterface NotificationToastProps {\r\n location: H.Location;\r\n userInfo?: UserInfo;\r\n consents?: Consent[];\r\n fetchingLoadConsents?: boolean;\r\n translation: { [key: string]: string };\r\n sharedState: SharedState;\r\n loadConsents: (recipientId: number) => void;\r\n}\r\n\r\nexport class NotificationToast extends React.Component<NotificationToastProps> {\r\n public componentDidUpdate(prevProps: NotificationToastProps) {\r\n const { sharedState: { showNotificationChannelsInfo }, fetchingLoadConsents,\r\n consents, location: { pathname } } = this.props;\r\n\r\n const shouldLoadConsents = !!getNotificationsApiUrl() && showNotificationChannelsInfo && !fetchingLoadConsents;\r\n\r\n if (pathname === '/') {\r\n pathname !== prevProps.location.pathname && shouldLoadConsents && this.loadConsents();\r\n !!consents && !consents.length && consents !== prevProps.consents && this.showPanel();\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n this.props.sharedState.showNotificationChannelsInfo && !!getNotificationsApiUrl() && this.loadConsents();\r\n }\r\n\r\n private loadConsents = () => {\r\n const { loadConsents, sharedState: { id: recipientId } } = this.props;\r\n recipientId && loadConsents(recipientId);\r\n }\r\n\r\n private showPanel = () => {\r\n const { translation } = this.props;\r\n const toastMessage = <>\r\n <b>{translation.notification_toast_title}</b>\r\n <p>{translation.notification_toast_subtitle}</p>\r\n\r\n <Link\r\n style={{ color: '#000', textDecoration: 'underline' }}\r\n to={routeConstants.userProfileActiveSection(UserProfileSectionType.Notifications)}>\r\n {translation.notification_toast_link}\r\n </Link>\r\n </>;\r\n\r\n notifyUser.set({ autoClose: 8000 }).info(toastMessage);\r\n }\r\n\r\n public render() {\r\n return null;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport ArrowRight from 'react-icons/lib/md/keyboard-arrow-right';\r\n\r\nexport const SupportLink = ({url}) => {\r\n const link = url || '#';\r\n const href = link.indexOf('@') > 0 ? `mailto:${url}` : link;\r\n return (\r\n <a href={href} className=\"standalone-link\">\r\n {url}\r\n <ArrowRight className=\"standalone-link-arrow\"/>\r\n </a>);\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { Link } from 'react-router';\r\nimport ArrowRight from 'react-icons/lib/md/keyboard-arrow-right';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { AuthState } from 'app/types-shared';\r\nimport { FooterProps } from 'app/shell/types';\r\nimport styles from './footer.scss';\r\nimport { SupportLink } from 'app/shell/components/footer/support-link';\r\n\r\nexport class Footer extends React.Component<FooterProps, any> {\r\n\r\n public static statePath: string = STATE.app;\r\n\r\n private renderLink(link: string, title: string, shouldRenderLink: boolean) {\r\n return shouldRenderLink ?\r\n <Link to={link} className=\"standalone-link\">{title}<ArrowRight className=\"standalone-link-arrow\" />\r\n </Link> :\r\n title;\r\n }\r\n\r\n public render() {\r\n const { language, location, userGroup, unit } = this.props.userInfo || {} as any;\r\n const {\r\n showFooter, shouldRenderLinks, translation, supportEmailAddress, onAboutModal,\r\n sharedState\r\n } = this.props;\r\n const isAuthenticated = sharedState && sharedState.authState === AuthState.Authenticated;\r\n\r\n return showFooter && isAuthenticated\r\n ? (<div className={'container main-grid'}>\r\n <div className={`row ${styles.footer}`}>\r\n <div className=\"col-md-6\">\r\n <div className={styles.panel}>\r\n <h4 className={styles.head}>{translation.contact_information}</h4>\r\n <div>\r\n {translation.any_problems}\r\n </div>\r\n\r\n <div>\r\n <SupportLink url={supportEmailAddress} />\r\n </div>\r\n </div>\r\n\r\n <div className={styles.panel}>\r\n <Link to=\"#\" className=\"standalone-link\" onClick={onAboutModal}>\r\n {translation.about_synergi}\r\n <ArrowRight className=\"standalone-link-arrow\" />\r\n </Link>\r\n </div>\r\n\r\n </div>\r\n <div className=\"col-md-3\">\r\n <div className={styles.panel}>\r\n <h4 className={styles.head}> <span className={`globe ${styles.icon}`} />\r\n {translation.language}\r\n </h4>\r\n <div>\r\n {this.renderLink(routeConstants.userProfileViewWithFocusFor('language'),\r\n language && language.description, shouldRenderLinks)}\r\n </div>\r\n </div>\r\n\r\n <div className={styles.panel}>\r\n <h4 className={styles.head}> <span className={`location ${styles.icon}`} />\r\n {translation.your_location}\r\n </h4>\r\n <div>\r\n {this.renderLink(routeConstants.userProfileViewWithFocusFor('location'),\r\n location && location.description, shouldRenderLinks)}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div className=\"col-md-3\">\r\n <div className={styles.panel}>\r\n <h4 className={styles.head} > <span className={`user-group ${styles.icon}`} />\r\n {translation.your_user_group}\r\n </h4>\r\n <div>\r\n {this.renderLink(routeConstants.userProfileViewWithFocusFor('usergroup'),\r\n userGroup && userGroup.description, shouldRenderLinks)}\r\n </div>\r\n </div>\r\n\r\n <div className={styles.panel}>\r\n <h4 className={styles.head}> <span className={`unit ${styles.icon}`} />\r\n {translation.your_unit}\r\n </h4>\r\n <div>\r\n {this.renderLink(routeConstants.userProfileViewWithFocusFor('unit'), unit && unit.description, shouldRenderLinks)}\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n </div>)\r\n : null;\r\n }\r\n}\r\n","import { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { footerTranslation } from './constants';\r\nimport { FooterProps } from './types';\r\nimport { routeConstants, routeName } from 'app/routes/route-constants';\r\nimport { Footer } from './components/footer/footer';\r\n\r\nconst routesWithNoFooterLinks = [ routeConstants.userProfileMainView, `${routeConstants.userProfileMainView}/` ];\r\nconst routesWithNoFooter = [`/${routeName.Draft}/`,`/${routeName.Case}/`, routeConstants.bowtie];\r\n\r\nconst selector = {\r\n shouldRenderLinks: (_: any, props: any) => props.location && !routesWithNoFooterLinks.some(r => props.location.pathname.indexOf(r) > -1 ),\r\n showFooter: (_: any, props: any) => \r\n props.location && (!props.fetching && !routesWithNoFooter.some(r => props.location.pathname.indexOf(r) > -1))\r\n};\r\n\r\nconst container = containerFactory<FooterProps>(Footer, undefined, selector, footerTranslation) as any;\r\n\r\nexport { container as Footer };\r\n","import { compile } from 'app/infrastructure/js/template';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\n\r\nexport const urlToSurveyManager = (linkUrl, favouriteId?: number) => { \r\n \r\n const context = {\r\n ...(AppSetting.Integrations as any), \r\n favouriteId\r\n };\r\n return compile(linkUrl, context);\r\n};\r\n","import { MenuAccess } from 'app/shell/types';\r\n\r\nexport const haveSomeItems = (menuAccess: MenuAccess) => {\r\n return !!menuAccess && Object.keys(menuAccess).map(v => menuAccess[v]).some(v => !!v);\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { signout } from 'app/infrastructure/auth';\r\nimport { routeConstants, UserProfileSectionType } from 'app/routes/route-constants';\r\nimport { HeaderProps } from '../../types';\r\nimport { DropdownMenu } from 'ui';\r\nimport MdCharts from 'react-icons/lib/md/equalizer';\r\nimport MdAdd from 'react-icons/lib/md/add';\r\nimport MdUser from 'react-icons/lib/md/account-circle';\r\nimport MdSearch from 'react-icons/lib/md/search';\r\nimport MdBuild from 'react-icons/lib/md/build';\r\nimport MdArrowDropdown from 'react-icons/lib/md/arrow-drop-down';\r\nimport { isValidUrl } from 'app/infrastructure/validation/url';\r\nimport MdTrendingUp from 'react-icons/lib/md/trending-up';\r\nimport { Link as ExternalLink } from 'ui';\r\nimport { urlToSurveyManager } from 'app/area/favourite/components/url-to-survey-manager';\r\n\r\nimport styles from './desktop-nav.scss';\r\nimport { haveSomeItems } from 'app/shell/some-items';\r\n\r\n// TODO: consider reverting this refactor into separate branch, and use old version in first release\r\n\r\nconst DropDownButton = ({ text, Icon }) => text ? (<div className={styles.hasMaxWidth}>\r\n <Icon className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{text}</span>\r\n <MdArrowDropdown className=\"dropdown-arrow\" />\r\n</div>) : null;\r\n\r\nconst Search = props => <li className={styles.navItem}>\r\n <Link to={routeConstants.favouriteDraft}>\r\n <MdSearch id=\"nav-search-icon\" className={styles.navItemIcon} />\r\n <span className=\"visuallyhidden\">{props.translation.search}</span>\r\n </Link>\r\n</li>;\r\n\r\n// tslint:disable:max-func-body-length\r\nconst AuthorizedUserProfileItems = ({\r\n menuAccess,\r\n translation,\r\n helpUrl = undefined,\r\n feedbackUrl = undefined,\r\n manageSurveysUrl = undefined\r\n}) => (<>\r\n <li>\r\n <Link to={routeConstants.userProfileActiveSection(UserProfileSectionType.Settings)} className=\"dropdown-item\">\r\n {translation.user_profile}\r\n </Link>\r\n </li>\r\n\r\n <li>\r\n <Link to={routeConstants.myDownloadsView} className=\"dropdown-item\">\r\n {translation.my_downloads_title}\r\n </Link>\r\n </li>\r\n\r\n {isValidUrl(helpUrl) &&\r\n <li>\r\n <ExternalLink url={helpUrl} linkText={translation.help} className={'dropdown-item'} />\r\n </li>} \r\n\r\n <li>\r\n <Link to={routeConstants.messagesToUserView} className=\"dropdown-item\">\r\n {translation.messages}\r\n </Link>\r\n </li>\r\n\r\n {menuAccess.manageSurveys && manageSurveysUrl && isValidUrl(urlToSurveyManager(manageSurveysUrl)) &&\r\n <ExternalLink url={urlToSurveyManager(manageSurveysUrl)} linkText={translation.manage_surveys} className={'dropdown-item'} />}\r\n\r\n {isValidUrl(feedbackUrl) &&\r\n <li>\r\n <ExternalLink url={feedbackUrl} linkText={translation.feedback} className={'dropdown-item'} />\r\n </li> \r\n }\r\n\r\n <li>\r\n <button id=\"nav-logout-button\" className=\"dropdown-item\" type=\"button\" onClick={signout}>\r\n {translation.logout}\r\n </button>\r\n </li>\r\n</>);\r\n\r\nconst AuthorizedToolsItems = ({\r\n menuAccess,\r\n translation,\r\n onRefreshCache,\r\n onRegenerateAggregatedEnv,\r\n onRegenerateAggregatedRisk\r\n}) => (<>\r\n\r\n {menuAccess.codetableAdministration &&\r\n <li>\r\n <Link to={routeConstants.selectCodetableAdministration} className=\"dropdown-item\">\r\n {translation.codetable_administration}\r\n </Link>\r\n </li>\r\n }\r\n\r\n {menuAccess.userAdministration &&\r\n <li>\r\n <Link to={routeConstants.userSearchView} className=\"dropdown-item\">\r\n {translation.user_administration}\r\n </Link>\r\n </li>\r\n }\r\n\r\n {menuAccess.roleAdministration &&\r\n <li>\r\n <Link to={routeConstants.rolesView} className=\"dropdown-item\">\r\n {translation.role_administration}\r\n </Link>\r\n </li>\r\n }\r\n\r\n {menuAccess.refreshCache && <li>\r\n <button id=\"nav-refresh-cache-button\" className=\"dropdown-item\" type=\"button\" onClick={onRefreshCache}>\r\n {translation.refresh_cache_title}\r\n </button>\r\n </li>}\r\n\r\n {menuAccess.imports && <li>\r\n <Link to={routeConstants.importView} className=\"dropdown-item\">\r\n {translation.import_title}\r\n </Link>\r\n </li>}\r\n\r\n {menuAccess.regenerateAggregateTables && <li>\r\n <button id=\"nav-regenerate-env-data-button\" className=\"dropdown-item\" type=\"button\" onClick={onRegenerateAggregatedEnv}>\r\n {translation.regenerate_aggregated_environmental_data}\r\n </button>\r\n </li>}\r\n\r\n {menuAccess.regenerateAggregateTables && <li>\r\n <button id=\"nav-regenerate-risk-data-button\" className=\"dropdown-item\" type=\"button\" onClick={onRegenerateAggregatedRisk}>\r\n {translation.regenerate_aggregated_risk_data}\r\n </button>\r\n </li>}\r\n</>);\r\n\r\nconst Tools = ({ menuAccess, children, translation }) => (\r\n haveSomeItems(menuAccess) && <li className={`${styles.navItem} ${styles.dropdownLi}`}>\r\n <DropdownMenu\r\n dropdownNode={<DropDownButton Icon={MdBuild} text={translation.tools} />} closeAfterClick>\r\n {children}\r\n </DropdownMenu>\r\n </li>);\r\n\r\nconst UserProfile = ({ userInfo = undefined, children }) => userInfo ? (<li className={`${styles.navItem} ${styles.dropdownLi}`}>\r\n <DropdownMenu\r\n dropdownNode={<DropDownButton Icon={MdUser} text={userInfo.name} />} closeAfterClick>\r\n {children}\r\n </DropdownMenu>\r\n</li>) : null;\r\n\r\nconst AddNewCase = ({ translation }) => (<li className={`${styles.btnNewCase} ${styles.hasMaxWidth}`}>\r\n <Link to={routeConstants.selectCaseType} className=\"btn btn-outline-secondary\">\r\n <MdAdd /> {translation.new_case}\r\n </Link>\r\n</li>);\r\n\r\nconst AuthorizedMenuItems = ({ translation }) => (<>\r\n <li className={`${styles.navItem} ${styles.hasMaxWidth}`}>\r\n <Link to={routeConstants.selectDashboard}>\r\n <MdCharts className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>\r\n {translation.dashboards}\r\n </span>\r\n </Link>\r\n </li>\r\n <li className={styles.navItem}>\r\n <DropdownMenu dropdownNode={<DropDownButton Icon={MdTrendingUp} text={translation.reports} />} closeAfterClick>\r\n <li>\r\n <Link to={routeConstants.selectSavedReports} className=\"dropdown-item\">\r\n {translation.reports_saved}\r\n </Link>\r\n </li>\r\n <li>\r\n <Link to={routeConstants.selectCompanyReports} className=\"dropdown-item\">\r\n {translation.reports_company}\r\n </Link>\r\n </li>\r\n <li>\r\n <Link to={routeConstants.favouriteDraftNew} className=\"dropdown-item\">\r\n {translation.new_report}\r\n </Link>\r\n </li>\r\n </DropdownMenu>\r\n </li>\r\n</>);\r\n\r\n/**\r\n * Navigation menu for large screens\r\n *\r\n * @param props\r\n */\r\nexport const DesktopNav: React.FunctionComponent<HeaderProps> = (props: HeaderProps) => {\r\n return (\r\n <ul className={`navbar-nav mr-auto ${styles.itemsContainer} ${styles.desktopNav}`}>\r\n <AddNewCase {...props} />\r\n <AuthorizedMenuItems {...props} />\r\n <Tools {...props}>\r\n <AuthorizedToolsItems {...props} />\r\n </Tools>\r\n <UserProfile {...props}>\r\n <AuthorizedUserProfileItems {...props} />\r\n </UserProfile>\r\n <Search {...props} />\r\n </ul>\r\n );\r\n};\r\n","// tslint:disable max-func-body-length\r\nimport * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { signout } from 'app/infrastructure/auth';\r\nimport { CloseOnBlur } from 'ui/common/close-on-blur';\r\nimport { routeConstants, UserProfileSectionType } from 'app/routes/route-constants';\r\nimport { HeaderProps, HeaderState } from '../../types';\r\nimport { isValidUrl } from 'app/infrastructure/validation/url';\r\nimport { FixedDocument } from 'app/components/fixed-document';\r\nimport { Link as ExternalLink } from 'ui';\r\nimport styles from './mobile-nav.scss';\r\n\r\n// Icons\r\nimport MdCharts from 'react-icons/lib/md/equalizer';\r\nimport MdAdd from 'react-icons/lib/md/add';\r\nimport MdUser from 'react-icons/lib/md/account-circle';\r\nimport MdSearch from 'react-icons/lib/md/search';\r\nimport MdTrendingUp from 'react-icons/lib/md/trending-up';\r\nimport FaSignOut from 'react-icons/lib/fa/sign-out';\r\nimport MdBurger from 'react-icons/lib/md/menu';\r\nimport MdClose from 'react-icons/lib/md/close';\r\nimport FaRefresh from 'react-icons/lib/fa/refresh';\r\nimport MdFileDownload from 'react-icons/lib/md/file-download';\r\nimport FaRepeat from 'react-icons/lib/fa/repeat';\r\nimport MdHelp from 'react-icons/lib/md/help';\r\nimport MdMessage from 'react-icons/lib/md/mail-outline';\r\nimport MdFeedback from 'react-icons/lib/md/feedback';\r\nimport FaSitemap from 'react-icons/lib/fa/sitemap';\r\nimport MdPlaylistAddCheck from 'react-icons/lib/md/playlist-add-check';\r\nimport MdKeyboardArrowDown from 'react-icons/lib/md/keyboard-arrow-down';\r\nimport MdKeyboardArrowUp from 'react-icons/lib/md/keyboard-arrow-up';\r\nimport MdAssignment from 'react-icons/lib/md/assignment';\r\nimport MdBuild from 'react-icons/lib/md/build';\r\nimport { urlToSurveyManager } from 'app/area/favourite/components/url-to-survey-manager';\r\nimport { haveSomeItems } from 'app/shell/some-items';\r\n\r\nexport class MobileNav extends React.Component<HeaderProps, HeaderState> {\r\n\r\n public state: Readonly<HeaderState> = {\r\n menuIsOpen: false,\r\n menuIsClosing: false\r\n };\r\n\r\n private openMenu = () => {\r\n this.setState({ menuIsOpen: true });\r\n }\r\n\r\n private closeMenu = (e: any) => {\r\n this.setState({ menuIsClosing: true });\r\n setTimeout(() => {\r\n this.setState({\r\n menuIsOpen: false,\r\n menuIsClosing: false\r\n });\r\n }, 300);\r\n }\r\n\r\n public render() {\r\n const { translation, menuAccess, manageSurveysUrl } = this.props;\r\n return (\r\n <CloseOnBlur onBlur={this.closeMenu}>\r\n <div className={styles.mobileNav}>\r\n <div className=\"container main-grid\">\r\n\r\n {!this.state.menuIsOpen &&\r\n <button className={`btn ${styles.hamburger}`} onClick={this.openMenu}>\r\n <span>{translation.menu}</span>\r\n <MdBurger className={styles.navItemIcon} />\r\n </button>\r\n }\r\n\r\n {this.state.menuIsOpen &&\r\n <button className={`btn ${styles.hamburger}`} id={styles.closeBtn} onClick={this.closeMenu}>\r\n <span>{translation.menu}</span>\r\n <MdClose className={styles.navItemIcon} />\r\n </button>\r\n }\r\n </div>\r\n\r\n {this.state.menuIsOpen &&\r\n <FixedDocument>\r\n <div>\r\n <ul className={`list-group dropdown-menu ${styles.dropdownList}\r\n ${this.state.menuIsClosing ? styles.animateOut : ''}`}>\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.selectCaseType} className=\"list-group-item\">\r\n <MdAdd className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.new_case}</span>\r\n </Link>\r\n </li>\r\n\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.selectDashboard} className=\"list-group-item\">\r\n <MdCharts className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.dashboards}</span>\r\n </Link>\r\n </li>\r\n\r\n <li>\r\n <Link className=\"list-group-item\" to={routeConstants.favouriteDraft}>\r\n <MdSearch id=\"nav-search-icon\" className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.search}</span>\r\n </Link>\r\n </li>\r\n\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.userProfileActiveSection(UserProfileSectionType.Settings)} className=\"list-group-item\">\r\n <MdUser className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.user_profile}</span>\r\n </Link>\r\n </li>\r\n\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.myDownloadsView} className=\"list-group-item\" >\r\n <MdFileDownload className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.my_downloads_title}</span>\r\n </Link>\r\n </li>\r\n\r\n <li>\r\n <input type=\"checkbox\" id=\"mobile-reports\" />\r\n\r\n <button type=\"button\" className={`${styles.dropdownButton} list-group-item`}>\r\n <MdAssignment className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.reports}\r\n </span>\r\n <label className={styles.dropdownLabel} htmlFor=\"mobile-reports\">\r\n <MdKeyboardArrowDown className={styles.down} />\r\n <MdKeyboardArrowUp className={styles.up} />\r\n </label>\r\n </button>\r\n\r\n <ul className={styles.subMenu}>\r\n <li>\r\n <Link to={routeConstants.favouriteDraftNew} className=\"list-group-item\">\r\n <MdTrendingUp className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.new_report}</span>\r\n </Link>\r\n </li>\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.selectCompanyReports} className=\"list-group-item\">\r\n <MdTrendingUp className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.reports_company}</span>\r\n </Link>\r\n </li>\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.selectSavedReports} className=\"list-group-item\">\r\n <MdTrendingUp className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.reports_saved}</span>\r\n </Link>\r\n </li>\r\n </ul>\r\n </li>\r\n\r\n {haveSomeItems(menuAccess) && <li>\r\n <input type=\"checkbox\" id=\"mobile-admin\" />\r\n\r\n <button type=\"button\" className={`${styles.dropdownButton} list-group-item`}>\r\n <MdBuild className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.tools}\r\n </span>\r\n <label className={styles.dropdownLabel} htmlFor=\"mobile-admin\">\r\n <MdKeyboardArrowDown className={styles.down} />\r\n <MdKeyboardArrowUp className={styles.up} />\r\n </label>\r\n </button>\r\n\r\n <ul className={styles.subMenu}>\r\n {menuAccess.codetableAdministration &&\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.selectCodetableAdministration} className=\"list-group-item\" >\r\n <FaSitemap className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.codetable_administration}</span>\r\n </Link>\r\n </li>\r\n }\r\n {menuAccess.userAdministration &&\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.userSearchView} className=\"list-group-item\" >\r\n <MdUser className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.user_administration}</span>\r\n </Link>\r\n </li>\r\n }\r\n {menuAccess.roleAdministration &&\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.rolesView} className=\"list-group-item\" >\r\n <MdUser className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.role_administration}</span>\r\n </Link>\r\n </li>\r\n }\r\n\r\n {menuAccess.refreshCache && <li>\r\n <button type=\"button\" id=\"nav-logout-button\" className=\"list-group-item\" onClick={this.props.onRefreshCache}>\r\n <FaRefresh className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.refresh_cache_title}</span>\r\n </button>\r\n </li>}\r\n\r\n {menuAccess.regenerateAggregateTables && <li>\r\n <button type=\"button\" onClick={this.props.onRegenerateAggregatedEnv}\r\n className=\"list-group-item\">\r\n <FaRepeat className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.regenerate_aggregated_environmental_data}\r\n </span>\r\n </button>\r\n </li>}\r\n\r\n {menuAccess.regenerateAggregateTables && <li>\r\n <button type=\"button\" onClick={this.props.onRegenerateAggregatedRisk}\r\n className=\"list-group-item\">\r\n <FaRepeat className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.regenerate_aggregated_risk_data}\r\n </span>\r\n </button>\r\n </li>}\r\n {menuAccess.imports && <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.importView} className=\"list-group-item\">\r\n <MdTrendingUp className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.import_title}</span>\r\n </Link>\r\n </li>}\r\n </ul>\r\n </li>}\r\n\r\n {isValidUrl(this.props.helpUrl) &&\r\n <li onClick={this.closeMenu}>\r\n <ExternalLink url={this.props.helpUrl} className={'list-group-item'}>\r\n <MdHelp className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.help}\r\n </span>\r\n </ExternalLink>\r\n </li>}\r\n\r\n <li onClick={this.closeMenu}>\r\n <Link to={routeConstants.messagesToUserView} className=\"list-group-item\">\r\n <MdMessage className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.messages}\r\n </span>\r\n </Link>\r\n </li>\r\n\r\n {menuAccess.manageSurveys && manageSurveysUrl && isValidUrl(urlToSurveyManager(manageSurveysUrl)) &&\r\n <li>\r\n <ExternalLink url={urlToSurveyManager(manageSurveysUrl)} className={'list-group-item'}>\r\n <MdPlaylistAddCheck className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.manage_surveys}\r\n </span>\r\n </ExternalLink>\r\n </li>}\r\n \r\n {isValidUrl(this.props.feedbackUrl) &&\r\n <li onClick={this.closeMenu}>\r\n <ExternalLink url={this.props.feedbackUrl} className={'list-group-item'}>\r\n <MdFeedback className={styles.navItemIcon} />\r\n <span className={`${styles.navItemText} ${styles.small}`}>\r\n {translation.feedback}\r\n </span>\r\n </ExternalLink>\r\n </li>} \r\n\r\n <li>\r\n <button type=\"button\" id=\"nav-logout-button\" className=\"list-group-item\" onClick={signout}>\r\n <FaSignOut className={styles.navItemIcon} />\r\n <span className={styles.navItemText}>{translation.logout}</span>\r\n </button>\r\n </li>\r\n </ul>\r\n <div className={`${styles.background} ${this.state.menuIsClosing ? styles.animateOut : ''}`} onClick={this.closeMenu} />\r\n </div>\r\n </FixedDocument>\r\n }\r\n </div>\r\n\r\n </CloseOnBlur>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { headerTranslation } from './constants';\r\nimport { STATE } from 'app/constants';\r\nimport { Link } from 'react-router';\r\nimport { DesktopNav } from './components/desktop-nav';\r\nimport { MobileNav } from './components/mobile-nav';\r\nimport { HeaderProps } from './types';\r\nimport styles from './header.scss';\r\nimport { ShellState } from 'app/types-shared';\r\nimport { actionCreators as shellActions } from 'app/shell/default/actions';\r\n\r\nexport class HeaderComponent extends React.Component<HeaderProps, any> {\r\n\r\n public static statePath: string = STATE.app;\r\n\r\n public render() {\r\n const {print, fixedHeader} = this.props;\r\n\r\n return !print && (\r\n <header className={styles.header}>\r\n <nav className={`navbar navbar-inverse main-nav ${styles.navigation} ${fixedHeader ? styles.fix : ''}`}>\r\n <div className=\"container main-grid\">\r\n <div className={styles.navbarWrapper}>\r\n <Link to=\"/\" className={`brand-name ${styles.brand}`} >\r\n {this.props.translation.title}\r\n </Link>\r\n <DesktopNav {...this.props} />\r\n </div>\r\n </div>\r\n <MobileNav {...this.props} />\r\n </nav>\r\n </header>\r\n );\r\n }\r\n}\r\n\r\nconst selectors = {\r\n helpUrl: (state: ShellState) => state && state.helpUrl,\r\n print: (_, props: HeaderProps) => (Object.keys(props.location.query) as any).includes('print'),\r\n messagesToUser: (state: ShellState) => state && state.messagesToUser,\r\n fixedHeader: (state: ShellState, props: HeaderProps) => state.fixedHeader,\r\n manageSurveysUrl: (state: ShellState) => state && state.manageSurveysUrl\r\n};\r\n\r\nconst container = containerFactory<HeaderProps>(\r\n HeaderComponent,\r\n shellActions,\r\n selectors,\r\n headerTranslation);\r\n\r\nexport { container as Header };\r\n","import { MenuAccess } from './types';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { ShellState, AuthState, AccessInfoData, AdminInfoData } from 'app/types-shared';\r\n\r\nexport function userInfoNotLoaded(state: ShellState) {\r\n return state.authState === AuthState.Authenticated && !state.fetching && (!state.userInfo || !state.userInfo.id);\r\n}\r\n\r\nexport function userIsLoggedIn(state: ShellState) {\r\n return state.authState === AuthState.Authenticated && state.userInfo && state.userInfo.id;\r\n}\r\n\r\nexport const getMenuAccess = (accessData: AccessInfoData): MenuAccess => ({\r\n codetableAdministration: !!(AppSetting.AdminApiBaseUrl && accessData && accessData.adminPanel &&\r\n (accessData.adminPanel as AdminInfoData).codetable && (accessData.adminPanel as AdminInfoData).codetable.read),\r\n\r\n userAdministration: !!(AppSetting.AdminApiBaseUrl && accessData && accessData.adminPanel &&\r\n (accessData.adminPanel as AdminInfoData).user && (accessData.adminPanel as AdminInfoData).user.read),\r\n\r\n roleAdministration: !!(AppSetting.AdminApiBaseUrl && accessData && accessData.adminPanel &&\r\n (accessData.adminPanel as AdminInfoData).role && (accessData.adminPanel as AdminInfoData).role.read),\r\n\r\n refreshCache: accessData && accessData.tools && accessData.tools.refreshCache,\r\n imports: accessData && accessData.tools && accessData.tools.exportAndImport && accessData.tools.exportAndImport.import,\r\n regenerateAggregateTables: accessData && accessData.tools && accessData.tools.regenerateAggregateTables,\r\n manageSurveys: accessData && accessData.surveyManager && accessData.surveyManager.edit\r\n});\r\n","import * as React from 'react';\r\nimport { MessageToUserProps } from './types';\r\nimport { messageStatusOptions } from 'app/shell/constants';\r\nimport { ButtonInline} from 'ui';\r\nimport { DisplayTextWithLinks } from 'ui/common/display-text-with-links';\r\nimport styles from './message-to-user.scss';\r\n\r\nexport class MessageToUserComponent extends React.Component<MessageToUserProps> {\r\n\r\n private updateMessageStatus = () => {\r\n this.props.updateMessageStatus && this.props.messageStatus === messageStatusOptions.unread ?\r\n this.props.updateMessageStatus(this.props.messageId, messageStatusOptions.read) :\r\n this.props.updateMessageStatus(this.props.messageId, messageStatusOptions.unread);\r\n }\r\n\r\n public render() {\r\n const {messageText, messageSubject, messageDate, messageStatus, textMarkAsRead, textMarkAsUnread, updating, dateLabel} = this.props;\r\n const textMessageStatus = messageStatus === messageStatusOptions.unread ? textMarkAsRead : textMarkAsUnread;\r\n\r\n const statusStyle = messageStatus === messageStatusOptions.unread ? 'alert-info' : '';\r\n const updatingStyle = updating ? styles.updating : '';\r\n\r\n return (\r\n <article\r\n className={`alert ${statusStyle} ${styles.message} ${updatingStyle}`}>\r\n <header className=\"flex\">\r\n <h3 className=\"flex-grow\">{messageSubject}</h3>\r\n <div className={styles.date} aria-label={dateLabel}>{messageDate}</div>\r\n </header>\r\n <DisplayTextWithLinks text={messageText} className={styles.messageText}/>\r\n <ButtonInline onClick={this.updateMessageStatus} disabled={updating}>\r\n {textMessageStatus}\r\n </ButtonInline>\r\n </article>\r\n );\r\n }\r\n}\r\n\r\nexport { MessageToUserComponent as MessageToUser };\r\n","import * as React from 'react';\r\nimport styles from './message-to-user.scss';\r\nimport { createFormatters, parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport * as shellActions from 'app/shell/default/actions';\r\nimport { messagesToUserTranslation, messageStatusOptions } from 'app/shell/constants';\r\nimport { STATE } from 'app/constants';\r\nimport { MessageToUser } from 'app/shell/components/messages-to-user/message-to-user';\r\nimport { MessagesToUserProps } from './types';\r\n\r\nenum VisibilityState {\r\n visible = 'visible',\r\n hidden = 'hidden'\r\n}\r\nexport class MessagesToUserComponent extends React.PureComponent<MessagesToUserProps> {\r\n public static statePath: string = STATE.app;\r\n private formatters: any;\r\n private interval: any;\r\n\r\n constructor(props: MessagesToUserProps) {\r\n super(props);\r\n this.formatters = createFormatters(props.locale);\r\n }\r\n\r\n public static defaultProps: Partial<MessagesToUserProps> = {\r\n interval: 15 * 60 * 1000\r\n };\r\n\r\n private onGetMessages = () => {\r\n const {getMessagesToUser} = this.props;\r\n if(document.visibilityState === VisibilityState.visible && getMessagesToUser) {\r\n getMessagesToUser();\r\n }\r\n\r\n this.interval = setTimeout(this.onGetMessages, this.props.interval);\r\n }\r\n\r\n public componentDidMount() {\r\n this.onGetMessages();\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.interval && clearTimeout(this.interval);\r\n }\r\n\r\n private dateFormatter = (date: string) => this.formatters.formatDate(parseAsDateUTC(date), {\r\n weekday: 'long', day: 'numeric', month: 'long', year: 'numeric' });\r\n\r\n public render() {\r\n const {translation, messagesToUser, showUnreadMessagesOnly, wrapper, showNoItemsMessage} = this.props;\r\n\r\n const messages = messagesToUser.filter(({status}) => status.v === messageStatusOptions.unread === !!showUnreadMessagesOnly);\r\n if(messages.length === 0) {\r\n return !showNoItemsMessage ? null : (\r\n showUnreadMessagesOnly ? translation.no_unread_messages : translation.no_read_messages\r\n );\r\n }\r\n\r\n const messageComponents = messages.map((message) =>\r\n <MessageToUser key={message.id} messageId={message.id}\r\n messageSubject={message.subject} messageDate={this.dateFormatter(message.messageDate)}\r\n messageText={message.message} messageStatus={message.status.v} textMarkAsRead={translation.mark_as_read}\r\n textMarkAsUnread={translation.mark_as_unread} updating={message.updating} dateLabel={translation.message_date}\r\n {...this.props}/>);\r\n\r\n return wrapper ? wrapper(messageComponents) : messageComponents;\r\n }\r\n}\r\n\r\nconst wrapInMainGrid = (component:React.Component) => <div className={`container main-grid ${styles.unreadContainer}`}>\r\n {component}\r\n</div>;\r\n\r\nexport const MessagesToUserUnread = (props: MessagesToUserProps) => {\r\n return <MessagesToUserComponent showUnreadMessagesOnly={true} wrapper={wrapInMainGrid} {...props}/>;\r\n };\r\n\r\nconst container = containerFactory<MessagesToUserProps>(\r\n MessagesToUserComponent,\r\n shellActions.actionCreators,\r\n {},\r\n messagesToUserTranslation\r\n);\r\n\r\nexport { container as MessagesToUser };\r\n","// #region imports\r\nimport { AuthView } from 'app/area/auth';\r\nimport { MessagePanel } from 'app/components';\r\nimport { STATE } from 'app/constants';\r\nimport { enableNotifications } from 'app/infrastructure/notifications/index';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { layoutTranslation } from 'app/shell/constants';\r\nimport { DevErrorPanel } from '../components/dev-error-panel';\r\nimport { ModalHost } from 'app/shell/modal-host';\r\nimport { NotificationToast } from 'app/shell/notification-toast';\r\nimport * as React from 'react';\r\nimport { ElementLoader } from 'ui/common/element-loader/element-loader';\r\nimport * as shellActions from './actions';\r\nimport { AppShell } from '../app-shell';\r\nimport { Footer } from '../footer';\r\nimport { Header } from '../header';\r\nimport { MODAL } from '../modal-host-types';\r\nimport { LayoutProps, LayoutContainerProps } from '../types';\r\nimport { userIsLoggedIn, userInfoNotLoaded, getMenuAccess } from '../selectors';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { logSystemInfo } from 'app/infrastructure/development/system-info';\r\nimport { MessagesToUserUnread } from 'app/shell/components/messages-to-user';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { isRouteInPath } from 'app/area/shared/navigation';\r\nimport styles from '../layout.scss';\r\n//#endregion\r\n\r\n/**\r\n * LayoutComponent performs the first level of application component rendering.\r\n * Wrapped by only react-router and context providers.\r\n *\r\n */\r\nexport class LayoutComponent extends React.Component<\r\n LayoutContainerProps\r\n > {\r\n public static statePath: string = STATE.app;\r\n\r\n public componentDidUpdate(prev: LayoutProps) {\r\n if (userInfoNotLoaded(this.props)) {\r\n this.props.loadUserInfo();\r\n }\r\n if (prev.userInfo !== this.props.userInfo) {\r\n logSystemInfo(this.props);\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n if (userInfoNotLoaded(this.props)) {\r\n this.props.loadUserInfo();\r\n }\r\n if (!this.props.locale) {\r\n this.props.changeUserLocale(AppShell.locale);\r\n }\r\n enableNotifications(null, (this.props as any).dispatch);\r\n }\r\n\r\n private onAboutModal = (e: any) => {\r\n e.preventDefault();\r\n this.props.displayModal(MODAL.about);\r\n };\r\n\r\n private onRefreshCache = (e: any) => {\r\n e.preventDefault();\r\n this.props.displayModal(MODAL.refreshCache);\r\n };\r\n\r\n private onRegenerateAggregatedEnv = (e: any) => {\r\n e.preventDefault();\r\n this.props.displayModal(MODAL.regenerateAggregatedEnv);\r\n };\r\n\r\n private onRegenerateAggregatedRisk = (e: any) => {\r\n e.preventDefault();\r\n this.props.displayModal(MODAL.regenerateAggregatedRisk);\r\n };\r\n\r\n public render() {\r\n const { messages, hideUserMessages, translation, print } = this.props;\r\n\r\n const body = userIsLoggedIn(this.props) && (\r\n <>\r\n <Header\r\n {...this.props}\r\n onRefreshCache={this.onRefreshCache}\r\n onRegenerateAggregatedEnv={this.onRegenerateAggregatedEnv}\r\n onRegenerateAggregatedRisk={this.onRegenerateAggregatedRisk}\r\n menuAccess={getMenuAccess(this.props.sharedState.access)} />\r\n <DevErrorPanel errors={this.props.errors} />\r\n <main>\r\n <MessagePanel messages={messages} />\r\n {!hideUserMessages && !print && <MessagesToUserUnread {...this.props} />}\r\n\r\n <NotificationToast\r\n location={this.props.location}\r\n userInfo={this.props.userInfo}\r\n consents={this.props.consents}\r\n sharedState={this.props.sharedState}\r\n fetchingLoadConsents={this.props.fetchingLoadConsents}\r\n loadConsents={this.props.loadConsents}\r\n translation={translation} />\r\n\r\n {this.props.body}\r\n\r\n <ModalHost {...this.props as any} onClose={this.props.removeModal} />\r\n\r\n </main>\r\n </>\r\n );\r\n return (\r\n <div className={styles.layout}>\r\n <div className={styles.contentWrapper}>\r\n <AuthView {...this.props as any} />\r\n {body || <ElementLoader />}\r\n </div>\r\n <footer>\r\n <Footer\r\n location={this.props.location}\r\n onAboutModal={this.onAboutModal} />\r\n </footer>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst selector = {\r\n showBanner: (state: ApplicationState, props: LayoutProps) => props.location.pathname === '/',\r\n print: (_, props: LayoutProps) => (Object.keys(props.location.query) as any).includes('print'),\r\n hideUserMessages:\r\n (state: ApplicationState, { location: { pathname } }) => (\r\n isRouteInPath(pathname, routeConstants.messagesToUserView) ||\r\n isRouteInPath(pathname, routeConstants.bowtie)\r\n )\r\n};\r\n\r\nconst LayoutContainer = containerFactory<LayoutProps>(\r\n LayoutComponent,\r\n shellActions.actionCreators,\r\n selector,\r\n layoutTranslation\r\n);\r\n\r\nexport const Layout = props => <LayoutContainer {...props} />;\r\n","import { isDevelopment } from 'app/infrastructure/universal';\r\nimport get from 'lodash/get';\r\n\r\nexport const logSystemInfo = props => {\r\n if (!isDevelopment) {\r\n return;\r\n }\r\n console.group('System info:');\r\n console.table &&\r\n console.table(\r\n [\r\n { property: 'Username', value: get(props, 'userInfo.userName') },\r\n { property: 'Token', value: localStorage.getItem('sl:access_token') },\r\n { property: 'Locale', value: get(props, 'locale') },\r\n {\r\n property: 'Client UTC offset',\r\n value: get(props, 'settings.utcOffset'),\r\n details: '(in minutes)'\r\n },\r\n { property: 'API version', value: get(props, 'version') }\r\n ],\r\n ['property', 'value']\r\n );\r\n console.groupEnd();\r\n};\r\n","// tslint:disable:jsx-no-lambda\r\n// tslint:disable:react-this-binding-issue\r\nimport * as React from 'react';\r\nimport styles from './drag-tag.scss';\r\nimport MdAdd from 'react-icons/lib/md/add';\r\nimport MdRemove from 'react-icons/lib/md/remove';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\ninterface DragTagComponentProps {\r\n title: string;\r\n active: boolean;\r\n onClick?: () => void;\r\n style?: React.CSSProperties;\r\n added?: boolean;\r\n}\r\n\r\nconst DragTagComponent = (props:DragTagComponentProps) => {\r\n const [animationPlayed, setAnimationPlayed] = React.useState(false);\r\n const {\tactive, title, style, added, onClick } = props;\r\n const activeClassName = active ? styles.dragndropTagActive : '';\r\n\r\n const handleKeypress = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (e.charCode === 13) {\r\n onClick();\r\n }\r\n };\r\n const handleAnimationPlayed = () => {\r\n setAnimationPlayed(true);\r\n };\r\n\r\n return (\r\n // I had to change tag from button to div because existing bug https://github.com/react-dnd/react-dnd/issues/803\r\n // For us I don't see a big problem in it\r\n <div\r\n tabIndex={0}\r\n className={`${styles.dragndropTag} ${activeClassName} ${added && !animationPlayed ? styles.added : ''}`}\r\n onClick={onClick}\r\n onKeyPress={onClick && handleKeypress}\r\n onAnimationEnd={handleAnimationPlayed}\r\n style={!!style ? style : {}}\r\n >\r\n <div className={styles.dragSymbol} />\r\n <span className={styles.title}>{insertOptionalWordbreaks(title)}</span>\r\n {active\r\n ? <MdRemove className={styles.addRemoveIcon} />\r\n : <MdAdd className={styles.addRemoveIcon} />\r\n }\r\n </div>\r\n );\r\n};\r\n\r\nexport const DragTag = React.memo(DragTagComponent);\r\n","import { ComplexValue } from 'ui';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\n\r\nexport enum ItemTypes {\r\n AGREGATION_FIELD = 'AGREGATION_FIELD',\r\n GROUPBY_FIELD = 'GROUPBY_FIELD',\r\n DISTRIBUTION_FIELD = 'DISTRIBUTION_FIELD',\r\n TARGET_FIELD = 'TARGET_FIELD',\r\n GROUPBY_SORT = 'GROUPBY_SORT'\r\n}\r\n\r\n// tslint:disable-next-line:no-empty-interfaces\r\nexport interface SelectItem extends ComplexValue<number | string> {\r\n allowRollingAverage?: boolean; // property for period selection type\r\n rollingAverageDescription?: string; // property for period selection type\r\n}\r\n\r\nexport interface FieldItem extends ComplexValue<number> {\r\n /**\r\n * groupId describe id for the same domain fields.\r\n */\r\n groupId?: number;\r\n selected?: boolean;\r\n showMissingValues?: boolean;\r\n added?: boolean;\r\n}\r\n\r\nexport interface FieldValue {\r\n v?: number;\r\n d?: string;\r\n ml?: number;\r\n allowRollingAverage?: boolean;\r\n uom?: string;\r\n children?: FieldValue[];\r\n}\r\n\r\nexport interface DomainNode {\r\n domain: number;\r\n label: string;\r\n children: DomainNode[];\r\n}\r\n\r\nexport interface GroupByDomain {\r\n domain: number;\r\n label: string;\r\n showMissingValues: boolean;\r\n selectionTypes: SelectionTypeResult[];\r\n}\r\n\r\nexport interface SelectionTypeResult {\r\n type: FieldValue;\r\n defaultSelected: boolean;\r\n maxLevels?: number;\r\n categories?: FieldValue[];\r\n periods?: FieldValue[];\r\n}\r\n\r\nexport interface FavouriteDefinitionModification {\r\n definition: FavouriteDefinition;\r\n workingDefinition: FavouriteDefinition;\r\n updateDefinition: (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => void;\r\n}\r\n\r\nexport interface MetadataResult {\r\n exposureFactorDefault?: number;\r\n exposreFactorIncreaseDefault?: number;\r\n}\r\n","import * as React from 'react';\r\nimport { DragDropContext } from 'react-dnd';\r\nimport MultiBackend, { Preview } from 'react-dnd-multi-backend';\r\nimport HTML5toTouch from 'react-dnd-multi-backend/lib/HTML5toTouch';\r\nimport { DragTag } from './drag-tag';\r\nimport { ItemTypes } from '../types';\r\n\r\nclass DragNDropContextComponent extends React.Component {\r\n private generator = (type: string, item: any, style: React.CSSProperties) => {\r\n if (type === ItemTypes.AGREGATION_FIELD || type === ItemTypes.GROUPBY_FIELD) {\r\n return <DragTag title={item.description} active={true} style={style} />;\r\n }\r\n return <div />;\r\n }\r\n public render(): JSX.Element {\r\n return (<div>\r\n <Preview generator={this.generator} />\r\n {this.props.children}\r\n </div>);\r\n }\r\n}\r\n\r\nexport const DragNDropContext = DragDropContext(MultiBackend(HTML5toTouch))(DragNDropContextComponent);\r\n","import { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { FieldItem } from 'app/area/reports/types';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { SelectedAggregateField } from './types-fields';\r\n\r\nexport interface InitialValues {\r\n aggregateField?: FieldItem;\r\n aggregationFunction?: SelectItem;\r\n}\r\nexport const getAggregationState = (workingDefinition: FavouriteDefinition): InitialValues => {\r\n const reportId = workingDefinition.selectedReport && workingDefinition.selectedReport.v;\r\n const report = workingDefinition.reports.find(r => r.report.v === reportId);\r\n const {\r\n aggregationDomain,\r\n aggregationType\r\n } = report;\r\n\r\n const aggregateField: FieldItem = !!aggregationDomain && {\r\n value: aggregationDomain.v,\r\n description: !!aggregationDomain.ald ? aggregationDomain.ald : aggregationDomain.d \r\n };\r\n\r\n const aggregationFunction: SelectItem = !!aggregationType && {\r\n value: aggregationType.v,\r\n description: aggregationType.d\r\n };\r\n return {\r\n aggregateField,\r\n aggregationFunction\r\n };\r\n};\r\n\r\nexport const createAggregateField = (rootCodes: CodetableWireFormat[],\r\n field?: FieldItem,\r\n selectedInitialFunction?: SelectItem\r\n): SelectedAggregateField => {\r\n const options = rootCodes.map(codeItemToStoreValue);\r\n return {\r\n field: field,\r\n value: !!selectedInitialFunction ? selectedInitialFunction : options[0],\r\n options: options\r\n };\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { FavouriteDefinition, ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { FieldItem, SelectItem, DomainNode } from '../../types';\r\nimport { SelectionReportState } from '../../types-store';\r\nimport * as actions from './action-types';\r\nimport { getAggregationState, createAggregateField } from './map-to-store';\r\nimport { ReportCommonApi } from 'app/area/reports/types-api';\r\n\r\nexport const domainNodeToComplexType = (dn: DomainNode): FieldItem => {\r\n return {\r\n value: dn.domain,\r\n description: dn.label,\r\n descendants: !!dn.children ? dn.children.map(domainNodeToComplexType) : undefined\r\n };\r\n};\r\n\r\nconst addToDefaultFields = (fieldItems: FieldItem[], field: FieldItem) => {\r\n return !fieldItems.some(f => f.value === field.value);\r\n};\r\n\r\nexport const actionCreators = (api: ReportCommonApi) => {\r\n\r\n return {\r\n clearState: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearAggregationState());\r\n },\r\n setInitialData: (definition: FavouriteDefinition): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const {\r\n aggregateField,\r\n aggregationFunction\r\n } = getAggregationState(definition);\r\n if (!!aggregateField) {\r\n dispatch(actionCreators(api).setAggregateField(aggregateField, aggregationFunction));\r\n }\r\n },\r\n\r\n setAggregateField: (field?: FieldItem, selectedInitialFunction?: SelectItem): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n if (!field) {\r\n dispatch(new actions.RemoveAggregateField());\r\n return;\r\n }\r\n\r\n const state = getState().selectionReport as SelectionReportState;\r\n if (addToDefaultFields(state.aggregateFieldState.defaultAggregateFields, field)) {\r\n dispatch(new actions.UpdateAggregateDefaultFields([...state.aggregateFieldState.defaultAggregateFields, field]));\r\n }\r\n\r\n const codetables = await api.loadAggregateFunctionOptions(field.value);\r\n\r\n const aggregateField = createAggregateField(codetables.data.rootCodes, field, selectedInitialFunction);\r\n dispatch(new actions.SetAggregateField(aggregateField));\r\n }),\r\n\r\n setAggregationFunction: (selectedFieldItem: SelectItem): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.SetAggregateFunction(selectedFieldItem));\r\n },\r\n loadAggregateDefaultFields: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.RequestAggregateDefaultFields());\r\n const codetables = await api.loadAggregateDefaultFields();\r\n const options = codetables.data.map(domainNodeToComplexType);\r\n dispatch(new actions.ResponseAggregateDefaultFields(options));\r\n }),\r\n loadAggregateFields: (query?: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: ()=>ApplicationState) => {\r\n\r\n const codetables = await api.loadAggregateFields(query, getState());\r\n const options = codetables.data.map(domainNodeToComplexType);\r\n dispatch(new actions.ResponseAggregateFields(options));\r\n }),\r\n updateDefaultAggregateFields: (fieldItems: FieldItem[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.UpdateAggregateDefaultFields(fieldItems));\r\n })\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport styles from './dropdown-menu-item.scss';\r\n\r\nexport interface DropdownItem {\r\n value: string;\r\n description: string;\r\n disabled?: boolean;\r\n onClick?: () => void;\r\n}\r\n\r\nexport interface DropdownMenuItemComponentProps {\r\n menuItem: DropdownItem;\r\n}\r\n\r\nclass DropdownMenuItemComponent extends React.Component<DropdownMenuItemComponentProps, {}> {\r\n private handleOnClick = (e: React.SyntheticEvent<HTMLButtonElement>) => {\r\n const { disabled = false, onClick } = this.props.menuItem;\r\n e.preventDefault();\r\n if (!disabled) {\r\n onClick();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n value,\r\n disabled,\r\n description\r\n } = this.props.menuItem;\r\n return (\r\n <li key={value}>\r\n <button type=\"button\"\r\n className={`dropdown-item ${disabled ? styles.disabled : ''}`}\r\n onClick={this.handleOnClick}\r\n >\r\n {description}\r\n </button>\r\n </li>\r\n );\r\n }\r\n}\r\n\r\nexport const DropdownMenuItem = DropdownMenuItemComponent;\r\n","import * as React from 'react';\r\nimport styles from './expandable-box.scss';\r\nimport { MeatballMenu } from 'ui';\r\nimport MdExpandMore from 'react-icons/lib/md/expand-more';\r\nimport { DropdownItem, DropdownMenuItem } from 'ui/common/dropdown-menu/dropdown-menu-item';\r\nimport { ButtonTertiary } from 'ui/common';\r\n\r\ninterface ExpandableBoxComponentProps {\r\n title: string;\r\n menuItems: DropdownItem[];\r\n contentMessage?: React.ReactNode;\r\n expandedChildren?: React.ReactNode;\r\n children?: any;\r\n}\r\n\r\nclass ExpandableBoxComponent extends React.Component<ExpandableBoxComponentProps, {}> {\r\n\r\n private renderMenuItem = (menuItem: DropdownItem) => {\r\n return <DropdownMenuItem\r\n key={menuItem.value}\r\n menuItem={menuItem} />;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n menuItems = [],\r\n contentMessage,\r\n expandedChildren,\r\n children\r\n } = this.props;\r\n const showContent = !!children || !!contentMessage;\r\n return (\r\n <div className={styles.expandableBox}>\r\n <div className={`${styles.header} ${showContent ? '' : styles.hideBottomBorder}`}>\r\n <h3>{this.props.title}</h3>\r\n <MeatballMenu closeAfterClick>\r\n {menuItems.map(menuItem => this.renderMenuItem(menuItem))}\r\n </MeatballMenu>\r\n </div>\r\n {\r\n showContent ? <div className={styles.content}>\r\n {!!contentMessage && contentMessage}\r\n {this.props.children}\r\n </div> : null\r\n }\r\n\r\n {expandedChildren && <div className={styles.expandButton}>\r\n <ButtonTertiary classNames=\"btn-block\" icon={MdExpandMore} />\r\n </div>}\r\n </div>);\r\n }\r\n}\r\n\r\nexport const ExpandableBox = ExpandableBoxComponent;\r\n","import * as React from 'react';\r\nimport { DropdownMenu } from 'ui';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport MdArrowDropdown from 'react-icons/lib/md/arrow-drop-down';\r\nimport { DropdownItem, DropdownMenuItem } from 'ui/common/dropdown-menu/dropdown-menu-item';\r\nimport styles from './dropdown-field.scss';\r\ninterface DropdownFieldComponentProps {\r\n title?: string;\r\n selectedItem: DropdownItem;\r\n options: DropdownItem[];\r\n className?: string;\r\n}\r\n\r\nexport const mapToMenuItem = (item: SelectItem, onClick?: () => void): DropdownItem => {\r\n return {\r\n value: String(item.value),\r\n description: item.description,\r\n onClick: onClick\r\n };\r\n};\r\n\r\nclass DropdownFieldComponent extends React.Component<DropdownFieldComponentProps, {}> {\r\n\r\n public render(): JSX.Element {\r\n const {\r\n title,\r\n selectedItem,\r\n options,\r\n className=''\r\n } = this.props;\r\n let toggle;\r\n if (!!selectedItem) {\r\n toggle = <div>\r\n <span>{selectedItem.description}</span>\r\n <MdArrowDropdown className=\"dropdown-arrow\" />\r\n </div>;\r\n } else {\r\n toggle = 'No options available';\r\n }\r\n\r\n return (<div className={`${styles.dropdownField} dropdown ${className}`}>\r\n {!!title && <label>{title}</label>}\r\n <DropdownMenu dropdownNode={toggle} closeAfterClick>\r\n {options.map(item => <DropdownMenuItem key={item.value} menuItem={item} />)}\r\n </DropdownMenu>\r\n </div>);\r\n }\r\n}\r\n\r\nexport const DropdownField = DropdownFieldComponent;\r\n","import * as React from 'react';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { DropdownItem } from 'ui/common/dropdown-menu/dropdown-menu-item';\r\nimport { SelectedAggregateField } from '../types-fields';\r\nimport { ExpandableBox } from 'app/area/reports/components/expandable-box';\r\nimport { mapToMenuItem, DropdownField } from 'app/area/reports/components/dropdown-field';\r\n\r\ninterface AggregationFieldComponentProps {\r\n selectedAggregateField: SelectedAggregateField;\r\n onSelect: (field: SelectItem) => void;\r\n textRemove: string;\r\n textHowToAggregate: string;\r\n}\r\n\r\nclass AggregationFieldComponent extends React.Component<AggregationFieldComponentProps, {}> {\r\n\r\n private menuItemsForAggregation = (): DropdownItem[] => {\r\n const handleOnRemove = () => {\r\n this.props.onSelect(undefined);\r\n };\r\n return [{\r\n value: '1',\r\n description: this.props.textRemove,\r\n onClick: handleOnRemove\r\n }];\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectedAggregateField,\r\n onSelect,\r\n textHowToAggregate\r\n } = this.props;\r\n\r\n const selectedItem = selectedAggregateField.value && mapToMenuItem(selectedAggregateField.value);\r\n\r\n const dropdownOptions = selectedAggregateField.options.map(item => mapToMenuItem(item, () => onSelect(item)));\r\n\r\n return (<ExpandableBox title={selectedAggregateField.field.description} menuItems={this.menuItemsForAggregation()}>\r\n <DropdownField\r\n title={textHowToAggregate}\r\n selectedItem={selectedItem}\r\n options={dropdownOptions}\r\n />\r\n </ExpandableBox>);\r\n }\r\n}\r\n\r\nexport const AggregationField = AggregationFieldComponent;\r\n","import * as React from 'react';\r\nimport { DropTarget } from 'react-dnd';\r\nimport { FieldItem, ItemTypes } from '../types';\r\n\r\ninterface AggregateDropPanelComponentProps {\r\n className?: string;\r\n addItem: (item: FieldItem) => void;\r\n connectDropTarget?: any;\r\n isOver?: any;\r\n canDrop?: any;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport const dropPanelForItemType = (itemType: ItemTypes) => {\r\n const AggregateDropPanelComponent = ({connectDropTarget, isOver, className, children}: AggregateDropPanelComponentProps) => (\r\n connectDropTarget(<div className={`${className} ${isOver ? 'drag-active' : ''}`} >\r\n {children}\r\n </div>)\r\n );\r\n\r\n const squareTarget = {\r\n drop(props: AggregateDropPanelComponentProps, monitor: any) {\r\n const field = monitor.getItem();\r\n props.addItem(field);\r\n }\r\n };\r\n\r\n const collect = (connect: any, monitor: any) => {\r\n return {\r\n connectDropTarget: connect.dropTarget(),\r\n isOver: monitor.isOver(),\r\n canDrop: monitor.canDrop()\r\n };\r\n };\r\n\r\n return DropTarget(itemType, squareTarget, collect)(AggregateDropPanelComponent);\r\n};\r\n","import * as React from 'react';\r\nimport { DragSource } from 'react-dnd';\r\nimport { FieldItem, ItemTypes } from '../types';\r\nimport { DragTag } from './drag-tag';\r\n\r\ninterface DragPanelComponentProps {\r\n className: string;\r\n field: FieldItem;\r\n onSelect: (field: FieldItem) => void;\r\n onRemove: (field: FieldItem) => void;\r\n connectDragSource?: any;\r\n isDragging?: any;\r\n isSelected?: boolean;\r\n}\r\n\r\nexport const dragPanelForItemType = (itemType: ItemTypes) => {\r\n class DragPanelComponent extends React.Component<DragPanelComponentProps, {}> {\r\n\r\n private handleOnClick = () => {\r\n if (!!this.props.onSelect) {\r\n if (this.props.isSelected) {\r\n this.props.onRemove(this.props.field);\r\n } else {\r\n this.props.onSelect(this.props.field);\r\n }\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n connectDragSource,\r\n field,\r\n className,\r\n isSelected\r\n } = this.props;\r\n const title = field.groupId > 1\r\n ? `${field.description} (${field.groupId})`\r\n : field.description;\r\n const dragndropTag = <li className={className}>\r\n <DragTag\r\n title={title}\r\n active={isSelected}\r\n added={field.added}\r\n onClick={this.handleOnClick} />\r\n </li>;\r\n\r\n if (isSelected) {\r\n return dragndropTag;\r\n }\r\n return connectDragSource(dragndropTag);\r\n }\r\n }\r\n\r\n const source = {\r\n beginDrag(props: any) {\r\n return props.field;\r\n }\r\n };\r\n\r\n const collect = (connect, monitor) => {\r\n return {\r\n connectDragSource: connect.dragSource(),\r\n isDragging: monitor.isDragging()\r\n };\r\n };\r\n\r\n return DragSource(itemType, source, collect)(DragPanelComponent);\r\n};\r\n","import * as React from 'react';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { SelectItem } from '../types';\r\nimport { LoadOptions, ButtonTertiary, SelectMultipleHierarchy } from 'ui';\r\n\r\ninterface ButtonSelectMultipleDialogComponentProps {\r\n disabled?: boolean;\r\n\r\n className: string;\r\n options: SelectItem[];\r\n placeholder: string;\r\n textButtonAdd: string;\r\n textTitle: string;\r\n textDone: string;\r\n textConfirm: string;\r\n textOptionsNotFound: string;\r\n\r\n onLoadOptions: (query?: string) => void;\r\n onSelect: (items: SelectItem[]) => void;\r\n}\r\n\r\ninterface ButtonSelectMultipleDialogComponentState {\r\n loadOptions: LoadOptions;\r\n isOpen: boolean;\r\n valueItems: SelectItem[];\r\n fetching: boolean;\r\n}\r\n\r\nclass ButtonSelectMultipleDialogComponent extends React.Component<\r\n ButtonSelectMultipleDialogComponentProps,\r\n ButtonSelectMultipleDialogComponentState> {\r\n public static defaultProps: Partial<ButtonSelectMultipleDialogComponentProps> = {\r\n disabled: false\r\n };\r\n public state: Readonly<ButtonSelectMultipleDialogComponentState> = {\r\n loadOptions: {},\r\n isOpen: false,\r\n valueItems: [],\r\n fetching: false\r\n };\r\n\r\n private onLoadOptions = (loadOptions: LoadOptions) => {\r\n this.setState({\r\n loadOptions: { ...loadOptions },\r\n fetching: true\r\n } as ButtonSelectMultipleDialogComponentState, () => {\r\n if (!!loadOptions.query) {\r\n this.props.onLoadOptions(loadOptions.query);\r\n } else {\r\n this.props.onLoadOptions();\r\n }\r\n });\r\n\r\n }\r\n\r\n private handleOnChange = (items: SelectItem[]) => {\r\n this.setState({\r\n valueItems: items\r\n } as ButtonSelectMultipleDialogComponentState);\r\n }\r\n\r\n private handleOpenDialog = (e: React.SyntheticEvent<HTMLDivElement>) => {\r\n if (!this.props.disabled) {\r\n this.setState({\r\n isOpen: true,\r\n valueItems: []\r\n } as ButtonSelectMultipleDialogComponentState);\r\n }\r\n }\r\n\r\n private handleOnDone = () => {\r\n this.props.onSelect([...this.state.valueItems]);\r\n this.setState({\r\n valueItems: [],\r\n isOpen: false\r\n } as ButtonSelectMultipleDialogComponentState);\r\n }\r\n\r\n public componentDidUpdate(prevProps: ButtonSelectMultipleDialogComponentProps) {\r\n if (prevProps.options !== this.props.options) {\r\n this.setState({\r\n fetching: false\r\n });\r\n }\r\n }\r\n\r\n private renderDialog = () => {\r\n const {\r\n options\r\n } = this.props;\r\n const {\r\n loadOptions\r\n } = this.state;\r\n const hideSearchInput = !options.length && !!loadOptions && !loadOptions.query;\r\n return <ModalWrapper onClose={this.handleOnDone}\r\n onDone={this.handleOnDone}\r\n headerTitle={this.props.textTitle}\r\n btnTitle={this.props.textConfirm}\r\n >\r\n <SelectMultipleHierarchy\r\n componentId=\"0\"\r\n className=\"select-single-dialog\"\r\n valueItems={this.state.valueItems}\r\n onChange={this.handleOnChange}\r\n loadOptions={this.state.loadOptions}\r\n onLoadOptions={this.onLoadOptions}\r\n options={options}\r\n placeholder={this.props.placeholder}\r\n textOptionsDone={this.props.textDone}\r\n textOptionsNotFound={this.props.textOptionsNotFound}\r\n leafNodeOnly={true}\r\n isOpen={true}\r\n alwaysOpen={true}\r\n fetching={this.state.fetching}\r\n longDescription={false}\r\n hideSearchInput={hideSearchInput}\r\n descriptionAllLevels={true}\r\n />\r\n </ModalWrapper>;\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (<div className={this.props.className}>\r\n <ButtonTertiary classNames=\"btn-block\" onClick={this.handleOpenDialog} disabled={this.props.disabled}>\r\n {this.props.textButtonAdd}\r\n </ButtonTertiary>\r\n {this.state.isOpen && this.renderDialog()}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport const ButtonSelectMultipleDialog = ButtonSelectMultipleDialogComponent;\r\n","import * as React from 'react';\r\nimport styles from './drop-area.scss';\r\n\r\nexport interface DropAreaProps {\r\n text: string;\r\n}\r\n\r\nexport const DropArea: React.SFC<DropAreaProps> = ({ text }) => {\r\n return (<div className={styles.dragndropArea}>\r\n <div className={styles.dragToBox}>\r\n {text}\r\n </div>\r\n </div>);\r\n};\r\n","import * as React from 'react';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\n\r\ninterface TranslationComponentProps {\r\n translation: any;\r\n}\r\n\r\ninterface TranslationComponentState {\r\n translation: any;\r\n}\r\n\r\nexport const withCachedTranslation = <T extends TranslationComponentProps>(component: any) => {\r\n const Component = component;\r\n type TranslationProps = T & TranslationComponentProps;\r\n class TranslationComponent extends React.Component<TranslationProps, TranslationComponentState> {\r\n constructor(props: TranslationProps) {\r\n super(props);\r\n this.state = {\r\n translation: props.translation\r\n };\r\n }\r\n\r\n // tslint:disable-next-line:function-name\r\n public static getDerivedStateFromProps(nextProps: TranslationProps, prevState: TranslationComponentState) {\r\n if (!deepEquals(nextProps.translation, prevState.translation)) {\r\n return {\r\n translation: nextProps.translation\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n public render(): JSX.Element {\r\n return <Component {...this.props} translation={this.state.translation} />;\r\n }\r\n }\r\n return TranslationComponent;\r\n};\r\n","import * as React from 'react';\r\nimport { ExpandablePanel, ElementLoader } from 'ui';\r\nimport { AggregationField } from './aggregation-field';\r\nimport { ItemTypes, FieldItem, SelectItem } from 'app/area/reports/types';\r\nimport { dropPanelForItemType } from 'app/area/reports/components/drop-panel';\r\nimport { dragPanelForItemType } from 'app/area/reports/components/drag-panel';\r\nimport { AggregationState } from '../types-store';\r\nimport { ButtonSelectMultipleDialog } from 'app/area/reports/components/button-select-multiple-dialog';\r\nimport { DropArea } from 'app/area/reports/components/drop-area';\r\nimport styles from '../../dnd.scss';\r\nimport { withCachedTranslation } from 'app/components/enhancers/with-cached-translation';\r\n\r\nconst AggregateDropPanel = dropPanelForItemType(ItemTypes.AGREGATION_FIELD);\r\n\r\nconst AggregateDragField = dragPanelForItemType(ItemTypes.AGREGATION_FIELD);\r\n\r\nexport interface AggregationPanelTexts {\r\n aggregation_area_title: string;\r\n aggregation_field_info: string;\r\n aggregation_btn_open_dialog: string;\r\n aggregation_dialog_title: string;\r\n aggregation_done: string;\r\n aggregation_drag_n_drop: string;\r\n aggregation_remove: string;\r\n aggregation_options_not_found: string;\r\n aggregation_search: string;\r\n aggregation_how_to_aggregate: string;\r\n}\r\n\r\nexport interface AggregationPanelProps {\r\n orderNumber: string;\r\n fetching: boolean;\r\n\r\n data: AggregationState;\r\n\r\n onLoadAggregateFields: () => void;\r\n onUpdateDefaultAggregateFields: (items: FieldItem[]) => void;\r\n onSelectAggregationField: (field: FieldItem) => void;\r\n onSelectAggregationFunction: (item: SelectItem) => void;\r\n translation: AggregationPanelTexts;\r\n}\r\n\r\nclass AggregationPanelComponent extends React.PureComponent<AggregationPanelProps, {}> {\r\n private onRemove = (fieldItem: FieldItem) => {\r\n this.props.onSelectAggregationField(undefined);\r\n }\r\n\r\n private handleOnSelect = (items: FieldItem[]) => {\r\n const defaultFields = this.props.data.defaultAggregateFields.map(f => f.value);\r\n const removedRedundandItems = items.filter(i => defaultFields.indexOf(i.value) === -1).map(i => ({added:true, ...i}));\r\n this.props.onUpdateDefaultAggregateFields([\r\n ...this.props.data.defaultAggregateFields,\r\n ...removedRedundandItems\r\n ]);\r\n }\r\n\r\n public renderContent() {\r\n const {\r\n data: {\r\n defaultAggregateFields = [],\r\n additionalAggregateFields = [],\r\n selectedAggregateField\r\n },\r\n onLoadAggregateFields,\r\n onSelectAggregationField,\r\n translation\r\n } = this.props;\r\n\r\n const selectedFieldValue = selectedAggregateField && selectedAggregateField.field && selectedAggregateField.field.value;\r\n return <div className=\"row\">\r\n <div className=\"col-6\">\r\n <ul className={styles.dragTagContainer}>\r\n {defaultAggregateFields.map(item => {\r\n const isSelected = selectedFieldValue === item.value;\r\n return <AggregateDragField\r\n key={item.value}\r\n className={styles.dragTag}\r\n field={item}\r\n isSelected={isSelected}\r\n onSelect={onSelectAggregationField}\r\n onRemove={this.onRemove}\r\n />;\r\n })}\r\n <ButtonSelectMultipleDialog\r\n className={styles.dragTag}\r\n options={additionalAggregateFields}\r\n placeholder={translation.aggregation_search}\r\n textButtonAdd={`+ ${translation.aggregation_btn_open_dialog}`}\r\n textTitle={translation.aggregation_dialog_title}\r\n textDone={translation.aggregation_done}\r\n textConfirm={translation.aggregation_done}\r\n textOptionsNotFound={translation.aggregation_options_not_found}\r\n onLoadOptions={onLoadAggregateFields}\r\n onSelect={this.handleOnSelect}\r\n />\r\n </ul>\r\n </div>\r\n <div className=\"col-6\">\r\n <AggregateDropPanel\r\n className={styles.dropBox}\r\n addItem={onSelectAggregationField}\r\n >\r\n {selectedAggregateField && selectedAggregateField.options\r\n ? <AggregationField\r\n selectedAggregateField={selectedAggregateField}\r\n onSelect={this.props.onSelectAggregationFunction}\r\n textRemove={translation.aggregation_remove}\r\n textHowToAggregate={translation.aggregation_how_to_aggregate}\r\n />\r\n : <DropArea text={translation.aggregation_drag_n_drop} />\r\n }\r\n </AggregateDropPanel>\r\n </div>\r\n </div>;\r\n }\r\n public render(): JSX.Element {\r\n const {\r\n translation\r\n } = this.props;\r\n\r\n return <ExpandablePanel title={`${this.props.orderNumber}. ${translation.aggregation_area_title}`}>\r\n {this.props.fetching\r\n ? <ElementLoader />\r\n : this.renderContent()}\r\n </ExpandablePanel>;\r\n }\r\n}\r\n\r\nexport const AggregationPanel = withCachedTranslation<AggregationPanelProps>(AggregationPanelComponent);\r\n","import { FavouriteDefinition, ReportDefinition } from 'app/types-shared';\r\n\r\nexport const updateSelectedReport = (definition: FavouriteDefinition, fieldsToUpdate: Partial<ReportDefinition>) => {\r\n const selectedReport = definition.reports.find(r => r.report.v === definition.selectedReport.v);\r\n\r\n return selectedReport ? {\r\n ...definition,\r\n reports: definition.reports.map(r => r.report.v === definition.selectedReport.v\r\n ? {\r\n ...selectedReport,\r\n ...fieldsToUpdate\r\n }\r\n : r)\r\n } : definition;\r\n};\r\n\r\nexport const transformSelectedReport = (\r\n existingTransform: (definition?: FavouriteDefinition) => FavouriteDefinition,\r\n reportFieldsToUpdate: Partial<ReportDefinition>\r\n) =>\r\n (workingDefinition: FavouriteDefinition): FavouriteDefinition => {\r\n const newDef = existingTransform(workingDefinition);\r\n return updateSelectedReport(newDef, reportFieldsToUpdate);\r\n };\r\n","import { FavouriteDefinition } from 'app/types-shared';\r\nimport { SelectedAggregateField } from './types-fields';\r\nimport { updateSelectedReport } from '../../selected-report';\r\n\r\nexport const updateAggregation = (definition: FavouriteDefinition,\r\n selectedAggregateField: SelectedAggregateField\r\n): FavouriteDefinition => {\r\n\r\n const updatedReportFields = !!selectedAggregateField && !!selectedAggregateField.field\r\n ? {\r\n aggregationDomain: {\r\n v: selectedAggregateField.field.value,\r\n d: selectedAggregateField.field.description\r\n },\r\n aggregationType: {\r\n v: selectedAggregateField.value.value,\r\n d: selectedAggregateField.value.description\r\n }\r\n }\r\n : {\r\n aggregationDomain: undefined,\r\n aggregationType: undefined\r\n };\r\n\r\n return updateSelectedReport(definition, updatedReportFields);\r\n};\r\n","import { deepEquals } from 'app/infrastructure/js';\r\nimport * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { actionCreators } from './actions';\r\nimport { selectionReportTranslations } from '../../constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinitionModification } from '../../types';\r\nimport { SelectionReportState } from '../../types-store';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { AggregationPanel } from './components/aggregation-panel';\r\nimport { updateAggregation } from './map-to-definition';\r\n\r\ninterface AggregationContainerProps extends FavouriteDefinitionModification {\r\n orderNumber: string;\r\n}\r\n\r\nexport type AggregationContainerComponentProps = AggregationContainerProps\r\n & SelectionReportState & DefaultContainerProps & ReturnType<typeof actionCreators>;\r\n\r\nclass AggregationContainerComponent extends React.Component<AggregationContainerComponentProps> {\r\n public static statePath: string = STATE.selectionReport;\r\n\r\n private updateDefinition = () => {\r\n\r\n const transform = (workingDefinition: FavouriteDefinition) => {\r\n\r\n return updateAggregation(\r\n workingDefinition,\r\n this.props.aggregateFieldState.selectedAggregateField\r\n );\r\n };\r\n\r\n this.props.updateDefinition(transform);\r\n }\r\n\r\n public componentDidUpdate(prevProps: AggregationContainerComponentProps) {\r\n\r\n if (!deepEquals(prevProps.aggregateFieldState.selectedAggregateField,\r\n this.props.aggregateFieldState.selectedAggregateField)) {\r\n this.updateDefinition();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (<AggregationPanel\r\n orderNumber={this.props.orderNumber}\r\n fetching={this.props.aggregateFieldState.fetching}\r\n data={this.props.aggregateFieldState}\r\n onLoadAggregateFields={this.props.loadAggregateFields}\r\n onUpdateDefaultAggregateFields={this.props.updateDefaultAggregateFields}\r\n onSelectAggregationField={this.props.setAggregateField}\r\n onSelectAggregationFunction={this.props.setAggregationFunction}\r\n translation={this.props.translation}\r\n />);\r\n }\r\n}\r\n\r\nconst containerFor = (api) =>\r\n containerFactory<AggregationContainerProps>(AggregationContainerComponent, actionCreators(api), undefined, selectionReportTranslations);\r\n\r\nexport { containerFor as AggregationContainerForApi };\r\n","import { FavouriteDefinition, SelectionDefinition } from 'app/types-shared';\r\nimport { SelectionFieldItem, SelectionValue } from './types-fields';\r\nimport { FieldItem } from 'app/area/reports/types';\r\n\r\nconst mapToSelectionValue = (item: SelectionDefinition, rollingAverage?: number): SelectionFieldItem => {\r\n const field: FieldItem = {\r\n value: item.domain.v,\r\n description: !!item.domain.ald ? item.domain.ald : item.domain.d\r\n };\r\n\r\n const selectionValue: SelectionValue = {\r\n interval: item.interval,\r\n level: item.setLevelAccToCond\r\n ? { value: 0 }\r\n : !!item.levels\r\n ? { value: item.levels }\r\n : undefined,\r\n category: !!item.selectedCode || item.selectedCode === 0\r\n ? { value: item.selectedCode }\r\n : undefined,\r\n period: !!item.period && !!item.period.v\r\n ? { value: item.period.v }\r\n : undefined,\r\n rollingAverage: rollingAverage,\r\n fillEmpty: !!item.fillEmpty,\r\n sortOrderType: !!item.sortOrderType && (!!item.sortOrderType.v || item.sortOrderType.v === 0)\r\n ? { value: item.sortOrderType.v }\r\n : undefined,\r\n type: item.type.v\r\n };\r\n\r\n return {\r\n field: field,\r\n value: selectionValue\r\n };\r\n};\r\n\r\nexport const getGroupByState = (workingDefinition: FavouriteDefinition): SelectionFieldItem[] => {\r\n const reportId = workingDefinition.selectedReport && workingDefinition.selectedReport.v;\r\n const report = workingDefinition.reports.find(r => r.report.v === reportId);\r\n\r\n return !!report && !!report.selections && report.selections.map((s, i) => {\r\n return mapToSelectionValue(s, i === 0 ? report.rollingAverage : undefined);\r\n });\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching, FavouriteDefinition } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { FieldItem } from '../../types';\r\nimport { SelectionReportState } from '../../types-store';\r\nimport * as actions from './action-types';\r\nimport { domainNodeToComplexType, getDefaultField, mapSelectionType, setDefaultValue } from './actions.mapper';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { selectionReportTranslations } from '../../constants';\r\nimport { SelectionFieldItem } from './types-fields';\r\nimport { getGroupByState } from './map-to-store';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { ReportCommonApi } from 'app/area/reports/types-api';\r\n\r\nexport const actionCreators = (api: ReportCommonApi) => {\r\n return {\r\n clearState: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearGroupByState());\r\n },\r\n setInitialData: (definition: FavouriteDefinition): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const selectionItems = getGroupByState(definition);\r\n if (!!selectionItems) {\r\n dispatch(actionCreators(api).setSelections(selectionItems));\r\n }\r\n },\r\n loadGroupByDefaultFields: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new actions.RequestGroupByDefaultFields());\r\n const codetables = await api.loadGroupByDefaultFields(getState());\r\n const options = codetables.data.map(domainNodeToComplexType);\r\n dispatch(new actions.ResponseGroupByDefaultFields(options));\r\n }),\r\n updateDefaultGroupByFields: (fieldItems: FieldItem[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new actions.UpdateGroupByDefaultFields(fieldItems));\r\n }),\r\n loadGroupBySortOrderType: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new actions.RequestGroupBySortOrderType());\r\n const codetables = await api.loadGroupBySortOrderType();\r\n const options = codetables.data.rootCodes.map(codeItemToStoreValue);\r\n dispatch(new actions.ResponseGroupBySortOrderType(options));\r\n }),\r\n loadGroupByFields: (query?: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n const codetables = await api.loadGroupByFields(query, getState());\r\n const options = codetables.data.map(domainNodeToComplexType);\r\n dispatch(new actions.ResponseGroupByFields(options));\r\n }),\r\n setSelections: (selectionItems: SelectionFieldItem[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n selectionItems.forEach((s, i) => {\r\n const { selectionReport: { groupByFieldState: { defaultGroupByFields, selectedGroupByFields } } } = getState();\r\n const defaultField = getDefaultField(selectedGroupByFields, defaultGroupByFields, s.field);\r\n if (!defaultField) {\r\n dispatch(new actions.UpdateGroupByDefaultFields([...defaultGroupByFields, s.field]));\r\n }\r\n dispatch(actionCreators(api).loadGroupBySelections(s));\r\n });\r\n }),\r\n loadGroupBySelections: (selectedFieldItem: SelectionFieldItem): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n const {\r\n groupByFieldState: {\r\n selectedGroupByFields,\r\n defaultGroupByFields\r\n },\r\n texts\r\n } = getState().selectionReport as SelectionReportState;\r\n\r\n const updatedSelectedField = {\r\n ...selectedFieldItem,\r\n field: getDefaultField(\r\n selectedGroupByFields,\r\n defaultGroupByFields,\r\n selectedFieldItem.field\r\n )\r\n };\r\n dispatch(new actions.RequestGroupBySelections(updatedSelectedField));\r\n\r\n const result = (await api.loadGroupBySelection(updatedSelectedField.field.value)).data;\r\n const translationDescription = createDescriptionSelector(texts);\r\n const textLevel = translationDescription(selectionReportTranslations.group_by_level);\r\n const textAdjustToFilters = translationDescription(selectionReportTranslations.group_by_adjust_to_filters);\r\n\r\n const selections = result.selectionTypes.map(selection =>\r\n mapSelectionType(selection, textLevel, { value: 0, description: textAdjustToFilters })\r\n );\r\n\r\n const fieldToUpdate: SelectionFieldItem = {\r\n ...updatedSelectedField,\r\n field: {\r\n ...updatedSelectedField.field,\r\n showMissingValues: result.showMissingValues\r\n },\r\n ...(!updatedSelectedField.value && selections.length > 0 && {\r\n value: setDefaultValue(selections)\r\n }),\r\n selections\r\n };\r\n\r\n dispatch(new actions.ResponseGroupBySelections(fieldToUpdate, updatedSelectedField));\r\n }),\r\n\r\n modifyGroupBySelections: (fields: SelectionFieldItem[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ModifyGroupBySelections(fields));\r\n })\r\n };\r\n};\r\n","import { SelectionFieldItem } from './types-fields';\r\n\r\nexport const fieldsMap = {\r\n\r\n canMoveUp: (fields: SelectionFieldItem[], item: SelectionFieldItem) => {\r\n return fields.indexOf(item) > 0;\r\n },\r\n\r\n moveFieldUp: (fields: SelectionFieldItem[], item: SelectionFieldItem): SelectionFieldItem[] => {\r\n\r\n if (fieldsMap.canMoveUp(fields, item)) {\r\n const indexOfItem = fields.indexOf(item);\r\n\r\n return fieldsMap.moveField(fields, indexOfItem, indexOfItem - 1);\r\n } else {\r\n return fields;\r\n }\r\n },\r\n\r\n canMoveDown: (fields: SelectionFieldItem[], item: SelectionFieldItem) => {\r\n return fields.indexOf(item) < fields.length - 1;\r\n },\r\n\r\n moveFieldDown: (fields: SelectionFieldItem[], item: SelectionFieldItem): SelectionFieldItem[] => {\r\n\r\n if (fieldsMap.canMoveDown(fields, item)) {\r\n const indexOfItem = fields.indexOf(item);\r\n\r\n return fieldsMap.moveField(fields, indexOfItem, indexOfItem + 1);\r\n } else {\r\n return fields;\r\n }\r\n },\r\n\r\n showMissingValues: (fields: SelectionFieldItem[], item: SelectionFieldItem): SelectionFieldItem[] => {\r\n const modifiedLGroupByFields = [...fields];\r\n\r\n const updatedItem: SelectionFieldItem = {\r\n ...item,\r\n value: {\r\n ...item.value,\r\n fillEmpty: !item.value.fillEmpty\r\n }\r\n };\r\n const indexOfItem = modifiedLGroupByFields.indexOf(item);\r\n return [\r\n ...fields.slice(0, indexOfItem),\r\n updatedItem,\r\n ...fields.slice(indexOfItem + 1)\r\n ];\r\n },\r\n\r\n moveField: (fields: SelectionFieldItem[], sourceId: number, newIndex: number) => {\r\n const sourceField = fields[sourceId];\r\n const sourceItem: SelectionFieldItem = {\r\n ...sourceField,\r\n value: {\r\n ...sourceField.value,\r\n rollingAverage: undefined\r\n }\r\n };\r\n const nextField = fields[newIndex];\r\n const nextItem: SelectionFieldItem = {\r\n ...nextField,\r\n value: {\r\n ...nextField.value,\r\n rollingAverage: undefined\r\n }\r\n };\r\n\r\n const modifiedFields = fields.filter(f => f !== sourceField).map(f => f !== nextField ? f : nextItem);\r\n\r\n return [\r\n ...modifiedFields.slice(0, newIndex),\r\n sourceItem,\r\n ...modifiedFields.slice(newIndex)\r\n ];\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { SelectionTypeProps } from '../../types';\r\nimport { SelectionType } from '../../types-fields';\r\nimport { RadioSymbol } from 'ui';\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface ActualValueComponentProps extends SelectionTypeProps { }\r\n\r\nclass ActualValueComponent extends React.Component<ActualValueComponentProps, {}> {\r\n private handleOnChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n this.props.onChange({\r\n fillEmpty: !!this.props.selectionField.value && this.props.selectionField.value.fillEmpty,\r\n type: SelectionType.ActualValue\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectionField: {\r\n value,\r\n field\r\n },\r\n selectionItem,\r\n checked\r\n } = this.props;\r\n \r\n const uniqueId = `actual-value-${field.description && field.description.replace(/\\s+/g, '')}-${field.value}`;\r\n\r\n return (<>\r\n <input \r\n type=\"radio\" \r\n className=\"form-check-input visuallyhidden\" \r\n id={uniqueId}\r\n value={value.type}\r\n checked={checked}\r\n onChange={this.handleOnChange} \r\n />\r\n <label\r\n className=\"form-check-label\"\r\n htmlFor={uniqueId}>\r\n <RadioSymbol/>\r\n {selectionItem.label}\r\n </label>\r\n </>);\r\n }\r\n}\r\n\r\nexport const ActualValue = ActualValueComponent;\r\n","import * as React from 'react';\r\nimport { SelectionTypeProps } from '../../types';\r\nimport { SelectionType } from '../../types-fields';\r\nimport { isPositiveNumeric } from 'app/infrastructure/data/number';\r\nimport { Validation, ValidationLevel } from 'ui';\r\nimport { defaultIntervalValue } from 'app/area/reports/constants';\r\nimport { RadioSymbol } from 'ui';\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface IntervalComponentProps extends SelectionTypeProps { }\r\ninterface IntervalComponentState {\r\n validated: boolean;\r\n}\r\nclass IntervalComponent extends React.Component<IntervalComponentProps, IntervalComponentState> {\r\n public state: Readonly<IntervalComponentState> = {\r\n validated: false\r\n };\r\n\r\n private handleOnChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const {\r\n selectionField: {\r\n value\r\n }\r\n } = this.props;\r\n this.props.onChange({\r\n ...value,\r\n interval: !!value.interval ? value.interval : defaultIntervalValue,\r\n type: SelectionType.Interval\r\n });\r\n }\r\n\r\n private handleInputOnChange = (value: number) => {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n interval: value\r\n });\r\n }\r\n\r\n private onChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const { value } = e.currentTarget;\r\n if (isPositiveNumeric(value)) {\r\n this.handleInputOnChange(parseInt(value, 10));\r\n } else if (typeof value === 'string' && value.trim() === '') {\r\n this.handleInputOnChange(undefined);\r\n } else {\r\n this.handleInputOnChange(this.props.selectionField.value.interval);\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectionField: {\r\n value,\r\n field\r\n },\r\n selectionItem,\r\n checked,\r\n translation\r\n } = this.props;\r\n const isValid = !!value.interval;\r\n const uniqueId = `interval-${field.description && field.description.replace(/\\s+/g, '')}-${field.value}`;\r\n return (\r\n <div>\r\n <input\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n id={uniqueId}\r\n value={value.type}\r\n checked={checked}\r\n onChange={this.handleOnChange}\r\n />\r\n <label\r\n className=\"form-check-label\"\r\n htmlFor={uniqueId}>\r\n <RadioSymbol/>\r\n {selectionItem.label}\r\n </label>\r\n {!!checked && <div className={isValid ? '' : 'has-danger'}>\r\n <div className=\"input-wrapper\">\r\n <input\r\n className=\"form-control\"\r\n type=\"text\"\r\n onChange={this.onChange}\r\n value={!!value.interval ? value.interval : ''}\r\n />\r\n </div>\r\n {!isValid && <Validation level={ValidationLevel.error}\r\n messages={[\r\n {\r\n level: ValidationLevel.error,\r\n message: translation.group_by_interval_value_not_valid\r\n }]} />}\r\n </div>}\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport const Interval = IntervalComponent;\r\n","import * as React from 'react';\r\nimport { isPositiveNumeric } from 'app/infrastructure/data/number';\r\nimport styles from './period.scss';\r\nimport { SelectionTypeProps } from '../../types';\r\nimport { SelectItem } from 'app/area/reports/types';\r\nimport { mapToMenuItem, DropdownField } from 'app/area/reports/components/dropdown-field';\r\nimport { RadioSymbol } from 'ui';\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface PeriodComponentProps extends SelectionTypeProps { }\r\n\r\nclass PeriodComponent extends React.Component<PeriodComponentProps, {}> {\r\n private handleOnChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n type: this.props.selectionItem.type,\r\n period: this.props.selectionItem.periods[0]\r\n });\r\n }\r\n\r\n private onSelectPeriod = (selectedoption: SelectItem) => {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n rollingAverage: !!selectedoption.allowRollingAverage && !!this.props.selectionField.value\r\n ? this.props.selectionField.value.rollingAverage : undefined,\r\n period: selectedoption\r\n });\r\n }\r\n\r\n private handleChangeRollingAverage = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const { value } = e.currentTarget;\r\n const { selectionField } = this.props;\r\n let nextValue = selectionField.value.rollingAverage;\r\n\r\n if (isPositiveNumeric(value)) {\r\n nextValue = parseInt(value, 10);\r\n } else if (typeof value === 'string' && value.trim() === '') {\r\n nextValue = undefined;\r\n }\r\n this.props.onChange({\r\n ...selectionField.value,\r\n rollingAverage: nextValue\r\n });\r\n }\r\n\r\n private renderRollingAverage = () => {\r\n const {\r\n selectionField: { value, field },\r\n selectionItem: { periods },\r\n translation\r\n } = this.props;\r\n\r\n const selectedOption = !!value.period ? periods.find(p => p.value === value.period.value) : undefined;\r\n const stringValue = !!value.rollingAverage ? value.rollingAverage : '';\r\n const textInputId = `text-input-${field.description.replace(/\\s+/g, '')}-${field.value}`;\r\n const inputDescription = `text-description-${field.description.replace(/\\s+/g, '')}-${field.value}`;\r\n\r\n return (\r\n <div className={styles.rollingAverage}>\r\n <label htmlFor={textInputId} className=\"control-label\">\r\n {translation.group_by_rolling_average}\r\n </label>\r\n <div className={styles.inputRow}>\r\n <div>\r\n <input\r\n id={textInputId}\r\n className=\"form-control\"\r\n type=\"text\"\r\n onChange={this.handleChangeRollingAverage}\r\n value={stringValue}\r\n aria-describedby={inputDescription}\r\n />\r\n </div>\r\n <label className=\"control-label\" id={inputDescription}>\r\n {selectedOption ? selectedOption.rollingAverageDescription : ''}\r\n </label>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectionField: {\r\n value,\r\n field\r\n },\r\n selectionItem,\r\n checked,\r\n isFirstSelection\r\n } = this.props;\r\n const option = selectionItem.periods.find(i => value.period && i.value === value.period.value);\r\n const selectedPeriodOption = option && mapToMenuItem(option);\r\n const periodOptions = selectionItem.periods.map(l => mapToMenuItem(l, () => this.onSelectPeriod(l)));\r\n const valid = isFirstSelection && !!option && option.allowRollingAverage ? true : false;\r\n\r\n const uniqueId = `period-${field.description.replace(/\\s+/g, '')}-${field.value}`;\r\n const hasMoreFields = checked || valid;\r\n return (<>\r\n <input\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n id={uniqueId}\r\n value={value.type}\r\n checked={checked}\r\n onChange={this.handleOnChange}\r\n />\r\n <label htmlFor={uniqueId} className=\"form-check-label\">\r\n <RadioSymbol />\r\n {selectionItem.label}\r\n </label>\r\n {hasMoreFields && <div className=\"input-wrapper\">\r\n {checked && <DropdownField\r\n selectedItem={selectedPeriodOption}\r\n options={periodOptions}\r\n />}\r\n {valid && this.renderRollingAverage()}\r\n </div>}\r\n </>);\r\n }\r\n}\r\n\r\nexport const Period = PeriodComponent;\r\n","import * as React from 'react';\r\nimport { SelectItem } from 'ui/common/select/types';\r\nimport { SelectionTypeProps } from '../../types';\r\nimport { SelectionType } from '../../types-fields';\r\nimport { mapToMenuItem, DropdownField } from 'app/area/reports/components/dropdown-field';\r\nimport { RadioSymbol } from 'ui';\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface AggregateValueComponentProps extends SelectionTypeProps { }\r\n\r\nclass AggregateValueComponent extends React.Component<AggregateValueComponentProps, {}> {\r\n private handleOnChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n level: this.props.selectionItem.levels ? this.props.selectionItem.levels[0] : undefined,\r\n type: SelectionType.AggregateValue\r\n });\r\n }\r\n\r\n private onClick = (level: SelectItem) => {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n level: level\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectionField: {\r\n value,\r\n field\r\n },\r\n selectionItem,\r\n checked\r\n } = this.props;\r\n\r\n const selectedLevelOption = !!selectionItem.levels\r\n && !!value.level\r\n && mapToMenuItem(selectionItem.levels.find(l => l.value === value.level.value));\r\n const levelOptions = !!selectionItem.levels && selectionItem.levels.map(l => mapToMenuItem(l, () => this.onClick(l)));\r\n const uniqueId = `aggregate-value-${field.description && field.description.replace(/\\s+/g, '')}-${field.value}`;\r\n\r\n return (\r\n <>\r\n <input\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n id={uniqueId}\r\n value={value.type}\r\n checked={checked}\r\n onChange={this.handleOnChange}\r\n />\r\n <label\r\n htmlFor={uniqueId}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n {selectionItem.label}\r\n </label>\r\n\r\n {selectedLevelOption && <div className=\"input-wrapper\"><DropdownField\r\n selectedItem={selectedLevelOption}\r\n options={levelOptions}\r\n /></div>}\r\n </>);\r\n }\r\n}\r\n\r\nexport const AggregateValue = AggregateValueComponent;\r\n","import * as React from 'react';\r\nimport styles from './aggregate-category.scss';\r\nimport { SelectionTypeProps } from '../../types';\r\nimport { SelectionType, SelectionValue } from '../../types-fields';\r\nimport { SelectItem } from 'app/area/reports/types';\r\nimport { mapToMenuItem, DropdownField } from 'app/area/reports/components/dropdown-field';\r\nimport { RadioSymbol, SelectSingle, LoadOptions, ComplexValue } from 'ui';\r\nimport { OptionsType } from 'ui/common/select/types';\r\n\r\n// tslint:disable-next-line:no-empty-interface\r\ninterface AggregateCategoryComponentProps extends SelectionTypeProps { }\r\n\r\ninterface AggregateCategoryComponentState {\r\n loadOptions: LoadOptions;\r\n}\r\n\r\nclass AggregateCategoryComponent extends React.Component<AggregateCategoryComponentProps, AggregateCategoryComponentState> {\r\n public state: Readonly<AggregateCategoryComponentState> = {\r\n loadOptions: {}\r\n };\r\n\r\n private getCategoryOrDefault = (value: SelectionValue) => {\r\n const existingCategory = !!this.props.selectionItem.categories && !!value.category\r\n && this.props.selectionItem.categories.find(c => c.value === value.category.value);\r\n if (!!existingCategory) {\r\n return existingCategory;\r\n }\r\n return !!this.props.selectionItem.categories && !!this.props.selectionItem.categories.length && this.props.selectionItem.categories[0];\r\n }\r\n private handleOnChange = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const { selectionItem } = this.props;\r\n if (!!selectionItem.levels\r\n && !!selectionItem.levels.length\r\n && !!selectionItem.categories\r\n && !!selectionItem.categories.length) {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n level: this.props.selectionItem.levels[0],\r\n category: this.props.selectionItem.categories[0],\r\n type: SelectionType.AggregateCategory\r\n });\r\n }\r\n }\r\n\r\n private onSelectLevel = (level: SelectItem) => {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n level: level\r\n });\r\n }\r\n\r\n private handleChange = (item: SelectItem) => {\r\n this.props.onChange({\r\n ...this.props.selectionField.value,\r\n category: !!item ? item : { value: 0 }\r\n });\r\n }\r\n\r\n private handleLoadOptions = (loadOptions: LoadOptions) => {\r\n this.setState({\r\n loadOptions: loadOptions\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectionField: {\r\n value,\r\n field\r\n },\r\n selectionItem,\r\n checked,\r\n translation\r\n } = this.props;\r\n const {\r\n loadOptions: {\r\n query = ''\r\n }\r\n } = this.state;\r\n\r\n const selectedLevel = value.level && selectionItem.levels.find(o => o.value === value.level.value);\r\n const selectedLevelOption = selectedLevel && mapToMenuItem(selectedLevel);\r\n const levelOptions = selectionItem.levels.map(l => mapToMenuItem(l, () => this.onSelectLevel(l)));\r\n\r\n const selectedCategory = this.getCategoryOrDefault(value);\r\n const uniqueId = `aggregate-category-${field.description && field.description.replace(/\\s+/g, '')}-${field.value}`;\r\n\r\n const filteredOptions = !!query\r\n ? selectionItem.categories.filter(\r\n c => c.description.toLocaleLowerCase().indexOf(query.toLocaleLowerCase()) > -1\r\n )\r\n : selectionItem.categories;\r\n return (\r\n <div className={styles.aggregateCategory}>\r\n <input\r\n type=\"radio\"\r\n className=\"form-check-input visuallyhidden\"\r\n id={uniqueId}\r\n value={value.type}\r\n checked={checked}\r\n onChange={this.handleOnChange}\r\n />\r\n <label\r\n className=\"form-check-label\"\r\n htmlFor={uniqueId}>\r\n <RadioSymbol />\r\n {selectionItem.label}\r\n </label>\r\n {\r\n checked && <div className=\"input-wrapper\">\r\n {selectedLevelOption && <DropdownField selectedItem={selectedLevelOption}\r\n options={levelOptions} />}\r\n <SelectSingle\r\n componentId={'aggr-cat'}\r\n label={{ text: translation.group_by_limit_to_category }}\r\n className={styles.categoryList}\r\n valueItem={selectedCategory as ComplexValue<number>}\r\n options={filteredOptions as ComplexValue<number>[]}\r\n onChange={this.handleChange}\r\n onLoadOptions={this.handleLoadOptions}\r\n optionsDisplaySetting={{ type: OptionsType.flat }}\r\n textOptionsDone={translation.group_by_done}\r\n textOptionsNotFound={translation.group_by_options_not_found}\r\n onLoadOptionsDelay={0}\r\n />\r\n </div>\r\n }\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport const AggregateCategory = AggregateCategoryComponent;\r\n","import { NotSelected } from './not-selected';\r\nimport { ActualValue } from './actual-value';\r\nimport { Interval } from './interval';\r\nimport { Period } from './period';\r\nimport { AggregateValue } from './aggregate-value';\r\nimport { AggregateCategory } from './aggregate-category';\r\nimport { SelectionType } from '../../types-fields';\r\n\r\nexport const selectionTypeConfiguration = {\r\n [SelectionType.NotSelected]: NotSelected,\r\n [SelectionType.ActualValue]: ActualValue,\r\n [SelectionType.Interval]: Interval,\r\n [SelectionType.Period]: Period,\r\n [SelectionType.AggregateValue]: AggregateValue,\r\n [SelectionType.AggregateCategory]: AggregateCategory\r\n};\r\n","import * as React from 'react';\r\n\r\nexport const NotSelected = () => (<span>NotSelected</span>);\r\n","import * as React from 'react';\r\nimport { GroupByPanelTexts } from './group-by-panel-texts';\r\nimport { SelectionFieldItem, SelectionValue } from '../types-fields';\r\nimport { DropdownField, mapToMenuItem } from 'app/area/reports/components/dropdown-field';\r\nimport { SelectItem } from 'app/area/reports/types';\r\n\r\nimport styles from './group-by-sort.scss';\r\n\r\ninterface GroupBySortComponentProps {\r\n item: SelectionFieldItem;\r\n isSingleElement: boolean;\r\n sortOrderTypes: SelectItem[];\r\n\r\n onChange: (value: SelectionValue) => void;\r\n\r\n translation: GroupByPanelTexts;\r\n}\r\n\r\nclass GroupBySortComponent extends React.PureComponent<GroupBySortComponentProps, {}> {\r\n\r\n private handleSortOrderChange = (sortItem: SelectItem) => {\r\n this.props.onChange({\r\n ...this.props.item.value,\r\n sortOrderType: sortItem\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n item, isSingleElement, sortOrderTypes, translation\r\n } = this.props;\r\n\r\n const sortItems = sortOrderTypes.map(s => mapToMenuItem(s, () => this.handleSortOrderChange(s)));\r\n const selectedItem = !!item.value && !!item.value.sortOrderType && sortItems.find(i =>\r\n i.value === String(item.value.sortOrderType.value));\r\n\r\n return !!item.selections && <DropdownField\r\n className={!isSingleElement ? styles.sortArea : undefined}\r\n title={translation.group_by_sort}\r\n selectedItem={selectedItem || sortItems[0]}\r\n options={sortItems}\r\n />;\r\n }\r\n}\r\n\r\nexport const GroupBySort = GroupBySortComponent;\r\n","import * as React from 'react';\r\nimport { DropdownItem } from 'ui/common/dropdown-menu/dropdown-menu-item';\r\nimport { selectionTypeConfiguration } from './selection-types/configuration-selection-type';\r\nimport { GroupByPanelTexts } from './group-by-panel-texts';\r\nimport { ElementLoader } from 'ui/common/element-loader/element-loader';\r\nimport { fieldsMap } from '../fields-map';\r\nimport { ExpandableBox } from 'app/area/reports/components/expandable-box';\r\nimport { SelectionFieldItem, SelectionItem, SelectionType, SelectionValue } from '../types-fields';\r\nimport { SelectItem } from 'app/area/reports/types';\r\nimport { GroupBySort } from './group-by-sort';\r\n\r\ninterface SelectionsFieldComponentProps {\r\n item: SelectionFieldItem;\r\n selectedGroupByFields?: SelectionFieldItem[];\r\n\r\n sortOrderTypes: SelectItem[];\r\n\r\n onModifyGroupBySelections: (fields: SelectionFieldItem[]) => void;\r\n onChangeSelectionField: (modifiedItem: SelectionFieldItem) => void;\r\n\r\n translation: GroupByPanelTexts;\r\n}\r\n\r\nclass SelectionsFieldComponent extends React.PureComponent<SelectionsFieldComponentProps, {}> {\r\n\r\n private handleOnLoadMenuItems = (\r\n item: SelectionFieldItem\r\n ): DropdownItem[] => {\r\n const { onModifyGroupBySelections } = this.props;\r\n\r\n const handleOnRemove = () => {\r\n const modifiedLGroupByFields = [...this.props.selectedGroupByFields];\r\n const indexOfModifiedItem = this.props.selectedGroupByFields.findIndex(\r\n i => i.field.value === item.field.value\r\n && i.field.groupId === item.field.groupId\r\n );\r\n modifiedLGroupByFields.splice(indexOfModifiedItem, 1);\r\n onModifyGroupBySelections(modifiedLGroupByFields);\r\n };\r\n\r\n const handleOnMoveUp = () => {\r\n onModifyGroupBySelections(\r\n fieldsMap.moveFieldUp(this.props.selectedGroupByFields, item)\r\n );\r\n };\r\n\r\n const handleOnMoveDown = () => {\r\n onModifyGroupBySelections(\r\n fieldsMap.moveFieldDown(this.props.selectedGroupByFields, item)\r\n );\r\n };\r\n\r\n const showMissingValues = () => {\r\n\r\n onModifyGroupBySelections(\r\n fieldsMap.showMissingValues(this.props.selectedGroupByFields, item)\r\n );\r\n };\r\n\r\n const menuItems = [\r\n {\r\n value: '1',\r\n description: this.props.translation.group_by_remove,\r\n onClick: handleOnRemove\r\n }\r\n ];\r\n if (fieldsMap.canMoveUp(this.props.selectedGroupByFields, item)) {\r\n menuItems.push({\r\n value: '2',\r\n description: this.props.translation.group_by_move_up,\r\n onClick: handleOnMoveUp\r\n });\r\n }\r\n if (fieldsMap.canMoveDown(this.props.selectedGroupByFields, item)) {\r\n menuItems.push({\r\n value: '3',\r\n description: this.props.translation.group_by_move_down,\r\n onClick: handleOnMoveDown\r\n });\r\n }\r\n if (!!item.field && !!item.field.showMissingValues) {\r\n menuItems.push({\r\n value: '4',\r\n description: !!item.value.fillEmpty\r\n ? this.props.translation.group_by_hide_missing_values : this.props.translation.group_by_show_missing_values,\r\n onClick: showMissingValues\r\n });\r\n }\r\n\r\n return menuItems;\r\n };\r\n\r\n private onChangeSelectionType = (selection: SelectionValue) => {\r\n const selectionField = this.props.item;\r\n this.props.onChangeSelectionField({\r\n ...selectionField,\r\n value: selection\r\n });\r\n }\r\n\r\n private renderSelection = (selection: SelectionItem) => {\r\n const SelectionTypeComponent = selectionTypeConfiguration[selection.type];\r\n const selected = !!this.props.item.value && selection.type === this.props.item.value.type;\r\n\r\n return <SelectionTypeComponent\r\n key={selection.type}\r\n selectionField={this.props.item}\r\n selectionItem={selection}\r\n onChange={this.onChangeSelectionType}\r\n checked={selected}\r\n isFirstSelection={this.props.selectedGroupByFields.indexOf(this.props.item) === 0}\r\n translation={this.props.translation}\r\n />;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n item, sortOrderTypes, translation\r\n } = this.props;\r\n\r\n const menuItems = this.handleOnLoadMenuItems(item);\r\n const hide = !item.selections || (item.selections.length === 1 && item.selections[0].type === SelectionType.ActualValue);\r\n\r\n const title = item.field.groupId > 1\r\n ? `${item.field.description} (${item.field.groupId})`\r\n : item.field.description;\r\n\r\n return <ExpandableBox key={item.field.value}\r\n title={title}\r\n menuItems={menuItems}\r\n contentMessage={!!item.value && !!item.value.fillEmpty && <p>{this.props.translation.group_by_missing_values_are_included}</p>}\r\n >\r\n {!item.selections ? <ElementLoader />\r\n : !hide && item.selections.map(selection => this.renderSelection(selection))}\r\n <GroupBySort\r\n item={item}\r\n isSingleElement={hide}\r\n sortOrderTypes={sortOrderTypes}\r\n onChange={this.onChangeSelectionType}\r\n translation={translation}\r\n />\r\n </ExpandableBox>;\r\n }\r\n}\r\n\r\nexport const SelectionsField = SelectionsFieldComponent;\r\n","import * as React from 'react';\r\nimport { DragSource, DropTarget } from 'react-dnd';\r\nimport { SelectionFieldItem } from '../../types-fields';\r\nimport { ItemTypes } from 'app/area/reports/types';\r\n\r\ninterface SortItemComponentProps {\r\n field: SelectionFieldItem;\r\n isHover?: boolean;\r\n connectDragSource?: any;\r\n connectDropTarget?: any;\r\n findField: (item: SelectionFieldItem) => number;\r\n moveField: (droppedId: number, originalIndex: number) => void;\r\n}\r\n\r\nclass SortItemComponent extends React.Component<SortItemComponentProps, {}> {\r\n public render(): JSX.Element {\r\n const {\r\n isHover,\r\n connectDragSource,\r\n connectDropTarget\r\n } = this.props;\r\n\r\n const opacity = isHover ? 0.5 : 1;\r\n return connectDragSource(\r\n connectDropTarget(<div style={{ opacity }}>{this.props.children}</div>)\r\n );\r\n }\r\n}\r\n\r\nconst source = {\r\n beginDrag(props: SortItemComponentProps) {\r\n return {\r\n field: props.field\r\n };\r\n }\r\n};\r\n\r\nconst cardTarget = {\r\n\r\n drop(props: SortItemComponentProps, monitor: any, component: any) {\r\n const { field } = monitor.getItem();\r\n const index = props.findField(field);\r\n const overId = props.findField(props.field);\r\n if (index !== overId) {\r\n props.moveField(index, overId);\r\n }\r\n }\r\n};\r\n\r\nconst dropTarget = DropTarget(\r\n ItemTypes.GROUPBY_SORT,\r\n cardTarget,\r\n (connect, monitor) => ({\r\n connectDropTarget: connect.dropTarget(),\r\n isHover: monitor.isOver({ shallow: true })\r\n }))(SortItemComponent);\r\n\r\nconst dragSource = DragSource(ItemTypes.GROUPBY_SORT, source, (connect, monitor) => {\r\n return {\r\n connectDragSource: connect.dragSource(),\r\n isDragging: monitor.isDragging()\r\n };\r\n})(dropTarget);\r\n\r\nexport const SortItem = dragSource;\r\n","import * as React from 'react';\r\nimport { ExpandablePanel } from 'ui';\r\nimport { fieldsMap } from '../../../containers/group-by/fields-map';\r\nimport { FieldItem, ItemTypes } from '../../../types';\r\nimport { SelectionsField } from './selections-field';\r\nimport { SortItem } from './sortable/sort-item';\r\nimport { dropPanelForItemType } from 'app/area/reports/components/drop-panel';\r\nimport { dragPanelForItemType } from 'app/area/reports/components/drag-panel';\r\nimport { GroupByFieldState } from '../types-store';\r\nimport { SelectionFieldItem } from '../types-fields';\r\nimport { ButtonSelectMultipleDialog } from 'app/area/reports/components/button-select-multiple-dialog';\r\nimport { DropArea } from 'app/area/reports/components/drop-area';\r\nimport styles from '../../dnd.scss';\r\nimport { withCachedTranslation } from 'app/components/enhancers/with-cached-translation';\r\nimport { GroupByPanelTexts } from 'app/area/reports/containers/group-by/components/group-by-panel-texts';\r\n\r\nconst GroupByDropPanel = dropPanelForItemType(ItemTypes.GROUPBY_FIELD);\r\n\r\nconst GroupByDragField = dragPanelForItemType(ItemTypes.GROUPBY_FIELD);\r\n\r\nexport interface GroupByPanelProps {\r\n disabled: boolean;\r\n orderNumber: string;\r\n maxSelectionCriteria: number;\r\n\r\n fetching: boolean;\r\n\r\n data: GroupByFieldState;\r\n\r\n onLoadGroupByFields: (query?: string) => void;\r\n onUpdateDefaultGroupByFields: (items: FieldItem[]) => void;\r\n onSelectGroupBy: (selectionsField: SelectionFieldItem) => void;\r\n onModifyGroupBySelections: (fields: SelectionFieldItem[]) => void;\r\n\r\n translation: GroupByPanelTexts;\r\n}\r\n\r\nclass GroupByPanelComponent extends React.PureComponent<\r\n GroupByPanelProps\r\n > {\r\n\r\n private addingAvailable = () => {\r\n if (!!this.props.maxSelectionCriteria) {\r\n return this.props.data.selectedGroupByFields.length < this.props.maxSelectionCriteria;\r\n }\r\n return false;\r\n }\r\n\r\n private onSelectGroupBySingle = (field: FieldItem) => {\r\n\r\n if (this.addingAvailable()) {\r\n this.props.onSelectGroupBy({\r\n field\r\n });\r\n }\r\n };\r\n\r\n private onRemoveSelectionsField = (fieldItem: FieldItem) => {\r\n const modifiedLGroupByFields = [...this.props.data.selectedGroupByFields];\r\n const indexOfModifiedItem = this.props.data.selectedGroupByFields.findIndex(\r\n i => i.field.value === fieldItem.value\r\n && i.field.groupId === fieldItem.groupId\r\n );\r\n modifiedLGroupByFields.splice(indexOfModifiedItem, 1);\r\n\r\n this.props.onModifyGroupBySelections(modifiedLGroupByFields);\r\n };\r\n\r\n private onChangeSelectionType = (modifiedItem: SelectionFieldItem) => {\r\n const modifiedLGroupByFields = [...this.props.data.selectedGroupByFields];\r\n const indexOfModifiedItem = this.props.data.selectedGroupByFields.findIndex(\r\n i => i.field.value === modifiedItem.field.value\r\n && i.field.groupId === modifiedItem.field.groupId\r\n );\r\n modifiedLGroupByFields.splice(indexOfModifiedItem, 1, modifiedItem);\r\n\r\n this.props.onModifyGroupBySelections(modifiedLGroupByFields);\r\n };\r\n\r\n private handleOnSelect = (items: FieldItem[]) => {\r\n this.props.onUpdateDefaultGroupByFields([...this.props.data.defaultGroupByFields, ...items.map(i => ({added: true, ...i}))]);\r\n }\r\n\r\n private findFieldIndex = (field: SelectionFieldItem) => {\r\n return this.props.data.selectedGroupByFields.indexOf(field);\r\n }\r\n\r\n private moveField = (droppedId: number, destinationId: number) => {\r\n if (droppedId !== destinationId) {\r\n const updatedFields = fieldsMap.moveField(this.props.data.selectedGroupByFields, droppedId, destinationId);\r\n this.props.onModifyGroupBySelections(updatedFields);\r\n }\r\n }\r\n\r\n private renderContent = () => {\r\n const {\r\n disabled,\r\n data: {\r\n defaultGroupByFields = [],\r\n sortOrderTypes = [],\r\n additionalGroupByFields = [],\r\n selectedGroupByFields = []\r\n },\r\n onLoadGroupByFields,\r\n translation\r\n } = this.props;\r\n\r\n return (\r\n <div className=\"row\">\r\n <div className=\"col-6\">\r\n <ul className={styles.dragTagContainer}>\r\n {defaultGroupByFields.map(item => {\r\n const isSelected = selectedGroupByFields.some(f =>\r\n f.field.value === item.value\r\n && f.field.groupId === item.groupId\r\n );\r\n return (\r\n <GroupByDragField\r\n key={`${item.value}-${item.groupId}`}\r\n className={styles.dragTag}\r\n field={item}\r\n isSelected={isSelected}\r\n added={item.added}\r\n onSelect={this.onSelectGroupBySingle}\r\n onRemove={this.onRemoveSelectionsField}\r\n />\r\n );\r\n })}\r\n <ButtonSelectMultipleDialog\r\n disabled={disabled}\r\n className={styles.dragTag}\r\n options={additionalGroupByFields}\r\n placeholder={translation.group_by_search}\r\n textButtonAdd={`+ ${translation.group_by_btn_open_dialog}`}\r\n textTitle={translation.group_by_dialog_title}\r\n textDone={translation.group_by_done}\r\n textConfirm={translation.group_by_done}\r\n textOptionsNotFound={translation.group_by_options_not_found}\r\n onLoadOptions={onLoadGroupByFields}\r\n onSelect={this.handleOnSelect}\r\n />\r\n </ul>\r\n </div>\r\n <div className=\"col-6\">\r\n <GroupByDropPanel\r\n className={styles.dropBox}\r\n addItem={this.onSelectGroupBySingle}>\r\n {selectedGroupByFields\r\n .map(\r\n (item: SelectionFieldItem, index: number) => (\r\n <SortItem\r\n key={`${item.field.value}-${item.field.groupId}`}\r\n field={item}\r\n findField={this.findFieldIndex}\r\n moveField={this.moveField}\r\n >\r\n <SelectionsField\r\n item={item}\r\n selectedGroupByFields={selectedGroupByFields}\r\n sortOrderTypes={sortOrderTypes}\r\n onModifyGroupBySelections={this.props.onModifyGroupBySelections}\r\n onChangeSelectionField={this.onChangeSelectionType}\r\n\r\n translation={this.props.translation}\r\n />\r\n </SortItem>\r\n )\r\n )}\r\n {this.addingAvailable() && <DropArea text={translation.group_by_drag_n_drop_panel} />}\r\n </GroupByDropPanel>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n translation\r\n } = this.props;\r\n\r\n return (\r\n <ExpandablePanel title={`${this.props.orderNumber}. ${translation.group_by_area_title}`}>\r\n {this.renderContent()}\r\n </ExpandablePanel>\r\n );\r\n }\r\n}\r\nexport const GroupByPanel = withCachedTranslation<GroupByPanelProps>(GroupByPanelComponent);\r\n","import { ReportDefinition, SelectionDefinition, FavouriteDefinition } from 'app/types-shared';\r\nimport { SelectionFieldItem, SelectionType } from './types-fields';\r\nimport { adjustToFiltersOptionValue } from 'app/area/reports/constants';\r\nimport { updateSelectedReport } from '../../selected-report';\r\n\r\nconst mapToSelectionDefinition = (item: SelectionFieldItem, id: number): SelectionDefinition => {\r\n const selection: SelectionDefinition = {\r\n id,\r\n domain: {\r\n v: item.field.value,\r\n d: item.field.description\r\n },\r\n type: {\r\n v: item.value.type\r\n },\r\n fillEmpty: !!item.value.fillEmpty ? 1 : 0,\r\n period: { v: 0 },\r\n setLevelAccToCond: false\r\n };\r\n\r\n if (item.value.sortOrderType) {\r\n selection.sortOrderType = { v: item.value.sortOrderType.value };\r\n }\r\n\r\n if (item.value.type === SelectionType.Interval) {\r\n selection.interval = item.value.interval;\r\n }\r\n\r\n if (item.value.type === SelectionType.Period && item.value.period) {\r\n selection.period = { v: item.value.period.value };\r\n }\r\n\r\n if (item.value.type === SelectionType.AggregateValue && item.value.level) {\r\n if (item.value.level.value === adjustToFiltersOptionValue) {\r\n selection.setLevelAccToCond = true;\r\n const aggregateValueSelection = !!item.selections && item.selections\r\n .find(s => s.type === SelectionType.AggregateValue && !!s.levels && s.levels.length > 1);\r\n if (!!aggregateValueSelection) {\r\n selection.levels = aggregateValueSelection.levels[1].value as number;\r\n }\r\n } else {\r\n selection.levels = item.value.level.value as number;\r\n }\r\n }\r\n\r\n if (item.value.type === SelectionType.AggregateCategory) {\r\n if (item.value.level.value === adjustToFiltersOptionValue) {\r\n selection.setLevelAccToCond = true;\r\n const aggregateCategorySelection = !!item.selections && item.selections\r\n .find(s => s.type === SelectionType.AggregateCategory && !!s.levels && s.levels.length > 1);\r\n if (!!aggregateCategorySelection) {\r\n selection.levels = aggregateCategorySelection.levels[1].value as number;\r\n }\r\n } else {\r\n selection.levels = item.value.level.value as number;\r\n }\r\n selection.selectedCode = !!item.value.category\r\n ? item.value.category.value as number\r\n : undefined;\r\n }\r\n\r\n return selection;\r\n};\r\n\r\nconst getRollingAverage = (selectedGroupByFields: SelectionFieldItem[]) => {\r\n if (!!selectedGroupByFields\r\n && selectedGroupByFields.length > 0\r\n ) {\r\n const firstSelection = selectedGroupByFields[0];\r\n if (firstSelection.value && firstSelection.value.type === SelectionType.Period) {\r\n return firstSelection.value.rollingAverage;\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\nconst updateReport = (report: ReportDefinition, updatedFields: Partial<ReportDefinition>) => {\r\n return {\r\n ...report,\r\n ...updatedFields\r\n };\r\n};\r\n\r\nexport const updateGroupBy = (\r\n definition: FavouriteDefinition, selectedGroupByFields: SelectionFieldItem[]\r\n) => {\r\n const report = definition.reports.find(r => r.report.v === definition.selectedReport.v);\r\n let returnedReport: ReportDefinition = {\r\n ...report\r\n };\r\n\r\n if (!!selectedGroupByFields) {\r\n returnedReport = updateReport(returnedReport, {\r\n selections: selectedGroupByFields\r\n .filter(s => s.value && s.value.type)\r\n .map((s, id) => ({\r\n ...mapToSelectionDefinition(s, id + 1)\r\n }))\r\n });\r\n }\r\n\r\n const rollingAverage = getRollingAverage(selectedGroupByFields);\r\n if (!!rollingAverage) {\r\n returnedReport = updateReport(returnedReport, { rollingAverage });\r\n } else {\r\n returnedReport = {\r\n ...returnedReport,\r\n rollingAverage: 0\r\n };\r\n }\r\n return updateSelectedReport(definition, returnedReport);\r\n};\r\n","import { deepEquals } from 'app/infrastructure/js';\r\nimport * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { actionCreators } from './actions';\r\nimport { selectionReportTranslations } from '../../constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinitionModification } from '../../types';\r\nimport { SelectionReportState } from '../../types-store';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { GroupByPanel } from '../../containers/group-by/components/group-by-panel';\r\nimport { updateGroupBy } from './map-to-definition';\r\n\r\ninterface GroupByContainerProps extends FavouriteDefinitionModification {\r\n orderNumber: string;\r\n disabled: boolean;\r\n}\r\n\r\nexport type GroupByContainerComponentProps = GroupByContainerProps\r\n & SelectionReportState & DefaultContainerProps & ReturnType<typeof actionCreators>;\r\n\r\nclass GroupByContainerComponent extends React.Component<GroupByContainerComponentProps> {\r\n public static statePath: string = STATE.selectionReport;\r\n\r\n private updateDefinition = () => {\r\n\r\n const transform = (workingDefinition: FavouriteDefinition) => {\r\n\r\n return updateGroupBy(\r\n workingDefinition,\r\n this.props.groupByFieldState.selectedGroupByFields\r\n );\r\n };\r\n\r\n this.props.updateDefinition(transform);\r\n }\r\n\r\n public componentDidUpdate(prevProps: GroupByContainerComponentProps) {\r\n\r\n if (!this.props.groupByFieldState.fetching\r\n && !deepEquals(prevProps.groupByFieldState.selectedGroupByFields, this.props.groupByFieldState.selectedGroupByFields)) {\r\n this.updateDefinition();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n const layoutType = !!this.props.chartState.layoutTypes\r\n && this.props.chartState.layoutTypes.find(lt => lt.type.v === this.props.chartState.selectedLayoutType);\r\n return <GroupByPanel\r\n disabled={this.props.disabled}\r\n orderNumber={this.props.orderNumber}\r\n fetching={this.props.groupByFieldState.fetching}\r\n data={this.props.groupByFieldState}\r\n onLoadGroupByFields={this.props.loadGroupByFields}\r\n onUpdateDefaultGroupByFields={this.props.updateDefaultGroupByFields}\r\n onSelectGroupBy={this.props.loadGroupBySelections}\r\n onModifyGroupBySelections={this.props.modifyGroupBySelections}\r\n translation={this.props.translation}\r\n maxSelectionCriteria={!!layoutType && layoutType.maxSelectionCriteria}\r\n />;\r\n }\r\n}\r\n\r\nconst container = (api) =>\r\n containerFactory(GroupByContainerComponent, actionCreators(api), undefined, selectionReportTranslations) as any;\r\n\r\nexport { container as GroupByContainerForApi };\r\n","import { FavouriteDefinition } from 'app/types-shared';\r\nimport { FieldItem } from 'app/area/reports/types';\r\n\r\nexport const targetState = (workingDefinition: FavouriteDefinition): FieldItem => {\r\n const reportId = workingDefinition.selectedReport && workingDefinition.selectedReport.v;\r\n const report = workingDefinition.reports.find(r => r.report.v === reportId);\r\n return !!report && !!report.targetApp && report.targetApp.v !== 0 && {\r\n value: report.targetApp.v,\r\n description: report.targetApp.d\r\n };\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { FavouriteDefinition, ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { FieldItem, DomainNode } from '../../types';\r\nimport * as actions from './action-types';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { targetState } from './map-to-store';\r\nimport { ReportCommonApi } from 'app/area/reports/types-api';\r\n\r\nexport const domainNodeToComplexType = (dn: DomainNode): FieldItem => {\r\n return {\r\n value: dn.domain,\r\n description: dn.label,\r\n descendants: !!dn.children ? dn.children.map(domainNodeToComplexType) : undefined\r\n };\r\n};\r\n\r\nconst fieldDoesntExistInDefaults = (fieldItems: FieldItem[], field: FieldItem) => {\r\n return !fieldItems.some(f => f.value === field.value);\r\n};\r\n\r\nconst getAggregationTypeId = (appState: ApplicationState) => {\r\n const { selectionReport: { aggregateFieldState: { selectedAggregateField } } } = appState;\r\n return !!selectedAggregateField && !!selectedAggregateField.value && selectedAggregateField.value.value;\r\n};\r\n\r\nexport const actionCreators = (api: ReportCommonApi) => {\r\n\r\n return {\r\n clearState: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearTargetState());\r\n },\r\n clearValue: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RemoveTargetField());\r\n },\r\n setInitialData: (definition: FavouriteDefinition): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const target = targetState(definition);\r\n if (!!target) {\r\n dispatch(\r\n actionCreators(api).onSelectField(target, false)\r\n );\r\n }\r\n },\r\n onSelectField: (selectedField: FieldItem, fetchDefaults: boolean = true): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n const state = getState().selectionReport;\r\n if (fieldDoesntExistInDefaults(state.targetFieldState.defaultFields, selectedField)) {\r\n dispatch(new actions.UpdateTargetDefaultFields([...state.targetFieldState.defaultFields, selectedField]));\r\n }\r\n \r\n dispatch(new actions.SetTargetField(selectedField));\r\n }),\r\n loadDefaultFields: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n \r\n dispatch(new actions.RequestTargetDefaultFields());\r\n const aggregationTypeId = getAggregationTypeId(getState());\r\n if (aggregationTypeId) {\r\n const codetables = await api.loadTargetDefaultFields(aggregationTypeId as number);\r\n const options = codetables.data.rootCodes.map(codeItemToStoreValue);\r\n dispatch(new actions.ResponseTargetDefaultFields(options));\r\n } \r\n }),\r\n loadFields: (query?: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n const aggregationTypeId = getAggregationTypeId(getState());\r\n if (aggregationTypeId) {\r\n const codetables = await api.loadTargetFields(aggregationTypeId as number, query);\r\n const options = codetables.data.rootCodes.map(codeItemToStoreValue);\r\n dispatch(new actions.ResponseTargetFields(options));\r\n } else {\r\n dispatch(new actions.ResponseTargetFields([]));\r\n }\r\n }),\r\n updateDefaultFields: (fieldItems: FieldItem[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.UpdateTargetDefaultFields(fieldItems));\r\n })\r\n };\r\n};\r\n","import { FavouriteDefinition } from 'app/types-shared';\r\nimport { FieldItem } from '../../types';\r\nimport { updateSelectedReport } from '../../selected-report';\r\n\r\nexport const updateTarget = (definition: FavouriteDefinition,\r\n selectedField: FieldItem): FavouriteDefinition => {\r\n\r\n const updatedReportFields = !!selectedField\r\n ? {\r\n targetApp: {\r\n v: selectedField.value,\r\n d: selectedField.description\r\n }\r\n }\r\n : {\r\n targetApp: undefined\r\n };\r\n return updateSelectedReport(definition, updatedReportFields);\r\n};\r\n","import * as React from 'react';\r\nimport { DropdownItem } from 'ui/common/dropdown-menu/dropdown-menu-item';\r\nimport { ExpandableBox } from '../../../components/expandable-box';\r\nimport { FieldItem } from 'app/area/reports/types';\r\n\r\ninterface TargetFieldComponentProps {\r\n selectedField: FieldItem;\r\n onRemove: () => void;\r\n textRemove: string;\r\n}\r\n\r\nclass TargetFieldComponent extends React.Component<TargetFieldComponentProps, {}> {\r\n private menuItemsForAggregation = (): DropdownItem[] => {\r\n const handleOnRemove = () => {\r\n this.props.onRemove();\r\n };\r\n return [{\r\n value: '1',\r\n description: this.props.textRemove,\r\n onClick: handleOnRemove\r\n }];\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectedField\r\n } = this.props;\r\n\r\n return (<ExpandableBox title={selectedField.description}\r\n menuItems={this.menuItemsForAggregation()} />);\r\n }\r\n}\r\n\r\nexport const TargetField = TargetFieldComponent;\r\n","import * as React from 'react';\r\nimport { ExpandablePanel, ElementLoader } from 'ui';\r\nimport { ItemTypes, FieldItem } from '../../../types';\r\nimport { dropPanelForItemType } from '../../../components/drop-panel';\r\nimport { dragPanelForItemType } from '../../../components/drag-panel';\r\nimport { ButtonSelectMultipleDialog } from '../../../components/button-select-multiple-dialog';\r\nimport { DropArea } from '../../../components/drop-area';\r\nimport styles from '../../dnd.scss';\r\nimport { TargetState } from '../types-store';\r\nimport { TargetField } from './target-field';\r\nimport { withCachedTranslation } from 'app/components/enhancers/with-cached-translation';\r\n\r\nconst TargetDropPanel = dropPanelForItemType(ItemTypes.TARGET_FIELD);\r\n\r\nconst TargetDragField = dragPanelForItemType(ItemTypes.TARGET_FIELD);\r\n\r\nexport interface TargetPanelTexts {\r\n target_title: string;\r\n target_area_title: string;\r\n target_field_info: string;\r\n target_btn_open_dialog: string;\r\n target_dialog_title: string;\r\n target_done: string;\r\n target_drag_n_drop: string;\r\n target_remove: string;\r\n target_options_not_found: string;\r\n target_search: string;\r\n}\r\n\r\nexport interface TargetPanelComponentProps {\r\n orderNumber: string;\r\n disabled: boolean;\r\n fetching: boolean;\r\n\r\n data: TargetState;\r\n\r\n onLoadFields: () => void;\r\n onUpdateDefaultFields: (items: FieldItem[]) => void;\r\n onSelect: (selectedField: FieldItem) => void;\r\n onRemove: () => void;\r\n translation: TargetPanelTexts;\r\n}\r\n\r\nclass TargetPanelComponent extends React.PureComponent<TargetPanelComponentProps> {\r\n\r\n private handleOnSelect = (items: FieldItem[]) => {\r\n const defaultFields = this.props.data.defaultFields.map(f => f.value);\r\n const removedRedundandItems = items.filter(i => defaultFields.indexOf(i.value) === -1).map(i => ({added:true, ...i}));\r\n this.props.onUpdateDefaultFields([\r\n ...this.props.data.defaultFields,\r\n ...removedRedundandItems\r\n ]);\r\n }\r\n\r\n private onSelectField = (field: FieldItem) => {\r\n this.props.onSelect(field);\r\n }\r\n\r\n public renderContent() {\r\n const {\r\n data: {\r\n defaultFields = [],\r\n additionalFields = [],\r\n selectedField\r\n },\r\n onLoadFields,\r\n translation,\r\n disabled\r\n } = this.props;\r\n\r\n const selectedFieldValue = selectedField && selectedField.value;\r\n return <div className=\"row\">\r\n <div className=\"col-6\">\r\n <ul className={styles.dragTagContainer}>\r\n {defaultFields.map(item => {\r\n const isSelected = selectedFieldValue === item.value;\r\n return <TargetDragField\r\n key={item.value}\r\n className={styles.dragTag}\r\n field={item}\r\n isSelected={isSelected}\r\n onSelect={this.onSelectField}\r\n onRemove={this.props.onRemove}\r\n />;\r\n })}\r\n <ButtonSelectMultipleDialog\r\n disabled={disabled}\r\n className={styles.dragTag}\r\n options={additionalFields}\r\n placeholder={translation.target_search}\r\n textButtonAdd={`+ ${translation.target_btn_open_dialog}`}\r\n textTitle={translation.target_dialog_title}\r\n textDone={translation.target_done}\r\n textConfirm={translation.target_done}\r\n textOptionsNotFound={translation.target_options_not_found}\r\n onLoadOptions={onLoadFields}\r\n onSelect={this.handleOnSelect}\r\n />\r\n </ul>\r\n </div>\r\n <div className=\"col-6\">\r\n <TargetDropPanel\r\n className={styles.dropBox}\r\n addItem={this.onSelectField}\r\n >\r\n {selectedField ? <TargetField\r\n selectedField={selectedField}\r\n onRemove={this.props.onRemove}\r\n textRemove={this.props.translation.target_remove}\r\n />\r\n : <DropArea text={translation.target_drag_n_drop} />\r\n }\r\n </TargetDropPanel>\r\n </div>\r\n </div>;\r\n }\r\n public render(): JSX.Element {\r\n const {\r\n translation\r\n } = this.props;\r\n\r\n return <ExpandablePanel title={`${this.props.orderNumber}. ${translation.target_area_title}`}>\r\n {this.props.fetching\r\n ? <ElementLoader />\r\n : this.renderContent()}\r\n </ExpandablePanel>;\r\n }\r\n}\r\n\r\nexport const TargetPanel = withCachedTranslation<TargetPanelComponentProps>(TargetPanelComponent);\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { actionCreators } from './actions';\r\nimport { selectionReportTranslations } from '../../constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinitionModification } from '../../types';\r\nimport { SelectionReportState } from '../../types-store';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { updateTarget } from './map-to-definition';\r\nimport { TargetPanel } from 'app/area/reports/containers/target/components/target-panel';\r\n\r\ninterface TargetContainerProps extends FavouriteDefinitionModification { \r\n orderNumber: string;\r\n disabled: boolean;\r\n}\r\n\r\nexport type TargetContainerComponentProps = TargetContainerProps\r\n & SelectionReportState & DefaultContainerProps & ReturnType<typeof actionCreators>;\r\n\r\nclass TargetContainerComponent extends React.Component<TargetContainerComponentProps> {\r\n public static statePath: string = STATE.selectionReport;\r\n\r\n private updateDefinition = () => {\r\n\r\n const transform = (workingDefinition: FavouriteDefinition) => {\r\n\r\n return updateTarget(\r\n workingDefinition,\r\n this.props.targetFieldState.selectedField\r\n );\r\n };\r\n\r\n this.props.updateDefinition(transform);\r\n }\r\n\r\n public componentDidUpdate(prevProps: TargetContainerComponentProps) {\r\n\r\n if (!deepEquals(prevProps.targetFieldState.selectedField,\r\n this.props.targetFieldState.selectedField)) {\r\n this.updateDefinition();\r\n }\r\n }\r\n\r\n public render() {\r\n return (<TargetPanel\r\n disabled={this.props.disabled}\r\n orderNumber={this.props.orderNumber}\r\n fetching={this.props.targetFieldState.fetching}\r\n data={this.props.targetFieldState}\r\n onLoadFields={this.props.loadFields}\r\n onUpdateDefaultFields={this.props.updateDefaultFields}\r\n onRemove={this.props.clearValue}\r\n onSelect={this.props.onSelectField}\r\n translation={this.props.translation}\r\n />);\r\n }\r\n}\r\n\r\nconst containerFor = (api) =>\r\n containerFactory(TargetContainerComponent, actionCreators(api), undefined, selectionReportTranslations) as any;\r\n\r\nexport { containerFor as TargetContainerForApi };\r\n","import { FavouriteDefinition } from 'app/types-shared';\r\n\r\nexport const getLayoutType = (workingDefinition: FavouriteDefinition): number => {\r\n const reportId = workingDefinition.selectedReport && workingDefinition.selectedReport.v;\r\n const report = workingDefinition.reports.find(r => r.report.v === reportId);\r\n\r\n return !!report && report.layoutType && report.layoutType.v;\r\n};\r\n","import { errorSafe } from 'app/infrastructure/redux';\r\nimport * as actions from './action-types';\r\nimport { reportLayoutTypeContext } from '../../constants';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching, FavouriteDefinition } from 'app/types-shared';\r\nimport {\r\n RequestExecuteFavourite,\r\n ReceiveExecuteFavourite,\r\n FailExecuteFavourite\r\n} from './action-types';\r\nimport * as routerActions from 'app/area/shared/navigation';\r\n\r\nimport { getLayoutType } from './map-to-store';\r\nimport { ReportCommonApi } from 'app/area/reports/types-api';\r\nimport { DrillDownModel } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const actionCreators = (api: ReportCommonApi) => {\r\n return {\r\n fetchingStart: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.FetchingExecuteStart());\r\n }),\r\n fetchingEnd: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n const areaState = getState().selectionReport;\r\n if (areaState.chartState.fetchingExecute) {\r\n dispatch(new actions.FetchingExecuteEnd());\r\n }\r\n }),\r\n clearState: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearSelectionReportState());\r\n }),\r\n initializationStart: (): ActionDispatching<any, any> => async (\r\n dispatch: any,\r\n getState: any\r\n ) => {\r\n dispatch(new actions.InitializationDataStart());\r\n },\r\n initializationEnd: (): ActionDispatching<any, any> => async (\r\n dispatch: any,\r\n getState: any\r\n ) => {\r\n dispatch(new actions.InitializationDataEnd());\r\n },\r\n setInitialLayoutType: (\r\n workingDefinition: FavouriteDefinition\r\n ): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n const reportId =\r\n workingDefinition.selectedReport &&\r\n workingDefinition.selectedReport.v;\r\n const report = workingDefinition.reports.find(\r\n r => r.report.v === reportId\r\n );\r\n\r\n const layoutType = getLayoutType(workingDefinition);\r\n\r\n const listOfActions = [];\r\n if (!!layoutType || layoutType === 0) {\r\n listOfActions.push(\r\n dispatch(\r\n new actions.SetLayoutType(layoutType === 0 ? 1 : layoutType)\r\n )\r\n );\r\n }\r\n\r\n listOfActions.push(\r\n dispatch(actionCreators(api).loadLayoutTypes(report.report.v))\r\n );\r\n await Promise.all(listOfActions);\r\n }),\r\n\r\n loadLayoutTypes: (reportId: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestLayoutTypes());\r\n const result = await api.loadLayoutTypes(reportId);\r\n dispatch(new actions.ResponseLayoutTypes(result.data));\r\n }),\r\n setLayoutType: (type: number): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.SetLayoutType(type));\r\n }),\r\n favouriteNotValid: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n const areaState = getState().selectionReport;\r\n if (areaState.chartState.favouriteValid) {\r\n dispatch(new actions.FavouriteNotValid());\r\n }\r\n }),\r\n executeFavourite: (\r\n definition: FavouriteDefinition\r\n ): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch, getState: () => ApplicationState) => {\r\n dispatch(new RequestExecuteFavourite());\r\n\r\n const areaState = getState().selectionReport;\r\n const requestId = areaState.chartState.executeRequestId;\r\n\r\n const {\r\n favourite: { v: favouriteId },\r\n selectedReport: { v: reportId }\r\n } = definition; \r\n\r\n try {\r\n const layoutModel = await api.reportLayout(\r\n favouriteId,\r\n reportId,\r\n areaState.chartState.selectedLayoutType,\r\n reportLayoutTypeContext\r\n );\r\n\r\n const favourite = await api.executeFavourite(definition);\r\n\r\n dispatch(\r\n new ReceiveExecuteFavourite(favourite, layoutModel, requestId)\r\n );\r\n } catch (e) { \r\n const areaStateAfterFetching = getState().selectionReport; \r\n if( areaStateAfterFetching.chartState.executeRequestId === requestId ){ \r\n dispatch(new FailExecuteFavourite(!!e.userMessages && e.userMessages.map(m=>m.message)));\r\n } \r\n }\r\n }),\r\n drillDownToCaseListing: (\r\n mainFavouriteId: number,\r\n containerFavouriteId: number,\r\n drillDownModel: DrillDownModel\r\n ): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch, getState) => {\r\n const result = await api.drillDown(\r\n mainFavouriteId,\r\n containerFavouriteId,\r\n drillDownModel\r\n );\r\n\r\n routerActions.toCaseListing(result.favourite);\r\n })\r\n };\r\n};\r\n","export enum LayoutAttributes {\r\n fieldLabels = 1,\r\n quantities,\r\n groups,\r\n suppressRepeatingRows,\r\n wideLayout,\r\n totals,\r\n xAxisLabelsEnabled,\r\n yAxisLabelsEnabled\r\n}\r\n\r\nexport interface AttributesPickerTranslation {\r\n attribute_field_labels: string;\r\n attribute_quantities: string;\r\n attribute_groups: string;\r\n attribute_wide_layout: string;\r\n attribute_totals: string;\r\n attribute_suppress_repeating_rows: string;\r\n attribute_xAxis_labels_enabled: string;\r\n attribute_yAxis_labels_enabled: string;\r\n show_label: string;\r\n}\r\n","// tslint:disable:jsx-no-lambda \r\n// tslint:disable:react-this-binding-issue\r\nimport * as React from 'react';\r\nimport styles from './choose-chart-type.scss';\r\nimport { Tooltip } from 'ui/common/tooltip/tooltip';\r\nimport { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\nimport { LayoutType } from '../types-store';\r\n\r\nexport interface ChooseChartTypeTranslation {\r\n choose_chart_type_limit_message_singular: string;\r\n choose_chart_type_limit_message_plural: string;\r\n}\r\n\r\ninterface ChooseChartTypeComponentProps {\r\n amountOfSelectionCriterias: number;\r\n selectedLayoutType: number;\r\n layoutTypes: LayoutType[];\r\n onSetLayoutType: (type: number) => void;\r\n translations: ChooseChartTypeTranslation;\r\n}\r\n\r\nclass ChooseChartTypeComponent extends React.Component<ChooseChartTypeComponentProps, {}> {\r\n private tooltipMessage = (lt: LayoutType) => {\r\n const { translations } = this.props;\r\n const layoutType = lt.type.d;\r\n const amount = lt.maxSelectionCriteria;\r\n const text = lt.maxSelectionCriteria > 1\r\n ? translations.choose_chart_type_limit_message_plural\r\n : translations.choose_chart_type_limit_message_singular;\r\n return text.replace('<LAYOUT_TYPE>', layoutType).replace('<AMOUNT>', String(amount));\r\n }\r\n private setLayoutType = (lt: LayoutType) => {\r\n if (this.props.amountOfSelectionCriterias <= lt.maxSelectionCriteria) {\r\n this.props.onSetLayoutType(lt.type.v);\r\n }\r\n }\r\n private renderLayoutTypeBlock = (lt: LayoutType) => {\r\n const disabled = this.props.amountOfSelectionCriterias > lt.maxSelectionCriteria;\r\n const uniqueId = `chart-type-${lt.type.d.replace(/\\s/g, '')}`;\r\n\r\n const content = <div key={lt.type.v} title={lt.type.d} className={styles.chartOption}>\r\n <input\r\n type=\"radio\"\r\n className=\"visuallyhidden\"\r\n name=\"select-chart-type\"\r\n id={uniqueId}\r\n value={lt.type.v}\r\n onChange={() => this.setLayoutType(lt)}\r\n checked={this.props.selectedLayoutType === lt.type.v}\r\n disabled={disabled}\r\n />\r\n\r\n <label htmlFor={uniqueId}>\r\n <span className=\"visuallyhidden\">{lt.type.d}</span>\r\n {lt.iconUrl ? <img src={toAbsoluteUrl(lt.iconUrl)} /> : !!lt.type && !!lt.type.d && lt.type.d}\r\n </label>\r\n </div>;\r\n\r\n return !!disabled\r\n ? <Tooltip key={lt.type.v} className=\"\" title={this.tooltipMessage(lt)}>{content}</Tooltip>\r\n : content;\r\n }\r\n public render(): JSX.Element {\r\n\r\n const { layoutTypes } = this.props;\r\n\r\n if (!layoutTypes) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div className={`btn-group ${styles.chartSelector}`}>\r\n {layoutTypes.map(lt => this.renderLayoutTypeBlock(lt))}\r\n </div>);\r\n }\r\n}\r\n\r\nexport const ChooseChartType = ChooseChartTypeComponent;\r\n","import { LayoutAttributes } from './types';\r\n\r\n// Tile\r\nexport const tileOptions = [\r\n { description: 'attribute_field_labels', value: LayoutAttributes.fieldLabels },\r\n { description: 'attribute_quantities', value: LayoutAttributes.quantities },\r\n { description: 'attribute_groups', value: LayoutAttributes.groups },\r\n { description: 'attribute_wide_layout', value: LayoutAttributes.wideLayout },\r\n { description: 'attribute_totals', value: LayoutAttributes.totals }\r\n];\r\nexport const tileAttributeMappings = {\r\n compactView: 'Tile.CompactView',\r\n hideAggrColumns: 'Tile.HideAggrColumns',\r\n hideHeader: 'Tile.HideHeader',\r\n wideLayout: 'Tile.WideLayout',\r\n hideTotals: 'Tile.HideTotals'\r\n};\r\n\r\n// Table\r\nexport const tableOptions = [\r\n { description: 'attribute_field_labels', value: LayoutAttributes.fieldLabels },\r\n { description: 'attribute_quantities', value: LayoutAttributes.quantities },\r\n { description: 'attribute_groups', value: LayoutAttributes.groups },\r\n { description: 'attribute_totals', value: LayoutAttributes.totals },\r\n { description: 'attribute_suppress_repeating_rows', value: LayoutAttributes.suppressRepeatingRows }\r\n];\r\nexport const tableAttributeMappings = {\r\n suppressRepeatingRows: 'Table.SuppressRepeatingRows',\r\n compactView: 'Table.CompactView',\r\n hideAggrColumns: 'Table.HideAggrColumns',\r\n hideHeader: 'Table.HideHeader',\r\n hideTotals: 'Table.HideTotals'\r\n};\r\n\r\n// Heatmap\r\nexport const heatmapOptions = [\r\n { description: 'attribute_yAxis_labels_enabled', value: LayoutAttributes.yAxisLabelsEnabled },\r\n { description: 'attribute_xAxis_labels_enabled', value: LayoutAttributes.xAxisLabelsEnabled }\r\n];\r\nexport const heatmapAttributeMappings = {\r\n xAxisLabelsEnabled: 'Highcharts.xAxis.labels.enabled',\r\n yAxisLabelsEnabled: 'Highcharts.yAxis.labels.enabled'\r\n};\r\n\r\nexport const heatmapType = 'HighchartsStyle.heatmapUseDataPointColors';\r\n\r\nexport type AttributeMappingType = Partial<typeof tileAttributeMappings & typeof tableAttributeMappings & typeof heatmapAttributeMappings>;\r\n","import { ComplexValue } from 'ui';\r\nimport { AttributeMappingType } from './constants';\r\nimport { LayoutAttributes } from './types';\r\n\r\nexport const mapLayoutAttributesToOptions = (layoutAttributes: { [key: string]: string | boolean },\r\n allOptions: ComplexValue<any>[],\r\n mapping: AttributeMappingType) => {\r\n return allOptions\r\n .filter(item => {\r\n switch (item.value) {\r\n case LayoutAttributes.fieldLabels:\r\n return !!mapping.hideHeader && !layoutAttributes[mapping.hideHeader];\r\n case LayoutAttributes.quantities:\r\n return !!mapping.hideAggrColumns && !layoutAttributes[mapping.hideAggrColumns];\r\n case LayoutAttributes.groups:\r\n return !!mapping.compactView && layoutAttributes[mapping.compactView];\r\n case LayoutAttributes.wideLayout:\r\n return !!mapping.wideLayout && layoutAttributes[mapping.wideLayout];\r\n case LayoutAttributes.totals:\r\n return !!mapping.hideTotals && !layoutAttributes[mapping.hideTotals];\r\n case LayoutAttributes.suppressRepeatingRows:\r\n return !!mapping.suppressRepeatingRows && layoutAttributes[mapping.suppressRepeatingRows];\r\n case LayoutAttributes.xAxisLabelsEnabled:\r\n return !!mapping.xAxisLabelsEnabled &&\r\n (layoutAttributes[mapping.xAxisLabelsEnabled] || layoutAttributes[mapping.xAxisLabelsEnabled] === undefined);\r\n case LayoutAttributes.yAxisLabelsEnabled:\r\n return !!mapping.yAxisLabelsEnabled &&\r\n (layoutAttributes[mapping.yAxisLabelsEnabled] || layoutAttributes[mapping.yAxisLabelsEnabled] === undefined);\r\n default:\r\n return false;\r\n }\r\n });\r\n};\r\n","import { ComplexValue } from 'ui';\r\nimport { AttributeMappingType } from './constants';\r\nimport { LayoutAttributes } from './types';\r\n\r\nexport const mapOptionsToLayoutAttributes = (options: ComplexValue<any>[],\r\n mapping: AttributeMappingType): { [key: string]: string | boolean } => {\r\n return {\r\n ...(!!mapping.hideHeader && {\r\n [mapping.hideHeader]: !options.some(o => o.value === LayoutAttributes.fieldLabels)\r\n }),\r\n ...(!!mapping.hideAggrColumns && {\r\n [mapping.hideAggrColumns]: !options.some(o => o.value === LayoutAttributes.quantities)\r\n }),\r\n ...(!!mapping.compactView && {\r\n [mapping.compactView]: options.some(o => o.value === LayoutAttributes.groups)\r\n }),\r\n ...(!!mapping.suppressRepeatingRows && {\r\n [mapping.suppressRepeatingRows]: options.some(o => o.value === LayoutAttributes.suppressRepeatingRows)\r\n }),\r\n ...(!!mapping.wideLayout && {\r\n [mapping.wideLayout]: options.some(o => o.value === LayoutAttributes.wideLayout)\r\n }),\r\n ...(!!mapping.hideTotals && {\r\n [mapping.hideTotals]: !options.some(o => o.value === LayoutAttributes.totals)\r\n }),\r\n ...(!!mapping.xAxisLabelsEnabled && {\r\n [mapping.xAxisLabelsEnabled]: options.some(o => o.value === LayoutAttributes.xAxisLabelsEnabled)\r\n }),\r\n ...(!!mapping.yAxisLabelsEnabled && {\r\n [mapping.yAxisLabelsEnabled]: options.some(o => o.value === LayoutAttributes.yAxisLabelsEnabled)\r\n })\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue } from 'ui';\r\nimport { mapLayoutAttributesToOptions } from './map-to-options';\r\nimport { mapOptionsToLayoutAttributes } from './map-to-attributes';\r\nimport { FlatOptions } from 'ui/common/select/flat-options/flat-options';\r\nimport { SelectType } from 'ui/common/select/types';\r\nimport { AttributeMappingType } from './constants';\r\nimport { AttributesPickerTranslation } from './types';\r\n\r\nimport styles from './attributes-selector.scss';\r\n\r\nexport interface LayoutAttributesSelectorProps {\r\n options: ComplexValue<any>[];\r\n attributesMapping: AttributeMappingType;\r\n layoutAttributes: { [key: string]: string | boolean };\r\n onChange: (value: { [key: string]: string | boolean }) => void;\r\n translations: AttributesPickerTranslation;\r\n}\r\n\r\nexport class LayoutAttributesSelector extends React.PureComponent<LayoutAttributesSelectorProps> {\r\n\r\n private onChange = (option: ComplexValue<any>) => {\r\n\r\n const { options, attributesMapping, layoutAttributes } = this.props;\r\n const valueItems = mapLayoutAttributesToOptions(layoutAttributes, options, attributesMapping);\r\n\r\n const newValueItems = valueItems.some(i => i.value === option.value)\r\n ? valueItems.filter(i => i.value !== option.value)\r\n : [\r\n ...valueItems,\r\n option\r\n ];\r\n\r\n this.props.onChange(mapOptionsToLayoutAttributes(newValueItems, this.props.attributesMapping));\r\n }\r\n\r\n public render() {\r\n\r\n const { options, attributesMapping, layoutAttributes, translations } = this.props;\r\n\r\n const translatedOptions = options.map(item => ({\r\n value: item.value,\r\n ...(!!item.description && { description: translations[item.description] })\r\n }));\r\n\r\n return <div className=\"attributeselector\">\r\n <span className={styles.showLabel}>{translations.show_label}</span>\r\n <FlatOptions\r\n options={translatedOptions}\r\n valueItems={mapLayoutAttributesToOptions(layoutAttributes, options, attributesMapping)}\r\n showIcons={false}\r\n selectType={SelectType.multiple}\r\n onSelectOption={this.onChange}\r\n />\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { PresentationType } from 'app/components/favourite-layout';\r\nimport {\r\n tableOptions, tileOptions, tileAttributeMappings, tableAttributeMappings,\r\n heatmapType, heatmapOptions, heatmapAttributeMappings\r\n} from './constants';\r\nimport { LayoutAttributesSelector } from './attributes-selector';\r\nimport { AttributesPickerTranslation } from './types';\r\n\r\nexport interface AttributesPickerProps {\r\n presentationType: number;\r\n layoutAttributes: { [key: string]: string | boolean };\r\n onAttributeChange: (value: { [key: string]: string | boolean }) => void;\r\n translations: AttributesPickerTranslation;\r\n}\r\n\r\nexport const AttributesPicker = (props: AttributesPickerProps) => {\r\n\r\n if (props.presentationType === PresentationType.Table) {\r\n return <LayoutAttributesSelector\r\n options={tableOptions}\r\n attributesMapping={tableAttributeMappings}\r\n layoutAttributes={props.layoutAttributes}\r\n onChange={props.onAttributeChange}\r\n translations={props.translations}\r\n />;\r\n }\r\n\r\n if (props.presentationType === PresentationType.Tile) {\r\n return <LayoutAttributesSelector\r\n options={tileOptions}\r\n attributesMapping={tileAttributeMappings}\r\n layoutAttributes={props.layoutAttributes}\r\n onChange={props.onAttributeChange}\r\n translations={props.translations}\r\n />;\r\n }\r\n\r\n if (props.presentationType === PresentationType.Highcharts\r\n && props.layoutAttributes[heatmapType]) {\r\n return <LayoutAttributesSelector\r\n options={heatmapOptions}\r\n attributesMapping={heatmapAttributeMappings}\r\n layoutAttributes={props.layoutAttributes}\r\n onChange={props.onAttributeChange}\r\n translations={props.translations}\r\n />;\r\n }\r\n\r\n return null;\r\n};\r\n","import * as React from 'react';\r\nimport { ElementLoader } from 'ui';\r\nimport { ChooseChartType } from './choose-chart-type';\r\nimport { AttributesPicker } from './attributes';\r\nimport { LayoutType } from '../types-store';\r\nimport styles from '../../../selection-report.scss';\r\n\r\ninterface ReportAreaComponentProps {\r\n fetchingExecute: boolean;\r\n layoutTypes: LayoutType[];\r\n selectedLayoutType?: number;\r\n presentationType: number;\r\n layoutAttributes: { [key: string]: string | boolean };\r\n amountOfSelectionCriterias: number;\r\n translation: any;\r\n onSetLayoutType: (type: number) => void;\r\n onAttributeChange: (value: { [key: string]: string | boolean }) => void;\r\n}\r\n\r\nclass ReportAreaComponent extends React.Component<ReportAreaComponentProps> {\r\n public render(): JSX.Element {\r\n return (<div className={`${styles.selectionReport} report-view`}>\r\n <ChooseChartType\r\n amountOfSelectionCriterias={this.props.amountOfSelectionCriterias}\r\n selectedLayoutType={this.props.selectedLayoutType}\r\n layoutTypes={this.props.layoutTypes}\r\n onSetLayoutType={this.props.onSetLayoutType}\r\n translations={this.props.translation}\r\n />\r\n <AttributesPicker\r\n presentationType={this.props.presentationType}\r\n layoutAttributes={this.props.layoutAttributes}\r\n onAttributeChange={this.props.onAttributeChange}\r\n translations={this.props.translation}\r\n />\r\n {this.props.fetchingExecute\r\n ? <ElementLoader />\r\n : this.props.children}\r\n </div>);\r\n }\r\n}\r\n\r\nexport const ReportArea = ReportAreaComponent;\r\n","import * as React from 'react';\r\n\r\ninterface ErrorBoundariesComponentProps {\r\n data?: any;\r\n}\r\ninterface ErrorBoundariesComponentState {\r\n hasError: boolean;\r\n}\r\n\r\nclass ErrorBoundariesComponent extends React.Component<\r\n ErrorBoundariesComponentProps,\r\n ErrorBoundariesComponentState\r\n > {\r\n public state: ErrorBoundariesComponentState = {\r\n hasError: false\r\n };\r\n\r\n public componentDidUpdate(prevProps: ErrorBoundariesComponentProps) {\r\n if (!!this.props.data && this.props.data !== prevProps.data) {\r\n this.setState({\r\n hasError: false\r\n });\r\n }\r\n }\r\n\r\n public componentDidCatch(error: any, info: any) {\r\n\r\n this.setState({ hasError: true });\r\n\r\n }\r\n public render() {\r\n if (this.state.hasError) {\r\n // You can render any custom fallback UI\r\n return <h1>It's known bug, chart can't be rendered</h1>;\r\n }\r\n return this.props.children;\r\n }\r\n}\r\n\r\nexport const ErrorBoundaries = ErrorBoundariesComponent;\r\n","import * as React from 'react';\r\nimport * as routeUrls from 'app/area/shared/route-urls';\r\nimport {\r\n isPresentationTypeSupported,\r\n createFavouriteComponent\r\n} from 'app/components/favourite-layout';\r\nimport { ErrorBoundaries } from './error-boundarie';\r\nimport { LayoutType } from '../types-store';\r\nimport styles from '../../../selection-report.scss';\r\nimport { FavouriteDataModel } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\nimport { DrillDownCallback } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\nimport { FavouriteLayoutComponentProps } from 'app/components/favourite-layout/types';\r\n\r\nexport interface SelectionReportContainerProps {\r\n layoutTypes: LayoutType[];\r\n selectedLayoutType?: number;\r\n amountOfSelectionCriteria: number;\r\n selectionReport: FavouriteDataModel;\r\n layoutAttributes: { [key: string]: string | boolean };\r\n presentationType: number;\r\n drillDown: DrillDownCallback;\r\n intl: any;\r\n translation: any;\r\n}\r\n\r\nclass SelectionReportContainer extends React.Component<SelectionReportContainerProps, {}> {\r\n\r\n private caseview = (caseNumber: number) => routeUrls.toCaseView(caseNumber);\r\n\r\n public render() {\r\n const {\r\n selectionReport,\r\n intl,\r\n translation,\r\n layoutTypes,\r\n amountOfSelectionCriteria,\r\n selectedLayoutType,\r\n presentationType,\r\n layoutAttributes\r\n } = this.props;\r\n\r\n if (!selectionReport) {\r\n return null;\r\n }\r\n const layoutType = !!layoutTypes && layoutTypes.find(f => f.type.v === selectedLayoutType);\r\n if (!!layoutType && amountOfSelectionCriteria > layoutType.maxSelectionCriteria) {\r\n return <p>\r\n {this.props.translation.result_cannnot_be_displayed + ': ' +\r\n + layoutType.maxSelectionCriteria}\r\n </p>;\r\n }\r\n\r\n const favouriteProps: FavouriteLayoutComponentProps = {\r\n layoutAttributes: layoutAttributes,\r\n favouriteDataModel: selectionReport,\r\n drillDown: this.props.drillDown,\r\n caseview: this.caseview,\r\n intl: intl,\r\n translation: translation\r\n };\r\n\r\n if (!isPresentationTypeSupported(presentationType)) {\r\n return <div>\r\n {`${translation.favourite_unsupported_presentation_type} ${presentationType}`}\r\n </div>;\r\n }\r\n else {\r\n return <ErrorBoundaries data={this.props.selectionReport}>\r\n <div className={styles.tableWrapper}>\r\n {createFavouriteComponent(presentationType, favouriteProps, undefined)}\r\n </div>\r\n </ErrorBoundaries>;\r\n }\r\n }\r\n}\r\n\r\nexport { SelectionReportContainer as SelectionReportChart };\r\n","import { FavouriteDefinition, FavouriteLayoutAttributes } from 'app/types-shared';\r\nimport { reportLayoutTypeContext } from '../../constants';\r\nimport { updateSelectedReport } from '../../selected-report';\r\n\r\nexport const updateLayoutType = (definition: FavouriteDefinition, layoutType: number): FavouriteDefinition => {\r\n return updateSelectedReport(definition, { layoutType: { v: layoutType } });\r\n};\r\n\r\nexport const updateFavouriteLayoutAttributes = (definition: FavouriteDefinition,\r\n attributes: { [key: string]: string | boolean },\r\n layoutType: number) => {\r\n\r\n const report = definition.reports.find(r => r.report.v === definition.selectedReport.v);\r\n\r\n const attr = Object.keys(attributes).reduce((result, key) => {\r\n return [\r\n ...result,\r\n {\r\n layoutTypeId: layoutType,\r\n layoutTypeContext: reportLayoutTypeContext,\r\n name: key,\r\n value: attributes[key]\r\n }\r\n ];\r\n }, [] as FavouriteLayoutAttributes[]);\r\n\r\n return updateSelectedReport(definition, {\r\n layoutAttributes: [\r\n ...(!!report.layoutAttributes && report.layoutAttributes.filter(a => {\r\n return !attr.some(at => at.layoutTypeId === a.layoutTypeId && at.layoutTypeContext === a.layoutTypeContext\r\n && at.name === a.name);\r\n })),\r\n ...attr\r\n ]\r\n });\r\n};\r\n","import * as React from 'react';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { STATE, debounceExecuteFavouriteWait } from 'app/constants';\r\nimport { actionCreators } from './actions';\r\nimport debounce from 'lodash/debounce';\r\nimport { getFavouriteLayoutAttributes } from 'app/components/favourite-layout';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { selectionReportTranslations, reportLayoutTypeContext } from 'app/area/reports/constants';\r\nimport { ReportArea } from './components/chart-area';\r\nimport { isSelectionReportOptionsChanged, isExecutedByExternalChange} from './selectors';\r\nimport { SelectionReportChart } from './components/selection-report-chart';\r\nimport { updateLayoutType, updateFavouriteLayoutAttributes } from './map-to-definition';\r\nimport { TransformFunction, SelectionReportContainerComponentProps } from 'app/area/reports/containers/chart/chart-container-props';\r\nimport { DrillDownModel } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\nimport { Switch } from 'ui/common/switch/switch';\r\nimport styles from './chart-container.scss';\r\n\r\ninterface SelectionReportContainerComponentState {\r\n autoExecute: boolean;\r\n}\r\n\r\nclass SelectionReportContainerComponent extends React.Component<SelectionReportContainerComponentProps, \r\n SelectionReportContainerComponentState> {\r\n public static statePath: string = STATE.selectionReport;\r\n private debounceUpdateDefinition: any;\r\n\r\n constructor(props: SelectionReportContainerComponentProps) {\r\n super(props);\r\n\r\n this.debounceUpdateDefinition = debounce((transform: TransformFunction) => {\r\n this.props.updateDefinition(transform);\r\n }, debounceExecuteFavouriteWait);\r\n\r\n this.state = {\r\n autoExecute: true\r\n };\r\n }\r\n\r\n private updateLayoutAttributes = (attributes: { [key: string]: string | boolean }) => {\r\n\r\n this.props.fetchingStart();\r\n this.debounceUpdateDefinition((definition: FavouriteDefinition) => updateFavouriteLayoutAttributes(\r\n definition,\r\n attributes,\r\n this.props.chartState.selectedLayoutType\r\n ));\r\n }\r\n\r\n public componentDidUpdate(prevProps: SelectionReportContainerComponentProps) {\r\n const { workingDefinition } = this.props;\r\n\r\n if (this.state.autoExecute && isSelectionReportOptionsChanged(prevProps, this.props)) { \r\n this.props.fetchingStart();\r\n this.debounceUpdateDefinition((definition: FavouriteDefinition) => updateLayoutType(\r\n definition,\r\n this.props.chartState.selectedLayoutType\r\n ));\r\n }\r\n\r\n if (isExecutedByExternalChange(prevProps, this.props)) {\r\n this.state.autoExecute && this.props.executeFavourite(workingDefinition); \r\n }\r\n }\r\n\r\n private drillDown = (favouriteId: number, model: DrillDownModel) => {\r\n const { drillDownToCaseListing, definition: { favourite: { v: id } } } = this.props;\r\n drillDownToCaseListing(0, id, model);\r\n }\r\n\r\n private toggleAutoExecution = () => { \r\n !this.state.autoExecute && this.props.executeFavourite(this.props.workingDefinition);\r\n\r\n this.setState({\r\n autoExecute: !this.state.autoExecute\r\n });\r\n }\r\n\r\n private renderInformation = () => {\r\n return <div className={styles.uiToggleInfo}>\r\n <div className={styles.title}>{this.props.translation.toggle_info_title}</div>\r\n <div className={styles.subTitle}>{this.props.translation.toggle_info_subtitle}</div>\r\n <div className={styles.description}>{this.props.translation.toggle_info_description}</div>\r\n </div>;\r\n }\r\n\r\n private renderFailExecuteInformation = (errorsExecuteFailed: string[]) => {\r\n return <div className={`${styles.uiToggleInfo} ${styles.warningInfo}`}>\r\n <div className={`${styles.title} ${styles.warningMsg}`}>{this.props.translation.toggle_info_title}</div>\r\n <div className={`${styles.subTitle} ${styles.warningMsg}`}>{errorsExecuteFailed}</div>\r\n <div className={`${styles.warningDescription}`}>{this.props.translation.execute_failed_info_description}</div>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n const {\r\n chartState: {\r\n selectionReport,\r\n selectedLayoutType,\r\n layoutTypes,\r\n selectionReportLayout,\r\n errorsExecuteFailed\r\n },\r\n workingDefinition,\r\n translation \r\n } = this.props;\r\n const showResult = this.state.autoExecute && !!this.props.aggregateFieldState.selectedAggregateField\r\n && !!selectionReportLayout && selectedLayoutType === selectionReportLayout.layoutType;\r\n const amountOfSelectionCriterias = this.props.groupByFieldState.selectedGroupByFields.length;\r\n const presentationType = !!selectionReportLayout && selectionReportLayout.presentationType;\r\n const layoutAttributes = !!selectionReportLayout && {\r\n ...selectionReportLayout.layoutTypeAttributes,\r\n ...getFavouriteLayoutAttributes(workingDefinition, selectionReportLayout.layoutType, reportLayoutTypeContext)\r\n }; \r\n const hasExecuteFailedErrors = !!errorsExecuteFailed && !!errorsExecuteFailed.length;\r\n\r\n const result = \r\n <SelectionReportChart\r\n layoutTypes={layoutTypes}\r\n selectedLayoutType={selectedLayoutType}\r\n amountOfSelectionCriteria={amountOfSelectionCriterias}\r\n selectionReport={selectionReport}\r\n presentationType={presentationType}\r\n layoutAttributes={layoutAttributes}\r\n drillDown={this.drillDown}\r\n intl={this.props.intl}\r\n translation={translation}/>; \r\n const resultOrInfo = this.state.autoExecute ? (hasExecuteFailedErrors ? this.renderFailExecuteInformation(errorsExecuteFailed) \r\n : (!!showResult && result)): this.renderInformation();\r\n\r\n return( \r\n <div className={`${styles.chartContainer}`}>\r\n <div className={styles.switch}>\r\n <Switch\r\n className={styles.selectSwitch}\r\n enabled={this.state.autoExecute}\r\n onChange={this.toggleAutoExecution}\r\n label={translation.toggle_info_load_options}\r\n />\r\n </div>\r\n <ReportArea\r\n fetchingExecute={this.state.autoExecute && this.props.chartState.fetchingExecute}\r\n layoutTypes={layoutTypes}\r\n selectedLayoutType={selectedLayoutType}\r\n presentationType={presentationType}\r\n layoutAttributes={layoutAttributes}\r\n amountOfSelectionCriterias={amountOfSelectionCriterias}\r\n translation={translation}\r\n onSetLayoutType={this.props.setLayoutType}\r\n onAttributeChange={this.updateLayoutAttributes}>\r\n \r\n {resultOrInfo}\r\n </ReportArea>\r\n </div>);\r\n }\r\n}\r\n\r\nconst container = (api) =>\r\n containerFactory(SelectionReportContainerComponent, actionCreators(api), undefined, selectionReportTranslations);\r\n\r\nexport { container as ChartContainerForApi };\r\n","import { deepEquals } from 'app/infrastructure/js';\r\nimport { SelectionReportContainerComponentProps } from './chart-container-props';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { SelectionType } from 'app/area/reports/containers/group-by/types-fields';\r\n\r\nexport const isInitialDataLoaded = (prevProps: SelectionReportContainerComponentProps,\r\n props: SelectionReportContainerComponentProps\r\n) => {\r\n return !props.chartState.initializationStart\r\n && props.aggregateFieldState.initialized;\r\n};\r\n\r\nexport const isValidSelectionReportDefinition = (definition: FavouriteDefinition) => {\r\n const selectionReport = !!definition.reports && definition.reports.find(r => r.report.v === definition.selectedReport.v);\r\n const notValidIntervalSelection = selectionReport.selections.some(s => s.type.v === SelectionType.Interval && !s.interval);\r\n return !!selectionReport && !!selectionReport.aggregationDomain && !notValidIntervalSelection;\r\n};\r\n\r\nexport const isSelectionReportOptionsChanged = (prevProps: SelectionReportContainerComponentProps,\r\n props: SelectionReportContainerComponentProps\r\n) => {\r\n return props.chartState.initializationEnd\r\n && !deepEquals(prevProps.chartState.selectedLayoutType, props.chartState.selectedLayoutType);\r\n};\r\n\r\nexport const isExecutedByExternalChange = (prevProps: SelectionReportContainerComponentProps,\r\n props: SelectionReportContainerComponentProps\r\n) => {\r\n return props.chartState.initializationEnd\r\n && (\r\n !deepEquals(prevProps.workingDefinition, props.workingDefinition)\r\n || !props.chartState.initiallyExecuted\r\n );\r\n};\r\n","import { filterDomainIds } from 'app/area/filters/constants';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\n\r\nexport const caseTypeIds = (definition: FavouriteDefinition): number[] => {\r\n const caseTypeCondition = definition.conditions && definition.conditions\r\n .find(c => c.domain.v === filterDomainIds.caseType);\r\n if (caseTypeCondition && !!caseTypeCondition.values) {\r\n return caseTypeCondition.values.map(v => v.code && v.code.v);\r\n }\r\n return [];\r\n};\r\n","import { Codetable } from '../types-api';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ApiResponse, FavouriteLayoutModel, FavouriteDefinition } from 'app/types-shared';\r\nimport { RemoteData } from 'app/infrastructure/remote-data';\r\nimport { DomainNode, GroupByDomain } from '../types';\r\nimport { LayoutType } from 'app/area/reports/containers/chart/types-store';\r\nimport { caseTypeIds } from '../caseTypeIds';\r\nimport { FavouriteDataModel } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\nimport { ReportCommonApi } from 'app/area/reports/types-api';\r\nimport { DrillDownModel, DrillDownResult } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport const endpoint = {\r\n aggregateDefaultFields: 'favourite/definition/draft/selectionreport/aggregatefield/options/default',\r\n aggregateFields: 'favourite/definition/draft/selectionreport/aggregatefield/options',\r\n aggregateFunctionOptionsFor: (domainId: number) =>\r\n `favourite/definition/draft/selectionreport/aggregatefield/${domainId}/aggregatefunction/options`,\r\n groupByDefaultFields: 'favourite/definition/draft/selectionreport/groupbyfields/options/default',\r\n groupBySortOrderType: 'favourite/definition/draft/sortordertype/options',\r\n groupByFields: 'favourite/definition/draft/selectionreport/groupbyfields/options',\r\n groupBySelections: (domainId: number) =>\r\n `favourite/definition/draft/selectionreport/groupbyfield/${domainId}/selectiontypes`,\r\n targetDefaultFields: 'favourite/definition/draft/selectionreport/target/options/default',\r\n targetFields: 'favourite/definition/draft/selectionreport/target/options',\r\n statisticalReport: 'statisticalReport',\r\n loadLayoutTypes: (reportId: number) =>\r\n `favourite/definition/draft/report/${reportId}/layouttype/options`,\r\n report: 'report',\r\n dashboard: 'dashboard'\r\n};\r\n\r\nexport const api: ReportCommonApi = {\r\n loadAggregateDefaultFields: async (): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(endpoint.aggregateDefaultFields)\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .all();\r\n },\r\n loadAggregateFields: async (query: string, state: ApplicationState): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(`${endpoint.aggregateFields}${!!query ? '/search' : ''}`)\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .filter({\r\n query,\r\n applicationId: caseTypeIds(state.favourite.workingDefinition)\r\n }).all();\r\n },\r\n loadAggregateFunctionOptions: async (domainId: number): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(endpoint.aggregateFunctionOptionsFor(domainId))\r\n .resource<ApiResponse<Codetable>>()\r\n .all();\r\n },\r\n\r\n /** Group by */\r\n\r\n loadGroupByDefaultFields: async (): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(endpoint.groupByDefaultFields)\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .all();\r\n },\r\n loadGroupBySortOrderType: async (): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(endpoint.groupBySortOrderType)\r\n .resource<ApiResponse<Codetable>>()\r\n .all();\r\n },\r\n loadGroupByFields: async (query: string, state: ApplicationState): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(`${endpoint.groupByFields}${!!query ? '/search' : ''}`)\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .filter({\r\n query,\r\n applicationId: caseTypeIds(state.favourite.workingDefinition)\r\n }).all();\r\n },\r\n loadGroupBySelection: async (domainId: number): Promise<ApiResponse<GroupByDomain>> => {\r\n return await new RemoteData(endpoint.groupBySelections(domainId))\r\n .resource<ApiResponse<GroupByDomain>>()\r\n .all();\r\n },\r\n\r\n /** Target */\r\n\r\n loadTargetDefaultFields: async (aggregationId: number): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(endpoint.targetDefaultFields)\r\n .resource<ApiResponse<Codetable>>()\r\n .filter({\r\n selectionAggrType: aggregationId\r\n })\r\n .all();\r\n },\r\n loadTargetFields: async (aggregationId: number, query: string): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(`${endpoint.targetFields}${!!query ? '/search' : ''}`)\r\n .resource<ApiResponse<Codetable>>()\r\n .filter({\r\n selectionAggrType: aggregationId,\r\n query\r\n }).all();\r\n },\r\n\r\n /** Chart */\r\n\r\n reportLayout: async (favouriteId: number, report: number,\r\n layout: number, layoutTypeContextId: number): Promise<FavouriteLayoutModel> => {\r\n const response = await new RemoteData(endpoint.report)\r\n .resource<ApiResponse<FavouriteLayoutModel>>()\r\n .withId(`${report}/layout/${layout}`)\r\n .filter({\r\n layoutTypeContextId,\r\n favouriteId\r\n })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n loadLayoutTypes: async (reportId: number): Promise<ApiResponse<LayoutType[]>> => {\r\n return await new RemoteData(endpoint.loadLayoutTypes(reportId))\r\n .resource<ApiResponse<LayoutType[]>>()\r\n .all();\r\n },\r\n executeFavourite: async (definition: FavouriteDefinition): Promise<FavouriteDataModel> => {\r\n\r\n const response = await new RemoteData(endpoint.statisticalReport).resource<any>()\r\n .create({ favouriteDefinition: definition }, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n /**\r\n * Drill down from dashboard.\r\n */\r\n drillDown: async (dashboardId: number, favouriteId: number, drillDownModel: DrillDownModel): Promise<DrillDownResult> => {\r\n const response: any = await new RemoteData(`${endpoint.dashboard}/${dashboardId}/favourite/${favouriteId}/drilldown`)\r\n .resource<ApiResponse<DrillDownResult>>()\r\n .create(drillDownModel, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n }\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { FavouriteDefinition, ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\n\r\nimport { actionCreators as aggregationActionCreatorsFor } from '../containers/aggregation/actions';\r\nimport { actionCreators as groupByActionCreatorsFor } from '../containers/group-by/actions';\r\nimport { actionCreators as targetActionCreatorsFor } from '../containers/target/actions';\r\nimport { actionCreators as chartActionCreatorsFor } from '../containers/chart/actions';\r\nimport { api } from './api';\r\n\r\nconst aggregationActionCreators = aggregationActionCreatorsFor(api);\r\nconst groupByActionCreators = groupByActionCreatorsFor(api);\r\nconst targetActionCreators = targetActionCreatorsFor(api);\r\nconst chartActionCreators = chartActionCreatorsFor(api);\r\n\r\nexport const selectionActionCreators = {\r\n clearState: (): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n await Promise.all([\r\n dispatch(aggregationActionCreators.clearState()),\r\n dispatch(groupByActionCreators.clearState()),\r\n dispatch(targetActionCreators.clearState()),\r\n dispatch(chartActionCreators.clearState())\r\n ]);\r\n }),\r\n loadInitialData: (workingDefinition: FavouriteDefinition): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(chartActionCreators.initializationStart());\r\n\r\n await Promise.all([\r\n dispatch(aggregationActionCreators.loadAggregateDefaultFields()),\r\n dispatch(groupByActionCreators.loadGroupByDefaultFields()),\r\n dispatch(groupByActionCreators.loadGroupBySortOrderType())\r\n ]);\r\n\r\n await Promise.all([\r\n dispatch(aggregationActionCreators.setInitialData(workingDefinition)),\r\n dispatch(groupByActionCreators.setInitialData(workingDefinition)),\r\n dispatch(chartActionCreators.setInitialLayoutType(workingDefinition))\r\n ]);\r\n\r\n const {\r\n selectionReport: {\r\n aggregateFieldState\r\n }\r\n } = getState();\r\n\r\n if (!!aggregateFieldState.selectedAggregateField && !!aggregateFieldState.selectedAggregateField.value\r\n && aggregateFieldState.selectedAggregateField.value) {\r\n await dispatch(targetActionCreators.loadDefaultFields());\r\n await dispatch(targetActionCreators.setInitialData(workingDefinition));\r\n }\r\n\r\n dispatch(chartActionCreators.initializationEnd());\r\n }),\r\n updateTargetDefaultFields: (): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n await dispatch(targetActionCreators.clearState());\r\n const {\r\n selectionReport: {\r\n aggregateFieldState\r\n }\r\n } = getState();\r\n if (!!aggregateFieldState.selectedAggregateField\r\n && !!aggregateFieldState.selectedAggregateField.value\r\n ) {\r\n dispatch(targetActionCreators.loadDefaultFields());\r\n }\r\n })\r\n};\r\n","import { AggregationState } from './types-store';\r\n\r\nexport const aggregationFieldChanged = (prevAggregateFieldState: AggregationState, aggregateFieldState: AggregationState) => {\r\n const prevSelectedField = prevAggregateFieldState.selectedAggregateField;\r\n const selectedField = aggregateFieldState.selectedAggregateField;\r\n return (!!prevSelectedField && prevSelectedField.value && !!selectedField && selectedField.value\r\n && prevSelectedField.value !== selectedField.value)\r\n || (!prevSelectedField && !!selectedField)\r\n || (!!prevSelectedField && !selectedField);\r\n};\r\n","import { SelectedAggregateField } from './types-fields';\r\nimport { OptionItem } from 'app/components/display-selected-options/display-selected-options';\r\n\r\nexport const getAggregationSelectedOption = ({ value, field }: SelectedAggregateField): OptionItem => {\r\n\r\n return {\r\n value: value.value.toString(),\r\n label: value.description,\r\n selections: {\r\n titles: [],\r\n values: [field.description],\r\n excludedValues: []\r\n }\r\n };\r\n};\r\n","import { SelectionFieldItem } from './types-fields';\r\nimport { GroupByPanelTexts } from './components/group-by-panel-texts';\r\nimport { OptionItem } from 'app/components/display-selected-options/display-selected-options';\r\n\r\nconst getSelectionTypeDesc = (\r\n { value, selections }: SelectionFieldItem,\r\n translation: GroupByPanelTexts\r\n) => {\r\n const selection = value && selections && selections.find(s => s.type === value.type);\r\n\r\n if (!selection) {\r\n return '';\r\n }\r\n\r\n const values: string[] = [];\r\n if (value.category && selection.categories) {\r\n const category = selection.categories.find(c => c.value === value.category.value);\r\n values.push(`${category.description}`);\r\n }\r\n if (value.level && selection.levels) {\r\n const level = selection.levels.find(c => c.value === value.level.value);\r\n values.push(`${level.description}`);\r\n }\r\n if (value.period) {\r\n const period = selection.periods.find(c => c.value === value.period.value);\r\n values.push(`${period.description}`);\r\n }\r\n if (value.interval) {\r\n values.push(`${value.interval}`);\r\n }\r\n if (value.rollingAverage) {\r\n values.push(`${translation.group_by_rolling_average}: ${value.rollingAverage}`);\r\n }\r\n if (value.fillEmpty) {\r\n values.push(translation.group_by_missing_values_are_included);\r\n }\r\n\r\n return selection ? ` (${selection.label}${!!values.length ? ' - ' : ''}${values.join(', ')})` : '';\r\n};\r\n\r\nexport const getGroupBySelectedOption = (selectedFields: SelectionFieldItem[], translation: GroupByPanelTexts): OptionItem => {\r\n\r\n return {\r\n value: 'group_by',\r\n label: translation.group_by_title,\r\n selections: {\r\n titles: [],\r\n values: (selectedFields || []).map(s => s.field.description + getSelectionTypeDesc(s, translation)),\r\n excludedValues: []\r\n }\r\n };\r\n};\r\n","import { OptionItem } from 'app/components/display-selected-options/display-selected-options';\r\nimport { SelectedField } from './types-fields';\r\nimport { DistributionPanelTexts } from './components/distribution-panel-texts';\r\n\r\nexport const getDistributionSelectedOption = (\r\n { field, forEvery, percentIncrese }: SelectedField,\r\n translation: DistributionPanelTexts\r\n): OptionItem => {\r\n const values: string[] = [];\r\n if (!!forEvery) {\r\n values.push(`${translation.distribution_for_every}: ${forEvery}`);\r\n }\r\n if (!!percentIncrese) {\r\n values.push(`${translation.distribution_percent_inrease}: ${percentIncrese}`);\r\n }\r\n\r\n return {\r\n value: 'distribution',\r\n label: translation.distribution_title,\r\n selections: {\r\n titles: [],\r\n values: [(`${field.description}` + (!!values.length ? ` (${values.join(', ')})`: ''))],\r\n excludedValues: []\r\n }\r\n };\r\n};\r\n","import { OptionItem } from 'app/components/display-selected-options/display-selected-options';\r\nimport { FieldItem } from 'app/area/reports/types';\r\nimport { TargetPanelTexts } from './components/target-panel';\r\n\r\nexport const getTargetSelectedOption = (\r\n selctedField: FieldItem,\r\n translation: TargetPanelTexts\r\n): OptionItem => {\r\n\r\n return {\r\n value: 'target',\r\n label: translation.target_title,\r\n selections: {\r\n titles: [],\r\n values: [selctedField.description],\r\n excludedValues: []\r\n }\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { AggregationState } from '../containers/aggregation/types-store';\r\nimport { DistributionState } from '../containers/distribution/types-store';\r\nimport { GroupByFieldState } from '../containers/group-by/types-store';\r\nimport { TargetState } from '../containers/target/types-store';\r\nimport { getAggregationSelectedOption } from '../containers/aggregation/get-selected-options';\r\nimport { getGroupBySelectedOption } from '../containers/group-by/get-selected-options';\r\nimport { getDistributionSelectedOption } from '../containers/distribution/get-selected-options';\r\nimport { getTargetSelectedOption } from '../containers/target/get-selected-options';\r\nimport { DisplaySelectedOptions, OptionItem } from 'app/components/display-selected-options/display-selected-options';\r\nimport { withCachedTranslation } from 'app/components/enhancers/with-cached-translation';\r\n\r\nexport interface SelectedOptionsComponentProps {\r\n aggregation?: AggregationState;\r\n distribution?: DistributionState;\r\n groupBy?: GroupByFieldState;\r\n target?: TargetState;\r\n translation: any;\r\n}\r\n\r\nclass SelectedOptionsComponent extends React.PureComponent<SelectedOptionsComponentProps> {\r\n private selectedOptionsByReportValues = (): OptionItem[] => {\r\n const {\r\n aggregation,\r\n distribution,\r\n groupBy,\r\n target,\r\n translation\r\n } = this.props;\r\n const optionItems: OptionItem[] = [];\r\n\r\n if (aggregation && aggregation.selectedAggregateField && aggregation.selectedAggregateField.value) {\r\n optionItems.push(getAggregationSelectedOption(aggregation.selectedAggregateField));\r\n }\r\n if (distribution && distribution.selectedField) {\r\n optionItems.push(getDistributionSelectedOption(distribution.selectedField, translation));\r\n }\r\n if (groupBy && groupBy.selectedGroupByFields && !!groupBy.selectedGroupByFields.length) {\r\n optionItems.push(getGroupBySelectedOption(groupBy.selectedGroupByFields, translation));\r\n }\r\n if (target && target.selectedField) {\r\n optionItems.push(getTargetSelectedOption(target.selectedField, translation));\r\n }\r\n\r\n return optionItems;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const selectedOptions: OptionItem[] = this.selectedOptionsByReportValues();\r\n return (\r\n <DisplaySelectedOptions\r\n selectedOptions={selectedOptions}\r\n textHideDetails={this.props.translation.hide_details}\r\n textShowDetails={this.props.translation.show_details}\r\n />\r\n );\r\n }\r\n}\r\nexport const ReportSelectedOptions = withCachedTranslation<SelectedOptionsComponentProps>(SelectedOptionsComponent);\r\n","import * as React from 'react';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\n\r\nimport { DrawerWithBar } from 'ui';\r\nimport { DragNDropContext } from '../components/drag-n-drop-context';\r\nimport styles from '../selection-report.scss';\r\nimport { AggregationContainerForApi } from '../containers/aggregation/aggregation-container';\r\nimport { GroupByContainerForApi } from '../containers/group-by/group-by-container';\r\nimport { TargetContainerForApi } from '../containers/target/target-container';\r\nimport { ChartContainerForApi } from '../containers/chart/chart-container';\r\nimport { SelectionReportState } from '../types-store';\r\nimport { selectionReportTranslations, selectionReportId } from '../constants';\r\nimport { STATE } from 'app/constants';\r\nimport { api } from './api';\r\nimport { selectionActionCreators } from './actions';\r\nimport { aggregationFieldChanged } from '../containers/aggregation/aggregation-field';\r\nimport { ReportSelectedOptions } from '../components/selected-options';\r\nimport { transformSelectedReport } from '../selected-report';\r\n\r\nconst AggregationContainer = AggregationContainerForApi(api);\r\nconst GroupByContainer = GroupByContainerForApi(api);\r\nconst TargetContainer = TargetContainerForApi(api);\r\nconst ChartContainer = ChartContainerForApi(api);\r\n\r\nexport interface SelectionReportContainerProps {\r\n definition: FavouriteDefinition;\r\n workingDefinition: FavouriteDefinition;\r\n updateDefinition: (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => void;\r\n}\r\n\r\nexport interface SelectionReportContainerState {\r\n initiallyOpen: boolean;\r\n}\r\n\r\nexport type SelectionReportContainerComponentProps = SelectionReportContainerProps\r\n & SelectionReportState & DefaultContainerProps & typeof selectionActionCreators;\r\n\r\nclass SelectionReportContainerComponent extends React.Component<\r\n SelectionReportContainerComponentProps,\r\n SelectionReportContainerState\r\n > {\r\n public static statePath: string = STATE.selectionReport;\r\n constructor(props: SelectionReportContainerComponentProps) {\r\n super(props);\r\n\r\n const selectionReportDefinition = props.workingDefinition.reports.find(r => r.report.v === selectionReportId);\r\n this.state = {\r\n initiallyOpen: !!selectionReportDefinition && !selectionReportDefinition.aggregationDomain\r\n };\r\n }\r\n\r\n public componentDidUpdate(prevProps: SelectionReportContainerComponentProps) {\r\n const {\r\n aggregateFieldState,\r\n groupByFieldState\r\n } = this.props;\r\n\r\n if (!aggregateFieldState.initialized && !aggregateFieldState.fetching\r\n && !groupByFieldState.initialized && !groupByFieldState.fetching\r\n ) {\r\n this.props.loadInitialData(this.props.workingDefinition);\r\n }\r\n\r\n if (aggregationFieldChanged(prevProps.aggregateFieldState, aggregateFieldState)) {\r\n this.props.updateTargetDefaultFields();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearState();\r\n }\r\n\r\n private additionalAggregateDefinitionUpdate = (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => {\r\n this.props.updateDefinition(transformSelectedReport(transform, {\r\n targetApp: undefined\r\n }));\r\n }\r\n\r\n public render() {\r\n const {\r\n definition,\r\n workingDefinition,\r\n updateDefinition,\r\n aggregateFieldState,\r\n groupByFieldState,\r\n targetFieldState,\r\n translation\r\n } = this.props;\r\n const disabledTarget = !this.props.aggregateFieldState.selectedAggregateField;\r\n const barContent = <ReportSelectedOptions\r\n aggregation={aggregateFieldState}\r\n groupBy={groupByFieldState}\r\n target={targetFieldState}\r\n translation={translation}\r\n />;\r\n const panels = <DragNDropContext >\r\n\r\n <AggregationContainer orderNumber=\"1\"\r\n definition={definition}\r\n workingDefinition={workingDefinition}\r\n updateDefinition={this.additionalAggregateDefinitionUpdate}\r\n />\r\n\r\n <GroupByContainer orderNumber=\"2\"\r\n definition={definition}\r\n workingDefinition={workingDefinition}\r\n updateDefinition={updateDefinition}\r\n />\r\n\r\n <TargetContainer orderNumber=\"3\" disabled={disabledTarget}\r\n definition={definition}\r\n workingDefinition={workingDefinition}\r\n updateDefinition={updateDefinition}\r\n />\r\n\r\n </DragNDropContext>;\r\n return (<div className={styles.selectionReportView}>\r\n <DrawerWithBar\r\n title={this.props.translation.selection_report_extend_btn}\r\n barContent={barContent}\r\n drawerContent={panels}\r\n initiallyOpen={this.state.initiallyOpen}\r\n >\r\n <ChartContainer {...this.props} />\r\n </DrawerWithBar>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory<SelectionReportContainerProps>(\r\n SelectionReportContainerComponent, selectionActionCreators, undefined, selectionReportTranslations);\r\n\r\nexport { container as SelectionReportContainer };\r\n","import { Codetable } from '../types-api';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { FavouriteDefinition, ApiResponse, FavouriteLayoutModel } from 'app/types-shared';\r\nimport { RemoteData } from 'app/infrastructure/remote-data';\r\nimport { DomainNode, GroupByDomain, MetadataResult } from '../types';\r\nimport { LayoutType } from 'app/area/reports/containers/chart/types-store';\r\nimport { caseTypeIds } from '../caseTypeIds';\r\nimport { FavouriteDataModel } from 'app/components/favourite-layout/favourite/common/favourite-interfaces';\r\nimport { ReportCommonApi } from 'app/area/reports/types-api';\r\nimport { DrillDownModel, DrillDownResult } from 'app/components/favourite-layout/favourite/common/drill-down-model';\r\n\r\nexport const endpoint = {\r\n aggregateDefaultFields: 'favourite/definition/draft/frequencyreport/aggregatefield/options/default',\r\n aggregateFields: 'favourite/definition/draft/frequencyreport/aggregatefield/options',\r\n aggregateFunctionOptionsFor: (domainId: number) =>\r\n `favourite/definition/draft/frequencyreport/aggregatefield/${domainId}/aggregatefunction/options`,\r\n\r\n distributionDefaultFields: 'favourite/definition/draft/frequencyreport/exposureapplication/options/default',\r\n distributionFields: 'favourite/definition/draft/frequencyreport/exposureapplication/options',\r\n metadata: (applicationId: number) => `favourite/definition/draft/frequencyreport/exposureapplication/${applicationId}/metadata`,\r\n\r\n groupByDefaultFields: 'favourite/definition/draft/frequencyreport/groupbyfields/options/default',\r\n groupBySortOrderType: 'favourite/definition/draft/sortordertype/options',\r\n groupByFields: 'favourite/definition/draft/frequencyreport/groupbyfields/options',\r\n groupBySelections: (domainId: number) =>\r\n `favourite/definition/draft/frequencyreport/groupbyfield/${domainId}/selectiontypes`,\r\n\r\n targetDefaultFields: 'favourite/definition/draft/frequencyreport/target/options/default',\r\n targetFields: 'favourite/definition/draft/frequencyreport/target/options',\r\n\r\n statisticalReport: 'statisticalReport',\r\n loadLayoutTypes: (reportId: number) =>\r\n `favourite/definition/draft/report/${reportId}/layouttype/options`,\r\n report: 'report',\r\n dashboard: 'dashboard'\r\n};\r\n\r\nexport const api: ReportCommonApi = {\r\n loadAggregateDefaultFields: async (): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(endpoint.aggregateDefaultFields)\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .all();\r\n },\r\n loadAggregateFields: async (query: string): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(`${endpoint.aggregateFields}${!!query ? '/search' : ''}`)\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .filter({\r\n query\r\n }).all();\r\n },\r\n loadAggregateFunctionOptions: async (domainId: number): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(endpoint.aggregateFunctionOptionsFor(domainId))\r\n .resource<ApiResponse<Codetable>>()\r\n .all();\r\n },\r\n\r\n /** Distribution */\r\n\r\n loadDistributionDefaultFields: async (): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(endpoint.distributionDefaultFields)\r\n .resource<ApiResponse<Codetable>>()\r\n .all();\r\n },\r\n loadDistributionFields: async (query?: string): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(`${endpoint.distributionFields}${!!query ? '/search' : ''}`)\r\n .resource<ApiResponse<Codetable>>()\r\n .filter({\r\n query\r\n }).all();\r\n },\r\n loadMetadata: async (applicaitonId: number): Promise<ApiResponse<MetadataResult>> => {\r\n return await new RemoteData(endpoint.metadata(applicaitonId))\r\n .resource<ApiResponse<MetadataResult>>()\r\n .all();\r\n },\r\n\r\n /** Group by */\r\n\r\n loadGroupByDefaultFields: async (state: ApplicationState): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(endpoint.groupByDefaultFields)\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .filter({\r\n exposureApplication: state.selectionReport.distributionFieldState.selectedField.field.value,\r\n aggregateField: state.selectionReport.aggregateFieldState.selectedAggregateField.field.value,\r\n selectionAggrType: state.selectionReport.aggregateFieldState.selectedAggregateField.value.value,\r\n applicationId: caseTypeIds(state.favourite.workingDefinition)\r\n })\r\n .all();\r\n },\r\n loadGroupBySortOrderType: async (): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(endpoint.groupBySortOrderType)\r\n .resource<ApiResponse<Codetable>>()\r\n .all();\r\n },\r\n loadGroupByFields: async (query: string, state: ApplicationState): Promise<ApiResponse<DomainNode[]>> => {\r\n return await new RemoteData(\r\n `${endpoint.groupByFields}${!!query ? '/search' : ''}`\r\n )\r\n .resource<ApiResponse<DomainNode[]>>()\r\n .filter({\r\n query,\r\n exposureApplication: state.selectionReport.distributionFieldState.selectedField.field.value,\r\n aggregateField: state.selectionReport.aggregateFieldState.selectedAggregateField.field.value,\r\n selectionAggrType: state.selectionReport.aggregateFieldState.selectedAggregateField.value.value,\r\n applicationId: caseTypeIds(state.favourite.workingDefinition)\r\n }).all();\r\n },\r\n loadGroupBySelection: async (domainId: number): Promise<ApiResponse<GroupByDomain>> => {\r\n return await new RemoteData(endpoint.groupBySelections(domainId))\r\n .resource<ApiResponse<GroupByDomain>>()\r\n .all();\r\n },\r\n\r\n /** Target */\r\n\r\n loadTargetDefaultFields: async (aggregationId: number): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(endpoint.targetDefaultFields)\r\n .resource<ApiResponse<Codetable>>()\r\n .filter({\r\n selectionAggrType: aggregationId\r\n })\r\n .all();\r\n },\r\n loadTargetFields: async (aggregationId: number, query: string): Promise<ApiResponse<Codetable>> => {\r\n return await new RemoteData(`${endpoint.targetFields}${!!query ? '/search' : ''}`)\r\n .resource<ApiResponse<Codetable>>()\r\n .filter({\r\n selectionAggrType: aggregationId,\r\n query\r\n }).all();\r\n },\r\n\r\n /** Chart */\r\n\r\n reportLayout: async (favouriteId: number, report: number,\r\n layout: number, layoutTypeContextId: number): Promise<FavouriteLayoutModel> => {\r\n const response = await new RemoteData(endpoint.report)\r\n .resource<ApiResponse<FavouriteLayoutModel>>()\r\n .withId(`${report}/layout/${layout}`)\r\n .filter({\r\n layoutTypeContextId,\r\n favouriteId\r\n })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n loadLayoutTypes: async (reportId: number): Promise<ApiResponse<LayoutType[]>> => {\r\n return await new RemoteData(endpoint.loadLayoutTypes(reportId))\r\n .resource<ApiResponse<LayoutType[]>>()\r\n .all();\r\n },\r\n executeFavourite: async (definition: FavouriteDefinition): Promise<FavouriteDataModel> => {\r\n\r\n const response = await new RemoteData(endpoint.statisticalReport).resource<any>()\r\n .create({ favouriteDefinition: definition }, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n },\r\n\r\n /**\r\n * Drill down from dashboard.\r\n */\r\n drillDown: async (dashboardId: number, favouriteId: number, drillDownModel: DrillDownModel): Promise<DrillDownResult> => {\r\n const response: any = await new RemoteData(`${endpoint.dashboard}/${dashboardId}/favourite/${favouriteId}/drilldown`)\r\n .resource<ApiResponse<DrillDownResult>>()\r\n .create(drillDownModel, false);\r\n\r\n const json = await response.json();\r\n\r\n return json.data;\r\n }\r\n};\r\n","import { FavouriteDefinition, ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { FieldItem, DomainNode } from '../../types';\r\nimport { SelectionReportState } from '../../types-store';\r\nimport * as actions from './action-types';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport { SelectedField } from './types-fields';\r\nimport { distributionState } from './map-to-store';\r\nimport { ReportCommonApi } from 'app/area/reports/types-api';\r\n\r\nexport const domainNodeToComplexType = (dn: DomainNode): FieldItem => {\r\n return {\r\n value: dn.domain,\r\n description: dn.label,\r\n descendants: !!dn.children ? dn.children.map(domainNodeToComplexType) : undefined\r\n };\r\n};\r\n\r\nconst addToDefaultFields = (fieldItems: FieldItem[], field: FieldItem) => {\r\n return !fieldItems.some(f => f.value === field.value);\r\n};\r\n\r\nexport const actionCreators = (api: ReportCommonApi) => {\r\n\r\n return {\r\n clearState: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.ClearDistributionState());\r\n },\r\n clearValue: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RemoveDistributionField());\r\n },\r\n setInitialData: (definition: FavouriteDefinition): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const distribution = distributionState(definition);\r\n if (!!distribution) {\r\n dispatch(\r\n actionCreators(api).onSelectField(distribution, false)\r\n );\r\n }\r\n },\r\n onSelectField: (selectedField: SelectedField, fetchDefaults: boolean = true): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n let field: SelectedField = selectedField;\r\n if (fetchDefaults) {\r\n const result = await api.loadMetadata(selectedField.field.value);\r\n field = {\r\n ...selectedField,\r\n forEvery: result.data.exposureFactorDefault,\r\n percentIncrese: result.data.exposreFactorIncreaseDefault\r\n };\r\n }\r\n\r\n const state = getState().selectionReport as SelectionReportState;\r\n if (addToDefaultFields(state.distributionFieldState.defaultFields, field.field)) {\r\n dispatch(new actions.UpdateDistributionDefaultFields([...state.distributionFieldState.defaultFields, selectedField.field]));\r\n }\r\n\r\n dispatch(new actions.SetDistributionField(field));\r\n }),\r\n\r\n updateSelectedField: (selectedField: SelectedField): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.SetDistributionField(selectedField));\r\n },\r\n loadDistributionDefaultFields: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new actions.RequestDistributionDefaultFields());\r\n const codetables = await api.loadDistributionDefaultFields();\r\n const options = codetables.data.rootCodes.map(codeItemToStoreValue);\r\n dispatch(new actions.ResponseDistributionDefaultFields(options));\r\n }),\r\n loadDistributionFields: (query?: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n\r\n const codetables = await api.loadDistributionFields(query);\r\n const options = codetables.data.rootCodes.map(codeItemToStoreValue);\r\n dispatch(new actions.ResponseDistributionFields(options));\r\n }),\r\n updateDefaultDistributionFields: (fieldItems: FieldItem[]): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new actions.UpdateDistributionDefaultFields(fieldItems));\r\n })\r\n };\r\n};\r\n","import { FavouriteDefinition } from 'app/types-shared';\r\nimport { SelectedField } from './types-fields';\r\n\r\nexport const distributionState = (workingDefinition: FavouriteDefinition): SelectedField => {\r\n return !!workingDefinition.exposureApplication && workingDefinition.exposureApplication.v!==0 && {\r\n field: {\r\n value: workingDefinition.exposureApplication.v,\r\n description: workingDefinition.exposureApplication.d\r\n },\r\n forEvery: workingDefinition.exposureFactor === 0 ? undefined : workingDefinition.exposureFactor,\r\n percentIncrese: workingDefinition.exposurePercent === 0 ? undefined : workingDefinition.exposurePercent\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { DropdownItem } from 'ui/common/dropdown-menu/dropdown-menu-item';\r\nimport { ExpandableBox } from '../../../components/expandable-box';\r\nimport { SelectedField } from '../types-fields';\r\nimport { isPositiveNumeric } from 'app/infrastructure/data/number';\r\nimport styles from './distribution-field.scss';\r\nimport { DistributionPanelTexts } from './distribution-panel-texts';\r\n\r\ninterface DistributionFieldComponentProps {\r\n selectedField: SelectedField;\r\n onUpdateField: (selectedField: SelectedField) => void;\r\n translation: DistributionPanelTexts;\r\n}\r\n\r\nclass DistributionFieldComponent extends React.Component<DistributionFieldComponentProps, {}> {\r\n private menuItemsForAggregation = (): DropdownItem[] => {\r\n const handleOnRemove = () => {\r\n this.props.onUpdateField(undefined);\r\n };\r\n return [{\r\n value: '1',\r\n description: this.props.translation.distribution_remove,\r\n onClick: handleOnRemove\r\n }];\r\n }\r\n\r\n private handleChangeForEvery = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const { value } = e.currentTarget;\r\n let nextValue = this.props.selectedField.percentIncrese;\r\n\r\n if (isPositiveNumeric(value)) {\r\n nextValue = parseInt(value, 10);\r\n } else if (typeof value === 'string' && value.trim() === '') {\r\n nextValue = undefined;\r\n }\r\n\r\n this.props.onUpdateField({\r\n ...this.props.selectedField,\r\n forEvery: nextValue\r\n });\r\n }\r\n private handleChangePercentIncrease = (e: React.SyntheticEvent<HTMLInputElement>) => {\r\n const { value } = e.currentTarget;\r\n let nextValue = this.props.selectedField.percentIncrese;\r\n\r\n if (isPositiveNumeric(value)) {\r\n nextValue = parseInt(value, 10);\r\n } else if (typeof value === 'string' && value.trim() === '') {\r\n nextValue = undefined;\r\n }\r\n this.props.onUpdateField({\r\n ...this.props.selectedField,\r\n percentIncrese: nextValue\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n selectedField: {\r\n field,\r\n forEvery='',\r\n percentIncrese=''\r\n },\r\n translation\r\n } = this.props;\r\n\r\n return (<ExpandableBox title={field.description}\r\n menuItems={this.menuItemsForAggregation()}>\r\n <div className={styles.panel}>\r\n <label htmlFor=\"forEvery\" className=\"control-label\">\r\n {translation.distribution_for_every}\r\n </label>\r\n <div className=\"input-wrapper\">\r\n <input \r\n id=\"forEvery\" \r\n type=\"text\" \r\n onChange={this.handleChangeForEvery}\r\n value={forEvery}\r\n maxLength={9}\r\n className=\"form-control\"\r\n />\r\n </div>\r\n <label htmlFor=\"percentIncrease\" className=\"control-label\">\r\n {translation.distribution_percent_inrease}\r\n </label>\r\n <div className=\"input-wrapper\">\r\n <input \r\n id=\"percentIncrease\" \r\n type=\"text\"\r\n onChange={this.handleChangePercentIncrease}\r\n value={percentIncrese}\r\n maxLength={3}\r\n className=\"form-control\"\r\n />\r\n </div>\r\n </div>\r\n </ExpandableBox>);\r\n }\r\n}\r\n\r\nexport const DistributionField = DistributionFieldComponent;\r\n","import * as React from 'react';\r\nimport { ExpandablePanel, ElementLoader } from 'ui';\r\nimport { ItemTypes, FieldItem } from '../../../types';\r\nimport { dropPanelForItemType } from '../../../components/drop-panel';\r\nimport { dragPanelForItemType } from '../../../components/drag-panel';\r\nimport { ButtonSelectMultipleDialog } from '../../../components/button-select-multiple-dialog';\r\nimport { DropArea } from '../../../components/drop-area';\r\nimport styles from '../../dnd.scss';\r\nimport { DistributionState } from '../types-store';\r\nimport { SelectedField } from '../types-fields';\r\nimport { DistributionField } from './distribution-field';\r\nimport { withCachedTranslation } from 'app/components/enhancers/with-cached-translation';\r\nimport { DistributionPanelTexts } from 'app/area/reports/containers/distribution/components/distribution-panel-texts';\r\n\r\nconst DistributionDropPanel = dropPanelForItemType(ItemTypes.DISTRIBUTION_FIELD);\r\n\r\nconst DistributionDragField = dragPanelForItemType(ItemTypes.DISTRIBUTION_FIELD);\r\n\r\nexport interface DistributionPanelProps {\r\n orderNumber: string;\r\n fetching: boolean;\r\n\r\n data: DistributionState;\r\n\r\n onLoadFields: () => void;\r\n onUpdateDefaultFields: (items: FieldItem[]) => void;\r\n onSelect: (selectedField: SelectedField) => void;\r\n onUpdateField: (selectedField: SelectedField) => void;\r\n onRemove: () => void;\r\n translation: DistributionPanelTexts;\r\n}\r\n\r\nclass DistributionPanelComponent extends React.PureComponent<DistributionPanelProps> {\r\n\r\n private handleOnSelect = (items: FieldItem[]) => {\r\n const defaultFields = this.props.data.defaultFields.map(f => f.value);\r\n const removedRedundandItems = items.filter(i => defaultFields.indexOf(i.value) === -1).map(i => ({added: true, ...i}));\r\n this.props.onUpdateDefaultFields([\r\n ...this.props.data.defaultFields,\r\n ...removedRedundandItems\r\n ]);\r\n }\r\n\r\n private onSelectField = (field: FieldItem) => {\r\n this.props.onSelect({ field: field });\r\n }\r\n\r\n public renderContent() {\r\n const {\r\n data: {\r\n defaultFields = [],\r\n additionalFields = [],\r\n selectedField\r\n },\r\n onLoadFields,\r\n translation\r\n } = this.props;\r\n\r\n const selectedFieldValue = selectedField && selectedField.field && selectedField.field.value;\r\n return <div className=\"row\">\r\n <div className=\"col-6\">\r\n <ul className={styles.dragTagContainer}>\r\n {defaultFields.map(item => {\r\n const isSelected = selectedFieldValue === item.value;\r\n return <DistributionDragField\r\n key={item.value}\r\n className={styles.dragTag}\r\n field={item}\r\n isSelected={isSelected}\r\n onSelect={this.onSelectField}\r\n onRemove={this.props.onRemove}\r\n />;\r\n })}\r\n <ButtonSelectMultipleDialog\r\n className={styles.dragTag}\r\n options={additionalFields}\r\n placeholder={translation.distribution_search}\r\n textButtonAdd={`+ ${translation.distribution_btn_open_dialog}`}\r\n textTitle={translation.distribution_dialog_title}\r\n textDone={translation.distribution_done}\r\n textConfirm={translation.distribution_done}\r\n textOptionsNotFound={translation.distribution_options_not_found}\r\n onLoadOptions={onLoadFields}\r\n onSelect={this.handleOnSelect}\r\n />\r\n </ul>\r\n </div>\r\n <div className=\"col-6\">\r\n <DistributionDropPanel\r\n className={styles.dropBox}\r\n addItem={this.onSelectField}\r\n >\r\n {selectedField && selectedField.field\r\n ? <DistributionField\r\n selectedField={selectedField}\r\n onUpdateField={this.props.onUpdateField}\r\n translation={this.props.translation}\r\n />\r\n : <DropArea text={translation.distribution_drag_n_drop} />\r\n }\r\n </DistributionDropPanel>\r\n </div>\r\n </div>;\r\n }\r\n public render(): JSX.Element {\r\n const {\r\n translation\r\n } = this.props;\r\n\r\n return <ExpandablePanel title={`${this.props.orderNumber}. ${translation.distribution_area_title}`}>\r\n {this.props.fetching\r\n ? <ElementLoader />\r\n : this.renderContent()}\r\n </ExpandablePanel>;\r\n }\r\n}\r\nexport const DistributionPanel = withCachedTranslation<DistributionPanelProps>(DistributionPanelComponent);\r\n","import { FavouriteDefinition } from 'app/types-shared';\r\nimport { SelectedField } from './types-fields';\r\n\r\nexport const updateDistribution = (definition: FavouriteDefinition,\r\n selectedField: SelectedField\r\n): FavouriteDefinition => {\r\n\r\n return {\r\n ...definition,\r\n exposureApplication: !!selectedField && !!selectedField.field && selectedField.field.value !== 0\r\n ? { v: selectedField.field.value, d: selectedField.field.description } : undefined,\r\n exposureFactor: !!selectedField && !!selectedField.forEvery ? selectedField.forEvery : undefined,\r\n exposurePercent: !!selectedField && !!selectedField.percentIncrese ? selectedField.percentIncrese : undefined\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { actionCreators } from './actions';\r\nimport { selectionReportTranslations } from '../../constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinitionModification } from '../../types';\r\nimport { SelectionReportState } from '../../types-store';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\nimport { DistributionPanel } from './components/distribution-panel';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { updateDistribution } from './map-to-definition';\r\n\r\ninterface DistributionContainerProps extends FavouriteDefinitionModification { \r\n orderNumber: string;\r\n}\r\n\r\nexport type DistributionContainerComponentProps = DistributionContainerProps\r\n & SelectionReportState & DefaultContainerProps & ReturnType<typeof actionCreators>;\r\n\r\nclass DistributionContainerComponent extends React.PureComponent<DistributionContainerComponentProps> {\r\n public static statePath: string = STATE.selectionReport;\r\n\r\n private updateDefinition = () => {\r\n\r\n const transform = (workingDefinition: FavouriteDefinition) => {\r\n\r\n return updateDistribution(\r\n workingDefinition,\r\n this.props.distributionFieldState.selectedField\r\n );\r\n };\r\n\r\n this.props.updateDefinition(transform);\r\n }\r\n\r\n public componentDidUpdate(prevProps: DistributionContainerComponentProps) {\r\n\r\n if (!deepEquals(prevProps.distributionFieldState.selectedField,\r\n this.props.distributionFieldState.selectedField)) {\r\n this.updateDefinition();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (<DistributionPanel\r\n orderNumber={this.props.orderNumber}\r\n fetching={this.props.distributionFieldState.fetching}\r\n data={this.props.distributionFieldState}\r\n onLoadFields={this.props.loadDistributionFields}\r\n onUpdateDefaultFields={this.props.updateDefaultDistributionFields}\r\n onRemove={this.props.clearValue}\r\n onSelect={this.props.onSelectField}\r\n onUpdateField={this.props.updateSelectedField}\r\n translation={this.props.translation}\r\n />);\r\n }\r\n}\r\n\r\nconst containerFor = (api) =>\r\n containerFactory(DistributionContainerComponent, actionCreators(api), undefined, selectionReportTranslations) as any;\r\n\r\nexport { containerFor as DistributionContainerForApi };\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { FavouriteDefinition, ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\n\r\nimport { actionCreators as aggregationActionCreatorsFor } from '../containers/aggregation/actions';\r\nimport { actionCreators as distributionActionCreatorsFor } from '../containers/distribution/actions';\r\nimport { actionCreators as groupByActionCreatorsFor } from '../containers/group-by/actions';\r\nimport { actionCreators as targetActionCreatorsFor } from '../containers/target/actions';\r\nimport { actionCreators as chartActionCreatorsFor } from '../containers/chart/actions';\r\nimport { api } from './api';\r\nimport { SelectionReportState } from '../types-store';\r\n\r\nconst aggregationActionCreators = aggregationActionCreatorsFor(api);\r\nconst distributionActionCreators = distributionActionCreatorsFor(api);\r\nconst groupByActionCreators = groupByActionCreatorsFor(api);\r\nconst targetActionCreators = targetActionCreatorsFor(api);\r\nconst chartActionCreators = chartActionCreatorsFor(api);\r\n\r\nconst shouldLoadDefaultFields = ({ distributionFieldState, aggregateFieldState }: SelectionReportState) => {\r\n return distributionFieldState.selectedField && !!distributionFieldState.selectedField.field\r\n && aggregateFieldState.selectedAggregateField && !!aggregateFieldState.selectedAggregateField.field\r\n && aggregateFieldState.selectedAggregateField.value;\r\n};\r\n\r\nexport const frequencyActionCreators = {\r\n clearState: (): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n await Promise.all([\r\n dispatch(aggregationActionCreators.clearState()),\r\n dispatch(distributionActionCreators.clearState()),\r\n dispatch(groupByActionCreators.clearState()),\r\n dispatch(targetActionCreators.clearState()),\r\n dispatch(chartActionCreators.clearState())\r\n ]);\r\n }),\r\n loadInitialData: (workingDefinition: FavouriteDefinition): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(chartActionCreators.initializationStart());\r\n\r\n await Promise.all([\r\n dispatch(aggregationActionCreators.loadAggregateDefaultFields()),\r\n dispatch(distributionActionCreators.loadDistributionDefaultFields())\r\n ]);\r\n await Promise.all([\r\n dispatch(aggregationActionCreators.setInitialData(workingDefinition)),\r\n dispatch(distributionActionCreators.setInitialData(workingDefinition)),\r\n dispatch(chartActionCreators.setInitialLayoutType(workingDefinition))\r\n ]);\r\n\r\n if (shouldLoadDefaultFields(getState().selectionReport)) {\r\n await Promise.all([\r\n dispatch(groupByActionCreators.loadGroupByDefaultFields()),\r\n dispatch(groupByActionCreators.loadGroupBySortOrderType())\r\n ]);\r\n await dispatch(groupByActionCreators.setInitialData(workingDefinition));\r\n }\r\n const {\r\n selectionReport: {\r\n aggregateFieldState\r\n }\r\n } = getState();\r\n\r\n if (!!aggregateFieldState.selectedAggregateField && !!aggregateFieldState.selectedAggregateField.value\r\n && aggregateFieldState.selectedAggregateField.value) {\r\n await dispatch(targetActionCreators.loadDefaultFields());\r\n await dispatch(targetActionCreators.setInitialData(workingDefinition));\r\n }\r\n\r\n dispatch(chartActionCreators.initializationEnd());\r\n }),\r\n updateGroupByDefaultFields: (): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n await dispatch(groupByActionCreators.clearState());\r\n if (shouldLoadDefaultFields(getState().selectionReport)) {\r\n await Promise.all([\r\n dispatch(groupByActionCreators.loadGroupByDefaultFields()),\r\n dispatch(groupByActionCreators.loadGroupBySortOrderType())\r\n ]);\r\n }\r\n }),\r\n updateTargetDefaultFields: (): ActionDispatching<any, ApplicationState> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n await dispatch(targetActionCreators.clearState());\r\n const {\r\n selectionReport: {\r\n aggregateFieldState\r\n }\r\n } = getState();\r\n if (!!aggregateFieldState.selectedAggregateField\r\n && !!aggregateFieldState.selectedAggregateField.value\r\n ) {\r\n dispatch(targetActionCreators.loadDefaultFields());\r\n }\r\n })\r\n};\r\n","import * as React from 'react';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\n\r\nimport { DrawerWithBar } from 'ui';\r\nimport { DragNDropContext } from '../components/drag-n-drop-context';\r\n// import { TargetPanel } from './components/target-area/target-panel';\r\nimport styles from '../selection-report.scss';\r\nimport { SelectionReportState } from '../types-store';\r\nimport { selectionReportTranslations, frequencyReportId } from '../constants';\r\nimport { STATE } from 'app/constants';\r\nimport { AggregationContainerForApi } from '../containers/aggregation/aggregation-container';\r\nimport { api } from './api';\r\nimport { GroupByContainerForApi } from '../containers/group-by/group-by-container';\r\nimport { TargetContainerForApi } from '../containers/target/target-container';\r\nimport { ChartContainerForApi } from '../containers/chart/chart-container';\r\nimport { DistributionContainerForApi } from '../containers/distribution/distribution-container';\r\nimport { frequencyActionCreators } from './actions';\r\nimport { aggregationFieldChanged } from '../containers/aggregation/aggregation-field';\r\nimport { ReportSelectedOptions } from '../components/selected-options';\r\nimport { caseTypeIds } from '../caseTypeIds';\r\nimport { transformSelectedReport } from '../selected-report';\r\n\r\nconst AggregationContainer = AggregationContainerForApi(api);\r\nconst DistributionContainer = DistributionContainerForApi(api);\r\nconst GroupByContainer = GroupByContainerForApi(api);\r\nconst TargetContainer = TargetContainerForApi(api);\r\nconst ChartContainer = ChartContainerForApi(api);\r\n\r\nexport interface FrequencyReportContainerProps {\r\n definition: FavouriteDefinition;\r\n workingDefinition: FavouriteDefinition;\r\n updateDefinition: (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => void;\r\n}\r\n\r\nexport interface FrequencyReportContainerState {\r\n initiallyOpen: boolean;\r\n}\r\n\r\nconst arraysAreEqual = (array1: number[], array2: number[]) => {\r\n return !!array1 && !!array2\r\n && array1.length === array2.length\r\n && array1.sort().toString() === array2.sort().toString();\r\n};\r\n\r\nexport type FrequencyReportContainerComponentProps = FrequencyReportContainerProps\r\n & SelectionReportState & DefaultContainerProps & typeof frequencyActionCreators;\r\n\r\nclass FrequencyReportContainerComponent extends React.Component<\r\n FrequencyReportContainerComponentProps,\r\n FrequencyReportContainerState\r\n > {\r\n public static statePath: string = STATE.selectionReport;\r\n constructor(props: FrequencyReportContainerComponentProps) {\r\n super(props);\r\n\r\n const definition = props.workingDefinition.reports.find(r => r.report.v === frequencyReportId);\r\n this.state = {\r\n initiallyOpen: !!definition && !definition.aggregationDomain\r\n };\r\n }\r\n\r\n private defaultGroupByFieldShouldBeUpdated = (prevProps: FrequencyReportContainerComponentProps) => {\r\n const {\r\n distributionFieldState: { selectedField: distributionSelectedField },\r\n aggregateFieldState: { selectedAggregateField },\r\n workingDefinition\r\n } = this.props;\r\n const {\r\n distributionFieldState: { selectedField: prevDistributionSelectedField },\r\n aggregateFieldState: { selectedAggregateField: prevSelectedAggregateField },\r\n workingDefinition: prevWorkingDefinition\r\n } = prevProps;\r\n return (\r\n (prevDistributionSelectedField && distributionSelectedField\r\n && prevDistributionSelectedField.field !== distributionSelectedField.field)\r\n || (!prevDistributionSelectedField && !!distributionSelectedField)\r\n || (!!prevDistributionSelectedField && !distributionSelectedField)\r\n )\r\n || (\r\n (!!selectedAggregateField && !!prevSelectedAggregateField && selectedAggregateField.field !== prevSelectedAggregateField.field)\r\n || (!!selectedAggregateField && !!prevSelectedAggregateField && selectedAggregateField.value !== prevSelectedAggregateField.value)\r\n || (!prevSelectedAggregateField && !!selectedAggregateField)\r\n || (!!prevSelectedAggregateField && !selectedAggregateField)\r\n )\r\n || !arraysAreEqual(caseTypeIds(workingDefinition), caseTypeIds(prevWorkingDefinition));\r\n }\r\n\r\n public componentDidUpdate(prevProps: FrequencyReportContainerComponentProps) {\r\n const {\r\n aggregateFieldState,\r\n distributionFieldState\r\n } = this.props;\r\n\r\n if (!aggregateFieldState.initialized && !aggregateFieldState.fetching\r\n && !distributionFieldState.initialized && !distributionFieldState.fetching\r\n ) {\r\n this.props.loadInitialData(this.props.workingDefinition);\r\n }\r\n\r\n if (this.defaultGroupByFieldShouldBeUpdated(prevProps)) {\r\n this.props.updateGroupByDefaultFields();\r\n }\r\n if (aggregationFieldChanged(prevProps.aggregateFieldState, aggregateFieldState)) {\r\n this.props.updateTargetDefaultFields();\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearState();\r\n }\r\n\r\n private additionalAggregateDefinitionUpdate = (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => {\r\n this.props.updateDefinition(transformSelectedReport(transform, {\r\n rollingAverage: undefined,\r\n selections: [],\r\n targetApp: undefined\r\n }));\r\n }\r\n\r\n private additionalDistributionDefinitionUpdate = (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => {\r\n this.props.updateDefinition(transformSelectedReport(transform, {\r\n rollingAverage: undefined,\r\n selections: []\r\n }));\r\n }\r\n\r\n public render() {\r\n const {\r\n definition,\r\n workingDefinition,\r\n updateDefinition,\r\n aggregateFieldState,\r\n distributionFieldState,\r\n groupByFieldState,\r\n targetFieldState,\r\n chartState,\r\n translation\r\n } = this.props;\r\n const disabledGroupBy = !this.props.distributionFieldState.selectedField || !this.props.aggregateFieldState.selectedAggregateField;\r\n const disabledTarget = !this.props.aggregateFieldState.selectedAggregateField;\r\n const barContent = chartState.initializationEnd && <ReportSelectedOptions\r\n aggregation={aggregateFieldState}\r\n distribution={distributionFieldState}\r\n groupBy={groupByFieldState}\r\n target={targetFieldState}\r\n translation={translation}\r\n />;\r\n const panels = <DragNDropContext>\r\n <AggregationContainer orderNumber=\"1\"\r\n definition={definition}\r\n workingDefinition={workingDefinition}\r\n updateDefinition={this.additionalAggregateDefinitionUpdate}\r\n />\r\n <DistributionContainer orderNumber=\"2\"\r\n definition={definition}\r\n workingDefinition={workingDefinition}\r\n updateDefinition={this.additionalDistributionDefinitionUpdate}\r\n />\r\n <GroupByContainer orderNumber=\"3\" disabled={disabledGroupBy}\r\n definition={definition}\r\n workingDefinition={workingDefinition}\r\n updateDefinition={updateDefinition}\r\n />\r\n <TargetContainer orderNumber=\"4\" disabled={disabledTarget}\r\n definition={definition}\r\n workingDefinition={workingDefinition}\r\n updateDefinition={updateDefinition}\r\n />\r\n </DragNDropContext>;\r\n return (<div className={styles.selectionReportView}>\r\n <DrawerWithBar\r\n title={this.props.translation.selection_report_extend_btn}\r\n barContent={barContent}\r\n drawerContent={panels}\r\n initiallyOpen={this.state.initiallyOpen}\r\n >\r\n <ChartContainer {...this.props} />\r\n </DrawerWithBar>\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nconst container = containerFactory<FrequencyReportContainerProps>(\r\n FrequencyReportContainerComponent, frequencyActionCreators, undefined, selectionReportTranslations);\r\n\r\nexport { container as FrequencyReportContainer };\r\n","import * as React from 'react';\r\nimport { CaseListing } from 'app/area/case-listing';\r\nimport { SelectionReportContainer, FrequencyReportContainer } from 'app/area/reports';\r\nimport { reportTypes } from './constants';\r\nimport { FavouriteResultProps } from './types';\r\n\r\nconst renderers = {\r\n [reportTypes.selectionReport]: SelectionReportContainer,\r\n [reportTypes.frequencyReport]: FrequencyReportContainer,\r\n [reportTypes.mergedReport]: (props => <div>Not implemented</div>)\r\n};\r\n\r\nexport const FavouriteResult = (props: FavouriteResultProps & { report: number }) => {\r\n\r\n const { report } = props;\r\n const Component = renderers[report];\r\n\r\n if (!!Component) {\r\n return <Component {...props} />;\r\n }\r\n\r\n return <CaseListing {...props} />;\r\n};\r\n","import { compile } from 'app/infrastructure/js/template';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\n\r\nconst linkUrl = 'sler://server=${server}&template=${template}&searchId=${searchId}&reportId=${reportId}';\r\nconst reportId = 281;\r\n\r\nexport const caseViewTemplate = 'CaseView';\r\nexport const actionViewTemplate = 'ActionView';\r\n\r\nexport const urlToExcel = (favouriteId: number, template: string) => {\r\n\r\n const serverUrl = AppSetting.ApiBaseUrl;\r\n\r\n const context = {\r\n server: serverUrl.substr(0, serverUrl.lastIndexOf('/api')),\r\n searchId: favouriteId,\r\n template,\r\n reportId\r\n };\r\n return compile(linkUrl, context);\r\n};\r\n","import * as React from 'react';\r\nimport { SharedState } from 'app/types-shared';\r\nimport { PromptConfirmationModal } from 'ui';\r\nimport { urlToExcel, caseViewTemplate, actionViewTemplate } from './url-to-excel';\r\n\r\ninterface ExcelLinksProps {\r\n favouriteId?: number;\r\n sharedState: SharedState;\r\n translation: any;\r\n}\r\nclass ExcelLink extends React.PureComponent<{ favouriteId: number, label: string; template: string, translation: any }, {}> {\r\n\r\n private handleExcel = (e: React.SyntheticEvent<any>) => {\r\n\r\n const { favouriteId, template } = this.props;\r\n window.location.assign(urlToExcel(favouriteId, template));\r\n }\r\n\r\n public render() {\r\n\r\n const { translation, label } = this.props;\r\n\r\n return (<PromptConfirmationModal\r\n title={translation.excel_modal_title}\r\n description={translation.excel_modal_description}\r\n continueText={translation.excel_modal_ok_button}\r\n cancelText={translation.excel_modal_cancel_button}\r\n onContinue={this.handleExcel}>\r\n <li><button type=\"button\" className=\"dropdown-item\">{label}</button></li>\r\n </PromptConfirmationModal>);\r\n }\r\n}\r\n\r\nexport const ExcelLinks = (props: ExcelLinksProps) => {\r\n\r\n return !!props.favouriteId && !!props.sharedState.access && !!props.sharedState.access.tools.excelAddIn && <>\r\n <ExcelLink label={props.translation.excel_edit_cases}\r\n template={caseViewTemplate}\r\n favouriteId={props.favouriteId}\r\n translation={props.translation} />\r\n <ExcelLink label={props.translation.excel_edit_cases_with_actions}\r\n template={actionViewTemplate}\r\n favouriteId={props.favouriteId}\r\n translation={props.translation} />\r\n </>;\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { withDropdownMenu } from 'ui/common/dropdown-menu';\r\nimport { MeatballMenu } from 'ui/common/dropdown-menu/meatball-menu';\r\nimport { SharedState } from 'app/types-shared';\r\nimport { ExcelLinks } from './favourite-excel-links';\r\nimport { DropdownMenuContext } from 'ui/common/dropdown-menu/types';\r\nimport styles from './display-options.scss';\r\nimport { FavouriteReportDownload } from 'app/area/favourite/types';\r\nimport { reportTypes } from 'app/area/favourite/constants';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { isValidUrl } from 'app/infrastructure/validation/url';\r\nimport { urlToSurveyManager } from 'app/area/favourite/components/url-to-survey-manager';\r\nimport { Link as ExternalLink } from 'ui';\r\nimport { triggerPrintDialog } from 'app/infrastructure/platform';\r\n\r\ninterface FavouriteContextMenuProps {\r\n favouriteId?: number;\r\n report?: number;\r\n translation: any;\r\n sharedState: SharedState;\r\n createReport: () => void;\r\n updateReport: () => void;\r\n showUpdate?: boolean;\r\n displayExportToZip: () => void;\r\n downloadReport: (data: FavouriteReportDownload) => void;\r\n getMulitpleSuppliersUrl: () => void;\r\n urlMultipleSuppliers?: string;\r\n}\r\n\r\nconst FavouriteContextItem = withDropdownMenu((props: DropdownMenuContext & { onClick: () => void, label: string }) => {\r\n\r\n const { label, onClick, handleDropdownHide } = props;\r\n const onClickHandler = () => {\r\n handleDropdownHide();\r\n onClick();\r\n };\r\n\r\n return <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={onClickHandler}>\r\n {label}\r\n </button>\r\n </li>;\r\n});\r\n\r\nexport class FavouriteContextMenu extends React.Component<FavouriteContextMenuProps, any> {\r\n\r\n private fetchMultipleSuppliersUrl = () => {\r\n this.props.getMulitpleSuppliersUrl && this.props.getMulitpleSuppliersUrl();\r\n }\r\n\r\n private onCreateReport = () => {\r\n this.props.createReport();\r\n };\r\n private onUpdateReport = () => {\r\n this.props.updateReport();\r\n }\r\n\r\n private onPrint = () => {\r\n triggerPrintDialog();\r\n }\r\n\r\n private onDownloadReport = () => {\r\n this.props.downloadReport({\r\n favouriteId: this.props.favouriteId,\r\n reportId: this.props.report,\r\n successMessage: () => <Link\r\n style={{ color: '#fff' }}\r\n to={routeConstants.myDownloadsView}>\r\n {this.props.translation.download_report_success}\r\n </Link>\r\n });\r\n };\r\n\r\n public render() {\r\n const {translation, urlMultipleSuppliers} = this.props;\r\n\r\n return <div className={styles.meatball}>\r\n <MeatballMenu onExpandMenu={this.fetchMultipleSuppliersUrl}>\r\n <FavouriteContextItem label={translation.create_report_title} onClick={this.onCreateReport} />\r\n {this.props.showUpdate &&\r\n <FavouriteContextItem label={translation.update_report_title} onClick={this.onUpdateReport} />}\r\n {this.props.sharedState.access && this.props.sharedState.access.tools.exportAndImport.export &&\r\n <FavouriteContextItem label={translation.export_title} onClick={this.props.displayExportToZip} />}\r\n {this.props.report === reportTypes.selectionReport\r\n && <FavouriteContextItem label={translation.download_selection_report_title}\r\n onClick={this.onDownloadReport} />}\r\n {this.props.report === reportTypes.frequencyReport\r\n && <FavouriteContextItem label={translation.download_frequency_report_title}\r\n onClick={this.onDownloadReport} />}\r\n <ExcelLinks {...this.props} />\r\n {this.props.sharedState.access && this.props.sharedState.access.surveyManager.send && urlMultipleSuppliers &&\r\n isValidUrl(urlToSurveyManager(urlMultipleSuppliers, this.props.favouriteId))\r\n && <ExternalLink url={urlToSurveyManager(urlMultipleSuppliers, this.props.favouriteId)}\r\n linkText={translation.open_in_survey_manager} className={'dropdown-item'} />}\r\n <FavouriteContextItem label={translation.print_displayed} onClick={this.onPrint} />\r\n </MeatballMenu>\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { DropdownMenu, SortOrder } from 'ui';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { SortOptions } from 'ui/sort-order/types';\r\nimport MdArrowDropdown from 'react-icons/lib/md/arrow-drop-down';\r\nimport { SharedState } from 'app/types-shared';\r\nimport { FavouriteContextMenu } from './favourite-context-menu';\r\n\r\nimport styles from './display-options.scss';\r\nimport { FavouriteReportDownload } from 'app/area/favourite/types';\r\n\r\nexport interface DisplayOptionsLinkProps {\r\n value: number;\r\n isActive: boolean;\r\n description: string;\r\n}\r\n\r\nclass DisplayOptionsLink extends React.Component<DisplayOptionsLinkProps, {}> {\r\n\r\n private onClick = (e: React.SyntheticEvent<any>) => {\r\n e.preventDefault();\r\n navigate.toSearch({ report: this.props.value.toString(10) });\r\n }\r\n\r\n public render() {\r\n return (<button type=\"button\" onClick={this.onClick} className={`dropdown-item ${this.props.isActive && 'active'}`}>\r\n {this.props.description}\r\n </button>\r\n );\r\n }\r\n}\r\n\r\nexport interface DisplayOptionsProps {\r\n sortOptions?: SortOptions;\r\n reportCategory?: any;\r\n report?: number;\r\n favouriteId?: number;\r\n translation: any;\r\n sharedState: SharedState;\r\n loadSortOptions: () => void;\r\n updateSortOptions: (options: SortOptions) => void;\r\n fetchingSortOptions: boolean;\r\n createReport: () => void;\r\n showUpdate?: boolean;\r\n updateReport: () => void;\r\n displayExportToZip: () => void;\r\n downloadReport: (data: FavouriteReportDownload) => void;\r\n getMulitpleSuppliersUrl: () => void;\r\n}\r\n\r\nexport const DisplayOptions = (props: DisplayOptionsProps) => {\r\n\r\n const { report, reportCategory } = props;\r\n\r\n const selectedOption = reportCategory.find(r => r.value === report);\r\n const toggle = <div>\r\n <span>{selectedOption && selectedOption.description}</span>\r\n <MdArrowDropdown className=\"dropdown-arrow\" />\r\n </div>;\r\n\r\n const onDone = (options: SortOptions) => {\r\n props.updateSortOptions(options);\r\n };\r\n\r\n return <div className={styles.main}>\r\n <div className={styles.sortOrder}>\r\n <SortOrder\r\n componentId={'1'}\r\n translation={props.translation}\r\n options={props.sortOptions}\r\n loadOptions={props.loadSortOptions}\r\n onDone={onDone}\r\n fetching={props.fetchingSortOptions} />\r\n </div>\r\n <div className={styles.viewAs}>\r\n <span className={styles.outerLabel}>{props.translation.view_as}</span>\r\n <DropdownMenu dropdownNode={toggle} closeAfterClick>\r\n {props.reportCategory.map(c => (\r\n <DisplayOptionsLink\r\n key={c.value}\r\n value={c.value}\r\n isActive={c.value === report}\r\n description={c.description} />\r\n ))}\r\n </DropdownMenu>\r\n </div>\r\n <FavouriteContextMenu {...props} />\r\n </div>;\r\n};\r\n","import { FavouriteCondition, FavouriteDefinition, Value } from 'app/types-shared';\r\nimport { searchInAllFieldsDomain } from './constants';\r\n\r\nexport const updateQueryCondition = (query: string, originalConditions: FavouriteCondition[] = []): FavouriteCondition[] => {\r\n\r\n return !!(originalConditions.length > 0 || query)\r\n ? [\r\n ...originalConditions.filter(c => (c.domain as Value).v !== searchInAllFieldsDomain),\r\n ...(!!query ?\r\n [{\r\n id: 0,\r\n domainDbFunction: {\r\n v: 0 // Not selected\r\n },\r\n domain: {\r\n v: searchInAllFieldsDomain // Search in all fields\r\n },\r\n valueOperator: {\r\n v: 2 // Or\r\n },\r\n conditionOperator: {\r\n v: 0 // Not selected\r\n },\r\n exactLevel: false,\r\n forceExists: false,\r\n values: [\r\n {\r\n id: 1,\r\n dbFunction: {\r\n v: 0 // Not selected\r\n },\r\n operator: {\r\n v: 14 // Equal\r\n },\r\n periodPredef: {\r\n v: 0 // Not selected\r\n },\r\n string: query,\r\n type: 'System.String'\r\n }\r\n ]\r\n }]\r\n : [])\r\n ]\r\n : [];\r\n};\r\n\r\nexport const updateDefinitionWithQuery = (query: string) => (definition: FavouriteDefinition): FavouriteDefinition => ({\r\n ...definition,\r\n conditions: updateQueryCondition(query, definition.conditions)\r\n});\r\n","import { FavouriteDefinition, DefaultSortOrder } from 'app/types-shared';\r\nimport { mapSortOrder } from './mapping';\r\n\r\nexport const updateDefinitionWithSort = (report: number, sortOrder: DefaultSortOrder[]) =>\r\n (definition: FavouriteDefinition): FavouriteDefinition => {\r\n\r\n return {\r\n ...definition,\r\n reports:\r\n (definition.reports || []).map(r => r.report.v === report\r\n ? {\r\n ...r,\r\n sort: mapSortOrder(sortOrder)\r\n }\r\n : r\r\n )\r\n };\r\n };\r\n","import { \r\n FavouriteDefinition, Value, FavouriteCondition, \r\n FavouriteConditionValue, FavouriteConnections, \r\n ReportDefinition, SelectionDefinition \r\n} from 'app/types-shared';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\n\r\nexport function favouriteDefinitionsAreEqual(definitionA: FavouriteDefinition, definitionB: FavouriteDefinition) {\r\n const dataA = getFavouriteDefinitionData(definitionA);\r\n const dataB = getFavouriteDefinitionData(definitionB);\r\n\r\n return deepEquals(dataA, dataB);\r\n}\r\n\r\nfunction getFavouriteDefinitionData(definition: FavouriteDefinition) {\r\n return {\r\n emailSubscribers: definition.emailSubscribers,\r\n favourite: getRawValue(definition.favourite),\r\n selectedReport: getRawValue(definition.selectedReport),\r\n conditions: (definition.conditions || []).map(getConditionData),\r\n connections: (definition.connections || []).map(getConnectionData),\r\n exposureApplication: getRawValue(definition.exposureApplication),\r\n exposureFactor: definition.exposureFactor,\r\n exposurePercent: definition.exposurePercent,\r\n reports: (definition.reports || []).map(getReportData)\r\n };\r\n}\r\n\r\nfunction getReportData(report: ReportDefinition) {\r\n return {\r\n report: getRawValue(report.report),\r\n aggregationType: getRawValue(report.aggregationType),\r\n targetApp: getRawValue(report.targetApp),\r\n aggregationDomain: getRawValue(report.aggregationDomain),\r\n specialReport: getRawValue(report.specialReport),\r\n layoutType: getRawValue(report.layoutType),\r\n layoutAttributes: report.layoutAttributes,\r\n uomSetDomain: getRawValue(report.uomSetDomain),\r\n type: getRawValue(report.type),\r\n sort: report.sort,\r\n selections: (report.selections || []).map(getSelectionData),\r\n options: report.options,\r\n excludedOptions: report.excludedOptions,\r\n rollingAverage: report.rollingAverage,\r\n predefDate: report.predefDate\r\n };\r\n}\r\n\r\nfunction getSelectionData(selection: SelectionDefinition) {\r\n return {\r\n id: selection.id,\r\n domain: getRawValue(selection.domain),\r\n interval: selection.interval,\r\n levels: selection.levels,\r\n period: getRawValue(selection.period),\r\n type: getRawValue(selection.type),\r\n setLevelAccToCond: selection.setLevelAccToCond,\r\n fillEmpty: selection.fillEmpty,\r\n selectedCode: selection.selectedCode,\r\n sortOrderType: getRawValue(selection.sortOrderType)\r\n };\r\n}\r\n\r\nfunction getConnectionData(connection: FavouriteConnections) {\r\n return {\r\n connected: getRawValue(connection.connected),\r\n operator: getRawValue(connection.operator)\r\n };\r\n}\r\n\r\nfunction getConditionData(condition: FavouriteCondition) {\r\n return {\r\n domainDbFunction: getRawValue(condition.domainDbFunction),\r\n domain: getRawValue(condition.domain),\r\n valueOperator: getRawValue(condition.valueOperator),\r\n conditionOperator: getRawValue(condition.conditionOperator),\r\n conditionOperator2: getRawValue(condition.conditionOperator2),\r\n extraSqlCondition: condition.extraSqlCondition,\r\n exactLevel: condition.exactLevel,\r\n forceExists: condition.forceExists,\r\n values: (condition.values || []).map(getConditionValueData)\r\n };\r\n}\r\n\r\nfunction getConditionValueData(conditionValue: FavouriteConditionValue) {\r\n return {\r\n dbFunction: getRawValue(conditionValue.dbFunction),\r\n operator: getRawValue(conditionValue.operator),\r\n periodPredef: getRawValue(conditionValue.periodPredef),\r\n code: getRawValue(conditionValue.code),\r\n number: conditionValue.number,\r\n number2: conditionValue.number2,\r\n string: conditionValue.string,\r\n date: conditionValue.date,\r\n myValue: conditionValue.myValue\r\n };\r\n}\r\n\r\nfunction getRawValue(value: Value) {\r\n return value && value.v;\r\n}\r\n","import * as React from 'react';\r\nimport { Search } from 'ui';\r\nimport { SpinLoader } from 'app/components/spin-loader';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { FavouriteCondition, FavouriteDefinition } from 'app/types-shared';\r\nimport { actionCreators } from './actions';\r\nimport { STATE } from 'app/constants';\r\nimport { FavouriteState } from './types-store';\r\nimport { searchTranslation, openReportState } from './constants';\r\nimport { FavouriteLayout } from './favourite-layout';\r\nimport { hasNavigatedToSearch, isDefinitionChanged } from './selectors';\r\nimport { FavouriteResult } from './favourite-result';\r\nimport { DisplayOptions } from './components/display-options';\r\nimport { returnSearchQuery } from './search-query';\r\nimport { updateDefinitionWithQuery } from './map-query-to-definition';\r\nimport { updateDefinitionWithSort } from './map-sort-to-definition';\r\nimport styles from './favourite.scss';\r\nimport { insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\nimport { SortOptions } from 'ui/sort-order/types';\r\nimport { updateDefinitionWithReport } from 'app/area/favourite/map-report-to-definition';\r\nimport { favouriteDefinitionsAreEqual } from 'app/area/favourite/compare';\r\nimport get from 'lodash/get';\r\n\r\nexport interface FavouriteComponentProps {\r\n favouriteId: number;\r\n favouriteOwnerId: number;\r\n report: number;\r\n}\r\n\r\nexport interface FavouriteComponentState {\r\n searchQuery: string;\r\n createReport: boolean;\r\n updateExistingReport: boolean;\r\n searchQueryTemp: string;\r\n initiallyOpenFilter: boolean;\r\n}\r\n\r\nexport type FavouriteContainerProps = FavouriteComponentProps & FavouriteState & DefaultContainerProps & typeof actionCreators;\r\n\r\nexport class FavouriteComponent extends React.Component<FavouriteContainerProps, FavouriteComponentState> {\r\n public static statePath: string = STATE.favourite;\r\n\r\n constructor(props: FavouriteContainerProps) {\r\n super(props);\r\n\r\n const editFavourite = props.params.modifier === openReportState.edit;\r\n\r\n this.state = {\r\n searchQuery: '',\r\n searchQueryTemp: '',\r\n createReport: editFavourite,\r\n updateExistingReport: editFavourite,\r\n initiallyOpenFilter: props.params.favouriteId === openReportState.new || editFavourite\r\n };\r\n }\r\n\r\n public componentDidMount() {\r\n this.props.loadReportCategory();\r\n this.loadDefinition();\r\n }\r\n\r\n public componentDidUpdate(prevProps: FavouriteContainerProps) {\r\n\r\n if (hasNavigatedToSearch(prevProps, this.props)) {\r\n this.clearData();\r\n this.loadDefinition();\r\n return;\r\n }\r\n\r\n if (prevProps.report !== this.props.report) {\r\n this.updateDefinition(updateDefinitionWithReport(this.props.report));\r\n }\r\n\r\n if (isDefinitionChanged(prevProps, this.props)) {\r\n this.setSearchQuery(this.props.definition.conditions);\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.clearData();\r\n }\r\n\r\n private loadSortOptions = () => {\r\n this.props.loadSortOptions(this.props.report);\r\n }\r\n\r\n private updateSortOptions = (sortOptions: SortOptions) => {\r\n this.updateDefinition(updateDefinitionWithSort(this.props.report, sortOptions.defaultSortOrder));\r\n }\r\n\r\n private loadDefinition() {\r\n const { favouriteId, location } = this.props;\r\n\r\n this.props.loadFavouriteDefinition({\r\n favouriteId,\r\n location\r\n });\r\n }\r\n\r\n private setSearchQuery(conditions: FavouriteCondition[]) {\r\n const searchQuery = returnSearchQuery(conditions) || '';\r\n this.setState({\r\n searchQuery,\r\n searchQueryTemp: searchQuery\r\n });\r\n }\r\n\r\n private clearData = () => {\r\n this.setState({\r\n searchQuery: '',\r\n searchQueryTemp: ''\r\n } as FavouriteComponentState);\r\n this.props.clearResults && this.props.clearResults();\r\n }\r\n\r\n private onChange = (searchQueryTemp: string) => {\r\n if (!searchQueryTemp || searchQueryTemp.trim() === '') {\r\n this.setState({searchQuery: '', searchQueryTemp: ''}, () => {\r\n this.updateDefinition();\r\n });\r\n }\r\n this.setState({ searchQueryTemp });\r\n }\r\n\r\n private onSearch = () => {\r\n this.setState({searchQuery: this.state.searchQueryTemp}, () => {\r\n this.updateDefinition();\r\n });\r\n }\r\n\r\n private onCreateReport = () => {\r\n this.setState({\r\n updateExistingReport: false,\r\n createReport: true\r\n });\r\n }\r\n private onCloseReport = () => {\r\n this.setState({\r\n updateExistingReport: false,\r\n createReport: false\r\n });\r\n }\r\n\r\n private onUpdateReport = () => {\r\n this.setState({\r\n updateExistingReport: true,\r\n createReport: true\r\n });\r\n }\r\n\r\n private updateDefinition = (transform?: (definition: FavouriteDefinition) => FavouriteDefinition) => {\r\n if (!this.props.workingDefinition) {\r\n return;\r\n }\r\n\r\n const currentDefinition = this.props.workingDefinition;\r\n transform = transform || (definition => definition);\r\n const searchTransform = updateDefinitionWithQuery(this.state.searchQuery);\r\n const newDefinition = searchTransform(transform(currentDefinition));\r\n\r\n if (!favouriteDefinitionsAreEqual(currentDefinition, newDefinition)) {\r\n this.props.updateWorkingDefinition(newDefinition);\r\n }\r\n }\r\n\r\n private renderTitle = () => {\r\n const { definition, translation } = this.props;\r\n return <h1>{insertOptionalWordbreaks(definition.favourite.d || translation.search_title)}</h1>;\r\n }\r\n\r\n private renderSearch() {\r\n return (\r\n <div className=\"row\">\r\n <div className=\"col-xl-5 col-lg-12\">\r\n <Search\r\n className={`${styles.searchField} input-wrapper`}\r\n componentId={'searchFieldId'}\r\n onChange={this.onChange}\r\n value={this.state.searchQueryTemp}\r\n maxLength={255}\r\n onSearch={this.onSearch}\r\n minLength={3}\r\n placeholder={this.props.translation.input_placeholder}\r\n focus={true}\r\n wait={0} />\r\n </div>\r\n <div className=\"col-xl-7 col-lg-12\">\r\n <div className={styles.uiDisplayOptions}>\r\n <DisplayOptions\r\n {...this.props}\r\n loadSortOptions={this.loadSortOptions}\r\n updateSortOptions={this.updateSortOptions}\r\n showUpdate={get(this, 'props.sharedState.id') === this.props.favouriteOwnerId}\r\n createReport={this.onCreateReport}\r\n updateReport={this.onUpdateReport}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n\r\n private renderCasesResult() {\r\n return <FavouriteLayout\r\n {...this.props}\r\n isCreateReportOpen={this.state.createReport}\r\n updateExistingReport={this.state.updateExistingReport}\r\n closeReportCreator={this.onCloseReport}\r\n updateDefinition={this.updateDefinition}\r\n initiallyOpenFilters={this.state.initiallyOpenFilter}>\r\n <FavouriteResult\r\n report={this.props.report}\r\n definition={this.props.definition}\r\n workingDefinition={this.props.workingDefinition}\r\n updateDefinition={this.updateDefinition}\r\n />\r\n </FavouriteLayout>;\r\n }\r\n\r\n public render() {\r\n\r\n const { definition, fetchingDefinition, fetchingReportCategory } = this.props;\r\n\r\n const fetching = fetchingDefinition || fetchingReportCategory;\r\n\r\n if (fetching || !definition) {\r\n return <SpinLoader />;\r\n }\r\n\r\n return (<>\r\n <div className={styles.searchHeader}>\r\n <div className=\"container main-grid\">\r\n {this.renderTitle()}\r\n {this.renderSearch()}\r\n </div>\r\n </div>\r\n {this.renderCasesResult()}\r\n </>);\r\n }\r\n}\r\n\r\nconst selectors = {\r\n report: (state: FavouriteState, props: DefaultContainerProps) =>\r\n !!props.location.query.report ? parseInt(props.location.query.report as string, 10) :\r\n (state.workingDefinition && !!state.workingDefinition.selectedReport && state.workingDefinition.selectedReport.v),\r\n favouriteId: (state, props: DefaultContainerProps) => !!props.params.favouriteId && parseInt(props.params.favouriteId, 10),\r\n favouriteOwnerId: (state, props) => {\r\n return get(state, 'definition.validState.owner.v');\r\n }\r\n};\r\n\r\nconst container = containerFactory(FavouriteComponent, actionCreators, selectors, searchTranslation);\r\n\r\nexport {\r\n container as Favourite\r\n};\r\n","import { FavouriteCondition } from 'app/types-shared';\r\nimport { searchInAllFieldsDomain } from 'app/area/favourite/constants';\r\n\r\nexport function returnSearchQuery(conditions: FavouriteCondition[]) {\r\n const searchQueryDomainCondition = conditions.find(item => item.domain.v === searchInAllFieldsDomain);\r\n return searchQueryDomainCondition && searchQueryDomainCondition.values[0].string;\r\n}\r\n","import { commonTranslations } from '../constants';\r\n\r\nexport enum queryFilters {\r\n name = 'search_in_name',\r\n email = 'search_in_email',\r\n id = 'search_in_user_id',\r\n alternativeId = 'search_in_alternative_id',\r\n alternativeName = 'search_in_alternative_id_name'\r\n}\r\n\r\nexport enum userPredefinedFilters {\r\n inactiveUsers,\r\n withoutEmailAddress,\r\n withoutAlternativeID,\r\n administratedByMe\r\n}\r\n\r\nexport enum filterId {\r\n query = 'query',\r\n excludeUsersWithEmail = 'excludeUsersWithEmail',\r\n excludeInactiveUsers = 'excludeInactiveUsers',\r\n usersWithAlternativeId = 'usersWithAlternativeId',\r\n usersFromGroupsAdministratedByMe = 'usersFromGroupsAdministratedByMe',\r\n userType = 'userType',\r\n mainUserGroup = 'mainUserGroup',\r\n myUnit = 'myUnit',\r\n myLocation = 'myLocation',\r\n userRole = 'role',\r\n responsibleForUnit = 'responsibleForUnit',\r\n extendedAccess = 'extendedAccess',\r\n restrictedAccess = 'restrictedAccess',\r\n accessToScreen = 'accessToScreen',\r\n accessToOperation = 'accessOperation',\r\n accessToUserGroup = 'accessToUserGroup',\r\n userCode = 'userCode',\r\n roleCode = 'roleCode',\r\n disabledDate = 'disabledDate'\r\n}\r\n\r\nexport enum fieldType {\r\n root = 'root',\r\n application = 'application',\r\n excludeInherited = 'excludeInherited',\r\n date = 'date'\r\n}\r\n\r\nexport const searchTranslations = {\r\n ...commonTranslations,\r\n search_hits: 7474,\r\n search_no_users: 7572,\r\n search_no_roles: 8052,\r\n add_user: 5541,\r\n add_role: 8037,\r\n new_role: 5482,\r\n role_administration: 8038,\r\n\r\n // query filters\r\n search_on: 8143,\r\n name: 5244,\r\n email: 5245,\r\n user_id: 5243,\r\n role_id: 4897,\r\n alternative_id: 4898,\r\n alternative_id_name: 8138,\r\n\r\n // filter labels\r\n filters_title: 7556,\r\n filters_predefined_filters: 7553,\r\n filters_exclude: 7638,\r\n filters_include: 7639,\r\n clear_all: 8139,\r\n\r\n // predefined filters\r\n inactive_users: 8142,\r\n users_administrated_by_me: 8159,\r\n without_email: 8141,\r\n without_alternative_id: 8140,\r\n\r\n // filter names\r\n role: 5247,\r\n responsible_for_unit: 8157,\r\n user_type: 7620,\r\n main_user_group: 5250,\r\n extended_access: 7701,\r\n restricted_access: 5268,\r\n access_to_operation: 5285,\r\n access_to_screen: 5286,\r\n access_to_administrate_user_group: 5276,\r\n code: 5483,\r\n my_unit: 7714,\r\n my_location: 7715,\r\n disabled_date: 8397,\r\n\r\n // filter labels\r\n application_or_case_type: 7699,\r\n case_type: 4015,\r\n unit: 5262,\r\n operation: 5258,\r\n screen: 5255,\r\n exclude_inherited_from_role: 8158,\r\n\r\n // filter menus\r\n clear_filter: 7662,\r\n filter_menu_option_include: 7698,\r\n filter_menu_option_exclude: 7693,\r\n filter_menu_option_include_sub: 7696,\r\n filter_menu_option_exclude_sub: 7691,\r\n filter_menu_option_include_parent: 8180,\r\n filter_menu_option_exclude_parent: 8178,\r\n\r\n // filter options\r\n search: 7345,\r\n no_options_found: 7644,\r\n done: 7338,\r\n\r\n // filter summary\r\n show_details: 7640,\r\n hide_details: 7641,\r\n filter_summary_exclude: 8034,\r\n filter_summary_exclude_sub: 8033,\r\n filter_summary_exclude_parent: 8179,\r\n\r\n // filter validation\r\n number_validator_error: 7725,\r\n\r\n // excel\r\n excel_export_item_text: 8149,\r\n excel_started: 8151,\r\n excel_success: 8150,\r\n\r\n no_access_has_been_granted: 8156,\r\n no_access_to_role_administration: 8296,\r\n no_access_to_user_administration: 8297,\r\n\r\n filters_date_range_to: 7600,\r\n filters_date_range_from: 7567,\r\n filters_date_range_date_interval: 3707,\r\n filters_not_specified_title: 7832,\r\n filters_not_specified_subtitle: 7831\r\n};\r\n\r\nexport type SearchTranslation = {\r\n readonly [T in keyof typeof searchTranslations]: string\r\n};\r\n","export const commonTranslations = {\r\n user_administration: 5241,\r\n delete_user: 5539,\r\n delete_user_desc: 7566,\r\n user_successfully_deleted: 8008,\r\n delete_role: 8049,\r\n delete_role_desc: 8051,\r\n role_successfully_deleted: 8050,\r\n duplicate_user: 8244,\r\n cancel: 3273\r\n};\r\n\r\nexport const ids = {\r\n users: {\r\n name: 'user-name',\r\n email_address: 'user-email',\r\n user_id: 'user-user-id',\r\n disabled_date: 'user-disabled-date',\r\n change_password_button: 'user-change-password-button',\r\n user_type: 'user-type',\r\n main_user_group: 'main-user-group',\r\n current_user_group: 'current-user-group',\r\n unit: 'user-unit',\r\n location: 'user-location',\r\n default_language: 'user-default-language',\r\n add_button: 'add-new-user-button',\r\n export_excel: 'export-excel',\r\n cancel_button: 'user-cancel-button',\r\n save_button: 'user-save-button'\r\n },\r\n roles: {\r\n id: 'role-id',\r\n name: 'role-name',\r\n add_button: 'add-new-role-button',\r\n cancel_button: 'role-cancel-button',\r\n save_button: 'role-save-button'\r\n },\r\n search: {\r\n box: 'search-box-area',\r\n personId: 'search-tile-person-id'\r\n },\r\n number_of_hits: 'number-of-hits',\r\n no_hits: 'no-hits',\r\n list_search: 'list-search',\r\n list_search_item: (id) => `list-search-item-${id}`\r\n};\r\n","import { ComplexValue } from 'app/types-shared';\r\nimport { ValidationProps } from 'ui';\r\nimport { SearchTranslation } from 'app/area/administration/list/constants';\r\n\r\nexport enum PredefinedIds {\r\n filter = 'predefined_filter',\r\n include = 'predefined_include',\r\n exclude = 'predefined_exclude'\r\n}\r\n\r\nexport enum CustomFilterType {\r\n code = 'code',\r\n codeHierarchy = 'codeHierarchy',\r\n codeHierarchyParents = 'codeHierarchyParents',\r\n checkbox = 'checkbox',\r\n inputFilter = 'inputFilter',\r\n dateRange = 'dateRange'\r\n}\r\n\r\nexport interface FilterConfiguration<T> {\r\n component: React.FC<FilterCommonProps<T>> | React.ComponentClass<FilterCommonProps<T>>;\r\n menuOptions: FilterMenuOption;\r\n locale?: string;\r\n}\r\n\r\nexport interface FilterMenuOption {\r\n clear?: boolean;\r\n excludeInclude?: boolean;\r\n excludeIncludeChildren?: boolean;\r\n excludeIncludeParents?: boolean;\r\n}\r\n\r\nexport interface FilterMenuValues {\r\n exclude?: boolean;\r\n excludeChildren?: boolean;\r\n excludeParents?: boolean;\r\n}\r\n\r\ninterface FilterValues {\r\n optionsEndpoint?: string;\r\n optionsParams?: any;\r\n}\r\n\r\nexport interface FilterField extends FilterValues {\r\n fieldTypeId: string;\r\n type: CustomFilterType;\r\n label?: string;\r\n options?: ComplexValue<number>[];\r\n divider?: boolean;\r\n includeInSummary?: boolean;\r\n}\r\n\r\nexport interface Filter {\r\n id: string;\r\n label: string;\r\n type: FilterType;\r\n fields: FilterField[];\r\n}\r\n\r\nexport enum FilterType {\r\n TEXT_RANGE,\r\n DATE_RANGE,\r\n SELECTED_IDS\r\n}\r\n\r\nexport interface FilterValidation {\r\n id: string;\r\n validation: ValidationProps;\r\n}\r\n\r\nexport type FilterCommonTypes = number | string | Date;\r\n\r\nexport interface FilterCommonValues<T> {\r\n value: T;\r\n description?: string;\r\n optionType?: OptionType;\r\n subOptionType?: SubOptionType;\r\n}\r\n\r\nexport type FilterPayloadValues<T> = { [key: string]: FilterCommonValues<T>[] };\r\n\r\nexport interface FilterCommonProps<T> extends FilterValues {\r\n id: string;\r\n label?: string;\r\n values: FilterCommonValues<T>[];\r\n onChange: (id: string, values: FilterCommonValues<T>[]) => void;\r\n options?: ComplexValue<number | string>[];\r\n onLoadOptions: (id: string, optionsEndpoint: string, loadOptionsParams: any, optionsParams?: any) => void;\r\n fetchingOptions: boolean;\r\n translation: any;\r\n locale: string;\r\n validation?: ValidationProps;\r\n filterValidation: FilterValidation[];\r\n onFilterValidationChange: (filterValidation: FilterValidation) => void;\r\n}\r\n\r\nexport interface FilterOption {\r\n codes?: ComplexValue<number | string>[];\r\n query?: string;\r\n fetching: boolean;\r\n}\r\n\r\n/**\r\n * Filter external props\r\n */\r\nexport interface FilterConfigurationProps {\r\n\r\n filters: Filter[];\r\n typeMappings: { [key: string]: FilterConfiguration<FilterCommonTypes> };\r\n\r\n values: FilterPayloadValues<FilterCommonTypes>;\r\n onChange: (id: string, values: FilterCommonValues<FilterCommonTypes>[]) => void;\r\n\r\n menuValues: { [key: string]: FilterMenuValues };\r\n onChangeMenu: (id: string, values: FilterMenuValues) => void;\r\n\r\n filterValidation: FilterValidation[];\r\n onFilterValidationChange: (filterValidation: FilterValidation) => void;\r\n\r\n options: { [key: string]: FilterOption };\r\n onLoadOptions: (id: string, optionsEndpoint: string, loadOptionsParams: any, optionsParams?: any) => void;\r\n\r\n predefinedOptions: ComplexValue<number | string>[];\r\n\r\n openFilters: { [key: string]: boolean };\r\n openCloseFilter: (id: string, open: boolean) => void;\r\n\r\n clearAllFilters: () => void;\r\n}\r\n\r\nexport interface MapToSummaryPayload {\r\n filters: Filter[];\r\n values: FilterPayloadValues<FilterCommonTypes>;\r\n menuValues: { [key: string]: FilterMenuValues };\r\n translation: SearchTranslation;\r\n locale: string;\r\n filterValidation: FilterValidation[];\r\n}\r\n\r\nexport interface MapCustomFieldPayload extends Partial<MapToSummaryPayload> {\r\n id: string;\r\n label: string;\r\n filterType: FilterType;\r\n}\r\n\r\nexport enum OptionType {\r\n specified = 'specified',\r\n notSpecified = 'notSpecified'\r\n}\r\n\r\nexport enum SubOptionType {\r\n dateFrom = 'dateFrom',\r\n dateTo = 'dateTo'\r\n}\r\n","import * as React from 'react';\r\nimport FaAngleDown from 'react-icons/lib/fa/angle-down';\r\n\r\nimport styles from './filter-panel.scss';\r\n\r\ninterface FilterPanelProps {\r\n id: string;\r\n header: string;\r\n count: number;\r\n required?: boolean;\r\n open: boolean;\r\n\r\n openCloseFilter: (id: string, open: boolean) => void;\r\n}\r\n\r\ninterface FilterPanelState {\r\n isClosing: boolean;\r\n}\r\n\r\nexport class FilterPanel extends React.PureComponent<FilterPanelProps, FilterPanelState> {\r\n\r\n private timer: NodeJS.Timer;\r\n\r\n public state: Readonly<FilterPanelState> = {\r\n isClosing: false\r\n };\r\n\r\n public componentWillUnmount() {\r\n if (this.timer) {\r\n clearTimeout(this.timer);\r\n this.timer = undefined;\r\n }\r\n }\r\n\r\n private onClick = () => {\r\n\r\n if (this.timer) {\r\n clearTimeout(this.timer);\r\n this.timer = undefined;\r\n }\r\n\r\n if (this.props.open) {\r\n\r\n this.props.openCloseFilter(this.props.id, false);\r\n this.setState({\r\n isClosing: true\r\n });\r\n\r\n this.timer = setTimeout(() => {\r\n this.setState({\r\n isClosing: false\r\n });\r\n }, 300);\r\n\r\n } else {\r\n\r\n this.props.openCloseFilter(this.props.id, true);\r\n this.setState({\r\n isClosing: false\r\n });\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const { header: label, count, required, open, children } = this.props;\r\n\r\n const animateOutStyles = this.state.isClosing ? styles.animateOut : '';\r\n const isOpenStyles = open ? styles.isOpen : styles.isClosed;\r\n\r\n return <div className={`${styles.filterPanel} filter-panel`}>\r\n <button type=\"button\" className={styles.titleStyle} onClick={this.onClick}>\r\n {!!required && <span className=\"asterisk-required\">* </span>}\r\n {label}\r\n {count > 0 && <span> ({count})</span>}\r\n {<FaAngleDown className={open && !this.state.isClosing ? 'expand-icon-down' : 'expand-icon-up'} />}\r\n </button>\r\n\r\n <div className={`${animateOutStyles} ${isOpenStyles} ${styles.contentWrapper}`}>\r\n <div className={styles.content}>\r\n {children}\r\n </div>\r\n </div>\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MeatballMenu } from 'ui';\r\nimport { FilterMenuOption, FilterMenuValues } from './types';\r\n\r\nimport styles from './filter-panel-menu.scss';\r\n\r\ninterface FilterPanelMenuProps {\r\n id: string;\r\n options: FilterMenuOption;\r\n values?: FilterMenuValues;\r\n onClear: () => void;\r\n onChange?: (id: string, values: FilterMenuValues) => void;\r\n translation: any;\r\n}\r\n\r\nexport class FilterPanelMenu extends React.PureComponent<FilterPanelMenuProps> {\r\n\r\n private onIncludeExclude = () => {\r\n\r\n const { id, values, onChange } = this.props;\r\n\r\n onChange && onChange(id, {\r\n ...values,\r\n exclude: !values || !values.exclude\r\n });\r\n }\r\n\r\n private onIncludeExcludeChildren = () => {\r\n\r\n const { id, values, onChange } = this.props;\r\n\r\n onChange && onChange(id, {\r\n ...values,\r\n excludeChildren: !values || !values.excludeChildren\r\n });\r\n }\r\n\r\n private onIncludeExcludeParents = () => {\r\n\r\n const { id, values, onChange } = this.props;\r\n\r\n onChange && onChange(id, {\r\n ...values,\r\n excludeParents: !values || !values.excludeParents\r\n });\r\n }\r\n\r\n private renderText = () => {\r\n\r\n const { options, values, translation } = this.props;\r\n const displayExclude = options.excludeInclude && !!values && values.exclude;\r\n const displayExcludeChildren = options.excludeIncludeChildren && !!values && values.excludeChildren;\r\n const displayExcludeParents = options.excludeIncludeParents && !!values && values.excludeParents;\r\n\r\n if (!displayExclude && !displayExcludeChildren && !displayExcludeParents) {\r\n return null;\r\n }\r\n\r\n return <div className=\"float-left\">\r\n <ul>\r\n {displayExclude && <li>\r\n <span>{translation.filter_menu_option_exclude}</span>\r\n </li>}\r\n {displayExcludeChildren && <li>\r\n <span>{translation.filter_menu_option_exclude_sub}</span>\r\n </li>}\r\n {displayExcludeParents && <li>\r\n <span>{translation.filter_menu_option_exclude_parent}</span>\r\n </li>}\r\n </ul>\r\n </div>;\r\n }\r\n\r\n private renderMenu = () => {\r\n\r\n const { options, values, onClear, translation } = this.props;\r\n\r\n return <div className={styles.filterMeatballMenu}>\r\n <MeatballMenu closeAfterClick>\r\n {options.clear && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={onClear}>\r\n {translation.clear_filter}\r\n </button>\r\n </li>}\r\n {options.excludeInclude && !!values && values.exclude && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onIncludeExclude}>\r\n {translation.filter_menu_option_include}\r\n </button>\r\n </li>}\r\n {options.excludeInclude && (!values || !values.exclude) && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onIncludeExclude}>\r\n {translation.filter_menu_option_exclude}\r\n </button>\r\n </li>}\r\n {options.excludeIncludeChildren && !!values && values.excludeChildren && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onIncludeExcludeChildren}>\r\n {translation.filter_menu_option_include_sub}\r\n </button>\r\n </li>}\r\n {options.excludeIncludeChildren && (!values || !values.excludeChildren) && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onIncludeExcludeChildren}>\r\n {translation.filter_menu_option_exclude_sub}\r\n </button>\r\n </li>}\r\n {options.excludeIncludeParents && !!values && values.excludeParents && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onIncludeExcludeParents}>\r\n {translation.filter_menu_option_include_parent}\r\n </button>\r\n </li>}\r\n {options.excludeIncludeParents && (!values || !values.excludeParents) && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onIncludeExcludeParents}>\r\n {translation.filter_menu_option_exclude_parent}\r\n </button>\r\n </li>}\r\n </MeatballMenu>\r\n </div>;\r\n };\r\n\r\n public render() {\r\n\r\n const { options } = this.props;\r\n\r\n return !!options && <div className=\"clearfix\">\r\n {this.renderText()}\r\n <div className=\"float-right\">\r\n {this.renderMenu()}\r\n </div>\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FilterConfigurationProps, FilterField } from './types';\r\nimport { FilterPanelMenu } from './filter-panel-menu';\r\n\r\ninterface FilterItemFieldProps {\r\n id: string;\r\n field: FilterField;\r\n filterSettings: FilterConfigurationProps;\r\n\r\n translation: any;\r\n locale: string;\r\n\r\n onClear: () => void;\r\n}\r\n\r\nexport const FilterItemField: React.FC<FilterItemFieldProps> = ({\r\n id, field, translation, locale, onClear, filterSettings: {\r\n values, onChange, onFilterValidationChange, filterValidation, menuValues, onChangeMenu, options, onLoadOptions, typeMappings\r\n } }) => {\r\n\r\n const FilterComponent = typeMappings[field.type].component;\r\n const menuOptions = typeMappings[field.type].menuOptions;\r\n const hasMenuOptions = !!menuOptions && Object.keys(menuOptions).length > 0;\r\n\r\n return <>\r\n {hasMenuOptions && <FilterPanelMenu\r\n id={id}\r\n options={menuOptions}\r\n values={menuValues[id]}\r\n onChange={onChangeMenu}\r\n onClear={onClear}\r\n translation={translation}\r\n />}\r\n <FilterComponent\r\n id={id}\r\n label={field.label}\r\n onChange={onChange}\r\n onFilterValidationChange={onFilterValidationChange}\r\n onLoadOptions={onLoadOptions}\r\n translation={translation}\r\n values={values[id]}\r\n filterValidation={filterValidation}\r\n options={options[id] && options[id].codes || field.options}\r\n optionsEndpoint={field.optionsEndpoint}\r\n optionsParams={field.optionsParams}\r\n fetchingOptions={options[id] && options[id].fetching || false}\r\n locale={locale}\r\n />\r\n </>;\r\n};\r\n","import { FilterField, FilterCommonTypes, FilterPayloadValues } from './types';\r\n\r\nexport const getFieldId = (filterId: string, fieldTypeId: string) => `${filterId}_${fieldTypeId}`;\r\n\r\nexport const countFilter = (\r\n fields: FilterField[] = [],\r\n values: FilterPayloadValues<FilterCommonTypes> = {} as any,\r\n id: string\r\n) => fields.reduce(\r\n (total, field) => {\r\n\r\n if (field.includeInSummary === false) {\r\n return total;\r\n }\r\n\r\n const fieldId = getFieldId(id, field.fieldTypeId);\r\n const amount = values[fieldId] && values[fieldId].length || 0;\r\n return total + amount;\r\n }, 0);\r\n","import * as React from 'react';\r\nimport { FilterPanel } from './filter-panel';\r\nimport { FilterItemField } from './filter-item-field';\r\nimport { Filter, FilterConfigurationProps } from './types';\r\nimport { getFieldId, countFilter } from './selectors';\r\n\r\nimport styles from './filter-item.scss';\r\n\r\ninterface FilterItemProps {\r\n filter: Filter;\r\n filterSettings: FilterConfigurationProps;\r\n\r\n translation: any;\r\n locale: string;\r\n}\r\n\r\nexport class FilterItem extends React.PureComponent<FilterItemProps> {\r\n\r\n private onClear = () => {\r\n\r\n const { filter, filterSettings: {\r\n onChange, onChangeMenu\r\n } } = this.props;\r\n\r\n filter.fields.forEach(field => {\r\n\r\n const id = getFieldId(filter.id, field.fieldTypeId);\r\n\r\n onChange(id, undefined);\r\n onChangeMenu(id, undefined);\r\n });\r\n }\r\n\r\n public render() {\r\n const { filter, filterSettings, translation, locale } = this.props;\r\n\r\n const { values, openFilters, openCloseFilter } = filterSettings;\r\n\r\n return <FilterPanel\r\n id={filter.id}\r\n header={filter.label}\r\n count={countFilter(filter.fields, values, filter.id)}\r\n open={openFilters[filter.id]}\r\n openCloseFilter={openCloseFilter}>\r\n {!!filter.fields && filter.fields.map(\r\n field =>\r\n <div className={styles.filterItem} key={getFieldId(filter.id, field.fieldTypeId)}>\r\n <FilterItemField\r\n id={getFieldId(filter.id, field.fieldTypeId)}\r\n field={field}\r\n filterSettings={filterSettings}\r\n translation={translation}\r\n locale={locale}\r\n onClear={this.onClear} />\r\n {!!field.divider && <hr />}\r\n </div>\r\n )}\r\n </FilterPanel>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SelectMultipleHierarchy } from 'ui';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { FilterPanel } from './filter-panel';\r\nimport { FilterPanelMenu } from './filter-panel-menu';\r\nimport { PredefinedIds, FilterCommonValues, FilterCommonTypes } from './types';\r\n\r\ninterface FilterPredefinedProps {\r\n includeValues: FilterCommonValues<FilterCommonTypes>[];\r\n excludeValues: FilterCommonValues<FilterCommonTypes>[];\r\n options: ComplexValue<number | string>[];\r\n onChange: (id: string, values: FilterCommonValues<number>[]) => void;\r\n\r\n open: boolean;\r\n openCloseFilter: (id: string, open: boolean) => void;\r\n\r\n translation: any;\r\n}\r\n\r\ninterface FilterPredefinedState {\r\n query: string[];\r\n}\r\n\r\nconst emptyList = [];\r\n\r\nexport class FilterPredefined extends React.PureComponent<FilterPredefinedProps, FilterPredefinedState> {\r\n\r\n public state: Readonly<FilterPredefinedState> = {\r\n query: []\r\n };\r\n\r\n private onClear = () => {\r\n const { onChange } = this.props;\r\n\r\n onChange(PredefinedIds.include, undefined);\r\n onChange(PredefinedIds.exclude, undefined);\r\n }\r\n\r\n private onChangeInclude = (values: FilterCommonValues<number>[]) => {\r\n this.props.onChange(PredefinedIds.include, values);\r\n }\r\n\r\n private onChangeExclude = (values: FilterCommonValues<number>[]) => {\r\n this.props.onChange(PredefinedIds.exclude, values);\r\n }\r\n\r\n private loadOptions = (options: { query: string }) => {\r\n this.setState({\r\n query: options.query && options.query\r\n .split(' ')\r\n .map(s => s.trim().toLowerCase())\r\n .filter(s => s)\r\n || emptyList\r\n });\r\n }\r\n\r\n public render() {\r\n\r\n const { includeValues, excludeValues, options, translation, open, openCloseFilter } = this.props;\r\n\r\n const count = (includeValues ? includeValues.length : 0) + (excludeValues ? excludeValues.length : 0);\r\n\r\n const filteredOptions = (this.state.query && this.state.query.length > 0\r\n ? options && options.filter(o => this.state.query.every(q => o.description.toLowerCase().indexOf(q) > -1))\r\n : options) || emptyList;\r\n\r\n return <FilterPanel\r\n id={PredefinedIds.filter}\r\n header={translation.filters_predefined_filters}\r\n count={count}\r\n open={open}\r\n openCloseFilter={openCloseFilter} >\r\n <FilterPanelMenu\r\n id={PredefinedIds.filter}\r\n options={{ clear: true }}\r\n onClear={this.onClear}\r\n translation={translation}\r\n />\r\n <SelectMultipleHierarchy\r\n componentId={PredefinedIds.include}\r\n className={undefined}\r\n label={{text: translation.filters_include}}\r\n\r\n valueItems={includeValues || emptyList}\r\n onChange={this.onChangeInclude}\r\n\r\n options={filteredOptions.filter(o => !excludeValues || !excludeValues.some(v => o.value === v.value))}\r\n onLoadOptions={this.loadOptions}\r\n\r\n textOptionsNotFound={translation && translation.no_options_found}\r\n textOptionsDone={translation && translation.done}\r\n placeholder={translation && translation.search}\r\n />\r\n <hr />\r\n <SelectMultipleHierarchy\r\n componentId={PredefinedIds.exclude}\r\n className={undefined}\r\n label={{text: translation.filters_exclude}}\r\n\r\n valueItems={excludeValues || emptyList}\r\n onChange={this.onChangeExclude}\r\n\r\n options={filteredOptions.filter(o => !includeValues || !includeValues.some(v => o.value === v.value))}\r\n onLoadOptions={this.loadOptions}\r\n\r\n textOptionsNotFound={translation && translation.no_options_found}\r\n textOptionsDone={translation && translation.done}\r\n placeholder={translation && translation.search}\r\n />\r\n </FilterPanel>;\r\n }\r\n}\r\n","import { FilterCommonValues, FilterCommonTypes, SubOptionType } from './types';\r\nimport { DateFormatters } from 'app/infrastructure/data/types';\r\n\r\nexport const createDate = (\r\n formatters: DateFormatters,\r\n value: FilterCommonTypes\r\n): string => {\r\n return value instanceof Date && formatters.formatDate(value, { day: 'numeric', month: 'short', year: 'numeric' });\r\n};\r\n\r\nexport const createDateValue = (\r\n value: FilterCommonValues<FilterCommonTypes>[],\r\n subOptionType: SubOptionType,\r\n formatters: DateFormatters\r\n): string => {\r\n const date = value && value.find(f => f.subOptionType === subOptionType);\r\n return date && createDate(formatters, date.value);\r\n};\r\n","import { OptionItem } from 'app/components/display-selected-options/display-selected-options';\r\nimport {\r\n PredefinedIds, FilterType, MapToSummaryPayload, MapCustomFieldPayload,\r\n OptionType, SubOptionType, FilterPayloadValues, FilterCommonTypes, FilterCommonValues\r\n} from './types';\r\nimport { getFieldId } from './selectors';\r\nimport { ValidationLevel } from 'ui';\r\nimport { SearchTranslation } from 'app/area/administration/list/constants';\r\nimport { createFormatters } from 'app/infrastructure/data/date';\r\nimport { createDateValue } from 'app/area/administration/list/filters/create-date';\r\n\r\ninterface FilterSummaryField {\r\n id: string;\r\n label?: string;\r\n values: (string | number)[];\r\n options: string[];\r\n}\r\n\r\ninterface FilterSummary {\r\n title: string;\r\n fields: FilterSummaryField[];\r\n}\r\n\r\nconst mapPredefinedFilters = (includeValues: FilterCommonValues<FilterCommonTypes>[] = [],\r\n excludeValues: FilterCommonValues<FilterCommonTypes>[] = [],\r\n translation: any): FilterSummary[] =>\r\n includeValues.length === 0 && excludeValues.length === 0\r\n ? []\r\n : [{\r\n title: translation.filters_predefined_filters,\r\n fields: [\r\n ...(includeValues.length > 0 ? [{\r\n id: 'predef_incl',\r\n values: includeValues.map(i => i && i.description || ''),\r\n options: []\r\n }] : []),\r\n ...(excludeValues.length > 0 ? [{\r\n id: 'predef_excl',\r\n values: excludeValues.map(i => i && i.description || ''),\r\n options: [translation.filter_summary_exclude]\r\n }] : [])\r\n ]\r\n }];\r\n\r\nconst maptCustomFieldValues = (\r\n id: string,\r\n filterType: FilterType,\r\n values: FilterPayloadValues<FilterCommonTypes>,\r\n translation: any,\r\n locale: string\r\n) => {\r\n const value = values[id];\r\n const formatters = createFormatters(locale);\r\n\r\n const dateFromValue = createDateValue(value, SubOptionType.dateFrom, formatters);\r\n const dateToValue = createDateValue(value, SubOptionType.dateTo, formatters);\r\n const notSpecified = value.some(f => f.optionType === OptionType.notSpecified);\r\n\r\n const fieldValue = {\r\n [FilterType.TEXT_RANGE]: [values[id][0].value],\r\n [FilterType.DATE_RANGE]: value && [\r\n (dateFromValue && dateToValue)\r\n ? (dateFromValue + ' - ' + dateToValue)\r\n : (notSpecified\r\n ? translation.filters_not_specified_title\r\n : (dateFromValue || dateToValue)\r\n )\r\n ]\r\n } || {};\r\n\r\n return fieldValue[filterType] || values[id].map(v => v.description);\r\n};\r\n\r\nconst mapCustomField = (dataToMap: MapCustomFieldPayload): FilterSummaryField[] => {\r\n const { filterType, id, label, values = {}, menuValues = {}, translation, locale } = dataToMap;\r\n return values[id] && values[id].length && isFilterValid(dataToMap)\r\n ? [{\r\n id,\r\n label: label,\r\n\r\n values: maptCustomFieldValues(id, filterType, values, translation, locale),\r\n\r\n options: [\r\n ...(menuValues && menuValues[id] && menuValues[id].exclude ? [translation.filter_summary_exclude] : []),\r\n ...(menuValues && menuValues[id] && menuValues[id].excludeChildren ? [translation.filter_summary_exclude_sub] : []),\r\n ...(menuValues && menuValues[id] && menuValues[id].excludeParents ? [translation.filter_summary_exclude_parent] : [])\r\n ]\r\n }]\r\n : [];\r\n};\r\n\r\nconst isFilterValid = (dataToMap: MapCustomFieldPayload): boolean => {\r\n const { filterType, id, filterValidation } = dataToMap;\r\n if (filterType !== FilterType.TEXT_RANGE) {\r\n return true;\r\n }\r\n\r\n const validationResult = filterValidation && filterValidation.find(validation => validation.id === id);\r\n\r\n return !(validationResult && validationResult.validation && validationResult.validation.level === ValidationLevel.error);\r\n};\r\n\r\nconst mapCustomFilters = (dataToMap: MapToSummaryPayload): FilterSummary[] => {\r\n const { filters = [], values, menuValues, translation = {} as SearchTranslation, filterValidation, locale } = dataToMap;\r\n return filters\r\n .reduce((summary, filter) => {\r\n const filterFields = filter.fields;\r\n\r\n if (!filterFields) {\r\n return [];\r\n }\r\n\r\n const fields = filterFields.filter(field => field.includeInSummary !== false)\r\n .reduce((result, field) => [\r\n ...result,\r\n ...mapCustomField({\r\n id: getFieldId(filter.id, field.fieldTypeId),\r\n label: field.label, values, menuValues, translation,\r\n filterType: filter.type, filterValidation,\r\n locale\r\n })\r\n ], []);\r\n\r\n return fields.length > 0\r\n ? [\r\n ...summary,\r\n {\r\n title: filter.label,\r\n fields\r\n }\r\n ]\r\n : summary;\r\n }, [] as FilterSummary[]);\r\n\r\n};\r\n\r\nconst mapToOptionItems = (filters: FilterSummary[]): OptionItem[] =>\r\n filters.reduce((result, filter) => [\r\n ...result,\r\n ...filter.fields.map(field => ({\r\n label: field.label ? `${filter.title} - ${field.label}` : filter.title,\r\n value: field.id,\r\n selections: {\r\n values: field.values,\r\n excludedValues: field.options,\r\n titles: []\r\n }\r\n }))\r\n ], [] as OptionItem[]);\r\n\r\nexport const mapToSummary = (dataToMap: MapToSummaryPayload): OptionItem[] => {\r\n const { values = {}, translation = {} } = dataToMap;\r\n\r\n return mapToOptionItems([\r\n ...mapPredefinedFilters(values[PredefinedIds.include], values[PredefinedIds.exclude], translation),\r\n ...mapCustomFilters(dataToMap)\r\n ]);\r\n};\r\n","import * as React from 'react';\r\nimport { DrawerWithBar, ButtonInline } from 'ui';\r\nimport { DisplaySelectedOptions } from 'app/components/display-selected-options/display-selected-options';\r\nimport { FilterConfigurationProps, PredefinedIds } from './types';\r\nimport { FilterItem } from './filter-item';\r\nimport { FilterPredefined } from './filter-predefined';\r\nimport { mapToSummary } from './map-to-summary';\r\nimport { countFilter } from './selectors';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\nimport styles from './search-filters.scss';\r\n\r\ninterface FilterListProps {\r\n filterSettings: FilterConfigurationProps;\r\n translation: any;\r\n locale: string;\r\n}\r\n\r\nexport const SearchFilters: React.FC<FilterListProps> = props => {\r\n\r\n const { filterSettings, translation, locale, children } = props;\r\n\r\n if (!filterSettings || !filterSettings.filters || filterSettings.filters.length === 0) {\r\n return <MainGridContainer>\r\n {children}\r\n </MainGridContainer>;\r\n }\r\n\r\n const { filters, values, onChange, menuValues, predefinedOptions, openFilters, openCloseFilter, filterValidation } = filterSettings;\r\n const { [PredefinedIds.include]: include = [], [PredefinedIds.exclude]: exclude = [] } = values || {};\r\n\r\n const count = (include.length > 0 || exclude.length > 0 ? 1 : 0) +\r\n filterSettings.filters.reduce(\r\n (total, filter) => total + (countFilter(filter.fields, values, filter.id) > 0 ? 1 : 0), 0);\r\n\r\n const countText = count > 0 ? ' (' + count + ')' : '';\r\n\r\n const drawerContent = <>\r\n <div className={styles.informationPanel}>\r\n <ButtonInline onClick={filterSettings.clearAllFilters}>\r\n {translation.clear_all}\r\n </ButtonInline>\r\n </div>\r\n\r\n {predefinedOptions !== undefined\r\n && <FilterPredefined\r\n includeValues={values && values[PredefinedIds.include]}\r\n excludeValues={values && values[PredefinedIds.exclude]}\r\n options={predefinedOptions}\r\n onChange={onChange}\r\n open={openFilters && openFilters[PredefinedIds.filter]}\r\n openCloseFilter={openCloseFilter}\r\n translation={translation}\r\n />}\r\n\r\n {filters.map(filter => <FilterItem\r\n key={filter.id}\r\n translation={translation}\r\n locale={locale}\r\n\r\n filter={filter}\r\n filterSettings={filterSettings}\r\n />)}\r\n </>;\r\n\r\n const summary = <DisplaySelectedOptions\r\n selectedOptions={mapToSummary({ filters, values, menuValues, translation, locale, filterValidation })}\r\n textHideDetails={translation.hide_details}\r\n textShowDetails={translation.show_details}\r\n />;\r\n\r\n return <div className={`container main-grid ${styles.searchResults}`}>\r\n <DrawerWithBar\r\n title={`${translation.filters_title}${countText}`}\r\n barContent={summary}\r\n drawerContent={drawerContent}>\r\n <div className=\"caselisting\">\r\n {children}\r\n </div>\r\n </DrawerWithBar>\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { FlatOptions } from 'ui/common/select/flat-options/flat-options';\r\nimport { SelectType } from 'ui/common/select/types';\r\nimport { QueryConfigurationProps } from './types';\r\n\r\nimport styles from './search-attributes.scss';\r\n\r\nexport const SearchAttributes: React.FC<QueryConfigurationProps & { translation: any }> = ({\r\n options, values, onChangeQueryValue, translation\r\n}) => !!options && options.length > 0 &&\r\n <div className={styles.attributeSelector}>\r\n <span className={styles.showLabel}>\r\n {translation.search_on}\r\n </span>\r\n <FlatOptions\r\n options={options}\r\n valueItems={values}\r\n showIcons={false}\r\n selectType={SelectType.multiple}\r\n onSelectOption={onChangeQueryValue}\r\n />\r\n </div>;\r\n","import * as React from 'react';\r\nimport { Search } from 'ui';\r\nimport { SearchAttributes } from 'app/area/administration/list/search-container/search-attributes';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { QueryConfigurationProps } from './types';\r\n\r\nimport styles from './search-layout.scss';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\ninterface SearchLayoutProps {\r\n title: string;\r\n translation: any;\r\n querySettings?: QueryConfigurationProps;\r\n rightToolbar: JSX.Element;\r\n onSearch: () => void;\r\n}\r\n\r\nexport const SearchLayout: React.FC<SearchLayoutProps> = ({\r\n title, rightToolbar, translation, querySettings, onSearch\r\n}) => (\r\n <div className={styles.searchHeader}>\r\n <MainGridContainer>\r\n <div id={ids.list_search} className=\"row\">\r\n <div className=\"col-12\">\r\n <h1>{title}</h1>\r\n </div>\r\n </div>\r\n {!!querySettings && <div className=\"row\">\r\n <div id={ids.list_search} className=\"col-lg-10 col-md-12\">\r\n <Search\r\n className={`${styles.searchField} input-wrapper`}\r\n componentId={ids.search.box}\r\n onChange={querySettings.onChangeQuery}\r\n value={querySettings.query}\r\n minLength={1}\r\n maxLength={255}\r\n onSearch={onSearch}\r\n placeholder={translation.search}\r\n focus={true} />\r\n <SearchAttributes translation={translation} {...querySettings} />\r\n </div>\r\n {!!rightToolbar && <div className=\"col-lg-2 col-md-12\">\r\n <div className={styles.searchToolbar}>\r\n {rightToolbar}\r\n </div>\r\n </div>}\r\n </div>}\r\n </MainGridContainer>\r\n </div>\r\n );\r\n","import * as React from 'react';\r\nimport { Waypoint } from 'react-waypoint';\r\nimport { ElementLoader } from 'ui';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { SearchTileProps } from './types';\r\nimport { SearchResults } from '../types-store';\r\n\r\nimport styles from './search-result.scss';\r\n\r\ninterface SearchResultProps {\r\n results: SearchResults;\r\n noHitLabel: string;\r\n canDuplicate: boolean;\r\n translation: any;\r\n\r\n resultTile: React.SFC<SearchTileProps>;\r\n\r\n onFetchMore: () => void;\r\n onDelete: (id: number) => void;\r\n onLoadPersonAccess: (id: number) => void;\r\n onClearPersonAccess: () => void;\r\n}\r\n\r\nexport const SearchResult: React.FC<SearchResultProps> = (props) => {\r\n\r\n const { noHitLabel, canDuplicate, translation, resultTile: Tile, onFetchMore, onDelete, onLoadPersonAccess, onClearPersonAccess } = props;\r\n const { fetching = false, total, list = [], itemPersonAccess } = props.results;\r\n\r\n if (total === 0 && !fetching) {\r\n return <p id={ids.no_hits} className={styles.searchHits}>\r\n {noHitLabel}\r\n </p>;\r\n }\r\n\r\n return <>\r\n {!!total && <div id={ids.number_of_hits} className={styles.searchHits}>\r\n {total} {translation.search_hits}\r\n </div>}\r\n {!!list && list\r\n .map(item =>\r\n <Tile\r\n key={item.id}\r\n data={item}\r\n itemPersonAccess={itemPersonAccess}\r\n translation={translation}\r\n canDuplicate={canDuplicate}\r\n onDelete={!item.deleted && onDelete}\r\n onLoadPersonAccess={onLoadPersonAccess}\r\n onClearPersonAccess={onClearPersonAccess} />\r\n )}\r\n <Waypoint key=\"wpRole\" onEnter={onFetchMore} scrollableAncestor={window} bottomOffset=\"-10%\" />\r\n {fetching ? <ElementLoader /> : null}\r\n </>;\r\n};\r\n","import * as React from 'react';\r\nimport { SearchFilters } from '../filters/search-filters';\r\nimport { FilterConfigurationProps } from '../filters/types';\r\nimport { SearchResults } from '../types-store';\r\nimport { SearchTileProps, QueryConfigurationProps } from './types';\r\nimport { SearchLayout } from './search-layout';\r\nimport { SearchResult } from './search-result';\r\n\r\ninterface SearchContainerProps {\r\n results: SearchResults;\r\n title: string;\r\n noHitLabel: string;\r\n locale: string;\r\n translation: any;\r\n\r\n querySettings: QueryConfigurationProps;\r\n filterSettings?: FilterConfigurationProps;\r\n\r\n resultTile: React.SFC<SearchTileProps>;\r\n rightToolbar: JSX.Element;\r\n\r\n canDuplicate?: boolean;\r\n\r\n onLoadData: (startIndex?: number) => void;\r\n onLoadPersonAccess: (id: number) => void;\r\n onClearPersonAccess: () => void;\r\n onDelete: (id: number) => void;\r\n}\r\n\r\nconst emptyFilter = { filters: [], values: {}, menuValues: {} };\r\n\r\nexport class SearchContainer extends React.PureComponent<SearchContainerProps> {\r\n\r\n public componentDidMount() {\r\n this.props.onLoadData();\r\n }\r\n\r\n public componentDidUpdate(prevProps: SearchContainerProps) {\r\n\r\n const { querySettings: { query = '', values: queryValues = undefined } = {}, onLoadData } = this.props;\r\n const { filters, values, menuValues } = this.props.filterSettings || emptyFilter;\r\n const { querySettings: { query: prevQuery = '', values: prevQueryValues = undefined } = {} } = prevProps;\r\n const { values: prevFilterValues, menuValues: prevFilterMenuValues,\r\n filters: prevFilterConfiguration } = prevProps.filterSettings || emptyFilter;\r\n\r\n if (prevQuery !== query\r\n || prevQueryValues !== queryValues\r\n || prevFilterValues !== values\r\n || prevFilterMenuValues !== menuValues\r\n || prevFilterConfiguration !== filters) {\r\n\r\n onLoadData();\r\n }\r\n }\r\n\r\n private onFetchMore = () => {\r\n\r\n const { results, onLoadData } = this.props;\r\n\r\n if (results.fetching || !results.list || results.list.length === 0 || results.list.length === results.total) {\r\n return;\r\n }\r\n\r\n onLoadData(results.list.length);\r\n }\r\n\r\n private onSearch = () => {\r\n this.props.onLoadData();\r\n }\r\n\r\n public render() {\r\n\r\n const { resultTile, rightToolbar, results, title, noHitLabel, canDuplicate, translation,\r\n onDelete, onLoadPersonAccess, onClearPersonAccess, querySettings, filterSettings, locale } = this.props;\r\n return <>\r\n <SearchLayout\r\n title={title}\r\n rightToolbar={rightToolbar}\r\n querySettings={querySettings}\r\n translation={translation}\r\n onSearch={this.onSearch} />\r\n <SearchFilters\r\n filterSettings={filterSettings}\r\n translation={translation}\r\n locale={locale}>\r\n <SearchResult\r\n resultTile={resultTile}\r\n results={results}\r\n noHitLabel={noHitLabel}\r\n canDuplicate={canDuplicate}\r\n translation={translation}\r\n onFetchMore={this.onFetchMore}\r\n onDelete={onDelete}\r\n onLoadPersonAccess={onLoadPersonAccess}\r\n onClearPersonAccess={onClearPersonAccess} />\r\n </SearchFilters>\r\n </>;\r\n }\r\n}\r\n","export const endpoint = {\r\n user: 'user/search',\r\n role: 'role/search',\r\n userType: 'user/userType/options',\r\n userGroup: 'user/usergroup/all/options',\r\n unit: 'user/unit/options',\r\n location: 'user/location/options',\r\n userRole: 'user/role/all/options',\r\n responsibleForUnit: 'user/unit/options',\r\n accessToScreen: 'user/accesstoscreen/screen/options',\r\n roleAccessToOperation: 'role/operationaccess/operation/options',\r\n userAccessToOperation: 'user/operationaccess/operation/options',\r\n userApplication: 'user/application/options',\r\n roleApplication: 'role/operationaccess/application/all/options',\r\n caseType: 'user/casetype/options',\r\n exportToExcel: 'user/exportToExcel'\r\n};\r\n","import { RemoteAdminData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { ApiResponse } from 'app/types-shared';\r\nimport { endpoint } from './endpoints';\r\nimport { SearchApiResponse } from './types';\r\nimport { FilterSearchModel } from './types-store';\r\n\r\nexport const api = {\r\n\r\n getUsers: async (startIndex: number, maxResults: number, model: FilterSearchModel) => {\r\n\r\n const response: any = await new RemoteAdminData(endpoint.user)\r\n .resource<ApiResponse<SearchApiResponse>>()\r\n .filter({ startIndex, maxResults })\r\n .create(model, false);\r\n\r\n return await response.json();\r\n },\r\n\r\n getRoles: async (startIndex: number, maxResults: number, model: FilterSearchModel) => {\r\n\r\n const response: any = await new RemoteAdminData(endpoint.role)\r\n .resource<ApiResponse<SearchApiResponse>>()\r\n .filter({ startIndex, maxResults })\r\n .create(model, false);\r\n\r\n return await response.json();\r\n },\r\n\r\n exportToExcel: async (startIndex: number, maxResults: number, model: FilterSearchModel): Promise<Blob> => {\r\n return await new RemoteAdminData(endpoint.exportToExcel)\r\n .resource<Blob>()\r\n .filter({ startIndex, maxResults })\r\n .blob(model);\r\n }\r\n};\r\n","export const endpoint = {\r\n user: 'user',\r\n role: 'role',\r\n userAccess: 'user/access',\r\n roleAccess: 'role/access'\r\n};\r\n","import { RemoteAdminData } from 'app/infrastructure/remote-data';\r\nimport { endpoint } from './endpoints';\r\nimport { AccessPerson } from 'app/components/access-panel/shared/types';\r\nimport { ApiResponse } from 'app/types-shared';\r\n\r\nexport const sharedApi = {\r\n\r\n deleteUser: async (id: number) => {\r\n return await new RemoteAdminData(endpoint.user)\r\n .resource<ApiResponse<any>>()\r\n .withId(id)\r\n .httpDelete(id);\r\n },\r\n\r\n deleteRole: async (id: number) => {\r\n return await new RemoteAdminData(endpoint.role)\r\n .resource<ApiResponse<any>>()\r\n .withId(id)\r\n .httpDelete(id);\r\n },\r\n\r\n userAccess: async (id: number) => {\r\n const response = await new RemoteAdminData(endpoint.userAccess)\r\n .resource<ApiResponse<AccessPerson[]>>()\r\n .filter({ id })\r\n .single();\r\n\r\n return response.data;\r\n },\r\n\r\n roleAccess: async (id: number) => {\r\n const response = await new RemoteAdminData(endpoint.roleAccess)\r\n .resource<ApiResponse<AccessPerson[]>>()\r\n .filter({ id })\r\n .single();\r\n\r\n return response.data;\r\n }\r\n};\r\n","export const downloadFile = (blob: Blob, filenameWithExtension: string) => {\r\n if (navigator.msSaveBlob) {\r\n navigator.msSaveBlob(blob, filenameWithExtension);\r\n }\r\n\r\n else {\r\n const objectUrl = window.URL.createObjectURL(blob);\r\n const anchor = document.createElement('a');\r\n anchor.href = objectUrl;\r\n anchor.download = filenameWithExtension;\r\n document.body.appendChild(anchor);\r\n anchor.click();\r\n\r\n setTimeout(() => {\r\n document.body.removeChild(anchor);\r\n window.URL.revokeObjectURL(objectUrl);\r\n }, 0);\r\n }\r\n};\r\n","import * as navigate from 'app/area/shared/navigation';\r\nimport { HttpStatusCodes } from 'app/infrastructure/remote-data';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { textCollection } from 'app/constants';\r\n\r\ninterface BlockAccessParams {\r\n dispatch: any;\r\n getState: () => ApplicationState;\r\n area: keyof typeof textCollection;\r\n translationId: number;\r\n}\r\n\r\nconst getErrorMessage = (blockAccessParams: BlockAccessParams): string => {\r\n const { getState, translationId, area } = blockAccessParams;\r\n\r\n const areaState = getState()[area];\r\n\r\n const translate = createDescriptionSelector(areaState.texts);\r\n\r\n return translate(translationId);\r\n};\r\n\r\nexport const blockAccess = (blockAccessParams: BlockAccessParams) => {\r\n const { dispatch, getState } = blockAccessParams;\r\n\r\n const errorMessage = getErrorMessage(blockAccessParams);\r\n\r\n const isErrorNotificationUnique = getState().app.messages\r\n && getState().app.messages.find(message => message.message === errorMessage) === undefined;\r\n\r\n if (isErrorNotificationUnique) {\r\n dispatch(new ErrorNotification(errorMessage));\r\n }\r\n\r\n if (window.location.pathname !== routeConstants.startupView) {\r\n navigate.toStartupView();\r\n }\r\n};\r\n\r\nexport const isForbiddenStatus = (err) => err && err.response && err.response.status === HttpStatusCodes.FORBIDDEN;\r\n\r\nexport const isBadRequest = (err) => err && err.response && err.response.status === HttpStatusCodes.BAD_REQUEST;\r\n\r\nexport const isNotAcceptable = (err) => err && err.response && err.response.status === HttpStatusCodes.NOT_ACCEPTABLE;\r\n","import { AnyAction } from 'redux';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ComplexValue, ActionDispatching } from 'app/types-shared';\r\nimport { SuccessNotification, ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { api } from './api';\r\nimport { sharedApi } from '../shared/api';\r\nimport {\r\n ClearList, RequestList, ReceiveList, FailList,\r\n RequestDelete, ReceiveDelete, FailDelete,\r\n UpdateSearchDefinition,\r\n UpdateFilterValues, UpdateFilterMenuValues, ClearAllFilters, OpenCloseFilter,\r\n UpdateQuery, UpdateQueryValue, SetQueryValues, ClearQuery, RequestPersonAccess,\r\n ReceivePersonAccess, FailPersonAccess, ClearPersonAccess, RequestExportExcel, ReceiveExportExcel, FailExportExcel, UpdateFilterValidation\r\n} from './action-types';\r\nimport { FilterMenuValues, Filter, FilterValidation, FilterCommonValues, FilterCommonTypes } from './filters/types';\r\nimport { FilterSearchModel, SearchArea } from './types-store';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { searchTranslations as text } from './constants';\r\nimport { toastFactory } from 'app/infrastructure/notifications/toast-factory';\r\nimport { getUserMessage } from 'app/infrastructure/notifications/user-messages/get-user-message';\r\nimport { downloadFile } from 'app/infrastructure/platform/file';\r\nimport { isForbiddenStatus, blockAccess } from 'app/area/shared/actions-utils';\r\nimport { STATE } from 'app/constants';\r\n\r\nexport const actionCreators = {\r\n\r\n clearPersonAccess: (): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n dispatch(new ClearPersonAccess());\r\n },\r\n\r\n loadUserAccess: (id: number): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n dispatch(new RequestPersonAccess());\r\n\r\n try {\r\n const userAccess = await sharedApi.userAccess(id);\r\n\r\n dispatch(new ReceivePersonAccess(userAccess[0]));\r\n } catch (err) {\r\n dispatch(new FailPersonAccess(id));\r\n }\r\n },\r\n\r\n loadRoleAccess: (id: number): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n dispatch(new RequestPersonAccess());\r\n\r\n try {\r\n const userAccess = await sharedApi.roleAccess(id);\r\n dispatch(new ReceivePersonAccess(userAccess[0]));\r\n } catch (err) {\r\n dispatch(new FailPersonAccess(id));\r\n }\r\n },\r\n\r\n clearList: (): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n const requestId = Date.now();\r\n dispatch(new ClearList(requestId));\r\n },\r\n\r\n loadUsers: (model: FilterSearchModel, startIndex: number = 0, maxResults: number = 20): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n\r\n const requestId = Date.now();\r\n dispatch(new RequestList(requestId, model, startIndex === 0));\r\n\r\n try {\r\n const users = await api.getUsers(startIndex, maxResults, model);\r\n\r\n dispatch(new ReceiveList(requestId, users.data.results, users.data.totalNumberOfResults));\r\n } catch (err) {\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationSearch,\r\n translationId: text.no_access_to_user_administration\r\n });\r\n }\r\n\r\n dispatch(new FailList(requestId));\r\n }\r\n },\r\n\r\n deleteUser: (id: number, successMessage: string): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n\r\n dispatch(new RequestDelete(id));\r\n\r\n try {\r\n await sharedApi.deleteUser(id);\r\n\r\n dispatch(new ReceiveDelete(id));\r\n dispatch(new SuccessNotification(successMessage));\r\n } catch (err) {\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n dispatch(new FailDelete(id));\r\n }\r\n },\r\n\r\n exportToExcel: (model: FilterSearchModel, maxResults: number): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n const startIndex = 0;\r\n const toastMessage = toastFactory({ autoClose: true });\r\n const translate = createDescriptionSelector(getState().administrationSearch.texts);\r\n\r\n dispatch(new RequestExportExcel());\r\n toastMessage.dispatch(translate(text.excel_started));\r\n\r\n try {\r\n const blob = await api.exportToExcel(startIndex, maxResults, model);\r\n downloadFile(blob, 'export-user-list.xlsx');\r\n\r\n toastMessage.success(translate(text.excel_success));\r\n dispatch(new ReceiveExportExcel());\r\n\r\n } catch (err) {\r\n dispatch(new FailExportExcel());\r\n err && err.userMessages && toastMessage.error(getUserMessage(err.userMessages));\r\n }\r\n },\r\n\r\n loadRoles: (model: FilterSearchModel, startIndex: number = 0,\r\n maxResults: number = 20): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n\r\n const requestId = Date.now();\r\n dispatch(new RequestList(requestId, model, startIndex === 0));\r\n\r\n try {\r\n const roles = await api.getRoles(startIndex, maxResults, model);\r\n\r\n dispatch(new ReceiveList(requestId, roles.data.results, roles.data.totalNumberOfResults));\r\n } catch (err) {\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationSearch,\r\n translationId: text.no_access_to_role_administration\r\n });\r\n }\r\n\r\n dispatch(new FailList(requestId));\r\n }\r\n },\r\n\r\n deleteRole: (id: number, successMessage: string): ActionDispatching<AnyAction, ApplicationState> =>\r\n async (dispatch, getState) => {\r\n\r\n dispatch(new RequestDelete(id));\r\n\r\n try {\r\n await sharedApi.deleteRole(id);\r\n\r\n dispatch(new ReceiveDelete(id));\r\n dispatch(new SuccessNotification(successMessage));\r\n } catch (err) {\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n dispatch(new FailDelete(id));\r\n }\r\n },\r\n\r\n updateSearchDefinition: (area: SearchArea,\r\n query: ComplexValue<number | string>[],\r\n predefined: ComplexValue<number | string>[],\r\n custom: Filter[]): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new UpdateSearchDefinition(area, query, predefined, custom));\r\n },\r\n\r\n updateFilterValues: (id: string, values: FilterCommonValues<FilterCommonTypes>[]): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new UpdateFilterValues(id, values));\r\n },\r\n\r\n updateFilterMenuValues: (id: string, values: FilterMenuValues): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new UpdateFilterMenuValues(id, values));\r\n },\r\n\r\n updateFilterValidation: (filterValidation: FilterValidation): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new UpdateFilterValidation(filterValidation));\r\n },\r\n\r\n clearAllFilters: (): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new ClearAllFilters());\r\n },\r\n\r\n openCloseFilter: (id: string, open: boolean): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new OpenCloseFilter(id, open));\r\n },\r\n\r\n updateQuery: (query: string): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new UpdateQuery(query));\r\n },\r\n\r\n updateQueryValue: (value: ComplexValue<number | string>): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new UpdateQueryValue(value));\r\n },\r\n\r\n setQueryValues: (values: ComplexValue<number | string>[]): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new SetQueryValues(values));\r\n },\r\n\r\n clearQuery: (): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n\r\n dispatch(new ClearQuery());\r\n }\r\n};\r\n","export interface AdministrationListContatinerState {\r\n query: string;\r\n}\r\n\r\nexport interface AdministrationListContatinerProps {\r\n query: string;\r\n}\r\n\r\nexport enum UserEditType {\r\n add = 'add',\r\n edit = 'edit',\r\n duplicate = 'duplicate'\r\n}\r\n","import * as React from 'react';\r\nimport styles from './search-tile.scss';\r\n\r\ninterface SearchTileComponentProps {\r\n footer?: JSX.Element;\r\n header?: JSX.Element;\r\n deleted?: boolean;\r\n}\r\nexport const SearchTile: React.FC<SearchTileComponentProps> = ({\r\n header, children, footer, deleted\r\n}) => (\r\n <article className={`${styles.searchTile} ${deleted ? styles.searchTileDeleted : ''}`}>\r\n {header && <header>\r\n {header}\r\n </header>}\r\n <main>\r\n {children}\r\n </main>\r\n {footer && <footer>\r\n {footer}\r\n </footer>}\r\n </article>\r\n );\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport styles from './tile-link.scss';\r\n\r\ninterface SearchLinkComponentProps {\r\n url: string;\r\n title: string;\r\n}\r\n\r\nexport const TileLink: React.FC<SearchLinkComponentProps> = ({\r\n url, title\r\n}) => (\r\n <Link to={url} className={styles.tileTitle}>\r\n <span>{title}</span>\r\n </Link>\r\n );\r\n","import * as React from 'react';\r\nimport styles from './tile-info.scss';\r\nimport { ids } from 'app/area/administration/constants';\r\n\r\ninterface TileInfoComponentProps {\r\n id?: number;\r\n personId?: string;\r\n email?: string;\r\n mainGroup?: string;\r\n role?: string;\r\n}\r\n\r\nexport const TileInfo: React.FC<TileInfoComponentProps> = ({\r\n id, personId, email, mainGroup, role\r\n}) => (\r\n <div className={styles.tileInfo}>\r\n <ul className={styles.tileInfoContent}>\r\n {!!id && <li className={styles.tileId}>#{id}</li>}\r\n {!!personId && <li id={ids.search.personId} className={styles.tilePersonId}>{personId}</li>}\r\n {!!email && <li><span className=\"default-icon email\" />{email}</li>}\r\n {!!role && <li>{role}</li>}\r\n {!!mainGroup && <li><span className=\"default-icon user-group\" />{mainGroup}</li>}\r\n </ul>\r\n </div>\r\n );\r\n","import * as React from 'react';\r\nimport { ElementLoader } from 'ui';\r\nimport { MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { ItemPersonAccess } from 'app/area/administration/list/types-store';\r\nimport style from './person-meatball-menu.scss';\r\nimport { Link } from 'react-router';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\n\r\ninterface PersonMeatballMenuComponentProps {\r\n id: number;\r\n itemPersonAccess: ItemPersonAccess;\r\n labelDelete: string;\r\n labelCancel: string;\r\n labelDescription: string;\r\n labelNoAccess: string;\r\n\r\n labelDuplicate?: string;\r\n canDuplicate?: boolean;\r\n\r\n onDelete: (id: number) => void;\r\n onLoadPersonAccess: (id: number) => void;\r\n onClearPersonAccess: () => void;\r\n}\r\n\r\nexport const PersonMeatballMenu: React.SFC<PersonMeatballMenuComponentProps> = (props) => {\r\n const { id, itemPersonAccess, labelDuplicate, labelDelete, labelCancel, labelDescription, labelNoAccess, onDelete } = props;\r\n\r\n const handleDelete = onDelete ? () => onDelete(id) : undefined;\r\n\r\n const canDelete = !!(itemPersonAccess && itemPersonAccess.access\r\n && itemPersonAccess.access.delete && handleDelete);\r\n\r\n const canDuplicate = !!(itemPersonAccess && itemPersonAccess.access\r\n && itemPersonAccess.access.edit) && props.canDuplicate;\r\n\r\n const hasNoAccess = !canDelete && !canDuplicate;\r\n\r\n const handleLoadPersonAccess = () => props.onLoadPersonAccess(id);\r\n const handleClearPersonAccess = () => props.onClearPersonAccess();\r\n\r\n if (itemPersonAccess && itemPersonAccess.fetching) {\r\n return <MeatballMenu\r\n id={ids.list_search_item(id)}\r\n onExpandMenu={handleLoadPersonAccess}\r\n onCloseMenu={handleClearPersonAccess}>\r\n <div className={style.loader}>\r\n <ElementLoader />\r\n </div>\r\n </MeatballMenu>;\r\n }\r\n\r\n return <MeatballMenu\r\n id={ids.list_search_item(id)}\r\n onExpandMenu={handleLoadPersonAccess}\r\n onCloseMenu={handleClearPersonAccess}>\r\n {hasNoAccess\r\n ? <li>\r\n <p className={style.labelNoAccess}>\r\n {labelNoAccess}\r\n </p>\r\n </li>\r\n : <>\r\n {canDuplicate && <li>\r\n <Link\r\n to={routeConstants.userDuplicateFor(id)}\r\n className=\"dropdown-item\">\r\n {labelDuplicate}\r\n </Link>\r\n </li>}\r\n <li>\r\n {canDelete &&\r\n <PromptConfirmationModal\r\n title={labelDelete}\r\n description={labelDescription}\r\n continueText={labelDelete}\r\n cancelText={labelCancel}\r\n onContinue={handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">\r\n {labelDelete}\r\n </button>\r\n </PromptConfirmationModal>}\r\n </li>\r\n </>}\r\n </MeatballMenu>;\r\n};\r\n","import * as React from 'react';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { SearchTileProps } from '../search-container/types';\r\nimport { SearchTile, TileLink } from 'app/components/search-tile';\r\nimport { TileInfo } from '../search-tile';\r\nimport { PersonMeatballMenu } from 'app/area/administration/list/components/person-meatball-menu';\r\nimport { isVeracityEnabled } from 'app/infrastructure/hosting';\r\n\r\nexport const UserTile: React.FC<SearchTileProps> = props => {\r\n\r\n const { data, itemPersonAccess, canDuplicate, onDelete, onLoadPersonAccess: onLoadPersonAccess,\r\n onClearPersonAccess, translation } = props;\r\n\r\n return <SearchTile\r\n footer={<TileInfo\r\n id={data.id}\r\n personId={data.personId}\r\n email={data.emailAddress}\r\n mainGroup={data.mainUserGroup}\r\n role={data.role && data.role.v !== 0 && data.role.d} />}\r\n deleted={data.deleted}>\r\n <TileLink\r\n url={routeConstants.userEditFor(data.id)}\r\n title={data.name} />\r\n {!isVeracityEnabled() && <PersonMeatballMenu\r\n id={data.id}\r\n itemPersonAccess={itemPersonAccess}\r\n canDuplicate={canDuplicate}\r\n labelDuplicate={translation.duplicate_user}\r\n labelDelete={translation.delete_user}\r\n labelCancel={translation.cancel}\r\n labelDescription={translation.delete_user_desc}\r\n labelNoAccess={translation.no_access_has_been_granted}\r\n onDelete={onDelete}\r\n onLoadPersonAccess={onLoadPersonAccess}\r\n onClearPersonAccess={onClearPersonAccess} />\r\n }\r\n </SearchTile>;\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { MeatballMenu } from 'ui';\r\nimport styles from './user-toolbar.scss';\r\nimport { UserEditType } from 'app/area/administration/shared/types';\r\nimport { isVeracityEnabled } from 'app/infrastructure/hosting';\r\n\r\ninterface ToolbarProps {\r\n totalResultHits?: number;\r\n exportExcelFetching?: boolean;\r\n translation: any;\r\n canCreate: boolean;\r\n canRead: boolean;\r\n onExportToExcel?: () => void;\r\n}\r\n\r\nexport const UserToolbar: React.FC<ToolbarProps> = props => {\r\n const { totalResultHits, onExportToExcel, exportExcelFetching, canCreate, canRead, translation } = props;\r\n\r\n if (!canCreate && !canRead) {\r\n return null;\r\n }\r\n\r\n return <>\r\n {!isVeracityEnabled() && canCreate && <Link id={ids.users.add_button} to={routeConstants.userAddFor(UserEditType.add)} className=\"btn btn-primary\" >\r\n {translation.add_user}\r\n </Link>}\r\n {canRead && totalResultHits > 0\r\n && <div className={styles.meatball}>\r\n <MeatballMenu closeAfterClick={true}>\r\n <li>\r\n <button className=\"dropdown-item\"\r\n id={ids.users.export_excel}\r\n onClick={onExportToExcel}\r\n disabled={exportExcelFetching}>\r\n {translation.excel_export_item_text}\r\n </button>\r\n </li>\r\n </MeatballMenu>\r\n </div>}\r\n </>;\r\n};\r\n","import { Filter, CustomFilterType, PredefinedIds, FilterType, FilterCommonValues } from '../filters/types';\r\nimport { endpoint } from '../endpoints';\r\nimport { filterId, userPredefinedFilters, queryFilters, fieldType } from 'app/area/administration/list/constants';\r\nimport { ComplexValue } from 'app/types-shared';\r\n\r\nexport const userQueryFilters = (translation, enableAlternativeId: boolean): ComplexValue<string>[] => [\r\n { value: queryFilters.name, description: translation.name },\r\n { value: queryFilters.email, description: translation.email },\r\n { value: queryFilters.id, description: translation.user_id },\r\n ...(enableAlternativeId ? [\r\n { value: queryFilters.alternativeId, description: translation.alternative_id },\r\n { value: queryFilters.alternativeName, description: translation.alternative_id_name }\r\n ] : [])\r\n];\r\n\r\nexport const predefinedFilters = (translation, enableAlternativeId: boolean): ComplexValue<number>[] => [\r\n { value: userPredefinedFilters.inactiveUsers, description: translation.inactive_users },\r\n { value: userPredefinedFilters.administratedByMe, description: translation.users_administrated_by_me },\r\n { value: userPredefinedFilters.withoutEmailAddress, description: translation.without_email },\r\n ...(enableAlternativeId ? [\r\n { value: userPredefinedFilters.withoutAlternativeID, description: translation.without_alternative_id }\r\n ] : [])\r\n];\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const userFilters = (translation): Filter[] => [\r\n {\r\n id: filterId.userRole,\r\n label: translation.role,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.code,\r\n optionsEndpoint: endpoint.userRole,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.extendedAccess,\r\n label: translation.extended_access,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.caseType,\r\n optionsParams: { includeSynergiLifeApplication: false }\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.unit,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.responsibleForUnit,\r\n optionsParams: { displayNotSelected: true },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.excludeInherited,\r\n type: CustomFilterType.checkbox,\r\n includeInSummary: false,\r\n options: [{ value: 1, title: translation.exclude_inherited_from_role }]\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.restrictedAccess,\r\n label: translation.restricted_access,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.caseType,\r\n optionsParams: { includeSynergiLifeApplication: false }\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.unit,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.responsibleForUnit,\r\n optionsParams: { displayNotSelected: true },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.excludeInherited,\r\n type: CustomFilterType.checkbox,\r\n includeInSummary: false,\r\n options: [{ value: 1, title: translation.exclude_inherited_from_role }]\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.responsibleForUnit,\r\n label: translation.responsible_for_unit,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.caseType,\r\n optionsParams: { includeSynergiLifeApplication: false },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.unit,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.responsibleForUnit,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.userType,\r\n label: translation.user_type,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.code,\r\n optionsEndpoint: endpoint.userType\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.accessToOperation,\r\n label: translation.access_to_operation,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.application_or_case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.userApplication\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.operation,\r\n type: CustomFilterType.code,\r\n optionsEndpoint: endpoint.userAccessToOperation,\r\n optionsParams: { displayNotSelected: true },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.excludeInherited,\r\n type: CustomFilterType.checkbox,\r\n includeInSummary: false,\r\n options: [{ value: 1, title: translation.exclude_inherited_from_role }]\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.accessToScreen,\r\n label: translation.access_to_screen,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.caseType,\r\n optionsParams: { includeSynergiLifeApplication: false }\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.screen,\r\n type: CustomFilterType.code,\r\n optionsEndpoint: endpoint.accessToScreen,\r\n optionsParams: { displayNotSelected: true },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.excludeInherited,\r\n type: CustomFilterType.checkbox,\r\n includeInSummary: false,\r\n options: [{ value: 1, title: translation.exclude_inherited_from_role }]\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.mainUserGroup,\r\n label: translation.main_user_group,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.userGroup\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.myUnit,\r\n label: translation.my_unit,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.unit,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.myLocation,\r\n label: translation.my_location,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.location,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.accessToUserGroup,\r\n label: translation.access_to_administrate_user_group,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.userGroup,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.userCode,\r\n label: translation.code,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.inputFilter,\r\n includeInSummary: true\r\n }\r\n ],\r\n type: FilterType.TEXT_RANGE\r\n },\r\n {\r\n id: filterId.disabledDate,\r\n label: translation.disabled_date,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.date,\r\n type: CustomFilterType.dateRange,\r\n includeInSummary: true\r\n }\r\n ],\r\n type: FilterType.DATE_RANGE\r\n }\r\n];\r\n\r\nexport const defaultFilters = (translation): { [key: string]: FilterCommonValues<number>[] } => ({\r\n [PredefinedIds.exclude]: [{ value: userPredefinedFilters.inactiveUsers, description: translation.inactive_users }]\r\n});\r\n","import { ComplexValue, ValidationLevel } from 'ui';\r\nimport isNumber from 'lodash/isnumber';\r\nimport { FilterMenuValues, Filter, FilterValidation, PredefinedIds, FilterType, \r\n SubOptionType, OptionType, FilterCommonValues } from 'app/area/administration/list/filters/types';\r\nimport { FilterSearchModel } from 'app/area/administration/list/types-store';\r\nimport { filterId, queryFilters, userPredefinedFilters, fieldType } from 'app/area/administration/list/constants';\r\nimport { getFieldId } from 'app/area/administration/list/filters/selectors';\r\nimport { SerializePayload, DateRangePayload } from 'app/area/administration/list/types';\r\nimport { FilterPayloadValues, FilterCommonTypes } from 'app/area/administration/list/filters/types';\r\n\r\ntype SelectedIdSerialization = (value: FilterCommonValues<FilterCommonTypes>[], menuValues: FilterMenuValues) => object;\r\ntype RangeSerialization = (range: FilterCommonValues<FilterCommonTypes>, menuValues: FilterMenuValues) => object;\r\ntype DateRangeSerialization = (range: any, menuValues: FilterMenuValues) => object;\r\ntype SerializeFilter = {\r\n [key: string]: (\r\n formValues: FilterPayloadValues<FilterCommonTypes>,\r\n menuValues: { [key: string]: FilterMenuValues },\r\n filter: Filter,\r\n result: FilterSearchModel,\r\n filterValidation: FilterValidation[]\r\n ) => FilterSearchModel\r\n};\r\n\r\nconst serializeQuery = (query: string, value: ComplexValue<number | string>[]) =>\r\n query && query.trim().length && value && value.length\r\n ? {\r\n [filterId.query]: {\r\n text: query.trim(),\r\n ...(!!value && {\r\n searchInName: value.some(v => v.value === queryFilters.name),\r\n searchInPersonId: value.some(v => v.value === queryFilters.id),\r\n searchInAlternativeId: value.some(v => v.value === queryFilters.alternativeId),\r\n searchInAlternativeName: value.some(v => v.value === queryFilters.alternativeName),\r\n searchInEmail: value.some(v => v.value === queryFilters.email)\r\n })\r\n }\r\n }\r\n : {};\r\n\r\nconst serializePredefined = (formValues: FilterPayloadValues<FilterCommonTypes>) => {\r\n\r\n const include = formValues && formValues[PredefinedIds.include] || [];\r\n const exclude = formValues && formValues[PredefinedIds.exclude] || [];\r\n\r\n return {\r\n ...(include.some(i => i.value === userPredefinedFilters.inactiveUsers) && {\r\n [filterId.excludeInactiveUsers]: { enabled: true, negated: true }\r\n }),\r\n ...(exclude.some(i => i.value === userPredefinedFilters.inactiveUsers) && {\r\n [filterId.excludeInactiveUsers]: { enabled: true, negated: false }\r\n }),\r\n\r\n ...(include.some(i => i.value === userPredefinedFilters.withoutEmailAddress) && {\r\n [filterId.excludeUsersWithEmail]: { enabled: true, negated: false }\r\n }),\r\n ...(exclude.some(i => i.value === userPredefinedFilters.withoutEmailAddress) && {\r\n [filterId.excludeUsersWithEmail]: { enabled: true, negated: true }\r\n }),\r\n\r\n ...(include.some(i => i.value === userPredefinedFilters.withoutAlternativeID) && {\r\n [filterId.usersWithAlternativeId]: { enabled: true, negated: true }\r\n }),\r\n ...(exclude.some(i => i.value === userPredefinedFilters.withoutAlternativeID) && {\r\n [filterId.usersWithAlternativeId]: { enabled: true, negated: false }\r\n }),\r\n\r\n ...(include.some(i => i.value === userPredefinedFilters.administratedByMe) && {\r\n [filterId.usersFromGroupsAdministratedByMe]: { enabled: true, negated: false }\r\n }),\r\n ...(exclude.some(i => i.value === userPredefinedFilters.administratedByMe) && {\r\n [filterId.usersFromGroupsAdministratedByMe]: { enabled: true, negated: true }\r\n })\r\n };\r\n};\r\n\r\nconst serializeMenuValues = (menuValues) => ({\r\n ...(menuValues && menuValues.exclude ? { negated: true } : {}),\r\n ...(menuValues && (menuValues.excludeChildren || menuValues.excludeParents) ? { ignoreHierarchy: true } : {})\r\n});\r\n\r\nconst serializeCodeFilter: SelectedIdSerialization = (value: FilterCommonValues<FilterCommonTypes>[], menuValues) => ({\r\n selectedIds: value.map(v => ({ v: v.value })),\r\n ...serializeMenuValues(menuValues)\r\n});\r\n\r\nconst serializeSingleValue: RangeSerialization = (range, menuValues) => ({\r\n text: isNumber(range.value) ? range.value : removeLastComma(String(range.value).replace(/\\s/g, '')),\r\n ...serializeMenuValues(menuValues)\r\n});\r\n\r\nconst serializeDateRangeValue: DateRangeSerialization = (range, menuValues) => {\r\n const dateFrom = range.find(f => f.subOptionType === SubOptionType.dateFrom);\r\n const dateTo = range.find(f => f.subOptionType === SubOptionType.dateTo);\r\n const notSpecified = range.some(f => f.optionType === OptionType.notSpecified);\r\n\r\n return {\r\n ...((!!dateFrom || !!dateTo) && {\r\n dateTimeRange: {\r\n ...(dateFrom && dateFrom.value && { from: dateFrom.value.toISOString() }),\r\n ...(dateTo && dateTo.value && { to: dateTo.value.toISOString() }),\r\n ...(menuValues && menuValues.exclude ? { negated: true } : {})\r\n }\r\n }),\r\n ...(notSpecified && {\r\n excludeNullValues: {\r\n enabled: true,\r\n ...(menuValues && menuValues.exclude ? {} : { negated: true })\r\n }\r\n })\r\n };\r\n};\r\n\r\nconst removeLastComma = (value: string) => value && value[value.length - 1] === ',' ? value.slice(0, value.length - 1) : value;\r\n\r\nconst serializeSelectedIds = (\r\n formValues: FilterPayloadValues<FilterCommonTypes>,\r\n menuValues: { [key: string]: FilterMenuValues },\r\n filter: Filter,\r\n result: FilterSearchModel): FilterSearchModel => {\r\n const rootId = getFieldId(filter.id, fieldType.root);\r\n const rootHasValues = formValues[rootId] && formValues[rootId].length > 0;\r\n\r\n const applicationId = getFieldId(filter.id, fieldType.application);\r\n const applicationHasValues = formValues[applicationId] && formValues[applicationId].length > 0;\r\n\r\n const excludeInheritedId = getFieldId(filter.id, fieldType.excludeInherited);\r\n const applyRoleAccess = filter.fields.some(f => f.fieldTypeId === fieldType.excludeInherited)\r\n ? { applyRoleAccess: !formValues[excludeInheritedId] || formValues[excludeInheritedId].length === 0 }\r\n : {};\r\n\r\n return rootHasValues || applicationHasValues\r\n ? {\r\n ...result,\r\n [filter.id]: {\r\n ...(rootHasValues\r\n ? serializeCodeFilter(formValues[rootId], menuValues && menuValues[rootId])\r\n : serializeCodeFilter([{ value: 0 }], { exclude: true })),\r\n ...applyRoleAccess,\r\n ...(applicationHasValues ? {\r\n applicationFilter: serializeCodeFilter(formValues[applicationId], menuValues && menuValues[applicationId])\r\n } : {})\r\n }\r\n }\r\n : result;\r\n};\r\n\r\nconst serializeTextRange = (\r\n formValues: FilterPayloadValues<FilterCommonTypes>,\r\n menuValues: { [key: string]: FilterMenuValues },\r\n filter: Filter,\r\n result: FilterSearchModel,\r\n filterValidation: FilterValidation[]): FilterSearchModel => {\r\n\r\n const rootId = getFieldId(filter.id, fieldType.root);\r\n const rootHasValues = !!formValues[rootId];\r\n const range = rootHasValues && formValues[rootId][0];\r\n const validationResult = filterValidation && filterValidation.find(validation => validation.id === rootId);\r\n\r\n if (!range || validationResult && validationResult.validation && validationResult.validation.level === ValidationLevel.error) {\r\n return result;\r\n }\r\n\r\n const serializedRange: any = serializeSingleValue(range, menuValues && menuValues[rootId]);\r\n\r\n return !!serializedRange\r\n ? {\r\n ...result,\r\n [filter.id]: {\r\n ...serializedRange\r\n }\r\n }\r\n : result;\r\n};\r\n\r\nconst serializeDateRange = (\r\n formValues: FilterPayloadValues<FilterCommonTypes>,\r\n menuValues: { [key: string]: FilterMenuValues },\r\n filter: Filter,\r\n result: FilterSearchModel): FilterSearchModel => {\r\n\r\n const fieldId = getFieldId(filter.id, fieldType.date);\r\n const range = formValues[fieldId];\r\n\r\n if (!range) {\r\n return result;\r\n }\r\n\r\n const serializedRange: DateRangePayload = serializeDateRangeValue(range, menuValues && menuValues[fieldId]);\r\n\r\n return (!!serializedRange && Object.keys(serializedRange).length > 0)\r\n ? {\r\n ...result,\r\n [filter.id]: {\r\n ...serializedRange\r\n }\r\n }\r\n : result;\r\n};\r\n\r\nconst serializeFilter: SerializeFilter = {\r\n [FilterType.SELECTED_IDS]: serializeSelectedIds,\r\n [FilterType.TEXT_RANGE]: serializeTextRange,\r\n [FilterType.DATE_RANGE]: serializeDateRange\r\n};\r\n\r\nexport const serializeCodes = (\r\n formValues: FilterPayloadValues<FilterCommonTypes>,\r\n menuValues: { [key: string]: FilterMenuValues },\r\n filters: Filter[],\r\n filterValidation: FilterValidation[]): FilterSearchModel => filters && formValues\r\n ? filters.reduce((result, filter) => serializeFilter[filter.type](formValues, menuValues, filter, result, filterValidation), {})\r\n : {};\r\n\r\nexport const serialize = (dataToSerialize: SerializePayload): FilterSearchModel => {\r\n const { query, queryValues, formValues, menuValues, filters, filterValidation } = dataToSerialize;\r\n return {\r\n ...serializeQuery(query, queryValues),\r\n ...serializePredefined(formValues),\r\n ...serializeCodes(formValues, menuValues, filters, filterValidation)\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { FilterCommonProps, FilterCommonValues } from './types';\r\nimport { SelectMultipleHierarchy } from 'ui';\r\nimport { LoadOptions } from 'app/types-shared';\r\n\r\nexport class FilterCodeHierarchy extends React.PureComponent<FilterCommonProps<string>, { loadedOptions: LoadOptions }> {\r\n\r\n public state: Readonly<{ loadedOptions: LoadOptions }> = {\r\n loadedOptions: {}\r\n };\r\n\r\n private onChange = (values: FilterCommonValues<string>[]) => {\r\n this.props.onChange(this.props.id, values);\r\n }\r\n\r\n private onLoadOptions = (options: LoadOptions) => {\r\n\r\n const { id, onLoadOptions, optionsEndpoint, optionsParams } = this.props;\r\n\r\n onLoadOptions(\r\n id,\r\n optionsEndpoint,\r\n options,\r\n optionsParams\r\n );\r\n this.setState({ loadedOptions: options });\r\n return;\r\n }\r\n\r\n public render() {\r\n\r\n const { id, label, values, options, fetchingOptions, translation } = this.props;\r\n\r\n return <SelectMultipleHierarchy\r\n componentId={id}\r\n className={undefined}\r\n label={label ? { text: label } : undefined}\r\n\r\n valueItems={values || []}\r\n onChange={this.onChange}\r\n\r\n descriptionAllLevels={true}\r\n\r\n options={options}\r\n fetching={fetchingOptions}\r\n loadOptions={this.state.loadedOptions}\r\n onLoadOptions={this.onLoadOptions}\r\n\r\n textOptionsNotFound={translation && translation.no_options_found}\r\n textOptionsDone={translation && translation.done}\r\n placeholder={translation && translation.search}\r\n />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FilterCommonProps, FilterCommonValues } from './types';\r\nimport { CheckboxList } from 'ui';\r\nimport { ComplexValue } from 'app/types-shared';\r\n\r\nexport class FilterCheckbox extends React.PureComponent<FilterCommonProps<number>> {\r\n\r\n private onChange = (values: FilterCommonValues<number>[]) => {\r\n this.props.onChange(this.props.id, values);\r\n }\r\n\r\n public render() {\r\n\r\n const { id, values, options } = this.props;\r\n\r\n return <CheckboxList\r\n className={undefined}\r\n componentId={id}\r\n valueItems={(values || []) as ComplexValue<number>[]}\r\n options={options as ComplexValue<number>[]}\r\n onChange={this.onChange}\r\n />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Textarea } from 'ui';\r\nimport { FilterCommonProps } from './types';\r\n\r\nexport class FilterInput extends React.PureComponent<FilterCommonProps<string>> {\r\n\r\n private onChange = (value: string) => {\r\n const values = value !== '' && value.replace(/\\s/g, '') === '' ? [] : [{ value }];\r\n this.props.onChange(this.props.id, values);\r\n }\r\n\r\n private currentValue = () => {\r\n const { values } = this.props;\r\n return values && values.length > 0 ? String(values[0].value) : undefined;\r\n }\r\n\r\n public render() {\r\n const { id, validation } = this.props;\r\n\r\n const currentValue = this.currentValue();\r\n\r\n return <Textarea\r\n className={undefined}\r\n componentId={id}\r\n value={currentValue}\r\n onChange={this.onChange}\r\n maxLength={254}\r\n validation={currentValue && validation}\r\n />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FilterCommonProps, FilterCommonValues } from 'app/area/administration/list/filters/types';\r\nimport { FilterValidationProps, ValidationFilter } from 'app/area/administration/list/filters/validators/types';\r\n\r\ntype WrappedComponentType = React.ComponentClass<FilterCommonProps<string>>;\r\n\r\nexport const withFilterValidation = (validate: ValidationFilter) => (WrappedComponent: WrappedComponentType): WrappedComponentType => {\r\n return class FilterValidation extends React.Component<FilterValidationProps<string>> {\r\n \r\n private onChange = (id: string, values: FilterCommonValues<string>[]): void => {\r\n const { translation, onFilterValidationChange, onChange } = this.props;\r\n \r\n const validation = validate(values, translation);\r\n onFilterValidationChange({ id, validation });\r\n \r\n onChange(id, values);\r\n };\r\n\r\n public render() {\r\n const { id, filterValidation } = this.props;\r\n\r\n const validationResult = filterValidation && filterValidation.find(validation => validation.id === id);\r\n\r\n return <WrappedComponent\r\n {...this.props}\r\n onChange={this.onChange}\r\n id={id}\r\n validation={validationResult && validationResult.validation}\r\n />;\r\n }\r\n };\r\n};\r\n","import { ComplexValue } from 'app/types-shared';\r\nimport { ValidationLevel, ValidationProps } from 'ui';\r\nimport { SearchTranslation } from '../../constants';\r\nimport { ValidationFilter } from 'app/area/administration/list/filters/validators/types';\r\n\r\nconst matchNumberAndSeparators = /^((\\s*\\d+\\s*)|(\\s*\\d+\\s*-\\s*\\d+\\s*))(,((\\s*\\d+\\s*)|(\\s*\\d+\\s*-\\s*\\d+\\s*)))*,?\\s*$/m;\r\n\r\nexport const validate: ValidationFilter = (values: ComplexValue<number | string>[], translation: SearchTranslation): ValidationProps => {\r\n const isFilterValid = values.every(value => !!value && (value.value === '' || matchNumberAndSeparators.test(String(value.value))));\r\n return !isFilterValid\r\n ? {\r\n level: ValidationLevel.error,\r\n messages: [{\r\n level: ValidationLevel.error,\r\n message: translation.number_validator_error\r\n }]\r\n } : undefined;\r\n};\r\n","import * as React from 'react';\r\nimport { RadioSymbol, DateTime } from 'ui';\r\nimport { FilterCommonProps, OptionType, SubOptionType, FilterCommonValues } from './types';\r\nimport { parseAsDateUTC, createUTCDate, dateToUTC, createFormatters } from 'app/infrastructure/data/date';\r\n\r\nimport styles from './filter-date-range.scss';\r\n\r\nexport class FilterDateRange extends React.PureComponent<FilterCommonProps<Date>> {\r\n\r\n private onChange = (e: React.SyntheticEvent<any>) => {\r\n const optionType = e.currentTarget.value;\r\n const notSpecified = optionType === OptionType.notSpecified;\r\n\r\n this.props.onChange(this.props.id, [{\r\n optionType,\r\n value: notSpecified ? {} as any : undefined\r\n }]);\r\n }\r\n\r\n private getValue = (values: FilterCommonValues<Date>[], subOptionType: SubOptionType): FilterCommonValues<Date> => {\r\n return values && values.find(f => f.subOptionType === subOptionType && !!f.value)\r\n || { value: undefined, optionType: undefined };\r\n }\r\n\r\n private onChangeDate = (value: Date, subOptionType: SubOptionType) => {\r\n const { values } = this.props;\r\n\r\n this.props.onChange(this.props.id, [{\r\n optionType: OptionType.specified,\r\n subOptionType: SubOptionType.dateFrom,\r\n value: subOptionType === SubOptionType.dateFrom ? value : this.getValue(values, SubOptionType.dateFrom).value\r\n }, {\r\n optionType: OptionType.specified,\r\n subOptionType: SubOptionType.dateTo,\r\n value: subOptionType === SubOptionType.dateTo ? value : this.getValue(values, SubOptionType.dateTo).value\r\n }].filter(v => !!v.value) || []);\r\n }\r\n\r\n private onChangeDateFrom = (value: Date) => this.onChangeDate(value, SubOptionType.dateFrom);\r\n private onChangeDateTo = (value: Date) => this.onChangeDate(value, SubOptionType.dateTo);\r\n\r\n private renderSpecifiedPeriod = () => {\r\n const { values, translation, locale } = this.props;\r\n\r\n const selected = !values || (values && values.some(v => v.optionType === OptionType.specified));\r\n\r\n const dateFrom = this.getValue(values, SubOptionType.dateFrom);\r\n const dateTo = this.getValue(values, SubOptionType.dateTo);\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n type=\"radio\"\r\n id={'specified-date-range'}\r\n name={'date-range-option-type'}\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionType.specified}\r\n checked={!!selected}\r\n onChange={this.onChange} />\r\n <label\r\n htmlFor={'specified-date-range'}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <b>{translation.filters_date_range_date_interval}</b>\r\n </label>\r\n\r\n {selected && <div className={styles.dateGroup}>\r\n <div>\r\n <label>{translation.filters_date_range_from}</label>\r\n <DateTime\r\n useTime={false}\r\n value={dateFrom.value}\r\n componentId=\"disabled_date_from_picker\"\r\n className=\"dateTime\"\r\n parseDate={parseAsDateUTC}\r\n createDate={createUTCDate}\r\n cloneDate={dateToUTC}\r\n locale={locale}\r\n onChange={this.onChangeDateFrom}\r\n {...createFormatters(locale)}\r\n />\r\n </div>\r\n <div>\r\n <label>{translation.filters_date_range_to}</label>\r\n <DateTime\r\n useTime={false}\r\n value={dateTo.value}\r\n componentId=\"disabled_date_to_picker\"\r\n className=\"dateTime\"\r\n parseDate={parseAsDateUTC}\r\n createDate={createUTCDate}\r\n cloneDate={dateToUTC}\r\n locale={locale}\r\n onChange={this.onChangeDateTo}\r\n {...createFormatters(locale)}\r\n />\r\n </div>\r\n </div>}\r\n </div>;\r\n }\r\n\r\n private renderNotSpecified = () => {\r\n const { values, translation } = this.props;\r\n\r\n const selected = values && values.some(v => v.optionType === OptionType.notSpecified);\r\n\r\n return <div className=\"form-check\">\r\n <input\r\n type=\"radio\"\r\n id={'not-specified-date-range'}\r\n name={'date-range-option-type'}\r\n className=\"form-check-input visuallyhidden\"\r\n value={OptionType.notSpecified}\r\n checked={!!selected}\r\n onChange={this.onChange} />\r\n <label\r\n htmlFor={'not-specified-date-range'}\r\n className=\"form-check-label\">\r\n <RadioSymbol />\r\n <div>\r\n <b>{translation.filters_not_specified_title}</b>\r\n <p>{translation.filters_not_specified_subtitle}</p>\r\n </div>\r\n </label>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n return <>\r\n {this.renderSpecifiedPeriod()}\r\n {this.renderNotSpecified()}\r\n </>;\r\n }\r\n}\r\n","import { FilterConfiguration } from './types';\r\nimport { FilterCodeHierarchy } from './filter-code-hierarchy';\r\nimport { FilterCheckbox } from './filter-checkbox';\r\nimport { FilterInput } from './filter-input';\r\nimport { withFilterValidation } from 'app/area/administration/list/filters/validators/filter-validation';\r\nimport { validate } from 'app/area/administration/list/filters/validators/number-validator';\r\nimport { FilterDateRange } from 'app/area/administration/list/filters/filter-date-range';\r\n\r\nexport const inputFilter: FilterConfiguration<string> = {\r\n component: withFilterValidation(validate)(FilterInput),\r\n menuOptions: {\r\n clear: true,\r\n excludeInclude: true\r\n }\r\n};\r\n\r\nexport const dateRangeFilter: FilterConfiguration<Date> = {\r\n component: FilterDateRange,\r\n menuOptions: {\r\n clear: true,\r\n excludeInclude: true\r\n }\r\n};\r\n\r\nexport const codeFilter: FilterConfiguration<string> = {\r\n component: FilterCodeHierarchy,\r\n menuOptions: {\r\n clear: true,\r\n excludeInclude: true\r\n }\r\n};\r\n\r\nexport const codeHierarchyFilter: FilterConfiguration<string> = {\r\n component: FilterCodeHierarchy,\r\n menuOptions: {\r\n clear: true,\r\n excludeInclude: true,\r\n excludeIncludeChildren: true\r\n }\r\n};\r\n\r\nexport const codeHierarchyParentsFilter: FilterConfiguration<string> = {\r\n component: FilterCodeHierarchy,\r\n menuOptions: {\r\n clear: true,\r\n excludeInclude: true,\r\n excludeIncludeParents: true\r\n }\r\n};\r\n\r\nexport const checkboxFilter: FilterConfiguration<number> = {\r\n component: FilterCheckbox,\r\n menuOptions: {}\r\n};\r\n","import { CustomFilterType } from 'app/area/administration/list/filters/types';\r\nimport { codeFilter, codeHierarchyFilter, codeHierarchyParentsFilter, checkboxFilter, inputFilter, dateRangeFilter } from 'app/area/administration/list/filters/constants';\r\n\r\nexport const typeMapping = {\r\n [CustomFilterType.code]: codeFilter,\r\n [CustomFilterType.codeHierarchy]: codeHierarchyFilter,\r\n [CustomFilterType.codeHierarchyParents]: codeHierarchyParentsFilter,\r\n [CustomFilterType.checkbox]: checkboxFilter,\r\n [CustomFilterType.inputFilter]: inputFilter,\r\n [CustomFilterType.dateRange]: dateRangeFilter\r\n};\r\n","import * as React from 'react';\r\nimport { ElementLoader } from 'ui';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { withOptions } from 'app/components/options-handler/with-options';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { searchTranslations } from '../constants';\r\nimport { SearchContainer } from '../search-container';\r\nimport { actionCreators } from '../actions';\r\nimport { AdministrationSearchState, SearchArea } from '../types-store';\r\nimport { UserTile } from './user-tile';\r\nimport { UserToolbar } from './user-toolbar';\r\nimport { userFilters, predefinedFilters, userQueryFilters, defaultFilters } from './user-filter-configuration';\r\nimport { serialize } from 'app/area/administration/list/serialize';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { typeMapping } from 'app/area/administration/list/filter-configuration';\r\n\r\ntype UserSearchProps = DefaultContainerProps & AdministrationSearchState & typeof actionCreators & OptionsProps;\r\n\r\nclass UserSearch extends React.Component<UserSearchProps> {\r\n\r\n public static statePath: string = STATE.administrationSearch;\r\n\r\n public componentDidMount() {\r\n\r\n const { searchDefinition, updateSearchDefinition, clearQuery, clearAllFilters, setQueryValues } = this.props;\r\n\r\n /**\r\n * Clear everything when user is navigating from role search\r\n */\r\n if (!searchDefinition || searchDefinition.area !== SearchArea.user) {\r\n\r\n clearQuery();\r\n clearAllFilters();\r\n setQueryValues([]);\r\n updateSearchDefinition(SearchArea.user, [], [], []);\r\n }\r\n }\r\n\r\n public componentDidUpdate() {\r\n\r\n const { searchDefinition, updateSearchDefinition, setQueryValues, updateFilterValues,\r\n translation, textsFetching, sharedState } = this.props;\r\n\r\n /**\r\n * When translations are loaded rebuild filters list\r\n */\r\n if (sharedState && sharedState.access && sharedState.access.adminPanel\r\n && textsFetching === false && (!searchDefinition.custom || searchDefinition.custom.length === 0)) {\r\n\r\n const enableAlternativeId = !!sharedState.access.adminPanel.alternativeIdPanel;\r\n\r\n updateSearchDefinition(SearchArea.user,\r\n userQueryFilters(translation, enableAlternativeId),\r\n predefinedFilters(translation, enableAlternativeId),\r\n userFilters(translation));\r\n setQueryValues(userQueryFilters(translation, enableAlternativeId));\r\n\r\n const filters = defaultFilters(translation);\r\n Object.keys(filters).forEach(key => {\r\n updateFilterValues(key, filters[key]);\r\n });\r\n\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearList();\r\n }\r\n\r\n private onLoadData = (startIndex?: number) => {\r\n\r\n const { query, queryValues, filterValues, filterMenuValues, searchDefinition, requestedSearchModel, filterValidation } = this.props;\r\n\r\n const searchModel = serialize({\r\n query, \r\n queryValues, \r\n formValues: filterValues, \r\n menuValues: filterMenuValues, \r\n filters: searchDefinition.custom,\r\n filterValidation\r\n });\r\n\r\n if (startIndex !== undefined || !deepEquals(searchModel, requestedSearchModel)) {\r\n this.props.loadUsers(searchModel, startIndex);\r\n }\r\n }\r\n\r\n private onDelete = (id: number) => {\r\n\r\n const { deleteUser, translation } = this.props;\r\n\r\n deleteUser(id, translation.user_successfully_deleted);\r\n }\r\n\r\n private onExportToExcel = () => {\r\n const {\r\n results: {\r\n total\r\n }\r\n } = this.props;\r\n\r\n total > 0 && this.props.exportToExcel(this.props.requestedSearchModel, total);\r\n }\r\n\r\n public render() {\r\n\r\n const {\r\n results, translation, options, loadOptions, searchDefinition,\r\n query, queryValues, updateQuery, updateQueryValue,\r\n filterValues, filterMenuValues, filterValidation,\r\n updateFilterValues, updateFilterMenuValues, updateFilterValidation, clearAllFilters,\r\n filterOpen, openCloseFilter, loadUserAccess, clearPersonAccess, exportExcelFetching\r\n } = this.props;\r\n\r\n const { sharedState: { access: { adminPanel: { user: {\r\n create: createUserAccess = false,\r\n read: readUserAccess = false\r\n } = {} } = {} } = {}, locale = '' } = {} } = this.props;\r\n\r\n if (!searchDefinition || !searchDefinition.predefined || !searchDefinition.predefined.length) {\r\n return <ElementLoader />;\r\n }\r\n\r\n const userToolbar = <UserToolbar\r\n onExportToExcel={this.onExportToExcel}\r\n exportExcelFetching={exportExcelFetching}\r\n totalResultHits={results.total}\r\n translation={translation}\r\n canCreate={createUserAccess}\r\n canRead={readUserAccess}\r\n />;\r\n\r\n return <SearchContainer\r\n\r\n results={results}\r\n\r\n title={translation.user_administration}\r\n noHitLabel={translation.search_no_users}\r\n canDuplicate={createUserAccess}\r\n translation={translation}\r\n locale={locale}\r\n\r\n resultTile={UserTile}\r\n\r\n onLoadData={this.onLoadData}\r\n onLoadPersonAccess={loadUserAccess}\r\n onClearPersonAccess={clearPersonAccess}\r\n onDelete={this.onDelete}\r\n\r\n rightToolbar={userToolbar}\r\n\r\n querySettings={{\r\n query: query,\r\n values: queryValues,\r\n options: searchDefinition.query,\r\n\r\n onChangeQuery: updateQuery,\r\n onChangeQueryValue: updateQueryValue\r\n }}\r\n\r\n filterSettings={{\r\n filters: searchDefinition.custom,\r\n typeMappings: typeMapping,\r\n\r\n values: filterValues,\r\n onChange: updateFilterValues,\r\n\r\n menuValues: filterMenuValues,\r\n onChangeMenu: updateFilterMenuValues,\r\n\r\n filterValidation,\r\n onFilterValidationChange: updateFilterValidation,\r\n\r\n options: options,\r\n onLoadOptions: loadOptions,\r\n\r\n predefinedOptions: searchDefinition.predefined,\r\n\r\n openFilters: filterOpen,\r\n openCloseFilter: openCloseFilter,\r\n\r\n clearAllFilters: clearAllFilters\r\n }}\r\n />;\r\n }\r\n}\r\n\r\nconst container = containerFactory(withOptions(UserSearch), actionCreators, undefined, searchTranslations);\r\n\r\nexport { container as UsersSearchView };\r\n","import { commonTranslations } from '../constants';\r\n\r\nexport const administrationEditTranslations = {\r\n ...commonTranslations,\r\n switch_to_scroll: 7977,\r\n switch_to_tab: 7978,\r\n user_administration_label: 5241,\r\n role_administration_label: 8038,\r\n id: 631,\r\n name: 5244,\r\n do_you_want_to_provide: 7610,\r\n remove_all_role_based: 7611,\r\n authorisation: 7612,\r\n unit_location_usergroup: 7613,\r\n user_type_and_group: 7614,\r\n language: 5248,\r\n location: 7616,\r\n unit: 5262,\r\n current_user_group: 5249,\r\n main_user_group: 5250,\r\n user_type: 7620,\r\n disabled_date: 5251,\r\n password: 4855,\r\n email: 5245,\r\n latest_login: 5252,\r\n created: 5253,\r\n modified: 5254,\r\n required_fields: 7745,\r\n search: 7345,\r\n validation_required: 7633,\r\n added_user: 7629,\r\n not_added_user: 7631,\r\n updated_user: 7630,\r\n not_updated_user: 7632,\r\n duplicated_user: 8243,\r\n save: 5564,\r\n dont_save: 7628,\r\n cancel_changes: 7558,\r\n are_you_sure: 7460,\r\n undo_all: 5792,\r\n go_back: 7966,\r\n no_options_found: 7644,\r\n select_one_option: 7344,\r\n operation: 4001,\r\n application_or_case: 7699,\r\n choose_application_or_case: 7700,\r\n extended_access: 7701,\r\n validation_error: 7702,\r\n done: 7338,\r\n add: 5783,\r\n create: 8148,\r\n remove: 5913,\r\n case_type: 3514,\r\n responsible_for_unit: 7721,\r\n restricted_access: 7985,\r\n access_to_screen: 7986,\r\n screen: 7987,\r\n must_be_equal: 7681,\r\n must_be_unique: 8105,\r\n change: 7974,\r\n confirm_password: 7973,\r\n change_password: 7971,\r\n reset_password: 7972,\r\n change_id_disclaimer: 8153,\r\n set: 7975,\r\n new_role: 5482,\r\n add_user: 7657,\r\n new_user: 5541,\r\n edit_user: 8069,\r\n duplicate_user: 8240,\r\n fields: 8000,\r\n user_and_person_fields: 8001,\r\n user_groups: 8002,\r\n user_group: 8003,\r\n user_occurrence_in_preson_field_lists: 8004,\r\n access_to_administrate_user_group: 8005,\r\n update_user: 8006,\r\n no_access_has_been_granted: 8007,\r\n no_additional_info_has_been_added: 8100,\r\n no_fields_available: 8399,\r\n default_values: 8021,\r\n default_value: 8020,\r\n code_table: 8019,\r\n field: 8018,\r\n access_base_on_role: 8022,\r\n not_selected: 3747,\r\n edit_details_title: 8044,\r\n default_value_already_set: 8031,\r\n default_value_add_new: 8126,\r\n default_value_add_new_fields: 8127,\r\n default_value_add_another: 8125,\r\n edit_role_title: 8036,\r\n edit_role_details_role_id: 8041,\r\n edit_role_details_role_name: 8042,\r\n edit_role_details_code: 8043,\r\n edit_role_add_role: 8045,\r\n edit_role_update_role: 8046,\r\n edit_role_save_role: 8047,\r\n additional_information: 5467,\r\n choose_extra_fields: 8060,\r\n extra_fields: 8061,\r\n extra_field: 8062,\r\n must_be_withing_range: 7939,\r\n role_updated: 8048,\r\n user_load_failed_msg: 8053,\r\n role_load_failed_msg: 8054,\r\n new_role_msg: 8055,\r\n role_successfully_deleted: 8050,\r\n no_roles_has_been_added: 8072,\r\n remove_all_role_based_access: 8144,\r\n no_access_to_role_administration: 8296,\r\n no_access_to_user_administration: 8297,\r\n\r\n change_user_id: 5485,\r\n old_user_id: 5591,\r\n new_user_id: 5590,\r\n user_id_changed: 8077,\r\n \r\n save_user_load_overlay_text: 8122,\r\n save_role_load_overlay_text: 8123,\r\n\r\n access_card_settings_to_selected_roles: 8084,\r\n access_selection_panel_switch_custom_message_first: 8085,\r\n access_selection_panel_switch_custom_message_second: 8086,\r\n \r\n access_selection_panel_switch_role_based_message_first: 8087,\r\n access_selection_panel_switch_role_based_message_second: 8088,\r\n\r\n role_base_access_custom_button_tab: 8089,\r\n role_base_access_role_button_tab: 8090,\r\n\r\n access_selection_panel_switch_custom_button: 8091,\r\n access_selection_panel_switch_role_based_button: 8092,\r\n\r\n alternative_id: 4898,\r\n no_alternative_id_has_been_added: 8113,\r\n \r\n database_user_delete_button: 8093,\r\n database_user_reset_button: 8094,\r\n database_user_create_button: 8095,\r\n\r\n database_user_delete_modal_title: 8097,\r\n database_user_delete_modal_desc: 8096,\r\n\r\n database_user_reset_modal_title: 8098,\r\n database_user_create_modal_title: 8099,\r\n\r\n database_user_create_message: 8103,\r\n database_user_reset_message: 8102,\r\n database_user_delete_message: 8101,\r\n\r\n database_create_user_info: 8104,\r\n database_can_not_change_user_id_info: 8112,\r\n\r\n access_to_assign_roles_title: 8114,\r\n access_to_assign_roles_field: 5339,\r\n access_to_assign_roles_group: 8042,\r\n\r\n password_policy_user_account: 8118,\r\n password_policy_db_account: 8119,\r\n\r\n add_default_value_button_text: 8128,\r\n add_default_value_disclaimer: 8145,\r\n add_user_group_button_text: 8129,\r\n add_case_type_button_text: 8130,\r\n add_application_or_case_type_button_text: 8131,\r\n add_user_and_person_fields_button_text: 8132,\r\n add_roles_button_text: 8133,\r\n add_units_button_text: 8136,\r\n\r\n duplicate_user_title: 8241,\r\n duplicate_user_save_text: 8242,\r\n\r\n search_required_message: 8146,\r\n operation_required_message: 8402\r\n};\r\n\r\nexport type AdministrationEditTranslation = {\r\n readonly [T in keyof typeof administrationEditTranslations]: string\r\n};\r\n","export const endpoint = {\r\n user: 'user',\r\n changePassword: (id: number) => `user/${id}/password`,\r\n changePersonId: (id: number) => `user/${id}/personId`,\r\n role: {\r\n data: 'role',\r\n edit: 'role',\r\n add: 'role'\r\n },\r\n extraInfo: 'user/extraInfo/fields/options',\r\n personExcluded: 'user/personOptionsCollection/fieldNodes',\r\n addDatabaseAccount: (id: number) => `user/${id}/adminappAccount`,\r\n resetDatabaseAccount: (id: number) => `user/${id}/adminappAccount/password`,\r\n deleteDatabaseAccount: (id: number) => `user/${id}/adminappAccount`\r\n};\r\n\r\nexport const userOptions = {\r\n usertype: 'user/userType/options',\r\n location: 'user/location/options',\r\n unit: 'user/unit/options',\r\n language: 'user/language/options',\r\n role: 'user/role/options',\r\n mainUsergroup: 'user/usergroup/main/options',\r\n currentUsergroup: (selectedMainUsergroup) => `user/usergroup/main/${selectedMainUsergroup}/current/options`,\r\n applications: 'user/operationaccess/application/options',\r\n operations: (applicationId) => `user/operationaccess/application/${applicationId}/operation/options`,\r\n extendedAccess: {\r\n caseType: 'user/extendedaccess/casetype/options',\r\n unit: (caseType) => `user/extendedaccess/casetype/${caseType}/unit/options`\r\n },\r\n responsibleForUnit: {\r\n caseType: 'user/responsibleforunit/casetype/options',\r\n unit: (caseType) => `user/responsibleforunit/casetype/${caseType}/unit/options`\r\n },\r\n restrictedAccess: {\r\n caseType: 'user/restrictedAccess/casetype/options',\r\n unit: (caseType) => `user/restrictedAccess/casetype/${caseType}/unit/options`\r\n },\r\n accesstoscreen: {\r\n caseType: 'user/accesstoscreen/casetype/options',\r\n screen: (caseType) => `user/accesstoscreen/casetype/${caseType}/screen/options`\r\n },\r\n defaultValues: {\r\n optionsCollections: 'user/defaultValues/optionsCollections/options',\r\n caseTypes: 'user/defaultValues/caseTypes/options',\r\n values: (optionsCollectionId) =>\r\n `user/defaultValues/optionsCollection/${optionsCollectionId}/options`,\r\n valuesFields: (optionsCollectionId) => `user/defaultValues/optionsCollection/${optionsCollectionId}/fields/options`\r\n },\r\n accessToUserGroups: 'user/usergroup/options',\r\n extraInfoOptions: (extraInfoId) => `user/extraInfo/${extraInfoId}/options`\r\n};\r\n\r\nexport const roleOptions = {\r\n ...userOptions,\r\n applications: 'role/operationaccess/application/options'\r\n};\r\n","import { RemoteAdminData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { ApiResponse, Value } from 'app/types-shared';\r\nimport { endpoint, userOptions } from '../endpoints';\r\nimport { Person, UserWireData } from 'app/components/access-panel/shared/types';\r\n\r\nexport const api = {\r\n getUser: (id: number) => {\r\n return new RemoteAdminData(endpoint.user)\r\n .resource<ApiResponse<UserWireData>>()\r\n .withId(id)\r\n .single();\r\n },\r\n getRole: (id: number) => {\r\n return new RemoteAdminData(endpoint.role.data)\r\n .resource<ApiResponse<Person>>()\r\n .withId(id)\r\n .single();\r\n },\r\n addUser: async (user) => {\r\n const response = await new RemoteAdminData(endpoint.user)\r\n .resource<any>()\r\n .create(user, false);\r\n return await response.json();\r\n },\r\n updateUser: async (id: number, user: any) => {\r\n return new RemoteAdminData(endpoint.user)\r\n .resource<ApiResponse<any>>()\r\n .withId(id)\r\n .save(user);\r\n },\r\n changePassword: async (id: number, password: string) => {\r\n return new RemoteAdminData(endpoint.changePassword(id))\r\n .resource<ApiResponse<any>>()\r\n .save({ password });\r\n },\r\n changePersonId: async (id: number, personId: string) => {\r\n return new RemoteAdminData(endpoint.changePersonId(id))\r\n .resource<ApiResponse<any>>()\r\n .save({ personId });\r\n },\r\n getRoleOptions: async () => {\r\n const response = await new RemoteAdminData(userOptions.role)\r\n .resource<ApiResponse<Value[]>>()\r\n .single();\r\n return response.data;\r\n },\r\n saveDatabaseAccount: (id: number, password: string) => {\r\n return new RemoteAdminData(endpoint.addDatabaseAccount(id))\r\n .resource<any>()\r\n .create({ password }, false);\r\n },\r\n resetDatabaseAccount: (id: number, password: any) => {\r\n return new RemoteAdminData(endpoint.resetDatabaseAccount(id))\r\n .resource<ApiResponse<any>>()\r\n .save({ password });\r\n },\r\n deleteDatabaseAccount: (id: number) => {\r\n return new RemoteAdminData(endpoint.deleteDatabaseAccount(id))\r\n .resource<ApiResponse<any>>()\r\n .httpDelete(id);\r\n }\r\n};\r\n","import { ApiResponse } from 'app/types-shared';\r\nimport { RemoteAdminData } from 'app/infrastructure/remote-data';\r\nimport { endpoint } from './endpoints';\r\nimport { ExtraInfoCodeValues } from 'app/components/access-panel/shared/types';\r\n\r\nexport const editApi = {\r\n getExtraInfo: () => {\r\n return new RemoteAdminData(endpoint.extraInfo)\r\n .resource<ApiResponse<ExtraInfoCodeValues[]>>()\r\n .single();\r\n },\r\n getPersonOptions: async () => {\r\n const response = await new RemoteAdminData(endpoint.personExcluded)\r\n .resource<ApiResponse<any>>()\r\n .single();\r\n return response.data;\r\n }\r\n};\r\n","export const sfNames = {\r\n accessRole: 'accessRole',\r\n accessOperations: 'accessOperations',\r\n accessToUserGroups: 'accessToUserGroups',\r\n accessToScreen: 'accessToScreen',\r\n extendedAccess: 'extendedAccess',\r\n responsibleForUnits: 'responsibleForUnits',\r\n restrictedAccess: 'restrictedAccess',\r\n personExcluded: 'personExcluded',\r\n accessToAssignRoles: 'accessToAssignRoles',\r\n additionalInformation: 'additionalInformation',\r\n defaultValues: 'defaultValues',\r\n userCode: 'userCode'\r\n};\r\n\r\nexport const sfParameters = {\r\n application: 'application',\r\n caseType: 'caseType',\r\n defaultValue: 'defaultValue',\r\n codeTable: 'codeTable',\r\n extraInfo: 'extraInfo',\r\n domainNode: 'domainNode',\r\n unit: 'unit',\r\n subset: 'subset',\r\n operation: 'operation',\r\n field: 'field',\r\n role: 'role'\r\n};\r\n","import { sfParameters } from '../sf-names';\r\nimport { DataItem, ValidationItemParameter, ValidationItem, ValidationWire } from './types';\r\n\r\nconst dataItemToValidation = (data: DataItem): ValidationItemParameter => {\r\n return data && Object.keys(data).reduce(\r\n (store, key) => {\r\n return {\r\n ...store,\r\n [key]: data[key].v\r\n };\r\n },\r\n {} as ValidationItemParameter);\r\n};\r\n\r\nconst compareParam = (dataObject: DataItem, validationObject: ValidationItemParameter, param: string) =>\r\n !!dataObject[param] && dataObject[param].v === validationObject[param];\r\n\r\nconst copyParametersForApplication = (params: ValidationItemParameter, data: DataItem[]) => {\r\n\r\n const keys = Object.keys(params);\r\n\r\n return keys.length === 1 && (keys[0] === sfParameters.application || keys[0] === sfParameters.caseType)\r\n ? data\r\n .filter(dataItem => dataItem &&\r\n compareParam(dataItem, params, sfParameters.application) ||\r\n compareParam(dataItem, params, sfParameters.caseType))\r\n .map(dataItemToValidation)\r\n : undefined;\r\n};\r\n\r\nconst copyParametersForDefaultValueCodetable = (params: ValidationItemParameter, data: DataItem[]) => {\r\n\r\n const keys = Object.keys(params);\r\n\r\n return keys.length === 2 &&\r\n keys.some(key => key === sfParameters.caseType) &&\r\n keys.some(key => key === sfParameters.codeTable)\r\n ? data\r\n .filter(dataItem => dataItem &&\r\n (compareParam(dataItem, params, sfParameters.caseType) && compareParam(dataItem, params, sfParameters.codeTable)))\r\n .map(dataItemToValidation)\r\n : undefined;\r\n};\r\n\r\nconst copyParametersForDefaultValueField = (params: ValidationItemParameter, data: DataItem[]) => {\r\n\r\n const keys = Object.keys(params);\r\n\r\n return keys.length === 2 &&\r\n keys.some(key => key === sfParameters.field) &&\r\n keys.some(key => key === sfParameters.caseType || key === sfParameters.codeTable)\r\n ? data\r\n .filter(dataItem => dataItem &&\r\n compareParam(dataItem, params, sfParameters.field) &&\r\n (compareParam(dataItem, params, sfParameters.caseType) || compareParam(dataItem, params, sfParameters.codeTable)))\r\n .map(dataItemToValidation)\r\n : undefined;\r\n};\r\n\r\nexport const normalizeValidationParameters = (validationItem: ValidationItem, data: DataItem[]): ValidationItem[] => {\r\n\r\n if (!data || !validationItem || !validationItem.parameters) {\r\n return validationItem ? [validationItem] : [];\r\n }\r\n\r\n const params = validationItem.parameters;\r\n const validationParameters =\r\n copyParametersForApplication(params, data) ||\r\n copyParametersForDefaultValueCodetable(params, data) ||\r\n copyParametersForDefaultValueField(params, data) ||\r\n [params];\r\n\r\n return validationParameters.map(parameters => ({\r\n message: validationItem.message,\r\n ...(parameters !== undefined && { parameters })\r\n }));\r\n};\r\n\r\nexport const normalizeValidationItems = (validationItems: ValidationItem[], data: DataItem[]): ValidationItem[] => {\r\n\r\n return validationItems && validationItems.reduce(\r\n (store, validationItem) => {\r\n\r\n return [\r\n ...store,\r\n ...normalizeValidationParameters(validationItem, data)\r\n .filter(item => {\r\n\r\n const itemKeys = Object.keys(item && item.parameters || {});\r\n\r\n return !store.some(storeItem => {\r\n\r\n const storeItemKeys = Object.keys(storeItem && storeItem.parameters || {});\r\n\r\n return item.message === storeItem.message &&\r\n itemKeys.length === storeItemKeys.length &&\r\n storeItemKeys.every(\r\n key => item.parameters[key] === storeItem.parameters[key]\r\n );\r\n });\r\n })\r\n ];\r\n },\r\n [] as ValidationItem[]);\r\n};\r\n\r\nexport const normalizeValidation = <T>(validationWire: ValidationWire<T>, data: T) => {\r\n\r\n return data && validationWire && Object.keys(validationWire).reduce(\r\n (store, key) => {\r\n\r\n const validationItem: ValidationItem[] = validationWire[key];\r\n const normalizedItem = normalizeValidationItems(validationItem, data[key]);\r\n\r\n return {\r\n ...store,\r\n [key]: normalizedItem\r\n };\r\n }, {} as ValidationWire<T>) || validationWire;\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { UserMessage } from 'app/types-shared';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { complexValidationFromServer } from 'app/infrastructure/data/validation';\r\nimport { ValidationChange } from './action-types';\r\nimport { Dispatch, AnyAction } from 'redux';\r\nimport { normalizeValidation } from 'app/components/access-panel/validation';\r\nimport { ValidationWire } from 'app/components/access-panel/validation/types';\r\n\r\ninterface ApiError {\r\n userMessages: string | UserMessage[];\r\n validationErrors: ValidationWire<any>;\r\n}\r\n\r\nexport const dispatchValidationError = (err: ApiError, dispatch: Dispatch<AnyAction>, getState: () => ApplicationState) => {\r\n\r\n if (err) {\r\n const state = getState().administrationEditArea;\r\n err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n err.validationErrors && dispatch(new ValidationChange({\r\n ...state.validation,\r\n ...complexValidationFromServer(err.validationErrors)\r\n }));\r\n }\r\n};\r\n\r\nexport const dispatchSaveError = (err: ApiError,\r\n dispatch: Dispatch<AnyAction>,\r\n validationErrorText: string,\r\n data: any) => {\r\n\r\n if (err) {\r\n err.userMessages && err.userMessages.length && dispatch(new ErrorNotification(err.userMessages));\r\n err.validationErrors && Object.keys(err.validationErrors).length &&\r\n dispatch(new ErrorNotification(validationErrorText));\r\n dispatch(new ValidationChange(err.validationErrors\r\n ? complexValidationFromServer(normalizeValidation(err.validationErrors, data)) : []));\r\n }\r\n};\r\n","import { administrationEditTranslations as text } from 'app/area/administration/edit/constants';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { STATE } from 'app/constants';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport * as simpleFormActions from 'app/infrastructure/simple-form/actions';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { SuccessNotification, ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { api } from './api';\r\nimport { editApi } from '../api';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { sharedApi } from 'app/area/administration/shared/api';\r\nimport { createValidationErrors } from 'ui';\r\nimport { AccessItem, AccessPanelDataValidation } from 'app/components/access-panel/shared/types';\r\nimport { isForbiddenStatus, blockAccess } from 'app/area/shared/actions-utils';\r\nimport { dispatchValidationError, dispatchSaveError } from './actions.util';\r\nimport {\r\n ClearUserData, RequestLoadUser, ReceiveLoadUser, FailLoadUser,\r\n RequestLoadUserAccess, ReceiveLoadUserAccess, FailLoadUserAccess,\r\n RequestAddUser, RequestUpdateUser, ReceiveAddUser, ReceiveUpdateUser, FailUserExecute,\r\n RequestChangePersonId, ReceiveChangePersonId, FailChangePersonId,\r\n RequestExtraInfo, ReceiveExtraInfo, FailExtraInfo,\r\n RequestPersonOptions, ReceivePersonOptions, FailPersonOptions,\r\n RequestRole, ReceiveRole, FailRole, UpdateAccessData,\r\n RequestRolePanelAccess, ReceiveRolePanelAccess, FailRolePanelAccess,\r\n RequestChangeDatabaseAccount, ReceiveChangeDatabaseAccount, FailChangeDatabaseAccount,\r\n ValidationChange, ClearValidation\r\n} from './action-types';\r\n\r\nconst simpleFormActionCreators = simpleFormActions.actionCreators(STATE.administrationEdit);\r\n\r\nexport const actionCreators = {\r\n\r\n clearValueInStore: (id: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(simpleFormActionCreators.clearValueInStore(id));\r\n }),\r\n\r\n loadExtraInfo: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new RequestExtraInfo());\r\n try {\r\n const extraInfo = await editApi.getExtraInfo();\r\n dispatch(new ReceiveExtraInfo(extraInfo.data));\r\n } catch (err) {\r\n dispatch(new FailExtraInfo());\r\n }\r\n },\r\n\r\n loadPersonOptions: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new RequestPersonOptions());\r\n try {\r\n const personOptions = await editApi.getPersonOptions();\r\n dispatch(new ReceivePersonOptions(personOptions.rootCodes));\r\n } catch (err) {\r\n dispatch(new FailPersonOptions());\r\n }\r\n },\r\n\r\n loadRole: (id: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n if (id === undefined) {\r\n dispatch(new ReceiveRole(id, undefined));\r\n return;\r\n }\r\n\r\n dispatch(new RequestRole(id));\r\n\r\n try {\r\n const role = await api.getRole(id);\r\n dispatch(new ReceiveRole(id, role.data));\r\n } catch (err) {\r\n dispatch(new FailRole(id));\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n }\r\n },\r\n\r\n loadRolePanelAccess: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new RequestRolePanelAccess());\r\n try {\r\n const userRoleOptions = await api.getRoleOptions();\r\n dispatch(new ReceiveRolePanelAccess(userRoleOptions));\r\n } catch (err) {\r\n dispatch(new FailRolePanelAccess());\r\n }\r\n },\r\n\r\n loadUser: (id: number, updatedData: { [key: string]: string } = {}): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n try {\r\n dispatch(new RequestLoadUser());\r\n\r\n const result = await api.getUser(id);\r\n\r\n dispatch(new ReceiveLoadUser({ ...result.data, ...updatedData }));\r\n } catch (err) {\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationEdit,\r\n translationId: text.no_access_to_user_administration\r\n });\r\n } else {\r\n navigate.toAdminUsersList();\r\n }\r\n\r\n dispatch(new FailLoadUser());\r\n }\r\n },\r\n\r\n loadUserAccess: (id: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n try {\r\n dispatch(new RequestLoadUserAccess());\r\n\r\n const result = await sharedApi.userAccess(id) as any;\r\n\r\n result && dispatch(new ReceiveLoadUserAccess(result[0]));\r\n } catch (err) {\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationEdit,\r\n translationId: text.no_access_to_user_administration\r\n });\r\n } else {\r\n navigate.toAdminUsersList();\r\n }\r\n\r\n dispatch(new FailLoadUserAccess());\r\n }\r\n },\r\n\r\n addUser: (user): ActionDispatching<any, any> => async (dispatch: any, getState: any) => {\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n try {\r\n dispatch(new RequestAddUser());\r\n const result = await api.addUser(user) as any;\r\n\r\n if (result) {\r\n dispatch(new ReceiveAddUser());\r\n dispatch(simpleFormActionCreators.resetChangesListener());\r\n dispatch(new SuccessNotification(translate(text.added_user)));\r\n navigate.toAdminUsersList();\r\n }\r\n } catch (err) {\r\n dispatch(new FailUserExecute());\r\n dispatchSaveError(err, dispatch, translate(text.validation_error), user);\r\n }\r\n },\r\n\r\n duplicateUser: (user): ActionDispatching<any, any> => async (dispatch: any, getState: any) => {\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n try {\r\n dispatch(new RequestAddUser());\r\n const result = await api.addUser(user) as any;\r\n\r\n if (result) {\r\n dispatch(new ReceiveAddUser());\r\n dispatch(simpleFormActionCreators.resetChangesListener());\r\n dispatch(new SuccessNotification(translate(text.duplicated_user)));\r\n navigate.toAdminUsersList();\r\n }\r\n } catch (err) {\r\n dispatch(new FailUserExecute());\r\n dispatchSaveError(err, dispatch, translate(text.validation_error), user);\r\n }\r\n },\r\n\r\n updateUser: (id, query): ActionDispatching<any, any> => async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n\r\n try {\r\n dispatch(new RequestUpdateUser());\r\n const result = await api.updateUser(id, {\r\n ...query,\r\n emailAddress: !query.emailAddress ? null : query.emailAddress\r\n }) as any;\r\n\r\n if (result) {\r\n dispatch(new ReceiveUpdateUser());\r\n dispatch(simpleFormActionCreators.resetChangesListener());\r\n dispatch(new SuccessNotification(translate(text.updated_user)));\r\n navigate.toAdminUsersList();\r\n }\r\n } catch (err) {\r\n dispatch(new FailUserExecute());\r\n dispatchSaveError(err, dispatch, translate(text.validation_error), query);\r\n }\r\n },\r\n\r\n deleteUser: (id: number): ActionDispatching<any, any> => errorSafe(\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n await sharedApi.deleteUser(id);\r\n navigate.toAdminUsersList();\r\n dispatch(new SuccessNotification(translate(text.user_successfully_deleted)));\r\n }),\r\n\r\n changePassword: (id: number, password: string, onSuccess: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n try {\r\n const result = await api.changePassword(id, password) as any;\r\n\r\n if (result) {\r\n dispatch(new SuccessNotification(result.json.messages.userMessages));\r\n onSuccess();\r\n }\r\n } catch (err) {\r\n if (!!err.validationErrors && !!err.validationErrors.password && !!err.validationErrors.password.length) {\r\n const state = getState().administrationEditArea;\r\n dispatch(new ValidationChange({\r\n ...state.validation,\r\n password: createValidationErrors(err.validationErrors.password)\r\n }));\r\n }\r\n\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n }\r\n },\r\n\r\n changePersonId: (id: number, personId: string, onSuccess: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n try {\r\n\r\n dispatch(new RequestChangePersonId());\r\n\r\n await api.changePersonId(id, personId);\r\n\r\n dispatch(new ReceiveChangePersonId(personId));\r\n\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n dispatch(new SuccessNotification(translate(text.user_id_changed)));\r\n\r\n onSuccess();\r\n\r\n } catch (err) {\r\n dispatchValidationError(err, dispatch, getState);\r\n dispatch(new FailChangePersonId());\r\n }\r\n },\r\n\r\n updateAccessData: (key: string, accessItem: Partial<AccessItem>): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new UpdateAccessData(key, accessItem));\r\n },\r\n\r\n saveDatabaseAccount: (id: number, password: string, onSuccess: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n dispatch(new RequestChangeDatabaseAccount());\r\n\r\n try {\r\n\r\n const result = await api.saveDatabaseAccount(id, password) as any;\r\n\r\n if (result) {\r\n await dispatch(actionCreators.loadUserAccess(id));\r\n onSuccess();\r\n dispatch(new SuccessNotification(translate(text.database_user_create_message)));\r\n dispatch(new ReceiveChangeDatabaseAccount());\r\n }\r\n } catch (err) {\r\n dispatchValidationError(err, dispatch, getState);\r\n dispatch(new FailChangeDatabaseAccount());\r\n }\r\n },\r\n\r\n resetDatabaseAccount: (id: number, password: string, onSuccess: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n dispatch(new RequestChangeDatabaseAccount());\r\n try {\r\n\r\n const result = await api.resetDatabaseAccount(id, password) as any;\r\n\r\n if (result) {\r\n await dispatch(actionCreators.loadUserAccess(id));\r\n onSuccess();\r\n dispatch(new SuccessNotification(translate(text.database_user_reset_message)));\r\n dispatch(new ReceiveChangeDatabaseAccount());\r\n }\r\n } catch (err) {\r\n dispatchValidationError(err, dispatch, getState);\r\n dispatch(new FailChangeDatabaseAccount());\r\n }\r\n },\r\n\r\n deleteDatabaseAccount: (id: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new RequestChangeDatabaseAccount());\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n try {\r\n const result = await api.deleteDatabaseAccount(id);\r\n if (result) {\r\n await dispatch(actionCreators.loadUserAccess(id));\r\n dispatch(new ReceiveChangeDatabaseAccount());\r\n dispatch(new SuccessNotification(translate(text.database_user_delete_message)));\r\n }\r\n } catch (err) {\r\n dispatchValidationError(err, dispatch, getState);\r\n dispatch(new FailChangeDatabaseAccount());\r\n }\r\n },\r\n\r\n validateCustomData: (accessPanelDataValidation: AccessPanelDataValidation): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationEditArea.texts);\r\n dispatch(new ErrorNotification(translate(text.validation_error)));\r\n dispatch(new ValidationChange(accessPanelDataValidation || []));\r\n dispatch(new FailUserExecute());\r\n },\r\n\r\n clearValidation: (formName: string, parameters?: { [key: string]: number | string }): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new ClearValidation(formName, parameters));\r\n },\r\n\r\n clearAllValues: (): ActionDispatching<any, any> => async (dispatch: any, getState: any) => {\r\n dispatch(new ClearUserData());\r\n dispatch(simpleFormActionCreators.clearAllValues());\r\n }\r\n};\r\n","import { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { Value } from 'app/types-shared';\r\nimport { ValidationProps } from 'ui/common/validation/types';\r\nimport { ExtraInfoValue } from 'app/components/access-panel/extra-info/types';\r\nimport { DefaultValue } from 'app/components/access-panel/default-values/panel-default-values-utils';\r\n\r\nexport interface OperationEndpoints {\r\n applications?: string;\r\n operations?: (id: number) => string;\r\n accesstoscreen?: { caseType: string, screen: (id: number) => string };\r\n extendedAccess?: { caseType: string, unit: (id: number) => string };\r\n responsibleForUnit?: { caseType: string, unit: (id: number) => string };\r\n restrictedAccess?: { caseType: string, unit: (id: number) => string };\r\n defaultValues?: {\r\n optionsCollections: string,\r\n caseTypes: string,\r\n values: (id: number) => string,\r\n valuesFields: (id: number) => string\r\n };\r\n accessToUserGroups?: string;\r\n personExcluded?: string;\r\n extraInfo?: string;\r\n extraInfoOptions?: (extraInfoId: number) => string;\r\n role?: string;\r\n}\r\n\r\nexport type AccessPanelData = {\r\n [key: string]: AccessItem\r\n};\r\n\r\nexport interface AccessPanelDataValidation {\r\n [key: string]: ValidationProps;\r\n}\r\n\r\nexport interface AlternativeIdData {\r\n personId: string;\r\n name: string;\r\n}\r\n\r\nexport interface AccessPerson {\r\n id: number;\r\n delete: boolean;\r\n edit: boolean;\r\n dbAccess: {\r\n add: boolean;\r\n edit: boolean;\r\n delete: boolean;\r\n };\r\n}\r\n\r\nexport interface DefaultValueReturnType {\r\n codeTable: Value;\r\n caseType: Value;\r\n defaultValue: Value;\r\n field: Value;\r\n}\r\n\r\nexport interface ExtraInfoWireFormat {\r\n extraInfo: Value;\r\n valueString?: string;\r\n valueInteger?: number;\r\n valueFloat?: number;\r\n valueDate?: string;\r\n valueCode?: Value;\r\n}\r\n\r\nexport interface Person {\r\n id: number;\r\n personId: string;\r\n name?: string;\r\n\r\n created: string;\r\n modified: string;\r\n\r\n accessOperations?: { operation: Value, application: Value }[];\r\n accessToScreen?: { domainNode: Value, application: Value }[];\r\n accessToUserGroups?: Value[];\r\n defaultValues?: DefaultValueReturnType[];\r\n extendedAccess?: { unit: Value, application: Value }[];\r\n responsibleForUnits?: any;\r\n personExcluded?: Value[];\r\n restrictedAccess?: any[];\r\n accessToAssignRoles?: Value[];\r\n\r\n additionalInformation: ExtraInfoWireFormat[];\r\n}\r\n\r\nexport interface UserWireData extends Person {\r\n emailAddress: string;\r\n latestLogin: string;\r\n disabled: string;\r\n userType: Value;\r\n mainUserGroup: Value;\r\n currentUserGroup: Value;\r\n unit: Value;\r\n location: Value;\r\n language: Value;\r\n accessRole: Value;\r\n}\r\n\r\nexport enum AccessMode {\r\n role = 1,\r\n custom\r\n}\r\n\r\nexport interface CustomData {\r\n selectedOptions?: ComplexValue<number>[];\r\n selectedValues?: any;\r\n initialValues?: { [key: string]: ComplexValue<number> };\r\n values?: DefaultValue[];\r\n extraInfo?: ExtraInfoValue[];\r\n}\r\n\r\nexport interface AccessItem {\r\n mode: AccessMode;\r\n customData?: CustomData;\r\n roleBaseData: any;\r\n}\r\n\r\nexport interface User extends Person {\r\n emailAddress: string;\r\n latestLogin: string;\r\n disabled: string;\r\n userType: ComplexValue<number>;\r\n mainUserGroup: ComplexValue<number>;\r\n currentUserGroup: ComplexValue<number>;\r\n unit: ComplexValue<number>;\r\n location: ComplexValue<number>;\r\n language: ComplexValue<number>;\r\n accessRole: ComplexValue<number>;\r\n alternativeIds: AlternativeIdData[];\r\n}\r\n\r\nexport interface PersonOptionsCodes {\r\n fetching: boolean;\r\n values: Value[];\r\n}\r\n\r\nexport interface ExtraInfoCodeValues {\r\n id: number;\r\n description: string;\r\n extraInfoDataType: number;\r\n searchRequired?: boolean;\r\n category?: number;\r\n}\r\n\r\nexport interface ExtraInfoCodes {\r\n fetching: boolean;\r\n values: ExtraInfoCodeValues[];\r\n}\r\n\r\nexport interface UserDefaultValues {\r\n defaultValues?: DefaultValueReturnType[];\r\n}\r\n\r\nexport enum ExtraInfoType {\r\n unknown = -1,\r\n text = 1,\r\n date = 2,\r\n integer = 3,\r\n float = 4,\r\n code = 5\r\n}\r\n","import * as React from 'react';\r\nimport style from './tabs-panel.scss';\r\n\r\nconst TabsPanelComponent: React.SFC<{}> = ({ children }) => {\r\n return (<div className={style.tabsPanel}>\r\n {children}\r\n </div>);\r\n};\r\n\r\nexport const TabsPanel = TabsPanelComponent;\r\n","import * as React from 'react';\r\nimport styles from './confirmation-box.scss';\r\nimport { ButtonPrimary } from 'ui';\r\n\r\ninterface ConfirmationBoxProps {\r\n text?: string;\r\n buttonText?: string;\r\n onClick: (event?: any) => void;\r\n}\r\n\r\nexport const ConfirmationBox = ({text, buttonText, onClick}: ConfirmationBoxProps) => (\r\n <div className={styles.modeInformation}>\r\n <p>\r\n {\r\n text || null\r\n }\r\n \r\n </p>\r\n <ButtonPrimary onClick={onClick}>\r\n {\r\n buttonText || null\r\n }\r\n </ButtonPrimary>\r\n</div>\r\n);\r\n","import * as React from 'react';\r\nimport { ElementLoader, Tabs, ComplexValue } from 'ui';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { hasSelectedValues, hasValues, hasExtraInfo } from './selectors';\r\nimport { UpdateAccessDataAction, ClearValidationAction } from 'app/components/access-panel/types';\r\nimport { TabsPanel } from 'app/components/tabs-panel';\r\n\r\nimport { AccessItem, AccessMode } from 'app/components/access-panel/shared/types';\r\nimport { ConfirmationBox } from 'app/components/confirmation-box/confirmation-box';\r\n\r\n/** Some shared props of the component passed to withRoleBasedAccess method */\r\ninterface RoleBasedAccessExternalProps {\r\n\r\n formName: string;\r\n translation: any;\r\n initialValue: any;\r\n readOnly: boolean;\r\n}\r\n\r\n/** External props of RoleBasedAccess component - not passed down */\r\ninterface RoleBasedAccessOwnProps {\r\n\r\n roleSelected: boolean;\r\n roleValue: any;\r\n fetchingRoleValue: boolean;\r\n\r\n accessData: AccessItem;\r\n updateAccessData: UpdateAccessDataAction;\r\n clearValidation: ClearValidationAction;\r\n}\r\n\r\ninterface RoleBasedAccessState {\r\n /** Specifies which tab is selected */\r\n tab: AccessMode;\r\n}\r\n\r\nexport interface RoleBasedAccessCustomStateProps<S> {\r\n customState: S;\r\n changeCustomState: (state: S) => void;\r\n}\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const withRoleBasedAccess = <P extends RoleBasedAccessExternalProps, S>(\r\n WrappedComponent: React.ComponentClass<P & RoleBasedAccessCustomStateProps<S>>) => {\r\n\r\n // fix to some issues during npm run build\r\n const RoleBasedComponent = WrappedComponent as any;\r\n\r\n return class extends React.Component<P & RoleBasedAccessOwnProps, RoleBasedAccessState> {\r\n\r\n public static defaultProps: Partial<RoleBasedAccessOwnProps> = {\r\n accessData: { mode: AccessMode.custom, customData: undefined, roleBaseData: undefined }\r\n };\r\n\r\n public state: Readonly<RoleBasedAccessState> = {\r\n tab: AccessMode.custom\r\n };\r\n\r\n public componentDidMount() {\r\n const { roleSelected, initialValue, formName, updateAccessData } = this.props;\r\n const mode = roleSelected && (!initialValue || !initialValue.length) ? AccessMode.role : AccessMode.custom;\r\n\r\n this.setState({ tab: mode });\r\n updateAccessData(formName, { mode, roleBaseData: undefined });\r\n }\r\n\r\n public componentDidUpdate(prevProps: P & RoleBasedAccessOwnProps) {\r\n\r\n const { roleSelected, roleValue, formName, accessData, updateAccessData } = this.props;\r\n\r\n // set access mode when user adds or removes role\r\n if (roleSelected !== prevProps.roleSelected) {\r\n\r\n const mode = roleSelected && (accessData.mode === AccessMode.role ||\r\n !accessData.customData ||\r\n (!hasSelectedValues(accessData.customData)\r\n && !hasValues(accessData.customData)\r\n && !hasExtraInfo(accessData.customData)))\r\n ? AccessMode.role : AccessMode.custom;\r\n\r\n this.setState({ tab: mode });\r\n updateAccessData(formName, { mode, roleBaseData: undefined });\r\n }\r\n\r\n // clear role based state, when user changes role\r\n else if (roleValue !== prevProps.roleValue) {\r\n updateAccessData(formName, { roleBaseData: undefined });\r\n }\r\n }\r\n\r\n private onChangeTab = (option: ComplexValue<number>) => this.setState({ tab: option.value });\r\n\r\n private onChangeMode = () => {\r\n const { formName, accessData, updateAccessData, clearValidation } = this.props;\r\n const mode = accessData.mode === AccessMode.role ? AccessMode.custom : AccessMode.role;\r\n const customData = mode === AccessMode.role ? undefined : accessData.roleBaseData;\r\n\r\n updateAccessData && updateAccessData(formName, { mode, customData });\r\n clearValidation && clearValidation(formName);\r\n }\r\n\r\n private onChangeCustomState = (state: S) => {\r\n const { formName, accessData, updateAccessData } = this.props;\r\n if (updateAccessData && !deepEquals(state, accessData.customData)) {\r\n updateAccessData(formName, { customData: state });\r\n }\r\n }\r\n\r\n private onChangeRoleBasedState = (state: S) => {\r\n const { formName, accessData, updateAccessData } = this.props;\r\n if (updateAccessData && !deepEquals(state, accessData.roleBaseData)) {\r\n updateAccessData(formName, { roleBaseData: state });\r\n }\r\n }\r\n\r\n private renderCustomMode() {\r\n\r\n const { readOnly, accessData, translation } = this.props;\r\n\r\n return <TabsPanel>\r\n {accessData.mode !== AccessMode.custom\r\n ? <ConfirmationBox\r\n text={translation.access_selection_panel_switch_custom_message_first || '' + ' ' +\r\n translation.access_selection_panel_switch_custom_message_second || ''}\r\n onClick={this.onChangeMode}\r\n buttonText={translation.access_selection_panel_switch_custom_button}\r\n />\r\n : <RoleBasedComponent {...this.props}\r\n customState={accessData.customData}\r\n changeCustomState={this.onChangeCustomState}\r\n readOnly={readOnly || accessData.mode !== AccessMode.custom} />}\r\n </TabsPanel>;\r\n }\r\n\r\n private renderRoleBasedMode() {\r\n const { formName, roleValue, fetchingRoleValue, accessData, translation } = this.props;\r\n\r\n return <TabsPanel>\r\n {fetchingRoleValue\r\n ? <ElementLoader />\r\n : <>\r\n {accessData.mode !== AccessMode.role && <ConfirmationBox\r\n text={translation.access_selection_panel_switch_role_based_message_first || '' + ' ' +\r\n translation.access_selection_panel_switch_role_based_message_second || ''}\r\n buttonText={translation.access_selection_panel_switch_role_based_button}\r\n onClick={this.onChangeMode}\r\n />\r\n }\r\n <RoleBasedComponent {...this.props}\r\n formName={`role-based-${formName}`}\r\n initialValue={roleValue}\r\n readOnly={true}\r\n customState={accessData.roleBaseData}\r\n changeCustomState={this.onChangeRoleBasedState} />\r\n </>\r\n }\r\n </TabsPanel >;\r\n }\r\n\r\n public render() {\r\n\r\n const { formName, roleSelected, readOnly, translation } = this.props;\r\n\r\n if (!roleSelected) {\r\n return this.renderCustomMode();\r\n }\r\n\r\n const tabsOptions = [\r\n { value: AccessMode.role, description: translation.role_base_access_role_button_tab },\r\n { value: AccessMode.custom, description: translation.role_base_access_custom_button_tab }\r\n ];\r\n\r\n return <div key={formName}>\r\n <Tabs\r\n id={formName}\r\n options={tabsOptions}\r\n selectedOption={tabsOptions.find(option => option.value === this.state.tab)}\r\n readOnly={readOnly}\r\n onChange={this.onChangeTab}\r\n >\r\n {this.state.tab === AccessMode.role\r\n ? this.renderRoleBasedMode()\r\n : this.renderCustomMode()}\r\n </Tabs>\r\n </div>;\r\n }\r\n };\r\n};\r\n","export const hasValues = data =>\r\n data.values &&\r\n data.values.length;\r\n\r\nexport const hasSelectedValues = data =>\r\n data.selectedValues &&\r\n Object.keys(data.selectedValues).length;\r\n\r\nexport const hasExtraInfo = data =>\r\n data.extraInfo &&\r\n data.extraInfo.length &&\r\n data.extraInfo.some(i => i.value !== undefined);\r\n","import * as React from 'react';\r\nimport { HotKeys } from 'react-hotkeys';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { AddButton } from 'ui/common/button/add-button';\r\nimport { OnClickOutside } from 'ui/common/on-click-outside';\r\nimport styles from './options-panel-dialog.scss';\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport { ButtonPrimary } from 'ui/common/button/button-primary';\r\n\r\ninterface OptionsPanelDialogComponentProps {\r\n onSubmit: () => void;\r\n addButtonText: string;\r\n doneButtonText: string;\r\n}\r\n\r\ninterface OptionsPanelDialogComponentState {\r\n showSelectDialog: boolean;\r\n}\r\n\r\nclass OptionsPanelDialogComponent extends React.Component<OptionsPanelDialogComponentProps, OptionsPanelDialogComponentState> {\r\n private keyMap: any;\r\n private handlers: any;\r\n\r\n constructor(props: OptionsPanelDialogComponentProps) {\r\n super(props);\r\n this.state = { showSelectDialog: false };\r\n\r\n this.keyMap = {\r\n onEnter: [keyCodeTypes.Enter]\r\n };\r\n\r\n this.handlers = {\r\n onEnter: () => this.onSubmit\r\n };\r\n }\r\n\r\n private closeSelectDialog = () => {\r\n this.setState({ showSelectDialog: false });\r\n }\r\n\r\n private openSelectDialog = () => {\r\n this.setState({ showSelectDialog: true });\r\n }\r\n\r\n private onSubmit = () => {\r\n this.props.onSubmit();\r\n this.closeSelectDialog();\r\n }\r\n\r\n public render() {\r\n return <OnClickOutside onClickOutside={this.closeSelectDialog}>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n <div className={styles.linkSelector}>\r\n <AddButton icon={mdPlus} onClick={this.openSelectDialog} required={false}>\r\n {this.props.addButtonText}\r\n </AddButton>\r\n <div className={styles.buttonContainer}>\r\n {this.state.showSelectDialog && <DialogExpander selectExpander={true} onClose={this.closeSelectDialog} hasFooter={false}>\r\n\r\n {this.state.showSelectDialog && <div className=\"row expanders-in-equal-cols\">\r\n {React.Children.map(this.props.children, (child, i) => <div className=\"col-lg-12\">{child}</div>)}\r\n </div>}\r\n\r\n <div className=\"d-flex justify-content-end\">\r\n <ButtonPrimary onClick={this.onSubmit}>\r\n {this.props.doneButtonText}\r\n </ButtonPrimary>\r\n </div>\r\n </DialogExpander>}\r\n </div>\r\n </div>\r\n </HotKeys>\r\n </OnClickOutside>;\r\n }\r\n}\r\n\r\nexport const OptionsPanelDialog = OptionsPanelDialogComponent;\r\n","import { ValidationProps, ValidationLevel } from 'ui';\r\n\r\nexport const mapValidation = (validation: { [key: string]: ValidationProps },\r\n fieldId: number,\r\n formName: string,\r\n fieldGroupingName: string): ValidationProps => {\r\n\r\n const validationMessages = validation && validation[formName] && validation[formName].messages\r\n && validation[formName].messages.filter(\r\n message => message.parameters && message.parameters[fieldGroupingName] &&\r\n message.parameters[fieldGroupingName] === fieldId);\r\n\r\n return validationMessages && { level: ValidationLevel.error, messages: validationMessages } || undefined;\r\n};\r\n\r\nexport const mapInvalidOptions = (validationProps: ValidationProps, valueName: string) => {\r\n return validationProps && validationProps.messages && validationProps.messages\r\n .map(message => message && message.parameters && message.parameters[valueName])\r\n .filter(value => !!value || value === 0)\r\n .map(value => ({\r\n value\r\n })) || [];\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, ValidationProps, AccessCard } from 'ui';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { SimpleFormComponentProps, ApiToUse } from 'app/infrastructure/simple-form/types';\r\nimport { Value } from 'app/types-shared';\r\nimport { withRoleBasedAccess, RoleBasedAccessCustomStateProps } from '../role-based-access';\r\nimport { OptionsPanelDialog } from './options-panel-dialog';\r\nimport { mapInvalidOptions } from '../shared';\r\n\r\nconst valueFieldName = (formName: string) => `${formName}_id`;\r\n\r\ninterface SingleOptionPanelProps {\r\n readOnly: boolean;\r\n translation: any;\r\n initialValue: Value[];\r\n\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n\r\n formValues: any;\r\n formName: string;\r\n valueName: string;\r\n validation: ValidationProps;\r\n\r\n valueOptionsEndpoint: string;\r\n valueLabel: string;\r\n panelLabel?: string;\r\n addButtonText: string;\r\n clearValueInStore: (id: string) => void;\r\n}\r\n\r\ninterface SingleOptionPanelState {\r\n selectedValues: ComplexValue<number>[];\r\n initialValues?: ComplexValue<number>[];\r\n}\r\n\r\ntype SingleOptionPanelComponentProps = SingleOptionPanelProps & RoleBasedAccessCustomStateProps<SingleOptionPanelState>;\r\n\r\nexport class SingleOptionPanelComponent extends React.Component<SingleOptionPanelComponentProps> {\r\n\r\n public componentDidMount() {\r\n this.buildInitialState();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.buildInitialState();\r\n }\r\n\r\n private buildInitialState = () => {\r\n\r\n const { initialValue, customState, changeCustomState } = this.props;\r\n\r\n // Check if state does not exist and there is initial value\r\n if (customState || !this.props.initialValue) {\r\n return;\r\n }\r\n\r\n const selectedValues: ComplexValue<number>[] = (initialValue && initialValue.map(v => ({\r\n value: v.v,\r\n description: v.d\r\n }))) || [];\r\n\r\n changeCustomState({\r\n selectedValues,\r\n initialValues: selectedValues\r\n });\r\n }\r\n\r\n private addValues = () => {\r\n\r\n const { formValues, formName, clearValueInStore, customState, changeCustomState } = this.props;\r\n const { selectedValues = [] } = customState || {};\r\n\r\n const fieldName = valueFieldName(formName);\r\n\r\n if (!formValues[fieldName] || formValues[fieldName].length === 0) {\r\n return;\r\n }\r\n\r\n const newValues = formValues[fieldName].filter(v => !selectedValues.some(\r\n sv => sv.value === v.value\r\n ));\r\n\r\n clearValueInStore(fieldName);\r\n\r\n changeCustomState({\r\n ...(customState || {}),\r\n selectedValues: [\r\n ...selectedValues,\r\n ...newValues\r\n ]\r\n });\r\n }\r\n\r\n private deleteAccessCard = () => {\r\n this.props.changeCustomState({\r\n ...(this.props.customState || {}),\r\n selectedValues: []\r\n });\r\n }\r\n\r\n private updateValues = (values: ComplexValue<number>[]) => {\r\n\r\n this.props.changeCustomState({\r\n ...(this.props.customState || {}),\r\n selectedValues: values\r\n });\r\n }\r\n\r\n public render() {\r\n const { translation, formName, valueName, validation, readOnly, valueOptionsEndpoint,\r\n formComponent: SimpleForm, addButtonText, valueLabel, panelLabel } = this.props;\r\n const { selectedValues = [], initialValues = [] } = this.props.customState || {};\r\n const addValuesPanel = (<OptionsPanelDialog onSubmit={this.addValues} addButtonText={addButtonText} doneButtonText={translation.done}>\r\n <SimpleForm\r\n name={valueFieldName(formName)}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n optionsEndpoint={valueOptionsEndpoint}\r\n placeholder={translation.search}\r\n descriptionAllLevels={true}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n translation={translation}\r\n label={{ text: valueLabel, required: false }}\r\n initialValue={null}\r\n alwaysOpen={true} />\r\n </OptionsPanelDialog>\r\n );\r\n\r\n const invalidOptions = mapInvalidOptions(validation, valueName);\r\n\r\n const accessCardPanel =\r\n <div className=\"row\">\r\n <AccessCard\r\n componentId={formName}\r\n className={undefined}\r\n label={{ text: panelLabel }}\r\n useLabelOption={true}\r\n options={selectedValues}\r\n valueItems={selectedValues}\r\n initialValueItems={initialValues}\r\n invalidOptions={invalidOptions}\r\n removeLabel={translation.remove}\r\n validation={validation}\r\n onChange={this.updateValues}\r\n onDelete={this.deleteAccessCard}\r\n readOnly={readOnly} />\r\n </div>;\r\n\r\n return <>\r\n {!readOnly && addValuesPanel}\r\n {!!selectedValues.length\r\n ? accessCardPanel\r\n : readOnly && <p className=\"no-content\">{translation.no_access_has_been_granted}</p>}\r\n </>;\r\n }\r\n}\r\n\r\nexport const SingleOptionPanel = withRoleBasedAccess<SingleOptionPanelProps, SingleOptionPanelState>(SingleOptionPanelComponent);\r\n","import * as React from 'react';\r\nimport style from './top-panel.scss';\r\nimport { parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { Person } from 'app/components/access-panel/shared/types';\r\n\r\ninterface TopPanelProps {\r\n data: Person;\r\n hideDetails?: boolean;\r\n formatters: any;\r\n translation: any;\r\n}\r\n\r\nconst TopPanelComponent = (props: TopPanelProps) => {\r\n const { data, hideDetails, formatters, translation } = props;\r\n\r\n const dateFormatter = (date: string) => formatters.formatDate(parseAsDateUTC(date), {\r\n day: 'numeric',\r\n month: 'numeric',\r\n year: 'numeric'\r\n });\r\n\r\n return (<div className={`row justify-content-between ${style.topPanel}`}>\r\n <div className=\"col col-auto\">\r\n <div>\r\n {!hideDetails && data && <ul className={style.userInformationDetails}>\r\n {data.created && <li>{translation.created} {dateFormatter(data.created)}</li>}\r\n {data.modified && <li>{translation.modified} {dateFormatter(data.modified)}</li>}\r\n </ul>}\r\n </div>\r\n </div>\r\n </div>);\r\n};\r\n\r\nexport const TopPanel = TopPanelComponent;\r\n","import * as React from 'react';\r\nimport style from './admin-paper.scss';\r\nimport { Paper } from 'ui';\r\nimport { ScrollToTop } from 'ui/scroll-to-top/scroll-to-top';\r\n\r\nconst AdminPaperComponent: React.SFC<{}> = ({ children }) => {\r\n return (<Paper componentId=\"useradmin-paper\" className={style.useradminPaper}>\r\n {children}\r\n <ScrollToTop/>\r\n </Paper>);\r\n};\r\n\r\nexport const AdminPaper = AdminPaperComponent;\r\n","import * as React from 'react';\r\nimport { SectionPanel } from 'ui';\r\n\r\nconst AdminPaperTopPanelComponent = (isMain: boolean): React.FunctionComponent<{ title: string }> =>\r\n ({ title, children }) =>\r\n <SectionPanel\r\n className=\"admin-paper-top-panel\"\r\n componentId=\"1\"\r\n validation={undefined}\r\n info={{ text: '' }}\r\n isMain={isMain}\r\n label={{ visible: true, text: title }}>\r\n {children}\r\n </SectionPanel>;\r\n\r\nexport const AdminPaperTopPanel = AdminPaperTopPanelComponent(true);\r\nexport const AdminPaperSubPanel = AdminPaperTopPanelComponent(false);\r\n","import * as React from 'react';\r\nimport { SingleOptionPanel } from './options-panel/single-option-panel';\r\nimport { PanelsProps } from './types';\r\nimport { sfNames, sfParameters } from 'app/components/access-panel/sf-names';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport const AccessToAdministrateUserGroup = (props: PanelsProps) => {\r\n const { translation, readOnly, data, formComponent, formValues, endpoints, validation, clearValueInStore,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData } = props;\r\n\r\n return <AdminPaperTopPanel title={translation.access_to_administrate_user_group}>\r\n <SingleOptionPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n initialValue={data && data.accessToUserGroups}\r\n\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.accessToUserGroups}\r\n accessData={accessData && accessData.accessToUserGroups}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n valueName={sfParameters.subset}\r\n formName={sfNames.accessToUserGroups}\r\n validation={validation && validation[sfNames.accessToUserGroups]}\r\n valueOptionsEndpoint={endpoints.accessToUserGroups}\r\n valueLabel={translation.user_group}\r\n panelLabel={translation.user_groups}\r\n addButtonText={translation.add_user_group_button_text}\r\n clearValueInStore={clearValueInStore}\r\n />\r\n </AdminPaperTopPanel>;\r\n};\r\n","import { ComplexValue } from 'app/types-shared';\r\n\r\nexport const addToArrayIfNotAlreadyThere = (group: ComplexValue<number>[], newValue: ComplexValue<number>) => {\r\n if (newValue && !(group && group.some(o => o.value === newValue.value))) {\r\n return [\r\n ...(group || []),\r\n newValue\r\n ];\r\n }\r\n else {\r\n return group;\r\n }\r\n};\r\n\r\nexport const groupSelectorFieldName = (formName: string, groupingName: string) => `${formName}-${groupingName}_id`;\r\n\r\nexport const updateSelectedValues = (initialValue, groupingName: string, valueName: string) => {\r\n return (initialValue && initialValue.reduce((memo, current) => {\r\n const newValue = {\r\n value: current[valueName].v,\r\n description: current[valueName].d\r\n };\r\n const newPanelValue = {\r\n [current[groupingName].v]: [\r\n ...(memo[current[groupingName].v] || []),\r\n newValue\r\n ]\r\n };\r\n\r\n return { ...memo, ...newPanelValue };\r\n }, {})\r\n );\r\n};\r\n\r\nexport const addSelectedValues = (\r\n prevSelectedValues: { [key: number]: ComplexValue<number>[] },\r\n selectedGroupKey: number,\r\n selectedValues: ComplexValue<number>[]\r\n) => {\r\n\r\n const prevGroup = (prevSelectedValues && prevSelectedValues[selectedGroupKey]) || [];\r\n const currentGroup = selectedValues\r\n ? selectedValues.filter(v => !prevGroup || !prevGroup.some(pv => pv.value === v.value))\r\n : [];\r\n\r\n if (currentGroup.length > 0) {\r\n return {\r\n ...prevSelectedValues,\r\n [selectedGroupKey]: [\r\n ...prevGroup,\r\n ...currentGroup\r\n ]\r\n };\r\n }\r\n\r\n return prevSelectedValues;\r\n};\r\n","import { SimpleFormComponentProps, FormValuesType } from 'app/infrastructure/simple-form/types';\r\nimport { ValidationProps } from 'ui';\r\nimport {\r\n OperationEndpoints, PersonOptionsCodes, Person, AccessItem, User, AccessPanelData\r\n} from 'app/components/access-panel/shared/types';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\n\r\nexport type UpdateAccessDataAction = (key: string, accessItem: Partial<AccessItem>) => void;\r\nexport type ClearValidationAction = (formName: string, parameters?: { [key: string]: number | string }) => void;\r\n\r\nexport interface PanelsProps<Data = User | Person> extends OptionsProps {\r\n roleSelected: boolean;\r\n roleBasedData: Data;\r\n data: Data;\r\n fetchingRoleBasedData: boolean;\r\n readOnly: boolean;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n formValues: FormValuesType;\r\n endpoints: OperationEndpoints;\r\n validation: { [key: string]: ValidationProps };\r\n personOptionsCodes?: PersonOptionsCodes;\r\n translation: any;\r\n accessData: AccessPanelData;\r\n updateAccessData: UpdateAccessDataAction;\r\n clearValidation: ClearValidationAction;\r\n clearValueInStore: (id: string) => void;\r\n}\r\n\r\nexport enum GroupingType {\r\n Single,\r\n Multiple\r\n}\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { ApiToUse } from 'app/infrastructure/simple-form/types';\r\nimport { groupSelectorFieldName } from './options-panel.utils';\r\nimport { GroupingType } from '../types';\r\nimport { OptionsPanelDialog } from 'app/components/access-panel/options-panel/options-panel-dialog';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport get from 'lodash/get';\r\n\r\ninterface OptionPanelComponentProps {\r\n formName: string;\r\n groupingName: string;\r\n valueName: string;\r\n groupingLabel: string;\r\n formValues: any;\r\n addButtonText: string;\r\n groupingOptionsEndpoint: string;\r\n formComponent: any;\r\n addGroup: any;\r\n valueLabel?: string;\r\n groupingType?: any;\r\n useStaticOptions: boolean;\r\n group?: ComplexValue<number>;\r\n translation: any;\r\n valuesOptionsEndpoint: (value: number) => string;\r\n clearValueInStore?: (contextName: string) => void;\r\n}\r\n\r\nclass OptionPanelComponent extends React.Component<OptionPanelComponentProps> {\r\n\r\n get groupingName() {\r\n return groupSelectorFieldName(this.props.formName, this.props.groupingName);\r\n }\r\n\r\n get valueName() {\r\n return groupSelectorFieldName(this.props.formName, this.props.valueName);\r\n }\r\n\r\n public componentDidUpdate(prevProps: OptionPanelComponentProps) {\r\n if (this.props.useStaticOptions) {\r\n const groupingValue = get(this.props.formValues, this.groupingName);\r\n const prevGroupingValue = get(prevProps.formValues, this.groupingName);\r\n if ((groupingValue && prevGroupingValue && groupingValue.value !== prevGroupingValue.value)\r\n || (prevGroupingValue && !groupingValue)) {\r\n this.props.clearValueInStore && this.props.clearValueInStore(this.valueName);\r\n }\r\n }\r\n }\r\n\r\n public render() {\r\n const { translation, formValues,\r\n groupingLabel, groupingOptionsEndpoint, groupingType, group,\r\n addButtonText, valuesOptionsEndpoint, valueLabel,\r\n formComponent: SimpleForm, addGroup, useStaticOptions } = this.props;\r\n\r\n const selectedPanel = get(formValues, this.groupingName);\r\n const selectedPanelValue = selectedPanel && selectedPanel.value;\r\n const selectedGroupValue = group && group.value;\r\n const id = selectedGroupValue || selectedPanelValue;\r\n const showValueFields = (useStaticOptions || selectedGroupValue) && id;\r\n\r\n const groupFields = <SimpleForm\r\n name={this.groupingName}\r\n type={groupingType === GroupingType.Single\r\n ? FIELD_TYPE.SELECT_SINGLE_HIERARCHY : FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n optionsEndpoint={groupingOptionsEndpoint}\r\n placeholder={translation.search}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: groupingLabel, required: false }}\r\n initialValue={group && group}\r\n readOnly={!!selectedGroupValue}\r\n alwaysOpen={true}\r\n />;\r\n\r\n const valueFields = <SimpleForm\r\n name={this.valueName}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n optionsEndpoint={valuesOptionsEndpoint(id)}\r\n placeholder={translation.search}\r\n descriptionAllLevels={true}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n translation={translation}\r\n label={{ text: valueLabel, required: false }}\r\n initialValue={null}\r\n alwaysOpen={true} />;\r\n\r\n return <OptionsPanelDialog onSubmit={addGroup} addButtonText={addButtonText} doneButtonText={translation.done}>\r\n <div className=\"col-lg-12\">\r\n <div className={`${!!selectedGroupValue && 'd-none'}`}>\r\n {groupFields}\r\n </div>\r\n {showValueFields && valueFields}\r\n </div>\r\n </OptionsPanelDialog>;\r\n }\r\n}\r\n\r\nexport const OptionPanel = OptionPanelComponent;\r\n","import * as React from 'react';\r\nimport { ComplexValue, ValidationProps, AccessCard } from 'ui';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { LoadOptions } from 'app/types-shared';\r\nimport { mapValidation, mapInvalidOptions } from '../shared';\r\n\r\nexport interface OptionCardProps extends OptionsProps {\r\n\r\n groupId: number;\r\n label: string;\r\n valueItems: ComplexValue<number>[];\r\n initialValueItems: ComplexValue<number>[];\r\n\r\n formName: string;\r\n groupingName: string;\r\n valueName: string;\r\n\r\n validation: { [key: string]: ValidationProps };\r\n readOnly: boolean;\r\n translation: any;\r\n\r\n valuesOptionsEndpoint: (groupId: number) => string;\r\n useLabelOption: boolean;\r\n\r\n addGroup: () => void;\r\n removeGroup: (groupId: number) => void;\r\n onChange: (values: ComplexValue<number>[], groupId: number) => void;\r\n}\r\n\r\nconst cardName = (formName: string, groupId: number) => formName + '-' + groupId;\r\nconst emptyOptions = { codes: [], fetching: true };\r\n\r\nexport class OptionCard extends React.Component<OptionCardProps> {\r\n\r\n private removeGroup = () => {\r\n this.props.removeGroup(this.props.groupId);\r\n }\r\n\r\n private onChange = (values: ComplexValue<number>[]) => {\r\n this.props.onChange(values, this.props.groupId);\r\n }\r\n\r\n private onLoadOptions = (opt: LoadOptions) => {\r\n\r\n const { formName, groupId, valuesOptionsEndpoint, loadOptions } = this.props;\r\n\r\n loadOptions(cardName(formName, groupId), valuesOptionsEndpoint(groupId), {});\r\n };\r\n\r\n public render() {\r\n\r\n const { groupId, label, valueItems, initialValueItems, formName, groupingName, valueName,\r\n validation, options, useLabelOption, translation, readOnly, children } = this.props;\r\n\r\n const cardValidation = mapValidation(validation, groupId, formName, groupingName);\r\n const invalidOptions = mapInvalidOptions(cardValidation, valueName);\r\n const option = options[cardName(formName, groupId)] || emptyOptions;\r\n\r\n return <AccessCard\r\n componentId={cardName(formName, groupId)}\r\n className={undefined}\r\n label={{ text: label }}\r\n valueItems={valueItems}\r\n initialValueItems={initialValueItems}\r\n invalidOptions={invalidOptions}\r\n options={useLabelOption ? valueItems : option.codes}\r\n onLoadOptions={this.onLoadOptions}\r\n fetching={useLabelOption ? false : option.fetching}\r\n validation={cardValidation}\r\n removeLabel={translation.remove}\r\n onChange={this.onChange}\r\n onDelete={this.removeGroup}\r\n useLabelOption={useLabelOption}\r\n readOnly={readOnly}\r\n readOnlyLabel={readOnly ? translation.access_card_settings_to_selected_roles : undefined}>\r\n {children}\r\n </AccessCard>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ValidationProps } from 'ui';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { SimpleFormComponentProps } from 'app/infrastructure/simple-form/types';\r\nimport { addToArrayIfNotAlreadyThere, groupSelectorFieldName, addSelectedValues, updateSelectedValues } from './options-panel.utils';\r\nimport { GroupingType, ClearValidationAction } from '../types';\r\nimport { withRoleBasedAccess, RoleBasedAccessCustomStateProps } from '../role-based-access';\r\nimport { OptionPanel } from './option-panel';\r\nimport { OptionCard } from './option-card';\r\n\r\nimport styles from './options-panel.scss';\r\nimport { sfParameters } from 'app/components/access-panel/sf-names';\r\n\r\nimport get from 'lodash/get';\r\n\r\nexport interface OptionsPanelExternalProps extends OptionsProps {\r\n readOnly: boolean;\r\n translation: any;\r\n initialValue: any;\r\n\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n\r\n formValues: any;\r\n formName: string;\r\n groupingName: string;\r\n groupingType?: GroupingType;\r\n valueName: string;\r\n\r\n groupingOptionsEndpoint: string;\r\n valuesOptionsEndpoint: (id: number) => string;\r\n useLabelOption?: boolean;\r\n validation: { [key: string]: ValidationProps };\r\n singleStepAccess?: boolean;\r\n groupingLabel: string;\r\n valueLabel?: string;\r\n addButtonText: string;\r\n addSubButtonText?: string;\r\n clearValueInStore: (id: string) => void;\r\n clearValidation: ClearValidationAction;\r\n}\r\n\r\nexport interface OptionsPanelState {\r\n selectedOptions: ComplexValue<number>[];\r\n selectedValues: { [key: number]: ComplexValue<number>[] };\r\n initialValues?: { [key: number]: ComplexValue<number>[] };\r\n}\r\n\r\ntype OptionsPanelComponentProps = OptionsPanelExternalProps & RoleBasedAccessCustomStateProps<OptionsPanelState>;\r\n\r\nclass OptionsPanelComponent extends React.Component<OptionsPanelComponentProps> {\r\n\r\n public static defaultProps: Partial<OptionsPanelComponentProps> = {\r\n groupingType: GroupingType.Single\r\n };\r\n\r\n public componentDidMount() {\r\n this.buildInitalState();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.buildInitalState();\r\n }\r\n\r\n private buildInitalState = () => {\r\n\r\n // Check if state does not exist and there is initial value\r\n if (this.props.customState || !this.props.initialValue) {\r\n return;\r\n }\r\n\r\n const { initialValue, groupingName, valueName, changeCustomState } = this.props;\r\n const initialGroups: ComplexValue<number>[] = (initialValue && initialValue.map(v => ({\r\n value: v[groupingName].v,\r\n description: v[groupingName].d\r\n }))) || [];\r\n\r\n const selectedOptions = initialGroups.reduce(addToArrayIfNotAlreadyThere, []);\r\n const selectedValues = updateSelectedValues(initialValue, groupingName, valueName);\r\n\r\n changeCustomState({\r\n selectedOptions,\r\n selectedValues,\r\n initialValues: selectedValues\r\n });\r\n }\r\n\r\n private removeGroup = (groupValue: number) => {\r\n\r\n const { customState = { selectedValues: {}, selectedOptions: [] }, changeCustomState } = this.props;\r\n const newSelectedOptions = customState.selectedOptions.filter(o => o.value !== groupValue);\r\n const newSelectedValues = {\r\n ...customState.selectedValues,\r\n [groupValue]: undefined\r\n };\r\n\r\n this.clearValidation(groupValue);\r\n\r\n changeCustomState({\r\n ...customState,\r\n selectedOptions: [\r\n ...newSelectedOptions\r\n ],\r\n selectedValues: {\r\n ...newSelectedValues\r\n }\r\n });\r\n }\r\n\r\n private onChange = (value: ComplexValue<number>[], groupValue: number) => {\r\n\r\n const { customState = { selectedValues: {}, selectedOptions: [] }, changeCustomState } = this.props;\r\n changeCustomState({\r\n ...customState,\r\n selectedOptions: customState.selectedOptions,\r\n selectedValues: {\r\n ...customState.selectedValues,\r\n [groupValue]: value.length === 0\r\n ? undefined\r\n : [...value]\r\n }\r\n });\r\n\r\n this.clearValidation(groupValue);\r\n }\r\n\r\n private addGroup = () => {\r\n const { formValues, formName, groupingName, valueName, useLabelOption, clearValueInStore,\r\n customState = { selectedValues: {}, selectedOptions: [] }, changeCustomState } = this.props;\r\n const groupSelectorName = groupSelectorFieldName(formName, groupingName);\r\n const valueSelectorName = groupSelectorFieldName(formName, valueName);\r\n\r\n const selectedGroup = get(formValues, groupSelectorName);\r\n const selectedValues = get(formValues, valueSelectorName);\r\n\r\n if (!selectedGroup) {\r\n return;\r\n }\r\n\r\n let newSelectedOptions: ComplexValue<number>[] = customState.selectedOptions;\r\n let newSelectedValues = customState.selectedValues;\r\n\r\n if (this.props.groupingType === GroupingType.Single) {\r\n\r\n if (!selectedValues || selectedValues.length === 0) {\r\n return;\r\n }\r\n\r\n newSelectedOptions = addToArrayIfNotAlreadyThere(newSelectedOptions, selectedGroup);\r\n newSelectedValues = useLabelOption\r\n ? addSelectedValues(customState.selectedValues, selectedGroup.value, selectedValues)\r\n : customState.selectedValues;\r\n\r\n } else {\r\n\r\n newSelectedOptions = selectedGroup.reduce(addToArrayIfNotAlreadyThere, newSelectedOptions);\r\n }\r\n\r\n clearValueInStore(useLabelOption ? valueSelectorName : groupSelectorName);\r\n\r\n changeCustomState({\r\n ...customState,\r\n selectedOptions: newSelectedOptions,\r\n selectedValues: newSelectedValues\r\n });\r\n }\r\n\r\n private clearValidation = (groupValue: number) => {\r\n this.props.clearValidation(this.props.formName, {\r\n [sfParameters.application]: groupValue\r\n });\r\n }\r\n\r\n public render() {\r\n\r\n const { validation = {}, translation, formName, groupingName, valueName,\r\n useLabelOption, readOnly, singleStepAccess,\r\n addButtonText, addSubButtonText, valuesOptionsEndpoint, options, loadOptions } = this.props;\r\n\r\n const { selectedOptions = [], selectedValues = {}, initialValues = {} } = this.props.customState || {};\r\n\r\n const accessCards = <>\r\n <div className=\"row\">\r\n {selectedOptions.map(group => <OptionCard\r\n key={`${formName}-${group.value}`}\r\n groupId={group.value}\r\n label={group.description}\r\n valueItems={selectedValues[group.value]}\r\n initialValueItems={initialValues[group.value]}\r\n options={options}\r\n loadOptions={loadOptions}\r\n formName={formName}\r\n groupingName={groupingName}\r\n valueName={valueName}\r\n useLabelOption={useLabelOption}\r\n readOnly={readOnly}\r\n validation={validation}\r\n translation={translation}\r\n valuesOptionsEndpoint={valuesOptionsEndpoint}\r\n addGroup={this.addGroup}\r\n removeGroup={this.removeGroup}\r\n onChange={this.onChange} >\r\n {!singleStepAccess && !readOnly && <div className={styles.optionPanel}>\r\n <OptionPanel\r\n {...this.props}\r\n group={group}\r\n useStaticOptions={useLabelOption}\r\n addGroup={this.addGroup}\r\n addButtonText={addSubButtonText}\r\n />\r\n </div>}\r\n </OptionCard>)}\r\n </div>\r\n </>;\r\n\r\n return <>\r\n {!readOnly && <OptionPanel\r\n {...this.props}\r\n useStaticOptions={useLabelOption}\r\n addGroup={this.addGroup}\r\n addButtonText={addButtonText}\r\n />}\r\n {selectedOptions.length || validation[formName]\r\n ? accessCards\r\n : readOnly && <p className=\"no-content\">{translation.no_access_has_been_granted}</p>}\r\n </>;\r\n }\r\n}\r\n\r\nexport const OptionsPanel = withRoleBasedAccess<OptionsPanelExternalProps, OptionsPanelState>(OptionsPanelComponent);\r\n","import * as React from 'react';\r\nimport { OptionsPanel } from './options-panel/options-panel';\r\nimport { PanelsProps, GroupingType } from './types';\r\nimport { sfNames, sfParameters } from './sf-names';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport const AccessToScreen = (props: PanelsProps) => {\r\n const { translation, readOnly, data, formComponent, formValues, endpoints, validation, clearValueInStore,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData, clearValidation,\r\n options, loadOptions } = props;\r\n\r\n return <AdminPaperTopPanel title={translation.access_to_screen}>\r\n <OptionsPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n initialValue={data && data.accessToScreen}\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.accessToScreen}\r\n accessData={accessData && accessData.accessToScreen}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n formName={sfNames.accessToScreen}\r\n groupingName={sfParameters.application}\r\n groupingType={GroupingType.Multiple}\r\n valueName={sfParameters.domainNode}\r\n validation={validation}\r\n groupingOptionsEndpoint={endpoints.accesstoscreen.caseType}\r\n valuesOptionsEndpoint={endpoints.accesstoscreen.screen}\r\n groupingLabel={translation.case_type}\r\n valueLabel={translation.screen}\r\n addButtonText={translation.add_case_type_button_text}\r\n clearValueInStore={clearValueInStore}\r\n clearValidation={clearValidation}\r\n useLabelOption={readOnly}\r\n singleStepAccess={true}\r\n options={options}\r\n loadOptions={loadOptions}\r\n />\r\n </AdminPaperTopPanel>;\r\n};\r\n","import * as React from 'react';\r\nimport { OptionsPanel } from './options-panel/options-panel';\r\nimport { PanelsProps } from './types';\r\nimport { sfNames, sfParameters } from './sf-names';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport const ExtendedAccess = (props: PanelsProps) => {\r\n const { translation, readOnly, data, formComponent, formValues, endpoints, validation, clearValueInStore, clearValidation,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData,\r\n options, loadOptions } = props;\r\n\r\n return <AdminPaperTopPanel title={translation.extended_access}>\r\n <OptionsPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n initialValue={data && data.extendedAccess}\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.extendedAccess}\r\n accessData={accessData && accessData.extendedAccess}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n formName={sfNames.extendedAccess}\r\n groupingName={sfParameters.application}\r\n valueName={sfParameters.unit}\r\n validation={validation}\r\n groupingOptionsEndpoint={endpoints.extendedAccess.caseType}\r\n valuesOptionsEndpoint={endpoints.extendedAccess.unit}\r\n groupingLabel={translation.case_type}\r\n valueLabel={translation.unit}\r\n addButtonText={translation.add_case_type_button_text}\r\n addSubButtonText={translation.add_units_button_text}\r\n clearValueInStore={clearValueInStore}\r\n clearValidation={clearValidation}\r\n useLabelOption={true}\r\n options={options}\r\n loadOptions={loadOptions}\r\n />\r\n </AdminPaperTopPanel>;\r\n};\r\n","import * as React from 'react';\r\nimport { OptionsPanel } from './options-panel/options-panel';\r\nimport { PanelsProps, GroupingType } from './types';\r\nimport { sfNames, sfParameters } from './sf-names';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport const Operation = (props: PanelsProps) => {\r\n const { translation, readOnly, data, formComponent, formValues, endpoints, validation, clearValueInStore,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData, clearValidation,\r\n options, loadOptions } = props;\r\n\r\n return <AdminPaperTopPanel title={translation.operation}>\r\n <OptionsPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n initialValue={data && data.accessOperations}\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.accessOperations}\r\n accessData={accessData && accessData.accessOperations}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n formName={sfNames.accessOperations}\r\n groupingName={sfParameters.application}\r\n groupingType={GroupingType.Multiple}\r\n valueName={sfParameters.operation}\r\n validation={validation}\r\n groupingOptionsEndpoint={endpoints.applications}\r\n valuesOptionsEndpoint={endpoints.operations}\r\n groupingLabel={translation.application_or_case}\r\n addButtonText={translation.add_application_or_case_type_button_text}\r\n clearValueInStore={clearValueInStore}\r\n clearValidation={clearValidation}\r\n useLabelOption={readOnly}\r\n singleStepAccess={true}\r\n options={options}\r\n loadOptions={loadOptions}\r\n />\r\n </AdminPaperTopPanel>;\r\n};\r\n","import * as React from 'react';\r\nimport { OptionsPanel } from './options-panel/options-panel';\r\nimport { PanelsProps } from './types';\r\nimport { sfNames, sfParameters } from './sf-names';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport const Notifications = (props: PanelsProps) => {\r\n const { translation, readOnly, data, formComponent, formValues, endpoints, validation, clearValueInStore,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData, clearValidation,\r\n options, loadOptions } = props;\r\n\r\n return <AdminPaperTopPanel title={translation.responsible_for_unit}>\r\n <OptionsPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n initialValue={data && data.responsibleForUnits}\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.responsibleForUnits}\r\n accessData={accessData && accessData.responsibleForUnits}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n formName={sfNames.responsibleForUnits}\r\n groupingName={sfParameters.application}\r\n valueName={sfParameters.unit}\r\n validation={validation}\r\n groupingOptionsEndpoint={endpoints.responsibleForUnit.caseType}\r\n valuesOptionsEndpoint={endpoints.responsibleForUnit.unit}\r\n groupingLabel={translation.case_type}\r\n valueLabel={translation.unit}\r\n clearValueInStore={clearValueInStore}\r\n clearValidation={clearValidation}\r\n useLabelOption={true}\r\n addButtonText={translation.add_case_type_button_text}\r\n addSubButtonText={translation.add_units_button_text}\r\n options={options}\r\n loadOptions={loadOptions}\r\n />\r\n </AdminPaperTopPanel>;\r\n};\r\n","import * as React from 'react';\r\nimport { OptionsPanel } from './options-panel/options-panel';\r\nimport { PanelsProps } from './types';\r\nimport { sfNames, sfParameters } from './sf-names';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport const RestrictedAccess = (props: PanelsProps) => {\r\n const { translation, readOnly, data, formComponent, formValues, endpoints, validation, clearValueInStore, clearValidation,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData,\r\n options, loadOptions } = props;\r\n\r\n return <AdminPaperTopPanel title={translation.restricted_access}>\r\n <OptionsPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n initialValue={data && data.restrictedAccess}\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.restrictedAccess}\r\n accessData={accessData && accessData.restrictedAccess}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n formName={sfNames.restrictedAccess}\r\n groupingName={sfParameters.application}\r\n valueName={sfParameters.unit}\r\n validation={validation}\r\n groupingOptionsEndpoint={endpoints.restrictedAccess.caseType}\r\n valuesOptionsEndpoint={endpoints.restrictedAccess.unit}\r\n groupingLabel={translation.case_type}\r\n valueLabel={translation.unit}\r\n addButtonText={translation.add_case_type_button_text}\r\n addSubButtonText={translation.add_units_button_text}\r\n clearValueInStore={clearValueInStore}\r\n clearValidation={clearValidation}\r\n useLabelOption={true}\r\n options={options}\r\n loadOptions={loadOptions}\r\n />\r\n </AdminPaperTopPanel>;\r\n};\r\n","export const ExtraInfoSelectorId = 'extraInfoSelector_id';\r\nexport const ExtraInfoFieldName = (id: number) => `extraInfoField_${id}`;\r\n","import { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { ApiToUse } from 'app/infrastructure/simple-form/types';\r\nimport { ExtraInfoValueType, ExtraInfoValue } from './types';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { ExtraInfoWireFormat, ExtraInfoType } from 'app/components/access-panel/shared/types';\r\n\r\ninterface ExtraInfoConfiguration {\r\n toDataMapping: (wireData: ExtraInfoWireFormat) => ExtraInfoValueType;\r\n toWireMapping: (value: ExtraInfoValueType | Date) => Partial<ExtraInfoWireFormat>;\r\n formConfiguration: (data: ExtraInfoValue) => {\r\n type: FIELD_TYPE;\r\n initialValue: any;\r\n maxDecimals?: number;\r\n };\r\n}\r\n\r\nexport const extraInfoConfig: { [key: string]: ExtraInfoConfiguration } = {\r\n [ExtraInfoType.text]: {\r\n toDataMapping: (wireData: ExtraInfoWireFormat) => wireData.valueString,\r\n toWireMapping: (value: string): Partial<ExtraInfoWireFormat> => (value ? { valueString: value } : undefined),\r\n formConfiguration: (data: ExtraInfoValue) => ({\r\n type: FIELD_TYPE.TEXTAREA,\r\n initialValue: data.value,\r\n maxLength: 2000\r\n })\r\n },\r\n [ExtraInfoType.date]: {\r\n toDataMapping: (wireData: ExtraInfoWireFormat) => wireData.valueDate,\r\n toWireMapping: (value: Date | string): Partial<ExtraInfoWireFormat> => value\r\n ? (value instanceof Date\r\n ? { valueDate: value.toISOString().replace(/\\.\\d+Z/, '') }\r\n : { valueDate: value })\r\n : undefined,\r\n formConfiguration: (data: ExtraInfoValue) => ({\r\n type: FIELD_TYPE.DATE_TIME,\r\n initialValue: data.value instanceof Date\r\n ? data.value\r\n : parseAsDateUTC(data.value as string)\r\n })\r\n },\r\n [ExtraInfoType.integer]: {\r\n toDataMapping: (wireData: ExtraInfoWireFormat) => wireData.valueInteger,\r\n toWireMapping: (value: number): Partial<ExtraInfoWireFormat> => (value ? { valueInteger: value } : undefined),\r\n formConfiguration: (data: ExtraInfoValue) => ({\r\n type: FIELD_TYPE.DECIMAL_NUMBER,\r\n initialValue: data.value,\r\n maxDecimals: 0,\r\n minValue: -2147483648,\r\n maxValue: 2147483647\r\n })\r\n },\r\n [ExtraInfoType.float]: {\r\n toDataMapping: (wireData: ExtraInfoWireFormat) => wireData.valueFloat,\r\n toWireMapping: (value: number): Partial<ExtraInfoWireFormat> => (value ? { valueFloat: value } : undefined),\r\n formConfiguration: (data: ExtraInfoValue) => ({\r\n type: FIELD_TYPE.DECIMAL_NUMBER,\r\n initialValue: data.value,\r\n maxDecimals: 4\r\n })\r\n },\r\n [ExtraInfoType.code]: {\r\n toDataMapping: (wireData: ExtraInfoWireFormat) => (wireData.valueCode\r\n ? {\r\n value: wireData.valueCode.v,\r\n description: wireData.valueCode.d\r\n }\r\n : undefined),\r\n toWireMapping: (value: ComplexValue<number>): Partial<ExtraInfoWireFormat> =>\r\n (value && value.value ? { valueCode: { v: value ? value.value : 0 } } : undefined),\r\n formConfiguration: (data: ExtraInfoValue) => ({\r\n type: FIELD_TYPE.SELECT_SINGLE_HIERARCHY,\r\n initialValue: data.value,\r\n apiToUse: ApiToUse.ADMINAPI,\r\n descriptionAllLevels: true,\r\n searchRequired: data.searchRequired,\r\n categoryId: data.categoryId\r\n })\r\n },\r\n [ExtraInfoType.unknown]: {\r\n toDataMapping: () => undefined,\r\n toWireMapping: () => ({}),\r\n formConfiguration: (data: ExtraInfoValue) => undefined\r\n }\r\n};\r\n\r\nexport const getConfiguration = (dataType: ExtraInfoType) => extraInfoConfig[dataType] || extraInfoConfig[ExtraInfoType.unknown];\r\n","import * as React from 'react';\r\nimport { Validation, ValidationLevel } from 'ui';\r\nimport { ExtraInfoFieldName } from './constants';\r\nimport { ExtraInfoItemProps } from './types';\r\nimport { getConfiguration } from './configuration';\r\n\r\nexport class ExtraInfoItem extends React.PureComponent<ExtraInfoItemProps> {\r\n\r\n public render() {\r\n const { formComponent: SimpleForm, readOnly, data, translation, validation, codeOptionsEndpoint } = this.props;\r\n const formConfig = getConfiguration(data.datatype).formConfiguration(data);\r\n\r\n const validationMessages = validation.additionalInformation && validation.additionalInformation.messages\r\n && validation.additionalInformation.messages\r\n .filter(m => m.parameters && m.parameters.extraInfo === data.value);\r\n\r\n const hasErrors = !!validationMessages && validationMessages.length > 0;\r\n\r\n return <div className={`col-lg-4 col-sm-12 ${hasErrors ? 'has-danger' : ''}`}>\r\n <SimpleForm\r\n {...formConfig}\r\n name={ExtraInfoFieldName(data.id)}\r\n label={{ text: data.fieldDesc }}\r\n readOnly={readOnly}\r\n translation={translation}\r\n errorMessage={translation.must_be_withing_range}\r\n optionsEndpoint={codeOptionsEndpoint(data.fieldId)}\r\n />\r\n <Validation level={ValidationLevel.error} messages={validationMessages} />\r\n </div>;\r\n }\r\n}\r\n","import { ExtraInfoValue } from './types';\r\nimport { getConfiguration } from './configuration';\r\nimport { ExtraInfoWireFormat, ExtraInfoCodeValues } from 'app/components/access-panel/shared/types';\r\n\r\nlet extraInfoId = 1;\r\n\r\nexport const fromWireFormat = (wireData: ExtraInfoWireFormat, extraInfoValues: ExtraInfoCodeValues[]): ExtraInfoValue => {\r\n\r\n const extraInfoValue = extraInfoValues.find(value => value.id === wireData.extraInfo.v);\r\n\r\n if (!extraInfoValue) {\r\n return undefined;\r\n }\r\n \r\n return {\r\n id: extraInfoId++,\r\n fieldId: wireData.extraInfo.v,\r\n fieldDesc: wireData.extraInfo.d,\r\n datatype: extraInfoValue.extraInfoDataType,\r\n searchRequired: extraInfoValue.searchRequired,\r\n categoryId: extraInfoValue.category,\r\n value: getConfiguration(extraInfoValue.extraInfoDataType).toDataMapping(wireData)\r\n };\r\n};\r\n","import { ExtraInfoCodeValues, ExtraInfoWireFormat } from 'app/components/access-panel/shared/types';\r\n\r\nexport const createExtraInfoValues =\r\n (extraInfoCodesValues: ExtraInfoCodeValues[], initialValue: ExtraInfoWireFormat[]): ExtraInfoWireFormat[] => {\r\n return extraInfoCodesValues\r\n .map(value => {\r\n return {\r\n ...{\r\n extraInfo: { v: value.id, d: value.description }\r\n },\r\n ...initialValue.find(item => item.extraInfo.v === value.id)\r\n };\r\n });\r\n };\r\n","import * as React from 'react';\r\nimport { ExtraInfoPanelProps, ExtraInfoPanelState } from './types';\r\nimport { ExtraInfoFieldName } from './constants';\r\nimport { ExtraInfoItem } from './extra-info-item';\r\nimport { fromWireFormat } from './map-extra-info';\r\nimport { extraInfoConfig } from './configuration';\r\nimport { RoleBasedAccessCustomStateProps, withRoleBasedAccess } from '../role-based-access';\r\nimport { createExtraInfoValues } from 'app/components/access-panel/extra-info/create-extra-info-values';\r\nimport { hasExtraInfoValues } from 'app/components/access-panel/extra-info/selectors';\r\n\r\ntype ExtraInfoPanelComponentProps = ExtraInfoPanelProps & RoleBasedAccessCustomStateProps<ExtraInfoPanelState>;\r\n\r\nclass ExtraInfoPanelComponent extends React.PureComponent<ExtraInfoPanelComponentProps> {\r\n\r\n public componentDidMount() {\r\n this.buildInitalState();\r\n }\r\n\r\n public componentDidUpdate(prevProps: ExtraInfoPanelComponentProps) {\r\n this.buildInitalState();\r\n\r\n const { customState, formValues, changeCustomState } = this.props;\r\n if (!customState || formValues === prevProps.formValues) {\r\n return;\r\n }\r\n\r\n const extraInfo = customState.extraInfo.map(info => {\r\n\r\n const formValue = formValues[ExtraInfoFieldName(info.id)];\r\n const prevFormValue = prevProps.formValues[ExtraInfoFieldName(info.id)];\r\n return formValue === prevFormValue\r\n ? info\r\n : {\r\n ...info,\r\n value: formValue\r\n };\r\n });\r\n\r\n changeCustomState({ extraInfo });\r\n }\r\n\r\n private buildInitalState = () => {\r\n\r\n const { customState, changeCustomState, initialValue, extraInfoCodes } = this.props;\r\n\r\n // Check if state does not exist and there is initial value\r\n if (customState || !initialValue || !extraInfoCodes) {\r\n return;\r\n }\r\n\r\n const state = {\r\n extraInfo: createExtraInfoValues(extraInfoCodes.values, initialValue)\r\n .map(item => fromWireFormat(item, extraInfoCodes.values))\r\n .filter(item => item)\r\n };\r\n\r\n changeCustomState(state);\r\n }\r\n\r\n public render() {\r\n const { customState: { extraInfo = [] } = {}, formComponent: SimpleForm, translation, validation, readOnly,\r\n codeOptionsEndpoint } = this.props;\r\n\r\n const hasValues = this.props.extraInfoCodes.values.length > 0 || hasExtraInfoValues(extraInfo);\r\n\r\n return <>\r\n {hasValues\r\n ? <div className=\"row expanders-in-equal-cols\">\r\n {extraInfo\r\n .filter(i => extraInfoConfig[i.datatype])\r\n .map(value => <ExtraInfoItem\r\n key={value.id}\r\n data={value}\r\n readOnly={readOnly}\r\n formComponent={SimpleForm}\r\n translation={translation}\r\n validation={validation}\r\n codeOptionsEndpoint={codeOptionsEndpoint} />)}\r\n </div>\r\n : !!readOnly && <p className=\"no-content\">{translation.no_additional_info_has_been_added}</p>}\r\n </>;\r\n }\r\n}\r\n\r\nexport const ExtraInfoPanel = withRoleBasedAccess<ExtraInfoPanelProps, ExtraInfoPanelState>(ExtraInfoPanelComponent);\r\n","import { ExtraInfoValue } from './types';\r\nimport { extraInfoConfig } from './configuration';\r\nimport { ExtraInfoCodes } from 'app/components/access-panel/shared/types';\r\n\r\nexport const hasExtraInfoCodes = (extraInfoCodes: ExtraInfoCodes) =>\r\n !!extraInfoCodes && !extraInfoCodes.fetching && extraInfoCodes.values && extraInfoCodes.values.length > 0;\r\n\r\nexport const hasExtraInfoValues = (extraInfo: ExtraInfoValue[]) =>\r\n !!extraInfo && extraInfo.length > 0 && extraInfo.filter(i => extraInfoConfig[i.datatype]).length > 0;\r\n","import * as React from 'react';\r\nimport { PanelsProps } from 'app/components/access-panel/types';\r\nimport { ExtraInfoPanel } from './extra-info-panel';\r\nimport { hasExtraInfoCodes } from './selectors';\r\nimport { sfNames } from 'app/components/access-panel/sf-names';\r\nimport style from 'app/area/administration/edit/edit.scss';\r\nimport { AdminPaperSubPanel } from 'app/area/administration/edit/components';\r\n\r\nexport interface ExtraInfoProps extends PanelsProps {\r\n extraInfoCodes: any;\r\n}\r\n\r\nexport const ExtraInfo = (props: ExtraInfoProps) => {\r\n\r\n const { readOnly, data, clearValueInStore, formValues, formComponent, translation, validation, extraInfoCodes,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData, clearValidation, endpoints } = props;\r\n\r\n if (!hasExtraInfoCodes(extraInfoCodes)) {\r\n return null;\r\n }\r\n\r\n return <AdminPaperSubPanel title={translation.additional_information}>\r\n <div className={style.section}>\r\n <ExtraInfoPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.additionalInformation}\r\n accessData={accessData && accessData.additionalInformation}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n\r\n formName={sfNames.additionalInformation}\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n\r\n initialValue={data ? data.additionalInformation : []}\r\n extraInfoCodes={extraInfoCodes}\r\n validation={validation}\r\n clearValueInStore={clearValueInStore}\r\n clearValidation={clearValidation}\r\n\r\n valueOptionsEndpoint={endpoints.extraInfo}\r\n codeOptionsEndpoint={endpoints.extraInfoOptions} />\r\n </div>\r\n </AdminPaperSubPanel>;\r\n};\r\n","import { getConfiguration } from './configuration';\r\nimport { AccessItem, AccessMode } from 'app/components/access-panel/shared/types';\r\n\r\nexport const serializeExtraInfo = (item: AccessItem) => {\r\n\r\n if (!item || item.mode === AccessMode.role || !item.customData || !item.customData.extraInfo) {\r\n return [];\r\n }\r\n\r\n const values = item.customData.extraInfo;\r\n\r\n return values\r\n .map(v => {\r\n const value = (getConfiguration(v.datatype).toWireMapping(v.value));\r\n return (value && ({\r\n extraInfo: { v: v.fieldId },\r\n ...value\r\n }));\r\n })\r\n .filter(v => v !== undefined);\r\n};\r\n","import get from 'lodash/get';\r\nimport { ComplexValue } from 'ui';\r\nimport { Value } from 'app/types-shared';\r\nimport { ValidationMessage, ValidationProps } from 'ui/common/validation/types';\r\nimport { DefaultValueReturnType } from 'app/components/access-panel/shared/types';\r\n\r\nexport const simpleFormNames = {\r\n optionsCollections: 'defaultValue_optionsCollections',\r\n caseTypes: 'defaultValue_caseTypes',\r\n values: 'defaultValue_values',\r\n valuesFields: 'defaultValue_valuesFields'\r\n};\r\n\r\nexport interface ValidType<T> {\r\n valid: boolean;\r\n data: T;\r\n}\r\n\r\nexport type CodeValue = ComplexValue<number>;\r\nexport interface DefaultValue {\r\n optionsColection: CodeValue;\r\n caseType: CodeValue;\r\n defaultValue: CodeValue;\r\n defaultValueFields: CodeValue[];\r\n}\r\n\r\nexport const copyCodeValue = (codeValue: CodeValue): CodeValue => {\r\n if (!codeValue) {\r\n return undefined;\r\n }\r\n return {\r\n value: codeValue.value,\r\n description: codeValue.description\r\n };\r\n};\r\n\r\nexport const readSelectionParams = (formValues: any): ValidType<DefaultValue> => {\r\n const optionsColection = get(formValues, `${simpleFormNames.optionsCollections}`);\r\n const caseType = get(formValues, `${simpleFormNames.caseTypes}`);\r\n const defaultValue = get(formValues, `${simpleFormNames.values}`);\r\n let defaultValueFields = [];\r\n const defaultValueFieldsValue = get(formValues, `${simpleFormNames.valuesFields}`);\r\n if (Array.isArray(defaultValueFieldsValue)) {\r\n defaultValueFields = defaultValueFieldsValue;\r\n }\r\n return {\r\n valid: !!optionsColection && !!caseType && !!defaultValue && !!defaultValueFields && !!defaultValueFields.length,\r\n data: {\r\n optionsColection: copyCodeValue(optionsColection),\r\n caseType: copyCodeValue(caseType),\r\n defaultValue: copyCodeValue(defaultValue),\r\n defaultValueFields: defaultValueFields.map(dv => copyCodeValue(dv))\r\n }\r\n };\r\n};\r\n\r\nexport const selectDefaultValue = (defaultValueGroup: DefaultValue[], defaultValue: DefaultValue) => {\r\n return defaultValueGroup.find(value =>\r\n value.optionsColection.value === defaultValue.optionsColection.value &&\r\n value.caseType.value === defaultValue.caseType.value &&\r\n value.defaultValue.value === defaultValue.defaultValue.value);\r\n};\r\n\r\nconst getAllFieldsForCaseType = (defaultValueGroup: DefaultValue[], caseType: ComplexValue<number>) => {\r\n\r\n return defaultValueGroup\r\n .filter(defaultValue => defaultValue.caseType.value === caseType.value)\r\n .reduce((result, current) => [\r\n ...result,\r\n ...current.defaultValueFields],\r\n [] as ComplexValue<number>[]);\r\n};\r\n\r\nexport const getDuplicatedFields = (defaultValueGroup: DefaultValue[], defaultValue: DefaultValue) => {\r\n const existingFields = getAllFieldsForCaseType(defaultValueGroup, defaultValue.caseType);\r\n\r\n return defaultValue.defaultValueFields.filter(field =>\r\n existingFields.some(exisitingField => exisitingField.value === field.value)\r\n );\r\n};\r\n\r\nexport const getUniqueFields = (defaultValueGroup: DefaultValue[], defaultValue: DefaultValue) => {\r\n const existingFields = getAllFieldsForCaseType(defaultValueGroup, defaultValue.caseType);\r\n\r\n return defaultValue.defaultValueFields.filter(field =>\r\n existingFields.every(existingField => existingField.value !== field.value)\r\n );\r\n};\r\n\r\nexport const updateDefaultValue = (\r\n defaultValueGroup: DefaultValue[],\r\n defaultValue: DefaultValue,\r\n fields: ComplexValue<number>[]\r\n) => {\r\n\r\n const exisitingDefaultValue = selectDefaultValue(defaultValueGroup, defaultValue);\r\n\r\n if (!fields || fields.length === 0) {\r\n return defaultValueGroup.filter(v => v !== exisitingDefaultValue);\r\n }\r\n\r\n const newDefaultValue = {\r\n optionsColection: defaultValue.optionsColection,\r\n caseType: defaultValue.caseType,\r\n defaultValue: defaultValue.defaultValue,\r\n defaultValueFields: fields\r\n };\r\n\r\n return exisitingDefaultValue\r\n ? defaultValueGroup.map(v => v === exisitingDefaultValue\r\n ? newDefaultValue\r\n : v)\r\n : [\r\n ...defaultValueGroup,\r\n newDefaultValue\r\n ];\r\n};\r\n\r\nconst mapValueToComplexType = (valueCode: Value): CodeValue => {\r\n return {\r\n value: valueCode.v,\r\n description: valueCode.d\r\n };\r\n};\r\n\r\nexport const mapToStore = (defaultValuesReturnTypes: DefaultValueReturnType[] = []): DefaultValue[] => {\r\n return defaultValuesReturnTypes.reduce((prev: DefaultValue[], curr: DefaultValueReturnType) => {\r\n const found = prev.findIndex(f =>\r\n f.optionsColection.value === curr.codeTable.v\r\n && f.caseType.value === curr.caseType.v\r\n && f.defaultValue.value === curr.defaultValue.v);\r\n if (found > -1) {\r\n const el = prev[found];\r\n prev[found] = {\r\n ...el,\r\n defaultValueFields: [...el.defaultValueFields, { value: curr.field.v, description: curr.field.d }]\r\n };\r\n return prev;\r\n }\r\n return [\r\n ...prev,\r\n {\r\n optionsColection: mapValueToComplexType(curr.codeTable),\r\n caseType: mapValueToComplexType(curr.caseType),\r\n defaultValue: mapValueToComplexType(curr.defaultValue),\r\n defaultValueFields: [mapValueToComplexType(curr.field)]\r\n }\r\n ];\r\n }, []);\r\n};\r\n\r\nexport const createServerValidation =\r\n (defaultValueFields: CodeValue[], caseType: CodeValue, validation: { [key: string]: ValidationProps }): ValidationMessage[] => {\r\n const validationErrors: ValidationMessage[] = validation && Object.keys(validation)\r\n .map(propertyName => {\r\n const error = validation[propertyName];\r\n return error && error.messages;\r\n })\r\n .filter(f => !!f)\r\n .reduce((memo, valueKeys) => [...memo, ...valueKeys], []);\r\n\r\n const caseTypeValue = caseType && caseType.value;\r\n\r\n return defaultValueFields.map(defaultValueField => {\r\n const fieldValue = defaultValueField && defaultValueField.value;\r\n return validationErrors.find((error) =>\r\n error.parameters && error.parameters.field === fieldValue && error.parameters.field === fieldValue &&\r\n error.parameters.caseType === caseTypeValue);\r\n }).filter(f => !!f);\r\n };\r\n\r\nexport const getCurrentFieldId = (defaultValueFieldIds: number[], valueIds: number[]): number => {\r\n return defaultValueFieldIds\r\n .concat(valueIds)\r\n .find((val) =>\r\n !((defaultValueFieldIds as any).includes(val) && (valueIds as any).includes(val))\r\n );\r\n};\r\n\r\nexport const checkFormValues = (formNames: string[], formValues: { [key: string]: any }) => {\r\n return (formNames && formValues)\r\n ? formNames\r\n .filter(item => (formValues[item] || []).length === 0)\r\n .length > 0\r\n : false;\r\n};\r\n","import * as React from 'react';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport FaInfo from 'react-icons/lib/fa/info';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { AddButton } from 'ui/common/button/add-button';\r\nimport { PanelDefaultValuesComponentProps } from './types';\r\nimport { readSelectionParams, simpleFormNames, checkFormValues } from './panel-default-values-utils';\r\n\r\nimport styles from './add-default-values.scss';\r\n\r\nexport interface AddDefaultValueProps extends PanelDefaultValuesComponentProps {\r\n onSubmit: () => void;\r\n}\r\n\r\nexport interface AddDefaultValueState {\r\n showModal: boolean;\r\n}\r\n\r\nexport class AddDefaultValue extends React.Component<AddDefaultValueProps, AddDefaultValueState> {\r\n public state: Readonly<AddDefaultValueState> = { showModal: false };\r\n\r\n private showAddDefaultValueModal = () => this.setState({ showModal: true });\r\n private hideAddDefaultValueModal = () => this.setState({ showModal: false });\r\n\r\n private onDone = () => {\r\n this.props.onSubmit();\r\n this.hideAddDefaultValueModal();\r\n }\r\n\r\n private isDisabled = () => {\r\n return checkFormValues([\r\n simpleFormNames.optionsCollections,\r\n simpleFormNames.caseTypes,\r\n simpleFormNames.values,\r\n simpleFormNames.valuesFields\r\n ], this.props.formValues) || (this.props.isUserTypeRequired && !this.props.userType);\r\n }\r\n\r\n // tslint:disable-next-line:max-func-body-length\r\n public render(): JSX.Element {\r\n const { apiToUse, endpoints, translation, userType, isUserTypeRequired, formValues, onSubmit } = this.props;\r\n const {\r\n defaultValues: {\r\n optionsCollections,\r\n caseTypes,\r\n values,\r\n valuesFields\r\n }\r\n } = endpoints;\r\n\r\n const SimpleForm = this.props.formComponent;\r\n\r\n const selectionParams = readSelectionParams(this.props.formValues);\r\n const {\r\n data: {\r\n optionsColection,\r\n caseType\r\n }\r\n } = selectionParams;\r\n\r\n const optionsCollectionsValue = formValues && formValues[simpleFormNames.optionsCollections];\r\n const optionsCollectionSearchRequired = optionsCollectionsValue && optionsCollectionsValue.extra\r\n && optionsCollectionsValue.extra.SearchRequired;\r\n\r\n return <>\r\n <div className={styles.addButton}>\r\n <AddButton icon={mdPlus} onClick={this.showAddDefaultValueModal} required={false}>\r\n {translation.default_value_add_new}\r\n </AddButton>\r\n </div>\r\n\r\n {this.state.showModal && <ModalWrapper\r\n headerTitle={translation.default_value_add_new}\r\n btnTitle={translation.add}\r\n btnActionTitle={translation.default_value_add_another}\r\n btnCancelTitle={translation.cancel}\r\n onClose={this.hideAddDefaultValueModal}\r\n onDone={this.onDone}\r\n onAction={onSubmit}\r\n closeOnDone={false}\r\n largeSize={false}\r\n isDisabled={this.isDisabled}\r\n canCloseOnBackground={false}>\r\n {(isUserTypeRequired && !userType) && <div className=\"col-lg-12\">\r\n <div className={styles.disclaimerPanel}>\r\n <FaInfo /> {translation.add_default_value_disclaimer}\r\n </div>\r\n </div>}\r\n <div className=\"col-lg-12\">\r\n <SimpleForm\r\n name={simpleFormNames.optionsCollections}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={optionsCollections}\r\n placeholder={translation.search}\r\n apiToUse={apiToUse}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: translation.code_table, required: true }}\r\n initialValue={null} />\r\n </div>\r\n <div className=\"col-lg-12\">\r\n <SimpleForm\r\n name={simpleFormNames.caseTypes}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={caseTypes}\r\n placeholder={translation.search}\r\n apiToUse={apiToUse}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n initiallyShowLongDescription={false}\r\n label={{ text: translation.case_type, required: true }}\r\n initialValue={null} />\r\n </div>\r\n {optionsColection && caseType && <div className=\"col-lg-12\">\r\n <SimpleForm\r\n name={simpleFormNames.values}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={values(optionsColection && optionsColection.value)}\r\n optionsParams={{ caseTypeId: caseType && caseType.value }}\r\n placeholder={translation.search}\r\n apiToUse={apiToUse}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: translation.default_value, required: true }}\r\n initialValue={null}\r\n searchRequired={optionsCollectionSearchRequired}\r\n />\r\n </div>}\r\n {!this.props.isValueFieldsReadOnly(optionsColection, caseType, userType)\r\n && <div className=\"col-lg-12\">\r\n <SimpleForm\r\n name={simpleFormNames.valuesFields}\r\n type={FIELD_TYPE.SELECT_MULTIPLE}\r\n optionsEndpoint={valuesFields(optionsColection && optionsColection.value)}\r\n optionsParams={{\r\n caseTypeId: caseType && caseType.value,\r\n userTypeContext: userType\r\n }}\r\n placeholder={translation.search}\r\n apiToUse={apiToUse}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: translation.field, required: true }}\r\n initialValue={null} />\r\n </div>}\r\n </ModalWrapper>}\r\n </>;\r\n }\r\n}\r\n","// tslint:disable max-line-length\r\nimport * as React from 'react';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport { HotKeys } from 'react-hotkeys';\r\n\r\nimport { DefaultValue, createServerValidation, simpleFormNames } from './panel-default-values-utils';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/field-types';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { ButtonPrimary, AccessCard, ValidationLevel } from 'ui';\r\nimport { AddButton } from 'ui/common/button/add-button';\r\n\r\nimport { DialogExpander } from 'ui/common/dialog-expander/dialog-expander';\r\nimport { OnClickOutside } from 'ui/common/on-click-outside';\r\nimport { keyCodeTypes } from 'ui/common/key-code-types';\r\nimport { PanelDefaultValuesProps } from 'app/components/access-panel/default-values/types';\r\nimport { mapInvalidOptions } from '../shared';\r\n\r\nimport styles from './card-value.scss';\r\n\r\nexport interface CardValueProps extends PanelDefaultValuesProps {\r\n defaultValue: DefaultValue;\r\n onChange: (value: ComplexValue<number>[], defaultValue: DefaultValue) => void;\r\n removeGroup: (defaultValue: DefaultValue) => void;\r\n handleClickAddButton: () => void;\r\n}\r\n\r\nexport interface CardValueState {\r\n showSelectDialog: boolean;\r\n}\r\n\r\nexport class CardValue extends React.PureComponent<CardValueProps, CardValueState> {\r\n private keyMap: any;\r\n private handlers: any;\r\n\r\n constructor(props: CardValueProps) {\r\n super(props);\r\n this.state = { showSelectDialog: false };\r\n this.keyMap = {\r\n onEnter: [keyCodeTypes.Enter]\r\n };\r\n\r\n this.handlers = {\r\n onEnter: () => this.onSubmit()\r\n };\r\n }\r\n\r\n private removeGroup = () => {\r\n this.props.removeGroup(this.props.defaultValue);\r\n }\r\n\r\n private onChange = (values: ComplexValue<number>[]) => {\r\n this.props.onChange(values, this.props.defaultValue);\r\n }\r\n\r\n private closeSelectDialog = () => {\r\n this.setState({ showSelectDialog: false });\r\n }\r\n\r\n private openSelectDialog = () => {\r\n this.setState({ showSelectDialog: true });\r\n }\r\n\r\n private onSubmit = () => {\r\n this.props.handleClickAddButton();\r\n this.closeSelectDialog();\r\n };\r\n\r\n private addSelectorContents = () => {\r\n const { endpoints: {\r\n defaultValues: {\r\n optionsCollections,\r\n caseTypes,\r\n values,\r\n valuesFields\r\n }\r\n }, defaultValue: {\r\n caseType,\r\n optionsColection\r\n }, translation, userType, apiToUse } = this.props;\r\n\r\n const SimpleForm = this.props.formComponent;\r\n\r\n return (<>\r\n <div className=\"d-none\">\r\n <SimpleForm\r\n name={simpleFormNames.optionsCollections}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={optionsCollections}\r\n placeholder={translation.search}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: translation.code_table, required: false }}\r\n initialValue={optionsColection}\r\n readOnly={true}\r\n />\r\n <SimpleForm\r\n name={simpleFormNames.caseTypes}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={caseTypes}\r\n placeholder={translation.search}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: translation.case_type, required: false }}\r\n initialValue={this.props.defaultValue.caseType}\r\n readOnly={true}\r\n />\r\n <SimpleForm\r\n name={simpleFormNames.values}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={values(optionsColection && optionsColection.value)}\r\n optionsParams={{ caseTypeId: caseType && caseType.value }}\r\n placeholder={translation.search}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: translation.default_value, required: false }}\r\n initialValue={this.props.defaultValue.defaultValue}\r\n readOnly={true}\r\n />\r\n </div>\r\n <SimpleForm\r\n name={simpleFormNames.valuesFields}\r\n type={FIELD_TYPE.SELECT_MULTIPLE}\r\n optionsEndpoint={valuesFields(optionsColection && optionsColection.value)}\r\n optionsParams={{\r\n caseTypeId: caseType && caseType.value,\r\n userTypeContext: userType\r\n }}\r\n placeholder={translation.search}\r\n apiToUse={apiToUse}\r\n translation={translation}\r\n descriptionAllLevels={true}\r\n label={{ text: translation.field, required: false }}\r\n initialValue={null}\r\n alwaysOpen={true} />\r\n <div className=\"d-flex justify-content-end\">\r\n <ButtonPrimary onClick={this.onSubmit}>{translation.add}</ButtonPrimary>\r\n </div>\r\n </>);\r\n };\r\n\r\n private renderSelectDialog = () => {\r\n return (\r\n <DialogExpander selectExpander={true} onClose={this.closeSelectDialog} hasFooter={false}>\r\n {this.state.showSelectDialog && this.addSelectorContents()}\r\n </DialogExpander>\r\n );\r\n };\r\n\r\n public render() {\r\n const { validation, readOnly, defaultValue, translation, valueName } = this.props;\r\n\r\n const name = `${defaultValue.optionsColection.value}-${defaultValue.caseType.value}-${defaultValue.defaultValue.value}`;\r\n\r\n const label = <p>\r\n {defaultValue.caseType.description}<br />\r\n {defaultValue.optionsColection.description}<br />\r\n <strong>{defaultValue.defaultValue.description}</strong><br />\r\n </p>;\r\n\r\n const serverValidation = !readOnly && defaultValue && createServerValidation(defaultValue.defaultValueFields, defaultValue.caseType, validation);\r\n const cardValidation = serverValidation && { level: ValidationLevel.error, messages: serverValidation } || undefined;\r\n const invalidOptions = mapInvalidOptions(cardValidation, valueName);\r\n\r\n return <AccessCard\r\n key={name}\r\n componentId={name}\r\n className={undefined}\r\n label={{ text: label as any }}\r\n options={defaultValue.defaultValueFields}\r\n valueItems={defaultValue.defaultValueFields}\r\n initialValueItems={undefined}\r\n validation={cardValidation}\r\n invalidOptions={invalidOptions}\r\n removeLabel={translation.remove}\r\n onChange={this.onChange}\r\n onDelete={this.removeGroup}\r\n useLabelOption={true}\r\n readOnly={readOnly} >\r\n {!this.props.readOnly && <OnClickOutside onClickOutside={this.closeSelectDialog}>\r\n <HotKeys keyMap={this.keyMap} handlers={this.handlers}>\r\n <div className={styles.linkSelector}>\r\n {this.props.handleClickAddButton && <div className={styles.cardValueAddFields}>\r\n <AddButton icon={mdPlus} onClick={this.openSelectDialog} required={false}>\r\n {translation.default_value_add_new_fields}\r\n </AddButton>\r\n </div>}\r\n {this.state.showSelectDialog && this.renderSelectDialog()}\r\n </div>\r\n </HotKeys>\r\n </OnClickOutside>}\r\n </AccessCard>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ComplexValue } from 'ui';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport {\r\n readSelectionParams, simpleFormNames, mapToStore, DefaultValue, selectDefaultValue, updateDefaultValue,\r\n getDuplicatedFields, getUniqueFields, getCurrentFieldId\r\n} from './panel-default-values-utils';\r\nimport { withRoleBasedAccess } from '../role-based-access';\r\nimport {\r\n PanelDefaultValuesComponentProps, PanelDefaultValuesProps,\r\n PanelDefaultValuesState\r\n} from 'app/components/access-panel/default-values/types';\r\nimport { sfParameters } from 'app/components/access-panel/sf-names';\r\nimport { AddDefaultValue } from 'app/components/access-panel/default-values/add-default-value';\r\nimport { CardValue } from 'app/components/access-panel/default-values/card-value';\r\n\r\nclass PanelDefaultValuesComponent extends React.Component<PanelDefaultValuesComponentProps> {\r\n\r\n public componentDidMount() {\r\n this.buildInitalState();\r\n }\r\n\r\n public componentDidUpdate(prevProps: PanelDefaultValuesComponentProps) {\r\n\r\n this.buildInitalState();\r\n\r\n const selections = readSelectionParams(this.props.formValues);\r\n const prevSelections = readSelectionParams(prevProps.formValues);\r\n\r\n if (selections.data.optionsColection && prevSelections.data.optionsColection\r\n && selections.data.optionsColection.value !== prevSelections.data.optionsColection.value) {\r\n this.props.clearValueInStore(simpleFormNames.values);\r\n this.props.clearValueInStore(simpleFormNames.valuesFields);\r\n }\r\n if (selections.data.caseType && prevSelections.data.caseType\r\n && selections.data.caseType.value !== prevSelections.data.caseType.value) {\r\n this.props.clearValueInStore(simpleFormNames.values);\r\n this.props.clearValueInStore(simpleFormNames.valuesFields);\r\n }\r\n }\r\n\r\n private buildInitalState = () => {\r\n\r\n const { customState, changeCustomState, initialValue } = this.props;\r\n\r\n // Check if state does not exist and there is initial value\r\n if (customState || !initialValue) {\r\n return;\r\n }\r\n\r\n changeCustomState({\r\n values: mapToStore(initialValue)\r\n });\r\n }\r\n\r\n private handleClickAddButton = () => {\r\n\r\n const { translation: {\r\n default_value_already_set = ''\r\n } } = this.props;\r\n const { valid, data } = readSelectionParams(this.props.formValues);\r\n const { customState: { values = [] } = {}, changeCustomState } = this.props;\r\n\r\n if (!valid) {\r\n return;\r\n }\r\n\r\n const duplicatedFields = getDuplicatedFields(values, data);\r\n\r\n if (duplicatedFields.length > 0) {\r\n duplicatedFields.forEach(field => {\r\n const message = default_value_already_set\r\n .replace('<FIELD_DESC>', field.description)\r\n .replace('<CASE_TYPE_DESC>', data.caseType.description);\r\n notifyUser.error(message);\r\n });\r\n }\r\n\r\n const existingGroup = selectDefaultValue(values, data);\r\n const uniqueFields = getUniqueFields(values, data);\r\n\r\n changeCustomState({\r\n values: updateDefaultValue(\r\n values,\r\n data,\r\n [\r\n ...(existingGroup ? existingGroup.defaultValueFields : []),\r\n ...uniqueFields\r\n ]\r\n )\r\n });\r\n\r\n this.props.clearValueInStore(simpleFormNames.valuesFields);\r\n }\r\n\r\n private removeGroup = (defaultValue: DefaultValue) => {\r\n\r\n const { customState: { values = [] } = {},\r\n changeCustomState, clearValidation } = this.props;\r\n const existingGroup = selectDefaultValue(values, defaultValue);\r\n\r\n if (!existingGroup) {\r\n return;\r\n }\r\n\r\n clearValidation(this.props.formName, {\r\n [sfParameters.caseType]: existingGroup.caseType.value,\r\n [sfParameters.defaultValue]: existingGroup.defaultValue.value\r\n });\r\n\r\n changeCustomState({\r\n values: values.filter(d => d !== existingGroup)\r\n });\r\n }\r\n\r\n private onChange = (value: ComplexValue<number>[], defaultValue: DefaultValue) => {\r\n\r\n const { customState: { values = [] } = {},\r\n changeCustomState, clearValidation } = this.props;\r\n const existingGroup = selectDefaultValue(values, defaultValue);\r\n const currentFieldId = getCurrentFieldId(\r\n defaultValue.defaultValueFields.map(d => d.value),\r\n value.map(v => v.value)\r\n );\r\n\r\n if (!existingGroup) {\r\n return;\r\n }\r\n\r\n clearValidation(this.props.formName, {\r\n [sfParameters.caseType]: existingGroup.caseType.value,\r\n [sfParameters.field]: currentFieldId\r\n });\r\n\r\n changeCustomState({\r\n values: updateDefaultValue(\r\n values,\r\n defaultValue,\r\n value\r\n )\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { translation, readOnly } = this.props;\r\n const { customState = { values: [] } } = this.props;\r\n\r\n return (<>\r\n {!readOnly && <div className=\"row align-items-end\">\r\n <AddDefaultValue onSubmit={this.handleClickAddButton} {...this.props} />\r\n </div>}\r\n {customState.values && !!customState.values.length\r\n ? <div className=\"row\">\r\n {customState.values.map((item, index) => <CardValue\r\n key={index}\r\n defaultValue={item}\r\n onChange={this.onChange}\r\n removeGroup={this.removeGroup}\r\n handleClickAddButton={this.handleClickAddButton}\r\n {...this.props} />)}\r\n </div>\r\n : !!readOnly && <p className=\"no-content\">{translation.no_access_has_been_granted}</p>}\r\n </>);\r\n }\r\n}\r\n\r\nexport const PanelDefaultValues = withRoleBasedAccess<PanelDefaultValuesProps, PanelDefaultValuesState>(PanelDefaultValuesComponent);\r\n","import * as React from 'react';\r\nimport { PanelDefaultValues } from './panel-default-values';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport { sfNames, sfParameters } from 'app/components/access-panel/sf-names';\r\nimport { PanelsProps } from 'app/components/access-panel/types';\r\nimport { UserDefaultValues } from 'app/components/access-panel/shared/types';\r\nimport { ApiToUse } from 'app/infrastructure/simple-form/types';\r\n\r\nexport interface DefaultValuesProps extends PanelsProps<UserDefaultValues> {\r\n apiToUse: ApiToUse;\r\n userType?: number;\r\n selectedUserType?: number;\r\n isUserTypeRequired: boolean;\r\n isValueFieldsReadOnly?: (optionsColection: ComplexValue<number>, caseType: ComplexValue<number>, userType?: number) => boolean;\r\n}\r\n\r\nexport const DefaultValues = (props: DefaultValuesProps) => {\r\n const { apiToUse, endpoints, readOnly, data, userType, isUserTypeRequired, clearValueInStore, clearValidation,\r\n formValues, formComponent, isValueFieldsReadOnly, validation, translation,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData } = props;\r\n\r\n return <PanelDefaultValues\r\n readOnly={readOnly}\r\n translation={translation}\r\n\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.defaultValues}\r\n accessData={accessData && accessData.defaultValues}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n\r\n formName={sfNames.defaultValues}\r\n formValues={formValues}\r\n formComponent={formComponent}\r\n valueName={sfParameters.field}\r\n initialValue={data && data.defaultValues}\r\n clearValidation={clearValidation}\r\n isValueFieldsReadOnly={isValueFieldsReadOnly}\r\n clearValueInStore={clearValueInStore}\r\n userType={userType}\r\n isUserTypeRequired={isUserTypeRequired}\r\n endpoints={endpoints}\r\n apiToUse={apiToUse}\r\n validation={validation}\r\n />;\r\n};\r\n","import { AccessMode, AccessItem } from 'app/components/access-panel/shared/types';\r\n\r\nexport const serializeDefaultValues = (item: AccessItem) => {\r\n\r\n if (!item || item.mode === AccessMode.role || !item.customData || !item.customData.values) {\r\n return [];\r\n }\r\n\r\n const values = item.customData.values;\r\n\r\n return values.reduce((memo, value) => [\r\n ...memo,\r\n ...value.defaultValueFields.map(field => (\r\n {\r\n codeTable: { v: value.optionsColection.value },\r\n caseType: { v: value.caseType.value },\r\n defaultValue: { v: value.defaultValue.value },\r\n field: { v: field.value }\r\n }))\r\n ], []);\r\n};\r\n","import * as React from 'react';\r\nimport { SingleOptionPanel } from './options-panel/single-option-panel';\r\nimport { PanelsProps } from './types';\r\nimport { sfNames, sfParameters } from './sf-names';\r\n\r\nexport const AccessToAssignRoles = (props: PanelsProps) => {\r\n const { translation, readOnly, data, formComponent, formValues, endpoints, validation, clearValueInStore,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData } = props;\r\n\r\n return <SingleOptionPanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n initialValue={data && data.accessToAssignRoles}\r\n\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.accessToAssignRoles}\r\n accessData={accessData && accessData.accessToAssignRoles}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n valueName={sfParameters.role}\r\n formName={sfNames.accessToAssignRoles}\r\n validation={validation && validation[sfNames.accessToAssignRoles]}\r\n valueOptionsEndpoint={endpoints.role}\r\n valueLabel={translation.access_to_assign_roles_field}\r\n panelLabel={translation.access_to_assign_roles_group}\r\n addButtonText={translation.add_roles_button_text}\r\n clearValueInStore={clearValueInStore}\r\n />;\r\n};\r\n","import { ComplexValue } from 'app/types-shared';\r\n\r\nexport const revertValueItems = (valueItems: ComplexValue<number>[], options: ComplexValue<number>[]) => {\r\n\r\n return options && options.filter(option => !valueItems || !valueItems.some(item => item.value === option.value))\r\n || [];\r\n};\r\n","import React, { useCallback } from 'react';\r\nimport { AccessCard, mergeOptions } from 'ui';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { VisibleForFieldsProps } from './types';\r\nimport { revertValueItems } from './selectors';\r\nimport styles from './visible-for-fields.scss';\r\n\r\nexport const VisibleForFields: React.FC<VisibleForFieldsProps> = ({\r\n options = [],\r\n invalidOptions = [],\r\n valueItems = [],\r\n initialValueItems = [],\r\n loadingText = undefined,\r\n validation, readOnly, readOnlyLabel, onEmptyOptions = null,\r\n onChange,\r\n fetching,\r\n label\r\n}) => {\r\n\r\n const changeHandler = useCallback((values: ComplexValue<number>[]) => {\r\n\r\n const mergedOptions = mergeOptions(options, initialValueItems);\r\n const excludedValues = revertValueItems(values, mergedOptions);\r\n\r\n onChange(excludedValues);\r\n }, [options, initialValueItems, onChange]);\r\n\r\n const allOptions = mergeOptions(options, initialValueItems);\r\n const excludedItems = revertValueItems(valueItems, allOptions);\r\n\r\n return <div className=\"row\">\r\n {\r\n !!fetching\r\n ? <div id=\"visible-for-fields-loading\" className={styles.loading}>\r\n <div className={styles.spinLoader} />\r\n {!!loadingText && <div className={styles.loadingText}> {loadingText}</div>}\r\n </div>\r\n : Array.isArray(options) && options.length > 0 &&\r\n <AccessCard\r\n componentId={'visibleForFields'}\r\n className={undefined}\r\n useLabelOption={false}\r\n options={options}\r\n valueItems={excludedItems}\r\n initialValueItems={initialValueItems}\r\n invalidOptions={invalidOptions}\r\n validation={validation}\r\n onChange={changeHandler}\r\n removeLabel={undefined}\r\n onDelete={undefined}\r\n readOnly={readOnly}\r\n readOnlyLabel={readOnlyLabel}\r\n label={label} />\r\n || onEmptyOptions}\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { VisibleForFields } from 'app/components/visible-for-fields';\r\nimport { UserOccurencePanelProps, UserOccurencePanelState } from './types';\r\nimport { hasPersonOptionsValues, hasPersonOptionsCodes } from './selectors';\r\nimport { withRoleBasedAccess, RoleBasedAccessCustomStateProps } from '../role-based-access';\r\nimport { mapInvalidOptions } from '../shared';\r\n\r\ntype UserOccurencePanelComponentProps = UserOccurencePanelProps & RoleBasedAccessCustomStateProps<UserOccurencePanelState>;\r\n\r\nclass UserOccurencePanelComponent extends React.PureComponent<UserOccurencePanelComponentProps> {\r\n\r\n public componentDidMount() {\r\n this.buildInitalState();\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.buildInitalState();\r\n }\r\n\r\n private buildInitalState = () => {\r\n\r\n const { customState, changeCustomState, initialValue } = this.props;\r\n\r\n if (customState || !initialValue) {\r\n return;\r\n }\r\n\r\n const selectedValues = initialValue.map(item => ({\r\n value: item.v,\r\n description: item.d\r\n }));\r\n\r\n changeCustomState({\r\n selectedValues,\r\n initialValues: selectedValues\r\n });\r\n }\r\n\r\n private onChange = (values: ComplexValue<number>[]) => {\r\n !this.props.readOnly && this.props.changeCustomState({\r\n ...(this.props.customState || {}),\r\n selectedValues: values\r\n });\r\n }\r\n\r\n public render() {\r\n const { customState: { selectedValues = [], initialValues = [] } = {}, translation, readOnly, personOptionsCodes,\r\n formName, valueName, validation } = this.props;\r\n\r\n const hasValues = this.props.personOptionsCodes.values.length > 0 || hasPersonOptionsValues(selectedValues);\r\n\r\n const options = personOptionsCodes && personOptionsCodes.values.map(item => { return { value: item.v, description: item.d }; });\r\n\r\n const invalidOptions = mapInvalidOptions(validation && validation[formName], valueName);\r\n\r\n return <>\r\n {hasValues\r\n ? <div className=\"row expanders-in-equal-cols\">\r\n <VisibleForFields\r\n options={options}\r\n valueItems={selectedValues}\r\n initialValueItems={initialValues}\r\n invalidOptions={invalidOptions}\r\n validation={validation && validation[formName]}\r\n onChange={this.onChange}\r\n readOnly={readOnly}\r\n onEmptyOptions={undefined}\r\n />\r\n </div>\r\n : <p className=\"no-content\">{!!readOnly\r\n ? translation.no_additional_info_has_been_added\r\n : (!hasPersonOptionsCodes(personOptionsCodes) && translation.no_fields_available)}</p>}\r\n </>;\r\n }\r\n}\r\n\r\nexport const UserOccurencePanel = withRoleBasedAccess<UserOccurencePanelProps, UserOccurencePanelState>(UserOccurencePanelComponent);\r\n","import { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { PersonOptionsCodes } from 'app/components/access-panel/shared/types';\r\n\r\nexport const hasPersonOptionsCodes = (personOptionsCodes: PersonOptionsCodes) =>\r\n !!personOptionsCodes && !personOptionsCodes.fetching && personOptionsCodes.values && personOptionsCodes.values.length > 0;\r\n\r\nexport const hasPersonOptionsValues = (personOptions: ComplexValue<number>[]) =>\r\n !!personOptions && personOptions.length > 0;\r\n","\r\nimport * as React from 'react';\r\nimport { sfNames, sfParameters } from 'app/components/access-panel/sf-names';\r\nimport { UserOccurencePanel } from 'app/components/access-panel/user-occurence/user-occurence-panel';\r\nimport { PanelsProps } from 'app/components/access-panel/types';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport const UserOccurence = (props: PanelsProps) => {\r\n\r\n const { readOnly, data, clearValueInStore, formValues, formComponent, translation, validation, personOptionsCodes,\r\n roleSelected, roleBasedData, fetchingRoleBasedData, accessData, updateAccessData, clearValidation } = props;\r\n\r\n return <AdminPaperTopPanel title={translation.user_occurrence_in_preson_field_lists}>\r\n <UserOccurencePanel\r\n readOnly={readOnly}\r\n translation={translation}\r\n\r\n roleSelected={roleSelected}\r\n roleValue={roleBasedData && roleBasedData.personExcluded}\r\n accessData={accessData && accessData.personExcluded}\r\n updateAccessData={updateAccessData}\r\n fetchingRoleValue={fetchingRoleBasedData}\r\n\r\n formName={sfNames.personExcluded}\r\n formComponent={formComponent}\r\n formValues={formValues}\r\n valueName={sfParameters.domainNode}\r\n\r\n initialValue={data && data.personExcluded}\r\n personOptionsCodes={personOptionsCodes}\r\n\r\n validation={validation}\r\n clearValueInStore={clearValueInStore}\r\n clearValidation={clearValidation}\r\n />\r\n </AdminPaperTopPanel>;\r\n};\r\n","import { AccessItem, AccessMode } from 'app/components/access-panel/shared/types';\r\n\r\nexport const serializeValue = (item: AccessItem) => {\r\n\r\n if (!item || item.mode === AccessMode.role || !item.customData || !item.customData.selectedValues) {\r\n return [];\r\n }\r\n\r\n const values = item.customData.selectedValues;\r\n\r\n return values.map(value => ({\r\n v: value.value\r\n }));\r\n};\r\n\r\nexport const serializeKeyAndValue = (item: AccessItem, keyName: string, valueName: string) => {\r\n\r\n if (!item || item.mode === AccessMode.role || !item.customData || !item.customData.selectedValues) {\r\n return [];\r\n }\r\n\r\n const values = item.customData.selectedValues;\r\n\r\n return Object.keys(values).reduce((m, keyValue) =>\r\n values[keyValue]\r\n ? [\r\n ...m,\r\n ...values[keyValue].map(value => ({\r\n [keyName]: { v: parseInt(keyValue, 10) },\r\n [valueName]: { v: value.value }\r\n }))\r\n ]\r\n : m, []);\r\n};\r\n","import { sfNames } from 'app/components/access-panel/sf-names';\r\nimport {\r\n serializeValue, serializeKeyAndValue, serializeExtraInfo, serializeDefaultValues\r\n} from 'app/components/access-panel';\r\nimport { AccessPanelData } from 'app/components/access-panel/shared/types';\r\n\r\nexport const serializeAccessData = (accessData: AccessPanelData) => {\r\n return {\r\n [sfNames.accessToUserGroups]: serializeValue(accessData.accessToUserGroups),\r\n [sfNames.personExcluded]: serializeValue(accessData.personExcluded),\r\n [sfNames.accessToAssignRoles]: serializeValue(accessData.accessToAssignRoles),\r\n [sfNames.accessToScreen]: serializeKeyAndValue(accessData.accessToScreen, 'application', 'domainNode'),\r\n [sfNames.extendedAccess]: serializeKeyAndValue(accessData.extendedAccess, 'application', 'unit'),\r\n [sfNames.accessOperations]: serializeKeyAndValue(accessData.accessOperations, 'application', 'operation'),\r\n [sfNames.responsibleForUnits]: serializeKeyAndValue(accessData.responsibleForUnits, 'application', 'unit'),\r\n [sfNames.restrictedAccess]: serializeKeyAndValue(accessData.restrictedAccess, 'application', 'unit'),\r\n [sfNames.additionalInformation]: serializeExtraInfo(accessData.additionalInformation),\r\n [sfNames.defaultValues]: serializeDefaultValues(accessData.defaultValues)\r\n };\r\n};\r\n","import { AccessPerson } from 'app/components/access-panel/shared/types';\r\n\r\nexport interface UserEditMenuComponentProps {\r\n id: number;\r\n personId: string;\r\n accessPerson: AccessPerson;\r\n loggedUserId: number;\r\n translation: any;\r\n fetching: boolean;\r\n canDuplicate: boolean;\r\n\r\n validation: any;\r\n clearValidation: (fieldName: string) => void;\r\n\r\n onDelete: (id: number) => void;\r\n onChangePassword: (id: number, password: string, onSuccees: () => void) => void;\r\n onChangePersonId: (id: number, personId: string, onSuccees: () => void) => void;\r\n onSaveDatabaseAccount?: (id: number, password: string, onSuccees: () => void) => void;\r\n onResetDatabaseAccount?: (id: number, password: string, onSuccees: () => void) => void;\r\n onDeleteDatabaseAccount: (id: number) => void;\r\n}\r\n\r\nexport enum DatabaseAccount {\r\n create,\r\n reset\r\n}\r\n\r\nexport interface UserEditMenuState {\r\n changingPassword: boolean;\r\n databaseAccount: DatabaseAccount;\r\n changingId: boolean;\r\n}\r\n","import * as React from 'react';\r\nimport FaInfo from 'react-icons/lib/fa/info';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { Textbox, ValidationProps } from 'ui';\r\nimport styles from './change-id.scss';\r\n\r\ninterface ChangePersonIdComponentProps {\r\n personId: string;\r\n editingSelf: boolean;\r\n onClose: () => void;\r\n setPersonId: (personId: string) => void;\r\n validation: ValidationProps;\r\n clearValidation: (fieldName: string) => void;\r\n fetching: boolean;\r\n textTitle: string;\r\n textOldPersonId: string;\r\n textNewPersonId: string;\r\n textDoneButton: string;\r\n textCancel: string;\r\n textDisclaimer: string;\r\n}\r\n\r\ninterface ChangePersonIdComponentState {\r\n newPersonId: string;\r\n}\r\n\r\nclass ChangePersonIdComponent extends React.Component<ChangePersonIdComponentProps, ChangePersonIdComponentState> {\r\n public state:Readonly<ChangePersonIdComponentState> = {\r\n newPersonId: ''\r\n };\r\n\r\n private handleNewPersonIdChange = (value: string) => {\r\n this.setState({\r\n newPersonId: value\r\n });\r\n }\r\n\r\n private clearValidation = () => {\r\n if (!!this.props.validation) {\r\n this.props.clearValidation('personId');\r\n }\r\n }\r\n\r\n private handleDone = () => {\r\n this.clearValidation();\r\n this.props.setPersonId(this.state.newPersonId);\r\n }\r\n\r\n private handleClose = () => {\r\n this.clearValidation();\r\n this.props.onClose();\r\n }\r\n\r\n public render() {\r\n\r\n const { personId, editingSelf, validation, fetching,\r\n textTitle, textOldPersonId, textNewPersonId, textDoneButton, textCancel, textDisclaimer } = this.props;\r\n return (<ModalWrapper\r\n headerTitle={textTitle}\r\n btnTitle={textDoneButton}\r\n btnCancelTitle={textCancel}\r\n onClose={this.handleClose}\r\n onDone={this.handleDone}\r\n closeOnDone={false}\r\n largeSize={false}\r\n isDisabled={fetching}>\r\n {editingSelf && <div className={styles.disclaimerPanel}>\r\n <FaInfo /> {textDisclaimer}\r\n </div>}\r\n <Textbox\r\n readOnly={true}\r\n componentId={'oldPersonId'}\r\n onChange={undefined}\r\n className={''}\r\n label={{ text: textOldPersonId, required: false }}\r\n value={personId} />\r\n <Textbox\r\n componentId={'newPersonId'}\r\n onChange={this.handleNewPersonIdChange}\r\n className={''}\r\n label={{ text: textNewPersonId, required: true }}\r\n value={this.state.newPersonId}\r\n validation={validation}\r\n readOnly={fetching} />\r\n </ModalWrapper>);\r\n }\r\n}\r\n\r\nexport const ChangePersonId = ChangePersonIdComponent;\r\n","import * as React from 'react';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { Password, ValidationProps, createValidationErrors } from 'ui';\r\n\r\ninterface ChangePasswordComponentProps {\r\n onClose: () => void;\r\n setPassword: (password: string) => void;\r\n validation: ValidationProps;\r\n clearValidation: (fieldName: string) => void;\r\n textTitle: string;\r\n textPassword: string;\r\n textConfirmPassword: string;\r\n textDoneButton: string;\r\n textCancel: string;\r\n textMustBeEqual: string;\r\n textPasswordHint?: string;\r\n fetching: boolean;\r\n}\r\n\r\ninterface ChangePasswordComponentState {\r\n password: string;\r\n confirmedPassword: string;\r\n confirmedPasswordValidation: ValidationProps;\r\n}\r\n\r\nclass ChangePasswordComponent extends React.Component<ChangePasswordComponentProps, ChangePasswordComponentState> {\r\n public state:Readonly<ChangePasswordComponentState> = {\r\n password: '',\r\n confirmedPassword: '',\r\n confirmedPasswordValidation: undefined\r\n };\r\n\r\n public componentDidMount() {\r\n this.clearValidation();\r\n }\r\n\r\n private handlePasswordChange = (value: string) => {\r\n this.setState({\r\n password: value\r\n });\r\n }\r\n private handleConfirmedPasswordChange = (value: string) => {\r\n this.setState({\r\n confirmedPassword: value\r\n });\r\n }\r\n\r\n private clearValidation = () => {\r\n if (!!this.props.validation) {\r\n this.props.clearValidation('password');\r\n }\r\n }\r\n\r\n private handleDone = () => {\r\n this.clearValidation();\r\n if (this.state.password === this.state.confirmedPassword) {\r\n this.setState({\r\n confirmedPasswordValidation: undefined\r\n }, () => {\r\n this.props.setPassword(this.state.password);\r\n });\r\n } else {\r\n this.setState({\r\n confirmedPasswordValidation: createValidationErrors([this.props.textMustBeEqual])\r\n });\r\n }\r\n }\r\n\r\n public render() {\r\n const { validation, onClose } = this.props;\r\n const { textTitle, textPassword, textConfirmPassword, textDoneButton, textCancel, textPasswordHint, fetching } = this.props;\r\n return (<ModalWrapper\r\n headerTitle={textTitle}\r\n btnTitle={textDoneButton}\r\n btnCancelTitle={textCancel}\r\n onClose={onClose}\r\n onDone={this.handleDone}\r\n closeOnDone={false}\r\n canCloseOnBackground={false}\r\n largeSize={false}\r\n isDisabled={fetching}>\r\n <Password\r\n componentId={'password'}\r\n onChange={this.handlePasswordChange}\r\n className={''}\r\n label={{ text: textPassword, required: true }}\r\n value={this.state.password}\r\n validation={validation}\r\n info={{ text: textPasswordHint, visible: !!textPasswordHint }} />\r\n <Password\r\n componentId={'confirmedPassword'}\r\n onChange={this.handleConfirmedPasswordChange}\r\n className={''}\r\n label={{ text: textConfirmPassword, required: true }}\r\n value={this.state.confirmedPassword}\r\n validation={this.state.confirmedPasswordValidation} />\r\n </ModalWrapper>);\r\n }\r\n}\r\n\r\nexport const ChangePassword = ChangePasswordComponent;\r\n","import * as React from 'react';\r\nimport { ChangePassword } from './change-password';\r\n\r\nexport interface ChangeDatabaseAccountProps {\r\n title: string;\r\n translation: any;\r\n validation: any;\r\n fetching: boolean;\r\n clearValidation: (fieldName: string) => void;\r\n onSave: (password: string) => void;\r\n onClose: () => void;\r\n}\r\n\r\nexport const ChangeDatabaseAccount = (props: ChangeDatabaseAccountProps) => {\r\n return <ChangePassword\r\n onClose={props.onClose}\r\n setPassword={props.onSave}\r\n validation={props.validation.password}\r\n clearValidation={props.clearValidation}\r\n textTitle={props.title}\r\n textPassword={props.translation.password}\r\n textConfirmPassword={props.translation.confirm_password}\r\n textDoneButton={props.translation.create}\r\n textCancel={props.translation.cancel}\r\n textMustBeEqual={props.translation.must_be_equal}\r\n textPasswordHint={props.translation.password_policy_db_account}\r\n fetching={props.fetching}\r\n />;\r\n};\r\n","// tslint:disable-next-line:max-func-body-length\r\nimport * as React from 'react';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { ChangePersonId } from './change-id';\r\nimport { UserEditMenuComponentProps, UserEditMenuState } from './types';\r\nimport { DatabaseAccount } from 'app/area/administration/edit/user/user-edit-menu/types';\r\nimport { ChangePassword } from 'app/area/administration/edit/user/user-edit-menu/change-password';\r\nimport { ChangeDatabaseAccount } from 'app/area/administration/edit/user/user-edit-menu/change-db-account';\r\nimport { reAuthenticate } from 'app/infrastructure/auth';\r\nimport { isVeracityEnabled } from 'app/infrastructure/hosting';\r\n\r\nexport class UserEditMenu extends React.PureComponent<UserEditMenuComponentProps, UserEditMenuState> {\r\n public state: Readonly<UserEditMenuState> = {\r\n changingPassword: false,\r\n changingId: false,\r\n databaseAccount: undefined\r\n };\r\n\r\n private handleDelete = () => {\r\n this.props.onDelete(this.props.id);\r\n }\r\n\r\n private handleDuplicate = () => {\r\n navigate.toDuplicateUser(this.props.id);\r\n }\r\n\r\n private handleEnablePasswordMode = () => {\r\n this.setState({ changingPassword: true });\r\n }\r\n\r\n private handleDisablePasswordMode = () => {\r\n this.setState({ changingPassword: false });\r\n }\r\n\r\n private handleSetPassword = async (password: string) => {\r\n const { id, onChangePassword } = this.props;\r\n onChangePassword(id, password, this.handleDisablePasswordMode);\r\n }\r\n\r\n private handleEnableDatabaseAccount = (databaseAccount: DatabaseAccount) => {\r\n this.setState({ databaseAccount });\r\n }\r\n\r\n private handleDisableDatabaseAccount = () => {\r\n this.setState({ databaseAccount: undefined });\r\n }\r\n\r\n private handleSaveDatabaseAccount = async (password: string) => {\r\n const { id, onSaveDatabaseAccount } = this.props;\r\n onSaveDatabaseAccount(id, password, this.handleDisableDatabaseAccount);\r\n }\r\n\r\n private handleResetDatabaseAccount = async (password: string) => {\r\n const { id, onResetDatabaseAccount } = this.props;\r\n onResetDatabaseAccount(id, password, this.handleDisableDatabaseAccount);\r\n }\r\n\r\n private handleDeleteDatabaseAccount = () => {\r\n this.props.onDeleteDatabaseAccount(this.props.id);\r\n }\r\n\r\n private enableChangingPersonId = () => {\r\n this.setState({ changingId: true });\r\n }\r\n\r\n private disableChangingPersonId = () => {\r\n this.setState({ changingId: false });\r\n }\r\n\r\n private changePersonId = (personId: string) => {\r\n const { id, loggedUserId, onChangePersonId } = this.props;\r\n onChangePersonId(id, personId, () => {\r\n this.disableChangingPersonId();\r\n if (id === loggedUserId) {\r\n reAuthenticate();\r\n }\r\n });\r\n }\r\n\r\n private createDatabaseAccount = () => {\r\n this.handleEnableDatabaseAccount(DatabaseAccount.create);\r\n }\r\n\r\n private resetDatabaseAccount = () => {\r\n this.handleEnableDatabaseAccount(DatabaseAccount.reset);\r\n }\r\n\r\n // tslint:disable-next-line:max-func-body-length\r\n public render(): JSX.Element {\r\n const { id, personId, accessPerson, validation, clearValidation, fetching, loggedUserId, canDuplicate, translation } = this.props;\r\n const { changingPassword, changingId, databaseAccount } = this.state;\r\n\r\n if (id === undefined || !accessPerson || !(accessPerson.delete || accessPerson.edit)) {\r\n return null;\r\n }\r\n\r\n if (isVeracityEnabled()) {\r\n return null;\r\n }\r\n\r\n return <>\r\n <MeatballMenu id={ids.list_search_item(id)}>\r\n <>\r\n {canDuplicate && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.handleDuplicate}>\r\n {translation.duplicate_user}\r\n </button>\r\n </li>}\r\n {accessPerson.delete && <li>\r\n <PromptConfirmationModal\r\n title={translation.delete_user}\r\n description={translation.delete_user_desc}\r\n continueText={translation.delete_user}\r\n cancelText={translation.cancel}\r\n onContinue={this.handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">{translation.delete_user}</button>\r\n </PromptConfirmationModal>\r\n </li>}\r\n {accessPerson.edit && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.handleEnablePasswordMode}>\r\n {translation.reset_password}\r\n </button>\r\n </li>}\r\n\r\n {accessPerson.edit && !accessPerson.dbAccess.edit && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.enableChangingPersonId}>\r\n {translation.change_user_id}\r\n </button>\r\n </li>}\r\n\r\n {accessPerson.dbAccess.add && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.createDatabaseAccount}>\r\n {translation.database_user_create_button}\r\n </button>\r\n </li>}\r\n\r\n {accessPerson.dbAccess.edit && <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.resetDatabaseAccount}>\r\n {translation.database_user_reset_button}\r\n </button>\r\n </li>}\r\n\r\n {accessPerson.dbAccess.delete && <li>\r\n <PromptConfirmationModal\r\n title={translation.database_user_delete_modal_title}\r\n description={translation.database_user_delete_modal_desc}\r\n continueText={translation.database_user_delete_button}\r\n cancelText={translation.cancel}\r\n onContinue={this.handleDeleteDatabaseAccount}>\r\n <button type=\"button\" className=\"dropdown-item\">\r\n {translation.database_user_delete_button}\r\n </button>\r\n </PromptConfirmationModal>\r\n </li>}\r\n </>\r\n </MeatballMenu>\r\n\r\n {changingPassword && <ChangePassword\r\n onClose={this.handleDisablePasswordMode}\r\n setPassword={this.handleSetPassword}\r\n validation={validation.password}\r\n clearValidation={clearValidation}\r\n textTitle={translation.change_password}\r\n textPassword={translation.password}\r\n textConfirmPassword={translation.confirm_password}\r\n textDoneButton={translation.change}\r\n textCancel={translation.cancel}\r\n textMustBeEqual={translation.must_be_equal}\r\n textPasswordHint={translation.password_policy_user_account}\r\n fetching={fetching}\r\n />}\r\n\r\n {changingId && <ChangePersonId\r\n personId={personId}\r\n editingSelf={id === loggedUserId}\r\n onClose={this.disableChangingPersonId}\r\n setPersonId={this.changePersonId}\r\n validation={validation.personId}\r\n clearValidation={clearValidation}\r\n fetching={fetching}\r\n textTitle={translation.change_user_id}\r\n textOldPersonId={translation.old_user_id}\r\n textNewPersonId={translation.new_user_id}\r\n textDoneButton={translation.change}\r\n textCancel={translation.cancel}\r\n textDisclaimer={translation.change_id_disclaimer}\r\n />}\r\n\r\n {databaseAccount === DatabaseAccount.create &&\r\n <ChangeDatabaseAccount\r\n title={translation.database_user_create_modal_title}\r\n onSave={this.handleSaveDatabaseAccount}\r\n onClose={this.handleDisableDatabaseAccount}\r\n {...this.props} />}\r\n\r\n {databaseAccount === DatabaseAccount.reset &&\r\n <ChangeDatabaseAccount\r\n title={translation.database_user_reset_modal_title}\r\n onSave={this.handleResetDatabaseAccount}\r\n onClose={this.handleDisableDatabaseAccount}\r\n {...this.props} />}\r\n </>;\r\n }\r\n}\r\n","export const sfNames = {\r\n id: 'id',\r\n name: 'name',\r\n personId: 'personId',\r\n emailAddress: 'emailAddress',\r\n disabled: 'disabled',\r\n userType: 'userType',\r\n mainUserGroup: 'mainUserGroup',\r\n currentUserGroup: 'currentUserGroup',\r\n unit: 'unit',\r\n location: 'location',\r\n language: 'language',\r\n alternativeIds: 'alternativeIds'\r\n};\r\n\r\nexport const sfParameters = {\r\n personId: 'personId'\r\n};\r\n","import { SimpleFormValidationConfig, requiredValidation, validateEmail } from 'app/infrastructure/simple-form';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\n\r\nexport const addUserValidationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(sfNames.name),\r\n requiredValidation(sfNames.personId),\r\n requiredValidation(sfNames.userType),\r\n requiredValidation(sfNames.mainUserGroup),\r\n requiredValidation(sfNames.currentUserGroup),\r\n requiredValidation(sfNames.language),\r\n validateEmail(sfNames.emailAddress)\r\n];\r\n\r\nexport const editUserValidationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(sfNames.name),\r\n requiredValidation(sfNames.userType),\r\n requiredValidation(sfNames.mainUserGroup),\r\n requiredValidation(sfNames.currentUserGroup),\r\n requiredValidation(sfNames.language),\r\n validateEmail(sfNames.emailAddress)\r\n];\r\n","import { ValidationLevel } from 'ui';\r\nimport { AccessPanelData, AccessPanelDataValidation, AccessItem } from 'app/components/access-panel/shared/types';\r\n\r\nexport const accessDataValidation = (accessData: AccessPanelData, message: string): AccessPanelDataValidation => {\r\n\r\n const result = Object.keys(accessData)\r\n .map(propertyKey => {\r\n const value: AccessItem = accessData[propertyKey];\r\n const customData = value && value.customData || {};\r\n\r\n const { selectedOptions = [], selectedValues = [] } = customData;\r\n\r\n const filteredSelectedValues: string[] = Object.keys(selectedValues).filter(key => selectedValues[key]);\r\n\r\n const applicationIds: string[] = selectedOptions\r\n .map(option => String(option.value))\r\n .filter(option => !filteredSelectedValues.includes(option));\r\n\r\n return applicationIds && applicationIds.length > 0\r\n ? {\r\n [propertyKey]: {\r\n level: ValidationLevel.error,\r\n messages: applicationIds.map(id => {\r\n return {\r\n level: ValidationLevel.error,\r\n message,\r\n parameters: {\r\n application: parseInt(id, 10)\r\n }\r\n };\r\n })\r\n }\r\n } : {};\r\n })\r\n .filter(f => !!f)\r\n .reduce((acc, curr) => {\r\n return { ...acc, ...curr };\r\n }, {});\r\n\r\n return !!Object.keys(result).length ? result : undefined;\r\n};\r\n","import { parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { User } from 'app/components/access-panel/shared/types';\r\n\r\nexport const compareAccess = (newAccess: any, data: Partial<User>) =>\r\n\r\n !!newAccess &&\r\n\r\n /**\r\n * Checks if there are some values in original data that have been removed from serialized data\r\n */\r\n (Object.keys(data || {}).some(propertyKey => {\r\n\r\n const value = data[propertyKey];\r\n\r\n return newAccess[propertyKey] === undefined &&\r\n ((Array.isArray(value) && value.length > 0) ||\r\n (typeof value === 'object' && Object.keys(value).length > 0 &&\r\n value.value !== 0 && value.value !== undefined));\r\n }) ||\r\n\r\n /**\r\n * Checks if there are some values in serialized data that have been changed\r\n */\r\n Object.keys(newAccess).some(propertyKey => {\r\n\r\n /**\r\n * Checks simple data and { v: _ } values\r\n */\r\n if (!Array.isArray(newAccess[propertyKey])) {\r\n\r\n const value = newAccess[propertyKey] || undefined;\r\n const dataValue = data && data[propertyKey] || undefined;\r\n\r\n // Test dates\r\n if (value instanceof Date) {\r\n return dataValue && !!parseAsDateUTC(dataValue)\r\n ? !value || value.getTime() !== parseAsDateUTC(dataValue).getTime()\r\n : value !== dataValue;\r\n }\r\n\r\n // test objects\r\n if (typeof value === 'object') {\r\n return value.v !== (dataValue || {}).value;\r\n }\r\n\r\n // special case for handling missing data, when it was not selected code\r\n // (value: 0 and value: undefined)\r\n if (value === undefined) {\r\n return dataValue !== undefined && (typeof dataValue !== 'object'\r\n || (dataValue.value !== 0 && dataValue.value !== undefined));\r\n }\r\n\r\n // raw value check\r\n return value !== dataValue;\r\n\r\n } else {\r\n\r\n /**\r\n * Checks arrays\r\n */\r\n const dataValue = data && data[propertyKey] || [];\r\n\r\n // compares array lengths\r\n return newAccess[propertyKey].length !== dataValue.length ||\r\n\r\n // compares individual items if both arrays has the same length \r\n newAccess[propertyKey].some(item =>\r\n\r\n item && item.v !== undefined\r\n\r\n // if item is { v: _ } seeks for same value in original data\r\n ? !dataValue.some(dataItem => item.v === dataItem.v)\r\n\r\n // if item is object, compare inner objects\r\n : !dataValue.some(dataItem =>\r\n\r\n !item || Object.keys(item).length === Object.keys(dataItem).length &&\r\n (Object.keys(item).length === 0 ||\r\n !Object.keys(item).some(valueKey =>\r\n\r\n !dataItem[valueKey] ||\r\n (item[valueKey].v === undefined\r\n ? item[valueKey] !== dataItem[valueKey]\r\n : item[valueKey].v !== dataItem[valueKey].v)\r\n ))\r\n )\r\n );\r\n }\r\n })\r\n );\r\n","import * as React from 'react';\r\nimport { ApiToUse, SimpleFormComponentProps, SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/field-types';\r\nimport { AdministrationUserEditProps } from './types';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { userOptions } from '../endpoints';\r\n\r\nimport style from 'app/area/administration/edit/edit.scss';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\nimport { AdminPaperSubPanel } from 'app/area/administration/edit/components';\r\n\r\nexport interface UserTypeGroupProps extends AdministrationUserEditProps {\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n}\r\n\r\nconst getMainUserGroup = (formValues) => formValues &&\r\n formValues[sfNames.mainUserGroup] &&\r\n formValues[sfNames.mainUserGroup].value || undefined;\r\n\r\nexport class UserTypeGroup extends React.PureComponent<UserTypeGroupProps> {\r\n\r\n public componentDidUpdate(prevProps: AdministrationUserEditProps) {\r\n\r\n // Current user group is dependent on Main user group. Therefore, when \r\n // Main user group is being changed, current user group must be cleared \r\n const prevMainUserGroup = getMainUserGroup(prevProps.formValues);\r\n const nextMainUserGroup = getMainUserGroup(this.props.formValues);\r\n if (prevMainUserGroup && prevMainUserGroup !== nextMainUserGroup) {\r\n this.props.clearValueInStore(sfNames.currentUserGroup);\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const { formComponent: SimpleForm, translation, data, editMode, formValues } = this.props;\r\n\r\n const mainUserGroup = getMainUserGroup(formValues);\r\n\r\n return <AdminPaperSubPanel title={translation.user_type_and_group}>\r\n <div className={style.section}>\r\n <div className=\"row expanders-in-equal-cols\">\r\n <div id={ids.users.user_type} className=\"col-lg-4 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.userType}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={userOptions.usertype}\r\n label={{ text: translation.user_type, required: editMode }}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n placeholder={translation.search}\r\n translation={translation}\r\n initialValue={data && data.userType}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={!editMode}\r\n />\r\n </div>\r\n\r\n <div id={ids.users.main_user_group} className=\"col-lg-4 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.mainUserGroup}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={userOptions.mainUsergroup}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n placeholder={translation.search}\r\n translation={translation}\r\n label={{ text: translation.main_user_group, required: editMode }}\r\n initialValue={data && data.mainUserGroup}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={!editMode}\r\n />\r\n </div>\r\n\r\n <div id={ids.users.current_user_group} className=\"col-lg-4 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.currentUserGroup}\r\n readOnly={!mainUserGroup || !editMode}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={userOptions.currentUsergroup(mainUserGroup)}\r\n optionsParams={mainUserGroup && { mainUserGroup }}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n translation={translation}\r\n placeholder={translation.search}\r\n label={{ text: translation.current_user_group, required: editMode }}\r\n initialValue={data && data.currentUserGroup}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </AdminPaperSubPanel>;\r\n }\r\n}\r\n","import { RefObject } from 'react';\r\n\r\nexport interface WithMetroLineProps<SectionType> {\r\n configuration: Configuration<SectionType>[];\r\n initialMode?: ViewMode;\r\n initialSection?: SectionType;\r\n forceMode?: ViewMode;\r\n translation: { [key: string]: string };\r\n scrollViewUrl: string;\r\n label?: string;\r\n hasBigStickyHeader?: boolean;\r\n}\r\n\r\nexport interface WithMetroLineWrappedComponentProps<SectionType> {\r\n getRef: (sectionType: SectionType) => RefObject<HTMLDivElement>;\r\n shouldRenderSection: (currentSection: SectionType | string, sectionType: SectionType) => boolean;\r\n}\r\n\r\nexport interface MetroLineProps<SectionType> extends WithMetroLineProps<SectionType> {\r\n activeMode: ViewMode;\r\n activeSection: SectionType;\r\n changeViewMode: () => void;\r\n updateActiveSection: (activeSection: SectionType) => void;\r\n}\r\n\r\nexport interface Configuration<SectionType> {\r\n section: SectionType;\r\n visible: boolean;\r\n iconUrl: string;\r\n url: string;\r\n label: (translation: { [key: string]: string }) => string;\r\n ref?: RefObject<HTMLDivElement>;\r\n}\r\n\r\nexport enum ViewMode {\r\n tabs = 'tabs',\r\n scroll = 'scroll'\r\n}\r\n\r\nexport interface TabItemWrapperProps<SectionType> {\r\n id: number;\r\n anchorId: string;\r\n item: Configuration<SectionType>;\r\n active: boolean;\r\n translation: { [key: string]: string };\r\n itemRef: RefObject<HTMLElement>;\r\n activeMode: ViewMode;\r\n updateActiveSection: (activeSection: SectionType) => void;\r\n}\r\n\r\nexport interface MetroLineSectionProps<SectionType> extends WithMetroLineWrappedComponentProps<SectionType> {\r\n section: SectionType | string;\r\n sectionType: SectionType;\r\n hasBigStickyHeader?: boolean;\r\n}\r\n","import * as React from 'react';\r\nimport { SimpleFormComponentProps, ApiToUse, SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/field-types';\r\nimport { userOptions } from '../endpoints';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { AdministrationUserEditProps } from './types';\r\n\r\nimport style from '../edit.scss';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\nexport interface UnitLocationLangProps extends AdministrationUserEditProps {\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n}\r\n\r\nexport const UnitLocationLang = (props: UnitLocationLangProps) => {\r\n\r\n const { formComponent: SimpleForm, translation, data, editMode } = props;\r\n\r\n return <div className={style.section}>\r\n <div className=\"row expanders-in-equal-cols\">\r\n <div id={ids.users.unit} className=\"col-lg-4 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.unit}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n descriptionAllLevels={true}\r\n optionsEndpoint={userOptions.unit}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n placeholder={translation.search}\r\n translation={translation}\r\n label={{ text: translation.unit, required: false }}\r\n initialValue={data && data.unit}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={!editMode}\r\n />\r\n </div>\r\n\r\n <div id={ids.users.location} className=\"col-lg-4 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.location}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n descriptionAllLevels={true}\r\n optionsEndpoint={userOptions.location}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n translation={translation}\r\n placeholder={translation.search}\r\n label={{ text: translation.location, required: false }}\r\n initialValue={data && data.location}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={!editMode}\r\n />\r\n </div>\r\n\r\n <div id={ids.users.default_language} className=\"col-sm-12 col-lg-4\">\r\n <SimpleForm\r\n name={sfNames.language}\r\n type={FIELD_TYPE.SELECT_SINGLE}\r\n optionsEndpoint={userOptions.language}\r\n placeholder={translation.search}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n translation={translation}\r\n label={{ text: translation.language, required: editMode }}\r\n initialValue={data && data.language}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={!editMode}\r\n />\r\n </div>\r\n </div>\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { TabItemWrapperProps, ViewMode } from 'app/components/metro-line/types';\r\nimport { TabItem } from 'app/components/tabs/tab-item/tab-item';\r\nimport { scrollIntoView } from 'app/infrastructure/platform/browser-dom';\r\n\r\nexport class TabItemWrapper<SectionType> extends React.PureComponent<TabItemWrapperProps<SectionType>> {\r\n\r\n private onClick = (e: React.MouseEvent) => {\r\n e.preventDefault();\r\n this.props.activeMode === ViewMode.scroll ? this.scrollToSection() : this.navigateToSection();\r\n };\r\n\r\n private scrollToSection = () => {\r\n const { itemRef, anchorId } = this.props;\r\n const ref = !!itemRef && !!itemRef.current ? itemRef.current : null;\r\n\r\n if (!ref) {\r\n return;\r\n }\r\n\r\n const anchor = document.getElementById(anchorId);\r\n scrollIntoView(anchor, { behavior: 'smooth' });\r\n }\r\n\r\n private navigateToSection = () => {\r\n const { item, updateActiveSection } = this.props;\r\n\r\n navigate.toMetroLineSection(item.url);\r\n\r\n updateActiveSection(item.section);\r\n }\r\n\r\n public render() {\r\n\r\n const { id, item, active, translation } = this.props;\r\n\r\n return <TabItem\r\n id={id}\r\n active={active}\r\n valid={true}\r\n url={undefined}\r\n label={{ text: item.label(translation) }}\r\n iconUrl={item.iconUrl}\r\n onClick={this.onClick}\r\n visible={item.visible}\r\n />;\r\n }\r\n}\r\n","export const getSectionId = <SectionType>(section: SectionType) => `metro-line-section-archor-${section}`;\r\n","import * as React from 'react';\r\nimport { Component } from 'react';\r\nimport { MetroLineProps, ViewMode, Configuration } from 'app/components/metro-line/types';\r\nimport { TabContainer } from 'app/components/tabs/tab-container/tab-container';\r\nimport { TabItemWrapper } from 'app/components/metro-line/tab-item-wrapper';\r\nimport { getSectionId } from 'app/components/metro-line/helpers';\r\n\r\nexport class MetroLine<SectionType> extends Component<MetroLineProps<SectionType>> {\r\n\r\n private tabsFactory = (configuration: Configuration<SectionType>[], activeSection: SectionType,\r\n translation: any) => {\r\n\r\n return (onClick) => <ul id=\"tabcontainer\" role=\"tablist\" onClick={onClick}>\r\n {configuration.map((item, index) =>\r\n <TabItemWrapper<SectionType>\r\n key={String(item.section)}\r\n id={index}\r\n item={item}\r\n active={activeSection === item.section}\r\n activeMode={this.props.activeMode}\r\n translation={translation}\r\n anchorId={getSectionId(item.section)}\r\n itemRef={item.ref}\r\n updateActiveSection={this.props.updateActiveSection}\r\n />)}\r\n </ul>;\r\n };\r\n\r\n public render() {\r\n const { configuration, translation, changeViewMode, activeSection, activeMode, forceMode, label } = this.props;\r\n\r\n const renderTabs = this.tabsFactory(configuration, activeSection, translation);\r\n\r\n return <TabContainer\r\n changeViewMode={!forceMode ? changeViewMode : undefined}\r\n label={label || translation.label}\r\n visible={configuration.filter(f => !!f.visible).length > 1}\r\n expandAll={activeMode === ViewMode.scroll}\r\n activeSection={String(activeSection)}\r\n translation={this.props.translation}\r\n renderTabs={renderTabs} />;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { SectionPager } from 'app/components/section-pager/section-pager';\r\nimport { MetroLine } from 'app/components/metro-line/metro-line';\r\nimport { ViewMode, WithMetroLineProps, WithMetroLineWrappedComponentProps } from 'app/components/metro-line/types';\r\nimport { RefObject } from 'react';\r\nimport styles from './with-metro-line.scss';\r\nimport { scrollIntoView } from 'app/infrastructure/platform/browser-dom';\r\nimport { getSectionId } from 'app/components/metro-line/helpers';\r\n\r\ninterface MetroLineState<SectionType> {\r\n activeMode: ViewMode;\r\n activeSection: SectionType;\r\n}\r\n\r\n//tslint:disable:max-func-body-length\r\nexport const withMetroLine = <P, SectionType>() => (\r\n WrappedComponent: React.ComponentClass<P & WithMetroLineWrappedComponentProps<SectionType> | React.SFC<P>>\r\n) => {\r\n return class extends React.Component<P & WithMetroLineProps<SectionType>, MetroLineState<SectionType>> {\r\n\r\n private scrollToSectionHandler: number = null;\r\n\r\n public state: MetroLineState<SectionType> = {\r\n activeMode: ViewMode.scroll,\r\n activeSection: undefined\r\n };\r\n\r\n public componentDidMount() {\r\n const { configuration, initialMode, initialSection, forceMode } = this.props;\r\n\r\n window.addEventListener('scroll', this.handleScroll);\r\n\r\n if (!!initialSection && !!configuration && !!configuration.find(item => item.section === initialSection)) {\r\n this.setState({ activeMode: ViewMode.tabs, activeSection: initialSection });\r\n } else if (initialMode) {\r\n this.setState({ activeMode: initialMode });\r\n }\r\n\r\n if (!initialSection && !!configuration && configuration.length > 0) {\r\n this.setState({ activeSection: configuration[0].section });\r\n }\r\n\r\n if (!!forceMode) {\r\n this.setState({ activeMode: forceMode });\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n window.removeEventListener('scroll', this.handleScroll);\r\n window.clearTimeout(this.scrollToSectionHandler);\r\n this.scrollToSectionHandler = null;\r\n }\r\n\r\n private handleScroll = () => {\r\n const fromTop = window.scrollY;\r\n\r\n this.props.configuration.forEach(configurationItem => {\r\n\r\n const sectionRef = configurationItem.ref || null;\r\n\r\n const section = !!sectionRef && !!sectionRef.current ? sectionRef.current : null;\r\n\r\n if (!section) {\r\n return;\r\n }\r\n\r\n const offset = this.props.hasBigStickyHeader ? 47 : 16;\r\n\r\n if (\r\n section.offsetTop - offset <= fromTop &&\r\n section.offsetTop + section.offsetHeight > fromTop\r\n ) {\r\n if (this.state.activeSection !== configurationItem.section) {\r\n this.setState({ activeSection: configurationItem.section });\r\n }\r\n }\r\n });\r\n }\r\n\r\n private changeViewMode = (): void => {\r\n const { activeMode: mode, activeSection } = this.state;\r\n const { scrollViewUrl, configuration } = this.props;\r\n\r\n const newMode = mode === ViewMode.scroll ? ViewMode.tabs : ViewMode.scroll;\r\n this.setState({ activeMode: newMode });\r\n\r\n const currentConfiguration = configuration.find(configurationItem => configurationItem.section === activeSection);\r\n\r\n if (newMode === ViewMode.scroll) {\r\n navigate.toMetroLineSection(scrollViewUrl);\r\n if (this.scrollToSectionHandler !== null) {\r\n window.clearTimeout(this.scrollToSectionHandler);\r\n this.scrollToSectionHandler = null;\r\n }\r\n\r\n this.scrollToSectionHandler = window.setTimeout(() => {\r\n const anchor = document.getElementById(getSectionId(currentConfiguration.section));\r\n scrollIntoView(anchor, { behavior: 'smooth' });\r\n }, 500);\r\n\r\n } else {\r\n !!currentConfiguration && !!currentConfiguration.url && navigate.toMetroLineSection(currentConfiguration.url);\r\n }\r\n }\r\n\r\n private updateActiveSection = (activeSection: SectionType) => {\r\n this.setState({ activeSection });\r\n }\r\n\r\n private getNextSection = () => {\r\n const { configuration } = this.props;\r\n const currentSectionPosition = configuration.findIndex(configurationItem =>\r\n configurationItem.section === this.state.activeSection);\r\n const nextSection = configuration[currentSectionPosition + 1];\r\n return !!nextSection\r\n ? {\r\n id: undefined,\r\n label: nextSection.label(this.props.translation)\r\n }\r\n : undefined;\r\n }\r\n\r\n private getPreviousSection = () => {\r\n const { configuration } = this.props;\r\n const currentSectionPosition = configuration.findIndex(configurationItem =>\r\n configurationItem.section === this.state.activeSection);\r\n const previousSection = configuration[currentSectionPosition - 1];\r\n return !!previousSection\r\n ? {\r\n id: undefined,\r\n label: previousSection.label(this.props.translation)\r\n }\r\n : undefined;\r\n }\r\n\r\n private goToNextSection = (event: React.MouseEvent<any>) => {\r\n const { configuration } = this.props;\r\n event.preventDefault();\r\n\r\n this.removeFocus();\r\n\r\n const currentSectionPosition = configuration.findIndex(configurationItem =>\r\n configurationItem.section === this.state.activeSection);\r\n const nextSection = configuration[currentSectionPosition + 1];\r\n\r\n !!nextSection && this.setState({ activeSection: nextSection.section });\r\n !!nextSection && navigate.toMetroLineSection(nextSection.url);\r\n }\r\n\r\n private goToPreviousSection = (event: React.MouseEvent<any>) => {\r\n const { configuration } = this.props;\r\n event.preventDefault();\r\n\r\n this.removeFocus();\r\n\r\n const currentSectionPosition = configuration.findIndex(configurationItem =>\r\n configurationItem.section === this.state.activeSection);\r\n const previousSection = configuration[currentSectionPosition - 1];\r\n\r\n !!previousSection && this.setState({ activeSection: previousSection.section });\r\n !!previousSection && navigate.toMetroLineSection(previousSection.url);\r\n }\r\n\r\n private removeFocus = () => (document.activeElement as any).blur();\r\n\r\n private getRef = (section: SectionType): RefObject<HTMLDivElement> => {\r\n const sectionConfiguration = this.props.configuration.find(configurationItem => configurationItem.section === section);\r\n return !!sectionConfiguration ? sectionConfiguration.ref : undefined;\r\n }\r\n\r\n private shouldRenderSection = (currentSection: SectionType, sectionToRender: SectionType) => {\r\n return !currentSection || !!currentSection && currentSection === sectionToRender;\r\n }\r\n\r\n public render() {\r\n\r\n const { configuration, translation, scrollViewUrl, forceMode, label } = this.props;\r\n const { activeSection, activeMode } = this.state;\r\n\r\n if (!configuration) {\r\n return null;\r\n }\r\n\r\n return <>\r\n <MetroLine\r\n configuration={configuration}\r\n translation={translation}\r\n scrollViewUrl={scrollViewUrl}\r\n updateActiveSection={this.updateActiveSection}\r\n changeViewMode={this.changeViewMode}\r\n activeSection={activeSection}\r\n activeMode={activeMode}\r\n forceMode={forceMode}\r\n label={label}\r\n />\r\n <div id=\"wrapped-component\" className={styles.wrappedComponent}>\r\n <WrappedComponent {...this.props} getRef={this.getRef} shouldRenderSection={this.shouldRenderSection} />\r\n </div>\r\n <div>\r\n {this.state.activeMode === ViewMode.tabs\r\n ? <SectionPager\r\n hide={false}\r\n nextSection={this.getNextSection()}\r\n previousSection={this.getPreviousSection()}\r\n onNext={this.goToNextSection}\r\n onPrevious={this.goToPreviousSection}\r\n children={undefined}\r\n />\r\n : null\r\n }\r\n </div>\r\n </>;\r\n }\r\n };\r\n};\r\n","import { SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux/types';\r\nimport { PromptProps } from 'app/components/prompt-unsaved/prompt-unsaved';\r\nimport { actionCreators } from './actions';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { AdministrationUserEditState } from 'app/area/administration/edit/user/types-store';\r\nimport { UserEditType } from 'app/area/administration/shared/types';\r\n\r\nexport interface UserDataFactoryProps {\r\n title: string;\r\n saveButtonText: string;\r\n showUserEditMenu?: boolean;\r\n hideDetails?: boolean;\r\n showPersonId?: boolean;\r\n showUserId?: boolean;\r\n duplicateUrl?: string;\r\n onLoadUser?: () => void;\r\n onSave: () => void;\r\n}\r\n\r\nexport interface AdministrationUserEditPropsExternalProps {\r\n id: number;\r\n editMode: boolean;\r\n shouldDisplayModal: boolean;\r\n section: string;\r\n}\r\n\r\nexport interface UserDataFactoryState {\r\n type: UserEditType;\r\n}\r\n\r\nexport type AdministrationUserEditProps = AdministrationUserEditPropsExternalProps\r\n & AdministrationUserEditState & SimpleFormProps & DefaultContainerProps & PromptProps & typeof actionCreators\r\n & OptionsProps & UserDataFactoryProps;\r\n\r\nexport enum UserEditSectionType {\r\n Details = 'details',\r\n AccessToOperation = 'accessToOperation',\r\n AccessToScreen = 'accessToScreen',\r\n ExtendedAccess = 'extendedAccess',\r\n RestrictedAccess = 'restrictedAccess',\r\n AccessToAdministrateUserGroup = 'accessToAdministrateUserGroup',\r\n AccessToAssignRoles = 'accessToAssignRoles',\r\n DefaultValues = 'defaultValues',\r\n UserOccurence = 'userOccurence',\r\n Notifications = 'notifications'\r\n}\r\n","export const alternativeIdFieldName = (field: string, id: number) => `alternativeId_${field}_${id}`;\r\n","import * as React from 'react';\r\nimport { MeatballMenu, Validation, ValidationLevel } from 'ui';\r\nimport { FIELD_TYPE, ValidationType } from 'app/infrastructure/simple-form';\r\nimport { SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { AlternativeIdItemProps } from './types';\r\nimport { alternativeIdFieldName } from './constants';\r\n\r\nimport style from './alternative-id-item.scss';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\n\r\nexport class AlternativeIdItem extends React.PureComponent<AlternativeIdItemProps> {\r\n\r\n private onRemove = () => {\r\n !!this.props.onRemove && this.props.onRemove(this.props.data);\r\n }\r\n\r\n public render() {\r\n\r\n const { data, formValues = {}, validateFields = [], validation, readOnly, translation, formComponent: SimpleForm } = this.props;\r\n\r\n if (!data) {\r\n return null;\r\n }\r\n\r\n const personIdFormValue = formValues[alternativeIdFieldName(sfNames.personId, data.id)];\r\n const nameFormValue = formValues[alternativeIdFieldName(sfNames.name, data.id)];\r\n\r\n const validationPersonId = validation && validation.messages\r\n && validation.messages.filter(m => m.parameters && m.parameters.personId === personIdFormValue);\r\n\r\n const validationName = validation && validation.messages\r\n && validation.messages.filter(m => m.parameters && m.parameters.name === nameFormValue);\r\n\r\n const hasPersonIdErrors = !!validationPersonId && validationPersonId.length > 0;\r\n const hasNameErrors = !!validationName && validationName.length > 0;\r\n\r\n return <div className={style.item}>\r\n {!readOnly && <div className={style.header}>\r\n <MeatballMenu closeAfterClick={true}>\r\n <li>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={this.onRemove}>\r\n {translation.remove}\r\n </button>\r\n </li>\r\n </MeatballMenu>\r\n </div>}\r\n <div className=\"row\">\r\n <div className={`col-lg-5 col-sm-12 ${hasPersonIdErrors ? 'has-danger' : ''}`}>\r\n <SimpleForm\r\n name={alternativeIdFieldName(sfNames.personId, data.id)}\r\n maxLength={80}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.alternative_id, required: !readOnly }}\r\n initialValue={data && data.personId}\r\n validationProps={[\r\n { type: ValidationType.Required },\r\n {\r\n type: ValidationType.Unique,\r\n fields: validateFields\r\n .filter(id => id !== data.id)\r\n .map(id => alternativeIdFieldName(sfNames.personId, id))\r\n }\r\n ]}\r\n readOnly={readOnly}\r\n />\r\n {hasPersonIdErrors && <div className={style.validation}>\r\n <Validation level={ValidationLevel.error} messages={validationPersonId} />\r\n </div>}\r\n </div>\r\n <div className={`col-lg-5 col-sm-12 ${hasNameErrors ? 'has-danger' : ''}`}>\r\n <SimpleForm\r\n name={alternativeIdFieldName(sfNames.name, data.id)}\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.name, required: !readOnly }}\r\n initialValue={data && data.name}\r\n serialize={{\r\n type: SerializeType.VALUE_PAIRS,\r\n formName: sfNames.alternativeIds,\r\n valueKey: sfNames.name,\r\n groupKey: sfNames.personId,\r\n groupField: alternativeIdFieldName(sfNames.personId, data.id)\r\n }}\r\n validationProps={[{ type: ValidationType.Required }]}\r\n readOnly={readOnly}\r\n />\r\n {hasNameErrors && <div className={style.validation}>\r\n <Validation level={ValidationLevel.error} messages={validationName} />\r\n </div>}\r\n </div>\r\n </div>\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport mdPlus from 'react-icons/lib/md/add';\r\nimport { AlternativeIdProps, AlternativeIdState, AlternativeIdItemData } from './types';\r\nimport { AlternativeIdItem } from './alternative-id-item';\r\nimport { alternativeIdFieldName } from './constants';\r\nimport { sfNames, sfParameters } from 'app/area/administration/edit/sf-names';\r\n\r\nimport style from './alternative-id.scss';\r\nimport { AddButton } from 'ui';\r\nimport { AdminPaperSubPanel } from 'app/area/administration/edit/components';\r\n\r\nexport class AlternativeId extends React.PureComponent<AlternativeIdProps, AlternativeIdState> {\r\n\r\n public constructor(props: AlternativeIdProps) {\r\n super(props);\r\n\r\n this.state = {\r\n data: props.data && props.data.map((item, index) => ({\r\n id: index,\r\n personId: item.personId,\r\n name: item.name\r\n })) || []\r\n };\r\n }\r\n\r\n private removeAlternativeId = (data: AlternativeIdItemData) => {\r\n\r\n const { formValues = {} } = this.props;\r\n\r\n this.setState({\r\n data: this.state.data.filter(item => item.id !== data.id)\r\n });\r\n\r\n this.props.clearValidation(sfNames.alternativeIds, {\r\n [sfParameters.personId]: formValues[alternativeIdFieldName(sfNames.personId, data.id)] as string\r\n });\r\n }\r\n\r\n private addAlternativeId = () => {\r\n\r\n const { data } = this.state;\r\n const id = data.length > 0 ? data[data.length - 1].id + 1 : 0;\r\n\r\n this.setState({\r\n data: [\r\n ...data,\r\n {\r\n id,\r\n personId: '',\r\n name: ''\r\n }\r\n ]\r\n });\r\n }\r\n\r\n public render() {\r\n\r\n const { formValues, validation, translation, readOnly, formComponent } = this.props;\r\n const fieldIds = this.state.data.map(item => item.id);\r\n\r\n return <AdminPaperSubPanel title={translation.alternative_id}>\r\n <div className={style.section}>\r\n <div className=\"row expanders-in-equal-cols\">\r\n <div className=\"col-lg-12\">\r\n\r\n {!readOnly && <AddButton icon={mdPlus} onClick={this.addAlternativeId} required={false}>\r\n {translation.add}\r\n </AddButton>}\r\n\r\n {this.state.data.map(item => <AlternativeIdItem\r\n key={item.id}\r\n data={item}\r\n formValues={formValues}\r\n validateFields={fieldIds}\r\n validation={validation}\r\n readOnly={readOnly}\r\n translation={translation}\r\n formComponent={formComponent}\r\n onRemove={this.removeAlternativeId}\r\n />)}\r\n {readOnly && this.state.data.length === 0 && <p className=\"no-content\">\r\n {translation.no_alternative_id_has_been_added}\r\n </p>}\r\n </div>\r\n </div>\r\n </div>\r\n </AdminPaperSubPanel>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/field-types';\r\nimport { parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { SimpleFormComponentProps, SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\nimport { User } from 'app/components/access-panel/shared/types';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\nimport { isVeracityEnabled } from 'app/infrastructure/hosting';\r\n\r\nexport interface DetailsProps {\r\n showPersonId: boolean;\r\n data: User;\r\n readOnly: boolean;\r\n translation: any;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n}\r\n\r\nexport const Details = (props: DetailsProps) => {\r\n const {\r\n formComponent, translation, data, readOnly, showPersonId\r\n } = props;\r\n\r\n const SimpleForm = formComponent;\r\n\r\n const readOnlyVeracity = isVeracityEnabled();\r\n\r\n return <AdminPaperTopPanel title={translation.edit_details_title}>\r\n <div className=\"row\">\r\n <div id={ids.users.name} className=\"col-lg-6 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.name}\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.name, required: !readOnly }}\r\n initialValue={data && data.name}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n readOnly={readOnly || readOnlyVeracity}\r\n />\r\n </div>\r\n\r\n <div id={ids.users.email_address} className=\"col-lg-6 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.emailAddress}\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.email }}\r\n initialValue={data && data.emailAddress}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n readOnly={readOnly || readOnlyVeracity}\r\n />\r\n </div>\r\n </div>\r\n\r\n <div className=\"row expanders-in-equal-cols\">\r\n {showPersonId && <div id={ids.users.user_id} className=\"col-sm-12 col-lg-6\">\r\n <SimpleForm\r\n name={sfNames.personId}\r\n maxLength={80}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.new_user_id, required: !readOnly }}\r\n initialValue=\"\"\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n readOnly={readOnly}\r\n />\r\n </div>}\r\n\r\n <div id={ids.users.disabled_date} className=\"col-sm-12 col-lg-6\">\r\n <SimpleForm\r\n name={sfNames.disabled}\r\n readOnly={readOnly}\r\n type={FIELD_TYPE.DATE_TIME}\r\n label={{ text: translation.disabled_date }}\r\n initialValue={data && data.disabled && parseAsDateUTC(data.disabled)}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n />\r\n </div>\r\n </div>\r\n </AdminPaperTopPanel>;\r\n};\r\n","import * as React from 'react';\r\nimport { MetroLineSectionProps } from 'app/components/metro-line/types';\r\nimport styles from './metro-line-section.scss';\r\nimport { getSectionId } from 'app/components/metro-line/helpers';\r\n\r\nexport class MetroLineSection<SectionType> extends React.PureComponent<MetroLineSectionProps<SectionType>> {\r\n public render() {\r\n const { shouldRenderSection, getRef, children, section, sectionType, hasBigStickyHeader = false } = this.props;\r\n return <div ref={getRef(sectionType)} className={shouldRenderSection(section, sectionType) ? styles.section : styles.hiddenSection}>\r\n <div id={getSectionId(sectionType)} className={hasBigStickyHeader ? styles.bigStickyHeaderAnchor : styles.anchor} />\r\n {children}\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { userOptions } from '../../endpoints';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { ApiToUse, SimpleFormComponentProps, SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { sfNames } from 'app/components/access-panel/sf-names';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { TabsPanel } from 'app/components/tabs-panel';\r\nimport styles from './panel-role-access.scss';\r\nimport { AdminPaperSubPanel } from 'app/area/administration/edit/components';\r\n\r\ninterface RoleAccessComponentProps {\r\n translation: any;\r\n initialValue: ComplexValue<number>;\r\n formValue: ComplexValue<number>;\r\n roleBasedId: number;\r\n fetchingRoleBasedData: boolean;\r\n readOnly: boolean;\r\n loadRole: (id: number) => void;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n clearValueInStore: (id: string) => void;\r\n}\r\n\r\nconst getValue = (formValue: ComplexValue<number>) => formValue && formValue.value || undefined;\r\n\r\nexport class RoleAccess extends React.PureComponent<RoleAccessComponentProps> {\r\n\r\n public componentDidMount() {\r\n const accessRole = getValue(this.props.formValue || this.props.initialValue);\r\n this.props.loadRole(accessRole);\r\n }\r\n\r\n public componentDidUpdate() {\r\n const formValue = getValue(this.props.formValue);\r\n\r\n if (!this.props.fetchingRoleBasedData && this.props.roleBasedId !== formValue) {\r\n this.props.loadRole(formValue);\r\n }\r\n }\r\n\r\n private removeAll = (e?: any) => {\r\n e && e.preventDefault();\r\n this.props.clearValueInStore(sfNames.accessRole);\r\n }\r\n\r\n public render() {\r\n const {\r\n translation,\r\n readOnly,\r\n initialValue,\r\n formValue,\r\n formComponent: SimpleForm\r\n } = this.props;\r\n\r\n return <AdminPaperSubPanel title={translation.authorisation}>\r\n {(!readOnly || (initialValue && initialValue.value) ? <div className={styles.highlightedBox}>\r\n <div className=\"row\">\r\n <div className=\"col-lg-6 col-sm-12\">\r\n <SimpleForm\r\n name={sfNames.accessRole}\r\n type={FIELD_TYPE.SELECT_SINGLE}\r\n optionsEndpoint={userOptions.role}\r\n placeholder={translation.search}\r\n apiToUse={ApiToUse.ADMINAPI}\r\n translation={translation}\r\n label={{ text: translation.access_base_on_role }}\r\n initialValue={initialValue}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n readOnly={readOnly}\r\n />\r\n </div>\r\n {!readOnly && formValue && formValue.value > 0 && <div className={`${styles.link} col-lg-6 col-sm-12`}>\r\n <a href=\"#\" className=\"standalone-link\" onClick={this.removeAll}>\r\n {translation.remove_all_role_based_access}\r\n </a>\r\n </div>}\r\n </div>\r\n </div>\r\n : (initialValue && initialValue.value ? <TabsPanel>\r\n <p className=\"no-content\">\r\n {initialValue.description}\r\n </p>\r\n </TabsPanel> : null))}\r\n </AdminPaperSubPanel>;\r\n }\r\n}\r\n","// tslint:disable max-func-body-length\r\nimport * as React from 'react';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { ExtraInfo } from 'app/components/access-panel';\r\nimport { UserTypeGroup } from './user-type-group';\r\nimport { UnitLocationLang } from './unit-location-lang';\r\nimport { Component, RefObject } from 'react';\r\nimport { withMetroLine } from 'app/components/metro-line/with-metro-line';\r\nimport { WithMetroLineProps, WithMetroLineWrappedComponentProps } from 'app/components/metro-line/types';\r\nimport { UserEditSectionType, AdministrationUserEditProps } from 'app/area/administration/edit/user/types';\r\nimport { userOptions } from '../endpoints';\r\nimport { AlternativeId } from './alternative-id/alternative-id';\r\nimport { AdminPaperSubPanel, AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\nimport { Details } from 'app/area/administration/edit/user/details';\r\nimport { Person } from 'app/components/access-panel/shared/types';\r\nimport { simpleFieldForPath } from 'app/infrastructure/simple-form';\r\nimport { AdministrationEditTranslation } from 'app/area/administration/edit/constants';\r\nimport { FormValuesType, ApiToUse } from 'app/infrastructure/simple-form/types';\r\nimport { STATE } from 'app/constants';\r\nimport { MetroLineSection } from 'app/components/metro-line/metro-line-section';\r\nimport { RoleAccess } from 'app/area/administration/edit/user/roles/panel-role-access';\r\nimport { sfNames } from 'app/components/access-panel/sf-names';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport {\r\n PanelsProps, Operation, DefaultValues, AccessToScreen, UserOccurence, ExtendedAccess,\r\n RestrictedAccess, Notifications, AccessToAssignRoles, AccessToAdministrateUserGroup\r\n} from 'app/components/access-panel';\r\n\r\ninterface UserEditFormExternalProps extends WithMetroLineProps<UserEditSectionType> {\r\n formValues: FormValuesType;\r\n role: {\r\n id: number;\r\n fetching: boolean;\r\n data?: Person;\r\n };\r\n selectedUserType: number;\r\n extraInfoPanel: boolean;\r\n alternativeIdPanel: boolean;\r\n showPersonId: boolean;\r\n translation: AdministrationEditTranslation;\r\n sectionRef?: RefObject<HTMLDivElement>;\r\n clearValidation: (formName: string, parameters?: { [key: string]: number | string }) => void;\r\n}\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.administrationEdit);\r\n\r\nexport type UserEditFormComponentProps = AdministrationUserEditProps & UserEditFormExternalProps & OptionsProps\r\n & WithMetroLineProps<UserEditSectionType> & WithMetroLineWrappedComponentProps<UserEditSectionType>;\r\n\r\nexport class UserEditFormComponent extends Component<UserEditFormComponentProps> {\r\n\r\n private isValueFieldsReadOnly = (optionsColection: ComplexValue<number>, caseType: ComplexValue<number>, userType: number) => {\r\n return !optionsColection || !caseType || !userType;\r\n };\r\n\r\n public render() {\r\n const { alternativeIdPanel, extraInfoPanel, formValues, role, rolePanelAccess, translation, accessData, personOptionsCodes,\r\n data, showPersonId, editMode, clearValidation, validation, selectedUserType, loadRole, clearValueInStore, updateAccessData,\r\n options, loadOptions,\r\n sharedState: {\r\n access: {\r\n adminPanel: {\r\n user: {\r\n administrationCentral\r\n },\r\n restrictedAccessPanel\r\n }\r\n }\r\n } } = this.props;\r\n\r\n const displayRolePanel = rolePanelAccess || (!editMode && !!data.accessRole && !!data.accessRole.value);\r\n const displayAssignRolePanel = (rolePanelAccess && administrationCentral)\r\n || (!editMode && !!data.accessToAssignRoles && data.accessToAssignRoles.length > 0);\r\n\r\n const fetchingRoleBasedData = role ? role.fetching : false;\r\n\r\n const panelProps: PanelsProps = {\r\n translation,\r\n formComponent: SimpleForm,\r\n formValues,\r\n validation,\r\n clearValueInStore,\r\n endpoints: userOptions,\r\n readOnly: !editMode,\r\n data,\r\n roleSelected: !!role && (!!role.data || role.fetching),\r\n roleBasedData: role && role.data,\r\n fetchingRoleBasedData: role ? role.fetching : false,\r\n accessData,\r\n personOptionsCodes,\r\n updateAccessData,\r\n clearValidation,\r\n options,\r\n loadOptions\r\n };\r\n\r\n return <div>\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.Details}>\r\n\r\n <Details formComponent={SimpleForm}\r\n data={data}\r\n showPersonId={showPersonId}\r\n readOnly={!editMode}\r\n translation={translation} />\r\n\r\n {extraInfoPanel && <ExtraInfo\r\n readOnly={!editMode}\r\n formComponent={SimpleForm}\r\n roleSelected={!!role && (!!role.data || role.fetching)}\r\n roleBasedData={role && role.data}\r\n fetchingRoleBasedData={fetchingRoleBasedData}\r\n endpoints={userOptions}\r\n {...this.props}\r\n />}\r\n\r\n {!!alternativeIdPanel && <AlternativeId formComponent={SimpleForm}\r\n data={data && data.alternativeIds}\r\n formValues={formValues}\r\n validation={validation && validation.alternativeIds}\r\n clearValidation={clearValidation}\r\n readOnly={!editMode}\r\n translation={translation} />}\r\n\r\n <UserTypeGroup formComponent={SimpleForm} {...this.props} />\r\n\r\n <AdminPaperSubPanel title={translation.unit_location_usergroup}>\r\n <UnitLocationLang formComponent={SimpleForm} {...this.props} />\r\n </AdminPaperSubPanel>\r\n\r\n {displayRolePanel && <RoleAccess\r\n initialValue={data && data.accessRole}\r\n formValue={formValues[sfNames.accessRole] as ComplexValue<number>}\r\n roleBasedId={role && role.id}\r\n fetchingRoleBasedData={fetchingRoleBasedData}\r\n readOnly={!editMode}\r\n translation={translation}\r\n loadRole={loadRole}\r\n formComponent={SimpleForm}\r\n clearValueInStore={clearValueInStore} />}\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.AccessToOperation}>\r\n <Operation {...panelProps} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.AccessToScreen}>\r\n <AccessToScreen {...panelProps} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.ExtendedAccess}>\r\n <ExtendedAccess {...panelProps} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.RestrictedAccess}>\r\n {restrictedAccessPanel && <RestrictedAccess {...panelProps} />}\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.AccessToAdministrateUserGroup}>\r\n <AccessToAdministrateUserGroup {...panelProps} roleSelected={false} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.AccessToAssignRoles}>\r\n {<AdminPaperTopPanel title={translation.access_to_assign_roles_title}>\r\n {displayAssignRolePanel\r\n ? <AccessToAssignRoles {...panelProps} roleSelected={false} />\r\n : <p className=\"no-content\">{translation.no_fields_available}</p>}\r\n </AdminPaperTopPanel>}\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.DefaultValues}>\r\n {<AdminPaperTopPanel title={translation.default_values}>\r\n <DefaultValues\r\n apiToUse={ApiToUse.ADMINAPI}\r\n userType={selectedUserType}\r\n isValueFieldsReadOnly={this.isValueFieldsReadOnly}\r\n isUserTypeRequired={true}\r\n {...panelProps} />\r\n </AdminPaperTopPanel>}\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.UserOccurence}>\r\n <UserOccurence {...panelProps} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<UserEditSectionType>\r\n {...this.props}\r\n sectionType={UserEditSectionType.Notifications}>\r\n <Notifications {...panelProps} roleSelected={false} />\r\n </MetroLineSection>\r\n </div>;\r\n }\r\n}\r\n\r\nexport const UserEditForm = withMetroLine<UserEditFormExternalProps, UserEditSectionType>()(UserEditFormComponent);\r\n","import { routeConstants } from 'app/routes/route-constants';\r\nimport { Configuration } from 'app/components/metro-line/types';\r\nimport { RefObject } from 'react';\r\nimport { UserEditSectionType } from 'app/area/administration/edit/user/types';\r\nimport { AdministrationEditTranslation } from 'app/area/administration/edit/constants';\r\nimport { UserEditType } from 'app/area/administration/shared/types';\r\n\r\nexport const metroLineConfiguration = (\r\n id: number,\r\n actionType: UserEditType,\r\n detailsSectionRef: RefObject<HTMLDivElement>,\r\n accessToOperationSectionRef: RefObject<HTMLDivElement>,\r\n accessToScreenSectionRef: RefObject<HTMLDivElement>,\r\n extendedAccessSectionRef: RefObject<HTMLDivElement>,\r\n restrictedAccessRef: RefObject<HTMLDivElement>,\r\n accessToAdministrateUserGroupRef: RefObject<HTMLDivElement>,\r\n accessToAssignRolesSectionRef: RefObject<HTMLDivElement>,\r\n defaultValuesSectionRef: RefObject<HTMLDivElement>,\r\n userOccurenceSectionRef: RefObject<HTMLDivElement>,\r\n notificationsRef: RefObject<HTMLDivElement>\r\n): Configuration<UserEditSectionType>[] => {\r\n\r\n const filterInvisibles = (configurationItem: Configuration<UserEditSectionType>): boolean => configurationItem.visible;\r\n\r\n return [\r\n {\r\n section: UserEditSectionType.Details,\r\n visible: true,\r\n iconUrl: '/i/case-sections/default.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.Details),\r\n label: (translation: AdministrationEditTranslation) => translation.edit_details_title,\r\n ref: detailsSectionRef\r\n },\r\n {\r\n section: UserEditSectionType.AccessToOperation,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.AccessToOperation),\r\n label: (translation: AdministrationEditTranslation) => translation.operation,\r\n ref: accessToOperationSectionRef\r\n },\r\n {\r\n section: UserEditSectionType.AccessToScreen,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.AccessToScreen),\r\n label: (translation: AdministrationEditTranslation) => translation.access_to_screen,\r\n ref: accessToScreenSectionRef\r\n },\r\n {\r\n section: UserEditSectionType.ExtendedAccess,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.ExtendedAccess),\r\n label: (translation: AdministrationEditTranslation) => translation.extended_access,\r\n ref: extendedAccessSectionRef\r\n },\r\n {\r\n section: UserEditSectionType.RestrictedAccess,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.RestrictedAccess),\r\n label: (translation: AdministrationEditTranslation) => translation.restricted_access,\r\n ref: restrictedAccessRef\r\n },\r\n {\r\n section: UserEditSectionType.AccessToAdministrateUserGroup,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.AccessToAdministrateUserGroup),\r\n label: (translation: AdministrationEditTranslation) => translation.access_to_administrate_user_group,\r\n ref: accessToAdministrateUserGroupRef\r\n },\r\n {\r\n section: UserEditSectionType.AccessToAssignRoles,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.AccessToAssignRoles),\r\n label: (translation: AdministrationEditTranslation) => translation.access_to_assign_roles_title,\r\n ref: accessToAssignRolesSectionRef\r\n },\r\n {\r\n section: UserEditSectionType.DefaultValues,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.DefaultValues),\r\n label: (translation: AdministrationEditTranslation) => translation.default_values,\r\n ref: defaultValuesSectionRef\r\n },\r\n {\r\n section: UserEditSectionType.UserOccurence,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.UserOccurence),\r\n label: (translation: AdministrationEditTranslation) => translation.user_occurrence_in_preson_field_lists,\r\n ref: userOccurenceSectionRef\r\n },\r\n {\r\n section: UserEditSectionType.Notifications,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: getScrollViewUrl(actionType, id, UserEditSectionType.Notifications),\r\n label: (translation: AdministrationEditTranslation) => translation.responsible_for_unit,\r\n ref: notificationsRef\r\n }\r\n ].filter(filterInvisibles);\r\n};\r\n\r\nconst getScrollViewUrl = (actionType: UserEditType, id: number, section: UserEditSectionType) => {\r\n return actionType && {\r\n [UserEditType.add]: routeConstants.userAddSectionFor(section),\r\n [UserEditType.edit]: routeConstants.userEditSectionFor(id, section),\r\n [UserEditType.duplicate]: routeConstants.userDuplicateSectionFor(id, section)\r\n }[actionType];\r\n};\r\n","import * as React from 'react';\r\nimport FaInfo from 'react-icons/lib/fa/info';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { createFormatters } from 'app/infrastructure/data/date';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { actionCreators } from './actions';\r\nimport { PromptConfirmation, ButtonTertiary, ButtonCallToAction } from 'ui';\r\nimport { administrationEditTranslations } from '../constants';\r\nimport { AdministrationUserEditState } from './types-store';\r\nimport { ElementLoader } from 'ui/common/element-loader/element-loader';\r\nimport { safeNumericString, safeParam } from 'app/infrastructure/data/sanitize';\r\nimport { withSimpleForm } from 'app/infrastructure/simple-form';\r\nimport get from 'lodash/get';\r\nimport { serializeAccessData } from '../serialize';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { withPrompt } from 'app/components/prompt-unsaved/prompt-unsaved';\r\nimport { UserEditMenu } from './user-edit-menu/user-edit-menu';\r\nimport { AdministrationUserEditProps, UserEditSectionType } from './types';\r\nimport { TopPanel, AdminPaper } from 'app/area/administration/edit/components';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { withOptions } from 'app/components/options-handler';\r\nimport { OverlayComponent } from 'app/components/overlay/overlay';\r\nimport { userEditFactory } from 'app/area/administration/edit/user/user-edit-factory';\r\nimport styles from 'app/area/administration/edit/edit.scss';\r\nimport { compareAccess } from 'app/area/administration/edit/compare-access';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\nimport { StickyHeader, StickyHeaderButtonContainer } from 'app/shell/components/sticky-header/sticky-header';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { UserEditForm } from 'app/area/administration/edit/user/user-edit-form';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { metroLineConfiguration } from 'app/area/administration/edit/user/configuration';\r\nimport { RefObject } from 'react';\r\nimport { hasAccess } from './has-access';\r\nimport { UserEditType } from 'app/area/administration/shared/types';\r\nimport { isVeracityEnabled } from 'app/infrastructure/hosting';\r\n\r\nexport class UserEdit extends React.Component<AdministrationUserEditProps> {\r\n public static statePath: string = STATE.administrationEdit;\r\n private formatters: any;\r\n private detailsSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private accessToOperationSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private accessToScreenSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private extendedAccessSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private restrictedAccess: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private accessToAdministrateUserGroupRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private accessToAssignRolesSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private defaultValuesSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private userOccurenceSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private notificationsRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n\r\n public constructor(props: AdministrationUserEditProps) {\r\n super(props);\r\n this.formatters = createFormatters(props.sharedState.locale);\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearAllValues();\r\n }\r\n\r\n public componentDidMount() {\r\n const { id, params: { actionType }, sharedState: { access: { adminPanel: { user } } } } = this.props;\r\n\r\n if (!this.props.sharedState.access.adminPanel || !hasAccess(user, actionType)) {\r\n navigate.toStartupView();\r\n } else {\r\n if (isDefinedIncludingZero(id)) {\r\n this.props.onLoadUser();\r\n this.props.loadUserAccess(id);\r\n }\r\n this.props.loadExtraInfo();\r\n this.props.loadPersonOptions();\r\n this.props.loadRolePanelAccess();\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: AdministrationUserEditProps) {\r\n prevProps.accessPerson !== this.props.accessPerson && this.showUserInfoNotifications();\r\n }\r\n\r\n private showUserInfoNotifications = () => {\r\n const { hideDetails, showUserEditMenu, accessPerson: { dbAccess: { add = false, edit = false } = {} } = {}, translation } = this.props;\r\n\r\n if (isVeracityEnabled()) {\r\n return;\r\n }\r\n\r\n showUserEditMenu && add && notifyUser.set({ autoClose: 8000 }).info(<><FaInfo /> {translation.database_create_user_info}</>);\r\n edit && !hideDetails && notifyUser.set({ autoClose: 8000 }).info(<><FaInfo /> {translation.database_can_not_change_user_id_info}</>);\r\n }\r\n\r\n private onCancel = () => {\r\n navigate.toAdminUsersList(false);\r\n }\r\n\r\n // tslint:disable-next-line:max-func-body-length\r\n public render(): JSX.Element {\r\n const { accessPerson, data, translation, fetchingLoadUser, fetchingSaveUser, formValues,\r\n editMode, role, validation, clearValidation, showUserEditMenu, section, id,\r\n showPersonId, hideDetails, params: { actionType } } = this.props;\r\n const { sharedState: {\r\n id: loggedUserId = undefined,\r\n access: {\r\n adminPanel: {\r\n extraInfoPanel = false,\r\n alternativeIdPanel = false,\r\n user: {\r\n create: createUserAccess = false\r\n } = {}\r\n } = {}\r\n } = {}\r\n } = {} } = this.props;\r\n\r\n const selectedUserType = get(formValues, `${sfNames.userType}.value`);\r\n const shouldRender = !fetchingLoadUser && ((!isDefinedIncludingZero(this.props.id) && !accessPerson) || (data && !!accessPerson));\r\n\r\n if (!shouldRender) {\r\n return <ElementLoader />;\r\n }\r\n\r\n const scrollViewUrl = getScrollViewUrl(actionType, id);\r\n\r\n const configuration = metroLineConfiguration(\r\n id,\r\n actionType,\r\n\r\n this.detailsSectionRef,\r\n this.accessToOperationSectionRef,\r\n this.accessToScreenSectionRef,\r\n this.extendedAccessSectionRef,\r\n this.restrictedAccess,\r\n this.accessToAdministrateUserGroupRef,\r\n this.accessToAssignRolesSectionRef,\r\n this.defaultValuesSectionRef,\r\n this.userOccurenceSectionRef,\r\n this.notificationsRef\r\n );\r\n\r\n return <div>\r\n <OverlayComponent\r\n displayOverlay={fetchingSaveUser}\r\n overlayText={translation.save_user_load_overlay_text} />\r\n {this.props.shouldDisplayModal\r\n ? <PromptConfirmation\r\n title={translation.cancel_changes}\r\n description={translation.are_you_sure}\r\n continueText={translation.undo_all}\r\n cancelText={translation.go_back}\r\n onContinue={this.props.continue}\r\n onCancel={this.props.cancel}\r\n />\r\n : ''}\r\n <AdminPaper>\r\n <StickyHeader className={`headerpanel ${styles.headerWrapper} ${styles.headerSticky} header-panel`}\r\n rightSideContent={<>\r\n <StickyHeaderButtonContainer>\r\n\r\n <ButtonTertiary onClick={this.onCancel}>{translation.cancel}</ButtonTertiary>\r\n {editMode && <ButtonCallToAction\r\n id={ids.users.save_button}\r\n onClick={this.props.onSave}\r\n disabled={fetchingSaveUser}>\r\n {this.props.saveButtonText}\r\n </ButtonCallToAction>}\r\n </StickyHeaderButtonContainer>\r\n\r\n {showUserEditMenu && <UserEditMenu\r\n id={data.id}\r\n personId={data.personId}\r\n accessPerson={accessPerson}\r\n loggedUserId={loggedUserId}\r\n translation={translation}\r\n validation={validation}\r\n clearValidation={clearValidation}\r\n canDuplicate={createUserAccess}\r\n onDelete={this.props.deleteUser}\r\n onChangePassword={this.props.changePassword}\r\n onChangePersonId={this.props.changePersonId}\r\n onSaveDatabaseAccount={this.props.saveDatabaseAccount}\r\n onResetDatabaseAccount={this.props.resetDatabaseAccount}\r\n onDeleteDatabaseAccount={this.props.deleteDatabaseAccount}\r\n fetching={this.props.fetchingLoadUser || this.props.fetchingChangePersonId || this.props.fetchingDatabaseAccount}\r\n />}\r\n </>\r\n }>\r\n <div className={styles.info}>\r\n {this.props.showUserId ? <span className={styles.id}>\r\n #{this.props.id}\r\n </span> : null}\r\n {this.props.title &&\r\n <span className={styles.title} aria-hidden={true}>\r\n {this.props.title}\r\n </span>}\r\n </div>\r\n <TopPanel\r\n hideDetails={hideDetails}\r\n data={data}\r\n translation={translation}\r\n formatters={this.formatters}\r\n />\r\n </StickyHeader>\r\n <UserEditForm\r\n {...this.props}\r\n selectedUserType={selectedUserType as unknown as number}\r\n extraInfoPanel={extraInfoPanel}\r\n alternativeIdPanel={alternativeIdPanel}\r\n showPersonId={showPersonId}\r\n role={role}\r\n label={translation.user_administration_label}\r\n initialSection={section as UserEditSectionType}\r\n configuration={configuration}\r\n scrollViewUrl={scrollViewUrl}\r\n />\r\n </AdminPaper>\r\n </div>;\r\n }\r\n}\r\n\r\nconst getScrollViewUrl = (actionType: UserEditType, id: number) => {\r\n return actionType && {\r\n [UserEditType.add]: routeConstants.userAddFor('add'),\r\n [UserEditType.edit]: routeConstants.userEditFor(id),\r\n [UserEditType.duplicate]: routeConstants.userDuplicateFor(id)\r\n }[actionType];\r\n};\r\n\r\nconst inEditMode = (data, accessPerson) => (accessPerson && accessPerson.edit) || !data;\r\n\r\nconst selectors = {\r\n id: (state: AdministrationUserEditState, props: DefaultContainerProps) => safeNumericString(props.params.id),\r\n editMode: ({ data, accessPerson }: AdministrationUserEditState, props: DefaultContainerProps) => inEditMode(data, accessPerson),\r\n shouldPrompt: ({ data, accessPerson, accessData }: AdministrationUserEditState,\r\n { serialize }: DefaultContainerProps & SimpleFormProps) =>\r\n inEditMode(data, accessPerson) && compareAccess({\r\n ...serialize(defaultSerializeMappings),\r\n ...serializeAccessData(accessData)\r\n }, data),\r\n section: (_: AdministrationUserEditState, props: DefaultContainerProps) => safeParam(props.params.section)\r\n};\r\n\r\nconst container = withSimpleForm(containerFactory(withPrompt(withOptions(userEditFactory(UserEdit))),\r\n actionCreators, selectors, administrationEditTranslations));\r\n\r\nexport { container as UserEditView };\r\n","import { UserEditType } from 'app/area/administration/shared/types';\r\nimport { AccessAdminInfoData } from 'app/types-shared';\r\n\r\nexport const hasAccess = (user: AccessAdminInfoData, actionType: UserEditType) => {\r\n return actionType && {\r\n [UserEditType.add]: !!user.create,\r\n [UserEditType.edit]: !!user.read,\r\n [UserEditType.duplicate]: !!user.create\r\n }[actionType];\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { AdministrationUserEditProps, UserDataFactoryState, UserDataFactoryProps } from './types';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { serializeAccessData } from 'app/area/administration/edit/serialize';\r\nimport { addUserValidationConfig, editUserValidationConfig } from './user-edit-configuration';\r\nimport { UserEditType } from 'app/area/administration/shared/types';\r\nimport { accessDataValidation } from 'app/area/administration/edit/access-data-validation';\r\n\r\n// tslint:disable:max-func-body-length\r\nexport const userEditFactory = (WrappedComponent:\r\n React.ComponentClass<AdministrationUserEditProps> | React.SFC<AdministrationUserEditProps>) => {\r\n return class extends React.Component<AdministrationUserEditProps, UserDataFactoryState> {\r\n public static statePath: string = STATE.administrationEdit;\r\n\r\n private addUser = () => {\r\n const { validate, serialize, addUser, validateCustomData, translation = {}, accessData } = this.props;\r\n\r\n const data = {\r\n ...serialize(defaultSerializeMappings),\r\n ...serializeAccessData(accessData)\r\n };\r\n\r\n const accessDataErrors = accessDataValidation(accessData, translation.operation_required_message);\r\n\r\n accessDataErrors\r\n ? validateCustomData(accessDataErrors)\r\n : validate(addUserValidationConfig, () => addUser(data), translation.validation_error); \r\n }\r\n\r\n private performUpdateUser = () => {\r\n const { validate, serialize, updateUser, validateCustomData, id, translation = {}, accessData } = this.props;\r\n\r\n const data = {\r\n ...serialize(defaultSerializeMappings),\r\n ...serializeAccessData(accessData)\r\n };\r\n\r\n const accessDataErrors = accessDataValidation(accessData, translation.operation_required_message);\r\n\r\n accessDataErrors\r\n ? validateCustomData(accessDataErrors)\r\n : validate(editUserValidationConfig, () => updateUser(id, data), translation.validation_error);\r\n }\r\n\r\n private duplicateUser = () => {\r\n const { validate, serialize, duplicateUser, translation = {}, accessData } = this.props;\r\n\r\n const data = {\r\n ...serialize(defaultSerializeMappings),\r\n ...serializeAccessData(accessData)\r\n };\r\n\r\n validate(addUserValidationConfig, () => duplicateUser(data), translation.validation_error);\r\n }\r\n\r\n private create = (): AdministrationUserEditProps => {\r\n const { id, loadUser, data, translation = {} } = this.props;\r\n\r\n const conf: { [key: string]: UserDataFactoryProps } = {\r\n [UserEditType.add]: {\r\n title: translation.new_user,\r\n saveButtonText: translation.add_user,\r\n showUserEditMenu: !!data,\r\n showPersonId: true,\r\n showUserId: false,\r\n onSave: this.addUser\r\n },\r\n\r\n [UserEditType.edit]: {\r\n title: data && data.personId,\r\n saveButtonText: translation.update_user,\r\n showUserEditMenu: true,\r\n showUserId: !!id || id === 0,\r\n onSave: this.performUpdateUser,\r\n onLoadUser: () => loadUser(id)\r\n },\r\n\r\n [UserEditType.duplicate]: {\r\n title: translation.duplicate_user_title,\r\n saveButtonText: translation.duplicate_user_save_text,\r\n showUserEditMenu: false,\r\n showPersonId: true,\r\n showUserId: false,\r\n hideDetails: true,\r\n onSave: this.duplicateUser,\r\n onLoadUser: () => loadUser(id, { personId: '', name: '', emailAddress: '' })\r\n }\r\n };\r\n\r\n return { ...this.props, ...conf[this.props.params.actionType] } as AdministrationUserEditProps;\r\n }\r\n\r\n public render() {\r\n return <WrappedComponent key={this.props.params.actionType} {...this.create()} />;\r\n }\r\n };\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from 'app/area/case/endpoints';\r\nimport { CaseData, HttpResponse } from 'app/types-shared';\r\n\r\nexport const api = {\r\n \r\n changeCaseType: async (\r\n draftId: number, \r\n caseTypeId: number, \r\n eTag: string) => new RemoteData(endpoint.changeCaseType(draftId, caseTypeId))\r\n .resource<HttpResponse<CaseData>>()\r\n .withIfMatch(eTag)\r\n .save()\r\n \r\n};\r\n","import * as navigate from 'app/area/shared/navigation';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport {\r\n ChangeCaseType,\r\n ChangeCaseTypeSuccess,\r\n ChangeCaseTypeFailure\r\n} from './action-types';\r\nimport { api } from './api';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { whenIdle } from 'app/infrastructure/redux';\r\nimport { Action } from 'redux';\r\n\r\nexport const actionCreators = {\r\n \r\n changeCaseType: (\r\n caseTypeId: number,\r\n draftId: number\r\n ): ActionDispatching<any, ApplicationState> =>\r\n\r\n whenIdle(async (dispatch: (action: Action) => void, getState: () => ApplicationState) => {\r\n const state = getState().caseArea;\r\n try {\r\n dispatch(new ChangeCaseType(caseTypeId, draftId));\r\n const response = await api.changeCaseType(\r\n draftId,\r\n caseTypeId,\r\n state.editing.etag\r\n );\r\n dispatch(new ChangeCaseTypeSuccess(caseTypeId, draftId, response.etag));\r\n navigate.toDraft(draftId, {});\r\n } catch (err) {\r\n dispatch(new ChangeCaseTypeFailure(caseTypeId, draftId));\r\n dispatch(new ErrorNotification(err.message));\r\n navigate.toDraft(draftId, {});\r\n }\r\n })\r\n};\r\n","\r\nimport * as React from 'react';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { STATE } from 'app/constants';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\nimport { SpinLoader } from 'app/components/spin-loader';\r\nimport { DraftProps } from 'app/area/case/draft/types';\r\n\r\n/**\r\n * Runs the action creator to change the case type then redirects to the draft\r\n *\r\n */\r\nexport interface ChangeCaseTypeComponentProps {\r\n caseTypeId: string;\r\n draftId?: string;\r\n changeCaseType: (caseTypeId: string, draftId: string) => void;\r\n}\r\nexport class ChangeCaseTypeComponent extends React.Component<ChangeCaseTypeComponentProps> {\r\n\r\n public static statePath: string = STATE.case;\r\n\r\n public componentDidMount() {\r\n const {caseTypeId, draftId, changeCaseType} = this.props;\r\n changeCaseType(caseTypeId, draftId);\r\n }\r\n\r\n public render() { return <SpinLoader />; }\r\n}\r\n\r\nconst selectors = {\r\n caseTypeId: (_, props: DraftProps) => safeNumericString(props.params.caseTypeId.split('?')[0]),\r\n draftId: (_, props: DraftProps) =>\r\n props.router.location.query && safeNumericString(props.router.location.query.draftId)\r\n};\r\n\r\nconst container = containerFactory(ChangeCaseTypeComponent, actionCreators, selectors);\r\n\r\nexport { container as ChangeCaseType };\r\n","export const reportsTranslations = {\r\n report_title: 7991,\r\n report_download_title: 7938,\r\n report_download_description: 7988,\r\n report_download_submit: 7936,\r\n report_download_cancel: 7935,\r\n report_no_data: 7992\r\n};\r\n\r\nexport const endpoint = {\r\n loadReportStatus: 'report/status',\r\n downloadReportPackage: 'report'\r\n};\r\n\r\nexport const reportStatusPollingInterval = 5000;\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from './constants';\r\nimport { ApiResponse } from 'app/types-shared';\r\n\r\nexport const api = {\r\n\r\n loadReportStatus: async (): Promise<any[]> => {\r\n const response = await new RemoteData(endpoint.loadReportStatus)\r\n .resource<ApiResponse<any[]>>()\r\n .single();\r\n return response.data;\r\n },\r\n\r\n downloadReportPackage: async (reportId: string): Promise<Blob> => {\r\n return await new RemoteData(endpoint.downloadReportPackage)\r\n .resource<Blob>()\r\n .filter({ reportFileId: reportId})\r\n .blob();\r\n }\r\n};\r\n","import { errorSafe } from 'app/infrastructure/redux/error-safe';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport * as actions from './action-types';\r\nimport { api } from './api';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages/action-types';\r\nimport { downloadFile } from 'app/infrastructure/platform/file';\r\n\r\nexport const actionCreators = {\r\n\r\n loadReportStatus: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n const myDownloadsState = getState().myDownloads;\r\n\r\n if (myDownloadsState.reportsView.fetchingReportStatus) {\r\n return;\r\n }\r\n\r\n dispatch(new actions.RequestReportStatus());\r\n try {\r\n const reportStatus = await api.loadReportStatus();\r\n dispatch(new actions.ReceiveReportStatus(reportStatus));\r\n } catch {\r\n dispatch(new actions.FailReportStatus());\r\n }\r\n }),\r\n\r\n downloadReportPackage: (reportId: any, fileExtension: string): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new actions.RequestDownloadReportPackage(reportId));\r\n try {\r\n const blob = await api.downloadReportPackage(reportId);\r\n downloadFile(blob, 'report-' + reportId + (fileExtension ? '.' + fileExtension : ''));\r\n dispatch(new actions.ReceiveDownloadReportPackage(reportId));\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new actions.FailDownloadReportPackage(reportId));\r\n }\r\n }\r\n};\r\n","import { Value } from 'app/types-shared';\r\n\r\nexport interface ReportStatus {\r\n download?: any;\r\n contentType?: string;\r\n createdDate?: string;\r\n favourite?: Value;\r\n report?: Value;\r\n reportFileId?: number;\r\n status?: Value;\r\n description?: Value;\r\n}\r\n\r\nexport interface DownloadReport {\r\n reportId: string;\r\n fetching: boolean;\r\n}\r\n\r\nexport interface ReportsViewArea {\r\n reportStatus?: ReportStatus[];\r\n download?: DownloadReport;\r\n fetchingReportStatus?: boolean;\r\n}\r\n\r\nexport interface ReportsViewState {\r\n reportsView?: ReportsViewArea;\r\n}\r\n\r\nexport enum ReportFileStatus {\r\n waiting = 1,\r\n pending = 2,\r\n finished = 3,\r\n failed = 4\r\n}\r\n","export const getFileExtension = (contentType: string) => {\r\n return {\r\n 'application/vnd.ms-excel.sheet.macroEnabled.12': 'xlsm',\r\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',\r\n 'application/zip': 'zip'\r\n }[contentType];\r\n};\r\n","import * as React from 'react';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { ReportStatus, ReportFileStatus } from './types-store';\r\nimport styles from '../my-downloads.scss';\r\nimport { PromptConfirmationModal } from 'ui/common/prompt-confirmation/prompt-confirmation-modal';\r\nimport { ElementLoader } from 'ui';\r\nimport { getFileExtension } from 'app/area/my-downloads/extensions';\r\nimport { DEFAULT_DATE_FORMAT } from 'app/infrastructure/data/date';\r\n\r\nexport interface ReportsDownloadItemProps extends ReportStatus {\r\n downloadReportPackage: (reportId: number, fileExtension: string) => void;\r\n}\r\n\r\nexport type ReportsContainerProps = ReportsDownloadItemProps & DefaultContainerProps;\r\n\r\nexport class ReportsViewItem extends React.Component<ReportsContainerProps, any> {\r\n \r\n private dateFormatter = (date: string) => {\r\n const parsedDate = new Date(date);\r\n const formattedDate = this.props.intl.formatDate(parsedDate, DEFAULT_DATE_FORMAT);\r\n const formattedTime = this.props.intl.formatTime(parsedDate);\r\n return formattedDate + ' ' + formattedTime;\r\n }\r\n\r\n private onDownload = () => {\r\n const { reportFileId, contentType } = this.props;\r\n this.props.downloadReportPackage(reportFileId, getFileExtension(contentType));\r\n }\r\n\r\n public render() {\r\n\r\n const { reportFileId, download, createdDate, status, description, contentType, translation } = this.props;\r\n const isPending = status && (status.v <= [ReportFileStatus.pending]);\r\n const fileExtension = getFileExtension(contentType);\r\n\r\n const buttonBody = <>\r\n {!!isPending && <div className={styles.progress}><div className={styles.progressBar} /></div>}\r\n\r\n <div className={styles.myDownloadsTileExtWrapper}>\r\n <div className={styles.fileExtention}>{fileExtension ? '.' + fileExtension : ''}</div>\r\n </div>\r\n <div className={styles.myDownloadsDownloadContent}>\r\n <h2 className={styles.myDownloadsDownloadItemTitle}>\r\n {description && description.d}\r\n </h2>\r\n <ul className={styles.myDownloadsDownloadMetadata}>\r\n <li>{status && status.d}</li>\r\n <li>\r\n {this.dateFormatter(createdDate).trim()}\r\n </li>\r\n </ul>\r\n </div>\r\n </>;\r\n\r\n const button = <button\r\n type=\"button\"\r\n className={styles.myDownloadsDownloadItem}>\r\n <div className={styles.downloadItemBody}>\r\n {download && reportFileId && download.reportId === reportFileId && download.fetching\r\n ? <ElementLoader /> : buttonBody}\r\n </div>\r\n </button>;\r\n\r\n return status && status.v === ReportFileStatus.finished ? <PromptConfirmationModal\r\n title={translation.report_download_title}\r\n description={translation.report_download_description}\r\n continueText={translation.report_download_submit}\r\n cancelText={translation.report_download_cancel}\r\n onContinue={this.onDownload}>\r\n {button}\r\n </PromptConfirmationModal> : button;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport styles from '../my-downloads.scss';\r\nimport { actionCreators } from './actions';\r\nimport { Timer } from 'app/components/timer/timer';\r\nimport { ElementLoader } from 'ui';\r\nimport { ReportsViewState } from 'app/area/my-downloads/reports-view/types-store';\r\nimport { ReportsViewItem } from './reports-view-item';\r\nimport { reportsTranslations } from './constants';\r\nimport { reportStatusPollingInterval } from 'app/area/my-downloads/reports-view/constants';\r\n\r\nexport type ReportsContainerProps = ReportsViewState & typeof actionCreators & DefaultContainerProps;\r\n\r\nexport class ReportsComponent extends React.Component<ReportsContainerProps, void> {\r\n public static statePath: string = STATE.myDownloads;\r\n\r\n private renderExportsList = () => {\r\n const {\r\n reportsView: {\r\n download,\r\n reportStatus\r\n }\r\n } = this.props;\r\n\r\n return [...reportStatus].map((item, index) =>\r\n <div key={index} className={styles.myDownloadsListItem}>\r\n <ReportsViewItem\r\n {...this.props}\r\n reportFileId={item.reportFileId}\r\n download={download}\r\n status={item.status}\r\n createdDate={item.createdDate}\r\n contentType={item.contentType}\r\n description={item.report} />\r\n </div>);\r\n };\r\n\r\n public render() {\r\n const {\r\n reportsView: {\r\n reportStatus\r\n },\r\n translation\r\n } = this.props;\r\n\r\n const displayReportList = reportStatus && reportStatus.length > 0\r\n ? this.renderExportsList()\r\n : (!this.props.reportsView.reportStatus\r\n ? <ElementLoader />\r\n : <div className=\"no-content\">{translation.report_no_data}</div>);\r\n\r\n return (<div className={styles.myDownloadsWrapper}>\r\n <h3 className={styles.downloadHeading}>{translation.report_title}</h3>\r\n <Timer\r\n callback={this.props.loadReportStatus}\r\n interval={reportStatusPollingInterval}>\r\n {displayReportList}\r\n </Timer>\r\n </div>);\r\n }\r\n}\r\n\r\nconst container = containerFactory(ReportsComponent, actionCreators, {}, reportsTranslations);\r\n\r\nexport { container as ReportsView };\r\n","export enum ExportFileStatus {\r\n pending = 1,\r\n completed = 2,\r\n failed = 3\r\n}\r\n","import * as React from 'react';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { ExportFileStatus } from './types';\r\nimport { ExportStatus } from './types-store';\r\nimport styles from '../../my-downloads.scss';\r\nimport { PromptConfirmationModal } from 'ui/common/prompt-confirmation/prompt-confirmation-modal';\r\nimport { ElementLoader } from 'ui';\r\nimport { getFileExtension } from 'app/area/my-downloads/extensions';\r\nimport { DEFAULT_DATE_FORMAT } from 'app/infrastructure/data/date';\r\n\r\nexport interface ExportsDownloadItemProps extends ExportStatus {\r\n downloadCaseExportPackage: (exportId: string, fileExtension: string) => void;\r\n}\r\n\r\nexport type ExportsContainerProps = ExportsDownloadItemProps & DefaultContainerProps;\r\n\r\nexport class ExportsViewItem extends React.Component<ExportsContainerProps, any> {\r\n private dateFormatter = (date: string) => {\r\n const parsedDate = new Date(date);\r\n const formattedDate = this.props.intl.formatDate(parsedDate, DEFAULT_DATE_FORMAT);\r\n const formattedTime = this.props.intl.formatTime(parsedDate);\r\n return formattedDate + ' ' + formattedTime;\r\n }\r\n\r\n private onDownload = () => {\r\n const { exportId, contentType } = this.props;\r\n this.props.downloadCaseExportPackage(exportId, getFileExtension(contentType));\r\n }\r\n\r\n public render() {\r\n const { download, exportId, status, comments, numberOfCases, exportStartedAt, contentType, translation } = this.props;\r\n const isPending = status && (status.v <= [ExportFileStatus.pending]);\r\n const fileExtension = getFileExtension(contentType);\r\n\r\n const buttonBody = <>\r\n {!!isPending && <div className={styles.progress}><div className={styles.progressBar}/></div>}\r\n\r\n <div className={styles.myDownloadsTileExtWrapper}>\r\n <div className={styles.fileExtention}>{fileExtension ? '.' + fileExtension : ''}</div>\r\n </div>\r\n <div className={styles.myDownloadsDownloadContent}>\r\n <h2 className={styles.myDownloadsDownloadItemTitle}>\r\n {comments}\r\n </h2>\r\n <ul className={styles.myDownloadsDownloadMetadata}>\r\n <li>{status.d}</li>\r\n {numberOfCases && <li>\r\n {numberOfCases + ' '}\r\n {numberOfCases > 1 ?\r\n (translation.exports_number_of_cases_multi) : (translation.exports_number_of_cases_single)}\r\n </li>}\r\n <li>\r\n {this.dateFormatter(exportStartedAt).trim()}\r\n </li>\r\n </ul>\r\n </div>\r\n </>;\r\n\r\n const button = <button\r\n type=\"button\"\r\n className={styles.myDownloadsDownloadItem}>\r\n <div className={styles.downloadItemBody}>\r\n {download && exportId && download.exportId === exportId && download.fetching\r\n ? <ElementLoader /> : buttonBody}\r\n </div>\r\n </button>;\r\n\r\n return status && status.v === ExportFileStatus.completed ? <PromptConfirmationModal\r\n title={translation.export_download_title}\r\n description={translation.export_download_description}\r\n continueText={translation.export_download_submit}\r\n cancelText={translation.export_download_cancel}\r\n onContinue={this.onDownload}>\r\n {button}\r\n </PromptConfirmationModal> : button;\r\n }\r\n}\r\n","export const exportsTranslations = {\r\n export_download_title: 7938,\r\n export_download_description: 7937,\r\n export_download_submit: 7936,\r\n export_download_cancel: 7935,\r\n export_title: 7872,\r\n export_success: 7873,\r\n exports_no_data: 7879,\r\n exports_number_of_cases_single: 7890,\r\n exports_number_of_cases_multi: 7889\r\n};\r\n\r\nexport const endpoint = {\r\n loadExportStatus: 'case/export/status',\r\n downloadCaseExportPackage: 'case/export'\r\n};\r\n\r\nexport const exportStatusPollingInterval = 5000;\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { ApiResponse } from 'app/types-shared';\r\nimport { endpoint } from './constants';\r\n\r\nexport const api = {\r\n\r\n loadExportStatus: async (): Promise<any[]> => {\r\n const response = await new RemoteData(endpoint.loadExportStatus)\r\n .resource<ApiResponse<any[]>>()\r\n .single();\r\n return response.data;\r\n },\r\n\r\n downloadCaseExportPackage: async (exportId: string): Promise<Blob> => {\r\n return await new RemoteData(endpoint.downloadCaseExportPackage)\r\n .resource<Blob>()\r\n .filter({ exportId })\r\n .blob();\r\n }\r\n};\r\n","import { errorSafe } from 'app/infrastructure/redux/error-safe';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport * as actions from './action-types';\r\nimport { api } from './api';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages/action-types';\r\nimport { downloadFile } from 'app/infrastructure/platform/file';\r\n\r\nexport const actionCreators = {\r\n\r\n loadExportStatus: (): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: () => ApplicationState) => {\r\n const myDownloadsState = getState().myDownloads;\r\n\r\n if (myDownloadsState.exportsView.fetching) {\r\n return;\r\n }\r\n\r\n dispatch(new actions.RequestExportStatus());\r\n try {\r\n const exportStatus = await api.loadExportStatus();\r\n dispatch(new actions.ReceiveExportStatus(exportStatus));\r\n } catch {\r\n dispatch(new actions.FailExportStatus());\r\n }\r\n }),\r\n\r\n downloadCaseExportPackage: (exportId: string, fileExtension: string): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new actions.RequestDownloadCaseExportPackage(exportId));\r\n try {\r\n const blob = await api.downloadCaseExportPackage(exportId);\r\n downloadFile(blob, 'export-case-package-' + exportId + (fileExtension ? '.' + fileExtension : ''));\r\n dispatch(new actions.ReceiveDownloadCaseExportPackage(exportId));\r\n } catch (err) {\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n dispatch(new actions.FailDownloadCaseExportPackage(exportId));\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { ExportsViewItem } from './exports-view-item';\r\nimport styles from '../../my-downloads.scss';\r\nimport { actionCreators } from './actions';\r\nimport { ExportsViewState } from 'app/area/my-downloads/exports/exports-view/types-store';\r\nimport { Timer } from 'app/components/timer/timer';\r\nimport { ElementLoader } from 'ui';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { STATE } from 'app/constants';\r\nimport { exportsTranslations, exportStatusPollingInterval } from './constants';\r\n\r\nexport type ExportsContainerProps = ExportsViewState & typeof actionCreators & DefaultContainerProps;\r\n\r\nexport class ExportsComponent extends React.Component<ExportsContainerProps, void> {\r\n public static statePath: string = STATE.myDownloads;\r\n\r\n private renderExportsList = () => {\r\n const {\r\n exportsView: {\r\n download,\r\n exportStatus\r\n }\r\n } = this.props;\r\n\r\n return [...exportStatus].map((item, index) =>\r\n <div key={index} className={styles.myDownloadsListItem}>\r\n <ExportsViewItem\r\n {...this.props}\r\n download={download}\r\n exportId={item.exportId}\r\n status={item.status}\r\n exportStartedAt={item.exportStartedAt}\r\n numberOfCases={item.numberOfCases}\r\n comments={item.comments}\r\n contentType={item.contentType} />\r\n </div>);\r\n };\r\n\r\n public render() {\r\n const {\r\n exportsView: {\r\n exportStatus\r\n },\r\n translation\r\n } = this.props;\r\n\r\n const displayExportList = exportStatus && exportStatus.length > 0\r\n ? this.renderExportsList()\r\n : (!this.props.exportsView.exportStatus\r\n ? <ElementLoader />\r\n : <div className=\"no-content\">{translation.exports_no_data}</div>);\r\n\r\n return (<div className={styles.myDownloadsWrapper}>\r\n <h3 className={styles.downloadHeading}>{translation.export_title} </h3>\r\n <Timer\r\n callback={this.props.loadExportStatus}\r\n interval={exportStatusPollingInterval}>\r\n {displayExportList}\r\n </Timer>\r\n </div>);\r\n }\r\n}\r\n\r\nconst container = containerFactory(ExportsComponent, actionCreators, {}, exportsTranslations);\r\n\r\nexport { container as ExportsView };\r\n","import * as React from 'react';\r\nimport styles from './my-downloads.scss';\r\nimport { ReportsView } from './reports-view/reports-view';\r\nimport { ExportsView } from './exports/exports-view/exports-view';\r\nimport { STATE } from 'app/constants';\r\nimport { myDownloadsTranslations } from 'app/area/my-downloads/constants';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\nexport class MyDownloadsComponent extends React.Component<any, void> {\r\n public static statePath: string = STATE.myDownloads;\r\n\r\n public render() {\r\n const { translation } = this.props;\r\n return (<MainGridContainer className={styles.myDownloadsView}>\r\n <div className={styles.downloadItemsWrapper}>\r\n <div className=\"page-heading\">\r\n <h1>{translation.my_downloads_title}</h1>\r\n <p>{translation.my_downloads_subtitle}</p>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"col-md-6\">\r\n <ReportsView />\r\n </div>\r\n <div className=\"col-md-6\">\r\n <ExportsView />\r\n </div>\r\n </div>\r\n </div>\r\n </MainGridContainer>);\r\n }\r\n}\r\n\r\nconst container = containerFactory(MyDownloadsComponent, {}, {}, myDownloadsTranslations);\r\n\r\nexport { container as MyDownloads };\r\n","export const myDownloadsTranslations = {\r\n my_downloads_title: 7990,\r\n my_downloads_subtitle: 7989\r\n};\r\n","import { ApiResponse } from 'app/types-shared';\r\nimport { RemoteAdminData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from '../endpoints';\r\n\r\nexport const api = {\r\n getRole: (id: number) => {\r\n return new RemoteAdminData(endpoint.role.data)\r\n .resource<ApiResponse<any>>()\r\n .withId(String(id))\r\n .single();\r\n },\r\n addRole: async (role) => {\r\n const response = await new RemoteAdminData(endpoint.role.add)\r\n .resource<any>()\r\n .create(role, false);\r\n return await response.json();\r\n },\r\n updateRole: async (id: number, role: any) => {\r\n return new RemoteAdminData(endpoint.role.edit)\r\n .resource<ApiResponse<any>>()\r\n .withId(id)\r\n .save(role);\r\n }\r\n};\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux/error-safe';\r\nimport {\r\n RequestLoadRole, ReceiveLoadRole, FailLoadRole,\r\n RequestLoadRoleAccess, ReceiveLoadRoleAccess, FailLoadRoleAccess,\r\n RequestExtraInfo, ReceiveExtraInfo, FailExtraInfo,\r\n RequestPersonOptions, ReceivePersonOptions, FailPersonOptions,\r\n RequestAddRole, ReceiveAddRole, FailRoleExecute, ProcessRoleFailed,\r\n RequestUpdateRole, ReceiveUpdateRole, RequestRoleDelete,\r\n ClearRoleData, UpdateAccessData, ClearValidation\r\n} from './action-types';\r\nimport { api } from './api';\r\nimport { editApi } from '../api';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { STATE } from 'app/constants';\r\nimport * as simpleFormActions from 'app/infrastructure/simple-form/actions';\r\nimport { administrationEditTranslations as text } from 'app/area/administration/edit/constants';\r\nimport { SuccessNotification, ErrorNotification } from 'app/infrastructure/notifications/user-messages/action-types';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { sharedApi } from 'app/area/administration/shared/api';\r\nimport { complexValidationFromServer } from 'app/infrastructure/data/validation';\r\nimport { AccessItem, AccessPanelDataValidation } from 'app/components/access-panel/shared/types';\r\nimport { isForbiddenStatus, blockAccess } from 'app/area/shared/actions-utils';\r\nimport { normalizeValidation } from 'app/components/access-panel/validation';\r\n\r\nconst simpleFormActionCreators = simpleFormActions.actionCreators(STATE.administrationRoleEdit);\r\n\r\nexport const actionCreators = {\r\n loadRole: (id: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n try {\r\n dispatch(new RequestLoadRole());\r\n\r\n const result = await api.getRole(id);\r\n\r\n dispatch(new ReceiveLoadRole(result.data));\r\n } catch (err) {\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationRoleEdit,\r\n translationId: text.no_access_to_role_administration\r\n });\r\n } else {\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n\r\n navigate.toAdminRoleList();\r\n }\r\n\r\n dispatch(new FailLoadRole());\r\n }\r\n },\r\n\r\n loadRoleAccess: (id: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n try {\r\n dispatch(new RequestLoadRoleAccess());\r\n\r\n const result = await sharedApi.roleAccess(id) as any;\r\n\r\n result && dispatch(new ReceiveLoadRoleAccess(result[0]));\r\n } catch (err) {\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationRoleEdit,\r\n translationId: text.no_access_to_role_administration\r\n });\r\n }\r\n\r\n dispatch(new FailLoadRoleAccess());\r\n\r\n }\r\n },\r\n\r\n loadExtraInfo: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new RequestExtraInfo());\r\n try {\r\n const extraInfo = await editApi.getExtraInfo();\r\n dispatch(new ReceiveExtraInfo(extraInfo.data));\r\n } catch (err) {\r\n dispatch(new FailExtraInfo());\r\n }\r\n },\r\n\r\n loadPersonOptions: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new RequestPersonOptions());\r\n try {\r\n const personOptions = await editApi.getPersonOptions();\r\n dispatch(new ReceivePersonOptions(personOptions.rootCodes));\r\n } catch (err) {\r\n dispatch(new FailPersonOptions());\r\n }\r\n },\r\n\r\n addRole: (query): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationRoleEdit.texts);\r\n\r\n try {\r\n dispatch(new RequestAddRole());\r\n const result = await api.addRole(query) as any;\r\n\r\n if (result) {\r\n dispatch(new ReceiveAddRole());\r\n dispatch(simpleFormActionCreators.resetChangesListener());\r\n dispatch(new SuccessNotification(translate(text.new_role_msg)));\r\n navigate.toAdminRoleList();\r\n }\r\n } catch (err) {\r\n dispatch(new FailRoleExecute());\r\n dispatch(new ErrorNotification(translate(text.validation_error)));\r\n dispatch(new ProcessRoleFailed(err.validationErrors\r\n ? complexValidationFromServer(normalizeValidation(err.validationErrors, query)) : []));\r\n }\r\n },\r\n\r\n updateRole: (id, query): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationRoleEdit.texts);\r\n\r\n try {\r\n dispatch(new RequestUpdateRole());\r\n const result = await api.updateRole(id, query) as any;\r\n\r\n if (result) {\r\n dispatch(new ReceiveUpdateRole());\r\n dispatch(simpleFormActionCreators.resetChangesListener());\r\n dispatch(new SuccessNotification(translate(text.role_updated)));\r\n\r\n navigate.toAdminRoleList();\r\n }\r\n } catch (err) {\r\n dispatch(new FailRoleExecute());\r\n dispatch(new ErrorNotification(translate(text.validation_error)));\r\n dispatch(new ProcessRoleFailed(err.validationErrors\r\n ? complexValidationFromServer(normalizeValidation(err.validationErrors, query)) : []));\r\n }\r\n },\r\n\r\n deleteRole: (id: number): ActionDispatching<any, any> => errorSafe(\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationRoleEdit.texts);\r\n await sharedApi.deleteRole(id);\r\n dispatch(new RequestRoleDelete());\r\n navigate.toAdminRoleList();\r\n dispatch(new SuccessNotification(translate(text.role_successfully_deleted)));\r\n }),\r\n\r\n clearValueInStore: (id: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(simpleFormActionCreators.clearValueInStore(id));\r\n }),\r\n\r\n clearAllValues: (): ActionDispatching<any, any> => async (dispatch: any, getState: any) => {\r\n dispatch(new ClearRoleData());\r\n dispatch(simpleFormActionCreators.clearAllValues());\r\n },\r\n\r\n clearValidation: (formName: string, parameters?: { [key: string]: number | string }): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new ClearValidation(formName, parameters));\r\n },\r\n\r\n updateAccessData: (key: string, accessItem: Partial<AccessItem>): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new UpdateAccessData(key, accessItem));\r\n },\r\n\r\n checkAccess: (hasAccess: boolean): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n if (!hasAccess) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationRoleEdit,\r\n translationId: text.no_access_to_role_administration\r\n });\r\n }\r\n },\r\n\r\n validateCustomData: (accessPanelDataValidation: AccessPanelDataValidation): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().administrationRoleEdit.texts);\r\n dispatch(new ErrorNotification(translate(text.validation_error)));\r\n dispatch(new ProcessRoleFailed(accessPanelDataValidation || []));\r\n dispatch(new FailRoleExecute());\r\n }\r\n};\r\n","import { SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux/types';\r\nimport { PromptProps } from 'app/components/prompt-unsaved/prompt-unsaved';\r\nimport { actionCreators } from './actions';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { AdministrationRoleEditState } from 'app/area/administration/edit/role/types-store';\r\n\r\nexport interface AdministrationRoleEditStateExternalProps {\r\n id: number;\r\n editMode: boolean;\r\n shouldDisplayModal: boolean;\r\n section: string;\r\n}\r\n\r\nexport type AdministrationRoleEditProps = AdministrationRoleEditState & AdministrationRoleEditStateExternalProps &\r\n SimpleFormProps & DefaultContainerProps & PromptProps & typeof actionCreators & OptionsProps;\r\n\r\nexport enum RoleEditSectionType {\r\n Details = 'details',\r\n AccessToOperation = 'accessToOperation',\r\n AccessToScreen = 'accessToScreen',\r\n ExtendedAccess = 'extendedAccess',\r\n RestrictedAccess = 'restrictedAccess',\r\n AccessToAdministrateUserGroup = 'accessToAdministrateUserGroup',\r\n AccessToAssignRoles = 'accessToAssignRoles',\r\n DefaultValues = 'defaultValues',\r\n UserOccurence = 'userOccurence',\r\n Notifications = 'notifications'\r\n}\r\n","import * as React from 'react';\r\nimport { MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { AccessPerson } from 'app/components/access-panel/shared/types';\r\n\r\ninterface RoleEditMenuComponentProps {\r\n id: number;\r\n accessPerson: AccessPerson;\r\n labelDelete: string;\r\n labelCancel: string;\r\n labelDescription: string;\r\n onDelete: (id: number) => void;\r\n}\r\n\r\nexport const RoleEditMenu: React.SFC<RoleEditMenuComponentProps> = (props) => {\r\n const { id, accessPerson, labelDelete, labelCancel, labelDescription, onDelete } = props;\r\n\r\n const handleDelete = onDelete ? () => onDelete(id) : undefined;\r\n\r\n const canDelete = !!(accessPerson && accessPerson.delete && handleDelete);\r\n\r\n return (canDelete && <MeatballMenu id={ids.list_search_item(id)}>\r\n {canDelete && <li>\r\n <PromptConfirmationModal\r\n title={labelDelete}\r\n description={labelDescription}\r\n continueText={labelDelete}\r\n cancelText={labelCancel}\r\n onContinue={handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">{labelDelete}</button>\r\n </PromptConfirmationModal>\r\n </li>}\r\n </MeatballMenu>);\r\n};\r\n","import * as React from 'react';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form/field-types';\r\nimport { SimpleFormComponentProps, SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { Person } from 'app/components/access-panel/shared/types';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\nimport styles from './details.scss';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\nexport interface DetailsProps {\r\n data: Person;\r\n readOnly: boolean;\r\n translation: any;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n}\r\n\r\nexport const Details = (props: DetailsProps) => {\r\n const { readOnly, data, formComponent, translation } = props;\r\n const SimpleForm = formComponent;\r\n\r\n return <AdminPaperTopPanel title={translation.edit_details_title}>\r\n <div className={styles.detailsContainer}>\r\n <div className=\"row\">\r\n <div id={ids.roles.name} className=\"col-md-12\">\r\n <SimpleForm\r\n name={sfNames.name}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.edit_role_details_role_name, required: true }}\r\n initialValue={data && data.name}\r\n readOnly={readOnly}\r\n maxLength={254}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div id={ids.roles.id} className=\"col-md-12\">\r\n <SimpleForm\r\n name={sfNames.personId}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.edit_role_details_role_id, required: true }}\r\n initialValue={data && data.personId}\r\n readOnly={readOnly}\r\n maxLength={80}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />\r\n </div>\r\n </div>\r\n </div>\r\n </AdminPaperTopPanel>;\r\n};\r\n","// tslint:disable max-func-body-length\r\nimport * as React from 'react';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { ExtraInfo } from 'app/components/access-panel';\r\nimport { Component } from 'react';\r\nimport { withMetroLine } from 'app/components/metro-line/with-metro-line';\r\nimport { WithMetroLineProps, WithMetroLineWrappedComponentProps } from 'app/components/metro-line/types';\r\nimport { simpleFieldForPath } from 'app/infrastructure/simple-form';\r\nimport { AdministrationEditTranslation } from 'app/area/administration/edit/constants';\r\nimport { STATE } from 'app/constants';\r\nimport { RoleEditSectionType, AdministrationRoleEditProps } from 'app/area/administration/edit/role/types';\r\nimport { Details } from 'app/area/administration/edit/role/details';\r\nimport { roleOptions } from '../endpoints';\r\nimport { MetroLineSection } from 'app/components/metro-line/metro-line-section';\r\nimport { ComplexValue } from 'ui/common/types';\r\nimport {\r\n PanelsProps, Operation, DefaultValues, AccessToScreen, ExtendedAccess,\r\n UserOccurence, RestrictedAccess\r\n} from 'app/components/access-panel';\r\nimport { ApiToUse } from 'app/infrastructure/simple-form/types';\r\nimport { AdminPaperTopPanel } from 'app/area/administration/edit/components';\r\n\r\ninterface RoleEditFormExternalProps extends WithMetroLineProps<RoleEditSectionType> {\r\n translation: AdministrationEditTranslation;\r\n clearValidation: (formName: string, parameters?: { [key: string]: number | string }) => void;\r\n}\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.administrationRoleEdit);\r\n\r\nexport type RoleEditFormComponentProps = AdministrationRoleEditProps & RoleEditFormExternalProps & OptionsProps\r\n & WithMetroLineProps<RoleEditSectionType> & WithMetroLineWrappedComponentProps<RoleEditSectionType>;\r\n\r\nexport class RoleEditFormComponent extends Component<RoleEditFormComponentProps> {\r\n\r\n private isValueFieldsReadOnly = (optionsColection: ComplexValue<number>, caseType: ComplexValue<number>) => {\r\n return !optionsColection || !caseType;\r\n };\r\n\r\n public render() {\r\n const { data, editMode, formValues, validation, clearValueInStore, clearValidation,\r\n accessData, updateAccessData, translation, personOptionsCodes,\r\n options, loadOptions,\r\n sharedState: {\r\n access: {\r\n adminPanel: {\r\n restrictedAccessPanel\r\n }\r\n }\r\n }\r\n } = this.props;\r\n\r\n const panelProps: PanelsProps = {\r\n readOnly: !editMode,\r\n translation,\r\n formComponent: SimpleForm,\r\n formValues,\r\n validation,\r\n clearValueInStore,\r\n endpoints: roleOptions,\r\n data,\r\n roleSelected: false,\r\n roleBasedData: undefined,\r\n fetchingRoleBasedData: false,\r\n accessData,\r\n updateAccessData,\r\n clearValidation,\r\n personOptionsCodes,\r\n options,\r\n loadOptions\r\n };\r\n\r\n return <div>\r\n <MetroLineSection<RoleEditSectionType>\r\n {...this.props}\r\n sectionType={RoleEditSectionType.Details}>\r\n <Details\r\n data={data}\r\n readOnly={!editMode}\r\n formComponent={SimpleForm}\r\n translation={translation}\r\n />\r\n <ExtraInfo\r\n readOnly={!editMode}\r\n formComponent={SimpleForm}\r\n roleSelected={false}\r\n roleBasedData={undefined}\r\n fetchingRoleBasedData={false}\r\n endpoints={roleOptions}\r\n {...this.props}\r\n />\r\n\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<RoleEditSectionType>\r\n {...this.props}\r\n sectionType={RoleEditSectionType.AccessToOperation}>\r\n <Operation {...panelProps} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<RoleEditSectionType>\r\n {...this.props}\r\n sectionType={RoleEditSectionType.DefaultValues}>\r\n {<AdminPaperTopPanel title={translation.default_values}>\r\n <DefaultValues\r\n apiToUse={ApiToUse.ADMINAPI}\r\n isValueFieldsReadOnly={this.isValueFieldsReadOnly}\r\n isUserTypeRequired={false}\r\n {...panelProps} />\r\n </AdminPaperTopPanel>}\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<RoleEditSectionType>\r\n {...this.props}\r\n sectionType={RoleEditSectionType.AccessToScreen}>\r\n <AccessToScreen {...panelProps} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<RoleEditSectionType>\r\n {...this.props}\r\n sectionType={RoleEditSectionType.ExtendedAccess}>\r\n <ExtendedAccess {...panelProps} />\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<RoleEditSectionType>\r\n {...this.props}\r\n sectionType={RoleEditSectionType.RestrictedAccess}>\r\n {restrictedAccessPanel && <RestrictedAccess {...panelProps} />}\r\n </MetroLineSection>\r\n\r\n <MetroLineSection<RoleEditSectionType>\r\n {...this.props}\r\n sectionType={RoleEditSectionType.UserOccurence}>\r\n <UserOccurence {...panelProps} />\r\n </MetroLineSection>\r\n </div>;\r\n }\r\n}\r\n\r\nexport const RoleEditForm = withMetroLine<RoleEditFormExternalProps, RoleEditSectionType>()(RoleEditFormComponent);\r\n","import { routeConstants } from 'app/routes/route-constants';\r\nimport { Configuration } from 'app/components/metro-line/types';\r\nimport { RefObject } from 'react';\r\nimport { AdministrationEditTranslation } from 'app/area/administration/edit/constants';\r\nimport { RoleEditSectionType } from 'app/area/administration/edit/role/types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport const metroLineConfiguration = (\r\n id: number,\r\n detailsSectionRef: RefObject<HTMLDivElement>,\r\n accessToOperationSectionRef: RefObject<HTMLDivElement>,\r\n defaultValuesSectionRef: RefObject<HTMLDivElement>,\r\n accessToScreenSectionRef: RefObject<HTMLDivElement>,\r\n extendedAccessSectionRef: RefObject<HTMLDivElement>,\r\n restrictedAccessRef: RefObject<HTMLDivElement>,\r\n userOccurenceSectionRef: RefObject<HTMLDivElement>\r\n ): Configuration<RoleEditSectionType>[] => {\r\n const toAddingUserUrl = (configurationItem: Configuration<RoleEditSectionType>): Configuration<RoleEditSectionType> =>\r\n !isDefinedIncludingZero(id)\r\n ? {\r\n ...configurationItem,\r\n url: routeConstants.roleAddSectionFor(configurationItem.section)\r\n }\r\n : configurationItem;\r\n\r\n const filterInvisibles = (configurationItem: Configuration<RoleEditSectionType>): boolean => configurationItem.visible;\r\n\r\n return [\r\n {\r\n section: RoleEditSectionType.Details,\r\n visible: true,\r\n iconUrl: '/i/case-sections/default.svg',\r\n url: routeConstants.roleEditSectionFor(id, RoleEditSectionType.Details),\r\n label: (translation: AdministrationEditTranslation) => translation.edit_details_title,\r\n ref: detailsSectionRef\r\n },\r\n {\r\n section: RoleEditSectionType.AccessToOperation,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.roleEditSectionFor(id, RoleEditSectionType.AccessToOperation),\r\n label: (translation: AdministrationEditTranslation) => translation.operation,\r\n ref: accessToOperationSectionRef\r\n },\r\n {\r\n section: RoleEditSectionType.DefaultValues,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.roleEditSectionFor(id, RoleEditSectionType.DefaultValues),\r\n label: (translation: AdministrationEditTranslation) => translation.default_values,\r\n ref: defaultValuesSectionRef\r\n },\r\n {\r\n section: RoleEditSectionType.AccessToScreen,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.roleEditSectionFor(id, RoleEditSectionType.AccessToScreen),\r\n label: (translation: AdministrationEditTranslation) => translation.access_to_screen,\r\n ref: accessToScreenSectionRef\r\n },\r\n {\r\n section: RoleEditSectionType.ExtendedAccess,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.roleEditSectionFor(id, RoleEditSectionType.ExtendedAccess),\r\n label: (translation: AdministrationEditTranslation) => translation.extended_access,\r\n ref: extendedAccessSectionRef\r\n },\r\n {\r\n section: RoleEditSectionType.RestrictedAccess,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.roleEditSectionFor(id, RoleEditSectionType.RestrictedAccess),\r\n label: (translation: AdministrationEditTranslation) => translation.restricted_access,\r\n ref: restrictedAccessRef\r\n },\r\n {\r\n section: RoleEditSectionType.UserOccurence,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.roleEditSectionFor(id, RoleEditSectionType.UserOccurence),\r\n label: (translation: AdministrationEditTranslation) => translation.user_occurrence_in_preson_field_lists,\r\n ref: userOccurenceSectionRef\r\n }\r\n ].filter(filterInvisibles)\r\n .map(toAddingUserUrl);\r\n};\r\n","import * as React from 'react';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport styles from './role.scss';\r\nimport { PromptConfirmation } from 'ui';\r\nimport { STATE } from 'app/constants';\r\nimport { AdministrationRoleEditState } from './types-store';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux/types';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { withSimpleForm } from 'app/infrastructure/simple-form/with-simple-form';\r\nimport { actionCreators } from './actions';\r\nimport { administrationEditTranslations } from 'app/area/administration/edit/constants';\r\nimport { ButtonTertiary } from 'ui/common/button/button-tertiary';\r\nimport { ButtonCallToAction } from 'ui/common/button/button-call-to-action';\r\nimport { SimpleFormValidationConfig } from 'app/infrastructure/simple-form/validation/types';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { serializeAccessData } from '../serialize';\r\nimport { requiredValidation } from 'app/infrastructure/simple-form/validation/rules';\r\nimport { SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { withPrompt } from 'app/components/prompt-unsaved/prompt-unsaved';\r\nimport { createFormatters } from 'app/infrastructure/data/date';\r\nimport { RoleEditMenu } from 'app/area/administration/edit/role/role-edit-menu';\r\nimport { TopPanel } from 'app/area/administration/edit/components/top-panel';\r\nimport { AdminPaper } from 'app/area/administration/edit/components/admin-paper';\r\nimport { SpinLoader } from 'app/components/spin-loader/index';\r\nimport { AdministrationRoleEditProps, RoleEditSectionType } from 'app/area/administration/edit/role/types';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { OverlayComponent } from 'app/components/overlay/overlay';\r\nimport { withOptions } from 'app/components/options-handler';\r\nimport { sfNames } from 'app/area/administration/edit/sf-names';\r\nimport { compareAccess } from 'app/area/administration/edit/compare-access';\r\nimport { StickyHeader, StickyHeaderButtonContainer } from 'app/shell/components/sticky-header/sticky-header';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { RoleEditForm } from 'app/area/administration/edit/role/role-edit-form';\r\nimport { metroLineConfiguration } from 'app/area/administration/edit/role/configuration';\r\nimport { RefObject } from 'react';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { safeParam } from 'app/infrastructure/data/sanitize';\r\nimport { accessDataValidation } from 'app/area/administration/edit/access-data-validation';\r\n\r\nexport class RoleEdit extends React.Component<AdministrationRoleEditProps> {\r\n private formatters: any;\r\n public static statePath: string = STATE.administrationRoleEdit;\r\n private detailsSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private accessToOperationSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private defaultValuesSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private accessToScreenSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private extendedAccessSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private userOccurenceSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private restrictedAccessRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n\r\n public constructor(props: AdministrationRoleEditProps) {\r\n super(props);\r\n this.formatters = createFormatters(props.sharedState.locale);\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearAllValues();\r\n }\r\n\r\n public componentDidMount() {\r\n const { params: { id }, loadRole, loadRoleAccess, loadExtraInfo, loadPersonOptions, checkAccess, sharedState } = this.props;\r\n\r\n if (!sharedState.access.adminPanel.role) {\r\n navigate.toStartupView();\r\n } else {\r\n if (isDefinedIncludingZero(id)) {\r\n loadRole(id);\r\n loadRoleAccess(id);\r\n } else {\r\n if (this.hasTextsLoaded()) {\r\n checkAccess(sharedState.access.adminPanel.role.create);\r\n }\r\n }\r\n loadExtraInfo();\r\n loadPersonOptions();\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: AdministrationRoleEditProps) {\r\n const { params: { id }, texts, checkAccess, sharedState } = this.props;\r\n\r\n if (this.hasTextsLoaded() && (prevProps.texts !== texts || !!prevProps.params && prevProps.params.id !== id)) {\r\n if (isDefinedIncludingZero(id)) {\r\n checkAccess(sharedState.access.adminPanel.role.read);\r\n } else {\r\n checkAccess(sharedState.access.adminPanel.role.create);\r\n }\r\n }\r\n }\r\n\r\n private hasTextsLoaded = () => !!this.props.texts && !!this.props.texts.texts;\r\n\r\n private validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(sfNames.personId),\r\n requiredValidation(sfNames.name)\r\n ];\r\n\r\n private addRole = () => {\r\n const { validate, serialize, addRole, validateCustomData, translation, accessData } = this.props;\r\n\r\n const data = {\r\n ...serialize(defaultSerializeMappings),\r\n ...serializeAccessData(accessData)\r\n };\r\n const accessDataErrors = accessDataValidation(accessData, translation.operation_required_message);\r\n\r\n accessDataErrors\r\n ? validateCustomData(accessDataErrors)\r\n : validate(this.validationConfig, () => addRole(data), translation.validation_error);\r\n }\r\n\r\n private performUpdateRole = () => {\r\n const { params: { id }, validate, serialize, updateRole, validateCustomData, translation, accessData } = this.props;\r\n\r\n const data = {\r\n ...serialize(defaultSerializeMappings),\r\n ...serializeAccessData(accessData)\r\n };\r\n\r\n const accessDataErrors = accessDataValidation(accessData, translation.operation_required_message);\r\n\r\n accessDataErrors\r\n ? validateCustomData(accessDataErrors)\r\n : validate(this.validationConfig, () => updateRole(id, data), translation.validation_error);\r\n }\r\n\r\n private onCancel = () => {\r\n navigate.toAdminRoleList(false);\r\n };\r\n\r\n public render() {\r\n const { fetchingLoadRole, fetchingSaveRole, data, accessPerson, editMode, translation, params: { id }, section } = this.props;\r\n\r\n const shouldRender = !fetchingLoadRole\r\n && ((!isDefinedIncludingZero(id) && !accessPerson) || (data && !!accessPerson));\r\n\r\n if (!shouldRender) {\r\n return <SpinLoader />;\r\n }\r\n\r\n const configuration = metroLineConfiguration(\r\n id,\r\n this.detailsSectionRef,\r\n this.accessToOperationSectionRef,\r\n this.defaultValuesSectionRef,\r\n this.accessToScreenSectionRef,\r\n this.extendedAccessSectionRef,\r\n this.restrictedAccessRef,\r\n this.userOccurenceSectionRef\r\n );\r\n\r\n const scrollViewUrl = isDefinedIncludingZero(id)\r\n ? routeConstants.roleEditFor(id)\r\n : routeConstants.roleAddFor();\r\n\r\n return (<div>\r\n <OverlayComponent\r\n displayOverlay={fetchingSaveRole}\r\n overlayText={translation.save_role_load_overlay_text} />\r\n {this.props.shouldDisplayModal\r\n ? <PromptConfirmation\r\n title={translation.cancel_changes}\r\n description={translation.are_you_sure}\r\n continueText={translation.undo_all}\r\n cancelText={translation.go_back}\r\n onContinue={this.props.continue}\r\n onCancel={this.props.cancel}\r\n />\r\n : ''}\r\n {<AdminPaper>\r\n <StickyHeader rightSideContent={\r\n <><StickyHeaderButtonContainer>\r\n <ButtonTertiary onClick={this.onCancel}>{translation.cancel}</ButtonTertiary>\r\n {editMode && <ButtonCallToAction\r\n id={ids.roles.save_button}\r\n onClick={!data ? this.addRole : this.performUpdateRole}\r\n disabled={fetchingSaveRole}>\r\n {!data ? translation.edit_role_save_role : translation.edit_role_update_role}\r\n </ButtonCallToAction>}\r\n </StickyHeaderButtonContainer>\r\n {!!data && <RoleEditMenu\r\n id={data.id}\r\n accessPerson={accessPerson}\r\n labelDelete={translation.delete_role}\r\n labelCancel={translation.cancel}\r\n labelDescription={translation.delete_role_desc}\r\n onDelete={this.props.deleteRole}\r\n />}</>\r\n }>\r\n <div className={styles.info}>\r\n {!!data && (!!data.id || data.id === 0) ? <span className={styles.id}>\r\n #{data.id}\r\n </span> : null}\r\n <span className={styles.title} aria-hidden={true}>\r\n {!data ? translation.new_role : data.personId}\r\n </span>\r\n </div>\r\n <TopPanel\r\n data={data}\r\n translation={translation}\r\n formatters={this.formatters} />\r\n </StickyHeader>\r\n <RoleEditForm\r\n {...this.props}\r\n configuration={configuration}\r\n scrollViewUrl={scrollViewUrl}\r\n initialSection={section as RoleEditSectionType}\r\n label={translation.role_administration_label}\r\n />\r\n </AdminPaper>}\r\n </div>);\r\n }\r\n}\r\n\r\nconst inEditMode = (data, accessPerson) => (accessPerson && accessPerson.edit) || !data;\r\n\r\nconst selectors = {\r\n editMode: ({ data, accessPerson }: AdministrationRoleEditState, props: DefaultContainerProps) => inEditMode(data, accessPerson),\r\n shouldPrompt: ({ data, accessPerson, accessData }: AdministrationRoleEditState,\r\n { serialize }: DefaultContainerProps & SimpleFormProps) =>\r\n inEditMode(data, accessPerson) && compareAccess({\r\n ...serialize(defaultSerializeMappings),\r\n ...serializeAccessData(accessData)\r\n }, data),\r\n section: (_: AdministrationRoleEditState, props: DefaultContainerProps) => safeParam(props.params.section)\r\n};\r\n\r\nconst container = withSimpleForm(containerFactory(withPrompt(withOptions(RoleEdit)),\r\n actionCreators, selectors, administrationEditTranslations));\r\n\r\nexport { container as RoleEditView };\r\n","import { Filter, CustomFilterType, FilterType } from '../filters/types';\r\nimport { endpoint } from '../endpoints';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { queryFilters, filterId, fieldType } from 'app/area/administration/list/constants';\r\n\r\nexport const roleQueryFilters = (translation, enableAlternativeId: boolean): ComplexValue<string>[] => [\r\n { value: queryFilters.name, description: translation.name },\r\n { value: queryFilters.id, description: translation.role_id },\r\n ...(enableAlternativeId ? [\r\n { value: queryFilters.alternativeId, description: translation.alternative_id },\r\n { value: queryFilters.alternativeName, description: translation.alternative_id_name }\r\n ] : [])\r\n];\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const roleFilters = (translation): Filter[] => [\r\n {\r\n id: filterId.extendedAccess,\r\n label: translation.extended_access,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.caseType,\r\n optionsParams: { includeSynergiLifeApplication: false },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.unit,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.responsibleForUnit,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.restrictedAccess,\r\n label: translation.restricted_access,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.caseType,\r\n optionsParams: { includeSynergiLifeApplication: false },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.unit,\r\n type: CustomFilterType.codeHierarchy,\r\n optionsEndpoint: endpoint.responsibleForUnit,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.accessToOperation,\r\n label: translation.access_to_operation,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.application_or_case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.roleApplication,\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.operation,\r\n type: CustomFilterType.code,\r\n optionsEndpoint: endpoint.roleAccessToOperation,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.accessToScreen,\r\n label: translation.access_to_screen,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.application,\r\n label: translation.case_type,\r\n type: CustomFilterType.codeHierarchyParents,\r\n optionsEndpoint: endpoint.caseType,\r\n optionsParams: { includeSynergiLifeApplication: false },\r\n divider: true\r\n },\r\n {\r\n fieldTypeId: fieldType.root,\r\n label: translation.screen,\r\n type: CustomFilterType.code,\r\n optionsEndpoint: endpoint.accessToScreen,\r\n optionsParams: { displayNotSelected: true }\r\n }\r\n ],\r\n type: FilterType.SELECTED_IDS\r\n },\r\n {\r\n id: filterId.roleCode,\r\n label: translation.code,\r\n fields: [\r\n {\r\n fieldTypeId: fieldType.root,\r\n type: CustomFilterType.inputFilter,\r\n includeInSummary: true\r\n }\r\n ],\r\n type: FilterType.TEXT_RANGE\r\n }\r\n];\r\n","import * as React from 'react';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { SearchTile, TileLink } from 'app/components/search-tile';\r\nimport { SearchTileProps } from '../search-container/types';\r\nimport { TileInfo } from '../search-tile';\r\nimport { PersonMeatballMenu } from 'app/area/administration/list/components/person-meatball-menu';\r\n\r\nexport const RoleTile: React.FC<SearchTileProps> = props => {\r\n\r\n const { data, itemPersonAccess, onDelete, onLoadPersonAccess, onClearPersonAccess, translation } = props;\r\n\r\n return <SearchTile\r\n footer={<TileInfo id={data.id} personId={data.personId} />}\r\n deleted={data.deleted}>\r\n <PersonMeatballMenu\r\n id={data.id}\r\n itemPersonAccess={itemPersonAccess}\r\n labelDelete={translation.delete_role}\r\n labelCancel={translation.cancel}\r\n labelDescription={translation.delete_role_desc}\r\n labelNoAccess={translation.no_access_has_been_granted}\r\n onDelete={onDelete}\r\n onLoadPersonAccess={onLoadPersonAccess}\r\n onClearPersonAccess={onClearPersonAccess} />\r\n <TileLink\r\n url={routeConstants.roleEditFor(data.id)}\r\n title={data.name} />\r\n </SearchTile>;\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\n\r\nexport const RoleToolbar: React.FC<{ translation: any }> = props =>\r\n <Link id={ids.roles.add_button} to={routeConstants.roleAdd} className=\"btn btn-primary\" >\r\n {props.translation.new_role}\r\n </Link>;\r\n","import * as React from 'react';\r\nimport { ElementLoader } from 'ui';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { withOptions } from 'app/components/options-handler/with-options';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { searchTranslations } from '../constants';\r\nimport { SearchContainer } from '../search-container';\r\nimport { actionCreators } from '../actions';\r\nimport { AdministrationSearchState, SearchArea } from '../types-store';\r\nimport { roleFilters, roleQueryFilters } from './role-filter-configuration';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { RoleTile } from 'app/area/administration/list/roles/role-tile';\r\nimport { RoleToolbar } from 'app/area/administration/list/roles/role-toolbar';\r\nimport { serialize } from 'app/area/administration/list/serialize';\r\nimport { typeMapping } from 'app/area/administration/list/filter-configuration';\r\n\r\ntype RoleSearchProps = DefaultContainerProps & AdministrationSearchState & typeof actionCreators & OptionsProps;\r\n\r\nclass RoleSearch extends React.Component<RoleSearchProps> {\r\n\r\n public static statePath: string = STATE.administrationSearch;\r\n\r\n public componentDidMount() {\r\n\r\n const { searchDefinition, updateSearchDefinition, clearQuery, clearAllFilters, setQueryValues } = this.props;\r\n\r\n if (!searchDefinition || searchDefinition.area !== SearchArea.role) {\r\n\r\n clearQuery();\r\n clearAllFilters();\r\n setQueryValues([]);\r\n updateSearchDefinition(SearchArea.role, [], [], []);\r\n }\r\n }\r\n\r\n public componentDidUpdate() {\r\n\r\n const { searchDefinition, updateSearchDefinition, setQueryValues, translation, textsFetching, sharedState } = this.props;\r\n\r\n if (sharedState && sharedState.access && sharedState.access.adminPanel\r\n && textsFetching === false && (!searchDefinition.custom || searchDefinition.custom.length === 0)) {\r\n\r\n const enableAlternativeId = !!sharedState.access.adminPanel.alternativeIdPanel;\r\n\r\n updateSearchDefinition(SearchArea.role,\r\n roleQueryFilters(translation, enableAlternativeId),\r\n undefined,\r\n roleFilters(translation));\r\n setQueryValues(roleQueryFilters(translation, enableAlternativeId));\r\n\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearList();\r\n }\r\n\r\n private onLoadData = (startIndex?: number) => {\r\n\r\n const { query, queryValues, filterValues, filterMenuValues, searchDefinition, requestedSearchModel, filterValidation } = this.props;\r\n\r\n const searchModel = serialize({\r\n query,\r\n queryValues,\r\n formValues: filterValues,\r\n menuValues: filterMenuValues,\r\n filters: searchDefinition.custom,\r\n filterValidation\r\n });\r\n\r\n if (startIndex !== undefined || !deepEquals(searchModel, requestedSearchModel)) {\r\n this.props.loadRoles(searchModel, startIndex);\r\n }\r\n }\r\n\r\n private onDelete = (id: number) => {\r\n\r\n const { deleteRole, translation } = this.props;\r\n\r\n deleteRole(id, translation.role_successfully_deleted);\r\n }\r\n\r\n public render() {\r\n\r\n const {\r\n results, translation, options, loadOptions, searchDefinition,\r\n query, queryValues, updateQuery, updateQueryValue,\r\n filterValues, filterMenuValues, filterValidation,\r\n updateFilterValues, updateFilterMenuValues, updateFilterValidation, clearAllFilters,\r\n filterOpen, openCloseFilter, loadRoleAccess, clearPersonAccess\r\n } = this.props;\r\n\r\n const { sharedState: { access: { adminPanel: { role: {\r\n create: createRoleAccess = false\r\n } = {} } = {} } = {}, locale = '' } = {} } = this.props;\r\n\r\n const roleToolbar = <RoleToolbar translation={translation} />;\r\n\r\n if (!searchDefinition || searchDefinition.area !== SearchArea.role) {\r\n return <ElementLoader />;\r\n }\r\n\r\n return <SearchContainer\r\n\r\n results={results}\r\n\r\n title={translation.role_administration}\r\n noHitLabel={translation.search_no_roles}\r\n translation={translation}\r\n locale={locale}\r\n\r\n resultTile={RoleTile}\r\n\r\n onLoadData={this.onLoadData}\r\n onLoadPersonAccess={loadRoleAccess}\r\n onClearPersonAccess={clearPersonAccess}\r\n onDelete={this.onDelete}\r\n\r\n rightToolbar={createRoleAccess && roleToolbar}\r\n\r\n querySettings={{\r\n query: query,\r\n values: queryValues,\r\n options: searchDefinition.query,\r\n\r\n onChangeQuery: updateQuery,\r\n onChangeQueryValue: updateQueryValue\r\n }}\r\n\r\n filterSettings={{\r\n filters: searchDefinition.custom,\r\n typeMappings: typeMapping,\r\n\r\n values: filterValues,\r\n onChange: updateFilterValues,\r\n\r\n menuValues: filterMenuValues,\r\n onChangeMenu: updateFilterMenuValues,\r\n\r\n filterValidation,\r\n onFilterValidationChange: updateFilterValidation,\r\n\r\n options: options,\r\n onLoadOptions: loadOptions,\r\n\r\n predefinedOptions: undefined,\r\n\r\n openFilters: filterOpen,\r\n openCloseFilter: openCloseFilter,\r\n\r\n clearAllFilters: clearAllFilters\r\n }}\r\n />;\r\n }\r\n}\r\n\r\nconst container = containerFactory(withOptions(RoleSearch), actionCreators, undefined, searchTranslations);\r\n\r\nexport { container as RoleSearchView };\r\n","export const endpoints = {\r\n metadata: (id: number) => `optionsCollection/${id}/metadata`\r\n};\r\n","import { ApiResponse } from 'app/types-shared';\r\nimport { CodetableMetadata } from './types-store';\r\nimport { RemoteAdminData } from 'app/infrastructure/remote-data';\r\nimport { endpoints } from './endpoints';\r\n\r\nexport const api = {\r\n\r\n loadMetadata: async (id: number): Promise<CodetableMetadata> => {\r\n\r\n const request = await new RemoteAdminData(endpoints.metadata(id))\r\n .resource<ApiResponse<CodetableMetadata>>()\r\n .single();\r\n\r\n return request.data;\r\n }\r\n};\r\n","export const codetableAdministrationTranslation = {\r\n\r\n // menu\r\n codetable_administration: 8268,\r\n\r\n // codetable list\r\n add_new: 6943,\r\n add_child: 6943,\r\n add_sibling: 8383,\r\n delete: 7915,\r\n loading: 4501,\r\n search_hits: 7474,\r\n search_no_hits: 8309,\r\n no_access_to_codetable_administration: 8320,\r\n no_codetable: 8381,\r\n no_code: 8382,\r\n no_category: 8404,\r\n\r\n // codetable item header\r\n update_code: 8269,\r\n add_code: 8308,\r\n cancel: 3273,\r\n delete_code_item: 8350,\r\n delete_confirm: 8351,\r\n delete_with_descendants_confirm: 8355,\r\n code_item_successfully_deleted: 8352,\r\n new_code_item: 8363,\r\n\r\n // codetable item\r\n label: 8268,\r\n cancel_changes: 7558,\r\n are_you_sure: 7460,\r\n undo_all: 5792,\r\n go_back: 7966,\r\n translations_header: 8364,\r\n copy: 7842,\r\n copy_description_to_all: 8386,\r\n copy_long_description_to_all: 8387,\r\n copied_description_to_all: 8388,\r\n copied_long_description_to_all: 8389,\r\n descriptions_and_translations: 8391,\r\n show_translations: 8393,\r\n validation_error: 8206,\r\n details: 8044,\r\n visibility: 8394,\r\n switch_to_scroll: 7977,\r\n switch_to_tab: 7978,\r\n\r\n // codetable item form\r\n code: 5483,\r\n disabled: 5251,\r\n sequence: 6825,\r\n parent_code: 8270,\r\n list_code: 8271,\r\n category: 6900,\r\n visible_for_case_types: 8396,\r\n visible_for_user_groups: 8395,\r\n visible_for_fields: 8004,\r\n description: 7278,\r\n long_description: 4326,\r\n same_for_all_languages_confirmation_box: 8290,\r\n switch_to_translated_per_language: 8291,\r\n translated_per_language_confirmation_box: 8292,\r\n switch_to_same_for_all_languages: 8293,\r\n same_for_all_languages: 8294,\r\n translated_per_language: 8295,\r\n must_be_filled_out: 5949,\r\n types: 8403,\r\n\r\n // codetable item overlay\r\n saving_code: 8272,\r\n deleting_code: 8354,\r\n updated_successfully: 8273,\r\n saved_successfully: 8356,\r\n\r\n // code picker\r\n search_required_message: 8146,\r\n no_options_found: 7644,\r\n search: 7345,\r\n done: 7338\r\n};\r\n\r\nexport type CodetableTranslation = {\r\n readonly [T in keyof typeof codetableAdministrationTranslation]: string\r\n};\r\n","import { ActionDispatching } from 'app/types-shared';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { RequestMetadata, ReceiveMetadata, FailMetadata } from './action-types';\r\nimport { api } from './api';\r\nimport { isForbiddenStatus, blockAccess, isNotAcceptable } from 'app/area/shared/actions-utils';\r\nimport { STATE } from 'app/constants';\r\nimport { codetableAdministrationTranslation as text } from './constants';\r\n\r\nexport const actionCreators = {\r\n\r\n loadMetadata: (id: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestMetadata(id));\r\n\r\n if (id as unknown as string === '') {\r\n dispatch(new FailMetadata(id));\r\n\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationCodetable,\r\n translationId: text.no_codetable\r\n });\r\n\r\n return;\r\n }\r\n\r\n try {\r\n const metadata = await api.loadMetadata(id);\r\n\r\n dispatch(new ReceiveMetadata(id, metadata));\r\n\r\n } catch (err) {\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationCodetable,\r\n translationId: text.no_access_to_codetable_administration\r\n });\r\n } else if (isNotAcceptable(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationCodetable,\r\n translationId: text.no_codetable\r\n });\r\n } else if (err && (err.userMessages || err.message)) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n }\r\n\r\n dispatch(new FailMetadata(id));\r\n }\r\n }\r\n};\r\n","import { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { safeNumericString, safeParam } from 'app/infrastructure/data/sanitize';\r\nimport { CodetableAdministrationState, CodetableMetadata } from './types-store';\r\n\r\nexport const selectors = {\r\n\r\n breadcrumbs: (_: CodetableAdministrationState, props: DefaultContainerProps) =>\r\n breadcrumbsKeys.map(key => safeNumericString(props.params[key])).filter(item => item !== ''),\r\n codeId: (_: CodetableAdministrationState, props: DefaultContainerProps) => safeNumericString(props.params.codeId),\r\n parentId: (_: CodetableAdministrationState, props: DefaultContainerProps) => safeNumericString(props.location.query ?\r\n props.location.query.parentId as string : undefined),\r\n section: (_: CodetableAdministrationState, props: DefaultContainerProps) => safeParam(props.params.section)\r\n};\r\n\r\nconst breadcrumbsKeys = ['codetableId0', 'codetableId1', 'codetableId2', 'codetableId3', 'codetableId4', 'codetableId5', 'codetableId6', 'codetableId7'];\r\n\r\nexport const getCodetableMetadata = (metadata: CodetableMetadata, codetableId: number): CodetableMetadata =>\r\n !!metadata && !!metadata.codetable && metadata.codetable.id === codetableId ? metadata : undefined;\r\n","import * as React from 'react';\r\nimport Router from 'react-router';\r\nimport { Paper } from 'ui';\r\nimport { STATE } from 'app/constants';\r\nimport { SpinLoader } from 'app/components';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { CodetableAdministrationState } from './types-store';\r\nimport { CodetableSelectorProps } from './types';\r\nimport { actionCreators } from './actions';\r\nimport { codetableAdministrationTranslation } from './constants';\r\nimport { selectors } from './selectors';\r\n\r\ntype CodetableBaseComponentProps = DefaultContainerProps & CodetableAdministrationState &\r\n CodetableSelectorProps & typeof actionCreators & { body: Router.RouteComponent };\r\n\r\nclass CodetableBaseComponent extends React.Component<CodetableBaseComponentProps> {\r\n public static statePath: string = STATE.administrationCodetable;\r\n\r\n public componentDidMount() {\r\n const { loadMetadata, breadcrumbs } = this.props;\r\n\r\n const currentCodetableId = this.getCodetableId(breadcrumbs);\r\n loadMetadata(currentCodetableId);\r\n }\r\n\r\n public componentDidUpdate(prevProps: CodetableBaseComponentProps) {\r\n\r\n const { metadata: { fetching, data }, loadMetadata, breadcrumbs } = this.props;\r\n\r\n const currentCodetableId = this.getCodetableId(breadcrumbs);\r\n const prevPropsCodetableId = this.getCodetableId(prevProps.breadcrumbs);\r\n\r\n if (currentCodetableId !== prevPropsCodetableId) {\r\n loadMetadata(currentCodetableId);\r\n return;\r\n }\r\n\r\n if (!currentCodetableId && fetching === undefined && data) {\r\n navigate.replace(routeConstants.codetableAdministrationFor(breadcrumbs));\r\n }\r\n }\r\n\r\n private getCodetableId = (breadcrumbs: number[]) => {\r\n return breadcrumbs && breadcrumbs.length > 0 ? breadcrumbs[breadcrumbs.length - 1] : undefined;\r\n }\r\n\r\n public render() {\r\n\r\n const { metadata: { fetching, data }, body, breadcrumbs } = this.props;\r\n\r\n const currentCodetableId = this.getCodetableId(breadcrumbs);\r\n\r\n if (fetching !== undefined || !body || !data || !data.codetable || data.codetable.id !== currentCodetableId) {\r\n return <SpinLoader />;\r\n }\r\n\r\n return <div className=\"entity-view\">\r\n <Paper componentId=\"code-base-paper\" className={undefined}>\r\n {body}\r\n </Paper>\r\n </div>;\r\n }\r\n}\r\n\r\nconst container = containerFactory(CodetableBaseComponent, actionCreators, selectors, codetableAdministrationTranslation);\r\n\r\nexport { container as CodetableBase };\r\n","import * as React from 'react';\r\n\r\nimport styles from './codetable-item-loader.scss';\r\n\r\nexport interface CodetableItemLoaderProps {\r\n isZebra?: boolean;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport const CodetableItemLoader: React.FC<CodetableItemLoaderProps> = ({ children, isZebra }: CodetableItemLoaderProps) =>\r\n <div className={isZebra ? styles.zebra : ''}>\r\n <div className={styles.loaderText}>{children}</div> <div className={styles.spinLoader} />\r\n </div>;\r\n","import * as React from 'react';\r\n\r\nimport styles from './codetable-item-row.scss';\r\n\r\nexport interface CodetableItemRowProps {\r\n isZebra?: boolean;\r\n treeDepthLevel?: number;\r\n isLoader?: boolean;\r\n}\r\n\r\nexport const CodetableItemRow: React.FC<CodetableItemRowProps> = ({ children, isZebra, treeDepthLevel, isLoader }) =>\r\n <div className={`${styles.codeRow} ${isZebra ? styles.zebra : ''} ${isLoader ? styles.isLoader : ''}`}\r\n style={{ paddingLeft: `calc(8px + 40px*${treeDepthLevel})` }}>\r\n {children}\r\n </div>;\r\n","import * as React from 'react';\r\nimport { Waypoint } from 'react-waypoint';\r\nimport { CodetableListItemsContainerProps } from './types';\r\n\r\nexport const CodetableListItemWaypoint = ({ parentId, onLoadMore }) =>\r\n <Waypoint key={`wpCode${parentId}`} onEnter={onLoadMore} scrollableAncestor={window} bottomOffset=\"-10%\" />;\r\n\r\nexport class CodetableListItemsContainer extends React.PureComponent<CodetableListItemsContainerProps> {\r\n\r\n public componentDidMount() {\r\n this.loadCode(false);\r\n }\r\n\r\n public componentDidUpdate() {\r\n this.loadCode(false);\r\n }\r\n\r\n private onLoadMore = () => {\r\n this.loadCode(true);\r\n }\r\n\r\n private loadCode = (appendToList: boolean) => {\r\n const { parentId, codeBranch, codeBranchState, loadFromParent } = this.props;\r\n\r\n if (!codeBranchState || !codeBranchState.open || codeBranchState.fetching) {\r\n return;\r\n }\r\n\r\n if (appendToList || codeBranchState.needsReload || !codeBranch) {\r\n\r\n const clearList = !appendToList || codeBranchState.needsReload;\r\n const startIndex = !clearList && codeBranch && codeBranch.items\r\n ? codeBranch.items.length\r\n : 0;\r\n\r\n if (startIndex > 0 && codeBranch.items.length >= codeBranch.numberOfResults) {\r\n return;\r\n }\r\n\r\n loadFromParent(parentId, startIndex);\r\n }\r\n }\r\n\r\n public render() {\r\n\r\n const { parentId, codeBranch, children } = this.props;\r\n\r\n if (!codeBranch || !codeBranch.items || !codeBranch.items.length) {\r\n return null;\r\n }\r\n\r\n return <div>\r\n {children}\r\n <CodetableListItemWaypoint parentId={parentId} onLoadMore={this.onLoadMore} />\r\n </div>;\r\n }\r\n}\r\n","import React from 'react';\r\n\r\nimport styles from './tag.scss';\r\n\r\nexport interface TagProps {\r\n children: React.ReactNode;\r\n className?: string;\r\n}\r\n\r\nexport const Tag = ({ children, className }: TagProps) => (\r\n <div className={`${styles.tag} ${className}`}>\r\n {children}\r\n </div>\r\n);\r\n","import React from 'react';\r\nimport { Tag } from 'app/components/tag';\r\n\r\nexport interface DisabledTagProps {\r\n disabled: Date;\r\n className?: string;\r\n}\r\n\r\nexport const DisabledTag = ({ disabled, className }: DisabledTagProps) =>\r\n !!disabled && disabled.getTime() <= new Date().getTime()\r\n ? <Tag className={className}>\r\n disabled\r\n </Tag>\r\n : null;\r\n","import * as React from 'react';\r\nimport { CodetableItemLinesProps, RenderLineProps } from 'app/area/codetable/list/list-items/types';\r\nimport styles from './codetable-item-lines.scss';\r\nimport { ZERO_LEVEL_PADDING, REGULAR_PADDING } from 'app/area/codetable/list/list-items/common/constants';\r\n\r\nexport const CodetableItemLines: React.FC<CodetableItemLinesProps> = (props) => {\r\n return renderLine({ ...props, maxTreeDepthLevel: props.treeDepthLevel, currentTreeDepthLevel: 0 });\r\n};\r\n\r\nconst renderLine = (props: RenderLineProps) => {\r\n const { hierarchyMetadata, maxTreeDepthLevel, currentTreeDepthLevel } = props;\r\n\r\n if (currentTreeDepthLevel <= maxTreeDepthLevel) {\r\n \r\n const codeItemHierarchyMetadata = hierarchyMetadata.find(metadata => metadata.depthLevel === currentTreeDepthLevel);\r\n\r\n const hasChildren = !!codeItemHierarchyMetadata ? codeItemHierarchyMetadata.hasChildren : undefined;\r\n\r\n const isLastChild = !!codeItemHierarchyMetadata ? codeItemHierarchyMetadata.isLastChild : undefined;\r\n\r\n const leftPosition = getLeftPosition(currentTreeDepthLevel, maxTreeDepthLevel);\r\n const shortLine = shouldRenderShortLine(currentTreeDepthLevel, maxTreeDepthLevel, isLastChild) ? styles.shortLine : '';\r\n const shouldHideLine = isLastChild && hasChildren;\r\n\r\n return <div className={`${styles.line} ${shortLine} ${shouldHideLine ? styles.hiddenLine : ''}`}\r\n style={{ left: `${leftPosition}px` }}>\r\n {shouldRenderHorizontalLine(currentTreeDepthLevel, maxTreeDepthLevel) &&\r\n <div className={styles.horizontalLine} style={{ bottom: '0px' }} />}\r\n {renderLine({ currentTreeDepthLevel: currentTreeDepthLevel + 1, maxTreeDepthLevel, hierarchyMetadata })}\r\n </div>;\r\n } else {\r\n return <div />;\r\n }\r\n};\r\n\r\nconst shouldRenderShortLine = (treeDepthLevel?: number, maxTreeDepthLevel?: number, isLastChild?: boolean) => {\r\n return isLastChild && shouldRenderHorizontalLine(treeDepthLevel, maxTreeDepthLevel);\r\n};\r\n\r\nconst shouldRenderHorizontalLine = (treeDepthLevel?: number, maxTreeDepthLevel?: number): boolean => {\r\n return treeDepthLevel === maxTreeDepthLevel && treeDepthLevel !== 0;\r\n};\r\n\r\nconst getLeftPosition = (treeDepthLevel?: number, maxTreeDepthLevel?: number) => {\r\n if (treeDepthLevel === 0) {\r\n return ZERO_LEVEL_PADDING;\r\n }\r\n\r\n return REGULAR_PADDING;\r\n};\r\n","export const ZERO_LEVEL_PADDING = 27;\r\nexport const REGULAR_PADDING = 38;\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport FaSitemap from 'react-icons/lib/fa/sitemap';\r\nimport { CodetableItemContentProps } from 'app/area/codetable/list/list-items/types';\r\nimport { CodetableItemLoader } from 'app/area/codetable/list/list-items/common';\r\nimport { DisabledTag } from 'app/area/codetable/common/disabled-tag/disabled-tag';\r\nimport styles from './codetable-item-content.scss';\r\nimport { CodetableItemLines } from 'app/area/codetable/list/list-items/common/codetable-item-lines';\r\n\r\nexport const CodetableItemContent = ({ codeItem, isHierarchyMode, hierarchyMetadata, codetableId,\r\n refetching, treeDepthLevel, isLastChild, hasChildren, breadcrumbs }: Partial<CodetableItemContentProps>) => {\r\n\r\n const contentClass = !isHierarchyMode ? styles.content : styles.hierarchyContent;\r\n\r\n return (\r\n <Link\r\n to={routeConstants.codetableAdministrationCodeFor(breadcrumbs, codeItem.id)}\r\n className={styles.container}>\r\n {\r\n isHierarchyMode\r\n ? <CodetableItemLines\r\n treeDepthLevel={treeDepthLevel}\r\n codeItem={codeItem}\r\n hierarchyMetadata={hierarchyMetadata}\r\n />\r\n : null\r\n }\r\n\r\n <div className={contentClass}>\r\n <div className={styles.leftSide}>\r\n <span>\r\n {codeItem.description}\r\n {!!codeItem.childrenCount && isHierarchyMode &&\r\n <span className={styles.childrenCount}>\r\n <FaSitemap /> {codeItem.childrenCount}\r\n </span>\r\n }\r\n </span>\r\n {refetching && <CodetableItemLoader />}\r\n </div>\r\n <div className={styles.rightSide}>\r\n <DisabledTag disabled={codeItem.disabled} className={styles.disabledTag} />\r\n </div>\r\n </div>\r\n </Link>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport FaAngleDown from 'react-icons/lib/fa/angle-down';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { CodetableItemRow } from './common';\r\nimport { CodetableItemProps } from './types';\r\n\r\nimport styles from './codetable-item.scss';\r\nimport { CodetableItemContent } from 'app/area/codetable/list/list-items/codetable-item-content';\r\n\r\nexport class CodetableItem extends React.PureComponent<CodetableItemProps> {\r\n\r\n private deleteCodeItem = () => {\r\n const { codetableId, codeItem, translation } = this.props;\r\n\r\n this.props.deleteCodeItem(codetableId, codeItem.id, translation.code_item_successfully_deleted);\r\n }\r\n\r\n private onExpand = (event: React.MouseEvent) => {\r\n const { codeItem, expandCodeItem } = this.props;\r\n\r\n expandCodeItem(codeItem.id);\r\n }\r\n\r\n public render() {\r\n\r\n const { isZebra, codetableId, refetching, open, isHierarchyMode, isHierarchy, hierarchyMetadata, breadcrumbs,\r\n codeItem, translation, deletingCodeItem, treeDepthLevel, parentId } = this.props;\r\n\r\n const description = !!codeItem && !!codeItem.childrenCount\r\n ? translation.delete_with_descendants_confirm.replace('<DESCENDANTS>', String(codeItem.childrenCount))\r\n : translation.delete_confirm;\r\n\r\n const shouldShowZebra = !(deletingCodeItem || codeItem.deletingCodeItem) && isZebra;\r\n\r\n const codeItemHierarchyMetadata = hierarchyMetadata.find(metadata => metadata.depthLevel === treeDepthLevel);\r\n\r\n const hasChildren = !!codeItemHierarchyMetadata ? codeItemHierarchyMetadata.hasChildren : undefined;\r\n\r\n const isLastChild = !!codeItemHierarchyMetadata ? codeItemHierarchyMetadata.isLastChild : undefined;\r\n\r\n return <CodetableItemRow\r\n isZebra={shouldShowZebra}\r\n treeDepthLevel={treeDepthLevel}\r\n >\r\n {\r\n isHierarchyMode\r\n ? <div className={styles.expanderButtonContainer}>\r\n <button type=\"button\" className={`${isZebra ? styles.zebra : ''} ${styles.expanderButton} ${open ? styles.open : ''} ${!hasChildren ? styles.hidden : ''} `}\r\n onClick={this.onExpand}>\r\n <FaAngleDown />\r\n </button>\r\n </div>\r\n : null\r\n }\r\n <CodetableItemContent\r\n breadcrumbs={breadcrumbs}\r\n codeItem={codeItem}\r\n isHierarchyMode={isHierarchyMode}\r\n refetching={refetching}\r\n codetableId={codetableId}\r\n treeDepthLevel={treeDepthLevel}\r\n hierarchyMetadata={hierarchyMetadata}\r\n isLastChild={isLastChild}\r\n hasChildren={hasChildren}\r\n />\r\n {codeItem.id !== 0 && <div className={styles.meatballContainer}>\r\n <MeatballMenu className={styles.meatball}>\r\n {isHierarchy && <li>\r\n <Link to={routeConstants.codetableAdministrationAddCodeFor(breadcrumbs, codeItem.id)}\r\n className=\"dropdown-item\">\r\n {!!translation && translation.add_child}\r\n </Link>\r\n </li>}\r\n {isHierarchy && <li>\r\n <Link to={routeConstants.codetableAdministrationAddCodeFor(breadcrumbs, parentId)}\r\n className=\"dropdown-item\">\r\n {!!translation && translation.add_sibling}\r\n </Link>\r\n </li>}\r\n <li>\r\n <PromptConfirmationModal\r\n title={translation.delete_code_item}\r\n description={description}\r\n continueText={translation.delete_code_item}\r\n cancelText={translation.cancel}\r\n onContinue={this.deleteCodeItem}>\r\n <button type=\"button\" className=\"dropdown-item\">\r\n {!!translation && translation.delete}\r\n </button>\r\n </PromptConfirmationModal>\r\n </li>\r\n </MeatballMenu>\r\n </div>}\r\n </CodetableItemRow>;\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { CodetableListItemsProps, HierarchyMetadata } from './types';\r\nimport { CodetableItemLoader, CodetableItemRow } from './common';\r\nimport { CodetableListItemsContainer } from './codetable-list-items-container';\r\nimport { CodetableItem } from './codetable-item';\r\nimport styles from './codetable-list-items.scss';\r\n\r\nexport class CodetableListItems extends Component<CodetableListItemsProps> {\r\n\r\n public render() {\r\n\r\n const { codetableId, parentId, codeListBranch, codeListBranchState, codeId, isZebra, isHierarchyMode, isHierarchy, breadcrumbs,\r\n deletingCodeItem, loadFromParent, expandCodeItem, deleteCodeItem, translation, treeDepthLevel, hierarchyMetadata } = this.props;\r\n\r\n const currentBranch = codeListBranch.find(item => item.id === parentId);\r\n const currentCodeItem = currentBranch && currentBranch.items || [];\r\n\r\n const currentBranchState = codeListBranchState && codeListBranchState.find(state => state.id === parentId);\r\n const fetching = !!currentBranchState && !!currentBranchState.fetching;\r\n const needsReload = !!currentBranchState && !!currentBranchState.needsReload;\r\n\r\n return <>\r\n <CodetableListItemsContainer\r\n parentId={parentId}\r\n codeBranch={currentBranch}\r\n codeBranchState={currentBranchState}\r\n loadFromParent={loadFromParent}>\r\n\r\n {currentCodeItem.map((codeItem, index) => {\r\n\r\n const codeItemState = codeListBranchState && codeListBranchState.find(state => state.id === codeItem.id);\r\n const open = !!codeItemState && !!codeItemState.open;\r\n\r\n const showSpinner = !!codeItemState && codeItemState.isUpdatingParent && codeItemState.id === codeItem.id;\r\n\r\n const isZebraValue = isZebra === undefined ? index % 2 === 0 : isZebra;\r\n\r\n const isLastChild = !!currentCodeItem && currentCodeItem.length === index + 1;\r\n\r\n const hasChildren = isHierarchyMode && !!codeItem.childrenCount;\r\n\r\n const hierarchyMetadataUpdated: HierarchyMetadata[] = [...hierarchyMetadata, {\r\n depthLevel: treeDepthLevel,\r\n hasChildren,\r\n isLastChild\r\n }];\r\n\r\n return <div key={codeItem.id} className={codeItem.deletingCodeItem ? styles.deleting : ''}>\r\n <CodetableItem\r\n breadcrumbs={breadcrumbs}\r\n isZebra={isZebraValue}\r\n hierarchyMetadata={hierarchyMetadataUpdated}\r\n treeDepthLevel={treeDepthLevel}\r\n codetableId={codetableId}\r\n codeId={codeId}\r\n refetching={fetching && needsReload || showSpinner}\r\n isHierarchyMode={isHierarchyMode}\r\n isHierarchy={isHierarchy}\r\n open={open}\r\n parentId={parentId}\r\n codeItem={codeItem}\r\n expandCodeItem={expandCodeItem}\r\n deleteCodeItem={deleteCodeItem}\r\n deletingCodeItem={deletingCodeItem || codeItem.deletingCodeItem}\r\n translation={translation}\r\n isLastChild={!open && isLastChild}\r\n />\r\n {open && <div>\r\n <CodetableListItems\r\n {...this.props}\r\n hierarchyMetadata={hierarchyMetadataUpdated}\r\n deletingCodeItem={codeItem.deletingCodeItem || deletingCodeItem}\r\n parentId={codeItem.id}\r\n treeDepthLevel={treeDepthLevel + 1}\r\n isZebra={isZebraValue}\r\n />\r\n </div>}\r\n </div>;\r\n })}\r\n </CodetableListItemsContainer>\r\n {fetching && !needsReload && <CodetableItemRow isZebra={isZebra} isLoader>\r\n <CodetableItemLoader>\r\n {translation.loading}\r\n </CodetableItemLoader>\r\n </CodetableItemRow>}\r\n </>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { Link } from 'react-router';\r\nimport { Search } from 'ui';\r\nimport { CodetableTranslation } from '../../constants';\r\n\r\nimport styles from './codetable-search.scss';\r\n\r\ninterface CodetableSearchProps {\r\n createUrl: string;\r\n query: string;\r\n translation: CodetableTranslation;\r\n updateQuery: (value: string) => void;\r\n}\r\n\r\nexport const CodetableSearch = (props: CodetableSearchProps) => {\r\n\r\n const { query, updateQuery, createUrl, translation } = props;\r\n\r\n const onSearch = () => updateQuery(query);\r\n\r\n return <div className={`row ${styles.searchSection}`}>\r\n <div className=\"col-lg-9 col-md-12\">\r\n <Search\r\n className={`${styles.searchField} input-wrapper`}\r\n componentId={'codetable-search'}\r\n onChange={updateQuery}\r\n value={query}\r\n minLength={1}\r\n maxLength={255}\r\n onSearch={onSearch}\r\n placeholder={translation.search}\r\n focus={true} />\r\n </div>\r\n <div className=\"col-lg-3 col-md-12\">\r\n <div className={styles.searchToolbar}>\r\n <Link\r\n id={'codetable-list-link-create-button'}\r\n to={createUrl}\r\n className=\"btn btn-primary\">\r\n {translation.add_new}\r\n </Link>\r\n </div>\r\n </div>\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { CodetableMetadata } from '../../types-store';\r\nimport { CodeSinglePicker } from '../../common';\r\nimport { CodetableTranslation } from '../../constants';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\ninterface CodeCategoryProps {\r\n category: ComplexValue<number>;\r\n metadata: CodetableMetadata;\r\n onChange: (value: ComplexValue<number>) => void;\r\n translation: CodetableTranslation;\r\n\r\n options: {\r\n [key: string]: {\r\n fetching: boolean;\r\n codes: ComplexValue<number>[];\r\n }\r\n };\r\n loadOptions: (id: string,\r\n codetableId: number,\r\n loadOptionsParams: LoadOptions) => void;\r\n}\r\n\r\nexport const CodeCategory = (props: CodeCategoryProps) => {\r\n\r\n const { metadata, category, onChange, options, loadOptions, translation } = props;\r\n\r\n if (!metadata || !metadata.codetableCategory || !isDefinedIncludingZero(metadata.codetableCategory.id) || !metadata.features.category) {\r\n return null;\r\n }\r\n\r\n const codeOptions = (options && options.category && options.category.codes || []) as ComplexValue<number>[];\r\n\r\n const onLoadOptions = (id: string, loadOptionsParams: LoadOptions) => {\r\n loadOptions(id, metadata.codetableCategory.id, loadOptionsParams);\r\n };\r\n\r\n return <CodeSinglePicker\r\n id=\"category\"\r\n label={translation.category}\r\n valueItem={category}\r\n\r\n options={codeOptions}\r\n fetchingOptions={options && options.category && options.category.fetching}\r\n\r\n translation={translation}\r\n\r\n onLoadOptions={onLoadOptions}\r\n onChange={onChange}\r\n searchRequired={metadata.codetableCategory.searchRequired}\r\n />;\r\n};\r\n","import * as React from 'react';\r\nimport { CodeListBranch } from '../types-store';\r\nimport { CodetableTranslation } from '../../constants';\r\n\r\nimport styles from './number-of-results.scss';\r\n\r\ninterface NumberOfResultsProps {\r\n rootBranch: CodeListBranch;\r\n translation: CodetableTranslation;\r\n}\r\n\r\nexport const NumberOfResults: React.FC<NumberOfResultsProps> = ({ rootBranch, translation }) => {\r\n\r\n if (!rootBranch || !rootBranch.items) {\r\n return null;\r\n }\r\n\r\n return <p className={styles.searchHits} id=\"code_number_of_results\">\r\n {rootBranch.numberOfResults === 0\r\n ? translation.search_no_hits\r\n : `${rootBranch.numberOfResults} ${translation.search_hits}`}\r\n </p>;\r\n};\r\n","import { CodeListItemWire } from '../../common';\r\nimport { CodeListItem } from '../types-store';\r\nimport { parseAsDateUTC } from 'app/infrastructure/data/date';\r\n\r\nexport const mapListToStore = (codeItems: CodeListItemWire[]): CodeListItem[] => {\r\n\r\n return codeItems && codeItems\r\n .map(item => ({\r\n\r\n id: item.code && item.code.v,\r\n description: item.code && item.code.d,\r\n disabled: parseAsDateUTC(item.disabled),\r\n\r\n userGroups: [],\r\n excludedFields: [],\r\n caseTypes: [],\r\n\r\n childrenCount: item.descendantCount || 0,\r\n deletingCodeItem: false\r\n })) || [] as CodeListItem[];\r\n};\r\n","import { ApiResponse } from 'app/types-shared';\r\nimport { RemoteData, RemoteAdminData } from 'app/infrastructure/remote-data';\r\nimport { CodetableWireFormat } from 'app/infrastructure/ui/form/types-codetable';\r\n\r\ntype CodeWireFormat = {\r\n rootCodes: CodetableWireFormat[]\r\n};\r\n\r\nexport const endpoint = {\r\n caseTypes: 'case/options/casetypes/editable',\r\n connectedCaseTypes: (draftId) => `case/draft/${draftId}/options/casetypes/editable`,\r\n changeCaseTypes: (draftId, casetypeId) => `case/draft/${draftId}/casetype/${casetypeId}`,\r\n codetableAdministrationList: 'optionsCollection/hierarchy',\r\n dashboards: 'dashboard',\r\n companyReports: 'report/specialReportTypes',\r\n savedReports: 'user/current/options/savedFavourites'\r\n};\r\n\r\nexport const api = {\r\n caseTypes: async (): Promise<CodetableWireFormat[]> => {\r\n const response = await new RemoteData(endpoint.caseTypes)\r\n .resource<ApiResponse<CodetableWireFormat[]>>()\r\n .all();\r\n\r\n return response.data;\r\n },\r\n\r\n connectedCaseTypes: async (draftId, connectionTypeId): Promise<CodetableWireFormat[]> => {\r\n const response = await new RemoteData(endpoint.connectedCaseTypes(draftId))\r\n .resource<ApiResponse<CodetableWireFormat[]>>()\r\n .filter({ connectionTypeId })\r\n .all();\r\n\r\n return response.data;\r\n },\r\n\r\n dashboards: async (): Promise<CodeWireFormat> => {\r\n const response = await new RemoteData(endpoint.dashboards)\r\n .resource<ApiResponse<CodeWireFormat>>()\r\n .all();\r\n\r\n return response.data;\r\n },\r\n\r\n savedReports: async (): Promise<CodeWireFormat> => {\r\n const response = await new RemoteData(endpoint.savedReports)\r\n .resource<ApiResponse<CodeWireFormat>>()\r\n .all();\r\n\r\n return response.data;\r\n },\r\n\r\n companyReports: async (): Promise<CodeWireFormat> => {\r\n const response = await new RemoteData(endpoint.companyReports)\r\n .resource<ApiResponse<CodeWireFormat>>()\r\n .all();\r\n\r\n return response.data;\r\n },\r\n\r\n codetableAdministrationList: async (): Promise<CodeWireFormat> => {\r\n const response = await new RemoteAdminData(endpoint.codetableAdministrationList)\r\n .resource<ApiResponse<CodeWireFormat>>()\r\n .all();\r\n\r\n return response.data;\r\n }\r\n};\r\n","import { ActionDispatching, ComplexValue } from 'app/types-shared';\r\nimport { ErrorNotification, SuccessNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { mapListToStore } from './mapping/map-list-to-store';\r\nimport {\r\n RequestCodeItems, ReceiveCodeItems, FailCodeItems,\r\n ExpandCodeItem, InvalidateCodeItems,\r\n UpdateCategory, UpdateQuery, FailCodetableAdministrationList, RequestCodetableAdministrationList, ReceiveCodetableAdministrationList\r\n} from './action-types';\r\nimport { api } from '../common';\r\nimport { defaultMaxResults } from './constants';\r\nimport { isForbiddenStatus, blockAccess } from 'app/area/shared/actions-utils';\r\nimport { STATE } from 'app/constants';\r\nimport { codetableAdministrationTranslation as text } from '../constants';\r\nimport { codetableOptionsActionCreators } from '../common';\r\nimport { RequestCodeItemDelete, ReceiveCodeItemDelete, FailCodeItemDelete } from 'app/area/codetable/common/action-types';\r\nimport { api as commonApi } from 'app/area/codetable/common/api';\r\nimport { api as codeSelectorApi } from 'app/area/code-selector/api.ts';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\n\r\nexport const actionCreators = {\r\n\r\n ...codetableOptionsActionCreators,\r\n\r\n loadCodetableAdministrationList: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodetableAdministrationList());\r\n\r\n try {\r\n const codetables = await codeSelectorApi.codetableAdministrationList();\r\n\r\n const codeItems = codetables.rootCodes ? codetables.rootCodes.map(codeItemToStoreValue) : [];\r\n\r\n dispatch(new ReceiveCodetableAdministrationList(codeItems));\r\n } catch (err) {\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationCodetable,\r\n translationId: text.no_access_to_codetable_administration\r\n });\r\n } else if (err && (err.userMessages || err.message)) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n }\r\n\r\n dispatch(new FailCodetableAdministrationList());\r\n }\r\n },\r\n\r\n loadCodeItems: (codetableId: number, parentId: number, categoryId: number,\r\n query: string = '', startIndex: number = 0, maxResults: number = defaultMaxResults):\r\n ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestCodeItems(codetableId, parentId, categoryId, query));\r\n\r\n try {\r\n\r\n const codeItemsResponse = await api.loadCodeItems({\r\n id: codetableId,\r\n parentId,\r\n categoryId,\r\n query,\r\n startIndex,\r\n maxResults,\r\n displayNotSelected: true\r\n });\r\n\r\n const codeItems = mapListToStore(codeItemsResponse.results);\r\n\r\n const numberOfResults = codeItemsResponse.totalNumberOfResults;\r\n const clearList = startIndex === 0;\r\n\r\n dispatch(new ReceiveCodeItems(codetableId, parentId, categoryId, query, codeItems, numberOfResults, clearList));\r\n\r\n } catch (err) {\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationCodetable,\r\n translationId: text.no_access_to_codetable_administration\r\n });\r\n } else if (err && (err.userMessages || err.message)) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n }\r\n\r\n dispatch(new FailCodeItems(codetableId, parentId, categoryId, query));\r\n }\r\n },\r\n\r\n deleteCodeItem: (codetableId: number, codeId: number, successMessage: string): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodeItemDelete(codetableId, codeId));\r\n try {\r\n await commonApi.deleteCodeItem(codetableId, codeId);\r\n\r\n dispatch(new ReceiveCodeItemDelete(codeId));\r\n dispatch(new SuccessNotification(successMessage));\r\n } catch (err) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailCodeItemDelete(codeId));\r\n }\r\n },\r\n\r\n expandCodeItem: (parentId: number): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n\r\n dispatch(new ExpandCodeItem(parentId));\r\n },\r\n\r\n invalidateCodeItems: (): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n\r\n dispatch(new InvalidateCodeItems());\r\n },\r\n\r\n updateCaseCategory: (value: ComplexValue<number>): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n\r\n dispatch(new UpdateCategory(value));\r\n },\r\n\r\n updateQuery: (value: string): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n\r\n dispatch(new UpdateQuery(value));\r\n }\r\n};\r\n","export const defaultMaxResults = 50;\r\n","import { ComplexValue } from 'ui';\r\nimport { findNestedSelectOption } from 'app/components/code-selector/fullscreen-code-selector';\r\n\r\nexport const buildBreadcrumbs = (codeItems: ComplexValue<number>[], rawBreadcrumbs: number[]): ComplexValue<number>[] => {\r\n if (!rawBreadcrumbs || rawBreadcrumbs.length === 0) {\r\n return [];\r\n }\r\n\r\n const resultBreadcrumbs = rawBreadcrumbs\r\n .filter(item => findNestedSelectOption({ value: 0, descendants: codeItems }, item) !== null)\r\n .reduce((breadcrumbs, _, index, filteredRawBreadcrumbs) => {\r\n const breadcrumbItemPath = findNestedSelectOption(breadcrumbs[index], filteredRawBreadcrumbs[index]);\r\n\r\n const breadcrumbItem = breadcrumbItemPath && breadcrumbItemPath.length > 0 ?\r\n breadcrumbItemPath[breadcrumbItemPath.length - 1] : undefined;\r\n\r\n return [...breadcrumbs, breadcrumbItem].filter(item => item);\r\n }, [{ value: 0, descendants: codeItems }]);\r\n\r\n return resultBreadcrumbs ? resultBreadcrumbs.splice(1, resultBreadcrumbs.length) : [];\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { SpinLoader } from 'app/components';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { CodetableAdministrationState, CodetableMetadata } from '../types-store';\r\nimport { CodetableSelectorProps } from '../types';\r\nimport { codetableAdministrationTranslation } from '../constants';\r\nimport { selectors, getCodetableMetadata } from '../selectors';\r\nimport { CodetableListItems } from './list-items';\r\nimport { CodetableSearch, CodeCategory, NumberOfResults } from './search';\r\nimport { actionCreators } from './actions';\r\n\r\nimport styles from './codetable-list.scss';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { Breadcrumb } from 'ui/common/breadcrumb';\r\nimport { BreadcrumbValue } from 'ui/common/breadcrumb/breadcrumb-item';\r\nimport { CodetableItemLoader } from 'app/area/codetable/list/list-items/common';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\nimport { buildBreadcrumbs } from 'app/area/codetable/list/action-helpers';\r\n\r\nexport type CodetableListComponentProps = DefaultContainerProps & CodetableAdministrationState &\r\n CodetableSelectorProps & typeof actionCreators;\r\n\r\nexport interface CodetableListState {\r\n breadcrumbs: ComplexValue<number>[];\r\n}\r\n\r\nclass CodetableListComponent extends React.PureComponent<CodetableListComponentProps, CodetableListState> {\r\n public static statePath: string = STATE.administrationCodetable;\r\n\r\n public state: CodetableListState = {\r\n breadcrumbs: []\r\n };\r\n\r\n public componentDidMount() {\r\n this.loadNewState(true);\r\n }\r\n\r\n public componentDidUpdate(prevProps: CodetableListComponentProps) {\r\n this.loadNewState(false, prevProps);\r\n }\r\n\r\n private getCodetableId = () => {\r\n const { breadcrumbs } = this.props;\r\n return breadcrumbs && breadcrumbs.length > 0 ? breadcrumbs[breadcrumbs.length - 1] : undefined;\r\n }\r\n\r\n private loadNewState = (reload: boolean, prevProps?: CodetableListComponentProps) => {\r\n const { metadata: { data }, list: { fetchingCodetableId, query, category }, invalidateCodeItems,\r\n loadCodeItems, updateQuery, updateCaseCategory, loadCodetableAdministrationList } = this.props;\r\n\r\n const codetableId = this.getCodetableId();\r\n\r\n if (!getCodetableMetadata(data, codetableId)) {\r\n navigate.replace(routeConstants.codetableAdministrationFor(this.props.breadcrumbs));\r\n return;\r\n }\r\n\r\n if (this.shouldBuildBreadcrumbs(reload, prevProps)) {\r\n const breadcrumbs = buildBreadcrumbs(this.props.list.options, this.props.breadcrumbs);\r\n this.setState({ breadcrumbs });\r\n }\r\n\r\n if (!!codetableId && fetchingCodetableId !== codetableId) {\r\n loadCodetableAdministrationList();\r\n loadCodeItems(codetableId, undefined, undefined, '');\r\n updateQuery('');\r\n updateCaseCategory(undefined);\r\n return;\r\n }\r\n\r\n if (reload) {\r\n invalidateCodeItems();\r\n loadCodeItems(codetableId, undefined, category ? category.value : undefined, query);\r\n }\r\n }\r\n\r\n private shouldBuildBreadcrumbs = (reload: boolean, prevProps: CodetableListComponentProps) => this.props &&\r\n this.props.list &&\r\n this.props.list.options && (!prevProps || prevProps && prevProps.list && !deepEquals(prevProps.list.options, this.props.list.options))\r\n && this.props.list.options && this.props.list.options.length > 0 && this.props.breadcrumbs && this.props.breadcrumbs.length > 0;\r\n\r\n private updateQuery = (newQuery: string = '') => {\r\n\r\n const { updateQuery, loadCodeItems, list: { category, query } } = this.props;\r\n\r\n const codetableId = this.getCodetableId();\r\n\r\n const newQueryClear = newQuery.trim();\r\n const queryClear = query.trim();\r\n\r\n if (newQueryClear !== queryClear) {\r\n loadCodeItems(codetableId, undefined, category ? category.value : undefined, newQueryClear);\r\n }\r\n\r\n updateQuery(newQueryClear);\r\n }\r\n\r\n private updateCategory = (category: ComplexValue<number>) => {\r\n\r\n const { updateCaseCategory, loadCodeItems, list: { query } } = this.props;\r\n\r\n const codetableId = this.getCodetableId();\r\n\r\n loadCodeItems(codetableId, undefined, category ? category.value : undefined, query);\r\n updateCaseCategory(category);\r\n }\r\n\r\n private loadFromParent = (parentId: number, startIndex: number) => {\r\n\r\n const { loadCodeItems, list: { category, query } } = this.props;\r\n\r\n const codetableId = this.getCodetableId();\r\n\r\n loadCodeItems(codetableId, parentId, category ? category.value : undefined, query, startIndex);\r\n }\r\n\r\n private hasCategoryMetadata = (codetableMetadata: CodetableMetadata) => {\r\n return codetableMetadata && codetableMetadata.features && codetableMetadata.features.category\r\n && codetableMetadata.codetableCategory && isDefinedIncludingZero(codetableMetadata.codetableCategory.id);\r\n }\r\n\r\n private hasSelectedCategory = () => {\r\n const { list: { category } } = this.props;\r\n return category && isDefinedIncludingZero(category.value);\r\n }\r\n\r\n private goBackToCodeSelector = (item: BreadcrumbValue) =>\r\n navigate.toCodeSelectView(this.buildGoBackBreadcrumbs(item, this.props.breadcrumbs));\r\n\r\n private buildGoBackBreadcrumbs = (item: BreadcrumbValue, breadcrumbs: number[]) => {\r\n const breadcrumbsCopy = breadcrumbs;\r\n\r\n if (breadcrumbs !== undefined && breadcrumbs.length > 0 && item !== undefined) {\r\n while (breadcrumbs[breadcrumbs.length - 1] && breadcrumbs[breadcrumbs.length - 1] !== item.value) {\r\n breadcrumbs.pop();\r\n }\r\n }\r\n\r\n return breadcrumbsCopy;\r\n };\r\n\r\n private goBackToHomeCodeSelector = () => navigate.to(routeConstants.selectCodetableAdministration);\r\n\r\n public render() {\r\n\r\n const { codeId, expandCodeItem, deleteCodeItem,\r\n list: { fetchingCodetableId, query, category, codeListBranchState,\r\n codeListBranch, codetableOptions, fetchingBreadcrumbsCodetableId },\r\n metadata: { data },\r\n loadCodetableOptions,\r\n translation } = this.props;\r\n\r\n const { breadcrumbs } = this.state;\r\n\r\n const codetableId = this.getCodetableId();\r\n\r\n const codetableMetadata = getCodetableMetadata(data, codetableId);\r\n const hasCategoryMetadata = this.hasCategoryMetadata(codetableMetadata);\r\n const hasSelectedCategory = this.hasSelectedCategory();\r\n const isHierarchy = !!codetableMetadata && !!codetableMetadata.features && codetableMetadata.features.hierarchy;\r\n const isHierarchyMode = isHierarchy && !query;\r\n const rootBranch = codeListBranch && codeListBranch.find(b => b.id === undefined);\r\n\r\n const shouldRenderSpinLoader = !codeListBranch || codeListBranch.length === 0;\r\n\r\n const shouldRenderList = !!codeListBranch && codeListBranch.length > 0 && rootBranch\r\n && rootBranch.numberOfResults > 0 && (hasCategoryMetadata ? hasSelectedCategory : true);\r\n\r\n const shouldRenderBreadcrumbs = !fetchingBreadcrumbsCodetableId && breadcrumbs && breadcrumbs.length > 0;\r\n\r\n return <MainGridContainer className={styles.codetableHeader}>\r\n <div className={`${styles.breadcrumbRow} row`}>\r\n {fetchingBreadcrumbsCodetableId ? <CodetableItemLoader /> : null}\r\n {shouldRenderBreadcrumbs\r\n ? <Breadcrumb\r\n items={breadcrumbs || []}\r\n onClickItem={this.goBackToCodeSelector}\r\n home={true}\r\n onClickBreadcrumbHome={this.goBackToHomeCodeSelector} />\r\n : <div className={styles.breadcrumbPlaceholder} />}\r\n </div>\r\n {\r\n codetableId === fetchingCodetableId ? <CodetableSearch\r\n key={codetableId}\r\n query={query}\r\n updateQuery={this.updateQuery}\r\n createUrl={routeConstants.codetableAdministrationCodeFor(this.props.breadcrumbs, codeId)}\r\n translation={translation} />\r\n : null\r\n }\r\n <CodeCategory\r\n category={category}\r\n metadata={codetableMetadata}\r\n options={codetableOptions}\r\n loadOptions={loadCodetableOptions}\r\n onChange={this.updateCategory}\r\n translation={translation} />\r\n {\r\n !isHierarchyMode && (!hasCategoryMetadata || (hasCategoryMetadata && hasSelectedCategory)) &&\r\n <NumberOfResults\r\n rootBranch={rootBranch}\r\n translation={translation} />\r\n }\r\n {shouldRenderSpinLoader ? <SpinLoader /> : undefined}\r\n {\r\n shouldRenderList && <div className={`${styles.listItemsContainer} ${isHierarchyMode ? styles.hierarchyResults : ''}`}>\r\n <div className={styles.listItems}>\r\n <CodetableListItems\r\n breadcrumbs={this.props.breadcrumbs}\r\n treeDepthLevel={0}\r\n hierarchyMetadata={[]}\r\n isZebra={undefined}\r\n codetableId={codetableId}\r\n codeId={codeId}\r\n isHierarchyMode={isHierarchyMode}\r\n isHierarchy={isHierarchy}\r\n codeListBranchState={codeListBranchState}\r\n codeListBranch={codeListBranch}\r\n loadFromParent={this.loadFromParent}\r\n expandCodeItem={expandCodeItem}\r\n deleteCodeItem={deleteCodeItem}\r\n parentId={undefined}\r\n translation={translation} />\r\n </div>\r\n </div>\r\n }\r\n {hasCategoryMetadata && !hasSelectedCategory && <p className=\"no-content\">{translation.no_category}</p>}\r\n </MainGridContainer >;\r\n }\r\n}\r\n\r\nconst container = containerFactory(CodetableListComponent, actionCreators, selectors, codetableAdministrationTranslation);\r\n\r\nexport { container as CodetableList, CodetableListComponent };\r\n","import * as React from 'react';\r\nimport { Component, RefObject } from 'react';\r\nimport { Link } from 'react-router';\r\nimport { ButtonCallToAction, MeatballMenu, PromptConfirmationModal } from 'ui';\r\nimport MdDelete from 'react-icons/lib/md/delete';\r\nimport { StickyHeader, StickyHeaderButtonContainer } from 'app/shell/components/sticky-header/sticky-header';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { CodetableTranslation } from '../../constants';\r\n\r\nimport styles from './codetable-sticky-header.scss';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { DisabledTag } from 'app/area/codetable/common/disabled-tag/disabled-tag';\r\n\r\nexport interface CodetableStickyHeaderProps {\r\n codetableId: number;\r\n breadcrumbs: number[];\r\n codeId: number;\r\n name: string;\r\n codetableName: string;\r\n translation: CodetableTranslation;\r\n longDescription?: string;\r\n save: () => void;\r\n deleteCodeItem: () => void;\r\n disabled: Date;\r\n readOnly: boolean;\r\n}\r\n\r\nexport class CodetableStickyHeader extends Component<CodetableStickyHeaderProps> {\r\n\r\n private longDescriptionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n\r\n public render() {\r\n const { codetableId, name, codetableName, translation, save,\r\n codeId, deleteCodeItem, longDescription, disabled, breadcrumbs } = this.props;\r\n\r\n const buttonText = isDefinedIncludingZero(codeId) ? translation.update_code : translation.add_code;\r\n\r\n return (\r\n <StickyHeader rightSideContent={<>\r\n <StickyHeaderButtonContainer>\r\n <Link\r\n id={`codetable-sticky-header-cancel-button-${codetableId}`}\r\n to={routeConstants.codetableAdministrationFor(breadcrumbs)}\r\n className=\"btn\">\r\n {translation.cancel}\r\n </Link>\r\n <ButtonCallToAction\r\n id={`codetable-sticky-header-save-button-${codetableId}`}\r\n onClick={save}\r\n disabled={false}>\r\n {buttonText}\r\n </ButtonCallToAction>\r\n </StickyHeaderButtonContainer>\r\n {!!codeId && codeId > 0 && <MeatballMenu id=\"codetable-sticky-header-meatballmenu\">\r\n <li>\r\n <PromptConfirmationModal\r\n title={translation.delete_code_item}\r\n description={translation.delete_confirm}\r\n continueText={translation.delete_code_item}\r\n cancelText={translation.cancel}\r\n onContinue={deleteCodeItem} >\r\n <button type=\"button\" className=\"dropdown-item\">\r\n <MdDelete /> {!!translation && translation.delete}\r\n </button>\r\n </PromptConfirmationModal>\r\n </li>\r\n </MeatballMenu>}\r\n </>}>\r\n <div className={styles.title}>{codetableName}</div>\r\n <div className={styles.actionTitleContainer}>\r\n {isDefinedIncludingZero(codeId) && <span className={styles.id}>#{codeId}</span>}\r\n <h2 className={styles.actionTitle}>\r\n {isDefinedIncludingZero(codeId) ? name : translation.new_code_item}\r\n </h2>\r\n <div><DisabledTag disabled={disabled} /></div>\r\n </div>\r\n {!!longDescription\r\n ? <div className={`${styles.longDescriptionContainer} ${!!longDescription ? '' : styles.hiddenLongDescriptionContainer}`}>\r\n <div id=\"codetable-sticky-header-long-description\" className={styles.longDescription} ref={this.longDescriptionRef}>\r\n {longDescription}\r\n </div>\r\n </div>\r\n : null\r\n }\r\n </StickyHeader>\r\n );\r\n }\r\n}\r\n","import { CodeItemWire } from '../types';\r\nimport { CodeItem } from '../types-store';\r\nimport { parseAsDateUTC } from 'app/infrastructure/data/date';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport const mapCodeToStore = (codeItemWire: CodeItemWire): CodeItem => {\r\n\r\n return {\r\n\r\n ...(!!codeItemWire.code && {\r\n id: codeItemWire.code.v\r\n }),\r\n\r\n ...(!!codeItemWire.disabled && {\r\n disabled: parseAsDateUTC(codeItemWire.disabled)\r\n }),\r\n\r\n ...(!!codeItemWire.colour && {\r\n colour: codeItemWire.colour\r\n }),\r\n\r\n ...(!!codeItemWire.icon && {\r\n icon: codeItemWire.icon\r\n }),\r\n\r\n ...(!!codeItemWire.category && {\r\n category: {\r\n value: codeItemWire.category.v,\r\n description: codeItemWire.category.d\r\n }\r\n }),\r\n\r\n ...(isDefinedIncludingZero(codeItemWire.sequence) && {\r\n sequence: codeItemWire.sequence\r\n }),\r\n\r\n ...(!!codeItemWire.language && {\r\n\r\n description: codeItemWire.language.map(l => ({\r\n value: l.v,\r\n description: l.d\r\n })),\r\n\r\n longDescription: codeItemWire.language.map(l => ({\r\n value: l.v,\r\n description: l.ld\r\n }))\r\n }),\r\n\r\n ...(!!codeItemWire.subset && {\r\n userGroups: codeItemWire.subset.map(s => ({\r\n value: s.v,\r\n description: s.d\r\n }))\r\n }),\r\n\r\n ...(!!codeItemWire.exclude && {\r\n excludeFields: codeItemWire.exclude.map(e => ({\r\n value: e.v,\r\n description: e.d\r\n }))\r\n }),\r\n\r\n ...(!!codeItemWire.application && {\r\n caseTypes: codeItemWire.application.map(a => ({\r\n value: a.v,\r\n description: a.d\r\n }))\r\n }),\r\n\r\n ...(!!codeItemWire.class && {\r\n codetableTypes: codeItemWire.class.map(a => ({\r\n value: a.v,\r\n description: a.d\r\n }))\r\n }),\r\n\r\n ...(!!codeItemWire.parent && {\r\n parent: {\r\n value: codeItemWire.parent.v,\r\n description: codeItemWire.parent.d\r\n }\r\n }),\r\n\r\n ...(!!codeItemWire.node && {\r\n node: {\r\n value: codeItemWire.node.v,\r\n description: codeItemWire.node.d\r\n }\r\n }),\r\n\r\n ...(!!codeItemWire.additionalFields && {\r\n additionalFields: {\r\n ...(codeItemWire.additionalFields.companyRegisterId !== undefined && {\r\n companyRegisterId: codeItemWire.additionalFields.companyRegisterId\r\n }),\r\n ...(isDefinedIncludingZero(codeItemWire.additionalFields.scoreCalcWeight) && {\r\n scoreCalcWeight: codeItemWire.additionalFields.scoreCalcWeight\r\n })\r\n }\r\n })\r\n };\r\n};\r\n","export const endpoints = {\r\n code: (codetableId: number) => `optionsCollection/${codetableId}/code`,\r\n language: 'code/language/options',\r\n caseType: 'code/caseType/options',\r\n userGroup: 'code/usergroup/options',\r\n excludableFields: (optionsCollectionId: number) => `optionsCollection/${optionsCollectionId}/fieldNodes`\r\n};\r\n","import { ApiResponse } from 'app/types-shared';\r\nimport { RemoteAdminData } from 'app/infrastructure/remote-data';\r\nimport { endpoints } from './endpoints';\r\nimport { CodeItemWire } from './types';\r\n\r\nexport const api = {\r\n loadCodeItem: async (codetableId: number, codeId: number): Promise<CodeItemWire> => {\r\n \r\n const request = await new RemoteAdminData(endpoints.code(codetableId))\r\n .resource<ApiResponse<CodeItemWire>>()\r\n .filter({ 'api-version': '2.0' })\r\n .withId(codeId)\r\n .single();\r\n\r\n return request.data;\r\n },\r\n\r\n createCodetableItem: async (codetableId: number, codeItem: CodeItemWire) => {\r\n\r\n const request = await new RemoteAdminData(endpoints.code(codetableId))\r\n .resource<ApiResponse<CodeItemWire>>()\r\n .filter({ 'api-version': '2.0' })\r\n .create(codeItem);\r\n\r\n return request.data;\r\n },\r\n\r\n saveCodetableItem: async (codetableId: number, codeId: number, codeItem: CodeItemWire) => {\r\n\r\n const request = await new RemoteAdminData(endpoints.code(codetableId))\r\n .resource<ApiResponse<CodeItemWire>>()\r\n .filter({ 'api-version': '2.0' })\r\n .withId(codeId)\r\n .save(codeItem);\r\n\r\n return request.data;\r\n }\r\n};\r\n","import { toISODatewithoutTimezone } from 'app/infrastructure/data/date';\r\nimport { CodeItemWire, CodeToWire } from '../types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { CodetableFeatures } from 'app/area/codetable/types-store';\r\n\r\nconst mapLanguageToWire = (codeToWire: CodeToWire, property: keyof CodetableFeatures) => {\r\n const { codeItem, features } = codeToWire;\r\n\r\n if (!features || !features[property]) {\r\n return undefined;\r\n }\r\n\r\n return codeItem[property];\r\n};\r\n\r\nconst mapLanguages = (codeToWire: CodeToWire) => {\r\n const descriptionToWire = mapLanguageToWire(codeToWire, 'description');\r\n const longDescriptionToWire = mapLanguageToWire(codeToWire, 'longDescription');\r\n\r\n const descriptionLanguageIds = descriptionToWire &&\r\n descriptionToWire.map(description => description.value) || [];\r\n const longDescriptionLanguageIds = longDescriptionToWire &&\r\n longDescriptionToWire.map(longDescription => longDescription.value)\r\n .filter(longDescriptionId => !descriptionLanguageIds.some(id => id === longDescriptionId)) || [];\r\n\r\n const languageIds = [\r\n ...descriptionLanguageIds,\r\n ...longDescriptionLanguageIds\r\n ];\r\n\r\n return languageIds.length > 0\r\n ? languageIds.map(id => {\r\n\r\n const description = descriptionToWire && descriptionToWire.find(d => d.value === id);\r\n const longDescription = longDescriptionToWire && longDescriptionToWire.find(d => d.value === id);\r\n return {\r\n v: id,\r\n ...(!!description && {\r\n d: description.description\r\n }),\r\n ...(!!longDescription && {\r\n ld: longDescription.description\r\n })\r\n };\r\n })\r\n : undefined;\r\n};\r\n\r\nexport const mapCodeToWire = (codeToWire: CodeToWire): CodeItemWire => {\r\n\r\n const { codeItem } = codeToWire;\r\n\r\n const languages = mapLanguages(codeToWire);\r\n\r\n return {\r\n\r\n ...(!!isDefinedIncludingZero(codeItem.id) && {\r\n code: {\r\n v: codeItem.id\r\n }\r\n }),\r\n\r\n ...(!!codeItem.disabled && {\r\n disabled: toISODatewithoutTimezone(codeItem.disabled)()\r\n }),\r\n\r\n ...(!!codeItem.colour && {\r\n colour: codeItem.colour\r\n }),\r\n\r\n ...(!!codeItem.icon && {\r\n icon: codeItem.icon\r\n }),\r\n\r\n ...(!!codeItem.category && {\r\n category: {\r\n v: codeItem.category.value\r\n }\r\n }),\r\n\r\n ...((!!codeItem.sequence || codeItem.sequence === 0) && {\r\n sequence: codeItem.sequence\r\n }),\r\n\r\n ...(!!languages && {\r\n language: languages\r\n }),\r\n\r\n ...(!!codeItem.userGroups && {\r\n subset: codeItem.userGroups.map(ug => ({\r\n v: ug.value\r\n }))\r\n }),\r\n\r\n ...(!!codeItem.excludeFields && {\r\n exclude: codeItem.excludeFields.map(e => ({\r\n v: e.value\r\n }))\r\n }),\r\n\r\n ...(!!codeItem.codetableTypes && {\r\n class: codeItem.codetableTypes.map(e => ({\r\n v: e.value\r\n }))\r\n }),\r\n\r\n ...(!!codeItem.caseTypes && {\r\n application: codeItem.caseTypes.map(c => ({\r\n v: c.value\r\n }))\r\n }),\r\n\r\n ...(!!codeItem.parent && {\r\n parent: {\r\n v: codeItem.parent.value\r\n }\r\n }),\r\n\r\n ...(!!codeItem.node && {\r\n node: {\r\n v: codeItem.node.value\r\n }\r\n }),\r\n\r\n ...(!!codeItem.additionalFields && {\r\n additionalFields: {\r\n ...(codeItem.additionalFields.companyRegisterId !== undefined && {\r\n companyRegisterId: codeItem.additionalFields.companyRegisterId\r\n }),\r\n ...(isDefinedIncludingZero(codeItem.additionalFields.scoreCalcWeight) && {\r\n scoreCalcWeight: codeItem.additionalFields.scoreCalcWeight\r\n })\r\n }\r\n })\r\n };\r\n};\r\n","import { CodetableMetadata } from 'app/area/codetable/types-store';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { FilterOption } from 'app/components/options-handler/types';\r\nimport { CreateEmptyCodeItemPayload } from 'app/area/codetable/item/types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nconst createCaseType = (metadata: CodetableMetadata, caseTypesOptions: FilterOption) => {\r\n const caseTypes = !!caseTypesOptions ? caseTypesOptions.codes as ComplexValue<number>[] : [];\r\n\r\n return metadata && metadata.features && metadata.features.caseType ? caseTypes : undefined;\r\n};\r\n\r\nconst createExcludeFields = (metadata: CodetableMetadata) => {\r\n return (metadata && metadata.features && metadata.features.visible) ? [] : undefined;\r\n};\r\n\r\nconst createCodetableTypes = (metadata: CodetableMetadata) => {\r\n return (metadata && metadata.codetableClass && isDefinedIncludingZero(metadata.codetableClass.id)) ? [] : undefined;\r\n};\r\n\r\nconst createParent = (metadata: CodetableMetadata, parent: ComplexValue<number>, parentId: number) => {\r\n return parentId && metadata && metadata.features && metadata.features.hierarchy ? parent : undefined;\r\n};\r\n\r\nconst createCategory = (metadata: CodetableMetadata, category: ComplexValue<number>) => {\r\n return !!metadata && !!metadata.codetableCategory && isDefinedIncludingZero(metadata.codetableCategory.id) ? category : undefined;\r\n};\r\n\r\nconst createAdditionalFields = (metadata: CodetableMetadata) => {\r\n return !!metadata && !!metadata.additionalFields ? {} : undefined;\r\n};\r\n\r\nconst createUserGroups = (metadata: CodetableMetadata, userGroupsOptions: FilterOption) => {\r\n const userGroups = !!userGroupsOptions ? userGroupsOptions.codes : [];\r\n\r\n return metadata && metadata.features && metadata.features.userGroup ? userGroups as ComplexValue<number>[] : undefined;\r\n};\r\n\r\nconst createDescriptions = (metadata: CodetableMetadata, languagesOptions: FilterOption) => {\r\n const languages = !!languagesOptions ? languagesOptions.codes : [];\r\n\r\n return metadata && metadata.features && metadata.features.description\r\n ? languages.map(language => ({ value: language.value })) as ComplexValue<number>[]\r\n : undefined;\r\n};\r\n\r\nexport const createEmptyCodeItem = (payload: CreateEmptyCodeItemPayload): CodeItem => {\r\n const { caseTypes, metadata, parent, category, parentId, userGroups, languages } = payload;\r\n\r\n return {\r\n caseTypes: createCaseType(metadata, caseTypes),\r\n category: createCategory(metadata, category),\r\n codetableTypes: createCodetableTypes(metadata),\r\n colour: undefined,\r\n description: createDescriptions(metadata, languages),\r\n disabled: undefined,\r\n excludeFields: createExcludeFields(metadata),\r\n icon: undefined,\r\n id: undefined,\r\n longDescription: createDescriptions(metadata, languages),\r\n node: undefined,\r\n parent: createParent(metadata, parent, parentId),\r\n sequence: undefined,\r\n userGroups: createUserGroups(metadata, userGroups),\r\n additionalFields: createAdditionalFields(metadata)\r\n };\r\n};\r\n","import { CodetableMetadata } from 'app/area/codetable/types-store';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { CreateCodeItemProps, LoadCodeOptions } from 'app/area/codetable/item/types';\r\nimport { endpoints } from 'app/area/codetable/item/endpoints';\r\nimport { mapCodeToStore } from 'app/area/codetable/item/mapping/map-code-to-store';\r\nimport { api } from './api';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { CodetableOptions } from 'app/area/codetable/common/codetable-options-handler/types';\r\n\r\nexport const loadAllOptions = async (props: CreateCodeItemProps, metadata: CodetableMetadata) => {\r\n const { loadCodetableOptions, parentId, loadOptions } = props;\r\n const codetableId = !!metadata && !!metadata.codetable && isDefinedIncludingZero(metadata.codetable.id)\r\n ? metadata.codetable.id\r\n : undefined;\r\n await Promise.all([\r\n shouldLoadParentOptions(parentId) && loadCodetableOptions('parent', codetableId, { parentId }),\r\n shouldLoadUserGroups(metadata) && loadOptions('userGroups', endpoints.userGroup, undefined),\r\n shouldLoadCaseTypes(metadata) && loadOptions('caseTypes', endpoints.caseType, undefined),\r\n loadLanguages(metadata, loadOptions)\r\n ]);\r\n};\r\n\r\nexport const loadLanguages = (metadata: CodetableMetadata, loadOptions: LoadCodeOptions) =>\r\n shouldLoadDescriptions(metadata) && loadOptions('languages', endpoints.language, undefined);\r\n\r\nconst getPath = (parentId: number, codetableOptions: { [key: string]: CodetableOptions }): ComplexValue<number>[] => {\r\n\r\n if (isDefinedIncludingZero(parentId)) {\r\n const codes = !!codetableOptions\r\n && !!codetableOptions.parent\r\n && !!codetableOptions.parent.codes\r\n && codetableOptions.parent.codes.length > 0\r\n ? codetableOptions.parent.codes\r\n : undefined;\r\n\r\n if (codes) {\r\n const findParent = (parentCodes: ComplexValue<number>[], path: ComplexValue<number>[] = []) => {\r\n if (parentCodes[0].value === parentId) {\r\n return [...path, parentCodes[0]];\r\n } else if (!parentCodes[0].descendants || parentCodes[0].descendants.length === 0) {\r\n return undefined;\r\n }\r\n return findParent(parentCodes[0].descendants, [...path, parentCodes[0]]);\r\n };\r\n\r\n return findParent(codes);\r\n }\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const getParent = (parentId: number, codetableOptions: { [key: string]: CodetableOptions }): ComplexValue<number> => {\r\n\r\n const path = getPath(parentId, codetableOptions);\r\n\r\n return path && path.length ? path[path.length - 1] : undefined;\r\n};\r\n\r\nexport const getParentFullPath = (parentId: number, codetableOptions: { [key: string]: CodetableOptions }): string => {\r\n\r\n const path = getPath(parentId, codetableOptions) || [];\r\n\r\n return path.reduce((result: string, item: ComplexValue<number>) => result\r\n ? result + ' - ' + item.description\r\n : item.description, '');\r\n};\r\n\r\nexport const getCategory = (category: ComplexValue<number>, props: CreateCodeItemProps, metadata: CodetableMetadata) => {\r\n const { breadcrumbs, parentId } = props;\r\n\r\n if (!shouldGetCategory(metadata)) {\r\n return undefined;\r\n }\r\n\r\n if (!!category && isDefinedIncludingZero(category.value)) {\r\n return category;\r\n }\r\n\r\n if (isDefinedIncludingZero(parentId)) {\r\n const codetableId = breadcrumbs && breadcrumbs.length > 0 ? breadcrumbs[breadcrumbs.length - 1] : undefined;\r\n return loadParentCategory(codetableId, parentId);\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const getUserLanguageTranslation = (textsLanguage: number, metadata: CodetableMetadata,\r\n codeItem: CodeItem, property: 'description' | 'longDescription'): string => {\r\n if (!metadata || !metadata.features || !metadata.features[property]) {\r\n return undefined;\r\n }\r\n\r\n const userLanguageDescription = codeItem[property].find(description => description.value === textsLanguage);\r\n\r\n return userLanguageDescription ? userLanguageDescription.description : undefined;\r\n};\r\n\r\nconst shouldGetCategory = (metadata: CodetableMetadata) =>\r\n !!metadata && !!metadata.codetableCategory && isDefinedIncludingZero(metadata.codetableCategory.id);\r\n\r\nconst shouldLoadParentOptions = (parentId: number) => isDefinedIncludingZero(parentId);\r\n\r\nconst shouldLoadUserGroups = (metadata: CodetableMetadata) => !!metadata && !!metadata.features && !!metadata.features.userGroup;\r\n\r\nconst shouldLoadCaseTypes = (metadata: CodetableMetadata) => !!metadata && !!metadata.features && !!metadata.features.caseType;\r\n\r\nconst shouldLoadDescriptions = (metadata: CodetableMetadata) => !!metadata && !!metadata.features && !!metadata.features.description;\r\n\r\nconst loadParentCategory = async (codetableId: number, parentId: number) => {\r\n const codeItem = await api.loadCodeItem(codetableId, parentId);\r\n\r\n const code = mapCodeToStore(codeItem);\r\n\r\n return !!code ? code.category : undefined;\r\n};\r\n","import { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { ComplexValue } from 'app/types-shared';\r\n\r\nexport const getMainLanguageDescription = (codeItem: CodeItem, mainLanguage: ComplexValue<number>) => {\r\n\r\n return !!codeItem && !!codeItem.description && !!mainLanguage\r\n ? codeItem.description.find(description => description.value === mainLanguage.value)\r\n : undefined;\r\n};\r\n\r\nexport const getMainLanguageLongDescription = (codeItem: CodeItem, mainLanguage: ComplexValue<number>) => {\r\n\r\n return !!codeItem && !!codeItem.longDescription && !!mainLanguage\r\n ? codeItem.longDescription.find(description => description.value === mainLanguage.value)\r\n : undefined;\r\n};\r\n","import { CopyTranslationsPayload } from 'app/area/codetable/item/types';\r\nimport { CodetableFeatures } from 'app/area/codetable/types-store';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { getMainLanguageDescription, getMainLanguageLongDescription } from 'app/area/codetable/item/mapping/main-language';\r\n\r\nexport const mapCopyTranslations =\r\n (payload: CopyTranslationsPayload, property: keyof CodetableFeatures): ComplexValue<number>[] => {\r\n const { codeItem, languageOptions, mainLanguage } = payload;\r\n\r\n const missingLanguages = getMissingLanguages(codeItem[property], languageOptions);\r\n const allLanguages = isDefinedIncludingZero(codeItem.id) ? [...codeItem[property], ...missingLanguages] : languageOptions;\r\n\r\n const mainLanguageDescription = getMainLanguageDescription(codeItem, mainLanguage);\r\n const mainLanguageDescriptionText = !!mainLanguageDescription && !!mainLanguageDescription.description\r\n ? mainLanguageDescription.description.trim()\r\n : undefined;\r\n\r\n const mainLanguageLongDescription = getMainLanguageLongDescription(codeItem, mainLanguage);\r\n const mainLanguageLongDescriptionText = !!mainLanguageLongDescription && !!mainLanguageLongDescription.description\r\n ? mainLanguageLongDescription.description.trim()\r\n : undefined;\r\n\r\n return allLanguages.map(language => ({\r\n value: language.value,\r\n description: property === 'description' ? mainLanguageDescriptionText : mainLanguageLongDescriptionText\r\n }));\r\n };\r\n\r\nconst getMissingLanguages = (source: ComplexValue<number>[], compared: ComplexValue<number>[]) =>\r\n compared ? compared.filter(option => !source.some(language => language.value === option.value)) : [];\r\n","import { ValidationProps, ValidationLevel } from 'ui/common/validation/types';\r\n\r\nexport const hasValidationErrors = (validation: { [key: string]: ValidationProps }) => {\r\n return Object.keys(validation)\r\n .filter(validationKey => !!validation[validationKey])\r\n .some(validationKey => validation[validationKey].level === ValidationLevel.error);\r\n};\r\n","import { ValidationProps, ValidationLevel } from 'ui/common/validation/types';\r\nimport { ComplexValue } from 'app/types-shared';\r\n\r\nexport const hasTranslationsValid = (validation: { [key: string]: ValidationProps }, mainLanguage: ComplexValue<number>): boolean => {\r\n\r\n const translationsValidation: ValidationProps = !!validation && !!validation.language\r\n && validation.language.level === ValidationLevel.error && !!validation.language.messages\r\n ? validation.language\r\n : undefined;\r\n\r\n return !!translationsValidation &&\r\n translationsValidation.messages.filter(message => message.parameters !== mainLanguage.value)\r\n .every(message => message.level !== ValidationLevel.error);\r\n\r\n};\r\n","export const getCodetableId = (breadcrumbs: number[]) => {\r\n return breadcrumbs && breadcrumbs.length > 0 ? breadcrumbs[breadcrumbs.length - 1] : undefined;\r\n};\r\n","import { ActionDispatching, ComplexValue } from 'app/types-shared';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { ErrorNotification, SuccessNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { mapCodeToStore } from './mapping/map-code-to-store';\r\nimport {\r\n RequestCodeItem, ReceiveCodeItem, FailCodeItem, CopyDescriptionToAllTranslations,\r\n RequestSaveCodetableItem, ReceiveSaveCodetableItem, FailSaveCodetableItem,\r\n UpdateListNode, UpdateParent, UpdateDisabled, UpdateSequence, UpdateDescription, UpdateLongDescription,\r\n UpdateUserGroups, UpdateExcludedFields, UpdateCaseTypes, UpdateCodeCategory,\r\n RequestCreateCodeItem, ReceiveCreateCodeItem, FailCreateCodeItem,\r\n ResetDescriptionValidation, ResetLongDescriptionValidation,\r\n UpdateValidation, ResetValidation, ClearValidation, CopyLongDescriptionToAllTranslations,\r\n SwitchTranslationsToggle, ClearCodetableOptions, ResetAllDescriptionsValidation, ResetAllLongDescriptionsValidation,\r\n UpdateCodetableTypes,\r\n UpdateAdditionalField\r\n} from './action-types';\r\nimport { api } from './api';\r\nimport { mapCodeToWire } from 'app/area/codetable/item/mapping/map-code-to-wire';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { CodeItem, DeleteCodeItemPayload } from 'app/area/codetable/item/types-store';\r\nimport { SaveCodetableItem, CreateCodeItemProps, CopyTranslationsPayload } from 'app/area/codetable/item/types';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { codetableAdministrationTranslation } from 'app/area/codetable/constants';\r\nimport { isForbiddenStatus, blockAccess, isBadRequest } from 'app/area/shared/actions-utils';\r\nimport { STATE } from 'app/constants';\r\nimport { codetableAdministrationTranslation as text } from '../constants';\r\nimport { codetableOptionsActionCreators } from '../common';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { createEmptyCodeItem } from 'app/area/codetable/item/mapping/create-empty-code-item';\r\nimport {\r\n getParent, loadAllOptions, getCategory, loadLanguages, getParentFullPath\r\n} from 'app/area/codetable/item/actions-helpers';\r\nimport { CodetableAdministrationState, CodetableAdditionalFieldId } from 'app/area/codetable/types-store';\r\nimport { FilterOption } from 'app/components/options-handler/types';\r\nimport { RequestCodeItemDelete, ReceiveCodeItemDelete, FailCodeItemDelete } from 'app/area/codetable/common/action-types';\r\nimport { api as commonApi } from 'app/area/codetable/common/api';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { mapCopyTranslations } from 'app/area/codetable/item/mapping/copy-translations';\r\nimport { ValidationProps } from 'ui/common/validation/types';\r\nimport { hasValidationErrors } from 'app/area/codetable/item/validation/has-validation-errors';\r\nimport { hasTranslationsValid } from 'app/area/codetable/item/translation/translations/has-translations-valid';\r\nimport { complexValidationFromServer } from 'app/infrastructure/data/validation';\r\nimport { getCodetableId } from 'app/area/codetable/helpers';\r\n\r\nexport const actionCreators = {\r\n\r\n ...codetableOptionsActionCreators,\r\n\r\n createCodeItem: (props: CreateCodeItemProps): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const { metadata: { data: codetableMetadata } } = getState().administrationCodetable;\r\n const { parentId } = props;\r\n\r\n dispatch(new RequestCreateCodeItem());\r\n\r\n try {\r\n\r\n await loadAllOptions(props, codetableMetadata);\r\n\r\n } catch (err) {\r\n\r\n dispatch(new FailCreateCodeItem());\r\n\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n\r\n return;\r\n }\r\n\r\n const { item: { codetableOptions }, options, list } =\r\n getState().administrationCodetable as CodetableAdministrationState & { options: { [key: string]: FilterOption } };\r\n\r\n const storedCategory = !!list && !!list.category ? list.category : undefined;\r\n\r\n const parent = getParent(parentId, codetableOptions);\r\n const parentFullPath = getParentFullPath(parentId, codetableOptions);\r\n const parentWithFullPath = { ...parent, description: parentFullPath };\r\n\r\n const category = await getCategory(storedCategory, props, codetableMetadata);\r\n\r\n const codeItem: CodeItem = createEmptyCodeItem({\r\n metadata: codetableMetadata,\r\n caseTypes: options ? options.caseTypes : undefined,\r\n userGroups: options ? options.userGroups : undefined,\r\n parent: parentWithFullPath,\r\n languages: options ? options.languages : undefined,\r\n category,\r\n parentId\r\n });\r\n\r\n dispatch(new ReceiveCreateCodeItem(codeItem));\r\n dispatch(new SwitchTranslationsToggle(false));\r\n },\r\n\r\n loadCodeItem: (props: CreateCodeItemProps): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const { metadata: { data: codetableMetadata } } = getState().administrationCodetable;\r\n const { codeId, loadOptions, breadcrumbs } = props;\r\n\r\n const codetableId = getCodetableId(breadcrumbs);\r\n\r\n dispatch(new RequestCodeItem(codetableId, codeId));\r\n\r\n try {\r\n\r\n const codeItemWire = await Promise.all([\r\n api.loadCodeItem(codetableId, codeId),\r\n loadLanguages(codetableMetadata, loadOptions)\r\n ]);\r\n\r\n const codeItem = mapCodeToStore(codeItemWire[0]);\r\n\r\n dispatch(new ReceiveCodeItem({\r\n codetableId,\r\n codeId,\r\n codeItem\r\n }));\r\n\r\n dispatch(new SwitchTranslationsToggle(true));\r\n\r\n } catch (err) {\r\n\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch,\r\n getState,\r\n area: STATE.administrationCodetable,\r\n translationId: text.no_access_to_codetable_administration\r\n });\r\n } else if (err && (err.userMessages || err.message)) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n }\r\n\r\n if (isBadRequest(err)) {\r\n navigate.toStartupView();\r\n }\r\n\r\n dispatch(new FailCodeItem(codetableId, codeId));\r\n }\r\n },\r\n\r\n deleteCodeItem: (payload: DeleteCodeItemPayload): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n const { codeId, successMessage, breadcrumbs } = payload;\r\n\r\n const codetableId = getCodetableId(breadcrumbs);\r\n\r\n dispatch(new RequestCodeItemDelete(codetableId, codeId));\r\n\r\n try {\r\n await commonApi.deleteCodeItem(codetableId, codeId);\r\n\r\n navigate.to({ pathname: routeConstants.codetableAdministrationFor(breadcrumbs) });\r\n\r\n dispatch(new ReceiveCodeItemDelete(codeId));\r\n dispatch(new SuccessNotification(successMessage));\r\n } catch (err) {\r\n const error = err && (err.userMessages || err.message);\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailCodeItemDelete(codeId));\r\n }\r\n },\r\n\r\n updateListNode: (node: ComplexValue<number>): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new ResetValidation('node'));\r\n dispatch(new UpdateListNode(node));\r\n },\r\n\r\n updateParent: (parent: ComplexValue<number>): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new ResetValidation('parent'));\r\n dispatch(new UpdateParent(parent));\r\n },\r\n\r\n updateDescription: (languageId: number, description: ComplexValue<number>[]): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n dispatch(new ResetDescriptionValidation(languageId));\r\n dispatch(new UpdateDescription(languageId, description));\r\n },\r\n\r\n updateLongDescription: (languageId: number, longDescription: ComplexValue<number>[]): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n dispatch(new ResetLongDescriptionValidation(languageId));\r\n dispatch(new UpdateLongDescription(languageId, longDescription));\r\n },\r\n\r\n updateDisabled: (disabled: Date): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new UpdateDisabled(disabled));\r\n },\r\n\r\n updateUserGroups: (userGroup: ComplexValue<number>[]): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new UpdateUserGroups(userGroup));\r\n },\r\n\r\n updateExcludedFields: (excludedFields: ComplexValue<number>[]): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new UpdateExcludedFields(excludedFields));\r\n },\r\n\r\n updateCaseTypes: (caseType: ComplexValue<number>[]): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new UpdateCaseTypes(caseType));\r\n },\r\n\r\n updateCodetableTypes: (codetableTypes: ComplexValue<number>[]): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new UpdateCodetableTypes(codetableTypes));\r\n },\r\n\r\n updateCodeCategory: (codeCategory: ComplexValue<number>): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new ResetValidation('category'));\r\n dispatch(new UpdateCodeCategory(codeCategory));\r\n },\r\n\r\n updateSequence: (sequence: number): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new UpdateSequence(sequence));\r\n },\r\n\r\n updateAdditionalField: <T extends unknown>(additionalFieldId: CodetableAdditionalFieldId, value: T): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n dispatch(new ResetValidation(additionalFieldId));\r\n dispatch(new UpdateAdditionalField<T>(additionalFieldId, value));\r\n },\r\n\r\n resetCodeItem: (): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new ReceiveCreateCodeItem(undefined));\r\n dispatch(new ClearCodetableOptions());\r\n },\r\n\r\n copyDescriptionToAllTranslations: (payload: CopyTranslationsPayload): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n const description = payload.features.description ? mapCopyTranslations(payload, 'description') : undefined;\r\n\r\n dispatch(new CopyDescriptionToAllTranslations(description));\r\n dispatch(new ResetAllDescriptionsValidation());\r\n dispatch(new SuccessNotification(payload.successText));\r\n },\r\n\r\n copyLongDescriptionToAllTranslations: (payload: CopyTranslationsPayload): ActionDispatching<any, any> =>\r\n (dispatch: any, getState: any) => {\r\n const longDescription = payload.features.longDescription ? mapCopyTranslations(payload, 'longDescription') : undefined;\r\n\r\n dispatch(new CopyLongDescriptionToAllTranslations(longDescription));\r\n dispatch(new ResetAllLongDescriptionsValidation());\r\n dispatch(new SuccessNotification(payload.successText));\r\n },\r\n\r\n saveCodetableItem: (saveCodetableItem: SaveCodetableItem): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const { metadata, codetableId, options, validationErrorMessage, mainLanguage, breadcrumbs } = saveCodetableItem;\r\n const { item: { codeItem: { id: codeId }, codeItem, validation } } = getState().administrationCodetable;\r\n\r\n if (hasValidationErrors(validation)) {\r\n dispatch(new ErrorNotification(validationErrorMessage));\r\n !hasTranslationsValid(validation, mainLanguage) && dispatch(new SwitchTranslationsToggle(true));\r\n return;\r\n }\r\n\r\n const codetableFound = !!metadata && !!metadata.codetable && metadata.codetable.id === codetableId ? metadata : undefined;\r\n\r\n dispatch(new RequestSaveCodetableItem());\r\n\r\n try {\r\n const shouldCreateCodetableItem = !codeId && codeId !== 0;\r\n const languageOptions = (!!options && !!options.languages && options.languages.codes || []) as ComplexValue<number>[];\r\n\r\n let response;\r\n\r\n if (shouldCreateCodetableItem) {\r\n response = await api.createCodetableItem(codetableId, mapCodeToWire({\r\n codeItem, languageOptions, features: codetableFound.features\r\n }));\r\n } else {\r\n response = await api.saveCodetableItem(codetableId, codeId, mapCodeToWire({\r\n codeItem, languageOptions, features: codetableFound.features\r\n }));\r\n }\r\n\r\n if (!!response && !!response.validationErrors) {\r\n dispatch(new UpdateValidation(complexValidationFromServer(response.validationErrors)));\r\n return;\r\n }\r\n\r\n navigate.to({ pathname: routeConstants.codetableAdministrationFor(breadcrumbs) });\r\n\r\n dispatch(new ReceiveSaveCodetableItem());\r\n\r\n const successfulSaveText = isDefinedIncludingZero(codeId)\r\n ? codetableAdministrationTranslation.updated_successfully\r\n : codetableAdministrationTranslation.saved_successfully;\r\n\r\n const areaState = getState().administrationCodetable;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n const savedSuccessfully = translationDescription(successfulSaveText);\r\n\r\n dispatch(new SuccessNotification(savedSuccessfully));\r\n } catch (err) {\r\n const error = !!err ? err.userMessages : undefined;\r\n error && dispatch(new ErrorNotification(error));\r\n dispatch(new FailSaveCodetableItem());\r\n\r\n if (!!err && !!err.validationErrors) {\r\n dispatch(new UpdateValidation(complexValidationFromServer(err.validationErrors)));\r\n !hasTranslationsValid(validation, mainLanguage) && dispatch(new SwitchTranslationsToggle(true));\r\n dispatch(new ErrorNotification(validationErrorMessage));\r\n }\r\n }\r\n },\r\n\r\n updateValidation: (validation: { [key: string]: ValidationProps }): ActionDispatching<any, any> => (dispatch: any, getState: any) => {\r\n dispatch(new UpdateValidation(validation));\r\n },\r\n\r\n clearValidation: () => (dispatch: any, getState: any) => {\r\n dispatch(new ClearValidation());\r\n },\r\n\r\n switchTranslationsToggle: (toggled?: boolean) => (dispatch: any, getState: any) => {\r\n dispatch(new SwitchTranslationsToggle(toggled));\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport styles from './language-name.scss';\r\nimport { LanguageNameProps } from 'app/area/codetable/item/translation/types';\r\n\r\nexport const LanguageName = ({ text, className = '' }: LanguageNameProps) => (\r\n <div className={`${className}`}>\r\n <div className={`d-flex ${styles.labelContainer}`}>\r\n <div className={`d-flex align-self-center ${styles.labelText}`}>\r\n {text}\r\n </div>\r\n </div>\r\n </div>\r\n);\r\n","import * as React from 'react';\r\nimport { TranslationRowProps } from 'app/area/codetable/item/translation/types';\r\nimport { MAX_LENGTH_LONG_DESCRIPTIONS } from 'app/area/codetable/item/translation/constants';\r\nimport { LanguageName } from 'app/area/codetable/item/translation/translations/ui/language-name';\r\nimport { Textarea } from 'ui';\r\nexport class TranslationRow extends React.Component<TranslationRowProps> {\r\n\r\n private onChangeDescription = (value: string) => {\r\n\r\n const { languageId, onDescriptionChange } = this.props;\r\n onDescriptionChange(languageId, value);\r\n }\r\n\r\n private onChangeLongDescription = (value: string) => {\r\n\r\n const { languageId, onLongDescriptionChange } = this.props;\r\n onLongDescriptionChange(languageId, value);\r\n }\r\n\r\n public render() {\r\n const { languageId, description, longDescription, translation,\r\n descriptionLabel, showLongDescription, descriptionValidation, longDescriptionValidation } = this.props;\r\n\r\n return (\r\n <div>\r\n <LanguageName\r\n text={descriptionLabel}\r\n className=\"d-flex\"\r\n />\r\n <div className=\"row\">\r\n <div className=\"col-lg-6 col-sm-12\">\r\n <Textarea\r\n componentId={`code_desc_${languageId}`}\r\n value={description}\r\n onChange={this.onChangeDescription}\r\n label={{ text: translation.description, required: true }}\r\n maxLength={254}\r\n validation={descriptionValidation}\r\n wait={5}\r\n />\r\n </div>\r\n {\r\n !!showLongDescription && <div className=\"col-lg-6 col-sm-12\">\r\n <Textarea\r\n componentId={`code_long_desc_${languageId}`}\r\n value={longDescription}\r\n onChange={this.onChangeLongDescription}\r\n label={{ text: translation.long_description }}\r\n maxLength={MAX_LENGTH_LONG_DESCRIPTIONS}\r\n validation={longDescriptionValidation}\r\n wait={5}\r\n />\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","export const MAX_LENGTH_LONG_DESCRIPTIONS = 4000;\r\nexport const SHORT_DEBOUNCE_TIME = 10;\r\n","import { ComplexValue } from 'app/types-shared';\r\n\r\nexport const updateLanguages = (languageId: number, existingValues: ComplexValue<number>[], newValue: string) => {\r\n\r\n const existingDescription = existingValues ?\r\n existingValues.find(desc => desc.value === languageId)\r\n : undefined;\r\n\r\n const newDescription = {\r\n value: languageId,\r\n ...(!!newValue && { description: newValue })\r\n };\r\n\r\n const updatedValues = [\r\n ...existingValues.map(desc => desc === existingDescription && newDescription\r\n ? newDescription\r\n : desc)\r\n ];\r\n\r\n return !existingDescription && !!newDescription ? [...updatedValues, newDescription] : updatedValues;\r\n};\r\n","import React from 'react';\r\n\r\nimport styles from 'app/components/section-header/section-header.scss';\r\n\r\nexport const SectionHeader = ({ children }) =>\r\n <>\r\n <h3 className={`${styles.sectionHeader} ui-tertiary-title`}>\r\n {children}\r\n </h3>\r\n <hr className={styles.sectionSeparator} />\r\n </>;\r\n","import { ValidationProps, ValidationLevel, ValidationMessage } from 'ui/common/validation/types';\r\n\r\nexport const getLanguageValidation = (validation: ValidationProps, languageId: number,\r\n property: 'description' | 'longDescription'): ValidationProps => {\r\n const validationMessage: ValidationMessage = validation &&\r\n validation.messages.find(validationValue => !!validationValue.parameters && validationValue.parameters[property] === languageId);\r\n\r\n return !!validationMessage ? { level: ValidationLevel.error, messages: [validationMessage] } : undefined;\r\n};\r\n","import * as React from 'react';\r\nimport { MainLanguageProps } from 'app/area/codetable/item/translation/types';\r\nimport { Textarea, ButtonSecondary } from 'ui';\r\nimport { MAX_LENGTH_LONG_DESCRIPTIONS, SHORT_DEBOUNCE_TIME } from 'app/area/codetable/item/translation/constants';\r\nimport { ButtonPrimary, SectionPanel } from 'ui';\r\nimport styles from './main-language.scss';\r\nimport { getMainLanguageLongDescription, getMainLanguageDescription } from 'app/area/codetable/item/mapping/main-language';\r\nimport { getLanguageValidation } from 'app/area/codetable/item/translation/translations/get-language-validation';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\nexport class MainLanguage extends React.Component<MainLanguageProps> {\r\n\r\n private onDescriptionChange = (value: string) => {\r\n const { onDescriptionChange, mainLanguage } = this.props;\r\n onDescriptionChange(mainLanguage.value, value);\r\n }\r\n\r\n private onLongDescriptionChange = (value: string) => {\r\n const { onLongDescriptionChange, mainLanguage } = this.props;\r\n onLongDescriptionChange(mainLanguage.value, value);\r\n }\r\n\r\n private copyDescriptionToAllTranslations = () => {\r\n const { mainLanguage, codeItem, languageOptions, translation,\r\n metadata: { features }, copyDescriptionToAllTranslations } = this.props;\r\n\r\n copyDescriptionToAllTranslations({\r\n codeItem,\r\n languageOptions,\r\n features,\r\n mainLanguage,\r\n successText: translation.copied_description_to_all\r\n });\r\n }\r\n\r\n private copyLongDescriptionToAllTranslations = () => {\r\n const { mainLanguage, codeItem, languageOptions, translation,\r\n metadata: { features }, copyLongDescriptionToAllTranslations } = this.props;\r\n\r\n copyLongDescriptionToAllTranslations({\r\n codeItem,\r\n languageOptions,\r\n features,\r\n mainLanguage,\r\n successText: translation.copied_long_description_to_all\r\n });\r\n }\r\n\r\n public render() {\r\n const { showLongDescription, translation, metadata, codeItem,\r\n mainLanguage, validation } = this.props;\r\n\r\n if (!!metadata && !!metadata.features && !metadata.features.description) {\r\n return null;\r\n }\r\n\r\n const mainLanguageDescription = getMainLanguageDescription(codeItem, mainLanguage);\r\n const mainLanguageLongDescription = getMainLanguageLongDescription(codeItem, mainLanguage);\r\n\r\n const languageDescriptionValidation = getLanguageValidation(validation.language, mainLanguage.value, 'description');\r\n const languageLongDescriptionValidation = getLanguageValidation(validation.language, mainLanguage.value, 'longDescription');\r\n\r\n return <div className={styles.mainLanguage}>\r\n <SectionPanel\r\n className=\"admin-paper-top-panel\"\r\n componentId=\"descriptions_and_translations\"\r\n validation={undefined}\r\n info={{ text: translation.descriptions_and_translations }}\r\n label={{ visible: true, text: translation.descriptions_and_translations }}\r\n children=\"\" />\r\n <MainGridContainer>\r\n <div className={styles.mainLanguageContainer}>\r\n <div className={`${styles.mainLanguageInput} ${styles.mainLanguageInputWrapper}`}>\r\n <Textarea\r\n componentId={'main_language_description'}\r\n className={'mb-0'}\r\n label={{ text: translation.description, required: true }}\r\n value={!!mainLanguageDescription ? mainLanguageDescription.description : undefined}\r\n onChange={this.onDescriptionChange}\r\n readOnly={false}\r\n maxLength={254}\r\n wait={SHORT_DEBOUNCE_TIME}\r\n validation={languageDescriptionValidation}\r\n />\r\n </div>\r\n <div className={styles.mainLanguageButtonContainer}>\r\n <ButtonPrimary\r\n id={'copy_description_to_all_translations'}\r\n onClick={this.copyDescriptionToAllTranslations}\r\n classNames={styles.mainLanguageButton}\r\n >\r\n {translation.copy_description_to_all}\r\n </ButtonPrimary>\r\n </div>\r\n </div>\r\n {\r\n !!showLongDescription &&\r\n <div className={styles.mainLanguageContainer}>\r\n <div className={`${styles.mainLanguageInput} ${styles.mainLanguageInputWrapper}`}>\r\n <Textarea\r\n componentId={'main_language_long_description'}\r\n className={'mb-0'}\r\n label={{ text: translation.long_description }}\r\n value={!!mainLanguageLongDescription ? mainLanguageLongDescription.description : undefined}\r\n onChange={this.onLongDescriptionChange}\r\n readOnly={false}\r\n maxLength={MAX_LENGTH_LONG_DESCRIPTIONS}\r\n wait={SHORT_DEBOUNCE_TIME}\r\n validation={languageLongDescriptionValidation}\r\n />\r\n </div>\r\n <div className={styles.mainLanguageButtonContainer}>\r\n <ButtonSecondary\r\n id={'copy_long_description_to_all_translations'}\r\n onClick={this.copyLongDescriptionToAllTranslations}\r\n classNames={styles.mainLanguageButton}\r\n >\r\n {translation.copy_long_description_to_all}\r\n </ButtonSecondary>\r\n </div>\r\n </div>\r\n }\r\n </MainGridContainer>\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport styles from './translations-toggle.scss';\r\nimport { TranslationsToggleProps } from 'app/area/codetable/item/translation/types';\r\nimport { Switch } from 'ui/common/switch/switch';\r\n\r\nexport const TranslationsToggle: React.FC<TranslationsToggleProps> = (props: TranslationsToggleProps) => {\r\n\r\n const { isToggled, translation } = props;\r\n\r\n return (\r\n <div className={styles.translationsToggleContainer}>\r\n <div>\r\n <Switch\r\n className={styles.label}\r\n label={translation.show_translations}\r\n key=\"show_translations\"\r\n onChange={props.onChange}\r\n enabled={isToggled}\r\n />\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import { CodetableMetadata } from 'app/area/codetable/types-store';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport const shouldRenderTypes = (metadata: CodetableMetadata) =>\r\n metadata && metadata.codetableClass && isDefinedIncludingZero(metadata.codetableClass.id);\r\n\r\nexport const shouldRenderDetails = (metadata: CodetableMetadata) =>\r\n !!metadata && !!metadata.features && (metadata.features.disabled || metadata.features.sequence\r\n || metadata.features.category || metadata.features.hierarchy || (!!metadata.codetableNode && !!metadata.codetableNode.id));\r\n\r\nexport const shouldRenderVisibility = (metadata: CodetableMetadata) =>\r\n !!metadata && !!metadata.features && (metadata.features.userGroup || metadata.features.caseType || metadata.features.visible);\r\n\r\nexport const shouldRenderTranslations = (metadata: CodetableMetadata) =>\r\n !!metadata && !!metadata.features && !!metadata.features.description;\r\n","import * as React from 'react';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { TranslationRow } from 'app/area/codetable/item/translation/translations/translation-row';\r\nimport { updateLanguages } from 'app/area/codetable/item/translation/translations/update-languages';\r\nimport { TranslationsProps } from 'app/area/codetable/item/translation/types';\r\nimport { SectionHeader } from 'app/components/section-header/section-header';\r\nimport { MainLanguage } from 'app/area/codetable/item/translation/main-language/main-language';\r\nimport { getLanguageValidation } from 'app/area/codetable/item/translation/translations/get-language-validation';\r\n\r\nimport styles from './translations.scss';\r\nimport { TranslationsToggle } from 'app/area/codetable/item/translation/translations/translations-toggle';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\nimport { hasTranslationsValid } from 'app/area/codetable/item/translation/translations/has-translations-valid';\r\nimport { CodetableItemFormComponentProps } from 'app/area/codetable/item/codetable-item-form';\r\nimport { shouldRenderTranslations } from 'app/area/codetable/item/codetable-item-form-render-helpers';\r\n\r\nexport class Translations extends React.Component<Partial<CodetableItemFormComponentProps> & TranslationsProps> {\r\n\r\n private onDescriptionChange = (languageId: number, description: string) => {\r\n\r\n const { onDescriptionChange, codeItem } = this.props;\r\n\r\n const trimmedDescription = description !== undefined ? description.trim() : undefined;\r\n\r\n onDescriptionChange(languageId, updateLanguages(languageId, codeItem.description, trimmedDescription));\r\n }\r\n\r\n private onLongDescriptionChange = (languageId: number, longDescription: string) => {\r\n\r\n const { onLongDescriptionChange, codeItem } = this.props;\r\n\r\n const trimmedLongDescription = longDescription !== undefined ? longDescription.trim() : undefined;\r\n\r\n onLongDescriptionChange(languageId, updateLanguages(languageId, codeItem.longDescription, trimmedLongDescription));\r\n }\r\n\r\n public render() {\r\n const { showLongDescription, translation, options, codeItem, metadata, validation, mainLanguage,\r\n hasTranslationsToggled, switchTranslationsToggle, sectionRef,\r\n copyDescriptionToAllTranslations, copyLongDescriptionToAllTranslations } = this.props;\r\n\r\n if (!shouldRenderTranslations(metadata)) {\r\n return null;\r\n }\r\n\r\n const languageOptions = (!!options && !!options.languages && options.languages.codes || []) as ComplexValue<number>[];\r\n\r\n return <div ref={sectionRef}>\r\n <MainLanguage\r\n codeItem={codeItem}\r\n mainLanguage={mainLanguage}\r\n metadata={metadata}\r\n onDescriptionChange={this.onDescriptionChange}\r\n onLongDescriptionChange={this.onLongDescriptionChange}\r\n showLongDescription={metadata.features.longDescription}\r\n translation={translation}\r\n copyDescriptionToAllTranslations={copyDescriptionToAllTranslations}\r\n copyLongDescriptionToAllTranslations={copyLongDescriptionToAllTranslations}\r\n languageOptions={languageOptions}\r\n validation={validation}\r\n />\r\n <MainGridContainer>\r\n {!!translation && <SectionHeader>\r\n <div className={styles.sectionHeaderContainer}>\r\n {translation.translations_header}\r\n <TranslationsToggle\r\n isToggled={hasTranslationsToggled}\r\n onChange={switchTranslationsToggle}\r\n isValid={hasTranslationsValid(validation, mainLanguage)}\r\n translation={translation}\r\n />\r\n </div>\r\n </SectionHeader>}\r\n {hasTranslationsToggled && !!languageOptions\r\n && languageOptions.filter(language => language.value !== mainLanguage.value).map(language => {\r\n const description = codeItem.description && codeItem.description.find(desc => desc.value === language.value) || undefined;\r\n const longDescription = codeItem.longDescription &&\r\n codeItem.longDescription.find(desc => desc.value === language.value) || undefined;\r\n\r\n const languageDescriptionValidation = getLanguageValidation(validation.language, language.value, 'description');\r\n const languageLongDescriptionValidation = getLanguageValidation(validation.language, language.value, 'longDescription');\r\n\r\n return <TranslationRow\r\n key={language.value}\r\n languageId={language.value}\r\n showLongDescription={showLongDescription}\r\n description={description && description.description}\r\n longDescription={longDescription && longDescription.description}\r\n descriptionValidation={languageDescriptionValidation}\r\n longDescriptionValidation={languageLongDescriptionValidation}\r\n descriptionLabel={language.description}\r\n onDescriptionChange={this.onDescriptionChange}\r\n onLongDescriptionChange={this.onLongDescriptionChange}\r\n translation={translation}\r\n />;\r\n })}\r\n </MainGridContainer>\r\n </div>;\r\n }\r\n}\r\n","import { ValidationProps, ValidationMessage } from 'ui';\r\n\r\nexport const getValidationWithoutDuplicates = (validation: ValidationProps) =>\r\n ({ ...validation, messages: filterMessageDuplicates(validation) });\r\n\r\nconst filterMessageDuplicates = (validation: ValidationProps) => !!validation && !!validation.messages\r\n ? filterMessageDuplicatesInternal(validation) : [];\r\n\r\nconst filterMessageDuplicatesInternal = (validation: ValidationProps) => {\r\n let messageOcurrencesMap = {};\r\n\r\n const isAlreadyInMessages = (message: string) => !!messageOcurrencesMap[message];\r\n\r\n const markMessageAsPresent = (message: string) => { messageOcurrencesMap[message] = 1; };\r\n\r\n const result = validation.messages.map<ValidationMessage>(message => {\r\n if (isAlreadyInMessages(message.message)) {\r\n return { ...message, message: '' };\r\n } else {\r\n markMessageAsPresent(message.message);\r\n return message;\r\n }\r\n });\r\n\r\n messageOcurrencesMap = {};\r\n\r\n return result;\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { endpoints } from '../endpoints';\r\nimport { CodeMultiplePicker } from '../../common';\r\nimport { CodeMultiplePickerProps } from './types';\r\nimport { getValidationWithoutDuplicates } from 'app/area/codetable/item/code-pickers/helpers';\r\n\r\nexport const CodeCaseTypes = (props: CodeMultiplePickerProps) => {\r\n\r\n const { metadata, codeItem, onChange, options, loadOptions, translation, validation, readOnly } = props;\r\n\r\n if (!metadata || !metadata.features || !metadata.features.caseType) {\r\n return null;\r\n }\r\n\r\n const onLoadOptions = (id: string, loadOptionsParams: LoadOptions) => {\r\n loadOptions(id, endpoints.caseType, loadOptionsParams);\r\n };\r\n\r\n const codeOptions = (!!options && !!options.caseTypes && options.caseTypes.codes || []) as ComplexValue<number>[];\r\n\r\n const caseTypesValidation = !!validation && !!validation.application ? getValidationWithoutDuplicates(validation.application) : undefined;\r\n\r\n return <>\r\n <CodeMultiplePicker\r\n id=\"caseTypes\"\r\n label={translation.visible_for_case_types}\r\n valueItems={codeItem.caseTypes}\r\n validation={caseTypesValidation}\r\n options={codeOptions}\r\n fetchingOptions={options && options.caseTypes && options.caseTypes.fetching}\r\n readOnly={readOnly}\r\n \r\n translation={translation}\r\n\r\n onLoadOptions={onLoadOptions}\r\n onChange={onChange}\r\n />\r\n </>;\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { CodeSinglePicker } from '../../common';\r\nimport { CodeCodetablePickerProps } from './types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport const CodeNode = (props: CodeCodetablePickerProps) => {\r\n\r\n const { metadata, codeItem, onChange, options, loadOptions, translation, validation, readOnly } = props;\r\n\r\n if (!metadata || !metadata.codetableNode || !isDefinedIncludingZero(metadata.codetableNode.id)) {\r\n return null;\r\n }\r\n\r\n const onLoadOptions = (id: string, loadOptionsParams: LoadOptions) => {\r\n loadOptions(id, metadata.codetableNode.id, loadOptionsParams);\r\n };\r\n\r\n const codeOptions = (!!options.node && options.node.codes || []) as ComplexValue<number>[];\r\n\r\n const nodeValidation = !!validation && !!validation.node ? validation.node : undefined;\r\n\r\n return <CodeSinglePicker\r\n id=\"node\"\r\n label={translation ? translation.list_code : undefined}\r\n valueItem={codeItem.node}\r\n searchRequired={metadata.codetableNode.id && metadata.codetableNode.searchRequired}\r\n required={true}\r\n readOnly={readOnly}\r\n options={codeOptions}\r\n fetchingOptions={options.node && options.node.fetching}\r\n\r\n translation={translation}\r\n\r\n onLoadOptions={onLoadOptions}\r\n onChange={onChange}\r\n validation={nodeValidation}\r\n />;\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { CodeSinglePicker } from '../../common';\r\nimport { CodeCodetablePickerProps } from './types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport const CodeParent = (props: CodeCodetablePickerProps) => {\r\n\r\n const { metadata, codeItem, onChange, options, loadOptions, translation, validation, readOnly } = props;\r\n\r\n if (!metadata || !!metadata && !!metadata.features && !metadata.features.hierarchy) {\r\n return null;\r\n }\r\n\r\n const codetableId = !!metadata && !!metadata.codetable && isDefinedIncludingZero(metadata.codetable.id)\r\n ? metadata.codetable.id\r\n : undefined;\r\n\r\n const onLoadOptions = (id: string, loadOptionsParams: LoadOptions) => {\r\n loadOptions(id, codetableId, loadOptionsParams);\r\n };\r\n\r\n const codeOptions = (!!options.parent && options.parent.codes || []) as ComplexValue<number>[];\r\n\r\n const parentValidation = !!validation && !!validation.parent ? validation.parent : undefined;\r\n\r\n return <CodeSinglePicker\r\n id=\"parent\"\r\n label={translation ? translation.parent_code : undefined}\r\n valueItem={codeItem.parent}\r\n searchRequired={codetableId && metadata.codetable.searchRequired}\r\n readOnly={readOnly}\r\n \r\n options={codeOptions}\r\n fetchingOptions={options.parent && options.parent.fetching}\r\n\r\n translation={translation}\r\n validation={parentValidation}\r\n\r\n onLoadOptions={onLoadOptions}\r\n onChange={onChange}\r\n />;\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { endpoints } from '../endpoints';\r\nimport { CodeMultiplePicker } from '../../common';\r\nimport { CodeMultiplePickerProps } from './types';\r\nimport { getValidationWithoutDuplicates } from 'app/area/codetable/item/code-pickers/helpers';\r\n\r\nexport const CodeUserGroups = (props: CodeMultiplePickerProps) => {\r\n\r\n const { metadata, codeItem, onChange, options, loadOptions, translation, validation, readOnly } = props;\r\n\r\n if (!metadata || !metadata.features || !metadata.features.userGroup) {\r\n return null;\r\n }\r\n\r\n const onLoadOptions = (id: string, loadOptionsParams: LoadOptions) => {\r\n loadOptions(id, endpoints.userGroup, loadOptionsParams);\r\n };\r\n\r\n const codeOptions = (!!options && !!options.userGroups && options.userGroups.codes || []) as ComplexValue<number>[];\r\n\r\n const userGroupsValidation = !!validation && !!validation.subset ? getValidationWithoutDuplicates(validation.subset) : undefined;\r\n\r\n return <>\r\n <CodeMultiplePicker\r\n id=\"userGroups\"\r\n label={translation.visible_for_user_groups}\r\n valueItems={codeItem.userGroups}\r\n validation={userGroupsValidation}\r\n readOnly={readOnly}\r\n \r\n options={codeOptions}\r\n fetchingOptions={options && options.userGroups && options.userGroups.fetching}\r\n\r\n translation={translation}\r\n\r\n onLoadOptions={onLoadOptions}\r\n onChange={onChange}\r\n />\r\n </>;\r\n};\r\n","import * as React from 'react';\r\nimport { ComplexValue } from 'ui';\r\nimport { LoadOptions } from 'app/types-shared';\r\nimport { CodeSinglePicker } from '../../common';\r\nimport { CodeCodetablePickerProps } from './types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport const CodeCategory = ({ metadata, codeItem, onChange, loadOptions,\r\n options, translation, validation, readOnly }: CodeCodetablePickerProps) => {\r\n\r\n if (!metadata || !metadata.features || !metadata.features.category ||\r\n !metadata.codetableCategory || !isDefinedIncludingZero(metadata.codetableCategory.id)) {\r\n return null;\r\n }\r\n\r\n const onLoadOptions = (id: string, loadOptionsParams: LoadOptions) => {\r\n loadOptions(id, metadata.codetableCategory.id, loadOptionsParams);\r\n };\r\n\r\n const codeOptions = (!!options.category && options.category.codes || []) as ComplexValue<number>[];\r\n\r\n const isCodeEditing = isDefinedIncludingZero(codeItem.id);\r\n\r\n const categoryValidation = !!validation && !!validation.category ? validation.category : undefined;\r\n\r\n return (\r\n <CodeSinglePicker\r\n id=\"category\"\r\n label={translation ? translation.category : undefined}\r\n valueItem={codeItem.category}\r\n searchRequired={metadata.codetableCategory.id && metadata.codetableCategory.searchRequired}\r\n required={true}\r\n options={codeOptions}\r\n fetchingOptions={options.category && options.category.fetching}\r\n validation={categoryValidation}\r\n translation={translation}\r\n\r\n onLoadOptions={onLoadOptions}\r\n onChange={onChange}\r\n readOnly={isCodeEditing || readOnly}\r\n />\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { Numberbox } from 'ui';\r\nimport { CodetableMetadata } from 'app/area/codetable/types-store';\r\nimport { CodetableTranslation } from '../../constants';\r\n\r\ninterface CodeSequenceProps {\r\n codeItem: CodeItem;\r\n metadata: CodetableMetadata;\r\n onChange: (sequence: number) => void;\r\n translation: CodetableTranslation;\r\n readOnly?: boolean;\r\n}\r\n\r\nexport const CodeSequence = ({ codeItem, metadata, onChange, translation, readOnly }: CodeSequenceProps) => {\r\n if (!metadata || !metadata.features || !metadata.features.sequence) {\r\n return null;\r\n }\r\n\r\n return <div className=\"col-lg-6 col-sm-12\">\r\n <Numberbox\r\n componentId=\"code_sequence\"\r\n readOnly={readOnly}\r\n label={translation ? { text: translation.sequence } : undefined}\r\n value={codeItem.sequence}\r\n onChange={onChange}\r\n useThousand=\" \"\r\n maxValue={999999999}\r\n />\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { DateTime } from 'ui';\r\nimport { parseAsDateUTC, createUTCDate, dateToUTC, createFormatters } from 'app/infrastructure/data/date';\r\nimport { CodetableMetadata } from '../../types-store';\r\nimport { CodetableTranslation } from '../../constants';\r\n\r\ninterface CodeDisabledProps {\r\n metadata: CodetableMetadata;\r\n locale: string;\r\n disabled: Date;\r\n readOnly?: boolean;\r\n onChange: (value: Date) => void;\r\n translation: CodetableTranslation;\r\n}\r\n\r\nexport const CodeDisabled = ({ metadata, locale, disabled, readOnly, onChange, translation }: CodeDisabledProps) => {\r\n\r\n if (!metadata || !metadata.features || !metadata.features.disabled) {\r\n return null;\r\n }\r\n\r\n return <div className=\"col-lg-6 col-sm-12\">\r\n <DateTime\r\n label={translation ? { text: translation.disabled } : undefined}\r\n useTime={false}\r\n value={disabled}\r\n readOnly={readOnly}\r\n componentId=\"code_disabled_date_picker\"\r\n className=\"dateTime\"\r\n parseDate={parseAsDateUTC}\r\n createDate={createUTCDate}\r\n cloneDate={dateToUTC}\r\n locale={locale}\r\n onChange={onChange}\r\n {...createFormatters(locale)}\r\n />\r\n </div>;\r\n};\r\n","import { CodetableListState } from './list/types-store';\r\nimport { CodetableItemState } from './item/types-store';\r\nimport { TextCollection } from 'app/types-shared';\r\n\r\nexport interface CodetableFeatures {\r\n disabled: boolean;\r\n sequence?: boolean;\r\n description?: boolean;\r\n longDescription?: boolean;\r\n userGroup?: boolean; // -> subset\r\n visible?: boolean; // -> exclude\r\n caseType?: boolean; // -> application\r\n category?: boolean;\r\n hierarchy?: boolean;\r\n}\r\n\r\nexport interface CodetableMetadata {\r\n codetable: {\r\n id: number;\r\n searchRequired: boolean;\r\n };\r\n codetableClass: {\r\n id: number,\r\n searchRequired: boolean\r\n };\r\n label: string;\r\n codetableNode: {\r\n id: number;\r\n searchRequired: boolean;\r\n };\r\n codetableCategory: {\r\n id: number;\r\n searchRequired: boolean;\r\n };\r\n features: CodetableFeatures;\r\n additionalFields?: CodetableAdditionalField[];\r\n}\r\n\r\nexport interface CodetableAdditionalField {\r\n id: CodetableAdditionalFieldId;\r\n label: string;\r\n type: CodetableAdditionalFieldType;\r\n}\r\n\r\nexport enum CodetableAdditionalFieldId {\r\n companyRegisterId = 'companyRegisterId',\r\n scoreCalcWeight = 'scoreCalcWeight'\r\n}\r\n\r\nexport enum CodetableAdditionalFieldType {\r\n STRING = 'text',\r\n NUMBER = 'number'\r\n}\r\n\r\nexport interface CodetableMetadataState {\r\n fetching: number;\r\n data: CodetableMetadata;\r\n}\r\n\r\nexport interface CodetableAdministrationState {\r\n metadata: CodetableMetadataState;\r\n list: CodetableListState;\r\n item: CodetableItemState;\r\n texts: TextCollection;\r\n}\r\n","import * as React from 'react';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { Numberbox, ValidationProps } from 'ui';\r\nimport { CodetableMetadata, CodetableAdditionalField } from 'app/area/codetable/types-store';\r\n\r\nexport interface CodeNumberAdditionalFieldProps {\r\n additionalFieldData: CodetableAdditionalField;\r\n codeItem: CodeItem;\r\n metadata: CodetableMetadata;\r\n onChange: (sequence: number) => void;\r\n value: number;\r\n validation: ValidationProps;\r\n readOnly?: boolean;\r\n}\r\n\r\nexport const CodeNumberAdditionalField = ({ metadata, onChange, validation, readOnly,\r\n additionalFieldData: { id, label }, value }: CodeNumberAdditionalFieldProps) => {\r\n\r\n if (!metadata || !metadata.additionalFields || metadata.additionalFields.findIndex(field => field.id === id) === -1) {\r\n return null;\r\n }\r\n\r\n return <div className=\"col-lg-6 col-sm-12\">\r\n <Numberbox\r\n componentId={`code_number_additional_field_${id}`}\r\n label={{ text: label }}\r\n value={value}\r\n onChange={onChange}\r\n useThousand=\" \"\r\n maxValue={999999999}\r\n maxDecimals={2}\r\n validation={validation}\r\n readOnly={readOnly}\r\n />\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { Textbox, ValidationProps } from 'ui';\r\nimport { CodetableMetadata, CodetableAdditionalField } from 'app/area/codetable/types-store';\r\n\r\nexport interface CodeStringAdditionalFieldProps {\r\n additionalFieldData: CodetableAdditionalField;\r\n codeItem: CodeItem;\r\n metadata: CodetableMetadata;\r\n onChange: (value: string) => void;\r\n value: string;\r\n validation: ValidationProps;\r\n readOnly?: boolean;\r\n}\r\n\r\nexport const CodeStringAdditionalField = ({ metadata, onChange, readOnly,\r\n additionalFieldData: { id, label }, value, validation }: CodeStringAdditionalFieldProps) => {\r\n\r\n if (!metadata || !metadata.additionalFields || metadata.additionalFields.findIndex(field => field.id === id) === -1) {\r\n return null;\r\n }\r\n\r\n return <div className=\"col-lg-6 col-sm-12\">\r\n <Textbox\r\n className=\"\"\r\n label={{ text: label }}\r\n componentId={id}\r\n onChange={onChange}\r\n value={value}\r\n validation={validation}\r\n readOnly={readOnly}\r\n />\r\n </div>;\r\n};\r\n","import * as React from 'react';\r\nimport { ValidationProps } from 'ui';\r\nimport { CodetableMetadata, CodetableAdditionalFieldId, CodetableAdditionalField, CodetableAdditionalFieldType } from '../../types-store';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { CodeNumberAdditionalField } from 'app/area/codetable/item/code-additional-fields/code-number-additional-field';\r\nimport { Component } from 'react';\r\nimport { CodeStringAdditionalField } from 'app/area/codetable/item/code-additional-fields/code-string-additional-field';\r\n\r\ninterface CodeAdditionalFieldsProps {\r\n metadata: CodetableMetadata;\r\n codeItem: CodeItem;\r\n onChange: <T extends unknown>(additionalFieldId: CodetableAdditionalFieldId, value: T) => void;\r\n validation: {\r\n [key: string]: ValidationProps;\r\n };\r\n readOnly?: boolean;\r\n}\r\n\r\nexport class CodeAdditionalFields extends Component<CodeAdditionalFieldsProps> {\r\n\r\n private additionalFieldsRenderer = (additionalField: CodetableAdditionalField) => ({\r\n [CodetableAdditionalFieldType.STRING]:\r\n <CodeStringAdditionalField\r\n {...this.props}\r\n key={additionalField.id}\r\n onChange={this.createAdditionalFieldOnChange(additionalField)}\r\n validation={this.getValidation(additionalField)}\r\n additionalFieldData={additionalField}\r\n value={this.getAdditionalFieldValue(additionalField)} />,\r\n [CodetableAdditionalFieldType.NUMBER]:\r\n <CodeNumberAdditionalField\r\n {...this.props}\r\n key={additionalField.id}\r\n onChange={this.createAdditionalFieldOnChange(additionalField)}\r\n validation={this.getValidation(additionalField)}\r\n additionalFieldData={additionalField}\r\n value={this.getAdditionalFieldValue(additionalField)} />\r\n });\r\n\r\n private getValidation = (additionalField: CodetableAdditionalField): ValidationProps => this.props.validation &&\r\n this.props.validation[additionalField.id] ? this.props.validation[additionalField.id] : undefined;\r\n\r\n private createAdditionalFieldOnChange = (additionalField: CodetableAdditionalField) =>\r\n (value) => this.props.onChange(additionalField.id, value && value.trim ? value.trim() : value);\r\n\r\n private getAdditionalFieldValue = <T extends string | number>(additionalField: CodetableAdditionalField): T =>\r\n this.props.codeItem.additionalFields ? this.props.codeItem.additionalFields[additionalField.id] as T : undefined;\r\n\r\n public render() {\r\n const { metadata } = this.props;\r\n\r\n if (!metadata || !metadata.additionalFields || metadata.additionalFields.length === 0) {\r\n return null;\r\n }\r\n\r\n return <>\r\n {\r\n metadata.additionalFields.map(additionalField => this.additionalFieldsRenderer(additionalField)[additionalField.type])\r\n }\r\n </>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SectionPanel } from 'ui/section-panel/section-panel';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\nimport { CodeNode, CodeParent } from 'app/area/codetable/item/code-pickers';\r\nimport { CodeCategory } from 'app/area/codetable/item/code-pickers/code-category';\r\nimport { CodeSequence } from 'app/area/codetable/item/code-fields/code-sequence';\r\nimport { CodeDisabled } from 'app/area/codetable/item/code-fields/code-disabled';\r\nimport { CodetableItemFormComponentProps } from 'app/area/codetable/item/codetable-item-form';\r\nimport { shouldRenderDetails } from 'app/area/codetable/item/codetable-item-form-render-helpers';\r\nimport { CodeAdditionalFields } from 'app/area/codetable/item/code-additional-fields/code-additional-fields';\r\n\r\nexport const Details = ({ translation, metadata, codeItem, validation, codetableOptions,\r\n loadCodetableOptions, updateListNode, sectionRef, readOnly, updateAdditionalField,\r\n updateCodeCategory, updateParent, updateSequence, locale, updateDisabled }: Partial<CodetableItemFormComponentProps>) =>\r\n shouldRenderDetails(metadata)\r\n ? <div ref={sectionRef}>\r\n <SectionPanel\r\n className=\"admin-paper-top-panel\"\r\n componentId=\"details\"\r\n validation={undefined}\r\n info={{ text: translation.details }}\r\n label={{ visible: true, text: translation.details }}\r\n children=\"\" />\r\n <MainGridContainer>\r\n <div className=\"row\">\r\n <CodeNode\r\n readOnly={readOnly}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n validation={validation}\r\n options={codetableOptions}\r\n loadOptions={loadCodetableOptions}\r\n onChange={updateListNode}\r\n translation={translation} />\r\n <CodeCategory\r\n readOnly={readOnly}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n validation={validation}\r\n options={codetableOptions}\r\n loadOptions={loadCodetableOptions}\r\n translation={translation}\r\n onChange={updateCodeCategory} />\r\n <CodeParent\r\n readOnly={readOnly}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n validation={validation}\r\n options={codetableOptions}\r\n loadOptions={loadCodetableOptions}\r\n onChange={updateParent}\r\n translation={translation} />\r\n <CodeSequence\r\n readOnly={readOnly}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n onChange={updateSequence}\r\n translation={translation} />\r\n\r\n <CodeAdditionalFields\r\n readOnly={readOnly}\r\n validation={validation}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n onChange={updateAdditionalField}\r\n />\r\n <CodeDisabled\r\n metadata={metadata}\r\n disabled={codeItem.disabled}\r\n readOnly={readOnly}\r\n locale={locale}\r\n onChange={updateDisabled}\r\n translation={translation} />\r\n </div>\r\n </MainGridContainer>\r\n </div> : null;\r\n","import React, { useEffect } from 'react';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { VisibleForFields } from 'app/components/visible-for-fields';\r\nimport { endpoints } from 'app/area/codetable/item/endpoints';\r\nimport styles from './code-exclude.scss';\r\nimport { getValidationWithoutDuplicates } from 'app/area/codetable/item/code-pickers/helpers';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { CodeExcludeProps } from 'app/area/codetable/item/code-fields/types';\r\nimport { getDisabledOptions } from 'app/area/codetable/item/code-fields/get-disabled-options';\r\n\r\nexport const CodeExclude = (props: CodeExcludeProps) => {\r\n\r\n const { codeItem, originalCodeItem, metadata, onChange, options, loadOptions, translation, codetableId, validation, readOnly } = props;\r\n\r\n useEffect(() => {\r\n if (metadata && metadata.features && metadata.features.visible) {\r\n loadOptions('excludableFields', endpoints.excludableFields(codetableId), undefined);\r\n }\r\n }, [codetableId, metadata]);\r\n\r\n if (!metadata || !metadata.features || !metadata.features.visible) {\r\n return null;\r\n }\r\n\r\n const excludableFieldsOptions = (!!options && !!options.excludableFields && options.excludableFields.codes\r\n || []) as ComplexValue<number>[];\r\n\r\n const fetching = !!options && !!options.excludableFields && options.excludableFields.fetching;\r\n\r\n const disabledOptions = getDisabledOptions(originalCodeItem, excludableFieldsOptions);\r\n\r\n const excludeValidation = !!validation && !!validation.exclude ? getValidationWithoutDuplicates(validation.exclude) : undefined;\r\n\r\n const invalidOptionIds = !!excludeValidation ? excludeValidation.messages.map(message =>\r\n !!message.parameters && isDefinedIncludingZero(message.parameters.id) ? message.parameters.id : undefined) : [];\r\n\r\n const invalidOptions = !!excludableFieldsOptions && [...disabledOptions, ...excludableFieldsOptions].filter(option =>\r\n invalidOptionIds.some(id => id === option.value));\r\n\r\n return <div className={styles.clearRows}>\r\n <div className={`control-label ${styles.codeExcludeLabel}`}>\r\n {translation.visible_for_fields}\r\n </div>\r\n <VisibleForFields\r\n onChange={onChange}\r\n options={excludableFieldsOptions}\r\n fetching={fetching}\r\n invalidOptions={invalidOptions}\r\n onEmptyOptions={<div>{translation.no_options_found}</div>}\r\n readOnly={readOnly}\r\n valueItems={codeItem.excludeFields}\r\n initialValueItems={disabledOptions}\r\n validation={excludeValidation}\r\n loadingText={translation.loading}\r\n />\r\n </div>;\r\n};\r\n","import { CodeItem, CodetableItemState } from 'app/area/codetable/item/types-store';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { CodetableMetadata, CodetableFeatures } from 'app/area/codetable/types-store';\r\nimport { FilterOption } from 'app/components/options-handler/types';\r\nimport { CodetableSelectorProps } from 'app/area/codetable/types';\r\nimport { LoadOptions } from 'app/types-shared';\r\n\r\nexport interface CodeLanguageItemWire {\r\n v: number;\r\n d?: string;\r\n ld?: string;\r\n}\r\n\r\nexport interface CodeItemValueWire {\r\n v: number;\r\n d?: string;\r\n}\r\n\r\nexport interface AdditionalFields {\r\n companyRegisterId?: string;\r\n scoreCalcWeight?: number;\r\n}\r\n\r\nexport interface CodeItemWire {\r\n disabled: string;\r\n colour: number;\r\n icon: string;\r\n sequence: number;\r\n code: CodeItemValueWire;\r\n parent: CodeItemValueWire;\r\n node: CodeItemValueWire;\r\n category: CodeItemValueWire;\r\n language: CodeLanguageItemWire[];\r\n exclude: CodeItemValueWire[];\r\n subset: CodeItemValueWire[];\r\n application: CodeItemValueWire[];\r\n class: CodeItemValueWire[];\r\n additionalFields?: AdditionalFields;\r\n}\r\n\r\nexport interface SaveCodetableItem {\r\n codetableId: number;\r\n breadcrumbs: number[];\r\n metadata: CodetableMetadata;\r\n options: { [key: string]: FilterOption };\r\n validationErrorMessage: string;\r\n mainLanguage: ComplexValue<number>;\r\n}\r\n\r\nexport interface CopyTranslationsPayload {\r\n codeItem: CodeItem;\r\n mainLanguage: ComplexValue<number>;\r\n languageOptions: ComplexValue<number>[];\r\n features: CodetableFeatures;\r\n successText: string;\r\n}\r\n\r\nexport interface CodeToWire {\r\n codeItem: CodeItem;\r\n languageOptions: ComplexValue<number>[];\r\n features: CodetableFeatures;\r\n}\r\n\r\nexport interface CreateEmptyCodeItemPayload {\r\n metadata: CodetableMetadata;\r\n caseTypes: FilterOption;\r\n userGroups: FilterOption;\r\n languages: FilterOption;\r\n parent: ComplexValue<number>;\r\n category: ComplexValue<number>;\r\n parentId: number;\r\n}\r\n\r\nexport type LoadCodetableOptions = (id: string, codetableId: number, loadOptionsParams: LoadOptions) => any;\r\n\r\nexport type LoadCodeOptions = (id: string, componentEndpoint: string, loadOptionsParams: LoadCodeOptions, optionsParams?: any) => void;\r\n\r\nexport type LoadCodeItem = (payload: CodetableSelectorProps) => void;\r\n\r\nexport type CreateCodeItem = (payload: CodetableSelectorProps) => void;\r\n\r\nexport type CreateCodeItemProps = CodetableSelectorProps\r\n & { loadCodeItem: LoadCodeItem }\r\n & { createCodeItem: CreateCodeItem }\r\n & { loadOptions: LoadCodeOptions }\r\n & { loadCodetableOptions: LoadCodetableOptions };\r\n\r\nexport interface InitializeCodeItemPayload {\r\n breadcrumbs: number[];\r\n codetableId: number;\r\n codeId: number;\r\n parentId: number;\r\n section: string;\r\n item: CodetableItemState;\r\n createCodeItem: CreateCodeItem;\r\n loadCodeItem: LoadCodeItem;\r\n loadOptions: (id: string, componentEndpoint: string, loadOptionsParams: LoadOptions, optionsParams?: any) => void;\r\n loadCodetableOptions: LoadCodetableOptions;\r\n options: { [key: string]: FilterOption };\r\n}\r\n\r\nexport enum CodeEditSectionType {\r\n Details = 'details',\r\n Visibility = 'visibility',\r\n Translations = 'translations',\r\n Types = 'types'\r\n}\r\n","import { ComplexValue } from 'ui';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\n\r\nexport const getDisabledOptions = (originalCodeItem: CodeItem, excludableFieldsOptions: ComplexValue<number>[]) => {\r\n return (originalCodeItem && originalCodeItem.excludeFields && excludableFieldsOptions)\r\n ?\r\n originalCodeItem.excludeFields.filter(excludeField =>\r\n excludableFieldsOptions.every(option => option.value !== excludeField.value)\r\n )\r\n : [];\r\n};\r\n","import * as React from 'react';\r\nimport { SectionPanel } from 'ui/section-panel/section-panel';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\nimport { CodetableItemFormComponentProps } from 'app/area/codetable/item/codetable-item-form';\r\nimport { CodeUserGroups, CodeCaseTypes } from 'app/area/codetable/item/code-pickers';\r\nimport { CodeExclude } from 'app/area/codetable/item/code-fields';\r\nimport { shouldRenderVisibility } from 'app/area/codetable/item/codetable-item-form-render-helpers';\r\n\r\nexport const Visibility = ({ translation, metadata, codeItem, loadOptions, options, codetableId, originalCodeItem, readOnly,\r\n updateUserGroups, updateCaseTypes, updateExcludedFields, sectionRef, validation }: Partial<CodetableItemFormComponentProps>) =>\r\n shouldRenderVisibility(metadata)\r\n ? <div ref={sectionRef}>\r\n <SectionPanel\r\n className=\"admin-paper-top-panel\"\r\n componentId=\"visibility\"\r\n validation={undefined}\r\n info={{ text: translation.visibility }}\r\n label={{ visible: true, text: translation.visibility }}\r\n children=\"\" />\r\n <MainGridContainer>\r\n <div className=\"row\">\r\n <CodeUserGroups\r\n readOnly={readOnly}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n options={options}\r\n validation={validation}\r\n loadOptions={loadOptions}\r\n onChange={updateUserGroups}\r\n translation={translation} />\r\n <CodeCaseTypes\r\n readOnly={readOnly}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n options={options}\r\n validation={validation}\r\n loadOptions={loadOptions}\r\n onChange={updateCaseTypes}\r\n translation={translation} />\r\n <CodeExclude\r\n readOnly={readOnly}\r\n codetableId={codetableId}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n validation={validation}\r\n originalCodeItem={originalCodeItem}\r\n options={options}\r\n loadOptions={loadOptions}\r\n onChange={updateExcludedFields}\r\n translation={translation} />\r\n </div>\r\n </MainGridContainer>\r\n </div>\r\n : null;\r\n","import * as React from 'react';\r\nimport { ComplexValue, LoadOptions } from 'app/types-shared';\r\nimport { CodeMultiplePicker } from '../../common';\r\nimport { CodeMultiplePickerProps } from './types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { LoadCodetableOptions } from 'app/area/codetable/item/types';\r\nimport { RefObject } from 'react';\r\nimport { SectionPanel } from 'ui';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\nexport const CodeCodetableTypes = (props: CodeMultiplePickerProps\r\n & { loadCodetableOptions: LoadCodetableOptions } & { sectionRef?: RefObject<HTMLDivElement>; readOnly?: boolean; }) => {\r\n\r\n const { metadata, codeItem, onChange, options, loadCodetableOptions, translation, sectionRef, readOnly } = props;\r\n\r\n if (!(metadata && metadata.codetableClass && isDefinedIncludingZero(metadata.codetableClass.id))) {\r\n return null;\r\n }\r\n\r\n const onLoadOptions = (id: string, loadOptionsParams: LoadOptions) => {\r\n loadCodetableOptions(id, metadata.codetableClass.id, loadOptionsParams);\r\n };\r\n\r\n const typeOptions = (!!options && !!options.codetableTypes && options.codetableTypes.codes || []) as ComplexValue<number>[];\r\n\r\n return <div ref={sectionRef}>\r\n <SectionPanel\r\n className=\"admin-paper-top-panel\"\r\n componentId=\"types\"\r\n validation={undefined}\r\n info={{ text: translation.types }}\r\n label={{ visible: true, text: translation.types }}\r\n children=\"\" />\r\n <MainGridContainer>\r\n <div className=\"row\">\r\n <CodeMultiplePicker\r\n id=\"codetableTypes\"\r\n label={translation.types}\r\n valueItems={codeItem.codetableTypes}\r\n readOnly={readOnly}\r\n\r\n options={typeOptions}\r\n fetchingOptions={options && options.codetableTypes && options.codetableTypes.fetching}\r\n searchRequired={metadata.codetableClass.searchRequired}\r\n translation={translation}\r\n\r\n onLoadOptions={onLoadOptions}\r\n onChange={onChange}\r\n />\r\n </div>\r\n </MainGridContainer>\r\n </div>\r\n ;\r\n};\r\n","import * as React from 'react';\r\nimport { OptionsProps } from 'app/components/options-handler';\r\nimport { CodetableMetadata } from 'app/area/codetable/types-store';\r\nimport { CodetableTranslation } from '../constants';\r\nimport { CodeItem } from './types-store';\r\nimport { actionCreators } from './actions';\r\nimport { CodetableOptions } from '../common';\r\nimport { Translations } from 'app/area/codetable/item/translation/translations';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { ValidationProps } from 'ui/common/validation/types';\r\nimport { Details } from 'app/area/codetable/item/details/details';\r\nimport { Visibility } from 'app/area/codetable/item/visibility/visibility';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { Component, RefObject } from 'react';\r\nimport { CodeEditSectionType } from 'app/area/codetable/item/types';\r\nimport styles from './codetable-item-form.scss';\r\nimport { withMetroLine } from 'app/components/metro-line/with-metro-line';\r\nimport { WithMetroLineProps, WithMetroLineWrappedComponentProps } from 'app/components/metro-line/types';\r\nimport { MetroLineSection } from 'app/components/metro-line/metro-line-section';\r\nimport { CodeCodetableTypes } from 'app/area/codetable/item/code-pickers/code-type';\r\nimport { shouldRenderTypes } from 'app/area/codetable/item/codetable-item-form-render-helpers';\r\n\r\ninterface CodetableItemFormExternalProps extends WithMetroLineProps<CodeEditSectionType> {\r\n codetableId: number;\r\n section: string;\r\n codeItem: CodeItem;\r\n originalCodeItem: CodeItem;\r\n metadata: CodetableMetadata;\r\n language: ComplexValue<number>;\r\n locale: string;\r\n translation: CodetableTranslation;\r\n hasTranslationsToggled: boolean;\r\n codetableOptions: { [key: string]: CodetableOptions };\r\n validation: { [key: string]: ValidationProps };\r\n sectionRef?: RefObject<HTMLDivElement>;\r\n hasBigStickyHeader?: boolean;\r\n readOnly?: boolean;\r\n}\r\n\r\nexport type CodetableItemFormComponentProps = CodetableItemFormExternalProps & OptionsProps\r\n & Partial<typeof actionCreators> & WithMetroLineProps<CodeEditSectionType> & WithMetroLineWrappedComponentProps<CodeEditSectionType>;\r\n\r\nexport class CodetableItemFormComponent extends Component<CodetableItemFormComponentProps> {\r\n\r\n public render() {\r\n const {\r\n metadata, language, switchTranslationsToggle, getRef, hasBigStickyHeader, codetableOptions, readOnly,\r\n copyDescriptionToAllTranslations, copyLongDescriptionToAllTranslations, loadOptions, translation,\r\n updateDescription, updateLongDescription, codeItem, loadCodetableOptions, updateCodetableTypes\r\n } = this.props;\r\n\r\n const renderTranslationsOnTop = shouldRenderTranslationsOnTop(codeItem);\r\n const shouldRenderTypesSection = shouldRenderTypes(metadata);\r\n\r\n return <div className={styles.codetableItemForm}>\r\n <div>\r\n {renderTranslationsOnTop && <MetroLineSection<CodeEditSectionType>\r\n {...this.props}\r\n sectionType={CodeEditSectionType.Translations}\r\n hasBigStickyHeader={hasBigStickyHeader}\r\n >\r\n <Translations\r\n sectionRef={getRef(CodeEditSectionType.Translations)}\r\n {...this.props}\r\n metadata={metadata}\r\n mainLanguage={language}\r\n copyDescriptionToAllTranslations={copyDescriptionToAllTranslations}\r\n copyLongDescriptionToAllTranslations={copyLongDescriptionToAllTranslations}\r\n switchTranslationsToggle={switchTranslationsToggle}\r\n showLongDescription={metadata.features.longDescription}\r\n onDescriptionChange={updateDescription}\r\n onLongDescriptionChange={updateLongDescription}\r\n />\r\n </MetroLineSection>\r\n }\r\n <MetroLineSection<CodeEditSectionType>\r\n {...this.props}\r\n sectionType={CodeEditSectionType.Details}\r\n hasBigStickyHeader={hasBigStickyHeader}\r\n >\r\n <Details\r\n sectionRef={getRef(CodeEditSectionType.Details)}\r\n {...this.props}\r\n />\r\n </MetroLineSection>\r\n <MetroLineSection<CodeEditSectionType>\r\n {...this.props}\r\n sectionType={CodeEditSectionType.Visibility}\r\n hasBigStickyHeader={hasBigStickyHeader}\r\n >\r\n <Visibility\r\n sectionRef={getRef(CodeEditSectionType.Visibility)}\r\n {...this.props}\r\n />\r\n </MetroLineSection>\r\n {shouldRenderTypesSection && <MetroLineSection<CodeEditSectionType>\r\n {...this.props}\r\n sectionType={CodeEditSectionType.Types}\r\n hasBigStickyHeader={hasBigStickyHeader}\r\n >\r\n <CodeCodetableTypes\r\n sectionRef={getRef(CodeEditSectionType.Types)}\r\n readOnly={readOnly}\r\n metadata={metadata}\r\n codeItem={codeItem}\r\n options={codetableOptions}\r\n loadOptions={loadOptions}\r\n loadCodetableOptions={loadCodetableOptions}\r\n onChange={updateCodetableTypes}\r\n translation={translation} />\r\n </MetroLineSection>\r\n }\r\n {!renderTranslationsOnTop && <MetroLineSection<CodeEditSectionType>\r\n {...this.props}\r\n sectionType={CodeEditSectionType.Translations}\r\n hasBigStickyHeader={hasBigStickyHeader}\r\n >\r\n <Translations\r\n sectionRef={getRef(CodeEditSectionType.Translations)}\r\n {...this.props}\r\n metadata={metadata}\r\n mainLanguage={language}\r\n copyDescriptionToAllTranslations={copyDescriptionToAllTranslations}\r\n copyLongDescriptionToAllTranslations={copyLongDescriptionToAllTranslations}\r\n switchTranslationsToggle={switchTranslationsToggle}\r\n showLongDescription={metadata.features.longDescription}\r\n onDescriptionChange={updateDescription}\r\n onLongDescriptionChange={updateLongDescription}\r\n />\r\n </MetroLineSection>\r\n }\r\n </div>\r\n </div>;\r\n }\r\n}\r\n\r\nexport const CodetableItemForm = withMetroLine<CodetableItemFormExternalProps, CodeEditSectionType>()(CodetableItemFormComponent);\r\n\r\nconst shouldRenderTranslationsOnTop = (codeItem: CodeItem) => !isDefinedIncludingZero(codeItem.id);\r\n","import { CodetableAdministrationState } from 'app/area/codetable/types-store';\r\nimport isEqual from 'lodash/isequal';\r\nimport sortBy from 'lodash/sortby';\r\nimport isNumber from 'lodash/isnumber';\r\nimport isString from 'lodash/isstring';\r\nimport isBoolean from 'lodash/isboolean';\r\nimport isNil from 'lodash/isnil';\r\nimport isDate from 'lodash/isdate';\r\nimport { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { isArray } from 'util';\r\nimport { ComplexValue } from 'app/infrastructure/ui/form/types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { TranslatedState } from 'app/types-shared';\r\nimport { AdditionalFields } from 'app/area/codetable/item/types';\r\n\r\nconst comparableByDescription: string[] = ['description', 'longDescription'];\r\n\r\nconst additionalFields = 'additionalFields';\r\n\r\nconst isPrimitive = (value: any) => isNil(value) || isNumber(value) || isBoolean(value) || isString(value) || typeof value === 'symbol';\r\n\r\nconst shouldCompareShallowly = (source: any, compared: any) =>\r\n source === undefined && compared === undefined ||\r\n source === undefined && compared !== undefined && isPrimitive(compared) ||\r\n source !== undefined && isPrimitive(source) && compared === undefined ||\r\n source !== undefined && compared !== undefined && isPrimitive(source) && isPrimitive(compared);\r\n\r\nconst shouldCompareDeeply = (source: CodeItemPropertyValue, compared: CodeItemPropertyValue, property: keyof CodeItem) =>\r\n isDate(source) || isDate(compared);\r\n\r\nconst isDefinedPropertyMissing = (source: CodeItem, compared: CodeItem, property: keyof CodeItem): boolean =>\r\n !compared.hasOwnProperty(property) && source[property] !== undefined;\r\n\r\nconst isUndefinedPropertyMissing = (source: CodeItem, compared: CodeItem, property: keyof CodeItem) =>\r\n !compared.hasOwnProperty(property) &&\r\n (source[property] === undefined || (isArray(source[property]) && (source[property] as []).length === 0));\r\n\r\nconst addDefinedPropertyToDiff = (\r\n source: CodeItem,\r\n compared: CodeItem,\r\n property: keyof CodeItem,\r\n diff: (keyof CodeItem)[]\r\n): (keyof CodeItem)[] => isDefinedPropertyMissing(source, compared, property) ? [...diff, property] : diff;\r\n\r\nconst removePropertyFromDiff = (diff: (keyof CodeItem)[], property: keyof CodeItem): (keyof CodeItem)[] => {\r\n const propertyInDiffIndex = diff.indexOf(property);\r\n const isPropertyInDiff = propertyInDiffIndex > -1;\r\n\r\n return isPropertyInDiff ? [...diff.slice(0, propertyInDiffIndex), ...diff.slice(propertyInDiffIndex + 1, diff.length)] : diff;\r\n};\r\n\r\nconst removeUndefinedProperty = (\r\n source: CodeItem,\r\n compared: CodeItem,\r\n property: keyof CodeItem,\r\n diff: (keyof CodeItem)[]\r\n): (keyof CodeItem)[] => isUndefinedPropertyMissing(source, compared, property) ? removePropertyFromDiff(diff, property) : diff;\r\n\r\nconst removeUndefinedProperties = (source: CodeItem, compared: CodeItem): (keyof CodeItem)[] =>\r\n Object.keys(compared).reduce<(keyof CodeItem)[]>((diff, property) =>\r\n removeUndefinedProperty(compared, source, property as keyof CodeItem, diff),\r\n Object.keys(compared) as (keyof CodeItem)[]);\r\n\r\ntype CodeItemPropertyValue = string | number | ComplexValue<number> | ComplexValue<number>[] | Date | AdditionalFields;\r\n\r\nconst isNotDefined = (complexValue: ComplexValue<number>) => !complexValue || complexValue.value === undefined;\r\n\r\nconst isDescriptionProperty = (property: string) => comparableByDescription.indexOf(property) !== -1;\r\n\r\nconst isAdditionalFields = (property: string) => property === additionalFields;\r\n\r\nconst filterDescriptionUndefineds = (property: ComplexValue<number>[]): ComplexValue<number>[] =>\r\n (property as ComplexValue<number>[]).reduce((properties, current) =>\r\n !isDefinedAfterTrim(current && current.description) || !current.description ? properties : [...properties, current], []);\r\n\r\nconst filterUndefineds = (property: ComplexValue<number>[]): ComplexValue<number>[] =>\r\n (property as ComplexValue<number>[]).reduce((properties, current) =>\r\n isNotDefined(current) ? properties : [...properties, current], []);\r\n\r\nconst filterUndefinedValues = (\r\n property: keyof CodeItem,\r\n validOriginalValues: ComplexValue<number>[],\r\n originalCodeItemProperty: CodeItemPropertyValue,\r\n validCurrentValues: ComplexValue<number>[],\r\n codeItemProperty: CodeItemPropertyValue\r\n) => {\r\n if (isDescriptionProperty(property)) {\r\n validOriginalValues = originalCodeItemProperty ?\r\n filterDescriptionUndefineds(originalCodeItemProperty as ComplexValue<number>[]) : [];\r\n validCurrentValues = codeItemProperty ? filterDescriptionUndefineds(codeItemProperty as ComplexValue<number>[]) : [];\r\n }\r\n else {\r\n validOriginalValues = originalCodeItemProperty ? filterUndefineds(originalCodeItemProperty as ComplexValue<number>[]) : [];\r\n validCurrentValues = codeItemProperty ? filterUndefineds(codeItemProperty as ComplexValue<number>[]) : [];\r\n }\r\n\r\n return { validOriginalValues, validCurrentValues };\r\n};\r\n\r\nconst hasEqualValues = (sourceProperty: CodeItemPropertyValue, comparedProperty: CodeItemPropertyValue): boolean =>\r\n isNotDefined(sourceProperty as ComplexValue<number>) && isNotDefined(comparedProperty as ComplexValue<number>) ||\r\n sourceProperty && comparedProperty &&\r\n (sourceProperty as ComplexValue<number>).value === (comparedProperty as ComplexValue<number>).value;\r\n\r\nconst hasEqualDescriptions = (sourceProperty: ComplexValue<number>, comparedProperty: ComplexValue<number>): boolean => {\r\n return isNotDefined(sourceProperty) && isNotDefined(comparedProperty) ||\r\n !isDefinedAfterTrim(sourceProperty && sourceProperty.description)\r\n && !isDefinedAfterTrim(comparedProperty && sourceProperty.description) ||\r\n sourceProperty && comparedProperty &&\r\n String(sourceProperty.description).trim() === String(comparedProperty.description).trim() &&\r\n sourceProperty.value === comparedProperty.value;\r\n};\r\n\r\nconst arePropertiesEqual = (\r\n validOriginalValues: ComplexValue<number>[],\r\n validCurrentValues: ComplexValue<number>[],\r\n property: keyof CodeItem) => {\r\n\r\n if (validOriginalValues.length !== validCurrentValues.length) {\r\n return false;\r\n }\r\n\r\n const areOriginalValuesInCurrentCodeItem = validOriginalValues.every(originalValue =>\r\n validCurrentValues.find(currentValue => isPropertyEqual(property, originalValue, currentValue)) !== undefined\r\n );\r\n\r\n if (!areOriginalValuesInCurrentCodeItem) {\r\n return false;\r\n }\r\n\r\n return validCurrentValues.every(currentValue =>\r\n validOriginalValues.find(originalValue => isPropertyEqual(property, originalValue, currentValue)) !== undefined\r\n );\r\n};\r\n\r\nconst isPropertyEqual = (\r\n property: keyof CodeItem,\r\n originalCodeItemProperty: CodeItemPropertyValue,\r\n codeItemProperty: CodeItemPropertyValue\r\n): boolean => {\r\n if (shouldCompareShallowly(originalCodeItemProperty, codeItemProperty)) {\r\n\r\n return String(originalCodeItemProperty).trim() === String(codeItemProperty).trim();\r\n\r\n } else if (shouldCompareDeeply(originalCodeItemProperty, codeItemProperty, property)) {\r\n\r\n return isEqual(originalCodeItemProperty, codeItemProperty);\r\n\r\n } else {\r\n\r\n if (isArray(originalCodeItemProperty) || isArray(codeItemProperty)) {\r\n\r\n let validOriginalValues: ComplexValue<number>[];\r\n let validCurrentValues: ComplexValue<number>[];\r\n\r\n ({ validOriginalValues, validCurrentValues } = filterUndefinedValues(\r\n property,\r\n validOriginalValues,\r\n originalCodeItemProperty,\r\n validCurrentValues,\r\n codeItemProperty)\r\n );\r\n\r\n return arePropertiesEqual(validOriginalValues, validCurrentValues, property);\r\n\r\n } else {\r\n\r\n if (isDescriptionProperty(property)) {\r\n return hasEqualDescriptions(originalCodeItemProperty as ComplexValue<number>, codeItemProperty as ComplexValue<number>);\r\n }\r\n\r\n else if (isAdditionalFields(property)) {\r\n return typeof codeItemProperty === 'string'\r\n ? hasEqualDescriptions({ description: originalCodeItemProperty as string, value: undefined },\r\n { description: codeItemProperty as string, value: undefined })\r\n : isEqual(originalCodeItemProperty, codeItemProperty);\r\n }\r\n\r\n else {\r\n return hasEqualValues(originalCodeItemProperty, codeItemProperty);\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst isDefinedAfterTrim = (value: string) => value !== undefined && isDefinedIncludingZero(String(value).trim());\r\n\r\nconst removeEqualPropertiesFromDiff = (\r\n originalCodeItem: CodeItem,\r\n codeItem: CodeItem,\r\n property: keyof CodeItem,\r\n diff: (keyof CodeItem)[]\r\n) => isPropertyEqual(property, originalCodeItem[property], codeItem[property]) ? removePropertyFromDiff(diff, property) : diff;\r\n\r\nconst getObjectsDiff = (state: State) => {\r\n const { item: { originalCodeItem, codeItem, savingCodetableItem, deletingCodeItem } } = state;\r\n\r\n if (deletingCodeItem || savingCodetableItem || !originalCodeItem || !codeItem) {\r\n return [];\r\n }\r\n\r\n return Object.keys(originalCodeItem).reduce<(keyof CodeItem)[]>((diff, property) => {\r\n diff = removeUndefinedProperty(originalCodeItem, codeItem, property as keyof CodeItem, diff);\r\n diff = addDefinedPropertyToDiff(originalCodeItem, codeItem, property as keyof CodeItem, diff);\r\n diff = removeEqualPropertiesFromDiff(originalCodeItem, codeItem, property as keyof CodeItem, diff);\r\n return diff;\r\n }, removeUndefinedProperties(originalCodeItem, codeItem));\r\n};\r\n\r\nconst isNotEmpty = (diff: string[]) => !isEqual(sortBy(diff), []);\r\n\r\ntype State = CodetableAdministrationState & TranslatedState;\r\n\r\nexport const selectors = {\r\n shouldPrompt: (state: State, _: any) => {\r\n const diff = getObjectsDiff(state);\r\n return isNotEmpty(diff);\r\n }\r\n};\r\n","import { InitializeCodeItemPayload } from 'app/area/codetable/item/types';\r\n\r\nexport const initializeCodeItem = (payload: InitializeCodeItemPayload): void => {\r\n const { loadCodeItem, createCodeItem } = payload;\r\n shouldCreateNewCodeItem(payload) ? createCodeItem(payload) : loadCodeItem(payload);\r\n};\r\n\r\nconst shouldCreateNewCodeItem = (payload: InitializeCodeItemPayload) => {\r\n const { codeId } = payload;\r\n return !codeId && codeId !== 0;\r\n};\r\n\r\nconst hasPayloadChanged = (payload: InitializeCodeItemPayload, prevProps: InitializeCodeItemPayload) => {\r\n const { codetableId, codeId, parentId } = payload;\r\n return codetableId !== prevProps.codetableId || codeId !== prevProps.codeId || parentId !== prevProps.parentId;\r\n};\r\n\r\nexport const reinitializeCodeItem = (payload: InitializeCodeItemPayload, previousPayload: InitializeCodeItemPayload): void => {\r\n const { codetableId, item: { fetchingCodeId } } = payload;\r\n\r\n if (!!codetableId && fetchingCodeId === undefined && hasPayloadChanged(payload, previousPayload)) {\r\n initializeCodeItem(payload);\r\n }\r\n};\r\n","import { CodeItem } from 'app/area/codetable/item/types-store';\r\nimport { CodetableMetadata } from 'app/area/codetable/types-store';\r\nimport { ValidationProps, ValidationLevel } from 'ui/common/validation/types';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { CodetableTranslation } from 'app/area/codetable/constants';\r\n\r\nexport const validate = (\r\n codeItem: CodeItem,\r\n metadata: CodetableMetadata,\r\n translation: CodetableTranslation,\r\n validation: { [key: string]: ValidationProps } = {}\r\n): { [key: string]: ValidationProps } => {\r\n\r\n const translationsValidation = validateDescriptions(codeItem, metadata, translation);\r\n const nodeValidation = validateNode(codeItem, metadata, translation);\r\n const categoryValidation = validateCategory(codeItem, metadata, translation);\r\n const parentValidation = !!validation ? validation.parent : undefined;\r\n\r\n return { parent: parentValidation, ...translationsValidation, ...nodeValidation, ...categoryValidation };\r\n};\r\n\r\nconst validateDescriptions = (\r\n codeItem: CodeItem,\r\n metadata: CodetableMetadata,\r\n translation: CodetableTranslation\r\n): { language: ValidationProps } => {\r\n if (metadata.features.description) {\r\n const emptyTranslations = codeItem.description.reduce((accumulator, description) =>\r\n description.description === '' || description.description === undefined ? [...accumulator, description.value] : accumulator, []);\r\n\r\n return emptyTranslations.length === 0\r\n ? { language: undefined }\r\n : {\r\n language: {\r\n level: ValidationLevel.error, messages: emptyTranslations.map(id => ({\r\n level: ValidationLevel.error,\r\n message: translation.must_be_filled_out,\r\n parameters: {\r\n description: id\r\n }\r\n }))\r\n }\r\n };\r\n }\r\n\r\n return { language: undefined };\r\n};\r\n\r\nconst validateNode = (\r\n codeItem: CodeItem,\r\n metadata: CodetableMetadata,\r\n translation: CodetableTranslation\r\n): { node: ValidationProps } => {\r\n if (!!metadata && !!metadata.codetableNode && isDefinedIncludingZero(metadata.codetableNode.id)) {\r\n return {\r\n node: !!codeItem.node && isDefinedIncludingZero(codeItem.node.value) ? undefined : {\r\n level: ValidationLevel.error,\r\n messages: [{\r\n level: ValidationLevel.error,\r\n message: translation.must_be_filled_out\r\n }]\r\n }\r\n };\r\n }\r\n\r\n return { node: undefined };\r\n};\r\n\r\nconst validateCategory = (\r\n codeItem: CodeItem,\r\n metadata: CodetableMetadata,\r\n translation: CodetableTranslation\r\n): { category: ValidationProps } => {\r\n if (!!metadata && !!metadata.codetableCategory && isDefinedIncludingZero(metadata.codetableCategory.id)\r\n && !!metadata.features && metadata.features.category) {\r\n return {\r\n category: !!codeItem.category && isDefinedIncludingZero(codeItem.category.value) ? undefined : {\r\n level: ValidationLevel.error,\r\n messages: [{\r\n level: ValidationLevel.error,\r\n message: translation.must_be_filled_out\r\n }]\r\n }\r\n };\r\n }\r\n\r\n return { category: undefined };\r\n};\r\n","import { routeConstants } from 'app/routes/route-constants';\r\nimport { CodetableTranslation } from 'app/area/codetable/constants';\r\nimport { CodeEditSectionType } from 'app/area/codetable/item/types';\r\nimport { Configuration } from 'app/components/metro-line/types';\r\nimport { RefObject } from 'react';\r\nimport { CodetableMetadata } from 'app/area/codetable/types-store';\r\nimport { shouldRenderDetails, shouldRenderVisibility, shouldRenderTranslations, shouldRenderTypes } from 'app/area/codetable/item/codetable-item-form-render-helpers';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport const metroLineConfiguration = (detailsSectionRef: RefObject<HTMLDivElement>, visibilitySectionRef: RefObject<HTMLDivElement>,\r\n translationsSectionRef: RefObject<HTMLDivElement>, typesRef: RefObject<HTMLDivElement>, breadcrumbs: number[], codeId: number,\r\n metadata: CodetableMetadata): Configuration<CodeEditSectionType>[] => {\r\n\r\n const toAddingCodeUrl = (configurationItem: Configuration<CodeEditSectionType>): Configuration<CodeEditSectionType> =>\r\n !isDefinedIncludingZero(codeId)\r\n ? {\r\n ...configurationItem,\r\n url: routeConstants.codetableAdministrationAddCodeSectionFor(breadcrumbs, configurationItem.section)\r\n }\r\n : configurationItem;\r\n\r\n const filterInvisibles = (configurationItem: Configuration<CodeEditSectionType>): boolean => configurationItem.visible;\r\n\r\n const configuration: Configuration<CodeEditSectionType>[] = [\r\n {\r\n section: CodeEditSectionType.Details,\r\n visible: shouldRenderDetails(metadata),\r\n iconUrl: '/i/case-sections/default.svg',\r\n url: routeConstants.codetableAdministrationCodeSectionFor(breadcrumbs, codeId, CodeEditSectionType.Details),\r\n label: (translation: CodetableTranslation) => translation.details,\r\n ref: detailsSectionRef\r\n },\r\n {\r\n section: CodeEditSectionType.Visibility,\r\n visible: shouldRenderVisibility(metadata),\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.codetableAdministrationCodeSectionFor(breadcrumbs, codeId, CodeEditSectionType.Visibility),\r\n label: (translation: CodetableTranslation) => translation.visibility,\r\n ref: visibilitySectionRef\r\n },\r\n {\r\n section: CodeEditSectionType.Types,\r\n visible: shouldRenderTypes(metadata),\r\n iconUrl: '/i/case-sections/default.svg',\r\n url: routeConstants.codetableAdministrationCodeSectionFor(breadcrumbs, codeId, CodeEditSectionType.Types),\r\n label: (translation: CodetableTranslation) => translation.types,\r\n ref: typesRef\r\n },\r\n {\r\n section: CodeEditSectionType.Translations,\r\n visible: shouldRenderTranslations(metadata),\r\n url: routeConstants.codetableAdministrationCodeSectionFor(breadcrumbs, codeId, CodeEditSectionType.Translations),\r\n iconUrl: '/i/case-sections/actions.svg',\r\n label: (translation: CodetableTranslation) => translation.descriptions_and_translations,\r\n ref: translationsSectionRef\r\n }].filter(filterInvisibles)\r\n .map(toAddingCodeUrl);\r\n\r\n const translationsIndex = configuration.findIndex(configurationItem => configurationItem.section === CodeEditSectionType.Translations);\r\n const shouldShowTranslationsFirst = !isDefinedIncludingZero(codeId) && translationsIndex > -1;\r\n\r\n return shouldShowTranslationsFirst\r\n ? [configuration[translationsIndex],\r\n ...configuration.filter(configurationItem => configurationItem.section !== CodeEditSectionType.Translations)]\r\n : configuration;\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { SpinLoader, OverlayComponent, withPrompt, PromptProps } from 'app/components';\r\nimport { withOptions, OptionsProps } from 'app/components/options-handler';\r\nimport { PromptConfirmation } from 'ui';\r\nimport { CodetableStickyHeader } from 'app/area/codetable/item/sticky-header/codetable-sticky-header';\r\nimport { CodetableSelectorProps } from 'app/area/codetable/types';\r\nimport { actionCreators } from './actions';\r\nimport { CodetableItemForm } from './codetable-item-form';\r\nimport { CodetableAdministrationState } from '../types-store';\r\nimport { codetableAdministrationTranslation } from '../constants';\r\nimport { selectors as commonSelectors, getCodetableMetadata } from '../selectors';\r\nimport { selectors as codeItemSelectors } from './selectors';\r\nimport { initializeCodeItem, reinitializeCodeItem } from 'app/area/codetable/item/codetable-item-helpers';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\nimport { validate } from 'app/area/codetable/item/validation/validate';\r\nimport { getUserLanguageTranslation } from 'app/area/codetable/item/actions-helpers';\r\nimport { metroLineConfiguration } from 'app/area/codetable/item/configuration';\r\nimport { RefObject } from 'react';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { CodeEditSectionType } from 'app/area/codetable/item/types';\r\nimport { getCodetableId } from 'app/area/codetable/helpers';\r\n\r\nexport type CodetableItemComponentProps = DefaultContainerProps & OptionsProps & PromptProps &\r\n CodetableAdministrationState & CodetableSelectorProps & typeof actionCreators;\r\n\r\nexport class CodetableItemComponent extends React.PureComponent<CodetableItemComponentProps> {\r\n public static statePath: string = STATE.administrationCodetable;\r\n\r\n private detailsSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private visibilitySectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private translationsSectionRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n private typesRef: RefObject<HTMLDivElement> = React.createRef<HTMLDivElement>();\r\n\r\n public componentDidMount() {\r\n initializeCodeItem(this.getPropsWithCodetableId(this.props));\r\n }\r\n\r\n public componentDidUpdate(prevProps: CodetableItemComponentProps) {\r\n reinitializeCodeItem(this.getPropsWithCodetableId(this.props), this.getPropsWithCodetableId(prevProps));\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.resetForm();\r\n }\r\n\r\n private getPropsWithCodetableId = (props: CodetableItemComponentProps) => (props\r\n ? { ...props, codetableId: getCodetableId(props.breadcrumbs) }\r\n : undefined\r\n );\r\n\r\n private save = () => {\r\n const { saveCodetableItem, updateValidation, metadata: { data: metadata }, breadcrumbs,\r\n options, item: { codeItem, validation }, translation, sharedState: { language } } = this.props;\r\n\r\n updateValidation(validate(codeItem, metadata, translation, validation));\r\n\r\n saveCodetableItem({\r\n codetableId: getCodetableId(breadcrumbs), breadcrumbs,\r\n metadata, options, mainLanguage: language, validationErrorMessage: translation.validation_error\r\n });\r\n }\r\n\r\n private resetForm = () => {\r\n const { resetCodeItem, clearValidation } = this.props;\r\n\r\n clearValidation();\r\n resetCodeItem();\r\n }\r\n\r\n private deleteCodeItem = () => {\r\n const { deleteCodeItem, translation, codeId, breadcrumbs } = this.props;\r\n\r\n deleteCodeItem({ breadcrumbs, codeId, successMessage: translation.code_item_successfully_deleted });\r\n }\r\n\r\n private getCodeItemDisplayedName = (): string => {\r\n const { codeId, item: { codeItem: { node, description: descriptions } }, sharedState: { language } } = this.props;\r\n\r\n if (!isDefinedIncludingZero(codeId)) {\r\n return undefined;\r\n }\r\n\r\n if (!!node && !!node.description) {\r\n return node.description;\r\n }\r\n\r\n const userLanguageDescription = !!descriptions && descriptions.find(description => description.value === language.value);\r\n\r\n if (!!userLanguageDescription && !!userLanguageDescription.description) {\r\n return userLanguageDescription.description;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n public render() {\r\n\r\n const { item: { fetchingCodeId, fetchingCreateOptions, codeItem, savingCodetableItem, deletingCodeItem },\r\n metadata: { data }, breadcrumbs, translation, sharedState: { language } } = this.props;\r\n\r\n if (fetchingCodeId !== undefined || !codeItem || fetchingCreateOptions || !codeItem) {\r\n return <SpinLoader />;\r\n }\r\n\r\n const codetableId = getCodetableId(breadcrumbs);\r\n\r\n const codetableMetadata = getCodetableMetadata(data, codetableId);\r\n\r\n const overlayText = savingCodetableItem ? translation.saving_code : translation.deleting_code;\r\n\r\n if (!codetableMetadata) {\r\n return null;\r\n }\r\n\r\n const codeItemDisplayedName = this.getCodeItemDisplayedName();\r\n\r\n const longDescription = getUserLanguageTranslation(language.value, codetableMetadata, codeItem, 'longDescription');\r\n\r\n const configuration = metroLineConfiguration(this.detailsSectionRef, this.visibilitySectionRef, this.translationsSectionRef,\r\n this.typesRef, breadcrumbs, codeItem.id, codetableMetadata);\r\n\r\n const scrollViewUrl = isDefinedIncludingZero(codeItem.id)\r\n ? routeConstants.codetableAdministrationCodeFor(breadcrumbs, codeItem.id)\r\n : routeConstants.codetableAdministrationAddCodeFor(breadcrumbs);\r\n\r\n const initialSection = this.props.section as CodeEditSectionType;\r\n\r\n const readOnly = codeItem && codeItem.id === 0;\r\n\r\n return <>\r\n <OverlayComponent\r\n displayOverlay={savingCodetableItem || deletingCodeItem}\r\n overlayText={overlayText} />\r\n {this.props.shouldDisplayModal\r\n ? <PromptConfirmation\r\n title={translation.cancel_changes}\r\n description={translation.are_you_sure}\r\n continueText={translation.undo_all}\r\n cancelText={translation.go_back}\r\n onContinue={this.props.continue}\r\n onCancel={this.props.cancel}\r\n />\r\n : null}\r\n <CodetableStickyHeader\r\n save={this.save}\r\n deleteCodeItem={this.deleteCodeItem}\r\n name={codeItemDisplayedName}\r\n codetableName={codetableMetadata.label}\r\n codetableId={codetableId}\r\n codeId={this.props.codeId}\r\n translation={translation}\r\n longDescription={longDescription}\r\n disabled={codeItem.disabled}\r\n readOnly={readOnly}\r\n breadcrumbs={breadcrumbs}\r\n />\r\n <CodetableItemForm\r\n {...this.props}\r\n {...this.props.item}\r\n {...this.props.sharedState}\r\n codetableId={codetableId}\r\n readOnly={readOnly}\r\n hasBigStickyHeader={!!longDescription}\r\n configuration={configuration}\r\n scrollViewUrl={scrollViewUrl}\r\n initialSection={initialSection}\r\n metadata={codetableMetadata}\r\n />\r\n </>;\r\n }\r\n}\r\n\r\nconst selectors = { ...commonSelectors, ...codeItemSelectors };\r\n\r\nconst container = containerFactory(\r\n withOptions(withPrompt(CodetableItemComponent) as any),\r\n actionCreators,\r\n selectors,\r\n codetableAdministrationTranslation\r\n);\r\n\r\nexport { container as CodetableItem };\r\n","import * as React from 'react';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { STATE } from 'app/constants';\r\nimport { actionCreators } from '../actions';\r\nimport { SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { CreateFolder } from '../create-folder/create-folder';\r\nimport { endpoint, formFolder } from '../constants';\r\nimport { FIELD_TYPE, simpleFieldForPath, SimpleFormValidationConfig, withSimpleForm }\r\n from 'app/infrastructure/simple-form';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { shouldClear } from '../selectors';\r\nimport { requiredValidation } from 'app/infrastructure/simple-form/validation/rules';\r\nimport { CreateReportState, EditFolderProps } from 'app/area/saved-reports/types';\r\nimport styles from '../create-report.scss';\r\nimport { ElementLoader } from 'ui';\r\nimport { codeItemToStoreValue } from 'app/infrastructure/data/codes';\r\nimport get from 'lodash/get';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\n\r\ntype EditFolderComponentProps = DefaultContainerProps & EditFolderProps & typeof actionCreators\r\n& DefaultContainerProps & SimpleFormProps;\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.savedReport);\r\n\r\nclass EditFolderComponent extends React.Component<EditFolderComponentProps, CreateReportState> {\r\n\r\n public static statePath: string = STATE.savedReport;\r\n\r\n public componentDidUpdate(prevProps: EditFolderComponentProps) {\r\n if (shouldClear(prevProps, this.props)) {\r\n this.onCancel();\r\n }\r\n }\r\n\r\n private validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(formFolder.title)\r\n ];\r\n\r\n private onSubmit = () => {\r\n const { validate, serialize, saveFolderFavourite, definition, translation } = this.props;\r\n const originalFavouritId = get(definition, 'validState.validFavourite.v');\r\n\r\n validate(this.validationConfig, () =>\r\n saveFolderFavourite(\r\n serialize(defaultSerializeMappings),\r\n originalFavouritId\r\n ),\r\n translation.validation_error);\r\n }\r\n\r\n private onCancel = () => {\r\n this.props.onClose();\r\n }\r\n\r\n private renderFields = () => {\r\n const { definition, sharedState, translation, fetchingCreateFolder, ...rest } = this.props;\r\n const validState = definition.validState;\r\n return <div>\r\n <div className=\"row\">\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={formFolder.title}\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.folder_title, required: true }}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n initialValue={definition.favourite.d} />\r\n </div>\r\n <div className={`${styles.createFolder} col-lg-4`}>\r\n <SimpleForm\r\n name={formFolder.folder}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadFolderOptions}\r\n label={{ text: translation.folder }}\r\n initialValue={validState.parentFavourite ? codeItemToStoreValue(validState.parentFavourite) : ''}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.V_VALUE }} />\r\n <CreateFolder\r\n {...rest}\r\n translation={translation}\r\n fetching={fetchingCreateFolder} />\r\n </div>\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={formFolder.owner}\r\n className={styles.noMargin}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadOwnerOptions}\r\n label={{ text: translation.owner }}\r\n initialValue={{ value: sharedState.id, description: sharedState.name }}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.V_VALUE }} />\r\n\r\n <SimpleForm\r\n name={formFolder.updateOwner}\r\n className={styles.noMargin}\r\n type={FIELD_TYPE.CHECKBOX}\r\n label={{ text: translation.update_owners }}\r\n initialValue={false}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n searchRequired={this.props.searchRequiredUsers}/>\r\n </div>\r\n </div>\r\n\r\n <h3>{translation.share_with}</h3>\r\n <hr />\r\n\r\n <div className=\"row\">\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={formFolder.user_group}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadUserGroupsOptions}\r\n label={{ text: translation.user_group }}\r\n initialValue={validState.sharedWithUserGroups ? validState.sharedWithUserGroups.map(codeItemToStoreValue) : ''}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />\r\n </div>\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={formFolder.users}\r\n type={FIELD_TYPE.SELECT_MULTIPLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadUsersOptions}\r\n label={{ text: translation.users }}\r\n initialValue={validState.sharedWithUsers ? validState.sharedWithUsers.map(codeItemToStoreValue) : ''}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n searchRequired={this.props.searchRequiredUsers}/>\r\n </div>\r\n <div className=\"col-lg-4\">\r\n <SimpleForm\r\n name={formFolder.updateSharing}\r\n type={FIELD_TYPE.CHECKBOX}\r\n label={{ text: translation.share_contents }}\r\n initialValue={false}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n searchRequired={this.props.searchRequiredUsers}/>\r\n </div>\r\n </div>\r\n </div>;\r\n }\r\n\r\n public render() {\r\n const { translation, fetchingFolder, definition } = this.props;\r\n return <ModalWrapper\r\n headerTitle=\"Edit folder\"\r\n btnTitle={translation.save_folder}\r\n onDone={this.onSubmit}\r\n isDisabled={fetchingFolder}\r\n btnCancelTitle={translation.cancel}\r\n onClose={this.onCancel}\r\n >\r\n {!definition ? <ElementLoader /> : this.renderFields()}\r\n </ModalWrapper>;\r\n }\r\n}\r\nconst container = withSimpleForm<EditFolderProps>(EditFolderComponent);\r\n\r\nexport { container as EditFolder };\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { actionCreators } from './actions';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { savedReportTranslation } from 'app/area/saved-reports/constants';\r\nimport { FullscreenCodeSelector } from 'app/components';\r\nimport { routeConstants } from 'app/routes/route-constants';\r\nimport { replace, toUpdateSavedReport } from 'app/area/shared/navigation';\r\nimport { SelectOptionValue, SelectOptions } from 'app/area/code-selector/types';\r\nimport { PromptConfirmation } from 'ui';\r\nimport { generateCopyLink } from 'app/area/saved-reports/generate-copy-link';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { simpleFieldForPath, FIELD_TYPE, withSimpleForm, SimpleFormValidation } from 'app/infrastructure/simple-form';\r\nimport { form, endpoint } from './constants';\r\nimport { SerializeType } from 'app/infrastructure/simple-form/types';\r\nimport { CreateFolder } from 'app/area/saved-reports/create-folder/create-folder';\r\nimport { copyToClipboard, replaceTemplateString, insertOptionalWordbreaks } from 'app/infrastructure/platform';\r\nimport { NewFolderData } from 'app/area/saved-reports/types';\r\nimport MdGroup from 'react-icons/lib/md/group';\r\nimport get from 'lodash/get';\r\nimport MdDocument from 'react-icons/lib/md/insert-drive-file';\r\n\r\nimport styles from './create-report.scss';\r\nimport { Tooltip } from 'ui/common/tooltip/tooltip';\r\nimport { EditFolder } from 'app/area/saved-reports/edit-folder/edit-folder';\r\nimport { FavouriteDefinition } from 'app/types-shared';\r\n\r\ninterface SelectSavedReportProps extends DefaultContainerProps {\r\n loadSavedReports: () => void;\r\n removeReport: (id:number, title:string, unshare?:boolean) => void;\r\n moveReport: (id:number, parentFolderId:number) => void;\r\n loadFolderData: (id:number) => void;\r\n clearFolderData: () => void;\r\n folderDefinition: FavouriteDefinition;\r\n fetchingFolder: boolean;\r\n reports: SelectOptions;\r\n copyLinkNotification: (isSuccess: boolean) => void;\r\n formValues: any;\r\n fetchingCreateFolder: boolean;\r\n validate: SimpleFormValidation;\r\n saveFolder: (data: NewFolderData) => void;\r\n}\r\n\r\ninterface SelectSavedReportState {\r\n itemToDelete?: SelectOptionValue;\r\n itemToMove?: SelectOptionValue;\r\n}\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.savedReport);\r\n\r\nconst createMenuItem = (title:string, onClick, key:number) => <li key={key}>\r\n <button type=\"button\" className=\"dropdown-item\" onClick={onClick}>\r\n {title}\r\n </button>\r\n</li>;\r\n\r\nclass SelectSavedReportSelector extends React.Component<SelectSavedReportProps, SelectSavedReportState> {\r\n public static statePath: string = STATE.savedReport;\r\n\r\n public state: Readonly<SelectSavedReportState> = {\r\n itemToDelete: null,\r\n itemToMove: null\r\n };\r\n\r\n private handleRequestDelete = (item: SelectOptionValue) => {\r\n this.setState({\r\n itemToDelete: item\r\n });\r\n }\r\n\r\n private handleCancelDelete = () => {\r\n this.setState({\r\n itemToDelete: null\r\n });\r\n }\r\n\r\n private handleConfirmDelete = () => {\r\n const shared = this.state.itemToDelete.owner.value !== this.props.sharedState.id;\r\n this.props.removeReport(this.state.itemToDelete.value, this.state.itemToDelete.description, shared);\r\n this.setState({\r\n itemToDelete: null\r\n });\r\n }\r\n\r\n private renderItemLabel = (item: SelectOptionValue) => {\r\n const { sharedState, translation } = this.props;\r\n const { owner, sharedThroughUserGroup } = item;\r\n const owned = item.owner.value === sharedState.id;\r\n const isFolder = item.descendants;\r\n\r\n if (owned) {\r\n return null;\r\n }\r\n\r\n const message = sharedThroughUserGroup ?\r\n (isFolder ? translation.shared_folder_group : translation.shared_report_group) :\r\n (isFolder ? translation.shared_folder_user : translation.shared_report);\r\n\r\n const label = <div className={styles.label}>{translation.shared} {sharedThroughUserGroup && <MdGroup/>}</div>;\r\n\r\n if (owner.value === 0) {\r\n return label;\r\n }\r\n\r\n return <Tooltip center={true} title={replaceTemplateString(message, owner.description)}>\r\n {label}\r\n </Tooltip>;\r\n }\r\n\r\n private renderItemDropdown = (item: SelectOptionValue) => {\r\n const {translation, copyLinkNotification, sharedState} = this.props;\r\n\r\n const owned = item.owner.value === sharedState.id;\r\n\r\n const deleteClick = () => {\r\n this.handleRequestDelete(item);\r\n };\r\n\r\n const copyLink = () => {\r\n const link = generateCopyLink(item.value);\r\n const copyStatus = copyToClipboard(link);\r\n copyLinkNotification(copyStatus);\r\n };\r\n\r\n const moveReport = () => {\r\n this.setState({itemToMove: item});\r\n };\r\n\r\n const editReport = () => {\r\n toUpdateSavedReport(item.value);\r\n };\r\n\r\n const editFolder = () => {\r\n this.props.loadFolderData(item.value);\r\n };\r\n\r\n const menuItems = [\r\n (owned || !item.sharedThroughUserGroup) &&\r\n createMenuItem(item.descendants ? translation.remove_folder : translation.remove_report, deleteClick, 2),\r\n owned &&\r\n createMenuItem(item.descendants ? translation.move_folder : translation.move_report, moveReport, 3),\r\n owned && !item.descendants &&\r\n createMenuItem(translation.edit_report, editReport, 4),\r\n owned && item.descendants &&\r\n createMenuItem(translation.edit_folder, editFolder,4),\r\n !item.descendants &&\r\n createMenuItem(translation.copy_to_clipboard, copyLink, 5)\r\n ].filter(i => i);\r\n\r\n return menuItems.length !== 0 ? menuItems : null;\r\n }\r\n private moveFolder = () => {\r\n\r\n const selectedFolderId = get(this, `props.formValues.${form.folder}.value`);\r\n const id = get(this, 'state.itemToMove.value');\r\n\r\n this.props.moveReport(id, selectedFolderId);\r\n }\r\n\r\n private closeMoveFolder = () => {\r\n this.setState({\r\n itemToMove: null\r\n });\r\n }\r\n\r\n private closeEditFolder = () => {\r\n this.props.clearFolderData();\r\n }\r\n\r\n public render () {\r\n const {loadSavedReports, router, translation, reports, folderDefinition, fetchingFolder} = this.props;\r\n const {itemToDelete, itemToMove} = this.state;\r\n return <><FullscreenCodeSelector\r\n onOpen={loadSavedReports}\r\n onClose={router.goBack}\r\n fetching={reports.fetching}\r\n options={reports.items}\r\n title={translation.saved_reports_title}\r\n urlResolver={routeConstants.savedReportFor}\r\n textGoBack={translation.back}\r\n routeHandler={replace}\r\n itemDropdownRender={this.renderItemDropdown}\r\n itemLabelRender={this.renderItemLabel}\r\n defaultIcon={<MdDocument className={`${styles.selectCodeBtnIcon} ${styles.defaultIcon}`}/>}\r\n />\r\n {itemToDelete && <PromptConfirmation\r\n title={itemToDelete.descendants ? translation.remove_folder : translation.remove_report}\r\n cancelText={translation.cancel}\r\n continueText={itemToDelete.descendants ? translation.remove_folder : translation.remove_report}\r\n description={\r\n insertOptionalWordbreaks(replaceTemplateString(\r\n itemToDelete.descendants ? translation.confirm_remove_folder : translation.confirm_remove,\r\n `\"${itemToDelete.description}\"`))\r\n }\r\n onCancel={this.handleCancelDelete}\r\n onContinue={this.handleConfirmDelete}/>\r\n }\r\n {(fetchingFolder || folderDefinition) &&\r\n <EditFolder\r\n onClose={this.closeEditFolder}\r\n definition={folderDefinition}\r\n searchRequiredUsers={false}\r\n {...this.props}\r\n />}\r\n\r\n {itemToMove && <ModalWrapper\r\n onClose={this.closeMoveFolder}\r\n onDone={this.moveFolder}\r\n closeOnDone={true}\r\n btnTitle={itemToMove.descendants ? translation.move_folder : translation.move_report}\r\n headerTitle={itemToMove.descendants ? translation.move_folder : translation.move_report}\r\n >\r\n <SimpleForm\r\n className={styles.createFolder}\r\n name={form.folder}\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.loadFolderOptions}\r\n label={{ text: translation.folder }}\r\n initialValue={''}\r\n translation={translation}\r\n placeholder={translation.search_placeholder}\r\n serialize={{ type: SerializeType.V_VALUE }} />\r\n <CreateFolder\r\n className={styles.createFolder}\r\n {...this.props}\r\n translation={translation}\r\n fetching={this.props.fetchingCreateFolder} />\r\n </ModalWrapper>}\r\n\r\n </>;\r\n }\r\n}\r\n\r\nconst container = containerFactory(withSimpleForm(SelectSavedReportSelector), actionCreators, undefined, savedReportTranslation);\r\n\r\nexport {container as SelectSavedReportSelector};\r\n","export const codeSelectorTranslations = {\r\n back: 7518,\r\n reports_company: 5330,\r\n select_case_type: 7431,\r\n change_case_type: 3717,\r\n change_case_type_info_message: 3878,\r\n dashboards: 6779,\r\n codetable_administration: 8268,\r\n no_access_to_codetable_administration: 8320\r\n};\r\n","import { ActionDispatching } from 'app/types-shared';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\nimport { CodeSelectorState } from './types';\r\nimport { RequestCodes, ReceiveCodes } from './action-types';\r\nimport { api } from './api';\r\nimport { isForbiddenStatus, blockAccess } from 'app/area/shared/actions-utils';\r\nimport { STATE } from 'app/constants';\r\nimport { codeSelectorTranslations as text } from './constants';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\n\r\nexport const actionCreators = {\r\n loadCaseTypes: (): ActionDispatching<any, CodeSelectorState> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodes());\r\n\r\n const caseTypes = await api.caseTypes();\r\n dispatch(new ReceiveCodes(caseTypes));\r\n }),\r\n\r\n loadConnectedCaseTypes: (\r\n draftIds: string | string[],\r\n connectionTypeIds: string | string[]\r\n ): ActionDispatching<any, CodeSelectorState> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodes());\r\n const draftId = Array.isArray(draftIds) ? draftIds.slice(-1)[0] : draftIds;\r\n const connectionTypeId = Array.isArray(connectionTypeIds) ? connectionTypeIds.slice(-1)[0] : connectionTypeIds;\r\n const caseTypes = await api.connectedCaseTypes(safeNumericString(draftId), safeNumericString(connectionTypeId));\r\n dispatch(new ReceiveCodes(caseTypes));\r\n }),\r\n\r\n loadDashboards: (): ActionDispatching<any, CodeSelectorState> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodes());\r\n\r\n const dashboards = await api.dashboards();\r\n dispatch(new ReceiveCodes(dashboards.rootCodes));\r\n }),\r\n\r\n loadCompanyReports: (): ActionDispatching<any, CodeSelectorState> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodes());\r\n\r\n const reports = await api.companyReports();\r\n dispatch(new ReceiveCodes(reports.rootCodes));\r\n }),\r\n\r\n loadCodetableAdministrationList: (): ActionDispatching<any, CodeSelectorState> =>\r\n async (dispatch: any, getState: any) => {\r\n dispatch(new RequestCodes());\r\n \r\n try {\r\n const codetables = await api.codetableAdministrationList();\r\n\r\n codetables.rootCodes && dispatch(new ReceiveCodes(codetables.rootCodes));\r\n } catch (err) {\r\n if (isForbiddenStatus(err)) {\r\n blockAccess({\r\n dispatch, \r\n getState, \r\n area: STATE.codeSelector, \r\n translationId: text.no_access_to_codetable_administration\r\n });\r\n } else if (err && err.userMessages) {\r\n dispatch(new ErrorNotification(err.userMessages));\r\n }\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport styles from './list-view-column.scss';\r\n\r\nexport interface ListViewColumnProps {\r\n children: React.ReactChildren | React.ReactElement[];\r\n}\r\n\r\nexport const ListViewColumn = ({ children }: ListViewColumnProps) => {\r\n\r\n return (\r\n <div className={`${styles.listViewColumn} ${styles.flexible}`}>\r\n {children}\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport styles from './list-view-folder.scss';\r\nimport MdFolder from 'react-icons/lib/md/folder';\r\nimport AndroidArrowDropright from 'react-icons/lib/io/android-arrow-dropright';\r\nimport { ComplexValue } from 'app/types-shared';\r\n\r\nexport interface ListViewFolderProps {\r\n option: ComplexValue<number>;\r\n onClick: (value: ComplexValue<number>[]) => void;\r\n breadcrumbs: ComplexValue<number>[];\r\n isActive: boolean;\r\n}\r\n\r\nexport const ListViewFolder = (props: ListViewFolderProps) => {\r\n\r\n const onClick = () => props.onClick(props.breadcrumbs ? [...props.breadcrumbs, props.option] : [props.option]);\r\n\r\n return (\r\n <div className={`${styles.listViewFolder} ${props.isActive ? styles.listViewFolderActive : ''}`} onClick={onClick}>\r\n <div className={styles.listViewFolderMainContent}>\r\n <div className={`${styles.listViewFolderIcon} ${props.isActive ? styles.listViewFolderIconActive : ''}`}>\r\n <MdFolder height=\"1.2em\" width=\"1.2em\" />\r\n </div>\r\n <div className={styles.listViewFolderTitle}>{props.option.description}</div>\r\n </div>\r\n <div className={`${styles.listViewFolderArrow} ${props.isActive ? styles.listViewFolderArrowActive : ''}`}>\r\n <AndroidArrowDropright height=\"1.2em\" width=\"1.2em\" />\r\n </div>\r\n </div>\r\n );\r\n};\r\n","import * as React from 'react';\r\nimport styles from './list-view-item.scss';\r\nimport { ComplexValue } from 'ui';\r\nimport { Icon } from 'ui/common/icon';\r\n\r\nexport interface ListViewItemProps {\r\n option: ComplexValue<number>;\r\n onClick: (breadcrumbs: number[]) => void;\r\n breadcrumbs: ComplexValue<number>[];\r\n}\r\n\r\nexport const ListViewItem = (props: ListViewItemProps) => {\r\n\r\n const onClick = () =>\r\n props.onClick([...(props.breadcrumbs ? props.breadcrumbs.map(breadcrumbsItem => breadcrumbsItem.value) : []), props.option.value]);\r\n\r\n return (\r\n <div className={styles.listViewItem} onClick={onClick}>\r\n <div className={styles.listViewItemIcon}>\r\n <Icon url={props.option.icon || '/i/case-sections/default.svg'} className={styles.icon} />\r\n </div>\r\n <div className={styles.listViewItemTitle}>\r\n {props.option.description}\r\n </div>\r\n </div>\r\n );\r\n};\r\n","export const columnWidth = (1000 / 3);\r\n","import * as React from 'react';\r\nimport styles from './list-view-column-container.scss';\r\nimport { ComplexValue, ElementLoader } from 'ui';\r\nimport { Component } from 'react';\r\nimport { ListViewColumn } from 'app/area/list-view-code-selector/list-view-column';\r\nimport { ListViewFolder } from 'app/area/list-view-code-selector/list-view-folder';\r\nimport { ListViewItem } from 'app/area/list-view-code-selector/list-view-item';\r\nimport { columnWidth } from 'app/area/list-view-code-selector/constants';\r\nimport { isDefinedIncludingZero } from 'app/infrastructure/data/number';\r\n\r\nexport interface ListViewColumnContainerProps {\r\n breadcrumbs: ComplexValue<number>[];\r\n options: ComplexValue<number>[];\r\n selectFolder: (breadcrumbs: ComplexValue<number>[]) => void;\r\n selectItem: (breadcrumbs: number[]) => void;\r\n}\r\n\r\nexport interface ListViewColumnData {\r\n breadcrumbs: ComplexValue<number>[];\r\n options: ComplexValue<number>[];\r\n}\r\n\r\nexport interface ListViewColumnContainerState {\r\n canRenderColumns: boolean;\r\n}\r\n\r\nexport class ListViewColumnContainer extends Component<ListViewColumnContainerProps, ListViewColumnContainerState> {\r\n private columnsAmountSourceRef: React.RefObject<HTMLDivElement> = React.createRef();\r\n\r\n public state: ListViewColumnContainerState = {\r\n canRenderColumns: false\r\n };\r\n\r\n public componentDidMount() {\r\n this.setState({\r\n canRenderColumns: true\r\n });\r\n }\r\n\r\n private getAllColumns = (): ListViewColumnData[] => {\r\n const { breadcrumbs: breadcrumbsRaw, options } = this.props;\r\n\r\n let breadcrumbs = breadcrumbsRaw;\r\n\r\n const initialColumnData = [{ breadcrumbs: [], options }];\r\n\r\n if (!breadcrumbs || breadcrumbs && breadcrumbs.length === 0) {\r\n return initialColumnData;\r\n }\r\n\r\n if (breadcrumbs[0] && breadcrumbs[0].value === 0) {\r\n breadcrumbs = breadcrumbs.splice(1, breadcrumbs.length);\r\n }\r\n\r\n return breadcrumbs.reduce((columns, breadcrumbItem) => [\r\n ...columns,\r\n {\r\n options: breadcrumbItem.descendants,\r\n breadcrumbs: [...columns[columns.length - 1].breadcrumbs, breadcrumbItem]\r\n }\r\n ], initialColumnData as ListViewColumnData[]);\r\n }\r\n\r\n private getVisibleColumns = (columns: ListViewColumnData[]): ListViewColumnData[] => {\r\n if (!columns || (columns && columns.length === 0)) {\r\n return [];\r\n }\r\n\r\n let maximumVisibleColumsCount = this.maximumVisibleColumsCount();\r\n\r\n if (!isDefinedIncludingZero(maximumVisibleColumsCount)) {\r\n return [];\r\n }\r\n\r\n if (maximumVisibleColumsCount === 0) {\r\n maximumVisibleColumsCount = 1;\r\n }\r\n\r\n if (columns.length <= maximumVisibleColumsCount) {\r\n return columns;\r\n }\r\n\r\n return columns.splice(columns.length - maximumVisibleColumsCount, columns.length);\r\n }\r\n\r\n private maximumVisibleColumsCount = (): number => this.columnsAmountSourceRef && this.columnsAmountSourceRef.current\r\n ? Math.floor(this.columnsAmountSourceRef.current.offsetWidth / columnWidth) : undefined;\r\n\r\n private navigateToFolder = (breadcrumbs: ComplexValue<number>[]) => this.props.selectFolder(breadcrumbs);\r\n\r\n private isOptionInBreadcrumbs = (option: ComplexValue<number>) =>\r\n this.props.breadcrumbs ? this.props.breadcrumbs.find(breadcrumbItem => breadcrumbItem.value === option.value) !== undefined : false;\r\n\r\n public render() {\r\n const { selectItem } = this.props;\r\n const { canRenderColumns } = this.state;\r\n\r\n const allColumns = canRenderColumns && this.getAllColumns();\r\n const visibleColumns = canRenderColumns && this.getVisibleColumns(allColumns);\r\n\r\n return (\r\n <div ref={this.columnsAmountSourceRef}>\r\n <div id=\"list-view-column-container\" className={`${styles.listViewColumnContainer} ${styles.listViewColumnContainerMobile}`}>\r\n {canRenderColumns ?\r\n <div className={`${styles.listViewColumnContainerContent} ${styles.listViewColumnContainerContentMobile}`}>\r\n {visibleColumns.map((column, index) => <ListViewColumn key={`list-view-column-${index}`}>\r\n {\r\n column && column.options ? column.options.map((option, optionIndex) =>\r\n option.descendants ?\r\n <ListViewFolder\r\n key={`list-view-folder-${option.description}-${optionIndex}`}\r\n isActive={this.isOptionInBreadcrumbs(option)}\r\n option={option}\r\n breadcrumbs={column.breadcrumbs}\r\n onClick={this.navigateToFolder} />\r\n : <ListViewItem\r\n key={`list-view-item-${option.description}-${optionIndex}`}\r\n option={option}\r\n breadcrumbs={column.breadcrumbs}\r\n onClick={selectItem} />\r\n ) : []\r\n }\r\n </ListViewColumn>)}\r\n </div>\r\n : <ElementLoader />\r\n }\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SelectOptionValue } from 'app/area/code-selector/types';\r\nimport { Breadcrumb } from 'ui/common/breadcrumb/breadcrumb';\r\nimport { Paper, ComplexValue, ElementLoader } from 'ui';\r\nimport { ListViewColumnContainer } from 'app/area/list-view-code-selector/list-view-column-container';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\nimport styles from './list-view-code-selector.scss';\r\nimport { buildBreadcrumbs } from 'app/area/codetable/list/action-helpers';\r\nimport { deepEquals } from 'app/infrastructure/js';\r\n\r\nexport interface ListViewCodeSelectorProps {\r\n title: string;\r\n options: SelectOptionValue[];\r\n fetching: boolean;\r\n routeHandler?: (route: Object) => void;\r\n urlResolver: (value: number[] | number) => string | { pathname: string; query: Object };\r\n onOpen?: () => void;\r\n breadcrumbs: number[];\r\n}\r\n\r\nexport interface ListViewCodeSelectorState {\r\n breadcrumbs: ComplexValue<number>[];\r\n}\r\n\r\nexport class ListViewCodeSelector extends React.Component<ListViewCodeSelectorProps, ListViewCodeSelectorState> {\r\n\r\n public state: ListViewCodeSelectorState = {\r\n breadcrumbs: []\r\n };\r\n\r\n public componentDidMount() {\r\n const { fetching, onOpen } = this.props;\r\n\r\n if (!fetching) {\r\n onOpen && onOpen();\r\n }\r\n }\r\n\r\n public componentDidUpdate(prevProps: ListViewCodeSelectorProps) {\r\n if (this.shouldBuildBreadcrumbs(prevProps)) {\r\n const breadcrumbs = buildBreadcrumbs(this.props.options, this.props.breadcrumbs);\r\n this.setState({ breadcrumbs });\r\n }\r\n }\r\n\r\n private shouldBuildBreadcrumbs = (prevProps: ListViewCodeSelectorProps) => !deepEquals(prevProps.options, this.props.options)\r\n && prevProps.options && this.props.options && this.props.options.length > 0\r\n && this.props.breadcrumbs && this.props.breadcrumbs.length > 0;\r\n\r\n private selectFolder = (breadcrumbs: ComplexValue<number>[]) => this.setState({ breadcrumbs });\r\n\r\n private onClickBreadcrumbItem = (item: ComplexValue<number>) => {\r\n const breadcrumbs = [...this.state.breadcrumbs];\r\n\r\n if (breadcrumbs !== undefined && breadcrumbs.length > 0 && item !== undefined) {\r\n while (breadcrumbs[breadcrumbs.length - 1] && breadcrumbs[breadcrumbs.length - 1].value !== item.value) {\r\n breadcrumbs.pop();\r\n }\r\n }\r\n\r\n this.setState({ breadcrumbs });\r\n }\r\n\r\n private onClickBreadcrumbHome = () => {\r\n this.setState({ breadcrumbs: [] });\r\n }\r\n\r\n private selectItem = (breadcrumbs: number[]) => {\r\n const { urlResolver, routeHandler } = this.props;\r\n routeHandler && routeHandler(urlResolver(breadcrumbs));\r\n }\r\n\r\n public render() {\r\n const { breadcrumbs } = this.state;\r\n const { options, fetching, title } = this.props;\r\n\r\n const shouldRenderBreadcrumbs = breadcrumbs && breadcrumbs.length > 0;\r\n\r\n return (\r\n <div className=\"entity-view\">\r\n <Paper componentId=\"code-base-paper\" className={undefined}>\r\n {fetching\r\n ? <ElementLoader />\r\n : <MainGridContainer>\r\n {title\r\n ? <div className={styles.titleContainer}>\r\n <div className={styles.titleBreadcrumb}>\r\n {shouldRenderBreadcrumbs\r\n ? <Breadcrumb\r\n items={breadcrumbs}\r\n onClickItem={this.onClickBreadcrumbItem}\r\n onClickBreadcrumbHome={this.onClickBreadcrumbHome}\r\n home={true} />\r\n : <div className={styles.titleText}>\r\n {title}\r\n </div>}\r\n </div>\r\n </div>\r\n : null}\r\n <ListViewColumnContainer\r\n breadcrumbs={breadcrumbs}\r\n options={options}\r\n selectFolder={this.selectFolder}\r\n selectItem={this.selectItem}\r\n />\r\n </MainGridContainer>\r\n }\r\n </Paper>\r\n </div>\r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SelectOptions } from './types';\r\nimport { STATE } from 'app/constants';\r\nimport { FullscreenCodeSelector } from 'app/components';\r\nimport { replace, to } from 'app/area/shared/navigation';\r\nimport { compose } from 'redux';\r\nimport { Location } from 'history';\r\nimport { routeConstants, CodeSelectorFor } from 'app/routes/route-constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { actionCreators } from './actions';\r\nimport { codeSelectorTranslations } from 'app/area/code-selector/constants';\r\nimport { ListViewCodeSelector } from 'app/area/list-view-code-selector/list-view-code-selector';\r\nimport { CodetableAdministrationState } from 'app/area/codetable/types-store';\r\nimport { safeNumericString } from 'app/infrastructure/data/sanitize';\r\n\r\ntype CodeSelectorProps = DefaultContainerProps & SelectOptions & typeof actionCreators & { breadcrumbs?: number[] };\r\n\r\ninterface CodeSelectorPropsForType {\r\n onOpen: () => void;\r\n title: string;\r\n infoMessage?: string;\r\n urlResolver: (value: number | number[]) => string | { pathname: string; query: Object };\r\n onClose: () => void;\r\n}\r\n\r\n/**\r\n * Support forwarding of query parameters to the selected route\r\n * @param location\r\n */\r\nconst includeQueryParams = (location: Location) => (route: string) => ({ pathname: route, query: location.query });\r\n\r\nconst codeSelectorPropsCreator = ({\r\n translation,\r\n router,\r\n loadConnectedCaseTypes,\r\n loadCaseTypes,\r\n loadCompanyReports,\r\n loadDashboards,\r\n loadCodetableAdministrationList\r\n}: CodeSelectorProps): CodeSelectorPropsForType => ({\r\n [CodeSelectorFor.ConnectedCaseType]: {\r\n onOpen: () => loadConnectedCaseTypes(router.location.query.draftId, router.location.query.connectionTypeId),\r\n title: translation.select_case_type,\r\n urlResolver: compose(includeQueryParams(router.location), routeConstants.createCase),\r\n onClose: () => replace({\r\n pathname: routeConstants.draftViewFor(router.location.query.draftId),\r\n query: { section: router.location.query.returnToSection }\r\n })\r\n },\r\n [CodeSelectorFor.ChangeCaseType]: {\r\n onOpen: loadCaseTypes,\r\n title: translation.change_case_type,\r\n infoMessage: translation.change_case_type_info_message,\r\n urlResolver: compose(includeQueryParams(router.location), routeConstants.changeCaseTypeTo),\r\n onClose: () => replace({\r\n pathname: routeConstants.draftViewFor(router.location.query.draftId)\r\n })\r\n },\r\n [CodeSelectorFor.CaseType]: {\r\n onOpen: loadCaseTypes,\r\n title: translation.select_case_type,\r\n urlResolver: compose(includeQueryParams(router.location), routeConstants.createCase),\r\n onClose: () => replace(routeConstants.startupView)\r\n },\r\n [CodeSelectorFor.CompanyReport]: {\r\n onOpen: loadCompanyReports,\r\n title: translation.reports_company,\r\n urlResolver: routeConstants.companyReportFor,\r\n onClose: () => replace(routeConstants.startupView)\r\n },\r\n [CodeSelectorFor.Dashboard]: {\r\n onOpen: loadDashboards,\r\n title: translation.dashboards,\r\n urlResolver: routeConstants.dashboardFor,\r\n onClose: () => replace(routeConstants.startupView)\r\n },\r\n [CodeSelectorFor.CodetableAdministration]: {\r\n onOpen: loadCodetableAdministrationList,\r\n title: translation.codetable_administration,\r\n urlResolver: routeConstants.codetableAdministrationFor,\r\n onClose: () => replace(routeConstants.startupView)\r\n }\r\n}[router.params.type]);\r\n\r\ntype CodeSelectorComponentType = React.FunctionComponent<CodeSelectorProps> & {\r\n statePath: string;\r\n};\r\n\r\nconst shouldRenderListView = (type: keyof typeof CodeSelectorFor) => type === CodeSelectorFor.CodetableAdministration;\r\n\r\nconst CodeSelector: CodeSelectorComponentType = (props: CodeSelectorProps): JSX.Element => {\r\n const { items, fetching, translation, router, breadcrumbs } = props;\r\n const selectorProps = codeSelectorPropsCreator(props);\r\n\r\n if (shouldRenderListView(router.params.type)) {\r\n return <ListViewCodeSelector\r\n onClose={selectorProps.onClose}\r\n fetching={fetching}\r\n options={items}\r\n routeHandler={to}\r\n breadcrumbs={breadcrumbs || []}\r\n {...selectorProps}\r\n />;\r\n }\r\n\r\n return <FullscreenCodeSelector\r\n onClose={selectorProps.onClose}\r\n fetching={fetching}\r\n options={items}\r\n textGoBack={translation.back}\r\n routeHandler={replace}\r\n {...selectorProps}\r\n />;\r\n};\r\n\r\nCodeSelector.statePath = STATE.codeSelector;\r\n\r\nconst breadcrumbsKeys = ['codetableId0', 'codetableId1', 'codetableId2', 'codetableId3', 'codetableId4', 'codetableId5', 'codetableId6', 'codetableId7'];\r\n\r\nexport const selectors = {\r\n breadcrumbs: (_: CodetableAdministrationState, props: DefaultContainerProps) =>\r\n breadcrumbsKeys.map(key => safeNumericString(props.params[key])).filter(item => item !== '')\r\n};\r\n\r\nconst container = containerFactory(CodeSelector, actionCreators, selectors, codeSelectorTranslations);\r\n\r\nexport { container as CodeSelector };\r\n","export const endpoint = {\r\n loadPermission: 'Channel',\r\n loadConsents: (recipientId: number) => `Recipient/${recipientId}/channel`,\r\n loadConsent: (id: number, recipientId: number) => `Recipient/${recipientId}/channel/${id}`,\r\n deleteConsent: (id: number, recipientId: number) => `Recipient/${recipientId}/channel/${id}`,\r\n verifyCode: (recipientId: number) => `Recipient/${recipientId}/channel/sendVerificationCode`,\r\n addSubscription: (recipientId: number) => `Recipient/${recipientId}/channel`,\r\n updateSubscription: (id: number, recipientId: number) => `Recipient/${recipientId}/channel/${id}`\r\n};\r\n","import { RemoteNotificationsData } from 'app/infrastructure/remote-data';\r\nimport { endpoint } from './endpoints';\r\nimport { ConsentPermission, Consent, Subscription } from 'app/area/user-profile/my-notifications/types';\r\n\r\nexport const api = {\r\n\r\n loadPermission: (): Promise<ConsentPermission> => {\r\n return new RemoteNotificationsData(endpoint.loadPermission)\r\n .resource<ConsentPermission>()\r\n .single();\r\n },\r\n\r\n loadConsents: async (recipientId: number): Promise<Consent[]> => {\r\n return await new RemoteNotificationsData(endpoint.loadConsents(recipientId))\r\n .resource<Consent[]>()\r\n .all();\r\n },\r\n\r\n loadConsent: async (id: number, recipientId: number): Promise<Consent> => {\r\n return await new RemoteNotificationsData(endpoint.loadConsent(id, recipientId))\r\n .resource<Consent>()\r\n .single();\r\n },\r\n\r\n deleteConsent: async (id: number, recipientId: number) => {\r\n return new RemoteNotificationsData(endpoint.deleteConsent(id, recipientId))\r\n .resource()\r\n .httpDelete(id);\r\n },\r\n\r\n verifyCode: async (subscription: Subscription): Promise<Subscription> => {\r\n return await new RemoteNotificationsData(endpoint.verifyCode(subscription.recipientId))\r\n .resource<Subscription>()\r\n .create(subscription, false);\r\n },\r\n\r\n addSubscription: async (subscription: Subscription): Promise<Subscription> => {\r\n return await new RemoteNotificationsData(endpoint.addSubscription(subscription.recipientId))\r\n .resource<Subscription>()\r\n .create(subscription, false);\r\n },\r\n\r\n updateSubscription: async (id: number, subscription: Subscription): Promise<Subscription> => {\r\n return await new RemoteNotificationsData(endpoint.updateSubscription(id, subscription.recipientId))\r\n .resource<Subscription>()\r\n .save(subscription);\r\n }\r\n};\r\n","import { ValidationProps } from 'ui';\r\nimport { TextCollection } from 'app/types-shared';\r\nimport { DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { actionCreators } from './actions';\r\n\r\nexport interface MyNotificationsState {\r\n fetchingLoadPermission: boolean;\r\n fetchingLoadConsent: boolean;\r\n fetchingLoadConsents: boolean;\r\n fetchingDeleteConsent: boolean;\r\n fetchingVerifyCode: boolean;\r\n fetchingSaveSubscription: boolean;\r\n fetchingSubscribePush: boolean;\r\n validation?: ValidationProps[];\r\n permission?: ConsentPermission;\r\n consent?: Consent;\r\n consents: Consent[];\r\n texts?: TextCollection;\r\n}\r\n\r\nexport interface ConsentPermission {\r\n sms: boolean;\r\n push: boolean;\r\n}\r\n\r\nexport interface ActionPermission {\r\n edit?: boolean;\r\n}\r\n\r\nexport interface ConfigurationAccess {\r\n push: boolean;\r\n}\r\n\r\nexport interface Consent {\r\n id?: number;\r\n recipientId: number;\r\n type: ConsentType;\r\n value?: TokenValue;\r\n}\r\n\r\nexport interface TokenValue {\r\n name: string;\r\n token: string;\r\n}\r\n\r\nexport interface ConsentValue {\r\n value: TokenValue;\r\n verificationCode?: string;\r\n verificationMessage?: string;\r\n channel?: Channel;\r\n}\r\n\r\nexport interface Channel {\r\n id?: number;\r\n recipientId: number;\r\n type: ConsentType;\r\n}\r\n\r\nexport type Subscription = Channel & ConsentValue;\r\n\r\nexport enum ConsentType {\r\n sms = 1,\r\n push = 2\r\n}\r\n\r\nexport enum NotificationPermissionType {\r\n NotSupported,\r\n Unknown,\r\n Denied,\r\n Granted\r\n}\r\n\r\nexport type MyNotificationsContainerProps = MyNotificationsState & typeof actionCreators\r\n & DefaultContainerProps & SimpleFormProps;\r\n","export const myNotificationsTranslations = {\r\n main_title: 8222,\r\n sub_title: 8174,\r\n consents_title: 8173,\r\n consents_disclaimer: 8260,\r\n consent_delete_description: 8171,\r\n consent_delete: 8172,\r\n consent_delete_success: 8168,\r\n consent_sms_add_success: 8181,\r\n consent_sms_update_success: 8191,\r\n consent_push_add_success: 8312,\r\n consent_push_update_success: 8376,\r\n consent_push_not_active_message: 8377,\r\n consent_push_browser_allow_message: 8378,\r\n sms_text: 8188,\r\n sms_phone_label: 8175,\r\n push_name: 8366,\r\n push_text: 8310,\r\n add_sms_title: 8176,\r\n add_push_title: 8307,\r\n edit_push_title: 8365,\r\n push_token_exists_info: 8313,\r\n new_phone_number: 8185,\r\n previous_phone_number: 8186,\r\n change_phone_number: 8187,\r\n sms_disclaimer: 8260,\r\n verification_code: 8282,\r\n verification_code_success: 8286,\r\n verification_code_message: 8314,\r\n refresh_page: 8385,\r\n send_code: 8283,\r\n code_info: 8284,\r\n no_data: 8196,\r\n phone_number_info: 8198,\r\n validation_error: 8206,\r\n email_invalid: 7758,\r\n must_be_equal: 7681,\r\n must_be_filled: 5949,\r\n must_be_unique: 8105,\r\n edit: 8184,\r\n save: 8177,\r\n cancel: 8167\r\n};\r\n\r\nexport type MyNotificationTranslation = {\r\n readonly [T in keyof typeof myNotificationsTranslations]: string\r\n};\r\n\r\nexport const form = {\r\n sms: {\r\n previousPhoneNumber: 'previousPhoneNumber',\r\n phoneNumber: 'token',\r\n verificationCode: 'verificationCode'\r\n },\r\n push: {\r\n name: 'name'\r\n }\r\n};\r\n\r\nexport const countdownTimer = {\r\n intervalTime: 1000,\r\n value: 60\r\n};\r\n\r\nexport const phoneNumberMinLength = 4;\r\nexport const pushNameMinLength = 3;\r\nexport const pushNameMaxLength = 60;\r\n","import { ApplicationState } from 'app/types-store';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport {\r\n RequestLoadConsents, ReceiveLoadConsents, FailLoadConsents,\r\n RequestDeleteConsent, ReceiveDeleteConsent,\r\n FailDeleteConsent, ReceiveLoadConsent, FailLoadConsent, RequestLoadConsent, ClearConsent,\r\n RequestLoadPermission, ReceiveLoadPermission,\r\n FailLoadPermission, ProcessConsentFailed, ClearValidation, RequestSaveSubscription,\r\n ReceiveSaveSubscription, FailSaveSubscription, RequestVerifyCode, ReceiveVerifyCode, FailVerifyCode\r\n} from 'app/area/user-profile/my-notifications/action-types';\r\nimport { api } from './api';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { myNotificationsTranslations } from 'app/area/user-profile/my-notifications/constants';\r\nimport { Subscription } from 'app/area/user-profile/my-notifications/types';\r\nimport { AnyAction } from 'redux';\r\nimport { ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport { complexValidationFromServer } from 'app/infrastructure/data/validation';\r\nimport { ConsentType } from 'app/area/user-profile/my-notifications/types';\r\n\r\nexport const actionCreators = {\r\n loadPermission: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n dispatch(new RequestLoadPermission());\r\n\r\n try {\r\n const response = await api.loadPermission();\r\n dispatch(new ReceiveLoadPermission(response));\r\n } catch {\r\n dispatch(new FailLoadPermission());\r\n }\r\n },\r\n\r\n loadConsents: (recipientId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n dispatch(new RequestLoadConsents());\r\n\r\n try {\r\n const response = await api.loadConsents(recipientId);\r\n dispatch(new ReceiveLoadConsents(response));\r\n } catch {\r\n dispatch(new FailLoadConsents());\r\n }\r\n },\r\n\r\n loadConsent: (id: number, recipientId: number): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n\r\n dispatch(new RequestLoadConsent());\r\n\r\n try {\r\n const response = await api.loadConsent(id, recipientId);\r\n dispatch(new ReceiveLoadConsent(response));\r\n } catch {\r\n dispatch(new FailLoadConsent());\r\n }\r\n },\r\n\r\n deleteConsent: (id: number, recipientId: number, onSuccess: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const areaState = getState().myNotifications;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n dispatch(new RequestDeleteConsent());\r\n\r\n try {\r\n await api.deleteConsent(id, recipientId);\r\n dispatch(new ReceiveDeleteConsent());\r\n onSuccess();\r\n notifyUser.success(translationDescription(myNotificationsTranslations.consent_delete_success));\r\n } catch (err) {\r\n dispatch(new FailDeleteConsent());\r\n dispatch(new ErrorNotification(err.userMessages || err.message));\r\n }\r\n },\r\n\r\n verifyCode: (subscription: Subscription, onSuccess: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const areaState = getState().myNotifications;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n dispatch(new RequestVerifyCode());\r\n\r\n try {\r\n await api.verifyCode(subscription);\r\n dispatch(new ReceiveVerifyCode());\r\n onSuccess();\r\n notifyUser.success(translationDescription(myNotificationsTranslations.verification_code_success));\r\n } catch (err) {\r\n dispatch(new FailVerifyCode());\r\n dispatch(new ProcessConsentFailed(err.validationErrors ? complexValidationFromServer(err.validationErrors) : []));\r\n }\r\n },\r\n\r\n saveSubscription: (id: number, subscription: Subscription, onSuccess: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const areaState = getState().myNotifications;\r\n const translationDescription = createDescriptionSelector(areaState.texts);\r\n\r\n dispatch(new RequestSaveSubscription());\r\n\r\n try {\r\n const result = (id || id === 0)\r\n ? await api.updateSubscription(id, subscription)\r\n : await api.addSubscription(subscription);\r\n\r\n if (result) {\r\n dispatch(new ReceiveSaveSubscription());\r\n onSuccess();\r\n\r\n const translation = {\r\n [ConsentType.sms]: {\r\n add: myNotificationsTranslations.consent_sms_add_success,\r\n edit: myNotificationsTranslations.consent_sms_update_success\r\n },\r\n [ConsentType.push]: {\r\n add: myNotificationsTranslations.consent_push_add_success,\r\n edit: myNotificationsTranslations.consent_push_update_success\r\n }\r\n }[subscription.type];\r\n\r\n notifyUser.success(translationDescription(id ? translation.edit : translation.add));\r\n }\r\n } catch (err) {\r\n dispatch(new FailSaveSubscription());\r\n dispatch(new ProcessConsentFailed(err.validationErrors ? complexValidationFromServer(err.validationErrors) : []));\r\n }\r\n },\r\n\r\n clearConsent: (): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n dispatch(new ClearConsent());\r\n },\r\n\r\n clearValidation: (formName: string): ActionDispatching<AnyAction, ApplicationState> =>\r\n (dispatch, getState) => {\r\n dispatch(new ClearValidation(formName));\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport * as MdPhone from 'react-icons/lib/md/phone';\r\nimport * as MdNotifications from 'react-icons/lib/md/notifications';\r\nimport { Consent, ConsentType } from 'app/area/user-profile/my-notifications/types';\r\nimport styles from './consent-item.scss';\r\nimport { MyNotificationTranslation } from 'app/area/user-profile/my-notifications/constants';\r\n\r\ninterface ConsentItemExternalProps extends Consent {\r\n isPushActive?: boolean;\r\n isChannelActive: boolean;\r\n translation: MyNotificationTranslation;\r\n}\r\nexport class ConsentItem extends React.PureComponent<ConsentItemExternalProps> {\r\n private getText() {\r\n const { type, value: { name }, translation } = this.props;\r\n const texts = {\r\n [ConsentType.sms]: {\r\n className: 'smsStyles',\r\n typeText: translation.sms_text,\r\n nameText: name,\r\n icon: MdPhone\r\n },\r\n [ConsentType.push]: {\r\n className: 'pushStyles',\r\n typeText: translation.push_text,\r\n nameText: name,\r\n icon: MdNotifications\r\n }\r\n };\r\n\r\n return texts[type] || { className: '', typeText: '', nameText: '', icon: undefined };\r\n }\r\n\r\n public render() {\r\n const text = this.getText();\r\n const IconComponent = text.icon;\r\n\r\n return <div className={styles.consentItemWrapper}>\r\n <div className={`${styles.consentItem} ${this.props.isChannelActive ? styles.consentItemActive : styles.consentItemInactive}`}>\r\n <div className={styles.contextMenu}>\r\n {this.props.children}\r\n </div>\r\n <div>\r\n <div className={styles.consentTopPanel}>\r\n <div className={`${styles.displayColorWrapper} ${styles[text.className]}`} />\r\n </div>\r\n <div className={`${styles.consentHeaderPanel} compact row`}>\r\n <div className={styles.headerKey}><IconComponent /></div>\r\n <div className={styles.leftPanel}>\r\n <div className={styles.leftPanelInfo}>\r\n <span>\r\n <div className={`${styles.code} ${this.props.isPushActive ? styles.pushActiveStyles : styles[text.className]}`}>\r\n {text.typeText}\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div className={styles.consentName}>{text.nameText}</div>\r\n </div>\r\n </div>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { ButtonPrimary, ElementLoader, ValidationProps } from 'ui';\r\nimport { SimpleFormComponentProps, SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { requiredValidation, validatePhoneNumber, SimpleFormValidationConfig } from 'app/infrastructure/simple-form/validation';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { form, countdownTimer, phoneNumberMinLength } from 'app/area/user-profile/my-notifications/constants';\r\nimport { Consent, Subscription, ConsentType } from 'app/area/user-profile/my-notifications/types';\r\nimport { SharedState } from 'app/types-shared';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\n\r\nimport styles from './sms-modal.scss';\r\n\r\ninterface SmsModalProps {\r\n id?: number;\r\n recipientId?: number;\r\n consent?: Consent;\r\n\r\n fetching: boolean;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n translation?: { [key: string]: string };\r\n validation: { [key: string]: ValidationProps };\r\n sharedState?: SharedState;\r\n\r\n onDone: () => void;\r\n onClose: () => void;\r\n verifyCode: (subscription: Subscription, onSuccess: () => void) => void;\r\n loadConsent?: (id: number, recipientId: number) => void;\r\n clearConsent?: () => void;\r\n clearValidation: (fieldName: string) => void;\r\n}\r\n\r\ninterface SmsModalState {\r\n validPhoneNumber: boolean;\r\n counter: number;\r\n}\r\n\r\nexport type SmsModalContainerProps = SmsModalProps & SimpleFormProps;\r\n\r\nexport class SmsModal extends React.PureComponent<SmsModalContainerProps, SmsModalState> {\r\n private interval: any;\r\n\r\n public state: Readonly<SmsModalState> = {\r\n validPhoneNumber: false,\r\n counter: countdownTimer.value\r\n };\r\n\r\n public componentDidUpdate(prevProps: SmsModalContainerProps, prevState: SmsModalState) {\r\n prevState.validPhoneNumber !== this.state.validPhoneNumber && this.counter();\r\n }\r\n\r\n public componentDidMount() {\r\n const { id, sharedState: { id: recipientId } } = this.props;\r\n\r\n this.setState({\r\n validPhoneNumber: false\r\n });\r\n\r\n this.clearValidation();\r\n\r\n if (id && recipientId) {\r\n this.props.clearConsent();\r\n this.props.loadConsent(id, recipientId);\r\n }\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.interval && clearInterval(this.interval);\r\n }\r\n\r\n private counterOnDemand = () => {\r\n this.setState({ validPhoneNumber: true });\r\n\r\n if (this.state.counter === 0) {\r\n this.setState({\r\n counter: countdownTimer.value\r\n });\r\n this.counter();\r\n }\r\n }\r\n\r\n private onGenerateCode = () => {\r\n const { verifyCode, validate, serialize, sharedState: { id: recipientId }, translation } = this.props;\r\n\r\n const config: SimpleFormValidationConfig = [\r\n requiredValidation(form.sms.phoneNumber),\r\n validatePhoneNumber(form.sms.phoneNumber)\r\n ];\r\n\r\n const serializedForm = serialize(defaultSerializeMappings);\r\n const verificationMessage = translation.verification_code_message;\r\n const subscription = {\r\n value: {\r\n name: String(serializedForm.token),\r\n token: String(serializedForm.token)\r\n },\r\n type: ConsentType.sms,\r\n recipientId: Number(recipientId),\r\n ...((!!recipientId || recipientId === 0) && { id: recipientId }),\r\n ...(!!verificationMessage && { verificationMessage })\r\n };\r\n\r\n validate(config, () => verifyCode(subscription, () => {\r\n this.counterOnDemand();\r\n this.props.clearValidation(form.sms.phoneNumber);\r\n }));\r\n };\r\n\r\n private clearValidation = () => {\r\n if (!!this.props.validation) {\r\n this.props.clearValidation(form.sms.phoneNumber);\r\n this.props.clearValidation(form.sms.verificationCode);\r\n }\r\n }\r\n\r\n private isDisabled = () => {\r\n const { id, sharedState: { id: recipientId }, consent, fetching, formValues } = this.props;\r\n const { validPhoneNumber } = this.state;\r\n\r\n return (fetching || !validPhoneNumber)\r\n || (formValues && (!formValues[form.sms.verificationCode]\r\n || String(formValues[form.sms.verificationCode]).length < phoneNumberMinLength))\r\n || (id && recipientId && !(consent && consent.value));\r\n }\r\n\r\n private counter = () => {\r\n this.interval = setInterval(() => {\r\n this.setState({\r\n counter: this.state.counter - 1\r\n });\r\n this.state.counter <= 0 && clearInterval(this.interval);\r\n }, countdownTimer.intervalTime);\r\n }\r\n\r\n public render() {\r\n const { id, sharedState: { id: recipientId }, consent, fetching, formComponent: SimpleForm, onDone, onClose, translation } = this.props;\r\n const { validPhoneNumber } = this.state;\r\n\r\n const countdown = validPhoneNumber && this.state.counter > 0 && `(${this.state.counter})`;\r\n\r\n return <ModalWrapper\r\n headerTitle={(id && recipientId) ? translation.change_phone_number : translation.add_sms_title}\r\n btnTitle={translation.save}\r\n btnCancelTitle={translation.cancel}\r\n onDone={onDone}\r\n onClose={onClose}\r\n largeSize={false}\r\n closeOnDone={false}\r\n isDisabled={this.isDisabled}\r\n canCloseOnBackground={false}>\r\n\r\n {id && recipientId && !(consent && consent.value) && fetching && <ElementLoader />}\r\n\r\n {(id && recipientId && consent && consent.value) || (!id && !consent)\r\n ? <>\r\n <p>{translation.phone_number_info}</p>\r\n\r\n {id && recipientId && <SimpleForm\r\n className={styles.readOnly}\r\n name={form.sms.previousPhoneNumber}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.previous_phone_number }}\r\n initialValue={consent.value.token}\r\n readOnly={true}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />}\r\n\r\n <div className={styles.wrapper}>\r\n <div className={styles.input}>\r\n <SimpleForm\r\n name={form.sms.phoneNumber}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.new_phone_number, required: true }}\r\n initialValue={''}\r\n maxLength={254}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n readOnly={validPhoneNumber} />\r\n </div>\r\n <div className={styles.right}>\r\n <ButtonPrimary onClick={this.onGenerateCode} disabled={fetching || (validPhoneNumber && this.state.counter > 0)}>\r\n {translation.send_code} {countdown}\r\n </ButtonPrimary>\r\n </div>\r\n </div>\r\n {validPhoneNumber && <>\r\n <p>{translation.code_info}</p>\r\n <div className=\"row\">\r\n <div className=\"col-6\">\r\n <SimpleForm\r\n name={form.sms.verificationCode}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.verification_code, required: true }}\r\n initialValue={''}\r\n maxLength={254}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }} />\r\n </div>\r\n </div>\r\n </>}\r\n </> : null}\r\n </ModalWrapper>;\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { SimpleFormProps, SimpleFormComponentProps } from 'app/infrastructure/simple-form/types';\r\nimport { SimpleFormValidationConfig, requiredValidation } from 'app/infrastructure/simple-form';\r\nimport { ConsentType, Consent, Subscription } from 'app/area/user-profile/my-notifications/types';\r\nimport { form, MyNotificationTranslation } from 'app/area/user-profile/my-notifications/constants';\r\nimport { ValidationProps, withDropdownMenu } from 'ui';\r\nimport { DropdownMenuContext } from 'ui/common/dropdown-menu/types';\r\nimport { SmsModal } from 'app/area/user-profile/my-notifications/consents/sms-modal';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\n\r\nimport styles from './edit-sms-consent.scss';\r\n\r\ninterface EditConsentExternalProps {\r\n id: number;\r\n type: ConsentType;\r\n consent?: Consent;\r\n fetchingLoadConsent: boolean;\r\n fetchingSaveSubscription: boolean;\r\n sharedState?: any;\r\n validation: { [key: string]: ValidationProps; };\r\n translation?: MyNotificationTranslation;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n clearConsent: () => void;\r\n loadConsent: (id: number, recipientId: number) => void;\r\n loadConsents: () => void;\r\n saveSubscription: (id: number, subscription: Subscription, onSuccess: () => void) => void;\r\n verifyCode: (subscription: Subscription, onSuccess: () => void) => void;\r\n clearValidation: (fieldName: string) => void;\r\n}\r\n\r\ninterface EditSmsConsentState {\r\n isOpen: boolean;\r\n}\r\n\r\nexport type EditSmsConsentProps = EditConsentExternalProps & DropdownMenuContext & SimpleFormProps;\r\n\r\nexport class EditSmsConsentComponent extends React.PureComponent<EditSmsConsentProps, EditSmsConsentState> {\r\n constructor(props: EditSmsConsentProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isOpen: false\r\n };\r\n }\r\n\r\n private handleToggle = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n });\r\n };\r\n\r\n private onClose = () => {\r\n this.handleToggle();\r\n this.props.clearConsent();\r\n this.props.handleDropdownHide && this.props.handleDropdownHide();\r\n };\r\n\r\n private onDone = () => {\r\n const {\r\n id,\r\n type,\r\n saveSubscription,\r\n sharedState: { id: recipientId },\r\n serialize,\r\n validate,\r\n translation\r\n } = this.props;\r\n\r\n const serializedForm = serialize(defaultSerializeMappings);\r\n const verificationCode = String(serializedForm[form.sms.verificationCode]);\r\n const subscription = {\r\n id,\r\n recipientId: Number(recipientId),\r\n type,\r\n ...(!!verificationCode && { verificationCode }),\r\n value: {\r\n name: String(serializedForm.token),\r\n token: String(serializedForm.token)\r\n }\r\n };\r\n\r\n const validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.sms.phoneNumber)\r\n ];\r\n\r\n id && id > 0 && validate(validationConfig,\r\n () => saveSubscription(id, subscription,\r\n () => {\r\n this.props.loadConsents();\r\n this.props.clearConsent();\r\n }), translation.validation_error);\r\n };\r\n\r\n public render() {\r\n const {\r\n fetchingLoadConsent,\r\n fetchingSaveSubscription\r\n } = this.props;\r\n\r\n return (<li className={styles.wrapper}>\r\n <button className=\"dropdown-item\" onClick={this.handleToggle} disabled={fetchingLoadConsent}>\r\n {this.props.translation.edit}\r\n </button>\r\n {this.state.isOpen\r\n && <SmsModal\r\n fetching={fetchingLoadConsent || fetchingSaveSubscription}\r\n onDone={this.onDone}\r\n onClose={this.onClose}\r\n {...this.props} />}\r\n </li>);\r\n }\r\n}\r\n\r\nconst component = withDropdownMenu(EditSmsConsentComponent);\r\n\r\nexport { component as EditSmsConsent };\r\n","export const hasPropertyValues = (object: Object, requiredProperties?: string[]): boolean => {\r\n const isNotEmpty = !!Object.keys(object).length;\r\n\r\n const hasRequiredValues = requiredProperties\r\n ? requiredProperties.map(req => object[req]).filter(f => !!f).length === requiredProperties.length\r\n : true;\r\n\r\n const hasValues = !Object.keys(object).map(name => object[name]).filter(f => !f).length;\r\n\r\n return isNotEmpty && hasValues && hasRequiredValues;\r\n};\r\n","import { AppSetting } from 'dependencies/appsettings';\r\n\r\nconst webPushConfiguration = (AppSetting && AppSetting.WebPush) || {};\r\nexport const { firebaseConfig = {}, webPushCertificate = {} } = webPushConfiguration as any;\r\n","import { UAParser } from 'ua-parser-js';\r\nimport { hasPropertyValues } from 'app/infrastructure/push/hasPropertyValues';\r\nimport { ConfigurationAccess } from 'app/area/user-profile/my-notifications/types';\r\nimport { firebaseConfig, webPushCertificate } from 'app/infrastructure/push/configuration-data';\r\n\r\nconst { b64PublicKey } = webPushCertificate;\r\n\r\nconst parser = new UAParser();\r\nconst browser = parser.getBrowser();\r\nconst validBrowser = browser && browser.name !== 'Safari' && browser.name !== '[Mobile] Safari';\r\n\r\nexport const configurationAccess: ConfigurationAccess = {\r\n push: validBrowser && firebaseConfig && b64PublicKey && hasPropertyValues(firebaseConfig, ['messagingSenderId'])\r\n};\r\n","import { ConsentType, ConsentPermission } from 'app/area/user-profile/my-notifications/types';\r\nimport { configurationAccess } from 'app/area/user-profile/my-notifications/configuration-access';\r\n\r\nexport const isChannelActive = (type: ConsentType, permission: ConsentPermission): boolean => {\r\n const conf = {\r\n [ConsentType.sms]: permission.sms,\r\n [ConsentType.push]: permission.push && configurationAccess.push\r\n };\r\n\r\n return conf[type];\r\n};\r\n","import * as React from 'react';\r\nimport { Messaging } from './types';\r\n\r\nexport const FmcContext = React.createContext<Messaging>({} as any);\r\n","import { UAParser } from 'ua-parser-js';\r\n\r\nexport const getPushName = (parser: UAParser) => {\r\n const maxLength = 60;\r\n const device = parser.getDevice();\r\n const browser = parser.getBrowser();\r\n const os = parser.getOS();\r\n\r\n const deviceDesc = (device.vendor && device.model) ? `${device.vendor} ${device.model} ` : '';\r\n const osDesc = (os.name && os.version) ? `${os.name} ${os.version} ` : '';\r\n const browserDesc = (browser.name && browser.major) ? `(${browser.name} ${browser.major})` : '';\r\n const desc = (deviceDesc + osDesc + browserDesc).trim();\r\n\r\n return desc ? desc.substr(0, maxLength) : '';\r\n};\r\n","import { NotificationPermissionType } from 'app/area/user-profile/my-notifications/types';\r\n\r\nexport const getNotificationPermission = (): NotificationPermissionType => {\r\n\r\n const permissionType = 'Notification' in window && window.Notification.permission;\r\n\r\n if (!['default', 'denied', 'granted'].includes(permissionType)) {\r\n return NotificationPermissionType.NotSupported;\r\n } else {\r\n if (permissionType === 'granted') {\r\n return NotificationPermissionType.Granted;\r\n } else {\r\n return permissionType === 'denied' ? NotificationPermissionType.Denied : NotificationPermissionType.Unknown;\r\n }\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { ElementLoader, ValidationProps } from 'ui';\r\nimport { SimpleFormComponentProps, SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { FIELD_TYPE } from 'app/infrastructure/simple-form';\r\nimport { ModalWrapper } from 'app/components/modal-wrapper/modal-wrapper';\r\nimport { form, pushNameMaxLength, pushNameMinLength } from 'app/area/user-profile/my-notifications/constants';\r\nimport { Consent, ConsentType, NotificationPermissionType } from 'app/area/user-profile/my-notifications/types';\r\nimport { SharedState } from 'app/types-shared';\r\n\r\nimport styles from './push-modal.scss';\r\nimport { getPushName } from 'app/area/user-profile/my-notifications/consents/get-push-name';\r\nimport { UAParser } from 'ua-parser-js';\r\nimport { Messaging } from 'app/infrastructure/push/types';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport { getNotificationPermission } from 'app/area/user-profile/my-notifications/notification-permission';\r\n\r\ninterface PushModalProps {\r\n id?: number;\r\n recipientId?: number;\r\n consent?: Consent;\r\n consents: Consent[];\r\n\r\n value: Messaging;\r\n\r\n fetching: boolean;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n translation?: { [key: string]: string };\r\n validation: { [key: string]: ValidationProps };\r\n sharedState?: SharedState;\r\n\r\n onDone: (token?: string) => void;\r\n onClose: () => void;\r\n loadConsent?: (id: number, recipientId: number) => void;\r\n clearConsent?: () => void;\r\n clearValidation: (fieldName: string) => void;\r\n}\r\n\r\nexport type PushModalContainerProps = PushModalProps & SimpleFormProps;\r\n\r\nexport class PushModal extends React.PureComponent<PushModalContainerProps, any> {\r\n\r\n public componentDidMount() {\r\n const { id, sharedState: { id: recipientId } } = this.props;\r\n\r\n this.clearValidation();\r\n\r\n if (id && recipientId) {\r\n this.props.clearConsent();\r\n this.props.loadConsent(id, recipientId);\r\n }\r\n }\r\n\r\n private clearValidation = () => {\r\n if (!!this.props.validation) {\r\n this.props.clearValidation(form.push.name);\r\n }\r\n }\r\n\r\n private isDisabled = () => {\r\n const { id, sharedState: { id: recipientId }, consent, fetching, formValues } = this.props;\r\n return fetching || String(formValues[form.push.name]).length < pushNameMinLength || (id && recipientId && !(consent && consent.value));\r\n }\r\n\r\n private onDone = () => {\r\n const { id, consents, value: { state: { fmcToken }, requestPermission }, onDone, translation } = this.props;\r\n\r\n if (!id && !fmcToken) {\r\n notifyUser.error(translation.refresh_page);\r\n }\r\n\r\n return !id\r\n ? getNotificationPermission() === NotificationPermissionType.Granted\r\n ? !(fmcToken && !!consents.find(f => f.type === ConsentType.push && f.value.token === fmcToken))\r\n ? requestPermission(() => onDone(fmcToken))\r\n : notifyUser.info(this.props.translation.push_token_exists_info)\r\n : notifyUser.error(translation.consent_push_browser_allow_message)\r\n : onDone(fmcToken);\r\n }\r\n\r\n public render() {\r\n const { id, sharedState: { id: recipientId }, consent, fetching, formComponent: SimpleForm, onClose, translation } = this.props;\r\n\r\n return <ModalWrapper\r\n headerTitle={(id && recipientId) ? translation.edit_push_title : translation.add_push_title}\r\n btnTitle={translation.save}\r\n btnCancelTitle={translation.cancel}\r\n onDone={this.onDone}\r\n onClose={onClose}\r\n largeSize={false}\r\n closeOnDone={false}\r\n isDisabled={this.isDisabled}\r\n canCloseOnBackground={false}>\r\n\r\n {((id && recipientId && !(consent && consent.value)) || fetching) && <ElementLoader />}\r\n\r\n {(id && recipientId && consent && consent.value) || (!id && !consent) && !fetching\r\n ? <div className={styles.wrapper}>\r\n <div className={styles.input}>\r\n <SimpleForm\r\n name={form.push.name}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.push_name, required: true }}\r\n initialValue={id ? consent.value.name : getPushName(new UAParser())}\r\n maxLength={pushNameMaxLength}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n readOnly={false} />\r\n </div>\r\n </div>\r\n : null}\r\n </ModalWrapper>;\r\n }\r\n}\r\n","\r\nimport * as React from 'react';\r\nimport { SimpleFormProps, SimpleFormComponentProps } from 'app/infrastructure/simple-form/types';\r\nimport { SimpleFormValidationConfig, requiredValidation } from 'app/infrastructure/simple-form';\r\nimport { ConsentType, Consent, Subscription } from 'app/area/user-profile/my-notifications/types';\r\nimport { form, MyNotificationTranslation } from 'app/area/user-profile/my-notifications/constants';\r\nimport { ValidationProps, withDropdownMenu } from 'ui';\r\nimport { DropdownMenuContext } from 'ui/common/dropdown-menu/types';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { FmcContext } from 'app/infrastructure/push/context';\r\nimport { PushModal } from 'app/area/user-profile/my-notifications/consents/push-modal';\r\n\r\nimport styles from './edit-push-consent.scss';\r\n\r\ninterface EditConsentExternalProps {\r\n id: number;\r\n consent?: Consent;\r\n consents: Consent[];\r\n fetchingLoadConsent: boolean;\r\n fetchingSubscribePush: boolean;\r\n sharedState?: any;\r\n validation: { [key: string]: ValidationProps; };\r\n translation?: MyNotificationTranslation;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n clearConsent: () => void;\r\n loadConsent: (id: number, recipientId: number) => void;\r\n loadConsents: () => void;\r\n saveSubscription: (id: number, subscription: Subscription, onSuccess: () => void) => void;\r\n clearValidation: (fieldName: string) => void;\r\n}\r\n\r\ninterface EditPushConsentState {\r\n isOpen: boolean;\r\n}\r\n\r\nexport type EditPushConsentProps = EditConsentExternalProps & DropdownMenuContext & SimpleFormProps;\r\n\r\n// tslint:disable:jsx-no-lambda\r\n// tslint:disable:react-this-binding-issue\r\nexport class EditPushConsentComponent extends React.PureComponent<EditPushConsentProps, EditPushConsentState> {\r\n constructor(props: EditPushConsentProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isOpen: false\r\n };\r\n }\r\n\r\n private handleToggle = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n });\r\n };\r\n\r\n private onClose = () => {\r\n this.handleToggle();\r\n this.props.clearConsent();\r\n this.props.handleDropdownHide && this.props.handleDropdownHide();\r\n };\r\n\r\n private onDone = () => {\r\n const {\r\n id,\r\n consent,\r\n saveSubscription,\r\n sharedState: { id: recipientId },\r\n serialize,\r\n validate,\r\n translation,\r\n loadConsents\r\n } = this.props;\r\n\r\n const serializedForm = serialize(defaultSerializeMappings);\r\n\r\n const subscription = {\r\n id,\r\n recipientId,\r\n type: ConsentType.push,\r\n value: {\r\n name: String(serializedForm.name),\r\n token: consent.value.token\r\n }\r\n };\r\n\r\n const validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.push.name)\r\n ];\r\n\r\n id && id > 0 && validate(validationConfig, () =>\r\n saveSubscription(id, subscription,\r\n () => {\r\n loadConsents();\r\n this.props.clearConsent();\r\n }), translation.validation_error);\r\n };\r\n\r\n public render() {\r\n const {\r\n fetchingLoadConsent,\r\n fetchingSubscribePush\r\n } = this.props;\r\n\r\n return (<li className={styles.wrapper}>\r\n <button className=\"dropdown-item\" onClick={this.handleToggle} disabled={fetchingLoadConsent}>\r\n {this.props.translation.edit}\r\n </button>\r\n {this.state.isOpen\r\n && <FmcContext.Consumer>\r\n {value =>\r\n <PushModal\r\n fetching={fetchingSubscribePush}\r\n value={value}\r\n onDone={this.onDone}\r\n onClose={this.onClose}\r\n {...this.props} />}\r\n </FmcContext.Consumer>}\r\n </li>);\r\n }\r\n}\r\n\r\nconst component = withDropdownMenu(EditPushConsentComponent);\r\n\r\nexport { component as EditPushConsent };\r\n","import * as React from 'react';\r\nimport { ConsentItem } from 'app/area/user-profile/my-notifications/consent-item';\r\nimport { MeatballMenu, PromptConfirmationModal, ValidationProps } from 'ui';\r\nimport { SimpleFormValidation } from 'app/infrastructure/simple-form';\r\nimport { SerializeMapping, FormWireData, FormValuesType, SimpleFormComponentProps } from 'app/infrastructure/simple-form/types';\r\nimport { ConsentType, Consent, ConsentPermission } from 'app/area/user-profile/my-notifications/types';\r\nimport { EditSmsConsent } from 'app/area/user-profile/my-notifications/consents/edit-sms-consent';\r\nimport { MyNotificationTranslation } from 'app/area/user-profile/my-notifications/constants';\r\nimport { isChannelActive } from 'app/area/user-profile/my-notifications/consents/channel-permission';\r\nimport { EditPushConsent } from 'app/area/user-profile/my-notifications/consents/edit-push-consent';\r\nimport { FmcContext } from 'app/infrastructure/push/context';\r\n\r\ninterface ConsentListProps {\r\n consent?: Consent;\r\n consents?: Consent[];\r\n fetchingLoadConsent: boolean;\r\n formValues: FormValuesType;\r\n validation: { [key: string]: ValidationProps; };\r\n validate: SimpleFormValidation;\r\n translation: MyNotificationTranslation;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n permission?: ConsentPermission;\r\n serialize: (serializeMapping: SerializeMapping) => FormWireData;\r\n loadConsents: () => void;\r\n loadConsent: (id: number, recipientId: number) => void;\r\n clearConsent: () => void;\r\n deleteConsent: (id: number, recipientId: number, onSuccess: () => void) => void;\r\n clearValidation: (formName: string) => void;\r\n}\r\n\r\nexport const ConsentList: React.FC<ConsentListProps> = (props: ConsentListProps) => {\r\n const { consents, permission, loadConsents, deleteConsent, translation } = props;\r\n const allowedConsents = consents && consents.filter(c => c.type in ConsentType);\r\n\r\n const renderEditView = (consent: Consent) => {\r\n const editView = {\r\n [ConsentType.sms]: EditSmsConsent,\r\n [ConsentType.push]: EditPushConsent\r\n };\r\n\r\n const Component = editView[consent.type];\r\n return <Component {...props} id={consent.id} />;\r\n };\r\n\r\n if (allowedConsents && allowedConsents.length === 0) {\r\n return <p className=\"no-content\">{translation.no_data}</p>;\r\n }\r\n\r\n return <FmcContext.Consumer>\r\n {value => {\r\n return allowedConsents && allowedConsents.map(consent => {\r\n const handleDelete = deleteConsent && consent && consent.id && consent.recipientId\r\n ? () => deleteConsent(consent.id, consent.recipientId, loadConsents)\r\n : undefined;\r\n const channelActive = permission && isChannelActive(consent.type, permission);\r\n const activePushConsent = consents.find(c => c.type === ConsentType.push && c.value.token === value.state.fmcToken);\r\n\r\n return <ConsentItem {...consent} key={consent.id} isChannelActive={channelActive}\r\n translation={translation} isPushActive={(activePushConsent && activePushConsent.id) === consent.id}>\r\n <MeatballMenu>\r\n {channelActive && renderEditView(consent)}\r\n <li>\r\n <PromptConfirmationModal\r\n title={translation.consent_delete}\r\n description={translation.consent_delete_description}\r\n continueText={translation.consent_delete}\r\n cancelText={translation.cancel}\r\n onContinue={handleDelete}>\r\n <button type=\"button\" className=\"dropdown-item\">\r\n {translation.consent_delete}\r\n </button>\r\n </PromptConfirmationModal>\r\n </li>\r\n </MeatballMenu>\r\n </ConsentItem>;\r\n });\r\n }}\r\n </FmcContext.Consumer>;\r\n};\r\n","import * as React from 'react';\r\nimport * as mdPlus from 'react-icons/lib/md/add';\r\nimport { SimpleFormProps, SimpleFormComponentProps } from 'app/infrastructure/simple-form/types';\r\nimport { SimpleFormValidationConfig, requiredValidation } from 'app/infrastructure/simple-form';\r\nimport { Subscription, ConsentType } from 'app/area/user-profile/my-notifications/types';\r\nimport { SmsModal } from 'app/area/user-profile/my-notifications/consents/sms-modal';\r\nimport { form, MyNotificationTranslation } from 'app/area/user-profile/my-notifications/constants';\r\nimport { ValidationProps, AddButton } from 'ui';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\n\r\nimport styles from './add-sms-consent.scss';\r\n\r\ninterface AddConsentExternalProps {\r\n fetchingSaveSubscription: boolean;\r\n sharedState?: any;\r\n validation: ValidationProps[];\r\n translation?: MyNotificationTranslation;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n loadConsents: () => void;\r\n saveSubscription: (id: number, subscription: Subscription, onSuccess: () => void) => void;\r\n verifyCode: (subscription: Subscription, onSuccess: () => void) => void;\r\n clearValidation: (fieldName: string) => void;\r\n}\r\n\r\ninterface AddSmsConsentState {\r\n isOpen: boolean;\r\n}\r\n\r\nexport type AddSmsConsentProps = AddConsentExternalProps & SimpleFormProps;\r\n\r\nexport class AddSmsConsent extends React.PureComponent<AddSmsConsentProps, AddSmsConsentState> {\r\n public state: Readonly<AddSmsConsentState> = {\r\n isOpen: false\r\n };\r\n\r\n private handleToggle = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n });\r\n };\r\n\r\n private onDone = () => {\r\n const {\r\n saveSubscription,\r\n sharedState: { id: recipientId },\r\n serialize,\r\n validate,\r\n translation,\r\n loadConsents\r\n } = this.props;\r\n\r\n const serializedForm = serialize(defaultSerializeMappings);\r\n const verificationCode = String(serializedForm[form.sms.verificationCode]);\r\n const subscription = {\r\n recipientId: Number(recipientId),\r\n type: ConsentType.sms,\r\n ...(!!verificationCode && { verificationCode }),\r\n value: {\r\n name: String(serializedForm.token),\r\n token: String(serializedForm.token)\r\n }\r\n };\r\n\r\n const validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.sms.phoneNumber)\r\n ];\r\n\r\n validate(validationConfig, () =>\r\n saveSubscription(undefined, subscription,\r\n () => {\r\n this.handleToggle();\r\n loadConsents();\r\n }), translation.validation_error);\r\n };\r\n\r\n public render() {\r\n const { fetchingSaveSubscription, translation } = this.props;\r\n return (<div className={styles.wrapper}>\r\n <AddButton\r\n icon={mdPlus}\r\n onClick={this.handleToggle}>\r\n {translation.add_sms_title}\r\n </AddButton>\r\n {this.state.isOpen\r\n && <SmsModal\r\n fetching={fetchingSaveSubscription}\r\n onDone={this.onDone}\r\n onClose={this.handleToggle}\r\n {...this.props} />}\r\n </div>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport * as mdPlus from 'react-icons/lib/md/add';\r\nimport { SimpleFormProps, SimpleFormComponentProps } from 'app/infrastructure/simple-form/types';\r\nimport { SimpleFormValidationConfig, requiredValidation } from 'app/infrastructure/simple-form';\r\nimport { ConsentType, Subscription, Consent, NotificationPermissionType } from 'app/area/user-profile/my-notifications/types';\r\nimport { PushModal } from 'app/area/user-profile/my-notifications/consents/push-modal';\r\nimport { form, MyNotificationTranslation } from 'app/area/user-profile/my-notifications/constants';\r\nimport { ValidationProps, AddButton } from 'ui';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { FmcContext } from 'app/infrastructure/push/context';\r\n\r\nimport styles from './add-sms-consent.scss';\r\nimport { getNotificationPermission } from 'app/area/user-profile/my-notifications/notification-permission';\r\n\r\ninterface AddConsentExternalProps {\r\n fetchingSaveSubscription: boolean;\r\n sharedState?: any;\r\n validation: ValidationProps[];\r\n translation?: MyNotificationTranslation;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n consents: Consent[];\r\n loadConsents: () => void;\r\n saveSubscription: (id: number, subscription: Subscription, onSuccess: () => void) => void;\r\n clearValidation: (fieldName: string) => void;\r\n}\r\n\r\ninterface AddPushConsentState {\r\n isOpen: boolean;\r\n}\r\n\r\nexport type AddPushConsentProps = AddConsentExternalProps & SimpleFormProps;\r\n\r\nexport class AddPushConsent extends React.PureComponent<AddPushConsentProps, AddPushConsentState> {\r\n public state: Readonly<AddPushConsentState> = {\r\n isOpen: false\r\n };\r\n\r\n private handleToggle = () => {\r\n this.setState({\r\n isOpen: !this.state.isOpen\r\n });\r\n };\r\n\r\n private onDone = (token: string) => {\r\n const {\r\n saveSubscription,\r\n sharedState: { id: recipientId },\r\n serialize,\r\n validate,\r\n translation,\r\n loadConsents\r\n } = this.props;\r\n\r\n const serializedForm = serialize(defaultSerializeMappings);\r\n\r\n const subscription = {\r\n recipientId,\r\n type: ConsentType.push,\r\n value: {\r\n name: String(serializedForm.name),\r\n token\r\n }\r\n };\r\n\r\n const validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation(form.push.name)\r\n ];\r\n\r\n validate(validationConfig, () =>\r\n saveSubscription(undefined, subscription,\r\n () => {\r\n this.handleToggle();\r\n loadConsents();\r\n }), translation.validation_error);\r\n };\r\n\r\n private isDisabled = (): boolean => {\r\n const permission = getNotificationPermission();\r\n return permission !== NotificationPermissionType.Granted;\r\n };\r\n\r\n public render() {\r\n const { fetchingSaveSubscription, translation } = this.props;\r\n\r\n return (<FmcContext.Consumer>\r\n {value => {\r\n return <div className={styles.wrapper}>\r\n <div className={styles.wrapper}>\r\n <AddButton\r\n icon={mdPlus}\r\n onClick={this.handleToggle}\r\n disabled={this.isDisabled()}>\r\n {translation.add_push_title}\r\n </AddButton>\r\n </div>\r\n\r\n {this.state.isOpen\r\n && <PushModal\r\n fetching={fetchingSaveSubscription}\r\n onDone={this.onDone}\r\n value={value}\r\n onClose={this.handleToggle}\r\n {...this.props} />}\r\n </div>;\r\n }}\r\n </FmcContext.Consumer>);\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { MyNotificationsContainerProps } from 'app/area/user-profile/my-notifications/types';\r\nimport { AddSmsConsent } from 'app/area/user-profile/my-notifications/consents/add-sms-consent';\r\nimport { AddPushConsent } from 'app/area/user-profile/my-notifications/consents/add-push-consent';\r\nimport { SimpleFormComponentProps } from 'app/infrastructure/simple-form/types';\r\nimport { configurationAccess } from 'app/area/user-profile/my-notifications/configuration-access';\r\nimport styles from './top-panel.scss';\r\n\r\ninterface TopPanelPropsExternal {\r\n recipientId: number;\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n loadData: () => void;\r\n}\r\n\r\nexport type TopPanelProps = MyNotificationsContainerProps & TopPanelPropsExternal;\r\n\r\nexport const TopPanel = (props: TopPanelProps) => {\r\n const { permission, formComponent: SimpleForm, loadData } = props;\r\n\r\n const hasPermissions = permission && Object.keys(permission).map(key => permission[key]).includes(true);\r\n\r\n return (hasPermissions ? <div className={`row ${styles.buttonContainer}`}>\r\n <div className=\"col-md-12\">\r\n {permission && permission.sms && <AddSmsConsent\r\n {...props}\r\n formComponent={SimpleForm}\r\n loadConsents={loadData} />}\r\n\r\n {configurationAccess.push && permission && permission.push && <AddPushConsent\r\n {...props}\r\n formComponent={SimpleForm}\r\n loadConsents={loadData} />}\r\n </div>\r\n </div> : null);\r\n};\r\n","import * as React from 'react';\r\nimport FaInfo from 'react-icons/lib/fa/info';\r\nimport { FmcContext } from 'app/infrastructure/push/context';\r\nimport { Consent, ConsentType, NotificationPermissionType } from 'app/area/user-profile/my-notifications/types';\r\nimport styles from './info-messages.scss';\r\nimport { getNotificationPermission } from 'app/area/user-profile/my-notifications/notification-permission';\r\n\r\ninterface InfoMessagesProps {\r\n consents: Consent[];\r\n translation: any;\r\n}\r\n\r\nconst InfoMessagePanel = (props: { text: string }) => <div className=\"col-md-12\">\r\n <div className={styles.infoMessagePanel}>\r\n <FaInfo /> {props.text}\r\n </div>\r\n</div>;\r\n\r\nexport const InfoMessages = (props: InfoMessagesProps) => {\r\n const { consents, translation } = props;\r\n\r\n return (<div className=\"row\">\r\n {getNotificationPermission() === NotificationPermissionType.Denied\r\n && <InfoMessagePanel text={translation.consent_push_browser_allow_message} />}\r\n <FmcContext.Consumer>\r\n {value => {\r\n const activePushConsent = consents && consents.find(c => c.type === ConsentType.push && c.value.token === value.state.fmcToken);\r\n return !activePushConsent && <InfoMessagePanel text={translation.consent_push_not_active_message} />;\r\n }}\r\n </FmcContext.Consumer>\r\n </div>);\r\n};\r\n","import React from 'react';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport styles from './user-profile-heading.scss';\r\nimport { ButtonCallToAction } from 'ui';\r\nimport { externalRedirect } from 'app/infrastructure/platform';\r\n\r\ninterface UserProfileHeadingProps {\r\n title: string;\r\n sectionTitle: string;\r\n disclaimer?: string;\r\n showVeracityProfileLink?: boolean;\r\n veracityProfileLinkTitle?: string;\r\n}\r\n\r\nexport const UserProfileHeading = ({ title, sectionTitle, disclaimer, \r\n showVeracityProfileLink, veracityProfileLinkTitle }: UserProfileHeadingProps) => {\r\n\r\n const isVeracityEnabled = (AppSetting.FeatureToggle || {} as any).veracityEnabled;\r\n const veracityProfileLink = AppSetting.VeracityProfileLink;\r\n const redirectToVeracityProfile = () => externalRedirect(veracityProfileLink);\r\n\r\n return (<>\r\n <div className={`${styles.headerWrapper} header-panel`}>\r\n <div className={`main-grid ${isVeracityEnabled ? styles.flexContainer : ''}`}>\r\n <div className={styles.headerPanel}>\r\n <h2>{title}</h2>\r\n </div>\r\n {\r\n showVeracityProfileLink && isVeracityEnabled && !!veracityProfileLink && <ButtonCallToAction\r\n id=\"veracity-profile-link\"\r\n onClick={redirectToVeracityProfile}\r\n disabled={false}>\r\n {veracityProfileLinkTitle}\r\n </ButtonCallToAction>\r\n }\r\n </div>\r\n </div>\r\n {sectionTitle && <div className={`main-grid ${styles.sectionHeading}`}>\r\n <h2>{sectionTitle}</h2>\r\n {disclaimer && <p>{disclaimer}</p>}\r\n </div>}\r\n </>);\r\n};\r\n","import * as React from 'react';\r\nimport { actionCreators } from './actions';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { myNotificationsTranslations } from './constants';\r\nimport { MyNotificationsContainerProps } from './types';\r\nimport { ElementLoader, Paper } from 'ui';\r\nimport { withSimpleForm, simpleFieldForPath } from 'app/infrastructure/simple-form';\r\nimport { ConsentList } from './consent-list';\r\nimport { TopPanel } from 'app/area/user-profile/my-notifications/top-panel';\r\nimport { InfoMessages } from './info-messages';\r\nimport { ScrollToTop } from 'ui/scroll-to-top/scroll-to-top';\r\nimport { UserProfileHeading } from 'app/area/user-profile/user-profile-heading';\r\n\r\nimport styles from './my-notifications.scss';\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.myNotifications);\r\n\r\nexport class MyNotificationsComponent extends React.Component<MyNotificationsContainerProps, {}> {\r\n public static statePath: string = STATE.myNotifications;\r\n\r\n public componentDidMount() {\r\n this.props.loadPermission();\r\n this.loadConsents();\r\n }\r\n\r\n private loadConsents = () => {\r\n const { loadConsents, sharedState: { id: recipientId } } = this.props;\r\n recipientId && loadConsents(recipientId);\r\n }\r\n\r\n public render() {\r\n const { consents, fetchingLoadConsents, sharedState: { id: recipientId }, translation } = this.props;\r\n\r\n return (<Paper componentId=\"my-notifications-paper\" className=\"\">\r\n <UserProfileHeading\r\n title={translation.main_title}\r\n sectionTitle={translation.sub_title}\r\n disclaimer={translation.consents_disclaimer} />\r\n\r\n <section>\r\n <div className=\"main-grid\">\r\n <InfoMessages consents={consents} translation={translation} />\r\n <div className={styles.consentsContainer}>\r\n <TopPanel\r\n {...this.props}\r\n recipientId={recipientId}\r\n formComponent={SimpleForm}\r\n loadData={this.loadConsents} />\r\n <div className=\"row expanders-in-equal-cols\">\r\n <div className=\"col-md-12\">\r\n {fetchingLoadConsents\r\n ? <ElementLoader />\r\n : <ConsentList\r\n {...this.props}\r\n formComponent={SimpleForm}\r\n loadConsents={this.loadConsents} />}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <ScrollToTop />\r\n </Paper>);\r\n }\r\n}\r\n\r\nconst container = withSimpleForm(containerFactory(MyNotificationsComponent, actionCreators, {}, myNotificationsTranslations));\r\n\r\nexport { container as MyNotifications };\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { actionCreators } from './actions';\r\nimport { Paper, PromptConfirmation } from 'ui';\r\nimport { userSettingsTranslations } from './constants';\r\nimport { endpoint } from './endpoints';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { withPrompt, PromptProps } from 'app/components';\r\nimport { ButtonTertiary, ButtonCallToAction } from 'ui';\r\nimport {\r\n FIELD_TYPE, simpleFieldForPath, SimpleFormValidationConfig, requiredValidation, withSimpleForm, validateEmail\r\n} from 'app/infrastructure/simple-form';\r\nimport { SerializeType, SimpleFormProps } from 'app/infrastructure/simple-form/types';\r\nimport { defaultSerializeMappings } from 'app/infrastructure/simple-form/serialize';\r\nimport { ScrollToTop } from 'ui/scroll-to-top/scroll-to-top';\r\nimport { safeParam } from 'app/infrastructure/data/sanitize';\r\nimport { MODAL } from 'app/shell/modal-host-types';\r\nimport { isInternetExplorer } from 'app/infrastructure/platform';\r\nimport { Router } from 'react-router';\r\nimport { UserProfileHeading } from 'app/area/user-profile/user-profile-heading';\r\nimport { isVeracityEnabled } from 'app/infrastructure/hosting';\r\n\r\ninterface RouteParams {\r\n focus: string;\r\n}\r\n\r\ninterface UserSettingsExternalProps {\r\n routeParams: RouteParams;\r\n router: Router;\r\n}\r\n\r\ninterface UserSettingsState {\r\n initDelayed: boolean;\r\n}\r\n\r\nexport type ProfileContainerProps = UserSettingsExternalProps & typeof actionCreators\r\n & PromptProps & DefaultContainerProps & SimpleFormProps;\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.userSettings);\r\n\r\nexport class UserSettingsComponent extends React.Component<ProfileContainerProps, UserSettingsState> {\r\n\r\n public static statePath: string = STATE.userSettings;\r\n\r\n public state: Readonly<UserSettingsState> = {\r\n initDelayed: false\r\n };\r\n\r\n private hasFocus = (refName: string): boolean => {\r\n return safeParam(this.props.location.query.focus as string) &&\r\n safeParam(this.props.location.query.focus as string) === refName;\r\n }\r\n\r\n private setInitialValue = (value: ComplexValue<number>) => {\r\n const newValue = {\r\n ...value,\r\n description: value.allLevelDescription\r\n };\r\n\r\n return !!value.allLevelDescription ? newValue : value;\r\n }\r\n\r\n private validationConfig: SimpleFormValidationConfig = [\r\n requiredValidation('name'),\r\n requiredValidation('language'),\r\n requiredValidation('usergroup'),\r\n validateEmail('email')\r\n ];\r\n // tslint:disable-next-line:max-func-body-length\r\n\r\n private saveChanges = () => {\r\n const { validate, serialize, saveChanges, translation } = this.props;\r\n\r\n validate(this.validationConfig, () => saveChanges(serialize(defaultSerializeMappings)), translation.validation_error);\r\n }\r\n\r\n private onChangePasswordModal = (e: any) => {\r\n e.preventDefault();\r\n this.props.displayModal(MODAL.changePassword);\r\n }\r\n\r\n public componentWillUnmount() {\r\n this.props.clearValidation();\r\n }\r\n\r\n public componentDidMount() {\r\n if (isInternetExplorer()) {\r\n this.setState({ initDelayed: false });\r\n setTimeout(() => {\r\n this.setState({ initDelayed: true });\r\n }, 300);\r\n } else {\r\n this.setState({ initDelayed: true });\r\n }\r\n }\r\n\r\n // tslint:disable-next-line:max-func-body-length\r\n public render() {\r\n const { translation, sharedState } = this.props;\r\n const { initDelayed } = this.state;\r\n\r\n const readOnlyVeracity = isVeracityEnabled();\r\n\r\n return <Paper componentId={'user-settings-paper'} className=\"user-profile-section-paper\">\r\n <UserProfileHeading\r\n title={translation.main_title}\r\n sectionTitle={translation.sub_title}\r\n veracityProfileLinkTitle={translation.edit_veracity_profile}\r\n showVeracityProfileLink={isVeracityEnabled()} />\r\n <section>\r\n <div className=\"main-grid\">\r\n {this.props.shouldDisplayModal\r\n ? <PromptConfirmation\r\n title={translation.cancel_changes}\r\n description={translation.are_you_sure}\r\n continueText={translation.undo_all}\r\n cancelText={translation.go_back_to_profile}\r\n onContinue={this.props.continue}\r\n onCancel={this.props.cancel}\r\n />\r\n : ''}\r\n <div className=\"row\">\r\n <div className=\"col-lg-6\">\r\n <SimpleForm\r\n name=\"name\"\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.name, label: 'user', required: true }}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n initialValue={sharedState.name}\r\n readOnly={!sharedState.myProfileAllowChangingName || readOnlyVeracity}\r\n />\r\n </div>\r\n <div className=\"col-lg-6\">\r\n <SimpleForm\r\n name=\"email\"\r\n maxLength={254}\r\n type={FIELD_TYPE.TEXTAREA}\r\n label={{ text: translation.email, label: 'email' }}\r\n serialize={{ type: SerializeType.PRIMITIVE_VALUE }}\r\n initialValue={sharedState.email}\r\n readOnly={!sharedState.myProfileAllowChangingEmailAddress || readOnlyVeracity}\r\n />\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"col-lg-6\">\r\n <SimpleForm\r\n name=\"unit\"\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.options.unit}\r\n label={{ text: translation.unit, label: 'unit' }}\r\n initialValue={this.setInitialValue(sharedState.unit as any)}\r\n translation={translation}\r\n placeholder={translation.search}\r\n hasFocus={this.hasFocus('unit') && initDelayed}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n descriptionAllLevels={true}\r\n infoText={translation.info_text_unit} />\r\n </div>\r\n <div className=\"col-lg-6\">\r\n <SimpleForm\r\n name=\"location\"\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.options.location}\r\n label={{ text: translation.location, label: 'location' }}\r\n initialValue={this.setInitialValue(sharedState.location as any)}\r\n translation={translation}\r\n placeholder={translation.search}\r\n hasFocus={this.hasFocus('location') && initDelayed}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n descriptionAllLevels={true}\r\n infoText={translation.info_text_location} />\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"col-lg-6\">\r\n <SimpleForm\r\n name=\"usergroup\"\r\n type={FIELD_TYPE.SELECT_SINGLE_HIERARCHY}\r\n optionsEndpoint={endpoint.options.usergroup}\r\n label={{ text: translation.usergroup, label: 'user-group', required: true }}\r\n initialValue={sharedState.userGroup}\r\n hasFocus={this.hasFocus('usergroup') && initDelayed}\r\n translation={translation}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n placeholder={translation.search} />\r\n\r\n </div>\r\n <div className=\"col-lg-6\">\r\n <SimpleForm\r\n name=\"language\"\r\n type={FIELD_TYPE.SELECT_SINGLE}\r\n optionsEndpoint={endpoint.options.language}\r\n label={{ text: translation.language, label: 'globe', required: true }}\r\n initialValue={sharedState.language}\r\n translation={translation}\r\n placeholder={translation.search}\r\n serialize={{ type: SerializeType.V_VALUE }}\r\n hasFocus={this.hasFocus('language') && initDelayed} />\r\n </div>\r\n </div>\r\n <div className=\"row\">\r\n <div className=\"col-sm-6\">\r\n <div className=\"text-left\">\r\n {\r\n !readOnlyVeracity && <ButtonTertiary onClick={this.onChangePasswordModal}>\r\n {translation.change_password}\r\n </ButtonTertiary>\r\n }\r\n </div>\r\n </div>\r\n <div className=\"col-sm-6\">\r\n <div className=\"text-right\">\r\n <ButtonCallToAction onClick={this.saveChanges}>{translation.save}</ButtonCallToAction>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <ScrollToTop />\r\n </Paper>;\r\n }\r\n}\r\n\r\nconst selectors = {\r\n shouldPrompt: (state: any, props: any) =>\r\n !!state.simpleForm.editing && !!state.simpleForm.editing.hasChanges\r\n};\r\n\r\nconst container = containerFactory(withPrompt(withSimpleForm(UserSettingsComponent)), actionCreators, selectors, userSettingsTranslations);\r\n\r\nexport { container as UserSettings };\r\n","import * as React from 'react';\r\nimport { Paper } from 'ui';\r\nimport styles from './no-content.scss';\r\nimport { UserProfileTranslation } from 'app/area/user-profile/constants';\r\n\r\ninterface NoContent {\r\n translation: UserProfileTranslation;\r\n}\r\n\r\nexport const NoContent = (props: NoContent) => {\r\n return <Paper componentId={'user-no-content-paper'} className=\"user-profile-section-paper\">\r\n <div className={`main-paper main-grid ${styles.wrapper}`}>\r\n <p className=\"no-content\">{props.translation.no_content}</p>\r\n </div>\r\n </Paper>;\r\n};\r\n","import * as React from 'react';\r\nimport { UserProfileSectionType } from 'app/routes/route-constants';\r\nimport { Configuration } from './types';\r\nimport { TabItem } from 'app/components';\r\nimport * as navigate from 'app/area/shared/navigation';\r\nimport { UserProfileTranslation } from 'app/area/user-profile/constants';\r\n\r\ninterface TabItemWrapperProps {\r\n id: number;\r\n item: Configuration;\r\n active: boolean;\r\n translation: UserProfileTranslation;\r\n}\r\n\r\nclass TabItemWrapper extends React.PureComponent<TabItemWrapperProps> {\r\n\r\n private onClick = (e: React.MouseEvent) => {\r\n e.preventDefault();\r\n navigate.to(this.props.item.url);\r\n };\r\n\r\n public render() {\r\n\r\n const { id, item, active, translation } = this.props;\r\n\r\n return <TabItem\r\n id={id}\r\n active={active}\r\n valid={true}\r\n url={undefined}\r\n label={{ text: item.label(translation) }}\r\n iconUrl={item.iconUrl}\r\n onClick={this.onClick}\r\n visible={item.visible}\r\n />;\r\n }\r\n}\r\n\r\nexport const userProfileTabsFactory = (conf: Configuration[], activeSection: UserProfileSectionType,\r\n translation: UserProfileTranslation) => {\r\n\r\n return (onClick) => <ul id=\"tabcontainer\" role=\"tablist\" onClick={onClick}>\r\n {conf.map((item, index) =>\r\n <TabItemWrapper\r\n key={item.section}\r\n id={index}\r\n item={item}\r\n active={activeSection === item.section}\r\n translation={translation}\r\n />)}\r\n </ul>;\r\n};\r\n","export const userDefaultValuesTranslations = {\r\n case_type: 3514,\r\n add: 5783,\r\n remove: 5913,\r\n save: 8224,\r\n cancel_changes: 7558,\r\n are_you_sure: 8218,\r\n undo_all: 8217,\r\n go_back: 8219,\r\n no_options_found: 8220,\r\n main_title: 8221,\r\n field: 8018,\r\n code_table: 8019,\r\n default_value: 8020,\r\n default_values: 8021,\r\n default_value_add_another: 8125,\r\n default_value_add_new: 8126,\r\n default_value_add_new_fields: 8127,\r\n add_default_value_button_text: 8128,\r\n updated_default_values: 8238,\r\n\r\n role_base_access_custom_button_tab: 8280,\r\n role_base_access_role_button_tab: 8281,\r\n \r\n access_selection_panel_switch_custom_message_first: 8278,\r\n access_selection_panel_switch_role_based_message_first: 8279,\r\n\r\n access_selection_panel_switch_custom_button: 8276,\r\n access_selection_panel_switch_role_based_button: 8277,\r\n\r\n validation_error: 8206,\r\n email_invalid: 7758,\r\n must_be_equal: 7681,\r\n must_be_filled: 5949,\r\n must_be_unique: 8105,\r\n done: 8288,\r\n cancel: 7956,\r\n\r\n not_selected: 8236,\r\n add_default_value_disclaimer: 8275,\r\n default_value_already_set: 8237,\r\n search_required_message: 8146\r\n};\r\n","export const endpoint = {\r\n roleData: 'user/current/defaultvalues/role',\r\n loadDefaultValues: 'user/current/defaultValues',\r\n saveDefaultValues: 'user/current/defaultValues'\r\n};\r\n\r\nexport const userOptions = {\r\n role: 'user/role/options',\r\n defaultValues: {\r\n optionsCollections: 'user/defaultValues/optionsCollections/options',\r\n caseTypes: 'user/defaultValues/caseTypes/options',\r\n values: (optionsCollectionId) =>\r\n `user/defaultValues/optionsCollection/${optionsCollectionId}/options`,\r\n valuesFields: (optionsCollectionId) => `user/defaultValues/optionsCollection/${optionsCollectionId}/fields/options`\r\n }\r\n};\r\n","import { RemoteData } from 'app/infrastructure/remote-data/remote-data';\r\nimport { endpoint } from './endpoints';\r\nimport { UserWireData, Person } from 'app/components/access-panel/shared/types';\r\nimport { ApiResponse } from 'app/types-shared';\r\n\r\nexport const api = {\r\n getDefaultValues: () => {\r\n return new RemoteData(endpoint.loadDefaultValues)\r\n .resource<ApiResponse<UserWireData>>()\r\n .single();\r\n },\r\n\r\n getRole: () => {\r\n return new RemoteData(endpoint.roleData)\r\n .resource<ApiResponse<Person>>()\r\n .single();\r\n },\r\n\r\n saveDefaultValues: async (user: any) => {\r\n return new RemoteData(endpoint.saveDefaultValues)\r\n .resource<ApiResponse<any>>()\r\n .save(user);\r\n }\r\n};\r\n","import { userDefaultValuesTranslations as text } from './constants';\r\nimport { STATE } from 'app/constants';\r\nimport * as simpleFormActions from 'app/infrastructure/simple-form/actions';\r\nimport { createDescriptionSelector } from 'app/infrastructure/translate';\r\nimport { SuccessNotification, ErrorNotification } from 'app/infrastructure/notifications/user-messages';\r\nimport {\r\n ProcessDefaultValuesFailed, ReceiveLoadDefaultValues, RequestLoadDefaultValues,\r\n ReceiveRole, FailRole, UpdateAccessData, RequestRole, FailLoadDefaultValues, ClearValidation,\r\n RequestSaveDefaultValues, ReceiveSaveDefaultValues, FailDefaultValuesExecute,\r\n ClearDefaultValuesData\r\n} from './action-types';\r\nimport { api } from './api';\r\nimport { complexValidationFromServer } from 'app/infrastructure/data/validation';\r\nimport { AccessItem } from 'app/components/access-panel/shared/types';\r\nimport { errorSafe } from 'app/infrastructure/redux';\r\nimport { ActionDispatching } from 'app/types-shared';\r\nimport { ApplicationState } from 'app/types-store';\r\nimport { normalizeValidation } from 'app/components/access-panel/validation';\r\n\r\nconst simpleFormActionCreators = simpleFormActions.actionCreators(STATE.userDefaultValues);\r\n\r\nexport const actionCreators = {\r\n loadRole: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n\r\n dispatch(new RequestRole());\r\n\r\n try {\r\n const role = await api.getRole();\r\n dispatch(new ReceiveRole({ defaultValues: role.data }));\r\n } catch (err) {\r\n dispatch(new FailRole());\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n }\r\n },\r\n\r\n loadDefaultValues: (): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: any) => {\r\n try {\r\n dispatch(new RequestLoadDefaultValues());\r\n\r\n const result = await api.getDefaultValues();\r\n\r\n dispatch(new ReceiveLoadDefaultValues({ defaultValues: result.data }));\r\n } catch (err) {\r\n err && err.userMessages && dispatch(new ErrorNotification(err.userMessages));\r\n dispatch(new FailLoadDefaultValues());\r\n }\r\n },\r\n\r\n saveDefaultValues: (query, onSucces: () => void): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n const translate = createDescriptionSelector(getState().userDefaultValues.texts);\r\n\r\n try {\r\n dispatch(new RequestSaveDefaultValues());\r\n const result = await api.saveDefaultValues(query) as any;\r\n\r\n if (result) {\r\n dispatch(new ReceiveSaveDefaultValues());\r\n dispatch(new SuccessNotification(translate(text.updated_default_values)));\r\n onSucces();\r\n }\r\n } catch (err) {\r\n dispatch(new FailDefaultValuesExecute());\r\n dispatch(new ErrorNotification(translate(text.validation_error)));\r\n dispatch(new ProcessDefaultValuesFailed(err.validationErrors\r\n ? complexValidationFromServer(normalizeValidation(err.validationErrors, { defaultValues: query })) : []));\r\n }\r\n },\r\n\r\n updateAccessData: (key: string, accessItem: Partial<AccessItem>): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new UpdateAccessData(key, accessItem));\r\n },\r\n\r\n clearValidation: (formName: string, parameters?: { [key: string]: number | string }): ActionDispatching<any, any> =>\r\n async (dispatch: any, getState: () => ApplicationState) => {\r\n dispatch(new ClearValidation(formName, parameters));\r\n },\r\n\r\n clearValueInStore: (id: string): ActionDispatching<any, any> =>\r\n errorSafe(async (dispatch: any, getState: any) => {\r\n dispatch(simpleFormActionCreators.clearValueInStore(id));\r\n }),\r\n\r\n clearDefaultValues: (): ActionDispatching<any, any> => async (dispatch: any, getState: any) => {\r\n dispatch(new ClearDefaultValuesData());\r\n }\r\n};\r\n","import * as React from 'react';\r\nimport { userOptions } from './endpoints';\r\nimport { SimpleFormComponentProps, ApiToUse } from 'app/infrastructure/simple-form/types';\r\nimport { UserDefaultValuesProps } from 'app/area/user-profile/default-values/types';\r\nimport { PanelsProps, DefaultValues } from 'app/components/access-panel';\r\nimport { ComplexValue } from 'app/types-shared';\r\nimport { UserDefaultValues } from 'app/components/access-panel/shared/types';\r\n\r\ntype AccessPanelExternalProps = {\r\n formComponent: React.ComponentClass<SimpleFormComponentProps>;\r\n};\r\n\r\ntype AccessPanelProps = UserDefaultValuesProps & AccessPanelExternalProps;\r\n\r\nexport const AccessPanel = (props: AccessPanelProps) => {\r\n const { data, editMode, formComponent, formValues, validation, clearValidation, translation,\r\n role, accessData, updateAccessData, clearValueInStore,\r\n options, loadOptions\r\n } = props;\r\n\r\n const panelProps: PanelsProps<UserDefaultValues> = {\r\n translation,\r\n formComponent,\r\n formValues,\r\n validation,\r\n\r\n endpoints: userOptions,\r\n\r\n readOnly: !editMode,\r\n\r\n data,\r\n roleSelected: !role.fetching && (!!role && !!role.data\r\n && (!role.data.defaultValues || role.data.defaultValues.length === 0)) ? false : (!!role.data || role.fetching),\r\n roleBasedData: role && role.data,\r\n\r\n fetchingRoleBasedData: role ? role.fetching : false,\r\n accessData,\r\n personOptionsCodes: undefined,\r\n options,\r\n\r\n updateAccessData,\r\n clearValidation,\r\n clearValueInStore,\r\n loadOptions\r\n };\r\n\r\n const isValueFieldsReadOnly = (optionsColection: ComplexValue<number>, caseType: ComplexValue<number>) => {\r\n return !optionsColection || !caseType;\r\n };\r\n\r\n return <DefaultValues\r\n {...panelProps}\r\n apiToUse={ApiToUse.API}\r\n isValueFieldsReadOnly={isValueFieldsReadOnly}\r\n isUserTypeRequired={false}\r\n readOnly={false}\r\n />;\r\n};\r\n","import { sfNames } from 'app/components/access-panel/sf-names';\r\nimport { serializeDefaultValues } from 'app/components/access-panel';\r\nimport { AccessPanelData } from 'app/components/access-panel/shared/types';\r\n\r\nexport const serializeAccessData = (accessData: AccessPanelData) => {\r\n return {\r\n [sfNames.defaultValues]: serializeDefaultValues(accessData.defaultValues)\r\n };\r\n};\r\n","import * as React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory } from 'app/infrastructure/redux/index';\r\nimport { actionCreators } from './actions';\r\nimport { PromptConfirmation, ButtonCallToAction, Paper } from 'ui';\r\nimport { UserDefaultValuesState } from './types';\r\nimport { ElementLoader } from 'ui/common/element-loader/element-loader';\r\nimport { simpleFieldForPath, withSimpleForm } from 'app/infrastructure/simple-form';\r\nimport { withPrompt } from 'app/components/prompt-unsaved/prompt-unsaved';\r\nimport { UserDefaultValuesProps } from './types';\r\nimport { AccessPanel } from './access-panel';\r\nimport { ids } from 'app/area/administration/constants';\r\nimport { OverlayComponent } from 'app/components/overlay/overlay';\r\nimport { serializeAccessData } from './serialize';\r\nimport { userDefaultValuesTranslations } from 'app/area/user-profile/default-values/constants';\r\nimport { compareAccess } from 'app/area/administration/edit/compare-access';\r\nimport { ScrollToTop } from 'ui/scroll-to-top/scroll-to-top';\r\nimport { UserProfileHeading } from 'app/area/user-profile/user-profile-heading';\r\n\r\nconst SimpleForm = simpleFieldForPath(STATE.userDefaultValues);\r\n\r\nexport class UserDefaultValuesComponent extends React.Component<UserDefaultValuesProps> {\r\n public static statePath: string = STATE.userDefaultValues;\r\n\r\n public componentWillUnmount() {\r\n this.props.clearDefaultValues();\r\n }\r\n\r\n public componentDidMount() {\r\n this.props.loadRole();\r\n this.props.loadDefaultValues();\r\n }\r\n\r\n private performDefaultValues = () => {\r\n const { saveDefaultValues, accessData } = this.props;\r\n\r\n saveDefaultValues(serializeAccessData(accessData).defaultValues, () => {\r\n this.props.loadRole();\r\n this.props.loadDefaultValues();\r\n });\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { data, translation, fetchingLoadDefaultValues, fetchingSaveDefaultValues } = this.props;\r\n\r\n const shouldRender = !fetchingLoadDefaultValues && data;\r\n\r\n return <Paper componentId={'default-values-paper'} className=\"user-profile-section-paper\">\r\n <section>\r\n <UserProfileHeading title={translation.main_title} sectionTitle={translation.default_values} />\r\n <div className=\"main-grid\">\r\n <OverlayComponent\r\n displayOverlay={fetchingSaveDefaultValues}\r\n overlayText={translation.save_user_load_overlay_text} />\r\n {this.props.shouldDisplayModal\r\n ? <PromptConfirmation\r\n title={translation.cancel_changes}\r\n description={translation.are_you_sure}\r\n continueText={translation.undo_all}\r\n cancelText={translation.go_back}\r\n onContinue={this.props.continue}\r\n onCancel={this.props.cancel}\r\n />\r\n : ''}\r\n {!shouldRender\r\n ? <ElementLoader />\r\n : <AccessPanel\r\n formComponent={SimpleForm}\r\n {...this.props} />}\r\n\r\n <div className=\"row\">\r\n <div className=\"col-sm-6\"/>\r\n <div className=\"col-sm-6\">\r\n <div className=\"text-right\">\r\n <ButtonCallToAction\r\n id={ids.users.save_button}\r\n onClick={this.performDefaultValues}\r\n disabled={fetchingSaveDefaultValues || !shouldRender}>\r\n {translation.save}\r\n </ButtonCallToAction>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <ScrollToTop />\r\n </Paper>;\r\n }\r\n}\r\n\r\nconst selectors = {\r\n shouldPrompt: ({ data, accessData }: UserDefaultValuesState) => compareAccess(serializeAccessData(accessData), data)\r\n};\r\n\r\nconst container = withSimpleForm(containerFactory(withPrompt(UserDefaultValuesComponent),\r\n actionCreators, selectors, userDefaultValuesTranslations));\r\n\r\nexport { container as UserDefaultValues };\r\n","import * as React from 'react';\r\nimport { MyNotifications } from './my-notifications/my-notifications';\r\nimport { containerFactory, DefaultContainerProps } from 'app/infrastructure/redux';\r\nimport { STATE } from 'app/constants';\r\nimport { TabContainer } from 'app/components';\r\nimport { UserSettings } from 'app/area/user-profile/settings/settings';\r\nimport { userProfileTranslations } from 'app/area/user-profile/constants';\r\nimport { NoContent } from 'app/area/user-profile/no-content';\r\nimport { UserProfileSectionType } from 'app/routes/route-constants';\r\nimport { Configuration } from 'app/area/user-profile/types';\r\nimport { userProfileTabsFactory } from './user-profile-tabs';\r\nimport { UserDefaultValues } from 'app/area/user-profile/default-values/default-values';\r\nimport { configuration } from 'app/area/user-profile/configuration';\r\n\r\ntype UserProfileComponentProps = DefaultContainerProps & { activeSection: UserProfileSectionType };\r\n\r\nexport class UserProfileComponent extends React.Component<UserProfileComponentProps> {\r\n public static statePath: string = STATE.userProfile;\r\n\r\n private renderTabContainer = (conf: Configuration[]) => {\r\n const { activeSection, translation } = this.props;\r\n\r\n const renderUserProfileTabs = userProfileTabsFactory(conf, activeSection, translation);\r\n\r\n return <TabContainer\r\n label={translation.menu_text}\r\n visible={conf.filter(f => !!f.visible).length > 1}\r\n expandAll={false}\r\n activeSection={activeSection}\r\n translation={this.props.translation}\r\n renderTabs={renderUserProfileTabs} />;\r\n }\r\n\r\n private shouldRender(activeSection: string, conf: Configuration[]) {\r\n const activeSectionData = conf.find(c => c.section === activeSection);\r\n return activeSectionData && activeSectionData.visible;\r\n }\r\n\r\n private renderActiveSection(conf: Configuration[]) {\r\n const { activeSection } = this.props;\r\n\r\n const sections = {\r\n [UserProfileSectionType.Settings]: UserSettings,\r\n [UserProfileSectionType.Notifications]: MyNotifications,\r\n [UserProfileSectionType.DefaultValues]: UserDefaultValues\r\n };\r\n\r\n const Component = this.shouldRender(activeSection, conf) ? sections[activeSection] : NoContent;\r\n return <Component {...this.props} />;\r\n }\r\n\r\n public render() {\r\n const { sharedState: { showNotificationChannelsInfo } } = this.props;\r\n const conf = configuration({ showNotificationChannelsInfo });\r\n\r\n return <>\r\n {this.renderTabContainer(conf)}\r\n {this.renderActiveSection(conf)}\r\n </>;\r\n }\r\n}\r\n\r\nconst selectors = {\r\n activeSection: (_: any, props: DefaultContainerProps) => props.params && props.params.focus || UserProfileSectionType.Settings\r\n};\r\n\r\nconst container = containerFactory(UserProfileComponent, {}, selectors, userProfileTranslations);\r\n\r\nexport { container as UserProfileView };\r\n","import { Configuration, ConfigurationInput } from './types';\r\nimport { routeConstants, UserProfileSectionType } from 'app/routes/route-constants';\r\nimport { getNotificationsApiUrl } from 'app/infrastructure/hosting';\r\nimport { UserProfileTranslation } from 'app/area/user-profile/constants';\r\n\r\nexport const configuration = (input: ConfigurationInput): Configuration[] => [\r\n {\r\n section: UserProfileSectionType.Settings,\r\n visible: true,\r\n iconUrl: '/i/case-sections/default.svg',\r\n url: routeConstants.userProfileActiveSection(UserProfileSectionType.Settings),\r\n label: (translation: UserProfileTranslation) => translation.settings_text\r\n },\r\n {\r\n section: UserProfileSectionType.DefaultValues,\r\n visible: true,\r\n iconUrl: '/i/case-sections/where-and-what.svg',\r\n url: routeConstants.userProfileActiveSection(UserProfileSectionType.DefaultValues),\r\n label: (translation: UserProfileTranslation) => translation.default_values_text\r\n },\r\n {\r\n section: UserProfileSectionType.Notifications,\r\n visible: !!getNotificationsApiUrl() && input.showNotificationChannelsInfo,\r\n url: routeConstants.userProfileActiveSection(UserProfileSectionType.Notifications),\r\n iconUrl: '/i/case-sections/actions.svg',\r\n label: (translation: UserProfileTranslation) => translation.notifications_text\r\n }\r\n];\r\n","export const userProfileTranslations = {\r\n menu_text: 8212,\r\n notifications_text: 8213,\r\n settings_text: 8214,\r\n default_values_text: 8215,\r\n no_content: 8239\r\n};\r\n\r\nexport type UserProfileTranslation = {\r\n readonly [T in keyof typeof userProfileTranslations]: string\r\n};\r\n","import * as React from 'react';\r\nimport styles from './messages.scss';\r\nimport { MessagesToUser} from 'app/shell/components/messages-to-user';\r\nimport { MessagesToUserProps } from 'app/shell/components/messages-to-user/types';\r\nimport { messagesToUserTranslation } from 'app/shell/constants';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { STATE } from 'app/constants';\r\nimport { MainGridContainer } from 'ui/common/main-grid-container/main-grid-container';\r\n\r\nexport class MessagesComponent extends React.Component<MessagesToUserProps> {\r\n public static statePath: string = STATE.app;\r\n\r\n public render() {\r\n return <MainGridContainer className={styles.messagesView}>\r\n <div className={styles.header}>\r\n <h1>{this.props.translation.messages}</h1>\r\n </div>\r\n <div className={styles.messageSection}>\r\n <h2>{this.props.translation.unread_messages}</h2>\r\n <MessagesToUser showNoItemsMessage={true} showUnreadMessagesOnly={true}/>\r\n </div>\r\n <div className={styles.messageSection}>\r\n <h2>{this.props.translation.read_messages}</h2>\r\n <MessagesToUser showNoItemsMessage={true}/>\r\n </div>\r\n </MainGridContainer>;\r\n }\r\n}\r\n\r\nconst container = containerFactory<MessagesToUserProps>(\r\n MessagesComponent,\r\n {},\r\n {},\r\n messagesToUserTranslation\r\n);\r\n\r\nexport { container as Messages };\r\n","import React from 'react';\r\nimport { STATE } from 'app/constants';\r\nimport { containerFactory } from 'app/infrastructure/redux';\r\nimport { SpinLoader } from 'app/components';\r\n\r\n// HoC to use when a route requires all access information to be loaded before it can be rendered.\r\nconst withLoadedAccessInfo = (Component: React.ComponentClass<any>) => {\r\n const accessInfoChecker = (props: Partial<{ fetchingAccessInfo: boolean }>) => {\r\n if (!props.fetchingAccessInfo) {\r\n return <Component {...props} />;\r\n }\r\n return <SpinLoader />;\r\n };\r\n\r\n accessInfoChecker.statePath = STATE.app;\r\n\r\n return accessInfoChecker;\r\n};\r\n\r\nexport const withWaitForAccessInfo = (Component: React.ComponentClass<any>) => containerFactory(withLoadedAccessInfo(Component));\r\n","// tslint:disable:no-default-export no-unused-expression\r\nimport { scrollToTopAlways, scrollToTopExceptInternal } from '../infrastructure/platform/routing';\r\nimport { Bowtie } from '../area/bowtie/bowtie';\r\nimport { Case } from '../area/case';\r\nimport { CaseDraftCreator } from '../area/case/create';\r\nimport { Draft } from '../area/case/draft';\r\nimport { CaseDuplicateCreator } from '../area/case/duplicate';\r\nimport { CaseEditCreator } from '../area/case/edit';\r\nimport { DashboardView } from '../area/dashboard/dashboard-view';\r\nimport { CompanyReportView } from '../area/company-report/report-view';\r\nimport { Startup } from '../area/startup/startup';\r\nimport { ImportView } from '../area/import/import-view';\r\nimport { AppSetting } from 'dependencies/appsettings';\r\nimport { Layout } from '../shell/default/layout';\r\nimport { Favourite } from '../area/favourite/favourite';\r\n\r\nimport * as React from 'react';\r\nimport { Route } from 'react-router';\r\n\r\nimport { routeConstants } from './route-constants';\r\nimport { UserEditView } from 'app/area/administration';\r\nimport { ChangeCaseType } from '../area/case/draft/change-casetype';\r\nimport { MyDownloads } from 'app/area/my-downloads/my-downloads';\r\nimport { RoleEditView } from 'app/area/administration/edit/role/role-edit';\r\nimport { RoleSearchView } from 'app/area/administration/list/roles/role-search';\r\nimport { UsersSearchView } from 'app/area/administration/list/users/user-search';\r\nimport { CodetableBase } from 'app/area/codetable/codetable-base';\r\nimport { CodetableList } from 'app/area/codetable/list/codetable-list';\r\nimport { CodetableItem } from 'app/area/codetable/item/codetable-item';\r\nimport { SelectSavedReportSelector } from 'app/area/saved-reports/select-saved-report';\r\nimport { CodeSelector } from 'app/area/code-selector/code-selector';\r\nimport { UserProfileView } from 'app/area/user-profile/user-profile';\r\nimport { Messages } from 'app/area/messages/messages';\r\nimport { withWaitForAccessInfo } from 'app/routes/wait-for-access-info';\r\n\r\n/**\r\n * > It's important to avoid nested routes whenever possible to reduce app complexity.\r\n *\r\n * Mapping URLs to areas and component views\r\n * See router docs at: https://github.com/reactjs/react-router/tree/master/docs\r\n */\r\n\r\nconst translations = AppSetting.Translations as any;\r\nconst texts = (translations || {}).app;\r\nconst NotFound: any = (props: any) => (<div>{texts && texts.logoutNotFoundError}</div>);// tslint:disable-line\r\n\r\nexport default (<Route component={Layout} >\r\n <Route path={routeConstants.startupView} components={{ body: Startup }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.caseView} components={{ body: Case }} onEnter={scrollToTopExceptInternal} />\r\n <Route path={routeConstants.favouriteDraft} components={{ body: Favourite }} />\r\n <Route path={routeConstants.draftView} components={{ body: Draft }} onEnter={scrollToTopExceptInternal} />\r\n <Route path={routeConstants.createDraft} components={{ body: CaseDraftCreator }} />\r\n <Route path={routeConstants.changeCaseType} components={{ body: ChangeCaseType }} />\r\n <Route path={routeConstants.caseEdit} components={{ body: CaseEditCreator }} />\r\n <Route path={routeConstants.caseDuplicate} components={{ body: CaseDuplicateCreator }} />\r\n <Route path={routeConstants.casesView} components={{ body: Favourite }} />\r\n <Route path={routeConstants.dashboardView} components={{ body: DashboardView }} />\r\n <Route path={routeConstants.companyReportView} components={{ body: CompanyReportView }} />\r\n <Route path={routeConstants.savedReportView} components={{ body: Favourite }} />\r\n <Route path={routeConstants.userProfileMainView} components={{ body: UserProfileView }} />\r\n <Route path={routeConstants.userProfileMainViewFocus} components={{ body: UserProfileView }} />\r\n <Route path={routeConstants.userSearchView} components={{ body: withWaitForAccessInfo(UsersSearchView) }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.rolesView} components={{ body: withWaitForAccessInfo(RoleSearchView) }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.bowtieView} components={{ body: Bowtie }} />\r\n <Route path={routeConstants.codetableAdministration} components={{ body: CodetableBase }} >\r\n <Route path={routeConstants.codetableAdministrationCode} components={{ body: CodetableItem }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.codetableAdministrationOptionsCollection}\r\n components={{ body: CodetableList }}\r\n onEnter={scrollToTopAlways} />\r\n </Route>\r\n <Route path={routeConstants.userAdd} components={{ body: withWaitForAccessInfo(UserEditView) }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.userEdit} components={{ body: withWaitForAccessInfo(UserEditView) }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.userDuplicate} components={{ body: withWaitForAccessInfo(UserEditView) }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.roleEdit} components={{ body: withWaitForAccessInfo(RoleEditView) }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.roleAddSection} components={{ body: withWaitForAccessInfo(RoleEditView) }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.myDownloadsView} components={{ body: MyDownloads }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.importView} components={{ body: ImportView }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.messagesToUserView} components={{ body: Messages }} onEnter={scrollToTopAlways} />\r\n <Route path={routeConstants.selectSavedReports} components={{ body: SelectSavedReportSelector }} />\r\n <Route path={routeConstants.select} components={{ body: CodeSelector }} />\r\n <Route path={routeConstants.selectCodetableId} components={{ body: CodeSelector }} />\r\n <Route path=\"*\" components={{ body: NotFound }} />\r\n</Route>);\r\n\r\n// Allow hot reloading of routes\r\ndeclare var module: any;\r\nif (module.hot) {\r\n module.hot.accept();\r\n}\r\n","import routesDefault from 'app/routes/default';\r\nexport const routes = routesDefault;\r\n","import * as React from 'react';\r\nimport { Dashboard } from './dashboard';\r\nimport styles from './dashboard.scss';\r\n\r\nexport const DashboardView:React.SFC<any> = (props) => (\r\n <div className={styles.dashboardView}>\r\n <Dashboard\r\n dashboardType={parseInt(props.params.dashboardType, 10)}\r\n mainFavouriteId={parseInt(props.params.favouriteId, 10)}\r\n showDescription={true}\r\n location={props.location} />\r\n </div>\r\n);\r\n","import { toAbsoluteUrl } from 'app/infrastructure/hosting';\r\nimport { configurationAccess } from 'app/area/user-profile/my-notifications/configuration-access';\r\nimport { firebaseConfig, webPushCertificate } from 'app/infrastructure/push/configuration-data';\r\n\r\n// tslint:disable:no-console\r\nconst registerServiceWorker = async () => {\r\n const { b64PublicKey } = webPushCertificate;\r\n const firebase = await import('firebase/app');\r\n await import('firebase/messaging');\r\n\r\n const app = firebase.initializeApp(firebaseConfig);\r\n const messaging = app.messaging();\r\n\r\n try {\r\n b64PublicKey && messaging.usePublicVapidKey(b64PublicKey);\r\n const swRegistration = firebaseConfig && await navigator.serviceWorker\r\n .register(toAbsoluteUrl('/service-worker.js?' + new URLSearchParams(firebaseConfig)),\r\n { scope: toAbsoluteUrl('/') });\r\n swRegistration && messaging.useServiceWorker(swRegistration);\r\n\r\n messaging.onMessage(payload => {\r\n if (payload && payload.notification) {\r\n const { notification: { title = '', ...options } } = payload;\r\n\r\n title && options && navigator.serviceWorker.ready.then(registration => {\r\n registration.showNotification(title, { ...options, data: { redirect_url: payload.notification.click_action } });\r\n });\r\n }\r\n });\r\n } catch (error) {\r\n console.error('Service Worker Error', error);\r\n }\r\n return messaging;\r\n};\r\n\r\nconst unregisterServiceWorker = () => {\r\n navigator.serviceWorker.getRegistrations().then((registrations) => {\r\n for (const registration of registrations) {\r\n registration.unregister();\r\n }\r\n });\r\n};\r\n\r\nexport const initFmc = async () => {\r\n let messaging: firebase.messaging.Messaging;\r\n if ('serviceWorker' in navigator && 'PushManager' in window) {\r\n if (configurationAccess.push && webPushCertificate) {\r\n messaging = await registerServiceWorker();\r\n } else {\r\n unregisterServiceWorker();\r\n }\r\n }\r\n\r\n return messaging;\r\n};\r\n","// tslint:disable:no-console\r\nimport * as React from 'react';\r\nimport { MessagingProviderState, Callback } from './types';\r\nimport { FmcContext } from './context';\r\nimport { notifyUser } from 'app/infrastructure/notifications/notify-user';\r\nimport { initFmc } from 'app/infrastructure/push/init';\r\nimport { configurationAccess } from 'app/area/user-profile/my-notifications/configuration-access';\r\nimport { webPushCertificate } from 'app/infrastructure/push/configuration-data';\r\n\r\nexport class MessagingProvider extends React.Component<{}, MessagingProviderState> {\r\n public state: Readonly<MessagingProviderState> = {\r\n fmcToken: '',\r\n fmcMessaging: undefined\r\n };\r\n\r\n private postInitFmc = async (fmcMessaging: firebase.messaging.Messaging) => {\r\n try {\r\n configurationAccess.push && webPushCertificate && await Notification.requestPermission();\r\n const fmcToken = await fmcMessaging.getToken();\r\n await fmcMessaging.onTokenRefresh(this.onTokenRefresh);\r\n this.setState({ fmcToken: fmcToken, fmcMessaging });\r\n } catch (err) {\r\n if (err.code === 'messaging/token-unsubscribe-failed') {\r\n await this.postInitFmc(fmcMessaging);\r\n }\r\n }\r\n }\r\n\r\n public componentDidMount() {\r\n initFmc().then(this.postInitFmc);\r\n }\r\n\r\n private executeCallback = async (callback: Callback) => {\r\n const token = await this.state.fmcMessaging.getToken();\r\n console.log('token: ', token);\r\n callback(token);\r\n }\r\n\r\n private requestPermission = async (callback: Callback) => {\r\n try {\r\n await this.state.fmcMessaging.requestPermission();\r\n await this.executeCallback(callback);\r\n } catch (err) {\r\n err && notifyUser.error(err);\r\n }\r\n }\r\n\r\n private onTokenRefresh = async () => {\r\n try {\r\n const refreshedToken = await this.state.fmcMessaging.getToken();\r\n console.log('Token refreshed.', refreshedToken);\r\n } catch (err) {\r\n console.log('Unable to retrieve refreshed token ', err);\r\n }\r\n }\r\n\r\n public render() {\r\n return (\r\n <FmcContext.Provider value={{ state: this.state, requestPermission: this.requestPermission }}>\r\n {this.props.children}\r\n </FmcContext.Provider>\r\n );\r\n }\r\n}\r\n","import 'styles/app.scss';\r\n\r\nimport 'isomorphic-fetch';\r\nimport { globalVar } from 'app/infrastructure/universal/runtime';\r\nimport * as React from 'react';\r\nimport * as ReactDOM from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { Router } from 'react-router';\r\nimport { IntlProvider } from 'react-intl';\r\nimport { AppShell } from 'app/shell/app-shell';\r\nimport { debug } from 'app/infrastructure/log';\r\nimport { safely } from 'app/infrastructure/universal/execution';\r\nimport { error } from 'app/infrastructure/log/index';\r\nimport { enableStartupCrashNotifications } from 'app/infrastructure/notifications';\r\nimport { defaultScrollRestoration } from 'app/infrastructure/platform/routing';\r\nimport { configureEnvironment } from 'app/startup/runtime-configuration';\r\nimport { LangDir } from 'app/components/lang-dir';\r\nimport { routes } from 'dependencies/routes';\r\nimport { authProvider } from 'dependencies/auth';\r\nimport { MessagingProvider } from 'app/infrastructure/push/messaging-provider';\r\n\r\n/**\r\n * Setup client-side rendering\r\n * Get the application-wide store instance.\r\n */\r\nconst installGlobalErrorHandler = enableStartupCrashNotifications();\r\n\r\n/**\r\n * Renders the application\r\n */\r\nasync function renderFromRoot() {\r\n\r\n const { store, history } = configureEnvironment();\r\n const auth = authProvider;\r\n /*\r\n const test = {a: 1, b:2};\r\n Object.values(test);\r\n */\r\n debug('cached token', globalVar('localStorage', {}).sltoken);\r\n\r\n await auth.processToken(store, history);\r\n\r\n const shell = new AppShell();\r\n\r\n await shell.initialize();\r\n\r\n ReactDOM.render(\r\n <>\r\n <LangDir locale={AppShell.locale} />\r\n <MessagingProvider>\r\n <Provider store={store}>\r\n <IntlProvider locale={AppShell.locale}>\r\n <Router onUpdate={defaultScrollRestoration} onError={error} history={history} children={routes} />\r\n </IntlProvider>\r\n </Provider>\r\n </MessagingProvider>\r\n </>, document.getElementById('react-app'));\r\n}\r\n\r\nsafely(renderFromRoot).then(installGlobalErrorHandler).then(() =>\r\n\r\n /* tslint:disable */\r\n console.log(`\r\n\r\n\r\n.............................................................................\r\n.............................................................................\r\n.............................................................................\r\n.............................................................................\r\n.............................................................................\r\n.............................................................................\r\n.............................................................................\r\n\r\n\r\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r\n\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\r\n\r\n\r\n\r\n \\`,,,. , , , .. .,,, ,\r\n :+;;;#\" ## #\\` +\" # ##;;;; #\\`\r\n :; # #.# #\\` # \"\" # #\\`\r\n :; # # \\`# #\\` ;+ # ;# # ### #\\`\r\n :; \\`# # ##\\` #+: # # #\\`\r\n :##### # #\\` ,# \"##### #####\r\n\r\n\r\n\r\n ................................\r\n\r\n\r\n\r\n███████╗██╗ ██╗███╗ ██╗███████╗██████╗ ██████╗ ██╗ ██╗ ██╗███████╗███████╗\r\n██╔â•â•â•â•â•â•šâ–ˆâ–ˆâ•— ██╔â•â–ˆâ–ˆâ–ˆâ–ˆâ•— ██║██╔â•â•â•â•â•â–ˆâ–ˆâ•”â•â•â–ˆâ–ˆâ•—██╔â•â•â•â•â• ██║ ██║ ██║██╔â•â•â•â•â•â–ˆâ–ˆâ•”â•â•â•â•â•\r\n███████╗ ╚████╔╠██╔██╗ ██║█████╗ ██████╔â•â–ˆâ–ˆâ•‘ ███╗██║ ██║ ██║█████╗ █████╗\r\nâ•šâ•â•â•â•â–ˆâ–ˆâ•‘ ╚██╔╠██║╚██╗██║██╔â•â•â• ██╔â•â•â–ˆâ–ˆâ•—██║ ██║██║ ██║ ██║██╔â•â•â• ██╔â•â•â•\r\n███████║ ██║ ██║ ╚████║███████╗██║ ██║╚██████╔â•â–ˆâ–ˆâ•‘ ███████╗██║██║ ███████╗\r\nâ•šâ•â•â•â•â•â•â• â•šâ•â• â•šâ•â• â•šâ•â•â•â•â•šâ•â•â•â•â•â•â•â•šâ•â• â•šâ•â• â•šâ•â•â•â•â•â• â•šâ•â• â•šâ•â•â•â•â•â•â•â•šâ•â•â•šâ•â• â•šâ•â•â•â•â•â•â•\r\n\r\n\r\n\r\n `)).catch((e) => console.log(`Synergi Life failed to start: ${e}`));\r\n\r\n"],"sourceRoot":""}