{"version":3,"sources":["utils/object-utils.js","api/side-by-side-view-api.js","store/actions/left-side-by-side-batch-actions.js","store/actions/statement-content-actions.js","api/api-default-context.js","components/common/button-component.jsx","constants/feature/panel-constants.js","constants/feature/statement-navigator/statement-nav-element-filter-constants.js","components/common/tool-tip-component.jsx","models/utils/common/modal-button-model.js","models/utils/common/tooltip-options-model.js","models/utils/common/menu/menu-option-model.js","constants/util/route-constants.js","components/util/conditional-render-component.jsx","permissions/utils/roles.js","models/api-model.js","store/actions/element-panel-actions.js","components/common/data-grid/_data-grid-row.component.jsx","icons/filter-icon.svg","components/common/data-grid/_data-grid-filter-component.jsx","components/common/data-grid/_data-grid-columns-header.component.jsx","components/common/data-grid/data-grid-component.jsx","icons/flagged-and-verified.svg","constants/feature/statement-content-constants.js","utils/statement-content-page-utils.js","components/common/modal-component.jsx","utils/statement-export-utils.js","constants/util/date-constants.js","components/common/checkbox-component.jsx","icons/guidance.svg","components/common/banner-component.jsx","constants/feature/tieout-element-constants.js","constants/feature/modes-constants.js","models/base-model.js","store/actions/panel-controller-actions.js","permissions/permissions.js","permissions/structures/project.js","permissions/structures/statement.js","permissions/structures/element.js","permissions/structures/workpaper-reference.js","permissions/structures/tickmark.js","permissions/structures/formula.js","permissions/structures/internal-reference.js","permissions/structures/omnia.js","permissions/structures/note.js","permissions/structures/section.js","permissions/structures/auditchecklist.js","permissions/structures/side-by-side.js","icons/closed-priority.svg","constants/feature/notes-panel-constants.js","components/common/multi-line-ellipsis-text-component.jsx","models/utils/common/radio-options-model.js","constants/common/feature-common-utils.js","store/actions/statement-navigator/elements-search-panel-actions.js","icons/arrow-left.svg","components/common/omnia/flyout-header-component.jsx","components/common/omnia/flyout-footer-component.jsx","components/common/omnia/flyout-panel-content-component.jsx","components/common/omnia/flyout-component.jsx","store/actions/notes-panel-actions.js","components/common/dropdown-component.jsx","models/api/element-details-api-model.js","store/reducers/project-users-list-reducer.js","store/reducers/current-user-reducer.js","models/api/feature-info-api-model.js","store/reducers/feature-info-reducer.js","store/reducers/auth-user-reducer.js","store/reducers/project-list-reducer.js","store/reducers/pinned-details-reducer.js","store/reducers/locale-reducer.js","models/data/report-preview-page-model.js","store/reducers/report-preview-page-reducer.js","store/reducers/selected-project/selected-project-reducer.js","store/reducers/selected-project/selected-project-id-reducer.js","store/reducers/statement-list/statement-list-reducer.js","store/reducers/statement-workflows/statement-workflows-reducer.js","store/reducers/statement-workflows/workflow-project-to-expand-reducer.js","store/reducers/statement-content/statement-content-section-id-list-reducer.js","store/reducers/statement-content/left-statement-content-section-id-list-reducer.js","store/reducers/statement-content/sections-cache/statement-content-sections-cache-reducer.js","store/reducers/statement-content/sections-cache/left-statement-content-sections-cache-reducer.js","store/reducers/statement-content/sections-cache/statement-content-section-cache-data-reducer.js","store/reducers/statement-content/sections-cache/left-statement-content-section-cache-data-reducer.js","store/reducers/statement-content/sections-cache/blackline-cache-reducer.js","store/reducers/statement-content/sections-cache/left-blackline-cache-reducer.js","store/reducers/statement-ocr-navigator-reducer.js","store/reducers/left-statement-ocr-navigator-reducer.js","models/data/section-in-view-map-model.js","store/reducers/statement-content/statement-content-sections-in-view-reducer.js","store/reducers/statement-content/left-statement-content-sections-in-view-reducer.js","store/reducers/statement-content/statement-content-period-list-reducer.js","models/data/section-cache-metrics-model.js","models/data/section-cache-tracker-model.js","store/reducers/statement-content/sections-cache/section-cache-tracker-reducer.js","store/reducers/statement-content/sections-cache/left-section-cache-tracker-reducer.js","store/reducers/zoom-reducer.js","store/reducers/left-zoom-reducer.js","store/reducers/right-zoom-reducer.js","models/data/statement-list-filters-model.js","store/reducers/statement-list/statement-list-filters-reducer.js","models/data/admin-module-tab-model.js","store/reducers/admin-module-reducer.js","store/reducers/add-revision-reducer.js","store/reducers/revision/revision-reducer.js","store/reducers/revision/left-revision-reducer.js","store/reducers/statement-content/statement-content-filter-reducer.js","store/reducers/statement-content/statement-content-selector-to-highlight-reducer.js","store/reducers/element-panel/element-details-reducer.js","store/reducers/statement-content/element-cache-reducer.js","store/reducers/statement-content/left-element-cache-reducer.js","store/reducers/element-panel/element-details-entity-list-reducer.js","store/reducers/statement-content/selected-elements-reducer.js","store/reducers/statement-content/left-selected-elements-reducer.js","store/reducers/statement-content/highlighted-element-reducer.js","store/reducers/statement-content/blackline-highlighted-element-reducer.js","store/reducers/statement-summary/elements-summary-reducer.js","models/api/statement-annotations-update-model.js","store/reducers/statement-summary/statement-annotations-update-reducer.js","store/reducers/statement-summary/notes-summary-reducer.js","store/reducers/statement-summary/sections-summary-reducer.js","store/reducers/statement-summary/statement-summary-display-options-reducer.js","store/reducers/modes/content-highlight-mode-reducer.js","store/reducers/modes/blackline-view-mode-reducer.js","store/reducers/modes/blackline-view-show-element-mode-reducer.js","store/reducers/modes/blackline-view-synchronized-scrolling-mode-reducer.js","store/reducers/modes/ocr-current-view-page-number-reducer.js","store/reducers/modes/left-ocr-current-view-page-number-reducer.js","store/reducers/modes/element-select-mode-reducer.js","store/reducers/formula-form-reducer.js","store/reducers/element-panel/formula-list-reducer.js","store/reducers/internal-reference-reducer.js","store/reducers/internal-reference-suggestion-list-reducer.js","store/reducers/element-panel/element-workpaper-list-reducer.js","models/data/element-changes-since-tracker-model.js","store/reducers/statement-content/element-changes-since-tracker-reducer.js","store/reducers/element-panel/element-tickmark-list-reducer.js","models/data/selected-section-map-model.js","store/reducers/statement-content/selected-sections-reducer.js","store/reducers/statement-content/sections-cache/content-section-map-reducer.js","store/reducers/statement-content/sections-cache/left-content-section-map-reducer.js","store/reducers/batch-panel/selected-batch-elements-reducer.js","store/reducers/notes-panel/add-note-selection-reducer.js","store/reducers/notes-panel/notes-list-reducer.js","store/reducers/statement-content/current-section-reducer.js","store/reducers/statement-content/left-current-section-reducer.js","store/reducers/tickmark-list-panel-reducer.js","store/reducers/comfort-annotation-list-reducer.js","models/api/compare-api-model.js","store/reducers/compare-stats-panel-reducer.js","store/reducers/workpaper-toolkit-list-panel-reducer.js","models/api/section-review-history-model.js","store/reducers/section-review-history-reducer.js","store/reducers/section-details-panel/section-assignment-reducer.js","store/reducers/section-assigments-list-reducer.js","store/reducers/selected-statement-reducer.js","models/api/chatbot-model.js","store/reducers/chatbot-reducer.js","store/reducers/left-selected-statement-reducer.js","store/reducers/source-statement-reducer.js","models/api/side-by-side-view-annotations-modal.js","store/reducers/side-by-side-view-annotations-reducer.js","store/reducers/statement-creation-page-data-reducer.js","models/api/note-api-model.js","store/reducers/notes-panel/selected-note-reducer.js","store/reducers/statement-content/notes-cache-reducer.js","store/reducers/statement-content/left-notes-cache-reducer.js","store/reducers/right-panel-controller-reducer.js","store/reducers/left-panel-controller-reducer.js","store/reducers/statement-content/content-search-reducer.js","store/reducers/omnia/omnia-engagement-reducers.js","store/reducers/statement-navigator/element-filters-reducer.js","store/reducers/statement-navigator/element-search-results-reducer.js","store/reducers/statement-navigator/statement-navigation-panel-reducer.js","store/reducers/statement-navigator/TOC-expand-all-reducer.js","store/reducers/statement-navigator/TOC-refresh-reducer.js","store/reducers/statement-navigator/navigation-refresh-reducer.js","store/reducers/modes/navigation-edit-mode-reducer.js","store/reducers/element-panel/element-history-reducer.js","models/api/element-dataparts-model.js","store/reducers/statement-content/element-dataparts-reducer.js","store/reducers/statement-content/left-element-dataparts-reducer.js","store/reducers/modes/content-view-modes-reducer.js","store/reducers/section-details-panel/section-details-panel-reducer.js","store/reducers/section-reviews-reducer.js","models/utils/common/panels-cancel-modal-model.js","store/reducers/panel-cancel-modal-reducer.js","constants/web-socket-constants.js","constants/util/web-socket-utils.js","models/sockets/statement-socket-model.js","store/reducers/statement-socket-reducer.js","store/reducers/active-users-reducer.js","store/reducers/section-tree-list-reducer.js","models/api/copy-formula-result-model.js","store/reducers/copy-formula-result-reducer.js","store/reducers/copy-formula-selected-elements-reducer.js","store/reducers/statement-workflows-steps-reducer.js","store/reducers/copy-formula-reducer.js","store/reducers/copy-formula-table-matrix-reducer.js","store/reducers/api-error-handler-reducers.js","store/reducers/audit-checklist-reducer.js","store/reducers/admin-module-maintenance-page-reducer.js","store/reducers/admin-module-country-list-reducer.js","store/reducers/admin-module-monitoring-reducer.js","store/reducers/section-details-panel/section-assignment-heading-refresh-reducer.js","models/sockets/project-socket-model.js","store/reducers/project-socket-reducer.js","store/reducers/toolkit-export-panel/toolkit-report-download-progress-reducer.js","store/reducers/element-panel/element-comfort-letter-list-reducer.js","store/reducers/annotation-display-options-reducer.js","models/data/side-by-side-view-element-map-model.js","store/reducers/side-by-side-statement-view/side-by-side-element-map-reducer.js","store/reducers/left-statement-section-tree-list-reducer.js","store/reducers/side-by-side-statement-view/left-statement-selected-sections-reducer.js","store/reducers/side-by-side-statement-view/left-statement-section-reviews-reducer.js","models/data/statement-summary-elements-display-model.js","store/reducers/statement-summary/statement-summary-elements-display-reducer.js","store/reducers/content-search-result-reducer.js","store/reducers/reportPreviewPage/show-status-and-flag-reducer.js","store/reducers/reportPreviewPage/show-element-id-reducer.js","store/reducers/reportPreviewPage/enable-refresh-icon-reducer.js","store/reducers/reportPreviewPage/sync-scroll-reducer.js","store/reducers/reportPreviewPage/visible-first-element-from-top-reducer.js","store/reducers/blackline-source-guid-list-reducer.js","store/reducers/blackline-target-guid-list-reducer.js","store/reducers/modes/side-by-side-sync-scroll-reducer.js","models/api/sync-scroll-ids-modal.js","store/reducers/modes/sync-scroll-ids-reducer.js","store/reducers/root-reducer.js","store/store.js","constants/feature/formula-constants.js","store/actions/statement-list/statement-list-actions.js","api/api-client.js","api/api-error-handler.js","constants/feature/notes/notes-panel-filter-constants.js","constants/feature/element-panel-constants.js","constants/feature/statement-creation-constants.js","utils/scrolling-utils.js","store/actions/panel-cancel-modal-actions.js","utils/time-formatter-util.js","models/utils/common/statement-status-model.js","icons/open-folder.svg","icons/asterisk.svg","icons/status-complete.svg","icons/status-in-progress.svg","icons/status-error.svg","constants/feature/statement-list-constants.js","store/actions/blackline-view-actions.js","constants/feature-flag-constants.js","store/actions/selected-project-actions.js","components/common/icon-button-component.jsx","store/actions/element-cache-actions.js","store/actions/modes-actions.js","store/actions/formula-actions.js","store/actions/tickmark-list-panel-actions.js","api/statement-list-api.js","components/common/chip-component.jsx","store/actions/side-by-side-statement/side-by-side-statement-actions.js","utils/project-utils.js","api/api-authentication.js","utils/ocr-annotation-utils.js","api/create-project-entity-api.js","store/actions/batch-panel-actions.js","store/actions/workpaper-toolkit-list-actions.js","constants/feature/statement-navigator-constants.js","icons/search.svg","components/common/search-component.jsx","constants/util/search-utility.js","api/element-api.js","components/common/radio-component.jsx","constants/feature/batch-panel-constants.js","icons/icon-information-tooltip.svg","models/utils/common/tab-model.jsx","store/actions/section-cache-actions.js","icons/close-button.svg","store/actions/copy-formula-actions.js","models/api/selected-statement-model.js","api/sections-api.js","store/actions/selected-statement-actions.js","store/actions/preview-report-page-actions.js","constants/feature/section-details-constants.js","components/common/loading-component.jsx","store/actions/toolkit-export-panel-actions.js","constants/common/job-type-constants.js","store/actions/internal-reference-actions.js","utils/sync-scroll-utils.js","utils/ocr-text-selection-utils.js","components/common/feature-flag-component.jsx","constants/feature/element-attribute-constants.js","models/data/statement-model.js","components/common/text-input-component.jsx","api/tickmark-api.js","utils/note-filter-util.js","store/actions/statement-workflows-actions.js","store/actions/section-review-history-actions.js","store/actions/sections-actions.js","store/actions/statement-content-actions-ocr.js","store/actions/project-socket-actions.js","store/actions/notes-cache-actions.js","store/actions/project-list-actions.js","api/delete-project-api.js","models/data/element-filters-model.js","store/actions/section-assignment-actions.js","store/actions/section-tree-list-actions.js","store/actions/admin-module-actions.js","store/actions/statement-summary/elements-summary-actions.js","icons/info.svg","store/actions/statement-socket-actions.js","models/api/project-api-model.js","icons/cross.svg","store/actions/ocr-current-view-page-number-actions.js","store/actions/comfort-annotations-list-actions.js","api/project-list-api.js","store/actions/element-changes-since-tracker-actions.js","constants/util/key-code-constants.js","icons/plus.svg","utils/formula-utils.js","api/statement-content-api.js","models/data/note-model.js","store/actions/statement-summary/sections-summary-actions.js","constants/util/admin-module-utility.js","store/actions/zoom-actions.js","components/common/form-item-component.jsx","store/actions/left-statement-section-content-actions.js","models/api/toolkit-export-download-model.js","models/api/toolkit-export-download-list-model.js","store/actions/statement-content-annotation-creation-actions.js","api/comfort-letter-api.js","api/notes-api.js","models/utils/common/revision-status-model.js","constants/feature/revision-status-constants.js","models/api/revision-api-model.js","store/actions/TOC-actions.js","api/workpaper-api.js","utils/number-formatter-util.js","pages/admin-module/admin-module-manage-users/_manage-users-support-id-modal.jsx","components/admin-module-api-switch.jsx","constants/feature/admin-module-constants.js","models/api/section-tree-list-model.js","store/actions/statement-navigator/navigator-panel-actions.js","models/data/user-model.js","components/common/notification-component.jsx","constants/feature/project-list-header-constants.js","store/actions/internal-reference-suggestion-list-actions.js","models/api/content-section-map-api-model.js","models/api/tickmark-list-api-model.js","components/common/element-amount-attributes-details-component.jsx","constants/common/data-grid-constants.js","models/data/tickmark-model.js","components/feature/statement-content-panel/tieout-element-html/_preview-report-selectedable-element-component.jsx","components/feature/statement-content-panel/tieout-element-callouts.jsx","components/feature/statement-content-panel/tieout-element-component.jsx","icons/warning.svg","icons/arrow-simple-thick-down.svg","utils/current-user-utils.js","store/actions/current-user-actions.js","constants/feature/tieout-element-utils.js","models/form/statement-form-model.js","api/admin-module-api.js","store/actions/annotation-display-actions.js","store/actions/api-error-handler-actions.js","utils/adobe-analytics-utils.js","models/api/internal-reference-model.js","models/api/section-review-list-api-model.js","models/utils/common/data-grid/data-grid-column-model.jsx","models/utils/common/data-grid/data-grid-data-model.js","store/actions/report-preview-page-actions.js","store/actions/statement-summary/notes-summary-actions.js","store/actions/pinned-details-actions.js","store/actions/active-users-actions.js","store/actions/side-by-side-statement/left-statement-section-tree-list-actions.js","components/feature/statement-list/statement-list-no-statements-component.jsx","components/feature/statement-list/statement-list-add-revision-modal.jsx","icons/link.svg","constants/feature/revision-history-constants.js","models/api/revision-list-api-model.js","components/feature/statement-list/revision-history-modal.jsx","components/feature/statement-list/_deleted-revision-history-modal.jsx","components/feature/statement-list/permanently-delete-single-revision-modal.jsx","components/feature/statement-list/restore-deleted-revision-error-modal.jsx","components/feature/statement-list/deleted-revision-history-state-wrapper.jsx","components/feature/statement-list/soft-delete-all-revisions-modal.jsx","components/feature/statement-list/soft-delete-latest-revision-modal.jsx","components/feature/statement-list/permanently-delete-revisions-modal.jsx","models/api/statement-wrap-up/statement-wrap-up-stats-api-model.js","components/feature/statement-list/_statement-wrap-up-stats-component.jsx","components/feature/statement-list/submit-statement-for-wrap-up-approval-modal.jsx","models/api/statement-wrap-up/statement-wrap-up-approval-stats-api-model.js","components/feature/statement-list/wrap-up-approval/statement-wrap-up-approval-modal-1.jsx","components/feature/statement-list/wrap-up-approval/statement-wrap-up-approval-modal-2.jsx","components/feature/statement-list/wrap-up-approval/statement-wrap-up-approval-flow-wrapper.jsx","components/feature/statement-list/copy-statement-modal.jsx","components/feature/statement-list/statement-list-component.jsx","models/api/formula-list-model.js","models/api/project-list-model.js","models/api/section-id-list-model.js","models/api/statement-content-search-results-api-model.js","api/revision-api.js","components/common/rich-text-editor-component.jsx","api/selected-project-api.js","constants/feature/workpaper-panel-constants.js","constants/feature/tickmark-constants.js","api/formula-api.js","store/actions/ocr-navigation-actions.js","store/actions/omnia-engagement-actions.js","store/actions/statement-list/statement-list-filters-actions.js","store/actions/content-search-result-actions.js","models/api/project-users-list-api-model.js","models/api/ocr-navigation-api-model.js","icons/close-button-red.svg","store/actions/source-statement-actions.js","models/data/batch-update-element-list-model.js","store/actions/revision-actions.js","models/data/formula/formula-row-element-model.js","store/actions/left-selected-statement-actions.js","api/omnia-integration-api.js","store/actions/content-view-modes-actions.js","store/actions/current-section-actions.js","store/actions/section-assignment-heading-refresh-actions.js","icons/unlink.svg","models/data/workflow-model.js","models/api/statement-workflows-map-model.js","models/utils/common/menu/menu-api-data-model.js","models/data/project-list-entry-model.js","components/common/automatically-identified-annotations.jsx","components/hooks/useOutsideClick.js","icons/flag-icon.svg","components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-component.jsx","components/feature/element-panel/annotations/comfort-letter-entry/comfort-letter-entry-component.jsx","models/data/annotation-display-filter-options-model.js","models/data/side-by-side-view-zoom-model.js","icons/callouts-direction-setter-top.svg","icons/callouts-direction-setter-right.svg","icons/callouts-direction-setter-bottom.svg","constants/feature/annotation-elements-constants.js","icons/refresh-blue.svg","components/util/api-error-notificiation-component.jsx","models/api/element-workpaper-list-model.js","models/api/comfort-letter-list-api-model.js","models/form/formula-form-model.js","models/api/section-content-api-model.js","api/statement-socket-client-api.js","models/data/formula/formula-row-number-model.js","store/actions/user-auth-actions.js","api/internal-reference-api.js","store/actions/statement-creation-page-data-actions.js","store/actions/audit-checklist-actions.js","models/api/elements-by-section-map.js","models/data/element-cache-model.js","models/api/entity-list-model.js","api/statement-api.js","models/api/statement-list-model.js","icons/unverified.svg","api/current-user-api.js","models/form/workpaper-form-model.js","store/actions/statement-summary/statement-annotations-update-actions.js","socket/socketio-client.js","api/statement-creation-edit-api.js","utils/menu-accessibility-utils.js","store/actions/project-users-list-actions.js","api/statement-creation-page-data-api.js","store/actions/left-revision-actions.js","higher-order-components/tieout-element-hoc-component.jsx","models/data/selected-element-map.js","components/util/drawer-action-handler-component.jsx","models/data/formula/formula-row-operator-model.js","models/api/section-assignments-list-api-model.js","models/data/statement-summary-display-options-model.js","models/data/comfort-letter-model.js","models/data/zoom-model.js","api/chatbot-api.js","store/actions/statement-summary/statement-summary-actions.js","store/actions/locale-actions.js","utils/ocr-element-utils.js","models/api/left-sections-cache-model.js","models/data/note-content-selection-model.js","models/api/blackline-guid-list-api-model.js","models/api/blackline-detail-api-model.js","models/api/blackline-data-by-section-map.js","models/data/blackline-cache-model.js","models/api/notes-by-section-map.js","models/data/note-cache-model.js","components/feature/statement-content-panel/note-anchor-component.jsx","icons/checkmarkDropdown.svg","utils/menu-utility.js","components/common/menu-component.jsx","components/common/virtualized-list-component.js","models/api/current-user-model.js","models/api/statement-summary-elements-model.js","models/api/element-tickmark-list-model.js","models/api/omnia-engagement-model.js","models/api/element-comfort-letter-list-model.js","models/api/period-list-model.js","models/data/omnia-engagement-entry-model.js","models/api/statements-element-search-results-api-model.js","socket/signalr-client.js","icons/plus-circle.svg","utils/hooks-util.js","components/common/tabs-group-component.jsx","utils/project-list-utils.js","icons/verified.svg","api/statement-summary-api.js","models/data/formula/formula-row-model.js","components/hooks/useHoverEffects.js","api/navigation-api.js","icons/task-reviewed.svg","icons/task.svg","icons/callouts-direction-setter-left.svg","icons/filter.svg","components/common/data-grid/data-grid-header.component.jsx","models/data/country-model.js","models/form/country-form-model.js","api/api-request-validator.js","store/actions/feature-info-actions.js","store/actions/statement-workflows-steps-actions.js","utils/copy-formula-utils.js","models/data/content-css-selector-model.js","store/actions/compare-stats-panel-actions.js","utils/section-tree-utils.js","components/feature/statement-content-panel/section-anchor-component.jsx","components/feature/statement-content-panel/_section-Review-Tooltip.jsx","higher-order-components/section-anchor-hoc-component.jsx","higher-order-components/note-anchor-hoc-component.jsx","utils/section-rendering-utils.js","icons/edit-pencil.svg","constants/feature/comfort-letter-constants.js","models/data/workpaper-model.js","models/api/workpaper-toolkit-list-panel-api-model.js","models/api/sections-cache-model.js","models/api/statement-creation-page-data-api-model.js","models/api/active-users-api-model.js","models/data/container-model.js","models/form/container-form-model.js","components/util/close-toast-button-component.jsx","api/docChat-api-client.js","models/data/element-selection-model.js","utils/heading-data-utils.js","utils/note-email-util.js","store/actions/side-by-side-view-annotations-actions.js","models/data/content-view-modes-model.js","api/audit-checklist-api.js","models/data/content-search-result-entry-model.js","icons/delete-icon.svg","models/api/statement-summary-notes-model.js","models/api/statement-summary-sections-model.js","models/data/audit-question-model.js","models/api/audit-questions-checklist-api-model.js","api/project-socket-client-api.js","icons/error.svg","constants/common/multi-line-ellipsis-constants.js","icons/kebab-bold.svg","components/feature/statement-list/statement-list-progress-bar-component.jsx","icons/success.svg","icons/document.svg","components/common/statement-export-in-progress-modal.jsx","icons/FilledPin.svg","icons/flagged.svg","icons/reviewed.svg","api/tieout-info-api.js","store/actions/user-profile-actions.js","constants/feature/selected-project-constants.js","icons/open-non-priority.svg","icons/closed-non-priority.svg","icons/open-priority.svg","components/feature/statement-content-panel/tieout-element-common/annotation-callout-component.jsx","icons/annotation-indicator.svg","containers/util/intl-provider-container.js","icons/fullscreen-increase.svg","icons/fullscreen-decrease.svg","models/api/section-content-api-model-ocr-image.js","models/api/section-content-api-model-ocr-data.js","models/api/left-sections-cache-model-ocr-data.js","icons/edit-page.svg","models/data/statement-content-filters-model.js","models/data/formula/formula-list-entry-model.js","models/api/internal-reference-suggestion-list-model.js","models/api/source-statement-model.js","store/actions/navigation-edit-actions.js","models/api/element-history-api-model.js","models/data/section-tree-list-entry-model.js","models/data/admin-module-maintenance-page-model.js","models/form/monitoring-form-model.js","store/actions/statement-summary/statement-summary-elements-display-actions.js","models/form/comfort-letter-form-model.js","constants/feature/adobe-analytics-constants.js","models/data/adobe-direct-call-rule-model.js","store/middlewares/adobe-analytics-middleware.js","components/feature/statement-content-panel/ocr-callouts.jsx","components/feature/statement-content-panel/tieout-element-common/_tieout-preview-report-callout-component.jsx","components/feature/statement-content-panel/tieout-callout-element-component-ocr.jsx","icons/caret-black.svg","icons/arrow-thick-down.svg","models/utils/common/data-grid/data-grid-sort-model.jsx","models/utils/api-error-handler-model.js","models/api/auth-user-model.js","models/api/pinned-details-model.js","models/api/sections-cache-model-ocr-data.js","models/api/notes-list-api-model.js","models/api/section-assignments-api-model.js","models/api/statement-workflow-steps-model.js","models/data/admin-module-maintenance-page-list-model.js","components/common/element-details-component.jsx","components/feature/element-panel/comfort-letter-panel/edit-comfort-letter-modal.jsx","components/feature/element-panel/comfort-letter-panel/delete-comfort-annotation-modal.jsx","components/feature/toolkit/toolkit-comfort-annotation/toolkit-comfort-annotation-panel.jsx","styles/variables/feature/disclosure-analytics-header-variables.scss","styles/variables/pages/home-page-variables.scss","icons/Guidance_popup.gif","one-trust-cookies.js","polyfills.js","disclosure-analytics.js","walkme-bootstrap.js","adobe-analytics-bootstrap.js","../node_modules/suneditor/src/lang sync /^/.*/.js$","styles/app-styles.scss","components/util/page-component.jsx","components/feature/project-details/_project-details-no-projects-component.jsx","components/feature/project-details/_project-details-deleted-overlay-component.jsx","icons/shield.svg","icons/rocket.svg","models/api/users-list-model.js","constants/feature/project-details-constants.js","icons/edit.svg","components/feature/project-details/_project-details-user-grid-component.jsx","icons/omnia-icon.svg","icons/arrow-right.svg","components/feature/project-details/_project-details-expanded-users-component.jsx","components/feature/project-details/project-details-component.jsx","containers/feature/project-details-container.js","constants/feature/project-list-constants.js","icons/trash-can.svg","components/feature/project-list/soft-delete-project-modal.jsx","components/feature/project-list/restore-project-modal.jsx","components/feature/project-list/permanent-delete-project-modal.jsx","components/feature/project-list/_project-list-card-component.jsx","icons/omnia-link.svg","icons/settings-icon.svg","components/feature/project-list/_project-list-header-component.jsx","components/feature/project-list/project-list-component.jsx","containers/feature/project-list-container.js","containers/feature/statement-list/statement-list-container.js","models/utils/common/document-upload-status-model.js","constants/feature/statement-processing-constants.js","components/feature/statement-processing/retry-confirmation-modal.jsx","components/feature/statement-processing/cancel-confirmation-modal.jsx","icons/close-no-circle.svg","icons/refresh-no-circle.svg","components/feature/statement-processing/statement-workflow-controller-component.jsx","components/feature/statement-processing/statement-processing-component.jsx","containers/feature/statement-processing-container.js","components/feature/omnia/_omnia-engagements-confirmation-modal.jsx","models/api/tieout-build-info-model.js","constants/footer-constants.js","components/common/footer-component.jsx","icons/info-alt.svg","components/feature/home-page/recent-updates-modal.jsx","components/feature/home-page/maintenance-banner.jsx","pages/home-page.jsx","utils/browser-utils.js","containers/feature/homepage-container.js","store/actions/homepage-actions.js","components/common/card-component.jsx","icons/stepValid.svg","components/common/progress-bar-step-component.jsx","models/data/engagement-model.js","models/api/engagement-list-model.js","constants/feature/project-creation-constants.js","models/form/project-form-model.js","api/project-creation-edit-api.js","components/feature/project-creation/project-info/_project-creation-project-info-non-audit-text-input.jsx","components/feature/project-creation/project-info/project-creation-project-info-component.jsx","components/feature/project-creation/project-info/learn-more-about-roles-modal.jsx","components/feature/project-creation/manage-users/support-team-access-view-disclaimer-modal.jsx","components/feature/project-creation/manage-users/support-team-access-acknowledge-disclaimer-modal.jsx","components/feature/project-creation/manage-users/project-creation-manage-users-component.jsx","icons/back-button.svg","components/feature/project-creation/project-creation-cancel-modal.jsx","pages/project-creation-page.jsx","containers/feature/project-creation/project-creation-container.js","store/actions/project-creation-actions.js","constants/feature/project-edit-constants.js","components/feature/project-edit/project-info/_project-edit-project-info-non-audit-text-input.jsx","components/feature/project-edit/project-info/project-edit-project-info-component.jsx","components/feature/project-creation/manage-users/tech-support-access-view-disclaimer-modal.jsx","components/feature/project-creation/manage-users/tech-support-access-acknowledge-disclaimer-modal.jsx","components/feature/project-edit/manage-users/project-edit-manage-users-component.jsx","components/common/checkbox-list-component.jsx","components/feature/project-edit/legal-hold/project-edit-manage-legal-hold-component.jsx","components/feature/project-edit/section-menu/project-edit-section-menu-component.jsx","components/feature/project-edit/project-edit-cancel-modal.jsx","components/feature/project-edit/manage-coe/coe-team-access-view-disclaimer.jsx","components/feature/project-edit/manage-coe/coe-team-acknowledgement-modal.jsx","components/feature/project-edit/manage-coe/project-edit-manage-coe-access.jsx","pages/project-edit-page.jsx","containers/feature/project-edit/project-edit-container.js","store/actions/project-edit-actions.js","icons/ESC-support.svg","components/feature/statement-creation/select-statement/statement-creation-select-statement-component.jsx","icons/left-arrow.svg","icons/right-arrow.svg","icons/calendar.svg","icons/chevron-up.svg","constants/feature/dateComponent/customDatePicker.jsx","components/feature/statement-creation/statement-creation-statement-info-component.jsx","components/feature/statement-creation/statement-creation-no-carry-forward-statements-component.jsx","components/feature/statement-creation/statement-creation-carryforward-info-component.jsx","components/feature/statement-creation/statement-creation-carryforward-component.jsx","components/feature/statement-creation/statement-creation-cancel-modal.jsx","components/feature/statement-creation/statement-creation-additional-consideration-modal.jsx","pages/statement-creation-page.jsx","containers/feature/statement-creation/statement-creation-container.js","store/actions/statement-creation-actions.js","components/feature/statement-edit/statement-edit-statement-info-component.jsx","components/feature/statement-edit/statement-edit-cancel-modal.jsx","pages/statement-edit-page.jsx","containers/feature/statement-edit/statement-edit-container.js","store/actions/statement-edit-actions.js","components/common/blackline-view-toggle-component.jsx","components/feature/statement-summary/statement-summary-display-options-dropdown.jsx","constants/feature/statement-summary-constants.js","components/feature/statement-summary/statement-summary-elements-component.jsx","icons/open-note.svg","components/feature/statement-summary/statement-summary-notes-component.jsx","icons/task-reviewed-ocr.svg","components/feature/statement-summary/statement-summary-sections-component.jsx","components/feature/statement-summary/statement-summary-flagged-component.jsx","components/feature/statement-summary/statement-summary-elements-total-component.jsx","constants/feature/annotation-display-filter-constants.js","icons/annotation-expanded.svg","icons/annotation-collapsed.svg","icons/show-elements-on-summary-bar.svg","icons/hide-elements-on-summary-bar.svg","components/feature/statement-summary/statement-summary-elements-display.jsx","icons/no-border-note-icon.svg","icons/expand-all-elements-default.svg","icons/expand-all-elements-active.svg","components/feature/statement-summary/statement-summary-annotations-component.jsx","icons/callouts-dropdown-arrow.svg","components/common/icon-dropdown.jsx","components/feature/statement-summary/statement-annotations-update.jsx","icons/plus-zoom.svg","icons/minus-zoom.svg","components/common/expand-all.jsx","components/common/zoom-control-component.jsx","higher-order-components/zoom-control-hoc-component.jsx","icons/bulk-action.svg","components/common/batch-select-control-component.jsx","components/feature/statement-summary/statement-summary-component.jsx","utils/text-format-utils.js","components/feature/active-users/active-users-list-component.jsx","icons/refresh-heading.svg","components/hooks/useScreenSize.js","components/common/global-header-component.jsx","containers/global-header-container.js","components/feature/statement-content-panel/section-content-component.jsx","higher-order-components/section-content-hoc-component.jsx","utils/modes-utils.js","utils/content-selection-utils.js","icons/checkmark.svg","components/feature/statement-content-panel/statement-context-menu.jsx","components/common/text-area-component.jsx","components/feature/statement-content-panel/add-navigation-modal.jsx","components/feature/statement-content-panel/statement-content-panel-component.jsx","utils/element-coordinate-utils.js","withURLRouter.jsx","containers/feature/statement-content/statement-content-panel-container.jsx","icons/lock.svg","pages/statement-read-only-banner.jsx","components/feature/statement-content-panel/statement-context-menu-ocr.jsx","components/feature/statement-content-panel/html-overlay.jsx","utils/ocr-statement-details-utils.js","components/feature/statement-content-panel/element-flag-component-ocr.jsx","components/feature/statement-content-panel/tieout-elements-component-ocr.jsx","components/feature/statement-content-panel/section-content-overlay-element-map.jsx","components/feature/statement-content-panel/element-details-ocr.jsx","components/feature/statement-content-panel/element-details-container-ocr.jsx","components/feature/statement-content-panel/blackline-view-changes-ocr.jsx","components/feature/statement-content-panel/note-details-ocr.jsx","components/feature/statement-content-panel/notes-details-container-ocr.jsx","components/feature/toolkit/statement-nav/statement-nav-content-search-results-component.jsx","components/feature/statement-content-panel/tieout-content-search-component-ocr.jsx","components/feature/statement-content-panel/section-content-search-overlay-map.jsx","components/feature/statement-content-panel/statement-content-search-component-ocr.jsx","components/feature/statement-content-panel/section-content-overlay-ocr.jsx","components/feature/statement-content-panel/section-content-component-ocr.jsx","components/feature/statement-content-panel/statement-content-panel-component-ocr.jsx","containers/feature/statement-content/statement-content-panel-container-ocr.jsx","components/common/element-annotation-details-component.jsx","components/feature/element-panel/_element-panel-header-component.jsx","components/common/expandable-row-component.jsx","icons/plus-circle-blue.svg","components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-with-attach-component.jsx","components/feature/element-panel/tickmark-panel/_element-tickmark-panel-search-results-component.jsx","components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-with-detach-component.jsx","components/feature/element-panel/confirm-override-system-flag-modal-component.jsx","models/form/tickmark-form-model.js","components/feature/element-panel/element-status-component.jsx","containers/feature/element-panel/element-status-container.js","components/feature/element-panel/element-attributes-component.jsx","containers/feature/element-panel/element-attributes-container.js","components/feature/element-panel/element-history-component.jsx","components/feature/element-panel/annotations/_element-panel-annotations-tab-component.jsx","icons/round-number.svg","icons/copy.svg","components/feature/element-panel/annotations/_formula-entry-component.jsx","components/feature/element-panel/annotations/_element-panel-formula-list-annotation-component.jsx","containers/feature/element-panel/element-panel-formula-list-annotation-container.js","components/feature/element-panel/annotations/_internal-reference-element-entry-component.jsx","utils/copy-annotation-to-ir-utils.js","models/form/batch-element-update-form-model.js","components/feature/element-panel/internal-reference-panel/_copy-annotation-linked-elements-modal-component.jsx","components/feature/element-panel/internal-reference-panel/_copy-annotation-modal-controller.jsx","store/actions/workpaper-actions.js","components/feature/element-panel/annotations/_element-panel-internal-reference-list-annotation-component.jsx","components/feature/element-panel/annotations/workpaper-entry/workpaper-entry-component.jsx","components/feature/element-panel/annotations/workpaper-entry/workpaper-entry-with-detach-component.jsx","components/feature/element-panel/annotations/_element-panel-workpaper-list-annotation-component.jsx","components/feature/element-panel/annotations/_element-panel-tickmark-list-annotation-component.jsx","components/feature/element-panel/comfort-letter-panel/create-comfort-letter-modal.jsx","components/feature/element-panel/annotations/comfort-letter-entry/comfort-letter-entry-with-attach-component.jsx","components/feature/element-panel/comfort-letter-panel/_element-comfort-panel-search-results-component.jsx","components/feature/element-panel/comfort-letter-panel/_comfort-letter-panel-attach-component.jsx","components/feature/element-panel/annotations/comfort-letter-entry/comfort-letter-entry-with-detach-component.jsx","components/feature/element-panel/annotations/_element-panel-comfort-letter-list-annotation-component.jsx","components/feature/element-panel/annotations/_element-panel-annotations-component.jsx","components/feature/element-panel/_element-panel-body-component.jsx","components/feature/element-panel/formula-panel/_formula-panel-header-component.jsx","icons/refresh.svg","components/feature/element-panel/formula-panel/formula-row/_formula-operator-component.jsx","components/feature/element-panel/formula-panel/formula-row/_formula-row-manual-input-component.jsx","components/feature/element-panel/formula-panel/formula-row/_formula-row-element-component.jsx","components/feature/element-panel/formula-panel/_formula-panel-round-number-modal-component.jsx","components/feature/element-panel/formula-panel/_formula-panel-edit-formula-component.jsx","containers/feature/formula-panel/formula-panel-edit-formula-container.js","components/feature/element-panel/formula-panel/_formula-panel-content-component.jsx","containers/feature/formula-panel/formula-panel-content-container.js","components/feature/element-panel/formula-panel/formula-cancel-modal-component.jsx","components/feature/element-panel/formula-panel/formula-panel-component.jsx","containers/feature/formula-panel/formula-panel-container.js","components/feature/element-panel/internal-reference-panel/_internal-reference-panel-header-component.jsx","components/feature/element-panel/internal-reference-panel/_internal-reference-panel-suggested-references-component.jsx","components/feature/element-panel/internal-reference-panel/_internal-reference-panel-listing-component.jsx","components/feature/element-panel/internal-reference-panel/_internal-reference-panel-content-component.jsx","containers/feature/internal-reference/internal-reference-panel-content-container.js","components/feature/element-panel/internal-reference-panel/_internal-reference-cancel-modal-component.jsx","components/feature/element-panel/internal-reference-panel/internal-reference-panel-component.jsx","models/api/workpaper-reference-list-model.js","components/feature/element-panel/workpaper-panel/_workpaper-panel-attach-component.jsx","components/feature/element-panel/workpaper-panel/_workpaper-panel-already-linked-component.jsx","components/feature/element-panel/workpaper-panel/create-work-paper-modal.jsx","components/feature/element-panel/workpaper-panel/workpaper-panel-component.jsx","containers/feature/workpaper-panel-container.js","components/feature/element-panel/tickmark-panel/create-tickmark-modal.jsx","components/feature/element-panel/tickmark-panel/_element-tickmark-panel-attach-component.jsx","components/feature/element-panel/tickmark-panel/_element-tickmark-panel-already-attached-component.jsx","components/feature/element-panel/tickmark-panel/element-tickmark-panel-component.jsx","containers/feature/element-panel/element-tickmark-panel-container.js","components/util/copy-formula-banner-component.jsx","components/feature/element-panel/element-panel-component.jsx","containers/feature/element-panel/element-panel-container.js","components/feature/section-details-panel/_section-details-history-element-component.jsx","components/feature/section-details-panel/_section-details-history-row-component.jsx","components/feature/section-details-panel/_section-details-section-assignment-modal-component.jsx","components/feature/section-details-panel/section-details-panel-component.jsx","icons/statement-navigator.svg","icons/notes.svg","icons/tickmark.svg","icons/compare-documents.svg","icons/export.svg","icons/WP.svg","icons/rocket-grey.svg","icons/comfort-annotation.svg","icons/compare.svg","icons/chat-bot.svg","models/utils/toolkit-option-model.js","constants/feature/toolkit-constants.js","components/feature/toolkit/toolkit-component.jsx","icons/collapse-all.svg","icons/expand-all.svg","icons/down-arrow.svg","components/common/treeview.jsx","components/feature/statement-content-panel/edit-section-modal.jsx","components/feature/statement-content-panel/delete-confirmation-modal.jsx","components/feature/statement-content-panel/delete-section-modal.jsx","icons/refresh-element-filter.svg","components/feature/toolkit/statement-nav/statement-nav-bulk-assignment/_statement-nav-bulk-select-users.jsx","components/feature/toolkit/statement-nav/statement-nav-bulk-assignment/_statement-nav-bulk-select-sections.jsx","constants/feature/statement-navigator/section-bulk-assign-review-constants.js","api/bulk-assign-unassign-api.js","components/feature/toolkit/statement-nav/statement-nav-bulk-assignment/statement-nav-bulk-assignment-modal-component.jsx","components/feature/toolkit/statement-nav/table-of-contents-treeview.jsx","icons/sidebar.svg","components/feature/toolkit/statement-nav/elements/statement-nav-elements-search-entry-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-elements-search-results-component.jsx","api/section-bulk-review-unreview-api.js","components/feature/toolkit/statement-nav/ocr-navigation.jsx","components/feature/toolkit/statement-nav/statement-navigator-panel-body-component.jsx","store/actions/sections-review-actions.js","components/feature/toolkit/statement-nav/elements/_statement-nav-element-filters-chips-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-tertiary-flagged-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-tertiary-unflagged-component.jsx","components/feature/toolkit/statement-nav/elements/_statement-nav-element-filters-period-component.jsx","components/feature/toolkit/statement-nav/elements/_statement-nav-element-filters-statement-segments-component.jsx","components/feature/toolkit/statement-nav/elements/_statement-nav-element-filters-scaling-component.jsx","components/feature/toolkit/statement-nav/elements/_statement-nav-element-filters-unit-component.jsx","components/feature/toolkit/statement-nav/elements/_statement-nav-element-filters-entity-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-source-element-filters-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-tertiary-formula-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-tertiary-wpr-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-tertiary-tickmarks-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-tertiary-comfort-annotation-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-tertiary-internalReferences-component.jsx","components/feature/toolkit/statement-nav/elements/_statement-nav-element-filters-statement-pages-component.jsx","components/feature/toolkit/statement-nav/elements/statement-nav-element-filters-modal.jsx","icons/arrow-thick-up-alt.svg","icons/arrow-thick-down-alt.svg","components/feature/toolkit/statement-nav/statement-navigator-search-controls-component.jsx","components/feature/toolkit/statement-nav/statement-navigator-panel-component.jsx","components/feature/statement-content-panel/statement-content-search-highlight-style-component.jsx","icons/cross-icon-disabled.svg","components/feature/batch-panel/_batch-panel-exclude-elements-confirmation-modal.jsx","components/feature/batch-panel/_batch-panel-workpaper-section.jsx","components/feature/batch-panel/_batch-panel-tickmark-section.jsx","icons/caret.svg","components/feature/batch-panel/_batch-panel-selected-elements-component.jsx","components/feature/batch-panel/_batch-panel-comfort-letter-section.jsx","components/feature/batch-panel/batch-panel-component.jsx","models/form/notes-form-model.js","components/feature/notes-panel/_notes-textarea-component.jsx","components/feature/notes-panel/notes-panel-input-area-component.jsx","components/feature/notes-panel/_notes-panel-notes-additional-details-component.jsx","components/feature/notes-panel/notes-panel-reply-text-input-component.jsx","components/feature/notes-panel/notes-panel-note-edit-text-input-component.jsx","icons/open-note-check.svg","icons/closed-note.svg","icons/priority-selected.svg","icons/priority-default.svg","icons/trashcan.svg","icons/note-ghost.svg","icons/reply.svg","components/feature/notes-panel/notes-panel-notes-entry-component.jsx","components/feature/notes-panel/_notes-panel-notes-list-component.jsx","components/feature/notes-panel/_notes-panel-note-summary-component.jsx","components/feature/notes-panel/_notes-panel-filter-chips-component.jsx","components/feature/notes-panel/_notes-panel-user-filter-list-component.jsx","components/feature/notes-panel/_notes-panel-statement-segment-filter-component.jsx","components/feature/notes-panel/_notes-panel-advanced-filter-modal-component.jsx","components/feature/notes-panel/_notes-panel-header-component.jsx","components/feature/notes-panel/notes-panel-component.jsx","components/feature/tickmark-panel/delete-tickmark-modal.jsx","components/feature/tickmark-panel/edit-tickmark-modal.jsx","components/feature/tickmark-panel/tickmark-panel-component.jsx","components/common/slide-toggle-component.jsx","components/feature/statement-summary/compare-panel/compare-panel-diff-component.jsx","components/feature/statement-summary/compare-panel/compare-panel-component.jsx","icons/excel.svg","icons/PDF.svg","icons/download-export.svg","icons/preview.svg","icons/share-omnia.svg","components/feature/statement-content-panel/export-workpaper-modal.jsx","components/feature/omnia/omnia-share-confirmation-modal.jsx","components/feature/omnia/omnia-share-confirmation-modal-2.jsx","components/feature/toolkit/toolkit-export-panel-content-component.jsx","constants/feature/toolkit/toolkit-export-panel-constant.js","icons/semi-ellipse.svg","icons/download.svg","components/feature/toolkit/toolkit-downloads-card-component.jsx","components/feature/toolkit/toolkit-downloads-list-component.jsx","models/utils/common/tab-model-icon.js","components/feature/toolkit/toolkit-export-panel-component.jsx","components/feature/toolkit/toolkit-audit-panel/audit-checklist-card.jsx","components/feature/toolkit/toolkit-audit-panel/toolkit-audit-checklist-question-element.jsx","components/feature/toolkit/toolkit-audit-panel/toolkit-audit-checklist-panel-content.jsx","components/feature/toolkit/toolkit-audit-panel/toolkit-audit-checklist-panel-confirmation-modal.jsx","components/feature/toolkit/toolkit-audit-panel/toolkit-audit-checklist-panel.jsx","components/feature/toolkit/workpaper-toolkit-panel/toolkit-delete-workpaper-modal-component.jsx","components/feature/toolkit/workpaper-toolkit-panel/toolkit-edit-workpaper-modal-component.jsx","components/feature/toolkit/workpaper-toolkit-panel/toolkit-workpaper-list-panel-component.jsx","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-header-component.jsx","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-guidance-message-component.jsx","components/hooks/useAutoSizeTextArea.js","components/hooks/useAutoFocus.js","components/common/dynamic-text-area-component.jsx","icons/chat-bot-chat-submit-button.svg","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-panel-footer-component.jsx","icons/like.svg","icons/dislike.svg","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-utils.js","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-response-feedback-modal.jsx","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-panel-citation.jsx","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-panel-message-bubble.jsx","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-panel-chat-window.jsx","components/common/chat-bot-clear-session-acknowledge-modal.jsx","components/feature/toolkit/chatbot-toolkit-panel/toolkit-chatbot-panel-component.jsx","constants/feature/toolkit-export-custom-report-default-checkbox-state-constants.js","components/feature/toolkit/statement-nav/customized-report/_render-custom-report-checkbox.jsx","components/feature/toolkit/statement-nav/customized-report/toolkit-export-custom-report-content-component.jsx","components/feature/toolkit/statement-nav/customized-report/toolkit-export-customized-report-component.jsx","pages/batch-banner.jsx","pages/blackline-version/blackline-version-subheader-component.jsx","pages/blackline-version/blackline-ocr-previous-version-component.jsx","pages/blackline-version/blackline-previous-version-component.jsx","pages/blackline-version/blackline-ocr-current-version-component.jsx","pages/blackline-version/blackline-current-version-component.jsx","pages/blackline-version/blackline-version-component.jsx","pages/recent-statement-content-updates-modal.jsx","pages/statement-content-page.jsx","containers/feature/statement-content/statement-content-container.jsx","constants/feature/omnia-engagements-constants.js","components/feature/omnia/omnia-linking-confirmation-modal.jsx","components/feature/omnia/omnia-unlinking-confirmation-modal.jsx","components/feature/omnia/_omnia-engagement-list-component.jsx","components/feature/omnia/omnia-engagement-page-component.jsx","pages/session-timeout-page.jsx","pages/tieout-page.jsx","pages/logout-page.jsx","components/app/unauthorized-component.jsx","containers/unauthorized-container.js","utils/disclosure-analytics-utils.js","components/routes/public-route-component.jsx","components/app/authorized-component.jsx","containers/authorized-container.js","components/routes/protected-route-component.jsx","components/routes/404-route-not-found-component.jsx","components/app/auth-success-component.jsx","components/session-timeout/_session-timeout-modal.jsx","components/session-timeout/session-timeout-component.jsx","pages/admin-module/admin-module-manage-users/_tab-admin-module-manage-users.jsx","components/common/date-time-picker-component.jsx","pages/admin-module/_tab-admin-module-maintenance-banner.jsx","pages/admin-module/_tab-admin-summary-of-key-changes.jsx","pages/admin-module/_tab-admin-module-monitoring.jsx","pages/admin-module/admin-module-page.jsx","icons/bulb.svg","icons/swap.svg","icons/double-arrow.svg","constants/util/side-by-side-utils.js","pages/side-by-side-compare/left-side/_select-statement-tab.jsx","pages/side-by-side-compare/left-side/_select-revision-tab.jsx","components/util/side-by-side-page-component.jsx","pages/side-by-side-compare/side-by-side-toolkits/side-by-side-statement-nav/side-by-side-statement-nav-flyout.jsx","pages/side-by-side-compare/left-side/_left-side-statement-view.jsx","pages/side-by-side-compare/left-side/left-side-view.jsx","pages/side-by-side-compare/right-side/right-side-view.jsx","pages/side-by-side-compare/dropdown/_side-by-side-options.jsx","pages/side-by-side-compare/dropdown/side-by-side-dropdown.jsx","pages/side-by-side-compare/side-by-side-view.jsx","pages/report-preview/_preview-report-statement-nav.jsx","pages/report-preview/_report-preview-left-side-html-statement.jsx","pages/report-preview/report-preview-left-side-view.jsx","constants/feature/report-preview-page-contants.js","pages/report-preview/report-preview-page-display-options.jsx","pages/report-preview/report-preview-utils.js","pages/report-preview/report-preview-right-side-view.jsx","pages/report-preview/report-preview.jsx","pages/adobe-tracker.jsx","models/api/supported-languages-api-model.js","components/feature/disclosure-analytics/user-settings-modal.jsx","components/feature/disclosure-analytics/da-user-settings-component.jsx","components/app-component.jsx","index.js"],"names":["isNullOrUndefined","val","undefined","extractPropFromFunctionOrValue","mapElementsRequest","targetId","sourceId","targetStatementId","sourceStatementId","elementMapDetails","withDefaultContextAsSelectedProject","post","then","response","addElementsToSourceListInSideBySideMode","elements","dispatch","getState","a","sourceStatementElementMap","ui","sideBySideView","sideBySideElementMap","sourceSideBySideMapping","length","ElementSelectionLimit","getSourceSideBySideMultipleElementsFromCache","selectedElements","console","error","addElementsToTargetListInSideBySideMode","targetStatementElementMap","targetSideBySideMapping","getMultipleElementsFromCache","isSideBySideView","dataState","data","uiState","leftElementCache","leftStatementContent","revisionId","sourceStatementParams","initiatedRequest","Promise","all","map","elementId","sectionId","elementData","getElement","getElementDetailsRequest","ElementDetails","setLoaded","push","isIntervalAlreadySet","mapElementsSuccessResult","sectionIdListStatementContentLoading","createAction","sectionIdListStatementContentLoaded","sectionIdListStatementContentError","leftSectionIdListStatementContentLoading","leftSectionIdListStatementContentLoaded","leftSectionIdListStatementContentError","sectionHTMLSegmentsStatementContentLoading","sectionHTMLSegmentsStatementContentLoaded","sectionHTMLSegmentsStatementContentLoadedWithoutResponse","sectionHTMLSegmentsStatementContentError","leftSectionHTMLSegmentsStatementContentLoading","leftSectionHTMLSegmentsStatementContentLoaded","leftSectionHTMLSegmentsStatementContentLoadedWithoutResponse","leftSectionHTMLSegmentsStatementContentError","setSectionInViewStatementContent","clearSectionInViewStatementContent","clearSectionContentWithIdsFromCache","clearOCRSectionContentWithIdsFromCache","clearLeftOCRSectionContentWithIdsFromCache","clearOCRSectionImageWithIdsFromCache","clearLeftOCRSectionImageWithIdsFromCache","sectionElementsLoading","sectionElementsLoaded","sectionElementsError","leftSectionElementsLoading","leftSectionElementsLoaded","leftSectionElementsError","clearLeftStatementContent","setStatementContentTab","selectElementContentPanel","deselectElementContentPanel","deselectElementsFromArrayContentPanel","clearSelectedElementsContentPanel","clearLeftSelectedElementsContentPanel","selectMultipleElementsContentPanel","replaceSelectedElementsContentPanel","replaceSelectedElementWithoutRemovingOld","replaceLeftSelectedElementWithoutRemovingOld","deallocateSelectedElementsContentPanel","setHighlightedElementIdContentPanel","selectSectionContentPanel","deselectSectionContentPanel","clearSelectedSectionsContentPanel","selectMultipleSectionsContentPanel","replaceSelectedSectionsContentPanel","deallocateSelectedSectionsContentPanel","periodListStatementContentLoading","periodListStatementContentLoaded","periodListStatementContentError","entityListStatementContentLoading","entityListStatementContentLoaded","entityListStatementContentError","setContentSearchAction","clearContentSearchAction","setContentHighlightSelector","clearContentHighlightSelector","clearStatementPageStoreAction","clearLeftStatementPageStoreAction","elementDatapartStoreAction","leftElementDatapartStoreAction","sectionDetailsLoaded","sectionDetailsLoading","clearSectionDetails","setSourceSyncScrollId","setTargetSyncScrollId","fetchSectionIdListStatementContent","isOCR","projectId","statementId","getStore","getSectionIdListRequest","clientId","selectedStatement","window","location","pathname","includes","fetchLeftSectionIdListStatementContent","parseInt","contextKey","CONTEXT_KEY","PROJECT_CONTEXT","contextValue","fetchRevisionPeriodList","getRevisionPeriodListRequest","fetchClientEntityList","getClientEntityListRequest","fetchSectionHTMLSegmentsStatementContentWithoutLoading","sectionIdList","segmentType","revision","getSectionSegmentsRequest","id","contentSearch","statementPage","searchTerm","calculateSizeAndAddSectionToCache","checkCacheToPurge","catch","fetchSectionHTMLSegmentsStatementContent","scrollToSection","locationPath","split","indexOf","scrollSectionIntoView","fetchElementsBySection","annotationDisplayOptions","elementCache","statementContent","isPreviewPage","isElementReportPreviewPage","getElementsBySectionRequest","showAll","item","marker","callout","isElementHasAnyAnnotations","getCurrentSectionIds","elementIds","getElementIdsBySectionId","fetchAllSectionRenderingData","isReportPreviewPage","blacklineViewMode","modes","fetchNotesBySection","fetchAllLeftSectionRenderingData","leftRevision","checkLeftCacheToPurge","fetchLeftSectionHTMLSegmentsStatementContent","fetchLeftElementsBySection","fetchLeftNotesBySection","fetchAllSectionRenderingDataWithoutLoading","setCurrentStatementContentTab","tab","initStatementContent","urlParams","createSectionCacheTracker","currentState","currentUserId","currentUser","selectedProject","project","projectToGeoMap","desiredProject","get","errorMessage","selectedStatementError","Error","updateSelectedProjectFromID","fetchSelectedStatement","chatBotPushIndex","getSelectedStatementOCRNavigationData","setSelectedTabAction","STATEMENT_NAV_TABS","pages","getContentSectionMapRequest","fetchSectionTreeAction","headings","showStatementNavPanelAction","fetchSectionReviews","initStatementSocketClientAction","setStatementSocketClient","fetchSectionAssignmentsList","getAllUsers","addUserToRevision","setInterval","initLeftStatementContent","createLeftSectionCacheTracker","fetchLeftRevision","_isSideBySideView","ROUTE_CONSTANTS","SIDE_BY_SIDE","setSectionInView","updateSectionViewedTimestamp","clearSectionInView","tracker","sectionsCache","cacheOverThreshold","clearStatementPageStore","clearStatementPageRevisionStoreAction","batchSelectElements","selectMode","ELEMENT_SELECT_MODES","FORMULA","el","batchAddElementFormulaRows","BATCH_WITH_BANNER","BATCH","showCallout","expandAllElements","updateSideBySideElementCacheByCallouts","batchAddElementsToBatch","COPY_FORMULA","forEach","ele","addElementForCopyFormula","log","batchSelectElementsInSideBySideMode","isLeftSideView","filter","isNaN","selectedElementsfromCache","sourceSideBySideElements","getElementsDataArryaFromElementsMapObject","setSourceStatementBatchElementsMapAction","selectedTargetElementsfromcache","targetSideBySideElements","setTargetStatementBatchElementsMapAction","selectedElementsMap","Object","values","onStatementNavSectionSelect","color","sectionIds","onSectionClick","sectionClick","elementFilters","statementNavigatorPanel","contentSectionMap","right","panels","INTERNAL_REFERENCE","shouldDisableSectionClick","title","section","showSectionDetailsPanelAction","fetchSectionReviewsWithLoading","getUpdatedSectionElementsNotesSummaryCount","updatedSection","fetchSectionHistoryDetails","isSectionSelected","selectedSectionsLength","deselectSelectedElement","searchElements","filters","selectSection","scrollIntoView","updateSectionDetailsStore","props","isDelete","selectedSection","sectionPanel","hideSectionDetailsPanelAction","selectElementFromElementSearch","firstSearch","elementDetails","elementPanel","RANGE","ELEMENT_HIGHLIGHT_STATES","DEFAULT","PANEL_SELECTED","searchForTermInContent","isOcr","sectionsInView","sectionMetaData","find","fetchAllOCRSectionRenderingData","clearSearchFromContent","refetchSectionsInView","deallocateItems","selectedNote","notesPanel","RIGHT_PANELS","NOTES","selectNoteFromNoteListAction","note","refetchBlacklineView","getBlacklineViewStatusRequest","result","BLACKLINE_VIEW_STATUS","BLK_REQ_RECEIVED","GENERATING","FAILED","blacklineTogleNotification","mapSideBySideElementsRequest","sideBySideViewAnnotations","userId","elementsforMapping","toApiFormat","sourceElements","sideBySideSourceElementsId","targetElements","sideBySideTargetElementsId","seggregateSourceTargetElements","successSourceElements","failedSourceElements","successTargetElements","failedTargetElements","sectionInViewIds","keys","sectionIdListMap","reduce","sectionInViewId","fetchSectionOCRSegmentsStatementContent","key","Number","updateCacheWithMostRecentSideBySideElementChanges","highlightMappedElementsByResponse","clearSideBySideElementsMap","successElementMapNotification","failureElementMapNotification","updateElementCacheByCalloutAction","handleElementMappingFailure","document","addEventListener","e","ctrlKey","once","clearAllLeftStatementData","clearleftSectionTreeListAction","clearLeftSelectedStatement","getProjectApiClient","SELECTED_PROJECT_CONTEXT","getSelectedProjectApiClient","withDefaultContextAsProject","valueForDefaultContext","HOME_GEO_CONTEXT","getHomeGeoApiClient","withDefaultContextAsCurrentGeo","getCurrentGeoApiClient","withDefaultContextAsHomeGeo","SELECTED_GEO_CONTEXT","getSelectedGeoApiClient","withDefaultContextAsSelectedProjectDocChat","getDocChatApiClient","withDefaultContextAsSelectedGeo","BUTTON_TYPES","primary","secondary","tertiary","icon","delete","BLOCK","Button","React","forwardRef","ref","children","className","type","disabled","onClick","tooltip","isTooltipRequiredForDisabled","active","classNames","IconButton","Icon","PlusCircleIcon","iconSize","width","height","buttonProps","PropTypes","string","bool","isRequired","func","instanceOf","TooltipOptions","propTypes","oneOfType","object","node","CLOSED","ELEMENT","SECTION","EXPORT","WORKPAPER","LEFT_PANELS","STATEMENT_NAV","TICKMARK","COMPARE","CUSTOM","AUDIT_CHECKLIST","DOWNLOAD","COMFORT_ANNOTATION","SIDE_BY_SIDE_STATEMENT_COMPARISON","CHAT_BOT","COMFORT_ANNOTATION_INFORMATION_TOOLTIP","text","position","AUDIT_CHECKLIST_INFORMATION_TOOLTIP","AUDIT_CHECKLIST_STATUS_INFORMATION_TOOLTIP","AUDIT_CHECKLIST_EDIT_INFORMATION_TOOLTIP","UNSELECTED_FILTER","API_BOOLS","TRUE","FALSE","isFilterUnselected","STATUS_VERIFICATION_OPTIONS","verified","RadioOption","label","value","unverified","STATUS_VERIFICATION_OPTIONS_ARRAY","STATUS_REVIEW_OPTIONS","review","unreview","STATUS_REVIEW_OPTIONS_ARRAY","STATUS_COMFORT_ASSIGNED_OPTIONS","comfortassigned","comfortnotassigned","STATUS_COMFORT_ASSIGNED_OPTIONS_ARRAY","STATUS_FLAG_OPTIONS","unflag","flag","STATUS_FLAG_OPTIONS_ARRAY","ANNOTATION_FORMULA_OPTIONS","with","without","ANNOTATION_FORMULA_OPTIONS_ARRAY","ANNOTATION_TICKMARK_OPTIONS","COMFORT_ANNOTATIONS_OPTIONS","ANNOTATION_TICKMARK_OPTIONS_ARRAY","ANNOTATION_COMFORT_ANNOTATIONS_OPTIONS_ARRAY","ANNOTATION_IR_OPTIONS","ANNOTATION_IR_OPTIONS_ARRAY","ANNOTATION_WPR_OPTIONS","PRIMARY_FILTER_CATEGORIES","VERIFY","heading","name","options","REVIEW","COMFORT_ASSIGNED","FLAG","PERIOD","SCALING","UNIT","ENTITY","WPR","IR","TICKMARKS","COMFORT_ANNOTATIONS","STATEMENT_SEGMENTS","PAGES","Tooltip","isNotInternationalized","useDefault","intl","event","tooltipOnHideFunction","delay","clickable","offset","useState","positionOnOverflow","setPositionOnOverflow","reactTooltipRef","useRef","_id","childrenWithProps","Children","child","cloneElement","_displayText","formatMessage","defaultMessage","defaultTooltipChild","Fragment","ReactDOM","createPortal","shouldBreakWord","effect","place","multiline","html","isCapture","afterHide","delayHide","afterShow","tooltipRef","current","rect","getBoundingClientRect","overflownLeft","left","overflownRight","innerWidth","getElementById","defaultProps","memo","injectIntl","ModalButton","this","MenuOption","shouldShowOption","isIntl","isLabel","isNotIntl","KebabMenuOption","onSelectOption","HOME_PAGE","TIEOUT_PAGE","LOGOUT_PAGE","PROJECT_CREATION_PAGE","PROJECT_EDIT_PAGE","STATEMENT_CREATION","STATEMENT_EDIT_PAGE","STATEMENT_CONTENT_PAGE","STATEMENT_SPLIT_PAGE","OMNIA_ENGAGEMENT_PAGE","SESSION_TIMEOUT","TERMS_OF_USE","BETA_STATEMENT_GUIDE","TIEOUT","ENV","DA_BASE_URL","PRIVACY","ABOUT","NOTICES","SUPPORT_REQUEST","SERVICE_NOW","ESC_SUPPORT","ADMIN_MODULE_PAGE","COOKIE_NOTICE","STATEMENT_EVAULATION_GUIDE","REPORT_PREVIEW","parseRoute","route","params","queryParams","_route","paramKey","paramIndex","paramValue","slice","queryString","stringify","ConditionalRender","state","args","stack","index","element","componentStack","createErrorStackTraceAction","locale","toast","autoClose","closeOnClick","closeButton","draggable","toastId","API_ERROR_NOTIFICATION_ID","dependencies","errorComponent","ErrorComponent","loadingComponent","LoadingComponent","createCatchedErrorJsonAction","some","browserStack","sourceStackTrace","stackTrace","join","possibleFailedObj","prev","catchedError","message","propertyIsEnumerable","call","defineProperty","enumerable","catchedStack","setTimeout","JSON","replaceAll","FEATURE","ENABLE_UNHANDLED_API_NOTIFCATION","isLoading","every","isLoaded","Component","mapDispatchToProps","connect","RoleUtil","_getUser","stateData","user","isInitialized","_getProject","projectID","projectList","hasProjects","getProjects","doesUserHaveAdminSupportAccess","admin","hasAdminGroup","doesUserHaveCoeRoleForProject","coe","hasCoeGroup","_doesUserHaveProjectRole","role","userRole","doesUserHavePPMDRoleForProject","JOB_TYPES","PPMD","doesUserHaveEngagementOwnerRoleForProject","ENGAGEMENT_OWNER","doesUserHaveObserverRoleForProject","OBSERVER","doesUserHavePreparerReviewerRoleForProject","PREPARER_REVIEWER","doesUserHaveAdminRoleForProject","ADMIN","merge","modelControlValues","processResponse","updates","model","removeWPFromElementPanelAction","updateWPFromElementPanelAction","updateTickmarkInElementPanelWithSocketPayloadAction","removeTickmarkFromElementPanelWithSocketPayloadAction","elementTickmarkListFromWebSocketPayloadAction","removeTickmarkWithSocketPayloadInBulk","elementTickmarkListLoadedWithoutResponse","elementDetailsLoading","elementDetailsLoaded","elementDetailsError","updateElementVerify","updateElementReview","updateElementUserFlag","updateElementOverrideSystemFlag","updateElementComfortAssignAnnotation","updateElementScaling","updateElementUnits","updateElementPeriod","updateElementEntity","elementFormulaListLoading","elementFormulaListLoaded","elementFormulaListError","deleteFormulaError","elementWorkpaperListLoading","elementWorkpaperListLoaded","elementWorkpaperListLoadedWithoutResponse","elementWorkpaperListError","elementWorkpaperListFromWebSocketPayloadAction","elementTickmarkListLoading","elementTickmarkListLoaded","elementTickmarkListError","selectCreatedElementAction","setElementHistoryLoading","setElementHistoryLoaded","setElementHistoryError","clearElementHistory","updateElementSectionName","updateElementPanelFromSocketPayload","removeElementFromFormulaTabFromSocketPayloadAction","addFormulaToFormulaListFromSocketPayloadAction","elementFormulaListLoadedWithoutResponse","removeWorkpaperFromElementPanelWithSocketPayload","elementComfortLetterListLoading","elementComfortLetterListLoaded","elementComfortLetterListLoadedWithoutResponse","elementComfortLetterListError","initElementPanel","showElementPanelAction","fetchSelectedElementDetails","isElementLocated","getElementHightlightState","clearBatchSelectedElementsAction","statement","getElementDetailsWithoutLoading","getElementFormulas","getElementInternalReference","getElementWorkpapers","getElementTickmarks","comfortLetter","getElementComfortLetters","getElementsListByElementIds","getFormulasForElementRequest","getElementFormulasWithoutLoading","socketModel","sockets","statementSocket","socketHasBeenDisconnected","_updateElementDetailsInStoreAndElementCache","_updateStatementSummaryElements","fetchStatementSummaryElements","updateVerify","getHistoryForElementPanel","updateReviewed","reviewed","updateUserFlag","userFlag","updateOverrideSystemFlag","systemFlag","updateComfortAssignAnnotation","comfortAssignVal","selectedElementPanelAnnotationsTab","storeData","updateElementRequest","ELEMENT_ANNOTATIONS_TABS","fetchSuggestedListed","updateCacheWithMostRecentElementChanges","updateElementsSearchByIds","updateOrCreateEntity","entity","updateScaling","scaling","updateUnits","units","updatePeriod","period","hideElementPanel","hideElementPanelAction","cancelCopyFormula","deleteFormulaFromList","formulaId","creationType","deleteFormulaRequest","updateElementAnnotationDetails","getWorkpapersForElementRequest","getElementWorkpapersAndUpdateElementCache","updatedStoreData","updatedElementWPList","workpaperList","hasElement","updatedElementForCache","setElementAnnotations","workpaperReferenceNumberList","workpapers","workpaper","referenceNumber","updateElementInCacheAction","getElementWorkpapersAndUpdateElementCacheWithParameters","isInteger","editWorkpaperDetailsAction","updateWorkpaperRequest","updatedWorkpaper","wpRefId","workpaperRefId","updateWorkpaperWithSocketPayloadAction","detachElementWorkpaper","detachElementWorkpaperRequest","workpaperId","unlinkElementFromElementsMap","getElementTickmarksWithoutLoading","getElementTickmarksRequest","getElementComfortLettersWithoutLoading","getComfortLetterForElementRequest","getElementTickmarksAndUpdateElementCache","isElementFromElementPanel","openedPanel","tickmarkList","tickmarks","sort","b","noteOrdinal","rawResponse","setElementTickmarkAnnotations","tickmark","resultTickmark","currentTickmark","getElementComfortLettersAndUpdateElementCache","comfortLetterList","comfortLetters","comfortLetterCreatedDate","localeCompare","elementAnnotations","comfortLetterlabelList","comfortLabel","customLabel","setElementComfortLetterAnnotations","comfortLetterLabelList","isArray","attachComfortLetterAction","attachComfortLetterToElementRequest","comfortLetterId","linkElementInComfortLetterElementsMapAndUpdateCountAction","detachComfortLetterAction","detachComfortLetterToElementRequest","unlinkElementInComfortLetterElementsMapAndUpdateCountAction","attachTickmarkToElement","attachTickmarkToElementRequest","tickmarkId","fetchTickmarkListForRevisionWithoutLoading","fetchElementsFromTickmark","detachTickmarkFromElement","internalReference","detachTickmarkFromElementRequest","excludeElementFromElementsMapAction","details","getInternalReferenceWithoutLoading","excludeElement","excludeElementFromElementListRequest","removeElementFromElementsMap","excludeElementFromTickmarkElementsMap","getHistoryForElementRequest","updateWorkpaperElementsMap","updateTickmarkElementsMap","updateElementDetailsFromLeftPanel","elementsArray","updateWorkpaperElementsMapFromArray","updateTickmarkElementsMapFromArray","updateComfortLettersElementsMapArray","selectElementCreated","OPENED","DATA_GRID_ROW_HEIGHT","DataGridConstants","DataGridRow","_rowClassNames","rowKey","columns","rowData","onRowClick","onRowCheckboxSelect","isRowSelected","onDropdownColumnSelect","shouldDisableRow","primaryKeyColumn","Array","classnames","_disabled","DATA_GRID_BLOCK","style","minHeight","onKeyDown","keyCode","SPACEBAR_KEY_CODE","preventDefault","ARROW_KEY_DOWN_CODE","focusNextMenuItem","ARROW_KEY_UP_CODE","focusPrevMenuItem","tabIndex","colModel","colIndex","formatter","onSelect","_extends","assign","target","i","arguments","source","prototype","hasOwnProperty","apply","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","_ref2","createElement","fillRule","clipRule","d","fill","_ref","svgRef","viewBox","ForwardRef","DataGridFilter","columnKey","filterInput","showFilterPopup","isFilterActive","onFilterInputChange","onFilterInputClear","onFilterInputApply","onFilterClick","onCloseFilterPopup","inputValue","useOutsideClick","popUpContainerRef","placeholder","onChange","isValid","disableAutoComplete","showSearchButton","SPECIAL_COLUMNS_LIST","SPECIAL_COLUMNS","DataGridColumnsHeader","onSortClick","tableId","onHeaderCheckboxSelect","canSelectMoreThenOneRow","headerChecked","_setHeaderChecked","headIndex","checkbox","checked","header","content","getIcon","sortable","filterable","_displayHeader","DATA_GRID_ROW_HEIGHT_MAX","ROWS_AMOUNT","StaticOrDynamicWrapper","dataModel","DataGridDataApi","apiModel","DataGrid","_handleRowSelect","rowDataId","selectedRows","_handleHeaderCheckboxSelect","rowItems","checkedRows","row","_shouldShowSrollbar","scrollable","numberOfVisibleRows","_getNumVisibleRows","rowClassnames","NoResultsComponent","sortColumn","listScroll","useVirtualizedList","virtualizedListFooter","virtualizedListDisableScrollCallback","virtualizedListRef","totalRows","executeScrollImmediately","statementsListSize","rowsAmount","maxHeight","itemHeight","itemList","onScrollEnd","renderFooter","disableScrollCallback","renderItem","rowIndex","STATEMENT_CONTENT_TABS","STATEMENT","TabModel","intlTitle","SPLIT","SCALE_ALTERATION","STATEMENT_ELEMENT_ID_PREFIX","STATEMENT_LEFT_ELEMENT_ID_PREFIX","STATEMENT_SECTION_ID_PREFIX","STATEMENT_PSEUDO_ELEMENT_ID_PREFIX","REACT_SECTION_ID_PREFIX","OCR_SECTION_ID","OCR_CONTAINER_BLOCK","STATEMENT_CONTENT_PANEL_ZOOM_BLOCK","STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK","SIDE_BY_SIDE_VIEW_RIGHT_BLOCK","SIDE_BY_SIDE_VIEW_LEFT_BLOCK","LEFT_VIEW_DOCUMENT_ID","RIGHT_VIEW_DOCUMENT_ID","SIDE_BY_SIDE_VIEW_OCR_COMBINATION_STATEMENT","SIDE_BY_SIDE_VIEW_LEGACY_COMBINATION_STATEMENT","REPORT_PREVIEW_PAGE_HTML_CONTAINER_ID","REACT_LEFT_STATEMENT_SECTION_ID_PREFIX","CONTENT_SEARCH_HIGHLIGHT_CLASS","EXPORT_PAGE_SIZE_ID","LETTER","LEGAL","TABLOID","LEDGER","A4","A3","A2","EXPORT_PAGE_SIZE_OBJECT","1","2","3","4","5","6","7","EXPORT_PAGE_ORIENTATION_PORTRAIT","panel","elementDetailsId","COMPLETED","releaseDate","Date","NOTIFICATION_TYPE","SUCCESS","FAILURE","PROCESSED","getReadOnlyBannerId","workflowsMap","isPendingApproval","isWrappedUp","isSoftDeleted","statementIsOldRevisions","statementHasProcessingRevision","downloadReportNotification","reportType","notificationType","pauseOnHover","success","downloadButton","showDownloadTabInsideExport","getDownloadDataExceptFailed","reportList","downloadObj","downloadStatus","REPORT_DOWNLOAD_PROCESSED","REPORT_DOWNLOAD_PROCESSING","getListOfProcessedAndNotDownloadedReports","userDownloadedReportStatus","getExportReportType","REPORT_TYPES","ELEMENT_REPORT","CLIENT_NOTES","BUILD_CUSTOMIZED_REPORT","AUDIT_TRAIL_REPORT","COMFORT_LETTER_REPORT","downloadReportFromGuidApiSelector","fileName","storageGuid","downloadElementReportFromGuid","reportId","apiResponse","downloadReportFromGuid","warn","setSideBySideViewParams","selectedStatementRevision","statementProcessType","readOnly","documentProcessType","getUserNameByUserId","projectUsersList","userName","users","preferredFullName","getUserNameByUserData","usersData","getUserNameByUserDataObject","userDataObject","getConfigForBatchUpdateFromSessionStore","parse","sessionStorage","getItem","SESSION_STORAGE_KEY_FOR_BATCH_UPDATE_CONFIG","getMaxElementForBatchUpdateLimit","bacthConfigObject","elementBatch","MAX_ELEMENTS_FOR_BATCH","fetchAndUpdateBatchLimit","batchConfigResponse","getConfigForBatchUpdateLimitRequest","batchConfigData","setItem","getSystemUserOrUserNameByUserId","entry","changedBy","changedByName","hasComfortLetterExistInBatchUpdate","selectedComfortLetterList","isStatementExistsInPinnedDetails","pinnedDetails","pinnedStatements","shouldRestrictAutomaticIdentifier","processedDate","isElementHasAnnotation","getWebsocketElementsForCalloutChange","webSocketPayload","webSocketPayloadMap","acc","curr","prevElementData","newElementData","prevElement","setLoadedFromElementData","newElement","isIncluded","hasFootedFormula","hasRecalcFormula","hasCrossFootedFormula","internalReferenceGroupName","isElementAnnotationChanged","getSectionNameBySectionId","sectionName","statementOCRNavigation","navigationData","shouldShowOptionsInOmniaFileShareModal","currentDate","getElementDataFromElementCache","MODAL_CLOSE_ICON_ID","Modal","_preventBodyScroll","querySelector","classList","add","_restoreBodyScroll","remove","_handleClose","_userClickedOutside","modalRef","contains","ESC_KEY_CODE","onClose","createRef","primaryButtonRef","focus","removeEventListener","primaryModalButton","secondaryModalButton","tertiaryModalButton","primaryDeleteModalButton","stepNumber","totalSteps","_hasButtons","downloadFile","headers","n","replace","trim","contentType","blob","Blob","FileSaver","saveAs","getStatementIdUtil","DATE_FORMATS","YEAR","MONTH_DAY_YEAR","MONTH_DAY_YEAR_TIME","HOURS_MINUTES","YEAR_MONTH_DAY","YEAR_MONTH_DAY_TIME","DAY_MONTH_YEAR","DAY_MONTH_YEAR_TIME","button","clrButton","dateInput","arrowIcons","DatePicker","calendar","directionIcon","ARROW_ICON_SIZE","CALENDAR_ICON_SIZE","CLEAR_ICON_SIZE","months","8","9","10","11","12","DateFormatRegex","exp","weekDays","checkboxClassName","checkboxInputClassName","errorText","alt","masterChecked","needsMultilineLabel","renderCheckbox","stopPropagation","htmlFor","toolTipID","_ref3","stroke","strokeWidth","transform","x","y","BANNER_TYPES","INFORMATION","SECONDARY_INFORMATION","GUIDANCE","WARNING","ERROR","BANNER_BLOCK","BANNER_ICON_SIZE","Banner","getBannerTypeIcon","bannerCopy","isInternationalized","isInteractive","_bannerIntlData","POST_BATCH","SELECTED_FORMULA_ROW","HOVERED_FROM_FORMULA","SELECTED_FOR_COPY_FORMULA","FORMULA_PASTE_SUCCESS","FORMULA_PASTE_FAILURE","ELEMENT_MAP_SUCCESS","ELEMENT_MAP_FAILURE","ANNOTATION_BASE_BLOCK","hoverCopyFormulaDisabledTooltip","ANNOTATION_DISPLAY_FUNCTIONS","flagged","getElementFlaggedIcon","currLeftPanel","customCSS","hasWorkpapers","status","getElementStatusIcon","internalRef","hasInternalReferenceGroup","isInternalRefFlagged","hasTickmarks","tickmarkText","hasTickmarkText","formula","FORMULA_ANNOTATION_BLOCK","hasFormula","hasFootedFormulaFlagged","hasCrossFootedFormulaFlagged","hasRecalcFormulaFlagged","hasComfortLetters","elementFormula","formulaContent","entries","method","CONTENT_HIGHLIGHT_MODES","ADD_ELEMENT","ADD_NAVIGATION","mergeProps","constructor","menuOptionVariable","hideRightPanelAction","hideLeftPanelAction","showNotesPanelAction","hideNotesPanelAction","showBatchPanelAction","hideBatchPanelAction","hideStatementNavPanelAction","showTickmarkPanelAction","hideTickmarkPanelAction","showComparePanelAction","hideComparePanelAction","showExportPanelAction","showCustomMenuPanelAction","hideCustomMenuPanelAction","hideExportPanelAction","showWorkPaperPanelAction","hideWorkPaperPanelAction","showChatBotPanelAction","hideChatBotPanelAction","showAuditChecklistPanelAction","hideAuditChecklistPanelAction","showComfortAnnotationPanelAction","hideComfortAnnotationPanelAction","toggleWorkPaperPanel","toggleExportPanel","subTab","toggleSubPanelWithinExport","toggleNotesPanel","toggleTickmarkPanel","toggleComparePanel","toggleStatementNavPanel","toggleCustomMenuPanel","toggleAuditChecklistPanel","toggleComfortAnnotationPanel","toggleChatBotPanel","Permissions","Project","canEdit","RolesUtil","canSoftDelete","canRestore","canPermanentlyDelete","canEnableLegalHold","canDisableLegalHold","canEnableSupportTeamAccess","canEnableTechSupportAccess","canDisableSupportTeamAccess","canDisableTechSupportAccess","canEnableCoeTeamAccess","canDisableCoeTeamAccess","canManageUsers","Statement","canCreate","canUploadRevision","canChangeContent","canManageLegalHold","canSeeDisplayValueOfModifiedStatement","canRestoreSoftDeleted","canApproveWrapUp","canSubmmitForWrapUpApproval","Element","canEditElement","WorkpaperReference","canEditWorkpaperRef","Tickmark","canEditTickmark","Formula","canEditFormula","InternalReference","canEditInternalRef","Omnia","canEditOmniaEngagements","canShareFile","Note","canManageNotes","canManageCoeNotesType","Section","canReviewSection","canAssignSection","AuditChecklistPermissions","canModifyChecklist","SideBySideStatementViewPermissions","canSelectElement","formatTieoutSelectorForApi","selector","NOTE_TYPES","CLIENT","short","intlId","NOTE_STATUS_TYPES","OPEN","NOTE_PRIORITY_TYPES","NORMAL","HIGH","note_type_options_array","selectedProjectId","client","observer","note_type_options","OPEN_NOTE_TOOLTIP","noteId","CLOSED_NOTE_TOOLTIP","PRIORITY_HIGH_NOTE_TOOLTIP","PRIORITY_NORMAL_NOTE_TOOLTIP","DELETE_NOTE_TOOLTIP","GHOST_NOTE_TOOLTIP","REPLY_NOTE_TOOLTIP","EDIT_NOTE_TOOLTIP","DELETE_NOTE_REPLY_TOOLTIP","getNoteStatusIcon","iconProps","notesCursor","isHighPriority","isClosed","closedPriorityClassName","getNoteStatusColor","FILTER_STATUS","FILTER_TYPE","FILTER_PRIORITY","FILTER_GHOST","FILTER_USER","FILTER_CREATED_BY","FILTER_REPLIED_BY","FILTER_HEADING","FILTER_CREATED_OR_REPLIED","FILTER_MENTIONED","ResponsiveLinesEllipsis","responsiveHOC","LinesEllipsis","BREAK_LINE_AT_FIRST_OVERFLOW_LETTER","wordBreak","MultiLineEllipsis","maxLines","tooltipPosition","spaceThresholdToBreakWord","tooltipClassName","showTooltip","setShowTooltip","formattMessage","maxLine","onReflow","clamped","basedOn","selected","tooltipEnabled","EMPTY_STRING","LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER","TIME_TO_LIVE_FOR_LOCALE_LANGUAGE_JSON","ONE_HOUR_IN_MS","fireTieoutEventForLanguageUpdate","userUpdatedLanguageEvent","Event","dispatchEvent","getKeyForLocale","updateLocaleMessageInStorage","localeMessagesWithTTL","localStorage","StorageEvent","getMessagesForLocale","clearLocaleMessagesFromLocalStorage","removeItem","getTranslationByKey","messages","enMessages","checkIfStringContainsOnlySpaces","setElementFilters","setElementSearchResultsLoading","setElementSearchResultsLoaded","setElementSearchUpdateResultsLoaded","setElementSearchRemoveElementsLoaded","setElementSearchResultsError","emptyElementSearchResults","clearElementSearchResults","clearElementFilters","setElementSearchResults","setSelectedElementResult","updateElementFilterFromSocketPayloadAction","showElementSearchRefreshButtonAction","setBatchSelectedItemsIdsAction","removeIdFromBatchSelectedItemsAction","addIdToBatchSelectedItemsAction","_elementFilters","setPageParams","searchStatementElementsRequest","resetPagination","firstElement","scrollElementIntoView","updateElementFilterFromSocketPayload","selectedTab","elementSearchResults","hasElements","getUpdatedElementsByIdsRequest","total","searchElementsNextPage","setNextPage","getPageParams","searchedElements","selectedIndex","clearStatementNavElementTab","FlyoutHeader","enableClose","enableBack","onBack","CLOSE_ICON_DIMENSION","PureComponent","FlyoutFooter","FlyoutPanelContent","Flyout","show","contentViewMode","flyoutRef","transitionProps","in","appear","timeout","bottomOffset","contentFullMode","CSSTransition","bottom","initNotePanelFromSelectionAction","clearNoteSelectionAction","notesListLoading","notesListLoaded","notesListError","notesListLoadedWithoutReponse","selectedNoteLoadingAction","selectedNoteLoadedAction","selectedNoteErrorAction","removeNoteFilterAction","updateNoteFilterAction","clearAllNoteFiltersAction","applyQuickFilterAction","applyNoteFilterAction","deleteNoteWithWebsocketPayload","addNoteWithWebsocketPayload","updateNoteWithWebsocketPayload","changeIsNewPropertyFromSelectedNote","setPreviousNoteBody","setAssignedToMe","addAdditionalDetailsToNoteList","applyNoteFilter","updatedFilters","userFilterCreated","userFilterReplied","selectedSegments","selectedUsersCreatedAndRepliedUsers","userFilterMentionedUsers","applyQuickFilter","filterVal","filterType","removeNoteFilter","createdOrRepliedUsers","clearAllNoteFilters","updateNoteFilterList","initCreateNoteFromSelection","fetchTheListOfNotes","fetchNoteListWithoutLoading","getNotesByRevisionRequest","sectionCacheData","fetchNotesListAndApplyFilter","selectNoteFromContentPanel","pseudoElementId","hasElementId","getNoteByRevisionAndElementIdRequest","getNoteByRevisionAndPseudoElementIdRequest","handleNoteCreationSuccess","addNoteSelection","fetchNotesBySectionOCR","withoutLoading","fetchStatementSummaryNotes","notesList","notes","isNew","updateNoteAttribute","newNoteModel","updateNoteRequest","noteModel","editNote","EditNoteRequest","includeEmailListAfterNoteEdit","sendEmailTo","sendEmailToTaggedUsersRequest","emailRequestBody","createOrDeleteNoteReply","updateNoteReplyRequest","includeEmailListAfterNoteReply","deleteNote","deleteNoteRequest","Dropdown","isKebab","isOpen","onBlur","setWrapperRef","required","wrapperRef","toggleDrawer","onClickFormItem","menuClassName","usePortalMenu","hideDropDownArrow","hideCheckmarks","centerMenuDisplay","borderless","containerRef","iconConfig","isMultiselect","showCheckbox","isMultiselectDisplayValue","prevOpen","usePrevious","useEffect","selection","usePortal","KebabDropdown","DrawerActionHandler","polygonInPixel","internalVerified","flagUser","flagOverride","comfortAssign","UNIT_OPTIONS_MAP","unitsId","SCALING_OPTIONS_MAP","scalingId","periodType","fiscalYear","flagInternalRef","included","irGroupName","sectionFullName","sectionname","ignoreSystemFlag","flagFootedFormula","isSystemOverrideFlagged","flagRecalcFormula","flagCrossFootedFormula","selectedElement","display","isUserFlagged","isFormulaFlagged","isReviewed","isFlagged","isVerified","term","highlightTermInString","updatedElementAnnotations","str","escapedTerm","RegExp","payload","columnNum","amount","significantDigits","entityDetails","polygon","previewSequenceID","ApiModel","carryForwardStatus","clientNotesClosed","clientNotesClosedList","clientNotesOpen","clientNotesOpenList","formulaCell","internalNotesClosed","internalNotesClosedList","internalNotesOpen","internalNotesOpenList","lastModifiedDate","order","orderNum","periodToPeriod","rolloverStatus","rowNum","signFlag","singleCelled","tag","tickmarkCell","wpReference","handleActions","setProjectUsersListLoaded","setProjectUsersListLoading","setLoading","setProjectUsersListError","setError","ProjectUsersList","currentUserLoading","currentUserError","currentUserLoaded","setUserHomeGeo","geoCode","setHomeGeo","CurrentUser","FeatureInfo","geo","featureConfig","carryForwardMetaDataEnabled","techSupportStatementAccessEnabled","ocrEnabled","chatBotFeature","chatbotEnabled","featureInfoLoading","featureInfo","featureInfoLoaded","featureInfoError","userAuthLoading","authUser","userAuthError","userAuthLoaded","userAuth401Error","set401Error","AuthUser","clearProjectList","ProjectList","projectListLoading","projectListError","projectListLoaded","softDeleteProjectError","restoreDeletedProjectError","permanentlyDeleteProjectError","setGeoToFilterProjectList","setAppliedSearchTermToFilterProjectList","setSearchTermToFilterProjectList","clearAppliedSearchTermToFilterProjectList","clearSearchTermToFilterProjectList","setMergeSelectedProjectWithProjectList","mergeSelectedProjectWithProjectList","pinnedDetailsLoading","pinnedDetailsError","pinnedDetailsLoaded","updatePinnedDetails","addNewPinnedItem","removePinnedDetails","removingPinnedItem","PinnedDetials","setLocale","ReportPreviewPage","selectedElementId","isClickedOnReport","BaseModel","setSelectedElementDetails","reportPreviewPage","clearReportPreviewPageData","selectedProjectLoading","selectedProjectLoaded","selectedProjectError","clearSelectedProject","ProjectApi","setUpdatedLegalHoldForSelectedProject","updateLegalHoldForSelectedProject","setSelectedProjectId","DEFAULT_SELECTED_PROJECT_ID","clearStatementList","statementList","StatementList","statementListLoading","statementListError","statementListLoaded","softDeleteCurrentRevisionError","softDeleteAllRevisionsError","permanentlyDeleteCurrentRevisionError","permanentlyDeleteAllRevisionsError","navigateToStatementError","clearStatementWorkflows","WorkflowsMap","statementWorkflowsLoading","statementWorkflowsError","statementWorkflowsLoaded","permanentlyDeleteWorkflowRevisionError","retryFailedDocumentUploadError","clearProjectIdWorkflowExpanded","setProjectIdWorkflowExpanded","SectionIdList","sectionCache","mergeSectionsLoading","mergeSectionsLoaded","mergeSectionsLoadedWithoutResponse","clearSectionContentFromMap","clearSectionImageContentFromMap","SectionCache","sectionOCRImageStatementContentLoaded","mergeOCRSectionLoaded","sectionOCRImageStatementContentError","clearLeftSectionContentWithIdsFromCache","LeftSectionCache","clearLeftSectionImageContentFromMap","leftSectionOCRImageStatementContentLoaded","leftSectionOCRImageStatementContentError","sectionOCRDataSegmentsStatementContentLoaded","mergeOCRSectionDataLoaded","sectionOCRDataSegmentsStatementContentError","clearSectionOCRContentFromMap","SectionCacheOCR","leftSectionCache","leftSectionOCRDataSegmentsStatementContentLoaded","leftSectionOCRDataSegmentsStatementContentError","clearLeftSectionOCRContentFromMap","LeftSectionCacheOCR","currentBlacklineViewChangesLoading","currentBlacklineCache","setSectionLoading","currentBlacklineViewChangesLoaded","setSectionLoaded","currentBlacklineViewChangesError","setSectionError","resetCurrentBlacklineCache","BlacklineCache","clearCurrentBlacklineContentWithIdsFromCache","clearSectionBySectionIds","previousBlacklineViewChangesLoading","leftBlacklineCache","previousBlacklineViewChangesLoaded","previousBlacklineViewChangesError","resetPreviousBlacklineCache","LeftBlacklineCache","clearPreviousBlacklineContentWithIdsFromCache","navigationDataLoading","ocrnavigation","navigationDataLoaded","navigationDataError","OCRNavigationModel","leftNavigationDataLoading","leftNavigationDataLoaded","leftNavigationDataError","SectionInViewMap","newSet","setLeftSectionInViewStatementContent","clearLeftSectionInViewStatementContent","periodList","PeriodList","SectionCacheMetrics","sectionMemorySize","timestamp","now","SectionCacheTracker","viewedSectionQueue","viewedSectionMetricsMap","_getUpdatedQueue","_getMergedMap","totalCacheMemorySize","sectionExists","newViewedSectionQueue","existingSection","setTimestamp","newViewedSectionMetricsMap","removedSectionIds","reducedTotalSize","cacheStillTooLarge","_sectionCurrentlyInView","has","wouldCacheBeUnderThreshold","newSize","init","setSectionTimestamp","addSectionToCache","initSection","updatePurgedCacheTracker","updateCache","updateLeftSectionViewedTimestamp","addLeftSectionToCache","updateLeftPurgedCacheTracker","incrementZoom","zoom","decrementZoom","resetZoom","Zoom","leftIncrementZoom","leftDecrementZoom","leftResetZoom","SideBySideViewZoom","rightIncrementZoom","rightDecrementZoom","rightResetZoom","StatementListFilters","setSort","STATEMENT_LIST_TABS","ACTIVE","DataGridSort","STATEMENT_LIST_SORT_COLUMN_KEYS","setCurrentStatementListTab","statementListFilters","setSelectedTab","setStatementListSort","initStatementListFilters","AdminModuleTabModel","setCurrentAdminModuleTab","adminModuleCurrentTab","addRevisionLoading","addRevisionLoaded","addRevisionError","setUploadedFilesAddRevision","setFile","setUploadedFilesAddRevisionError","setFileError","clearAddRevision","StatementForm","revisionLoading","revisionError","revisionLoaded","Revision","leftRevisionLoading","leftRevisionError","leftRevisionLoaded","StatementContentFilters","ContentCSSSelector","setVerify","setReview","setUserFlag","setOverrideSystemFlag","setComfortAssign","setUnit","setScaling","setEntity","setPeriod","setSectionName","updateElementDetailsFromSocket","clearSections","updateElement","updateElementCacheFromSocketPayloadAction","updateMultipleElements","updateMultipleElementsInCacheAction","ElementCache","setElementFromElementDetailsLoaded","updateElementCallout","updateLeftElementCacheByCalloutAction","entityList","EntityList","selectedElementMap","appendSelectedElement","deselectElement","deselectElementsFromArray","clearMap","appendSelectedElements","deallocateElement","replaceWithElements","replaceWithoutRemovingOld","addElementToBatchSelectionAction","removeElementFromBatchSelectionAction","removeElement","batchElementUpdateSuccessAction","SelectedElementMap","toggleBlacklineViewMode","clearBlacklineSelectedElementId","setBlacklineSelectedElementId","prevState","deleted","addedOrChanged","statementSummaryElementsLoading","elementSummary","statementSummaryElementsError","statementSummaryElementsLoaded","updateElementSummaryFromSocketPayloadAction","updateElementsSummaryFromSocketPayload","StatementSummaryElements","AnnotationPositionUpdate","displayPosition","ANNOTATION_POSITION_TYPES","annotationPosition","toLowerCase","setStatementAnnotationsPosition","setAnnotationPosition","resetAnnotationDisplayAndPositionOption","statementSummaryNotesLoading","noteSummary","statementSummaryNotesError","statementSummaryNotesLoaded","updateSummaryNotesFromWebsocket","updateSummaryFromWebsocket","StatementSummaryNotes","statementSummarySectionsLoading","sectionSummary","statementSummarySectionsError","statementSummarySectionsLoaded","updateSectionSummaryFromSocketPayloadAction","updateSectionSummaryFromSocketPayload","StatementSummarySections","setDisplayOptionAction","statementSumDisplayOption","setDisplayOption","setIsComfortLetterEnabledAction","setIsComfortLetterEnabled","StatementSummaryDisplayOptions","setContentHighlightModeDefault","setContentHighlightModeNotes","setContentHighlightModeAddElement","setContentHighlightModeAddNavigation","toggleBlacklineViewShowElementMode","blacklineViewShowElementMode","resetBlacklineViewShowElementMode","toggleBlacklineViewSyncScrollingMode","blacklineViewSyncScrollingMode","clearBlacklineViewSyncScrollingMode","setOcrCurrentViewPageNumber","store","setLeftOcrCurrentViewPageNumber","setElementSelectModeDefaultAction","setElementSelectModeBatchAction","setElementSelectModeBatchWithBannerAction","setElementSelectModeRangeAction","setElementSelectModeInternalReferenceAction","setElementSelectModeFormulaAction","setElementSelectModeCopyFormulaAction","setElementSelectModeSideBySideAction","initFormulaCreateAction","initFormulaCreate","setFormulaOperator","setOperator","updateRowOperator","setRowOperator","addFormulaRowOperator","addOperator","FORMULA_ROW_TYPES","OPERATOR","removeFormulaRowOperator","removeRowOperator","setFormulaManualNumber","setManualNumber","removeFormulaRowAction","removeRow","addManualFormulaRow","addManualRow","removeAllRowsAction","removeAllRows","setFormulaLoading","setFormulaLoaded","setFormulaResult","setFormulaError","setFormulaElementRowsLoaded","setElementRowsLoaded","clearFormulaAction","FormulaForm","setSelectedRowAction","setSelectedRow","setRoundingResultAction","setRoundingResultAndScale","setNewFormulaAction","setNewFormula","removeFormulaWithSocketPayloadAction","removeFormulaWithSocketPayload","formulaList","setLoadedWithoutResponse","removeElementFromFormulaTabFromSocketPayload","addFormulaToFormulaListFromSocketPayload","FormulaList","setInternalReferenceLoading","setInternalReferenceLoaded","setInternalReferenceLoadedWithoutPayload","setInternalReferenceError","updateInternalReferenceElementsFromSocketAction","updateInternalReferenceElementsFromSocket","updateInternalReferenceFromSocketAction","updateInternalReferenceFromSocket","clearInternalReferenceAction","internalReferenceSuggestedListLoading","internalReferenceSuggestedListLoaded","internalReferenceSuggestedListError","updateSuggestedIRElementsFromListFromSocketPayloadAction","updateSuggestedIRElementsFromListFromSocketPayload","updateSuggestedIRListFromSocketPayloadAction","updateSuggestedIRListFromSocketPayload","removeSuggestedIRFromSocketPayloadAction","removeSuggestedIRFromSocketPayload","InternalReferenceSuggestionList","setWorkpaperListFromWebSocketPayload","removeWPFromElementPanel","updateWPFromElementPanel","ElementWorkpaperList","ChangesSinceTracker","since","setElementChangesSinceAction","setSince","initFromRevision","removeTickmarkFromElementPanelWithSocketPayload","updateTickmarkInElementPanelWithSocketPayload","setTickmarkListFromWebSocketPayload","ElementTickmarkList","SelectedSectionModel","SECTION_HIGHLIGHT_STATES","isSelected","SelectedSectionMap","sectionMap","newMap","selectedSectionMap","appendSelectedSection","deselectSection","appendSelectedSections","replaceWithSections","deallocateSection","contentSectionMapLoading","contentSectionMapLoaded","contentSectionMapError","ContentSectionMap","leftContentSectionMapLoading","leftContentSectionMapLoaded","leftContentSectionMapError","appendElement","setBatchSelectedElementsLoading","appendBatchSelectedElementsLoaded","appendMultipleElementsLoaded","setBatchSelectedElementsError","BatchUpdateElementList","updateSelectedBatchElementsFromSocketAction","updateSelectedElementsMapFromSocket","removeBatchElementsFromSocketPayloadAction","removeBatchElementsFromSocketPayload","NoteSelection","updateNoteFilters","clearAllFilters","deleteNoteWithWebsocket","updateNoteWithWebsocket","updatePreviousNote","addAdditionalDetailsToNotesList","NotesList","addToCurrentSectionIds","currentSectionIds","removeFromCurrentSectionIds","addToLeftCurrentSectionIds","removeFromLeftCurrentSectionIds","tickmarkListLoading","tickmarkListLoaded","tickmarkListError","fetchElementsFromTickmarkAction","setElementList","updateTickmarkElementsMapAction","updateTickmarkElementsMapFromArrayAction","clearTickmarkElementsAction","clearElementList","removeTickmarkFromElementsMapAction","removeTickmarkFromElementsMap","removeElementFromTickmarkElementsMapWithSocketPayloadAction","removeElementFromTickmarkElementsMapWithSocketPayload","addTickmarkToDeletedArrayAction","addTickmarkToDeletedArray","deleteTickmarkWithSocketPayloadAction","deleteTickmarkWithSocketPayload","updateTickmarkWithSocketPayloadAction","updateTickmarkWithSocketPayload","addTickmarkToListAction","addTickmarkToList","unlinkTickmarkFromElementWithWebsocket","TickmarkListModel","comfortAnnotationListLoading","comfortAnnotationList","comfortAnnotationListLoaded","comfortAnnotationListError","unlinkElementFromElementsMapAndUpdateCount","linkElementFromElementsMapAndUpdateCount","removeElementFromComfortLetterElementsWithSocketPayloadAction","removeElementFromComfortLetterElementsMapWithSocketPayload","fetchElementsFromComfortAnnotationAction","setElementsForComfortLetterId","updateComfortLetterElementsMapFromArrayAction","updateComfortLetterElementsMapFromArray","ComfortLetterList","init_data","sectionDifferenceMap","elementMap","missingElements","addedElements","changedElements","unchangedElements","CompareStats","hasData","changedCount","addedCount","deletedCount","unChangedCount","comparePanelLoading","compareStatesModel","comparePanelLoaded","comparePanelError","CompareStatesModel","workpaperToolkitListLoading","workpaperToolkitListLoaded","workpaperToolkitListError","fetchElementsFromWorkpaperAction","clearWorkpaperElementsAction","updateWorkpaperElementsMapAction","updateWorkpaperElementsMapFromArrayAction","removeElementsFromElementsMapWithSocketPayloadAction","removeElementsFromElementsMapWithSocketPayload","removeWorkpaperFromElementsMapAction","removeWorkpaperFromElementsMap","unlinkElementFromElementsMapAction","addWorkpaperToDeletedArrayAction","addWorkpaperToDeletedArray","removeElementFromElementsMapAction","addWorkpaperToListAction","addWorkpaperToList","unlinkWorkpaperFromElementWithWebsocketPayload","unlinkWorkpaperFromElementWithWebsocket","updateWorkpaperWithSocketPayload","deleteWorkpaperWithSocketPayloadAction","deleteWorkpaperWithSocketPayload","WorkpaperToolkitListPanel","SectionReviewHistory","sectionReviewHistory","updatedSectionHistory","unshift","mergeData","newHistory","fetchSectionReviewsHistoryLoaded","sectionHistory","appendSectionReviewHistory","fetchSectionReviewsHistoryLoading","fetchSectionReviewsHistoryError","fetchSectionAssignmentsLoadedAction","assignments","fetchSectionAssignmentsLoadingAction","fetchSectionAssignmentsErrorAction","replaceNewWithSocketData","updateSectionAssignmentInBulkFromSocket","SectionAssignments","fetchSectionAssignmentsListLoaded","SectionAssignmentsList","fetchSectionAssignmentsListError","updateSectionAssignmentListFromSocket","updateSectionAssignmentListForBulkAssignFromSocket","updateSectionAssignmentListForBulkUnAssignFromSocket","selectedStatementLoading","selectedStatementLoaded","clearSelectedStatement","SelectedStatement","ChatBot","chatBotPushIndexLoading","chatbot","chatBotPushIndexLoaded","chatBotPushIndexError","leftSelectedStatementLoading","leftSelectedStatementLoaded","leftSelectedStatementError","setSourceStatementParams","clearSourceStatementParams","SourceStatementParams","annotationsList","SideBySideViewAnnotations","isWorkpaperReferenceMapping","isStatusMapping","isTickmarkMapping","isPreviousYearMapping","isPreviousQuarterMapping","setAnnotationMapping","setAnnotationsMapping","resetSideBySideViewAnnotations","statementCreationPageDataLoading","statementCreationPageData","statementCreationPageDataError","statementCreationPageDataLoaded","clearStatementCreationPageDataselected","StatementCreationPageData","body","closedBy","closedByName","closedDate","elementDisplay","insideSibling","noteDate","noteNumber","notePriorityType","noteTaker","noteTakerName","noteType","replyFlag","revisionNumber","selectedText","siblingIndex","workflowStatus","setFromNoteListEntry","NoteApi","notesCacheSectionLoading","noteCache","notesCacheSectionLoaded","notesCacheSectionError","NoteCache","removeNoteFromCacheWithSocketPayloadAction","removeNoteFromCacheFromSocketPayload","updateNoteFromNoteCacheWithSocketPayloadAction","updateNoteFromCacheFromSocketpayload","leftNotesCacheSectionLoading","leftNotesCacheSectionLoaded","leftNotesCacheSectionError","search","omniaEngagementLoading","omniaEngagement","omniaEngagementLoaded","omniaEngagementError","OmniaEngagement","_","ElementFilters","setSelectedIndex","emptyElementList","updateElementList","updateElementListFromSocketPayload","removeFromElementList","ElementSearchResults","setShowElementSearchRefreshButton","setBatchSelectedItemsIds","addIdToBatchSelectedItemsIds","removeIdFromBatchSelectedItems","setTOCExpandAll","setTOCRefresh","setStatementNavigationRefresh","IsRefresh","toggleNavigationEditMode","navigationEditMode","elementHistory","ElementHistory","ElementDataParts","newElementDatapart","parser","DOMParser","doc","parseFromString","querySelectorAll","substring","actualElementId","substr","datapartId","dataPartsModel","updateDatapartElements","setContentFixedMode","ContentViewModes","setContentFullMode","contentSectionDetails","contentSection","fetchSectionReviewsLoaded","SectionReviewList","fetchSectionReviewsLoading","appendSectionToSectionReviewList","appendSectionReview","mergeSectionReviewToSectionReviewList","mergeSectionsReviewList","removeSectionReviewFromStore","removeSectionReview","removeBulkSectionReviewFromStore","removeBulkSectionReview","fetchSectionReviewsError","CancelModal","openFormulaCancelModal","openInternalReferenceCancelModal","openNotePanelAfterConfirm","selectedNoteId","selectedPseudoNoteId","openSectionPanelAfterconfirm","selectedSectionId","toggleFormulaCancelModalAction","cancel","toggleFormulaCancelModal","toggleInternalReferenceCancelModalAction","toggleInternalReferenceCancelModal","openCancelModalAfterModalConfirmAction","openNotePanelAfterCancelConfirm","storeSelectedNoteIdAction","setSelectedNoteId","storeSelectedNotePseudoIdAction","setSelectedNotePseudoId","storeSelectedSectionIdAction","setSelectedSectionId","openSectionPanelAfterCancelConfirmAction","openSectionPanelAfterCancelConfirm","NOTIFICATION_EVENT_TYPES","ELEMENT_UPDATE","ELEMENT_ADD","ELEMENT_EXCLUDE","ELEMENT_SUMMARY","HEADING_SUMMARY","FORMULA_DELETED","FORMULA_SAVED","INTERNAL_REFERENCE_UPDATE","INTERNAL_REFERENCE_SUGGESTION_UPDATE","WORKPAPER_LINKED","WORKPAPER_UNLINKED","NOTE_DELETE","NOTE_ADD","NOTE_UPDATE","WORKPAPER_UPDATE","WORKPAPER_DELETED","USER_JOINED_REVISION_GROUP","USER_LEFT_REVISION_GROUP","HEADING_UPDATE","HEADING_REVIEW","HEADING_UNREVIEW","TICKMARK_UPDATE","TICKMARK_DELETE","ADD_SECTION_HEADING","HEADING_DELETE","TICKMARK_LINKED","TICKMARK_UNLINKED","WORKFLOW_STATUS","TOOLKIT_EXPORT_REPORT_STATUS","BULK_SECTION_ASSIGN","BULK_SECTION_UNASSIGN","BLACK_LINE_VIEW_GENERATED","STATEMENT_COPY_SUCCESSFUL","STATEMENT_COPY_FAILED","BULK_SECTION_REVIEW","BULK_SECTION_UNREVIEW","FORMULA_TYPE_CHANGED","getWebSocketPayload","webSocketEvent","isSignalRForSocketConnectionEnabled","getWebSocketNotificationType","notificationEventType","StatementSocketModel","config","SignalrClient","SocketClient","socketConnectionType","SOCKET_CONNECTION_TYPE","REVISION","on","onEventHandler","connection","stop","_closeSocketConnection","disconnect","router","formulaPanel","internalReferenceSuggestionList","internalReferencePanel","_elementUpdate","webSocketElementsData","_elementMap","elem","elementToFormulasObject","irElement","enableRefreshIconAction","isOCRStatement","fetchElementsBySectionOCR","formulaElementDtoList","from","Set","fetchWorkpaperListForRevisionWithoutLoading","fetchComfortAnnotationListForRevisionWithoutLoading","formulasIds","formulaIds","isDifferentElement","internalReferenceElements","fetchSuggestedListedWithoutLoading","attachedWorkpapers","elementEntities","addUserAfterValidatingIfIdExists","removeUserAction","workpaperIdSet","parentSpan","childSpanWithBorder","svgIcon","border","pseudoElements","outerHTML","innerHTML","webSocketPayloadModified","parentId","isTechnical","updatedBy","sectionReview","sectionAssignmentListPayload","userIds","date","createdDate","setHeadingAssignmentRefresh","attachedTickmark","tickmarkIdSet","size","requestedUser","downloadReportAction","payloadSectionIds","fetchStatementSummarySections","initStatementSocketClient","initStatementSignalrSocketClient","url","initialStatementSocketClientUrl","setSocketClient","setSocketDisconnectAction","setSocketDisconnect","stopSocketConnection","clearSocketClientInStore","setActiveUsersLoading","activeUsers","setActiveUsersLoaded","setActiveUsersError","addUserAction","addUser","removeUser","clearActiveUsersAction","ActiveUsers","sectionTreeListLoading","sectionTreeList","sectionTreeListLoaded","sectionTreeListError","setCreateSectionAction","setIsCreateSectionModalOpen","addNewSectionAction","addNewSectionByParentId","removeNewSectionAction","removeNewSection","clearSectionTreeListAction","SectionTreeList","setNewSectionIdAction","setNewSectionId","CopyFormulaResult","copiedFormulaId","copyFormulaStatus","setCopyFormulaResult","addFormulaResult","clearCopyFormulaResult","addElementToCopyFormulaSelectionAction","removeElementFromBatchSelection","setStatementWorkflowStepsLoading","statementWorkflowSteps","setStatementWorkflowStepsLoaded","setStatementWorkflowStepsError","StatementWorkflowStepsData","setCopiedFormula","clearCopiedFormula","setTableMatrix","tableMatrix","clearTableMatrix","clearApiErrorDataAction","apiError","clearErrorData","createApiErrorDataAction","updateErrorData","updateErrorStackTrace","updateCatchedErrorJson","ApiError","auditChecklistLoading","auditQuestionsChecklist","auditChecklistLoaded","auditChecklistError","auditChecklistSaveAnswer","updateChecklistData","AuditQuestionsChecklist","setMaintenacePageLoading","maintenancePageList","setMaintenacePageLoaded","setMaintenancePageError","AdminModuleMaintenanceList","countryManagercontainerListLoading","containerList","countryManagercontainerListLoaded","countryManagercontainerListError","clearAdminPageDataAction","ContainerForm","monitoringListLoading","monitoringList","monitoringListLoaded","setCountryOption","monitoringListError","clearMonitoringListLoaded","MonitoringForm","refresh","ProjectSocketModel","documentProcessWorkflowEntity","updatedWorkflowMap","selectedStatementsTab","getWorkflowsListData","workflow","isCompletedWorkFlowStep","documentProcessTypeEnum","updateSelectedProject","clientLegalHold","requestGetStatementList","withLoading","onCopyStatementSuccess","_isCopyErrorForWrongSourceProject","copyErrorNotificationForWrongSourceProject","onCopyStatementFailure","isProjectLevelConnection","PROJECT","initProjectSocketIOSocketClient","projectSocket","initProjectSignalrSocketClient","initialProjectSocketClientUrl","setProjectSocketClient","setProjectSocketDisconnectAction","setProjectSocketDisconnect","stopProjectSocketConnection","clearProjectSocketClientInStore","setDownloadData","downloadReportData","setDownloadListData","updateDownloadStatus","updateFlagUserDownloadedReportStatus","setDownloadDataLoaded","setDownloadDataLoading","setDownloadDataError","setReportIdLoading","setReportIdLoaded","setReportIdError","clearDownloadData","clear","ToolkitDownloadListData","ElementComfortLetterList","setAnnotationDisplayOption","AnnotationDisplayOptions","SideBySideViewElementMap","mapKeys","elementsList","apiFormatResponse","sourceElementId","targetElementId","elementStatus","existsingMapKey","sequenceNumber","lastMappedElementSequenceNumber","set","getMapKey","Map","sourceElementMapForId","getSourceElementMapByElementId","mapKey","targetElementMapForId","getTargetElementMapByElementId","sourceMap","targetElementMapKey","mapKeyToBeDeleted","deleteTargetMappingForMapKey","lastMappedElementDetails","pop","isSourceElementAlreadyMapped","isTargetElementAlreadyMapped","toBeDeletedSourceElementId","deleteElementMappingForSourceElementId","existingMapKey","updateMapKeyForSourceElement","newMapKey","shortid","generate","mapKeyOfFirstUnmappedTargetElement","isMappingAlreadyExistsForElementId","mapKeyForDeletingTargetElementId","updateMapKeyForTargetElement","targetArray","filteredTargetElementsByIdExists","mapRemainingTargetElementCount","sizeOfSourceMapping","sizeOfTargetMapping","setTargetStatementElementMap","sourceArray","setSourceSideBySideBatchElementMap","mapValue","setSourceStatementElementMapAction","setSourceStatementElementMap","setTargetStatementElementMapAction","setStatementSideBySideBatchElementsMap","setSourceStatementBatchElementsMap","clearElementsMap","leftSectionTreeListLoading","leftSectionTreeListLoaded","leftSectionTreeListError","setCreateleftSectionAction","addNewleftSectionAction","removeNewleftSectionAction","setNewleftSectionIdAction","replaceSelectedSectionsInLeftContentPanel","deallocateSelectedSectionsInLeftContentPanel","fetchLeftSectionReviewsLoaded","fetchLeftSectionReviewsError","StatementSummaryElementsDisplay","displayOption","displayElementDetailsOnStatementPage","setHideOrDisplayElements","statementSummaryElementsDisplay","setDisplayElementDetailsOnStatementPage","contentSearchResultLoading","contentSearchResult","contentSearchResultLoaded","contentSearchResultError","setContentSearchResultSelectedIndex","clearContentSearchResult","ContentSearchResults","showStatusAndFlagAction","hideStatusAndFlagAction","showElementIdAction","hideElementIdAction","disableRefreshIconAction","toggleSyncScrolling","syncScrollingMode","setSyncScrolling","resetSyncScrolling","setFirstElementVisibleInViewPort","resetFirstElementVisibleInViewPort","blacklineSourceGuidListLoading","blacklineList","blacklineSourceGuidListLoaded","blacklineSourceGuidListError","resetBlacklineGuidList","BlacklineGuidList","blacklineTargetGuidListLoading","blacklineTargetGuidListLoaded","blacklineTargetGuidListError","setSideBySideSyncScroll","SyncScrollIds","syncScrollIds","setSourceId","setTargetId","clearSourceId","history","combineReducers","activeUsersReducer","sectionTreeListReducer","currentUserReducer","featureInfoReducer","authUserReducer","projectUsersListReducer","projectListReducer","pinnedDetailsReducer","selectedProjectIdReducer","selectedProjectReducer","statementListReducer","statementListFiltersReducer","addRevisionReducer","statementSummary","statementSummaryElementsReducer","statementSummaryNotesReducer","sections","statementSummarySectionsReducer","displayOptions","statementSummaryDisplayOptionsReducer","annotationDisplayOptionsReducer","statementWorkflowsReducer","statementContentSectionIdListReducer","cache","statementContentSectionCacheReducer","ocrCache","statementContentOCRSectionCacheReducer","sectionCacheTrackerReducer","contentSectionMapReducer","blacklineCache","blacklineCacheReducer","elementCacheReducer","notesCache","notesCacheReducer","statementContentFilters","statementContentFiltersReducer","elementChangesSinceTracker","elementChangesSinceTrackerReducer","elementsDataparts","elementsDatapartsReducer","leftSectionIdList","leftStatementContentSectionIdListReducer","leftSectionsCache","leftCache","leftStatementContentSectionCacheReducer","leftOcrCache","leftStatementContentOCRSectionCacheReducer","leftTracker","leftSectionCacheTrackerReducer","leftContentSectionMap","leftContentSectionMapReducer","leftBlacklineCacheReducer","leftNotesCache","leftNotesCacheReducer","leftElementCacheReducer","leftElementsDataparts","leftElementsDatapartsReducer","leftSectionTreeList","leftSectionTreeListReducer","leftSelectedSection","leftStatementSelectedSectionReducer","leftSectionReviewsList","leftStatementSectionReviewsReducer","elementDetailsReducer","elementDetailsEntityListReducer","elementDetailsPeriodListReducer","formulaListReducer","internalReferenceReducer","elementWorkpaperListReducer","elementComfortLetterListReducer","elementTickmarkListReducer","elementHistoryReducer","formulaFormReducer","copyFormula","copiedFormula","copyformulaReducer","copyformulaTableMatrixReducer","copyFormulaResult","copyFormulaResultReducer","copyFormulaSelectedElement","copyFormulaSelected","internalReferenceSuggestionListReducer","batchPanel","batchElementList","selectedBatchElementsReducer","revisionReducer","leftRevisionReducer","selectedNoteReducer","addNoteSelectionReducer","notesListReducer","sectionDetailsReducer","sectionReviewList","sectionReviewsReducer","sectionAssignmentsList","sectionAssignmentsListReducer","sectionReviewHistoryReducers","sectionAssignments","sectionAssignmentReducer","tickmarkPanel","tickmarkListPanelReducer","comfortAnnotationPanel","comfortAnnotationListPanelReducer","comparePanel","allStats","compareStatsPanelReducer","toolkitExportPanel","downloadProgressData","downloadProgressToolkitReducer","omniaEngagementReducer","selectedStatementReducer","chatBot","chatBotReducer","leftSelectedStatement","leftSelectedStatementReducer","workpaperToolkit","workpaperToolkitListPanelReducer","apiErrorReducer","auditChecklistData","auditChecklistReducer","adminModuleTabReducer","adminModuleMaintenacePageData","adminModuleMaintenancePageReducer","countryManagerContainerList","countryManagerContainerListReducer","monitoringListReducer","sectionAssignmentHeadingRefresh","sectionAssignmentHeadingRefreshReducer","contentSearchResultReducer","blacklineSourceGuidList","BlacklineSourceGuidListReducer","blacklineTargetGuidList","BlacklineTargetGuidListReducer","localeReducer","sourceStatementParamsReducer","sideBySideElementMapReducer","sideBySideViewAnnotationsReducer","rightPanelControllerReducer","leftPanelControllerReducer","statementWorkflowStepsReducer","statementCreationPageDataReducer","ZoomReducer","leftZoom","leftZoomReducer","rightZoom","rightZoomReducer","statementContentSectionsInView","leftSectionsInView","leftStatementContentSectionsInView","currentSectionIdReducer","leftCurrentSectionIds","leftCurrentSectionIdReducer","selectedElementsReducer","leftSelectedElementsMap","leftSelectedElementsReducer","selectedSectionsMap","selectedSectionsReducer","contentHighlightSelector","statementContentSelectorToHighlightReducer","syncScrollIdsReducer","elementSelectModeReducer","highlightMode","contentHighlightModeReducer","blacklineViewModeReducer","blacklineViewShowElementModeReducer","blacklineViewSyncScrollingModeReducer","navigationEditModeReducer","contentViewModeReducer","ocrCurrentViewPageNumber","ocrCurrentViewPageNumberReducer","leftOcrCurrentViewPageNumber","leftOcrCurrentViewPageNumberReducer","sideBySideSyncScroll","sideBySideSyncScrollReducer","contentSearchReducer","navigatorElementFilterReducer","navigatorElementSearchResultsReducer","statementNavigationPanelReducer","TOCExpandAll","TOCExpandAllReducer","TOCRefresh","TOCRefreshReducer","showNavigationRefreshButton","statementOCRNavigationReducer","leftStatementOCRNavigation","leftStatementOCRNavigationReducer","highlightedElementId","highlightedElementReducer","blacklineHighlightedElementId","blacklineHighlightedElementReducer","cancelModal","cancelModalReducer","homepage","projectIdOfWorkflowToExpand","projectIdOfWorkflowToExpandReducer","reportPreviewPageReducer","previewPage","shouldShowStatusAndFlag","showStatusAndFlagReducer","shouldShowElementId","showElementIdReducer","shouldEnableRefreshIcon","enableRefreshIconReducer","isSyncScrollingEnabled","syncScrollReducer","visibleFirstElementFromTop","visibleFirstElementFromTopReducer","statementSocketReducer","projectSocketReducer","connectRouter","createBrowserHistory","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","configureStore","initialState","createStore","createRootReducer","applyMiddleware","routerMiddleware","thunkMiddleware","adobeAnalyticsMiddleware","FORMULA_MANUAL_NUMBER_REGEX","MATH_EXPRESSION_EVAL_INFINITY_RESULT","ROUND_NUMBER_ICON_WIDTH","ROUND_NUMBER_ICON_HEIGHT","FORMULA_ELEMENT_CARRY_FORWARD_STATUS_TYPES","NEW","UNCHANGED","CONTEXT_CHANGED","VALUE_CHANGED","MISSING","getOriginalComputedValueTooltip","lineBreak","FORMULA_OPERATOR_OPTIONS_MAP","FORMULA_OPERATOR_TYPE_OPTIONS","FORMULA_CREATION_TYPES","MANUAL","SYSTEM","AUTOMATION","UNKNOWN","FORMULA_TYPES","FORMULA_TYPES_MAP","NUMBER","FORMULA_ROW_TYPES_MAP","FORMULA_ROW_OPERATOR_OPTIONS_MAP","FORMULA_ROW_OPERATOR_OPTIONS","getResultDisplay","numberFormatId","numberIsInfinity","test","toString","resultString","unformattedResult","isResultNegative","SUPPORTED_NUMBER_LENGTH","splitResultString","formulaResult","getElementResultByNumberFormat","UNIT_TYPES","CURRENCY","PERCENTAGE","SHARES","rootCause","copyStatementError","isAuditClient","getStatementListRequest","apiParam","first","requestStatementListWithParams","_rectifySortForChangingTabs","requestStatementListForNewProject","newTab","currentSort","_newTabDeletedAndSortIsLastModified","DELETED","_newTabActiveAndSortIsDeletedDate","revisionDeletedDate","softDeleteCurrentRevision","sofDeleteCurrentRevisionRequest","softDeleteAllRevisions","softDeleteAllRevisionsRequest","permanentlyDeleteAllSoftDeletedRevisionsForStatement","permanentlyDeleteAllSoftDeletedRevisionsForStatementRequest","permanentlyDeleteRevision","permanentlyDeleteRevisionRequest","navigateToStatement","isNotReadOnlyStatement","isInArchivalFlow","latestRevision","hasBeenOpenedByUser","readStatement","setHasBeenOpenedByUser","editStatementRequest","uploadRevision","uploadRevisionRequest","getStatementWorkflowsWithoutLoading","exportWorkpaperStatement","pageSize","pageOrientation","exportWorkpaperStatementRequest","reportProcessingRequestAction","NOT_ACCEPTABLE","exportWorkpaperStatementFallback","exportElementReport","exportElementReportRequest","exportElementReportFallback","exportAuditTrail","exportAuditTrailRequest","exportAuditTrailFallback","exportComfortLetterReport","exportComfortLetterReportRequest","exportComfortLetterFallback","exportClientNotes","exportClientNotesRequest","exportClientNotesFallback","exportCustomReport","exportCustomParam","exportCustomReportRequest","exportCustomReportFallback","copyStatement","targetClientId","copyStatementRequest","exportWorkpaperStatementRequestFallback","exportElementReportRequestFallback","exportComfortLetterReportRequestFallback","exportAuditTrailRequestFallback","exportClientNotesRequestFallback","exportCustomReportRequestFallback","CURRENT_SELECTED_PROJECT_ID_SESSION_KEY","apiClient","undeterminedGeoKey","GEOS","geoKey","api","flags","authenticated","projectGeo","getGeo","getAPI","homeGeo","currentGeo","CURRENT_GEO","_createAPI","getAxiosInstance","globalApiRequestValidator","axios","create","baseURL","BASE_API_URL","createAuthContext","getAPIClient","interceptors","use","err","isErrorWithCreatingExistingWP","isReportFallbackMessage","isErrorForReportInFallbackMode","isErrorForDuplicateComfortLetterValidation","reject","globalApiErrorHandler","setProjectHeadersAction","getGeoForSelectedProjectId","getGeoForProjectId","getHomeGeo","IS_MENTIONED_FILTER","OBSERVER_TYPE_FILTER","NOTES_STATUS_OPTION","open","closed","NOTES_STATUS_OPTION_ARRAY","NOTES_TYPE_OPTION","NOTES_TYPE_OPTION_ARRAY","NOTES_PRIORITY_OPTION","priority","non_priority","NOTES_PRIORITY_OPTION_ARRAY","NOTES_GHOST_OPTION","yes","no","NOTES_GHOST_OPTION_ARRAY","NOTES_USER_OPTION","created_by","reviewed_by","is_mentioned","both","FILTER_CATEGORIES","HEADINGS","STATUS","TYPE","PRIORITY","GHOST","USER","AUTOMATION_CREATION_TYPE","automation","carryForward","getOCRElementStyleByElementStatus","isFlaggedAndReviewed","isFlaggedAndVerified","featureName","FEATURE_NAMES","OTHER_FEATURES","intlValues","formulaCount","internalReferenceCount","tickmarkCount","WORK_PAPER_REFERENCE","workpaperReferenceCount","COMFORT_LETTER","COMFORT_LETTER_FEATURE","comfortLetterCount","br","chunks","getDynamicElementAnnotationsTabs","getWorkpaperCount","getFormulaCount","getOtherElementsCount","getTickmarkCount","getComfortLetterCount","getReviewTooltip","getOverrideSystemFlagTooltip","hoverVerifyTooltip","disableComfortAssignTooltip","reviewInfoButtonTooltip","HISTORIC_ACTIONS","VERIFIED","UNVERIFIED","FLAGGED","UNFLAGGED","USER_FLAGGED","USER_UNFLAGGED","REVIEWED","UNREVIEWED","FLAG_OVERRIDE","REMOVE_FLAG_OVERRIDE","FORMULA_OVERRIDE","ANNOTATION_ATTACHED","ATTRIBUTE_MODIFIED","FORMULA_OPTIONS_MAP","FORMULA_OPTIONS","SelectedableElement","isCftEnabled","elementHasFormula","MAX_STATEMENT_FILE_SIZE","MAX_STATEMENT_NAME_LENGTH","SUPPORTED_STATEMENT_FILE_TYPES","getStatementSupportedFileTypes","pdfUploadEnabled","LEGAL_HOLD_TOOLTIP","ENABLE_COMFORT_LETTER_TOOLTIP","AUTO_IR_TOOLTIP","STATEMENT_TYPE_ID_MAP","TEN_K","TEN_Q","SIX_K","PRESS_RELEASE","TWENTY_F","FORTY_F","NCSR","PRIVATE_ANNUAL","PRIVATE_QUARTERLY","PROXY_STATEMENT","REGISTRATION_STATEMENT","INSURANCE_STATEMENT","IM_FUND_REPORT","AGENCY_REPORT","OTHER","GLOBAL_ANNUAL","GLOBAL_QUARTERLY","Label_Non_US_Filers","Label_US_Filers","DATE_FORMATS_TITLES_LIST","STATEMENT_TYPE_OPTIONS_MAP","STATEMENT_TYPE_OPTIONS","QUARTER_OPTIONS_MAP","QUARTER_OPTIONS","currentYear","moment","format","minus5Years","subtract","minus4Years","minus3Years","minus2Years","minus1Years","plus1Years","plus2Years","FISCAL_YEAR_OPTIONS_MAP","FISCAL_YEAR_OPTIONS","ACCOUNTING_BASIS_TYPES","ACCOUNTING_BASIS_OPTIONS_MAP","ACCOUNTING_BASIS_OPTIONS","REGISTRANT_TYPES","REGISTRANT_OPTIONS_MAP","REGISTRANT_OPTIONS","SCALING_TYPES","SCALING_OPTIONS","UNIT_OPTIONS","getProjectNameMenuOptions","filterLanguagesForLegacy","getLanguagesMenuOptions","languages","isPdfSelected","languageOptions","lang","option","languageCode","languageName","displayOrder","main","other","getLanguageOtherOption","defaultSelectedProject","CARRYFORWARD_COLUMNS","DataGridCheckboxColumn","DataGridColumn","colId","statementName","hasApprovalInitiated","periodEnding","Math","round","percentageCompleted","ENABLE_LEGAL_HOLD_TOOLTIP","DISABLE_LEGAL_HOLD_TOOLTIP","ENABLE_AUTO_IR_TOOLTIP","DISABLED_COMFORT_LETTER_TOOLTIP","getDateFormatMenuOptions","dateFormats","getNumberFormatMenuOptions","numberFormats","numb","formatKey","smoothScrollIntoCenterById","behavior","block","inline","smoothScrollIntoTopById","smoothScrollWithOffset","elementTop","offsetPosition","top","scrollTo","_scrollToSectionWithMutationObserver","mutationCallback","currentSelectorToScrollTo","sectionNodeId","__currentSelectorToScrollTo","__scrollToElementObserver","MutationObserver","observe","attributes","childList","subtree","immediateScrollToSectionWhenLoaded","__scrollToSectionObserver","mutationsList","mutation","addedNodes","parentNode","scrollTop","offsetTop","scrollLeftSectionIntoView","scrollSelectorIntoView","storeState","fullSelector","foundSelection","scrollToContent","newFoundSelecion","scrollOCRSelectorIntoView","elementNodeId","scrollElementIntoViewAlertOnMissing","missingElementCallback","res","scrollNoteIntoView","pseudoElementNodeId","scrollIntoViewForVirtualizedList","listId","getMostVisible","viewportHeight","innerHeight","max","visiblePx","getVisibleHeightPx","visible","absTop","abs","openCancelModalAfterModalConfirm","storeSelectedNoteId","storeSelectedNotePseudoId","convertUTCTimeStampToLocalTime","utcTime","utc","local","StatementStatusModel","desc","lname","intlIdentifier","cx","cy","r","STATEMENT_TYPE_MAP","STATEMENT_STATUS_ENUM","STATEMENT_STATUS_LABELS","IN_PROGRESS","PENDING_APPROVAL","ARCHIVED","APPROVAL_INITIATED","VIEW_REVISIONS_MODAL_TOOLTIP","VIEW_DELETED_REVISIONS_MODAL_TOOLTIP","DELETE_STATEMENT_OPTIONS","CURRENT","ALL","archiveDate","pinnedStatement","deletedBy","copyStatementPendingApprovalTooltip","copyStatementNoPermissionTooltip","copyStatementNoFailedWorkflow","copyStatementRevisionUpload","EDITED_STATEMENT_ADMIN_DISPLAY","displayText","PERCENT_VERIFIED_COLUMN","percentageComplete","percentVerified","STATEMENT_NAME_COLUMN","linkStatus","renderName","getStatementStatus","legalHold","STATEMENT_LIST_BLOCK","FISCAL_YEAR_COLUMN","_userCanSeeDisplayValueOfModifiedStatement","originalFiscalYearTooltip","originalFiscalYear","PERIOD_ENDING_COLUMN","tooltipText","originalPeriodEnding","originalPeriodEndingTooltip","STATEMENT_TYPE_COLUMN","statementTypeTooltipText","originalType","originalQuarterNumber","originalStatementTypeTooltip","quarter","originalQuarter","quarterNumber","REVISION_COLUMN","onRevisonClick","viewRevisionToolTip","displayIcon","PIN_COLUMN","pinnedDatetime","FilledPin","TARGET_ARCHIVE_DATE_COLUMN","startOf","diff","days","OMNIA_EXPORT_COLUMN","omExportStatus","documentState","omExportErrorInfo","omDocumentState","sentDate","sentBy","getStatementListColumns","softDeleteAllRevisionsAction","softDeleteLatestRevisionAction","addRevisionAction","navigateToEditStatement","onSubmitWrapUpClick","onApproveWrapUpClick","onPinClick","DataGridKebabColumn","getStatementListKebabOptions","dropdownId","getArchivedStatementListColumns","_userCanEdit","_statementHasProcessingRevisions","_statementIsPendingApproval","_statementHasFailedWorkflow","getWorkflowsByStatementId","w","isFailedWorkflowStep","_userCanCopyStatement","isImported","_statementIsImported","getDeletedStatementListColumns","permanentlyDeleteTooltip","restoreSoftDeletedTooltip","deleteAction","restoreAction","_canRestoreSoftDeleted","_canPermanentlyDelete","revisionLastModifiedDate","revisionLastModifiedByName","isLegalHoldSet","editTooltip","softDeleteTooltip","_canUploadRevision","_userCanSoftDelete","_userCanApproveWrapUp","_userCanSubmitForWrapUpApproval","disableduploadRevisionTooltip","revisionIsUploadingTooltip","revisionIsUploadingSubmitForWrapUpTooltip","wrapUpApproveTooltip","wrapUpApproveOnLegalHoldTooltip","wrapUpTooltip","archivalInitiatedDisableEditTooltip","shouldShowRevertToPreviousRevisionOption","wrapUpSubmissionUserId","toggleBlacklineViewModeAndRefetchSectionsInView","getBlacklineGuidDetailsAction","blackline_view_type","guidListLoading","guidListLoaded","guidListError","getBlacklineDetails","clearBlacklineDetails","COMFORT_ASSIGNED_FEATURE","SIDE_BY_SIDE_STATEMENT_ELEMENTS_MAP","CARRY_FORWARD_META_DATA_DISABLED","TECH_SUPPORT_STATEMENT_ACCESS_ENABLED","STATEMENT_PDF_UPLOAD_ENABLED","CHATBOT_ENABLED","updatedSelectedProjectFromIDWithoutLoading","getSelectedProjectRequest","projectDetails","initNewProjectDetailsActions","updateSelectedProjectFromIDIfDoesNotExists","isSelectedProjectInitialized","setSelectedProjectFromProjectList","projectListEntry","toProjectApiModel","projectGeoMapFromSession","trace","getElementFromCache","loadingAction","clearSelectedElementRangeFromStore","clearBatchModeSelected","setElementSelectModeBatchIfPossible","setElementSelectModeSideBySideIfPossible","isLeftStatementView","sideBySideProjectId","setElementSelectModeRangeIfPossible","clearModeIfPossible","clearCopyFormulaModeIfPossible","removeAllFormulaRows","addElementFormulaRow","removeFormulaRow","formulaRow","formulaRowIndex","isElement","clearFormula","requestCreateNewFormula","createNewFormulaRequest","formulaModel","requestUpdateFormula","editFormulaRequest","fetchSelectedFormulaDetails","getFormulaDetailsRequest","getTickmarksForRevisionRequest","fetchTickmarkListForRevision","deleteTickmark","deleteTickmarkRequest","getElementsByTickmark","updatedElementsArray","elementEntityList","clearElementsFromTickmark","removeTickmarkFromElementsMapStore","serializedProjectIdWithGeo","getStatementListForProjectRequest","deleteAllRevisions","permanentlyDeleteFailedRevisionRequest","getStatementWorkflowsRequest","retryFailedDocumentUploadRequest","restoreDeletedRevisionRequest","getStatementSubmitForWrapUpApprovalStatsRequest","getStatementApprovalStatsRequest","submitStatementForWrapUpApprovalRequest","rejectStatementWrapUpRequest","approveStatementWrapUpRequest","signedDate","reportFormat","timeZone","tz","guess","responseType","downloadedStatus","fetchToolkitReportList","cancelReportIdProcessingRequest","reportName","getSourceClientIdForCopyStatement","Chip","onRemove","CloseButton","onRightStatementNavSectionClick","sourceStatement","targetStatement","deRegisterLeftScrollListeners","deRegisterRightScrollListeners","totalPageHeight","getTotalSectionHeight","registerLeftScrollListeners","registerRightScrollListeners","onLeftStatementNavSectionClick","fetchLeftSectionReviews","getSectionReviewersRequest","isBothLegacyOrOCRInSideBySideView","isSourceLegacy","_pipeColorMap","green","purple","blue","teal","greenDark","tealLight","blueDark","grey","getPipeColorForProject","projectPipeColor","desiredProjectIndex","findIndex","pipeColorValues","collateProjectDetails","apiResponses","geoCodeMapData","array","obj","mergedData","collatedResponse","updateProjectListWithGeoSuffixedProjectId","nameOfProjectIdProp","nameOfGeoCodeProp","_project","getGeosWhereUserHasProject","geos","isProjectExistInAMERegion","GEO_NAMES","AME","doesUserExistInAMERegion","getCountryCodeMenuOption","countryOptionList","countryCode","container","getAllCountriesListFromLocalstorage","fetchAndUpdateAllCountriesList","countriesList","expiry","getTime","getAllContainerDetails","countriesListWithTTL","getCountryNameByGeoCodeAndCountryCode","allCountryListData","countryData","countryName","getCountryNameByCountryCode","getCountriesListLoadedInModel","localStorageCountriesList","CountryForm","isProjectExistsInPinnedDetails","pinnedProjects","isUserHasAccessToProject","userHasAccess","msalInstance","port","redirectUri","protocol","hostname","ENABLE_SIGNALR_SOCKET_CONNECTION","getConfigForSocketConnection","signalrConfig","socketConfig","createMSALInstance","PublicClientApplication","auth","AD_CLIENT","authority","AD_INSTANCE","AD_TENANT","knownAuthorities","postLogoutRedirectUri","cacheLocation","storeAuthStateInCookie","socketURL","BASE_HUB_URL","request","isLogoutAPI","_getAuthTokenForRequestInterceptors","token","Authorization","_isValidResponseAndNotRetry","__isRetryRequest","_tokenTimeOutResponse","UNAUTHORIZED","_socketTimeOutResponse","INTERNAL_SERVER_ERROR","_acquireToken","resolve","handleLoginResponse","tokenResponse","accessToken","defaults","common","autoConnect","authenticateAcrossAllGeos","authenticate","parent","apiClientForGeo","_authenticateAPI","handleLogoutResponse","handleRedirectPromise","debug","account","getAllAccounts","resourceId","AD_AUD","scopes","acquireTokenSilent","acquireTokenRedirect","loginRedirect","checkIfExistingTokenIsValidAndFetchNewIfExpired","callback","authenticateSuccess","clearAuthData","userLogOut","removeUserFromRoom","projectUserIds","geoKeys","hasAnnotations","getElementHighlightStatus","isElementSelected","isElementHighlighted","showElementStatusAndFlag","isUnverified","isHighlighted","getCssModifierForView","getCalloutPosition","canvasHeight","canvasWidth","offsetHeight","offsetWidth","x1","y1","x3","y3","topLeftYCoordinate","topLeftXCoordinate","bottomLeftYCoordinate","bottomLeftXCoordinate","verticleMidPointOfElement","horizontalMidPointOfElement","spacePadding","getShowCalloutValue","annotationDisplayFilter","annotationsConfig","enabled","disabledCount","enabledKeys","annotation","getMarkerPosition","markerWidth","getInitialCalloutVisibilityDetails","displayMarker","displayCallout","displayAnnotation","getCalloutVisibilityDetails","calloutVisibilityDetails","createProjectEntityRequest","createProjectEntityError","createProjectEntityLoading","_handleBatchAddWithElementAlreadySelected","clickElementInContentWhileBatch","batchElementsAmount","selectedElementIds","batchMaxAmountNotification","clickElementSearchEntryWhileRange","firstElIndex","secondElIndex","selectedElementRange","addElementsToBatchFromElementsFilter","removeFilteredElementsFromBatch","batchSelectedItemsIds","cancelBatchUpdatePanel","handleBatchUpdateSuccess","updateModel","shouldRefreshStatementSummary","createEntity","entitySearch","getWorkpapersForRevisionRequest","fetchWorkpaperListForRevision","deleteWorkpaper","deleteWorkpaperRequest","fetchElementsFromWorkpaper","getElementsByWorkpaperReference","clearElementsFromWorkpaper","unlinkElementFromWorkpaperElementsList","removeWorkpaperFromElementsMapStore","CONTENT_MAX_SEARCH_RESULTS","bookmarks","getOcrNavigationTabs","isOcrStatement","commonTabs","DefaultSearch","clearIconSize","isSearchableDropdown","maxLength","onSearch","onClear","onFocus","searchInputRef","_onSearch","ENTER_KEY_CODE","autoComplete","SearchTableDropdownApi","onSelectResult","resultsApiModel","isOptionSelected","shouldDisableMenuOption","_shouldOpenMenu","isSearchCharLengthValid","results","searchValue","itemQuerySelector","textInputDrawer","SearchDropdownApi","maxDropDownHeight","noResultMsg","isCreate","onCreateClick","minSearchCharLength","visibleRowsForScroll","debounceSearch","debouncedFunction","debounce","getSearchFormattedEngagementEntity","clientName","engagementFye","includeChildSections","includePreviewSequence","toEditApiFormat","batchUpdateElementRequest","updatesModel","documentChangesSinceRequest","sinceTimestamp","addElementRequest","addElementRequestOCR","searchElementText","getAllRevisionElementsRequest","getAllElements","selectedOption","radioWrapperClass","UNSELECTED_OPTION","isOptionUnselected","verify","unverify","none","STATUS_USER_FLAG_OPTIONS","STATUS_USER_FLAG_OPTIONS_ARRAY","STATUS_SYSTEM_OVERRIDE_FLAG_OPTIONS","COMFORT_ASSIGN_OPTIONS","STATUS_SYSTEM_OVERRIDE_FLAG_OPTIONS_ARRAY","COMFORTASSIGN_OPTIONS_ARRAY","WORKPAPER_ENTRY_REMOVE_TOOLTIP","EXPAND_ELEMENTS_TOOLTIP","COLLAPSE_ELEMENTS_TOOLTIP","TICKMARK_REMOVE_TOOLTIP","hoverReviewTooltip","warning","limit","SvgIconInformationTooltip","rightIcon","getPurgedCache","sizeof","getRevisionsSectionsRequest","onlyBookmarkSection","asTreeList","getLeftContentSectionMapRequest","contextKeyForApiCall","SvgCloseButton","COPY_FAILED","COPY_SUCCESS","initcopyFormula","stopCopyFormula","formulas","requestCreateNewCopyFormula","copiedElementsFiltered","at","copiedFormulas","copiedElementsIndex","copiedFormulasIndex","newRows","_getNewRowsForTargetElement","rows","roundingScale","roundingResult","computedResult","successElementId","responseForPopUp","triggerPopUpStatusForCopyFormula","successMessageDto","numberOfFormulas","numberOfSuccessfulPaste","numberOfSuccess","numberOfElements","failureMessageDto","numberOfFailedPaste","numberOfFails","getTableMatrix","table","getstore","dataTable","rowCounter","maxColumnValue","tags","t","columnValue","getAttribute","innerText","column","removeUnwantedColumn","getCurrentOCRTable","coordinatesInInches","currentTable","ocr","tables","bounding_regions","tx1","ty1","tx3","ty3","checkIfPolygonIsInsideAnotherPolygon","innerRectangleLiesWithinOuterRectangle","getOcrTableMatrix","currentTableBoundingRegion","groupingElementsByColumn","getSection","currentElement","rowCount","transformedObject","OCR_DOC_TYPE","readOnlyOverride","isReadOnly","dpi","bookmarkSection","treeList","updateRevisionsSectionRequest","deleteRevisionsSectionRequest","sectionReviewed","reviewSectionRequest","isSectionAlreadyReviewed","deleteReviewSectionRequest","getSectionHistoryRequest","getSectionAssignments","createRevisionSectionAssignment","getAllSectionAssignments","getElementsCountBySectionID","getNotesCountBySectionID","getStatementRequest","statementData","fetchRevision","isLatestRevision","chatBotPushIndexRequest","checkIfFeatureFlagEnabled","selectedStatementData","selectedProjectGeo","getCarryForwardMetaDataEnabled","getTechSupportStatementAccessEnabled","ENABLE_SIDE_BY_SIDE_STATEMENT_ELEMENTS_MAP","getOCREnabled","getChatBotEnabled","fetchSectionContent","fetchOCRSectionContent","sectionMetaDataList","setFirstElementVisibleInViewPortAction","allElementIds","leftView","ocrLeftView","view","leftViewBoundary","viewPortElement","boundary","sortedElement","firstViewPortElementId","dataset","onToggleSyncScroll","SIGN_OFF_HISTORY_OPTIONS","UNREVIEW","LABEL_UPDATED","ENTITY_UPDATED","CREATE","ASSIGN_TO","ASSIGN_BY","UNASSIGN_TO","UNASSIGN_BY","UNASSIGN_ALL","SYSTEM_USER_NAME","CREATED_NAV","getUserMenuOptions","assignedUsers","Loading","updateToolkitReportWithLoading","updateReportWithLatestRecordWithoutLoading","hasReports","cancelReportWithLoading","cancelReportProcessingAction","REPORT_DOWNLOAD_FAILED","downloadResponse","modifiedResponse","byteDocument","hasReportId","getReportById","blobResponse","COE","USER_ROLE_OPTIONS_MAP","getInternalReferenceByRevisionAndElementId","addElementToInternalReference","isFromSuggestion","createOrAddToInternalReferenceRequest","detachElementFromInternalReference","internalReferenceId","detachElementFromInternalReferenceRequest","_updateElementHighlighting","clearInternalReference","selectElementFromInternalReference","onSyncScroll","isUserScrollingLeftView","rightView","onScrollRightStatementPage","onScrollLeftStatementPage","isLegacyStatementsSelected","documentId","canvas","heightOfOnePage","STATEMENT_PAGE_PADDING","syncScrollIntoView","isSyncScrollingMode","rowTitle","scaleWithZoom","zoomRatio","elementX","elementY","getElementPositionOnPage","syncSideBySideScrollIntoView","isLeftView","HighlightOptions","getClosestWord","metadata","closest","min","span","page","distance","word","point","dx","dy","sqrt","getMinDistance","getText","start","end","firstIndex","secondIndex","characterRange","renderSelection","lines","context","getContext","fillStyle","line","x2","y2","beginPath","fillRect","lastElement","w1","w2","padding","ctx","arc","PI","closePath","textBlockEnds","processCharacterRangeAsTextLines","currentLine","parentX1","parentY1","parentX3","parentY3","childX1","childY1","childX3","childY3","minX","maxX","minY","maxY","innerRectangleIntersectsOuterRectangle","outerRectangleIntersectsInnerRectangle","tolerance","checkIsArrayOfArrays","arr","selectedElementInBatch","scale","batchUpdateCoordinates","batchUpdateElements","starting","ending","coordinatesInPixel","coord","childCoord","parseFloat","ElementSelection","clearCanvas","clearRect","FeatureFlagComponent","fallback","TEXT","accountingBasis","registrant","statementTypeId","techSupportAccess","originalAccountingBasis","originalRegistrant","originalStatementTypeId","statementDisplayEntity","statementDisplayId","orignalQuarter","autoIdentifyIrs","activeRevisionEntities","concat","deletedRevisionEntities","activeRevisionsCount","clientEntity","lastModifiedBy","revisionLastModifiedBy","legalHoldDisabled","numElements","numElementsCompleted","signedUser","TextInput","onPaste","pattern","useIntl","handleOnChangeWithPattern","createElementTickmarkRequest","tickmarkModel","searchTickmarksByRevisionAndElementRequest","TICKMARK_SORT_BY","sortBy","sortDirection","updateTickmarkRequest","put","createTickmarkRequest","searchTickmarkByKeywords","searchText","encodeURIComponent","hasNotesFilters","noteFilters","createdNotesUserObject","repliedNotesUserObject","userslistCreatedAndReplied","isCreatedUserListChecked","isRepliedUserListChecked","isMentionedListChecked","ghost","applyNoteFilters","filtersObject","usersListNotesCreatedBy","usersListNotesRepliedBy","assignedToMe","filteredNotesList","isNotePriority","isNoteNonPriority","isGhostNote","isNoteClosed","isNoteTypeClient","isNoteTypeReview","isNoteTypeObserver","isNoteCreatedByUser","Boolean","isNoteRepliedByUser","repliesArray","replies","replierId","isSectionIdSelected","isNoteMentionedOrCreatedOrRepliedByUser","isNoteMentionedByUser","userIdToUserNameObject","taggedUser","taggedUsers","reply","filterKeys","isNoteMentionedToCurrentUser","toApiNoteFormat","userIdToUserNameMap","div","getElementsByTagName","replaceFromStr","replaceToStr","toDisplayNoteFormat","requestGetStatementWorkflows","previousWorkFlowMap","getInitializedSize","permanentlyDeleteWorkflowRevision","retryFailedDocumentUpload","fetchSectionHistoryDetailsWithoutLoading","handleSignOffSuccess","handleRemoveSignOffSuccess","appUserId","updateSelectedSectionPanel","fetchCurrentBlacklineDataBySectionOCR","blacklineGuidDetails","getBlacklineChangesData","guid","keyVersion","page_content","page_number","fetchPreviousBlacklineDataBySectionOCR","ocrSectionMemorySize","calculateSizeAndAddSectionToLeftCache","imageGuid","imageKeyVersion","jsonGuid","jsonKeyVersion","getOCRImageSectionSegmentsRequest","imgResponse","image","URL","createObjectURL","getOCRDataSectionSegmentsRequest","ocrResponse","getNotesOCR","fetchLeftSectionOCRSegmentsStatementContent","fetchLeftElementsBySectionOCR","fetchLeftNotesBySectionOCR","initProjectSocketClient","closeProjectSocketClient","connectionId","closeSocketClientRequest","getNotesByRevisionAndSectionRequest","fetchProjectList","getProjectListRequest","countryManager","sortProjectListBySupportEnabledAccessDate","selectedProjectPresentInProjectList","selectedGeo","filteredProjectList","adminGroupAddDate","pathName","defaultConfig","isCreateProjectPage","isAdminModulePage","updatedSelectedProject","urlSections","projectIdIndex","softDeleteProject","clientID","updatedProjectList","updatedProject","restoreDeletedProject","permanentlyDeleteProject","setProjectFilterGeo","setAppliedSearchTerm","clearAppliedSearchTerm","setFirstProjectAsSelectedFromProjectList","apiBoolFormat","apiArrayFormat","handleTrueBooleanFilterUpdate","getORedChipTextArray","valuesArray","areValuesIntl","chipTextArray","_getFlagApiFormat","periods","periodsArray","scalings","scalingsArray","unitsArray","entities","entitiesArray","wpRefNumbers","wpReferenceArray","comfortLetterLabel","comfortLetterArray","tickmarkIds","_tickmarksMap","_getFormulaApiFormat","_getIRApiFormat","_getWPRApiFormat","_getTMApiFormat","tickmarksArray","areSectionsSelected","formulaFlag","internalReferenceFlag","parentFlagged","automatedInternalReferenceFlag","manualInternalReferenceFlag","automatedWorkpaperFlag","manualWorkpaperFlag","parentFormula","recalculatedFormula","footedFormula","crossFootedFormula","roundedFormula","automatedFormulaFlag","manualFormulaFlag","automatedTickmarksFlag","manualTickmarksFlag","_sectionsMap","potentialNewFilters","clearFlagged","_handleChildFlagUpdate","_periodsMap","isPeriodSelected","_scalingsMap","isScalingSelected","unit","_unitsMap","isUnitSelected","_entitiesMap","isEntitySelected","wpr","_wpReferencesMap","isWPReferenceSelected","_comfortLetterMap","isComfortLetterSelected","isTickmarkSelected","tickmarksArrayLength","formulaFilterEnabled","_handleChildFormulaUpdate","_handleChildIRUpdate","_handleChildTMUpdate","isPageSelected","isRounded","clearRoundedFormula","clearIR","clearTickmarks","_first","_searchTerm","_size","pageParams","definedParams","count","selectedFlags","isUnflagged","selectedWprs","selectedComfortLetter","selectedTickmark","selectedTickmarks","selectedIRs","selectedFormulas","fetchSectionAssignments","usersList","fetchSectionAssignmentsWithoutLoading","updateBulkSectionAssignmentsList","requestCurrentAdminModuleTab","ADMIN_MODULE_TABS","MAINTENANCEBANNER","getAllMaintenanceBannerData","getAllMaintenancePageBannerData","bannerList","maintenanceBannerSaveAction","isActive","startDate","endDate","postMaintenanceBannerRequest","getContainerListWhereUserIsCountryManagerAction","getContainerListWhereUserIsCountryManager","getContainerMonitoringDropDownList","countryCodes","getContainerListWhereUserIsCountryManagerWithContainerCodes","setMonitoringDropDownSelectedOptions","getStatementSummaryElementsRequest","SvgInfo","closeSocketClient","userEntities","isProjectHasReservedClientName","deleteDate","compareUser","engagementEntity","omniaEngagementEntity","cbFeedbackEnabled","containerCode","omniaUrl","auditClient","cik","isNewClient","symbol","sic","SvgCross","setOcrCurrentViewPageNumberDispatch","currentPage","fetchComfortAnnotationListForRevision","getComfortAnnotationsForRevisionRequest","fetchElementsFromComfortAnnotation","getElementsByComfortAnnotation","elementsMap","deleteComfortAnnotation","comfortAnnotation","deleteComfortLetterRequest","uniqueGeos","responses","successfullRequestsResponse","getProjectsInParticularGeo","getSelectedProjectUsersRequest","idList","getContainerListUserHasAccessTo","getPinnedDetailsRequest","pinRequest","pinData","unPinRequest","unPinData","containerCodes","fetchElementsSummary","updateTMorWPpanel","asof","_haveElementChangesToUpdate","_haveSectionChangesToUpdate","sectionEntityList","TAB_KEY_CODE","BACKSPACE_KEY_CODE","SvgPlus","shouldDisplayValueBeFlagged","formulaInProgress","shouldValueBeComparedToRoundedValue","removeCommasFromNumber","NaN","countDecimals","number","numberToString","countDigits","numberFormatConverter","thousandSep","decimalSep","numStr","intPart","decimalPart","formattedIntPart","formattedNumber","unformattedNumber","searchStatementContentRequest","maxResults","getUrl","textToSearch","noteTimestamp","newNote","match","regex","usersObject","exec","noteRepliesArray","removeXMLTags","isEqual","emailList","getEmailsForTaggedUsers","noteBody","previousNoteBody","latestReplyIndex","lastReply","noteContent","getNote","edit","getNoteReplies","r1","r2","lastModified","DOMPurify","sanitize","ALLOWED_TAGS","ALLOWED_ATTR","noteTime","formattedNoteNumber","getStatementSummarySectionsRequest","richText","htmlToText","fromString","wordwrap","SWITCH_ENABLER","SWITCH_ADMIN","SWITCH_COE","updateColumnDataAndPost","userData","updatedFieldValue","currentField","enabledDate","disabledDate","saveEnableApplicationAccessRequest","saveRoleState","roleState","isRoleUpdate","FORBIDDEN","postRoleStateRequest","getContainerListOptionsMap","containerListMap","containerName","_itemIsValid","infoText","tooltipInfoId","IconComponent","iconComponent","setLeftSectionInView","clearLeftSectionInView","ToolkitDownloadData","downloadId","dateTime","processedTime","downloadData","mergeLoadedData","listData","cloneDeep","reportData","workPaperElementIdsUpdatedOrDeleted","workPaperToEditOrDeleted","workPaperToEditReferenceNumber","WorkpaperForm","fromWorkpaper","workPaperUpdatedElementIds","sectionItem","elementsData","comfortLetterElementIdsUpdatedOrDeleted","comfortLetterUpdatedElementIds","getElementsDataByLeftSideView","disableAllElementsCallout","getAllSectionElements","leftElementsData","leftElementIds","createElementComfortLetterRequest","comfortLetterForm","updateElementComfortLetterRequest","createBulkComfortLetterRequest","getMatchingComfortLettersForElementRequest","getMatchingComfortLettersRequest","COMFORT_ANNOTATION_SORT_BY","ordinal","getUpdateNoteApi","createNotesRequest","notesForm","toNoteReplyApiFormat","toEditNoteApiFormat","toDeleteApiFormat","RevisionStatusModel","statusDisplay","REVISION_STATUS_DISPLAYS","RESTORING","FROM_RESTORE","REVISION_STATUSES","linkToDocx","linkToOrgXhtml","linktoXhtml","revisionStatus","processedByUserEntity","docChangedTimestamp","linkToChangesStatement","changesStatementTimestamp","hasSanitizedImage","createOrUpdateElementWorkpaperRequest","workpaperModel","createWorkpaperRequest","getWorkpaperReferencesRequest","refNumber","NUMBER_WITH_COMMAS_REGEX","COMMA_REGEX","DUPLICATE_LEADING_ZERO_REGEX","EMPTY_REGEX","FLOATING_POINT_NUMBER_REGEX","_formatNumber","replacement","numberParts","integerPart","formatNumberWithCommas","removeDuplicateLeadingZerosFromNumber","addLeadingZeroToEmptyDecimal","formatManualInputFormulaRowNumber","SUPPORT_ID_INPUT_MODAL_BLOCK","SupportIDInputModal","isEditMode","toggleSupportIDModal","onSave","onCancel","useSelector","updatedSupportID","setUpdatedSupportID","previouslySelectedCountries","setPreviouslySelectedCountries","selectedContainerOptions","setSelectedContainerOptions","containersList","containerOptions","setContainerOptions","setDataLoaded","_getCountryManagerAccessDetails","getCountryManagerDetailsByUserId","supportId","containers","countryCodeList","onSaveSupportIdDetails","currentlySelected","previouslySelected","isSaveBtnDisabled","prevOption","containerOption","filteredData","onRemoveChip","AdminModuleAPISwitch","switchKey","switchData","_updateUserEntityAgainstEmail","showSupportIDModal","setShowSupportIDModal","setEditMode","_toggleSupportIDModal","editMode","prevModalState","checkedInitialState","setChecked","handleSwitchChange","_updateSupportIDAndCountries","_onSaveSupportID","countries","email","onMouseOver","uncheckedIcon","checkedIcon","blankChangeHandler","ADMIN_MODULE_SORT_COLUMN_KEYS","getMonitoringColumns","activeStatements","wrappedupStatements","deletedStatements","getAddedUserColumnsForAdminModule","addedUserColumns","region","function","isIconVisible","getSearchUserColumnsForAdminModule","searchColumns","MANAGEUSERS","SUMMARY_OF_KEY_CHANGES","MONITORING","getAdminModuleTabs","applicationManager","_flattenHirearchyToIds","includeChildless","flatMap","_createFlatMapOfNodesWithValue","initNodeValue","sectionsHierarchy","createCollapseStateMapFromNodeIds","createContentSearchFilterState","topSection","SectionTreeListEntry","newSectionId","isCreateSectionModalOpen","isSectionAlreadyInTree","isSectionInTree","getArrayWithNewSection","deleteNewSection","User","company","firstName","fullName","isPpmd","jobType","lastName","officeDescription","zoneId","truncateMessage","formatText","formattedMessage","formatteTitle","geoCodes","code","GEO_OPTION_MAP","GEO_OPTIONS","getInternalReferenceSuggestionsByRevisionAndElementId","is_technical","originalText","thisContent","getClosestBookmarkSection","TickmarkList","deletedTickmarks","updatedElementsMap","clonedeep","updatedElement","clonedElementsMap","tickmarkIdArray","j","updatedElementsMapObject","elementToUpdate","elementsToRemoveSet","splice","elementIdToRemove","deletedTickmarksCopy","tickmarksCopy","tickmarkRefId","currentTickmarkIndex","noOfTickmarkToReturn","tickmarksMap","modifiedTickmark","elementCount","modifiedTickmarkKeys","clonedTickmarks","tickmarkToElementsMap","elementsObject","elementsToSubtract","filteredElements","hasElementsMap","AmountAttributesDetails","flagMap","kebab","CONSTANTS","PreviewReportSelectedableElement","href","elementRef","elementSize","getComputedStyle","fontSize","screenSize","setScreenSize","useDispatch","calloutRightPosition","setCalloutRightPosition","calloutTopPosition","setCalloutTopPosition","tieoutElement","tieoutElementBoundingInfo","tieoutElementLeft","tieoutElementTop","tieoutElementHeight","callOut","calloutBoundingInfo","calloutHeight","calloutWidth","parentLeftPosition","parentTopPosition","elementCenter","calloutCenter","calloutRight","calloutTop","preVal","navigateToElementRow","ELEMENT_BLOCK","data-element-id","data-section-id","maxWidth","CALLOUT_MAX_WIDTH","customStyle","TieoutElementCallouts","onAnnotationClick","isShowCallout","setShowCalloutVal","leftSideView","numberOfSourceElementSelected","numberOfTargetElementSelected","tableControlsChanged","setTableControlsChanged","calloutRef","markerRef","annotationStyle","setAnnotationStyle","attributeName","parentElement","parentRightPosition","zIndex","COMFORT_ASSIGN_ELEMENT","TIEOUT_ELEMENT_LEFT","onElementClick","isClickedFromPanel","isDisabled","eleId","_getSelectedModifierClass","elementPanelElementId","elementHighlightState","TIEOUT_ELEMENT_CLASS","MemoizedSelectedableComponent","hideAnnotations","isSideBySideViewDisabled","isElementSelectedForSideBySideMap","getCountForSelectedElementForSideBySideMapping","isCursorAlias","customElementId","_isElementSelectedForSideBySideMap","_countForSelectedElementForSideBySideMapping","getElementStatusColor","useCallback","handleIndicatorOnHover","useHoverEffect","handleMouseEnter","handleMouseLeave","TIEOUT_ELEMENT_ID_PREFIX","renderSelectedableElement","onMouseEnter","onMouseLeave","isComfortAssign","annotations","elementDataparts","handleElementClick","handleAnnotationClick","rightPanelState","isPartOfTableMatrix","useMemo","elementIdWithDatapart","handleClick","handleOnAnnotationClick","selectableKey","SvgWarning","SvgArrowSimpleThickDown","collateCurrentUserDetail","hasAdminAccess","hasCoeAccess","hasApplicationManagerAccess","isEnabled","userRoles","fetchCurrentUser","callbackBeforeLoaded","getCurrentUserRequest","postCurrentUserPreferencesRequest","timeZoneResponse","fetchFeatureInfoForAllGeos","userEmail","userID","getUserIDFromEmail","setDataLayer","pageInfo","getStatementWorkflowStepsRequest","WM_CTX","getExcessiveElementSelectionNotification","elementLimit","elementsMapped","elementUpdateStatus","mapElementsFailureResult","calloutPosition","afterStyles","afterContentWidth","getPropertyValue","customWidth","annotationMarkerElementWidth","elementHorizontalCenter","customHeight","dateformatId","languageType","defaultScaling","defaultUnit","clientDetails","dateFormatId","getDropdownValue","cfDetails","_createFormData","files","formData","FormData","append","fileError","carryForwardProject","carryForwardStatementIds","carryForwardDetails","wrapUpDate","doesStatementNameExist","isQuarterRequired","hasUploadedFiles","hasFileError","isStatementNameValid","isDateFormatIdValid","isNumberFormatIdValid","isStatementTypeValid","islanguageTypeValid","isQuarterValid","isPeriodEndingValid","isWrapUpValid","isAccountingBasisValid","isFiscalYearValid","isDefaultScalingValid","isDefaultUnitValid","carryForwardStatementIdsArray","isStepOneValid","isStepTwoValid","isStepThreeValid","oldStatementModel","internalreferences","autotieout","comparemetadata","getCurrentMaintenanceBanner","getSummaryOfKeyChanges","postSummaryKeyChanges","_ADOBE_DCR_QUEUE","_ADOBE_SAT_READY","analyticsDataLayer","appName","pageName","projectName","statementID","statementType","statementRevision","LIST_OF_PAGES_WITH_STATEMENT_DATA","LIST_OF_PAGES_WITH_PROJECT_DATA","doesAnalyticsDataObjectContainsProjectInfo","doesAnalyticsDataObjectContainsStatementInfo","doesPageRequiresProjectInfo","routePath","matchPath","path","strict","exact","doesPageRequiresStatementInfo","isSatelliteReady","_satellite","domReady","isDataLayerReady","dataLayer","appendDCRQueue","dcr","getDCRQueue","setDCRQueue","queue","trackDCR","addToQueue","track","ruleName","matches","getRoutePageName","routeName","startsWith","pathToRegexp","internalReferenceElement","dateCreated","dateUpdated","convertElementDetailsEntityToElementDetailsModel","elementEntity","sectionFullname","getOtherElements","iR1","iR2","elementsCopy","created","updated","sectionsMap","sectionReviews","sectionReviewsMap","sectionReviewsMapCopy","sectionReviewsCopy","updatedDate","reviewList","sectionReviewedCopy","item2","currentVal","accumulator","currUserId","ACCEPTABLE_WIDTH_UNITS","INTERACTIVE_COLUMN_WIDTH","DATA_GRID_CONSTANTS","stopRowClickPropagation","giveOptionsRowData","checkboxId","DataGridDropdownColumn","_isValid","_options","DataGridIconColumn","iconHeight","iconWidth","DataGridData","totalResults","currentOffset","getStatementSummaryNotesRequest","getPinnedDetails","updatePinDetails","pinType","updateUnpinDetails","existingUserIds","revisionIdParam","projectIdParam","addUserToGroup","fetchLeftSectionTreeAction","currentTab","getStatusMessage","toggleAddRevisionModal","revisionInProgress","statementToUploadRevisionOn","filePDFError","setFilePDFError","onDrop","acceptedFiles","rejectedFiles","acceptedFileNameExtension","handleModalClose","selectRevisionButtonDisabled","setSelectRevisionButtonDisabled","useDropzone","accept","multiple","maxSize","onFileDialogCancel","noDrag","getInputProps","_isFileError","file","VIEW_REVISION_LINK_TOOLTIP","getRevisionHistoryListColumns","onRevisionLinkIconClick","getDeletedRevisionHistoryListColumns","onView","onRestore","onPermanentlyDelete","deletedDate","lastModifiedByUserEntity","RevisionList","revisions","RevisionHistoryModal","_fetchRevisions","selectedStatementId","setState","revisionList","revisionApi","getAllRevisionsForStatement","toggleStatementRevisonsModal","DeletedRevisionHistoryModal","getDeletedRevisionsForStatement","onDelete","lastRevision","statementToDelete","RestoreRevisionErrorModal","toggleRestoreModal","onOkay","DeletedRevisionHistoryStateWrapper","_onHistoryDeleteSelected","selectedRevisionId","isLastRevisionInHistory","showHistoryModalLocally","showDeleteConfirmationModal","_onHistoryRestoreSelected","refreshStatementList","closeWholeFlowFromParent","BAD_REQUEST","showRestoreRevisionErrorModal","_onDeleteConfirmation","_onCancelDelete","_onCloseRestoreModal","_onOkayConfirm","onDeleteTop","onDeleteAll","revisionDeleteSelection","setRevisionDeleteSelection","StatementWrapUpStats","totalElements","verifiedElements","reviewedElements","totalNotes","toFixed","WRAP_UP_STATS_BLOCK","stats","notAllElementsVerified","percentage","verifiedPercentage","reviewedPercentage","onSubmit","StatementWrapUpStatsModel","submitStats","setSubmitStats","s","loadStatementDetails","handleSubmit","StatementWrapUpApprovalStats","submitUser","submitDate","onDecline","onApprove","approvalStats","setApprovalStats","handleDecline","submitterName","submitterEmail","submissionDate","asWrapUpStatsModel","setSignedDate","loading","handleApprove","_currentUser","getUser","ul","li","curDate","StatementWrapUpApprovalFlowWrapper","showModal1","setShowModal1","showModal2","setShowModal2","STATEMENT_COPY_BLOCK","COPY_STATEMENT_DISABLED_TOOLTIP","onClickCopy","setProjectList","setSelectedProject","sourceClientId","setSourceClientId","loadProjectList","getSourceClientId","handleOnClick","eligibleProjectList","getActiveProjects","proj","hasAccessToProject","WRAP_UP_POLLING_INTERVAL","StatementListComponent","sortPinnedStatements","getStatements","statements","_toggleExportInitiatedModal","showExportInitiatedModal","_toggleSoftDeleteAllRevisionsModal","showSoftDeleteAllRevisionsModal","_toggleSoftDeleteLatestRevisionModal","showSoftDeleteLatestRevisionModal","_togglePermanentlyDeleteRevisionModal","showPermanentlyDeleteRevisionModal","_toggleRevisonHistoryModal","showRevisionHistoryModal","showAddRevisionModal","toggleSubmitForWrapUpApprovalModal","showSubmitForWrapUpApprovalModal","toggleWrapUpApprovalModal","showApproveWrapUpModal","onSubmitForWrapUpApprovalSuccess","_pollForStatementsWithApprovalInitiated","statementWrapUpPoll","hasStatementsInApprovalInitiated","onWrapUpDecisionSuccess","setStatementToUploadRevisionOn","_clearSelectedStatement","setStatementToSubmitForWrapUpApproval","setStatementForWrapUpApproval","setStatementToDelete","_toggleSoftDeleteStatementModal","setSoftDeleteAllRevisions","setSoftDeleteLatestRevision","pinOrUnpinStatement","getStatementRevisionsForModal","_setRadioOptionForDeleteModal","_permanentlyDeleteTopRevision","selectTabAndGetStatements","_permanentlyDeleteAllRevisions","_softDeleteLatestRevision","_softDeleteAllRevisions","_restoreDeletedRevision","_uploadRevision","toggleShowCopyStatementModal","onClickCopyStatement","showCopyStatementModal","_getStatementListColumns","isVirtualizedList","listRef","statementsAmount","filterColumn","filteredList","virtualizedListRequired","hasSearchValue","showDeletedRevisionHistoryModal","showESCRequestButton","prevProps","prevSate","clearTimeout","getPinnedStatementsLength","sortModel","requestSortedStatementList","tabsArray","onSelectTab","rightHeaderButton","PlusIcon","isIconButtonDisabled","onIconButtonClick","iconButtonIcon","iconButtonMessage","onClickClose","FormulaListEntry","convertFormulaDTOToFormulaListEntryModel","f1","f2","hasFormulas","formulaListEntry","formulasArray","formulaIsInArray","projects","ProjectListEntry","omniaEngagementEntities","appliedSearchTerm","permanentDeleteDate","updatedProjectsList","occurrences","countResultsFound","o","ContentSearchResultEntry","hasOccurrences","totalOverallResults","totalLoadedResults","getRevisionRequest","selectedProjectGeoCode","getActiveRevisionsForStatement","initContents","_placeholder","disable","setContents","setOptions","buttonList","setDefaultStyle","WPR_NUMBER_CHAR_LIMIT","WPR_NAME_CHAR_LIMIT","WPR_NUMBER_REGEX","WORKPAPER_DETACH_TOOLTIP","WORKPAPER_TOOLKIT_PANEL_DELETE_TOOLTIP","WORKPAPER_TOOLKIT_PANEL_EDIT_TOOLTIP","EXPAND_WORKPAPER_LIST_TOOLTIP","COLLAPSE_WORKPAPER_LIST_TOOLTIP","UNLINK_ICON_TOOLTIP","PERMISSION_DENIED_ICON_TOOLTIP","TICKMARK_TEXT_CHAR_LIMIT","shouldShowMoreButton","textRef","scrollHeight","clientHeight","updateFormulaTypeRequest","formulaOverride","isLeftview","getStatementNavigationData","linkOmniaEngagementLoading","linkOmniaEngagementError","handleProjectClick","handleOmniaEngagementLinking","engagement","omEngagementId","linkOmniaEngagementRequest","omniaTieoutEngagementEntity","linkedBy","linkedDate","toutProjectId","fetchOmniaEngagement","engagementId","handleOmniaEngagementUnlinking","engagementToUnlink","unlinkOmniaEngagementRequest","sessionOmEngagementId","omniaEngagementId","verifyOmniaTokenAndGetEngagement","decodedOmniaToken","jwtDecode","verifyOmniaTokenRequest","geoName","getEngagementsByIdRequest","usersMap","usersListForMentionsTextArea","SvgCloseButtonRed","setLeftStatementSelected","_getNewElementIdsFromElementsMap","newElementsMap","FormulaRowElement","FormulaRow","fetchLeftSelectedStatement","omniaTieoutEngagementEntityList","exportFileToOmnia","omniaReportEntity","exportFileToOmniaFallback","getOmniaExportFileStatus","SvgUnlink","Workflow","_getWorkFlowStatus","getWorkFlowStatusDetails","previousStatus","stepByStatus","displayMessage","currentStep","numberOfSteps","anotherWorkflow","startTime","initiatorId","endTime","getPreviousWorkflowStatus","getWorkFlowStatus","retryable","errorInfo","_workflowListToMap","workflowList","workflowMap","statementIdsMap","revisionWorkflowMap","processingWorkflowsTotal","failedWorkflowsTotal","workflowsToCompare","getWorkflowsMapData","otherWorkflow","getWorkflowStepsByDocProcessType","getStatementMapData","workflowEntry","workflowId","MenuApiData","idsArray","AutomaticallyIdentifiedAnnotations","tooltipId","handleClickOutside","SvgFlagIcon","TICKMARK_ENTRY_BLOCK","rightComponent","bottomComponent","absoluteTopRightComponent","currentlyExpandedTickmarkID","updateExpandedTickmarkID","shouldShowAutomatedTag","toggleShowMore","setToggleShowMore","isShowLessBtnVisible","setShowLessBtnVisible","refValue","setRefValue","setClamped","tickmarkTextRef","toggleShowMoreClicked","toggleStatus","dangerouslySetInnerHTML","__html","COMFORT_LETTER_ENTRY_BLOCK","ComfortLetterEntry","updateExpandedComfortLetterID","currentlyExpandedComfortLetterID","comfortLetterTextRef","descriptionRichText","newZoomValue","currentZoom","stepValue","maxZoom","minZoom","LEFT","TOP","RIGHT","BOTTOM","ANNOTATION_POSITION_OPTIONS_MAP","ANNOTATION_POSITIONS","API_ERROR_NOTIFICATION","messageIsCopied","setMessageIsCopied","copyToClipBoard","copyText","navigator","clipboard","writeText","refreshIcon","reload","getReadOnlyErrorMessageToDisplay","btoa","getDetailsToCopyToClipboard","workpapersCopy","workpapersMap","referenceName","ComfortLetter","convertApiResponsetoComfortLetterModelFormat","noOfComfortLetterToReturn","newElementMap","hasComfortLetterAttachedElements","comfortLetterIdArray","shouldUpdateCount","clonedComfortLetters","elementIndex","comfortLetterIndex","cmfrtLetter","elementToInsert","description","comfortLetterListDetails","payloadElementsMapObject","comfortLetterToLabelMap","indexOfElementToUpdate","hasRows","operator","formulaRows","calculationError","_initCalculationError","_calculateResult","roundedNumber","isRoundingEqualToResult","hasBeenModified","formulaElementDto","FormulaRowNumber","includedElementAmount","includedElementId","elementActive","FormulaRowOperator","mexp","eval","_shouldAddOperatorBeforeRow","_updateFormulaRowsAndCalculateResult","_previousRowIsValue","isLastRowOperator","_previousOperatorIsClosedParenthesis","isLastRowClosedParenthesis","getLastRow","isOperator","getRow","prevFormulaRow","_shouldRemovePrevOperatorAsWell","isOperatorParenthesis","_updateRowAtIndexAndGetRows","isManual","formattedValue","setValue","lastRow","areManualInputsRealNumbers","_getRowsWithUpdatedOperator","parenthesisBalanceStack","currentChar","isFinite","hasRowError","formattedResultValue","formattedDisplayValue","precision","pow","_findDecimalIndex","calculateRoundedResultValue","roundedResultValue","_lastRowIsEmptyManual","hasValue","_isFirstElementOfNewSelection","_shouldAddOperator","selectedRow","rowNumber","resultWithoutMinus","areParenthesesBalanced","isResultValueValid","_rowsToApiFormat","apiRows","selectedFormulaRow","newValue","roundNumberInputValue","isNewFormula","formulaDtoList","elementsToRemove","SectionContentModel","prevSectionId","nextSectionId","processedReactSegment","getParsedReactSegmentFromHTML","removeUserFromSignalrRoom","removeUserFromSocketIORoom","addUserToSignalrGroup","addUserToSocketIOGroup","rowError","authenticateUser","projectUsers","userAuthentication","authResponse","removeSuggestedReferenceRequest","suggestedElementId","fetchStatementCreationPageData","getStatementCreationPageDataRequest","fetchAuditChecklistforRevisionWithoutLoading","getChecklistDataRequest","fetchAuditChecklistForRevision","updateAuditChecklistAnswer","answerID","questionId","answer","auditAnswer","postAuditAnswerRequest","ElementsBySectionMap","_instantiatedMap","elementsToUpdate","updatedMapOfElements","errorSection","hasSection","loadingSection","loadedSection","setElementLoaded","foundElement","cachedSectionId","sectionIdsInCache","sectionElement","allElements","elementBySectionMapUpdates","sectionToElementMap","DEFAULT_ENTITY_STRING","entityMenuOptions","manual","entitiesDropdownMap","getStatementWorkflowStepsMetaData","hasStatements","statementIds","SvgUnverified","populateUserRoles","currentUserID","currentZoneId","getUserOPMProfile","duplicate","errorDuplicateRefNumber","hasDuplicateReferenceError","isReferenceNumberDuplicate","doesRefNumberHaveIllegalChars","isRefNumberTooLong","isRefNameTooLong","isReferenceNumberValid","isReferenceNameValid","workpaperRefCreatedBy","elementWpRefCreatedBy","workpaperRefCreatedDate","setAnnotationsPosition","globalClientConfig","rooms","callbackQueue","isConnected","_setSocketConnectionState","leave","_deleteSocketRoom","projectSpecificRoom","revisionSpecificRoom","_handleProjectDisconnect","socket","connectWithRetry","bind","io","reconnectionDelay","UNIT_TIME","reconnectionAttempts","reconnectionDelayMax","RECONNECT_DELAY_TIME","randomizationFactor","transports","rememberUpgrade","info","executeCallbacks","opts","attempt","close","shift","queueCallback","room","emit","createNewStatementRequest","carryforwardStatement","isPeriodToPeriod","toCreationApiFormat","revisionToApiFormat","getSelectedStatementRequest","projectIdWithGeo","getBetaStmtGuide","nextElementSibling","previousElementSibling","focusFirstMenuOption","getUserIds","getLanguageData","localeCode","getUserPreferredLanguage","fetchSupportedLanguage","updateUserPreferredLanguage","ownProps","getElementHighlightColor","renderElementDataParts","latestProps","useLocation","useParams","hasPermission","getCountForSelectedElement","getCountOfElementsSelected","elementDataFromCache","_shouldEnableTargetElementForSelection","getCountForMappedSourceElement","getCountForMappedTargetElement","handleSideBySideIsDisabled","nextProps","SelectedElementModel","increment","decrement","WrappedComponent","handleOutsideClick","menuPortal","noop","assignedSectionsToUserArray","assignment","assignedSectionsToUser","newsectionAssignments","userIDsInPayload","assignedSectionsToUserCopy","sectionAssign","uniqBy","v","assigment","optionDisplayObject","displayOptionsToSet","signedOff","setViewAllDisplayOptions","getDisplayOption","viewAll","displayOptionsToCheckLength","checkedCount","uncheckedCount","comfortLetterCreatedBy","elementComfortLetterCreatedBy","elementcomfortLetterCreatedBy","elementComfortLetterCreatedDate","elementcomfortLetterCreatedDate","sendChatBotUserResponse","userResponse","getDocChatHeaders","docChatHeaders","submitChatbotResponseFeedback","requestparams","getDocumentIndexingStatus","fileKey","fetchAndUpdateLocaleMessage","localeMessages","fetchUserPreferredLanguageAndUpdateLocale","userSelectedLanguageResponse","selectedLanguage","setNewLocaleAndClearOldLocaleFromStorage","oldLocale","newLocale","savePreferredLanguageAndUpdateLocale","getElementBoundaryInfo","extraHeight","polygonWidth","polygonHeight","polygonTop","PADDING","polygonLeft","isPolygonExistInElementList","elementList","isPolyExistInElementList","elementListLength","elementPolygon","isArrayOfPolygons","outerPolygonInPixel","sectionContent","SectionContentModelOCR","_sectionModel","setLinkedSectionIds","updatedSectionsMap","loadedSectionMap","ensureSectionIdPresent","_mergeSections","loadingSectionsMap","_clearedSectionsMap","clearContent","clearImageContent","ocrSelector","postText","preText","contextLabel","endSelector","endOffset","BlacklineDetails","BlacklineDataBySectionMap","blacklineChanges","blacklineData","blacklineDetail","setLoadedFromBlacklineData","clearBlacklineContent","NotesBySectionMap","elementNotes","pseudoNotes","noteData","getPseudoNote","noteCacheCopy","NOTE_ANCHOR_BLOCK","handleHighlightNote","isNoteNew","onHover","panelSelected","pseudoNoteIdClass","String","c","allNoteParts","handleRemoveNoteHighlight","isNoteSelected","NoteAnchor","onNoteClick","isNotesPanelOpen","handleNoteClick","shouldNotesDisabled","_ref4","xlinkHref","getNumVisibleRows","visibleRowsWhileLoading","MIN_VALUE_LEFT_FOR_BOTTOM_VISIBILITY","MENU_OPTION_HEIGHT","DEFAULT_POP_UP_VIEWPORT_BOTTOM_THRESHOLD","MenuTypeDecider","MenuHelper","_getOverflowData","defaultOverflow","scrollParent","scrollParentOverflow","boundingRect","menuHeight","bottomThreshold","pageYOffset","documentElement","getScrollParent","includeHidden","excludeStaticParent","overflowRegex","overflow","overflowY","overflowX","PortalMenu","_trackPortalPosition","currentPageScroll","heightBetweenWrapperAndBottomOfPage","menuOverflowMap","NormalMenu","_calculateMenuDimensions","fatherProperties","availableSpace","isDropdownHasCheckbox","isCheckboxRequired","shouldDisplayOverflowScroll","DefaultMenuItems","_isOptionSelected","_onSelectOption","keyEventHandler","_isDisabled","_renderMultiselectOption","_isSelected","_renderOption","ApiMenu","ApiMenuWithCreate","_numVisibleRows","_numRowsBeyondScrollableThreshold","types","TableApiMenu","VirtualizedList","extractKey","refElementHeight","calculatedScrollPosition","forceScrolling","selectedItemClassName","scrollAnimation","scrollPosition","setScrollPosition","itemsOutOfView","ceil","getListBounding","getListHeight","bounds","startIndex","floor","endIndex","selectedItem","getElementsByClassName","getListItemsInView","onScrollEndDebounced","onScroll","cancelAnimationFrame","currentTarget","scrollEndPosition","scrollThreshold","requestAnimationFrame","endItem","renderItemWithKey","itemProps","updatedResponse","elementsVerified","elementsReviewed","elementsCount","elementsFlagged","totalElementsFlagged","notVerified","notReviewed","notFlagged","linkedStatus","environment","OmniaEngagementEntry","hasComfortLetter","periodMenuOptions","periodsFlattened","periodEntityList","year","periodsDropdownMap","periodFilterList","hasPeriodDropdownMap","getPeriodDropdownValue","jobTypeId","linkedUserName","omClientId","omClientName","omEngagementName","omUserId","toutClientId","toutClientName","toutEngagementId","toutEngagementName","toutProjectName","ElementsSearchResults","aggregatedElements","appendElements","_updatedElementList","DEFAULT_SELECTED_INDEX","showElementSearchRefreshButton","retryInterval","0","connectionBuilder","signalr","withUrl","accessTokenFactory","withCredentials","configureLogging","Information","withAutomaticReconnect","nextRetryDelayInMilliseconds","retryContext","elapsedMilliseconds","retryNumber","previousRetryCount","isInvalidUrl","build","serverTimeoutInMilliseconds","keepAliveIntervalInMilliseconds","onreconnecting","onreconnected","SvgPlusCircle","fullWidth","tabModel","isValidElement","SvgVerified","classPrefix","ID","addNavigationRequest","getThumbnailBySectionId","SvgTaskReviewed","SvgTask","SvgCalloutsDirectionSetterLeft","HEADER_BLOCK","Country","memberFirmCode","containerId","geoSpecificCountries","country","countriesOptions","urlParam","requestConfig","axiosInstance","getFeatureInfoForAllGeos","geoToFeatureFlagMap","buildInfoDetails","springProfiles","geoCodeInUpperCase","toUpperCase","srcElement","targetElement","copiedRows","firstNonUndefinedIndex","isAtleastOneElementFound","rowIndexDiff","columnIndexDiff","targetRowElement","targetRowElementPos","targetRowElementRowColumn","getCurrentTable","tagName","emptyColumns","prevValue","currentValue","elementWiseStats","numberOfSameSuccessElements","numberOfSameFailedElements","isElementHighlight","hasValidSelector","fetchComparePanelForRevision","tree","isSectionAdded","indentParent","isSectionDeleted","isSection","isRootLevelSection","parentSection","getTreeBySectionId","selectedTree","getInitials","initials","SectionAnchor","shouldRenderIcon","sectionReviewTooltip","shouldSectionAnchorDisabled","hasSectionBeenReviewed","shouldAssignmentInitialsBeRendered","time","SectionReview","appUserName","leftSectionReview","selectModeId","currNote","noteSection","getElementNote","ACCEPTED_HTML_TO_REACT_ATTRIBUTES","renderedAnchors","segmentJsonTree","_recursivePreProcessSegment","lowerCaseSearchTerm","lowerCaseNodeData","escapedSearchTerm","updatedHtmlString","highlightedHtml","styleSheetWithoutId","head","appendChild","createTextNode","_childlessElement","_elementWithOnlyTagChildren","attribs","_createNormalElement","anchorId","_attributesToProps","spanId","_isPseudoNoteSpan","incrementClass","class","noteIncrementParts","noteIncrement","markClass","_nodeHasChildren","_attributesToPropsEx","childNode","colspan","rowspan","plainStyleString","styles","inlineStyleMap","indvStyle","camelCase","_getReactInlineStyleObject","initTableControls","tableControls","nodeList","renderControls","topPosition","leftPosition","cssText","fixedWidthAttr","isFullWidthMode","tooltipOptions","intlMessages","render","_renderTooltip","onclick","setAttribute","onmouseover","src","getOffset","preRange","createRange","selectNodeContents","setEnd","getselectedTextLabel","rangeCount","range","getRangeAt","commonAncestor","commonAncestorContainer","paragraphElement","pElement","nodeName","findParagraphElement","tableElement","findTableElement","firstElementChild","textContent","paragraphText","words","startContainer","endContainer","startOffset","selectedStartIndex","selectedEndIndex","worsdArray","lastWordLength","newStartIndex","newEndIndex","SvgEditPencil","COMFORT_LETTER_DESCRIPTION_CHAR_LIMIT","COMFORT_LETTER_CUSTOM_LABEL_CHAR_LIMIT","createEditComfortletterTooltip","disableEditComfortletterTooltip","COLLAPSE_COMFORT_ANNOTATION_LIST_TOOLTIP","EXPAND_COMFORT_ANNOTATION_LIST_TOOLTIP","UNLINK_COMFORT_ICON_TOOLTIP","DETACH_COMFORT_ICON_TOOLTIP","deleteComfortAnnotationTooltip","WorkPaper","deletedWorkpapers","wpRefIdArray","workpaperIdArray","deletedWorkpapersCopy","modifiedWP","workPaper","modifiedWpKeys","clonedWorkpapers","workPaperToElementsMap","languageData","languageMenuOptions","languageValue","languagesMenuOptions","dateFormatValue","dateFormatMenuOptions","numberFormatValue","numberFormatMenuOptions","languageDetails","dateFormat","numberFormat","hasUsers","Container","orderedContainers","orderBy","containersOptions","dismiss","docChatClient","_createDocChatAPI","DOC_CHAT_URL","apiURL","getDocChatAPI","sectionElementCountSummary","sectionNotesCountSummary","apiSummaryElementCountResponse","flaggedElements","elementFlagCount","apiSummaryNoteCountResponse","usersObjectInPreviousNote","emailsObject","checkForMatchingSubstring","repliesKeys","currentUsersInNoteBody","setAnnotationsForMapping","ContentViewModesModel","postFinalChecklistConfirmation","confirmationRequestBody","polygonDetails","SvgDeleteIcon","headingsReviewed","headingsCount","TOTAL","AuditQuestion","question","answeredDate","answeredBy","questionsChecklist","questionList","auditQuestion","auditFinalChecklistStatus","auditChecklistStatement","questionsChecklistCopy","currentQuestionIndex","hasQuestionsChecklist","SvgError","alternateThreshold","threshold","SvgKebabBold","SvgSuccess","SvgDocument","StatementExportInProgressModal","SvgFilledPin","SvgFlagged","SvgReviewed","getBuildInfoRequest","fetchUserOPMProfile","opmResponse","_ref5","mask","SvgOpenNonPriority","SvgClosedNonPriority","SvgOpenPriority","AnnotationCalloutComponent","Id","onMouseDown","SvgAnnotationIndicator","fr","frMessages","updatedMessages","setUpdatedMessage","setMessageFromLocalStorage","localeKey","SvgFullscreenIncrease","SvgFullscreenDecrease","SectionContentImageModel","SectionContentDataModel","clearOCRDataContent","SvgEditPage","expression","formulaDTO","convertDTOToRows","includedElementIds","suggestions","toggleNavigationEditModeDispatch","_initChildren","childSection","parentSectionName","AdminModuleMaintenance","apiMaintenanceId","apiStartTime","apiEndTime","apiStartDate","apEndDate","apiBannerText","SORT_ORDER","changeContainerCodesToCountryNameUpdatedData","orderedData","monitoringCountrySelectedOptions","totalObj","setHideOrDisplayElementsOnStatementPage","displayValue","ComfortLetterForm","errorDuplicateLabel","errorDuplicateDescription","isCustomLabelDuplicate","isCustomLabelTooLong","isDescriptionTooLong","isDescriptionDuplicate","isDescriptionValid","isCustomLabelValid","DIRECT_CALL_RULES","AdobeDirectCallRule","SET_ADOBE_NEW_PROJECT_DATA_ACTION","next","action","LOCATION_CHANGE","DirectCallRule","OcrCallouts","setAnnotation","canvasID","handleIndicatorClick","initialCalloutVisibilityDetails","canvasElement","clientWidth","cursor","PreviewReportCalloutComponent","SvgCaretBlack","ASC","DESC","isDescending","apiErrorArray","failedURLResponse","apiErrorArrayCopy","newErrorObj","errorStatus","failedUrl","handledErrorJsonString","errorData","errorMsg","failedURL","errorDetails","hasID","errorNotNull","notesResponse","filteredNotes","statementSegmentFilters","userListCreatedAndReplied","usersListNotesMentions","filterValue","emptyObject","updatedNoteFilters","updatedCreatedObject","updatedReplyObject","updatedStatementSegmentFilters","updatedCreatedAndRepliedObject","notesListCopy","filteredListCopy","newNoteEntry","newFilteredList","newNotes","hasNotes","assignedUsersMap","assignedUserIdSet","assignedUsersMapCopy","SCANNING","REGULAR","OCR","maintenanceBannerList","localStartDateTime","toDate","localEndDateTime","maintenanceBannerDataList","CLEAR_ICON_TOOLTIP","enableAction","onClickIcon","Clear","elementBookmark","EditComfortLetterModal","comfortLetterToEdit","comfortLetterInProgress","setComfortLetterInProgress","_handleSave","comfortLetterPrev","_isErrorForDuplicateDescription","setDuplicateDescriptionLoaded","_isErrorForDuplicateLabel","setDuplicateLabelLoaded","_isModified","initFromElement","isDescriptionTooShort","isCustomLabelTooShort","isComfortLetterValid","setDescription","setCustomLabel","DeleteComfortAnnotationModal","COMFORT_ANNOTATION_PANEL_BLOCK","ComfortAnnotationList","lazy","onCancelPanel","fetchComfortAnnotationList","fetchComfortAnnotationListWithoutLoading","rightPanel","showEditComfortLetterModal","setShowEditComfortLetterModal","setComfortLetterToEdit","comfortAnnotationToDelete","setComfortAnnotationToDelete","_handleComfortletterEditClick","_handleComfortAnnotationDeleteClick","onDeleteComfortAnnotation","onEditComfortletter","module","exports","dataDomainScript","envParam","ENV_PARAM","oneTrustScriptEnvParam","ENABLE_COOKIE_CONSENT_NOTIFICATION","DISABLE_SCRIPT_TYPE","ENABLE_SCRIPT_TYPE","async","addScript","process","addStylesheet","rel","attrs","loadMainBundle","onload","_walkmeConfig","smartLoad","webpackContext","req","webpackContextResolve","__webpack_require__","UserList","projectUserEntities","userEntityMatch","userEntitiy","EDIT_PROJECT_TOOLTIP","SUPPORT_TEAM_ACCESS_TOOLTIP","COE_TEAM_ACCESS_TOOLTIP","userType","numOfColumns","cols","col","cellIndex","USERS_BLOCK","USERS_ID_BLOCK","omniaDetails","getProjectFromList","getCreatedDate","engagementName","getPpmdUsers","getEngagementOwnerUsers","getObserverUsers","getPreparerReviewerUsers","ProjectDetails","_fetchSelectedProjectUsers","_toggleMoreProjectInfo","isExpanded","_canEdit","isDeleted","borderLeft","PROJECTS_AMOUNT","getProjectKebabOptions","cardIndex","onSoftDeleteClick","onRestoreClick","onPermanentDeleteClick","menuTooltipPosition","projectHasReservedClientName","permDeleteTooltip","restoreToolTip","_userCanPermanentlyDelete","_userCanRestore","SoftDeleteModal","toggleSoftDeleteModal","softDeleteAction","updateFilteredProjectList","RestoreProjectModal","PermanentDeleteModal","togglePermanentDeleteModal","permanentDeleteAction","ProjectListCard","_scrollToSelectedProject","selectedProjectID","positionCardInViewHeight","PROJECT_LIST_SCROLL_CONTAINER_ID","_toggleSoftDeleteModal","showSoftDeleteModal","_togglePinUnPin","_toggleRestoreModal","showRestoreModal","_togglePermanentDeleteModal","showPermanentDeleteModal","_showProjectCardKebab","isProjectPinned","ID_BLOCK","setSearchTerm","clearSearchTerm","_executeSearch","setGeo","AdminModuleIcon","PROJECT_CARD_SIZE","ProjectListComponent","getFilteredProjectList","sortPinProjects","getEndIndexOfProjectToBeRenderedInVirtualList","indexOfSelectedProject","projectSerialNumber","indexValue","getCalculatedScrollPosition","pinnedProject","projectsAmount","endIndexInVirtualList","prevSelectedGeo","prevAppliedSearchTerm","allProjects","getPinnedProjectsLength","sortedPinnedProjects","projectListLength","clearFilteredProjectList","updateFilteredProjectAndEndIndexOfVirtualList","DocumentUploadStatusModel","RETRY_TOOLTIP","DELETE_PERMANENTLY_TOOLTIP","MAXIMIZE_TOOLTIP","MINIMIZE_TOOLTIP","RetryConfirmationModal","onRetry","CancelConfirmationModal","WORKFLOWS_POLLING_INTERVAL","StatementWorkflowController","_setIntervalForWorkflowStatus","intervalId","_clearIntervalForWorkflowStatus","clearInterval","_handleProjectSocket","previousProject","currentProject","STATEMENT_PROCESSING_BLOCK","STATEMENT_PROCESSING_ID_BLOCK","CANCEL_ICON_SIZE","REFRESH_ICON_SIZE","StatementProcessing","_toggleProcessingList","_hasWorkFlowFailed","workFlowStatus","_isWorkFlowScanning","isScanningWorkflowStep","_setRetryConfirmModal","showRetryConfirmModal","_setCancelConfirmModal","showCancelConfirmModal","_handleInfected","isDiplayedInfectedErrorToast","_minifiedPopover","getProcessingWorkflowsTotal","getFailedWorkflowsTotal","_expandedPopover","previousWorkFlowStatus","currentWorkflowRevisionId","currentWorkflowStatementId","_shouldExpandByDefault","expandByDefault","_userSwitchedProject","areWorkFlowsEqual","axis","handle","OmniaConfirmModal","onClickYes","onClickNo","TieoutBuildInfo","vstsBuild","projectVersion","omniaEnabled","PRIVACY_ANCHOR","NOTICES_ANCHOR","ABOUT_ANCHOR","COOKIES_ANCHOR","COOKIES_SETTINGS","click","Footer","buildInfo","setBuildInfo","fetchBuildInfo","getFullYear","privacy","notices","cookies","cookiesSettings","about","RecentUpdatesModal","innerTextHtml","setInnerTextHtml","showRecentUpdates","setShowRecentUpdates","fetchSummaryOfKeyChanges","DISCLOSURE_ANALYTICS_BANNER_HEIGHT","disclosureAnalyticsCSSVariable","disclosureAnalyticsHeaderHeight","HOME_PAGE_FOOTER_HEIGHT","homePageCSSVariable","footerHeight","HTMLEllipsis","MaintenanceBanner","projectListRef","homePageRightRef","bannerText","bannerDivRef","showBanner","setShowBanner","isSessionStoreConsistsBanner","fetchData","unsafeHTML","ellipsis","cookieChangeEventController","AbortController","HomePage","_navigateToOmniaEngagementPage","showConfirmModal","showRecentUpdatesModal","OptanonAlertBoxClosedCookie","refProjectList","refHomePageRight","cleanUpHomePageStore","abort","cookieStore","version","cookie","signal","omniaToken","displayProductUpdatesData","ENABLE_RECENT_UPDATES_NOTIFICATION","_setLocalStorageValueForShowingRecentUpdates","_setSessionStorageValueForShowingRecentUpdates","localStorageData","displayProductUpdatesSessionData","getEngagementId","hasOmniaEngagementBeenLinked","areThereTieoutEngagementEntities","isNotChrome","isChromium","chrome","winNav","vendorName","vendor","isOpera","opr","isIEedge","userAgent","isGoogleChrome","stepNum","Engagement","clientPrimaryInd","clientPrimarySector","clientType","secFilerStatus","tickerSymbol","EngagementList","engagementEntities","getMatDateFormat","currMonth","getMonth","setFullYear","getMatEngagementYears","currYear","years","NON_AUDIT_REASON","NON_AUDIT_REASON_MAP","NON_AUDIT_REASON_OPTIONS","USER_SEARCH_COLUMNS","ENGAGEMENT_SEARCH_COLUMNS","getAddedUserColumns","onRemoveClick","commonRoleOptions","XIcon","ProjectForm","transformArray","category","newArr","countryOfIssuanceDropdownValue","getContainerCodeDropdownValue","nonAuditReason","disabledTechSupportStatements","getDisabledStatementsByResponse","enabledTechSupportStatements","techSupportAccessHasBeenModified","enabledTechSupportStatementList","wrappedUpStatements","failedStatements","disabledIds","getTechSupportDropdownData","enabledIds","techSupportDropdownOptions","alreadyTechSupportEnabledStatementsData","getEnabledTechSupportStatementByResponse","supportIdFromTechSupportEnabledStatement","getSupportIdFromStatementLevel","statementsListForTechSupportOptions","resetStatementsListForTechSupportOptions","resetSupportId","resetEnabledTechSupportStatementList","nonAuditEngagementEntityDataHasBeenModified","alreadyAddedUser","userToRemove","curUser","legalHoldHasBeenModified","roleSet","allUsersHaveRoles","adminGroupHasBeenModified","modifyStatementsListForTechSupport","isStatementExist","getEnabledTechSupportStatementById","modifySelectableTechSupportStatements","isSelection","coeGroupHasBeenModified","_allUsersHaveAppropriateRoles","engagementFyeClone","clientNameEdited","coeGroupAddDate","adminGroupEnabledByUserName","coeGroupEnabledByUserName","getEngagementEntitiesRequest","getUserListRequest","searchString","pageNumber","numberOfRows","createNewProjectRequest","editProjectRequest","ProjectCreationNonAuditInputArea","setClientName","setEngagementName","setEngagementFye","projectInProgress","setNonAuditReason","isClientNameValid","ProjectInfo","_fetchEngagementEntities","_searchEngagement","debouncedSearch","_setEngagementEntity","setEngagementEntity","setNonAuditEngagementEntityDataHasBeenModified","_setEnagementData","setIsAuditClient","setProjectName","countryList","setProjectCountry","InfoIcon","getEngagementEntities","LearnMoreAboutRolesModal","ViewDisclaimerModal","AcknowledgeDisclaimerModal","toggleAcknowledge","setToggleAcknowledge","ManageUsers","_fetchSearchUserList","userListModel","_searchUser","_getNumAddedUserRows","_toggleLearnMoreModal","showLearnMoreModal","_toggleViewDisclaimerModal","showViewDisclaimerModal","_toggleAcknowledgementDisclaimerModal","showAcknowledgeDisclaimerModal","_onSupportTeamAccessChange","toggleHasAdminGroup","hasBeenOpened","addUserToProject","removeUserFromProject","assignUserProjectRole","containsUser","getUsers","isPpmdUserAdded","isEngagementOwnerUserAdded","rowId","ProjectCreationCancelModal","toggleCancelModal","onCancelAndLeavePage","ProjectCreation","getProjectContainerListData","_blockUrlNavigation","shouldBlockNavigation","returnValue","_toggleCancelModal","showCancelModal","_createNewProject","finishProjectCreation","_onCancelAndLeavePage","_onSave","shouldDisableCreateButton","unBlockNavigation","toLocation","initCurrentUser","setCountryOfIssuanceDropdownValue","BackButton","setName","initNotAuditClient","assignRoleToUser","isProjectValid","callbackToNavigateToHomePage","ProjectCreationPage","ppmd","ProjectEditNonAuditInputArea","EditProjectInfo","setSearch","getCountryMenuOptionByGeoCode","ViewTechSupportAccessDisclaimerModal","TechSupportAcknowledgeDisclaimerModal","onDisable","setSupportId","setEnabledTechSupportStatementList","disableTechSupportEditByRole","EditManageUsers","_toggleTechSupportAccessViewDisclaimerModal","showTechSupportAccessViewDisclaimerModal","_toggleTechSupportAccessAcknowledgementDisclaimerModal","showTechSupportAccessAcknowledgeDisclaimerModal","_onTechSupportAccessChange","toggleTechSupportAccess","_isSupportTeamAccessCheckboxDisabled","hasAdminGroupBeenModified","_isTechSupportAccessCheckboxDisabled","hasTechSupportAccessHasBeenModified","disableTechSupportAccess","removeSelectedTechSupportStatement","resetEnabledTechSupportStatementListData","isTechSupportStatementAccessEnabled","_canManageUsers","adminAddDate","adminAddName","CheckboxList","itemsList","setCheckbox","masterCheckboxChecked","setMasterCheckbox","itemsListLength","checkedAmount","EditManageLegalHold","setActiveStatements","setWrappedUpStatements","setDeletedStatements","masterCheckboxActive","setMasterCheckboxActive","masterCheckboxWrapped","setMasterCheckboxWrapped","masterCheckboxDeleted","setMasterCheckboxDeleted","hasPermissionToDisableLegalHold","copyActiveStatements","copyDeletedStatements","copyWrappedUpStatements","getCopyArray","checkboxType","hasPermissionToEnableLegalHold","statementToCheckboxInfo","statementsArray","checkboxArray","setLegalHold","checkCanChangeLegalHold","masterCheckbox","copyArray","masterCheckboxToggle","ProjectEditSectionMenu","sectionList","activeSectionId","ProjectEditCancelModal","ViewCOEDisclaimerModal","AcknoledgeCOEAccessDisclaimerModal","EditManageCOETeamAccess","toggleHasCoeGroup","setShowViewDisclaimerModal","setShowAcknowledgeDisclaimerModal","coeAddDate","coeAddName","PROJECT_EDIT_PAGE_ID_BLOCK","ProjectEdit","_handleScroll","sectionContainer","projectInfoRef","manageUsersRef","legalHoldRef","coeUserRef","_onSectionClick","_fetchSelectedProjectForEdit","_updateExistingProject","finishUpdatingExistingProject","activeSection","_isDeveloperAccessEnabled","sectionsElement","checkRefs","sectionsInfo","usersArray","doesUserArrayContainCurrentUser","ownprops","ProjectEditPage","maskUnits","setFiles","setFilesError","statementInProgress","setSelectStatementButtonDisabled","selectStatementButtonDisabled","getRootProps","isDragActive","evaluationGuide","statementname","focusable","CustomDatePicker","onDateChange","placeHolder","selectedDate","shoudlDisablePastDate","isFormItemRequired","dateValue","setDateValue","calendarDate","setCalendarDate","showCalendar","setShowCalendar","setDateFormat","isValidDate","setIsValidDate","disablePastDate","setDisablePastDate","isDateSelected","showFormItem","setShowFormItem","dateContainer","selectDate","day","month","toggleCalendar","getDate","currentMonth","isDateOutOfRangeValue","dateToCheck","getStyleForCurrentDate","prevMonth","prevDate","nextMonth","calendarDays","firstDayOfMonth","daysInMonth","startDay","getDay","prevMonthDays","isPastDate","isDateOutOfRange","prevYear","pastDate","dateRange","date1","date2","remainingDays","nextYear","refreshCalendar","dateComponentContent","fitContentWidth","weekDay","dayElement","PropsTypes","StatementInfo","_searchLanguages","_setLanguage","setLanguageType","_onClearLanguage","visitedPeriodEnding","visitedWrapUp","setPeriodEndingDateInputNode","setWrapUpDateInputNode","hasNewFileBeenUploaded","setStatementName","setStatementType","setNumberFormat","setQuarter","setFiscalYear","setPeriodEndingDate","setAccountingBasis","setRegistrant","setWrapUpDate","setAutoIdentifyIrs","setComfortLetter","setDefaultScaling","setDefaultUnit","_stepTwoValid","hasPermissionToEnableAutoIr","hasPermissionToEnableComfortLetter","isStatementTypePDF","visitedStatementName","getLanguageDropdownValues","Carryforward","_changeCarryForwordProject","changeCarryForwordProject","_getActiveProjectStatements","_initCarryForwardStatementCreation","_fetchProjectList","_setRadioOptionForCarryForward","setCarryForwardStatementCreation","setCarryForwardStatementIds","_clearCarryForwardStatementIds","setCarryForwardDetails","ol","getSelectedCarryForwardStatements","StatementCreationCancelModal","AdditionalConsiderationModal","StatementCreation","_toggleAdditionalConsiderationModal","showAdditionalConsiderationModal","_onCreateStatement","isAdditionalConsiderationModalEnabled","_createNewStatement","getProjectData","_fetchSelectedProjectDetails","_setFiles","_setFilesError","finishStatementCreation","ENABLE_CREATE_STATEMENT_ADDITIONAL_CONSIDERATION_MODAL","setCarryForward","setCarryForwardProject","isStatementValid","StatementCreationPage","StatementEditInfo","selectedLanguageValue","isLegalHoldCheckboxDisabled","selectedDateFormatValue","selectedNumberFormatValue","StatementEditCancelModal","StatementEdit","_fetchStatementEditInitData","_fetchSelectedStatementForEdit","selectedProjectApi","statementCreateEditApi","_editStatement","finishStatementEdit","statementHasBeenModified","hasStatementBeenModified","StatementEditPage","BlacklineViewToggle","StatementSummaryDropDown","onDisplayOptionChange","displayMenu","setDisplayMenu","onMousedownEvent","DISPLAY_SETTINGS_OPTIONS_ARRAY","OPTIONS1_CHECKBOX_ARRAY","iter","METRICS_CHECKBOX_ARRAY","OPTIONS2_CHECKBOX_ARRAY","OPTIONS3_CHECKBOX_ARRAY","unverifiedElementFilter","verifiedElementFilter","reviewedElementFilter","flaggedElementFilter","StatementSummaryElementsComponent","showElementListPanel","summaryElements","unverifiedPercentage","StatementSummaryNotesComponent","showNotesPanel","summaryNotes","shouldShowNotesSummary","StatementSummarySectionsComponent","summarySections","TASK_REVIEWED_ICON","StatementSummaryFlaggedComponent","shouldShowFlagsSummary","StatementSummaryElementsTotal","DISPLAY_ANNOTATION_SUMMARY_TAB_ARRAY","tooltipTexts","unselected","renderTooltipTextBySelection","_ref16","_ref17","_ref18","_ref19","_ref20","clearBatchModeIfPossible","displaySummaryOptions","setBatchModeSelectedIfPossible","setdisplayOptions","_userCanBatch","showAllDisabled","updatedOptions","handleChange","clipPath","IconDropDown","displayIconPlaceholder","arrowIcon","setDisplayOptions","iconDropDownContainer","getHighlightedDisplayValue","StatementAnnotationsUpdate","setAnnotationsDisplayPosition","annotationDisplayPosition","selectAnnotationPosition","ExpandAll","ContentViewModeIcon","FixedWidthIcon","FullWidthIcon","ZoomControl","onPlus","onMinus","zoomModel","shouldDisplayExpandIcon","disableDecrement","disableIncrement","isCopiedFormula","isSideBySidePage","zoomValue","currentPageNumber","sectionIdListData","getPageTopPosition","isPlusClicked","actualPageHeight","setSelectedNavigatorTab","fetchElementSearchResults","activeUsersList","shouldShowBlackLineToggle","names","getAllUsersNamesTooltip","useScreenSize","centerSectionRef","centerSectionWidth","setCenterSectionWidth","showBlacklinebanner","setShowBlacklineBanner","isBlacklineGuidListEmpty","isGuidListEmpty","RefreshIcon","GlobalHeader","SEGMENT_BLOCK","SEGMENT_LOADING_HEIGHT","CONTEXT_MENU_MARGIN","MAXIMUM_SELECTION_CHARACTERS","SectionContent","_userCanChangeContent","_enforceSelectionLengthLimit","removeAllRanges","_validateSelection","segmentRef","focusNode","handleMouseUp","persist","getSelection","selectionLabel","onStatementContextMenu","clientX","clientY","_initializeViewportDetection","contentPanelId","leftSideBySideView","CENTER_PANEL_ID","root","rootMargin","intersectionObserver","IntersectionObserver","isIntersecting","shouldShow","sectionSegmentRef","_fetchSectionContent","_setSectionHeight","newHeight","_getUnrenderedSection","_renderSegment","shouldRenderImmediately","intersectionObserverTOC","unobserve","isContentPanelScrolling","_scrollingHasStopped","reactSectionPrefix","data-height","minWidth","onMouseUp","isRangeSelectMode","mode","shouldElementBatchSelection","isModeForAddCursor","ignoreAnnotation","ignoreTagsInSelector","sectionIdSelector","isTextNote","nodeType","Node","TEXT_NODE","hasAncestorWithClassName","maxDepth","currentNode","currentDepth","matchSectionCount","cloneContents","getStartCharacterOffsetWithin","cloneRange","preRangeEndContainer","preRangeEndOffset","removeContentWithIgnorableSelectors","ignorable","getEndCharacterOffsetWithin","clonedRange","contentFragment","ignoreElement","removeChild","getElementCSSXPath","ignoreTag","siblings","sib","previousSibling","reverse","getSafeParentForRange","getSafeParentForNode","isTextContentEmpty","nextSibling","firstChild","hideContextMenu","centerPanelRef","toggleAddNavigationModal","menuRef","centerPanel","containsElement","matchSectionOrElement","containsSection","containsTableCell","isInsideTableCells","multipleSectionsSelected","selectedCellsCount","matchTableCellCount","containsNotes","noteSelector","contents","matchesOrContainsNote","containsSectionAnchor","matchesOrContainsSection","selectedParagraphCount","matchParagraphTagCount","canCreateNotes","_permissionToEdit","_calculateX","_calculateY","_handleClick","_addElement","tieoutSectionId","_addNote","rangeClone","getRangeMinusIgnorableContent","startNode","endNode","textLength","originalLength","getContentLength","calculatedY","calculatedX","scrollLeft","offsetLeft","AddNavigationModal","highlightCreatedNavigation","_addNavigation","selectionRange","inlineInsertion","selectionText","sectionNameEnumEntity","abbreviatedName","shortName","addedSection","OK","_isTechnicalSection","_isRootLevelSection","getSectionParentId","_enableInlineButton","manualHeading","isTechnicalSection","_enableIndentButton","_toolTipText","chlidren","isExistingSection","getNewSection","_toolTipTextRadio","uniqueId","StatementContentPanel","_determineCenterElementBeforeZoom","isReportPreview","xCenterOfViewportForSideBySideView","xCenterOfViewport","yCenterOfScrollArea","_centerElementBeforeZoom","elementFromPoint","_zoomOnCenterElement","onMouseMoveDrag","panelRef","_removeMouseDragEventListeners","isUserDragging","initDragStateToDefault","_getCurrentMouseCoordinates","mouseCurrentX","mouseCurrentY","drawDragBox","onMouseDownDrag","mouseStartX","mouseStartY","onMouseUpDrag","findSelectedElementsOnMouseUp","onContextMenu","contextMenuVisible","contextMenuSectionId","contextMenuSelection","contextMenuPosition","contextMenuLabel","onHideContextMenu","pageX","pageY","showAddNavigationModal","topLeftX","topLeftY","_downToRight","_upToRight","_downToLeft","selectionWidth","selectionHeight","elementsInSelection","dragSelectElements","tieoutElementBlock","selectableElements","selectionTop","selectionLeft","elementBoundingRect","currentElementTop","currentElementLeft","coordinatesCollide","elementLeft","elementHeight","elementWidth","_draggingInitialized","nextState","prevMode","newMode","isNowDragSelectMode","_initMouseDragEventListeners","isNowNonDragSelectMode","aTop","aLeft","aWidth","aHeight","bTop","bLeft","bWidth","bHeight","doCoordinatesCollide","_isRangeSelectMode","_shouldCenterZoomedPanel","isRightSideStatementView","rightStatementCursorClassName","offsetParent","transformOrigin","withURLRouter","URLString","strokeLinecap","strokeLinejoin","StatementReadOnlyBanners","isBatchModeSelected","STATEMENT_CONTENT_BLOCK","contextMenuData","clearSelection","overlayCanvas","topPostion","setLeftPosition","addElement","filteredTableData","filtered","columnIndex","isTable","containsNote","containesElementArray","addNote","HtmlOverlay","box","borderStyle","RenderPolygonBasedStatementDetails","coordinates","loopCount","showIcon","ElementFlagComponentOCR","TieoutElementOCR","modifier","isFeatureFlagEnabledForComfortAssigned","showComfortAssignedStatus","getElementCSSFromSelectedElementMap","renderElements","StatementContentOverlayElementMap","ElementDetailsOCR","markerDisplayValue","calloutDisplayValue","ElementDetailsContainerOCR","pageElements","BLACKLINE_VIEW_CHANGE_TYPE","BlacklineViewChanges","isSectionLoaded","blacklineDetails","blacklineDataToHTMLMap","highlightNotes","NoteDetailsOcr","updatedPolygonWidth","updatedPolygonHeight","noteElement","remainingSpaceToAddOrSubtract","backgroundColor","NotesDetailsContainerOCR","pageNotes","searchResultsContent","setActiveEntry","isInitiated","sectionData","CONTENT_SEARCH_RESULT_BLOCK","TieoutContentSearchOCR","contentDetails","StatementContentSearchOverlayMap","StatementContentSearchComponentOCR","pageSectionId","subArr","SectionContentOverlayOCR","setShouldShow","ocrWords","isDrawing","isApiCallMadeToRenderSection","rootElementId","intersectionObserverConfig","abortController","currentOverlayCanvas","contentEditable","BLOCK_ID","sectionOCRCache","clickedSectionId","setClickedSectionId","LEFT_BLOCK_ID","setSelection","setIsDrawing","setBox","setAnnotaionsList","elementIdToElementMap","pageStyles","ocrLines","ocrTables","currentSelection","setCurrentSelectionState","setContextMenuData","selectedLines","setSelectedLines","handleMouseDown","ocrLinesData","ocrTablesData","cells","cell","flat","highlightSelection","throttle","char","startDefined","startingWord","setCurrentSelection","endingWord","curentSelection","mouseUpActions","polygonData","tableDataSelected","ocrLinesSelected","tablesData","table_column_row_ids","spans","offsets","lastWord","updatedPolygon","apiPolygons","X1","Y1","X2","Y2","X3","Y3","X4","Y4","polygonConvertor","newArrayOfCharacters","obj1","matchingObj","obj2","polygon_in_pixels","prevData","startX","startY","endX","endY","charExists","onMouseMove","currentX","currentY","prevBox","findElementsForBacthUpdate","scrollingTimeout","leftScrollingTimeout","StatementContentPanelOCR","statementRef","leftStatementRef","setCurrentPage","setContentPanelScrolling","isLeftContentPanelScrolling","setLeftContentPanelScrolling","statementViewerCenter","visibleChild","newPage","imageCache","jsonCache","elementListCache","blacklineListCache","guidList","notesCacheData","notesListCache","AnnotationDetails","setElementData","elementDataFromElementCache","protoTypes","excludeElementFromElementList","ElementPanelHeader","RemoveIcon","EXPANDABLE_ROW_BLOCK","EXPAND_OCR_ROW_TOOLTIP","COLLAPSE_OCR_ROW_TOOLTIP","ExpandableRow","_expandedExpandableRow","expandExpandableRow","minimizeExpandableRow","showExpandableRow","isElementPanel","minimizeId","maximizeId","TICKMARK_ATTACH_TOOLTIP","onAddTickmark","PlusCircle","onClickOutside","onCreate","showCreateButton","resultRef","isFunction","Plus","TICKMARK_DETACH_TOOLTIP","TickmarkEntryWithDetach","onDetach","detachIcon","Detach","ConfirmOverrideSystemFlag","onClickCancel","_fetchTickmarks","_createNewTickmark","onTickmarkAttach","searchComponentRef","setTickmarkListModel","attachTickmark","setAttachTickmark","errorMsgId","seterrorMsgId","_clearSearch","updateAttachTickmarkFromSearch","tickmarkTextToBeCreated","attachTickmarkList","_fetchSuggestedTickmarks","_handleAttachTickmark","tickmarkIndex","_searchTickmarks","_shouldClearResults","_onDetachTickmark","returnTopNTickmarks","tickmarkToAttach","_onClickOutside","errorTxt","MAX_CHAR_LENGTH_TO_SEARCH","TickmarkForm","errorDuplicateTickmarkflag","isTextPresent","isTextTooLong","isTickmarkIdDuplicate","ElementStatus","resetState","showInformationMessage","setCurrentElementAnnotationsTab","setText","onAttachTickmark","expanded","showConfirmOverrideSystemFlag","infoTooltip","infoHoverIcon","infoIcon","onCreateTickmark","fetchTickmarkList","leftPanel","ElementAttribute","_searchEntities","_setEntity","getPeriodDropdownValues","hasPeriodDropdownValue","getEntityDropdownValues","ElementAttributes","setExpanded","renderEntry","elementAction","changeDate","changedDate","FORMULA_ENTRY_TOOLTIP","COPY_FORMULA_TOOLTIP","formulaEntry","formulaDeleteAction","CopyFormulaAction","isSelectedForCopy","isFormulaCopied","isSystemFlagOverride","isFormulaRounded","getExpression","CopyFormulaIcon","TrashCan","DEFAULT_HOVERED_FORMULA_INDEX","ElementFormulaList","_handleFormulaEntryHover","newIndex","hoveredFormulaIndex","_clearHoveredFormulaIndex","replaceSelectedElements","_shouldClearHighlightedElements","_shouldHighlightNewElements","onNew","onEdit","_onCopyFormula","ocrTable","_saveFormulaOnSelect","getFormulas","copiedObj","INTERNAL_REF_ENTRY_TOOLTIP","InternalReferenceElementEntry","elementDetachAction","selectElementAction","highlighted","shouldFlagIR","Unlink","BatchElementUpdateForm","shouldDeleteFormulas","shouldDeleteIntRef","shouldDeleteTickmarks","shouldDeleteComfortLetters","shouldDeleteWpRefs","shouldAddTickmarks","comfortLetterIds","cfltr","shouldAddComfortLetters","workpaperRefIds","workpaperRefs","shouldAddWpRefs","hasTickmark","filteredTickmarks","leftPanelWorkpaper","leftPanelTickmark","copyAnnotation","toggleCopyAnnotation","verifyLinkedReference","toggleVerifyLinkedReference","duplicateFlag","workPapers","irs","workpaperReferenceDto","wps","wp","getRelatedWorkPapers","setworkPapers","tickmarkDtoList","ticks","tick","getRelatedTickmarks","setTickmarks","ir","setCount","setMasterChecked","TOTAL_CHECKBOXES","prevWp","newWorkPaper","prevTick","newTickmarks","totalSelected","_onCopyorVerifyAnnotations","apiRequestPayload","checkedWorkPaper","checkedTickmarks","setTickmarkList","setWorkpaperList","newTickmark","CopyAnnotationButton","componentClassNameConstant","showCopyAnnotationModal","setShowCopyAnnotationModal","updateWorkpaper","ElementInternalReferenceList","setSelected","getInternalReferenceElementList","getInternalReferencesSortedById","onAddLink","IR_ATTACH_TOOLTIP","suggestedReferenceCount","WorkpaperEntry","WorkpaperEntryWithDetach","WorkpaperList","currentTickmarkId","onAttach","_permissionToAttach","getTickmarksSortedAlphabetically","CreateComfortLetterModal","_handleCreateClick","COMFORT_LETTER_ATTACH_TOOLTIP","onAddComfortLetter","ComfortLetterSearchResults","AttachComfortLetter","onSearchComfortLetter","setComfortLetters","_fetchSuggestedComfortLetters","returnTopNComfortLetters","_handleAttachComfortLetter","COMFORT_LETTER_DETACH_TOOLTIP","ComfortLetterEntryWithDetach","onDetachComfortLetter","showCreateComfortModal","setShowCreateComfortModal","_handleCreateNewComfortLetter","_toggleCreateComfortLettterModal","_canDetachOrAttachComfortLetter","_searchComfortLetters","currentComfortLetterID","setCurrentComfortLetterID","getComfortLettersSortedAlphabetically","primaryAnnotationActions","onCreateNewFormula","onAddWorkpaper","onAddInternalReference","onCopyAllFormula","secondaryAnnotationActions","onEditFormula","onDetachWorkpaper","onDetachTickmark","setShowExpandableRow","onCopyAll","FORMULA_HEADER_INFORMATION_TOOLTIP","disableRemove","operatorHovered","setOperatorHovered","FormulaRowManualInput","handleOnFocus","checkEmptyInput","setSelectedRowNumber","isFocused","numberInput","handleOnBlur","handleOnChange","textInput","_isNotValid","formattedFormulaValue","externalSectionId","FormulaPanelRoundNumberModal","currentNumber","setInputValue","removeRounding","setNewValue","saveButtonDisabled","setSaveButtonDisabled","decimalsResult","decimals","digits","linebreak","arrow","selectElement","setRoundingResult","selectedRowId","setSelectedRowId","previousSelected","showRoundNumberModal","setShowRoundNumberModal","setRoundNumberInputValue","isFirstRounding","getValidationMessage","flaggedFormula","prevToggle","getRoundedNumberIcon","rowAbove","rowBelow","_rowAboveIsValue","_rowBelowIsValue","_disableRemoveOperator","CrossIcon","disableAddOperator","disableAddRow","FormulaPanelEdit","FormulaPanelContent","handleElementDisplayOnMouseEnter","elementDisplayHovered","handleElementDisplayOnMouseLeave","isInputEmpty","saveFormula","_isFormulaValid","isFormulaValid","FormulaPanel","_determineActionOnCancel","_confirmCancelFromCancelModal","closeFormulaPanelFlyout","fetchElementsAfterModalClose","handleSaveFormula","updateFormula","showFormulaPanel","isAnimated","showCancelModalBoolean","shouldOpenNotePanelAfterCancel","openNotePanelAfterCancel","selectedNoteAfterFormulaCancel","selectedNotePseudoId","INTERNAL_REFERENCE_HEADER_INFORMATION_TOOLTIP","SUGGESTED_REFERENCES_ELEMENT_ENTRY","InternalReferenceSuggestedReferences","onAddSuggestion","suggestedElement","prototypes","InternalReferenceListing","getInternalReferencesByTimeCreated","internalReferenceNumber","InternalReferencePanelContent","isSuggestedRefExpanded","_toggleSuggestedRefExpandableRow","addSuggestionToInternalReference","InternalReferenceContent","InternalReferenceCancelModal","InternalReferencePanel","showInternalReferencePanel","initInternalReferencePanel","closeInternalReferencePanel","closeModal","confirmCancelModal","WorkpaperReferenceList","filteredWorkpapers","alreadyAddedWorkpaperIds","workpaperDropdownOptions","MIN_CHAR_LENGTH_TO_SEARCH","AttachWorkpaper","_searchWorkpapers","_fetchWorkpaperReferences","workpaperListModel","hideTitle","getWorkpaperDropdownValues","getSelectedWorkpaper","CreateWorkpaperModal","workpaperInProgress","trimmedWorkpaperReference","_isRequestErrorForDuplicate","setDuplicateErrorLoaded","_referenceNumberErrorText","visitedReferenceName","visitedReferenceNumber","isWorkpaperValid","setReferenceNumber","setReferenceName","WorkpaperPanel","_toggleCreateWorkPaperModal","showCreateWorkpaperModal","_handleCreateNewWorkpaper","fetchWorkpaperList","onCreateWorkaper","closeWorkpaperPanel","showWorkpaperPanel","CREATE_TICKMARK_DUPLICATE_ERROR","CreateTickmarkModal","tickmarkInProgress","setDuplicateTickmarkFlag","isTickmarkValid","AttachTickmark","setCurrentTickmarkId","ElementTickmarkPanel","_toggleCreateTickmarkModal","showCreateTickmarkModal","_handleCreateNewTickmark","_onSearchTickmark","onSearchTickmark","closeTickmarkPanel","showTickmarkPanel","CopyFormulaBanner","numberOfSelections","numberOfElementsSelectedForCopy","ElementPanel","_shouldRenderElementPanelContent","shouldShowElementPanel","toggleFormulaPanel","createNewFormula","toggleInternalReferencePanel","_closeFormulaPanel","_closeInternalReferencePanel","_getFormulaDetailsForEdit","toggleWorkpaperPanel","showFormulaPanelFlyout","SectionDetailsHistoryElement","sectionAction","fullUserName","showHistory","setShowHistory","AssignSectionModal","setAssignedUsers","disableSaveButton","setDisableSaveButton","disableDeleteAllButton","setDisableDeleteAllButton","assignedUsersArray","sectionAssignmentsArray","handleSave","handleDeleteAll","handleChipRemove","handleUserSelect","DISABLED_REVIEW_BUTTON_TOOLTIP","hideSectionPanel","shouldShowSectionPanel","permissionToReview","permissionToAssign","isStatementReadyOnly","shouldExpandExpandableRow","setShouldExpandExpandableRow","setToggleStatus","setShowInformationMessage","showSectionAssignModal","setShowSectionAssignModal","userAlreadyReviewed","_onSectionAssignSaveAndDeleteAllUsers","handleSignOffClick","hasSectionBeenReviewedByOtherUser","CREATED","handleRemoveSignOffClick","clickOnInfoButton","hasUsersAssignedToSection","ToolkitOption","shouldDisplay","TOOLKIT_OPTIONS","statementNav","StatementNavIcon","NoteOpen","TickmarkIcon","compare","CompareIcon","exportOption","ExportIcon","WPIcon","auditChecklist","Rocket","ComfortAnnotationIcon","sideBySidePanel","SideBySideIcon","chatBotpanel","ChatBotIcon","Toolkit","onStatementNavClick","onNotesClick","onTickmarksClick","onCompareClick","currRightPanel","onExportClick","onWorkPaperClick","onChatBotIconClick","onAuditChecklistClick","onComfortAnnotationButtonClick","isSideBySideMenuDisabled","withRouter","EDIT_SECTION_MODAL","TreeView","toggle","hidden","scrollBasedHighlighted","onOpenEditNavigation","onOpenDeleteNavigation","recentlyAdded","isSideBySideViewMode","showEditAndDeleteIconInRow","isEditAndDeleteNotPermitted","expandable","EditSectionModal","resp","disableSaveBtn","readonly","DeleteConfirmationModal","onSuccess","isSectionReviewed","onConfirmDelete","rx","filterUnits","colorInterpolationFilters","floodOpacity","stdDeviation","in2","StatementNavBulkSelectUsers","StatementNavBulkSelectSections","selectedUser","isUserActive","SECTIONS_BULK_ACTIONS_TYPE","BULK_ACTIONS_RADIO_OPTIONS","unassign","BULK_ACTIONS_RADIO_OPTIONS_ARRAY","unassignRevisionSectionAssignment","BulkAssignSectionsModal","currentSection","updateBulkSectionsReviewRequest","updateBulkSectionsUnReviewRequest","collapsibleNodesState","setCollapsibleNodesState","sectionsChecked","setSectionschecked","checkAll","setCheckAll","setCheckedCount","sectionBulkAction","setSectionBulkAction","max_count","prevSectionsChecked","handlesectionAssign","handleSectionUnassign","handleSectionReview","handleSectionUnReview","disableSaveButtonForOtherThanAssignAction","bulkActionToHandlerMap","bulkActionToDisableFunctionMap","setAllChecked","renderTree","nodes","toggleNode","TABLE_OF_CONTENTS","DEFAULT_HIDDEN_HIGHLIGHT_VALUE","HIGHLIGHTED_SECTION","HIDDEN_SECTION","setSectionAssigmentsFilterMode","setResultsFromAssignmentFilter","headingAssignmentRefreshAction","searchResultNodesState","setSearchResultNodesState","isOpenEditSection","setIsOpenEditSection","isOpenDeleteSection","setIsOpenDeleteSection","setCurrentNode","searchForSectionAssignmentsMode","setSearchForSectionAssignmentsMode","showRefreshButtonTooltip","setShowRefreshButtonTooltip","showBulkAssignModal","setShowBulkAssignModal","_isBulkAssignNotPermitted","_isEditBookmarkNotPermitted","doesNotHaveEditPermission","revisionIdToTimestampMap","currentTime","startingTime","endingTime","currentBookmark","toggleAll","_hasNewSearchResults","resultsCount","highlightOnlyMap","occurrence","closestBookmark","bookmarkSectionId","unHideParentSections","REFRESH_ELEMENT_TOOLTIP","_setTimeStampInLocalStorage","timestampMap","newEndingTime","handleSectionAssignmentClick","updateAssignedSectionsToUser","onNodeSelect","isInProgress","_noAssignments","refreshButton","handleRefresh","findChildNodeById","refreshButtonWrapper","activeEntry","highlightContent","sectionElementName","sectionOnTable","searchedWordInElement","_scrollElementIntoViewAndOpenElementPanel","highlightSearchTermInLabel","highlightSearchTermInDisplayValue","ELEMENTS_SEARCH_BLOCK","clearRangeModeIfPossible","batchPanelIsOpen","elementsStillSelected","batchSelectedAmount","searchResultsElement","isFilterApplied","setIsFilterApplied","isStatementReadOnly","selectAll","setSelectAll","setSelectedElements","batchElements","prevBatchIsOpen","setDataForBatchUpdate","removeDataForBatchUpdate","filtersCopy","maxAllowedElements","totalElementsSearched","getData","_ctrlPressListener","_ctrlReleaseListener","_shiftPressListener","_shiftReleaseListener","em","p","hasAllResults","_isModeForAddCursor","sectionReviewRequest","sectionUnReviewRequest","THUMBNAIL_CLASS","THUMBNAIL_ID","apiCalls","OcrNavigation","scrollToChange","loadThumbnailsInView","scrollToCurrentThumbNail","thumbnails","scrollAreaBounds","newThumbnails","thumbnailPage","loaded","promiseThumbnail","renderThumbnails","navigateToSelectedPage","sectionDetails","onSelectElementResult","currentSectionId","searchResultsElements","onSelectContentResult","_getChipFromArray","baseId","clearVerified","verifiedChiptext","clearReviewed","reviewedChiptext","clearComfortAssign","comfortAssignChiptext","flagChipText","arePeriodsSelected","clearPeriods","periodChipText","areScalingsSelected","clearScalings","scalingChipText","areUnitsSelected","clearUnits","unitChipText","areEntitiesSelected","clearEntities","entityChipText","clearWPR","wprChipText","clearWPRAutomated","wprAutomatedChipText","clearWPRManual","wprManualChipText","clearComfortLetter","comfortLetterChipText","irChipText","clearIRAutomated","irAutomatedChipText","clearIRManual","irManualChipText","tickmarksChipText","clearTMAutomated","automatedTickmarksFlagChipText","clearTMManual","manualTickmarksFlagChipText","formulaChipText","clearAutomatedFormulaFlag","automatedFormulaFlagChipText","clearManualFormulaFlag","manualFormulaFlagChipText","clearTypeFormula","roundedFormulaChipText","clearSectionIds","pageSegmentChipText","sectionSegmentChipText","ElementFiltersFlaggedTertiary","setFilters","setFormulaFlag","setIRFlag","ElementFiltersUnFlaggedTertiary","setFlagOverride","selectPeriod","setSections","fetchSectionList","hasBeenFetched","filteredSectionsHierarchy","ElementFiltersScaling","selectScaling","ElementFiltersUnit","selectUnit","selectEntity","SourceElementFilter","automatedChecked","automatedOnChange","manualChecked","manualOnChange","ElementFiltersFormulaTertiary","setAutomatedFormulaFlag","setManualFormulaFlag","setFormulaRecalc","setFormulaFoot","setFormulaCrossFoot","setFormulaRounded","setWorkpapers","prevFilters","fetchWorkpapers","setWPRAutomated","setWPRManual","getFilteredWorkpaperRefs","selectWPReferences","_fetchTickmarksByKeywords","setTMAutomated","setTMManual","selectTickmarks","_fetchComfortLetters","getFilteredComfortLetters","selectComfortLetter","ElementFiltersIRTertiary","setIRAutomated","setIRManual","ElementFiltersStatementPages","setSectionIdList","selectPages","ELEMENT_FILTERS_BLOCK","StatementNavElementFiltersModal","toggleModal","onApply","currFilters","clearElementFilterResults","selectedPrimaryFilter","setSelectedPrimaryFitler","FilterCategory","selectedFilter","hasFilters","setVerified","setReviewed","setParentFlagged","setWPR","setIR","setParentFormula","getSecondaryFilterCategories","getTertiaryFilterCategories","NEXT_TOOLTIP_PROPS","PREV_TOOLTIP_PROPS","ELEMENTS_VLIST_BLOCK","StatementNavigatorResultsControls","isStatementOCR","hasPrev","hasNext","isContentTab","onClickPrev","prevResult","nodeId","onClickNext","nextResult","ArrowUp","ArrowDown","isElementTab","onClosePanel","onContentSearch","onClearSearch","ocrContentSearchResult","setSearchResultsContent","showFilterModal","setShowFilterModal","isSearchExecuted","setIsSearchExecuted","sectionAssignmentsFilterMode","resultsFromAssignmentFilter","toggleFilterModal","fetchSectionTree","_searchElements","immediateSearchTerm","onSearchClear","_searchContent","firstOccurrence","intlProps","getResultCount","filtersCount","checkIfWithWPRIsSelected","removeWPFilters","checkIfWithTickmarksIsSelected","removeTickmarkFilters","fullSelctor","strokeMiterlimit","strokeDasharray","strokeDashoffset","fontFamily","fontWeight","textAnchor","mixBlendMode","ExcludeElementsConfirmModal","onClickSave","batchCount","setUpdates","setShowCreateWorkpaperModal","_toggleCreateWorkpaperModal","_onCreateWorkpaper","u","attachWpr","removeWpr","setShowCreateTickmarkModal","_onAttachTickmark","_onCreateTickmark","detachTickmark","removeElementFromBatch","showMore","elementsIndex","elementsExpanded","setElementsExpanded","getElements","getSelectedElements","Caret","MAX_NUMBER_OF_ELEMENTS_TO_RENDER","BatchPanelComfortLetters","_onCreateBulkComfortLetter","attachComfortLetter","BATCH_BLOCK","BATCH_ID_BLOCK","leftPanelComfortLetter","setEntitySearch","expandStatus","setExpandStatus","expandTickmarks","setExpandTickmarks","expandComfortAssign","setExpandComfortAssign","expandWpr","setExpandWpr","expandComfortLetter","setExpandComfortLetter","expandAnnotations","setExpandAnnotations","showExcludeModal","setShowExcludeModal","expandAttributes","setExpandAttributes","setElementsIndex","setShowConfirmOverrideSystemFlag","addAnnotationsElementIds","elementsAmount","DisabledRemoveIcon","setExclude","setSystemFlagOverride","setUnits","updateEntity","toggleDeleteWorkpaper","toggleDeleteInternalRef","toggleDeleteTickmarks","toggleDeleteFormulas","toggleDeleteComfortLetters","unSetExclude","hasUpdatesSelected","NotesForm","allowSpaceInQuery","trigger","markup","appendSpaceOnAdd","displayTransform","renderSuggestion","highlightedDisplay","focused","currentUserFullName","cancelAddNote","onCreateNote","noteInProgress","setNoteInProgress","disableAddNoteButton","setDisableAddNoteButton","setNoteType","setBody","NoteReplyInputArea","cancelAddNoteReply","createNoteReply","NoteEditInputArea","cancelEditNote","onEditNote","hasNoteBeenEdited","NOTES_STATUS_ICON_PROPS","onDeleteNote","onCreateOrDeleteNoteReply","currRevisionNum","showReplyTextArea","setReplyTextArea","showEditTextArea","setEditTextArea","showNoteReplies","setShowNoteReplies","htmlId","sectionHeader","_permissionToManageNotes","setNoteEdit","GhostIcon","PrioritySelectedIcon","setNormalPriority","PriorityDefaultIcon","setHighPriority","ClosedIcon","setOpen","OpenIcon","setClosed","getNoteReplyCount","ReplyIcon","EditIcon","TrashCanIcon","setNoteReply","toISOString","getSortedNoteRepliesByLastModified","setNoteReplyDelete","noteCount","countObject","priorityNotes","openNotes","closedNotes","ghostNotes","isGHostNote","getNoteCount","NotesFilterChips","basedId","filterChipsFilterObject","_getChipTextForMentions","getUserNameChipText","selectedUsers","selectedUsersArray","userNameChipText","userNameChipTextReplies","selectedSegmentsText","getStatementSegmentsChipText","userNameCreatedAndRepliedtext","userNameTaggedUsersText","NotesPanelUserFilter","showCreatedByUsers","updateUserFilter","selectedAllUsers","getInitialUserFilterData","usersListNotesCreatedByObj","usersListNotesRepliedByObj","usersCreatedAndRepliedAndMentionsObj","usersTaggedUsers","idOfNoteCreator","taggedUsersInNoteBody","taggedUsersInReply","createdUsers","repliedUsers","createdAndRepliedUsers","updateSelectedSegmentsObject","validSearchTerm","noteFiltersStateObject","setNoteFiltersStateObject","setUserFilterCreated","setUserFilterReplied","setSelectedSegments","setSelectedAllUsers","setUserFilterMentionedUsers","checkboxValue","showNamesByNoteTaker","updatedSelectedObject","updatedSelectedAllUsers","cancelFilter","updatedSegments","showAdvancedFilterModal","setShowAdvancedFilterModal","toggleAdvancedFilterModal","noteIndex","numberOfNotes","areNoteFiltersApplied","updateAdvancedFilter","hideNotesPanel","clearNoteSelection","shouldShowNotesPanel","DEFAULT_NOTE_TYPE","addNoteMode","setAddNoteMode","hasSelection","_onCreateNewNote","toSendEmailFormat","TickmarkPanelDeleteModal","tickmarkToEdit","fromTickmark","setTickmarkInProgress","fetchTickmarkListWithoutLoading","showEditTickmarkModal","setShowEditTickmarkModal","setTickmarkToEdit","tickmarkToDelete","setTickmarkToDelete","_handleTickmarkEditClick","_handleTickmarkDeleteClick","onDeleteTickmark","onEditTickmark","icons","CollapsibleRow","sectionInfo","diffData","addedSections","changedSections","deletedSections","diffStats","getStats","getDiff","TOOLKIT_DISABLED_DOWNLAOD_BUTTON_TOOLTIP","ExportWorkpaperModal","onOptionsChange","wkpBundleOptions","elementIdIncluded","elementStatusIncluded","elagStatusIncluded","shouldShowCheckBoxOptions","validation","isDownloadButtonDisabled","flagStatusIncluded","OMNIA_FILE_SHARING_MODAL","OmniaFileSharingConfirmModal","processingStatus","fileShareInProgress","onClickLink","reportElementIdEnabled","reportElementStatusEnabled","reportFlagStatusEnabled","OmniaFileSharingConfirmModal2","softDeletedRevision","shareToOmniaTooltip","disableshareToOmnia","selectedExportOption","setSelectedExportOption","_permissionToShareFile","showShareToOmniaModal","setShareToOmniaModal","showConfirmationMessageModal","setShowConfirmationMessageModal","setWkpBundleOptions","omniaUnlinked","downloadModalProps","setDownloadModalProps","showStatementExportInProgressModal","setShowStatementExportInProgressModal","_handleShareFile","handleExportOptionSelect","EXPORT_PANEL_BLOCK","hasReportTypeDownloadProcessing","prevOptionValue","TOOLKIT_EXPORT_MODULE_TABS","DOWNLOADS","TOOLKIT_CANCEL_EXPORT_BUTTON_TOOLTIP","DownloadCard","selectedId","setSelectedId","cancelReportProcessing","onClickDownload","blobResonse","isReportProcessed","refreshReportList","sortByTime","cardData","TabModelIcon","tabId","classname","tabIconData","getDownloadTabCountIcon","countValue","setNewIcon","openedSubTab","originalReportList","filteredReportList","reportCount","switchToolkitExportModuleTabs","updateAnswer","toggleButton","permissionToModifyAnswer","checkIfButtonIsDisabled","handleAnswerClick","AuditChecklistPanelContent","auditQuestionpaperList","buttonStatus","questionElement","AuditCheckListConfirmationModal","toggleCheckBox","setToggleCheckBox","onClickDisable","setOnClickDisable","fetchAuditChecklist","auditQuestionsList","allowEdit","setAllowEdit","showAuditConfirmationModel","setShowAuditConfirmationModel","checkListStatus","permissionToModifyChecklist","lengthOfChecklist","temp","saveAuditChecklist","ToolkitDeleteWorkpaperModal","workpaperToEdit","setWorkpaperInProgress","setVisitedReferenceNumber","setVisitedReferenceName","WorkPaperPanelContent","setWorkPaperToEdit","workpaperToDelete","setWorkpaperToDelete","onEditWorkpaper","onDeleteWorkpaper","setShowSecondaryMessage","setClearSessionModal","clearSessionModal","setIndexingCompleted","data-tip","data-for","getContent","mainTitle","purposeTitle","purposeDescription","internalUseTitle","internalUseDescription","servicesTitle","servicesDescription1","servicesDescription2","servicesDescription3","servicesDescription4","servicesDescription5","outputTitle","outputDescription","ChatBotPanelGuidanceMessage","showSecondaryMessage","PADDING_HEIGHT","DEFAULT_VISIBLE_ROWS","useAutoSizeTextArea","maxVisibleRows","lineHeight","textAreaMaxHeight","useAutoFocus","focusOnMount","onTextAreaChange","handleSend","inputFieldDisable","footerRef","goodResponseDefaultState","completeness","accuracy","understandability","badResponseDefaultState","incorrect_topic","incorrect_sources","inappropriate","DOC_INDEXING_STATUS","goodReasonCheckboxOptions","badReasonCheckboxOptions","createPreviousMessages","groupedArray","groupedObject","RESPONSE_FEEDBACK_MODAL","ChatbotPanelResponseFeedback","setShowModal","isGoodResponse","setMessages","defaultState","textAreaInput","setTextAreaInput","reasons","setReasons","isAnyReasonSelected","isSubmitBtnDisabled","reasonList","feedback_reason","requestParams","_type","_transaction_date","release_id","file_key","feedback_type","feedback_select","feedback_comment","human_message","gpt_response","actual_gpt_response","document_source","documentSource","previousMessages","messageObj","isFeedbackTaken","isGoodFeedbackTaken","isBadFeedbackTaken","groupedCitations","citation","citationString","RESPONSE_TYPE","MessageBubble","showModal","setGoodResponse","onResponseTypeClick","shouldShowThumbsUpIcon","shouldShowThumbsDownIcon","isUser","citation_string","formattedCitation","groupCitation","displayResponse","ChatWindow","isIndexingCompleted","ChatBotClearSessionAcknowledgeModal","textAreaRef","bannerRef","bannerHeight","setBannerHeight","setFooterHeight","setInputFieldDisable","msg","typingMessage","userFilterSelected","currentMessage","requestId","prevMessages","handleSendChatData","TIE_OUT_CHECK_BOXES","VERIFICATION_STATUS","labelId","REVIEW_STATUS_ELEMENTS","REVIEW_STATUS_HEADINGS","COMFORT_ASSIGNED_ON_ELEMENTS","ANNOTATION_CHECK_BOXES","FORMULAS","INTERNAL_REFERENCES","WORKPAPER_REFERENCES","SYSTEM_USER_FLAGS","COMFORT_LETTER_ANNOTATION","ATTRIBUTES","NOTES_CHECK_BOXES","REVIEW_NOTES","OBSERVER_NOTES","BLACKLINE_CHECK_BOXES","BLACKLINE_VERSION","checkboxName","_shouldRenderCheckbox","isExportCustomReportDisabled","tieOutExpanded","setTieOutExpanded","annotationExpanded","setAnnotationExpanded","notesExpanded","setNotesExpanded","blacklineExpanded","setBlacklineExpanded","tieoutStatusCheckBoxes","setTieoutStatusCheckBoxes","annotationsCheckBoxes","setAnnotationCheckBoxes","notesCheckBoxes","setNoteCheckBoxes","blackLineCheckBoxes","setBlackLineCheckBoxes","masterCheck","setMasterCheck","MAX_COUNT","batchCheckBoxToggleHelper","booleanValue","prevCount","checkTieOutVerif","checkTieOutReviewEle","checkTieOutReviewHead","checkComfortAssign","checkAnnotForm","checkAnnotTick","checkAnnotIRs","checkAnnotWRs","checkAnnotSysFlag","checkComfortLetter","checkAttributes","checkNotesClient","checkNotesReview","checkNotesObserver","checkBlacklineVer","showBatchBanner","setShowBatchBanner","getBannerObject","bannerObj","showToggle","revisionStatements","getAllRevisionsAndStatementData","showMarkerOrCallout","BlacklineOCRPreviousVersionView","BlacklineOCRCurrentVersionView","BlacklineVersionView","RecentStatementUpdatesModal","myGif","TABLE_CONTROLS_ID","SCROLL_TIMEOUT","StatementContent","_scrollDetection","_scrollingTimeout","_initBatchCtrlListeners","_cleanUpBatchCtrlListeners","_ctrlPressed","showBlackLineViewReadOnlyBanner","showStatementRecentUpdatesModal","_scrollingInitialized","prepareStatementContent","displayStatementUpdatesData","displayStatementUpdatesSessionData","StatementContentPage","getEngagementListColumns","onProjectClick","handleOnClickLink","handleOnClickUnlink","OMNIA_ENGAGEMENT_LIST_BLOCK","OmniaIcon","_permissionToLinkOmnia","OMNIA_ENGAGEMENT_LIST_ID_BLOCK","OmniaLinkingConfirmModal","engagementToLink","OmniaUnLinkingConfirmModal","onClickUnlink","showLinkConfirmModal","setShowLinkConfirmModal","showUnlinkConfirmModal","setShowUnlinkConfirmModal","setEngagementToLink","getGeoName","TieoutPage","to","_userLogout","SUPPORT_REQUEST_ANCHOR","link","Unauthorized","getHeaderPlugin","PublicRoute","hideHeaderPlugin","showHeaderPlugin","component","rest","Authorized","isAuthStatus401UnAuthorized","authenticateCurrentUser","isUserAuthorized","ProtectedRoute","authenticationRender","AuthenticationContext","RouteNotFound","AuthSuccess","SessionTimeoutModal","timer","isStatementSocketDisconnected","isProjectSocketDisconnected","countdowndownStartTime","warningCountdown","setWarningCountdown","warningIsShown","setWarningIsShown","warningCheckInterval","updateCountdown","warningTimeLeft","INTERVAL","countdownDisplay","useIdleTimer","onIdle","ManageUsersAdmin","userEntityArray","setUserListModel","setUserEntityArray","userEntity","entityData","entityIndex","DISPLAY_DATE_FORMAT","DateTimePicker","onTimeChange","selectedTime","maxTimeDetail","onClockClose","onClockOpen","openClockOnFocus","maxDetail","DATE_REGEX","MaintenanceBannerAdmin","bannerData","setStartDate","setEndDate","validStartDate","setValidStartDate","validEndDate","setValidEndDate","setStartTime","setEndTime","setBannerText","switchToggle","setSwitchToggle","showEditButton","setShowEditButton","_saveData","valueOf","isValidEndDateTime","startDateTime","unix","endDateTime","isAfter","isDateTimeNotPredated","isBannerTextTooLong","maintenanceId","ConfirmButton","SummaryOfKeyChanges","isMounted","isSaveDisabled","setDataLoading","getBannerText","monitoringCountrySelected","setMonitoringCountrySelected","newData","monitoringOptionsList","getContainerCodes","monitoringOptionsSelected","totalStatementsInEachStatus","selectAdminModuleTab","adminModuleMaintenacePageList","adminModuleTabs","defaultSelectedTab","tabSelected","switchAdminModuleTabs","getTagForStatementName","dropdownOptionsForRevision","dropdownOptionsForStatements","TAB_NAME","SelectStatement","isButtonDisabled","setSourceStatementParamsValues","selectedProjectData","setStatementList","setSelectedStatement","selectedStatementProcessType","setSelectedStatementProcessType","setSelectedStatementRevision","projectOptions","statementOptions","_fetchStatementList","getStatementNameMenuOptions","onStatementSelection","SelectRevisionTab","prevRevision","setPreviousRevision","isImmediateRevisionExist","statementNameWithVersion","sideClassName","SideBySideStatementNavFlyout","statementOCRNavigationData","LEFT_OCR_BLOCK_ID","LeftSideStatementView","getStatementHeader","_initSideBySideCtrlListeners","_cleanUpSideBySideCtrlListeners","clearSideBySideModeIfPossible","isSideBySideModeSelected","leftPanelRef","onConfirmStatement","isSwapped","setLeftStatementNavPanel","leftStatementNavPanel","_isStatementNavSelected","loadSourceStatement","setDisabled","leftActive","rightActive","tabname","RIGHT_STATEMENT_PANEL","RIGHT_OCR_BLOCK_ID","RightSideView","_initRightSideStatement","currentStatementWithRevisionLabel","rightPanelRef","rightStatementNavPanel","setRightStatementNavPanel","_isStatementNavButtonSelected","Option","onToggle","SIDE_BY_SIDE_DROPDOWN_BLOCK","setShow","dropdownOptions","setDropdownOptions","dropdownRef","selectedOptions","selectedAnnotationOptions","HeaderWrapper","shouldDisableSyncScroll","SubHeader","setLoadSourceStatement","setIsSwapped","shouldDisableMapBtn","setShouldDisableMapBtn","setShouldDisableSyncScroll","viewType","isBothNotLegacyOrOCRStatements","leftStatementView","rightStatementView","onClearSelection","oldState","showStatementNav","_toggleStatementNav","LeftSideHTMLStatementPreview","REPORT_PREVIEW_LEFT_BLOCK","toggleViews","showElementId","setShowElementId","setShowElementStatusAndFlag","setShowStatementNav","displayOptionsConfig","displayAll","scaledValue","pageNo","OPTIONS_CHECKBOX_ARRAY","ReportPreviewPageDisplayOptions","reportPreviewPageDisplayOptions","setPreviewPageDisplayOptionAction","ELEMENT_TITLE_INDEX","statusConstants","getElementReoprtColumns","elementReportColumns","elementFlagged","flagFormula","buildStatus","comfortLetterDto","elementColumns","getElementPositionInElementList","elementReportData","ReportPreviewRightSideView","scrollLock","isRefreshing","setRefreshing","isListLoading","setListLoading","isListLoaded","setListLoaded","allList","setAllList","setIndex","renderedElementList","setRenderedElementList","setElementReportData","getDisplayOptions","setReportPreviewPageDisplayOptions","dataGridList","behaviour","sectionIdListInView","filteredElementList","sectionElementDetails","getElementListBySections","ex","onRefreshData","updatedState","k","allTrue","allFalse","elementReportDataLength","calcIndex","onBackButtonClick","ReportPreview","setToggleViews","AdobeTrackerComponent","_isHomePage","SupportedLanguages","getLangaugeMenuByLanguageCode","langMenu","supportedLanguageMenuOptions","languageMenu","LocaleCode","Language","UserSettingsModal","setSelectedLanguage","setLanguageOptions","fetchSupportedLanguageAndSetOptions","supportedLanguageResponse","getLanguagesMenu","DAUserSettings","showSettingsModal","setShowSettingsModal","App","LogoutPage","SessionTimeoutPage","OmniaEngagementPage","AdminModulePage","SideBySideViewPage","transition","Slide","hideProgressBar","pauseOnFocusLoss"],"mappings":"yHAAA,wEAAMA,EAAoB,SAACC,GAAD,OAAiB,OAARA,QAAwBC,IAARD,GAG7CE,EAAiC,SAACF,GACtC,MAAmB,oBAARA,EACFA,IAEAA,I,6WCLEG,EAAqB,SAAC,GAM5B,IALLC,EAKI,EALJA,SACAC,EAII,EAJJA,SACAC,EAGI,EAHJA,kBACAC,EAEI,EAFJA,kBACAC,EACI,EADJA,kBAEA,OAAOC,cACJC,KADI,oCAE0BH,EAF1B,mBAEsDD,EAFtD,6BAE4FD,EAF5F,mBAE+GD,EAF/G,QAGHI,GAEDG,MAAK,SAACC,GACL,OAAOA,M,4ECTAC,EACX,SAAC,GAAD,IAAGC,EAAH,EAAGA,SAAH,8CACA,WAAOC,EAAUC,GAAjB,qBAAAC,EAAA,2DAOMD,IAH0BE,EAJhC,EAEIC,GACEC,eACEC,qBAAwBH,0BAIxBI,EARR,YAQsCJ,KACdJ,EAASS,OAASD,EAAwBC,QAG3CC,KAZvB,0CAeqCT,EAC7BU,GAA6CX,IAhBrD,cAeYY,EAfZ,yBAmBaA,GAnBb,kCAqBMC,QAAQC,MAAM,sCAAd,MArBN,iCAwBS,IAxBT,0DADA,yDA4BWC,EACX,SAAC,GAAD,IAAGf,EAAH,EAAGA,SAAH,8CACA,WAAOC,EAAUC,GAAjB,qBAAAC,EAAA,2DAOMD,IAH0Bc,EAJhC,EAEIX,GACEC,eACEC,qBAAwBS,0BAIxBC,EARR,YAQsCD,KACdhB,EAASS,OAASQ,EAAwBR,QAE3CC,KAXvB,gCAYmCT,EAC7BiB,YAA6B,CAC3BlB,WACAmB,kBAAkB,KAf1B,cAYUP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AEf,kBAAC,GAAD,UC/HVjF,IAASuqK,OAAO,kBAAC,GAAD,MAASt0K,SAASkL,eAAe,W","file":"static/js/main.94aa1a5e.chunk.js","sourcesContent":["const isNullOrUndefined = (val) => val === null || val === undefined;\r\nconst isObjectEmpty = (obj) =>\r\n obj.constructor === Object && Object.entries(obj).length === 0;\r\nconst extractPropFromFunctionOrValue = (val) => {\r\n if (typeof val === 'function') {\r\n return val();\r\n } else {\r\n return val;\r\n }\r\n};\r\nexport { isNullOrUndefined, isObjectEmpty, extractPropFromFunctionOrValue };\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\n\r\nexport const mapElementsRequest = ({\r\n targetId,\r\n sourceId,\r\n targetStatementId,\r\n sourceStatementId,\r\n elementMapDetails,\r\n}) => {\r\n return withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/source/${sourceStatementId}/target/${targetStatementId}/revisions/source/${sourceId}/target/${targetId}/map`,\r\n elementMapDetails,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n","import { getElementDetailsRequest } from 'api/element-api';\r\nimport { ElementSelectionLimit } from 'higher-order-components/tieout-element-hoc-component';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { getMultipleElementsFromCache } from './element-cache-actions';\r\n\r\nexport const addElementsToSourceListInSideBySideMode =\r\n ({ elements }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n ui: {\r\n sideBySideView: {\r\n sideBySideElementMap: { sourceStatementElementMap },\r\n },\r\n },\r\n } = getState();\r\n const sourceSideBySideMapping = [...sourceStatementElementMap];\r\n const totalElements = elements.length + sourceSideBySideMapping.length;\r\n\r\n // Check if total elements are within the limit\r\n if (totalElements <= ElementSelectionLimit) {\r\n try {\r\n // Fetch elements from cache\r\n const selectedElements = await dispatch(\r\n getSourceSideBySideMultipleElementsFromCache(elements),\r\n );\r\n\r\n return selectedElements;\r\n } catch (error) {\r\n console.error('Error fetching elements from cache:', error);\r\n }\r\n }\r\n return [];\r\n };\r\n\r\nexport const addElementsToTargetListInSideBySideMode =\r\n ({ elements }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n ui: {\r\n sideBySideView: {\r\n sideBySideElementMap: { targetStatementElementMap },\r\n },\r\n },\r\n } = getState();\r\n const targetSideBySideMapping = [...targetStatementElementMap];\r\n const totalElements = elements.length + targetSideBySideMapping.length;\r\n\r\n if (totalElements <= ElementSelectionLimit) {\r\n const selectedElements = await dispatch(\r\n getMultipleElementsFromCache({\r\n elements,\r\n isSideBySideView: true,\r\n }),\r\n );\r\n return selectedElements;\r\n }\r\n return [];\r\n };\r\n\r\nexport const getSourceSideBySideMultipleElementsFromCache =\r\n (elements) => async (dispatch, getState) => {\r\n const dataState = getState().data;\r\n const uiState = getState().ui;\r\n const { leftElementCache } = dataState.leftStatementContent;\r\n const { revisionId } = uiState.sourceStatementParams;\r\n let selectedElements = [];\r\n let initiatedRequest = false;\r\n await Promise.all(\r\n elements.map(async ({ elementId, sectionId }) => {\r\n try {\r\n if (!isNullOrUndefined(elementId)) {\r\n let elementData = leftElementCache.getElement({\r\n elementId,\r\n sectionId,\r\n });\r\n if (isNullOrUndefined(elementData)) {\r\n if (!initiatedRequest) {\r\n initiatedRequest = true;\r\n }\r\n\r\n const response = await getElementDetailsRequest({\r\n elementId,\r\n revisionId: revisionId,\r\n });\r\n elementData = new ElementDetails().setLoaded({ response });\r\n }\r\n selectedElements.push(elementData);\r\n }\r\n } catch (e) {\r\n console.error(\r\n 'Failed to load elements while making batch selection in side by side view',\r\n e,\r\n );\r\n }\r\n }),\r\n );\r\n return selectedElements;\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n getSectionIdListRequest,\r\n getSectionSegmentsRequest,\r\n getRevisionPeriodListRequest,\r\n getClientEntityListRequest,\r\n getBlacklineViewStatusRequest,\r\n} from 'api/statement-content-api';\r\nimport { getElementsBySectionRequest } from 'api/element-api';\r\nimport { clearStatementPageRevisionStoreAction } from 'store/actions/revision-actions';\r\nimport { fetchLeftRevision } from 'store/actions/left-revision-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { updateSelectedProjectFromID } from 'store/actions/selected-project-actions';\r\nimport {\r\n createSectionCacheTracker,\r\n createLeftSectionCacheTracker,\r\n updateSectionViewedTimestamp,\r\n checkCacheToPurge,\r\n calculateSizeAndAddSectionToCache,\r\n getContentSectionMapRequest,\r\n} from 'store/actions/section-cache-actions';\r\nimport { checkLeftCacheToPurge } from 'store/actions/left-statement-section-content-actions';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport { STATEMENT_NAV_TABS } from 'constants/feature/statement-navigator-constants';\r\nimport { batchAddElementFormulaRows } from 'store/actions/formula-actions';\r\nimport {\r\n searchElements,\r\n deselectSelectedElement,\r\n} from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport { setSelectedTabAction } from 'store/actions/statement-navigator/navigator-panel-actions';\r\nimport { scrollSectionIntoView } from 'utils/scrolling-utils';\r\nimport { batchAddElementsToBatch } from './batch-panel-actions';\r\nimport {\r\n fetchNotesBySection,\r\n fetchLeftNotesBySection,\r\n} from './notes-cache-actions';\r\nimport {\r\n hideSectionDetailsPanelAction,\r\n showSectionDetailsPanelAction,\r\n showStatementNavPanelAction,\r\n} from 'store/actions/panel-controller-actions';\r\nimport {\r\n fetchSectionReviews,\r\n fetchSectionReviewsWithLoading,\r\n} from 'store/actions/sections-actions';\r\nimport {\r\n setSourceStatementBatchElementsMapAction,\r\n setTargetStatementBatchElementsMapAction,\r\n} from './side-by-side-statement/side-by-side-statement-actions';\r\nimport {\r\n setStatementSocketClient,\r\n initStatementSocketClientAction,\r\n} from 'store/actions/statement-socket-actions';\r\nimport { addUserToRevision } from 'store/actions/active-users-actions';\r\nimport { fetchSectionHistoryDetails } from 'store/actions/section-review-history-actions';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport { selectNoteFromNoteListAction } from 'store/actions/notes-panel-actions';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { fetchSectionAssignmentsList } from 'store/actions/section-assignment-actions';\r\nimport { addElementForCopyFormula } from 'store/actions/copy-formula-actions';\r\nimport { getAllUsers } from 'store/actions/project-users-list-actions';\r\n\r\nimport { getUpdatedSectionElementsNotesSummaryCount } from '../../utils/heading-data-utils';\r\nimport { fetchSectionTreeAction } from './section-tree-list-actions';\r\nimport {\r\n blacklineTogleNotification,\r\n isElementHasAnyAnnotations,\r\n} from 'utils/statement-content-page-utils';\r\nimport { BLACKLINE_VIEW_STATUS } from 'constants/feature/statement-content-constants';\r\nimport { clearleftSectionTreeListAction } from './side-by-side-statement/left-statement-section-tree-list-actions';\r\nimport { mapElementsRequest } from 'api/side-by-side-view-api';\r\nimport {\r\n successElementMapNotification,\r\n failureElementMapNotification,\r\n seggregateSourceTargetElements,\r\n highlightMappedElementsByResponse,\r\n handleElementMappingFailure,\r\n} from 'constants/feature/tieout-element-utils';\r\nimport { clearSideBySideElementsMap } from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { updateCacheWithMostRecentSideBySideElementChanges } from 'store/actions/element-changes-since-tracker-actions';\r\nimport { CONTEXT_KEY } from 'api/api-client';\r\nimport {\r\n fetchSelectedStatement,\r\n selectedStatementError,\r\n chatBotPushIndex,\r\n} from './selected-statement-actions';\r\nimport {\r\n addElementsToSourceListInSideBySideMode,\r\n addElementsToTargetListInSideBySideMode,\r\n} from './left-side-by-side-batch-actions';\r\nimport { getSelectedStatementOCRNavigationData } from './ocr-navigation-actions';\r\nimport { clearLeftSelectedStatement } from './left-selected-statement-actions';\r\nimport {\r\n fetchAllOCRSectionRenderingData,\r\n fetchSectionOCRSegmentsStatementContent,\r\n} from './statement-content-actions-ocr';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\nimport { updateElementCacheByCalloutAction } from './element-cache-actions';\r\nimport { updateSideBySideElementCacheByCallouts } from 'store/actions/statement-content-annotation-creation-actions';\r\n\r\nlet isIntervalAlreadySet = null;\r\nexport const mapElementsSuccessResult = 'success';\r\nexport const mapElementsFailureResult = 'failure';\r\n\r\nexport const sectionIdListStatementContentLoading = createAction(\r\n 'SECTION_ID_LIST_STATEMENT_CONTENT_LOADING',\r\n);\r\nexport const sectionIdListStatementContentLoaded = createAction(\r\n 'SECTION_ID_LIST_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const sectionIdListStatementContentError = createAction(\r\n 'SECTION_ID_LIST_STATEMENT_CONTENT_ERROR',\r\n);\r\nexport const leftSectionIdListStatementContentLoading = createAction(\r\n 'LEFT_SECTION_ID_LIST_STATEMENT_CONTENT_LOADING',\r\n);\r\nexport const leftSectionIdListStatementContentLoaded = createAction(\r\n 'LEFT_SECTION_ID_LIST_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const leftSectionIdListStatementContentError = createAction(\r\n 'LEFT_SECTION_ID_LIST_STATEMENT_CONTENT_ERROR',\r\n);\r\nexport const sectionHTMLSegmentsStatementContentLoading = createAction(\r\n 'SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_LOADING',\r\n);\r\nexport const sectionHTMLSegmentsStatementContentLoaded = createAction(\r\n 'SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const sectionHTMLSegmentsStatementContentLoadedWithoutResponse =\r\n createAction(\r\n 'SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_LOADED_WITHOUT_RESPONSE',\r\n );\r\nexport const sectionHTMLSegmentsStatementContentError = createAction(\r\n 'SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_ERROR',\r\n);\r\nexport const leftSectionHTMLSegmentsStatementContentLoading = createAction(\r\n 'LEFT_SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_LOADING',\r\n);\r\nexport const leftSectionHTMLSegmentsStatementContentLoaded = createAction(\r\n 'LEFT_SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const leftSectionHTMLSegmentsStatementContentLoadedWithoutResponse =\r\n createAction(\r\n 'LEFT_SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_LOADED_WITHOUT_RESPONSE',\r\n );\r\nexport const leftSectionHTMLSegmentsStatementContentError = createAction(\r\n 'LEFT_SECTION_HTML_SEGMENTS_STATEMENT_CONTENT_ERROR',\r\n);\r\nexport const setSectionInViewStatementContent = createAction(\r\n 'SET_SECTION_IN_VIEW_STATEMENT_CONTENT',\r\n);\r\nexport const clearSectionInViewStatementContent = createAction(\r\n 'CLEAR_SECTION_IN_VIEW_STATEMENT_CONTENT',\r\n);\r\nexport const clearSectionContentWithIdsFromCache = createAction(\r\n 'CLEAR_CONTENT_WITH_IDS_FROM_CACHE',\r\n);\r\nexport const clearOCRSectionContentWithIdsFromCache = createAction(\r\n 'CLEAR_OCR_CONTENT_WITH_IDS_FROM_CACHE',\r\n);\r\nexport const clearLeftOCRSectionContentWithIdsFromCache = createAction(\r\n 'CLEAR_LEFT_OCR_CONTENT_WITH_IDS_FROM_CACHE',\r\n);\r\nexport const clearOCRSectionImageWithIdsFromCache = createAction(\r\n 'CLEAR_OCR_IMAGE_WITH_IDS_FROM_CACHE',\r\n);\r\nexport const clearLeftOCRSectionImageWithIdsFromCache = createAction(\r\n 'CLEAR_LEFT_OCR_IMAGE_WITH_IDS_FROM_CACHE',\r\n);\r\nexport const sectionElementsLoading = createAction('SECTION_ELEMENTS_LOADING');\r\nexport const sectionElementsLoaded = createAction('SECTION_ELEMENTS_LOADED');\r\nexport const sectionElementsError = createAction('SECTION_ELEMENTS_ERROR');\r\n\r\nexport const leftSectionElementsLoading = createAction(\r\n 'LEFT_SECTION_ELEMENTS_LOADING',\r\n);\r\nexport const leftSectionElementsLoaded = createAction(\r\n 'LEFT_SECTION_ELEMENTS_LOADED',\r\n);\r\nexport const leftSectionElementsError = createAction(\r\n 'LEFT_SECTION_ELEMENTS_ERROR',\r\n);\r\nexport const clearLeftStatementContent = createAction(\r\n 'CLEAR_LEFT_STATEMENT_CONTENT',\r\n);\r\nexport const setStatementContentTab = createAction('SET_STATEMENT_CONTENT_TAB');\r\n\r\nexport const selectElementContentPanel = createAction(\r\n 'SELECT_ELEMENT_CONTENT_PANEL',\r\n);\r\nexport const deselectElementContentPanel = createAction(\r\n 'DESELECT_ELEMENT_CONTENT_PANEL',\r\n);\r\nexport const deselectElementsFromArrayContentPanel = createAction(\r\n 'DESELECT_ELEMENT_FROM_ARRAY_CONTENT_PANEL',\r\n);\r\nexport const clearSelectedElementsContentPanel = createAction(\r\n 'CLEAR_SELECTED_ELEMENTS_CONTENT_PANEL',\r\n);\r\nexport const clearLeftSelectedElementsContentPanel = createAction(\r\n 'CLEAR_LEFT_SELECTED_ELEMENTS_CONTENT_PANEL',\r\n);\r\nexport const selectMultipleElementsContentPanel = createAction(\r\n 'SELECT_MULTIPLE_ELEMENTS_CONTENT_PANEL',\r\n);\r\nexport const replaceSelectedElementsContentPanel = createAction(\r\n 'REPLACE_SELECTED_ELEMENTS_CONTENT_PANEL',\r\n);\r\nexport const replaceSelectedElementWithoutRemovingOld = createAction(\r\n 'REPLACE_SELECTED_ELEMENTS_WITHOUT_REMOVING_OLD',\r\n);\r\nexport const replaceLeftSelectedElementWithoutRemovingOld = createAction(\r\n 'REPLACE_LEFT_SELECTED_ELEMENTS_WITHOUT_REMOVING_OLD',\r\n);\r\nexport const deallocateSelectedElementsContentPanel = createAction(\r\n 'DEALLOCATE_SELECTED_ELEMENTS_CONTENT_PANEL',\r\n);\r\n\r\nexport const setHighlightedElementIdContentPanel = createAction(\r\n 'SET_HIGHLIGHTED_ELEMENT_ID_CONTENT_PANEL',\r\n);\r\n\r\nexport const selectSectionContentPanel = createAction(\r\n 'SELECT_SECTION_CONTENT_PANEL',\r\n);\r\nexport const deselectSectionContentPanel = createAction(\r\n 'DESELECT_SECTION_CONTENT_PANEL',\r\n);\r\nexport const clearSelectedSectionsContentPanel = createAction(\r\n 'CLEAR_SELECTED_SECTIONS_CONTENT_PANEL',\r\n);\r\nexport const selectMultipleSectionsContentPanel = createAction(\r\n 'SELECT_MULTIPLE_SECTIONS_CONTENT_PANEL',\r\n);\r\nexport const replaceSelectedSectionsContentPanel = createAction(\r\n 'REPLACE_SELECTED_SECTIONS_CONTENT_PANEL',\r\n);\r\nexport const deallocateSelectedSectionsContentPanel = createAction(\r\n 'DEALLOCATE_SELECTED_SECTIONS_CONTENT_PANEL',\r\n);\r\nexport const periodListStatementContentLoading = createAction(\r\n 'PERIOD_LIST_STATEMENT_CONTENT_LOADING',\r\n);\r\nexport const periodListStatementContentLoaded = createAction(\r\n 'PERIOD_LIST_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const periodListStatementContentError = createAction(\r\n 'PERIOD_LIST_STATEMENT_CONTENT_ERROR',\r\n);\r\n\r\nexport const entityListStatementContentLoading = createAction(\r\n 'ENTITY_LIST_STATEMENT_CONTENT_LOADING',\r\n);\r\n\r\nexport const entityListStatementContentLoaded = createAction(\r\n 'ENTITY_LIST_STATEMENT_CONTENT_LOADED',\r\n);\r\n\r\nexport const entityListStatementContentError = createAction(\r\n 'ENTITY_LIST_STATEMENT_CONTENT_ERROR',\r\n);\r\n\r\nexport const setContentSearchAction = createAction('SET_CONTENT_SEARCH');\r\nexport const clearContentSearchAction = createAction('CLEAR_CONTENT_SEARCH');\r\n\r\nexport const setContentHighlightSelector = createAction(\r\n 'SET_CONTENT_HIGHLIGHT_SELECTOR',\r\n);\r\n\r\nexport const clearContentHighlightSelector = createAction(\r\n 'CLEAR_CONTENT_HIGHLIGHT_SELECTOR',\r\n);\r\nexport const clearStatementPageStoreAction = createAction(\r\n 'CLEAR_STATEMENT_PAGE_STORE',\r\n);\r\n\r\nexport const clearLeftStatementPageStoreAction = createAction(\r\n 'CLEAR_LEFT_STATEMENT_PAGE_STORE',\r\n);\r\n\r\nexport const elementDatapartStoreAction = createAction(\r\n 'UPDATE_ELEMENT_DATAPART_STORE',\r\n);\r\n\r\nexport const leftElementDatapartStoreAction = createAction(\r\n 'UPDATE_LEFT_ELEMENT_DATAPART_STORE',\r\n);\r\n\r\nexport const sectionDetailsLoaded = createAction('SECTION_DETAILS_LOADED');\r\nexport const sectionDetailsLoading = createAction('SECTION_DETAILS_LOADING');\r\nexport const clearSectionDetails = createAction('CLEAR_SECTION_DETAILS');\r\n\r\nexport const setSourceSyncScrollId = createAction('SET_SOURCE_STATEMENT_ID');\r\nexport const setTargetSyncScrollId = createAction('SET_TARGET_STATEMENT_ID');\r\n\r\nexport const fetchSectionIdListStatementContent =\r\n (revisionId, isOCR, projectId, statementId) => async (dispatch, getStore) => {\r\n dispatch(sectionIdListStatementContentLoading());\r\n try {\r\n const response = await getSectionIdListRequest({\r\n revisionId,\r\n isOCR,\r\n clientId: projectId,\r\n statementId,\r\n });\r\n const { selectedStatement } = getStore().data;\r\n if (window.location.pathname.includes('statement')) {\r\n dispatch(\r\n sectionIdListStatementContentLoaded({\r\n response,\r\n isOCR: selectedStatement.isOCR, //used in section cache model to store image\r\n }),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(sectionIdListStatementContentError(error));\r\n }\r\n };\r\n\r\nexport const fetchLeftSectionIdListStatementContent =\r\n (revisionId, statementId, projectId, isOCR) => async (dispatch) => {\r\n dispatch(leftSectionIdListStatementContentLoading());\r\n try {\r\n const response = await getSectionIdListRequest(\r\n { revisionId, statementId, isOCR, clientId: parseInt(projectId) },\r\n {\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: projectId,\r\n },\r\n );\r\n dispatch(\r\n leftSectionIdListStatementContentLoaded({\r\n response,\r\n isOCR,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(leftSectionIdListStatementContentError(error));\r\n }\r\n };\r\n\r\nexport const fetchRevisionPeriodList =\r\n (revisionId, statementId) => async (dispatch) => {\r\n dispatch(periodListStatementContentLoading());\r\n try {\r\n const response = await getRevisionPeriodListRequest(\r\n revisionId,\r\n statementId,\r\n );\r\n dispatch(\r\n periodListStatementContentLoaded({\r\n response,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(periodListStatementContentError(error));\r\n }\r\n };\r\n\r\nexport const fetchClientEntityList = (clientId) => async (dispatch) => {\r\n dispatch(entityListStatementContentLoading());\r\n try {\r\n const response = await getClientEntityListRequest(clientId);\r\n dispatch(\r\n entityListStatementContentLoaded({\r\n response,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(entityListStatementContentError(error));\r\n }\r\n};\r\n\r\nexport const fetchSectionHTMLSegmentsStatementContentWithoutLoading =\r\n ({ sectionIdList, segmentType }) =>\r\n async (dispatch, getStore) => {\r\n const {\r\n data: { revision },\r\n } = getStore();\r\n getSectionSegmentsRequest({\r\n revisionId: revision.id,\r\n sectionIdList,\r\n segmentType,\r\n })\r\n .then((response) => {\r\n const {\r\n ui: {\r\n statementPage: { contentSearch },\r\n },\r\n } = getStore();\r\n dispatch(\r\n sectionHTMLSegmentsStatementContentLoaded({\r\n response,\r\n searchTerm: contentSearch,\r\n }),\r\n );\r\n dispatch(\r\n calculateSizeAndAddSectionToCache({ sectionId: sectionIdList[0] }),\r\n );\r\n // after set in cache, evaluate cache\r\n dispatch(checkCacheToPurge());\r\n dispatch(\r\n elementDatapartStoreAction({\r\n response,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(sectionHTMLSegmentsStatementContentError(error));\r\n });\r\n };\r\n\r\nexport const fetchSectionHTMLSegmentsStatementContent =\r\n ({ sectionIdList, segmentType, scrollToSection }) =>\r\n async (dispatch, getStore) => {\r\n const {\r\n data: { revision },\r\n } = getStore();\r\n const locationPath = window.location.pathname.split('/');\r\n const revisionId = locationPath[locationPath.indexOf('revision') + 1];\r\n dispatch(sectionHTMLSegmentsStatementContentLoading(sectionIdList));\r\n getSectionSegmentsRequest({\r\n revisionId: revision.id || revisionId,\r\n sectionIdList,\r\n segmentType,\r\n })\r\n .then((response) => {\r\n const {\r\n ui: {\r\n statementPage: { contentSearch },\r\n },\r\n } = getStore();\r\n dispatch(\r\n sectionHTMLSegmentsStatementContentLoaded({\r\n response,\r\n searchTerm: contentSearch,\r\n }),\r\n );\r\n const sectionId = sectionIdList[0];\r\n if (scrollToSection && !isNullOrUndefined(sectionId)) {\r\n scrollSectionIntoView(sectionId);\r\n }\r\n dispatch(\r\n calculateSizeAndAddSectionToCache({ sectionId: sectionIdList[0] }),\r\n );\r\n // after set in cache, evaluate cache\r\n dispatch(checkCacheToPurge());\r\n dispatch(\r\n elementDatapartStoreAction({\r\n response,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(sectionHTMLSegmentsStatementContentError(error));\r\n });\r\n };\r\n\r\nexport const fetchLeftSectionHTMLSegmentsStatementContent =\r\n ({ statementId, sectionIdList, segmentType, scrollToSection }) =>\r\n async (dispatch, getStore) => {\r\n const {\r\n data: { leftRevision },\r\n ui: {\r\n sourceStatementParams: { projectId },\r\n },\r\n } = getStore();\r\n dispatch(leftSectionHTMLSegmentsStatementContentLoading(sectionIdList));\r\n getSectionSegmentsRequest({\r\n statementId,\r\n revisionId: leftRevision.id,\r\n sectionIdList,\r\n segmentType,\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: projectId,\r\n })\r\n .then((response) => {\r\n const {\r\n ui: {\r\n statementPage: { contentSearch },\r\n },\r\n } = getStore();\r\n dispatch(\r\n leftSectionHTMLSegmentsStatementContentLoaded({\r\n response,\r\n searchTerm: contentSearch,\r\n }),\r\n );\r\n const sectionId = sectionIdList[0];\r\n if (scrollToSection && !isNullOrUndefined(sectionId)) {\r\n scrollSectionIntoView(sectionId);\r\n }\r\n // after set in cache, evaluate cache for left statement of side by side view page\r\n dispatch(checkLeftCacheToPurge());\r\n dispatch(\r\n leftElementDatapartStoreAction({\r\n response,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(leftSectionHTMLSegmentsStatementContentError(error));\r\n });\r\n };\r\n\r\nexport const fetchElementsBySection =\r\n ({ sectionId }) =>\r\n (dispatch, getStore) => {\r\n const {\r\n revision,\r\n annotationDisplayOptions,\r\n statementContent: { elementCache },\r\n } = getStore().data;\r\n\r\n const locationPath = window.location.pathname.split('/');\r\n const revisionId = locationPath[locationPath.indexOf('revision') + 1];\r\n const isPreviewPage = isElementReportPreviewPage(window.location.pathname);\r\n\r\n dispatch(sectionElementsLoading({ sectionId }));\r\n getElementsBySectionRequest({\r\n sectionId,\r\n revisionId: revision.id || revisionId,\r\n isPreviewPage,\r\n })\r\n .then((response) => {\r\n if (response.data && annotationDisplayOptions.showAll) {\r\n response.data = response.data.map((item) => {\r\n return {\r\n ...item,\r\n marker: false,\r\n callout:\r\n isElementHasAnyAnnotations(item) &&\r\n annotationDisplayOptions.showAll,\r\n };\r\n });\r\n } else if (elementCache.getCurrentSectionIds().length) {\r\n const elementIds = elementCache.getElementIdsBySectionId({\r\n sectionId,\r\n });\r\n if (elementIds.marker.length || elementIds.callout.length) {\r\n response.data = response.data.map((item) => {\r\n return {\r\n ...item,\r\n marker: elementIds.marker.includes(item.id),\r\n callout:\r\n elementIds.callout.includes(item.id) &&\r\n isElementHasAnyAnnotations(item),\r\n };\r\n });\r\n }\r\n }\r\n dispatch(\r\n sectionElementsLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(sectionElementsError({ sectionId, error }));\r\n });\r\n };\r\n\r\nexport const fetchLeftElementsBySection =\r\n ({ sectionId, statementId }) =>\r\n (dispatch, getStore) => {\r\n const {\r\n leftRevision,\r\n annotationDisplayOptions,\r\n leftStatementContent: { leftElementCache },\r\n } = getStore().data;\r\n const { sourceStatementParams } = getStore().ui;\r\n dispatch(leftSectionElementsLoading({ sectionId }));\r\n getElementsBySectionRequest({\r\n statementId,\r\n sectionId,\r\n revisionId: leftRevision.id,\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: sourceStatementParams.projectId,\r\n })\r\n .then((response) => {\r\n if (response.data && annotationDisplayOptions.showAll) {\r\n response.data = response.data.map((item) => {\r\n return {\r\n ...item,\r\n marker: false,\r\n callout:\r\n isElementHasAnyAnnotations(item) &&\r\n annotationDisplayOptions.showAll,\r\n };\r\n });\r\n } else if (leftElementCache.getCurrentSectionIds().length) {\r\n const elementIds = leftElementCache.getElementIdsBySectionId({\r\n sectionId,\r\n });\r\n if (elementIds.marker.length || elementIds.callout.length) {\r\n response.data = response.data.map((item) => {\r\n return {\r\n ...item,\r\n marker: elementIds.marker.includes(item.id),\r\n callout:\r\n elementIds.callout.includes(item.id) &&\r\n isElementHasAnyAnnotations(item),\r\n };\r\n });\r\n }\r\n }\r\n dispatch(\r\n leftSectionElementsLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(leftSectionElementsError({ sectionId, error }));\r\n });\r\n };\r\n\r\n/**\r\n * Fetches all data necessary for rendering section content and element annotations\r\n * @param {number} param.sectionId sectionId to fetch info for\r\n */\r\nexport const fetchAllSectionRenderingData =\r\n ({ sectionId, scrollToSection, isReportPreviewPage = false }) =>\r\n (dispatch, getStore) => {\r\n const { blacklineViewMode } = getStore().ui.statementPage.modes;\r\n\r\n dispatch(\r\n fetchSectionHTMLSegmentsStatementContent({\r\n sectionIdList: [sectionId],\r\n segmentType: blacklineViewMode ? 'C' : 'P',\r\n scrollToSection,\r\n }),\r\n );\r\n dispatch(fetchElementsBySection({ sectionId }));\r\n !isReportPreviewPage && dispatch(fetchNotesBySection({ sectionId }));\r\n };\r\n\r\n/**\r\n * Fetches all data necessary for rendering section content and element annotations\r\n * @param {number} param.sectionId sectionId to fetch info for\r\n */\r\nexport const fetchAllLeftSectionRenderingData =\r\n ({ sectionId, scrollToSection }) =>\r\n (dispatch, getStore) => {\r\n const { sourceStatementParams } = getStore().ui;\r\n\r\n dispatch(\r\n fetchLeftSectionHTMLSegmentsStatementContent({\r\n statementId: sourceStatementParams.statementId,\r\n sectionIdList: [sectionId],\r\n segmentType: 'P',\r\n scrollToSection,\r\n }),\r\n );\r\n dispatch(\r\n fetchLeftElementsBySection({\r\n sectionId,\r\n statementId: sourceStatementParams.statementId,\r\n }),\r\n );\r\n dispatch(\r\n fetchLeftNotesBySection({\r\n sectionId,\r\n statementId: sourceStatementParams.statementId,\r\n projectId: sourceStatementParams.projectId,\r\n }),\r\n );\r\n };\r\n\r\nexport const fetchAllSectionRenderingDataWithoutLoading =\r\n ({ sectionId }) =>\r\n (dispatch, getStore) => {\r\n const { blacklineViewMode } = getStore().ui.statementPage.modes;\r\n\r\n dispatch(\r\n fetchSectionHTMLSegmentsStatementContentWithoutLoading({\r\n sectionIdList: [sectionId],\r\n segmentType: blacklineViewMode ? 'C' : 'P',\r\n }),\r\n );\r\n dispatch(fetchElementsBySection({ sectionId }));\r\n dispatch(fetchNotesBySection({ sectionId }));\r\n };\r\n\r\nexport const setCurrentStatementContentTab =\r\n (tab) => async (dispatch, getState) => {\r\n //First set the new tab that is passed in.\r\n await dispatch(setStatementContentTab(tab));\r\n /**\r\n * TODO: If we want to support multiple routes for the different tabs, we will have to investigate the logic for it\r\n * here with some type of react router/redux combination approach. TBD.\r\n */\r\n // /**\r\n // * Next we set the url parameters for the new page based on the tab and\r\n // * parameters in the store, namely the currently rendered revision and the currently\r\n // * selected project.\r\n // */\r\n // const currentState = getState().data;\r\n // const selectedProject = currentState.selectedProject.project;\r\n // const revision = currentState.revision;\r\n // if (!selectedProject.isInitialized() || !revision.isInitialized()) {\r\n // const errorMessage =\r\n // 'Cannot select a tab, user does not have a selected project, or a revision loaded.';\r\n // console.error(errorMessage);\r\n // throw new Error(errorMessage);\r\n // }\r\n // let route;\r\n // if (tab === STATEMENT_CONTENT_TABS.STATEMENT) {\r\n // route = ROUTE_CONSTANTS.STATEMENT_CONTENT_PAGE;\r\n // } else if (tab === STATEMENT_CONTENT_TABS.SPLIT) {\r\n // route = ROUTE_CONSTANTS.STATEMENT_SPLIT_PAGE;\r\n // }\r\n // // TODO: Once we have better readOnly support, refactor its logic to be store-based somehow.\r\n // await dispatch(\r\n // push(\r\n // parseRoute(route, {\r\n // params: {\r\n // projectId: selectedProject.id,\r\n // statementId: revision.statementId,\r\n // revisionId: revision.id,\r\n // readOnly: false,\r\n // },\r\n // }),\r\n // ),\r\n // );\r\n };\r\n\r\n/**\r\n * @param {} urlParams\r\n */\r\nexport const initStatementContent =\r\n (urlParams) => async (dispatch, getState) => {\r\n const projectId = urlParams.projectId;\r\n const pathname = window.location.pathname;\r\n const statementId = parseInt(urlParams.statementId);\r\n const revisionId = parseInt(urlParams.revisionId);\r\n dispatch(\r\n createSectionCacheTracker({\r\n revisionId,\r\n }),\r\n );\r\n // Once it has been fetched, we need to use our urlParams to ensure the proper project is the selected one in the store.\r\n const { data: currentState } = getState();\r\n\r\n const currentUserId =\r\n currentState && currentState.currentUser && currentState.currentUser.id;\r\n const selectedProject = currentState.selectedProject.project;\r\n\r\n // const { socketHasBeenDisconnected } = sockets.statementSocket;\r\n\r\n /**\r\n * If the selected project in the store is not the same as the one in the url params, update it.\r\n * This can happen if the user refreshes the page, or if they navigate to this page directly from a\r\n * bookmarked url for instance.\r\n * */\r\n\r\n if (selectedProject.id !== projectId) {\r\n // Verify if projectid in url is present in projectToGeoMap\r\n const { projectToGeoMap } =\r\n currentState.currentUser && currentState.currentUser.data;\r\n const desiredProject = projectToGeoMap.get(`${projectId}`);\r\n /**\r\n * If the user puts in a project id in the url that is not valid, meaning it is not found in the projectToGeoMap,\r\n * we display an error.\r\n * TODO: Refactor this when we fix up overall error handling in the application.\r\n */\r\n if (isNullOrUndefined(desiredProject)) {\r\n const errorMessage = `Project with id: ${projectId} does not exist`;\r\n dispatch(selectedStatementError(errorMessage));\r\n console.error(errorMessage);\r\n throw new Error(errorMessage);\r\n }\r\n // We always fire off an update to the selected project to ensure the proper project is marked as selected in the store.\r\n await dispatch(\r\n updateSelectedProjectFromID({\r\n projectId,\r\n }),\r\n );\r\n }\r\n await dispatch(fetchSelectedStatement(urlParams));\r\n await dispatch(chatBotPushIndex(urlParams));\r\n // We need to update the revision in the store to ensure we have the proper information to display in the UI.\r\n // all content requests for the statement require that the revision number be known\r\n //await dispatch(fetchRevision(revisionId));\r\n const {\r\n data: { selectedStatement },\r\n } = getState();\r\n // Next, get the section id map and the associated content so we can display the statement properly.\r\n // MUST await as this determines the order sections are rendered in\r\n await dispatch(\r\n fetchSectionIdListStatementContent(\r\n revisionId,\r\n selectedStatement.isOCR,\r\n parseInt(projectId),\r\n statementId,\r\n ),\r\n );\r\n // Finally fetch the period list for the current statement to populate the element details dropdown.\r\n if (statementId && revisionId) {\r\n dispatch(fetchRevisionPeriodList(revisionId, statementId));\r\n }\r\n dispatch(fetchClientEntityList(projectId));\r\n if (selectedStatement.isOCR) {\r\n await dispatch(\r\n getSelectedStatementOCRNavigationData(projectId, revisionId),\r\n );\r\n dispatch(setSelectedTabAction(STATEMENT_NAV_TABS.pages));\r\n }\r\n if (!selectedStatement.isOCR && statementId && revisionId) {\r\n // fetch contentSectionMap for relationships between content and bookmark sections\r\n dispatch(getContentSectionMapRequest({ revisionId, statementId }));\r\n //TODO: Uncomment out this dispatch for socket subscription once that is setup on the back-end.\r\n // subscribe({ projectId, statementId, revisionId });\r\n\r\n // It will fetch section tree list used for rendering statement-nav panel\r\n dispatch(fetchSectionTreeAction({ revisionId, statementId }));\r\n // it will set default heading tab in statement navigational panel\r\n dispatch(setSelectedTabAction(STATEMENT_NAV_TABS.headings));\r\n }\r\n // init statement nav panel as open by default when loading statement page\r\n dispatch(showStatementNavPanelAction());\r\n\r\n if (!selectedStatement.isOCR && statementId && revisionId) {\r\n dispatch(fetchSectionReviews(revisionId, statementId));\r\n }\r\n\r\n await dispatch(\r\n initStatementSocketClientAction({\r\n revisionId,\r\n projectId,\r\n currentUserId,\r\n }),\r\n );\r\n\r\n dispatch(setStatementSocketClient());\r\n if (!isElementReportPreviewPage(pathname)) {\r\n if (!selectedStatement.isOCR && statementId && revisionId) {\r\n dispatch(fetchSectionAssignmentsList({ revisionId, statementId }));\r\n }\r\n await dispatch(getAllUsers());\r\n\r\n //Before loading statement content for the first time, load the details of active users from BE.\r\n await dispatch(addUserToRevision(revisionId, projectId));\r\n // Don't set interval if there is already one in place;\r\n if (!isIntervalAlreadySet) {\r\n // We need to refresh the users in the room every 1hour\r\n isIntervalAlreadySet = setInterval(\r\n () => dispatch(addUserToRevision(revisionId, projectId)),\r\n 3600000,\r\n );\r\n }\r\n // TODO : Code to be uncommented when we are developing feature related to instant update of active users on statement.\r\n // if (socketHasBeenDisconnected) {\r\n // dispatch(addUserToRevision(revisionId, projectId));\r\n // }\r\n }\r\n };\r\n\r\nexport const initLeftStatementContent =\r\n (sourceStatementParams) => async (dispatch, getState) => {\r\n // const statementId = parseInt(sourceStatementUrlParams.statementId);\r\n const revisionId = parseInt(sourceStatementParams.revisionId);\r\n const statementId = parseInt(sourceStatementParams.statementId);\r\n const { projectId } = sourceStatementParams;\r\n //creating the section cache tracker for left statement in side by side view page\r\n dispatch(\r\n createLeftSectionCacheTracker({\r\n revisionId,\r\n }),\r\n );\r\n // We need to update the revision in the store to ensure we have the proper information to display in the UI.\r\n // all content requests for the statement require that the revision number be known\r\n await dispatch(fetchLeftRevision(revisionId, statementId, projectId));\r\n // Next, get the section id map and the associated content so we can display the statement properly.\r\n // MUST await as this determines the order sections are rendered in\r\n const {\r\n data: { selectedStatement },\r\n } = getState();\r\n const _isSideBySideView = window.location.pathname.includes(\r\n ROUTE_CONSTANTS.SIDE_BY_SIDE,\r\n );\r\n\r\n !_isSideBySideView &&\r\n (await dispatch(\r\n fetchLeftSectionIdListStatementContent(\r\n revisionId,\r\n statementId,\r\n projectId,\r\n selectedStatement.isOCR,\r\n ),\r\n ));\r\n };\r\n\r\n/**\r\n * Adds section to SectionInViewMap and updates it's viewed timestamp in the SectionCacheTracker\r\n * @param {int} param.sectionId\r\n */\r\nexport const setSectionInView =\r\n ({ sectionId }) =>\r\n (dispatch) => {\r\n dispatch(setSectionInViewStatementContent({ sectionId }));\r\n dispatch(updateSectionViewedTimestamp({ sectionId }));\r\n };\r\n\r\n/**\r\n * Removes a section from the SectionInViewMap\r\n *\r\n * Sometimes the cache will still be too large if the transition between 2 large sections is within the viewport threshold\r\n * thus every time we clear a seciton in view, we should also check the cache and see if we can purge a section that is no longer\r\n * in view so we can get below the threshold\r\n * @param {int} param.sectionId\r\n */\r\nexport const clearSectionInView =\r\n ({ sectionId }) =>\r\n async (dispatch, getStore) => {\r\n dispatch(clearSectionInViewStatementContent({ sectionId }));\r\n const { tracker } = getStore().data.statementContent.sectionsCache;\r\n const _cacheOverThreshold = tracker.cacheOverThreshold();\r\n if (_cacheOverThreshold) {\r\n dispatch(checkCacheToPurge());\r\n }\r\n };\r\n\r\nexport const clearStatementPageStore = () => (dispatch) => {\r\n dispatch(clearStatementPageStoreAction());\r\n\r\n // We dont want to clear revision id when navigating to side by side page,\r\n // since, we will need it for fetching data for target statement\r\n !(\r\n window.location &&\r\n window.location.pathname &&\r\n window.location.pathname.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE)\r\n ) && dispatch(clearStatementPageRevisionStoreAction());\r\n //TODO: Restore this code once we have back-end support for sockets.\r\n //unsubscribe();\r\n};\r\n\r\nexport const expandAllElements =\r\n ({ elementIds, showCallout = true }) =>\r\n (dispatch, getState) => {\r\n const store = getState();\r\n const { data } = store;\r\n const {\r\n annotationDisplayOptions: { expandAllElements },\r\n } = data;\r\n\r\n expandAllElements &&\r\n dispatch(\r\n updateSideBySideElementCacheByCallouts({\r\n elementIds,\r\n showCallout,\r\n }),\r\n );\r\n };\r\n\r\nexport const batchSelectElements =\r\n ({ elements }) =>\r\n (dispatch, getState) => {\r\n const { selectMode } = getState().ui.statementPage.modes;\r\n // then dispatch the mode specific action\r\n switch (selectMode) {\r\n case ELEMENT_SELECT_MODES.FORMULA: {\r\n // always select all the elements in the content panel\r\n dispatch(\r\n selectMultipleElementsContentPanel({\r\n elementIds: elements.map((el) => el.elementId),\r\n }),\r\n );\r\n dispatch(\r\n batchAddElementFormulaRows({\r\n elements,\r\n }),\r\n );\r\n break;\r\n }\r\n case ELEMENT_SELECT_MODES.BATCH_WITH_BANNER:\r\n case ELEMENT_SELECT_MODES.BATCH: {\r\n dispatch(\r\n expandAllElements({\r\n elementIds: elements.map((el) => el.elementId),\r\n }),\r\n );\r\n dispatch(batchAddElementsToBatch({ elements }));\r\n break;\r\n }\r\n case ELEMENT_SELECT_MODES.COPY_FORMULA: {\r\n elements.forEach((ele) =>\r\n dispatch(addElementForCopyFormula({ elementId: ele.elementId })),\r\n );\r\n break;\r\n }\r\n default:\r\n // should never happen\r\n console.log('BATCH SELECTED', elements);\r\n }\r\n };\r\n\r\nexport const batchSelectElementsInSideBySideMode =\r\n ({ elements, isLeftSideView }) =>\r\n async (dispatch, getState) => {\r\n // Filter out elements with valid elementId\r\n const selectedElements = elements.filter((ele) => !isNaN(ele.elementId));\r\n if (isLeftSideView) {\r\n // Dispatch action to add elements to source list in side by side view mode\r\n const selectedElementsfromCache = await dispatch(\r\n addElementsToSourceListInSideBySideMode({ elements: selectedElements }),\r\n );\r\n // Get the array of elements data from the elements map object\r\n const sourceSideBySideElements =\r\n getElementsDataArryaFromElementsMapObject(selectedElementsfromCache);\r\n\r\n // Dispatch action to set the source statement batch elements map\r\n dispatch(\r\n setSourceStatementBatchElementsMapAction(sourceSideBySideElements),\r\n );\r\n } else {\r\n // Dispatch action to add elements to target list in side by side view mode\r\n const selectedTargetElementsfromcache = await dispatch(\r\n addElementsToTargetListInSideBySideMode({ elements: selectedElements }),\r\n );\r\n\r\n const targetSideBySideElements =\r\n getElementsDataArryaFromElementsMapObject(\r\n selectedTargetElementsfromcache,\r\n );\r\n\r\n dispatch(\r\n setTargetStatementBatchElementsMapAction(targetSideBySideElements),\r\n );\r\n }\r\n };\r\n\r\nconst getElementsDataArryaFromElementsMapObject = (selectedElementsMap) =>\r\n Object.values(selectedElementsMap).map((item) => item.data);\r\n\r\nexport const onStatementNavSectionSelect =\r\n ({ sectionId, color }) =>\r\n async (dispatch, getState) => {\r\n dispatch(\r\n replaceSelectedSectionsContentPanel({ sectionIds: [sectionId], color }),\r\n );\r\n scrollSectionIntoView(sectionId);\r\n };\r\n\r\nexport const onSectionClick =\r\n ({ sectionId, color, sectionClick }) =>\r\n async (dispatch, getState) => {\r\n const { elementFilters } =\r\n getState().ui.statementPage.statementNavigatorPanel;\r\n const { contentSectionMap } =\r\n getState().data.statementContent.sectionsCache;\r\n const { selectMode } = getState().ui.statementPage.modes;\r\n const { right } = getState().ui.statementPage.panels;\r\n const {\r\n data: { revision },\r\n } = getState();\r\n const { INTERNAL_REFERENCE, FORMULA, BATCH, COPY_FORMULA } =\r\n ELEMENT_SELECT_MODES;\r\n const shouldDisableSectionClick =\r\n selectMode === INTERNAL_REFERENCE ||\r\n selectMode === FORMULA ||\r\n selectMode === COPY_FORMULA ||\r\n right === BATCH.title;\r\n let section = contentSectionMap.get(sectionId);\r\n dispatch(onStatementNavSectionSelect({ sectionId, color }));\r\n dispatch(showStatementNavPanelAction());\r\n dispatch(showSectionDetailsPanelAction());\r\n await dispatch(fetchSectionReviewsWithLoading());\r\n\r\n if (!shouldDisableSectionClick) {\r\n dispatch(sectionDetailsLoading());\r\n\r\n let updatedSection = await getUpdatedSectionElementsNotesSummaryCount(\r\n revision,\r\n section,\r\n );\r\n\r\n dispatch(sectionDetailsLoaded(updatedSection));\r\n dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId: revision.id,\r\n sectionId: sectionId,\r\n }),\r\n );\r\n }\r\n // this case is added because if the filter has just only one section selected and the user clicks on the section again\r\n // it is going to remove completely the section filter, so we need to remove the selected element\r\n if (\r\n elementFilters &&\r\n elementFilters.isSectionSelected(sectionId) &&\r\n elementFilters.selectedSectionsLength() === 1\r\n ) {\r\n dispatch(deselectSelectedElement());\r\n }\r\n dispatch(\r\n searchElements({\r\n filters: elementFilters.selectSection(section),\r\n searchTerm: '',\r\n scrollIntoView: false,\r\n sectionClick,\r\n }),\r\n );\r\n };\r\n\r\nexport const updateSectionDetailsStore =\r\n (props) => async (dispatch, getState) => {\r\n const { section, sectionId, isDelete } = props;\r\n const { selectedSection } = getState().data.sectionPanel;\r\n const {\r\n data: { revision },\r\n } = getState();\r\n // Added falsy value check - before evaluating selectedSection.id\r\n if (isDelete && selectedSection && sectionId === selectedSection.id) {\r\n dispatch(hideSectionDetailsPanelAction());\r\n dispatch(clearSectionDetails());\r\n }\r\n // Added check for falsy value - before evaluating section.id\r\n else if (section && selectedSection && selectedSection.id === section.id) {\r\n let updatedSection = await getUpdatedSectionElementsNotesSummaryCount(\r\n revision,\r\n section,\r\n );\r\n dispatch(sectionDetailsLoaded(updatedSection));\r\n }\r\n };\r\n\r\nexport const selectElementFromElementSearch =\r\n ({ elementId, firstSearch }) =>\r\n (dispatch, getState) => {\r\n const { elementDetails } = getState().data.elementPanel;\r\n const { selectMode } = getState().ui.statementPage.modes;\r\n if (\r\n selectMode !== ELEMENT_SELECT_MODES.RANGE &&\r\n (selectMode === ELEMENT_SELECT_MODES.BATCH_WITH_BANNER ||\r\n selectMode !== ELEMENT_SELECT_MODES.BATCH)\r\n ) {\r\n // skip when in range or batch select mode\r\n dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementId],\r\n color: firstSearch\r\n ? ELEMENT_HIGHLIGHT_STATES.DEFAULT\r\n : ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n }),\r\n );\r\n if (elementDetails.id) {\r\n dispatch(\r\n selectElementContentPanel({\r\n elementIds: elementDetails.id,\r\n color: ELEMENT_HIGHLIGHT_STATES.DEFAULT,\r\n }),\r\n );\r\n }\r\n }\r\n };\r\n\r\nexport const searchForTermInContent =\r\n ({ searchTerm, isOcr }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: {\r\n statementContent: { sectionIdList },\r\n },\r\n ui: {\r\n statementPage: { sectionsInView },\r\n },\r\n } = getState();\r\n // ensure search term gets updated in redux\r\n await dispatch(setContentSearchAction(searchTerm));\r\n if (isOcr) {\r\n let sectionMetaData;\r\n sectionsInView.sectionIds.forEach((id) => {\r\n sectionMetaData = sectionIdList.sectionIds.find(\r\n (section) => section.sectionId === parseInt(id),\r\n );\r\n if (sectionMetaData) {\r\n dispatch(fetchAllOCRSectionRenderingData({ sectionMetaData }));\r\n }\r\n });\r\n } else {\r\n sectionsInView.sectionIds.forEach((id) => {\r\n // refetch all section data in order to iterate through and highlight content\r\n // search term should be updated already at this point\r\n dispatch(fetchAllSectionRenderingData({ sectionId: id }));\r\n });\r\n }\r\n };\r\n\r\nexport const clearSearchFromContent = () => async (dispatch, getState) => {\r\n const {\r\n data: {\r\n statementContent: { sectionIdList },\r\n selectedStatement: { isOCR },\r\n },\r\n ui: {\r\n statementPage: { sectionsInView },\r\n },\r\n } = getState();\r\n // clear selected element from searched element tab\r\n dispatch(deselectSelectedElement());\r\n // ensure search term gets updated in redux\r\n await dispatch(clearContentSearchAction());\r\n if (isOCR) {\r\n let sectionMetaData;\r\n sectionsInView.sectionIds.forEach((id) => {\r\n sectionMetaData = sectionIdList.sectionIds.find(\r\n (section) => section.sectionId === parseInt(id),\r\n );\r\n if (sectionMetaData) {\r\n dispatch(fetchAllOCRSectionRenderingData({ sectionMetaData }));\r\n }\r\n });\r\n } else {\r\n dispatch(clearContentHighlightSelector());\r\n sectionsInView.sectionIds.forEach((id) => {\r\n // refetch all section data in order to iterate through and highlight content\r\n // search term should be updated already at this point\r\n dispatch(fetchAllSectionRenderingData({ sectionId: id }));\r\n });\r\n }\r\n};\r\n\r\nexport const refetchSectionsInView = () => async (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: { sectionsInView },\r\n },\r\n } = getState();\r\n\r\n sectionsInView.sectionIds.forEach((id) => {\r\n // refetch all section data in order to iterate through and highlight content\r\n // search term should be updated already at this point\r\n dispatch(fetchAllSectionRenderingData({ sectionId: id }));\r\n });\r\n};\r\n\r\nexport const deallocateItems = () => (dispatch, getState) => {\r\n const {\r\n data: {\r\n notesPanel: { selectedNote },\r\n },\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n },\r\n },\r\n } = getState();\r\n dispatch(deallocateSelectedSectionsContentPanel());\r\n dispatch(deallocateSelectedElementsContentPanel());\r\n dispatch(clearContentHighlightSelector());\r\n\r\n if (right === RIGHT_PANELS.NOTES) {\r\n dispatch(\r\n selectNoteFromNoteListAction({\r\n note: selectedNote,\r\n color: 'default',\r\n }),\r\n );\r\n }\r\n};\r\n\r\nexport const refetchBlacklineView = () => async (dispatch, getState) => {\r\n try {\r\n const { revision } = getState().data;\r\n const response = await getBlacklineViewStatusRequest({\r\n revisionId: revision.id,\r\n });\r\n\r\n if (response && response.data) {\r\n switch (response.data.result) {\r\n case BLACKLINE_VIEW_STATUS.BLK_REQ_RECEIVED:\r\n blacklineTogleNotification(BLACKLINE_VIEW_STATUS.BLK_REQ_RECEIVED);\r\n break;\r\n case BLACKLINE_VIEW_STATUS.GENERATING:\r\n blacklineTogleNotification(BLACKLINE_VIEW_STATUS.GENERATING);\r\n break;\r\n case BLACKLINE_VIEW_STATUS.FAILED:\r\n blacklineTogleNotification(BLACKLINE_VIEW_STATUS.FAILED);\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n } catch (error) {\r\n blacklineTogleNotification(BLACKLINE_VIEW_STATUS.FAILED);\r\n console.error(error);\r\n }\r\n};\r\n\r\nexport const mapSideBySideElementsRequest =\r\n (statementId, revisionId) => async (dispatch, getState) => {\r\n const { ui, data } = getState();\r\n const {\r\n sourceStatementParams,\r\n sideBySideView,\r\n statementPage: { sectionsInView },\r\n } = ui;\r\n const {\r\n currentUser,\r\n statementContent,\r\n selectedStatement: { isOCR },\r\n } = data;\r\n const sectionIdList = statementContent && statementContent.sectionIdList;\r\n const targetId = revisionId;\r\n const targetStatementId = statementId;\r\n const sourceId = sourceStatementParams && sourceStatementParams.revisionId;\r\n const sourceStatementId =\r\n sourceStatementParams && sourceStatementParams.statementId;\r\n let elementMapDetails = { ...sideBySideView.sideBySideViewAnnotations };\r\n elementMapDetails.userId = currentUser && currentUser.id;\r\n elementMapDetails.elementsforMapping =\r\n sideBySideView &&\r\n sideBySideView.sideBySideElementMap &&\r\n sideBySideView.sideBySideElementMap.toApiFormat();\r\n\r\n const sourceElements =\r\n sideBySideView &&\r\n sideBySideView.sideBySideElementMap &&\r\n sideBySideView.sideBySideElementMap.sideBySideSourceElementsId();\r\n const targetElements =\r\n sideBySideView &&\r\n sideBySideView.sideBySideElementMap &&\r\n sideBySideView.sideBySideElementMap.sideBySideTargetElementsId();\r\n\r\n try {\r\n // api request to mapping element based on the user selection in side by side view page.\r\n const response = await mapElementsRequest({\r\n targetId,\r\n sourceId,\r\n targetStatementId,\r\n sourceStatementId,\r\n elementMapDetails,\r\n });\r\n\r\n if (\r\n response &&\r\n response.data &&\r\n response.data.elementsforMapping.length !== 0\r\n ) {\r\n const {\r\n successSourceElements,\r\n failedSourceElements,\r\n successTargetElements,\r\n failedTargetElements,\r\n } = seggregateSourceTargetElements(response.data.elementsforMapping);\r\n if (isOCR) {\r\n const sectionInViewIds = Object.keys(sectionsInView);\r\n const sectionIdListMap = sectionIdList.sectionIds.reduce(\r\n (map, sectionMetaData) => {\r\n map[sectionMetaData.sectionId] = sectionMetaData;\r\n return map;\r\n },\r\n {},\r\n );\r\n sectionInViewIds.forEach(async (sectionInViewId) => {\r\n const sectionMetaData = sectionIdListMap[sectionInViewId];\r\n if (sectionMetaData) {\r\n await dispatch(\r\n fetchSectionOCRSegmentsStatementContent({ sectionMetaData }),\r\n );\r\n }\r\n });\r\n } else {\r\n const sectionInViewIds = Object.keys(sectionsInView)\r\n .map((key) => Number(key))\r\n .filter((key) => !isNaN(key));\r\n dispatch(\r\n fetchSectionHTMLSegmentsStatementContentWithoutLoading({\r\n sectionIdList: sectionInViewIds,\r\n segmentType: 'P',\r\n }),\r\n );\r\n }\r\n await dispatch(updateCacheWithMostRecentSideBySideElementChanges());\r\n dispatch(\r\n highlightMappedElementsByResponse({\r\n result: mapElementsSuccessResult,\r\n sourceElements: successSourceElements,\r\n targetElements: successTargetElements,\r\n }),\r\n );\r\n dispatch(\r\n highlightMappedElementsByResponse({\r\n result: mapElementsFailureResult,\r\n sourceElements: failedSourceElements,\r\n targetElements: failedTargetElements,\r\n }),\r\n );\r\n dispatch(clearSideBySideElementsMap());\r\n\r\n // successfully mapped elements notification\r\n !!successTargetElements.length &&\r\n successElementMapNotification({\r\n targetElements: successTargetElements,\r\n });\r\n // failed mapped elements notification\r\n !!failedTargetElements.length &&\r\n failureElementMapNotification({\r\n targetElements: failedTargetElements,\r\n });\r\n !!successTargetElements.length &&\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: successTargetElements,\r\n showCallout: true,\r\n }),\r\n );\r\n } else {\r\n dispatch(\r\n handleElementMappingFailure(\r\n mapElementsFailureResult,\r\n sourceElements,\r\n targetElements,\r\n ),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(\r\n handleElementMappingFailure(\r\n mapElementsFailureResult,\r\n sourceElements,\r\n targetElements,\r\n ),\r\n );\r\n }\r\n //on mouse click it will reset the successfully or failed mapped elements hightlight to the default\r\n document.addEventListener(\r\n 'click',\r\n (e) => {\r\n if (!e.ctrlKey) {\r\n dispatch(clearSelectedElementsContentPanel());\r\n dispatch(clearLeftSelectedElementsContentPanel());\r\n }\r\n },\r\n {\r\n once: true,\r\n },\r\n );\r\n };\r\n\r\nexport const clearAllLeftStatementData = () => (dispatch) => {\r\n dispatch(clearleftSectionTreeListAction());\r\n dispatch(clearLeftStatementContent());\r\n dispatch(clearLeftSelectedStatement());\r\n};\r\n","import {\r\n CONTEXT_KEY,\r\n getProjectApiClient,\r\n getSelectedProjectApiClient,\r\n getHomeGeoApiClient,\r\n getCurrentGeoApiClient,\r\n getSelectedGeoApiClient,\r\n} from './api-client';\r\nimport { getDocChatApiClient } from 'api/docChat-api-client';\r\n\r\nexport const withDefaultContextAsSelectedProject = (\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n) => {\r\n switch (contextKey) {\r\n case CONTEXT_KEY.PROJECT_CONTEXT:\r\n return getProjectApiClient(contextValue);\r\n case CONTEXT_KEY.SELECTED_PROJECT_CONTEXT:\r\n return getSelectedProjectApiClient();\r\n default:\r\n return getSelectedProjectApiClient();\r\n }\r\n};\r\n\r\nexport const withDefaultContextAsProject = (\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n valueForDefaultContext,\r\n) => {\r\n switch (contextKey) {\r\n case CONTEXT_KEY.SELECTED_PROJECT_CONTEXT:\r\n return getSelectedProjectApiClient();\r\n case CONTEXT_KEY.HOME_GEO_CONTEXT:\r\n return getHomeGeoApiClient();\r\n default:\r\n return getProjectApiClient(valueForDefaultContext);\r\n }\r\n};\r\n\r\nexport const withDefaultContextAsCurrentGeo = (\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n) => {\r\n switch (contextKey) {\r\n case CONTEXT_KEY.HOME_GEO_CONTEXT:\r\n return getHomeGeoApiClient();\r\n default:\r\n return getCurrentGeoApiClient();\r\n }\r\n};\r\n\r\nexport const withDefaultContextAsHomeGeo = (\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n) => {\r\n switch (contextKey) {\r\n case CONTEXT_KEY.HOME_GEO_CONTEXT:\r\n return getHomeGeoApiClient();\r\n case CONTEXT_KEY.SELECTED_GEO_CONTEXT:\r\n return getSelectedGeoApiClient(contextValue);\r\n default:\r\n return getHomeGeoApiClient();\r\n }\r\n};\r\n\r\nexport const withDefaultContextAsSelectedProjectDocChat = (\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n) => {\r\n switch (contextKey) {\r\n default:\r\n return getDocChatApiClient();\r\n }\r\n};\r\n\r\nexport const withDefaultContextAsSelectedGeo = (\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n valueForDefaultContext,\r\n) => {\r\n switch (contextKey) {\r\n case CONTEXT_KEY.HOME_GEO_CONTEXT:\r\n return getHomeGeoApiClient();\r\n case CONTEXT_KEY.SELECTED_PROJECT_CONTEXT:\r\n return getProjectApiClient(contextValue);\r\n default:\r\n return getSelectedGeoApiClient(valueForDefaultContext);\r\n }\r\n};\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\n\r\nimport { ReactComponent as PlusCircleIcon } from 'icons/plus-circle.svg';\r\n\r\nconst ICON_WITH_CHILDREN_SIZE = 20;\r\n\r\nconst BUTTON_TYPES = {\r\n primary: 'primary',\r\n secondary: 'secondary',\r\n tertiary: 'tertiary',\r\n icon: 'icon',\r\n delete: 'delete',\r\n};\r\n\r\nconst BLOCK = 'button';\r\n\r\nconst Button = React.forwardRef(\r\n (\r\n {\r\n children,\r\n className,\r\n type,\r\n disabled,\r\n id,\r\n onClick,\r\n tooltip,\r\n isTooltipRequiredForDisabled = false,\r\n },\r\n ref,\r\n ) =>\r\n // when button is disabled, tooltip does not shows up.\r\n // To fix that we need to wrap button isnide some span or div with display set to inline-block\r\n // https://stackoverflow.com/questions/13311574/how-to-enable-bootstrap-tooltip-on-disabled-button\r\n isTooltipRequiredForDisabled ? (\r\n \r\n \r\n \r\n {children}\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n {children}\r\n \r\n \r\n ),\r\n);\r\n\r\nButton.IconButton = React.forwardRef(\r\n (\r\n {\r\n children,\r\n className,\r\n disabled,\r\n id,\r\n onClick,\r\n tooltip,\r\n Icon = PlusCircleIcon,\r\n iconSize = ICON_WITH_CHILDREN_SIZE,\r\n },\r\n ref,\r\n ) => (\r\n \r\n \r\n {children}\r\n \r\n ),\r\n);\r\n\r\nconst buttonProps = {\r\n className: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n id: PropTypes.string.isRequired,\r\n onClick: PropTypes.func.isRequired,\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /**true value means a component wants to show tooltip when the button is disabled.\r\n * This extra prop types is required, since to show tooltip for disabled button we\r\n * need to wrap it inside span or div.\r\n * https://stackoverflow.com/questions/13311574/how-to-enable-bootstrap-tooltip-on-disabled-button\r\n */\r\n isTooltipRequiredForDisabled: PropTypes.bool,\r\n};\r\n\r\nButton.propTypes = {\r\n type: PropTypes.string.isRequired,\r\n ...buttonProps,\r\n};\r\n\r\nButton.IconButton.propTypes = {\r\n ...buttonProps,\r\n /**The Icon to be rendered in the IconButton,\r\n * it is fully customizable, but does require that its svg path propertyhave the class `.icon-path`\r\n * for proper-styling. By default uses the PlusCircleIcon if none is provided. */\r\n Icon: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),\r\n};\r\n\r\nexport default Button;\r\nexport { BUTTON_TYPES };\r\n","import { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nexport const RIGHT_PANELS = {\r\n CLOSED: 'CLOSED',\r\n BATCH: 'BATCH',\r\n ELEMENT: 'ELEMENT', // controls sub panels like element-workpaper, element-tickmark, element-formula, element-ir\r\n NOTES: 'NOTES',\r\n SECTION: 'SECTION',\r\n EXPORT: 'EXPORT',\r\n WORKPAPER: 'WORKPAPER',\r\n};\r\n\r\nexport const RIGHT_PANELS_ARRAY = Object.values(RIGHT_PANELS);\r\n\r\nexport const LEFT_PANELS = {\r\n CLOSED: 'CLOSED',\r\n STATEMENT_NAV: 'BATCH',\r\n TICKMARK: 'ELEMENT', // controls sub panels like element-workpaper, element-tickmark, element-formula, element-ir,\r\n COMPARE: 'COMPARE',\r\n EXPORT: 'EXPORT',\r\n WORKPAPER: 'WORKPAPER',\r\n CUSTOM: 'CUSTOM',\r\n AUDIT_CHECKLIST: 'AUDIT_CHECKLIST',\r\n DOWNLOAD: 'DOWNLOAD',\r\n COMFORT_ANNOTATION: 'COMFORT_ANNOTATION',\r\n SIDE_BY_SIDE_STATEMENT_COMPARISON: 'SIDE_BY_SIDE_STATEMENT_COMPARISON',\r\n CHAT_BOT: 'CHAT_BOT',\r\n};\r\n\r\nexport const LEFT_PANELS_ARRAY = Object.values(LEFT_PANELS);\r\n\r\nexport const COMFORT_ANNOTATION_INFORMATION_TOOLTIP = new TooltipOptions({\r\n text: 'comfort-annotation-panel.information',\r\n id: 'comfort-annotation-panel-tooltip-information',\r\n position: 'right',\r\n});\r\n\r\nexport const AUDIT_CHECKLIST_INFORMATION_TOOLTIP = new TooltipOptions({\r\n text: 'audit-checklist-panel.information',\r\n id: 'audit-checklist-panel-tooltip-extra-info',\r\n position: 'right',\r\n});\r\n\r\nexport const AUDIT_CHECKLIST_STATUS_INFORMATION_TOOLTIP = new TooltipOptions({\r\n text: 'audit-checklist-panel-non-coe.information',\r\n id: 'audit-checklist-panel-tooltip-complete',\r\n position: 'top',\r\n});\r\n\r\nexport const AUDIT_CHECKLIST_EDIT_INFORMATION_TOOLTIP = new TooltipOptions({\r\n text: 'audit-checklist-panel-non-coe.information',\r\n id: 'audit-checklist-panel-tooltip-edit',\r\n position: 'top',\r\n});\r\n","import { RadioOption } from 'models/utils/common/radio-options-model';\r\n\r\nexport const UNSELECTED_FILTER = undefined;\r\nexport const API_BOOLS = {\r\n TRUE: 1,\r\n FALSE: 0,\r\n};\r\nexport const isFilterUnselected = (filter) => filter === UNSELECTED_FILTER;\r\n\r\nconst STATUS_VERIFICATION_OPTIONS = {\r\n verified: new RadioOption({\r\n id: 'verification-verified-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.verification.verified',\r\n value: true,\r\n }),\r\n unverified: new RadioOption({\r\n id: 'verification-unverified-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.verification.unverified',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'verification-all-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.verification.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\nexport const STATUS_VERIFICATION_OPTIONS_ARRAY = Object.values(\r\n STATUS_VERIFICATION_OPTIONS,\r\n);\r\n\r\nconst STATUS_REVIEW_OPTIONS = {\r\n review: new RadioOption({\r\n id: 'review-review-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.review.review',\r\n value: true,\r\n }),\r\n unreview: new RadioOption({\r\n id: 'review-unreview-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.review.unreview',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'review-all-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.review.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\nexport const STATUS_REVIEW_OPTIONS_ARRAY = Object.values(STATUS_REVIEW_OPTIONS);\r\n\r\nconst STATUS_COMFORT_ASSIGNED_OPTIONS = {\r\n comfortassigned: new RadioOption({\r\n id: 'comfort-assigned-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotation.assigned',\r\n value: true,\r\n }),\r\n comfortnotassigned: new RadioOption({\r\n id: 'comfort-not-assigned-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotation.notassigned',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'comfort-annotation-all-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotation.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\nexport const STATUS_COMFORT_ASSIGNED_OPTIONS_ARRAY = Object.values(\r\n STATUS_COMFORT_ASSIGNED_OPTIONS,\r\n);\r\n\r\nconst STATUS_FLAG_OPTIONS = {\r\n all: new RadioOption({\r\n id: 'flag-all-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.flag.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n unflag: new RadioOption({\r\n id: 'flag-unflag-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.flag.unflag',\r\n value: false,\r\n }),\r\n flag: new RadioOption({\r\n id: 'flag-flag-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.flag.flag',\r\n value: true,\r\n }),\r\n};\r\nexport const STATUS_FLAG_OPTIONS_ARRAY = Object.values(STATUS_FLAG_OPTIONS);\r\n\r\nconst ANNOTATION_FORMULA_OPTIONS = {\r\n with: new RadioOption({\r\n id: 'formula-with-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.formula.with',\r\n value: true,\r\n }),\r\n without: new RadioOption({\r\n id: 'formula-without-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.formula.without',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'formula-all-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.formula.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const ANNOTATION_FORMULA_OPTIONS_ARRAY = Object.values(\r\n ANNOTATION_FORMULA_OPTIONS,\r\n);\r\n\r\nconst ANNOTATION_TICKMARK_OPTIONS = {\r\n with: new RadioOption({\r\n id: 'tickmark-with-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.tickmark.with',\r\n value: true,\r\n }),\r\n without: new RadioOption({\r\n id: 'tickmark-without-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.tickmark.without',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'tickmark-all-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.tickmark.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nconst COMFORT_ANNOTATIONS_OPTIONS = {\r\n with: new RadioOption({\r\n id: 'comfort-annotations-with-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotations.with',\r\n value: true,\r\n }),\r\n without: new RadioOption({\r\n id: 'comfort-annotations-without-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotations.without',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'comfort-annotations-all-filter-option-id',\r\n label:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotations.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const ANNOTATION_TICKMARK_OPTIONS_ARRAY = Object.values(\r\n ANNOTATION_TICKMARK_OPTIONS,\r\n);\r\n\r\nexport const ANNOTATION_COMFORT_ANNOTATIONS_OPTIONS_ARRAY = Object.values(\r\n COMFORT_ANNOTATIONS_OPTIONS,\r\n);\r\nconst ANNOTATION_IR_OPTIONS = {\r\n with: new RadioOption({\r\n id: 'ir-with-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.ir.with',\r\n value: true,\r\n }),\r\n without: new RadioOption({\r\n id: 'ir-without-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.ir.without',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'ir-all-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.ir.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const ANNOTATION_IR_OPTIONS_ARRAY = Object.values(ANNOTATION_IR_OPTIONS);\r\n\r\nconst ANNOTATION_WPR_OPTIONS = {\r\n with: new RadioOption({\r\n id: 'wpr-with-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.wpr.with',\r\n value: true,\r\n }),\r\n without: new RadioOption({\r\n id: 'wpr-without-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.wpr.without',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'wpr-all-filter-option-id',\r\n label: 'statement-nav-panel.tab.elements.filters.modal.col-2.wpr.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const ANNOTATION_WPR_OPTIONS_ARRAY = Object.values(\r\n ANNOTATION_WPR_OPTIONS,\r\n);\r\n\r\nexport const PRIMARY_FILTER_CATEGORIES = {\r\n VERIFY: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.verification',\r\n name: 'element-filters-verification-name',\r\n id: 'element-filters-verification-id',\r\n options: STATUS_VERIFICATION_OPTIONS_ARRAY,\r\n },\r\n REVIEW: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.review',\r\n name: 'element-filters-review-name',\r\n id: 'element-filters-review-id',\r\n options: STATUS_REVIEW_OPTIONS_ARRAY,\r\n },\r\n COMFORT_ASSIGNED: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.comfort-assigned',\r\n name: 'element-filters-comfort-assigned-name',\r\n id: 'element-filters-comfort-assigned-id',\r\n options: STATUS_COMFORT_ASSIGNED_OPTIONS_ARRAY,\r\n },\r\n FLAG: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.flag',\r\n name: 'element-filters-parent-flag-name',\r\n id: 'element-filters-parent-flag-id',\r\n options: STATUS_FLAG_OPTIONS_ARRAY,\r\n },\r\n PERIOD: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.period',\r\n id: 'element-filters-period-id',\r\n },\r\n SCALING: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.scaling',\r\n id: 'element-filters-scaling-id',\r\n },\r\n UNIT: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.unit',\r\n id: 'element-filters-unit-id',\r\n },\r\n ENTITY: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.entity',\r\n id: 'element-filters-entity-id',\r\n },\r\n WPR: {\r\n heading: 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.wpr',\r\n id: 'element-filters-wpr-id',\r\n name: 'element-filters-wpr-name',\r\n options: ANNOTATION_WPR_OPTIONS_ARRAY,\r\n },\r\n IR: {\r\n heading: 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.ir',\r\n id: 'element-filters-ir-id',\r\n name: 'element-filters-ir-name',\r\n options: ANNOTATION_IR_OPTIONS_ARRAY,\r\n },\r\n TICKMARKS: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.tickmarks',\r\n id: 'element-filters-tickmarks-id',\r\n name: 'element-filters-tickmarks-name',\r\n options: ANNOTATION_TICKMARK_OPTIONS_ARRAY,\r\n },\r\n COMFORT_ANNOTATIONS: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.comfort-annotations',\r\n id: 'element-filters-comfort-annotations-id',\r\n name: 'element-filters-comfort-annotations-name',\r\n options: ANNOTATION_COMFORT_ANNOTATIONS_OPTIONS_ARRAY,\r\n },\r\n FORMULA: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.formulas',\r\n id: 'element-filters-formulas-id',\r\n name: 'element-filters-parent-formulas-name',\r\n options: ANNOTATION_FORMULA_OPTIONS_ARRAY,\r\n },\r\n STATEMENT_SEGMENTS: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.segment-headings',\r\n id: 'element-filters-segment-headings-id',\r\n },\r\n PAGES: {\r\n heading:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-1.heading.pages',\r\n id: 'element-filters-pages-id',\r\n },\r\n};\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { memo, useRef, useState } from 'react';\r\nimport ReactTooltip from 'react-tooltip';\r\nimport { injectIntl } from 'react-intl';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { shouldBreakWord } from 'constants/common/multi-line-ellipsis-constants';\r\nimport ReactDOM from 'react-dom';\r\n\r\nconst TOOLTIP_BLOCK = 'tooltip';\r\n/** must wrap actual html elements not react components */\r\n\r\nconst Tooltip = ({\r\n id,\r\n text,\r\n position,\r\n className,\r\n children,\r\n isNotInternationalized,\r\n active,\r\n useDefault,\r\n intl,\r\n event,\r\n tooltipOnHideFunction,\r\n delay,\r\n clickable,\r\n offset,\r\n}) => {\r\n const [positionOnOverflow, setPositionOnOverflow] = useState(position);\r\n const reactTooltipRef = useRef(null);\r\n\r\n const _id = `${id}-tooltip`;\r\n if (isNullOrUndefined(id) || isNullOrUndefined(text)) {\r\n return children;\r\n }\r\n const childrenWithProps = React.Children.map(children, (child) =>\r\n React.cloneElement(child, { 'data-for': _id, 'data-tip': 'data-tip' }),\r\n );\r\n\r\n const _displayText = () => {\r\n if (isNotInternationalized) {\r\n return text;\r\n } else if (typeof text === 'string') {\r\n return intl.formatMessage({ id: text });\r\n } else if (typeof text === 'object') {\r\n if (text.defaultMessage) {\r\n return intl.formatMessage(\r\n { id: text.id, defaultMessage: text.defaultMessage },\r\n text.values,\r\n );\r\n }\r\n return intl.formatMessage({ id: text.id }, text.values);\r\n }\r\n return null;\r\n };\r\n\r\n const defaultTooltipChild = React.Children.map(children, (child) =>\r\n React.cloneElement(child, { title: _displayText() }),\r\n );\r\n\r\n if (useDefault) {\r\n return {defaultTooltipChild};\r\n } else if (active) {\r\n return (\r\n <>\r\n {ReactDOM.createPortal(\r\n {\r\n const { tooltipRef } = reactTooltipRef.current;\r\n\r\n if (!tooltipRef) return;\r\n\r\n const rect = tooltipRef.getBoundingClientRect();\r\n\r\n const overflownLeft = rect.left < 0;\r\n const overflownRight = rect.right < window.innerWidth;\r\n\r\n if (overflownLeft) {\r\n setPositionOnOverflow('right');\r\n } else if (overflownRight) {\r\n setPositionOnOverflow('left');\r\n }\r\n }}\r\n >\r\n {_displayText()}\r\n ,\r\n document.getElementById('tooltip-root'),\r\n )}\r\n {childrenWithProps}\r\n \r\n );\r\n }\r\n\r\n return {children};\r\n};\r\n\r\nTooltip.defaultProps = {\r\n active: true,\r\n};\r\n\r\nTooltip.propTypes = {\r\n /** REQUIRED if passing a tooltip, no tooltip attributes applied to children if not present, Unique String id for tool tip*/\r\n id: PropTypes.string,\r\n /** REQUIRED if passing a tooltip, no tooltip attributes applied to children if not present, String copy for the tool tip*/\r\n text: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n values: PropTypes.object,\r\n }),\r\n PropTypes.node,\r\n ]),\r\n /** Position of tooltip: right, left, top, bottom */\r\n position: PropTypes.string,\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** Boolean representing if the tool tip accepts an internationalized id or a string */\r\n isNotInternationalized: PropTypes.bool,\r\n /** Boolean representing if a tool tip should render or just its child. useful for conditionally adding tooltips to components.*/\r\n active: PropTypes.bool,\r\n /** indicates if the tooltip should be browser based using the \"title\" attribute or a custom tooltip */\r\n useDefault: PropTypes.bool,\r\n /* indicates if the tooltip needs to work with different event other than hover */\r\n event: PropTypes.string,\r\n /* function executed when tooltip hides */\r\n tooltipOnHideFunction: PropTypes.func,\r\n /* delay in hiding the tooltip */\r\n delay: PropTypes.number,\r\n /* boolean value that allows the tooltip to be clickable */\r\n clickable: PropTypes.bool,\r\n};\r\n\r\nexport default memo(injectIntl(Tooltip));\r\n","export class ModalButton {\r\n text;\r\n onClick;\r\n disabled;\r\n tooltip;\r\n\r\n constructor({ text, onClick, disabled, tooltip }) {\r\n this.text = text;\r\n this.onClick = onClick;\r\n this.disabled = disabled;\r\n this.tooltip = tooltip;\r\n }\r\n}\r\n","export class TooltipOptions {\r\n text;\r\n position;\r\n id;\r\n /** Indicates whether to use a custom tooltip component or the browser based `title` attribute */\r\n useDefault;\r\n /* this is going to receive a string with a new event to active the tooltip with an event other than hover */\r\n event;\r\n\r\n constructor({ text, position, id, useDefault = false, event }) {\r\n this.text = text;\r\n this.position = position;\r\n this.id = id;\r\n this.useDefault = useDefault;\r\n this.event = event;\r\n }\r\n}\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\nexport class MenuOption {\r\n /** Unique id for option */\r\n id;\r\n /** text or func(that returns text) to display for option */\r\n title;\r\n /** value to be passed when selection is made */\r\n value;\r\n /** boolean or func that results in boolean for whether option should be disabled\r\n */\r\n disabled;\r\n /** TooltipOptionsModel or func that results in TooltipOptionsModel, indicates contents of and if a tooltip should be displayed */\r\n tooltip;\r\n /** indicates if this option has an internationalized id for it's title prop */\r\n isIntl = true;\r\n /** boolean or func that results in boolean for whether option should be shown,\r\n * ONLY USED FOR DATA GRID DROPDOWNS/KEBABS where row data decides what should be filtered\r\n * To only show options in certain instances instead, pass the data necessary to determine\r\n * whether options should be shown to a function that evaluates this data and returns the\r\n * appropriate options for a given scenario.\r\n */\r\n shouldShowOption = true;\r\n /** boolean value represents whether the menu option to be represents as label rather than usual dropdown option */\r\n isLabel = false;\r\n /** boolean value indicates if this option has an customized internationalized perameter for it's title property */\r\n isNotIntl = false;\r\n /** display icon for icon dropdown component */\r\n icon = '';\r\n\r\n constructor({\r\n id,\r\n title,\r\n value,\r\n disabled,\r\n tooltip,\r\n shouldShowOption,\r\n isIntl,\r\n isLabel,\r\n isNotIntl,\r\n icon,\r\n }) {\r\n this.id = id;\r\n this.title = title;\r\n this.value = value;\r\n this.disabled = disabled;\r\n this.tooltip = tooltip;\r\n this.isLabel = isLabel;\r\n this.icon = icon;\r\n if (!isNullOrUndefined(shouldShowOption)) {\r\n this.shouldShowOption = shouldShowOption;\r\n }\r\n if (!isNullOrUndefined(isIntl)) {\r\n this.isIntl = isIntl;\r\n }\r\n if (!isNullOrUndefined(isNotIntl)) {\r\n this.isNotIntl = isNotIntl;\r\n }\r\n }\r\n}\r\n\r\nexport class KebabMenuOption extends MenuOption {\r\n /** function to fire for this selection */\r\n onSelectOption;\r\n\r\n constructor({\r\n id,\r\n title,\r\n onSelectOption,\r\n disabled,\r\n tooltip,\r\n shouldShowOption,\r\n }) {\r\n super({ id, title, disabled, tooltip, shouldShowOption });\r\n this.onSelectOption = onSelectOption;\r\n }\r\n}\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\nimport queryString from 'query-string';\r\n// Params (like /:id) are concatenated on the path prop of the Route component wherever ConnectedRouter is used\r\nexport const ROUTE_CONSTANTS = {\r\n HOME_PAGE: '/',\r\n TIEOUT_PAGE: '/tieout',\r\n LOGOUT_PAGE: '/tieout/logout',\r\n PROJECT_CREATION_PAGE: '/project/create',\r\n PROJECT_EDIT_PAGE: '/project/:id/edit',\r\n STATEMENT_CREATION: '/project/:projectId/statement/create',\r\n STATEMENT_EDIT_PAGE: '/project/:projectId/statement/:statementId/edit',\r\n STATEMENT_CONTENT_PAGE:\r\n '/project/:projectId/statement/:statementId/revision/:revisionId/:readOnly',\r\n STATEMENT_SPLIT_PAGE:\r\n '/project/:projectId/statement/:statementId/revision/:revisionId/:readOnly/split',\r\n OMNIA_ENGAGEMENT_PAGE: '/link',\r\n SESSION_TIMEOUT: '/timeout',\r\n TERMS_OF_USE: 'https://deloittenet.deloitte.com/system/pages/Use.aspx',\r\n BETA_STATEMENT_GUIDE: `${window.TIEOUT.ENV.DA_BASE_URL}/api/v1/file?key=Asset.TieOut.Help.StatementEvaluationUserGuide`,\r\n PRIVACY:\r\n 'https://www2.deloitte.com/us/en/footerlinks1/privacy-notice-limited-controller.html',\r\n ABOUT: 'https://www.deloitte.com/about',\r\n NOTICES: '/resources/ThirdParty.pdf',\r\n SUPPORT_REQUEST:\r\n 'https://deloitteus.service-now.com/sp?id=kb_article&sys_id=2b09cdf9db8e3e0021697b1cbf96193d',\r\n SERVICE_NOW:\r\n 'https://deloitteglobal.service-now.com/kb_view.do?sysparm_article=KB0059803',\r\n ESC_SUPPORT: 'https://auditonline.aaps.deloitte.com/USPROD/portfolio',\r\n ADMIN_MODULE_PAGE: '/admin',\r\n SIDE_BY_SIDE: '/side-by-side-view',\r\n COOKIE_NOTICE: '/resources/cookie-notice.html',\r\n STATEMENT_EVAULATION_GUIDE: `${window.TIEOUT.ENV.DA_BASE_URL}/api/v1/file?key=Asset.TieOut.Help.UserGuide`,\r\n REPORT_PREVIEW: '/report-preview',\r\n};\r\n\r\n/**\r\n * Parses formatted url strings into useable URL's\r\n * e.g. if a route is `project/:projectId/statement/:statementId/edit` and the arguments passed to `parseRoute` function are\r\n * ```\r\n * parseRoute('project/:projectId/statement/:statementId/edit', {\r\n * params: { projectId: 1, statementId: 3},\r\n * queryParams: { isPeriodToPeriod: true }\r\n * })\r\n * ```\r\n * will return `project/1/statement/3/edit?isPeriodToPeriod=true`\r\n * queryParams are parsed using the query-string package, reference the docs for further information on how this package works (for instance if arrays need to be handled a certain way)\r\n * https://www.npmjs.com/package/query-string\r\n * @param {string} route String representation of route with `:params` formatted with colons\r\n * @param {object} arg1.params key value map where the keys correspond to the `:params` in the route and the values that should replace those params in the url string\r\n * @param {object} arg1.queryParams key value map where the keys correspond to queryParam keys and the values are the values\r\n */\r\nexport const parseRoute = (route, { params, queryParams }) => {\r\n let _route = route;\r\n if (!isNullOrUndefined(params)) {\r\n const paramKeys = Object.keys(params);\r\n // replaces all route params with their the values of the keys by the same name in the params options prop\r\n paramKeys.forEach((paramKey) => {\r\n const paramIndex = _route.indexOf(`:${paramKey}`);\r\n const paramValue = params[paramKey];\r\n _route =\r\n _route.slice(0, paramIndex) +\r\n paramValue +\r\n _route.slice(paramIndex + paramKey.length + 1);\r\n });\r\n }\r\n\r\n if (!isNullOrUndefined(queryParams)) {\r\n // adds route query strings to the route\r\n // if arrays need to be supported as ids=[]24&ids=[]25 etc. then add { arrayFormat: 'brackets'} as the second argument to stringify below\r\n _route = `${_route}?${queryString.stringify(queryParams)}`;\r\n }\r\n\r\n return _route;\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Loading from 'components/common/loading-component';\r\nimport ApiModel from 'models/api-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n createErrorStackTraceAction,\r\n createCatchedErrorJsonAction,\r\n} from 'store/actions/api-error-handler-actions';\r\nimport * as sourceStackTrace from 'sourcemapped-stacktrace';\r\nimport { toast } from 'react-toastify';\r\nimport ApiErrorNotification, {\r\n API_ERROR_NOTIFICATION_ID,\r\n} from 'components/util/api-error-notificiation-component';\r\nimport CloseToastButton from 'components/util/close-toast-button-component';\r\nclass ConditionalRender extends Component {\r\n state = { error: null };\r\n\r\n static getDerivedStateFromError(error) {\r\n return { error };\r\n }\r\n\r\n componentDidCatch(...args) {\r\n console.log('Error caught in error boundary', args);\r\n\r\n // render error notification in the case of runtime errors\r\n let stack = '';\r\n for (let index = 0; index < args.length; index++) {\r\n const element = args[index];\r\n if (element.componentStack) {\r\n stack += element.componentStack;\r\n } else {\r\n stack += element;\r\n }\r\n }\r\n const { createErrorStackTraceAction, locale } = this.props;\r\n createErrorStackTraceAction({ locale, response: stack });\r\n toast.error(, {\r\n className: 'Toastify__toast Toastify__toast__no-hover',\r\n autoClose: false,\r\n closeOnClick: false,\r\n closeButton: ,\r\n draggable: false,\r\n toastId: API_ERROR_NOTIFICATION_ID,\r\n });\r\n }\r\n\r\n render() {\r\n const {\r\n children,\r\n dependencies,\r\n errorComponent: ErrorComponent = () => (\r\n
\r\n \r\n
\r\n ),\r\n loadingComponent: LoadingComponent = () => ,\r\n createErrorStackTraceAction,\r\n createCatchedErrorJsonAction,\r\n locale,\r\n } = this.props;\r\n\r\n const { error } = this.state;\r\n\r\n if (error || dependencies.some(({ error }) => error)) {\r\n if (dependencies.some(({ error }) => error)) {\r\n let browserStack = new Error().stack;\r\n let catchedErrors;\r\n // First try with stack for the failed object and then if there is some\r\n // issue with the approach switch to browser stack.\r\n // Error stack generated using the above approach(browserStack) is generally not recommeneded\r\n // suggested reading : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack\r\n // Hence our first try is to get it from failed Object.\r\n try {\r\n // sourceStackTrace.mapStackTrace is used to undo any unintentional transformation\r\n // of code that is sometimes done by browser to execute/optimise it.\r\n sourceStackTrace.mapStackTrace(browserStack, (stackTrace) => {\r\n browserStack = stackTrace.join('\\n');\r\n });\r\n // filter all the dependecies which has a valid error object.\r\n catchedErrors = dependencies\r\n .filter(\r\n (possibleFailedObj) =>\r\n possibleFailedObj && possibleFailedObj.error,\r\n )\r\n .reduce((prev, current) => [...prev, current.error], []);\r\n // set strack trace values in the redux store.\r\n catchedErrors.forEach((catchedError) => {\r\n // If your object contains error message and stack of type non-enumerable\r\n // then it is not possible to extract it as an Json string and\r\n // update the redux store. Hence we need to check if it is non-enumerbale\r\n // then re-define it and make it enumerable.\r\n catchedError.message &&\r\n !{}.propertyIsEnumerable.call('message', catchedError) &&\r\n Object.defineProperty(catchedError, 'message', {\r\n enumerable: true,\r\n value: catchedError.message,\r\n });\r\n catchedError.stack &&\r\n !{}.propertyIsEnumerable.call('stack', catchedError) &&\r\n Object.defineProperty(catchedError, 'stack', {\r\n enumerable: true,\r\n value: catchedError.stack,\r\n });\r\n // sourceStackTrace.mapStackTrace is used to undo any unintentional transformation\r\n // of code that is sometimes done by browser to execute/optimise it.\r\n catchedError.stack &&\r\n sourceStackTrace.mapStackTrace(\r\n catchedError.stack,\r\n (catchedStack) =>\r\n Object.defineProperty(catchedError, 'stack', {\r\n enumerable: true,\r\n value: catchedStack.join('\\n'),\r\n }),\r\n );\r\n //Added setTimeout method to fix the issue: Cannot update a component while rendering a different component.\r\n //This error occurs when you're trying to update a component's state while rendering a different component.\r\n //This is not allowed in React because it can cause infinite loops and other unexpected behavior.\r\n //To fix this issue, we need to identify the state update call that's causing the problem and move it to a safe location.\r\n //currently added this timer method, we will optimize this later using some other approach\r\n setTimeout(() => {\r\n // Although browser stack trace is not standard. We want to get this info as well.\r\n // Since sometimes it gives worthy info and our intention is to get as much information\r\n // as we can get.\r\n createErrorStackTraceAction({ locale, response: browserStack });\r\n // JSON.stringify(catchedError, null, 2) with 2 passed for space will prettify it\r\n // Hence when we copy it in clipboard it looks indented and good.\r\n createCatchedErrorJsonAction({\r\n locale,\r\n response: JSON.stringify(catchedError, null, 2).replaceAll(\r\n '\\\\n',\r\n '\\n',\r\n ),\r\n });\r\n }, 0);\r\n });\r\n } catch (e) {\r\n // switch to browser stack\r\n createErrorStackTraceAction({ locale, response: browserStack });\r\n }\r\n }\r\n\r\n if (!window.TIEOUT.ENV.FEATURE.ENABLE_UNHANDLED_API_NOTIFCATION) {\r\n toast.error(, {\r\n className: 'Toastify__toast Toastify__toast__no-hover',\r\n autoClose: false,\r\n closeOnClick: false,\r\n closeButton: ,\r\n draggable: false,\r\n toastId: API_ERROR_NOTIFICATION_ID,\r\n });\r\n }\r\n\r\n return ;\r\n }\r\n\r\n if (dependencies.some(({ isLoading }) => isLoading)) {\r\n return ;\r\n }\r\n\r\n if (!dependencies.every(({ isLoaded }) => isLoaded)) {\r\n return null;\r\n }\r\n\r\n return children;\r\n }\r\n}\r\n\r\nConditionalRender.propTypes = {\r\n /** Node to be condtionaly rendered inside of the condition render component */\r\n children: PropTypes.node,\r\n /** Array of Api Models passed in that indicate the state of the api call and its returned data */\r\n dependencies: PropTypes.arrayOf(ApiModel),\r\n /** React component to be displayed for loading state */\r\n loadingComponent: PropTypes.element,\r\n /** React component to be displayed for error state */\r\n errorComponent: PropTypes.element,\r\n};\r\n\r\nconst mapStateToProps = ({ ui: { locale } }) => ({\r\n locale,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n createErrorStackTraceAction,\r\n createCatchedErrorJsonAction,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ConditionalRender);\r\n","import { getStore } from 'store/store';\r\nimport { JOB_TYPES } from '../../constants/common/job-type-constants';\r\nimport { isNullOrUndefined } from 'util';\r\nconst RoleUtil = {\r\n /**A helper function to get the current user from the store. */\r\n _getUser: () => {\r\n const stateData = getStore().getState().data;\r\n let user = null;\r\n if (stateData.currentUser.isInitialized()) {\r\n user = stateData.currentUser.data;\r\n }\r\n return user;\r\n },\r\n\r\n /** A helper function to get a project from the project list in the store based on its ID.\r\n * If not provided, it will attempt to fetch the currently selected project in the store as a fallback.\r\n * If neither of these lists are populated, `null` is returned.\r\n *\r\n * @param {string} projectID - The optional projectID used to fetch a project from the project list in the store.\r\n *\r\n * @return {Project} - The appropriate project based on the optional projectID, or `null` if none is found.\r\n *\r\n * */\r\n _getProject: (projectID) => {\r\n const stateData = getStore().getState().data;\r\n let desiredProject = null;\r\n // Use the selected project by default from the store if it exists.\r\n if (\r\n (!projectID || !stateData.projectList.hasProjects()) &&\r\n stateData.selectedProject &&\r\n stateData.selectedProject.project.isInitialized()\r\n ) {\r\n desiredProject = stateData.selectedProject.project;\r\n } else if (projectID && stateData.projectList.hasProjects()) {\r\n // Otherwise use the provided projectID to find it.\r\n const projectList = stateData.projectList.getProjects();\r\n desiredProject = projectList.find((project) => {\r\n return project.id === projectID;\r\n });\r\n }\r\n return desiredProject;\r\n },\r\n\r\n /** This function is used to determine if a user has admin access on a project in the store based on an optional projectID.\r\n * If no projectID is provided, the admin access is checked against the currently selected project in the store,\r\n * if one is provided, it attempts to determine admin access from the project list in the store with that id.\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHaveAdminSupportAccess - true iff the user is an admin and the retrieved project has admin access.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n doesUserHaveAdminSupportAccess: (projectID) => {\r\n const user = RoleUtil._getUser();\r\n if (user && user.admin) {\r\n const desiredProject = RoleUtil._getProject(projectID);\r\n if (desiredProject) {\r\n return desiredProject.hasAdminGroup;\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n /** This function is used to determine if a user has the role of COE for a given project.\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHaveCoeRoleForProject - true iff the user is an COE on the project.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n doesUserHaveCoeRoleForProject: (projectID) => {\r\n const user = RoleUtil._getUser();\r\n if (user && user.coe) {\r\n const desiredProject = RoleUtil._getProject(projectID);\r\n if (desiredProject) {\r\n return desiredProject.hasCoeGroup;\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n /** This private function is used to determine if a user has a specific role on a project in the store based on an optional projectID.\r\n * If no projectID is provided, the role is checked against the currently selected project in the store,\r\n * if one is provided, it attempts to compare it to the project in the store with that id, provided it exists.\r\n *\r\n * @param {String} role - The JOB_TYPE we wish to check on the appropriate project (e.g. Engagement Owner, etc...)\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHaveProjectRole - true iff the user has the specified `role` in the project.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n _doesUserHaveProjectRole: ({ role, projectID }) => {\r\n const user = RoleUtil._getUser();\r\n if (!isNullOrUndefined(user)) {\r\n const projectToGeoMap = user.projectToGeoMap;\r\n if (!isNullOrUndefined(projectToGeoMap)) {\r\n let userRole;\r\n //If a projectID was supplied, try to find it in the user roles map.\r\n if (!isNullOrUndefined(projectID)) {\r\n userRole =\r\n projectToGeoMap.get(`${projectID}`) &&\r\n projectToGeoMap.get(`${projectID}`).role;\r\n } else {\r\n //Otherwise fetch the currently selected project if there is no projectID provided.\r\n const selectedProject = RoleUtil._getProject();\r\n if (!isNullOrUndefined(selectedProject)) {\r\n userRole =\r\n projectToGeoMap.get(`${selectedProject.id}`) &&\r\n projectToGeoMap.get(`${selectedProject.id}`).role;\r\n }\r\n }\r\n return userRole === role;\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n /** This function is used to determine if a user has the role of PPMD for a given project.\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHavePPMDRoleForProject - true iff the user is a PPMD on the project.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n doesUserHavePPMDRoleForProject: (projectID) => {\r\n return RoleUtil._doesUserHaveProjectRole({\r\n role: JOB_TYPES.PPMD,\r\n projectID,\r\n });\r\n },\r\n\r\n /** This function is used to determine if a user has the role of Engagement Owner for a given project.\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHaveEngagementOwnerRoleForProject - true iff the user is an Engagement Owner on the project.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n doesUserHaveEngagementOwnerRoleForProject: (projectID) => {\r\n return RoleUtil._doesUserHaveProjectRole({\r\n role: JOB_TYPES.ENGAGEMENT_OWNER,\r\n projectID,\r\n });\r\n },\r\n\r\n /** This function is used to determine if a user has the role of Observer for a given project.\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHaveObserverRoleForProject - true iff the user is an Observer on the project.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n doesUserHaveObserverRoleForProject: (projectID) => {\r\n return RoleUtil._doesUserHaveProjectRole({\r\n role: JOB_TYPES.OBSERVER,\r\n projectID,\r\n });\r\n },\r\n\r\n /** This function is used to determine if a user has the role of Preparer Reviewer for a given project.\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHavePreparerReviewerRoleForProject - true iff the user is a Preparer Reviewer on the project.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n doesUserHavePreparerReviewerRoleForProject: (projectID) => {\r\n return RoleUtil._doesUserHaveProjectRole({\r\n role: JOB_TYPES.PREPARER_REVIEWER,\r\n projectID,\r\n });\r\n },\r\n\r\n /** This function is used to determine if a user has the role of Admin for a given project.\r\n *\r\n * @param {String} projectID - The optional ID used to fetch a project from the project list in the store.\r\n *\r\n * @return {boolean} doesUserHaveAdminRoleForProject - true iff the user is an Admin on the project.\r\n * False otherwise, including if the user or project cannot be found.\r\n *\r\n * */\r\n doesUserHaveAdminRoleForProject: (projectID) => {\r\n return RoleUtil._doesUserHaveProjectRole({\r\n role: JOB_TYPES.ADMIN,\r\n projectID,\r\n });\r\n },\r\n};\r\nexport default RoleUtil;\r\n","import model from './base-model';\r\n/**\r\n * Abstract class for different models that are used in React State or Redux AND that represent data that needs to be fetched from\r\n * the API\r\n * Comes with error, isLoaded, isLoading props which are used in tandem with the component to render loaders while\r\n * data is loading.\r\n * Each api call should have 3 actions whose reducers call the instance methods setLoading, setError, and setLoaded durring the process\r\n * of executing the api call\r\n *\r\n * Each setLoaded function also calls a user defined processResponse function that must be defined for each ApiModel that extends this model\r\n * This function should set the data: {} property with all the actual api fields\r\n *\r\n * Should not be instantied by itself, it is meant to be extended different models that fetch API data.\r\n */\r\nexport default (defaultProps = {}) => {\r\n return class ApiModel extends model({\r\n error: null,\r\n isLoaded: false,\r\n isLoading: false,\r\n data: null,\r\n ...defaultProps,\r\n }) {\r\n setLoading() {\r\n return this.merge({\r\n isLoading: true,\r\n isLoaded: false,\r\n });\r\n }\r\n\r\n setError(error) {\r\n return this.merge({ error });\r\n }\r\n\r\n setLoaded(response) {\r\n const modelControlValues = this.processResponse(response);\r\n return this.merge({\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n ...modelControlValues,\r\n });\r\n }\r\n setLoadedWithoutResponse() {\r\n return this.merge({\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n data: this.data,\r\n });\r\n }\r\n\r\n processResponse(response) {\r\n throw Error(`\r\n A processResponse function needs to be defined on your api model which returns the appropriate shape of any instance control properties\r\n For instance if you have an api model called ProjectList that gets a list of projects, the return value of this function might look like\r\n {\r\n data: {\r\n projects: [] // array of projects\r\n },\r\n status: 0 // indication of status of the client\r\n }\r\n you need to define a processResponse method on your ProjectList model that formats your projects array\r\n this may look like\r\n processResponse(response) {\r\n return {\r\n projects: response.data.map(project => new Project(project))\r\n status: response.status,\r\n }\r\n }\r\n `);\r\n }\r\n\r\n /**\r\n * Expresses the state of of this model after the api call has been made.\r\n * We might not have data yet, but we know that data has at least been fetched because loading is true\r\n */\r\n isInitiated() {\r\n return this.isLoading || this.isLoaded;\r\n }\r\n\r\n mergeData(updates = {}) {\r\n const data = { ...this.data, ...updates };\r\n return this.merge({ data });\r\n }\r\n };\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n getElementDetailsRequest,\r\n updateElementRequest,\r\n excludeElementFromElementListRequest,\r\n getHistoryForElementRequest,\r\n} from 'api/element-api';\r\nimport {\r\n getFormulasForElementRequest,\r\n deleteFormulaRequest,\r\n} from 'api/formula-api';\r\nimport {\r\n clearSelectedElementsContentPanel,\r\n fetchClientEntityList,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nimport {\r\n updateElementCacheByCalloutAction,\r\n updateElementInCacheAction,\r\n} from 'store/actions/element-cache-actions';\r\nimport {\r\n getElementInternalReference,\r\n getInternalReferenceWithoutLoading,\r\n} from 'store/actions/internal-reference-actions';\r\n\r\nimport {\r\n getWorkpapersForElementRequest,\r\n detachElementWorkpaperRequest,\r\n updateWorkpaperRequest,\r\n} from 'api/workpaper-api';\r\n\r\nimport { replaceSelectedElementsContentPanel } from 'store/actions/statement-content-actions';\r\nimport {\r\n getElementTickmarksRequest,\r\n attachTickmarkToElementRequest,\r\n detachTickmarkFromElementRequest,\r\n} from 'api/tickmark-api';\r\nimport { updateCacheWithMostRecentElementChanges } from 'store/actions/element-changes-since-tracker-actions';\r\nimport {\r\n fetchSectionHTMLSegmentsStatementContent,\r\n fetchElementsBySection,\r\n selectElementContentPanel,\r\n sectionHTMLSegmentsStatementContentLoading,\r\n sectionHTMLSegmentsStatementContentLoadedWithoutResponse,\r\n} from 'store/actions/statement-content-actions';\r\nimport { fetchStatementSummaryElements } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport {\r\n linkElementInComfortLetterElementsMapAndUpdateCountAction,\r\n unlinkElementInComfortLetterElementsMapAndUpdateCountAction,\r\n updateComfortLettersElementsMapArray,\r\n} from './comfort-annotations-list-actions';\r\n\r\nimport {\r\n showElementPanelAction,\r\n hideElementPanelAction,\r\n} from './panel-controller-actions';\r\nimport { clearBatchSelectedElementsAction } from './batch-panel-actions';\r\nimport { updateElementsSearchByIds } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport { getElementHightlightState } from 'constants/feature/statement-content-constants';\r\nimport {\r\n excludeElementFromElementsMapAction,\r\n fetchTickmarkListForRevisionWithoutLoading,\r\n} from 'store/actions/tickmark-list-panel-actions';\r\nimport {\r\n updateWorkpaperElementsMap,\r\n unlinkElementFromElementsMap,\r\n updateWorkpaperElementsMapFromArray,\r\n removeElementFromElementsMap,\r\n updateWorkpaperWithSocketPayloadAction,\r\n} from 'store/actions/workpaper-toolkit-list-actions';\r\nimport {\r\n updateTickmarkElementsMap,\r\n fetchElementsFromTickmark,\r\n updateTickmarkElementsMapFromArray,\r\n excludeElementFromTickmarkElementsMap,\r\n} from 'store/actions/tickmark-list-panel-actions';\r\nimport { LEFT_PANELS, RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { fetchSuggestedListed } from 'store/actions/internal-reference-suggestion-list-actions';\r\nimport { ELEMENT_ANNOTATIONS_TABS } from 'constants/feature/element-panel-constants';\r\nimport { cancelCopyFormula } from './copy-formula-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n attachComfortLetterToElementRequest,\r\n detachComfortLetterToElementRequest,\r\n getComfortLetterForElementRequest,\r\n} from 'api/comfort-letter-api';\r\nimport { isArray } from 'lodash';\r\n\r\nexport const removeWPFromElementPanelAction = createAction(\r\n 'REMOVE_WORKPAPER_FROM_ELEMENT_PANEL_ACTION',\r\n);\r\n\r\nexport const updateWPFromElementPanelAction = createAction(\r\n 'UPDATE_WORKPAPER_FROM_ELEMENT_PANEL_ACTION',\r\n);\r\nexport const updateTickmarkInElementPanelWithSocketPayloadAction = createAction(\r\n 'UPDATE_TICKMARK_IN_ELEMENT_PANEL_ACTION',\r\n);\r\n\r\nexport const removeTickmarkFromElementPanelWithSocketPayloadAction =\r\n createAction('REMOVE_TICKMARK_FROM_ELEMENT_PANEL_ACTION');\r\n\r\nexport const elementTickmarkListFromWebSocketPayloadAction = createAction(\r\n 'SET_ELEMENT_TICKMARK_LIST_FROM_WEB_SOCKET_ACTION',\r\n);\r\n\r\nexport const removeTickmarkWithSocketPayloadInBulk = createAction(\r\n 'REMOVE_TICKMARK_WITH_SOCKET_PAYLOAD_IN_BULK',\r\n);\r\n\r\nexport const elementTickmarkListLoadedWithoutResponse = createAction(\r\n 'ELEMENT_TICKMARK_LIST_LOADED_WITHOUT_RESPONSE',\r\n);\r\n\r\nexport const elementDetailsLoading = createAction('ELEMENT_DETAILS_LOADING');\r\nexport const elementDetailsLoaded = createAction('ELEMENT_DETAILS_LOADED');\r\nexport const elementDetailsError = createAction('ELEMENT_DETAILS_ERROR');\r\n\r\nexport const updateElementVerify = createAction('UPDATE_ELEMENT_VERIFY');\r\nexport const updateElementReview = createAction('UPDATE_ELEMENT_REVIEW');\r\nexport const updateElementUserFlag = createAction('UPDATE_ELEMENT_USER_FLAG');\r\nexport const updateElementOverrideSystemFlag = createAction(\r\n 'UPDATE_ELEMENT_OVERRIDE_SYSTEM_FLAG',\r\n);\r\n\r\nexport const updateElementComfortAssignAnnotation = createAction(\r\n 'UPDATE_ELEMENT_COMFORT_ASSIGN_ANNOTATION',\r\n);\r\n\r\nexport const updateElementScaling = createAction('UPDATE_ELEMENT_SCALING');\r\nexport const updateElementUnits = createAction('UPDATE_ELEMENT_UNITS');\r\nexport const updateElementPeriod = createAction('UPDATE_ELEMENT_PERIOD');\r\n\r\nexport const updateElementEntity = createAction(\r\n 'UPDATE_ELEMENT_ATTRIBUTE_ENTITY',\r\n);\r\n\r\nexport const elementFormulaListLoading = createAction(\r\n 'ELEMENT_FORMULA_LIST_LOADING',\r\n);\r\nexport const elementFormulaListLoaded = createAction(\r\n 'ELEMENT_FORMULA_LIST_LOADED',\r\n);\r\nexport const elementFormulaListError = createAction(\r\n 'ELEMENT_FORMULA_LIST_ERROR',\r\n);\r\n\r\nexport const deleteFormulaError = createAction('DELETE_FORMULA_ERROR');\r\n\r\nexport const elementWorkpaperListLoading = createAction(\r\n 'ELEMENT_WORKPAPER_LIST_LOADING',\r\n);\r\nexport const elementWorkpaperListLoaded = createAction(\r\n 'ELEMENT_WORKPAPER_LIST_LOADED',\r\n);\r\nexport const elementWorkpaperListLoadedWithoutResponse = createAction(\r\n 'ELEMENT_WORKPAPER_LIST_LOADED_WITHOUT_RESPONSE',\r\n);\r\nexport const elementWorkpaperListError = createAction(\r\n 'ELEMENT_WORKPAPER_LIST_ERROR',\r\n);\r\n\r\nexport const elementWorkpaperListFromWebSocketPayloadAction = createAction(\r\n 'SET_WORKPAPER_LIST_FROM_WEB_SOCKET_ACTION',\r\n);\r\n\r\nexport const elementTickmarkListLoading = createAction(\r\n 'ELEMENT_TICKMARK_LIST_LOADING',\r\n);\r\nexport const elementTickmarkListLoaded = createAction(\r\n 'ELEMENT_TICKMARK_LIST_LOADED',\r\n);\r\nexport const elementTickmarkListError = createAction(\r\n 'ELEMENT_TICKMARK_LIST_ERROR',\r\n);\r\nexport const selectCreatedElementAction = createAction(\r\n 'SELECT_CREATED_ELEMENT_ACTION',\r\n);\r\nexport const setElementHistoryLoading = createAction('ELEMENT_HISTORY_LOADING');\r\nexport const setElementHistoryLoaded = createAction('ELEMENT_HISTORY_LOADED');\r\nexport const setElementHistoryError = createAction('ELEMENT_HISTORY_ERROR');\r\nexport const clearElementHistory = createAction('CLEAR_ELEMENT_HISTORY');\r\n\r\nexport const updateElementSectionName = createAction(\r\n 'SET_ELEMENT_SECTION_NAME',\r\n);\r\n\r\nexport const updateElementPanelFromSocketPayload = createAction(\r\n 'UPDATE_ELEMENT_PANEL_FROM_SOCKET_PAYLOAD',\r\n);\r\n\r\nexport const removeElementFromFormulaTabFromSocketPayloadAction = createAction(\r\n 'REMOVE_ELEMENT_FROM_FORMULA_TAB_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const addFormulaToFormulaListFromSocketPayloadAction = createAction(\r\n 'ADD_FORMULA_TO_FORMULA_LIST_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const elementFormulaListLoadedWithoutResponse = createAction(\r\n 'ELEMENT_FORMULA_LIST_LOADING_WITHOUT_RESPONSE_ACTION',\r\n);\r\n\r\nexport const removeWorkpaperFromElementPanelWithSocketPayload = createAction(\r\n 'REMOVE_WORKPAPER_FROM_ELEMENT_PANEL_WITH_SOCKET_PAYLOAD',\r\n);\r\n\r\nexport const elementComfortLetterListLoading = createAction(\r\n 'ELEMENT_COMFORT_LETTER_LIST_LOADING_ACTION',\r\n);\r\nexport const elementComfortLetterListLoaded = createAction(\r\n 'ELEMENT_COMFORT_LETTER_LIST_LOADED_ACTION',\r\n);\r\nexport const elementComfortLetterListLoadedWithoutResponse = createAction(\r\n 'ELEMENT_COMFORT_LETTER_LIST_LOADED_WITHOUT_RESPONSE_ACTION',\r\n);\r\n\r\nexport const elementComfortLetterListError = createAction(\r\n 'ELEMENT_COMFORT_LETTER_LIST_ERROR',\r\n);\r\n\r\nexport const initElementPanel =\r\n ({ elementId, color }) =>\r\n async (dispatch, getStore) => {\r\n await dispatch(showElementPanelAction());\r\n await dispatch(fetchSelectedElementDetails({ elementId }));\r\n const { right } = getStore().ui.statementPage.panels;\r\n const selectedElements = getStore().ui.statementPage.selectedElementsMap;\r\n const isElementSelected = elementId in selectedElements;\r\n const isElementLocated = isElementSelected\r\n ? selectedElements[elementId].color ===\r\n ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED\r\n : null;\r\n const { elementDetails } = getStore().data.elementPanel;\r\n dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementId],\r\n color: color\r\n ? color\r\n : isElementLocated\r\n ? ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED\r\n : getElementHightlightState(right, elementDetails.id, elementId),\r\n }),\r\n );\r\n // clear batch panel if there are any selected elements there\r\n dispatch(clearBatchSelectedElementsAction());\r\n };\r\n\r\nexport const fetchSelectedElementDetails =\r\n ({ elementId }) =>\r\n async (dispatch, getStore) => {\r\n const selectedStatement =\r\n getStore().data &&\r\n getStore().data.selectedStatement &&\r\n getStore().data.selectedStatement.data &&\r\n getStore().data.selectedStatement.data.statement;\r\n\r\n dispatch(elementDetailsLoading());\r\n await dispatch(getElementDetailsWithoutLoading(elementId));\r\n dispatch(getElementFormulas({ elementId }));\r\n dispatch(getElementInternalReference());\r\n dispatch(getElementWorkpapers({ elementId }));\r\n dispatch(getElementTickmarks({ elementId }));\r\n\r\n // check if comfort letter feature is enabled before making api call for fetching list of comfort letter\r\n selectedStatement &&\r\n selectedStatement.comfortLetter &&\r\n dispatch(getElementComfortLetters({ elementId }));\r\n };\r\n\r\nexport const getElementDetailsWithoutLoading =\r\n (elementId) => async (dispatch, getStore) => {\r\n const {\r\n revision,\r\n statementContent: { elementCache },\r\n } = getStore().data;\r\n try {\r\n const response = await getElementDetailsRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n if (response && response.data && response.data.result) {\r\n const elementData = elementCache.getElementsListByElementIds({\r\n elementIds: [elementId],\r\n });\r\n if (elementData.length) {\r\n const { callout, marker } = elementData[0];\r\n response.data.result['marker'] = !isNullOrUndefined(marker) && marker;\r\n response.data.result['callout'] =\r\n !isNullOrUndefined(callout) && callout;\r\n }\r\n }\r\n dispatch(\r\n elementDetailsLoaded({\r\n response,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(elementDetailsError(error));\r\n }\r\n };\r\n\r\nexport const getElementFormulas =\r\n ({ elementId }) =>\r\n async (dispatch, getStore) => {\r\n const { revision } = getStore().data;\r\n dispatch(elementFormulaListLoading());\r\n try {\r\n const response = await getFormulasForElementRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n dispatch(\r\n elementFormulaListLoaded({\r\n response,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(elementFormulaListError(error));\r\n }\r\n };\r\n\r\nexport const getElementFormulasWithoutLoading =\r\n ({ elementId }) =>\r\n async (dispatch, getStore) => {\r\n const { revision } = getStore().data;\r\n const socketModel = getStore().sockets;\r\n const { socketHasBeenDisconnected } =\r\n socketModel && socketModel.statementSocket;\r\n try {\r\n const response = await getFormulasForElementRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n await dispatch(\r\n elementFormulaListLoaded({\r\n response,\r\n }),\r\n );\r\n if (\r\n !isNullOrUndefined(socketHasBeenDisconnected) &&\r\n socketHasBeenDisconnected\r\n ) {\r\n await dispatch(_updateElementDetailsInStoreAndElementCache());\r\n }\r\n } catch (error) {\r\n dispatch(elementFormulaListError(error));\r\n }\r\n };\r\n\r\nexport const _updateStatementSummaryElements = async (dispatch, getState) => {\r\n const { revisionId } = getState().data.elementPanel.elementDetails;\r\n dispatch(fetchStatementSummaryElements({ revisionId }));\r\n};\r\n\r\nexport const updateVerify =\r\n ({ verified }) =>\r\n async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n await dispatch(updateElementVerify({ verified }));\r\n await dispatch(_updateElementDetailsInStoreAndElementCache());\r\n await dispatch(getHistoryForElementPanel());\r\n if (socketHasBeenDisconnected) {\r\n dispatch(_updateStatementSummaryElements);\r\n }\r\n };\r\n\r\nexport const updateReviewed =\r\n ({ reviewed }) =>\r\n async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n await dispatch(updateElementReview({ reviewed }));\r\n await dispatch(_updateElementDetailsInStoreAndElementCache());\r\n await dispatch(getHistoryForElementPanel());\r\n if (socketHasBeenDisconnected) {\r\n dispatch(_updateStatementSummaryElements);\r\n }\r\n };\r\n\r\nexport const updateUserFlag =\r\n ({ userFlag }) =>\r\n async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n await dispatch(updateElementUserFlag({ userFlag }));\r\n await dispatch(_updateElementDetailsInStoreAndElementCache());\r\n await dispatch(getHistoryForElementPanel());\r\n if (socketHasBeenDisconnected) {\r\n dispatch(_updateStatementSummaryElements);\r\n }\r\n // TODO maybe update elementDetails from response?\r\n // right now end point returns an html changes object\r\n // which won't be useful in Aruba\r\n };\r\n\r\nexport const updateOverrideSystemFlag =\r\n ({ systemFlag }) =>\r\n async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n await dispatch(updateElementOverrideSystemFlag({ systemFlag }));\r\n await dispatch(_updateElementDetailsInStoreAndElementCache());\r\n await dispatch(getHistoryForElementPanel());\r\n if (socketHasBeenDisconnected) {\r\n dispatch(_updateStatementSummaryElements);\r\n }\r\n };\r\n\r\nexport const updateComfortAssignAnnotation =\r\n ({ comfortAssignVal }) =>\r\n async (dispatch, getState) => {\r\n await dispatch(updateElementComfortAssignAnnotation({ comfortAssignVal }));\r\n await dispatch(_updateElementDetailsInStoreAndElementCache());\r\n };\r\n\r\nconst _updateElementDetailsInStoreAndElementCache =\r\n (selectedElementPanelAnnotationsTab) => async (dispatch, getState) => {\r\n try {\r\n const storeData = getState().data;\r\n const { revision } = storeData;\r\n const { elementDetails } = storeData.elementPanel;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n\r\n await updateElementRequest({\r\n revisionId: revision.id,\r\n elementId: elementDetails.id,\r\n elementDetails,\r\n });\r\n if (\r\n selectedElementPanelAnnotationsTab &&\r\n selectedElementPanelAnnotationsTab.id ===\r\n ELEMENT_ANNOTATIONS_TABS.INTERNAL_REFERENCE.id\r\n ) {\r\n await dispatch(\r\n fetchSuggestedListed({\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n }),\r\n );\r\n }\r\n // rely on these methods of updaing the ui if the client fails to connect to signalr\r\n if (socketHasBeenDisconnected) {\r\n // dispatch(getElementDetailsWithoutLoading(elementDetails.id));\r\n dispatch(updateCacheWithMostRecentElementChanges());\r\n // Update elements search results\r\n dispatch(\r\n updateElementsSearchByIds({ elementIds: [elementDetails.id] }),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(elementDetailsError(error));\r\n }\r\n };\r\n\r\n/** This thunk both creates a new entity when entity doesn't exist\r\n * or updates the entity value selected from the entity dropdown menu */\r\nexport const updateOrCreateEntity =\r\n (entity, selectedElementPanelAnnotationsTab) =>\r\n async (dispatch, getState) => {\r\n const { project } = getState().data.selectedProject;\r\n await dispatch(updateElementEntity(entity));\r\n await dispatch(\r\n _updateElementDetailsInStoreAndElementCache(\r\n selectedElementPanelAnnotationsTab,\r\n ),\r\n );\r\n dispatch(fetchClientEntityList(project.id));\r\n };\r\n\r\nexport const updateScaling =\r\n (scaling, selectedElementPanelAnnotationsTab) =>\r\n async (dispatch, getState) => {\r\n await dispatch(updateElementScaling({ scaling }));\r\n dispatch(\r\n _updateElementDetailsInStoreAndElementCache(\r\n selectedElementPanelAnnotationsTab,\r\n ),\r\n );\r\n };\r\n\r\nexport const updateUnits =\r\n (units, selectedElementPanelAnnotationsTab) => async (dispatch, getState) => {\r\n await dispatch(updateElementUnits({ units }));\r\n dispatch(\r\n _updateElementDetailsInStoreAndElementCache(\r\n selectedElementPanelAnnotationsTab,\r\n ),\r\n );\r\n };\r\n\r\nexport const updatePeriod =\r\n (period, selectedElementPanelAnnotationsTab) =>\r\n async (dispatch, getState) => {\r\n await dispatch(updateElementPeriod(period.value));\r\n dispatch(\r\n _updateElementDetailsInStoreAndElementCache(\r\n selectedElementPanelAnnotationsTab,\r\n ),\r\n );\r\n };\r\n\r\nexport const hideElementPanel = () => (dispatch) => {\r\n dispatch(hideElementPanelAction());\r\n dispatch(clearSelectedElementsContentPanel());\r\n dispatch(cancelCopyFormula());\r\n};\r\n\r\nexport const deleteFormulaFromList =\r\n (formulaId, creationType, type) => async (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const { revision } = storeData;\r\n const { elementDetails } = storeData.elementPanel;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n try {\r\n await deleteFormulaRequest({\r\n revisionId: revision.id,\r\n elementId: elementDetails.id,\r\n formulaId,\r\n creationType,\r\n type,\r\n });\r\n\r\n if (socketHasBeenDisconnected) {\r\n dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementDetails.id],\r\n }),\r\n );\r\n dispatch(_updateStatementSummaryElements);\r\n /**\r\n * We have to fetch the element again as its flaggging display may have changed\r\n * after a formula is successfully deleted.\r\n */\r\n await dispatch(\r\n fetchSelectedElementDetails({ elementId: elementDetails.id }),\r\n );\r\n dispatch(getElementFormulas({ elementId: elementDetails.id }));\r\n dispatch(updateElementAnnotationDetails());\r\n dispatch(\r\n updateElementsSearchByIds({ elementIds: [elementDetails.id] }),\r\n );\r\n } else {\r\n dispatch(elementFormulaListLoading());\r\n setTimeout(() => {\r\n dispatch(elementFormulaListLoadedWithoutResponse());\r\n }, 5000);\r\n }\r\n } catch (error) {\r\n dispatch(deleteFormulaError(error));\r\n }\r\n };\r\n\r\nexport const getElementWorkpapers =\r\n ({ elementId }) =>\r\n async (dispatch, getState) => {\r\n dispatch(elementWorkpaperListLoading());\r\n try {\r\n const { revision } = getState().data;\r\n const response = await getWorkpapersForElementRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n dispatch(\r\n elementWorkpaperListLoaded({\r\n response,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(elementWorkpaperListError(error));\r\n }\r\n };\r\n\r\n/** Function used to fetch the currently selected element's attached workpapers\r\n * and then update the element cache if necessary\r\n */\r\nexport const getElementWorkpapersAndUpdateElementCache =\r\n () => async (dispatch, getState) => {\r\n const { elementDetails } = getState().data.elementPanel;\r\n // fetch the new list of workpapers and update the elementDetails object with them\r\n await dispatch(getElementWorkpapers({ elementId: elementDetails.id }));\r\n\r\n // Get the updated elementDetails with their new workpapers\r\n const updatedStoreData = getState().data;\r\n const updatedElementWPList = updatedStoreData.elementPanel.workpaperList;\r\n const { elementCache } = updatedStoreData.statementContent;\r\n const _needToUpdateCacheToo = elementCache.hasElement({\r\n sectionId: elementDetails.sectionId,\r\n elementId: elementDetails.id,\r\n });\r\n if (_needToUpdateCacheToo) {\r\n const updatedElementForCache = elementCache\r\n .getElement({\r\n sectionId: elementDetails.sectionId,\r\n elementId: elementDetails.id,\r\n })\r\n .setElementAnnotations({\r\n workpaperReferenceNumberList: updatedElementWPList.workpapers.map(\r\n (workpaper) => workpaper.referenceNumber,\r\n ),\r\n });\r\n dispatch(updateElementInCacheAction({ element: updatedElementForCache }));\r\n }\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementDetails.id] }));\r\n dispatch(updateElementAnnotationDetails());\r\n };\r\n\r\nexport const getElementWorkpapersAndUpdateElementCacheWithParameters =\r\n ({ elementId, sectionId }) =>\r\n async (dispatch, getState) => {\r\n Number.isInteger(elementId) &&\r\n (await dispatch(getElementWorkpapers({ elementId })));\r\n\r\n // Get the updated elementDetails with their new workpapers\r\n const updatedStoreData = getState().data;\r\n const updatedElementWPList = updatedStoreData.elementPanel.workpaperList;\r\n const { elementCache } = updatedStoreData.statementContent;\r\n const _needToUpdateCacheToo = elementCache.hasElement({\r\n sectionId,\r\n elementId,\r\n });\r\n if (_needToUpdateCacheToo) {\r\n const updatedElementForCache = elementCache\r\n .getElement({\r\n sectionId,\r\n elementId,\r\n })\r\n .setElementAnnotations({\r\n workpaperReferenceNumberList: updatedElementWPList.workpapers.map(\r\n (workpaper) => workpaper.referenceNumber,\r\n ),\r\n });\r\n dispatch(updateElementInCacheAction({ element: updatedElementForCache }));\r\n }\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementId.id] }));\r\n };\r\n\r\nexport const editWorkpaperDetailsAction =\r\n ({ revisionId, workpaper }) =>\r\n async (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const { elementDetails } = storeData.elementPanel;\r\n\r\n const { socketHasBeenDisconnected } = getState().sockets.statementSocket;\r\n\r\n await updateWorkpaperRequest({\r\n revisionId,\r\n workpaper,\r\n });\r\n\r\n const updatedWorkpaper = workpaper && {\r\n ...workpaper.data,\r\n wpRefId: workpaper.workpaperRefId,\r\n };\r\n\r\n if (socketHasBeenDisconnected) {\r\n // update the workpaper toolkit\r\n updatedWorkpaper &&\r\n (await dispatch(\r\n updateWorkpaperWithSocketPayloadAction(updatedWorkpaper),\r\n ));\r\n\r\n // update cache. This will update the element in statement content page without fetching summary.\r\n // Since updating workpaper does not have to result in update of statement summary.\r\n dispatch(updateCacheWithMostRecentElementChanges(false, true));\r\n\r\n //update element panel if it is opened\r\n updatedWorkpaper &&\r\n Number.isInteger(elementDetails.id) &&\r\n dispatch(updateWPFromElementPanelAction(updatedWorkpaper));\r\n\r\n // This will update searched elements in statement nav only if statement nav is opened\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementDetails.id] }));\r\n }\r\n };\r\n\r\nexport const detachElementWorkpaper =\r\n ({ workpaper }) =>\r\n async (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const { revision } = storeData;\r\n const { elementDetails } = storeData.elementPanel;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n\r\n try {\r\n dispatch(elementWorkpaperListLoading());\r\n await detachElementWorkpaperRequest({\r\n revisionId: revision.id,\r\n elementId: elementDetails.id,\r\n workpaperId: workpaper.workpaperRefId,\r\n });\r\n\r\n if (socketHasBeenDisconnected) {\r\n await dispatch(\r\n getElementWorkpapersAndUpdateElementCache({\r\n elementId: elementDetails.id,\r\n }),\r\n );\r\n\r\n dispatch(\r\n unlinkElementFromElementsMap({\r\n elementId: elementDetails.id,\r\n wpRefId: workpaper.workpaperRefId,\r\n }),\r\n );\r\n } else {\r\n setTimeout(() => {\r\n dispatch(elementWorkpaperListLoadedWithoutResponse());\r\n }, 5000);\r\n }\r\n } catch (error) {\r\n dispatch(elementWorkpaperListError(error));\r\n }\r\n };\r\n\r\nexport const getElementTickmarksWithoutLoading =\r\n ({ elementId }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n const { revision } = getState().data;\r\n const response = await getElementTickmarksRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n await dispatch(elementTickmarkListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(elementTickmarkListError(error));\r\n }\r\n };\r\n\r\nexport const getElementComfortLetters =\r\n ({ elementId }) =>\r\n async (dispatch) => {\r\n await dispatch(elementComfortLetterListLoading());\r\n await dispatch(getElementComfortLettersWithoutLoading({ elementId }));\r\n };\r\n\r\nexport const getElementComfortLettersWithoutLoading =\r\n ({ elementId }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n const { revision } = getState().data;\r\n const response = await getComfortLetterForElementRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n await dispatch(elementComfortLetterListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(elementComfortLetterListError(error));\r\n }\r\n };\r\n\r\nexport const getElementTickmarks =\r\n ({ elementId }) =>\r\n async (dispatch) => {\r\n await dispatch(elementTickmarkListLoading());\r\n await dispatch(getElementTickmarksWithoutLoading({ elementId }));\r\n };\r\n\r\nexport const getElementTickmarksAndUpdateElementCache =\r\n (element) => async (dispatch, getState) => {\r\n // When attaching tickmark for some element in element panel then element value is sent as undefined\r\n // It should by default understood as element belongs to element panel\r\n // eslint-disable-next-line no-unused-vars\r\n let isElementFromElementPanel = true;\r\n let response;\r\n const openedPanel = getState().ui.statementPage.panels.right;\r\n let { elementDetails } = getState().data.elementPanel;\r\n // Get the updated elementDetails with their new tikcmarks\r\n let updatedStoreData = getState().data;\r\n if (element) {\r\n isElementFromElementPanel =\r\n element.id === elementDetails.id && openedPanel === RIGHT_PANELS.ELEMENT\r\n ? true\r\n : false;\r\n elementDetails = element;\r\n }\r\n\r\n if (isElementFromElementPanel) {\r\n // If element belongs to element panel and element panel is opened\r\n // then refresh tickmark in element panel\r\n await dispatch(\r\n getElementTickmarks({\r\n elementId: getState().data.elementPanel.elementDetails.id,\r\n }),\r\n );\r\n updatedStoreData = getState().data;\r\n response = updatedStoreData.elementPanel.tickmarkList.tickmarks.sort(\r\n (a, b) => (a.noteOrdinal < b.noteOrdinal ? -1 : 1),\r\n );\r\n } else {\r\n // If element does not belongs to element panel or element panel is not opened\r\n // then no need to update element panel and instead make api request for updated\r\n // tickmark directly, which has to be further used for updating element cache.\r\n const rawResponse = await getElementTickmarksRequest({\r\n elementId: elementDetails.id,\r\n revisionId: elementDetails.revisionId,\r\n });\r\n response = rawResponse.data.result.sort((a, b) =>\r\n a.noteOrdinal < b.noteOrdinal ? -1 : 1,\r\n );\r\n }\r\n\r\n const { elementCache } = updatedStoreData.statementContent;\r\n const _needToUpdateCacheToo = elementCache.hasElement({\r\n sectionId: elementDetails.sectionId,\r\n elementId: elementDetails.id,\r\n });\r\n if (_needToUpdateCacheToo) {\r\n const updatedElementForCache = elementCache\r\n .getElement({\r\n sectionId: elementDetails.sectionId,\r\n elementId: elementDetails.id,\r\n })\r\n .setElementTickmarkAnnotations({\r\n tickmark: response.reduce(\r\n (resultTickmark, currentTickmark) =>\r\n resultTickmark + `{${currentTickmark.noteOrdinal}}`,\r\n '',\r\n ),\r\n });\r\n await dispatch(\r\n updateElementInCacheAction({ element: updatedElementForCache }),\r\n );\r\n }\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementDetails.id] }));\r\n dispatch(updateElementAnnotationDetails());\r\n };\r\n\r\nexport const getElementComfortLettersAndUpdateElementCache =\r\n (elementDetails = undefined) =>\r\n async (dispatch, getState) => {\r\n let response;\r\n const openedPanel = getState().ui.statementPage.panels.right;\r\n\r\n // let's say element details is sent from component requesting detach action, then we do not want to query\r\n // redux store. Else if element details is not sent in the parameter then we can assume that element panel is open\r\n // and we are required to query redux store to get element details\r\n if (\r\n !(\r\n elementDetails &&\r\n Number.isInteger(elementDetails.id) &&\r\n elementDetails.revisionId\r\n )\r\n ) {\r\n elementDetails = getState().data.elementPanel.elementDetails;\r\n }\r\n // Get the updated elementDetails with their new comfort letters\r\n let updatedStoreData = getState().data;\r\n\r\n const isElementBelongsToElementPanelAndElementPanelIsOpen =\r\n openedPanel === RIGHT_PANELS.ELEMENT &&\r\n elementDetails.id === updatedStoreData.elementPanel.elementDetails.id;\r\n\r\n if (isElementBelongsToElementPanelAndElementPanelIsOpen) {\r\n // If element belongs to element panel and element panel is opened\r\n // then refresh comfort letters in element panel\r\n await dispatch(\r\n getElementComfortLetters({\r\n elementId: elementDetails.id,\r\n }),\r\n );\r\n updatedStoreData = getState().data;\r\n response =\r\n updatedStoreData.elementPanel.comfortLetterList.comfortLetters.sort(\r\n (b, a) =>\r\n b.comfortLetterCreatedDate.localeCompare(\r\n a.comfortLetterCreatedDate,\r\n ),\r\n );\r\n updatedStoreData.elementPanel.elementDetails.data.elementAnnotations.comfortLetterlabelList =\r\n response.map((comfortLabel) => {\r\n return comfortLabel.customLabel;\r\n });\r\n } else {\r\n // If element does not belongs to element panel or element panel is not opened\r\n // then no need to update element panel and instead make api request for updated\r\n // comfort letter directly, which has to be further used for updating element cache.\r\n const rawResponse = await getComfortLetterForElementRequest({\r\n elementId: elementDetails.id,\r\n revisionId: elementDetails.revisionId,\r\n });\r\n response = rawResponse.data.result.sort((b, a) =>\r\n b.comfortLetterCreatedDate.localeCompare(a.comfortLetterCreatedDate),\r\n );\r\n }\r\n const { elementCache } = updatedStoreData.statementContent;\r\n const _needToUpdateCacheToo = elementCache.hasElement({\r\n sectionId: elementDetails.sectionId,\r\n elementId: elementDetails.id,\r\n });\r\n if (_needToUpdateCacheToo) {\r\n const updatedElementForCache = elementCache\r\n .getElement({\r\n sectionId: elementDetails.sectionId,\r\n elementId: elementDetails.id,\r\n })\r\n .setElementComfortLetterAnnotations({\r\n comfortLetterLabelList:\r\n isArray(response) &&\r\n response.map((comfortLetter) =>\r\n comfortLetter.customLabel\r\n ? comfortLetter.customLabel\r\n : comfortLetter.label,\r\n ),\r\n });\r\n await dispatch(\r\n updateElementInCacheAction({ element: updatedElementForCache }),\r\n );\r\n }\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementDetails.id] }));\r\n };\r\n\r\nexport const attachComfortLetterAction =\r\n ({ comfortLetter }) =>\r\n async (dispatch, getState) => {\r\n const { elementPanel } = getState().data;\r\n let { elementDetails } = elementPanel;\r\n await attachComfortLetterToElementRequest({\r\n elementId: elementDetails.id,\r\n revisionId: elementDetails.revisionId,\r\n comfortLetterId: comfortLetter.comfortLetterId,\r\n });\r\n //updating cache\r\n await dispatch(getElementComfortLettersAndUpdateElementCache());\r\n //taking the latest elements from the cache and updating the elementDetails\r\n elementDetails = getState().data.elementPanel.elementDetails;\r\n\r\n dispatch(\r\n linkElementInComfortLetterElementsMapAndUpdateCountAction({\r\n elementDetails,\r\n comfortLetterId: comfortLetter.comfortLetterId,\r\n }),\r\n );\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: [elementDetails.id],\r\n showCallout: true,\r\n }),\r\n );\r\n };\r\n\r\nexport const createNewComfortLetterAction = {};\r\n\r\nexport const detachComfortLetterAction =\r\n ({ comfortLetter, elementDetails = undefined }) =>\r\n async (dispatch, getState) => {\r\n // let's say element details is sent from component requesting detach action, then we do not want to query\r\n // redux store. Else if element details is not sent in the parameter then we can assume that element panel is open\r\n // and we are required to query redux store to get element details\r\n if (\r\n !(\r\n elementDetails &&\r\n Number.isInteger(elementDetails.id) &&\r\n elementDetails.revisionId\r\n )\r\n ) {\r\n elementDetails = getState().data.elementPanel.elementDetails;\r\n }\r\n await detachComfortLetterToElementRequest({\r\n elementId: elementDetails.id,\r\n revisionId: elementDetails.revisionId,\r\n comfortLetterId: comfortLetter.comfortLetterId,\r\n });\r\n await dispatch(\r\n getElementComfortLettersAndUpdateElementCache(elementDetails),\r\n );\r\n await dispatch(\r\n unlinkElementInComfortLetterElementsMapAndUpdateCountAction({\r\n elementId: elementDetails.id,\r\n comfortLetterId: comfortLetter.comfortLetterId,\r\n }),\r\n );\r\n };\r\n\r\nexport const getElementTickmarksAndUpdateElementCacheWithParameters =\r\n ({ elementId, revisionId }) =>\r\n async (dispatch) => {\r\n dispatch(getElementTickmarks({ elementId: elementId }));\r\n // will update the element cache and content panel, cache listens for the elementDetailsLoaded action\r\n dispatch(getElementDetailsWithoutLoading(elementId));\r\n dispatch(\r\n fetchTickmarkListForRevisionWithoutLoading({\r\n revisionId: revisionId,\r\n }),\r\n );\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementId] }));\r\n dispatch(updateElementAnnotationDetails());\r\n };\r\n\r\nexport const attachTickmarkToElement =\r\n ({ tickmark }) =>\r\n async (dispatch, getState) => {\r\n const { id, revisionId, sectionId } =\r\n getState().data.elementPanel.elementDetails;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n await attachTickmarkToElementRequest({\r\n elementId:\r\n typeof tickmark.elementId !== 'number' ? id : tickmark.elementId,\r\n revisionId: revisionId,\r\n tickmarkId: tickmark.tickmarkId,\r\n });\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: [id],\r\n showCallout: true,\r\n }),\r\n );\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchTickmarkListForRevisionWithoutLoading({ revisionId }));\r\n\r\n // This case will be hit in copy annotation scenario\r\n // Where you want to copy multiple tickamrk linked to multiple element, to all the\r\n // element in the IR group\r\n if (typeof tickmark.elementId === 'number') {\r\n let element = {\r\n id: tickmark.elementId,\r\n revisionId: tickmark.revisionId,\r\n sectionId,\r\n };\r\n dispatch(getElementTickmarksAndUpdateElementCache(element));\r\n } else {\r\n dispatch(getElementTickmarksAndUpdateElementCache());\r\n }\r\n dispatch(\r\n fetchElementsFromTickmark({\r\n revisionId: revisionId,\r\n tickmarkId: tickmark.tickmarkId,\r\n }),\r\n );\r\n }\r\n updateElementCacheByCalloutAction({\r\n elementIds: [tickmark.elementId],\r\n showCallout: true,\r\n });\r\n };\r\n/*giving an element as parameter to this function covers the cases in which there is no element details\r\ndata on data.elementPanel */\r\nexport const detachTickmarkFromElement =\r\n ({ tickmark, element }) =>\r\n async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n const openedPanel = getState().ui.statementPage.panels.right;\r\n let { internalReference } = getState().data.elementPanel;\r\n let { id, revisionId } = getState().data.elementPanel.elementDetails;\r\n //if receives an element as parameter(element !== null), it will use this element data and not the one from the right panel\r\n if (element) {\r\n id = element.id;\r\n revisionId = element.revisionId;\r\n element = isNullOrUndefined(element.sectionId)\r\n ? {\r\n ...element,\r\n sectionId: getState().data.elementPanel.elementDetails.sectionId,\r\n }\r\n : element;\r\n }\r\n\r\n await detachTickmarkFromElementRequest({\r\n elementId: id,\r\n revisionId: revisionId,\r\n tickmarkId: tickmark.tickmarkId,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchTickmarkListForRevisionWithoutLoading({ revisionId }));\r\n await dispatch(\r\n getElementTickmarksAndUpdateElementCache(element ? element : null),\r\n );\r\n\r\n dispatch(excludeElementFromElementsMapAction(id));\r\n\r\n openedPanel === RIGHT_PANELS.ELEMENT &&\r\n internalReference.elements.some((details) => details.id === id) &&\r\n (await dispatch(getInternalReferenceWithoutLoading()));\r\n }\r\n };\r\n\r\nexport const excludeElement = () => async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n dispatch(elementDetailsLoading());\r\n try {\r\n const {\r\n elementPanel: { elementDetails },\r\n selectedStatement,\r\n } = getState().data;\r\n\r\n await excludeElementFromElementListRequest({\r\n elementId: elementDetails.id,\r\n revisionId: elementDetails.revisionId,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n dispatch(_updateStatementSummaryElements);\r\n }\r\n dispatch(hideElementPanelAction());\r\n if (\r\n !selectedStatement.isOCR ||\r\n (socketHasBeenDisconnected && selectedStatement.isOCR)\r\n ) {\r\n dispatch(updateCacheWithMostRecentElementChanges(false, false));\r\n }\r\n\r\n if (socketHasBeenDisconnected && !selectedStatement.isOCR) {\r\n dispatch(\r\n fetchSectionHTMLSegmentsStatementContent({\r\n sectionIdList: [elementDetails.sectionId],\r\n }),\r\n );\r\n } else {\r\n if (!selectedStatement.isOCR) {\r\n const sectionId = elementDetails.sectionId;\r\n dispatch(sectionHTMLSegmentsStatementContentLoading([sectionId]));\r\n setTimeout(() => {\r\n dispatch(\r\n sectionHTMLSegmentsStatementContentLoadedWithoutResponse([\r\n sectionId,\r\n ]),\r\n );\r\n }, 5000);\r\n }\r\n }\r\n\r\n dispatch(\r\n fetchElementsBySection({\r\n sectionId: elementDetails.sectionId,\r\n }),\r\n );\r\n\r\n if (socketHasBeenDisconnected) {\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementDetails.id] }));\r\n //remove elements from workpaper references elements list\r\n dispatch(removeElementFromElementsMap({ elementId: elementDetails.id }));\r\n //remove elements from tickmarks elements list\r\n dispatch(\r\n excludeElementFromTickmarkElementsMap({ elementId: elementDetails.id }),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(elementDetailsError(error));\r\n }\r\n};\r\n\r\nexport const getHistoryForElementPanel = () => async (dispatch, getState) => {\r\n const { elementPanel, selectedStatement } = getState().data;\r\n const elementId = elementPanel.elementDetails.id;\r\n const statementId = selectedStatement.statement.id;\r\n dispatch(setElementHistoryLoading());\r\n try {\r\n const response = await getHistoryForElementRequest({\r\n elementId,\r\n statementId,\r\n });\r\n dispatch(setElementHistoryLoaded(response));\r\n } catch (error) {\r\n dispatch(setElementHistoryError(error));\r\n }\r\n};\r\n\r\nexport const updateElementAnnotationDetails =\r\n () => async (dispatch, getState) => {\r\n const openedPanel = getState().ui.statementPage.panels.left;\r\n if (\r\n openedPanel !== LEFT_PANELS.WORKPAPER &&\r\n openedPanel !== LEFT_PANELS.TICKMARK\r\n ) {\r\n return;\r\n }\r\n\r\n try {\r\n const storeData = getState().data;\r\n const { revision } = storeData;\r\n const { elementDetails } = storeData.elementPanel;\r\n\r\n const response = await updateElementRequest({\r\n revisionId: revision.id,\r\n elementId: elementDetails.id,\r\n elementDetails,\r\n });\r\n dispatch(\r\n updateWorkpaperElementsMap({\r\n response,\r\n }),\r\n );\r\n //updates tickmark elements map if tickmark left panel is open\r\n dispatch(\r\n updateTickmarkElementsMap({\r\n response,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(elementDetailsError(error));\r\n }\r\n };\r\nexport const updateElementDetailsFromLeftPanel =\r\n ({ elementsArray }) =>\r\n async (dispatch, getState) => {\r\n const openedPanel = getState().ui.statementPage.panels.left;\r\n if (\r\n openedPanel !== LEFT_PANELS.WORKPAPER &&\r\n openedPanel !== LEFT_PANELS.TICKMARK &&\r\n openedPanel !== LEFT_PANELS.COMFORT_ANNOTATION\r\n ) {\r\n return;\r\n }\r\n //updates workpaper elements map if workpaper left panel is open\r\n dispatch(\r\n updateWorkpaperElementsMapFromArray({\r\n elementsArray,\r\n }),\r\n );\r\n //updates tickmark elements map if tickmark left panel is open\r\n dispatch(\r\n updateTickmarkElementsMapFromArray({\r\n elementsArray,\r\n }),\r\n );\r\n //updates comfort letters elements map if comfort letter left panel is open\r\n dispatch(updateComfortLettersElementsMapArray({ elementsArray }));\r\n };\r\n\r\nexport const selectElementCreated =\r\n ({ elementId }) =>\r\n (dispatch, getState) => {\r\n const elementIds = [elementId];\r\n dispatch(selectCreatedElementAction({ elementIds }));\r\n\r\n /** Set one time click event listener to clear green selected elements after\r\n * successful creation of element\r\n */\r\n document.addEventListener(\r\n 'click',\r\n (e) => {\r\n if (!e.ctrlKey) {\r\n if (\r\n getState().ui.statementPage.panels.right === RIGHT_PANELS.ELEMENT\r\n ) {\r\n dispatch(\r\n selectElementContentPanel({\r\n elementIds: [elementId],\r\n color: ELEMENT_HIGHLIGHT_STATES.OPENED,\r\n }),\r\n );\r\n } else {\r\n dispatch(\r\n selectElementContentPanel({\r\n elementIds: [elementId],\r\n }),\r\n );\r\n }\r\n }\r\n },\r\n {\r\n once: true,\r\n },\r\n );\r\n };\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\n\r\nimport { DATA_GRID_BLOCK, DataGridColumn } from './data-grid-component';\r\nimport DataGridConstants from 'constants/common/data-grid-constants';\r\nimport {\r\n focusNextMenuItem,\r\n focusPrevMenuItem,\r\n} from 'utils/menu-accessibility-utils';\r\nimport {\r\n SPACEBAR_KEY_CODE,\r\n ARROW_KEY_DOWN_CODE,\r\n ARROW_KEY_UP_CODE,\r\n} from 'constants/util/key-code-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nconst { DATA_GRID_ROW_HEIGHT } = DataGridConstants;\r\n\r\nexport const DataGridRow = ({\r\n rowKey,\r\n columns,\r\n classNames,\r\n rowData,\r\n onRowClick,\r\n onRowCheckboxSelect,\r\n isRowSelected,\r\n onDropdownColumnSelect,\r\n shouldDisableRow,\r\n primaryKeyColumn,\r\n}) => {\r\n let _rowClassNames;\r\n\r\n if (Array.isArray(classNames)) {\r\n _rowClassNames = classnames(classNames);\r\n } else if (typeof classNames === 'function') {\r\n _rowClassNames = classNames(rowData);\r\n } else if (typeof classNames === 'string') {\r\n _rowClassNames = classNames;\r\n } else {\r\n if (!isNullOrUndefined(classNames)) {\r\n throw new Error(\r\n 'rowClassnames prop to data-grid-component must be of type Array, function, or string. You passed',\r\n classNames,\r\n );\r\n }\r\n }\r\n\r\n const _disabled = shouldDisableRow ? shouldDisableRow(rowData) : false;\r\n\r\n return (\r\n (!_disabled && onRowClick ? onRowClick(rowData) : null)}\r\n onKeyDown={(e) => {\r\n if (e.keyCode === SPACEBAR_KEY_CODE) {\r\n e.preventDefault();\r\n return !_disabled && onRowClick ? onRowClick(rowData) : null;\r\n } else if (e.keyCode === ARROW_KEY_DOWN_CODE) {\r\n focusNextMenuItem(e);\r\n } else if (e.keyCode === ARROW_KEY_UP_CODE) {\r\n focusPrevMenuItem(e);\r\n }\r\n }}\r\n tabIndex={0}\r\n disabled={_disabled}\r\n >\r\n {columns.map((colModel, colIndex) => (\r\n \r\n {colModel.formatter(rowData, {\r\n index: colIndex,\r\n onSelect: onRowCheckboxSelect,\r\n rowKey,\r\n isRowSelected,\r\n onDropdownColumnSelect,\r\n })}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nDataGridRow.propTypes = {\r\n /** An array of column objects */\r\n columns: PropTypes.arrayOf(PropTypes.instanceOf(DataGridColumn)).isRequired,\r\n /** Function, triggered when clicking on a row, passes the current clicked row object */\r\n onRowClick: PropTypes.func,\r\n /** Function, run when the DataGridCheckboxColumn is included in columns prop and a user clicks on the row's check box */\r\n onRowCheckboxSelect: PropTypes.func,\r\n /** Unique key string for each row, should be a combination of the rowIndex and the tableId in data grid component */\r\n rowKey: PropTypes.string.isRequired,\r\n /** Data Object representative of the row, should have keys that correspond to the keys in the columns definition */\r\n rowData: PropTypes.object.isRequired,\r\n /** Indicates whether the current row has been selected with a checkbox */\r\n isRowSelected: PropTypes.bool,\r\n /** defined in data-grid component, funneled to the formatter options argument */\r\n onDropdownColumnSelect: PropTypes.func,\r\n /** Function to determine if a specific row should be disabled, func should look like (rowData) => someFunction(rowData)\r\n * And evaluate to a boolean\r\n */\r\n shouldDisableRow: PropTypes.func,\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5.99905 5.70711L1.1455 0.853553C0.830513 0.538571 1.0536 0 1.49905 0H14.499C14.9445 0 15.1676 0.538571 14.8526 0.853553L9.99905 5.70711V11.5C9.99905 11.6672 9.9155 11.8233 9.7764 11.916L6.7764 13.916C6.44412 14.1375 5.99905 13.8993 5.99905 13.5V5.70711ZM13.2919 1H2.70616L6.8526 5.14645C6.94637 5.24021 6.99905 5.36739 6.99905 5.5V12.5657L8.99905 11.2324V5.5C8.99905 5.36739 9.05173 5.24021 9.1455 5.14645L13.2919 1Z\",\n fill: \"#007CB0\"\n});\n\nvar SvgFilterIcon = function SvgFilterIcon(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 15,\n height: 14,\n viewBox: \"0 0 15 14\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFilterIcon, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/filter-icon.19e65298.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport useOutsideClick from 'components/hooks/useOutsideClick';\r\nimport { ReactComponent as FilterIcon } from 'icons/filter-icon.svg';\r\nimport { ReactComponent as CrossIcon } from 'icons/close-button.svg';\r\nimport SearchComponent from 'components/common/search-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nexport const DATA_GRID_FILTER_BLOCK = 'data-grid-filter';\r\nconst ICON_SIZE = '16px';\r\n\r\nconst DataGridFilter = ({\r\n className,\r\n columnKey,\r\n filterInput,\r\n showFilterPopup,\r\n isFilterActive,\r\n onFilterInputChange,\r\n onFilterInputClear,\r\n onFilterInputApply,\r\n onFilterClick,\r\n onCloseFilterPopup,\r\n}) => {\r\n const inputValue = filterInput[columnKey] || '';\r\n const [popUpContainerRef] = useOutsideClick(\r\n () => showFilterPopup && onCloseFilterPopup(),\r\n );\r\n\r\n const onChange = (value) => {\r\n onFilterInputChange(columnKey, value);\r\n };\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n {showFilterPopup && (\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n onFilterInputClear(columnKey)}\r\n disabled={!inputValue}\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\nDataGridFilter.propTypes = {\r\n /**css classname for popup placement */\r\n className: PropTypes.string,\r\n /**It is used to determine the column on which filter is applied */\r\n columnKey: PropTypes.string,\r\n /**It containes the value of input field */\r\n filterInput: PropTypes.object,\r\n /**It will show/hide the filter popup */\r\n showFilterPopup: PropTypes.bool.isRequired,\r\n /**It will check whether filter is active or not to show orange icon */\r\n isFilterActive: PropTypes.bool.isRequired,\r\n /**It is the change handler for filter input */\r\n onFilterInputChange: PropTypes.func.isRequired,\r\n /**It will clear/reset the filter input */\r\n onFilterInputClear: PropTypes.func.isRequired,\r\n /**It will execute when use click on apply button */\r\n onFilterInputApply: PropTypes.func.isRequired,\r\n /**It will execute when user will click on filter icon */\r\n onFilterClick: PropTypes.func.isRequired,\r\n /**It will close the filter popup */\r\n onCloseFilterPopup: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default DataGridFilter;\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport DataGridConstants from 'constants/common/data-grid-constants';\r\nimport DataGridFilter from 'components/common/data-grid/_data-grid-filter-component';\r\n\r\nimport {\r\n DATA_GRID_BLOCK,\r\n DataGridColumn,\r\n DataGridSort,\r\n} from './data-grid-component';\r\n\r\nconst { SPECIAL_COLUMNS_LIST, SPECIAL_COLUMNS, DATA_GRID_ROW_HEIGHT } =\r\n DataGridConstants;\r\n\r\nconst COL_HEADER_ICON_SIZE = '20';\r\n\r\nexport const DataGridColumnsHeader = ({\r\n columns,\r\n sort,\r\n onSortClick,\r\n tableId,\r\n onHeaderCheckboxSelect,\r\n canSelectMoreThenOneRow,\r\n filterInput,\r\n showFilterPopup,\r\n isFilterActive,\r\n onFilterInputChange,\r\n onFilterInputClear,\r\n onFilterInputApply,\r\n onFilterClick,\r\n onCloseFilterPopup,\r\n}) => {\r\n const [headerChecked, _setHeaderChecked] = useState(false);\r\n\r\n const _displayHeader = (colModel) => {\r\n // header checkbox controls whether all rows are selected, changing the rows values occurs in data-grid-component controlled by onHeaderCheckboxSelect\r\n if (colModel.key === SPECIAL_COLUMNS.checkbox && canSelectMoreThenOneRow) {\r\n return (\r\n {\r\n _setHeaderChecked(!headerChecked);\r\n onHeaderCheckboxSelect(!headerChecked);\r\n }}\r\n />\r\n );\r\n }\r\n if (colModel.header) {\r\n let content = (\r\n <>\r\n {sort ? sort.getIcon(colModel) : null}\r\n \r\n \r\n );\r\n if (colModel.sortable) {\r\n return (\r\n <>\r\n onSortClick(colModel)}\r\n disabled={SPECIAL_COLUMNS_LIST.includes(colModel.key)}\r\n >\r\n {content}\r\n \r\n {colModel.filterable && (\r\n \r\n )}\r\n \r\n );\r\n }\r\n if (colModel.Icon) {\r\n return (\r\n <>\r\n \r\n {content}\r\n \r\n );\r\n }\r\n return content;\r\n }\r\n return null;\r\n };\r\n return (\r\n \r\n {columns.map((colModel, headIndex) => (\r\n \r\n {_displayHeader(colModel)}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nDataGridColumnsHeader.propTypes = {\r\n /** An array of column objects */\r\n columns: PropTypes.arrayOf(PropTypes.instanceOf(DataGridColumn)).isRequired,\r\n /** Sort object representing current column to sort by */\r\n sort: PropTypes.instanceOf(DataGridSort),\r\n /** Function to fire when a header is clicked which should alter the sort object */\r\n onSortClick: PropTypes.func,\r\n /** Unique key string for each table */\r\n tableId: PropTypes.string.isRequired,\r\n /** Bool representing if more then one check box can be selected at once */\r\n canSelectMoreThenOneRow: PropTypes.bool,\r\n /**It containes the value of input field */\r\n filterInput: PropTypes.object,\r\n /**It will show/hide the filter popup */\r\n showFilterPopup: PropTypes.bool,\r\n /**It will check whether filter is active or not to show orange icon */\r\n isFilterActive: PropTypes.bool,\r\n /**It is the change handler for filter input */\r\n onFilterInputChange: PropTypes.func,\r\n /**It will clear/reset the filter input */\r\n onFilterInputClear: PropTypes.func,\r\n /**It will execute when use click on apply button */\r\n onFilterInputApply: PropTypes.func,\r\n /**It will execute when user will click on filter icon */\r\n onFilterClick: PropTypes.func,\r\n /**It will close the filter popup */\r\n onCloseFilterPopup: PropTypes.func,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport DataGridColumn, {\r\n DataGridKebabColumn,\r\n DataGridDropdownColumn,\r\n DataGridCheckboxColumn,\r\n DataGridIconColumn,\r\n} from 'models/utils/common/data-grid/data-grid-column-model';\r\nimport { DataGridSort } from 'models/utils/common/data-grid/data-grid-sort-model.jsx';\r\nimport { DataGridDropdown } from 'models/utils/common/data-grid/data-grid-dropdown-options';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport DataGridData, {\r\n DataGridDataApi,\r\n} from 'models/utils/common/data-grid/data-grid-data-model';\r\nimport { DataGridRow } from './_data-grid-row.component';\r\nimport { DataGridColumnsHeader } from './_data-grid-columns-header.component';\r\nimport { DataGridFilter } from 'models/utils/common/data-grid/data-grid-filter-model';\r\nimport DataGridConstants from 'constants/common/data-grid-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport VirtualizedList from 'components/common/virtualized-list-component';\r\n\r\nconst DATA_GRID_BLOCK = 'data-grid';\r\n\r\nconst { DATA_GRID_ROW_HEIGHT, DATA_GRID_ROW_HEIGHT_MAX, ROWS_AMOUNT } =\r\n DataGridConstants;\r\n\r\nconst StaticOrDynamicWrapper = ({ dataModel, children }) => {\r\n if (dataModel instanceof DataGridDataApi) {\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }\r\n return {children};\r\n};\r\n\r\nclass DataGrid extends React.Component {\r\n _handleRowSelect = (rowDataId) => {\r\n const { selectedRows, onRowCheckboxSelect, canSelectMoreThenOneRow } =\r\n this.props;\r\n if (canSelectMoreThenOneRow) {\r\n onRowCheckboxSelect({\r\n ...selectedRows,\r\n [rowDataId]: !selectedRows[rowDataId],\r\n });\r\n } else {\r\n onRowCheckboxSelect({\r\n [rowDataId]: !selectedRows[rowDataId],\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * When the checkbox in the header column is selected, all visible rows should either be checked or unchecked depending on\r\n * the headerChecked boolean argument value\r\n */\r\n _handleHeaderCheckboxSelect = (headerChecked) => {\r\n const {\r\n onRowCheckboxSelect,\r\n dataModel: { apiModel, rowItems },\r\n } = this.props;\r\n\r\n if (headerChecked && apiModel.isLoaded) {\r\n const checkedRows = {};\r\n rowItems.forEach((row) => (checkedRows[row.id] = true));\r\n onRowCheckboxSelect(checkedRows);\r\n } else {\r\n onRowCheckboxSelect({});\r\n }\r\n };\r\n\r\n _shouldShowSrollbar = () => {\r\n const { dataModel, scrollable, numberOfVisibleRows } = this.props;\r\n const _moreRowsThanVisible =\r\n dataModel.rowItems && numberOfVisibleRows < dataModel.rowItems.length;\r\n return _moreRowsThanVisible && scrollable;\r\n };\r\n\r\n _getNumVisibleRows = () => {\r\n const { dataModel, numberOfVisibleRows } = this.props;\r\n const _hasLoadedData =\r\n !isNullOrUndefined(dataModel.apiModel) && dataModel.apiModel.isLoaded;\r\n if (_hasLoadedData) {\r\n if (dataModel.rowItems.length === 0) {\r\n //We want at least one row if there is no data\r\n return 1;\r\n } else if (this._shouldShowSrollbar()) {\r\n //We want to set the num of rows manually and have the table be scrollable\r\n return numberOfVisibleRows;\r\n } else {\r\n //We want the table to be as high as the total row items\r\n return dataModel.rowItems.length;\r\n }\r\n }\r\n // no loaded data so return default\r\n return numberOfVisibleRows;\r\n };\r\n\r\n render() {\r\n const {\r\n columns,\r\n className,\r\n dataModel,\r\n onRowClick,\r\n rowClassnames,\r\n tableId,\r\n selectedRows,\r\n onDropdownColumnSelect,\r\n shouldDisableRow,\r\n NoResultsComponent,\r\n canSelectMoreThenOneRow,\r\n sortColumn,\r\n onSortClick,\r\n listScroll,\r\n useVirtualizedList,\r\n virtualizedListFooter,\r\n virtualizedListDisableScrollCallback,\r\n virtualizedListRef,\r\n primaryKeyColumn,\r\n totalRows,\r\n executeScrollImmediately,\r\n } = this.props;\r\n const { rowItems } = dataModel;\r\n const statementsListSize = rowItems.length;\r\n const rowsAmount =\r\n statementsListSize <= ROWS_AMOUNT ? statementsListSize : ROWS_AMOUNT - 1;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n {statementsListSize > 0 ? (\r\n useVirtualizedList ? (\r\n (\r\n \r\n )}\r\n />\r\n ) : (\r\n rowItems.map((rowData, rowIndex) => (\r\n \r\n ))\r\n )\r\n ) : NoResultsComponent ? (\r\n \r\n {NoResultsComponent}\r\n \r\n ) : null}\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nDataGrid.propTypes = {\r\n /** An array of column objects, if you want special columns like Kebab or Checkbox, specify them in this prop */\r\n columns: PropTypes.arrayOf(PropTypes.instanceOf(DataGridColumn)).isRequired,\r\n /** Function, triggered when clicking on a row, passes the current clicked row object */\r\n onRowClick: PropTypes.func,\r\n /** Applies classnames to the rows, if a func, passed the row data object and expected to return a string representing the classnames that should be applied */\r\n rowClassnames: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.array,\r\n PropTypes.func,\r\n ]),\r\n /** Custom class name applied to the top level component */\r\n className: PropTypes.string,\r\n /** object expressing the sort direction and key for the data grid */\r\n sortColumn: PropTypes.instanceOf(DataGridSort),\r\n /** returns the new object of selected rows */\r\n onRowCheckboxSelect: PropTypes.func,\r\n /** Unique key string for each table */\r\n tableId: PropTypes.string.isRequired,\r\n /** Object map (each row object of rowData array needs to have a unique 'id' prop) of the selected rows passed back to the grid */\r\n selectedRows: PropTypes.object,\r\n /* Number of visual data rows, controls scrolling */\r\n numberOfVisibleRows: PropTypes.number,\r\n /** Contains the rowItems array and api model for loading */\r\n dataModel: PropTypes.instanceOf(DataGridData).isRequired,\r\n /** Function, triggered when clicking on a column header, passes the key of the column */\r\n onSortClick: PropTypes.func,\r\n /** props (val, rowId, colKey) where val is the menu option selected, rowId is the unique id of the row data for which the selection was made, and colKey is the key in the rowData object.\r\n * If multiple dropdownColumns are defined in your columns array, this function will need to handle all of them */\r\n onDropdownColumnSelect: PropTypes.func,\r\n /** Custom component to display under the column headers when there the rowItems property of the dataModel is an empty [] */\r\n NoResultsComponent: PropTypes.element,\r\n /** indicates if the data grid should scroll based on numberOfVisibleRows prop, or resize to fit the contents */\r\n scrollable: PropTypes.bool,\r\n /** Bool representing if more then one check box can be selected at once */\r\n canSelectMoreThenOneRow: PropTypes.bool,\r\n /** Function to determine if a specific row should be disabled, func should look like (rowData) => someFunction(rowData)\r\n * And evaluate to a boolean\r\n */\r\n shouldDisableRow: PropTypes.func,\r\n /* function that returns next list portion*/\r\n listScroll: PropTypes.func,\r\n /* boolean to determine if virtualized list is going to be used */\r\n useVirtualizedList: PropTypes.bool,\r\n /* function that returns a footer for the virtualized list */\r\n virtualizedListFooter: PropTypes.func,\r\n /* bool to determine if scroll callback from virtualized list needs to be disabled */\r\n virtualizedListDisableScrollCallback: PropTypes.bool,\r\n /*Ref to be assigned to the data grid body if a virtualized list is being used */\r\n virtualizedListRef: PropTypes.object,\r\n};\r\n\r\nDataGrid.defaultProps = {\r\n numberOfVisibleRows: 10,\r\n};\r\n\r\nexport default DataGrid;\r\nexport {\r\n DataGridData,\r\n DataGridDataApi,\r\n DataGridColumn,\r\n DataGridKebabColumn,\r\n DataGridDropdownColumn,\r\n DataGridCheckboxColumn,\r\n DataGridIconColumn,\r\n DataGridSort,\r\n DataGridDropdown,\r\n DataGridFilter,\r\n DATA_GRID_BLOCK,\r\n DATA_GRID_ROW_HEIGHT,\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M11.3295 2.3284C11.3295 2.14145 11.2261 1.96985 11.062 1.88154C10.8978 1.79354 10.6972 1.80403 10.5422 1.90753C10.5148 1.9241 7.83216 3.67975 6.12226 1.96985C4.26189 0.109325 1.58076 1.11855 0.421071 1.91042C0.282759 2.00466 0.200684 2.16121 0.200684 2.3284V14.4681C0.200684 14.7478 0.427151 14.9741 0.706814 14.9741C0.986478 14.9741 1.21295 14.7478 1.21295 14.4681V9.18335C1.88323 8.78954 3.93663 7.79096 5.4079 9.26072C7.22572 11.0785 9.9266 10.0997 11.1015 9.32607C11.2428 9.23184 11.3295 9.07377 11.3295 8.90354V2.3284Z\",\n fill: \"#0076A8\"\n});\n\nvar SvgFlaggedAndVerified = function SvgFlaggedAndVerified(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 12,\n height: 15,\n viewBox: \"0 0 12 15\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFlaggedAndVerified, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/flagged-and-verified.5e5c47bd.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport { ReactComponent as FlaggedVerifiedIcon } from 'icons/flagged-and-verified.svg';\r\nimport { ReactComponent as FlaggedIcon } from 'icons/flagged.svg';\r\nimport { ReactComponent as VerifiedIcon } from 'icons/verified.svg';\r\nimport { ReactComponent as UnverifiedIcon } from 'icons/unverified.svg';\r\nimport { ReactComponent as ReviewedIcon } from 'icons/unverified.svg';\r\nimport { ReactComponent as FlaggedReviewedIcon } from 'icons/unverified.svg';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\n\r\nconst CONTENT_PANEL_ICON_SIZE = '12px';\r\n\r\nexport const STATEMENT_CONTENT_TABS = {\r\n STATEMENT: new TabModel({\r\n id: 1,\r\n intlTitle: 'global-header.statement',\r\n }),\r\n SPLIT: new TabModel({\r\n id: 2,\r\n intlTitle: 'global-header.split',\r\n }),\r\n};\r\n\r\nexport const SCALE_ALTERATION = 0.5;\r\nexport const STATEMENT_ELEMENT_ID_PREFIX = 'CFTO_ELEMENT_';\r\nexport const STATEMENT_LEFT_ELEMENT_ID_PREFIX = 'CFTO_LEFT_ELEMENT_';\r\nexport const STATEMENT_SECTION_ID_PREFIX = 'CFTO_SECTION_';\r\nexport const STATEMENT_PSEUDO_ELEMENT_ID_PREFIX = 'CFTO_PSEUDO_ELEMENT_';\r\n/** Since SectionContent components render always with a loader they have their own ID */\r\nexport const REACT_SECTION_ID_PREFIX = 'REACT_SECTION_';\r\nexport const OCR_SECTION_ID = 'statement-content-panel-page-';\r\nexport const OCR_LEFT_SECTION_ID = 'statement-content-panel-page-left-';\r\nexport const OCR_CONTAINER_BLOCK = 'statement-content-panel-ocr';\r\nexport const STATEMENT_CONTENT_PANEL_ZOOM_BLOCK =\r\n 'statement-content-panel-zoom-id';\r\nexport const STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK =\r\n 'statement-content-panel-zoom-left-id';\r\nexport const SIDE_BY_SIDE_VIEW_RIGHT_BLOCK =\r\n 'statement-content-page-id__center-panel'; //side-by-side right view legacy doc ID\r\nexport const SIDE_BY_SIDE_VIEW_LEFT_BLOCK =\r\n 'statement-content-page-id__center-panel-left'; //side-by-side left view legacy doc ID\r\nexport const LEFT_VIEW_DOCUMENT_ID = `${OCR_CONTAINER_BLOCK}__document-id-left-view`; //side-by-side left view OCR doc ID\r\nexport const RIGHT_VIEW_DOCUMENT_ID = `${OCR_CONTAINER_BLOCK}__document-id`; //side-by-side right view OCR doc ID\r\nexport const SIDE_BY_SIDE_VIEW_OCR_COMBINATION_STATEMENT =\r\n 'OCR_Combination_statements'; // represents both statements in side-by-side view as OCR statements\r\nexport const SIDE_BY_SIDE_VIEW_LEGACY_COMBINATION_STATEMENT =\r\n 'Legacy_Combination_statements'; // represents both statements in side-by-side view as Legacy statements\r\nexport const SIDE_BY_SIDE_VIEW_LEFT_STATEMENT =\r\n 'statement-content-panel-page-left-'; //side-by-side left view OCR sections doc ID\r\nexport const SIDE_BY_SIDE_VIEW_RIGHT_STATEMENT =\r\n 'statement-content-panel-page-'; //side-by-side right view OCR sections doc ID\r\nexport const REPORT_PREVIEW_PAGE_HTML_CONTAINER_ID =\r\n 'report-preview-page-left-panel-id__left-preview-html';\r\n\r\n// In Side by side page we have two statements side by side. Hence we should have different section id prefix\r\n// for the two statements, so that id across the DOM is unique.\r\nexport const REACT_LEFT_STATEMENT_SECTION_ID_PREFIX = 'REACT_LEFT_SECTION_';\r\n\r\nexport const CONTENT_SEARCH_HIGHLIGHT_CLASS = 'content-search-highlight';\r\n\r\nexport const getStatusIcon = ({ elementData }) => {\r\n if (isNullOrUndefined(elementData)) {\r\n return null;\r\n } else if (elementData.isFlaggedAndReviewed()) {\r\n return (\r\n \r\n );\r\n } else if (elementData.isFlaggedAndVerified()) {\r\n return (\r\n \r\n );\r\n } else if (elementData.isReviewed()) {\r\n return (\r\n \r\n );\r\n } else if (elementData.isUserFlagged()) {\r\n return (\r\n \r\n );\r\n } else if (elementData.isVerified()) {\r\n return (\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n );\r\n }\r\n};\r\n\r\nexport const EXPORT_PAGE_SIZE_ID = {\r\n LETTER: 1, // Letter (8.5 x 11)\r\n LEGAL: 2, // Legal (8.5 x 14)\r\n TABLOID: 3, // Tabloid (11 x 17)\r\n LEDGER: 4, // Ledger (17 x 11)\r\n A4: 5, // A4 (8.27 x 11.69)\r\n A3: 6, // A3 (11.69 x 16.54)\r\n A2: 7, // A2 (16.54 x 23.39)\r\n};\r\n\r\nexport const EXPORT_PAGE_SIZE_OBJECT = {\r\n 1: new MenuOption({\r\n id: 'page-size-option-letter',\r\n title: 'export-workpaper-pagesize-option-letter',\r\n value: EXPORT_PAGE_SIZE_ID.LETTER,\r\n }),\r\n 2: new MenuOption({\r\n id: 'page-size-option-legal',\r\n title: 'export-workpaper-pagesize-option-legal',\r\n value: EXPORT_PAGE_SIZE_ID.LEGAL,\r\n }),\r\n 3: new MenuOption({\r\n id: 'page-size-option-tabloid',\r\n title: 'export-workpaper-pagesize-option-tabloid',\r\n value: EXPORT_PAGE_SIZE_ID.TABLOID,\r\n }),\r\n 4: new MenuOption({\r\n id: 'page-size-option-ledger',\r\n title: 'export-workpaper-pagesize-option-ledger',\r\n value: EXPORT_PAGE_SIZE_ID.LEDGER,\r\n }),\r\n 5: new MenuOption({\r\n id: 'page-size-option-a4',\r\n title: 'export-workpaper-pagesize-option-a4',\r\n value: EXPORT_PAGE_SIZE_ID.A4,\r\n }),\r\n 6: new MenuOption({\r\n id: 'page-size-option-a3',\r\n title: 'export-workpaper-pagesize-option-a3',\r\n value: EXPORT_PAGE_SIZE_ID.A3,\r\n }),\r\n 7: new MenuOption({\r\n id: 'page-size-option-a2',\r\n title: 'export-workpaper-pagesize-option-a2',\r\n value: EXPORT_PAGE_SIZE_ID.A2,\r\n }),\r\n};\r\n\r\nexport const EXPORT_PAGE_ORIENTATION_PORTRAIT = 'Portrait';\r\n\r\nexport const getElementHightlightState = (\r\n panel,\r\n elementDetailsId,\r\n elementId,\r\n) => {\r\n // interntional double equal\r\n // eslint-disable-next-line eqeqeq\r\n if (panel === RIGHT_PANELS.ELEMENT && elementDetailsId == elementId) {\r\n return ELEMENT_HIGHLIGHT_STATES.OPENED;\r\n } else {\r\n return ELEMENT_HIGHLIGHT_STATES.DEFAULT;\r\n }\r\n};\r\n\r\nexport const BLACKLINE_VIEW_STATUS = {\r\n BLK_REQ_RECEIVED: 'BLK_REQ_RECEIVED',\r\n GENERATING: 'GENERATING',\r\n COMPLETED: 'COMPLETED',\r\n FAILED: 'FAILED',\r\n};\r\n","/* eslint-disable no-useless-concat */\r\nimport React from 'react';\r\nimport { toast } from 'react-toastify';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Warning } from 'icons/warning.svg';\r\nimport { ReactComponent as Information } from 'icons/info.svg';\r\nimport { showDownloadTabInsideExport } from 'store/actions/toolkit-export-panel-actions';\r\nimport { getStore } from 'store/store';\r\nimport {\r\n REPORT_DOWNLOAD_PROCESSED,\r\n REPORT_DOWNLOAD_PROCESSING,\r\n} from 'models/api/toolkit-export-download-list-model';\r\nimport { REPORT_TYPES } from 'store/actions/statement-list/statement-list-actions';\r\nimport {\r\n downloadElementReportFromGuid,\r\n downloadReportFromGuid,\r\n} from 'api/statement-list-api';\r\nimport { BLACKLINE_VIEW_STATUS } from 'constants/feature/statement-content-constants';\r\nimport { getConfigForBatchUpdateLimitRequest } from 'api/statement-content-api';\r\nimport {\r\n MAX_ELEMENTS_FOR_BATCH,\r\n SESSION_STORAGE_KEY_FOR_BATCH_UPDATE_CONFIG,\r\n} from 'constants/feature/batch-panel-constants';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\n\r\nconst STATEMENT_PAGE_BLOCK = 'statement-page';\r\nconst BANNER_ICON_SIZE = '18px';\r\n\r\n// Tieout 7.2 release date\r\nconst releaseDate = new Date('2024-09-20');\r\n\r\nexport const NOTIFICATION_TYPE = {\r\n SUCCESS: 'success',\r\n FAILURE: 'failure',\r\n PROCESSED: 'processed',\r\n};\r\n\r\n// This function is used to identify the reason - why the statement is read only.\r\n// Should be called only you are sure the statement is read-only\r\n// We have a function to identify if the statement is read only.\r\n\r\nexport const getReadOnlyBannerId = (\r\n selectedStatement,\r\n urlParams,\r\n workflowsMap,\r\n) => {\r\n if (selectedStatement.isPendingApproval()) {\r\n return 'selected-statement.read-only-banner.pending-approval-state';\r\n } else if (selectedStatement.isWrappedUp()) {\r\n return 'selected-statement.read-only-banner.wrapped-up-statement';\r\n } else if (selectedStatement.isSoftDeleted()) {\r\n return 'selected-statement.read-only-banner.soft-deleted';\r\n } else if (selectedStatement.statementIsOldRevisions()) {\r\n if (\r\n workflowsMap.statementHasProcessingRevision({\r\n statementId: urlParams.statementId,\r\n })\r\n ) {\r\n return 'selected-statement.read-only-banner.revision-currently-processed';\r\n } else {\r\n return 'selected-statement.read-only-banner.previously-uploaded';\r\n }\r\n } else {\r\n return 'selected-statement.read-only-banner';\r\n }\r\n};\r\n\r\nexport const downloadReportNotification = (reportType, notificationType) => {\r\n const { dispatch } = getStore();\r\n switch (notificationType) {\r\n case NOTIFICATION_TYPE.FAILURE:\r\n toast.error(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n break;\r\n case NOTIFICATION_TYPE.SUCCESS:\r\n toast.success(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n break;\r\n case NOTIFICATION_TYPE.PROCESSED:\r\n toast.success(\r\n <>\r\n \r\n (\r\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n dispatch(showDownloadTabInsideExport())}\r\n target=\"_blank\"\r\n className={'download-ready-message'}\r\n >\r\n \r\n \r\n ),\r\n }}\r\n />\r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n break;\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const getDownloadDataExceptFailed = (reportList) => {\r\n return (\r\n Array.isArray(reportList) &&\r\n reportList.filter(\r\n (downloadObj) =>\r\n downloadObj &&\r\n (downloadObj.downloadStatus === REPORT_DOWNLOAD_PROCESSED ||\r\n downloadObj.downloadStatus === REPORT_DOWNLOAD_PROCESSING),\r\n )\r\n );\r\n};\r\n\r\nexport const getListOfProcessedAndNotDownloadedReports = (reportList) =>\r\n Array.isArray(reportList) &&\r\n reportList.filter(\r\n (downloadObj) =>\r\n downloadObj &&\r\n downloadObj.downloadStatus === REPORT_DOWNLOAD_PROCESSED &&\r\n downloadObj.userDownloadedReportStatus !== true,\r\n );\r\n\r\nexport const getExportReportType = (reportType) => {\r\n switch (reportType) {\r\n case 'WORKPAPER':\r\n return REPORT_TYPES.WORKPAPER;\r\n case 'ELEMENTREPORT':\r\n return REPORT_TYPES.ELEMENT_REPORT;\r\n case 'CLIENT_NOTES':\r\n return REPORT_TYPES.CLIENT_NOTES;\r\n case 'CUSTOMREPORT':\r\n return REPORT_TYPES.BUILD_CUSTOMIZED_REPORT;\r\n case 'AUDIT_TRAIL':\r\n return REPORT_TYPES.AUDIT_TRAIL_REPORT;\r\n case 'COMFORTLETTERREPORT':\r\n return REPORT_TYPES.COMFORT_LETTER_REPORT;\r\n default:\r\n return reportType;\r\n }\r\n};\r\n\r\nexport const downloadReportFromGuidApiSelector = async ({\r\n revisionId,\r\n fileName,\r\n storageGuid,\r\n userDownloadedReportStatus,\r\n reportType,\r\n id,\r\n}) => {\r\n let apiResponse;\r\n switch (reportType) {\r\n case REPORT_TYPES.ELEMENT_REPORT:\r\n apiResponse = await downloadElementReportFromGuid({\r\n revisionId,\r\n fileName,\r\n storageGuid,\r\n userDownloadedReportStatus,\r\n reportId: id,\r\n });\r\n break;\r\n default:\r\n apiResponse = await downloadReportFromGuid({\r\n revisionId,\r\n fileName,\r\n storageGuid,\r\n userDownloadedReportStatus,\r\n });\r\n }\r\n\r\n return apiResponse;\r\n};\r\n\r\nexport const blacklineTogleNotification = (notificationType) => {\r\n switch (notificationType) {\r\n case BLACKLINE_VIEW_STATUS.FAILED:\r\n toast.error(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n break;\r\n case BLACKLINE_VIEW_STATUS.COMPLETED:\r\n toast.success(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n break;\r\n case BLACKLINE_VIEW_STATUS.BLK_REQ_RECEIVED:\r\n toast.success(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n break;\r\n case BLACKLINE_VIEW_STATUS.GENERATING:\r\n toast.warn(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n break;\r\n default:\r\n return null;\r\n }\r\n};\r\n\r\nexport const setSideBySideViewParams = (\r\n selectedProject,\r\n selectedStatement,\r\n selectedStatementRevision,\r\n statementProcessType,\r\n) => {\r\n let sourceStatementParams = {};\r\n sourceStatementParams.projectId = selectedProject;\r\n sourceStatementParams.statementId = selectedStatement;\r\n sourceStatementParams.revisionId = selectedStatementRevision;\r\n sourceStatementParams.readOnly = false;\r\n sourceStatementParams.documentProcessType = statementProcessType;\r\n return sourceStatementParams;\r\n};\r\n\r\nexport const getGeoByStatementId = (statementId) => {\r\n const store = getStore();\r\n const { data: { statementList, currentUser } = {} } = store.getState();\r\n const { projectToGeoMap } = currentUser && currentUser.data;\r\n const { statementList: { data } = {} } = statementList || {};\r\n const statement = data.statements.filter((item) => item.id === statementId);\r\n const [{ clientId } = {}] = statement || [];\r\n return projectToGeoMap.get(`${clientId}`).geoCode;\r\n};\r\n\r\n/** The below 3 generic function which is used configure full userName as \"lastName, firstName\"\r\n * which is used across the apprlication.\r\n * getUserNameByUserId\r\n * getUserNameByUserData\r\n * getUserNameByUserDataObject\r\n */\r\n//this function is used to configure full userName based on userId from project users lists of redux store\r\nexport const getUserNameByUserId = (id) => {\r\n const store = getStore();\r\n const { projectUsersList } = store.getState().data;\r\n const userName =\r\n projectUsersList &&\r\n projectUsersList.data &&\r\n projectUsersList.data.users &&\r\n projectUsersList.data.users.find((item) => item.id === id);\r\n return userName && userName.preferredFullName;\r\n};\r\n\r\n//this function is used to configure full userName based on userId from lists of users\r\nexport const getUserNameByUserData = (id, usersData) => {\r\n const userName = usersData && usersData.filter((item) => item.id === id)[0];\r\n return userName && userName.preferredFullName;\r\n};\r\n\r\n//this function is used to configure full userName based revision history object which is used in revision history model\r\nexport const getUserNameByUserDataObject = (userDataObject) => {\r\n return userDataObject && userDataObject.preferredFullName;\r\n};\r\n\r\n//this function is used to fetch batch update limit object fron session store\r\nexport const getConfigForBatchUpdateFromSessionStore = () =>\r\n JSON.parse(\r\n sessionStorage.getItem(SESSION_STORAGE_KEY_FOR_BATCH_UPDATE_CONFIG),\r\n );\r\n\r\n//this function is used to fetch element batch update limit fron session store\r\nexport const getMaxElementForBatchUpdateLimit = () => {\r\n const bacthConfigObject = getConfigForBatchUpdateFromSessionStore();\r\n if (\r\n bacthConfigObject &&\r\n bacthConfigObject.data &&\r\n parseInt(bacthConfigObject.data.elementBatch)\r\n )\r\n return parseInt(bacthConfigObject.data.elementBatch);\r\n return MAX_ELEMENTS_FOR_BATCH;\r\n};\r\n\r\nexport const fetchAndUpdateBatchLimit = async () => {\r\n const batchConfigResponse = getConfigForBatchUpdateFromSessionStore();\r\n\r\n // if batch update limit is not present in session store, then /tieout/batch/config call will be triggered and will store in session store.\r\n if (!(batchConfigResponse && batchConfigResponse.data)) {\r\n try {\r\n const response = await getConfigForBatchUpdateLimitRequest();\r\n const batchConfigData = response &&\r\n response.data && {\r\n data: response.data,\r\n };\r\n\r\n sessionStorage.setItem(\r\n SESSION_STORAGE_KEY_FOR_BATCH_UPDATE_CONFIG,\r\n JSON.stringify(batchConfigData),\r\n );\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n};\r\n\r\nexport const getSystemUserOrUserNameByUserId = (entry) => {\r\n return entry.changedBy < 0\r\n ? entry.changedByName\r\n : getUserNameByUserId(entry.changedBy);\r\n};\r\n\r\nexport const hasComfortLetterExistInBatchUpdate = (\r\n comfortLetterId,\r\n selectedComfortLetterList,\r\n) => {\r\n return selectedComfortLetterList.filter((item) => {\r\n return item.comfortLetterId === comfortLetterId;\r\n }).length;\r\n};\r\n\r\nexport const isStatementExistsInPinnedDetails = (statementId) => {\r\n const store = getStore();\r\n const {\r\n pinnedDetails,\r\n selectedProject: { id },\r\n } = store.getState().data;\r\n\r\n return pinnedDetails.pinnedStatements.filter(\r\n (item) =>\r\n item.clientId === parseInt(id) && item.statementId === statementId,\r\n ).length;\r\n};\r\n\r\nexport const shouldRestrictAutomaticIdentifier = () => {\r\n const store = getStore();\r\n const { revision } = store.getState().data;\r\n //statement falls behind the restrictedDate it return true else false\r\n return releaseDate > new Date(revision.processedDate);\r\n};\r\n\r\n// return true if element has any annotations\r\nexport const isElementHasAnyAnnotations = (element) => {\r\n return new ElementDetails().isElementHasAnnotation(element);\r\n};\r\n\r\n// return elementDetails based on previous and new updated elements data and updates the marker and callout values for element\r\nexport const isElementAnnotationChanged = (prevElementData, newElementData) => {\r\n const prevElement = new ElementDetails().setLoadedFromElementData({\r\n data: prevElementData,\r\n });\r\n const newElement = new ElementDetails().setLoadedFromElementData({\r\n data: newElementData,\r\n });\r\n if (prevElement.isIncluded === newElement.isIncluded) {\r\n if (\r\n prevElement.hasFootedFormula() === newElement.hasFootedFormula() ||\r\n prevElement.hasRecalcFormula() === newElement.hasRecalcFormula() ||\r\n prevElement.hasCrossFootedFormula() ===\r\n newElement.hasCrossFootedFormula() ||\r\n prevElement.internalReferenceGroupName ===\r\n newElement.internalReferenceGroupName ||\r\n prevElement.workpaperReferenceNumberList.length ===\r\n newElement.workpaperReferenceNumberList.length ||\r\n prevElement.comfortLetterLabelList.length ===\r\n newElement.comfortLetterLabelList.length ||\r\n prevElement.tickmarks === newElement.tickmarks\r\n ) {\r\n return {\r\n ...newElementData,\r\n marker: prevElement.marker,\r\n callout: prevElement.callout,\r\n };\r\n } else {\r\n return {\r\n ...newElementData,\r\n marker: false,\r\n callout: true,\r\n };\r\n }\r\n }\r\n return { ...newElementData, marker: false, callout: false };\r\n};\r\n\r\n// return the updated webSocketPayload based on the annotations update of the element/s\r\nexport const getWebsocketElementsForCalloutChange = (\r\n elementCache,\r\n webSocketPayload,\r\n) => {\r\n const webSocketPayloadMap = webSocketPayload.reduce((acc, curr) => {\r\n acc[curr.id] = curr;\r\n return acc;\r\n }, {});\r\n\r\n const prevElementList = elementCache.getElementsListByElementIds({\r\n elementIds: Object.keys(webSocketPayloadMap),\r\n });\r\n\r\n const webSocketElementsData = prevElementList.map((item) =>\r\n isElementAnnotationChanged(item, webSocketPayloadMap[item.id]),\r\n );\r\n\r\n return webSocketElementsData;\r\n};\r\n\r\nexport const getSectionNameBySectionId = (sectionId) => {\r\n const { statementOCRNavigation } =\r\n getStore().getState().ui.statementPage.statementNavigatorPanel;\r\n const { navigationData } = statementOCRNavigation;\r\n const sectionName = navigationData.filter(\r\n (item) => item.sectionId === sectionId,\r\n );\r\n return sectionName.length ? sectionName[0].sectionName : '';\r\n};\r\n\r\nexport const shouldShowOptionsInOmniaFileShareModal = () => {\r\n const store = getStore();\r\n const { selectedStatement } = store.getState().data;\r\n\r\n const currentDate = new Date();\r\n const releaseDate = new Date('2024-09-20'); // Tieout 7.2 release Date\r\n\r\n // returns only true when selected statement falls ahead of the date of the 7.2 release date or else returns false\r\n return !selectedStatement.isWrappedUp() && currentDate > releaseDate;\r\n};\r\n\r\nexport const getElementDataFromElementCache = ({ elementId, sectionId }) => {\r\n const store = getStore();\r\n const {\r\n statementContent: { elementCache },\r\n } = store.getState().data;\r\n\r\n return elementCache.getElement({ elementId, sectionId });\r\n};\r\n","import React, { Component, createRef } from 'react';\r\nimport classnames from 'classnames';\r\nimport ReactDOM from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Button, { BUTTON_TYPES } from './button-component';\r\n\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\nimport { ESC_KEY_CODE } from 'constants/util/key-code-constants';\r\n\r\nconst MODAL_BLOCK = 'modal';\r\nconst MODAL_CLOSE_ICON_SIZE = '28px';\r\nexport const MODAL_CLOSE_ICON_ID = 'modal-close-icon-id';\r\n\r\nclass Modal extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.modalRef = createRef();\r\n this.primaryButtonRef = createRef();\r\n }\r\n\r\n componentDidMount() {\r\n document.addEventListener('mousedown', this._handleClose, false);\r\n document.addEventListener('keydown', this._handleClose, false);\r\n this._preventBodyScroll();\r\n this.primaryButtonRef.current.focus();\r\n }\r\n componentWillUnmount() {\r\n document.removeEventListener('mousedown', this._handleClose, false);\r\n document.removeEventListener('keydown', this._handleClose, false);\r\n this._restoreBodyScroll();\r\n }\r\n\r\n _preventBodyScroll = () => {\r\n const body = document.querySelector('body');\r\n body.classList.add('modal-open');\r\n };\r\n\r\n _restoreBodyScroll = () => {\r\n const body = document.querySelector('body');\r\n body.classList.remove('modal-open');\r\n };\r\n\r\n _handleClose = (event) => {\r\n const _userClickedOutside =\r\n event.type === 'mousedown' &&\r\n !this.modalRef.current.contains(event.target);\r\n if (\r\n // Close the modal if you click outside of it, OR if the ESC key is pressed.\r\n event.keyCode === ESC_KEY_CODE ||\r\n _userClickedOutside\r\n ) {\r\n this.props.onClose();\r\n }\r\n };\r\n\r\n _hasButtons() {\r\n const {\r\n primaryModalButton,\r\n secondaryModalButton,\r\n tertiaryModalButton,\r\n primaryDeleteModalButton,\r\n } = this.props;\r\n\r\n return (\r\n primaryModalButton ||\r\n secondaryModalButton ||\r\n tertiaryModalButton ||\r\n primaryDeleteModalButton\r\n );\r\n }\r\n\r\n render() {\r\n const {\r\n id,\r\n children,\r\n stepNumber,\r\n totalSteps,\r\n title,\r\n onClose,\r\n primaryModalButton,\r\n secondaryModalButton,\r\n tertiaryModalButton,\r\n className,\r\n primaryDeleteModalButton,\r\n } = this.props;\r\n\r\n return ReactDOM.createPortal(\r\n
\r\n
\r\n \r\n
\r\n {stepNumber && totalSteps ? (\r\n
\r\n \r\n
\r\n ) : null}\r\n {/* Sometimes we want dynamic value for title as well, hence we want to omit the static value */}\r\n {title && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n \r\n
\r\n
{children}
\r\n {this._hasButtons() ? (\r\n
\r\n {tertiaryModalButton && (\r\n \r\n \r\n \r\n )}\r\n {secondaryModalButton && (\r\n \r\n \r\n \r\n )}\r\n {primaryDeleteModalButton && (\r\n \r\n \r\n \r\n )}\r\n {primaryModalButton && (\r\n \r\n \r\n \r\n )}\r\n
\r\n ) : null}\r\n
\r\n ,\r\n document.getElementById('modal-root'),\r\n );\r\n }\r\n}\r\n\r\nModal.propTypes = {\r\n /** Node of children components to be included inside the main body area of the modal */\r\n children: PropTypes.node,\r\n /** String indicating the current step number of the modal if it runs in a series */\r\n stepNumber: PropTypes.string,\r\n /** String indicating the total number of steps for the modal if it runs in a series */\r\n totalSteps: PropTypes.string,\r\n /** internationalized string title of the modal */\r\n title: PropTypes.string,\r\n /** Unique string id for modal component */\r\n id: PropTypes.string.isRequired,\r\n /** function fired onClick of the close button */\r\n onClose: PropTypes.func.isRequired,\r\n /** Object with Modal Button primary button parameters passed into the modal */\r\n primaryModalButton: PropTypes.instanceOf(ModalButton),\r\n /** Object with Modal Button secondary button parameters passed into the modal */\r\n secondaryModalButton: PropTypes.instanceOf(ModalButton),\r\n /** Object with Modal Button tertiary button parameters passed into the modal */\r\n tertiaryModalButton: PropTypes.instanceOf(ModalButton),\r\n /** custom className for modal */\r\n className: PropTypes.string,\r\n /** Object with Modal Button tertiary button parameters passed into the modal */\r\n primaryDeleteModalButton: PropTypes.instanceOf(ModalButton),\r\n};\r\n\r\nexport default Modal;\r\n","import FileSaver from 'file-saver';\r\nimport { getStore } from 'store/store';\r\n\r\nexport const downloadFile = (response) => {\r\n const fileName = response.headers['content-disposition']\r\n .split(';')\r\n .find((n) => n.includes('filename='))\r\n .replace('filename=', '')\r\n .trim();\r\n const contentType = response.headers['content-type'];\r\n let blob = new Blob([response.data], { type: contentType });\r\n FileSaver.saveAs(blob, fileName);\r\n};\r\n\r\nexport const getStatementIdUtil = (statementId) => {\r\n if (statementId) {\r\n return statementId;\r\n }\r\n const { selectedStatement } = getStore().getState().data;\r\n let id =\r\n selectedStatement &&\r\n selectedStatement.statement &&\r\n parseInt(selectedStatement.statement.id);\r\n // if we are unsuccessful in getting selected statement id from redux then try getting it from url params.\r\n const locationPath = window.location.pathname.split('/');\r\n if (!id && locationPath.includes('statement')) {\r\n id = locationPath[locationPath.indexOf('statement') + 1];\r\n }\r\n return id;\r\n};\r\n","export const DATE_FORMATS = {\r\n YEAR: 'YYYY',\r\n MONTH_DAY_YEAR: 'MM/DD/YYYY',\r\n MONTH_DAY_YEAR_TIME: 'MM/DD/YYYY h:mm a',\r\n HOURS_MINUTES: 'h:mm a',\r\n YEAR_MONTH_DAY: 'YYYY-MM-DD',\r\n YEAR_MONTH_DAY_TIME: 'YYYY-MM-DD[T]HH:mm:ss[Z]',\r\n DAY_MONTH_YEAR: 'DD-MM-YYYY',\r\n DAY_MONTH_YEAR_TIME: 'DD/MM/YYYY HH:mm',\r\n};\r\n\r\nexport const button = 'calendarBtn';\r\nexport const clrButton = 'clearBtn';\r\nexport const closeButton = 'closeBtn';\r\nexport const dateInput = 'date-input';\r\nexport const arrowIcons = 'arrowIcons';\r\nexport const DatePicker = 'DatePicker';\r\nexport const calendar = 'calendar';\r\nexport const directionIcon = 'dateInputFangShape';\r\nexport const ARROW_ICON_SIZE = '1.5rem';\r\nexport const CALENDAR_ICON_SIZE = '15px';\r\nexport const CLEAR_ICON_SIZE = '20px';\r\nexport const months = {\r\n 1: 'date.picker.month.january',\r\n 2: 'date.picker.month.february',\r\n 3: 'date.picker.month.march',\r\n 4: 'date.picker.month.april',\r\n 5: 'date.picker.month.may',\r\n 6: 'date.picker.month.june',\r\n 7: 'date.picker.month.july',\r\n 8: 'date.picker.month.august',\r\n 9: 'date.picker.month.september',\r\n 10: 'date.picker.month.october',\r\n 11: 'date.picker.month.november',\r\n 12: 'date.picker.month.december',\r\n};\r\n\r\nexport const DateFormatRegex = (exp) => {\r\n switch (exp) {\r\n case DATE_FORMATS.MONTH_DAY_YEAR:\r\n return /^\\d{2}\\/\\d{2}\\/\\d{4}$/;\r\n case DATE_FORMATS.YEAR_MONTH_DAY:\r\n return /^\\d{4}-\\d{2}-\\d{2}$/;\r\n case DATE_FORMATS.DAY_MONTH_YEAR:\r\n return /^\\d{2}\\/\\d{2}\\/\\d{4}$/;\r\n default:\r\n return /^\\d{2}\\/\\d{2}\\/\\d{4}$/; //DATE_FORMATS.MONTH_DAY_YEAR\r\n }\r\n};\r\n\r\nexport const weekDays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { injectIntl, FormattedMessage } from 'react-intl';\r\nimport FormItem from 'components/common/form-item-component';\r\nimport classNames from 'classnames';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\n\r\nexport const CHECKBOX_BLOCK = 'checkbox';\r\n\r\nconst Checkbox = ({\r\n className,\r\n checkboxClassName,\r\n checkboxInputClassName,\r\n disabled,\r\n errorText,\r\n id,\r\n checked,\r\n isValid,\r\n isNotIntl,\r\n label,\r\n value,\r\n name,\r\n onChange,\r\n tooltip,\r\n width,\r\n alt,\r\n intl,\r\n masterChecked,\r\n needsMultilineLabel,\r\n}) => {\r\n const renderCheckbox = () => (\r\n {\r\n // need an onclick on the wrapper so the whole styled wrapping box, with border is clickable to select the checkbox\r\n !disabled && onChange(value);\r\n }}\r\n >\r\n {}} // had to use onClick so we could stop propagation of the click event to the wrapper component.\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n onChange(value);\r\n }}\r\n type=\"checkbox\"\r\n value={value}\r\n />\r\n e.stopPropagation()}\r\n >\r\n {needsMultilineLabel ? (\r\n \r\n {label}\r\n \r\n ) : isNotIntl ? (\r\n label\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n );\r\n\r\n return (\r\n \r\n {tooltip ? (\r\n \r\n {renderCheckbox()}\r\n \r\n ) : (\r\n renderCheckbox()\r\n )}\r\n \r\n );\r\n};\r\n\r\nCheckbox.propTypes = {\r\n /* Use alternative checked state */\r\n alt: PropTypes.bool,\r\n className: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n errorText: PropTypes.string,\r\n id: PropTypes.string.isRequired,\r\n checked: PropTypes.bool.isRequired,\r\n isValid: PropTypes.bool,\r\n label: PropTypes.string.isRequired,\r\n /** optional prop to indicate if checkbox label will be an intl id or not */\r\n isNotIntl: PropTypes.bool,\r\n value: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.number,\r\n PropTypes.bool,\r\n ]),\r\n name: PropTypes.string,\r\n onChange: PropTypes.func.isRequired,\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n width: PropTypes.string,\r\n masterChecked: PropTypes.bool,\r\n needsMultilineLabel: PropTypes.bool,\r\n};\r\n\r\nexport default memo(injectIntl(Checkbox));\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Symbols\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"Message-/-Inline-/-Guidence\",\n transform: \"translate(-16.000000, -16.000000)\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Illustrative-/-Lightbulb-Energy\",\n transform: \"translate(16.000000, 16.000000)\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 24,\n height: 24\n}), React.createElement(\"g\", {\n id: \"fluorescent-lightbulb\",\n strokeWidth: 1,\n fillRule: \"evenodd\",\n fill: \"#0097A9\"\n}, React.createElement(\"path\", {\n d: \"M11.9464845,1.09118012 C17.9642236,1.09118012 22.8596273,5.98807453 22.8596273,12.0059627 C22.8596273,18.024 17.9642236,22.9192547 11.9464845,22.9192547 C5.92859627,22.9192547 1.03319255,18.024 1.03319255,12.0059627 C1.03319255,5.98807453 5.92859627,1.09118012 11.9464845,1.09118012 L11.9464845,1.09118012 Z M11.9464845,0.0998757764 C5.37093168,0.0998757764 0.0402484472,5.43055901 0.0402484472,12.0059627 C0.0402484472,18.5813665 5.37093168,23.9120497 11.9464845,23.9120497 C18.5217391,23.9120497 23.8524224,18.5813665 23.8524224,12.0059627 C23.8524224,5.43055901 18.5217391,0.0998757764 11.9464845,0.0998757764 Z M15.7952795,12.0210186 L12.8183851,12.7647205 C12.597764,12.8198758 12.442882,13.0182857 12.442882,13.2462112 L12.442882,15.477913 L11.450087,15.477913 L11.450087,13.9900621 C11.450087,13.7157764 11.2278261,13.4936646 10.9535404,13.4936646 C10.6807453,13.4936646 10.4586335,13.7157764 10.4586335,13.9900621 L10.4586335,15.477913 L9.96223602,15.477913 C9.8131677,15.477913 9.67304348,15.5448447 9.57763975,15.6596273 C9.48372671,15.7744099 9.44645963,15.925118 9.47627329,16.071205 L9.97118012,18.5515528 C10.0173913,18.7840994 10.2216149,18.9510559 10.4586335,18.9510559 L13.4340373,18.9510559 C13.6710559,18.9510559 13.8752795,18.7840994 13.9214907,18.5515528 L14.4163975,16.071205 C14.4462112,15.925118 14.4089441,15.7744099 14.3150311,15.6596273 C14.2196273,15.5448447 14.0795031,15.477913 13.9304348,15.477913 L13.4340373,15.477913 L13.4340373,13.6337888 L16.0352795,12.9823602 C16.3006211,12.9167702 16.4631056,12.6469565 16.3960248,12.381764 C16.3304348,12.1147826 16.0606211,11.9537888 15.7952795,12.0210186 Z M13.0285714,17.9582609 L10.8640994,17.9582609 L10.5674534,16.470559 L13.3252174,16.470559 L13.0285714,17.9582609 Z M16.3960248,8.41341615 C16.4631056,8.67875776 16.3006211,8.94722981 16.0352795,9.01416149 L8.0973913,10.9982609 C8.05714286,11.0086957 8.01689441,11.0131677 7.97664596,11.0131677 C7.75453416,11.0131677 7.55329193,10.8626087 7.49664596,10.6375155 C7.42956522,10.3721739 7.59204969,10.1023602 7.8573913,10.0367702 L15.7952795,8.05118012 C16.0606211,7.98559006 16.3304348,8.14658385 16.3960248,8.41341615 Z M16.3960248,10.3975155 C16.4631056,10.6628571 16.3006211,10.9311801 16.0352795,10.9982609 L8.0973913,12.9823602 C8.05714286,12.9929441 8.01689441,12.9972671 7.97664596,12.9972671 C7.75453416,12.9972671 7.55329193,12.8481988 7.49664596,12.6216149 C7.42956522,12.3564224 7.59204969,12.0864596 7.8573913,12.0210186 L15.7952795,10.0367702 C16.0606211,9.96968944 16.3304348,10.1306832 16.3960248,10.3975155 Z M7.49664596,6.66931677 C7.42956522,6.40248447 7.59204969,6.13416149 7.8573913,6.06708075 L11.8255901,5.0757764 C12.0924224,5.00884472 12.3607453,5.16968944 12.4278261,5.43652174 C12.4935652,5.70186335 12.3324224,5.97167702 12.0670807,6.03726708 L8.0973913,7.03006211 C8.05714286,7.03900621 8.01689441,7.04496894 7.97664596,7.04496894 C7.75453416,7.04496894 7.55329193,6.89440994 7.49664596,6.66931677 Z M7.49664596,8.65341615 C7.42956522,8.3882236 7.59204969,8.11826087 7.8573913,8.05118012 L15.7952795,6.06708075 C16.0606211,6 16.3304348,6.16248447 16.3960248,6.42782609 C16.4631056,6.6931677 16.3006211,6.96298137 16.0352795,7.03006211 L8.0973913,9.01416149 C8.05714286,9.02459627 8.01689441,9.02906832 7.97664596,9.02906832 C7.75453416,9.02906832 7.55329193,8.87850932 7.49664596,8.65341615 Z\",\n id: \"icon_lightbulb\"\n})))));\n\nvar SvgGuidance = function SvgGuidance(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"24px\",\n height: \"24px\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgGuidance, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/guidance.d444d0f8.svg\";\nexport { ForwardRef as ReactComponent };","import classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { Component } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport { ReactComponent as Success } from 'icons/success.svg';\r\nimport { ReactComponent as Information } from 'icons/info.svg';\r\nimport { ReactComponent as InformationSecondary } from 'icons/icon-information-tooltip.svg';\r\nimport { ReactComponent as Guidance } from 'icons/guidance.svg';\r\nimport { ReactComponent as Warning } from 'icons/warning.svg';\r\nimport { ReactComponent as Error } from 'icons/error.svg';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\n\r\nexport const BANNER_TYPES = {\r\n SUCCESS: 'success',\r\n INFORMATION: 'information',\r\n SECONDARY_INFORMATION: 'secondary-information',\r\n GUIDANCE: 'guidance',\r\n WARNING: 'warning',\r\n ERROR: 'error',\r\n};\r\n\r\nconst BANNER_BLOCK = 'banner';\r\nconst BANNER_ICON_SIZE = '18px';\r\nconst BANNER_CLOSE_ICON_SIZE = '28px';\r\n\r\nclass Banner extends Component {\r\n /** returns icon component based on type string\r\n * @param {string} type - One of strings success, information, guidance, warning, error (use constants)\r\n */\r\n getBannerTypeIcon = (type) => {\r\n let icon;\r\n switch (type) {\r\n case BANNER_TYPES.SUCCESS:\r\n icon = (\r\n \r\n );\r\n break;\r\n case BANNER_TYPES.INFORMATION:\r\n icon = (\r\n \r\n );\r\n break;\r\n case BANNER_TYPES.GUIDANCE:\r\n icon = (\r\n \r\n );\r\n break;\r\n case BANNER_TYPES.WARNING:\r\n icon = (\r\n \r\n );\r\n break;\r\n case BANNER_TYPES.SECONDARY_INFORMATION:\r\n icon = (\r\n \r\n );\r\n break;\r\n default:\r\n icon = (\r\n \r\n );\r\n }\r\n return icon;\r\n };\r\n\r\n render() {\r\n const {\r\n id,\r\n type,\r\n bannerCopy,\r\n className,\r\n onClose,\r\n isInternationalized,\r\n isInteractive,\r\n width,\r\n } = this.props;\r\n let _bannerIntlData = bannerCopy;\r\n if (typeof bannerCopy === 'string') {\r\n _bannerIntlData = { id: bannerCopy };\r\n }\r\n return (\r\n \r\n
\r\n {this.getBannerTypeIcon(type)}\r\n
\r\n {isInternationalized ? (\r\n \r\n ) : (\r\n bannerCopy\r\n )}\r\n
\r\n {isInteractive ? (\r\n onClose()}\r\n />\r\n ) : null}\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nBanner.propTypes = {\r\n /** Unique string id for banner */\r\n id: PropTypes.string.isRequired,\r\n /** Custom extra classname */\r\n className: PropTypes.string,\r\n /** Function fired when close button is pressed */\r\n onClose: PropTypes.func,\r\n /** String copy for body of banner */\r\n bannerCopy: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.shape({\r\n id: PropTypes.string,\r\n values: PropTypes.object,\r\n }),\r\n ]).isRequired,\r\n /** One of strings success, information, guidance, warning, error (use BANNER_TYPES constants) */\r\n type: PropTypes.string.isRequired,\r\n /** Boolean representing whether the component takes internationalized id or string*/\r\n isInternationalized: PropTypes.bool.isRequired,\r\n /** Boolean representing if close button is shown */\r\n isInteractive: PropTypes.bool,\r\n /** string for the width dimension, should include the % */\r\n width: PropTypes.string,\r\n};\r\n\r\nexport default Banner;\r\n","import React from 'react';\r\nimport classnames from 'classnames';\r\nimport {\r\n getElementFlaggedIcon,\r\n getElementStatusIcon,\r\n} from 'constants/feature/element-panel-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { LEFT_PANELS } from './panel-constants';\r\n\r\nexport const ELEMENT_HIGHLIGHT_STATES = {\r\n DEFAULT: 'default',\r\n POST_BATCH: 'post-batch',\r\n OPENED: 'opened',\r\n SELECTED_FORMULA_ROW: 'selected-formula-row',\r\n PANEL_SELECTED: 'panel-selected',\r\n HOVERED_FROM_FORMULA: 'hovered-from-formula',\r\n SELECTED_FOR_COPY_FORMULA: 'selected-for-copy-formula',\r\n FORMULA_PASTE_SUCCESS: 'formula-paste-success',\r\n FORMULA_PASTE_FAILURE: 'formula-paste-failure',\r\n ELEMENT_MAP_SUCCESS: 'element-map-success',\r\n ELEMENT_MAP_FAILURE: 'element-map-failure',\r\n};\r\n\r\nconst ANNOTATION_DETAILS_BLOCK = 'annotation-details';\r\n\r\nexport const ANNOTATION_BASE_BLOCK = 'element-annotation';\r\n\r\nexport const hoverCopyFormulaDisabledTooltip = new TooltipOptions({\r\n text: 'element-panel.annotation.content.copy-formula.disabled.tool-tip',\r\n id: 'batch-panel.checkbox.copy-formula-disable-tooltip-id',\r\n position: 'bottom',\r\n});\r\n\r\nconst getElementInternalReferenceGroupName = ({\r\n elementDetails,\r\n customCSS = false,\r\n}) => {\r\n if (\r\n isNullOrUndefined(elementDetails) ||\r\n !elementDetails.hasInternalReferenceGroup()\r\n ) {\r\n return null;\r\n } else {\r\n return (\r\n \r\n {elementDetails.internalReferenceGroupName}\r\n \r\n );\r\n }\r\n};\r\n\r\nconst getElementWorkpaperContentDisplay = ({\r\n elementDetails,\r\n currLeftPanel,\r\n customCSS = false,\r\n}) => {\r\n if (isNullOrUndefined(elementDetails) || !elementDetails.hasWorkpapers()) {\r\n return null;\r\n } else {\r\n return (\r\n \r\n {elementDetails.workpaperReferenceNumberList.join([', '])}\r\n \r\n );\r\n }\r\n};\r\n\r\nconst getElementTickmarksContentDisplay = ({\r\n elementDetails,\r\n customCSS = false,\r\n}) => {\r\n if (isNullOrUndefined(elementDetails) || !elementDetails.hasTickmarks()) {\r\n return null;\r\n } else {\r\n return (\r\n \r\n {customCSS\r\n ? elementDetails.tickmarks.replace(/}{/g, '},{')\r\n : elementDetails.tickmarks}\r\n \r\n );\r\n }\r\n};\r\n\r\nconst getElementTickmarkTextContentDisplay = ({ elementDetails }) => {\r\n if (isNullOrUndefined(elementDetails) || !elementDetails.hasTickmarkText()) {\r\n return null;\r\n } else {\r\n return (\r\n \r\n {elementDetails.tickmarkText}\r\n \r\n );\r\n }\r\n};\r\n\r\nconst getElementComfortLetterContentDisplay = ({\r\n elementDetails,\r\n customCSS = false,\r\n}) => {\r\n if (\r\n isNullOrUndefined(elementDetails) ||\r\n !elementDetails.hasComfortLetters()\r\n ) {\r\n return null;\r\n } else {\r\n return (\r\n \r\n {customCSS\r\n ? elementDetails.comfortLetterLabelList\r\n .map((label) => `[${label}]`)\r\n .join(', ')\r\n : elementDetails.comfortLetterLabelList\r\n .map((label) => `[${label}]`)\r\n .join('')}\r\n \r\n );\r\n }\r\n};\r\n\r\nconst getElementFormulaTypeContentDisplay = ({ elementDetails }) => {\r\n const FORMULA_ANNOTATION_BLOCK = `${ANNOTATION_BASE_BLOCK}-formula`;\r\n if (isNullOrUndefined(elementDetails) || !elementDetails.hasFormula()) {\r\n return null;\r\n } else {\r\n return (\r\n <>\r\n {elementDetails.hasFootedFormula() && (\r\n \r\n F\r\n \r\n )}\r\n {elementDetails.hasCrossFootedFormula() && (\r\n \r\n Cf\r\n \r\n )}\r\n {elementDetails.hasRecalcFormula() && (\r\n \r\n Rx\r\n \r\n )}\r\n \r\n );\r\n }\r\n};\r\n\r\nconst getElementPanelFormulaContentDisplay = ({\r\n elementDetails,\r\n customCSS = false,\r\n}) => {\r\n const FORMULA_ANNOTATION_BLOCK = `${ANNOTATION_BASE_BLOCK}-formula`;\r\n if (isNullOrUndefined(elementDetails) || !elementDetails.hasFormula()) {\r\n return null;\r\n } else {\r\n let formulaContent = [];\r\n const formulaMapping = {\r\n hasFootedFormula: 'F',\r\n hasCrossFootedFormula: 'Cf',\r\n hasRecalcFormula: 'Rx',\r\n };\r\n\r\n for (const [method, label] of Object.entries(formulaMapping)) {\r\n if (elementDetails[method]()) {\r\n formulaContent.push(label);\r\n }\r\n }\r\n\r\n if (formulaContent.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {formulaContent.join(', ')}\r\n \r\n );\r\n }\r\n};\r\n\r\nexport const ANNOTATION_DISPLAY_FUNCTIONS = {\r\n flagged: getElementFlaggedIcon,\r\n workpaper: getElementWorkpaperContentDisplay,\r\n status: getElementStatusIcon,\r\n internalRef: getElementInternalReferenceGroupName,\r\n tickmarks: getElementTickmarksContentDisplay,\r\n tickmarkText: getElementTickmarkTextContentDisplay,\r\n formula: getElementFormulaTypeContentDisplay,\r\n comfortLetter: getElementComfortLetterContentDisplay,\r\n elementFormula: getElementPanelFormulaContentDisplay,\r\n};\r\n","export const ELEMENT_SELECT_MODES = {\r\n DEFAULT: {\r\n id: 0,\r\n title: 'DEFAULT',\r\n },\r\n BATCH: {\r\n id: 1,\r\n title: 'BATCH',\r\n },\r\n INTERNAL_REFERENCE: {\r\n id: 2,\r\n title: 'INTERNAL_REFERENCE',\r\n },\r\n FORMULA: {\r\n id: 3,\r\n title: 'FORMULA',\r\n },\r\n RANGE: {\r\n id: 4,\r\n title: 'RANGE',\r\n },\r\n COPY_FORMULA: {\r\n id: 5,\r\n title: 'COPY_FORMULA',\r\n },\r\n BATCH_WITH_BANNER: {\r\n id: 6,\r\n title: 'BATCH_BANNER',\r\n },\r\n SIDE_BY_SIDE: {\r\n id: 7,\r\n title: 'SIDE_BY_SIDE',\r\n },\r\n};\r\n\r\n// useful in PropTypes.oneOf(ELEMENT_SELECT_MODES_ARRAY)\r\nexport const ELEMENT_SELECT_MODES_ARRAY = Object.values(ELEMENT_SELECT_MODES);\r\n\r\nexport const CONTENT_HIGHLIGHT_MODES = {\r\n DEFAULT: {\r\n id: 0,\r\n title: 'DEFAULT',\r\n },\r\n NOTES: {\r\n id: 1,\r\n title: 'NOTES',\r\n },\r\n ADD_ELEMENT: {\r\n id: 2,\r\n title: 'ADD_ELEMENT',\r\n },\r\n ADD_NAVIGATION: {\r\n id: 3,\r\n title: 'ADD_NAVIGATION',\r\n },\r\n};\r\n\r\nexport const CONTENT_HIGHLIGHT_MODES_ARRAY = Object.values(\r\n CONTENT_HIGHLIGHT_MODES,\r\n);\r\n","/**\r\n * Abstract class for different models that are used in React State or Redux, comes with convenient `merge`\r\n * function that accepts only the keys you wish to change (like setState) and returns a new instance of a class\r\n * with the changes\r\n *\r\n * Should not be instantied by itself, it is meant to be extended by React State or Redux models that do NOT fetch data from the API\r\n *\r\n * NOTE: If you need to set data from the api extend the adjacent ApiModel.\r\n */\r\nexport default (defaultProps = {}) => {\r\n return class BaseModel {\r\n constructor(props) {\r\n Object.assign(this, defaultProps, props);\r\n }\r\n\r\n merge(mergeProps) {\r\n return new this.constructor({\r\n ...this,\r\n ...mergeProps,\r\n });\r\n }\r\n\r\n getDropdownValue(menuOptionVariable) {\r\n if (menuOptionVariable) {\r\n return menuOptionVariable.value;\r\n }\r\n }\r\n };\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { LEFT_PANELS, RIGHT_PANELS } from 'constants/feature/panel-constants';\r\n\r\nexport const hideRightPanelAction = createAction('HIDE_RIGHT_PANEL');\r\nexport const hideLeftPanelAction = createAction('HIDE_LEFT_PANEL');\r\n\r\nexport const showElementPanelAction = createAction('SHOW_ELEMENT_PANEL');\r\nexport const hideElementPanelAction = createAction('HIDE_ELEMENT_PANEL');\r\n\r\nexport const showNotesPanelAction = createAction('SHOW_NOTES_PANEL');\r\nexport const hideNotesPanelAction = createAction('HIDE_NOTES_PANEL');\r\n\r\nexport const showBatchPanelAction = createAction('SHOW_BATCH_PANEL');\r\nexport const hideBatchPanelAction = createAction('HIDE_BATCH_PANEL');\r\n\r\nexport const showSectionDetailsPanelAction = createAction(\r\n 'SHOW_SECTION_DETAILS_PANEL',\r\n);\r\nexport const hideSectionDetailsPanelAction = createAction(\r\n 'HIDE_SECTION_DETAILS_PANEL',\r\n);\r\n\r\nexport const showStatementNavPanelAction = createAction(\r\n 'SHOW_STATEMENT_NAV_PANEL',\r\n);\r\nexport const hideStatementNavPanelAction = createAction(\r\n 'HIDE_STATEMENT_NAV_PANEL',\r\n);\r\n\r\nexport const showTickmarkPanelAction = createAction('SHOW_TICKMARK_PANEL');\r\nexport const hideTickmarkPanelAction = createAction('HIDE_TICKMARK_PANEL');\r\n\r\nexport const showComparePanelAction = createAction('SHOW_COMPARE_PANEL');\r\nexport const hideComparePanelAction = createAction('HIDE_COMPARE_PANEL');\r\n\r\nexport const showExportPanelAction = createAction('SHOW_EXPORT_PANEL');\r\nexport const showCustomMenuPanelAction = createAction('SHOW_CUSTOM_MENU_PANEL');\r\nexport const hideCustomMenuPanelAction = createAction('HIDE_CUSTOM_MENU_PANEL');\r\n\r\nexport const hideExportPanelAction = createAction('HIDE_EXPORT_PANEL');\r\n\r\nexport const showWorkPaperPanelAction = createAction('SHOW_WORK_PAPER_PANEL');\r\nexport const hideWorkPaperPanelAction = createAction('HIDE_WORK_PAPER_PANEL');\r\n\r\nexport const showChatBotPanelAction = createAction('SHOW_CHAT_BOT_PANEL');\r\nexport const hideChatBotPanelAction = createAction('HIDE_CHAT_BOT_PANEL');\r\n\r\nexport const showAuditChecklistPanelAction = createAction(\r\n 'SHOW_AUDIT_CHECKLIST_PANEL',\r\n);\r\nexport const hideAuditChecklistPanelAction = createAction(\r\n 'HIDE_AUDIT_CHECKLIST_PANEL',\r\n);\r\n\r\nexport const showComfortAnnotationPanelAction = createAction(\r\n 'SHOW_COMFORT_ANNOTATION_PANEL',\r\n);\r\nexport const hideComfortAnnotationPanelAction = createAction(\r\n 'HIDE_COMFORT_ANNOTATION_PANEL',\r\n);\r\n\r\nexport const toggleWorkPaperPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.WORKPAPER) {\r\n dispatch(hideWorkPaperPanelAction());\r\n } else {\r\n dispatch(showWorkPaperPanelAction());\r\n }\r\n};\r\n\r\nexport const toggleExportPanel =\r\n (subTab = LEFT_PANELS.EXPORT) =>\r\n (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.EXPORT || left === LEFT_PANELS.DOWNLOAD) {\r\n dispatch(hideExportPanelAction());\r\n } else {\r\n dispatch(showExportPanelAction(subTab));\r\n }\r\n };\r\n\r\n// This has to be invoked when export panel is already open\r\nexport const toggleSubPanelWithinExport = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left !== LEFT_PANELS.EXPORT && left !== LEFT_PANELS.DOWNLOAD) {\r\n dispatch(toggleExportPanel());\r\n } else {\r\n left === LEFT_PANELS.EXPORT\r\n ? dispatch(showExportPanelAction(LEFT_PANELS.DOWNLOAD))\r\n : dispatch(showExportPanelAction(LEFT_PANELS.EXPORT));\r\n }\r\n};\r\n\r\nexport const toggleNotesPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n },\r\n },\r\n } = getState();\r\n if (right === RIGHT_PANELS.NOTES) {\r\n dispatch(hideNotesPanelAction());\r\n } else {\r\n dispatch(showNotesPanelAction());\r\n }\r\n};\r\n\r\nexport const toggleTickmarkPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.TICKMARK) {\r\n dispatch(hideTickmarkPanelAction());\r\n } else {\r\n dispatch(showTickmarkPanelAction());\r\n }\r\n};\r\n\r\nexport const toggleComparePanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.COMPARE) {\r\n dispatch(hideComparePanelAction());\r\n } else {\r\n dispatch(showComparePanelAction());\r\n }\r\n};\r\n\r\nexport const toggleStatementNavPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(hideStatementNavPanelAction());\r\n } else {\r\n dispatch(showStatementNavPanelAction());\r\n }\r\n};\r\n\r\nexport const selectStatementNavPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(hideStatementNavPanelAction());\r\n } else {\r\n dispatch(showStatementNavPanelAction());\r\n }\r\n};\r\n\r\nexport const toggleCustomMenuPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n\r\n if (left === LEFT_PANELS.CUSTOM) {\r\n dispatch(hideCustomMenuPanelAction());\r\n } else {\r\n dispatch(showCustomMenuPanelAction());\r\n }\r\n};\r\n\r\nexport const toggleAuditChecklistPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.AUDIT_CHECKLIST) {\r\n dispatch(hideAuditChecklistPanelAction());\r\n } else {\r\n dispatch(showAuditChecklistPanelAction());\r\n }\r\n};\r\n\r\nexport const toggleComfortAnnotationPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.COMFORT_ANNOTATION) {\r\n dispatch(hideComfortAnnotationPanelAction());\r\n } else {\r\n dispatch(showComfortAnnotationPanelAction());\r\n }\r\n};\r\n\r\nexport const toggleChatBotPanel = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left === LEFT_PANELS.CHAT_BOT) {\r\n dispatch(hideChatBotPanelAction());\r\n } else {\r\n dispatch(showChatBotPanelAction());\r\n }\r\n};\r\n","import Project from 'permissions/structures/project';\r\nimport Statement from 'permissions/structures/statement';\r\nimport Element from 'permissions/structures/element';\r\nimport Tickmark from 'permissions/structures/tickmark';\r\nimport WorkpaperReference from 'permissions/structures/workpaper-reference';\r\nimport InternalReference from 'permissions/structures/internal-reference';\r\nimport Formula from 'permissions/structures/formula';\r\nimport Omnia from 'permissions/structures/omnia';\r\nimport Note from 'permissions/structures/note';\r\nimport Section from 'permissions/structures/section';\r\nimport AuditChecklistPermissions from 'permissions/structures/auditchecklist';\r\nimport SideBySideStatementViewPermissions from 'permissions/structures/side-by-side';\r\n/* Permissions is an important global wrapper object used to govern permissions in the Tie Out Front-end.\r\nTo use it, one would simply access it in a js/jsx file like so:\r\n\r\nimport Permissions from 'permissions/permissions';\r\n\r\n....\r\n\r\nPermissions.Structure.permissionFunction(params...)\r\n\r\nFor a concrete example, to see if a user could delete a project structure, simply call it like so:\r\n\r\nPermissions.Project.canDelete(id)*/\r\n\r\nconst Permissions = {\r\n Project,\r\n Statement,\r\n Element,\r\n WorkpaperReference,\r\n Tickmark,\r\n Formula,\r\n InternalReference,\r\n Omnia,\r\n Note,\r\n Section,\r\n AuditChecklistPermissions,\r\n SideBySideStatementViewPermissions,\r\n};\r\nexport default Permissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst ProjectPermissions = {\r\n canEdit: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n canSoftDelete: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n canRestore: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n canPermanentlyDelete: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n canEnableLegalHold: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n canDisableLegalHold: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n canEnableSupportTeamAccess: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID)\r\n );\r\n },\r\n canEnableTechSupportAccess: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID)\r\n );\r\n },\r\n canDisableSupportTeamAccess: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n canDisableTechSupportAccess: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID)\r\n );\r\n },\r\n canEnableCoeTeamAccess: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID)\r\n );\r\n },\r\n canDisableCoeTeamAccess: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID)\r\n );\r\n },\r\n canManageUsers: (projectID) => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(projectID)\r\n );\r\n },\r\n};\r\nexport default ProjectPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst StatementPermissions = {\r\n canCreate: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject() ||\r\n RolesUtil.doesUserHaveAdminSupportAccess()\r\n );\r\n },\r\n canUploadRevision: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject()\r\n );\r\n },\r\n canChangeContent: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject()\r\n );\r\n },\r\n canEdit: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject() ||\r\n RolesUtil.doesUserHaveAdminSupportAccess()\r\n );\r\n },\r\n canManageLegalHold: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHaveAdminSupportAccess()\r\n );\r\n },\r\n canSoftDelete: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject() ||\r\n RolesUtil.doesUserHaveAdminSupportAccess()\r\n );\r\n },\r\n canSeeDisplayValueOfModifiedStatement: () => {\r\n return RolesUtil.doesUserHaveAdminSupportAccess();\r\n },\r\n canRestoreSoftDeleted: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHaveAdminSupportAccess()\r\n );\r\n },\r\n canPermanentlyDelete: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHaveAdminSupportAccess()\r\n );\r\n },\r\n canApproveWrapUp: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject()\r\n );\r\n },\r\n canSubmmitForWrapUpApproval: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject()\r\n );\r\n },\r\n};\r\nexport default StatementPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst ElementPermissions = {\r\n canEditElement: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default ElementPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\n\r\nconst WorkpaperRefPermissions = {\r\n canEditWorkpaperRef: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default WorkpaperRefPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst TickmarkPermissions = {\r\n canEditTickmark: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default TickmarkPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst FormulaPermissions = {\r\n canEditFormula: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default FormulaPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\n\r\nconst InternalRefPermissions = {\r\n canEditInternalRef: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default InternalRefPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst OmniaPermissions = {\r\n canEditOmniaEngagements: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID),\r\n canShareFile: () => {\r\n return (\r\n RolesUtil.doesUserHavePPMDRoleForProject() ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject() ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject()\r\n );\r\n },\r\n};\r\n\r\nexport default OmniaPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst NotesPermissions = {\r\n canManageNotes: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n\r\n canManageCoeNotesType: (projectID) =>\r\n RolesUtil.doesUserHaveCoeRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveObserverRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default NotesPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst SectionReviewPermissions = {\r\n canReviewSection: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveObserverRoleForProject(projectID),\r\n\r\n canAssignSection: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default SectionReviewPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst AuditChecklistPermissions = {\r\n canModifyChecklist: (projectID) =>\r\n RolesUtil.doesUserHaveCoeRoleForProject(projectID),\r\n};\r\n\r\nexport default AuditChecklistPermissions;\r\n","import RolesUtil from 'permissions/utils/roles';\r\nconst SideBySideStatementViewPermissions = {\r\n canSelectElement: (projectID) =>\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectID) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectID) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectID),\r\n};\r\n\r\nexport default SideBySideStatementViewPermissions;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M6.04807 13.9603C6.04807 9.37933 9.76187 5.66553 14.3428 5.66553C16.6223 5.66553 18.687 6.58656 20.1861 8.07551L20.1877 8.07473C20.1877 8.07473 23 10.3433 23 14.5672C23 18.7904 19.4448 23.3346 14.3428 23.3346H5.05127C4.99658 23.3346 4.98565 23.3182 5.01846 23.2854C5.16845 23.1369 5.64419 22.6659 6.24103 22.0691C7.10347 21.2074 7.45969 20.5426 7.45969 19.5044C7.45969 18.9154 7.27923 18.3092 7.11675 18.0357C7.11586 18.0344 7.11598 18.0321 7.1161 18.0296C7.1162 18.0277 7.1163 18.0257 7.11596 18.024C6.43867 16.8226 6.04807 15.4383 6.04807 13.9603ZM16.935 18.4286C16.9772 18.4522 17.0244 18.4644 17.0724 18.4641C17.0935 18.4646 17.1147 18.4626 17.1355 18.4582C17.2903 18.4255 17.3902 18.269 17.3586 18.1088L16.8119 15.3019L18.7067 13.3418C18.7531 13.2935 18.782 13.2302 18.7885 13.1625C18.8042 12.9997 18.6894 12.8547 18.5321 12.8384L15.833 12.5601L14.7568 10.0523C14.7279 9.98463 14.6757 9.93061 14.6103 9.90079C14.4657 9.83481 14.2967 9.90263 14.233 10.0523L13.1567 12.5601L10.4604 12.8384C10.3927 12.8448 10.3294 12.8758 10.2818 12.926C10.1712 13.0428 10.1729 13.2303 10.2858 13.3448L12.1778 15.3049L11.634 18.1088C11.6195 18.1802 11.6311 18.2547 11.6665 18.3178C11.7457 18.4593 11.9208 18.5076 12.0576 18.4256L14.4963 17.0281L16.935 18.4286Z\",\n fill: \"#D0D0CE\"\n});\n\nvar SvgClosedPriority = function SvgClosedPriority(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 29,\n viewBox: \"0 0 28 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgClosedPriority, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/closed-priority.8f52690f.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport { RadioOption } from 'models/utils/common/radio-options-model';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ReactComponent as OpenIcon } from 'icons/open-non-priority.svg';\r\nimport { ReactComponent as ClosedIcon } from 'icons/closed-non-priority.svg';\r\nimport { ReactComponent as ClosedPriorityIcon } from 'icons/closed-priority.svg';\r\nimport { ReactComponent as OpenPriorityIcon } from 'icons/open-priority.svg';\r\nimport classnames from 'classnames';\r\nimport Permissions from 'permissions/permissions';\r\n\r\n/** This replaces any found Button tag around an element with an anchor tag for the BE */\r\nexport const formatTieoutSelectorForApi = ({ selector }) => {\r\n return selector.replace('BUTTON', 'A');\r\n};\r\n\r\nexport const NOTE_TYPES = {\r\n CLIENT: {\r\n short: 'C',\r\n intlId: 'notes-panel.note-type.client',\r\n },\r\n REVIEW: {\r\n short: 'I',\r\n intlId: 'notes-panel.note-type.review',\r\n },\r\n OBSERVER: {\r\n short: 'O',\r\n intlId: 'notes-panel.note-type.observer',\r\n },\r\n};\r\n\r\nexport const NOTE_STATUS_TYPES = {\r\n OPEN: 'O',\r\n CLOSED: 'C',\r\n};\r\n\r\nexport const NOTE_PRIORITY_TYPES = {\r\n NORMAL: 'NORMAL',\r\n HIGH: 'HIGH',\r\n};\r\n\r\nexport const note_type_options = (selectedProjectId) => ({\r\n client: new RadioOption({\r\n id: 'notes-panel-radio-option-client',\r\n label: 'notes-panel.note-type.client',\r\n value: NOTE_TYPES.CLIENT.short,\r\n disabled: !Permissions.Note.canManageNotes(selectedProjectId),\r\n }),\r\n review: new RadioOption({\r\n id: 'notes-panel-radio-option-review',\r\n label: 'notes-panel.note-type.review',\r\n value: NOTE_TYPES.REVIEW.short,\r\n disabled: !Permissions.Note.canManageNotes(selectedProjectId),\r\n }),\r\n observer: new RadioOption({\r\n id: 'notes-panel-radio-option-observer',\r\n label: 'notes-panel.note-type.observer',\r\n value: NOTE_TYPES.OBSERVER.short,\r\n disabled: !Permissions.Note.canManageCoeNotesType(selectedProjectId),\r\n }),\r\n});\r\n\r\nexport const note_type_options_array = (selectedProjectId) =>\r\n Object.values(note_type_options(selectedProjectId));\r\n\r\nexport const OPEN_NOTE_TOOLTIP = (noteId) =>\r\n new TooltipOptions({\r\n text: 'notes-panel.note-status.open.tooltip',\r\n id: `notes-panel-entry-open-note-tooltip-${noteId}`,\r\n useDefault: false,\r\n });\r\nexport const CLOSED_NOTE_TOOLTIP = (noteId) =>\r\n new TooltipOptions({\r\n text: 'notes-panel.note-status.closed.tooltip',\r\n id: `notes-panel-entry-closed-note-tooltip-${noteId}`,\r\n useDefault: false,\r\n });\r\nexport const PRIORITY_HIGH_NOTE_TOOLTIP = (noteId) =>\r\n new TooltipOptions({\r\n text: 'notes-panel.note-priority.normal.tooltip',\r\n id: `notes-panel-entry-high-priority-note-tooltip-${noteId}`,\r\n useDefault: false,\r\n });\r\nexport const PRIORITY_NORMAL_NOTE_TOOLTIP = (noteId) =>\r\n new TooltipOptions({\r\n text: 'notes-panel.note-priority.high.tooltip',\r\n id: `notes-panel-entry-normal-priority-note-tooltip-${noteId}`,\r\n useDefault: false,\r\n });\r\n\r\nexport const DELETE_NOTE_TOOLTIP = new TooltipOptions({\r\n text: 'notes-panel.delete-note.tooltip',\r\n id: 'notes-panel-entry-delete-note-tooltip-id',\r\n useDefault: false,\r\n});\r\n\r\nexport const GHOST_NOTE_TOOLTIP = new TooltipOptions({\r\n text: 'notes-panel.ghost-note.tooltip',\r\n id: 'notes-panel-entry-ghost-note-tooltip-id',\r\n useDefault: false,\r\n});\r\n\r\nexport const REPLY_NOTE_TOOLTIP = new TooltipOptions({\r\n text: 'notes-panel.reply-note.tooltip',\r\n id: 'notes-panel-entry-reply-note-tooltip-id',\r\n useDefault: false,\r\n});\r\n\r\nexport const EDIT_NOTE_TOOLTIP = new TooltipOptions({\r\n text: 'notes-panel.edit-note.tooltip',\r\n id: 'notes-panel-entry-edit-note-tooltip-id',\r\n useDefault: false,\r\n});\r\n\r\nexport const DELETE_NOTE_REPLY_TOOLTIP = new TooltipOptions({\r\n text: 'notes-panel.delete-note-reply.tooltip',\r\n id: 'notes-panel-entry-delete-note-reply-tooltip-id',\r\n useDefault: false,\r\n position: 'left',\r\n});\r\n\r\nconst PRIORITY_CLOSED_STATUS_COLOR = '#757575';\r\nconst PRIORITY_STATUS_COLOR = '#DA291C';\r\nconst CLOSED_STATUS_COLOR = '#53565A';\r\nconst OPEN_STATUS_COLOR = '#FFCD00';\r\n\r\nexport const getNoteStatusIcon = ({ note, iconProps, notesCursor }) => {\r\n if (isNullOrUndefined(note)) {\r\n return null;\r\n }\r\n if (note.isHighPriority()) {\r\n if (note.isClosed()) {\r\n return (\r\n \r\n );\r\n }\r\n return (\r\n \r\n );\r\n } else if (note.isClosed()) {\r\n return (\r\n \r\n );\r\n }\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport const getNoteStatusColor = ({ note }) => {\r\n if (isNullOrUndefined(note)) {\r\n return null;\r\n }\r\n if (note.isHighPriority()) {\r\n if (note.isClosed()) {\r\n return PRIORITY_CLOSED_STATUS_COLOR;\r\n }\r\n return PRIORITY_STATUS_COLOR;\r\n } else if (note.isClosed()) {\r\n return CLOSED_STATUS_COLOR;\r\n }\r\n return OPEN_STATUS_COLOR;\r\n};\r\n\r\nexport const FILTER_STATUS = 'status';\r\nexport const FILTER_TYPE = 'type';\r\nexport const FILTER_PRIORITY = 'priority';\r\nexport const FILTER_GHOST = 'ghost';\r\nexport const FILTER_USER = 'user';\r\nexport const FILTER_CREATED_BY = 'created-by';\r\nexport const FILTER_REPLIED_BY = 'replied-by';\r\nexport const FILTER_HEADING = 'heading';\r\nexport const FILTER_CREATED_OR_REPLIED = 'created-or-replied';\r\nexport const FILTER_MENTIONED = 'mentioned';\r\n","import React, { memo, useState } from 'react';\r\nimport { injectIntl } from 'react-intl';\r\nimport PropTypes from 'prop-types';\r\nimport LinesEllipsis from 'react-lines-ellipsis';\r\nimport responsiveHOC from 'react-lines-ellipsis/lib/responsiveHOC';\r\n\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { shouldBreakWord } from 'constants/common/multi-line-ellipsis-constants';\r\n\r\nconst ResponsiveLinesEllipsis = responsiveHOC()(LinesEllipsis);\r\n\r\nconst ELLIPSIS_BLOCK = 'multi-line-ellipsis';\r\n// this style ensures that long single line single word values still get ellipsis (like a long e-mail in a data-grid column)\r\nconst BREAK_LINE_AT_FIRST_OVERFLOW_LETTER = { wordBreak: 'break-all' };\r\n\r\n/**\r\n * Handles wrapping multiple lines of text with overflow to have an ellipsis based\r\n * on the `maxLines` prop. If wrapping occurs, a tooltip is shown with that data\r\n */\r\nconst MultiLineEllipsis = ({\r\n text,\r\n maxLines,\r\n toolTipID,\r\n tooltipPosition,\r\n isNotInternationalized,\r\n spaceThresholdToBreakWord,\r\n intl,\r\n tooltipClassName,\r\n}) => {\r\n const [showTooltip, setShowTooltip] = useState(false);\r\n if (isNullOrUndefined(text)) {\r\n // if text isn't a string we get type errors in ResponsiveLinesEllipsis\r\n return null;\r\n }\r\n const _displayText = isNotInternationalized\r\n ? text\r\n : intl.formattMessage({ id: text });\r\n return (\r\n \r\n
\r\n {\r\n setShowTooltip(clamped);\r\n }}\r\n style={\r\n shouldBreakWord(_displayText, spaceThresholdToBreakWord)\r\n ? BREAK_LINE_AT_FIRST_OVERFLOW_LETTER\r\n : null\r\n }\r\n basedOn=\"letters\"\r\n />\r\n
\r\n \r\n );\r\n};\r\n\r\nMultiLineEllipsis.defaultProps = {\r\n maxLines: 1,\r\n isNotInternationalized: false,\r\n};\r\n\r\nMultiLineEllipsis.propTypes = {\r\n /** Text to be evaluated for clamping, if `isInternationalized` is true, this should be an intl ID */\r\n text: PropTypes.string,\r\n /** number of lines visible before clamping, defaults to 1 */\r\n maxLines: PropTypes.number,\r\n /** classname for tooltip component */\r\n tooltipClassName: PropTypes.string,\r\n /** unique ID for tooltip */\r\n toolTipID: PropTypes.string.isRequired,\r\n /** indicates position of tooltip, one of `top`, `bottom`, `left`, `right` */\r\n tooltipPosition: PropTypes.string,\r\n /** flag for whether text is internationalized */\r\n isNotInternationalized: PropTypes.bool,\r\n /** Number passed as 2nd paramter to `shouldBreakWord`, conditionally applies the { word-break: break-all } style\r\n * for wraping text at first letter overflow based on number of spaces in the word specified by this threshold\r\n */\r\n spaceThresholdToBreakWord: PropTypes.number,\r\n};\r\n\r\nexport default injectIntl(memo(MultiLineEllipsis));\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class RadioOption {\r\n id = null;\r\n label = null;\r\n value = null;\r\n selected = null;\r\n disabled = null;\r\n /* this property it is being used to set the tooltip on and off on required radio buttons. By default it is always going to be true */\r\n tooltipEnabled = null;\r\n isNotInternationalized = false;\r\n\r\n constructor({\r\n id,\r\n label,\r\n value,\r\n selected,\r\n disabled,\r\n tooltipEnabled,\r\n isNotInternationalized,\r\n }) {\r\n this.id = id;\r\n this.label = label;\r\n this.value = value;\r\n this.selected = selected;\r\n this.disabled = disabled;\r\n this.isNotInternationalized = isNullOrUndefined(isNotInternationalized)\r\n ? false\r\n : isNotInternationalized;\r\n this.tooltipEnabled = tooltipEnabled !== null ? tooltipEnabled : true;\r\n }\r\n}\r\n","import htmlToText from 'html-to-text';\r\nimport enMessages from 'i18n/en.json';\r\n\r\nexport const EMPTY_STRING = '';\r\nexport const SINGLE_COMMA_SPACE_STRING = ', ';\r\nexport const ONE_SECOND_IN_MS = 1000;\r\nexport const ONE_MINUTE_IN_MS = ONE_SECOND_IN_MS * 60;\r\nexport const ONE_HOUR_IN_MS = ONE_MINUTE_IN_MS * 60;\r\nexport const ONE_DAY_IN_MS = ONE_HOUR_IN_MS * 24;\r\n\r\nexport const LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER = 'tieout_';\r\nexport const TIME_TO_LIVE_FOR_LOCALE_LANGUAGE_JSON = ONE_DAY_IN_MS;\r\nexport const TIEOUT_EVENT_FOR_LANGUAGE_UPDATE = 'UserUpdatedLanguagePreference';\r\n\r\nexport const fireTieoutEventForLanguageUpdate = () => {\r\n const userUpdatedLanguageEvent = new Event(TIEOUT_EVENT_FOR_LANGUAGE_UPDATE);\r\n window.dispatchEvent(userUpdatedLanguageEvent);\r\n};\r\n\r\nexport const getKeyForLocale = (locale) =>\r\n `${LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER}${locale}`;\r\n\r\nexport const updateLocaleMessageInStorage = (locale, localeMessagesWithTTL) => {\r\n localStorage.setItem(\r\n getKeyForLocale(locale),\r\n JSON.stringify(localeMessagesWithTTL),\r\n );\r\n const event = new StorageEvent('storage', {\r\n key: getKeyForLocale(locale),\r\n });\r\n window.dispatchEvent(event);\r\n};\r\n\r\nexport const getMessagesForLocale = (locale = 'en-US') =>\r\n JSON.parse(\r\n localStorage.getItem(`${LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER}${locale}`),\r\n );\r\n\r\nexport const clearLocaleMessagesFromLocalStorage = (locale = 'en-US') => {\r\n localStorage.removeItem(`${LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER}${locale}`);\r\n};\r\n\r\nexport const getTranslationByKey = ({ locale, key }) => {\r\n let messages = getMessagesForLocale(locale);\r\n if (messages && messages.data && messages.data[key]) {\r\n return messages.data[key];\r\n } else {\r\n return enMessages[key];\r\n }\r\n};\r\n\r\nexport const getTextFromHtml = (richText) => {\r\n const text = htmlToText.fromString(richText, {\r\n wordwrap: false, // by default it adds new lines after 80 chars, need to disable to ensure no new characters are added\r\n });\r\n // we need to remove ascii codes from strings\r\n // https://stackoverflow.com/questions/20856197/remove-non-ascii-character-in-string\r\n // eslint-disable-next-line no-control-regex\r\n return text.replace(/[^\\x00-\\x7F]/g, '');\r\n};\r\n\r\nexport const checkIfStringContainsOnlySpaces = (text) => {\r\n // after removing all whitespaces, If the length of the resulting string is 0,\r\n // then you can be sure the original string only contained whitespace\r\n return text && text.replace(/\\s/g, '').length === 0;\r\n};\r\n","import { createAction } from 'redux-actions';\r\n\r\nimport {\r\n searchStatementElementsRequest,\r\n getUpdatedElementsByIdsRequest,\r\n} from 'api/element-api';\r\nimport {\r\n selectElementFromElementSearch,\r\n deselectElementContentPanel,\r\n clearContentHighlightSelector,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport { STATEMENT_NAV_TABS } from 'constants/feature/statement-navigator-constants';\r\n\r\nexport const setElementFilters = createAction('SET_ELEMENT_FILTERS');\r\n\r\nexport const setElementSearchResultsLoading = createAction(\r\n 'SET_ELEMENT_SEARCH_RESULTS_LOADING',\r\n);\r\n\r\nexport const setElementSearchResultsLoaded = createAction(\r\n 'SET_ELEMENT_SEARCH_RESULTS_LOADED',\r\n);\r\n\r\nexport const setElementSearchUpdateResultsLoaded = createAction(\r\n 'SET_ELEMENT_SEARCH_UPDATE_RESULTS_LOADED',\r\n);\r\n\r\nexport const setElementSearchRemoveElementsLoaded = createAction(\r\n 'SET_ELEMENT_SEARCH_REMOVE_ELEMENTS_LOADED',\r\n);\r\n\r\nexport const setElementSearchResultsError = createAction(\r\n 'SET_ELEMENT_SEARCH_RESULTS_ERROR',\r\n);\r\n\r\nexport const emptyElementSearchResults = createAction(\r\n 'EMPTY_ELEMENT_SEARCH_RESULTS',\r\n);\r\n\r\nexport const clearElementSearchResults = createAction(\r\n 'CLEAR_ELEMENT_SEARCH_RESULTS',\r\n);\r\n\r\nexport const clearElementFilters = createAction('CLEAR_ELEMENT_FILTERS');\r\n\r\nexport const setElementSearchResults = createAction(\r\n 'SET_ELEMENT_SEARCH_RESULTS',\r\n);\r\n\r\nexport const setSelectedElementResult = createAction(\r\n 'SET_SELECTED_ELEMENT_RESULT',\r\n);\r\n\r\nexport const updateElementFilterFromSocketPayloadAction = createAction(\r\n 'UPDATE_ELEMENT_FILTER_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const showElementSearchRefreshButtonAction = createAction(\r\n 'SHOW_ELEMENT_SEARCH_REFRESH_BUTTON_ACTION',\r\n);\r\nexport const setBatchSelectedItemsIdsAction = createAction(\r\n 'SET_BATCH_SELECTED_ITEMS_IDS_ACTION',\r\n);\r\nexport const removeIdFromBatchSelectedItemsAction = createAction(\r\n 'REMOVE_ID_FROM_BATCH_SELECTED_ITEMS_IDS_ACTION',\r\n);\r\nexport const addIdToBatchSelectedItemsAction = createAction(\r\n 'ADD_ID_TO_BATCH_SELECTED_ITEMS_IDS_ACTION',\r\n);\r\n\r\nexport const searchElements = ({\r\n filters,\r\n searchTerm,\r\n scrollIntoView = true,\r\n sectionClick,\r\n}) => async (dispatch, getState) => {\r\n const {\r\n elementFilters,\r\n } = getState().ui.statementPage.statementNavigatorPanel;\r\n const { id: revisionId } = getState().data.revision;\r\n const _elementFilters = filters || elementFilters;\r\n dispatch(emptyElementSearchResults());\r\n dispatch(setElementSearchResultsLoading());\r\n dispatch(setElementFilters(_elementFilters.setPageParams({ searchTerm })));\r\n try {\r\n const response = await searchStatementElementsRequest({\r\n revisionId,\r\n filters: _elementFilters.resetPagination(),\r\n searchTerm,\r\n });\r\n dispatch(setElementSearchResultsLoaded({ response }));\r\n const { elements } = response.data;\r\n if (elements && elements.length > 0) {\r\n const [firstElement] = elements;\r\n dispatch(\r\n selectElementFromElementSearch({\r\n elementId: firstElement.id,\r\n firstSearch: sectionClick,\r\n }),\r\n );\r\n if (scrollIntoView) {\r\n scrollElementIntoView({\r\n elementId: firstElement.id,\r\n sectionId: firstElement.sectionId,\r\n });\r\n }\r\n }\r\n } catch (error) {\r\n dispatch(setElementSearchResultsError(error));\r\n }\r\n};\r\n\r\nexport const updateElementFilterFromSocketPayload = (elements) => (\r\n dispatch,\r\n getState,\r\n) => {\r\n const {\r\n selectedTab,\r\n elementSearchResults,\r\n } = getState().ui.statementPage.statementNavigatorPanel;\r\n\r\n if (\r\n selectedTab === STATEMENT_NAV_TABS.elements &&\r\n elementSearchResults.hasElements()\r\n ) {\r\n dispatch(updateElementFilterFromSocketPayloadAction({ elements }));\r\n }\r\n};\r\n\r\nexport const updateElementsSearchByIds = ({ elementIds }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n const { id: revisionId } = getState().data.revision;\r\n const {\r\n elementFilters,\r\n } = getState().ui.statementPage.statementNavigatorPanel;\r\n\r\n const {\r\n selectedTab,\r\n elementSearchResults,\r\n } = getState().ui.statementPage.statementNavigatorPanel;\r\n if (\r\n selectedTab === STATEMENT_NAV_TABS.elements &&\r\n elementSearchResults.hasElements()\r\n ) {\r\n try {\r\n const response = await getUpdatedElementsByIdsRequest({\r\n revisionId,\r\n elementIds,\r\n filters: elementFilters,\r\n });\r\n if (response.data.elements.length > 0) {\r\n dispatch(setElementSearchUpdateResultsLoaded(response.data));\r\n } else {\r\n dispatch(\r\n setElementSearchRemoveElementsLoaded({\r\n elementIds,\r\n total: response.data.total,\r\n }),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(setElementSearchResultsError(error));\r\n }\r\n }\r\n};\r\n\r\nexport const searchElementsNextPage = () => async (dispatch, getState) => {\r\n const {\r\n elementFilters,\r\n } = getState().ui.statementPage.statementNavigatorPanel;\r\n const _elementFilters = elementFilters.setNextPage();\r\n dispatch(setElementSearchResultsLoading());\r\n dispatch(setElementFilters(_elementFilters));\r\n const { id: revisionId } = getState().data.revision;\r\n try {\r\n const { searchTerm } = _elementFilters.getPageParams();\r\n const response = await searchStatementElementsRequest({\r\n revisionId,\r\n filters: _elementFilters,\r\n searchTerm,\r\n });\r\n dispatch(setElementSearchResultsLoaded({ response }));\r\n } catch (error) {\r\n dispatch(setElementSearchResultsError(error));\r\n }\r\n};\r\nexport const deselectSelectedElement = () => (dispatch, getState) => {\r\n const searchedElements = getState().ui.statementPage.statementNavigatorPanel\r\n .elementSearchResults;\r\n if (\r\n searchedElements &&\r\n searchedElements.hasElements() &&\r\n searchedElements.selectedIndex > -1\r\n ) {\r\n dispatch(\r\n deselectElementContentPanel({\r\n elementId: searchedElements.elements[searchedElements.selectedIndex].id,\r\n }),\r\n );\r\n }\r\n dispatch(clearContentHighlightSelector());\r\n};\r\n\r\nexport const clearStatementNavElementTab = () => async (dispatch, getState) => {\r\n dispatch(clearElementSearchResults());\r\n dispatch(clearElementFilters());\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n className: \"icon-path arrow-left\",\n d: \"M0.308333 5.76667C0.25 5.88333 0.25 6.05833 0.308333 6.23333C0.366667 6.29166 0.366667 6.35 0.425 6.40833L5.09167 11.075C5.325 11.3083 5.675 11.3083 5.90833 11.075C6.14167 10.8417 6.14167 10.4917 5.90833 10.2583L2.23333 6.58333L17.1667 6.58333C17.5167 6.58333 17.75 6.35 17.75 6C17.75 5.65 17.5167 5.41667 17.1667 5.41667L2.23333 5.41667L5.90833 1.74167C6.14167 1.50833 6.14167 1.15833 5.90833 0.924999C5.79167 0.808332 5.61667 0.749999 5.5 0.749999C5.38333 0.749999 5.20833 0.808332 5.09167 0.924999L0.425 5.59167C0.366667 5.65 0.308333 5.70833 0.308333 5.76667Z\",\n fill: \"black\"\n});\n\nvar SvgArrowLeft = function SvgArrowLeft(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 12,\n viewBox: \"0 0 18 12\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgArrowLeft, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/arrow-left.1f33865f.svg\";\nexport { ForwardRef as ReactComponent };","import React, { PureComponent, memo } from 'react';\r\nimport { injectIntl } from 'react-intl';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\nimport { ReactComponent as ArrowLeft } from 'icons/arrow-left.svg';\r\nimport classnames from 'classnames';\r\n\r\n/**\r\n * A Header to display within a Flyout.\r\n *\r\n * To enable the back button pass in the enableBack prop and use the onBack function from the component you are calling it from and integrate the functionality\r\n *\r\n * If you wish to put extra content within the header section on the next row add this component
and configure it how you like; the children will render whatever is passed to it\r\n */\r\n\r\nconst ICON_DIMENSION = '18px';\r\n\r\nconst HEADER_BLOCK = 'panelHeader';\r\n\r\nclass FlyoutHeader extends PureComponent {\r\n render() {\r\n const {\r\n children,\r\n enableClose,\r\n enableBack,\r\n onClose,\r\n onBack,\r\n intl,\r\n className,\r\n CLOSE_ICON_DIMENSION = '28px',\r\n } = this.props;\r\n\r\n return (\r\n
\r\n {enableBack && (\r\n onBack()}\r\n title={intl.formatMessage({ id: 'common.back' })}\r\n height={ICON_DIMENSION}\r\n width={ICON_DIMENSION}\r\n role=\"button\"\r\n />\r\n )}\r\n {children}\r\n {enableClose && (\r\n onClose()}\r\n title={intl.formatMessage({ id: 'common.close' })}\r\n height={CLOSE_ICON_DIMENSION}\r\n width={CLOSE_ICON_DIMENSION}\r\n role=\"button\"\r\n />\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nFlyoutHeader.defaultProps = {\r\n enableClose: false,\r\n};\r\n\r\nFlyoutHeader.propTypes = {\r\n /** Enables the close button. */\r\n enableClose: PropTypes.bool,\r\n /** Function which handles closing the Flyout. */\r\n onClose: PropTypes.func,\r\n /** Boolean which indicates if we can navigate back to previous flyout component. */\r\n enableBack: PropTypes.bool,\r\n /** Function which handles going back to previous Flyout overlay. */\r\n onBack: PropTypes.func,\r\n};\r\n\r\nexport default injectIntl(memo(FlyoutHeader));\r\n","import React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nconst FOOTER_BLOCK = 'panelFooter';\r\n\r\n/**\r\n * Footer to be used within a Flyout.\r\n */\r\nclass FlyoutFooter extends PureComponent {\r\n render() {\r\n const { children, className } = this.props;\r\n\r\n return (\r\n
{children}
\r\n );\r\n }\r\n}\r\n\r\nFlyoutFooter.propTypes = {\r\n /** optional className applied to the footer */\r\n className: PropTypes.string,\r\n};\r\n\r\nexport default FlyoutFooter;\r\n","import React, { PureComponent } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nconst PANEL_CONTENT_BLOCK = 'panelContent';\r\n\r\n/**\r\n * Body content to be used within a Flyout.\r\n */\r\nclass FlyoutPanelContent extends PureComponent {\r\n render() {\r\n const { children, className } = this.props;\r\n\r\n return (\r\n
\r\n {children}\r\n
\r\n );\r\n }\r\n}\r\n\r\nFlyoutPanelContent.propTypes = {\r\n /** string classname to append to the className list of the panel content */\r\n className: PropTypes.string,\r\n};\r\n\r\nexport default FlyoutPanelContent;\r\n","import React, { PureComponent } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { CSSTransition } from 'react-transition-group';\r\nimport FlyoutHeader from 'components/common/omnia/flyout-header-component';\r\nimport FlyoutFooter from 'components/common/omnia/flyout-footer-component';\r\nimport FlyoutPanelContent from 'components/common/omnia/flyout-panel-content-component';\r\nimport ContentViewModes from 'models/data/content-view-modes-model';\r\n\r\n/**\r\n * @group Layouts\r\n * A Flyout component which appears to the far right (by default) or far left of the screen. It can be configured with\r\n * a Header and Footer (separate components) and can contain any content.\r\n *\r\n * The header and footer can be used as many times anywhere within the component to display header or footer such as titles and buttons or any component that utilizes and header body and footer\r\n *\r\n * It may also contain just the panel content(body) by pulling in the body panel from the omnia folder\r\n *\r\n * Refer to flyout-example1.jsx for an example of how to use the flyout Component\r\n *\r\n * It may be used without a header, body or footer and rendered with just children but no styling will be applied: This may be useful for customizing it and styling it differently from the default\r\n */\r\n\r\nconst FLYOUT_BLOCK = 'flyoutPanel';\r\nconst SCROLLBAR_HEIGHT = 12;\r\n\r\nclass Flyout extends PureComponent {\r\n render() {\r\n const { children, className, position, show, contentViewMode, flyoutRef } =\r\n this.props;\r\n const transitionProps = {\r\n in: show,\r\n appear: true, // allows a panel to be able to animate in on the first mount\r\n timeout: 300,\r\n classNames: FLYOUT_BLOCK,\r\n };\r\n\r\n const bottomOffset = contentViewMode.contentFullMode ? SCROLLBAR_HEIGHT : 0;\r\n\r\n return (\r\n \r\n \r\n {children}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nFlyout.defaultProps = {\r\n className: 'panelContent',\r\n position: 'right',\r\n};\r\n\r\nFlyout.propTypes = {\r\n /** A css class to include on the Flyout's wrapping div. */\r\n className: PropTypes.string,\r\n\r\n /** Indicates what position the flyout component is left or right. */\r\n position: PropTypes.string,\r\n\r\n /** Indicates whether the flyout is shown. */\r\n show: PropTypes.bool,\r\n\r\n /** Indicates whether the flyout is animated. */\r\n isAnimated: PropTypes.bool,\r\n\r\n /** View mode for statement content panel */\r\n contentViewMode: PropTypes.instanceOf(ContentViewModes).isRequired,\r\n\r\n /* flyout ref */\r\n flyoutRef: PropTypes.oneOfType([\r\n PropTypes.func,\r\n PropTypes.shape({ current: PropTypes.instanceOf(Element) }),\r\n ]),\r\n};\r\n\r\nconst mapStateToProps = ({\r\n ui: {\r\n statementPage: {\r\n modes: { contentViewMode },\r\n },\r\n },\r\n}) => ({\r\n contentViewMode,\r\n});\r\n\r\nexport default connect(mapStateToProps, null)(Flyout);\r\n\r\nexport { Flyout, FlyoutPanelContent, FlyoutHeader, FlyoutFooter };\r\n","import { createAction } from 'redux-actions';\r\n\r\nimport {\r\n getNotesByRevisionRequest,\r\n getNoteByRevisionAndPseudoElementIdRequest,\r\n getNoteByRevisionAndElementIdRequest,\r\n updateNoteRequest,\r\n deleteNoteRequest,\r\n updateNoteReplyRequest,\r\n EditNoteRequest,\r\n sendEmailToTaggedUsersRequest,\r\n} from 'api/notes-api';\r\nimport { fetchAllSectionRenderingData } from './statement-content-actions';\r\nimport { fetchNotesBySection } from './notes-cache-actions';\r\nimport { showNotesPanelAction } from './panel-controller-actions';\r\nimport { fetchStatementSummaryNotes } from './statement-summary/notes-summary-actions';\r\nimport { fetchNotesBySectionOCR } from 'store/actions/statement-content-actions-ocr';\r\nimport Note from 'models/data/note-model';\r\n\r\nexport const saveNotesLoading = createAction('SAVE_NOTES_LOADING');\r\nexport const saveNotesError = createAction('SAVE_NOTES_ERROR');\r\nexport const initNotePanelFromSelectionAction = createAction(\r\n 'INIT_NOTES_PANEL_WITH_SELECTION',\r\n);\r\nexport const clearNoteSelectionAction = createAction('NOTES_SELECTION_CLEAR');\r\nexport const notesListLoading = createAction('NOTES_LIST_LOADING');\r\nexport const notesListLoaded = createAction('NOTES_LIST_LOADED');\r\nexport const notesListError = createAction('NOTES_LIST_ERROR');\r\nexport const notesListLoadedWithoutReponse = createAction(\r\n 'NOTES_LIST_LOADED_WITHOUT_RESPONSE',\r\n);\r\n\r\nexport const selectedNoteLoadingAction = createAction('SELECTED_NOTE_LOADING');\r\nexport const selectedNoteLoadedAction = createAction('SELECTED_NOTE_LOADED');\r\nexport const selectedNoteErrorAction = createAction('SELECTED_NOTE_ERROR');\r\n\r\nexport const selectNoteFromNoteListAction = createAction(\r\n 'SELECTED_NOTE_FROM_NOTE_LIST',\r\n);\r\n\r\nexport const updateNoteStatusAction = createAction('NOTE_STATUS_UPDATE');\r\nexport const updateNotePriorityAction = createAction('NOTE_PRIORITY_UPDATE');\r\n\r\nexport const removeNoteFilterAction = createAction('REMOVE_NOTE_FILTER_ACTION');\r\n\r\nexport const updateNoteFilterAction = createAction('UPDATE_NOTE_FILTER');\r\n\r\nexport const clearAllNoteFiltersAction = createAction(\r\n 'CLEAR_ALL_NOTE_FILTERS_ACTION',\r\n);\r\nexport const applyQuickFilterAction = createAction('APPLY_QUICK_FILTER_ACTION');\r\nexport const applyNoteFilterAction = createAction('APPLY_NOTE_FILTER_ACTION');\r\n\r\nexport const deleteNoteWithWebsocketPayload = createAction(\r\n 'DELETE_NOTE_WITH_WEBSOCKET_PAYLOAD_ACTION',\r\n);\r\nexport const addNoteWithWebsocketPayload = createAction(\r\n 'ADD_NOTE_WITH_WEBSOCKET_PAYLOAD_ACTION',\r\n);\r\nexport const updateNoteWithWebsocketPayload = createAction(\r\n 'UPDATE_NOTE_WITH_WEBSOCKET_PAYLOAD',\r\n);\r\nexport const changeIsNewPropertyFromSelectedNote = createAction(\r\n 'CHANGE_IS_NEW_PROPERTY_FROM_SELECTED_NOTE',\r\n);\r\nexport const setPreviousNoteBody = createAction('SET_PREVIOUS_NOTE_BODY');\r\nexport const setAssignedToMe = createAction('SET_ASSIGNED_TO_ME');\r\n\r\nexport const addAdditionalDetailsToNoteList = createAction(\r\n 'ADD_ADDITIONAL_DETAILS_TO_NOTES_LIST_ACTION',\r\n);\r\n\r\nexport const applyNoteFilter =\r\n (\r\n updatedFilters,\r\n userFilterCreated,\r\n userFilterReplied,\r\n selectedSegments,\r\n selectedUsersCreatedAndRepliedUsers,\r\n userFilterMentionedUsers,\r\n ) =>\r\n (dispatch) => {\r\n dispatch(\r\n applyNoteFilterAction({\r\n updatedFilters,\r\n userFilterCreated,\r\n userFilterReplied,\r\n selectedSegments,\r\n selectedUsersCreatedAndRepliedUsers,\r\n userFilterMentionedUsers,\r\n }),\r\n );\r\n };\r\n\r\n// We need to modify the note list to include additional details like parentId and isTechnical for particular section.\r\n// We expected to get these details from BE directly, but they are facing some technical issues (inner join to fetch these\r\n// details causes ghost notes to dissappear from the list), which enforces us to fetch these details from sections cache.\r\nexport const putAdditionalDetailsToNoteList =\r\n () => async (dispatch, getState) => {\r\n const { contentSectionMap } =\r\n getState().data.statementContent.sectionsCache;\r\n const sectionCacheData =\r\n contentSectionMap && contentSectionMap.data && contentSectionMap.data.map;\r\n await dispatch(addAdditionalDetailsToNoteList({ sectionCacheData }));\r\n };\r\n\r\nexport const applyQuickFilter = (filterVal, filterType) => (dispatch) => {\r\n dispatch(applyQuickFilterAction({ filterVal, filterType }));\r\n};\r\n\r\nexport const removeNoteFilter =\r\n (filterType, createdOrRepliedUsers) => (dispatch) => {\r\n dispatch(\r\n removeNoteFilterAction({\r\n filterType,\r\n createdOrRepliedUsers,\r\n }),\r\n );\r\n };\r\n\r\nexport const clearAllNoteFilters = () => (dispatch) => {\r\n dispatch(clearAllNoteFiltersAction());\r\n};\r\n\r\nexport const updateNoteFilterList = (filterVal, filterType) => (dispatch) => {\r\n dispatch(updateNoteFilterAction({ filterVal, filterType }));\r\n};\r\n\r\nexport const initCreateNoteFromSelection =\r\n ({ data }) =>\r\n (dispatch, getState) => {\r\n dispatch(initNotePanelFromSelectionAction(data));\r\n dispatch(showNotesPanelAction());\r\n };\r\n\r\nexport const fetchTheListOfNotes =\r\n ({ revisionId }) =>\r\n async (dispatch, getState) => {\r\n dispatch(notesListLoading());\r\n await dispatch(fetchNoteListWithoutLoading({ revisionId }));\r\n };\r\n\r\nexport const fetchNoteListWithoutLoading =\r\n ({ revisionId }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n const response = await getNotesByRevisionRequest({ revisionId });\r\n await dispatch(notesListLoaded({ response }));\r\n await dispatch(putAdditionalDetailsToNoteList());\r\n } catch (error) {\r\n dispatch(notesListError(error));\r\n }\r\n };\r\n\r\nexport const fetchNotesListAndApplyFilter =\r\n ({\r\n revisionId,\r\n updatedFilters = {},\r\n userFilterCreated = {},\r\n userFilterReplied = {},\r\n selectedSegments = {},\r\n selectedUsersCreatedAndRepliedUsers = {},\r\n userFilterMentionedUsers = {},\r\n }) =>\r\n async (dispatch, getState) => {\r\n dispatch(showNotesPanelAction());\r\n dispatch(\r\n applyNoteFilter(\r\n updatedFilters,\r\n userFilterCreated,\r\n userFilterReplied,\r\n selectedSegments,\r\n selectedUsersCreatedAndRepliedUsers,\r\n userFilterMentionedUsers,\r\n ),\r\n );\r\n };\r\n\r\nexport const selectNoteFromContentPanel =\r\n ({ pseudoElementId = -1, elementId = -1 }) =>\r\n (dispatch, getState) => {\r\n const { revision } = getState().data;\r\n dispatch(showNotesPanelAction());\r\n const hasElementId = elementId !== -1;\r\n const getRequestMethod = hasElementId\r\n ? getNoteByRevisionAndElementIdRequest\r\n : getNoteByRevisionAndPseudoElementIdRequest;\r\n const getRequestBody = {\r\n revisionId: revision.id,\r\n ...(hasElementId ? { elementId } : { pseudoElementId }),\r\n };\r\n getRequestMethod(getRequestBody)\r\n .then((response) => {\r\n dispatch(selectedNoteLoadedAction({ response }));\r\n })\r\n .catch((error) => {\r\n dispatch(selectedNoteErrorAction(error));\r\n });\r\n };\r\n\r\nexport const handleNoteCreationSuccess =\r\n ({ noteId }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: {\r\n revision,\r\n notesPanel: { addNoteSelection },\r\n selectedStatement: { isOCR },\r\n },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n } = getState();\r\n //clear the selectedNote to avoid highlight\r\n dispatch(notesListLoading());\r\n\r\n dispatch(\r\n selectNoteFromNoteListAction({\r\n note: new Note(),\r\n }),\r\n );\r\n if (socketHasBeenDisconnected) {\r\n if (isOCR) {\r\n dispatch(\r\n fetchNotesBySectionOCR({\r\n sectionId: addNoteSelection.sectionId,\r\n withoutLoading: true,\r\n }),\r\n );\r\n } else {\r\n dispatch(\r\n fetchAllSectionRenderingData({\r\n sectionId: addNoteSelection.sectionId,\r\n }),\r\n );\r\n }\r\n } else {\r\n setTimeout(() => {\r\n dispatch(notesListLoadedWithoutReponse());\r\n }, 5000);\r\n }\r\n\r\n dispatch(clearNoteSelectionAction());\r\n\r\n if (socketHasBeenDisconnected) {\r\n await Promise.all([\r\n dispatch(fetchNoteListWithoutLoading({ revisionId: revision.id })),\r\n dispatch(fetchStatementSummaryNotes({ revisionId: revision.id })),\r\n ]);\r\n }\r\n\r\n // set selected note after successfully fetching notes list\r\n if (socketHasBeenDisconnected) {\r\n const {\r\n data: {\r\n notesPanel: { notesList },\r\n },\r\n } = getState();\r\n const note = notesList.notes.find((note) => note.noteId === noteId);\r\n //set a parameter in the new note to highlight it as a new note on content panel\r\n note.isNew = true;\r\n dispatch(\r\n selectNoteFromNoteListAction({\r\n note: note,\r\n }),\r\n );\r\n }\r\n };\r\n\r\nexport const updateNoteAttribute =\r\n ({ newNoteModel }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: { revision },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n } = getState();\r\n try {\r\n await updateNoteRequest({\r\n revisionId: revision.id,\r\n noteModel: newNoteModel,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchNoteListWithoutLoading({ revisionId: revision.id }));\r\n dispatch(fetchNotesBySection({ sectionId: newNoteModel.sectionId }));\r\n }\r\n } catch (error) {\r\n dispatch(notesListError(error));\r\n }\r\n };\r\n\r\nexport const editNote =\r\n ({ newNoteModel }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: { revision },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n } = getState();\r\n try {\r\n await EditNoteRequest({\r\n revisionId: revision.id,\r\n noteModel: newNoteModel,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchNoteListWithoutLoading({ revisionId: revision.id }));\r\n dispatch(fetchNotesBySection({ sectionId: newNoteModel.sectionId }));\r\n }\r\n if (\r\n newNoteModel.includeEmailListAfterNoteEdit().sendEmailTo &&\r\n newNoteModel.includeEmailListAfterNoteEdit().sendEmailTo.length > 0\r\n ) {\r\n await sendEmailToTaggedUsersRequest({\r\n revisionId: revision.id,\r\n emailRequestBody: newNoteModel.includeEmailListAfterNoteEdit(),\r\n });\r\n }\r\n dispatch(setPreviousNoteBody(''));\r\n } catch (error) {\r\n dispatch(notesListError(error));\r\n }\r\n };\r\n\r\nexport const createOrDeleteNoteReply =\r\n ({ newNoteModel }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: { revision },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n } = getState();\r\n try {\r\n await updateNoteReplyRequest({\r\n revisionId: revision.id,\r\n noteModel: newNoteModel,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchNoteListWithoutLoading({ revisionId: revision.id }));\r\n dispatch(fetchNotesBySection({ sectionId: newNoteModel.sectionId }));\r\n }\r\n if (\r\n newNoteModel.includeEmailListAfterNoteReply().sendEmailTo &&\r\n newNoteModel.includeEmailListAfterNoteReply().sendEmailTo.length > 0\r\n ) {\r\n await sendEmailToTaggedUsersRequest({\r\n revisionId: revision.id,\r\n emailRequestBody: newNoteModel.includeEmailListAfterNoteReply(),\r\n });\r\n }\r\n } catch (error) {\r\n dispatch(notesListError(error));\r\n }\r\n };\r\n\r\nexport const deleteNote =\r\n ({ note }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: {\r\n revision,\r\n selectedStatement: { isOCR },\r\n },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n } = getState();\r\n\r\n dispatch(notesListLoading());\r\n try {\r\n await deleteNoteRequest({\r\n revisionId: revision.id,\r\n note,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchNoteListWithoutLoading({ revisionId: revision.id }));\r\n if (isOCR) {\r\n dispatch(\r\n fetchNotesBySectionOCR({\r\n sectionId: note.sectionId,\r\n withoutLoading: true,\r\n }),\r\n );\r\n } else {\r\n dispatch(fetchAllSectionRenderingData({ sectionId: note.sectionId }));\r\n }\r\n\r\n dispatch(fetchStatementSummaryNotes({ revisionId: revision.id }));\r\n } else {\r\n setTimeout(() => {\r\n dispatch(notesListLoadedWithoutReponse());\r\n }, 5000);\r\n }\r\n } catch (error) {\r\n dispatch(notesListError(error));\r\n }\r\n };\r\n","import React, { memo, useEffect } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { injectIntl } from 'react-intl';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nimport FormItem from 'components/common/form-item-component';\r\nimport { DrawerActionHandler } from 'components/util/drawer-action-handler-component';\r\nimport Menu from 'components/common/menu-component';\r\nimport { ReactComponent as ArrowDown } from 'icons/arrow-simple-thick-down.svg';\r\nimport { ReactComponent as Kebab } from 'icons/kebab-bold.svg';\r\n\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { usePrevious } from 'utils/hooks-util';\r\n\r\nconst DROPDOWN_BLOCK = 'dropdown';\r\nconst ARROW_DOWN_SIZE = '18px';\r\nconst KEBAB_SIZE = '28px';\r\n\r\nconst Dropdown = ({\r\n className,\r\n disabled,\r\n errorText,\r\n id,\r\n intl,\r\n isKebab,\r\n isOpen,\r\n isValid,\r\n isNotIntl,\r\n label,\r\n onKeyDown,\r\n onSelectOption,\r\n onBlur,\r\n options,\r\n placeholder,\r\n required,\r\n setWrapperRef,\r\n wrapperRef,\r\n toggleDrawer,\r\n tooltip,\r\n value,\r\n width,\r\n onClickFormItem,\r\n menuClassName,\r\n usePortalMenu,\r\n hideDropDownArrow,\r\n hideCheckmarks,\r\n centerMenuDisplay,\r\n numberOfVisibleRows,\r\n borderless,\r\n containerRef,\r\n iconConfig,\r\n isMultiselect = false,\r\n showCheckbox = false,\r\n isMultiselectDisplayValue = '',\r\n}) => {\r\n const prevOpen = usePrevious(isOpen);\r\n // this hook determines if focus has been lost, essentially determining the blur logic for this custom dropdown\r\n useEffect(() => {\r\n if (!isNullOrUndefined(onBlur) && prevOpen === true && isOpen === false) {\r\n onBlur();\r\n }\r\n });\r\n return (\r\n \r\n \r\n {!isKebab ? (\r\n onKeyDown(e)}\r\n tabIndex={0}\r\n disabled={disabled}\r\n >\r\n \r\n {isMultiselect\r\n ? `${value.length} ${intl.formatMessage({\r\n id: isMultiselectDisplayValue,\r\n })}`\r\n : value\r\n ? value.isIntl\r\n ? intl.formatMessage({ id: value.title })\r\n : value.title\r\n : isNotIntl\r\n ? placeholder\r\n : intl.formatMessage({ id: placeholder })}\r\n \r\n {hideDropDownArrow ? null : (\r\n \r\n )}\r\n \r\n ) : (\r\n /* Wrapping this component allows us to modify it's styles elsewhere without affecting the menu display styles*/\r\n
\r\n onKeyDown(e)}\r\n tabIndex={0}\r\n disabled={disabled}\r\n />\r\n
\r\n )}\r\n {isOpen ? (\r\n \r\n ) : null}\r\n \r\n \r\n );\r\n};\r\n\r\nconst sharedPropTypes = {\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** class passed directly to the menu component */\r\n menuClassName: PropTypes.string,\r\n /** Boolean representing if component should be disabled state */\r\n disabled: PropTypes.bool,\r\n /** Unique string id for drop-down */\r\n id: PropTypes.string,\r\n /** Boolean representing if dropdown should be a kebab */\r\n isKebab: PropTypes.bool,\r\n /** HOC Boolean representing whether drop down is open */\r\n isOpen: PropTypes.bool.isRequired,\r\n /** Boolean representing if drop-down output is valid */\r\n isValid: PropTypes.bool,\r\n /** Flag for non internationalized dropdown and menu options */\r\n isNotIntl: PropTypes.bool,\r\n /** Internationalized Sting id passed to form item */\r\n label: PropTypes.string,\r\n /** Should rarely be used, onSelectOption should handle the selecting of menu options*/\r\n onClickFormItem: PropTypes.func,\r\n /** Function fired when drop down item is selected passing the value of that item not required when each selection fires its own action*/\r\n onSelectOption: PropTypes.func,\r\n /** Function fired on blur */\r\n onBlur: PropTypes.func,\r\n /** Array of drop down menu items */\r\n options: PropTypes.arrayOf(PropTypes.instanceOf(MenuOption)),\r\n /** Internationalized Sting id */\r\n placeholder: PropTypes.string,\r\n /** Boolean representing whether dropdown must be selected */\r\n required: PropTypes.bool,\r\n /** HOC Function to set a ref of the drop down wrapper */\r\n setWrapperRef: PropTypes.func.isRequired,\r\n /** HOC prop. Reference to this element, passed directly to the menu to help position it, since it is a portal */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n /** HOC Function fired to toggle drop down menu */\r\n toggleDrawer: PropTypes.func.isRequired,\r\n /** Object with tool tip options passed to form item */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /** Option model containing title, id and value of selection, need whole model in order to display title in case the value variable needs to be different for sending to the api*/\r\n value: PropTypes.instanceOf(MenuOption),\r\n /** String percentage representing width of component passed to form item*/\r\n width: PropTypes.string,\r\n /** indicates if menu should use a react portal or normal child element implementation */\r\n usePortalMenu: PropTypes.bool,\r\n /** indicates if we should not render the dropdown arrow for the dropdown */\r\n hideDropDownArrow: PropTypes.bool,\r\n /** indicates if we should not render the checkmark icon on the dropdown for selected values */\r\n hideCheckmarks: PropTypes.bool,\r\n /** indicates if we should center the menu or not */\r\n centerMenuDisplay: PropTypes.bool,\r\n /* Number of visual data rows in the nested menu component, controls scrolling on it */\r\n numberOfVisibleRows: PropTypes.number,\r\n /* Ref assigned to the father element if virtualized list is being used */\r\n containerRef: PropTypes.object,\r\n};\r\n\r\nDropdown.propTypes = {\r\n ...sharedPropTypes,\r\n /** Boolean representing if component should be disabled state */\r\n disabled: PropTypes.bool,\r\n /** String error copy passed to form item */\r\n errorText: PropTypes.string,\r\n /** Boolean representing if dropdown should be a kebab */\r\n isKebab: PropTypes.bool,\r\n /** Boolean representing if drop-down output is valid */\r\n isValid: PropTypes.bool,\r\n /** Internationalized Sting id passed to form item */\r\n label: PropTypes.string,\r\n /** Function fired when drop down item is selected passing the value of that item not required when each selection fires its own action*/\r\n onSelectOption: PropTypes.func,\r\n /** Internationalized Sting id */\r\n placeholder: PropTypes.string,\r\n /** Boolean representing whether dropdown must be selected */\r\n required: PropTypes.bool,\r\n /** Option model containing title, id and value of selection, need whole model in order to display title in case the value variable needs to be different for sending to the api*/\r\n value: PropTypes.oneOfType([\r\n PropTypes.instanceOf(MenuOption),\r\n PropTypes.string,\r\n ]),\r\n};\r\n\r\nconst DefaultKebabDropdown = ({\r\n options,\r\n width,\r\n className,\r\n tooltip,\r\n onKeyDown,\r\n id,\r\n isNotIntl,\r\n toggleDrawer,\r\n isOpen,\r\n setWrapperRef,\r\n wrapperRef,\r\n onClickFormItem,\r\n menuClassName,\r\n onBlur,\r\n usePortalMenu,\r\n containerRef,\r\n}) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nDefaultKebabDropdown.propTypes = {\r\n ...sharedPropTypes,\r\n};\r\n\r\nconst KebabDropdown = DrawerActionHandler(memo(DefaultKebabDropdown));\r\nexport default DrawerActionHandler(injectIntl(memo(Dropdown)));\r\nexport { KebabDropdown };\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n UNIT_OPTIONS_MAP,\r\n SCALING_OPTIONS_MAP,\r\n} from 'constants/feature/element-attribute-constants';\r\n\r\nexport default class ElementDetails extends ApiModel({\r\n data: {\r\n amount: null,\r\n carryForwardStatus: null,\r\n clientNotesClosed: null,\r\n clientNotesClosedList: null,\r\n clientNotesOpen: null,\r\n clientNotesOpenList: null,\r\n columnNum: null,\r\n display: null,\r\n elementAnnotations: {\r\n flagFootedFormula: null,\r\n flagRecalcFormula: null,\r\n hasFootedFormula: null,\r\n hasRecalcFormula: null,\r\n flagCrossFootedFormula: null,\r\n hasCrossFootedFormula: null,\r\n irGroupName: null,\r\n tickmarks: null,\r\n workpaperReferenceNumberList: [],\r\n comfortLetterlabelList: [],\r\n },\r\n elementIds: null,\r\n entity: null,\r\n entityDetails: [],\r\n fiscalYear: null,\r\n flagInternalRef: null,\r\n flagUser: null,\r\n flagOverride: null,\r\n comfortAssign: null,\r\n formulaCell: null,\r\n id: null,\r\n included: null,\r\n internalNotesClosed: null,\r\n internalNotesClosedList: null,\r\n internalNotesOpen: null,\r\n internalNotesOpenList: null,\r\n internalVerified: null,\r\n label: null,\r\n lastModifiedDate: null,\r\n name: null,\r\n order: null,\r\n orderNum: null,\r\n periodToPeriod: null,\r\n period: null, //A form field used to store the fiscalYear and the periodType on the model.\r\n periodType: null,\r\n revisionId: null,\r\n rolloverStatus: null,\r\n rowNum: null,\r\n scaling: null,\r\n scalingId: null,\r\n section: null,\r\n sectionId: null,\r\n sectionname: null,\r\n signFlag: null,\r\n significantDigits: null,\r\n singleCelled: null,\r\n status: null,\r\n tableId: null,\r\n tag: null,\r\n tickmarkCell: null,\r\n tickmarks: null,\r\n tickmarkText: null,\r\n units: null,\r\n unitsId: null,\r\n wpReference: null,\r\n reviewed: null,\r\n polygon: null,\r\n polygonInPixel: null,\r\n creationType: null,\r\n marker: false,\r\n callout: false,\r\n },\r\n}) {\r\n get display() {\r\n if (this.data) {\r\n return this.data.display;\r\n }\r\n return null;\r\n }\r\n\r\n get id() {\r\n if (this.data) {\r\n return this.data.id;\r\n }\r\n return null;\r\n }\r\n\r\n get label() {\r\n if (this.data) {\r\n return this.data.label;\r\n }\r\n return null;\r\n }\r\n\r\n get columnNum() {\r\n if (this.data) {\r\n return this.data.columnNum;\r\n }\r\n return null;\r\n }\r\n\r\n get sectionId() {\r\n if (this.data) {\r\n return this.data.sectionId;\r\n }\r\n return null;\r\n }\r\n\r\n get sectionname() {\r\n if (this.data) {\r\n return this.data.sectionname;\r\n }\r\n return null;\r\n }\r\n\r\n get status() {\r\n if (this.data) {\r\n return this.data.status;\r\n }\r\n return null;\r\n }\r\n\r\n get scaling() {\r\n if (this.data) {\r\n return this.data.scaling;\r\n }\r\n return null;\r\n }\r\n\r\n get units() {\r\n if (this.data) {\r\n return this.data.units;\r\n }\r\n return null;\r\n }\r\n\r\n get unitsId() {\r\n if (this.data) {\r\n return this.data.unitsId;\r\n }\r\n return null;\r\n }\r\n\r\n get amount() {\r\n if (this.data) {\r\n return this.data.amount;\r\n }\r\n return 0;\r\n }\r\n\r\n get significantDigits() {\r\n if (this.data) {\r\n return this.data.significantDigits;\r\n }\r\n return null;\r\n }\r\n\r\n get internalVerified() {\r\n if (this.data) {\r\n return this.data.internalVerified;\r\n }\r\n return null;\r\n }\r\n\r\n get reviewed() {\r\n if (this.data) {\r\n return this.data.reviewed;\r\n }\r\n return null;\r\n }\r\n\r\n get flagUser() {\r\n if (this.data) {\r\n return this.data.flagUser;\r\n }\r\n return null;\r\n }\r\n\r\n get flagOverride() {\r\n if (this.data) {\r\n return this.data.flagOverride;\r\n }\r\n return null;\r\n }\r\n\r\n get comfortAssign() {\r\n if (this.data) {\r\n return this.data.comfortAssign;\r\n }\r\n return null;\r\n }\r\n\r\n get entity() {\r\n if (this.data) {\r\n return this.data.entity;\r\n }\r\n return null;\r\n }\r\n\r\n get entityDetails() {\r\n if (this.data) {\r\n return this.data.entityDetails;\r\n }\r\n return [];\r\n }\r\n\r\n get period() {\r\n if (this.data) {\r\n return this.data.period;\r\n }\r\n return null;\r\n }\r\n\r\n get periodType() {\r\n if (this.data) {\r\n return this.data.periodType;\r\n }\r\n return null;\r\n }\r\n\r\n get fiscalYear() {\r\n if (this.data) {\r\n return this.data.fiscalYear;\r\n }\r\n return null;\r\n }\r\n\r\n get revisionId() {\r\n if (this.data) {\r\n return this.data.revisionId;\r\n }\r\n return null;\r\n }\r\n\r\n get creationType() {\r\n if (this.data) {\r\n return this.data.creationType;\r\n }\r\n return null;\r\n }\r\n\r\n get marker() {\r\n if (this.data) {\r\n return this.data.marker;\r\n }\r\n return false;\r\n }\r\n\r\n get callout() {\r\n if (this.data) {\r\n return this.data.callout;\r\n }\r\n return false;\r\n }\r\n\r\n get flagInternalRef() {\r\n if (this.data) {\r\n return this.data.flagInternalRef && !this.isSystemOverrideFlagged();\r\n }\r\n return null;\r\n }\r\n\r\n get internalReferenceGroupName() {\r\n if (this.data && this.data.elementAnnotations) {\r\n return this.data.elementAnnotations.irGroupName;\r\n }\r\n return null;\r\n }\r\n\r\n get workpaperReferenceNumberList() {\r\n if (this.hasWorkpapers()) {\r\n return this.data.elementAnnotations.workpaperReferenceNumberList;\r\n }\r\n return [];\r\n }\r\n\r\n get comfortLetterLabelList() {\r\n if (this.hasComfortLetters()) {\r\n return this.data.elementAnnotations.comfortLetterlabelList;\r\n }\r\n return [];\r\n }\r\n\r\n get tickmarks() {\r\n if (this.hasTickmarks()) {\r\n return this.data.elementAnnotations.tickmarks;\r\n }\r\n return null;\r\n }\r\n\r\n get tickmarkText() {\r\n if (this.hasTickmarkText()) {\r\n return this.data.tickmarkText;\r\n }\r\n return null;\r\n }\r\n\r\n get coordinatesInPixel() {\r\n if (this.data) {\r\n return this.data.polygonInPixel;\r\n }\r\n return null;\r\n }\r\n\r\n get coordinatesInInches() {\r\n if (this.data) {\r\n return this.data.polygon;\r\n }\r\n return null;\r\n }\r\n\r\n get isIncluded() {\r\n if (this.data) {\r\n return !!this.data.included;\r\n }\r\n return false;\r\n }\r\n\r\n get previewSequenceID() {\r\n if (this.data) {\r\n return this.data.previewSequenceID;\r\n }\r\n return null;\r\n }\r\n\r\n isInitialized() {\r\n return this.isLoaded && !isNullOrUndefined(this.data.id);\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n ...response.data.result,\r\n polygonInPixel:\r\n typeof response.data.result.polygonInPixel === 'string'\r\n ? JSON.parse(response.data.result.polygonInPixel)\r\n : response.data.result.polygonInPixel,\r\n internalVerified:\r\n response.data.result.internalVerified === 1 ||\r\n response.data.result.internalVerified === true,\r\n reviewed:\r\n response.data.result.reviewed === 1 ||\r\n response.data.result.reviewed === true,\r\n flagUser:\r\n response.data.result.flagUser === 1 ||\r\n response.data.result.flagUser === true,\r\n flagOverride:\r\n response.data.result.flagOverride === 1 ||\r\n response.data.result.flagOverride === true,\r\n comfortAssign:\r\n response.data.result.comfortAssign === 1 ||\r\n response.data.result.comfortAssign === true,\r\n units: UNIT_OPTIONS_MAP.get(response.data.result.unitsId),\r\n scaling: SCALING_OPTIONS_MAP.get(response.data.result.scalingId),\r\n period: `${response.data.result.periodType} ${response.data.result.fiscalYear}`,\r\n flagInternalRef:\r\n response.data.result.flagInternalRef === 1 ||\r\n response.data.result.flagInternalRef === true,\r\n marker:\r\n response.data.result.elementAnnotations &&\r\n this.isElementHasAnnotation(response.data.result) &&\r\n response.data.result.marker\r\n ? response.data.result.marker\r\n : this.isElementHasAnnotation(response.data.result),\r\n callout:\r\n response.data.result.elementAnnotations &&\r\n !isNullOrUndefined(response.data.result.callout) &&\r\n response.data.result.callout,\r\n },\r\n };\r\n }\r\n\r\n isElementHasAnnotation(response) {\r\n const { included, elementAnnotations } = response;\r\n if (!included || !elementAnnotations) return false;\r\n\r\n const {\r\n hasFootedFormula,\r\n hasRecalcFormula,\r\n irGroupName,\r\n hasCrossFootedFormula,\r\n workpaperReferenceNumberList,\r\n comfortLetterlabelList,\r\n tickmarks,\r\n } = elementAnnotations || {};\r\n return !!(\r\n irGroupName ||\r\n (workpaperReferenceNumberList && workpaperReferenceNumberList.length) ||\r\n (tickmarks && tickmarks.length) ||\r\n (comfortLetterlabelList && comfortLetterlabelList.length) ||\r\n hasRecalcFormula ||\r\n hasFootedFormula ||\r\n hasCrossFootedFormula\r\n );\r\n }\r\n\r\n updateElementCallout(value) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n marker: value ? !value : this.isElementHasAnnotation(this.data),\r\n callout: value,\r\n },\r\n });\r\n }\r\n\r\n convertElementDetailsEntityToElementDetailsModel({\r\n elementDetails,\r\n sectionFullName,\r\n }) {\r\n return this.merge({\r\n data: {\r\n ...elementDetails,\r\n internalVerified: elementDetails.internalVerified === 1,\r\n reviewed: elementDetails.reviewed === 1,\r\n flagUser: elementDetails.flagUser === 1,\r\n flagOverride: elementDetails.flagOverride === 1,\r\n comfortAssign: elementDetails.comfortAssign === 1,\r\n units: UNIT_OPTIONS_MAP.get(elementDetails.unitsId),\r\n scaling: SCALING_OPTIONS_MAP.get(elementDetails.scalingId),\r\n period: `${elementDetails.periodType} ${elementDetails.fiscalYear}`,\r\n flagInternalRef: elementDetails.flagInternalRef === 1,\r\n sectionname: sectionFullName\r\n ? sectionFullName\r\n : elementDetails.sectionname,\r\n },\r\n isLoading: false,\r\n isLoaded: true,\r\n error: null,\r\n });\r\n }\r\n\r\n toEditApiFormat() {\r\n return {\r\n ...this.data,\r\n internalVerified: this.data.internalVerified === true ? 1 : 0,\r\n flagUser: this.data.flagUser === true ? 1 : 0,\r\n flagOverride: this.data.flagOverride === true ? 1 : 0,\r\n comfortAssign: this.data.comfortAssign === true ? 1 : 0,\r\n unitsId: this.data.units.id,\r\n units: this.data.units.value,\r\n scaling: this.data.scaling.value,\r\n scalingId: this.data.scaling.id,\r\n polygonInPixel: JSON.stringify(this.data.polygonInPixel),\r\n /**\r\n * Our dropdowns contain the full period, eg. FY 2015 in them, so they need to be split to be saved.\r\n */\r\n periodType: this.data.period\r\n ? this.data.period.split(' ')[0]\r\n : this.data.periodType,\r\n fiscalYear: this.data.period\r\n ? this.data.period.split(' ')[1]\r\n : this.data.fiscalYear,\r\n flagInternalRef: this.flagInternalRef ? 1 : 0,\r\n reviewed: this.data.reviewed === true ? 1 : 0,\r\n };\r\n }\r\n\r\n setVerify({ verified }) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n internalVerified: verified,\r\n },\r\n });\r\n }\r\n\r\n setReview({ reviewed }) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n reviewed: reviewed,\r\n },\r\n });\r\n }\r\n\r\n setUserFlag({ userFlag }) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n flagUser: userFlag,\r\n },\r\n });\r\n }\r\n\r\n setOverrideSystemFlag({ systemFlag }) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n flagOverride: systemFlag,\r\n },\r\n });\r\n }\r\n\r\n setComfortAssign({ comfortAssignVal }) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n comfortAssign: comfortAssignVal,\r\n },\r\n });\r\n }\r\n\r\n setEntity(entity) {\r\n return this.merge({ data: { ...this.data, entity } });\r\n }\r\n\r\n setScaling({ scaling }) {\r\n return this.merge({ data: { ...this.data, scaling } });\r\n }\r\n\r\n setPeriod(period) {\r\n return this.merge({ data: { ...this.data, period } });\r\n }\r\n\r\n setSectionName(sectionname) {\r\n return this.merge({ data: { ...this.data, sectionname } });\r\n }\r\n\r\n setUnit({ units }) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n units,\r\n },\r\n });\r\n }\r\n\r\n isVerified() {\r\n return this.data && this.data.internalVerified === true;\r\n }\r\n\r\n isReviewed() {\r\n return this.data && this.data.reviewed === true;\r\n }\r\n\r\n isUserFlagged() {\r\n return this.data && this.data.flagUser === true;\r\n }\r\n\r\n isSystemOverrideFlagged() {\r\n return this.data && this.data.flagOverride === true;\r\n }\r\n\r\n isComfortAssign() {\r\n return this.data && this.data.comfortAssign === true;\r\n }\r\n\r\n hasFootedFormula() {\r\n return (\r\n this.data &&\r\n this.data.elementAnnotations &&\r\n this.data.elementAnnotations.hasFootedFormula\r\n );\r\n }\r\n\r\n hasRecalcFormula() {\r\n return (\r\n this.data &&\r\n this.data.elementAnnotations &&\r\n this.data.elementAnnotations.hasRecalcFormula\r\n );\r\n }\r\n\r\n hasCrossFootedFormula() {\r\n return (\r\n this.data &&\r\n this.data.elementAnnotations &&\r\n this.data.elementAnnotations.hasCrossFootedFormula\r\n );\r\n }\r\n\r\n hasFormula() {\r\n return (\r\n this.hasRecalcFormula() ||\r\n this.hasFootedFormula() ||\r\n this.hasCrossFootedFormula()\r\n );\r\n }\r\n\r\n get elementHasFormula() {\r\n return (\r\n this.hasRecalcFormula() ||\r\n this.hasFootedFormula() ||\r\n this.hasCrossFootedFormula()\r\n );\r\n }\r\n\r\n hasFootedFormulaFlagged(ignoreSystemFlag) {\r\n return ignoreSystemFlag\r\n ? this.hasFootedFormula() &&\r\n this.data.elementAnnotations.flagFootedFormula\r\n : this.hasFootedFormula() &&\r\n this.data.elementAnnotations.flagFootedFormula &&\r\n !this.isSystemOverrideFlagged();\r\n }\r\n\r\n hasRecalcFormulaFlagged(ignoreSystemFlag) {\r\n return ignoreSystemFlag\r\n ? this.hasRecalcFormula() &&\r\n this.data.elementAnnotations.flagRecalcFormula\r\n : this.hasRecalcFormula() &&\r\n this.data.elementAnnotations.flagRecalcFormula &&\r\n !this.isSystemOverrideFlagged();\r\n }\r\n\r\n hasCrossFootedFormulaFlagged(ignoreSystemFlag) {\r\n return ignoreSystemFlag\r\n ? this.hasCrossFootedFormula() &&\r\n this.data.elementAnnotations.flagCrossFootedFormula\r\n : this.hasCrossFootedFormula() &&\r\n this.data.elementAnnotations.flagCrossFootedFormula &&\r\n !this.isSystemOverrideFlagged();\r\n }\r\n\r\n isFormulaFlagged(ignoreSystemFlag = false) {\r\n return (\r\n this.hasFootedFormulaFlagged(ignoreSystemFlag) ||\r\n this.hasRecalcFormulaFlagged(ignoreSystemFlag) ||\r\n this.hasCrossFootedFormulaFlagged(ignoreSystemFlag)\r\n );\r\n }\r\n\r\n isInternalRefFlagged(ignoreSystemFlag = false) {\r\n return ignoreSystemFlag\r\n ? this.data && this.data.flagInternalRef\r\n : this.data &&\r\n this.data.flagInternalRef &&\r\n !this.isSystemOverrideFlagged();\r\n }\r\n\r\n shouldFlagIR(selectedElement) {\r\n return (\r\n selectedElement.display === this.data.display &&\r\n selectedElement.scaling === this.data.scaling &&\r\n selectedElement.units === this.data.units &&\r\n selectedElement.period === this.data.period &&\r\n selectedElement.entity === this.data.entity\r\n );\r\n }\r\n\r\n isFlagged() {\r\n return (\r\n this.isUserFlagged() ||\r\n this.isFormulaFlagged() ||\r\n this.isInternalRefFlagged()\r\n );\r\n }\r\n\r\n isFlaggedAndReviewed() {\r\n return this.isReviewed() && this.isFlagged();\r\n }\r\n\r\n isFlaggedAndVerified() {\r\n return this.isVerified() && this.isFlagged();\r\n }\r\n\r\n hasInternalReferenceGroup() {\r\n return this.data && !isNullOrUndefined(this.internalReferenceGroupName);\r\n }\r\n\r\n hasWorkpapers() {\r\n return (\r\n this.data &&\r\n !isNullOrUndefined(this.data.elementAnnotations) &&\r\n !isNullOrUndefined(\r\n this.data.elementAnnotations.workpaperReferenceNumberList,\r\n ) &&\r\n this.data.elementAnnotations.workpaperReferenceNumberList.length > 0\r\n );\r\n }\r\n\r\n hasComfortLetters() {\r\n return (\r\n this.data &&\r\n !isNullOrUndefined(this.data.elementAnnotations) &&\r\n !isNullOrUndefined(this.data.elementAnnotations.comfortLetterlabelList) &&\r\n this.data.elementAnnotations.comfortLetterlabelList.length > 0\r\n );\r\n }\r\n\r\n hasTickmarks() {\r\n return (\r\n this.data &&\r\n !isNullOrUndefined(this.data.elementAnnotations) &&\r\n !isNullOrUndefined(this.data.elementAnnotations.tickmarks) &&\r\n this.data.elementAnnotations.tickmarks.length > 0\r\n );\r\n }\r\n\r\n hasTickmarkText() {\r\n return this.data && !isNullOrUndefined(this.data.tickmarkText);\r\n }\r\n\r\n isExcluded() {\r\n return this.data && this.data.included === 0;\r\n }\r\n\r\n highlightSearchTermInLabel({ term }) {\r\n if (isNullOrUndefined(this.label)) {\r\n return '';\r\n }\r\n if (isNullOrUndefined(term) || term === '') {\r\n return this.label;\r\n }\r\n return this.highlightTermInString(this.label, term);\r\n }\r\n\r\n setElementTickmarkAnnotations({ irGroupName, tickmark }) {\r\n const updatedElementAnnotations = { ...this.data.elementAnnotations };\r\n if (irGroupName !== undefined) {\r\n // irGroupName is cleared by coming in as Null\r\n // undefined means the argument was not set\r\n updatedElementAnnotations.irGroupName = irGroupName;\r\n }\r\n if (!isNullOrUndefined(tickmark)) {\r\n updatedElementAnnotations.tickmarks = tickmark;\r\n }\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n elementAnnotations: updatedElementAnnotations,\r\n marker: false,\r\n callout: true,\r\n },\r\n isLoaded: true,\r\n isLoading: false,\r\n });\r\n }\r\n\r\n highlightSearchTermInDisplayValue({ term }) {\r\n if (isNullOrUndefined(this.display)) {\r\n return '';\r\n }\r\n if (isNullOrUndefined(term) || term === '') {\r\n return this.display;\r\n }\r\n return this.highlightTermInString(this.display, term);\r\n }\r\n\r\n highlightTermInString(str, term) {\r\n const escapedTerm = term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\r\n return str.replace(\r\n new RegExp(escapedTerm, 'gi'),\r\n `${term}`,\r\n );\r\n }\r\n\r\n updateElementDetailsFromSocket(payload) {\r\n const response = payload;\r\n const data = { ...this.data, ...response };\r\n return this.merge({\r\n data: {\r\n ...data,\r\n internalVerified: data.internalVerified === 1,\r\n reviewed: data.reviewed === 1,\r\n flagUser: data.flagUser === 1,\r\n flagOverride: data.flagOverride === 1,\r\n comfortAssign: data.comfortAssign === 1,\r\n units: UNIT_OPTIONS_MAP.get(data.unitsId),\r\n scaling: SCALING_OPTIONS_MAP.get(data.scalingId),\r\n period: `${data.periodType} ${data.fiscalYear}`,\r\n flagInternalRef: data.flagInternalRef === 1,\r\n marker: data.marker,\r\n callout: data.callout,\r\n },\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting an element as loaded from raw api data,\r\n * likely called from a place that receives an array of raw element data\r\n * like the \"elements by section\" request, or the \"document changes since\" requeset\r\n * @param {object} param.data this elements data to be merged\r\n */\r\n setLoadedFromElementData({ data }) {\r\n return this.merge({\r\n data: {\r\n ...data,\r\n polygonInPixel:\r\n typeof data.polygonInPixel === 'string'\r\n ? JSON.parse(data.polygonInPixel)\r\n : data.polygonInPixel,\r\n internalVerified: !!data.internalVerified,\r\n reviewed: !!data.reviewed,\r\n flagUser: !!data.flagUser,\r\n flagOverride: !!data.flagOverride,\r\n comfortAssign: !!data.comfortAssign,\r\n flagInternalRef: !!data.flagInternalRef,\r\n units: UNIT_OPTIONS_MAP.get(data.unitsId),\r\n scaling: SCALING_OPTIONS_MAP.get(data.scalingId),\r\n period: `${data.periodType} ${data.fiscalYear}`,\r\n marker:\r\n this.isElementHasAnnotation(data) && !isNullOrUndefined(data.marker)\r\n ? data.marker\r\n : this.isElementHasAnnotation(data),\r\n callout: !isNullOrUndefined(data.callout) && data.callout,\r\n },\r\n isLoaded: true,\r\n isLoading: false,\r\n });\r\n }\r\n\r\n get name() {\r\n if (this.data) {\r\n return this.data.name;\r\n }\r\n return null;\r\n }\r\n\r\n setElementAnnotations({ irGroupName, workpaperReferenceNumberList }) {\r\n const updatedElementAnnotations = { ...this.data.elementAnnotations };\r\n if (irGroupName !== undefined) {\r\n // irGroupName is cleared by coming in as Null\r\n // undefined means the argument was not set\r\n updatedElementAnnotations.irGroupName = irGroupName;\r\n }\r\n if (!isNullOrUndefined(workpaperReferenceNumberList)) {\r\n updatedElementAnnotations.workpaperReferenceNumberList =\r\n workpaperReferenceNumberList;\r\n }\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n elementAnnotations: updatedElementAnnotations,\r\n marker: false,\r\n callout: true,\r\n },\r\n isLoaded: true,\r\n isLoading: false,\r\n });\r\n }\r\n\r\n setElementComfortLetterAnnotations({ irGroupName, comfortLetterLabelList }) {\r\n const updatedElementAnnotations = { ...this.data.elementAnnotations };\r\n if (irGroupName !== undefined) {\r\n // irGroupName is cleared by coming in as Null\r\n // undefined means the argument was not set\r\n updatedElementAnnotations.irGroupName = irGroupName;\r\n }\r\n if (!isNullOrUndefined(comfortLetterLabelList)) {\r\n updatedElementAnnotations.comfortLetterlabelList = comfortLetterLabelList;\r\n }\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n elementAnnotations: updatedElementAnnotations,\r\n marker: false,\r\n callout: true,\r\n },\r\n isLoaded: true,\r\n isLoading: false,\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport ProjectUsersList from 'models/api/project-users-list-api-model';\r\nimport {\r\n setProjectUsersListLoaded,\r\n setProjectUsersListLoading,\r\n setProjectUsersListError,\r\n} from 'store/actions/project-users-list-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setProjectUsersListLoaded]: (user, { payload }) => {\r\n return user.setLoaded(payload);\r\n },\r\n [setProjectUsersListLoading]: (user, { payload }) => {\r\n return user.setLoading(payload);\r\n },\r\n\r\n [setProjectUsersListError]: (user, { payload }) => {\r\n return user.setError(payload);\r\n },\r\n },\r\n new ProjectUsersList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n currentUserLoading,\r\n currentUserError,\r\n currentUserLoaded,\r\n} from 'store/actions/current-user-actions';\r\nimport { setUserHomeGeo } from 'store/actions/user-profile-actions';\r\nimport { CurrentUser } from 'models/api/current-user-model';\r\n\r\nexport default handleActions(\r\n {\r\n [currentUserLoading]: (currentUser) => {\r\n return currentUser.setLoading();\r\n },\r\n [currentUserError]: (currentUser, { payload }) => {\r\n return currentUser.setError(payload);\r\n },\r\n [currentUserLoaded]: (currentUser, { payload }) => {\r\n return currentUser.setLoaded(payload);\r\n },\r\n [setUserHomeGeo]: (currentUser, { payload }) => {\r\n const { response: { result: { geoCode } = {} } = {} } = payload;\r\n return currentUser.setHomeGeo(geoCode);\r\n },\r\n },\r\n new CurrentUser(),\r\n);\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\n//stores all the featureFlag data coming from backend,\r\n//data is the map of geoCode to featureFlag. ex. {AME: {featureFlags}, EMA: {featureFlags}}\r\nexport class FeatureInfo extends ApiModel({\r\n data: {},\r\n}) {\r\n processResponse({ response }) {\r\n return {\r\n data: response,\r\n };\r\n }\r\n\r\n getCarryForwardMetaDataEnabled(geo) {\r\n const featureConfig = this.data[geo];\r\n return isNullOrUndefined(featureConfig)\r\n ? false\r\n : featureConfig.carryForwardMetaDataEnabled;\r\n }\r\n\r\n getTechSupportStatementAccessEnabled(geo) {\r\n const featureConfig = this.data[geo];\r\n return isNullOrUndefined(featureConfig)\r\n ? false\r\n : featureConfig.techSupportStatementAccessEnabled;\r\n }\r\n\r\n getOCREnabled(geo) {\r\n const featureConfig = this.data[geo];\r\n return isNullOrUndefined(featureConfig) ? false : featureConfig.ocrEnabled;\r\n }\r\n\r\n getChatBotEnabled(geo) {\r\n const chatBotFeature = this.data[geo];\r\n return isNullOrUndefined(chatBotFeature)\r\n ? false\r\n : chatBotFeature.chatbotEnabled;\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n featureInfoLoading,\r\n featureInfoLoaded,\r\n featureInfoError,\r\n} from 'store/actions/feature-info-actions';\r\nimport { FeatureInfo } from 'models/api/feature-info-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [featureInfoLoading]: (featureInfo) => {\r\n return featureInfo.setLoading();\r\n },\r\n [featureInfoLoaded]: (featureInfo, { payload }) => {\r\n return featureInfo.setLoaded(payload);\r\n },\r\n [featureInfoError]: (featureInfo, { payload }) => {\r\n return featureInfo.setError(payload);\r\n },\r\n },\r\n new FeatureInfo(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n userAuthLoading,\r\n userAuthError,\r\n userAuthLoaded,\r\n userAuth401Error,\r\n} from 'store/actions/user-auth-actions';\r\nimport { AuthUser } from 'models/api/auth-user-model';\r\n\r\nexport default handleActions(\r\n {\r\n [userAuthLoading]: (authUser) => {\r\n return authUser.setLoading();\r\n },\r\n [userAuthError]: (authUser, { payload }) => {\r\n return authUser.setError(payload);\r\n },\r\n [userAuthLoaded]: (authUser, { payload }) => {\r\n return authUser.setLoaded(payload);\r\n },\r\n [userAuth401Error]: (authUser, { payload }) => {\r\n return authUser.set401Error(payload);\r\n },\r\n },\r\n new AuthUser(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n projectListLoading,\r\n projectListError,\r\n projectListLoaded,\r\n softDeleteProjectError,\r\n restoreDeletedProjectError,\r\n permanentlyDeleteProjectError,\r\n clearProjectList,\r\n setGeoToFilterProjectList,\r\n setAppliedSearchTermToFilterProjectList,\r\n clearAppliedSearchTermToFilterProjectList,\r\n setMergeSelectedProjectWithProjectList,\r\n} from 'store/actions/project-list-actions';\r\nimport { ProjectList } from 'models/api/project-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [clearProjectList]: () => {\r\n return new ProjectList();\r\n },\r\n [projectListLoading]: (projectList) => {\r\n return projectList.setLoading();\r\n },\r\n [projectListError]: (projectList, { payload }) => {\r\n return projectList.setError(payload);\r\n },\r\n [projectListLoaded]: (projectList, { payload }) => {\r\n return projectList.setLoaded(payload);\r\n },\r\n [softDeleteProjectError]: (projectList, { payload }) => {\r\n return projectList.setError(payload);\r\n },\r\n [restoreDeletedProjectError]: (projectList, { payload }) => {\r\n return projectList.setError(payload);\r\n },\r\n [permanentlyDeleteProjectError]: (projectList, { payload }) => {\r\n return projectList.setError(payload);\r\n },\r\n [setGeoToFilterProjectList]: (projectList, { payload }) => {\r\n return projectList.setGeoToFilterProjectList(payload);\r\n },\r\n [setAppliedSearchTermToFilterProjectList]: (projectList, { payload }) => {\r\n return projectList.setSearchTermToFilterProjectList(payload);\r\n },\r\n [clearAppliedSearchTermToFilterProjectList]: (projectList) => {\r\n return projectList.clearSearchTermToFilterProjectList();\r\n },\r\n [setMergeSelectedProjectWithProjectList]: (projectList, { payload }) => {\r\n return projectList.mergeSelectedProjectWithProjectList(payload);\r\n },\r\n },\r\n new ProjectList(),\r\n);\r\n","import { PinnedDetials } from 'models/api/pinned-details-model';\r\nimport { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n pinnedDetailsLoading,\r\n pinnedDetailsError,\r\n pinnedDetailsLoaded,\r\n updatePinnedDetails,\r\n removePinnedDetails,\r\n} from 'store/actions/pinned-details-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [pinnedDetailsLoading]: (pinnedDetails) => {\r\n return pinnedDetails.setLoading();\r\n },\r\n [pinnedDetailsError]: (pinnedDetails, { payload }) => {\r\n return pinnedDetails.setError(payload);\r\n },\r\n [pinnedDetailsLoaded]: (pinnedDetails, { payload }) => {\r\n return pinnedDetails.setLoaded(payload);\r\n },\r\n [updatePinnedDetails]: (pinnedDetails, { payload }) => {\r\n return pinnedDetails.addNewPinnedItem(payload);\r\n },\r\n [removePinnedDetails]: (pinnedDetails, { payload }) => {\r\n return pinnedDetails.removingPinnedItem(payload);\r\n },\r\n },\r\n new PinnedDetials(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport { setLocale } from 'store/actions/locale-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setLocale]: (state, { payload }) => {\r\n return payload;\r\n },\r\n },\r\n 'en-US',\r\n);\r\n","import BaseModel from 'models/base-model';\r\nexport default class ReportPreviewPage extends BaseModel({\r\n selectedElementId: null,\r\n isClickedOnReport: null,\r\n}) {\r\n get selectedElementDetails() {\r\n return this;\r\n }\r\n\r\n setSelectedElementDetails({ selectedElementId, isClickedOnReport }) {\r\n return this.merge({ selectedElementId, isClickedOnReport });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport ReportPreviewPage from 'models/data/report-preview-page-model';\r\n\r\nimport {\r\n setSelectedElementDetails,\r\n clearReportPreviewPageData,\r\n} from 'store/actions/report-preview-page-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setSelectedElementDetails]: (reportPreviewPage, { payload }) => {\r\n return reportPreviewPage.setSelectedElementDetails(payload);\r\n },\r\n [clearReportPreviewPageData]: () => {\r\n return new ReportPreviewPage();\r\n },\r\n },\r\n new ReportPreviewPage(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n selectedProjectLoading,\r\n selectedProjectLoaded,\r\n clearSelectedProject,\r\n selectedProjectError,\r\n setUpdatedLegalHoldForSelectedProject,\r\n} from 'store/actions/selected-project-actions';\r\n\r\nimport ProjectApi from 'models/api/project-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [selectedProjectLoading]: (selectedProject) => {\r\n return selectedProject.setLoading();\r\n },\r\n [selectedProjectLoaded]: (selectedProject, { payload: { response } }) => {\r\n return selectedProject.setLoaded(response);\r\n },\r\n [selectedProjectError]: (projectList, { payload }) => {\r\n return projectList.setError(payload);\r\n },\r\n [clearSelectedProject]: (selectedProject) => {\r\n return new ProjectApi();\r\n },\r\n [setUpdatedLegalHoldForSelectedProject]: (projectList, { payload }) => {\r\n return projectList.updateLegalHoldForSelectedProject(payload);\r\n },\r\n },\r\n new ProjectApi(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { DEFAULT_SELECTED_PROJECT_ID } from 'constants/feature/selected-project-constants';\r\nimport { setSelectedProjectId } from 'store/actions/selected-project-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setSelectedProjectId]: (id, { payload: { projectId } }) => {\r\n return projectId;\r\n },\r\n },\r\n DEFAULT_SELECTED_PROJECT_ID\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n statementListLoading,\r\n statementListError,\r\n statementListLoaded,\r\n softDeleteCurrentRevisionError,\r\n softDeleteAllRevisionsError,\r\n permanentlyDeleteCurrentRevisionError,\r\n permanentlyDeleteAllRevisionsError,\r\n navigateToStatementError,\r\n clearStatementList,\r\n} from 'store/actions/statement-list/statement-list-actions';\r\nimport { StatementList } from 'models/api/statement-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [clearStatementList]: (statementList) => {\r\n return new StatementList();\r\n },\r\n [statementListLoading]: (statementList) => {\r\n return statementList.setLoading();\r\n },\r\n [statementListError]: (statementList, { payload }) => {\r\n return statementList.setError(payload);\r\n },\r\n [statementListLoaded]: (statementList, { payload }) => {\r\n return statementList.setLoaded(payload);\r\n },\r\n [softDeleteCurrentRevisionError]: (statementList, { payload }) => {\r\n return statementList.setError(payload);\r\n },\r\n [softDeleteAllRevisionsError]: (statementList, { payload }) => {\r\n return statementList.setError(payload);\r\n },\r\n [permanentlyDeleteCurrentRevisionError]: (statementList, { payload }) => {\r\n return statementList.setError(payload);\r\n },\r\n [permanentlyDeleteAllRevisionsError]: (statementList, { payload }) => {\r\n return statementList.setError(payload);\r\n },\r\n [navigateToStatementError]: (statementList, { payload }) => {\r\n return statementList.setError(payload);\r\n },\r\n },\r\n new StatementList()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n statementWorkflowsLoading,\r\n statementWorkflowsError,\r\n statementWorkflowsLoaded,\r\n permanentlyDeleteWorkflowRevisionError,\r\n retryFailedDocumentUploadError,\r\n clearStatementWorkflows,\r\n} from 'store/actions/statement-workflows-actions';\r\nimport { WorkflowsMap } from 'models/api/statement-workflows-map-model';\r\n\r\nexport default handleActions(\r\n {\r\n [clearStatementWorkflows]: (workflowsMap) => {\r\n return new WorkflowsMap();\r\n },\r\n [statementWorkflowsLoading]: (workflowsMap) => {\r\n return workflowsMap.setLoading();\r\n },\r\n [statementWorkflowsError]: (workflowsMap, { payload }) => {\r\n return workflowsMap.setError(payload);\r\n },\r\n [statementWorkflowsLoaded]: (workflowsMap, { payload }) => {\r\n return workflowsMap.setLoaded(payload);\r\n },\r\n [permanentlyDeleteWorkflowRevisionError]: (workflowsMap, { payload }) => {\r\n return workflowsMap.setError(payload);\r\n },\r\n [retryFailedDocumentUploadError]: (workflowsMap, { payload }) => {\r\n return workflowsMap.setError(payload);\r\n },\r\n },\r\n new WorkflowsMap()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setProjectIdWorkflowExpanded,\r\n clearProjectIdWorkflowExpanded,\r\n} from 'store/actions/statement-workflows-actions';\r\n\r\nconst DEFAULT_EXPANDED_PROJECT = null;\r\n\r\nexport default handleActions(\r\n {\r\n [clearProjectIdWorkflowExpanded]: () => {\r\n return DEFAULT_EXPANDED_PROJECT;\r\n },\r\n [setProjectIdWorkflowExpanded]: (projectId, { payload }) => {\r\n return payload;\r\n },\r\n },\r\n DEFAULT_EXPANDED_PROJECT\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n sectionIdListStatementContentLoading,\r\n sectionIdListStatementContentLoaded,\r\n sectionIdListStatementContentError,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport { SectionIdList } from 'models/api/section-id-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [sectionIdListStatementContentLoading]: (sectionIdList) => {\r\n return sectionIdList.setLoading();\r\n },\r\n [sectionIdListStatementContentLoaded]: (sectionIdList, { payload }) => {\r\n return sectionIdList.setLoaded(payload);\r\n },\r\n [sectionIdListStatementContentError]: (sectionIdList, { payload }) => {\r\n return sectionIdList.setError(payload);\r\n },\r\n [clearStatementPageStoreAction]: (sectionIdList, { payload }) => {\r\n return new SectionIdList();\r\n },\r\n },\r\n new SectionIdList()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n leftSectionIdListStatementContentLoading,\r\n leftSectionIdListStatementContentLoaded,\r\n leftSectionIdListStatementContentError,\r\n clearStatementPageStoreAction,\r\n clearLeftStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport { SectionIdList } from 'models/api/section-id-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [leftSectionIdListStatementContentLoading]: (sectionIdList) => {\r\n return sectionIdList.setLoading();\r\n },\r\n [leftSectionIdListStatementContentLoaded]: (sectionIdList, { payload }) => {\r\n return sectionIdList.setLoaded(payload);\r\n },\r\n [leftSectionIdListStatementContentError]: (sectionIdList, { payload }) => {\r\n return sectionIdList.setError(payload);\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new SectionIdList();\r\n },\r\n [clearLeftStatementPageStoreAction]: () => {\r\n return new SectionIdList();\r\n },\r\n },\r\n new SectionIdList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n sectionHTMLSegmentsStatementContentLoading,\r\n sectionHTMLSegmentsStatementContentLoaded,\r\n sectionHTMLSegmentsStatementContentError,\r\n sectionIdListStatementContentLoading,\r\n sectionIdListStatementContentLoaded,\r\n sectionIdListStatementContentError,\r\n clearSectionContentWithIdsFromCache,\r\n clearStatementPageStoreAction,\r\n sectionHTMLSegmentsStatementContentLoadedWithoutResponse,\r\n clearOCRSectionImageWithIdsFromCache,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n sectionOCRImageStatementContentLoaded,\r\n sectionOCRImageStatementContentError,\r\n} from 'store/actions/statement-content-actions-ocr';\r\nimport { SectionCache } from 'models/api/sections-cache-model';\r\nexport default handleActions(\r\n {\r\n [sectionIdListStatementContentLoading]: (sectionCache) => {\r\n return sectionCache.setLoading();\r\n },\r\n [sectionIdListStatementContentLoaded]: (sectionCache, { payload }) => {\r\n return sectionCache.setLoaded(payload);\r\n },\r\n [sectionIdListStatementContentError]: (sectionCache, { payload }) => {\r\n return sectionCache.setError(payload);\r\n },\r\n [sectionHTMLSegmentsStatementContentLoading]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeSectionsLoading(payload);\r\n },\r\n [sectionHTMLSegmentsStatementContentLoaded]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeSectionsLoaded(payload);\r\n },\r\n [sectionHTMLSegmentsStatementContentLoadedWithoutResponse]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeSectionsLoadedWithoutResponse(payload);\r\n },\r\n [sectionHTMLSegmentsStatementContentError]: (sectionCache, { payload }) => {\r\n return sectionCache.setError(payload);\r\n },\r\n [clearSectionContentWithIdsFromCache]: (sectionCache, { payload }) => {\r\n return sectionCache.clearSectionContentFromMap(payload);\r\n },\r\n [clearOCRSectionImageWithIdsFromCache]: (sectionCache, { payload }) => {\r\n return sectionCache.clearSectionImageContentFromMap(payload);\r\n },\r\n [clearStatementPageStoreAction]: (sectionCache, { payload }) => {\r\n return new SectionCache();\r\n },\r\n [sectionOCRImageStatementContentLoaded]: (sectionCache, { payload }) => {\r\n return sectionCache.mergeOCRSectionLoaded(payload);\r\n },\r\n [sectionOCRImageStatementContentError]: (sectionCache, { payload }) => {\r\n return sectionCache.setError(payload);\r\n },\r\n },\r\n new SectionCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n leftSectionHTMLSegmentsStatementContentLoading,\r\n leftSectionHTMLSegmentsStatementContentLoaded,\r\n leftSectionHTMLSegmentsStatementContentError,\r\n leftSectionIdListStatementContentLoading,\r\n leftSectionIdListStatementContentLoaded,\r\n leftSectionIdListStatementContentError,\r\n clearStatementPageStoreAction,\r\n clearLeftStatementPageStoreAction,\r\n leftSectionHTMLSegmentsStatementContentLoadedWithoutResponse,\r\n clearLeftOCRSectionImageWithIdsFromCache,\r\n clearLeftStatementContent,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n leftSectionOCRImageStatementContentLoaded,\r\n leftSectionOCRImageStatementContentError,\r\n} from 'store/actions/statement-content-actions-ocr';\r\nimport { clearLeftSectionContentWithIdsFromCache } from 'store/actions/left-statement-section-content-actions';\r\n\r\nimport { LeftSectionCache } from 'models/api/left-sections-cache-model';\r\nexport default handleActions(\r\n {\r\n [leftSectionIdListStatementContentLoading]: (sectionCache) => {\r\n return sectionCache.setLoading();\r\n },\r\n [leftSectionIdListStatementContentLoaded]: (sectionCache, { payload }) => {\r\n return sectionCache.setLoaded(payload);\r\n },\r\n [leftSectionIdListStatementContentError]: (sectionCache, { payload }) => {\r\n return sectionCache.setError(payload);\r\n },\r\n [leftSectionHTMLSegmentsStatementContentLoading]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeSectionsLoading(payload);\r\n },\r\n [leftSectionHTMLSegmentsStatementContentLoaded]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeSectionsLoaded(payload);\r\n },\r\n [leftSectionHTMLSegmentsStatementContentLoadedWithoutResponse]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeSectionsLoadedWithoutResponse(payload);\r\n },\r\n [leftSectionHTMLSegmentsStatementContentError]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.setError(payload);\r\n },\r\n [clearLeftSectionContentWithIdsFromCache]: (sectionCache, { payload }) => {\r\n return sectionCache.clearSectionContentFromMap(payload);\r\n },\r\n [clearLeftStatementContent]: () => {\r\n return new LeftSectionCache();\r\n },\r\n [clearStatementPageStoreAction]: (sectionCache, { payload }) => {\r\n return new LeftSectionCache();\r\n },\r\n [clearLeftStatementPageStoreAction]: (sectionCache, { payload }) => {\r\n return new LeftSectionCache();\r\n },\r\n [clearLeftOCRSectionImageWithIdsFromCache]: (sectionCache, { payload }) => {\r\n return sectionCache.clearLeftSectionImageContentFromMap(payload);\r\n },\r\n [leftSectionOCRImageStatementContentLoaded]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeOCRSectionLoaded(payload);\r\n },\r\n [leftSectionOCRImageStatementContentError]: (sectionCache, { payload }) => {\r\n return sectionCache.setError(payload);\r\n },\r\n },\r\n new LeftSectionCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n sectionIdListStatementContentLoading,\r\n sectionIdListStatementContentLoaded,\r\n sectionIdListStatementContentError,\r\n clearOCRSectionImageWithIdsFromCache,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n sectionOCRDataSegmentsStatementContentLoaded,\r\n sectionOCRDataSegmentsStatementContentError,\r\n} from 'store/actions/statement-content-actions-ocr';\r\nimport { SectionCacheOCR } from 'models/api/sections-cache-model-ocr-data';\r\nexport default handleActions(\r\n {\r\n [sectionIdListStatementContentLoading]: (sectionCache) => {\r\n return sectionCache.setLoading();\r\n },\r\n [sectionIdListStatementContentLoaded]: (sectionCache, { payload }) => {\r\n return sectionCache.setLoaded(payload);\r\n },\r\n [sectionIdListStatementContentError]: (sectionCache, { payload }) => {\r\n return sectionCache.setError(payload);\r\n },\r\n [sectionOCRDataSegmentsStatementContentLoaded]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.mergeOCRSectionDataLoaded(payload);\r\n },\r\n [sectionOCRDataSegmentsStatementContentError]: (\r\n sectionCache,\r\n { payload },\r\n ) => {\r\n return sectionCache.setError(payload);\r\n },\r\n [clearOCRSectionImageWithIdsFromCache]: (sectionCache, { payload }) => {\r\n return sectionCache.clearSectionOCRContentFromMap(payload);\r\n },\r\n },\r\n new SectionCacheOCR(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n leftSectionIdListStatementContentLoading,\r\n leftSectionIdListStatementContentLoaded,\r\n leftSectionIdListStatementContentError,\r\n clearLeftOCRSectionContentWithIdsFromCache,\r\n clearLeftStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n leftSectionOCRDataSegmentsStatementContentLoaded,\r\n leftSectionOCRDataSegmentsStatementContentError,\r\n} from 'store/actions/statement-content-actions-ocr';\r\nimport { LeftSectionCacheOCR } from 'models/api/left-sections-cache-model-ocr-data';\r\nexport default handleActions(\r\n {\r\n [leftSectionIdListStatementContentLoading]: (leftSectionCache) => {\r\n return leftSectionCache.setLoading();\r\n },\r\n [leftSectionIdListStatementContentLoaded]: (\r\n leftSectionCache,\r\n { payload },\r\n ) => {\r\n return leftSectionCache.setLoaded(payload);\r\n },\r\n [leftSectionIdListStatementContentError]: (\r\n leftSectionCache,\r\n { payload },\r\n ) => {\r\n return leftSectionCache.setError(payload);\r\n },\r\n [leftSectionOCRDataSegmentsStatementContentLoaded]: (\r\n leftSectionCache,\r\n { payload },\r\n ) => {\r\n return leftSectionCache.mergeOCRSectionDataLoaded(payload);\r\n },\r\n [leftSectionOCRDataSegmentsStatementContentError]: (\r\n leftSectionCache,\r\n { payload },\r\n ) => {\r\n return leftSectionCache.setError(payload);\r\n },\r\n [clearLeftOCRSectionContentWithIdsFromCache]: (\r\n leftSectionCache,\r\n { payload },\r\n ) => {\r\n return leftSectionCache.clearLeftSectionOCRContentFromMap(payload);\r\n },\r\n [clearLeftStatementPageStoreAction]: () => {\r\n return new LeftSectionCacheOCR();\r\n },\r\n },\r\n new LeftSectionCacheOCR(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport BlacklineCache from 'models/data/blackline-cache-model';\r\nimport {\r\n currentBlacklineViewChangesLoading,\r\n currentBlacklineViewChangesLoaded,\r\n currentBlacklineViewChangesError,\r\n clearCurrentBlacklineContentWithIdsFromCache,\r\n resetCurrentBlacklineCache,\r\n} from '../../../actions/blackline-view-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [currentBlacklineViewChangesLoading]: (\r\n currentBlacklineCache,\r\n { payload },\r\n ) => {\r\n return currentBlacklineCache.setSectionLoading(payload);\r\n },\r\n [currentBlacklineViewChangesLoaded]: (\r\n currentBlacklineCache,\r\n { payload },\r\n ) => {\r\n return currentBlacklineCache.setSectionLoaded(payload);\r\n },\r\n [currentBlacklineViewChangesError]: (\r\n currentBlacklineCache,\r\n { payload },\r\n ) => {\r\n return currentBlacklineCache.setSectionError(payload);\r\n },\r\n [resetCurrentBlacklineCache]: () => {\r\n return new BlacklineCache();\r\n },\r\n [clearCurrentBlacklineContentWithIdsFromCache]: (\r\n currentBlacklineCache,\r\n { payload },\r\n ) => {\r\n return currentBlacklineCache.clearSectionBySectionIds(payload);\r\n },\r\n },\r\n new BlacklineCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport LeftBlacklineCache from 'models/data/blackline-cache-model';\r\nimport {\r\n previousBlacklineViewChangesLoading,\r\n previousBlacklineViewChangesLoaded,\r\n previousBlacklineViewChangesError,\r\n clearPreviousBlacklineContentWithIdsFromCache,\r\n resetPreviousBlacklineCache,\r\n} from '../../../actions/blackline-view-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [previousBlacklineViewChangesLoading]: (\r\n leftBlacklineCache,\r\n { payload },\r\n ) => {\r\n return leftBlacklineCache.setSectionLoading(payload);\r\n },\r\n [previousBlacklineViewChangesLoaded]: (leftBlacklineCache, { payload }) => {\r\n return leftBlacklineCache.setSectionLoaded(payload);\r\n },\r\n [previousBlacklineViewChangesError]: (leftBlacklineCache, { payload }) => {\r\n return leftBlacklineCache.setSectionError(payload);\r\n },\r\n [resetPreviousBlacklineCache]: () => {\r\n return new LeftBlacklineCache();\r\n },\r\n [clearPreviousBlacklineContentWithIdsFromCache]: (\r\n leftBlacklineCache,\r\n { payload },\r\n ) => {\r\n return leftBlacklineCache.clearSectionBySectionIds(payload);\r\n },\r\n },\r\n new LeftBlacklineCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport OCRNavigationModel from 'models/api/ocr-navigation-api-model';\r\nimport {\r\n navigationDataLoading,\r\n navigationDataLoaded,\r\n navigationDataError,\r\n} from 'store/actions/ocr-navigation-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [navigationDataLoading]: (ocrnavigation) => {\r\n return ocrnavigation.setLoading();\r\n },\r\n [navigationDataLoaded]: (ocrnavigation, { payload }) => {\r\n return ocrnavigation.setLoaded(payload);\r\n },\r\n [navigationDataError]: (ocrnavigation, { payload }) => {\r\n return ocrnavigation.setError(payload);\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new OCRNavigationModel();\r\n },\r\n },\r\n new OCRNavigationModel(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport OCRNavigationModel from 'models/api/ocr-navigation-api-model';\r\nimport {\r\n clearLeftStatementContent,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n leftNavigationDataError,\r\n leftNavigationDataLoaded,\r\n leftNavigationDataLoading,\r\n} from 'store/actions/ocr-navigation-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [leftNavigationDataLoading]: (ocrnavigation) => {\r\n return ocrnavigation.setLoading();\r\n },\r\n [leftNavigationDataLoaded]: (ocrnavigation, { payload }) => {\r\n return ocrnavigation.setLoaded(payload);\r\n },\r\n [leftNavigationDataError]: (ocrnavigation, { payload }) => {\r\n return ocrnavigation.setError(payload);\r\n },\r\n [clearLeftStatementContent]: () => {\r\n return new OCRNavigationModel();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new OCRNavigationModel();\r\n },\r\n },\r\n new OCRNavigationModel(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n/**\r\n * Map of sectionIds that are currently within the viewport threshold\r\n * {\r\n * [sectionId]: true,\r\n * ...\r\n * }\r\n * Essentially an implementation of a Set, keys are removed from the map when they are no longer in view\r\n */\r\nclass SectionInViewMap extends BaseModel({}) {\r\n get sectionIds() {\r\n return Object.keys(this);\r\n }\r\n has(sectionId) {\r\n return !isNullOrUndefined(this[sectionId]) && this[sectionId]; // map to booleans, guards against saving a `false`\r\n }\r\n\r\n get(sectionId) {\r\n return this[sectionId];\r\n }\r\n\r\n /**\r\n * Reducer function for adding a section to the map\r\n * @param {int} param.sectionId\r\n */\r\n setSectionInView({ sectionId }) {\r\n return this.merge({\r\n [sectionId]: true,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for removing a section from the map\r\n * @param {int} param.sectionId\r\n */\r\n clearSectionInView({ sectionId }) {\r\n const newSet = { ...this };\r\n delete newSet[sectionId];\r\n // calling this.merge would not actually remove the existing key so we need a new instance\r\n return new SectionInViewMap(newSet);\r\n }\r\n\r\n /**\r\n * Reducer function for clearing the whole map\r\n */\r\n clearMap() {\r\n return new SectionInViewMap();\r\n }\r\n}\r\n\r\nexport default SectionInViewMap;\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setSectionInViewStatementContent,\r\n clearSectionInViewStatementContent,\r\n} from 'store/actions/statement-content-actions';\r\nimport SectionInViewMap from 'models/data/section-in-view-map-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setSectionInViewStatementContent]: (map, { payload }) => {\r\n return map.setSectionInView(payload);\r\n },\r\n [clearSectionInViewStatementContent]: (map, { payload }) => {\r\n return map.clearSectionInView(payload);\r\n },\r\n },\r\n new SectionInViewMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport SectionInViewMap from 'models/data/section-in-view-map-model';\r\nimport {\r\n setLeftSectionInViewStatementContent,\r\n clearLeftSectionInViewStatementContent,\r\n} from 'store/actions/left-statement-section-content-actions';\r\nexport default handleActions(\r\n {\r\n [setLeftSectionInViewStatementContent]: (map, { payload }) => {\r\n return map.setSectionInView(payload);\r\n },\r\n [clearLeftSectionInViewStatementContent]: (map, { payload }) => {\r\n return map.clearSectionInView(payload);\r\n },\r\n },\r\n new SectionInViewMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n periodListStatementContentLoading,\r\n periodListStatementContentLoaded,\r\n periodListStatementContentError,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport { PeriodList } from 'models/api/period-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [periodListStatementContentLoading]: (periodList) => {\r\n return periodList.setLoading();\r\n },\r\n [periodListStatementContentLoaded]: (periodList, { payload }) => {\r\n return periodList.setLoaded(payload);\r\n },\r\n [periodListStatementContentError]: (periodList, { payload }) => {\r\n return periodList.setError(payload);\r\n },\r\n [clearStatementPageStoreAction]: (periodList, { payload }) => {\r\n return new PeriodList();\r\n },\r\n },\r\n new PeriodList()\r\n);\r\n","import BaseModel from 'models/base-model';\r\n\r\n/**\r\n * Values object for the SectionCacheTracker.viewedSectionMetricsMap\r\n * Indicate the section size and timestamp from when it was last viewed\r\n * @param {int} sectionMemorySize Sections Memory size in bytes\r\n * @param {Date} timestamp Timestamp of when this section has most recently been viewed\r\n */\r\nclass SectionCacheMetrics extends BaseModel({\r\n sectionMemorySize: 0,\r\n timestamp: null,\r\n}) {\r\n constructor(props) {\r\n super(props);\r\n if (props) {\r\n const { sectionMemorySize, timestamp } = props;\r\n this.sectionMemorySize = sectionMemorySize ? sectionMemorySize : 0;\r\n this.timestamp = timestamp ? timestamp : Date.now();\r\n } else {\r\n this.sectionMemorySize = 0;\r\n this.timestamp = Date.now();\r\n }\r\n }\r\n setMemorySize(sectionMemorySize) {\r\n return this.merge({\r\n sectionMemorySize,\r\n });\r\n }\r\n\r\n setTimestamp() {\r\n return this.merge({\r\n timestamp: Date.now(),\r\n });\r\n }\r\n}\r\n\r\nexport default SectionCacheMetrics;\r\n","import BaseModel from 'models/base-model';\r\nimport SectionCacheMetrics from 'models/data/section-cache-metrics-model';\r\n\r\nconst CACHE_SIZE_THRESHOLD = 500000; // ~500MB\r\n/**\r\n * A tracker object for evaluating the cache and ensuring it stays below a reasonable memory threshold\r\n * @param {int} param.revisionId revision id this cache tracker is valid for\r\n * @param {int} param.totalCacheMemorySize total memory size of items in cache\r\n * @param {int[]} param.viewedSectionQueue queue of sections that are present in the cache in the order they've been viewed\r\n * @param {object} param.viewedSectionMetricsMap map of SectionCacheMetrics by sectionId for any section present in the cache\r\n */\r\nclass SectionCacheTracker extends BaseModel({\r\n revisionId: null,\r\n totalCacheMemorySize: 0,\r\n viewedSectionQueue: [],\r\n viewedSectionMetricsMap: {}, // { [sectionId]: SectionCacheMetric, ...}\r\n}) {\r\n /**\r\n * Reducer function for initializing the cache\r\n * @param {int} param.revisionId\r\n */\r\n init({ revisionId }) {\r\n return this.merge({\r\n revisionId,\r\n viewedSectionQueue: [],\r\n viewedSectionMetricsMap: {},\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for initializing a section in the cache with it's tracking metrics\r\n * @param {int} param.revisionId\r\n * @param {int} param.sectionMemorySize\r\n */\r\n initSection({ sectionId, sectionMemorySize }) {\r\n const viewedSectionQueue = this._getUpdatedQueue({ sectionId });\r\n const viewedSectionMetricsMap = this._getMergedMap({\r\n [sectionId]: new SectionCacheMetrics({ sectionId, sectionMemorySize }),\r\n });\r\n return this.merge({\r\n viewedSectionMetricsMap,\r\n viewedSectionQueue,\r\n totalCacheMemorySize: this.totalCacheMemorySize + sectionMemorySize,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for updating all values in cache tracker\r\n * @param {int[]} param.viewedSectionQueue new queue\r\n * @param {object} param.viewedSectionMetricsMap new map\r\n * @param {int} param.totalCacheMemorySize new total size\r\n */\r\n updateCache({\r\n viewedSectionQueue,\r\n viewedSectionMetricsMap,\r\n totalCacheMemorySize,\r\n }) {\r\n return this.merge({\r\n viewedSectionQueue,\r\n viewedSectionMetricsMap,\r\n totalCacheMemorySize,\r\n });\r\n }\r\n\r\n /**\r\n * Returns a queue with the given section id as the most recently viewed (e.g. back of the queue)\r\n * if the section already had a value in the queue, that old value is sliced out\r\n * @param {int} param.sectionId\r\n */\r\n _getUpdatedQueue({ sectionId }) {\r\n const sectionExists = this.get(sectionId);\r\n let newViewedSectionQueue = this.viewedSectionQueue;\r\n if (sectionExists) {\r\n for (let index = 0; index < this.viewedSectionQueue.length; index++) {\r\n // find current section index, remove it, and put it at the back of queue\r\n if (this.viewedSectionQueue[index] === sectionId) {\r\n newViewedSectionQueue = [\r\n ...this.viewedSectionQueue.slice(0, index),\r\n ...this.viewedSectionQueue.slice(index + 1),\r\n sectionId,\r\n ];\r\n break;\r\n }\r\n }\r\n } else {\r\n // section doesn't exist in queue, add to back\r\n newViewedSectionQueue = [...this.viewedSectionQueue, sectionId];\r\n }\r\n return newViewedSectionQueue;\r\n }\r\n\r\n /**\r\n * Private convenience method for merging the map portion of the model in a reducer\r\n * @param {object} values [sectionIds] : SectionCacheMetrics models\r\n */\r\n _getMergedMap(values) {\r\n return {\r\n ...this.viewedSectionMetricsMap,\r\n ...values,\r\n };\r\n }\r\n\r\n /**\r\n * Returns the SectionCacheMetrics model for provided sectionId\r\n * @param {int} sectionId\r\n */\r\n get(sectionId) {\r\n return this.viewedSectionMetricsMap[sectionId];\r\n }\r\n\r\n /**\r\n * Reducer function for indicating an existing section has just been viewed\r\n * updates the queue and map\r\n * @param {int} sectionId\r\n */\r\n setSectionTimestamp(sectionId) {\r\n const viewedSectionQueue = this._getUpdatedQueue({ sectionId });\r\n const existingSection = this.get(sectionId);\r\n const viewedSectionMetricsMap = this._getMergedMap({\r\n [sectionId]: existingSection\r\n ? existingSection.setTimestamp()\r\n : new SectionCacheMetrics(),\r\n });\r\n return this.merge({\r\n viewedSectionMetricsMap,\r\n viewedSectionQueue,\r\n });\r\n }\r\n\r\n /**\r\n * Handles determining which sections should be purged from cache and returns\r\n * updated values for the queue, map, memory size and array of ids that were removed\r\n * @param {SectionInViewMap} param.sectionsInView SectionInViewMap from current redux store\r\n */\r\n getPurgedCache({ sectionsInView }) {\r\n let newViewedSectionQueue = [];\r\n let newViewedSectionMetricsMap = {};\r\n let removedSectionIds = [];\r\n let reducedTotalSize = this.totalCacheMemorySize;\r\n let cacheStillTooLarge = true;\r\n\r\n for (let index = 0; index < this.viewedSectionQueue.length; index++) {\r\n const sectionId = this.viewedSectionQueue[index];\r\n\r\n const _sectionCurrentlyInView = sectionsInView.has(sectionId);\r\n\r\n if (cacheStillTooLarge && !_sectionCurrentlyInView) {\r\n // remove section from cache if we need to and caclulate new size\r\n reducedTotalSize =\r\n reducedTotalSize - this.get(sectionId).sectionMemorySize;\r\n removedSectionIds.push(sectionId);\r\n if (this.wouldCacheBeUnderThreshold(reducedTotalSize)) {\r\n // indicate if cache would now be below threshold\r\n cacheStillTooLarge = false;\r\n }\r\n } else {\r\n // otherwise keep section in queue and map\r\n newViewedSectionQueue.push(sectionId);\r\n newViewedSectionMetricsMap[sectionId] = this.get(sectionId);\r\n }\r\n }\r\n return {\r\n newViewedSectionMetricsMap,\r\n newViewedSectionQueue,\r\n reducedTotalSize,\r\n removedSectionIds,\r\n };\r\n }\r\n\r\n /**\r\n * indicates if cache is currently over it's memory threshold\r\n */\r\n cacheOverThreshold() {\r\n return this.totalCacheMemorySize > CACHE_SIZE_THRESHOLD;\r\n }\r\n\r\n /**\r\n * indicates if a new total size would be under the cache size threshold\r\n */\r\n wouldCacheBeUnderThreshold(newSize) {\r\n return newSize < CACHE_SIZE_THRESHOLD;\r\n }\r\n}\r\n\r\nexport default SectionCacheTracker;\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n createSectionCacheTracker,\r\n updateSectionViewedTimestamp,\r\n addSectionToCache,\r\n updatePurgedCacheTracker,\r\n} from 'store/actions/section-cache-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport SectionCacheTracker from 'models/data/section-cache-tracker-model';\r\n\r\nexport default handleActions(\r\n {\r\n [createSectionCacheTracker]: (tracker, { payload }) => {\r\n return tracker.init(payload);\r\n },\r\n [updateSectionViewedTimestamp]: (tracker, { payload: { sectionId } }) => {\r\n return tracker.setSectionTimestamp(sectionId);\r\n },\r\n [addSectionToCache]: (tracker, { payload }) => {\r\n return tracker.initSection(payload);\r\n },\r\n [updatePurgedCacheTracker]: (tracker, { payload }) => {\r\n return tracker.updateCache(payload);\r\n },\r\n [clearStatementPageStoreAction]: (tracker, { payload }) => {\r\n return new SectionCacheTracker();\r\n },\r\n },\r\n new SectionCacheTracker(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n createLeftSectionCacheTracker,\r\n addLeftSectionToCache,\r\n} from 'store/actions/section-cache-actions';\r\nimport {\r\n clearStatementPageStoreAction,\r\n clearLeftStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n updateLeftPurgedCacheTracker,\r\n updateLeftSectionViewedTimestamp,\r\n} from 'store/actions/left-statement-section-content-actions';\r\nimport SectionCacheTracker from 'models/data/section-cache-tracker-model';\r\n\r\nexport default handleActions(\r\n {\r\n [createLeftSectionCacheTracker]: (tracker, { payload }) => {\r\n return tracker.init(payload);\r\n },\r\n [updateLeftSectionViewedTimestamp]: (\r\n tracker,\r\n { payload: { sectionId } },\r\n ) => {\r\n return tracker.setSectionTimestamp(sectionId);\r\n },\r\n [addLeftSectionToCache]: (tracker, { payload }) => {\r\n return tracker.initSection(payload);\r\n },\r\n [updateLeftPurgedCacheTracker]: (tracker, { payload }) => {\r\n return tracker.updateCache(payload);\r\n },\r\n [clearStatementPageStoreAction]: (tracker, { payload }) => {\r\n return new SectionCacheTracker();\r\n },\r\n [clearLeftStatementPageStoreAction]: (tracker, { payload }) => {\r\n return new SectionCacheTracker();\r\n },\r\n },\r\n new SectionCacheTracker(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport Zoom from 'models/data/zoom-model';\r\n\r\nimport {\r\n incrementZoom,\r\n decrementZoom,\r\n resetZoom,\r\n} from 'store/actions/zoom-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [incrementZoom]: (zoom) => {\r\n return zoom.incrementZoom();\r\n },\r\n [decrementZoom]: (zoom) => {\r\n return zoom.decrementZoom();\r\n },\r\n [resetZoom]: () => {\r\n return new Zoom();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new Zoom();\r\n },\r\n },\r\n new Zoom()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport SideBySideViewZoom from 'models/data/side-by-side-view-zoom-model';\r\n\r\nimport {\r\n leftIncrementZoom,\r\n leftDecrementZoom,\r\n leftResetZoom,\r\n} from 'store/actions/zoom-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [leftIncrementZoom]: (zoom) => {\r\n return zoom.incrementZoom();\r\n },\r\n [leftDecrementZoom]: (zoom) => {\r\n return zoom.decrementZoom();\r\n },\r\n [leftResetZoom]: () => {\r\n return new SideBySideViewZoom();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new SideBySideViewZoom();\r\n },\r\n },\r\n new SideBySideViewZoom(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport SideBySideViewZoom from 'models/data/side-by-side-view-zoom-model';\r\n\r\nimport {\r\n rightIncrementZoom,\r\n rightDecrementZoom,\r\n rightResetZoom,\r\n} from 'store/actions/zoom-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [rightIncrementZoom]: (zoom) => {\r\n return zoom.incrementZoom();\r\n },\r\n [rightDecrementZoom]: (zoom) => {\r\n return zoom.decrementZoom();\r\n },\r\n [rightResetZoom]: () => {\r\n return new SideBySideViewZoom();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new SideBySideViewZoom();\r\n },\r\n },\r\n new SideBySideViewZoom(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\nimport {\r\n STATEMENT_LIST_TABS,\r\n STATEMENT_LIST_SORT_COLUMN_KEYS,\r\n} from 'constants/feature/statement-list-constants';\r\nimport { DataGridSort } from 'components/common/data-grid/data-grid-component';\r\n\r\nexport default class StatementListFilters extends BaseModel({\r\n // For unit testing we need to set this to null for enzyme runs, it should never be null when actually rendered.\r\n selectedTab: STATEMENT_LIST_TABS ? STATEMENT_LIST_TABS.ACTIVE : null,\r\n sort: new DataGridSort({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS\r\n ? STATEMENT_LIST_SORT_COLUMN_KEYS.lastModifiedDate\r\n : null,\r\n }),\r\n}) {\r\n setSelectedTab(selectedTab) {\r\n return this.merge({\r\n selectedTab: selectedTab,\r\n });\r\n }\r\n\r\n /**\r\n *\r\n * @param {DataGridColumn || DataGridSort} sortColumn object with a key representing the api key to sort by with optional order property\r\n */\r\n setSort(sortColumn) {\r\n return this.merge({\r\n sort: this.sort.setSort(sortColumn),\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setCurrentStatementListTab,\r\n setStatementListSort,\r\n initStatementListFilters,\r\n} from 'store/actions/statement-list/statement-list-filters-actions';\r\nimport StatementListFilters from 'models/data/statement-list-filters-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setCurrentStatementListTab]: (statementListFilters, { payload }) => {\r\n return statementListFilters.setSelectedTab(payload);\r\n },\r\n [setStatementListSort]: (statementListFilters, { payload }) => {\r\n return statementListFilters.setSort(payload);\r\n },\r\n [initStatementListFilters]: (statementListFilters) => {\r\n return new StatementListFilters();\r\n },\r\n },\r\n new StatementListFilters(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class AdminModuleTabModel extends BaseModel({\r\n selectedTab: null,\r\n}) {\r\n setSelectedTab(selectedTab) {\r\n return this.merge({\r\n selectedTab: selectedTab,\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport { setCurrentAdminModuleTab } from 'store/actions/admin-module-actions';\r\nimport AdminModuleTabModel from 'models/data/admin-module-tab-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setCurrentAdminModuleTab]: (adminModuleCurrentTab, { payload }) => {\r\n return adminModuleCurrentTab.setSelectedTab(payload);\r\n },\r\n },\r\n new AdminModuleTabModel(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport StatementForm from 'models/form/statement-form-model';\r\nimport {\r\n setUploadedFilesAddRevision,\r\n setUploadedFilesAddRevisionError,\r\n clearAddRevision,\r\n addRevisionLoading,\r\n addRevisionLoaded,\r\n addRevisionError,\r\n} from 'store/actions/statement-list/statement-list-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [addRevisionLoading]: (statement, { payload }) => {\r\n return statement.setLoading(payload);\r\n },\r\n [addRevisionLoaded]: (statement, { payload }) => {\r\n return statement.setLoaded(payload);\r\n },\r\n [addRevisionError]: (statement, { payload }) => {\r\n return statement.setError(payload);\r\n },\r\n [setUploadedFilesAddRevision]: (statement, { payload }) => {\r\n return statement.setFile(payload);\r\n },\r\n [setUploadedFilesAddRevisionError]: (state, { payload }) => {\r\n return state.setFileError(payload);\r\n },\r\n [clearAddRevision]: () => {\r\n return new StatementForm();\r\n },\r\n },\r\n new StatementForm()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n revisionLoading,\r\n revisionLoaded,\r\n revisionError,\r\n clearStatementPageRevisionStoreAction,\r\n} from 'store/actions/revision-actions';\r\n\r\nimport Revision from 'models/api/revision-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [revisionLoading]: (revision) => {\r\n return revision.setLoading();\r\n },\r\n [revisionError]: (revision, { payload }) => {\r\n return revision.setError(payload);\r\n },\r\n [revisionLoaded]: (revision, { payload }) => {\r\n return revision.setLoaded(payload);\r\n },\r\n [clearStatementPageRevisionStoreAction]: (revision, { payload }) => {\r\n return new Revision();\r\n },\r\n },\r\n new Revision(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n leftRevisionLoading,\r\n leftRevisionLoaded,\r\n leftRevisionError,\r\n} from 'store/actions/left-revision-actions';\r\nimport {\r\n clearStatementPageStoreAction,\r\n clearLeftStatementPageStoreAction,\r\n clearLeftStatementContent,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nimport Revision from 'models/api/revision-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [leftRevisionLoading]: (revision) => {\r\n return revision.setLoading();\r\n },\r\n [leftRevisionError]: (revision, { payload }) => {\r\n return revision.setError(payload);\r\n },\r\n [leftRevisionLoaded]: (revision, { payload }) => {\r\n return revision.setLoaded(payload);\r\n },\r\n [clearLeftStatementContent]: () => {\r\n return new Revision();\r\n },\r\n [clearStatementPageStoreAction]: (revision, { payload }) => {\r\n return new Revision();\r\n },\r\n [clearLeftStatementPageStoreAction]: (revision, { payload }) => {\r\n return new Revision();\r\n },\r\n },\r\n new Revision(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setStatementContentTab,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport StatementContentFilters from 'models/data/statement-content-filters-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setStatementContentTab]: (state, { payload }) => {\r\n return state.setSelectedTab(payload);\r\n },\r\n [clearStatementPageStoreAction]: (state, { payload }) => {\r\n return new StatementContentFilters();\r\n },\r\n },\r\n new StatementContentFilters()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setContentHighlightSelector,\r\n clearContentHighlightSelector,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport ContentCSSSelector from 'models/data/content-css-selector-model';\r\nexport default handleActions(\r\n {\r\n [setContentHighlightSelector]: (selector, { payload }) => {\r\n return new ContentCSSSelector(payload);\r\n },\r\n [clearContentHighlightSelector]: () => {\r\n return new ContentCSSSelector();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new ContentCSSSelector();\r\n },\r\n },\r\n new ContentCSSSelector()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n elementDetailsLoading,\r\n elementDetailsLoaded,\r\n elementDetailsError,\r\n updateElementVerify,\r\n updateElementReview,\r\n updateElementUserFlag,\r\n updateElementOverrideSystemFlag,\r\n updateElementComfortAssignAnnotation,\r\n updateElementUnits,\r\n updateElementScaling,\r\n updateElementEntity,\r\n updateElementPeriod,\r\n updateElementSectionName,\r\n updateElementPanelFromSocketPayload,\r\n} from 'store/actions/element-panel-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [elementDetailsLoading]: (elementDetails, { payload }) => {\r\n return elementDetails.setLoading(payload);\r\n },\r\n [elementDetailsLoaded]: (elementDetails, { payload }) => {\r\n return elementDetails.setLoaded(payload);\r\n },\r\n [elementDetailsError]: (elementDetails, { payload }) => {\r\n return elementDetails.setError(payload);\r\n },\r\n [updateElementVerify]: (elementDetails, { payload }) => {\r\n return elementDetails.setVerify(payload);\r\n },\r\n [updateElementReview]: (elementDetails, { payload }) => {\r\n return elementDetails.setReview(payload);\r\n },\r\n [updateElementUserFlag]: (elementDetails, { payload }) => {\r\n return elementDetails.setUserFlag(payload);\r\n },\r\n [updateElementOverrideSystemFlag]: (elementDetails, { payload }) => {\r\n return elementDetails.setOverrideSystemFlag(payload);\r\n },\r\n [updateElementComfortAssignAnnotation]: (elementDetails, { payload }) => {\r\n return elementDetails.setComfortAssign(payload);\r\n },\r\n [updateElementUnits]: (elementDetails, { payload }) => {\r\n return elementDetails.setUnit(payload);\r\n },\r\n [updateElementScaling]: (elementDetails, { payload }) => {\r\n return elementDetails.setScaling(payload);\r\n },\r\n [updateElementEntity]: (elementDetails, { payload }) => {\r\n return elementDetails.setEntity(payload);\r\n },\r\n [updateElementPeriod]: (elementDetails, { payload }) => {\r\n return elementDetails.setPeriod(payload);\r\n },\r\n [updateElementSectionName]: (elementDetails, { payload }) => {\r\n return elementDetails.setSectionName(payload);\r\n },\r\n [updateElementPanelFromSocketPayload]: (elementDetails, { payload }) => {\r\n return elementDetails.updateElementDetailsFromSocket(payload);\r\n },\r\n [clearStatementPageStoreAction]: (elementDetails, { payload }) => {\r\n return new ElementDetails();\r\n },\r\n },\r\n new ElementDetails(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport ElementCache from 'models/data/element-cache-model';\r\nimport {\r\n sectionElementsLoading,\r\n sectionElementsLoaded,\r\n sectionElementsError,\r\n clearSectionContentWithIdsFromCache,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n updateMultipleElementsInCacheAction,\r\n updateElementInCacheAction,\r\n updateElementCacheFromSocketPayloadAction,\r\n updateElementCacheByCalloutAction,\r\n} from 'store/actions/element-cache-actions';\r\n\r\nimport { elementDetailsLoaded } from 'store/actions/element-panel-actions';\r\nexport default handleActions(\r\n {\r\n [sectionElementsLoading]: (elementCache, { payload }) => {\r\n return elementCache.setSectionLoading(payload);\r\n },\r\n [sectionElementsLoaded]: (elementCache, { payload }) => {\r\n return elementCache.setSectionLoaded(payload);\r\n },\r\n [sectionElementsError]: (elementCache, { payload }) => {\r\n return elementCache.setSectionError(payload);\r\n },\r\n [clearSectionContentWithIdsFromCache]: (elementCache, { payload }) => {\r\n return elementCache.clearSections(payload);\r\n },\r\n [updateElementInCacheAction]: (elementCache, { payload }) => {\r\n const { element } = payload;\r\n return elementCache.updateElement({\r\n element,\r\n sectionId: element.sectionId,\r\n });\r\n },\r\n [updateElementCacheFromSocketPayloadAction]: (\r\n elementCache,\r\n { payload },\r\n ) => {\r\n const elements = payload;\r\n return elementCache.updateMultipleElements({ elements });\r\n },\r\n [updateMultipleElementsInCacheAction]: (elementCache, { payload }) => {\r\n const { elements } = payload;\r\n return elementCache.updateMultipleElements({\r\n elements,\r\n });\r\n },\r\n /** External listeners */\r\n [clearStatementPageStoreAction]: (elementCache, { payload }) => {\r\n return new ElementCache();\r\n },\r\n [elementDetailsLoaded]: (elementCache, { payload }) => {\r\n const { response } = payload;\r\n const {\r\n data: {\r\n result: { id, sectionId },\r\n },\r\n } = response;\r\n return elementCache.setElementFromElementDetailsLoaded({\r\n response,\r\n elementId: id,\r\n sectionId,\r\n });\r\n },\r\n [updateElementCacheByCalloutAction]: (elementCache, { payload }) => {\r\n return elementCache.updateElementCallout({ payload });\r\n },\r\n },\r\n new ElementCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport ElementCache from 'models/data/element-cache-model';\r\nimport {\r\n leftSectionElementsLoading,\r\n leftSectionElementsLoaded,\r\n leftSectionElementsError,\r\n clearStatementPageStoreAction,\r\n clearLeftStatementContent,\r\n clearLeftStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport { clearLeftSectionContentWithIdsFromCache } from 'store/actions/left-statement-section-content-actions';\r\nimport { updateLeftElementCacheByCalloutAction } from 'store/actions/element-cache-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [leftSectionElementsLoading]: (elementCache, { payload }) => {\r\n return elementCache.setSectionLoading(payload);\r\n },\r\n [leftSectionElementsLoaded]: (elementCache, { payload }) => {\r\n return elementCache.setSectionLoaded(payload);\r\n },\r\n [leftSectionElementsError]: (elementCache, { payload }) => {\r\n return elementCache.setSectionError(payload);\r\n },\r\n [updateLeftElementCacheByCalloutAction]: (elementCache, { payload }) => {\r\n return elementCache.updateElementCallout({ payload });\r\n },\r\n [clearLeftSectionContentWithIdsFromCache]: (elementCache, { payload }) => {\r\n return elementCache.clearSections(payload);\r\n },\r\n [clearLeftStatementContent]: (elementCache, { payload }) => {\r\n return new ElementCache();\r\n },\r\n /** External listeners */\r\n [clearStatementPageStoreAction]: (elementCache, { payload }) => {\r\n return new ElementCache();\r\n },\r\n [clearLeftStatementPageStoreAction]: (elementCache, { payload }) => {\r\n return new ElementCache();\r\n },\r\n [updateLeftElementCacheByCalloutAction]: (elementCache, { payload }) => {\r\n return elementCache.updateElementCallout({ payload });\r\n },\r\n },\r\n new ElementCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n entityListStatementContentLoading,\r\n entityListStatementContentLoaded,\r\n entityListStatementContentError,\r\n} from 'store/actions/statement-content-actions';\r\nimport { EntityList } from 'models/api/entity-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [entityListStatementContentLoading]: (entityList) => {\r\n return entityList.setLoading();\r\n },\r\n [entityListStatementContentLoaded]: (entityList, { payload }) => {\r\n return entityList.setLoaded(payload);\r\n },\r\n [entityListStatementContentError]: (entityList, { payload }) => {\r\n return entityList.setError(payload);\r\n },\r\n },\r\n new EntityList()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n selectElementContentPanel,\r\n deselectElementContentPanel,\r\n clearSelectedElementsContentPanel,\r\n selectMultipleElementsContentPanel,\r\n replaceSelectedElementsContentPanel,\r\n clearStatementPageStoreAction,\r\n deallocateSelectedElementsContentPanel,\r\n deselectElementsFromArrayContentPanel,\r\n replaceSelectedElementWithoutRemovingOld,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n removeElementFromBatchSelectionAction,\r\n addElementToBatchSelectionAction,\r\n batchElementUpdateSuccessAction,\r\n} from 'store/actions/batch-panel-actions';\r\nimport { selectCreatedElementAction } from 'store/actions/element-panel-actions';\r\n\r\nimport SelectedElementMap from 'models/data/selected-element-map';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\n\r\nexport default handleActions(\r\n {\r\n [selectElementContentPanel]: (selectedElementMap, { payload }) => {\r\n const elementId = payload.elementIds ? payload.elementIds[0] : null;\r\n const color = payload.color ? payload.color : null;\r\n return selectedElementMap.appendSelectedElement({ elementId, color });\r\n },\r\n\r\n [deselectElementContentPanel]: (selectedElementMap, { payload }) => {\r\n return selectedElementMap.deselectElement(payload);\r\n },\r\n [deselectElementsFromArrayContentPanel]: (\r\n selectedElementMap,\r\n { payload },\r\n ) => {\r\n return selectedElementMap.deselectElementsFromArray(payload);\r\n },\r\n [clearSelectedElementsContentPanel]: (selectedElementMap) => {\r\n return selectedElementMap.clearMap();\r\n },\r\n [selectMultipleElementsContentPanel]: (selectedElementMap, { payload }) => {\r\n return selectedElementMap.appendSelectedElements(payload);\r\n },\r\n [deallocateSelectedElementsContentPanel]: (\r\n selectedElementMap,\r\n { payload },\r\n ) => {\r\n return selectedElementMap.deallocateElement(payload);\r\n },\r\n [replaceSelectedElementsContentPanel]: (\r\n selectedElementMap,\r\n { payload },\r\n ) => {\r\n return selectedElementMap.replaceWithElements(payload);\r\n },\r\n [replaceSelectedElementWithoutRemovingOld]: (\r\n selectedElementMap,\r\n { payload },\r\n ) => {\r\n return selectedElementMap.replaceWithoutRemovingOld(payload);\r\n },\r\n /* Non selected map specific action reducers */\r\n // highlights elements when added to batch selection\r\n [addElementToBatchSelectionAction]: (\r\n selectedElementMap,\r\n { payload: { element } },\r\n ) => {\r\n return selectedElementMap.appendSelectedElement({\r\n elementId: element.id,\r\n });\r\n },\r\n // removes highlight from elements removed from batch selection\r\n [removeElementFromBatchSelectionAction]: (\r\n selectedElementMap,\r\n { payload: { elementId } },\r\n ) => {\r\n return selectedElementMap.removeElement({ elementId });\r\n },\r\n [batchElementUpdateSuccessAction]: (\r\n selectedElementMap,\r\n { payload: { elementIds } },\r\n ) => {\r\n return selectedElementMap.replaceWithElements({\r\n elementIds,\r\n color: ELEMENT_HIGHLIGHT_STATES.POST_BATCH,\r\n });\r\n },\r\n [selectCreatedElementAction]: (\r\n selectedElementMap,\r\n { payload: { elementIds } },\r\n ) => {\r\n return selectedElementMap.replaceWithElements({\r\n elementIds,\r\n color: ELEMENT_HIGHLIGHT_STATES.POST_BATCH,\r\n });\r\n },\r\n [clearStatementPageStoreAction]: (selectedElementMap, { payload }) => {\r\n return new SelectedElementMap();\r\n },\r\n },\r\n new SelectedElementMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n clearStatementPageStoreAction,\r\n clearLeftStatementPageStoreAction,\r\n replaceLeftSelectedElementWithoutRemovingOld,\r\n clearLeftSelectedElementsContentPanel,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nimport SelectedElementMap from 'models/data/selected-element-map';\r\n\r\nexport default handleActions(\r\n {\r\n [replaceLeftSelectedElementWithoutRemovingOld]: (\r\n selectedElementMap,\r\n { payload },\r\n ) => {\r\n return selectedElementMap.replaceWithoutRemovingOld(payload);\r\n },\r\n [clearLeftSelectedElementsContentPanel]: (selectedElementMap) => {\r\n return selectedElementMap.clearMap();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new SelectedElementMap();\r\n },\r\n [clearLeftStatementPageStoreAction]: () => {\r\n return new SelectedElementMap();\r\n },\r\n },\r\n new SelectedElementMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setHighlightedElementIdContentPanel } from 'store/actions/statement-content-actions';\r\nimport {\r\n toggleBlacklineViewMode,\r\n clearBlacklineSelectedElementId,\r\n} from 'store/actions/blackline-view-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setHighlightedElementIdContentPanel]: (elementId, { payload }) => {\r\n return payload;\r\n },\r\n [toggleBlacklineViewMode]: () => {\r\n return null;\r\n },\r\n [clearBlacklineSelectedElementId]: () => {\r\n return null;\r\n },\r\n },\r\n null,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setBlacklineSelectedElementId,\r\n clearBlacklineSelectedElementId,\r\n} from 'store/actions/blackline-view-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setBlacklineSelectedElementId]: (prevState, { payload }) => {\r\n return payload.type === 'Deleted'\r\n ? { ...prevState, deleted: payload.id, addedOrChanged: null }\r\n : { ...prevState, addedOrChanged: payload.id, deleted: null };\r\n },\r\n [clearBlacklineSelectedElementId]: () => {\r\n return { deleted: null, addedOrChanged: null };\r\n },\r\n },\r\n { deleted: null, addedOrChanged: null },\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n statementSummaryElementsLoading,\r\n statementSummaryElementsLoaded,\r\n statementSummaryElementsError,\r\n updateElementSummaryFromSocketPayloadAction,\r\n} from 'store/actions/statement-summary/elements-summary-actions';\r\nimport StatementSummaryElements from 'models/api/statement-summary-elements-model';\r\n\r\nexport default handleActions(\r\n {\r\n [statementSummaryElementsLoading]: (elementSummary) => {\r\n return elementSummary.setLoading();\r\n },\r\n [statementSummaryElementsError]: (elementSummary, { payload }) => {\r\n return elementSummary.setError(payload);\r\n },\r\n [statementSummaryElementsLoaded]: (elementSummary, { payload }) => {\r\n return elementSummary.setLoaded(payload);\r\n },\r\n [updateElementSummaryFromSocketPayloadAction]: (\r\n elementSummary,\r\n { payload },\r\n ) => {\r\n return elementSummary.updateElementsSummaryFromSocketPayload(payload);\r\n },\r\n },\r\n new StatementSummaryElements(),\r\n);\r\n","import ApiModel from 'models/api-model';\r\nimport { ANNOTATION_POSITION_TYPES } from 'constants/feature/annotation-elements-constants';\r\n\r\nexport default class AnnotationPositionUpdate extends ApiModel({\r\n data: {\r\n annotationPosition: '',\r\n position: 'left',\r\n },\r\n}) {\r\n get annotationPosition() {\r\n return this.data.annotationPosition;\r\n }\r\n\r\n get position() {\r\n return this.data.position;\r\n }\r\n\r\n setAnnotationPosition({ position }) {\r\n const displayPosition = Object.keys(ANNOTATION_POSITION_TYPES).filter(\r\n (key) => ANNOTATION_POSITION_TYPES[key] === position.id,\r\n )[0];\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n annotationPosition: position,\r\n position: displayPosition.toLowerCase(),\r\n },\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport { setStatementAnnotationsPosition } from 'store/actions/statement-summary/statement-annotations-update-actions';\r\nimport AnnotationPositionUpdate from 'models/api/statement-annotations-update-model';\r\nimport { resetAnnotationDisplayAndPositionOption } from 'store/actions/annotation-display-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setStatementAnnotationsPosition]: (annotationPosition, { payload }) => {\r\n return annotationPosition.setAnnotationPosition(payload);\r\n },\r\n [resetAnnotationDisplayAndPositionOption]: () => {\r\n return new AnnotationPositionUpdate();\r\n },\r\n },\r\n new AnnotationPositionUpdate(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n statementSummaryNotesLoading,\r\n statementSummaryNotesLoaded,\r\n statementSummaryNotesError,\r\n updateSummaryNotesFromWebsocket,\r\n} from 'store/actions/statement-summary/notes-summary-actions';\r\nimport StatementSummaryNotes from 'models/api/statement-summary-notes-model';\r\n\r\nexport default handleActions(\r\n {\r\n [statementSummaryNotesLoading]: (noteSummary) => {\r\n return noteSummary.setLoading();\r\n },\r\n [statementSummaryNotesError]: (noteSummary, { payload }) => {\r\n return noteSummary.setError(payload);\r\n },\r\n [statementSummaryNotesLoaded]: (noteSummary, { payload }) => {\r\n return noteSummary.setLoaded(payload);\r\n },\r\n [updateSummaryNotesFromWebsocket]: (noteSummary, { payload }) => {\r\n return noteSummary.updateSummaryFromWebsocket(payload);\r\n },\r\n },\r\n new StatementSummaryNotes(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n statementSummarySectionsLoading,\r\n statementSummarySectionsLoaded,\r\n statementSummarySectionsError,\r\n updateSectionSummaryFromSocketPayloadAction,\r\n} from 'store/actions/statement-summary/sections-summary-actions';\r\nimport StatementSummarySections from 'models/api/statement-summary-sections-model';\r\n\r\nexport default handleActions(\r\n {\r\n [statementSummarySectionsLoading]: (sectionSummary) => {\r\n return sectionSummary.setLoading();\r\n },\r\n [statementSummarySectionsError]: (sectionSummary, { payload }) => {\r\n return sectionSummary.setError(payload);\r\n },\r\n [statementSummarySectionsLoaded]: (sectionSummary, { payload }) => {\r\n return sectionSummary.setLoaded(payload);\r\n },\r\n [updateSectionSummaryFromSocketPayloadAction]: (\r\n sectionSummary,\r\n { payload },\r\n ) => {\r\n return sectionSummary.updateSectionSummaryFromSocketPayload(payload);\r\n },\r\n },\r\n new StatementSummarySections(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setDisplayOptionAction,\r\n setIsComfortLetterEnabledAction,\r\n} from 'store/actions/statement-summary/statement-summary-actions';\r\nimport StatementSummaryDisplayOptions from 'models/data/statement-summary-display-options-model';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setDisplayOptionAction]: (statementSumDisplayOption, { payload }) => {\r\n return statementSumDisplayOption.setDisplayOption(payload);\r\n },\r\n [setIsComfortLetterEnabledAction]: (\r\n statementSumDisplayOption,\r\n { payload },\r\n ) => {\r\n return statementSumDisplayOption.setIsComfortLetterEnabled(payload);\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new StatementSummaryDisplayOptions();\r\n },\r\n },\r\n new StatementSummaryDisplayOptions(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { CONTENT_HIGHLIGHT_MODES } from 'constants/feature/modes-constants';\r\nimport {\r\n setContentHighlightModeDefault,\r\n setContentHighlightModeNotes,\r\n setContentHighlightModeAddElement,\r\n setContentHighlightModeAddNavigation,\r\n} from 'store/actions/modes-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setContentHighlightModeDefault]: () => {\r\n return CONTENT_HIGHLIGHT_MODES.DEFAULT;\r\n },\r\n [setContentHighlightModeNotes]: () => {\r\n return CONTENT_HIGHLIGHT_MODES.NOTES;\r\n },\r\n [setContentHighlightModeAddElement]: () => {\r\n return CONTENT_HIGHLIGHT_MODES.ADD_ELEMENT;\r\n },\r\n [setContentHighlightModeAddNavigation]: () => {\r\n return CONTENT_HIGHLIGHT_MODES.ADD_NAVIGATION;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return CONTENT_HIGHLIGHT_MODES.DEFAULT;\r\n },\r\n },\r\n CONTENT_HIGHLIGHT_MODES.DEFAULT\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { toggleBlacklineViewMode } from 'store/actions/blackline-view-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [toggleBlacklineViewMode]: (blacklineViewMode) => {\r\n return !blacklineViewMode;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return false;\r\n },\r\n },\r\n false,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n toggleBlacklineViewShowElementMode,\r\n resetBlacklineViewShowElementMode,\r\n} from 'store/actions/blackline-view-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [toggleBlacklineViewShowElementMode]: (blacklineViewShowElementMode) => {\r\n return !blacklineViewShowElementMode;\r\n },\r\n [resetBlacklineViewShowElementMode]: () => {\r\n return false;\r\n },\r\n },\r\n false,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n toggleBlacklineViewSyncScrollingMode,\r\n clearBlacklineViewSyncScrollingMode,\r\n} from 'store/actions/blackline-view-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [toggleBlacklineViewSyncScrollingMode]: (\r\n blacklineViewSyncScrollingMode,\r\n ) => {\r\n return !blacklineViewSyncScrollingMode;\r\n },\r\n [clearBlacklineViewSyncScrollingMode]: () => {\r\n return false;\r\n },\r\n },\r\n false,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setOcrCurrentViewPageNumber } from 'store/actions/ocr-current-view-page-number-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setOcrCurrentViewPageNumber]: (store, { payload }) => {\r\n return payload;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return 1;\r\n },\r\n },\r\n 1,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setLeftOcrCurrentViewPageNumber } from 'store/actions/ocr-current-view-page-number-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setLeftOcrCurrentViewPageNumber]: (store, { payload }) => {\r\n return payload;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return 1;\r\n },\r\n },\r\n 1,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport {\r\n setElementSelectModeDefaultAction,\r\n setElementSelectModeBatchAction,\r\n setElementSelectModeInternalReferenceAction,\r\n setElementSelectModeFormulaAction,\r\n setElementSelectModeRangeAction,\r\n setElementSelectModeCopyFormulaAction,\r\n setElementSelectModeBatchWithBannerAction,\r\n setElementSelectModeSideBySideAction,\r\n} from 'store/actions/modes-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nexport default handleActions(\r\n {\r\n [setElementSelectModeDefaultAction]: () => {\r\n return ELEMENT_SELECT_MODES.DEFAULT;\r\n },\r\n [setElementSelectModeBatchAction]: () => {\r\n return ELEMENT_SELECT_MODES.BATCH;\r\n },\r\n [setElementSelectModeBatchWithBannerAction]: () => {\r\n return ELEMENT_SELECT_MODES.BATCH_WITH_BANNER;\r\n },\r\n [setElementSelectModeRangeAction]: () => {\r\n return ELEMENT_SELECT_MODES.RANGE;\r\n },\r\n [setElementSelectModeInternalReferenceAction]: () => {\r\n return ELEMENT_SELECT_MODES.INTERNAL_REFERENCE;\r\n },\r\n [setElementSelectModeFormulaAction]: () => {\r\n return ELEMENT_SELECT_MODES.FORMULA;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return ELEMENT_SELECT_MODES.DEFAULT;\r\n },\r\n [setElementSelectModeCopyFormulaAction]: () => {\r\n return ELEMENT_SELECT_MODES.COPY_FORMULA;\r\n },\r\n [setElementSelectModeSideBySideAction]: () => {\r\n return ELEMENT_SELECT_MODES.SIDE_BY_SIDE;\r\n },\r\n },\r\n ELEMENT_SELECT_MODES.DEFAULT,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport {\r\n initFormulaCreateAction,\r\n setFormulaOperator,\r\n addManualFormulaRow,\r\n updateRowOperator,\r\n setFormulaManualNumber,\r\n removeFormulaRowAction,\r\n addFormulaRowOperator,\r\n removeFormulaRowOperator,\r\n removeAllRowsAction,\r\n clearFormulaAction,\r\n setFormulaLoading,\r\n setFormulaLoaded,\r\n setFormulaResult,\r\n setFormulaError,\r\n setFormulaElementRowsLoaded,\r\n setSelectedRowAction,\r\n setRoundingResultAction,\r\n setNewFormulaAction,\r\n removeFormulaWithSocketPayloadAction,\r\n} from 'store/actions/formula-actions';\r\n\r\nimport FormulaForm from 'models/form/formula-form-model';\r\nimport { FORMULA_ROW_TYPES } from 'constants/feature/formula-constants';\r\n\r\nexport default handleActions(\r\n {\r\n [initFormulaCreateAction]: (formula, { payload }) => {\r\n return formula.initFormulaCreate(payload);\r\n },\r\n [setFormulaOperator]: (formula, { payload }) => {\r\n return formula.setOperator(payload);\r\n },\r\n\r\n [updateRowOperator]: (formula, { payload }) => {\r\n return formula.setRowOperator(payload);\r\n },\r\n [addFormulaRowOperator]: (formula) => {\r\n return formula.addOperator(FORMULA_ROW_TYPES.OPERATOR);\r\n },\r\n\r\n [removeFormulaRowOperator]: (formula, { payload }) => {\r\n return formula.removeRowOperator(payload);\r\n },\r\n\r\n [setFormulaManualNumber]: (formula, { payload }) => {\r\n return formula.setManualNumber(payload);\r\n },\r\n [removeFormulaRowAction]: (formula, { payload }) => {\r\n return formula.removeRow(payload);\r\n },\r\n [addManualFormulaRow]: (formula, { payload }) => {\r\n return formula.addManualRow();\r\n },\r\n [removeAllRowsAction]: (formula) => {\r\n return formula.removeAllRows();\r\n },\r\n [setFormulaLoading]: (formula) => {\r\n return formula.setLoading();\r\n },\r\n [setFormulaLoaded]: (formula, { payload }) => {\r\n return formula.setLoaded(payload);\r\n },\r\n [setFormulaResult]: (formula, { payload }) => {\r\n return formula.setFormulaResult();\r\n },\r\n [setFormulaError]: (formula, { payload }) => {\r\n return formula.setError(payload);\r\n },\r\n [setFormulaElementRowsLoaded]: (formula, { payload }) => {\r\n return formula.setElementRowsLoaded(payload);\r\n },\r\n [clearFormulaAction]: () => {\r\n return new FormulaForm();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new FormulaForm();\r\n },\r\n [setSelectedRowAction]: (formula, { payload }) => {\r\n return formula.setSelectedRow(payload);\r\n },\r\n [setRoundingResultAction]: (formula, { payload }) => {\r\n return formula.setRoundingResultAndScale(payload);\r\n },\r\n [setNewFormulaAction]: (formula, { payload }) => {\r\n return formula.setNewFormula(payload);\r\n },\r\n [removeFormulaWithSocketPayloadAction]: (formula, { payload }) => {\r\n return formula.removeFormulaWithSocketPayload(payload);\r\n },\r\n },\r\n new FormulaForm(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n elementFormulaListLoading,\r\n elementFormulaListLoaded,\r\n elementFormulaListError,\r\n deleteFormulaError,\r\n removeElementFromFormulaTabFromSocketPayloadAction,\r\n addFormulaToFormulaListFromSocketPayloadAction,\r\n elementFormulaListLoadedWithoutResponse,\r\n} from 'store/actions/element-panel-actions';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [elementFormulaListLoading]: (formulaList) => {\r\n return formulaList.setLoading();\r\n },\r\n [elementFormulaListLoaded]: (formulaList, { payload }) => {\r\n return formulaList.setLoaded(payload);\r\n },\r\n [elementFormulaListLoadedWithoutResponse]: (formulaList) => {\r\n return formulaList.setLoadedWithoutResponse();\r\n },\r\n [elementFormulaListError]: (formulaList, { payload }) => {\r\n return formulaList.setError(payload);\r\n },\r\n [deleteFormulaError]: (formulaList, { payload }) => {\r\n return formulaList.setError(payload);\r\n },\r\n [removeElementFromFormulaTabFromSocketPayloadAction]: (\r\n formulaList,\r\n { payload },\r\n ) => {\r\n return formulaList.removeElementFromFormulaTabFromSocketPayload(payload);\r\n },\r\n [addFormulaToFormulaListFromSocketPayloadAction]: (\r\n formulaList,\r\n { payload },\r\n ) => {\r\n return formulaList.addFormulaToFormulaListFromSocketPayload(payload);\r\n },\r\n },\r\n new FormulaList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setInternalReferenceLoading,\r\n setInternalReferenceLoaded,\r\n setInternalReferenceError,\r\n clearInternalReferenceAction,\r\n updateInternalReferenceElementsFromSocketAction,\r\n updateInternalReferenceFromSocketAction,\r\n setInternalReferenceLoadedWithoutPayload,\r\n} from 'store/actions/internal-reference-actions';\r\n\r\nimport InternalReference from 'models/api/internal-reference-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setInternalReferenceLoading]: (internalReference) => {\r\n return internalReference.setLoading();\r\n },\r\n [setInternalReferenceLoaded]: (internalReference, { payload }) => {\r\n return internalReference.setLoaded(payload);\r\n },\r\n [setInternalReferenceLoadedWithoutPayload]: (internalReference) => {\r\n return internalReference.setLoadedWithoutResponse();\r\n },\r\n [setInternalReferenceError]: (internalReference, { payload }) => {\r\n return internalReference.setError(payload);\r\n },\r\n [updateInternalReferenceElementsFromSocketAction]: (\r\n internalReference,\r\n { payload },\r\n ) => {\r\n return internalReference.updateInternalReferenceElementsFromSocket(\r\n payload,\r\n );\r\n },\r\n [updateInternalReferenceFromSocketAction]: (\r\n internalReference,\r\n { payload },\r\n ) => {\r\n return internalReference.updateInternalReferenceFromSocket(payload);\r\n },\r\n [clearInternalReferenceAction]: (internalReference, { payload }) => {\r\n return new InternalReference();\r\n },\r\n },\r\n new InternalReference(),\r\n);\r\n","import InternalReferenceSuggestionList from 'models/api/internal-reference-suggestion-list-model';\r\nimport { handleActions } from 'redux-actions';\r\nimport {\r\n internalReferenceSuggestedListLoading,\r\n internalReferenceSuggestedListLoaded,\r\n internalReferenceSuggestedListError,\r\n updateSuggestedIRElementsFromListFromSocketPayloadAction,\r\n removeSuggestedIRFromSocketPayloadAction,\r\n updateSuggestedIRListFromSocketPayloadAction,\r\n} from 'store/actions/internal-reference-suggestion-list-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [internalReferenceSuggestedListLoading]: (internalReference) => {\r\n return internalReference.setLoading();\r\n },\r\n [internalReferenceSuggestedListLoaded]: (\r\n internalReference,\r\n { payload },\r\n ) => {\r\n return internalReference.setLoaded(payload);\r\n },\r\n [internalReferenceSuggestedListError]: (internalReference, { payload }) => {\r\n return internalReference.setError(payload);\r\n },\r\n [updateSuggestedIRElementsFromListFromSocketPayloadAction]: (\r\n internalReference,\r\n { payload },\r\n ) => {\r\n return internalReference.updateSuggestedIRElementsFromListFromSocketPayload(\r\n payload,\r\n );\r\n },\r\n [updateSuggestedIRListFromSocketPayloadAction]: (\r\n internalReference,\r\n { payload },\r\n ) => {\r\n return internalReference.updateSuggestedIRListFromSocketPayload(payload);\r\n },\r\n [removeSuggestedIRFromSocketPayloadAction]: (\r\n internalReference,\r\n { payload },\r\n ) => {\r\n return internalReference.removeSuggestedIRFromSocketPayload(payload);\r\n },\r\n },\r\n new InternalReferenceSuggestionList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n elementWorkpaperListLoading,\r\n elementWorkpaperListLoaded,\r\n elementWorkpaperListError,\r\n elementWorkpaperListFromWebSocketPayloadAction,\r\n removeWorkpaperFromElementPanelWithSocketPayload,\r\n elementWorkpaperListLoadedWithoutResponse,\r\n removeWPFromElementPanelAction,\r\n updateWPFromElementPanelAction,\r\n} from 'store/actions/element-panel-actions';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [elementWorkpaperListLoading]: (workpaperList) => {\r\n return workpaperList.setLoading();\r\n },\r\n [elementWorkpaperListLoaded]: (workpaperList, { payload }) => {\r\n return workpaperList.setLoaded(payload);\r\n },\r\n [elementWorkpaperListLoadedWithoutResponse]: (workpaperList) => {\r\n return workpaperList.setLoadedWithoutResponse();\r\n },\r\n [elementWorkpaperListError]: (workpaperList, { payload }) => {\r\n return workpaperList.setError(payload);\r\n },\r\n [elementWorkpaperListFromWebSocketPayloadAction]: (\r\n workpaperList,\r\n { payload },\r\n ) => {\r\n return workpaperList.setWorkpaperListFromWebSocketPayload(payload);\r\n },\r\n [removeWorkpaperFromElementPanelWithSocketPayload]: (\r\n workpaperList,\r\n { payload },\r\n ) => {\r\n return workpaperList.removeWorkpaperFromElementPanelWithSocketPayload(\r\n payload,\r\n );\r\n },\r\n [removeWPFromElementPanelAction]: (workpaperList, { payload }) => {\r\n return workpaperList.removeWPFromElementPanel(payload);\r\n },\r\n [updateWPFromElementPanelAction]: (workpaperList, { payload }) => {\r\n return workpaperList.updateWPFromElementPanel(payload);\r\n },\r\n },\r\n new ElementWorkpaperList(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\n/**\r\n * Model used for tracking the last time a request to the documentChangesSince endpoint\r\n * This endpoint is responsible for returning changes to element meta data and content\r\n * \"since\" the provided timestamp\r\n */\r\nexport default class ChangesSinceTracker extends BaseModel({\r\n revisionId: null,\r\n since: Date.now(),\r\n}) {\r\n /** Reducer function called when the statement content page initially loads\r\n * Inits our `since` value and the current revisionId\r\n */\r\n initFromRevision({ revisionId }) {\r\n return this.merge({\r\n revisionId,\r\n since: Date.now(),\r\n });\r\n }\r\n /** Reducer function to set `revisionId` */\r\n setRevisionId(revisionId) {\r\n return this.merge({\r\n revisionId,\r\n });\r\n }\r\n\r\n /** Reducer function to set `since` */\r\n setSince(since) {\r\n return this.merge({\r\n since,\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport ChangesSinceTracker from 'models/data/element-changes-since-tracker-model';\r\nimport { setElementChangesSinceAction } from 'store/actions/element-changes-since-tracker-actions';\r\nimport { revisionLoaded } from 'store/actions/revision-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setElementChangesSinceAction]: (tracker, { payload }) => {\r\n return tracker.setSince(payload);\r\n },\r\n /* External Action Listeners */\r\n [revisionLoaded]: (tracker, { payload }) => {\r\n const revisionId = payload.response.data.id;\r\n return tracker.initFromRevision({ revisionId });\r\n },\r\n [clearStatementPageStoreAction]: (tracker, { payload }) => {\r\n return new ChangesSinceTracker();\r\n },\r\n },\r\n new ChangesSinceTracker()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n elementTickmarkListLoading,\r\n elementTickmarkListLoaded,\r\n elementTickmarkListError,\r\n removeTickmarkFromElementPanelWithSocketPayloadAction,\r\n updateTickmarkInElementPanelWithSocketPayloadAction,\r\n elementTickmarkListFromWebSocketPayloadAction,\r\n removeTickmarkWithSocketPayloadInBulk,\r\n elementTickmarkListLoadedWithoutResponse,\r\n} from 'store/actions/element-panel-actions';\r\nimport ElementTickmarkList from 'models/api/element-tickmark-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [elementTickmarkListLoading]: (tickmarkList) => {\r\n return tickmarkList.setLoading();\r\n },\r\n [elementTickmarkListLoaded]: (tickmarkList, { payload }) => {\r\n return tickmarkList.setLoaded(payload);\r\n },\r\n [elementTickmarkListLoadedWithoutResponse]: (tickmarkList) => {\r\n return tickmarkList.setLoadedWithoutResponse();\r\n },\r\n [elementTickmarkListError]: (tickmarkList, { payload }) => {\r\n return tickmarkList.setError(payload);\r\n },\r\n [removeTickmarkFromElementPanelWithSocketPayloadAction]: (\r\n tickmarkList,\r\n { payload },\r\n ) => {\r\n return tickmarkList.removeTickmarkFromElementPanelWithSocketPayload(\r\n payload,\r\n );\r\n },\r\n [removeTickmarkWithSocketPayloadInBulk]: (tickmarkList, { payload }) => {\r\n return tickmarkList.removeTickmarkWithSocketPayloadInBulk(payload);\r\n },\r\n [updateTickmarkInElementPanelWithSocketPayloadAction]: (\r\n tickmarkList,\r\n { payload },\r\n ) => {\r\n return tickmarkList.updateTickmarkInElementPanelWithSocketPayload(\r\n payload,\r\n );\r\n },\r\n [elementTickmarkListFromWebSocketPayloadAction]: (\r\n tickmarkList,\r\n { payload },\r\n ) => {\r\n return tickmarkList.setTickmarkListFromWebSocketPayload(payload);\r\n },\r\n },\r\n new ElementTickmarkList(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { SECTION_HIGHLIGHT_STATES } from 'constants/feature/section-details-constants';\r\n\r\nclass SelectedSectionModel extends BaseModel({\r\n color: SECTION_HIGHLIGHT_STATES.DEFAULT,\r\n isSelected: false,\r\n}) {}\r\n/**\r\n * A set of selected section ids, keys are removed when they are no longer selected\r\n */\r\nexport default class SelectedSectionMap extends BaseModel({\r\n /* shape is\r\n {\r\n [sectionId]: true \r\n ...\r\n }\r\n */\r\n}) {\r\n /**\r\n * Reducer function for simultaneously clearing old selected ids and initializing\r\n * the set with new ones\r\n * @param {int[]} param.sectionIds array of section ids\r\n */\r\n replaceWithSections({\r\n color = SECTION_HIGHLIGHT_STATES.DEFAULT,\r\n sectionIds,\r\n }) {\r\n const sectionMap = {};\r\n sectionIds.forEach((id) => {\r\n sectionMap[id] = new SelectedSectionModel({ color, isSelected: true });\r\n });\r\n return new SelectedSectionMap({ ...sectionMap });\r\n }\r\n\r\n /**\r\n * Reducer function for appending sections to the selection set\r\n * @param {int[]} param.sectionIds array of section ids\r\n */\r\n appendSelectedSections({\r\n sectionIds,\r\n color = SECTION_HIGHLIGHT_STATES.DEFAULT,\r\n }) {\r\n const sectionMap = {};\r\n sectionIds.forEach((id) => {\r\n // add 1 to existing or init as 1\r\n sectionMap[id] = new SelectedSectionModel({ color, isSelected: true });\r\n });\r\n return this.merge({\r\n ...sectionMap,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for appending a section to the selection set\r\n * @param {int} param.sectionId\r\n */\r\n appendSelectedSection({\r\n sectionId,\r\n color = SECTION_HIGHLIGHT_STATES.DEFAULT,\r\n }) {\r\n return this.merge({\r\n [sectionId]: new SelectedSectionModel({ color, isSelected: true }),\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for deselecting an section\r\n * @param {int} param.sectionId\r\n */\r\n deselectSection({ sectionId }) {\r\n if (this[sectionId]) {\r\n const newMap = { ...this };\r\n delete newMap[sectionId];\r\n return new SelectedSectionMap({ ...newMap });\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Reducer function for clearing the set\r\n */\r\n clearMap() {\r\n return new SelectedSectionMap();\r\n }\r\n\r\n has(id) {\r\n return !isNullOrUndefined(this[id]) && this[id] === true;\r\n }\r\n\r\n deallocateSection() {\r\n let keys = Object.keys(this);\r\n for (let i = 0; i < keys.length; i++) {\r\n if (this[keys[i]].color === SECTION_HIGHLIGHT_STATES.PANEL_SELECTED) {\r\n this[keys[i]].color = SECTION_HIGHLIGHT_STATES.DEFAULT;\r\n }\r\n }\r\n return this;\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n selectSectionContentPanel,\r\n deselectSectionContentPanel,\r\n clearSelectedSectionsContentPanel,\r\n selectMultipleSectionsContentPanel,\r\n replaceSelectedSectionsContentPanel,\r\n clearStatementPageStoreAction,\r\n deallocateSelectedSectionsContentPanel,\r\n} from 'store/actions/statement-content-actions';\r\nimport SelectedSectionMap from 'models/data/selected-section-map-model';\r\n\r\nexport default handleActions(\r\n {\r\n [selectSectionContentPanel]: (selectedSectionMap, { payload }) => {\r\n return selectedSectionMap.appendSelectedSection(payload);\r\n },\r\n [deselectSectionContentPanel]: (selectedSectionMap, { payload }) => {\r\n return selectedSectionMap.deselectSection(payload);\r\n },\r\n [clearSelectedSectionsContentPanel]: (selectedSectionMap) => {\r\n return selectedSectionMap.clearMap();\r\n },\r\n [selectMultipleSectionsContentPanel]: (selectedSectionMap, { payload }) => {\r\n return selectedSectionMap.appendSelectedSections(payload);\r\n },\r\n [replaceSelectedSectionsContentPanel]: (\r\n selectedSectionMap,\r\n { payload },\r\n ) => {\r\n return selectedSectionMap.replaceWithSections(payload);\r\n },\r\n [deallocateSelectedSectionsContentPanel]: (selectedSectionMap) => {\r\n return selectedSectionMap.deallocateSection();\r\n },\r\n [clearStatementPageStoreAction]: (selectedSectionMap, { payload }) => {\r\n return new SelectedSectionMap();\r\n },\r\n },\r\n new SelectedSectionMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport {\r\n contentSectionMapLoading,\r\n contentSectionMapLoaded,\r\n contentSectionMapError,\r\n} from 'store/actions/section-cache-actions';\r\nimport { ContentSectionMap } from 'models/api/content-section-map-api-model';\r\nexport default handleActions(\r\n {\r\n [contentSectionMapLoading]: (contentSectionMap) => {\r\n return contentSectionMap.setLoading();\r\n },\r\n [contentSectionMapLoaded]: (contentSectionMap, { payload }) => {\r\n return contentSectionMap.setLoaded(payload);\r\n },\r\n [contentSectionMapError]: (contentSectionMap, { payload }) => {\r\n return contentSectionMap.setError(payload);\r\n },\r\n\r\n [clearStatementPageStoreAction]: (contentSectionMap, { payload }) => {\r\n return new ContentSectionMap();\r\n },\r\n },\r\n new ContentSectionMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n clearStatementPageStoreAction,\r\n clearLeftStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n leftContentSectionMapLoading,\r\n leftContentSectionMapLoaded,\r\n leftContentSectionMapError,\r\n} from 'store/actions/section-cache-actions';\r\nimport { ContentSectionMap } from 'models/api/content-section-map-api-model';\r\nexport default handleActions(\r\n {\r\n [leftContentSectionMapLoading]: (contentSectionMap) => {\r\n return contentSectionMap.setLoading();\r\n },\r\n [leftContentSectionMapLoaded]: (contentSectionMap, { payload }) => {\r\n return contentSectionMap.setLoaded(payload);\r\n },\r\n [leftContentSectionMapError]: (contentSectionMap, { payload }) => {\r\n return contentSectionMap.setError(payload);\r\n },\r\n [clearStatementPageStoreAction]: (contentSectionMap, { payload }) => {\r\n return new ContentSectionMap();\r\n },\r\n [clearLeftStatementPageStoreAction]: (contentSectionMap, { payload }) => {\r\n return new ContentSectionMap();\r\n },\r\n },\r\n new ContentSectionMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n addElementToBatchSelectionAction,\r\n removeElementFromBatchSelectionAction,\r\n setBatchSelectedElementsLoading,\r\n appendBatchSelectedElementsLoaded,\r\n setBatchSelectedElementsError,\r\n clearBatchSelectedElementsAction,\r\n updateSelectedBatchElementsFromSocketAction,\r\n removeBatchElementsFromSocketPayloadAction,\r\n} from 'store/actions/batch-panel-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport BatchUpdateElementList from 'models/data/batch-update-element-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [addElementToBatchSelectionAction]: (elements, { payload }) => {\r\n return elements.appendElement(payload);\r\n },\r\n [removeElementFromBatchSelectionAction]: (elements, { payload }) => {\r\n return elements.removeElement(payload);\r\n },\r\n [setBatchSelectedElementsLoading]: (elements, { payload }) => {\r\n return elements.setLoading();\r\n },\r\n [appendBatchSelectedElementsLoaded]: (elements, { payload }) => {\r\n return elements.appendMultipleElementsLoaded(payload);\r\n },\r\n [setBatchSelectedElementsError]: (elements, { payload }) => {\r\n return elements.setError(payload);\r\n },\r\n [clearBatchSelectedElementsAction]: () => {\r\n return new BatchUpdateElementList();\r\n },\r\n [updateSelectedBatchElementsFromSocketAction]: (elements, { payload }) => {\r\n return elements.updateSelectedElementsMapFromSocket(payload);\r\n },\r\n [removeBatchElementsFromSocketPayloadAction]: (elements, { payload }) => {\r\n return elements.removeBatchElementsFromSocketPayload(payload);\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new BatchUpdateElementList();\r\n },\r\n },\r\n new BatchUpdateElementList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n initNotePanelFromSelectionAction,\r\n clearNoteSelectionAction,\r\n} from 'store/actions/notes-panel-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport NoteSelection from 'models/data/note-content-selection-model';\r\n\r\nexport default handleActions(\r\n {\r\n [initNotePanelFromSelectionAction]: (selection, { payload }) => {\r\n return new NoteSelection(payload);\r\n },\r\n [clearNoteSelectionAction]: () => {\r\n return new NoteSelection();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new NoteSelection();\r\n },\r\n },\r\n new NoteSelection(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n notesListLoading,\r\n notesListLoaded,\r\n notesListError,\r\n updateNoteFilterAction,\r\n clearAllNoteFiltersAction,\r\n removeNoteFilterAction,\r\n applyQuickFilterAction,\r\n applyNoteFilterAction,\r\n deleteNoteWithWebsocketPayload,\r\n notesListLoadedWithoutReponse,\r\n addNoteWithWebsocketPayload,\r\n updateNoteWithWebsocketPayload,\r\n setPreviousNoteBody,\r\n setAssignedToMe,\r\n addAdditionalDetailsToNoteList,\r\n} from 'store/actions/notes-panel-actions';\r\nimport NotesList from 'models/api/notes-list-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [notesListLoading]: (notesList, { payload }) => {\r\n return notesList.setLoading(payload);\r\n },\r\n [notesListLoaded]: (notesList, { payload }) => {\r\n return notesList.setLoaded(payload);\r\n },\r\n [notesListLoadedWithoutReponse]: (notesList) => {\r\n return notesList.setLoadedWithoutResponse();\r\n },\r\n [notesListError]: (notesList, { payload }) => {\r\n return notesList.setError(payload);\r\n },\r\n [updateNoteFilterAction]: (notesList, { payload }) => {\r\n return notesList.updateNoteFilters(payload);\r\n },\r\n [clearAllNoteFiltersAction]: (notesList) => {\r\n return notesList.clearAllFilters();\r\n },\r\n [removeNoteFilterAction]: (notesList, { payload }) => {\r\n return notesList.removeNoteFilter(payload);\r\n },\r\n [applyQuickFilterAction]: (notesList, { payload }) => {\r\n return notesList.applyQuickFilter(payload);\r\n },\r\n [applyNoteFilterAction]: (notesList, { payload }) => {\r\n return notesList.applyNoteFilter(payload);\r\n },\r\n [deleteNoteWithWebsocketPayload]: (notesList, { payload }) => {\r\n return notesList.deleteNoteWithWebsocket(payload);\r\n },\r\n [addNoteWithWebsocketPayload]: (notesList, { payload }) => {\r\n return notesList.addNoteWithWebsocketPayload(payload);\r\n },\r\n [updateNoteWithWebsocketPayload]: (notesList, { payload }) => {\r\n return notesList.updateNoteWithWebsocket(payload);\r\n },\r\n [setPreviousNoteBody]: (notesList, { payload }) => {\r\n return notesList.updatePreviousNote(payload);\r\n },\r\n [setAssignedToMe]: (notesList, { payload }) => {\r\n return notesList.setAssignedToMe(payload);\r\n },\r\n [addAdditionalDetailsToNoteList]: (notesList, { payload }) => {\r\n return notesList.addAdditionalDetailsToNotesList(payload);\r\n },\r\n },\r\n new NotesList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n addToCurrentSectionIds,\r\n removeFromCurrentSectionIds,\r\n} from 'store/actions/current-section-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [addToCurrentSectionIds]: (currentSectionIds, { payload }) => {\r\n return [...currentSectionIds, payload];\r\n },\r\n [removeFromCurrentSectionIds]: (currentSectionIds, { payload }) => {\r\n return currentSectionIds.filter((sectionId) => sectionId !== payload);\r\n },\r\n },\r\n []\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n addToLeftCurrentSectionIds,\r\n removeFromLeftCurrentSectionIds,\r\n} from 'store/actions/current-section-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [addToLeftCurrentSectionIds]: (currentSectionIds, { payload }) => {\r\n return [...currentSectionIds, payload];\r\n },\r\n [removeFromLeftCurrentSectionIds]: (currentSectionIds, { payload }) => {\r\n return currentSectionIds.filter((sectionId) => sectionId !== payload);\r\n },\r\n },\r\n [],\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport TickmarkListModel from 'models/api/tickmark-list-api-model';\r\nimport {\r\n tickmarkListLoading,\r\n tickmarkListLoaded,\r\n tickmarkListError,\r\n fetchElementsFromTickmarkAction,\r\n updateTickmarkElementsMapAction,\r\n clearTickmarkElementsAction,\r\n removeTickmarkFromElementsMapAction,\r\n updateTickmarkElementsMapFromArrayAction,\r\n removeElementFromTickmarkElementsMapWithSocketPayloadAction,\r\n addTickmarkToDeletedArrayAction,\r\n excludeElementFromElementsMapAction,\r\n deleteTickmarkWithSocketPayloadAction,\r\n updateTickmarkWithSocketPayloadAction,\r\n addTickmarkToListAction,\r\n unlinkTickmarkFromElementWithWebsocket,\r\n} from 'store/actions/tickmark-list-panel-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [tickmarkListLoading]: (tickmarkList) => {\r\n return tickmarkList.setLoading();\r\n },\r\n [tickmarkListLoaded]: (tickmarkList, { payload }) => {\r\n return tickmarkList.setLoaded(payload);\r\n },\r\n [tickmarkListError]: (tickmarkList, { payload }) => {\r\n return tickmarkList.setError(payload);\r\n },\r\n [fetchElementsFromTickmarkAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.setElementList(payload);\r\n },\r\n [updateTickmarkElementsMapAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.updateTickmarkElementsMap(payload);\r\n },\r\n [updateTickmarkElementsMapFromArrayAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.updateTickmarkElementsMapFromArray(payload);\r\n },\r\n [clearTickmarkElementsAction]: (tickmarkList) => {\r\n return tickmarkList.clearElementList();\r\n },\r\n [removeTickmarkFromElementsMapAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.removeTickmarkFromElementsMap(payload);\r\n },\r\n [removeElementFromTickmarkElementsMapWithSocketPayloadAction]: (\r\n tickmarkList,\r\n { payload },\r\n ) => {\r\n return tickmarkList.removeElementFromTickmarkElementsMapWithSocketPayload(\r\n payload,\r\n );\r\n },\r\n [excludeElementFromElementsMapAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.removeElementFromElementsMap(payload);\r\n },\r\n [addTickmarkToDeletedArrayAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.addTickmarkToDeletedArray(payload);\r\n },\r\n\r\n [deleteTickmarkWithSocketPayloadAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.deleteTickmarkWithSocketPayload(payload);\r\n },\r\n\r\n [updateTickmarkWithSocketPayloadAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.updateTickmarkWithSocketPayload(payload);\r\n },\r\n [addTickmarkToListAction]: (tickmarkList, { payload }) => {\r\n return tickmarkList.addTickmarkToList(payload);\r\n },\r\n [unlinkTickmarkFromElementWithWebsocket]: (tickmarkList, { payload }) => {\r\n return tickmarkList.unlinkTickmarkFromElementWithWebsocket(payload);\r\n },\r\n },\r\n new TickmarkListModel(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport ComfortLetterList from 'models/api/comfort-letter-list-api-model';\r\nimport {\r\n comfortAnnotationListLoading,\r\n comfortAnnotationListLoaded,\r\n comfortAnnotationListError,\r\n fetchElementsFromComfortAnnotationAction,\r\n unlinkElementInComfortLetterElementsMapAndUpdateCountAction,\r\n linkElementInComfortLetterElementsMapAndUpdateCountAction,\r\n removeElementFromComfortLetterElementsWithSocketPayloadAction,\r\n updateComfortLetterElementsMapFromArrayAction,\r\n} from 'store/actions/comfort-annotations-list-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [comfortAnnotationListLoading]: (comfortAnnotationList) => {\r\n return comfortAnnotationList.setLoading();\r\n },\r\n [comfortAnnotationListLoaded]: (comfortAnnotationList, { payload }) => {\r\n return comfortAnnotationList.setLoaded(payload);\r\n },\r\n [comfortAnnotationListError]: (comfortAnnotationList, { payload }) => {\r\n return comfortAnnotationList.setError(payload);\r\n },\r\n [unlinkElementInComfortLetterElementsMapAndUpdateCountAction]: (\r\n comfortAnnotationList,\r\n { payload },\r\n ) => {\r\n return comfortAnnotationList.unlinkElementFromElementsMapAndUpdateCount(\r\n payload,\r\n );\r\n },\r\n [linkElementInComfortLetterElementsMapAndUpdateCountAction]: (\r\n comfortAnnotationList,\r\n { payload },\r\n ) => {\r\n return comfortAnnotationList.linkElementFromElementsMapAndUpdateCount(\r\n payload,\r\n );\r\n },\r\n\r\n [removeElementFromComfortLetterElementsWithSocketPayloadAction]: (\r\n comfortAnnotationList,\r\n { payload },\r\n ) => {\r\n return comfortAnnotationList.removeElementFromComfortLetterElementsMapWithSocketPayload(\r\n payload,\r\n );\r\n },\r\n [fetchElementsFromComfortAnnotationAction]: (\r\n comfortAnnotationList,\r\n { payload },\r\n ) => {\r\n return comfortAnnotationList.setElementsForComfortLetterId(payload);\r\n },\r\n [updateComfortLetterElementsMapFromArrayAction]: (\r\n comfortAnnotationList,\r\n { payload },\r\n ) => {\r\n return comfortAnnotationList.updateComfortLetterElementsMapFromArray(\r\n payload,\r\n );\r\n },\r\n },\r\n new ComfortLetterList(),\r\n);\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nconst init_data = {\r\n sectionDifferenceMap: {},\r\n elementMap: {\r\n missingElements: [],\r\n addedElements: [],\r\n changedElements: [],\r\n unchangedElements: [],\r\n },\r\n};\r\nexport default class CompareStats extends ApiModel({\r\n data: init_data,\r\n}) {\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n sectionDifferenceMap: {\r\n ...init_data.sectionDifferenceMap,\r\n ...response.data.result.sectionDifferenceMap,\r\n },\r\n elementMap: {\r\n ...init_data.elementMap,\r\n ...response.data.result.elementMap,\r\n },\r\n },\r\n };\r\n }\r\n\r\n hasData() {\r\n return !isNullOrUndefined(this.data);\r\n }\r\n\r\n getStats() {\r\n if (!this.hasData()) return init_data.elementMap;\r\n\r\n const {\r\n changedElements,\r\n addedElements,\r\n missingElements,\r\n unchangedElements,\r\n } = this.data.elementMap;\r\n\r\n return {\r\n changedCount: changedElements.length,\r\n addedCount: addedElements.length,\r\n deletedCount: missingElements.length,\r\n unChangedCount: unchangedElements.length,\r\n };\r\n }\r\n\r\n getDiff() {\r\n if (!this.hasData()) return init_data.sectionDifferenceMap;\r\n\r\n return this.data.sectionDifferenceMap;\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport CompareStatesModel from 'models/api/compare-api-model';\r\nimport {\r\n comparePanelLoading,\r\n comparePanelLoaded,\r\n comparePanelError,\r\n} from 'store/actions/compare-stats-panel-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [comparePanelLoading]: (compareStatesModel) => {\r\n return compareStatesModel.setLoading();\r\n },\r\n [comparePanelLoaded]: (compareStatesModel, { payload }) => {\r\n return compareStatesModel.setLoaded(payload);\r\n },\r\n [comparePanelError]: (compareStatesModel, { payload }) => {\r\n return compareStatesModel.setError(payload);\r\n },\r\n },\r\n new CompareStatesModel()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport WorkpaperToolkitListPanel from 'models/api/workpaper-toolkit-list-panel-api-model';\r\nimport {\r\n workpaperToolkitListLoading,\r\n workpaperToolkitListLoaded,\r\n workpaperToolkitListError,\r\n fetchElementsFromWorkpaperAction,\r\n clearWorkpaperElementsAction,\r\n updateWorkpaperElementsMapAction,\r\n removeWorkpaperFromElementsMapAction,\r\n unlinkElementFromElementsMapAction,\r\n updateWorkpaperElementsMapFromArrayAction,\r\n removeElementsFromElementsMapWithSocketPayloadAction,\r\n addWorkpaperToDeletedArrayAction,\r\n removeElementFromElementsMapAction,\r\n addWorkpaperToListAction,\r\n unlinkWorkpaperFromElementWithWebsocketPayload,\r\n updateWorkpaperWithSocketPayloadAction,\r\n deleteWorkpaperWithSocketPayloadAction,\r\n} from 'store/actions/workpaper-toolkit-list-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [workpaperToolkitListLoading]: (workpaperList) => {\r\n return workpaperList.setLoading();\r\n },\r\n [workpaperToolkitListLoaded]: (workpaperList, { payload }) => {\r\n return workpaperList.setLoaded(payload);\r\n },\r\n [workpaperToolkitListError]: (workpaperList, { payload }) => {\r\n return workpaperList.setError(payload);\r\n },\r\n [fetchElementsFromWorkpaperAction]: (workpaperList, { payload }) => {\r\n return workpaperList.setElementList(payload);\r\n },\r\n [clearWorkpaperElementsAction]: (workpaperList) => {\r\n return workpaperList.clearElementList();\r\n },\r\n [updateWorkpaperElementsMapAction]: (workpaperList, { payload }) => {\r\n return workpaperList.updateWorkpaperElementsMap(payload);\r\n },\r\n [updateWorkpaperElementsMapFromArrayAction]: (\r\n workpaperList,\r\n { payload },\r\n ) => {\r\n return workpaperList.updateWorkpaperElementsMapFromArray(payload);\r\n },\r\n [removeElementsFromElementsMapWithSocketPayloadAction]: (\r\n workpaperList,\r\n { payload },\r\n ) => {\r\n return workpaperList.removeElementsFromElementsMapWithSocketPayload(\r\n payload,\r\n );\r\n },\r\n [removeWorkpaperFromElementsMapAction]: (workpaperList, { payload }) => {\r\n return workpaperList.removeWorkpaperFromElementsMap(payload);\r\n },\r\n [unlinkElementFromElementsMapAction]: (workpaperList, { payload }) => {\r\n return workpaperList.unlinkElementFromElementsMap(payload);\r\n },\r\n [addWorkpaperToDeletedArrayAction]: (workpaperList, { payload }) => {\r\n return workpaperList.addWorkpaperToDeletedArray(payload);\r\n },\r\n [removeElementFromElementsMapAction]: (workpaperList, { payload }) => {\r\n return workpaperList.removeElementFromElementsMap(payload);\r\n },\r\n [addWorkpaperToListAction]: (workpaperList, { payload }) => {\r\n return workpaperList.addWorkpaperToList(payload);\r\n },\r\n [unlinkWorkpaperFromElementWithWebsocketPayload]: (\r\n workpaperList,\r\n { payload },\r\n ) => {\r\n return workpaperList.unlinkWorkpaperFromElementWithWebsocket(payload);\r\n },\r\n [updateWorkpaperWithSocketPayloadAction]: (workpaperList, { payload }) => {\r\n return workpaperList.updateWorkpaperWithSocketPayload(payload);\r\n },\r\n [deleteWorkpaperWithSocketPayloadAction]: (workpaperList, { payload }) => {\r\n return workpaperList.deleteWorkpaperWithSocketPayload(payload);\r\n },\r\n },\r\n new WorkpaperToolkitListPanel(),\r\n);\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport class SectionReviewHistory extends ApiModel({\r\n data: {\r\n sectionReviewHistory: {},\r\n },\r\n}) {\r\n get sectionReviewHistory() {\r\n if (this.data && this.data.sectionReviewHistory) {\r\n return this.data.sectionReviewHistory;\r\n }\r\n return null;\r\n }\r\n\r\n appendSectionReviewHistory(response) {\r\n if (\r\n this.sectionReviewHistory &&\r\n this.sectionReviewHistory.result &&\r\n this.sectionReviewHistory.result.length > 0\r\n ) {\r\n let updatedSectionHistory = [...this.data.sectionReviewHistory.result];\r\n updatedSectionHistory.unshift(response);\r\n return this.mergeData({\r\n sectionReviewHistory: {\r\n result: updatedSectionHistory,\r\n },\r\n });\r\n } else {\r\n let newHistory = [];\r\n newHistory.push(response);\r\n return this.mergeData({\r\n sectionReviewHistory: {\r\n result: newHistory,\r\n },\r\n });\r\n }\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n sectionReviewHistory: response.data,\r\n },\r\n };\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n fetchSectionReviewsHistoryLoaded,\r\n fetchSectionReviewsHistoryLoading,\r\n fetchSectionReviewsHistoryError,\r\n appendSectionReviewHistory,\r\n} from 'store/actions/section-review-history-actions';\r\nimport { SectionReviewHistory } from 'models/api/section-review-history-model';\r\n\r\nexport default handleActions(\r\n {\r\n [fetchSectionReviewsHistoryLoaded]: (sectionHistory, { payload }) => {\r\n return sectionHistory.setLoaded(payload);\r\n },\r\n [appendSectionReviewHistory]: (sectionHistory, { payload }) => {\r\n return sectionHistory.appendSectionReviewHistory(payload);\r\n },\r\n [fetchSectionReviewsHistoryLoading]: (sectionHistory, { payload }) => {\r\n return sectionHistory.setLoading(payload);\r\n },\r\n [fetchSectionReviewsHistoryError]: (sectionHistory, { payload }) => {\r\n return sectionHistory.setError(payload);\r\n },\r\n },\r\n new SectionReviewHistory(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport SectionAssignments from 'models/api/section-assignments-api-model';\r\nimport {\r\n fetchSectionAssignmentsLoadedAction,\r\n fetchSectionAssignmentsLoadingAction,\r\n fetchSectionAssignmentsErrorAction,\r\n replaceNewWithSocketData,\r\n updateSectionAssignmentInBulkFromSocket,\r\n} from 'store/actions/section-assignment-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [fetchSectionAssignmentsLoadedAction]: (assignments, { payload }) => {\r\n return assignments.setLoaded(payload);\r\n },\r\n [fetchSectionAssignmentsLoadingAction]: (assignments, { payload }) => {\r\n return assignments.setLoading(payload);\r\n },\r\n\r\n [fetchSectionAssignmentsErrorAction]: (assignments, { payload }) => {\r\n return assignments.setError(payload);\r\n },\r\n [replaceNewWithSocketData]: (assignments, { payload }) => {\r\n return assignments.replaceNewWithSocketData(payload);\r\n },\r\n [updateSectionAssignmentInBulkFromSocket]: (assignments, { payload }) => {\r\n return assignments.updateSectionAssignmentInBulkFromSocket(payload);\r\n },\r\n },\r\n new SectionAssignments(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n fetchSectionAssignmentsListLoaded,\r\n fetchSectionAssignmentsListError,\r\n updateSectionAssignmentListFromSocket,\r\n updateSectionAssignmentListForBulkAssignFromSocket,\r\n updateSectionAssignmentListForBulkUnAssignFromSocket,\r\n} from 'store/actions/section-assignment-actions';\r\nimport SectionAssignmentsList from 'models/api/section-assignments-list-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [fetchSectionAssignmentsListLoaded]: (\r\n SectionAssignmentsList,\r\n { payload },\r\n ) => {\r\n return SectionAssignmentsList.setLoaded(payload);\r\n },\r\n\r\n [fetchSectionAssignmentsListError]: (\r\n SectionAssignmentsList,\r\n { payload },\r\n ) => {\r\n return SectionAssignmentsList.setError(payload);\r\n },\r\n [updateSectionAssignmentListFromSocket]: (\r\n SectionAssignmentsList,\r\n { payload },\r\n ) => {\r\n return SectionAssignmentsList.updateSectionAssignmentListFromSocket(\r\n payload,\r\n );\r\n },\r\n [updateSectionAssignmentListForBulkAssignFromSocket]: (\r\n SectionAssignmentsList,\r\n { payload },\r\n ) => {\r\n return SectionAssignmentsList.updateSectionAssignmentListForBulkAssignFromSocket(\r\n payload,\r\n );\r\n },\r\n [updateSectionAssignmentListForBulkUnAssignFromSocket]: (\r\n SectionAssignmentsList,\r\n { payload },\r\n ) => {\r\n return SectionAssignmentsList.updateSectionAssignmentListForBulkUnAssignFromSocket(\r\n payload,\r\n );\r\n },\r\n },\r\n new SectionAssignmentsList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport {\r\n selectedStatementLoading,\r\n selectedStatementLoaded,\r\n selectedStatementError,\r\n clearSelectedStatement,\r\n} from 'store/actions/selected-statement-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [selectedStatementLoading]: (selectedStatement) => {\r\n return selectedStatement.setLoading();\r\n },\r\n [selectedStatementLoaded]: (selectedStatement, { payload }) => {\r\n return selectedStatement.setLoaded(payload);\r\n },\r\n [selectedStatementError]: (selectedStatement, { payload }) => {\r\n return selectedStatement.setError(payload);\r\n },\r\n [clearSelectedStatement]: (selectedStatement) => {\r\n return new SelectedStatement();\r\n },\r\n },\r\n new SelectedStatement()\r\n);\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class ChatBot extends ApiModel({\r\n data: {\r\n name: '',\r\n },\r\n}) {\r\n processResponse(response) {\r\n return { data: response };\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport ChatBot from 'models/api/chatbot-model';\r\nimport {\r\n chatBotPushIndexLoading,\r\n chatBotPushIndexLoaded,\r\n chatBotPushIndexError,\r\n clearSelectedStatement,\r\n} from 'store/actions/selected-statement-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [chatBotPushIndexLoading]: (chatbot) => {\r\n return chatbot.setLoading();\r\n },\r\n [chatBotPushIndexLoaded]: (chatbot, { payload }) => {\r\n return chatbot.setLoaded(payload);\r\n },\r\n [chatBotPushIndexError]: (chatbot, { payload }) => {\r\n return chatbot.setError(payload);\r\n },\r\n [clearSelectedStatement]: (chatbot) => {\r\n return new ChatBot();\r\n },\r\n },\r\n new ChatBot(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport {\r\n leftSelectedStatementLoading,\r\n leftSelectedStatementLoaded,\r\n leftSelectedStatementError,\r\n clearLeftSelectedStatement,\r\n} from 'store/actions/left-selected-statement-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [leftSelectedStatementLoading]: (selectedStatement) => {\r\n return selectedStatement.setLoading();\r\n },\r\n [leftSelectedStatementLoaded]: (selectedStatement, { payload }) => {\r\n return selectedStatement.setLoaded(payload);\r\n },\r\n [leftSelectedStatementError]: (selectedStatement, { payload }) => {\r\n return selectedStatement.setError(payload);\r\n },\r\n [clearLeftSelectedStatement]: (selectedStatement) => {\r\n return new SelectedStatement();\r\n },\r\n },\r\n new SelectedStatement(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport SourceStatementParams from 'models/api/source-statement-model';\r\nimport {\r\n clearSourceStatementParams,\r\n setSourceStatementParams,\r\n} from 'store/actions/source-statement-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setSourceStatementParams]: (sourceStatementParams, { payload }) => {\r\n return sourceStatementParams.merge(payload);\r\n },\r\n [clearSourceStatementParams]: (sourceStatementParams) => {\r\n return new SourceStatementParams();\r\n },\r\n },\r\n new SourceStatementParams(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\n\r\nconst annotationsList = [\r\n 'side-by-side-view.compare.dropdown.workpaper.name',\r\n 'side-by-side-view.compare.dropdown.tickmarks.name',\r\n 'side-by-side-view.compare.dropdown.verification-status.name',\r\n 'side-by-side-view.compare.dropdown.py.label',\r\n 'side-by-side-view.compare.dropdown.pq.label',\r\n];\r\nexport default class SideBySideViewAnnotations extends BaseModel({\r\n isWorkpaperReferenceMapping: false,\r\n isStatusMapping: false,\r\n isTickmarkMapping: false,\r\n isPreviousYearMapping: false,\r\n isPreviousQuarterMapping: false,\r\n}) {\r\n setAnnotationsMapping(val) {\r\n return this.merge({\r\n isWorkpaperReferenceMapping: val.includes(annotationsList[0]),\r\n isStatusMapping: val.includes(annotationsList[2]),\r\n isTickmarkMapping: val.includes(annotationsList[1]),\r\n isPreviousYearMapping: val.includes(annotationsList[3]),\r\n isPreviousQuarterMapping: val.includes(annotationsList[4]),\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport SideBySideViewAnnotations from 'models/api/side-by-side-view-annotations-modal';\r\nimport {\r\n resetSideBySideViewAnnotations,\r\n setAnnotationMapping,\r\n} from 'store/actions/side-by-side-view-annotations-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setAnnotationMapping]: (sideBySideViewAnnotations, { payload }) => {\r\n return sideBySideViewAnnotations.setAnnotationsMapping(payload);\r\n },\r\n [resetSideBySideViewAnnotations]: () => {\r\n return new SideBySideViewAnnotations();\r\n },\r\n },\r\n new SideBySideViewAnnotations(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport StatementCreationPageData from 'models/api/statement-creation-page-data-api-model';\r\nimport {\r\n statementCreationPageDataLoading,\r\n statementCreationPageDataError,\r\n statementCreationPageDataLoaded,\r\n clearStatementCreationPageDataselected,\r\n} from 'store/actions/statement-creation-page-data-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [statementCreationPageDataLoading]: (statementCreationPageData) => {\r\n return statementCreationPageData.setLoading();\r\n },\r\n [statementCreationPageDataError]: (\r\n statementCreationPageData,\r\n { payload },\r\n ) => {\r\n return statementCreationPageData.setError(payload);\r\n },\r\n [statementCreationPageDataLoaded]: (\r\n statementCreationPageData,\r\n { payload },\r\n ) => {\r\n return statementCreationPageData.setLoaded(payload);\r\n },\r\n [clearStatementCreationPageDataselected]: () => {\r\n return new StatementCreationPageData();\r\n },\r\n },\r\n new StatementCreationPageData(),\r\n);\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class Note extends ApiModel({\r\n data: {\r\n body: {},\r\n closedBy: null,\r\n closedByName: null,\r\n closedDate: null,\r\n elementDisplay: null,\r\n elementId: null,\r\n insideSibling: null,\r\n length: null,\r\n noteDate: null,\r\n noteId: null,\r\n noteNumber: null,\r\n noteOrdinal: null,\r\n notePriorityType: null,\r\n noteTaker: null,\r\n noteTakerName: null,\r\n noteType: null,\r\n offset: null,\r\n pseudoElementId: null,\r\n replyFlag: null,\r\n revisionId: null,\r\n revisionNumber: null,\r\n sectionId: null,\r\n selectedText: null,\r\n selector: null,\r\n siblingIndex: null,\r\n workflowStatus: null,\r\n isNew: null,\r\n color: null,\r\n },\r\n}) {\r\n get noteId() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.noteId;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n ...response.data.result,\r\n },\r\n };\r\n }\r\n\r\n setFromNoteListEntry({ note, color }) {\r\n note.color = color;\r\n return this.merge({\r\n data: {\r\n ...note,\r\n },\r\n });\r\n }\r\n\r\n changeIsNewPropertyFromSelectedNote(payload) {\r\n return this.mergeData({\r\n isNew: payload,\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n selectedNoteLoadingAction,\r\n selectedNoteLoadedAction,\r\n selectedNoteErrorAction,\r\n selectNoteFromNoteListAction,\r\n changeIsNewPropertyFromSelectedNote,\r\n} from 'store/actions/notes-panel-actions';\r\nimport NoteApi from 'models/api/note-api-model';\r\nexport default handleActions(\r\n {\r\n [selectedNoteLoadingAction]: (note, { payload }) => {\r\n return note.setLoading(payload);\r\n },\r\n [selectedNoteLoadedAction]: (note, { payload }) => {\r\n return note.setLoaded(payload);\r\n },\r\n [selectedNoteErrorAction]: (note, { payload }) => {\r\n return note.setError(payload);\r\n },\r\n [selectNoteFromNoteListAction]: (note, { payload }) => {\r\n return note.setFromNoteListEntry(payload);\r\n },\r\n [changeIsNewPropertyFromSelectedNote]: (note, { payload }) => {\r\n return note.changeIsNewPropertyFromSelectedNote(payload);\r\n },\r\n },\r\n new NoteApi(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n clearSectionContentWithIdsFromCache,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nimport {\r\n notesCacheSectionLoading,\r\n notesCacheSectionLoaded,\r\n notesCacheSectionError,\r\n removeNoteFromCacheWithSocketPayloadAction,\r\n updateNoteFromNoteCacheWithSocketPayloadAction,\r\n} from 'store/actions/notes-cache-actions';\r\nimport NoteCache from 'models/data/note-cache-model';\r\n\r\nexport default handleActions(\r\n {\r\n [notesCacheSectionLoading]: (noteCache, { payload }) => {\r\n return noteCache.setSectionLoading(payload);\r\n },\r\n [notesCacheSectionLoaded]: (noteCache, { payload }) => {\r\n return noteCache.setSectionLoaded(payload);\r\n },\r\n [notesCacheSectionError]: (noteCache, { payload }) => {\r\n return noteCache.setSectionError(payload);\r\n },\r\n /** External listeners */\r\n [clearStatementPageStoreAction]: (noteCache, { payload }) => {\r\n return new NoteCache();\r\n },\r\n [clearSectionContentWithIdsFromCache]: (noteCache, { payload }) => {\r\n return noteCache.clearSections(payload);\r\n },\r\n [removeNoteFromCacheWithSocketPayloadAction]: (noteCache, { payload }) => {\r\n return noteCache.removeNoteFromCacheFromSocketPayload(payload);\r\n },\r\n [updateNoteFromNoteCacheWithSocketPayloadAction]: (\r\n noteCache,\r\n { payload },\r\n ) => {\r\n return noteCache.updateNoteFromCacheFromSocketpayload(payload);\r\n },\r\n },\r\n new NoteCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { clearLeftStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nimport {\r\n leftNotesCacheSectionLoading,\r\n leftNotesCacheSectionLoaded,\r\n leftNotesCacheSectionError,\r\n} from 'store/actions/notes-cache-actions';\r\nimport NoteCache from 'models/data/note-cache-model';\r\n\r\nexport default handleActions(\r\n {\r\n [leftNotesCacheSectionLoading]: (noteCache, { payload }) => {\r\n return noteCache.setSectionLoading(payload);\r\n },\r\n [leftNotesCacheSectionLoaded]: (noteCache, { payload }) => {\r\n return noteCache.setSectionLoaded(payload);\r\n },\r\n [leftNotesCacheSectionError]: (noteCache, { payload }) => {\r\n return noteCache.setSectionError(payload);\r\n },\r\n /** External listeners */\r\n [clearLeftStatementPageStoreAction]: () => {\r\n return new NoteCache();\r\n },\r\n },\r\n new NoteCache(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport {\r\n showElementPanelAction,\r\n hideElementPanelAction,\r\n hideRightPanelAction,\r\n showNotesPanelAction,\r\n hideNotesPanelAction,\r\n showBatchPanelAction,\r\n hideBatchPanelAction,\r\n showSectionDetailsPanelAction,\r\n hideSectionDetailsPanelAction,\r\n} from 'store/actions/panel-controller-actions';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\n\r\nconst { CLOSED, ELEMENT, BATCH, NOTES, SECTION } = RIGHT_PANELS;\r\n\r\nexport default handleActions(\r\n {\r\n [hideRightPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showElementPanelAction]: () => {\r\n return ELEMENT;\r\n },\r\n [hideElementPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showNotesPanelAction]: () => {\r\n return NOTES;\r\n },\r\n [hideNotesPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showBatchPanelAction]: () => {\r\n return BATCH;\r\n },\r\n [hideBatchPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showSectionDetailsPanelAction]: () => {\r\n return SECTION;\r\n },\r\n [hideSectionDetailsPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return CLOSED;\r\n },\r\n },\r\n CLOSED,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport {\r\n showTickmarkPanelAction,\r\n hideTickmarkPanelAction,\r\n showStatementNavPanelAction,\r\n hideStatementNavPanelAction,\r\n hideLeftPanelAction,\r\n hideComparePanelAction,\r\n showComparePanelAction,\r\n hideExportPanelAction,\r\n showExportPanelAction,\r\n showWorkPaperPanelAction,\r\n hideWorkPaperPanelAction,\r\n showCustomMenuPanelAction,\r\n hideCustomMenuPanelAction,\r\n showAuditChecklistPanelAction,\r\n hideAuditChecklistPanelAction,\r\n hideComfortAnnotationPanelAction,\r\n showComfortAnnotationPanelAction,\r\n showChatBotPanelAction,\r\n hideChatBotPanelAction,\r\n} from 'store/actions/panel-controller-actions';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\n\r\nconst {\r\n CLOSED,\r\n STATEMENT_NAV,\r\n TICKMARK,\r\n COMPARE,\r\n EXPORT,\r\n WORKPAPER,\r\n CUSTOM,\r\n AUDIT_CHECKLIST,\r\n COMFORT_ANNOTATION,\r\n CHAT_BOT,\r\n} = LEFT_PANELS;\r\n\r\nexport default handleActions(\r\n {\r\n [hideStatementNavPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showStatementNavPanelAction]: () => {\r\n return STATEMENT_NAV;\r\n },\r\n [hideTickmarkPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showTickmarkPanelAction]: () => {\r\n return TICKMARK;\r\n },\r\n [hideComparePanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showComparePanelAction]: () => {\r\n return COMPARE;\r\n },\r\n [hideLeftPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return CLOSED;\r\n },\r\n [hideExportPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showExportPanelAction]: (state, { payload = LEFT_PANELS.EXPORT }) => {\r\n return payload;\r\n },\r\n [showWorkPaperPanelAction]: () => {\r\n return WORKPAPER;\r\n },\r\n [hideWorkPaperPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [hideCustomMenuPanelAction]: () => {\r\n return EXPORT;\r\n },\r\n [showCustomMenuPanelAction]: () => {\r\n return CUSTOM;\r\n },\r\n [hideAuditChecklistPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showAuditChecklistPanelAction]: () => {\r\n return AUDIT_CHECKLIST;\r\n },\r\n [hideComfortAnnotationPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showComfortAnnotationPanelAction]: () => {\r\n return COMFORT_ANNOTATION;\r\n },\r\n [hideChatBotPanelAction]: () => {\r\n return CLOSED;\r\n },\r\n [showChatBotPanelAction]: () => {\r\n return CHAT_BOT;\r\n },\r\n },\r\n CLOSED,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n clearContentSearchAction,\r\n setContentSearchAction,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nconst DEFAULT = '';\r\n\r\nexport default handleActions(\r\n {\r\n [setContentSearchAction]: (search, { payload }) => payload,\r\n [clearContentSearchAction]: () => DEFAULT,\r\n [clearStatementPageStoreAction]: () => DEFAULT,\r\n },\r\n DEFAULT\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n omniaEngagementLoading,\r\n omniaEngagementLoaded,\r\n omniaEngagementError,\r\n} from 'store/actions/omnia-engagement-actions';\r\nimport OmniaEngagement from 'models/api/omnia-engagement-model';\r\n\r\nexport default handleActions(\r\n {\r\n [omniaEngagementLoading]: (omniaEngagement, { payload }) => {\r\n return omniaEngagement.setLoading(payload);\r\n },\r\n [omniaEngagementLoaded]: (omniaEngagement, { payload }) => {\r\n return omniaEngagement.setLoaded(payload);\r\n },\r\n [omniaEngagementError]: (omniaEngagement, { payload }) => {\r\n return omniaEngagement.setError(payload);\r\n },\r\n },\r\n new OmniaEngagement()\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setElementFilters } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport ElementFilters from 'models/data/element-filters-model';\r\nimport { clearElementFilters } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setElementFilters]: (_, { payload }) => {\r\n return payload;\r\n },\r\n [clearElementFilters]: (_, { payload }) => {\r\n return new ElementFilters();\r\n },\r\n },\r\n new ElementFilters(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n clearElementSearchResults,\r\n emptyElementSearchResults,\r\n setElementSearchResults,\r\n setElementSearchResultsLoading,\r\n setElementSearchResultsLoaded,\r\n setElementSearchResultsError,\r\n setSelectedElementResult,\r\n setElementSearchUpdateResultsLoaded,\r\n setElementSearchRemoveElementsLoaded,\r\n updateElementFilterFromSocketPayloadAction,\r\n showElementSearchRefreshButtonAction,\r\n setBatchSelectedItemsIdsAction,\r\n removeIdFromBatchSelectedItemsAction,\r\n addIdToBatchSelectedItemsAction,\r\n} from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport ElementSearchResults from 'models/api/statements-element-search-results-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setElementSearchResults]: (elementSearchResults, { payload }) => {\r\n return payload;\r\n },\r\n [setElementSearchResultsLoading]: (elementSearchResults) => {\r\n return elementSearchResults.setLoading();\r\n },\r\n [setElementSearchResultsLoaded]: (elementSearchResults, { payload }) => {\r\n return elementSearchResults.setLoaded(payload);\r\n },\r\n [setElementSearchResultsError]: (elementSearchResults, { payload }) => {\r\n return elementSearchResults.setError(payload);\r\n },\r\n [setSelectedElementResult]: (elementSearchResults, { payload }) => {\r\n return elementSearchResults.setSelectedIndex(payload);\r\n },\r\n [emptyElementSearchResults]: (elementSearchResults) => {\r\n return elementSearchResults.emptyElementList();\r\n },\r\n [setElementSearchUpdateResultsLoaded]: (\r\n elementSearchResults,\r\n { payload },\r\n ) => {\r\n return elementSearchResults.updateElementList(payload);\r\n },\r\n [updateElementFilterFromSocketPayloadAction]: (\r\n elementSearchResults,\r\n { payload },\r\n ) => {\r\n return elementSearchResults.updateElementListFromSocketPayload(payload);\r\n },\r\n [setElementSearchRemoveElementsLoaded]: (\r\n elementSearchResults,\r\n { payload },\r\n ) => {\r\n return elementSearchResults.removeFromElementList(payload);\r\n },\r\n [clearElementSearchResults]: (elementSearchResults) => {\r\n return new ElementSearchResults();\r\n },\r\n [showElementSearchRefreshButtonAction]: (\r\n elementSearchResults,\r\n { payload },\r\n ) => {\r\n return elementSearchResults.setShowElementSearchRefreshButton(payload);\r\n },\r\n [setBatchSelectedItemsIdsAction]: (elementSearchResults, { payload }) => {\r\n return elementSearchResults.setBatchSelectedItemsIds(payload);\r\n },\r\n [addIdToBatchSelectedItemsAction]: (elementSearchResults, { payload }) => {\r\n return elementSearchResults.addIdToBatchSelectedItemsIds(payload);\r\n },\r\n [removeIdFromBatchSelectedItemsAction]: (\r\n elementSearchResults,\r\n { payload },\r\n ) => {\r\n return elementSearchResults.removeIdFromBatchSelectedItems(payload);\r\n },\r\n },\r\n new ElementSearchResults(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { STATEMENT_NAV_TABS } from 'constants/feature/statement-navigator-constants';\r\nimport { setSelectedTabAction } from 'store/actions/statement-navigator/navigator-panel-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setSelectedTabAction]: (tab, { payload }) => {\r\n return payload;\r\n },\r\n },\r\n STATEMENT_NAV_TABS.headings,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setTOCExpandAll } from 'store/actions/TOC-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setTOCExpandAll]: (tab, { payload }) => {\r\n return payload;\r\n },\r\n },\r\n null\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setTOCRefresh } from 'store/actions/TOC-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setTOCRefresh]: (tab, { payload }) => {\r\n return payload;\r\n },\r\n },\r\n null\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setStatementNavigationRefresh } from 'store/actions/statement-navigator/navigator-panel-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setStatementNavigationRefresh]: (IsRefresh, { payload }) => {\r\n return payload;\r\n },\r\n },\r\n null,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { toggleNavigationEditMode } from 'store/actions/navigation-edit-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions({\r\n [toggleNavigationEditMode]: (navigationEditMode) => {\r\n return !navigationEditMode;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return false;\r\n },\r\n },\r\n false\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n clearElementHistory,\r\n setElementHistoryLoading,\r\n setElementHistoryLoaded,\r\n setElementHistoryError,\r\n} from 'store/actions/element-panel-actions';\r\nimport ElementHistory from 'models/api/element-history-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setElementHistoryLoading]: (elementHistory, { payload }) => {\r\n return elementHistory.setLoading(payload);\r\n },\r\n [setElementHistoryLoaded]: (elementHistory, { payload }) => {\r\n return elementHistory.setLoaded(payload);\r\n },\r\n [setElementHistoryError]: (elementHistory, { payload }) => {\r\n return elementHistory.setError(payload);\r\n },\r\n [clearElementHistory]: (elementHistory, { payload }) => {\r\n return new ElementHistory();\r\n },\r\n },\r\n new ElementHistory(),\r\n);\r\n","import { STATEMENT_ELEMENT_ID_PREFIX } from 'constants/feature/statement-content-constants';\r\nimport BaseModel from 'models/base-model';\r\n\r\nexport default class ElementDataParts extends BaseModel({\r\n elements: {},\r\n}) {\r\n updateDatapartElements({ response }) {\r\n let newElementDatapart = {};\r\n response.data.forEach(async (section) => {\r\n let parser = new DOMParser();\r\n let doc = parser.parseFromString(section.html, 'text/html');\r\n let elementIdSelector = \"a[name^='CFTO_ELEMENT_']\";\r\n let elements = doc.querySelectorAll(elementIdSelector);\r\n\r\n if (elements.length > 0) {\r\n elements.forEach((e) => {\r\n let elementId = e.id.substring(STATEMENT_ELEMENT_ID_PREFIX.length);\r\n if (elementId && elementId.indexOf('_') >= 0) {\r\n let actualElementId = elementId.substr(0, elementId.indexOf('_'));\r\n let datapartId = elementId.substr(\r\n elementId.indexOf('_') + 1,\r\n elementId.length,\r\n );\r\n if (actualElementId in newElementDatapart) {\r\n if (\r\n parseInt(newElementDatapart[actualElementId]) <\r\n parseInt(datapartId)\r\n ) {\r\n newElementDatapart[actualElementId] = datapartId;\r\n }\r\n } else {\r\n newElementDatapart[actualElementId] = datapartId;\r\n }\r\n }\r\n });\r\n }\r\n });\r\n return this.merge({\r\n elements: { ...this.elements, ...newElementDatapart },\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport { elementDatapartStoreAction } from 'store/actions/statement-content-actions';\r\nimport ElementDataParts from 'models/api/element-dataparts-model';\r\n\r\nexport default handleActions(\r\n {\r\n [elementDatapartStoreAction]: (dataPartsModel, { payload }) => {\r\n const { response } = payload;\r\n return dataPartsModel.updateDatapartElements({ response });\r\n },\r\n },\r\n new ElementDataParts(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n clearLeftStatementContent,\r\n leftElementDatapartStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport ElementDataParts from 'models/api/element-dataparts-model';\r\n\r\nexport default handleActions(\r\n {\r\n [leftElementDatapartStoreAction]: (dataPartsModel, { payload }) => {\r\n const { response } = payload;\r\n return dataPartsModel.updateDatapartElements({ response });\r\n },\r\n [clearLeftStatementContent]: () => {\r\n return new ElementDataParts();\r\n },\r\n },\r\n new ElementDataParts(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport ContentViewModes from 'models/data/content-view-modes-model';\r\nimport {\r\n setContentFixedMode,\r\n setContentFullMode,\r\n} from 'store/actions/content-view-modes-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setContentFixedMode]: () => {\r\n return new ContentViewModes().setContentFixedMode();\r\n },\r\n [setContentFullMode]: () => {\r\n return new ContentViewModes().setContentFullMode();\r\n },\r\n },\r\n new ContentViewModes(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n sectionDetailsLoaded,\r\n clearSectionDetails,\r\n sectionDetailsLoading,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nconst contentSectionDetails = { isLoading: false, isLoaded: true, error: null };\r\n\r\nexport default handleActions(\r\n {\r\n [sectionDetailsLoaded]: (contentSection, { payload }) => {\r\n return { ...payload, isLoading: false, isLoaded: true, error: null };\r\n },\r\n [clearSectionDetails]: (contentSection, { payload }) => {\r\n return contentSectionDetails;\r\n },\r\n [sectionDetailsLoading]: () => {\r\n return { isLoading: true, isLoaded: false, error: null };\r\n },\r\n },\r\n contentSectionDetails,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n appendSectionToSectionReviewList,\r\n fetchSectionReviewsError,\r\n fetchSectionReviewsLoaded,\r\n removeSectionReviewFromStore,\r\n fetchSectionReviewsLoading,\r\n mergeSectionReviewToSectionReviewList,\r\n removeBulkSectionReviewFromStore,\r\n} from 'store/actions/sections-actions';\r\nimport { SectionReviewList } from 'models/api/section-review-list-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [fetchSectionReviewsLoaded]: (SectionReviewList, { payload }) => {\r\n return SectionReviewList.setLoaded(payload);\r\n },\r\n [fetchSectionReviewsLoading]: (SectionReviewList) => {\r\n return SectionReviewList.setLoading();\r\n },\r\n [appendSectionToSectionReviewList]: (SectionReviewList, { payload }) => {\r\n return SectionReviewList.appendSectionReview(payload);\r\n },\r\n [mergeSectionReviewToSectionReviewList]: (\r\n SectionReviewList,\r\n { payload },\r\n ) => {\r\n return SectionReviewList.mergeSectionsReviewList(payload);\r\n },\r\n [removeSectionReviewFromStore]: (SectionReviewList, { payload }) => {\r\n return SectionReviewList.removeSectionReview(payload);\r\n },\r\n [removeBulkSectionReviewFromStore]: (SectionReviewList, { payload }) => {\r\n return SectionReviewList.removeBulkSectionReview(payload);\r\n },\r\n [fetchSectionReviewsError]: (SectionReviewList, { payload }) => {\r\n return SectionReviewList.setError(payload);\r\n },\r\n },\r\n new SectionReviewList(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class CancelModal extends BaseModel({\r\n openFormulaCancelModal: false,\r\n openInternalReferenceCancelModal: false,\r\n openNotePanelAfterConfirm: false,\r\n selectedNoteId: null,\r\n selectedPseudoNoteId: null,\r\n openSectionPanelAfterconfirm: false,\r\n selectedSectionId: null,\r\n}) {\r\n toggleFormulaCancelModal(payload) {\r\n return this.merge({\r\n openFormulaCancelModal: payload,\r\n });\r\n }\r\n\r\n toggleInternalReferenceCancelModal(payload) {\r\n return this.merge({\r\n openInternalReferenceCancelModal: payload,\r\n });\r\n }\r\n\r\n openNotePanelAfterCancelConfirm(payload) {\r\n return this.merge({\r\n openNotePanelAfterConfirm: payload,\r\n });\r\n }\r\n\r\n setSelectedNoteId(payload) {\r\n return this.merge({\r\n selectedNoteId: payload,\r\n });\r\n }\r\n\r\n setSelectedNotePseudoId(payload) {\r\n return this.merge({\r\n selectedPseudoNoteId: payload,\r\n });\r\n }\r\n\r\n openSectionPanelAfterCancelConfirm(payload) {\r\n return this.merge({\r\n openSectionPanelAfterconfirm: payload,\r\n });\r\n }\r\n\r\n setSelectedSectionId(payload) {\r\n return this.merge({\r\n selectedSectionId: payload,\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport CancelModal from 'models/utils/common/panels-cancel-modal-model';\r\n\r\nimport {\r\n toggleFormulaCancelModalAction,\r\n toggleInternalReferenceCancelModalAction,\r\n openCancelModalAfterModalConfirmAction,\r\n storeSelectedNoteIdAction,\r\n storeSelectedNotePseudoIdAction,\r\n openSectionPanelAfterCancelConfirmAction,\r\n storeSelectedSectionIdAction,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [toggleFormulaCancelModalAction]: (cancel, { payload }) => {\r\n return cancel.toggleFormulaCancelModal(payload);\r\n },\r\n [toggleInternalReferenceCancelModalAction]: (cancel, { payload }) => {\r\n return cancel.toggleInternalReferenceCancelModal(payload);\r\n },\r\n [openCancelModalAfterModalConfirmAction]: (cancel, { payload }) => {\r\n return cancel.openNotePanelAfterCancelConfirm(payload);\r\n },\r\n [storeSelectedNoteIdAction]: (cancel, { payload }) => {\r\n return cancel.setSelectedNoteId(payload);\r\n },\r\n [storeSelectedNotePseudoIdAction]: (cancel, { payload }) => {\r\n return cancel.setSelectedNotePseudoId(payload);\r\n },\r\n [storeSelectedSectionIdAction]: (cancel, { payload }) => {\r\n return cancel.setSelectedSectionId(payload);\r\n },\r\n [openSectionPanelAfterCancelConfirmAction]: (cancel, { payload }) => {\r\n return cancel.openSectionPanelAfterCancelConfirm(payload);\r\n },\r\n },\r\n new CancelModal(),\r\n);\r\n","export const NOTIFICATION_EVENT_TYPES = {\r\n ELEMENT_UPDATE: 'Element Update',\r\n ELEMENT_ADD: 'Element Add',\r\n ELEMENT_EXCLUDE: 'Element Exclude',\r\n ELEMENT_SUMMARY: 'Element Summary',\r\n HEADING_SUMMARY: 'Heading Summary',\r\n FORMULA_DELETED: 'Formula Deleted',\r\n FORMULA_SAVED: 'Formula Saved',\r\n INTERNAL_REFERENCE_UPDATE: 'Internal Reference Update',\r\n INTERNAL_REFERENCE_SUGGESTION_UPDATE: 'Internal Reference Suggestion Update',\r\n WORKPAPER_LINKED: 'Workpaper Linked',\r\n WORKPAPER_UNLINKED: 'Workpaper Unlinked',\r\n NOTE_DELETE: 'Note Delete',\r\n NOTE_ADD: 'Note Add',\r\n NOTE_UPDATE: 'Note Update',\r\n WORKPAPER_UPDATE: 'Work Paper Reference Update',\r\n WORKPAPER_DELETED: 'Work Paper Reference Deleted',\r\n USER_JOINED_REVISION_GROUP: 'User Joined Revision Group',\r\n USER_LEFT_REVISION_GROUP: 'User Left Revision Group',\r\n HEADING_UPDATE: 'Heading Update',\r\n HEADING_REVIEW: 'Heading Review',\r\n HEADING_UNREVIEW: 'Heading Unreview',\r\n TICKMARK_UPDATE: 'Tickmark Update',\r\n TICKMARK_DELETE: 'Tickmark Delete',\r\n ADD_SECTION_HEADING: 'Heading Assignment Update',\r\n HEADING_DELETE: 'Heading Delete',\r\n TICKMARK_LINKED: 'Tickmark Linked',\r\n TICKMARK_UNLINKED: 'Tickmark Unlinked',\r\n WORKFLOW_STATUS: 'Workflow Status',\r\n TOOLKIT_EXPORT_REPORT_STATUS: 'Report Status',\r\n BULK_SECTION_ASSIGN: 'Bulk Section Assignment',\r\n BULK_SECTION_UNASSIGN: 'Bulk Section Unassignment',\r\n BLACK_LINE_VIEW_GENERATED: 'Blackline view generated',\r\n STATEMENT_COPY_SUCCESSFUL: 'Statement Copy Successfull',\r\n STATEMENT_COPY_FAILED: 'Statement Copy Failure',\r\n BULK_SECTION_REVIEW: 'Bulk Section Review',\r\n BULK_SECTION_UNREVIEW: 'Bulk Section Unreview',\r\n FORMULA_TYPE_CHANGED: 'Formula Type Updated',\r\n // USER_DISCONNECTED: 'User Disconnected',\r\n};\r\n","import { isSignalRForSocketConnectionEnabled } from 'api/api-authentication';\r\n\r\nexport const getWebSocketPayload = (webSocketEvent) => {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n return webSocketEvent.payload;\r\n }\r\n return (\r\n webSocketEvent &&\r\n webSocketEvent.data &&\r\n webSocketEvent.data.arguments &&\r\n webSocketEvent.data.arguments[0] &&\r\n webSocketEvent.data.arguments[0].payload\r\n );\r\n};\r\n\r\nexport const getWebSocketNotificationType = (webSocketEvent) => {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n return webSocketEvent.notificationEventType;\r\n }\r\n return (\r\n webSocketEvent &&\r\n webSocketEvent.data &&\r\n webSocketEvent.data.arguments &&\r\n webSocketEvent.data.arguments[0] &&\r\n webSocketEvent.data.arguments[0].notificationEventType\r\n );\r\n};\r\n","import BaseModel from 'models/base-model';\r\nimport { SocketClient, SOCKET_CONNECTION_TYPE } from 'socket/socketio-client';\r\nimport { SignalrClient } from 'socket/signalr-client';\r\nimport { getStore } from 'store/store';\r\nimport {\r\n updateElementCacheByCalloutAction,\r\n updateElementCacheFromSocketPayloadAction,\r\n} from 'store/actions/element-cache-actions';\r\nimport {\r\n updateElementDetailsFromLeftPanel,\r\n updateElementPanelFromSocketPayload,\r\n removeElementFromFormulaTabFromSocketPayloadAction,\r\n addFormulaToFormulaListFromSocketPayloadAction,\r\n elementFormulaListLoadedWithoutResponse,\r\n elementWorkpaperListFromWebSocketPayloadAction,\r\n removeWorkpaperFromElementPanelWithSocketPayload,\r\n elementWorkpaperListLoadedWithoutResponse,\r\n removeWPFromElementPanelAction,\r\n updateWPFromElementPanelAction,\r\n updateTickmarkInElementPanelWithSocketPayloadAction,\r\n removeTickmarkFromElementPanelWithSocketPayloadAction,\r\n elementTickmarkListFromWebSocketPayloadAction,\r\n removeTickmarkWithSocketPayloadInBulk,\r\n elementTickmarkListLoadedWithoutResponse,\r\n getElementFormulasWithoutLoading,\r\n} from 'store/actions/element-panel-actions';\r\nimport {\r\n updateElementFilterFromSocketPayload,\r\n showElementSearchRefreshButtonAction,\r\n} from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport {\r\n updateSelectedBatchElementsFromSocketAction,\r\n removeBatchElementsFromSocketPayloadAction,\r\n} from 'store/actions/batch-panel-actions';\r\nimport { LEFT_PANELS, RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport {\r\n updateInternalReferenceElementsFromSocketAction,\r\n updateInternalReferenceFromSocketAction,\r\n setInternalReferenceLoadedWithoutPayload,\r\n} from 'store/actions/internal-reference-actions';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport {\r\n updateSuggestedIRElementsFromListFromSocketPayloadAction,\r\n fetchSuggestedListedWithoutLoading,\r\n} from 'store/actions/internal-reference-suggestion-list-actions';\r\nimport {\r\n fetchStatementSummarySections,\r\n updateSectionSummaryFromSocketPayloadAction,\r\n} from 'store/actions/statement-summary/sections-summary-actions';\r\nimport { updateElementSummaryFromSocketPayloadAction } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport {\r\n fetchSectionHTMLSegmentsStatementContentWithoutLoading,\r\n fetchAllSectionRenderingDataWithoutLoading,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n removeElementsFromElementsMapWithSocketPayloadAction,\r\n fetchWorkpaperListForRevisionWithoutLoading,\r\n addWorkpaperToListAction,\r\n unlinkWorkpaperFromElementWithWebsocketPayload,\r\n deleteWorkpaperWithSocketPayloadAction,\r\n updateWorkpaperWithSocketPayloadAction,\r\n} from 'store/actions/workpaper-toolkit-list-actions';\r\nimport {\r\n removeElementFromTickmarkElementsMapWithSocketPayloadAction,\r\n fetchTickmarkListForRevisionWithoutLoading,\r\n deleteTickmarkWithSocketPayloadAction,\r\n updateTickmarkWithSocketPayloadAction,\r\n addTickmarkToListAction,\r\n unlinkTickmarkFromElementWithWebsocket,\r\n} from 'store/actions/tickmark-list-panel-actions';\r\nimport {\r\n addUserAfterValidatingIfIdExists,\r\n removeUserAction,\r\n // removeUserFromRoomAction,\r\n} from 'store/actions/active-users-actions';\r\nimport { removeFormulaWithSocketPayloadAction } from 'store/actions/formula-actions';\r\nimport { hideElementPanelAction } from 'store/actions/panel-controller-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { setElementSelectModeDefaultAction } from 'store/actions/modes-actions';\r\nimport { updateSummaryNotesFromWebsocket } from 'store/actions/statement-summary/notes-summary-actions';\r\nimport {\r\n deleteNoteWithWebsocketPayload,\r\n notesListLoadedWithoutReponse,\r\n addNoteWithWebsocketPayload,\r\n selectNoteFromNoteListAction,\r\n updateNoteWithWebsocketPayload,\r\n} from 'store/actions/notes-panel-actions';\r\nimport Note from 'models/data/note-model';\r\nimport {\r\n removeNoteFromCacheWithSocketPayloadAction,\r\n updateNoteFromNoteCacheWithSocketPayloadAction,\r\n} from 'store/actions/notes-cache-actions';\r\nimport { setStatementNavigationRefresh } from 'store/actions/statement-navigator/navigator-panel-actions';\r\nimport {\r\n appendSectionToSectionReviewList,\r\n mergeSectionReviewToSectionReviewList,\r\n removeSectionReviewFromStore,\r\n removeBulkSectionReviewFromStore,\r\n} from 'store/actions/sections-actions';\r\nimport {\r\n appendSectionReviewHistory,\r\n fetchSectionHistoryDetails,\r\n} from 'store/actions/section-review-history-actions';\r\nimport {\r\n updateSectionAssignmentListFromSocket,\r\n replaceNewWithSocketData,\r\n updateSectionAssignmentListForBulkAssignFromSocket,\r\n updateSectionAssignmentListForBulkUnAssignFromSocket,\r\n updateSectionAssignmentInBulkFromSocket,\r\n} from 'store/actions/section-assignment-actions';\r\nimport { enableRefreshIconAction } from 'store/actions/preview-report-page-actions';\r\n\r\nimport { downloadReportAction } from 'store/actions/toolkit-export-panel-actions';\r\n\r\nimport { setHeadingAssignmentRefresh } from 'store/actions/section-assignment-heading-refresh-actions';\r\nimport {\r\n fetchComfortAnnotationListForRevisionWithoutLoading,\r\n removeElementFromComfortLetterElementsWithSocketPayloadAction,\r\n} from 'store/actions/comfort-annotations-list-actions';\r\nimport { updateCacheWithMostRecentElementChanges } from 'store/actions/element-changes-since-tracker-actions';\r\n\r\n// WEBSOCKET EVENT TYPE CONSTANTS\r\nimport { NOTIFICATION_EVENT_TYPES } from 'constants/web-socket-constants';\r\n\r\nimport {\r\n blacklineTogleNotification,\r\n getWebsocketElementsForCalloutChange,\r\n isElementHasAnyAnnotations,\r\n} from 'utils/statement-content-page-utils';\r\nimport { refetchSectionsInView } from '../../store/actions/statement-content-actions';\r\nimport { BLACKLINE_VIEW_STATUS } from '../../constants/feature/statement-content-constants';\r\nimport {\r\n getWebSocketNotificationType,\r\n getWebSocketPayload,\r\n} from 'constants/util/web-socket-utils';\r\nimport { isSignalRForSocketConnectionEnabled } from 'api/api-authentication';\r\nimport { getUserNameByUserData } from 'utils/statement-content-page-utils';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\nimport {\r\n fetchElementsBySectionOCR,\r\n fetchNotesBySectionOCR,\r\n} from 'store/actions/statement-content-actions-ocr';\r\n\r\nexport default class StatementSocketModel extends BaseModel({\r\n client: null,\r\n socketHasBeenDisconnected: true,\r\n}) {\r\n init(config = {}) {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n const client = new SignalrClient(config);\r\n return this.merge({ ...this, client });\r\n } else {\r\n const client = new SocketClient({\r\n ...config,\r\n userId: config.currentUserId,\r\n socketConnectionType: SOCKET_CONNECTION_TYPE.REVISION,\r\n });\r\n return this.merge({ ...this, client });\r\n }\r\n }\r\n\r\n setSocketClient() {\r\n if (this.client) {\r\n this.client.on('newMessage', this.onEventHandler);\r\n }\r\n return this;\r\n }\r\n\r\n stopSocketConnection() {\r\n //if application is enabled with signalr socket connection\r\n if (\r\n isSignalRForSocketConnectionEnabled &&\r\n this.client &&\r\n this.client.connection\r\n ) {\r\n this.client.connection.stop();\r\n }\r\n //if application is enabled with socket connection\r\n if (!isSignalRForSocketConnectionEnabled && this.client) {\r\n this.client._closeSocketConnection();\r\n this.client.disconnect();\r\n return this.merge({ ...this, socketHasBeenDisconnected: true });\r\n }\r\n return this;\r\n }\r\n\r\n setSocketDisconnect(payload) {\r\n return this.merge({ ...this, socketHasBeenDisconnected: payload });\r\n }\r\n\r\n onEventHandler(event) {\r\n // This dispatch and getState is from the store and will allow us to update data throughout the app\r\n const { dispatch, getState } = getStore();\r\n const storeData = getState().data;\r\n const { revision } = storeData;\r\n const {\r\n data: {\r\n currentUser,\r\n sectionPanel: { selectedSection },\r\n projectUsersList,\r\n selectedStatement,\r\n },\r\n ui: {\r\n statementPage: {\r\n panels: { right, left },\r\n statementNavigatorPanel: { elementSearchResults },\r\n modes: { blacklineViewMode },\r\n },\r\n },\r\n router: {\r\n location: { pathname },\r\n },\r\n } = getState();\r\n const { elementDetails } = storeData.elementPanel;\r\n const { internalReference } = storeData.elementPanel;\r\n const { formula } = storeData.formulaPanel;\r\n const { internalReferenceSuggestionList } =\r\n storeData.internalReferencePanel;\r\n const { elementCache } = storeData.statementContent;\r\n\r\n const _elementUpdate = (webSocketPayload) => {\r\n // this action updates the elements in the content in real time\r\n\r\n /** getWebsocketElementsForCalloutChange method will compares the previous and current(webSocketPayload) element annotations\r\n * if any annotations related changes were done on then element/s then if update the callout and marker values accordingly\r\n */\r\n const webSocketElementsData = getWebsocketElementsForCalloutChange(\r\n elementCache,\r\n webSocketPayload,\r\n );\r\n dispatch(\r\n updateElementCacheFromSocketPayloadAction(webSocketElementsData),\r\n );\r\n\r\n // this action updates the element details in the TM/WP panel\r\n // this action only gets called if the user has the TM/WP open\r\n dispatch(\r\n updateElementDetailsFromLeftPanel({\r\n elementsArray: webSocketElementsData,\r\n }),\r\n );\r\n\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n const _elementMap = webSocketPayload.reduce(\r\n (elementMap, elementData) => {\r\n const payload = { response: { data: { result: elementData } } };\r\n elementMap[elementData.id] = new ElementDetails().setLoaded(\r\n payload,\r\n );\r\n return elementMap;\r\n },\r\n {},\r\n );\r\n\r\n if (internalReferenceSuggestionList.isLoaded) {\r\n dispatch(\r\n updateSuggestedIRElementsFromListFromSocketPayloadAction(\r\n webSocketPayload,\r\n ),\r\n );\r\n }\r\n\r\n dispatch(updateInternalReferenceElementsFromSocketAction(_elementMap));\r\n\r\n // this action updates the element panel in real time if the updated element\r\n // is viewed in the element panel by the user\r\n if (webSocketElementsData.length > 0) {\r\n const element = webSocketElementsData.find(\r\n (elem) => elem.id === elementDetails.id,\r\n );\r\n if (element) {\r\n dispatch(updateElementPanelFromSocketPayload(element));\r\n }\r\n }\r\n }\r\n\r\n // this action updates the element filter list when a user makes an update to an element\r\n // this action will only be called if the elements tab is selected and if there are\r\n // element filters applied\r\n dispatch(updateElementFilterFromSocketPayload(webSocketPayload));\r\n\r\n // this action updates the selected elements in the batch panel\r\n // this action will only be called if the batch panel is open\r\n if (right === RIGHT_PANELS.BATCH) {\r\n dispatch(updateSelectedBatchElementsFromSocketAction(webSocketPayload));\r\n }\r\n\r\n // this action will determine if the element search content component will render the\r\n // filter refresh button\r\n if (elementSearchResults.isLoaded) {\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n }\r\n };\r\n\r\n const webSocketPayload = getWebSocketPayload(event);\r\n let elementToFormulasObject = {};\r\n let irElement = null;\r\n const notificationType = getWebSocketNotificationType(event);\r\n\r\n if (\r\n isElementReportPreviewPage(pathname) &&\r\n notificationType !== NOTIFICATION_EVENT_TYPES.ELEMENT_ADD &&\r\n notificationType !== NOTIFICATION_EVENT_TYPES.ELEMENT_EXCLUDE\r\n )\r\n return;\r\n\r\n switch (getWebSocketNotificationType(event)) {\r\n // case for single and batch element status updates\r\n case NOTIFICATION_EVENT_TYPES.ELEMENT_UPDATE:\r\n _elementUpdate(webSocketPayload);\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.ELEMENT_ADD:\r\n dispatch(enableRefreshIconAction());\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n dispatch(\r\n updateInternalReferenceElementsFromSocketAction(\r\n webSocketPayload.reduce((elementMap, elementData) => {\r\n const payload = { response: { data: { result: elementData } } };\r\n elementMap[elementData.id] = new ElementDetails().setLoaded(\r\n payload,\r\n );\r\n return elementMap;\r\n }, {}),\r\n ),\r\n );\r\n }\r\n\r\n const isOCRStatement = selectedStatement.isOCR;\r\n if (isOCRStatement) {\r\n dispatch(\r\n fetchElementsBySectionOCR({\r\n sectionId: webSocketPayload[0].sectionId,\r\n withoutLoading: true,\r\n }),\r\n );\r\n } else {\r\n dispatch(\r\n fetchAllSectionRenderingDataWithoutLoading({\r\n sectionId: webSocketPayload[0].sectionId,\r\n }),\r\n );\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.ELEMENT_EXCLUDE:\r\n // removes elements to selected elements in batch panel when open\r\n dispatch(enableRefreshIconAction());\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n if (right === RIGHT_PANELS.BATCH) {\r\n dispatch(\r\n removeBatchElementsFromSocketPayloadAction(webSocketPayload),\r\n );\r\n }\r\n\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n dispatch(\r\n updateInternalReferenceElementsFromSocketAction(\r\n webSocketPayload.reduce((elementMap, elementData) => {\r\n const payload = { response: { data: { result: elementData } } };\r\n elementMap[elementData.id] = new ElementDetails().setLoaded(\r\n payload,\r\n );\r\n return elementMap;\r\n }, {}),\r\n ),\r\n );\r\n\r\n // removes element from formula edit panel if the formula panel contains the removed element\r\n if (formula.data.formulaElementDtoList) {\r\n dispatch(removeFormulaWithSocketPayloadAction(webSocketPayload));\r\n }\r\n\r\n // close element panel if the element is removed\r\n if (\r\n webSocketPayload.length > 0 &&\r\n elementDetails.id === webSocketPayload[0].id\r\n ) {\r\n dispatch(hideElementPanelAction());\r\n dispatch(setElementSelectModeDefaultAction());\r\n }\r\n }\r\n\r\n if (!selectedStatement.isOCR) {\r\n // Update the content panel html thru api and not signalr\r\n dispatch(\r\n fetchSectionHTMLSegmentsStatementContentWithoutLoading({\r\n sectionIdList: Array.from(\r\n new Set(webSocketPayload.map((element) => element.sectionId)),\r\n ),\r\n segmentType: blacklineViewMode ? 'C' : 'P',\r\n }),\r\n );\r\n } else {\r\n dispatch(updateCacheWithMostRecentElementChanges());\r\n }\r\n\r\n // update WP element list if user has the Workpaper panel open\r\n if (left === LEFT_PANELS.WORKPAPER) {\r\n dispatch(\r\n fetchWorkpaperListForRevisionWithoutLoading({\r\n revisionId: revision.id,\r\n }),\r\n );\r\n dispatch(\r\n removeElementsFromElementsMapWithSocketPayloadAction(\r\n webSocketPayload,\r\n ),\r\n );\r\n }\r\n\r\n // update TM element list if user has the Tickmark panel open\r\n if (left === LEFT_PANELS.TICKMARK) {\r\n dispatch(\r\n fetchTickmarkListForRevisionWithoutLoading({\r\n revisionId: revision.id,\r\n }),\r\n );\r\n dispatch(\r\n removeElementFromTickmarkElementsMapWithSocketPayloadAction(\r\n webSocketPayload,\r\n ),\r\n );\r\n }\r\n\r\n // update Comfort Annotation elements list if user has the Comfort Annotation panel open\r\n if (left === LEFT_PANELS.COMFORT_ANNOTATION) {\r\n dispatch(\r\n fetchComfortAnnotationListForRevisionWithoutLoading({\r\n revisionId: revision.id,\r\n }),\r\n );\r\n dispatch(\r\n removeElementFromComfortLetterElementsWithSocketPayloadAction(\r\n webSocketPayload,\r\n ),\r\n );\r\n }\r\n\r\n break;\r\n\r\n // update the summary count for verified, reviewed, and flagged elements\r\n case NOTIFICATION_EVENT_TYPES.ELEMENT_SUMMARY:\r\n dispatch(updateElementSummaryFromSocketPayloadAction(webSocketPayload));\r\n break;\r\n\r\n // update the summary count for sections\r\n case NOTIFICATION_EVENT_TYPES.HEADING_SUMMARY:\r\n dispatch(updateSectionSummaryFromSocketPayloadAction(webSocketPayload));\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.FORMULA_DELETED:\r\n // remove formula from formula tab if the user has the affected element open\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n for (let i = 0; i < webSocketPayload.length; i++) {\r\n const element = webSocketPayload[i];\r\n const elementId = element.elementId;\r\n const formulasIds = element.formulaIds;\r\n elementToFormulasObject[elementId] = new Set(formulasIds);\r\n }\r\n\r\n if (elementToFormulasObject[elementDetails.id]) {\r\n dispatch(\r\n removeElementFromFormulaTabFromSocketPayloadAction(\r\n elementToFormulasObject[elementDetails.id],\r\n ),\r\n );\r\n }\r\n }\r\n\r\n // render refresh button on element search\r\n if (elementSearchResults.isLoaded) {\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n }\r\n\r\n // this action updates the selected elements in the batch panel\r\n // this action will only be called if the batch panel is open\r\n if (right === RIGHT_PANELS.BATCH) {\r\n dispatch(\r\n updateSelectedBatchElementsFromSocketAction(webSocketPayload),\r\n );\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.FORMULA_SAVED:\r\n if (\r\n webSocketPayload &&\r\n elementDetails.id === webSocketPayload.elementId\r\n ) {\r\n dispatch(\r\n addFormulaToFormulaListFromSocketPayloadAction(webSocketPayload),\r\n );\r\n }\r\n\r\n // render refresh button on element search\r\n if (elementSearchResults.isLoaded) {\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n }\r\n\r\n // this action updates the selected elements in the batch panel\r\n // this action will only be called if the batch panel is open\r\n if (right === RIGHT_PANELS.BATCH) {\r\n dispatch(\r\n updateSelectedBatchElementsFromSocketAction(webSocketPayload),\r\n );\r\n }\r\n dispatch(elementFormulaListLoadedWithoutResponse());\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: [elementDetails.id],\r\n showCallout: true,\r\n }),\r\n );\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.FORMULA_TYPE_CHANGED:\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n dispatch(\r\n getElementFormulasWithoutLoading({\r\n elementId: elementDetails.id,\r\n }),\r\n );\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.INTERNAL_REFERENCE_UPDATE:\r\n for (let i = 0; i < webSocketPayload.length; i++) {\r\n irElement = webSocketPayload[i];\r\n if (!isNullOrUndefined(irElement.id)) {\r\n const isDifferentElement =\r\n !isNullOrUndefined(irElement.internalReferenceElements) &&\r\n !isNullOrUndefined(\r\n irElement.internalReferenceElements.find(\r\n (element) => element.elementId === elementDetails.id,\r\n ),\r\n );\r\n // if its the same internal reference or the elementDetails is inside the internal reference elements list\r\n //we are going to update the IR information\r\n if (\r\n irElement.id === internalReference.data.id ||\r\n isDifferentElement\r\n ) {\r\n // if its the same internal reference id but the elements does not longer exist in the IR we are going to clear the IR info\r\n if (\r\n isNullOrUndefined(\r\n irElement.internalReferenceElements.find(\r\n (element) => element.elementId === elementDetails.id,\r\n ),\r\n )\r\n ) {\r\n dispatch(updateInternalReferenceFromSocketAction(null));\r\n } else {\r\n //update the current internal reference object on the element details stored in redux\r\n dispatch(updateInternalReferenceFromSocketAction(irElement));\r\n }\r\n //we call this action to update the suggestion for the IR panel, only if the element is part of the IR.\r\n dispatch(\r\n fetchSuggestedListedWithoutLoading({\r\n revisionId: revision.id,\r\n elementId: elementDetails.id,\r\n }),\r\n );\r\n dispatch(setInternalReferenceLoadedWithoutPayload());\r\n break;\r\n }\r\n\r\n // this action will determine if the element search content component will render the\r\n // filter refresh button\r\n if (elementSearchResults.isLoaded) {\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n }\r\n }\r\n }\r\n\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.WORKPAPER_LINKED:\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n const elementId = elementDetails.id;\r\n dispatch(\r\n elementWorkpaperListFromWebSocketPayloadAction({\r\n webSocketPayload: webSocketPayload.attachedWorkpapers,\r\n elementId,\r\n }),\r\n );\r\n }\r\n if (left === LEFT_PANELS.WORKPAPER) {\r\n dispatch(addWorkpaperToListAction(webSocketPayload));\r\n }\r\n //we call the element update function here because for WP element update event, we are not going to get anything for element update event\r\n // eslint-disable-next-line no-case-declarations\r\n let elementData;\r\n if (webSocketPayload.elementEntities) {\r\n elementData = webSocketPayload.elementEntities.map((element) => ({\r\n ...element,\r\n marker: false,\r\n callout: isElementHasAnyAnnotations(element),\r\n }));\r\n }\r\n _elementUpdate(elementData);\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.USER_JOINED_REVISION_GROUP:\r\n dispatch(\r\n addUserAfterValidatingIfIdExists({ payload: webSocketPayload }),\r\n );\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.USER_LEFT_REVISION_GROUP:\r\n dispatch(removeUserAction({ payload: webSocketPayload }));\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.WORKPAPER_UNLINKED:\r\n if (left === LEFT_PANELS.WORKPAPER) {\r\n dispatch(\r\n unlinkWorkpaperFromElementWithWebsocketPayload(webSocketPayload),\r\n );\r\n }\r\n\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n const workpaperIdSet = new Set();\r\n for (let i = 0; i < webSocketPayload.length; i++) {\r\n workpaperIdSet.add(webSocketPayload[i].workpaperRefId);\r\n }\r\n\r\n dispatch(\r\n removeWorkpaperFromElementPanelWithSocketPayload(workpaperIdSet),\r\n );\r\n dispatch(elementWorkpaperListLoadedWithoutResponse());\r\n }\r\n\r\n // this action will determine if the element search content component will render the\r\n // filter refresh button\r\n\r\n if (elementSearchResults.isLoaded) {\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.WORKPAPER_DELETED:\r\n if (left === LEFT_PANELS.WORKPAPER) {\r\n dispatch(deleteWorkpaperWithSocketPayloadAction(webSocketPayload));\r\n }\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n dispatch(removeWPFromElementPanelAction(webSocketPayload));\r\n }\r\n\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.WORKPAPER_UPDATE:\r\n if (left === LEFT_PANELS.WORKPAPER) {\r\n dispatch(updateWorkpaperWithSocketPayloadAction(webSocketPayload));\r\n }\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n dispatch(updateWPFromElementPanelAction(webSocketPayload));\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.NOTE_DELETE:\r\n /*\r\n expected payload: \r\n {\r\n \"revisionId\": 2,\r\n \"sectionId\": 13,\r\n \"noteId\": 150,\r\n \"pseudoElementId\": 1\r\n }\r\n */\r\n /*\r\n since there is no batch delete for notes, we do not need a specific payload or event type\r\n to update the Summary Notes. Therefore, we can always subtract 1 to the notes summary when \r\n a note is deleted\r\n */\r\n dispatch(updateSummaryNotesFromWebsocket(-1));\r\n\r\n // this action removes the deleted note from the note cache\r\n dispatch(removeNoteFromCacheWithSocketPayloadAction(webSocketPayload));\r\n\r\n // this action deletes the affected note from the notes panel only if the notes panel is open\r\n if (right === RIGHT_PANELS.NOTES) {\r\n dispatch(deleteNoteWithWebsocketPayload(webSocketPayload));\r\n dispatch(notesListLoadedWithoutReponse());\r\n }\r\n\r\n // this action removes the deleted note from the content only if the user has the affected section in view\r\n if (\r\n !selectedStatement.isOCR &&\r\n webSocketPayload.sectionId in elementCache\r\n ) {\r\n // take the first instance of the span tag and delete the previous sibling\r\n // which should be the note svg\r\n const parentSpan = document.querySelector(\r\n `[id*=\"CFTO_PSEUDO_ELEMENT_${webSocketPayload.pseudoElementId}\"]`,\r\n );\r\n\r\n // Check if the parent span exists\r\n if (parentSpan) {\r\n // Select the child span\r\n const childSpanWithBorder = parentSpan.querySelector('span');\r\n\r\n // Select the svg icon within the parent span\r\n const svgIcon = parentSpan.querySelector('svg');\r\n\r\n // Remove the border from the child span\r\n if (childSpanWithBorder) {\r\n childSpanWithBorder.style.border = 'none';\r\n }\r\n\r\n // Hide the svg icon\r\n if (svgIcon) {\r\n svgIcon.style.display = 'none';\r\n }\r\n }\r\n\r\n // get list of all elements with CFTO_PSEUDO_ELEMENT class\r\n let pseudoElements = document.querySelectorAll(\r\n `[class*=\"CFTO_PSEUDO_ELEMENT_${webSocketPayload.pseudoElementId}\"]`,\r\n );\r\n // remove the span tags and only render the innerHTML\r\n for (let i = 0; i < pseudoElements.length; i++) {\r\n const element = pseudoElements[i];\r\n element.outerHTML = element.innerHTML;\r\n }\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.NOTE_ADD:\r\n /*\r\n since there is no batch delete for notes, we do not need a specific payload or event type\r\n to update the Summary Notes. Therefore, we can always add 1 to the notes summary when \r\n a note is deleted\r\n */\r\n dispatch(updateSummaryNotesFromWebsocket(1));\r\n\r\n // when we add a note we still need to make this fetch call to update the content panel\r\n // we will only make this call if the affected section is in view\r\n if (\r\n webSocketPayload.sectionId in elementCache &&\r\n selectedStatement.isOCR\r\n ) {\r\n dispatch(\r\n fetchNotesBySectionOCR({\r\n sectionId: webSocketPayload.sectionId,\r\n withoutLoading: true,\r\n }),\r\n );\r\n } else if (\r\n webSocketPayload.sectionId in elementCache &&\r\n !selectedStatement.isOCR\r\n ) {\r\n dispatch(\r\n fetchAllSectionRenderingDataWithoutLoading({\r\n sectionId: webSocketPayload.sectionId,\r\n }),\r\n );\r\n }\r\n\r\n // this action adds the affected note from the notes panel only if the notes panel is open\r\n if (right === RIGHT_PANELS.NOTES) {\r\n // We need to modify the websocket payload to include additional details like parentId and isTechnical for particular section.\r\n // We expected to get these details from BE directly, but that they are facing some technical issues (inner join to fetch these\r\n // details causes ghost notes to dissappear from the list), which enforces us to fetch these details from sections cache.\r\n const { contentSectionMap } =\r\n getStore().getState().data.statementContent.sectionsCache;\r\n const sectionCacheData =\r\n contentSectionMap &&\r\n contentSectionMap.data &&\r\n contentSectionMap.data.map;\r\n let webSocketPayloadModified =\r\n sectionCacheData &&\r\n webSocketPayload.sectionId &&\r\n sectionCacheData[webSocketPayload.sectionId]\r\n ? {\r\n ...webSocketPayload,\r\n parentId:\r\n sectionCacheData[webSocketPayload.sectionId].parentId,\r\n isTechnical:\r\n sectionCacheData[webSocketPayload.sectionId].isTechnical,\r\n }\r\n : webSocketPayload;\r\n dispatch(addNoteWithWebsocketPayload(webSocketPayloadModified));\r\n dispatch(notesListLoadedWithoutReponse());\r\n\r\n // only set the new note as selected if the user that created the note matches the id in the\r\n // current user reducer\r\n if (currentUser.id === webSocketPayloadModified.noteTaker) {\r\n webSocketPayloadModified.isNew = true;\r\n dispatch(\r\n selectNoteFromNoteListAction({\r\n note: new Note(webSocketPayloadModified),\r\n }),\r\n );\r\n }\r\n }\r\n\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.NOTE_UPDATE:\r\n /*\r\n sample payload for note update. \r\n payload = {\r\n \"noteId\":1313,\r\n \"revisionId\":1140,\r\n \"sectionId\":0,\r\n \"pseudoElementId\":1,\r\n \"elementId\":-1,\r\n \"noteType\":\"I\",\r\n \"workflowStatus\":\"O\",\r\n \"closedBy\":null,\r\n \"closedByName\":null,\r\n \"body\":\"{\\\"note\\\":\\\"Nevada note\\\",\\\"replies\\\":{}}\",\r\n \"noteDate\":\"2021-09-21T19:11:48Z\",\r\n \"closedDate\":null,\r\n \"noteTaker\":130,\r\n \"noteTakerName\":\"Lakshmi Reddyreddy\",\r\n \"notePriorityType\":\"NORMAL\",\r\n \"revisionNumber\":1\r\n }\r\n\r\n NOTE: for note Updates we receive a reduced payload and not the entire note entity\r\n */\r\n\r\n if (right === RIGHT_PANELS.NOTES) {\r\n dispatch(updateNoteWithWebsocketPayload(webSocketPayload));\r\n }\r\n\r\n if (webSocketPayload.sectionId in elementCache) {\r\n dispatch(\r\n updateNoteFromNoteCacheWithSocketPayloadAction(webSocketPayload),\r\n );\r\n }\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.HEADING_UPDATE:\r\n if (currentUser.id !== webSocketPayload.updatedBy) {\r\n dispatch(setStatementNavigationRefresh(true));\r\n }\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.HEADING_REVIEW:\r\n dispatch(\r\n appendSectionToSectionReviewList(webSocketPayload.sectionReview),\r\n );\r\n if (\r\n right === RIGHT_PANELS.SECTION &&\r\n webSocketPayload &&\r\n webSocketPayload.sectionReview &&\r\n webSocketPayload.sectionReview.sectionId === selectedSection.id\r\n ) {\r\n dispatch(appendSectionReviewHistory(webSocketPayload.sectionHistory));\r\n }\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.HEADING_UNREVIEW:\r\n dispatch(\r\n removeSectionReviewFromStore({\r\n sectionId: webSocketPayload.sectionId,\r\n userId: webSocketPayload.userId,\r\n }),\r\n );\r\n if (\r\n right === RIGHT_PANELS.SECTION &&\r\n webSocketPayload.sectionId === selectedSection.id\r\n ) {\r\n dispatch(appendSectionReviewHistory(webSocketPayload));\r\n }\r\n break;\r\n default:\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.TICKMARK_UPDATE:\r\n if (left === LEFT_PANELS.TICKMARK) {\r\n dispatch(updateTickmarkWithSocketPayloadAction(webSocketPayload));\r\n }\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n dispatch(\r\n updateTickmarkInElementPanelWithSocketPayloadAction(\r\n webSocketPayload,\r\n ),\r\n );\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.TICKMARK_DELETE:\r\n if (left === LEFT_PANELS.TICKMARK) {\r\n dispatch(deleteTickmarkWithSocketPayloadAction(webSocketPayload));\r\n }\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n dispatch(\r\n removeTickmarkFromElementPanelWithSocketPayloadAction(\r\n webSocketPayload,\r\n ),\r\n );\r\n }\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.ADD_SECTION_HEADING:\r\n {\r\n let sectionAssignmentListPayload = webSocketPayload.userIds.map(\r\n (userId) => {\r\n return {\r\n revisionId: webSocketPayload.revisionId,\r\n sectionId: webSocketPayload.sectionId,\r\n userId: userId,\r\n userName: getUserNameByUserData(userId, projectUsersList.users),\r\n date: webSocketPayload.createdDate,\r\n };\r\n },\r\n );\r\n\r\n dispatch(\r\n updateSectionAssignmentListFromSocket({\r\n sectionAssignmentListPayload,\r\n sectionId: webSocketPayload.sectionId,\r\n currentUserId: currentUser.id,\r\n }),\r\n );\r\n if (\r\n right === RIGHT_PANELS.SECTION &&\r\n selectedSection.id === webSocketPayload.sectionId\r\n ) {\r\n dispatch(replaceNewWithSocketData(sectionAssignmentListPayload));\r\n dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId: webSocketPayload.revisionId,\r\n sectionId: webSocketPayload.sectionId,\r\n }),\r\n );\r\n }\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(setHeadingAssignmentRefresh(true));\r\n }\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.HEADING_DELETE:\r\n {\r\n let sectionAssignmentListPayload = []; //Sending an empty payload in case of heading delete\r\n dispatch(\r\n updateSectionAssignmentListFromSocket({\r\n sectionAssignmentListPayload,\r\n sectionId: webSocketPayload.sectionId,\r\n currentUserId: currentUser.id,\r\n }),\r\n );\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(setHeadingAssignmentRefresh(true));\r\n }\r\n }\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.TICKMARK_LINKED:\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n const elementId = elementDetails.id;\r\n dispatch(\r\n elementTickmarkListFromWebSocketPayloadAction({\r\n webSocketPayload: webSocketPayload.attachedTickmark,\r\n elementId,\r\n }),\r\n );\r\n }\r\n if (left === LEFT_PANELS.TICKMARK) {\r\n dispatch(addTickmarkToListAction(webSocketPayload));\r\n }\r\n //we call the element update function here because for tickmark element update event, we are not going to get anything for element update event\r\n _elementUpdate(webSocketPayload.elementEntities);\r\n if (elementSearchResults.isLoaded) {\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n }\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.TICKMARK_UNLINKED:\r\n if (left === LEFT_PANELS.TICKMARK) {\r\n dispatch(unlinkTickmarkFromElementWithWebsocket(webSocketPayload));\r\n }\r\n\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n const elementId = elementDetails.id;\r\n const tickmarkIdSet = new Set();\r\n for (let i = 0; i < webSocketPayload.length; i++) {\r\n webSocketPayload[i].elementId === elementId &&\r\n tickmarkIdSet.add(webSocketPayload[i].tickmarkId);\r\n }\r\n\r\n tickmarkIdSet.size > 0 &&\r\n dispatch(removeTickmarkWithSocketPayloadInBulk(tickmarkIdSet));\r\n dispatch(elementTickmarkListLoadedWithoutResponse());\r\n }\r\n\r\n // this action will determine if the element search content component will render the\r\n // filter refresh button\r\n\r\n if (elementSearchResults.isLoaded) {\r\n dispatch(showElementSearchRefreshButtonAction(true));\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.TOOLKIT_EXPORT_REPORT_STATUS:\r\n // check if the update is for concerned revisionId and userID\r\n if (\r\n webSocketPayload.revisionId === revision.id &&\r\n webSocketPayload.requestedUser === currentUser.id\r\n ) {\r\n dispatch(downloadReportAction(webSocketPayload));\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.BULK_SECTION_ASSIGN:\r\n {\r\n let sectionAssignmentListPayload = [];\r\n webSocketPayload &&\r\n webSocketPayload.sectionIds &&\r\n webSocketPayload.sectionIds.forEach((sectionId) => {\r\n webSocketPayload.userIds.forEach((userId) => {\r\n sectionAssignmentListPayload.push({\r\n revisionId: webSocketPayload.revisionId,\r\n sectionId: sectionId,\r\n userId: userId,\r\n userName: getUserNameByUserData(\r\n userId,\r\n projectUsersList.users,\r\n ),\r\n date: webSocketPayload.createdDate,\r\n });\r\n });\r\n });\r\n\r\n dispatch(\r\n updateSectionAssignmentListForBulkAssignFromSocket({\r\n sectionAssignmentListPayload,\r\n currentUserId: currentUser.id,\r\n }),\r\n );\r\n if (\r\n right === RIGHT_PANELS.SECTION &&\r\n webSocketPayload &&\r\n webSocketPayload.sectionIds &&\r\n webSocketPayload.sectionIds.includes(selectedSection.id)\r\n ) {\r\n dispatch(\r\n updateSectionAssignmentInBulkFromSocket(\r\n sectionAssignmentListPayload,\r\n ),\r\n );\r\n dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId: webSocketPayload.revisionId,\r\n sectionId: selectedSection.id,\r\n }),\r\n );\r\n }\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(setHeadingAssignmentRefresh(true));\r\n }\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.BULK_SECTION_UNASSIGN:\r\n dispatch(\r\n updateSectionAssignmentListForBulkUnAssignFromSocket({\r\n sectionAssignmentListPayload: webSocketPayload.sectionIds,\r\n currentUserId: currentUser.id,\r\n }),\r\n );\r\n if (\r\n right === RIGHT_PANELS.SECTION &&\r\n webSocketPayload &&\r\n webSocketPayload.sectionIds &&\r\n webSocketPayload.sectionIds.includes(selectedSection.id)\r\n ) {\r\n dispatch(updateSectionAssignmentInBulkFromSocket([]));\r\n dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId: webSocketPayload.revisionId,\r\n sectionId: selectedSection.id,\r\n }),\r\n );\r\n }\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(setHeadingAssignmentRefresh(true));\r\n }\r\n\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.BULK_SECTION_REVIEW:\r\n {\r\n let payloadSectionIds = [];\r\n webSocketPayload &&\r\n webSocketPayload.forEach((item) => {\r\n payloadSectionIds.push(item.sectionId);\r\n });\r\n\r\n dispatch(mergeSectionReviewToSectionReviewList(webSocketPayload));\r\n dispatch(\r\n fetchStatementSummarySections({\r\n revisionId: revision.id,\r\n }),\r\n );\r\n if (\r\n right === RIGHT_PANELS.SECTION &&\r\n webSocketPayload &&\r\n payloadSectionIds.length &&\r\n payloadSectionIds.includes(selectedSection.id)\r\n ) {\r\n dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId: revision.id,\r\n sectionId: selectedSection.id,\r\n }),\r\n );\r\n }\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(setHeadingAssignmentRefresh(true));\r\n }\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.BULK_SECTION_UNREVIEW:\r\n {\r\n let payloadSectionIds = [];\r\n\r\n webSocketPayload &&\r\n webSocketPayload.forEach((item) => {\r\n payloadSectionIds.push(item.sectionId);\r\n });\r\n\r\n dispatch(removeBulkSectionReviewFromStore(webSocketPayload));\r\n dispatch(\r\n fetchStatementSummarySections({\r\n revisionId: revision.id,\r\n }),\r\n );\r\n if (\r\n right === RIGHT_PANELS.SECTION &&\r\n webSocketPayload &&\r\n payloadSectionIds.length &&\r\n payloadSectionIds.includes(selectedSection.id)\r\n ) {\r\n dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId: revision.id,\r\n sectionId: selectedSection.id,\r\n }),\r\n );\r\n }\r\n\r\n if (left === LEFT_PANELS.STATEMENT_NAV) {\r\n dispatch(setHeadingAssignmentRefresh(true));\r\n }\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.BLACK_LINE_VIEW_GENERATED:\r\n dispatch(refetchSectionsInView());\r\n blacklineTogleNotification(BLACKLINE_VIEW_STATUS.COMPLETED);\r\n break;\r\n // TODO : Code to be uncommented when we are developing feature related to instant update of active users on statement.\r\n // case NOTIFICATION_EVENT_TYPES.USER_DISCONNECTED:\r\n // dispatch(removeUserFromRoomAction(webSocketPayload));\r\n // break;\r\n }\r\n }\r\n}\r\n","import StatementSocketModel from 'models/sockets/statement-socket-model';\r\nimport { handleActions } from 'redux-actions';\r\nimport {\r\n initStatementSocketClient,\r\n initStatementSignalrSocketClient,\r\n setStatementSocketClient,\r\n clearSocketClientInStore,\r\n stopSocketConnection,\r\n setSocketDisconnectAction,\r\n} from 'store/actions/statement-socket-actions';\r\nimport { initialStatementSocketClientUrl } from 'api/statement-socket-client-api';\r\n\r\nexport default handleActions(\r\n {\r\n [initStatementSocketClient]: (statementSocket, { payload }) => {\r\n return statementSocket.init({\r\n revisionId: payload.revisionId,\r\n projectId: payload.projectId,\r\n currentUserId: payload.currentUserId,\r\n geoCode: payload.geoCode,\r\n });\r\n },\r\n [initStatementSignalrSocketClient]: (statementSocket, { payload }) => {\r\n const { revisionId, geoCode } = payload;\r\n const url = initialStatementSocketClientUrl(revisionId);\r\n return statementSocket.init({ url, geoCode });\r\n },\r\n [setStatementSocketClient]: (statementSocket, { payload }) => {\r\n return statementSocket.setSocketClient(payload);\r\n },\r\n [setSocketDisconnectAction]: (statementSocket, { payload }) => {\r\n return statementSocket.setSocketDisconnect(payload);\r\n },\r\n [stopSocketConnection]: (statementSocket) => {\r\n return statementSocket.stopSocketConnection();\r\n },\r\n [clearSocketClientInStore]: (statementSocket, { payload }) => {\r\n return new StatementSocketModel();\r\n },\r\n },\r\n new StatementSocketModel(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n setActiveUsersLoading,\r\n setActiveUsersLoaded,\r\n setActiveUsersError,\r\n addUserAction,\r\n removeUserAction,\r\n clearActiveUsersAction,\r\n} from 'store/actions/active-users-actions';\r\nimport ActiveUsers from 'models/api/active-users-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setActiveUsersLoading]: (activeUsers) => {\r\n return activeUsers.setLoading();\r\n },\r\n [setActiveUsersLoaded]: (activeUsers, { payload }) => {\r\n return activeUsers.setLoaded(payload);\r\n },\r\n [setActiveUsersError]: (activeUsers, { payload }) => {\r\n return activeUsers.setError(payload);\r\n },\r\n [addUserAction]: (activeUsers, { payload }) => {\r\n return activeUsers.addUser(payload);\r\n },\r\n [removeUserAction]: (activeUsers, { payload }) => {\r\n return activeUsers.removeUser(payload);\r\n },\r\n [clearActiveUsersAction]: (activeUsers, { payload }) => {\r\n return new ActiveUsers();\r\n },\r\n },\r\n new ActiveUsers(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { SectionTreeList } from 'models/api/section-tree-list-model';\r\nimport {\r\n sectionTreeListLoading,\r\n sectionTreeListError,\r\n sectionTreeListLoaded,\r\n setCreateSectionAction,\r\n addNewSectionAction,\r\n removeNewSectionAction,\r\n clearSectionTreeListAction,\r\n setNewSectionIdAction,\r\n} from 'store/actions/section-tree-list-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [sectionTreeListLoading]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setLoading(payload);\r\n },\r\n [sectionTreeListLoaded]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setLoaded({ response: payload });\r\n },\r\n [sectionTreeListError]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setError(payload);\r\n },\r\n [setCreateSectionAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setIsCreateSectionModalOpen(payload);\r\n },\r\n [addNewSectionAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.addNewSectionByParentId(payload);\r\n },\r\n [removeNewSectionAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.removeNewSection(payload);\r\n },\r\n [clearSectionTreeListAction]: () => {\r\n return new SectionTreeList();\r\n },\r\n [setNewSectionIdAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setNewSectionId(payload);\r\n },\r\n },\r\n new SectionTreeList(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class CopyFormulaResult extends BaseModel({\r\n //Structure of Object\r\n elements: [\r\n // {\r\n // elementId: null,\r\n // copiedFormulaId: null,\r\n // copyFormulaStatus: null,\r\n // amount: null,\r\n // }\r\n ],\r\n}) {\r\n addFormulaResult(response) {\r\n let newElement = {\r\n elementId: response.elementId,\r\n copiedFormulaId: response.copiedFormulaId,\r\n copyFormulaStatus: response.copyFormulaStatus,\r\n amount: response.amount,\r\n };\r\n return new CopyFormulaResult({\r\n elements: [...this.elements, newElement],\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setCopyFormulaResult,\r\n clearCopyFormulaResult,\r\n} from 'store/actions/copy-formula-actions';\r\nimport CopyFormulaResult from 'models/api/copy-formula-result-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setCopyFormulaResult]: (CopyFormulaResult, { payload }) => {\r\n return CopyFormulaResult.addFormulaResult(payload);\r\n },\r\n [clearCopyFormulaResult]: () => {\r\n return new CopyFormulaResult();\r\n },\r\n },\r\n new CopyFormulaResult(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n addElementToCopyFormulaSelectionAction,\r\n clearBatchSelectedElementsAction,\r\n removeElementFromBatchSelection,\r\n} from 'store/actions/copy-formula-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport BatchUpdateElementList from 'models/data/batch-update-element-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [addElementToCopyFormulaSelectionAction]: (elements, { payload }) => {\r\n return elements.appendElement(payload);\r\n },\r\n [clearBatchSelectedElementsAction]: () => {\r\n return new BatchUpdateElementList();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new BatchUpdateElementList();\r\n },\r\n [removeElementFromBatchSelection]: (elements, { payload }) => {\r\n return elements.removeElement(payload);\r\n },\r\n },\r\n new BatchUpdateElementList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n setStatementWorkflowStepsError,\r\n setStatementWorkflowStepsLoaded,\r\n setStatementWorkflowStepsLoading,\r\n} from 'store/actions/statement-workflows-steps-actions';\r\nimport { StatementWorkflowStepsData } from 'models/api/statement-workflow-steps-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setStatementWorkflowStepsLoading]: (\r\n statementWorkflowSteps,\r\n { payload },\r\n ) => {\r\n return statementWorkflowSteps.setLoading(payload);\r\n },\r\n [setStatementWorkflowStepsLoaded]: (\r\n statementWorkflowSteps,\r\n { payload },\r\n ) => {\r\n return statementWorkflowSteps.setLoaded(payload);\r\n },\r\n [setStatementWorkflowStepsError]: (statementWorkflowSteps, { payload }) => {\r\n return statementWorkflowSteps.setError(payload);\r\n },\r\n },\r\n new StatementWorkflowStepsData(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setCopiedFormula,\r\n clearCopiedFormula,\r\n} from 'store/actions/copy-formula-actions';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setCopiedFormula]: (formulaList, { payload }) => {\r\n return payload;\r\n },\r\n [clearCopiedFormula]: (formulaList) => {\r\n return new FormulaList();\r\n },\r\n },\r\n new FormulaList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setTableMatrix,\r\n clearTableMatrix,\r\n} from 'store/actions/copy-formula-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setTableMatrix]: (tableMatrix, { payload }) => {\r\n return payload;\r\n },\r\n [clearTableMatrix]: (tableMatrix) => {\r\n return [];\r\n },\r\n },\r\n [],\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport ApiError from 'models/utils/api-error-handler-model';\r\n\r\nimport {\r\n clearApiErrorDataAction,\r\n createApiErrorDataAction,\r\n createErrorStackTraceAction,\r\n createCatchedErrorJsonAction,\r\n} from 'store/actions/api-error-handler-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [clearApiErrorDataAction]: (apiError) => {\r\n return apiError.clearErrorData();\r\n },\r\n [createApiErrorDataAction]: (apiError, { payload }) => {\r\n return apiError.updateErrorData(payload);\r\n },\r\n [createErrorStackTraceAction]: (apiError, { payload }) => {\r\n return apiError.updateErrorStackTrace(payload);\r\n },\r\n [createCatchedErrorJsonAction]: (apiError, { payload }) => {\r\n return apiError.updateCatchedErrorJson(payload);\r\n },\r\n },\r\n new ApiError(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport AuditQuestionsChecklist from 'models/api/audit-questions-checklist-api-model';\r\nimport {\r\n auditChecklistLoading,\r\n auditChecklistLoaded,\r\n auditChecklistError,\r\n auditChecklistSaveAnswer,\r\n} from 'store/actions/audit-checklist-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [auditChecklistLoading]: (auditQuestionsChecklist) => {\r\n return auditQuestionsChecklist.setLoading();\r\n },\r\n [auditChecklistLoaded]: (auditQuestionsChecklist, { payload }) => {\r\n return auditQuestionsChecklist.setLoaded(payload);\r\n },\r\n [auditChecklistError]: (auditQuestionsChecklist, payload) => {\r\n return auditQuestionsChecklist.setError(payload);\r\n },\r\n [auditChecklistSaveAnswer]: (auditQuestionsChecklist, payload) => {\r\n return auditQuestionsChecklist.updateChecklistData(payload);\r\n },\r\n },\r\n new AuditQuestionsChecklist(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setMaintenacePageLoading,\r\n setMaintenacePageLoaded,\r\n setMaintenancePageError,\r\n} from 'store/actions/admin-module-actions';\r\nimport AdminModuleMaintenanceList from 'models/data/admin-module-maintenance-page-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setMaintenacePageLoading]: (maintenancePageList) => {\r\n return maintenancePageList.setLoading();\r\n },\r\n [setMaintenacePageLoaded]: (maintenancePageList, { payload }) => {\r\n return maintenancePageList.setLoaded(payload);\r\n },\r\n [setMaintenancePageError]: (maintenancePageList, { payload }) => {\r\n return maintenancePageList.setError(payload);\r\n },\r\n },\r\n new AdminModuleMaintenanceList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n countryManagercontainerListLoading,\r\n countryManagercontainerListLoaded,\r\n countryManagercontainerListError,\r\n clearAdminPageDataAction,\r\n} from 'store/actions/admin-module-actions';\r\nimport ContainerForm from 'models/form/container-form-model';\r\n\r\nexport default handleActions(\r\n {\r\n [countryManagercontainerListLoading]: (containerList) => {\r\n return containerList.setLoading();\r\n },\r\n [countryManagercontainerListLoaded]: (containerList, { payload }) => {\r\n return containerList.setLoaded(payload);\r\n },\r\n [countryManagercontainerListError]: (containerList, { payload }) => {\r\n return containerList.setError(payload);\r\n },\r\n [clearAdminPageDataAction]: () => {\r\n return new ContainerForm();\r\n },\r\n },\r\n new ContainerForm(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n monitoringListLoading,\r\n monitoringListLoaded,\r\n monitoringListError,\r\n clearMonitoringListLoaded,\r\n setCountryOption,\r\n} from 'store/actions/admin-module-actions';\r\nimport MonitoringForm from 'models/form/monitoring-form-model';\r\n\r\nexport default handleActions(\r\n {\r\n [monitoringListLoading]: (monitoringList) => {\r\n return monitoringList.setLoading();\r\n },\r\n [monitoringListLoaded]: (monitoringList, { payload }) => {\r\n return monitoringList.setLoaded(payload);\r\n },\r\n [setCountryOption]: (monitoringList, { payload }) => {\r\n return monitoringList.setCountryOption(payload);\r\n },\r\n [monitoringListError]: (monitoringList, { payload }) => {\r\n return monitoringList.setError(payload);\r\n },\r\n [clearMonitoringListLoaded]: () => {\r\n return new MonitoringForm();\r\n },\r\n },\r\n new MonitoringForm(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setHeadingAssignmentRefresh } from 'store/actions/section-assignment-heading-refresh-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setHeadingAssignmentRefresh]: (refresh, { payload }) => {\r\n return payload;\r\n },\r\n },\r\n false,\r\n);\r\n","import BaseModel from 'models/base-model';\r\nimport { SocketClient, SOCKET_CONNECTION_TYPE } from 'socket/socketio-client';\r\nimport { SignalrClient } from 'socket/signalr-client';\r\nimport { getStore } from 'store/store';\r\nimport { statementWorkflowsLoaded } from 'store/actions/statement-workflows-actions';\r\nimport { STATEMENT_LIST_TABS } from 'constants/feature/statement-list-constants';\r\nimport { NOTIFICATION_EVENT_TYPES } from 'constants/web-socket-constants';\r\nimport {\r\n requestGetStatementList,\r\n onCopyStatementSuccess,\r\n onCopyStatementFailure,\r\n _isCopyErrorForWrongSourceProject,\r\n copyErrorNotificationForWrongSourceProject,\r\n} from 'store/actions/statement-list/statement-list-actions';\r\nimport { clearStatementWorkflows } from 'store/actions/statement-workflows-actions';\r\nimport {\r\n getWebSocketNotificationType,\r\n getWebSocketPayload,\r\n} from 'constants/util/web-socket-utils';\r\nimport { isSignalRForSocketConnectionEnabled } from 'api/api-authentication';\r\nimport { toast } from 'react-toastify';\r\nimport { updateSelectedProject } from 'store/actions/selected-project-actions';\r\n\r\nexport default class ProjectSocketModel extends BaseModel({\r\n client: null,\r\n socketHasBeenDisconnected: true,\r\n}) {\r\n init(config) {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n const client = new SignalrClient({\r\n ...config,\r\n isProjectLevelConnection: true,\r\n });\r\n return this.merge({ ...this, client, socketHasBeenDisconnected: false });\r\n } else {\r\n const client = new SocketClient({\r\n ...config,\r\n socketConnectionType: SOCKET_CONNECTION_TYPE.PROJECT,\r\n });\r\n return this.merge({ ...this, client, socketHasBeenDisconnected: false });\r\n }\r\n }\r\n\r\n setProjectSocketClient() {\r\n if (this.client) {\r\n this.client.on('newMessage', this.onEventHandler);\r\n }\r\n return this;\r\n }\r\n\r\n stopProjectSocketConnection() {\r\n //if application connected to signalr\r\n if (\r\n isSignalRForSocketConnectionEnabled &&\r\n this.client &&\r\n this.client.connection\r\n ) {\r\n this.client.connection.stop();\r\n }\r\n //if application connected to socketio\r\n if (!isSignalRForSocketConnectionEnabled && this.client) {\r\n this.client._closeSocketConnection();\r\n this.client.disconnect();\r\n return this.merge({ ...this, socketHasBeenDisconnected: true });\r\n }\r\n return this;\r\n }\r\n\r\n setProjectSocketDisconnect(payload) {\r\n return this.merge({ ...this, socketHasBeenDisconnected: payload });\r\n }\r\n\r\n onEventHandler = async (event) => {\r\n const { dispatch, getState } = getStore();\r\n const webSocketPayload = getWebSocketPayload(event);\r\n const response = {\r\n data: webSocketPayload && webSocketPayload.documentProcessWorkflowEntity,\r\n };\r\n switch (getWebSocketNotificationType(event)) {\r\n case NOTIFICATION_EVENT_TYPES.WORKFLOW_STATUS:\r\n {\r\n await dispatch(statementWorkflowsLoaded({ response }));\r\n const updatedWorkflowMap = getState().data.workflowsMap;\r\n const selectedStatementsTab =\r\n getState().data.statementList.statementListFilters.selectedTab;\r\n const { statementWorkflowSteps } = getState().ui.statementPage;\r\n if (updatedWorkflowMap) {\r\n updatedWorkflowMap.getWorkflowsListData().forEach((workflow) => {\r\n if (\r\n workflow.status ===\r\n statementWorkflowSteps.isCompletedWorkFlowStep(\r\n workflow.documentProcessTypeEnum,\r\n ).status\r\n ) {\r\n if (webSocketPayload['clientLegalHold']) {\r\n dispatch(\r\n updateSelectedProject({\r\n projectId: webSocketPayload.clientId,\r\n clientLegalHold: webSocketPayload.clientLegalHold,\r\n }),\r\n );\r\n }\r\n if (selectedStatementsTab === STATEMENT_LIST_TABS.ACTIVE)\r\n dispatch(requestGetStatementList({ withLoading: false }));\r\n dispatch(clearStatementWorkflows());\r\n }\r\n });\r\n }\r\n }\r\n break;\r\n\r\n case NOTIFICATION_EVENT_TYPES.STATEMENT_COPY_SUCCESSFUL:\r\n await dispatch(onCopyStatementSuccess());\r\n break;\r\n case NOTIFICATION_EVENT_TYPES.STATEMENT_COPY_FAILED:\r\n if (_isCopyErrorForWrongSourceProject(webSocketPayload)) {\r\n toast.error(copyErrorNotificationForWrongSourceProject());\r\n return;\r\n }\r\n await dispatch(onCopyStatementFailure());\r\n break;\r\n default:\r\n break;\r\n }\r\n };\r\n}\r\n","import ProjectSocketModel from 'models/sockets/project-socket-model';\r\nimport { handleActions } from 'redux-actions';\r\nimport {\r\n initProjectSocketIOSocketClient,\r\n initProjectSignalrSocketClient,\r\n setProjectSocketClient,\r\n clearProjectSocketClientInStore,\r\n stopProjectSocketConnection,\r\n setProjectSocketDisconnectAction,\r\n} from 'store/actions/project-socket-actions';\r\nimport { initialProjectSocketClientUrl } from 'api/project-socket-client-api';\r\n\r\nexport default handleActions(\r\n {\r\n [initProjectSocketIOSocketClient]: (projectSocket, { payload }) => {\r\n const { projectId, geoCode } = payload;\r\n return projectSocket.init({ projectId, geoCode });\r\n },\r\n [initProjectSignalrSocketClient]: (projectSocket, { payload }) => {\r\n const { projectId, geoCode } = payload;\r\n const url = initialProjectSocketClientUrl(projectId);\r\n return projectSocket.init({ url, geoCode });\r\n },\r\n [setProjectSocketClient]: (projectSocket, { payload }) => {\r\n return projectSocket.setProjectSocketClient(payload);\r\n },\r\n [setProjectSocketDisconnectAction]: (projectSocket, { payload }) => {\r\n return projectSocket.setProjectSocketDisconnect(payload);\r\n },\r\n [stopProjectSocketConnection]: (projectSocket) => {\r\n return projectSocket.stopProjectSocketConnection();\r\n },\r\n [clearProjectSocketClientInStore]: () => {\r\n return new ProjectSocketModel();\r\n },\r\n },\r\n new ProjectSocketModel(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setDownloadData,\r\n setDownloadListData,\r\n setDownloadDataLoaded,\r\n setDownloadDataLoading,\r\n setDownloadDataError,\r\n clearDownloadData,\r\n updateDownloadStatus,\r\n setReportIdLoading,\r\n setReportIdLoaded,\r\n setReportIdError,\r\n updateFlagUserDownloadedReportStatus,\r\n} from 'store/actions/toolkit-export-panel-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport ToolkitDownloadListData from 'models/api/toolkit-export-download-list-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setDownloadData]: (downloadReportData, { payload }) => {\r\n return downloadReportData.setDownloadData(payload);\r\n },\r\n [setDownloadListData]: (downloadReportData, { payload }) => {\r\n return downloadReportData.setDownloadListData(payload);\r\n },\r\n [updateDownloadStatus]: (downloadReportData, { payload }) => {\r\n return downloadReportData.updateDownloadStatus(payload);\r\n },\r\n [updateFlagUserDownloadedReportStatus]: (\r\n downloadReportData,\r\n { payload },\r\n ) => {\r\n return downloadReportData.updateFlagUserDownloadedReportStatus(payload);\r\n },\r\n [setDownloadDataLoaded]: (downloadReportData) => {\r\n return downloadReportData.setLoaded();\r\n },\r\n [setDownloadDataLoading]: (downloadReportData) => {\r\n return downloadReportData.setLoading();\r\n },\r\n [setDownloadDataError]: (downloadReportData, { payload }) => {\r\n return downloadReportData.setError(payload);\r\n },\r\n [setReportIdLoading]: (downloadReportData, { payload }) => {\r\n return downloadReportData.setReportIdLoading(payload);\r\n },\r\n [setReportIdLoaded]: (downloadReportData, { payload }) => {\r\n return downloadReportData.setReportIdLoaded(payload);\r\n },\r\n [setReportIdError]: (downloadReportData, { payload }) => {\r\n return downloadReportData.setReportIdError(payload);\r\n },\r\n [clearDownloadData]: (downloadReportData) => {\r\n return downloadReportData.clear();\r\n },\r\n [clearStatementPageStoreAction]: (downloadReportData) => {\r\n return downloadReportData.clear();\r\n },\r\n },\r\n new ToolkitDownloadListData(),\r\n);\r\n","import ElementComfortLetterList from 'models/api/element-comfort-letter-list-model';\r\nimport { handleActions } from 'redux-actions';\r\nimport {\r\n elementComfortLetterListLoading,\r\n elementComfortLetterListLoaded,\r\n elementComfortLetterListLoadedWithoutResponse,\r\n elementComfortLetterListError,\r\n} from 'store/actions/element-panel-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [elementComfortLetterListLoading]: (comfortLetterList) => {\r\n return comfortLetterList.setLoading();\r\n },\r\n [elementComfortLetterListLoaded]: (comfortLetterList, { payload }) => {\r\n return comfortLetterList.setLoaded(payload);\r\n },\r\n [elementComfortLetterListLoadedWithoutResponse]: (comfortLetterList) => {\r\n return comfortLetterList.setLoadedWithoutResponse();\r\n },\r\n [elementComfortLetterListError]: (comfortLetterList, { payload }) => {\r\n return comfortLetterList.setError(payload);\r\n },\r\n },\r\n new ElementComfortLetterList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n setAnnotationDisplayOption,\r\n resetAnnotationDisplayAndPositionOption,\r\n} from 'store/actions/annotation-display-actions';\r\nimport AnnotationDisplayOptions from 'models/data/annotation-display-filter-options-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setAnnotationDisplayOption]: (statementSumDisplayOption, { payload }) => {\r\n return statementSumDisplayOption.merge(payload);\r\n },\r\n [resetAnnotationDisplayAndPositionOption]: () => {\r\n return new AnnotationDisplayOptions();\r\n },\r\n },\r\n new AnnotationDisplayOptions(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\nimport shortid from 'shortid';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class SideBySideViewElementMap extends BaseModel({\r\n sourceStatementElementMap: new Map(), // it is having structure of the form ['element-id',{'mapKey','elementDetails'}]\r\n targetStatementElementMap: new Map(), // it is also having structure of the form ['element-id',{'mapKey','elementDetails'}]\r\n mapKeys: new Map(), // [map-key, {sourceElementId:32, targetElementId:32, sequenceNumber:2}],\r\n // sequenceNumber is the value that says - this is the nth element to get linked\r\n\r\n // elements in source and target having same map key should be considered linked.\r\n}) {\r\n get sizeOfSourceMapping() {\r\n return (\r\n (this.sourceStatementElementMap && this.sourceStatementElementMap.size) ||\r\n 0\r\n );\r\n }\r\n\r\n get sizeOfTargetMapping() {\r\n return (\r\n (this.targetStatementElementMap && this.targetStatementElementMap.size) ||\r\n 0\r\n );\r\n }\r\n\r\n getMapKey(key) {\r\n return this.mapKeys.get(key);\r\n }\r\n\r\n get mapKeyOfFirstUnmappedSourceElement() {\r\n for (const [mapKey, mapValue] of this.mapKeys) {\r\n if (mapValue && isNullOrUndefined(mapValue.sourceElementId))\r\n return mapKey;\r\n }\r\n return null;\r\n }\r\n\r\n get mapKeyOfFirstUnmappedTargetElement() {\r\n for (const [mapKey, mapValue] of this.mapKeys) {\r\n if (\r\n mapValue &&\r\n !isNullOrUndefined(mapValue.sourceElementId) &&\r\n isNullOrUndefined(mapValue.targetElementId)\r\n )\r\n return mapKey;\r\n }\r\n return null;\r\n }\r\n\r\n get lastMappedElementSequenceNumber() {\r\n let lastMappedElementDetails = [...this.mapKeys] && [...this.mapKeys].pop();\r\n\r\n return (\r\n lastMappedElementDetails && lastMappedElementDetails[1].sequenceNumber\r\n );\r\n }\r\n\r\n toApiFormat() {\r\n const elementsList = [...this.mapKeys.values()];\r\n let apiFormatResponse = [];\r\n elementsList.forEach((element) => {\r\n let object = {};\r\n object.sourceElementId = element.sourceElementId;\r\n object.targetElementId = element.targetElementId;\r\n object.elementStatus = false;\r\n apiFormatResponse.push(object);\r\n });\r\n return apiFormatResponse;\r\n }\r\n\r\n getCountOfElementsSelected() {\r\n return (\r\n this.targetStatementElementMap && this.targetStatementElementMap.size\r\n );\r\n }\r\n\r\n sideBySideSourceElementsId() {\r\n return (\r\n this.sourceStatementElementMap && [\r\n ...this.sourceStatementElementMap.keys(),\r\n ]\r\n );\r\n }\r\n\r\n sideBySideTargetElementsId() {\r\n return (\r\n this.targetStatementElementMap && [\r\n ...this.targetStatementElementMap.keys(),\r\n ]\r\n );\r\n }\r\n\r\n updateMapKeyForSourceElement(key, sourceElementId) {\r\n let existsingMapKey = this.mapKeys.get(key);\r\n\r\n // if it is a new mapping then update with sequence number.\r\n let sequenceNumber = existsingMapKey\r\n ? existsingMapKey.sequenceNumber\r\n : Number.isInteger(this.lastMappedElementSequenceNumber)\r\n ? this.lastMappedElementSequenceNumber + 1\r\n : this.mapKeys.size + 1;\r\n return this.merge({\r\n mapKeys: this.mapKeys.set(key, {\r\n ...this.getMapKey(key),\r\n sequenceNumber,\r\n sourceElementId,\r\n }),\r\n });\r\n }\r\n\r\n updateMapKeyForTargetElement(key, targetElementId) {\r\n return this.merge({\r\n mapKeys: this.mapKeys.set(key, {\r\n ...this.getMapKey(key),\r\n targetElementId: targetElementId,\r\n }),\r\n });\r\n }\r\n\r\n getSourceElementMapByElementId(sourceElementId) {\r\n if (this.sourceStatementElementMap instanceof Map)\r\n return this.sourceStatementElementMap.get(parseInt(sourceElementId));\r\n else return null;\r\n }\r\n\r\n getTargetElementMapByElementId(targetElementId) {\r\n if (this.targetStatementElementMap instanceof Map)\r\n return this.targetStatementElementMap.get(parseInt(targetElementId));\r\n else return null;\r\n }\r\n\r\n getCountForMappedSourceElement(elementId) {\r\n let sourceElementMapForId = this.getSourceElementMapByElementId(\r\n parseInt(elementId),\r\n );\r\n let mapKey = sourceElementMapForId && sourceElementMapForId.mapKey;\r\n return (\r\n mapKey &&\r\n this.mapKeys &&\r\n this.mapKeys.get(mapKey) &&\r\n this.mapKeys.get(mapKey).sequenceNumber\r\n );\r\n }\r\n\r\n getCountForMappedTargetElement(elementId) {\r\n let targetElementMapForId = this.getTargetElementMapByElementId(\r\n parseInt(elementId),\r\n );\r\n let mapKey = targetElementMapForId && targetElementMapForId.mapKey;\r\n return (\r\n mapKey &&\r\n this.mapKeys &&\r\n this.mapKeys.get(mapKey) &&\r\n this.mapKeys.get(mapKey).sequenceNumber\r\n );\r\n }\r\n\r\n // this function assumed source mapping already exists\r\n isTargetElementExistsForSourceElementId(sourceElementId) {\r\n // get source map and find map key for source elementId\r\n let sourceMap = this.getSourceElementMapByElementId(sourceElementId);\r\n let mapKey = sourceMap && sourceMap.mapKey;\r\n // Now check in the mapKey, if targetElementId exists\r\n return mapKey && this.mapKeys.get(mapKey).targetElementId;\r\n }\r\n\r\n deleteTargetMappingForMapKey(mapKey) {\r\n for (const [targetElementMapKey, targetElementMapValue] of this\r\n .targetStatementElementMap) {\r\n if (targetElementMapValue.mapKey === mapKey) {\r\n this.targetStatementElementMap.delete(targetElementMapKey);\r\n return this.targetStatementElementMap;\r\n }\r\n }\r\n\r\n // if target element does not already exists then return the original object\r\n return this.targetStatementElementMap;\r\n }\r\n\r\n deleteElementMappingForSourceElementId(sourceElementId, mapKeyToBeDeleted) {\r\n // delete source mapping\r\n this.sourceStatementElementMap.delete(sourceElementId);\r\n // then delete target mapping\r\n this.deleteTargetMappingForMapKey(mapKeyToBeDeleted);\r\n // then delete from mapKeys\r\n this.mapKeys.delete(mapKeyToBeDeleted);\r\n\r\n return this.merge({\r\n sourceStatementElementMap: this.sourceStatementElementMap,\r\n targetStatementElementMap: this.targetStatementElementMap,\r\n mapKeys: this.mapKeys,\r\n });\r\n }\r\n\r\n setSourceStatementElementMap(elementDetails) {\r\n let elementId = elementDetails && elementDetails.id;\r\n let lastMappedElementDetails = [...this.mapKeys] && [...this.mapKeys].pop();\r\n let isSourceElementAlreadyMapped =\r\n lastMappedElementDetails && lastMappedElementDetails[1].sourceElementId;\r\n let isTargetElementAlreadyMapped =\r\n lastMappedElementDetails && lastMappedElementDetails[1].targetElementId;\r\n\r\n // if source element has already been mapped and it is again clicked then it means user expects entire(both source, target and mapkey) mapping it to be deleted\r\n if (this.getSourceElementMapByElementId(elementId)) {\r\n // get mapKey first\r\n let mapKeyToBeDeleted =\r\n this.getSourceElementMapByElementId(elementId).mapKey;\r\n let toBeDeletedSourceElementId =\r\n this.getSourceElementMapByElementId(elementId).id;\r\n return this.deleteElementMappingForSourceElementId(\r\n toBeDeletedSourceElementId,\r\n mapKeyToBeDeleted,\r\n );\r\n }\r\n // if source is already mapped and corresponding target is not yet assigned then for the existing mapKey re-assign new source\r\n if (\r\n !isNullOrUndefined(isSourceElementAlreadyMapped) &&\r\n isNullOrUndefined(isTargetElementAlreadyMapped) &&\r\n elementDetails.id !== isSourceElementAlreadyMapped\r\n ) {\r\n // get existing mapKey\r\n let existingMapKey =\r\n lastMappedElementDetails && lastMappedElementDetails[0];\r\n\r\n // delete old mapped source element\r\n lastMappedElementDetails &&\r\n !isNullOrUndefined(lastMappedElementDetails[1].sourceElementId) &&\r\n this.sourceStatementElementMap.delete(\r\n lastMappedElementDetails[1].sourceElementId,\r\n );\r\n return this.merge({\r\n sourceStatementElementMap: !isNullOrUndefined(existingMapKey)\r\n ? this.sourceStatementElementMap.set(elementDetails.id, {\r\n mapKey: existingMapKey,\r\n ...elementDetails,\r\n })\r\n : this.sourceStatementElementMap,\r\n mapKeys: !isNullOrUndefined(existingMapKey)\r\n ? this.updateMapKeyForSourceElement(existingMapKey, elementDetails.id)\r\n .mapKeys\r\n : this.mapKeys,\r\n });\r\n }\r\n\r\n // if source element has not been mapped yet, and in the previous steps target element also does\r\n // not exists then create new mapping OR\r\n // if source and target mapping both exists, then we need to create another source element to be mapped to new target\r\n else if (\r\n isNullOrUndefined(isSourceElementAlreadyMapped) ||\r\n (!isNullOrUndefined(isSourceElementAlreadyMapped) &&\r\n !isNullOrUndefined(isTargetElementAlreadyMapped))\r\n ) {\r\n let newMapKey = shortid.generate();\r\n return this.merge({\r\n sourceStatementElementMap: this.sourceStatementElementMap.set(\r\n elementDetails.id,\r\n {\r\n mapKey: newMapKey,\r\n ...elementDetails,\r\n },\r\n ),\r\n mapKeys: this.updateMapKeyForSourceElement(newMapKey, elementDetails.id)\r\n .mapKeys,\r\n });\r\n }\r\n }\r\n\r\n // it is expected that target mapping is called just after source mapping has finished.\r\n // such that element linking happens in order (for each source element, target element is linked) correct.\r\n setTargetStatementElementMap(elementDetails) {\r\n let elementId = elementDetails && elementDetails.id;\r\n let mapKeyOfFirstUnmappedTargetElement =\r\n this.mapKeyOfFirstUnmappedTargetElement;\r\n\r\n let lastMappedElementDetails =\r\n [...this.mapKeys].pop() && [...this.mapKeys].pop();\r\n\r\n //Condition1: If user has clicked target element directly, then, ignore this click.\r\n // This might happen at the first click when without selecting source user has clicked target.\r\n if (\r\n isNullOrUndefined(mapKeyOfFirstUnmappedTargetElement) &&\r\n this.mapKeys.size === 0\r\n )\r\n return this;\r\n\r\n //Conditon2: if target element mapping already exists for the given element id and user again clicked on it, then remove it from the corresponding mapKeys and target element mapping\r\n let isMappingAlreadyExistsForElementId =\r\n this.getTargetElementMapByElementId(elementId);\r\n if (isMappingAlreadyExistsForElementId) {\r\n let mapKeyForDeletingTargetElementId =\r\n isMappingAlreadyExistsForElementId &&\r\n isMappingAlreadyExistsForElementId.mapKey;\r\n\r\n return this.merge({\r\n mapKeys: this.updateMapKeyForTargetElement(\r\n mapKeyForDeletingTargetElementId,\r\n undefined,\r\n ).mapKeys,\r\n targetStatementElementMap: this.deleteTargetMappingForMapKey(\r\n mapKeyForDeletingTargetElementId,\r\n ),\r\n });\r\n }\r\n\r\n //Condition 3: If user has clicked target element and all target elements are already mapped to some source, then\r\n // replace the last target element with this new element\r\n if (isNullOrUndefined(mapKeyOfFirstUnmappedTargetElement)) {\r\n // delete old target for the given map key\r\n this.deleteTargetMappingForMapKey(lastMappedElementDetails[0]);\r\n return this.merge({\r\n mapKeys: this.updateMapKeyForTargetElement(\r\n lastMappedElementDetails[0],\r\n elementId,\r\n ).mapKeys,\r\n targetStatementElementMap: this.targetStatementElementMap.set(\r\n elementId,\r\n {\r\n mapKey: lastMappedElementDetails[0],\r\n ...elementDetails,\r\n },\r\n ),\r\n });\r\n }\r\n\r\n //Condition4: if target element mapping does not exists for the last target unmapped mapKey, then add target mapping for it.\r\n else if (\r\n !isMappingAlreadyExistsForElementId &&\r\n !isNullOrUndefined(mapKeyOfFirstUnmappedTargetElement)\r\n ) {\r\n return this.merge({\r\n mapKeys: this.updateMapKeyForTargetElement(\r\n mapKeyOfFirstUnmappedTargetElement,\r\n elementId,\r\n ).mapKeys,\r\n targetStatementElementMap: this.targetStatementElementMap.set(\r\n elementId,\r\n {\r\n mapKey: mapKeyOfFirstUnmappedTargetElement,\r\n ...elementDetails,\r\n },\r\n ),\r\n });\r\n } else return this;\r\n }\r\n\r\n clearElementsMap() {\r\n return this.merge({\r\n sourceStatementElementMap: new Map(),\r\n targetStatementElementMap: new Map(),\r\n mapKeys: new Map(),\r\n });\r\n }\r\n\r\n // used to map elements from both source and target tables selection\r\n setStatementSideBySideBatchElementsMap(targetArray) {\r\n // getting all target elements which is not mapped\r\n let filteredTargetElementsByIdExists = targetArray.filter(\r\n (item) => !this.getTargetElementMapByElementId(item.id),\r\n );\r\n // getting the count of to map elements based on the source element count\r\n let mapRemainingTargetElementCount =\r\n this.sizeOfSourceMapping - this.sizeOfTargetMapping;\r\n // Using map function instead of for loop for better performance\r\n filteredTargetElementsByIdExists\r\n .slice(0, mapRemainingTargetElementCount)\r\n .map((item) => {\r\n // Checking if targetElement is not null or undefined\r\n if (item) {\r\n this.setTargetStatementElementMap(item);\r\n }\r\n });\r\n return this.merge({ data: this.data });\r\n }\r\n\r\n // used to add source table elements in sourceElementMap\r\n setSourceSideBySideBatchElementMap(elementDetails) {\r\n let elementId = elementDetails && elementDetails.id;\r\n let lastMappedElementDetails = [...this.mapKeys];\r\n let isSourceElementAlreadyMapped =\r\n lastMappedElementDetails &&\r\n lastMappedElementDetails.filter(\r\n (item) => item.sourceElementId === elementId,\r\n );\r\n // if source element has not been mapped yet, and in the previous steps target element also does\r\n // not exists then create new mapping OR\r\n // if source and target mapping both exists, then we need to create another source element to be mapped to new target\r\n if (isSourceElementAlreadyMapped.length === 0) {\r\n let newMapKey = shortid.generate();\r\n return this.merge({\r\n sourceStatementElementMap: this.sourceStatementElementMap.set(\r\n elementId,\r\n {\r\n mapKey: newMapKey,\r\n ...elementDetails,\r\n },\r\n ),\r\n mapKeys: this.updateMapKeyForSourceElement(newMapKey, elementId)\r\n .mapKeys,\r\n });\r\n }\r\n }\r\n // used to add selected source table elements only if elements is not present sourceElementMap\r\n setSourceStatementBatchElementsMap(sourceArray) {\r\n sourceArray.forEach((element, i) => {\r\n isNullOrUndefined(this.getSourceElementMapByElementId(element.id)) &&\r\n this.setSourceSideBySideBatchElementMap(element);\r\n });\r\n return this.merge({\r\n ...this.sourceStatementElementMap,\r\n ...this.mapKeys,\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\n\r\nimport {\r\n setSourceStatementElementMapAction,\r\n setTargetStatementElementMapAction,\r\n clearSideBySideElementsMap,\r\n setTargetStatementBatchElementsMapAction,\r\n setSourceStatementBatchElementsMapAction,\r\n} from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport { SideBySideViewElementMap } from 'models/data/side-by-side-view-element-map-model';\r\n\r\nexport default handleActions(\r\n {\r\n [setSourceStatementElementMapAction]: (\r\n sideBySideElementMap,\r\n { payload },\r\n ) => {\r\n return sideBySideElementMap.setSourceStatementElementMap(payload);\r\n },\r\n [setTargetStatementElementMapAction]: (\r\n sideBySideElementMap,\r\n { payload },\r\n ) => {\r\n return sideBySideElementMap.setTargetStatementElementMap(payload);\r\n },\r\n [setTargetStatementBatchElementsMapAction]: (\r\n sideBySideElementMap,\r\n { payload },\r\n ) => {\r\n return sideBySideElementMap.setStatementSideBySideBatchElementsMap(\r\n payload,\r\n );\r\n },\r\n [setSourceStatementBatchElementsMapAction]: (\r\n sideBySideElementMap,\r\n { payload },\r\n ) => {\r\n return sideBySideElementMap.setSourceStatementBatchElementsMap(payload);\r\n },\r\n [clearSideBySideElementsMap]: (sideBySideElementMap) => {\r\n return sideBySideElementMap.clearElementsMap();\r\n },\r\n },\r\n new SideBySideViewElementMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { SectionTreeList } from 'models/api/section-tree-list-model';\r\nimport {\r\n leftSectionTreeListLoading,\r\n leftSectionTreeListError,\r\n leftSectionTreeListLoaded,\r\n setCreateleftSectionAction,\r\n addNewleftSectionAction,\r\n removeNewleftSectionAction,\r\n clearleftSectionTreeListAction,\r\n setNewleftSectionIdAction,\r\n} from 'store/actions/side-by-side-statement/left-statement-section-tree-list-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [leftSectionTreeListLoading]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setLoading(payload);\r\n },\r\n [leftSectionTreeListLoaded]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setLoaded({ response: payload });\r\n },\r\n [leftSectionTreeListError]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setError(payload);\r\n },\r\n [setCreateleftSectionAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setIsCreateSectionModalOpen(payload);\r\n },\r\n [addNewleftSectionAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.addNewSectionByParentId(payload);\r\n },\r\n [removeNewleftSectionAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.removeNewSection(payload);\r\n },\r\n [clearleftSectionTreeListAction]: () => {\r\n return new SectionTreeList();\r\n },\r\n [setNewleftSectionIdAction]: (sectionTreeList, { payload }) => {\r\n return sectionTreeList.setNewSectionId(payload);\r\n },\r\n },\r\n new SectionTreeList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n replaceSelectedSectionsInLeftContentPanel,\r\n deallocateSelectedSectionsInLeftContentPanel,\r\n} from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport {\r\n clearLeftStatementContent,\r\n clearStatementPageStoreAction,\r\n} from 'store/actions/statement-content-actions';\r\nimport SelectedSectionMap from 'models/data/selected-section-map-model';\r\n\r\nexport default handleActions(\r\n {\r\n [replaceSelectedSectionsInLeftContentPanel]: (\r\n selectedSectionMap,\r\n { payload },\r\n ) => {\r\n return selectedSectionMap.replaceWithSections(payload);\r\n },\r\n [deallocateSelectedSectionsInLeftContentPanel]: (selectedSectionMap) => {\r\n return selectedSectionMap.deallocateSection();\r\n },\r\n [clearLeftStatementContent]: () => {\r\n return new SelectedSectionMap();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new SelectedSectionMap();\r\n },\r\n },\r\n new SelectedSectionMap(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n fetchLeftSectionReviewsLoaded,\r\n fetchLeftSectionReviewsError,\r\n} from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport { SectionReviewList } from 'models/api/section-review-list-api-model';\r\nimport { clearLeftStatementContent } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [fetchLeftSectionReviewsLoaded]: (SectionReviewList, { payload }) => {\r\n return SectionReviewList.setLoaded(payload);\r\n },\r\n\r\n [fetchLeftSectionReviewsError]: (SectionReviewList, { payload }) => {\r\n return SectionReviewList.setError(payload);\r\n },\r\n [clearLeftStatementContent]: () => {\r\n return new SectionReviewList();\r\n },\r\n },\r\n new SectionReviewList(),\r\n);\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class StatementSummaryElementsDisplay extends BaseModel({\r\n displayElementDetailsOnStatementPage: true,\r\n}) {\r\n setDisplayElementDetailsOnStatementPage(displayOption) {\r\n return this.merge({\r\n displayElementDetailsOnStatementPage: displayOption,\r\n });\r\n }\r\n}\r\n","import { handleActions } from 'redux-actions';\r\nimport { setHideOrDisplayElements } from 'store/actions/statement-summary/statement-summary-elements-display-actions';\r\nimport StatementSummaryElementsDisplay from 'models/data/statement-summary-elements-display-model';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setHideOrDisplayElements]: (\r\n statementSummaryElementsDisplay,\r\n { payload },\r\n ) => {\r\n return statementSummaryElementsDisplay.setDisplayElementDetailsOnStatementPage(\r\n payload,\r\n );\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new StatementSummaryElementsDisplay();\r\n },\r\n },\r\n new StatementSummaryElementsDisplay(),\r\n);\r\n","import ContentSearchResults from 'models/api/statement-content-search-results-api-model';\r\nimport { handleActions } from 'redux-actions';\r\nimport {\r\n contentSearchResultLoading,\r\n contentSearchResultLoaded,\r\n contentSearchResultError,\r\n clearContentSearchResult,\r\n setContentSearchResultSelectedIndex,\r\n} from 'store/actions/content-search-result-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [contentSearchResultLoading]: (contentSearchResult) => {\r\n return contentSearchResult.setLoading();\r\n },\r\n [contentSearchResultLoaded]: (contentSearchResult, { payload }) => {\r\n return contentSearchResult.setLoaded(payload);\r\n },\r\n [contentSearchResultError]: (contentSearchResult, { payload }) => {\r\n return contentSearchResult.setError(payload);\r\n },\r\n [setContentSearchResultSelectedIndex]: (\r\n contentSearchResult,\r\n { payload },\r\n ) => {\r\n return contentSearchResult.setSelectedIndex(payload);\r\n },\r\n [clearContentSearchResult]: () => {\r\n return new ContentSearchResults();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new ContentSearchResults();\r\n },\r\n },\r\n new ContentSearchResults(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n showStatusAndFlagAction,\r\n hideStatusAndFlagAction,\r\n} from 'store/actions/preview-report-page-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [showStatusAndFlagAction]: () => true,\r\n [hideStatusAndFlagAction]: () => false,\r\n },\r\n false,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n showElementIdAction,\r\n hideElementIdAction,\r\n} from 'store/actions/preview-report-page-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [showElementIdAction]: () => true,\r\n [hideElementIdAction]: () => false,\r\n },\r\n true,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n enableRefreshIconAction,\r\n disableRefreshIconAction,\r\n} from 'store/actions/preview-report-page-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [enableRefreshIconAction]: () => true,\r\n [disableRefreshIconAction]: () => false,\r\n },\r\n false,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n toggleSyncScrolling,\r\n setSyncScrolling,\r\n resetSyncScrolling,\r\n} from 'store/actions/preview-report-page-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [toggleSyncScrolling]: (syncScrollingMode) => {\r\n return !syncScrollingMode;\r\n },\r\n [setSyncScrolling]: () => {\r\n return true;\r\n },\r\n [resetSyncScrolling]: () => {\r\n return false;\r\n },\r\n },\r\n false,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n resetFirstElementVisibleInViewPort,\r\n setFirstElementVisibleInViewPort,\r\n} from 'store/actions/preview-report-page-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setFirstElementVisibleInViewPort]: (elementId, { payload }) => {\r\n return payload;\r\n },\r\n [resetFirstElementVisibleInViewPort]: () => null,\r\n },\r\n null,\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n blacklineSourceGuidListLoading,\r\n blacklineSourceGuidListLoaded,\r\n blacklineSourceGuidListError,\r\n resetBlacklineGuidList,\r\n} from 'store/actions/blackline-view-actions';\r\nimport { BlacklineGuidList } from 'models/api/blackline-guid-list-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [blacklineSourceGuidListLoading]: (blacklineList) => {\r\n return blacklineList.setLoading();\r\n },\r\n [blacklineSourceGuidListLoaded]: (blacklineList, { payload }) => {\r\n return blacklineList.setLoaded(payload);\r\n },\r\n [blacklineSourceGuidListError]: (blacklineList, { payload }) => {\r\n return blacklineList.setError(payload);\r\n },\r\n [resetBlacklineGuidList]: () => {\r\n return new BlacklineGuidList();\r\n },\r\n },\r\n new BlacklineGuidList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport {\r\n blacklineTargetGuidListLoading,\r\n blacklineTargetGuidListLoaded,\r\n blacklineTargetGuidListError,\r\n resetBlacklineGuidList,\r\n} from 'store/actions/blackline-view-actions';\r\nimport { BlacklineGuidList } from 'models/api/blackline-guid-list-api-model';\r\n\r\nexport default handleActions(\r\n {\r\n [blacklineTargetGuidListLoading]: (blacklineList) => {\r\n return blacklineList.setLoading();\r\n },\r\n [blacklineTargetGuidListLoaded]: (blacklineList, { payload }) => {\r\n return blacklineList.setLoaded(payload);\r\n },\r\n [blacklineTargetGuidListError]: (blacklineList, { payload }) => {\r\n return blacklineList.setError(payload);\r\n },\r\n [resetBlacklineGuidList]: () => {\r\n return new BlacklineGuidList();\r\n },\r\n },\r\n new BlacklineGuidList(),\r\n);\r\n","import { handleActions } from 'redux-actions';\r\nimport { setSideBySideSyncScroll } from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport { clearStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setSideBySideSyncScroll]: (state, { payload }) => {\r\n return payload;\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return true;\r\n },\r\n },\r\n true,\r\n);\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class SyncScrollIds extends BaseModel({\r\n sourceId: null,\r\n targetId: null,\r\n}) {\r\n get syncScrollIds() {\r\n return this;\r\n }\r\n\r\n clearSourceId() {\r\n return this.merge({\r\n sourceId: null,\r\n });\r\n }\r\n\r\n setSourceId(val) {\r\n return this.merge({\r\n sourceId: val,\r\n });\r\n }\r\n\r\n setTargetId(val) {\r\n return this.merge({\r\n targetId: val,\r\n });\r\n }\r\n}\r\n","import SyncScrollIds from 'models/api/sync-scroll-ids-modal';\r\nimport { handleActions } from 'redux-actions';\r\nimport { clearSideBySideElementsMap } from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport {\r\n clearStatementPageStoreAction,\r\n setSourceSyncScrollId,\r\n setTargetSyncScrollId,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nexport default handleActions(\r\n {\r\n [setSourceSyncScrollId]: (syncScrollIds, { payload }) => {\r\n return syncScrollIds.setSourceId(payload);\r\n },\r\n [setTargetSyncScrollId]: (syncScrollIds, { payload }) => {\r\n return syncScrollIds.setTargetId(payload);\r\n },\r\n [clearSideBySideElementsMap]: (syncScrollIds) => {\r\n return syncScrollIds.clearSourceId();\r\n },\r\n [clearStatementPageStoreAction]: () => {\r\n return new SyncScrollIds();\r\n },\r\n },\r\n new SyncScrollIds(),\r\n);\r\n","import { combineReducers } from 'redux';\r\nimport { connectRouter } from 'connected-react-router';\r\n\r\nimport projectUsersListReducer from 'store/reducers/project-users-list-reducer';\r\nimport currentUserReducer from 'store/reducers/current-user-reducer';\r\nimport featureInfoReducer from 'store/reducers/feature-info-reducer';\r\nimport authUserReducer from 'store/reducers/auth-user-reducer';\r\nimport projectListReducer from 'store/reducers/project-list-reducer';\r\nimport pinnedDetailsReducer from 'store/reducers/pinned-details-reducer';\r\nimport localeReducer from 'store/reducers/locale-reducer';\r\nimport reportPreviewPageReducer from 'store/reducers/report-preview-page-reducer';\r\nimport selectedProjectReducer from 'store/reducers/selected-project/selected-project-reducer';\r\nimport selectedProjectIdReducer from 'store/reducers/selected-project/selected-project-id-reducer';\r\nimport statementListReducer from 'store/reducers/statement-list/statement-list-reducer';\r\nimport statementWorkflowsReducer from 'store/reducers/statement-workflows/statement-workflows-reducer';\r\nimport projectIdOfWorkflowToExpandReducer from 'store/reducers/statement-workflows/workflow-project-to-expand-reducer';\r\nimport statementContentSectionIdListReducer from 'store/reducers/statement-content/statement-content-section-id-list-reducer';\r\nimport leftStatementContentSectionIdListReducer from 'store/reducers/statement-content/left-statement-content-section-id-list-reducer';\r\nimport statementContentSectionCacheReducer from 'store/reducers/statement-content/sections-cache/statement-content-sections-cache-reducer';\r\nimport leftStatementContentSectionCacheReducer from 'store/reducers/statement-content/sections-cache/left-statement-content-sections-cache-reducer';\r\nimport statementContentOCRSectionCacheReducer from 'store/reducers/statement-content/sections-cache/statement-content-section-cache-data-reducer';\r\nimport leftStatementContentOCRSectionCacheReducer from 'store/reducers/statement-content/sections-cache/left-statement-content-section-cache-data-reducer';\r\nimport blacklineCacheReducer from 'store/reducers/statement-content/sections-cache/blackline-cache-reducer';\r\nimport leftBlacklineCacheReducer from 'store/reducers/statement-content/sections-cache/left-blackline-cache-reducer';\r\nimport statementOCRNavigationReducer from 'store/reducers/statement-ocr-navigator-reducer';\r\nimport leftStatementOCRNavigationReducer from 'store/reducers/left-statement-ocr-navigator-reducer';\r\nimport statementContentSectionsInView from 'store/reducers/statement-content/statement-content-sections-in-view-reducer';\r\nimport leftStatementContentSectionsInView from 'store/reducers/statement-content/left-statement-content-sections-in-view-reducer';\r\nimport elementDetailsPeriodListReducer from 'store/reducers/statement-content/statement-content-period-list-reducer';\r\nimport sectionCacheTrackerReducer from 'store/reducers/statement-content/sections-cache/section-cache-tracker-reducer';\r\nimport leftSectionCacheTrackerReducer from 'store/reducers/statement-content/sections-cache/left-section-cache-tracker-reducer';\r\nimport ZoomReducer from 'store/reducers/zoom-reducer';\r\nimport leftZoomReducer from 'store/reducers/left-zoom-reducer';\r\nimport rightZoomReducer from 'store/reducers/right-zoom-reducer';\r\nimport statementListFiltersReducer from 'store/reducers/statement-list/statement-list-filters-reducer';\r\nimport adminModuleTabReducer from 'store/reducers/admin-module-reducer';\r\n\r\nimport addRevisionReducer from 'store/reducers/add-revision-reducer';\r\nimport revisionReducer from 'store/reducers/revision/revision-reducer';\r\nimport leftRevisionReducer from 'store/reducers/revision/left-revision-reducer';\r\nimport statementContentFiltersReducer from 'store/reducers/statement-content/statement-content-filter-reducer';\r\nimport statementContentSelectorToHighlightReducer from 'store/reducers/statement-content/statement-content-selector-to-highlight-reducer';\r\nimport elementDetailsReducer from 'store/reducers/element-panel/element-details-reducer';\r\nimport elementCacheReducer from 'store/reducers/statement-content/element-cache-reducer';\r\nimport leftElementCacheReducer from 'store/reducers/statement-content/left-element-cache-reducer';\r\nimport elementDetailsEntityListReducer from 'store/reducers/element-panel/element-details-entity-list-reducer';\r\nimport selectedElementsReducer from 'store/reducers/statement-content/selected-elements-reducer';\r\nimport leftSelectedElementsReducer from 'store/reducers/statement-content/left-selected-elements-reducer';\r\nimport highlightedElementReducer from 'store/reducers/statement-content/highlighted-element-reducer';\r\nimport blacklineHighlightedElementReducer from 'store/reducers/statement-content/blackline-highlighted-element-reducer';\r\nimport statementSummaryElementsReducer from 'store/reducers/statement-summary/elements-summary-reducer';\r\nimport AnnotationPositionUpdate from 'store/reducers/statement-summary/statement-annotations-update-reducer';\r\nimport statementSummaryNotesReducer from 'store/reducers/statement-summary/notes-summary-reducer';\r\nimport statementSummarySectionsReducer from 'store/reducers/statement-summary/sections-summary-reducer';\r\nimport statementSummaryDisplayOptionsReducer from 'store/reducers/statement-summary/statement-summary-display-options-reducer';\r\nimport contentHighlightModeReducer from 'store/reducers/modes/content-highlight-mode-reducer';\r\nimport blacklineViewModeReducer from 'store/reducers/modes/blackline-view-mode-reducer';\r\nimport blacklineViewShowElementModeReducer from 'store/reducers/modes/blackline-view-show-element-mode-reducer';\r\nimport blacklineViewSyncScrollingModeReducer from 'store/reducers/modes/blackline-view-synchronized-scrolling-mode-reducer';\r\nimport ocrCurrentViewPageNumberReducer from 'store/reducers/modes/ocr-current-view-page-number-reducer';\r\nimport leftOcrCurrentViewPageNumberReducer from 'store/reducers/modes/left-ocr-current-view-page-number-reducer';\r\nimport elementSelectModeReducer from './modes/element-select-mode-reducer';\r\nimport formulaFormReducer from 'store/reducers/formula-form-reducer';\r\nimport formulaListReducer from 'store/reducers/element-panel/formula-list-reducer';\r\nimport internalReferenceReducer from 'store/reducers/internal-reference-reducer';\r\nimport internalReferenceSuggestionListReducer from 'store/reducers/internal-reference-suggestion-list-reducer';\r\nimport elementWorkpaperListReducer from 'store/reducers/element-panel/element-workpaper-list-reducer';\r\nimport elementChangesSinceTrackerReducer from 'store/reducers/statement-content/element-changes-since-tracker-reducer';\r\nimport elementTickmarkListReducer from 'store/reducers/element-panel/element-tickmark-list-reducer';\r\nimport selectedSectionsReducer from 'store/reducers/statement-content/selected-sections-reducer';\r\nimport contentSectionMapReducer from 'store/reducers/statement-content/sections-cache/content-section-map-reducer';\r\nimport leftContentSectionMapReducer from 'store/reducers/statement-content/sections-cache/left-content-section-map-reducer';\r\nimport selectedBatchElementsReducer from 'store/reducers/batch-panel/selected-batch-elements-reducer';\r\nimport addNoteSelectionReducer from 'store/reducers/notes-panel/add-note-selection-reducer';\r\nimport notesListReducer from 'store/reducers/notes-panel/notes-list-reducer';\r\nimport currentSectionIdReducer from 'store/reducers/statement-content/current-section-reducer';\r\nimport leftCurrentSectionIdReducer from 'store/reducers/statement-content/left-current-section-reducer';\r\nimport tickmarkListPanelReducer from 'store/reducers/tickmark-list-panel-reducer';\r\nimport comfortAnnotationListPanelReducer from 'store/reducers/comfort-annotation-list-reducer';\r\nimport compareStatsPanelReducer from 'store/reducers/compare-stats-panel-reducer';\r\nimport workpaperToolkitListPanelReducer from 'store/reducers/workpaper-toolkit-list-panel-reducer';\r\nimport sectionReviewHistoryReducers from 'store/reducers/section-review-history-reducer';\r\nimport sectionAssignmentReducer from 'store/reducers/section-details-panel/section-assignment-reducer';\r\nimport sectionAssignmentsListReducer from 'store/reducers/section-assigments-list-reducer';\r\n\r\nimport selectedStatementReducer from 'store/reducers/selected-statement-reducer';\r\nimport chatBotReducer from 'store/reducers/chatbot-reducer';\r\nimport leftSelectedStatementReducer from 'store/reducers/left-selected-statement-reducer';\r\nimport sourceStatementParamsReducer from 'store/reducers/source-statement-reducer';\r\nimport sideBySideViewAnnotationsReducer from 'store/reducers/side-by-side-view-annotations-reducer';\r\nimport statementCreationPageDataReducer from 'store/reducers/statement-creation-page-data-reducer';\r\nimport selectedNoteReducer from './notes-panel/selected-note-reducer';\r\nimport notesCacheReducer from './statement-content/notes-cache-reducer';\r\nimport leftNotesCacheReducer from './statement-content/left-notes-cache-reducer';\r\nimport rightPanelControllerReducer from './right-panel-controller-reducer';\r\nimport leftPanelControllerReducer from './left-panel-controller-reducer';\r\nimport contentSearchReducer from './statement-content/content-search-reducer';\r\nimport omniaEngagementReducer from 'store/reducers/omnia/omnia-engagement-reducers';\r\nimport navigatorElementFilterReducer from './statement-navigator/element-filters-reducer';\r\nimport navigatorElementSearchResultsReducer from './statement-navigator/element-search-results-reducer';\r\nimport statementNavigationPanelReducer from './statement-navigator/statement-navigation-panel-reducer';\r\nimport TOCExpandAllReducer from './statement-navigator/TOC-expand-all-reducer';\r\nimport TOCRefreshReducer from './statement-navigator/TOC-refresh-reducer';\r\nimport setStatementNavigationRefresh from './statement-navigator/navigation-refresh-reducer';\r\nimport navigationEditModeReducer from 'store/reducers/modes/navigation-edit-mode-reducer';\r\nimport elementHistoryReducer from 'store/reducers/element-panel/element-history-reducer';\r\nimport elementsDatapartsReducer from 'store/reducers/statement-content/element-dataparts-reducer';\r\nimport leftElementsDatapartsReducer from 'store/reducers/statement-content/left-element-dataparts-reducer';\r\nimport contentViewModeReducer from 'store/reducers/modes/content-view-modes-reducer';\r\nimport sectionDetailsReducer from 'store/reducers/section-details-panel/section-details-panel-reducer';\r\nimport sectionReviewsReducer from 'store/reducers/section-reviews-reducer';\r\nimport cancelModalReducer from 'store/reducers/panel-cancel-modal-reducer';\r\nimport statementSocketReducer from 'store/reducers/statement-socket-reducer';\r\nimport activeUsersReducer from 'store/reducers/active-users-reducer';\r\nimport sectionTreeListReducer from 'store/reducers/section-tree-list-reducer';\r\nimport copyFormulaResultReducer from './copy-formula-result-reducer';\r\nimport copyFormulaSelected from './copy-formula-selected-elements-reducer';\r\nimport statementWorkflowStepsReducer from 'store/reducers/statement-workflows-steps-reducer';\r\nimport copyformulaReducer from 'store/reducers/copy-formula-reducer';\r\nimport copyformulaTableMatrixReducer from 'store/reducers/copy-formula-table-matrix-reducer';\r\n\r\nimport apiErrorReducer from 'store/reducers/api-error-handler-reducers';\r\nimport auditChecklistReducer from 'store/reducers/audit-checklist-reducer';\r\nimport adminModuleMaintenancePageReducer from 'store/reducers/admin-module-maintenance-page-reducer';\r\nimport countryManagerContainerListReducer from 'store/reducers/admin-module-country-list-reducer';\r\nimport monitoringListReducer from 'store/reducers/admin-module-monitoring-reducer';\r\nimport sectionAssignmentHeadingRefreshReducer from 'store/reducers/section-details-panel/section-assignment-heading-refresh-reducer';\r\nimport projectSocketReducer from 'store/reducers/project-socket-reducer';\r\nimport downloadProgressToolkitReducer from 'store/reducers/toolkit-export-panel/toolkit-report-download-progress-reducer';\r\nimport elementComfortLetterListReducer from './element-panel/element-comfort-letter-list-reducer';\r\nimport annotationDisplayOptionsReducer from './annotation-display-options-reducer';\r\nimport sideBySideElementMapReducer from './side-by-side-statement-view/side-by-side-element-map-reducer';\r\nimport leftSectionTreeListReducer from 'store/reducers/left-statement-section-tree-list-reducer';\r\nimport leftStatementSelectedSectionReducer from 'store/reducers/side-by-side-statement-view/left-statement-selected-sections-reducer';\r\nimport leftStatementSectionReviewsReducer from './side-by-side-statement-view/left-statement-section-reviews-reducer';\r\nimport statementSummaryElementsDisplay from 'store/reducers/statement-summary/statement-summary-elements-display-reducer';\r\nimport contentSearchResultReducer from 'store/reducers/content-search-result-reducer';\r\nimport showStatusAndFlagReducer from './reportPreviewPage/show-status-and-flag-reducer';\r\nimport showElementIdReducer from './reportPreviewPage/show-element-id-reducer';\r\nimport enableRefreshIconReducer from './reportPreviewPage/enable-refresh-icon-reducer';\r\nimport syncScrollReducer from './reportPreviewPage/sync-scroll-reducer';\r\nimport visibleFirstElementFromTopReducer from './reportPreviewPage/visible-first-element-from-top-reducer';\r\nimport BlacklineSourceGuidListReducer from 'store/reducers/blackline-source-guid-list-reducer';\r\nimport BlacklineTargetGuidListReducer from 'store/reducers/blackline-target-guid-list-reducer';\r\nimport sideBySideSyncScrollReducer from 'store/reducers/modes/side-by-side-sync-scroll-reducer';\r\nimport syncScrollIdsReducer from 'store/reducers/modes/sync-scroll-ids-reducer';\r\n\r\nexport default (history) =>\r\n combineReducers({\r\n data: combineReducers({\r\n activeUsers: activeUsersReducer,\r\n sectionTreeList: sectionTreeListReducer,\r\n currentUser: currentUserReducer,\r\n featureInfo: featureInfoReducer,\r\n authUser: authUserReducer,\r\n projectUsersList: projectUsersListReducer,\r\n projectList: projectListReducer,\r\n pinnedDetails: pinnedDetailsReducer,\r\n selectedProject: combineReducers({\r\n id: selectedProjectIdReducer,\r\n project: selectedProjectReducer,\r\n }),\r\n statementList: combineReducers({\r\n statementList: statementListReducer,\r\n statementListFilters: statementListFiltersReducer,\r\n revision: addRevisionReducer,\r\n }),\r\n statementSummary: combineReducers({\r\n elements: statementSummaryElementsReducer,\r\n notes: statementSummaryNotesReducer,\r\n sections: statementSummarySectionsReducer,\r\n displayOptions: statementSummaryDisplayOptionsReducer,\r\n annotationPosition: AnnotationPositionUpdate,\r\n statementSummaryElementsDisplay: statementSummaryElementsDisplay,\r\n }),\r\n annotationDisplayOptions: annotationDisplayOptionsReducer,\r\n workflowsMap: statementWorkflowsReducer,\r\n statementContent: combineReducers({\r\n sectionIdList: statementContentSectionIdListReducer,\r\n sectionsCache: combineReducers({\r\n cache: statementContentSectionCacheReducer,\r\n ocrCache: statementContentOCRSectionCacheReducer,\r\n tracker: sectionCacheTrackerReducer,\r\n contentSectionMap: contentSectionMapReducer,\r\n blacklineCache: blacklineCacheReducer,\r\n }),\r\n elementCache: elementCacheReducer,\r\n notesCache: notesCacheReducer,\r\n statementContentFilters: statementContentFiltersReducer,\r\n elementChangesSinceTracker: elementChangesSinceTrackerReducer,\r\n elementsDataparts: elementsDatapartsReducer,\r\n }),\r\n leftStatementContent: combineReducers({\r\n leftSectionIdList: leftStatementContentSectionIdListReducer,\r\n leftSectionsCache: combineReducers({\r\n leftCache: leftStatementContentSectionCacheReducer,\r\n leftOcrCache: leftStatementContentOCRSectionCacheReducer,\r\n leftTracker: leftSectionCacheTrackerReducer,\r\n leftContentSectionMap: leftContentSectionMapReducer,\r\n leftBlacklineCache: leftBlacklineCacheReducer,\r\n }),\r\n leftNotesCache: leftNotesCacheReducer,\r\n leftElementCache: leftElementCacheReducer,\r\n leftElementsDataparts: leftElementsDatapartsReducer,\r\n leftSectionTreeList: leftSectionTreeListReducer,\r\n leftSelectedSection: leftStatementSelectedSectionReducer,\r\n leftSectionReviewsList: leftStatementSectionReviewsReducer,\r\n }),\r\n elementPanel: combineReducers({\r\n elementDetails: elementDetailsReducer,\r\n entityList: elementDetailsEntityListReducer,\r\n periodList: elementDetailsPeriodListReducer,\r\n formulaList: formulaListReducer,\r\n internalReference: internalReferenceReducer,\r\n workpaperList: elementWorkpaperListReducer,\r\n comfortLetterList: elementComfortLetterListReducer,\r\n tickmarkList: elementTickmarkListReducer,\r\n elementHistory: elementHistoryReducer,\r\n }),\r\n formulaPanel: combineReducers({\r\n formula: formulaFormReducer,\r\n }),\r\n copyFormula: combineReducers({\r\n copiedFormula: copyformulaReducer,\r\n tableMatrix: copyformulaTableMatrixReducer,\r\n copyFormulaResult: copyFormulaResultReducer,\r\n copyFormulaSelectedElement: copyFormulaSelected,\r\n }),\r\n internalReferencePanel: combineReducers({\r\n internalReference: internalReferenceReducer,\r\n internalReferenceSuggestionList: internalReferenceSuggestionListReducer,\r\n }),\r\n batchPanel: combineReducers({\r\n batchElementList: selectedBatchElementsReducer,\r\n }),\r\n revision: revisionReducer,\r\n leftRevision: leftRevisionReducer,\r\n notesPanel: combineReducers({\r\n selectedNote: selectedNoteReducer,\r\n addNoteSelection: addNoteSelectionReducer,\r\n notesList: notesListReducer,\r\n }),\r\n sectionPanel: combineReducers({\r\n selectedSection: sectionDetailsReducer,\r\n sectionReviewList: sectionReviewsReducer,\r\n sectionAssignmentsList: sectionAssignmentsListReducer,\r\n sectionReviewHistory: sectionReviewHistoryReducers,\r\n sectionAssignments: sectionAssignmentReducer,\r\n }),\r\n tickmarkPanel: tickmarkListPanelReducer,\r\n comfortAnnotationPanel: comfortAnnotationListPanelReducer,\r\n comparePanel: combineReducers({\r\n allStats: compareStatsPanelReducer,\r\n }),\r\n toolkitExportPanel: combineReducers({\r\n downloadProgressData: downloadProgressToolkitReducer,\r\n }),\r\n omniaEngagement: omniaEngagementReducer,\r\n selectedStatement: selectedStatementReducer,\r\n chatBot: chatBotReducer,\r\n leftSelectedStatement: leftSelectedStatementReducer,\r\n workpaperToolkit: workpaperToolkitListPanelReducer,\r\n apiError: apiErrorReducer,\r\n auditChecklistData: auditChecklistReducer,\r\n adminModuleCurrentTab: adminModuleTabReducer,\r\n adminModuleMaintenacePageData: adminModuleMaintenancePageReducer,\r\n countryManagerContainerList: countryManagerContainerListReducer,\r\n monitoringList: monitoringListReducer,\r\n sectionAssignmentHeadingRefresh: sectionAssignmentHeadingRefreshReducer,\r\n contentSearchResult: contentSearchResultReducer,\r\n blacklineSourceGuidList: BlacklineSourceGuidListReducer,\r\n blacklineTargetGuidList: BlacklineTargetGuidListReducer,\r\n }),\r\n ui: combineReducers({\r\n locale: localeReducer,\r\n sourceStatementParams: sourceStatementParamsReducer,\r\n sideBySideView: combineReducers({\r\n sideBySideElementMap: sideBySideElementMapReducer,\r\n sideBySideViewAnnotations: sideBySideViewAnnotationsReducer,\r\n }),\r\n statementPage: combineReducers({\r\n panels: combineReducers({\r\n right: rightPanelControllerReducer,\r\n left: leftPanelControllerReducer,\r\n }),\r\n statementWorkflowSteps: statementWorkflowStepsReducer,\r\n statementCreationPageData: statementCreationPageDataReducer,\r\n zoom: ZoomReducer,\r\n leftZoom: leftZoomReducer,\r\n rightZoom: rightZoomReducer,\r\n sectionsInView: statementContentSectionsInView,\r\n leftSectionsInView: leftStatementContentSectionsInView,\r\n currentSectionIds: currentSectionIdReducer,\r\n leftCurrentSectionIds: leftCurrentSectionIdReducer,\r\n selectedElementsMap: selectedElementsReducer,\r\n leftSelectedElementsMap: leftSelectedElementsReducer,\r\n selectedSectionsMap: selectedSectionsReducer,\r\n contentHighlightSelector: statementContentSelectorToHighlightReducer,\r\n syncScrollIds: syncScrollIdsReducer,\r\n modes: combineReducers({\r\n selectMode: elementSelectModeReducer,\r\n highlightMode: contentHighlightModeReducer,\r\n blacklineViewMode: blacklineViewModeReducer,\r\n blacklineViewShowElementMode: blacklineViewShowElementModeReducer,\r\n blacklineViewSyncScrollingMode: blacklineViewSyncScrollingModeReducer,\r\n navigationEditMode: navigationEditModeReducer,\r\n contentViewMode: contentViewModeReducer,\r\n ocrCurrentViewPageNumber: ocrCurrentViewPageNumberReducer,\r\n leftOcrCurrentViewPageNumber: leftOcrCurrentViewPageNumberReducer,\r\n sideBySideSyncScroll: sideBySideSyncScrollReducer,\r\n }),\r\n contentSearch: contentSearchReducer,\r\n statementNavigatorPanel: combineReducers({\r\n elementFilters: navigatorElementFilterReducer,\r\n elementSearchResults: navigatorElementSearchResultsReducer,\r\n selectedTab: statementNavigationPanelReducer,\r\n TOCExpandAll: TOCExpandAllReducer,\r\n TOCRefresh: TOCRefreshReducer,\r\n showNavigationRefreshButton: setStatementNavigationRefresh,\r\n statementOCRNavigation: statementOCRNavigationReducer,\r\n leftStatementOCRNavigation: leftStatementOCRNavigationReducer,\r\n }),\r\n highlightedElementId: highlightedElementReducer,\r\n blacklineHighlightedElementId: blacklineHighlightedElementReducer,\r\n cancelModal: cancelModalReducer,\r\n }),\r\n homepage: combineReducers({\r\n projectIdOfWorkflowToExpand: projectIdOfWorkflowToExpandReducer,\r\n }),\r\n reportPreviewPage: reportPreviewPageReducer,\r\n previewPage: combineReducers({\r\n shouldShowStatusAndFlag: showStatusAndFlagReducer,\r\n shouldShowElementId: showElementIdReducer,\r\n shouldEnableRefreshIcon: enableRefreshIconReducer,\r\n isSyncScrollingEnabled: syncScrollReducer,\r\n visibleFirstElementFromTop: visibleFirstElementFromTopReducer,\r\n }),\r\n }),\r\n sockets: combineReducers({\r\n statementSocket: statementSocketReducer,\r\n projectSocket: projectSocketReducer,\r\n }),\r\n router: connectRouter(history),\r\n });\r\n","import { applyMiddleware, compose, createStore } from 'redux';\r\nimport { createBrowserHistory } from 'history';\r\nimport { routerMiddleware } from 'connected-react-router';\r\nimport thunkMiddleware from 'redux-thunk';\r\nimport adobeAnalyticsMiddleware from './middlewares/adobe-analytics-middleware';\r\n\r\nimport createRootReducer from 'store/reducers/root-reducer';\r\n\r\nexport const history = createBrowserHistory();\r\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\r\n\r\nlet store = null;\r\n\r\n/* Note: It is important that this function be called BEFORE accessing the exported store variable. \r\nIt is already called from the app-component.jsx file, please be wary of using the store variable directly*/\r\nexport default function configureStore(initialState) {\r\n store = createStore(\r\n createRootReducer(history),\r\n initialState,\r\n composeEnhancers(\r\n applyMiddleware(\r\n routerMiddleware(history),\r\n thunkMiddleware,\r\n adobeAnalyticsMiddleware,\r\n ),\r\n ),\r\n );\r\n return store;\r\n}\r\n\r\n/* This function is used to get a reference to the store in a javascript file, as a side effect, \r\nit initializes the store if it does not already exist.*/\r\nexport function getStore() {\r\n if (!store) {\r\n configureStore({});\r\n }\r\n return store;\r\n}\r\n","import React from 'react';\r\nimport { UNIT_TYPES } from 'constants/feature/element-attribute-constants';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { TooltipOptions } from '../../models/utils/common/tooltip-options-model';\r\nimport { getElementResultByNumberFormat } from 'utils/formula-utils';\r\n\r\nexport const FORMULA_MANUAL_NUMBER_REGEX = /^-?[0-9.,\\b]*$/;\r\n\r\nexport const MATH_EXPRESSION_EVAL_INFINITY_RESULT = 'Infinity';\r\n\r\nexport const SUPPORTED_NUMBER_LENGTH = 15;\r\nexport const ROUND_NUMBER_ICON_WIDTH = '8px';\r\nexport const ROUND_NUMBER_ICON_HEIGHT = '6px';\r\n\r\nexport const FORMULA_ELEMENT_CARRY_FORWARD_STATUS_TYPES = {\r\n NEW: 0,\r\n UNCHANGED: 1,\r\n CONTEXT_CHANGED: 2,\r\n VALUE_CHANGED: 3,\r\n MISSING: 4,\r\n};\r\n\r\nexport const getOriginalComputedValueTooltip = (value) => {\r\n return new TooltipOptions({\r\n text: {\r\n id: 'formula-panel.rounded-number-original-value.tooltip',\r\n values: { lineBreak:
, value: value },\r\n },\r\n id: 'formula-panel-original-computed-amount-tool-tip',\r\n position: 'top',\r\n });\r\n};\r\n\r\nexport const FORMULA_OPERATOR_OPTIONS_MAP = new Map();\r\nFORMULA_OPERATOR_OPTIONS_MAP.set(\r\n '=',\r\n new MenuOption({\r\n id: 'formula-operator-equal',\r\n title: '=',\r\n value: '=',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_OPERATOR_OPTIONS_MAP.set(\r\n '<',\r\n new MenuOption({\r\n id: 'formula-operator-less-than',\r\n title: '<',\r\n value: '<',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_OPERATOR_OPTIONS_MAP.set(\r\n '>',\r\n new MenuOption({\r\n id: 'formula-operator-greater-than',\r\n title: '>',\r\n value: '>',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_OPERATOR_OPTIONS_MAP.set(\r\n '<=',\r\n new MenuOption({\r\n id: 'formula-operator-less-than-equal',\r\n title: '<=',\r\n value: '<=',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_OPERATOR_OPTIONS_MAP.set(\r\n '>=',\r\n new MenuOption({\r\n id: 'formula-operator-greater-than-equal',\r\n title: '>=',\r\n value: '>=',\r\n isIntl: false,\r\n }),\r\n);\r\n\r\nexport const FORMULA_OPERATOR_TYPE_OPTIONS = Array.from(\r\n FORMULA_OPERATOR_OPTIONS_MAP.values(),\r\n);\r\n\r\nexport const FORMULA_CREATION_TYPES = {\r\n MANUAL: 'MANUAL',\r\n SYSTEM: 'SYSTEM', // TODO perhaps rename once we integrate with SYSTEM formulas\r\n AUTOMATION: 'AUTOMATION',\r\n UNKNOWN: 'UNKNOWN',\r\n};\r\n\r\nexport const FORMULA_TYPES = {\r\n F: 'f',\r\n CF: 'cf',\r\n RX: 'rx', //TODO: Refactor this once we more clearly defined what these types mean.\r\n};\r\n\r\nexport const FORMULA_TYPES_MAP = new Map();\r\nFORMULA_TYPES_MAP.set('f', FORMULA_TYPES.F);\r\nFORMULA_TYPES_MAP.set('cf', FORMULA_TYPES.CF);\r\nFORMULA_TYPES_MAP.set('rx', FORMULA_TYPES.RX);\r\n\r\nexport const FORMULA_ROW_TYPES = {\r\n NUMBER: 'NUMBER',\r\n ELEMENT: 'ELEMENT',\r\n OPERATOR: 'OPERATOR',\r\n};\r\n\r\nexport const FORMULA_ROW_TYPES_MAP = new Map();\r\nFORMULA_ROW_TYPES_MAP.set('NUMBER', FORMULA_ROW_TYPES.NUMBER);\r\nFORMULA_ROW_TYPES_MAP.set('ELEMENT', FORMULA_ROW_TYPES.ELEMENT);\r\nFORMULA_ROW_TYPES_MAP.set('OPERATOR', FORMULA_ROW_TYPES.OPERATOR);\r\n\r\nexport const FORMULA_ROW_OPERATOR_OPTIONS_MAP = new Map();\r\nFORMULA_ROW_OPERATOR_OPTIONS_MAP.set(\r\n '+',\r\n new MenuOption({\r\n id: 'formula-row-operator-addition',\r\n title: '+',\r\n value: '+',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_ROW_OPERATOR_OPTIONS_MAP.set(\r\n '-',\r\n new MenuOption({\r\n id: 'formula-row-operator-subtraction',\r\n title: '-',\r\n value: '-',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_ROW_OPERATOR_OPTIONS_MAP.set(\r\n '/',\r\n new MenuOption({\r\n id: 'formula-row-operator-division',\r\n title: '/',\r\n value: '/',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_ROW_OPERATOR_OPTIONS_MAP.set(\r\n '*',\r\n new MenuOption({\r\n id: 'formula-row-operator-multiplication',\r\n title: '*',\r\n value: '*',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_ROW_OPERATOR_OPTIONS_MAP.set(\r\n ')',\r\n new MenuOption({\r\n id: 'formula-row-operator-close-parenthesis',\r\n title: ')',\r\n value: ')',\r\n isIntl: false,\r\n }),\r\n);\r\nFORMULA_ROW_OPERATOR_OPTIONS_MAP.set(\r\n '(',\r\n new MenuOption({\r\n id: 'formula-row-operator-open-parenthesis',\r\n title: '(',\r\n value: '(',\r\n isIntl: false,\r\n }),\r\n);\r\n\r\nexport const FORMULA_ROW_OPERATOR_OPTIONS = Array.from(\r\n FORMULA_ROW_OPERATOR_OPTIONS_MAP.values(),\r\n);\r\n\r\nexport const getResultDisplay = ({ result, units, numberFormatId }) => {\r\n let numberIsInfinity = false;\r\n\r\n if (typeof result === 'number' && /e[+-]/.test(result.toString())) {\r\n numberIsInfinity = true;\r\n } else {\r\n numberIsInfinity = false;\r\n }\r\n const resultString = result.toString(); // result don't always come as str\r\n let unformattedResult = result;\r\n const isResultNegative = resultString[0] === '-';\r\n\r\n if (!numberIsInfinity && resultString.indexOf('.') !== -1) {\r\n /** Checking for negative number scenarios */\r\n const splitResultString = resultString.split('.');\r\n const decimalResultCount =\r\n splitResultString[0].length + splitResultString[1].length;\r\n if (decimalResultCount < SUPPORTED_NUMBER_LENGTH) {\r\n unformattedResult = result;\r\n } else if (isResultNegative) {\r\n // We want to return negative numbers with char count still 15\r\n unformattedResult = resultString.substr(0, SUPPORTED_NUMBER_LENGTH + 2);\r\n // We don't want the decimal displayed if it's the last char\r\n if (unformattedResult.slice(-1) === '.') {\r\n unformattedResult = resultString.substr(0, SUPPORTED_NUMBER_LENGTH + 1);\r\n }\r\n } else {\r\n unformattedResult = resultString.substr(0, SUPPORTED_NUMBER_LENGTH + 1);\r\n // We don't want the decimal displayed if it's the last char\r\n if (unformattedResult.slice(-1) === '.') {\r\n unformattedResult = resultString.substr(0, SUPPORTED_NUMBER_LENGTH);\r\n }\r\n }\r\n } else if (\r\n numberIsInfinity ||\r\n result === MATH_EXPRESSION_EVAL_INFINITY_RESULT ||\r\n (isResultNegative && resultString.length > SUPPORTED_NUMBER_LENGTH + 1) ||\r\n isNaN(result) ||\r\n (!isResultNegative && resultString.length > SUPPORTED_NUMBER_LENGTH)\r\n ) {\r\n return ;\r\n }\r\n const formattedResult = getElementResultByNumberFormat(\r\n unformattedResult,\r\n numberFormatId,\r\n );\r\n\r\n const formulaResult = formattedResult || 0;\r\n\r\n switch (units && units.value) {\r\n case UNIT_TYPES.CURRENCY:\r\n return (\r\n \r\n );\r\n case UNIT_TYPES.PERCENTAGE:\r\n return (\r\n \r\n );\r\n case UNIT_TYPES.SHARES:\r\n return (\r\n \r\n );\r\n default:\r\n return `${formulaResult}`;\r\n }\r\n};\r\n","import React from 'react';\r\nimport { createAction } from 'redux-actions';\r\nimport {\r\n sofDeleteCurrentRevisionRequest,\r\n softDeleteAllRevisionsRequest,\r\n permanentlyDeleteRevisionRequest,\r\n permanentlyDeleteAllSoftDeletedRevisionsForStatementRequest,\r\n getStatementListRequest,\r\n exportWorkpaperStatementRequest,\r\n exportElementReportRequest,\r\n exportAuditTrailRequest,\r\n exportComfortLetterReportRequest,\r\n exportClientNotesRequest,\r\n copyStatementRequest,\r\n exportCustomReportRequest,\r\n exportWorkpaperStatementRequestFallback,\r\n exportElementReportRequestFallback,\r\n exportAuditTrailRequestFallback,\r\n exportClientNotesRequestFallback,\r\n exportCustomReportRequestFallback,\r\n exportComfortLetterReportRequestFallback,\r\n} from 'api/statement-list-api';\r\nimport {\r\n uploadRevisionRequest,\r\n editStatementRequest,\r\n} from 'api/statement-creation-edit-api';\r\nimport { ROUTE_CONSTANTS, parseRoute } from 'constants/util/route-constants';\r\nimport { push } from 'connected-react-router';\r\nimport {\r\n STATEMENT_LIST_TABS,\r\n STATEMENT_LIST_SORT_COLUMN_KEYS,\r\n} from 'constants/feature/statement-list-constants';\r\nimport {\r\n setProjectIdWorkflowExpanded,\r\n getStatementWorkflowsWithoutLoading,\r\n} from 'store/actions/statement-workflows-actions';\r\nimport {\r\n setCurrentStatementListTab,\r\n setStatementListSort,\r\n initStatementListFilters,\r\n} from 'store/actions/statement-list/statement-list-filters-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { DataGridSort } from 'components/common/data-grid/data-grid-component';\r\nimport {\r\n EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n EXPORT_PAGE_SIZE_ID,\r\n} from 'constants/feature/statement-content-constants';\r\nimport { toast } from 'react-toastify';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Information } from 'icons/info.svg';\r\n\r\nimport Notification from 'components/common/notification-component';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button-red.svg';\r\nimport {\r\n downloadReportNotification,\r\n NOTIFICATION_TYPE,\r\n} from 'utils/statement-content-page-utils';\r\nimport { reportProcessingRequestAction } from '../toolkit-export-panel-actions';\r\nimport { downloadFile } from '../../../utils/statement-export-utils';\r\nimport { NOT_ACCEPTABLE } from 'http-status-codes';\r\n\r\nexport const REPORT_TYPES = {\r\n WORKPAPER: 'Workpaper statement',\r\n ELEMENT_REPORT: 'Element',\r\n CLIENT_NOTES: 'Client notes',\r\n BUILD_CUSTOMIZED_REPORT: 'Custom',\r\n AUDIT_TRAIL_REPORT: 'Audit',\r\n COMFORT_LETTER_REPORT: 'Comfort letter',\r\n};\r\n\r\nconst AUDIT_TRAIL_REPORT = `${REPORT_TYPES.AUDIT_TRAIL_REPORT} Trail}`;\r\n\r\nexport const ERROR_TEXT_FOR_COPY_FAILURE_DUE_TO_WRONG_SOURCE_CLIENT =\r\n 'tieout source project can only copy statement to the project where it came from';\r\n\r\nexport const _isCopyErrorForWrongSourceProject = (rootCause) =>\r\n rootCause.includes(ERROR_TEXT_FOR_COPY_FAILURE_DUE_TO_WRONG_SOURCE_CLIENT);\r\n\r\nexport const copyErrorNotificationForWrongSourceProject = () => (\r\n }\r\n message={{\r\n id: 'notifications.source-statement.copy-error.message',\r\n }}\r\n title={{ id: 'notifications.copy-statement.error.title' }}\r\n />\r\n);\r\n\r\nexport const clearStatementList = createAction('CLEAR_STATEMENT_LIST');\r\nexport const statementListLoading = createAction('STATEMENT_LIST_LOADING');\r\nexport const statementListError = createAction('STATEMENT_LIST_ERROR');\r\nexport const statementListLoaded = createAction('STATEMENT_LIST_LOADED');\r\nexport const softDeleteCurrentRevisionError = createAction(\r\n 'DELETE_CURRENT_REVISION_ERROR',\r\n);\r\nexport const softDeleteAllRevisionsError = createAction(\r\n 'DELETE_ALL_REVISIONS_ERROR',\r\n);\r\nexport const permanentlyDeleteCurrentRevisionError = createAction(\r\n 'PERMANENTLY_DELETE_CURRENT_REVISION_ERROR',\r\n);\r\nexport const permanentlyDeleteAllRevisionsError = createAction(\r\n 'PERMANENTLY_DELETE_ALL_REVISIONS_ERROR',\r\n);\r\nexport const restoreDeletedRevisionError = createAction(\r\n 'RESTORE_DELETED_REVISION_ERROR',\r\n);\r\nexport const navigateToStatementError = createAction(\r\n 'NAVIGATE_TO_STATEMENT_ERROR',\r\n);\r\nexport const setUploadedFilesAddRevision = createAction(\r\n 'STATEMENT_LIST_SET_UPLOADED_FILES_ADD_REVISION',\r\n);\r\nexport const setUploadedFilesAddRevisionError = createAction(\r\n 'STATEMENT_LIST_SET_UPLOADED_FILES_ADD_REVISION_ERROR',\r\n);\r\nexport const clearAddRevision = createAction(\r\n 'CLEAR_ADD_REVISION_STATEMENT_LIST',\r\n);\r\nexport const addRevisionLoading = createAction(\r\n 'ADD_REVISION_STATEMENT_LIST_LOADING',\r\n);\r\nexport const addRevisionLoaded = createAction(\r\n 'ADD_REVISION_STATEMENT_LIST_LOADED',\r\n);\r\nexport const addRevisionError = createAction(\r\n 'ADD_REVISION_STATEMENT_LIST_ERROR',\r\n);\r\nexport const exportWorkpaperError = createAction(\r\n 'EXPORT_WORKPAPER_STATEMENT_LIST_ERROR',\r\n);\r\nexport const exportElementReportError = createAction(\r\n 'EXPORT_ELEMENT_REPORT_ERROR',\r\n);\r\nexport const exportAuditTrailError = createAction('EXPORT_AUDIT_TRAIL_ERROR');\r\n\r\nexport const exportComfortLetterReportError = createAction(\r\n 'EXPORT_COMFORT_LETTER_REPORT_ERROR',\r\n);\r\n\r\nexport const exportClientNotesError = createAction('EXPORT_CLIENT_NOTES_ERROR');\r\n\r\nexport const copyStatementError = createAction('COPY_STATEMENT_ERROR');\r\n\r\nexport const exportCustomReportError = createAction(\r\n 'EXPORT_CUSTOM_REPORT_ERROR',\r\n);\r\n\r\nconst STATEMENT_COPY_BLOCK = 'statement-page';\r\nconst BANNER_ICON_SIZE = '18px';\r\n/**\r\n * `withLoading` is so we can update the active list of statements while polling\r\n * for workflow changes without a loading animation appearing on the active statement\r\n * tab. Once we migrate to an event/socket based system of notifying the front-end of\r\n * statement changes we can either update or retire this workaround\r\n *\r\n * TODO: Update this once sockets are introduced for events on the front-end.\r\n * */\r\nexport const requestGetStatementList =\r\n ({ withLoading = true, contextKey } = { withLoading: true }) =>\r\n async (dispatch, getState) => {\r\n if (withLoading) {\r\n dispatch(statementListLoading());\r\n }\r\n try {\r\n const stateData = getState().data;\r\n const selectedProject = stateData.selectedProject.project;\r\n const { sort, selectedTab } =\r\n stateData.statementList.statementListFilters;\r\n const isAuditClient = selectedProject.data.isAuditClient;\r\n const response =\r\n selectedProject && selectedProject.id\r\n ? await getStatementListRequest({\r\n status: selectedTab.apiParam,\r\n projectId: selectedProject.id,\r\n sort: sort.key,\r\n order: sort.order,\r\n //first and size are going to let us get an specific amount of statements, pagination.\r\n first: 0,\r\n // temporarily we are going to set the max amount of statements as 1000\r\n size: 1000,\r\n isAuditClient,\r\n contextKey,\r\n selectedProject,\r\n })\r\n : { data: { result: { elements: [] } } };\r\n\r\n dispatch(statementListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(statementListError(error));\r\n }\r\n };\r\n\r\nexport const requestStatementListWithParams =\r\n ({ tab, sort, withLoading }) =>\r\n async (dispatch, getState) => {\r\n if (!isNullOrUndefined(tab)) {\r\n await dispatch(setCurrentStatementListTab(tab));\r\n await dispatch(_rectifySortForChangingTabs(tab));\r\n }\r\n if (!isNullOrUndefined(sort)) {\r\n await dispatch(setStatementListSort(sort));\r\n }\r\n dispatch(requestGetStatementList({ withLoading }));\r\n };\r\n\r\nexport const requestStatementListForNewProject = () => async (dispatch) => {\r\n await dispatch(initStatementListFilters());\r\n dispatch(\r\n requestGetStatementList({\r\n withLoading: true,\r\n }),\r\n );\r\n};\r\n\r\nconst _rectifySortForChangingTabs = (newTab) => async (dispatch, getState) => {\r\n const currentSort = getState().data.statementList.statementListFilters.sort;\r\n /** lastModifiedDate and revisionDeleteDate are to be treated the same when changing tabs */\r\n const _newTabDeletedAndSortIsLastModified =\r\n newTab.id === STATEMENT_LIST_TABS.DELETED.id &&\r\n currentSort.key === STATEMENT_LIST_SORT_COLUMN_KEYS.lastModifiedDate;\r\n const _newTabActiveAndSortIsDeletedDate =\r\n newTab.id === STATEMENT_LIST_TABS.ACTIVE.id &&\r\n currentSort.key === STATEMENT_LIST_SORT_COLUMN_KEYS.revisionDeletedDate;\r\n\r\n if (_newTabDeletedAndSortIsLastModified) {\r\n await dispatch(\r\n // must be awaited so filters are changed before fetch\r\n setStatementListSort(\r\n new DataGridSort({\r\n order: currentSort.order,\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.revisionDeletedDate,\r\n }),\r\n ),\r\n );\r\n } else if (_newTabActiveAndSortIsDeletedDate) {\r\n await dispatch(\r\n // must be awaited so filters are changed before fetch\r\n setStatementListSort(\r\n new DataGridSort({\r\n order: currentSort.order,\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.lastModifiedDate,\r\n }),\r\n ),\r\n );\r\n }\r\n};\r\n\r\nexport const softDeleteCurrentRevision =\r\n ({ statementId, revisionId }) =>\r\n async (dispatch) => {\r\n try {\r\n await sofDeleteCurrentRevisionRequest({ statementId, revisionId });\r\n dispatch(\r\n requestStatementListWithParams({ tab: STATEMENT_LIST_TABS.DELETED }),\r\n );\r\n } catch (error) {\r\n dispatch(softDeleteCurrentRevisionError(error));\r\n }\r\n };\r\n\r\nexport const softDeleteAllRevisions = (statementId) => async (dispatch) => {\r\n try {\r\n await softDeleteAllRevisionsRequest(statementId);\r\n dispatch(\r\n requestStatementListWithParams({ tab: STATEMENT_LIST_TABS.DELETED }),\r\n );\r\n } catch (error) {\r\n dispatch(softDeleteAllRevisionsError(error));\r\n }\r\n};\r\n\r\nexport const permanentlyDeleteAllSoftDeletedRevisionsForStatement =\r\n (statementId) => async (dispatch) => {\r\n try {\r\n await permanentlyDeleteAllSoftDeletedRevisionsForStatementRequest(\r\n statementId,\r\n );\r\n dispatch(\r\n requestStatementListWithParams({ tab: STATEMENT_LIST_TABS.DELETED }),\r\n );\r\n } catch (error) {\r\n dispatch(permanentlyDeleteCurrentRevisionError(error));\r\n }\r\n };\r\n\r\nexport const permanentlyDeleteRevision =\r\n (revisionId, statementId) => async (dispatch) => {\r\n try {\r\n await permanentlyDeleteRevisionRequest(revisionId, statementId);\r\n } catch (error) {\r\n dispatch(permanentlyDeleteCurrentRevisionError(error));\r\n }\r\n };\r\n\r\nexport const permanentlyDeleteAllRevisions =\r\n (statementId) => async (dispatch) => {\r\n try {\r\n await softDeleteAllRevisionsRequest(statementId);\r\n dispatch(\r\n requestStatementListWithParams({ tab: STATEMENT_LIST_TABS.DELETED }),\r\n );\r\n } catch (error) {\r\n dispatch(permanentlyDeleteAllRevisionsError(error));\r\n }\r\n };\r\n\r\nexport const navigateToStatement =\r\n (statement) => async (dispatch, getState) => {\r\n try {\r\n const selectedTab =\r\n getState().data.statementList.statementListFilters.selectedTab;\r\n const isNotReadOnlyStatement =\r\n !statement.isInArchivalFlow() &&\r\n !statement.isSoftDeleted() &&\r\n statement.latestRevision === statement.revisionId;\r\n if (\r\n selectedTab === STATEMENT_LIST_TABS.ACTIVE &&\r\n !statement.hasBeenOpenedByUser &&\r\n isNotReadOnlyStatement\r\n ) {\r\n // only update read status when viewed from active tab\r\n const readStatement = statement.setHasBeenOpenedByUser(true);\r\n // Send an edit statement request to update this statement's read status.\r\n await editStatementRequest(readStatement);\r\n }\r\n // Navigate to the statement content page\r\n await dispatch(\r\n push(\r\n parseRoute(ROUTE_CONSTANTS.STATEMENT_CONTENT_PAGE, {\r\n params: {\r\n projectId: statement.clientId,\r\n statementId: statement.id,\r\n revisionId: statement.revisionId,\r\n readOnly: false,\r\n },\r\n }),\r\n ),\r\n );\r\n } catch (error) {\r\n dispatch(navigateToStatementError(error));\r\n }\r\n };\r\n\r\nexport const uploadRevision =\r\n ({ statement, revision }) =>\r\n async (dispatch) => {\r\n dispatch(addRevisionLoading());\r\n try {\r\n const response = await uploadRevisionRequest({ statement, revision });\r\n dispatch(addRevisionLoaded({ response }));\r\n dispatch(clearAddRevision());\r\n dispatch(setProjectIdWorkflowExpanded(statement.clientId));\r\n dispatch(getStatementWorkflowsWithoutLoading());\r\n } catch (error) {\r\n dispatch(addRevisionError(error));\r\n }\r\n };\r\n\r\nexport const handleSuccessfulSubmissionForWrapUp =\r\n () => async (dispatch, getState) => {\r\n dispatch(requestGetStatementList({ withLoading: true }));\r\n };\r\n\r\nexport const exportWorkpaperStatement =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n options,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n let response = await exportWorkpaperStatementRequest({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n options,\r\n });\r\n response &&\r\n response.data &&\r\n (response.data.reportType = REPORT_TYPES.WORKPAPER);\r\n dispatch(reportProcessingRequestAction(response));\r\n } catch (error) {\r\n if (error.response && error.response.status === NOT_ACCEPTABLE) {\r\n await dispatch(\r\n exportWorkpaperStatementFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n options,\r\n }),\r\n );\r\n } else {\r\n downloadReportNotification(\r\n REPORT_TYPES.WORKPAPER,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n }\r\n };\r\n\r\nexport const exportElementReport =\r\n ({ revisionId }) =>\r\n async (dispatch) => {\r\n try {\r\n let response = await exportElementReportRequest({ revisionId });\r\n response &&\r\n response.data &&\r\n (response.data.reportType = REPORT_TYPES.ELEMENT_REPORT);\r\n dispatch(reportProcessingRequestAction(response));\r\n } catch (error) {\r\n if (error.response && error.response.status === NOT_ACCEPTABLE) {\r\n await dispatch(exportElementReportFallback({ revisionId }));\r\n } else {\r\n downloadReportNotification(\r\n REPORT_TYPES.ELEMENT_REPORT,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n }\r\n };\r\n\r\nexport const exportAuditTrail =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n let response = await exportAuditTrailRequest({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'AuditTrail',\r\n });\r\n response &&\r\n response.data &&\r\n (response.data.reportType = REPORT_TYPES.AUDIT_TRAIL_REPORT);\r\n dispatch(reportProcessingRequestAction(response));\r\n } catch (error) {\r\n if (error.response && error.response.status === NOT_ACCEPTABLE) {\r\n await dispatch(\r\n exportAuditTrailFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n }),\r\n );\r\n } else {\r\n downloadReportNotification(\r\n AUDIT_TRAIL_REPORT,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n }\r\n };\r\n\r\nexport const exportComfortLetterReport =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n let response = await exportComfortLetterReportRequest({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'ComfortLetterReport',\r\n });\r\n response &&\r\n response.data &&\r\n (response.data.reportType = REPORT_TYPES.COMFORT_LETTER_REPORT);\r\n dispatch(reportProcessingRequestAction(response));\r\n } catch (error) {\r\n if (error.response && error.response.status === NOT_ACCEPTABLE) {\r\n await dispatch(\r\n exportComfortLetterFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n }),\r\n );\r\n } else {\r\n downloadReportNotification(\r\n REPORT_TYPES.COMFORT_LETTER_REPORT,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n }\r\n };\r\n\r\nexport const exportClientNotes =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n let response = await exportClientNotesRequest({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n });\r\n response &&\r\n response.data &&\r\n (response.data.reportType = REPORT_TYPES.CLIENT_NOTES);\r\n dispatch(reportProcessingRequestAction(response));\r\n } catch (error) {\r\n if (error.response && error.response.status === NOT_ACCEPTABLE) {\r\n dispatch(\r\n exportClientNotesFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n }),\r\n );\r\n } else {\r\n downloadReportNotification(\r\n REPORT_TYPES.CLIENT_NOTES,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n }\r\n };\r\n\r\nexport const exportCustomReport =\r\n ({ revisionId, pageSize, pageOrientation, exportCustomParam }) =>\r\n async (dispatch) => {\r\n try {\r\n let response = await exportCustomReportRequest({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n exportCustomParam,\r\n });\r\n response &&\r\n response.data &&\r\n (response.data.reportType = REPORT_TYPES.BUILD_CUSTOMIZED_REPORT);\r\n dispatch(reportProcessingRequestAction(response));\r\n } catch (error) {\r\n if (error.response && error.response.status === NOT_ACCEPTABLE) {\r\n await dispatch(\r\n exportCustomReportFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n exportCustomParam,\r\n }),\r\n );\r\n } else {\r\n downloadReportNotification(\r\n REPORT_TYPES.BUILD_CUSTOMIZED_REPORT,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n }\r\n };\r\n\r\nexport const onCopyStatementSuccess = () => async (dispatch, getState) => {\r\n toast.success(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n dispatch(requestGetStatementList());\r\n};\r\n\r\nexport const onCopyStatementFailure = () => async (dispatch, getState) => {\r\n toast.error(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n dispatch(requestGetStatementList());\r\n};\r\n\r\nexport const copyStatement =\r\n (statementId, targetClientId) => async (dispatch) => {\r\n try {\r\n await copyStatementRequest(statementId, targetClientId);\r\n toast.success(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n } catch (error) {\r\n if (\r\n _isCopyErrorForWrongSourceProject(\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause,\r\n )\r\n ) {\r\n toast.error(copyErrorNotificationForWrongSourceProject());\r\n } else\r\n toast.error(\r\n }\r\n message={{ id: 'notifications.copy-statement.error.message' }}\r\n title={{ id: 'notifications.copy-statement.error.title' }}\r\n />,\r\n );\r\n dispatch(copyStatementError(error));\r\n }\r\n };\r\n\r\n/**\r\n * Action methods to download report directly into local.\r\n * This shall be used when blob storage service is not actively running.\r\n * This is a kind of fallback approach\r\n */\r\n\r\nexport const exportWorkpaperStatementFallback =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n options,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await exportWorkpaperStatementRequestFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n options,\r\n });\r\n downloadFile(response);\r\n } catch (error) {\r\n downloadReportNotification(\r\n REPORT_TYPES.WORKPAPER,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n };\r\n\r\nexport const exportElementReportFallback =\r\n ({ revisionId }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await exportElementReportRequestFallback({ revisionId });\r\n downloadFile(response);\r\n } catch (error) {\r\n downloadReportNotification(\r\n REPORT_TYPES.ELEMENT_REPORT,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n };\r\n\r\nexport const exportComfortLetterFallback =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await exportComfortLetterReportRequestFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'ComfortLetterReport',\r\n });\r\n downloadFile(response);\r\n } catch (error) {\r\n downloadReportNotification(\r\n REPORT_TYPES.COMFORT_LETTER_REPORT,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n };\r\n\r\nexport const exportAuditTrailFallback =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await exportAuditTrailRequestFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'AuditTrail',\r\n });\r\n downloadFile(response);\r\n } catch (error) {\r\n downloadReportNotification(AUDIT_TRAIL_REPORT, NOTIFICATION_TYPE.FAILURE);\r\n console.error(error);\r\n }\r\n };\r\n\r\nexport const exportClientNotesFallback =\r\n ({\r\n revisionId,\r\n pageSize = EXPORT_PAGE_SIZE_ID.LETTER,\r\n pageOrientation = EXPORT_PAGE_ORIENTATION_PORTRAIT,\r\n }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await exportClientNotesRequestFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n });\r\n downloadFile(response);\r\n } catch (error) {\r\n downloadReportNotification(\r\n REPORT_TYPES.CLIENT_NOTES,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n };\r\n\r\nexport const exportCustomReportFallback =\r\n ({ revisionId, pageSize, pageOrientation, exportCustomParam }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await exportCustomReportRequestFallback({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n exportCustomParam,\r\n });\r\n downloadFile(response);\r\n } catch (error) {\r\n downloadReportNotification(\r\n REPORT_TYPES.BUILD_CUSTOMIZED_REPORT,\r\n NOTIFICATION_TYPE.FAILURE,\r\n );\r\n console.error(error);\r\n }\r\n };\r\n\r\n/** END of fallback approach for downloading report directly to local */\r\n","import axios from 'axios';\r\nimport { createAuthContext } from 'api/api-authentication';\r\nimport { globalApiErrorHandler } from 'api/api-error-handler';\r\nimport {\r\n globalApiRequestValidator,\r\n getAxiosInstance,\r\n} from 'api/api-request-validator';\r\nimport { getStore } from 'store/store';\r\nimport {\r\n getGeoForProjectId,\r\n getGeoForSelectedProjectId,\r\n} from 'store/actions/selected-project-actions';\r\nimport { getHomeGeo } from 'store/actions/current-user-actions';\r\nimport { setProjectHeadersAction } from 'store/actions/project-list-actions';\r\n\r\nexport const CURRENT_SELECTED_PROJECT_ID_SESSION_KEY =\r\n 'current-selected-project-id';\r\n\r\nlet apiClient = {};\r\n\r\nexport const undeterminedGeoKey = 'undetermined-geoKey';\r\n\r\nexport const CONTEXT_KEY = {\r\n PROJECT_CONTEXT: 'project',\r\n SELECTED_PROJECT_CONTEXT: 'selected-project',\r\n HOME_GEO_CONTEXT: 'home-geo',\r\n SELECTED_GEO_CONTEXT: 'selected-geo',\r\n // STATEMENT_CONTEXT: 'statement',\r\n // REVISION_CONTEXT: 'revision',\r\n // CURRENT_GEO_CONTEXT: 'current-geo',\r\n};\r\n\r\n// instantiate api client for all three geos\r\nObject.keys(window.TIEOUT.ENV.GEOS).forEach(\r\n (geoKey) =>\r\n (apiClient[geoKey] = {\r\n api: null,\r\n flags: {\r\n authenticated: false,\r\n },\r\n }),\r\n);\r\n\r\nexport const getSelectedProjectApiClient = () => {\r\n const projectGeo = getGeo({\r\n contextKey: CONTEXT_KEY.SELECTED_PROJECT_CONTEXT,\r\n });\r\n return getAPI(projectGeo);\r\n};\r\n\r\nexport const getProjectApiClient = (projectID) => {\r\n const projectGeo = getGeo({\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: projectID,\r\n });\r\n return getAPI(projectGeo, parseInt(projectID));\r\n};\r\n\r\nexport const getHomeGeoApiClient = () => {\r\n const homeGeo = getGeo({\r\n contextKey: CONTEXT_KEY.HOME_GEO_CONTEXT,\r\n });\r\n return getAPI(homeGeo);\r\n};\r\n\r\nexport const getSelectedGeoApiClient = (geoCode) => {\r\n return getAPI(geoCode);\r\n};\r\n\r\nexport const getCurrentGeoApiClient = () => {\r\n const currentGeo = window.TIEOUT.ENV.CURRENT_GEO;\r\n return getAPI(currentGeo);\r\n};\r\n\r\n/**\r\n * The axiosInstance setup by this private function is used throughout the application to manage API calls to the back-end, using environment configured parameters.\r\n * Going forward we will be using this as an api client wrapper for all of our axios requests, saving us from having to set headers,\r\n * manage api urls, etc... throughout the API files. This setup will also likely change\r\n * to a collection of axios api constants referenced by region once we need to handle globalization in TieOut as well.\r\n *\r\n * TODO: Setup array of api variables for handling globalization.\r\n *\r\n * Note: This function should not be called externally, instead, retrieve the api through the getAPI function below.\r\n */\r\nconst _createAPI = (geoKey) => {\r\n /** axios instace for invalid geoKey */\r\n if (geoKey === undeterminedGeoKey) {\r\n console.warn('geoKey could not be determined for the project id');\r\n apiClient[`${undeterminedGeoKey}`] = getAxiosInstance();\r\n globalApiRequestValidator(undeterminedGeoKey);\r\n return;\r\n }\r\n /** axios instace for valid geoKey */\r\n apiClient[geoKey].api = axios.create({\r\n baseURL: window.TIEOUT.ENV.GEOS[geoKey].BASE_API_URL,\r\n /* Add all custom API settings we will need here. */\r\n });\r\n createAuthContext(geoKey);\r\n globalApiErrorHandler(geoKey);\r\n globalApiRequestValidator(geoKey);\r\n};\r\n\r\nexport const getAPIClient = (geoKey) => {\r\n if (!(apiClient[geoKey] && apiClient[geoKey].api)) {\r\n _createAPI(geoKey);\r\n }\r\n return apiClient[geoKey];\r\n};\r\n\r\n/**\r\n * A public getter function to fetch the reference to the api elsewhere in the application. If no api reference has been intialized\r\n * yet, this function calls the `_createAPI()` function to create one.\r\n */\r\nexport const getAPI = (geoKey, projectId) => {\r\n if (!(apiClient[geoKey] && apiClient[geoKey].api)) {\r\n _createAPI(geoKey);\r\n }\r\n // set header (related to client id, container code, member firm code) before each api call\r\n getStore().dispatch(\r\n setProjectHeadersAction(apiClient[geoKey].api, projectId),\r\n );\r\n return apiClient[geoKey].api;\r\n};\r\n\r\nexport const getGeo = ({ contextKey, contextValue }) => {\r\n const { dispatch } = getStore();\r\n switch (contextKey) {\r\n case CONTEXT_KEY.SELECTED_PROJECT_CONTEXT: {\r\n const projectGeo = dispatch(getGeoForSelectedProjectId());\r\n return projectGeo;\r\n }\r\n\r\n case CONTEXT_KEY.PROJECT_CONTEXT: {\r\n const projectGeo = dispatch(getGeoForProjectId(contextValue));\r\n return projectGeo;\r\n }\r\n\r\n case CONTEXT_KEY.HOME_GEO_CONTEXT: {\r\n const homeGeo = dispatch(getHomeGeo());\r\n return homeGeo;\r\n }\r\n\r\n // case CONTEXT_KEY.STATEMENT_CONTEXT:\r\n // return 'GEO_1';\r\n\r\n // case CONTEXT_KEY.REVISION_CONTEXT:\r\n // return window.TIEOUT.ENV.CURRENT_GEO;\r\n\r\n // case CONTEXT_KEY.CURRENT_GEO_CONTEXT:\r\n // return window.TIEOUT.ENV.CURRENT_GEO;\r\n\r\n default:\r\n return window.TIEOUT.ENV.CURRENT_GEO;\r\n }\r\n};\r\n","import { createApiErrorDataAction } from 'store/actions/api-error-handler-actions';\r\nimport { getStore } from 'store/store';\r\nimport { getAPIClient } from 'api/api-client';\r\nimport React from 'react';\r\nimport { toast } from 'react-toastify';\r\nimport ApiErrorNotification, {\r\n API_ERROR_NOTIFICATION_ID,\r\n} from 'components/util/api-error-notificiation-component';\r\nimport CloseToastButton from 'components/util/close-toast-button-component';\r\n\r\nexport const globalApiErrorHandler = (geoKey) => {\r\n const apiClient = getAPIClient(geoKey);\r\n /*\r\n Here we are intercepting any potential api errors that may occur and then\r\n dispatching the response from axios to redux.\r\n After conducting some research, it was deteremined that there is some limitation with\r\n accurate stack tracing when using axios interceptors.\r\n See: https://github.com/axios/axios/issues/2069\r\n As a result, we need to dispatch the stack trace from conditional-render-component.jsx\r\n to get an accurate stack trace of where the error occured.\r\n */\r\n apiClient.api.interceptors.response.use(undefined, (err) => {\r\n const { response } = err;\r\n\r\n /*\r\n In the case where there is an error with approving a wrap-up statement, we do not \r\n want to capture the error. We already have a way to handle this error \r\n */\r\n const isErrorWithWrapUpApproval = () => {\r\n const approveStatementSubString = '/approve';\r\n if (\r\n response.config &&\r\n response.config.url.includes(approveStatementSubString)\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n const isErrorForDuplicateComfortLetterValidation = (response) => {\r\n const descriptionValidation =\r\n 'ValidationException: A comfort letter annotation with this description already exists';\r\n const labelValidation =\r\n 'ValidationException: A comfort letter annotation with this label already exists.';\r\n return (\r\n response.data &&\r\n response.data.rootCause &&\r\n (response.data.rootCause.includes(descriptionValidation) ||\r\n response.data.rootCause.includes(labelValidation))\r\n );\r\n };\r\n /*\r\n In the case where there is an error with copying a statement, we do not\r\n want to intercept the error because we already have a way of handling it\r\n */\r\n const isErrorWithCopyStatement = () => {\r\n const copyStatementApiSubString = 'tieout/copy/statement';\r\n if (\r\n response.config &&\r\n response.config.url.includes(copyStatementApiSubString) &&\r\n response.config.url === 'post'\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /*\r\n In the case where there is an 401 error with auth call, we do not\r\n want to intercept the error because we are already showing a message on screen\r\n */\r\n const isErrorWithUserAuthorization = () => {\r\n const authApiSubString = 'tieout/auth';\r\n if (\r\n response.config &&\r\n response.config.url.includes(authApiSubString) &&\r\n response.data.status === 401\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n const isErrorWithFetchingLanguageTranslations = () => {\r\n const languageTranslationApiSubString = 'translations/languages';\r\n if (\r\n response.config &&\r\n response.config.url.includes(languageTranslationApiSubString)\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /*\r\n In a multi geo scenario, We make current user call to get project details and user roles in project\r\n for project assigned to user across different geo. If server from region A, for example, does not works,\r\n we dont want to show any error or block loading FE for all other regions. \r\n */\r\n const isErrorWithFetchingCurrentUserDetailsFromGeo = () => {\r\n const currentUserApiSubString = '/tieout/currentuser';\r\n if (\r\n response.config &&\r\n response.config.url.includes(currentUserApiSubString)\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n /*\r\n In the case where there is an error with creating a WP that already exists, we \r\n do not want to intercept the error because we already have a way of handling this case\r\n */\r\n const isErrorWithCreatingExistingWP = (response) => {\r\n const alreadyExistingWPRootCause =\r\n 'ValidationException: This work paper reference number already exists.';\r\n const wpReftsApiSubString = '/wprefs';\r\n if (\r\n response &&\r\n response.data &&\r\n response.data.rootCause === alreadyExistingWPRootCause &&\r\n response.config.url.includes(wpReftsApiSubString)\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n const isErrorWithElementMapping = () => {\r\n const mapRequest = '/map';\r\n if (\r\n response.config &&\r\n response.config.url.includes(mapRequest) &&\r\n response.data.status === 500\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n // The first call to download report will be made such that it initiates report download from blob\r\n // storage using guid (once report is processed). Let's say blob service is not running or there is some\r\n // issue, in that case we want to fallback to old way of downloading report. Old way- Generate\r\n // report and send instantly as api response without storing it in blob.\r\n const isErrorForReportInFallbackMode = (response) => {\r\n const reportFallbackReponseMsg =\r\n 'Blob is not available at the moment, falling back to old approach for report generation';\r\n let isReportFallbackMessage = false;\r\n try {\r\n isReportFallbackMessage =\r\n response &&\r\n response.data &&\r\n typeof response.data === 'string' &&\r\n response.data.includes(reportFallbackReponseMsg);\r\n } catch (e) {\r\n console.error(\r\n 'error while evaluating, if failed response is for report in fallback mode:',\r\n e,\r\n );\r\n }\r\n return isReportFallbackMessage;\r\n };\r\n\r\n if (\r\n response &&\r\n !isErrorWithWrapUpApproval() &&\r\n !isErrorWithCopyStatement() &&\r\n !isErrorWithFetchingLanguageTranslations() &&\r\n !isErrorWithCreatingExistingWP(response) &&\r\n !isErrorForReportInFallbackMode(response) &&\r\n !isErrorForDuplicateComfortLetterValidation(response) &&\r\n !isErrorWithUserAuthorization() &&\r\n !isErrorWithElementMapping() &&\r\n !isErrorWithFetchingCurrentUserDetailsFromGeo()\r\n ) {\r\n const { locale } = getStore().getState().ui;\r\n getStore().dispatch(createApiErrorDataAction({ locale, response }));\r\n // render error notification\r\n if (window.TIEOUT.ENV.FEATURE.ENABLE_UNHANDLED_API_NOTIFCATION) {\r\n toast.error(, {\r\n className: 'Toastify__toast Toastify__toast__no-hover',\r\n autoClose: false,\r\n closeOnClick: false,\r\n closeButton: ,\r\n draggable: false,\r\n toastId: API_ERROR_NOTIFICATION_ID,\r\n });\r\n }\r\n }\r\n return Promise.reject(err);\r\n });\r\n return apiClient;\r\n};\r\n","import { RadioOption } from 'models/utils/common/radio-options-model';\r\n\r\nexport const UNSELECTED_FILTER = undefined;\r\nexport const IS_MENTIONED_FILTER = 'is_mentioned';\r\nexport const OBSERVER_TYPE_FILTER = 'observer_type_filter';\r\n\r\nconst NOTES_STATUS_OPTION = {\r\n open: new RadioOption({\r\n id: 'notes-filter-option-status-open-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.status.open',\r\n value: true,\r\n }),\r\n closed: new RadioOption({\r\n id: 'notes-filter-option-status-closed-id',\r\n label:\r\n 'notes-panel.advanced-filter-modal.col-1.filter-option.status.closed',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'notes-filter-option-all-closed-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.status.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const NOTES_STATUS_OPTION_ARRAY = Object.values(NOTES_STATUS_OPTION);\r\n\r\nconst NOTES_TYPE_OPTION = {\r\n review: new RadioOption({\r\n id: 'notes-filter-option-type-review-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.type.review',\r\n value: true,\r\n }),\r\n client: new RadioOption({\r\n id: 'notes-filter-option-type-client-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.type.client',\r\n value: false,\r\n }),\r\n observer: new RadioOption({\r\n id: 'notes-filter-option-type-observer-id',\r\n label:\r\n 'notes-panel.advanced-filter-modal.col-1.filter-option.type.observer',\r\n value: OBSERVER_TYPE_FILTER,\r\n }),\r\n all: new RadioOption({\r\n id: 'notes-filter-option-type-all-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.type.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const NOTES_TYPE_OPTION_ARRAY = Object.values(NOTES_TYPE_OPTION);\r\n\r\nconst NOTES_PRIORITY_OPTION = {\r\n priority: new RadioOption({\r\n id: 'notes-filter-option-priority-priority-id',\r\n label:\r\n 'notes-panel.advanced-filter-modal.col-1.filter-option.priority.priority',\r\n value: true,\r\n }),\r\n non_priority: new RadioOption({\r\n id: 'notes-filter-option-priority-non-priority-id',\r\n label:\r\n 'notes-panel.advanced-filter-modal.col-1.filter-option.priority.non-priority',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'notes-filter-option-priority-all-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.priority.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const NOTES_PRIORITY_OPTION_ARRAY = Object.values(NOTES_PRIORITY_OPTION);\r\n\r\nconst NOTES_GHOST_OPTION = {\r\n yes: new RadioOption({\r\n id: 'notes-filter-option-ghost-yes-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.ghost.yes',\r\n value: true,\r\n }),\r\n no: new RadioOption({\r\n id: 'notes-filter-option-ghost-no-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.ghost.no',\r\n value: false,\r\n }),\r\n all: new RadioOption({\r\n id: 'notes-filter-option-ghost-all-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.ghost.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const NOTES_GHOST_OPTION_ARRAY = Object.values(NOTES_GHOST_OPTION);\r\n\r\nconst NOTES_USER_OPTION = {\r\n created_by: new RadioOption({\r\n id: 'notes-filter-option-user-created-by-id',\r\n label:\r\n 'notes-panel.advanced-filter-modal.col-1.filter-option.user.created-by',\r\n value: true,\r\n }),\r\n reviewed_by: new RadioOption({\r\n id: 'notes-filter-option-user-reviewed-by-id',\r\n label:\r\n 'notes-panel.advanced-filter-modal.col-1.filter-option.user.replied-by',\r\n value: false,\r\n }),\r\n is_mentioned: new RadioOption({\r\n id: 'notes-filter-option-user-is-mentioned',\r\n label:\r\n 'notes-panel.advanced-filter-modal.col-1.filter-option.user.is-tagged',\r\n value: IS_MENTIONED_FILTER,\r\n }),\r\n both: new RadioOption({\r\n id: 'notes-filter-option-user-both-id',\r\n label: 'notes-panel.advanced-filter-modal.col-1.filter-option.user.all',\r\n value: UNSELECTED_FILTER,\r\n }),\r\n};\r\n\r\nexport const NOTES_USER_OPTION_ARRAY = Object.values(NOTES_USER_OPTION);\r\n\r\nexport const FILTER_CATEGORIES = {\r\n HEADINGS: {\r\n heading: 'notes-panel.advanced-filter-modal.col-1.heading.headings',\r\n name: 'notes-filters-headings',\r\n id: 'notes-filters-headings-id',\r\n },\r\n STATUS: {\r\n heading: 'notes-panel.advanced-filter-modal.col-1.heading.status',\r\n name: 'notes-filters-status',\r\n id: 'notes-filters-status-id',\r\n options: NOTES_STATUS_OPTION_ARRAY,\r\n },\r\n TYPE: {\r\n heading: 'notes-panel.advanced-filter-modal.col-1.heading.type',\r\n name: 'notes-filters-type',\r\n id: 'notes-filters-type-id',\r\n options: NOTES_TYPE_OPTION_ARRAY,\r\n },\r\n PRIORITY: {\r\n heading: 'notes-panel.advanced-filter-modal.col-1.heading.priority',\r\n name: 'notes-filters-priority',\r\n id: 'notes-filters-priority-id',\r\n options: NOTES_PRIORITY_OPTION_ARRAY,\r\n },\r\n GHOST: {\r\n heading: 'notes-panel.advanced-filter-modal.col-1.heading.ghost',\r\n name: 'notes-filters-ghost',\r\n id: 'notes-filters-ghost-id',\r\n options: NOTES_GHOST_OPTION_ARRAY,\r\n },\r\n USER: {\r\n heading: 'notes-panel.advanced-filter-modal.col-1.heading.user',\r\n name: 'notes-filters-user',\r\n id: 'notes-filters-user-id',\r\n options: NOTES_USER_OPTION_ARRAY,\r\n },\r\n};\r\n","import React from 'react';\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { ReactComponent as FlaggedIcon } from 'icons/flag-icon.svg';\r\nimport { ReactComponent as VerifiedIcon } from 'icons/verified.svg';\r\nimport { ReactComponent as UnverifiedIcon } from 'icons/unverified.svg';\r\nimport { ReactComponent as ReviewedIcon } from 'icons/reviewed.svg';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport classnames from 'classnames';\r\nimport { ANNOTATION_DISPLAY_FUNCTIONS } from './tieout-element-constants';\r\n\r\nconst ELEMENT_PANEL_STATUS_ICON_SIZE = '20px';\r\nconst ELEMENT_PANEL_FLAGGED_ICON_SIZE = '16px';\r\nexport const AUTOMATION_CREATION_TYPE = {\r\n automation: 'AUTOMATION',\r\n carryForward: 'CARRY_FORWARD',\r\n};\r\n\r\nexport const getElementStatusIcon = ({\r\n elementDetails,\r\n iconSize = ELEMENT_PANEL_STATUS_ICON_SIZE,\r\n}) => {\r\n if (isNullOrUndefined(elementDetails)) {\r\n return null;\r\n } else if (elementDetails.isReviewed()) {\r\n return ;\r\n } else if (elementDetails.isVerified()) {\r\n return ;\r\n } else {\r\n return ;\r\n }\r\n};\r\n\r\nexport const getOCRElementStyleByElementStatus = (elementDetails) => {\r\n if (isNullOrUndefined(elementDetails)) {\r\n return null;\r\n } else if (elementDetails.isReviewed()) {\r\n return 'element-reviewed';\r\n } else if (elementDetails.isVerified()) {\r\n return 'element-verified';\r\n } else {\r\n return 'element-unverified';\r\n }\r\n};\r\n\r\nexport const getElementFlaggedIcon = ({\r\n elementDetails,\r\n iconSize = ELEMENT_PANEL_FLAGGED_ICON_SIZE,\r\n BLOCK,\r\n}) => {\r\n if (\r\n !isNullOrUndefined(elementDetails) &&\r\n (elementDetails.isFlaggedAndReviewed() ||\r\n elementDetails.isFlaggedAndVerified() ||\r\n elementDetails.isFlagged())\r\n )\r\n return (\r\n \r\n );\r\n return null;\r\n};\r\n\r\nexport const ELEMENT_ANNOTATIONS_TABS = {\r\n FORMULA: new TabModel({\r\n id: 1,\r\n // feature for which we do not wish to enable feature flag option\r\n featureName: FEATURE_NAMES.OTHER_FEATURES,\r\n intlTitle: 'element-panel.annotation.formula',\r\n intlValues: { formulaCount: 0 },\r\n tooltip: new TooltipOptions({\r\n text: 'element-panel.annotation.formula.tooltip',\r\n id: 'element-panel-annotation-formula-tooltip-id',\r\n position: 'top',\r\n }),\r\n }),\r\n INTERNAL_REFERENCE: new TabModel({\r\n id: 2,\r\n // feature for which we do not wish to enable feature flag option\r\n featureName: FEATURE_NAMES.OTHER_FEATURES,\r\n intlTitle: 'element-panel.annotation.internal-reference',\r\n intlValues: { internalReferenceCount: 0 },\r\n tooltip: new TooltipOptions({\r\n text: 'element-panel.annotation.internal-reference.tooltip',\r\n id: 'element-panel-annotation-internal-reference-tooltip-id',\r\n position: 'top',\r\n }),\r\n }),\r\n TICKMARK: new TabModel({\r\n id: 3,\r\n // feature for which we do not wish to enable feature flag option\r\n featureName: FEATURE_NAMES.OTHER_FEATURES,\r\n intlTitle: 'element-panel.annotation.tickmark',\r\n intlValues: { tickmarkCount: 0 },\r\n tooltip: new TooltipOptions({\r\n text: 'element-panel.annotation.tickmark.tooltip',\r\n id: 'element-panel-annotation-tickmark-tooltip-id',\r\n position: 'top',\r\n }),\r\n }),\r\n WORK_PAPER_REFERENCE: new TabModel({\r\n id: 4,\r\n // feature for which we do not wish to enable feature flag option\r\n featureName: FEATURE_NAMES.OTHER_FEATURES,\r\n intlTitle: 'element-panel.annotation.workpaper-reference',\r\n intlValues: { workpaperReferenceCount: 0 },\r\n tooltip: new TooltipOptions({\r\n text: 'element-panel.annotation.workpaper-reference.tooltip',\r\n id: 'element-panel-annotation-workpaper-tooltip-id',\r\n position: 'top',\r\n }),\r\n }),\r\n COMFORT_LETTER: new TabModel({\r\n id: 5,\r\n featureName: FEATURE_NAMES.COMFORT_LETTER_FEATURE,\r\n intlTitle: 'element-panel.annotation.comfort-letter',\r\n intlValues: { comfortLetterCount: 0 },\r\n tooltip: new TooltipOptions({\r\n text: {\r\n id: 'element-panel.annotation.comfort-letter.tooltip',\r\n values: {\r\n br: (...chunks) => (\r\n \r\n
{chunks}{' '}\r\n \r\n ),\r\n },\r\n },\r\n id: 'element-panel.annotation.comfort-letter.tooltip-id',\r\n position: 'top',\r\n }),\r\n }),\r\n};\r\n\r\nexport const getDynamicElementAnnotationsTabs = ({\r\n elementDetails,\r\n formulaList,\r\n internalReference,\r\n tickmarkList,\r\n workpaperList,\r\n comfortLetterList,\r\n}) => {\r\n return [\r\n new TabModel({\r\n ...ELEMENT_ANNOTATIONS_TABS.WORK_PAPER_REFERENCE,\r\n intlValues: {\r\n workpaperReferenceCount: workpaperList.getWorkpaperCount(),\r\n },\r\n }),\r\n new TabModel({\r\n ...ELEMENT_ANNOTATIONS_TABS.FORMULA,\r\n intlValues: { formulaCount: formulaList.getFormulaCount() },\r\n className: elementDetails.isFormulaFlagged(true)\r\n ? 'annotations-tabs__tab--flagged'\r\n : null,\r\n }),\r\n new TabModel({\r\n ...ELEMENT_ANNOTATIONS_TABS.INTERNAL_REFERENCE,\r\n intlValues: {\r\n internalReferenceCount: internalReference.getOtherElementsCount({\r\n elementId: elementDetails.id,\r\n }),\r\n },\r\n className: elementDetails.isInternalRefFlagged(true)\r\n ? 'annotations-tabs__tab--flagged'\r\n : null,\r\n }),\r\n new TabModel({\r\n ...ELEMENT_ANNOTATIONS_TABS.TICKMARK,\r\n intlValues: { tickmarkCount: tickmarkList.getTickmarkCount() },\r\n }),\r\n new TabModel({\r\n ...ELEMENT_ANNOTATIONS_TABS.COMFORT_LETTER,\r\n intlValues: {\r\n comfortLetterCount: comfortLetterList.getComfortLetterCount(),\r\n },\r\n }),\r\n ];\r\n};\r\n\r\nexport const getReviewTooltip = (elementDetails) => {\r\n if (!elementDetails.isVerified()) {\r\n return new TooltipOptions({\r\n text: 'element-panel.checkbox.disable-review-tooltip',\r\n id: 'element-panel.checkbox.disable-review-tooltip-id',\r\n position: 'left',\r\n });\r\n } else {\r\n return new TooltipOptions({\r\n text: 'element-panel.checkbox.review.tooltip',\r\n id: 'element-panel.checkbox.review-tooltip-id',\r\n position: 'bottom',\r\n });\r\n }\r\n};\r\n\r\nexport const getOverrideSystemFlagTooltip = (elementDetails) => {\r\n if (\r\n !(\r\n elementDetails.isFormulaFlagged() ||\r\n elementDetails.isInternalRefFlagged() ||\r\n elementDetails.isSystemOverrideFlagged()\r\n )\r\n ) {\r\n return new TooltipOptions({\r\n text: 'element-panel.checkbox.disable-override-system-tooltip',\r\n id: 'element-panel.checkbox.disable-override-system-tooltip-id',\r\n position: 'left',\r\n });\r\n }\r\n};\r\n\r\nexport const hoverVerifyTooltip = new TooltipOptions({\r\n text: 'element-panel.checkbox.verify.tooltip',\r\n id: 'element-panel.checkbox.verify-tooltip-id',\r\n position: 'bottom',\r\n});\r\n\r\nexport const disableComfortAssignTooltip = new TooltipOptions({\r\n text: 'element-panel.checkbox.disabled.comfortAssign.tooltip',\r\n id: 'element-panel.checkbox.disabled.comfortAssign-tooltip-id',\r\n position: 'bottom',\r\n});\r\nexport const reviewInfoButtonTooltip = (event) =>\r\n new TooltipOptions({\r\n text: 'element-panel.review.information',\r\n id: 'element-panel.info.button-review-tooltip-id',\r\n position: 'bottom',\r\n event: event,\r\n });\r\n\r\nexport const HISTORIC_ACTIONS = {\r\n VERIFIED: 'element-panel.history.description.verified',\r\n UNVERIFIED: 'element-panel.history.description.unverified',\r\n FLAGGED: 'element-panel.history.description.flagged',\r\n UNFLAGGED: 'element-panel.history.description.unflagged',\r\n USER_FLAGGED: 'element-panel.history.description.user_flagged',\r\n USER_UNFLAGGED: 'element-panel.history.description.user_unflagged',\r\n REVIEWED: 'element-panel.history.description.reviewed',\r\n UNREVIEWED: 'element-panel.history.description.unreviewed',\r\n FLAG_OVERRIDE: 'element-panel.history.description.flag_override',\r\n REMOVE_FLAG_OVERRIDE:\r\n 'element-panel.history.description.remove_flag_override',\r\n FORMULA_OVERRIDE: 'element-panel.history.description.formula_override',\r\n ANNOTATION_ATTACHED: 'element-panel.history.description.annotation_attached',\r\n ATTRIBUTE_MODIFIED: 'element-panel.history.description.attribute_modified',\r\n};\r\n\r\nexport const FORMULA_TYPES = {\r\n FLOATED_FORMULA: 'f',\r\n CROSS_FOOTED_FORMULA: 'cf',\r\n RECALCULATED_FORMULA: 'rx',\r\n};\r\n\r\nexport const FORMULA_OPTIONS_MAP = new Map();\r\nFORMULA_OPTIONS_MAP.set(\r\n FORMULA_TYPES.FLOATED_FORMULA,\r\n new MenuOption({\r\n id: FORMULA_TYPES.FLOATED_FORMULA,\r\n title: 'element-panel.amount-attribute.formula.option.footed_formula',\r\n value: FORMULA_TYPES.FLOATED_FORMULA,\r\n }),\r\n);\r\nFORMULA_OPTIONS_MAP.set(\r\n FORMULA_TYPES.CROSS_FOOTED_FORMULA,\r\n new MenuOption({\r\n id: FORMULA_TYPES.CROSS_FOOTED_FORMULA,\r\n title: 'element-panel.amount-attribute.formula.option.cross_footed_formula',\r\n value: FORMULA_TYPES.CROSS_FOOTED_FORMULA,\r\n }),\r\n);\r\nFORMULA_OPTIONS_MAP.set(\r\n FORMULA_TYPES.RECALCULATED_FORMULA,\r\n new MenuOption({\r\n id: FORMULA_TYPES.RECALCULATED_FORMULA,\r\n title: 'element-panel.amount-attribute.formula.option.recalculated_formula',\r\n value: FORMULA_TYPES.RECALCULATED_FORMULA,\r\n }),\r\n);\r\n\r\nexport const FORMULA_OPTIONS = Array.from(FORMULA_OPTIONS_MAP.values());\r\n\r\nexport const SelectedableElement = ({ elementDetails, isCftEnabled }) => {\r\n const customCSS = true;\r\n return (\r\n <>\r\n {isCftEnabled &&\r\n Array.isArray(elementDetails.comfortLetterLabelList) &&\r\n elementDetails.comfortLetterLabelList.length\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.comfortLetter({\r\n elementDetails,\r\n customCSS,\r\n })\r\n : null}\r\n {!isNullOrUndefined(elementDetails.tickmarks)\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.tickmarks({\r\n elementDetails,\r\n customCSS,\r\n })\r\n : null}\r\n {elementDetails.elementHasFormula\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.elementFormula({\r\n elementDetails,\r\n customCSS,\r\n })\r\n : null}\r\n {!isNullOrUndefined(elementDetails.internalReferenceGroupName)\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.internalRef({\r\n elementDetails,\r\n customCSS,\r\n })\r\n : null}\r\n {Array.isArray(elementDetails.workpaperReferenceNumberList) &&\r\n elementDetails.workpaperReferenceNumberList.length\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.workpaper({\r\n elementDetails,\r\n customCSS,\r\n })\r\n : null}\r\n \r\n );\r\n};\r\n","import React from 'react';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport DataGridColumn from 'models/utils/common/data-grid/data-grid-column-model';\r\nimport { DataGridCheckboxColumn } from 'components/common/data-grid/data-grid-component';\r\nimport MultilineEllipsis from '../../components/common/multi-line-ellipsis-text-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nexport const MAX_STATEMENT_FILE_SIZE = 209715200;\r\nexport const MAX_STATEMENT_NAME_LENGTH = 100;\r\nexport const PDF_UPLOAD_ACCESS = 'application/pdf';\r\nexport const SUPPORTED_STATEMENT_FILE_TYPES = `text/htm, text/html, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, ${PDF_UPLOAD_ACCESS}`;\r\n\r\nexport const getStatementSupportedFileTypes = ({ pdfUploadEnabled }) => {\r\n if (!pdfUploadEnabled) {\r\n return SUPPORTED_STATEMENT_FILE_TYPES.replace(`, ${PDF_UPLOAD_ACCESS}`, '');\r\n }\r\n return SUPPORTED_STATEMENT_FILE_TYPES;\r\n};\r\n\r\nexport const LEGAL_HOLD_TOOLTIP = new TooltipOptions({\r\n text: 'project-creation.project-info.legal-hold-verbiage',\r\n id: 'project-creation-id-tooltip-legal-hold',\r\n position: 'right',\r\n});\r\n\r\nexport const ENABLE_COMFORT_LETTER_TOOLTIP = new TooltipOptions({\r\n text: 'project-creation.project-info.enable-comfort-letter-verbiage.tooltip',\r\n id: 'project-creation-id-enable-comfort-letter',\r\n position: 'right',\r\n});\r\n\r\nexport const AUTO_IR_TOOLTIP = new TooltipOptions({\r\n text: 'statement-create.statement-info.auto-ir-verbiage',\r\n id: 'statement-create-statement-info-auto-ir',\r\n position: 'right',\r\n});\r\n\r\nexport const STATEMENT_TYPE_ID_MAP = {\r\n TEN_K: 1, // 10-K\r\n TEN_Q: 2, // 10-Q\r\n SIX_K: 5, // 6-K\r\n PRESS_RELEASE: 6, // 8-K\r\n TWENTY_F: 7, // 20-F\r\n FORTY_F: 8, // 40-F\r\n NCSR: 9, // N-CSR\r\n PRIVATE_ANNUAL: 11, // Private Annual\r\n PRIVATE_QUARTERLY: 12, // Private Quarterly\r\n PROXY_STATEMENT: 13,\r\n COMFORT_LETTER: 14,\r\n REGISTRATION_STATEMENT: 15,\r\n INSURANCE_STATEMENT: 16,\r\n IM_FUND_REPORT: 17,\r\n AGENCY_REPORT: 18,\r\n OTHER: 999, // Other\r\n GLOBAL_ANNUAL: 19, // Global Annual\r\n GLOBAL_QUARTERLY: 20, // Global Quarterly\r\n Label_Non_US_Filers: 'Non-US Filers', // Non-US Filers label\r\n Label_US_Filers: 'US Filers', // US Filers label\r\n};\r\n\r\nconst DATE_FORMATS_TITLES_LIST = {\r\n 1: 'statement-create.statement-info.dateFormat.options.d-m-y',\r\n 2: 'statement-create.statement-info.dateFormat.options.m-d-y',\r\n 3: 'statement-create.statement-info.dateFormat.options.y-m-d',\r\n 4: 'statement-create.statement-info.dateFormat.options.y-d-m',\r\n};\r\n\r\nexport const STATEMENT_TYPE_OPTIONS_MAP = new Map();\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.Label_Non_US_Filers,\r\n new MenuOption({\r\n id: 'statement-type-label-non-US-filers',\r\n title: 'statement-create.statement-info.statement-type.label.non-us.filers',\r\n value: 'statement-type-label-non-US-filers',\r\n isIntl: true,\r\n isLabel: true,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.GLOBAL_ANNUAL,\r\n new MenuOption({\r\n id: 'statement-type-option-global-annual',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.global-annual',\r\n value: STATEMENT_TYPE_ID_MAP.GLOBAL_ANNUAL,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.GLOBAL_QUARTERLY,\r\n new MenuOption({\r\n id: 'statement-type-option-global-quarterly',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.global-quarterly',\r\n value: STATEMENT_TYPE_ID_MAP.GLOBAL_QUARTERLY,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.Label_US_Filers,\r\n new MenuOption({\r\n id: 'statement-type-label-US-filers',\r\n title: 'statement-create.statement-info.statement-type.label.us.filers',\r\n value: 'statement-type-label-US-filers',\r\n isIntl: true,\r\n isLabel: true,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.TEN_K,\r\n new MenuOption({\r\n id: 'statement-type-option-10-K',\r\n title: 'statement-create.statement-info.statement-type.option.10-K',\r\n value: STATEMENT_TYPE_ID_MAP.TEN_K,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.TEN_Q,\r\n new MenuOption({\r\n id: 'statement-type-option-10-Q',\r\n title: 'statement-create.statement-info.statement-type.option.10-Q',\r\n value: STATEMENT_TYPE_ID_MAP.TEN_Q,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.PRIVATE_ANNUAL,\r\n new MenuOption({\r\n id: 'statement-type-option-private-annual',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.private-annual',\r\n value: STATEMENT_TYPE_ID_MAP.PRIVATE_ANNUAL,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.PRIVATE_QUARTERLY,\r\n new MenuOption({\r\n id: 'statement-type-option-private-quarterly',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.private-quarterly',\r\n value: STATEMENT_TYPE_ID_MAP.PRIVATE_QUARTERLY,\r\n }),\r\n);\r\n\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.IM_FUND_REPORT,\r\n new MenuOption({\r\n id: 'statement-type-option-im-fund-report',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.im-fund-report',\r\n value: STATEMENT_TYPE_ID_MAP.IM_FUND_REPORT,\r\n }),\r\n);\r\n\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.PRESS_RELEASE,\r\n new MenuOption({\r\n id: 'statement-type-option-press-release',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.press-release',\r\n value: STATEMENT_TYPE_ID_MAP.PRESS_RELEASE,\r\n }),\r\n);\r\n\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.AGENCY_REPORT,\r\n new MenuOption({\r\n id: 'statement-type-option-agency-report',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.agency-report',\r\n value: STATEMENT_TYPE_ID_MAP.AGENCY_REPORT,\r\n }),\r\n);\r\n\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.PROXY_STATEMENT,\r\n new MenuOption({\r\n id: 'statement-type-option-proxy-statement',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.proxy-statement',\r\n value: STATEMENT_TYPE_ID_MAP.PROXY_STATEMENT,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.COMFORT_LETTER,\r\n new MenuOption({\r\n id: 'statement-type-option-comfort-letter',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.comfort-letter',\r\n value: STATEMENT_TYPE_ID_MAP.COMFORT_LETTER,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.REGISTRATION_STATEMENT,\r\n new MenuOption({\r\n id: 'statement-type-option-registration-statement',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.registration-statement',\r\n value: STATEMENT_TYPE_ID_MAP.REGISTRATION_STATEMENT,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.INSURANCE_STATEMENT,\r\n new MenuOption({\r\n id: 'statement-type-option-stat-audit-report',\r\n title:\r\n 'statement-create.statement-info.statement-type.option.insurance-statement',\r\n value: STATEMENT_TYPE_ID_MAP.INSURANCE_STATEMENT,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.SIX_K,\r\n new MenuOption({\r\n id: 'statement-type-option-6-K',\r\n title: 'statement-create.statement-info.statement-type.option.6-K',\r\n value: STATEMENT_TYPE_ID_MAP.SIX_K,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.TWENTY_F,\r\n new MenuOption({\r\n id: 'statement-type-option-20-F',\r\n title: 'statement-create.statement-info.statement-type.option.20-F',\r\n value: STATEMENT_TYPE_ID_MAP.TWENTY_F,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.FORTY_F,\r\n new MenuOption({\r\n id: 'statement-type-option-40-F',\r\n title: 'statement-create.statement-info.statement-type.option.40-F',\r\n value: STATEMENT_TYPE_ID_MAP.FORTY_F,\r\n }),\r\n);\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.NCSR,\r\n new MenuOption({\r\n id: 'statement-type-option-N-CSR',\r\n title: 'statement-create.statement-info.statement-type.option.N-CSR',\r\n value: STATEMENT_TYPE_ID_MAP.NCSR,\r\n }),\r\n);\r\n\r\nSTATEMENT_TYPE_OPTIONS_MAP.set(\r\n STATEMENT_TYPE_ID_MAP.OTHER,\r\n new MenuOption({\r\n id: 'statement-type-option-other',\r\n title: 'statement-create.statement-info.statement-type.option.other',\r\n value: STATEMENT_TYPE_ID_MAP.OTHER,\r\n }),\r\n);\r\n\r\nexport const STATEMENT_TYPE_OPTIONS = Array.from(\r\n STATEMENT_TYPE_OPTIONS_MAP.values(),\r\n);\r\n\r\nexport const QUARTER_OPTIONS_MAP = new Map();\r\nQUARTER_OPTIONS_MAP.set(\r\n 'Q1',\r\n new MenuOption({\r\n id: 'quarter-option-q1',\r\n title: 'statement-create.statement-info.quarter.option.q1',\r\n value: 1,\r\n }),\r\n);\r\nQUARTER_OPTIONS_MAP.set(\r\n 'Q2',\r\n new MenuOption({\r\n id: 'quarter-option-q2',\r\n title: 'statement-create.statement-info.quarter.option.q2',\r\n value: 2,\r\n }),\r\n);\r\nQUARTER_OPTIONS_MAP.set(\r\n 'Q3',\r\n new MenuOption({\r\n id: 'quarter-option-q3',\r\n title: 'statement-create.statement-info.quarter.option.q3',\r\n value: 3,\r\n }),\r\n);\r\n\r\nexport const QUARTER_OPTIONS = Array.from(QUARTER_OPTIONS_MAP.values());\r\n\r\nconst currentYear = moment().format(DATE_FORMATS.YEAR);\r\nconst minus5Years = moment().subtract(5, 'y').format(DATE_FORMATS.YEAR);\r\nconst minus4Years = moment().subtract(4, 'y').format(DATE_FORMATS.YEAR);\r\nconst minus3Years = moment().subtract(3, 'y').format(DATE_FORMATS.YEAR);\r\nconst minus2Years = moment().subtract(2, 'y').format(DATE_FORMATS.YEAR);\r\nconst minus1Years = moment().subtract(1, 'y').format(DATE_FORMATS.YEAR);\r\nconst plus1Years = moment().add(1, 'y').format(DATE_FORMATS.YEAR);\r\nconst plus2Years = moment().add(2, 'y').format(DATE_FORMATS.YEAR);\r\n\r\nexport const FISCAL_YEAR_OPTIONS_MAP = new Map();\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n minus5Years,\r\n new MenuOption({\r\n id: 'fiscal-year-option-1',\r\n title: minus5Years,\r\n value: minus5Years,\r\n isIntl: false,\r\n }),\r\n);\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n minus4Years,\r\n new MenuOption({\r\n id: 'fiscal-year-option-2',\r\n title: minus4Years,\r\n value: minus4Years,\r\n isIntl: false,\r\n }),\r\n);\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n minus3Years,\r\n new MenuOption({\r\n id: 'fiscal-year-option-3',\r\n title: minus3Years,\r\n value: minus3Years,\r\n isIntl: false,\r\n }),\r\n);\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n minus2Years,\r\n new MenuOption({\r\n id: 'fiscal-year-option-4',\r\n title: minus2Years,\r\n value: minus2Years,\r\n isIntl: false,\r\n }),\r\n);\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n minus1Years,\r\n new MenuOption({\r\n id: 'fiscal-year-option-5',\r\n title: minus1Years,\r\n value: minus1Years,\r\n isIntl: false,\r\n }),\r\n);\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n currentYear,\r\n new MenuOption({\r\n id: 'fiscal-year-option-6',\r\n title: currentYear,\r\n value: currentYear,\r\n isIntl: false,\r\n }),\r\n);\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n plus1Years,\r\n new MenuOption({\r\n id: 'fiscal-year-option-7',\r\n title: plus1Years,\r\n value: plus1Years,\r\n isIntl: false,\r\n }),\r\n);\r\nFISCAL_YEAR_OPTIONS_MAP.set(\r\n plus2Years,\r\n new MenuOption({\r\n id: 'fiscal-year-option-8',\r\n title: plus2Years,\r\n value: plus2Years,\r\n isIntl: false,\r\n }),\r\n);\r\n\r\nexport const FISCAL_YEAR_OPTIONS = Array.from(FISCAL_YEAR_OPTIONS_MAP.values());\r\n\r\nconst ACCOUNTING_BASIS_TYPES = {\r\n GAAP: 'GAAP',\r\n IFRS: 'IFRS',\r\n STATUTORY: 'Statutory',\r\n NOT_APPLICABLE: 'Not applicable',\r\n};\r\n\r\nexport const ACCOUNTING_BASIS_OPTIONS_MAP = new Map(\r\n Object.entries({\r\n [ACCOUNTING_BASIS_TYPES.GAAP]: new MenuOption({\r\n id: 'accounting-basis-option-GAAP',\r\n title: 'statement-create.statement-info.accounting-basis.option.GAAP',\r\n value: ACCOUNTING_BASIS_TYPES.GAAP,\r\n }),\r\n [ACCOUNTING_BASIS_TYPES.IFRS]: new MenuOption({\r\n id: 'accounting-basis-option-IFRS',\r\n title: 'statement-create.statement-info.accounting-basis.option.IFRS',\r\n value: ACCOUNTING_BASIS_TYPES.IFRS,\r\n }),\r\n [ACCOUNTING_BASIS_TYPES.STATUTORY]: new MenuOption({\r\n id: 'accounting-basis-option-STATUTORY',\r\n title:\r\n 'statement-create.statement-info.accounting-basis.option.STATUTORY',\r\n value: ACCOUNTING_BASIS_TYPES.STATUTORY,\r\n }),\r\n [ACCOUNTING_BASIS_TYPES.NOT_APPLICABLE]: new MenuOption({\r\n id: 'accounting-basis-option-other',\r\n title: 'statement-create.statement-info.accounting-basis.option.NA',\r\n value: ACCOUNTING_BASIS_TYPES.NOT_APPLICABLE,\r\n }),\r\n }),\r\n);\r\n\r\nexport const ACCOUNTING_BASIS_OPTIONS = Array.from(\r\n ACCOUNTING_BASIS_OPTIONS_MAP.values(),\r\n);\r\n\r\nconst REGISTRANT_TYPES = {\r\n SEC: 'SEC',\r\n NAIC: 'NAIC',\r\n OTHER: 'Other',\r\n};\r\n\r\nexport const REGISTRANT_OPTIONS_MAP = new Map();\r\nREGISTRANT_OPTIONS_MAP.set(\r\n REGISTRANT_TYPES.SEC,\r\n new MenuOption({\r\n id: 'registrant-option-SEC',\r\n title: 'statement-create.statement-info.registrant.option.SEC',\r\n value: REGISTRANT_TYPES.SEC,\r\n }),\r\n);\r\nREGISTRANT_OPTIONS_MAP.set(\r\n REGISTRANT_TYPES.NAIC,\r\n new MenuOption({\r\n id: 'registrant-option-NAIC',\r\n title: 'statement-create.statement-info.registrant.option.NAIC',\r\n value: REGISTRANT_TYPES.NAIC,\r\n }),\r\n);\r\nREGISTRANT_OPTIONS_MAP.set(\r\n REGISTRANT_TYPES.OTHER,\r\n new MenuOption({\r\n id: 'registrant-option-other',\r\n title: 'statement-create.statement-info.registrant.option.other',\r\n value: REGISTRANT_TYPES.OTHER,\r\n }),\r\n);\r\n\r\nexport const REGISTRANT_OPTIONS = Array.from(REGISTRANT_OPTIONS_MAP.values());\r\n\r\nconst SCALING_TYPES = {\r\n THOUSAND: 2,\r\n ONES: 1,\r\n MILLION: 3,\r\n BILLION: 4,\r\n TRILLION: 5,\r\n OTHER: 6,\r\n};\r\n\r\nexport const SCALING_OPTIONS_MAP = new Map();\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.THOUSAND,\r\n new MenuOption({\r\n id: 'scaling-option-thousand',\r\n title: 'statement-create.statement-info.scaling.option.thousand',\r\n value: SCALING_TYPES.THOUSAND,\r\n }),\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.ONES,\r\n new MenuOption({\r\n id: 'scaling-option-ones',\r\n title: 'statement-create.statement-info.scaling.option.ones',\r\n value: SCALING_TYPES.ONES,\r\n }),\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.MILLION,\r\n new MenuOption({\r\n id: 'scaling-option-million',\r\n title: 'statement-create.statement-info.scaling.option.million',\r\n value: SCALING_TYPES.MILLION,\r\n }),\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.BILLION,\r\n new MenuOption({\r\n id: 'scaling-option-billion',\r\n title: 'statement-create.statement-info.scaling.option.billion',\r\n value: SCALING_TYPES.BILLION,\r\n }),\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.TRILLION,\r\n new MenuOption({\r\n id: 'scaling-option-trillion',\r\n title: 'statement-create.statement-info.scaling.option.trillion',\r\n value: SCALING_TYPES.TRILLION,\r\n }),\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.OTHER,\r\n new MenuOption({\r\n id: 'scaling-option-other',\r\n title: 'statement-create.statement-info.scaling.option.other',\r\n value: SCALING_TYPES.OTHER,\r\n }),\r\n);\r\n\r\nexport const SCALING_OPTIONS = Array.from(SCALING_OPTIONS_MAP.values());\r\n\r\nconst UNIT_TYPES = {\r\n CURRENCY: 1,\r\n PERCENTAGE: 2,\r\n SHARES: 3,\r\n TEXT: 4,\r\n OTHER: 5,\r\n};\r\n\r\nexport const UNIT_OPTIONS_MAP = new Map();\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.CURRENCY,\r\n new MenuOption({\r\n id: 'unit-option-currency',\r\n title: 'statement-create.statement-info.unit.option.currency',\r\n value: UNIT_TYPES.CURRENCY,\r\n }),\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.PERCENTAGE,\r\n new MenuOption({\r\n id: 'unit-option-percentage',\r\n title: 'statement-create.statement-info.unit.option.percentage',\r\n value: UNIT_TYPES.PERCENTAGE,\r\n }),\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.SHARES,\r\n new MenuOption({\r\n id: 'unit-option-shares',\r\n title: 'statement-create.statement-info.unit.option.shares',\r\n value: UNIT_TYPES.SHARES,\r\n }),\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.TEXT,\r\n new MenuOption({\r\n id: 'unit-option-text',\r\n title: 'statement-create.statement-info.unit.option.text',\r\n value: UNIT_TYPES.TEXT,\r\n }),\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.OTHER,\r\n new MenuOption({\r\n id: 'unit-option-other',\r\n title: 'statement-create.statement-info.unit.option.other',\r\n value: UNIT_TYPES.OTHER,\r\n }),\r\n);\r\n\r\nexport const UNIT_OPTIONS = Array.from(UNIT_OPTIONS_MAP.values());\r\n\r\nexport const getProjectNameMenuOptions = (projectList) => {\r\n return projectList.map(\r\n (project) =>\r\n new MenuOption({\r\n id: project.id,\r\n title: project.name,\r\n value: project,\r\n isIntl: false,\r\n }),\r\n );\r\n};\r\n\r\nconst filterLanguagesForLegacy = [\r\n 'sd-Arab', // Sindhi\r\n 'zgh-Tfng', // Standard Moroccan Tamazight (tamazightTfng)\r\n 'zgh-Tfng-MA', // Standard Moroccan Tamazight (tamazightTfngMA)\r\n 'nqo-GN', // N'Ko (nqo-GN)\r\n 'iu-Cans', // Inuktitut (iu-Cans) - inuktitutSyllabics\r\n 'iu-Cans-CA', // Inuktitut (iu-CansCA) - inuktitutSyllabicsCA\r\n 'ja-JP', // Japanese (ja-JP)\r\n 'km-KH', // Khmer (km-KH)\r\n 'ko-KR', // Korean (ko-KR)\r\n 'lo-LA', // Lao (lo-LA)\r\n 'my-MM', // Burmese (my-MM)\r\n 'tzm-Tfng-MA', // Central Atlas Tamazight (tzm-TfngMA)\r\n 'chr-Cher', // Cherokee (chr-Cher)\r\n 'zh-Hans', //'Chinese (Simplified)',\r\n 'zh-CHS', //'Chinese (Simplified) Legacy',\r\n 'zh-CN', //'Chinese (Simplified, China)',\r\n 'zh-SG', //'Chinese (Simplified, Singapore)',\r\n 'zh-Hant', //'Chinese (Traditional)',\r\n 'zh-CHT', //'Chinese (Traditional) Legacy',\r\n 'zh-HK', //'Chinese (Traditional, Hong Kong SAR)',\r\n 'zh-MO', //'Chinese (Traditional, Macao SAR)',\r\n 'zh-TW', //'Chinese (Traditional, Taiwan)',\r\n 'mn-Cyrl', //'Mongolian (Cyrillic)',\r\n 'mn-Cyrl-MN', //'Mongolian (Cyrillic, Mongolia)',\r\n 'mn-Mong', //'Mongolian (Traditional Mongolian)',\r\n 'mn-Mong-CN', //'Mongolian (Traditional Mongolian, China)',\r\n 'mn-Mong-MN', //'Mongolian (Traditional Mongolian, Mongolia)',\r\n 'tzm-Tfng-MA', //'Central Atlas Tamazight (Tifinagh, Morocco)'\r\n 'ti-ER', //'Tigrinya (Eritrea)'\r\n 'ti-ET', //'Tigrinya (Ethiopia)'\r\n 'bo-CN', //'Tibetan (China)'\r\n];\r\n\r\nexport const getLanguagesMenuOptions = (languages, isPdfSelected) => {\r\n const languageOptions = languages.reduce(\r\n (acc, lang) => {\r\n const option = new MenuOption({\r\n id: lang.languageCode,\r\n title: lang.languageName,\r\n value: lang.languageCode,\r\n isIntl: false,\r\n });\r\n lang.displayOrder >= 0\r\n ? acc.main.push(option)\r\n : !isPdfSelected &&\r\n !filterLanguagesForLegacy.includes(lang.languageCode)\r\n ? acc.other.push(option)\r\n : isPdfSelected && acc.other.push(option);\r\n return acc;\r\n },\r\n { main: [], other: [] },\r\n );\r\n\r\n languageOptions.main.push(getLanguageOtherOption());\r\n return [...languageOptions.main, ...languageOptions.other];\r\n};\r\n\r\nconst getLanguageOtherOption = () => {\r\n return new MenuOption({\r\n id: 'statement-create.statement-info.language-other-option',\r\n title: 'statement-create.statement-info.language-other-option.label',\r\n value: 'statement-create.statement-info.language-other-option',\r\n isIntl: true,\r\n isNotIntl: false,\r\n isLabel: true,\r\n });\r\n};\r\n\r\nexport const defaultSelectedProject = (selectedProject) => {\r\n return new MenuOption({\r\n id: selectedProject.id,\r\n title: selectedProject.name,\r\n value: selectedProject,\r\n isIntl: false,\r\n });\r\n};\r\n\r\nexport const CARRYFORWARD_COLUMNS = [\r\n new DataGridCheckboxColumn({\r\n id: 'carryforward-col-checkbox-id',\r\n }),\r\n new DataGridColumn({\r\n key: 'statementName',\r\n header: 'statement-list.column.statement-name',\r\n width: '40%',\r\n formatter: (statement, { rowKey }) => {\r\n const getStatementStatusSuffix = () => {\r\n if (statement.isPendingApproval()) {\r\n return (\r\n \r\n );\r\n } else if (statement.hasApprovalInitiated()) {\r\n return (\r\n \r\n );\r\n } else if (statement.isWrappedUp()) {\r\n return (\r\n \r\n );\r\n }\r\n };\r\n const colId = `statement-name-col-${rowKey}`;\r\n return (\r\n <>\r\n \r\n {getStatementStatusSuffix()}\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'type',\r\n header: 'statement-list.column.type',\r\n width: '15%',\r\n formatter: (statement, { rowKey }) => {\r\n const colId = `statement-type-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'fiscalYear',\r\n header: 'statement-list.column.fiscal-year',\r\n width: '15%',\r\n }),\r\n new DataGridColumn({\r\n key: 'periodEnding',\r\n header: 'statement-list.column.period-ending',\r\n width: '15%',\r\n formatter: (statement) =>\r\n moment(statement.periodEnding).format(DATE_FORMATS.MONTH_DAY_YEAR),\r\n }),\r\n new DataGridColumn({\r\n key: 'status',\r\n header: 'statement-list.column.status',\r\n width: '15%',\r\n formatter: (statement) => {\r\n return `${Math.round(\r\n (statement.percentageCompleted * 100 * 100) / 100,\r\n )}%`;\r\n },\r\n }),\r\n];\r\nexport const ENABLE_LEGAL_HOLD_TOOLTIP = new TooltipOptions({\r\n text: 'project-edit.manage-legal-hold-enable-tooltip.text',\r\n id: 'project-edit-manage-legal-hold-enable-tool-tip',\r\n position: 'right',\r\n});\r\nexport const DISABLE_LEGAL_HOLD_TOOLTIP = new TooltipOptions({\r\n text: 'project-edit.manage-legal-hold-disable-tooltip.text',\r\n id: 'project-edit-manage-legal-hold-disable-tool-tip',\r\n position: 'right',\r\n});\r\nexport const ENABLE_AUTO_IR_TOOLTIP = new TooltipOptions({\r\n text: 'statement-create.statement.info-auto-ir-enable-tooltip.text',\r\n id: 'statement-create-statement-info-auto-ir-enable-tool-tip',\r\n position: 'right',\r\n});\r\n\r\nexport const DISABLED_COMFORT_LETTER_TOOLTIP = new TooltipOptions({\r\n text: 'project-edit.disabled-comfort-letter-tooltip.text',\r\n id: 'project-edit-disabled-comfort-letter-tooltip-id',\r\n position: 'right',\r\n});\r\n\r\nexport const getDateFormatMenuOptions = (dateFormats) => {\r\n return dateFormats.map(\r\n (date) =>\r\n new MenuOption({\r\n id: date.id,\r\n title: DATE_FORMATS_TITLES_LIST[date.id],\r\n value: date.id,\r\n isIntl: true,\r\n }),\r\n );\r\n};\r\n\r\nexport const getNumberFormatMenuOptions = (numberFormats) => {\r\n return numberFormats.map(\r\n (numb) =>\r\n new MenuOption({\r\n id: numb.id,\r\n title: numb.formatKey.trim(),\r\n value: numb.id,\r\n isIntl: true,\r\n }),\r\n );\r\n};\r\n","import { getStore } from 'store/store';\r\nimport {\r\n STATEMENT_ELEMENT_ID_PREFIX,\r\n STATEMENT_PSEUDO_ELEMENT_ID_PREFIX,\r\n REACT_SECTION_ID_PREFIX,\r\n REACT_LEFT_STATEMENT_SECTION_ID_PREFIX,\r\n OCR_SECTION_ID,\r\n} from 'constants/feature/statement-content-constants';\r\nimport { isNullOrUndefined } from './object-utils';\r\nimport { getElementDetailsRequest } from 'api/element-api';\r\n\r\nexport const smoothScrollIntoCenterById = (id) => {\r\n document.getElementById(id).scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center',\r\n inline: 'nearest',\r\n });\r\n};\r\nexport const smoothScrollIntoTopById = (id) => {\r\n const element = document.getElementById(id);\r\n if (element) {\r\n element.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'start',\r\n inline: 'nearest',\r\n });\r\n }\r\n};\r\nexport const smoothScrollWithOffset = (offset, elementTop) => {\r\n const bodyTop = document.body.getBoundingClientRect().top;\r\n const elementPosition = elementTop - bodyTop;\r\n const offsetPosition = elementPosition - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: 'smooth',\r\n });\r\n};\r\nconst _scrollToSectionWithMutationObserver = ({\r\n mutationCallback,\r\n sectionId,\r\n currentSelectorToScrollTo,\r\n isOCR,\r\n}) => {\r\n const sectionName = isOCR ? OCR_SECTION_ID : REACT_SECTION_ID_PREFIX;\r\n const sectionNodeId = `${sectionName}${sectionId}`;\r\n\r\n // element not rendered, scroll to section\r\n smoothScrollIntoCenterById(sectionNodeId);\r\n\r\n // Keeping track of last scrollTo elementId so that we can detect outdated calls\r\n window.__currentSelectorToScrollTo = currentSelectorToScrollTo;\r\n\r\n // Options to observer childList changes only\r\n const config = { attributes: false, childList: true, subtree: false };\r\n\r\n // Disconnect any existing mutation observers\r\n if (window.__scrollToElementObserver)\r\n window.__scrollToElementObserver.disconnect();\r\n\r\n // Create an observer instance linked to the callback function to detect when details are loaded\r\n window.__scrollToElementObserver = new MutationObserver(mutationCallback);\r\n\r\n // Start observing the target node for configured mutations\r\n window.__scrollToElementObserver.observe(\r\n document.getElementById(sectionNodeId),\r\n config,\r\n );\r\n\r\n //Ensure we're disconnecting the observer after 30 seconds in case still observing\r\n setTimeout(() => {\r\n window.__scrollToElementObserver.disconnect();\r\n }, 30000);\r\n};\r\n\r\nexport const immediateScrollToSectionWhenLoaded = ({ sectionId }) => {\r\n const sectionNodeId = `${REACT_SECTION_ID_PREFIX}${sectionId}`;\r\n\r\n // Options to observer childList changes only\r\n const config = { attributes: false, childList: true, subtree: false };\r\n\r\n // Disconnect any existing mutation observers\r\n if (window.__scrollToSectionObserver)\r\n window.__scrollToSectionObserver.disconnect();\r\n\r\n // Create an observer instance linked to the callback function to detect when details are loaded\r\n window.__scrollToSectionObserver = new MutationObserver(\r\n (mutationsList, observer) => {\r\n if (\r\n mutationsList.some(\r\n //if section is among the newly added nodes\r\n (mutation) =>\r\n mutation.addedNodes.length > 0 &&\r\n mutation.addedNodes[0].id === sectionNodeId,\r\n )\r\n ) {\r\n document.getElementById(\r\n 'statement-content-panel-id',\r\n ).parentNode.scrollTop =\r\n document.getElementById(sectionNodeId).offsetTop;\r\n\r\n observer.disconnect();\r\n }\r\n },\r\n );\r\n\r\n // Start observing the target node for configured mutations\r\n window.__scrollToSectionObserver.observe(\r\n document.getElementById('statement-content-panel-zoom-id'),\r\n config,\r\n );\r\n\r\n // Ensure we're disconnecting the observer after 30 seconds in case still observing\r\n setTimeout(() => {\r\n window.__scrollToSectionObserver.disconnect();\r\n }, 30000);\r\n};\r\n\r\nexport const scrollSectionIntoView = (sectionId) => {\r\n const sectionNodeId = `${REACT_SECTION_ID_PREFIX}${sectionId}`;\r\n const section = document.getElementById(sectionNodeId);\r\n if (section) {\r\n section.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'start',\r\n inline: 'nearest',\r\n });\r\n }\r\n};\r\n\r\nexport const scrollLeftSectionIntoView = (sectionId) => {\r\n const sectionNodeId = `${REACT_LEFT_STATEMENT_SECTION_ID_PREFIX}${sectionId}`;\r\n const section = document.getElementById(sectionNodeId);\r\n if (section) {\r\n section.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'start',\r\n inline: 'nearest',\r\n });\r\n }\r\n};\r\n\r\nexport const scrollSelectorIntoView = ({ selector, sectionId }) => {\r\n const store = getStore();\r\n const storeState = store.getState();\r\n const { sectionsInView } = storeState.ui.statementPage;\r\n const {\r\n selectedStatement: { isOCR },\r\n } = storeState.data;\r\n\r\n const sectionName = isOCR ? OCR_SECTION_ID : REACT_SECTION_ID_PREFIX;\r\n const sectionNodeId = `${sectionName}${sectionId}`;\r\n\r\n const fullSelector = `#${sectionNodeId} ${selector}`;\r\n\r\n let foundSelection = document.querySelector(fullSelector);\r\n\r\n const scrollToContent = (selection) => {\r\n if (!isNullOrUndefined(selection)) {\r\n selection.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center',\r\n inline: 'nearest',\r\n });\r\n } else {\r\n console.error(`Invalid selector (${fullSelector})`);\r\n }\r\n };\r\n\r\n if (sectionsInView.has(sectionId) && !isNullOrUndefined(foundSelection)) {\r\n // element is already rendered, scroll directly to it\r\n scrollToContent(foundSelection);\r\n } else {\r\n _scrollToSectionWithMutationObserver({\r\n sectionId,\r\n currentSelectorToScrollTo: fullSelector,\r\n mutationCallback: (mutationsList, observer) => {\r\n const newFoundSelecion = document.querySelector(fullSelector);\r\n const _shouldScrollToElement =\r\n window.__currentSelectorToScrollTo === fullSelector &&\r\n !isNullOrUndefined(newFoundSelecion);\r\n\r\n if (_shouldScrollToElement) {\r\n scrollToContent(newFoundSelecion);\r\n\r\n window.__currentSelectorToScrollTo = null;\r\n observer.disconnect();\r\n }\r\n },\r\n });\r\n }\r\n};\r\n\r\nexport const scrollOCRSelectorIntoView = ({ selector, sectionId }) => {\r\n const store = getStore();\r\n const storeState = store.getState();\r\n const { sectionsInView } = storeState.ui.statementPage;\r\n const {\r\n selectedStatement: { isOCR },\r\n } = storeState.data;\r\n\r\n const searchContent = 'statement-content-search-id';\r\n\r\n const fullSelector = `${searchContent}-${selector}`;\r\n\r\n let foundSelection = document.querySelector(fullSelector);\r\n\r\n const scrollToContent = (selection) => {\r\n if (!isNullOrUndefined(selection)) {\r\n selection.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center',\r\n inline: 'nearest',\r\n });\r\n } else {\r\n console.error(`Invalid selector (${fullSelector})`);\r\n }\r\n };\r\n\r\n if (sectionsInView.has(sectionId) && !isNullOrUndefined(foundSelection)) {\r\n // element is already rendered, scroll directly to it\r\n scrollToContent(foundSelection);\r\n } else {\r\n _scrollToSectionWithMutationObserver({\r\n sectionId,\r\n currentSelectorToScrollTo: fullSelector,\r\n mutationCallback: (mutationsList, observer) => {\r\n const newFoundSelecion = document.querySelector(fullSelector);\r\n const _shouldScrollToElement =\r\n window.__currentSelectorToScrollTo === fullSelector &&\r\n !isNullOrUndefined(newFoundSelecion);\r\n\r\n if (_shouldScrollToElement) {\r\n scrollToContent(newFoundSelecion);\r\n\r\n window.__currentSelectorToScrollTo = null;\r\n observer.disconnect();\r\n }\r\n },\r\n isOCR,\r\n });\r\n }\r\n};\r\n\r\nexport const scrollElementIntoView = ({ elementId, sectionId }) => {\r\n const store = getStore();\r\n const storeState = store.getState();\r\n const { sectionsInView } = storeState.ui.statementPage;\r\n const {\r\n selectedStatement: { isOCR },\r\n } = storeState.data;\r\n\r\n const elementNodeId = `${STATEMENT_ELEMENT_ID_PREFIX}${elementId}`;\r\n\r\n if (sectionsInView.has(sectionId) && document.getElementById(elementNodeId)) {\r\n // element is already rendered, scroll directly to it\r\n smoothScrollIntoCenterById(elementNodeId);\r\n } else {\r\n _scrollToSectionWithMutationObserver({\r\n sectionId,\r\n currentSelectorToScrollTo: elementNodeId,\r\n mutationCallback: (mutationsList, observer) => {\r\n const _shouldScrollToElement =\r\n window.__currentSelectorToScrollTo === elementNodeId &&\r\n document.getElementById(elementNodeId);\r\n\r\n if (_shouldScrollToElement) {\r\n smoothScrollIntoCenterById(elementNodeId);\r\n\r\n window.__currentSelectorToScrollTo = null;\r\n observer.disconnect();\r\n }\r\n },\r\n isOCR,\r\n });\r\n }\r\n};\r\n\r\nexport const scrollElementIntoViewAlertOnMissing = async ({\r\n elementId,\r\n sectionId,\r\n missingElementCallback,\r\n}) => {\r\n const store = getStore();\r\n const storeState = store.getState();\r\n const { sectionsInView } = storeState.ui.statementPage;\r\n const {\r\n selectedStatement: { isOCR },\r\n } = storeState.data;\r\n\r\n const elementNodeId = `${STATEMENT_ELEMENT_ID_PREFIX}${elementId}`;\r\n\r\n if (sectionsInView.has(sectionId) && document.getElementById(elementNodeId)) {\r\n //Scroll directly to element if rendered already\r\n smoothScrollIntoCenterById(elementNodeId);\r\n } else {\r\n let element;\r\n const { revision } = storeState.data;\r\n //getElementDetailsRequest contains details about the element such as the carryforward status\r\n await getElementDetailsRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n }).then((res) => (element = res.data.result));\r\n\r\n if (element.carryForwardStatus === 4) missingElementCallback();\r\n\r\n _scrollToSectionWithMutationObserver({\r\n sectionId,\r\n currentSelectorToScrollTo: elementNodeId,\r\n mutationCallback: (mutationsList, observer) => {\r\n const _shouldScrollToElement =\r\n window.__currentSelectorToScrollTo === elementNodeId &&\r\n document.getElementById(elementNodeId);\r\n\r\n if (_shouldScrollToElement) {\r\n smoothScrollIntoCenterById(elementNodeId);\r\n\r\n window.__currentSelectorToScrollTo = null;\r\n observer.disconnect();\r\n }\r\n },\r\n isOCR,\r\n });\r\n }\r\n};\r\n\r\nexport const scrollNoteIntoView = ({ pseudoElementId, sectionId }) => {\r\n const store = getStore();\r\n const storeState = store.getState();\r\n const { sectionsInView } = storeState.ui.statementPage;\r\n const {\r\n selectedStatement: { isOCR },\r\n } = storeState.data;\r\n\r\n const pseudoElementNodeId = `${STATEMENT_PSEUDO_ELEMENT_ID_PREFIX}${pseudoElementId}`;\r\n\r\n if (!sectionsInView.has(sectionId)) {\r\n _scrollToSectionWithMutationObserver({\r\n sectionId,\r\n currentSelectorToScrollTo: pseudoElementNodeId + '_0',\r\n mutationCallback: (mutationsList, observer) => {\r\n const _shouldScrollToPseudoElement =\r\n window.__currentSelectorToScrollTo === pseudoElementNodeId + '_0' &&\r\n document.getElementById(pseudoElementNodeId + '_0');\r\n if (_shouldScrollToPseudoElement) {\r\n smoothScrollIntoCenterById(pseudoElementNodeId + '_0');\r\n window.__currentSelectorToScrollTo = null;\r\n observer.disconnect();\r\n }\r\n },\r\n isOCR,\r\n });\r\n } else if (document.getElementById(pseudoElementNodeId + '_0')) {\r\n smoothScrollIntoCenterById(pseudoElementNodeId + '_0');\r\n } else if (document.getElementById(pseudoElementNodeId)) {\r\n smoothScrollIntoCenterById(pseudoElementNodeId);\r\n }\r\n};\r\n\r\nexport function scrollIntoViewForVirtualizedList(listId, itemHeight, index) {\r\n document.getElementById(listId).scrollTop = itemHeight * index;\r\n}\r\n\r\n// this functions returns the most visible element currently visible in the viewport\r\n//this works for scrolling functionalities that needs to know that information to change the UI\r\n// it receives an array of HTML elements and returns the id of the most visible element.\r\n// took it from https://stackoverflow.com/questions/38360676/get-the-element-which-is-the-most-visible-on-the-screen\r\nexport const getMostVisible = (elements) => {\r\n let element,\r\n viewportHeight = window.innerHeight,\r\n max = 0,\r\n current;\r\n elements.forEach((elem, index) => {\r\n let visiblePx = getVisibleHeightPx(elem, viewportHeight);\r\n\r\n if (visiblePx > max) {\r\n max = visiblePx;\r\n element = elem;\r\n current = index;\r\n }\r\n });\r\n\r\n return element ? elements[current].id : null;\r\n};\r\n\r\nexport const getVisibleHeightPx = (element, viewportHeight) => {\r\n let rect = element.getBoundingClientRect(),\r\n height = rect.bottom - rect.top,\r\n visible = {\r\n top: rect.top >= 0 && rect.top < viewportHeight,\r\n bottom: rect.bottom > 0 && rect.bottom < viewportHeight,\r\n },\r\n visiblePx = 0;\r\n\r\n if (visible.top && visible.bottom) {\r\n // Whole element is visible\r\n visiblePx = height;\r\n } else if (visible.top) {\r\n visiblePx = viewportHeight - rect.top;\r\n } else if (visible.bottom) {\r\n visiblePx = rect.bottom;\r\n } else if (height > viewportHeight && rect.top < 0) {\r\n let absTop = Math.abs(rect.top);\r\n\r\n if (absTop < height) {\r\n // Part of the element is visible\r\n visiblePx = height - absTop;\r\n }\r\n }\r\n\r\n return visiblePx;\r\n};\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const toggleFormulaCancelModalAction = createAction(\r\n 'TOGGLE_FORMULA_CANCEL_MODAL_ACTION',\r\n);\r\n\r\nexport const toggleInternalReferenceCancelModalAction = createAction(\r\n 'TOGGLE_IR_CANCEL_MODAL_ACTION',\r\n);\r\n\r\nexport const openCancelModalAfterModalConfirmAction = createAction(\r\n 'OPEN_CANCEL_MODAL_AFTER_CONFIRM_ACTION',\r\n);\r\n\r\nexport const storeSelectedNoteIdAction = createAction(\r\n 'STORE_SELECTED_NOTE_ID_ACTION',\r\n);\r\n\r\nexport const storeSelectedSectionIdAction = createAction(\r\n 'STORE_SELECTED_SECTION_ID_ACTION',\r\n);\r\n\r\nexport const openSectionPanelAfterCancelConfirmAction = createAction(\r\n 'OPEN_SECTION_PANEL_AFTER_CANCEL_CONFIRM_ACTION',\r\n);\r\n\r\nexport const storeSelectedNotePseudoIdAction = createAction(\r\n 'STORE_SELECTED_NOTE_PSEUDO_ID_ACTION',\r\n);\r\n\r\nexport const toggleFormulaCancelModal = (state) => (dispatch) => {\r\n dispatch(toggleFormulaCancelModalAction(state));\r\n};\r\n\r\nexport const toggleInternalReferenceCancelModal = (state) => (dispatch) => {\r\n dispatch(toggleInternalReferenceCancelModalAction(state));\r\n};\r\n\r\nexport const openCancelModalAfterModalConfirm = (state) => (dispatch) => {\r\n dispatch(openCancelModalAfterModalConfirmAction(state));\r\n};\r\n\r\nexport const storeSelectedNoteId = (id) => (dispatch) => {\r\n dispatch(storeSelectedNoteIdAction(id));\r\n};\r\n\r\nexport const storeSelectedNotePseudoId = (id) => (dispatch) => {\r\n dispatch(storeSelectedNotePseudoIdAction(id));\r\n};\r\n","import moment from 'moment';\r\n\r\n/**\r\n * This is a utility function that converts the UTC-based timestamps that we receive from the back-end to\r\n * localized dates on the front-end based on the user's current timezone. Currently we are storing the UTC-based time in the database,\r\n * which is served up to us as a parseable timeStamp string.\r\n * @param {String} utcTime : The actual time we wish to convert, passed in as a String\r\n * @param {String} format : The format of how we want to receive the converted Date, passed in as a String used by moment.js for formatting, e.g: 'MM-DD-YYYY'\r\n */\r\nexport const convertUTCTimeStampToLocalTime = (utcTime, format) => {\r\n return moment.utc(utcTime).local().format(format);\r\n};\r\n","export default class StatementStatusModel {\r\n id;\r\n name;\r\n desc;\r\n lname;\r\n intlIdentifier;\r\n constructor({ id, name, desc, lname, intlIdentifier }) {\r\n this.id = id;\r\n this.name = name;\r\n this.desc = desc;\r\n this.lname = lname;\r\n this.intlIdentifier = intlIdentifier; //internationalization string identifier\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.63636 21.5833C4.50909 21.5833 4.38182 21.5197 4.31818 21.4561C4.25455 21.4561 4.25455 21.3924 4.19091 21.3288C4.06364 21.2652 4 21.1379 4 20.947V8.21971C4 7.83789 4.25455 7.58334 4.63636 7.58334H8.45455C8.64545 7.58334 8.77273 7.64698 8.9 7.77425L9.98182 8.85607H19.9091C20.2909 8.85607 20.5455 9.11062 20.5455 9.49243V11.4015H22.4545C22.6455 11.4015 22.8364 11.4652 22.9636 11.6561C23.0909 11.7833 23.0909 12.0379 23.0909 12.2288L20.5455 21.1379C20.4818 21.3924 20.2273 21.5833 19.9091 21.5833H4.63636ZM5.52727 20.3106H19.4L21.5636 12.6743H8.2L5.52727 20.3106ZM5.27273 8.85607V17.2561L7.24545 11.7833C7.30909 11.5288 7.56364 11.3379 7.81818 11.3379H19.2727V10.0652H9.72727C9.53636 10.0652 9.40909 10.0015 9.28182 9.87425L8.2 8.85607H5.27273Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgOpenFolder = function SvgOpenFolder(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgOpenFolder, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/open-folder.67b2a45c.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.50933 0.0921631C4.30262 0.0921631 0.0836792 4.31217 0.0836792 9.5177C0.0836792 14.7232 4.30262 18.9433 9.50933 18.9433C14.7149 18.9433 18.935 14.7232 18.935 9.5177C18.935 4.31217 14.7149 0.0921631 9.50933 0.0921631ZM14.6145 9.91068H10.457L13.3211 12.7748C13.4746 12.9283 13.4746 13.1773 13.3211 13.3307C13.2444 13.4074 13.1441 13.4451 13.0438 13.4451C12.9435 13.4451 12.842 13.4074 12.7653 13.3307L9.90113 10.4665V14.6241C9.90113 14.8414 9.7253 15.0159 9.50933 15.0159C9.29219 15.0159 9.11635 14.8414 9.11635 14.6241V10.4665L6.25219 13.3307C6.17548 13.4074 6.07517 13.4451 5.97368 13.4451C5.87337 13.4451 5.77306 13.4074 5.69635 13.3307C5.54293 13.1773 5.54293 12.9283 5.69635 12.7748L8.56051 9.91068H4.40293C4.18697 9.91068 4.00995 9.73484 4.00995 9.5177C4.00995 9.30055 4.18697 9.1259 4.40293 9.1259H8.56051L5.69635 6.26055C5.54293 6.10714 5.54293 5.85931 5.69635 5.7059C5.84977 5.55248 6.09877 5.55248 6.25219 5.7059L9.11635 8.57006V4.4126C9.11635 4.19534 9.29219 4.0195 9.50933 4.0195C9.7253 4.0195 9.90113 4.19534 9.90113 4.4126V8.57006L12.7653 5.7059C12.9187 5.55248 13.1677 5.55248 13.3211 5.7059C13.4746 5.85931 13.4746 6.10714 13.3211 6.26055L10.457 9.1259H14.6145C14.8317 9.1259 15.0075 9.30055 15.0075 9.5177C15.0075 9.73484 14.8317 9.91068 14.6145 9.91068Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgAsterisk = function SvgAsterisk(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 19,\n height: 19,\n viewBox: \"0 0 19 19\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgAsterisk, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/asterisk.0989f22f.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M27.5001 24.1667C27.0029 24.1705 26.5128 24.2854 26.0658 24.5032C25.6188 24.7209 25.2262 25.0359 24.9167 25.425L14.0834 20.5667C14.1595 20.1955 14.1595 19.8128 14.0834 19.4417L24.9167 14.5833C25.44 15.2405 26.1856 15.6836 27.013 15.8291C27.8404 15.9746 28.6924 15.8125 29.4085 15.3733C30.1246 14.934 30.6553 14.2481 30.9007 13.4446C31.146 12.6412 31.0891 11.7757 30.7405 11.0114C30.3919 10.247 29.7758 9.63659 29.0083 9.29505C28.2408 8.95351 27.3749 8.90449 26.5737 9.15721C25.7726 9.40994 25.0915 9.94695 24.6589 10.6671C24.2263 11.3872 24.072 12.2407 24.225 13.0667L13.3917 17.925C12.9601 17.3859 12.3717 16.9942 11.7078 16.8039C11.0439 16.6137 10.3373 16.6344 9.68566 16.8631C9.03403 17.0918 8.46953 17.5173 8.07016 18.0807C7.6708 18.6442 7.4563 19.3177 7.4563 20.0083C7.4563 20.6989 7.6708 21.3725 8.07016 21.9359C8.46953 22.4994 9.03403 22.9248 9.68566 23.1535C10.3373 23.3823 11.0439 23.403 11.7078 23.2127C12.3717 23.0225 12.9601 22.6308 13.3917 22.0917L24.225 26.95C24.1123 27.624 24.2094 28.3164 24.5033 28.9333C24.7971 29.5503 25.2735 30.062 25.8678 30.3992C26.4622 30.7364 27.1458 30.8828 27.8262 30.8185C28.5065 30.7543 29.1506 30.4825 29.6713 30.0399C30.1921 29.5974 30.5642 29.0055 30.7373 28.3445C30.9104 27.6834 30.8762 26.9851 30.6392 26.3441C30.4023 25.7032 29.974 25.1505 29.4125 24.7611C28.851 24.3716 28.1834 24.1641 27.5001 24.1667ZM27.5001 10.8333C27.8297 10.8333 28.1519 10.9311 28.426 11.1142C28.7001 11.2974 28.9137 11.5577 29.0399 11.8622C29.166 12.1667 29.199 12.5018 29.1347 12.8252C29.0704 13.1485 28.9117 13.4454 28.6786 13.6785C28.4455 13.9116 28.1485 14.0703 27.8252 14.1346C27.5019 14.199 27.1668 14.1659 26.8622 14.0398C26.5577 13.9137 26.2974 13.7 26.1143 13.426C25.9311 13.1519 25.8334 12.8296 25.8334 12.5C25.8334 12.058 26.009 11.6341 26.3215 11.3215C26.6341 11.0089 27.058 10.8333 27.5001 10.8333ZM10.8334 21.6667C10.5037 21.6667 10.1815 21.5689 9.90743 21.3858C9.63335 21.2027 9.41973 20.9424 9.29358 20.6378C9.16744 20.3333 9.13443 19.9982 9.19874 19.6749C9.26305 19.3516 9.42178 19.0546 9.65487 18.8215C9.88796 18.5884 10.1849 18.4297 10.5082 18.3654C10.8315 18.3011 11.1666 18.3341 11.4712 18.4602C11.7757 18.5863 12.036 18.8 12.2192 19.0741C12.4023 19.3481 12.5 19.6704 12.5 20C12.5 20.442 12.3245 20.866 12.0119 21.1785C11.6993 21.4911 11.2754 21.6667 10.8334 21.6667ZM27.5001 29.1667C27.1704 29.1667 26.8482 29.0689 26.5741 28.8858C26.3 28.7027 26.0864 28.4424 25.9603 28.1378C25.8341 27.8333 25.8011 27.4982 25.8654 27.1749C25.9297 26.8516 26.0885 26.5546 26.3215 26.3215C26.5546 26.0884 26.8516 25.9297 27.1749 25.8654C27.4982 25.8011 27.8333 25.8341 28.1379 25.9602C28.4424 26.0864 28.7027 26.3 28.8858 26.5741C29.069 26.8481 29.1667 27.1704 29.1667 27.5C29.1667 27.942 28.9911 28.366 28.6786 28.6785C28.366 28.9911 27.9421 29.1667 27.5001 29.1667Z\",\n fill: \"#212121\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"circle\", {\n cx: 26.25,\n cy: 26.25,\n r: 6.75,\n fill: \"#43B02A\",\n stroke: \"white\"\n});\n\nvar SvgStatusComplete = function SvgStatusComplete(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 40,\n height: 40,\n viewBox: \"0 0 40 40\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgStatusComplete, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/status-complete.99970dd1.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M27.5001 24.1667C27.0029 24.1705 26.5128 24.2854 26.0658 24.5032C25.6188 24.7209 25.2262 25.0359 24.9167 25.425L14.0834 20.5667C14.1595 20.1955 14.1595 19.8128 14.0834 19.4417L24.9167 14.5833C25.44 15.2405 26.1856 15.6836 27.013 15.8291C27.8404 15.9746 28.6924 15.8125 29.4085 15.3733C30.1246 14.934 30.6553 14.2481 30.9007 13.4446C31.146 12.6412 31.0891 11.7757 30.7405 11.0114C30.3919 10.247 29.7758 9.63659 29.0083 9.29505C28.2408 8.95351 27.3749 8.90449 26.5737 9.15721C25.7726 9.40994 25.0915 9.94695 24.6589 10.6671C24.2263 11.3872 24.072 12.2407 24.225 13.0667L13.3917 17.925C12.9601 17.3859 12.3717 16.9942 11.7078 16.8039C11.0439 16.6137 10.3373 16.6344 9.68566 16.8631C9.03403 17.0918 8.46953 17.5173 8.07016 18.0807C7.6708 18.6442 7.4563 19.3177 7.4563 20.0083C7.4563 20.6989 7.6708 21.3725 8.07016 21.9359C8.46953 22.4994 9.03403 22.9248 9.68566 23.1535C10.3373 23.3823 11.0439 23.403 11.7078 23.2127C12.3717 23.0225 12.9601 22.6308 13.3917 22.0917L24.225 26.95C24.1123 27.624 24.2094 28.3164 24.5033 28.9333C24.7971 29.5503 25.2735 30.062 25.8678 30.3992C26.4622 30.7364 27.1458 30.8828 27.8262 30.8185C28.5065 30.7543 29.1506 30.4825 29.6713 30.0399C30.1921 29.5974 30.5642 29.0055 30.7373 28.3445C30.9104 27.6834 30.8762 26.9851 30.6392 26.3441C30.4023 25.7032 29.974 25.1505 29.4125 24.7611C28.851 24.3716 28.1834 24.1641 27.5001 24.1667ZM27.5001 10.8333C27.8297 10.8333 28.1519 10.9311 28.426 11.1142C28.7001 11.2974 28.9137 11.5577 29.0399 11.8622C29.166 12.1667 29.199 12.5018 29.1347 12.8252C29.0704 13.1485 28.9117 13.4454 28.6786 13.6785C28.4455 13.9116 28.1485 14.0703 27.8252 14.1346C27.5019 14.199 27.1668 14.1659 26.8622 14.0398C26.5577 13.9137 26.2974 13.7 26.1143 13.426C25.9311 13.1519 25.8334 12.8296 25.8334 12.5C25.8334 12.058 26.009 11.6341 26.3215 11.3215C26.6341 11.0089 27.058 10.8333 27.5001 10.8333ZM10.8334 21.6667C10.5037 21.6667 10.1815 21.5689 9.90743 21.3858C9.63335 21.2027 9.41973 20.9424 9.29358 20.6378C9.16744 20.3333 9.13443 19.9982 9.19874 19.6749C9.26305 19.3516 9.42178 19.0546 9.65487 18.8215C9.88796 18.5884 10.1849 18.4297 10.5082 18.3654C10.8315 18.3011 11.1666 18.3341 11.4712 18.4602C11.7757 18.5863 12.036 18.8 12.2192 19.0741C12.4023 19.3481 12.5 19.6704 12.5 20C12.5 20.442 12.3245 20.866 12.0119 21.1785C11.6993 21.4911 11.2754 21.6667 10.8334 21.6667ZM27.5001 29.1667C27.1704 29.1667 26.8482 29.0689 26.5741 28.8858C26.3 28.7027 26.0864 28.4424 25.9603 28.1378C25.8341 27.8333 25.8011 27.4982 25.8654 27.1749C25.9297 26.8516 26.0885 26.5546 26.3215 26.3215C26.5546 26.0884 26.8516 25.9297 27.1749 25.8654C27.4982 25.8011 27.8333 25.8341 28.1379 25.9602C28.4424 26.0864 28.7027 26.3 28.8858 26.5741C29.069 26.8481 29.1667 27.1704 29.1667 27.5C29.1667 27.942 28.9911 28.366 28.6786 28.6785C28.366 28.9911 27.9421 29.1667 27.5001 29.1667Z\",\n fill: \"#212121\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"circle\", {\n cx: 26.25,\n cy: 26.25,\n r: 6.75,\n fill: \"#ED8B00\",\n stroke: \"white\"\n});\n\nvar SvgStatusInProgress = function SvgStatusInProgress(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 40,\n height: 40,\n viewBox: \"0 0 40 40\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgStatusInProgress, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/status-in-progress.28b5daf3.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M27.5001 24.1667C27.0029 24.1705 26.5128 24.2854 26.0658 24.5032C25.6188 24.7209 25.2262 25.0359 24.9167 25.425L14.0834 20.5667C14.1595 20.1955 14.1595 19.8128 14.0834 19.4417L24.9167 14.5833C25.44 15.2405 26.1856 15.6836 27.013 15.8291C27.8404 15.9746 28.6924 15.8125 29.4085 15.3733C30.1246 14.934 30.6553 14.2481 30.9007 13.4446C31.146 12.6412 31.0891 11.7757 30.7405 11.0114C30.3919 10.247 29.7758 9.63659 29.0083 9.29505C28.2408 8.95351 27.3749 8.90449 26.5737 9.15721C25.7726 9.40994 25.0915 9.94695 24.6589 10.6671C24.2263 11.3872 24.072 12.2407 24.225 13.0667L13.3917 17.925C12.9601 17.3859 12.3717 16.9942 11.7078 16.8039C11.0439 16.6137 10.3373 16.6344 9.68566 16.8631C9.03403 17.0918 8.46953 17.5173 8.07016 18.0807C7.6708 18.6442 7.4563 19.3177 7.4563 20.0083C7.4563 20.6989 7.6708 21.3725 8.07016 21.9359C8.46953 22.4994 9.03403 22.9248 9.68566 23.1535C10.3373 23.3823 11.0439 23.403 11.7078 23.2127C12.3717 23.0225 12.9601 22.6308 13.3917 22.0917L24.225 26.95C24.1123 27.624 24.2094 28.3164 24.5033 28.9333C24.7971 29.5503 25.2735 30.062 25.8678 30.3992C26.4622 30.7364 27.1458 30.8828 27.8262 30.8185C28.5065 30.7543 29.1506 30.4825 29.6713 30.0399C30.1921 29.5974 30.5642 29.0055 30.7373 28.3445C30.9104 27.6834 30.8762 26.9851 30.6392 26.3441C30.4023 25.7032 29.974 25.1505 29.4125 24.7611C28.851 24.3716 28.1834 24.1641 27.5001 24.1667ZM27.5001 10.8333C27.8297 10.8333 28.1519 10.9311 28.426 11.1142C28.7001 11.2974 28.9137 11.5577 29.0399 11.8622C29.166 12.1667 29.199 12.5018 29.1347 12.8252C29.0704 13.1485 28.9117 13.4454 28.6786 13.6785C28.4455 13.9116 28.1485 14.0703 27.8252 14.1346C27.5019 14.199 27.1668 14.1659 26.8622 14.0398C26.5577 13.9137 26.2974 13.7 26.1143 13.426C25.9311 13.1519 25.8334 12.8296 25.8334 12.5C25.8334 12.058 26.009 11.6341 26.3215 11.3215C26.6341 11.0089 27.058 10.8333 27.5001 10.8333ZM10.8334 21.6667C10.5037 21.6667 10.1815 21.5689 9.90743 21.3858C9.63335 21.2027 9.41973 20.9424 9.29358 20.6378C9.16744 20.3333 9.13443 19.9982 9.19874 19.6749C9.26305 19.3516 9.42178 19.0546 9.65487 18.8215C9.88796 18.5884 10.1849 18.4297 10.5082 18.3654C10.8315 18.3011 11.1666 18.3341 11.4712 18.4602C11.7757 18.5863 12.036 18.8 12.2192 19.0741C12.4023 19.3481 12.5 19.6704 12.5 20C12.5 20.442 12.3245 20.866 12.0119 21.1785C11.6993 21.4911 11.2754 21.6667 10.8334 21.6667ZM27.5001 29.1667C27.1704 29.1667 26.8482 29.0689 26.5741 28.8858C26.3 28.7027 26.0864 28.4424 25.9603 28.1378C25.8341 27.8333 25.8011 27.4982 25.8654 27.1749C25.9297 26.8516 26.0885 26.5546 26.3215 26.3215C26.5546 26.0884 26.8516 25.9297 27.1749 25.8654C27.4982 25.8011 27.8333 25.8341 28.1379 25.9602C28.4424 26.0864 28.7027 26.3 28.8858 26.5741C29.069 26.8481 29.1667 27.1704 29.1667 27.5C29.1667 27.942 28.9911 28.366 28.6786 28.6785C28.366 28.9911 27.9421 29.1667 27.5001 29.1667Z\",\n fill: \"#212121\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"circle\", {\n cx: 26.25,\n cy: 26.25,\n r: 6.75,\n fill: \"#DA291C\",\n stroke: \"white\"\n});\n\nvar SvgStatusError = function SvgStatusError(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 40,\n height: 40,\n viewBox: \"0 0 40 40\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgStatusError, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/status-error.eda8a053.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { convertUTCTimeStampToLocalTime } from 'utils/time-formatter-util';\r\nimport { DataGridColumn } from 'components/common/data-grid/data-grid-component';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { DataGridKebabColumn } from 'components/common/data-grid/data-grid-component';\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport StatementStatusModel from 'models/utils/common/statement-status-model';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { ReactComponent as RevisionIcon } from 'icons/open-folder.svg';\r\nimport { ReactComponent as AsteriskIcon } from 'icons/asterisk.svg';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport StatementProgressBar from 'components/feature/statement-list/statement-list-progress-bar-component';\r\nimport { STATEMENT_LIST_BLOCK } from 'components/feature/statement-list/statement-list-component';\r\nimport Permissions from 'permissions/permissions';\r\nimport { KebabMenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ReactComponent as SharingCompleteIcon } from 'icons/status-complete.svg';\r\nimport { ReactComponent as SharingInProgressIcon } from 'icons/status-in-progress.svg';\r\nimport { ReactComponent as SharingErrorIcon } from 'icons/status-error.svg';\r\nimport RolesUtil from 'permissions/utils/roles';\r\nimport classnames from 'classnames';\r\nimport { ReactComponent as Information } from 'icons/info.svg';\r\nimport { ReactComponent as FilledPin } from 'icons/FilledPin.svg';\r\n\r\nconst PIN_ICON_SIZE = '22px';\r\nconst STATEMENT_TYPE_MAP = {\r\n TEN_K: '10-K',\r\n TEN_Q: '10-Q',\r\n SIX_K: '6-K',\r\n PRESS_RELEASE: 'Press Release',\r\n TWENTY_F: '20-F',\r\n FORTY_F: '40-F',\r\n NCSR: 'N-CSR',\r\n PRIVATE_ANNUAL: 'Private Annual',\r\n PRIVATE_QUARTERLY: 'Private Quarterly',\r\n PROXY_STATEMENT: 'Proxy Statement',\r\n COMFORT_LETTER: 'Comfort Letter',\r\n REGISTRATION_STATEMENT: 'Registration Statement',\r\n INSURANCE_STATEMENT: 'Insurance Statement',\r\n IM_FUND_REPORT: 'IM fund report',\r\n AGENCY_REPORT: 'Agency Report',\r\n};\r\n\r\n/** these ENUM string values should correspond to the keys in STATEMENT_STATUS_LABELS */\r\nexport const STATEMENT_STATUS_ENUM = {\r\n 1: 'IN_PROGRESS',\r\n 2: 'PENDING_APPROVAL',\r\n 3: 'ARCHIVED',\r\n 4: 'DELETED',\r\n 5: 'APPROVAL_INITIATED',\r\n};\r\n\r\nexport const STATEMENT_STATUS_LABELS = {\r\n IN_PROGRESS: new StatementStatusModel({\r\n id: 1,\r\n name: 'In Progress',\r\n desc: 'In Progress',\r\n lname: 'in progress',\r\n intlIdentifier: 'inProgress',\r\n }),\r\n\r\n PENDING_APPROVAL: new StatementStatusModel({\r\n id: 2,\r\n name: 'Pending Approval',\r\n desc: 'Read Only',\r\n lname: 'is pending approval',\r\n intlIdentifier: 'pendingApproval',\r\n }),\r\n ARCHIVED: new StatementStatusModel({\r\n id: 3,\r\n name: 'Archived',\r\n desc: 'Read Only',\r\n lname: 'archived',\r\n intlIdentifier: 'archived',\r\n }),\r\n DELETED: new StatementStatusModel({\r\n id: 4,\r\n name: 'Deleted',\r\n desc: 'Read Only',\r\n lname: 'deleted',\r\n intlIdentifier: 'deleted',\r\n }),\r\n APPROVAL_INITIATED: new StatementStatusModel({\r\n id: 5,\r\n name: 'Approval Initiated',\r\n desc: 'Read Only',\r\n lname: 'deleted',\r\n intlIdentifier: 'approvalInitiated',\r\n }),\r\n};\r\n\r\nexport const VIEW_REVISIONS_MODAL_TOOLTIP = new TooltipOptions({\r\n text: 'statement-list.column.revision-tool-tip',\r\n id: 'statement-list-id-view-revisions-modal-button-tool-tip',\r\n position: 'top',\r\n});\r\n\r\nexport const VIEW_DELETED_REVISIONS_MODAL_TOOLTIP = new TooltipOptions({\r\n text: 'statement-list.column.deleted-revision-tool-tip',\r\n id: 'statement-list-id-view-revisions-modal-button-tool-tip',\r\n position: 'top',\r\n});\r\n\r\nexport const PIN_TOOLTIP = new TooltipOptions({\r\n text: 'common.pin',\r\n id: 'statement-list-pin-tool-tip',\r\n position: 'top',\r\n});\r\n\r\nexport const DELETE_STATEMENT_OPTIONS = {\r\n CURRENT: 1,\r\n ALL: 2,\r\n};\r\n\r\nexport const STATEMENT_LIST_TABS = {\r\n ACTIVE: new TabModel({\r\n id: 1,\r\n apiParam: 'active',\r\n intlTitle: 'statement-list.tabs.active',\r\n }),\r\n ARCHIVED: new TabModel({\r\n id: 2,\r\n apiParam: 'archived',\r\n intlTitle: 'statement-list.tabs.wrapped-up',\r\n }),\r\n DELETED: new TabModel({\r\n id: 3,\r\n apiParam: 'deleted',\r\n intlTitle: 'statement-list.tabs.deleted',\r\n }),\r\n};\r\n\r\nexport const STATEMENT_LIST_SORT_COLUMN_KEYS = {\r\n percentageCompleted: 'percentageCompleted',\r\n statementName: 'statementName',\r\n fiscalYear: 'fiscalYear',\r\n periodEnding: 'periodEnding',\r\n type: 'type',\r\n latestRevision: 'latestRevision',\r\n lastModifiedDate: 'lastModifiedDate',\r\n archiveDate: 'archiveDate',\r\n revisionDeletedDate: 'revisionDeletedDate',\r\n pinnedStatement: 'pinnedStatement',\r\n deletedBy: 'deletedBy',\r\n};\r\nconst copyStatementPendingApprovalTooltip = new TooltipOptions({\r\n text: 'permissions.copy-statement.pending-approval.disabled',\r\n id: 'copy-statement-disabled-tooltip-id',\r\n position: 'left',\r\n});\r\nconst copyStatementNoPermissionTooltip = new TooltipOptions({\r\n text: 'permissions.copy-statement.no-permission.disabled',\r\n id: 'copy-statement-disabled-tooltip-id',\r\n position: 'left',\r\n});\r\n\r\nconst copyStatementNoFailedWorkflow = new TooltipOptions({\r\n text: 'permissions.copy-statement.failed-workflow.disabled',\r\n id: 'copy-statement-disabled-tooltip-id',\r\n position: 'left',\r\n});\r\n\r\nconst copyStatementRevisionUpload = new TooltipOptions({\r\n text: 'permissions.copy-statement.revision-upload.disabled',\r\n id: 'copy-statement-disabled-tooltip-id',\r\n position: 'left',\r\n});\r\n\r\nconst EDITED_STATEMENT_ADMIN_DISPLAY = (tooltip, displayText, colId) => (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n);\r\n\r\nconst PERCENT_VERIFIED_COLUMN = new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.percentageCompleted,\r\n header: 'statement-list.column.percentage-complete',\r\n sortable: true,\r\n width: '10%',\r\n formatter: (statement) => {\r\n return (\r\n <>\r\n
{`${statement.percentageComplete}%`}
\r\n \r\n \r\n );\r\n },\r\n});\r\nconst STATEMENT_NAME_COLUMN = (linkStatus) =>\r\n new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.statementName,\r\n header: 'statement-list.column.statement-name',\r\n sortable: true,\r\n filterable: true,\r\n className: 'statement-name-filter',\r\n width: !isNullOrUndefined(linkStatus) ? '16%' : '23%',\r\n formatter: (statement, { rowKey }) => {\r\n const renderName = () => (\r\n \r\n );\r\n const colId = `statement-name-col-${rowKey}`;\r\n if (\r\n statement.getStatementStatus() ===\r\n STATEMENT_STATUS_LABELS.PENDING_APPROVAL\r\n ) {\r\n return (\r\n
\r\n {statement.legalHold ? (\r\n
\r\n
\r\n \r\n
\r\n {renderName()}\r\n
\r\n ) : (\r\n renderName()\r\n )}\r\n
\r\n \r\n
\r\n
\r\n );\r\n } else if (\r\n statement.getStatementStatus() ===\r\n STATEMENT_STATUS_LABELS.APPROVAL_INITIATED\r\n ) {\r\n return (\r\n
\r\n {statement.legalHold ? (\r\n
\r\n
\r\n \r\n
\r\n {renderName()}\r\n
\r\n ) : (\r\n renderName()\r\n )}\r\n
\r\n \r\n
\r\n
\r\n );\r\n } else if (statement.legalHold) {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n {renderName()}\r\n
\r\n );\r\n }\r\n return renderName();\r\n },\r\n });\r\n\r\nconst FISCAL_YEAR_COLUMN = new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.fiscalYear,\r\n sortable: true,\r\n header: 'statement-list.column.fiscal-year',\r\n width: '9%',\r\n formatter: (statement, { rowKey }) => {\r\n const colId = `statement-fiscal-col-${rowKey}`;\r\n const _userCanSeeDisplayValueOfModifiedStatement =\r\n Permissions.Statement.canSeeDisplayValueOfModifiedStatement();\r\n let displayText = `${statement.fiscalYear}`;\r\n let originalFiscalYearTooltip = new TooltipOptions({\r\n text: `${statement.originalFiscalYear}`,\r\n id: `statement-list-fiscal-year-tooltip-${rowKey}`,\r\n position: 'left',\r\n });\r\n if (\r\n _userCanSeeDisplayValueOfModifiedStatement &&\r\n statement.fiscalYear !== statement.originalFiscalYear\r\n ) {\r\n return EDITED_STATEMENT_ADMIN_DISPLAY(\r\n originalFiscalYearTooltip,\r\n displayText,\r\n colId,\r\n );\r\n }\r\n return displayText;\r\n },\r\n});\r\n\r\nconst PERIOD_ENDING_COLUMN = new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.periodEnding,\r\n sortable: true,\r\n header: 'statement-list.column.period-ending',\r\n width: '12%',\r\n formatter: (statement, { rowKey }) => {\r\n const colId = `statement-period-col-${rowKey}`;\r\n const _userCanSeeDisplayValueOfModifiedStatement =\r\n Permissions.Statement.canSeeDisplayValueOfModifiedStatement();\r\n let displayText = `${moment\r\n .utc(statement.periodEnding)\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR)}`;\r\n const tooltipText = `${moment\r\n .utc(statement.originalPeriodEnding)\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR)}`;\r\n let originalPeriodEndingTooltip = new TooltipOptions({\r\n text: tooltipText,\r\n id: `statement-list-period-ending-tooltip-${rowKey}`,\r\n position: 'left',\r\n });\r\n\r\n if (\r\n _userCanSeeDisplayValueOfModifiedStatement &&\r\n statement.periodEnding !== statement.originalPeriodEnding\r\n ) {\r\n return EDITED_STATEMENT_ADMIN_DISPLAY(\r\n originalPeriodEndingTooltip,\r\n displayText,\r\n colId,\r\n );\r\n }\r\n\r\n return displayText;\r\n },\r\n});\r\n\r\nconst STATEMENT_TYPE_COLUMN = new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.type,\r\n sortable: true,\r\n header: 'statement-list.column.type',\r\n width: '8%',\r\n formatter: (statement, { rowKey }) => {\r\n const colId = `statement-type-col-${rowKey}`;\r\n const _userCanSeeDisplayValueOfModifiedStatement =\r\n Permissions.Statement.canSeeDisplayValueOfModifiedStatement();\r\n let displayText = statement.type;\r\n let statementTypeTooltipText = statement.originalType;\r\n if (statement.originalType === STATEMENT_TYPE_MAP.TEN_Q) {\r\n statementTypeTooltipText = `${statement.originalType}${statement.originalQuarterNumber}`;\r\n } else if (\r\n statement.originalType === STATEMENT_TYPE_MAP.PRIVATE_QUARTERLY\r\n ) {\r\n statementTypeTooltipText = `${statement.originalType} Q${statement.originalQuarterNumber}`;\r\n }\r\n\r\n const originalStatementTypeTooltip = new TooltipOptions({\r\n text: statementTypeTooltipText,\r\n id: `statement-list-statement-type-tooltip-${rowKey}`,\r\n position: 'left',\r\n });\r\n\r\n if (\r\n _userCanSeeDisplayValueOfModifiedStatement &&\r\n (statement.type !== statement.originalType ||\r\n statement.quarter !== statement.originalQuarter)\r\n ) {\r\n if (statement.type === STATEMENT_TYPE_MAP.TEN_Q) {\r\n displayText = `${statement.type}${statement.quarterNumber}`; // e.g. 10-Q1\r\n return EDITED_STATEMENT_ADMIN_DISPLAY(\r\n originalStatementTypeTooltip,\r\n displayText,\r\n colId,\r\n );\r\n } else if (statement.type === STATEMENT_TYPE_MAP.PRIVATE_QUARTERLY) {\r\n displayText = `${statement.type} Q${statement.quarterNumber}`; // e.g. Private Quarterly Q1\r\n return EDITED_STATEMENT_ADMIN_DISPLAY(\r\n originalStatementTypeTooltip,\r\n displayText,\r\n colId,\r\n );\r\n }\r\n\r\n return EDITED_STATEMENT_ADMIN_DISPLAY(\r\n originalStatementTypeTooltip,\r\n displayText,\r\n colId,\r\n );\r\n }\r\n\r\n return (\r\n \r\n );\r\n },\r\n});\r\n\r\nconst REVISION_COLUMN = ({\r\n onRevisonClick,\r\n viewRevisionToolTip,\r\n displayIcon = true,\r\n}) =>\r\n new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.latestRevision,\r\n sortable: true,\r\n header: 'statement-list.column.revision',\r\n width: '9%',\r\n formatter: (statement) => (\r\n
\r\n {statement.revisionNumber}\r\n {displayIcon && (\r\n \r\n {\r\n e.stopPropagation();\r\n onRevisonClick(statement);\r\n }}\r\n />\r\n \r\n )}\r\n
\r\n ),\r\n });\r\n\r\nconst PIN_COLUMN = new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.pinnedStatement,\r\n header: '',\r\n width: '4%',\r\n formatter: (statement) => {\r\n if (!isNullOrUndefined(statement.pinnedDatetime)) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n },\r\n});\r\n\r\nconst TARGET_ARCHIVE_DATE_COLUMN = new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.archiveDate,\r\n sortable: true,\r\n header: 'statement-list.column.wrap-up-date-notifier',\r\n width: '14%',\r\n formatter: (statement) => {\r\n const currentDate = moment().utc().startOf('day');\r\n const archiveDate = moment.utc(statement.archiveDate);\r\n const diff = currentDate.diff(archiveDate, 'days');\r\n const renderRemainingDays = () => {\r\n if (diff > 0) {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n {renderRemainingDays()}\r\n \r\n {diff > 0 && (\r\n \r\n \r\n \r\n )}\r\n
\r\n );\r\n },\r\n});\r\n\r\nconst OMNIA_EXPORT_COLUMN = new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.omExportStatus,\r\n header: 'statement-list.column.omnia-export',\r\n sortable: true,\r\n width: '7%',\r\n formatter: (statement, { rowKey }) => {\r\n if (statement.omExportStatus) {\r\n if (statement.omExportStatus === 1 || statement.omExportStatus === 2) {\r\n const documentState =\r\n statement.omExportStatus === 2 ? 'in progress' : 'initiated';\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n } else if (\r\n statement.omExportStatus === 3 ||\r\n statement.omExportStatus === 4\r\n ) {\r\n return (\r\n
\r\n \r\n \r\n \r\n
\r\n );\r\n } else if (statement.omExportStatus === 5) {\r\n const documentState =\r\n statement.omDocumentState === 1 ? 'Draft' : 'Final';\r\n const sentDate = isNullOrUndefined(statement.sentDate)\r\n ? null\r\n : `${moment(statement.sentDate)\r\n .local()\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR_TIME)}`;\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n }\r\n }\r\n return null;\r\n },\r\n});\r\n\r\nexport const getStatementListColumns = ({\r\n softDeleteAllRevisionsAction,\r\n softDeleteLatestRevisionAction,\r\n onRevisonClick,\r\n project,\r\n addRevisionAction,\r\n navigateToEditStatement,\r\n workflowsMap,\r\n currentUser,\r\n onSubmitWrapUpClick,\r\n onApproveWrapUpClick,\r\n copyStatement,\r\n containerRef,\r\n onPinClick,\r\n pinnedStatements,\r\n statementWorkflowSteps,\r\n}) => {\r\n let options = [\r\n PERCENT_VERIFIED_COLUMN,\r\n STATEMENT_NAME_COLUMN(project.data.linkStatus),\r\n FISCAL_YEAR_COLUMN,\r\n PERIOD_ENDING_COLUMN,\r\n STATEMENT_TYPE_COLUMN,\r\n REVISION_COLUMN({\r\n onRevisonClick,\r\n viewRevisionToolTip: VIEW_REVISIONS_MODAL_TOOLTIP,\r\n }),\r\n new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.lastModifiedDate,\r\n sortable: true,\r\n header: 'statement-list.column.last-modified',\r\n width: '12%',\r\n formatter: (statement) => (\r\n <>\r\n {moment(statement.lastModifiedDate).format(\r\n DATE_FORMATS.MONTH_DAY_YEAR,\r\n )}\r\n
\r\n {convertUTCTimeStampToLocalTime(\r\n statement.lastModifiedDate,\r\n DATE_FORMATS.HOURS_MINUTES,\r\n )}\r\n \r\n ),\r\n }),\r\n TARGET_ARCHIVE_DATE_COLUMN,\r\n PIN_COLUMN,\r\n ];\r\n if (!isNullOrUndefined(project.data.linkStatus)) {\r\n options.push(OMNIA_EXPORT_COLUMN);\r\n }\r\n options.push(\r\n new DataGridKebabColumn({\r\n options: getStatementListKebabOptions({\r\n softDeleteAllRevisionsAction: softDeleteAllRevisionsAction,\r\n softDeleteLatestRevisionAction: softDeleteLatestRevisionAction,\r\n project: project,\r\n addRevisionAction: addRevisionAction,\r\n navigateToEditStatement: navigateToEditStatement,\r\n workflowsMap,\r\n currentUser,\r\n onSubmitWrapUpClick,\r\n onApproveWrapUpClick,\r\n copyStatement,\r\n onPinClick,\r\n pinnedStatements,\r\n statementWorkflowSteps,\r\n }),\r\n dropdownId: 'statement-kebab-id',\r\n className: 'statement-list__kebab-menu',\r\n usePortalMenu: false,\r\n containerRef: containerRef,\r\n }),\r\n );\r\n\r\n return options;\r\n};\r\n\r\nexport const getArchivedStatementListColumns = ({\r\n project,\r\n copyStatement,\r\n workflowsMap,\r\n containerRef,\r\n statementWorkflowSteps,\r\n}) => {\r\n const _userCanEdit = Permissions.Statement.canEdit();\r\n const _statementHasProcessingRevisions = (statement) =>\r\n workflowsMap &&\r\n workflowsMap.statementHasProcessingRevision({\r\n statementId: statement.id,\r\n });\r\n\r\n const _statementIsPendingApproval = (statement) =>\r\n statement.getStatementStatus() === STATEMENT_STATUS_LABELS.PENDING_APPROVAL;\r\n\r\n const _statementHasFailedWorkflow = (statement) => {\r\n const workflowsList = workflowsMap.getWorkflowsByStatementId(statement.id);\r\n return workflowsList.some(\r\n (w) =>\r\n w.status ===\r\n statementWorkflowSteps.isFailedWorkflowStep(w.documentProcessTypeEnum)\r\n .status,\r\n );\r\n };\r\n\r\n const _userCanCopyStatement =\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(project.id) ||\r\n RolesUtil.doesUserHavePPMDRoleForProject(project.id) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(project.id) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(project.id);\r\n\r\n const _statementIsImported = (statement) => statement.isImported;\r\n\r\n let options = [\r\n PERCENT_VERIFIED_COLUMN,\r\n STATEMENT_NAME_COLUMN(project.data.linkStatus),\r\n FISCAL_YEAR_COLUMN,\r\n PERIOD_ENDING_COLUMN,\r\n STATEMENT_TYPE_COLUMN,\r\n REVISION_COLUMN({ displayIcon: false }),\r\n new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.lastModifiedDate,\r\n sortable: true,\r\n header: 'statement-list.column.wrap-up-date',\r\n width: '12%',\r\n formatter: (statement) => (\r\n <>\r\n {moment(statement.lastModifiedDate).format(\r\n DATE_FORMATS.MONTH_DAY_YEAR,\r\n )}\r\n
\r\n {convertUTCTimeStampToLocalTime(\r\n statement.lastModifiedDate,\r\n DATE_FORMATS.HOURS_MINUTES,\r\n )}\r\n \r\n ),\r\n }),\r\n ];\r\n\r\n if (!isNullOrUndefined(project.data.linkStatus)) {\r\n options.push(OMNIA_EXPORT_COLUMN);\r\n }\r\n options.push(\r\n new DataGridKebabColumn({\r\n options: [\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.copy-statement',\r\n disabled: (statement) => {\r\n return (\r\n !_userCanEdit ||\r\n !_userCanCopyStatement ||\r\n _statementIsPendingApproval(statement) ||\r\n _statementHasFailedWorkflow(statement) ||\r\n _statementHasProcessingRevisions(statement)\r\n );\r\n },\r\n shouldShowOption: (statement) => !_statementIsImported(statement),\r\n onSelectOption: (statement) => copyStatement(statement),\r\n tooltip: (statement) => {\r\n if (!_userCanCopyStatement) {\r\n return copyStatementNoPermissionTooltip;\r\n }\r\n if (_statementIsPendingApproval(statement)) {\r\n return copyStatementPendingApprovalTooltip;\r\n }\r\n if (_statementHasFailedWorkflow(statement)) {\r\n return copyStatementNoFailedWorkflow;\r\n }\r\n if (_statementHasProcessingRevisions(statement)) {\r\n return copyStatementRevisionUpload;\r\n }\r\n return null;\r\n },\r\n }),\r\n ],\r\n dropdownId: 'statement-kebab-id',\r\n className: 'statement-list__kebab-menu',\r\n usePortalMenu: false,\r\n containerRef: containerRef,\r\n }),\r\n );\r\n\r\n return options;\r\n};\r\n\r\nexport const getDeletedStatementListColumns = ({\r\n project,\r\n deleteAction,\r\n restoreAction,\r\n onRevisonClick,\r\n containerRef,\r\n}) => {\r\n const _canRestoreSoftDeleted = Permissions.Statement.canRestoreSoftDeleted();\r\n const _canPermanentlyDelete = Permissions.Statement.canPermanentlyDelete();\r\n let permanentlyDeleteTooltip, restoreSoftDeletedTooltip;\r\n if (!_canRestoreSoftDeleted) {\r\n restoreSoftDeletedTooltip = new TooltipOptions({\r\n text: 'permissions.delete.statement',\r\n id: 'delete-statement-tooltip-id',\r\n position: 'left',\r\n });\r\n }\r\n\r\n permanentlyDeleteTooltip = new TooltipOptions({\r\n text: 'permissions.delete.statement',\r\n id: 'delete-statement-tooltip-id',\r\n position: 'left',\r\n });\r\n\r\n let options = [\r\n PERCENT_VERIFIED_COLUMN,\r\n STATEMENT_NAME_COLUMN(project.data.linkStatus),\r\n FISCAL_YEAR_COLUMN,\r\n PERIOD_ENDING_COLUMN,\r\n STATEMENT_TYPE_COLUMN,\r\n REVISION_COLUMN({\r\n onRevisonClick,\r\n viewRevisionToolTip: VIEW_DELETED_REVISIONS_MODAL_TOOLTIP,\r\n }),\r\n new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.revisionDeletedDate,\r\n sortable: true,\r\n header: 'statement-list.column.deleted-date',\r\n width: '12%',\r\n formatter: (statement) => (\r\n <>\r\n {moment(statement.revisionLastModifiedDate)\r\n .local()\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR)}\r\n
\r\n {convertUTCTimeStampToLocalTime(\r\n statement.revisionLastModifiedDate,\r\n DATE_FORMATS.HOURS_MINUTES,\r\n )}\r\n \r\n ),\r\n }),\r\n new DataGridColumn({\r\n key: STATEMENT_LIST_SORT_COLUMN_KEYS.deletedBy,\r\n header: 'statement-list.column.deleted-by',\r\n width: '15%',\r\n formatter: (statement, { rowKey }) => {\r\n const colId = `statement-deleted-by-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n ];\r\n if (!isNullOrUndefined(project.data.linkStatus)) {\r\n options.push(OMNIA_EXPORT_COLUMN);\r\n }\r\n options.push(\r\n new DataGridKebabColumn({\r\n options: [\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.restore',\r\n disabled: !_canRestoreSoftDeleted,\r\n tooltip: restoreSoftDeletedTooltip,\r\n shouldShowOption: (statement) => !statement.isInArchivalFlow(),\r\n onSelectOption: (statement) =>\r\n restoreAction(statement.revisionId, statement.id),\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.delete-permanently',\r\n disabled: (statement) =>\r\n statement.isLegalHoldSet() || !_canPermanentlyDelete,\r\n tooltip: (statement) =>\r\n statement.isLegalHoldSet() || !_canPermanentlyDelete\r\n ? permanentlyDeleteTooltip\r\n : null,\r\n onSelectOption: deleteAction,\r\n }),\r\n ],\r\n dropdownId: 'statement-kebab-id',\r\n className: 'statement-list__kebab-menu',\r\n usePortalMenu: false,\r\n containerRef: containerRef,\r\n }),\r\n );\r\n return options;\r\n};\r\n\r\nconst getStatementListKebabOptions = ({\r\n softDeleteAllRevisionsAction,\r\n softDeleteLatestRevisionAction,\r\n project,\r\n addRevisionAction,\r\n navigateToEditStatement,\r\n workflowsMap,\r\n currentUser,\r\n onApproveWrapUpClick,\r\n onSubmitWrapUpClick,\r\n copyStatement,\r\n onPinClick,\r\n statementWorkflowSteps,\r\n}) => {\r\n // TODO: Change project-level legal hold on statements to statement-level legal hold once we support that on the back-end\r\n\r\n let options;\r\n const _canUploadRevision =\r\n currentUser && Permissions.Statement.canUploadRevision();\r\n const _userCanEdit = Permissions.Statement.canEdit();\r\n const _userCanSoftDelete = Permissions.Statement.canSoftDelete();\r\n const _userCanApproveWrapUp = Permissions.Statement.canApproveWrapUp();\r\n const _userCanSubmitForWrapUpApproval =\r\n Permissions.Statement.canSubmmitForWrapUpApproval();\r\n\r\n const _userCanCopyStatement =\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(project.id) ||\r\n RolesUtil.doesUserHavePPMDRoleForProject(project.id) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(project.id) ||\r\n RolesUtil.doesUserHaveAdminSupportAccess(project.id);\r\n\r\n let editTooltip, softDeleteTooltip;\r\n const disableduploadRevisionTooltip = new TooltipOptions({\r\n text: 'statement-list.kebab.upload-revision.disabled-tool-tip',\r\n id: 'upload-revision-disabled-tooltip-id',\r\n position: 'left',\r\n });\r\n\r\n const revisionIsUploadingTooltip = new TooltipOptions({\r\n text: 'statement-list.kebab.add-revision.disabled-tool-tip',\r\n id: 'add-revision-disabled-tooltip-id',\r\n position: 'left',\r\n });\r\n const revisionIsUploadingSubmitForWrapUpTooltip = new TooltipOptions({\r\n text: 'statement-list.kebab.submit-for-wrap-up-approval.disabled-tool-tip',\r\n id: 'submit-for-wrap-up-approval-disabled-tooltip-id',\r\n position: 'left',\r\n });\r\n if (!_userCanEdit) {\r\n editTooltip = new TooltipOptions({\r\n text: 'permissions.edit.statement',\r\n id: 'edit-statement-tooltip-id',\r\n position: 'left',\r\n });\r\n }\r\n //If a statement is on legal hold, we cannot delete it.\r\n if (!_userCanSoftDelete || ((statement) => statement.isLegalHoldSet())) {\r\n //If a project is not on legal hold, default to showing a tool tip if the user does not have access to the statement as a fallback.\r\n softDeleteTooltip = new TooltipOptions({\r\n text: 'permissions.delete.statement.on-legal-hold',\r\n id: 'delete-statement-tooltip-id',\r\n position: 'left',\r\n });\r\n }\r\n\r\n const wrapUpApproveTooltip = new TooltipOptions({\r\n text: 'permissions.wrap-up-approve.statement.disabled',\r\n id: 'approve-statement-wrap-up-tooltip-id',\r\n });\r\n const wrapUpApproveOnLegalHoldTooltip = new TooltipOptions({\r\n text: 'permissions.wrap-up-approve.statement.on-legal-hold',\r\n id: 'approve-statement-wrap-up-on-legal-hold-tooltip-id',\r\n position: 'left',\r\n });\r\n const wrapUpTooltip = new TooltipOptions({\r\n text: 'permissions.wrap-up.statement.disabled',\r\n id: 'wrap-up-statement-disabled-tooltip-id',\r\n position: 'left',\r\n });\r\n\r\n const archivalInitiatedDisableEditTooltip = new TooltipOptions({\r\n text: 'statement-list.kebab.archival-flow.disable-edit',\r\n id: 'disable-statement-edit-from-wrap-up-tooltip-id',\r\n });\r\n\r\n const _statementHasProcessingRevisions = (statement) =>\r\n workflowsMap &&\r\n workflowsMap.statementHasProcessingRevision({\r\n statementId: statement.id,\r\n });\r\n\r\n const _statementHasFailedWorkflow = (statement) => {\r\n const workflowsList = workflowsMap.getWorkflowsByStatementId(statement.id);\r\n return workflowsList.some(\r\n (w) =>\r\n w.status ===\r\n statementWorkflowSteps.isFailedWorkflowStep(w.documentProcessTypeEnum)\r\n .status,\r\n );\r\n };\r\n\r\n options = [\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.add-revision',\r\n disabled: (statement) =>\r\n statement.isInArchivalFlow() ||\r\n _statementHasProcessingRevisions(statement) ||\r\n !_canUploadRevision,\r\n tooltip: (statement) => {\r\n if (statement.isInArchivalFlow()) {\r\n return archivalInitiatedDisableEditTooltip;\r\n } else if (_statementHasProcessingRevisions(statement)) {\r\n return revisionIsUploadingTooltip;\r\n } else if (!_canUploadRevision) {\r\n return disableduploadRevisionTooltip;\r\n }\r\n },\r\n onSelectOption: (statement) => addRevisionAction(statement),\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.edit',\r\n disabled: (statement) => statement.isInArchivalFlow() || !_userCanEdit,\r\n tooltip: (statement) => {\r\n if (statement.isInArchivalFlow()) {\r\n return archivalInitiatedDisableEditTooltip;\r\n }\r\n return editTooltip;\r\n },\r\n onSelectOption: navigateToEditStatement,\r\n }),\r\n\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.soft-delete-latest-revision',\r\n disabled: (statement) =>\r\n statement.isLegalHoldSet() || !_userCanSoftDelete,\r\n tooltip: (statement) => statement.isLegalHoldSet() && softDeleteTooltip,\r\n shouldShowOption: (statement) =>\r\n statement.shouldShowRevertToPreviousRevisionOption() &&\r\n !statement.isInArchivalFlow(),\r\n onSelectOption: (statement) => softDeleteLatestRevisionAction(statement),\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.soft-delete-statement',\r\n /** TODO: Once statement-level legal hold becomes possible, supply a function here of the flavor:\r\n *\r\n * disabled: statement => (!userCanDelete || statement.isOnLegalHold)\r\n *\r\n * as at that point, we won't be considering legal hold on a project level, so we can remove the\r\n * _projectOnLegalHold check here.\r\n *\r\n */\r\n disabled: (statement) =>\r\n statement.isLegalHoldSet() || !_userCanSoftDelete,\r\n tooltip: (statement) => statement.isLegalHoldSet() && softDeleteTooltip,\r\n shouldShowOption: (statement) => !statement.isInArchivalFlow(),\r\n onSelectOption: (statement) => softDeleteAllRevisionsAction(statement),\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.submit-wrap-up',\r\n disabled: (statement) =>\r\n statement.isLegalHoldSet() ||\r\n !_userCanSubmitForWrapUpApproval ||\r\n _statementHasProcessingRevisions(statement),\r\n tooltip: (statement) => {\r\n if (statement.isLegalHoldSet() || !_userCanSubmitForWrapUpApproval) {\r\n return wrapUpTooltip;\r\n } else if (_statementHasProcessingRevisions(statement)) {\r\n return revisionIsUploadingSubmitForWrapUpTooltip;\r\n }\r\n return null;\r\n },\r\n shouldShowOption: (statement) => !statement.isInArchivalFlow(),\r\n onSelectOption: onSubmitWrapUpClick,\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.approve-wrap-up',\r\n disabled: (statement) =>\r\n statement.wrapUpSubmissionUserId === currentUser.id ||\r\n statement.isLegalHoldSet() ||\r\n !_userCanApproveWrapUp,\r\n tooltip: (statement) =>\r\n statement.isLegalHoldSet()\r\n ? wrapUpApproveOnLegalHoldTooltip\r\n : statement.wrapUpSubmissionUserId === currentUser.id ||\r\n !_userCanApproveWrapUp\r\n ? wrapUpApproveTooltip\r\n : null,\r\n shouldShowOption: (statement) => statement.isPendingApproval(),\r\n onSelectOption: onApproveWrapUpClick,\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.copy-statement',\r\n disabled: (statement) => {\r\n return (\r\n !_userCanEdit ||\r\n !_userCanCopyStatement ||\r\n _statementHasFailedWorkflow(statement) ||\r\n _statementHasProcessingRevisions(statement)\r\n );\r\n },\r\n shouldShowOption: true, // (statement) => !_statementIsImported(statement),\r\n onSelectOption: (statement) => copyStatement(statement),\r\n tooltip: (statement) => {\r\n if (!_userCanCopyStatement) {\r\n return copyStatementNoPermissionTooltip;\r\n }\r\n if (_statementHasFailedWorkflow(statement)) {\r\n return copyStatementNoFailedWorkflow;\r\n }\r\n if (_statementHasProcessingRevisions(statement)) {\r\n return copyStatementRevisionUpload;\r\n }\r\n return null;\r\n },\r\n }),\r\n new KebabMenuOption({\r\n id: 'statement-kebab-option-pin-or-unpin',\r\n title: (statement) => {\r\n if (isNullOrUndefined(statement.pinnedDatetime)) {\r\n return 'common.pin';\r\n } else {\r\n return 'common.unpin';\r\n }\r\n },\r\n onSelectOption: (statement) => onPinClick(statement),\r\n }),\r\n ];\r\n return options;\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n refetchSectionsInView,\r\n refetchBlacklineView,\r\n} from './statement-content-actions';\r\nimport { clearLeftStatementPageStoreAction } from 'store/actions/statement-content-actions';\r\nimport { getBlacklineDetails } from 'api/statement-content-api';\r\nimport { showComparePanelAction } from './panel-controller-actions';\r\nimport { clearSourceStatementParams } from 'store/actions/source-statement-actions';\r\n\r\nexport const toggleBlacklineViewMode = createAction('SET_BLACKLINE_VIEW_MOD');\r\nexport const toggleBlacklineViewShowElementMode = createAction(\r\n 'SET_BLACKLINE_VIEW_SHOW_ELEMENT_MODE',\r\n);\r\nexport const toggleBlacklineViewSyncScrollingMode = createAction(\r\n 'SET_BLACKLINE_VIEW_SYNC_SCROLLING_MODE',\r\n);\r\n\r\nexport const resetBlacklineViewShowElementMode = createAction(\r\n 'RESET_BLACKLINE_VIEW_SHOW_ELEMENT_MODE',\r\n);\r\nexport const clearBlacklineViewSyncScrollingMode = createAction(\r\n 'CLEAR_BLACKLINE_VIEW_SYNC_SCROLLING_MODE',\r\n);\r\n\r\nexport const currentBlacklineViewChangesLoading = createAction(\r\n 'CURRENT_BLACKLINE_VIEW_CHANGES_LOADING',\r\n);\r\nexport const currentBlacklineViewChangesLoaded = createAction(\r\n 'CURRENT_BLACKLINE_VIEW_CHANGES_LOADED',\r\n);\r\nexport const currentBlacklineViewChangesError = createAction(\r\n 'CURRENT_BLACKLINE_VIEW_CHANGES_ERROR',\r\n);\r\nexport const clearCurrentBlacklineContentWithIdsFromCache = createAction(\r\n 'CLEAR_CURRENT_BLACKLINE_VIEW_CHANGES',\r\n);\r\nexport const resetCurrentBlacklineCache = createAction(\r\n 'RESET_CURRENT_BLACKLINE_VIEW_CHANGES',\r\n);\r\n\r\nexport const previousBlacklineViewChangesLoading = createAction(\r\n 'PREVIOUS_BLACKLINE_VIEW_CHANGES_LOADING',\r\n);\r\nexport const previousBlacklineViewChangesLoaded = createAction(\r\n 'PREVIOUS_BLACKLINE_VIEW_CHANGES_LOADED',\r\n);\r\nexport const previousBlacklineViewChangesError = createAction(\r\n 'PREVIOUS_BLACKLINE_VIEW_CHANGES_ERROR',\r\n);\r\nexport const clearPreviousBlacklineContentWithIdsFromCache = createAction(\r\n 'CLEAR_PREVIOUS_BLACKLINE_VIEW_CHANGES',\r\n);\r\nexport const resetPreviousBlacklineCache = createAction(\r\n 'RESET_PREVIOUS_BLACKLINE_VIEW_CHANGES',\r\n);\r\n\r\nexport const blacklineSourceGuidListLoading = createAction(\r\n 'BLACKLINE_SOURCE_GUID_LIST_LOADING',\r\n);\r\nexport const blacklineSourceGuidListLoaded = createAction(\r\n 'BLACKLINE_SOURCE_GUID_LIST_LOADED',\r\n);\r\nexport const blacklineSourceGuidListError = createAction(\r\n 'BLACKLINE_SOURCE_GUID_LIST_ERROR',\r\n);\r\nexport const blacklineTargetGuidListLoading = createAction(\r\n 'BLACKLINE_TARGET_GUID_LIST_LOADING',\r\n);\r\nexport const blacklineTargetGuidListLoaded = createAction(\r\n 'BLACKLINE_TARGET_GUID_LIST_LOADED',\r\n);\r\nexport const blacklineTargetGuidListError = createAction(\r\n 'BLACKLINE_TARGET_GUID_LIST_ERROR',\r\n);\r\nexport const resetBlacklineGuidList = createAction('RESET_BLACKLINE_GUID_LIST');\r\n\r\nexport const clearBlacklineSelectedElementId = createAction(\r\n 'CLEAR_BLACKLINE_SELECTED_ELEMENT_ID',\r\n);\r\nexport const setBlacklineSelectedElementId = createAction(\r\n 'SET_BLACKLINE_SELECTED_ELEMENT_ID',\r\n);\r\n\r\nexport const toggleBlacklineViewModeAndRefetchSectionsInView =\r\n () => async (dispatch, getState) => {\r\n await dispatch(toggleBlacklineViewMode());\r\n const {\r\n data: { selectedStatement },\r\n ui: {\r\n statementPage: { modes },\r\n },\r\n } = getState();\r\n if (modes.blacklineViewMode) {\r\n dispatch(showComparePanelAction());\r\n !selectedStatement.isOCR && dispatch(refetchBlacklineView());\r\n }\r\n\r\n if (!selectedStatement.isOCR) {\r\n dispatch(refetchSectionsInView());\r\n }\r\n };\r\n\r\nexport const getBlacklineGuidDetailsAction =\r\n ({ statementId, revisionId, blackline_view_type }) =>\r\n async (dispatch) => {\r\n const guidListLoading =\r\n blackline_view_type === 'BLACKLINE_SOURCE'\r\n ? blacklineSourceGuidListLoading\r\n : blacklineTargetGuidListLoading;\r\n const guidListLoaded =\r\n blackline_view_type === 'BLACKLINE_SOURCE'\r\n ? blacklineSourceGuidListLoaded\r\n : blacklineTargetGuidListLoaded;\r\n const guidListError =\r\n blackline_view_type === 'BLACKLINE_SOURCE'\r\n ? blacklineSourceGuidListError\r\n : blacklineTargetGuidListError;\r\n\r\n try {\r\n dispatch(guidListLoading());\r\n const response = await getBlacklineDetails({\r\n statementId,\r\n revisionId,\r\n blackline_view_type,\r\n });\r\n\r\n dispatch(guidListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(guidListError());\r\n }\r\n };\r\n\r\nexport const clearBlacklineDetails = () => (dispatch) => {\r\n dispatch(resetPreviousBlacklineCache());\r\n dispatch(resetCurrentBlacklineCache());\r\n dispatch(clearSourceStatementParams());\r\n dispatch(resetBlacklineGuidList());\r\n dispatch(clearBlacklineSelectedElementId());\r\n dispatch(clearLeftStatementPageStoreAction());\r\n dispatch(clearBlacklineViewSyncScrollingMode());\r\n dispatch(resetBlacklineViewShowElementMode());\r\n};\r\n","export const FEATURE_NAMES = {\r\n COMFORT_LETTER_FEATURE: 'comfort-letter',\r\n COMFORT_ASSIGNED_FEATURE: 'comfort-assigned',\r\n SIDE_BY_SIDE_STATEMENT_ELEMENTS_MAP: 'side-by-side-statement-elements-map',\r\n CARRY_FORWARD_META_DATA_DISABLED: 'carry-forward-meta-data-disabled',\r\n TECH_SUPPORT_STATEMENT_ACCESS_ENABLED:\r\n 'tech-support-statement-access-enabled',\r\n // feature for which we do not wish to enable feature flag option\r\n OTHER_FEATURES: 'some-other-feature',\r\n STATEMENT_PDF_UPLOAD_ENABLED: 'statement-pdf-upload-enabled',\r\n CHATBOT_ENABLED: 'chatbot-enabled',\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { requestStatementListForNewProject } from 'store/actions/statement-list/statement-list-actions';\r\nimport { getSelectedProjectRequest } from 'api/selected-project-api';\r\nimport { CURRENT_SELECTED_PROJECT_ID_SESSION_KEY } from 'api/api-client';\r\nimport { undeterminedGeoKey } from 'api/api-client';\r\nimport { setMergeSelectedProjectWithProjectList } from 'store/actions/project-list-actions';\r\n\r\nexport const setSelectedProjectId = createAction('SET_SELECTED_PROJECT');\r\n\r\nexport const selectedProjectLoading = createAction('SELECTED_PROJECT_LOADING');\r\nexport const selectedProjectLoaded = createAction('SELECTED_PROJECT_LOADED');\r\nexport const selectedProjectError = createAction('SELECTED_PROJECT_ERROR');\r\n\r\nexport const setSelectedProjectError = createAction(\r\n 'SET_SELECTED_PROJECT_ERROR',\r\n);\r\nexport const clearSelectedProject = createAction('CLEAR_SELECTED_PROJECT');\r\nexport const setUpdatedLegalHoldForSelectedProject = createAction(\r\n 'UPDATE_LEGAL_HOLD_FOR_SELECTED_PROJECT',\r\n);\r\n\r\n/* This function has been created so that when user successfully creates a statement with legal hold option\r\nwe update the ProjectDetailsContainer along with ProjectListContainer So that we have the latest details\r\nabout the project selected. */\r\nexport const updatedSelectedProjectFromIDWithoutLoading =\r\n ({ projectId, contextKey }) =>\r\n async (dispatch, getState) => {\r\n const response = await getSelectedProjectRequest(projectId, contextKey);\r\n await dispatch(selectedProjectLoaded({ response }));\r\n const { id, legalHold } = response.data;\r\n dispatch(\r\n setMergeSelectedProjectWithProjectList({\r\n selectedProjectId: id,\r\n projectDetails: { legalHold },\r\n }),\r\n );\r\n };\r\n\r\nexport const updateSelectedProject =\r\n ({ projectId, clientLegalHold }) =>\r\n async (dispatch, getState) => {\r\n const { socketHasBeenDisconnected } = getState().sockets.projectSocket;\r\n try {\r\n // Check if the socket connection is active.\r\n if (!socketHasBeenDisconnected) {\r\n dispatch(\r\n setUpdatedLegalHoldForSelectedProject({\r\n projectDetails: { legalHold: clientLegalHold },\r\n }),\r\n );\r\n dispatch(\r\n setMergeSelectedProjectWithProjectList({\r\n selectedProjectId: projectId,\r\n projectDetails: { legalHold: clientLegalHold },\r\n }),\r\n );\r\n } else {\r\n dispatch(updatedSelectedProjectFromIDWithoutLoading({ projectId }));\r\n }\r\n } catch (error) {\r\n dispatch(selectedProjectError(error));\r\n }\r\n };\r\n\r\nexport const updateSelectedProjectFromID =\r\n ({ projectId, contextKey }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n dispatch(setSelectedProjectId({ projectId }));\r\n dispatch(selectedProjectLoading());\r\n const response = await getSelectedProjectRequest(projectId, contextKey);\r\n await dispatch(selectedProjectLoaded({ response }));\r\n const selectedProject = getState().data.selectedProject.project;\r\n const location = getState().router.location;\r\n // If on the homepage and the currently selected project is initialized, we get its statements and the associated document processing workflows.\r\n if (location.pathname === '/' && selectedProject.isInitialized()) {\r\n dispatch(initNewProjectDetailsActions());\r\n }\r\n } catch (error) {\r\n dispatch(selectedProjectError(error));\r\n }\r\n };\r\n\r\nexport const updateSelectedProjectFromIDIfDoesNotExists =\r\n ({ projectId, contextKey }) =>\r\n async (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const isSelectedProjectInitialized =\r\n storeData &&\r\n storeData.selectedProject &&\r\n storeData.selectedProject.project &&\r\n storeData.selectedProject.project.isInitialized();\r\n\r\n try {\r\n if (!isSelectedProjectInitialized) {\r\n dispatch(setSelectedProjectId({ projectId }));\r\n dispatch(selectedProjectLoading());\r\n const response = await getSelectedProjectRequest(projectId, contextKey);\r\n await dispatch(selectedProjectLoaded({ response }));\r\n }\r\n } catch (error) {\r\n dispatch(selectedProjectError(error));\r\n }\r\n };\r\n\r\nexport const initNewProjectDetailsActions = () => (dispatch) => {\r\n dispatch(requestStatementListForNewProject());\r\n};\r\n\r\nexport const setSelectedProjectFromProjectList =\r\n ({ projectListEntry }) =>\r\n (dispatch, getState) => {\r\n dispatch(setSelectedProjectId({ projectId: projectListEntry.id }));\r\n dispatch(\r\n selectedProjectLoaded({\r\n response: projectListEntry.toProjectApiModel(),\r\n }),\r\n );\r\n // If on the homepage and the currently selected project is initialized, we get its statements and the associated document processing workflows.\r\n dispatch(initNewProjectDetailsActions());\r\n };\r\n\r\nexport const getGeoForSelectedProjectId = () => (dispatch, getState) => {\r\n const storeData = getState().data;\r\n\r\n let projectGeo;\r\n\r\n // first, try getting selected project from redux store\r\n let selectedProjectId =\r\n storeData && storeData.selectedProject && storeData.selectedProject.id;\r\n\r\n // if we are unsuccessful in getting selected project id from redux then try getting it from session storage.\r\n if (!selectedProjectId)\r\n selectedProjectId = sessionStorage.getItem(\r\n CURRENT_SELECTED_PROJECT_ID_SESSION_KEY,\r\n );\r\n\r\n // Still if we are if we are unsuccessful in getting selected project id from session and redux store, then try getting it from url\r\n if (\r\n !selectedProjectId &&\r\n window.location.pathname.split('/').includes('project')\r\n )\r\n selectedProjectId = window.location.pathname.split('/')[2];\r\n\r\n projectGeo = dispatch(getGeoForProjectId(selectedProjectId));\r\n\r\n return projectGeo;\r\n};\r\n\r\nexport const getGeoForProjectId = (projectID) => (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const { currentUser: { data } = {} } = storeData;\r\n const { projectToGeoMap } = data || {};\r\n\r\n // first try to get project geo from store.\r\n let projectGeo =\r\n projectID &&\r\n projectToGeoMap &&\r\n (projectToGeoMap.get(`${projectID}`) || {}).geoCode;\r\n\r\n // if we don't have project geo info in store, then try to fetch it from session\r\n if (!projectGeo) {\r\n const projectGeoMapFromSession = JSON.parse(\r\n sessionStorage.getItem('projectToGeoMap'),\r\n );\r\n projectGeo =\r\n projectID &&\r\n projectGeoMapFromSession &&\r\n (projectGeoMapFromSession[`${projectID}`] || {}).geoCode;\r\n }\r\n\r\n if (!projectGeo) {\r\n console.log('failed to determine geo for project id:' + projectID);\r\n console.log('projectToGeoMap:', projectToGeoMap);\r\n console.trace();\r\n return undeterminedGeoKey;\r\n }\r\n\r\n return projectGeo;\r\n};\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { ReactComponent as PlusCircleIcon } from 'icons/plus-circle.svg';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nconst DEFAULT_ICON_SIZE = 20;\r\n\r\nconst ICON_BUTTON_BLOCK = 'icon-button';\r\n//This container div it's neccesary to avoid malfunction of the tooltip if the button is disabled\r\nconst ICON_BUTTON_CONTAINER = 'icon-button-container';\r\n\r\nconst IconButton = React.forwardRef(\r\n (\r\n {\r\n children,\r\n className,\r\n disabled,\r\n id,\r\n onClick,\r\n Icon = PlusCircleIcon,\r\n iconSize = DEFAULT_ICON_SIZE,\r\n tooltip,\r\n position,\r\n tooltipOnHideFunction,\r\n },\r\n ref,\r\n ) => (\r\n \r\n
\r\n \r\n \r\n {children}\r\n \r\n
\r\n \r\n ),\r\n);\r\n\r\nIconButton.propTypes = {\r\n /** custom string class */\r\n className: PropTypes.string,\r\n /** A boolean that determine if button should be disabled */\r\n disabled: PropTypes.bool,\r\n /** unigue string id */\r\n id: PropTypes.string.isRequired,\r\n /** Function for determing the behavior of button when clicked */\r\n onClick: PropTypes.func.isRequired,\r\n /** tooltip for button */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /**The Icon to be rendered in the IconButton,\r\n * it is fully customizable, but does require that its svg path propertyhave the class `.icon-path`\r\n * for proper-styling. By default uses the PlusCircleIcon if none is provided. */\r\n Icon: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),\r\n /** tooltip position */\r\n position: PropTypes.string,\r\n /* function executedn when tooltip hides */\r\n tooltipOnHideFunction: PropTypes.func,\r\n};\r\n\r\nexport default IconButton;\r\n","import { createAction } from 'redux-actions';\r\n\r\nimport { getElementDetailsRequest } from 'api/element-api';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const updateMultipleElementsInCacheAction = createAction(\r\n 'UPDATE_MULTIPLE_CACHE_ELEMENTS',\r\n);\r\n\r\nexport const updateElementInCacheAction = createAction(\r\n 'UPDATE_SINGLE_CACHE_ELEMENT',\r\n);\r\n\r\nexport const updateElementCacheFromSocketPayloadAction = createAction(\r\n 'UPDATE_ELEMENT_CACHE_FROM_SOCKET_PAYLOAD',\r\n);\r\n\r\nexport const updateElementCacheByCalloutAction = createAction(\r\n 'UPDATE_ELEMENT_CACHE_BY_CALLOUT_ACTION',\r\n);\r\nexport const updateLeftElementCacheByCalloutAction = createAction(\r\n 'UPDATE_LEFT_ELEMENT_CACHE_BY_CALLOUT_ACTION',\r\n);\r\n\r\n/**\r\n * This wrapper function should be used when fetching elements from the cache.\r\n */\r\nexport const getElementFromCache =\r\n ({ elementId, sectionId, loadingAction }) =>\r\n async (dispatch, getStore) => {\r\n let elementData = getStore().data.statementContent.elementCache.getElement({\r\n sectionId,\r\n elementId,\r\n });\r\n if (isNullOrUndefined(elementData)) {\r\n dispatch(loadingAction());\r\n const { revision } = getStore().data;\r\n let elementDetails = new ElementDetails();\r\n // If we do not have a copy of this element in the cache, then we fetch the element to work with.\r\n const response = await getElementDetailsRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n elementData = elementDetails.setLoaded({ response });\r\n }\r\n return elementData;\r\n };\r\n\r\nexport const getMultipleElementsFromCache =\r\n ({ elements, loadingAction, isSideBySideView }) =>\r\n async (dispatch, getState) => {\r\n const dataState = getState().data;\r\n const { elementCache } = dataState.statementContent;\r\n const { revision } = dataState;\r\n let selectedElements = [];\r\n let initiatedRequest = false;\r\n elements.forEach(async ({ elementId, sectionId }) => {\r\n if (!isNullOrUndefined(elementId)) {\r\n let elementData = elementCache.getElement({ elementId, sectionId });\r\n if (isNullOrUndefined(elementData)) {\r\n if (!initiatedRequest) {\r\n initiatedRequest = true;\r\n !isSideBySideView && dispatch(loadingAction());\r\n }\r\n const response = await getElementDetailsRequest({\r\n elementId,\r\n revisionId: revision.id,\r\n });\r\n elementData = new ElementDetails().setLoaded({ response });\r\n }\r\n selectedElements.push(elementData);\r\n }\r\n });\r\n\r\n return selectedElements;\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport Permissions from 'permissions/permissions';\r\n\r\nexport const setElementSelectModeDefaultAction = createAction(\r\n 'DEFAULT_ELEMENT_SELECT_MODE',\r\n);\r\nexport const setElementSelectModeBatchAction = createAction(\r\n 'BATCH_ELEMENT_SELECT_MODE',\r\n);\r\nexport const setElementSelectModeSideBySideAction = createAction(\r\n 'SIDE_BY_SIDE_ELEMENT_SELECT_MODE',\r\n);\r\n\r\nexport const setElementSelectModeBatchWithBannerAction = createAction(\r\n 'SET_ELEMENT_SELECT_MODE_BATCH_WITH_BANNER_ACTION',\r\n);\r\n\r\nexport const setElementSelectModeRangeAction = createAction(\r\n 'RANGE_ELEMENT_SELECT_MODE',\r\n);\r\nexport const setElementSelectModeInternalReferenceAction = createAction(\r\n 'IR_ELEMENT_SELECT_MODE',\r\n);\r\nexport const setElementSelectModeFormulaAction = createAction(\r\n 'FORMULA_ELEMENT_SELECT_MODE',\r\n);\r\n\r\nexport const setContentHighlightModeDefault = createAction(\r\n 'DEFAULT_CONTENT_HIGHLIGHT_MODE',\r\n);\r\nexport const setContentHighlightModeNotes = createAction(\r\n 'NOTES_CONTENT_HIGHLIGHT_MODE',\r\n);\r\nexport const setContentHighlightModeAddElement = createAction(\r\n 'ADD_ELEMENT_CONTENT_HIGHLIGHT_MODE',\r\n);\r\nexport const setContentHighlightModeAddNavigation = createAction(\r\n 'ADD_NAVIGATION_CONTENT_HIGHLIGHT_MODE',\r\n);\r\nexport const clearSelectedElementRangeFromStore = createAction(\r\n 'ADD_NAVIGATION_CONTENT_HIGHLIGHT_MODE',\r\n);\r\n\r\nexport const setElementSelectModeCopyFormulaAction = createAction(\r\n 'COPY_FORMULA_ELEMENT_SELECT_MODE',\r\n);\r\nexport const setBatchModeSelected = createAction('SET_BATCH_MODE_SELCTED');\r\n\r\nexport const clearBatchModeSelected = createAction('CLEAR_BATCH_MODE_SELCTED');\r\n\r\nexport const setBatchModeSelectedIfPossible = () => (dispatch, getState) => {\r\n const {\r\n data: {\r\n selectedProject: { id: selectedProjectId },\r\n selectedStatement,\r\n },\r\n } = getState();\r\n const _userCanBatch = Permissions.Element.canEditElement(selectedProjectId);\r\n const readOnly = selectedStatement.isReadOnly();\r\n if (_userCanBatch && !readOnly) {\r\n dispatch(setBatchModeSelected());\r\n }\r\n};\r\n\r\nexport const setElementSelectModeBatchIfPossible =\r\n () => (dispatch, getState) => {\r\n const {\r\n data: {\r\n selectedProject: { id: selectedProjectId },\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { selectMode },\r\n },\r\n },\r\n } = getState();\r\n const _userCanBatch = Permissions.Element.canEditElement(selectedProjectId);\r\n if (_userCanBatch && selectMode === ELEMENT_SELECT_MODES.DEFAULT) {\r\n // only want to go to batch mode if in default mode\r\n dispatch(setElementSelectModeBatchAction());\r\n }\r\n };\r\n\r\nexport const setElementSelectModeSideBySideIfPossible =\r\n ({ isLeftStatementView }) =>\r\n (dispatch, getState) => {\r\n const {\r\n data: {\r\n selectedProject: { id: selectedProjectId },\r\n },\r\n ui: {\r\n sourceStatementParams: { projectId },\r\n statementPage: {\r\n modes: { selectMode },\r\n },\r\n },\r\n } = getState();\r\n const sideBySideProjectId = isLeftStatementView\r\n ? projectId\r\n : selectedProjectId;\r\n const _userCanBatch =\r\n Permissions.Element.canEditElement(sideBySideProjectId);\r\n if (_userCanBatch && selectMode === ELEMENT_SELECT_MODES.DEFAULT) {\r\n // only want to go to batch mode if in default mode\r\n dispatch(setElementSelectModeSideBySideAction());\r\n }\r\n };\r\n\r\nexport const setElementSelectModeRangeIfPossible =\r\n () => (dispatch, getState) => {\r\n const {\r\n data: {\r\n selectedProject: { id: selectedProjectId },\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { selectMode },\r\n },\r\n },\r\n } = getState();\r\n const _userCanBatch = Permissions.Element.canEditElement(selectedProjectId);\r\n if (_userCanBatch && selectMode === ELEMENT_SELECT_MODES.DEFAULT) {\r\n // only want to go to range mode if in default mode\r\n dispatch(setElementSelectModeRangeAction());\r\n }\r\n };\r\n\r\nexport const clearModeIfPossible = () => (dispatch, getState) => {\r\n const { selectMode } = getState().ui.statementPage.modes;\r\n if (\r\n selectMode === ELEMENT_SELECT_MODES.BATCH ||\r\n selectMode === ELEMENT_SELECT_MODES.BATCH_WITH_BANNER ||\r\n selectMode === ELEMENT_SELECT_MODES.RANGE ||\r\n selectMode === ELEMENT_SELECT_MODES.SIDE_BY_SIDE\r\n ) {\r\n // only want to go to default mode if in batch mode\r\n dispatch(setElementSelectModeDefaultAction());\r\n dispatch(clearSelectedElementRangeFromStore());\r\n }\r\n};\r\n\r\nexport const clearCopyFormulaModeIfPossible = () => (dispatch, getState) => {\r\n const { selectMode } = getState().ui.statementPage.modes;\r\n if (selectMode === ELEMENT_SELECT_MODES.COPY_FORMULA) {\r\n // only want to go to default mode if in batch mode\r\n dispatch(setElementSelectModeDefaultAction());\r\n dispatch(clearSelectedElementRangeFromStore());\r\n }\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n setElementSelectModeFormulaAction,\r\n setElementSelectModeDefaultAction,\r\n} from 'store/actions/modes-actions';\r\nimport {\r\n replaceSelectedElementsContentPanel,\r\n selectElementContentPanel,\r\n deselectElementContentPanel,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n getElementFromCache,\r\n getMultipleElementsFromCache,\r\n} from 'store/actions/element-cache-actions';\r\nimport { fetchStatementSummaryElements } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport {\r\n createNewFormulaRequest,\r\n getFormulaDetailsRequest,\r\n editFormulaRequest,\r\n} from 'api/formula-api';\r\nimport { updateElementsSearchByIds } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport { updateElementAnnotationDetails } from 'store/actions/element-panel-actions';\r\n\r\nexport const setLastElementSelectedFormula = createAction(\r\n 'SET_LAST_ELEMENT_SELECTED_FORMULA',\r\n);\r\n\r\nexport const setFormulaLoading = createAction('FORMULA_LOADING');\r\n\r\nexport const setFormulaLoaded = createAction('SET_FORMULA_LOADED');\r\n\r\nexport const setFormulaResult = createAction('SET_FORMULA_RESULT');\r\n\r\nexport const setFormulaError = createAction('FORMULA_ERROR');\r\n\r\nexport const setFormulaElementRowsLoaded = createAction(\r\n 'FORMULA_ELEMENT_ROWS_LOADED',\r\n);\r\n\r\nexport const initFormulaCreateAction = createAction('INIT_FORMULA_CREATE');\r\n\r\nexport const setFormulaOperator = createAction('SET_FORMULA_OPERATOR');\r\n\r\nexport const addManualFormulaRow = createAction('ADD_MANUAL_FORMULA_ROW');\r\n\r\nexport const updateRowOperator = createAction('UPDATE_FORMULA_ROW_OPERATOR');\r\nexport const setFormulaManualNumber = createAction('UPDATE_FORMULA_MANUAL_ROW');\r\n\r\nexport const removeFormulaRowAction = createAction('REMOVE_FORMULA_ROW');\r\nexport const addFormulaRowOperator = createAction('ADD_FORMULA_ROW_OPERATOR');\r\nexport const removeFormulaRowOperator = createAction(\r\n 'REMOVE_FORMULA_ROW_OPERATOR',\r\n);\r\nexport const removeAllRowsAction = createAction('REMOVE_ALL_FORMULA_ROWS');\r\n\r\nexport const clearFormulaAction = createAction('CLEAR_FORMULA');\r\n\r\nexport const setSelectedRowAction = createAction('SET_SELECTED_ROW_ACTION');\r\nexport const setRoundingResultAction = createAction(\r\n 'SET_COMPUTED_RESULT_ACTION',\r\n);\r\nexport const setNewFormulaAction = createAction('SET_NEW FORMULA_ACTION');\r\n\r\nexport const removeFormulaWithSocketPayloadAction = createAction(\r\n 'REMOVE_FORMULA_WITH_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const initFormulaCreate = () => (dispatch, getState) => {\r\n const { elementDetails } = getState().data.elementPanel;\r\n dispatch(setElementSelectModeFormulaAction());\r\n dispatch(initFormulaCreateAction(elementDetails));\r\n};\r\n\r\nexport const removeAllFormulaRows = () => (dispatch, getState) => {\r\n const { formula } = getState().data.formulaPanel;\r\n dispatch(removeAllRowsAction());\r\n dispatch(\r\n replaceSelectedElementsContentPanel({ elementIds: [formula.elementId] }),\r\n );\r\n};\r\n\r\nexport const addElementFormulaRow =\r\n ({ elementId, sectionId }) =>\r\n async (dispatch, getState) => {\r\n dispatch(selectElementContentPanel({ elementIds: [elementId] }));\r\n let elementData = await dispatch(\r\n getElementFromCache({\r\n elementId,\r\n sectionId,\r\n loadingAction: setFormulaLoading,\r\n }),\r\n );\r\n dispatch(setFormulaElementRowsLoaded({ selectedElements: [elementData] }));\r\n };\r\n\r\nexport const removeFormulaRow =\r\n ({ formulaRow, formulaRowIndex }) =>\r\n (dispatch) => {\r\n dispatch(removeFormulaRowAction({ formulaRowIndex }));\r\n if (formulaRow.isElement()) {\r\n dispatch(\r\n deselectElementContentPanel({ elementId: formulaRow.elementId }),\r\n );\r\n }\r\n };\r\n\r\nexport const batchAddElementFormulaRows =\r\n ({ elements }) =>\r\n async (dispatch, getState) => {\r\n const selectedElements = await dispatch(\r\n getMultipleElementsFromCache({\r\n elements,\r\n loadingAction: setFormulaLoading,\r\n }),\r\n );\r\n dispatch(setFormulaElementRowsLoaded({ selectedElements }));\r\n };\r\n\r\nexport const clearFormula =\r\n ({ elementId }) =>\r\n (dispatch) => {\r\n dispatch(clearFormulaAction());\r\n //Replace the potential list of many selected elements in the content panel with the formula's base element only.\r\n dispatch(replaceSelectedElementsContentPanel({ elementIds: [elementId] }));\r\n dispatch(setElementSelectModeDefaultAction());\r\n };\r\n\r\nexport const _updateStatementSummaryElements = async (dispatch, getState) => {\r\n const revisionId = getState().data.revision.id;\r\n dispatch(fetchStatementSummaryElements({ revisionId }));\r\n};\r\n\r\nexport const requestCreateNewFormula = () => async (dispatch, getState) => {\r\n const { formula } = getState().data.formulaPanel;\r\n const { elementDetails } = getState().data.elementPanel;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n dispatch(setFormulaLoading());\r\n try {\r\n await createNewFormulaRequest({\r\n formulaModel: formula,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n // no need to set loaded, if it is successful we will wind up closing this panel\r\n dispatch(clearFormula({ elementId: formula.elementId }));\r\n dispatch(_updateStatementSummaryElements);\r\n dispatch(updateElementsSearchByIds({ elementIds: [elementDetails.id] }));\r\n dispatch(updateElementAnnotationDetails());\r\n }\r\n } catch (error) {\r\n dispatch(setFormulaError(error));\r\n }\r\n};\r\n\r\nexport const requestUpdateFormula = () => async (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const { formula } = storeData.formulaPanel;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n dispatch(setFormulaLoading());\r\n try {\r\n await editFormulaRequest({\r\n formulaModel: formula,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n // no need to set loaded, if it is successful we will wind up closing this panel\r\n dispatch(clearFormula({ elementId: formula.elementId }));\r\n dispatch(_updateStatementSummaryElements);\r\n }\r\n } catch (error) {\r\n dispatch(setFormulaError(error));\r\n }\r\n};\r\n\r\nexport const fetchSelectedFormulaDetails =\r\n (formulaId) => async (dispatch, getState) => {\r\n dispatch(setFormulaLoading());\r\n try {\r\n const storeData = getState().data;\r\n const { revision } = storeData;\r\n const { elementDetails } = storeData.elementPanel;\r\n const response = await getFormulaDetailsRequest({\r\n revisionId: revision.id,\r\n elementId: elementDetails.id,\r\n formulaId,\r\n });\r\n dispatch(setFormulaLoaded({ response }));\r\n /* Triggering this below action to compute the result, computedResult \r\n and roundingResult to show the data on flyout out panel */\r\n dispatch(setFormulaResult());\r\n } catch (error) {\r\n dispatch(setFormulaError(error));\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\n\r\nimport {\r\n getTickmarksForRevisionRequest,\r\n deleteTickmarkRequest,\r\n} from 'api/tickmark-api';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\nimport { updateCacheWithMostRecentElementChanges } from 'store/actions/element-changes-since-tracker-actions';\r\nimport { getElementTickmarksWithoutLoading } from 'store/actions/element-panel-actions';\r\nimport { getElementsByTickmark } from 'api/tickmark-api';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nexport const tickmarkListLoading = createAction('TICKMARK_LIST_LOADING');\r\nexport const tickmarkListLoaded = createAction('TICKMARK_LIST_LOADED');\r\nexport const tickmarkListError = createAction('TICKMARK_LIST_ERROR');\r\nexport const fetchElementsFromTickmarkAction = createAction(\r\n 'FETCH_ELEMENTS_FROM_TICKMARK',\r\n);\r\nexport const updateTickmarkElementsMapAction = createAction(\r\n 'UPDATE_TICKMARK_ELEMENTS_MAP_ACTION',\r\n);\r\n\r\nexport const updateTickmarkElementsMapFromArrayAction = createAction(\r\n 'UPDATE_TICKMARK_ELEMENTS_MAP_FROM_ARRAY_ACTION',\r\n);\r\nexport const clearTickmarkElementsAction = createAction(\r\n 'CLEAR_TICKMARK_ELEMENTS_ACTION',\r\n);\r\nexport const removeTickmarkFromElementsMapAction = createAction(\r\n 'REMOVE_TICKMARK_FROM_ELEMENTS_MAP_ACTION',\r\n);\r\nexport const removeElementFromTickmarkElementsMapWithSocketPayloadAction = createAction(\r\n 'REMOVE_ELEMENT_FROM_TICKMARK_ELEMENTS_MAP_WITH_SOCKET_PAYLOAD_ACTION',\r\n);\r\nexport const addTickmarkToDeletedArrayAction = createAction(\r\n 'ADD_TICKMARK_TO_DELETED_ARRAY_ACTION',\r\n);\r\nexport const excludeElementFromElementsMapAction = createAction(\r\n 'EXCLUDE_TICKMARK_FROM_ELEMENTS_MAP_ACTION',\r\n);\r\n\r\nexport const updateTickmarkWithSocketPayloadAction = createAction(\r\n 'UPDATE_TICKMARK_WITH_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const addTickmarkToListAction = createAction(\r\n 'ADD_TICKMARK_TO_LIST_ACTION',\r\n);\r\n\r\nexport const unlinkTickmarkFromElementWithWebsocket = createAction(\r\n 'UNLINK_TICKMARK_FROM_TICKMARK_LIST_WITH_SOCKET',\r\n);\r\n\r\nexport const deleteTickmarkWithSocketPayloadAction = createAction(\r\n 'DELETE_TICKMARK_WITH_SOCKET_PAYLOAD_ACTION',\r\n);\r\nexport const fetchTickmarkListForRevisionWithoutLoading = ({\r\n revisionId,\r\n}) => async (dispatch, getState) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.TICKMARK) return;\r\n try {\r\n const response = await getTickmarksForRevisionRequest({ revisionId });\r\n dispatch(tickmarkListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(tickmarkListError(error));\r\n }\r\n};\r\n\r\nexport const fetchTickmarkListForRevision = ({ revisionId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.TICKMARK) return;\r\n dispatch(tickmarkListLoading());\r\n await dispatch(fetchTickmarkListForRevisionWithoutLoading({ revisionId }));\r\n};\r\n\r\nexport const deleteTickmark = ({ tickmark }) => async (dispatch, getState) => {\r\n dispatch(addTickmarkToDeletedArrayAction(tickmark.tickmarkId));\r\n await deleteTickmarkRequest({ tickmark });\r\n const { id: revisionId } = getState().data.revision;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchTickmarkListForRevisionWithoutLoading({ revisionId }));\r\n const { id: elementId } = getState().data.elementPanel.elementDetails;\r\n if (!isNullOrUndefined(elementId)) {\r\n dispatch(getElementTickmarksWithoutLoading({ elementId }));\r\n }\r\n // We do not want to update summary (1st param -false). Since deleting of Tickmark should not result\r\n // in change of summary.\r\n dispatch(updateCacheWithMostRecentElementChanges(false, true));\r\n }\r\n};\r\n\r\nexport const fetchElementsFromTickmark = ({ revisionId, tickmarkId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.TICKMARK) return;\r\n try {\r\n const response = await getElementsByTickmark({ revisionId, tickmarkId });\r\n dispatch(fetchElementsFromTickmarkAction({ response, tickmarkId }));\r\n } catch (error) {\r\n dispatch(tickmarkListError(error));\r\n }\r\n};\r\nexport const updateTickmarkElementsMap = ({ response }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.TICKMARK) return;\r\n const updatedElementsArray = response.data.result\r\n ? response.data.result.elementEntityList[0]\r\n : response;\r\n if (response && updatedElementsArray) {\r\n dispatch(updateTickmarkElementsMapAction(updatedElementsArray));\r\n }\r\n};\r\nexport const updateTickmarkElementsMapFromArray = ({ elementsArray }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.TICKMARK) return;\r\n if (elementsArray) {\r\n dispatch(updateTickmarkElementsMapFromArrayAction(elementsArray));\r\n }\r\n};\r\n\r\nexport const clearElementsFromTickmark = () => (dispatch) => {\r\n dispatch(clearTickmarkElementsAction());\r\n};\r\n\r\nexport const removeTickmarkFromElementsMapStore = ({ tickmarkId }) => (\r\n dispatch,\r\n) => {\r\n dispatch(removeTickmarkFromElementsMapAction(tickmarkId));\r\n};\r\n\r\nexport const excludeElementFromTickmarkElementsMap = ({ elementId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.TICKMARK) return;\r\n const { id: revisionId } = getState().data.revision;\r\n\r\n try {\r\n await dispatch(fetchTickmarkListForRevisionWithoutLoading({ revisionId }));\r\n dispatch(excludeElementFromElementsMapAction(elementId));\r\n } catch (error) {\r\n dispatch(tickmarkListError(error));\r\n }\r\n};\r\n","//import { getAPI } from 'api/api-client';\r\nimport moment from 'moment-timezone';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\nimport {\r\n withDefaultContextAsSelectedProject,\r\n withDefaultContextAsProject,\r\n} from './api-default-context';\r\nimport { serializedProjectIdWithGeo } from 'utils/project-utils';\r\n\r\nexport const getStatementListRequest = ({\r\n projectId,\r\n status,\r\n sort,\r\n order,\r\n first,\r\n size,\r\n isAuditClient,\r\n contextKey,\r\n selectedProject,\r\n}) => {\r\n return withDefaultContextAsProject({ contextKey }, projectId)\r\n .get(`/tieout/clients/${parseInt(projectId)}/statements`, {\r\n params: {\r\n status,\r\n sort,\r\n order,\r\n first,\r\n size,\r\n isAuditClient,\r\n },\r\n })\r\n .then((response) => {\r\n response.data &&\r\n response.data.result &&\r\n Array.isArray(response.data.result.elements) &&\r\n response.data.result.elements.forEach((item) => {\r\n item.clientId = serializedProjectIdWithGeo(\r\n item.clientId,\r\n selectedProject.data.geoCode,\r\n );\r\n });\r\n return response;\r\n });\r\n};\r\n\r\n// TODO props may need to change when we add pagination and sorting integration\r\nexport const getStatementListForProjectRequest = ({\r\n projectId,\r\n sort,\r\n order,\r\n selectedProject,\r\n}) => {\r\n return getStatementListRequest({\r\n status: 'active, pending_approval, archived, approval_initiated',\r\n projectId,\r\n sort,\r\n order,\r\n selectedProject,\r\n });\r\n};\r\n\r\n// TODO props may need to change when we add pagination and sorting integration\r\nexport const getArchivedStatementListForProjectRequest = ({\r\n projectId,\r\n sort,\r\n order,\r\n selectedProject,\r\n}) =>\r\n getStatementListRequest({\r\n status: 'archived',\r\n projectId,\r\n sort,\r\n order,\r\n selectedProject,\r\n });\r\n\r\n// TODO props may need to change when we add pagination and sorting integration\r\nexport const getDeletedStatementListForProjectRequest = ({\r\n projectId,\r\n sort,\r\n order,\r\n selectedProject,\r\n}) =>\r\n getStatementListRequest({\r\n status: 'deleted',\r\n projectId,\r\n sort,\r\n order,\r\n selectedProject,\r\n });\r\n\r\nexport const sofDeleteCurrentRevisionRequest = ({ revisionId, statementId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(`/tieout/revisions/${revisionId}/statement/${statementId}`, null, {\r\n params: { deleteAllRevisions: false },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const softDeleteAllRevisionsRequest = (statementId) =>\r\n withDefaultContextAsSelectedProject()\r\n //this -1 in the route needs to get changed in a backend update.\r\n .post(`/tieout/revisions/-1/statement/${statementId}`, null, {\r\n params: { deleteAllRevisions: true },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const permanentlyDeleteRevisionRequest = (revisionId, statementId) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(`/tieout/statements/${statementId}/revisions/${revisionId}/delete`)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const permanentlyDeleteFailedRevisionRequest = (\r\n statementId,\r\n revisionId,\r\n) =>\r\n withDefaultContextAsSelectedProject()\r\n .delete(\r\n `/tieout/statements/${statementId}/revisions/${revisionId}/deletefailed`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const permanentlyDeleteAllSoftDeletedRevisionsForStatementRequest = (\r\n statementId,\r\n) =>\r\n withDefaultContextAsSelectedProject()\r\n .delete(`/tieout/statements/${statementId}`)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getStatementWorkflowsRequest = (projectId) => {\r\n return withDefaultContextAsProject({}, projectId)\r\n .get(`/tieout/documentupload/${parseInt(projectId)}/workflows`)\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const retryFailedDocumentUploadRequest = (\r\n statementId,\r\n revisionId,\r\n clientId,\r\n) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/documentupload/client/${parseInt(\r\n clientId,\r\n )}/statements/${statementId}/revisions/${revisionId}/retry`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const restoreDeletedRevisionRequest = (revisionId, statementId) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(`/tieout/statements/${statementId}/revisions/${revisionId}/restore`)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getStatementSubmitForWrapUpApprovalStatsRequest = ({\r\n statementId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${statementId}/submissionsynopsis`,\r\n );\r\n\r\nexport const getStatementApprovalStatsRequest = ({ statementId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${statementId}/approvalsynopsis`,\r\n );\r\n\r\nexport const submitStatementForWrapUpApprovalRequest = ({ statementId }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${statementId}/submit`,\r\n );\r\n\r\nexport const rejectStatementWrapUpRequest = ({ statementId }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${statementId}/decline`,\r\n );\r\n\r\nexport const approveStatementWrapUpRequest = ({ statementId, signedDate }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${statementId}/approve`,\r\n null,\r\n {\r\n params: {\r\n signedDate,\r\n },\r\n },\r\n );\r\n\r\nexport const exportWorkpaperStatementRequest = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n options,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n ...options,\r\n reportType: 'Workpaper',\r\n reportFormat: 'PDF',\r\n timeZone: moment.tz.guess(),\r\n },\r\n );\r\n\r\nexport const exportElementReportRequest = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/report`,\r\n );\r\n\r\nexport const exportAuditTrailRequest = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n timeZone: moment.tz.guess(),\r\n },\r\n );\r\n\r\nexport const exportComfortLetterReportRequest = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n timeZone: moment.tz.guess(),\r\n },\r\n );\r\n\r\nexport const exportClientNotesRequest = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'ClientNotes',\r\n timeZone: moment.tz.guess(),\r\n },\r\n );\r\n\r\nexport const exportCustomReportRequest = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n exportCustomParam,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export`,\r\n {\r\n ...exportCustomParam,\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'CustomReport',\r\n timeZone: moment.tz.guess(),\r\n },\r\n );\r\n};\r\n\r\n/**Api's to download report directly into local.\r\n * This shall be used when blob storage service is not actively running\r\n */\r\n\r\nexport const exportWorkpaperStatementRequestFallback = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n options,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export/fallback`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n ...options,\r\n reportType: 'Workpaper',\r\n reportFormat: 'PDF',\r\n timeZone: moment.tz.guess(),\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n\r\nexport const exportElementReportRequestFallback = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/report/fallback`,\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n\r\nexport const exportAuditTrailRequestFallback = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export/fallback`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n timeZone: moment.tz.guess(),\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n\r\nexport const exportComfortLetterReportRequestFallback = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export/fallback`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n reportType,\r\n timeZone: moment.tz.guess(),\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n\r\nexport const exportClientNotesRequestFallback = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export/fallback`,\r\n {\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'ClientNotes',\r\n timeZone: moment.tz.guess(),\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n\r\nexport const exportCustomReportRequestFallback = ({\r\n revisionId,\r\n pageSize,\r\n pageOrientation,\r\n exportCustomParam,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export/fallback`,\r\n {\r\n ...exportCustomParam,\r\n pageSize,\r\n pageOrientation,\r\n reportType: 'CustomReport',\r\n timeZone: moment.tz.guess(),\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n};\r\n\r\n/** END Of api call list for report download directly in local */\r\n\r\nexport const copyStatementRequest = ({ statementId, targetClientId }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/copy/statement/${statementId}/to/client/${parseInt(\r\n targetClientId,\r\n )}`,\r\n );\r\n\r\nexport const downloadReportFromGuid = ({\r\n revisionId,\r\n fileName,\r\n storageGuid,\r\n userDownloadedReportStatus,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export/download`,\r\n {\r\n fileName,\r\n storageGuid,\r\n downloadedStatus: userDownloadedReportStatus,\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n};\r\n\r\nexport const downloadElementReportFromGuid = ({\r\n revisionId,\r\n fileName,\r\n storageGuid,\r\n userDownloadedReportStatus,\r\n reportId,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/download`,\r\n {\r\n fileName,\r\n storageGuid,\r\n downloadedStatus: userDownloadedReportStatus,\r\n reportId,\r\n },\r\n {\r\n responseType: 'blob',\r\n },\r\n );\r\n};\r\n\r\nexport const fetchToolkitReportList = ({ revisionId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/exportList`,\r\n );\r\n};\r\n\r\nexport const cancelReportIdProcessingRequest = ({\r\n revisionId,\r\n reportId,\r\n reportName,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/export/cancel`,\r\n {\r\n reportId,\r\n reportName,\r\n },\r\n );\r\n};\r\n\r\n// used to fetch source clientid which specific statement was imported\r\nexport const getSourceClientIdForCopyStatement = ({ statementId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/getSourceClient/${statementId}`,\r\n );\r\n};\r\n","import React from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nconst CHIP_BLOCK = 'chip';\r\n\r\nconst Chip = ({ children, id, onRemove, onClick, className }) => {\r\n return (\r\n \r\n
{children}
\r\n {!isNullOrUndefined(onRemove) && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nChip.propTypes = {\r\n /** custom string class */\r\n className: PropTypes.string,\r\n /** unigue string id */\r\n id: PropTypes.string.isRequired,\r\n /** Function for determing the behavior of button when clicked */\r\n onClick: PropTypes.func,\r\n /** Function fired when clicking the x button */\r\n onRemove: PropTypes.func,\r\n};\r\n\r\nexport default Chip;\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n onStatementNavSectionSelect,\r\n replaceSelectedSectionsContentPanel,\r\n} from '../statement-content-actions';\r\nimport { scrollLeftSectionIntoView } from 'utils/scrolling-utils';\r\nimport { getSectionReviewersRequest } from 'api/sections-api';\r\nimport { CONTEXT_KEY } from 'api/api-client';\r\nimport { getStore } from 'store/store';\r\nimport {\r\n SIDE_BY_SIDE_VIEW_LEGACY_COMBINATION_STATEMENT,\r\n SIDE_BY_SIDE_VIEW_OCR_COMBINATION_STATEMENT,\r\n} from 'constants/feature/statement-content-constants';\r\nimport {\r\n deRegisterLeftScrollListeners,\r\n deRegisterRightScrollListeners,\r\n getTotalSectionHeight,\r\n registerLeftScrollListeners,\r\n registerRightScrollListeners,\r\n} from 'utils/sync-scroll-utils';\r\n\r\nexport const setSourceStatementElementMapAction = createAction(\r\n 'SET_SOURCE_STATEMENT_ELEMENT_MAP_ACTION',\r\n);\r\n\r\nexport const setTargetStatementElementMapAction = createAction(\r\n 'SET_TARGET_STATEMENT_ELEMENT_MAP_ACTION',\r\n);\r\n\r\nexport const clearSideBySideElementsMap = createAction(\r\n 'CLEAR_SIDE_BY_SIDE_ELEMENTS_MAP',\r\n);\r\n\r\nexport const replaceSelectedSectionsInLeftContentPanel = createAction(\r\n 'REPLACE_SELECTED_SECTIONS_LEFT_STATEMENT_CONTENT_PANEL',\r\n);\r\nexport const deallocateSelectedSectionsInLeftContentPanel = createAction(\r\n 'DEALLOCATE_SELECTED_SECTIONS_LEFT_STATEMENT_CONTENT_PANEL',\r\n);\r\n\r\nexport const fetchLeftSectionReviewsError = createAction(\r\n 'LEFT_FETCH_SECTIONS_REVIEWS_ERROR',\r\n);\r\n\r\nexport const fetchLeftSectionReviewsLoaded = createAction(\r\n 'LEFT_FETCH_SECTIONS_REVIEWS_LOADED',\r\n);\r\n\r\nexport const setTargetStatementBatchElementsMapAction = createAction(\r\n 'SET_TARGET_STATEMENT_BATCH_ELEMENTS_MAP_ACTION',\r\n);\r\nexport const setSourceStatementBatchElementsMapAction = createAction(\r\n 'SET_SOURCE_STATEMENT_BATCH_ELEMENTS_MAP_ACTION',\r\n);\r\n\r\nexport const setSideBySideSyncScroll = createAction(\r\n 'SET_SIDE_BY_SIDE_SYNC_SCROLL',\r\n);\r\n\r\nexport const onRightStatementNavSectionClick =\r\n ({ sectionId, color }) =>\r\n async (dispatch, getState) => {\r\n const { data, ui } = getState();\r\n const {\r\n leftSelectedStatement,\r\n selectedStatement: { isOCR },\r\n } = data;\r\n const {\r\n modes: { sideBySideSyncScroll },\r\n syncScrollIds,\r\n } = ui.statementPage;\r\n const sourceStatement = document.getElementById(syncScrollIds.sourceId);\r\n const targetStatement = document.getElementById(syncScrollIds.targetId);\r\n\r\n if (\r\n sideBySideSyncScroll &&\r\n leftSelectedStatement &&\r\n leftSelectedStatement.isLoaded\r\n ) {\r\n deRegisterLeftScrollListeners(sourceStatement);\r\n deRegisterRightScrollListeners(targetStatement);\r\n\r\n dispatch(\r\n replaceSelectedSectionsContentPanel({\r\n sectionIds: [sectionId],\r\n color,\r\n }),\r\n );\r\n\r\n const totalPageHeight = getTotalSectionHeight(\r\n sectionId,\r\n !isOCR, // to return is Legacy Statement Selected\r\n syncScrollIds.targetId,\r\n );\r\n const top = totalPageHeight;\r\n const options = { top, behavior: 'smooth' };\r\n\r\n sourceStatement.scrollTo(options);\r\n targetStatement.scrollTo(options);\r\n\r\n setTimeout(() => {\r\n registerLeftScrollListeners(sourceStatement);\r\n registerRightScrollListeners(targetStatement);\r\n }, 2000);\r\n } else {\r\n dispatch(onStatementNavSectionSelect({ sectionId, color }));\r\n }\r\n };\r\n\r\nexport const onLeftStatementNavSectionClick =\r\n ({ sectionId, color }) =>\r\n async (dispatch, getState) => {\r\n const { data, ui } = getState();\r\n const {\r\n leftSelectedStatement: { isOCR },\r\n } = data;\r\n const {\r\n modes: { sideBySideSyncScroll },\r\n syncScrollIds,\r\n } = ui.statementPage;\r\n\r\n const sourceStatement = document.getElementById(syncScrollIds.sourceId);\r\n const targetStatement = document.getElementById(syncScrollIds.targetId);\r\n\r\n if (sideBySideSyncScroll) {\r\n deRegisterLeftScrollListeners(sourceStatement);\r\n deRegisterRightScrollListeners(targetStatement);\r\n\r\n await dispatch(\r\n replaceSelectedSectionsInLeftContentPanel({\r\n sectionIds: [sectionId],\r\n color,\r\n }),\r\n );\r\n\r\n const totalPageHeight = getTotalSectionHeight(\r\n sectionId,\r\n !isOCR, // to return is Legacy Statement Selected\r\n syncScrollIds.sourceId,\r\n );\r\n\r\n const top = totalPageHeight;\r\n const options = { top, behavior: 'smooth' };\r\n sourceStatement.scrollTo(options);\r\n targetStatement.scrollTo(options);\r\n\r\n setTimeout(() => {\r\n registerLeftScrollListeners(sourceStatement);\r\n registerRightScrollListeners(targetStatement);\r\n }, 2000);\r\n } else {\r\n dispatch(\r\n replaceSelectedSectionsInLeftContentPanel({\r\n sectionIds: [sectionId],\r\n color,\r\n }),\r\n );\r\n scrollLeftSectionIntoView(sectionId);\r\n }\r\n };\r\n\r\nexport const fetchLeftSectionReviews =\r\n (statementId) => async (dispatch, getStore) => {\r\n const { leftRevision } = getStore().data;\r\n const { sourceStatementParams } = getStore().ui;\r\n try {\r\n const response = await getSectionReviewersRequest({\r\n revisionId: leftRevision.id,\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: sourceStatementParams.projectId,\r\n statementId,\r\n });\r\n dispatch(fetchLeftSectionReviewsLoaded({ response }));\r\n } catch (error) {\r\n dispatch(fetchLeftSectionReviewsError(error));\r\n }\r\n };\r\n\r\nexport const isBothLegacyOrOCRInSideBySideView = () => {\r\n const { selectedStatement, leftSelectedStatement } =\r\n getStore().getState().data;\r\n const isSourceLegacy = !selectedStatement.isOCR;\r\n const isTargetLegacy = !leftSelectedStatement.isOCR;\r\n\r\n if (isSourceLegacy === isTargetLegacy) {\r\n return isSourceLegacy\r\n ? SIDE_BY_SIDE_VIEW_LEGACY_COMBINATION_STATEMENT // it returns true if both source and target statement are Legacy statements\r\n : SIDE_BY_SIDE_VIEW_OCR_COMBINATION_STATEMENT; // it returns true if both source and target statement are OCR statements\r\n }\r\n};\r\n","import { getStore } from 'store/store';\r\nimport { GEO_NAMES } from 'constants/feature/project-list-header-constants';\r\nimport { isArray } from 'lodash';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\nimport {\r\n LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER,\r\n TIME_TO_LIVE_FOR_LOCALE_LANGUAGE_JSON,\r\n} from 'constants/common/feature-common-utils';\r\nimport { getAllContainerDetails } from 'api/project-list-api';\r\nimport CountryForm from 'models/form/country-form-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n/**\r\n * This map contains a list of all the pipe colors supported in the application in their proper ordering. As this is only\r\n * used for visual separation between cards, please use the {`getPipeColorForProject`} function to access the proper color value for\r\n * a project based on its index. If any further logic is needed with pipe colors, please add it to this utility file as well.\r\n */\r\nconst _pipeColorMap = {\r\n green: '#c4d600',\r\n purple: '#012169',\r\n blue: '#0097a9',\r\n teal: '#62b5e5',\r\n greenDark: '#009a44',\r\n tealLight: '#9dd4cf',\r\n blueDark: '#041e42',\r\n grey: '#63666a',\r\n};\r\n\r\n/**\r\n * This function is used to determine the hex code of the pipe color for a given project. We are simply using the index\r\n * of the project from the store to determine what pipe color to give it. E.g: the first project is green, the second is purple, etc...\r\n * Returns an empty string iff the project is not found in the store's project list, based on its id, or the store/project list have not\r\n * been initialized.\r\n *\r\n * @param {String} projectID - The id of the project we wish to give a color, used to find the project in the store to determine its color index.\r\n *\r\n * @return {String} projectPipeColor - The hex code of the project's pipe color, based on its index in the store's project list, or empty\r\n * String if it is not present in the project list.\r\n *\r\n */\r\n\r\nexport const getPipeColorForProject = (projectID) => {\r\n let projectPipeColor = '';\r\n const stateData = getStore().getState().data;\r\n if (stateData && stateData.projectList.hasProjects()) {\r\n const projectList = stateData.projectList.getProjects();\r\n const desiredProjectIndex = projectList.findIndex((project) => {\r\n return project.id === projectID;\r\n });\r\n const pipeColorValues = Object.values(_pipeColorMap);\r\n projectPipeColor =\r\n pipeColorValues[desiredProjectIndex % pipeColorValues.length];\r\n }\r\n return projectPipeColor;\r\n};\r\n\r\nconst hasDuplicate = (array, obj) => {\r\n // checking if the existing array already has the obj present in it.\r\n return array.some((item) => {\r\n return item.id === obj.id && item.geoCode === obj.geoCode;\r\n });\r\n};\r\n\r\nexport const collateProjectDetails = (apiResponses) => {\r\n // Creating an object which contains Geo wise project list data.\r\n const geoCodeMapData = {};\r\n\r\n apiResponses.forEach((response) => {\r\n response &&\r\n response.data &&\r\n Array.isArray(response.data.result) &&\r\n response.data.result.map((item) => {\r\n if (\r\n geoCodeMapData[item.geoCode] &&\r\n !hasDuplicate(geoCodeMapData[item.geoCode], item) // we are checking if for the next response item also if we have the same Geo data or not.\r\n ) {\r\n geoCodeMapData[item.geoCode] = [\r\n ...geoCodeMapData[item.geoCode],\r\n item,\r\n ];\r\n } else if (!geoCodeMapData[item.geoCode]) {\r\n geoCodeMapData[item.geoCode] = [item];\r\n }\r\n });\r\n });\r\n\r\n const mergedData = [];\r\n\r\n Object.keys(geoCodeMapData).map((keys) =>\r\n mergedData.push(...geoCodeMapData[keys]),\r\n );\r\n\r\n // creating collatedResponse object which will contain the data result for all the Geos.\r\n const collatedResponse = {\r\n ...apiResponses[0],\r\n data: {\r\n ...apiResponses[0].data,\r\n result: mergedData,\r\n },\r\n };\r\n\r\n collatedResponse &&\r\n collatedResponse.data &&\r\n Array.isArray(collatedResponse.data.result) &&\r\n collatedResponse.data.result.forEach((item) => {\r\n item.id = serializedProjectIdWithGeo(item.id, item.geoCode);\r\n });\r\n\r\n return collatedResponse;\r\n};\r\n\r\nexport const serializedProjectIdWithGeo = (projectID, geoCode) => {\r\n return `${projectID}-${geoCode}`;\r\n};\r\n\r\n// This function will update project id of each of the projects in the list to geo-suffixed project id\r\nexport const updateProjectListWithGeoSuffixedProjectId = (\r\n projectList,\r\n nameOfProjectIdProp,\r\n nameOfGeoCodeProp,\r\n) => {\r\n return isArray(projectList)\r\n ? projectList.map((_project) => {\r\n _project[nameOfProjectIdProp] = serializedProjectIdWithGeo(\r\n _project[nameOfProjectIdProp],\r\n _project[nameOfGeoCodeProp],\r\n );\r\n return _project;\r\n })\r\n : [];\r\n};\r\n\r\nexport const getGeosWhereUserHasProject = () => {\r\n const store = getStore();\r\n const { data: { currentUser } = {} } = store.getState();\r\n let { projectToGeoMap } = currentUser && currentUser.data;\r\n // if project to geo map is not in store then try to get it from session\r\n if (!projectToGeoMap)\r\n projectToGeoMap = JSON.parse(sessionStorage.getItem('projectToGeoMap'));\r\n\r\n const geoAndRolesList =\r\n projectToGeoMap instanceof Map\r\n ? Array.from(projectToGeoMap.values())\r\n : Object.values(projectToGeoMap);\r\n const geos = geoAndRolesList.map((item) => item.geoCode);\r\n return Array.from(new Set(geos));\r\n};\r\n\r\nexport const isProjectExistInAMERegion = (project) => {\r\n const { data: { geoCode } = {} } = project || {};\r\n return geoCode === GEO_NAMES.AME;\r\n};\r\n\r\nexport const doesUserExistInAMERegion = () => {\r\n const store = getStore();\r\n const { data: { currentUser } = {} } = store.getState();\r\n const { data: { geoCode } = {} } = currentUser || {};\r\n return geoCode === GEO_NAMES.AME;\r\n};\r\n\r\n/**This piece of code might be required in case we want to fetch containers data from multiple geos\r\n * in future.\r\n */\r\n// export const collateCountryListDetails = (apiResponses) => {\r\n// // borrow structure from api response\r\n// let collatedResponse = apiResponses[0];\r\n// // We want to collate responses only when it is fetched from geos having different base_api_url\r\n// // Generally in dev env, we do not have different base_api_url\r\n// !isBaseAPIUrlSimilarForAllGeos() &&\r\n// apiResponses.forEach((response, index) => {\r\n// index > 0 &&\r\n// response &&\r\n// Array.isArray(response.data) &&\r\n// Array.isArray(collatedResponse.data) &&\r\n// collatedResponse.data.push(...response.data);\r\n// });\r\n// collatedResponse.data =\r\n// getUniqueCountryListFromMultiGeosData(collatedResponse);\r\n// return collatedResponse;\r\n// };\r\n\r\n// // filters the unique countries/containers list from multiple geos collated response based on the unique geoCode, containerCode and countryCode fields\r\n// const getUniqueCountryListFromMultiGeosData = (collatedCountryList) => {\r\n// const uniqueCountryList = [];\r\n// const uniqueCountryKeys = new Set();\r\n\r\n// collatedCountryList.data.forEach((obj) => {\r\n// const key = `${obj.geoCode}-${obj.containerCode}-${obj.countryCode}`;\r\n// if (!uniqueCountryKeys.has(key)) {\r\n// uniqueCountryKeys.add(key);\r\n// uniqueCountryList.push(obj);\r\n// }\r\n// });\r\n// return uniqueCountryList;\r\n// };\r\n\r\nexport const getCountryCodeMenuOption = (countryOptionList, countryCode) => {\r\n if (!isArray(countryOptionList) || !countryCode)\r\n // if we get falsy value user from BE, user will see empty dropdown\r\n return new MenuOption({\r\n id: 1,\r\n title: EMPTY_STRING,\r\n value: '',\r\n isIntl: false,\r\n });\r\n return countryOptionList.find((container) => container.id === countryCode);\r\n};\r\n\r\nexport const getAllCountriesListFromLocalstorage = () =>\r\n JSON.parse(\r\n localStorage.getItem(\r\n `${LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER}_AllCountriesList`,\r\n ),\r\n );\r\n\r\n/**it checks localStorage key \"tieout__AllCountriesList\" with its value if it exists\r\n * it won't be triggers /tieout/containers/all API call to fetch all the countries list(static data) and\r\n * if localStorage key not present it will creates key with value of response of /tieout/containers/all API call.\r\n * Note: this localStorage key will be updated based on the expiry value\r\n */\r\nexport const fetchAndUpdateAllCountriesList =\r\n () => async (dispatch, getState) => {\r\n const countriesList = getAllCountriesListFromLocalstorage();\r\n if (\r\n // if allCountryList does not exist or it has expired for specific locale then only we want to make api call.\r\n !(\r\n countriesList &&\r\n isArray(countriesList.data) &&\r\n countriesList.data.length > 0 &&\r\n countriesList.expiry > new Date().getTime()\r\n )\r\n ) {\r\n try {\r\n const response = await getAllContainerDetails();\r\n // append time to live with allCountriesList\r\n const countriesListWithTTL = response &&\r\n response.data && {\r\n data: response.data,\r\n expiry:\r\n new Date().getTime() + TIME_TO_LIVE_FOR_LOCALE_LANGUAGE_JSON,\r\n };\r\n\r\n localStorage.setItem(\r\n `${LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER}_AllCountriesList`,\r\n JSON.stringify(countriesListWithTTL),\r\n );\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n };\r\n\r\n//getting the countryName based on geoCode and countryCode from all countries list\r\nexport const getCountryNameByGeoCodeAndCountryCode = (geoCode, countryCode) => {\r\n const allCountryListData = getAllCountriesListFromLocalstorage();\r\n\r\n const countryData =\r\n allCountryListData &&\r\n isArray(allCountryListData.data) &&\r\n allCountryListData.data.find(\r\n (item) => item.geoCode === geoCode && item.countryCode === countryCode,\r\n );\r\n return countryData && countryData.countryName;\r\n};\r\n\r\n//getting the countryName based on countryCode from all countries list\r\nexport const getCountryNameByCountryCode = (countryCode) => {\r\n const allCountryListData = getAllCountriesListFromLocalstorage();\r\n\r\n const countryData =\r\n allCountryListData &&\r\n isArray(allCountryListData.data) &&\r\n allCountryListData.data.find((item) => item.countryCode === countryCode);\r\n return countryData && countryData.countryName;\r\n};\r\n\r\n//getting the countryName based on geoCode, containerCode and countryCode from all countries list\r\nexport const getCountryNameByGeoCodeContainerCodeAndCountryCode = (\r\n geoCode,\r\n countryCode,\r\n containerCode,\r\n) => {\r\n const allCountryListData = getAllCountriesListFromLocalstorage();\r\n\r\n const countryData =\r\n allCountryListData &&\r\n isArray(allCountryListData.data) &&\r\n allCountryListData.data.find(\r\n (item) =>\r\n item.geoCode === geoCode &&\r\n item.countryCode === countryCode &&\r\n item.containerCode === containerCode,\r\n );\r\n return countryData && countryData.countryName;\r\n};\r\n\r\nexport const getCountriesListLoadedInModel = () => {\r\n let localStorageCountriesList = getAllCountriesListFromLocalstorage();\r\n const countriesList = new CountryForm();\r\n if (\r\n !isNullOrUndefined(localStorageCountriesList) &&\r\n isArray(localStorageCountriesList.data) &&\r\n localStorageCountriesList.data.length > 1\r\n ) {\r\n return countriesList.setLoaded(localStorageCountriesList);\r\n } else {\r\n localStorage.removeItem(\r\n `${LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER}_AllCountriesList`,\r\n );\r\n return countriesList;\r\n }\r\n};\r\n\r\nexport const isProjectExistsInPinnedDetails = (pinnedProjects, projectId) => {\r\n return pinnedProjects.filter((item) => item.clientId === parseInt(projectId))\r\n .length;\r\n};\r\n\r\nexport const isUserHasAccessToProject = (projectId) => {\r\n const store = getStore();\r\n const {\r\n data: {\r\n currentUser: {\r\n data: { projectToGeoMap },\r\n },\r\n } = {},\r\n } = store.getState();\r\n\r\n let userHasAccess;\r\n if (!isNullOrUndefined(projectId)) {\r\n userHasAccess = projectToGeoMap.has(`${projectId}`);\r\n }\r\n return userHasAccess;\r\n};\r\n","import { CONTEXT_KEY, getAPIClient } from 'api/api-client';\r\nimport axios from 'axios';\r\nimport socketConfig from 'socket/socketio-client';\r\nimport signalrConfig from 'socket/signalr-client';\r\nimport {\r\n UNAUTHORIZED,\r\n // FORBIDDEN,\r\n INTERNAL_SERVER_ERROR,\r\n} from 'http-status-codes';\r\nimport moment from 'moment';\r\nimport { PublicClientApplication } from '@azure/msal-browser';\r\nimport { removeUserFromRoom } from 'api/statement-socket-client-api';\r\nimport { withDefaultContextAsHomeGeo } from './api-default-context';\r\n\r\nconst port = window.location.port ? `:${window.location.port}` : '';\r\nconst redirectUri = `${window.location.protocol}//${window.location.hostname}${port}/authsuccess`;\r\nconst LOGOUT_URL = '/logout';\r\nexport const isSignalRForSocketConnectionEnabled =\r\n window.TIEOUT.ENV.FEATURE.ENABLE_SIGNALR_SOCKET_CONNECTION;\r\n/**\r\n * This is the first API request we make on any page, which gets the current user. This is used for\r\n * token handling with ADAL as well. This MUST be updated if we ever change the order of our API calls\r\n * throughout the application to be something else besides getting the current user to start.\r\n */\r\n// const FIRST_API_REQUEST_PATH = '/tieout/currentuser';\r\n\r\n// enabling the signalrConfig based on the signalr socket connection with isSignalRForSocketConnectionEnabled as true\r\nconst getConfigForSocketConnection = () => {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n return signalrConfig;\r\n } else {\r\n return socketConfig;\r\n }\r\n};\r\n\r\nlet msalInstance;\r\n\r\nexport const createMSALInstance = () => {\r\n if (!(msalInstance instanceof PublicClientApplication)) {\r\n msalInstance = new PublicClientApplication({\r\n auth: {\r\n clientId:\r\n window.TIEOUT.ENV.GEOS[window.TIEOUT.ENV.CURRENT_GEO].AD_CLIENT,\r\n authority: `${window.TIEOUT.ENV.AD_INSTANCE}${window.TIEOUT.ENV.AD_TENANT}`,\r\n redirectUri: redirectUri,\r\n knownAuthorities: [\r\n `${window.TIEOUT.ENV.AD_INSTANCE}${window.TIEOUT.ENV.AD_TENANT}`,\r\n ],\r\n postLogoutRedirectUri: 'https://www.deloitte.com/',\r\n },\r\n cache: {\r\n cacheLocation: 'sessionStorage',\r\n storeAuthStateInCookie: false,\r\n },\r\n });\r\n }\r\n};\r\n\r\nexport const createAuthContext = (geoKey) => {\r\n createMSALInstance();\r\n const apiClient = {};\r\n\r\n apiClient[geoKey] = getAPIClient(geoKey);\r\n apiClient[geoKey].socketURL = window.TIEOUT.ENV.GEOS[geoKey].BASE_HUB_URL;\r\n\r\n /**\r\n * Here we are intercepting each request and adding the auth token in the header using the\r\n * helper function \"_getAuthTokenForRequestInterceptors\"\r\n */\r\n apiClient[geoKey].api.interceptors.request.use(\r\n async (config) => {\r\n const isLogoutAPI = config.url === LOGOUT_URL;\r\n const token = await _getAuthTokenForRequestInterceptors(\r\n geoKey,\r\n isLogoutAPI,\r\n );\r\n config.headers.Authorization = `Bearer ${token}`;\r\n config.headers['localDate'] = moment();\r\n return config;\r\n },\r\n (error) => {\r\n return Promise.reject(error);\r\n },\r\n );\r\n\r\n /**\r\n * Here we are constructing an interceptor for catching certain response exceptions and handling the refresh of oauth tokens based\r\n * on response error codes.\r\n */\r\n apiClient[geoKey].api.interceptors.response.use(undefined, (err) => {\r\n const { response } = err;\r\n /**\r\n * This boolean is used to track that the user has not submitted multiple requests to the application\r\n * as receiving the same error twice for the same api call implies there is a problem with their session from our\r\n * authentication provider or that they are trying to brute force our authentication setup.\r\n * */\r\n const _isValidResponseAndNotRetry =\r\n response &&\r\n response.config &&\r\n typeof response.config.url === 'string' &&\r\n !response.config.__isRetryRequest;\r\n\r\n /**\r\n * This case covers when we have made the first API request to the back-end (which fetches the current user).\r\n * For some reason it always makes the request without a token, so we receive a 403 - Forbidden response.\r\n * We need to retry with an obtained auth token for all future requests to work.\r\n */\r\n /**\r\n * UPDATE: Commenting this out because this case should never happen since we are adding the bearer token to each\r\n * request using the request interceptor\r\n */\r\n // const _emptyTokenResponseForFirstRequest =\r\n // _isValidResponseAndNotRetry &&\r\n // response.config.url.includes(FIRST_API_REQUEST_PATH) &&\r\n // response.status === FORBIDDEN;\r\n\r\n /**\r\n * This case covers when we have an expired token and try to make an API request. In this case, we receive\r\n * a 401 - UNAUTHORIZED response. We have to refresh our token in this case for further API requests to work.\r\n */\r\n const _tokenTimeOutResponse =\r\n _isValidResponseAndNotRetry && response.status === UNAUTHORIZED;\r\n\r\n /**\r\n * This final case covers when a user has been idle on their computer for an incredibly long time (more than a few hours).\r\n * In this case we receive a 500 - INTERNAL_SERVER_ERROR response with a very specific socket timeout exception message.\r\n * This specific error case is a trigger for us to refresh our authorization token.\r\n */\r\n const _socketTimeOutResponse =\r\n _isValidResponseAndNotRetry &&\r\n response.status === INTERNAL_SERVER_ERROR &&\r\n response.data &&\r\n response.data.rootCause === 'SocketTimeoutException: connect timed out';\r\n\r\n /**\r\n * These cases above are the only error response cases in which we should obtain or refresh our authentication token.\r\n * In every other case we should allow the request (and its response) to fail.\r\n */\r\n const _shouldAcquireToken =\r\n // _emptyTokenResponseForFirstRequest ||\r\n _tokenTimeOutResponse || _socketTimeOutResponse;\r\n\r\n if (_shouldAcquireToken) {\r\n return _acquireToken(err, response, apiClient[geoKey], geoKey);\r\n } else {\r\n return Promise.reject(err);\r\n }\r\n });\r\n return apiClient[geoKey];\r\n};\r\n\r\n/**\r\n * A helper function used to obtain or refresh the token from ADAL used in our application using an implicit-grant oauth flow.\r\n * @param {Object} err : The error response wrapper that we receive from the back-end when we lack a token, or send an invalid one.\r\n * @param {Object} response: The HTTP Response object which contains things like status codes, error messages, etc... from the API.\r\n * @param {Object} apiClient: The api client wrapper that we use to retain tokens and track other responses from the back-end.\r\n */\r\nconst _acquireToken = (err, response, apiClient, geoKey) => {\r\n response.config.__isRetryRequest = true;\r\n // eslint-disable-next-line no-async-promise-executor\r\n return new Promise(async (resolve, reject) => {\r\n const tokenResponse = await handleLoginResponse(geoKey);\r\n const token = tokenResponse.accessToken;\r\n if (!token) {\r\n return;\r\n }\r\n\r\n // eslint-disable-next-line require-atomic-updates\r\n apiClient.api.defaults.headers.common['Authorization'] = `Bearer ${token}`;\r\n // eslint-disable-next-line require-atomic-updates\r\n apiClient.flags.authenticated = true;\r\n // eslint-disable-next-line require-atomic-updates\r\n apiClient.token = token;\r\n err.config.headers.Authorization = `Bearer ${token}`;\r\n getConfigForSocketConnection().autoConnect = true;\r\n axios(err.config).then(resolve, reject);\r\n });\r\n};\r\n\r\nexport const _getAuthTokenForRequestInterceptors = async (\r\n geoKey,\r\n isLogoutAPI = false,\r\n) => {\r\n const tokenResponse = await handleLoginResponse(geoKey, isLogoutAPI);\r\n\r\n getConfigForSocketConnection().autoConnect = true;\r\n return tokenResponse.accessToken;\r\n};\r\n\r\nexport const authenticateAcrossAllGeos = async () => {\r\n return authenticate(window.TIEOUT.ENV.CURRENT_GEO);\r\n};\r\n\r\nexport const authenticate = async (geoKey) => {\r\n // eslint-disable-next-line no-async-promise-executor\r\n return new Promise(async (resolve, reject) => {\r\n if (window !== window.parent) {\r\n return;\r\n }\r\n\r\n const tokenResponse = await handleLoginResponse(geoKey);\r\n const apiClientForGeo = getAPIClient(geoKey);\r\n\r\n if (apiClientForGeo.api)\r\n _authenticateAPI(\r\n apiClientForGeo,\r\n tokenResponse && tokenResponse.accessToken,\r\n // eslint-disable-next-line no-loop-func\r\n () => {\r\n resolve();\r\n },\r\n );\r\n });\r\n};\r\n\r\nasync function handleLoginResponse(geoKey, isLogoutAPI = false) {\r\n if (isLogoutAPI) {\r\n return await handleLogoutResponse(geoKey);\r\n }\r\n let tokenResponse = await msalInstance.handleRedirectPromise();\r\n\r\n console.debug('got token for geo::', geoKey);\r\n let accountObj;\r\n\r\n if (tokenResponse) {\r\n accountObj = tokenResponse.account;\r\n } else {\r\n accountObj = msalInstance.getAllAccounts()[0];\r\n }\r\n\r\n if (accountObj && tokenResponse) {\r\n const resourceId = window.TIEOUT.ENV.GEOS[geoKey].AD_AUD;\r\n const scopes = [resourceId + '/.default'];\r\n try {\r\n tokenResponse = await msalInstance.acquireTokenSilent({\r\n account: msalInstance.getAllAccounts()[0],\r\n scopes: scopes,\r\n });\r\n } catch (err) {\r\n await msalInstance.acquireTokenRedirect({ scopes: scopes });\r\n }\r\n } else {\r\n await msalInstance.loginRedirect();\r\n }\r\n\r\n return tokenResponse;\r\n}\r\n\r\nasync function handleLogoutResponse(geoKey) {\r\n let tokenResponse;\r\n const resourceId = window.TIEOUT.ENV.GEOS[geoKey].AD_AUD;\r\n const scopes = [resourceId + '/.default'];\r\n try {\r\n tokenResponse = await msalInstance.acquireTokenSilent({\r\n account: msalInstance.getAllAccounts()[0],\r\n scopes: scopes,\r\n });\r\n } catch (err) {\r\n await msalInstance.acquireTokenRedirect({ scopes: scopes });\r\n }\r\n return tokenResponse;\r\n}\r\n\r\n// This function will fetch the existing token from cache\r\n// and check if it is valid and return the same (if valid).\r\n// In case token is expired or close to expiry, it (acquireTokenSilent method)\r\n// will silently make an api call to OAuth provider for new access token in exchange of existing refresh token.\r\n// If there is not already existing token/refresh token it will throw error, that essentially make our 'tokenResponse'\r\n// variable null in the catch block. A null value returned for tokenResponse will prevent any further call to BE .\r\nexport async function checkIfExistingTokenIsValidAndFetchNewIfExpired(geoKey) {\r\n let tokenResponse = null;\r\n const resourceId = window.TIEOUT.ENV.GEOS[geoKey].AD_AUD;\r\n const scopes = [resourceId + '/.default'];\r\n try {\r\n // This code will try to parse the token containing in cache/session.\r\n // It will return the token in cache if it is valid else will make an api\r\n // request to get new token from Oauth provider flow\r\n tokenResponse = await msalInstance.acquireTokenSilent({\r\n account: msalInstance.getAllAccounts()[0],\r\n scopes: scopes,\r\n });\r\n } catch (err) {\r\n console.debug(err);\r\n tokenResponse = null;\r\n }\r\n\r\n // it will return null if existing token is null\r\n return tokenResponse && tokenResponse.accessToken;\r\n}\r\n\r\nconst _authenticateAPI = (apiClient, token, callback) => {\r\n if (!apiClient.flags.authenticated) {\r\n if (token) {\r\n apiClient.token = token;\r\n apiClient.flags.authenticated = true;\r\n callback();\r\n }\r\n }\r\n};\r\n\r\n// Handle authentication success\r\nexport const authenticateSuccess = () => {\r\n msalInstance\r\n .handleRedirectPromise()\r\n .then(() => handleLoginResponse(window.TIEOUT.ENV.CURRENT_GEO));\r\n};\r\n\r\nexport const clearAuthData = () => {\r\n sessionStorage.clear();\r\n // createAuthContext();\r\n};\r\n\r\nexport const userLogOut = async (\r\n revisionId,\r\n projectUsersList,\r\n selectedProjectId,\r\n) => {\r\n try {\r\n // This will verify if we are in statement page or any other page.\r\n // Any page other than statement page will not have revisionId and hence we do not want to make\r\n // removeUserFromRoom call for those pages.\r\n Number.isInteger(revisionId) &&\r\n projectUsersList &&\r\n (await removeUserFromRoom({\r\n revisionId,\r\n projectUserIds: Object.keys(projectUsersList),\r\n projectId: selectedProjectId,\r\n }));\r\n const geoKeys = Object.keys(window.TIEOUT.ENV.GEOS);\r\n for (let i = 0; i < geoKeys.length; i++) {\r\n await withDefaultContextAsHomeGeo({\r\n contextKey: CONTEXT_KEY.SELECTED_GEO_CONTEXT,\r\n contextValue: geoKeys[i],\r\n })\r\n .post('/logout', null, {\r\n headers: {\r\n 'Content-Type': undefined,\r\n },\r\n })\r\n .catch((e) => console.error(e));\r\n }\r\n } catch (e) {\r\n console.debug(e);\r\n } finally {\r\n sessionStorage.clear();\r\n }\r\n};\r\n\r\nexport const authContextLogout = (geoKey) => {\r\n msalInstance.logoutRedirect({\r\n account: msalInstance.getAllAccounts()[0],\r\n });\r\n};\r\n","import React from 'react';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { ANNOTATION_DISPLAY_FUNCTIONS } from 'constants/feature/tieout-element-constants';\r\nimport FeatureFlagComponent from 'components/common/feature-flag-component';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\n\r\nexport const hasAnnotations = (elementDetails, isCftEnabled = true) => {\r\n return (\r\n !isNullOrUndefined(elementDetails) &&\r\n (elementDetails.hasInternalReferenceGroup() ||\r\n elementDetails.hasWorkpapers() ||\r\n elementDetails.hasTickmarks() ||\r\n (elementDetails.hasComfortLetters() && isCftEnabled) ||\r\n elementDetails.hasFormula())\r\n );\r\n};\r\n\r\nexport const isElementReportPreviewPage = (url) =>\r\n url.includes(ROUTE_CONSTANTS.REPORT_PREVIEW);\r\n\r\nexport const getAnnotation = (elementDetails) => {\r\n const ELEMENT_BLOCK = 'tieout-element';\r\n return (\r\n
\r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.comfortLetter({\r\n elementDetails,\r\n })}\r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.tickmarks({\r\n elementDetails,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.formula({\r\n elementDetails,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.internalRef({\r\n elementDetails,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.workpaper({\r\n elementDetails,\r\n })}\r\n
\r\n );\r\n};\r\n\r\nexport const getElementHighlightStatus = ({\r\n elementDetails,\r\n isElementSelected,\r\n isElementHighlighted,\r\n isPreviewPage = false,\r\n showElementStatusAndFlag = true,\r\n blacklineViewMode,\r\n}) => {\r\n if (isNullOrUndefined(elementDetails)) {\r\n return {\r\n isReviewed: false,\r\n isVerified: false,\r\n isUnverified: false,\r\n isSelected: false,\r\n };\r\n }\r\n isElementSelected =\r\n typeof isElementSelected === 'function'\r\n ? isElementSelected()\r\n : isElementSelected;\r\n let isReviewed =\r\n elementDetails.isReviewed() && !isElementSelected && !isElementHighlighted;\r\n let isVerified =\r\n elementDetails.isVerified() && !isElementSelected && !isElementHighlighted;\r\n let isUnverified = !(\r\n elementDetails.isReviewed() ||\r\n elementDetails.isVerified() ||\r\n isElementSelected ||\r\n isElementHighlighted\r\n );\r\n\r\n if (isPreviewPage || blacklineViewMode) {\r\n isReviewed = showElementStatusAndFlag ? isReviewed : false;\r\n isVerified = showElementStatusAndFlag ? isVerified : false;\r\n isUnverified = showElementStatusAndFlag ? isUnverified : false;\r\n return {\r\n isReviewed,\r\n isVerified,\r\n isUnverified,\r\n isSelected: isElementSelected,\r\n isHighlighted: isElementHighlighted,\r\n };\r\n } else {\r\n return {\r\n isReviewed,\r\n isVerified,\r\n isUnverified,\r\n isSelected: isElementSelected,\r\n isHighlighted: isElementHighlighted,\r\n };\r\n }\r\n};\r\n\r\nexport const getCssModifierForView = (\r\n url,\r\n blacklineViewMode,\r\n blacklineViewShowElementMode,\r\n) => {\r\n if (blacklineViewMode && blacklineViewShowElementMode) {\r\n return 'blackline-view';\r\n }\r\n if (isElementReportPreviewPage(url)) {\r\n return 'report-preview';\r\n }\r\n return 'default';\r\n};\r\n\r\nexport const getCalloutPosition = ({\r\n position,\r\n polygonInPixel,\r\n canvasHeight,\r\n canvasWidth,\r\n offsetHeight,\r\n offsetWidth,\r\n elementId,\r\n isPreviewPage,\r\n}) => {\r\n let callout = {};\r\n const [x1, y1, , , x3, y3] = polygonInPixel;\r\n const topLeftYCoordinate = y1;\r\n const topLeftXCoordinate = x1;\r\n const bottomLeftYCoordinate = y3;\r\n const bottomLeftXCoordinate = x3;\r\n const verticleMidPointOfElement = (y3 - y1) / 2;\r\n const horizontalMidPointOfElement = (x3 - x1) / 2;\r\n const arrowPadding = 3;\r\n const spacePadding = isPreviewPage ? -1.8 : 2;\r\n\r\n switch (position) {\r\n case 'left':\r\n callout = {\r\n bottom: `${\r\n canvasHeight -\r\n topLeftYCoordinate -\r\n (offsetHeight && Object.keys(offsetHeight).length > 0\r\n ? offsetHeight[elementId]\r\n : 0) /\r\n 2 -\r\n verticleMidPointOfElement\r\n }px`,\r\n right: `${\r\n canvasWidth - topLeftXCoordinate + arrowPadding + spacePadding\r\n }px`,\r\n };\r\n break;\r\n case 'right':\r\n callout = {\r\n bottom: `${\r\n canvasHeight -\r\n topLeftYCoordinate -\r\n (offsetHeight && Object.keys(offsetHeight).length > 0\r\n ? offsetHeight[elementId]\r\n : 0) /\r\n 2 -\r\n verticleMidPointOfElement\r\n }px`,\r\n right: `${canvasWidth - bottomLeftXCoordinate - arrowPadding - 2}px`,\r\n };\r\n break;\r\n case 'top':\r\n callout = {\r\n bottom: `${\r\n canvasHeight - topLeftYCoordinate + arrowPadding + spacePadding\r\n }px`,\r\n right: `${\r\n canvasWidth -\r\n topLeftXCoordinate -\r\n (offsetWidth && Object.keys(offsetWidth).length > 0\r\n ? offsetWidth[elementId]\r\n : 0) /\r\n 2 -\r\n horizontalMidPointOfElement\r\n }px`,\r\n };\r\n break;\r\n case 'bottom':\r\n callout = {\r\n bottom: `${\r\n canvasHeight -\r\n bottomLeftYCoordinate -\r\n offsetHeight[elementId] -\r\n arrowPadding -\r\n spacePadding\r\n }px`,\r\n right: `${\r\n canvasWidth -\r\n topLeftXCoordinate -\r\n (offsetWidth && Object.keys(offsetWidth).length > 0\r\n ? offsetWidth[elementId]\r\n : 0) /\r\n 2 -\r\n horizontalMidPointOfElement\r\n }px`,\r\n };\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n return callout;\r\n};\r\nexport const getShowCalloutValue = (elementData, annotationDisplayFilter) => {\r\n if (isNullOrUndefined(elementData)) {\r\n return true;\r\n }\r\n const annotationsConfig = {\r\n tickmarks: elementData.hasTickmarks(),\r\n formula: elementData.hasFormula(),\r\n internalRef: elementData.hasInternalReferenceGroup(),\r\n workpaper: elementData.hasWorkpapers(),\r\n comfortLetter: elementData.hasComfortLetters(),\r\n };\r\n const enabled = {};\r\n let disabledCount = 0;\r\n\r\n for (const [key, value] of Object.entries(annotationsConfig || {})) {\r\n if (value) {\r\n enabled[key] = value;\r\n }\r\n }\r\n const enabledKeys = Object.keys(enabled);\r\n\r\n enabledKeys.forEach((annotation) => {\r\n if (!annotationDisplayFilter[annotation]) {\r\n disabledCount += 1;\r\n }\r\n });\r\n return !(disabledCount === enabledKeys.length);\r\n};\r\n\r\nexport const getMarkerPosition = ({\r\n position,\r\n polygonInPixel,\r\n canvasHeight,\r\n}) => {\r\n let marker = {};\r\n const [x1, y1, , , x3, y3] = polygonInPixel;\r\n\r\n const topLeftYCoordinate = y1;\r\n const topLeftXCoordinate = x1;\r\n const bottomLeftYCoordinate = y3;\r\n const bottomLeftXCoordinate = x3;\r\n const verticleMidPointOfElement = (y3 - y1) / 2;\r\n const horizontalMidPointOfElement = (x3 - x1) / 2;\r\n const markerWidth = 7;\r\n const markerPadding = 3;\r\n const markerHeight = 2;\r\n const spacePadding = 3;\r\n\r\n switch (position) {\r\n case 'left':\r\n marker = {\r\n bottom: `${\r\n canvasHeight -\r\n topLeftYCoordinate -\r\n verticleMidPointOfElement -\r\n markerPadding\r\n }px`,\r\n left: `${topLeftXCoordinate - markerWidth - spacePadding}px`,\r\n };\r\n break;\r\n case 'top':\r\n marker = {\r\n bottom: `${canvasHeight - topLeftYCoordinate - markerHeight}px`,\r\n left: `${\r\n topLeftXCoordinate +\r\n horizontalMidPointOfElement -\r\n markerWidth / 2 -\r\n markerHeight\r\n }px`,\r\n };\r\n break;\r\n case 'right':\r\n marker = {\r\n bottom: `${\r\n canvasHeight -\r\n topLeftYCoordinate -\r\n verticleMidPointOfElement -\r\n markerPadding\r\n }px`,\r\n left: `${bottomLeftXCoordinate - markerHeight}px`,\r\n };\r\n break;\r\n case 'bottom':\r\n marker = {\r\n bottom: `${\r\n canvasHeight - bottomLeftYCoordinate - markerWidth - spacePadding\r\n }px`,\r\n left: `${\r\n topLeftXCoordinate +\r\n horizontalMidPointOfElement -\r\n markerWidth / 2 -\r\n markerHeight\r\n }px`,\r\n };\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n return marker;\r\n};\r\n\r\nexport const getInitialCalloutVisibilityDetails = (\r\n config,\r\n annotationDisplayFilter,\r\n) => {\r\n const displayMarker = annotationDisplayFilter.showAll ? false : config.marker;\r\n const displayCallout = annotationDisplayFilter.showAll\r\n ? true\r\n : config.callout;\r\n const displayAnnotation = annotationDisplayFilter.showAll\r\n ? true\r\n : config.display;\r\n\r\n return { displayMarker, displayCallout, displayAnnotation };\r\n};\r\n\r\nexport const getCalloutVisibilityDetails = (\r\n calloutVisibilityDetails,\r\n annotationsConfig,\r\n annotationDisplayFilter,\r\n) => {\r\n const enabled = {};\r\n let disabledCount = 0;\r\n let displayMarker = calloutVisibilityDetails.displayMarker;\r\n let displayCallout = calloutVisibilityDetails.displayCallout;\r\n let displayAnnotation = calloutVisibilityDetails.displayAnnotation;\r\n\r\n for (const [key, value] of Object.entries(annotationsConfig || {})) {\r\n if (value) {\r\n enabled[key] = value;\r\n }\r\n }\r\n\r\n const enabledKeys = Object.keys(enabled);\r\n\r\n enabledKeys.forEach((annotation) => {\r\n if (!annotationDisplayFilter[annotation]) {\r\n disabledCount += 1;\r\n }\r\n });\r\n\r\n if (disabledCount === enabledKeys.length) {\r\n displayMarker = true;\r\n displayCallout = false;\r\n displayAnnotation = false;\r\n }\r\n\r\n return {\r\n displayMarker,\r\n displayCallout,\r\n displayAnnotation,\r\n };\r\n};\r\n","import { getStatementIdUtil } from 'utils/statement-export-utils';\r\nimport { withDefaultContextAsProject } from 'api/api-default-context';\r\n\r\nexport const createProjectEntityRequest = ({\r\n projectId,\r\n revisionId,\r\n entity,\r\n contextKey,\r\n}) => {\r\n return withDefaultContextAsProject({ contextKey }, projectId)\r\n .post(\r\n `/tieout/client/${parseInt(\r\n projectId,\r\n )}/statements/${getStatementIdUtil()}/revision/${revisionId}/entity/${entity}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { getMultipleElementsFromCache } from './element-cache-actions';\r\nimport {\r\n clearSelectedElementsContentPanel,\r\n fetchClientEntityList,\r\n selectMultipleElementsContentPanel,\r\n} from './statement-content-actions';\r\nimport { updateCacheWithMostRecentElementChanges } from './element-changes-since-tracker-actions';\r\nimport {\r\n showBatchPanelAction,\r\n hideBatchPanelAction,\r\n} from './panel-controller-actions';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport { fetchStatementSummaryElements } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport { createProjectEntityRequest } from 'api/create-project-entity-api';\r\nimport {\r\n updateElementsSearchByIds,\r\n removeIdFromBatchSelectedItemsAction,\r\n addIdToBatchSelectedItemsAction,\r\n} from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport { fetchSectionHTMLSegmentsStatementContent } from 'store/actions/statement-content-actions';\r\nimport { batchMaxAmountNotification } from 'constants/feature/batch-panel-constants';\r\nimport { clearBatchModeSelected } from './modes-actions';\r\nimport { getMaxElementForBatchUpdateLimit } from 'utils/statement-content-page-utils';\r\n\r\nexport const setBatchSelectedElementsLoading = createAction(\r\n 'BATCH_ELEMENTS_LOADING',\r\n);\r\n\r\nexport const appendBatchSelectedElementsLoaded = createAction(\r\n 'BATCH_APPEND_ELEMENTS_LOADED',\r\n);\r\nexport const setBatchSelectedElementsError = createAction(\r\n 'BATCH_ELEMENTS_ERROR',\r\n);\r\n\r\nexport const clearBatchSelectedElementsAction = createAction(\r\n 'BATCH_CLEAR_SELECTED_ELEMENTS',\r\n);\r\n\r\nexport const addElementToBatchSelectionAction = createAction(\r\n 'BATCH_ADD_ELEMENT_TO',\r\n);\r\n\r\nexport const removeElementFromBatchSelectionAction = createAction(\r\n 'BATCH_REMOVE_ELEMENT',\r\n);\r\n\r\nexport const batchElementUpdateSuccessAction = createAction(\r\n 'BATCH_ELEMENTS_UPDATE_SUCCESS',\r\n);\r\n\r\nexport const createProjectEntityError = createAction(\r\n 'CREATE_PROJECT_ENTITY_ERROR',\r\n);\r\n\r\nexport const createProjectEntityLoading = createAction(\r\n 'CREATE_PROJECT_ENTITY_LOADING',\r\n);\r\n\r\nexport const updateSelectedBatchElementsFromSocketAction = createAction(\r\n 'UPDATE_SELECTED_BATCH_ELEMENTS_FROM_SOCKET_ACTION',\r\n);\r\n\r\nexport const removeBatchElementsFromSocketPayloadAction = createAction(\r\n 'REMOVE_BATCH_ELEMENTS_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nconst _handleBatchAddWithElementAlreadySelected =\r\n () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n },\r\n },\r\n data: {\r\n statementContent: { elementCache },\r\n elementPanel: { elementDetails },\r\n },\r\n } = getState();\r\n if (right === RIGHT_PANELS.ELEMENT) {\r\n // with element panel open + batch click, switch to batch panel with that element selected\r\n let element =\r\n elementDetails &&\r\n // getElement method inside section-cache model mandatorily needs elementID to get element details.\r\n // if sectionId is null then it will search in all the sections present in the cache.\r\n elementDetails.id &&\r\n elementCache.getElement({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\r\n });\r\n element &&\r\n dispatch(\r\n addElementToBatchSelectionAction({\r\n element,\r\n }),\r\n );\r\n }\r\n };\r\n\r\nexport const clickElementInContentWhileBatch =\r\n ({ elementId, sectionId }) =>\r\n (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n statementNavigatorPanel: { elementSearchResults },\r\n },\r\n },\r\n data: {\r\n statementContent: { elementCache },\r\n batchPanel: { batchElementList },\r\n },\r\n } = getState();\r\n const batchElementsAmount = batchElementList.selectedElementIds.length;\r\n if (batchElementsAmount + 1 <= getMaxElementForBatchUpdateLimit()) {\r\n dispatch(_handleBatchAddWithElementAlreadySelected());\r\n }\r\n\r\n if (right !== RIGHT_PANELS.BATCH) {\r\n dispatch(showBatchPanelAction());\r\n }\r\n if (batchElementList.hasElement(elementId)) {\r\n dispatch(removeElementFromBatchSelectionAction({ elementId }));\r\n //removes the id from the batch selected items from the filtered elements list\r\n dispatch(removeIdFromBatchSelectedItemsAction(elementId));\r\n } else {\r\n if (batchElementsAmount + 1 <= getMaxElementForBatchUpdateLimit()) {\r\n if (elementCache.getElement({ elementId })) {\r\n dispatch(\r\n addElementToBatchSelectionAction({\r\n element: elementCache.getElement({ elementId, sectionId }),\r\n }),\r\n );\r\n if (\r\n elementSearchResults.elements &&\r\n elementSearchResults.hasElement(\r\n typeof elementId === 'string' ? parseInt(elementId) : elementId,\r\n )\r\n ) {\r\n dispatch(addIdToBatchSelectedItemsAction(elementId));\r\n }\r\n } else {\r\n // Try and get this element from element search result if not in elementcache\r\n dispatch(\r\n addElementToBatchSelectionAction({\r\n element: elementSearchResults.getElement({ elementId }),\r\n }),\r\n );\r\n if (\r\n elementSearchResults.elements &&\r\n elementSearchResults.hasElement(\r\n typeof elementId === 'string' ? parseInt(elementId) : elementId,\r\n )\r\n ) {\r\n dispatch(addIdToBatchSelectedItemsAction(elementId));\r\n }\r\n }\r\n } else {\r\n batchMaxAmountNotification();\r\n }\r\n }\r\n };\r\n\r\nexport const clickElementSearchEntryWhileRange =\r\n ({ element }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: {\r\n batchPanel: {\r\n batchElementList: { selectedElementIds },\r\n },\r\n },\r\n ui: {\r\n statementPage: {\r\n statementNavigatorPanel: { elementSearchResults },\r\n panels: { right },\r\n },\r\n },\r\n } = getState();\r\n\r\n if (!right !== RIGHT_PANELS.BATCH) {\r\n dispatch(showBatchPanelAction());\r\n }\r\n\r\n const firstElIndex = elementSearchResults.selectedIndex;\r\n const secondElIndex = elementSearchResults.elements.indexOf(element);\r\n let selectedElementRange = elementSearchResults.elements.slice(\r\n firstElIndex,\r\n secondElIndex + 1,\r\n );\r\n if (firstElIndex > secondElIndex) {\r\n selectedElementRange = elementSearchResults.elements.slice(\r\n secondElIndex,\r\n firstElIndex + 1,\r\n );\r\n }\r\n if (\r\n selectedElementIds.length + selectedElementRange.length <=\r\n getMaxElementForBatchUpdateLimit()\r\n ) {\r\n dispatch(\r\n selectMultipleElementsContentPanel({\r\n elementIds: selectedElementRange.map((el) => el.id),\r\n }),\r\n );\r\n\r\n dispatch(\r\n appendBatchSelectedElementsLoaded({\r\n selectedElements: selectedElementRange,\r\n }),\r\n );\r\n } else {\r\n batchMaxAmountNotification();\r\n }\r\n };\r\n\r\nexport const batchAddElementsToBatch =\r\n ({ elements }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: {\r\n batchPanel: {\r\n batchElementList: { selectedElementIds },\r\n },\r\n },\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n },\r\n },\r\n } = getState();\r\n if (selectedElementIds.length + 1 <= getMaxElementForBatchUpdateLimit()) {\r\n dispatch(_handleBatchAddWithElementAlreadySelected());\r\n }\r\n if (\r\n selectedElementIds.length + elements.length <=\r\n getMaxElementForBatchUpdateLimit()\r\n ) {\r\n // always select all the elements in the content panel\r\n dispatch(\r\n selectMultipleElementsContentPanel({\r\n elementIds: elements.map((el) => el.elementId),\r\n }),\r\n );\r\n if (!right !== RIGHT_PANELS.BATCH) {\r\n dispatch(showBatchPanelAction());\r\n }\r\n const selectedElements = await dispatch(\r\n getMultipleElementsFromCache({\r\n elements,\r\n loadingAction: setBatchSelectedElementsLoading,\r\n }),\r\n );\r\n dispatch(appendBatchSelectedElementsLoaded({ selectedElements }));\r\n } else {\r\n batchMaxAmountNotification();\r\n }\r\n };\r\n\r\nexport const addElementsToBatchFromElementsFilter =\r\n (elements) => async (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n },\r\n },\r\n } = getState();\r\n if (!right !== RIGHT_PANELS.BATCH) {\r\n dispatch(showBatchPanelAction());\r\n }\r\n dispatch(\r\n selectMultipleElementsContentPanel({\r\n elementIds: elements.map((el) => el.id),\r\n }),\r\n );\r\n dispatch(appendBatchSelectedElementsLoaded({ selectedElements: elements }));\r\n };\r\nexport const removeFilteredElementsFromBatch =\r\n (elements) => async (dispatch, getState) => {\r\n const {\r\n data: {\r\n batchPanel: { batchElementList },\r\n },\r\n ui: {\r\n statementPage: {\r\n statementNavigatorPanel: {\r\n elementSearchResults: { batchSelectedItemsIds },\r\n },\r\n panels: { right },\r\n },\r\n },\r\n } = getState();\r\n if (\r\n right === RIGHT_PANELS.BATCH &&\r\n Object.keys(batchSelectedItemsIds).length ===\r\n batchElementList.selectedElementIds.length\r\n ) {\r\n dispatch(hideBatchPanelAction());\r\n }\r\n dispatch(removeBatchElementsFromSocketPayloadAction(elements));\r\n };\r\n\r\nexport const cancelBatchUpdatePanel = () => (dispatch, getState) => {\r\n dispatch(clearBatchSelectedElementsAction());\r\n dispatch(hideBatchPanelAction());\r\n dispatch(clearSelectedElementsContentPanel());\r\n dispatch(clearBatchModeSelected());\r\n};\r\n\r\nexport const handleBatchUpdateSuccess =\r\n ({ elementIds, revisionId, updateModel }) =>\r\n (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const {\r\n selectedProject: { project },\r\n selectedStatement,\r\n } = storeData;\r\n const { selectedElementsMap } = getState().data.batchPanel.batchElementList;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n // get updated elements for cache\r\n // rely on these methods of updaing the ui if the client fails to connect to signalr\r\n if (socketHasBeenDisconnected) {\r\n dispatch(updateCacheWithMostRecentElementChanges()); // calll this\r\n dispatch(updateElementsSearchByIds({ elementIds }));\r\n }\r\n\r\n //get updated entity list\r\n dispatch(fetchClientEntityList(project.id));\r\n\r\n // clean up batch panel redux state\r\n dispatch(clearBatchSelectedElementsAction());\r\n dispatch(hideBatchPanelAction());\r\n\r\n // initiate actions to highlight successfully batch updated elements\r\n dispatch(\r\n batchElementUpdateSuccessAction({\r\n elementIds,\r\n }),\r\n );\r\n\r\n // fire action to update statement summary if needed\r\n if (\r\n updateModel.shouldRefreshStatementSummary &&\r\n socketHasBeenDisconnected\r\n ) {\r\n dispatch(\r\n fetchStatementSummaryElements({ revisionId, withoutLoading: true }),\r\n );\r\n }\r\n\r\n /** We need the sectionIds of currently selected elements to reload statement content */\r\n const sectionIds = Object.values(selectedElementsMap).map(\r\n (element) => element.sectionId,\r\n );\r\n\r\n if (!selectedStatement.isOCR) {\r\n if (socketHasBeenDisconnected) {\r\n dispatch(\r\n fetchSectionHTMLSegmentsStatementContent({\r\n sectionIdList: Array.from(new Set(sectionIds)),\r\n }),\r\n );\r\n }\r\n\r\n /** Set one time click event listener to clear green selected elements after\r\n * successful batch update\r\n */\r\n document.addEventListener(\r\n 'click',\r\n (e) => {\r\n !e.ctrlKey && dispatch(clearSelectedElementsContentPanel());\r\n },\r\n {\r\n once: true,\r\n },\r\n );\r\n }\r\n };\r\n\r\nexport const createEntity = (entity) => async (dispatch, getState) => {\r\n const { project } = getState().data.selectedProject;\r\n dispatch(createProjectEntityLoading());\r\n try {\r\n await createProjectEntityRequest({\r\n projectId: project.id,\r\n revisionId: entity.revisionId,\r\n entity: entity.entitySearch,\r\n });\r\n dispatch(fetchClientEntityList(project.id));\r\n } catch (error) {\r\n dispatch(createProjectEntityError(project.id));\r\n }\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n getWorkpapersForRevisionRequest,\r\n deleteWorkpaperRequest,\r\n detachElementWorkpaperRequest,\r\n} from 'api/workpaper-api';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\nimport { updateCacheWithMostRecentElementChanges } from 'store/actions/element-changes-since-tracker-actions';\r\nimport { getElementsByWorkpaperReference } from 'api/element-api';\r\nimport {\r\n elementWorkpaperListLoading,\r\n getElementWorkpapersAndUpdateElementCacheWithParameters,\r\n} from 'store/actions/element-panel-actions';\r\n\r\nexport const workpaperToolkitListLoading = createAction(\r\n 'WORKPAPER_TOOLKIT_LIST_LOADING',\r\n);\r\nexport const workpaperToolkitListLoaded = createAction(\r\n 'WORKPAPER_TOOLKIT_LIST_LOADED',\r\n);\r\nexport const workpaperToolkitListError = createAction(\r\n 'WORKPAPER_TOOLKIT_LIST_ERROR',\r\n);\r\nexport const deleteWorkpaperError = createAction('DELETE_WORKPAPER_ERROR');\r\nexport const fetchElementsFromWorkpaperAction = createAction(\r\n 'FETCH_ELEMENTS_FROM_WORKPAPER',\r\n);\r\nexport const clearWorkpaperElementsAction = createAction(\r\n 'CLEAR_ELEMENTS_FROM_WORKPAPER',\r\n);\r\nexport const updateWorkpaperElementsMapAction = createAction(\r\n 'UPDATE_WORKPAPER_ELEMENTS_MAP_ACTION',\r\n);\r\nexport const updateWorkpaperElementsMapFromArrayAction = createAction(\r\n 'UPDATE_WORKPAPER_ELEMENTS_MAP_FROM_ARRAY_ACTION',\r\n);\r\n\r\nexport const removeWorkpaperFromElementsMapAction = createAction(\r\n 'REMOVE_WORKPAPER_FROM_ELEMENTS_MAP_ACTION',\r\n);\r\nexport const unlinkElementFromElementsMapAction = createAction(\r\n 'UNLINK_ELEMENT_FROM_ELEMENTS_MAP_ACTION',\r\n);\r\n\r\nexport const removeElementsFromElementsMapWithSocketPayloadAction = createAction(\r\n 'REMOVE_ELEMENTS_FROM_ELEMENTS_MAP_WITH_SOCKET_PAYLOAD_ACTION',\r\n);\r\nexport const addWorkpaperToDeletedArrayAction = createAction(\r\n 'ADD_TICKMARK_TO_DELETED_ARRAY_ACTION',\r\n);\r\nexport const removeElementFromElementsMapAction = createAction(\r\n 'REMOVE_ELEMENT_FROM_ELEMENTS_MAP_ACTION',\r\n);\r\nexport const addWorkpaperToListAction = createAction(\r\n 'ADD_WORKPAPER_TO_LIST_ACTION',\r\n);\r\nexport const unlinkWorkpaperFromElementWithWebsocketPayload = createAction(\r\n 'UNLINK_WORKPAPER_FROM_ELEMENT_WITH_WEBSOCKET_PAYLOAD',\r\n);\r\n\r\nexport const updateWorkpaperWithSocketPayloadAction = createAction(\r\n 'UPDATE_WORKPAPER_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const deleteWorkpaperWithSocketPayloadAction = createAction(\r\n 'DELETE_WORKPAPER_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const fetchWorkpaperListForRevisionWithoutLoading = ({\r\n revisionId,\r\n}) => async (dispatch, getState) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.WORKPAPER) return;\r\n try {\r\n const response = await getWorkpapersForRevisionRequest({ revisionId });\r\n dispatch(workpaperToolkitListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(workpaperToolkitListError(error));\r\n }\r\n};\r\n\r\nexport const fetchWorkpaperListForRevision = ({ revisionId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.WORKPAPER) return;\r\n dispatch(workpaperToolkitListLoading());\r\n await dispatch(fetchWorkpaperListForRevisionWithoutLoading({ revisionId }));\r\n};\r\n\r\nexport const deleteWorkpaper = ({ workpaper }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n\r\n dispatch(addWorkpaperToDeletedArrayAction(workpaper.workpaperRefId));\r\n await deleteWorkpaperRequest({ workpaper });\r\n const { id: revisionId } = getState().data.revision;\r\n if (socketHasBeenDisconnected) {\r\n dispatch(fetchWorkpaperListForRevisionWithoutLoading({ revisionId }));\r\n dispatch(updateCacheWithMostRecentElementChanges());\r\n }\r\n};\r\n\r\nexport const fetchElementsFromWorkpaper = ({ revisionId, wpRefId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.WORKPAPER) return;\r\n try {\r\n const response = await getElementsByWorkpaperReference({\r\n revisionId,\r\n wpRefId,\r\n });\r\n dispatch(\r\n fetchElementsFromWorkpaperAction({\r\n response: response,\r\n wpRefId: wpRefId,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(workpaperToolkitListError(error));\r\n }\r\n};\r\n\r\nexport const clearElementsFromWorkpaper = () => (dispatch) => {\r\n try {\r\n dispatch(clearWorkpaperElementsAction());\r\n } catch (error) {\r\n dispatch(workpaperToolkitListError(error));\r\n }\r\n};\r\n\r\nexport const removeElementFromElementsMap = ({ elementId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.WORKPAPER) return;\r\n const { id: revisionId } = getState().data.revision;\r\n\r\n try {\r\n await dispatch(fetchWorkpaperListForRevisionWithoutLoading({ revisionId }));\r\n dispatch(removeElementFromElementsMapAction(elementId));\r\n } catch (error) {\r\n dispatch(workpaperToolkitListError(error));\r\n }\r\n};\r\n\r\nexport const unlinkElementFromWorkpaperElementsList = ({\r\n revisionId,\r\n wpRefId,\r\n elementId,\r\n sectionId,\r\n}) => async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n\r\n try {\r\n dispatch(elementWorkpaperListLoading());\r\n await detachElementWorkpaperRequest({\r\n elementId,\r\n revisionId,\r\n workpaperId: wpRefId,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n await dispatch(\r\n getElementWorkpapersAndUpdateElementCacheWithParameters({\r\n elementId,\r\n sectionId,\r\n }),\r\n );\r\n dispatch(\r\n fetchElementsFromWorkpaper({\r\n revisionId,\r\n wpRefId,\r\n }),\r\n );\r\n dispatch(fetchWorkpaperListForRevisionWithoutLoading({ revisionId }));\r\n }\r\n } catch (error) {\r\n dispatch(workpaperToolkitListError(error));\r\n }\r\n};\r\n\r\nexport const removeWorkpaperFromElementsMapStore = ({ wpRefId }) => (\r\n dispatch,\r\n) => {\r\n dispatch(removeWorkpaperFromElementsMapAction(wpRefId));\r\n};\r\n\r\nexport const updateWorkpaperElementsMap = ({ response }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.WORKPAPER) return;\r\n const updatedElementsArray = response.data.result\r\n ? response.data.result.elementEntityList[0]\r\n : response;\r\n if (response && updatedElementsArray) {\r\n dispatch(updateWorkpaperElementsMapAction(updatedElementsArray));\r\n }\r\n};\r\nexport const updateWorkpaperElementsMapFromArray = ({\r\n elementsArray,\r\n}) => async (dispatch, getState) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.WORKPAPER) return;\r\n if (elementsArray) {\r\n dispatch(updateWorkpaperElementsMapFromArrayAction(elementsArray));\r\n }\r\n};\r\n\r\nexport const unlinkElementFromElementsMap = ({ elementId, wpRefId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.WORKPAPER) return;\r\n const { id: revisionId } = getState().data.revision;\r\n try {\r\n await dispatch(fetchWorkpaperListForRevisionWithoutLoading({ revisionId }));\r\n dispatch(\r\n unlinkElementFromElementsMapAction({\r\n elementId: elementId,\r\n wpRefId: wpRefId,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(workpaperToolkitListError(error));\r\n }\r\n};\r\n","import TabModel from 'models/utils/common/tab-model';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport Permissions from 'permissions/permissions';\r\nimport RoleUtil from 'permissions/utils/roles';\r\nexport const CONTENT_MAX_SEARCH_RESULTS = 500;\r\n\r\nexport const STATEMENT_NAV_HEADING_ACTION_DROPDOWN_EDIT_OPTION = 'edit';\r\nexport const STATEMENT_NAV_HEADING_ACTION_DROPDOWN_BULK_ASSIGN_OPTION =\r\n 'bulk-assign';\r\n\r\nexport const STATEMENT_NAV_TABS = {\r\n pages: new TabModel({\r\n id: 'statement-nav-pages-tab',\r\n intlTitle: 'statement-nav-panel.tab.pages.title',\r\n }),\r\n headings: new TabModel({\r\n id: 'statement-nav-headings-tab',\r\n intlTitle: 'statement-nav-panel.tab.headings.title',\r\n }),\r\n elements: new TabModel({\r\n id: 'statement-nav-elements-tab',\r\n intlTitle: 'statement-nav-panel.tab.elements.title',\r\n }),\r\n content: new TabModel({\r\n id: 'statement-nav-content-tab',\r\n intlTitle: 'statement-nav-panel.tab.content.title',\r\n }),\r\n bookmarks: new TabModel({\r\n id: 'statement-nav-headings-tab',\r\n intlTitle: 'statement-nav-panel.tab.headings.title',\r\n }),\r\n};\r\n\r\nexport const getStatementNavHeadingActionDropdown = (\r\n selectedStatement,\r\n selectedProjectId,\r\n) => ({\r\n edit: new MenuOption({\r\n id: 'statement-nav-heading-dropdown-option-1',\r\n title: 'common.edit',\r\n value: STATEMENT_NAV_HEADING_ACTION_DROPDOWN_EDIT_OPTION,\r\n isIntl: true,\r\n disabled:\r\n RoleUtil.doesUserHaveObserverRoleForProject() ||\r\n RoleUtil.doesUserHaveCoeRoleForProject() ||\r\n RoleUtil.doesUserHaveAdminSupportAccess(),\r\n }),\r\n bulkAssign: new MenuOption({\r\n id: 'statement-nav-heading-dropdown-option-2',\r\n title: 'statement-nav-heading-action-dropdown.bulk.assign',\r\n value: STATEMENT_NAV_HEADING_ACTION_DROPDOWN_BULK_ASSIGN_OPTION,\r\n isIntl: true,\r\n disabled:\r\n (selectedStatement && selectedStatement.isReadOnly()) ||\r\n (selectedProjectId &&\r\n !Permissions.Section.canAssignSection(selectedProjectId)),\r\n }),\r\n});\r\n\r\nexport const getStatementNavHeadingActionDropdownValues = (\r\n selectedStatement,\r\n selectedProjectId,\r\n) =>\r\n Object.values(\r\n getStatementNavHeadingActionDropdown(selectedStatement, selectedProjectId),\r\n );\r\n\r\nexport const STATEMENT_NAV_TABS_ARRAY = Object.values(STATEMENT_NAV_TABS);\r\n\r\nexport const getOcrNavigationTabs = (isOcrStatement) => {\r\n const commonTabs = [STATEMENT_NAV_TABS.elements, STATEMENT_NAV_TABS.content];\r\n return isOcrStatement\r\n ? [STATEMENT_NAV_TABS.pages, ...commonTabs]\r\n : [STATEMENT_NAV_TABS.headings, ...commonTabs];\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Starting-Components\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG-TieOut-|-Starting-Components\",\n transform: \"translate(-2277.000000, -2367.000000)\",\n fill: \"#757575\",\n fillRule: \"nonzero\"\n}, React.createElement(\"path\", {\n d: \"M2304.75046,2393.28723 L2295.41066,2383.94743 C2298.91163,2379.66672 2298.44082,2373.39268 2294.3402,2369.68241 C2290.23957,2365.97214 2283.94985,2366.12921 2280.03953,2370.03953 C2276.12921,2373.94985 2275.97214,2380.23957 2279.68241,2384.3402 C2283.39268,2388.44082 2289.66672,2388.91163 2293.94743,2385.41066 L2303.28723,2394.75046 C2303.69897,2395.10307 2304.31273,2395.07936 2304.69604,2394.69604 C2305.07936,2394.31273 2305.10307,2393.69897 2304.75046,2393.28723 Z M2287.40957,2385.72199 C2282.82448,2385.72199 2279.10753,2382.00504 2279.10753,2377.41995 C2279.10753,2372.83486 2282.82448,2369.11791 2287.40957,2369.11791 C2291.99466,2369.11791 2295.71161,2372.83486 2295.71161,2377.41995 C2295.71161,2379.62179 2294.83694,2381.73344 2293.28,2383.29038 C2291.72307,2384.84731 2289.61141,2385.72199 2287.40957,2385.72199 Z\",\n id: \"search\"\n})));\n\nvar SvgSearch = function SvgSearch(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgSearch, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/search.c9985944.svg\";\nexport { ForwardRef as ReactComponent };","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { memo, useRef } from 'react';\r\nimport { injectIntl, FormattedMessage } from 'react-intl';\r\n\r\nimport FormItem from 'components/common/form-item-component';\r\nimport Menu, {\r\n ApiMenu,\r\n TableApiMenu,\r\n ApiMenuWithCreate,\r\n} from 'components/common/menu-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nimport { DrawerActionHandler } from 'components/util/drawer-action-handler-component';\r\n\r\nimport { ReactComponent as ClearButton } from 'icons/close-button.svg';\r\nimport { ReactComponent as SearchButton } from 'icons/search.svg';\r\nimport { ReactComponent as ArrowDown } from 'icons/arrow-simple-thick-down.svg';\r\n\r\nimport MenuApiData from 'models/utils/common/menu/menu-api-data-model';\r\nimport {\r\n DataGridDataApi,\r\n DataGridColumn,\r\n} from 'components/common/data-grid/data-grid-component';\r\nimport {\r\n ENTER_KEY_CODE,\r\n SPACEBAR_KEY_CODE,\r\n} from 'constants/util/key-code-constants';\r\nimport { isSearchCharLengthValid } from 'constants/util/search-utility';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { useState } from 'react';\r\n\r\nconst SEARCH_BLOCK = 'search';\r\nconst NO_RESULT_FOUND_MESSAGE = 'common.search.no-results';\r\nconst SEARCH_CLOSE_ICON_SIZE = '28px';\r\nconst SEARCH_ICON_SIZE = '20px';\r\nconst ARROW_DOWN_SIZE = '18px';\r\n\r\nconst DefaultSearch = ({\r\n className,\r\n disabled,\r\n errorText,\r\n id,\r\n intl,\r\n isOpen,\r\n isValid,\r\n clearIconSize = SEARCH_CLOSE_ICON_SIZE,\r\n isSearchableDropdown = false,\r\n label,\r\n maxLength,\r\n onBlur,\r\n onKeyDown,\r\n onChange,\r\n onSearch,\r\n onClear,\r\n onFocus,\r\n placeholder,\r\n setWrapperRef,\r\n showSearchButton,\r\n toggleDrawer,\r\n tooltip,\r\n value,\r\n width,\r\n children, // NOTE: do not use externally, only used internally by SearchDropdown and SearchDropdownApi components\r\n disableAutoComplete,\r\n}) => {\r\n const searchInputRef = useRef();\r\n const _onSearch = () => onSearch(value);\r\n\r\n return (\r\n \r\n \r\n {\r\n if (!isNullOrUndefined(onSearch) && e.key === 'Enter') {\r\n _onSearch();\r\n }\r\n onKeyDown(e);\r\n }}\r\n className={`${SEARCH_BLOCK}__bar`}\r\n >\r\n {showSearchButton ? (\r\n \r\n {\r\n if (!isNullOrUndefined(onSearch)) {\r\n _onSearch();\r\n }\r\n searchInputRef.current.focus();\r\n }}\r\n />\r\n \r\n ) : null}\r\n \r\n {\r\n onChange(e.target.value);\r\n }}\r\n onKeyDown={(e) =>\r\n e.keyCode === ENTER_KEY_CODE ? onChange(value) : null\r\n }\r\n onBlur={onBlur}\r\n placeholder={intl.formatMessage({ id: placeholder })}\r\n type={'search'}\r\n value={value}\r\n width={width}\r\n onFocus={onFocus}\r\n tabIndex={0}\r\n ref={searchInputRef}\r\n autoComplete={disableAutoComplete && 'off'}\r\n />\r\n {value ? (\r\n {\r\n if (!disabled) {\r\n onClear();\r\n }\r\n }}\r\n tabIndex={!disabled ? 0 : null}\r\n onKeyDown={(e) =>\r\n e.keyCode === SPACEBAR_KEY_CODE && !disabled\r\n ? onClear()\r\n : null\r\n }\r\n disabled={disabled}\r\n />\r\n ) : null}\r\n \r\n {isSearchableDropdown && !value && (\r\n \r\n \r\n \r\n )}\r\n \r\n {children}\r\n \r\n \r\n );\r\n};\r\n\r\nconst sharedPropTypes = {\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** Boolean representing if component should be disabled state */\r\n disabled: PropTypes.bool,\r\n /** Unique string id for search */\r\n id: PropTypes.string.isRequired,\r\n /** HOC Boolean representing whether search menu is open */\r\n isOpen: PropTypes.bool.isRequired,\r\n /** Internationalized Sting id passed to form item */\r\n label: PropTypes.string,\r\n /** Maximum search query length */\r\n maxLength: PropTypes.number,\r\n /** Function fired on blur*/\r\n onBlur: PropTypes.func,\r\n /** Function fired on user input into search, used to track search state variable\r\n * onChange should be doing some kind of this.setState() or similar redux actions to control\r\n * the value prop. However, if an API request is necessary as well it should be debounced and passed as\r\n * the 2nd argument to that set state. Which means it would look something like below:\r\n * onChange={val => {\r\n this.setState({ search: val }, () =>\r\n this.debouncedSearch({ search: this.state.search }),\r\n );\r\n }}\r\n */\r\n onChange: PropTypes.func.isRequired,\r\n /** Optional function fired when either the search button is clicked or enter key is pressed while search has focus */\r\n onSearch: PropTypes.func,\r\n /** HOC function fired for key presses, needed to make dropdown accessible */\r\n onKeyDown: PropTypes.func.isRequired,\r\n /** HOC Function fired on focus */\r\n onFocus: PropTypes.func.isRequired,\r\n /** Internationalized Sting id passed to form item */\r\n placeholder: PropTypes.string,\r\n /** Boolean representing whether search button is shown */\r\n showSearchButton: PropTypes.bool,\r\n /** Function fired to toggle search menu */\r\n toggleDrawer: PropTypes.func.isRequired,\r\n /** Object with tool tip options passed to form item */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /** String value of the search bar */\r\n value: PropTypes.string,\r\n /** String percentage representing width of component passed to form item*/\r\n width: PropTypes.string,\r\n /** indicates if menu should use a react portal or normal child element implementation */\r\n usePortalMenu: PropTypes.bool,\r\n};\r\n\r\nDefaultSearch.propTypes = {\r\n ...sharedPropTypes,\r\n /** (Should not be used externally! Use SearchApi component instead) Boolean flag passed by SearchApi component below to use the ApiMenu */\r\n useApiMenu: PropTypes.bool,\r\n};\r\n\r\nconst DefaultSearchDropdown = ({\r\n className,\r\n menuClassName,\r\n disabled,\r\n errorText,\r\n id,\r\n intl,\r\n isOpen,\r\n isValid,\r\n label,\r\n maxLength,\r\n onBlur,\r\n onChange,\r\n onSearch,\r\n onClear,\r\n onFocus,\r\n onKeyDown,\r\n onSelectResult,\r\n placeholder,\r\n results,\r\n setWrapperRef,\r\n wrapperRef,\r\n showSearchButton,\r\n toggleDrawer,\r\n tooltip,\r\n value,\r\n width,\r\n usePortalMenu,\r\n}) => {\r\n return (\r\n \r\n {isOpen ? (\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\n\r\nDefaultSearchDropdown.propTypes = {\r\n ...sharedPropTypes,\r\n /** class passed directly to the menu component */\r\n menuClassName: PropTypes.string,\r\n /** Func fired on menu item selection */\r\n onSelectResult: PropTypes.func.isRequired,\r\n /** Results of search query either array for simple front end searches, or an api model for backend, use SearchApi component below for api searches */\r\n results: PropTypes.oneOfType([\r\n PropTypes.array,\r\n PropTypes.instanceOf(MenuApiData),\r\n ]),\r\n /** HOC prop. Reference to this element, passed directly to the menu to help position it, since it is a portal */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n};\r\n\r\nconst DefaultSearchDropdownApi = ({\r\n className,\r\n menuClassName,\r\n maxDropDownHeight,\r\n disabled,\r\n errorText,\r\n id,\r\n intl,\r\n isOpen,\r\n isValid,\r\n clearIconSize,\r\n noResultMsg = NO_RESULT_FOUND_MESSAGE,\r\n isSearchableDropdown = false,\r\n label,\r\n maxLength,\r\n onBlur,\r\n onChange,\r\n onSearch,\r\n onClear,\r\n onKeyDown,\r\n onFocus,\r\n onSelectResult,\r\n placeholder,\r\n resultsApiModel,\r\n setWrapperRef,\r\n wrapperRef,\r\n showSearchButton,\r\n toggleDrawer,\r\n tooltip,\r\n value,\r\n width,\r\n usePortalMenu,\r\n isCreate,\r\n onCreateClick,\r\n minSearchCharLength,\r\n numberOfVisibleRows,\r\n disableAutoComplete,\r\n}) => {\r\n // only open if focused and user has typed at least the acceptable number of characters\r\n const _shouldOpenMenu =\r\n isOpen &&\r\n (isSearchableDropdown ||\r\n isSearchCharLengthValid(value, minSearchCharLength));\r\n return (\r\n {\r\n const _shouldSearchOnFocus = isSearchCharLengthValid(\r\n value,\r\n minSearchCharLength,\r\n );\r\n if (_shouldSearchOnFocus) {\r\n onChange(value);\r\n }\r\n onFocus(props);\r\n }}\r\n placeholder={placeholder}\r\n results={resultsApiModel} // different from Search\r\n setWrapperRef={setWrapperRef}\r\n showSearchButton={showSearchButton}\r\n toggleDrawer={toggleDrawer}\r\n tooltip={tooltip}\r\n value={value}\r\n width={width}\r\n disableAutoComplete={isCreate || disableAutoComplete}\r\n >\r\n {_shouldOpenMenu ? (\r\n isCreate ? (\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 ) : null}\r\n \r\n );\r\n};\r\nDefaultSearchDropdownApi.propTypes = {\r\n ...sharedPropTypes,\r\n /** class passed directly to the menu component */\r\n menuClassName: PropTypes.string,\r\n /**customized max height for dropdown menu */\r\n maxDropDownHeight: PropTypes.number,\r\n /**To customize clear icon size inside search bar */\r\n clearIconSize: PropTypes.string,\r\n /**boolean value for drop down arrow functionality */\r\n isSearchableDropdown: PropTypes.bool,\r\n /**No result found message for search drop down*/\r\n noResultMsg: PropTypes.string,\r\n /** Func fired on menu item selection */\r\n onSelectResult: PropTypes.func.isRequired,\r\n /** MenuApiData model with an apiModal property to handle loading when fetching data */\r\n resultsApiModel: PropTypes.instanceOf(MenuApiData).isRequired,\r\n /** HOC prop. Reference to this element, passed directly to the menu to help position it, since it is a portal */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n /** Boolean passed in to enable the create button or disable it */\r\n isCreate: PropTypes.bool,\r\n /** REQUIRED if isCreate is set, Function that fires when the create button is clicked */\r\n onCreateClick: PropTypes.func,\r\n /** Min char for search with create button is set to zero */\r\n minSearchCharLength: PropTypes.number.isRequired,\r\n /** Min number of rows to display for scroll */\r\n numberOfVisibleRows: PropTypes.number,\r\n /** Boolean for setting autocomplete on the input field */\r\n disableAutoComplete: PropTypes.bool,\r\n};\r\n\r\nconst DefaultSearchTableDropdownApi = ({\r\n columns,\r\n numberOfVisibleRows,\r\n className,\r\n menuClassName,\r\n disabled,\r\n errorText,\r\n id,\r\n intl,\r\n isOpen,\r\n isValid,\r\n label,\r\n maxLength,\r\n onBlur,\r\n onChange,\r\n onSearch,\r\n onClear,\r\n onKeyDown,\r\n onFocus,\r\n onSelectResult,\r\n placeholder,\r\n resultsApiModel,\r\n setWrapperRef,\r\n wrapperRef,\r\n showSearchButton,\r\n isOptionSelected,\r\n toggleDrawer,\r\n tooltip,\r\n value,\r\n width,\r\n usePortalMenu,\r\n shouldDisableMenuOption,\r\n}) => {\r\n // only open if focused and user has typed at least the acceptable number of characters\r\n const _shouldOpenMenu = isOpen && isSearchCharLengthValid(value);\r\n return (\r\n {\r\n const _shouldSearchOnFocus = isSearchCharLengthValid(value);\r\n if (_shouldSearchOnFocus) {\r\n onChange(value);\r\n }\r\n onFocus(props);\r\n }}\r\n placeholder={placeholder}\r\n results={resultsApiModel} // different from Search\r\n setWrapperRef={setWrapperRef}\r\n showSearchButton={showSearchButton}\r\n toggleDrawer={toggleDrawer}\r\n tooltip={tooltip}\r\n value={value}\r\n width={width}\r\n >\r\n {_shouldOpenMenu ? (\r\n \r\n \r\n \r\n }\r\n usePortal={usePortalMenu}\r\n />\r\n ) : null}\r\n \r\n );\r\n};\r\nDefaultSearchTableDropdownApi.propTypes = {\r\n ...sharedPropTypes,\r\n /** class passed directly to the menu component */\r\n menuClassName: PropTypes.string,\r\n /** An array of column objects, if you want special columns like Kebab or Checkbox, specify them in this prop */\r\n columns: PropTypes.arrayOf(PropTypes.instanceOf(DataGridColumn)).isRequired,\r\n /* Number of visual data rows, controls scrolling */\r\n numberOfVisibleRows: PropTypes.number,\r\n /** Func fired on menu item selection */\r\n onSelectResult: PropTypes.func.isRequired,\r\n /** MenuApiData model with an apiModal property to handle loading when fetching data */\r\n resultsApiModel: PropTypes.instanceOf(DataGridDataApi).isRequired,\r\n /** HOC prop. Reference to this element, passed directly to the menu to help position it, since it is a portal */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n /** Function to determine if a specific option is already selected, func should look like (rowData) => someFunction(rowData)\r\n * And evaluate to a boolean\r\n */\r\n isOptionSelected: PropTypes.func,\r\n /** Function that determines if a particular row should be disabled based on if the user has already been selected */\r\n shouldDisableMenuOption: PropTypes.func,\r\n};\r\n\r\nconst SearchTableDropdownApi = memo(\r\n DrawerActionHandler(injectIntl(DefaultSearchTableDropdownApi), {\r\n itemQuerySelector: '.menu .data-grid__body .data-grid__row',\r\n textInputDrawer: true,\r\n }),\r\n);\r\nconst SearchDropdownApi = memo(\r\n DrawerActionHandler(injectIntl(DefaultSearchDropdownApi), {\r\n textInputDrawer: true,\r\n }),\r\n);\r\nconst SearchDropdown = memo(\r\n DrawerActionHandler(injectIntl(DefaultSearchDropdown), {\r\n textInputDrawer: true,\r\n }),\r\n);\r\nexport default memo(\r\n DrawerActionHandler(injectIntl(DefaultSearch), {\r\n textInputDrawer: true,\r\n }),\r\n);\r\nexport { SearchDropdownApi, SearchDropdown, SearchTableDropdownApi };\r\n","import debounce from 'lodash.debounce';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\n\r\nconst _MIN_CHAR_LENGTH_TO_SEARCH = 3;\r\nconst _DEBOUNCE_TIME = 250;\r\n\r\n/**\r\n * Returns a debounced version of the passed function\r\n * @param {function} debouncedFunction\r\n */\r\nexport const debounceSearch = (debouncedFunction) => {\r\n return debounce(debouncedFunction, _DEBOUNCE_TIME);\r\n};\r\n\r\n/**\r\n * Returns if the search value is of the minimum length to allow a search to be triggered\r\n * @param {string} searchTerm\r\n */\r\nexport const isSearchCharLengthValid = (\r\n searchTerm,\r\n minSearchCharLength = _MIN_CHAR_LENGTH_TO_SEARCH,\r\n) => {\r\n return searchTerm.length >= minSearchCharLength;\r\n};\r\n\r\n/**\r\n * Returns a string formatted for displaying in the search field of create/edit project like - \r\n * @param {EngagementEntity} entity object representing engagement entity\r\n */\r\nexport const getSearchFormattedEngagementEntity = (entity) => {\r\n return `${entity.clientName} - ${moment(entity.engagementFye).format(\r\n DATE_FORMATS.YEAR,\r\n )}`;\r\n};\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const getElementDetailsRequest = ({ revisionId, elementId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getElementsBySectionRequest = ({\r\n statementId,\r\n revisionId,\r\n sectionId,\r\n contextKey,\r\n contextValue,\r\n isPreviewPage,\r\n}) => {\r\n const params = isPreviewPage\r\n ? {\r\n includeChildSections: false,\r\n includePreviewSequence: true,\r\n excludeElement: true,\r\n }\r\n : {\r\n includeChildSections: false,\r\n };\r\n return withDefaultContextAsSelectedProject({ contextKey, contextValue })\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/section/${sectionId}`,\r\n { params },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const updateElementRequest = ({\r\n revisionId,\r\n elementId,\r\n elementDetails,\r\n}) => {\r\n return withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}`,\r\n elementDetails.toEditApiFormat(),\r\n {\r\n params: {\r\n since: Date.now().toString(),\r\n },\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const batchUpdateElementRequest = ({\r\n revisionId,\r\n updatesModel,\r\n elementIds,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements`,\r\n updatesModel.toApiFormat({ elementIds }),\r\n );\r\n};\r\n\r\nexport const documentChangesSinceRequest = ({ revisionId, sinceTimestamp }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/changes`,\r\n {\r\n params: {\r\n since: sinceTimestamp,\r\n },\r\n },\r\n );\r\n\r\nexport const excludeElementFromElementListRequest = ({\r\n revisionId,\r\n elementId,\r\n}) => {\r\n return withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/exclude\r\n `,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const addElementRequest = ({ revisionId, elementDetails }) => {\r\n return withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/`,\r\n elementDetails,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\nexport const addElementRequestOCR = ({ revisionId, elementDetails }) => {\r\n return withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/ocrElements`,\r\n elementDetails,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const searchStatementElementsRequest = ({\r\n revisionId,\r\n searchTerm,\r\n filters,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elementFilter`,\r\n {\r\n searchElementText: searchTerm,\r\n ...filters.toApiFormat(),\r\n ...filters.getPageParams(),\r\n },\r\n );\r\n};\r\n\r\nexport const getUpdatedElementsByIdsRequest = ({\r\n revisionId,\r\n elementIds,\r\n filters,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elementFilter`,\r\n {\r\n elementIds,\r\n ...filters.toApiFormat(),\r\n },\r\n );\r\n};\r\n\r\nexport const getAllRevisionElementsRequest = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/summary`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getDiffRevisionElementsRequest = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/diff`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getHistoryForElementRequest = ({ elementId, statementId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${statementId}/elements/${elementId}/history`,\r\n );\r\n\r\nexport const getElementsByWorkpaperReference = ({ revisionId, wpRefId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/wpref/${wpRefId}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getAllElements = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/preview/elements`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { injectIntl, FormattedMessage } from 'react-intl';\r\nimport FormItem from 'components/common/form-item-component';\r\nimport classNames from 'classnames';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { RadioOption } from 'models/utils/common/radio-options-model';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\n\r\nconst radio_block = 'radio';\r\n\r\nconst Radio = ({\r\n className,\r\n disabled,\r\n errorText,\r\n id,\r\n options,\r\n selectedOption,\r\n isValid,\r\n label,\r\n name,\r\n onChange,\r\n tooltip,\r\n width,\r\n alt,\r\n radioWrapperClass,\r\n}) => (\r\n \r\n {options.map((option, i) => (\r\n \r\n {\r\n if (option.disabled) {\r\n return false;\r\n }\r\n onChange(option.value);\r\n }}\r\n >\r\n {\r\n if (option.disabled) {\r\n return false;\r\n }\r\n onChange(option.value);\r\n }}\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n }} // prevents the onChange handler from being called twice since the click propagates to the wraping div which also has an onClick\r\n type=\"radio\"\r\n value={option.value}\r\n checked={selectedOption === option.value}\r\n />\r\n \r\n {option.isNotInternationalized ? (\r\n option.label\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n ))}\r\n \r\n);\r\n\r\nRadio.propTypes = {\r\n /* Use alternative checked state */\r\n alt: PropTypes.bool,\r\n className: PropTypes.string,\r\n disabled: PropTypes.bool,\r\n errorText: PropTypes.string,\r\n id: PropTypes.string.isRequired,\r\n options: PropTypes.arrayOf(PropTypes.instanceOf(RadioOption)).isRequired,\r\n selectedOption: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.number,\r\n PropTypes.bool,\r\n ]),\r\n isValid: PropTypes.bool,\r\n label: PropTypes.string,\r\n name: PropTypes.string,\r\n onChange: PropTypes.func.isRequired,\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n width: PropTypes.string,\r\n};\r\n\r\nexport default memo(injectIntl(Radio));\r\n","import React from 'react';\r\nimport { RadioOption } from 'models/utils/common/radio-options-model';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { ReactComponent as Warning } from 'icons/warning.svg';\r\nimport { toast } from 'react-toastify';\r\nimport Notification from 'components/common/notification-component';\r\nimport { LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER } from 'constants/common/feature-common-utils';\r\nimport { getMaxElementForBatchUpdateLimit } from 'utils/statement-content-page-utils';\r\n\r\nexport const UNSELECTED_OPTION = undefined;\r\nexport const isOptionUnselected = (val) => val === UNSELECTED_OPTION;\r\nexport const MAX_ELEMENTS_FOR_BATCH = 500;\r\n\r\nexport const SESSION_STORAGE_KEY_FOR_BATCH_UPDATE_CONFIG = `${LOCAL_STORAGE_TIEOUT_APP_IDENTIFIER}__batch-update-config`;\r\n\r\nconst STATUS_VERIFICATION_OPTIONS = {\r\n verify: new RadioOption({\r\n id: 'verification-verify-batch-option-id',\r\n label: 'batch-panel.status.verification.radio.verifiy',\r\n value: true,\r\n tooltipEnabled: true,\r\n }),\r\n unverify: new RadioOption({\r\n id: 'verification-unverify-batch-option-id',\r\n label: 'batch-panel.status.verification.radio.unverifiy',\r\n value: false,\r\n tooltipEnabled: false,\r\n }),\r\n none: new RadioOption({\r\n id: 'verification-none-batch-option-id',\r\n label: 'batch-panel.status.verification.radio.none',\r\n value: UNSELECTED_OPTION,\r\n tooltipEnabled: false,\r\n }),\r\n};\r\n\r\nexport const STATUS_VERIFICATION_OPTIONS_ARRAY = Object.values(\r\n STATUS_VERIFICATION_OPTIONS,\r\n);\r\n\r\nconst STATUS_REVIEW_OPTIONS = {\r\n review: new RadioOption({\r\n id: 'review-review-batch-option-id',\r\n label: 'batch-panel.status.review.radio.review',\r\n value: true,\r\n tooltipEnabled: true,\r\n }),\r\n unreview: new RadioOption({\r\n id: 'review-unreview-batch-option-id',\r\n label: 'batch-panel.status.review.radio.unreview',\r\n value: false,\r\n tooltipEnabled: false,\r\n }),\r\n none: new RadioOption({\r\n id: 'review-none-batch-option-id',\r\n label: 'batch-panel.status.review.radio.none',\r\n value: UNSELECTED_OPTION,\r\n tooltipEnabled: false,\r\n }),\r\n};\r\n\r\nexport const STATUS_REVIEW_OPTIONS_ARRAY = Object.values(STATUS_REVIEW_OPTIONS);\r\n\r\nconst STATUS_USER_FLAG_OPTIONS = {\r\n add: new RadioOption({\r\n id: 'user-flag-add-batch-option-id',\r\n label: 'batch-panel.status.flag.radio.flag',\r\n value: true,\r\n }),\r\n remove: new RadioOption({\r\n id: 'user-flag-remove-batch-option-id',\r\n label: 'batch-panel.status.flag.radio.unflag',\r\n value: false,\r\n }),\r\n none: new RadioOption({\r\n id: 'user-flag-none-batch-option-id',\r\n label: 'batch-panel.status.flag.radio.none',\r\n value: UNSELECTED_OPTION,\r\n }),\r\n};\r\n\r\nexport const STATUS_USER_FLAG_OPTIONS_ARRAY = Object.values(\r\n STATUS_USER_FLAG_OPTIONS,\r\n);\r\n\r\nconst STATUS_SYSTEM_OVERRIDE_FLAG_OPTIONS = {\r\n add: new RadioOption({\r\n id: 'system-override-flag-add-batch-option-id',\r\n label: 'common.yes',\r\n value: true,\r\n }),\r\n remove: new RadioOption({\r\n id: 'system-override-remove-batch-option-id',\r\n label: 'common.no',\r\n value: false,\r\n }),\r\n none: new RadioOption({\r\n id: 'system-override-none-batch-option-id',\r\n label: 'batch-panel.status.flag.radio.none',\r\n value: UNSELECTED_OPTION,\r\n }),\r\n};\r\n\r\nconst COMFORT_ASSIGN_OPTIONS = {\r\n add: new RadioOption({\r\n id: 'comfortAssign-add-option-id',\r\n label: 'common.yes',\r\n value: true,\r\n }),\r\n remove: new RadioOption({\r\n id: 'comfortAssign-remove-option-id',\r\n label: 'common.no',\r\n value: false,\r\n }),\r\n none: new RadioOption({\r\n id: 'comfortAssign-none-option-id',\r\n label: 'comfortAssign.radio.none',\r\n value: UNSELECTED_OPTION,\r\n }),\r\n};\r\n\r\nexport const STATUS_SYSTEM_OVERRIDE_FLAG_OPTIONS_ARRAY = Object.values(\r\n STATUS_SYSTEM_OVERRIDE_FLAG_OPTIONS,\r\n);\r\n\r\nexport const COMFORTASSIGN_OPTIONS_ARRAY = Object.values(\r\n COMFORT_ASSIGN_OPTIONS,\r\n);\r\n\r\nexport const WORKPAPER_ENTRY_REMOVE_TOOLTIP = new TooltipOptions({\r\n text: 'common.remove',\r\n id: 'batch-panel-workpaper-remove-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nexport const EXPAND_ELEMENTS_TOOLTIP = new TooltipOptions({\r\n text: 'common.expand',\r\n id: 'batch-panel-expand-button-tool-tip',\r\n});\r\n\r\nexport const COLLAPSE_ELEMENTS_TOOLTIP = new TooltipOptions({\r\n text: 'common.collapse',\r\n id: 'batch-panel-collapse-button-tool-tip',\r\n});\r\n\r\nexport const TICKMARK_REMOVE_TOOLTIP = new TooltipOptions({\r\n text: 'common.remove',\r\n id: 'tickmark-remove-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nexport const hoverVerifyTooltip = new TooltipOptions({\r\n text: 'batch-panel.status.verification.radio.tooltip',\r\n id: 'batch-panel.checkbox.verify-tooltip-id',\r\n position: 'left',\r\n});\r\nexport const hoverReviewTooltip = new TooltipOptions({\r\n text: 'batch-panel.status.review.radio.tooltip',\r\n id: 'batch-panel.checkbox.review-tooltip-id',\r\n position: 'left',\r\n});\r\nexport const reviewInfoButtonTooltip = (event) =>\r\n new TooltipOptions({\r\n text: 'batch-panel.status.review.information',\r\n id: 'batch-panel.info.button-verify-tooltip-id',\r\n position: 'bottom',\r\n event: event,\r\n });\r\n\r\nexport const batchMaxAmountNotification = () => {\r\n toast.warning(\r\n }\r\n title={{ id: 'common.batch-warning-title' }}\r\n message={{\r\n id: 'common.batch-warning-message',\r\n values: { limit: getMaxElementForBatchUpdateLimit() },\r\n }}\r\n />,\r\n { autoClose: 3000 },\r\n );\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Starting-Components\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG-TieOut-|-Starting-Components-Part-1\",\n transform: \"translate(-1480.000000, -4086.000000)\",\n fill: \"#00A3E0\"\n}, React.createElement(\"path\", {\n d: \"M1497.50044,4108.75022 L1490.50131,4108.75022 C1490.17879,4108.75022 1489.91762,4108.48904 1489.91762,4108.16652 L1489.91762,4105.83348 C1489.91762,4105.51096 1490.17879,4105.24978 1490.50131,4105.24978 L1492.25066,4105.24978 L1492.25066,4100.5837 L1491.08326,4100.5837 C1490.76249,4100.5837 1490.50131,4100.32252 1490.50131,4100 L1490.50131,4097.66696 C1490.50131,4097.34443 1490.76249,4097.08326 1491.08326,4097.08326 L1495.1674,4097.08326 C1495.48992,4097.08326 1495.7511,4097.34443 1495.7511,4097.66696 L1495.7511,4105.24978 L1497.50044,4105.24978 C1497.82296,4105.24978 1498.08414,4105.51096 1498.08414,4105.83348 L1498.08414,4108.16652 C1498.08414,4108.48904 1497.82296,4108.75022 1497.50044,4108.75022 Z M1494,4095.91586 C1492.71341,4095.91586 1491.66696,4094.86941 1491.66696,4093.58282 C1491.66696,4092.29623 1492.71341,4091.24978 1494,4091.24978 C1495.28659,4091.24978 1496.33479,4092.29623 1496.33479,4093.58282 C1496.33479,4094.86941 1495.28659,4095.91586 1494,4095.91586 Z M1494,4086 C1486.26819,4086 1480,4092.26819 1480,4100 C1480,4107.73181 1486.26819,4114 1494,4114 C1501.73357,4114 1508,4107.73181 1508,4100 C1508,4092.26819 1501.73357,4086 1494,4086 Z\",\n id: \"icon_information\"\n})));\n\nvar SvgIconInformationTooltip = function SvgIconInformationTooltip(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgIconInformationTooltip, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/icon-information-tooltip.26d7bfd6.svg\";\nexport { ForwardRef as ReactComponent };","import { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\n\r\nexport default class TabModel {\r\n id;\r\n intlTitle;\r\n intlValues;\r\n tooltip;\r\n apiParam;\r\n featureName;\r\n /**\r\n *\r\n * @param {String} param.id: The unique identifier of the tab-model\r\n * @param {String} param.intlTitle: The key to retrieve the intl-formatted message for this tab-model from the respective i18n file for the current language\r\n * @param {Object} param.intlValues: The optional map of values to be supplied to the intl-formatted message specified by the `intlTitle`\r\n * for a tab, E.g: {someIntlMessageDisplayKey: someIntlDisplayValue}, which would populate for:\r\n * intlTitle: \"This is an intl string with {someIntlMessageDisplayKey} meaning\" to render as:\r\n * 'This is an intl string with someIntlDisplayValue meaning.\r\n * @param {TooltipOptions} param.tooltip: An optional tooltip parameter which will render a tooltip on hover over the respective tab.\r\n * @param {String} param.className className to apply to this tab\r\n * @param {String} param.apiParam text corresponding to param in an api request that would trigger when changing to this tab\r\n * @param {TabModelIcon} param.rightIcon contains icon to be placed towards right side of tab model along with tabId for mapping with appropriated tabId -\r\n * /**shape is:\r\n * {\"tabId-1\":{iconComponent:'abc',classname:'test'},\"tabId-2\":{iconComponent:'abc1',classname:'test1'}}\r\n * shape is maintained using Map Object.\r\n * @param {String} param.featureName is the name of the feature. Based on name we can hide or unhide the feature\r\n * by wrapping it inside FeatureFlagComponent\r\n */\r\n constructor({\r\n id,\r\n intlTitle,\r\n intlValues,\r\n tooltip,\r\n className,\r\n apiParam,\r\n rightIcon,\r\n featureName = FEATURE_NAMES.OTHER_FEATURES,\r\n }) {\r\n this.id = id;\r\n this.intlTitle = intlTitle;\r\n this.intlValues = intlValues;\r\n this.tooltip = tooltip;\r\n this.className = className;\r\n this.apiParam = apiParam;\r\n this.rightIcon = rightIcon;\r\n this.featureName = featureName;\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\nimport sizeof from 'object-sizeof';\r\n\r\nimport {\r\n clearSectionContentWithIdsFromCache,\r\n clearOCRSectionContentWithIdsFromCache,\r\n clearOCRSectionImageWithIdsFromCache,\r\n} from 'store/actions/statement-content-actions';\r\nimport { clearCurrentBlacklineContentWithIdsFromCache } from 'store/actions/blackline-view-actions';\r\nimport { getRevisionsSectionsRequest } from 'api/sections-api';\r\nimport { CONTEXT_KEY } from 'api/api-client';\r\n\r\nexport const createSectionCacheTracker = createAction(\r\n 'CACHE_CREATE_SECTION_TRACKER',\r\n);\r\n\r\nexport const createLeftSectionCacheTracker = createAction(\r\n 'CACHE_LEFT_CREATE_SECTION_TRACKER',\r\n);\r\n\r\nexport const updateSectionViewedTimestamp = createAction(\r\n 'CACHE_UPDATE_SECTION_VIEWED_TIMESTAMP',\r\n);\r\n\r\nexport const addSectionToCache = createAction('ADD_SECTION_TO_CACHE');\r\nexport const addLeftSectionToCache = createAction('ADD_LEFT_SECTION_TO_CACHE');\r\n\r\nexport const updatePurgedCacheTracker = createAction(\r\n 'UPDATE_PURGED_CACHE_TRACKER',\r\n);\r\n\r\nexport const contentSectionMapLoading = createAction(\r\n 'CONTENT_SECTION_MAP_LOADING',\r\n);\r\nexport const contentSectionMapLoaded = createAction(\r\n 'CONTENT_SECTION_MAP_LOADED',\r\n);\r\nexport const contentSectionMapError = createAction('CONTENT_SECTION_MAP_ERROR');\r\n\r\nexport const leftContentSectionMapLoading = createAction(\r\n 'LEFT_CONTENT_SECTION_MAP_LOADING',\r\n);\r\nexport const leftContentSectionMapLoaded = createAction(\r\n 'LEFT_CONTENT_SECTION_MAP_LOADED',\r\n);\r\nexport const leftContentSectionMapError = createAction(\r\n 'LEFT_CONTENT_SECTION_MAP_ERROR',\r\n);\r\n\r\nexport const checkCacheToPurge = () => async (dispatch, getStore) => {\r\n const store = getStore();\r\n const { statementContent, selectedStatement } = store.data;\r\n const { tracker } = statementContent.sectionsCache;\r\n const {\r\n sectionsInView,\r\n modes: { blacklineViewMode },\r\n } = store.ui.statementPage;\r\n\r\n if (tracker.cacheOverThreshold()) {\r\n const {\r\n newViewedSectionMetricsMap,\r\n newViewedSectionQueue,\r\n reducedTotalSize,\r\n removedSectionIds,\r\n } = tracker.getPurgedCache({ sectionsInView });\r\n dispatch(\r\n updatePurgedCacheTracker({\r\n viewedSectionMetricsMap: newViewedSectionMetricsMap,\r\n viewedSectionQueue: newViewedSectionQueue,\r\n totalCacheMemorySize: reducedTotalSize,\r\n }),\r\n );\r\n\r\n if (selectedStatement.isOCR) {\r\n dispatch(clearOCRSectionContentWithIdsFromCache({ removedSectionIds }));\r\n dispatch(clearOCRSectionImageWithIdsFromCache({ removedSectionIds }));\r\n blacklineViewMode &&\r\n dispatch(\r\n clearCurrentBlacklineContentWithIdsFromCache({ removedSectionIds }),\r\n );\r\n } else {\r\n dispatch(clearSectionContentWithIdsFromCache({ removedSectionIds }));\r\n }\r\n }\r\n};\r\n\r\nexport const calculateSizeAndAddSectionToCache =\r\n ({ sectionId }) =>\r\n async (dispatch, getStore) => {\r\n const { cache } = getStore().data.statementContent.sectionsCache;\r\n const sectionMemorySize = sizeof(cache.get(sectionId));\r\n\r\n dispatch(\r\n addSectionToCache({\r\n sectionId,\r\n sectionMemorySize,\r\n }),\r\n );\r\n };\r\n\r\nexport const getContentSectionMapRequest =\r\n ({ revisionId, statementId }) =>\r\n async (dispatch, getStore) => {\r\n dispatch(contentSectionMapLoading());\r\n try {\r\n await getRevisionsSectionsRequest({\r\n statementId,\r\n revisionId,\r\n onlyBookmarkSection: false,\r\n asTreeList: false,\r\n }).then((response) => {\r\n dispatch(contentSectionMapLoaded({ response }));\r\n });\r\n } catch (error) {\r\n dispatch(contentSectionMapError(error));\r\n }\r\n };\r\n\r\nexport const getLeftContentSectionMapRequest =\r\n ({ statementId, revisionId, projectId }) =>\r\n async (dispatch, getStore) => {\r\n dispatch(leftContentSectionMapLoading());\r\n try {\r\n await getRevisionsSectionsRequest({\r\n statementId,\r\n revisionId,\r\n onlyBookmarkSection: false,\r\n asTreeList: false,\r\n contextKeyForApiCall: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: projectId,\r\n }).then((response) => {\r\n dispatch(leftContentSectionMapLoaded({ response }));\r\n });\r\n } catch (error) {\r\n dispatch(leftContentSectionMapError(error));\r\n }\r\n };\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Special-/-Cross\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"g\", {\n id: \"cross-special\"\n}, React.createElement(\"path\", {\n d: \"M14.8225,14 L20.8308333,7.9975 C21.0290365,7.7660565 21.0157105,7.4210534 20.8002452,7.20558812 C20.5847799,6.99012284 20.2397768,6.97679687 20.0083333,7.175 L14,13.1775 L7.9975,7.16916667 C7.7660565,6.97096354 7.4210534,6.98428951 7.20558812,7.19975479 C6.99012284,7.41522007 6.97679687,7.76022317 7.175,7.99166667 L13.1775,14 L7.16916667,20.0025 C7.00269724,20.1450608 6.93018553,20.3689024 6.98144409,20.5819944 C7.03270264,20.7950864 7.19908026,20.961464 7.41217227,21.0127226 C7.62526427,21.0639811 7.8491059,20.9914694 7.99166667,20.825 L14,14.8225 L20.0025,20.8308333 C20.2339435,21.028919 20.5789466,21.0157105 20.7944119,20.8002452 C21.0098772,20.5847799 21.0232031,20.2397768 20.825,20.0083333 L14.8225,14 Z\",\n id: \"Path\",\n fill: \"#000000\",\n fillRule: \"nonzero\",\n className: \"close-button-icon\"\n}), React.createElement(\"rect\", {\n id: \"Rectangle\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n})));\n\nvar SvgCloseButton = function SvgCloseButton(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCloseButton, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/close-button.25fdcc4e.svg\";\nexport { ForwardRef as ReactComponent };","import { createAction } from 'redux-actions';\r\nimport { createNewFormulaRequest } from 'api/formula-api';\r\nimport { updateElementsSearchByIds } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport { updateElementAnnotationDetails } from 'store/actions/element-panel-actions';\r\nimport {\r\n setFormulaLoading,\r\n clearFormula,\r\n setFormulaError,\r\n _updateStatementSummaryElements,\r\n} from 'store/actions/formula-actions';\r\nimport FormulaForm from 'models/form/formula-form-model';\r\nimport {\r\n _getNewRowsForTargetElement,\r\n removeUnwantedColumn,\r\n triggerPopUpStatusForCopyFormula,\r\n} from 'utils/copy-formula-utils';\r\nimport {\r\n setElementSelectModeCopyFormulaAction,\r\n clearCopyFormulaModeIfPossible,\r\n} from 'store/actions/modes-actions';\r\nimport { selectElementContentPanel } from 'store/actions/statement-content-actions';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport {\r\n replaceSelectedElementWithoutRemovingOld,\r\n replaceSelectedElementsContentPanel,\r\n clearSelectedElementsContentPanel,\r\n} from 'store/actions/statement-content-actions';\r\nimport { round } from 'utils/formula-utils';\r\nimport { toast } from 'react-toastify';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport React from 'react';\r\nimport { ReactComponent as Warning } from 'icons/warning.svg';\r\nimport { checkIfPolygonIsInsideAnotherPolygon } from 'utils/ocr-text-selection-utils';\r\nimport { updateElementCacheByCalloutAction } from './element-cache-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nconst COPY_FORMULA_ACTION_BLOCK = 'copy-formula-action';\r\nconst BANNER_ICON_SIZE = '18px';\r\n\r\nexport const setCopiedFormula = createAction('SET_COPIED_FORMULA');\r\nexport const clearCopiedFormula = createAction('CLEAR_COPIED_FORMULA');\r\n\r\nexport const setTableMatrix = createAction('SET_TABLE_MATRIX');\r\nexport const clearTableMatrix = createAction('CLEAR_TABLE_MATRIX');\r\n\r\nexport const setCopyFormulaResult = createAction('SET_COPY_FORMULA_RESULT');\r\nexport const clearCopyFormulaResult = createAction('CLEAR_COPY_FORMULA_RESULT');\r\n\r\nexport const addElementToCopyFormulaSelectionAction = createAction(\r\n 'COPY_FORMULA_ADD_ELEMENT_TO',\r\n);\r\n\r\nexport const removeElementFromBatchSelection = createAction(\r\n 'REMOOVE_ELEMENT_FROM_SELECTION',\r\n);\r\n\r\nexport const clearBatchSelectedElementsAction = createAction(\r\n 'CLEAR_BATCH_ADD_ELEMENT_TO',\r\n);\r\n\r\nexport const COPY_FAILED = 'FAILED';\r\nexport const COPY_SUCCESS = 'SUCCESS';\r\n\r\n// set TableMatrix(flattened structure of table to calculate positions) and copied formulas to the store\r\nexport const initcopyFormula =\r\n (tableMatrix, copiedFormula) => (dispatch, getState) => {\r\n //copying formula list from element panel\r\n dispatch(clearCopyFormulaResult());\r\n dispatch(setTableMatrix(tableMatrix));\r\n dispatch(setCopiedFormula(copiedFormula));\r\n dispatch(setElementSelectModeCopyFormulaAction());\r\n };\r\n\r\n// clear TableMatrix and copied formulas from the store\r\nexport const stopCopyFormula = () => (dispatch, getStore) => {\r\n const { copiedFormula } = getStore().data.copyFormula;\r\n if (\r\n copiedFormula &&\r\n copiedFormula.data &&\r\n copiedFormula.data.formulas &&\r\n copiedFormula.data.formulas.length > 0\r\n ) {\r\n dispatch(requestCreateNewCopyFormula());\r\n }\r\n dispatch(clearBatchSelectedElementsAction());\r\n dispatch(clearCopiedFormula());\r\n dispatch(clearTableMatrix());\r\n dispatch(clearCopyFormulaModeIfPossible());\r\n};\r\n\r\n// Abort copy Formula. Clear all cache data related to it.\r\nexport const cancelCopyFormula = () => (dispatch, getStore) => {\r\n const elementDetails = getStore().data.elementPanel.elementDetails;\r\n dispatch(clearBatchSelectedElementsAction());\r\n dispatch(clearCopiedFormula());\r\n dispatch(clearTableMatrix());\r\n dispatch(clearCopyFormulaModeIfPossible());\r\n // Highlight only element for which element panel is open Or Else Clear all\r\n elementDetails && Number.isInteger(elementDetails.id)\r\n ? dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementDetails.id],\r\n }),\r\n )\r\n : clearSelectedElementsContentPanel();\r\n};\r\n\r\n/**To get the index of searchElement from the given multi dimentional array (TableMatrix)\r\n 0th position of returned array is row index\r\n 1st position of returned array is column index.\r\n */\r\n\r\nexport const requestCreateNewCopyFormula = () => async (dispatch, getState) => {\r\n const { copiedFormula } = getState().data.copyFormula;\r\n const elementDetails = getState().data.elementPanel.elementDetails;\r\n const { selectedElementsMap, selectedElementIds } =\r\n getState().data.copyFormula.copyFormulaSelectedElement;\r\n const { tableMatrix } = getState().data.copyFormula;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n // This filter is required to ignore formula creation for element from which it is copied\r\n const copiedElementsFiltered = selectedElementIds.filter(\r\n (id) => id !== copiedFormula.data.formulas.at(0).elementId,\r\n );\r\n const copiedFormulas = copiedFormula.data.formulas;\r\n for (\r\n let copiedElementsIndex = 0;\r\n copiedElementsIndex < copiedElementsFiltered.length;\r\n copiedElementsIndex++\r\n ) {\r\n //handle muliple formula for selected element\r\n for (\r\n let copiedFormulasIndex = 0;\r\n copiedFormulasIndex < copiedFormulas.length;\r\n copiedFormulasIndex++\r\n ) {\r\n const newRows = _getNewRowsForTargetElement(\r\n copiedFormulas[copiedFormulasIndex].elementId,\r\n copiedElementsFiltered[copiedElementsIndex],\r\n copiedFormulas[copiedFormulasIndex].rows,\r\n tableMatrix,\r\n );\r\n const formulaModel = new FormulaForm().initFormulaCreate(\r\n selectedElementsMap[copiedElementsFiltered[copiedElementsIndex]].data,\r\n );\r\n formulaModel.data.rows = newRows;\r\n /** Get Rounding scale, if selected */\r\n formulaModel.data.roundingScale =\r\n copiedFormulas[copiedFormulasIndex].roundingScale;\r\n formulaModel.data.roundingResult = round(\r\n copiedFormulas[copiedFormulasIndex].computedResult,\r\n copiedFormulas[copiedFormulasIndex].roundingScale,\r\n );\r\n dispatch(setFormulaLoading());\r\n try {\r\n await createNewFormulaRequest({\r\n formulaModel: formulaModel,\r\n });\r\n await dispatch(\r\n setCopyFormulaResult({\r\n elementId: copiedElementsFiltered[copiedElementsIndex],\r\n copiedFormulaId: copiedFormulas[copiedFormulasIndex].formulaId,\r\n copyFormulaStatus: COPY_SUCCESS,\r\n amount:\r\n selectedElementsMap[copiedElementsFiltered[copiedElementsIndex]]\r\n .data.amount,\r\n }),\r\n );\r\n dispatch(\r\n replaceSelectedElementWithoutRemovingOld({\r\n elementIds: [copiedElementsFiltered[copiedElementsIndex]],\r\n color: ELEMENT_HIGHLIGHT_STATES.FORMULA_PASTE_SUCCESS,\r\n }),\r\n );\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: selectedElementIds,\r\n showCallout: true,\r\n }),\r\n );\r\n if (socketHasBeenDisconnected) {\r\n // no need to set loaded, if it is successful we will wind up closing this panel\r\n dispatch(clearFormula({ elementId: formulaModel.elementId }));\r\n dispatch(_updateStatementSummaryElements);\r\n dispatch(\r\n updateElementsSearchByIds({\r\n elementIds: [copiedElementsFiltered[copiedElementsIndex]],\r\n }),\r\n );\r\n dispatch(updateElementAnnotationDetails());\r\n }\r\n } catch (error) {\r\n dispatch(setFormulaError(error));\r\n\r\n await dispatch(\r\n setCopyFormulaResult({\r\n elementId: copiedElementsFiltered[copiedElementsIndex],\r\n copiedFormulaId: copiedFormulas[copiedFormulasIndex].formulaId,\r\n copyFormulaStatus: COPY_FAILED,\r\n amount:\r\n selectedElementsMap[copiedElementsFiltered[copiedElementsIndex]]\r\n .data.amount,\r\n }),\r\n );\r\n // Suppose there are 10 formulas to be pasted. 5 of them were success and 5 failed.\r\n // then in that case color should be green. Since it was partially successfull.\r\n if (\r\n !getState()\r\n .data.copyFormula.copyFormulaResult.elements.filter(\r\n (ele) => ele.copyFormulaStatus === COPY_SUCCESS,\r\n )\r\n .map((ele) => ele.elementId)\r\n .some(\r\n (successElementId) =>\r\n successElementId ===\r\n copiedElementsFiltered[copiedElementsIndex],\r\n )\r\n ) {\r\n await dispatch(\r\n replaceSelectedElementWithoutRemovingOld({\r\n elementIds: [copiedElementsFiltered[copiedElementsIndex]],\r\n color: ELEMENT_HIGHLIGHT_STATES.FORMULA_PASTE_FAILURE,\r\n }),\r\n );\r\n }\r\n }\r\n }\r\n }\r\n document.addEventListener(\r\n 'click',\r\n (e) => {\r\n if (!e.ctrlKey) {\r\n // Highlight only element for which element panel is open Or Else Clear all\r\n elementDetails && Number.isInteger(elementDetails.id)\r\n ? dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementDetails.id],\r\n }),\r\n )\r\n : clearSelectedElementsContentPanel();\r\n }\r\n },\r\n {\r\n once: true,\r\n },\r\n );\r\n let responseForPopUp = triggerPopUpStatusForCopyFormula(\r\n getState().data.copyFormula.copyFormulaResult.elements,\r\n selectedElementIds,\r\n );\r\n\r\n responseForPopUp.successMessageDto.length > 0 &&\r\n responseForPopUp.successMessageDto.forEach((ele) => {\r\n toast.success(\r\n
\r\n \r\n \r\n ),\r\n }}\r\n />\r\n \r\n \r\n ),\r\n }}\r\n id=\"element-panel.annotation.content.formula.copy-sucess-summary\"\r\n />\r\n
,\r\n { autoClose: 15000 },\r\n );\r\n });\r\n\r\n responseForPopUp.failureMessageDto.length > 0 &&\r\n responseForPopUp.failureMessageDto.forEach((ele) =>\r\n toast.error(\r\n
\r\n \r\n \r\n \r\n ),\r\n }}\r\n />\r\n \r\n \r\n ),\r\n }}\r\n id=\"element-panel.annotation.content.formula.copy-fail-summary\"\r\n />\r\n
,\r\n { autoClose: 15000 },\r\n ),\r\n );\r\n};\r\n\r\nexport const addElementForCopyFormula =\r\n ({ elementId }) =>\r\n (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n statementNavigatorPanel: { elementSearchResults },\r\n },\r\n },\r\n data: {\r\n statementContent: { elementCache },\r\n copyFormula: { tableMatrix },\r\n },\r\n } = getState();\r\n if (tableMatrix[elementId]) {\r\n if (elementCache.getElement({ elementId })) {\r\n dispatch(\r\n addElementToCopyFormulaSelectionAction({\r\n element: elementCache.getElement({ elementId }),\r\n }),\r\n );\r\n } else {\r\n // Try and get this element from element search result if not in elementcache\r\n dispatch(\r\n addElementToCopyFormulaSelectionAction({\r\n element: elementSearchResults.getElement({ elementId }),\r\n }),\r\n );\r\n }\r\n dispatch(\r\n selectElementContentPanel({\r\n elementIds: [elementId],\r\n color: ELEMENT_HIGHLIGHT_STATES.SELECTED_FOR_COPY_FORMULA,\r\n }),\r\n );\r\n }\r\n };\r\n\r\n//get the flattened structure of selected table, used for calculating new positions while pasting formula.\r\nexport const getTableMatrix = (table) => (dispatch, getstore) => {\r\n const elementCache = getstore().data.statementContent.elementCache;\r\n const dataTable = [];\r\n const rows = table.querySelectorAll('tr');\r\n let rowCounter = 0;\r\n let maxColumnValue = 0;\r\n rows.forEach((row) => {\r\n const tags = row.querySelectorAll(\"*[id*='CFTO_ELEMENT_']\"); //select tags which are elements\r\n if (tags.length > 0) {\r\n Array.from(tags).forEach((t) => {\r\n let columnValue =\r\n !isNullOrUndefined(elementCache[t.getAttribute('data-section-id')]) &&\r\n elementCache[t.getAttribute('data-section-id')].data.elements[\r\n t.getAttribute('data-element-id')\r\n ].data.columnNum;\r\n // I thought if I can calculate max column value here only, then I can simply pass this as\r\n // a parameter to 'removeUnwantedColumn' and this way I can skip additional computations\r\n // for calculating the total number of columns in a original table, inside 'removeUnwantedColumn'\r\n // function.\r\n maxColumnValue =\r\n maxColumnValue < columnValue ? columnValue : maxColumnValue;\r\n dataTable[t.getAttribute('data-element-id')] = {\r\n elementId: t.getAttribute('data-element-id'),\r\n value: t.innerText,\r\n row: rowCounter,\r\n column: columnValue,\r\n };\r\n });\r\n rowCounter++;\r\n }\r\n });\r\n return removeUnwantedColumn(dataTable, maxColumnValue);\r\n};\r\n\r\n// getting Table where selected element exist within the tables based on sectionId\r\nexport const getCurrentOCRTable = (elementDetails) => (dispatch, getState) => {\r\n const state = getState();\r\n const { ocrCache } = state.data.statementContent.sectionsCache;\r\n const { sectionId, coordinatesInInches } = elementDetails;\r\n const elementsTable =\r\n ocrCache.get(sectionId) &&\r\n ocrCache.get(sectionId).data &&\r\n ocrCache.get(sectionId).data.ocr &&\r\n ocrCache.get(sectionId).data.ocr.tables;\r\n\r\n // checking the whether element polygon is exist in table based on sectionId of Element if it is exist it will return respective table else return false\r\n const currentTableData = elementsTable.find((table) => {\r\n const [x1, y1, , , x3, y3] = JSON.parse(coordinatesInInches);\r\n const [tx1, ty1, , , tx3, ty3] = table.bounding_regions[0].polygon;\r\n const { innerRectangleLiesWithinOuterRectangle } =\r\n checkIfPolygonIsInsideAnotherPolygon(tx1, ty1, tx3, ty3, x1, y1, x3, y3);\r\n if (innerRectangleLiesWithinOuterRectangle) {\r\n return table;\r\n }\r\n });\r\n\r\n return { sectionId, currentTable: currentTableData };\r\n};\r\n\r\n// getting OCR table matrix data based selected elements Table\r\nexport const getOcrTableMatrix = (table) => (dispatch, getState) => {\r\n const { sectionId, currentTable } = table;\r\n const elementCache = getState().data.statementContent.elementCache;\r\n const currentTableBoundingRegion =\r\n currentTable &&\r\n currentTable.bounding_regions[0] &&\r\n currentTable.bounding_regions[0].polygon;\r\n // filtering table elements list by selected element id's sectionId\r\n const currentTablesSectionElements = Object.values(\r\n elementCache.getSection(sectionId).data.elements,\r\n );\r\n\r\n const elementsOnly = currentTablesSectionElements.filter((element) => {\r\n const { coordinatesInInches } = element;\r\n const [x1, y1, , , x3, y3] = JSON.parse(coordinatesInInches);\r\n const [tx1, ty1, , , tx3, ty3] = currentTableBoundingRegion;\r\n const { innerRectangleLiesWithinOuterRectangle } =\r\n checkIfPolygonIsInsideAnotherPolygon(tx1, ty1, tx3, ty3, x1, y1, x3, y3);\r\n if (innerRectangleLiesWithinOuterRectangle) {\r\n return element;\r\n }\r\n });\r\n\r\n // grouping the elements by column in wise the current table\r\n const groupingElementsByColumn = elementsOnly.reduce(\r\n (element, currentElement) => {\r\n const column = currentElement.columnNum;\r\n if (!element[column]) {\r\n element[column] = [];\r\n }\r\n element[column].push(currentElement);\r\n return element;\r\n },\r\n {},\r\n );\r\n\r\n // forming the tablematrix data based on grouped column data\r\n let tableMatrix = [];\r\n\r\n for (let key in groupingElementsByColumn) {\r\n let rowCount = 0;\r\n let entries = groupingElementsByColumn[key];\r\n entries.forEach((entry) => {\r\n let transformedObject = {\r\n elementId: entry.id.toString(),\r\n value: entry.display,\r\n row: rowCount,\r\n column: entry.columnNum,\r\n };\r\n tableMatrix[entry.id] = transformedObject;\r\n rowCount++;\r\n });\r\n }\r\n\r\n return tableMatrix;\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const OCR_DOC_TYPE = 2;\r\nexport default class SelectedStatement extends ApiModel({\r\n data: {\r\n statement: null,\r\n readOnlyOverride: false,\r\n },\r\n}) {\r\n get statement() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.statement;\r\n }\r\n return null;\r\n }\r\n\r\n get isOCR() {\r\n return (\r\n this.data.statement &&\r\n this.data.statement.documentProcessType === OCR_DOC_TYPE\r\n );\r\n }\r\n\r\n get isCftEnabled() {\r\n return this.data.statement && this.data.statement.isCftEnabled;\r\n }\r\n\r\n get dpi() {\r\n return this.data.statement && this.data.statement.dpi;\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.data.statement);\r\n }\r\n\r\n processResponse(response) {\r\n return { data: response };\r\n }\r\n\r\n setReadOnlyOverride(readOnly) {\r\n this.readOnlyOverride = readOnly;\r\n }\r\n\r\n isPendingApproval() {\r\n try {\r\n return this.data.statement.isPendingApproval();\r\n } catch (error) {\r\n return false;\r\n }\r\n }\r\n\r\n isWrappedUp() {\r\n try {\r\n return this.data.statement.isWrappedUp();\r\n } catch (error) {\r\n return false;\r\n }\r\n }\r\n\r\n isSoftDeleted() {\r\n try {\r\n return this.data.statement.isSoftDeleted();\r\n } catch (error) {\r\n return false;\r\n }\r\n }\r\n\r\n statementIsOldRevisions() {\r\n try {\r\n return (\r\n this.data.statement.revisionNumber < this.data.statement.latestRevision\r\n );\r\n } catch (error) {\r\n return false;\r\n }\r\n }\r\n\r\n isReadOnly() {\r\n try {\r\n return (\r\n this.data.statement.isSoftDeleted() ||\r\n this.data.statement.isInArchivalFlow() ||\r\n this.data.readOnlyOverride\r\n );\r\n } catch (error) {\r\n return false;\r\n }\r\n }\r\n\r\n isSideBySideMenuDisabled() {\r\n try {\r\n return (\r\n this.data.statement.isPendingApproval() ||\r\n this.data.statement.isWrappedUp() ||\r\n this.isReadOnly()\r\n );\r\n } catch (error) {\r\n return false;\r\n }\r\n }\r\n}\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const getRevisionsSectionsRequest = ({\r\n statementId,\r\n revisionId,\r\n onlyBookmarkSection = true,\r\n asTreeList = false,\r\n\r\n // for pages like side by side, we want to fetch section values for different (other than selected project) project,\r\n // hence we can pass context key and context value to make api call in desired project geo.\r\n\r\n // If context key is not passed, then by default call will be made in selected project geo\r\n contextKeyForApiCall,\r\n contextValue,\r\n}) =>\r\n withDefaultContextAsSelectedProject({\r\n contextKey: contextKeyForApiCall,\r\n contextValue,\r\n }).get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/sections`,\r\n {\r\n params: {\r\n bookmarkSection: onlyBookmarkSection ? 1 : 0,\r\n treeList: asTreeList ? 1 : 0,\r\n },\r\n },\r\n );\r\n\r\nexport const updateRevisionsSectionRequest = (\r\n revisionId,\r\n sectionId,\r\n sectionName,\r\n entity,\r\n) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/section`,\r\n {\r\n sectionId: sectionId,\r\n sectionName: sectionName,\r\n entity: entity,\r\n },\r\n );\r\n\r\nexport const deleteRevisionsSectionRequest = (\r\n revisionId,\r\n sectionId,\r\n sectionName,\r\n sectionReviewed,\r\n) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/section/delete`,\r\n {\r\n sectionId: sectionId,\r\n sectionName: sectionName,\r\n sectionReviewed: sectionReviewed,\r\n },\r\n );\r\n\r\nexport const reviewSectionRequest = (\r\n revisionId,\r\n sectionId,\r\n isSectionAlreadyReviewed,\r\n) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${sectionId}/reviews/add/reviewstatus/${\r\n isSectionAlreadyReviewed ? 1 : 0\r\n }`,\r\n );\r\n\r\nexport const deleteReviewSectionRequest = (\r\n revisionId,\r\n sectionId,\r\n isSectionAlreadyReviewed,\r\n) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${sectionId}/reviews/delete/reviewstatus/${\r\n isSectionAlreadyReviewed ? 1 : 0\r\n }`,\r\n );\r\n\r\nexport const getSectionReviewersRequest = ({\r\n revisionId,\r\n contextKey,\r\n contextValue,\r\n statementId,\r\n}) =>\r\n // for side by side page we want to make request in other project than currently selected project, so we need context key and value\r\n withDefaultContextAsSelectedProject({ contextKey, contextValue }).get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/reviews`,\r\n );\r\n\r\nexport const getSectionHistoryRequest = ({ revisionId, sectionId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${sectionId}/history`,\r\n );\r\n};\r\n\r\nexport const getSectionAssignments = ({ revisionId, sectionId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${sectionId}/assignments`,\r\n );\r\n};\r\n\r\nexport const createRevisionSectionAssignment = ({\r\n revisionId,\r\n sectionId,\r\n userIds,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/assignments`,\r\n {\r\n revisionId: revisionId,\r\n sectionId: sectionId,\r\n userIds: userIds,\r\n },\r\n );\r\n};\r\n\r\nexport const getAllSectionAssignments = ({ revisionId, statementId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/assignments`,\r\n );\r\n};\r\n\r\nexport const getElementsCountBySectionID = ({ revisionId, sectionId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${sectionId}/summary/elements`,\r\n );\r\n};\r\n\r\nexport const getNotesCountBySectionID = ({ revisionId, sectionId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${sectionId}/summary/notes`,\r\n );\r\n};\r\n","import { createAction } from 'redux-actions';\r\n\r\nimport { getStatementRequest } from 'api/statement-api';\r\nimport { chatBotPushIndexRequest } from 'api/chatbot-api';\r\nimport Statement from 'models/data/statement-model';\r\nimport { fetchRevision } from 'store/actions/revision-actions';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport { setIsComfortLetterEnabledAction } from './statement-summary/statement-summary-actions';\r\nimport { resetZoom } from './zoom-actions';\r\n\r\nexport const selectedStatementLoading = createAction(\r\n 'SELECTED_STATEMENT_LOADING',\r\n);\r\nexport const chatBotPushIndexLoading = createAction(\r\n 'CHAT_BOT_PUSH_INDEX_LOADING',\r\n);\r\nexport const selectedStatementLoaded = createAction(\r\n 'SELECTED_STATEMENT_LOADED',\r\n);\r\nexport const chatBotPushIndexLoaded = createAction(\r\n 'CHAT_BOT_PUSH_INDEX_LOADED',\r\n);\r\nexport const selectedStatementError = createAction('SELECTED_STATEMENT_ERROR');\r\nexport const chatBotPushIndexError = createAction('CHAT_BOT_PUSH_INDEX_ERROR');\r\nexport const clearSelectedStatement = createAction('CLEAR_SELECTED_STATEMENT');\r\n\r\nexport const fetchSelectedStatement =\r\n ({ revisionId, statementId }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n dispatch(selectedStatementLoading());\r\n const { data: statementData } = await getStatementRequest(statementId);\r\n const statement = new Statement(statementData);\r\n await dispatch(fetchRevision(revisionId));\r\n dispatch(setIsComfortLetterEnabledAction(statement.isCftEnabled));\r\n const { revision } = getState().data;\r\n\r\n const isLatestRevision =\r\n revision.revisionNumber === statement.latestRevision;\r\n dispatch(\r\n selectedStatementLoaded({\r\n statement,\r\n readOnlyOverride: revision.readOnly || !isLatestRevision,\r\n }),\r\n );\r\n dispatch(resetZoom());\r\n } catch (error) {\r\n dispatch(selectedStatementError(error));\r\n }\r\n };\r\n\r\nexport const chatBotPushIndex =\r\n ({ revisionId, statementId }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n dispatch(chatBotPushIndexLoading());\r\n const { name } = await chatBotPushIndexRequest();\r\n dispatch(\r\n chatBotPushIndexLoaded({\r\n name,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(chatBotPushIndexError(error));\r\n }\r\n };\r\n\r\nexport const checkIfFeatureFlagEnabled =\r\n ({ featureName }) =>\r\n (dispatch, getState) => {\r\n const { selectedStatement, featureInfo, selectedProject } =\r\n getState().data || {};\r\n const selectedStatementData =\r\n selectedStatement &&\r\n selectedStatement.data &&\r\n selectedStatement.data.statement;\r\n const selectedProjectGeo =\r\n selectedProject &&\r\n selectedProject.project &&\r\n selectedProject.project.geoCode;\r\n switch (featureName) {\r\n case FEATURE_NAMES.CARRY_FORWARD_META_DATA_DISABLED:\r\n return !featureInfo.getCarryForwardMetaDataEnabled(selectedProjectGeo);\r\n case FEATURE_NAMES.TECH_SUPPORT_STATEMENT_ACCESS_ENABLED:\r\n return featureInfo.getTechSupportStatementAccessEnabled(\r\n selectedProjectGeo,\r\n );\r\n case FEATURE_NAMES.SIDE_BY_SIDE_STATEMENT_ELEMENTS_MAP:\r\n return (\r\n window.TIEOUT &&\r\n window.TIEOUT.ENV &&\r\n window.TIEOUT.ENV.FEATURE &&\r\n window.TIEOUT.ENV.FEATURE.ENABLE_SIDE_BY_SIDE_STATEMENT_ELEMENTS_MAP\r\n );\r\n case FEATURE_NAMES.COMFORT_ASSIGNED_FEATURE:\r\n case FEATURE_NAMES.COMFORT_LETTER_FEATURE:\r\n return selectedStatementData && selectedStatementData.comfortLetter; // We are maintaining a common flag to enable/disable comfort letter and comfort assigned(comfortAssign)\r\n case FEATURE_NAMES.STATEMENT_PDF_UPLOAD_ENABLED:\r\n return featureInfo.getOCREnabled(selectedProjectGeo);\r\n case FEATURE_NAMES.CHATBOT_ENABLED:\r\n return (\r\n featureInfo.getChatBotEnabled(selectedProjectGeo) &&\r\n selectedProject.project.chatbotEnabled\r\n );\r\n default:\r\n return true;\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport { fetchAllSectionRenderingData } from './statement-content-actions';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\nimport { fetchAllOCRSectionRenderingData } from './statement-content-actions-ocr';\r\n\r\nexport const showStatusAndFlagAction = createAction(\r\n 'SHOW_STATUS_AND_FLAG_ACTION',\r\n);\r\n\r\nexport const hideStatusAndFlagAction = createAction(\r\n 'HIDE_STATUS_AND_FLAG_ACTION',\r\n);\r\n\r\nexport const showElementIdAction = createAction(\r\n 'SHOW_ELEMENT_ID_FOR_PREVIEW_PAGE_ACTION',\r\n);\r\n\r\nexport const hideElementIdAction = createAction(\r\n 'HIDE_ELEMENT_ID_FOR_PREVIEW_PAGE_ACTION',\r\n);\r\n\r\nexport const enableRefreshIconAction = createAction(\r\n 'ENABLE_REFRESH_ICON_FOR_PREVIEW_PAGE_ACTION',\r\n);\r\n\r\nexport const disableRefreshIconAction = createAction(\r\n 'DISABLE_REFRESH_ICON_FOR_PREVIEW_PAGE_ACTION',\r\n);\r\n\r\nexport const setFirstElementVisibleInViewPort = createAction(\r\n 'SET_FIRST_ELEMENT_VISIBLE_IN_VIEW_PORT',\r\n);\r\n\r\nexport const resetFirstElementVisibleInViewPort = createAction(\r\n 'RESET_FIRST_ELEMENT_VISIBLE_IN_VIEW_PORT',\r\n);\r\n\r\nexport const toggleSyncScrolling = createAction('TOGGLE_SYNC_SCROLLING');\r\nexport const setSyncScrolling = createAction('SET_SYNC_SCROLLING');\r\nexport const resetSyncScrolling = createAction('RESET_SYNC_SCROLLING');\r\n\r\nexport const fetchSectionContent = (sectionsInView) => (dispatch, getState) => {\r\n const isReportPreviewPage = isElementReportPreviewPage(\r\n window.location.pathname,\r\n );\r\n Array.isArray(sectionsInView) &&\r\n sectionsInView.forEach((sectionId) =>\r\n dispatch(\r\n fetchAllSectionRenderingData({ sectionId, isReportPreviewPage }),\r\n ),\r\n );\r\n};\r\n\r\nexport const fetchOCRSectionContent =\r\n (sectionMetaDataList) => (dispatch, getState) => {\r\n Array.isArray(sectionMetaDataList) &&\r\n sectionMetaDataList.forEach((sectionMetaData) =>\r\n dispatch(fetchAllOCRSectionRenderingData({ sectionMetaData })),\r\n );\r\n };\r\n\r\nexport const setFirstElementVisibleInViewPortAction =\r\n (isOCRStatement) => (dispatch, getState) => {\r\n const allElementIds = [];\r\n const leftView = document.getElementById(\r\n 'report-preview-page-left-panel-id__left-preview-html',\r\n );\r\n const ocrLeftView = document.getElementById(\r\n 'statement-content-panel-ocr__document-id',\r\n );\r\n const { sectionsInView } = getState().ui && getState().ui.statementPage;\r\n const view = isOCRStatement ? ocrLeftView : leftView;\r\n const leftViewBoundary = view && view.getBoundingClientRect();\r\n const sectionName = isOCRStatement\r\n ? 'statement-content-panel-page-'\r\n : 'REACT_SECTION_';\r\n for (let i of sectionsInView.sectionIds) {\r\n const id = `${sectionName}${i}`;\r\n const section = document.getElementById(id);\r\n if (section) {\r\n const elements = section.querySelectorAll('[id^=CFTO_ELEMENT_]');\r\n allElementIds.push(...elements);\r\n }\r\n }\r\n const viewPortElement = allElementIds.filter((element) => {\r\n if (element) {\r\n const boundary = element.getBoundingClientRect();\r\n return (\r\n boundary.top >= leftViewBoundary.top &&\r\n boundary.bottom <= leftViewBoundary.bottom\r\n );\r\n }\r\n });\r\n\r\n if (viewPortElement.length) {\r\n if (isOCRStatement) {\r\n const sortedElement = viewPortElement.sort((a, b) => {\r\n const posA = a.getBoundingClientRect().top;\r\n const posB = b.getBoundingClientRect().top;\r\n return posA - posB;\r\n });\r\n const firstViewPortElementId = parseInt(\r\n sortedElement[0].id.replace(/\\D/g, ''),\r\n );\r\n dispatch(setFirstElementVisibleInViewPort(firstViewPortElementId));\r\n } else {\r\n const firstViewPortElementId = viewPortElement[0].dataset.elementId;\r\n dispatch(setFirstElementVisibleInViewPort(firstViewPortElementId));\r\n }\r\n }\r\n };\r\n\r\nexport const onToggleSyncScroll = () => (dispatch, getState) => {\r\n const { isSyncScrollingEnabled } = getState().ui.previewPage;\r\n if (isSyncScrollingEnabled) {\r\n dispatch(resetFirstElementVisibleInViewPort());\r\n }\r\n dispatch(toggleSyncScrolling());\r\n};\r\n","import { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { getUserNameByUserData } from 'utils/statement-content-page-utils';\r\n\r\nexport const SIGN_OFF_HISTORY_OPTIONS = {\r\n REVIEW: 'REVIEW',\r\n UNREVIEW: 'UNREVIEW',\r\n LABEL_UPDATED: 'LABEL_UPDATED',\r\n ENTITY_UPDATED: 'ENTITY_UPDATED',\r\n CREATE: 'CREATE',\r\n ASSIGN_TO: 'ASSIGN_TO',\r\n ASSIGN_BY: 'ASSIGN_BY',\r\n UNASSIGN_TO: 'UNASSIGN_TO',\r\n UNASSIGN_BY: 'UNASSIGN_BY',\r\n UNASSIGN_ALL: 'UNASSIGN_ALL',\r\n};\r\n\r\nexport const reviewInfoButtonTooltip = (event) =>\r\n new TooltipOptions({\r\n text: 'section-details.status.review.information',\r\n id: 'section-details.info.button-verify-tooltip-id',\r\n position: 'bottom',\r\n event: event,\r\n });\r\nexport const hoverReviewTooltip = new TooltipOptions({\r\n text: 'section-details.status.review.checkbox.tooltip',\r\n id: 'section-details.checkbox.review-tooltip-id',\r\n position: 'left',\r\n});\r\nexport const SYSTEM_USER_NAME = 'System';\r\nexport const SECTION_HIGHLIGHT_STATES = {\r\n DEFAULT: 'default',\r\n CREATED_NAV: 'created-nav',\r\n PANEL_SELECTED: 'panel-selected',\r\n};\r\n\r\nexport const getUserMenuOptions = (users, assignedUsers) => {\r\n return users.map(\r\n (user) =>\r\n new MenuOption({\r\n id: user.id,\r\n title: getUserNameByUserData(user.id, users),\r\n value: user,\r\n isIntl: false,\r\n disabled: user.id in assignedUsers ? true : false,\r\n }),\r\n );\r\n};\r\n","import React from 'react';\r\n\r\nconst LOADING_BLOCK = 'loading';\r\n\r\nconst Loading = () => {\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default Loading;\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n cancelReportIdProcessingRequest,\r\n fetchToolkitReportList,\r\n} from 'api/statement-list-api';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\nimport {\r\n toggleExportPanel,\r\n toggleSubPanelWithinExport,\r\n} from './panel-controller-actions';\r\nimport {\r\n downloadReportFromGuidApiSelector,\r\n downloadReportNotification,\r\n getExportReportType,\r\n NOTIFICATION_TYPE,\r\n} from 'utils/statement-content-page-utils';\r\nimport {\r\n REPORT_DOWNLOAD_PROCESSING,\r\n REPORT_DOWNLOAD_PROCESSED,\r\n REPORT_DOWNLOAD_FAILED,\r\n} from '../../models/api/toolkit-export-download-list-model';\r\nimport { REPORT_TYPES } from 'store/actions/statement-list/statement-list-actions';\r\n\r\nexport const setDownloadData = createAction('SET_SINGLE_DOWNLOAD_DATA');\r\nexport const setDownloadListData = createAction('SET_DOWNLOAD_LIST_DATA');\r\nexport const updateDownloadStatus = createAction('UPDATE_DOWNLOAD_STATUS');\r\n\r\nexport const setDownloadDataLoading = createAction('DOWNLOAD_DATA_LOADING');\r\nexport const setDownloadDataLoaded = createAction('DOWNLOAD_DATA_LOADED');\r\nexport const setDownloadDataError = createAction('DOWNLOAD_DATA_ERROR');\r\nexport const clearDownloadData = createAction('CLEAR_DOWNLOAD_DATA');\r\n\r\n// To set loading, loaded, error for single reports\r\nexport const setReportIdLoading = createAction('REPORT_ID_LOADING_ACTION');\r\nexport const setReportIdLoaded = createAction('REPORT_ID_LOADED_ACTION');\r\nexport const setReportIdError = createAction('REPORT_ID_ERROR_ACTION');\r\nexport const updateFlagUserDownloadedReportStatus = createAction(\r\n 'UPDATE_FLAG_USER_DOWNLOADED_REPORT_STATUS',\r\n);\r\n\r\nexport const showDownloadTabInsideExport = () => (dispatch, getState) => {\r\n const {\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n } = getState();\r\n if (left !== LEFT_PANELS.EXPORT && left !== LEFT_PANELS.DOWNLOAD) {\r\n dispatch(toggleExportPanel(LEFT_PANELS.DOWNLOAD));\r\n } else if (left === LEFT_PANELS.EXPORT) {\r\n dispatch(toggleSubPanelWithinExport());\r\n }\r\n};\r\n\r\nexport const updateToolkitReportWithLoading =\r\n () => async (dispatch, getState) => {\r\n dispatch(setDownloadDataLoading());\r\n dispatch(updateReportWithLatestRecordWithoutLoading());\r\n };\r\n\r\nexport const updateReportWithLatestRecordWithoutLoading =\r\n () => async (dispatch, getState) => {\r\n const stateData = getState().data;\r\n const {\r\n revision: { id },\r\n toolkitExportPanel: { downloadProgressData },\r\n } = stateData;\r\n\r\n fetchToolkitReportList({ revisionId: id })\r\n .then((response) => {\r\n if (response && response.data && response.data.length > 0) {\r\n dispatch(setDownloadListData(response.data));\r\n }\r\n // if response is empty then set loaded with empty list\r\n else {\r\n dispatch(setDownloadDataLoaded());\r\n }\r\n })\r\n .catch((e) =>\r\n // We do not intend to block users activity for reports which is already available\r\n !(downloadProgressData && downloadProgressData.hasReports())\r\n ? dispatch(setDownloadDataError(e))\r\n : dispatch(setDownloadDataLoaded()),\r\n );\r\n };\r\n\r\nexport const cancelReportWithLoading =\r\n (reportId, name) => async (dispatch, getState) => {\r\n dispatch(setReportIdLoading({ id: reportId }));\r\n dispatch(cancelReportProcessingAction(reportId, name));\r\n };\r\n\r\nexport const cancelReportWithoutLoading =\r\n (reportId) => async (dispatch, getState) => {\r\n dispatch(cancelReportProcessingAction(reportId));\r\n };\r\n\r\nexport const cancelReportProcessingAction =\r\n (reportId, name) => async (dispatch, getState) => {\r\n const stateData = getState().data;\r\n const { revision } = stateData;\r\n try {\r\n await cancelReportIdProcessingRequest({\r\n revisionId: revision.id,\r\n reportId,\r\n reportName: name,\r\n });\r\n dispatch(\r\n updateDownloadStatus({\r\n id: reportId,\r\n downloadStatus: REPORT_DOWNLOAD_FAILED,\r\n downloadResponse: null,\r\n storageGuid: null,\r\n }),\r\n );\r\n } catch (e) {\r\n dispatch(setReportIdError({ id: reportId, error: e }));\r\n }\r\n };\r\n\r\n// This action method is to be called when we make an api call to send processing request\r\nexport const reportProcessingRequestAction =\r\n (response) => async (dispatch, getState) => {\r\n if (response.data.status === REPORT_DOWNLOAD_PROCESSING) {\r\n const reportType =\r\n response.data.reportType === REPORT_TYPES.AUDIT_TRAIL_REPORT\r\n ? `${REPORT_TYPES.AUDIT_TRAIL_REPORT} Trail`\r\n : response.data.reportType;\r\n response.data.reportType &&\r\n downloadReportNotification(reportType, NOTIFICATION_TYPE.SUCCESS);\r\n } else if (response.data.status === REPORT_DOWNLOAD_PROCESSED) {\r\n downloadReportNotification(undefined, NOTIFICATION_TYPE.PROCESSED);\r\n }\r\n dispatch(setDownloadData(response.data));\r\n };\r\n\r\n// This action method is designed to do upsert operation and I have tried my best to cover\r\n// all scenarios to choose whether to update or insert\r\nexport const downloadReportAction =\r\n (response) => async (dispatch, getState) => {\r\n const stateData = getState().data;\r\n const {\r\n toolkitExportPanel: { downloadProgressData },\r\n } = stateData;\r\n\r\n let modifiedResponse = {\r\n reportType: getExportReportType(response.reportType),\r\n id: response.reportId,\r\n downloadStatus: response.status,\r\n downloadResponse: response.byteDocument,\r\n storageGuid: response.storageGuid,\r\n revisionId: response.revisionId,\r\n fileName: response.fileName,\r\n // This might be a bit confusing. For BE, the field downlaodStatus is what we call userDownloadedReportStatus\r\n // and the field status is what we call downloadStatus. We need to interpret it correctly at our end.\r\n userDownloadedReportStatus: response.downloadedStatus,\r\n };\r\n try {\r\n // If downloadResponse already exists or byteDocument (byte code for report) already exists then\r\n // we do not want to make unnecessary api call for getting blob.\r\n // And we must have storage guid, in case we are making api calls for getting blob\r\n if (\r\n response.storageGuid &&\r\n response.status === REPORT_DOWNLOAD_PROCESSED &&\r\n !(\r\n (downloadProgressData &&\r\n downloadProgressData.hasReportId(response.reportId) &&\r\n downloadProgressData.getReportById(response.reportId)\r\n .downloadResponse) ||\r\n response.byteDocument\r\n )\r\n ) {\r\n let blobResponse = await downloadReportFromGuidApiSelector(\r\n modifiedResponse,\r\n );\r\n // eslint-disable-next-line require-atomic-updates\r\n response.downloadResponse = blobResponse;\r\n modifiedResponse.downloadResponse = blobResponse;\r\n }\r\n } catch (e) {\r\n // we do not want to show error pop up message for programs attempt to download report internally.\r\n // They can attempt again manually.\r\n console.error('error occured while downloading report internally', e);\r\n } finally {\r\n // finally block is required, since irrespective of, if the report download in the try block\r\n // was successfull or not, we want to update the status of report. The updated status will enable the\r\n // download icon, using which user can fire api call for downloading report.\r\n\r\n // if report already exists then update else insert new record\r\n if (\r\n downloadProgressData &&\r\n downloadProgressData.hasReportId(response.reportId) &&\r\n // we want to update only processing report and not already processed one\r\n downloadProgressData.getReportById(response.reportId).downloadStatus ===\r\n REPORT_DOWNLOAD_PROCESSING\r\n ) {\r\n let reportType =\r\n downloadProgressData &&\r\n downloadProgressData.hasReportId(response.reportId) &&\r\n downloadProgressData.getReportById(response.reportId).reportType;\r\n\r\n // Here we expect status to change from the following :\r\n // Processing to Processed\r\n // OR, Processing to Processing\r\n // OR, Processing to Failed\r\n await dispatch(updateDownloadStatus(modifiedResponse));\r\n\r\n // send notification to user about succesfull processing/download of report.\r\n // We want to show notification for, updates for which the old staus is processing\r\n // Irrespective of any report, the success notification is same, hence first argument for report type is undefined\r\n downloadProgressData.getReportById(response.reportId).downloadStatus ===\r\n REPORT_DOWNLOAD_PROCESSED &&\r\n downloadReportNotification(undefined, NOTIFICATION_TYPE.PROCESSED);\r\n\r\n reportType &&\r\n downloadProgressData.getReportById(response.reportId)\r\n .downloadStatus === REPORT_DOWNLOAD_FAILED &&\r\n downloadReportNotification(reportType, NOTIFICATION_TYPE.FAILURE);\r\n } else if (\r\n !(\r\n downloadProgressData &&\r\n downloadProgressData.hasReportId(response.reportId)\r\n )\r\n ) {\r\n dispatch(setDownloadData(response));\r\n }\r\n }\r\n };\r\n","import { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\n\r\nexport const JOB_TYPES = {\r\n PPMD: 'PPMD',\r\n ENGAGEMENT_OWNER: 'Engagement Owner',\r\n OBSERVER: 'Observer',\r\n PREPARER_REVIEWER: 'Preparer/Reviewer',\r\n ADMIN: 'ADMIN',\r\n COE: 'COE',\r\n};\r\n\r\nexport const USER_ROLE_OPTIONS_MAP = {\r\n [JOB_TYPES.PREPARER_REVIEWER]: new MenuOption({\r\n id: 'manage-users-preparer-reviewer-option',\r\n title: 'common.user-roles.preparer-reviewer',\r\n value: JOB_TYPES.PREPARER_REVIEWER,\r\n }),\r\n [JOB_TYPES.ENGAGEMENT_OWNER]: new MenuOption({\r\n id: 'manage-users-engagement-owner-option',\r\n title: 'common.user-roles.engagement-owner',\r\n value: JOB_TYPES.ENGAGEMENT_OWNER,\r\n }),\r\n [JOB_TYPES.OBSERVER]: new MenuOption({\r\n id: 'manage-users-observer-option',\r\n title: 'common.user-roles.observer',\r\n value: JOB_TYPES.OBSERVER,\r\n }),\r\n [JOB_TYPES.PPMD]: new MenuOption({\r\n id: 'manage-users-ppmd-option',\r\n title: 'common.user-roles.ppmd',\r\n value: JOB_TYPES.PPMD,\r\n }),\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { setElementSelectModeDefaultAction } from 'store/actions/modes-actions';\r\nimport {\r\n replaceSelectedElementsContentPanel,\r\n selectElementContentPanel,\r\n deallocateItems,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n getInternalReferenceByRevisionAndElementId,\r\n createOrAddToInternalReferenceRequest,\r\n detachElementFromInternalReferenceRequest,\r\n} from 'api/internal-reference-api';\r\n\r\nimport { updateCacheWithMostRecentElementChanges } from './element-changes-since-tracker-actions';\r\nimport { getElementDetailsWithoutLoading } from './element-panel-actions';\r\nimport { updateElementsSearchByIds } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { updateElementCacheByCalloutAction } from './element-cache-actions';\r\n\r\nexport const setInternalReferenceLoading = createAction(\r\n 'INTERNAL_REFERENCE_LOADING',\r\n);\r\nexport const setInternalReferenceLoaded = createAction(\r\n 'INTERNAL_REFERENCE_LOADED',\r\n);\r\nexport const setInternalReferenceLoadedWithoutPayload = createAction(\r\n 'INTERNAL_REFERENCE_LOADED_WITHOUT_PAYLOAD',\r\n);\r\nexport const setInternalReferenceError = createAction(\r\n 'INTERNAL_REFERENCE_ERROR',\r\n);\r\n\r\nexport const clearInternalReferenceAction = createAction(\r\n 'CLEAR_INTERNAL_REFERENCE',\r\n);\r\n\r\nexport const updateInternalReferenceElementsFromSocketAction = createAction(\r\n 'UPDATE_INTERNAL_REFERENCE_ELEMENTS_FROM_SOCKET_ACTION',\r\n);\r\n\r\nexport const updateInternalReferenceFromSocketAction = createAction(\r\n 'UPDATE_INTERNAL_REFERENCE_FROM_SOCKET_ACTION',\r\n);\r\n\r\nexport const getElementInternalReference = () => async (dispatch, getState) => {\r\n dispatch(setInternalReferenceLoading());\r\n dispatch(getInternalReferenceWithoutLoading());\r\n};\r\n\r\nexport const getInternalReferenceWithoutLoading =\r\n () => async (dispatch, getState) => {\r\n try {\r\n const { elementDetails } = getState().data.elementPanel;\r\n const response = await getInternalReferenceByRevisionAndElementId({\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n });\r\n dispatch(setInternalReferenceLoaded({ response }));\r\n } catch (error) {\r\n dispatch(setInternalReferenceError(error));\r\n }\r\n };\r\n\r\nexport const addElementToInternalReference =\r\n ({ targetElementId, isFromSuggestion }) =>\r\n async (dispatch, getState) => {\r\n const stateData = getState().data;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n const { elementDetails, internalReference } = stateData.elementPanel;\r\n const _clickedElementAlreadyApartOfIR =\r\n targetElementId.toString() === elementDetails.id.toString() ||\r\n internalReference.hasElement(targetElementId);\r\n if (_clickedElementAlreadyApartOfIR) {\r\n // do nothing if clicked owning element\r\n return;\r\n }\r\n\r\n dispatch(setInternalReferenceLoading());\r\n\r\n try {\r\n const response = await createOrAddToInternalReferenceRequest({\r\n revisionId: elementDetails.revisionId,\r\n sourceElementId: elementDetails.id,\r\n targetElementId,\r\n isFromSuggestion,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n dispatch(getElementDetailsWithoutLoading(elementDetails.id));\r\n dispatch(setInternalReferenceLoaded({ response }));\r\n dispatch(\r\n updateElementsSearchByIds({ elementIds: [elementDetails.id] }),\r\n );\r\n dispatch(updateCacheWithMostRecentElementChanges());\r\n } else {\r\n setTimeout(() => {\r\n dispatch(setInternalReferenceLoadedWithoutPayload());\r\n }, 5000);\r\n }\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: [elementDetails.id, targetElementId],\r\n showCallout: true,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(setInternalReferenceError(error));\r\n }\r\n };\r\n\r\nexport const detachElementFromInternalReference =\r\n ({ revisionId, internalReferenceId, elementId }) =>\r\n async (dispatch, getState) => {\r\n const { elementDetails } = getState().data.elementPanel;\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n\r\n dispatch(setInternalReferenceLoading());\r\n\r\n try {\r\n await detachElementFromInternalReferenceRequest({\r\n revisionId: elementDetails.revisionId,\r\n internalReferenceId: internalReferenceId,\r\n elementId: elementId,\r\n });\r\n /**\r\n * We have to fetch the element again as its flaggging display may have changed\r\n * after a internal reference is successfully detached.\r\n */\r\n if (socketHasBeenDisconnected) {\r\n dispatch(getElementDetailsWithoutLoading(elementDetails.id));\r\n // Update the appropriate elements in the cache to remove their annotation.\r\n dispatch(updateCacheWithMostRecentElementChanges());\r\n // Finally update the internal reference based on the element in the element panel.\r\n const response = await getInternalReferenceByRevisionAndElementId({\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n });\r\n dispatch(setInternalReferenceLoaded({ response }));\r\n dispatch(\r\n updateElementsSearchByIds({ elementIds: [elementDetails.id] }),\r\n );\r\n } else {\r\n setTimeout(() => {\r\n dispatch(setInternalReferenceLoadedWithoutPayload());\r\n }, 5000);\r\n }\r\n\r\n // Then update the highlighted elements on detach.\r\n dispatch(_updateElementHighlighting({ elementId: elementId }));\r\n } catch (error) {\r\n dispatch(setInternalReferenceError(error));\r\n }\r\n };\r\nconst _updateElementHighlighting =\r\n ({ elementId }) =>\r\n (dispatch, getState) => {\r\n const { elementDetails } = getState().data.elementPanel;\r\n // If it is not the element panel element, check if the element was highlighted before removing the highlight.\r\n if (elementId !== elementDetails.id) {\r\n const { selectedElementsMap } = getState().ui.statementPage;\r\n if (selectedElementsMap.has(elementId)) {\r\n dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementDetails.id],\r\n }),\r\n );\r\n }\r\n } else {\r\n // If the element was in fact the element panel element, simply set it as the only highlighted element.\r\n dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementDetails.id],\r\n }),\r\n );\r\n }\r\n };\r\n\r\nexport const clearInternalReference = () => (dispatch, getState) => {\r\n dispatch(clearInternalReferenceAction());\r\n const { elementDetails } = getState().data.elementPanel;\r\n dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementDetails.id],\r\n }),\r\n );\r\n dispatch(setElementSelectModeDefaultAction());\r\n};\r\n\r\nexport const selectElementFromInternalReference =\r\n ({ elementId }) =>\r\n (dispatch, getState) => {\r\n const { elementDetails } = getState().data.elementPanel;\r\n dispatch(deallocateItems());\r\n dispatch(\r\n replaceSelectedElementsContentPanel({\r\n elementIds: [elementId],\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n }),\r\n );\r\n dispatch(\r\n selectElementContentPanel({\r\n elementIds: [elementDetails.id],\r\n color: ELEMENT_HIGHLIGHT_STATES.DEFAULT,\r\n }),\r\n );\r\n };\r\n","import {\r\n LEFT_VIEW_DOCUMENT_ID,\r\n RIGHT_VIEW_DOCUMENT_ID,\r\n SIDE_BY_SIDE_VIEW_LEGACY_COMBINATION_STATEMENT,\r\n} from 'constants/feature/statement-content-constants';\r\nimport { SCALE_ALTERATION } from 'constants/feature/statement-content-constants';\r\nimport { isBothLegacyOrOCRInSideBySideView } from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport { getStore } from 'store/store';\r\n\r\nconst STATEMENT_PAGE_PADDING = 16;\r\nconst SYNC_SCROLL_TIMEOUT = 2000;\r\n\r\nexport const onSyncScroll = (isUserScrollingLeftView) => {\r\n const {\r\n syncScrollIds,\r\n modes: { blacklineViewMode },\r\n } = getStore().getState().ui.statementPage;\r\n let leftView = !blacklineViewMode\r\n ? document.getElementById(syncScrollIds.sourceId)\r\n : document.getElementById(LEFT_VIEW_DOCUMENT_ID);\r\n let rightView = !blacklineViewMode\r\n ? document.getElementById(syncScrollIds.targetId)\r\n : document.getElementById(RIGHT_VIEW_DOCUMENT_ID);\r\n\r\n if (isUserScrollingLeftView && leftView && rightView) {\r\n rightView.scrollTop = leftView.scrollTop;\r\n } else {\r\n leftView.scrollTop = rightView.scrollTop;\r\n }\r\n};\r\n\r\nconst onScrollRightStatementPage = () => onSyncScroll(false);\r\nconst onScrollLeftStatementPage = () => onSyncScroll(true);\r\n\r\nexport const registerLeftScrollListeners = (leftView) => {\r\n leftView && leftView.addEventListener('scroll', onScrollLeftStatementPage);\r\n};\r\n\r\nexport const registerRightScrollListeners = (rightView) => {\r\n rightView && rightView.addEventListener('scroll', onScrollRightStatementPage);\r\n};\r\n\r\nexport const deRegisterLeftScrollListeners = (leftView) => {\r\n leftView && leftView.removeEventListener('scroll', onScrollLeftStatementPage);\r\n};\r\n\r\nexport const deRegisterRightScrollListeners = (rightView) => {\r\n rightView &&\r\n rightView.removeEventListener('scroll', onScrollRightStatementPage);\r\n};\r\n\r\nconst getElementPositionOnPage = (dpi, zoom, elementDetails) => {\r\n const scale = SCALE_ALTERATION * (150 / dpi);\r\n const scaleWithZoom = scale * zoom.zoomRatio;\r\n const [x, y] = JSON.parse(elementDetails.polygonInPixel);\r\n const elementY = y * scaleWithZoom;\r\n const elementX = x * scaleWithZoom;\r\n return { elementX, elementY };\r\n};\r\n\r\nexport const getTotalSectionHeight = (\r\n sectionId,\r\n isLegacyStatementsSelected = false,\r\n documentId,\r\n) => {\r\n const canvas =\r\n isLegacyStatementsSelected && documentId\r\n ? document.getElementById(documentId)\r\n : document.getElementById('canvas-1');\r\n const { height } = canvas.getBoundingClientRect();\r\n const heightOfOnePage = height + STATEMENT_PAGE_PADDING * 2;\r\n const totalPageHeight = heightOfOnePage * (sectionId - 1);\r\n return totalPageHeight;\r\n};\r\n\r\nexport const syncScrollIntoView = ({\r\n isSyncScrollingMode,\r\n rowTitle,\r\n elementDetails,\r\n zoom,\r\n dpi,\r\n}) => {\r\n const rightView = document.getElementById(RIGHT_VIEW_DOCUMENT_ID);\r\n const leftView = document.getElementById(LEFT_VIEW_DOCUMENT_ID);\r\n\r\n const totalPageHeight = getTotalSectionHeight(elementDetails.sectionId);\r\n const { elementX, elementY } = getElementPositionOnPage(\r\n dpi,\r\n zoom,\r\n elementDetails,\r\n );\r\n\r\n const top = totalPageHeight + elementY;\r\n const left = elementX - STATEMENT_PAGE_PADDING * 2;\r\n const options = { top, left, behavior: 'smooth' };\r\n\r\n if (isSyncScrollingMode) {\r\n deRegisterLeftScrollListeners(leftView);\r\n deRegisterRightScrollListeners(rightView);\r\n\r\n if (leftView && rightView) {\r\n leftView.scrollTo(options);\r\n rightView.scrollTo(options);\r\n }\r\n\r\n setTimeout(() => {\r\n registerLeftScrollListeners(leftView);\r\n registerRightScrollListeners(rightView);\r\n }, SYNC_SCROLL_TIMEOUT);\r\n } else {\r\n const isLeftSectionScroll = rowTitle === 'Deleted';\r\n const view = isLeftSectionScroll ? leftView : rightView;\r\n view.scrollTo(options);\r\n }\r\n};\r\n\r\nexport const syncSideBySideScrollIntoView = async ({\r\n sectionId,\r\n isLeftView,\r\n}) => {\r\n const {\r\n syncScrollIds,\r\n modes: { sideBySideSyncScroll },\r\n } = getStore().getState().ui.statementPage;\r\n const leftView = document.getElementById(syncScrollIds.sourceId);\r\n const rightView = document.getElementById(syncScrollIds.targetId);\r\n const isLegacyStatementsSelected =\r\n isBothLegacyOrOCRInSideBySideView() ===\r\n SIDE_BY_SIDE_VIEW_LEGACY_COMBINATION_STATEMENT;\r\n\r\n const documentId = isLeftView\r\n ? syncScrollIds.sourceId\r\n : syncScrollIds.targetId;\r\n const totalPageHeight = getTotalSectionHeight(\r\n sectionId,\r\n isLegacyStatementsSelected,\r\n documentId,\r\n );\r\n\r\n const top = totalPageHeight;\r\n const options = { top, behavior: 'smooth' };\r\n\r\n if (sideBySideSyncScroll) {\r\n deRegisterLeftScrollListeners(leftView);\r\n deRegisterRightScrollListeners(rightView);\r\n\r\n if (leftView && rightView) {\r\n leftView.scrollTo(options);\r\n rightView.scrollTo(options);\r\n }\r\n\r\n setTimeout(() => {\r\n registerLeftScrollListeners(leftView);\r\n registerRightScrollListeners(rightView);\r\n }, SYNC_SCROLL_TIMEOUT);\r\n }\r\n};\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\nimport ElementSelection from 'models/data/element-selection-model';\r\n\r\nconst HighlightOptions = {\r\n padding: 1,\r\n color: 'rgba(255, 230, 127,0.5)',\r\n baseColor: 'rgba(160, 220, 255, 0.6)',\r\n bookends: '#00A3E0',\r\n};\r\n\r\nconst getMinDistance = (word, point) => {\r\n let dx = Math.max(word[0] - point.x, 0, point.x - word[4]);\r\n let dy = Math.max(word[1] - point.y, 0, point.y - word[5]);\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nconst getClosestWord = (x, y, ocr, metadata) => {\r\n let closest = {\r\n min: null,\r\n content: null,\r\n polygon: null,\r\n span: null,\r\n page: null,\r\n };\r\n if (!ocr) {\r\n return;\r\n }\r\n ocr.forEach(({ content, polygon, span }) => {\r\n const isInside =\r\n polygon[0] < x && x < polygon[4] && polygon[1] < y && y < polygon[5];\r\n let distance = 0;\r\n if (!isInside) {\r\n distance = getMinDistance(polygon, { x, y });\r\n }\r\n if ((closest.min === null || distance < closest.min) && distance < 15) {\r\n closest = {\r\n min: distance,\r\n content: content,\r\n polygon: polygon,\r\n span: span,\r\n page: metadata.sectionId,\r\n };\r\n }\r\n });\r\n return closest;\r\n};\r\n\r\nconst getText = (start, end, ocr) => {\r\n let firstIndex = ocr.findIndex(({ span }) => span.offset === start);\r\n let secondIndex = ocr.findIndex(({ span }) => span.offset === end);\r\n let characterRange = ocr.slice(firstIndex, secondIndex + 1);\r\n let text = '';\r\n characterRange.forEach(({ content }) => {\r\n text += content + ' ';\r\n });\r\n return { text, characterRange };\r\n};\r\n\r\nconst textBlockEnds = (firstElement, lastElement, canvas) => {\r\n //Thickness of bookends is based on the height of the text on the appropriate element\r\n let w1 = (firstElement.y2 - firstElement.y1) / 5;\r\n let w2 = (lastElement.y2 - lastElement.y1) / 5;\r\n const padding = HighlightOptions.padding;\r\n let ctx = canvas.getContext('2d');\r\n ctx.beginPath();\r\n ctx.fillStyle = HighlightOptions.bookends;\r\n //First bookend\r\n ctx.fillRect(\r\n firstElement.x1 - w1,\r\n firstElement.y1 - padding,\r\n w1,\r\n firstElement.y2 - firstElement.y1 + padding * 2,\r\n );\r\n ctx.arc(\r\n firstElement.x1 - w1 + w1 / 2,\r\n firstElement.y1 - w1 * 1.5,\r\n w1 * 1.5,\r\n 0,\r\n 2 * Math.PI,\r\n );\r\n ctx.fill();\r\n //Last bookend\r\n ctx.fillRect(\r\n lastElement.x2,\r\n lastElement.y1 - padding,\r\n w2,\r\n lastElement.y2 - lastElement.y1 + padding * 2,\r\n );\r\n ctx.arc(\r\n lastElement.x2 + w2 / 2,\r\n lastElement.y2 + w2 * 1.5,\r\n w2 * 1.5,\r\n 0,\r\n 2 * Math.PI,\r\n );\r\n ctx.fill();\r\n ctx.closePath();\r\n};\r\n\r\nconst renderSelection = (lines, canvas) => {\r\n const context = canvas.getContext('2d');\r\n context.fillStyle = HighlightOptions.baseColor;\r\n lines.forEach((line) => {\r\n let { x1, x2, y1, y2 } = line;\r\n context.beginPath();\r\n context.fillRect(\r\n x1,\r\n y1 - HighlightOptions.padding,\r\n x2 - x1,\r\n y2 - y1 + 2 * HighlightOptions.padding,\r\n );\r\n context.stroke();\r\n });\r\n if (lines.length) textBlockEnds(lines[0], lines[lines.length - 1], canvas);\r\n};\r\n\r\nconst processCharacterRangeAsTextLines = (characterRange) => {\r\n if (characterRange && characterRange.length > 0) {\r\n let lines = [];\r\n let currentLine = {\r\n x1: characterRange[0].polygon[0],\r\n x2: characterRange[0].polygon[4],\r\n y1: characterRange[0].polygon[1],\r\n y2: characterRange[0].polygon[5],\r\n };\r\n characterRange.forEach(({ polygon }) => {\r\n let line_grouping_percentage = 0.5;\r\n let height = currentLine.y2 - currentLine.y1;\r\n if (\r\n polygon[1] >= currentLine.y1 - height * line_grouping_percentage &&\r\n polygon[5] <= currentLine.y2 + height * line_grouping_percentage\r\n ) {\r\n currentLine = {\r\n x1: currentLine.x1,\r\n x2: polygon[4],\r\n y1: currentLine.y1 <= polygon[1] ? currentLine.y1 : polygon[1],\r\n y2: currentLine.y2 >= polygon[5] ? currentLine.y2 : polygon[5],\r\n };\r\n } else {\r\n lines.push(currentLine);\r\n currentLine = {\r\n x1: polygon[0],\r\n x2: polygon[4],\r\n y1: polygon[1],\r\n y2: polygon[5],\r\n };\r\n }\r\n });\r\n lines.push(currentLine);\r\n return lines;\r\n }\r\n return [];\r\n};\r\n\r\nconst highlightElement = (context, boundary, style, padding) => {\r\n if (style) {\r\n context.fillStyle = style;\r\n }\r\n context.fillRect(\r\n boundary[0],\r\n boundary[1],\r\n boundary[2] - boundary[0] + padding,\r\n boundary[5] - boundary[3],\r\n );\r\n};\r\n\r\nconst checkIfPolygonIsInsideAnotherPolygon = (\r\n parentX1,\r\n parentY1,\r\n parentX3,\r\n parentY3,\r\n childX1,\r\n childY1,\r\n childX3,\r\n childY3,\r\n table = false,\r\n) => {\r\n const minX = Math.min(parentX1, parentX3);\r\n const maxX = Math.max(parentX1, parentX3);\r\n const minY = Math.min(parentY1, parentY3);\r\n const maxY = Math.max(parentY1, parentY3);\r\n\r\n let innerRectangleIntersectsOuterRectangle =\r\n (childX1 >= minX &&\r\n childX1 <= maxX &&\r\n childY1 >= minY &&\r\n childY1 <= maxY) ||\r\n (childX3 >= minX &&\r\n childX3 <= maxX &&\r\n childY3 >= minY &&\r\n childY3 <= maxY) ||\r\n (childX1 >= minX &&\r\n childX1 <= maxX &&\r\n childY3 >= minY &&\r\n childY3 <= maxY) ||\r\n (childX3 >= minX && childX3 <= maxX && childY1 >= minY && childY1 <= maxY);\r\n\r\n let outerRectangleIntersectsInnerRectangle =\r\n (minX >= childX1 &&\r\n minX <= childX3 &&\r\n minY >= childY1 &&\r\n minY <= childY3) ||\r\n (minX >= childX1 &&\r\n minX <= childX3 &&\r\n maxY >= childY1 &&\r\n maxY <= childY3) ||\r\n (maxX >= childX1 &&\r\n maxX <= childX3 &&\r\n minY >= childY1 &&\r\n minY <= childY3) ||\r\n (maxX >= childX1 && maxX <= childX3 && maxY >= childY1 && maxY <= childY3);\r\n\r\n let innerRectangleLiesWithinOuterRectangle;\r\n\r\n if (table) {\r\n const tolerance = 2;\r\n innerRectangleLiesWithinOuterRectangle =\r\n childX1 >= parentX1 - tolerance &&\r\n childY1 >= parentY1 - tolerance &&\r\n childX3 <= parentX3 + tolerance &&\r\n childY3 <= parentY3 + tolerance;\r\n } else {\r\n innerRectangleLiesWithinOuterRectangle =\r\n childX1 < maxX && childX3 > minX && childY1 < maxY && childY3 > minY;\r\n }\r\n\r\n return {\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n innerRectangleLiesWithinOuterRectangle,\r\n };\r\n};\r\n\r\nexport const checkIsArrayOfArrays = (arr) => {\r\n if (!Array.isArray(arr)) {\r\n return false;\r\n }\r\n return arr.every((element) => Array.isArray(element));\r\n};\r\n\r\nconst selectedElementInBatch = ({\r\n context,\r\n elementDetails,\r\n scale,\r\n batchUpdateCoordinates = {},\r\n batchUpdateElements = [],\r\n}) => {\r\n if (isNullOrUndefined(elementDetails)) {\r\n return null;\r\n } else if (\r\n batchUpdateCoordinates &&\r\n batchUpdateCoordinates.starting &&\r\n batchUpdateCoordinates.starting.x &&\r\n batchUpdateCoordinates.ending.x &&\r\n batchUpdateCoordinates.starting.y &&\r\n batchUpdateCoordinates.ending.y\r\n ) {\r\n const { coordinatesInPixel } = elementDetails;\r\n\r\n if (coordinatesInPixel && checkIsArrayOfArrays(coordinatesInPixel)) {\r\n coordinatesInPixel.forEach((coord) => {\r\n let polygonInPixel = coord.map((childCoord) => {\r\n return parseFloat(childCoord) * scale;\r\n });\r\n const {\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n innerRectangleLiesWithinOuterRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n batchUpdateCoordinates.starting.x,\r\n batchUpdateCoordinates.starting.y,\r\n batchUpdateCoordinates.ending.x,\r\n batchUpdateCoordinates.ending.y,\r\n polygonInPixel[0],\r\n polygonInPixel[1],\r\n polygonInPixel[4],\r\n polygonInPixel[5],\r\n );\r\n if (\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle ||\r\n innerRectangleLiesWithinOuterRectangle\r\n ) {\r\n batchUpdateElements.push(\r\n new ElementSelection({\r\n elementId: Number.parseInt(elementDetails.id),\r\n sectionId: Number.parseInt(elementDetails.sectionId),\r\n }),\r\n );\r\n }\r\n });\r\n } else if (coordinatesInPixel && coordinatesInPixel.length) {\r\n let polygonInPixel = coordinatesInPixel.map((coord) => {\r\n return parseFloat(coord) * scale;\r\n });\r\n const {\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n innerRectangleLiesWithinOuterRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n batchUpdateCoordinates.starting.x,\r\n batchUpdateCoordinates.starting.y,\r\n batchUpdateCoordinates.ending.x,\r\n batchUpdateCoordinates.ending.y,\r\n polygonInPixel[0],\r\n polygonInPixel[1],\r\n polygonInPixel[4],\r\n polygonInPixel[5],\r\n );\r\n if (\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle ||\r\n innerRectangleLiesWithinOuterRectangle\r\n ) {\r\n batchUpdateElements.push(\r\n new ElementSelection({\r\n elementId: Number.parseInt(elementDetails.id),\r\n sectionId: Number.parseInt(elementDetails.sectionId),\r\n }),\r\n );\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst clearCanvas = (canvas) => {\r\n canvas.getContext('2d').clearRect(0, 0, canvas.width, canvas.height);\r\n};\r\n\r\n//Function to get mouse coordinates on mouse event\r\nconst getMouseCoordinates = (e, overlayCanvas) => {\r\n const canvas = overlayCanvas.current;\r\n return {\r\n x: e.clientX - canvas.getBoundingClientRect().left,\r\n y: e.clientY - canvas.getBoundingClientRect().top,\r\n };\r\n};\r\n\r\nexport {\r\n getMouseCoordinates,\r\n checkIfPolygonIsInsideAnotherPolygon,\r\n clearCanvas,\r\n getText,\r\n getClosestWord,\r\n renderSelection,\r\n highlightElement,\r\n processCharacterRangeAsTextLines,\r\n selectedElementInBatch,\r\n};\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport { checkIfFeatureFlagEnabled } from 'store/actions/selected-statement-actions';\r\n\r\nexport const FeatureFlagComponent = ({\r\n name,\r\n children,\r\n fallback,\r\n checkIfFeatureFlagEnabled,\r\n}) => {\r\n const show = checkIfFeatureFlagEnabled({ featureName: name });\r\n\r\n if (show) return <>{children};\r\n else if (fallback) return <>{fallback};\r\n else return null;\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n checkIfFeatureFlagEnabled,\r\n};\r\n\r\nFeatureFlagComponent.propTypes = {\r\n // name of the feature\r\n name: PropTypes.string.isRequired,\r\n // component to be rendered if feature with mentioned name is enabled\r\n children: PropTypes.node,\r\n // fallback component if feature is not enabled and we want to render different component for that case\r\n fallback: PropTypes.node,\r\n // action method to check if feature flag is enabled for the feature with mentioned name\r\n checkIfFeatureFlagEnabled: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default connect(null, mapDispatchToProps)(FeatureFlagComponent);\r\n","import { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\n\r\n// Backend ENUM ids\r\nexport const SCALING_TYPES = {\r\n ONES: 1,\r\n THOUSANDS: 2,\r\n MILLIONS: 3,\r\n BILLIONS: 4,\r\n TRILLIONS: 5,\r\n OTHER: 6,\r\n};\r\n\r\nexport const SCALING_OPTIONS_MAP = new Map();\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.ONES,\r\n new MenuOption({\r\n id: SCALING_TYPES.ONES,\r\n title: 'element-panel.amount-attribute.scaling.option.ONES',\r\n value: SCALING_TYPES.ONES,\r\n })\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.THOUSANDS,\r\n new MenuOption({\r\n id: SCALING_TYPES.THOUSANDS,\r\n title: 'element-panel.amount-attribute.scaling.option.THOUSANDS',\r\n value: SCALING_TYPES.THOUSANDS,\r\n })\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.MILLIONS,\r\n new MenuOption({\r\n id: SCALING_TYPES.MILLIONS,\r\n title: 'element-panel.amount-attribute.scaling.option.MILLIONS',\r\n value: SCALING_TYPES.MILLIONS,\r\n })\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.BILLIONS,\r\n new MenuOption({\r\n id: SCALING_TYPES.BILLIONS,\r\n title: 'element-panel.amount-attribute.scaling.option.BILLIONS',\r\n value: SCALING_TYPES.BILLIONS,\r\n })\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.TRILLIONS,\r\n new MenuOption({\r\n id: SCALING_TYPES.TRILLIONS,\r\n title: 'element-panel.amount-attribute.scaling.option.TRILLIONS',\r\n value: SCALING_TYPES.TRILLIONS,\r\n })\r\n);\r\nSCALING_OPTIONS_MAP.set(\r\n SCALING_TYPES.OTHER,\r\n new MenuOption({\r\n id: SCALING_TYPES.OTHER,\r\n title: 'element-panel.amount-attribute.scaling.option.OTHER',\r\n value: SCALING_TYPES.OTHER,\r\n })\r\n);\r\n\r\nexport const SCALING_OPTIONS = Array.from(SCALING_OPTIONS_MAP.values());\r\n\r\n// Backend ENUM ids\r\nexport const UNIT_TYPES = {\r\n CURRENCY: 1,\r\n PERCENTAGE: 2,\r\n SHARES: 3,\r\n TEXT: 4,\r\n OTHER: 5,\r\n};\r\n\r\nexport const UNIT_OPTIONS_MAP = new Map();\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.CURRENCY,\r\n new MenuOption({\r\n id: UNIT_TYPES.CURRENCY,\r\n title: 'element-panel.amount-attribute.unit.option.CURRENCY',\r\n value: UNIT_TYPES.CURRENCY,\r\n })\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.PERCENTAGE,\r\n new MenuOption({\r\n id: UNIT_TYPES.PERCENTAGE,\r\n title: 'element-panel.amount-attribute.unit.option.PERCENTAGE',\r\n value: UNIT_TYPES.PERCENTAGE,\r\n })\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.SHARES,\r\n new MenuOption({\r\n id: UNIT_TYPES.SHARES,\r\n title: 'element-panel.amount-attribute.unit.option.SHARES',\r\n value: UNIT_TYPES.SHARES,\r\n })\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.TEXT,\r\n new MenuOption({\r\n id: UNIT_TYPES.TEXT,\r\n title: 'element-panel.amount-attribute.unit.option.TEXT',\r\n value: UNIT_TYPES.TEXT,\r\n })\r\n);\r\nUNIT_OPTIONS_MAP.set(\r\n UNIT_TYPES.OTHER,\r\n new MenuOption({\r\n id: UNIT_TYPES.OTHER,\r\n title: 'element-panel.amount-attribute.unit.option.OTHER',\r\n value: UNIT_TYPES.OTHER,\r\n })\r\n);\r\n\r\nexport const UNIT_OPTIONS = Array.from(UNIT_OPTIONS_MAP.values());\r\n","import BaseModel from 'models/base-model';\r\nimport {\r\n STATEMENT_STATUS_LABELS,\r\n STATEMENT_STATUS_ENUM,\r\n} from 'constants/feature/statement-list-constants';\r\n\r\nexport default class Statement extends BaseModel({\r\n accountingBasis: null,\r\n originalAccountingBasis: null,\r\n archiveDate: null,\r\n clientEntity: null,\r\n clientId: null,\r\n fiscalYear: null,\r\n originalFiscalYear: null,\r\n hasBeenOpenedByUser: false,\r\n id: null,\r\n statementDisplayId: null,\r\n lastModifiedBy: null,\r\n lastModifiedDate: null,\r\n revisionId: null,\r\n revisionLastModifiedBy: null,\r\n revisionLastModifiedByName: null,\r\n revisionLastModifiedDate: null,\r\n revisionNumber: null,\r\n legalHoldDisabled: null,\r\n numElements: null,\r\n numElementsCompleted: null,\r\n percentageCompleted: null,\r\n periodEnding: null,\r\n originalPeriodEnding: null,\r\n quarter: null,\r\n originalQuarter: null,\r\n registrant: null,\r\n originalRegistrant: null,\r\n signedDate: null,\r\n signedUser: null,\r\n statementName: null,\r\n statementTypeId: null,\r\n originalStatementTypeId: null,\r\n status: null,\r\n type: null,\r\n originalType: null,\r\n wrapUpSubmissionUserId: null, // id of user who submitted statement for wrap up approval\r\n activeRevisionsCount: 0,\r\n sentBy: null,\r\n sentDate: null,\r\n omDocumentState: null,\r\n omExportStatus: null,\r\n omExportErrorInfo: null,\r\n legalHold: null,\r\n comfortLetter: null,\r\n isImported: false,\r\n techSupportAccess: false,\r\n pinnedDatetime: null,\r\n}) {\r\n constructor(props) {\r\n super(props);\r\n // First setup the original fields which cannot be edited on the model.\r\n const {\r\n accountingBasis,\r\n fiscalYear,\r\n periodEnding,\r\n quarter,\r\n registrant,\r\n statementTypeId,\r\n type,\r\n legalHold,\r\n isCftEnabled,\r\n techSupportAccess,\r\n } = props;\r\n this.originalAccountingBasis = accountingBasis;\r\n this.originalFiscalYear = fiscalYear;\r\n this.originalPeriodEnding = periodEnding;\r\n this.originalQuarter = quarter;\r\n this.originalRegistrant = registrant;\r\n this.originalStatementTypeId = statementTypeId;\r\n this.originalType = type;\r\n this.legalHold = legalHold;\r\n this.comfortLetter = isCftEnabled;\r\n this.techSupportAccess = techSupportAccess;\r\n // Next map the editable and display fields to the model.\r\n if (props.statementDisplayEntity) {\r\n const { statementDisplayEntity } = props;\r\n this.statementDisplayId = statementDisplayEntity.id;\r\n this.accountingBasis = statementDisplayEntity.accountingBasis;\r\n this.fiscalYear = statementDisplayEntity.fiscalYear;\r\n this.periodEnding = statementDisplayEntity.periodEnding;\r\n this.quarter = statementDisplayEntity.quarter;\r\n this.registrant = statementDisplayEntity.registrant;\r\n this.statementTypeId = statementDisplayEntity.statementTypeId;\r\n this.type = statementDisplayEntity.type;\r\n }\r\n\r\n delete this.statementDisplayEntity;\r\n }\r\n\r\n toEditApiFormat() {\r\n return {\r\n ...this,\r\n clientId: parseInt(this.clientId),\r\n accountingBasis: this.originalAccountingBasis,\r\n fiscalYear: this.originalFiscalYear,\r\n periodEnding: this.originalPeriodEnding,\r\n quarter: this.orignalQuarter,\r\n registrant: this.originalRegistrant,\r\n statementTypeId: this.originalStatementTypeId,\r\n legalHold: this.legalHold,\r\n autoIdentifyIrs: this.autoIdentifyIrs,\r\n statementDisplayEntity: {\r\n accountingBasis: this.accountingBasis,\r\n fiscalYear: this.fiscalYear,\r\n id: this.statementDisplayId,\r\n periodEnding: this.periodEnding,\r\n quarter: this.quarter,\r\n registrant: this.registrant,\r\n statementId: this.statementId,\r\n statementTypeId: this.statementTypeId,\r\n },\r\n };\r\n }\r\n\r\n get percentageComplete() {\r\n return (\r\n //this equation gets the % verified to two decimal places. That is what multiplying by 100 a second time does.\r\n //if you wanted 3 decimal places you would multiply by 1000.\r\n Math.round(this.percentageCompleted * 100)\r\n );\r\n }\r\n\r\n get quarterNumber() {\r\n if (this.quarter && this.quarter !== 'NONE') {\r\n return this.quarter.slice(-1);\r\n }\r\n return 0;\r\n }\r\n\r\n get originalQuarterNumber() {\r\n if (this.originalQuarter && this.originalQuarter !== 'NONE') {\r\n return this.originalQuarter.slice(-1);\r\n }\r\n return 0;\r\n }\r\n\r\n getStatementRevisions() {\r\n return this.activeRevisionEntities\r\n .concat(this.deletedRevisionEntities)\r\n .sort((a, b) => {\r\n return parseInt(a.revisionNumber) < parseInt(b.revisionNumber) ? -1 : 1;\r\n });\r\n }\r\n\r\n statementHasMultipleRevisions() {\r\n return this.revisionNumber > 1;\r\n }\r\n\r\n isSoftDeleted() {\r\n return this.getStatementStatus().id === STATEMENT_STATUS_LABELS.DELETED.id;\r\n }\r\n\r\n getStatementStatus() {\r\n return STATEMENT_STATUS_LABELS[STATEMENT_STATUS_ENUM[this.status]];\r\n }\r\n\r\n setHasBeenOpenedByUser(hasBeenOpenedByUser) {\r\n return this.merge({ ...this, hasBeenOpenedByUser });\r\n }\r\n\r\n isInArchivalFlow() {\r\n const status = this.getStatementStatus();\r\n const { PENDING_APPROVAL, ARCHIVED, APPROVAL_INITIATED } =\r\n STATEMENT_STATUS_LABELS;\r\n return (\r\n status === PENDING_APPROVAL ||\r\n status === ARCHIVED ||\r\n status === APPROVAL_INITIATED\r\n );\r\n }\r\n isLegalHoldSet() {\r\n return this.legalHold;\r\n }\r\n isPendingApproval() {\r\n return (\r\n this.getStatementStatus() === STATEMENT_STATUS_LABELS.PENDING_APPROVAL\r\n );\r\n }\r\n\r\n hasApprovalInitiated() {\r\n return (\r\n this.getStatementStatus() === STATEMENT_STATUS_LABELS.APPROVAL_INITIATED\r\n );\r\n }\r\n\r\n isWrappedUp() {\r\n return this.getStatementStatus() === STATEMENT_STATUS_LABELS.ARCHIVED;\r\n }\r\n\r\n shouldShowRevertToPreviousRevisionOption() {\r\n return parseInt(this.activeRevisionsCount) >= 2;\r\n }\r\n}\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { useIntl } from 'react-intl';\r\nimport FormItem from 'components/common/form-item-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { isNullOrUndefined } from '../../utils/object-utils';\r\n\r\nconst TEXT_INPUT_BLOCK = 'text-input';\r\n\r\nconst TextInput = React.forwardRef(\r\n (\r\n {\r\n className,\r\n disabled,\r\n errorText,\r\n id,\r\n isValid,\r\n label,\r\n maxLength,\r\n onChange,\r\n onBlur,\r\n placeholder,\r\n tooltip,\r\n type,\r\n value,\r\n width,\r\n onFocus,\r\n onPaste,\r\n pattern,\r\n },\r\n ref,\r\n ) => {\r\n const intl = useIntl();\r\n const handleOnChangeWithPattern = (event) => {\r\n const value = event.target.value;\r\n if (value === '' || pattern.test(value)) {\r\n onChange(value);\r\n } else {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n return (\r\n \r\n handleOnChangeWithPattern(e)\r\n : (e) => onChange(e.target.value)\r\n }\r\n onBlur={onBlur}\r\n onFocus={onFocus}\r\n onPaste={onPaste}\r\n placeholder={\r\n placeholder ? intl.formatMessage({ id: placeholder }) : ''\r\n }\r\n rows=\"10\"\r\n type={type}\r\n value={value}\r\n width={width}\r\n ref={ref}\r\n />\r\n \r\n );\r\n },\r\n);\r\n\r\nTextInput.propTypes = {\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** Boolean representing if component should be disabled state */\r\n disabled: PropTypes.bool,\r\n /** Unique string id for text area */\r\n id: PropTypes.string.isRequired,\r\n /** Internationalized sting id passed to form item */\r\n label: PropTypes.string,\r\n /** Maximum text input length */\r\n maxLength: PropTypes.number,\r\n /** Function fired on user input, returns value */\r\n onChange: PropTypes.func.isRequired,\r\n /** Function fired on blur */\r\n onBlur: PropTypes.func,\r\n /** Internationalized sting id */\r\n placeholder: PropTypes.string,\r\n /** Object with tool tip options passed to form item */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /** String value of type of input field */\r\n type: PropTypes.string.isRequired,\r\n /** Current value of the text input*/\r\n value: PropTypes.string,\r\n /** String percentage representing width of component passed to form item */\r\n width: PropTypes.string,\r\n /** Function fired on focus */\r\n onFocus: PropTypes.func,\r\n /** Function fired on paste of text into the input box */\r\n onPaste: PropTypes.func,\r\n /** The optional regex pattern for this text input box to block input of invalid characters or strings*/\r\n pattern: PropTypes.instanceOf(RegExp),\r\n};\r\n\r\nexport default TextInput;\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const createElementTickmarkRequest = ({ tickmarkModel }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${\r\n tickmarkModel.revisionId\r\n }/elements/${tickmarkModel.elementId}/tickmarks`,\r\n tickmarkModel.toApiFormat(),\r\n );\r\n\r\nexport const getElementTickmarksRequest = ({ revisionId, elementId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/tickmarks`,\r\n /*\r\n // ordinal asc - returns the list sorted by ordinal order {a}, {b}, {c}\r\n // default is created_date desc - returns the list sorted by elements attached order\r\n {\r\n params: {\r\n sortDirection: 'asc',\r\n sortBy: 'ordinal',\r\n },\r\n },\r\n */\r\n );\r\n\r\nexport const searchTickmarksByRevisionAndElementRequest = ({\r\n revisionId,\r\n elementId,\r\n search,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/tickmark/suggestions`,\r\n {\r\n text: search,\r\n },\r\n );\r\n\r\nexport const attachTickmarkToElementRequest = ({\r\n tickmarkId,\r\n elementId,\r\n revisionId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/tickmarks`,\r\n {\r\n tickmarkId,\r\n elementId,\r\n revisionId,\r\n },\r\n );\r\n\r\nexport const detachTickmarkFromElementRequest = ({\r\n tickmarkId,\r\n elementId,\r\n revisionId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/tickmarks/${tickmarkId}`,\r\n );\r\n\r\nexport const TICKMARK_SORT_BY = {\r\n ordinal: 'ordinal',\r\n createdDate: 'created_date',\r\n};\r\nexport const getTickmarksForRevisionRequest = ({\r\n revisionId,\r\n sortBy = TICKMARK_SORT_BY.ordinal,\r\n sortDirection = 'asc',\r\n}) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/tickmarks`,\r\n {\r\n params: {\r\n sortBy,\r\n sortDirection,\r\n },\r\n },\r\n );\r\n\r\nexport const updateTickmarkRequest = ({ revisionId, tickmark }) =>\r\n withDefaultContextAsSelectedProject().put(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/tickmarks/${\r\n tickmark.tickmarkId\r\n }`,\r\n tickmark.toEditApiFormat(),\r\n );\r\n\r\nexport const createTickmarkRequest = ({ tickmark }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${\r\n tickmark.revisionId\r\n }/tickmarks`,\r\n tickmark.toEditApiFormat(),\r\n );\r\n\r\nexport const searchTickmarkByKeywords = ({ search, revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/tickmark/suggestions`,\r\n {\r\n params: { searchText: encodeURIComponent(search) },\r\n },\r\n );\r\n\r\nexport const deleteTickmarkRequest = ({ tickmark }) => {\r\n const { revisionId, tickmarkId } = tickmark;\r\n return withDefaultContextAsSelectedProject().delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/tickmarks/${tickmarkId}`,\r\n );\r\n};\r\n\r\nexport const getElementsByTickmark = ({ revisionId, tickmarkId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/tickmark/${tickmarkId}`,\r\n );\r\n};\r\n","import {\r\n UNSELECTED_FILTER,\r\n IS_MENTIONED_FILTER,\r\n OBSERVER_TYPE_FILTER,\r\n} from 'constants/feature/notes/notes-panel-filter-constants';\r\nimport {\r\n NOTE_TYPES,\r\n NOTE_PRIORITY_TYPES,\r\n} from 'constants/feature/notes-panel-constants';\r\nimport {\r\n FILTER_STATUS,\r\n FILTER_PRIORITY,\r\n FILTER_TYPE,\r\n FILTER_GHOST,\r\n FILTER_USER,\r\n FILTER_HEADING,\r\n} from 'constants/feature/notes-panel-constants';\r\nimport { getStore } from 'store/store';\r\n\r\nexport const hasNotesFilters = (\r\n noteFilters,\r\n createdNotesUserObject,\r\n repliedNotesUserObject,\r\n userslistCreatedAndReplied,\r\n userFilterMentionedUsers,\r\n) => {\r\n const isCreatedUserListChecked = (createdNotesUserObject) => {\r\n for (const user in createdNotesUserObject) {\r\n if (createdNotesUserObject[user]) return true;\r\n }\r\n return false;\r\n };\r\n\r\n const isRepliedUserListChecked = (repliedNotesUserObject) => {\r\n for (const user in repliedNotesUserObject) {\r\n if (repliedNotesUserObject[user]) return true;\r\n }\r\n return false;\r\n };\r\n\r\n const isMentionedListChecked = (userFilterMentionedUsers) => {\r\n for (const user in userFilterMentionedUsers) {\r\n if (userFilterMentionedUsers[user]) return true;\r\n }\r\n return false;\r\n };\r\n\r\n if (\r\n noteFilters.user === true &&\r\n !isCreatedUserListChecked(createdNotesUserObject)\r\n )\r\n return false;\r\n if (\r\n noteFilters.user === false &&\r\n !isRepliedUserListChecked(repliedNotesUserObject)\r\n )\r\n return false;\r\n if (\r\n noteFilters.user === IS_MENTIONED_FILTER &&\r\n !isMentionedListChecked(userFilterMentionedUsers)\r\n )\r\n return false;\r\n\r\n return (\r\n noteFilters.heading !== UNSELECTED_FILTER ||\r\n noteFilters.status !== UNSELECTED_FILTER ||\r\n noteFilters.type !== UNSELECTED_FILTER ||\r\n noteFilters.priority !== UNSELECTED_FILTER ||\r\n noteFilters.ghost !== UNSELECTED_FILTER ||\r\n (noteFilters.user === UNSELECTED_FILTER &&\r\n Object.keys(userslistCreatedAndReplied).length > 0) ||\r\n (noteFilters.user === true &&\r\n isCreatedUserListChecked(createdNotesUserObject)) ||\r\n (noteFilters.user === false &&\r\n isRepliedUserListChecked(repliedNotesUserObject)) ||\r\n (noteFilters.user === IS_MENTIONED_FILTER &&\r\n isMentionedListChecked(userFilterMentionedUsers))\r\n );\r\n};\r\n\r\nexport const applyNoteFilters = (\r\n notes,\r\n filtersObject = {},\r\n usersListNotesCreatedBy = {},\r\n usersListNotesRepliedBy = {},\r\n selectedSegments = {},\r\n userslistCreatedAndReplied = {},\r\n userFilterMentionedUsers = {},\r\n assignedToMe = '',\r\n) => {\r\n if (\r\n !hasNotesFilters(\r\n filtersObject,\r\n usersListNotesCreatedBy,\r\n usersListNotesRepliedBy,\r\n userslistCreatedAndReplied,\r\n userFilterMentionedUsers,\r\n ) &&\r\n !assignedToMe\r\n )\r\n return notes;\r\n\r\n const filteredNotesList = notes.filter((note) => {\r\n const { notePriorityType, noteType, sectionId, parentId, isTechnical } =\r\n note;\r\n\r\n const isNotePriority = notePriorityType === NOTE_PRIORITY_TYPES.HIGH;\r\n const isNoteNonPriority = notePriorityType === NOTE_PRIORITY_TYPES.NORMAL;\r\n const isGhostNote = note.ghost === 1;\r\n const isNoteClosed = !note.closedBy ? false : true;\r\n const isNoteTypeClient = noteType === NOTE_TYPES.CLIENT.short;\r\n const isNoteTypeReview = noteType === NOTE_TYPES.REVIEW.short;\r\n const isNoteTypeObserver = noteType === NOTE_TYPES.OBSERVER.short;\r\n const isNoteCreatedByUser = Boolean(\r\n usersListNotesCreatedBy[note.noteTaker],\r\n );\r\n\r\n const isNoteRepliedByUser = () => {\r\n const repliesArray = Object.values(note.body.replies);\r\n for (let index = 0; index < repliesArray.length; index++) {\r\n const replierId = repliesArray[index].userId;\r\n if (usersListNotesRepliedBy[replierId]) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n const isSectionIdSelected =\r\n (isTechnical && selectedSegments[parentId]) ||\r\n selectedSegments[sectionId];\r\n const isNoteMentionedOrCreatedOrRepliedByUser = () => {\r\n if (note.noteTaker in userslistCreatedAndReplied) {\r\n return true;\r\n } else {\r\n const repliesArray = Object.values(note.body.replies);\r\n for (let index = 0; index < repliesArray.length; index++) {\r\n const replierId = repliesArray[index].userId;\r\n if (replierId in userslistCreatedAndReplied) return true;\r\n }\r\n }\r\n return isNoteMentionedByUser(userslistCreatedAndReplied);\r\n };\r\n\r\n const isNoteMentionedByUser = (userIdToUserNameObject) => {\r\n for (const taggedUser in userIdToUserNameObject) {\r\n // we need to check if the taggedUsers property is in the note body first\r\n if (note.body.taggedUsers) {\r\n if (taggedUser in note.body.taggedUsers) {\r\n return true;\r\n }\r\n }\r\n\r\n const repliesArray = Object.values(note.body.replies);\r\n for (let index = 0; index < repliesArray.length; index++) {\r\n const reply = repliesArray[index];\r\n // we need to check if the taggedUsers properpty is in the reply body\r\n if (reply.taggedUsers) {\r\n if (taggedUser in reply.taggedUsers) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n const isNoteMentionedToCurrentUser = (currentUser) => {\r\n // we need to check if the taggedUsers property is in the note body first\r\n if (note.body.taggedUsers) {\r\n if (currentUser in note.body.taggedUsers) {\r\n return true;\r\n }\r\n }\r\n const repliesArray = Object.values(note.body.replies);\r\n for (let index = 0; index < repliesArray.length; index++) {\r\n const reply = repliesArray[index];\r\n // we need to check if the taggedUsers properpty is in the reply body\r\n if (reply.taggedUsers) {\r\n if (currentUser in reply.taggedUsers) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n let filterKeys = Object.keys(filtersObject).filter(\r\n (key) => filtersObject[key] !== UNSELECTED_FILTER,\r\n );\r\n\r\n if (Object.keys(userslistCreatedAndReplied).length > 0) {\r\n filterKeys.push(FILTER_USER);\r\n }\r\n\r\n for (let index = 0; index < filterKeys.length; index++) {\r\n const key = filterKeys[index];\r\n\r\n if (key === FILTER_HEADING) {\r\n // filter by statement segments\r\n if (!isSectionIdSelected) return false;\r\n }\r\n\r\n if (key === FILTER_PRIORITY) {\r\n // high priority\r\n if (filtersObject[key] && !isNotePriority) {\r\n return false;\r\n }\r\n\r\n // non-priority\r\n if (filtersObject[key] === false && !isNoteNonPriority) {\r\n return false;\r\n }\r\n }\r\n\r\n if (key === FILTER_TYPE) {\r\n // note type of review\r\n if (filtersObject[key] === true && !isNoteTypeReview) {\r\n return false;\r\n }\r\n\r\n // note type of client\r\n if (filtersObject[key] === false && !isNoteTypeClient) {\r\n return false;\r\n }\r\n\r\n //note type of Observer\r\n if (\r\n filtersObject[key] === OBSERVER_TYPE_FILTER &&\r\n !isNoteTypeObserver\r\n ) {\r\n return false;\r\n }\r\n }\r\n\r\n if (key === FILTER_STATUS) {\r\n // open note\r\n if (filtersObject[key] && isNoteClosed) {\r\n return false;\r\n }\r\n\r\n // closed note\r\n if (filtersObject[key] === false && !isNoteClosed) {\r\n return false;\r\n }\r\n }\r\n\r\n if (key === FILTER_GHOST) {\r\n // ghost note\r\n if (filtersObject[key] && !isGhostNote) {\r\n return false;\r\n }\r\n\r\n // non-ghost note\r\n if (filtersObject[key] === false && isGhostNote) {\r\n return false;\r\n }\r\n }\r\n\r\n if (key === FILTER_USER) {\r\n // notes that are created by a user\r\n if (filtersObject[key] === true && !isNoteCreatedByUser) {\r\n return false;\r\n }\r\n\r\n // notes that are replied by a user\r\n if (filtersObject[key] === false && !isNoteRepliedByUser()) {\r\n return false;\r\n }\r\n\r\n // notes that are either created or replied by a user\r\n if (\r\n filtersObject[key] === UNSELECTED_FILTER &&\r\n !isNoteMentionedOrCreatedOrRepliedByUser()\r\n ) {\r\n return false;\r\n }\r\n\r\n // notes that are mentioned by a user in the note body or reply\r\n if (\r\n filtersObject[key] === IS_MENTIONED_FILTER &&\r\n !isNoteMentionedByUser(userFilterMentionedUsers)\r\n ) {\r\n return false;\r\n }\r\n }\r\n }\r\n if (assignedToMe && !isNoteMentionedToCurrentUser(assignedToMe)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n\r\n return filteredNotesList;\r\n};\r\n\r\nexport const toApiNoteFormat = (note) => {\r\n const { projectUsersList } = getStore().getState().data;\r\n const users = projectUsersList.data.userIdToUserNameMap;\r\n let div = document.createElement('div');\r\n div.innerHTML = note;\r\n let tags = div.getElementsByTagName('span');\r\n for (let index = 0; index < tags.length; index++) {\r\n let replaceFromStr = tags[index].outerHTML;\r\n let id = tags[index].getAttribute('cfto_user_id');\r\n let replaceToStr;\r\n if (!users[id]) replaceToStr = tags[index].innerHTML;\r\n else replaceToStr = ``;\r\n note = note.replace(replaceFromStr, replaceToStr);\r\n }\r\n return note;\r\n};\r\n\r\nexport const toDisplayNoteFormat = (note) => {\r\n const { projectUsersList } = getStore().getState().data;\r\n const users = projectUsersList.data.userIdToUserNameMap;\r\n let div = document.createElement('div');\r\n div.innerHTML = note;\r\n let tags = div.getElementsByTagName('span');\r\n for (let index = 0; index < tags.length; index++) {\r\n let replaceFromStr = tags[index].outerHTML;\r\n let id = tags[index].getAttribute('cfto_user_id');\r\n let name = users[id];\r\n let replaceToStr = `@${name}`;\r\n note = note.replace(replaceFromStr, replaceToStr);\r\n }\r\n return note;\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n getStatementWorkflowsRequest,\r\n retryFailedDocumentUploadRequest,\r\n permanentlyDeleteFailedRevisionRequest,\r\n} from 'api/statement-list-api';\r\nimport { STATEMENT_LIST_TABS } from 'constants/feature/statement-list-constants';\r\nimport { requestGetStatementList } from './statement-list/statement-list-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { updateSelectedProject } from 'store/actions/selected-project-actions';\r\n\r\nexport const clearStatementWorkflows = createAction(\r\n 'CLEAR_STATEMENT_WORKFLOWS',\r\n);\r\n\r\nexport const setProjectIdWorkflowExpanded = createAction(\r\n 'SET_PROJECT_FOR_WORKFLOWS_EXPANDED',\r\n);\r\nexport const clearProjectIdWorkflowExpanded = createAction(\r\n 'CLEAR_PROJECT_FOR_WORKFLOWS_EXPANDED',\r\n);\r\n\r\nexport const statementWorkflowsLoading = createAction(\r\n 'STATEMENT_WORKFLOWS_LOADING',\r\n);\r\nexport const statementWorkflowsError = createAction(\r\n 'STATEMENT_WORKFLOWS_LIST_ERROR',\r\n);\r\nexport const statementWorkflowsLoaded = createAction(\r\n 'STATEMENT_WORKFLOWS_LIST_LOADED',\r\n);\r\nexport const permanentlyDeleteWorkflowRevisionError = createAction(\r\n 'PERMANENTLY_DELETE_WORKFLOW_REVISION_ERROR',\r\n);\r\nexport const retryFailedDocumentUploadError = createAction(\r\n 'RETRY_FAILED_DOCUMENT_UPLOAD_ERROR',\r\n);\r\n\r\n//This gets called on the first request for workflows so a loading graphic is rendered.\r\n// The next two actions will need to be replaced when sockets are implemented.\r\nexport const requestGetStatementWorkflows = (props) => async (dispatch) => {\r\n dispatch(statementWorkflowsLoading());\r\n dispatch(getStatementWorkflowsWithoutLoading(props));\r\n};\r\n\r\n//This is so we can poll for workflows without rendering a loading screen.\r\nexport const getStatementWorkflowsWithoutLoading =\r\n (props) => async (dispatch, getState) => {\r\n try {\r\n const selectedProject = getState().data.selectedProject.project;\r\n /**\r\n * First we get the current workflow map from the store, which we will compare later on\r\n * to check for changes in the workflows. If there are any kind of changes, we will have to try to\r\n * update the statement list.\r\n * */\r\n const { statementWorkflowSteps } = getState().ui.statementPage;\r\n const response =\r\n selectedProject && selectedProject.id\r\n ? await getStatementWorkflowsRequest(selectedProject.id)\r\n : { data: [] };\r\n const previousWorkFlowMap = getState().data.workflowsMap;\r\n dispatch(statementWorkflowsLoaded({ response }));\r\n const updatedWorkflowMap = getState().data.workflowsMap;\r\n const selectedStatementsTab =\r\n getState().data.statementList.statementListFilters.selectedTab;\r\n if (\r\n !isNullOrUndefined(previousWorkFlowMap.getInitializedSize()) &&\r\n !isNullOrUndefined(updatedWorkflowMap.getInitializedSize()) &&\r\n previousWorkFlowMap.getInitializedSize() !==\r\n updatedWorkflowMap.getInitializedSize()\r\n ) {\r\n dispatch(requestGetStatementList({ withLoading: false }));\r\n dispatch(\r\n updateSelectedProject({\r\n projectId: selectedProject.id,\r\n }),\r\n );\r\n }\r\n if (!updatedWorkflowMap.isInitialized()) {\r\n dispatch(clearStatementWorkflows());\r\n }\r\n if (updatedWorkflowMap) {\r\n updatedWorkflowMap.getWorkflowsListData().forEach((workflow) => {\r\n if (\r\n workflow.status ===\r\n statementWorkflowSteps.isCompletedWorkFlowStep(\r\n workflow.documentProcessTypeEnum,\r\n ).status\r\n ) {\r\n if (selectedStatementsTab === STATEMENT_LIST_TABS.ACTIVE)\r\n dispatch(requestGetStatementList({ withLoading: false }));\r\n dispatch(clearStatementWorkflows());\r\n }\r\n });\r\n }\r\n } catch (error) {\r\n dispatch(statementWorkflowsError(error));\r\n }\r\n };\r\n\r\nexport const permanentlyDeleteWorkflowRevision =\r\n (statementId, revisionId) => async (dispatch) => {\r\n try {\r\n await permanentlyDeleteFailedRevisionRequest(statementId, revisionId);\r\n dispatch(requestGetStatementWorkflows());\r\n } catch (error) {\r\n dispatch(permanentlyDeleteWorkflowRevisionError(error));\r\n }\r\n };\r\n\r\nexport const retryFailedDocumentUpload =\r\n (statementId, revisionId, clientId) => async (dispatch) => {\r\n try {\r\n await retryFailedDocumentUploadRequest(statementId, revisionId, clientId);\r\n dispatch(requestGetStatementWorkflows());\r\n } catch (error) {\r\n dispatch(retryFailedDocumentUploadError(error));\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport { getSectionHistoryRequest } from 'api/sections-api';\r\n\r\nexport const fetchSectionReviewsHistoryLoaded = createAction(\r\n 'FETCH_SECTION_REVIEWS_HISTORY_LOADED',\r\n);\r\n\r\nexport const fetchSectionReviewsHistoryLoading = createAction(\r\n 'FETCH_SECTION_REVIEWS_HISTORY_LOADING',\r\n);\r\n\r\nexport const fetchSectionReviewsHistoryError = createAction(\r\n 'FETCH_SECTION_REVIEWS_HISTORY_ERROR',\r\n);\r\n\r\nexport const appendSectionReviewHistory = createAction(\r\n 'APPEND_SECTION_REVIEW_HISTORY',\r\n);\r\n\r\nexport const fetchSectionHistoryDetails = ({ revisionId, sectionId }) => async (\r\n dispatch,\r\n) => {\r\n dispatch(fetchSectionReviewsHistoryLoading());\r\n await dispatch(\r\n fetchSectionHistoryDetailsWithoutLoading({ revisionId, sectionId }),\r\n );\r\n};\r\n\r\nexport const fetchSectionHistoryDetailsWithoutLoading = ({\r\n revisionId,\r\n sectionId,\r\n}) => async (dispatch) => {\r\n try {\r\n const response = await getSectionHistoryRequest({ revisionId, sectionId });\r\n dispatch(fetchSectionReviewsHistoryLoaded({ response }));\r\n } catch (error) {\r\n dispatch(fetchSectionReviewsHistoryError(error));\r\n }\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { getSectionReviewersRequest } from 'api/sections-api';\r\nimport { fetchSectionHistoryDetailsWithoutLoading } from 'store/actions/section-review-history-actions';\r\nimport { fetchStatementSummarySections } from 'store/actions/statement-summary/sections-summary-actions';\r\nimport { sectionDetailsLoaded } from 'store/actions/statement-content-actions';\r\nimport { showSectionDetailsPanelAction } from 'store/actions/panel-controller-actions';\r\nimport { fetchSectionHistoryDetails } from 'store/actions/section-review-history-actions';\r\nimport { getUpdatedSectionElementsNotesSummaryCount } from '../../utils/heading-data-utils';\r\n\r\nexport const appendSectionToSectionReviewList = createAction(\r\n 'SET_SECTION_LIST_STORE',\r\n);\r\n\r\nexport const fetchSectionReviewsLoaded = createAction(\r\n 'FETCH_SECTIONS_REVIEWS_LOADED',\r\n);\r\n\r\nexport const fetchSectionReviewsLoading = createAction(\r\n 'FETCH_SECTIONS_REVIEWS_LOADING',\r\n);\r\n\r\nexport const fetchSectionReviewsError = createAction(\r\n 'FETCH_SECTIONS_REVIEWS_ERROR',\r\n);\r\n\r\nexport const removeSectionReviewFromStore = createAction(\r\n 'REMOVE_SECTION_REVIEW_FROM_STORE',\r\n);\r\n\r\nexport const mergeSectionReviewToSectionReviewList = createAction(\r\n 'MERGE_SECTION_REVIEW_TO_SECTION_REVIEW_LIST_IN_STORE',\r\n);\r\n\r\nexport const removeBulkSectionReviewFromStore = createAction(\r\n 'REMOVE_BULK_SECTION_REVIEW_LIST_FROM_STORE',\r\n);\r\n\r\nexport const fetchSectionReviews =\r\n (revisionId, statementId) => async (dispatch, getStore) => {\r\n try {\r\n const response = await getSectionReviewersRequest({\r\n revisionId,\r\n statementId,\r\n });\r\n dispatch(fetchSectionReviewsLoaded({ response }));\r\n } catch (error) {\r\n dispatch(fetchSectionReviewsError(error));\r\n }\r\n };\r\n\r\nexport const fetchSectionReviewsWithLoading =\r\n () => async (dispatch, getStore) => {\r\n const { revision } = getStore().data;\r\n try {\r\n dispatch(fetchSectionReviewsLoading());\r\n const response = await getSectionReviewersRequest({\r\n revisionId: revision.id,\r\n });\r\n dispatch(fetchSectionReviewsLoaded({ response }));\r\n } catch (error) {\r\n dispatch(fetchSectionReviewsError(error));\r\n }\r\n };\r\n\r\nexport const handleSignOffSuccess =\r\n ({ data, sectionId }) =>\r\n async (dispatch, getState) => {\r\n const {\r\n data: { revision },\r\n } = getState();\r\n dispatch(appendSectionToSectionReviewList(data));\r\n await dispatch(fetchStatementSummarySections({ revisionId: revision.id }));\r\n dispatch(\r\n fetchSectionHistoryDetailsWithoutLoading({\r\n revisionId: revision.id,\r\n sectionId,\r\n }),\r\n dispatch(fetchSectionReviewsWithLoading()),\r\n );\r\n };\r\n\r\nexport const handleRemoveSignOffSuccess =\r\n (sectionId, appUserId) => async (dispatch, getState) => {\r\n const {\r\n data: { revision },\r\n } = getState();\r\n dispatch(removeSectionReviewFromStore({ sectionId, userId: appUserId }));\r\n await dispatch(fetchStatementSummarySections({ revisionId: revision.id }));\r\n dispatch(\r\n fetchSectionHistoryDetailsWithoutLoading({\r\n revisionId: revision.id,\r\n sectionId,\r\n }),\r\n );\r\n };\r\n\r\nexport const updateSelectedSectionPanel =\r\n ({ sectionId }) =>\r\n async (dispatch, getState) => {\r\n const { contentSectionMap } =\r\n getState().data.statementContent.sectionsCache;\r\n const section = contentSectionMap.get(sectionId);\r\n const {\r\n data: { revision },\r\n } = getState();\r\n dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId: revision.id,\r\n sectionId: sectionId,\r\n }),\r\n );\r\n let updatedSection = await getUpdatedSectionElementsNotesSummaryCount(\r\n revision,\r\n section,\r\n );\r\n\r\n dispatch(sectionDetailsLoaded(updatedSection));\r\n dispatch(showSectionDetailsPanelAction());\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport sizeof from 'object-sizeof';\r\nimport { getElementsBySectionRequest } from 'api/element-api';\r\nimport {\r\n checkCacheToPurge,\r\n addSectionToCache,\r\n addLeftSectionToCache,\r\n} from 'store/actions/section-cache-actions';\r\nimport {\r\n currentBlacklineViewChangesLoading,\r\n currentBlacklineViewChangesLoaded,\r\n currentBlacklineViewChangesError,\r\n previousBlacklineViewChangesLoading,\r\n previousBlacklineViewChangesLoaded,\r\n previousBlacklineViewChangesError,\r\n} from 'store/actions/blackline-view-actions';\r\nimport {\r\n sectionElementsLoading,\r\n sectionElementsLoaded,\r\n sectionElementsError,\r\n leftSectionElementsLoading,\r\n leftSectionElementsLoaded,\r\n leftSectionElementsError,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n getOCRImageSectionSegmentsRequest,\r\n getOCRDataSectionSegmentsRequest,\r\n getBlacklineChangesData,\r\n} from 'api/statement-content-api';\r\nimport { checkLeftCacheToPurge } from 'store/actions/left-statement-section-content-actions';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\nimport { isElementHasAnyAnnotations } from 'utils/statement-content-page-utils';\r\nimport { getNotesOCR } from 'api/notes-api';\r\nimport {\r\n notesCacheSectionLoading,\r\n notesCacheSectionLoaded,\r\n notesCacheSectionError,\r\n leftNotesCacheSectionLoading,\r\n leftNotesCacheSectionLoaded,\r\n leftNotesCacheSectionError,\r\n} from 'store/actions/notes-cache-actions';\r\n\r\nexport const sectionOCRImageStatementContentLoaded = createAction(\r\n 'SECTION_OCR_IMAGE_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const sectionOCRImageStatementContentError = createAction(\r\n 'SECTION_OCR_IMAGE_STATEMENT_CONTENT_ERROR',\r\n);\r\n\r\nexport const sectionOCRDataSegmentsStatementContentLoaded = createAction(\r\n 'SECTION_OCR_DATA_SEGMENTS_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const sectionOCRDataSegmentsStatementContentError = createAction(\r\n 'SECTION_OCR_DATA_SEGMENTS_STATEMENT_CONTENT_ERROR',\r\n);\r\n\r\nexport const leftSectionOCRImageStatementContentLoaded = createAction(\r\n 'LEFT_SECTION_OCR_IMAGE_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const leftSectionOCRImageStatementContentError = createAction(\r\n 'LEFT_SECTION_OCR_IMAGE_STATEMENT_CONTENT_ERROR',\r\n);\r\n\r\nexport const leftSectionOCRDataSegmentsStatementContentLoaded = createAction(\r\n 'LEFT_SECTION_OCR_DATA_SEGMENTS_STATEMENT_CONTENT_LOADED',\r\n);\r\nexport const leftSectionOCRDataSegmentsStatementContentError = createAction(\r\n 'LEFT_SECTION_OCR_DATA_SEGMENTS_STATEMENT_CONTENT_ERROR',\r\n);\r\n\r\nexport const fetchElementsBySectionOCR =\r\n ({ sectionId, withoutLoading = false }) =>\r\n (dispatch, getStore) => {\r\n const { data, router } = getStore();\r\n const {\r\n revision,\r\n annotationDisplayOptions,\r\n statementContent: { elementCache },\r\n } = data;\r\n const {\r\n location: { pathname },\r\n } = router;\r\n const isPreviewPage = isElementReportPreviewPage(pathname);\r\n !withoutLoading && dispatch(sectionElementsLoading({ sectionId }));\r\n getElementsBySectionRequest({\r\n sectionId,\r\n revisionId: revision.id,\r\n isPreviewPage,\r\n })\r\n .then((response) => {\r\n if (response.data && annotationDisplayOptions.showAll) {\r\n response.data = response.data.map((item) => {\r\n return {\r\n ...item,\r\n marker: false,\r\n callout:\r\n isElementHasAnyAnnotations(item) &&\r\n annotationDisplayOptions.showAll,\r\n };\r\n });\r\n } else if (elementCache.getCurrentSectionIds().length) {\r\n const elementIds = elementCache.getElementIdsBySectionId({\r\n sectionId,\r\n });\r\n if (elementIds.marker.length || elementIds.callout.length) {\r\n response.data = response.data.map((item) => {\r\n return {\r\n ...item,\r\n marker: elementIds.marker.includes(item.id),\r\n callout:\r\n elementIds.callout.includes(item.id) &&\r\n isElementHasAnyAnnotations(item),\r\n };\r\n });\r\n }\r\n }\r\n dispatch(\r\n sectionElementsLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(sectionElementsError({ sectionId, error }));\r\n });\r\n };\r\n\r\nexport const fetchLeftElementsBySectionOCR =\r\n ({ sectionId }) =>\r\n (dispatch, getStore) => {\r\n const {\r\n sourceStatementParams: { statementId, revisionId },\r\n } = getStore().ui;\r\n\r\n dispatch(leftSectionElementsLoading({ sectionId }));\r\n getElementsBySectionRequest({\r\n statementId: statementId,\r\n sectionId,\r\n revisionId: revisionId,\r\n })\r\n .then((response) => {\r\n dispatch(\r\n leftSectionElementsLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(leftSectionElementsError({ sectionId, error }));\r\n });\r\n };\r\n\r\nexport const fetchCurrentBlacklineDataBySectionOCR =\r\n ({ sectionId, blacklineGuidDetails }) =>\r\n (dispatch, getStore) => {\r\n const { revision, selectedProject } = getStore().data;\r\n dispatch(currentBlacklineViewChangesLoading({ sectionId }));\r\n getBlacklineChangesData({\r\n clientId: parseInt(selectedProject.id),\r\n revisionId: revision.id,\r\n guid: blacklineGuidDetails.storageGuid,\r\n keyVersion: blacklineGuidDetails.keyVersion,\r\n contentType: blacklineGuidDetails.contentType,\r\n })\r\n .then((response) => {\r\n dispatch(\r\n currentBlacklineViewChangesLoaded({\r\n response: { data: response.data.page_content },\r\n sectionId: response.data.page_number,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(currentBlacklineViewChangesError({ sectionId, error }));\r\n });\r\n };\r\n\r\nexport const fetchPreviousBlacklineDataBySectionOCR =\r\n ({ sectionId, blacklineGuidDetails }) =>\r\n (dispatch, getStore) => {\r\n const { revision, selectedProject } = getStore().data;\r\n\r\n dispatch(previousBlacklineViewChangesLoading({ sectionId }));\r\n getBlacklineChangesData({\r\n clientId: parseInt(selectedProject.id),\r\n revisionId: revision.id,\r\n guid: blacklineGuidDetails.storageGuid,\r\n keyVersion: blacklineGuidDetails.keyVersion,\r\n contentType: blacklineGuidDetails.contentType,\r\n })\r\n .then((response) => {\r\n dispatch(\r\n previousBlacklineViewChangesLoaded({\r\n response: { data: response.data.page_content },\r\n sectionId: response.data.page_number,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(previousBlacklineViewChangesError({ sectionId, error }));\r\n });\r\n };\r\n\r\nconst calculateSizeAndAddSectionToCache =\r\n ({ sectionId }) =>\r\n async (dispatch, getStore) => {\r\n const { ocrCache } = getStore().data.statementContent.sectionsCache;\r\n const ocrSectionMemorySize = sizeof(ocrCache.get(sectionId));\r\n dispatch(\r\n addSectionToCache({\r\n sectionId,\r\n sectionMemorySize: ocrSectionMemorySize,\r\n }),\r\n );\r\n };\r\n\r\nconst calculateSizeAndAddSectionToLeftCache =\r\n ({ sectionId }) =>\r\n async (dispatch, getStore) => {\r\n const { leftOcrCache } =\r\n getStore().data.leftStatementContent.leftSectionsCache;\r\n const ocrSectionMemorySize = sizeof(leftOcrCache.get(sectionId));\r\n dispatch(\r\n addLeftSectionToCache({\r\n sectionId,\r\n sectionMemorySize: ocrSectionMemorySize,\r\n }),\r\n );\r\n };\r\n\r\nexport const fetchSectionOCRSegmentsStatementContent =\r\n ({ sectionMetaData }) =>\r\n async (dispatch, getStore) => {\r\n const { revision, selectedProject } = getStore().data;\r\n const { imageGuid, imageKeyVersion, jsonGuid, jsonKeyVersion } =\r\n sectionMetaData;\r\n\r\n getOCRImageSectionSegmentsRequest({\r\n clientId: parseInt(selectedProject.id),\r\n revisionId: revision.id,\r\n guid: imageGuid,\r\n keyVersion: imageKeyVersion,\r\n })\r\n .then((imgResponse) => {\r\n dispatch(\r\n sectionOCRImageStatementContentLoaded({\r\n image: URL.createObjectURL(new Blob([imgResponse.data])),\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(\r\n sectionOCRImageStatementContentError({\r\n error,\r\n }),\r\n );\r\n });\r\n\r\n getOCRDataSectionSegmentsRequest({\r\n clientId: parseInt(selectedProject.id),\r\n revisionId: revision.id,\r\n guid: jsonGuid,\r\n keyVersion: jsonKeyVersion,\r\n })\r\n .then((ocrResponse) => {\r\n dispatch(\r\n sectionOCRDataSegmentsStatementContentLoaded({\r\n ocr: ocrResponse.data,\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n dispatch(\r\n calculateSizeAndAddSectionToCache({\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n dispatch(checkCacheToPurge());\r\n })\r\n .catch((error) => {\r\n dispatch(\r\n sectionOCRDataSegmentsStatementContentError({\r\n error,\r\n }),\r\n );\r\n });\r\n };\r\n\r\nexport const fetchLeftSectionOCRSegmentsStatementContent =\r\n ({ sectionMetaData }) =>\r\n async (dispatch, getStore) => {\r\n const {\r\n sourceStatementParams: { projectId, revisionId },\r\n } = getStore().ui;\r\n\r\n const { imageGuid, imageKeyVersion, jsonGuid, jsonKeyVersion } =\r\n sectionMetaData;\r\n getOCRImageSectionSegmentsRequest({\r\n clientId: parseInt(projectId),\r\n revisionId: revisionId,\r\n guid: imageGuid,\r\n keyVersion: imageKeyVersion,\r\n })\r\n .then((imgResponse) => {\r\n dispatch(\r\n leftSectionOCRImageStatementContentLoaded({\r\n image: URL.createObjectURL(new Blob([imgResponse.data])),\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(\r\n leftSectionOCRImageStatementContentError({\r\n error,\r\n }),\r\n );\r\n });\r\n\r\n getOCRDataSectionSegmentsRequest({\r\n clientId: parseInt(projectId),\r\n revisionId: revisionId,\r\n guid: jsonGuid,\r\n keyVersion: jsonKeyVersion,\r\n })\r\n .then((ocrResponse) => {\r\n dispatch(\r\n leftSectionOCRDataSegmentsStatementContentLoaded({\r\n ocr: ocrResponse.data,\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n dispatch(\r\n calculateSizeAndAddSectionToLeftCache({\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n dispatch(checkLeftCacheToPurge());\r\n })\r\n .catch((error) => {\r\n dispatch(\r\n leftSectionOCRDataSegmentsStatementContentError({\r\n error,\r\n }),\r\n );\r\n });\r\n };\r\n\r\nexport const fetchNotesBySectionOCR =\r\n ({ sectionId, withoutLoading = false }) =>\r\n (dispatch, getStore) => {\r\n const { data } = getStore();\r\n const { revision } = data;\r\n !withoutLoading && dispatch(notesCacheSectionLoading({ sectionId }));\r\n getNotesOCR({ revisionId: revision.id, sectionId })\r\n .then((response) => {\r\n dispatch(\r\n notesCacheSectionLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(notesCacheSectionError({ sectionId, error }));\r\n });\r\n };\r\n\r\nexport const fetchLeftNotesBySectionOCR =\r\n ({ sectionId, withoutLoading = false }) =>\r\n (dispatch, getStore) => {\r\n const {\r\n sourceStatementParams: { revisionId },\r\n } = getStore().ui;\r\n\r\n !withoutLoading && dispatch(leftNotesCacheSectionLoading({ sectionId }));\r\n getNotesOCR({ revisionId, sectionId })\r\n .then((response) => {\r\n dispatch(\r\n leftNotesCacheSectionLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(leftNotesCacheSectionError({ sectionId, error }));\r\n });\r\n };\r\n\r\nexport const fetchAllOCRSectionRenderingData =\r\n ({ sectionMetaData, isLeftView = false }) =>\r\n (dispatch, getStore) => {\r\n const { router } = getStore();\r\n const {\r\n location: { pathname },\r\n } = router;\r\n const isPreviewPage = isElementReportPreviewPage(pathname);\r\n\r\n if (isLeftView) {\r\n dispatch(\r\n fetchLeftSectionOCRSegmentsStatementContent({\r\n sectionMetaData,\r\n }),\r\n );\r\n\r\n dispatch(\r\n fetchLeftElementsBySectionOCR({\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n !isPreviewPage &&\r\n dispatch(\r\n fetchLeftNotesBySectionOCR({\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n } else {\r\n dispatch(\r\n fetchSectionOCRSegmentsStatementContent({\r\n sectionMetaData,\r\n }),\r\n );\r\n\r\n dispatch(\r\n fetchElementsBySectionOCR({ sectionId: sectionMetaData.sectionId }),\r\n );\r\n\r\n !isPreviewPage &&\r\n dispatch(\r\n fetchNotesBySectionOCR({\r\n sectionId: sectionMetaData.sectionId,\r\n }),\r\n );\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n closeSocketClientRequest,\r\n // removeUserFromRoom,\r\n} from 'api/project-socket-client-api';\r\nimport { isSignalRForSocketConnectionEnabled } from 'api/api-authentication';\r\n\r\nexport const setProjectSocketClient = createAction('SET_PROJECT_SOCKET_CLIENT');\r\n\r\nexport const initProjectSocketIOSocketClient = createAction(\r\n 'INIT_PROJECT_SOCKETIO_SOCKET_CLIENT',\r\n);\r\n\r\nexport const initProjectSignalrSocketClient = createAction(\r\n 'INIT_PROJECT_SIGNALR_SOCKET_CLIENT',\r\n);\r\n\r\nexport const clearProjectSocketClientInStore = createAction(\r\n 'CLEAR_PROJECT_SOCKET_CLIENT',\r\n);\r\n\r\nexport const stopProjectSocketConnection = createAction(\r\n 'STOP_PROJECT_SOCKET_CONNECTION',\r\n);\r\n\r\nexport const setProjectSocketDisconnectAction = createAction(\r\n 'SET_PROJECT_SOCKET_DISCONNECT_ACTION',\r\n);\r\n\r\nexport const initProjectSocketClient = (projectId) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n const { data: { currentUser } = {} } = getState();\r\n const { data: { projectToGeoMap } = {} } = currentUser || {};\r\n const geoCode = projectId\r\n ? (projectToGeoMap.get(`${projectId}`) || {}).geoCode\r\n : null;\r\n if (isSignalRForSocketConnectionEnabled) {\r\n await dispatch(initProjectSignalrSocketClient({ projectId, geoCode }));\r\n } else {\r\n await dispatch(initProjectSocketIOSocketClient({ projectId, geoCode }));\r\n }\r\n};\r\n\r\nexport const closeProjectSocketClient = (projectId) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n await dispatch(stopProjectSocketConnection());\r\n await dispatch(clearProjectSocketClientInStore());\r\n try {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n const connectionId = localStorage.getItem('projectConnectionId');\r\n await closeSocketClientRequest({\r\n projectId,\r\n connectionId,\r\n });\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { getNotesByRevisionAndSectionRequest } from 'api/notes-api';\r\nimport { CONTEXT_KEY } from 'api/api-client';\r\n\r\nexport const notesCacheSectionLoading = createAction(\r\n 'NOTES_CACHE_SECTION_LOADING',\r\n);\r\nexport const notesCacheSectionLoaded = createAction(\r\n 'NOTES_CACHE_SECTION_LOADED',\r\n);\r\nexport const notesCacheSectionError = createAction('NOTES_CACHE_SECTION_ERROR');\r\n\r\nexport const leftNotesCacheSectionLoading = createAction(\r\n 'LEFT_NOTES_CACHE_SECTION_LOADING',\r\n);\r\nexport const leftNotesCacheSectionLoaded = createAction(\r\n 'LEFT_NOTES_CACHE_SECTION_LOADED',\r\n);\r\nexport const leftNotesCacheSectionError = createAction(\r\n 'LEFT_NOTES_CACHE_SECTION_ERROR',\r\n);\r\n\r\nexport const removeNoteFromCacheWithSocketPayloadAction = createAction(\r\n 'REMOVE_NOTE_FROM_CACHE_WITH_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const updateNoteFromNoteCacheWithSocketPayloadAction = createAction(\r\n 'UPDATE_NOTE_FROM_NOTE_CACHE_WITH_SOCKET_PAYLOAD',\r\n);\r\n\r\nexport const fetchNotesBySection =\r\n ({ sectionId }) =>\r\n (dispatch, getStore) => {\r\n const { revision } = getStore().data;\r\n dispatch(notesCacheSectionLoading({ sectionId }));\r\n getNotesByRevisionAndSectionRequest({\r\n sectionId,\r\n revisionId: revision.id,\r\n })\r\n .then((response) => {\r\n dispatch(\r\n notesCacheSectionLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(notesCacheSectionError({ sectionId, error }));\r\n });\r\n };\r\n\r\nexport const fetchLeftNotesBySection =\r\n ({ sectionId, statementId, projectId }) =>\r\n (dispatch, getStore) => {\r\n const {\r\n sourceStatementParams: { revisionId },\r\n } = getStore().ui;\r\n dispatch(leftNotesCacheSectionLoading({ sectionId }));\r\n getNotesByRevisionAndSectionRequest({\r\n statementId,\r\n sectionId,\r\n revisionId,\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: projectId,\r\n })\r\n .then((response) => {\r\n dispatch(\r\n leftNotesCacheSectionLoaded({\r\n response,\r\n sectionId,\r\n }),\r\n );\r\n })\r\n .catch((error) => {\r\n dispatch(leftNotesCacheSectionError({ sectionId, error }));\r\n });\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport { getProjectListRequest } from 'api/project-list-api';\r\nimport {\r\n softDeleteProjectRequest,\r\n restoreSoftDeletedProjectRequest,\r\n permanentlyDeleteProjectRequest,\r\n} from 'api/delete-project-api';\r\n\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n clearSelectedProject,\r\n updateSelectedProjectFromID,\r\n setSelectedProjectFromProjectList,\r\n setSelectedProjectId,\r\n} from './selected-project-actions';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\nimport { ROUTE_CONSTANTS } from '../../constants/util/route-constants';\r\nimport { GEO_NAMES } from 'constants/feature/project-list-header-constants';\r\nimport moment from 'moment';\r\n\r\nexport const clearProjectList = createAction('CLEAR_PROJECT_LIST');\r\n\r\nexport const projectListLoading = createAction('PROJECT_LIST_LOADING');\r\nexport const projectListError = createAction('PROJECT_LIST_ERROR');\r\nexport const projectListLoaded = createAction('PROJECT_LIST_LOADED');\r\nexport const softDeleteProjectError = createAction('SOFT_DELETE_RPOJECT_ERROR');\r\nexport const restoreDeletedProjectError = createAction(\r\n 'RESTORE_DELETED_PROJECT_ERROR',\r\n);\r\nexport const permanentlyDeleteProjectError = createAction(\r\n 'RESTORE_DELETED_PROJECT_ERROR',\r\n);\r\n\r\nexport const setGeoToFilterProjectList = createAction(\r\n 'SET_GEO_TO_FILTER_PROJECT_LIST',\r\n);\r\n\r\nexport const setAppliedSearchTermToFilterProjectList = createAction(\r\n 'SET_APPLIED_SEARCH_TERM_TO_FILTER_PROJECT_LIST',\r\n);\r\n\r\nexport const clearAppliedSearchTermToFilterProjectList = createAction(\r\n 'CLEAR_APPLIED_SEARCH_TERM_TO_FILTER_PROJECT_LIST',\r\n);\r\nexport const setMergeSelectedProjectWithProjectList = createAction(\r\n 'MERGE_SELECTED_PROJECT_WITH_PROJECT_LIST',\r\n);\r\n\r\nexport const fetchProjectList = () => async (dispatch, getState) => {\r\n dispatch(projectListLoading());\r\n try {\r\n const { currentUser } = getState().data;\r\n const response = await getProjectListRequest();\r\n if (\r\n currentUser &&\r\n currentUser.data &&\r\n (currentUser.data.admin || currentUser.data.countryManager)\r\n ) {\r\n response.data.result = sortProjectListBySupportEnabledAccessDate(\r\n response.data.result,\r\n );\r\n }\r\n await dispatch(\r\n projectListLoaded({\r\n response,\r\n }),\r\n );\r\n const currentState = getState().data;\r\n const projectList = currentState.projectList.getProjects();\r\n const selectedProject = currentState.selectedProject.project;\r\n let selectedProjectPresentInProjectList = false;\r\n if (\r\n projectList.length &&\r\n !isNullOrUndefined(selectedProject) &&\r\n selectedProject.id\r\n ) {\r\n /**\r\n * If there are projects in the project list and there is currently a selected project,\r\n * we need to make sure it is present in the project list. If not, we need to clean up the selected project.\r\n */\r\n selectedProjectPresentInProjectList = projectList.find((project) => {\r\n return project.id === selectedProject.id;\r\n });\r\n }\r\n\r\n if (!projectList.length) {\r\n // This clears the selected project when the list is empty.\r\n dispatch(clearSelectedProject());\r\n } else if (!selectedProjectPresentInProjectList) {\r\n //When project list is not empty, then filter the project list based on selected geo in project list header dropdown.\r\n const selectedGeo = currentState.projectList.selectedGeo;\r\n const filteredProjectList = projectList.filter((project) => {\r\n if (selectedGeo.value === GEO_NAMES.ALL) {\r\n return project;\r\n }\r\n return project.geoCode === selectedGeo.value;\r\n });\r\n /**\r\n * This initializes the default selected project, when the project list is not empty, but the currently selected\r\n * project is not found in the project list. This can happen if a new project is created without a link\r\n * to the current user, or if the current user is removed from an existing project they were linked to.\r\n * If the selected project is found in the list, no update is needed.\r\n */\r\n filteredProjectList.length\r\n ? dispatch(\r\n setSelectedProjectFromProjectList({\r\n projectListEntry: filteredProjectList[0],\r\n }),\r\n )\r\n : dispatch(clearSelectedProject());\r\n } else if (selectedProjectPresentInProjectList) {\r\n /**\r\n * This call is needed to re-load the statement's for a given page if a user navigates back to the homepage from\r\n * any other page. If the statements have been updated at all, the changes are not reflected right now on the homepage\r\n * as the statements are not refreshed at all.\r\n *\r\n * TODO: The real fix for this will be to migrate the statement fetch calls to the statement content panel itself to make the\r\n * proper back-end calls by type, which can be done once we migrate to a URL parameter approach to the statements tab and\r\n * we implement new endpoints on the back-end.\r\n *\r\n */\r\n dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: selectedProject.id,\r\n }),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(projectListError(error));\r\n }\r\n};\r\n\r\nconst sortProjectListBySupportEnabledAccessDate = (projectList) => {\r\n return projectList.sort((a, b) => {\r\n if (a.adminGroupAddDate === null) return 1; // Move objects with null date to end\r\n if (b.adminGroupAddDate === null) return -1; // Move objects with null date to end\r\n return moment(b.adminGroupAddDate) - moment(a.adminGroupAddDate); // Sort by date\r\n });\r\n};\r\n\r\nexport const setProjectHeadersAction =\r\n (config, projectId) => (dispatch, getState) => {\r\n const pathName = window.location.pathname;\r\n let defaultConfig = config && config.defaults;\r\n\r\n const isCreateProjectPage =\r\n pathName && pathName.includes(ROUTE_CONSTANTS.PROJECT_CREATION_PAGE);\r\n\r\n const isAdminModulePage =\r\n pathName && pathName.includes(ROUTE_CONSTANTS.ADMIN_MODULE_PAGE);\r\n\r\n // get updated selected project data (it has to be used to set http header)\r\n const updatedSelectedProject =\r\n getState() &&\r\n getState().data &&\r\n getState().data.selectedProject &&\r\n getState().data.selectedProject.project;\r\n // after loading data to redux store update country code and member firm code to be sent with http headers.\r\n\r\n if (defaultConfig) {\r\n if (isAdminModulePage) {\r\n // adding client id to header when in admin module page\r\n defaultConfig.headers.common['x-client-id'] = 0;\r\n } else if (isCreateProjectPage) {\r\n // adding client id to header when in create project page\r\n defaultConfig.headers.common['x-client-id'] = -1;\r\n } else if (projectId) {\r\n defaultConfig.headers.common['x-client-id'] = projectId;\r\n } else if (updatedSelectedProject) {\r\n // adding client id to header\r\n defaultConfig.headers.common['x-client-id'] = isNullOrUndefined(\r\n updatedSelectedProject.id,\r\n )\r\n ? EMPTY_STRING\r\n : parseInt(updatedSelectedProject.id);\r\n\r\n if (defaultConfig.headers.common['x-client-id'] === EMPTY_STRING) {\r\n //try to get project id from url\r\n const isStatemenmtPage = pathName.includes('statement');\r\n if (isStatemenmtPage) {\r\n const urlSections = pathName.split('/');\r\n const projectIdIndex = urlSections.indexOf('project') + 1;\r\n defaultConfig.headers.common['x-client-id'] = parseInt(\r\n urlSections[projectIdIndex],\r\n );\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\nexport const softDeleteProject =\r\n ({ project }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n //First soft delete the project.\r\n await softDeleteProjectRequest(project.id);\r\n // ensure selected project ID is set so card is scrolled to on mount\r\n dispatch(setSelectedProjectId({ projectId: project.id }));\r\n //Refresh the project list after a successful deletion.\r\n await dispatch(fetchProjectList());\r\n //Finally, after successful deletion, update the currently selected project with the copy of it that was just fetched.\r\n const updatedProjectList = getState().data.projectList.getProjects();\r\n const updatedSelectedProject = updatedProjectList.find(\r\n (updatedProject) => {\r\n return updatedProject.id === project.id;\r\n },\r\n );\r\n await dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: updatedSelectedProject.id,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(softDeleteProjectError(error));\r\n }\r\n };\r\n\r\nexport const restoreDeletedProject =\r\n ({ project }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n //Restore the deleted project.\r\n await restoreSoftDeletedProjectRequest(project.id);\r\n // ensure selected project ID is set so card is scrolled to on mount\r\n dispatch(setSelectedProjectId({ projectId: project.id }));\r\n //Refresh the project list after a successful restoration.\r\n await dispatch(fetchProjectList());\r\n //Finally, after successful restoration, update the currently selected project with the copy of it that was just fetched.\r\n const updatedProjectList = getState().data.projectList.getProjects();\r\n // If there are no projects, clear the selected project.\r\n if (!updatedProjectList.length) {\r\n dispatch(clearSelectedProject());\r\n } else {\r\n // Otherwise try to find the currently selected project in the list of projects. For soft-deleted projects on support-team access\r\n // that are visible to admins, restoring them removes support-team access, so they may no longer be in the list of projects.\r\n // Consequently we check if the currently selected project is in the list. If it is, it remains selected, otherwise we default\r\n // to selecting the first project in the list.\r\n const updatedSelectedProject = updatedProjectList.find(\r\n (updatedProject) => {\r\n return updatedProject.id === project.id;\r\n },\r\n );\r\n if (!isNullOrUndefined(updatedSelectedProject)) {\r\n await dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: updatedSelectedProject.id,\r\n }),\r\n );\r\n } else {\r\n await dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: updatedProjectList[0].id,\r\n }),\r\n );\r\n }\r\n }\r\n } catch (error) {\r\n dispatch(restoreDeletedProjectError(error));\r\n }\r\n };\r\n\r\nexport const permanentlyDeleteProject =\r\n ({ project }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n const selectedProject =\r\n project && project.id\r\n ? project\r\n : getState().data.selectedProject.project;\r\n //First permanently delete the project.\r\n await permanentlyDeleteProjectRequest(selectedProject.id);\r\n //Refresh the project list after a successful deletion.\r\n await dispatch(fetchProjectList());\r\n } catch (error) {\r\n dispatch(permanentlyDeleteProjectError(error));\r\n }\r\n };\r\n\r\nexport const setProjectFilterGeo = (geoCode) => (dispatch, getState) => {\r\n dispatch(setGeoToFilterProjectList(geoCode));\r\n};\r\n\r\nexport const setAppliedSearchTerm = (searchTerm) => (dispatch, getState) => {\r\n dispatch(setAppliedSearchTermToFilterProjectList(searchTerm));\r\n};\r\n\r\nexport const clearAppliedSearchTerm = () => (dispatch, getState) => {\r\n dispatch(clearAppliedSearchTermToFilterProjectList());\r\n};\r\n\r\nexport const setFirstProjectAsSelectedFromProjectList =\r\n ({ projectList }) =>\r\n (dispatch, getState) => {\r\n if (projectList.length) {\r\n dispatch(\r\n setSelectedProjectFromProjectList({ projectListEntry: projectList[0] }),\r\n );\r\n } else {\r\n dispatch(clearSelectedProject());\r\n }\r\n };\r\n","import { withDefaultContextAsProject } from 'api/api-default-context';\r\n\r\nexport const softDeleteProjectRequest = (clientID) => {\r\n return withDefaultContextAsProject({}, clientID)\r\n .post(`/tieout/clients/${parseInt(clientID)}/delete`)\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const restoreSoftDeletedProjectRequest = (clientID) => {\r\n return withDefaultContextAsProject({}, clientID)\r\n .post(`/tieout/clients/restore/${parseInt(clientID)}`)\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const permanentlyDeleteProjectRequest = (clientID) => {\r\n return withDefaultContextAsProject({}, clientID)\r\n .post(`/tieout/clients/${parseInt(clientID)}/permanent-delete`)\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n","import BaseModel from 'models/base-model';\r\nimport {\r\n UNSELECTED_FILTER,\r\n API_BOOLS,\r\n isFilterUnselected,\r\n} from 'constants/feature/statement-navigator/statement-nav-element-filter-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n SCALING_OPTIONS_MAP,\r\n UNIT_OPTIONS_MAP,\r\n} from 'constants/feature/element-attribute-constants';\r\n\r\nconst DEFAULT_PAGE_OFFSET = 0;\r\nconst DEFAULT_PAGE_SIZE = 100;\r\n\r\n/** Pass undefined if selection should not be included, the BE looks for the inclusion of different keys to determine\r\n * which keys to filter on, and it doesn't care about keys that ARE NOT PASSED\r\n */\r\nconst apiBoolFormat = (bool) =>\r\n bool === true\r\n ? API_BOOLS.TRUE\r\n : bool === false\r\n ? API_BOOLS.FALSE\r\n : UNSELECTED_FILTER;\r\n\r\nconst apiArrayFormat = (array) =>\r\n Array.isArray(array) && array.length > 0 ? array : UNSELECTED_FILTER;\r\n\r\nconst handleTrueBooleanFilterUpdate = (val) =>\r\n val === true ? true : UNSELECTED_FILTER;\r\n\r\nconst getORedChipTextArray = ({ valuesArray, areValuesIntl }) => {\r\n if (!Array.isArray(valuesArray) || valuesArray.length === 0) {\r\n return null;\r\n }\r\n const chipTextArray = [];\r\n valuesArray.forEach((value, i) => {\r\n if (i > 0) {\r\n chipTextArray.push({\r\n intlId: 'statement-nav-panel.tab.elements.filters.logic.or',\r\n });\r\n }\r\n if (areValuesIntl) {\r\n chipTextArray.push({\r\n intlId: value,\r\n });\r\n } else {\r\n chipTextArray.push({ text: value });\r\n }\r\n });\r\n return chipTextArray;\r\n};\r\n/**\r\n * Class for controlling element filters when searching for elements\r\n * NOTE: properties prefixed with an '_' are useful only to aid in processing and display, all properties that relate\r\n * directly to a filter property that is sent to the api should have no '_' prefix\r\n * The '_' prefix is looked for in unit tests to separate filter properties from convenience properties\r\n */\r\nexport default class ElementFilters extends BaseModel({\r\n verified: UNSELECTED_FILTER,\r\n reviewed: UNSELECTED_FILTER,\r\n comfortAssign: UNSELECTED_FILTER,\r\n flagOverride: UNSELECTED_FILTER,\r\n userFlag: UNSELECTED_FILTER,\r\n formulaFlag: UNSELECTED_FILTER,\r\n internalReferenceFlag: UNSELECTED_FILTER,\r\n automatedFormulaFlag: UNSELECTED_FILTER,\r\n manualFormulaFlag: UNSELECTED_FILTER,\r\n automatedTickmarksFlag: UNSELECTED_FILTER,\r\n manualTickmarksFlag: UNSELECTED_FILTER,\r\n parentFlagged: UNSELECTED_FILTER, // not actually sent to BE\r\n _periodsMap: {}, // [period val] : true, map of selected periods for O(1) look up\r\n periodsArray: [], // array of selected period values to send to api\r\n _scalingsMap: {},\r\n scalingsArray: [],\r\n _unitsMap: {},\r\n unitsArray: [],\r\n _entitiesMap: {},\r\n entitiesArray: [],\r\n automatedWorkpaperFlag: UNSELECTED_FILTER,\r\n manualWorkpaperFlag: UNSELECTED_FILTER,\r\n wpReference: UNSELECTED_FILTER,\r\n comfortLetter: UNSELECTED_FILTER,\r\n internalReference: UNSELECTED_FILTER,\r\n automatedInternalReferenceFlag: UNSELECTED_FILTER,\r\n manualInternalReferenceFlag: UNSELECTED_FILTER,\r\n tickmarks: UNSELECTED_FILTER,\r\n parentFormula: UNSELECTED_FILTER, // not actually sent to BE\r\n recalculatedFormula: UNSELECTED_FILTER,\r\n footedFormula: UNSELECTED_FILTER,\r\n crossFootedFormula: UNSELECTED_FILTER,\r\n roundedFormula: UNSELECTED_FILTER,\r\n wpReferenceArray: [],\r\n _wpReferencesMap: {},\r\n comfortLetterArray: [],\r\n _comfortLetterMap: {},\r\n tickmarksArray: [],\r\n _tickmarksMap: {},\r\n _first: DEFAULT_PAGE_OFFSET,\r\n _size: DEFAULT_PAGE_SIZE,\r\n _searchTerm: '',\r\n _sectionsMap: {},\r\n sectionIds: [], // array of selected section values to send to api\r\n}) {\r\n get filtersCount() {\r\n let count = 0;\r\n if (this.verified !== UNSELECTED_FILTER) count++;\r\n if (this.reviewed !== UNSELECTED_FILTER) count++;\r\n if (this.comfortAssign !== UNSELECTED_FILTER) count++;\r\n if (\r\n this.userFlag !== UNSELECTED_FILTER ||\r\n this.formulaFlag !== UNSELECTED_FILTER ||\r\n this.internalReferenceFlag !== UNSELECTED_FILTER ||\r\n this.parentFlagged !== UNSELECTED_FILTER ||\r\n this.flagOverride !== UNSELECTED_FILTER\r\n ) {\r\n count++;\r\n }\r\n if (this.periodsArray.length > 0) count++;\r\n if (this.scalingsArray.length > 0) count++;\r\n if (this.unitsArray.length > 0) count++;\r\n if (this.entitiesArray.length > 0) count++;\r\n if (this.wpReference !== UNSELECTED_FILTER) count++;\r\n if (this.comfortLetter !== UNSELECTED_FILTER) count++;\r\n\r\n if (this.automatedWorkpaperFlag) count++;\r\n if (this.manualWorkpaperFlag) count++;\r\n if (this.internalReference !== UNSELECTED_FILTER) count++;\r\n if (this.automatedInternalReferenceFlag) count++;\r\n if (this.manualInternalReferenceFlag) count++;\r\n if (this.tickmarks !== UNSELECTED_FILTER) count++;\r\n if (this.roundedFormula !== UNSELECTED_FILTER) count++;\r\n if (\r\n this.parentFormula !== UNSELECTED_FILTER &&\r\n (this.recalculatedFormula !== UNSELECTED_FILTER ||\r\n this.footedFormula !== UNSELECTED_FILTER ||\r\n this.crossFootedFormula !== UNSELECTED_FILTER)\r\n ) {\r\n count++;\r\n }\r\n if (this.automatedFormulaFlag) count++;\r\n if (this.manualFormulaFlag) count++;\r\n if (this.automatedTickmarksFlag) count++;\r\n if (this.manualTickmarksFlag) count++;\r\n if (this.parentFormula === false) count++;\r\n if (this.sectionIds.length > 0) count++;\r\n return count;\r\n }\r\n\r\n get verifiedChiptext() {\r\n if (this.verified) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.verification.verified';\r\n } else if (this.verified === false) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.verification.unverified';\r\n }\r\n return null;\r\n }\r\n\r\n get reviewedChiptext() {\r\n if (this.reviewed) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.review.review';\r\n } else if (this.reviewed === false) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.review.unreview';\r\n }\r\n return null;\r\n }\r\n\r\n get comfortAssignChiptext() {\r\n if (this.comfortAssign) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotation.assigned';\r\n } else if (this.comfortAssign === false) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotation.notassigned';\r\n }\r\n return null;\r\n }\r\n\r\n get flagChipText() {\r\n const selectedFlags = [];\r\n if (this.isUnflagged() && !this.flagOverride) {\r\n selectedFlags.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.flag.unflag',\r\n );\r\n } else if (this.isUnflagged() && this.flagOverride) {\r\n selectedFlags.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.chip.flagOverride',\r\n );\r\n } else {\r\n if (this.userFlag) {\r\n selectedFlags.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.flag.user',\r\n );\r\n }\r\n if (this.formulaFlag) {\r\n selectedFlags.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.flag.formula',\r\n );\r\n }\r\n if (this.internalReferenceFlag) {\r\n selectedFlags.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.flag.ir',\r\n );\r\n }\r\n }\r\n return getORedChipTextArray({\r\n valuesArray: selectedFlags,\r\n areValuesIntl: true,\r\n });\r\n }\r\n\r\n get periodChipText() {\r\n return getORedChipTextArray({\r\n valuesArray: this.periodsArray,\r\n areValuesIntl: false,\r\n });\r\n }\r\n\r\n get scalingChipText() {\r\n return getORedChipTextArray({\r\n valuesArray: this.scalingsArray.map(\r\n (id) => SCALING_OPTIONS_MAP.get(parseInt(id)).title,\r\n ),\r\n areValuesIntl: true,\r\n });\r\n }\r\n\r\n get unitChipText() {\r\n return getORedChipTextArray({\r\n valuesArray: this.unitsArray.map(\r\n (id) => UNIT_OPTIONS_MAP.get(parseInt(id)).title,\r\n ),\r\n areValuesIntl: true,\r\n });\r\n }\r\n\r\n get entityChipText() {\r\n return getORedChipTextArray({\r\n valuesArray: this.entitiesArray,\r\n areValuesIntl: false,\r\n });\r\n }\r\n\r\n get wprChipText() {\r\n const selectedWprs = [];\r\n if (this.wpReference) {\r\n selectedWprs.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.wpr.with',\r\n );\r\n }\r\n if (this.wpReference === false) {\r\n selectedWprs.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.wpr.without',\r\n );\r\n } else if (this.wpReference && this.wpReferenceArray.length > 0) {\r\n return [\r\n {\r\n intlId: 'statement-nav-panel.tab.elements.filters.modal.col-3.wpr',\r\n },\r\n ...getORedChipTextArray({\r\n valuesArray: this.wpReferenceArray,\r\n areValuesIntl: false,\r\n }),\r\n ];\r\n }\r\n return getORedChipTextArray({\r\n valuesArray: selectedWprs,\r\n areValuesIntl: true,\r\n });\r\n }\r\n\r\n get comfortLetterChipText() {\r\n const selectedComfortLetter = [];\r\n if (this.comfortLetter) {\r\n selectedComfortLetter.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotations.with',\r\n );\r\n }\r\n if (this.comfortLetter === false) {\r\n selectedComfortLetter.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.comfort-annotations.without',\r\n );\r\n } else if (this.comfortLetter && this.comfortLetterArray.length > 0) {\r\n return [\r\n {\r\n intlId:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.comfort_annotation',\r\n },\r\n ...getORedChipTextArray({\r\n valuesArray: this.comfortLetterArray,\r\n areValuesIntl: false,\r\n }),\r\n ];\r\n }\r\n return getORedChipTextArray({\r\n valuesArray: selectedComfortLetter,\r\n areValuesIntl: true,\r\n });\r\n }\r\n\r\n get tickmarksChipText() {\r\n const selectedTickmark = [];\r\n if (this.tickmarks) {\r\n selectedTickmark.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.tickmark.with',\r\n );\r\n }\r\n if (!this.tickmarks) {\r\n selectedTickmark.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.tickmark.without',\r\n );\r\n } else if (this.tickmarks && this.tickmarksArray.length > 0) {\r\n return [\r\n {\r\n intlId:\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.tickmark',\r\n },\r\n ...getORedChipTextArray({\r\n valuesArray: this.tickmarksArray,\r\n areValuesIntl: false,\r\n }),\r\n ];\r\n }\r\n return getORedChipTextArray({\r\n valuesArray: selectedTickmark,\r\n areValuesIntl: true,\r\n });\r\n }\r\n get tickmarksArrayLength() {\r\n return this.tickmarksArray.length;\r\n }\r\n get automatedOrManualChipText() {\r\n const selectedTickmarks = [];\r\n if (this.tickmarks && this.tickmarksArray.length) {\r\n if (this.automatedTickmarksFlag) {\r\n selectedTickmarks.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.element.Automated',\r\n );\r\n }\r\n if (this.manualTickmarksFlag) {\r\n selectedTickmarks.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.element.Manual',\r\n );\r\n }\r\n }\r\n return getORedChipTextArray({\r\n valuesArray: selectedTickmarks,\r\n areValuesIntl: true,\r\n });\r\n }\r\n\r\n get irChipText() {\r\n const selectedIRs = [];\r\n if (this.internalReference) {\r\n selectedIRs.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.ir.with',\r\n );\r\n } else if (this.internalReference === false) {\r\n selectedIRs.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.ir.without',\r\n );\r\n }\r\n\r\n return getORedChipTextArray({\r\n valuesArray: selectedIRs,\r\n areValuesIntl: true,\r\n });\r\n }\r\n get irAutomatedChipText() {\r\n return this.automatedInternalReferenceFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.ir.Automated'\r\n : null;\r\n }\r\n get irManualChipText() {\r\n return this.manualInternalReferenceFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.ir.Manual'\r\n : null;\r\n }\r\n get wprAutomatedChipText() {\r\n return this.automatedWorkpaperFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.wpr.Automated'\r\n : null;\r\n }\r\n get wprManualChipText() {\r\n return this.manualWorkpaperFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.wpr.Manual'\r\n : null;\r\n }\r\n get tickmarkChipText() {\r\n if (this.tickmarks) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.tickmark.with';\r\n } else if (this.tickmarks === false) {\r\n return 'statement-nav-panel.tab.elements.filters.modal.col-2.tickmark.without';\r\n }\r\n return null;\r\n }\r\n\r\n get formulaChipText() {\r\n const selectedFormulas = [];\r\n if (this.parentFormula === false) {\r\n selectedFormulas.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-2.formula.without',\r\n );\r\n } else {\r\n if (this.recalculatedFormula) {\r\n selectedFormulas.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.formula.reclac',\r\n );\r\n }\r\n if (this.footedFormula) {\r\n selectedFormulas.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.formula.foot',\r\n );\r\n }\r\n if (this.crossFootedFormula) {\r\n selectedFormulas.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.formula.cross-foot',\r\n );\r\n }\r\n }\r\n return getORedChipTextArray({\r\n valuesArray: selectedFormulas,\r\n areValuesIntl: true,\r\n });\r\n }\r\n get automatedFormulaFlagChipText() {\r\n return this.automatedFormulaFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.formula.Automated'\r\n : null;\r\n }\r\n get manualFormulaFlagChipText() {\r\n return this.manualFormulaFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.formula.Manual'\r\n : null;\r\n }\r\n get automatedTickmarksFlagChipText() {\r\n return this.automatedTickmarksFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.tm.Automated'\r\n : null;\r\n }\r\n get manualTickmarksFlagChipText() {\r\n return this.manualTickmarksFlag\r\n ? 'statement-nav-panel.tab.elements.filters.modal.col-3.element.tm.Manual'\r\n : null;\r\n }\r\n get roundedFormulaChipText() {\r\n const selectedFormulas = [];\r\n\r\n selectedFormulas.push(\r\n 'statement-nav-panel.tab.elements.filters.modal.col-3.formula.rounded',\r\n );\r\n\r\n return getORedChipTextArray({\r\n valuesArray: selectedFormulas,\r\n areValuesIntl: true,\r\n });\r\n }\r\n\r\n get sectionSegmentChipText() {\r\n return [\r\n {\r\n intlId:\r\n 'statement-nav-panel.tab.elements.filters.modal.section-segment-heading-suffix',\r\n },\r\n ...getORedChipTextArray({\r\n valuesArray: Object.values(this._sectionsMap),\r\n areValuesIntl: false,\r\n }),\r\n ];\r\n }\r\n get pageSegmentChipText() {\r\n return [\r\n ...getORedChipTextArray({\r\n valuesArray: Object.values(this._sectionsMap),\r\n areValuesIntl: false,\r\n }),\r\n ];\r\n }\r\n\r\n get checkIfWithWPRIsSelected() {\r\n if (this.wpReference) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n get checkIfWithComfortLetterIsSelected() {\r\n if (this.comfortLetter) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n get checkIfWithTickmarksIsSelected() {\r\n if (this.tickmarks) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n toApiFormat() {\r\n return {\r\n sectionIds: apiArrayFormat(this.sectionIds),\r\n ...this._getFlagApiFormat(),\r\n verified: apiBoolFormat(this.verified),\r\n reviewed: apiBoolFormat(this.reviewed),\r\n comfortAssign: apiBoolFormat(this.comfortAssign),\r\n periods: apiArrayFormat(this.periodsArray),\r\n scalings: apiArrayFormat(this.scalingsArray),\r\n units: apiArrayFormat(this.unitsArray),\r\n entities: apiArrayFormat(this.entitiesArray),\r\n wpReference: apiBoolFormat(this.wpReference),\r\n wpRefNumbers: apiArrayFormat(this.wpReferenceArray),\r\n comfortLetter: apiBoolFormat(this.comfortLetter),\r\n comfortLetterLabel: apiArrayFormat(this.comfortLetterArray),\r\n tickmarkIds: apiArrayFormat(Object.values(this._tickmarksMap)),\r\n ...this._getFormulaApiFormat(),\r\n ...this._getIRApiFormat(),\r\n ...this._getWPRApiFormat(),\r\n ...this._getTMApiFormat(),\r\n };\r\n }\r\n\r\n hasFilters() {\r\n return (\r\n this.periodsArray.length > 0 ||\r\n this.scalingsArray.length > 0 ||\r\n this.unitsArray.length > 0 ||\r\n this.entitiesArray.length > 0 ||\r\n this.wpReferenceArray.length > 0 ||\r\n this.tickmarksArray.length > 0 ||\r\n this.comfortLetterArray.length > 0 ||\r\n this.areSectionsSelected() ||\r\n !isFilterUnselected(this.sectionId) ||\r\n !isFilterUnselected(this.verified) ||\r\n !isFilterUnselected(this.reviewed) ||\r\n !isFilterUnselected(this.comfortAssign) ||\r\n !isFilterUnselected(this.flagOverride) ||\r\n !isFilterUnselected(this.userFlag) ||\r\n !isFilterUnselected(this.formulaFlag) ||\r\n !isFilterUnselected(this.internalReferenceFlag) ||\r\n !isFilterUnselected(this.parentFlagged) ||\r\n !isFilterUnselected(this.wpReference) ||\r\n !isFilterUnselected(this.comfortLetter) ||\r\n !isFilterUnselected(this.automatedInternalReferenceFlag) ||\r\n !isFilterUnselected(this.manualInternalReferenceFlag) ||\r\n !isFilterUnselected(this.automatedWorkpaperFlag) ||\r\n !isFilterUnselected(this.manualWorkpaperFlag) ||\r\n !isFilterUnselected(this.tickmarks) ||\r\n !isFilterUnselected(this.parentFormula) ||\r\n !isFilterUnselected(this.recalculatedFormula) ||\r\n !isFilterUnselected(this.footedFormula) ||\r\n !isFilterUnselected(this.crossFootedFormula) ||\r\n !isFilterUnselected(this.roundedFormula) ||\r\n !isFilterUnselected(this.automatedFormulaFlag) ||\r\n !isFilterUnselected(this.manualFormulaFlag) ||\r\n !isFilterUnselected(this.internalReference) ||\r\n !isFilterUnselected(this.automatedTickmarksFlag) ||\r\n !isFilterUnselected(this.manualTickmarksFlag)\r\n );\r\n }\r\n\r\n clearSectionIds() {\r\n return this.merge({\r\n _sectionsMap: {},\r\n sectionIds: [],\r\n });\r\n }\r\n\r\n isAllFlagged() {\r\n return (\r\n this.userFlag === true &&\r\n this.formulaFlag === true &&\r\n this.internalReferenceFlag === true\r\n );\r\n }\r\n\r\n isUnflagged() {\r\n return this.parentFlagged === false;\r\n }\r\n\r\n setVerified(val) {\r\n return this.merge({\r\n verified: val,\r\n });\r\n }\r\n\r\n clearVerified() {\r\n return this.merge({\r\n verified: UNSELECTED_FILTER,\r\n });\r\n }\r\n\r\n setReviewed(val) {\r\n return this.merge({\r\n reviewed: val,\r\n });\r\n }\r\n\r\n setComfortAssign(val) {\r\n return this.merge({\r\n comfortAssign: val,\r\n });\r\n }\r\n\r\n clearReviewed() {\r\n return this.merge({\r\n reviewed: UNSELECTED_FILTER,\r\n });\r\n }\r\n\r\n clearComfortAssign() {\r\n return this.merge({\r\n comfortAssign: UNSELECTED_FILTER,\r\n });\r\n }\r\n\r\n setFlagOverride(val) {\r\n return this.merge({\r\n flagOverride: val,\r\n });\r\n }\r\n\r\n _handleChildFlagUpdate(potentialNewFilters) {\r\n const { internalReferenceFlag, formulaFlag, userFlag } =\r\n potentialNewFilters;\r\n const _shouldClearParentToo =\r\n !internalReferenceFlag && !formulaFlag && !userFlag;\r\n if (_shouldClearParentToo) {\r\n // clear parent if this is the last unchecked\r\n return this.clearFlagged();\r\n }\r\n return potentialNewFilters;\r\n }\r\n\r\n setUserFlag(val) {\r\n return this._handleChildFlagUpdate(\r\n this.merge({\r\n userFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n\r\n setFormulaFlag(val) {\r\n return this._handleChildFlagUpdate(\r\n this.merge({\r\n formulaFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n\r\n setIRFlag(val) {\r\n return this._handleChildFlagUpdate(\r\n this.merge({\r\n internalReferenceFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n\r\n clearFlagged() {\r\n return this.merge({\r\n parentFlagged: UNSELECTED_FILTER,\r\n userFlag: UNSELECTED_FILTER,\r\n formulaFlag: UNSELECTED_FILTER,\r\n internalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n\r\n setParentFlagged(val) {\r\n if (val === true) {\r\n return this.merge({\r\n parentFlagged: true,\r\n userFlag: true,\r\n formulaFlag: true,\r\n internalReferenceFlag: true,\r\n });\r\n } else if (val === false) {\r\n return this.merge({\r\n parentFlagged: false,\r\n flagOverride: UNSELECTED_FILTER,\r\n userFlag: UNSELECTED_FILTER,\r\n formulaFlag: UNSELECTED_FILTER,\r\n internalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n } else {\r\n return this.clearFlagged();\r\n }\r\n }\r\n\r\n _getFlagApiFormat() {\r\n if (\r\n this.parentFlagged === false &&\r\n (this.flagOverride === false || this.flagOverride === UNSELECTED_FILTER)\r\n ) {\r\n // parentFlagged === false means user has selected \"unflagged\" option\r\n // BE expects unflagged option means all flag options are explicitly false\r\n return {\r\n userFlag: 0,\r\n formulaFlag: 0,\r\n internalReferenceFlag: 0,\r\n };\r\n } else if (this.parentFlagged === false && this.flagOverride === true) {\r\n return {\r\n userFlag: 0,\r\n formulaFlag: 0,\r\n internalReferenceFlag: 0,\r\n flagOverride: 1,\r\n };\r\n }\r\n return {\r\n userFlag: apiBoolFormat(this.userFlag),\r\n formulaFlag: apiBoolFormat(this.formulaFlag),\r\n internalReferenceFlag: apiBoolFormat(this.internalReferenceFlag),\r\n };\r\n }\r\n\r\n selectPeriod(period) {\r\n let _periodsMap = { ...this._periodsMap };\r\n if (this.isPeriodSelected(period)) {\r\n delete _periodsMap[period];\r\n } else {\r\n _periodsMap[period] = true;\r\n }\r\n return this.merge({\r\n _periodsMap,\r\n periodsArray: Object.keys(_periodsMap),\r\n });\r\n }\r\n\r\n isPeriodSelected(period) {\r\n return this._periodsMap[period];\r\n }\r\n\r\n arePeriodsSelected() {\r\n return this.periodsArray.length > 0;\r\n }\r\n\r\n clearPeriods() {\r\n return this.merge({\r\n periodsArray: [],\r\n _periodsMap: {},\r\n });\r\n }\r\n\r\n selectScaling(scaling) {\r\n let _scalingsMap = { ...this._scalingsMap };\r\n if (this.isScalingSelected(scaling)) {\r\n delete _scalingsMap[scaling.id];\r\n } else {\r\n _scalingsMap[scaling.id] = true;\r\n }\r\n return this.merge({\r\n _scalingsMap,\r\n scalingsArray: Object.keys(_scalingsMap).map((id) => parseInt(id)),\r\n });\r\n }\r\n\r\n isScalingSelected(scaling) {\r\n if (!isNullOrUndefined(scaling)) {\r\n return this._scalingsMap[scaling.id] || false;\r\n }\r\n return false;\r\n }\r\n\r\n areScalingsSelected() {\r\n return this.scalingsArray.length > 0;\r\n }\r\n\r\n clearScalings() {\r\n return this.merge({\r\n scalingsArray: [],\r\n _scalingsMap: {},\r\n });\r\n }\r\n\r\n selectUnit(unit) {\r\n let _unitsMap = { ...this._unitsMap };\r\n if (this.isUnitSelected(unit)) {\r\n delete _unitsMap[unit.id];\r\n } else {\r\n _unitsMap[unit.id] = true;\r\n }\r\n return this.merge({\r\n _unitsMap,\r\n unitsArray: Object.keys(_unitsMap).map((id) => parseInt(id)),\r\n });\r\n }\r\n\r\n isUnitSelected(unit) {\r\n if (!isNullOrUndefined(unit)) {\r\n return this._unitsMap[unit.id] || false;\r\n }\r\n return false;\r\n }\r\n\r\n areUnitsSelected() {\r\n return this.unitsArray.length > 0;\r\n }\r\n\r\n clearUnits() {\r\n return this.merge({\r\n unitsArray: [],\r\n _unitsMap: {},\r\n });\r\n }\r\n\r\n selectEntity(entity) {\r\n let _entitiesMap = { ...this._entitiesMap };\r\n if (this.isEntitySelected(entity)) {\r\n delete _entitiesMap[entity];\r\n } else {\r\n _entitiesMap[entity] = true;\r\n }\r\n return this.merge({\r\n _entitiesMap,\r\n entitiesArray: Object.keys(_entitiesMap),\r\n });\r\n }\r\n\r\n isEntitySelected(entity) {\r\n return this._entitiesMap[entity];\r\n }\r\n\r\n areEntitiesSelected() {\r\n return this.entitiesArray.length > 0;\r\n }\r\n\r\n areSectionsSelected() {\r\n return Object.entries(this._sectionsMap).length > 0;\r\n }\r\n\r\n selectWPReferences(wpr) {\r\n let _wpReferencesMap = { ...this._wpReferencesMap };\r\n if (this.isWPReferenceSelected(wpr)) {\r\n delete _wpReferencesMap[wpr];\r\n } else {\r\n _wpReferencesMap[wpr] = true;\r\n }\r\n\r\n return this.merge({\r\n _wpReferencesMap,\r\n wpReferenceArray: Object.keys(_wpReferencesMap),\r\n });\r\n }\r\n\r\n selectComfortLetter(comfortLetter) {\r\n let _comfortLetterMap = { ...this._comfortLetterMap };\r\n if (this.isComfortLetterSelected(comfortLetter.customLabel)) {\r\n delete _comfortLetterMap[comfortLetter.customLabel];\r\n } else {\r\n _comfortLetterMap[comfortLetter.customLabel] = true;\r\n }\r\n\r\n return this.merge({\r\n _comfortLetterMap,\r\n comfortLetterArray: Object.keys(_comfortLetterMap),\r\n });\r\n }\r\n\r\n isWPReferenceSelected(wpr) {\r\n return this._wpReferencesMap[wpr];\r\n }\r\n\r\n isComfortLetterSelected(comfortLetterLabel) {\r\n return this._comfortLetterMap[comfortLetterLabel];\r\n }\r\n\r\n selectTickmarks(tickmark) {\r\n let _tickmarksMap = { ...this._tickmarksMap };\r\n if (this.isTickmarkSelected(tickmark.noteOrdinal)) {\r\n delete _tickmarksMap[tickmark.noteOrdinal];\r\n } else {\r\n _tickmarksMap[tickmark.noteOrdinal] = tickmark.tickmarkId;\r\n }\r\n\r\n return this.merge({\r\n _tickmarksMap,\r\n tickmarksArray: Object.keys(_tickmarksMap),\r\n });\r\n }\r\n\r\n isTickmarkSelected(tickmark) {\r\n return this._tickmarksMap[tickmark];\r\n }\r\n\r\n clearEntities() {\r\n return this.merge({\r\n entitiesArray: [],\r\n _entitiesMap: {},\r\n });\r\n }\r\n\r\n setWPR(val) {\r\n if (val) {\r\n return this.merge({\r\n wpReference: val,\r\n });\r\n } else {\r\n return this.merge({\r\n wpReference: val,\r\n automatedWorkpaperFlag: UNSELECTED_FILTER,\r\n manualWorkpaperFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n }\r\n\r\n setWPRAutomated(val) {\r\n if (val) {\r\n return this.merge({\r\n automatedWorkpaperFlag: val,\r\n });\r\n } else {\r\n return this.merge({\r\n automatedWorkpaperFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n }\r\n\r\n setWPRManual(val) {\r\n if (val) {\r\n return this.merge({\r\n manualWorkpaperFlag: val,\r\n });\r\n } else {\r\n return this.merge({\r\n manualWorkpaperFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n }\r\n\r\n setComfortLetter(val) {\r\n return this.merge({\r\n comfortLetter: val,\r\n });\r\n }\r\n\r\n clearWPR() {\r\n return this.merge({\r\n automatedWorkpaperFlag: UNSELECTED_FILTER,\r\n manualWorkpaperFlag: UNSELECTED_FILTER,\r\n wpReference: UNSELECTED_FILTER,\r\n wpReferenceArray: [],\r\n _wpReferencesMap: {},\r\n });\r\n }\r\n\r\n clearComfortLetter() {\r\n return this.merge({\r\n comfortLetter: UNSELECTED_FILTER,\r\n comfortLetterArray: [],\r\n _comfortLetterMap: {},\r\n });\r\n }\r\n\r\n setIR(val) {\r\n if (!val) {\r\n return this.merge({\r\n internalReference: val,\r\n automatedInternalReferenceFlag: UNSELECTED_FILTER,\r\n manualInternalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n return this.merge({\r\n internalReference: val,\r\n });\r\n }\r\n\r\n clearIR() {\r\n if (this.automatedInternalReferenceFlag) {\r\n return this.merge({\r\n internalReference: UNSELECTED_FILTER,\r\n automatedInternalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n } else if (this.manualInternalReferenceFlag) {\r\n return this.merge({\r\n internalReference: UNSELECTED_FILTER,\r\n manualInternalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n } else {\r\n return this.merge({\r\n internalReference: UNSELECTED_FILTER,\r\n });\r\n }\r\n }\r\n\r\n setTickmarks(val) {\r\n if (!val) {\r\n return this.merge({\r\n tickmarks: val,\r\n automatedTickmarksFlag: UNSELECTED_FILTER,\r\n manualTickmarksFlag: UNSELECTED_FILTER,\r\n tickmarksArray: [],\r\n _tickmarksMap: {},\r\n });\r\n }\r\n return this.merge({\r\n tickmarks: val,\r\n });\r\n }\r\n\r\n clearTickmarks() {\r\n if (this.automatedTickmarksFlag && !this.tickmarksArray.length) {\r\n return this.merge({\r\n tickmarks: UNSELECTED_FILTER,\r\n automatedTickmarksFlag: UNSELECTED_FILTER,\r\n });\r\n } else if (this.manualTickmarksFlag && !this.tickmarksArray.length) {\r\n return this.merge({\r\n tickmarks: UNSELECTED_FILTER,\r\n manualTickmarksFlag: UNSELECTED_FILTER,\r\n });\r\n } else {\r\n return this.merge({\r\n tickmarks: UNSELECTED_FILTER,\r\n tickmarksArray: [],\r\n _tickmarksMap: {},\r\n });\r\n }\r\n }\r\n\r\n setParentFormula(val) {\r\n if (val === true) {\r\n return this.merge({\r\n parentFormula: true,\r\n recalculatedFormula: true,\r\n footedFormula: true,\r\n crossFootedFormula: true,\r\n });\r\n } else if (val === false) {\r\n return this.merge({\r\n parentFormula: false,\r\n recalculatedFormula: UNSELECTED_FILTER,\r\n footedFormula: UNSELECTED_FILTER,\r\n crossFootedFormula: UNSELECTED_FILTER,\r\n roundedFormula: UNSELECTED_FILTER,\r\n automatedFormulaFlag: UNSELECTED_FILTER,\r\n manualFormulaFlag: UNSELECTED_FILTER,\r\n });\r\n } else {\r\n return this.clearFormula();\r\n }\r\n }\r\n formulaFilterEnabled() {\r\n return (\r\n this.recalculatedFormula ||\r\n this.footedFormula ||\r\n this.crossFootedFormula ||\r\n this.automatedFormulaFlag ||\r\n this.manualFormulaFlag\r\n );\r\n }\r\n\r\n clearFormula() {\r\n return this.merge({\r\n parentFormula: UNSELECTED_FILTER,\r\n recalculatedFormula: UNSELECTED_FILTER,\r\n footedFormula: UNSELECTED_FILTER,\r\n crossFootedFormula: UNSELECTED_FILTER,\r\n roundedFormula: UNSELECTED_FILTER,\r\n automatedFormulaFlag: UNSELECTED_FILTER,\r\n manualFormulaFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearTypeFormula() {\r\n if (\r\n isFilterUnselected(this.automatedFormulaFlag) &&\r\n isFilterUnselected(this.manualFormulaFlag) &&\r\n isFilterUnselected(this.roundedFormula)\r\n ) {\r\n return this.merge({\r\n parentFormula: UNSELECTED_FILTER,\r\n recalculatedFormula: UNSELECTED_FILTER,\r\n footedFormula: UNSELECTED_FILTER,\r\n crossFootedFormula: UNSELECTED_FILTER,\r\n roundedFormula: UNSELECTED_FILTER,\r\n automatedFormulaFlag: UNSELECTED_FILTER,\r\n manualFormulaFlag: UNSELECTED_FILTER,\r\n });\r\n } else {\r\n return this.merge({\r\n recalculatedFormula: UNSELECTED_FILTER,\r\n footedFormula: UNSELECTED_FILTER,\r\n crossFootedFormula: UNSELECTED_FILTER,\r\n });\r\n }\r\n }\r\n clearAutomatedFormulaFlag() {\r\n if (\r\n !isFilterUnselected(this.manualFormulaFlag) ||\r\n !isFilterUnselected(this.recalculatedFormula) ||\r\n !isFilterUnselected(this.footedFormula) ||\r\n !isFilterUnselected(this.crossFootedFormula) ||\r\n !isFilterUnselected(this.roundedFormula)\r\n ) {\r\n return this.merge({\r\n automatedFormulaFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n return this.merge({\r\n parentFormula: UNSELECTED_FILTER,\r\n automatedFormulaFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearManualFormulaFlag() {\r\n if (\r\n !isFilterUnselected(this.automatedFormulaFlag) ||\r\n !isFilterUnselected(this.recalculatedFormula) ||\r\n !isFilterUnselected(this.footedFormula) ||\r\n !isFilterUnselected(this.crossFootedFormula) ||\r\n !isFilterUnselected(this.roundedFormula)\r\n ) {\r\n return this.merge({\r\n manualFormulaFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n return this.merge({\r\n parentFormula: UNSELECTED_FILTER,\r\n manualFormulaFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearIRAutomated() {\r\n if (this.manualInternalReferenceFlag) {\r\n return this.merge({\r\n automatedInternalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n return this.merge({\r\n internalReference: UNSELECTED_FILTER,\r\n automatedInternalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearIRManual() {\r\n if (this.automatedInternalReferenceFlag) {\r\n return this.merge({\r\n manualInternalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n return this.merge({\r\n internalReference: UNSELECTED_FILTER,\r\n manualInternalReferenceFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearWPRAutomated() {\r\n return this.merge({\r\n automatedWorkpaperFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearWPRManual() {\r\n return this.merge({\r\n manualWorkpaperFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearTMAutomated() {\r\n if (this.manualTickmarksFlag || this.tickmarksArrayLength) {\r\n return this.merge({ automatedTickmarksFlag: UNSELECTED_FILTER });\r\n }\r\n return this.merge({\r\n tickmarks: UNSELECTED_FILTER,\r\n automatedTickmarksFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearTMManual() {\r\n if (this.automatedTickmarksFlag || this.tickmarksArrayLength) {\r\n return this.merge({ manualTickmarksFlag: UNSELECTED_FILTER });\r\n }\r\n return this.merge({\r\n tickmarks: UNSELECTED_FILTER,\r\n manualTickmarksFlag: UNSELECTED_FILTER,\r\n });\r\n }\r\n clearRoundedFormula() {\r\n if (this.formulaFilterEnabled()) {\r\n return this.merge({\r\n roundedFormula: UNSELECTED_FILTER,\r\n });\r\n } else {\r\n return this.merge({\r\n parentFormula: UNSELECTED_FILTER,\r\n roundedFormula: UNSELECTED_FILTER,\r\n recalculatedFormula: UNSELECTED_FILTER,\r\n crossFootedFormula: UNSELECTED_FILTER,\r\n footedFormula: UNSELECTED_FILTER,\r\n });\r\n }\r\n }\r\n setAutomatedFormulaFlag(val) {\r\n return this._handleChildFormulaUpdate(\r\n this.merge({\r\n automatedFormulaFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setManualFormulaFlag(val) {\r\n return this._handleChildFormulaUpdate(\r\n this.merge({\r\n manualFormulaFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setIRAutomated(val) {\r\n return this._handleChildIRUpdate(\r\n this.merge({\r\n automatedInternalReferenceFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setIRManual(val) {\r\n return this._handleChildIRUpdate(\r\n this.merge({\r\n manualInternalReferenceFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setTMAutomated(val) {\r\n return this._handleChildTMUpdate(\r\n this.merge({\r\n automatedTickmarksFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setTMManual(val) {\r\n return this._handleChildTMUpdate(\r\n this.merge({\r\n manualTickmarksFlag: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setFormulaRecalc(val) {\r\n return this._handleChildFormulaUpdate(\r\n this.merge({\r\n recalculatedFormula: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setFormulaFoot(val) {\r\n return this._handleChildFormulaUpdate(\r\n this.merge({\r\n footedFormula: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setFormulaCrossFoot(val) {\r\n return this._handleChildFormulaUpdate(\r\n this.merge({\r\n crossFootedFormula: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n );\r\n }\r\n setFormulaRounded(val) {\r\n return this._handleChildFormulaUpdate(\r\n this.merge({\r\n roundedFormula: handleTrueBooleanFilterUpdate(val),\r\n }),\r\n true,\r\n );\r\n }\r\n\r\n selectSection(section) {\r\n let _sectionsMap = { ...this._sectionsMap };\r\n if (this.isSectionSelected(section.id)) {\r\n delete _sectionsMap[section.id];\r\n } else {\r\n _sectionsMap[section.id] = section.name;\r\n }\r\n\r\n return this.merge({ _sectionsMap, sectionIds: Object.keys(_sectionsMap) });\r\n }\r\n\r\n selectPages(sectionId) {\r\n let _sectionsMap = { ...this._sectionsMap };\r\n if (this.isPageSelected(sectionId)) {\r\n delete _sectionsMap[sectionId];\r\n } else {\r\n _sectionsMap[sectionId] = `Page ${sectionId}`;\r\n }\r\n\r\n return this.merge({ _sectionsMap, sectionIds: Object.keys(_sectionsMap) });\r\n }\r\n\r\n selectedSectionsLength() {\r\n return Object.keys(this._sectionsMap).length;\r\n }\r\n\r\n isSectionSelected(id) {\r\n return this._sectionsMap[id] ? true : false;\r\n }\r\n\r\n isPageSelected(id) {\r\n return this._sectionsMap[id] ? true : false;\r\n }\r\n\r\n _handleChildFormulaUpdate(potentialNewFilters, isRounded) {\r\n const {\r\n recalculatedFormula,\r\n footedFormula,\r\n crossFootedFormula,\r\n roundedFormula,\r\n automatedFormulaFlag,\r\n manualFormulaFlag,\r\n } = potentialNewFilters;\r\n const _shouldClearParentToo =\r\n !recalculatedFormula &&\r\n !footedFormula &&\r\n !roundedFormula &&\r\n !crossFootedFormula &&\r\n !automatedFormulaFlag &&\r\n !manualFormulaFlag;\r\n\r\n if (_shouldClearParentToo) {\r\n // clear parent if this is the last unchecked\r\n if (isRounded) {\r\n return this.clearRoundedFormula();\r\n }\r\n return this.clearFormula();\r\n }\r\n return potentialNewFilters;\r\n }\r\n\r\n _handleChildIRUpdate(potentialNewFilters) {\r\n const {\r\n automatedInternalReferenceFlag,\r\n internalReference,\r\n manualInternalReferenceFlag,\r\n } = potentialNewFilters;\r\n const _shouldClearParentToo = !(\r\n automatedInternalReferenceFlag || manualInternalReferenceFlag\r\n );\r\n\r\n if (_shouldClearParentToo && internalReference) {\r\n return this.clearIR();\r\n }\r\n return potentialNewFilters;\r\n }\r\n\r\n _handleChildTMUpdate(potentialNewFilters) {\r\n const {\r\n automatedTickmarksFlag,\r\n tickmarks,\r\n tickmarksArray,\r\n manualTickmarksFlag,\r\n } = potentialNewFilters;\r\n const _shouldClearParentToo = !(\r\n automatedTickmarksFlag || manualTickmarksFlag\r\n );\r\n if (_shouldClearParentToo && tickmarks && !tickmarksArray.length) {\r\n return this.clearTickmarks();\r\n }\r\n return potentialNewFilters;\r\n }\r\n\r\n _getFormulaApiFormat() {\r\n if (this.parentFormula === false) {\r\n // parentFormula === false means user has selected \"without formula\" option\r\n // BE expects without formula option means all formula options are explicitly false\r\n return {\r\n recalculatedFormula: 0,\r\n footedFormula: 0,\r\n crossFootedFormula: 0,\r\n roundedFormula: 0,\r\n automatedFormulaFlag: 0,\r\n manualFormulaFlag: 0,\r\n };\r\n }\r\n return {\r\n recalculatedFormula: apiBoolFormat(this.recalculatedFormula),\r\n footedFormula: apiBoolFormat(this.footedFormula),\r\n crossFootedFormula: apiBoolFormat(this.crossFootedFormula),\r\n roundedFormula: apiBoolFormat(this.roundedFormula),\r\n automatedFormulaFlag: apiBoolFormat(this.automatedFormulaFlag),\r\n manualFormulaFlag: apiBoolFormat(this.manualFormulaFlag),\r\n };\r\n }\r\n\r\n _getIRApiFormat() {\r\n if (this.internalReference) {\r\n return {\r\n internalReference: apiBoolFormat(this.internalReference),\r\n automatedInternalReferenceFlag: apiBoolFormat(\r\n this.automatedInternalReferenceFlag,\r\n ),\r\n manualInternalReferenceFlag: apiBoolFormat(\r\n this.manualInternalReferenceFlag,\r\n ),\r\n };\r\n } else {\r\n return { internalReference: apiBoolFormat(this.internalReference) };\r\n }\r\n }\r\n\r\n _getWPRApiFormat() {\r\n if (this.wpReference) {\r\n return {\r\n automatedWorkpaperFlag: apiBoolFormat(this.automatedWorkpaperFlag),\r\n manualWorkpaperFlag: apiBoolFormat(this.manualWorkpaperFlag),\r\n };\r\n }\r\n }\r\n _getTMApiFormat() {\r\n if (this.tickmarks) {\r\n return {\r\n tickmarks: apiBoolFormat(this.tickmarks),\r\n automatedTickmarksFlag: apiBoolFormat(this.automatedTickmarksFlag),\r\n manualTickmarksFlag: apiBoolFormat(this.manualTickmarksFlag),\r\n };\r\n } else {\r\n return {\r\n tickmarks: apiBoolFormat(this.tickmarks),\r\n };\r\n }\r\n }\r\n\r\n getPageParams() {\r\n return {\r\n first: this._first,\r\n searchTerm: this._searchTerm,\r\n size: this._size,\r\n };\r\n }\r\n\r\n setPageParams(pageParams = {}) {\r\n const definedParams = {};\r\n if (!isNullOrUndefined(pageParams.first)) {\r\n definedParams._first = pageParams.first;\r\n }\r\n if (!isNullOrUndefined(pageParams.searchTerm)) {\r\n definedParams._searchTerm = pageParams.searchTerm;\r\n }\r\n if (!isNullOrUndefined(pageParams.size)) {\r\n definedParams._size = pageParams.size;\r\n }\r\n return this.merge(definedParams);\r\n }\r\n\r\n setNextPage() {\r\n return this.setPageParams({ first: this._first + this._size });\r\n }\r\n\r\n resetPagination() {\r\n return this.setPageParams({\r\n first: DEFAULT_PAGE_OFFSET,\r\n size: DEFAULT_PAGE_SIZE,\r\n });\r\n }\r\n\r\n removeWPFilters() {\r\n return this.merge({\r\n wpReferenceArray: [],\r\n _wpReferencesMap: {},\r\n });\r\n }\r\n\r\n removeComfortLetterFilters() {\r\n return this.merge({\r\n comfortLetterArray: [],\r\n _comfortLetterMap: {},\r\n });\r\n }\r\n\r\n removeTickmarkFilters() {\r\n return this.merge({\r\n tickmarksArray: [],\r\n _tickmarksMap: {},\r\n });\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n getSectionAssignments,\r\n getAllSectionAssignments,\r\n} from 'api/sections-api';\r\nimport { fetchSectionHistoryDetails } from 'store/actions/section-review-history-actions';\r\n\r\nexport const fetchSectionAssignmentsLoadedAction = createAction(\r\n 'FETCH_SECTION_ASSIGNMENTS_LOADED',\r\n);\r\n\r\nexport const fetchSectionAssignmentsLoadingAction = createAction(\r\n 'FETCH_SECTION_ASSIGNMENTS_LOADING',\r\n);\r\n\r\nexport const fetchSectionAssignmentsErrorAction = createAction(\r\n 'FETCH_SECTION_ASSIGNMENTS_ERROR',\r\n);\r\n\r\nexport const fetchSectionAssignmentsListLoaded = createAction(\r\n 'FETCH_SECTION_ASSIGNMENTS_LIST_LOADED',\r\n);\r\n\r\nexport const fetchSectionAssignmentsListError = createAction(\r\n 'FETCH_SECTION_ASSIGNMENTS_LIST_ERROR',\r\n);\r\n\r\nexport const updateSectionAssignmentListFromSocket = createAction(\r\n 'UPDATE_SECTION_ASSIGNMENT_LIST_FROM_SOCKET',\r\n);\r\n\r\nexport const replaceNewWithSocketData = createAction(\r\n 'REPLACE_SECTION_WITH_NEW_SOCKET_DATA',\r\n);\r\n\r\nexport const updateSectionAssignmentListForBulkAssignFromSocket = createAction(\r\n 'UPDATE_SECTION_ASSIGNMENT_LIST_FOR_BULK_ASSIGN_FROM_SOCKET',\r\n);\r\nexport const updateSectionAssignmentListForBulkUnAssignFromSocket =\r\n createAction('UPDATE_SECTION_ASSIGNMENT_LIST_FOR_BULK_UNASSIGN_FROM_SOCKET');\r\n\r\nexport const updateSectionAssignmentInBulkFromSocket = createAction(\r\n 'UPDATE_SECTION_ASSIGNMENT_IN_BULK_FROM_SOCKET',\r\n);\r\n\r\nexport const fetchSectionAssignmentsList =\r\n ({ revisionId, statementId }) =>\r\n async (dispatch, getStore) => {\r\n const { currentUser } = getStore().data;\r\n\r\n try {\r\n const response = await getAllSectionAssignments({\r\n revisionId,\r\n statementId,\r\n });\r\n dispatch(\r\n fetchSectionAssignmentsListLoaded({\r\n response,\r\n currentUserId: currentUser.id,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(fetchSectionAssignmentsListError(error));\r\n }\r\n };\r\n\r\nexport const fetchSectionAssignments =\r\n ({ revisionId, sectionId, usersList }) =>\r\n async (dispatch) => {\r\n dispatch(fetchSectionAssignmentsLoadingAction());\r\n await dispatch(\r\n fetchSectionAssignmentsWithoutLoading({\r\n revisionId,\r\n sectionId,\r\n usersList,\r\n }),\r\n );\r\n };\r\n\r\nexport const fetchSectionAssignmentsWithoutLoading =\r\n ({ revisionId, sectionId, usersList }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await getSectionAssignments({ revisionId, sectionId });\r\n dispatch(fetchSectionAssignmentsLoadedAction({ response, usersList }));\r\n } catch (error) {\r\n fetchSectionAssignmentsErrorAction(error);\r\n }\r\n };\r\n\r\nexport const updateBulkSectionAssignmentsList =\r\n ({ revisionId, sectionId, usersList }) =>\r\n async (dispatch) => {\r\n dispatch(fetchSectionAssignmentsLoadingAction());\r\n if (sectionId || sectionId === 0) {\r\n await dispatch(\r\n fetchSectionAssignmentsWithoutLoading({\r\n revisionId,\r\n sectionId,\r\n usersList,\r\n }),\r\n );\r\n await dispatch(\r\n fetchSectionHistoryDetails({\r\n revisionId,\r\n sectionId,\r\n }),\r\n );\r\n }\r\n\r\n await dispatch(\r\n fetchSectionAssignmentsList({\r\n revisionId,\r\n }),\r\n );\r\n };\r\n","import { getRevisionsSectionsRequest } from 'api/sections-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const sectionTreeListLoading = createAction('SECTION_TREE_LIST_LOADING');\r\nexport const sectionTreeListError = createAction('SECTION_TREE_LIST_ERROR');\r\nexport const sectionTreeListLoaded = createAction('SECTION_TREE_LIST_LOADED');\r\nexport const setCreateSectionAction = createAction('SET_CREATE_SECTION_ACTION');\r\nexport const addNewSectionAction = createAction('ADD_NEW_SECTION_ACTION');\r\nexport const removeNewSectionAction = createAction('REMOVE_NEW_SECTION_ACTION');\r\nexport const clearSectionTreeListAction = createAction(\r\n 'CLEAR_SECTION_TREE_LIST_ACTION',\r\n);\r\nexport const setNewSectionIdAction = createAction('SET_NEW_SECTION_ID_ACTION');\r\n\r\nexport const fetchSectionTreeAction =\r\n ({ revisionId, statementId }) =>\r\n async (dispatch) => {\r\n try {\r\n const response = await getRevisionsSectionsRequest({\r\n statementId,\r\n revisionId,\r\n onlyBookmarkSection: true,\r\n asTreeList: true,\r\n });\r\n dispatch(sectionTreeListLoaded(response));\r\n } catch (error) {\r\n dispatch(sectionTreeListError(error));\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n postMaintenanceBannerRequest,\r\n getAllMaintenancePageBannerData,\r\n} from '../../api/admin-module-api';\r\nimport {\r\n getContainerListWhereUserIsCountryManager,\r\n getContainerListWhereUserIsCountryManagerWithContainerCodes,\r\n} from 'api/project-list-api';\r\nimport { ADMIN_MODULE_TABS } from 'constants/feature/admin-module-constants';\r\n\r\nexport const setCurrentAdminModuleTab = createAction(\r\n 'SET_CURRENT_ADMIN_MODULE_TAB',\r\n);\r\n\r\nexport const setMaintenacePageLoading = createAction(\r\n 'SET_MAINTENANCE_PAGE_LOADING_ACTION',\r\n);\r\n\r\nexport const setMaintenacePageLoaded = createAction(\r\n 'SET_MAINTENANCE_PAGE_LOADED_ACTION',\r\n);\r\n\r\nexport const setMaintenancePageError = createAction(\r\n 'SET_MAINTENANCE_PAGE_ERROR_ACTION',\r\n);\r\n\r\nexport const countryManagercontainerListLoading = createAction(\r\n 'COUNTRY_MANAGER_CONTAINER_LIST_LOADING_ACTION',\r\n);\r\n\r\nexport const countryManagercontainerListLoaded = createAction(\r\n 'COUNTRY_MANAGER_CONTAINER_LIST_LOADED_ACTION',\r\n);\r\n\r\nexport const countryManagercontainerListError = createAction(\r\n 'COUNTRY_MANAGER_CONTAINER_LIST_ERROR_ACTION',\r\n);\r\n\r\nexport const monitoringListLoading = createAction(\r\n 'MONITORING_COUNTRY_LIST_LOADING_ACTION',\r\n);\r\n\r\nexport const monitoringListLoaded = createAction(\r\n 'MONITORING_COUNTRY_LIST_LOADED_ACTION',\r\n);\r\n\r\nexport const monitoringListError = createAction(\r\n 'MONITORING_COUNTRY_LIST_ERROR_ACTION',\r\n);\r\n\r\nexport const clearMonitoringListLoaded = createAction(\r\n 'CLEAR_MONITORING_COUNTRY_LIST_DATA_ACTION',\r\n);\r\n\r\nexport const setCountryOption = createAction(\r\n 'SET_COUNTRY_LIST_SELECTED_OPTIONS',\r\n);\r\nexport const clearAdminPageDataAction = createAction(\r\n 'CLEAR_ADMIN_PAGE_DATA_ACTION',\r\n);\r\n\r\nexport const requestCurrentAdminModuleTab =\r\n ({ tab }) =>\r\n async (dispatch, getState) => {\r\n if (!isNullOrUndefined(tab)) {\r\n await dispatch(setCurrentAdminModuleTab(tab));\r\n if (tab === ADMIN_MODULE_TABS.MAINTENANCEBANNER) {\r\n await dispatch(getAllMaintenanceBannerData());\r\n }\r\n }\r\n };\r\n\r\nexport const getAllMaintenanceBannerData = () => async (dispatch, getState) => {\r\n dispatch(setMaintenacePageLoading());\r\n try {\r\n let bannerList = await getAllMaintenancePageBannerData();\r\n dispatch(setMaintenacePageLoaded(bannerList));\r\n } catch (e) {\r\n //Loaded with error;\r\n dispatch(setMaintenancePageError(e));\r\n }\r\n};\r\nexport const maintenanceBannerSaveAction =\r\n (isActive, id, text, startDate, endDate) => async (dispatch, getState) => {\r\n dispatch(setMaintenacePageLoading());\r\n await postMaintenanceBannerRequest(isActive, id, text, startDate, endDate);\r\n await dispatch(getAllMaintenanceBannerData());\r\n };\r\n\r\n//THis country list we are using on admin module's Manage Users page\r\nexport const getContainerListWhereUserIsCountryManagerAction =\r\n () => async (dispatch, getState) => {\r\n dispatch(countryManagercontainerListLoading());\r\n try {\r\n const data = await getContainerListWhereUserIsCountryManager();\r\n await dispatch(countryManagercontainerListLoaded(data));\r\n } catch (error) {\r\n dispatch(countryManagercontainerListError(error));\r\n }\r\n };\r\n\r\nexport const getContainerMonitoringDropDownList =\r\n (countryCodes) => async (dispatch, getState) => {\r\n dispatch(monitoringListLoading());\r\n try {\r\n const monitoringList =\r\n await getContainerListWhereUserIsCountryManagerWithContainerCodes(\r\n countryCodes,\r\n );\r\n await dispatch(monitoringListLoaded(monitoringList));\r\n } catch (error) {\r\n dispatch(monitoringListError(error));\r\n }\r\n };\r\n\r\nexport const setMonitoringDropDownSelectedOptions =\r\n (option) => async (dispatch, getState) => {\r\n dispatch(setCountryOption(option));\r\n };\r\n","import { getStatementSummaryElementsRequest } from 'api/statement-summary-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const statementSummaryElementsLoading = createAction(\r\n 'STATEMENT_SUMMARY_ELEMENTS_LOADING',\r\n);\r\nexport const statementSummaryElementsLoaded = createAction(\r\n 'STATEMENT_SUMMARY_ELEMENTS_LOADED',\r\n);\r\nexport const statementSummaryElementsError = createAction(\r\n 'STATEMENT_SUMMARY_ELEMENTS_ERROR',\r\n);\r\n\r\nexport const updateElementSummaryFromSocketPayloadAction = createAction(\r\n 'UPDATE_ELEMENT_SUMMARY_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const fetchStatementSummaryElements =\r\n ({ revisionId, withoutLoading = false }) =>\r\n async (dispatch) => {\r\n !withoutLoading && (await dispatch(statementSummaryElementsLoading()));\r\n getStatementSummaryElementsRequest({ revisionId })\r\n .then((response) => {\r\n dispatch(statementSummaryElementsLoaded({ response }));\r\n })\r\n .catch((error) => {\r\n dispatch(statementSummaryElementsError({ error }));\r\n });\r\n };\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Symbols\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"Message-/-Inline-/-Information\",\n transform: \"translate(-16.000000, -16.000000)\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Illustrative-/-Information\",\n transform: \"translate(16.000000, 16.000000)\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 24,\n height: 24\n}), React.createElement(\"g\", {\n id: \"information\",\n strokeWidth: 1,\n fillRule: \"evenodd\",\n fill: \"#00A3E0\",\n className: \"icon-path\"\n}, React.createElement(\"path\", {\n d: \"M15.0156522,19.4086957 L9.06335404,19.4086957 C8.78906832,19.4086957 8.56695652,19.1865839 8.56695652,18.9122981 L8.56695652,16.9281988 C8.56695652,16.653913 8.78906832,16.4318012 9.06335404,16.4318012 L10.5510559,16.4318012 L10.5510559,12.4636025 L9.55826087,12.4636025 C9.28546584,12.4636025 9.06335404,12.2414907 9.06335404,11.967205 L9.06335404,9.98310559 C9.06335404,9.70881988 9.28546584,9.48670807 9.55826087,9.48670807 L13.0315528,9.48670807 C13.3058385,9.48670807 13.5279503,9.70881988 13.5279503,9.98310559 L13.5279503,16.4318012 L15.0156522,16.4318012 C15.2899379,16.4318012 15.5120497,16.653913 15.5120497,16.9281988 L15.5120497,18.9122981 C15.5120497,19.1865839 15.2899379,19.4086957 15.0156522,19.4086957 Z M9.55826087,18.4159006 L14.5192547,18.4159006 L14.5192547,17.4231056 L13.0315528,17.4231056 C12.7572671,17.4231056 12.5351553,17.2024845 12.5351553,16.9281988 L12.5351553,10.4780124 L10.0546584,10.4780124 L10.0546584,11.4708075 L11.0474534,11.4708075 C11.3217391,11.4708075 11.5438509,11.6929193 11.5438509,11.967205 L11.5438509,16.9281988 C11.5438509,17.2024845 11.3217391,17.4231056 11.0474534,17.4231056 L9.55826087,17.4231056 L9.55826087,18.4159006 Z M12.0387578,8.49391304 C10.9445963,8.49391304 10.0546584,7.60397516 10.0546584,6.50981366 C10.0546584,5.41565217 10.9445963,4.52571429 12.0387578,4.52571429 C13.1329193,4.52571429 14.0243478,5.41565217 14.0243478,6.50981366 C14.0243478,7.60397516 13.1329193,8.49391304 12.0387578,8.49391304 Z M12.0387578,0.0611180124 C5.46335404,0.0611180124 0.132670807,5.39180124 0.132670807,11.967205 C0.132670807,18.5426087 5.46335404,23.8732919 12.0387578,23.8732919 C18.6156522,23.8732919 23.9448447,18.5426087 23.9448447,11.967205 C23.9448447,5.39180124 18.6156522,0.0611180124 12.0387578,0.0611180124 Z M12.0387578,1.05242236 C18.056646,1.05242236 22.9535404,5.94931677 22.9535404,11.967205 C22.9535404,17.9850932 18.056646,22.8804969 12.0387578,22.8804969 C6.02086957,22.8804969 1.12546584,17.9850932 1.12546584,11.967205 C1.12546584,5.94931677 6.02086957,1.05242236 12.0387578,1.05242236 Z M12.0387578,5.51701863 C11.491677,5.51701863 11.0474534,5.96273292 11.0474534,6.50981366 C11.0474534,7.05689441 11.491677,7.5026087 12.0387578,7.5026087 C12.5858385,7.5026087 13.0315528,7.05689441 13.0315528,6.50981366 C13.0315528,5.96273292 12.5858385,5.51701863 12.0387578,5.51701863 Z\",\n id: \"icon_523\"\n})))));\n\nvar SvgInfo = function SvgInfo(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"24px\",\n height: \"24px\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgInfo, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/info.9b3405d5.svg\";\nexport { ForwardRef as ReactComponent };","import { createAction } from 'redux-actions';\r\nimport {\r\n closeSocketClientRequest,\r\n removeUserFromRoom,\r\n} from 'api/statement-socket-client-api';\r\nimport { isSignalRForSocketConnectionEnabled } from 'api/api-authentication';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\n\r\nexport const setStatementSocketClient = createAction(\r\n 'SET_STATEMENT_SOCKET_CLIENT',\r\n);\r\n\r\nexport const initStatementSocketClient = createAction(\r\n 'INIT_STATEMENT_SOCKET_CLIENT',\r\n);\r\n\r\nexport const initStatementSignalrSocketClient = createAction(\r\n 'INIT_STATEMENT_SIGNALR_SOCKET_CLIENT',\r\n);\r\n\r\nexport const clearSocketClientInStore = createAction(\r\n 'CLEAR_STATEMENT_SOCKET_CLIENT',\r\n);\r\n\r\nexport const stopSocketConnection = createAction('STOP_SOCKET_CONNECTION');\r\n\r\nexport const setSocketDisconnectAction = createAction(\r\n 'SET_SOCKET_DISCONNECT_ACTION',\r\n);\r\n\r\nexport const initStatementSocketClientAction =\r\n ({ revisionId, projectId, currentUserId }) =>\r\n async (dispatch, getState) => {\r\n const pathname = window.location.pathname;\r\n const { data: { currentUser } = {} } = getState();\r\n const { data: { projectToGeoMap } = {} } = currentUser || {};\r\n const geoCode = projectId\r\n ? (projectToGeoMap.get(`${projectId}`) || {}).geoCode\r\n : null;\r\n /**enabling the api of signalr socket connection based on the isSignalRForSocketConnectionEnabled flag coming from env.js\r\n * and dispatch action according to signalr or socketio Socket connection\r\n */\r\n if (!pathname.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE)) {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n await dispatch(\r\n initStatementSignalrSocketClient({ revisionId, geoCode }),\r\n );\r\n } else {\r\n await dispatch(\r\n initStatementSocketClient({\r\n revisionId,\r\n projectId,\r\n currentUserId,\r\n geoCode,\r\n }),\r\n );\r\n }\r\n }\r\n };\r\n\r\nexport const closeSocketClient =\r\n ({ revisionId, projectUserIds, projectId }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n await removeUserFromRoom({\r\n revisionId,\r\n projectUserIds: Object.keys(projectUserIds),\r\n projectId,\r\n });\r\n if (isSignalRForSocketConnectionEnabled) {\r\n const connectionId = localStorage.getItem('connectionId');\r\n dispatch(stopSocketConnection());\r\n await closeSocketClientRequest({\r\n revisionId,\r\n connectionId,\r\n });\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n dispatch(stopSocketConnection());\r\n dispatch(clearSocketClientInStore());\r\n };\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { isProjectHasReservedClientName } from 'utils/project-list-utils';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\n\r\nexport default class ProjectApi extends ApiModel({\r\n data: {\r\n active: null,\r\n adminGroupAddDate: null,\r\n cik: null,\r\n deleteDate: null,\r\n engagementEntity: null,\r\n hasAdminGroup: false,\r\n hasCoeGroup: false,\r\n id: null,\r\n isNewClient: true,\r\n legalHold: false,\r\n name: '',\r\n symbol: 'a',\r\n sic: null,\r\n type: null,\r\n userEntities: [],\r\n createdDate: null,\r\n omniaUrl: null,\r\n omniaEngagementEntity: null,\r\n linkStatus: null,\r\n auditClient: null,\r\n isAuditClient: false,\r\n geoCode: null,\r\n containerCode: null,\r\n countryCode: null,\r\n cbFeedbackEnabled: false,\r\n chatbotEnabled: false,\r\n },\r\n status: null,\r\n}) {\r\n get engagementEntity() {\r\n return this.data.engagementEntity;\r\n }\r\n get omniaEngagementEntity() {\r\n return this.data.omniaEngagementEntity;\r\n }\r\n\r\n get cbFeedbackEnabled() {\r\n return this.data.cbFeedbackEnabled;\r\n }\r\n\r\n get chatbotEnabled() {\r\n return this.data.chatbotEnabled;\r\n }\r\n\r\n get name() {\r\n return this.data.name;\r\n }\r\n get legalHold() {\r\n return this.data.legalHold;\r\n }\r\n get hasAdminGroup() {\r\n return this.data.hasAdminGroup;\r\n }\r\n get hasCoeGroup() {\r\n return this.data.hasCoeGroup;\r\n }\r\n get userEntities() {\r\n if (this.data && this.data.userEntities) {\r\n return this.data.userEntities;\r\n }\r\n return [];\r\n }\r\n\r\n get containerCode() {\r\n return this.data.containerCode;\r\n }\r\n\r\n get countryCode() {\r\n return this.data.countryCode;\r\n }\r\n\r\n getUserIds() {\r\n return this.userEntities.map((user) => user.id).join(',');\r\n }\r\n get id() {\r\n return this.data.id;\r\n }\r\n get omniaUrl() {\r\n return this.data.omniaUrl;\r\n }\r\n get auditClient() {\r\n return this.data.auditClient;\r\n }\r\n get geoCode() {\r\n return this.data.geoCode;\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.data.id);\r\n }\r\n\r\n getProjectData() {\r\n if (this.data) {\r\n return this.data;\r\n }\r\n }\r\n\r\n processResponse(response) {\r\n // Processed from existing model\r\n const _fromApiModel = response instanceof ProjectApi;\r\n if (_fromApiModel) {\r\n return response;\r\n }\r\n return {\r\n data: {\r\n ...response.data,\r\n id: `${parseInt(response.data.id)}-${response.data.geoCode}`,\r\n legalHold: response.data.legalHold === 1 ? true : false,\r\n isAuditClient: isProjectHasReservedClientName(response.data)\r\n ? true\r\n : false,\r\n },\r\n status: response.status ? response.status : 'not from api response',\r\n };\r\n }\r\n\r\n isDeleted() {\r\n return !this.data.active && this.data.deleteDate;\r\n }\r\n\r\n getCreatedDate() {\r\n return moment\r\n .utc(this.data.createdDate)\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR);\r\n }\r\n\r\n containsUser(compareUser) {\r\n return this.userEntities.find((user) => user.id === compareUser.id);\r\n }\r\n\r\n updateLegalHoldForSelectedProject({ projectDetails }) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n ...projectDetails,\r\n },\r\n });\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Iconography\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG---TieOut-Iconography\",\n transform: \"translate(-836.000000, -1837.000000)\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Cross-/-Special-<-24px\",\n transform: \"translate(831.000000, 1832.000000)\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Cross-Copy-5\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 22,\n height: 22\n}), React.createElement(\"g\", {\n id: \"close\",\n transform: \"translate(5.500000, 5.500000)\",\n fill: \"#00a3e0\",\n className: \"icon-path-outer\"\n}, React.createElement(\"path\", {\n className: \"icon-path-inner\",\n d: \"M6.10397516,5.46037267 L10.7840994,0.778881988 C10.9617391,0.601242236 10.9617391,0.314285714 10.7840994,0.136645963 C10.6064596,-0.0409937888 10.3195031,-0.0409937888 10.1418634,0.136645963 L5.46037267,4.81677019 L0.780248447,0.136645963 C0.602608696,-0.0409937888 0.314285714,-0.0409937888 0.136645963,0.136645963 C-0.0409937888,0.314285714 -0.0409937888,0.601242236 0.136645963,0.778881988 L4.81677019,5.46037267 L0.136645963,10.1404969 C-0.0409937888,10.3181366 -0.0409937888,10.6064596 0.136645963,10.7840994 C0.225465839,10.8729193 0.341614907,10.9167826 0.457900621,10.9167826 C0.575279503,10.9167826 0.691428571,10.8729193 0.780248447,10.7840994 L5.46037267,6.1026087 L10.1418634,10.7840994 C10.2308199,10.8729193 10.3468323,10.9167826 10.4629814,10.9167826 C10.5791304,10.9167826 10.6954161,10.8729193 10.7840994,10.7840994 C10.9617391,10.6064596 10.9617391,10.3181366 10.7840994,10.1404969 L6.10397516,5.46037267 Z\"\n}))))));\n\nvar SvgCross = function SvgCross(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"12px\",\n height: \"12px\",\n viewBox: \"0 0 12 12\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCross, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/cross.88ada7f1.svg\";\nexport { ForwardRef as ReactComponent };","import { createAction } from 'redux-actions';\r\n\r\nexport const setOcrCurrentViewPageNumber = createAction(\r\n 'SET_OCR_CURRENT_VIEW_PAGE_NUMBER',\r\n);\r\n\r\nexport const setLeftOcrCurrentViewPageNumber = createAction(\r\n 'SET_LEFT_OCR_CURRENT_VIEW_PAGE_NUMBER',\r\n);\r\n\r\nexport const setOcrCurrentViewPageNumberDispatch =\r\n (currentPage, isLeftSideView = false) =>\r\n async (dispatch, getState) => {\r\n isLeftSideView\r\n ? dispatch(setLeftOcrCurrentViewPageNumber(parseInt(currentPage)))\r\n : dispatch(setOcrCurrentViewPageNumber(parseInt(currentPage)));\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n getComfortAnnotationsForRevisionRequest,\r\n getElementsByComfortAnnotation,\r\n deleteComfortLetterRequest,\r\n} from 'api/comfort-letter-api';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\nimport { updateCacheWithMostRecentElementChanges } from 'store/actions/element-changes-since-tracker-actions';\r\n\r\nexport const comfortAnnotationListLoading = createAction(\r\n 'COMFORT_ANNOTATION_LIST_LOADING',\r\n);\r\nexport const comfortAnnotationListLoaded = createAction(\r\n 'COMFORT_ANNOTATION_LIST_LOADED',\r\n);\r\nexport const comfortAnnotationListError = createAction(\r\n 'COMFORT_ANNOTATION_LIST_ERROR',\r\n);\r\nexport const fetchElementsFromComfortAnnotationAction = createAction(\r\n 'FETCH_ELEMENTS_FROM_COMFORT_ANNOTATION',\r\n);\r\n\r\nexport const unlinkElementInComfortLetterElementsMapAndUpdateCountAction = createAction(\r\n 'UNLINK_ELEMENT_IN_COMFORT_LETTER_ELEMENTS_MAP_AND_UPDATE_COUNTACTION',\r\n);\r\n\r\nexport const removeElementFromComfortLetterElementsWithSocketPayloadAction = createAction(\r\n 'REMOVE_ELEMENT_FROM_COMFORT_LETTER_ELEMENTS_WITH_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const linkElementInComfortLetterElementsMapAndUpdateCountAction = createAction(\r\n 'LINK_ELEMENT_IN_COMFORT_LETTER_ELEMENTS_MAP_AND_UPDATE_COUNTACTION',\r\n);\r\n\r\nexport const updateComfortLetterElementsMapFromArrayAction = createAction(\r\n 'UPDATE_COMFORT_LETTER_ELEMENTS_MAP_FROM_ARRAY_ACTION',\r\n);\r\n\r\nexport const fetchComfortAnnotationListForRevision = ({ revisionId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (\r\n getState().ui.statementPage.panels.left !== LEFT_PANELS.COMFORT_ANNOTATION\r\n )\r\n return;\r\n dispatch(comfortAnnotationListLoading());\r\n await dispatch(\r\n fetchComfortAnnotationListForRevisionWithoutLoading({ revisionId }),\r\n );\r\n};\r\n\r\nexport const fetchComfortAnnotationListForRevisionWithoutLoading = ({\r\n revisionId,\r\n}) => async (dispatch, getState) => {\r\n if (\r\n getState().ui.statementPage.panels.left !== LEFT_PANELS.COMFORT_ANNOTATION\r\n )\r\n return;\r\n try {\r\n const response = await getComfortAnnotationsForRevisionRequest({\r\n revisionId,\r\n });\r\n\r\n dispatch(comfortAnnotationListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(comfortAnnotationListError(error));\r\n }\r\n};\r\n\r\nexport const fetchElementsFromComfortAnnotation = ({\r\n revisionId,\r\n comfortLetterId,\r\n}) => async (dispatch, getState) => {\r\n if (\r\n getState().ui.statementPage.panels.left !== LEFT_PANELS.COMFORT_ANNOTATION\r\n )\r\n return;\r\n try {\r\n const response = await getElementsByComfortAnnotation({\r\n revisionId,\r\n comfortLetterId,\r\n });\r\n\r\n dispatch(\r\n fetchElementsFromComfortAnnotationAction({\r\n elementsMap: response.data,\r\n comfortLetterId,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(comfortAnnotationListError(error));\r\n }\r\n};\r\n\r\nexport const deleteComfortAnnotation = ({ comfortAnnotation }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n const { id: revisionId } = getState().data.revision;\r\n try {\r\n await deleteComfortLetterRequest({ comfortAnnotation, revisionId });\r\n dispatch(\r\n fetchComfortAnnotationListForRevisionWithoutLoading({ revisionId }),\r\n );\r\n dispatch(updateCacheWithMostRecentElementChanges());\r\n } catch (error) {\r\n dispatch(comfortAnnotationListError(error));\r\n }\r\n};\r\n\r\nexport const updateComfortLettersElementsMapArray = ({\r\n elementsArray,\r\n}) => async (dispatch, getState) => {\r\n if (\r\n getState().ui.statementPage.panels.left !== LEFT_PANELS.COMFORT_ANNOTATION\r\n )\r\n return;\r\n if (elementsArray) {\r\n dispatch(updateComfortLetterElementsMapFromArrayAction(elementsArray));\r\n }\r\n};\r\n","import {\r\n withDefaultContextAsSelectedProject,\r\n // withDefaultContextAsSelectedGeo,\r\n withDefaultContextAsHomeGeo,\r\n withDefaultContextAsProject,\r\n} from './api-default-context';\r\nimport {\r\n // collateCountryListDetails,\r\n collateProjectDetails,\r\n getGeosWhereUserHasProject,\r\n updateProjectListWithGeoSuffixedProjectId,\r\n} from 'utils/project-utils';\r\nimport { getAPI } from './api-client';\r\n\r\nexport const getProjectListRequest = () => {\r\n const uniqueGeos = getGeosWhereUserHasProject();\r\n if (uniqueGeos.length) {\r\n return Promise.all(\r\n uniqueGeos.map((geoKey) =>\r\n getAPI(geoKey)\r\n .get('/tieout/clients')\r\n .catch((e) => {\r\n console.log(\r\n 'failed to fetch project list from GEO:' + geoKey + ',error:' + e,\r\n );\r\n return null;\r\n }),\r\n ),\r\n ).then((responses) => {\r\n let successfullRequestsResponse = [];\r\n Array.isArray(responses) &&\r\n responses.forEach(\r\n (apiResponse) =>\r\n apiResponse && successfullRequestsResponse.push(apiResponse),\r\n );\r\n return collateProjectDetails(successfullRequestsResponse);\r\n });\r\n }\r\n return Promise.resolve({ data: { result: [] } });\r\n};\r\n\r\n// By default this will fetch you projects in selected project geo.\r\n// But you can override it by providing contextKey and contextValue.\r\nexport const getProjectsInParticularGeo = () =>\r\n withDefaultContextAsSelectedProject()\r\n .get('/tieout/clients')\r\n .catch((e) => {\r\n console.log('failed to fetch project list, error:' + e);\r\n return { data: { result: [] } };\r\n })\r\n .then((response) => {\r\n response.data.result = updateProjectListWithGeoSuffixedProjectId(\r\n response.data.result,\r\n 'id',\r\n 'geoCode',\r\n );\r\n return response;\r\n });\r\n\r\nexport const getSelectedProjectUsersRequest = (idList) =>\r\n withDefaultContextAsSelectedProject()\r\n .get('/tieout/users', {\r\n params: {\r\n idList: idList,\r\n },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\n// By default this will fetch you containers list in home geo.\r\n// But you can override it by providing contextValue as specific geoKey.\r\nexport const getContainerListUserHasAccessTo = () =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/list/containers')\r\n .then((response) => {\r\n return response;\r\n })\r\n .catch((e) => {\r\n console.log('Failed to fetch container list user has access to', e);\r\n return { data: [] };\r\n });\r\n\r\nexport const getPinnedDetailsRequest = (currentUserId) =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/client/pin/all', {\r\n params: {\r\n userId: `${currentUserId}`,\r\n },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const pinRequest = (projectId, pinData, contextKey) =>\r\n withDefaultContextAsProject({ contextKey }, projectId)\r\n .post(`/tieout/client/${parseInt(projectId)}/pin`, {\r\n ...pinData,\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const unPinRequest = (projectId, unPinData, contextKey) =>\r\n withDefaultContextAsProject({ contextKey }, projectId)\r\n .post(`/tieout/client/${parseInt(projectId)}/unpin`, {\r\n ...unPinData,\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\n// export const getAllRegionContainerDetails = () => {\r\n// return Promise.all(\r\n// Object.keys(window.TIEOUT.ENV.GEOS).map((geoKey) =>\r\n// getContainerListUserHasAccessTo({ geoKey }),\r\n// ),\r\n// ).then((responses) => {\r\n// let successfullRequestsResponse = [];\r\n// Array.isArray(responses) &&\r\n// responses.forEach(\r\n// (apiResponse) =>\r\n// apiResponse.data.length &&\r\n// successfullRequestsResponse.push(apiResponse),\r\n// );\r\n// return collateCountryListDetails(successfullRequestsResponse);\r\n// });\r\n// };\r\n\r\nexport const getContainerListWhereUserIsCountryManager = () =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/country-manager/usersAndContainers')\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getContainerListWhereUserIsCountryManagerWithContainerCodes = (\r\n containerCodes,\r\n) =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/country-manager/usageReport', {\r\n params: {\r\n containerCodes: containerCodes,\r\n },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getAllContainerDetails = () =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/containers/all')\r\n .then((response) => {\r\n return response;\r\n })\r\n .catch((e) => {\r\n console.log('failed to fetch all containers list', e);\r\n return { data: [] };\r\n });\r\n","import { createAction } from 'redux-actions';\r\nimport { documentChangesSinceRequest } from 'api/element-api';\r\nimport { updateMultipleElementsInCacheAction } from 'store/actions/element-cache-actions';\r\nimport { fetchStatementSummaryElements } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n updateElementSectionName,\r\n updateElementDetailsFromLeftPanel,\r\n} from 'store/actions/element-panel-actions';\r\nexport const setElementChangesSinceAction = createAction(\r\n 'SET_ELEMENT_CHANGES_SINCE',\r\n);\r\n\r\n/** Thunk to request changes to elements and document content which then updates the element cache\r\n * Should be called after an element meta data update request that would cause other elements to require\r\n * content panel updates\r\n */\r\nexport const updateCacheWithMostRecentElementChanges =\r\n (fetchElementsSummary = true, updateTMorWPpanel = true) =>\r\n async (dispatch, getState) => {\r\n const stateData = getState().data;\r\n const { elementChangesSinceTracker } = stateData.statementContent;\r\n const { revision } = stateData;\r\n try {\r\n const response = await documentChangesSinceRequest({\r\n revisionId: revision.id,\r\n sinceTimestamp: elementChangesSinceTracker.since,\r\n });\r\n // ensure cache tracker's \"since\" property is synced with the exact moment the BE retrieved the changes\r\n dispatch(setElementChangesSinceAction(parseInt(response.data.asof)));\r\n\r\n const _haveElementChangesToUpdate =\r\n !isNullOrUndefined(response.data) &&\r\n !isNullOrUndefined(response.data.result) &&\r\n Array.isArray(response.data.result.elementEntityList) &&\r\n response.data.result.elementEntityList.length > 0;\r\n const _haveSectionChangesToUpdate =\r\n !isNullOrUndefined(response.data) &&\r\n !isNullOrUndefined(response.data.result) &&\r\n Array.isArray(response.data.result.sectionEntityList) &&\r\n response.data.result.sectionEntityList.length > 0;\r\n if (_haveElementChangesToUpdate) {\r\n dispatch(\r\n updateMultipleElementsInCacheAction({\r\n elements: response.data.result.elementEntityList,\r\n }),\r\n );\r\n const updatedElementsArray = response.data.result.elementEntityList;\r\n //if one of tickmarks or workpapers panels is open, is going to update element details from elements on the elements list\r\n // TODO: need to investigate if this is even needed\r\n if (updateTMorWPpanel) {\r\n await dispatch(\r\n updateElementDetailsFromLeftPanel({\r\n elementsArray: updatedElementsArray,\r\n }),\r\n );\r\n }\r\n }\r\n if (_haveSectionChangesToUpdate) {\r\n dispatch(\r\n updateElementSectionName(\r\n response.data.result.sectionEntityList[0].name,\r\n ),\r\n );\r\n }\r\n } catch (error) {\r\n console.error('Error while requesting element changes since');\r\n }\r\n\r\n // Fire action to update elements in statement summary to capture changes by the system\r\n // TODO: find a better way to fetch flag counts in statement summary\r\n // TODO: investigate if we even need fetchStatementSummaryElements in this action\r\n if (fetchElementsSummary) {\r\n dispatch(\r\n fetchStatementSummaryElements({\r\n revisionId: revision.id,\r\n withoutLoading: true,\r\n }),\r\n );\r\n }\r\n };\r\n\r\n/** Thunk to request changes to elements and document content which then updates the element cache\r\n * Should be called after an element meta data update request that would cause other elements to require\r\n * content panel updates\r\n */\r\nexport const updateCacheWithMostRecentSideBySideElementChanges =\r\n () => async (dispatch, getState) => {\r\n const stateData = getState().data;\r\n const { elementChangesSinceTracker } = stateData.statementContent;\r\n const { revision } = stateData;\r\n try {\r\n const response = await documentChangesSinceRequest({\r\n revisionId: revision.id,\r\n sinceTimestamp: elementChangesSinceTracker.since,\r\n });\r\n // ensure cache tracker's \"since\" property is synced with the exact moment the BE retrieved the changes\r\n dispatch(setElementChangesSinceAction(parseInt(response.data.asof)));\r\n\r\n const _haveElementChangesToUpdate =\r\n !isNullOrUndefined(response.data) &&\r\n !isNullOrUndefined(response.data.result) &&\r\n Array.isArray(response.data.result.elementEntityList) &&\r\n response.data.result.elementEntityList.length > 0;\r\n\r\n if (_haveElementChangesToUpdate) {\r\n dispatch(\r\n updateMultipleElementsInCacheAction({\r\n elements: response.data.result.elementEntityList,\r\n }),\r\n );\r\n }\r\n } catch (error) {\r\n console.error('Error while requesting element changes since');\r\n }\r\n };\r\n","export const SPACEBAR_KEY_CODE = 32;\r\nexport const TAB_KEY_CODE = 9;\r\nexport const ARROW_KEY_DOWN_CODE = 40;\r\nexport const ARROW_KEY_UP_CODE = 38;\r\nexport const ENTER_KEY_CODE = 13;\r\nexport const ESC_KEY_CODE = 27;\r\nexport const BACKSPACE_KEY_CODE = 8;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n className: \"icon-path plus\",\n clipRule: \"evenodd\",\n d: \"M17.1667 8.41667H9.58333V0.833333C9.58333 0.483333 9.35 0.25 9 0.25C8.65 0.25 8.41667 0.483333 8.41667 0.833333V8.41667H0.833333C0.483333 8.41667 0.25 8.65 0.25 9C0.25 9.35 0.483333 9.58333 0.833333 9.58333H8.41667V17.1667C8.41667 17.5167 8.65 17.75 9 17.75C9.35 17.75 9.58333 17.5167 9.58333 17.1667V9.58333H17.1667C17.5167 9.58333 17.75 9.35 17.75 9C17.75 8.65 17.5167 8.41667 17.1667 8.41667Z\",\n fill: \"black\"\n});\n\nvar SvgPlus = function SvgPlus(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 18,\n viewBox: \"0 0 18 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgPlus, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/plus.6b2236b1.svg\";\nexport { ForwardRef as ReactComponent };","import { removeCommasFromNumber } from 'utils/number-formatter-util';\r\n\r\nexport const shouldDisplayValueBeFlagged = (\r\n elementDetails,\r\n formulaInProgress,\r\n) => {\r\n // if this case is triggered, the formula won't be considered to be flagged but we stil\r\n // want to have the text in the orange color\r\n /* this case is not going to be applied if the formula original value\r\n and the formula computedResult are still the same number after applying the \"/\" operator */\r\n if (\r\n formulaInProgress.shouldValueBeComparedToRoundedValue(elementDetails) &&\r\n !formulaInProgress.isFormulaFlagged(elementDetails) &&\r\n !(\r\n formulaInProgress.computedResult ===\r\n parseFloat(removeCommasFromNumber(formulaInProgress.display))\r\n )\r\n ) {\r\n return true;\r\n }\r\n\r\n return (\r\n formulaInProgress.isFormulaFlagged(elementDetails) &&\r\n !elementDetails.isSystemOverrideFlagged()\r\n );\r\n};\r\nexport const round = (value, exp) => {\r\n if (typeof exp === 'undefined' || +exp === 0) return Math.round(value);\r\n\r\n value = +value;\r\n exp = +exp;\r\n\r\n if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) return NaN;\r\n\r\n // Shift\r\n value = value.toString().split('e');\r\n value = Math.round(+(value[0] + 'e' + (value[1] ? +value[1] + exp : exp)));\r\n\r\n // Shift back\r\n value = value.toString().split('e');\r\n return +(value[0] + 'e' + (value[1] ? +value[1] - exp : -exp));\r\n};\r\nexport const countDecimals = (number) => {\r\n let numberToString = Math.abs(number).toString();\r\n let index = numberToString.indexOf('.');\r\n if (index !== -1) {\r\n return numberToString.length - index - 1;\r\n }\r\n return 0;\r\n};\r\n\r\nexport const countDigits = (number) => {\r\n let numberToString = Math.abs(number).toString();\r\n let index = numberToString.indexOf('.');\r\n if (index !== -1) {\r\n return index;\r\n }\r\n return numberToString.length;\r\n};\r\n\r\n// generic function which is used to replace the custom special characters separators for thousands and decimal places for each amount element\r\nexport const numberFormatConverter = (\r\n number,\r\n thousandSep = ',',\r\n decimalSep = '.',\r\n) => {\r\n const numStr = number.toString();\r\n const [intPart, decimalPart] = numStr.split('.');\r\n\r\n const formattedIntPart = intPart.replace(\r\n /\\B(?=(\\d{3})+(?!\\d))/g,\r\n thousandSep,\r\n );\r\n const formattedNumber = decimalPart\r\n ? `${formattedIntPart}${decimalSep}${decimalPart}`\r\n : formattedIntPart;\r\n\r\n return formattedNumber;\r\n};\r\n\r\n// gets the formatted amount value based on the numberformat selected during the statement upload for this current statement\r\nexport const getElementResultByNumberFormat = (value, numberFormatId) => {\r\n /** null or undefined check */\r\n if (!value) return value;\r\n /** this checks if value is not null or undefined and type as a string and contains numeric values to convert to a number\r\n * or else return number values as it is\r\n */\r\n const unformattedNumber =\r\n value && typeof value === 'string' && /[0-9]/.test(value)\r\n ? parseFloat(value)\r\n : value;\r\n\r\n /** convert the number to respective number format of current statment during statement upload time */\r\n switch (numberFormatId) {\r\n case 1:\r\n //format: \"1,234.56 (Thousand separator is 'comma' and Decimal separator is 'dot')\",\r\n return numberFormatConverter(unformattedNumber, ',', '.');\r\n case 2:\r\n //format: \"1.234,56 (Thousand separator is 'dot' and Decimal separator is 'comma')\",\r\n return numberFormatConverter(unformattedNumber, '.', ',');\r\n case 3:\r\n //format: \"1’234.56 (Thousand separator is 'apostrophe' and Decimal separator is 'dot')\",\r\n return numberFormatConverter(unformattedNumber, \"'\", '.');\r\n case 4:\r\n //format: \"1 234.56 (Thousand separator is 'space' and Decimal separator is 'dot')\",\r\n return numberFormatConverter(unformattedNumber, ' ', '.');\r\n case 5:\r\n //format: \"1 234,56 (Thousand separator is 'space' and Decimal separator is 'comma')\",\r\n return numberFormatConverter(unformattedNumber, ' ', ',');\r\n case 6:\r\n //format: \"1’234,56 (Thousand separator is 'apostrophe' and Decimal separator is 'Comma')\",\r\n return numberFormatConverter(unformattedNumber, \"'\", ',');\r\n default:\r\n //format: \"1,234.56 (Thousand separator is 'comma' and Decimal separator is 'dot')\",\r\n return numberFormatConverter(unformattedNumber, ',', '.');\r\n }\r\n};\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const getSectionIdListRequest = (\r\n { revisionId, statementId, isOCR = false, clientId },\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n) => {\r\n const url = isOCR\r\n ? `/tieout/clients/${clientId}/revisions/${revisionId}/ocrSectionidlist`\r\n : `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/sectionidlist`;\r\n return withDefaultContextAsSelectedProject({ contextKey, contextValue })\r\n .get(url)\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const getSectionSegmentsRequest = ({\r\n statementId,\r\n revisionId,\r\n sectionIdList,\r\n segmentType,\r\n contextKey,\r\n contextValue,\r\n}) =>\r\n withDefaultContextAsSelectedProject({ contextKey, contextValue })\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/sectionsegments`,\r\n {\r\n sectionIdList,\r\n // shouldBeJson: true // TODO: uncomment if we implement JSON parsing on backend for sections, REMOVE if we choose not to\r\n },\r\n {\r\n params: {\r\n segmentType,\r\n },\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getOCRImageSectionSegmentsRequest = ({\r\n clientId,\r\n revisionId,\r\n guid,\r\n keyVersion,\r\n contextKey,\r\n contextValue,\r\n}) =>\r\n withDefaultContextAsSelectedProject({ contextKey, contextValue })\r\n .get(\r\n `/tieout/clients/${clientId}/revisions/${revisionId}/guids/${guid}/keyVersions/${keyVersion}/contentTypes/png`,\r\n {\r\n responseType: 'arraybuffer',\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getOCRDataSectionSegmentsRequest = ({\r\n clientId,\r\n revisionId,\r\n guid,\r\n keyVersion,\r\n contextKey,\r\n contextValue,\r\n}) =>\r\n withDefaultContextAsSelectedProject({ contextKey, contextValue })\r\n .get(\r\n `/tieout/clients/${clientId}/revisions/${revisionId}/guids/${guid}/keyVersions/${keyVersion}/contentTypes/json`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getRevisionPeriodListRequest = (revisionId, statementId) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/periods`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const getClientEntityListRequest = (clientId) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(`/tieout/client/${parseInt(clientId)}/entities`)\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const searchStatementContentRequest = ({\r\n revisionId,\r\n searchTerm,\r\n isOcr,\r\n maxResults,\r\n}) => {\r\n const getUrl = isOcr\r\n ? `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/ocr/search`\r\n : `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/search`;\r\n return withDefaultContextAsSelectedProject().post(getUrl, {\r\n textToSearch: searchTerm,\r\n maxResults,\r\n });\r\n};\r\n\r\nexport const getBlacklineViewStatusRequest = ({ revisionId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/blacklineView`,\r\n {\r\n params: {\r\n revisionId: revisionId,\r\n },\r\n },\r\n );\r\n};\r\n\r\nexport const getConfigForBatchUpdateLimitRequest = () =>\r\n withDefaultContextAsSelectedProject()\r\n .get('/tieout/batch/config')\r\n .then((response) => {\r\n return response;\r\n })\r\n .catch((e) => {\r\n console.log('failed to fetch batch update limit data', e);\r\n return { data: {} };\r\n });\r\n\r\nexport const getBlacklineChangesData = ({\r\n clientId,\r\n guid,\r\n revisionId,\r\n keyVersion,\r\n}) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/clients/${clientId}/revisions/${revisionId}/guids/${guid}/keyVersions/${keyVersion}/contentTypes/json`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const getBlacklineDetails = ({\r\n statementId,\r\n revisionId,\r\n blackline_view_type,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${statementId}/revisions/${revisionId}/${blackline_view_type}/ocrBlacklineView`,\r\n )\r\n .then((response) => {\r\n return response;\r\n })\r\n .catch((e) => {\r\n console.log('failed to fetch blackline details', e);\r\n return { data: {} };\r\n });\r\n","import BaseModel from 'models/base-model';\r\nimport isEqual from 'lodash/isEqual';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n NOTE_STATUS_TYPES,\r\n NOTE_PRIORITY_TYPES,\r\n} from 'constants/feature/notes-panel-constants';\r\nimport moment from 'moment';\r\nimport DOMPurify from 'dompurify';\r\nimport { getEmailsForTaggedUsers } from 'utils/note-email-util';\r\nimport { getStore } from 'store/store';\r\n\r\nimport { toApiNoteFormat } from 'utils/note-filter-util';\r\nexport default class Note extends BaseModel({\r\n body: { note: null, replies: {}, taggedUsers: {} },\r\n closedBy: null,\r\n closedByName: null,\r\n closedDate: null,\r\n elementDisplay: null,\r\n elementId: null,\r\n insideSibling: null,\r\n length: null,\r\n noteDate: null,\r\n noteId: null,\r\n noteNumber: null,\r\n noteOrdinal: null,\r\n notePriorityType: null,\r\n noteTaker: null,\r\n noteTakerName: null,\r\n noteType: null,\r\n offset: null,\r\n pseudoElementId: null,\r\n replyFlag: null,\r\n revisionId: null,\r\n revisionNumber: null,\r\n sectionId: null,\r\n selectedText: null,\r\n selector: null,\r\n siblingIndex: null,\r\n workflowStatus: null,\r\n noteTime: null,\r\n noteTimestamp: null,\r\n formattedNoteNumber: null,\r\n ghost: 0,\r\n reply: false,\r\n}) {\r\n constructor(props) {\r\n super(props);\r\n if (!isNullOrUndefined(props)) {\r\n const { body, noteDate } = props;\r\n if (typeof props.body === 'string') {\r\n this.body = JSON.parse(body);\r\n }\r\n this.noteDate = moment(noteDate).format();\r\n this.noteTimestamp = noteDate;\r\n }\r\n }\r\n\r\n setOpen() {\r\n return this.merge({\r\n workflowStatus: NOTE_STATUS_TYPES.OPEN,\r\n });\r\n }\r\n\r\n setClosed() {\r\n return this.merge({\r\n workflowStatus: NOTE_STATUS_TYPES.CLOSED,\r\n });\r\n }\r\n\r\n isClosed() {\r\n return this.workflowStatus === NOTE_STATUS_TYPES.CLOSED;\r\n }\r\n\r\n isGhostNote() {\r\n return this.ghost === 1;\r\n }\r\n\r\n setHighPriority() {\r\n return this.merge({\r\n notePriorityType: NOTE_PRIORITY_TYPES.HIGH,\r\n });\r\n }\r\n\r\n setNormalPriority() {\r\n return this.merge({\r\n notePriorityType: NOTE_PRIORITY_TYPES.NORMAL,\r\n });\r\n }\r\n\r\n setNoteEdit({ newNote, type, revision }) {\r\n return this.merge({\r\n noteType: type,\r\n revisionNumber: revision,\r\n body: { ...this.body, note: newNote },\r\n });\r\n }\r\n\r\n setNoteReply({ data }) {\r\n const regex = /cfto_user_id=\"\\s*(.*?)\\s*\"/g;\r\n let match;\r\n let usersObject = {};\r\n const reply = toApiNoteFormat(data.reply);\r\n\r\n do {\r\n match = regex.exec(data.reply);\r\n if (match) {\r\n usersObject[match[1]] = true;\r\n }\r\n } while (match);\r\n\r\n data.taggedUsers = usersObject;\r\n data.reply = reply;\r\n const noteRepliesArray = [\r\n ...Object.values(this.body.replies),\r\n { ...data, reply: this.removeXMLTags(data.reply) },\r\n ];\r\n\r\n return this.merge({\r\n body: { ...this.body, replies: { ...noteRepliesArray } },\r\n });\r\n }\r\n\r\n setNoteReplyDelete(reply) {\r\n const noteRepliesArray = Object.values(this.body.replies).filter(\r\n (entry) => !isEqual(entry, reply),\r\n );\r\n return this.merge({\r\n body: { ...this.body, replies: { ...noteRepliesArray } },\r\n });\r\n }\r\n\r\n isHighPriority() {\r\n return this.notePriorityType === NOTE_PRIORITY_TYPES.HIGH;\r\n }\r\n\r\n toApiFormat() {\r\n return {\r\n revisionId: this.revisionId,\r\n sectionId: this.sectionId,\r\n noteType: this.noteType,\r\n notePriorityType: this.notePriorityType,\r\n revisionNumber: this.revisionNumber,\r\n selectedText: this.selectedText,\r\n offset: this.offset,\r\n length: this.length,\r\n hasElement: this.hasElement,\r\n workflowStatus: this.workflowStatus,\r\n noteId: this.noteId,\r\n };\r\n }\r\n\r\n toNoteReplyApiFormat() {\r\n return {\r\n noteId: this.noteId,\r\n body: JSON.stringify(this.body),\r\n noteType: this.noteType,\r\n notePriorityType: this.notePriorityType,\r\n revisionId: this.revisionId,\r\n sectionId: this.sectionId,\r\n workflowStatus: this.workflowStatus,\r\n reply: true,\r\n };\r\n }\r\n\r\n includeEmailListAfterNoteReply() {\r\n const { projectUsersList, revision } = getStore().getState().data;\r\n const emailList = getEmailsForTaggedUsers({\r\n noteBody: '',\r\n replies: this.body.replies,\r\n projectUsersList: projectUsersList.users,\r\n previousNoteBody: '',\r\n });\r\n\r\n const replyKeys = Object.keys(this.body.replies);\r\n const latestReplyIndex = replyKeys.length - 1;\r\n const lastReply = this.body.replies[latestReplyIndex];\r\n\r\n return {\r\n revisionId: revision.id,\r\n noteContent: lastReply && lastReply.reply ? lastReply.reply : '',\r\n sendEmailTo: emailList,\r\n };\r\n }\r\n\r\n includeEmailListAfterNoteEdit() {\r\n const {\r\n projectUsersList,\r\n notesPanel: { notesList },\r\n revision,\r\n } = getStore().getState().data;\r\n const emailList = getEmailsForTaggedUsers({\r\n noteBody: this.body.note,\r\n replies: {},\r\n projectUsersList: projectUsersList.users,\r\n previousNoteBody: notesList.data.previousNoteBody,\r\n });\r\n\r\n return {\r\n revisionId: revision.id,\r\n noteContent: this.body.note,\r\n sendEmailTo: emailList,\r\n };\r\n }\r\n\r\n toEditNoteApiFormat() {\r\n let noteBody = { ...this.body };\r\n let note = this.getNote();\r\n noteBody.note = toApiNoteFormat(note);\r\n const regex = /cfto_user_id=\"\\s*(.*?)\\s*\"/g;\r\n let match;\r\n let usersObject = {};\r\n\r\n do {\r\n match = regex.exec(noteBody.note);\r\n if (match) {\r\n usersObject[match[1]] = true;\r\n }\r\n } while (match);\r\n\r\n noteBody.taggedUsers = usersObject;\r\n\r\n return {\r\n noteId: this.noteId,\r\n noteType: this.noteType,\r\n body: JSON.stringify(noteBody),\r\n notePriorityType: this.notePriorityType,\r\n revisionId: this.revisionId,\r\n sectionId: this.sectionId,\r\n revisionNumber: this.revisionNumber,\r\n workflowStatus: this.workflowStatus,\r\n edit: true,\r\n };\r\n }\r\n\r\n toDeleteApiFormat() {\r\n return {\r\n revisionId: this.revisionId,\r\n sectionId: this.sectionId,\r\n noteId: this.noteId,\r\n pseudoElementId: this.pseudoElementId,\r\n };\r\n }\r\n\r\n hasNoteBeenEdited(text, noteType) {\r\n return this.body.note === text && this.noteType === noteType;\r\n }\r\n\r\n getNoteReplies() {\r\n if (this.body && this.body.replies) {\r\n return Object.values(this.body.replies).map((entry) => ({\r\n ...entry,\r\n reply: this.removeXMLTags(entry.reply),\r\n }));\r\n }\r\n return [];\r\n }\r\n\r\n getSortedNoteRepliesByLastModified() {\r\n return this.getNoteReplies().sort((r1, r2) =>\r\n r1.lastModified > r2.lastModified ? -1 : 1,\r\n );\r\n }\r\n\r\n getNoteReplyCount() {\r\n return this.getNoteReplies().length;\r\n }\r\n\r\n getNote() {\r\n if (isNullOrUndefined(this.body) || isNullOrUndefined(this.body.note)) {\r\n return null;\r\n }\r\n return this.removeXMLTags(this.body.note);\r\n }\r\n\r\n removeXMLTags(note) {\r\n let cleanHTML = DOMPurify.sanitize(note, {\r\n ALLOWED_TAGS: ['span'],\r\n ALLOWED_ATTR: ['cfto_user_id'],\r\n });\r\n\r\n return cleanHTML;\r\n }\r\n}\r\n","import { getStatementSummarySectionsRequest } from 'api/statement-summary-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const statementSummarySectionsLoading = createAction(\r\n 'STATEMENT_SUMMARY_SECTIONS_LOADING',\r\n);\r\nexport const statementSummarySectionsLoaded = createAction(\r\n 'STATEMENT_SUMMARY_SECTIONS_LOADED',\r\n);\r\nexport const statementSummarySectionsError = createAction(\r\n 'STATEMENT_SUMMARY_SECTIONS_ERROR',\r\n);\r\n\r\nexport const updateSectionSummaryFromSocketPayloadAction = createAction(\r\n 'UPDATE_SECTION_SUMMARY_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const fetchStatementSummarySections = ({ revisionId }) => (dispatch) => {\r\n dispatch(statementSummarySectionsLoading());\r\n getStatementSummarySectionsRequest({ revisionId })\r\n .then((response) => {\r\n dispatch(statementSummarySectionsLoaded({ response }));\r\n })\r\n .catch((error) => {\r\n dispatch(statementSummarySectionsError({ error }));\r\n });\r\n};\r\n","import React from 'react';\r\nimport htmlToText from 'html-to-text';\r\nimport moment from 'moment';\r\nimport { postRoleStateRequest } from '../../api/admin-module-api';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { FORBIDDEN } from 'http-status-codes';\r\nimport { toast } from 'react-toastify';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Warning } from 'icons/warning.svg';\r\n\r\nexport const getText = (richText) => {\r\n const text = htmlToText.fromString(richText, {\r\n wordwrap: false, // by default it adds new lines after 80 chars, need to disable to ensure no new characters are added\r\n });\r\n // we need to remove ascii codes from strings\r\n // https://stackoverflow.com/questions/20856197/remove-non-ascii-character-in-string\r\n // eslint-disable-next-line no-control-regex\r\n const withoutNonAscii = text.replace(/[^\\x00-\\x7F]/g, '');\r\n const withoutNewlines = withoutNonAscii.replace(/\\n/g, '');\r\n return withoutNewlines;\r\n};\r\nexport const SWITCH_ENABLER = 'ENABLER';\r\nexport const SWITCH_ADMIN = 'ADMIN';\r\nexport const SWITCH_COE = 'COE';\r\nexport const BANNER_ICON_SIZE = '18px';\r\nexport const ADMIN_MODULE_TOAST_MESSAGE_BLOCK = 'admin-module-toast-message';\r\n\r\nexport const updateColumnDataAndPost = async (\r\n userData,\r\n updatedFieldValue,\r\n currentField,\r\n) => {\r\n if (currentField === SWITCH_ENABLER) {\r\n userData.enabled = updatedFieldValue;\r\n userData.enabledDate = userData.enabled ? moment() : null;\r\n userData.disabledDate = userData.enabled ? null : moment();\r\n userData.enabled\r\n ? await saveEnableApplicationAccessRequest(\r\n userData,\r\n 'enabler',\r\n updatedFieldValue,\r\n moment(),\r\n null,\r\n )\r\n : await saveEnableApplicationAccessRequest(\r\n userData,\r\n 'enabler',\r\n updatedFieldValue,\r\n null,\r\n moment(),\r\n );\r\n }\r\n if (currentField === SWITCH_ADMIN) {\r\n userData.admin = updatedFieldValue;\r\n await saveEnableApplicationAccessRequest(\r\n userData,\r\n 'admin',\r\n updatedFieldValue,\r\n null,\r\n null,\r\n );\r\n }\r\n if (currentField === SWITCH_COE) {\r\n userData.coe = updatedFieldValue;\r\n await saveRoleState(userData, 'coe', updatedFieldValue, null, null);\r\n }\r\n};\r\n\r\nconst saveEnableApplicationAccessRequest = async (\r\n user,\r\n roleState,\r\n isRoleUpdate,\r\n enabledDate,\r\n disabledDate,\r\n) => {\r\n try {\r\n await saveRoleState(\r\n user,\r\n roleState,\r\n isRoleUpdate,\r\n enabledDate,\r\n disabledDate,\r\n );\r\n } catch (e) {\r\n if (e.response && e.response.status === FORBIDDEN) {\r\n toast.warn(\r\n <>\r\n \r\n \r\n ,\r\n { autoClose: 5000, pauseOnHover: true },\r\n );\r\n }\r\n // this will be catched in the calling method where we want to revert back the toggle status to previous state for the user details\r\n throw new Error('api call failed while updating user details');\r\n }\r\n};\r\n\r\nconst saveRoleState = async (\r\n user,\r\n roleState,\r\n isRoleUpdate,\r\n enabledDate,\r\n disabledDate,\r\n) =>\r\n await postRoleStateRequest(\r\n user,\r\n roleState,\r\n isRoleUpdate,\r\n enabledDate,\r\n disabledDate,\r\n );\r\n\r\nexport const getContainerListOptionsMap = (containerList) => {\r\n const containerListMap = new Map();\r\n containerList.forEach((item) => {\r\n const option = new MenuOption({\r\n id: item.containerCode,\r\n title: item.containerName,\r\n value: item.containerCode,\r\n isIntl: false,\r\n disabled: false,\r\n });\r\n containerListMap.set(item.containerCode, option);\r\n });\r\n return containerListMap;\r\n};\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const incrementZoom = createAction('INCREMENT_ZOOM');\r\nexport const decrementZoom = createAction('DECREMENT_ZOOM');\r\nexport const resetZoom = createAction('RESET_ZOOM');\r\n\r\nexport const leftIncrementZoom = createAction('INCREMENT_LEFT_ZOOM');\r\nexport const leftDecrementZoom = createAction('DECREMENT_LEFT_ZOOM');\r\nexport const leftResetZoom = createAction('RESET_LEFT_ZOOM');\r\n\r\nexport const rightIncrementZoom = createAction('INCREMENT_RIGHT_ZOOM');\r\nexport const rightDecrementZoom = createAction('DECREMENT_RIGHT_ZOOM');\r\nexport const rightResetZoom = createAction('RESET_RIGHT_ZOOM');\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { memo } from 'react';\r\nimport { injectIntl } from 'react-intl';\r\n\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nconst FORM_ITEM_BLOCK = 'form-item';\r\nconst ICON_SIZE = 18;\r\n\r\nconst FormItem = ({\r\n children,\r\n className,\r\n disabled,\r\n errorText,\r\n id,\r\n isValid,\r\n label,\r\n tooltip,\r\n width,\r\n intl,\r\n onClickFormItem,\r\n iconConfig,\r\n}) => {\r\n const _itemIsValid = () => isNullOrUndefined(isValid) || isValid;\r\n const _getErrorMessage = () => {\r\n if (typeof errorText === 'string') {\r\n return intl.formatMessage({ id: errorText });\r\n } else if (typeof errorText === 'object') {\r\n return intl.formatMessage({ id: errorText.id }, errorText.values);\r\n }\r\n return null;\r\n };\r\n const { infoText, tooltipInfoId, iconComponent: IconComponent } =\r\n iconConfig || {};\r\n return (\r\n \r\n {label ? (\r\n
\r\n \r\n {intl.formatMessage({ id: label })}\r\n \r\n {iconConfig && (\r\n \r\n \r\n \r\n )}\r\n
\r\n ) : null}\r\n \r\n {children}\r\n \r\n {!_itemIsValid() && errorText ? (\r\n
\r\n {_getErrorMessage()}\r\n
\r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nFormItem.propTypes = {\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** Boolean representing if component should be disabled state */\r\n disabled: PropTypes.bool,\r\n /** String error copy intl id or object containing intl id and values object */\r\n errorText: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n values: PropTypes.object,\r\n }),\r\n ]),\r\n /** Unique string id for form item*/\r\n id: PropTypes.string.isRequired,\r\n /** Boolean representing if form item output is valid */\r\n isValid: PropTypes.bool,\r\n /**Internationalized Sting id */\r\n label: PropTypes.string,\r\n /** SHOULD RARELY BE USED. Individual form-item components should have their own onSelect, onCheck etc. functions. Function fired onClick of form item */\r\n onClickFormItem: PropTypes.func,\r\n /** Object with tool tip options passed to tool tip*/\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /** String percentage representing width of component*/\r\n width: PropTypes.string,\r\n /** config to show the icon beside the lable of form elements*/\r\n iconConfig: PropTypes.shape({\r\n infoText: PropTypes.string.isRequired,\r\n tooltipInfoId: PropTypes.string.isRequired,\r\n iconComponent: PropTypes.oneOfType([PropTypes.element, PropTypes.object])\r\n .isRequired,\r\n }),\r\n};\r\n\r\nexport default memo(injectIntl(FormItem));\r\nexport { FORM_ITEM_BLOCK };\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n clearLeftOCRSectionContentWithIdsFromCache,\r\n clearLeftOCRSectionImageWithIdsFromCache,\r\n} from 'store/actions/statement-content-actions';\r\nimport { clearPreviousBlacklineContentWithIdsFromCache } from 'store/actions/blackline-view-actions';\r\n\r\nexport const setLeftSectionInViewStatementContent = createAction(\r\n 'SET_LEFT_SECTION_IN_VIEW_STATEMENT_CONTENT',\r\n);\r\nexport const clearLeftSectionInViewStatementContent = createAction(\r\n 'CLEAR_LEFT_SECTION_IN_VIEW_STATEMENT_CONTENT',\r\n);\r\nexport const clearLeftSectionContentWithIdsFromCache = createAction(\r\n 'CLEAR_LEFT_CONTENT_WITH_IDS_FROM_CACHE',\r\n);\r\nexport const updateLeftSectionViewedTimestamp = createAction(\r\n 'CACHE_UPDATE_LEFT_SECTION_VIEWED_TIMESTAMP',\r\n);\r\nexport const updateLeftPurgedCacheTracker = createAction(\r\n 'UPDATE_LEFT_PURGED_CACHE_TRACKER',\r\n);\r\n\r\n/**\r\n * Adds section to SectionInViewMap and updates it's viewed timestamp in the SectionCacheTracker for left statement of side by side view page\r\n * @param {int} param.sectionId\r\n */\r\nexport const setLeftSectionInView =\r\n ({ sectionId }) =>\r\n (dispatch) => {\r\n dispatch(setLeftSectionInViewStatementContent({ sectionId }));\r\n dispatch(updateLeftSectionViewedTimestamp({ sectionId }));\r\n };\r\n\r\n/**\r\n * Removes a section from the SectionInViewMap for left statement of side by side view page\r\n *\r\n * Sometimes the cache will still be too large if the transition between 2 large sections is within the viewport threshold\r\n * thus every time we clear a seciton in view, we should also check the cache and see if we can purge a section that is no longer\r\n * in view so we can get below the threshold\r\n * @param {int} param.sectionId\r\n */\r\nexport const clearLeftSectionInView =\r\n ({ sectionId }) =>\r\n async (dispatch, getStore) => {\r\n dispatch(clearLeftSectionInViewStatementContent({ sectionId }));\r\n const { leftTracker } =\r\n getStore().data.leftStatementContent.leftSectionsCache;\r\n const _cacheOverThreshold = leftTracker.cacheOverThreshold();\r\n if (_cacheOverThreshold) {\r\n dispatch(checkLeftCacheToPurge());\r\n }\r\n };\r\n\r\n//action used for left statement of side by side view page\r\nexport const checkLeftCacheToPurge = () => async (dispatch, getStore) => {\r\n const store = getStore();\r\n const {\r\n leftStatementContent,\r\n leftSelectedStatement: { isOCR },\r\n } = store.data;\r\n const { leftTracker } = leftStatementContent.leftSectionsCache;\r\n const {\r\n leftSectionsInView,\r\n modes: { blacklineViewMode },\r\n } = store.ui.statementPage;\r\n\r\n if (leftTracker.cacheOverThreshold()) {\r\n const {\r\n newViewedSectionMetricsMap,\r\n newViewedSectionQueue,\r\n reducedTotalSize,\r\n removedSectionIds,\r\n } = leftTracker.getPurgedCache({ sectionsInView: leftSectionsInView });\r\n dispatch(\r\n updateLeftPurgedCacheTracker({\r\n viewedSectionMetricsMap: newViewedSectionMetricsMap,\r\n viewedSectionQueue: newViewedSectionQueue,\r\n totalCacheMemorySize: reducedTotalSize,\r\n }),\r\n );\r\n if (isOCR) {\r\n dispatch(\r\n clearLeftOCRSectionContentWithIdsFromCache({ removedSectionIds }),\r\n );\r\n dispatch(clearLeftOCRSectionImageWithIdsFromCache({ removedSectionIds }));\r\n blacklineViewMode &&\r\n dispatch(\r\n clearPreviousBlacklineContentWithIdsFromCache({ removedSectionIds }),\r\n );\r\n } else {\r\n dispatch(clearLeftSectionContentWithIdsFromCache({ removedSectionIds }));\r\n }\r\n }\r\n};\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class ToolkitDownloadData extends BaseModel({\r\n downloadId: null,\r\n name: null,\r\n dateTime: null,\r\n downloadStatus: false,\r\n userDownloadedReportStatus: true,\r\n downloadResponse: null,\r\n storageGuid: null,\r\n reportType: null,\r\n isLoading: true,\r\n isLoaded: false,\r\n error: null,\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport ToolkitDownloadData from './toolkit-export-download-model';\r\nimport { isNullOrUndefined } from '../../utils/object-utils';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport cloneDeep from 'lodash.clonedeep';\r\nimport { getExportReportType } from 'utils/statement-content-page-utils';\r\n\r\nexport const REPORT_DOWNLOAD_PROCESSING = 'PROCESSING';\r\nexport const REPORT_DOWNLOAD_PROCESSED = 'PROCESSED';\r\nexport const REPORT_DOWNLOAD_FAILED = 'FAILED';\r\n\r\nexport default class ToolkitDownloadListData extends ApiModel({\r\n // structure\r\n data: new Map(),\r\n //[downloadId-1] : {instance of ToolkitDownloadData},\r\n //[downloadId-2] : {instance of ToolkitDownloadData},\r\n}) {\r\n /**\r\n * @param {Object} data : { downloadId: null, name: null, dateTime: null, downloadStatus: false }\r\n * @returns {ThisType}\r\n */\r\n setDownloadData(data) {\r\n if (\r\n data &&\r\n !isNullOrUndefined(data.reportId) &&\r\n !isNullOrUndefined(data.processedTime)\r\n ) {\r\n let downloadData = new ToolkitDownloadData({\r\n downloadId: data.reportId,\r\n name: data.fileName,\r\n dateTime: moment\r\n .utc(data.processedTime)\r\n .local()\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR_TIME),\r\n downloadStatus: data.status,\r\n // This might be a bit confusing. For BE, the field downloadedStatus is what we call userDownloadedReportStatus\r\n // and the field status is what we call downloadStatus. We need to interpret it correctly at our end.\r\n userDownloadedReportStatus: data.downloadedStatus,\r\n downloadResponse: data.byteDocument,\r\n storageGuid: data.storageGuid,\r\n reportType: getExportReportType(data.reportType),\r\n // these values ensure this method acts as setLoaded function for single report when called to set data\r\n isLoading: false,\r\n isLoaded: true,\r\n error: null,\r\n });\r\n return this.mergeLoadedData(this.data.set(data.reportId, downloadData));\r\n }\r\n return this;\r\n }\r\n\r\n setReportIdLoading({ id }) {\r\n !isNullOrUndefined(id) &&\r\n this.data.has(id) &&\r\n this.data.set(\r\n id,\r\n new ToolkitDownloadData({\r\n ...this.data.get(id),\r\n isLoading: true,\r\n isLoaded: false,\r\n }),\r\n );\r\n return this.merge({ data: this.data });\r\n }\r\n\r\n setReportIdLoaded({ id }) {\r\n !isNullOrUndefined(id) &&\r\n this.data.has(id) &&\r\n this.data.set(\r\n id,\r\n new ToolkitDownloadData({\r\n ...this.data.get(id),\r\n isLoading: false,\r\n isLoaded: true,\r\n }),\r\n );\r\n return this.merge({ data: this.data });\r\n }\r\n\r\n setReportIdError({ id, error }) {\r\n !isNullOrUndefined(id) &&\r\n this.data.has(id) &&\r\n this.data.set(\r\n id,\r\n new ToolkitDownloadData({\r\n ...this.data.get(id),\r\n isLoading: false,\r\n isLoaded: false,\r\n error: error,\r\n }),\r\n );\r\n return this.merge({ data: this.data });\r\n }\r\n\r\n setLoaded() {\r\n return this.merge({\r\n data: this.data,\r\n isLoaded: true,\r\n isLoading: false,\r\n });\r\n }\r\n\r\n hasReports() {\r\n return this && this.data && this.data.size;\r\n }\r\n /**\r\n *\r\n * @param {Array} listData : array of object\r\n * @returns\r\n */\r\n setDownloadListData(listData) {\r\n let reportList = cloneDeep(this);\r\n for (let index = 0; index < listData.length; index++) {\r\n // if reportId is already processed then dont alter it\r\n !(\r\n reportList &&\r\n reportList.hasReportId(listData[index].reportId) &&\r\n reportList.getReportById(listData[index].reportId).downloadStatus ===\r\n REPORT_DOWNLOAD_PROCESSED\r\n ) && (reportList = reportList.setDownloadData(listData[index]));\r\n }\r\n return this.mergeLoadedData(reportList.data);\r\n }\r\n\r\n updateDownloadStatus({\r\n id,\r\n downloadStatus,\r\n downloadResponse,\r\n storageGuid,\r\n userDownloadedReportStatus = undefined,\r\n }) {\r\n !isNullOrUndefined(id) &&\r\n this.data.has(id) &&\r\n this.data.set(\r\n id,\r\n new ToolkitDownloadData({\r\n ...this.data.get(id),\r\n downloadStatus: downloadStatus,\r\n userDownloadedReportStatus: userDownloadedReportStatus,\r\n downloadResponse: downloadResponse,\r\n storageGuid: storageGuid,\r\n isLoading: false,\r\n isLoaded: true,\r\n error: null,\r\n }),\r\n );\r\n return this.mergeLoadedData(this.data);\r\n }\r\n\r\n updateFlagUserDownloadedReportStatus({ id, userDownloadedReportStatus }) {\r\n !isNullOrUndefined(id) &&\r\n this.data.has(id) &&\r\n this.data.set(\r\n id,\r\n new ToolkitDownloadData({\r\n ...this.data.get(id),\r\n userDownloadedReportStatus: userDownloadedReportStatus,\r\n isLoading: false,\r\n isLoaded: true,\r\n error: null,\r\n }),\r\n );\r\n return this.mergeLoadedData(this.data);\r\n }\r\n\r\n mergeLoadedData(reportData) {\r\n return this.merge({\r\n data: reportData,\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n });\r\n }\r\n\r\n getReportById(id) {\r\n return !isNullOrUndefined(id) && this && this.data && this.data.get(id);\r\n }\r\n\r\n hasReportTypeDownloadProcessing(reportType) {\r\n return this &&\r\n this.data &&\r\n this.data.size > 0 &&\r\n [...this.data.values()].findIndex(\r\n (downloadData) =>\r\n downloadData.reportType === reportType &&\r\n downloadData.downloadStatus === REPORT_DOWNLOAD_PROCESSING,\r\n ) !== -1\r\n ? true\r\n : false;\r\n }\r\n\r\n hasReportId(id) {\r\n return !isNullOrUndefined(id) && this && this.data && this.data.has(id);\r\n }\r\n\r\n clear() {\r\n return this.merge({\r\n data: new Map(),\r\n });\r\n }\r\n\r\n sortByTime() {\r\n return (\r\n this &&\r\n this.data &&\r\n this.data.size > 0 &&\r\n [...this.data.values()].sort((a, b) =>\r\n b.dateTime.localeCompare(a.dateTime),\r\n )\r\n );\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\nimport WorkpaperForm from 'models/form/workpaper-form-model';\r\nimport {\r\n updateElementCacheByCalloutAction,\r\n updateLeftElementCacheByCalloutAction,\r\n} from './element-cache-actions';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\n\r\nexport const workpaper = createAction('WORKPAPER_CREATED');\r\nexport const tickmark = createAction('TICKMARK_CREATED');\r\nexport const formula = createAction('FORMULA_CREATED');\r\nexport const internalReference = createAction('INTERNAL_REFERENCE_CREATED');\r\nexport const comfortLetter = createAction('COMFORT_LETTER_CREATED');\r\n\r\nexport const workPaperElementIdsUpdatedOrDeleted =\r\n (workPaperToEditOrDeleted, isOCR) => async (dispatch, getStore) => {\r\n const {\r\n statementContent: { sectionIdList, elementCache },\r\n } = getStore().data;\r\n // optimisation work item required later. Need to get a list of all element IDs attached with the workpaper\r\n const workPaperToEditReferenceNumber = new WorkpaperForm().fromWorkpaper(\r\n workPaperToEditOrDeleted,\r\n ).referenceNumber;\r\n\r\n const workPaperUpdatedElementIds = [];\r\n sectionIdList.sectionIds.forEach((sectionItem) => {\r\n const sectionId = isOCR ? sectionItem.sectionId : sectionItem;\r\n const elementsData = elementCache.getSection(sectionId)\r\n ? elementCache.getSection(sectionId).elements\r\n : null;\r\n\r\n if (elementsData) {\r\n Object.keys(elementsData).forEach((elementId) => {\r\n const { workpaperReferenceNumberList, id } = elementsData[elementId];\r\n if (\r\n workpaperReferenceNumberList.includes(\r\n workPaperToEditReferenceNumber,\r\n )\r\n ) {\r\n workPaperUpdatedElementIds.push(id);\r\n }\r\n });\r\n }\r\n });\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: workPaperUpdatedElementIds,\r\n showCallout: true,\r\n }),\r\n );\r\n };\r\n\r\nexport const comfortLetterElementIdsUpdatedOrDeleted =\r\n (comfortLetterLabel, isOCR) => async (dispatch, getStore) => {\r\n const {\r\n statementContent: { sectionIdList, elementCache },\r\n } = getStore().data;\r\n\r\n // optimization work item required later. Need to get a list of all element IDs attached with the comfortLetter\r\n const comfortLetterUpdatedElementIds = [];\r\n sectionIdList.sectionIds.forEach((sectionItem) => {\r\n const sectionId = isOCR ? sectionItem.sectionId : sectionItem;\r\n const elementsData = elementCache.getSection(sectionId)\r\n ? elementCache.getSection(sectionId).elements\r\n : null;\r\n\r\n if (elementsData) {\r\n Object.keys(elementsData).forEach((elementId) => {\r\n const { comfortLetterLabelList, id } = elementsData[elementId];\r\n if (comfortLetterLabelList.includes(comfortLetterLabel)) {\r\n comfortLetterUpdatedElementIds.push(id);\r\n }\r\n });\r\n }\r\n });\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: comfortLetterUpdatedElementIds,\r\n showCallout: true,\r\n }),\r\n );\r\n };\r\n\r\nconst getElementsDataByLeftSideView = (elementsData) => {\r\n let elementIds = [];\r\n Object.keys(elementsData).forEach((section) => {\r\n Object.keys(elementsData[section]).forEach((item) => {\r\n if (elementsData[section][item])\r\n elementIds.push(elementsData[section][item].id);\r\n });\r\n });\r\n return elementIds;\r\n};\r\n\r\nexport const disableAllElementsCallout =\r\n({ showCallout }) =>\r\n async (dispatch, getStore) => {\r\n const {\r\n statementContent: { elementCache },\r\n } = getStore().data;\r\n\r\n const elementsData = elementCache.getAllSectionElements();\r\n\r\n let elementIds = [];\r\n elementIds = getElementsDataByLeftSideView(elementsData);\r\n\r\n if (elementIds.length) {\r\n dispatch(\r\n updateSideBySideElementCacheByCallouts({\r\n elementIds,\r\n showCallout: showCallout,\r\n }),\r\n );\r\n const isSideBySideView = window.location.pathname.includes(\r\n ROUTE_CONSTANTS.SIDE_BY_SIDE,\r\n );\r\n if (isSideBySideView) {\r\n const {\r\n leftStatementContent: { leftElementCache },\r\n leftSelectedStatement,\r\n } = getStore().data;\r\n\r\n const isleftSelectedStatement =\r\n leftSelectedStatement && leftSelectedStatement.isLoaded;\r\n\r\n if (isleftSelectedStatement) {\r\n const leftElementsData = leftElementCache.getAllSectionElements();\r\n\r\n let leftElementIds = getElementsDataByLeftSideView(leftElementsData);\r\n if (leftElementIds.length) {\r\n dispatch(\r\n updateSideBySideElementCacheByCallouts({\r\n elementIds: leftElementIds,\r\n showCallout: showCallout,\r\n isLeftSideView: true,\r\n }),\r\n );\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\nexport const updateSideBySideElementCacheByCallouts =\r\n ({ elementIds, showCallout, isLeftSideView = false }) =>\r\n (dispatch) => {\r\n isLeftSideView\r\n ? dispatch(\r\n updateLeftElementCacheByCalloutAction({\r\n elementIds,\r\n showCallout: showCallout,\r\n }),\r\n )\r\n : dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds,\r\n showCallout: showCallout,\r\n }),\r\n );\r\n };\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { COMFORT_ANNOTATION_SORT_BY } from 'constants/feature/comfort-letter-constants';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const createElementComfortLetterRequest = ({ comfortLetterForm }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${\r\n comfortLetterForm.revisionId\r\n }/elements/${comfortLetterForm.elementId}/comfortletter`,\r\n comfortLetterForm.toApiFormat(),\r\n );\r\n\r\nexport const updateElementComfortLetterRequest = async ({\r\n revisionId,\r\n comfortLetter,\r\n}) => {\r\n await withDefaultContextAsSelectedProject().put(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/comfortletter/${\r\n comfortLetter.comfortLetterId\r\n }`,\r\n comfortLetter.toEditApiFormat(),\r\n );\r\n};\r\n\r\nexport const getComfortLetterForElementRequest = ({ elementId, revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/cmftlrs`,\r\n );\r\n\r\nexport const createBulkComfortLetterRequest = ({ comfortLetterForm }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${\r\n comfortLetterForm.revisionId\r\n }/comfortletters`,\r\n comfortLetterForm.toApiFormat(),\r\n );\r\n\r\nexport const getMatchingComfortLettersForElementRequest = ({\r\n searchTerm,\r\n revisionId,\r\n elementId,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/element/${elementId}/cmftltrs/suggestions`,\r\n {\r\n params: { searchText: encodeURIComponent(searchTerm) },\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getMatchingComfortLettersRequest = ({ searchTerm, revisionId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/cmftltrs/suggestions`,\r\n {\r\n params: { searchText: encodeURIComponent(searchTerm) },\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const attachComfortLetterToElementRequest = ({\r\n comfortLetterId,\r\n elementId,\r\n revisionId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/comfortletter`,\r\n {\r\n comfortLetterId,\r\n elementId,\r\n revisionId,\r\n },\r\n );\r\n\r\nexport const detachComfortLetterToElementRequest = ({\r\n comfortLetterId,\r\n elementId,\r\n revisionId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/comfortletter/${comfortLetterId}`,\r\n );\r\n\r\nexport const getComfortAnnotationsForRevisionRequest = ({\r\n revisionId,\r\n sortBy = COMFORT_ANNOTATION_SORT_BY.ordinal,\r\n sortDirection = 'asc',\r\n}) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/comfortletters`,\r\n {\r\n params: {\r\n sortBy,\r\n sortDirection,\r\n },\r\n },\r\n );\r\n\r\nexport const getElementsByComfortAnnotation = ({\r\n revisionId,\r\n comfortLetterId,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/comfortletter/${comfortLetterId}/elements`,\r\n );\r\n};\r\n\r\nexport const deleteComfortLetterRequest = ({\r\n comfortAnnotation,\r\n revisionId,\r\n}) => {\r\n const { comfortLetterId } = comfortAnnotation;\r\n return withDefaultContextAsSelectedProject().delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/comfortletter/${comfortLetterId}`,\r\n );\r\n};\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nconst getUpdateNoteApi = ({ revisionId, noteModel }) =>\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${\r\n noteModel.sectionId\r\n }/notes/${noteModel.noteId}`;\r\n\r\nexport const createNotesRequest = ({ revisionId, notesForm, selection }) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${\r\n selection.sectionId\r\n }/notes`,\r\n { ...notesForm.toApiFormat(), ...selection.toApiFormat() },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const updateNoteRequest = ({ revisionId, noteModel }) =>\r\n withDefaultContextAsSelectedProject().put(\r\n getUpdateNoteApi({ revisionId, noteModel }),\r\n noteModel.toApiFormat(),\r\n );\r\n\r\nexport const updateNoteReplyRequest = ({ revisionId, noteModel }) =>\r\n withDefaultContextAsSelectedProject().put(\r\n getUpdateNoteApi({ revisionId, noteModel }),\r\n noteModel.toNoteReplyApiFormat(),\r\n );\r\n\r\nexport const EditNoteRequest = ({ revisionId, noteModel }) =>\r\n withDefaultContextAsSelectedProject().put(\r\n getUpdateNoteApi({ revisionId, noteModel }),\r\n noteModel.toEditNoteApiFormat(),\r\n );\r\n\r\nexport const getNoteByRevisionAndNoteIdRequest = ({ revisionId, noteId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/notes/${noteId}`,\r\n );\r\n};\r\n\r\nexport const getNoteByRevisionAndPseudoElementIdRequest = ({\r\n revisionId,\r\n pseudoElementId,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/pseudoelements/${pseudoElementId}/notes`,\r\n );\r\n};\r\n\r\nexport const getNoteByRevisionAndElementIdRequest = ({\r\n revisionId,\r\n elementId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/notes`,\r\n );\r\n\r\nexport const getNotesByRevisionRequest = ({ revisionId }) => {\r\n return withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/notes`,\r\n );\r\n};\r\n\r\nexport const getNotesByRevisionAndSectionRequest = ({\r\n statementId,\r\n revisionId,\r\n sectionId,\r\n contextKey,\r\n contextValue,\r\n}) =>\r\n withDefaultContextAsSelectedProject({ contextKey, contextValue }).get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/sections/${sectionId}/notes`,\r\n );\r\n\r\nexport const getNotesOCR = ({ statementId, revisionId, sectionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revisions/${revisionId}/sections/${sectionId}/notes`,\r\n );\r\n\r\nexport const deleteNoteRequest = ({ revisionId, note }) =>\r\n withDefaultContextAsSelectedProject().delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/sections/${\r\n note.sectionId\r\n }/notes/${note.noteId}`,\r\n { data: note.toDeleteApiFormat() },\r\n );\r\n\r\nexport const sendEmailToTaggedUsersRequest = ({\r\n revisionId,\r\n emailRequestBody,\r\n}) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/email`,\r\n emailRequestBody,\r\n );\r\n};\r\n","export default class RevisionStatusModel {\r\n id;\r\n status;\r\n statusDisplay;\r\n intlIdentifier;\r\n constructor({ id, status, statusDisplay, intlIdentifier }) {\r\n this.id = id;\r\n this.status = status;\r\n this.statusDisplay = statusDisplay;\r\n this.intlIdentifier = intlIdentifier;\r\n }\r\n}\r\n","import RevisionStatusModel from 'models/utils/common/revision-status-model';\r\n\r\nexport const REVISION_STATUS_DISPLAYS = {\r\n ACTIVE: 'ACTIVE',\r\n DELETED: 'DELETED',\r\n RESTORING: 'RESTORING',\r\n FROM_RESTORE: 'FROM_RESTORE',\r\n ERROR: 'ERROR',\r\n};\r\n\r\nexport const REVISION_STATUSES = {\r\n ACTIVE: new RevisionStatusModel({\r\n id: 0,\r\n status: 'ACTIVE',\r\n statusDisplay: 'Active',\r\n intlIdentifier: 'revision-status.active',\r\n }),\r\n DELETED: new RevisionStatusModel({\r\n id: 1,\r\n status: 'DELETED',\r\n statusDisplay: 'Deleted',\r\n intlIdentifier: 'revision-status.deleted',\r\n }),\r\n RESTORING: new RevisionStatusModel({\r\n id: 2,\r\n status: 'RESTORING',\r\n statusDisplay: 'Restoring',\r\n intlIdentifier: 'revision-status.restoring',\r\n }),\r\n FROM_RESTORE: new RevisionStatusModel({\r\n id: 3,\r\n status: 'FROM_RESTORE',\r\n statusDisplay: 'From Restore',\r\n intlIdentifier: 'revision-status.from-restore',\r\n }),\r\n ERROR: new RevisionStatusModel({\r\n id: 4,\r\n status: 'ERROR',\r\n statusDisplay: 'Error',\r\n intlIdentifier: 'revision-status.error',\r\n }),\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport {\r\n REVISION_STATUS_DISPLAYS,\r\n REVISION_STATUSES,\r\n} from 'constants/feature/revision-status-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nexport default class Revision extends ApiModel({\r\n data: {\r\n id: null,\r\n statementId: null,\r\n revisionNumber: null,\r\n linkToDocx: null,\r\n linkToOrgXhtml: null,\r\n linktoXhtml: null,\r\n status: null,\r\n processedByUserEntity: null,\r\n processedDate: null,\r\n deleteDate: null,\r\n lastModifiedDate: null,\r\n lastModifiedBy: null,\r\n docChangedTimestamp: null,\r\n linkToChangesStatement: null,\r\n changesStatementTimestamp: null,\r\n clientId: null,\r\n hasSanitizedImage: null,\r\n statementName: null,\r\n },\r\n status: null,\r\n}) {\r\n get id() {\r\n return this.data.id;\r\n }\r\n get statementId() {\r\n return this.data.statementId;\r\n }\r\n get revisionNumber() {\r\n return this.data.revisionNumber;\r\n }\r\n get linkToDocx() {\r\n return this.data.linkToDocx;\r\n }\r\n get linkToOrgXhtml() {\r\n return this.data.linkToOrgXhtml;\r\n }\r\n get linktoXhtml() {\r\n return this.data.linktoXhtml;\r\n }\r\n get revisionStatus() {\r\n switch (this.data.revisionStatus) {\r\n case REVISION_STATUS_DISPLAYS.ACTIVE:\r\n return REVISION_STATUSES.ACTIVE;\r\n case REVISION_STATUS_DISPLAYS.DELETED:\r\n return REVISION_STATUSES.DELETED;\r\n case REVISION_STATUS_DISPLAYS.RESTORING:\r\n return REVISION_STATUSES.RESTORING;\r\n case REVISION_STATUS_DISPLAYS.FROM_RESTORE:\r\n return REVISION_STATUSES.FROM_RESTORE;\r\n case REVISION_STATUS_DISPLAYS.ERROR:\r\n return REVISION_STATUSES.ERROR;\r\n default:\r\n return null;\r\n }\r\n }\r\n get processedByUserEntity() {\r\n return this.data.processedByUserEntity;\r\n }\r\n get processedDate() {\r\n return this.data.processedDate;\r\n }\r\n get deleteDate() {\r\n return this.data.deleteDate;\r\n }\r\n get lastModifiedDate() {\r\n return this.data.lastModifiedDate;\r\n }\r\n get lastModifiedBy() {\r\n return this.data.lastModifiedBy;\r\n }\r\n get docChangedTimestamp() {\r\n return this.data.docChangedTimestamp;\r\n }\r\n get linkToChangesStatement() {\r\n return this.data.linkToChangesStatement;\r\n }\r\n get changesStatementTimestamp() {\r\n return this.data.changesStatementTimestamp;\r\n }\r\n get clientId() {\r\n return this.data.clientId;\r\n }\r\n get hasSanitizedImage() {\r\n return this.data.hasSanitizedImage;\r\n }\r\n get statementName() {\r\n return this.data.statementName;\r\n }\r\n\r\n get readOnly() {\r\n return this.revisionStatus === REVISION_STATUSES.DELETED;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: response.data,\r\n status: response.status,\r\n };\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.data) || !isNullOrUndefined(this.data.id);\r\n }\r\n\r\n getRevisionData() {\r\n if (this.data) {\r\n return this.data;\r\n }\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setTOCExpandAll = createAction('SET_TOC_EXPAND_ALL');\r\nexport const setTOCRefresh = createAction('SET_TOC_REFRESH');\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const createOrUpdateElementWorkpaperRequest = ({ workpaperModel }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${\r\n workpaperModel.revisionId\r\n }/elements/${workpaperModel.elementId}/wprefs`,\r\n workpaperModel.toApiFormat(),\r\n );\r\n\r\nexport const createWorkpaperRequest = ({ workpaperModel }) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${\r\n workpaperModel.revisionId\r\n }/wprefs`,\r\n workpaperModel.toApiFormat(),\r\n );\r\n\r\nexport const getWorkpapersForElementRequest = ({ elementId, revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/wprefs`,\r\n );\r\n\r\nexport const detachElementWorkpaperRequest = ({\r\n elementId,\r\n revisionId,\r\n workpaperId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/wprefs/${workpaperId}`,\r\n );\r\n\r\nexport const getWorkpaperReferencesRequest = ({\r\n referenceNumber,\r\n revisionId,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/wprefs`,\r\n {\r\n params: { refNumber: encodeURIComponent(referenceNumber) },\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getWorkpapersForRevisionRequest = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/wpreferences`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const updateWorkpaperRequest = ({ revisionId, workpaper }) =>\r\n withDefaultContextAsSelectedProject().put(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/wprefs/${\r\n workpaper.workpaperRefId\r\n }`,\r\n workpaper.toEditApiFormat(),\r\n );\r\n\r\nexport const deleteWorkpaperRequest = ({ workpaper }) => {\r\n const { revisionId, workpaperRefId } = workpaper;\r\n return withDefaultContextAsSelectedProject().delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/wprefs/${workpaperRefId}`,\r\n );\r\n};\r\n","export const NUMBER_WITH_COMMAS_REGEX = /\\B(?=(\\d{3})+(?!\\d))/g;\r\nexport const COMMA_REGEX = /,/g;\r\nexport const DUPLICATE_LEADING_ZERO_REGEX = /^0+(?=\\d)/g;\r\nexport const EMPTY_REGEX = /^$/g;\r\nexport const FLOATING_POINT_NUMBER_REGEX = /^[-+]?[0-9]*\\.?[0-9]+$/;\r\nexport const NUMBER_PATTERN_REGEX = /\\d+/g;\r\n\r\nconst _formatNumber = (number, regex, replacement) => {\r\n if (number) {\r\n number += '';\r\n const numberParts = number.split('.');\r\n let integerPart = numberParts[0];\r\n //We are only updating the integer part of the number (the part before the decimal)\r\n integerPart = integerPart.toString().replace(regex, replacement);\r\n const decimalPart =\r\n numberParts.length > 1\r\n ? '.' + numberParts.slice(1, numberParts.length).join('.')\r\n : '';\r\n\r\n return integerPart + decimalPart;\r\n } else if (number === 0) {\r\n return number;\r\n }\r\n return '';\r\n};\r\n\r\nexport const formatNumberWithCommas = (number) => {\r\n return _formatNumber(number, NUMBER_WITH_COMMAS_REGEX, ',');\r\n};\r\n\r\nexport const removeCommasFromNumber = (number) => {\r\n return _formatNumber(number, COMMA_REGEX, '');\r\n};\r\n\r\nexport const removeDuplicateLeadingZerosFromNumber = (number) => {\r\n if (number + '' === '0') {\r\n return '0';\r\n }\r\n return _formatNumber(number, DUPLICATE_LEADING_ZERO_REGEX, '');\r\n};\r\n\r\nexport const addLeadingZeroToEmptyDecimal = (number) => {\r\n return _formatNumber(number, EMPTY_REGEX, '0');\r\n};\r\n\r\nexport const formatManualInputFormulaRowNumber = (number) => {\r\n return formatNumberWithCommas(\r\n addLeadingZeroToEmptyDecimal(\r\n removeDuplicateLeadingZerosFromNumber(removeCommasFromNumber(number)),\r\n ),\r\n );\r\n};\r\n","import React, { useState, useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\nimport { getContainerListOptionsMap } from 'constants/util/admin-module-utility';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport Chip from 'components/common/chip-component';\r\nimport { getCountryManagerDetailsByUserId } from 'api/admin-module-api';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\n\r\nexport const SUPPORT_ID_INPUT_MODAL =\r\n 'manage-country-manager-access-support-id';\r\n\r\nexport const SUPPORT_ID_INPUT_MODAL_BLOCK =\r\n 'manage-country-manager-access-support-id-block';\r\n\r\nconst SupportIDInputModal = ({\r\n isEditMode,\r\n userId,\r\n toggleSupportIDModal,\r\n onSave,\r\n onCancel,\r\n}) => {\r\n const containerList = useSelector(\r\n (store) => store.data.countryManagerContainerList,\r\n );\r\n const [updatedSupportID, setUpdatedSupportID] = useState('');\r\n const [previouslySelectedCountries, setPreviouslySelectedCountries] =\r\n useState([]);\r\n const [selectedContainerOptions, setSelectedContainerOptions] = useState([]);\r\n const [containerOptions, setContainerOptions] = useState(\r\n getContainerListOptionsMap(containerList.containersList),\r\n );\r\n const [isLoading, setLoading] = useState(false);\r\n const [isLoaded, setLoaded] = useState(false);\r\n const [error, setError] = React.useState(null);\r\n\r\n const setDataLoaded = () => {\r\n setLoading(false);\r\n setLoaded(true);\r\n };\r\n\r\n const setDataLoading = () => {\r\n setLoading(true);\r\n setLoaded(false);\r\n };\r\n\r\n const _getCountryManagerAccessDetails = async () => {\r\n try {\r\n setDataLoading();\r\n const response = await getCountryManagerDetailsByUserId(userId);\r\n setDataLoaded();\r\n const { supportId, containers } = response.data;\r\n const selectedContainerOptions = [];\r\n containers.forEach((containerCode) => {\r\n if (containerOptions.has(containerCode)) {\r\n const option = containerOptions.get(containerCode);\r\n selectedContainerOptions.push(option);\r\n containerOptions.set(containerCode, { ...option, disabled: true });\r\n }\r\n });\r\n setPreviouslySelectedCountries(containers);\r\n setUpdatedSupportID(supportId);\r\n setSelectedContainerOptions(selectedContainerOptions);\r\n setContainerOptions(containerOptions);\r\n } catch (e) {\r\n setError(e);\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (isEditMode) {\r\n _getCountryManagerAccessDetails();\r\n } else {\r\n setDataLoaded();\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const onSelectOption = (option) => {\r\n setSelectedContainerOptions((prevOption) => {\r\n return prevOption.concat(option);\r\n });\r\n setContainerOptions((containerOption) => {\r\n const selectedOption = containerOption.get(option.id);\r\n containerOption.set(option.id, { ...selectedOption, disabled: true });\r\n return containerOption;\r\n });\r\n };\r\n\r\n const onRemoveChip = (option) => {\r\n const filteredData = selectedContainerOptions.filter((value) => {\r\n return value.id !== option.id;\r\n });\r\n setSelectedContainerOptions(filteredData);\r\n setContainerOptions((containerOption) => {\r\n const selectedOption = containerOption.get(option.id);\r\n containerOption.set(option.id, { ...selectedOption, disabled: false });\r\n return containerOption;\r\n });\r\n };\r\n\r\n const onSaveSupportIdDetails = (\r\n updatedSupportID,\r\n selectedContainerOptions,\r\n ) => {\r\n const countryCodeList = selectedContainerOptions.map((item) => item.value);\r\n onSave(updatedSupportID, countryCodeList);\r\n };\r\n\r\n const isSaveBtnDisabled = () => {\r\n if (isEditMode) {\r\n //During Edit, disabled when previously selected country length is same as\r\n //currently selected and data should also match.\r\n const currentlySelected = selectedContainerOptions\r\n .map((item) => item.id)\r\n .sort();\r\n const previouslySelected = previouslySelectedCountries.sort();\r\n return currentlySelected.length\r\n ? previouslySelected.length === currentlySelected.length &&\r\n currentlySelected.toString() === previouslySelected.toString()\r\n : true;\r\n }\r\n //During creation, disabled until both field has data present in it.\r\n return !(updatedSupportID && selectedContainerOptions.length);\r\n };\r\n\r\n return (\r\n toggleSupportIDModal(false)}\r\n primaryModalButton={\r\n new ModalButton({\r\n text: 'common.save',\r\n onClick: () =>\r\n onSaveSupportIdDetails(updatedSupportID, selectedContainerOptions),\r\n\r\n disabled: isSaveBtnDisabled(),\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.cancel',\r\n onClick: onCancel,\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 {selectedContainerOptions.map((key) => {\r\n return (\r\n onRemoveChip(key)}\r\n >\r\n {key.title}\r\n \r\n );\r\n })}\r\n
\r\n \r\n
\r\n \r\n \r\n );\r\n};\r\n\r\nSupportIDInputModal.propTypes = {\r\n /** function to toggle state in order to show/hide support ID modal */\r\n toggleSupportIDModal: PropTypes.func.isRequired,\r\n /**Boolean value representing that popup is open in edit mode or not */\r\n isEditMode: PropTypes.bool.isRequired,\r\n /**Function fired when input text from modal is saved. */\r\n onSave: PropTypes.func.isRequired,\r\n /**Function fired when cancel button on modal is clicked */\r\n onCancel: PropTypes.func.isRequired,\r\n /**UserId required to fetch the country Manger details */\r\n userId: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default SupportIDInputModal;\r\n","import React, { useState } from 'react';\r\nimport { ReactComponent as Pencil } from 'icons/edit-page.svg';\r\nimport Switch from 'react-switch';\r\nimport { updateColumnDataAndPost } from '../constants/util/admin-module-utility';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport moment from 'moment';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n SWITCH_ENABLER,\r\n SWITCH_ADMIN,\r\n SWITCH_COE,\r\n} from '../constants/util/admin-module-utility';\r\nimport SupportIDInputModal from 'pages/admin-module/admin-module-manage-users/_manage-users-support-id-modal';\r\nimport ConditionalRenderComponent from './util/conditional-render-component';\r\n\r\nconst SWITCH_HEIGHT = 20;\r\nconst SWITCH_WIDTH = 45;\r\nconst ADMIN_MODULE_API_SWITCH = 'admin-module-api-switch';\r\n\r\nconst AdminModuleAPISwitch = ({\r\n switchKey,\r\n switchData,\r\n currentField,\r\n _updateUserEntityAgainstEmail,\r\n}) => {\r\n const [showSupportIDModal, setShowSupportIDModal] = useState(false);\r\n const [isEditMode, setEditMode] = useState(false);\r\n\r\n const _toggleSupportIDModal = (editMode) => {\r\n setEditMode(editMode);\r\n setShowSupportIDModal((prevModalState) => !prevModalState);\r\n };\r\n\r\n const checkedInitialState =\r\n currentField === SWITCH_ENABLER\r\n ? switchData.enabled\r\n : currentField === SWITCH_ADMIN\r\n ? switchData.admin\r\n : currentField === SWITCH_COE\r\n ? switchData.coe\r\n : false;\r\n const [checked, setChecked] = useState(checkedInitialState);\r\n\r\n const handleSwitchChange = async (event) => {\r\n //event is a boolean value that corresponds to the toggle switch state as On-Off(true-false)\r\n try {\r\n if (currentField === SWITCH_ADMIN) {\r\n if (event) _toggleSupportIDModal(false);\r\n else {\r\n setChecked(event);\r\n _updateSupportIDAndCountries(null);\r\n await updateColumnDataAndPost(switchData, event, currentField);\r\n }\r\n } else {\r\n setChecked(event);\r\n await updateColumnDataAndPost(switchData, event, currentField);\r\n }\r\n } catch (e) {\r\n setChecked(!event);\r\n console.error(e);\r\n }\r\n };\r\n\r\n const _onSaveSupportID = async (supportId, countries) => {\r\n try {\r\n _toggleSupportIDModal(false);\r\n setChecked(true);\r\n _updateSupportIDAndCountries(supportId, countries);\r\n await updateColumnDataAndPost(switchData, true, currentField);\r\n } catch (e) {\r\n setChecked(false);\r\n console.error(e);\r\n }\r\n };\r\n\r\n const _onCancelSupportIDModal = () => {\r\n _toggleSupportIDModal(false);\r\n !isEditMode && setChecked(false);\r\n };\r\n\r\n const _updateSupportIDAndCountries = (supportId, countries) => {\r\n switchData.supportId = supportId;\r\n if (countries && countries.length) {\r\n switchData.countries = countries;\r\n }\r\n _updateUserEntityAgainstEmail(switchData.email, switchData);\r\n };\r\n\r\n return (\r\n // wrapping this inside error boundary, so that whole page does not go blank. Since we do not have any api dependency to show loading or loaded icon,\r\n // hence, hard coded those values\r\n \r\n e.stopPropagation()}\r\n onClick={(e) => e.stopPropagation()}\r\n onFocus={(e) => e.stopPropagation()}\r\n onMouseOver={(e) => e.stopPropagation()}\r\n >\r\n
\r\n \r\n ) : !switchData.enabled && switchData.disabledDate ? (\r\n \r\n ) : (\r\n ''\r\n )\r\n }\r\n isNotInternationalized\r\n active={currentField === SWITCH_ENABLER}\r\n position={'left'}\r\n >\r\n
\r\n \r\n
\r\n \r\n {currentField === SWITCH_ADMIN && checked && (\r\n
\r\n _toggleSupportIDModal(true)}\r\n className={`${ADMIN_MODULE_API_SWITCH}__pencil-icon`}\r\n />\r\n
\r\n )}\r\n
\r\n {showSupportIDModal && (\r\n \r\n )}\r\n
\r\n \r\n );\r\n};\r\nAdminModuleAPISwitch.propTypes = {\r\n /** Current user data for a row */\r\n switchData: PropTypes.object.isRequired,\r\n /** Name of the current switch button */\r\n currentField: PropTypes.string.isRequired,\r\n /**Unique Key for the current switch */\r\n switchKey: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default AdminModuleAPISwitch;\r\n","import React from 'react';\r\n\r\nimport { DataGridColumn } from 'components/common/data-grid/data-grid-component';\r\nimport MultilineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\n\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport Switch from 'react-switch';\r\nimport AdminModuleAPISwitch from 'components/admin-module-api-switch';\r\nimport { GEO_NAMES } from 'constants/feature/project-list-header-constants';\r\nimport { getCountryNameByCountryCode } from 'utils/project-utils';\r\n\r\nconst SWITCH_HEIGHT = 20;\r\nconst SWITCH_WIDTH = 45;\r\n\r\nconst blankChangeHandler = () => {};\r\n\r\nexport const ADMIN_MODULE_SORT_COLUMN_KEYS = {\r\n clientName: 'clientName',\r\n containerCode: 'containerCode',\r\n};\r\n\r\nexport const SORT_ORDER = {\r\n ASC: 'asc',\r\n DESC: 'desc',\r\n};\r\n\r\nexport const getMonitoringColumns = () => {\r\n let monitoringColumns = [\r\n new DataGridColumn({\r\n key: 'clientName',\r\n header: 'admin.module.monitoring.client.name-heading',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `admin-module-client-name-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'activeStatements',\r\n header: 'admin.module.monitoring.active.statements-heading',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `admin-module-active-statements-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'wrappedStatements',\r\n header: 'admin.module.monitoring.wrapped.statements-heading',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `admin-module-wrapped-statements-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'deletedStatements',\r\n header: 'admin.module.monitoring.deleted.statements-heading',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `admin-module-deleted-statements-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'country',\r\n header: 'admin.module.monitoring.country-heading',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `admin-module-country-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n ];\r\n return monitoringColumns;\r\n};\r\n\r\nexport const getAddedUserColumnsForAdminModule = (\r\n currentUser,\r\n _updateUserEntityAgainstEmail,\r\n) => {\r\n let addedUserColumns = [\r\n new DataGridColumn({\r\n key: 'preferredFullName',\r\n header: 'admin-module.manage-users.user-heading.name',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-fullName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'email',\r\n header: 'admin-module.manage-users.user-heading.email',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-email-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'region',\r\n header: 'admin-module.manage-users.user-heading.region',\r\n width: '10%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-region-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'function',\r\n header: 'admin-module.manage-users.user-heading.function',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-function-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'enabled',\r\n header: 'admin-module.manage-users.user-heading.application_access',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `enabled-switch-${rowKey}`;\r\n\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'admin',\r\n header: 'admin-module.manage-users.user-heading.admin_access',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `admin-switch-${rowKey}`;\r\n\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'country',\r\n header: 'admin-module.manage-users.user-heading.user-countryName',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-country-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n ];\r\n\r\n if (currentUser.geoCode === GEO_NAMES.AME) {\r\n addedUserColumns.push(\r\n new DataGridColumn({\r\n key: 'coe',\r\n header: 'admin-module.manage-users.user-heading.coe_access',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `coe-switch-${rowKey}`;\r\n\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n );\r\n }\r\n return addedUserColumns;\r\n};\r\n\r\nexport const getSearchUserColumnsForAdminModule = (currentUser) => {\r\n let searchColumns = [\r\n new DataGridColumn({\r\n key: 'preferredFullName',\r\n header: 'admin-module.manage-users.user-heading.name',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-fullName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'email',\r\n header: 'admin-module.manage-users.user-heading.email',\r\n width: '30%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-email-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'region',\r\n header: 'admin-module.manage-users.user-heading.region',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-region-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'function',\r\n header: 'admin-module.manage-users.user-heading.function',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-function-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'admin',\r\n header: 'admin-module.manage-users.user-heading.admin_access',\r\n width: '25%',\r\n formatter: (rowData) => {\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'country',\r\n header: 'admin-module.manage-users.user-heading.user-countryName',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-country-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n ];\r\n\r\n if (currentUser.geoCode === GEO_NAMES.AME) {\r\n searchColumns.push(\r\n new DataGridColumn({\r\n key: 'coe',\r\n header: 'admin-module.manage-users.user-heading.coe_access',\r\n width: '15%',\r\n formatter: (rowData) => {\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n );\r\n }\r\n\r\n return searchColumns;\r\n};\r\n\r\nexport const ADMIN_MODULE_TABS = {\r\n MANAGEUSERS: new TabModel({\r\n id: 1,\r\n apiParam: 'manageuserstab',\r\n intlTitle: 'admin-module.tabs.manageuserstab',\r\n }),\r\n MAINTENANCEBANNER: new TabModel({\r\n id: 2,\r\n apiParam: 'maintenancebannertab',\r\n intlTitle: 'admin-module.tabs.maintenancebannertab',\r\n }),\r\n SUMMARY_OF_KEY_CHANGES: new TabModel({\r\n id: 3,\r\n apiParam: 'summaryOfKeyChangesTab',\r\n intlTitle: 'admin-module.tabs.summary-of-key-changes',\r\n }),\r\n MONITORING: new TabModel({\r\n id: 4,\r\n apiParam: 'monitoringTab',\r\n intlTitle: 'admin-module.tabs.monitoring',\r\n }),\r\n};\r\n\r\nexport const getAdminModuleTabs = (currentUser) => {\r\n if (currentUser.applicationManager && currentUser.admin) {\r\n return {\r\n MANAGEUSERS: ADMIN_MODULE_TABS.MANAGEUSERS,\r\n MAINTENANCEBANNER: ADMIN_MODULE_TABS.MAINTENANCEBANNER,\r\n SUMMARY_OF_KEY_CHANGES: ADMIN_MODULE_TABS.SUMMARY_OF_KEY_CHANGES,\r\n MONITORING: ADMIN_MODULE_TABS.MONITORING,\r\n };\r\n } else if (currentUser.applicationManager) {\r\n return {\r\n MAINTENANCEBANNER: ADMIN_MODULE_TABS.MAINTENANCEBANNER,\r\n SUMMARY_OF_KEY_CHANGES: ADMIN_MODULE_TABS.SUMMARY_OF_KEY_CHANGES,\r\n };\r\n } else if (currentUser.admin) {\r\n return {\r\n MANAGEUSERS: ADMIN_MODULE_TABS.MANAGEUSERS,\r\n MONITORING: ADMIN_MODULE_TABS.MONITORING,\r\n };\r\n } else {\r\n return { MANAGEUSERS: ADMIN_MODULE_TABS.MANAGEUSERS };\r\n }\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { SectionTreeListEntry } from 'models/data/section-tree-list-entry-model';\r\nimport {\r\n getArrayWithNewSection,\r\n deleteNewSection,\r\n isSectionInTree,\r\n} from 'utils/section-tree-utils';\r\n\r\nexport class SectionTreeList extends ApiModel({\r\n data: {\r\n sectionsHierarchy: [],\r\n isCreateSectionModalOpen: false,\r\n newSectionId: null,\r\n },\r\n}) {\r\n get sectionsHierarchy() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.sectionsHierarchy;\r\n }\r\n return [];\r\n }\r\n get hasBeenFetched() {\r\n return this.isLoaded || !this.isLoading;\r\n }\r\n get newSectionId() {\r\n return this.data.newSectionId;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n sectionsHierarchy:\r\n response &&\r\n response.data &&\r\n response.data.result &&\r\n response.data.result.map(\r\n (topSection) => new SectionTreeListEntry(topSection),\r\n ),\r\n newSectionId: this.data.newSectionId ? this.data.newSectionId : null,\r\n },\r\n };\r\n }\r\n\r\n /**\r\n * method used for flattening the section hirearchy into an array\r\n * @param {Array} arg.sections array of sections to flatten\r\n * @param {boolean} arg.includeChildless boolean indicator if want childless sections included in the result output\r\n */\r\n _flattenHirearchyToIds = ({ sections, includeChildless }) =>\r\n sections\r\n .flatMap((section) => {\r\n const _hasChildren =\r\n Array.isArray(section.children) && section.children.length > 0;\r\n if (_hasChildren) {\r\n return [\r\n ...this._flattenHirearchyToIds({\r\n sections: section.children,\r\n includeChildless,\r\n }),\r\n section.id,\r\n ];\r\n } else if (includeChildless) {\r\n return [section.id];\r\n }\r\n })\r\n .filter((id) => !isNullOrUndefined(id));\r\n\r\n /**\r\n * extendible method for creting an one dimensionsal es6 Map of\r\n * [sectionId]: initNodeValue object\r\n * @param {any} arg.initNodeValue initial value of each map items key\r\n * @param {boolean} arg.includeChildless boolean indicator if want childless sections included in the result output\r\n */\r\n _createFlatMapOfNodesWithValue = ({ initNodeValue, includeChildless }) =>\r\n new Map(\r\n this._flattenHirearchyToIds({\r\n sections: this.sectionsHierarchy,\r\n includeChildless,\r\n }).map((id) => [id, initNodeValue]),\r\n );\r\n\r\n /** Method used to initialize the collapsible node state of the table-of-contents-treeview */\r\n createCollapseStateMapFromNodeIds = ({ initNodeValue }) =>\r\n this._createFlatMapOfNodesWithValue({\r\n initNodeValue,\r\n includeChildless: false,\r\n });\r\n\r\n /** Method used to initialize the hidden/highlight state of the table-of-contents-treeview based on search results */\r\n createContentSearchFilterState = ({ initNodeValue }) =>\r\n this._createFlatMapOfNodesWithValue({\r\n initNodeValue,\r\n includeChildless: true,\r\n });\r\n\r\n filteredSectionsHierarchy(term) {\r\n return this.data.sectionsHierarchy.filter(\r\n (section) =>\r\n section.name.toLowerCase().indexOf(term.toLowerCase()) !== -1,\r\n );\r\n }\r\n\r\n setIsCreateSectionModalOpen(payload) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n isCreateSectionModalOpen: payload,\r\n },\r\n });\r\n }\r\n\r\n addNewSectionByParentId(payload) {\r\n const { section, parentId, inline } = payload;\r\n const isSectionAlreadyInTree = isSectionInTree(\r\n { children: this.sectionsHierarchy },\r\n section.id,\r\n );\r\n getArrayWithNewSection(\r\n { children: this.sectionsHierarchy },\r\n section,\r\n parentId,\r\n inline,\r\n isSectionAlreadyInTree,\r\n );\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n sectionsHierarchy: this.sectionsHierarchy,\r\n },\r\n });\r\n }\r\n removeNewSection(sectionId) {\r\n deleteNewSection({ children: this.sectionsHierarchy }, sectionId);\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n sectionsHierarchy: this.sectionsHierarchy,\r\n },\r\n });\r\n }\r\n setNewSectionId(id) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n newSectionId: id,\r\n },\r\n });\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setSelectedTabAction = createAction('SET_NAVIGATOR_TAB');\r\n\r\nexport const setStatementNavigationRefresh = createAction(\r\n 'SET_NAVIGATION_PANEL_REFRESH',\r\n);\r\n","import BaseModel from 'models/base-model';\r\nexport default class User extends BaseModel({\r\n admin: null,\r\n applicationManager: null,\r\n coe: null,\r\n company: null,\r\n disabledDate: null,\r\n email: null,\r\n enabled: null,\r\n enabledDate: null,\r\n firstName: null,\r\n fullName: null,\r\n function: null,\r\n id: null,\r\n isPpmd: null,\r\n jobType: null,\r\n lastName: null,\r\n preferredFullName: null,\r\n region: null,\r\n title: null,\r\n officeDescription: null,\r\n zoneId: null,\r\n geoCode: null,\r\n projectToGeoMap: null,\r\n}) {}\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { injectIntl } from 'react-intl';\r\nimport classNames from 'classnames';\r\n\r\nconst REACT_TOASTIFY_BLOCK = 'Toastify__toast';\r\n\r\nconst ToastNotification = ({\r\n children,\r\n icon,\r\n intl,\r\n message,\r\n title,\r\n truncateMessage,\r\n}) => {\r\n const formatText = (text) => {\r\n if (!text) return '';\r\n if (typeof text === 'string') return text;\r\n if (\r\n typeof text === 'object' &&\r\n Object.prototype.hasOwnProperty.call(text, 'id')\r\n )\r\n return Object.prototype.hasOwnProperty.call(text, 'values')\r\n ? intl.formatMessage({ id: text.id }, { ...text.values })\r\n : intl.formatMessage(text);\r\n return '';\r\n };\r\n const formattedMessage = formatText(message);\r\n const formatteTitle = formatText(title);\r\n return (\r\n <>\r\n
\r\n {icon}\r\n {formatteTitle}\r\n
\r\n {formattedMessage && (\r\n \r\n {formattedMessage}\r\n
\r\n )}\r\n {children && (\r\n
{children}
\r\n )}\r\n \r\n );\r\n};\r\n\r\nToastNotification.propTypes = {\r\n /** Additional nodes to render */\r\n children: PropTypes.node,\r\n /** Icon to render */\r\n icon: PropTypes.node,\r\n /** Intl message or string for the toast message */\r\n message: PropTypes.oneOfType([\r\n PropTypes.shape({ id: PropTypes.string.isRequired }),\r\n PropTypes.string,\r\n ]),\r\n /** Intl message or string for the toast title */\r\n title: PropTypes.oneOfType([\r\n PropTypes.shape({ id: PropTypes.string.isRequired }),\r\n PropTypes.string,\r\n ]),\r\n /** Boolean to truncate message */\r\n truncateMessage: PropTypes.bool,\r\n};\r\n\r\nexport default injectIntl(ToastNotification);\r\n","import { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\n\r\nexport const GEO_NAMES = {};\r\nconst ALL_OPTION = 'ALL';\r\nconst geoCodes = Object.keys(window.TIEOUT.ENV.GEOS);\r\n\r\n//Created this function because in future if any other GEO is added in the list,\r\n//we need not to update it here, It will get picked automatically from env file.\r\nconst createGeoCodeMap = () => {\r\n geoCodes.unshift(ALL_OPTION);\r\n geoCodes.forEach((code) => {\r\n if (!GEO_NAMES[code])\r\n GEO_NAMES[code] = code === ALL_OPTION ? EMPTY_STRING : code;\r\n });\r\n};\r\n\r\ncreateGeoCodeMap();\r\n\r\nexport const GEO_OPTION_MAP = new Map();\r\ngeoCodes.forEach((code) => {\r\n GEO_OPTION_MAP.set(\r\n code,\r\n new MenuOption({\r\n id: code,\r\n title: `project-list.header.dropdown.option.${code}`,\r\n value: code === ALL_OPTION ? EMPTY_STRING : code,\r\n }),\r\n );\r\n});\r\n\r\nexport const GEO_OPTIONS = Array.from(GEO_OPTION_MAP.values());\r\n","import { createAction } from 'redux-actions';\r\nimport { getInternalReferenceSuggestionsByRevisionAndElementId } from 'api/internal-reference-api';\r\n\r\nexport const internalReferenceSuggestedListLoading = createAction(\r\n 'INTERNAL_REFERENCE_SUGGESTED_LIST_LOADING',\r\n);\r\nexport const internalReferenceSuggestedListLoaded = createAction(\r\n 'INTERNAL_REFERENCE_SUGGESTED_LIST_LOADED',\r\n);\r\nexport const internalReferenceSuggestedListError = createAction(\r\n 'INTERNAL_REFERENCE_SUGGESTED_LIST_ERROR',\r\n);\r\n\r\nexport const updateSuggestedIRElementsFromListFromSocketPayloadAction = createAction(\r\n 'UPDATE_SUGGESTED_LIST_ELEMENTS_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const updateSuggestedIRListFromSocketPayloadAction = createAction(\r\n 'UPDATE_SUGGESTED_LIST_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const removeSuggestedIRFromSocketPayloadAction = createAction(\r\n 'REMOVE_SUGGESTED_IR_FROM_SOCKET_PAYLOAD_ACTION',\r\n);\r\n\r\nexport const fetchSuggestedListed = ({ revisionId, elementId }) => async (\r\n dispatch,\r\n) => {\r\n dispatch(internalReferenceSuggestedListLoading());\r\n await dispatch(fetchSuggestedListedWithoutLoading({ revisionId, elementId }));\r\n};\r\n\r\nexport const fetchSuggestedListedWithoutLoading = ({\r\n revisionId,\r\n elementId,\r\n}) => async (dispatch) => {\r\n try {\r\n const response = await getInternalReferenceSuggestionsByRevisionAndElementId(\r\n { revisionId, elementId },\r\n );\r\n dispatch(internalReferenceSuggestedListLoaded(response));\r\n } catch (error) {\r\n dispatch(internalReferenceSuggestedListError(error));\r\n }\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class ContentSectionMap extends ApiModel({\r\n data: {\r\n map: {},\r\n },\r\n}) {\r\n get map() {\r\n if (!isNullOrUndefined(this.data) && !isNullOrUndefined(this.data.map)) {\r\n return this.data.map;\r\n }\r\n return {};\r\n }\r\n processResponse({ response }) {\r\n const map = {};\r\n response.data.result.forEach(\r\n ({ parentId, name, id, is_technical, originalText }) => {\r\n map[id] = {\r\n parentId,\r\n name,\r\n id,\r\n isTechnical: is_technical,\r\n originalText,\r\n };\r\n },\r\n );\r\n return {\r\n data: {\r\n map,\r\n },\r\n };\r\n }\r\n\r\n has(id) {\r\n return (\r\n !isNullOrUndefined(id) &&\r\n !isNullOrUndefined(this.map) &&\r\n !isNullOrUndefined(this.map[id])\r\n );\r\n }\r\n\r\n get(id) {\r\n if (this.has(id)) {\r\n return this.map[id];\r\n }\r\n return null;\r\n }\r\n\r\n getClosestBookmarkSection({ sectionId }) {\r\n if (this.has(sectionId)) {\r\n const thisContent = this.get(sectionId);\r\n if (!thisContent.isTechnical) {\r\n return thisContent;\r\n }\r\n return this.getClosestBookmarkSection({\r\n sectionId: thisContent.parentId,\r\n });\r\n }\r\n return null;\r\n }\r\n\r\n hasSubsection({ sectionId }) {\r\n return (\r\n this.has(sectionId) &&\r\n Object.values(this.map).some((section) => section.parentId === sectionId)\r\n );\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport Tickmark from 'models/data/tickmark-model';\r\nimport clonedeep from 'lodash.clonedeep';\r\nexport default class TickmarkList extends ApiModel({\r\n data: {\r\n tickmarks: [],\r\n elementsMap: {},\r\n deletedTickmarks: [],\r\n },\r\n}) {\r\n get tickmarks() {\r\n if (this.hasTickmarks()) {\r\n return this.data.tickmarks;\r\n }\r\n return [];\r\n }\r\n get elementsMap() {\r\n if (this.hasElementsMap()) {\r\n return this.data.elementsMap;\r\n }\r\n return {};\r\n }\r\n\r\n hasElementsMap() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.elementsMap) &&\r\n Object.keys(this.data.elementsMap).length > 0\r\n );\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n tickmarks: response.data.result.map(\r\n (tickmark) => new Tickmark(tickmark),\r\n ),\r\n elementsMap: this.data.elementsMap,\r\n deletedTickmarks: this.data.deletedTickmarks,\r\n },\r\n };\r\n }\r\n\r\n hasTickmarks() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.tickmarks) &&\r\n this.data.tickmarks.length > 0\r\n );\r\n }\r\n\r\n setElementList({ response, tickmarkId }) {\r\n let updatedElementsMap = clonedeep(this.data.elementsMap);\r\n\r\n updatedElementsMap = {\r\n ...updatedElementsMap,\r\n [tickmarkId]: response.data,\r\n };\r\n\r\n return this.mergeData({ elementsMap: updatedElementsMap });\r\n }\r\n\r\n clearElementList() {\r\n return this.mergeData({ elementsMap: {} });\r\n }\r\n\r\n updateTickmarkElementsMap(payload) {\r\n const updatedElement = payload;\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const tickmarkIdArray = Object.keys(clonedElementsMap);\r\n\r\n for (let index = 0; index < tickmarkIdArray.length; index++) {\r\n const tickmarkId = tickmarkIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[tickmarkId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementId === updatedElement.id) {\r\n clonedElementsMap[tickmarkId][j] = updatedElement;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({ elementsMap: clonedElementsMap });\r\n }\r\n\r\n updateTickmarkElementsMapFromArray(payload) {\r\n let updatedElementsMapObject = {};\r\n for (let i = 0; i < payload.length; i++) {\r\n updatedElementsMapObject = {\r\n ...updatedElementsMapObject,\r\n [payload[i].id]: payload[i],\r\n };\r\n }\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const tickmarkIdArray = Object.keys(clonedElementsMap);\r\n for (let index = 0; index < tickmarkIdArray.length; index++) {\r\n const tickmarkId = tickmarkIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[tickmarkId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementId in updatedElementsMapObject) {\r\n const element = updatedElementsMapObject[elementId];\r\n const elementToUpdate = clonedElementsMap[tickmarkId][j];\r\n clonedElementsMap[tickmarkId][j] = { ...elementToUpdate, ...element };\r\n }\r\n }\r\n }\r\n return this.mergeData({ elementsMap: clonedElementsMap });\r\n }\r\n\r\n removeElementFromTickmarkElementsMapWithSocketPayload(payload) {\r\n let elementsToRemoveSet = new Set();\r\n for (let i = 0; i < payload.length; i++) {\r\n const element = payload[i];\r\n elementsToRemoveSet.add(element.id);\r\n }\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const tickmarkIdArray = Object.keys(clonedElementsMap);\r\n\r\n // this part updates the elements map\r\n for (let index = 0; index < tickmarkIdArray.length; index++) {\r\n const tickmarkId = tickmarkIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[tickmarkId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementsToRemoveSet.has(elementId)) {\r\n clonedElementsMap[tickmarkId].splice(j, 1);\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n\r\n removeElementFromElementsMap(payload) {\r\n const elementIdToRemove = payload;\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const tickmarkIdArray = Object.keys(clonedElementsMap);\r\n\r\n for (let index = 0; index < tickmarkIdArray.length; index++) {\r\n const tickmarkId = tickmarkIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[tickmarkId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementId === elementIdToRemove) {\r\n clonedElementsMap[tickmarkId].splice(j, 1);\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({ elementsMap: clonedElementsMap });\r\n }\r\n\r\n removeTickmarkFromElementsMap(tickmarkId) {\r\n let updatedElementsMap = clonedeep(this.data.elementsMap);\r\n if (tickmarkId in updatedElementsMap) {\r\n delete updatedElementsMap[tickmarkId];\r\n }\r\n return this.mergeData({ elementsMap: updatedElementsMap });\r\n }\r\n addTickmarkToDeletedArray(tickmarkId) {\r\n const deletedTickmarksCopy = this.data.deletedTickmarks;\r\n deletedTickmarksCopy.push(tickmarkId);\r\n return this.mergeData({ deletedTickmarks: deletedTickmarksCopy });\r\n }\r\n\r\n deleteTickmarkWithSocketPayload(payload) {\r\n let tickmarksCopy = [...this.data.tickmarks];\r\n tickmarksCopy = tickmarksCopy.filter(\r\n (tickmark) => tickmark.tickmarkId !== payload.tickmarkRefId,\r\n );\r\n\r\n let updatedElementsMap = clonedeep(this.data.elementsMap);\r\n if (payload.tickmarkRefId in updatedElementsMap) {\r\n delete updatedElementsMap[payload.tickmarkRefId];\r\n }\r\n\r\n return this.mergeData({\r\n tickmarks: tickmarksCopy.map((tickmark) => new Tickmark(tickmark)),\r\n elementsMap: updatedElementsMap,\r\n });\r\n }\r\n updateTickmarkWithSocketPayload(payload) {\r\n let tickmarksCopy = [...this.data.tickmarks];\r\n for (\r\n let currentTickmarkIndex = 0;\r\n currentTickmarkIndex < tickmarksCopy.length;\r\n currentTickmarkIndex++\r\n ) {\r\n if (\r\n payload.tickmarkRefId ===\r\n tickmarksCopy[currentTickmarkIndex].tickmarkId &&\r\n tickmarksCopy[currentTickmarkIndex].revisionId === payload.revisionId\r\n ) {\r\n tickmarksCopy[currentTickmarkIndex].text = payload.text;\r\n tickmarksCopy[currentTickmarkIndex].richText = payload.richText;\r\n tickmarksCopy[currentTickmarkIndex].creationType = payload.creationType;\r\n }\r\n }\r\n return this.mergeData({\r\n tickmarks: tickmarksCopy.map((tickmark) => new Tickmark(tickmark)),\r\n });\r\n }\r\n returnTopNTickmarks(noOfTickmarkToReturn) {\r\n return this.mergeData({\r\n tickmarks: this.tickmarks.slice(0, noOfTickmarkToReturn),\r\n });\r\n }\r\n\r\n /**\r\n * It adds new data to elementsMap and tickmarks and increases the elementsCount in tickmarks\r\n * for the new tickmarkId inserted.\r\n * @param {Array} payload.attachedTickmark - it contains the list of attached tickmark with elementId\r\n * @param {Array} payload.elementEntities - it contains the list of elements modified as a result of attaching tickmark\r\n * @returns {ThisParameterType}\r\n */\r\n addTickmarkToList(payload) {\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const tickmarksMap = this.tickmarks.reduce((elementMap, elementData) => {\r\n elementMap[elementData.tickmarkId] = elementData;\r\n return elementMap;\r\n }, {});\r\n const elements = payload.elementEntities.reduce(\r\n (elementMap, elementData) => {\r\n elementMap[elementData.id] = elementData;\r\n return elementMap;\r\n },\r\n {},\r\n );\r\n let modifiedTickmark = {};\r\n payload.attachedTickmark.forEach((tickmark) => {\r\n const tickmarkId = tickmark.tickmarkId;\r\n if (!(tickmarkId in tickmarksMap)) {\r\n tickmarksMap[tickmarkId] = tickmark;\r\n }\r\n const element = elements[tickmark.elementId];\r\n if (tickmarkId in clonedElementsMap) {\r\n // If there is already a tickmark and few elements already exists for that tickmark\r\n // then append this new element in the list.\r\n // Given : element is not null or undefined or any other falsy value.\r\n if (element) {\r\n modifiedTickmark[tickmarkId] = true;\r\n clonedElementsMap[tickmarkId].push(element);\r\n tickmarksMap[tickmarkId].elementCount++;\r\n }\r\n } else {\r\n //Else If there does not exist the particular tickmarkId\r\n // then create a new tickmark and store in the list.\r\n // Given : element is not null or undefined or any other falsy value.\r\n if (element) {\r\n clonedElementsMap[tickmarkId] = [element];\r\n tickmarksMap[tickmarkId].elementCount++;\r\n }\r\n }\r\n });\r\n const modifiedTickmarkKeys = Object.keys(modifiedTickmark);\r\n for (let i = 0; i < modifiedTickmarkKeys.length; i++) {\r\n //sort the element list by id to put the new element in the correct position\r\n clonedElementsMap[modifiedTickmarkKeys[i]] = clonedElementsMap[\r\n modifiedTickmarkKeys[i]\r\n ].sort((a, b) => a.id - b.id);\r\n }\r\n // sort the tickmarks by note ordinal\r\n const tickmarks = Object.values(tickmarksMap).sort(\r\n (a, b) => a.ordinal - b.ordinal,\r\n );\r\n return this.mergeData({\r\n tickmarks: tickmarks.map((tickmark) => new Tickmark(tickmark)),\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n /**\r\n * Removes data from elementsMap and modifies the count of tickmarks\r\n * @param {Array} payload - A particular object in an array consists revisionId, elementId, tickmarkId\r\n * @returns {ThisParameterType}\r\n */\r\n unlinkTickmarkFromElementWithWebsocket(payload) {\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n let clonedTickmarks = clonedeep(this.data.tickmarks);\r\n\r\n let tickmarkToElementsMap = {};\r\n /** We are building a object which will contain all the new (in the payload) elementId mapped\r\n * to tickmarkId i.e. tickmarkId will be key which will contain collection of objects\r\n * of the form 'elementId: true'.\r\n * Example : [123] : {{1:true}, {2:true}}.\r\n * Here 123 is tickmarkId and 1,2 are respective elementId (in the payload) mapped to\r\n * that tickmarkId.\r\n */\r\n for (let i = 0; i < payload.length; i++) {\r\n const element = payload[i];\r\n /** for the element in payload with particular tickmarkId, if tickmarkId\r\n * already exists in tickmarkToElementsMap then append the data for new element\r\n * else create a new key with that tickmarkId and store the elementId\r\n */\r\n if (element.tickmarkId in tickmarkToElementsMap) {\r\n tickmarkToElementsMap[element.tickmarkId] = {\r\n ...tickmarkToElementsMap[element.tickmarkId],\r\n [element.elementId]: true,\r\n };\r\n } else {\r\n tickmarkToElementsMap[element.tickmarkId] = {\r\n [element.elementId]: true,\r\n };\r\n }\r\n }\r\n /** Modify the elementCount for each tickmarkId (condition: tickmarkId belongs to the set of tickmarkToElementsMap)\r\n * in tickmarks array and delete the elementIds from elementsMap\r\n */\r\n for (let i = 0; i < clonedTickmarks.length; i++) {\r\n let tickmark = clonedTickmarks[i];\r\n const tickmarkId = tickmark.tickmarkId;\r\n if (tickmarkId in tickmarkToElementsMap) {\r\n const elementsObject = tickmarkToElementsMap[tickmarkId];\r\n\r\n // subtract elementCount based on how many affected elements\r\n // are mapped to a specific tickmarkId\r\n const elementsToSubtract = Object.keys(elementsObject).length;\r\n tickmark.elementCount = tickmark.elementCount - elementsToSubtract;\r\n\r\n if (Object.keys(clonedElementsMap).length > 0) {\r\n let elements = clonedElementsMap[tickmarkId];\r\n const filteredElements = elements.filter(\r\n (element) => !(element.id in tickmarkToElementsMap[tickmarkId]),\r\n );\r\n clonedElementsMap[tickmarkId] = filteredElements;\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({\r\n tickmarks: clonedTickmarks,\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst AMOUNT_ATTRIBUTES_DETAILS_BLOCK = 'amount-attribute-details';\r\nconst AmountAttributesDetails = ({ elementDetails, className, flagMap }) => {\r\n if (elementDetails.isLoaded === false) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {elementDetails.period}\r\n \r\n \r\n {elementDetails.entity}\r\n \r\n
\r\n );\r\n};\r\n\r\nAmountAttributesDetails.propTypes = {\r\n /** Selected elements details object */\r\n elementDetails: PropTypes.oneOfType([\r\n PropTypes.instanceOf(ElementDetails),\r\n PropTypes.object,\r\n ]).isRequired,\r\n};\r\n\r\nexport default AmountAttributesDetails;\r\n","const SPECIAL_COLUMNS = {\r\n kebab: 'special-kebab-column',\r\n checkbox: 'special-checkbox-column',\r\n icon: 'special-icon-column',\r\n};\r\nconst CONSTANTS = {\r\n SPECIAL_COLUMNS,\r\n SPECIAL_COLUMNS_LIST: Object.values(SPECIAL_COLUMNS),\r\n DATA_GRID_ROW_HEIGHT: 3, // in rems\r\n DATA_GRID_ROW_HEIGHT_MAX: 6, // in rems\r\n ROWS_AMOUNT: 20,\r\n};\r\nexport default CONSTANTS;\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class Tickmark extends BaseModel({\r\n revisionId: null,\r\n elementId: null,\r\n tickmarkId: null,\r\n ordinal: null,\r\n noteOrdinal: '',\r\n richText: '',\r\n text: '',\r\n elementCount: 0,\r\n}) {}\r\n","import React, { useEffect, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { CALLOUT_MAX_WIDTH, ELEMENT_BLOCK } from '../tieout-element-component';\r\nimport { ANNOTATION_DISPLAY_FUNCTIONS } from 'constants/feature/tieout-element-constants';\r\nimport { getElementHighlightStatus } from 'utils/ocr-annotation-utils';\r\nimport { setSelectedElementDetails } from 'store/actions/report-preview-page-actions';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport AnnotationCalloutComponent from '../tieout-element-common/annotation-callout-component';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport Zoom from 'models/data/zoom-model';\r\n\r\nconst ANNOTATION_ICON_SIZE = '10px';\r\nconst PREVIEW_REPORT_SELECTEDABLE_ELEMENT_BLOCK_ID =\r\n 'preview-report-selectedable-element-id';\r\n\r\nconst PREVIEW_REPORT_SELECTEDABLE_ELEMENT_BLOCK =\r\n 'preview-report-selectedable-element';\r\n\r\nconst CALLOUT_POINTER_WIDTH_AND_MARGIN = 12;\r\n\r\nconst PreviewReportSelectedableElement = ({\r\n elementDetails,\r\n href,\r\n id,\r\n elementId,\r\n sectionId,\r\n children,\r\n zoom,\r\n}) => {\r\n const elementRef = useRef(false);\r\n\r\n const elementSize =\r\n elementRef && elementRef.current\r\n ? parseFloat(window.getComputedStyle(elementRef.current).fontSize) - 3\r\n : 0;\r\n\r\n const {\r\n reportPreviewPage,\r\n previewPage: { shouldShowElementId, shouldShowStatusAndFlag },\r\n } = useSelector((store) => store.ui);\r\n\r\n const isElementSelected =\r\n reportPreviewPage.selectedElementId === parseInt(elementId);\r\n\r\n const [screenSize, setScreenSize] = useState(\r\n window.innerWidth * window.innerHeight,\r\n );\r\n const dispatch = useDispatch();\r\n useEffect(() => {\r\n window.addEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n return () => {\r\n window.removeEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n };\r\n }, []);\r\n\r\n const [calloutRightPosition, setCalloutRightPosition] = useState('0px');\r\n const [calloutTopPosition, setCalloutTopPosition] = useState('0px');\r\n\r\n const tieoutElement = document.getElementById(id);\r\n const tieoutElementBoundingInfo =\r\n tieoutElement && tieoutElement.getBoundingClientRect();\r\n const tieoutElementLeft =\r\n tieoutElementBoundingInfo && tieoutElementBoundingInfo.left;\r\n const tieoutElementTop =\r\n tieoutElementBoundingInfo && tieoutElementBoundingInfo.top;\r\n const tieoutElementHeight =\r\n tieoutElementBoundingInfo && tieoutElementBoundingInfo.height;\r\n\r\n useEffect(() => {\r\n const callOut = document.getElementById(\r\n `${PREVIEW_REPORT_SELECTEDABLE_ELEMENT_BLOCK_ID}__${id}`,\r\n );\r\n const calloutBoundingInfo =\r\n (callOut && callOut.getBoundingClientRect()) || {};\r\n const { height: calloutHeight, width: calloutWidth } = calloutBoundingInfo;\r\n const { left: parentLeftPosition } = document\r\n .getElementById('statement-content-panel-id')\r\n .getBoundingClientRect();\r\n const { top: parentTopPosition } = document\r\n .getElementById('statement-content-panel-zoom-id')\r\n .getBoundingClientRect();\r\n\r\n const elementCenter = tieoutElementHeight / 2;\r\n const calloutCenter = calloutHeight / 2;\r\n const calloutRight =\r\n tieoutElementLeft &&\r\n `${\r\n (tieoutElementLeft -\r\n parentLeftPosition -\r\n calloutWidth -\r\n CALLOUT_POINTER_WIDTH_AND_MARGIN) /\r\n zoom.zoomRatio\r\n }px`;\r\n const calloutTop = `${\r\n (tieoutElementTop - parentTopPosition - calloutCenter + elementCenter) /\r\n zoom.zoomRatio\r\n }px`;\r\n\r\n setCalloutTopPosition(calloutTop);\r\n setCalloutRightPosition((preVal) =>\r\n zoom.zoomRatio < 1 ? preVal : calloutRight,\r\n );\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n elementDetails,\r\n zoom.zoomRatio,\r\n screenSize,\r\n tieoutElementLeft,\r\n tieoutElementTop,\r\n tieoutElementHeight,\r\n shouldShowElementId,\r\n shouldShowStatusAndFlag,\r\n ]);\r\n\r\n const { isReviewed, isVerified, isUnverified } = getElementHighlightStatus({\r\n elementDetails,\r\n isElementHighlighted: false,\r\n isPreviewPage: true,\r\n showElementStatusAndFlag: shouldShowStatusAndFlag,\r\n });\r\n\r\n const getElementStatusColor = () =>\r\n isReviewed\r\n ? `${ELEMENT_BLOCK}--reviewed`\r\n : isVerified\r\n ? `${ELEMENT_BLOCK}--verified`\r\n : isUnverified && `${ELEMENT_BLOCK}--unverified`;\r\n\r\n const navigateToElementRow = () => {\r\n dispatch(\r\n setSelectedElementDetails({\r\n selectedElementId: parseInt(elementId),\r\n isClickedOnReport: false,\r\n }),\r\n );\r\n };\r\n\r\n return (\r\n <>\r\n \r\n {shouldShowStatusAndFlag &&\r\n ANNOTATION_DISPLAY_FUNCTIONS.flagged({\r\n elementDetails,\r\n iconSize: ANNOTATION_ICON_SIZE,\r\n BLOCK: `${ELEMENT_BLOCK}--flag`,\r\n })}\r\n \r\n {children}\r\n \r\n \r\n {shouldShowElementId &&\r\n elementDetails &&\r\n elementDetails.previewSequenceID && (\r\n \r\n {elementDetails.previewSequenceID}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default PreviewReportSelectedableElement;\r\n\r\nPreviewReportSelectedableElement.propTypes = {\r\n /**Element details for the element to be rendered */\r\n elementDetails: PropTypes.instanceOf(ElementDetails),\r\n /**ID - CFTO_ELEMENT_ID */\r\n id: PropTypes.string.isRequired,\r\n /**ID of element */\r\n elementId: PropTypes.string.isRequired,\r\n /**section id of section where element is rendered */\r\n sectionId: PropTypes.number.isRequired,\r\n /**element node to be rendered */\r\n children: PropTypes.node,\r\n /**zoom details of screen */\r\n zoom: PropTypes.instanceOf(Zoom).isRequired,\r\n /**flag to decide whether to show callout or not */\r\n shouldShowElementId: PropTypes.bool,\r\n /**flag to decide whether to show color for element status and flag or not*/\r\n shouldShowStatusAndFlag: PropTypes.bool,\r\n};\r\n","import React, { useRef, useEffect, useState } from 'react';\r\nimport classnames from 'classnames';\r\nimport { ReactComponent as AnnotationIndicator } from 'icons/annotation-indicator.svg';\r\nimport {\r\n getMarkerPosition,\r\n getCalloutPosition,\r\n} from 'constants/feature/tieout-element-utils';\r\nimport { useSelector } from 'react-redux';\r\nimport {\r\n STATEMENT_CONTENT_PANEL_ZOOM_BLOCK,\r\n STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK,\r\n} from 'constants/feature/statement-content-constants';\r\n\r\nexport const CALLOUT_MAX_WIDTH = '120px';\r\n\r\nconst TieoutElementCallouts = ({\r\n children,\r\n elementRef,\r\n onAnnotationClick,\r\n annotationPosition,\r\n getShowCalloutValue,\r\n isShowCallout,\r\n setShowCalloutVal,\r\n elementData,\r\n annotationDisplayFilter,\r\n id,\r\n zoom,\r\n ELEMENT_BLOCK,\r\n displayElementDetailsOnStatementPage,\r\n sectionId,\r\n leftSideView,\r\n numberOfSourceElementSelected,\r\n numberOfTargetElementSelected,\r\n}) => {\r\n const {\r\n data: {\r\n statementContent: {\r\n sectionsCache: { cache },\r\n },\r\n leftStatementContent: {\r\n leftSectionsCache: { leftCache },\r\n },\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { contentViewMode },\r\n },\r\n },\r\n } = useSelector((store) => store);\r\n\r\n const [tableControlsChanged, setTableControlsChanged] = useState(false);\r\n\r\n const [screenSize, setScreenSize] = useState(\r\n window.innerWidth * window.innerHeight,\r\n );\r\n\r\n const calloutRef = useRef(null);\r\n const markerRef = useRef(null);\r\n\r\n const elementSize =\r\n elementRef && elementRef.current\r\n ? window.getComputedStyle(elementRef.current).fontSize\r\n : 0;\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n return () => {\r\n window.removeEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n };\r\n }, []);\r\n useEffect(() => {\r\n // Annotation Show or Hide\r\n setShowCalloutVal(\r\n getShowCalloutValue(elementData, annotationDisplayFilter),\r\n );\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n annotationPosition.position,\r\n elementData,\r\n annotationDisplayFilter.showAll,\r\n annotationDisplayFilter.workpaper,\r\n annotationDisplayFilter.tickmarks,\r\n annotationDisplayFilter.internalRef,\r\n annotationDisplayFilter.formula,\r\n annotationDisplayFilter.comfortLetter,\r\n ]);\r\n\r\n const [annotationStyle, setAnnotationStyle] = useState({\r\n marker: {},\r\n callout: {},\r\n });\r\n\r\n useEffect(() => {\r\n const tables = document.querySelectorAll(\r\n '.statement-content-segment table',\r\n );\r\n // Since we have table controls to change width of a specific table. We need to check if the it is being clicked.\r\n const observer = new MutationObserver((mutationsList) => {\r\n for (const mutation of mutationsList) {\r\n if (\r\n mutation.type === 'attributes' &&\r\n mutation.attributeName === 'data-fixed-width'\r\n ) {\r\n setTableControlsChanged((prevState) => !prevState);\r\n }\r\n }\r\n });\r\n\r\n tables &&\r\n !!tables.length &&\r\n tables.forEach((table) => {\r\n observer.observe(table, { attributes: true });\r\n });\r\n\r\n return () => {\r\n observer.disconnect();\r\n };\r\n }, []);\r\n\r\n //Need to get these positions to calculate the latest position on initial load of the document.\r\n const documentId = leftSideView\r\n ? STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK\r\n : STATEMENT_CONTENT_PANEL_ZOOM_BLOCK;\r\n const parentElement = document && document.getElementById(documentId);\r\n const {\r\n left: parentLeftPosition,\r\n top: parentTopPosition,\r\n right: parentRightPosition,\r\n } = parentElement ? parentElement.getBoundingClientRect() : {};\r\n\r\n useEffect(() => {\r\n const { position } = annotationPosition;\r\n const style = {\r\n marker: {\r\n ...getMarkerPosition({ markerRef, position, id, zoom, leftSideView }),\r\n },\r\n callout: {\r\n ...getCalloutPosition({\r\n calloutRef,\r\n position,\r\n id,\r\n zoom,\r\n leftSideView,\r\n }),\r\n },\r\n };\r\n\r\n const sectionsCache = leftSideView\r\n ? leftCache.get(sectionId)\r\n : cache.get(sectionId);\r\n\r\n sectionsCache.isLoaded && setAnnotationStyle(style);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n parentLeftPosition,\r\n parentTopPosition,\r\n parentRightPosition,\r\n sectionId,\r\n leftSideView,\r\n cache,\r\n leftCache,\r\n contentViewMode,\r\n elementSize,\r\n annotationPosition.position,\r\n elementData,\r\n zoom.zoomRatio,\r\n screenSize,\r\n isShowCallout,\r\n annotationDisplayFilter.showAll,\r\n annotationDisplayFilter.workpaper,\r\n annotationDisplayFilter.tickmarks,\r\n annotationDisplayFilter.internalRef,\r\n annotationDisplayFilter.formula,\r\n annotationDisplayFilter.comfortLetter,\r\n markerRef,\r\n calloutRef,\r\n tableControlsChanged,\r\n numberOfSourceElementSelected,\r\n numberOfTargetElementSelected,\r\n ]);\r\n\r\n return (\r\n <>\r\n {isShowCallout && elementData.callout && (\r\n onAnnotationClick(false)}\r\n id={`${id}-${displayElementDetailsOnStatementPage}`}\r\n >\r\n
{children}
\r\n
\r\n )}\r\n {elementData.marker && (\r\n isShowCallout && onAnnotationClick(true)}\r\n >\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default TieoutElementCallouts;\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { memo, useMemo, useCallback, useRef, useState } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n STATEMENT_ELEMENT_ID_PREFIX,\r\n STATEMENT_LEFT_ELEMENT_ID_PREFIX,\r\n getElementHightlightState,\r\n} from 'constants/feature/statement-content-constants';\r\n\r\nimport { initElementPanel } from 'store/actions/element-panel-actions';\r\nimport {\r\n addElementFormulaRow,\r\n setSelectedRowAction,\r\n} from 'store/actions/formula-actions';\r\nimport { addElementToInternalReference } from 'store/actions/internal-reference-actions';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport {\r\n ANNOTATION_DISPLAY_FUNCTIONS,\r\n hoverCopyFormulaDisabledTooltip,\r\n} from 'constants/feature/tieout-element-constants';\r\nimport { clickElementInContentWhileBatch } from 'store/actions/batch-panel-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { clearContentHighlightSelector } from 'store/actions/statement-content-actions';\r\nimport { addElementForCopyFormula } from 'store/actions/copy-formula-actions';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { deselectElementContentPanel } from 'store/actions/statement-content-actions';\r\nimport { removeElementFromBatchSelection } from 'store/actions/copy-formula-actions';\r\nimport FeatureFlagComponent from 'components/common/feature-flag-component';\r\nimport { FEATURE_NAMES } from '../../../constants/feature-flag-constants';\r\nimport {\r\n getShowCalloutValue,\r\n getElementHighlightStatus,\r\n hasAnnotations,\r\n isElementReportPreviewPage,\r\n} from 'utils/ocr-annotation-utils';\r\nimport { useDispatch } from 'react-redux';\r\nimport { updateSideBySideElementCacheByCallouts } from 'store/actions/statement-content-annotation-creation-actions';\r\nimport PreviewReportSelectedableElement from './tieout-element-html/_preview-report-selectedable-element-component';\r\nimport TieoutElementCallouts from 'components/feature/statement-content-panel/tieout-element-callouts';\r\nimport { SelectedableElement as AnnotationDisplay } from 'components/feature/statement-content-panel/tieout-callout-element-component-ocr';\r\nimport useHoverEffect from 'components/hooks/useHoverEffects';\r\n\r\nexport const ELEMENT_BLOCK = 'tieout-element';\r\nexport const COMFORT_ASSIGN_ELEMENT = 'comfort-assign-element';\r\nexport const SIDE_BY_SIDE_VIEW_SELECTED_ELEMENT =\r\n 'selected-element-for-side-by-side-view';\r\nexport const TIEOUT_ELEMENT_LEFT = 'tieout-element-left';\r\n\r\nconst ANNOTATION_ICON_SIZE = '10px';\r\nexport const CALLOUT_MAX_WIDTH = '120px';\r\n\r\n/* LOCAL THUNKS */\r\n/**\r\n * Handles what happens when an element is clicked in the content panel\r\n * different modes will dictate what happens when an element is clicked\r\n * @param {int} param.elementId\r\n * @param {int} param.sectionId\r\n */\r\nexport const onElementClick =\r\n ({ elementId, sectionId, color, isClickedFromPanel, isDisabled }) =>\r\n async (dispatch, getStore) => {\r\n const { modes } = getStore().ui.statementPage;\r\n const { copyFormulaSelectedElement } = getStore().data.copyFormula;\r\n const { selectMode } = modes;\r\n switch (selectMode) {\r\n case ELEMENT_SELECT_MODES.BATCH_WITH_BANNER:\r\n case ELEMENT_SELECT_MODES.BATCH: {\r\n dispatch(clickElementInContentWhileBatch({ elementId, sectionId }));\r\n break;\r\n }\r\n case ELEMENT_SELECT_MODES.RANGE: {\r\n break;\r\n }\r\n case ELEMENT_SELECT_MODES.INTERNAL_REFERENCE: {\r\n dispatch(\r\n addElementToInternalReference({\r\n targetElementId: elementId,\r\n isFromSuggestion: false,\r\n }),\r\n );\r\n break;\r\n }\r\n case ELEMENT_SELECT_MODES.FORMULA: {\r\n await dispatch(\r\n addElementFormulaRow({\r\n elementId,\r\n sectionId,\r\n }),\r\n );\r\n //if an element for a formula is already selected, set the selected row as null\r\n dispatch(setSelectedRowAction(null));\r\n break;\r\n }\r\n case ELEMENT_SELECT_MODES.COPY_FORMULA: {\r\n if (!isDisabled) {\r\n if (\r\n copyFormulaSelectedElement.selectedElementIds.some(\r\n // eslint-disable-next-line eqeqeq\r\n (eleId) => eleId == elementId,\r\n )\r\n ) {\r\n dispatch(removeElementFromBatchSelection({ elementId }));\r\n dispatch(deselectElementContentPanel({ elementId }));\r\n } else {\r\n dispatch(\r\n addElementForCopyFormula({\r\n elementId,\r\n }),\r\n );\r\n }\r\n }\r\n break;\r\n }\r\n\r\n default: {\r\n if (!isClickedFromPanel) {\r\n await dispatch(clearContentHighlightSelector());\r\n }\r\n await dispatch(initElementPanel({ elementId, color }));\r\n }\r\n }\r\n };\r\n\r\n/* COMPONENT */\r\nexport const TieoutElement = ({\r\n id,\r\n sectionId,\r\n name,\r\n children,\r\n isSideBySideViewDisabled,\r\n elementDataparts,\r\n elementData,\r\n handleElementClick,\r\n handleAnnotationClick,\r\n isCursorAlias,\r\n isElementSelectedForSideBySideMap,\r\n getCountForSelectedElementForSideBySideMapping,\r\n selectedElementsMap,\r\n displayElementDetailsOnStatementPage,\r\n zoom,\r\n leftSideView,\r\n numberOfSourceElementSelected,\r\n numberOfTargetElementSelected,\r\n elementPanelElementId,\r\n annotationDisplayFilter,\r\n isCftEnabled,\r\n annotationPosition,\r\n rightPanelState,\r\n highlightedElementId,\r\n isElementSelected,\r\n elementHighlightState,\r\n isPartOfTableMatrix,\r\n isSideBySideView,\r\n}) => {\r\n let elementId = useMemo(\r\n () => id.substring(STATEMENT_ELEMENT_ID_PREFIX.length),\r\n [id],\r\n );\r\n const customElementId = useMemo(\r\n () => elementId && !!elementId.split('_').length && elementId.split('_')[0],\r\n [elementId],\r\n );\r\n const hideAnnotations = useMemo(\r\n () => ({ flag: false, annotations: false }),\r\n [],\r\n );\r\n\r\n const TIEOUT_ELEMENT_CLASS = useMemo(\r\n () => (leftSideView ? TIEOUT_ELEMENT_LEFT : ELEMENT_BLOCK),\r\n [leftSideView],\r\n );\r\n\r\n const isHighlighted = useMemo(\r\n () => highlightedElementId === elementId,\r\n [highlightedElementId, elementId],\r\n );\r\n\r\n const { position } = annotationPosition;\r\n\r\n if (elementId && elementId.indexOf('_') >= 0) {\r\n const elementIdWithDatapart = elementId;\r\n elementId = elementId.substr(0, elementId.indexOf('_'));\r\n if (elementDataparts.elements && elementId in elementDataparts.elements) {\r\n const datapartId = elementIdWithDatapart.substr(\r\n elementIdWithDatapart.indexOf('_') + 1,\r\n elementIdWithDatapart.length,\r\n );\r\n\r\n if (!isNullOrUndefined(datapartId)) {\r\n if (parseInt(datapartId) !== 0) {\r\n hideAnnotations.flag = true;\r\n }\r\n\r\n switch (position) {\r\n case 'left':\r\n case 'top':\r\n if (parseInt(datapartId) !== 0) {\r\n hideAnnotations.annotations = true;\r\n }\r\n break;\r\n case 'right':\r\n case 'bottom':\r\n if (datapartId !== elementDataparts.elements[elementId]) {\r\n hideAnnotations.annotations = true;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const handleClick = useCallback(\r\n (event) => {\r\n if (event) {\r\n event.stopPropagation();\r\n }\r\n handleElementClick({\r\n elementId,\r\n sectionId,\r\n isDisabled: !isPartOfTableMatrix,\r\n });\r\n },\r\n [elementId, sectionId],\r\n );\r\n\r\n const handleOnAnnotationClick = useCallback(\r\n (showCallout) => {\r\n handleAnnotationClick({\r\n elementId,\r\n showCallout,\r\n });\r\n },\r\n [elementId],\r\n );\r\n\r\n return isElementReportPreviewPage(window.location.pathname) ? (\r\n \r\n ) : (\r\n \r\n {children}\r\n \r\n );\r\n};\r\n\r\nconst _getSelectedModifierClass = ({\r\n selected,\r\n panel,\r\n elementPanelElementId,\r\n elementId,\r\n elementHighlightState,\r\n TIEOUT_ELEMENT_CLASS,\r\n}) =>\r\n selected\r\n ? `${TIEOUT_ELEMENT_CLASS}--selected--${getElementHightlightState(\r\n panel,\r\n elementPanelElementId,\r\n elementId,\r\n )} ${TIEOUT_ELEMENT_CLASS}--selected--${elementHighlightState}`\r\n : null;\r\n\r\nconst SelectedableElement = ({\r\n id,\r\n name,\r\n selected,\r\n elementHighlightState,\r\n onClick,\r\n elementData,\r\n elementId,\r\n sectionId,\r\n children,\r\n panel,\r\n elementPanelElementId,\r\n isHighlighted,\r\n hideAnnotations,\r\n href,\r\n isDisabled,\r\n isSideBySideViewDisabled,\r\n tooltip,\r\n annotationDisplayFilter,\r\n annotationPosition,\r\n isElementSelectedForSideBySideMap,\r\n getCountForSelectedElementForSideBySideMapping,\r\n isCursorAlias,\r\n isCftEnabled,\r\n isElementSelected,\r\n displayElementDetailsOnStatementPage,\r\n onAnnotationClick,\r\n zoom,\r\n leftSideView,\r\n customElementId,\r\n TIEOUT_ELEMENT_CLASS,\r\n numberOfSourceElementSelected,\r\n numberOfTargetElementSelected,\r\n selectedElementsMap,\r\n isSideBySideView,\r\n}) => {\r\n const [isShowCallout, setShowCalloutVal] = useState(false);\r\n const dispatch = useDispatch();\r\n const elementRef = useRef(null);\r\n const { isReviewed, isVerified, isUnverified } = getElementHighlightStatus({\r\n elementDetails: elementData,\r\n isElementSelected,\r\n });\r\n\r\n const _isElementSelectedForSideBySideMap =\r\n isElementSelectedForSideBySideMap(elementId);\r\n const _countForSelectedElementForSideBySideMapping =\r\n getCountForSelectedElementForSideBySideMapping(elementId);\r\n\r\n const getElementStatusColor = useCallback(() => {\r\n if (isNullOrUndefined(_countForSelectedElementForSideBySideMapping)) {\r\n return isReviewed\r\n ? `${TIEOUT_ELEMENT_CLASS}--reviewed`\r\n : isVerified\r\n ? `${TIEOUT_ELEMENT_CLASS}--verified`\r\n : isUnverified && `${TIEOUT_ELEMENT_CLASS}--unverified`;\r\n }\r\n }, [\r\n isReviewed,\r\n isVerified,\r\n isUnverified,\r\n _countForSelectedElementForSideBySideMapping,\r\n TIEOUT_ELEMENT_CLASS,\r\n ]);\r\n\r\n const handleIndicatorOnHover = useCallback(\r\n (elementId, showCallout) => {\r\n const { marker = false, callout = false } = elementData || {};\r\n if (!annotationDisplayFilter.showAll) {\r\n isShowCallout &&\r\n (marker || callout) &&\r\n dispatch(\r\n updateSideBySideElementCacheByCallouts({\r\n elementIds: [elementId],\r\n showCallout: showCallout,\r\n isLeftSideView: leftSideView,\r\n }),\r\n );\r\n }\r\n },\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [\r\n annotationDisplayFilter.showAll,\r\n isShowCallout,\r\n leftSideView,\r\n annotationPosition.position,\r\n ],\r\n );\r\n\r\n const { handleMouseEnter, handleMouseLeave } = useHoverEffect(\r\n `${TIEOUT_ELEMENT_CLASS}`,\r\n customElementId,\r\n );\r\n\r\n const TIEOUT_ELEMENT_ID_PREFIX = leftSideView\r\n ? `${STATEMENT_LEFT_ELEMENT_ID_PREFIX}${elementId}`\r\n : id;\r\n\r\n const renderSelectedableElement = () => {\r\n return (\r\n <>\r\n {\r\n onClick();\r\n }}\r\n onMouseEnter={(e) => {\r\n e.stopPropagation();\r\n handleIndicatorOnHover(elementId, true);\r\n handleMouseEnter();\r\n }}\r\n onMouseLeave={(e) => {\r\n e.stopPropagation();\r\n if (!annotationDisplayFilter.expandAllElements || !selected) {\r\n handleIndicatorOnHover(elementId, false);\r\n }\r\n handleMouseLeave();\r\n }}\r\n data-element-id={elementId}\r\n data-section-id={sectionId}\r\n href={href}\r\n >\r\n {displayElementDetailsOnStatementPage &&\r\n !hideAnnotations.flag &&\r\n annotationDisplayFilter.flag\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.flagged({\r\n elementDetails: elementData,\r\n iconSize: ANNOTATION_ICON_SIZE,\r\n BLOCK: `${TIEOUT_ELEMENT_CLASS}--flag`,\r\n })\r\n : null}\r\n \r\n {children}\r\n \r\n }\r\n >\r\n {\r\n handleMouseEnter();\r\n }}\r\n onMouseLeave={(e) => {\r\n handleMouseLeave();\r\n }}\r\n >\r\n {children}\r\n \r\n \r\n {displayElementDetailsOnStatementPage &&\r\n !isNullOrUndefined(\r\n _countForSelectedElementForSideBySideMapping,\r\n ) && (\r\n \r\n {_countForSelectedElementForSideBySideMapping}\r\n \r\n )}\r\n \r\n\r\n {displayElementDetailsOnStatementPage &&\r\n !hideAnnotations.annotations &&\r\n elementData &&\r\n hasAnnotations(elementData, isCftEnabled) && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n return tooltip ? (\r\n \r\n {renderSelectedableElement()}\r\n \r\n ) : (\r\n renderSelectedableElement()\r\n );\r\n};\r\n\r\nconst MemoizedSelectedableComponent = React.memo(SelectedableElement);\r\n\r\nTieoutElement.propTypes = {\r\n /** unique id for this element (should be CFTO_ELEMENT_XXXXXXX) */\r\n id: PropTypes.string.isRequired,\r\n /** name attribute for element, NOTE: probably can be filtered/deleted if we decide we don't need it */\r\n name: PropTypes.string,\r\n /** Link attribute */\r\n href: PropTypes.string,\r\n /** this function is used mediator to have handle API call triggering in side by side view */\r\n handleElementClick: PropTypes.func,\r\n /** object of statmentContent.elementDataParts or leftStatmentContent.leftElementDataParts will be used based on the left or right statements in SideBySide View */\r\n elementDataparts: PropTypes.object,\r\n /** object of statmentContent.elementCache or leftStatmentContent.leftElementCache will be used based on the left or right statements in SideBySide View */\r\n elementData: PropTypes.func,\r\n /** boolean value used to handle the pointer for left statement in SideBySide View */\r\n isCursorAlias: PropTypes.bool,\r\n /**A function which tells us, if an element is part of side by side view mapping */\r\n isElementSelectedForSideBySideMap: PropTypes.func,\r\n /**It gives us info about the sequence number of mapped element. For example, an element is nth mapping in the sequence */\r\n getCountForSelectedElementForSideBySideMapping: PropTypes.func,\r\n /** A function to help us decide if a particular element in source or target statement (when in side by side view mode) should be disabled or enabled*/\r\n isSideBySideViewDisabled: PropTypes.func,\r\n};\r\n\r\nexport default memo(TieoutElement);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Symbols\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"Message-/-Inline-/-Warning\",\n transform: \"translate(-16.000000, -16.000000)\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Illustrative-/-Exclamation-Mark\",\n transform: \"translate(16.000000, 16.000000)\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 24,\n height: 24\n}), React.createElement(\"g\", {\n id: \"exclamation-mark\",\n strokeWidth: 1,\n fillRule: \"evenodd\",\n fill: \"#FFCD00\"\n}, React.createElement(\"path\", {\n d: \"M11.9731677,16.4990311 C11.1518012,16.4990311 10.4839752,17.1652174 10.4839752,17.9865839 C10.4839752,18.8079503 11.1518012,19.4744348 11.9731677,19.4744348 C12.7930435,19.4744348 13.4608696,18.8079503 13.4608696,17.9865839 C13.4608696,17.1652174 12.7930435,16.4990311 11.9731677,16.4990311 Z M11.9731677,0.126708075 C5.39776398,0.126708075 0.0670807453,5.4573913 0.0670807453,12.032795 C0.0670807453,18.6096894 5.39776398,23.9403727 11.9731677,23.9403727 C18.5485714,23.9403727 23.8792547,18.6096894 23.8792547,12.032795 C23.8792547,5.4573913 18.5485714,0.126708075 11.9731677,0.126708075 Z M11.9731677,1.11965217 C17.9910559,1.11965217 22.8864596,6.01490683 22.8864596,12.032795 C22.8864596,18.0506832 17.9910559,22.9475776 11.9731677,22.9475776 C5.9552795,22.9475776 1.05838509,18.0506832 1.05838509,12.032795 C1.05838509,6.01490683 5.9552795,1.11965217 11.9731677,1.11965217 Z M11.9731677,18.4829814 C11.698882,18.4829814 11.4767702,18.2608696 11.4767702,17.9865839 C11.4767702,17.7122981 11.698882,17.4901863 11.9731677,17.4901863 C12.2459627,17.4901863 12.4695652,17.7122981 12.4695652,17.9865839 C12.4695652,18.2608696 12.2459627,18.4829814 11.9731677,18.4829814 Z M10.9803727,15.506087 L11.0057143,15.506087 L12.9406211,15.506087 L12.964472,15.506087 L12.9659627,15.506087 C13.228323,15.506087 13.4474534,15.3003727 13.4608696,15.0350311 L13.9557764,5.11304348 C13.9706832,4.83875776 13.7590062,4.60621118 13.4862112,4.59279503 L13.4608696,4.59279503 L10.4839752,4.59279503 L10.4601242,4.59279503 C10.1858385,4.60621118 9.97565217,4.83875776 9.98906832,5.11304348 L10.4854658,15.0350311 C10.498882,15.3003727 10.7180124,15.506087 10.9803727,15.506087 Z M12.9391304,5.58409938 L12.4934161,14.5132919 L11.4529193,14.5132919 L11.0057143,5.58409938 L12.9391304,5.58409938 Z\",\n id: \"icon_721\"\n})))));\n\nvar SvgWarning = function SvgWarning(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"24px\",\n height: \"24px\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgWarning, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/warning.6726ab20.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"path\", {\n d: \"M0 0h28v28H0z\"\n}), React.createElement(\"path\", {\n fill: \"#00a3e0\",\n className: \"icon-path chevron\",\n d: \"M6.418 9.918L14 17.5l7.582-7.582a.777.777 0 0 1 .585-.248c.236 0 .417.08.585.248a.814.814 0 0 1 0 1.17l-8.167 8.167a.814.814 0 0 1-1.17 0l-8.167-8.167a.814.814 0 0 1 0-1.17.814.814 0 0 1 1.17 0z\"\n}));\n\nvar SvgArrowSimpleThickDown = function SvgArrowSimpleThickDown(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"#00a3e0\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgArrowSimpleThickDown, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/arrow-simple-thick-down.286ca888.svg\";\nexport { ForwardRef as ReactComponent };","import { isArray } from 'lodash';\r\nimport set from 'lodash/set';\r\n\r\nexport const collateCurrentUserDetail = (apiResponses) => {\r\n // User having Admin access in any of the region should be treated as admin.\r\n const hasAdminAccess =\r\n isArray(apiResponses) &&\r\n apiResponses.some(\r\n (res) =>\r\n res &&\r\n res.data &&\r\n res.data.result &&\r\n (res.data.result.countryManager === true ||\r\n res.data.result.admin === true),\r\n );\r\n\r\n // User having COE access in any of the region should be treated as COE.\r\n const hasCoeAccess =\r\n isArray(apiResponses) &&\r\n apiResponses.some(\r\n (res) =>\r\n res && res.data && res.data.result && res.data.result.coe === true,\r\n );\r\n\r\n // User having application manager access in any of the region should be treated as application manager.\r\n const hasApplicationManagerAccess =\r\n isArray(apiResponses) &&\r\n apiResponses.some(\r\n (res) =>\r\n res &&\r\n res.data &&\r\n res.data.result &&\r\n res.data.result.applicationManager === true,\r\n );\r\n\r\n const isEnabled =\r\n isArray(apiResponses) &&\r\n apiResponses.some(\r\n (res) =>\r\n res && res.data && res.data.result && res.data.result.enabled === true,\r\n );\r\n\r\n const isActive =\r\n isArray(apiResponses) &&\r\n apiResponses.some(\r\n (res) =>\r\n res && res.data && res.data.result && res.data.result.active === true,\r\n );\r\n\r\n const isPpmd =\r\n isArray(apiResponses) &&\r\n apiResponses.some(\r\n (res) =>\r\n res && res.data && res.data.result && res.data.result.isPpmd === true,\r\n );\r\n\r\n const collatedResponse = apiResponses[0];\r\n const projectToGeoMap = new Map();\r\n\r\n if (Array.isArray(apiResponses)) {\r\n apiResponses.forEach(({ data }) => {\r\n if (data) {\r\n const { result: { userRoles, geoCode } = {} } = data;\r\n const projectIdWithRoleEntries = Object.entries(userRoles);\r\n\r\n projectIdWithRoleEntries.forEach((entry) => {\r\n const [projectId, role] = entry;\r\n if (!projectToGeoMap.has(`${projectId}-${geoCode}`)) {\r\n projectToGeoMap.set(`${projectId}-${geoCode}`, { geoCode, role });\r\n }\r\n });\r\n }\r\n });\r\n set(collatedResponse, 'data.result.projectToGeoMap', projectToGeoMap);\r\n // set project to geo map in session\r\n sessionStorage.setItem('projectToGeoMap', JSON.stringify(projectToGeoMap));\r\n // set admin access prop\r\n set(collatedResponse, 'data.result.admin', hasAdminAccess);\r\n // set coe access prop\r\n set(collatedResponse, 'data.result.coe', hasCoeAccess);\r\n //set applicationManager access prop\r\n set(\r\n collatedResponse,\r\n 'data.result.applicationManager',\r\n hasApplicationManagerAccess,\r\n );\r\n set(collatedResponse, 'data.result.active', isActive);\r\n set(collatedResponse, 'data.result.enabled', isEnabled);\r\n set(collatedResponse, 'data.result.isPpmd', isPpmd);\r\n\r\n delete collatedResponse.data.result.userRoles;\r\n }\r\n return { response: { result: collatedResponse.data.result } };\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport get from 'lodash/get';\r\nimport set from 'lodash/set';\r\n\r\nimport { getCurrentUserRequest } from 'api/current-user-api';\r\nimport { collateCurrentUserDetail } from 'utils/current-user-utils';\r\nimport { getUserIDFromEmail, setDataLayer } from 'utils/adobe-analytics-utils';\r\nimport { postCurrentUserPreferencesRequest } from 'api/current-user-api';\r\nimport moment from 'moment-timezone';\r\nimport { fetchAndUpdateAllCountriesList } from 'utils/project-utils';\r\nimport { fetchFeatureInfoForAllGeos } from 'store/actions/feature-info-actions';\r\nimport { getStatementWorkflowStepsRequest } from './statement-workflows-steps-actions';\r\n\r\nexport const currentUserLoading = createAction('CURRENT_USER_LOADING');\r\nexport const currentUserError = createAction('CURRENT_USER_ERROR');\r\nexport const currentUserLoaded = createAction('CURRENT_USER_LOADED');\r\n\r\nexport const fetchCurrentUser =\r\n (callbackBeforeLoaded) => async (dispatch, getState) => {\r\n dispatch(currentUserLoading());\r\n try {\r\n const responses = await getCurrentUserRequest();\r\n const response = collateCurrentUserDetail(responses);\r\n\r\n if (!(response && response.result && response.result.zoneId)) {\r\n const zoneId = moment.tz.guess();\r\n const timeZoneResponse = await postCurrentUserPreferencesRequest(\r\n get(response, 'response.result.id', ''),\r\n zoneId,\r\n );\r\n set(response, 'response.result.zoneId', timeZoneResponse.data.zoneId);\r\n }\r\n callbackBeforeLoaded && callbackBeforeLoaded();\r\n await dispatch(currentUserLoaded(response));\r\n dispatch(fetchFeatureInfoForAllGeos());\r\n const userEmail = get(response, 'response.result.email', '');\r\n const userID = userEmail.includes('@deloitte')\r\n ? getUserIDFromEmail(userEmail)\r\n : '';\r\n setDataLayer({ pageInfo: { userID } });\r\n dispatch(fetchAndUpdateAllCountriesList());\r\n dispatch(getStatementWorkflowStepsRequest());\r\n //setup WalkMe context\r\n window.WM_CTX = window.WM_CTX || {};\r\n window.WM_CTX.userId = get(response, 'response.result.id', '');\r\n } catch (error) {\r\n dispatch(currentUserError(error));\r\n }\r\n };\r\n\r\nexport const getHomeGeo = () => (dispatch, getState) => {\r\n const { currentUser = {} } = getState().data || {};\r\n return currentUser.data && currentUser.data.geoCode;\r\n};\r\n","import React from 'react';\r\nimport { toast } from 'react-toastify';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Success } from 'icons/success.svg';\r\nimport { ReactComponent as Warning } from 'icons/warning.svg';\r\nimport {\r\n replaceLeftSelectedElementWithoutRemovingOld,\r\n mapElementsSuccessResult,\r\n replaceSelectedElementWithoutRemovingOld,\r\n} from 'store/actions/statement-content-actions';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { clearSideBySideElementsMap } from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport {\r\n STATEMENT_CONTENT_PANEL_ZOOM_BLOCK,\r\n STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK,\r\n} from './statement-content-constants';\r\n\r\nexport const ANNOTATION_MAP_ACTION_BLOCK = 'annotation-map-action';\r\nconst BANNER_ICON_SIZE = '10';\r\n\r\nexport const getExcessiveElementSelectionNotification = (elementLimit) => {\r\n return toast.error(\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
,\r\n { autoClose: 15000 },\r\n );\r\n};\r\n\r\n// this function is used to segregate the source and current(target) elements from array of objects based on elementUpdateStatus property to identify success and failed mapped elements\r\nexport const seggregateSourceTargetElements = (elementsMapped) => {\r\n let successSourceElements = [];\r\n let failedSourceElements = [];\r\n let successTargetElements = [];\r\n let failedTargetElements = [];\r\n for (let i = 0; i < elementsMapped.length; i++) {\r\n if (elementsMapped[i].elementUpdateStatus) {\r\n successSourceElements.push(elementsMapped[i].sourceElementId);\r\n successTargetElements.push(elementsMapped[i].targetElementId);\r\n } else {\r\n failedSourceElements.push(elementsMapped[i].sourceElementId);\r\n failedTargetElements.push(elementsMapped[i].targetElementId);\r\n }\r\n }\r\n return {\r\n successSourceElements,\r\n failedSourceElements,\r\n successTargetElements,\r\n failedTargetElements,\r\n };\r\n};\r\n\r\n//common function used to seggregate source and current(target) elements based on the response from element map request in side by side view page.\r\nexport const highlightMappedElementsByResponse =\r\n ({ result, sourceElements, targetElements }) =>\r\n async (dispatch, getState) => {\r\n dispatch(\r\n replaceLeftSelectedElementWithoutRemovingOld({\r\n elementIds: sourceElements,\r\n color:\r\n result === mapElementsSuccessResult\r\n ? ELEMENT_HIGHLIGHT_STATES.ELEMENT_MAP_SUCCESS\r\n : ELEMENT_HIGHLIGHT_STATES.ELEMENT_MAP_FAILURE,\r\n }),\r\n );\r\n dispatch(\r\n replaceSelectedElementWithoutRemovingOld({\r\n elementIds: targetElements,\r\n color:\r\n result === mapElementsSuccessResult\r\n ? ELEMENT_HIGHLIGHT_STATES.ELEMENT_MAP_SUCCESS\r\n : ELEMENT_HIGHLIGHT_STATES.ELEMENT_MAP_FAILURE,\r\n }),\r\n );\r\n };\r\n\r\nexport const handleElementMappingFailure =\r\n (mapElementsFailureResult, sourceElements, targetElements) =>\r\n async (dispatch, getState) => {\r\n //if element mapping request failed it triggers below code\r\n dispatch(\r\n highlightMappedElementsByResponse({\r\n result: mapElementsFailureResult,\r\n sourceElements,\r\n targetElements,\r\n }),\r\n );\r\n dispatch(clearSideBySideElementsMap());\r\n // failed mapped elements notification\r\n failureElementMapNotification({ targetElements });\r\n };\r\n\r\n//successful notification for element(s) mapped\r\nexport const successElementMapNotification = ({ targetElements }) => {\r\n return toast.success(\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 id=\"element-panel.annotation.content.element-map-sucess-summary\"\r\n />\r\n
,\r\n { autoClose: 15000 },\r\n );\r\n};\r\n\r\n//failure notification for element(s) mapped\r\nexport const failureElementMapNotification = ({ targetElements }) => {\r\n return toast.error(\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 id=\"element-panel.annotation.content.element-map-fail-summary\"\r\n />\r\n
,\r\n { autoClose: 15000 },\r\n );\r\n};\r\n\r\nexport const getCalloutPosition = ({\r\n position,\r\n calloutRef,\r\n id,\r\n zoom,\r\n leftSideView,\r\n}) => {\r\n const zoomPercentageSubtractionLR = 10;\r\n const zoomPercentageSubtractionTB = 8;\r\n const bodyPadding = 5;\r\n let calloutPosition = position;\r\n\r\n const calloutBoundingInfo =\r\n (calloutRef &&\r\n calloutRef.current &&\r\n calloutRef.current.getBoundingClientRect()) ||\r\n {};\r\n const { height: calloutHeight, width: calloutWidth } = calloutBoundingInfo;\r\n\r\n const div = calloutRef && calloutRef.current;\r\n const afterStyles = div && window.getComputedStyle(div, '::after');\r\n const afterContentWidth =\r\n afterStyles &&\r\n afterStyles.getPropertyValue('width') &&\r\n parseInt(afterStyles.getPropertyValue('width').split('p')[0]);\r\n\r\n const documentId = leftSideView\r\n ? STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK\r\n : STATEMENT_CONTENT_PANEL_ZOOM_BLOCK;\r\n const parentElement = document && document.getElementById(documentId);\r\n\r\n const {\r\n left: parentLeftPosition,\r\n top: parentTopPosition,\r\n right: parentRightPosition,\r\n } = parentElement ? parentElement.getBoundingClientRect() : {};\r\n\r\n const tieoutElement = document.getElementById(id);\r\n const { right, top, height, left, width } = tieoutElement\r\n ? tieoutElement.getBoundingClientRect()\r\n : {};\r\n const elementCenter = height / 2;\r\n const calloutCenter = calloutHeight / 2;\r\n\r\n let value;\r\n if (position === 'left')\r\n value = left - parentLeftPosition - calloutWidth + bodyPadding;\r\n if (position === 'right')\r\n value = parentRightPosition - right - calloutWidth + bodyPadding;\r\n let callout = {};\r\n\r\n if (position === 'left' && value < 0) {\r\n calloutPosition = 'right';\r\n }\r\n if (position === 'right' && value < 0) {\r\n calloutPosition = 'left';\r\n }\r\n\r\n const customWidth = (width - calloutWidth) / 2;\r\n\r\n switch (calloutPosition) {\r\n case 'left':\r\n callout = {\r\n left:\r\n left &&\r\n afterContentWidth &&\r\n `${\r\n (left - parentLeftPosition - calloutWidth + bodyPadding) /\r\n zoom.zoomRatio -\r\n zoomPercentageSubtractionLR * zoom.zoomRatio\r\n }px`,\r\n top:\r\n top &&\r\n `${\r\n (top - parentTopPosition - calloutCenter + elementCenter) /\r\n zoom.zoomRatio\r\n }px`,\r\n };\r\n break;\r\n case 'right':\r\n callout = {\r\n right:\r\n right &&\r\n `${\r\n (parentRightPosition - right - calloutWidth + bodyPadding) /\r\n zoom.zoomRatio -\r\n zoomPercentageSubtractionLR * zoom.zoomRatio\r\n }px`,\r\n top:\r\n top &&\r\n `${\r\n (top - parentTopPosition - calloutCenter + elementCenter) /\r\n zoom.zoomRatio\r\n }px`,\r\n };\r\n break;\r\n case 'top':\r\n callout = {\r\n left:\r\n left &&\r\n `${(left - parentLeftPosition + customWidth) / zoom.zoomRatio}px`,\r\n top: `${\r\n (top - parentTopPosition - calloutHeight + bodyPadding) /\r\n zoom.zoomRatio -\r\n zoomPercentageSubtractionTB * zoom.zoomRatio\r\n }px`,\r\n };\r\n break;\r\n case 'bottom':\r\n callout = {\r\n left:\r\n left &&\r\n `${(left - parentLeftPosition + customWidth) / zoom.zoomRatio}px`,\r\n top: `${\r\n (top - parentTopPosition + height - bodyPadding) / zoom.zoomRatio +\r\n zoomPercentageSubtractionTB * zoom.zoomRatio\r\n }px`,\r\n };\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n return callout;\r\n};\r\n\r\nexport const getMarkerPosition = ({\r\n markerRef,\r\n position,\r\n id,\r\n zoom,\r\n leftSideView,\r\n}) => {\r\n const documentId = leftSideView\r\n ? STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK\r\n : STATEMENT_CONTENT_PANEL_ZOOM_BLOCK;\r\n const parentElement = document && document.getElementById(documentId);\r\n const {\r\n left: parentLeftPosition,\r\n top: parentTopPosition,\r\n right: parentRightPosition,\r\n } = parentElement ? parentElement.getBoundingClientRect() : {};\r\n\r\n const tieoutElement = document.getElementById(id);\r\n\r\n const { right, top, left, width, height } = tieoutElement\r\n ? tieoutElement.getBoundingClientRect()\r\n : {};\r\n\r\n const annotationMarkerInfo =\r\n (markerRef &&\r\n markerRef.current &&\r\n markerRef.current.getBoundingClientRect()) ||\r\n {};\r\n const { width: annotationMarkerElementWidth } = annotationMarkerInfo;\r\n\r\n const elementHorizontalCenter = width / 2;\r\n\r\n const customHeight = (height - annotationMarkerElementWidth) / 2;\r\n\r\n let marker = {};\r\n\r\n switch (position) {\r\n case 'left':\r\n marker = {\r\n left:\r\n left &&\r\n `${\r\n (left - parentLeftPosition - annotationMarkerElementWidth) /\r\n zoom.zoomRatio\r\n }px`,\r\n top:\r\n top &&\r\n `${(top - parentTopPosition + customHeight) / zoom.zoomRatio}px`,\r\n };\r\n break;\r\n case 'right':\r\n marker = {\r\n right:\r\n right &&\r\n `${\r\n (parentRightPosition - right - annotationMarkerElementWidth) /\r\n zoom.zoomRatio\r\n }px`,\r\n top:\r\n top &&\r\n `${(top - parentTopPosition + customHeight) / zoom.zoomRatio}px`,\r\n };\r\n break;\r\n case 'top':\r\n marker = {\r\n left:\r\n left &&\r\n `${\r\n (left -\r\n parentLeftPosition +\r\n elementHorizontalCenter -\r\n annotationMarkerElementWidth / 2) /\r\n zoom.zoomRatio\r\n }px`,\r\n top: `${\r\n (top - parentTopPosition - annotationMarkerElementWidth) /\r\n zoom.zoomRatio\r\n }px`,\r\n };\r\n break;\r\n case 'bottom':\r\n marker = {\r\n left:\r\n left &&\r\n `${\r\n (left -\r\n parentLeftPosition +\r\n elementHorizontalCenter -\r\n annotationMarkerElementWidth / 2) /\r\n zoom.zoomRatio\r\n }px`,\r\n top: `${\r\n (top - parentTopPosition + annotationMarkerElementWidth) /\r\n zoom.zoomRatio\r\n }px`,\r\n };\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n\r\n return marker;\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n STATEMENT_TYPE_ID_MAP,\r\n STATEMENT_TYPE_OPTIONS_MAP,\r\n FISCAL_YEAR_OPTIONS_MAP,\r\n ACCOUNTING_BASIS_OPTIONS_MAP,\r\n REGISTRANT_OPTIONS_MAP,\r\n MAX_STATEMENT_NAME_LENGTH,\r\n QUARTER_OPTIONS_MAP,\r\n SCALING_OPTIONS,\r\n SCALING_OPTIONS_MAP,\r\n UNIT_OPTIONS,\r\n UNIT_OPTIONS_MAP,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport moment from 'moment';\r\n\r\nexport default class StatementForm extends ApiModel({\r\n data: {\r\n id: null,\r\n clientId: null,\r\n statementDisplayId: null,\r\n statementTypeId: null,\r\n languageType: null,\r\n originalStatementTypeId: null,\r\n periodEnding: null,\r\n originalPeriodEnding: null,\r\n fiscalYear: null,\r\n originalFiscalYear: null,\r\n registrant: null,\r\n originalRegistrant: null,\r\n accountingBasis: null,\r\n originalAccountingBasis: null,\r\n quarter: null,\r\n originalQuarter: null,\r\n archiveDate: null,\r\n files: [], //this is an array because a future enhancement is to upload multiple files at once.\r\n statementName: '',\r\n dateformatId: null,\r\n numberFormatId: null,\r\n activeRevisionEntities: [], // this needs to be included for it to work. needs to be removed.\r\n carryForwardStatementIds: {},\r\n carryForwardProject: null,\r\n carryForward: null,\r\n legalHold: 0,\r\n comfortLetter: 0,\r\n autoIdentifyIrs: 0,\r\n defaultScaling: SCALING_OPTIONS[0],\r\n defaultUnit: UNIT_OPTIONS[0],\r\n cfDetails: {\r\n workpapers: false,\r\n tickmarks: false,\r\n formulas: false,\r\n internalreferences: false,\r\n autotieout: false,\r\n comparemetadata: false,\r\n },\r\n },\r\n fileError: false,\r\n status: null,\r\n}) {\r\n get carryForwardDetails() {\r\n return this.data.cfDetails;\r\n }\r\n\r\n get statementName() {\r\n return this.data.statementName;\r\n }\r\n\r\n get dateformatId() {\r\n return this.data.dateformatId;\r\n }\r\n\r\n get numberFormatId() {\r\n return this.data.numberFormatId;\r\n }\r\n\r\n get statementTypeId() {\r\n return this.data.statementTypeId;\r\n }\r\n\r\n get languageType() {\r\n return this.data.languageType;\r\n }\r\n\r\n get periodEnding() {\r\n return this.data.periodEnding;\r\n }\r\n\r\n get fiscalYear() {\r\n return this.data.fiscalYear;\r\n }\r\n\r\n get registrant() {\r\n return this.data.registrant;\r\n }\r\n\r\n get defaultScaling() {\r\n return this.data.defaultScaling;\r\n }\r\n\r\n get defaultUnit() {\r\n return this.data.defaultUnit;\r\n }\r\n\r\n get accountingBasis() {\r\n return this.data.accountingBasis;\r\n }\r\n\r\n get quarter() {\r\n return this.data.quarter;\r\n }\r\n\r\n get archiveDate() {\r\n return this.data.archiveDate;\r\n }\r\n\r\n get files() {\r\n return this.data.files;\r\n }\r\n\r\n get carryForwardStatementIds() {\r\n return this.data.carryForwardStatementIds;\r\n }\r\n\r\n get carryForwardStatementIdsArray() {\r\n return Object.keys(this.data.carryForwardStatementIds);\r\n }\r\n\r\n get activeRevisionEntities() {\r\n return this.data.activeRevisionEntities;\r\n }\r\n\r\n get carryForwardProject() {\r\n return this.data.carryForwardProject;\r\n }\r\n\r\n get carryForward() {\r\n return this.data.carryForward;\r\n }\r\n\r\n get legalHold() {\r\n return this.data.legalHold;\r\n }\r\n\r\n get comfortLetter() {\r\n return this.data.comfortLetter;\r\n }\r\n\r\n get autoIdentifyIrs() {\r\n return this.data.autoIdentifyIrs;\r\n }\r\n\r\n processResponse({ response }) {\r\n const _isValidStatementEntityResponse =\r\n response.data && response.data.id && response.data.statementDisplayEntity;\r\n if (_isValidStatementEntityResponse) {\r\n /**\r\n * Get the display values off the nested display entity.\r\n * We will use these as the presented fields on the model\r\n * and mark the uneditable fields as \"original\" in the event\r\n * that we ever do need them for some reason.\r\n * */\r\n const {\r\n id,\r\n accountingBasis,\r\n fiscalYear,\r\n periodEnding,\r\n quarter,\r\n registrant,\r\n statementTypeId,\r\n } = response.data.statementDisplayEntity;\r\n return {\r\n data: {\r\n ...response.data,\r\n statementDisplayId: id,\r\n statementTypeId: STATEMENT_TYPE_OPTIONS_MAP.get(statementTypeId),\r\n dateformatId: response.data.dateformatId,\r\n numberFormatId: response.data.numberFormatId,\r\n originalStatementTypeId: response.data.statementTypeId,\r\n fiscalYear: FISCAL_YEAR_OPTIONS_MAP.get(fiscalYear.toString()),\r\n languageType: response.data.languageCode,\r\n originalFiscalYear: response.data.fiscalYear,\r\n quarter: QUARTER_OPTIONS_MAP.get(quarter),\r\n originalQuarter: response.data.quarter,\r\n periodEnding: periodEnding ? moment.utc(periodEnding) : null,\r\n originalPeriodEnding: moment.utc(response.data.periodEnding),\r\n accountingBasis: ACCOUNTING_BASIS_OPTIONS_MAP.get(accountingBasis),\r\n originalAccountingBasis: response.data.accountingBasis,\r\n registrant: REGISTRANT_OPTIONS_MAP.get(registrant),\r\n originalRegistrant: response.data.registrant,\r\n legalHold: response.data.legalHold,\r\n comfortLetter: response.data.isCftEnabled,\r\n archiveDate: response.data.archiveDate\r\n ? moment.utc(response.data.archiveDate)\r\n : null,\r\n defaultScaling: SCALING_OPTIONS_MAP.get(response.data.defaultScaling),\r\n defaultUnit: UNIT_OPTIONS_MAP.get(response.data.defaultUnit),\r\n },\r\n status: response.status,\r\n };\r\n }\r\n return {\r\n status: response.status,\r\n };\r\n }\r\n\r\n toCreationApiFormat() {\r\n if (this.data) {\r\n const clientDetails = {\r\n periodEnding: moment(this.data.periodEnding).format(\r\n DATE_FORMATS.YEAR_MONTH_DAY_TIME,\r\n ),\r\n archiveDate: moment(this.data.archiveDate).format(\r\n DATE_FORMATS.YEAR_MONTH_DAY_TIME,\r\n ),\r\n statementName: this.data.statementName,\r\n dateFormatId: this.getDropdownValue(this.data.dateformatId),\r\n numberFormatId: this.getDropdownValue(this.data.numberFormatId),\r\n languageType: this.getDropdownValue(this.data.languageType),\r\n statementTypeId: this.getDropdownValue(this.data.statementTypeId),\r\n quarter: this.getDropdownValue(this.data.quarter) || 0,\r\n fiscalYear: this.getDropdownValue(this.fiscalYear),\r\n accountingBasis: this.getDropdownValue(this.data.accountingBasis),\r\n registrant: this.getDropdownValue(this.data.registrant),\r\n defaultScaling: this.getDropdownValue(this.data.defaultScaling),\r\n defaultUnit: this.getDropdownValue(this.data.defaultUnit),\r\n activeRevisionEntities: [{}], // this needs to be included for it to work. needs to be removed.,\r\n cfDetails: this.data.cfDetails,\r\n legalHold: this.data.legalHold ? 1 : 0,\r\n isCftEnabled: this.data.comfortLetter ? 1 : 0,\r\n autoIdentifyIrs: this.data.autoIdentifyIrs ? 1 : 0,\r\n };\r\n return this._createFormData(this.files, clientDetails);\r\n }\r\n }\r\n\r\n toEditApiFormat() {\r\n /**\r\n * When editing a statement, we are tracking the field changes on two different pojos as follows:\r\n *\r\n * StatementEntity {\r\n * statementName: string,\r\n * archiveDate: Date,\r\n * statementDisplayEntity: {\r\n * fiscalYear: int,\r\n * statementTypeId: int,\r\n * periodEnding: Date,\r\n * registrant: String,\r\n * accountingBasis: String,\r\n * quarter: QuarterEnum,\r\n * },\r\n * }\r\n *\r\n * consequently, only the statement name and the archiveDate are being tracked on the actual statement entity, while\r\n * all other editable fields are being tracked on a nested statement display object. When we receive this data from the back-end\r\n * we are mapping it in a way that it is easiest for us to display the necessary information. When we send it\r\n * back in an edit request, we have to map it back in a way that the back-end can properly update the fields.\r\n * It should also be noted that we are maintaining a reference to the original values on the parent pojo with an\r\n * `original` prefix (e.g. `originalPeriodEnding`), but those are not used for general display purposes, only for reporting and\r\n * admin views.\r\n *\r\n */\r\n if (this.data) {\r\n return {\r\n id: this.data.id,\r\n clientId: parseInt(this.data.clientId),\r\n archiveDate: moment(this.data.archiveDate).format(\r\n DATE_FORMATS.YEAR_MONTH_DAY_TIME,\r\n ), //editable on the statement entity\r\n statementName: this.data.statementName, // editable on the statement entity\r\n accountingBasis: this.data.originalAccountingBasis,\r\n fiscalYear: this.data.originalFiscalYear,\r\n periodEnding: moment(this.data.originalPeriodEnding).format(\r\n DATE_FORMATS.YEAR_MONTH_DAY_TIME,\r\n ),\r\n quarter: this.getDropdownValue(this.data.orignalQuarter) || 0,\r\n registrant: this.data.originalRegistrant,\r\n statementTypeId: this.data.originalStatementTypeId,\r\n legalHold: this.data.legalHold,\r\n isCftEnabled: this.data.comfortLetter,\r\n autoIdentifyIrs: this.data.autoIdentifyIrs,\r\n statementDisplayEntity: {\r\n // All fields in here are editable and used for display purposes to the end-user.\r\n // Not tracked for reporting or on the original statement entity pojo however.\r\n accountingBasis: this.getDropdownValue(this.data.accountingBasis),\r\n fiscalYear: this.getDropdownValue(this.data.fiscalYear),\r\n id: this.data.statementDisplayId,\r\n periodEnding: moment(this.data.periodEnding).format(\r\n DATE_FORMATS.YEAR_MONTH_DAY_TIME,\r\n ),\r\n quarter: this.getDropdownValue(this.data.quarter) || 0,\r\n registrant: this.getDropdownValue(this.data.registrant),\r\n statementId: this.getDropdownValue(this.data.id),\r\n statementTypeId: this.getDropdownValue(this.data.statementTypeId),\r\n languageType: this.getDropdownValue(this.data.languageType),\r\n dateformatId: this.getDropdownValue(this.data.dateformatId),\r\n numberFormatId: this.getDropdownValue(this.data.numberFormatId),\r\n defaultScaling: this.getDropdownValue(this.data.defaultScaling),\r\n defaultUnit: this.getDropdownValue(this.data.defaultUnit),\r\n },\r\n };\r\n }\r\n }\r\n\r\n revisionToApiFormat(statement) {\r\n let fiscalYear;\r\n if (statement) {\r\n fiscalYear = moment(statement.fiscalYear);\r\n const clientDetails = {\r\n periodEnding: moment(statement.periodEnding).format(\r\n DATE_FORMATS.YEAR_MONTH_DAY_TIME,\r\n ),\r\n archiveDate: moment(statement.archiveDate).format(\r\n DATE_FORMATS.YEAR_MONTH_DAY_TIME,\r\n ),\r\n statementName: statement.statementName,\r\n statementTypeId: statement.statementTypeId,\r\n languageType: statement.languageType,\r\n dateFormatId: statement.dateformatId,\r\n numberFormatId: statement.numberFormatId,\r\n quarter: statement.quarter,\r\n fiscalYear: moment(fiscalYear).format(DATE_FORMATS.YEAR),\r\n accountingBasis: statement.accountingBasis,\r\n registrant: statement.registrant,\r\n activeRevisionEntities: [{}], // this needs to be included for it to work. needs to be removed.\r\n legalHold: statement.legalHold ? 1 : 0,\r\n comfortLetter: statement.comfortLetter ? 1 : 0,\r\n autoIdentifyIrs: statement.autoIdentifyIrs ? 1 : 0,\r\n };\r\n return this._createFormData(this.files, clientDetails);\r\n }\r\n }\r\n\r\n _createFormData(files, clientDetails) {\r\n // the current api end point for statement-creation only accepts form data objects for the whole request\r\n // hence why clientDetails (statement details) are appended to the form data\r\n const formData = new FormData();\r\n formData.append('file', files[0]);\r\n formData.append(\r\n 'clientDetails',\r\n new Blob([JSON.stringify(clientDetails)], {\r\n type: 'application/json',\r\n }),\r\n );\r\n return formData;\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.data.id);\r\n }\r\n\r\n getStatementData() {\r\n if (this.data) {\r\n return this.data;\r\n }\r\n }\r\n\r\n setFileError(files) {\r\n if (files) {\r\n return this.merge({\r\n data: {\r\n ...new this.constructor().data,\r\n files,\r\n statementName: files[0].name.split('.')[0], //removes file extention\r\n },\r\n fileError: true,\r\n });\r\n }\r\n }\r\n\r\n setFile(files) {\r\n if (files) {\r\n return this.merge({\r\n data: {\r\n ...new this.constructor().data,\r\n files,\r\n statementName: files[0].name.split('.')[0], //removes file extention\r\n },\r\n fileError: false,\r\n });\r\n } else {\r\n return this.merge({\r\n data: {\r\n ...new this.constructor().data,\r\n files: [],\r\n statementName: '',\r\n },\r\n fileError: false,\r\n });\r\n }\r\n }\r\n\r\n hasFileError() {\r\n if (this.fileError) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n hasUploadedFiles() {\r\n if (this.data.files.length) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n setStatementName(statementName) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n statementName,\r\n },\r\n });\r\n }\r\n\r\n setDateFormat(dateformatId) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n dateformatId,\r\n },\r\n });\r\n }\r\n\r\n setNumberFormat(numberFormatId) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n numberFormatId,\r\n },\r\n });\r\n }\r\n\r\n setStatementType(statementTypeId) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n statementTypeId,\r\n },\r\n });\r\n }\r\n setLanguageType(languageType) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n languageType,\r\n },\r\n });\r\n }\r\n\r\n setQuarter(quarter) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n quarter,\r\n },\r\n });\r\n }\r\n\r\n setFiscalYear(fiscalYear) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n fiscalYear,\r\n },\r\n });\r\n }\r\n setLegalHold(legalHold) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n legalHold,\r\n },\r\n });\r\n }\r\n\r\n setComfortLetter(comfortLetter) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n comfortLetter,\r\n },\r\n });\r\n }\r\n\r\n setAutoIdentifyIrs(autoIdentifyIrs) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n autoIdentifyIrs,\r\n },\r\n });\r\n }\r\n\r\n setPeriodEndingDate(periodEnding) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n periodEnding,\r\n },\r\n });\r\n }\r\n\r\n setAccountingBasis(accountingBasis) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n accountingBasis,\r\n },\r\n });\r\n }\r\n\r\n setRegistrant(registrant) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n registrant,\r\n },\r\n });\r\n }\r\n\r\n setDefaultScaling(defaultScaling) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n defaultScaling,\r\n },\r\n });\r\n }\r\n\r\n setDefaultUnit(defaultUnit) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n defaultUnit,\r\n },\r\n });\r\n }\r\n\r\n setCarryForwardProject(carryForwardProject) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n carryForwardProject,\r\n },\r\n });\r\n }\r\n\r\n setCarryForwardStatementIds(carryForwardStatementIds) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n carryForwardStatementIds,\r\n },\r\n });\r\n }\r\n\r\n setCarryForward(carryForward) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n carryForward,\r\n },\r\n });\r\n }\r\n\r\n setCarryForwardDetails(carryForwardDetails) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n cfDetails: {\r\n ...this.data.cfDetails,\r\n ...carryForwardDetails,\r\n },\r\n },\r\n });\r\n }\r\n setWrapUpDate(wrapUpDate) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n archiveDate: wrapUpDate,\r\n },\r\n });\r\n }\r\n\r\n isQuarterRequired() {\r\n return (\r\n this.data &&\r\n this.data.statementTypeId &&\r\n (this.data.statementTypeId.value === STATEMENT_TYPE_ID_MAP.TEN_Q ||\r\n this.data.statementTypeId.value ===\r\n STATEMENT_TYPE_ID_MAP.PRIVATE_QUARTERLY ||\r\n this.data.statementTypeId.value ===\r\n STATEMENT_TYPE_ID_MAP.GLOBAL_QUARTERLY)\r\n );\r\n }\r\n\r\n doesStatementNameExist() {\r\n return (\r\n this.data && this.data.statementName && this.data.statementName.length > 0\r\n );\r\n }\r\n\r\n isStatementNameValid() {\r\n return (\r\n this.doesStatementNameExist() &&\r\n this.data.statementName.length <= MAX_STATEMENT_NAME_LENGTH\r\n );\r\n }\r\n\r\n isDateFormatIdValid() {\r\n return this.data && !isNullOrUndefined(this.data.dateformatId);\r\n }\r\n\r\n isNumberFormatIdValid() {\r\n return this.data && !isNullOrUndefined(this.data.numberFormatId);\r\n }\r\n\r\n isStatementTypeValid() {\r\n return this.data && !isNullOrUndefined(this.data.statementTypeId);\r\n }\r\n islanguageTypeValid() {\r\n return (\r\n this.data &&\r\n this.data.languageType &&\r\n !isNullOrUndefined(this.data.languageType)\r\n );\r\n }\r\n\r\n isQuarterValid() {\r\n if (this.isQuarterRequired()) {\r\n return !isNullOrUndefined(this.data.quarter);\r\n }\r\n return true;\r\n }\r\n\r\n isPeriodEndingValid() {\r\n // react-dates returns null for dates that are not formatted properly\r\n // so we don't need to do a regex here since invalid typed dates will always just be null\r\n return this.data && !isNullOrUndefined(this.data.periodEnding);\r\n }\r\n\r\n isWrapUpValid() {\r\n // react-dates returns null for dates that are not formatted properly\r\n // so we don't need to do a regex here since invalid typed dates will always just be null\r\n return this.data && !isNullOrUndefined(this.data.archiveDate);\r\n }\r\n\r\n isAccountingBasisValid() {\r\n return this.data && !isNullOrUndefined(this.data.accountingBasis);\r\n }\r\n\r\n isDefaultScalingValid() {\r\n return this.data && !isNullOrUndefined(this.data.defaultScaling);\r\n }\r\n\r\n isDefaultUnitValid() {\r\n return this.data && !isNullOrUndefined(this.data.defaultUnit);\r\n }\r\n\r\n isFiscalYearValid() {\r\n return this.data && !isNullOrUndefined(this.data.fiscalYear);\r\n }\r\n\r\n isStepOneValid() {\r\n return this.hasUploadedFiles() && !this.hasFileError();\r\n }\r\n\r\n isStepTwoValid() {\r\n if (\r\n this.isStatementNameValid() &&\r\n this.isDateFormatIdValid() &&\r\n this.isNumberFormatIdValid() &&\r\n this.isStatementTypeValid() &&\r\n this.islanguageTypeValid() &&\r\n this.isQuarterValid() &&\r\n this.isPeriodEndingValid() &&\r\n this.isWrapUpValid() &&\r\n this.isAccountingBasisValid() &&\r\n this.isFiscalYearValid() &&\r\n this.isDefaultScalingValid() &&\r\n this.isDefaultUnitValid()\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isStepThreeValid() {\r\n if (\r\n this.carryForwardStatementIdsArray.length ||\r\n this.carryForward === false\r\n ) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isStatementValid() {\r\n return (\r\n this.isStepOneValid() && this.isStepTwoValid() && this.isStepThreeValid()\r\n );\r\n }\r\n\r\n hasNewFileBeenUploaded(oldStatementModel) {\r\n return this.files[0] !== oldStatementModel.files[0];\r\n }\r\n\r\n hasStatementBeenModified(oldStatementModel) {\r\n return (\r\n this.statementName !== oldStatementModel.statementName ||\r\n this.dateformatId !== oldStatementModel.dateformatId ||\r\n this.numberFormatId !== oldStatementModel.numberFormatId ||\r\n this.statementTypeId !== oldStatementModel.statementTypeId ||\r\n this.quarter !== oldStatementModel.quarter ||\r\n this.fiscalYear !== oldStatementModel.fiscalYear ||\r\n this.languageType !== oldStatementModel.languageType ||\r\n this.periodEnding !== oldStatementModel.periodEnding ||\r\n this.accountingBasis !== oldStatementModel.accountingBasis ||\r\n this.registrant !== oldStatementModel.registrant ||\r\n this.archiveDate !== oldStatementModel.archiveDate ||\r\n this.legalHold !== oldStatementModel.legalHold ||\r\n this.comfortLetter !== oldStatementModel.comfortLetter ||\r\n this.autoIdentifyIrs !== oldStatementModel.autoIdentifyIrs\r\n );\r\n }\r\n}\r\n","import { withDefaultContextAsHomeGeo } from 'api/api-default-context';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\n\r\nexport const postMaintenanceBannerRequest = (\r\n isActive,\r\n id,\r\n text,\r\n startDate,\r\n endDate,\r\n) =>\r\n withDefaultContextAsHomeGeo().post('/tieout/maintenance-banner', {\r\n status: isActive,\r\n text: text,\r\n startDate: startDate,\r\n endDate: endDate,\r\n id,\r\n });\r\n\r\n//We had an initial design concept where users can edit multiple banners in admin module page.\r\n// Hence, this api was intended for that purpose.\r\nexport const getAllMaintenancePageBannerData = () =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/maintenance-banner/all')\r\n .then((response) => response.data.result);\r\n\r\nexport const getCurrentMaintenanceBanner = () =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/maintenance-banner')\r\n .then((response) => {\r\n if (\r\n response &&\r\n response.data &&\r\n response.data.result &&\r\n response.data.result[0] &&\r\n response.data.result[0].text\r\n )\r\n return response.data.result[0].text;\r\n else return EMPTY_STRING;\r\n });\r\n\r\nexport const getSummaryOfKeyChanges = () =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/summarykeyChange')\r\n .then((response) => {\r\n if (\r\n response &&\r\n response.data &&\r\n response.data.result &&\r\n response.data.result\r\n )\r\n return {\r\n text: response.data.result.text,\r\n status: response.data.result.status,\r\n };\r\n else return null;\r\n });\r\n\r\nexport const postSummaryKeyChanges = (text, status) =>\r\n withDefaultContextAsHomeGeo().post('/tieout/summarykeyChange', {\r\n text,\r\n status,\r\n });\r\n\r\nexport const postRoleStateRequest = (\r\n user,\r\n roleState,\r\n isRoleUpdate,\r\n enabledDate,\r\n disabledDate,\r\n) => {\r\n const payload = {\r\n id: user.id,\r\n admin: user.admin,\r\n coe: user.coe,\r\n enabled: user.enabled,\r\n enabledDate: enabledDate,\r\n disabledDate: disabledDate,\r\n };\r\n if (roleState === 'admin') {\r\n payload.supportId = isRoleUpdate ? user.supportId : null;\r\n payload.containers = isRoleUpdate ? user.countries : [];\r\n }\r\n return withDefaultContextAsHomeGeo().post(\r\n `/tieout/user/${roleState}`,\r\n payload,\r\n { params: { active: isRoleUpdate } },\r\n );\r\n};\r\n\r\nexport const getCountryManagerDetailsByUserId = (userId) => {\r\n return withDefaultContextAsHomeGeo()\r\n .get(`/tieout/country-manager/user/${userId}`)\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setAnnotationDisplayOption = createAction(\r\n 'SET_ANNOTATION_DISPLAY_OPTION',\r\n);\r\n\r\nexport const resetAnnotationDisplayAndPositionOption = createAction(\r\n 'RESET_ANNOTATION_DISPLAY_AND_POSITION_OPTION',\r\n);\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const clearApiErrorDataAction = createAction(\r\n 'CLEAR_API_ERROR_DATA_ACTION',\r\n);\r\n\r\nexport const createApiErrorDataAction = createAction(\r\n 'CREATE_API_ERROR_DATA_ACTION',\r\n);\r\n\r\nexport const createErrorStackTraceAction = createAction(\r\n 'CREATE_ERROR_STACK_TRACE_ACTION',\r\n);\r\n\r\nexport const createCatchedErrorJsonAction = createAction(\r\n 'CREATE_CATCHED_ERROR_JSON_ACTION',\r\n);\r\n","import merge from 'lodash/merge';\r\nimport { pathToRegexp } from 'path-to-regexp';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { matchPath } from 'react-router-dom';\r\nimport { isNullOrUndefined } from './object-utils';\r\n\r\nconst ADOBE_APP_NAME = 'Tie-Out';\r\n\r\n// Adobe direct call rule queue\r\nlet _ADOBE_DCR_QUEUE = [];\r\n// Adobe satellite ready\r\nlet _ADOBE_SAT_READY = false;\r\n\r\n// Analytics data layer is a window-bound object\r\nwindow.analyticsDataLayer = {\r\n pageInfo: {\r\n appName: ADOBE_APP_NAME,\r\n pageName: '',\r\n userID: null,\r\n projectName: null,\r\n projectID: null,\r\n statementName: null,\r\n statementID: null,\r\n statementType: null,\r\n statementRevision: null,\r\n },\r\n};\r\n\r\nconst LIST_OF_PAGES_WITH_STATEMENT_DATA = [\r\n `${ROUTE_CONSTANTS.STATEMENT_CONTENT_PAGE}${ROUTE_CONSTANTS.SIDE_BY_SIDE}`,\r\n ROUTE_CONSTANTS.STATEMENT_CONTENT_PAGE,\r\n];\r\n\r\nconst LIST_OF_PAGES_WITH_PROJECT_DATA = [\r\n ROUTE_CONSTANTS.HOME_PAGE,\r\n ROUTE_CONSTANTS.PROJECT_EDIT_PAGE,\r\n ROUTE_CONSTANTS.SIDE_BY_SIDE,\r\n ROUTE_CONSTANTS.STATEMENT_CONTENT_PAGE,\r\n ROUTE_CONSTANTS.STATEMENT_EDIT_PAGE,\r\n];\r\n\r\nconst doesAnalyticsDataObjectContainsProjectInfo = () =>\r\n window.analyticsDataLayer &&\r\n window.analyticsDataLayer.pageInfo &&\r\n window.analyticsDataLayer.pageInfo.projectID &&\r\n window.analyticsDataLayer.pageInfo.projectName;\r\n\r\nconst doesAnalyticsDataObjectContainsStatementInfo = () =>\r\n window.analyticsDataLayer &&\r\n window.analyticsDataLayer.pageInfo &&\r\n window.analyticsDataLayer.pageInfo.statementName &&\r\n window.analyticsDataLayer.pageInfo.statementID &&\r\n window.analyticsDataLayer.pageInfo.statementType &&\r\n window.analyticsDataLayer.pageInfo.statementRevision;\r\n\r\nconst doesPageRequiresProjectInfo = () =>\r\n LIST_OF_PAGES_WITH_PROJECT_DATA.some((routePath) =>\r\n matchPath(window.location.pathname, {\r\n path: routePath,\r\n strict: true,\r\n exact: true,\r\n }),\r\n );\r\n\r\nconst doesPageRequiresStatementInfo = () =>\r\n LIST_OF_PAGES_WITH_STATEMENT_DATA.some((routePath) =>\r\n matchPath(window.location.pathname, {\r\n path: routePath,\r\n strict: true,\r\n exact: true,\r\n }),\r\n );\r\n\r\n// Check if Adobe satellite is ready\r\nexport function isSatelliteReady() {\r\n if (_ADOBE_SAT_READY) {\r\n return true;\r\n }\r\n if (window._satellite) {\r\n if (window._satellite.domReady) {\r\n window._satellite.domReady(() => {\r\n _ADOBE_SAT_READY = true;\r\n });\r\n } else {\r\n _ADOBE_SAT_READY = true;\r\n }\r\n }\r\n return _ADOBE_SAT_READY;\r\n}\r\n\r\n// Check if required variables are set in analytics data layer\r\nexport function isDataLayerReady() {\r\n const dataLayer = getDataLayer();\r\n\r\n // null user id indicates that data layer is not yet ready\r\n if (isNullOrUndefined(dataLayer.pageInfo.userID)) return false;\r\n\r\n //project-info related pages not containing project data indicates that data layer is not yet ready\r\n if (\r\n doesPageRequiresProjectInfo() &&\r\n !doesAnalyticsDataObjectContainsProjectInfo()\r\n )\r\n return false;\r\n\r\n //statement-info related pages not containing project or statement data indicates that data layer is not yet ready\r\n if (\r\n doesPageRequiresStatementInfo() &&\r\n (!doesAnalyticsDataObjectContainsProjectInfo() ||\r\n !doesAnalyticsDataObjectContainsStatementInfo())\r\n )\r\n return false;\r\n // else return true\r\n return true;\r\n}\r\n\r\n// Get analytics data layer object\r\nexport function getDataLayer() {\r\n return window.analyticsDataLayer;\r\n}\r\n\r\n// Set analytics data layer (deep merge)\r\nexport function setDataLayer(dataLayer) {\r\n merge(window.analyticsDataLayer, dataLayer);\r\n}\r\n\r\n// Append direct call rule to end of queue\r\nexport function appendDCRQueue(dcr) {\r\n _ADOBE_DCR_QUEUE.push(dcr);\r\n}\r\n\r\n// Get direct call rule queue\r\nexport function getDCRQueue() {\r\n return _ADOBE_DCR_QUEUE;\r\n}\r\n\r\n// Set direct call rule queue\r\nexport function setDCRQueue(queue) {\r\n _ADOBE_DCR_QUEUE = queue;\r\n}\r\n\r\n// Track direct call rule and add to queue if not ready\r\nexport function trackDCR(dcr, addToQueue = true) {\r\n if (isDataLayerReady() && isSatelliteReady()) {\r\n dcr.dataLayer && setDataLayer(dcr.dataLayer);\r\n // console.log('analytics_data:', JSON.stringify(window.analyticsDataLayer));\r\n window._satellite.track(dcr.ruleName);\r\n } else if (addToQueue) {\r\n appendDCRQueue(dcr);\r\n }\r\n}\r\n\r\n// Get user id from email\r\nexport function getUserIDFromEmail(email) {\r\n const matches = email.match(/^([^@]*)@/);\r\n return matches.length > 1 ? matches[1] : '';\r\n}\r\n\r\n// Get page name from route pathname\r\nexport function getRoutePageName(pathName) {\r\n let pageName = '';\r\n Object.keys(ROUTE_CONSTANTS).some((routeName) => {\r\n // Check if the route is a relative path (ignores URLs)\r\n if (ROUTE_CONSTANTS[routeName].startsWith('/')) {\r\n try {\r\n // This is somewhat special case to determine side-by-side page.\r\n // Since route constant for side-by-side is a combination of route constant for STATEMENT_CONTENT_PAGE and SIDE_BY_SIDE.\r\n // Hence regex for route SIDE_BY_SIDE might not match with pathname.\r\n if (\r\n pathName &&\r\n pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE) &&\r\n ROUTE_CONSTANTS[routeName] === ROUTE_CONSTANTS.SIDE_BY_SIDE\r\n ) {\r\n pageName = routeName;\r\n return true;\r\n }\r\n\r\n // Generate regex for route constant. Then use that regex to check if path is valid.\r\n const re = pathToRegexp(ROUTE_CONSTANTS[routeName]);\r\n if (re.exec(pathName)) {\r\n pageName = routeName;\r\n return true;\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n return false;\r\n });\r\n return pageName;\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport ElementDetails from './element-details-api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nexport default class InternalReference extends ApiModel({\r\n data: {\r\n id: null,\r\n revisionId: null,\r\n name: null,\r\n created: null, //The timestamp at which this internal reference was created.\r\n updated: null, //The timestamp at which the internal reference was last updated.\r\n number: null,\r\n elements: [],\r\n internalReferenceElements: [],\r\n },\r\n status: null,\r\n}) {\r\n get id() {\r\n return this.data.id;\r\n }\r\n get revisionId() {\r\n return this.data.revisionId;\r\n }\r\n get name() {\r\n return this.data.name;\r\n }\r\n get created() {\r\n return this.data.created;\r\n }\r\n get updated() {\r\n return this.data.updated;\r\n }\r\n get number() {\r\n return this.data.number;\r\n }\r\n\r\n get elements() {\r\n if (!isNullOrUndefined(this.data) && this.data.elements.length > 0) {\r\n return this.data.elements;\r\n }\r\n return [];\r\n }\r\n\r\n get internalReferenceElements() {\r\n if (\r\n !isNullOrUndefined(this.data) &&\r\n this.data.internalReferenceElements.length > 0\r\n ) {\r\n return this.data.internalReferenceElements;\r\n }\r\n return [];\r\n }\r\n\r\n processResponse({ response }) {\r\n if (response && response.data) {\r\n return {\r\n data: {\r\n ...response.data,\r\n elements: response.data.internalReferenceElements.map(\r\n (internalReferenceElement) => {\r\n const elementDetailsEntry = new ElementDetails({\r\n dateCreated: internalReferenceElement.dateCreated,\r\n dateUpdated: internalReferenceElement.dateUpdated,\r\n });\r\n return elementDetailsEntry.convertElementDetailsEntityToElementDetailsModel(\r\n {\r\n elementDetails: internalReferenceElement.elementEntity,\r\n sectionFullName: internalReferenceElement.sectionFullname,\r\n },\r\n );\r\n },\r\n ),\r\n },\r\n status: response.status,\r\n };\r\n }\r\n }\r\n\r\n isIntialized() {\r\n return !isNullOrUndefined(this.data);\r\n }\r\n\r\n hasElements() {\r\n return this.data && this.data.elements && this.data.elements.length > 0;\r\n }\r\n\r\n hasElement(elementId) {\r\n return !isNullOrUndefined(\r\n this.elements.find(\r\n (element) => parseInt(element.id) === parseInt(elementId),\r\n ),\r\n );\r\n }\r\n\r\n getOtherElements({ elementId }) {\r\n if (this.hasElements()) {\r\n return this.data.elements.filter((element) => {\r\n return element.id !== elementId && element.data.included === 1;\r\n });\r\n }\r\n return [];\r\n }\r\n\r\n getInternalReferencesSortedById({ elementId }) {\r\n return this.getOtherElements({ elementId }).sort((iR1, iR2) =>\r\n iR1.id < iR2.id ? -1 : 1,\r\n );\r\n }\r\n\r\n getInternalReferencesByTimeCreated({ elementId }) {\r\n return this.getOtherElements({ elementId }).sort(\r\n (iR1, iR2) => iR1.dateCreated < iR2.dateCreated,\r\n );\r\n }\r\n\r\n getOtherElementsCount({ elementId }) {\r\n return this.getOtherElements({ elementId: elementId }).length;\r\n }\r\n\r\n updateInternalReferenceElementsFromSocket(payload) {\r\n let elementsCopy = [...this.data.elements];\r\n\r\n for (let i = 0; i < elementsCopy.length; i++) {\r\n const element = elementsCopy[i];\r\n if (element.data.id in payload) {\r\n elementsCopy[i] = payload[element.data.id];\r\n }\r\n }\r\n return this.mergeData({ elements: elementsCopy });\r\n }\r\n updateInternalReferenceFromSocket(payload) {\r\n if (payload) {\r\n return this.mergeData({\r\n ...payload,\r\n elements: payload.internalReferenceElements.map(\r\n (internalReferenceElement) => {\r\n const elementDetailsEntry = new ElementDetails({\r\n dateCreated: internalReferenceElement.dateCreated,\r\n dateUpdated: internalReferenceElement.dateUpdated,\r\n });\r\n return elementDetailsEntry.convertElementDetailsEntityToElementDetailsModel(\r\n {\r\n elementDetails: internalReferenceElement.elementEntity,\r\n sectionFullName: internalReferenceElement.sectionFullname,\r\n },\r\n );\r\n },\r\n ),\r\n });\r\n } else {\r\n return this.mergeData({\r\n id: 0,\r\n revisionId: 0,\r\n name: null,\r\n created: null,\r\n updated: null,\r\n number: 0,\r\n elements: [],\r\n });\r\n }\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport class SectionReviewList extends ApiModel({\r\n data: {\r\n sectionReviews: [],\r\n sectionReviewsMap: {},\r\n },\r\n}) {\r\n get sectionReviews() {\r\n if (this.data && this.data.sectionReviews) {\r\n return this.data.sectionReviews;\r\n }\r\n return null;\r\n }\r\n\r\n get sectionReviewsMap() {\r\n if (this.data && this.data.sectionReviewsMap) {\r\n return this.data.sectionReviewsMap;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response }) {\r\n let sectionsMap = {};\r\n for (let i = 0; i < response.data.length; i++) {\r\n const review = response.data[i];\r\n if (!(review.sectionId in sectionsMap)) {\r\n sectionsMap[review.sectionId] = {\r\n [review.appUserId]: true,\r\n };\r\n } else {\r\n sectionsMap[review.sectionId][review.appUserId] = true;\r\n }\r\n }\r\n\r\n return {\r\n data: {\r\n sectionReviews: response.data,\r\n sectionReviewsMap: sectionsMap,\r\n },\r\n };\r\n }\r\n\r\n appendSectionReview(review) {\r\n let sectionReviewsMapCopy = { ...this.data.sectionReviewsMap };\r\n const sectionReviewsCopy = [...this.sectionReviews];\r\n\r\n sectionReviewsCopy.push(review);\r\n sectionReviewsCopy.sort(\r\n (a, b) => a.sectionId - b.sectionId || b.updatedDate - a.updatedDate,\r\n );\r\n\r\n if (review.sectionId in sectionReviewsMapCopy) {\r\n sectionReviewsMapCopy[review.sectionId][review.appUserId] = true;\r\n } else {\r\n sectionReviewsMapCopy[review.sectionId] = {\r\n [review.appUserId]: true,\r\n };\r\n }\r\n\r\n return this.merge({\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n data: {\r\n sectionReviews: sectionReviewsCopy,\r\n sectionReviewsMap: sectionReviewsMapCopy,\r\n },\r\n });\r\n }\r\n\r\n mergeSectionsReviewList(reviewList) {\r\n const sectionReviewsMapCopy = { ...this.data.sectionReviewsMap };\r\n const sectionReviewsCopy = [...this.sectionReviews];\r\n\r\n reviewList.forEach((review) => {\r\n const index = sectionReviewsCopy\r\n .map((item) => item.sectionId)\r\n .indexOf(review.sectionId);\r\n if (index >= 0) {\r\n sectionReviewsCopy[index] = review;\r\n } else {\r\n sectionReviewsCopy.push(review);\r\n }\r\n\r\n if (review.sectionId in sectionReviewsMapCopy) {\r\n sectionReviewsMapCopy[review.sectionId][review.appUserId] = true;\r\n } else {\r\n sectionReviewsMapCopy[review.sectionId] = {\r\n [review.appUserId]: true,\r\n };\r\n }\r\n });\r\n\r\n sectionReviewsCopy.sort(\r\n (a, b) => a.sectionId - b.sectionId || b.updatedDate - a.updatedDate,\r\n );\r\n\r\n return this.merge({\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n data: {\r\n sectionReviews: sectionReviewsCopy,\r\n sectionReviewsMap: sectionReviewsMapCopy,\r\n },\r\n });\r\n }\r\n\r\n removeBulkSectionReview(payload) {\r\n let sectionReviewsMapCopy = { ...this.data.sectionReviewsMap };\r\n payload.forEach((item) => {\r\n if (item.sectionId in sectionReviewsMapCopy) {\r\n delete sectionReviewsMapCopy[item.sectionId];\r\n }\r\n });\r\n\r\n const sectionReviewedCopy = this.sectionReviews.filter((entry) => {\r\n const removeSection = payload.find(\r\n (item2) => entry.sectionId === item2.sectionId,\r\n );\r\n return !removeSection;\r\n });\r\n\r\n return this.merge({\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n data: {\r\n sectionReviews: sectionReviewedCopy,\r\n sectionReviewsMap: sectionReviewsMapCopy,\r\n },\r\n });\r\n }\r\n\r\n removeSectionReview(payload) {\r\n const { sectionId, userId } = payload;\r\n let sectionReviewsMapCopy = { ...this.data.sectionReviewsMap };\r\n if (\r\n sectionId in sectionReviewsMapCopy &&\r\n userId in sectionReviewsMapCopy[sectionId]\r\n ) {\r\n delete sectionReviewsMapCopy[sectionId][userId];\r\n if (Object.values(sectionReviewsMapCopy[sectionId]).length === 0) {\r\n delete sectionReviewsMapCopy[sectionId];\r\n }\r\n }\r\n\r\n return this.merge({\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n data: {\r\n sectionReviews: this.sectionReviews.filter(\r\n (entry) =>\r\n !(entry.sectionId === sectionId && entry.appUserId === userId),\r\n ),\r\n sectionReviewsMap: sectionReviewsMapCopy,\r\n },\r\n });\r\n }\r\n\r\n checkIfReviewAlreadyExist(currentVal, accumulator) {\r\n return accumulator.some((item) => {\r\n return (\r\n item.appUserId === currentVal.appUserId &&\r\n item.sectionId === currentVal.sectionId\r\n );\r\n });\r\n }\r\n\r\n hasSectionBeenReviewed(sectionId) {\r\n return this.sectionReviews.some((review) => review.sectionId === sectionId);\r\n }\r\n\r\n hasSectionBeenReviewedByOtherUser(currUserId, sectionId) {\r\n return this.sectionReviews.some(\r\n (review) =>\r\n review.sectionId === sectionId && review.appUserId !== currUserId,\r\n );\r\n }\r\n\r\n userAlreadyReviewed(currUserId, sectionId) {\r\n return this.sectionReviews.some(\r\n (review) =>\r\n review.appUserId === currUserId && review.sectionId === sectionId,\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport Dropdown, { KebabDropdown } from 'components/common/dropdown-component';\r\nimport DATA_GRID_CONSTANTS from 'constants/common/data-grid-constants';\r\nimport { KebabMenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nconst ACCEPTABLE_WIDTH_UNITS = ['%', 'rem', 'px'];\r\n\r\nconst INTERACTIVE_COLUMN_WIDTH = '5%';\r\n\r\nconst { SPECIAL_COLUMNS } = DATA_GRID_CONSTANTS;\r\nconst stopRowClickPropagation = (e) => {\r\n // IMPORTANT prevents DataGrid onRowClick from firing for dropdown selections\r\n e.stopPropagation();\r\n};\r\n\r\nclass DataGridColumn {\r\n /* column key to sort the table by */\r\n key;\r\n /* Column header, should be an intl id*/\r\n header;\r\n /* [optional] is column sortable? */\r\n sortable;\r\n /* [optional] is column filterable? */\r\n filterable;\r\n /* Css width string, preferably in % */\r\n width;\r\n /* [optional] Special class for this column*/\r\n className;\r\n /** [optional] Icon for the column header */\r\n Icon;\r\n /* [optional] Function that accepts the value of the row and returns jsx for what to display in a cell\r\n default to row data with key, arguments (rowData, options) options are data-grid level data that may be useful\r\n to a columns formatter function, they are passed from the data-grid -> data-grid-row -> formatter\r\n options can be, \r\n - index,\r\n - onSelect,\r\n - rowKey,\r\n - isRowSelected,\r\n - onDropdownColumnSelect,\r\n */\r\n formatter;\r\n constructor({\r\n key,\r\n header,\r\n sortable,\r\n filterable,\r\n width,\r\n formatter,\r\n className,\r\n Icon,\r\n }) {\r\n if (\r\n !width ||\r\n !ACCEPTABLE_WIDTH_UNITS.some((unit) => width.includes(unit))\r\n ) {\r\n console.error(\r\n `DataGridColumn with key: ${key} width needs to be one of `,\r\n ...ACCEPTABLE_WIDTH_UNITS,\r\n `\\n you specified ${width}`,\r\n );\r\n }\r\n\r\n this.key = key;\r\n this.header = header;\r\n this.sortable = sortable;\r\n this.filterable = filterable;\r\n this.width = width;\r\n this.className = className;\r\n this.Icon = Icon;\r\n this.formatter = formatter ? formatter : (rowData) => rowData[this.key];\r\n }\r\n}\r\n\r\n/**\r\n * A special column type if your row column needs a kebab menu\r\n * @param {[MenuOption]} props.options Array for simple options, or conditionally assign options based on row data by passing a function that returns an options array\r\n * @param {string} props.dropdownId unique string to build the dropdowns id attribute from\r\n */\r\nexport class DataGridKebabColumn extends DataGridColumn {\r\n constructor({\r\n options,\r\n dropdownId,\r\n className,\r\n usePortalMenu = true,\r\n containerRef,\r\n }) {\r\n super({\r\n key: SPECIAL_COLUMNS.kebab,\r\n header: null,\r\n width: INTERACTIVE_COLUMN_WIDTH,\r\n sortable: false,\r\n className: className,\r\n formatter: (rowData, { index }) => (\r\n \r\n ),\r\n });\r\n }\r\n\r\n /**\r\n * Some properties of MenuOption like *onSelectOption*, *disabled*, and *shouldShowOption* require knowledge of\r\n * the current row's data. Due to the nature of the data-grid, it is difficult to instantiate different\r\n * MenuOption arrays for each row in a constants file. Therefore this function serves the purpose of instantiating\r\n * the menu with row specific data by \"giving\" row data to the *onSelectOption*, *disabled*, and *shouldShowOption* functions\r\n * if they are defined as functions\r\n *\r\n * one of your options in your array might look like\r\n * new KebabMenuOption({\r\n * title: 'statement-list.kebab.legal-hold',\r\n * onSelectOption: rowData => enableLegalHold(rowData),\r\n * shouldShowOption: rowData => rowData.isOnLegalHold,\r\n * disabled: rowData => rowData.canBePlacedOnLegalHold,\r\n * }),\r\n *\r\n * this function is what allows *onSelectOption*, *disabled*, and *shouldShowOption* to have the rowData\r\n *\r\n * @param {[MenuOption]} options\r\n * @param {Object} rowData\r\n */\r\n giveOptionsRowData(options, rowData) {\r\n return options\r\n .filter((option) => {\r\n // filter out options that have shouldShowOption property set to false or a function\r\n // that evaluates to false so they do not interfere with menu height calculations\r\n if (typeof option.shouldShowOption === 'function') {\r\n return option.shouldShowOption(rowData);\r\n } else if (!isNullOrUndefined(option.shouldShowOption)) {\r\n return option.shouldShowOption;\r\n }\r\n return true;\r\n })\r\n .map(\r\n (option) =>\r\n new KebabMenuOption({\r\n ...option,\r\n onSelectOption: () => option.onSelectOption(rowData),\r\n title:\r\n typeof option.title === 'function'\r\n ? option.title(rowData)\r\n : option.title,\r\n disabled:\r\n typeof option.disabled === 'function'\r\n ? option.disabled(rowData)\r\n : option.disabled,\r\n tooltip:\r\n typeof option.tooltip === 'function'\r\n ? option.tooltip(rowData)\r\n : option.tooltip,\r\n }),\r\n );\r\n }\r\n}\r\n\r\nexport class DataGridCheckboxColumn extends DataGridColumn {\r\n constructor({ checkboxId }) {\r\n super({\r\n key: SPECIAL_COLUMNS.checkbox,\r\n header: null,\r\n width: INTERACTIVE_COLUMN_WIDTH,\r\n sortable: false,\r\n className: 'checkbox-col',\r\n formatter: (rowData, { index, onSelect, isRowSelected }) => {\r\n if (!rowData.id) {\r\n throw new Error(\r\n `Row data for data grids must have an id property, no id present for row data: ${rowData}`,\r\n );\r\n }\r\n return (\r\n onSelect(e.target.value)}\r\n value={rowData.id}\r\n />\r\n );\r\n },\r\n });\r\n }\r\n}\r\n/**\r\n * A special column type if your row column needs a selectable dropdown\r\n * @param {array|function} props.options Array for simple options, or conditionally assign options based on row data by passing a function that returns an options array\r\n * @param {string} props.key key for value that this column represents on rowData object\r\n * @param {string} props.header column display header\r\n * @param {string} props.width width of dropdown parent, in px, %, or rem\r\n * @param {bool|function} props.isValid if function, gives row data as argument to prop and should return a boolean\r\n */\r\nexport class DataGridDropdownColumn extends DataGridColumn {\r\n constructor({ options, key, header, width, isValid, placeholder, disabled }) {\r\n super({\r\n key: key,\r\n header: header,\r\n width: width,\r\n sortable: false,\r\n className: 'dropdown-col',\r\n formatter: (rowData, { rowKey, onDropdownColumnSelect }) => {\r\n const colId = `region-col-${rowKey}`;\r\n let _isValid = isValid;\r\n if (typeof isValid === 'function') {\r\n _isValid = isValid(rowData);\r\n }\r\n let _options = options;\r\n if (typeof options === 'function') {\r\n _options = options(rowData);\r\n }\r\n return (\r\n \r\n onDropdownColumnSelect(val, rowData.id, 'region')\r\n }\r\n value={rowData[this.key]}\r\n onClickFormItem={stopRowClickPropagation}\r\n placeholder={placeholder}\r\n width=\"100%\"\r\n isValid={_isValid}\r\n usePortalMenu\r\n disabled={disabled}\r\n />\r\n );\r\n },\r\n });\r\n }\r\n}\r\n\r\nexport class DataGridIconColumn extends DataGridColumn {\r\n constructor({ onClick, Icon, iconHeight, iconWidth, disabled }) {\r\n super({\r\n key: SPECIAL_COLUMNS.icon,\r\n header: null,\r\n width: INTERACTIVE_COLUMN_WIDTH,\r\n sortable: false,\r\n className: classNames('icon-col', disabled ? 'icon-col--disabled' : null),\r\n formatter: (rowData, { rowKey }) => (\r\n {\r\n if (!disabled) {\r\n onClick(rowData);\r\n }\r\n }}\r\n />\r\n ),\r\n });\r\n }\r\n}\r\n\r\nexport default DataGridColumn;\r\n","export default class DataGridData {\r\n rowItems = [];\r\n constructor({ rowItems }) {\r\n if (!Array.isArray(rowItems)) {\r\n throw Error('rowItems prop for data grid needs to be of type Array');\r\n }\r\n this.rowItems = rowItems;\r\n }\r\n}\r\n\r\nexport class DataGridDataApi extends DataGridData {\r\n /* Api model representing the response object, used for loading animations on the table */\r\n apiModel = null;\r\n /* Used for pagination: Number of ALL records in the database for this query, not just how many are returned for current pagination */\r\n totalResults = 0;\r\n /* Used for pagination: Offset for database query to begin looking for values */\r\n currentOffset;\r\n /* Used for pagination: number of records to fetch */\r\n pageSize;\r\n\r\n constructor({ apiModel, rowItems, totalResults, currentOffset, pageSize }) {\r\n super({ rowItems });\r\n // TODO would like to add this instanceof check here\r\n // if (!(apiModel instanceof ApiModel)) {\r\n // throw Error('apiModel prop for data grid needs to be of type ApiModel');\r\n // }\r\n this.apiModel = apiModel;\r\n this.totalResults = totalResults || 0;\r\n this.currentOffset = currentOffset;\r\n this.pageSize = pageSize;\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setSelectedElementDetails = createAction(\r\n 'SET_SELECTED_ELEMENT_DETAILS_ACTION',\r\n);\r\n\r\nexport const clearReportPreviewPageData = createAction(\r\n 'CLEAR_REPORT_PREVIEW_PAGE_DATA_ACTION',\r\n);\r\n\r\nexport const setPreviewPageDisplayOptionAction = createAction(\r\n 'SET_PREVIEW_PAGE_DISPLAY_OPTION',\r\n);\r\n","import { getStatementSummaryNotesRequest } from 'api/statement-summary-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const statementSummaryNotesLoading = createAction(\r\n 'STATEMENT_SUMMARY_NOTES_LOADING',\r\n);\r\nexport const statementSummaryNotesLoaded = createAction(\r\n 'STATEMENT_SUMMARY_NOTES_LOADED',\r\n);\r\nexport const statementSummaryNotesError = createAction(\r\n 'STATEMENT_SUMMARY_NOTES_ERROR',\r\n);\r\nexport const updateSummaryNotesFromWebsocket = createAction(\r\n 'UPDATE_SUMMARY_NOTES_FROM_WEBSOCKET',\r\n);\r\n\r\nexport const fetchStatementSummaryNotes = ({ revisionId }) => (dispatch) => {\r\n dispatch(statementSummaryNotesLoading());\r\n getStatementSummaryNotesRequest({ revisionId })\r\n .then((response) => {\r\n dispatch(statementSummaryNotesLoaded({ response }));\r\n })\r\n .catch((error) => {\r\n dispatch(statementSummaryNotesError({ error }));\r\n });\r\n};\r\n","import {\r\n getPinnedDetailsRequest,\r\n pinRequest,\r\n unPinRequest,\r\n} from 'api/project-list-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const pinnedDetailsLoading = createAction('PINNED_DETAILS_LOADING');\r\nexport const pinnedDetailsError = createAction('PINNED_DETAILS_ERROR');\r\nexport const pinnedDetailsLoaded = createAction('PINNED_DETAILS_LOADED');\r\nexport const updatePinnedDetails = createAction('ADD_NEW_PINNED_ITEM');\r\nexport const removePinnedDetails = createAction('REMOVE_PINNED_ITEM');\r\n\r\nexport const getPinnedDetails = () => async (dispatch, getState) => {\r\n const { id } = getState().data.currentUser;\r\n\r\n dispatch(pinnedDetailsLoading());\r\n try {\r\n const pinnedDetails = await getPinnedDetailsRequest(id);\r\n dispatch(pinnedDetailsLoaded(pinnedDetails));\r\n } catch (e) {\r\n dispatch(pinnedDetailsError(e));\r\n }\r\n};\r\n\r\nexport const updatePinDetails =\r\n (projectId, statementId = 0) =>\r\n async (dispatch, getState) => {\r\n let payload = {};\r\n payload.clientId = parseInt(projectId);\r\n payload.statementId = statementId;\r\n payload.pinType = statementId === 0 ? 1 : 2;\r\n\r\n try {\r\n const data = await pinRequest(projectId, payload);\r\n dispatch(updatePinnedDetails(data));\r\n } catch (e) {\r\n console.error('error while pining project or statement', e);\r\n }\r\n };\r\n\r\nexport const updateUnpinDetails =\r\n (projectId, statementId = 0) =>\r\n async (dispatch, getState) => {\r\n let payload = {};\r\n payload.clientId = parseInt(projectId);\r\n payload.statementId = statementId;\r\n payload.pinType = statementId === 0 ? 1 : 2;\r\n\r\n try {\r\n const data = await unPinRequest(projectId, payload);\r\n dispatch(removePinnedDetails(data));\r\n } catch (e) {\r\n console.error('error while unpinning project or statement', e);\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport { addUserToGroup } from 'api/statement-socket-client-api';\r\nimport { getSelectedProjectRequest } from 'api/selected-project-api';\r\nimport { selectedProjectLoaded } from 'store/actions/selected-project-actions';\r\nimport { getAllUsers } from './project-users-list-actions';\r\n// import { removeUserFromRoom } from 'api/statement-socket-client-api';\r\nexport const setActiveUsersLoading = createAction('ACTIVE_USERS_LOADING');\r\nexport const setActiveUsersLoaded = createAction('ACTIVE_USERS_LOADED');\r\nexport const setActiveUsersError = createAction('ACTIVE_USERS_ERROR');\r\nexport const addUserAction = createAction('ADD_USER_ACTION');\r\nexport const removeUserAction = createAction('REMOVE_USER_ACTION');\r\nexport const clearActiveUsersAction = createAction(\r\n 'CLEAR_ACTIVER_USERS_ACTION',\r\n);\r\n\r\nexport const addUserAfterValidatingIfIdExists =\r\n (webSocketPayload) => async (dispatch, getState) => {\r\n const existingUserIds =\r\n getState().data &&\r\n getState().data.projectUsersList &&\r\n getState().data.projectUsersList.data &&\r\n getState().data.projectUsersList.data.users &&\r\n getState().data.projectUsersList.data.users.map((user) => user.id);\r\n const projectId =\r\n getState().data &&\r\n getState().data.selectedProject &&\r\n getState().data.selectedProject.id;\r\n\r\n let isIdExist =\r\n webSocketPayload &&\r\n webSocketPayload.payload &&\r\n webSocketPayload.payload.every((e) => existingUserIds.includes(e));\r\n if (!isIdExist) {\r\n const response = await getSelectedProjectRequest(projectId);\r\n await dispatch(selectedProjectLoaded({ response }));\r\n await dispatch(getAllUsers());\r\n }\r\n await dispatch(addUserAction({ payload: webSocketPayload.payload }));\r\n };\r\n\r\nexport const addUserToRevision =\r\n (revisionIdParam, projectIdParam) => async (dispatch, getState) => {\r\n const { projectUsersList, revision, selectedProject } = getState().data;\r\n const revisionId = revision.id ? revision.id : revisionIdParam;\r\n const selectedProjectId = selectedProject && selectedProject.id;\r\n\r\n // try to get project id from store, if it is not there then switch to url param\r\n const projectId = selectedProjectId ? selectedProjectId : projectIdParam;\r\n\r\n try {\r\n const response = await addUserToGroup({\r\n revisionId: revisionId,\r\n projectUserIds: Object.keys(projectUsersList.data.userIdToUserNameMap),\r\n projectId,\r\n });\r\n dispatch(setActiveUsersLoaded(response));\r\n } catch (error) {\r\n dispatch(setActiveUsersError(error));\r\n }\r\n };\r\n\r\n// TODO : Code to be uncommented when we are developing feature related to instant update of active users on statement.\r\n// export const removeUserFromRoomAction =\r\n// ({ userId, projectId, revisionId }) =>\r\n// async (dispatch, getState) => {\r\n// try {\r\n// const user = await removeUserFromRoom({\r\n// revisionId,\r\n// projectUserIds: [userId],\r\n// projectId,\r\n// });\r\n// const { result } = user.data;\r\n// const { data: { activeUsers } = {} } = getState();\r\n// const { data: { users } = {} } = activeUsers || {};\r\n// const payload =\r\n// users.length && users.filter((user) => user !== result[0]);\r\n// dispatch(removeUserAction({ payload }));\r\n// } catch (error) {\r\n// console.log(error);\r\n// }\r\n// };\r\n","import { CONTEXT_KEY } from 'api/api-client';\r\nimport { getRevisionsSectionsRequest } from 'api/sections-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const leftSectionTreeListLoading = createAction(\r\n 'LEFT_STATEMENT_SECTION_TREE_LIST_LOADING',\r\n);\r\nexport const leftSectionTreeListError = createAction(\r\n 'LEFT_STATEMENT_SECTION_TREE_LIST_ERROR',\r\n);\r\nexport const leftSectionTreeListLoaded = createAction(\r\n 'LEFT_STATEMENT_SECTION_TREE_LIST_LOADED',\r\n);\r\nexport const setCreateleftSectionAction = createAction(\r\n 'LEFT_STATEMENT_SET_CREATE_SECTION_ACTION',\r\n);\r\nexport const addNewleftSectionAction = createAction(\r\n 'ADD_NEW_LEFT_STATEMENT_SECTION_ACTION',\r\n);\r\nexport const removeNewleftSectionAction = createAction(\r\n 'LEFT_STATEMENT_REMOVE_NEW_SECTION_ACTION',\r\n);\r\nexport const clearleftSectionTreeListAction = createAction(\r\n 'LEFT_STATEMENT_CLEAR_SECTION_TREE_LIST_ACTION',\r\n);\r\nexport const setNewleftSectionIdAction = createAction(\r\n 'LEFT_STATEMENT_SET_NEW_SECTION_ID_ACTION',\r\n);\r\n\r\nexport const fetchLeftSectionTreeAction =\r\n ({ statementId, revisionId, projectId }) =>\r\n async (dispatch, getStore) => {\r\n try {\r\n const response = await getRevisionsSectionsRequest({\r\n statementId,\r\n revisionId,\r\n onlyBookmarkSection: true,\r\n asTreeList: true,\r\n contextKeyForApiCall: CONTEXT_KEY.PROJECT_CONTEXT,\r\n // project id to make api call in desired project geo\r\n contextValue: projectId,\r\n });\r\n dispatch(leftSectionTreeListLoaded(response));\r\n } catch (error) {\r\n dispatch(leftSectionTreeListError(error));\r\n }\r\n };\r\n","import React, { memo } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { STATEMENT_LIST_TABS } from 'constants/feature/statement-list-constants';\r\n\r\nconst NoStatements = ({ isFilterActive }) => {\r\n const currentTab = useSelector((store) => {\r\n return store.data.statementList.statementListFilters.selectedTab;\r\n });\r\n\r\n const getStatusMessage = () => {\r\n if (isFilterActive) {\r\n return 'statement-list.no-statements.search';\r\n }\r\n if (currentTab) {\r\n switch (currentTab.id) {\r\n case STATEMENT_LIST_TABS.ACTIVE.id: {\r\n return 'statement-list.no-statements.inProgress';\r\n }\r\n case STATEMENT_LIST_TABS.ARCHIVED.id: {\r\n return 'statement-list.no-statements.archived';\r\n }\r\n case STATEMENT_LIST_TABS.DELETED.id: {\r\n return 'statement-list.no-statements.deleted';\r\n }\r\n default: {\r\n return 'statement-list.no-statements.inProgress';\r\n }\r\n }\r\n }\r\n return 'statement-list.no-statements.inProgress';\r\n };\r\n return ;\r\n};\r\n\r\nexport default memo(NoStatements);\r\n","import React, { memo, useCallback, useState } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport {\r\n MAX_STATEMENT_FILE_SIZE,\r\n SUPPORTED_STATEMENT_FILE_TYPES,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { ReactComponent as Document } from 'icons/document.svg';\r\nimport { ReactComponent as Clear } from 'icons/cross.svg';\r\nimport Statement from 'models/data/statement-model';\r\nimport shortid from 'shortid';\r\nimport StatementApi from 'models/form/statement-form-model';\r\nimport StatementData from 'models/data/statement-model';\r\n\r\nconst ADD_REVISION_BLOCK = 'add-revision';\r\nconst ADD_REVISION_ID_BLOCK = 'id-add-revision';\r\nconst DOCUMENT_ICON_SIZE = '70px';\r\nconst CLEAR_ICON_SIZE = '20px';\r\nconst STATEMENT_DOC_TYPE = 1;\r\nconst STATEMENT_PDF_TYPE = 2;\r\nconst PDF_FILE_EXTENSION = 'pdf';\r\n/** For dropzone documentation visit https://react-dropzone.netlify.com/ */\r\nconst AddRevisionModal = ({\r\n setUploadedFilesAddRevision,\r\n setUploadedFilesAddRevisionError,\r\n toggleAddRevisionModal,\r\n revisionInProgress,\r\n statementToUploadRevisionOn,\r\n uploadRevision,\r\n statement,\r\n}) => {\r\n const [filePDFError, setFilePDFError] = useState(false);\r\n\r\n const onDrop = useCallback(\r\n (acceptedFiles, rejectedFiles) => {\r\n if (acceptedFiles.length) {\r\n const acceptedFileNameExtension =\r\n acceptedFiles[0].name.split('.')[\r\n acceptedFiles[0].name.split('.').length - 1\r\n ];\r\n if (\r\n statement.documentProcessType === STATEMENT_DOC_TYPE &&\r\n acceptedFileNameExtension === PDF_FILE_EXTENSION\r\n ) {\r\n setFilePDFError(true);\r\n setUploadedFilesAddRevisionError(acceptedFiles);\r\n } else if (\r\n statement.documentProcessType === STATEMENT_PDF_TYPE &&\r\n acceptedFileNameExtension !== PDF_FILE_EXTENSION\r\n ) {\r\n setFilePDFError(true);\r\n setUploadedFilesAddRevisionError(acceptedFiles);\r\n } else {\r\n setUploadedFilesAddRevision(acceptedFiles);\r\n }\r\n }\r\n if (rejectedFiles.length) {\r\n //We can only upload one file in this modal\r\n setUploadedFilesAddRevisionError(rejectedFiles);\r\n }\r\n },\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [setUploadedFilesAddRevision, setUploadedFilesAddRevisionError],\r\n );\r\n\r\n const handleModalClose = () => {\r\n setUploadedFilesAddRevision(null);\r\n toggleAddRevisionModal();\r\n };\r\n\r\n const [selectRevisionButtonDisabled, setSelectRevisionButtonDisabled] =\r\n useState(false);\r\n const onFileDialogCancel = () => {\r\n setSelectRevisionButtonDisabled(false);\r\n };\r\n const { getInputProps, open } = useDropzone({\r\n accept: SUPPORTED_STATEMENT_FILE_TYPES,\r\n multiple: false,\r\n onDrop,\r\n maxSize: MAX_STATEMENT_FILE_SIZE,\r\n onFileDialogCancel,\r\n noDrag: true,\r\n });\r\n const _isFileError = revisionInProgress.hasFileError();\r\n\r\n const getErrorText = () => {\r\n return (\r\n <>\r\n
\r\n \r\n
\r\n
    \r\n
  1. \r\n \r\n
  2. \r\n
  3. \r\n \r\n
  4. \r\n
\r\n \r\n );\r\n };\r\n return (\r\n {\r\n handleModalClose();\r\n }}\r\n primaryModalButton={\r\n new ModalButton({\r\n text: 'common.add',\r\n onClick: () => {\r\n uploadRevision({\r\n statement: statementToUploadRevisionOn,\r\n revision: revisionInProgress,\r\n });\r\n toggleAddRevisionModal();\r\n },\r\n disabled: !revisionInProgress.hasUploadedFiles() || _isFileError,\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.cancel',\r\n onClick: () => {\r\n handleModalClose();\r\n },\r\n })\r\n }\r\n >\r\n
\r\n {chunks},\r\n lineBreak: (\r\n \r\n ),\r\n },\r\n }}\r\n isInternationalized={true}\r\n isInteractive={false}\r\n width={'100%'}\r\n />\r\n
\r\n {_isFileError ? (\r\n
\r\n \r\n
\r\n ) : null}\r\n
\r\n \r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n {revisionInProgress.hasUploadedFiles() ? (\r\n
\r\n {revisionInProgress.files.map((file, i) => (\r\n \r\n \r\n {file.name}\r\n
\r\n {\r\n e.stopPropagation(); //nessarry because all clicks inside the dropzone trigger upload\r\n setUploadedFilesAddRevision(null);\r\n setSelectRevisionButtonDisabled(false);\r\n setFilePDFError(false);\r\n }}\r\n />\r\n
\r\n ))}\r\n
\r\n ) : null}\r\n {\r\n e.stopPropagation(); //nessarry because all clicks inside the dropzone trigger upload\r\n setSelectRevisionButtonDisabled(true);\r\n open();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAddRevisionModal.propTypes = {\r\n /** Action that fires on adding a revision to a statement */\r\n uploadRevision: PropTypes.func.isRequired,\r\n /** Action that sets the uploaded files to the revision in progress */\r\n setUploadedFilesAddRevision: PropTypes.func.isRequired,\r\n /** Action that triggers to indicate that react dropzone rejected a new revision on the revision in progress */\r\n setUploadedFilesAddRevisionError: PropTypes.func.isRequired,\r\n /** Object representing the working copy of the revision being created.*/\r\n revisionInProgress: PropTypes.instanceOf(StatementApi).isRequired,\r\n /** Object representing statement we are uploading a revision on.*/\r\n statementToUploadRevisionOn: PropTypes.instanceOf(StatementData).isRequired,\r\n /** Method on the statement list component that opens the add revision modal.*/\r\n toggleAddRevisionModal: PropTypes.func.isRequired,\r\n /** Statement for which revision is being added */\r\n statement: PropTypes.instanceOf(Statement).isRequired,\r\n};\r\n\r\nexport default memo(AddRevisionModal);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with sketchtool.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Statement-Revisions\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG-TieOut-|-Statement-List-|-Revision-Popup\",\n transform: \"translate(-924.000000, -326.000000)\",\n fill: \"#00A3E0\",\n className: \"icon-path\"\n}, React.createElement(\"g\", {\n id: \"external-link-copy\",\n transform: \"translate(924.000000, 326.000000)\"\n}, React.createElement(\"path\", {\n d: \"M11.978087,0.126708075 C5.40253416,0.126708075 0.0718509317,5.4573913 0.0718509317,12.032795 C0.0718509317,18.6096894 5.40253416,23.9403727 11.978087,23.9403727 C18.5536398,23.9403727 23.8841739,18.6096894 23.8841739,12.032795 C23.8841739,5.4573913 18.5536398,0.126708075 11.978087,0.126708075 Z M11.978087,1.11965217 C17.9959752,1.11965217 22.8919752,6.01490683 22.8919752,12.032795 C22.8919752,18.0506832 17.9959752,22.9475776 11.978087,22.9475776 C5.96004969,22.9475776 1.06404969,18.0506832 1.06404969,12.032795 C1.06404969,6.01490683 5.96004969,1.11965217 11.978087,1.11965217 Z M17.9311304,12.032795 C17.6571429,12.032795 17.4350311,12.2549068 17.4350311,12.5291925 L17.4350311,17.4901863 L6.52099379,17.4901863 L6.52099379,6.57704348 L11.4819876,6.57704348 C11.7558261,6.57704348 11.978087,6.35478261 11.978087,6.08064596 C11.978087,5.80636025 11.7558261,5.58409938 11.4819876,5.58409938 L6.02489441,5.58409938 C5.7510559,5.58409938 5.5289441,5.80636025 5.5289441,6.08064596 L5.5289441,17.9865839 C5.5289441,18.2608696 5.7510559,18.4829814 6.02489441,18.4829814 L17.9311304,18.4829814 C18.205118,18.4829814 18.4272298,18.2608696 18.4272298,17.9865839 L18.4272298,12.5291925 C18.4272298,12.2549068 18.205118,12.032795 17.9311304,12.032795 Z M18.3889193,5.89118012 C18.3386832,5.7689441 18.2419379,5.67204969 18.1205963,5.62300621 C18.0600745,5.59751553 17.995677,5.58409938 17.9311304,5.58409938 L13.9623354,5.58409938 C13.6884969,5.58409938 13.4663851,5.80636025 13.4663851,6.08064596 C13.4663851,6.35478261 13.6884969,6.57704348 13.9623354,6.57704348 L16.7335155,6.57704348 L11.6273292,11.6824845 C11.4335404,11.8762733 11.4335404,12.1908075 11.6273292,12.3845963 C11.7242236,12.4814907 11.8510807,12.5291925 11.978087,12.5291925 C12.1049441,12.5291925 12.2319503,12.4814907 12.3288447,12.3845963 L17.4350311,7.27751553 L17.4350311,10.0486957 C17.4350311,10.3229814 17.6571429,10.5450932 17.9311304,10.5450932 C18.205118,10.5450932 18.4272298,10.3229814 18.4272298,10.0486957 L18.4272298,6.08064596 C18.4272298,6.01639752 18.4139627,5.95080745 18.3889193,5.89118012 Z\",\n id: \"link\"\n}))));\n\nvar SvgLink = function SvgLink(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"24px\",\n height: \"24px\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgLink, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/link.68a166a6.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { DataGridColumn } from 'components/common/data-grid/data-grid-component';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { DataGridKebabColumn } from 'components/common/data-grid/data-grid-component';\r\nimport { ReactComponent as LinkIcon } from 'icons/link.svg';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { KebabMenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport Permissions from 'permissions/permissions';\r\nimport { getUserNameByUserDataObject } from 'utils/statement-content-page-utils';\r\n\r\nexport const NUM_VISIBLE_ROWS_REVISIONS_MODAL = 5;\r\n\r\nexport const VIEW_REVISION_LINK_TOOLTIP = new TooltipOptions({\r\n text: 'statement-list.revisions-modal-col.revision-link-tool-tip',\r\n id: 'statement-list-id-view-revision-link-button-tool-tip',\r\n position: 'top',\r\n});\r\n\r\nexport const getRevisionHistoryListColumns = ({ onRevisionLinkIconClick }) => {\r\n return [\r\n new DataGridColumn({\r\n key: 'revisionNumber',\r\n header: 'statement-list.revisions-modal-col.revision',\r\n width: '22.5%',\r\n }),\r\n new DataGridColumn({\r\n key: 'processedDate',\r\n header: 'statement-list.revisions-modal-col.processed-date',\r\n width: '22.5%',\r\n formatter: (revision) =>\r\n moment(revision.processedDate).format(DATE_FORMATS.MONTH_DAY_YEAR),\r\n }),\r\n new DataGridColumn({\r\n key: 'processedByUserEntity',\r\n header: 'statement-list.revisions-modal-col.processed-by',\r\n width: '22.5%',\r\n formatter: (revision, { rowKey }) => {\r\n const colId = `last-modified-by-col-${rowKey}`;\r\n const displayText = revision.processedByUserEntity\r\n ? getUserNameByUserDataObject(revision.processedByUserEntity)\r\n : null;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: null,\r\n header: 'statement-list.revisions-modal-col.percent-verified',\r\n width: '22.5%',\r\n formatter: (revision, { rowKey }) => {\r\n return `${Math.round(\r\n (revision.percentageCompleted * 100 * 100) / 100,\r\n )}%`;\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: null,\r\n header: null,\r\n width: '10%',\r\n formatter: (revision) => (\r\n \r\n onRevisionLinkIconClick(revision)}\r\n />\r\n \r\n ),\r\n }),\r\n ];\r\n};\r\n\r\nexport const getDeletedRevisionHistoryListColumns = ({\r\n project,\r\n selectedStatement,\r\n onView,\r\n onRestore,\r\n onPermanentlyDelete,\r\n}) => {\r\n const _canRestoreSoftDeleted = Permissions.Statement.canRestoreSoftDeleted();\r\n const _canPermanentlyDelete =\r\n !selectedStatement.legalHold &&\r\n Permissions.Statement.canPermanentlyDelete();\r\n let permanentlyDeleteTooltip, restoreSoftDeletedTooltip;\r\n if (!_canRestoreSoftDeleted) {\r\n restoreSoftDeletedTooltip = new TooltipOptions({\r\n text: 'permissions.delete.statement',\r\n id: 'delete-statement-tooltip-id',\r\n position: 'left',\r\n });\r\n }\r\n if (!_canPermanentlyDelete) {\r\n permanentlyDeleteTooltip = new TooltipOptions({\r\n text: 'permissions.delete.statement',\r\n id: 'delete-statement-tooltip-id',\r\n position: 'left',\r\n });\r\n }\r\n return [\r\n new DataGridColumn({\r\n key: 'revisionNumber',\r\n header: 'statement-list.revisions-modal-col.revision',\r\n width: '22.5%',\r\n }),\r\n new DataGridColumn({\r\n key: 'deleteDate',\r\n header: 'statement-list.deleted-revisions-modal-col.processed-date',\r\n width: '22.5%',\r\n formatter: (revision) =>\r\n moment(revision.deletedDate).format(DATE_FORMATS.MONTH_DAY_YEAR),\r\n }),\r\n new DataGridColumn({\r\n key: 'deletedBy',\r\n header: 'statement-list.deleted-revisions-modal-col.processed-by',\r\n width: '22.5%',\r\n formatter: (revision, { rowKey }) => {\r\n const colId = `last-modified-by-col-${rowKey}`;\r\n const displayText = revision.lastModifiedByUserEntity\r\n ? getUserNameByUserDataObject(revision.processedByUserEntity)\r\n : null;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: null,\r\n header: 'statement-list.revisions-modal-col.percent-verified',\r\n width: '22.5%',\r\n formatter: (revision, { rowKey }) => {\r\n return `${Math.round(\r\n (revision.percentageCompleted * 100 * 100) / 100,\r\n )}%`;\r\n },\r\n }),\r\n new DataGridKebabColumn({\r\n options: [\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.view',\r\n onSelectOption: onView,\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.restore',\r\n disabled: !_canRestoreSoftDeleted,\r\n tooltip: restoreSoftDeletedTooltip,\r\n shouldShowOption: () => !selectedStatement.isInArchivalFlow(),\r\n onSelectOption: onRestore,\r\n }),\r\n new KebabMenuOption({\r\n title: 'statement-list.kebab.delete-permanently',\r\n disabled: !_canPermanentlyDelete,\r\n tooltip: permanentlyDeleteTooltip,\r\n onSelectOption: onPermanentlyDelete,\r\n }),\r\n ],\r\n dropdownId: 'delete-revision-kebab-id',\r\n className: 'statement-list__delete-revision-modal-kebab-menu',\r\n usePortalMenu: false,\r\n }),\r\n ];\r\n};\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport class RevisionList extends ApiModel({\r\n data: {\r\n revisions: [],\r\n },\r\n status: null,\r\n}) {\r\n get revisions() {\r\n return this.data ? this.data.revisions : [];\r\n }\r\n\r\n get length() {\r\n return this.data && this.data.revisions ? this.data.revisions.length : 0;\r\n }\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n revisions: response.data,\r\n },\r\n status: response.status,\r\n };\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport DataGrid from 'components/common/data-grid/data-grid-component';\r\nimport {\r\n getRevisionHistoryListColumns,\r\n NUM_VISIBLE_ROWS_REVISIONS_MODAL,\r\n} from 'constants/feature/revision-history-constants';\r\nimport { DataGridDataApi } from 'models/utils/common/data-grid/data-grid-data-model';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Modal from 'components/common/modal-component';\r\nimport { RevisionList } from 'models/api/revision-list-api-model';\r\nimport revisionApi from 'api/revision-api.js';\r\nimport { REVISION_STATUSES } from 'constants/feature/revision-status-constants';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport { history } from 'store/store';\r\nimport { ROUTE_CONSTANTS, parseRoute } from 'constants/util/route-constants';\r\n\r\nconst REVISION_HISTORY_BLOCK = 'revision-history-modal';\r\nconst REVISION_HISTORY_ID_BLOCK = 'revision-history-modal-id';\r\n\r\nclass RevisionHistoryModal extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n revisionList: new RevisionList(),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this._fetchRevisions();\r\n }\r\n\r\n _fetchRevisions = async () => {\r\n const { selectedStatementId } = this.props;\r\n\r\n this.setState(({ revisionList }) => ({\r\n revisionList: revisionList.setLoading(),\r\n }));\r\n try {\r\n const response = await revisionApi.getAllRevisionsForStatement(\r\n selectedStatementId,\r\n );\r\n this.setState(({ revisionList }) => ({\r\n revisionList: revisionList.setLoaded({ response }),\r\n }));\r\n } catch (e) {\r\n this.setState(({ revisionList }) => ({\r\n revisionList: revisionList.setError(e),\r\n }));\r\n }\r\n };\r\n\r\n render() {\r\n const { project, toggleStatementRevisonsModal } = this.props;\r\n const { revisionList } = this.state;\r\n\r\n return (\r\n \r\n \r\n history.push(\r\n parseRoute(ROUTE_CONSTANTS.STATEMENT_CONTENT_PAGE, {\r\n params: {\r\n projectId: project.id,\r\n revisionId: revision.id,\r\n statementId: revision.statementId,\r\n readOnly: true,\r\n },\r\n }),\r\n ),\r\n })}\r\n tableId={`${REVISION_HISTORY_ID_BLOCK}-revision-modal-table`}\r\n rowClassnames={(revision) => [\r\n `${REVISION_HISTORY_BLOCK}__revisions-list-item`,\r\n revision.status === REVISION_STATUSES.DELETED.id\r\n ? `${REVISION_HISTORY_BLOCK}__revisions-list-item--deleted`\r\n : null,\r\n ]}\r\n dataModel={\r\n new DataGridDataApi({\r\n apiModel: revisionList,\r\n rowItems: revisionList.revisions,\r\n })\r\n }\r\n scrollable\r\n numberOfVisibleRows={NUM_VISIBLE_ROWS_REVISIONS_MODAL}\r\n />\r\n \r\n );\r\n }\r\n}\r\n\r\nRevisionHistoryModal.propTypes = {\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** Method pn the statement list component that opens the show revision modal */\r\n toggleStatementRevisonsModal: PropTypes.func.isRequired,\r\n /** Statement id to fetch revisions for */\r\n selectedStatementId: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default RevisionHistoryModal;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport DataGrid from 'components/common/data-grid/data-grid-component';\r\nimport {\r\n getDeletedRevisionHistoryListColumns,\r\n NUM_VISIBLE_ROWS_REVISIONS_MODAL,\r\n} from 'constants/feature/revision-history-constants';\r\nimport { DataGridDataApi } from 'models/utils/common/data-grid/data-grid-data-model';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Modal from 'components/common/modal-component';\r\nimport { RevisionList } from 'models/api/revision-list-api-model';\r\nimport revisionApi from 'api/revision-api.js';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport { history } from 'store/store';\r\nimport { ROUTE_CONSTANTS, parseRoute } from 'constants/util/route-constants';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\n\r\nconst REVISION_HISTORY_BLOCK = 'revision-history-modal';\r\nconst REVISION_HISTORY_ID_BLOCK = 'revision-history-modal-id';\r\n\r\nclass DeletedRevisionHistoryModal extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n revisionList: new RevisionList(),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n this._fetchRevisions();\r\n }\r\n\r\n _fetchRevisions = async () => {\r\n const { selectedStatement } = this.props;\r\n\r\n this.setState(({ revisionList }) => ({\r\n revisionList: revisionList.setLoading(),\r\n }));\r\n try {\r\n const response = await revisionApi.getDeletedRevisionsForStatement(\r\n selectedStatement.id\r\n );\r\n this.setState(({ revisionList }) => ({\r\n revisionList: revisionList.setLoaded({ response }),\r\n }));\r\n } catch (e) {\r\n this.setState(({ revisionList }) => ({\r\n revisionList: revisionList.setError(e),\r\n }));\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n project,\r\n toggleStatementRevisonsModal,\r\n selectedStatement,\r\n onDelete,\r\n onRestore,\r\n } = this.props;\r\n const { revisionList } = this.state;\r\n\r\n return (\r\n \r\n \r\n history.push(\r\n parseRoute(ROUTE_CONSTANTS.STATEMENT_CONTENT_PAGE, {\r\n params: {\r\n projectId: project.id,\r\n revisionId: revision.id,\r\n statementId: revision.statementId,\r\n readOnly: true,\r\n },\r\n })\r\n ),\r\n onRestore: (revision) =>\r\n onRestore({\r\n revisionId: revision.id,\r\n lastRevision: revisionList.length === 1,\r\n }),\r\n onPermanentlyDelete: (revision) =>\r\n onDelete({\r\n revisionId: revision.id,\r\n lastRevision: revisionList.length === 1,\r\n }),\r\n })}\r\n tableId={`${REVISION_HISTORY_ID_BLOCK}-revision-modal-table`}\r\n dataModel={\r\n new DataGridDataApi({\r\n apiModel: revisionList,\r\n rowItems: revisionList.revisions,\r\n })\r\n }\r\n scrollable\r\n numberOfVisibleRows={NUM_VISIBLE_ROWS_REVISIONS_MODAL}\r\n />\r\n \r\n );\r\n }\r\n}\r\n\r\nDeletedRevisionHistoryModal.propTypes = {\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** Method pn the statement list component that opens the show revision modal */\r\n toggleStatementRevisonsModal: PropTypes.func.isRequired,\r\n /** selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n /** action to permanently delete a specific revision */\r\n onDelete: PropTypes.func.isRequired,\r\n /** Method to restore a revision */\r\n onRestore: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default DeletedRevisionHistoryModal;\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\n\r\nimport Statement from 'models/data/statement-model';\r\n\r\nconst PERMANENTLY_DELETE_REVISION_ID_BLOCK =\r\n 'id-permanently-delete-revision-modal';\r\n\r\nconst PermanentlyDeleteSingleRevisionModal = ({\r\n statementToDelete,\r\n onClose,\r\n onDelete,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nPermanentlyDeleteSingleRevisionModal.propTypes = {\r\n /** Statement model holding the revisions that can be deleted */\r\n statementToDelete: PropTypes.instanceOf(Statement).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** primary function fired when deletion is confirmed */\r\n onDelete: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(PermanentlyDeleteSingleRevisionModal);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Modal from 'components/common/modal-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nconst RESTORE_REVISION_ID_BLOCK = 'restore-deleted-revision-modal-id';\r\n\r\nconst RestoreRevisionErrorModal = ({ toggleRestoreModal, onOkay }) => {\r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nRestoreRevisionErrorModal.propTypes = {\r\n /** Method to provided to modal to show and hide modal */\r\n toggleRestoreModal: PropTypes.func.isRequired,\r\n /** Method that handles what happens when the okay button is clicked */\r\n onOkay: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default RestoreRevisionErrorModal;\r\n","import React, { memo, Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport DeletedHistoryModal from 'components/feature/statement-list/_deleted-revision-history-modal';\r\nimport ConfirmDeleteRevisionModal from 'components/feature/statement-list/permanently-delete-single-revision-modal';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport RestoreRevisionErrorModal from './restore-deleted-revision-error-modal';\r\nimport { restoreDeletedRevisionRequest } from 'api/statement-list-api';\r\nimport { BAD_REQUEST } from 'http-status-codes';\r\nimport ProjectApi from 'models/api/project-api-model';\r\n\r\n/**\r\n * This wrapper encapsulates the state and logic for actions that can be committed from the Deleted Revision History Modal (DRHM)\r\n * instead of cluttering the statement-list-component with state variables that are only scoped for the DRHM.\r\n *\r\n * The overall display of this wrapper is controlled like a normal modal in the statement-list component, this allows actions\r\n * in higher scopes to cancel this flow (by changing the boolean variable that controls this wrappers display in the parent).\r\n *\r\n * The display of the DRHM is also controlled locally with `showHistoryModalLocally`, since some actions require separate\r\n * confirmation modals to appear, we need a way to hide the DRHM but store some state about it\r\n */\r\nclass DeletedRevisionHistoryStateWrapper extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n selectedRevisionId: null,\r\n isLastRevisionInHistory: false,\r\n showHistoryModalLocally: true, // handles the showing and hiding of the history modal within this scope\r\n showDeleteConfirmationModal: false,\r\n showRestoreRevisionErrorModal: false,\r\n };\r\n }\r\n\r\n _onHistoryDeleteSelected = ({ revisionId, lastRevision }) => {\r\n this.setState({\r\n selectedRevisionId: revisionId,\r\n isLastRevisionInHistory: lastRevision,\r\n showHistoryModalLocally: false,\r\n showDeleteConfirmationModal: true,\r\n });\r\n };\r\n\r\n _onHistoryRestoreSelected = async ({ revisionId }) => {\r\n const {\r\n refreshStatementList,\r\n closeWholeFlowFromParent,\r\n selectedStatement,\r\n } = this.props;\r\n try {\r\n await restoreDeletedRevisionRequest(revisionId, selectedStatement.id);\r\n\r\n this.setState({ showHistoryModalLocally: false });\r\n refreshStatementList();\r\n closeWholeFlowFromParent();\r\n } catch (error) {\r\n const statusCode = error.response.status;\r\n /** Failed response returns with 2 errors for now: server error (500) and bad request; action not allowed(400) We need to deferenciate these so we can display appropriate error message. We need to handle error status 400*/\r\n if (statusCode === BAD_REQUEST) {\r\n this.setState({\r\n showHistoryModalLocally: false,\r\n showRestoreRevisionErrorModal: true,\r\n });\r\n }\r\n }\r\n };\r\n\r\n _onDeleteConfirmation = async () => {\r\n const {\r\n closeWholeFlowFromParent,\r\n refreshStatementList,\r\n permanentlyDeleteRevision,\r\n selectedStatement,\r\n } = this.props;\r\n const { isLastRevisionInHistory, selectedRevisionId } = this.state;\r\n // TODO error handling for failed request\r\n await permanentlyDeleteRevision(selectedRevisionId, selectedStatement.id);\r\n\r\n if (isLastRevisionInHistory) {\r\n // if the last revision was deleted, we need to close the modal completely (from the parent)\r\n this.setState({ showDeleteConfirmationModal: false });\r\n refreshStatementList();\r\n closeWholeFlowFromParent(); // closes from parent, thus clearing all react state\r\n } else {\r\n this.setState({\r\n showDeleteConfirmationModal: false,\r\n showHistoryModalLocally: true,\r\n });\r\n }\r\n };\r\n\r\n _onCancelDelete = () => {\r\n this.setState({\r\n showDeleteConfirmationModal: false,\r\n showHistoryModalLocally: true,\r\n });\r\n };\r\n\r\n _onCloseRestoreModal = () => {\r\n this.setState({\r\n showRestoreRevisionErrorModal: false,\r\n showHistoryModalLocally: false,\r\n });\r\n };\r\n\r\n _onOkayConfirm = () => {\r\n this.setState({\r\n showRestoreRevisionErrorModal: false,\r\n showHistoryModalLocally: true,\r\n });\r\n };\r\n\r\n render() {\r\n const { project, selectedStatement, closeWholeFlowFromParent } = this.props;\r\n const {\r\n showHistoryModalLocally,\r\n showDeleteConfirmationModal,\r\n showRestoreRevisionErrorModal,\r\n } = this.state;\r\n\r\n return (\r\n <>\r\n {showHistoryModalLocally && (\r\n \r\n )}\r\n {showDeleteConfirmationModal && (\r\n \r\n )}\r\n {showRestoreRevisionErrorModal && (\r\n \r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nDeletedRevisionHistoryStateWrapper.propTypes = {\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** Selected statement viewing deleted revisions of */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n /** function for controlling the display of the wrapper from the parent*/\r\n closeWholeFlowFromParent: PropTypes.func.isRequired,\r\n /** function fired to request the api to delete a selected revision*/\r\n permanentlyDeleteRevision: PropTypes.func.isRequired,\r\n /** function for initiating a call to update the deleted statements tab of the statement list, usefull if all revisions were deleted from a given statement */\r\n refreshStatementList: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(DeletedRevisionHistoryStateWrapper);\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nimport Statement from 'models/data/statement-model';\r\n\r\nconst SOFT_DELETE_ALL_REVISIONS_ID_BLOCK =\r\n 'id-soft-delete-active-revision-modal';\r\n\r\nconst SoftDeleteAllRevisionsModal = ({\r\n statementToDelete,\r\n onClose,\r\n onDelete,\r\n}) => {\r\n return (\r\n onDelete(),\r\n })\r\n }\r\n >\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nSoftDeleteAllRevisionsModal.propTypes = {\r\n /** Statement model holding the revisions that can be deleted */\r\n statementToDelete: PropTypes.instanceOf(Statement).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** primary function fired when deletion is confirmed */\r\n onDelete: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(SoftDeleteAllRevisionsModal);\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nimport Statement from 'models/data/statement-model';\r\n\r\nconst SOFT_DELETE_ACTIVE_REVISION_ID_BLOCK =\r\n 'id-soft-delete-active-revision-modal';\r\n\r\nconst SoftDeleteLatestRevisionModal = ({\r\n statementToDelete,\r\n onClose,\r\n onDelete,\r\n}) => {\r\n return (\r\n onDelete(),\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.cancel',\r\n onClick: onClose,\r\n })\r\n }\r\n >\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nSoftDeleteLatestRevisionModal.propTypes = {\r\n /** Statement model holding the revisions that can be deleted */\r\n statementToDelete: PropTypes.instanceOf(Statement).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** primary function fired when deletion is confirmed */\r\n onDelete: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(SoftDeleteLatestRevisionModal);\r\n","import React, { memo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Radio from 'components/common/radio-component';\r\nimport { RadioOption } from 'models/utils/common/radio-options-model';\r\n\r\nimport { DELETE_STATEMENT_OPTIONS } from 'constants/feature/statement-list-constants';\r\nimport Statement from 'models/data/statement-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nconst PERMANENTLY_DELETE_REVISION_ID_BLOCK =\r\n 'id-permanently-delete-revision-modal';\r\nconst PERMANENTLY_DELETE_REVISION_BLOCK = 'permanently-delete-revision-modal';\r\n\r\nconst PermanentlyDeleteRevisionsModal = ({\r\n statementToDelete,\r\n onClose,\r\n onDeleteTop,\r\n onDeleteAll,\r\n}) => {\r\n const [revisionDeleteSelection, setRevisionDeleteSelection] = useState(null);\r\n return (\r\n {\r\n if (revisionDeleteSelection === DELETE_STATEMENT_OPTIONS.CURRENT) {\r\n onDeleteTop();\r\n } else if (\r\n revisionDeleteSelection === DELETE_STATEMENT_OPTIONS.ALL\r\n ) {\r\n onDeleteAll();\r\n }\r\n // do nothing if no option selected\r\n },\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.cancel',\r\n onClick: onClose,\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\nPermanentlyDeleteRevisionsModal.propTypes = {\r\n /** Statement model holding the revisions that can be deleted */\r\n statementToDelete: PropTypes.instanceOf(Statement).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** Function fired when user chooses to delete most recent */\r\n onDeleteTop: PropTypes.func.isRequired,\r\n /** Function fired when user chooses to delete all */\r\n onDeleteAll: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(PermanentlyDeleteRevisionsModal);\r\n","import ApiModel from 'models/api-model';\r\nexport default class StatementWrapUpStats extends ApiModel({\r\n data: {\r\n totalElements: 0,\r\n verifiedElements: 0,\r\n reviewedElements: 0,\r\n totalNotes: 0,\r\n },\r\n}) {\r\n get totalElements() {\r\n if (this.data) {\r\n return this.data.totalElements;\r\n }\r\n return 0;\r\n }\r\n get verifiedElements() {\r\n if (this.data) {\r\n return this.data.verifiedElements;\r\n }\r\n return 0;\r\n }\r\n get reviewedElements() {\r\n if (this.data) {\r\n return this.data.reviewedElements;\r\n }\r\n return 0;\r\n }\r\n get totalNotes() {\r\n if (this.data) {\r\n return this.data.totalNotes;\r\n }\r\n return 0;\r\n }\r\n get verifiedPercentage() {\r\n return Math.round((this.verifiedElements * 100) / this.totalElements);\r\n }\r\n get reviewedPercentage() {\r\n return ((this.reviewedElements * 100) / this.totalElements).toFixed(2);\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: response.data,\r\n };\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\n\r\nimport { FormattedMessage } from 'react-intl';\r\nimport StatementWrapUpStatsModel from 'models/api/statement-wrap-up/statement-wrap-up-stats-api-model';\r\n\r\nexport const WRAP_UP_STATS_BLOCK = 'statement-wrap-up-stats';\r\n\r\nconst StatementWrapUpStats = ({ stats, className, notAllElementsVerified }) => {\r\n return (\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 \r\n \r\n \r\n \r\n {stats.totalNotes}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nStatementWrapUpStats.propTypes = {\r\n /** Stats model containing data */\r\n stats: PropTypes.instanceOf(StatementWrapUpStatsModel).isRequired,\r\n /** optional classname applied to top level block */\r\n className: PropTypes.string,\r\n /* Boolean to know if al elements are verified */\r\n notAllElementsVerified: PropTypes.bool,\r\n};\r\n\r\nexport default StatementWrapUpStats;\r\n","import React, { useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport ProjectApi from 'models/api/project-api-model';\r\n\r\nimport Statement from 'models/data/statement-model';\r\nimport {\r\n submitStatementForWrapUpApprovalRequest,\r\n getStatementSubmitForWrapUpApprovalStatsRequest,\r\n} from 'api/statement-list-api';\r\nimport StatementWrapUpStatsModel from 'models/api/statement-wrap-up/statement-wrap-up-stats-api-model';\r\nimport { connect } from 'react-redux';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport StatementWrapUpStats from './_statement-wrap-up-stats-component';\r\n\r\nconst STATEMENT_WRAP_UP_SUBMISSION_ID_BLOCK =\r\n 'statement-wrap-up-submission-modal-id';\r\n\r\nexport const STATEMENT_WRAP_UP_SUBMISSION_BLOCK =\r\n 'statement-wrap-up-submission-modal';\r\n\r\nconst SubmitStatementWrapUpApprovalModal = ({\r\n statement,\r\n project,\r\n onClose,\r\n onSubmit,\r\n}) => {\r\n const [submitStats, setSubmitStats] = useState(\r\n new StatementWrapUpStatsModel(),\r\n );\r\n let notAllElementsVerified = null;\r\n if (submitStats.isLoaded) {\r\n notAllElementsVerified =\r\n submitStats.totalElements !== submitStats.verifiedElements;\r\n }\r\n\r\n useEffect(() => {\r\n const loadStatementDetails = async () => {\r\n setSubmitStats((s) => s.setLoading());\r\n try {\r\n const response = await getStatementSubmitForWrapUpApprovalStatsRequest({\r\n statementId: statement.id,\r\n });\r\n setSubmitStats((s) => s.setLoaded({ response }));\r\n } catch (error) {\r\n setSubmitStats((s) => s.setError(error));\r\n }\r\n };\r\n loadStatementDetails();\r\n }, [statement]);\r\n\r\n const handleSubmit = async () => {\r\n setSubmitStats((s) => s.setLoading());\r\n try {\r\n await submitStatementForWrapUpApprovalRequest({\r\n statementId: statement.id,\r\n });\r\n onSubmit();\r\n } catch (error) {\r\n setSubmitStats((s) => s.setError(error));\r\n }\r\n };\r\n return (\r\n \r\n \r\n {notAllElementsVerified && (\r\n {chunks},\r\n },\r\n }}\r\n isInternationalized={true}\r\n isInteractive={false}\r\n className={`${STATEMENT_WRAP_UP_SUBMISSION_BLOCK}__banner`}\r\n />\r\n )}\r\n \r\n
\r\n
\r\n \r\n {project.name}\r\n \r\n \r\n {statement.statementName}\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nSubmitStatementWrapUpApprovalModal.propTypes = {\r\n /** Statement model to be wrapped up */\r\n statement: PropTypes.instanceOf(Statement).isRequired,\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** primary function fired when submission is confirmed */\r\n onSubmit: PropTypes.func.isRequired,\r\n};\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { project },\r\n },\r\n}) => ({\r\n project,\r\n});\r\n\r\nexport { SubmitStatementWrapUpApprovalModal };\r\nexport default connect(\r\n mapStateToProps,\r\n null,\r\n)(SubmitStatementWrapUpApprovalModal);\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport User from 'models/data/user-model';\r\nimport StatementWrapUpStats from './statement-wrap-up-stats-api-model';\r\nexport default class StatementWrapUpApprovalStats extends ApiModel({\r\n data: {\r\n reviewedElements: 0,\r\n submitDate: null,\r\n submitUser: new User(),\r\n totalElements: 0,\r\n totalNotes: 0,\r\n verifiedElements: 0,\r\n },\r\n}) {\r\n get totalElements() {\r\n if (this.data) {\r\n return this.data.totalElements;\r\n }\r\n return 0;\r\n }\r\n get verifiedElements() {\r\n if (this.data) {\r\n return this.data.verifiedElements;\r\n }\r\n return 0;\r\n }\r\n get reviewedElements() {\r\n if (this.data) {\r\n return this.data.reviewedElements;\r\n }\r\n return 0;\r\n }\r\n get totalNotes() {\r\n if (this.data) {\r\n return this.data.totalNotes;\r\n }\r\n return 0;\r\n }\r\n get verifiedPercentage() {\r\n return ((this.verifiedElements * 100) / this.totalElements).toFixed(2);\r\n }\r\n get reviewedPercentage() {\r\n return ((this.reviewedElements * 100) / this.totalElements).toFixed(2);\r\n }\r\n\r\n get submitDate() {\r\n if (this.data && !isNullOrUndefined(this.data.submitDate)) {\r\n return this.data.submitDate;\r\n }\r\n return null;\r\n }\r\n get submitUser() {\r\n if (this.data && !isNullOrUndefined(this.data.submitUser)) {\r\n return this.data.submitUser;\r\n }\r\n return new User();\r\n }\r\n\r\n asWrapUpStatsModel() {\r\n const response = {\r\n data: {\r\n totalElements: this.totalElements,\r\n verifiedElements: this.verifiedElements,\r\n reviewedElements: this.reviewedElements,\r\n totalNotes: this.totalNotes,\r\n },\r\n };\r\n return new StatementWrapUpStats().setLoaded({ response });\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n ...response.data,\r\n submitUser: new User(response.data.submitUser),\r\n },\r\n };\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport moment from 'moment';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport Statement from 'models/data/statement-model';\r\nimport { connect } from 'react-redux';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport StatementWrapUpStats from '../_statement-wrap-up-stats-component';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport {\r\n rejectStatementWrapUpRequest,\r\n getStatementApprovalStatsRequest,\r\n} from 'api/statement-list-api';\r\nimport StatementWrapUpApprovalStats from 'models/api/statement-wrap-up/statement-wrap-up-approval-stats-api-model';\r\nimport { getUserNameByUserDataObject } from 'utils/statement-content-page-utils';\r\n\r\nconst STATEMENT_WRAP_UP_APPROVAL_1_ID_BLOCK =\r\n 'statement-wrap-up-approval-modal-1-id';\r\n\r\nexport const STATEMENT_WRAP_UP_APPROVAL_1_BLOCK =\r\n 'statement-wrap-up-approval-modal-1';\r\n\r\nconst ApproveStatementWrapUpModal1 = ({\r\n statement,\r\n project,\r\n onClose,\r\n onDecline,\r\n onApprove,\r\n}) => {\r\n const [approvalStats, setApprovalStats] = useState(\r\n new StatementWrapUpApprovalStats(),\r\n );\r\n useEffect(() => {\r\n const loadStatementDetails = async () => {\r\n setApprovalStats((s) => s.setLoading());\r\n try {\r\n const response = await getStatementApprovalStatsRequest({\r\n statementId: statement.id,\r\n });\r\n setApprovalStats((s) => s.setLoaded({ response }));\r\n } catch (error) {\r\n setApprovalStats((s) => s.setError(error));\r\n }\r\n };\r\n loadStatementDetails();\r\n }, [statement]);\r\n\r\n const handleDecline = async () => {\r\n setApprovalStats((s) => s.setLoading());\r\n try {\r\n await rejectStatementWrapUpRequest({ statementId: statement.id });\r\n onDecline();\r\n } catch (error) {\r\n setApprovalStats((s) => s.setError(error));\r\n }\r\n };\r\n return (\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {project.name}\r\n \r\n \r\n {statement.statementName}\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n );\r\n};\r\n\r\nApproveStatementWrapUpModal1.propTypes = {\r\n /** Statement model to be wrapped up */\r\n statement: PropTypes.instanceOf(Statement).isRequired,\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** primary function fired when approval is confirmed */\r\n onApprove: PropTypes.func.isRequired,\r\n};\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { project },\r\n },\r\n}) => ({\r\n project,\r\n});\r\n\r\nexport { ApproveStatementWrapUpModal1 };\r\nexport default connect(mapStateToProps, null)(ApproveStatementWrapUpModal1);\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport Statement from 'models/data/statement-model';\r\nimport { connect } from 'react-redux';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport { approveStatementWrapUpRequest } from 'api/statement-list-api';\r\nimport Loading from 'components/common/loading-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { CurrentUser } from 'models/api/current-user-model';\r\nimport { toast } from 'react-toastify';\r\nimport Notification from 'components/common/notification-component';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button-red.svg';\r\n\r\nconst STATEMENT_WRAP_UP_APPROVAL_2_ID_BLOCK =\r\n 'statement-wrap-up-approval-modal-2-id';\r\n\r\nexport const STATEMENT_WRAP_UP_APPROVAL_2_BLOCK =\r\n 'statement-wrap-up-approval-modal-2';\r\n\r\nconst ApproveStatementWrapUpModal2 = ({\r\n statement,\r\n project,\r\n onClose,\r\n onApprove,\r\n currentUser,\r\n}) => {\r\n const [signedDate, setSignedDate] = useState(null);\r\n const [loading, setLoading] = useState(false);\r\n const handleApprove = async () => {\r\n setLoading(true);\r\n try {\r\n await approveStatementWrapUpRequest({\r\n statementId: statement.id,\r\n signedDate,\r\n });\r\n onApprove();\r\n } catch (error) {\r\n toast.error(\r\n }\r\n message={{\r\n id: 'statement-list.wrap-up-approval.modal.2.toast-error-message',\r\n }}\r\n title={{\r\n id: 'statement-list.wrap-up-approval.modal.2.toast-error-title',\r\n }}\r\n />,\r\n { autoClose: 3000 },\r\n );\r\n onClose();\r\n }\r\n };\r\n const _currentUser = currentUser.getUser();\r\n return (\r\n \r\n {loading ? (\r\n \r\n ) : (\r\n \r\n {chunks},\r\n ul: (...chunks) => (\r\n \r\n {chunks}\r\n \r\n ),\r\n li: (...chunks) =>
  • {chunks}
  • ,\r\n },\r\n }}\r\n isInternationalized={true}\r\n isInteractive={false}\r\n />\r\n

    \r\n \r\n

    \r\n
    \r\n \r\n setSignedDate((curDate) =>\r\n isNullOrUndefined(curDate) ? Date.now() : null,\r\n )\r\n }\r\n />\r\n \r\n {`${_currentUser.preferredFullName}`} ({_currentUser.email})\r\n \r\n
    \r\n
    \r\n )}\r\n \r\n );\r\n};\r\n\r\nApproveStatementWrapUpModal2.propTypes = {\r\n /** Statement model to be wrapped up */\r\n statement: PropTypes.instanceOf(Statement).isRequired,\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** Currently signed in user object */\r\n currentUser: PropTypes.instanceOf(CurrentUser).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** primary function fired when approval is confirmed */\r\n onApprove: PropTypes.func.isRequired,\r\n};\r\nconst mapStateToProps = ({\r\n data: {\r\n currentUser,\r\n selectedProject: { project },\r\n },\r\n}) => ({\r\n project,\r\n currentUser,\r\n});\r\n\r\nexport { ApproveStatementWrapUpModal2 };\r\nexport default connect(mapStateToProps, null)(ApproveStatementWrapUpModal2);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Statement from 'models/data/statement-model';\r\nimport ApproveStatementWrapUpModal1 from './statement-wrap-up-approval-modal-1';\r\nimport ApproveStatementWrapUpModal2 from './statement-wrap-up-approval-modal-2';\r\n\r\nconst StatementWrapUpApprovalFlowWrapper = ({\r\n statement,\r\n onClose,\r\n onDecline,\r\n onApprove,\r\n}) => {\r\n // React.useState instead of useState will help us test useState as in scope of React and not function locally\r\n const [showModal1, setShowModal1] = React.useState(true);\r\n const [showModal2, setShowModal2] = React.useState(false);\r\n\r\n return (\r\n <>\r\n {showModal1 && (\r\n {\r\n setShowModal1(false);\r\n onClose();\r\n }}\r\n onDecline={onDecline}\r\n onApprove={() => {\r\n setShowModal1(false);\r\n setShowModal2(true);\r\n }}\r\n />\r\n )}\r\n {showModal2 && (\r\n {\r\n setShowModal2(false);\r\n onClose();\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nStatementWrapUpApprovalFlowWrapper.propTypes = {\r\n /** Statement model to be wrapped up */\r\n statement: PropTypes.instanceOf(Statement).isRequired,\r\n /** function fired for cancel and close of modal flow */\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementWrapUpApprovalFlowWrapper;\r\n","import React, { useEffect, useMemo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { connect } from 'react-redux';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport Modal from 'components/common/modal-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport Statement from 'models/data/statement-model';\r\n\r\nimport { ProjectList } from 'models/api/project-list-model';\r\nimport { getProjectsInParticularGeo } from 'api/project-list-api';\r\nimport {\r\n getProjectNameMenuOptions,\r\n defaultSelectedProject,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport RolesUtil from 'permissions/utils/roles';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { isArray } from 'lodash';\r\nimport { isUserHasAccessToProject } from 'utils/project-utils';\r\nimport { getSourceClientIdForCopyStatement } from 'api/statement-list-api';\r\n\r\nconst STATEMENT_COPY_ID_BLOCK = 'statement-copy-modal-id';\r\n\r\nexport const STATEMENT_COPY_BLOCK = 'statement-copy-modal';\r\nconst SUPPORT_PROJECT = 'Tie out support';\r\n\r\nconst COPY_STATEMENT_DISABLED_TOOLTIP = new TooltipOptions({\r\n text: 'permissions.copy.statement.disabled',\r\n id: 'copy-statement-disabled-tooltip-id',\r\n position: 'left',\r\n});\r\n\r\nconst CopyStatementModal = ({ statement, project, onClose, onClickCopy }) => {\r\n const [projectList, setProjectList] = useState(new ProjectList());\r\n const [selectedProject, setSelectedProject] = useState(\r\n defaultSelectedProject(project),\r\n );\r\n const [sourceClientId, setSourceClientId] = useState(0);\r\n useEffect(() => {\r\n const loadProjectList = async () => {\r\n setProjectList((s) => s.setLoading());\r\n try {\r\n const response = await getProjectsInParticularGeo();\r\n response.data.result = isArray(response.data.result)\r\n ? response.data.result.filter(\r\n (_project) => _project.containerCode === project.containerCode,\r\n )\r\n : [];\r\n setProjectList((s) => s.setLoaded({ response }));\r\n } catch (error) {\r\n setProjectList((s) => s.setError(error));\r\n }\r\n };\r\n loadProjectList();\r\n }, [project.containerCode]);\r\n\r\n useEffect(() => {\r\n const getSourceClientId = async () => {\r\n try {\r\n const response = await getSourceClientIdForCopyStatement({\r\n statementId: statement.id,\r\n });\r\n if (response.data) {\r\n setSourceClientId(response.data);\r\n }\r\n } catch (e) {\r\n console.error('Failed to fetch source client id: ', e);\r\n }\r\n };\r\n project.engagementEntity.clientName === SUPPORT_PROJECT &&\r\n getSourceClientId();\r\n }, [project, statement.id]);\r\n\r\n const handleOnClick = async () => {\r\n onClickCopy(statement, selectedProject);\r\n };\r\n\r\n const eligibleProjectList = useMemo(() => {\r\n if (sourceClientId) {\r\n if (!projectList.isLoaded) return [];\r\n return projectList.getActiveProjects().filter((proj) => {\r\n return (\r\n parseInt(proj.id) === sourceClientId || proj.id === selectedProject.id\r\n );\r\n });\r\n }\r\n if (!projectList.isLoaded) return [];\r\n return projectList.getActiveProjects().filter((proj) => {\r\n // returns true if user has access to project(proj.id)\r\n const hasAccessToProject = isUserHasAccessToProject(proj.id);\r\n // returns true if user is admin and project is enabled with support access\r\n const hasAdminAccess = RolesUtil.doesUserHaveAdminSupportAccess(proj.id);\r\n return hasAdminAccess || hasAccessToProject;\r\n });\r\n }, [projectList, selectedProject.id, sourceClientId]);\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {`${statement.percentageComplete}%`}\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 {statement.fiscalYear}\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {moment\r\n .utc(statement.periodEnding)\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR)}\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {statement.type}\r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {statement.revisionNumber}\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n {moment\r\n .utc(statement.archiveDate)\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR)}\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n {\r\n setSelectedProject(project);\r\n }}\r\n required={true}\r\n isValid={true}\r\n options={getProjectNameMenuOptions(eligibleProjectList)}\r\n value={selectedProject}\r\n disabled={statement.legalHold}\r\n tooltip={\r\n statement.legalHold ? COPY_STATEMENT_DISABLED_TOOLTIP : null\r\n }\r\n />\r\n
    \r\n
    \r\n \r\n );\r\n};\r\n\r\nCopyStatementModal.propTypes = {\r\n /** Statement model to be wrapped up */\r\n statement: PropTypes.instanceOf(Statement).isRequired,\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** function fired for cancel and close of modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** primary function fired when copy statment is confirmed */\r\n onClickCopy: PropTypes.func.isRequired,\r\n};\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { project },\r\n },\r\n}) => ({\r\n project,\r\n});\r\n\r\nexport { CopyStatementModal };\r\nexport default connect(mapStateToProps, null)(CopyStatementModal);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport Permissions from 'permissions/permissions';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport DataGrid from 'components/common/data-grid/data-grid-component';\r\nimport DataGridHeader from 'components/common/data-grid/data-grid-header.component';\r\nimport NoStatementComponent from 'components/feature/statement-list/statement-list-no-statements-component';\r\nimport {\r\n getStatementListColumns,\r\n getDeletedStatementListColumns,\r\n STATEMENT_LIST_TABS,\r\n DELETE_STATEMENT_OPTIONS,\r\n getArchivedStatementListColumns,\r\n STATEMENT_LIST_SORT_COLUMN_KEYS,\r\n} from 'constants/feature/statement-list-constants';\r\nimport { DataGridDataApi } from 'models/utils/common/data-grid/data-grid-data-model';\r\nimport { StatementList } from 'models/api/statement-list-model';\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport { ROUTE_CONSTANTS, parseRoute } from 'constants/util/route-constants';\r\nimport AddRevisonModal from 'components/feature/statement-list/statement-list-add-revision-modal';\r\nimport RevisionHistoryModal from 'components/feature/statement-list/revision-history-modal';\r\nimport DeletedRevisionHistoryStateWrapper from 'components/feature/statement-list/deleted-revision-history-state-wrapper';\r\nimport StatementForm from 'models/form/statement-form-model';\r\nimport ProjectApi from 'models/api/project-api-model';\r\n\r\nimport SoftDeleteAllRevisionsModal from 'components/feature/statement-list/soft-delete-all-revisions-modal';\r\nimport SoftDeleteLatestRevisionModal from 'components/feature/statement-list/soft-delete-latest-revision-modal';\r\nimport PermanentlyDeleteRevisionsModal from 'components/feature/statement-list/permanently-delete-revisions-modal';\r\nimport { restoreDeletedRevisionRequest } from 'api/statement-list-api';\r\nimport RestoreRevisionErrorModal from 'components/feature/statement-list/restore-deleted-revision-error-modal';\r\nimport { BAD_REQUEST } from 'http-status-codes';\r\nimport { DataGridSort } from 'models/utils/common/data-grid/data-grid-sort-model';\r\n\r\nimport { ReactComponent as PlusIcon } from 'icons/plus.svg';\r\nimport { WorkflowsMap } from 'models/api/statement-workflows-map-model';\r\nimport { CurrentUser } from 'models/api/current-user-model';\r\nimport SubmitStatementWrapUpApprovalModal from './submit-statement-for-wrap-up-approval-modal';\r\nimport StatementWrapUpApprovalFlowWrapper from './wrap-up-approval/statement-wrap-up-approval-flow-wrapper';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport StatementExportInProgressModal from 'components/common/statement-export-in-progress-modal';\r\nimport CopyStatementModal from 'components/feature/statement-list/copy-statement-modal';\r\nimport Loading from 'components/common/loading-component';\r\nimport DataGridConstants from 'constants/common/data-grid-constants';\r\nimport { TooltipOptions } from '../../../models/utils/common/tooltip-options-model';\r\nimport { STATEMENT_TYPE_ID_MAP } from 'constants/feature/statement-creation-constants';\r\nimport { isProjectExistInAMERegion } from 'utils/project-utils';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\nimport Statement from 'models/data/statement-model';\r\nimport moment from 'moment';\r\nimport { isStatementExistsInPinnedDetails } from 'utils/statement-content-page-utils';\r\n\r\nexport const STATEMENT_LIST_BLOCK = 'statement-list';\r\n\r\nconst { ROWS_AMOUNT } = DataGridConstants;\r\nconst STATEMENT_LIST_ID_BLOCK = 'statement-list-id';\r\n\r\nconst WRAP_UP_POLLING_INTERVAL = 15000; // 15 sec\r\n\r\nclass StatementListComponent extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.listRef = React.createRef();\r\n this.state = {\r\n showSoftDeleteAllRevisionsModal: false,\r\n showSoftDeleteLatestRevisionModal: false,\r\n showRevisionHistoryModal: false,\r\n showDeletedRevisionHistoryModal: false,\r\n showPermanentlyDeleteRevisionModal: false,\r\n showAddRevisionModal: false,\r\n showRestoreRevisionErrorModal: false,\r\n showSubmitForWrapUpApprovalModal: false,\r\n showApproveWrapUpModal: false,\r\n selectedStatement: null,\r\n revisionDeleteSelection: DELETE_STATEMENT_OPTIONS.CURRENT,\r\n showExportInitiatedModal: false,\r\n showCopyStatementModal: false,\r\n index: ROWS_AMOUNT,\r\n showESCRequestButton: false,\r\n filterInput: {},\r\n showFilterPopup: false,\r\n isFilterActive: false,\r\n\r\n // statementList in props is the full list of statements while in state it is the subset.\r\n // Subset in the sense, that it is either the filtered list of optimized list for render.\r\n statementList: [],\r\n };\r\n this.statementWrapUpPoll = null;\r\n }\r\n\r\n static getDerivedStateFromProps(props, state) {\r\n const { statementList, pinnedDetails } = props;\r\n\r\n const combinedStatements = statementList.getStatements().map((item) => {\r\n const pinnedStatements = pinnedDetails.pinnedStatements.find(\r\n (data) => item.id === data.statementId,\r\n );\r\n const statements = {\r\n ...item,\r\n ...(pinnedStatements\r\n ? {\r\n pinnedDatetime: pinnedStatements.pinnedDatetime,\r\n }\r\n : { pinnedDatetime: null }),\r\n };\r\n return new Statement(statements);\r\n });\r\n const statements = combinedStatements.sort((a, b) => {\r\n if (a.pinnedDatetime === null) return 1; // Move objects with null date to end\r\n if (b.pinnedDatetime === null) return -1; // Move objects with null date to end\r\n return moment(a.pinnedDatetime) - moment(b.pinnedDatetime); // Sort by date\r\n });\r\n\r\n const useVirtualizedList = statements.length > ROWS_AMOUNT;\r\n if (!state.isFilterActive) {\r\n return {\r\n statementList: useVirtualizedList\r\n ? statements.slice(0, state.index)\r\n : statements,\r\n };\r\n }\r\n return null;\r\n }\r\n\r\n // sort the statements based on the pinned statements data\r\n sortPinnedStatements = () => {\r\n const { statementList, pinnedDetails } = this.props;\r\n const combinedStatements = statementList.getStatements().map((item) => {\r\n const pinnedStatements = pinnedDetails.pinnedStatements.find(\r\n (data) => item.id === data.statementId,\r\n );\r\n const statements = {\r\n ...item,\r\n ...(pinnedStatements\r\n ? {\r\n pinnedDatetime: pinnedStatements.pinnedDatetime,\r\n }\r\n : { pinnedDatetime: null }),\r\n };\r\n return new Statement(statements);\r\n });\r\n const statements = combinedStatements.sort((a, b) => {\r\n if (a.pinnedDatetime === null) return 1; // Move objects with null date to end\r\n if (b.pinnedDatetime === null) return -1; // Move objects with null date to end\r\n return moment(a.pinnedDatetime) - moment(b.pinnedDatetime); // Sort by date\r\n });\r\n return statements;\r\n };\r\n\r\n componentDidUpdate(prevProps, prevSate) {\r\n const { statementList, project, pinnedDetails } = this.props;\r\n if (prevProps.project.id !== project.id) {\r\n this.setState({\r\n index: ROWS_AMOUNT,\r\n isFilterActive: false,\r\n filterInput: {},\r\n });\r\n // clear poll for other project\r\n clearTimeout(this.statementWrapUpPoll);\r\n this.statementWrapUpPoll = null;\r\n }\r\n // triggered whenever user Pin's or Unpin's statement\r\n if (\r\n statementList.getStatements().length &&\r\n prevProps.pinnedDetails.getPinnedStatementsLength() !==\r\n pinnedDetails.getPinnedStatementsLength()\r\n ) {\r\n const statements = this.sortPinnedStatements();\r\n this.setState({ statementList: statements });\r\n }\r\n\r\n if (prevProps.statementList.isLoading && statementList.isLoaded) {\r\n // if we load new statements we need to re-initiate polling for statements in approval initiated state\r\n this._pollForStatementsWithApprovalInitiated();\r\n }\r\n if (\r\n prevProps.statementList.data &&\r\n prevProps.statementList.data.statements !== statementList.data.statements\r\n ) {\r\n const showESCRequestButton =\r\n statementList.data.statements.some((statement) => {\r\n return (\r\n statement.statementTypeId ===\r\n STATEMENT_TYPE_ID_MAP.PRIVATE_ANNUAL ||\r\n statement.statementTypeId ===\r\n STATEMENT_TYPE_ID_MAP.PRIVATE_QUARTERLY\r\n );\r\n }) && isProjectExistInAMERegion(project);\r\n this.setState({ showESCRequestButton });\r\n\r\n if (this.state.isFilterActive) {\r\n const { statementList } = this.props;\r\n const statements = statementList.getStatements();\r\n const { filterInput } = this.state;\r\n const filterColumn = STATEMENT_LIST_SORT_COLUMN_KEYS.statementName;\r\n const searchTerm = filterInput[filterColumn].toLowerCase();\r\n const filteredList = statements.filter(\r\n (row) => row[filterColumn].toLowerCase().indexOf(searchTerm) !== -1,\r\n );\r\n this.setState({ statementList: filteredList });\r\n }\r\n }\r\n }\r\n\r\n _toggleExportInitiatedModal = () => {\r\n this.setState((state) => ({\r\n showExportInitiatedModal: !state.showExportInitiatedModal,\r\n }));\r\n };\r\n\r\n _toggleSoftDeleteAllRevisionsModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showSoftDeleteAllRevisionsModal: !state.showSoftDeleteAllRevisionsModal,\r\n };\r\n });\r\n };\r\n\r\n _toggleSoftDeleteLatestRevisionModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showSoftDeleteLatestRevisionModal:\r\n !state.showSoftDeleteLatestRevisionModal,\r\n };\r\n });\r\n };\r\n\r\n _togglePermanentlyDeleteRevisionModal = () => {\r\n this.setState((state) => {\r\n return {\r\n showPermanentlyDeleteRevisionModal:\r\n !state.showPermanentlyDeleteRevisionModal,\r\n };\r\n });\r\n };\r\n\r\n _toggleRevisonHistoryModal = () => {\r\n this.setState((state) => {\r\n return {\r\n showRevisionHistoryModal: !state.showRevisionHistoryModal,\r\n };\r\n });\r\n };\r\n\r\n toggleAddRevisionModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showAddRevisionModal: !state.showAddRevisionModal,\r\n };\r\n });\r\n };\r\n\r\n toggleSubmitForWrapUpApprovalModal = () => {\r\n this.setState((state) => ({\r\n showSubmitForWrapUpApprovalModal: !state.showSubmitForWrapUpApprovalModal,\r\n }));\r\n };\r\n\r\n toggleWrapUpApprovalModal = () => {\r\n this.setState((state) => ({\r\n showApproveWrapUpModal: !state.showApproveWrapUpModal,\r\n }));\r\n };\r\n\r\n onSubmitForWrapUpApprovalSuccess = () => {\r\n const { refreshStatementList } = this.props;\r\n refreshStatementList();\r\n this._pollForStatementsWithApprovalInitiated();\r\n this.toggleSubmitForWrapUpApprovalModal();\r\n };\r\n\r\n _pollForStatementsWithApprovalInitiated = () => {\r\n const { refreshStatementList, statementList } = this.props;\r\n if (\r\n isNullOrUndefined(this.statementWrapUpPoll) &&\r\n statementList.hasStatementsInApprovalInitiated(this.state.statementList)\r\n ) {\r\n this.statementWrapUpPoll = setTimeout(() => {\r\n this.statementWrapUpPoll = null;\r\n refreshStatementList({ withLoading: false });\r\n this._pollForStatementsWithApprovalInitiated();\r\n }, WRAP_UP_POLLING_INTERVAL);\r\n }\r\n };\r\n\r\n onWrapUpDecisionSuccess = () => {\r\n const { refreshStatementList } = this.props;\r\n refreshStatementList();\r\n this.toggleWrapUpApprovalModal();\r\n };\r\n\r\n setStatementToUploadRevisionOn = (statement) => {\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n this.toggleAddRevisionModal();\r\n };\r\n\r\n _clearSelectedStatement = () => {\r\n this.setState({\r\n selectedStatement: null,\r\n });\r\n };\r\n\r\n setStatementToSubmitForWrapUpApproval = (statement) => {\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n this.toggleSubmitForWrapUpApprovalModal();\r\n };\r\n\r\n setStatementForWrapUpApproval = (statement) => {\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n this.toggleWrapUpApprovalModal();\r\n };\r\n\r\n setStatementToDelete = (statement) => {\r\n const { selectedTab } = this.props;\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n if (selectedTab === STATEMENT_LIST_TABS.ACTIVE) {\r\n this._toggleSoftDeleteStatementModal();\r\n } else if (selectedTab === STATEMENT_LIST_TABS.DELETED) {\r\n this._togglePermanentlyDeleteRevisionModal();\r\n }\r\n };\r\n\r\n setSoftDeleteAllRevisions = (statement) => {\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n this._toggleSoftDeleteAllRevisionsModal();\r\n };\r\n\r\n setSoftDeleteLatestRevision = (statement) => {\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n this._toggleSoftDeleteLatestRevisionModal();\r\n };\r\n\r\n pinOrUnpinStatement = (statement) => {\r\n const { updatePinDetails, updateUnpinDetails, project } = this.props;\r\n !isStatementExistsInPinnedDetails(statement.id)\r\n ? updatePinDetails(project.id, statement.id)\r\n : updateUnpinDetails(project.id, statement.id);\r\n };\r\n\r\n getStatementRevisionsForModal = (statement) => {\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n this._toggleRevisonHistoryModal();\r\n };\r\n\r\n _setRadioOptionForDeleteModal = (revisionDeleteSelection) => {\r\n this.setState({\r\n revisionDeleteSelection: revisionDeleteSelection,\r\n });\r\n };\r\n\r\n /**\r\n * For the Delete Revision Modal\r\n * Used to permanently delete top soft deleted revision for a statement\r\n */\r\n _permanentlyDeleteTopRevision = async () => {\r\n const { selectedStatement } = this.state;\r\n const { permanentlyDeleteRevision, selectTabAndGetStatements } = this.props;\r\n // TODO error handling for failed request\r\n await permanentlyDeleteRevision(\r\n selectedStatement.revisionId,\r\n selectedStatement.id,\r\n );\r\n selectTabAndGetStatements({ tab: STATEMENT_LIST_TABS.DELETED });\r\n this._clearSelectedStatement();\r\n this._togglePermanentlyDeleteRevisionModal();\r\n };\r\n\r\n /**\r\n * For the Delete Revision Modal\r\n * Used to delete all soft-deleted revisions for a statement\r\n */\r\n _permanentlyDeleteAllRevisions = async (revisionDeleteSelection) => {\r\n const { selectedStatement } = this.state;\r\n const { permanentlyDeleteAllSoftDeletedRevisionsForStatement } = this.props;\r\n await permanentlyDeleteAllSoftDeletedRevisionsForStatement(\r\n selectedStatement.id,\r\n );\r\n\r\n this._clearSelectedStatement();\r\n this._togglePermanentlyDeleteRevisionModal();\r\n };\r\n\r\n _softDeleteLatestRevision = () => {\r\n const { selectedStatement } = this.state;\r\n const { softDeleteCurrentRevision } = this.props;\r\n softDeleteCurrentRevision({\r\n revisionId: selectedStatement.revisionId,\r\n statementId: selectedStatement.id,\r\n });\r\n this._clearSelectedStatement();\r\n this._toggleSoftDeleteLatestRevisionModal();\r\n };\r\n\r\n _softDeleteAllRevisions = () => {\r\n const { selectedStatement } = this.state;\r\n const { softDeleteAllRevisions } = this.props;\r\n softDeleteAllRevisions(selectedStatement.id);\r\n this._clearSelectedStatement();\r\n this._toggleSoftDeleteAllRevisionsModal();\r\n };\r\n\r\n _restoreDeletedRevision = async (revisionId, statementId) => {\r\n const { selectTabAndGetStatements } = this.props;\r\n try {\r\n await restoreDeletedRevisionRequest(revisionId, statementId);\r\n selectTabAndGetStatements({ tab: STATEMENT_LIST_TABS.DELETED });\r\n /** Close restore revision modal if it is already open\r\n * this is for restoring a revision from the deleted revision history modal\r\n */\r\n this.setState({ showRestoreRevisionErrorModal: false });\r\n } catch (error) {\r\n const statusCode = error.response.status;\r\n if (statusCode === BAD_REQUEST) {\r\n this.setState((state) => ({\r\n showRestoreRevisionErrorModal: !state.showRestoreRevisionErrorModal,\r\n }));\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Wrapper for upload revision therefore passes props blindly\r\n */\r\n _uploadRevision = (props) => {\r\n const { uploadRevision } = this.props;\r\n uploadRevision(props);\r\n this._clearSelectedStatement();\r\n };\r\n\r\n /**\r\n * This function is used for us to navigate to the edit statement page from the statement row kebab options\r\n * in the statement list.\r\n */\r\n navigateToEditStatement = (statement) => {\r\n const { push } = this.props;\r\n push(\r\n parseRoute(ROUTE_CONSTANTS.STATEMENT_EDIT_PAGE, {\r\n params: {\r\n projectId: statement.clientId,\r\n statementId: statement.id,\r\n },\r\n }),\r\n );\r\n };\r\n\r\n copyStatement = (statement) => {\r\n this.setState({\r\n selectedStatement: statement,\r\n });\r\n this.toggleShowCopyStatementModal();\r\n };\r\n\r\n onClickCopyStatement = (statement, project) => {\r\n const { copyStatement, refreshStatementList } = this.props;\r\n copyStatement({\r\n statementId: statement.id,\r\n targetClientId: project.id,\r\n });\r\n if (statement.clientId === project.id) {\r\n refreshStatementList();\r\n }\r\n this.toggleShowCopyStatementModal();\r\n };\r\n\r\n toggleShowCopyStatementModal = () => {\r\n this.setState((state) => ({\r\n showCopyStatementModal: !state.showCopyStatementModal,\r\n }));\r\n };\r\n\r\n _getStatementListColumns = (isVirtualizedList) => {\r\n const {\r\n selectedTab,\r\n project,\r\n workflowsMap,\r\n currentUser,\r\n pinnedDetails,\r\n statementWorkflowSteps,\r\n } = this.props;\r\n const { DELETED, ARCHIVED } = STATEMENT_LIST_TABS;\r\n switch (selectedTab) {\r\n case DELETED: {\r\n return getDeletedStatementListColumns({\r\n project,\r\n deleteAction: this.setStatementToDelete,\r\n restoreAction: this._restoreDeletedRevision,\r\n onRevisonClick: this.getStatementRevisionsForModal,\r\n containerRef: isVirtualizedList ? this.listRef : null,\r\n });\r\n }\r\n case ARCHIVED: {\r\n return getArchivedStatementListColumns({\r\n project,\r\n copyStatement: this.copyStatement,\r\n workflowsMap,\r\n containerRef: isVirtualizedList ? this.listRef : null,\r\n statementWorkflowSteps,\r\n });\r\n }\r\n default: {\r\n return getStatementListColumns({\r\n softDeleteAllRevisionsAction: this.setSoftDeleteAllRevisions,\r\n softDeleteLatestRevisionAction: this.setSoftDeleteLatestRevision,\r\n onRevisonClick: this.getStatementRevisionsForModal,\r\n project,\r\n addRevisionAction: this.setStatementToUploadRevisionOn,\r\n navigateToEditStatement: this.navigateToEditStatement,\r\n workflowsMap,\r\n onSubmitWrapUpClick: this.setStatementToSubmitForWrapUpApproval,\r\n onApproveWrapUpClick: this.setStatementForWrapUpApproval,\r\n currentUser,\r\n copyStatement: this.copyStatement,\r\n containerRef: isVirtualizedList ? this.listRef : null,\r\n onPinClick: this.pinOrUnpinStatement,\r\n pinnedStatements: pinnedDetails.pinnedStatements,\r\n statementWorkflowSteps,\r\n });\r\n }\r\n }\r\n };\r\n listScroll = () => {\r\n const { index } = this.state;\r\n const { statementList } = this.props;\r\n const statementsAmount = statementList.getStatements().length;\r\n\r\n if (index !== statementsAmount) {\r\n if (index + ROWS_AMOUNT <= statementsAmount) {\r\n this.setState({\r\n index: index + ROWS_AMOUNT,\r\n statementList: statementList\r\n .getStatements()\r\n .slice(0, index + ROWS_AMOUNT),\r\n });\r\n } else {\r\n this.setState({\r\n index: statementsAmount,\r\n });\r\n }\r\n }\r\n };\r\n\r\n onFilterInputChange = (name, value) => {\r\n this.setState((prevState) => {\r\n const filterInput = Object.assign({}, prevState.filterInput);\r\n filterInput[name] = value;\r\n return { ...prevState, filterInput };\r\n });\r\n };\r\n\r\n onFilterInputClear = (name) => {\r\n const { statementList } = this.props;\r\n this.setState((prevState) => {\r\n const filterInput = Object.assign({}, prevState.filterInput);\r\n filterInput[name] = EMPTY_STRING;\r\n return {\r\n ...prevState,\r\n filterInput,\r\n isFilterActive: false,\r\n statementList: statementList.getStatements() || [],\r\n };\r\n });\r\n };\r\n\r\n onFilterInputApply = (e) => {\r\n const { statementList } = this.props;\r\n const statements = statementList.getStatements() || [];\r\n const { filterInput } = this.state;\r\n const filterColumn = STATEMENT_LIST_SORT_COLUMN_KEYS.statementName;\r\n const searchTerm = filterInput[filterColumn].toLowerCase();\r\n const filteredList = statements.filter(\r\n (row) => row[filterColumn].toLowerCase().indexOf(searchTerm) !== -1,\r\n );\r\n\r\n this.setState({\r\n statementList: filteredList,\r\n showFilterPopup: false,\r\n isFilterActive: true,\r\n });\r\n };\r\n\r\n onFilterClick = (e) => {\r\n this.setState({ showFilterPopup: !this.state.showFilterPopup });\r\n };\r\n\r\n onCloseFilterPopup = (e) => {\r\n const { statementList } = this.props;\r\n const filterColumn = STATEMENT_LIST_SORT_COLUMN_KEYS.statementName;\r\n const hasSearchValue = !!this.state.filterInput[filterColumn];\r\n if (hasSearchValue) {\r\n this.setState({\r\n showFilterPopup: false,\r\n });\r\n } else {\r\n this.setState({\r\n showFilterPopup: false,\r\n filterInput: {},\r\n isFilterActive: false,\r\n statementList: statementList.getStatements() || [],\r\n });\r\n }\r\n };\r\n\r\n virtualizedListRequired = () => {\r\n const filterColumn = STATEMENT_LIST_SORT_COLUMN_KEYS.statementName;\r\n const hasSearchValue = !!this.state.filterInput[filterColumn];\r\n\r\n const { statementList } = this.state;\r\n\r\n if (\r\n !hasSearchValue &&\r\n this.props.statementList &&\r\n this.props.statementList.getStatements().length > ROWS_AMOUNT\r\n ) {\r\n return true;\r\n } else if (hasSearchValue && statementList) {\r\n if (statementList.length < ROWS_AMOUNT) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n render() {\r\n const {\r\n project,\r\n navigateToStatement,\r\n push,\r\n selectedTab,\r\n selectTabAndGetStatements,\r\n setUploadedFilesAddRevision,\r\n setUploadedFilesAddRevisionError,\r\n revisionInProgress,\r\n sortModel,\r\n permanentlyDeleteRevision,\r\n requestSortedStatementList,\r\n } = this.props;\r\n const {\r\n showSoftDeleteAllRevisionsModal,\r\n showSoftDeleteLatestRevisionModal,\r\n showRevisionHistoryModal,\r\n showRestoreRevisionErrorModal,\r\n selectedStatement,\r\n showAddRevisionModal,\r\n showPermanentlyDeleteRevisionModal,\r\n showSubmitForWrapUpApprovalModal,\r\n showApproveWrapUpModal,\r\n showExportInitiatedModal,\r\n showCopyStatementModal,\r\n index,\r\n showESCRequestButton,\r\n statementList,\r\n filterInput,\r\n showFilterPopup,\r\n isFilterActive,\r\n } = this.state;\r\n\r\n const disableScrollCallback =\r\n this.props.statementList &&\r\n index === this.props.statementList.getStatements().length;\r\n const renderFooter = disableScrollCallback ? () => null : () => ;\r\n\r\n // statementList in props is the full list of statements while in state it is the subset.\r\n // Subset in the sense, that it is either the filtered list of optimized list for render.\r\n const useVirtualizedList = this.virtualizedListRequired();\r\n\r\n /**\r\n * If there is no selected project, do not render the statement list component,\r\n * as it will have no statements to render. This scenario will occur when the project list is empty as there\r\n * is no project in the project list to be selected.\r\n */\r\n if (!project.isInitialized()) {\r\n return null;\r\n }\r\n return (\r\n
    \r\n selectTabAndGetStatements({ tab })}\r\n rightHeaderButton={\r\n \r\n {showESCRequestButton && (\r\n {\r\n window.open(ROUTE_CONSTANTS.ESC_SUPPORT);\r\n }}\r\n tooltip={\r\n new TooltipOptions({\r\n text: 'statement-list.esc-button-tooltip',\r\n id: `${STATEMENT_LIST_ID_BLOCK}-esc-support-tooltip`,\r\n position: 'top',\r\n })\r\n }\r\n >\r\n \r\n \r\n )}\r\n \r\n push(\r\n parseRoute(ROUTE_CONSTANTS.STATEMENT_CREATION, {\r\n params: { projectId: project.id },\r\n }),\r\n )\r\n }\r\n className={`${STATEMENT_LIST_BLOCK}__create-statement-button`}\r\n disabled={!Permissions.Statement.canCreate(project.id)}\r\n >\r\n \r\n \r\n
    \r\n }\r\n isIconButtonDisabled={!Permissions.Statement.canCreate(project.id)}\r\n onIconButtonClick={() =>\r\n push(\r\n parseRoute(ROUTE_CONSTANTS.STATEMENT_CREATION, {\r\n params: { projectId: project.id },\r\n }),\r\n )\r\n }\r\n iconButtonIcon={PlusIcon}\r\n iconButtonMessage={'statement-list.create-statement'}\r\n />\r\n requestSortedStatementList({ sort })}\r\n tableId={`${STATEMENT_LIST_ID_BLOCK}-list`}\r\n dataModel={\r\n new DataGridDataApi({\r\n apiModel: this.props.statementList,\r\n rowItems: statementList,\r\n })\r\n }\r\n onRowClick={(rowData) => {\r\n navigateToStatement(rowData);\r\n }}\r\n rowClassnames={(statement) => {\r\n if (selectedTab === STATEMENT_LIST_TABS.ACTIVE) {\r\n if (statement.isPendingApproval()) {\r\n return `${STATEMENT_LIST_BLOCK}__list-item--pending-approval`;\r\n } else if (!statement.hasBeenOpenedByUser) {\r\n return `${STATEMENT_LIST_BLOCK}__list-item--not-viewed-yet`;\r\n }\r\n } else if (selectedTab === STATEMENT_LIST_TABS.DELETED) {\r\n if (statement.isPendingApproval()) {\r\n return `${STATEMENT_LIST_BLOCK}__list-item--pending-approval`;\r\n }\r\n }\r\n }}\r\n NoResultsComponent={\r\n \r\n }\r\n />\r\n {showRevisionHistoryModal &&\r\n selectedTab === STATEMENT_LIST_TABS.ACTIVE && (\r\n \r\n )}\r\n {showRevisionHistoryModal &&\r\n selectedTab === STATEMENT_LIST_TABS.DELETED && (\r\n \r\n selectTabAndGetStatements({ tab: STATEMENT_LIST_TABS.DELETED })\r\n }\r\n />\r\n )}\r\n {showPermanentlyDeleteRevisionModal && (\r\n \r\n )}\r\n {showSoftDeleteAllRevisionsModal && (\r\n \r\n )}\r\n {showSoftDeleteLatestRevisionModal && (\r\n \r\n )}\r\n {showRestoreRevisionErrorModal && (\r\n \r\n this.setState({\r\n showRestoreRevisionErrorModal: false,\r\n })\r\n }\r\n />\r\n )}\r\n {showAddRevisionModal && (\r\n \r\n )}\r\n {showSubmitForWrapUpApprovalModal && (\r\n \r\n )}\r\n\r\n {showApproveWrapUpModal && (\r\n \r\n )}\r\n {showExportInitiatedModal && (\r\n \r\n )}\r\n {showCopyStatementModal && (\r\n \r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nStatementListComponent.propTypes = {\r\n /** Api model of all statements for the selected project */\r\n statementList: PropTypes.instanceOf(StatementList).isRequired,\r\n /** Function that calls action to delete most recent revision only*/\r\n softDeleteCurrentRevision: PropTypes.func.isRequired,\r\n /** function that calls action to delete all revisions under an active statement */\r\n softDeleteAllRevisions: PropTypes.func.isRequired,\r\n /** function that calls action to permenatly delete most recent soft deleted revision under a deleted statement */\r\n permanentlyDeleteRevision: PropTypes.func.isRequired,\r\n /** function that fired to navigate us to the selected statements content page */\r\n navigateToStatement: PropTypes.func.isRequired,\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** function for changing route */\r\n push: PropTypes.func.isRequired,\r\n /** Model representing the currently selected tab */\r\n selectedTab: PropTypes.instanceOf(TabModel).isRequired,\r\n /** Model representing the currently sort key and order */\r\n sortModel: PropTypes.instanceOf(DataGridSort).isRequired,\r\n /** Action that fires on tab selection setting selected tab and getting statements for that selection */\r\n selectTabAndGetStatements: PropTypes.func.isRequired,\r\n /** Action that fires on adding a revision to a statement */\r\n uploadRevision: PropTypes.func.isRequired,\r\n /** Action that sets the uploaded files to the revision in progress */\r\n setUploadedFilesAddRevision: PropTypes.func.isRequired,\r\n /** Action that signals that an error occured based on business criteria while processing the uploaded files to the revision in progress */\r\n setUploadedFilesAddRevisionError: PropTypes.func.isRequired,\r\n /** Object representing the working copy of the statement being created.*/\r\n revisionInProgress: PropTypes.instanceOf(StatementForm).isRequired,\r\n /** Currently processing/failed statements */\r\n workflowsMap: PropTypes.instanceOf(WorkflowsMap).isRequired,\r\n /** model representing current user object */\r\n currentUser: PropTypes.instanceOf(CurrentUser).isRequired,\r\n /** fired to refresh the statement list */\r\n refreshStatementList: PropTypes.func.isRequired,\r\n /** function for copying statement to selected client project */\r\n copyStatement: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementListComponent;\r\n","import ApiModel from 'models/api-model';\r\nimport FormulaListEntry from 'models/data/formula/formula-list-entry-model';\r\n\r\nexport class FormulaList extends ApiModel({\r\n data: {\r\n formulas: [], // type FormulaListEntry\r\n },\r\n status: null,\r\n}) {\r\n processResponse({ response }) {\r\n /**\r\n * We are returning the formulas from the back-end in an order that is by decreasing formula id.\r\n * This will ensure that the most recently-created formula is always at the top of the list, as their\r\n * IDs increase with time.\r\n */\r\n return {\r\n data: {\r\n formulas: response.data.result\r\n .map((formula) => {\r\n let formulaListEntry = new FormulaListEntry();\r\n return formulaListEntry.convertFormulaDTOToFormulaListEntryModel(\r\n formula,\r\n );\r\n })\r\n .sort((f1, f2) => (f1.id < f2.id ? 1 : -1)),\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n getFormulaCount() {\r\n if (this.hasFormulas()) {\r\n return this.data.formulas.length;\r\n }\r\n return 0;\r\n }\r\n\r\n getFormulas() {\r\n if (this.data && this.data.formulas) {\r\n return this.data.formulas;\r\n }\r\n return [];\r\n }\r\n\r\n get(index) {\r\n if (\r\n this.data &&\r\n this.data.formulas &&\r\n index >= 0 &&\r\n index < this.data.formulas.length\r\n ) {\r\n return this.data.formulas[index];\r\n }\r\n return null;\r\n }\r\n\r\n hasFormulas() {\r\n return this.data && this.data.formulas && this.data.formulas.length > 0;\r\n }\r\n\r\n removeElementFromFormulaTabFromSocketPayload(payload) {\r\n return this.mergeData({\r\n formulas: this.data.formulas.filter(\r\n (formula) => !payload.has(formula.id),\r\n ),\r\n });\r\n }\r\n\r\n addFormulaToFormulaListFromSocketPayload(payload) {\r\n let formulaListEntry = new FormulaListEntry().convertFormulaDTOToFormulaListEntryModel(\r\n payload,\r\n );\r\n let formulasArray = [...this.data.formulas];\r\n let formulaIsInArray = false;\r\n\r\n for (let i = 0; i < formulasArray.length; i++) {\r\n let formula = formulasArray[i];\r\n if (formula.formulaId === formulaListEntry.formulaId) {\r\n formulasArray[i] = formulaListEntry;\r\n formulaIsInArray = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!formulaIsInArray) {\r\n formulasArray.unshift(formulaListEntry);\r\n }\r\n\r\n return this.mergeData({\r\n formulas: formulasArray,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport ProjectListEntry from 'models/data/project-list-entry-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { GEO_OPTIONS } from 'constants/feature/project-list-header-constants';\r\n\r\nexport class ProjectList extends ApiModel({\r\n data: {\r\n projects: [], // type Project\r\n omniaEngagementEntities: [],\r\n selectedGeo: null,\r\n appliedSearchTerm: '',\r\n },\r\n status: null,\r\n}) {\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n projects: response.data.result.map((project) => {\r\n return new ProjectListEntry(project);\r\n }),\r\n omniaEngagementEntities: response.data.result.map(\r\n (project) => project.omniaEngagementEntity,\r\n ),\r\n selectedGeo: this.selectedGeo ? this.selectedGeo : GEO_OPTIONS[0],\r\n appliedSearchTerm:\r\n this.data.appliedSearchTerm !== '' ? this.data.appliedSearchTerm : '',\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n get selectedGeo() {\r\n return this.data.selectedGeo;\r\n }\r\n\r\n getProjects() {\r\n if (this.data && this.data.projects) {\r\n /*Proj that are perm deleted are still available for admin users\r\n This filters them out of the list*/\r\n return this.data.projects.filter((proj) =>\r\n isNullOrUndefined(proj.permanentDeleteDate),\r\n );\r\n }\r\n return [];\r\n }\r\n\r\n getActiveProjects() {\r\n if (this.data && this.data.projects) {\r\n // filter out permanently and soft deleted projects\r\n return this.data.projects.filter(\r\n (proj) =>\r\n isNullOrUndefined(proj.permanentDeleteDate) && proj.active !== 0,\r\n );\r\n }\r\n return [];\r\n }\r\n\r\n getOmniaEngagements() {\r\n if (this.data && this.data.projects) {\r\n return this.data.omniaEngagementEntity;\r\n }\r\n return [];\r\n }\r\n\r\n isAnyEngagementLinked() {\r\n if (this.hasProjects()) {\r\n return !this.data.omniaEngagementEntities.some((entry) => {\r\n return Object.values(entry).some((val) => val === null);\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n hasProjects() {\r\n return this.data && this.data.projects && this.data.projects.length > 0;\r\n }\r\n\r\n getProjectFromList(id) {\r\n // We might expect project id to be the combination of geo id and project id.\r\n // Hence it might be a string instead of number.\r\n // eslint-disable-next-line eqeqeq\r\n return this.data.projects.find((project) => project.id == id);\r\n }\r\n\r\n setGeoToFilterProjectList(geoCode) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n selectedGeo: geoCode,\r\n },\r\n });\r\n }\r\n\r\n setSearchTermToFilterProjectList(searchTerm) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n appliedSearchTerm: searchTerm,\r\n },\r\n });\r\n }\r\n\r\n clearSearchTermToFilterProjectList() {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n appliedSearchTerm: '',\r\n },\r\n });\r\n }\r\n\r\n mergeSelectedProjectWithProjectList({ selectedProjectId, projectDetails }) {\r\n const updatedProjectsList = this.data.projects.map((project) => {\r\n if (parseInt(project.id) === parseInt(selectedProjectId)) {\r\n return new ProjectListEntry({ ...project, ...projectDetails });\r\n }\r\n return new ProjectListEntry({ ...project });\r\n });\r\n\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n projects: updatedProjectsList,\r\n },\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport class SectionIdList extends ApiModel({\r\n data: {\r\n sectionIds: [],\r\n },\r\n status: null,\r\n}) {\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n sectionIds: response.data,\r\n },\r\n status: response.status,\r\n };\r\n }\r\n get sectionIds() {\r\n return this.data.sectionIds;\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport ContentSearchResultEntry from 'models/data/content-search-result-entry-model';\r\n\r\nconst DEFAULT_SELECTED_INDEX = 0;\r\n\r\nexport default class ContentSearchResults extends ApiModel({\r\n data: {\r\n occurrences: [],\r\n total: null,\r\n },\r\n selectedIndex: DEFAULT_SELECTED_INDEX,\r\n}) {\r\n get occurrences() {\r\n if (this.hasOccurrences()) {\r\n return this.data.occurrences;\r\n }\r\n return [];\r\n }\r\n\r\n get totalLoadedResults() {\r\n return this.data.occurrences.length;\r\n }\r\n\r\n get totalOverallResults() {\r\n if (!isNullOrUndefined(this.data.total)) {\r\n return this.data.total;\r\n }\r\n return 0;\r\n }\r\n\r\n get hasAllResults() {\r\n return this.totalOverallResults === this.totalLoadedResults;\r\n }\r\n\r\n processResponse({ response }) {\r\n const { occurrences, countResultsFound } = response.data;\r\n return {\r\n data: {\r\n occurrences: occurrences.map(\r\n (o, index) => new ContentSearchResultEntry({ ...o, index }),\r\n ),\r\n total: countResultsFound,\r\n },\r\n selectedIndex: DEFAULT_SELECTED_INDEX,\r\n };\r\n }\r\n\r\n hasOccurrences() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.occurrences) &&\r\n this.data.occurrences.length > 0\r\n );\r\n }\r\n\r\n setSelectedIndex(index) {\r\n return this.merge({ selectedIndex: index });\r\n }\r\n}\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { REVISION_STATUSES } from 'constants/feature/revision-status-constants';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\nimport { serializedProjectIdWithGeo } from 'utils/project-utils';\r\n\r\nconst getRevisionRequest = (\r\n revisionId,\r\n selectedProjectGeoCode,\r\n statementId,\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n) => {\r\n return withDefaultContextAsSelectedProject({ contextKey, contextValue })\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil(\r\n statementId,\r\n )}/revision/${revisionId}`,\r\n )\r\n .then((response) => {\r\n response.data.clientId = serializedProjectIdWithGeo(\r\n response.data.clientId,\r\n selectedProjectGeoCode,\r\n );\r\n return response;\r\n });\r\n};\r\n\r\nconst getAllRevisionsForStatement = (statementId) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(`/tieout/statements/${statementId}/revisions`, {\r\n params: {\r\n status: `${REVISION_STATUSES.ACTIVE.status},${REVISION_STATUSES.DELETED.status}`,\r\n },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nconst getDeletedRevisionsForStatement = (statementId) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(`/tieout/statements/${statementId}/revisions`, {\r\n params: {\r\n status: REVISION_STATUSES.DELETED.status,\r\n },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nconst getActiveRevisionsForStatement = (statementId) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(`/tieout/statements/${statementId}/revisions`, {\r\n params: {\r\n status: REVISION_STATUSES.ACTIVE.status,\r\n },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport default {\r\n getRevisionRequest,\r\n getAllRevisionsForStatement,\r\n getDeletedRevisionsForStatement,\r\n getActiveRevisionsForStatement,\r\n};\r\n","import React, { memo } from 'react';\r\nimport { injectIntl } from 'react-intl';\r\nimport PropTypes from 'prop-types';\r\nimport SunEditor from 'suneditor-react';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport FormItem from 'components/common/form-item-component';\r\nimport 'suneditor/dist/css/suneditor.min.css'; // Import Sun Editor's CSS File\r\n\r\nconst TextEditor = ({\r\n className,\r\n disabled,\r\n errorText,\r\n id,\r\n isValid,\r\n label,\r\n maxLength,\r\n onChange,\r\n onBlur,\r\n placeholder,\r\n tooltip,\r\n width,\r\n initContents,\r\n intl,\r\n}) => {\r\n const _placeholder =\r\n typeof placeholder === 'string'\r\n ? intl.formatMessage({ id: placeholder })\r\n : intl.formatMessage({ id: placeholder.id }, { ...placeholder.values });\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nTextEditor.propTypes = {\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** Boolean representing if component should be disabled state */\r\n disabled: PropTypes.bool,\r\n /** Unique string id for text area */\r\n id: PropTypes.string.isRequired,\r\n /** Internationalized Sting id passed to form item */\r\n label: PropTypes.string,\r\n /** Maximum text area length */\r\n maxLength: PropTypes.number,\r\n /** Function fired on user input return value*/\r\n onChange: PropTypes.func.isRequired,\r\n /** Function fired when focus is lost from text area*/\r\n onBlur: PropTypes.func,\r\n /** Internationalized sting id */\r\n placeholder: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.shape({\r\n id: PropTypes.string,\r\n values: PropTypes.object,\r\n }),\r\n ]),\r\n /** Object with tool tip options passed to form item */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /** String percentage representing width of component passed to form item*/\r\n width: PropTypes.string,\r\n /** Initial rich text string contents of the editor */\r\n initContents: PropTypes.string,\r\n};\r\n\r\nexport default memo(injectIntl(TextEditor));\r\n","import { withDefaultContextAsProject } from 'api/api-default-context';\r\nimport { serializedProjectIdWithGeo } from 'utils/project-utils';\r\n\r\nexport const getSelectedProjectRequest = (id, contextKey) => {\r\n return withDefaultContextAsProject({ contextKey }, id)\r\n .get('/tieout/client', {\r\n params: {\r\n clientId: parseInt(id),\r\n },\r\n })\r\n .then((response) => {\r\n response.data.id = serializedProjectIdWithGeo(\r\n response.data.id,\r\n response.data.geoCode,\r\n );\r\n return response;\r\n });\r\n};\r\n\r\nexport default {\r\n getSelectedProjectRequest,\r\n};\r\n","import { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nexport const WPR_NUMBER_CHAR_LIMIT = 15;\r\nexport const WPR_NAME_CHAR_LIMIT = 150;\r\nexport const WPR_NUMBER_REGEX = /[\"*:<>?|\\\\]/;\r\n\r\nexport const WORKPAPER_DETACH_TOOLTIP = new TooltipOptions({\r\n text: 'common.unlink',\r\n id: 'workpaper-unlink-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nexport const WORKPAPER_TOOLKIT_PANEL_DELETE_TOOLTIP = new TooltipOptions({\r\n text: 'common.delete',\r\n id: 'workpaper-delete-button-tool-tip',\r\n position: 'top',\r\n});\r\n\r\nexport const WORKPAPER_TOOLKIT_PANEL_EDIT_TOOLTIP = new TooltipOptions({\r\n text: 'common.edit',\r\n id: 'workpaper-edit-button-tool-tip',\r\n position: 'top',\r\n});\r\nexport const EXPAND_WORKPAPER_LIST_TOOLTIP = new TooltipOptions({\r\n text: 'common.expand',\r\n id: 'workpaper-expand-button-tool-tip',\r\n});\r\n\r\nexport const COLLAPSE_WORKPAPER_LIST_TOOLTIP = new TooltipOptions({\r\n text: 'common.collapse',\r\n id: 'workpaper-collapse-button-tool-tip',\r\n});\r\n\r\nexport const UNLINK_ICON_TOOLTIP = new TooltipOptions({\r\n text: 'common.unlink',\r\n id: 'workpaper-element-icon-button-tool-tip',\r\n});\r\nexport const PERMISSION_DENIED_ICON_TOOLTIP = new TooltipOptions({\r\n text: 'permissions.edit.statement',\r\n id: 'workpaper-element-icon-button-tool-tip',\r\n});\r\n","export const TICKMARK_TEXT_CHAR_LIMIT = 4000;\r\nexport const NEW_LINE_REGEX = /\\n/g;\r\n\r\nexport const shouldShowMoreButton = ({ textRef }) => {\r\n return (\r\n textRef &&\r\n textRef.scrollHeight &&\r\n textRef.clientHeight &&\r\n textRef.scrollHeight > textRef.clientHeight\r\n );\r\n};\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const createNewFormulaRequest = ({ formulaModel }) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${\r\n formulaModel.revisionId\r\n }/elements/${formulaModel.elementId}/formulas`,\r\n formulaModel.toApiFormat(),\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getFormulasForElementRequest = ({ revisionId, elementId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/formulas`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const deleteFormulaRequest = ({\r\n revisionId,\r\n elementId,\r\n formulaId,\r\n creationType,\r\n type,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/formulas/${formulaId}/creationType/${creationType}/type/${type}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getFormulaDetailsRequest = ({\r\n revisionId,\r\n elementId,\r\n formulaId,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/formulas/${formulaId}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const editFormulaRequest = ({ formulaModel }) =>\r\n withDefaultContextAsSelectedProject()\r\n .put(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${\r\n formulaModel.revisionId\r\n }/elements/${formulaModel.elementId}/formulas/${formulaModel.formulaId}`,\r\n formulaModel.toApiFormat(),\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const updateFormulaTypeRequest = ({\r\n id,\r\n revisionId,\r\n elementId,\r\n type,\r\n formulaOverride,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .put(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/elements/${elementId}/formulas/${id}/update/formulatype`,\r\n {\r\n id,\r\n revisionId,\r\n elementId,\r\n type,\r\n formulaOverride,\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n","import { getStatementNavigationData } from 'api/navigation-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const navigationDataLoading = createAction(\r\n 'OCR_NAVIGATION_DATA_LOADING',\r\n);\r\nexport const navigationDataLoaded = createAction('OCR_NAVIGATION_DATA_LOADED');\r\nexport const navigationDataError = createAction('OCR_NAVIGATION_DATA_ERROR');\r\n\r\nexport const leftNavigationDataLoading = createAction(\r\n 'LEFT_OCR_NAVIGATION_DATA_LOADING',\r\n);\r\nexport const leftNavigationDataLoaded = createAction(\r\n 'LEFT_OCR_NAVIGATION_DATA_LOADED',\r\n);\r\nexport const leftNavigationDataError = createAction(\r\n 'LEFT_OCR_NAVIGATION_DATA_ERROR',\r\n);\r\n\r\nexport const getSelectedStatementOCRNavigationData =\r\n (projectId, revisionId, isLeftview = false) =>\r\n async (dispatch, getState) => {\r\n isLeftview\r\n ? dispatch(leftNavigationDataLoading())\r\n : dispatch(navigationDataLoading());\r\n try {\r\n const response = await getStatementNavigationData(projectId, revisionId);\r\n isLeftview\r\n ? dispatch(leftNavigationDataLoaded(response))\r\n : dispatch(navigationDataLoaded(response));\r\n } catch (e) {\r\n isLeftview\r\n ? dispatch(leftNavigationDataError(e))\r\n : dispatch(navigationDataError(e));\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport { setSelectedProjectFromProjectList } from './selected-project-actions';\r\nimport { push } from 'connected-react-router';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport {\r\n linkOmniaEngagementRequest,\r\n unlinkOmniaEngagementRequest,\r\n verifyOmniaTokenRequest,\r\n} from 'api/omnia-integration-api';\r\nimport { getEngagementsByIdRequest } from 'api/omnia-integration-api';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { jwtDecode } from 'jwt-decode';\r\n\r\nexport const linkOmniaEngagementLoading = createAction(\r\n 'LINK_OMNIA_ENGAGEMENT_LOADING',\r\n);\r\nexport const linkOmniaEngagementLoaded = createAction(\r\n 'LINK_OMNIA_ENGAGEMENT_LOADED',\r\n);\r\nexport const linkOmniaEngagementError = createAction(\r\n 'LINK_OMNIA_ENGAGEMENT_ERROR',\r\n);\r\n\r\nexport const omniaEngagementLoading = createAction('OMNIA_ENGAGEMENT_LOADING');\r\nexport const omniaEngagementLoaded = createAction('OMNIA_ENGAGEMENT_LOADED');\r\nexport const omniaEngagementError = createAction('OMNIA_ENGAGEMENT_ERROR');\r\n\r\nexport const handleProjectClick =\r\n ({ projectId }) =>\r\n async (dispatch, getState) => {\r\n const storeData = getState().data;\r\n const projectList = storeData.projectList.getProjects();\r\n const selectedProject = projectList.find(\r\n (project) => project.id === projectId,\r\n );\r\n dispatch(\r\n setSelectedProjectFromProjectList({ projectListEntry: selectedProject }),\r\n );\r\n //Navigate to the home page\r\n dispatch(push(ROUTE_CONSTANTS.HOME_PAGE));\r\n };\r\n\r\nexport const handleOmniaEngagementLinking =\r\n ({ engagement, omEngagementId, geoCode }) =>\r\n async (dispatch, getState) => {\r\n dispatch(linkOmniaEngagementLoading());\r\n try {\r\n const { currentUser } = getState().data;\r\n await linkOmniaEngagementRequest({\r\n omniaTieoutEngagementEntity: {\r\n linkedBy: currentUser.getUser().id,\r\n linkedDate: Date.now(),\r\n omEngagementId: omEngagementId,\r\n toutProjectId: parseInt(engagement.toutProjectId),\r\n },\r\n geoCode,\r\n });\r\n dispatch(\r\n fetchOmniaEngagement({\r\n engagementId: omEngagementId,\r\n geoCode,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(linkOmniaEngagementError(error));\r\n }\r\n };\r\n\r\nexport const handleOmniaEngagementUnlinking =\r\n ({ engagementToUnlink, geoCode }) =>\r\n async (dispatch, getState) => {\r\n dispatch(linkOmniaEngagementLoading());\r\n try {\r\n const { currentUser } = getState().data;\r\n await unlinkOmniaEngagementRequest({\r\n omniaTieoutEngagementEntity: {\r\n linkedBy: currentUser.getUser().id,\r\n linkedDate: Date.now(),\r\n omEngagementId: engagementToUnlink.omEngagementId,\r\n toutProjectId: parseInt(engagementToUnlink.toutProjectId),\r\n },\r\n geoCode,\r\n });\r\n\r\n const sessionOmEngagementId = sessionStorage.getItem('omEngagementId');\r\n let omniaEngagementId = !isNullOrUndefined(sessionOmEngagementId)\r\n ? sessionOmEngagementId\r\n : null;\r\n dispatch(\r\n fetchOmniaEngagement({\r\n engagementId: omniaEngagementId,\r\n geoCode,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(linkOmniaEngagementError(error));\r\n }\r\n };\r\n\r\nexport const verifyOmniaTokenAndGetEngagement =\r\n ({ token }) =>\r\n async (dispatch, getState) => {\r\n dispatch(omniaEngagementLoading());\r\n try {\r\n const decodedOmniaToken = jwtDecode(token);\r\n const response = await verifyOmniaTokenRequest({\r\n token,\r\n geoCode: decodedOmniaToken.geoName,\r\n });\r\n dispatch(omniaEngagementLoaded({ response }));\r\n } catch (error) {\r\n dispatch(omniaEngagementError(error));\r\n }\r\n };\r\n\r\nexport const fetchOmniaEngagement =\r\n ({ engagementId, geoCode }) =>\r\n async (dispatch, getState) => {\r\n dispatch(omniaEngagementLoading());\r\n try {\r\n const response = await getEngagementsByIdRequest({\r\n engagementId,\r\n geoCode,\r\n });\r\n dispatch(omniaEngagementLoaded({ response }));\r\n } catch (error) {\r\n dispatch(omniaEngagementError(error));\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setCurrentStatementListTab = createAction(\r\n 'SET_CURRENT_STATEMENT_LIST_TAB',\r\n);\r\n\r\nexport const setStatementListSort = createAction('SET_STATEMENT_LIST_SORT');\r\n\r\nexport const initStatementListFilters = createAction(\r\n 'INIT_STATEMENT_LIST_FILTERS',\r\n);\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const contentSearchResultLoading = createAction(\r\n 'CONTENT_SEARCH_RESULT_LOADING',\r\n);\r\nexport const contentSearchResultLoaded = createAction(\r\n 'CONTENT_SEARCH_RESULT_LOADED',\r\n);\r\nexport const contentSearchResultError = createAction(\r\n 'CONTENT_SEARCH_RESULT_ERROR',\r\n);\r\nexport const clearContentSearchResult = createAction(\r\n 'CLEAR_CONTENT_SEARCH_RESULT',\r\n);\r\nexport const setContentSearchResultSelectedIndex = createAction(\r\n 'SET_CONTENT_SEARCH_RESULT_SELECTED_INDEX',\r\n);\r\n","import ApiModel from 'models/api-model';\r\nimport User from 'models/data/user-model';\r\nimport { getUserNameByUserData } from 'utils/statement-content-page-utils';\r\n\r\nexport default class ProjectUsersList extends ApiModel({\r\n data: {\r\n users: [],\r\n usersListForMentionsTextArea: [],\r\n userIdToUserNameMap: {},\r\n },\r\n}) {\r\n get users() {\r\n if (this.data) {\r\n return this.data.users;\r\n }\r\n return null;\r\n }\r\n\r\n get usersListForMentionsTextArea() {\r\n if (this.data) {\r\n return this.data.usersListForMentionsTextArea;\r\n }\r\n return null;\r\n }\r\n\r\n get userIdToUserNameMap() {\r\n if (this.data && this.data.userIdToUserNameMap) {\r\n return this.data.userIdToUserNameMap;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse({ response }) {\r\n let usersMap = {};\r\n for (let i = 0; i < response.data.length; i++) {\r\n const user = response.data[i];\r\n usersMap[user.id] = getUserNameByUserData(user.id, response.data);\r\n }\r\n\r\n return {\r\n data: {\r\n users: response.data.map((user) => {\r\n return new User(user);\r\n }),\r\n usersListForMentionsTextArea: response.data.map((user) => {\r\n return {\r\n id: user.id.toString(),\r\n display: getUserNameByUserData(user.id, response.data),\r\n };\r\n }),\r\n userIdToUserNameMap: usersMap,\r\n },\r\n status: response.status,\r\n };\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport default class OCRNavigationModel extends ApiModel({\r\n data: {\r\n navigationData: [],\r\n },\r\n}) {\r\n get navigationData() {\r\n return this.data.navigationData;\r\n }\r\n\r\n processResponse(response) {\r\n return {\r\n data: {\r\n navigationData: response.data,\r\n },\r\n };\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0.59695 14.3315C0.618594 6.84931 6.65379 0.848931 14.1359 0.870575C21.6181 0.89222 27.6185 6.92741 27.5968 14.4096C27.5752 21.8917 21.54 27.8921 14.0578 27.8705C6.57568 27.8488 0.575305 21.8136 0.59695 14.3315Z\",\n stroke: \"#dc372b\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M14.9136 14.3727L20.9393 8.38175C21.1733 8.1491 21.1743 7.7991 20.9416 7.56509C20.709 7.33108 20.359 7.33007 20.125 7.56273L14.0993 13.5537L8.10834 7.52797C7.87569 7.29396 7.52569 7.29295 7.29168 7.5256C7.05767 7.75826 7.05666 8.10826 7.28932 8.34227L13.2802 14.368L7.25456 20.3589C7.02055 20.5915 7.01954 20.9415 7.25219 21.1755C7.36852 21.2925 7.54335 21.3514 7.66002 21.3517C7.77669 21.3521 7.95185 21.2942 8.06886 21.1779L14.0945 15.187L20.0855 21.2127C20.2018 21.3297 20.3766 21.3885 20.4933 21.3889C20.61 21.3892 20.7851 21.3314 20.9021 21.215C21.1361 20.9824 21.1372 20.6324 20.9045 20.3984L14.9136 14.3727Z\",\n fill: \"#dc372b\"\n});\n\nvar SvgCloseButtonRed = function SvgCloseButtonRed(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 29,\n viewBox: \"0 0 29 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCloseButtonRed, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/close-button-red.48309b6e.svg\";\nexport { ForwardRef as ReactComponent };","import { createAction } from 'redux-actions';\r\n\r\nexport const setSourceStatementParams = createAction(\r\n 'SET_SOURCE_STATEMENT_PARAMS',\r\n);\r\nexport const clearSourceStatementParams = createAction(\r\n 'CLEAR_SOURCE_STATEMENT_PARAMS',\r\n);\r\n\r\nexport const setLeftStatementSelected = createAction(\r\n 'SET_LEFT_STATEMENT_SELECTED',\r\n);\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n UNIT_OPTIONS_MAP,\r\n SCALING_OPTIONS_MAP,\r\n} from 'constants/feature/element-attribute-constants';\r\n\r\nexport default class BatchUpdateElementList extends ApiModel({\r\n selectedElementIds: [],\r\n selectedElementsMap: {\r\n // [element.id]: element\r\n },\r\n}) {\r\n get count() {\r\n return (\r\n (Array.isArray(this.selectedElementIds) &&\r\n this.selectedElementIds.length) ||\r\n 0\r\n );\r\n }\r\n\r\n appendMultipleElementsLoaded({ selectedElements }) {\r\n const selectedElementsMap = { ...this.selectedElementsMap };\r\n selectedElements.forEach(\r\n (element) => (selectedElementsMap[element.id] = element),\r\n );\r\n return this.merge({\r\n error: null,\r\n isLoading: false,\r\n isLoaded: true,\r\n selectedElementsMap,\r\n selectedElementIds: this._getNewElementIdsFromElementsMap(\r\n selectedElementsMap,\r\n ),\r\n });\r\n }\r\n\r\n hasElement(id) {\r\n return !isNullOrUndefined(this.selectedElementsMap[id]);\r\n }\r\n\r\n getElement(id) {\r\n return this.selectedElementsMap[id];\r\n }\r\n\r\n _getNewElementIdsFromElementsMap = (newElementsMap) =>\r\n Object.values(newElementsMap).map((element) => element.id);\r\n\r\n appendElement({ element }) {\r\n const selectedElementsMap = {\r\n ...this.selectedElementsMap,\r\n [element.id]: element,\r\n };\r\n\r\n return this.merge({\r\n selectedElementIds: this._getNewElementIdsFromElementsMap(\r\n selectedElementsMap,\r\n ),\r\n selectedElementsMap,\r\n });\r\n }\r\n\r\n removeElement({ elementId }) {\r\n const selectedElementsMap = { ...this.selectedElementsMap };\r\n delete selectedElementsMap[elementId];\r\n return this.merge({\r\n selectedElementsMap,\r\n selectedElementIds: this._getNewElementIdsFromElementsMap(\r\n selectedElementsMap,\r\n ),\r\n });\r\n }\r\n\r\n getSelectedElements() {\r\n return Object.values(this.selectedElementsMap).filter((element) =>\r\n element.data\r\n ? element.data.included === 1\r\n : element.included\r\n ? element.included === 1\r\n : null,\r\n );\r\n }\r\n\r\n updateSelectedElementsMapFromSocket(payload) {\r\n const selectedElementsMap = { ...this.selectedElementsMap };\r\n payload.forEach((element) => {\r\n const elementId = element.id;\r\n if (elementId in selectedElementsMap) {\r\n selectedElementsMap[elementId].data = {\r\n ...element, // may need to update this line if a reduced payload is sent down\r\n internalVerified: element.internalVerified === 1,\r\n reviewed: element.reviewed === 1,\r\n flagUser: element.flagUser === 1,\r\n units: UNIT_OPTIONS_MAP.get(element.unitsId),\r\n scaling: SCALING_OPTIONS_MAP.get(element.scalingId),\r\n period: `${element.periodType} ${element.fiscalYear}`,\r\n flagInternalRef: element.flagInternalRef === 1,\r\n };\r\n }\r\n });\r\n return this.merge({\r\n selectedElementsMap,\r\n });\r\n }\r\n\r\n removeBatchElementsFromSocketPayload(payload) {\r\n const selectedElementsMap = { ...this.selectedElementsMap };\r\n for (let i = 0; i < payload.length; i++) {\r\n const element = payload[i];\r\n const elementId = element.id;\r\n if (elementId in selectedElementsMap) {\r\n delete selectedElementsMap[elementId];\r\n }\r\n }\r\n return this.merge({\r\n selectedElementsMap: selectedElementsMap,\r\n selectedElementIds: this._getNewElementIdsFromElementsMap(\r\n selectedElementsMap,\r\n ),\r\n });\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\nimport revisionApi from 'api/revision-api';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { getGeoForProjectId } from './selected-project-actions';\r\nexport const revisionLoading = createAction('REVISION_LOADING');\r\nexport const revisionError = createAction('REVISION_ERROR');\r\nexport const revisionLoaded = createAction('REVISION_LOADED');\r\nexport const clearStatementPageRevisionStoreAction = createAction(\r\n 'CLEAR_STATEMENT_PAGE_REVISION_STORE_ACTION',\r\n);\r\n\r\nexport const fetchRevision = (revisionId) => async (dispatch, getState) => {\r\n dispatch(revisionLoading());\r\n if (!isNullOrUndefined(revisionId)) {\r\n try {\r\n const storeData = getState().data;\r\n const selectedProject = storeData.selectedProject;\r\n const projectId = selectedProject.id;\r\n const selectedProjectGeoCode = dispatch(getGeoForProjectId(projectId));\r\n const response = await revisionApi.getRevisionRequest(\r\n revisionId,\r\n selectedProjectGeoCode,\r\n );\r\n\r\n if (\r\n !isNullOrUndefined(projectId) &&\r\n response.data.clientId === projectId\r\n ) {\r\n dispatch(\r\n revisionLoaded({\r\n response,\r\n }),\r\n );\r\n } else {\r\n dispatch(\r\n revisionError(\r\n new Error('You currently cannot access this statement.'),\r\n ),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(revisionError(error));\r\n }\r\n } else {\r\n dispatch(\r\n revisionError(new Error('You currently cannot access this statement.')),\r\n );\r\n }\r\n};\r\n","import FormulaRow from './formula-row-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { FORMULA_ROW_TYPES } from 'constants/feature/formula-constants';\r\nimport get from 'lodash/get';\r\n\r\nexport default class FormulaRowElement extends FormulaRow {\r\n elementData = null; //ElementContentModel: Used for element rows to render the appropriate data.\r\n constructor(props) {\r\n super(props);\r\n this.type = FORMULA_ROW_TYPES.ELEMENT;\r\n if (!isNullOrUndefined(props) && !isNullOrUndefined(props.elementData)) {\r\n this.elementData = props.elementData;\r\n this.value = props.elementData.amount;\r\n }\r\n }\r\n\r\n get elementId() {\r\n if (!isNullOrUndefined(this.elementData)) {\r\n return this.elementData.id;\r\n }\r\n return null;\r\n }\r\n\r\n get elementActive() {\r\n if (!isNullOrUndefined(this.elementData)) {\r\n return get(this.elementData, 'elementActive', true);\r\n }\r\n return false;\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\n\r\nimport { getStatementRequest } from 'api/statement-api';\r\nimport Statement from 'models/data/statement-model';\r\nimport { fetchLeftRevision } from 'store/actions/left-revision-actions';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport { CONTEXT_KEY } from 'api/api-client';\r\nimport { getLeftContentSectionMapRequest } from './section-cache-actions';\r\nimport { fetchLeftSectionReviews } from './side-by-side-statement/side-by-side-statement-actions';\r\nimport { fetchLeftSectionTreeAction } from './side-by-side-statement/left-statement-section-tree-list-actions';\r\nimport { OCR_DOC_TYPE } from 'models/api/selected-statement-model';\r\nimport { fetchLeftSectionIdListStatementContent } from './statement-content-actions';\r\nimport { getSelectedStatementOCRNavigationData } from './ocr-navigation-actions';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\n\r\nexport const leftSelectedStatementLoading = createAction(\r\n 'SELECTED_STATEMENT_LOADING',\r\n);\r\nexport const leftSelectedStatementLoaded = createAction(\r\n 'LEFT_SELECTED_STATEMENT_LOADED',\r\n);\r\nexport const leftSelectedStatementError = createAction(\r\n 'LEFT_SELECTED_STATEMENT_ERROR',\r\n);\r\nexport const clearLeftSelectedStatement = createAction(\r\n 'CLEAR_LEFT_SELECTED_STATEMENT',\r\n);\r\n\r\nexport const fetchLeftSelectedStatement =\r\n ({ revisionId, statementId, projectId, documentProcessType }) =>\r\n async (dispatch, getState) => {\r\n const _isSideBySideView = window.location.pathname.includes(\r\n ROUTE_CONSTANTS.SIDE_BY_SIDE,\r\n );\r\n try {\r\n _isSideBySideView &&\r\n (await dispatch(\r\n fetchLeftSectionIdListStatementContent(\r\n revisionId,\r\n statementId,\r\n projectId,\r\n documentProcessType === OCR_DOC_TYPE,\r\n ),\r\n ));\r\n await dispatch(fetchLeftRevision(revisionId, statementId, projectId));\r\n if (_isSideBySideView && documentProcessType !== OCR_DOC_TYPE) {\r\n // fetch contentSectionMap for relationships between content and bookmark sections\r\n dispatch(\r\n getLeftContentSectionMapRequest({\r\n statementId,\r\n revisionId,\r\n projectId,\r\n }),\r\n );\r\n // fetch source Statements section reviews on particular revisions\r\n dispatch(fetchLeftSectionReviews(statementId));\r\n\r\n // It will fetch section tree list used for rendering statement-nav panel\r\n dispatch(\r\n fetchLeftSectionTreeAction({\r\n statementId,\r\n revisionId,\r\n projectId,\r\n }),\r\n );\r\n }\r\n const { data: statementData } = await getStatementRequest(statementId, {\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: projectId,\r\n });\r\n //dispatch(leftSelectedStatementLoading());\r\n const statement = new Statement(statementData, statementId);\r\n const { leftRevision } = getState().data;\r\n const isLatestRevision =\r\n leftRevision.revisionNumber === statement.latestRevision;\r\n dispatch(\r\n leftSelectedStatementLoaded({\r\n statement,\r\n readOnlyOverride: leftRevision.readOnly || !isLatestRevision,\r\n }),\r\n );\r\n if (_isSideBySideView && statement.documentProcessType === OCR_DOC_TYPE) {\r\n await dispatch(\r\n getSelectedStatementOCRNavigationData(projectId, revisionId, true),\r\n );\r\n }\r\n } catch (error) {\r\n dispatch(leftSelectedStatementError(error));\r\n }\r\n };\r\n\r\nexport const checkIfFeatureFlagEnabled =\r\n ({ featureName }) =>\r\n (dispatch, getState) => {\r\n const selectedStatement =\r\n getState().data &&\r\n getState().data.leftselectedStatement &&\r\n getState().data.leftselectedStatement.data &&\r\n getState().data.leftselectedStatement.data.statement;\r\n switch (featureName) {\r\n case FEATURE_NAMES.COMFORT_ASSIGNED_FEATURE:\r\n case FEATURE_NAMES.COMFORT_LETTER_FEATURE:\r\n return selectedStatement && selectedStatement.comfortLetter; // We are maintaining a common flag to enable/disable comfort letter and comfort assigned(comfortAssign)\r\n\r\n default:\r\n return true;\r\n }\r\n };\r\n","import {\r\n withDefaultContextAsSelectedProject,\r\n withDefaultContextAsSelectedGeo,\r\n} from 'api/api-default-context';\r\n\r\nexport const verifyOmniaTokenRequest = ({ token, geoCode }) =>\r\n withDefaultContextAsSelectedGeo({}, geoCode)\r\n .get(`/tieout/omnia/decode?token=${token}`)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getEngagementsByIdRequest = ({ engagementId, geoCode }) =>\r\n withDefaultContextAsSelectedGeo({}, geoCode)\r\n .get(`/tieout/omnia/engagement?eId=${engagementId}`)\r\n .then((response) => {\r\n let projectGeo;\r\n // modify response to add geo code suffix for project id\r\n if (\r\n response &&\r\n response.data &&\r\n response.data.result &&\r\n response.data.result.omniaTieoutEngagementEntityList\r\n )\r\n projectGeo =\r\n response.data.result.omniaEngagementEntity &&\r\n response.data.result.omniaEngagementEntity.geoName;\r\n response.data.result.omniaTieoutEngagementEntityList =\r\n response.data.result.omniaTieoutEngagementEntityList.map((entry) => {\r\n entry.toutProjectId = `${entry.toutProjectId}-${projectGeo}`;\r\n return entry;\r\n });\r\n return response;\r\n });\r\n\r\nexport const linkOmniaEngagementRequest = ({\r\n omniaTieoutEngagementEntity,\r\n geoCode,\r\n}) =>\r\n withDefaultContextAsSelectedGeo({}, geoCode)\r\n .post('/tieout/omnia/link', omniaTieoutEngagementEntity)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const unlinkOmniaEngagementRequest = ({\r\n omniaTieoutEngagementEntity,\r\n geoCode,\r\n}) =>\r\n withDefaultContextAsSelectedGeo({}, geoCode)\r\n .post('/tieout/omnia/unlink', omniaTieoutEngagementEntity)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const exportFileToOmnia = ({ omniaReportEntity }) =>\r\n withDefaultContextAsSelectedProject()\r\n .post('/tieout/omnia/export', omniaReportEntity)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const exportFileToOmniaFallback = ({ omniaReportEntity }) =>\r\n withDefaultContextAsSelectedProject()\r\n .post('/tieout/omnia/fallback/export', omniaReportEntity)\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getOmniaExportFileStatus = ({ statementId }) =>\r\n withDefaultContextAsSelectedProject().get('/tieout/omnia/status', {\r\n params: { statementId: statementId },\r\n });\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setContentFixedMode = createAction('SET_STATEMENT_FIXED_MODE');\r\nexport const setContentFullMode = createAction('SET_STATEMENT_FULL_MODE');\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const addToCurrentSectionIds = createAction('ADD_TO_CURRENT_SECTIONS');\r\nexport const removeFromCurrentSectionIds = createAction(\r\n 'REMOVE_FROM_CURRENT_SECTIONS',\r\n);\r\n\r\nexport const addToLeftCurrentSectionIds = createAction(\r\n 'ADD_TO_LEFT_CURRENT_SECTIONS',\r\n);\r\nexport const removeFromLeftCurrentSectionIds = createAction(\r\n 'REMOVE_FROM_LEFT_CURRENT_SECTIONS',\r\n);\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setHeadingAssignmentRefresh = createAction(\r\n 'SET_HEADING_ASSIGNMENT_REFRESH',\r\n);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"icon-path-outer\",\n d: \"M0.5 14C0.5 6.51781 6.51781 0.5 14 0.5C21.4822 0.5 27.5 6.51781 27.5 14C27.5 21.4822 21.4822 27.5 14 27.5C6.51781 27.5 0.5 21.4822 0.5 14Z\",\n stroke: \"#00A3E0\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"icon-path-inner\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M17.1289 12C17.4383 12.2859 17.6707 12.5066 17.8263 12.6621L21.4549 16.4442C21.9799 16.9692 22.3299 17.7275 22.3299 18.4275V18.4859C22.3299 19.2442 22.0382 19.9442 21.4549 20.5275C20.8715 21.1109 20.1132 21.4025 19.3549 21.4025C18.5965 21.4025 17.8965 21.0525 17.3715 20.5275L13.6382 16.7942C13.4659 16.6218 13.2115 16.3691 12.875 16.0359C13.8098 15.9174 14.3364 15.9174 14.4549 16.0359L18.1882 19.7692C18.5382 20.1192 18.9465 20.2942 19.4132 20.2942C19.8799 20.2942 20.3465 20.1192 20.6965 19.7692C21.0465 19.4192 21.2215 18.9525 21.2215 18.4859C21.2215 18.0192 21.1 17.5713 20.75 17.2213L17.0679 13.4788C16.8735 13.2854 16.8938 12.7925 17.1289 12ZM11.2009 14.4025C10.8916 14.1167 10.6592 13.8959 10.5036 13.7404L6.875 9.95833C6.35 9.43333 6 8.675 6 7.975V7.91667C6 7.15833 6.29167 6.45833 6.875 5.875C7.45833 5.29167 8.21667 5 8.975 5C9.73333 5 10.4333 5.35 10.9583 5.875L14.6917 9.60833C14.864 9.78067 15.1184 10.0335 15.4549 10.3667C14.5201 10.4851 13.9934 10.4851 13.875 10.3667L10.1417 6.63333C9.79167 6.28333 9.38333 6.10833 8.91667 6.10833C8.45 6.10833 7.98333 6.28333 7.63333 6.63333C7.28333 6.98333 7.10833 7.45 7.10833 7.91667C7.10833 8.38333 7.22988 8.83125 7.57988 9.18125L11.2619 12.9237C11.4564 13.1171 11.436 13.6101 11.2009 14.4025ZM8.58579 18.251L10.8485 15.9883C11.0047 15.8321 11.258 15.8321 11.4142 15.9883C11.5704 16.1445 11.5704 16.3978 11.4142 16.554L9.15147 18.8167C8.99526 18.9729 8.742 18.9729 8.58579 18.8167C8.42958 18.6605 8.42958 18.4073 8.58579 18.251ZM19.8142 8.15398L17.5515 10.4167C17.3953 10.5729 17.142 10.5729 16.9858 10.4167C16.8296 10.2605 16.8296 10.0072 16.9858 9.85103L19.2485 7.58829C19.4047 7.43208 19.658 7.43208 19.8142 7.58829C19.9704 7.7445 19.9704 7.99777 19.8142 8.15398ZM22 12.4025H18.8C18.5791 12.4025 18.4 12.2234 18.4 12.0025C18.4 11.7816 18.5791 11.6025 18.8 11.6025H22C22.2209 11.6025 22.4 11.7816 22.4 12.0025C22.4 12.2234 22.2209 12.4025 22 12.4025ZM15.8 5.40252V8.60252C15.8 8.82343 15.6209 9.00252 15.4 9.00252C15.1791 9.00252 15 8.82343 15 8.60252V5.40252C15 5.1816 15.1791 5.00252 15.4 5.00252C15.6209 5.00252 15.8 5.1816 15.8 5.40252ZM6.4 14.0025H9.6C9.82091 14.0025 10 14.1816 10 14.4025C10 14.6234 9.82091 14.8025 9.6 14.8025H6.4C6.17909 14.8025 6 14.6234 6 14.4025C6 14.1816 6.17909 14.0025 6.4 14.0025ZM12.6 21.0025V17.8025C12.6 17.5816 12.7791 17.4025 13 17.4025C13.2209 17.4025 13.4 17.5816 13.4 17.8025V21.0025C13.4 21.2234 13.2209 21.4025 13 21.4025C12.7791 21.4025 12.6 21.2234 12.6 21.0025Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgUnlink = function SvgUnlink(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgUnlink, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/unlink.6f71273d.svg\";\nexport { ForwardRef as ReactComponent };","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nexport default class Workflow extends BaseModel({\r\n endTime: null,\r\n initiatorId: null,\r\n previousStatus: null,\r\n retryable: null,\r\n revisionId: null,\r\n startTime: null,\r\n statementName: null,\r\n statementId: null,\r\n status: null,\r\n errorInfo: null,\r\n}) {\r\n getWorkFlowStatus(statementWorkflowSteps) {\r\n return this._getWorkFlowStatus(this.status, statementWorkflowSteps);\r\n }\r\n getPreviousWorkflowStatus(statementWorkflowSteps) {\r\n return this._getWorkFlowStatus(this.previousStatus, statementWorkflowSteps);\r\n }\r\n _getWorkFlowStatus = (status, statementWorkflowSteps) => {\r\n return !isNullOrUndefined(status)\r\n ? statementWorkflowSteps[status] &&\r\n this.getWorkFlowStatusDetails(statementWorkflowSteps[status])\r\n : null;\r\n };\r\n\r\n getWorkFlowStatusDetails(stepByStatus) {\r\n return {\r\n status: stepByStatus.status,\r\n statusDisplay: stepByStatus.displayMessage,\r\n currentStep: stepByStatus.currentStep,\r\n totalSteps: stepByStatus.numberOfSteps,\r\n };\r\n }\r\n\r\n isEqual(anotherWorkflow, statementWorkflowSteps) {\r\n return (\r\n !isNullOrUndefined(anotherWorkflow) &&\r\n this.startTime === anotherWorkflow.startTime &&\r\n this.initiatorId === anotherWorkflow.initiatorId &&\r\n this.endTime === anotherWorkflow.endTime &&\r\n JSON.stringify(this.getPreviousWorkflowStatus(statementWorkflowSteps)) ===\r\n JSON.stringify(\r\n anotherWorkflow.getPreviousWorkflowStatus(statementWorkflowSteps),\r\n ) &&\r\n JSON.stringify(this.getWorkFlowStatus(statementWorkflowSteps)) ===\r\n JSON.stringify(\r\n anotherWorkflow.getWorkFlowStatus(statementWorkflowSteps),\r\n ) &&\r\n this.retryable === anotherWorkflow.retryable\r\n );\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport Workflow from 'models/data/workflow-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class WorkflowsMap extends ApiModel({\r\n data: {\r\n revisionWorkflowMap: {\r\n // map of workflows by revisionId, shape of\r\n /*\r\n {\r\n [revisionId]: Workflow (workflow model)\r\n }\r\n */\r\n },\r\n statementIdsMap: {\r\n // map of statementIds and revision ids, shape of\r\n /*\r\n {\r\n [statementId]: {\r\n [revisionId]: true,\r\n .. other revision ids with same statementId\r\n }\r\n }\r\n */\r\n },\r\n },\r\n status: null,\r\n}) {\r\n processResponse({ response }) {\r\n const { statementIdsMap, revisionWorkflowMap } = this._workflowListToMap(\r\n response.data,\r\n );\r\n return {\r\n data: {\r\n revisionWorkflowMap,\r\n statementIdsMap,\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n _workflowListToMap = (workflowList) => {\r\n const workflowMap = new Map();\r\n const statementIdsMap = {};\r\n workflowList.forEach((workflow) => {\r\n workflowMap.set(workflow.revisionId, new Workflow(workflow));\r\n statementIdsMap[workflow.statementId] = {\r\n ...statementIdsMap[workflow.statementId],\r\n [workflow.revisionId]: true,\r\n };\r\n });\r\n return {\r\n revisionWorkflowMap: workflowMap,\r\n statementIdsMap,\r\n };\r\n };\r\n\r\n isInitialized() {\r\n return (\r\n this.data &&\r\n this.data.revisionWorkflowMap &&\r\n this.data.revisionWorkflowMap.size > 0\r\n );\r\n }\r\n\r\n getInitializedSize() {\r\n return (\r\n this.data &&\r\n this.data.revisionWorkflowMap &&\r\n this.data.revisionWorkflowMap.size\r\n );\r\n }\r\n\r\n getWorkflowsMapData() {\r\n if (this.data) {\r\n return this.data.revisionWorkflowMap;\r\n }\r\n return new Map();\r\n }\r\n\r\n getWorkflowsListData() {\r\n if (this.isInitialized()) {\r\n return Array.from(this.data.revisionWorkflowMap.values());\r\n }\r\n return [];\r\n }\r\n\r\n getStatementMapData() {\r\n if (this.data) {\r\n return this.data.statementIdsMap;\r\n }\r\n return {};\r\n }\r\n\r\n getProcessingWorkflowsTotal(statementWorkflowSteps) {\r\n let processingWorkflowsTotal = 0;\r\n if (this.isInitialized()) {\r\n this.data.revisionWorkflowMap.forEach((workflow) => {\r\n if (\r\n workflow.status !==\r\n statementWorkflowSteps.isFailedWorkflowStep(\r\n workflow.documentProcessTypeEnum,\r\n ).status &&\r\n workflow.status !==\r\n statementWorkflowSteps.isCompletedWorkFlowStep(\r\n workflow.documentProcessTypeEnum,\r\n ).status\r\n ) {\r\n processingWorkflowsTotal++;\r\n }\r\n });\r\n }\r\n return processingWorkflowsTotal;\r\n }\r\n\r\n getFailedWorkflowsTotal(statementWorkflowSteps) {\r\n let failedWorkflowsTotal = 0;\r\n if (this.isInitialized()) {\r\n this.data.revisionWorkflowMap.forEach((workflow) => {\r\n if (\r\n workflow.status ===\r\n statementWorkflowSteps.isFailedWorkflowStep(\r\n workflow.documentProcessTypeEnum,\r\n ).status\r\n ) {\r\n failedWorkflowsTotal++;\r\n }\r\n });\r\n }\r\n return failedWorkflowsTotal;\r\n }\r\n\r\n areWorkFlowsEqual(workflowsToCompare, statementWorkflowSteps) {\r\n if (this.isInitialized() !== workflowsToCompare.isInitialized()) {\r\n return false;\r\n }\r\n if (this.isInitialized()) {\r\n if (\r\n this.getWorkflowsMapData().size !==\r\n workflowsToCompare.getWorkflowsMapData().size\r\n ) {\r\n return false;\r\n }\r\n for (let [key, value] of this.getWorkflowsMapData()) {\r\n const otherWorkflow = workflowsToCompare.getWorkflowsMapData().get(key);\r\n const _aWorkflowIsNullOrUndefined =\r\n isNullOrUndefined(otherWorkflow) &&\r\n !workflowsToCompare.getWorkflowsMapData().has(key);\r\n if (\r\n _aWorkflowIsNullOrUndefined ||\r\n !otherWorkflow.isEqual(\r\n value,\r\n statementWorkflowSteps.getWorkflowStepsByDocProcessType(\r\n value.documentProcessTypeEnum,\r\n ),\r\n )\r\n ) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n statementHasProcessingRevision({ statementId }) {\r\n return Object.prototype.hasOwnProperty.call(\r\n this.getStatementMapData(),\r\n statementId,\r\n );\r\n }\r\n\r\n getWorkflowsByStatementId(statementId) {\r\n const workflowMap = this.getWorkflowsMapData();\r\n if (this.statementHasProcessingRevision({ statementId })) {\r\n return Object.entries(this.data.statementIdsMap[statementId]).reduce(\r\n (workflowList, workflowEntry) => {\r\n const [workflowId, isWorkflowProcessing] = workflowEntry;\r\n if (isWorkflowProcessing) {\r\n return workflowList.concat(workflowMap.get(Number(workflowId)));\r\n }\r\n return workflowList;\r\n },\r\n [],\r\n );\r\n }\r\n return [];\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class MenuApiData extends BaseModel({\r\n /* Api model representing the response object, used for loading animations on the table */\r\n apiModel: null,\r\n /* Array of MenuOption options, should be a (sub)property of the apiModel */\r\n options: [],\r\n}) {\r\n constructor({ apiModel, options }) {\r\n super();\r\n // TODO would like to add this instanceof check here\r\n // if (!(apiModel instanceof ApiModel)) {\r\n // throw Error('apiModel prop for menu component needs to be of type ApiModel');\r\n // }\r\n if (!Array.isArray(options)) {\r\n throw Error('options prop for menu component needs to be of type Array');\r\n }\r\n this.apiModel = apiModel;\r\n this.options = options;\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport ProjectApi from 'models/api/project-api-model';\r\n\r\nexport default class ProjectListEntry extends BaseModel({\r\n active: null,\r\n adminGroupAddDate: null,\r\n cik: null,\r\n deleteDate: null,\r\n engagementEntity: null,\r\n omniaEngagementEntity: null,\r\n hasAdminGroup: null,\r\n hasCoeGroup: null,\r\n id: null,\r\n legalHold: null,\r\n name: null,\r\n sic: null,\r\n geoCode: null,\r\n symbol: null,\r\n type: null,\r\n userEntities: [], // type [User]\r\n createdDate: null,\r\n pinnedDatetime: null,\r\n}) {\r\n getCreatedDate() {\r\n return moment(this.createdDate).format(DATE_FORMATS.MONTH_DAY_YEAR);\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.id);\r\n }\r\n\r\n isDeleted() {\r\n return !this.active && this.deleteDate;\r\n }\r\n\r\n get isProjectPinned() {\r\n return !isNullOrUndefined(this.pinnedDatetime);\r\n }\r\n\r\n getUserIds() {\r\n let idsArray = [];\r\n if (this.userEntities.length) {\r\n this.userEntities.forEach((user) => {\r\n idsArray.push(user.id);\r\n });\r\n }\r\n return idsArray.join(',');\r\n }\r\n\r\n getProjectGeo() {\r\n return this.geoCode;\r\n }\r\n\r\n toProjectApiModel() {\r\n const apiModel = new ProjectApi();\r\n // returns data the same shape as it would be returned in the /client?clientId={clientId} response\r\n return apiModel.setLoaded({\r\n data: { ...this },\r\n });\r\n }\r\n}\r\n","import React from 'react';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst AUTOMATICALLY_IDENTIFIED_ANNOTATIONS =\r\n 'automatically-identified-annotation';\r\n\r\nconst AutomaticallyIdentifiedAnnotations = ({ tooltipId }) => {\r\n return (\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n );\r\n};\r\n\r\nexport default AutomaticallyIdentifiedAnnotations;\r\n","import { useEffect, useRef } from 'react';\r\n\r\nfunction useOutsideClick(callback) {\r\n const ref = useRef(null);\r\n\r\n useEffect(() => {\r\n function handleClickOutside(event) {\r\n if (ref.current && !ref.current.contains(event.target)) {\r\n callback();\r\n }\r\n }\r\n\r\n document.addEventListener('mousedown', handleClickOutside);\r\n return () => {\r\n document.removeEventListener('mousedown', handleClickOutside);\r\n };\r\n }, [callback, ref]);\r\n\r\n return [ref];\r\n}\r\n\r\nexport default useOutsideClick;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M2.36497 1.36431C2.31601 0.905113 1.94826 0.5 1.43527 0.5C0.883666 0.5 0.5 0.968383 0.5 1.46875V2.25V7.8457V8.8125V10.5312C0.5 11.0316 0.883666 11.5 1.43527 11.5C1.98687 11.5 2.37054 11.0316 2.37054 10.5312V8.96119L3.45701 8.66831L3.45715 8.66828C4.07717 8.50094 4.73482 8.57796 5.3115 8.8875C6.24281 9.38898 7.32871 9.45149 8.30585 9.05535C8.30602 9.05528 8.3062 9.05521 8.30637 9.05514L8.93484 8.80157L8.93543 8.80134C9.36578 8.62708 9.625 8.20083 9.625 7.75195V2.29102C9.625 1.52863 8.83788 0.899223 8.07545 1.30976L7.90134 1.40351L7.90095 1.40373C7.20948 1.77686 6.39962 1.77688 5.70814 1.4038L2.36497 1.36431ZM2.36497 1.36431L3.28184 1.11688L3.28244 1.11672C4.09775 0.897786 4.95991 0.999798 5.70801 1.40373L2.36497 1.36431Z\",\n fill: \"#D67D00\",\n stroke: \"white\"\n});\n\nvar SvgFlagIcon = function SvgFlagIcon(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 11,\n height: 12,\n viewBox: \"0 0 11 12\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFlagIcon, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/flag-icon.f290796a.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { shouldShowMoreButton } from 'constants/feature/tickmark-constants';\r\nimport { AUTOMATION_CREATION_TYPE } from 'constants/feature/element-panel-constants';\r\nimport AutomaticallyIdentifiedAnnotations from 'components/common/automatically-identified-annotations';\r\nimport { shouldRestrictAutomaticIdentifier } from 'utils/statement-content-page-utils';\r\n\r\nexport const TICKMARK_ENTRY_BLOCK = 'tickmark-entry';\r\nexport const TICKMARK_ENTRY_ID_BLOCK = 'tickmark-entry-id';\r\nexport const TICKMARK_TEXT_CHAR_LENGTH = 150;\r\nexport const TICKMARK_TEXT_LINES_LENGTH = 3;\r\n\r\nconst TickmarkEntry = ({\r\n tickmark,\r\n rightComponent,\r\n bottomComponent,\r\n absoluteTopRightComponent,\r\n className,\r\n currentlyExpandedTickmarkID,\r\n updateExpandedTickmarkID,\r\n shouldShowAutomatedTag = true,\r\n}) => {\r\n const [toggleShowMore, setToggleShowMore] = React.useState(true);\r\n const [isShowLessBtnVisible, setShowLessBtnVisible] = React.useState(false);\r\n const [refValue, setRefValue] = React.useState(null);\r\n const [clamped, setClamped] = React.useState(false);\r\n\r\n const tickmarkTextRef = React.useRef(null);\r\n\r\n const toggleShowMoreClicked = (toggleStatus) => {\r\n setToggleShowMore(toggleStatus);\r\n updateExpandedTickmarkID &&\r\n updateExpandedTickmarkID(\r\n toggleStatus,\r\n tickmark.tickmarkId,\r\n tickmarkTextRef,\r\n );\r\n };\r\n\r\n /**based on toggleShowMore value it will trigger updateExpandedTickmarkID callback method send latest reference element to \r\n Parent class to get clientHeight or offSetHeight value of selected element, so that the value can be used to update height \r\n in virtualized list component div elements to extended scroll bar and to view complete description of selected tickmarsk*/\r\n useEffect(() => {\r\n if (toggleShowMore === false) {\r\n updateExpandedTickmarkID &&\r\n updateExpandedTickmarkID(\r\n toggleShowMore,\r\n tickmark.tickmarkId,\r\n tickmarkTextRef,\r\n );\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [toggleShowMore]);\r\n\r\n useEffect(() => {\r\n if (\r\n Number.isInteger(currentlyExpandedTickmarkID) &&\r\n !toggleShowMore &&\r\n currentlyExpandedTickmarkID !== tickmark.tickmarkId\r\n ) {\r\n setToggleShowMore(true);\r\n setShowLessBtnVisible(false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [tickmark.tickmarkId, currentlyExpandedTickmarkID]);\r\n\r\n useEffect(() => {\r\n if (\r\n Number.isInteger(currentlyExpandedTickmarkID) &&\r\n toggleShowMore &&\r\n currentlyExpandedTickmarkID === tickmark.tickmarkId\r\n ) {\r\n setToggleShowMore(false);\r\n setShowLessBtnVisible(true);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [tickmark.tickmarkId, currentlyExpandedTickmarkID]);\r\n\r\n useEffect(() => {\r\n setRefValue(tickmarkTextRef);\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (\r\n shouldShowMoreButton({\r\n textRef: refValue && refValue.current,\r\n })\r\n ) {\r\n setClamped(true);\r\n } else {\r\n if (!isShowLessBtnVisible) {\r\n setClamped(false);\r\n }\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [refValue, tickmark]);\r\n\r\n const onShowMoreBtnClick = () => {\r\n toggleShowMoreClicked(false);\r\n setShowLessBtnVisible(true);\r\n };\r\n\r\n const onShowLessBtnClick = () => {\r\n toggleShowMoreClicked(true);\r\n setShowLessBtnVisible(false);\r\n };\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n {shouldShowAutomatedTag &&\r\n !shouldRestrictAutomaticIdentifier() &&\r\n Object.values(AUTOMATION_CREATION_TYPE).includes(\r\n tickmark.creationType,\r\n ) && (\r\n \r\n )}\r\n
    \r\n \r\n {`{${tickmark.noteOrdinal}}`}\r\n \r\n \r\n {clamped &&\r\n (toggleShowMore ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n ))}\r\n
    \r\n
    \r\n {!isNullOrUndefined(rightComponent) && (\r\n \r\n {rightComponent}\r\n
    \r\n )}\r\n \r\n {!isNullOrUndefined(bottomComponent) && (\r\n \r\n {bottomComponent}\r\n \r\n )}\r\n {!isNullOrUndefined(absoluteTopRightComponent) && (\r\n \r\n {absoluteTopRightComponent}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nTickmarkEntry.propTypes = {\r\n /** Tickmark object from the tickmark list endpoint */\r\n tickmark: PropTypes.object.isRequired,\r\n /** Component placed absolutely in top right corner of entry */\r\n absoluteTopRightComponent: PropTypes.oneOfType([\r\n PropTypes.node,\r\n PropTypes.arrayOf(PropTypes.node),\r\n ]),\r\n /** Component used to children to the right of the main content, displayed as flex container with content*/\r\n rightComponent: PropTypes.oneOfType([\r\n PropTypes.node,\r\n PropTypes.arrayOf(PropTypes.node),\r\n ]),\r\n /** Component used to place any nodes below the normal entry component*/\r\n bottomComponent: PropTypes.oneOfType([\r\n PropTypes.node,\r\n PropTypes.arrayOf(PropTypes.node),\r\n ]),\r\n /** Custom classname applied to entry */\r\n className: PropTypes.string,\r\n /* function to set the currently expanded tickmark id after clicking Show More button */\r\n updateExpandedTickmarkID: PropTypes.func,\r\n /** Tickmark id of the tickmark expanded on the toolkit panel after clicking Show More button */\r\n currentlyExpandedTickmarkID: PropTypes.number,\r\n /** Boolean to show/hide automated tag via statement navigation element filter */\r\n shouldShowAutomatedTag: PropTypes.bool,\r\n};\r\n\r\nexport default memo(TickmarkEntry);\r\n","import React, { memo, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { shouldShowMoreButton } from 'constants/feature/tickmark-constants';\r\nimport { isNullOrUndefined } from '../../../../../utils/object-utils';\r\n\r\nexport const COMFORT_LETTER_ENTRY_BLOCK = 'comfort-letter-entry';\r\nexport const COMFORT_LETTER_ENTRY_ID_BLOCK = 'comfort-letter-entry-id';\r\nexport const COMFORT_LETTER_TEXT_CHAR_LENGTH = 150;\r\nexport const COMFORT_LETTER_TEXT_LINES_LENGTH = 3;\r\n\r\nexport const ComfortLetterEntry = ({\r\n comfortLetter,\r\n className,\r\n rightComponent,\r\n bottomComponent,\r\n absoluteTopRightComponent,\r\n updateExpandedComfortLetterID,\r\n currentlyExpandedComfortLetterID,\r\n}) => {\r\n const [toggleShowMore, setToggleShowMore] = React.useState(true);\r\n const [refValue, setRefValue] = React.useState(null);\r\n const [clamped, setClamped] = React.useState([]);\r\n\r\n const comfortLetterTextRef = React.useRef(null);\r\n\r\n const toggleShowMoreClicked = (toggleStatus) => {\r\n setToggleShowMore(toggleStatus);\r\n updateExpandedComfortLetterID &&\r\n updateExpandedComfortLetterID(\r\n toggleStatus,\r\n comfortLetter.comfortLetterId,\r\n comfortLetterTextRef,\r\n );\r\n };\r\n\r\n /**based on toggleShowMore value it will trigger updateExpandedComfortLetterID callback method send latest reference element to \r\n Parent class to get clientHeight or offSetHeight value of selected element, so that the value can be used to update height \r\n in virtualized list component div elements to extended scroll bar and to view complete description of selected Comfort Annotation*/\r\n useEffect(() => {\r\n if (toggleShowMore === false) {\r\n updateExpandedComfortLetterID &&\r\n updateExpandedComfortLetterID(\r\n toggleShowMore,\r\n comfortLetter.comfortLetterId,\r\n comfortLetterTextRef,\r\n );\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [toggleShowMore]);\r\n\r\n useEffect(() => {\r\n if (\r\n Number.isInteger(currentlyExpandedComfortLetterID) &&\r\n !toggleShowMore &&\r\n currentlyExpandedComfortLetterID !== comfortLetter.comfortLetterId\r\n ) {\r\n setToggleShowMore(true);\r\n }\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [comfortLetter.comfortLetterId, currentlyExpandedComfortLetterID]);\r\n\r\n useEffect(() => {\r\n if (\r\n Number.isInteger(currentlyExpandedComfortLetterID) &&\r\n toggleShowMore &&\r\n currentlyExpandedComfortLetterID === comfortLetter.comfortLetterId\r\n ) {\r\n setToggleShowMore(false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [comfortLetter.comfortLetterId, currentlyExpandedComfortLetterID]);\r\n\r\n React.useEffect(() => {\r\n setRefValue(comfortLetterTextRef);\r\n }, []);\r\n\r\n React.useEffect(() => {\r\n if (\r\n shouldShowMoreButton({\r\n textRef: refValue && refValue.current,\r\n })\r\n ) {\r\n setClamped([comfortLetter.comfortLetterId]);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [refValue, comfortLetter]);\r\n\r\n const onShowMoreBtnClick = () => {\r\n toggleShowMoreClicked(false);\r\n };\r\n\r\n const onShowLessBtnClick = () => {\r\n toggleShowMoreClicked(true);\r\n };\r\n\r\n return (\r\n \r\n
    \r\n
    \r\n \r\n {`[${comfortLetter.customLabel}]`}\r\n \r\n \r\n {Array.isArray(clamped) &&\r\n clamped.includes(comfortLetter.comfortLetterId) &&\r\n (toggleShowMore ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n ))}\r\n
    \r\n {!isNullOrUndefined(rightComponent) && (\r\n \r\n {rightComponent}\r\n
    \r\n )}\r\n \r\n {!isNullOrUndefined(bottomComponent) && (\r\n \r\n {bottomComponent}\r\n \r\n )}\r\n {!isNullOrUndefined(absoluteTopRightComponent) && (\r\n \r\n {absoluteTopRightComponent}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nComfortLetterEntry.propTypes = {\r\n /** comfortLetter object from the comfortLetter list endpoint */\r\n comfortLetter: PropTypes.object.isRequired,\r\n /** Component placed absolutely in top right corner of entry */\r\n absoluteTopRightComponent: PropTypes.oneOfType([\r\n PropTypes.node,\r\n PropTypes.arrayOf(PropTypes.node),\r\n ]),\r\n /** Component used to children to the right of the main content, displayed as flex container with content*/\r\n rightComponent: PropTypes.oneOfType([\r\n PropTypes.node,\r\n PropTypes.arrayOf(PropTypes.node),\r\n ]),\r\n /** Component used to place any nodes below the normal entry component*/\r\n bottomComponent: PropTypes.oneOfType([\r\n PropTypes.node,\r\n PropTypes.arrayOf(PropTypes.node),\r\n ]),\r\n /** Custom classname applied to entry */\r\n className: PropTypes.string,\r\n /* function to set the currently expanded comfort letter id after clicking Show More button */\r\n updateExpandedComfortLetterID: PropTypes.func,\r\n /** Comfort Letter id of the comfort letter expanded on the toolkit panel after clicking Show More button */\r\n currentlyExpandedComfortLetterID: PropTypes.number,\r\n};\r\n\r\nexport default memo(ComfortLetterEntry);\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class AnnotationDisplayOptions extends BaseModel({\r\n workpaper: true,\r\n tickmarks: true,\r\n internalRef: true,\r\n formula: true,\r\n comfortLetter: true,\r\n flag: true,\r\n status: true,\r\n notes: true,\r\n note: true,\r\n showAll: false,\r\n expandAllElements: false,\r\n}) {}\r\n","import BaseModel from 'models/base-model';\r\nexport default class SideBySideViewZoom extends BaseModel({\r\n currentZoom: 100, // default\r\n maxZoom: 500,\r\n minZoom: 10,\r\n stepValue: 10,\r\n}) {\r\n get zoomRatio() {\r\n return this.currentZoom / 100;\r\n }\r\n incrementZoom() {\r\n let newZoomValue = this.currentZoom + this.stepValue;\r\n if (newZoomValue > this.maxZoom) {\r\n newZoomValue = this.maxZoom;\r\n }\r\n\r\n return this.merge({ currentZoom: newZoomValue });\r\n }\r\n\r\n decrementZoom() {\r\n let newZoomValue = this.currentZoom - this.stepValue;\r\n if (newZoomValue < this.minZoom) {\r\n newZoomValue = this.minZoom;\r\n }\r\n\r\n return this.merge({ currentZoom: newZoomValue });\r\n }\r\n\r\n disableIncrement() {\r\n return this.currentZoom >= this.maxZoom;\r\n }\r\n\r\n disableDecrement() {\r\n return this.currentZoom <= this.minZoom;\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M16.665 11.335L16.665 14.5077L14.75 16.4227L12.835 14.5077L12.835 11.335L16.665 11.335Z\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M9.75 19H19.75\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar SvgCalloutsDirectionSetterTop = function SvgCalloutsDirectionSetterTop(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 29,\n viewBox: \"0 0 29 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCalloutsDirectionSetterTop, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/callouts-direction-setter-top.5bd93243.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M23.165 15.915L19.9923 15.915L18.0773 14L19.9923 12.085L23.165 12.085L23.165 15.915Z\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M15.75 14L5.75 14\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar SvgCalloutsDirectionSetterRight = function SvgCalloutsDirectionSetterRight(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 29,\n viewBox: \"0 0 29 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCalloutsDirectionSetterRight, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/callouts-direction-setter-right.1e5e01e0.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M12.835 18.665L12.835 15.4923L14.75 13.5773L16.665 15.4923L16.665 18.665L12.835 18.665Z\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M9.75 11H19.75\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar SvgCalloutsDirectionSetterBottom = function SvgCalloutsDirectionSetterBottom(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 29,\n viewBox: \"0 0 29 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCalloutsDirectionSetterBottom, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/callouts-direction-setter-bottom.4c98a50f.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { ReactComponent as CalloutDirectionSetterLeft } from 'icons/callouts-direction-setter-left.svg';\r\nimport { ReactComponent as CalloutDirectionSetterTop } from 'icons/callouts-direction-setter-top.svg';\r\nimport { ReactComponent as CalloutDirectionSetterRight } from 'icons/callouts-direction-setter-right.svg';\r\nimport { ReactComponent as CalloutDirectionSetterBottom } from 'icons/callouts-direction-setter-bottom.svg';\r\n\r\nexport const ANNOTATION_POSITION_TYPES = {\r\n LEFT: 1,\r\n TOP: 2,\r\n RIGHT: 3,\r\n BOTTOM: 4,\r\n};\r\n\r\nconst ANNOTATION_SUMMARY_ICON_SIZE = '30px';\r\n\r\nexport const ANNOTATION_POSITION_OPTIONS_MAP = new Map();\r\n\r\nANNOTATION_POSITION_OPTIONS_MAP.set(\r\n ANNOTATION_POSITION_TYPES.LEFT,\r\n new MenuOption({\r\n id: ANNOTATION_POSITION_TYPES.LEFT,\r\n title: 'annotations-direction-left',\r\n value: ANNOTATION_POSITION_TYPES.LEFT,\r\n icon: (\r\n \r\n ),\r\n }),\r\n);\r\nANNOTATION_POSITION_OPTIONS_MAP.set(\r\n ANNOTATION_POSITION_TYPES.TOP,\r\n new MenuOption({\r\n id: ANNOTATION_POSITION_TYPES.TOP,\r\n title: 'annotations-direction-top',\r\n value: ANNOTATION_POSITION_TYPES.TOP,\r\n icon: (\r\n \r\n ),\r\n }),\r\n);\r\nANNOTATION_POSITION_OPTIONS_MAP.set(\r\n ANNOTATION_POSITION_TYPES.RIGHT,\r\n new MenuOption({\r\n id: ANNOTATION_POSITION_TYPES.RIGHT,\r\n title: 'annotations-direction-right',\r\n value: ANNOTATION_POSITION_TYPES.RIGHT,\r\n icon: (\r\n \r\n ),\r\n }),\r\n);\r\nANNOTATION_POSITION_OPTIONS_MAP.set(\r\n ANNOTATION_POSITION_TYPES.BOTTOM,\r\n new MenuOption({\r\n id: ANNOTATION_POSITION_TYPES.BOTTOM,\r\n title: 'annotations-direction-bottom',\r\n value: ANNOTATION_POSITION_TYPES.BOTTOM,\r\n icon: (\r\n \r\n ),\r\n }),\r\n);\r\nexport const ANNOTATION_POSITIONS = Array.from(\r\n ANNOTATION_POSITION_OPTIONS_MAP.values(),\r\n);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n className: \"icon-path refresh\",\n d: \"M15.4557 11.6035C15.4557 11.9235 15.1965 12.1826 14.8765 12.1826H11.9826C11.6626 12.1826 11.4035 11.9235 11.4035 11.6035V8.70957C11.4035 8.38957 11.6626 8.13044 11.9826 8.13044C12.3026 8.13044 12.5617 8.38957 12.5617 8.70957V10.44C13.3096 9.44348 13.7183 8.23653 13.7183 6.97409C13.7183 3.78261 11.1235 1.18609 7.93061 1.18609C4.73913 1.18609 2.14435 3.78261 2.14435 6.97409C2.14435 10.1652 4.73913 12.7617 7.93061 12.7617C8.25044 12.7617 8.50957 13.0209 8.50957 13.3409C8.50957 13.6609 8.25044 13.9183 7.93061 13.9183C4.10087 13.9183 0.986088 10.8035 0.986088 6.97409C0.986088 3.14435 4.10087 0.027832 7.93061 0.027832C11.76 0.027832 14.8765 3.14435 14.8765 6.97409C14.8765 8.44348 14.4122 9.8487 13.5652 11.0244H14.8765C15.1965 11.0244 15.4557 11.2835 15.4557 11.6035Z\",\n fill: \"#00a3e0\"\n});\n\nvar SvgRefreshBlue = function SvgRefreshBlue(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 14,\n viewBox: \"0 0 16 14\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRefreshBlue, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/refresh-blue.ffa4d059.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useState } from 'react';\r\nimport Notification from 'components/common/notification-component';\r\nimport { connect } from 'react-redux';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport classnames from 'classnames';\r\nimport { ReactComponent as ErrorIcon } from 'icons/error.svg';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport PropTypes from 'prop-types';\r\nimport ApiError from 'models/utils/api-error-handler-model';\r\nimport { ReactComponent as RefreshIcon } from 'icons/refresh-blue.svg';\r\n\r\nexport const API_ERROR_NOTIFICATION = 'api-error-notification';\r\nexport const API_ERROR_NOTIFICATION_ID = 'api-error-notification-id';\r\n\r\nexport const ApiErrorNotification = ({ apiError }) => {\r\n const [messageIsCopied, setMessageIsCopied] = useState(false);\r\n\r\n const copyToClipBoard = async (copyText) => {\r\n await navigator.clipboard.writeText(copyText);\r\n setMessageIsCopied(true);\r\n };\r\n\r\n return (\r\n }\r\n title={{ id: 'api-error.notification.title' }}\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 window.location.reload()}\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 {apiError.getReadOnlyErrorMessageToDisplay()}\r\n

    \r\n \r\n copyToClipBoard(window.btoa(apiError.getDetailsToCopyToClipboard()))\r\n }\r\n disabled={messageIsCopied}\r\n >\r\n {messageIsCopied ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n
    \r\n {\r\n // open support website\r\n window.open(ROUTE_CONSTANTS.SERVICE_NOW);\r\n }}\r\n >\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nApiErrorNotification.propTypes = {\r\n /** contains details of api errors */\r\n apiError: PropTypes.instanceOf(ApiError).isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({ data: { apiError } }) => ({\r\n apiError,\r\n});\r\n\r\nexport default connect(mapStateToProps)(ApiErrorNotification);\r\n","import ApiModel from 'models/api-model';\r\nimport clonedeep from 'lodash.clonedeep';\r\n\r\nexport default class ElementWorkpaperList extends ApiModel({\r\n data: {\r\n workpapers: [],\r\n },\r\n}) {\r\n get workpapers() {\r\n if (this.data) {\r\n return this.data.workpapers;\r\n }\r\n return [];\r\n }\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n workpapers: response.data.result,\r\n },\r\n };\r\n }\r\n\r\n getWorkpaperCount() {\r\n if (this.hasWorkpapers()) {\r\n return this.data.workpapers.length;\r\n }\r\n return 0;\r\n }\r\n\r\n getWorkpapers() {\r\n if (this.data && this.data.workpapers) {\r\n return this.data.workpapers;\r\n }\r\n return [];\r\n }\r\n\r\n get(index) {\r\n if (\r\n this.data &&\r\n this.data.workpapers &&\r\n index >= 0 &&\r\n index < this.data.workpapers.length\r\n ) {\r\n return this.data.workpapers[index];\r\n }\r\n return null;\r\n }\r\n\r\n hasWorkpapers() {\r\n return this.data && this.data.workpapers && this.data.workpapers.length > 0;\r\n }\r\n\r\n setWorkpaperListFromWebSocketPayload({ webSocketPayload, elementId }) {\r\n const workpapersCopy = clonedeep(this.workpapers);\r\n const workpapersMap = workpapersCopy.reduce((elementMap, elementData) => {\r\n elementMap[elementData.workpaperRefId] = elementData;\r\n return elementMap;\r\n }, {});\r\n\r\n webSocketPayload.forEach((workpaper) => {\r\n if (\r\n workpaper.elementId === elementId &&\r\n !(workpaper.workpaperRefId in workpapersMap)\r\n ) {\r\n workpapersCopy.push(workpaper);\r\n }\r\n });\r\n workpapersCopy.sort((a, b) =>\r\n a.referenceNumber.localeCompare(b.referenceNumber),\r\n );\r\n return this.mergeData({\r\n workpapers: workpapersCopy,\r\n });\r\n }\r\n\r\n removeWorkpaperFromElementPanelWithSocketPayload(payload) {\r\n let workpapersCopy = clonedeep(this.workpapers);\r\n workpapersCopy = workpapersCopy.filter(\r\n (workpaper) => !payload.has(workpaper.workpaperRefId),\r\n );\r\n return this.mergeData({\r\n workpapers: workpapersCopy,\r\n });\r\n }\r\n\r\n removeWPFromElementPanel(payload) {\r\n let workpapersCopy = [...this.data.workpapers];\r\n\r\n workpapersCopy = workpapersCopy.filter(\r\n (workpaper) => workpaper.workpaperRefId !== payload.wpRefId,\r\n );\r\n\r\n return this.mergeData({\r\n workpapers: workpapersCopy,\r\n });\r\n }\r\n\r\n updateWPFromElementPanel(payload) {\r\n let workpapersCopy = [...this.data.workpapers];\r\n\r\n for (let i = 0; i < workpapersCopy.length; i++) {\r\n if (payload.wpRefId === workpapersCopy[i].workpaperRefId) {\r\n workpapersCopy[i].referenceNumber = payload.referenceNumber;\r\n workpapersCopy[i].referenceName = payload.referenceName;\r\n workpapersCopy[i].creationType = payload.creationType;\r\n break;\r\n }\r\n }\r\n\r\n return this.mergeData({\r\n workpapers: workpapersCopy,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport ComfortLetter from 'models/data/comfort-letter-model';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { cloneDeep } from 'lodash';\r\nexport default class ComfortLetterList extends ApiModel({\r\n data: {\r\n comfortLetters: [],\r\n elementsMap: {}, // To be used for comfort letter toolkit element list\r\n },\r\n}) {\r\n get comfortLetters() {\r\n if (this.hasComfortLetters()) {\r\n return this.data.comfortLetters;\r\n }\r\n return [];\r\n }\r\n\r\n get elementsMap() {\r\n if (this.hasElementsMap()) {\r\n return this.data.elementsMap;\r\n }\r\n return [];\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n comfortLetters: response.data.result.map((comfortLetter) =>\r\n new ComfortLetter().convertApiResponsetoComfortLetterModelFormat(\r\n comfortLetter,\r\n ),\r\n ),\r\n elementsMap: this.data.elementsMap,\r\n },\r\n };\r\n }\r\n\r\n hasComfortLetters() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.comfortLetters) &&\r\n this.data.comfortLetters.length > 0\r\n );\r\n }\r\n\r\n hasElementsMap() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.elementsMap) &&\r\n Object.keys(this.data.elementsMap).length > 0\r\n );\r\n }\r\n\r\n returnTopNComfortLetters(noOfComfortLetterToReturn) {\r\n return this.mergeData({\r\n comfortLetters: this.comfortLetters.slice(0, noOfComfortLetterToReturn),\r\n });\r\n }\r\n\r\n setElementsForComfortLetterId({ elementsMap, comfortLetterId }) {\r\n let newElementMap = cloneDeep(this.data.elementsMap);\r\n newElementMap[comfortLetterId] = elementsMap.map((element) => {\r\n return new ElementDetails().setLoaded({\r\n response: { data: { result: element } },\r\n });\r\n });\r\n return this.mergeData({\r\n comfortLetters: this.data.comfortLetters,\r\n elementsMap: newElementMap,\r\n });\r\n }\r\n\r\n getElementsByComfortLetterId(id) {\r\n if (this.data && Object.keys(this.data.elementsMap).length > 0) {\r\n return this.data.elementsMap[id];\r\n }\r\n return [];\r\n }\r\n\r\n getElementsCountByComfortLetterId(id) {\r\n if (this.hasComfortLetterAttachedElements(id)) {\r\n return this.data.elementsMap[id].length;\r\n }\r\n return 0;\r\n }\r\n\r\n hasComfortLetterAttachedElements(id) {\r\n return (\r\n this.data &&\r\n this.data.elementsMap &&\r\n this.data.elementsMap[id] &&\r\n this.data.elementsMap[id].length > 0\r\n );\r\n }\r\n\r\n removeElementFromComfortLetterElementsMapWithSocketPayload(payload) {\r\n let elementsToRemoveSet = new Set();\r\n for (let i = 0; i < payload.length; i++) {\r\n const element = payload[i];\r\n elementsToRemoveSet.add(element.id);\r\n }\r\n let clonedElementsMap = cloneDeep(this.data.elementsMap);\r\n const comfortLetterIdArray = Object.keys(clonedElementsMap);\r\n\r\n // this part updates the elements map\r\n for (let index = 0; index < comfortLetterIdArray.length; index++) {\r\n const comfortLetterId = comfortLetterIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[comfortLetterId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementsToRemoveSet.has(elementId)) {\r\n clonedElementsMap[comfortLetterId].splice(j, 1);\r\n }\r\n }\r\n }\r\n return this.mergeData({\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n\r\n unlinkElementFromElementsMapAndUpdateCount({\r\n elementId,\r\n comfortLetterId,\r\n shouldUpdateCount = true,\r\n }) {\r\n comfortLetterId = parseInt(comfortLetterId);\r\n elementId = parseInt(elementId);\r\n if (!Number.isInteger(comfortLetterId) || !Number.isInteger(elementId))\r\n return this;\r\n\r\n let clonedElementsMap = cloneDeep(this.data.elementsMap);\r\n let clonedComfortLetters = cloneDeep(this.comfortLetters);\r\n if (comfortLetterId in clonedElementsMap) {\r\n const elementIndex = clonedElementsMap[comfortLetterId].find(\r\n (element) => element.id === elementId,\r\n );\r\n clonedElementsMap[comfortLetterId].splice(\r\n clonedElementsMap[comfortLetterId].indexOf(elementIndex),\r\n 1,\r\n );\r\n }\r\n const comfortLetterIndex =\r\n shouldUpdateCount &&\r\n clonedComfortLetters.findIndex(\r\n (cmfrtLetter) => cmfrtLetter.comfortLetterId === comfortLetterId,\r\n );\r\n if (\r\n shouldUpdateCount &&\r\n comfortLetterIndex !== -1 &&\r\n Number.isInteger(clonedComfortLetters[comfortLetterIndex].elementCount) &&\r\n clonedComfortLetters[comfortLetterIndex].elementCount > 0\r\n ) {\r\n clonedComfortLetters[comfortLetterIndex].elementCount--;\r\n }\r\n\r\n return this.mergeData({\r\n elementsMap: clonedElementsMap,\r\n comfortLetters: clonedComfortLetters,\r\n });\r\n }\r\n\r\n linkElementFromElementsMapAndUpdateCount({\r\n elementDetails,\r\n comfortLetterId,\r\n shouldUpdateCount = true,\r\n }) {\r\n comfortLetterId = parseInt(comfortLetterId);\r\n if (!Number.isInteger(comfortLetterId)) return this;\r\n\r\n let clonedElementsMap = cloneDeep(this.data.elementsMap);\r\n let clonedComfortLetters = cloneDeep(this.comfortLetters);\r\n\r\n const elementIndex =\r\n clonedElementsMap &&\r\n clonedElementsMap[comfortLetterId] &&\r\n clonedElementsMap[comfortLetterId].findIndex(\r\n (element) => element.id === elementDetails.id,\r\n );\r\n\r\n const elementToInsert = new ElementDetails().setLoaded({\r\n response: { data: { result: elementDetails.data } },\r\n });\r\n if (!(Number.isInteger(elementIndex) && elementIndex !== -1)) {\r\n if (comfortLetterId in clonedElementsMap) {\r\n clonedElementsMap[comfortLetterId].push(elementToInsert);\r\n clonedElementsMap[comfortLetterId].sort((a, b) => a.id - b.id);\r\n } else {\r\n clonedElementsMap[comfortLetterId] = [elementToInsert];\r\n }\r\n }\r\n const comfortLetterIndex =\r\n shouldUpdateCount &&\r\n clonedComfortLetters.findIndex(\r\n (cmfrtLetter) => cmfrtLetter.comfortLetterId === comfortLetterId,\r\n );\r\n if (\r\n shouldUpdateCount &&\r\n comfortLetterIndex !== -1 &&\r\n Number.isInteger(clonedComfortLetters[comfortLetterIndex].elementCount)\r\n ) {\r\n clonedComfortLetters[comfortLetterIndex].elementCount++;\r\n }\r\n\r\n return this.mergeData({\r\n elementsMap: clonedElementsMap,\r\n comfortLetters: clonedComfortLetters,\r\n });\r\n }\r\n\r\n getFilteredComfortLetters(term) {\r\n return this.data.comfortLetters.filter(\r\n (comfortLetter) =>\r\n comfortLetter.customLabel.toLowerCase().indexOf(term.toLowerCase()) !==\r\n -1 ||\r\n comfortLetter.description.toLowerCase().indexOf(term.toLowerCase()) !==\r\n -1,\r\n );\r\n }\r\n\r\n // This function is a single point where we can 'attach an element to a comfort letter' OR 'detach an element'\r\n // or 'modify an element attached to comfort letter'.\r\n // This function might look a little bulky but it saves us from some additional socket notification(similar to\r\n // Tickkmar_linked, Tickmark_unlinked etc) and an api calls to BE. Conditions for attach, detach and modify will\r\n //be understood as you go through below code along with code comments.\r\n /**\r\n * @param {Array} payload The array of elements which have been impacted with the bulk or any similar action\r\n * @returns {ThisType}\r\n */\r\n updateComfortLetterElementsMapFromArray(payload) {\r\n // Save the current instance in a variable. Any modification henceforth to the instance will reflect here.\r\n let comfortLetterListDetails = this;\r\n\r\n // Structure : {elementId1: elementDetails, elementId2:elementDetails}\r\n // This will allow us to fetch elementDetails corresponding to an element without finding the index position of that element.\r\n let payloadElementsMapObject = {};\r\n\r\n //list of comfort letters in current instance\r\n let comfortLetterList = cloneDeep(comfortLetterListDetails.comfortLetters);\r\n\r\n //Structure : {comfortLetterId1:comfortLetterDetails, comfortletterId2: comfortLetterDetails}\r\n // This will allow us to fetch comfort letter details corresponding to an id without finding the index position of comfort letter in a array\r\n let comfortLetterToLabelMap = {};\r\n\r\n for (let index = 0; index < comfortLetterList.length; index++) {\r\n comfortLetterToLabelMap[comfortLetterList[index].comfortLetterId] =\r\n comfortLetterList[index].customLabel;\r\n }\r\n\r\n for (let i = 0; i < payload.length; i++) {\r\n payloadElementsMapObject = {\r\n ...payloadElementsMapObject,\r\n [payload[i].id]: payload[i],\r\n };\r\n }\r\n\r\n let clonedElementsMap = cloneDeep(\r\n comfortLetterListDetails.data.elementsMap,\r\n );\r\n\r\n const comfortLetterIdArray = Object.keys(clonedElementsMap);\r\n\r\n // iterate over a list of comfort letters that is present in elements map (current instance).\r\n // Hence it will modify only those comfort letters for which elements map is not empty OR\r\n // you can interpret it as - for which comfort letter element list is expanded in toolkit\r\n for (let index = 0; index < comfortLetterIdArray.length; index++) {\r\n const comfortLetterId = comfortLetterIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[comfortLetterId]);\r\n\r\n // iterate over each element present in payload and check if that element requires -\r\n // modification(new annotation like tickmark, workpaper added) OR detachment (comfort letter is detached)\r\n // OR attachment (new comfort letter attached)\r\n for (let j = 0; j < Object.keys(payloadElementsMapObject).length; j++) {\r\n // elementId of jth element in payload\r\n const elementId = Object.keys(payloadElementsMapObject)[j];\r\n\r\n // load the element details of jth element in payload and wrap it with our model\r\n // we will use it incase we want to modify the element details or link the new element with our comfort letter.\r\n const element = new ElementDetails().setLoaded({\r\n response: {\r\n data: { result: { ...payloadElementsMapObject[elementId] } },\r\n },\r\n });\r\n\r\n // for a particular comfort letter id we have list of elements attached to it.\r\n // Here, we need to find the index of element in the list which matched with elementId in payload.\r\n const indexOfElementToUpdate =\r\n Array.isArray(elementsArray) &&\r\n elementsArray.findIndex(\r\n (element) => element.id === parseInt(elementId),\r\n );\r\n\r\n // if the element in payload is found in the array of elements currently attached to comfort letter,\r\n // then it might have come (in payload) for either modification or detachment.\r\n // More story about attach or detach decison below.\r\n if (\r\n Number.isInteger(indexOfElementToUpdate) &&\r\n indexOfElementToUpdate !== -1\r\n ) {\r\n // if the element in payload includes the comfort letter then it must have come for modification or else\r\n // for detachment\r\n if (\r\n element &&\r\n Array.isArray(element.comfortLetterLabelList) &&\r\n element.comfortLetterLabelList.includes(\r\n comfortLetterToLabelMap[comfortLetterId],\r\n )\r\n ) {\r\n const elementToUpdate =\r\n clonedElementsMap[comfortLetterId][indexOfElementToUpdate];\r\n clonedElementsMap[comfortLetterId][indexOfElementToUpdate] =\r\n new ElementDetails().setLoaded({\r\n response: {\r\n data: {\r\n result: {\r\n ...elementToUpdate.data,\r\n ...element.data,\r\n },\r\n },\r\n },\r\n });\r\n } else {\r\n comfortLetterListDetails =\r\n comfortLetterListDetails.unlinkElementFromElementsMapAndUpdateCount(\r\n {\r\n elementId: element.id,\r\n comfortLetterId,\r\n shouldUpdateCount: false, // updation of count will be done using api call, since here we are only concerned about updating element list\r\n },\r\n );\r\n clonedElementsMap = comfortLetterListDetails.elementsMap;\r\n }\r\n }\r\n // if the element in payload does not already exists in the list then it might require attachment.\r\n // But before attaching check if that element (in payload) also contains the concerned comfort letter.\r\n else if (\r\n element &&\r\n Array.isArray(element.comfortLetterLabelList) &&\r\n element.comfortLetterLabelList.includes(\r\n comfortLetterToLabelMap[comfortLetterId],\r\n )\r\n ) {\r\n comfortLetterListDetails =\r\n comfortLetterListDetails.linkElementFromElementsMapAndUpdateCount({\r\n elementDetails: element,\r\n comfortLetterId,\r\n shouldUpdateCount: false, // updation of count will be done using api call, since here we are only concerned about updating element list\r\n });\r\n clonedElementsMap = comfortLetterListDetails.elementsMap;\r\n }\r\n }\r\n }\r\n return comfortLetterListDetails.mergeData({\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport mexp from 'math-expression-evaluator';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n formatNumberWithCommas,\r\n removeCommasFromNumber,\r\n removeDuplicateLeadingZerosFromNumber,\r\n addLeadingZeroToEmptyDecimal,\r\n} from 'utils/number-formatter-util';\r\nimport FormulaRowOperator from 'models/data/formula/formula-row-operator-model';\r\nimport FormulaRowNumber from 'models/data/formula/formula-row-number-model';\r\nimport FormulaRowElement from 'models/data/formula/formula-row-element-model';\r\nimport {\r\n FORMULA_CREATION_TYPES,\r\n FORMULA_ROW_OPERATOR_OPTIONS_MAP,\r\n FORMULA_OPERATOR_OPTIONS_MAP,\r\n FORMULA_ROW_TYPES,\r\n MATH_EXPRESSION_EVAL_INFINITY_RESULT,\r\n FORMULA_ELEMENT_CARRY_FORWARD_STATUS_TYPES,\r\n} from 'constants/feature/formula-constants';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { round } from 'utils/formula-utils';\r\nexport default class FormulaForm extends ApiModel({\r\n data: {\r\n elementId: null,\r\n revisionId: null,\r\n formulaId: null,\r\n result: 0,\r\n display: null,\r\n operator: null,\r\n rows: [],\r\n selectedRow: null,\r\n computedResult: 0,\r\n roundingResult: null,\r\n roundingScale: null,\r\n },\r\n calculationError: false,\r\n hasBeenModified: false,\r\n isNewFormula: false,\r\n}) {\r\n get formulaId() {\r\n if (this.data) {\r\n return this.data.formulaId;\r\n }\r\n return null;\r\n }\r\n get elementId() {\r\n if (this.data) {\r\n return this.data.elementId;\r\n }\r\n return null;\r\n }\r\n get revisionId() {\r\n if (this.data) {\r\n return this.data.revisionId;\r\n }\r\n return null;\r\n }\r\n get display() {\r\n if (this.data) {\r\n return this.data.display;\r\n }\r\n return null;\r\n }\r\n get operator() {\r\n if (this.data) {\r\n return this.data.operator;\r\n }\r\n return null;\r\n }\r\n\r\n get result() {\r\n if (this.data) {\r\n return this.data.result;\r\n }\r\n return null;\r\n }\r\n get computedResult() {\r\n if (this.data) {\r\n return this.data.computedResult;\r\n }\r\n return null;\r\n }\r\n get roundingResult() {\r\n if (this.data) {\r\n return this.data.roundingResult;\r\n }\r\n return null;\r\n }\r\n get roundingScale() {\r\n if (this.data) {\r\n return this.data.roundingScale;\r\n }\r\n return null;\r\n }\r\n get rows() {\r\n if (this.data) {\r\n return this.data.rows;\r\n }\r\n return [];\r\n }\r\n get selectedRow() {\r\n if (this.data) {\r\n return this.data.selectedRow;\r\n }\r\n return null;\r\n }\r\n\r\n getRow(index) {\r\n if (this.hasRows() && index >= 0 && this.data.rows.length > index) {\r\n return this.data.rows[index];\r\n }\r\n return null;\r\n }\r\n\r\n initFormulaCreate(elementDetails) {\r\n return this.merge({\r\n isLoaded: true,\r\n isLoading: false,\r\n error: null,\r\n data: {\r\n ...this.data,\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n display: formatNumberWithCommas(elementDetails.amount),\r\n operator: FORMULA_OPERATOR_OPTIONS_MAP.get('='),\r\n result: 0,\r\n computedResult: 0,\r\n roundingResult: null,\r\n roundingScale: null,\r\n },\r\n });\r\n }\r\n\r\n _initCalculationError(formulaRows) {\r\n return !formulaRows\r\n .filter(\r\n (row) =>\r\n !(\r\n row.type === FORMULA_ROW_TYPES.OPERATOR &&\r\n (row.value === '(' || row.value === ')')\r\n ),\r\n )\r\n .every((row, index) => {\r\n if (index % 2 === 0) {\r\n return (\r\n row.type === FORMULA_ROW_TYPES.NUMBER ||\r\n row.type === FORMULA_ROW_TYPES.ELEMENT\r\n );\r\n } else {\r\n return row.type === FORMULA_ROW_TYPES.OPERATOR;\r\n }\r\n });\r\n }\r\n\r\n _updateFormulaRowsAndCalculateResult({ newRows }) {\r\n let calculationError = this._initCalculationError(newRows);\r\n try {\r\n //We try parsing the new expression.\r\n const result = this._calculateResult(newRows);\r\n const roundedNumber = !isNullOrUndefined(this.roundingScale)\r\n ? round(result, this.roundingScale)\r\n : null;\r\n const isRoundingEqualToResult =\r\n !isNullOrUndefined(roundedNumber) && result === roundedNumber;\r\n return this.merge({\r\n hasBeenModified: true,\r\n calculationError,\r\n data: {\r\n ...this.data,\r\n result,\r\n roundingResult: isRoundingEqualToResult\r\n ? null\r\n : !isNullOrUndefined(roundedNumber)\r\n ? roundedNumber\r\n : null,\r\n computedResult: result,\r\n roundingScale: isRoundingEqualToResult\r\n ? null\r\n : !isNullOrUndefined(this.roundingScale)\r\n ? this.roundingScale\r\n : null,\r\n rows: newRows,\r\n },\r\n });\r\n } catch (error) {\r\n //If the result cannot be parsed, that means it isn't an actually valid expression.\r\n calculationError = true;\r\n }\r\n return this.merge({\r\n data: { ...this.data, rows: newRows },\r\n hasBeenModified: true,\r\n calculationError,\r\n });\r\n }\r\n\r\n processResponse({ response }) {\r\n const { result } = response.data;\r\n return {\r\n data: {\r\n ...result,\r\n result: result.computedResult,\r\n computedResult: result.computedResult,\r\n roundingResult: !isNullOrUndefined(result.roundingResult)\r\n ? result.roundingResult\r\n : result.computedResult,\r\n roundingScale: result.roundingScale,\r\n display: formatNumberWithCommas(result.result),\r\n formulaId: result.id,\r\n operator: new MenuOption({\r\n title: result.operator,\r\n value: result.operator,\r\n isIntl: false,\r\n }),\r\n rows: result.formulaElementDtoList.map((formulaElementDto) => {\r\n switch (formulaElementDto.type) {\r\n case FORMULA_ROW_TYPES.ELEMENT: {\r\n if (\r\n // eslint-disable-next-line eqeqeq\r\n formulaElementDto.carryForwardStatus ==\r\n FORMULA_ELEMENT_CARRY_FORWARD_STATUS_TYPES.MISSING\r\n ) {\r\n return new FormulaRowNumber({\r\n value: formulaElementDto.includedElementAmount,\r\n });\r\n } else {\r\n return new FormulaRowElement({\r\n elementData: {\r\n id: formulaElementDto.includedElementId,\r\n amount: formulaElementDto.includedElementAmount,\r\n elementActive: formulaElementDto.elementActive,\r\n },\r\n });\r\n }\r\n }\r\n case FORMULA_ROW_TYPES.NUMBER: {\r\n return new FormulaRowNumber({\r\n value: formulaElementDto.value,\r\n });\r\n }\r\n case FORMULA_ROW_TYPES.OPERATOR: {\r\n return new FormulaRowOperator({\r\n value: formulaElementDto.value,\r\n });\r\n }\r\n default: {\r\n console.error('INVALID FORMULA ROW TYPE');\r\n return null;\r\n }\r\n }\r\n }),\r\n },\r\n };\r\n }\r\n\r\n /**\r\n * The utility function that we use to calculate the total of a formula based on its rows.\r\n * @param {[FormulaRowModel]} formulaRows: The array of formula rows used to calculate the total.\r\n * @return {number} result: The evaluation of all the rows as a mathematical expression\r\n * @throws {Error} error: In the event that the total cannot be computed (due to improperly formatted numbers in the rows)\r\n * an error is thrown, which must be caught at a higher level.\r\n */\r\n _calculateResult(formulaRows) {\r\n let result = this.data.result;\r\n let resultString = '';\r\n formulaRows.forEach((row) => {\r\n resultString += row.value;\r\n });\r\n if (resultString) {\r\n //If not empty and there are values, try to parse it.\r\n result = mexp.eval(resultString);\r\n } else {\r\n result = 0;\r\n }\r\n return result\r\n .toString()\r\n .includes(`-${MATH_EXPRESSION_EVAL_INFINITY_RESULT}`)\r\n ? MATH_EXPRESSION_EVAL_INFINITY_RESULT\r\n : result;\r\n }\r\n\r\n addManualRow() {\r\n let newRows = [];\r\n if (this._shouldAddOperatorBeforeRow()) {\r\n newRows.push(new FormulaRowOperator());\r\n }\r\n newRows.push(new FormulaRowNumber());\r\n return this.merge({\r\n ...this._updateFormulaRowsAndCalculateResult({\r\n newRows: [...this.data.rows, ...newRows],\r\n }),\r\n isLoading: false,\r\n isLoaded: true,\r\n });\r\n }\r\n\r\n _shouldAddOperatorBeforeRow() {\r\n const _previousRowIsValue = this.hasRows() && !this.isLastRowOperator();\r\n const _previousOperatorIsClosedParenthesis =\r\n this.hasRows() && this.isLastRowClosedParenthesis();\r\n return _previousRowIsValue || _previousOperatorIsClosedParenthesis;\r\n }\r\n\r\n addOperator() {\r\n return this.merge({\r\n ...this._updateFormulaRowsAndCalculateResult({\r\n newRows: [...this.data.rows, new FormulaRowOperator()],\r\n }),\r\n isLoading: false,\r\n isLoaded: true,\r\n });\r\n }\r\n\r\n isLastRowOperator() {\r\n return this.hasRows() && this.getLastRow().isOperator();\r\n }\r\n\r\n isLastRowClosedParenthesis() {\r\n return (\r\n this.isLastRowOperator() &&\r\n this.getLastRow().operator === FORMULA_ROW_OPERATOR_OPTIONS_MAP.get(')')\r\n );\r\n }\r\n\r\n removeRow({ formulaRowIndex }) {\r\n let formulaRows = [...this.data.rows];\r\n let formulaRow = this.getRow(formulaRowIndex);\r\n let prevFormulaRow = this.getRow(formulaRowIndex - 1);\r\n const _shouldRemovePrevOperatorAsWell =\r\n !isNullOrUndefined(prevFormulaRow) &&\r\n prevFormulaRow.isOperator() &&\r\n !prevFormulaRow.isOperatorParenthesis();\r\n\r\n if (!isNullOrUndefined(formulaRow)) {\r\n if (_shouldRemovePrevOperatorAsWell) {\r\n // remove operator row (prev) and value row\r\n formulaRows.splice(formulaRowIndex - 1, 2);\r\n } else {\r\n // just remove value row\r\n formulaRows.splice(formulaRowIndex, 1);\r\n }\r\n }\r\n return this._updateFormulaRowsAndCalculateResult({\r\n newRows: formulaRows,\r\n });\r\n }\r\n\r\n removeRowOperator(index) {\r\n let formulaRows = [...this.data.rows];\r\n\r\n if (this.getRow(index).isOperator()) {\r\n formulaRows.splice(index, 1);\r\n return this._updateFormulaRowsAndCalculateResult({\r\n newRows: formulaRows,\r\n });\r\n }\r\n // should never happen, function should only be called for operator rows\r\n return this;\r\n }\r\n\r\n hasRows() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.rows) &&\r\n this.data.rows.length > 0\r\n );\r\n }\r\n\r\n setOperator(operator) {\r\n return this.merge({\r\n data: { ...this.data, operator },\r\n hasBeenModified: true,\r\n });\r\n }\r\n\r\n setManualNumber({ index, number }) {\r\n let formulaRows = this._updateRowAtIndexAndGetRows({ index, number });\r\n return this._updateFormulaRowsAndCalculateResult({ newRows: formulaRows });\r\n }\r\n\r\n _updateRowAtIndexAndGetRows({ index, number }) {\r\n let formulaRows = [...this.data.rows];\r\n let formulaRow = this.getRow(index);\r\n if (!isNullOrUndefined(formulaRow) && formulaRow.isManual()) {\r\n //We have to ensure that zeros are properly accounted for in our number.\r\n const formattedValue = addLeadingZeroToEmptyDecimal(\r\n removeDuplicateLeadingZerosFromNumber(removeCommasFromNumber(number)),\r\n );\r\n formulaRow = formulaRow.setValue(formattedValue);\r\n formulaRows[index] = formulaRow;\r\n }\r\n return formulaRows;\r\n }\r\n\r\n disableAddOperator() {\r\n const lastRow = this.getLastRow();\r\n if (this.hasRows() && lastRow.isOperator()) {\r\n const _lastOperatorIsOpenParenthesis =\r\n !isNullOrUndefined(lastRow.operator) &&\r\n lastRow.operator.value ===\r\n FORMULA_ROW_OPERATOR_OPTIONS_MAP.get('(').value;\r\n return _lastOperatorIsOpenParenthesis;\r\n } else if (this.hasRows()) {\r\n return !this.areManualInputsRealNumbers();\r\n }\r\n return false;\r\n }\r\n\r\n disableAddRow() {\r\n if (this.hasRows()) {\r\n return !this.areManualInputsRealNumbers();\r\n }\r\n return false;\r\n }\r\n\r\n getLastRow() {\r\n if (this.hasRows()) {\r\n return this.data.rows[this.data.rows.length - 1];\r\n }\r\n return null;\r\n }\r\n\r\n setRowOperator({ operator, index }) {\r\n let formulaRows = this._getRowsWithUpdatedOperator({ index, operator });\r\n return this._updateFormulaRowsAndCalculateResult({ newRows: formulaRows });\r\n }\r\n\r\n _getRowsWithUpdatedOperator({ operator, index }) {\r\n let formulaRows = [...this.data.rows];\r\n let formulaRow = this.getRow(index);\r\n if (!isNullOrUndefined(formulaRow)) {\r\n formulaRow = formulaRow.setOperator(operator);\r\n formulaRows[index] = formulaRow;\r\n }\r\n return formulaRows;\r\n }\r\n\r\n removeAllRows() {\r\n return this._updateFormulaRowsAndCalculateResult({\r\n newRows: [],\r\n });\r\n }\r\n\r\n areParenthesesBalanced() {\r\n let parenthesisBalanceStack = [];\r\n\r\n this.rows.forEach((row) => {\r\n if (row.isOperator()) {\r\n parenthesisBalanceStack.push(row.operator.value);\r\n }\r\n });\r\n\r\n /** This increases the index which is innitially set to 0\r\n * for anywhere within the parenthesisBalanceStack array where there is a '('\r\n * and decreaments whenever there is a ')'\r\n * Should result to zero ultimately if the array of operators is balanced\r\n * Since we are getting a number back we want to set a balanced formula of return\r\n * 0 to true hence '!' in the begining\r\n */\r\n return !parenthesisBalanceStack.reduce((index, currentChar) => {\r\n if (currentChar === '(') {\r\n return ++index;\r\n } else if (currentChar === ')') {\r\n return --index;\r\n }\r\n return index;\r\n }, 0);\r\n }\r\n\r\n // this method returns the index of the decimal place\r\n // if the value is an integer or not a number, we return 0\r\n _findDecimalIndex(value) {\r\n if (\r\n Number.isInteger(value) &&\r\n !isNaN(parseFloat(value)) &&\r\n isFinite(value)\r\n ) {\r\n return 0;\r\n }\r\n return value.toString().length - (value.toString().indexOf('.') + 1);\r\n }\r\n\r\n areManualInputsRealNumbers() {\r\n /** Checking if manually created formula row already have an error */\r\n return !this.rows.some((row) => row.hasRowError());\r\n }\r\n\r\n shouldValueBeComparedToRoundedValue(elementDetails) {\r\n return (\r\n elementDetails &&\r\n elementDetails.data &&\r\n // id 1 is \"Curreny\" and id 2 is \"Percentage\"\r\n (elementDetails.data.unitsId === 1 ||\r\n elementDetails.data.unitsId === 2) &&\r\n this.data &&\r\n this.data.rows.some((data) => data.value === '/')\r\n );\r\n }\r\n\r\n isFormulaFlagged(elementDetails = {}) {\r\n const formattedResultValue = parseFloat(\r\n removeCommasFromNumber(\r\n !isNullOrUndefined(this.data.roundingResult)\r\n ? this.data.roundingResult\r\n : this.data.result,\r\n ),\r\n );\r\n const formattedDisplayValue = parseFloat(\r\n removeCommasFromNumber(this.data.display),\r\n );\r\n const shouldValueBeComparedToRoundedValue =\r\n this.shouldValueBeComparedToRoundedValue(elementDetails);\r\n\r\n const precision = Math.pow(\r\n 10,\r\n this._findDecimalIndex(formattedDisplayValue),\r\n );\r\n\r\n const calculateRoundedResultValue = (formattedResultValue, precision) => {\r\n if (formattedResultValue < 0) {\r\n return (\r\n -1 *\r\n (Math.round(Math.abs(formattedResultValue) * precision) / precision)\r\n );\r\n }\r\n return Math.round(formattedResultValue * precision) / precision;\r\n };\r\n\r\n const roundedResultValue = calculateRoundedResultValue(\r\n formattedResultValue,\r\n precision,\r\n );\r\n\r\n switch (this.data.operator && this.data.operator.value) {\r\n case '=':\r\n if (shouldValueBeComparedToRoundedValue) {\r\n return roundedResultValue !== formattedDisplayValue;\r\n }\r\n return formattedResultValue !== formattedDisplayValue;\r\n case '>':\r\n if (shouldValueBeComparedToRoundedValue) {\r\n return !(formattedDisplayValue > roundedResultValue);\r\n }\r\n return !(formattedDisplayValue > formattedResultValue);\r\n case '<':\r\n if (shouldValueBeComparedToRoundedValue) {\r\n return !(formattedDisplayValue < roundedResultValue);\r\n }\r\n return !(formattedDisplayValue < formattedResultValue);\r\n case '>=':\r\n if (shouldValueBeComparedToRoundedValue) {\r\n return !(formattedDisplayValue >= roundedResultValue);\r\n }\r\n return !(formattedDisplayValue >= formattedResultValue);\r\n case '<=':\r\n if (shouldValueBeComparedToRoundedValue) {\r\n return !(formattedDisplayValue <= roundedResultValue);\r\n }\r\n return !(formattedDisplayValue <= formattedResultValue);\r\n default:\r\n return false;\r\n }\r\n }\r\n\r\n setElementRowsLoaded({ selectedElements }) {\r\n let formulaRows = [...this.data.rows];\r\n const lastRow = this.getLastRow();\r\n const _lastRowIsEmptyManual =\r\n !isNullOrUndefined(lastRow) && lastRow.isManual() && !lastRow.hasValue();\r\n selectedElements.forEach((elementData, index) => {\r\n const _isFirstElementOfNewSelection = index === 0;\r\n const _shouldAddOperator =\r\n !_isFirstElementOfNewSelection ||\r\n (_isFirstElementOfNewSelection && this._shouldAddOperatorBeforeRow());\r\n if (this.selectedRow !== null) {\r\n const rowNumber = this.selectedRow;\r\n //check if the selected row input is empty\r\n const __selectedRowIsEmptyManual =\r\n !isNullOrUndefined(formulaRows[rowNumber]) &&\r\n formulaRows[rowNumber].isManual() &&\r\n !formulaRows[rowNumber].hasValue();\r\n if (__selectedRowIsEmptyManual) {\r\n formulaRows[rowNumber] = new FormulaRowElement({\r\n elementData,\r\n });\r\n } else {\r\n // if input of manual row is not empty, it is going to create a new row as last row of the formula\r\n if (_shouldAddOperator) {\r\n formulaRows.push(new FormulaRowOperator());\r\n }\r\n formulaRows.push(new FormulaRowElement({ elementData }));\r\n }\r\n } else {\r\n if (_isFirstElementOfNewSelection && _lastRowIsEmptyManual) {\r\n // situation where we are on first selection and need to convert the existing last row instead\r\n // of add a new one\r\n\r\n formulaRows[formulaRows.length - 1] = new FormulaRowElement({\r\n elementData,\r\n });\r\n } else {\r\n if (_shouldAddOperator) {\r\n formulaRows.push(new FormulaRowOperator());\r\n }\r\n formulaRows.push(new FormulaRowElement({ elementData }));\r\n }\r\n }\r\n });\r\n return this.merge({\r\n ...this._updateFormulaRowsAndCalculateResult({\r\n newRows: formulaRows,\r\n }),\r\n isLoading: false,\r\n isLoaded: true,\r\n });\r\n }\r\n\r\n isResultValueValid() {\r\n let result = this.data.result;\r\n if (\r\n isNaN(result) ||\r\n (typeof result === 'number' && /e[+-]/.test(result.toString()))\r\n ) {\r\n result = MATH_EXPRESSION_EVAL_INFINITY_RESULT;\r\n }\r\n const isResultNegative = result.toString()[0] === '-';\r\n if (isResultNegative) {\r\n const resultWithoutMinus = this.data.result.toString().slice(1);\r\n result = mexp.eval(resultWithoutMinus);\r\n }\r\n return result !== MATH_EXPRESSION_EVAL_INFINITY_RESULT;\r\n }\r\n\r\n isFormulaValid() {\r\n return (\r\n !this.calculationError &&\r\n this.hasRows() &&\r\n this.areParenthesesBalanced() &&\r\n this.areManualInputsRealNumbers() &&\r\n this.isResultValueValid()\r\n );\r\n }\r\n\r\n toApiFormat() {\r\n return {\r\n id: !isNullOrUndefined(this.data.formulaId) ? this.data.formulaId : 0,\r\n revisionId: this.data.revisionId,\r\n elementId: this.data.elementId,\r\n operator: this.data.operator.value,\r\n creationType: FORMULA_CREATION_TYPES.MANUAL,\r\n roundingResult: this.data.roundingResult,\r\n roundingScale: this.data.roundingScale,\r\n result: this.data.result,\r\n formulaElementDtoList: this._rowsToApiFormat(),\r\n };\r\n }\r\n\r\n _rowsToApiFormat() {\r\n let apiRows = [];\r\n const { revisionId, elementId } = this.data;\r\n this.data.rows.forEach((row) => {\r\n if (row.isOperator()) {\r\n apiRows.push({\r\n revisionId,\r\n elementId,\r\n type: FORMULA_ROW_TYPES.OPERATOR,\r\n value: row.operator.value,\r\n });\r\n }\r\n if (row.isManual()) {\r\n apiRows.push({\r\n revisionId,\r\n elementId,\r\n type: FORMULA_ROW_TYPES.NUMBER,\r\n value: Number.parseFloat(row.value),\r\n });\r\n }\r\n if (row.isElement()) {\r\n apiRows.push({\r\n revisionId,\r\n elementId,\r\n type: FORMULA_ROW_TYPES.ELEMENT,\r\n includedElementId: row.elementId,\r\n includedElementAmount: row.value,\r\n });\r\n }\r\n });\r\n return apiRows;\r\n }\r\n\r\n isCreate() {\r\n const { formulaId } = this.data;\r\n /** formulaId is null when we creating a formula */\r\n return isNullOrUndefined(formulaId);\r\n }\r\n setSelectedRow(payload) {\r\n const selectedFormulaRow = payload;\r\n return this.mergeData({ selectedRow: selectedFormulaRow });\r\n }\r\n setComputedResult(result) {\r\n return this.merge({\r\n data: { ...this.data, computedResult: result },\r\n hasBeenModified: true,\r\n });\r\n }\r\n setRoundingResultAndScale(payload) {\r\n const { newValue, roundNumberInputValue } = payload;\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n roundingResult: newValue,\r\n roundingScale: roundNumberInputValue,\r\n },\r\n hasBeenModified: true,\r\n });\r\n }\r\n isFormulaRounded() {\r\n return (\r\n this.roundingResult !== null &&\r\n this.roundingResult !== this.computedResult\r\n );\r\n }\r\n setNewFormula(value) {\r\n return this.merge({\r\n isNewFormula: value,\r\n });\r\n }\r\n\r\n removeFormulaWithSocketPayload(payload) {\r\n let formulaRows = [...this.data.rows];\r\n let formulaDtoList = [...this.data.formulaElementDtoList];\r\n let elementsToRemove = new Set();\r\n for (let i = 0; i < payload.length; i++) {\r\n const element = payload[i];\r\n const elementId = element.id;\r\n elementsToRemove.add(elementId);\r\n }\r\n if (this.hasRows()) {\r\n for (let i = 0; i < formulaRows.length; i++) {\r\n const row = formulaRows[i];\r\n if (\r\n row.type === FORMULA_ROW_TYPES.ELEMENT &&\r\n row.elementData &&\r\n elementsToRemove.has(row.elementData.id)\r\n ) {\r\n formulaRows[i].elementData.elementActive = false;\r\n }\r\n }\r\n }\r\n for (let i = 0; i < formulaDtoList.length; i++) {\r\n const row = formulaDtoList[i];\r\n if (\r\n row &&\r\n row.type === FORMULA_ROW_TYPES.ELEMENT &&\r\n elementsToRemove.has(row.includedElementId)\r\n ) {\r\n formulaDtoList[i].elementActive = false;\r\n }\r\n }\r\n return this.mergeData({\r\n rows: formulaRows,\r\n formulaElementDtoList: formulaDtoList,\r\n });\r\n }\r\n\r\n setFormulaResult() {\r\n const formulaRows = [...this.data.rows];\r\n const result = this._updateFormulaRowsAndCalculateResult({\r\n newRows: formulaRows,\r\n });\r\n return this.mergeData({ ...result.data });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport {\r\n // getParsedReactSegmentJSON, // TODO: uncomment if we implement JSON parsing on backend for sections, REMOVE if we choose not to\r\n getParsedReactSegmentFromHTML,\r\n} from 'utils/section-rendering-utils';\r\n\r\nexport default class SectionContentModel extends ApiModel({\r\n data: {\r\n processedReactSegment: null,\r\n orderNum: null,\r\n revisionId: null,\r\n sectionId: null,\r\n segmentType: null,\r\n },\r\n prevSectionId: null, // TODO use linked list ids for ordering/inserting sections when adding to navigation\r\n nextSectionId: null, // TODO use linked list ids for ordering/inserting sections when adding to navigation\r\n leftSideView: false,\r\n}) {\r\n get sectionId() {\r\n if (this.data) {\r\n return this.data.sectionId;\r\n }\r\n return null;\r\n }\r\n get processedReactSegment() {\r\n if (this.data && this.data.processedReactSegment) {\r\n return this.data.processedReactSegment;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Reducer function for setting prev and next section ids\r\n * @param {int} param.prevSectionId\r\n * @param {int} param.nextSectionId\r\n * @param {boolean} param.leftSideView\r\n */\r\n setLinkedSectionIds({ prevSectionId, nextSectionId, leftSideView }) {\r\n return this.merge({\r\n nextSectionId,\r\n prevSectionId,\r\n leftSideView,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting prev section id\r\n * @param {int} prevSectionId\r\n */\r\n setPrevSectionId(prevSectionId) {\r\n return this.merge({\r\n prevSectionId,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting next section id\r\n * @param {int} nextSectionId\r\n */\r\n setNextSectionId(nextSectionId) {\r\n return this.merge({\r\n nextSectionId,\r\n });\r\n }\r\n\r\n processResponse(response) {\r\n const {\r\n orderNum,\r\n revisionId,\r\n sectionId,\r\n segmentType,\r\n html,\r\n searchTerm,\r\n } = response;\r\n let processedReactSegment;\r\n if (response.html) {\r\n processedReactSegment = getParsedReactSegmentFromHTML({\r\n sectionId,\r\n html,\r\n searchTerm,\r\n leftSideView: this.leftSideView,\r\n });\r\n }\r\n // TODO: uncomment if we implement JSON parsing on backend for sections, REMOVE if we choose not to\r\n // else if (response.segmentJson) {\r\n // processedReactSegment = getParsedReactSegmentJSON({\r\n // segmentJsonTree: props.segmentJson,\r\n // });\r\n // }\r\n else {\r\n throw Error(\r\n 'html or segmentJson property required for SectionContentModel',\r\n );\r\n }\r\n return {\r\n data: {\r\n processedReactSegment,\r\n orderNum,\r\n revisionId,\r\n sectionId,\r\n segmentType,\r\n },\r\n prevSectionId: this.prevSectionId,\r\n nextSectionId: this.nextSectionId,\r\n leftSideView: this.leftSideView,\r\n };\r\n }\r\n\r\n /**\r\n * Reducer function\r\n * removes processedReactStatement from memory and returns isLoaded to false to make section\r\n * appear like it has never been fetched before. Used when clearing the sectionsCache\r\n */\r\n clearContent() {\r\n return this.merge({\r\n isLoaded: false,\r\n data: {\r\n ...this.data,\r\n processedReactSegment: null,\r\n },\r\n });\r\n }\r\n}\r\n","import { withDefaultContextAsSelectedProject } from 'api/api-default-context';\r\nimport { isSignalRForSocketConnectionEnabled } from 'api/api-authentication';\r\n\r\n//funtion which is related to Signalr socket connection to initiate signalr socket connection\r\nexport const initialStatementSocketClientUrl = (revisionId) =>\r\n `/tieout/revision/${revisionId}/signalr`;\r\n\r\n//funtion which is related to Signalr socket connection to close signalr socket connection\r\nexport const closeSocketClientRequest = ({ revisionId, connectionId }) =>\r\n withDefaultContextAsSelectedProject().delete(\r\n `/tieout/api/close/revision/${revisionId}/connection/${connectionId}`,\r\n );\r\n\r\n//funtion which is related to Signalr socket connection to fetch all active users of the application\r\nexport const getActiverUsers = ({ revisionId, projectUserIds }) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/revision/${revisionId}/signalr/activerusers`,\r\n projectUserIds,\r\n );\r\n};\r\n\r\nexport const removeUserFromRoom = ({\r\n revisionId,\r\n projectUserIds,\r\n projectId,\r\n}) => {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n return removeUserFromSignalrRoom({ revisionId, projectUserIds });\r\n } else {\r\n return removeUserFromSocketIORoom({\r\n revisionId,\r\n projectUserIds,\r\n projectId: parseInt(projectId),\r\n });\r\n }\r\n};\r\n\r\n// removing user from socketio group within socketio socket connection\r\nconst removeUserFromSocketIORoom = ({\r\n revisionId,\r\n projectUserIds,\r\n projectId,\r\n}) => {\r\n return withDefaultContextAsSelectedProject()\r\n .delete(\r\n `/tieout/project/${parseInt(\r\n projectId,\r\n )}/revision/${revisionId}/socketio/group/user`,\r\n {\r\n data: projectUserIds,\r\n },\r\n )\r\n .then((response) => response);\r\n};\r\n\r\n// removing user from signalr group within signalr socket connection\r\nconst removeUserFromSignalrRoom = ({ revisionId, projectUserIds }) => {\r\n return withDefaultContextAsSelectedProject()\r\n .delete(`/tieout/revision/${revisionId}/signalr/group/user`, {\r\n data: projectUserIds,\r\n })\r\n .then((response) => response);\r\n};\r\n\r\nexport const addUserToGroup = ({ revisionId, projectUserIds, projectId }) => {\r\n if (isSignalRForSocketConnectionEnabled) {\r\n return addUserToSignalrGroup({ revisionId, projectUserIds });\r\n } else {\r\n return addUserToSocketIOGroup({\r\n revisionId,\r\n projectUserIds,\r\n projectId: parseInt(projectId),\r\n });\r\n }\r\n};\r\n\r\n// adding user to socketio group within socketio socket connection\r\nconst addUserToSocketIOGroup = ({ revisionId, projectUserIds, projectId }) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/project/${parseInt(\r\n projectId,\r\n )}/revision/${revisionId}/socketio/group/user`,\r\n projectUserIds,\r\n );\r\n};\r\n\r\n// remove user from signalr group within signalr socket connection\r\nconst addUserToSignalrGroup = ({ revisionId, projectUserIds }) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/revision/${revisionId}/signalr/group/user`,\r\n projectUserIds,\r\n );\r\n};\r\n","import FormulaRow from './formula-row-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n formatManualInputFormulaRowNumber,\r\n FLOATING_POINT_NUMBER_REGEX,\r\n} from 'utils/number-formatter-util';\r\nimport { FORMULA_ROW_TYPES } from 'constants/feature/formula-constants';\r\n\r\nexport default class FormulaRowNumber extends FormulaRow {\r\n value = '0';\r\n constructor(props) {\r\n super(props);\r\n this.type = FORMULA_ROW_TYPES.NUMBER;\r\n if (!isNullOrUndefined(props) && !isNullOrUndefined(props.value)) {\r\n this.value = props.value;\r\n }\r\n }\r\n get display() {\r\n return this.hasValue() ? formatManualInputFormulaRowNumber(this.value) : 0;\r\n }\r\n\r\n hasValue() {\r\n return (\r\n !isNullOrUndefined(this.value) && this.value !== '' && this.value !== '0'\r\n );\r\n }\r\n setValue(value) {\r\n let rowError = false;\r\n if (value && !FLOATING_POINT_NUMBER_REGEX.test(value)) {\r\n rowError = true;\r\n }\r\n return this.merge({ value, rowError });\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\nimport { userAuthentication } from 'api/current-user-api';\r\nimport { userLogOut } from 'api/api-authentication';\r\n\r\nexport const userAuthError = createAction('USER_AUTH_ERROR');\r\nexport const userAuth401Error = createAction('USER_AUTH_401_ERROR');\r\nexport const userAuthLoading = createAction('USER_AUTH_LOADING');\r\nexport const userAuthLoaded = createAction('USER_AUTH_LOADED');\r\n\r\nexport const authenticateUser = () => async (dispatch, getState) => {\r\n const { revision, selectedProject, projectUsersList } = getState().data || {};\r\n const revisionId = revision && revision.id;\r\n const projectId = selectedProject && selectedProject.id;\r\n const projectUsers = projectUsersList.users;\r\n let authResponse;\r\n try {\r\n dispatch(userAuthLoading());\r\n authResponse = await userAuthentication();\r\n if (\r\n authResponse &&\r\n authResponse.response &&\r\n authResponse.response.result &&\r\n authResponse.response.result.enabled\r\n )\r\n dispatch(userAuthLoaded(authResponse));\r\n else throw new Error('recieved null response from \"/tieout/auth\" api call');\r\n } catch (error) {\r\n const { response: { data } = {} } = error;\r\n if (\r\n authResponse &&\r\n authResponse.response &&\r\n authResponse.response.result &&\r\n !authResponse.response.result.enabled\r\n )\r\n dispatch(userAuth401Error({ status: 401 }));\r\n else if (data && data.status === 401) dispatch(userAuth401Error(data));\r\n else {\r\n console.log('user Authentication failed. Error details:');\r\n console.log(error);\r\n console.trace();\r\n dispatch(userAuthError(error));\r\n userLogOut(revisionId, projectUsers, projectId);\r\n }\r\n }\r\n};\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const getInternalReferenceById = ({ internalReferenceId }) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/internalreference/${internalReferenceId}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getInternalReferenceByRevisionAndElementId = ({\r\n revisionId,\r\n elementId,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/element/${elementId}/internalreference`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const createOrAddToInternalReferenceRequest = ({\r\n revisionId,\r\n sourceElementId,\r\n targetElementId,\r\n isFromSuggestion,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/source/${sourceElementId}/target/${targetElementId}/internalreference/isfromsuggestion/${isFromSuggestion}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const detachElementFromInternalReferenceRequest = ({\r\n revisionId,\r\n internalReferenceId,\r\n elementId,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .delete(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/element/${elementId}/reference/${internalReferenceId}`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getInternalReferenceSuggestionsByRevisionAndElementId = ({\r\n revisionId,\r\n elementId,\r\n}) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/elements/${elementId}/internalreference/suggestions`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const removeSuggestedReferenceRequest = ({\r\n revisionId,\r\n sourceElementId,\r\n suggestedElementId,\r\n}) =>\r\n withDefaultContextAsSelectedProject().post(\r\n `/tieout/statements/${getStatementIdUtil()}/revision/${revisionId}/reference/${sourceElementId}/suggestions/${suggestedElementId}`,\r\n );\r\n","import { createAction } from 'redux-actions';\r\nimport { getStatementCreationPageDataRequest } from 'api/statement-creation-page-data-api';\r\n\r\nexport const statementCreationPageDataLoading = createAction(\r\n 'STATEMENT_CREATION_PAGE_DATA_LOADING',\r\n);\r\nexport const statementCreationPageDataError = createAction(\r\n 'STATEMENT_CREATION_PAGE_DATA_ERROR',\r\n);\r\nexport const statementCreationPageDataLoaded = createAction(\r\n 'STATEMENT_CREATION_PAGE_DATA_LOADED',\r\n);\r\nexport const clearStatementCreationPageDataselected = createAction(\r\n 'CLEAR_STATEMENT_CREATION_PAGE_DATA_SELECTED',\r\n);\r\n\r\nexport const fetchStatementCreationPageData =\r\n () => async (dispatch, getState) => {\r\n try {\r\n dispatch(statementCreationPageDataLoading());\r\n const { data } = await getStatementCreationPageDataRequest();\r\n console.debug('statement create options data :', data);\r\n dispatch(statementCreationPageDataLoaded(data));\r\n } catch (error) {\r\n dispatch(statementCreationPageDataError(error));\r\n }\r\n };\r\n","import { createAction } from 'redux-actions';\r\nimport {\r\n getChecklistDataRequest,\r\n postAuditAnswerRequest,\r\n} from 'api/audit-checklist-api';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\n\r\nexport const auditChecklistLoading = createAction('AUDIT_CHECKLIST_LOADING');\r\nexport const auditChecklistLoaded = createAction('AUDIT_CHECKLIST_LOADED');\r\nexport const auditChecklistError = createAction('AUDIT_CHECKLIST_ERROR');\r\nexport const auditChecklistSaveAnswer = createAction(\r\n 'AUDIT_CHECKLIST_SAVE_ANSWER',\r\n);\r\n\r\nexport const fetchAuditChecklistforRevisionWithoutLoading = ({\r\n revisionId,\r\n statementId,\r\n}) => async (dispatch, getState) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.AUDIT_CHECKLIST)\r\n return;\r\n try {\r\n const projectId = getState().data.selectedProject.project.id;\r\n const response = await getChecklistDataRequest({\r\n revisionId,\r\n statementId,\r\n projectId,\r\n });\r\n dispatch(auditChecklistLoaded({ response }));\r\n } catch (error) {\r\n dispatch(auditChecklistError(error));\r\n }\r\n};\r\n\r\nexport const fetchAuditChecklistForRevision = ({\r\n revisionId,\r\n statementId,\r\n}) => async (dispatch, getState) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.AUDIT_CHECKLIST)\r\n return;\r\n dispatch(auditChecklistLoading());\r\n await dispatch(\r\n fetchAuditChecklistforRevisionWithoutLoading({ revisionId, statementId }),\r\n );\r\n};\r\n\r\nexport const updateAuditChecklistAnswer = ({\r\n answerID,\r\n questionId,\r\n revisionId,\r\n statementId,\r\n projectId,\r\n}) => async (dispatch, getState) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.AUDIT_CHECKLIST)\r\n return;\r\n const answer = {\r\n id: questionId,\r\n auditAnswer: answerID,\r\n };\r\n\r\n const response = await postAuditAnswerRequest(\r\n answer,\r\n revisionId,\r\n statementId,\r\n projectId,\r\n );\r\n\r\n dispatch(\r\n auditChecklistSaveAnswer({\r\n response,\r\n }),\r\n );\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\n\r\nexport default class ElementsBySectionMap extends ApiModel({\r\n data: {\r\n elements: {\r\n /*\r\n {\r\n [elementId]: ElementDetails,\r\n ...\r\n }\r\n */\r\n },\r\n sectionId: null,\r\n },\r\n}) {\r\n get elements() {\r\n if (this.data && this.data.elements) {\r\n return this.data.elements;\r\n }\r\n return {};\r\n }\r\n\r\n get sectionId() {\r\n if (this.data) {\r\n return this.data.sectionId;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse({ response, sectionId }) {\r\n let _instantiatedMap = {};\r\n response.data.forEach((elementData) => {\r\n _instantiatedMap[elementData.id] =\r\n new ElementDetails().setLoadedFromElementData({\r\n data: elementData,\r\n });\r\n });\r\n return {\r\n data: {\r\n elements: _instantiatedMap,\r\n sectionId,\r\n },\r\n };\r\n }\r\n\r\n /** Updates this sections element cache based on the new element data passed\r\n * NOTE: the `element` arg should already be of type ElementDetail\r\n */\r\n updateElement({ element }) {\r\n if (this.has(element.id)) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n elements: {\r\n ...this.data.elements,\r\n [element.id]: element,\r\n },\r\n },\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * This function is used to update specific elements in the current element by section map. It will update only the\r\n * elements passed in the `elementsToUpdate` array, while all other elements in the section remain the same.\r\n * @param {ElementDetails[]} elementsToUpdate\r\n */\r\n updateMultipleElements({ elementsToUpdate }) {\r\n let updatedMapOfElements = { ...this.data.elements };\r\n elementsToUpdate.forEach((elementToUpdate) => {\r\n updatedMapOfElements[elementToUpdate.id] = elementToUpdate;\r\n });\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n elements: updatedMapOfElements,\r\n },\r\n });\r\n }\r\n\r\n setElementLoaded({ response, elementId }) {\r\n const updatedElement = this.has(elementId)\r\n ? this.get(elementId).setLoaded({ response })\r\n : new ElementDetails().setLoaded({ response });\r\n\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n elements: {\r\n ...this.data.elements,\r\n [elementId]: updatedElement,\r\n },\r\n },\r\n });\r\n }\r\n\r\n get(id) {\r\n return this.elements[id];\r\n }\r\n\r\n has(id) {\r\n return !isNullOrUndefined(this.elements[id]);\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\nimport ElementsBySectionMap from 'models/api/elements-by-section-map';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\n\r\nexport default class ElementCache extends BaseModel({\r\n /* \r\n { \r\n [sectionId]: ElementsBySectionMap,\r\n ...\r\n }\r\n*/\r\n}) {\r\n /**\r\n * Reducer function for setting error on specific sections when their request fail\r\n * @param {int} param.sectionId\r\n * @param {object} param.error\r\n */\r\n setSectionError({ sectionId, error }) {\r\n let errorSection;\r\n if (this.hasSection(sectionId)) {\r\n errorSection = this.getSection(sectionId).setError(error);\r\n } else {\r\n errorSection = new ElementsBySectionMap().setError(error);\r\n }\r\n return this.merge({\r\n [sectionId]: errorSection,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting loading on specific sections\r\n * @param {int} param.sectionId\r\n */\r\n setSectionLoading({ sectionId }) {\r\n let loadingSection;\r\n if (this.hasSection(sectionId)) {\r\n loadingSection = this.getSection(sectionId).setLoading();\r\n } else {\r\n loadingSection = new ElementsBySectionMap().setLoading();\r\n }\r\n return this.merge({\r\n [sectionId]: loadingSection,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting the element data by section id\r\n * @param {int} param.sectionId\r\n * @param {object} param.response\r\n */\r\n setSectionLoaded({ response, sectionId }) {\r\n let loadedSection;\r\n if (this.hasSection(sectionId)) {\r\n loadedSection = this.getSection(sectionId).setLoaded({\r\n response,\r\n sectionId,\r\n });\r\n } else {\r\n loadedSection = new ElementsBySectionMap().setLoaded({\r\n response,\r\n sectionId,\r\n });\r\n }\r\n\r\n return this.merge({\r\n [sectionId]: loadedSection,\r\n });\r\n }\r\n\r\n /** Reducer function called whenever a user has fetched new element details to be displayed\r\n * in the Element Panel, directly called in a reducer on the cache based on the elementDetailsLoaded Action\r\n */\r\n setElementFromElementDetailsLoaded({ response, sectionId, elementId }) {\r\n if (this.hasSection(sectionId)) {\r\n return this.merge({\r\n [sectionId]: this.getSection(sectionId).setElementLoaded({\r\n response,\r\n elementId,\r\n }),\r\n });\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Reducer function for clearing section element data\r\n * @param {int[]} param.removedSectionIds\r\n */\r\n clearSections({ removedSectionIds }) {\r\n const newMap = { ...this };\r\n removedSectionIds.forEach((id) => {\r\n delete newMap[id];\r\n });\r\n\r\n // cannot use `this.merge` because we are REMOVING ids from the map\r\n // merge would not remove the ids we want to remove\r\n return new ElementCache(newMap);\r\n }\r\n\r\n hasSection(sectionId) {\r\n const sectionMap = this.getSection(sectionId);\r\n return !isNullOrUndefined(sectionMap);\r\n }\r\n\r\n hasElement({ sectionId, elementId }) {\r\n if (this.hasSection(sectionId)) {\r\n return this.getSection(sectionId).has(elementId);\r\n }\r\n return false;\r\n }\r\n\r\n getSection(sectionId) {\r\n return this[sectionId];\r\n }\r\n\r\n getCurrentSectionIds() {\r\n return Object.keys(this);\r\n }\r\n\r\n /**\r\n * Fetches elements from the cache if they exist\r\n *\r\n * NOTE: Always try to fetch elements by sectionId and elementId\r\n * HOWEVER, since sometimes we will not have the sectionId available when trying to get an element from the cache\r\n * (e.g. batch select) we can iterate through the existing section ids and see if the element exists.\r\n * This is still somewhat performant because we only keep elements in the cache whose sections are in the sections\r\n * cache\r\n */\r\n getElement({ sectionId, elementId }) {\r\n if (isNullOrUndefined(sectionId)) {\r\n const sectionIdsInCache = this.getCurrentSectionIds();\r\n let foundElement;\r\n sectionIdsInCache.some((cachedSectionId) => {\r\n let section = this.getSection(cachedSectionId);\r\n foundElement = section.has(elementId) ? section.get(elementId) : null;\r\n return !isNullOrUndefined(foundElement);\r\n });\r\n return foundElement; // should still return null if it is never found\r\n } else if (this.hasSection(sectionId)) {\r\n return this.getSection(sectionId).get(elementId);\r\n }\r\n return null;\r\n }\r\n\r\n // getting all the elements based on elementId's\r\n getElementsListByElementIds({ elementIds }) {\r\n const elements = elementIds\r\n .map((element) => {\r\n const elementData = this.getElementById({ elementId: element });\r\n if (elementData && elementData.length) {\r\n return elementData[0].data;\r\n }\r\n return null;\r\n })\r\n .filter(Boolean);\r\n return elements;\r\n }\r\n\r\n // method used to get element based on element id\r\n getElementById({ elementId }) {\r\n const sectionIdsInCache = this.getCurrentSectionIds();\r\n let element = [];\r\n for (let section of sectionIdsInCache) {\r\n const sectionElement = this.getSection(section).get(elementId);\r\n if (sectionElement) {\r\n element.push(sectionElement);\r\n }\r\n }\r\n return element;\r\n }\r\n\r\n // return all elements belongs loaded sections\r\n getAllSectionElements() {\r\n const sectionIdsInCache = this.getCurrentSectionIds();\r\n let allElements = [];\r\n for (let section of sectionIdsInCache) {\r\n allElements = allElements.concat(this.getSection(section).elements);\r\n }\r\n return allElements;\r\n }\r\n\r\n // return all elements belongs loaded sections with elements where marker and callout is enabled\r\n getElementIdsBySectionId({ sectionId }) {\r\n const elementIds = { callout: [], marker: [] };\r\n const elements =\r\n this.getSection(sectionId) && this.getSection(sectionId).elements;\r\n const allElementIds = elements && Object.keys(elements);\r\n\r\n if (!isNullOrUndefined(elements) && allElementIds.length) {\r\n const { callout, marker } = elementIds;\r\n allElementIds.forEach((val) => {\r\n if (elements[val].callout) {\r\n callout.push(elements[val].id);\r\n }\r\n if (elements[val].marker) {\r\n marker.push(elements[val].id);\r\n }\r\n });\r\n }\r\n return elementIds;\r\n }\r\n\r\n /** Updates an individual element for the given section\r\n * NOTE: element should already be converted to type ElementDetails\r\n *\r\n * @param {ElementDetails} param.element the updated content model for the given sectionId\r\n * @param {Number} param.sectionid the section id of the element to update\r\n */\r\n updateElement({ element, sectionId }) {\r\n if (this.hasSection(sectionId)) {\r\n return this.merge({\r\n [sectionId]: this.getSection(sectionId).updateElement({\r\n element,\r\n }),\r\n });\r\n }\r\n return this;\r\n }\r\n\r\n // updates in the elements marker and callout values\r\n updateElementCallout({ payload }) {\r\n const { elementIds, showCallout } = payload;\r\n const elementsToUpdate = this.getElementsListByElementIds({ elementIds });\r\n\r\n const elements =\r\n elementsToUpdate &&\r\n elementsToUpdate.map((item) => {\r\n return { ...item, marker: !showCallout, callout: showCallout };\r\n });\r\n if (elements.length) {\r\n return this.updateMultipleElements({ elements });\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * This function is used to update multiple elements in the cache. This is useful for causing scalable and responsive\r\n * content panel updates for things like annotations based on user interaction in places like side panels, etc..\r\n *\r\n * @param {ElementDetails[]} elements\r\n */\r\n updateMultipleElements({ elements }) {\r\n let elementBySectionMapUpdates = {};\r\n /**\r\n * We construct an in-memory map of sections to elements so we can efficiently update them in the map model.\r\n * This map maps sectionIds to arrays of ElementDetail models.\r\n */\r\n let sectionToElementMap = {};\r\n if (!isNullOrUndefined(elements) && elements.length > 0) {\r\n elements.forEach((element) => {\r\n if (this.hasSection(element.sectionId)) {\r\n // only initialize sections that are in the cache (thus currently in view)\r\n let elementToUpdate = new ElementDetails();\r\n //Initialize the array of elements if it doesn't exist.\r\n if (isNullOrUndefined(sectionToElementMap[element.sectionId])) {\r\n sectionToElementMap[element.sectionId] = [\r\n elementToUpdate.setLoadedFromElementData({\r\n data: element,\r\n }),\r\n ];\r\n } else {\r\n sectionToElementMap[element.sectionId].push(\r\n elementToUpdate.setLoadedFromElementData({\r\n data: element,\r\n }),\r\n );\r\n }\r\n }\r\n });\r\n /**\r\n * After we have built up the map of sections to arrays of elements, we can iterate through the different sections\r\n * and do a single merge to update them on the map model object.\r\n */\r\n Object.keys(sectionToElementMap).forEach((sectionId) => {\r\n const elementsToUpdate = sectionToElementMap[sectionId];\r\n elementBySectionMapUpdates[sectionId] = this.getSection(\r\n sectionId,\r\n ).updateMultipleElements({ elementsToUpdate });\r\n });\r\n // Finally update the model with the updated element by section maps.\r\n return this.merge({\r\n ...elementBySectionMapUpdates,\r\n });\r\n }\r\n return this;\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\n// N/A is always the default value provided at time of creation of entity\r\nexport const DEFAULT_ENTITY_STRING = 'N/A';\r\n\r\nexport class EntityList extends ApiModel({\r\n data: {\r\n entities: [],\r\n entitiesDropdownMap: {},\r\n },\r\n status: null,\r\n}) {\r\n get entities() {\r\n if (!isNullOrUndefined(this.data) && Array.isArray(this.data.entities)) {\r\n return this.data.entities;\r\n }\r\n return [];\r\n }\r\n get entitiesDropdownMap() {\r\n if (this.data && this.data.entitiesDropdownMap) {\r\n return this.data.entitiesDropdownMap;\r\n }\r\n return null;\r\n }\r\n processResponse({ response }) {\r\n let entityMenuOptions = {};\r\n /** The response looks something like\r\n *\r\n * entityDetails = [\r\n * {\r\n * cliendId: 1,\r\n * entity: N/A,\r\n * priority: 1,\r\n * lastModifiedDate: 152343423423\r\n * }\r\n * ]\r\n */\r\n\r\n if (\r\n !isNullOrUndefined(response.data) &&\r\n !isNullOrUndefined(response.data.result)\r\n ) {\r\n let index = 1;\r\n response.data.result.forEach((entity) => {\r\n if (!isNullOrUndefined(entity)) {\r\n entityMenuOptions[entity.entity] = new MenuOption({\r\n id: index,\r\n title: entity.entity,\r\n value: entity.entity,\r\n isIntl: false,\r\n });\r\n index++;\r\n }\r\n });\r\n }\r\n\r\n // If we dont get default value('N/A') from server, we need to add it manually at FE side\r\n if (entityMenuOptions && !entityMenuOptions[DEFAULT_ENTITY_STRING]) {\r\n entityMenuOptions[DEFAULT_ENTITY_STRING] = new MenuOption({\r\n id: Object.keys(entityMenuOptions).length + 1,\r\n title: DEFAULT_ENTITY_STRING,\r\n value: DEFAULT_ENTITY_STRING,\r\n isIntl: false,\r\n });\r\n response.data.result.push({\r\n clientId:\r\n response &&\r\n response.data &&\r\n response.data.result[0] &&\r\n response.data.result[0].clientId\r\n ? response.data.result[0].clientId\r\n : 0,\r\n entity: DEFAULT_ENTITY_STRING,\r\n lastModifiedDate: Date.now(),\r\n manual: false,\r\n });\r\n }\r\n return {\r\n data: {\r\n entities: response.data.result,\r\n entitiesDropdownMap: entityMenuOptions,\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n getEntityDropdownValues(searchTerm) {\r\n return Object.values(this.data.entitiesDropdownMap).filter(\r\n (entity) =>\r\n entity.value.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1,\r\n );\r\n }\r\n}\r\n","import {\r\n withDefaultContextAsHomeGeo,\r\n withDefaultContextAsSelectedProject,\r\n} from './api-default-context';\r\n\r\nexport const getStatementRequest = (\r\n statementId,\r\n { contextKey, contextValue } = {\r\n contextKey: undefined,\r\n contextValue: undefined,\r\n },\r\n) =>\r\n withDefaultContextAsSelectedProject({ contextKey, contextValue }).get(\r\n `/tieout/statements/${statementId}`,\r\n );\r\n\r\nexport const getStatementWorkflowStepsMetaData = () => {\r\n return withDefaultContextAsHomeGeo()\r\n .get('/tieout/documentupload/workflows/steps')\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport Statement from 'models/data/statement-model';\r\nexport class StatementList extends ApiModel({\r\n data: {\r\n statements: [], // type Statement\r\n },\r\n}) {\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n statements: response.data.result.elements.map(\r\n (statement) => new Statement(statement),\r\n ),\r\n },\r\n };\r\n }\r\n\r\n getStatements() {\r\n if (this.hasStatements()) {\r\n return this.data.statements;\r\n }\r\n return [];\r\n }\r\n\r\n hasStatements() {\r\n return this.data && this.data.statements && this.data.statements.length > 0;\r\n }\r\n\r\n getSelectedCarryForwardStatements(statementIds) {\r\n return this.data.statements.filter((statement) => {\r\n return statementIds.some((id) => parseInt(id) === statement.id);\r\n });\r\n }\r\n\r\n hasStatementsInApprovalInitiated(statements) {\r\n return statements.some((statement) =>\r\n new Statement(statement).hasApprovalInitiated(),\r\n );\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"m9.14815,0.11111c4.97056,0 9,4.02944 9,9c0,4.97056 -4.02944,9 -9,9c-4.97056,0 -9,-4.02944 -9,-9c0,-4.97056 4.02944,-9 9,-9zm4,8l-8,0c-0.55228,0 -1,0.44772 -1,1c0,0.55228 0.44772,1 1,1l0,0l8,0c0.55228,0 1,-0.44772 1,-1c0,-0.55228 -0.44772,-1 -1,-1l0,0z\",\n fill: \"#757575\"\n});\n\nvar SvgUnverified = function SvgUnverified(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 18,\n viewBox: \"0 0 18 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgUnverified, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/unverified.69bd253e.svg\";\nexport { ForwardRef as ReactComponent };","import { getAPI } from 'api/api-client';\r\nimport {\r\n withDefaultContextAsCurrentGeo,\r\n withDefaultContextAsHomeGeo,\r\n} from './api-default-context';\r\n\r\nexport const getCurrentUserRequest = () =>\r\n Promise.all(\r\n Object.keys(window.TIEOUT.ENV.GEOS).map((geoKey) =>\r\n getAPI(geoKey)\r\n .get('/tieout/currentuser', {\r\n params: {\r\n populateUserRoles: true,\r\n },\r\n })\r\n .then((response) => {\r\n if (response.data && response.data.result)\r\n response.data.result.geoCode = geoKey;\r\n return response;\r\n })\r\n .catch(() => ({ data: undefined })),\r\n ),\r\n ).then((responses) => {\r\n //following check will discard any response that is not having user data in it\r\n const responsesWithUserDetails = responses.filter(\r\n (res) => res && res.data && res.data.result && res.data.result.email,\r\n );\r\n return responsesWithUserDetails;\r\n });\r\n\r\nexport const postCurrentUserPreferencesRequest = (\r\n currentUserID,\r\n currentZoneId,\r\n) =>\r\n withDefaultContextAsHomeGeo()\r\n .post('/tieout/user/preferences', {\r\n id: currentUserID,\r\n zoneId: currentZoneId,\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getUserOPMProfile = () =>\r\n withDefaultContextAsCurrentGeo()\r\n .get('/tieout/getUserProfile')\r\n .then((response) => ({\r\n response: response.data,\r\n }))\r\n .catch((e) => {\r\n console.log('failed to get users OPM profile. Error details:');\r\n console.log(e);\r\n console.trace();\r\n return e;\r\n });\r\n\r\nexport const userAuthentication = () =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/auth')\r\n .then((response) => ({\r\n response: response.data,\r\n }));\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n WPR_NUMBER_CHAR_LIMIT,\r\n WPR_NAME_CHAR_LIMIT,\r\n WPR_NUMBER_REGEX,\r\n} from 'constants/feature/workpaper-panel-constants';\r\nexport default class WorkpaperForm extends ApiModel({\r\n data: {\r\n revisionId: null,\r\n elementId: null,\r\n referenceNumber: '',\r\n referenceName: '',\r\n id: null,\r\n workpaperRefCreatedBy: null,\r\n elementWpRefCreatedBy: null,\r\n workpaperRefCreatedDate: null,\r\n workpaperRefId: null,\r\n creationType: null,\r\n },\r\n errorDuplicateRefNumber: null, // stores the reference number determined to be duplicate after the last failed request\r\n}) {\r\n get id() {\r\n if (this.data) {\r\n return this.data.id;\r\n }\r\n return null;\r\n }\r\n\r\n get workpaperRefId() {\r\n if (this.data) {\r\n return this.data.workpaperRefId;\r\n }\r\n return null;\r\n }\r\n get revisionId() {\r\n if (this.data) {\r\n return this.data.revisionId;\r\n }\r\n return null;\r\n }\r\n get elementId() {\r\n if (this.data) {\r\n return this.data.elementId;\r\n }\r\n return null;\r\n }\r\n get referenceNumber() {\r\n if (this.data) {\r\n return this.data.referenceNumber;\r\n }\r\n return '';\r\n }\r\n get referenceName() {\r\n if (this.data) {\r\n return this.data.referenceName;\r\n }\r\n return '';\r\n }\r\n get creationType() {\r\n if (this.data) {\r\n return this.data.creationType;\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Initializes a workpaper form from a normal workpaper model\r\n * @param {Workpaper} workpaper\r\n */\r\n fromWorkpaper(workpaper) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n error: null,\r\n data: { ...workpaper },\r\n });\r\n }\r\n\r\n toApiFormat() {\r\n return {\r\n ...this.data,\r\n };\r\n }\r\n\r\n toEditApiFormat() {\r\n return {\r\n revisionId: this.data.revisionId,\r\n workpaperRefId: this.data.workpaperRefId,\r\n referenceNumber: this.data.referenceNumber,\r\n referenceName: this.data.referenceName,\r\n creationType: this.data.creationType,\r\n };\r\n }\r\n\r\n initFromElement({ elementDetails }) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n data: {\r\n ...this.data,\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n },\r\n });\r\n }\r\n\r\n setDuplicateErrorLoaded({ duplicate }) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n errorDuplicateRefNumber: duplicate,\r\n });\r\n }\r\n\r\n setReferenceNumber(referenceNumber) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n referenceNumber,\r\n },\r\n });\r\n }\r\n\r\n trimmedWorkpaperReference() {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n referenceNumber: this.data.referenceNumber.trim(),\r\n referenceName: this.data.referenceName.trim(),\r\n },\r\n });\r\n }\r\n\r\n setReferenceName(referenceName) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n referenceName,\r\n },\r\n });\r\n }\r\n\r\n hasDuplicateReferenceError() {\r\n return !isNullOrUndefined(this.errorDuplicateRefNumber);\r\n }\r\n\r\n isReferenceNumberDuplicate() {\r\n return (\r\n this.hasDuplicateReferenceError() &&\r\n this.errorDuplicateRefNumber === this.data.referenceNumber\r\n );\r\n }\r\n\r\n doesRefNumberHaveIllegalChars() {\r\n return WPR_NUMBER_REGEX.test(this.data.referenceNumber);\r\n }\r\n\r\n isRefNumberTooLong() {\r\n return (\r\n !isNullOrUndefined(this.data.referenceNumber) &&\r\n this.data.referenceNumber.length > WPR_NUMBER_CHAR_LIMIT\r\n );\r\n }\r\n\r\n isReferenceNumberValid() {\r\n return (\r\n !this.isReferenceNumberDuplicate() &&\r\n !this.doesRefNumberHaveIllegalChars() &&\r\n !this.isRefNumberTooLong()\r\n );\r\n }\r\n\r\n isRefNameTooLong() {\r\n return (\r\n !isNullOrUndefined(this.data.referenceName) &&\r\n this.data.referenceName.length > WPR_NAME_CHAR_LIMIT\r\n );\r\n }\r\n\r\n isReferenceNameValid() {\r\n return !this.isRefNameTooLong();\r\n }\r\n\r\n isWorkpaperValid() {\r\n return (\r\n // Reference number is required but has no required validation message\r\n // so it should prevent the user from saving, but not trigger an error message\r\n !isNullOrUndefined(this.data.referenceNumber) &&\r\n this.data.referenceNumber.length > 0 &&\r\n this.isReferenceNumberValid() &&\r\n this.isReferenceNameValid() &&\r\n !this.isReferenceNumberDuplicate()\r\n );\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setStatementAnnotationsPosition = createAction(\r\n 'STATEMENT_ANNOTATIONS_POSITION',\r\n);\r\n\r\nexport const setAnnotationsPosition =\r\n ({ position }) =>\r\n (dispatch) => {\r\n dispatch(setStatementAnnotationsPosition({ position }));\r\n };\r\n","import io from 'socket.io-client';\r\nimport { checkIfExistingTokenIsValidAndFetchNewIfExpired } from 'api/api-authentication';\r\nimport { getStore } from 'store/store';\r\nimport { setSocketDisconnectAction } from 'store/actions/statement-socket-actions';\r\nimport { setProjectSocketDisconnectAction } from 'store/actions/project-socket-actions';\r\n//import { addUserToRevision } from 'store/actions/active-users-actions';\r\n\r\nconst globalClientConfig = {};\r\n\r\nexport const rooms = {\r\n revision(projectId, revisionId) {\r\n return `projects/${parseInt(projectId)}/revisions/${revisionId}`;\r\n },\r\n project(projectId) {\r\n return `projects/${parseInt(projectId)}`;\r\n },\r\n};\r\n\r\nexport const SOCKET_CONNECTION_TYPE = {\r\n REVISION: 'REVISION',\r\n PROJECT: 'PROJECT',\r\n};\r\n\r\nexport default globalClientConfig;\r\n\r\nconst UNIT_TIME = 1000; // 1 second\r\nconst RECONNECT_DELAY_TIME = UNIT_TIME * 5; // 5 seconds\r\n\r\n// attempts are going to be --- 5th second, 10th second, 20th second, 40th second, 80th second, 160th seond\r\nconst RECONNECT_DELAY_TIME_MAX = RECONNECT_DELAY_TIME * 40; // 200 seconds\r\n\r\n/*\r\n Example from socket.io docs:\r\n\r\n const socket = new Socket({\r\n autoConnect: true,\r\n url: 'wss://socketio-chat-h9jt.herokuapp.com',\r\n });\r\n*/\r\n\r\nexport class SocketClient {\r\n accessToken = null;\r\n autoConnect = false;\r\n callbackQueue = [];\r\n isConnected = false;\r\n rooms = new Map();\r\n projectId = null;\r\n revisionId = null;\r\n userId = null;\r\n socketConnectionType = null;\r\n geoCode = null;\r\n\r\n constructor(config) {\r\n this.connectWithRetry = this.connectWithRetry.bind(this);\r\n //localStorage.debug = '*';\r\n Object.assign(this, globalClientConfig, config);\r\n if (this.autoConnect) {\r\n this.connectWithRetry();\r\n }\r\n }\r\n\r\n async connect() {\r\n if (!this.accessToken && !this.geoCode) {\r\n return false;\r\n }\r\n const { dispatch } = getStore();\r\n this.socket = io(\r\n `${window.TIEOUT.ENV.GEOS[this.geoCode].BASE_HUB_URL}/tieout`,\r\n {\r\n // how long to initially wait before attempting a new reconnection. Affected by +/- randomizationFactor\r\n reconnectionDelay: RECONNECT_DELAY_TIME,\r\n // number of reconnection attempts before giving up\r\n reconnectionAttempts: 6,\r\n // maximum amount of time to wait between reconnections. Each attempt increases the reconnection delay by 2x along with a randomization factor\r\n reconnectionDelayMax: RECONNECT_DELAY_TIME_MAX,\r\n // The randomization factor is used when reconnecting (so that the clients do not reconnect at the exact same time after a server crash, for example).\r\n // Example- 2nd attempt after = RECONNECT_DELAY_TIME * 2^1 * (something between 0.8 and 1.2)\r\n // I have kept it low so that time taken between reconnection attempts does not becomes very unpredicatable.\r\n randomizationFactor: 0.2,\r\n transports: ['websocket', 'polling'], // use WebSocket first, if available\r\n rememberUpgrade: true,\r\n auth: async (callback) =>\r\n callback({\r\n token: `Bearer ${await checkIfExistingTokenIsValidAndFetchNewIfExpired(\r\n this.geoCode,\r\n )}`,\r\n }),\r\n },\r\n );\r\n this.socket.on('connect', () => {\r\n this.isConnected = true;\r\n console.info('socket connected');\r\n this._setSocketConnectionState(this.socket.id);\r\n this.executeCallbacks();\r\n });\r\n this.socket.on('connect_error', (e) => {\r\n this.isConnected = false;\r\n console.info('error while connecting to socket', e);\r\n // revert to classic upgrade\r\n this.socket.io.opts.transports = ['polling', 'websocket'];\r\n this.socketConnectionType === SOCKET_CONNECTION_TYPE.PROJECT\r\n ? dispatch(setProjectSocketDisconnectAction(true))\r\n : dispatch(setSocketDisconnectAction(true));\r\n });\r\n this.socket.on('disconnect', () => {\r\n this.isConnected = false;\r\n console.info('socket disconnected');\r\n\r\n this._deleteSocketRoom();\r\n\r\n this.socketConnectionType === SOCKET_CONNECTION_TYPE.PROJECT\r\n ? // this is somewhat hacky solution.\r\n // we cannot dispatch action from within a reducer, but we can wrap inside setTimeout and dispatch it.\r\n // Generally it is not recommended to dispatch from reducer. But in this scenario, we are recieving\r\n // disconnect event from socket server while store is still updating. (To repro this --> go to home page, switch project)\r\n setTimeout(() => dispatch(setProjectSocketDisconnectAction(true)), 0)\r\n : setTimeout(() => dispatch(setSocketDisconnectAction(true)), 0);\r\n\r\n this.executeCallbacks();\r\n });\r\n\r\n this.socket.io.on('reconnect_attempt', (attempt) => {\r\n this.isConnected = false;\r\n console.info('socket reconnecting , reconnect_attempt:', attempt);\r\n\r\n this.socketConnectionType === SOCKET_CONNECTION_TYPE.PROJECT\r\n ? dispatch(setProjectSocketDisconnectAction(true))\r\n : dispatch(setSocketDisconnectAction(true));\r\n });\r\n\r\n this.socket.io.on('reconnect_failed', () => {\r\n this.isConnected = false;\r\n console.info('reconnect_failed');\r\n\r\n this.socketConnectionType === SOCKET_CONNECTION_TYPE.PROJECT\r\n ? dispatch(setProjectSocketDisconnectAction(true))\r\n : dispatch(setSocketDisconnectAction(true));\r\n });\r\n\r\n return true;\r\n }\r\n\r\n async connectWithRetry() {\r\n if (this.isConnected) {\r\n return;\r\n }\r\n if (!this.accessToken && this.geoCode) {\r\n this.accessToken = await checkIfExistingTokenIsValidAndFetchNewIfExpired(\r\n this.geoCode,\r\n );\r\n this.autoConnect = true;\r\n }\r\n if (!(await this.connect())) {\r\n setTimeout(this.connectWithRetry, 30000);\r\n }\r\n }\r\n\r\n async disconnect() {\r\n if (!this.socket) {\r\n return false;\r\n }\r\n this.socket.close();\r\n this.rooms = new Map();\r\n return true;\r\n }\r\n\r\n queueCallback(callback) {\r\n if (this.isConnected) {\r\n callback();\r\n } else {\r\n this.callbackQueue.push(callback);\r\n }\r\n }\r\n\r\n executeCallbacks() {\r\n if (this.isConnected) {\r\n while (this.callbackQueue.length) {\r\n this.callbackQueue.shift()();\r\n }\r\n }\r\n }\r\n\r\n on(event, callback) {\r\n this.queueCallback(() => this.socket.on(event, callback));\r\n }\r\n\r\n join(room) {\r\n this.queueCallback(() => {\r\n if (this.rooms.get(room)) {\r\n return;\r\n }\r\n this.rooms.set(room, true);\r\n this.socket.emit('join', {\r\n accessToken: this.accessToken,\r\n userId: this.userId,\r\n room,\r\n });\r\n console.debug('socketIO- room joined:', room);\r\n });\r\n }\r\n\r\n leave(room) {\r\n this.queueCallback(() => {\r\n if (!this.rooms.get(room)) {\r\n return;\r\n }\r\n this.rooms.delete(room);\r\n this.socket.emit('leave', {\r\n accessToken: this.accessToken,\r\n room,\r\n });\r\n console.debug('socketIO- room left:', room);\r\n });\r\n }\r\n\r\n _setSocketConnectionState = (connectionId) => {\r\n const { dispatch } = getStore();\r\n const { currentUser } = getStore().getState().data;\r\n // before joining a room we need userId info so that we can record info about which user in the room\r\n this.userId = currentUser.id;\r\n switch (this.socketConnectionType) {\r\n case SOCKET_CONNECTION_TYPE.PROJECT:\r\n localStorage.setItem('projectConnectionId', connectionId);\r\n\r\n // Wait for disconnect event (Event recieved from Socket server) to complete before setting the connect state.\r\n // Otherwise else we might end up reading the wrong 'connected' status.\r\n // Setting sequence using async await was not feasible since we do not always connect after disconnect.\r\n setTimeout(\r\n () => dispatch(setProjectSocketDisconnectAction(false)),\r\n 3000,\r\n );\r\n this.join(rooms.project(this.projectId));\r\n break;\r\n case SOCKET_CONNECTION_TYPE.REVISION:\r\n localStorage.setItem('connectionId', connectionId);\r\n // Wait for disconnect event (event recieved from socket server) to complete before setting the connect state.\r\n // Otherwise else we might end up reading the wrong 'connected' status.\r\n // Setting sequence using async await was not feasible since we do not always connect after disconnect.\r\n setTimeout(() => dispatch(setSocketDisconnectAction(false)), 3000);\r\n this.join(rooms.revision(this.projectId, this.revisionId));\r\n // TODO : Code to be uncommented when we are developing feature related to instant update of active users on statement.\r\n // dispatch(addUserToRevision(this.revisionId, this.projectId));\r\n break;\r\n default:\r\n }\r\n };\r\n\r\n _closeSocketConnection = () => {\r\n switch (this.socketConnectionType) {\r\n case SOCKET_CONNECTION_TYPE.PROJECT:\r\n this.leave(rooms.project(this.projectId));\r\n break;\r\n case SOCKET_CONNECTION_TYPE.REVISION:\r\n this.leave(rooms.revision(this.projectId, this.revisionId));\r\n break;\r\n default:\r\n }\r\n };\r\n\r\n _deleteSocketRoom = () => {\r\n let projectSpecificRoom = rooms.project(this.projectId);\r\n let revisionSpecificRoom = rooms.revision(this.projectId, this.revisionId);\r\n switch (this.socketConnectionType) {\r\n case SOCKET_CONNECTION_TYPE.PROJECT:\r\n if (!this.rooms.get(projectSpecificRoom)) {\r\n return;\r\n }\r\n this.rooms.delete(projectSpecificRoom);\r\n break;\r\n case SOCKET_CONNECTION_TYPE.REVISION:\r\n if (!this.rooms.get(revisionSpecificRoom)) {\r\n return;\r\n }\r\n this.rooms.delete(revisionSpecificRoom);\r\n break;\r\n default:\r\n }\r\n };\r\n\r\n _handleProjectDisconnect = () => {\r\n const { dispatch } = getStore();\r\n switch (this.socket) {\r\n case SOCKET_CONNECTION_TYPE.PROJECT:\r\n dispatch(setProjectSocketDisconnectAction(true));\r\n break;\r\n case SOCKET_CONNECTION_TYPE.REVISION:\r\n dispatch(setSocketDisconnectAction(true));\r\n break;\r\n default:\r\n }\r\n };\r\n}\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\n\r\nexport const createNewStatementRequest = ({ project, statement }) => {\r\n const carryforwardStatement = statement.carryForwardStatementIdsArray.length\r\n ? statement.carryForwardStatementIdsArray[0]\r\n : '-1';\r\n const isPeriodToPeriod = statement.carryForwardStatementIdsArray.length\r\n ? true\r\n : false;\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/documentupload/${parseInt(\r\n project.id,\r\n )}/statements/${carryforwardStatement}`,\r\n statement.toCreationApiFormat(),\r\n {\r\n params: {\r\n isPeriodToPeriod,\r\n },\r\n },\r\n );\r\n};\r\n\r\nexport const uploadRevisionRequest = ({ statement, revision }) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/documentupload/${parseInt(statement.clientId)}/statements/${\r\n statement.id\r\n }`,\r\n revision.revisionToApiFormat(statement),\r\n {\r\n params: {\r\n isPeriodToPeriod: false,\r\n },\r\n },\r\n );\r\n};\r\n\r\nexport const getSelectedStatementRequest = (statementId, projectIdWithGeo) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(`/tieout/statements/${statementId}`, {})\r\n .then((response) => {\r\n response.data.clientId = projectIdWithGeo;\r\n return response;\r\n });\r\n\r\nexport const editStatementRequest = (statement, project) =>\r\n withDefaultContextAsSelectedProject()\r\n .post('/tieout/statements/update', statement.toEditApiFormat())\r\n .then((response) => {\r\n response.data.result.clientId = project.data.id;\r\n return response;\r\n });\r\n\r\nexport const getBetaStmtGuide = () =>\r\n withDefaultContextAsSelectedProject()\r\n .get('/tieout/statement/betastmtguide', { responseType: 'blob' })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport default {\r\n createNewStatementRequest,\r\n uploadRevisionRequest,\r\n getSelectedStatementRequest,\r\n editStatementRequest,\r\n getBetaStmtGuide,\r\n};\r\n","export const focusNextMenuItem = (e) => {\r\n e.preventDefault();\r\n if (e.target.nextElementSibling) {\r\n e.target.nextElementSibling.focus();\r\n }\r\n};\r\n\r\nexport const focusPrevMenuItem = (e) => {\r\n e.preventDefault();\r\n if (e.target.previousElementSibling) {\r\n e.target.previousElementSibling.focus();\r\n }\r\n};\r\n\r\nexport const focusFirstMenuOption = (e, selector) => {\r\n e.preventDefault();\r\n document.querySelector(selector) && document.querySelector(selector).focus();\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { getSelectedProjectUsersRequest } from 'api/project-list-api';\r\n\r\nexport const setProjectUsersListLoaded = createAction(\r\n 'SET_PROJECT_USERS_LIST_LOADED',\r\n);\r\n\r\nexport const setProjectUsersListLoading = createAction(\r\n 'SET_PROJECT_USERS_LIST_LOADING',\r\n);\r\n\r\nexport const setProjectUsersListError = createAction(\r\n 'SET_PROJECT_USERS_LIST_ERROR',\r\n);\r\n\r\nexport const getAllUsers = () => async (dispatch, getState) => {\r\n dispatch(setProjectUsersListLoading());\r\n const { project } = getState().data.selectedProject;\r\n try {\r\n const response = await getSelectedProjectUsersRequest(project.getUserIds());\r\n await dispatch(setProjectUsersListLoaded({ response }));\r\n } catch (error) {\r\n dispatch(setProjectUsersListError(error));\r\n }\r\n};\r\n","import {\r\n withDefaultContextAsCurrentGeo,\r\n withDefaultContextAsSelectedProject,\r\n} from './api-default-context';\r\n\r\nexport const getStatementCreationPageDataRequest = () =>\r\n withDefaultContextAsSelectedProject().get('/tieout/statement/options');\r\n\r\nexport const getLanguageData = (localeCode) => {\r\n return withDefaultContextAsCurrentGeo()\r\n .get(`/tieout/translations/languages/${localeCode}`)\r\n .then((response) => {\r\n return response.data;\r\n });\r\n};\r\n\r\nexport const getUserPreferredLanguage = ({ userId }) => {\r\n return withDefaultContextAsCurrentGeo()\r\n .get(`/tieout/user/${userId}/languagePreference`)\r\n .then((response) => response.data);\r\n};\r\n\r\nexport const fetchSupportedLanguage = () =>\r\n withDefaultContextAsCurrentGeo()\r\n .get('/tieout/translations/languages')\r\n .then((response) => {\r\n return { response: response.data };\r\n });\r\n\r\nexport const updateUserPreferredLanguage = ({ languageCode }) =>\r\n withDefaultContextAsCurrentGeo()\r\n .post(`/tieout/upsertUserPreference/?languageCode=${languageCode}`)\r\n .then((response) => {\r\n return response;\r\n });","import { createAction } from 'redux-actions';\r\nimport revisionApi from 'api/revision-api';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { CONTEXT_KEY } from 'api/api-client';\r\nimport { getGeoForProjectId } from './selected-project-actions';\r\nexport const leftRevisionLoading = createAction('LEFT_REVISION_LOADING');\r\nexport const leftRevisionError = createAction('LEFT_REVISION_ERROR');\r\nexport const leftRevisionLoaded = createAction('LEFT_REVISION_LOADED');\r\n\r\nexport const fetchLeftRevision =\r\n (revisionId, statementId, projectId) => async (dispatch, getState) => {\r\n dispatch(leftRevisionLoading());\r\n if (!isNullOrUndefined(revisionId)) {\r\n try {\r\n const selectedProjectGeoCode = dispatch(getGeoForProjectId(projectId));\r\n const response = await revisionApi.getRevisionRequest(\r\n revisionId,\r\n selectedProjectGeoCode,\r\n statementId,\r\n {\r\n contextKey: CONTEXT_KEY.PROJECT_CONTEXT,\r\n contextValue: projectId,\r\n },\r\n );\r\n dispatch(\r\n leftRevisionLoaded({\r\n response,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(leftRevisionError(error));\r\n }\r\n } else {\r\n dispatch(\r\n leftRevisionError(\r\n new Error('You currently cannot access this statement.'),\r\n ),\r\n );\r\n }\r\n };\r\n","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\r\nimport { useLocation, useParams } from 'react-router-dom';\r\nimport Permissions from 'permissions/permissions';\r\nimport { connect, useDispatch } from 'react-redux';\r\nimport TieoutElement, {\r\n onElementClick,\r\n} from 'components/feature/statement-content-panel/tieout-element-component';\r\nimport {\r\n setSourceStatementElementMapAction,\r\n setTargetStatementElementMapAction,\r\n} from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { getExcessiveElementSelectionNotification } from 'constants/feature/tieout-element-utils';\r\nimport { updateSideBySideElementCacheByCallouts } from 'store/actions/statement-content-annotation-creation-actions';\r\nimport { STATEMENT_ELEMENT_ID_PREFIX } from 'constants/feature/statement-content-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const ElementSelectionLimit = 250;\r\n\r\nexport const TieoutElementHOC = (props) => {\r\n const {\r\n elementData,\r\n leftSideView,\r\n elementDataparts,\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n } = props;\r\n\r\n // on page load, store the props in a ref.\r\n const latestProps = useRef(props);\r\n\r\n useEffect(() => {\r\n // update the ref with the latest props. based on the on change of props\r\n latestProps.current = props;\r\n }, [props]);\r\n\r\n const pathName = useLocation().pathname;\r\n const { projectId } = useParams();\r\n const dispatch = useDispatch();\r\n const hasPermission = useMemo(\r\n () =>\r\n Permissions.SideBySideStatementViewPermissions.canSelectElement(\r\n projectId,\r\n ),\r\n [projectId],\r\n );\r\n\r\n const _isSideBySideView = useMemo(\r\n () => pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE),\r\n [pathName],\r\n );\r\n\r\n const getCountForSelectedElement = useCallback(() => {\r\n const elementCount =\r\n props.sideBySideElementMap &&\r\n props.sideBySideElementMap.getCountOfElementsSelected();\r\n return elementCount + 1;\r\n }, [props.sideBySideElementMap]);\r\n\r\n const handleElementClick = useCallback(\r\n ({ elementId, sectionId, isDisabled }) => {\r\n if (pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE) && hasPermission) {\r\n if (getCountForSelectedElement() <= ElementSelectionLimit) {\r\n let elementDataFromCache = !isNullOrUndefined(elementData)\r\n ? elementData.data\r\n : latestProps.current.elementData &&\r\n latestProps.current.elementData.data;\r\n if (leftSideView)\r\n elementDataFromCache &&\r\n dispatch(\r\n setSourceStatementElementMapAction(elementDataFromCache),\r\n );\r\n else\r\n _shouldEnableTargetElementForSelection(elementId) &&\r\n elementDataFromCache &&\r\n dispatch(\r\n setTargetStatementElementMapAction(elementDataFromCache),\r\n );\r\n } else {\r\n getExcessiveElementSelectionNotification(ElementSelectionLimit);\r\n }\r\n } else if (!_isSideBySideView) {\r\n return dispatch(onElementClick({ elementId, sectionId, isDisabled }));\r\n }\r\n },\r\n [\r\n pathName,\r\n hasPermission,\r\n leftSideView,\r\n _isSideBySideView,\r\n latestProps.current.sideBySideElementMap,\r\n ],\r\n );\r\n\r\n const handleAnnotationClick = useCallback(\r\n ({ elementId, showCallout }) => {\r\n dispatch(\r\n updateSideBySideElementCacheByCallouts({\r\n elementIds: [elementId],\r\n showCallout,\r\n isLeftSideView: leftSideView,\r\n }),\r\n );\r\n },\r\n [leftSideView],\r\n );\r\n\r\n const isElementSelectedForSideBySideMap = useCallback(\r\n (elementId) => {\r\n if (_isSideBySideView) {\r\n if (leftSideView) {\r\n return (\r\n props.sideBySideElementMap &&\r\n props.sideBySideElementMap.getSourceElementMapByElementId(elementId)\r\n );\r\n }\r\n return (\r\n props.sideBySideElementMap &&\r\n props.sideBySideElementMap.getTargetElementMapByElementId(elementId)\r\n );\r\n } else return false;\r\n },\r\n [_isSideBySideView, leftSideView, props.sideBySideElementMap],\r\n );\r\n\r\n const getCountForSelectedElementForSideBySideMapping = useCallback(\r\n (elementId) => {\r\n if (_isSideBySideView) {\r\n if (leftSideView) {\r\n return (\r\n props.sideBySideElementMap &&\r\n props.sideBySideElementMap.getCountForMappedSourceElement(elementId)\r\n );\r\n }\r\n return (\r\n props.sideBySideElementMap &&\r\n props.sideBySideElementMap.getCountForMappedTargetElement(elementId)\r\n );\r\n } else return null;\r\n },\r\n [_isSideBySideView, leftSideView, props.sideBySideElementMap],\r\n );\r\n\r\n const _shouldEnableTargetElementForSelection = useCallback(\r\n (elementId) => {\r\n if (\r\n _isSideBySideView &&\r\n !leftSideView &&\r\n latestProps.current.sideBySideElementMap\r\n ) {\r\n return (\r\n latestProps.current.sideBySideElementMap\r\n .mapKeyOfFirstUnmappedTargetElement ||\r\n latestProps.current.sideBySideElementMap.getTargetElementMapByElementId(\r\n elementId,\r\n )\r\n );\r\n }\r\n },\r\n [_isSideBySideView, leftSideView, latestProps.current.sideBySideElementMap],\r\n );\r\n\r\n const handleSideBySideIsDisabled = useCallback(\r\n (elementId) => {\r\n return _isSideBySideView\r\n ? leftSideView\r\n ? !hasPermission\r\n : !(\r\n hasPermission && _shouldEnableTargetElementForSelection(elementId)\r\n )\r\n : false;\r\n },\r\n [_isSideBySideView, leftSideView],\r\n );\r\n\r\n const isCursorAlias = useMemo(() => {\r\n return hasPermission // return true if user has permission to the respective statement for elements mapping in side-by-side view\r\n ? leftSideView // returns true if it is left side statement in side-by-side view\r\n ? true\r\n : latestProps.current.numberOfSourceElementSelected >\r\n latestProps.current.numberOfTargetElementSelected // returns true if number of selected source elements is greater than number of selected target elements to change the pointer(disabled to selection pointer) of right statement accordingly in side-by-side view\r\n : false;\r\n }, [\r\n leftSideView,\r\n hasPermission,\r\n latestProps.current.numberOfSourceElementSelected,\r\n latestProps.current.numberOfTargetElementSelected,\r\n ]);\r\n\r\n return (\r\n \r\n );\r\n};\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n elementPanel: {\r\n elementDetails: { id: elementPanelElementId },\r\n },\r\n copyFormula: { tableMatrix },\r\n annotationDisplayOptions: annotationDisplayFilter,\r\n selectedStatement: { isCftEnabled },\r\n statementContent: { elementsDataparts, elementCache },\r\n leftStatementContent: { leftElementsDataparts, leftElementCache },\r\n statementSummary: {\r\n annotationPosition,\r\n statementSummaryElementsDisplay: {\r\n displayElementDetailsOnStatementPage,\r\n },\r\n },\r\n },\r\n ui: {\r\n sideBySideView: { sideBySideElementMap },\r\n statementPage: {\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n selectedElementsMap,\r\n panels: { right },\r\n highlightedElementId,\r\n },\r\n },\r\n },\r\n ownProps,\r\n) => {\r\n let elementId = ownProps.id.substring(STATEMENT_ELEMENT_ID_PREFIX.length);\r\n if (elementId && elementId.indexOf('_') >= 0) {\r\n elementId = elementId.substr(0, elementId.indexOf('_'));\r\n }\r\n const sectionId = ownProps.sectionId;\r\n const elementData = ownProps.leftSideView\r\n ? leftElementCache.getElement({ elementId, sectionId: sectionId })\r\n : elementCache.getElement({ elementId, sectionId: sectionId });\r\n\r\n const isElementSelected = selectedElementsMap.has(elementId);\r\n const elementHighlightState =\r\n selectedElementsMap.getElementHighlightColor(elementId);\r\n\r\n const rightPanelState =\r\n parseInt(elementId) === elementPanelElementId ? right : null;\r\n\r\n let isPartOfTableMatrix = false;\r\n if (tableMatrix.length > 0) {\r\n tableMatrix[elementId]\r\n ? (isPartOfTableMatrix = true)\r\n : (isPartOfTableMatrix = false);\r\n } else {\r\n isPartOfTableMatrix = true;\r\n }\r\n\r\n const elementDataparts = ownProps.leftSideView\r\n ? leftElementsDataparts\r\n : elementsDataparts;\r\n\r\n const renderElementDataParts =\r\n elementDataparts &&\r\n elementDataparts.elements &&\r\n !!Object.keys(elementDataparts.elements).length &&\r\n elementId in elementDataparts.elements &&\r\n !isNullOrUndefined(elementDataparts.elements[elementId]);\r\n\r\n return {\r\n isElementSelected,\r\n elementHighlightState,\r\n elementData,\r\n annotationDisplayFilter,\r\n isCftEnabled,\r\n isPartOfTableMatrix,\r\n elementPanelElementId: elementPanelElementId,\r\n highlightedElementId,\r\n rightPanelState,\r\n annotationPosition,\r\n elementDataparts,\r\n renderElementDataParts,\r\n sideBySideElementMap,\r\n zoom,\r\n numberOfSourceElementSelected:\r\n sideBySideElementMap && sideBySideElementMap.sizeOfSourceMapping,\r\n numberOfTargetElementSelected:\r\n sideBySideElementMap && sideBySideElementMap.sizeOfTargetMapping,\r\n displayElementDetailsOnStatementPage,\r\n sectionId,\r\n leftZoom,\r\n rightZoom,\r\n };\r\n};\r\n\r\n// Custom comparison function for React.memo\r\nconst areEqual = (prevProps, nextProps) => {\r\n // For example, only re-render if `elementData` or `leftSideView` changes\r\n return (\r\n prevProps.elementData === nextProps.elementData &&\r\n prevProps.leftSideView === nextProps.leftSideView &&\r\n prevProps.sideBySideElementMap === nextProps.sideBySideElementMap &&\r\n prevProps.leftSelectedElementsMap === nextProps.leftSelectedElementsMap &&\r\n prevProps.isElementSelected === nextProps.isElementSelected && // updating selectedElementsMap use in tieout element\r\n prevProps.elementHighlightState === nextProps.elementHighlightState && // updating selectedElementsMap use in tieout element\r\n prevProps.numberOfSourceElementSelected ===\r\n nextProps.numberOfSourceElementSelected &&\r\n prevProps.numberOfTargetElementSelected ===\r\n nextProps.numberOfTargetElementSelected &&\r\n prevProps.renderElementDataParts === nextProps.renderElementDataParts && // To render when change in elementDataparts\r\n prevProps.annotationDisplayFilter === nextProps.annotationDisplayFilter &&\r\n prevProps.isCftEnabled === nextProps.isCftEnabled &&\r\n prevProps.isPartOfTableMatrix === nextProps.isPartOfTableMatrix &&\r\n prevProps.highlightedElementId === nextProps.highlightedElementId &&\r\n prevProps.rightPanelState === nextProps.rightPanelState &&\r\n prevProps.annotationPosition.position ===\r\n nextProps.annotationPosition.position &&\r\n prevProps.zoom === nextProps.zoom &&\r\n prevProps.displayElementDetailsOnStatementPage ===\r\n nextProps.displayElementDetailsOnStatementPage &&\r\n prevProps.leftZoom === nextProps.leftZoom &&\r\n prevProps.rightZoom === nextProps.rightZoom\r\n );\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n null,\r\n)(React.memo(TieoutElementHOC, areEqual));\r\n","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\n\r\nclass SelectedElementModel extends BaseModel({\r\n count: 1, // number of times element has been selected\r\n color: ELEMENT_HIGHLIGHT_STATES.DEFAULT,\r\n}) {\r\n increment() {\r\n return this.merge({ count: this.count + 1 });\r\n }\r\n decrement() {\r\n return this.merge({ count: this.count - 1 });\r\n }\r\n}\r\n/**\r\n * A set of selected element ids, keys are removed when they are no longer selected\r\n */\r\nexport default class SelectedElementMap extends BaseModel({\r\n /* shape is\r\n {\r\n [elementId]: SelectedElementModel\r\n ...\r\n }\r\n */\r\n}) {\r\n /**\r\n * Reducer function for simultaneously clearing old selected ids and initializing\r\n * the set with new ones\r\n * @param {int[]} param.elementIds array of element ids\r\n */\r\n replaceWithElements({\r\n elementIds,\r\n color = ELEMENT_HIGHLIGHT_STATES.DEFAULT,\r\n }) {\r\n const elementMap = {};\r\n elementIds.forEach((id) => {\r\n elementMap[id] = new SelectedElementModel({ color });\r\n });\r\n return new SelectedElementMap({ ...elementMap });\r\n }\r\n // replaces element without modifying count\r\n replaceWithoutRemovingOld({\r\n elementIds,\r\n color = ELEMENT_HIGHLIGHT_STATES.DEFAULT,\r\n }) {\r\n const elementMap = {};\r\n elementIds.forEach((id) => {\r\n if (this.has(id)) {\r\n this[id].color = color;\r\n } else {\r\n elementMap[id] = new SelectedElementModel({ color });\r\n }\r\n });\r\n return new SelectedElementMap({ ...this, ...elementMap });\r\n }\r\n\r\n /**\r\n * Reducer function for appending elements to the selection set\r\n * @param {int[]} param.elementIds array of element ids\r\n */\r\n appendSelectedElements({\r\n elementIds,\r\n color = ELEMENT_HIGHLIGHT_STATES.DEFAULT,\r\n }) {\r\n const elementMap = {};\r\n elementIds.forEach((id) => {\r\n // add 1 to existing or init as 1\r\n if (this.has(id)) {\r\n elementMap[id] = this.get(id).increment();\r\n } else {\r\n elementMap[id] = new SelectedElementModel({ color });\r\n }\r\n });\r\n return this.merge({\r\n ...elementMap,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for appending an element to the selection set\r\n * @param {int} param.elementId\r\n */\r\n appendSelectedElement({ elementId, color }) {\r\n if (!color) color = ELEMENT_HIGHLIGHT_STATES.DEFAULT;\r\n if (this.has(elementId)) {\r\n return this.merge({\r\n [elementId]: this.get(elementId).increment(),\r\n [elementId]: new SelectedElementModel({ color }),\r\n });\r\n }\r\n return this.merge({\r\n [elementId]: new SelectedElementModel({ color }),\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for deselecting an element\r\n * @param {int} param.elementId\r\n */\r\n deselectElement({ elementId }) {\r\n if (this.has(elementId)) {\r\n const element = this.get(elementId);\r\n //In this case there is only one instance of the element in the map. We remove it completely here.\r\n if (element.count === 1) {\r\n const newMap = { ...this };\r\n delete newMap[elementId];\r\n return new SelectedElementMap({ ...newMap });\r\n } else {\r\n // In this case we are simply decrementing the count for the selected element.\r\n const newMap = { ...this };\r\n newMap[elementId] = element.decrement();\r\n return new SelectedElementMap({ ...newMap });\r\n }\r\n }\r\n return this;\r\n }\r\n deselectElementsFromArray(elements) {\r\n elements.forEach((elem) => {\r\n if (this.has(elem.id)) {\r\n const element = this.get(elem.id);\r\n //In this case there is only one instance of the element in the map. We remove it completely here.\r\n if (element.count === 1) {\r\n const newMap = { ...this };\r\n delete newMap[elem.id];\r\n return new SelectedElementMap({ ...newMap });\r\n } else {\r\n // In this case we are simply decrementing the count for the selected element.\r\n const newMap = { ...this };\r\n newMap[elem.id] = element.decrement();\r\n return new SelectedElementMap({ ...newMap });\r\n }\r\n }\r\n return this;\r\n });\r\n }\r\n removeElement({ elementId }) {\r\n if (this.has(elementId)) {\r\n const newMap = { ...this };\r\n delete newMap[elementId];\r\n return new SelectedElementMap({ ...newMap });\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Reducer function for clearing the set\r\n */\r\n clearMap() {\r\n return new SelectedElementMap();\r\n }\r\n\r\n getElementCount(id) {\r\n if (this.has(id)) {\r\n return this[id].count;\r\n }\r\n return 0;\r\n }\r\n\r\n getElementHighlightColor(id) {\r\n if (this.has(id)) {\r\n return this[id].color;\r\n }\r\n return null;\r\n }\r\n\r\n get(id) {\r\n return this[id];\r\n }\r\n\r\n has(id) {\r\n return !isNullOrUndefined(this[id]) && this[id].count > 0;\r\n }\r\n deallocateElement(payload) {\r\n let keys = Object.keys(this);\r\n for (let i = 0; i < keys.length; i++) {\r\n if (this[keys[i]].color === ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED) {\r\n this[keys[i]].color = ELEMENT_HIGHLIGHT_STATES.DEFAULT;\r\n }\r\n }\r\n return this;\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport { focusFirstMenuOption } from 'utils/menu-accessibility-utils';\r\nimport {\r\n SPACEBAR_KEY_CODE,\r\n TAB_KEY_CODE,\r\n ARROW_KEY_DOWN_CODE,\r\n} from 'constants/util/key-code-constants';\r\nimport { noop } from '@babel/types';\r\n\r\n/**\r\n * HOC for enabling drawer menu actions open, focusing and keyboard accessiblity\r\n * @param {Component} WrappedComponent Component who will have the Drawer Props applied\r\n * @param {string} options.itemQuerySelector css selector that indicates individual menu items, used for the accessibility utils\r\n * @param {boolean} options.textInputDrawer indicates if the drawer is linked to a textInput (e.g. search bar with drawer results), used to ensure the space key is not blocked from user input\r\n */\r\nexport const DrawerActionHandler = (WrappedComponent, options) => {\r\n return class extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isOpen: false,\r\n };\r\n\r\n this.menuPortal = document.getElementById('menu-root');\r\n }\r\n\r\n componentDidMount() {\r\n document.addEventListener('mousedown', this.handleOutsideClick, false);\r\n }\r\n\r\n componentWillUnmount() {\r\n document.removeEventListener('mousedown', this.handleOutsideClick, false);\r\n }\r\n\r\n toggleDrawer = () => {\r\n this.setState((state) => ({\r\n isOpen: !state.isOpen,\r\n }));\r\n };\r\n\r\n onFocus = (e) => {\r\n if (this.props.onFocus) {\r\n this.props.onFocus(e);\r\n }\r\n this.setState({\r\n isOpen: true,\r\n });\r\n };\r\n\r\n setWrapperRef = (node) => {\r\n this.node = node;\r\n };\r\n\r\n handleOutsideClick = (e) => {\r\n if (\r\n !(\r\n this.menuPortal.contains(e.target) ||\r\n this.node.contains(e.target) ||\r\n !this.state.isOpen\r\n )\r\n ) {\r\n this.toggleDrawer();\r\n }\r\n };\r\n\r\n onKeyDown = (e) => {\r\n const { disabled } = this.props;\r\n const { isOpen } = this.state;\r\n let itemQuerySelector, textInputDrawer;\r\n if (options) {\r\n itemQuerySelector = options.itemQuerySelector;\r\n textInputDrawer = options.textInputDrawer;\r\n }\r\n\r\n if (this.props.onKeyDown) {\r\n this.props.onKeyDown(e);\r\n }\r\n\r\n const _spaceKeyPartOfUserEntry =\r\n textInputDrawer && e.keyCode === SPACEBAR_KEY_CODE;\r\n\r\n if (_spaceKeyPartOfUserEntry) {\r\n noop();\r\n } else if (!disabled && e.keyCode === SPACEBAR_KEY_CODE) {\r\n e.preventDefault();\r\n this.toggleDrawer();\r\n } else if (e.keyCode === TAB_KEY_CODE && isOpen) {\r\n this.toggleDrawer();\r\n } else if (e.keyCode === ARROW_KEY_DOWN_CODE && isOpen) {\r\n //if the selector on a menu item (menu__option) changes this must also change.\r\n focusFirstMenuOption(\r\n e,\r\n itemQuerySelector ? itemQuerySelector : 'ul.menu > li.menu__option',\r\n );\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n };\r\n};\r\n","import FormulaRow from './formula-row-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n FORMULA_ROW_TYPES,\r\n FORMULA_ROW_OPERATOR_OPTIONS_MAP,\r\n} from 'constants/feature/formula-constants';\r\nexport default class FormulaRowOperator extends FormulaRow {\r\n operator = FORMULA_ROW_OPERATOR_OPTIONS_MAP.get('+'); // MenuOption from FORMULA_ROW_OPERATOR_OPTIONS_MAP\r\n value = '+';\r\n constructor(props) {\r\n super(props);\r\n this.type = FORMULA_ROW_TYPES.OPERATOR;\r\n if (!isNullOrUndefined(props) && !isNullOrUndefined(props.value)) {\r\n this.operator = FORMULA_ROW_OPERATOR_OPTIONS_MAP.get(props.value);\r\n this.value = props.value;\r\n }\r\n }\r\n\r\n hasOperator() {\r\n return !isNullOrUndefined(this.operator);\r\n }\r\n\r\n isOperatorParenthesis() {\r\n return (\r\n !isNullOrUndefined(this.operator) &&\r\n (this.operator === FORMULA_ROW_OPERATOR_OPTIONS_MAP.get('(') ||\r\n this.operator === FORMULA_ROW_OPERATOR_OPTIONS_MAP.get(')'))\r\n );\r\n }\r\n\r\n setOperator(operator) {\r\n return this.merge({ operator, value: operator.value });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport cloneDeep from 'lodash.clonedeep';\r\nimport uniqBy from 'lodash.uniqby';\r\n\r\nexport default class SectionAssignmentsList extends ApiModel({\r\n data: {\r\n sectionAssignments: [],\r\n assignedSectionsToUser: {},\r\n },\r\n}) {\r\n get sectionAssignments() {\r\n if (this.data && this.data.sectionAssignments) {\r\n return this.data.sectionAssignments;\r\n }\r\n return null;\r\n }\r\n\r\n get assignedSectionsToUser() {\r\n if (this.data && this.data.assignedSectionsToUser) {\r\n return this.data.assignedSectionsToUser;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response, currentUserId }) {\r\n let assignedSectionsToUserArray = {};\r\n for (let i = 0; i < response.data.result.length; i++) {\r\n let assignment = response.data.result[i];\r\n if (assignment.userId === currentUserId) {\r\n assignedSectionsToUserArray[assignment.sectionId] = true;\r\n }\r\n }\r\n return {\r\n data: {\r\n sectionAssignments: response.data.result,\r\n assignedSectionsToUser: assignedSectionsToUserArray,\r\n },\r\n };\r\n }\r\n /**This is used for updating section assignment details only for a single section id */\r\n /**It will replace the old section assignment details for a particular section Id with new\r\n * section assignment details.\r\n */\r\n updateSectionAssignmentListFromSocket({\r\n sectionAssignmentListPayload,\r\n sectionId,\r\n currentUserId,\r\n }) {\r\n let newsectionAssignments = [];\r\n let userIDsInPayload = [];\r\n let assignedSectionsToUserCopy = cloneDeep(this.assignedSectionsToUser);\r\n\r\n // since the update is only for particular sectionId (in parameter) so extact all data which\r\n // do not belongs to that sectionId(in the parameter) and append it in newsectionAssignments\r\n // under construction;\r\n this.sectionAssignments.length > 0 &&\r\n this.sectionAssignments.forEach((sectionAssign) => {\r\n sectionAssign.sectionId !== sectionId &&\r\n newsectionAssignments.push(sectionAssign);\r\n });\r\n //in case of delete or an unassign-all event,remove existing assigned section ID for a user\r\n if (sectionAssignmentListPayload.length === 0) {\r\n delete assignedSectionsToUserCopy[sectionId];\r\n } else {\r\n for (let i = 0; i < sectionAssignmentListPayload.length; i++) {\r\n newsectionAssignments.push(sectionAssignmentListPayload[i]);\r\n userIDsInPayload.push(sectionAssignmentListPayload[i].userId);\r\n }\r\n\r\n //This code snippet handles assign/unassign scenario based on the userIDs and sectionId in the payload\r\n if (userIDsInPayload.includes(currentUserId)) {\r\n assignedSectionsToUserCopy[sectionId] = true;\r\n } else if (\r\n assignedSectionsToUserCopy[sectionId] &&\r\n !userIDsInPayload.includes(currentUserId)\r\n ) {\r\n delete assignedSectionsToUserCopy[sectionId];\r\n }\r\n }\r\n return this.merge({\r\n data: {\r\n sectionAssignments: newsectionAssignments,\r\n assignedSectionsToUser: assignedSectionsToUserCopy,\r\n },\r\n });\r\n }\r\n updateSectionAssignmentListForBulkAssignFromSocket({\r\n sectionAssignmentListPayload,\r\n currentUserId,\r\n }) {\r\n // add section assignments from payload and remove duplicate assignments if there are any\r\n const sectionAssignments = uniqBy(\r\n [...this.sectionAssignments, ...sectionAssignmentListPayload],\r\n (v) => [v.revisionId, v.sectionId, v.userId].join(),\r\n );\r\n\r\n const assignedSectionsToUser = sectionAssignments\r\n .filter((assignment) => assignment.userId === currentUserId)\r\n .reduce(\r\n (arr, assigment) => ({ ...arr, [assigment.sectionId]: true }),\r\n {},\r\n );\r\n\r\n return this.merge({\r\n data: {\r\n sectionAssignments,\r\n assignedSectionsToUser,\r\n },\r\n });\r\n }\r\n\r\n updateSectionAssignmentListForBulkUnAssignFromSocket({\r\n sectionAssignmentListPayload,\r\n currentUserId,\r\n }) {\r\n //unassign all - remove sectionAssignments whose section ids are passed in payload.\r\n const sectionAssignments = this.sectionAssignments.filter(\r\n (assignment) =>\r\n !sectionAssignmentListPayload.includes(assignment.sectionId),\r\n );\r\n\r\n const assignedSectionsToUser = sectionAssignments\r\n .filter((assignment) => assignment.userId === currentUserId)\r\n .reduce(\r\n (arr, assigment) => ({ ...arr, [assigment.sectionId]: true }),\r\n {},\r\n );\r\n\r\n return this.merge({\r\n data: {\r\n sectionAssignments,\r\n assignedSectionsToUser,\r\n },\r\n });\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class StatementSummaryDisplayOptions extends BaseModel({\r\n verified: true,\r\n reviewed: true,\r\n unverified: true,\r\n signedOff: true,\r\n notes: true,\r\n note: true,\r\n flags: true,\r\n percentage: true,\r\n count: false,\r\n viewAll: true,\r\n workpaper: true,\r\n formula: true,\r\n internalRef: true,\r\n tickmarks: true,\r\n comfortLetter: true,\r\n}) {\r\n getDisplayOption(isOCR, optionDisplayObject) {\r\n let displayOptionsToSet;\r\n if (isOCR) {\r\n const { signedOff, ...rest } = optionDisplayObject;\r\n displayOptionsToSet = rest;\r\n } else {\r\n displayOptionsToSet = optionDisplayObject;\r\n }\r\n\r\n return displayOptionsToSet;\r\n }\r\n\r\n setIsComfortLetterEnabled(value) {\r\n return this.merge({\r\n comfortLetter: value,\r\n });\r\n }\r\n\r\n setDisplayOption({ key, isOCR }) {\r\n if (key === 'viewAll') {\r\n this[key] = !this[key];\r\n return this.setViewAllDisplayOptions(key, isOCR);\r\n }\r\n\r\n const optionDisplayObject = this.merge({\r\n [key]: !this[key],\r\n });\r\n\r\n const { count, percentage, viewAll, ...displayOptionsToSet } =\r\n this.getDisplayOption(isOCR, optionDisplayObject);\r\n\r\n const displayOptionsToCheckLength = Object.keys(\r\n displayOptionsToSet || {},\r\n ).length;\r\n\r\n let checkedCount = 0;\r\n let uncheckedCount = 0;\r\n\r\n Object.keys(displayOptionsToSet || {}).map((item) => {\r\n if (!displayOptionsToSet[item]) {\r\n uncheckedCount += 1;\r\n } else {\r\n checkedCount += 1;\r\n }\r\n });\r\n\r\n if (this.viewAll && displayOptionsToCheckLength === uncheckedCount) {\r\n this.viewAll = false;\r\n return this.setViewAllDisplayOptions('viewAll', isOCR);\r\n }\r\n\r\n if (!this.viewAll && displayOptionsToCheckLength === checkedCount) {\r\n this.viewAll = true;\r\n return this.setViewAllDisplayOptions('viewAll', isOCR);\r\n }\r\n\r\n return this.merge({\r\n [key]: !this[key],\r\n });\r\n }\r\n\r\n setViewAllDisplayOptions(key, isOCR) {\r\n if (this[key]) {\r\n const optionDisplayObject = {\r\n ...new StatementSummaryDisplayOptions(),\r\n count: this.count,\r\n };\r\n return this.merge(this.getDisplayOption(isOCR, optionDisplayObject));\r\n }\r\n const optionDisplayObject = {\r\n verified: false,\r\n reviewed: false,\r\n unverified: false,\r\n signedOff: false,\r\n notes: false,\r\n note: false,\r\n flags: false,\r\n percentage: true,\r\n count: this.count,\r\n viewAll: false,\r\n workpaper: false,\r\n formula: false,\r\n internalRef: false,\r\n tickmarks: false,\r\n comfortLetter: false,\r\n };\r\n return this.merge(this.getDisplayOption(isOCR, optionDisplayObject));\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class ComfortLetter extends BaseModel({\r\n revisionId: null,\r\n elementId: null,\r\n customLabel: '',\r\n description: '',\r\n descriptionRichText: '',\r\n comfortLetterCreatedBy: null,\r\n comfortLetterCreatedDate: null,\r\n elementComfortLetterCreatedBy: null,\r\n elementComfortLetterCreatedDate: null,\r\n comfortLetterId: null,\r\n elementCount: 0,\r\n}) {\r\n convertApiResponsetoComfortLetterModelFormat(apiResponse) {\r\n return this.merge({\r\n revisionId: apiResponse.revisionId,\r\n elementId: apiResponse.elementId,\r\n customLabel: apiResponse.label,\r\n description: apiResponse.text,\r\n descriptionRichText: apiResponse.richText,\r\n comfortLetterCreatedBy: apiResponse.comfortLetterCreatedBy,\r\n comfortLetterCreatedDate: apiResponse.comfortLetterCreatedDate,\r\n elementComfortLetterCreatedBy: apiResponse.elementcomfortLetterCreatedBy,\r\n elementComfortLetterCreatedDate:\r\n apiResponse.elementcomfortLetterCreatedDate,\r\n comfortLetterId: apiResponse.comfortLetterId\r\n ? apiResponse.comfortLetterId\r\n : apiResponse.id,\r\n elementCount: apiResponse.elementCount,\r\n });\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\nexport default class Zoom extends BaseModel({\r\n currentZoom: 100, // default\r\n maxZoom: 500,\r\n minZoom: 10,\r\n stepValue: 10,\r\n}) {\r\n get zoomRatio() {\r\n return this.currentZoom / 100;\r\n }\r\n incrementZoom() {\r\n let newZoomValue = this.currentZoom + this.stepValue;\r\n if (newZoomValue > this.maxZoom) {\r\n newZoomValue = this.maxZoom;\r\n }\r\n\r\n return this.merge({ currentZoom: newZoomValue });\r\n }\r\n\r\n decrementZoom() {\r\n let newZoomValue = this.currentZoom - this.stepValue;\r\n if (newZoomValue < this.minZoom) {\r\n newZoomValue = this.minZoom;\r\n }\r\n\r\n return this.merge({ currentZoom: newZoomValue });\r\n }\r\n\r\n disableIncrement() {\r\n return this.currentZoom >= this.maxZoom;\r\n }\r\n\r\n disableDecrement() {\r\n return this.currentZoom <= this.minZoom;\r\n }\r\n}\r\n","import {\r\n withDefaultContextAsSelectedProjectDocChat,\r\n withDefaultContextAsSelectedProject,\r\n} from './api-default-context';\r\nimport { getDocChatHeaders } from 'api/docChat-api-client';\r\n\r\nexport const sendChatBotUserResponse = async ({ userResponse }) => {\r\n const docChatHeaders = await getDocChatHeaders();\r\n\r\n return withDefaultContextAsSelectedProjectDocChat()\r\n .post('/api/chat/chat_message/', userResponse, {\r\n headers: docChatHeaders,\r\n })\r\n .then((response) => {\r\n return response.data; // Return the response data\r\n })\r\n .catch((error) => {\r\n throw error; // Re-throw the error to be handled by the caller\r\n });\r\n};\r\n\r\nexport const chatBotPushIndexRequest = (pushIndexData = {}) => {\r\n return new Promise((resolve, reject) => {\r\n // Use setTimeout to mimic a delay\r\n setTimeout(() => {\r\n // Resolve the promise with the provided data after the specified delay\r\n resolve({ name: 'aarya' });\r\n }, 2000);\r\n });\r\n};\r\n\r\nexport const submitChatbotResponseFeedback = async (requestparams) => {\r\n const docChatHeaders = await getDocChatHeaders();\r\n\r\n return withDefaultContextAsSelectedProjectDocChat()\r\n .post('/api/chat/submit_feedback/', requestparams, {\r\n headers: docChatHeaders,\r\n })\r\n .then((response) => {\r\n return response.data; // Return the response data\r\n })\r\n .catch((error) => {\r\n throw error; // Re-throw the error to be handled by the caller\r\n });\r\n};\r\n\r\nexport const getDocumentIndexingStatus = async (fileKey) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(`/tieout/doc-chat/details/${fileKey}`)\r\n .then((response) => {\r\n return response.data;\r\n })\r\n .catch((error) => {\r\n throw error;\r\n });\r\n};\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setDisplayOptionAction = createAction(\r\n 'SET_STATEMENT_SUMMARY_DISPLAY_OPTION',\r\n);\r\n\r\nexport const setIsComfortLetterEnabledAction = createAction(\r\n 'SET_COMFORT_LETTER_ENABLED_FILTER_OPTION',\r\n);\r\n","import {\r\n getLanguageData,\r\n getUserPreferredLanguage,\r\n updateUserPreferredLanguage,\r\n} from 'api/statement-creation-page-data-api';\r\nimport {\r\n EMPTY_STRING,\r\n TIME_TO_LIVE_FOR_LOCALE_LANGUAGE_JSON,\r\n clearLocaleMessagesFromLocalStorage,\r\n fireTieoutEventForLanguageUpdate,\r\n getMessagesForLocale,\r\n updateLocaleMessageInStorage,\r\n} from 'constants/common/feature-common-utils';\r\nimport { createAction } from 'redux-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const setLocale = createAction('SET_LOCALE');\r\n\r\n// export const setLocaleMessage = createAction('SET_LOCALE_MESSAGE');\r\n// export const clearLocaleMessage = createAction('CLEAR_LOCALE_MESSAGE');\r\n\r\nexport const fetchAndUpdateLocaleMessage = () => async (dispatch, getState) => {\r\n const { ui: { locale } = {} } = getState();\r\n const localeMessages = getMessagesForLocale(locale);\r\n if (\r\n locale &&\r\n // if messages does not exist or it has expired for specific locale then only we want to make api call.\r\n !(\r\n localeMessages &&\r\n localeMessages.data &&\r\n localeMessages.expiry > new Date().getTime()\r\n )\r\n ) {\r\n try {\r\n const response = await getLanguageData(locale);\r\n\r\n // append time to live with locale message\r\n const localeMessagesWithTTL = {\r\n data: response,\r\n expiry: new Date().getTime() + TIME_TO_LIVE_FOR_LOCALE_LANGUAGE_JSON,\r\n };\r\n\r\n updateLocaleMessageInStorage(locale, localeMessagesWithTTL);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n }\r\n};\r\n\r\nexport const fetchUserPreferredLanguageAndUpdateLocale =\r\n () => async (dispatch, getState) => {\r\n const {\r\n data: { currentUser },\r\n ui: { locale },\r\n } = getState();\r\n try {\r\n // get user preferred language\r\n const userSelectedLanguageResponse = await getUserPreferredLanguage({\r\n userId: currentUser.data.id,\r\n });\r\n const selectedLanguage =\r\n (userSelectedLanguageResponse &&\r\n userSelectedLanguageResponse.languageCode === EMPTY_STRING) ||\r\n isNullOrUndefined(userSelectedLanguageResponse) ||\r\n isNullOrUndefined(\r\n userSelectedLanguageResponse &&\r\n userSelectedLanguageResponse.languageCode,\r\n )\r\n ? 'en-US'\r\n : userSelectedLanguageResponse.languageCode;\r\n // clear existing/old locale data and update new locale in redux\r\n await dispatch(\r\n setNewLocaleAndClearOldLocaleFromStorage({\r\n oldLocale: locale,\r\n newLocale: selectedLanguage,\r\n }),\r\n );\r\n } catch (err) {\r\n console.error('An error occured while fetching user preferred language');\r\n console.error(err);\r\n }\r\n };\r\n\r\nexport const savePreferredLanguageAndUpdateLocale =\r\n ({ selectedLanguage, userId }) =>\r\n async (dispatch, getState) => {\r\n try {\r\n // update user preferred language\r\n await updateUserPreferredLanguage({\r\n languageCode: selectedLanguage,\r\n });\r\n const { ui: { locale } = {} } = getState();\r\n // clear existing/old locale data and update new locale in redux\r\n await dispatch(\r\n setNewLocaleAndClearOldLocaleFromStorage({\r\n oldLocale: locale,\r\n newLocale: selectedLanguage,\r\n }),\r\n );\r\n // fire event so that DA header can update the label messages accordingly\r\n fireTieoutEventForLanguageUpdate();\r\n } catch (ex) {\r\n console.error('Error occured while updating user preferred language');\r\n console.error(ex);\r\n }\r\n };\r\n\r\nexport const setNewLocaleAndClearOldLocaleFromStorage =\r\n ({ oldLocale, newLocale }) =>\r\n async (dispatch, getState) => {\r\n // clear existing/old locale data if it exists and does not matches with user preference\r\n newLocale !== oldLocale && clearLocaleMessagesFromLocalStorage(oldLocale);\r\n // update locale in redux, this will also fetch the translations for that\r\n // language and update UI screens\r\n await dispatch(setLocale(newLocale));\r\n };\r\n","import {\r\n checkIfPolygonIsInsideAnotherPolygon,\r\n checkIsArrayOfArrays,\r\n} from 'utils/ocr-text-selection-utils';\r\nconst MAX_POLYGON_WIDTH = 5;\r\nconst PADDING = 6;\r\n\r\nexport const getElementBoundaryInfo = (polygonInPixel, extraHeight = 0) => {\r\n const width = polygonInPixel[2] - polygonInPixel[0];\r\n const height = polygonInPixel[7] - polygonInPixel[1];\r\n\r\n const polygonWidth = width > MAX_POLYGON_WIDTH ? width : width + PADDING;\r\n const polygonHeight =\r\n height > MAX_POLYGON_WIDTH\r\n ? height + extraHeight\r\n : height + PADDING + extraHeight;\r\n const polygonTop =\r\n height > MAX_POLYGON_WIDTH\r\n ? polygonInPixel[1]\r\n : polygonInPixel[1] - PADDING / 2;\r\n const polygonLeft =\r\n width > MAX_POLYGON_WIDTH\r\n ? polygonInPixel[0]\r\n : polygonInPixel[0] - PADDING / 2;\r\n return { polygonWidth, polygonHeight, polygonLeft, polygonTop };\r\n};\r\n\r\nexport const isPolygonExistInElementList = (\r\n elementList,\r\n polygonInPixel,\r\n scaleWithZoom,\r\n) => {\r\n let isElementFound = false;\r\n let isPolyExistInElementList = false;\r\n let elementId = null;\r\n const elementListLength = elementList.length;\r\n for (let i = 0; i < elementListLength; i++) {\r\n const {\r\n coordinatesInPixel: elementPolygon,\r\n isIncluded,\r\n id,\r\n } = elementList[i];\r\n const isArrayOfPolygons = checkIsArrayOfArrays(elementPolygon);\r\n if (isIncluded) {\r\n if (isArrayOfPolygons) {\r\n for (let j = 0; j < elementPolygon.length; j++) {\r\n const outerPolygonInPixel = elementPolygon[j].map((coord) => {\r\n return parseFloat(coord) * scaleWithZoom;\r\n });\r\n const {\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n outerPolygonInPixel[0],\r\n outerPolygonInPixel[1],\r\n outerPolygonInPixel[4],\r\n outerPolygonInPixel[5],\r\n polygonInPixel[0],\r\n polygonInPixel[1],\r\n polygonInPixel[4],\r\n polygonInPixel[5],\r\n );\r\n isElementFound =\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle;\r\n if (isElementFound) {\r\n isPolyExistInElementList = true;\r\n elementId = id;\r\n break;\r\n }\r\n }\r\n break;\r\n } else {\r\n const outerPolygonInPixel = elementPolygon.map((coord) => {\r\n return parseFloat(coord) * scaleWithZoom;\r\n });\r\n const {\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n outerPolygonInPixel[0],\r\n outerPolygonInPixel[1],\r\n outerPolygonInPixel[4],\r\n outerPolygonInPixel[5],\r\n polygonInPixel[0],\r\n polygonInPixel[1],\r\n polygonInPixel[4],\r\n polygonInPixel[5],\r\n );\r\n isElementFound =\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle;\r\n if (isElementFound) {\r\n isPolyExistInElementList = true;\r\n elementId = id;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return { isElement: isPolyExistInElementList, elementId };\r\n};\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\nimport ApiModel from 'models/api-model';\r\nimport SectionContentModel from 'models/api/section-content-api-model';\r\nimport SectionContentModelOCR from 'models/api/section-content-api-model-ocr-image';\r\n\r\n/**\r\n * A cache made up of SectionContentModels\r\n * the map property stores SectionContentModels by their `sectionId`\r\n */\r\nexport class LeftSectionCache extends ApiModel({\r\n data: {\r\n map: {}, // { [sectionId]: SectionContentModel, ... }\r\n leftSideView: true,\r\n },\r\n status: null,\r\n}) {\r\n get map() {\r\n if (this.data && this.data.map) {\r\n return this.data.map;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response, isOCR }) {\r\n let _instantiatedMap = {};\r\n if (isOCR) {\r\n response.data.forEach(({ sectionId }, index) => {\r\n const sectionContent = new SectionContentModelOCR();\r\n _instantiatedMap[sectionId] = sectionContent.setLoading();\r\n });\r\n } else {\r\n response.data.forEach((id, index) => {\r\n const prevSectionId = response.data[index - 1];\r\n const nextSectionId = response.data[index + 1];\r\n const _sectionModel = new SectionContentModel();\r\n _instantiatedMap[id] = _sectionModel.setLinkedSectionIds({\r\n prevSectionId,\r\n nextSectionId,\r\n leftSideView: true,\r\n });\r\n });\r\n }\r\n return {\r\n data: {\r\n map: _instantiatedMap,\r\n leftSideView: true,\r\n },\r\n };\r\n }\r\n\r\n get(id) {\r\n return this.map[id];\r\n }\r\n\r\n /**\r\n * Reducer function that should be called by section load(ed/ing) reducer functions below\r\n *\r\n * @param {Object} updatedSectionsMap object map of SectionContentModels to merge into the map\r\n */\r\n _mergeSections(updatedSectionsMap) {\r\n return this.merge({\r\n data: {\r\n map: {\r\n ...this.data.map,\r\n ...updatedSectionsMap,\r\n },\r\n },\r\n });\r\n }\r\n\r\n mergeSectionsLoadedWithoutResponse(sectionIdList) {\r\n const loadedSectionMap = {};\r\n sectionIdList.forEach((section) => {\r\n this.ensureSectionIdPresent(section);\r\n loadedSectionMap[section] =\r\n this.data.map[section].setLoadedWithoutResponse();\r\n });\r\n return this._mergeSections(loadedSectionMap);\r\n }\r\n\r\n /**\r\n * Reducer function for setting sections to loaded in the map\r\n * @param {Array} sections array of Section objects\r\n */\r\n mergeSectionsLoaded({ response, searchTerm }) {\r\n const loadedSectionMap = {};\r\n response.data.forEach((section) => {\r\n this.ensureSectionIdPresent(section.sectionId);\r\n section.searchTerm = searchTerm;\r\n loadedSectionMap[section.sectionId] =\r\n this.data.map[section.sectionId].setLoaded(section);\r\n });\r\n return this._mergeSections(loadedSectionMap);\r\n }\r\n\r\n /**\r\n * Ensures section ids are present in the map and throws error otherwise\r\n * @param {int} id sectionId\r\n */\r\n ensureSectionIdPresent(id) {\r\n if (this.data && this.data.map && isNullOrUndefined(this.data.map[id])) {\r\n this.data = this._mergeSections({\r\n [id]: new SectionContentModel(),\r\n });\r\n }\r\n }\r\n /**\r\n * Reducer function for setting loaded on given `section` response object\r\n * @param {int} param.section section object to set loaded on\r\n */\r\n setSectionLoaded(section) {\r\n return this._mergeSections({\r\n [section.sectionId]: this.data.map[section.sectionId].setLoaded(section),\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting loading on sections with ids present in the `sectionIdList`\r\n * @param {Array} sectionIdList array of ids to update loading\r\n */\r\n mergeSectionsLoading(sectionIdList) {\r\n let loadingSectionsMap = {};\r\n sectionIdList.forEach((id) => {\r\n this.ensureSectionIdPresent(id);\r\n loadingSectionsMap[id] = this.data.map[id].setLoading();\r\n });\r\n return this._mergeSections(loadingSectionsMap);\r\n }\r\n\r\n /**\r\n * Reducer function for setting loading on given `sectionId`\r\n * @param {int} param.sectionId section id to set loading on\r\n */\r\n setSectionLoading({ sectionId }) {\r\n this.ensureSectionIdPresent(sectionId);\r\n return this._mergeSections({\r\n [sectionId]: this.data.map[sectionId].setLoading(),\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for removing section content for all ids passed\r\n *\r\n * @param {int[]} param.removedSectionIds array of ids to clear content of in map\r\n */\r\n clearSectionContentFromMap({ removedSectionIds }) {\r\n let _clearedSectionsMap = {};\r\n removedSectionIds.forEach((id) => {\r\n this.ensureSectionIdPresent(id);\r\n _clearedSectionsMap[id] =\r\n !isNullOrUndefined(id) &&\r\n this.data.map[id] &&\r\n this.data.map[id].clearContent();\r\n });\r\n return this._mergeSections(_clearedSectionsMap);\r\n }\r\n\r\n mergeOCRSectionLoaded(section) {\r\n const map = {};\r\n map[section.sectionId] =\r\n this.data.map[section.sectionId].setLoaded(section);\r\n return this._mergeSections(map);\r\n }\r\n\r\n clearLeftSectionImageContentFromMap({ removedSectionIds }) {\r\n let _clearedSectionsMap = {};\r\n removedSectionIds.forEach((id) => {\r\n this.ensureSectionIdPresent(id);\r\n _clearedSectionsMap[id] = this.data.map[id].clearImageContent();\r\n });\r\n return this._mergeSections(_clearedSectionsMap);\r\n }\r\n}\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\nimport { formatTieoutSelectorForApi } from 'constants/feature/notes-panel-constants';\r\n\r\nexport default class NoteSelection {\r\n revisionId;\r\n sectionId;\r\n revisionNumber;\r\n selectedText;\r\n selector;\r\n endSelector;\r\n offset;\r\n endOffset;\r\n length;\r\n hasElement;\r\n ocrSelector;\r\n isOCR;\r\n elementId;\r\n constructor(data) {\r\n if (!isNullOrUndefined(data)) {\r\n this.revisionId = data.revisionId;\r\n this.sectionId = data.sectionId;\r\n this.revisionNumber = data.revisionNumber;\r\n this.selectedText = data.selectedText;\r\n this.length = data.length;\r\n this.hasElement = data.hasElement;\r\n this.selector = data.selector;\r\n this.isOCR = data.isOCR;\r\n if (data.isOCR) {\r\n this.elementId = data.elementId;\r\n this.ocrSelector = {\r\n postText: data.postText,\r\n preText: data.preText,\r\n contextLabel: data.contextLabel,\r\n polygon: data.polygon,\r\n };\r\n } else {\r\n this.endSelector = data.endSelector;\r\n this.offset = data.offset;\r\n this.endOffset = data.endOffset;\r\n }\r\n }\r\n }\r\n\r\n hasSelection() {\r\n return !isNullOrUndefined(this.selectedText);\r\n }\r\n\r\n toApiFormat() {\r\n return this.isOCR\r\n ? this\r\n : {\r\n ...this,\r\n selector: formatTieoutSelectorForApi({ selector: this.selector }),\r\n endSelector: formatTieoutSelectorForApi({\r\n selector: this.endSelector,\r\n }),\r\n };\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport class BlacklineGuidList extends ApiModel({\r\n data: [],\r\n status: null,\r\n}) {\r\n processResponse({ response }) {\r\n return {\r\n data: response.data.result,\r\n status: response.status,\r\n };\r\n }\r\n get guidList() {\r\n return this.data;\r\n }\r\n\r\n get isGuidListEmpty() {\r\n return this.isLoaded && !this.data.length;\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class BlacklineDetails extends BaseModel({\r\n type: null,\r\n content: null,\r\n polygon: null,\r\n}) {\r\n setLoadedFromBlacklineData({ type, content, polygon }) {\r\n return this.merge({\r\n type,\r\n content,\r\n polygon,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport BlacklineDetails from 'models/api/blackline-detail-api-model';\r\n\r\nexport default class BlacklineDataBySectionMap extends ApiModel({\r\n data: {\r\n blacklineChanges: [],\r\n sectionId: null,\r\n },\r\n}) {\r\n get blacklineDetails() {\r\n return this.data;\r\n }\r\n processResponse({ response, sectionId }) {\r\n const blacklineChanges = [];\r\n response.data.forEach((blacklineData) => {\r\n const blacklineDetail = new BlacklineDetails().setLoadedFromBlacklineData(\r\n {\r\n ...blacklineData,\r\n },\r\n );\r\n blacklineChanges.push(blacklineDetail);\r\n });\r\n return {\r\n data: {\r\n blacklineChanges,\r\n sectionId,\r\n },\r\n };\r\n }\r\n\r\n clearBlacklineContent() {\r\n return this.merge({\r\n isLoaded: false,\r\n isLoading: true,\r\n data: {\r\n ...this.data,\r\n blacklineChanges: [],\r\n },\r\n });\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\nimport BlacklineDataBySectionMap from 'models/api/blackline-data-by-section-map';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class BlacklineCache extends BaseModel({}) {\r\n getSection(sectionId) {\r\n return this[sectionId];\r\n }\r\n\r\n hasSection(sectionId) {\r\n const sectionMap = this.getSection(sectionId);\r\n return !isNullOrUndefined(sectionMap);\r\n }\r\n\r\n setSectionError({ sectionId, error }) {\r\n let errorSection;\r\n if (this.hasSection(sectionId)) {\r\n errorSection = this.getSection(sectionId).setError(error);\r\n } else {\r\n errorSection = new BlacklineDataBySectionMap().setError(error);\r\n }\r\n return this.merge({\r\n [sectionId]: errorSection,\r\n });\r\n }\r\n\r\n setSectionLoading({ sectionId }) {\r\n let loadingSection = this.getSection(sectionId);\r\n if (!loadingSection || (loadingSection && !loadingSection.isLoaded)) {\r\n if (this.hasSection(sectionId)) {\r\n loadingSection = this.getSection(sectionId).setLoading();\r\n } else {\r\n loadingSection = new BlacklineDataBySectionMap().setLoading();\r\n }\r\n }\r\n return this.merge({\r\n [sectionId]: loadingSection,\r\n });\r\n }\r\n\r\n setSectionLoaded({ response, sectionId }) {\r\n let loadedSection;\r\n if (this.hasSection(sectionId)) {\r\n loadedSection = this.getSection(sectionId).setLoaded({\r\n response,\r\n sectionId,\r\n });\r\n } else {\r\n loadedSection = new BlacklineDataBySectionMap().setLoaded({\r\n response,\r\n sectionId,\r\n });\r\n }\r\n\r\n return this.merge({\r\n [sectionId]: loadedSection,\r\n });\r\n }\r\n\r\n clearSectionBySectionIds({ removedSectionIds }) {\r\n let _clearedSectionsMap = {};\r\n removedSectionIds.forEach((id) => {\r\n if (this[id]) _clearedSectionsMap[id] = this[id].clearBlacklineContent();\r\n });\r\n\r\n return this.merge({\r\n ...this,\r\n ..._clearedSectionsMap,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport Note from 'models/data/note-model';\r\n\r\nexport default class NotesBySectionMap extends ApiModel({\r\n data: {\r\n notes: {\r\n /*\r\n {\r\n [noteId]: Note,\r\n ...\r\n }\r\n */\r\n },\r\n elementNotes: {\r\n /*\r\n [elementId]: Note\r\n */\r\n },\r\n pseudoNotes: {\r\n /*\r\n [pseudoElementId]: Note\r\n */\r\n },\r\n sectionId: null,\r\n },\r\n}) {\r\n get notes() {\r\n if (!isNullOrUndefined(this.data) && this.data.notes) {\r\n return this.data.notes;\r\n }\r\n return {};\r\n }\r\n\r\n get elementNotes() {\r\n if (!isNullOrUndefined(this.data) && this.data.elementNotes) {\r\n return this.data.elementNotes;\r\n }\r\n return {};\r\n }\r\n\r\n get pseudoNotes() {\r\n if (!isNullOrUndefined(this.data) && this.data.pseudoNotes) {\r\n return this.data.pseudoNotes;\r\n }\r\n return {};\r\n }\r\n\r\n get sectionId() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.sectionId;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse({ response, sectionId }) {\r\n let notes = {};\r\n let elementNotes = {};\r\n let pseudoNotes = {};\r\n response.data.result.forEach((noteData) => {\r\n const { elementId, noteId, pseudoElementId } = noteData;\r\n const noteModel = new Note(noteData);\r\n if (!isNullOrUndefined(pseudoElementId) && pseudoElementId !== -1) {\r\n pseudoNotes[pseudoElementId] = noteModel;\r\n } else {\r\n elementNotes[elementId] = noteModel;\r\n notes[noteId] = noteModel;\r\n }\r\n });\r\n return {\r\n data: {\r\n notes,\r\n elementNotes,\r\n pseudoNotes,\r\n sectionId,\r\n },\r\n };\r\n }\r\n\r\n getNote(noteId) {\r\n return this.notes[noteId];\r\n }\r\n\r\n getPseudoNote(pseudoElementId) {\r\n return this.pseudoNotes[pseudoElementId];\r\n }\r\n\r\n hasNote(noteId) {\r\n return !isNullOrUndefined(this.notes[noteId]);\r\n }\r\n\r\n hasElementNote(elementId) {\r\n return !isNullOrUndefined(this.elementNotes[elementId]);\r\n }\r\n\r\n hasPseudoNote(pseudoElementId) {\r\n return !isNullOrUndefined(this.pseudoNotes[pseudoElementId]);\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\nimport NotesBySectionMap from 'models/api/notes-by-section-map';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport cloneDeep from 'lodash.clonedeep';\r\nimport Note from 'models/data/note-model';\r\n\r\nexport default class NoteCache extends BaseModel({\r\n /* \r\n { \r\n [sectionId]: NotesBySectionMap,\r\n ...\r\n }\r\n*/\r\n}) {\r\n /**\r\n * Reducer function for setting error on specific sections when their request fail\r\n * @param {int} param.sectionId\r\n * @param {object} param.error\r\n */\r\n setSectionError({ sectionId, error }) {\r\n let errorSection;\r\n if (this.hasSection(sectionId)) {\r\n errorSection = this.getSection(sectionId).setError(error);\r\n } else {\r\n errorSection = new NotesBySectionMap().setError(error);\r\n }\r\n return this.merge({\r\n [sectionId]: errorSection,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting loading on specific sections\r\n * @param {int} param.sectionId\r\n */\r\n setSectionLoading({ sectionId }) {\r\n let loadingSection;\r\n if (this.hasSection(sectionId)) {\r\n loadingSection = this.getSection(sectionId).setLoading();\r\n } else {\r\n loadingSection = new NotesBySectionMap().setLoading();\r\n }\r\n return this.merge({\r\n [sectionId]: loadingSection,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting the note data by section id\r\n * @param {int} param.sectionId\r\n * @param {object} param.response\r\n */\r\n setSectionLoaded({ response, sectionId }) {\r\n let loadedSection;\r\n if (this.hasSection(sectionId)) {\r\n loadedSection = this.getSection(sectionId).setLoaded({\r\n response,\r\n sectionId,\r\n });\r\n } else {\r\n loadedSection = new NotesBySectionMap().setLoaded({\r\n response,\r\n sectionId,\r\n });\r\n }\r\n\r\n return this.merge({\r\n [sectionId]: loadedSection,\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for clearing section note data\r\n * @param {int[]} param.removedSectionIds\r\n */\r\n clearSections({ removedSectionIds }) {\r\n const newMap = { ...this };\r\n removedSectionIds.forEach((id) => {\r\n delete newMap[id];\r\n });\r\n\r\n // cannot use `this.merge` because we are REMOVING ids from the map\r\n // merge would not remove the ids we want to remove\r\n return new NoteCache(newMap);\r\n }\r\n\r\n hasSection(sectionId) {\r\n const sectionMap = this.getSection(sectionId);\r\n return !isNullOrUndefined(sectionMap);\r\n }\r\n\r\n getSection(sectionId) {\r\n return this[sectionId];\r\n }\r\n\r\n getPseudoNote({ sectionId, pseudoElementId }) {\r\n if (this.hasSection(sectionId)) {\r\n return this.getSection(sectionId).getPseudoNote(pseudoElementId);\r\n }\r\n return null;\r\n }\r\n\r\n removeNoteFromCacheFromSocketPayload(payload) {\r\n const { pseudoElementId, sectionId } = payload;\r\n const noteCacheCopy = cloneDeep(this);\r\n\r\n if (\r\n noteCacheCopy[sectionId] &&\r\n noteCacheCopy[sectionId].data.pseudoNotes[pseudoElementId]\r\n ) {\r\n delete noteCacheCopy[sectionId].data.pseudoNotes[pseudoElementId];\r\n }\r\n\r\n return this.merge({ [sectionId]: noteCacheCopy[sectionId] });\r\n }\r\n\r\n updateNoteFromCacheFromSocketpayload(payload) {\r\n const { pseudoElementId, sectionId } = payload;\r\n const noteCacheCopy = cloneDeep(this);\r\n\r\n if (\r\n noteCacheCopy[sectionId] &&\r\n noteCacheCopy[sectionId].data.pseudoNotes[pseudoElementId]\r\n ) {\r\n let note = noteCacheCopy[sectionId].data.pseudoNotes[pseudoElementId];\r\n note = {\r\n ...note,\r\n elementId: payload.elementId,\r\n noteType: payload.noteType,\r\n workflowStatus: payload.workflowStatus,\r\n closedBy: payload.closedBy,\r\n closedByName: payload.closedByName,\r\n body: payload.body,\r\n noteDate: payload.noteDate,\r\n closedDate: payload.closedDate,\r\n noteTaker: payload.noteTaker,\r\n noteTakerName: payload.noteTakerName,\r\n notePriorityType: payload.notePriorityType,\r\n revisionNumber: payload.revisionNumber,\r\n };\r\n noteCacheCopy[sectionId].data.pseudoNotes[pseudoElementId] = new Note(\r\n note,\r\n );\r\n }\r\n\r\n return this.merge({ [sectionId]: noteCacheCopy[sectionId] });\r\n }\r\n}\r\n","import React, { useEffect } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { STATEMENT_PSEUDO_ELEMENT_ID_PREFIX } from 'constants/feature/statement-content-constants';\r\nimport {\r\n getNoteStatusIcon,\r\n getNoteStatusColor,\r\n} from 'constants/feature/notes-panel-constants';\r\nimport Note from 'models/data/note-model';\r\n\r\nimport AnnotationDisplayOptions from 'models/data/annotation-display-filter-options-model';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\n\r\nexport const NOTE_ANCHOR_BLOCK = 'note-anchor';\r\nconst ICON_SIZE = '20';\r\nconst BORDER_THICKNESS = '1px';\r\n\r\nconst handleHighlightNote = ({\r\n className,\r\n isNoteNew,\r\n onHover,\r\n panelSelected,\r\n changeIsNewPropertyFromSelectedNote,\r\n}) => {\r\n // if a note is created that spans multiple html elements, each of those elements\r\n // ends up with a pseudo note span.CFTO_PSEUDO_ELEMENT_.CFTO_PSEUDO_ELEMENT__\r\n // first we find all pseudo note parts for this specific note\r\n const pseudoNoteIdClass = String(className)\r\n .split(' ')\r\n .find((c) => c.includes(STATEMENT_PSEUDO_ELEMENT_ID_PREFIX));\r\n const allNoteParts = document.querySelectorAll(`.${pseudoNoteIdClass}`);\r\n if (allNoteParts.length > 0) {\r\n for (let i = 0; i < allNoteParts.length; i++) {\r\n allNoteParts[i].classList.add(\r\n panelSelected ? 'panel-selected' : 'highlight',\r\n );\r\n if (onHover) {\r\n allNoteParts[i].classList.add('hover-highlight');\r\n } else {\r\n allNoteParts[i].classList.remove('hover-highlight');\r\n allNoteParts[i].classList.add('highlight');\r\n }\r\n if (isNoteNew) {\r\n allNoteParts[i].classList.add('created-note');\r\n document.addEventListener(\r\n 'click',\r\n (e) => {\r\n if (!e.ctrlKey) {\r\n allNoteParts[i].classList.remove('created-note');\r\n if (typeof changeIsNewPropertyFromSelectedNote === 'function') {\r\n // set the isNew property of the selected Note as false when user clicks away\r\n changeIsNewPropertyFromSelectedNote(false);\r\n }\r\n }\r\n },\r\n {\r\n once: true,\r\n },\r\n );\r\n }\r\n }\r\n }\r\n};\r\n// clear highlight when the user is not hovering over note icon\r\nconst handleRemoveNoteHighlight = (options = {}) => {\r\n const { className, isNoteSelected } = options;\r\n let querySelector = '';\r\n if (className) {\r\n querySelector = String(className)\r\n .split(' ')\r\n .find((c) => c.includes(STATEMENT_PSEUDO_ELEMENT_ID_PREFIX));\r\n } else {\r\n querySelector = 'highlight';\r\n }\r\n const allNoteParts = document.querySelectorAll(`.${querySelector}`);\r\n if (allNoteParts.length > 0) {\r\n for (let i = 0; i < allNoteParts.length; i++) {\r\n if (!isNoteSelected) {\r\n allNoteParts[i].classList.remove('highlight');\r\n allNoteParts[i].classList.remove('created-note');\r\n allNoteParts[i].classList.remove('hover-highlight');\r\n allNoteParts[i].classList.remove('panel-selected');\r\n } else {\r\n allNoteParts[i].classList.remove('hover-highlight');\r\n }\r\n }\r\n }\r\n};\r\n\r\nconst NoteAnchor = ({\r\n id,\r\n onNoteClick,\r\n children,\r\n className,\r\n pseudoElementId,\r\n note,\r\n isNoteSelected,\r\n selectMode,\r\n isNoteNew,\r\n panelSelected,\r\n isNotesPanelOpen,\r\n changeIsNewPropertyFromSelectedNote,\r\n annotationDisplayOptions,\r\n handleNoteClick,\r\n isCursorAlias,\r\n shouldNotesDisabled,\r\n displayElementDetailsOnStatementPage,\r\n}) => {\r\n useEffect(() => {\r\n if (isNoteSelected) {\r\n handleHighlightNote({\r\n className,\r\n isNoteNew,\r\n panelSelected,\r\n changeIsNewPropertyFromSelectedNote,\r\n });\r\n } else {\r\n handleRemoveNoteHighlight({ className });\r\n }\r\n }, [\r\n changeIsNewPropertyFromSelectedNote,\r\n className,\r\n isNoteNew,\r\n isNoteSelected,\r\n panelSelected,\r\n isNotesPanelOpen,\r\n ]);\r\n useEffect(() => {\r\n if (!isNotesPanelOpen) {\r\n handleRemoveNoteHighlight({ className });\r\n }\r\n }, [className, isNotesPanelOpen]);\r\n\r\n const iconProps = {\r\n className: `${NOTE_ANCHOR_BLOCK}__icon`,\r\n onClick: (event) => {\r\n handleNoteClick(event, selectMode, note, pseudoElementId, onNoteClick);\r\n },\r\n onMouseEnter: () => {\r\n handleHighlightNote({ className, onHover: true });\r\n },\r\n onMouseLeave: () => {\r\n handleRemoveNoteHighlight({ className, isNoteSelected });\r\n },\r\n height: ICON_SIZE,\r\n width: ICON_SIZE,\r\n };\r\n\r\n const notesCursor = {\r\n className: classnames(\r\n isCursorAlias && `${NOTE_ANCHOR_BLOCK}--cursor-alias`,\r\n shouldNotesDisabled && `${NOTE_ANCHOR_BLOCK}--disabled`,\r\n `${NOTE_ANCHOR_BLOCK}__icon`,\r\n ),\r\n closedPriorityClassName: `${NOTE_ANCHOR_BLOCK}__closed-priority`,\r\n };\r\n\r\n return !isElementReportPreviewPage(window.location.pathname) ? (\r\n <>\r\n {/*note anchor as sibling of content allows for easy icon hover styling */}\r\n \r\n {\r\n \r\n {children}\r\n \r\n }\r\n {displayElementDetailsOnStatementPage &&\r\n annotationDisplayOptions.note &&\r\n getNoteStatusIcon({ note, iconProps, notesCursor })}\r\n \r\n \r\n ) : (\r\n <>{children}\r\n );\r\n};\r\n\r\nNoteAnchor.propTypes = {\r\n /** unique html id for this note anchor (should be CFTO_PSEUDO_ELEMENT_XXXXXXX) */\r\n id: PropTypes.string.isRequired,\r\n /** function fired on click of this note anchor */\r\n onNoteClick: PropTypes.func.isRequired,\r\n /** Optional classname applied to top level wrapper element */\r\n className: PropTypes.string,\r\n /** Data model for this note */\r\n note: PropTypes.instanceOf(Note).isRequired,\r\n /** Indicates if note is selected */\r\n isNoteSelected: PropTypes.bool.isRequired,\r\n /** string value to determine which select mode is activated */\r\n selectMode: PropTypes.string,\r\n /* bool that indicates if a note is new */\r\n isNoteNew: PropTypes.bool,\r\n /* action to manually change the isNew property of the selected note */\r\n changeIsNewPropertyFromSelectedNote: PropTypes.func.isRequired,\r\n /** Obj containing display options from store */\r\n annotationDisplayOptions: PropTypes.instanceOf(AnnotationDisplayOptions),\r\n /** callback function which is used to handles the notes api call */\r\n handleNoteClick: PropTypes.func,\r\n};\r\n\r\nexport default NoteAnchor;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"defs\", null, React.createElement(\"path\", {\n d: \"M21.9916667,8.34166667 C21.7583333,8.10833333 21.4083333,8.10833333 21.175,8.34166667 L9.91666667,19.6 L6.24166667,15.925 C6.00833333,15.6916667 5.65833333,15.6916667 5.425,15.925 C5.19166667,16.1583333 5.19166667,16.5083333 5.425,16.7416667 L9.50833333,20.825 C9.625,20.9416667 9.8,21 9.91666667,21 C10.0333333,21 10.2083333,20.9416667 10.325,20.825 L21.9916667,9.15833333 C22.225,8.925 22.225,8.575 21.9916667,8.34166667 Z\",\n id: \"path-1\"\n}));\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Tick-Dropdown\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"mask\", {\n id: \"mask-2\",\n fill: \"white\"\n}, React.createElement(\"use\", {\n xlinkHref: \"#path-1\"\n})), React.createElement(\"use\", {\n id: \"IconTick\",\n fill: \"#00a3e0\",\n xlinkHref: \"#path-1\"\n}));\n\nvar SvgCheckmarkDropdown = function SvgCheckmarkDropdown(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCheckmarkDropdown, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/checkmarkDropdown.7a12b92e.svg\";\nexport { ForwardRef as ReactComponent };","export const getNumVisibleRows = ({\r\n dataModel,\r\n options,\r\n visibleRowsWhileLoading,\r\n visibleRowsForScroll,\r\n}) => {\r\n if (!dataModel.isLoaded) {\r\n return visibleRowsWhileLoading;\r\n } else if (options.length > 0) {\r\n return Math.min(visibleRowsForScroll, options.length);\r\n }\r\n return 1;\r\n};\r\n","/* eslint-disable eqeqeq */\r\nimport React, { memo } from 'react';\r\nimport shortid from 'shortid';\r\nimport ReactDOM from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { injectIntl, FormattedMessage } from 'react-intl';\r\nimport User from 'models/data/user-model';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport {\r\n focusNextMenuItem,\r\n focusPrevMenuItem,\r\n} from 'utils/menu-accessibility-utils';\r\nimport DataGrid from 'components/common/data-grid/data-grid-component';\r\nimport DataGridDataApi from 'models/utils/common/data-grid/data-grid-data-model';\r\nimport DataGridColumn from 'models/utils/common/data-grid/data-grid-column-model';\r\n\r\nimport { ReactComponent as CheckMark } from 'icons/checkmarkDropdown.svg';\r\nimport ConditionalRender from '../util/conditional-render-component';\r\nimport MenuApiData from 'models/utils/common/menu/menu-api-data-model';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport {\r\n SPACEBAR_KEY_CODE,\r\n TAB_KEY_CODE,\r\n ARROW_KEY_DOWN_CODE,\r\n ARROW_KEY_UP_CODE,\r\n} from 'constants/util/key-code-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { extractPropFromFunctionOrValue } from 'utils/object-utils';\r\nimport { ReactComponent as PlusIcon } from 'icons/plus.svg';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { getNumVisibleRows } from 'utils/menu-utility';\r\nimport Checkbox from 'components/common/checkbox-component';\r\n\r\nconst MENU_BLOCK = 'menu';\r\nconst CHECKMARK_SIZE = '18px';\r\n\r\nconst NUM_VISIBLE_ROWS_WHILE_LOADING = 4;\r\nconst MIN_NUM_VISIBLE_ROWS_FOR_SCROLL = 4;\r\nconst MIN_VALUE_LEFT_FOR_BOTTOM_VISIBILITY = 5;\r\nconst MENU_OPTION_HEIGHT = 45; // px\r\nconst DEFAULT_POP_UP_VIEWPORT_BOTTOM_THRESHOLD =\r\n NUM_VISIBLE_ROWS_WHILE_LOADING * MENU_OPTION_HEIGHT; // px, used in instance where no options are available to count\r\n\r\nconst MenuTypeDecider = (props) =>\r\n props.usePortal ? (\r\n {props.children}\r\n ) : (\r\n {props.children}\r\n );\r\n\r\nMenuTypeDecider.propTypes = {\r\n /** indicates if menu should use a react portal or normal child element implementation */\r\n usePortal: PropTypes.bool,\r\n};\r\n\r\n/**\r\n * Provides convenience methods necessary for page overflow logic shared by NormalMenu's and PortalMenus\r\n * Extends React.Component for the convenience of the class that extend it (since ES6 classes cannot extend mutliple classes)\r\n * but the render method _must_ be overwritten in any component that extends it\r\n */\r\nclass MenuHelper extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n top: 0,\r\n left: 'auto',\r\n bottom: 'auto',\r\n maxHeight: 'auto',\r\n right: 'auto',\r\n };\r\n this.scrollParent = null;\r\n }\r\n\r\n _getOverflowData = () => {\r\n const { wrapperRef, options, numberOfVisibleRows } = this.props;\r\n const defaultOverflow = {\r\n top: false,\r\n bottom: false,\r\n };\r\n if (isNullOrUndefined(this.scrollParent)) {\r\n // called from render method before scroll parent has been established\r\n return {\r\n window: defaultOverflow,\r\n scrollParent: defaultOverflow,\r\n };\r\n }\r\n let windowOverflow = defaultOverflow;\r\n let scrollParentOverflow = defaultOverflow;\r\n const boundingRect = wrapperRef.getBoundingClientRect();\r\n const menuHeight = isNullOrUndefined(numberOfVisibleRows)\r\n ? options.length * MENU_OPTION_HEIGHT\r\n : numberOfVisibleRows * MENU_OPTION_HEIGHT;\r\n const bottomThreshold = isNullOrUndefined(options)\r\n ? DEFAULT_POP_UP_VIEWPORT_BOTTOM_THRESHOLD\r\n : menuHeight;\r\n // window overflow detection\r\n const overflowTopOfPage = menuHeight > window.innerHeight;\r\n const overflowBottomOfPage =\r\n boundingRect.bottom + bottomThreshold + window.pageYOffset >\r\n document.documentElement.offsetHeight; //offsetHeight is the full page height (all scrollable area) NOT viewport height\r\n windowOverflow = {\r\n top: overflowTopOfPage,\r\n bottom: overflowBottomOfPage,\r\n };\r\n\r\n // TODO implement scrollParent overflow logic if necessary\r\n\r\n return {\r\n window: windowOverflow,\r\n scrollParent: scrollParentOverflow,\r\n };\r\n };\r\n\r\n /**\r\n * Copied from https://stackoverflow.com/a/42543908/9904038 which is a modified implementation\r\n * of jQueryUI's `scrollParent` function\r\n */\r\n getScrollParent = (element, includeHidden) => {\r\n let style = getComputedStyle(element);\r\n const excludeStaticParent = style.position === 'absolute';\r\n const overflowRegex = includeHidden\r\n ? /(auto|scroll|hidden)/\r\n : /(auto|scroll)/;\r\n\r\n if (style.position === 'fixed') return document.body;\r\n for (let parent = element; (parent = parent.parentElement); ) {\r\n style = getComputedStyle(parent);\r\n if (excludeStaticParent && style.position === 'static') {\r\n continue;\r\n }\r\n if (\r\n overflowRegex.test(style.overflow + style.overflowY + style.overflowX)\r\n )\r\n return parent;\r\n }\r\n\r\n return window;\r\n };\r\n\r\n // eslint-disable-next-line react/require-render-return\r\n render() {\r\n throw Error(\r\n \"Menu Provider's render method needs to be overwritten in the inheriting class\",\r\n );\r\n }\r\n}\r\n\r\nMenuHelper.propTypes = {\r\n /** Reference to drawer triggering element (needed to calculate menu position since implemented with portals) */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n /** Array of menu items */\r\n options: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.instanceOf(User)),\r\n PropTypes.arrayOf(PropTypes.instanceOf(MenuOption)),\r\n PropTypes.arrayOf(PropTypes.object),\r\n ]).isRequired,\r\n /** Optional number representing how many visible rows should be displayed */\r\n numberOfVisibleRows: PropTypes.number,\r\n};\r\n\r\n/**\r\n * Implements a menu using React.CreatePortal which places the html generated for the menu in the #menu-root block (search for #menu-root in the project to find where the menu is inserted)\r\n * Portals allow components to exist as direct _React_ children (receiving props from parent components) but be physically located elsewhere\r\n * This solves the problem of needing menus inside independent scroll containers (like a data grid that scrolls but has a kebab menu for each row)\r\n * but allows those menu's to be visible OUTSIDE the scroll container\r\n * In order to create a scroll container, some parent component needs to set it's overflow property to hidden, which does not allow any html element\r\n * that is a child to overflow it, regardless of positioning\r\n */\r\nclass PortalMenu extends MenuHelper {\r\n componentDidMount() {\r\n const { wrapperRef } = this.props;\r\n if (wrapperRef && !this.scrollParent) {\r\n // scroll parent may not be window, so set it on whatever controls scrolling of the wrapperRef\r\n this.scrollParent = this.getScrollParent(wrapperRef);\r\n\r\n this.scrollParent.addEventListener('scroll', this._trackPortalPosition);\r\n this._trackPortalPosition();\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.scrollParent.removeEventListener('scroll', this._trackPortalPosition);\r\n }\r\n\r\n /**\r\n * IMPORTANT: these calculations only work because #menu-root in menu-component.scss has position relative which allows\r\n * us to do all calculations based on menu root instead of sometimes on the scroll parent and some times on the window\r\n * Since menu get's position relative, it orients itself after all of the content, this is why the top values need to be negative the distance between the trigger and the end of the page\r\n * it pulls them back up into the page view\r\n * boundingRect.bottom = the page y position of the bottom of the wrapperRef (drawer triggering component) relative to the viewPort (not page height)\r\n * currentPageScroll = distance the page has been scrolled (absolute positioning is relative to the page height, not the viewport, which is why boundingRect.top is not enough as it changes due to scrolling)\r\n */\r\n _trackPortalPosition = () => {\r\n const { wrapperRef, numberOfVisibleRows } = this.props;\r\n const boundingRect = wrapperRef.getBoundingClientRect();\r\n const currentPageScroll = window.pageYOffset;\r\n const heightBetweenWrapperAndBottomOfPage =\r\n document.documentElement.offsetHeight -\r\n currentPageScroll -\r\n boundingRect.bottom;\r\n const menuOverflowMap = this._getOverflowData();\r\n if (menuOverflowMap.window.bottom) {\r\n this.setState({\r\n top: -heightBetweenWrapperAndBottomOfPage,\r\n left: boundingRect.left,\r\n // calculates distance between bottom of control and scrollable height so it fits exactly between\r\n maxHeight: heightBetweenWrapperAndBottomOfPage,\r\n bottom: 'auto',\r\n });\r\n } else {\r\n // menu scrolls normally\r\n this.setState({\r\n top: -heightBetweenWrapperAndBottomOfPage,\r\n maxHeight: numberOfVisibleRows\r\n ? numberOfVisibleRows * MENU_OPTION_HEIGHT\r\n : 'auto',\r\n left: boundingRect.left,\r\n bottom: 'auto',\r\n });\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n children,\r\n wrapperRef,\r\n className,\r\n centerMenuDisplay,\r\n numberOfVisibleRows,\r\n options,\r\n } = this.props;\r\n const { top, bottom, left, maxHeight } = this.state;\r\n const menuOverflowMap = this._getOverflowData();\r\n return ReactDOM.createPortal(\r\n numberOfVisibleRows)\r\n ? `${MENU_BLOCK}--overflow-scroll`\r\n : null,\r\n centerMenuDisplay ? `${MENU_BLOCK}--centered` : null,\r\n )}\r\n style={{\r\n top,\r\n left,\r\n bottom,\r\n width: wrapperRef.offsetWidth,\r\n maxHeight,\r\n }}\r\n >\r\n {children}\r\n ,\r\n document.getElementById('menu-root'),\r\n );\r\n }\r\n}\r\n\r\nclass NormalMenu extends MenuHelper {\r\n componentDidMount() {\r\n const { wrapperRef } = this.props;\r\n if (wrapperRef && !this.scrollParent) {\r\n // scroll parent may not be window, so set it on whatever controls scrolling of the wrapperRef\r\n this.scrollParent = this.getScrollParent(wrapperRef);\r\n this._calculateMenuDimensions();\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n if (prevProps.options !== this.props.options && this.props.wrapperRef) {\r\n this._calculateMenuDimensions();\r\n }\r\n }\r\n\r\n _calculateMenuDimensions = () => {\r\n const {\r\n wrapperRef,\r\n numberOfVisibleRows,\r\n maxDropDownHeight,\r\n options,\r\n className,\r\n containerRef,\r\n } = this.props;\r\n const boundingRect = wrapperRef.getBoundingClientRect();\r\n const currentPageScroll = window.pageYOffset;\r\n const heightBetweenWrapperAndBottomOfPage =\r\n document.documentElement.offsetHeight -\r\n currentPageScroll -\r\n boundingRect.bottom -\r\n MIN_VALUE_LEFT_FOR_BOTTOM_VISIBILITY; //minimum value so that dropdown option border should be properly visible from bottom\r\n const menuOverflowMap = this._getOverflowData();\r\n /**\r\n * We need to compute the maxHeight of the number of menu items that we want to display.\r\n * By default we will only be manipulating the height of the menu if there is an overflow, triggered\r\n * by checking the heightBetweenWrapperAndBottomOfPage, which indicates that the menu has gone past the end of the page.\r\n * There is also a check against the numberOfVisibleRows prop however, in the case that the menu has NOT overflown the page\r\n * but it has a set height that we want to utilize based on passed-in props.\r\n */\r\n\r\n let maxHeight = 'auto';\r\n let top = boundingRect.height;\r\n let right = 'auto';\r\n\r\n //statement list kebab-menu\r\n if (className == 'statement-list__kebab-menu') {\r\n const menuHeight = isNullOrUndefined(numberOfVisibleRows)\r\n ? options.length * MENU_OPTION_HEIGHT\r\n : numberOfVisibleRows * MENU_OPTION_HEIGHT;\r\n const footerHeight = 90; //apporximate, need to find a way for accurate value\r\n\r\n //case we are using virtualized list\r\n if (containerRef) {\r\n const fatherProperties = containerRef.current.getBoundingClientRect();\r\n const shouldAdjustTop =\r\n boundingRect.bottom + menuHeight > fatherProperties.bottom;\r\n top = shouldAdjustTop ? 0 - menuHeight : 0;\r\n right = boundingRect.width - 15;\r\n\r\n if (numberOfVisibleRows) {\r\n maxHeight = numberOfVisibleRows * MENU_OPTION_HEIGHT;\r\n }\r\n this.setState({\r\n top: top, // absolute positioned RELATIVE TO wrapperRef\r\n width: wrapperRef.offsetWidth,\r\n maxHeight: maxHeight,\r\n right: right,\r\n });\r\n } else {\r\n let availableSpace =\r\n window.pageYOffset +\r\n window.innerHeight -\r\n (window.pageYOffset + boundingRect.bottom + footerHeight);\r\n\r\n if (availableSpace < menuHeight) {\r\n top = availableSpace - menuHeight;\r\n right = boundingRect.width - 15;\r\n }\r\n\r\n if (numberOfVisibleRows) {\r\n maxHeight = numberOfVisibleRows * MENU_OPTION_HEIGHT;\r\n }\r\n this.setState({\r\n top: top, // absolute positioned RELATIVE TO wrapperRef\r\n width: wrapperRef.offsetWidth,\r\n maxHeight: maxHeight,\r\n right: right,\r\n });\r\n }\r\n } else {\r\n //all other components\r\n if (menuOverflowMap.window.bottom) {\r\n maxHeight = maxDropDownHeight //conditon for pre defined drop down height\r\n ? maxDropDownHeight\r\n : heightBetweenWrapperAndBottomOfPage;\r\n } else if (numberOfVisibleRows) {\r\n maxHeight = numberOfVisibleRows * MENU_OPTION_HEIGHT;\r\n }\r\n\r\n this.setState({\r\n top: top, // absolute positioned RELATIVE TO wrapperRef\r\n width: wrapperRef.offsetWidth,\r\n maxHeight: maxHeight,\r\n });\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n children,\r\n className,\r\n numberOfVisibleRows = MIN_NUM_VISIBLE_ROWS_FOR_SCROLL,\r\n options,\r\n } = this.props;\r\n const { top, maxHeight, right } = this.state;\r\n const menuOverflowMap = this._getOverflowData();\r\n const isDropdownHasCheckbox = options.find(\r\n (element) => element.isCheckboxRequired,\r\n );\r\n /* Checks if menu is at bottom of screen or will touch the bottom of screen;\r\n maxHeight has changed from the default auto and length of options is greater than num of visible rows with default set to 4\r\n OR check if options length is greater than num of rows and maxHeight not auto\r\n */\r\n const shouldDisplayOverflowScroll =\r\n ((menuOverflowMap.window.bottom || menuOverflowMap.scrollParent.bottom) &&\r\n maxHeight !== 'auto' &&\r\n options.length > numberOfVisibleRows) ||\r\n (options.length > numberOfVisibleRows && maxHeight !== 'auto');\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n }\r\n}\r\n\r\nconst DefaultMenuItems = ({\r\n options,\r\n onSelectOption,\r\n toggleDrawer,\r\n isNotIntl,\r\n selection,\r\n intl,\r\n hideCheckmarks,\r\n centerMenuDisplay,\r\n isMultiselect = false,\r\n showCheckbox = false,\r\n}) => {\r\n const _isOptionSelected = (option) => {\r\n // kebab menu options don't have values, so we want to ensure that a value is present before checking selection\r\n if (\r\n isMultiselect &&\r\n !isNullOrUndefined(option.value) &&\r\n !isNullOrUndefined(selection)\r\n ) {\r\n return selection.some((item) => {\r\n return item.value === option.value;\r\n });\r\n }\r\n return (\r\n !isNullOrUndefined(option.value) &&\r\n !isNullOrUndefined(selection) &&\r\n option.value === selection.value\r\n );\r\n };\r\n\r\n const _onSelectOption = (item) => {\r\n if (item.onSelectOption) {\r\n // for kebabs where items have different actions\r\n item.onSelectOption();\r\n }\r\n if (onSelectOption) {\r\n // kebabs may not pass an onSelectOption for the whole dropdown\r\n onSelectOption(item);\r\n }\r\n toggleDrawer();\r\n };\r\n\r\n const keyEventHandler = (e, _isDisabled, item) => {\r\n if (e.keyCode === SPACEBAR_KEY_CODE) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n if (!_isDisabled) {\r\n _onSelectOption(item);\r\n }\r\n } else if (e.keyCode === ARROW_KEY_DOWN_CODE) {\r\n focusNextMenuItem(e);\r\n } else if (e.keyCode === ARROW_KEY_UP_CODE) {\r\n focusPrevMenuItem(e);\r\n } else if (e.keyCode === TAB_KEY_CODE) {\r\n toggleDrawer();\r\n }\r\n };\r\n\r\n const _renderOption = (item, index) => {\r\n const tooltip = extractPropFromFunctionOrValue(item.tooltip);\r\n const _isDisabled = extractPropFromFunctionOrValue(item.disabled);\r\n const _isSelected = item.isSelected\r\n ? extractPropFromFunctionOrValue(item.isSelected)\r\n : false;\r\n isNotIntl = item.hasOwnProperty('isNotIntl') ? item.isNotIntl : isNotIntl;\r\n if (item.isLabel) {\r\n return (\r\n \r\n {isNotIntl || !item.isIntl\r\n ? item.title\r\n : intl.formatMessage({ id: item.title })}\r\n \r\n );\r\n } else if (item.isCheckboxRequired) {\r\n return (\r\n {\r\n if (!_isDisabled) {\r\n _onSelectOption(item);\r\n }\r\n }}\r\n tabIndex={-1}\r\n onKeyDown={(e) => keyEventHandler(e, _isDisabled, item)}\r\n >\r\n {\r\n if (!_isDisabled) {\r\n _onSelectOption(item);\r\n }\r\n }}\r\n label={\r\n isNotIntl || !item.isIntl\r\n ? item.title\r\n : intl.formatMessage({ id: item.title })\r\n }\r\n id={`checkbox-dropdown-${item.id}`}\r\n width={'100%'}\r\n isValid={true}\r\n disabled={_isDisabled}\r\n />\r\n \r\n );\r\n } else {\r\n return (\r\n {\r\n if (!_isDisabled) {\r\n _onSelectOption(item);\r\n }\r\n }}\r\n tabIndex={-1}\r\n onKeyDown={(e) => keyEventHandler(e, _isDisabled, item)}\r\n >\r\n \r\n \r\n {isNotIntl || !item.isIntl\r\n ? item.title\r\n : intl.formatMessage({ id: item.title })}\r\n {!hideCheckmarks && _isOptionSelected(item) ? (\r\n \r\n ) : null}\r\n \r\n \r\n \r\n );\r\n }\r\n };\r\n\r\n const _renderMultiselectOption = (item, index) => {\r\n const tooltip = extractPropFromFunctionOrValue(item.tooltip);\r\n const _isDisabled = extractPropFromFunctionOrValue(item.disabled);\r\n\r\n return (\r\n {\r\n if (!_isDisabled) {\r\n _onSelectOption(item);\r\n }\r\n }}\r\n tabIndex={-1}\r\n onKeyDown={(e) => keyEventHandler(e, _isDisabled, item)}\r\n >\r\n {!showCheckbox ? (\r\n \r\n \r\n {isNotIntl || !item.isIntl\r\n ? item.title\r\n : intl.formatMessage({ id: item.title })}\r\n {!hideCheckmarks && _isOptionSelected(item) ? (\r\n \r\n ) : null}\r\n \r\n \r\n ) : showCheckbox ? (\r\n {\r\n if (!_isDisabled) {\r\n _onSelectOption(item);\r\n }\r\n }}\r\n label={\r\n isNotIntl || !item.isIntl\r\n ? item.title\r\n : intl.formatMessage({ id: item.title })\r\n }\r\n id={`checkbox-dropdown-${item.id}`}\r\n width={'100%'}\r\n isValid={true}\r\n disabled={_isDisabled}\r\n />\r\n ) : null}\r\n \r\n );\r\n };\r\n\r\n return (\r\n \r\n {isMultiselect\r\n ? options.map((item) => _renderMultiselectOption(item))\r\n : options.map((item) => _renderOption(item))}\r\n \r\n );\r\n};\r\n\r\nconst DefaultApiMenu = (props) => {\r\n const {\r\n dataModel,\r\n onSelectOption,\r\n selection,\r\n intl,\r\n maxDropDownHeight,\r\n toggleDrawer,\r\n hideCheckmarks,\r\n NoResultsComponent,\r\n } = props;\r\n\r\n return (\r\n \r\n \r\n {dataModel.options.length > 0 ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nconst DefaultApiMenuWithCreate = (props) => {\r\n const {\r\n dataModel,\r\n onSelectOption,\r\n selection,\r\n toggleDrawer,\r\n onCreateClick,\r\n NoResultsComponent,\r\n visibleRowsForScroll = MIN_NUM_VISIBLE_ROWS_FOR_SCROLL,\r\n } = props;\r\n const _numVisibleRows = getNumVisibleRows({\r\n dataModel: dataModel.apiModel,\r\n options: dataModel.options,\r\n visibleRowsWhileLoading: NUM_VISIBLE_ROWS_WHILE_LOADING,\r\n visibleRowsForScroll,\r\n });\r\n const _numRowsBeyondScrollableThreshold =\r\n dataModel.apiModel.isLoaded &&\r\n dataModel.options.length > MIN_NUM_VISIBLE_ROWS_FOR_SCROLL;\r\n return (\r\n \r\n \r\n {dataModel.options.length > 0 ? (\r\n \r\n ) : NoResultsComponent ? (\r\n
    \r\n \r\n
    \r\n ) : null}\r\n 0}\r\n >\r\n \r\n \r\n
    \r\n \r\n );\r\n};\r\n\r\nDefaultApiMenuWithCreate.propTypes = {\r\n /** Function that fires when the create button is clicked */\r\n onCreateClick: PropTypes.func.isRequired,\r\n /** Custom component to display under the column headers when there the rowItems property of the dataModel is an empty [] */\r\n NoResultsComponent: PropTypes.element,\r\n /** Min number of rows to display for scroll */\r\n visibleRowsForScroll: PropTypes.number,\r\n};\r\n\r\nDefaultMenuItems.propTypes = {\r\n /** Sometimes the individual options have their own individual function handlers */\r\n /** Array of menu items */\r\n options: PropTypes.arrayOf(PropTypes.instanceOf(MenuOption)).isRequired,\r\n /** Function fired when menu item is selected passing the value of that item */\r\n onSelectOption: PropTypes.func,\r\n /** HOC Function fired to toggle drop down menu */\r\n toggleDrawer: PropTypes.func.isRequired,\r\n /** Value of current selection, needs to be one of the values defined in the options.value constructor in whatever constants file originally defines the options */\r\n selection: PropTypes.oneOfType([\r\n PropTypes.instanceOf(MenuOption),\r\n PropTypes.string,\r\n ]),\r\n /** custom className applied to the
      */\r\n className: PropTypes.string,\r\n /** Reference to drawer triggering element (needed to calculate menu position since implemented with portals) */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n};\r\n\r\nDefaultApiMenu.propTypes = {\r\n /** Sometimes the individual options have their own individual function handlers */\r\n /** Array of menu items */\r\n dataModel: PropTypes.instanceOf(MenuApiData).isRequired,\r\n /** Function fired when menu item is selected passing the value of that item */\r\n onSelectOption: PropTypes.func,\r\n /** HOC Function fired to toggle drop down menu */\r\n toggleDrawer: PropTypes.func.isRequired,\r\n /** Flag for non internationalized menu options */\r\n isNotIntl: PropTypes.bool,\r\n /** Value of current selection, needs to be one of the values defined in the options.value constructor */\r\n selection: PropTypes.string,\r\n /** custom className applied to the
        */\r\n className: PropTypes.string,\r\n /** Reference to drawer triggering element (needed to calculate menu position since implemented with portals) */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n /**customized max height for dropdown menu */\r\n maxDropDownHeight: PropTypes.number,\r\n /** indicates if menu should use a react portal or normal child element implementation */\r\n usePortal: PropTypes.bool,\r\n /** indicates if the menu should hide the checkmark next to selected values. */\r\n hideCheckmarks: PropTypes.bool,\r\n /** indicates if the menu should be centered */\r\n centerMenuDisplay: PropTypes.bool,\r\n};\r\n\r\nconst DefaultTableApiMenu = (props) => {\r\n const {\r\n columns,\r\n dataModel,\r\n onSelectOption,\r\n tableId,\r\n toggleDrawer,\r\n NoResultsComponent,\r\n isOptionSelected,\r\n shouldDisableMenuOption,\r\n } = props;\r\n const _rowClassnames = (rowData) =>\r\n isOptionSelected && isOptionSelected(rowData)\r\n ? `${MENU_BLOCK}__option--selected`\r\n : null;\r\n\r\n const _numVisibleRows = getNumVisibleRows({\r\n dataModel: dataModel.apiModel,\r\n options: dataModel.rowItems,\r\n visibleRowsWhileLoading: NUM_VISIBLE_ROWS_WHILE_LOADING,\r\n visibleRowsForScroll: MIN_NUM_VISIBLE_ROWS_FOR_SCROLL,\r\n });\r\n return (\r\n \r\n {\r\n onSelectOption(rowData);\r\n toggleDrawer();\r\n }}\r\n tableId={tableId}\r\n numberOfVisibleRows={_numVisibleRows}\r\n NoResultsComponent={NoResultsComponent}\r\n />\r\n \r\n );\r\n};\r\n\r\nDefaultTableApiMenu.propTypes = {\r\n /** An array of column objects */\r\n columns: PropTypes.oneOfType([\r\n PropTypes.arrayOf(PropTypes.instanceOf(Object)),\r\n PropTypes.arrayOf(PropTypes.instanceOf(DataGridColumn)),\r\n ]),\r\n /** Contains the rowItems array and api model for loading */\r\n dataModel: PropTypes.instanceOf(DataGridDataApi),\r\n /** Function, triggered when clicking on a row, passes the current clicked row object */\r\n onSelectOption: PropTypes.func.isRequired,\r\n /** Unique key string for each table */\r\n tableId: PropTypes.string.isRequired,\r\n /* Number of visual data rows, controls scrolling */\r\n numberOfVisibleRows: PropTypes.number,\r\n /** HOC Function fired to toggle drop down menu */\r\n toggleDrawer: PropTypes.func.isRequired,\r\n /** Custom component to display under the column headers when there the rowItems property of the dataModel is an empty [] */\r\n NoResultsComponent: PropTypes.element,\r\n /** custom className applied to the
          */\r\n className: PropTypes.string,\r\n /** Reference to drawer triggering element (needed to calculate menu position since implemented with portals) */\r\n wrapperRef: PropTypes.instanceOf(Element),\r\n /** Function to determine if a specific option is already selected, func should look like (rowData) => someFunction(rowData)\r\n * And evaluate to a boolean\r\n */\r\n isOptionSelected: PropTypes.func,\r\n /** indicates if menu should use a react portal or normal child element implementation */\r\n usePortal: PropTypes.bool,\r\n /** Function that determines if a particular row should be disabled based on if the user has already been selected */\r\n shouldDisableMenuOption: PropTypes.func,\r\n};\r\n\r\nconst Menu = (props) => (\r\n \r\n \r\n \r\n);\r\n\r\nconst ApiMenu = memo(injectIntl(DefaultApiMenu));\r\n\r\nconst ApiMenuWithCreate = memo(injectIntl(DefaultApiMenuWithCreate));\r\n\r\nconst TableApiMenu = memo(DefaultTableApiMenu);\r\n\r\nexport default memo(injectIntl(Menu));\r\nexport { ApiMenu, TableApiMenu, ApiMenuWithCreate };\r\n","import debounce from 'lodash/debounce';\r\nimport PropTypes from 'prop-types';\r\nimport React, {\r\n cloneElement,\r\n useCallback,\r\n useMemo,\r\n useRef,\r\n useState,\r\n useEffect,\r\n} from 'react';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const VIRTUALIZED_LIST_BLOCK = 'virtualized-list';\r\n\r\n// Debounce duration for callback when scrolled to end\r\nexport const CALLBACK_DEBOUNCE_DURATION = 500;\r\n// Items out of view but within 1000px will be rendered\r\nexport const OUT_OF_VIEW_THRESHOLD = 1000;\r\n\r\nconst VirtualizedList = ({\r\n disableScrollCallback,\r\n extractKey,\r\n id,\r\n itemHeight,\r\n itemList,\r\n onScrollEnd,\r\n renderFooter,\r\n renderItem,\r\n rowsAmount,\r\n refElementHeight,\r\n calculatedScrollPosition,\r\n forceScrolling = 1, // this value is used to force to scrolling eg. projectlist scrolling based on selectedProjectID and if any new project is pinned.\r\n selectedItemClassName,\r\n executeScrollImmediately = false,\r\n}) => {\r\n const listRef = useRef();\r\n const scrollAnimation = useRef();\r\n const [scrollPosition, setScrollPosition] = useState(0);\r\n\r\n useEffect(() => {\r\n //This prop (calculatedScrollPosition) is required when any item is already selected into list.\r\n //We need to set the scroll position to calculate the 'startIndex' and 'endIndex', so\r\n //that list items with correct window is selected/sliced.\r\n if (!isNullOrUndefined(calculatedScrollPosition)) {\r\n setScrollPosition(calculatedScrollPosition);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [calculatedScrollPosition, forceScrolling]);\r\n\r\n const itemsOutOfView = Math.ceil(OUT_OF_VIEW_THRESHOLD / itemHeight);\r\n\r\n const getListBounding = useCallback(() => {\r\n if (listRef.current) {\r\n return listRef.current.getBoundingClientRect();\r\n }\r\n return null;\r\n }, [listRef]);\r\n\r\n const getListHeight = useCallback(() => {\r\n const bounds = getListBounding();\r\n return bounds ? bounds.height : 0;\r\n }, [getListBounding]);\r\n\r\n let startIndex = useMemo(() => {\r\n const start =\r\n Math.floor(scrollPosition / (itemHeight + refElementHeight)) -\r\n itemsOutOfView;\r\n return Math.max(0, start);\r\n }, [scrollPosition, itemHeight, refElementHeight, itemsOutOfView]);\r\n\r\n const endIndex = useMemo(() => {\r\n const end =\r\n Math.ceil((scrollPosition + getListHeight()) / itemHeight) +\r\n itemsOutOfView;\r\n return Math.min(itemList.length, end);\r\n }, [\r\n itemsOutOfView,\r\n getListHeight,\r\n itemHeight,\r\n itemList.length,\r\n scrollPosition,\r\n ]);\r\n\r\n useEffect(() => {\r\n //This prop (selectedItemClassName) is required to scroll the list to the selected item.\r\n //It finds the selected element and scroll list to that element.\r\n const selectedItem = document.getElementsByClassName(selectedItemClassName);\r\n if (selectedItem && selectedItem[0]) {\r\n selectedItem[0].scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center',\r\n inline: 'nearest',\r\n });\r\n }\r\n }, [startIndex, endIndex, selectedItemClassName]);\r\n\r\n const getListItemsInView = useCallback(\r\n () =>\r\n itemList\r\n .slice(startIndex, endIndex)\r\n .map((item, index) =>\r\n Object.assign(item, { index: startIndex + index }),\r\n ),\r\n [endIndex, itemList, startIndex],\r\n );\r\n\r\n const onScrollEndDebounced = useMemo(\r\n () => debounce(onScrollEnd, CALLBACK_DEBOUNCE_DURATION),\r\n [onScrollEnd],\r\n );\r\n\r\n const onScroll = useCallback(\r\n (event) => {\r\n if (scrollAnimation.current) {\r\n cancelAnimationFrame(scrollAnimation.current);\r\n }\r\n const { scrollTop } = event.currentTarget;\r\n const scrollEndPosition =\r\n scrollTop + event.currentTarget.getBoundingClientRect().height;\r\n const scrollThreshold = itemHeight * (itemList.length - itemsOutOfView);\r\n scrollAnimation.current = requestAnimationFrame(() => {\r\n setScrollPosition(scrollTop);\r\n if (executeScrollImmediately) {\r\n onScrollEndDebounced(scrollTop);\r\n } else {\r\n if (!disableScrollCallback && scrollEndPosition > scrollThreshold) {\r\n const endItem =\r\n Math.ceil((scrollTop + getListHeight()) / itemHeight) +\r\n itemsOutOfView;\r\n onScrollEndDebounced(endItem);\r\n }\r\n }\r\n });\r\n },\r\n [\r\n disableScrollCallback,\r\n itemsOutOfView,\r\n itemHeight,\r\n itemList.length,\r\n getListHeight,\r\n onScrollEndDebounced,\r\n executeScrollImmediately,\r\n ],\r\n );\r\n\r\n const renderItemWithKey = useCallback(\r\n (item) => {\r\n const itemProps = { key: extractKey(item) };\r\n return cloneElement(renderItem(item, item.index, itemList), itemProps);\r\n },\r\n [extractKey, itemList, renderItem],\r\n );\r\n\r\n return (\r\n \r\n \r\n \r\n {getListItemsInView().map(renderItemWithKey)}\r\n {renderFooter()}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nVirtualizedList.defaultProps = {\r\n disableScrollCallback: false,\r\n refElementHeight: 0,\r\n extractKey: (item) => item.id,\r\n renderFooter: () => null,\r\n onScrollEnd: () => {},\r\n};\r\n\r\nVirtualizedList.propTypes = {\r\n /** Boolean controls if we call onScrollEnd */\r\n disableScrollCallback: PropTypes.bool,\r\n /** Function to extract the item key from item object */\r\n extractKey: PropTypes.func,\r\n /** Id of div wrapper */\r\n id: PropTypes.string,\r\n /** Item height used to calculate positioning and what items to render */\r\n itemHeight: PropTypes.number.isRequired,\r\n /** represents the clientHeight or offSetHeight of the reference element when user clicks on show more button to view more description of element which has more than 3 lines */\r\n refElementHeight: PropTypes.number,\r\n /** Array of items to render */\r\n itemList: PropTypes.array.isRequired,\r\n /** Callback for when scrolling near the end of list */\r\n onScrollEnd: PropTypes.func,\r\n /** Function render footer */\r\n renderFooter: PropTypes.func,\r\n /** Function render each item */\r\n renderItem: PropTypes.func.isRequired,\r\n /* max amount of rows on the virtualized list*/\r\n rowsAmount: PropTypes.number,\r\n};\r\n\r\nexport default VirtualizedList;\r\n","import { cloneDeep } from 'lodash';\r\nimport ApiModel from 'models/api-model';\r\nimport User from 'models/data/user-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nexport class CurrentUser extends ApiModel({\r\n data: new User(),\r\n status: null,\r\n}) {\r\n get id() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.id;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse({ response }) {\r\n // Current user model is always going to keep track of users home geo only.\r\n // We set home geo after getting users OPM profile.\r\n // The below changes will protect overwriting users home geo, since current user api response\r\n // is expected to contain geo code of region in which api call was made.\r\n const updatedResponse = cloneDeep(response);\r\n updatedResponse &&\r\n updatedResponse.result &&\r\n (updatedResponse.result.geoCode = this.homeGeo);\r\n return {\r\n data: new User(updatedResponse.result),\r\n status: updatedResponse.status,\r\n };\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.data) || !isNullOrUndefined(this.data.id);\r\n }\r\n\r\n getUser() {\r\n return this.data;\r\n }\r\n\r\n hasID() {\r\n return !isNullOrUndefined(this.id);\r\n }\r\n\r\n errorNotNull() {\r\n return !this.isLoading && this.error !== null;\r\n }\r\n\r\n isDisabled() {\r\n return this.isInitialized() && !this.getUser().enabled;\r\n }\r\n\r\n get homeGeo() {\r\n if (this.data) return this.data.geoCode;\r\n return undefined;\r\n }\r\n\r\n setHomeGeo(geo) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n geoCode: geo,\r\n },\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class StatementSummaryElements extends ApiModel({\r\n data: {\r\n totalElements: 0,\r\n verified: 0,\r\n notVerified: 0,\r\n flagged: 0,\r\n notFlagged: 0,\r\n reviewed: 0,\r\n notReviewed: 0,\r\n },\r\n}) {\r\n get totalElements() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.totalElements;\r\n }\r\n get verified() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.verified;\r\n }\r\n\r\n get unverified() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.notVerified;\r\n }\r\n\r\n get reviewed() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.reviewed;\r\n }\r\n\r\n get flagged() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.flagged;\r\n }\r\n\r\n get unverifiedPercentage() {\r\n return this.totalElements === 0\r\n ? 0\r\n : ((this.unverified * 100) / this.totalElements).toFixed(0);\r\n }\r\n\r\n get verifiedPercentage() {\r\n return this.totalElements === 0\r\n ? 0\r\n : Math.round((this.verified * 100) / this.totalElements);\r\n }\r\n\r\n get reviewedPercentage() {\r\n return this.totalElements === 0\r\n ? 0\r\n : ((this.reviewed * 100) / this.totalElements).toFixed(0);\r\n }\r\n\r\n processResponse({ response }) {\r\n return { data: response.data.result };\r\n }\r\n\r\n updateElementsSummaryFromSocketPayload(payload) {\r\n let {\r\n elementsVerified,\r\n elementsReviewed,\r\n elementsCount,\r\n elementsFlagged,\r\n totalElementsFlagged,\r\n } = payload;\r\n !isNullOrUndefined(totalElementsFlagged) &&\r\n totalElementsFlagged !== -1 &&\r\n (elementsFlagged = totalElementsFlagged - this.data.flagged);\r\n return this.mergeData({\r\n totalElements: this.data.totalElements + elementsCount,\r\n verified: this.data.verified + elementsVerified,\r\n notVerified: this.data.notVerified - elementsVerified + elementsCount,\r\n reviewed: this.data.reviewed + elementsReviewed,\r\n notReviewed: this.data.notReviewed - elementsReviewed + elementsCount,\r\n flagged: this.data.flagged + elementsFlagged,\r\n notFlagged: this.data.notFlagged - elementsFlagged + elementsCount,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport Tickmark from 'models/data/tickmark-model';\r\nimport clonedeep from 'lodash.clonedeep';\r\n\r\nexport default class ElementTickmarkList extends ApiModel({\r\n data: {\r\n tickmarks: [],\r\n },\r\n}) {\r\n get tickmarks() {\r\n if (this.data) {\r\n return this.data.tickmarks;\r\n }\r\n return [];\r\n }\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n tickmarks: response.data.result.map(\r\n (tickmark) => new Tickmark(tickmark),\r\n ),\r\n },\r\n };\r\n }\r\n\r\n getTickmarkCount() {\r\n if (this.hasTickmarks()) {\r\n return this.data.tickmarks.length;\r\n }\r\n return 0;\r\n }\r\n\r\n getTickmarksSortedAlphabetically() {\r\n if (this.data) {\r\n return this.data.tickmarks.sort((a, b) =>\r\n a.noteOrdinal < b.noteOrdinal ? -1 : 1,\r\n );\r\n }\r\n return [];\r\n }\r\n\r\n get(index) {\r\n if (\r\n this.data &&\r\n this.data.tickmarks &&\r\n index >= 0 &&\r\n index < this.data.tickmarks.length\r\n ) {\r\n return this.data.tickmarks[index];\r\n }\r\n return null;\r\n }\r\n\r\n hasTickmarks() {\r\n return this.data && this.data.tickmarks && this.data.tickmarks.length > 0;\r\n }\r\n\r\n removeTickmarkFromElementPanelWithSocketPayload(payload) {\r\n let tickmarksCopy = [...this.data.tickmarks];\r\n tickmarksCopy = tickmarksCopy.filter(\r\n (tickmark) => tickmark.tickmarkId !== payload.tickmarkRefId,\r\n );\r\n return this.mergeData({\r\n tickmarks: tickmarksCopy.map((tickmark) => new Tickmark(tickmark)),\r\n });\r\n }\r\n /** The payload will contain a set of tickmarkIds which has to be deleted\r\n * Example : [123,321]\r\n */\r\n removeTickmarkWithSocketPayloadInBulk(payload) {\r\n let tickmarksCopy = [...this.data.tickmarks];\r\n tickmarksCopy = tickmarksCopy.filter(\r\n (tickmark) => !payload.has(tickmark.tickmarkId),\r\n );\r\n return this.mergeData({\r\n tickmarks: tickmarksCopy.map((tickmark) => new Tickmark(tickmark)),\r\n });\r\n }\r\n\r\n updateTickmarkInElementPanelWithSocketPayload(payload) {\r\n let tickmarksCopy = [...this.data.tickmarks];\r\n for (\r\n let currentTickmarkIndex = 0;\r\n currentTickmarkIndex < tickmarksCopy.length;\r\n currentTickmarkIndex++\r\n ) {\r\n if (\r\n payload.tickmarkRefId ===\r\n tickmarksCopy[currentTickmarkIndex].tickmarkId &&\r\n tickmarksCopy[currentTickmarkIndex].revisionId === payload.revisionId\r\n ) {\r\n tickmarksCopy[currentTickmarkIndex].text = payload.text;\r\n tickmarksCopy[currentTickmarkIndex].richText = payload.richText;\r\n tickmarksCopy[currentTickmarkIndex].creationType = payload.creationType;\r\n }\r\n }\r\n return this.mergeData({\r\n tickmarks: tickmarksCopy.map((tickmark) => new Tickmark(tickmark)),\r\n });\r\n }\r\n /** The elementId parameter is an elementId for the element for which element panel is open\r\n * If element panel is closed then this function will not be called.\r\n * NOTE :: This particular function is not for updating the particular tickmark unlike the\r\n * already existing funtion updateTickmarkInElementPanelWithSocketPayload, instead it is for\r\n * inserting the entire new tickmark object into an array.\r\n */\r\n setTickmarkListFromWebSocketPayload({ webSocketPayload, elementId }) {\r\n const tickmarksCopy = clonedeep(this.tickmarks);\r\n const tickmarksMap = tickmarksCopy.reduce((elementMap, elementData) => {\r\n elementMap[elementData.tickmarkId] = elementData;\r\n return elementMap;\r\n }, {});\r\n\r\n webSocketPayload.forEach((tickmark) => {\r\n /**If webSocketPayload has an update for element(opened in element panel) and\r\n * tickmarkId in webSocketPayload does not already exists in list then update the list\r\n * with this new tickmark data in webSocketPayload\r\n */\r\n if (\r\n tickmark.elementId === elementId &&\r\n !(tickmark.tickmarkId in tickmarksMap)\r\n ) {\r\n tickmarksCopy.push(tickmark);\r\n }\r\n });\r\n tickmarksCopy.sort((a, b) => a.ordinal - b.ordinal);\r\n return this.mergeData({\r\n tickmarks: tickmarksCopy.map((tickmark) => new Tickmark(tickmark)),\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport OmniaEngagementEntry from 'models/data/omnia-engagement-entry-model';\r\n\r\nexport default class OmniaEngagement extends ApiModel({\r\n data: {\r\n omniaEngagementEntity: null,\r\n omniaTieoutEngagementEntityList: [],\r\n },\r\n}) {\r\n get omniaEngagementEntity() {\r\n if (this.data) {\r\n return this.data.omniaEngagementEntity;\r\n }\r\n return null;\r\n }\r\n\r\n get omniaTieoutEngagementEntityList() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.omniaTieoutEngagementEntityList;\r\n }\r\n return [];\r\n }\r\n\r\n getEngagementId() {\r\n if (this.data && this.data.omniaEngagementEntity) {\r\n return this.data.omniaEngagementEntity.engagementId;\r\n }\r\n return null;\r\n }\r\n\r\n getGeoName() {\r\n if (this.data && this.data.omniaEngagementEntity) {\r\n return this.data.omniaEngagementEntity.geoName;\r\n }\r\n return null;\r\n }\r\n\r\n hasOmniaEngagementBeenLinked() {\r\n if (\r\n this.data.omniaTieoutEngagementEntityList &&\r\n this.data.omniaEngagementEntity\r\n ) {\r\n return this.data.omniaTieoutEngagementEntityList.some((entry) => {\r\n return (\r\n entry.linkedStatus === 1 &&\r\n entry.omEngagementId ===\r\n this.data.omniaEngagementEntity.engagementId &&\r\n entry.environment === this.data.omniaEngagementEntity.environment\r\n );\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n areThereTieoutEngagementEntities() {\r\n return (\r\n this.data.omniaTieoutEngagementEntityList &&\r\n this.data.omniaTieoutEngagementEntityList.length > 0\r\n );\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n omniaEngagementEntity: response.data.result.omniaEngagementEntity,\r\n omniaTieoutEngagementEntityList:\r\n response.data.result.omniaTieoutEngagementEntityList.map(\r\n (entry) => new OmniaEngagementEntry(entry),\r\n ),\r\n },\r\n };\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport ComfortLetter from 'models/data/comfort-letter-model';\r\n\r\nexport default class ElementComfortLetterList extends ApiModel({\r\n data: {\r\n comfortLetters: [],\r\n },\r\n}) {\r\n get comfortLetters() {\r\n if (this.data) {\r\n return this.data.comfortLetters;\r\n }\r\n return [];\r\n }\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n comfortLetters:\r\n response &&\r\n response.data &&\r\n response.data.result &&\r\n response.data.result.map((comfortLetter) =>\r\n new ComfortLetter().convertApiResponsetoComfortLetterModelFormat(\r\n comfortLetter,\r\n ),\r\n ),\r\n },\r\n };\r\n }\r\n\r\n getComfortLetterCount() {\r\n if (this.hasComfortLetter()) {\r\n return this.data.comfortLetters.length;\r\n }\r\n return 0;\r\n }\r\n\r\n get(index) {\r\n if (\r\n this.data &&\r\n this.data.comfortLetters &&\r\n index >= 0 &&\r\n index < this.data.comfortLetters.length\r\n ) {\r\n return this.data.comfortLetters[index];\r\n }\r\n return null;\r\n }\r\n\r\n hasComfortLetter() {\r\n return (\r\n this.data &&\r\n this.data.comfortLetters &&\r\n this.data.comfortLetters.length > 0\r\n );\r\n }\r\n\r\n getComfortLettersSortedAlphabetically() {\r\n if (this.data) {\r\n return this.data.comfortLetters.sort((b, a) =>\r\n b.comfortLetterCreatedDate.localeCompare(a.comfortLetterCreatedDate),\r\n );\r\n }\r\n return [];\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class PeriodList extends ApiModel({\r\n data: {\r\n periods: [], //This stores a raw copy of the periods array response we get from the back-end.\r\n periodsFlattened: [], // flattened list of valid period properties\r\n periodsDropdownMap: {}, //This stores a filtered map of MenuOptions for selecting periods on the front-end.\r\n periodFilterList: [], //distinct periods for the statement to display in filter\r\n },\r\n status: null,\r\n}) {\r\n get periodsFlattened() {\r\n if (\r\n !isNullOrUndefined(this.data.periodsFlattened) &&\r\n Array.isArray(this.data.periodsFlattened)\r\n ) {\r\n return this.data.periodsFlattened;\r\n }\r\n return [];\r\n }\r\n\r\n get periodFilterList() {\r\n if (\r\n !isNullOrUndefined(this.data.periodFilterList) &&\r\n Array.isArray(this.data.periodFilterList)\r\n ) {\r\n return this.data.periodFilterList;\r\n }\r\n return [];\r\n }\r\n\r\n processResponse({ response }) {\r\n let periodMenuOptions = {};\r\n let periodsFlattened = [];\r\n /**\r\n * We have to build up an array of periods that can be selected for elements on the statement.\r\n * The response is formatted like:\r\n *\r\n * [{years: \"FY 2015\", period1: \"Q1 2015\", period2: \"Q2 2015\" ...}, {years: \"FY 2014\", period1: \"Q1 2014\", ...}]\r\n * where we only care about the values inside this nested map, so we extract these for the dropdown. Some of the values are\r\n * null inside this nested map too, so they are skipped.\r\n */\r\n if (\r\n !isNullOrUndefined(response.data) &&\r\n !isNullOrUndefined(response.data.result) &&\r\n !isNullOrUndefined(response.data.result.periodEntityList)\r\n ) {\r\n let index = 1;\r\n response.data.result.periodEntityList.forEach((year) => {\r\n Object.values(year).forEach((period) => {\r\n if (!isNullOrUndefined(period)) {\r\n periodsFlattened.push(period);\r\n periodMenuOptions[period] = new MenuOption({\r\n id: index,\r\n title: period,\r\n value: period,\r\n isIntl: false,\r\n });\r\n index++;\r\n }\r\n });\r\n });\r\n }\r\n return {\r\n data: {\r\n periods: response.data.result.periodEntityList,\r\n periodsFlattened,\r\n periodsDropdownMap: periodMenuOptions,\r\n periodFilterList: response.data.result.periodFilterList,\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n hasPeriodDropdownMap() {\r\n return !isNullOrUndefined(this.data.periodsDropdownMap);\r\n }\r\n\r\n getPeriodDropdownMap() {\r\n if (this.hasPeriodDropdownMap()) {\r\n return this.data.periodsDropdownMap;\r\n }\r\n return null;\r\n }\r\n\r\n hasPeriodDropdownValue(period) {\r\n return (\r\n this.hasPeriodDropdownMap() &&\r\n !isNullOrUndefined(this.getPeriodDropdownValue(period))\r\n );\r\n }\r\n\r\n getPeriodDropdownValue(period) {\r\n if (this.hasPeriodDropdownMap()) {\r\n return this.data.periodsDropdownMap[period];\r\n }\r\n return null;\r\n }\r\n\r\n getPeriodDropdownValues() {\r\n return Object.values(this.data.periodsDropdownMap);\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class OmniaEngagementEntry extends BaseModel({\r\n jobTypeId: null,\r\n linkedBy: null,\r\n linkedDate: null,\r\n linkedStatus: null,\r\n linkedUserName: null,\r\n omClientId: null,\r\n omClientName: null,\r\n omEngagementId: null,\r\n omEngagementName: null,\r\n omUserId: null,\r\n toutClientId: null,\r\n toutClientName: null,\r\n toutEngagementId: null,\r\n toutEngagementName: null,\r\n toutProjectId: null,\r\n toutProjectName: null,\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nimport ElementDetails from './element-details-api-model';\r\n\r\nconst DEFAULT_PAGE_OFFSET = 0;\r\nconst DEFAULT_PAGE_SIZE = 100;\r\nconst DEFAULT_SELECTED_INDEX = 0;\r\nexport default class ElementsSearchResults extends ApiModel({\r\n data: {\r\n elements: [],\r\n first: DEFAULT_PAGE_OFFSET,\r\n size: DEFAULT_PAGE_SIZE,\r\n total: null,\r\n },\r\n selectedIndex: DEFAULT_SELECTED_INDEX,\r\n showElementSearchRefreshButton: false,\r\n batchSelectedItemsIds: {},\r\n}) {\r\n get elements() {\r\n return this.data.elements;\r\n }\r\n\r\n get totalLoadedResults() {\r\n return this.data.elements.length;\r\n }\r\n\r\n get totalOverallResults() {\r\n if (!isNullOrUndefined(this.data.total)) {\r\n return this.data.total;\r\n }\r\n return 0;\r\n }\r\n\r\n get hasAllResults() {\r\n return this.totalOverallResults === this.totalLoadedResults;\r\n }\r\n\r\n processResponse({ response }) {\r\n const { elements = [], first } = response.data;\r\n const aggregatedElements = this.elements;\r\n const appendElements = first >= this.elements.length;\r\n if (appendElements) {\r\n elements.forEach((element) => {\r\n aggregatedElements.push(\r\n new ElementDetails().setLoaded({\r\n response: { data: { result: element } },\r\n }),\r\n );\r\n });\r\n }\r\n return {\r\n data: {\r\n ...response.data,\r\n elements: aggregatedElements,\r\n },\r\n selectedIndex: appendElements\r\n ? this.selectedIndex\r\n : DEFAULT_SELECTED_INDEX,\r\n };\r\n }\r\n\r\n hasElements() {\r\n return this.elements.length > 0;\r\n }\r\n\r\n updateElementList({ elements = [], total }) {\r\n const _elementMap = elements.reduce((elementMap, elementData) => {\r\n const payload = { response: { data: { result: elementData } } };\r\n elementMap[elementData.id] = new ElementDetails().setLoaded(payload);\r\n return elementMap;\r\n }, {});\r\n\r\n let _mergedElementList = [...this.elements, ...Object.values(_elementMap)];\r\n\r\n const _updatedElementList = _mergedElementList.map(\r\n (elementDetails) => _elementMap[elementDetails.id] || elementDetails,\r\n );\r\n\r\n return this.merge({\r\n selectedIndex: this.selectedIndex,\r\n data: {\r\n ...this.data,\r\n elements: [...new Set(_updatedElementList)],\r\n total: total ? total : this.data.total,\r\n },\r\n });\r\n }\r\n\r\n updateElementListFromSocketPayload({ elements = [], total }) {\r\n const _elementMap = elements.reduce((elementMap, elementData) => {\r\n const payload = { response: { data: { result: elementData } } };\r\n elementMap[elementData.id] = new ElementDetails().setLoaded(payload);\r\n return elementMap;\r\n }, {});\r\n\r\n const elementsList = [...this.data.elements];\r\n for (let i = 0; i < elementsList.length; i++) {\r\n const element = elementsList[i];\r\n if (element.id in _elementMap) {\r\n elementsList[i].data = {\r\n ...element.data,\r\n ..._elementMap[element.id].data,\r\n };\r\n }\r\n }\r\n\r\n return this.merge({\r\n selectedIndex: this.selectedIndex,\r\n data: {\r\n ...this.data,\r\n elements: [...new Set(elementsList)],\r\n total: total ? total : this.data.total,\r\n },\r\n });\r\n }\r\n\r\n removeFromElementList({ elementIds = [], total }) {\r\n const _elementMap = elementIds.reduce((elementMap, elementId) => {\r\n elementMap[elementId] = true;\r\n return elementMap;\r\n }, {});\r\n const _updatedElementList = this.elements.filter(\r\n ({ id }) => !_elementMap[id],\r\n );\r\n return this.merge({\r\n selectedIndex: DEFAULT_SELECTED_INDEX - 1,\r\n data: {\r\n ...this.data,\r\n elements: _updatedElementList,\r\n total,\r\n },\r\n });\r\n }\r\n\r\n emptyElementList() {\r\n return this.merge({\r\n data: { ...this.data, elements: [] },\r\n selectedIndex: DEFAULT_SELECTED_INDEX,\r\n });\r\n }\r\n\r\n setSelectedIndex(index) {\r\n return this.merge({ selectedIndex: index });\r\n }\r\n\r\n getElement({ elementId }) {\r\n return this.data.elements\r\n .find((element) => elementId === element.id)\r\n .filter((element) => element.included === 1);\r\n }\r\n hasElement(elementId) {\r\n return !isNullOrUndefined(\r\n this.data.elements.find((element) => elementId === element.id),\r\n );\r\n }\r\n\r\n setShowElementSearchRefreshButton(payload) {\r\n return this.merge({ showElementSearchRefreshButton: payload });\r\n }\r\n setBatchSelectedItemsIds(elements) {\r\n const elementsCopy = {};\r\n for (const elem of elements) {\r\n elementsCopy[elem.id] = true;\r\n }\r\n return this.merge({ batchSelectedItemsIds: elementsCopy });\r\n }\r\n removeIdFromBatchSelectedItems(elementId) {\r\n const elementsCopy = this.batchSelectedItemsIds;\r\n if (elementId in elementsCopy) {\r\n delete elementsCopy[elementId];\r\n }\r\n return this.merge({ batchSelectedItemsIds: elementsCopy });\r\n }\r\n addIdToBatchSelectedItemsIds(elementId) {\r\n const elementsCopy = this.batchSelectedItemsIds;\r\n elementsCopy[elementId] = true;\r\n return this.merge({ batchSelectedItemsIds: elementsCopy });\r\n }\r\n}\r\n","import * as signalr from '@microsoft/signalr';\r\nimport { getStore } from 'store/store';\r\nimport { setSocketDisconnectAction } from 'store/actions/statement-socket-actions';\r\nimport { setProjectSocketDisconnectAction } from 'store/actions/project-socket-actions';\r\nimport { isInvalidUrl } from 'api/api-request-validator';\r\nimport { checkIfExistingTokenIsValidAndFetchNewIfExpired } from 'api/api-authentication';\r\n\r\nconst retryInterval = {\r\n 0: 0, // 0 seconds\r\n 1: 2000, // 2 seconds\r\n 2: 10000, // 10 seconds\r\n 3: 30000, // 30 seconds\r\n 4: 60000, // 60 seconds\r\n 5: 120000, // 120 seconds\r\n};\r\n\r\nconst globalClientConfig = {};\r\n\r\nexport default globalClientConfig;\r\n\r\nexport class SignalrClient {\r\n accessToken = null;\r\n autoConnect = false;\r\n callbackQueue = [];\r\n connection = null;\r\n isConnected = false;\r\n url = null;\r\n isProjectLevelConnection = false;\r\n geoCode = null;\r\n\r\n constructor(config) {\r\n this.connectWithRetry = this.connectWithRetry.bind(this);\r\n Object.assign(this, globalClientConfig, config);\r\n if (this.autoConnect) {\r\n this.connectWithRetry();\r\n }\r\n }\r\n\r\n async connect() {\r\n if (!this.accessToken || !this.url || !this.geoCode) {\r\n return false;\r\n }\r\n const { dispatch } = getStore();\r\n let connectionBuilder = new signalr.HubConnectionBuilder()\r\n .withUrl(\r\n `${window.TIEOUT.ENV.GEOS[this.geoCode].BASE_API_URL}${this.url}`,\r\n {\r\n accessTokenFactory: async () => {\r\n this.accessToken = await checkIfExistingTokenIsValidAndFetchNewIfExpired(\r\n this.geoCode,\r\n );\r\n return this.accessToken;\r\n },\r\n withCredentials: false,\r\n },\r\n )\r\n .configureLogging(signalr.LogLevel.Information);\r\n\r\n if (this.autoConnect) {\r\n connectionBuilder = connectionBuilder.withAutomaticReconnect({\r\n nextRetryDelayInMilliseconds: (retryContext) => {\r\n if (retryContext.elapsedMilliseconds < 120000) {\r\n // If we've been reconnecting for less than 120 seconds so far,\r\n const retryNumber = retryContext.previousRetryCount;\r\n return retryInterval[retryNumber];\r\n } else {\r\n // If we've been reconnecting for more than 240 seconds so far, stop reconnecting\r\n // and revert back to the original way of receiving data\r\n this.isProjectLevelConnection\r\n ? dispatch(setProjectSocketDisconnectAction(true))\r\n : dispatch(setSocketDisconnectAction(true));\r\n return null;\r\n }\r\n },\r\n });\r\n }\r\n // We do not want to build and start connection if url is inavlid for some reason\r\n // Although we will retry after few elapsed seconds again (if this.autoConnect is set to true)\r\n if (!isInvalidUrl(connectionBuilder.url)) {\r\n this.connection = connectionBuilder.build();\r\n this.connection.serverTimeoutInMilliseconds = 60000;\r\n this.connection.keepAliveIntervalInMilliseconds = 30000;\r\n this.connection.onreconnecting((error) => {\r\n if (error) console.warn(error);\r\n this.isProjectLevelConnection\r\n ? dispatch(setProjectSocketDisconnectAction(true))\r\n : dispatch(setSocketDisconnectAction(true));\r\n });\r\n this.connection.onreconnected((connectionId) => {\r\n this._setSocketConnectionState(connectionId);\r\n });\r\n try {\r\n await this.connection.start();\r\n this.isConnected = true;\r\n this.executeCallbacks();\r\n //store connectionId in local storage. Will need when we want to disconnect\r\n const connectionId = this.connection.connection.connectionId;\r\n this._setSocketConnectionState(connectionId);\r\n return true;\r\n } catch (error) {\r\n console.log(error);\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n _setSocketConnectionState = (connectionId) => {\r\n const { dispatch } = getStore();\r\n if (this.isProjectLevelConnection) {\r\n localStorage.setItem('projectConnectionId', connectionId);\r\n dispatch(setProjectSocketDisconnectAction(false));\r\n } else {\r\n localStorage.setItem('connectionId', connectionId);\r\n dispatch(setSocketDisconnectAction(false));\r\n }\r\n };\r\n async connectWithRetry() {\r\n if (this.isConnected) {\r\n return;\r\n }\r\n if (!this.accessToken && this.geoCode) {\r\n this.accessToken = await checkIfExistingTokenIsValidAndFetchNewIfExpired(\r\n this.geoCode,\r\n );\r\n this.autoConnect = true;\r\n }\r\n if (!(await this.connect())) {\r\n setTimeout(this.connectWithRetry, 30000);\r\n }\r\n }\r\n\r\n async disconnect() {\r\n if (!this.connection) {\r\n return false;\r\n }\r\n this.connection.close();\r\n return true;\r\n }\r\n\r\n queueCallback(callback) {\r\n if (this.isConnected) {\r\n callback();\r\n } else {\r\n this.callbackQueue.push(callback);\r\n }\r\n }\r\n\r\n executeCallbacks() {\r\n if (this.isConnected) {\r\n while (this.callbackQueue.length) {\r\n this.callbackQueue.shift()();\r\n }\r\n }\r\n }\r\n\r\n on(event, callback) {\r\n this.queueCallback(() => this.connection.on(event, callback));\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"path\", {\n d: \"M0 0h28v28H0z\"\n}), React.createElement(\"path\", {\n className: \"plus-circle-fill\",\n fill: \"#FFF\",\n d: \"M14 0C6.242 0 0 6.242 0 14s6.242 14 14 14 14-6.242 14-14S21.758 0 14 0z\"\n}), React.createElement(\"path\", {\n fill: \"#000\",\n className: \"plus-circle\",\n id: \"a\",\n d: \"M14 1.167c7.058 0 12.833 5.775 12.833 12.833S21.058 26.833 14 26.833 1.167 21.058 1.167 14 6.942 1.167 14 1.167zM14 0C6.242 0 0 6.242 0 14s6.242 14 14 14 14-6.242 14-14S21.758 0 14 0z\"\n}), React.createElement(\"path\", {\n fill: \"#000\",\n className: \"plus-plus\",\n id: \"b\",\n d: \"M22.167 13.417h-7.584V5.833c0-.35-.233-.583-.583-.583s-.583.233-.583.583v7.584H5.833c-.35 0-.583.233-.583.583s.233.583.583.583h7.584v7.584c0 .35.233.583.583.583s.583-.233.583-.583v-7.584h7.584c.35 0 .583-.233.583-.583s-.233-.583-.583-.583z\"\n}));\n\nvar SvgPlusCircle = function SvgPlusCircle(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgPlusCircle, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/plus-circle.1209903c.svg\";\nexport { ForwardRef as ReactComponent };","import { useRef, useEffect } from 'react';\r\n/** Taken from the React hooks docs https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state\r\n * Lets you store the previous value of a prop or local state variable in a functional component to mimic componentDidUpdate(prevState, prevProps)\r\n */\r\nexport const usePrevious = (value) => {\r\n // The ref object is a generic container whose current property is mutable ...\r\n // ... and can hold any value, similar to an instance property on a class\r\n const ref = useRef();\r\n\r\n // Store current value in ref\r\n useEffect(() => {\r\n ref.current = value;\r\n }, [value]); // Only re-run if value changes\r\n\r\n // Return previous value (happens before update in useEffect above)\r\n return ref.current;\r\n};\r\n","import React, { useState, useEffect, memo } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport TabModel from 'models/utils/common/tab-model';\r\n\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport classNames from 'classnames';\r\nimport FeatureFlagComponent from './feature-flag-component';\r\nimport shortid from 'shortid';\r\n\r\nconst TABS_GROUP_BLOCK = 'tabs-group';\r\n\r\nconst TabsGroup = ({\r\n tabsArray,\r\n className,\r\n id,\r\n selectedTab,\r\n onSelectTab,\r\n fullWidth,\r\n rightIcon,\r\n}) => {\r\n //this variable contains size of screen resolution\r\n const [, setScreenSize] = useState(window.innerWidth * window.innerHeight);\r\n\r\n /*this method is used to keep track of the screen resolution, and renders the tabs re-renders the tabs whenever the screen\r\n resolution changes and adds and removes the eventlistener as the mount and unmount of the component*/\r\n useEffect(() => {\r\n window.addEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n return () => {\r\n window.removeEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n };\r\n }, []);\r\n\r\n return (\r\n
          \r\n {tabsArray.map((tabModel, index) => (\r\n \r\n \r\n {\r\n onSelectTab(tabModel);\r\n }}\r\n >\r\n \r\n {rightIcon &&\r\n rightIcon.get(tabModel.id) &&\r\n rightIcon.get(tabModel.id).iconComponent && (\r\n \r\n {React.isValidElement(\r\n rightIcon.get(tabModel.id).iconComponent,\r\n ) && rightIcon.get(tabModel.id).iconComponent}\r\n
          \r\n )}\r\n \r\n \r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nTabsGroup.propTypes = {\r\n /** array of tab model objects containing internationalized ids and onClick handlers */\r\n tabsArray: PropTypes.arrayOf(PropTypes.instanceOf(TabModel)).isRequired,\r\n /** Custom classname applied to block level element */\r\n className: PropTypes.string,\r\n /** Unique id for this group of tabsArrayModels */\r\n id: PropTypes.string.isRequired,\r\n /** Model representing the currently selected tab */\r\n selectedTab: PropTypes.instanceOf(TabModel).isRequired,\r\n /** Function fired on tab selection */\r\n onSelectTab: PropTypes.func.isRequired,\r\n /** Boolean indicating if tab buttons spread out to take up the full width of the container or not.*/\r\n fullWidth: PropTypes.bool,\r\n /**Any icon to be displayed at right side of tab button*/\r\n rightIcon: PropTypes.object,\r\n};\r\n\r\nexport default memo(TabsGroup);\r\n","export const isProjectHasReservedClientName = (project) => {\r\n const { engagementEntity } = project;\r\n const RESERVED_CLIENT_NAME = 'Tie out support';\r\n\r\n if (engagementEntity && engagementEntity.clientName) {\r\n return (\r\n engagementEntity.clientName\r\n .toLowerCase()\r\n .indexOf(RESERVED_CLIENT_NAME.toLowerCase()) >= 0\r\n );\r\n }\r\n return false;\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M7.93739 0C3.55379 0 0 3.55379 0 7.93759C0 12.3212 3.55379 15.8751 7.93739 15.8751C12.321 15.8751 15.8748 12.3212 15.8748 7.93759C15.8748 3.55379 12.321 0 7.93739 0Z\",\n fill: \"#0076A8\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M12.3762 4.66283C12.2544 4.54098 12.0577 4.54098 11.936 4.66283L5.92222 10.6761L3.96102 8.71485C3.83926 8.593 3.64165 8.593 3.51989 8.71485C3.39813 8.83651 3.39813 9.03375 3.51989 9.1556L5.70212 11.3374C5.763 11.3981 5.84261 11.4286 5.92222 11.4286C6.00183 11.4286 6.08237 11.3981 6.14325 11.3374L12.3762 5.10349C12.4979 4.98173 12.4979 4.78458 12.3762 4.66283Z\",\n fill: \"white\",\n stroke: \"white\"\n});\n\nvar SvgVerified = function SvgVerified(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 16,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgVerified, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/verified.64c5e20e.svg\";\nexport { ForwardRef as ReactComponent };","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const getStatementSummaryNotesRequest = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/summary/notes`,\r\n );\r\n\r\nexport const getStatementSummaryElementsRequest = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/summary/elements`,\r\n );\r\n\r\nexport const getStatementSummarySectionsRequest = ({ revisionId }) =>\r\n withDefaultContextAsSelectedProject().get(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/summary/sectionreviews`,\r\n );\r\n","import BaseModel from 'models/base-model';\r\nimport shortid from 'shortid';\r\n\r\nimport { FORMULA_ROW_TYPES } from 'constants/feature/formula-constants';\r\n/**\r\n * Abstract class for different FormulaRow types (Number, Element, Operator).\r\n *\r\n * Should not be instantied by itself, it is meant to be extended by the above models.\r\n */\r\nexport default class FormulaRow extends BaseModel({\r\n key: null,\r\n value: '',\r\n type: null, //FormulaRowType\r\n rowError: false,\r\n}) {\r\n constructor(props) {\r\n super(props);\r\n this.key = shortid.generate();\r\n if (props) {\r\n this.value = props.value;\r\n }\r\n }\r\n hasRowError() {\r\n return this.rowError;\r\n }\r\n\r\n isManual() {\r\n return this.type === FORMULA_ROW_TYPES.NUMBER;\r\n }\r\n\r\n isElement() {\r\n return this.type === FORMULA_ROW_TYPES.ELEMENT;\r\n }\r\n\r\n isOperator() {\r\n return this.type === FORMULA_ROW_TYPES.OPERATOR;\r\n }\r\n}\r\n","const useHoverEffect = (classPrefix, ID) => {\r\n const handleMouseEnter = () => {\r\n const className = `${classPrefix}-${ID}`;\r\n const elements = document.querySelectorAll(`.${className}`);\r\n elements.forEach((element) =>\r\n element.classList.add(`${classPrefix}__hover-effect`),\r\n );\r\n };\r\n\r\n const handleMouseLeave = () => {\r\n const className = `${classPrefix}-${ID}`;\r\n const elements = document.querySelectorAll(`.${className}`);\r\n elements.forEach((element) =>\r\n element.classList.remove(`${classPrefix}__hover-effect`),\r\n );\r\n };\r\n\r\n return { handleMouseEnter, handleMouseLeave };\r\n};\r\n\r\nexport default useHoverEffect;\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\nimport { getStatementIdUtil } from 'utils/statement-export-utils';\r\n\r\nexport const addNavigationRequest = ({ revisionId, elementDetails }) =>\r\n withDefaultContextAsSelectedProject()\r\n .post(\r\n `/tieout/statements/${getStatementIdUtil()}/revisions/${revisionId}/addnavigation`,\r\n elementDetails,\r\n {\r\n params: {\r\n since: Date.now().toString(),\r\n },\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getStatementNavigationData = (projectId, revisionId) =>\r\n withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/clients/${parseInt(\r\n projectId,\r\n )}/revisions/${revisionId}/images/thumbnails`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getThumbnailBySectionId = ({ projectId, section }) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/clients/${parseInt(projectId)}/revisions/${\r\n section.revisionId\r\n }/guids/${section.storageGuid}/keyVersions/${\r\n section.keyVersion\r\n }/contentTypes/png`,\r\n {\r\n responseType: 'arraybuffer',\r\n },\r\n )\r\n .then((response) => {\r\n return response.data;\r\n });\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M12.25 1.16667H9.33333V0.583333C9.33333 0.233333 9.1 0 8.75 0H4.08333C3.73333 0 3.5 0.233333 3.5 0.583333V1.16667H0.583333C0.233333 1.16667 0 1.4 0 1.75V16.9167C0 17.2667 0.233333 17.5 0.583333 17.5H12.25C12.6 17.5 12.8333 17.2667 12.8333 16.9167V1.75C12.8333 1.4 12.6 1.16667 12.25 1.16667ZM4.66667 1.16667H8.16667V2.33333H4.66667V1.16667Z\",\n fill: \"#43B02A\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M9.50834 7.5442C9.74168 7.31087 10.0917 7.31087 10.325 7.5442C10.5583 7.77753 10.5583 8.12753 10.325 8.36087L5.65834 13.0275C5.54168 13.1442 5.42501 13.2025 5.25001 13.2025C5.07501 13.2025 4.95834 13.1442 4.84168 13.0275L2.50834 10.6942C2.27501 10.4609 2.27501 10.1109 2.50834 9.87753C2.74168 9.6442 3.09168 9.6442 3.32501 9.87753L5.25001 11.8025L9.50834 7.5442Z\",\n fill: \"white\"\n});\n\nvar SvgTaskReviewed = function SvgTaskReviewed(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 13,\n height: 18,\n viewBox: \"0 0 13 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgTaskReviewed, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/task-reviewed.cd2159f2.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.91683 1.41667H12.8335C13.1835 1.41667 13.4168 1.65 13.4168 2V17.1667C13.4168 17.5167 13.1835 17.75 12.8335 17.75H1.16683C0.816829 17.75 0.583496 17.5167 0.583496 17.1667V2C0.583496 1.65 0.816829 1.41667 1.16683 1.41667H4.0835V0.833333C4.0835 0.483333 4.31683 0.25 4.66683 0.25H9.3335C9.6835 0.25 9.91683 0.483333 9.91683 0.833333V1.41667ZM8.75024 1.41406H5.25024V2.58073H8.75024V1.41406ZM12.2502 16.5859H1.75024V2.58594H4.08358V3.16927C4.08358 3.51927 4.31691 3.7526 4.66691 3.7526H9.33358C9.68358 3.7526 9.91691 3.51927 9.91691 3.16927V2.58594H12.2502V16.5859ZM10.9087 8.60885C11.142 8.37552 11.142 8.02552 10.9087 7.79219C10.6753 7.55885 10.3253 7.55885 10.092 7.79219L5.83366 12.0505L3.90866 10.1255C3.67533 9.89219 3.32533 9.89219 3.09199 10.1255C2.85866 10.3589 2.85866 10.7089 3.09199 10.9422L5.42533 13.2755C5.54199 13.3922 5.65866 13.4505 5.83366 13.4505C6.00866 13.4505 6.12533 13.3922 6.24199 13.2755L10.9087 8.60885Z\",\n fill: \"#0076A8\"\n});\n\nvar SvgTask = function SvgTask(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 14,\n height: 18,\n viewBox: \"0 0 14 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgTask, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/task.69dd578d.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M6.335 12.085H9.50769L11.4227 14L9.50768 15.915H6.335V12.085Z\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M13.75 14H23.75\",\n stroke: \"black\",\n strokeWidth: 1.17\n});\n\nvar SvgCalloutsDirectionSetterLeft = function SvgCalloutsDirectionSetterLeft(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 29,\n viewBox: \"0 0 29 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCalloutsDirectionSetterLeft, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/callouts-direction-setter-left.8b398572.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"path\", {\n d: \"M0 0h28v28H0z\"\n}), React.createElement(\"path\", {\n className: \"icon-path filter\",\n fill: \"#000\",\n d: \"M13.938 1.223c7.02 0 12.732 5.71 12.732 12.732 0 7.02-5.712 12.734-12.732 12.734-7.021 0-12.733-5.713-12.733-12.734S6.917 1.223 13.938 1.223zm0-1.159C6.266.064.047 6.284.047 13.954c0 7.672 6.22 13.891 13.89 13.891 7.672 0 13.89-6.219 13.89-13.89 0-7.672-6.218-13.89-13.89-13.89zm-1.159 22.573a.58.58 0 0 1-.577-.58v-7.83L5.464 8.611a.58.58 0 0 1 .37-1.024H22.04a.58.58 0 0 1 .37 1.024l-6.737 5.614v6.096a.577.577 0 0 1-.231.462l-2.315 1.738a.579.579 0 0 1-.348.115zM7.433 8.747l5.717 4.763a.581.581 0 0 1 .208.445V20.9l1.159-.868v-6.078c0-.172.076-.334.208-.445l5.717-4.764H7.433z\"\n}));\n\nvar SvgFilter = function SvgFilter(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFilter, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/filter.f3993336.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport TabsGroup from 'components/common/tabs-group-component';\r\nimport TabModel from 'models/utils/common/tab-model';\r\n\r\nimport { DATA_GRID_BLOCK } from './data-grid-component';\r\nimport { DataGridFilter } from './data-grid-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nimport { ReactComponent as FilterIcon } from 'icons/filter.svg';\r\nimport classNames from 'classnames';\r\n\r\nconst FILTER_ICON_SIZE = '28px';\r\n\r\nconst DataGridHeader = ({\r\n tableId,\r\n filters,\r\n title,\r\n rightHeaderButton,\r\n tabsArray,\r\n selectedTab,\r\n onSelectTab,\r\n className,\r\n rightIcon,\r\n}) => {\r\n const HEADER_BLOCK = `${DATA_GRID_BLOCK}__header`;\r\n const _shouldDisplayFilters = () => filters && filters.length > 0;\r\n const _shouldDisplayTabs = () =>\r\n !isNullOrUndefined(tabsArray) && tabsArray.length > 0;\r\n return (\r\n
          \r\n {title && (\r\n

          \r\n \r\n

          \r\n )}\r\n {_shouldDisplayTabs() && (\r\n \r\n )}\r\n {_shouldDisplayFilters() && (\r\n \r\n )}\r\n {rightHeaderButton ? (\r\n
          \r\n {rightHeaderButton}\r\n
          \r\n ) : null}\r\n
          \r\n );\r\n};\r\n\r\nDataGridHeader.propTypes = {\r\n /** Unique key string for each table, should be same value as tableId passed to sibling DataGrid */\r\n tableId: PropTypes.string.isRequired,\r\n /** Array of TabModels if tabs are desired */\r\n tabsArray: PropTypes.arrayOf(PropTypes.instanceOf(TabModel)),\r\n /** Array of filter model definitions, passing an array causes the filter icon to be displayed */\r\n filters: PropTypes.arrayOf(PropTypes.instanceOf(DataGridFilter)),\r\n /** Table header */\r\n title: PropTypes.string,\r\n /** An optional right header button for the data grid header */\r\n rightHeaderButton: PropTypes.instanceOf(Object),\r\n /** Model representing the currently selected tab */\r\n selectedTab: PropTypes.instanceOf(TabModel).isRequired,\r\n /** Function fired on tab selection */\r\n onSelectTab: PropTypes.func.isRequired,\r\n /**Will be used apply external classname over this component */\r\n className: PropTypes.string,\r\n /**Any icon to be displayed at right side of tab button*/\r\n rightIcon: PropTypes.object,\r\n};\r\n\r\nexport default memo(DataGridHeader);\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class Country extends BaseModel({\r\n geoCode: '',\r\n description: null,\r\n memberFirmCode: '',\r\n countryCode: '',\r\n countryName: '',\r\n containerId: null,\r\n containerCode: '',\r\n containerName: '',\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport Country from 'models/data/country-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { MenuOption } from '../utils/common/menu/menu-option-model';\r\nimport { isArray } from 'lodash';\r\nexport default class CountryForm extends ApiModel({\r\n data: {\r\n countriesList: [],\r\n countriesOptions: [],\r\n },\r\n}) {\r\n get countriesList() {\r\n if (isArray(this.data.countriesList)) {\r\n return this.data.countriesList;\r\n }\r\n return [];\r\n }\r\n get countriesOptions() {\r\n if (!isNullOrUndefined(this.data.countriesOptions)) {\r\n return this.data.countriesOptions;\r\n }\r\n return [];\r\n }\r\n\r\n getCountryMenuOptionByGeoCode(geoCode) {\r\n const geoSpecificCountries = this.countriesList.filter(\r\n (value) => value.geoCode === geoCode,\r\n );\r\n return geoSpecificCountries.length\r\n ? geoSpecificCountries.map((item) => {\r\n return new MenuOption({\r\n id: item.countryCode,\r\n title: item.countryName,\r\n value: `${item.containerCode}-${item.countryCode}`,\r\n isIntl: false,\r\n });\r\n })\r\n : [];\r\n }\r\n\r\n processResponse(response) {\r\n const countries = response.data;\r\n return {\r\n data: {\r\n countriesList: countries.map((country) => {\r\n return new Country(country);\r\n }),\r\n countriesOptions: countries.map((item) => {\r\n return new MenuOption({\r\n id: item.countryCode,\r\n title: item.countryName,\r\n value: `${item.containerCode}-${item.countryCode}`,\r\n isIntl: false,\r\n });\r\n }),\r\n },\r\n };\r\n }\r\n\r\n getCountryDetailsByCountryCode(countryCode) {\r\n return this.countriesList.find(\r\n (country) => country.countryCode === countryCode,\r\n );\r\n }\r\n}\r\n","import { getAPIClient } from 'api/api-client';\r\nimport axios from 'axios';\r\n\r\nexport const urlForUndeterminedGeoKey =\r\n 'http://tieout.aaps.deloitte.com/fail-this-request-for-undetermined-geo';\r\n\r\nexport const isInvalidUrl = (url) =>\r\n url\r\n .split('/')\r\n .some((urlParam) => ['null', 'NaN', 'undefined'].includes(urlParam));\r\n\r\nexport const globalApiRequestValidator = (geoKey) => {\r\n const apiClient = getAPIClient(geoKey);\r\n apiClient.api.interceptors.request.use((requestConfig) => {\r\n console.debug('going to make api call for geo:', geoKey);\r\n if (isInvalidUrl(requestConfig.url)) {\r\n console.warn(\r\n 'null or NaN data detected in url path. Hence aborting the request:',\r\n requestConfig.url,\r\n );\r\n console.trace();\r\n return Promise.reject(requestConfig);\r\n } else if (requestConfig.baseURL === urlForUndeterminedGeoKey) {\r\n return Promise.reject(requestConfig).catch((err) => {\r\n console.warn(\r\n 'invalid axios instance as geoKey could not be determined from project id',\r\n err,\r\n );\r\n console.trace();\r\n });\r\n }\r\n return requestConfig;\r\n });\r\n};\r\n\r\n// creating temporary geokey instance when geokey is not determined from project id\r\nexport const getAxiosInstance = () => {\r\n let axiosInstance = {};\r\n axiosInstance['api'] = axios.create({\r\n baseURL: urlForUndeterminedGeoKey,\r\n });\r\n return axiosInstance;\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { getFeatureInfoForAllGeos } from 'api/tieout-info-api';\r\n\r\nexport const featureInfoLoading = createAction('FEATURE_INFO_LOADING');\r\nexport const featureInfoError = createAction('FEATURE_INFO_ERROR');\r\nexport const featureInfoLoaded = createAction('FEATURE_INFO_LOADED');\r\n\r\nexport const fetchFeatureInfoForAllGeos = () => async (dispatch) => {\r\n dispatch(featureInfoLoading());\r\n try {\r\n const response = await getFeatureInfoForAllGeos();\r\n const geoToFeatureFlagMap = {};\r\n response.forEach((buildInfoDetails) => {\r\n const { data: { springProfiles = '', featureConfig } = {} } =\r\n buildInfoDetails;\r\n //we are getting springProfiles value as 'geo-env' i.e 'ame-qa'.\r\n // I am extracting geo information to create geoToFeatureFlagMap.\r\n const [geoCodeValue] = springProfiles.split('-');\r\n const geoCodeInUpperCase = geoCodeValue.toUpperCase();\r\n geoToFeatureFlagMap[geoCodeInUpperCase] = featureConfig;\r\n });\r\n await dispatch(\r\n featureInfoLoaded({\r\n response: geoToFeatureFlagMap,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(featureInfoError(error));\r\n }\r\n};\r\n","import { getStatementWorkflowStepsMetaData } from 'api/statement-api';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const setStatementWorkflowStepsLoading = createAction(\r\n 'SET_STATEMENT_WORKFLOWS_STEPS_LOADING',\r\n);\r\nexport const setStatementWorkflowStepsLoaded = createAction(\r\n 'SET_STATEMENT_WORKFLOWS_STEPS_LOADED',\r\n);\r\nexport const setStatementWorkflowStepsError = createAction(\r\n 'SET_STATEMENT_WORKFLOWS_STEPS_ERROR',\r\n);\r\n\r\nexport const getStatementWorkflowStepsRequest =\r\n () => async (dispatch, getState) => {\r\n dispatch(setStatementWorkflowStepsLoading());\r\n try {\r\n const response = await getStatementWorkflowStepsMetaData();\r\n dispatch(setStatementWorkflowStepsLoaded(response));\r\n } catch (e) {\r\n dispatch(setStatementWorkflowStepsError(e));\r\n }\r\n };\r\n","import FormulaRowElement from 'models/data/formula/formula-row-element-model';\r\nimport FormulaRowNumber from 'models/data/formula/formula-row-number-model';\r\nimport { FORMULA_ROW_TYPES } from 'constants/feature/formula-constants';\r\nimport {\r\n COPY_SUCCESS,\r\n COPY_FAILED,\r\n} from '../store/actions/copy-formula-actions';\r\n\r\n//Calculate positions and gew new formula rows for the target element.\r\nexport const _getNewRowsForTargetElement = (\r\n srcElement,\r\n targetElement,\r\n copiedRows,\r\n tableMatrix,\r\n) => {\r\n try {\r\n let firstNonUndefinedIndex = tableMatrix.findIndex(\r\n (el) => el !== undefined,\r\n );\r\n let isAtleastOneElementFound = false; // if no elements or numbers found, we should see the error.\r\n //loop through copied rows and change only elements with new positions and retain operators and numbers\r\n const newRows = copiedRows.map((row) => {\r\n // find the difference in row wise and column wise postions between source and target elements.\r\n let rowIndexDiff =\r\n tableMatrix[targetElement].row - tableMatrix[srcElement].row;\r\n let columnIndexDiff =\r\n tableMatrix[targetElement].column - tableMatrix[srcElement].column;\r\n switch (row.type) {\r\n case FORMULA_ROW_TYPES.ELEMENT: {\r\n let targetRowElement;\r\n let targetRowElementPos;\r\n try {\r\n let targetRowElementRowColumn = [\r\n tableMatrix[row.elementData.id].row + rowIndexDiff,\r\n tableMatrix[row.elementData.id].column + columnIndexDiff,\r\n ];\r\n targetRowElementPos =\r\n tableMatrix\r\n // Since the array can consist of lot of undefined values behind,\r\n // so I choose to start from first non-undefined index.\r\n // Pardon me for calling it 'non-undefined'.\r\n // I choose to call it that way since 'undefined' is a keyword here.\r\n .slice(firstNonUndefinedIndex)\r\n .findIndex(\r\n (ele) =>\r\n ele &&\r\n ele.row === targetRowElementRowColumn[0] &&\r\n ele.column === targetRowElementRowColumn[1],\r\n ) + firstNonUndefinedIndex;\r\n\r\n targetRowElement = tableMatrix[targetRowElementPos];\r\n } catch (e) {\r\n //incase if there is any exception while trying to get the targetRowElement, ignore it since we are validating targetRowElement below.\r\n }\r\n if (targetRowElement) {\r\n isAtleastOneElementFound = true;\r\n return new FormulaRowElement({\r\n elementData: {\r\n id: targetRowElementPos,\r\n },\r\n });\r\n } else {\r\n //if element not found , add 0 to the formula.\r\n return new FormulaRowNumber({\r\n value: 0,\r\n });\r\n }\r\n }\r\n case FORMULA_ROW_TYPES.NUMBER: {\r\n isAtleastOneElementFound = true;\r\n return row;\r\n }\r\n default:\r\n return row;\r\n }\r\n });\r\n return isAtleastOneElementFound ? newRows : null;\r\n } catch (e) {\r\n return null;\r\n //TODO: can set error in copyFormula state in the store.\r\n }\r\n};\r\n\r\n//get table from the selected element.\r\nexport const getCurrentTable = (elementId) => {\r\n // If ElementId is null, return null and don't initiate copy formula\r\n let tag =\r\n elementId &&\r\n document.getElementById(`CFTO_ELEMENT_${elementId}`) &&\r\n document.getElementById(`CFTO_ELEMENT_${elementId}`).parentNode;\r\n while (tag && tag.tagName !== 'TABLE') {\r\n tag = tag.parentNode;\r\n }\r\n return tag;\r\n};\r\n\r\nexport const removeUnwantedColumn = (dataTable, maxColumnValue) => {\r\n let emptyColumns = [];\r\n let firstNonUndefinedIndex = dataTable.findIndex((ele) => ele !== undefined);\r\n for (let i = 0; i < maxColumnValue; i++) {\r\n if (dataTable.findIndex((ele) => ele && ele.column === i) === -1)\r\n emptyColumns.push(i);\r\n }\r\n dataTable.slice(firstNonUndefinedIndex).forEach((elementData) => {\r\n elementData &&\r\n (dataTable[elementData.elementId] = {\r\n elementId: elementData.elementId,\r\n value: elementData.value,\r\n row: elementData.row,\r\n column:\r\n elementData.column -\r\n emptyColumns.reduce(\r\n (prevValue, currentValue) =>\r\n currentValue < elementData.column ? prevValue + 1 : prevValue,\r\n 0,\r\n ),\r\n });\r\n });\r\n return dataTable;\r\n};\r\n\r\nexport const triggerPopUpStatusForCopyFormula = (\r\n copyFormulaResult,\r\n elementIds,\r\n) => {\r\n let elementWiseStats = [];\r\n let successMessageDto = [];\r\n let failureMessageDto = [];\r\n\r\n // I intend to create the below structure in elementWiseStats\r\n /**ElementID |\tFormula Pasted |\tFormula Did not pasted\r\n * -------------------------------------------------\r\n 1\t 1 2\r\n 2\t 3\t 2\r\n 3\t 2\t 1\r\n 4\t 3\t 3\r\n 5\t 1\t 3\r\n */\r\n elementIds.forEach((id, index) => {\r\n elementWiseStats.push({\r\n elementId: id,\r\n numberOfSuccessfulPaste: copyFormulaResult.filter(\r\n (ele) => ele.elementId === id && ele.copyFormulaStatus === COPY_SUCCESS,\r\n ).length,\r\n numberOfFailedPaste: copyFormulaResult.filter(\r\n (ele) => ele.elementId === id && ele.copyFormulaStatus === COPY_FAILED,\r\n ).length,\r\n });\r\n });\r\n\r\n // I intend to create the below structure in successMessageDto.\r\n // This is derived from elementWiseStats\r\n /**NumberOfElements |\t NumberOfFormulaSuccesfullyPasted\r\n * -------------------------------------------------\r\n 2 1\r\n 2 3\r\n 1 2\r\n */\r\n /** It can be interpreted as :\r\n * There is 2 elements for which 1 formula is succesfully pasted\r\n * There is 1 element for which 3 formula is successfully pasted\r\n * There is 1 element for which 2 formula is successfully pasted\r\n */\r\n /**The similar kind of structure is there in failureMessageDto*/\r\n elementWiseStats.forEach((stats, index) => {\r\n /**numberOfSameSuccessElements - Number of elements for which same amount of formula is successfully pasted */\r\n let numberOfSameSuccessElements = elementWiseStats.filter(\r\n (ele) => ele.numberOfSuccessfulPaste === stats.numberOfSuccessfulPaste,\r\n ).length;\r\n /**numberOfSameFailedElements - Number of elements for which same amount of formula has been failed to paste */\r\n let numberOfSameFailedElements = elementWiseStats.filter(\r\n (ele) => ele.numberOfFailedPaste === stats.numberOfFailedPaste,\r\n ).length;\r\n if (\r\n successMessageDto.findIndex(\r\n (ele) =>\r\n stats.numberOfSuccessfulPaste === ele.numberOfSuccessfulPaste &&\r\n numberOfSameSuccessElements === ele.numberOfElements,\r\n ) === -1 &&\r\n stats.numberOfSuccessfulPaste > 0\r\n ) {\r\n successMessageDto.push({\r\n numberOfSuccessfulPaste: stats.numberOfSuccessfulPaste,\r\n numberOfElements: numberOfSameSuccessElements,\r\n });\r\n }\r\n if (\r\n failureMessageDto.findIndex(\r\n (ele) =>\r\n stats.numberOfFailedPaste === ele.numberOfFailedPaste &&\r\n numberOfSameFailedElements === ele.numberOfElements,\r\n ) === -1 &&\r\n stats.numberOfFailedPaste > 0\r\n ) {\r\n failureMessageDto.push({\r\n numberOfFailedPaste: stats.numberOfFailedPaste,\r\n numberOfElements: numberOfSameFailedElements,\r\n });\r\n }\r\n });\r\n return { successMessageDto, failureMessageDto };\r\n};\r\n","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { REACT_SECTION_ID_PREFIX } from 'constants/feature/statement-content-constants';\r\n\r\nexport default class ContentCSSSelector extends BaseModel({\r\n sectionId: null,\r\n selector: null,\r\n isElementHighlight: null,\r\n}) {\r\n get fullSelctor() {\r\n if (this.hasValidSelector()) {\r\n return `#${REACT_SECTION_ID_PREFIX}${this.sectionId} ${this.selector}`;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n hasValidSelector() {\r\n return (\r\n !isNullOrUndefined(this.sectionId) && !isNullOrUndefined(this.selector)\r\n );\r\n }\r\n isElementHighlight() {\r\n return !isNullOrUndefined(this.isElementHighlight);\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\n\r\nimport { getAllRevisionElementsRequest } from 'api/element-api.js';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\n\r\nexport const comparePanelLoading = createAction('COMPARE_STATS_LOADING');\r\nexport const comparePanelLoaded = createAction('COMPARE_STATS_LOADED');\r\nexport const comparePanelError = createAction('COMPARE_STATS_ERROR');\r\n\r\nexport const fetchComparePanelForRevision = ({ revisionId }) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n if (getState().ui.statementPage.panels.left !== LEFT_PANELS.COMPARE) return;\r\n dispatch(comparePanelLoading());\r\n try {\r\n const response = await getAllRevisionElementsRequest({ revisionId });\r\n dispatch(comparePanelLoaded({ response }));\r\n } catch (error) {\r\n dispatch(comparePanelError(error));\r\n }\r\n};\r\n","import { isNullOrUndefined } from './object-utils';\r\n\r\nexport const getArrayWithNewSection = (\r\n tree,\r\n section,\r\n parentId,\r\n inline,\r\n isSectionAlreadyInTree,\r\n) => {\r\n let isSectionAdded = false;\r\n if (tree.children) {\r\n tree.children.forEach((children, index) => {\r\n //case one: section is already in tree, wee need to add a child to the existing node with the same section id.\r\n if (isSectionAlreadyInTree) {\r\n // if current children has the same section id\r\n if (children.id === section.id && !children.isNew) {\r\n if (children.children) {\r\n if (inline) {\r\n tree.children.splice(index + 1, 0, section);\r\n } else {\r\n children.children.unshift(section);\r\n }\r\n } else {\r\n if (inline) {\r\n tree.children.splice(index + 1, 0, section);\r\n } else {\r\n children.children = [section];\r\n }\r\n }\r\n isSectionAdded = true;\r\n return isSectionAdded;\r\n } else {\r\n //if not, it calls himself with the new tree data\r\n if (!isSectionAdded) {\r\n isSectionAdded = getArrayWithNewSection(\r\n children,\r\n section,\r\n parentId,\r\n inline,\r\n isSectionAlreadyInTree,\r\n );\r\n }\r\n }\r\n } else {\r\n //case 2 the section id does not exist in the tree so we need to append the new section to a node\r\n if (children.id === parentId) {\r\n if (inline) {\r\n tree.children.splice(index + 1, 0, section);\r\n } else {\r\n const indentParent = tree.children[index];\r\n if (indentParent.children) {\r\n indentParent.children.push(section);\r\n } else {\r\n indentParent.children = [section];\r\n }\r\n }\r\n isSectionAdded = true;\r\n return isSectionAdded;\r\n } else {\r\n if (!isSectionAdded) {\r\n isSectionAdded = getArrayWithNewSection(\r\n children,\r\n section,\r\n parentId,\r\n inline,\r\n isSectionAlreadyInTree,\r\n );\r\n }\r\n }\r\n }\r\n });\r\n }\r\n return isSectionAdded;\r\n};\r\n//function to delete section added when the modal opened and when the modal closes\r\nexport const deleteNewSection = (tree, sectionId) => {\r\n let isSectionDeleted = false;\r\n if (tree.children) {\r\n tree.children.forEach((children, index) => {\r\n if (children.id === sectionId && children.isNew) {\r\n if (tree.children.length === 1) {\r\n tree.children = null;\r\n } else {\r\n tree.children.splice(index, 1);\r\n }\r\n isSectionDeleted = true;\r\n return isSectionDeleted;\r\n } else {\r\n if (!isSectionDeleted) {\r\n isSectionDeleted = deleteNewSection(children, sectionId);\r\n }\r\n }\r\n });\r\n }\r\n return isSectionDeleted;\r\n};\r\n//function to verify if a section is already in the tree\r\nexport const isSectionInTree = (tree, parentId) => {\r\n let isSection = false;\r\n if (tree.id === parentId) {\r\n isSection = true;\r\n return isSection;\r\n } else {\r\n if (tree.children) {\r\n tree.children.forEach((children) => {\r\n if (!isSection) {\r\n isSection = isSectionInTree(children, parentId);\r\n }\r\n });\r\n }\r\n }\r\n return isSection;\r\n};\r\n\r\n//function to get tree in section\r\nexport const getTreeBySectionId = (tree, sectionId) => {\r\n let selectedTree = null;\r\n if (tree.id === sectionId) {\r\n selectedTree = tree;\r\n return selectedTree;\r\n } else {\r\n if (tree.children) {\r\n tree.children.forEach((children) => {\r\n if (!selectedTree) {\r\n selectedTree = getTreeBySectionId(children, sectionId);\r\n }\r\n });\r\n }\r\n }\r\n return selectedTree;\r\n};\r\n\r\nexport const isRootLevelSection = (tree, parentId) => {\r\n let parentSection = getTreeBySectionId({ children: tree }, parentId);\r\n\r\n return (\r\n isNullOrUndefined(parentSection) ||\r\n isNullOrUndefined(parentSection.parentId)\r\n );\r\n};\r\n","import React from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as TaskReviewedIcon } from 'icons/task-reviewed.svg';\r\nimport { ReactComponent as TaskIcon } from 'icons/task.svg';\r\nimport { SectionReviewList } from 'models/api/section-review-list-api-model';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport SectionAssignmentsList from 'models/api/section-assignments-list-api-model';\r\nimport { getUserNameByUserId } from 'utils/statement-content-page-utils';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const SECTION_ANCHOR_BLOCK = 'section-anchor';\r\nexport const SECTION_ANCHOR_BLOCK_ID = 'section-anchor-id';\r\nexport const REVIEW_ICON_SIZE = '16px';\r\n\r\nexport const getInitials = (string) => {\r\n if (isNullOrUndefined(string)) return;\r\n const initials = string.replace(/[^a-zA-Z- ]/g, '').match(/\\b\\w/g);\r\n return initials[0] + initials[1];\r\n};\r\n\r\nconst SectionAnchor = ({\r\n id,\r\n name,\r\n children,\r\n sectionId,\r\n sectionReview,\r\n shouldRenderIcon,\r\n sectionAssignments,\r\n handleElementClick,\r\n sectionReviewTooltip,\r\n isCursorAlias,\r\n shouldSectionAnchorDisabled,\r\n isSectionSelected,\r\n section,\r\n color,\r\n displayElementDetailsOnStatementPage,\r\n}) => {\r\n const renderIcon = () => {\r\n if (!shouldRenderIcon) {\r\n return null;\r\n }\r\n const hasBeenReviewed = sectionReview.hasSectionBeenReviewed(sectionId);\r\n if (hasBeenReviewed) {\r\n return (\r\n \r\n );\r\n }\r\n return (\r\n \r\n );\r\n };\r\n\r\n const shouldAssignmentInitialsBeRendered = (userId, sectionId) => {\r\n if (sectionId in sectionReview.sectionReviewsMap) {\r\n return !(userId in sectionReview.sectionReviewsMap[sectionId]);\r\n }\r\n return true;\r\n };\r\n return section && !section.isTechnical ? (\r\n {\r\n handleElementClick(sectionId, color);\r\n }}\r\n >\r\n {/* TODO: Add logic in the future so that technical sections \r\n do not have this icon showing. We likely only want it to be shown for \r\n non-technical sections. BE work is needed to make this check more robust \r\n and scalable however. */}\r\n {displayElementDetailsOnStatementPage && (\r\n <>\r\n {renderIcon()}\r\n {/* If this class name is changed \"__section-reviewers\", then we must change it in \r\n section-content-component.scss */}\r\n
          \r\n {sectionReviewTooltip()}\r\n
          \r\n
          \r\n {sectionAssignments.sectionAssignments\r\n .filter(\r\n (assignments) =>\r\n assignments.sectionId === sectionId &&\r\n shouldAssignmentInitialsBeRendered(\r\n assignments.userId,\r\n assignments.sectionId,\r\n ),\r\n )\r\n .map((assignment, index) => (\r\n \r\n }\r\n isNotInternationalized\r\n >\r\n \r\n {getInitials(getUserNameByUserId(assignment.userId))}\r\n
          \r\n \r\n ))}\r\n \r\n \r\n )}\r\n {children}\r\n \r\n ) : null;\r\n};\r\n\r\nSectionAnchor.defaultProps = {\r\n shouldRenderIcon: true,\r\n};\r\n\r\nSectionAnchor.propTypes = {\r\n /** unique html id for this section anchor (should be CFTO_SECTION_XXXXXXX) */\r\n id: PropTypes.string.isRequired,\r\n /** Unique number id for this section */\r\n sectionId: PropTypes.number.isRequired,\r\n /** name attribute for section anchor, NOTE: probably can be filtered/deleted if we decide we don't need it */\r\n name: PropTypes.string,\r\n /** contains list of section reviews */\r\n sectionReview: PropTypes.instanceOf(SectionReviewList).isRequired,\r\n /** boolean to render section anchor icon */\r\n shouldRenderIcon: PropTypes.bool,\r\n /** A reference to the assignments of the selected section */\r\n sectionAssignments: PropTypes.instanceOf(SectionAssignmentsList).isRequired,\r\n /** this function is used mediator to have handle API call triggering in side by side view */\r\n sectionReviewTooltip: PropTypes.func,\r\n /** this function is used mediator to have handle API call triggering in side by side view */\r\n handleElementClick: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default SectionAnchor;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { SectionReviewList } from 'models/api/section-review-list-api-model';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport {\r\n SECTION_ANCHOR_BLOCK_ID,\r\n SECTION_ANCHOR_BLOCK,\r\n getInitials,\r\n} from 'components/feature/statement-content-panel/section-anchor-component';\r\n\r\nexport const SectionReview = (props) => {\r\n const { sectionReview, sectionId } = props;\r\n return (\r\n <>\r\n {Array.isArray(sectionReview.sectionReviews) &&\r\n sectionReview.sectionReviews\r\n .filter((review) => review.sectionId === sectionId)\r\n .map((review, index) => (\r\n \r\n }\r\n isNotInternationalized\r\n >\r\n
          \r\n {getInitials(review.appUserName)}\r\n
          \r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nSectionReview.propTypes = {\r\n sectionReview: PropTypes.instanceOf(SectionReviewList).isRequired,\r\n};\r\n","import React from 'react';\r\nimport { connect, useSelector } from 'react-redux';\r\nimport { useLocation } from 'react-router-dom';\r\nimport { onSectionClick } from 'store/actions/statement-content-actions';\r\nimport SectionAnchor from 'components/feature/statement-content-panel/section-anchor-component';\r\nimport { SectionReview } from 'components/feature/statement-content-panel/_section-Review-Tooltip';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport {\r\n toggleFormulaCancelModal,\r\n openSectionPanelAfterCancelConfirmAction,\r\n storeSelectedSectionIdAction,\r\n toggleInternalReferenceCancelModal,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\n\r\nexport const SectionAnchorHOC = (props) => {\r\n const {\r\n sectionReview,\r\n leftSideView,\r\n sectionId,\r\n leftSectionReview,\r\n onSectionClick,\r\n toggleFormulaCancelModal,\r\n openSectionPanelAfterCancelConfirmAction,\r\n storeSelectedSectionIdAction,\r\n toggleInternalReferenceCancelModal,\r\n selectModeId,\r\n } = props;\r\n const pathName = useLocation().pathname;\r\n\r\n const { isSectionSelected, section, color } = useSelector((store) => {\r\n const selectedSection =\r\n pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE) && leftSideView\r\n ? store.data.leftStatementContent.leftSelectedSection[sectionId]\r\n : store.ui.statementPage.selectedSectionsMap[sectionId];\r\n\r\n const contentSectionMap =\r\n pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE) && leftSideView\r\n ? store.data.leftStatementContent.leftSectionsCache\r\n .leftContentSectionMap\r\n : store.data.statementContent.sectionsCache.contentSectionMap;\r\n return {\r\n isSectionSelected: !!selectedSection,\r\n color: selectedSection ? selectedSection.color : null,\r\n section: Object.values(contentSectionMap.map).find(\r\n (entry) => entry.id === sectionId,\r\n ),\r\n };\r\n });\r\n\r\n const handleElementClick = (sectionId, color) => {\r\n if (pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE)) {\r\n return () => {};\r\n } else {\r\n if (selectModeId === ELEMENT_SELECT_MODES.FORMULA.id) {\r\n toggleFormulaCancelModal(true);\r\n storeSelectedSectionIdAction(sectionId);\r\n openSectionPanelAfterCancelConfirmAction(true);\r\n } else if (selectModeId === ELEMENT_SELECT_MODES.INTERNAL_REFERENCE.id) {\r\n toggleInternalReferenceCancelModal(true);\r\n storeSelectedSectionIdAction(sectionId);\r\n openSectionPanelAfterCancelConfirmAction(true);\r\n } else {\r\n onSectionClick({ sectionId, color: color, sectionClick: true });\r\n }\r\n }\r\n };\r\n\r\n return (\r\n (\r\n \r\n )}\r\n >\r\n );\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n sectionPanel,\r\n leftStatementContent,\r\n statementSummary: {\r\n statementSummaryElementsDisplay: { displayElementDetailsOnStatementPage },\r\n },\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { selectMode },\r\n },\r\n },\r\n}) => ({\r\n sectionReview: sectionPanel.sectionReviewList,\r\n sectionAssignments: sectionPanel.sectionAssignmentsList,\r\n leftSectionReview: leftStatementContent.leftSectionReviewsList,\r\n selectModeId: selectMode.id,\r\n displayElementDetailsOnStatementPage,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n onSectionClick,\r\n toggleFormulaCancelModal,\r\n toggleInternalReferenceCancelModal,\r\n storeSelectedSectionIdAction,\r\n openSectionPanelAfterCancelConfirmAction,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(SectionAnchorHOC);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { useLocation } from 'react-router-dom';\r\nimport NoteAnchor from 'components/feature/statement-content-panel/note-anchor-component';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport Note from 'models/data/note-model';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport {\r\n toggleInternalReferenceCancelModal,\r\n toggleFormulaCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\nimport { changeIsNewPropertyFromSelectedNote } from 'store/actions/notes-panel-actions';\r\nimport { selectNoteFromContentPanel } from 'store/actions/notes-panel-actions';\r\nimport { STATEMENT_PSEUDO_ELEMENT_ID_PREFIX } from 'constants/feature/statement-content-constants';\r\n\r\nexport const NoteAnchorHOC = (props) => {\r\n const pathName = useLocation().pathname;\r\n const { leftSideView } = props;\r\n const handleNoteClick = (\r\n event,\r\n selectMode,\r\n note,\r\n pseudoElementId,\r\n onNoteClick,\r\n ) => {\r\n if (pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE)) {\r\n return () => {};\r\n } else {\r\n return onClick(event, selectMode, note, pseudoElementId, onNoteClick);\r\n }\r\n };\r\n\r\n const onClick = (event, selectMode, note, pseudoElementId, onNoteClick) => {\r\n if (selectMode === ELEMENT_SELECT_MODES.FORMULA.title) {\r\n toggleFormulaCancelModal(true);\r\n storeSelectedNoteId(note.elementId === null ? -1 : note.elementId);\r\n storeSelectedNotePseudoId(pseudoElementId);\r\n openCancelModalAfterModalConfirm(true);\r\n } else if (selectMode === ELEMENT_SELECT_MODES.INTERNAL_REFERENCE.title) {\r\n toggleInternalReferenceCancelModal(true);\r\n openCancelModalAfterModalConfirm(true);\r\n storeSelectedNoteId(note.elementId === null ? -1 : note.elementId);\r\n storeSelectedNotePseudoId(pseudoElementId);\r\n } else {\r\n if (event) {\r\n event.stopPropagation();\r\n }\r\n onNoteClick({\r\n elementId: note.elementId === null ? -1 : note.elementId,\r\n pseudoElementId,\r\n });\r\n }\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n statementContent: { notesCache },\r\n notesPanel: { selectedNote },\r\n annotationDisplayOptions,\r\n statementSummary: {\r\n statementSummaryElementsDisplay: {\r\n displayElementDetailsOnStatementPage,\r\n },\r\n },\r\n leftStatementContent: { leftNotesCache },\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { selectMode },\r\n panels: { right },\r\n },\r\n },\r\n },\r\n ownProps,\r\n) => {\r\n const { id, sectionId, leftSideView } = ownProps;\r\n const pseudoElementId = parseInt(\r\n id.substring(STATEMENT_PSEUDO_ELEMENT_ID_PREFIX.length).split('_')[0],\r\n );\r\n let currNote = leftSideView\r\n ? leftNotesCache.getPseudoNote({ sectionId, pseudoElementId })\r\n : notesCache.getPseudoNote({ sectionId, pseudoElementId });\r\n const noteSection = leftSideView\r\n ? leftNotesCache.getSection(sectionId)\r\n : notesCache.getSection(sectionId);\r\n if (!currNote && noteSection && noteSection.getElementNote) {\r\n currNote = noteSection.getElementNote(pseudoElementId);\r\n }\r\n if (!currNote) {\r\n currNote = new Note();\r\n }\r\n\r\n return {\r\n ownProps,\r\n pseudoElementId,\r\n note: currNote,\r\n isNoteSelected: selectedNote.noteId === currNote.noteId,\r\n selectMode: selectMode.title,\r\n isNoteNew: selectedNote.data.isNew,\r\n panelSelected: selectedNote.data.color,\r\n isNotesPanelOpen: right === RIGHT_PANELS.NOTES,\r\n annotationDisplayOptions,\r\n displayElementDetailsOnStatementPage,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n onNoteClick: selectNoteFromContentPanel,\r\n toggleFormulaCancelModal,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n changeIsNewPropertyFromSelectedNote,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(NoteAnchorHOC);\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport parser from 'html-dom-parser';\r\nimport camelCase from 'lodash.camelcase';\r\nimport { isNullOrUndefined } from './object-utils';\r\nimport ReactTooltip from 'react-tooltip';\r\nimport { getStore } from 'store/store';\r\nimport { messages } from 'containers/util/intl-provider-container';\r\nimport SectionAnchorHOC from 'higher-order-components/section-anchor-hoc-component';\r\nimport TieoutElementHOC from 'higher-order-components/tieout-element-hoc-component';\r\nimport NoteAnchorHOC from 'higher-order-components/note-anchor-hoc-component';\r\nimport shortid from 'shortid'; // used to generate unique react keys for sibling elements in map functions\r\nimport {\r\n STATEMENT_ELEMENT_ID_PREFIX,\r\n STATEMENT_SECTION_ID_PREFIX,\r\n STATEMENT_PSEUDO_ELEMENT_ID_PREFIX,\r\n CONTENT_SEARCH_HIGHLIGHT_CLASS,\r\n} from 'constants/feature/statement-content-constants';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\nimport { ReactComponent as FullWidthIcon } from 'icons/fullscreen-increase.svg';\r\nimport { ReactComponent as FixedWidthIcon } from 'icons/fullscreen-decrease.svg';\r\n\r\nconst ACCEPTED_HTML_TO_REACT_ATTRIBUTES = {\r\n colspan: 'colSpan',\r\n rowspan: 'rowSpan',\r\n style: 'style',\r\n class: 'className',\r\n id: 'id',\r\n start: 'start',\r\n type: 'type',\r\n defaultChecked: 'defaultChecked',\r\n src: 'src',\r\n // name: 'name' // TODO explore usefulness of name attribute in application\r\n};\r\n\r\n/**\r\n * Converts an html string into a react DOM tree\r\n * @param {string} param.html\r\n */\r\nlet renderedAnchors = {};\r\n\r\nexport const getParsedReactSegmentFromHTML = ({\r\n sectionId,\r\n html,\r\n searchTerm,\r\n leftSideView,\r\n}) => {\r\n const segmentJsonTree = parser(html);\r\n renderedAnchors = {};\r\n return (\r\n \r\n {_recursivePreProcessSegment({\r\n sectionId,\r\n children: segmentJsonTree,\r\n searchTerm,\r\n leftSideView,\r\n })}\r\n \r\n );\r\n};\r\n\r\n// TODO: uncomment if we implement JSON parsing on backend for sections, REMOVE if we choose not to\r\n// /**\r\n// * Converts a json representation of an html DOM into a react DOM tree\r\n// * @param {string} param.segmentJsonTree\r\n// */\r\n// export const getParsedReactSegmentJSON = ({ segmentJsonTree }) => {\r\n// return (\r\n// \r\n// {_recursivePreProcessSegment({\r\n// children: segmentJsonTree,\r\n// })}\r\n// \r\n// );\r\n// };\r\n\r\n/**\r\n * Turns a JSON object representing an html DOM tree into a react DOM tree\r\n * @param {Array} param.children array of children node objects to recursively morph to react elements\r\n */\r\nconst _recursivePreProcessSegment = ({\r\n sectionId,\r\n children,\r\n searchTerm,\r\n leftSideView,\r\n}) => {\r\n if (isNullOrUndefined(children) || children.length === 0) {\r\n return [];\r\n }\r\n return children.map((node) => {\r\n if (node.type === 'text') {\r\n if (!isNullOrUndefined(searchTerm) && typeof searchTerm === 'string') {\r\n const lowerCaseSearchTerm = searchTerm.toLowerCase();\r\n const lowerCaseNodeData = node.data.toLowerCase();\r\n const _containsSearchTerm =\r\n searchTerm.length > 0 &&\r\n lowerCaseNodeData.includes(lowerCaseSearchTerm);\r\n if (_containsSearchTerm) {\r\n const escapedSearchTerm = searchTerm.replace(\r\n /[.*+?^${}()|[\\]\\\\]/g,\r\n '\\\\$&',\r\n );\r\n const updatedHtmlString = node.data.replace(\r\n new RegExp(escapedSearchTerm, 'gi'), // i as 2nd arg indicates case ignore\r\n (match) =>\r\n `${match}`, // we only want to wrap the matched content\r\n );\r\n const highlightedHtml = parser(updatedHtmlString);\r\n return (\r\n <>\r\n {_recursivePreProcessSegment({\r\n sectionId,\r\n children: highlightedHtml,\r\n searchTerm,\r\n leftSideView,\r\n })}\r\n \r\n );\r\n }\r\n return node.data;\r\n }\r\n return node.data;\r\n }\r\n if (node.type === 'style') {\r\n /** Some html we get from the BE comes with their own stylesheet and we want to append this to the head tag so they are displayed as expected */\r\n const styleSheet = node.children[0].data;\r\n const reg = '#ato-section-data';\r\n const styleSheetWithoutId = styleSheet.replaceAll(\r\n reg,\r\n '#statement-content-panel-id',\r\n );\r\n\r\n const style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n document.head.appendChild(style);\r\n style.appendChild(document.createTextNode(styleSheetWithoutId));\r\n return EMPTY_STRING;\r\n } else if (node.type === 'tag') {\r\n switch (node.name) {\r\n // skipped elements\r\n case 'html':\r\n case 'head':\r\n case 'meta':\r\n case 'body': {\r\n return _recursivePreProcessSegment({\r\n sectionId,\r\n children: node.children,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n // void elements\r\n case 'hr':\r\n case 'br':\r\n case 'img': {\r\n return _childlessElement({ sectionId, node, searchTerm });\r\n }\r\n // elements with text node restrictions\r\n case 'tr':\r\n case 'table':\r\n case 'tbody': {\r\n return _elementWithOnlyTagChildren({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n case 'p': {\r\n const { attribs } = node;\r\n const directionStyle = 'direction: rtl; text-align: right;';\r\n if ('dir' in attribs) {\r\n attribs.style = attribs.style\r\n ? `${attribs.style} ${directionStyle}`\r\n : directionStyle;\r\n }\r\n return _createNormalElement({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n // elements that may need to be replaced with react components\r\n case 'a': {\r\n if (!('id' in node.attribs)) {\r\n return (\r\n <>\r\n {_recursivePreProcessSegment({\r\n sectionId,\r\n children: node.children,\r\n searchTerm,\r\n leftSideView,\r\n })}\r\n \r\n );\r\n }\r\n const anchorId = node.attribs.id;\r\n if (anchorId.includes(STATEMENT_SECTION_ID_PREFIX)) {\r\n const shouldRenderIcon = !renderedAnchors[anchorId];\r\n renderedAnchors[anchorId] = true;\r\n return (\r\n \r\n {_recursivePreProcessSegment({\r\n sectionId,\r\n children: node.children,\r\n searchTerm,\r\n leftSideView,\r\n })}\r\n \r\n );\r\n } else if (anchorId.includes(STATEMENT_ELEMENT_ID_PREFIX)) {\r\n return (\r\n \r\n {_recursivePreProcessSegment({\r\n sectionId,\r\n children: node.children,\r\n searchTerm,\r\n leftSideView,\r\n })}\r\n \r\n );\r\n } else {\r\n /**\r\n * If there are other types of HTML anchor elements that we need to handle based\r\n * on their ID from the back-end beyond tieout elements and section anchors, this\r\n * switch statement needs to be expanded further.\r\n */\r\n return _createNormalElement({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n }\r\n case 'span': {\r\n const spanId = (node.attribs && node.attribs.id) || null;\r\n const _isPseudoNoteSpan =\r\n !isNullOrUndefined(spanId) &&\r\n spanId.includes(STATEMENT_PSEUDO_ELEMENT_ID_PREFIX);\r\n\r\n if (_isPseudoNoteSpan) {\r\n const incrementClass = String(node.attribs.class).split([' '])[1]; // 2nd class always includes incremement part at end\r\n\r\n const attribs = _attributesToProps(node.attribs);\r\n\r\n const noteIncrementParts = String(incrementClass).split('_'); // CFTO_PSEUDO_ELEMENT__\r\n const noteIncrement = parseInt(\r\n noteIncrementParts[noteIncrementParts.length - 1],\r\n );\r\n const _isPseudoNoteIncrementSpan =\r\n _isPseudoNoteSpan && noteIncrement > 0;\r\n /**\r\n * Current BE implementation of pseudo notes that span multiple html elements,\r\n * each of those elements ends up with a pseudo note\r\n * span.CFTO_PSEUDO_ELEMENT_.CFTO_PSEUDO_ELEMENT__\r\n * Pseudo note increment spans should not have custom components, only the first one for rendering the icon\r\n */\r\n if (!_isPseudoNoteIncrementSpan) {\r\n return (\r\n \r\n {_recursivePreProcessSegment({\r\n sectionId,\r\n children: node.children,\r\n searchTerm,\r\n leftSideView,\r\n })}\r\n \r\n );\r\n }\r\n }\r\n // excluded elements need to be changed to an anchor tag\r\n if (\r\n String(node.attribs.class).includes(\r\n 'tieout-element--excluded-element',\r\n )\r\n ) {\r\n node.name = 'a';\r\n }\r\n\r\n //Inherit font-family style for span from parent p if it does not already have one. defect #1353485.\r\n if (node.parent && node.parent.name === 'p') {\r\n if (node.attribs) {\r\n if ('style' in node.attribs) {\r\n if (!String(node.attribs.style).includes('font-family'))\r\n node.attribs.style = `${node.attribs.style}; font-family: inherit;`;\r\n } else {\r\n node.attribs['style'] = 'font-family: inherit;';\r\n }\r\n } else {\r\n node['attribs'] = { style: 'font-family: inherit;' };\r\n }\r\n }\r\n return _createNormalElement({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n case 'mark': {\r\n const markClass = node.attribs.class;\r\n const markClasses = !isNullOrUndefined(markClass)\r\n ? node.attribs.class.split(' ')\r\n : [];\r\n const contentSearchClass = markClasses[0];\r\n if (contentSearchClass === CONTENT_SEARCH_HIGHLIGHT_CLASS) {\r\n return React.createElement(\r\n node.name,\r\n {\r\n ..._attributesToProps(node.attribs),\r\n key: shortid.generate(),\r\n },\r\n node.children[0].data, // mark tags generated during search will only have one text node child\r\n );\r\n }\r\n return _createNormalElement({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n case 'ul': {\r\n //if attribs exist we are going to check if it comes with styles\r\n if (node.attribs) {\r\n // if style exist in attribs, we concatenate a new style to add the bullets to the ul tag\r\n if ('style' in node.attribs) {\r\n node.attribs.style = `${node.attribs.style}; list-style-type: initial; `;\r\n } else {\r\n // if styles does not exist, we create it and add the list style\r\n node.attribs['style'] = 'list-style-type: initial;';\r\n }\r\n } else {\r\n // if attribs does not exist we create and also the style object\r\n node['attribs'] = { style: 'list-style-type: initial;' };\r\n }\r\n return _createNormalElement({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n default: {\r\n return _createNormalElement({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n });\r\n }\r\n }\r\n } else {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.log('UNCAUGHT', node);\r\n }\r\n return [];\r\n }\r\n });\r\n};\r\n\r\nconst _nodeHasChildren = (node) => {\r\n return !isNullOrUndefined(node.children) && node.children.length > 0;\r\n};\r\n\r\n/**\r\n * Some elements are supposed to have no children like ,
          ,
          etc.\r\n * This function returns void elements with no children\r\n * @param {Node} param.node node to render\r\n */\r\nconst _childlessElement = ({ sectionId, node }) => {\r\n return React.createElement(node.name, {\r\n key: `${sectionId}-${shortid.generate()}`,\r\n ..._attributesToPropsEx(node.attribs),\r\n });\r\n};\r\n\r\n/**\r\n * Some elements like , etc. are not meant to have any text nodes between them\r\n * this function only renders tag children\r\n * @param {Node} param.node node to render\r\n */\r\nconst _elementWithOnlyTagChildren = ({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n}) => {\r\n let children = null;\r\n if (_nodeHasChildren(node)) {\r\n children = [\r\n ..._recursivePreProcessSegment({\r\n children: node.children.filter((childNode) => childNode.type === 'tag'),\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n }),\r\n ];\r\n }\r\n return React.createElement(\r\n node.name,\r\n {\r\n ..._attributesToProps(node.attribs),\r\n key: `${sectionId}-${shortid.generate()}`,\r\n },\r\n children,\r\n );\r\n};\r\n\r\nconst _createNormalElement = ({\r\n node,\r\n sectionId,\r\n searchTerm,\r\n leftSideView,\r\n}) => {\r\n const elementId = node.attribs.id;\r\n let children = null;\r\n if (_nodeHasChildren(node)) {\r\n children = [\r\n ..._recursivePreProcessSegment({\r\n sectionId,\r\n children: node.children,\r\n searchTerm,\r\n leftSideView,\r\n }),\r\n ];\r\n }\r\n return React.createElement(\r\n node.name,\r\n {\r\n ..._attributesToProps(node.attribs),\r\n key: elementId\r\n ? `${sectionId}-element-${elementId}`\r\n : `${sectionId}-${shortid.generate()}`,\r\n },\r\n children,\r\n );\r\n};\r\n\r\n/**\r\n * Converts prop style string to a react camel cased style object\r\n * @param {string} plainStyleString\r\n */\r\nconst _getReactInlineStyleObject = (plainStyleString) => {\r\n if (isNullOrUndefined(plainStyleString) || plainStyleString === '') {\r\n return undefined;\r\n }\r\n const styles = plainStyleString.split(';');\r\n const inlineStyleMap = {};\r\n styles.forEach((indvStyle) => {\r\n const style = indvStyle.split(':');\r\n inlineStyleMap[camelCase(style[0])] = style[1];\r\n });\r\n return inlineStyleMap;\r\n};\r\n\r\n/**\r\n * turns a node.attribs object into the proper camel cased react props values\r\n * filters unnecessary attributes out of the nodes\r\n *\r\n * NOTE: may need to devise a way to convert data- attributes to get converted to props or passed through by default\r\n * reference https://reactjs.org/blog/2017/09/08/dom-attributes-in-react-16.html for more info\r\n * @param {object} attributes node.attribs object\r\n */\r\nconst _attributesToProps = (attributes) => {\r\n let props = {};\r\n // TODO: uncomment if we implement JSON parsing on backend for sections, REMOVE if we choose not to\r\n // if (Array.isArray(attributes)) {\r\n // // JSON FROM BACK END\r\n // attributes.forEach(attribute => {\r\n // Object.keys(attribute).forEach(attKey => {\r\n // if (ACCEPTED_HTML_TO_REACT_ATTRIBUTES[attKey]) {\r\n // if (attKey === ACCEPTED_HTML_TO_REACT_ATTRIBUTES.style) {\r\n // props.style = _getReactInlineStyleObject(attribute[attKey]);\r\n // } else {\r\n // props[ACCEPTED_HTML_TO_REACT_ATTRIBUTES[attKey]] =\r\n // attribute[attKey];\r\n // }\r\n // } else {\r\n // if (process.env.NODE_ENV === 'development') {\r\n // // DEV TODO may want to export these to a file so we can consume it more easily\r\n // console.log('UNCAUGHT PROPS', attribute);\r\n // }\r\n // }\r\n // });\r\n // });\r\n // } else {\r\n // JSON FROM HTML DOM PARSER\r\n props = {\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.colspan]:\r\n attributes.colspan || undefined,\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.rowspan]:\r\n attributes.rowspan || undefined,\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.style]: _getReactInlineStyleObject(\r\n attributes.style,\r\n ),\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.class]: attributes.class,\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.id]: attributes.id,\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.start]: attributes.start || undefined,\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.type]: attributes.type || undefined,\r\n [ACCEPTED_HTML_TO_REACT_ATTRIBUTES.defaultChecked]:\r\n 'checked' in attributes\r\n ? ACCEPTED_HTML_TO_REACT_ATTRIBUTES.defaultChecked\r\n : undefined,\r\n };\r\n // }\r\n\r\n return props;\r\n};\r\n\r\nconst _renderTooltip = (target, tooltipOptions, children) => {\r\n const { id, text } = tooltipOptions;\r\n const _id = `${id}-tooltip`;\r\n const childrenWithProps = React.Children.map(children, (child) =>\r\n React.cloneElement(child, { 'data-for': _id, 'data-tip': 'data-tip' }),\r\n );\r\n const store = getStore();\r\n const { locale } = store.getState().ui;\r\n const intlMessages = messages[locale];\r\n ReactDOM.render(\r\n <>\r\n \r\n {intlMessages ? intlMessages[text] || text : text}\r\n \r\n {childrenWithProps}\r\n ,\r\n target,\r\n );\r\n};\r\n\r\n/**\r\n * We listen for a \"mouseover\" event for tables in the statement content panel.\r\n * We update the position and callback of our table controls for node that most\r\n * recently fired a \"mouseover\" event.\r\n */\r\nexport const initTableControls = () => {\r\n const tableControls = document.getElementById(\r\n 'statement-content-page-id__table-controls',\r\n );\r\n if (!tableControls) return;\r\n const tableSelector = '.statement-content-segment table';\r\n const nodeList = document.querySelectorAll(tableSelector);\r\n if (nodeList.length === 0) return;\r\n const renderControls = (node) => {\r\n const { top, left } = document\r\n .getElementById('statement-content-panel-zoom-id')\r\n .getBoundingClientRect();\r\n\r\n const childTopPosition = node.getBoundingClientRect().top;\r\n const parentTopPosition = top;\r\n const topPosition = childTopPosition - parentTopPosition;\r\n\r\n const childLeftPosition = left;\r\n const parentLeftPosition = document\r\n .getElementById('statement-content-panel-id')\r\n .getBoundingClientRect().left;\r\n const leftPosition = childLeftPosition - parentLeftPosition - 5;\r\n\r\n tableControls.style.cssText = `display: flex; left: ${leftPosition}px; top: ${topPosition}px;`;\r\n const fixedWidthAttr = node.getAttribute('data-fixed-width');\r\n const isFullWidthMode =\r\n fixedWidthAttr === null || fixedWidthAttr === 'false';\r\n _renderTooltip(\r\n tableControls,\r\n {\r\n id: 'content-table-controls-id',\r\n text: isFullWidthMode\r\n ? 'content-table-controls.restore'\r\n : 'content-table-controls.expand',\r\n },\r\n isFullWidthMode ? : ,\r\n );\r\n };\r\n const onMouseEnter = (node) => () => {\r\n renderControls(node);\r\n tableControls.onclick = () => {\r\n const fixedWidthAttr = node.getAttribute('data-fixed-width');\r\n const isFullWidthMode =\r\n fixedWidthAttr === null || fixedWidthAttr === 'false';\r\n if (isFullWidthMode) {\r\n node.setAttribute('data-fixed-width', 'true');\r\n } else {\r\n node.setAttribute('data-fixed-width', 'false');\r\n }\r\n renderControls(node);\r\n };\r\n };\r\n for (let i = 0; i < nodeList.length; i++) {\r\n nodeList[i].onmouseover = onMouseEnter(nodeList[i]);\r\n }\r\n};\r\n\r\n/**\r\n * This is a workaround for the time being to add src attribute to image and other childless elements.\r\n * @param {object} attributes node.attribs object\r\n */\r\nconst _attributesToPropsEx = (attributes) => {\r\n let props = _attributesToProps(attributes);\r\n if (attributes.src)\r\n props[ACCEPTED_HTML_TO_REACT_ATTRIBUTES.src] = attributes.src;\r\n\r\n return props;\r\n};\r\n\r\nconst findParagraphElement = (node) => {\r\n let pElement = null;\r\n while (node) {\r\n if (node.nodeName === 'P') {\r\n pElement = node;\r\n }\r\n node = node.parentNode;\r\n }\r\n return pElement;\r\n};\r\n\r\nconst findTableElement = (node) => {\r\n let tableElement = null;\r\n while (node) {\r\n if (node.nodeName === 'TR') {\r\n tableElement = node;\r\n }\r\n node = node.parentNode;\r\n }\r\n return tableElement;\r\n};\r\n\r\nconst getWords = (text) => {\r\n return text.split(' ') || [];\r\n};\r\n\r\nconst getOffset = (node, offset, element) => {\r\n const preRange = document.createRange();\r\n preRange.selectNodeContents(element);\r\n preRange.setEnd(node, offset);\r\n return preRange.toString().length;\r\n};\r\n\r\nexport const getselectedTextLabel = (selection) => {\r\n const APPENDED_TEXT_LENGTH = 10;\r\n if (!selection.rangeCount) return;\r\n const range = selection.getRangeAt(0);\r\n const commonAncestor = range.commonAncestorContainer;\r\n const paragraphElement = findParagraphElement(commonAncestor);\r\n const tableElement = findTableElement(commonAncestor);\r\n if (tableElement) {\r\n return tableElement.firstElementChild.textContent;\r\n } else if (paragraphElement) {\r\n const paragraphText = paragraphElement.innerText;\r\n const words = getWords(paragraphText);\r\n\r\n const startContainer = range.startContainer;\r\n const endContainer = range.endContainer;\r\n\r\n const start = getOffset(\r\n startContainer,\r\n range.startOffset,\r\n paragraphElement,\r\n );\r\n const end = getOffset(endContainer, range.endOffset, paragraphElement);\r\n\r\n const selectedStartIndex = words.findIndex((word) => {\r\n return paragraphText.indexOf(word) >= start;\r\n });\r\n\r\n const selectedEndIndex = words.findIndex((word, index, worsdArray) => {\r\n const lastWordLength =\r\n index === worsdArray.length - 1 ? word.length + 1 : 0;\r\n return paragraphText.indexOf(word) >= end - lastWordLength;\r\n });\r\n\r\n const newStartIndex = Math.max(\r\n selectedStartIndex - APPENDED_TEXT_LENGTH,\r\n 0,\r\n );\r\n const newEndIndex = Math.min(\r\n selectedEndIndex + APPENDED_TEXT_LENGTH,\r\n words.length - 1,\r\n );\r\n\r\n const extendedText = words.slice(newStartIndex, newEndIndex + 1).join(' ');\r\n return extendedText;\r\n }\r\n return selection.toString().trim();\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"icon-path-inner\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.0009 15.7432C8.75964 14.9331 9.73481 13.6108 9.42556 12.4515C9.21307 11.6585 8.24549 10.3874 4.15315 10.7535C3.80596 10.7839 3.54983 11.0912 3.58209 11.4384C3.61244 11.7856 3.916 12.0398 4.26699 12.0116C7.14888 11.7515 8.10319 12.3984 8.20564 12.776C8.32327 13.2237 7.70857 14.0281 6.47157 14.5973C5.63679 14.9806 5.18715 15.5042 5.13023 16.1512C5.03726 17.261 6.24011 18.1224 6.37861 18.2174C6.48675 18.2912 6.61197 18.3275 6.73529 18.3275C6.93639 18.3275 7.13371 18.2324 7.25703 18.0541C7.45434 17.7657 7.38035 17.373 7.09386 17.1757C6.82825 16.9935 6.36533 16.5306 6.38999 16.2574C6.40137 16.1058 6.63094 15.914 7.0009 15.7432ZM21.38 8.10309L19.5928 6.31779C19.3462 6.07115 18.9478 6.07115 18.7011 6.31779L9.77086 15.2462C9.70256 15.3164 9.64943 15.3998 9.61908 15.4928L8.72548 18.1736C8.64959 18.3994 8.70841 18.6498 8.87916 18.8187C8.99868 18.9401 9.15995 19.0046 9.32501 19.0046C9.39141 19.0046 9.45971 18.9932 9.52422 18.9704L12.2031 18.0787C12.2961 18.0484 12.3815 17.9955 12.4498 17.927L21.38 8.99669C21.4977 8.87906 21.5641 8.71779 21.5641 8.55084C21.5641 8.38198 21.4977 8.22261 21.38 8.10309ZM11.6624 16.9271L10.323 17.3749L10.7688 16.0356L15.5745 11.2297L16.4681 12.1216L11.6624 16.9271ZM17.3617 11.2297L16.4681 10.3361L19.147 7.65724L20.0406 8.55084L17.3617 11.2297Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgEditPencil = function SvgEditPencil(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgEditPencil, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/edit-pencil.83cb211d.svg\";\nexport { ForwardRef as ReactComponent };","import { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nexport const COMFORT_LETTER_DESCRIPTION_CHAR_LIMIT = 4000;\r\nexport const COMFORT_LETTER_CUSTOM_LABEL_CHAR_LIMIT = 7;\r\n\r\nexport const COMFORT_ANNOTATION_SORT_BY = {\r\n ordinal: 'ordinal',\r\n createdDate: 'created_date',\r\n};\r\n\r\nexport const createEditComfortletterTooltip = (id) =>\r\n new TooltipOptions({\r\n text: 'common.edit',\r\n id,\r\n });\r\n\r\nexport const disableEditComfortletterTooltip = (id) =>\r\n new TooltipOptions({\r\n text: 'permissions.tickmark.edit.statement',\r\n id,\r\n });\r\n\r\nexport const COLLAPSE_COMFORT_ANNOTATION_LIST_TOOLTIP = (id) =>\r\n new TooltipOptions({\r\n text: 'common.collapse',\r\n id: `comfort-annotation-collapse-button-tool-tip-${id}`,\r\n });\r\n\r\nexport const EXPAND_COMFORT_ANNOTATION_LIST_TOOLTIP = (id) =>\r\n new TooltipOptions({\r\n text: 'common.expand',\r\n id: `comfort-annotation-expand-button-tool-tip-${id}`,\r\n });\r\n\r\nexport const UNLINK_COMFORT_ICON_TOOLTIP = new TooltipOptions({\r\n text: 'common.unlink',\r\n id: 'comfort-annotation-element-icon-button-tool-tip',\r\n});\r\n\r\nexport const DETACH_COMFORT_ICON_TOOLTIP = new TooltipOptions({\r\n text: 'common.detach',\r\n id: 'comfort-annotation-element-icon-button-tool-tip-detach',\r\n});\r\n\r\nexport const deleteComfortAnnotationTooltip = (id) =>\r\n new TooltipOptions({\r\n text: 'common.delete',\r\n id,\r\n });\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class WorkPaper extends BaseModel({\r\n revisionId: null,\r\n elementId: null,\r\n referenceNumber: '',\r\n referenceName: '',\r\n id: null,\r\n workpaperRefCreatedBy: null,\r\n elementWpRefCreatedBy: null,\r\n workpaperRefId: null,\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport WorkPaper from 'models/data/workpaper-model';\r\nimport clonedeep from 'lodash.clonedeep';\r\n\r\nexport default class WorkpaperToolkitListPanel extends ApiModel({\r\n data: {\r\n workpapers: [],\r\n elementsMap: {},\r\n deletedWorkpapers: [],\r\n },\r\n}) {\r\n get workpapers() {\r\n if (this.hasWorkpapers()) {\r\n return this.data.workpapers;\r\n }\r\n return [];\r\n }\r\n get elementsMap() {\r\n if (this.hasElementsMap()) {\r\n return this.data.elementsMap;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n workpapers: response.data.result.map(\r\n (workpaper) => new WorkPaper(workpaper),\r\n ),\r\n elementsMap: this.data.elementsMap,\r\n deletedWorkpapers: this.data.deletedWorkpapers,\r\n },\r\n };\r\n }\r\n\r\n hasWorkpapers() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.workpapers) &&\r\n this.data.workpapers.length > 0\r\n );\r\n }\r\n hasElementsMap() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.elementsMap) &&\r\n Object.keys(this.data.elementsMap).length > 0\r\n );\r\n }\r\n\r\n setElementList({ response, wpRefId }) {\r\n let updatedElementsMap = clonedeep(this.data.elementsMap);\r\n\r\n updatedElementsMap = {\r\n ...updatedElementsMap,\r\n [wpRefId]: response.data,\r\n };\r\n\r\n return this.mergeData({ elementsMap: updatedElementsMap });\r\n }\r\n\r\n clearElementList() {\r\n return this.mergeData({ elementsMap: {} });\r\n }\r\n\r\n removeWorkpaperFromElementsMap(wpRefId) {\r\n let updatedElementsMap = clonedeep(this.data.elementsMap);\r\n if (wpRefId in updatedElementsMap) {\r\n delete updatedElementsMap[wpRefId];\r\n }\r\n return this.mergeData({ elementsMap: updatedElementsMap });\r\n }\r\n\r\n updateWorkpaperElementsMap(payload) {\r\n const updatedElement = payload;\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const wpRefIdArray = Object.keys(clonedElementsMap);\r\n\r\n for (let index = 0; index < wpRefIdArray.length; index++) {\r\n const wpRefId = wpRefIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[wpRefId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementId === updatedElement.id) {\r\n clonedElementsMap[wpRefId][j] = updatedElement;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({ elementsMap: clonedElementsMap });\r\n }\r\n\r\n updateWorkpaperElementsMapFromArray(payload) {\r\n let updatedElementsMapObject = {};\r\n for (let i = 0; i < payload.length; i++) {\r\n updatedElementsMapObject = {\r\n ...updatedElementsMapObject,\r\n [payload[i].id]: payload[i],\r\n };\r\n }\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const workpaperIdArray = Object.keys(clonedElementsMap);\r\n for (let index = 0; index < workpaperIdArray.length; index++) {\r\n const workpaperId = workpaperIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[workpaperId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementId in updatedElementsMapObject) {\r\n const element = updatedElementsMapObject[elementId];\r\n const elementToUpdate = clonedElementsMap[workpaperId][j];\r\n clonedElementsMap[workpaperId][j] = {\r\n ...elementToUpdate,\r\n ...element,\r\n };\r\n }\r\n }\r\n }\r\n return this.mergeData({ elementsMap: clonedElementsMap });\r\n }\r\n\r\n unlinkElementFromElementsMap({ elementId, wpRefId }) {\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n if (wpRefId in clonedElementsMap) {\r\n const elementIndex = clonedElementsMap[wpRefId].find(\r\n (element) => element.id === elementId,\r\n );\r\n clonedElementsMap[wpRefId].splice(\r\n clonedElementsMap[wpRefId].indexOf(elementIndex),\r\n 1,\r\n );\r\n }\r\n return this.mergeData({ elementsMap: clonedElementsMap });\r\n }\r\n\r\n removeElementFromElementsMap(payload) {\r\n const elementIdToRemove = payload;\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const wpRefIdArray = Object.keys(clonedElementsMap);\r\n\r\n for (let index = 0; index < wpRefIdArray.length; index++) {\r\n const wpRefId = wpRefIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[wpRefId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementId === elementIdToRemove) {\r\n clonedElementsMap[wpRefId].splice(j, 1);\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({ elementsMap: clonedElementsMap });\r\n }\r\n\r\n removeElementsFromElementsMapWithSocketPayload(payload) {\r\n let elementsToRemoveSet = new Set();\r\n for (let i = 0; i < payload.length; i++) {\r\n const element = payload[i];\r\n elementsToRemoveSet.add(element.id);\r\n }\r\n\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const wpRefIdArray = Object.keys(clonedElementsMap);\r\n\r\n // this part updates the elements map\r\n for (let index = 0; index < wpRefIdArray.length; index++) {\r\n const wpRefId = wpRefIdArray[index];\r\n const elementsArray = Object.values(clonedElementsMap[wpRefId]);\r\n\r\n for (let j = 0; j < elementsArray.length; j++) {\r\n const elementId = elementsArray[j].id;\r\n if (elementsToRemoveSet.has(elementId)) {\r\n clonedElementsMap[wpRefId].splice(j, 1);\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n addWorkpaperToDeletedArray(workpaperRefId) {\r\n const deletedWorkpapersCopy = this.data.deletedWorkpapers;\r\n deletedWorkpapersCopy.push(workpaperRefId);\r\n return this.mergeData({ deletedWorkpapers: deletedWorkpapersCopy });\r\n }\r\n\r\n addWorkpaperToList(payload) {\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n const workpapersMap = this.workpapers.reduce((elementMap, elementData) => {\r\n elementMap[elementData.workpaperRefId] = elementData;\r\n return elementMap;\r\n }, {});\r\n const elements = payload.elementEntities.reduce(\r\n (elementMap, elementData) => {\r\n elementMap[elementData.id] = elementData;\r\n return elementMap;\r\n },\r\n {},\r\n );\r\n let modifiedWP = {};\r\n payload.attachedWorkpapers.forEach((workPaper) => {\r\n const workpaperId = workPaper.workpaperRefId;\r\n if (!(workpaperId in workpapersMap)) {\r\n workpapersMap[workpaperId] = workPaper;\r\n }\r\n const element = elements[workPaper.elementId];\r\n if (workpaperId in clonedElementsMap) {\r\n if (element) {\r\n modifiedWP[workpaperId] = true;\r\n clonedElementsMap[workpaperId].push(element);\r\n workpapersMap[workpaperId].elementCount++;\r\n }\r\n } else {\r\n if (element) {\r\n clonedElementsMap[workpaperId] = [element];\r\n workpapersMap[workpaperId].elementCount++;\r\n }\r\n }\r\n });\r\n const modifiedWpKeys = Object.keys(modifiedWP);\r\n for (let i = 0; i < modifiedWpKeys.length; i++) {\r\n //sort the element list by id to put the new element in the correct position\r\n clonedElementsMap[modifiedWpKeys[i]] = clonedElementsMap[\r\n modifiedWpKeys[i]\r\n ].sort((a, b) => a.id - b.id);\r\n }\r\n // sort the workpapers list by name\r\n const workpapers = Object.values(workpapersMap).sort((a, b) =>\r\n a.referenceNumber.localeCompare(b.referenceNumber),\r\n );\r\n return this.mergeData({\r\n workpapers: workpapers,\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n\r\n unlinkWorkpaperFromElementWithWebsocket(payload) {\r\n let clonedElementsMap = clonedeep(this.data.elementsMap);\r\n let clonedWorkpapers = clonedeep(this.data.workpapers);\r\n\r\n let workPaperToElementsMap = {};\r\n for (let i = 0; i < payload.length; i++) {\r\n const element = payload[i];\r\n if (element.workpaperRefId in workPaperToElementsMap) {\r\n workPaperToElementsMap[element.workpaperRefId] = {\r\n ...workPaperToElementsMap[element.workpaperRefId],\r\n [element.elementId]: true,\r\n };\r\n } else {\r\n workPaperToElementsMap[element.workpaperRefId] = {\r\n [element.elementId]: true,\r\n };\r\n }\r\n }\r\n\r\n for (let i = 0; i < clonedWorkpapers.length; i++) {\r\n let workpaper = clonedWorkpapers[i];\r\n const workpaperId = workpaper.workpaperRefId;\r\n if (workpaperId in workPaperToElementsMap) {\r\n const elementsObject = workPaperToElementsMap[workpaperId];\r\n\r\n // subtract elementCount based on how many affected elements\r\n // are mapped to a specific wpRefId\r\n const elementsToSubtract = Object.keys(elementsObject).length;\r\n workpaper.elementCount = workpaper.elementCount - elementsToSubtract;\r\n\r\n if (Object.keys(clonedElementsMap).length > 0) {\r\n let elements = clonedElementsMap[workpaperId];\r\n const filteredElements = elements.filter(\r\n (element) => !(element.id in workPaperToElementsMap[workpaperId]),\r\n );\r\n clonedElementsMap[workpaperId] = filteredElements;\r\n }\r\n }\r\n }\r\n\r\n return this.mergeData({\r\n workpapers: clonedWorkpapers,\r\n elementsMap: clonedElementsMap,\r\n });\r\n }\r\n\r\n deleteWorkpaperWithSocketPayload(payload) {\r\n let workpapersCopy = [...this.data.workpapers];\r\n\r\n workpapersCopy = workpapersCopy.filter(\r\n (workpaper) => workpaper.workpaperRefId !== payload.wpRefId,\r\n );\r\n\r\n let updatedElementsMap = clonedeep(this.data.elementsMap);\r\n if (payload.wpRefId in updatedElementsMap) {\r\n delete updatedElementsMap[payload.wpRefId];\r\n }\r\n\r\n return this.mergeData({\r\n workpapers: workpapersCopy,\r\n elementsMap: updatedElementsMap,\r\n });\r\n }\r\n\r\n updateWorkpaperWithSocketPayload(payload) {\r\n let workpapersCopy = [...this.data.workpapers];\r\n\r\n for (let i = 0; i < workpapersCopy.length; i++) {\r\n if (payload.wpRefId === workpapersCopy[i].workpaperRefId) {\r\n workpapersCopy[i].referenceNumber = payload.referenceNumber;\r\n workpapersCopy[i].referenceName = payload.referenceName;\r\n workpapersCopy[i].creationType = payload.creationType;\r\n break;\r\n }\r\n }\r\n\r\n return this.mergeData({\r\n workpapers: workpapersCopy,\r\n });\r\n }\r\n}\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\nimport ApiModel from 'models/api-model';\r\nimport SectionContentModel from 'models/api/section-content-api-model';\r\nimport SectionContentModelOCR from 'models/api/section-content-api-model-ocr-image';\r\n\r\n/**\r\n * A cache made up of SectionContentModels\r\n * the map property stores SectionContentModels by their `sectionId`\r\n */\r\nexport class SectionCache extends ApiModel({\r\n data: {\r\n map: {}, // { [sectionId]: SectionContentModel, ... }\r\n leftSideView: false,\r\n },\r\n status: null,\r\n}) {\r\n get map() {\r\n if (this.data && this.data.map) {\r\n return this.data.map;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response, isOCR }) {\r\n let _instantiatedMap = {};\r\n if (isOCR) {\r\n response.data.forEach(({ sectionId }, index) => {\r\n const sectionContent = new SectionContentModelOCR();\r\n _instantiatedMap[sectionId] = sectionContent.setLoading();\r\n });\r\n } else {\r\n response.data.forEach((id, index) => {\r\n const prevSectionId = response.data[index - 1];\r\n const nextSectionId = response.data[index + 1];\r\n const _sectionModel = new SectionContentModel();\r\n _instantiatedMap[id] = _sectionModel.setLinkedSectionIds({\r\n prevSectionId,\r\n nextSectionId,\r\n leftSideView: false,\r\n });\r\n });\r\n }\r\n\r\n return {\r\n data: {\r\n map: _instantiatedMap,\r\n leftSideView: false,\r\n },\r\n };\r\n }\r\n\r\n get(id) {\r\n return this.map[id];\r\n }\r\n\r\n /**\r\n * Reducer function that should be called by section load(ed/ing) reducer functions below\r\n *\r\n * @param {Object} updatedSectionsMap object map of SectionContentModels to merge into the map\r\n */\r\n _mergeSections(updatedSectionsMap) {\r\n return this.merge({\r\n data: {\r\n map: {\r\n ...this.data.map,\r\n ...updatedSectionsMap,\r\n },\r\n },\r\n });\r\n }\r\n\r\n mergeSectionsLoadedWithoutResponse(sectionIdList) {\r\n const loadedSectionMap = {};\r\n sectionIdList.forEach((section) => {\r\n this.ensureSectionIdPresent(section);\r\n loadedSectionMap[section] =\r\n this.data.map[section].setLoadedWithoutResponse();\r\n });\r\n return this._mergeSections(loadedSectionMap);\r\n }\r\n\r\n /**\r\n * Reducer function for setting sections to loaded in the map\r\n * @param {Array} sections array of Section objects\r\n */\r\n mergeSectionsLoaded({ response, searchTerm }) {\r\n const loadedSectionMap = {};\r\n response.data.forEach((section) => {\r\n this.ensureSectionIdPresent(section.sectionId);\r\n section.searchTerm = searchTerm;\r\n loadedSectionMap[section.sectionId] =\r\n this.data.map[section.sectionId] &&\r\n this.data.map[section.sectionId].setLoaded(section);\r\n });\r\n return this._mergeSections(loadedSectionMap);\r\n }\r\n\r\n /**\r\n * Ensures section ids are present in the map and throws error otherwise\r\n * @param {int} id sectionId\r\n */\r\n ensureSectionIdPresent(id) {\r\n if (this.data && this.data.map && isNullOrUndefined(this.data.map[id])) {\r\n this.data = this._mergeSections({\r\n [id]: new SectionContentModel(),\r\n });\r\n }\r\n }\r\n /**\r\n * Reducer function for setting loaded on given `section` response object\r\n * @param {int} param.section section object to set loaded on\r\n */\r\n setSectionLoaded(section) {\r\n return this._mergeSections({\r\n [section.sectionId]:\r\n this.data.map[section.sectionId] &&\r\n this.data.map[section.sectionId].setLoaded(section),\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for setting loading on sections with ids present in the `sectionIdList`\r\n * @param {Array} sectionIdList array of ids to update loading\r\n */\r\n mergeSectionsLoading(sectionIdList) {\r\n let loadingSectionsMap = {};\r\n sectionIdList.forEach((id) => {\r\n this.ensureSectionIdPresent(id);\r\n loadingSectionsMap[id] =\r\n this.data && this.data.map[id] && this.data.map[id].setLoading();\r\n });\r\n return this._mergeSections(loadingSectionsMap);\r\n }\r\n\r\n /**\r\n * Reducer function for setting loading on given `sectionId`\r\n * @param {int} param.sectionId section id to set loading on\r\n */\r\n setSectionLoading({ sectionId }) {\r\n this.ensureSectionIdPresent(sectionId);\r\n return this._mergeSections({\r\n [sectionId]: this.data.map[sectionId].setLoading(),\r\n });\r\n }\r\n\r\n /**\r\n * Reducer function for removing section content for all ids passed\r\n *\r\n * @param {int[]} param.removedSectionIds array of ids to clear content of in map\r\n */\r\n clearSectionContentFromMap({ removedSectionIds }) {\r\n let _clearedSectionsMap = {};\r\n removedSectionIds.forEach((id) => {\r\n this.ensureSectionIdPresent(id);\r\n _clearedSectionsMap[id] =\r\n !isNullOrUndefined(id) &&\r\n this.data.map[id] &&\r\n this.data.map[id].clearContent();\r\n });\r\n return this._mergeSections(_clearedSectionsMap);\r\n }\r\n\r\n clearSectionImageContentFromMap({ removedSectionIds }) {\r\n let _clearedSectionsMap = {};\r\n removedSectionIds.forEach((id) => {\r\n this.ensureSectionIdPresent(id);\r\n _clearedSectionsMap[id] = this.data.map[id].clearImageContent();\r\n });\r\n return this._mergeSections(_clearedSectionsMap);\r\n }\r\n\r\n mergeOCRSectionLoaded(section) {\r\n const map = {};\r\n map[section.sectionId] =\r\n this.data &&\r\n this.data.map[section.sectionId] &&\r\n this.data.map[section.sectionId].setLoaded(section);\r\n return this._mergeSections(map);\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport {\r\n getLanguagesMenuOptions,\r\n getDateFormatMenuOptions,\r\n getNumberFormatMenuOptions,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class StatementCreationPageData extends ApiModel({\r\n data: {\r\n languages: [],\r\n dateFormat: [],\r\n numberFormat: [],\r\n },\r\n}) {\r\n languageMenuOptions(isPdfSelected) {\r\n return !isNullOrUndefined(this.data.languages)\r\n ? getLanguagesMenuOptions(this.data.languages, isPdfSelected)\r\n : [];\r\n }\r\n\r\n getLanguageDropdownValues(isPdfSelected, searchTerm) {\r\n if (searchTerm.length) {\r\n const languageData = this.languageMenuOptions(isPdfSelected);\r\n return Object.values(languageData).filter(\r\n (obj) =>\r\n obj.title.toLowerCase().indexOf(searchTerm.toLowerCase()) !== -1,\r\n );\r\n }\r\n }\r\n\r\n get languagesMenuOptions() {\r\n return !isNullOrUndefined(this.data.languages)\r\n ? getLanguagesMenuOptions(this.data.languages)\r\n : [];\r\n }\r\n\r\n get dateFormatMenuOptions() {\r\n return !isNullOrUndefined(this.data.dateFormat)\r\n ? getDateFormatMenuOptions(this.data.dateFormat)\r\n : [];\r\n }\r\n\r\n get numberFormatMenuOptions() {\r\n return !isNullOrUndefined(this.data.numberFormat)\r\n ? getNumberFormatMenuOptions(this.data.numberFormat)\r\n : [];\r\n }\r\n\r\n selectedLanguageValue(languageValue) {\r\n if (isNullOrUndefined(languageValue)) {\r\n return [];\r\n } else {\r\n return (\r\n this.languagesMenuOptions &&\r\n this.languagesMenuOptions.filter(\r\n (item) => item.value === languageValue,\r\n )[0]\r\n );\r\n }\r\n }\r\n\r\n selectedDateFormatValue(dateFormatValue) {\r\n if (isNullOrUndefined(dateFormatValue)) {\r\n return [];\r\n } else {\r\n return (\r\n this.dateFormatMenuOptions &&\r\n this.dateFormatMenuOptions.filter(\r\n (item) => item.id === dateFormatValue,\r\n )[0]\r\n );\r\n }\r\n }\r\n\r\n selectedNumberFormatValue(numberFormatValue) {\r\n if (isNullOrUndefined(numberFormatValue)) {\r\n return [];\r\n } else {\r\n return (\r\n this.numberFormatMenuOptions &&\r\n this.numberFormatMenuOptions.filter(\r\n (item) => item.value === numberFormatValue,\r\n )[0]\r\n );\r\n }\r\n }\r\n\r\n processResponse({ result }) {\r\n return {\r\n data: {\r\n languages: result && result.languageDetails,\r\n dateFormat: result && result.dateFormats,\r\n numberFormat: result && result.numberFormats,\r\n },\r\n };\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport default class ActiveUsers extends ApiModel({\r\n data: {\r\n users: [],\r\n },\r\n}) {\r\n get users() {\r\n return this.data.users;\r\n }\r\n\r\n processResponse(response) {\r\n return {\r\n data: {\r\n users: response.data.result,\r\n },\r\n };\r\n }\r\n\r\n addUser({ payload }) {\r\n return this.merge({ data: { users: payload } });\r\n }\r\n\r\n removeUser({ payload }) {\r\n return this.merge({ data: { users: payload } });\r\n }\r\n\r\n hasUsers() {\r\n return this.data.users && this.data.users.length > 0;\r\n }\r\n getUsersLength() {\r\n if (this.hasUsers()) {\r\n return this.data.users.length;\r\n }\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class Container extends BaseModel({\r\n geoCode: '',\r\n description: null,\r\n memberFirmCode: '',\r\n countryCode: '',\r\n countryName: '',\r\n containerId: null,\r\n containerCode: '',\r\n containerName: '',\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport Container from 'models/data/container-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { MenuOption } from '../utils/common/menu/menu-option-model';\r\nimport { isArray, orderBy } from 'lodash';\r\n\r\nexport default class ContainerForm extends ApiModel({\r\n data: {\r\n containersList: [],\r\n containersOptions: [],\r\n users: [],\r\n },\r\n}) {\r\n get users() {\r\n if (isArray(this.data.users)) {\r\n return this.data.users;\r\n }\r\n return [];\r\n }\r\n get containersList() {\r\n if (isArray(this.data.containersList)) {\r\n return this.data.containersList;\r\n }\r\n return [];\r\n }\r\n get containersOptions() {\r\n if (!isNullOrUndefined(this.data.containersOptions)) {\r\n return this.data.containersOptions;\r\n }\r\n return [];\r\n }\r\n\r\n processResponse(response) {\r\n const containers = response.data.containers;\r\n let orderedContainers = orderBy([...containers], 'countryName', 'asc');\r\n return {\r\n data: {\r\n containersList: orderedContainers.map((container) => {\r\n return new Container(container);\r\n }),\r\n containersOptions: orderedContainers.map((item) => {\r\n return new MenuOption({\r\n id: item.containerCode,\r\n title: item.containerName,\r\n value: `${item.containerCode}`,\r\n isIntl: false,\r\n });\r\n }),\r\n users: response.data.users,\r\n },\r\n };\r\n }\r\n\r\n getContainerDetailsByContainerCode(containerCode) {\r\n return this.containersList.find(\r\n (container) => container.containerCode === containerCode,\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport { API_ERROR_NOTIFICATION } from 'components/util/api-error-notificiation-component';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\nimport { toast } from 'react-toastify';\r\nimport { connect } from 'react-redux';\r\nimport { clearApiErrorDataAction } from 'store/actions/api-error-handler-actions';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst CloseToastButton = ({ clearApiErrorDataAction }) => {\r\n return (\r\n {\r\n toast.dismiss();\r\n clearApiErrorDataAction();\r\n }}\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nCloseToastButton.propTypes = {\r\n /** Action that clears error data */\r\n clearApiErrorDataAction: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n clearApiErrorDataAction,\r\n};\r\n\r\nexport default connect(null, mapDispatchToProps)(CloseToastButton);\r\n","import axios from 'axios';\r\nimport { getGeo, CONTEXT_KEY } from 'api/api-client';\r\nimport {\r\n createMSALInstance,\r\n _getAuthTokenForRequestInterceptors,\r\n} from 'api/api-authentication';\r\nimport moment from 'moment';\r\n\r\nlet docChatClient = {};\r\n\r\nObject.keys(window.TIEOUT.ENV.GEOS).forEach(\r\n (geoKey) =>\r\n (docChatClient[geoKey] = {\r\n api: null,\r\n flags: {\r\n authenticated: false,\r\n },\r\n }),\r\n);\r\n\r\nconst _createDocChatAPI = ({ geoKey }) => {\r\n /** axios instace for valid geoKey */\r\n docChatClient[geoKey].api = axios.create({\r\n baseURL: window.TIEOUT.ENV.GEOS[geoKey].DOC_CHAT_URL,\r\n /* Add all custom API settings we will need here. */\r\n });\r\n createMSALInstance();\r\n};\r\n\r\nconst getDocChatAPI = ({ geoKey, apiURL }) => {\r\n if (!(docChatClient[geoKey] && docChatClient[geoKey].api)) {\r\n _createDocChatAPI({ geoKey, apiURL });\r\n }\r\n return docChatClient[geoKey].api;\r\n};\r\n\r\nexport const getDocChatApiClient = () => {\r\n const geoKey = getGeo({\r\n contextKey: CONTEXT_KEY.SELECTED_PROJECT_CONTEXT,\r\n });\r\n return getDocChatAPI({ geoKey });\r\n};\r\n\r\nexport const getAPIClient = (geoKey) => {\r\n if (!(docChatClient[geoKey] && docChatClient[geoKey].api)) {\r\n _createDocChatAPI(geoKey);\r\n }\r\n return docChatClient[geoKey];\r\n};\r\n\r\nexport const getDocChatHeaders = async () => {\r\n const geoKey = getGeo({\r\n contextKey: CONTEXT_KEY.SELECTED_PROJECT_CONTEXT,\r\n });\r\n const config = {};\r\n const token = await _getAuthTokenForRequestInterceptors(geoKey);\r\n config.Authorization = `Bearer ${token}`;\r\n return config;\r\n};\r\n","export default class ElementSelection {\r\n elementId = null;\r\n sectionId = null;\r\n constructor({ elementId, sectionId }) {\r\n this.elementId = elementId;\r\n this.sectionId = sectionId;\r\n }\r\n}\r\n","import {\r\n getElementsCountBySectionID,\r\n getNotesCountBySectionID,\r\n} from '../api/sections-api';\r\n\r\n/**This method accepts the section details, fetches the section wise summary data from the backend\r\n * (consisting of the count of total elements, verified,flagged,reviewed elements,,notes) & returns\r\n * the updated section\r\n */\r\nexport const getUpdatedSectionElementsNotesSummaryCount = async (\r\n revision,\r\n section,\r\n) => {\r\n try {\r\n let sectionElementCountSummary = await getElementsCountBySectionID({\r\n revisionId: revision.id,\r\n sectionId: section.id,\r\n });\r\n\r\n let sectionNotesCountSummary = await getNotesCountBySectionID({\r\n revisionId: revision.id,\r\n sectionId: section.id,\r\n });\r\n\r\n if (\r\n sectionElementCountSummary &&\r\n sectionElementCountSummary.data &&\r\n sectionElementCountSummary.data.result\r\n ) {\r\n let apiSummaryElementCountResponse =\r\n sectionElementCountSummary.data.result;\r\n section = {\r\n ...section,\r\n totalElements: apiSummaryElementCountResponse.totalElements\r\n ? apiSummaryElementCountResponse.totalElements\r\n : 0,\r\n verifiedElements: apiSummaryElementCountResponse.verified\r\n ? apiSummaryElementCountResponse.verified\r\n : 0,\r\n reviewedElements: apiSummaryElementCountResponse.reviewed\r\n ? apiSummaryElementCountResponse.reviewed\r\n : 0,\r\n flaggedElements: apiSummaryElementCountResponse.elementFlagCount\r\n ? apiSummaryElementCountResponse.elementFlagCount\r\n : 0,\r\n };\r\n }\r\n if (sectionNotesCountSummary && sectionNotesCountSummary.data) {\r\n let apiSummaryNoteCountResponse = sectionNotesCountSummary.data.result;\r\n section = {\r\n ...section,\r\n totalNotes: apiSummaryNoteCountResponse\r\n ? apiSummaryNoteCountResponse\r\n : 0,\r\n };\r\n }\r\n } catch (error) {\r\n section = {\r\n ...section,\r\n error: error,\r\n };\r\n }\r\n return section;\r\n};\r\n","/**\r\n * A helper function used to get a list of emails that will notified whenever a user is tagged in a note\r\n * @param {string} noteBody : The text of the note body.\r\n * @param {Object} replies: The object that contains all the replies for the note.\r\n * @param {array} projectUsersList: The array of all user details.\r\n * @param {string} previousNoteBody: The text of the previous not body. This paramter is used only for not editting.\r\n */\r\n\r\nexport const getEmailsForTaggedUsers = ({\r\n noteBody,\r\n replies,\r\n projectUsersList,\r\n previousNoteBody,\r\n}) => {\r\n const regex = /cfto_user_id=\"\\s*(.*?)\\s*\"/g;\r\n let match;\r\n let usersObject = {};\r\n let usersObjectInPreviousNote = {};\r\n let emailsObject = {};\r\n\r\n const checkForMatchingSubstring = (text, usersMap) => {\r\n do {\r\n match = regex.exec(text);\r\n if (match) {\r\n usersMap[match[1]] = true;\r\n }\r\n } while (match);\r\n };\r\n\r\n if (noteBody !== '') {\r\n checkForMatchingSubstring(noteBody, usersObject);\r\n }\r\n\r\n if (previousNoteBody !== '') {\r\n checkForMatchingSubstring(previousNoteBody, usersObjectInPreviousNote);\r\n }\r\n\r\n const repliesKeys = Object.keys(replies);\r\n if (repliesKeys.length > 0) {\r\n const lastReplyInReplyObject = repliesKeys[repliesKeys.length - 1];\r\n const reply = replies[lastReplyInReplyObject];\r\n checkForMatchingSubstring(reply.reply, usersObject);\r\n }\r\n\r\n if (Object.keys(usersObjectInPreviousNote).length !== 0) {\r\n const currentUsersInNoteBody = Object.keys(usersObject);\r\n for (let i = 0; i < currentUsersInNoteBody.length; i++) {\r\n const userId = currentUsersInNoteBody[i];\r\n if (userId in usersObjectInPreviousNote) {\r\n delete usersObject[userId];\r\n }\r\n }\r\n }\r\n\r\n for (let i = 0; i < projectUsersList.length; i++) {\r\n const user = projectUsersList[i];\r\n if (user.id in usersObject) {\r\n emailsObject[user.email] = true;\r\n }\r\n }\r\n\r\n return Object.keys(emailsObject);\r\n};\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const resetSideBySideViewAnnotations = createAction(\r\n 'RESET_SIDE_BY_SIDE_VIEW_ANNOTATIONS',\r\n);\r\nexport const setAnnotationMapping = createAction('SET_ANNOTATION_MAPPING');\r\n\r\nexport const setAnnotationsForMapping = (annotations) => (dispatch) => {\r\n dispatch(setAnnotationMapping(annotations));\r\n};\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class ContentViewModesModel extends BaseModel({\r\n contentFullMode: false,\r\n // We currently do not need to persist but leaving this here incase we change our mind\r\n // ...JSON.parse(localStorage.getItem('viewModes')),\r\n}) {\r\n merge(mergeProps) {\r\n const nextModel = new this.constructor({ ...this, ...mergeProps });\r\n // localStorage.setItem('viewModes', JSON.stringify(nextModel));\r\n return nextModel;\r\n }\r\n\r\n setContentFixedMode() {\r\n return this.merge({ contentFullMode: false });\r\n }\r\n\r\n setContentFullMode() {\r\n return this.merge({ contentFullMode: true });\r\n }\r\n}\r\n","import { withDefaultContextAsSelectedProject } from './api-default-context';\r\n\r\nexport const getChecklistDataRequest = ({\r\n revisionId,\r\n statementId,\r\n projectId,\r\n}) => {\r\n return withDefaultContextAsSelectedProject()\r\n .get(\r\n `/tieout/project/${parseInt(\r\n projectId,\r\n )}/statement/${statementId}/revisions/${revisionId}/auditCheckList`,\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const postAuditAnswerRequest = (\r\n answer,\r\n revisionId,\r\n statementId,\r\n projectId,\r\n) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/project/${parseInt(\r\n projectId,\r\n )}/statement/${statementId}/revisions/${revisionId}/auditCheckList`,\r\n answer,\r\n );\r\n};\r\n\r\nexport const postFinalChecklistConfirmation = (\r\n confirmationRequestBody,\r\n revisionId,\r\n statementId,\r\n projectId,\r\n) => {\r\n return withDefaultContextAsSelectedProject().post(\r\n `/tieout/project/${parseInt(\r\n projectId,\r\n )}/statement/${statementId}/revisions/${revisionId}/finalAuditCheckList`,\r\n confirmationRequestBody,\r\n );\r\n};\r\n","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class ContentSearchResultEntry extends BaseModel({\r\n id: null,\r\n sectionId: null,\r\n siblingIndex: null,\r\n context: '',\r\n selector: '',\r\n index: 0,\r\n}) {\r\n constructor(props) {\r\n super(props);\r\n const {\r\n sectionId,\r\n selector,\r\n siblingIndex,\r\n polygonDetails,\r\n context,\r\n index,\r\n } = props;\r\n this.id =\r\n !isNullOrUndefined(polygonDetails) && polygonDetails.length\r\n ? `${sectionId}-${context.replace(/[^a-zA-Z0-9]/g, '-')}-${index}`\r\n : `${sectionId}-${selector}-${siblingIndex}`;\r\n this.selector =\r\n !isNullOrUndefined(polygonDetails) && polygonDetails.length\r\n ? `${context.replace(/[^a-zA-Z0-9]/g, '-')}-${index}`\r\n : selector;\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"icon-path-inner\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.22523 8.125H17.9455C18.2695 8.125 18.4855 7.90833 18.4855 7.58333C18.4855 7.25833 18.2695 7.04167 17.9455 7.04167H16.1094C15.6774 5.74167 14.4354 4.875 13.0854 4.875C11.7893 4.875 10.6553 5.63333 10.1153 6.825C10.0613 6.87917 10.0613 6.9875 10.0613 7.04167H8.22523C7.90122 7.04167 7.68521 7.25833 7.68521 7.58333C7.68521 7.90833 7.90122 8.125 8.22523 8.125ZM13.0854 5.95833C13.8954 5.95833 14.5974 6.39167 14.9754 7.04167H11.2493C11.6273 6.39167 12.3293 5.95833 13.0854 5.95833ZM17.9455 9.20833H8.22523C7.90122 9.20833 7.68521 9.425 7.68521 9.75C7.68521 10.075 7.90122 10.2917 8.22523 10.2917V20.5833C8.22523 20.9083 8.44123 21.125 8.76524 21.125H17.4055C17.7295 21.125 17.9455 20.9083 17.9455 20.5833V10.2917C18.2695 10.2917 18.4855 10.075 18.4855 9.75C18.4855 9.425 18.2695 9.20833 17.9455 9.20833ZM16.8655 20.0417H9.30526V10.2917H16.8655V20.0417ZM10.3853 18.4167V11.9167C10.3853 11.5917 10.6013 11.375 10.9253 11.375C11.2493 11.375 11.4653 11.5917 11.4653 11.9167V18.4167C11.4653 18.7417 11.2493 18.9583 10.9253 18.9583C10.6013 18.9583 10.3853 18.7417 10.3853 18.4167ZM12.5453 18.4167V11.9167C12.5453 11.5917 12.7614 11.375 13.0854 11.375C13.4094 11.375 13.6254 11.5917 13.6254 11.9167V18.4167C13.6254 18.7417 13.4094 18.9583 13.0854 18.9583C12.7614 18.9583 12.5453 18.7417 12.5453 18.4167ZM14.7054 18.4167V11.9167C14.7054 11.5917 14.9214 11.375 15.2454 11.375C15.5694 11.375 15.7854 11.5917 15.7854 11.9167V18.4167C15.7854 18.7417 15.5694 18.9583 15.2454 18.9583C14.9214 18.9583 14.7054 18.7417 14.7054 18.4167Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgDeleteIcon = function SvgDeleteIcon(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 27,\n height: 26,\n viewBox: \"0 0 27 26\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgDeleteIcon, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/delete-icon.ce15aa2e.svg\";\nexport { ForwardRef as ReactComponent };","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class StatementSummaryNotes extends ApiModel({\r\n data: {\r\n notes: 0,\r\n },\r\n}) {\r\n get notes() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.notes;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: { notes: response.data.result },\r\n };\r\n }\r\n\r\n updateSummaryFromWebsocket(payload) {\r\n return this.mergeData({\r\n notes: this.data.notes + payload,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class StatementSummarySections extends ApiModel({\r\n data: {\r\n REVIEWED: 0,\r\n TOTAL: 0,\r\n },\r\n}) {\r\n get reviewed() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.REVIEWED;\r\n }\r\n get total() {\r\n if (isNullOrUndefined(this.data)) {\r\n return 0;\r\n }\r\n return this.data.TOTAL;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: response.data,\r\n };\r\n }\r\n\r\n reviewedPercentage() {\r\n return this.total === 0\r\n ? 0\r\n : ((this.reviewed * 100) / this.total).toFixed(0) || null;\r\n }\r\n\r\n updateSectionSummaryFromSocketPayload(payload) {\r\n const { headingsReviewed, headingsCount } = payload;\r\n return this.mergeData({\r\n REVIEWED: this.data.REVIEWED + headingsReviewed,\r\n TOTAL: this.data.TOTAL + headingsCount,\r\n });\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class AuditQuestion extends BaseModel({\r\n id: null,\r\n question: null,\r\n auditAnswer: null,\r\n answeredDate: null,\r\n answeredBy: null,\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport AuditQuestion from 'models/data/audit-question-model';\r\n\r\nexport default class AuditQuestionsChecklist extends ApiModel({\r\n data: {\r\n questionsChecklist: [],\r\n auditFinalChecklistStatus: null,\r\n },\r\n}) {\r\n get questionsChecklist() {\r\n if (this.hasQuestionsChecklist()) {\r\n return this.data.questionsChecklist;\r\n }\r\n return [];\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n questionsChecklist: response.data.result.questionList.map(\r\n (auditQuestion) => new AuditQuestion(auditQuestion),\r\n ),\r\n auditFinalChecklistStatus:\r\n response.data.result.auditChecklistStatement\r\n .auditFinalChecklistStatus,\r\n },\r\n };\r\n }\r\n\r\n hasQuestionsChecklist() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.questionsChecklist) &&\r\n this.data.questionsChecklist.length > 0\r\n );\r\n }\r\n\r\n updateChecklistData(payload) {\r\n let questionsChecklistCopy = [...this.data.questionsChecklist];\r\n for (\r\n let currentQuestionIndex = 0;\r\n currentQuestionIndex < questionsChecklistCopy.length;\r\n currentQuestionIndex++\r\n ) {\r\n if (\r\n payload.payload.response.data.result.id ===\r\n questionsChecklistCopy[currentQuestionIndex].id\r\n ) {\r\n questionsChecklistCopy[currentQuestionIndex].auditAnswer =\r\n payload.payload.response.data.result.auditAnswer;\r\n }\r\n }\r\n return this.mergeData({\r\n questionsChecklist: questionsChecklistCopy.map(\r\n (auditQuestion) => new AuditQuestion(auditQuestion),\r\n ),\r\n });\r\n }\r\n}\r\n","import { withDefaultContextAsSelectedProject } from 'api/api-default-context';\r\n\r\nexport const initialProjectSocketClientUrl = (projectId) =>\r\n `/tieout/signalr/project/${parseInt(projectId)}`;\r\n\r\nexport const closeSocketClientRequest = ({ projectId, connectionId }) => {\r\n return withDefaultContextAsSelectedProject().delete(\r\n `/tieout/signalr/project/${parseInt(\r\n projectId,\r\n )}/connection/${connectionId}/close`,\r\n );\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with sketchtool.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Starting-Components\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG-TieOut-|-Starting-Components-Part-2\",\n transform: \"translate(-1538.000000, -3994.000000)\"\n}, React.createElement(\"g\", {\n id: \"Message-/-Banner-/-Error-Copy\",\n transform: \"translate(1522.000000, 3983.000000)\"\n}, React.createElement(\"g\", {\n id: \"\\\\u2733\\\\uFE0F-Icon\",\n transform: \"translate(16.000000, 11.000000)\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 18,\n height: 18\n}), React.createElement(\"path\", {\n d: \"M0.188288562,8.54543117 L8.54543127,0.191507228 C8.7964826,-0.0595440981 9.20351722,-0.0595440981 9.45456855,0.191507228 L17.8110741,8.54543117 C18.0621255,8.7964825 18.0621255,9.20351712 17.8110741,9.45456845 L9.45456855,17.808867 C9.20351722,18.0599183 8.7964826,18.0599183 8.54543127,17.808867 L0.188288562,9.45456845 C-0.0627627636,9.20351712 -0.0627627636,8.7964825 0.188288562,8.54543117 Z M8.9999998,17.1997449 L17.201952,8.99999981 L8.9999998,0.80062929 L0.797410516,8.99999981 L8.9999998,17.1997449 Z M9,12.3750001 C9.62131875,12.3750001 10.125,12.8786814 10.125,13.5000001 C10.125,14.1213189 9.62131875,14.6250001 9,14.6250001 C8.37868125,14.6250001 7.875,14.1213189 7.875,13.5000001 C7.875,12.8786814 8.37868125,12.3750001 9.00000005,12.3750001 Z M9.00000004,13.8750001 C9.20710691,13.8750001 9.37500003,13.7071069 9.37500003,13.5000001 C9.37500003,13.2928932 9.20710691,13.1250001 9.00000004,13.1250001 C8.79289317,13.1250001 8.62500005,13.2928932 8.62500005,13.5000001 C8.62500005,13.7071069 8.79289317,13.8750001 9.00000005,13.8750001 Z M8.25000017,11.6249999 C8.0428933,11.6249999 7.87500022,11.4571068 7.87500019,11.2499999 L7.5000002,3.7500001 C7.5000002,3.54289323 7.66789332,3.37500011 7.8750002,3.37500011 L10.1250001,3.37500011 C10.332107,3.37500011 10.5000002,3.54289323 10.5000002,3.75000012 L10.1250001,11.2499999 C10.1250001,11.4571068 9.957107,11.6249999 9.75000015,11.6249999 L8.25000022,11.6249999 Z M9.75000028,4.12500017 L8.28750022,4.12500017 L8.62500023,10.8750002 L9.37500027,10.8750002 L9.75000028,4.12500017 Z\",\n id: \"IconError\",\n fill: \"#DA291C\"\n}), React.createElement(\"g\", {\n id: \"Exclamation-Mark-SPECIAL\",\n transform: \"translate(7.071429, 3.214286)\"\n}, React.createElement(\"g\", {\n id: \"Group\",\n transform: \"translate(0.428571, 0.160714)\"\n}))))));\n\nvar SvgError = function SvgError(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"18px\",\n height: \"18px\",\n viewBox: \"0 0 18 18\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgError, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/error.770b9812.svg\";\nexport { ForwardRef as ReactComponent };","const DEFAULT_SPACE_THRESHOLD_TO_BREAK_WORD = 3;\r\n\r\nexport const shouldBreakWord = (text, alternateThreshold) => {\r\n const threshold = alternateThreshold || DEFAULT_SPACE_THRESHOLD_TO_BREAK_WORD;\r\n return text.toString().split(' ').length <= threshold;\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Symbols\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Functional-/-More-Menu-Bold\",\n transform: \"translate(-12.000000, -7.000000)\"\n}, React.createElement(\"g\", {\n id: \"ellipsis-special\",\n transform: \"translate(14.000000, 14.000000) rotate(-90.000000) translate(-14.000000, -14.000000) \"\n}, React.createElement(\"rect\", {\n id: \"Rectangle\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"path\", {\n className: \"icon-path kebab-icon\",\n d: \"M14,15.1666667 C13.3556678,15.1666667 12.8333333,14.6443322 12.8333333,14 C12.8333333,13.3556678 13.3556678,12.8333333 14,12.8333333 C14.6443322,12.8333333 15.1666667,13.3556678 15.1666667,14 C15.1666667,14.6443322 14.6443322,15.1666667 14,15.1666667 Z M21,14 C21,13.3556678 20.4776655,12.8333333 19.8333333,12.8333333 C19.1890011,12.8333333 18.6666667,13.3556678 18.6666667,14 C18.6666667,14.6443322 19.1890011,15.1666667 19.8333333,15.1666667 C20.4776655,15.1666667 21,14.6443322 21,14 Z M9.33333333,14 C9.33333333,13.3556678 8.81099887,12.8333333 8.16666667,12.8333333 C7.52233446,12.8333333 7,13.3556678 7,14 C7,14.6443322 7.52233446,15.1666667 8.16666667,15.1666667 C8.81099887,15.1666667 9.33333333,14.6443322 9.33333333,14 Z\",\n id: \"Shape\",\n fill: \"#000000\",\n fillRule: \"nonzero\"\n}))));\n\nvar SvgKebabBold = function SvgKebabBold(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"4px\",\n height: \"14px\",\n viewBox: \"0 0 4 14\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgKebabBold, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/kebab-bold.ca7260d0.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nconst STATEMENT_PROGRESS_BAR_BLOCK = 'statement-progress-bar';\r\n\r\nconst StatementProgressBar = ({ percentVerified }) => {\r\n return (\r\n
          \r\n \r\n
          \r\n );\r\n};\r\n\r\nStatementProgressBar.propTypes = {\r\n /** String percentage of verified elements */\r\n percentVerified: PropTypes.number.isRequired,\r\n};\r\n\r\nexport default memo(StatementProgressBar);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Symbols\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"Message-/-Inline-/-Success\",\n transform: \"translate(-16.000000, -16.000000)\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Tick\",\n transform: \"translate(16.000000, 16.000000)\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 24,\n height: 24\n}), React.createElement(\"g\", {\n id: \"checkmark\",\n strokeWidth: 1,\n fillRule: \"evenodd\",\n fill: \"#43B02A\"\n}, React.createElement(\"path\", {\n d: \"M12.0342857,0.115080745 C5.45888199,0.115080745 0.128198758,5.44576398 0.128198758,12.0214658 C0.128198758,18.5968696 5.45888199,23.9277019 12.0342857,23.9277019 C18.6096894,23.9277019 23.9403727,18.5968696 23.9403727,12.0214658 C23.9403727,5.44576398 18.6096894,0.115080745 12.0342857,0.115080745 Z M12.0342857,1.1072795 C18.0521739,1.1072795 22.9475776,6.0032795 22.9475776,12.0214658 C22.9475776,18.039205 18.0521739,22.935354 12.0342857,22.935354 C6.01639752,22.935354 1.11950311,18.039205 1.11950311,12.0214658 C1.11950311,6.0032795 6.01639752,1.1072795 12.0342857,1.1072795 Z M18.8332919,7.20581366 C18.6395031,7.01187578 18.3264596,7.01187578 18.1326708,7.20581366 L8.56099379,16.7767453 L5.43950311,13.6551056 C5.24571429,13.4611677 4.93118012,13.4611677 4.7373913,13.6551056 C4.54360248,13.8487453 4.54360248,14.1626832 4.7373913,14.3566211 L8.21068323,17.8291677 C8.30757764,17.925913 8.43428571,17.9743602 8.56099379,17.9743602 C8.68770186,17.9743602 8.81590062,17.925913 8.91279503,17.8291677 L18.8332919,7.90718012 C19.0270807,7.7133913 19.0270807,7.39960248 18.8332919,7.20581366 Z\",\n id: \"icon_85\"\n})))));\n\nvar SvgSuccess = function SvgSuccess(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"24px\",\n height: \"24px\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgSuccess, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/success.fbef2967.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with sketchtool.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Starting-Components\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG-TieOut-|-Starting-Components-Part-1\",\n transform: \"translate(-599.000000, -2419.000000)\"\n}, React.createElement(\"g\", {\n id: \"Document-3\",\n transform: \"translate(599.000000, 2419.000000)\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"path\", {\n d: \"M14.1015,1.211 C21.16625,1.211 26.915,6.95975 26.915,14.024675 C26.915,21.089425 21.16625,26.83625 14.1015,26.83625 C7.03675,26.83625 1.28975,21.089425 1.28975,14.024675 C1.28975,6.95975 7.03675,1.211 14.1015,1.211 L14.1015,1.211 Z M14.1015,0.04725 C6.38225,0.04725 0.126175,6.305425 0.126175,14.024675 C0.126175,21.74375 6.38225,28 14.1015,28 C21.82075,28 28.07875,21.74375 28.07875,14.024675 C28.07875,6.305425 21.82075,0.04725 14.1015,0.04725 Z M20.46275,9.723 C20.433,9.65125 20.391,9.58825 20.33675,9.534 L16.261,5.45825 C16.2085,5.40575 16.14375,5.362175 16.07375,5.334 C16.00375,5.30425 15.92675,5.2885 15.84975,5.2885 L8.2775,5.2885 C7.95725,5.2885 7.6965,5.54925 7.6965,5.8695 L7.6965,22.17775 C7.6965,22.49975 7.95725,22.7605 8.2775,22.7605 L19.9255,22.7605 C20.2475,22.7605 20.50825,22.49975 20.50825,22.17775 L20.50825,9.947 C20.50825,9.86825 20.492675,9.793 20.46275,9.723 Z M16.4325,7.2765 L18.52025,9.36425 L16.4325,9.36425 L16.4325,7.2765 Z M8.86025,21.595 L8.86025,6.45225 L15.267,6.45225 L15.267,9.947 C15.267,10.269 15.52775,10.52975 15.84975,10.52975 L19.3445,10.52975 L19.3445,21.595 L8.86025,21.595 Z\",\n id: \"Combined-Shape\",\n fill: \"#000000\"\n}))));\n\nvar SvgDocument = function SvgDocument(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"29px\",\n height: \"28px\",\n viewBox: \"0 0 29 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgDocument, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/document.13c47588.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nconst OMNIA_FILE_SHARING_CONFIRM_MODAL_ID = 'file-export-in-progess-modal-id';\r\n\r\nconst StatementExportInProgressModal = ({ onClickClose, title, message }) => {\r\n return (\r\n \r\n
          \r\n \r\n
          \r\n \r\n );\r\n};\r\n\r\nStatementExportInProgressModal.propTypes = {\r\n /** Action fired when user clicks No || close button */\r\n onClickClose: PropTypes.func.isRequired,\r\n /** internationalized string title of the modal */\r\n title: PropTypes.string.isRequired,\r\n /** internationalized string - confirmation message*/\r\n message: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default StatementExportInProgressModal;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M12.6856 4.03563L17.6856 6.03563C18.0037 6.16287 18.1025 6.56512 17.8795 6.82526L15.0208 10.1604L15.4968 14.4446C15.5382 14.8172 15.1702 15.1011 14.8204 14.9665L11.9578 13.8655L9.45946 19.6968C9.36277 19.9224 9.11978 20.0404 8.88871 19.9874L8.80293 19.9594C8.57732 19.8627 8.45935 19.6198 8.51232 19.3887L8.54032 19.3029L11.0238 13.5065L8.3204 12.4665C7.96706 12.3306 7.88706 11.8666 8.17449 11.6202L11.5247 8.7486L12.0029 4.44465C12.0394 4.11624 12.3788 3.91291 12.6856 4.03563Z\",\n fill: \"black\"\n});\n\nvar SvgFilledPin = function SvgFilledPin(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFilledPin, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/FilledPin.3badaf34.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M4.99849 0.873332C4.99849 0.803226 4.95974 0.738877 4.89818 0.705762C4.83662 0.672761 4.76139 0.676693 4.70325 0.715508C4.69299 0.721721 3.687 1.38009 3.04579 0.738877C2.34815 0.0411799 1.34273 0.419638 0.907841 0.716591C0.855974 0.751929 0.825195 0.810636 0.825195 0.873332V5.42572C0.825195 5.53059 0.91012 5.61546 1.01499 5.61546C1.11987 5.61546 1.20479 5.53059 1.20479 5.42572V3.44394C1.45615 3.29626 2.22617 2.92179 2.7779 3.47295C3.45958 4.15463 4.47241 3.78757 4.913 3.49746C4.96601 3.46212 4.99849 3.40285 4.99849 3.33901V0.873332Z\",\n fill: \"#ED8B00\"\n});\n\nvar SvgFlagged = function SvgFlagged(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 5,\n height: 6,\n viewBox: \"0 0 5 6\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFlagged, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/flagged.46281a6a.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M13.8904 0C6.21913 0 0 6.21913 0 13.8908C0 21.5621 6.21913 27.7814 13.8904 27.7814C21.5617 27.7814 27.7809 21.5621 27.7809 13.8908C27.7809 6.21913 21.5617 0 13.8904 0Z\",\n fill: \"#43B02A\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M21.6583 8.15993C21.4452 7.94669 21.1011 7.94669 20.888 8.15993L10.3639 18.6832L6.93178 15.251C6.71871 15.0377 6.37288 15.0377 6.1598 15.251C5.94673 15.4639 5.94673 15.809 6.1598 16.0223L9.97871 19.8404C10.0852 19.9467 10.2246 20 10.3639 20C10.5032 20 10.6441 19.9467 10.7507 19.8404L21.6583 8.93108C21.8714 8.71801 21.8714 8.373 21.6583 8.15993Z\",\n fill: \"white\",\n stroke: \"white\"\n});\n\nvar SvgReviewed = function SvgReviewed(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgReviewed, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/reviewed.91a80bcb.svg\";\nexport { ForwardRef as ReactComponent };","import { getAPI } from './api-client';\r\nimport { withDefaultContextAsCurrentGeo } from 'api/api-default-context';\r\nimport { getGeosWhereUserHasProject } from 'utils/project-utils';\r\n\r\nexport const getBuildInfoRequest = () =>\r\n withDefaultContextAsCurrentGeo()\r\n .get('tieout/info')\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getFeatureInfoForAllGeos = async () => {\r\n const uniqueGeos = getGeosWhereUserHasProject();\r\n if (uniqueGeos.length) {\r\n return Promise.all(\r\n uniqueGeos.map((geoKey) =>\r\n getAPI(geoKey)\r\n .get('/tieout/info')\r\n .catch((e) => {\r\n console.log(\r\n 'failed to fetch feature info from GEO:' + geoKey + ',error:' + e,\r\n );\r\n return null;\r\n }),\r\n ),\r\n ).then((responses) => {\r\n return responses;\r\n });\r\n }\r\n return Promise.resolve([]);\r\n};\r\n","import { createAction } from 'redux-actions';\r\nimport { getUserOPMProfile } from 'api/current-user-api';\r\nimport { currentUserLoading, currentUserError } from './current-user-actions';\r\nimport { userAuth401Error } from './user-auth-actions';\r\n\r\nexport const setUserHomeGeo = createAction('SET_USER_HOME_GEO');\r\n\r\nexport const fetchUserOPMProfile = () => async (dispatch, getState) => {\r\n try {\r\n dispatch(currentUserLoading());\r\n const opmResponse = await getUserOPMProfile();\r\n\r\n const { response } = opmResponse;\r\n if (response && response.status === 401)\r\n await dispatch(userAuth401Error(response));\r\n else dispatch(setUserHomeGeo(opmResponse));\r\n } catch (error) {\r\n dispatch(currentUserError(error));\r\n }\r\n};\r\n","export const DEFAULT_SELECTED_PROJECT_ID = null;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0 0H12C14.2091 0 16 1.79086 16 4V12C16 14.2091 14.2091 16 12 16H0V0Z\",\n fill: \"#FFCD00\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"mask\", {\n id: \"path-2-inside-1_884_624117\",\n fill: \"white\"\n}, React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.19568 2.95312C5.578 2.95312 3.45583 5.0753 3.45583 7.69297C3.45583 8.53755 3.67903 9.32857 4.06606 10.0151C4.0665 10.0174 4.06561 10.0205 4.0665 10.0218C4.15935 10.1781 4.26247 10.5245 4.26247 10.8611C4.26247 11.4543 4.05891 11.8342 3.56609 12.3266C3.22504 12.6676 2.95319 12.9368 2.86748 13.0216C2.84873 13.0404 2.85498 13.0497 2.88623 13.0497H8.19568C11.1111 13.0497 13.1426 10.453 13.1426 8.03982C13.1426 5.62615 11.5356 4.32981 11.5356 4.32981L11.5347 4.33026C10.6781 3.47943 9.49826 2.95312 8.19568 2.95312Z\"\n}));\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.19568 2.95312C5.578 2.95312 3.45583 5.0753 3.45583 7.69297C3.45583 8.53755 3.67903 9.32857 4.06606 10.0151C4.0665 10.0174 4.06561 10.0205 4.0665 10.0218C4.15935 10.1781 4.26247 10.5245 4.26247 10.8611C4.26247 11.4543 4.05891 11.8342 3.56609 12.3266C3.22504 12.6676 2.95319 12.9368 2.86748 13.0216C2.84873 13.0404 2.85498 13.0497 2.88623 13.0497H8.19568C11.1111 13.0497 13.1426 10.453 13.1426 8.03982C13.1426 5.62615 11.5356 4.32981 11.5356 4.32981L11.5347 4.33026C10.6781 3.47943 9.49826 2.95312 8.19568 2.95312Z\",\n fill: \"white\"\n});\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M4.06606 10.0151L5.21334 9.78567L5.17679 9.60292L5.08527 9.44058L4.06606 10.0151ZM4.0665 10.0218L5.0723 9.42409L5.05681 9.39804L5.04 9.37282L4.0665 10.0218ZM3.56609 12.3266L2.73915 11.4989L2.73878 11.4993L3.56609 12.3266ZM2.86748 13.0216L2.0445 12.19L2.04016 12.1943L2.86748 13.0216ZM11.5356 4.32981L12.2702 3.41917L11.6849 2.94705L11.0124 3.28333L11.5356 4.32981ZM11.5347 4.33026L10.7102 5.16038L11.3064 5.75252L12.058 5.37674L11.5347 4.33026ZM8.19568 1.78313C4.93183 1.78313 2.28583 4.42912 2.28583 7.69297H4.62583C4.62583 5.72147 6.22418 4.12312 8.19568 4.12312V1.78313ZM2.28583 7.69297C2.28583 8.74671 2.5649 9.73474 3.04684 10.5897L5.08527 9.44058C4.79316 8.9224 4.62583 8.3284 4.62583 7.69297H2.28583ZM2.91878 10.2446C2.89575 10.1294 2.89589 10.0374 2.89626 10.0039C2.89655 9.97791 2.89878 9.93355 2.89732 9.9657C2.89715 9.96943 2.89288 10.0416 2.90132 10.1307C2.90595 10.1796 2.91597 10.2536 2.94076 10.3409C2.96564 10.4285 3.01023 10.5467 3.093 10.6708L5.04 9.37282C5.12255 9.49665 5.16697 9.61441 5.19173 9.70159C5.21639 9.78841 5.22634 9.86194 5.23092 9.91033C5.23926 9.99846 5.23502 10.0694 5.23491 10.0719C5.2335 10.1028 5.23581 10.0572 5.23612 10.0299C5.2365 9.99525 5.23659 9.90193 5.21334 9.78567L2.91878 10.2446ZM3.06071 10.6196C3.03971 10.5842 3.03607 10.57 3.04282 10.5877C3.048 10.6013 3.0563 10.6261 3.06484 10.66C3.08297 10.7318 3.09247 10.8055 3.09247 10.8611H5.43247C5.43247 10.3494 5.28932 9.78928 5.0723 9.42409L3.06071 10.6196ZM3.09247 10.8611C3.09247 11.0109 3.06955 11.0735 3.04747 11.1188C3.01587 11.1836 2.94269 11.2955 2.73915 11.4989L4.39303 13.1543C4.68231 12.8652 4.95732 12.541 5.15071 12.1445C5.35362 11.7284 5.43247 11.3044 5.43247 10.8611H3.09247ZM2.73878 11.4993C2.39977 11.8383 2.12952 12.1058 2.04451 12.19L3.69045 13.8532C3.77685 13.7677 4.05032 13.497 4.39341 13.1539L2.73878 11.4993ZM2.04016 12.1943C1.99652 12.2379 1.87635 12.3621 1.78895 12.5587C1.6906 12.78 1.58337 13.2398 1.88461 13.6917C2.12927 14.0587 2.48266 14.1578 2.58371 14.183C2.72023 14.2172 2.83372 14.2197 2.88623 14.2197V11.8797C2.92311 11.8797 3.02411 11.8811 3.15125 11.9129C3.24292 11.9358 3.59007 12.0314 3.8316 12.3937C4.12972 12.8409 4.02248 13.2949 3.92726 13.5091C3.84298 13.6987 3.72907 13.8147 3.69479 13.8489L2.04016 12.1943ZM2.88623 14.2197H8.19568V11.8797H2.88623V14.2197ZM8.19568 14.2197C11.8501 14.2197 14.3126 11.0023 14.3126 8.03982H11.9726C11.9726 9.90383 10.372 11.8797 8.19568 11.8797V14.2197ZM14.3126 8.03982C14.3126 6.56183 13.8183 5.41805 13.3237 4.6476C13.0771 4.26356 12.8288 3.96912 12.6366 3.766C12.5403 3.66413 12.4571 3.58425 12.394 3.52659C12.3624 3.49773 12.3358 3.47434 12.3149 3.45645C12.3044 3.4475 12.2954 3.43992 12.2879 3.43371C12.2842 3.4306 12.2809 3.42784 12.2779 3.42541C12.2764 3.4242 12.275 3.42307 12.2737 3.42203C12.2731 3.42151 12.2725 3.42101 12.2719 3.42054C12.2716 3.4203 12.2712 3.41995 12.271 3.41983C12.2706 3.4195 12.2702 3.41917 11.5356 4.32981C10.801 5.24046 10.8006 5.24014 10.8002 5.23982C10.8001 5.23972 10.7997 5.23941 10.7995 5.23921C10.799 5.23881 10.7985 5.23843 10.7981 5.23807C10.7972 5.23734 10.7964 5.23669 10.7957 5.23611C10.7943 5.23495 10.7932 5.23408 10.7925 5.2335C10.7911 5.23235 10.7911 5.23234 10.7925 5.23347C10.7951 5.23575 10.803 5.24257 10.8153 5.25387C10.8401 5.27653 10.8825 5.31679 10.9368 5.37416C11.046 5.48954 11.1994 5.67003 11.3546 5.91178C11.6635 6.39292 11.9726 7.10414 11.9726 8.03982H14.3126ZM11.0124 3.28333L11.0115 3.28378L12.058 5.37674L12.0589 5.37629L11.0124 3.28333ZM12.3592 3.50014C11.2927 2.4408 9.82 1.78313 8.19568 1.78313V4.12312C9.17653 4.12312 10.0635 4.51805 10.7102 5.16038L12.3592 3.50014Z\",\n fill: \"#757575\",\n mask: \"url(#path-2-inside-1_884_624117)\"\n});\n\nvar SvgOpenNonPriority = function SvgOpenNonPriority(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 16,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgOpenNonPriority, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/open-non-priority.70cf924d.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0 0H12C14.2091 0 16 1.79086 16 4V12C16 14.2091 14.2091 16 12 16H0V0Z\",\n fill: \"#757575\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3.45583 7.69297C3.45583 5.0753 5.578 2.95312 8.19568 2.95312C9.49826 2.95312 10.6781 3.47943 11.5347 4.33026L11.5356 4.32981C11.5356 4.32981 13.1426 5.62615 13.1426 8.03982C13.1426 10.453 11.1111 13.0497 8.19568 13.0497H2.88623C2.85498 13.0497 2.84873 13.0404 2.86748 13.0216C2.95319 12.9368 3.22504 12.6676 3.56609 12.3266C4.05891 11.8342 4.26247 11.4543 4.26247 10.8611C4.26247 10.5245 4.15935 10.1781 4.0665 10.0218C4.066 10.0211 4.06606 10.0197 4.06614 10.0183C4.06619 10.0172 4.06625 10.0161 4.06606 10.0151C3.67903 9.32857 3.45583 8.53755 3.45583 7.69297ZM5.41046 7.42183C5.1873 7.64498 5.1873 8.00679 5.41046 8.22995L7.20225 10.0217L7.25209 10.0661C7.47639 10.2438 7.80315 10.229 8.01037 10.0217L11.2429 6.78925C11.466 6.56609 11.466 6.20428 11.2429 5.98112C11.0197 5.75797 10.6579 5.75797 10.4347 5.98112L7.60613 8.80937L6.21858 7.42183C5.99543 7.19867 5.63362 7.19867 5.41046 7.42183Z\",\n fill: \"white\"\n});\n\nvar SvgClosedNonPriority = function SvgClosedNonPriority(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 16,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgClosedNonPriority, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/closed-non-priority.a9bf0700.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0 0H12C14.2091 0 16 1.79086 16 4V12C16 14.2091 14.2091 16 12 16H0V0Z\",\n fill: \"#DA291C\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3.45583 7.69297C3.45583 5.0753 5.578 2.95312 8.19568 2.95312C9.49826 2.95312 10.6781 3.47943 11.5347 4.33026L11.5356 4.32981C11.5356 4.32981 13.1426 5.62615 13.1426 8.03982C13.1426 10.453 11.1111 13.0497 8.19568 13.0497H2.88623C2.85498 13.0497 2.84873 13.0404 2.86748 13.0216C2.95319 12.9368 3.22504 12.6676 3.56609 12.3266C4.05891 11.8342 4.26247 11.4543 4.26247 10.8611C4.26247 10.5245 4.15935 10.1781 4.0665 10.0218C4.066 10.0211 4.06606 10.0197 4.06614 10.0183C4.06619 10.0172 4.06625 10.0161 4.06606 10.0151C3.67903 9.32857 3.45583 8.53755 3.45583 7.69297ZM9.67692 10.2463C9.70103 10.2598 9.72803 10.2667 9.75543 10.2666C9.76753 10.2669 9.77962 10.2657 9.79148 10.2632C9.87999 10.2445 9.93707 10.1551 9.91899 10.0636L9.60659 8.45962L10.6894 7.33956C10.7159 7.31198 10.7324 7.27579 10.7361 7.23709C10.7451 7.14411 10.6795 7.06121 10.5896 7.05193L9.04721 6.89289L8.43222 5.45982C8.41575 5.42118 8.38591 5.39031 8.34855 5.37327C8.2659 5.33557 8.16935 5.37432 8.13291 5.45982L7.51792 6.89289L5.97718 7.05193C5.93849 7.05555 5.90231 7.0733 5.87512 7.10199C5.81188 7.16871 5.8129 7.27584 5.87741 7.34125L6.95854 8.46131L6.64778 10.0636C6.63953 10.1044 6.64614 10.1469 6.66634 10.183C6.71161 10.2639 6.81168 10.2914 6.88985 10.2446L8.28338 9.44602L9.67692 10.2463Z\",\n fill: \"white\"\n});\n\nvar SvgOpenPriority = function SvgOpenPriority(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 16,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgOpenPriority, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/open-priority.020c4ae0.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\n\r\nconst AnnotationCalloutComponent = ({\r\n elementId,\r\n BLOCK,\r\n position,\r\n maxWidth,\r\n customStyle,\r\n onClick,\r\n children,\r\n Id = elementId,\r\n fontSize,\r\n}) => {\r\n return (\r\n e.stopPropagation()}\r\n onClick={() => {\r\n onClick();\r\n }}\r\n >\r\n {children}\r\n \r\n );\r\n};\r\n\r\nexport default AnnotationCalloutComponent;\r\n\r\nPropTypes.AnnotationCalloutComponent = {\r\n /**Id for an element */\r\n elementId: PropTypes.string.isRequired,\r\n /**name of the parent class. To be used for style purpose */\r\n BLOCK: PropTypes.string.isRequired,\r\n /**position where to show callout */\r\n position: PropTypes.string.isRequired,\r\n /**max width of callout */\r\n maxWidth: PropTypes.number,\r\n /**additional style to be added at element level */\r\n customStyle: PropTypes.object,\r\n /**function to be fired when callout is clicked */\r\n onClick: PropTypes.func,\r\n /**node to be rendered within callout */\r\n children: PropTypes.node,\r\n /**Id for a callout */\r\n Id: PropTypes.string.isRequired,\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M7 7.42412L0.5 3.70984L0.5 0.5L13.5 0.5L13.5 3.70984L7 7.42412Z\",\n fill: \"#0097A9\",\n stroke: \"#0097A9\"\n});\n\nvar SvgAnnotationIndicator = function SvgAnnotationIndicator(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 14,\n height: 8,\n viewBox: \"0 0 14 8\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgAnnotationIndicator, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/annotation-indicator.444f35aa.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useEffect, useState } from 'react';\r\nimport { IntlProvider } from 'react-intl';\r\nimport { connect, useSelector } from 'react-redux';\r\nimport {\r\n fetchAndUpdateLocaleMessage,\r\n fetchUserPreferredLanguageAndUpdateLocale,\r\n} from 'store/actions/locale-actions';\r\n\r\nimport enMessages from 'i18n/en.json';\r\nimport frMessages from 'i18n/fr.json';\r\nimport {\r\n getKeyForLocale,\r\n getMessagesForLocale,\r\n} from 'constants/common/feature-common-utils';\r\n\r\nconst mapStateToProps = ({ ui: { locale } }) => ({\r\n locale,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n fetchAndUpdateLocaleMessage,\r\n fetchUserPreferredLanguageAndUpdateLocale,\r\n};\r\n\r\nexport const messages = {\r\n 'en-US': enMessages,\r\n fr: frMessages,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(\r\n ({\r\n locale,\r\n children,\r\n fetchAndUpdateLocaleMessage,\r\n fetchUserPreferredLanguageAndUpdateLocale,\r\n }) => {\r\n const [updatedMessages, setUpdatedMessage] = useState(\r\n getMessagesForLocale(locale),\r\n );\r\n const { currentUser } = useSelector((state) => state.data);\r\n useEffect(() => {\r\n fetchAndUpdateLocaleMessage();\r\n // if messages exists for the new locale then update it\r\n if (getMessagesForLocale(locale))\r\n setUpdatedMessage(getMessagesForLocale(locale));\r\n\r\n const setMessageFromLocalStorage = (e) => {\r\n if (e.key === getKeyForLocale(locale)) {\r\n setUpdatedMessage(getMessagesForLocale(locale));\r\n }\r\n };\r\n window.addEventListener('storage', setMessageFromLocalStorage);\r\n return () =>\r\n window.removeEventListener('storage', setMessageFromLocalStorage);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [locale]);\r\n\r\n useEffect(() => {\r\n currentUser &&\r\n currentUser.data &&\r\n currentUser.data.id &&\r\n fetchUserPreferredLanguageAndUpdateLocale();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentUser.data.id]);\r\n\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n },\r\n);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"rect\", {\n fill: \"none\",\n width: 28,\n height: 28\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n id: \"increase5-a\",\n d: \"M20.4166667,8.16666667 L20.4166667,11.0833333 C20.4166667,11.4333333 20.1833333,11.6666667 19.8333333,11.6666667 C19.4833333,11.6666667 19.25,11.4333333 19.25,11.0833333 L19.25,9.56666667 L16.1583333,12.6583333 C16.0416667,12.775 15.925,12.8333333 15.75,12.8333333 C15.575,12.8333333 15.4583333,12.775 15.3416667,12.6583333 C15.1083333,12.425 15.1083333,12.075 15.3416667,11.8416667 L18.4333333,8.75 L16.9166667,8.75 C16.5666667,8.75 16.3333333,8.51666667 16.3333333,8.16666667 C16.3333333,7.81666667 16.5666667,7.58333333 16.9166667,7.58333333 L19.8333333,7.58333333 C19.8916667,7.58333333 19.95,7.58333333 20.0666667,7.64166667 C20.3,7.7 20.4166667,7.93333333 20.4166667,8.16666667 Z M11.8416667,15.3416667 L8.75,18.4333333 L8.75,16.9166667 C8.75,16.5666667 8.51666667,16.3333333 8.16666667,16.3333333 C7.81666667,16.3333333 7.58333333,16.5666667 7.58333333,16.9166667 L7.58333333,19.8333333 C7.58333333,19.8916667 7.58333333,19.95 7.64166667,20.0666667 C7.75833333,20.3 7.93333333,20.4166667 8.16666667,20.4166667 L11.0833333,20.4166667 C11.4333333,20.4166667 11.6666667,20.1833333 11.6666667,19.8333333 C11.6666667,19.4833333 11.4333333,19.25 11.0833333,19.25 L9.56666667,19.25 L12.6583333,16.1583333 C12.8916667,15.925 12.8916667,15.575 12.6583333,15.3416667 C12.425,15.1083333 12.075,15.1083333 11.8416667,15.3416667 Z M9.56666667,8.75 L11.0833333,8.75 C11.4333333,8.75 11.6666667,8.51666667 11.6666667,8.16666667 C11.6666667,7.81666667 11.4333333,7.58333333 11.0833333,7.58333333 L8.16666667,7.58333333 C8.10833333,7.58333333 8.05,7.58333333 7.93333333,7.64166667 C7.7,7.7 7.58333333,7.93333333 7.58333333,8.16666667 L7.58333333,11.0833333 C7.58333333,11.4333333 7.81666667,11.6666667 8.16666667,11.6666667 C8.51666667,11.6666667 8.75,11.4333333 8.75,11.0833333 L8.75,9.56666667 L11.8416667,12.6583333 C11.9583333,12.775 12.1333333,12.8333333 12.25,12.8333333 C12.3666667,12.8333333 12.5416667,12.775 12.6583333,12.6583333 C12.8916667,12.425 12.8916667,12.075 12.6583333,11.8416667 L9.56666667,8.75 Z M19.8333333,16.3333333 C19.4833333,16.3333333 19.25,16.5666667 19.25,16.9166667 L19.25,18.4333333 L16.1583333,15.3416667 C15.925,15.1083333 15.575,15.1083333 15.3416667,15.3416667 C15.1083333,15.575 15.1083333,15.925 15.3416667,16.1583333 L18.4333333,19.25 L16.9166667,19.25 C16.5666667,19.25 16.3333333,19.4833333 16.3333333,19.8333333 C16.3333333,20.1833333 16.5666667,20.4166667 16.9166667,20.4166667 L19.8333333,20.4166667 C20.0666667,20.4166667 20.3,20.3 20.3583333,20.0666667 C20.3583333,20.0083333 20.4166667,19.95 20.4166667,19.8333333 L20.4166667,16.9166667 C20.4166667,16.5666667 20.1833333,16.3333333 19.8333333,16.3333333 Z\"\n});\n\nvar SvgFullscreenIncrease = function SvgFullscreenIncrease(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFullscreenIncrease, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/fullscreen-increase.115538be.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"rect\", {\n fill: \"none\",\n width: 28,\n height: 28\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n id: \"decrease5-a\",\n d: \"M15.1666667,12.25 L15.1666667,9.33333333 C15.1666667,8.98333333 15.4,8.75 15.75,8.75 C16.1,8.75 16.3333333,8.98333333 16.3333333,9.33333333 L16.3333333,10.85 L19.425,7.75833333 C19.6583333,7.525 20.0083333,7.525 20.2416667,7.75833333 C20.475,7.99166667 20.475,8.34166667 20.2416667,8.575 L17.15,11.6666667 L18.6666667,11.6666667 C19.0166667,11.6666667 19.25,11.9 19.25,12.25 C19.25,12.6 19.0166667,12.8333333 18.6666667,12.8333333 L15.75,12.8333333 C15.6916667,12.8333333 15.575,12.8333333 15.5166667,12.775 C15.2833333,12.7166667 15.1666667,12.4833333 15.1666667,12.25 Z M12.775,15.5166667 C12.7166667,15.2833333 12.4833333,15.1666667 12.25,15.1666667 L9.33333333,15.1666667 C8.98333333,15.1666667 8.75,15.4 8.75,15.75 C8.75,16.1 8.98333333,16.3333333 9.33333333,16.3333333 L10.85,16.3333333 L7.75833333,19.425 C7.525,19.6583333 7.525,20.0083333 7.75833333,20.2416667 C7.875,20.3583333 8.05,20.4166667 8.16666667,20.4166667 C8.28333333,20.4166667 8.45833333,20.3583333 8.575,20.2416667 L11.6666667,17.15 L11.6666667,18.6666667 C11.6666667,19.0166667 11.9,19.25 12.25,19.25 C12.6,19.25 12.8333333,19.0166667 12.8333333,18.6666667 L12.8333333,15.75 C12.8333333,15.6916667 12.8333333,15.575 12.775,15.5166667 Z M17.15,16.3333333 L18.6666667,16.3333333 C19.0166667,16.3333333 19.25,16.1 19.25,15.75 C19.25,15.4 19.0166667,15.1666667 18.6666667,15.1666667 L15.75,15.1666667 C15.5166667,15.1666667 15.2833333,15.2833333 15.225,15.5166667 C15.1666667,15.575 15.1666667,15.6916667 15.1666667,15.75 L15.1666667,18.6666667 C15.1666667,19.0166667 15.4,19.25 15.75,19.25 C16.1,19.25 16.3333333,19.0166667 16.3333333,18.6666667 L16.3333333,17.15 L19.425,20.2416667 C19.5416667,20.3583333 19.7166667,20.4166667 19.8333333,20.4166667 C19.95,20.4166667 20.125,20.3583333 20.2416667,20.2416667 C20.475,20.0083333 20.475,19.6583333 20.2416667,19.425 L17.15,16.3333333 Z M12.25,8.75 C11.9,8.75 11.6666667,8.98333333 11.6666667,9.33333333 L11.6666667,10.85 L8.575,7.75833333 C8.34166667,7.525 7.99166667,7.525 7.75833333,7.75833333 C7.525,7.99166667 7.525,8.34166667 7.75833333,8.575 L10.85,11.6666667 L9.33333333,11.6666667 C8.98333333,11.6666667 8.75,11.9 8.75,12.25 C8.75,12.6 8.98333333,12.8333333 9.33333333,12.8333333 L12.25,12.8333333 C12.3083333,12.8333333 12.425,12.8333333 12.4833333,12.775 C12.7166667,12.6583333 12.8333333,12.4833333 12.8333333,12.25 L12.8333333,9.33333333 C12.8333333,8.98333333 12.6,8.75 12.25,8.75 Z\"\n});\n\nvar SvgFullscreenDecrease = function SvgFullscreenDecrease(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgFullscreenDecrease, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/fullscreen-decrease.3e172ea6.svg\";\nexport { ForwardRef as ReactComponent };","import ApiModel from 'models/api-model';\r\n\r\nexport default class SectionContentImageModel extends ApiModel({\r\n data: {\r\n image: null,\r\n sectionId: null,\r\n },\r\n}) {\r\n get sectionId() {\r\n if (this.data) {\r\n return this.data.sectionId;\r\n }\r\n return null;\r\n }\r\n\r\n get image() {\r\n if (this.data) {\r\n return this.data.image;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse(response) {\r\n return {\r\n data: {\r\n image: response.image,\r\n sectionId: response.sectionId,\r\n },\r\n };\r\n }\r\n clearImageContent() {\r\n return this.merge({\r\n isLoaded: false,\r\n isLoading: true,\r\n data: {\r\n ...this.data,\r\n image: null,\r\n },\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport default class SectionContentDataModel extends ApiModel({\r\n data: {\r\n ocr: null,\r\n sectionId: null,\r\n },\r\n}) {\r\n get sectionId() {\r\n if (this.data) {\r\n return this.data.sectionId;\r\n }\r\n return null;\r\n }\r\n\r\n get ocrWords() {\r\n if (this.data.ocr && this.data.ocr.words) {\r\n return this.data.ocr.words;\r\n }\r\n return [];\r\n }\r\n\r\n get ocrLines() {\r\n if (this.data.ocr && this.data.ocr.lines) {\r\n return this.data.ocr.lines;\r\n }\r\n return [];\r\n }\r\n\r\n get ocrTables() {\r\n if (this.data.ocr && this.data.ocr.tables) {\r\n return this.data.ocr.tables;\r\n }\r\n return [];\r\n }\r\n\r\n processResponse(response) {\r\n return {\r\n data: {\r\n ocr: response.ocr,\r\n sectionId: response.sectionId,\r\n },\r\n };\r\n }\r\n\r\n clearOCRDataContent() {\r\n return this.merge({\r\n isLoaded: false,\r\n isLoading: true,\r\n data: {\r\n ...this.data,\r\n ocr: null,\r\n },\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport SectionContentModelOCR from 'models/api/section-content-api-model-ocr-data';\r\n\r\nexport class LeftSectionCacheOCR extends ApiModel({\r\n data: {\r\n map: {},\r\n },\r\n status: null,\r\n}) {\r\n get map() {\r\n if (this.data && this.data.map) {\r\n return this.data.map;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response }) {\r\n let _instantiatedMap = {};\r\n response.data.forEach(({ sectionId }, index) => {\r\n const sectionContent = new SectionContentModelOCR();\r\n _instantiatedMap[sectionId] = sectionContent.setLoading();\r\n });\r\n return {\r\n data: {\r\n map: _instantiatedMap,\r\n },\r\n };\r\n }\r\n\r\n get(id) {\r\n return this.map[id];\r\n }\r\n\r\n _mergeSections(updatedSectionsMap) {\r\n return this.merge({\r\n data: {\r\n map: {\r\n ...this.data.map,\r\n ...updatedSectionsMap,\r\n },\r\n },\r\n });\r\n }\r\n\r\n mergeOCRSectionDataLoaded(section) {\r\n const map = {};\r\n map[section.sectionId] =\r\n this.data.map[section.sectionId].setLoaded(section);\r\n return this._mergeSections(map);\r\n }\r\n\r\n clearLeftSectionOCRContentFromMap({ removedSectionIds }) {\r\n let _clearedSectionsMap = {};\r\n removedSectionIds.forEach((id) => {\r\n _clearedSectionsMap[id] =\r\n id && this.data.map[id] && this.data.map[id].clearOCRDataContent();\r\n });\r\n return this._mergeSections(_clearedSectionsMap);\r\n }\r\n}\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M6.40924 1C6.68538 1 6.90924 1.22386 6.90924 1.5C6.90924 1.74546 6.73236 1.94961 6.49911 1.99194L6.40924 2H1.00015V14H13.0001V8.59091C13.0001 8.31477 13.224 8.09091 13.5001 8.09091C13.7456 8.09091 13.9498 8.26778 13.9921 8.50103L14.0001 8.59091V14.5C14.0001 14.78 13.7801 15 13.5001 14.9933L0.500163 15C0.220163 15 -0.00658179 14.78 0.000145943 14.5V1.5C0.000145943 1.22 0.220146 1 0.500146 1H6.40924ZM12.8537 0.146447L14.8537 2.14645C15.049 2.34171 15.049 2.65829 14.8537 2.85355L8.3537 9.35355C8.2839 9.42335 8.195 9.47093 8.0982 9.49029L5.5982 9.99029C5.24834 10.0603 4.93988 9.7518 5.00986 9.40194L5.50986 6.90194C5.52921 6.80515 5.57679 6.71625 5.64659 6.64645L12.1466 0.146447C12.3419 -0.0488155 12.6584 -0.0488155 12.8537 0.146447ZM12.5001 1.20711L6.46075 7.24651L6.13752 8.86262L7.75364 8.5394L13.793 2.5L12.5001 1.20711Z\",\n fill: \"black\"\n});\n\nvar SvgEditPage = function SvgEditPage(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 15,\n height: 15,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgEditPage, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/edit-page.0b6c4718.svg\";\nexport { ForwardRef as ReactComponent };","import BaseModel from 'models/base-model';\r\nimport { STATEMENT_CONTENT_TABS } from 'constants/feature/statement-content-constants';\r\n\r\nexport default class StatementContentFilters extends BaseModel({\r\n selectedTab: STATEMENT_CONTENT_TABS.STATEMENT,\r\n}) {\r\n setSelectedTab(selectedTab) {\r\n return this.merge({\r\n selectedTab: selectedTab,\r\n });\r\n }\r\n}\r\n","import BaseModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n FORMULA_CREATION_TYPES,\r\n FORMULA_TYPES_MAP,\r\n FORMULA_ROW_TYPES,\r\n} from 'constants/feature/formula-constants';\r\nimport FormulaRowElement from './formula-row-element-model';\r\nimport FormulaRowNumber from './formula-row-number-model';\r\nimport FormulaRowOperator from './formula-row-operator-model';\r\nimport { getElementResultByNumberFormat } from 'utils/formula-utils';\r\n\r\nexport default class FormulaListEntry extends BaseModel({\r\n formulaId: null,\r\n revisionId: null,\r\n elementId: null,\r\n flagged: false,\r\n type: null,\r\n operator: null,\r\n creationType: null,\r\n result: 0, // The unscaled amount of the owning element of the formula, which is stored in the element.amount column in the DB\r\n computedResult: null, // The sum of the amounts of the elements that compose a formula\r\n rows: [],\r\n roundingResult: null,\r\n roundingScale: 0,\r\n\r\n // array of statement elements used on hover of the formula list entry to display relevant elements in the content panel\r\n includedElementIds: [],\r\n}) {\r\n isFlagged() {\r\n return this.flagged;\r\n }\r\n isFormulaRounded() {\r\n return (\r\n this.roundingResult !== null &&\r\n this.roundingResult !== this.computedResult\r\n );\r\n }\r\n\r\n hasRows() {\r\n return this.rows.length > 0;\r\n }\r\n\r\n getExpression(numberFormatId) {\r\n let expression = '';\r\n if (this.hasRows()) {\r\n this.rows.forEach((row) => {\r\n expression =\r\n expression +\r\n getElementResultByNumberFormat(row.value, numberFormatId) +\r\n ' ';\r\n });\r\n }\r\n return expression;\r\n }\r\n\r\n convertFormulaDTOToFormulaListEntryModel(formulaDTO) {\r\n const { rows, includedElementIds } = this.convertDTOToRows(\r\n formulaDTO.formulaElementDtoList,\r\n );\r\n return this.merge({\r\n ...formulaDTO,\r\n isLoaded: true,\r\n rows,\r\n includedElementIds,\r\n formulaId: formulaDTO.id,\r\n flagged: formulaDTO.flagged === 1 ? true : false,\r\n creationType: formulaDTO.creationType\r\n ? formulaDTO.creationType\r\n : FORMULA_CREATION_TYPES.UNKNOWN,\r\n type: formulaDTO.type ? FORMULA_TYPES_MAP.get(formulaDTO.type) : null,\r\n value: !isNullOrUndefined(formulaDTO.includedElementAmount)\r\n ? formulaDTO.includedElementAmount\r\n : formulaDTO.value,\r\n });\r\n }\r\n\r\n convertDTOToRows(formulaElementDtoList) {\r\n let includedElementIds = [];\r\n const rows = formulaElementDtoList.map((formulaElementDto) => {\r\n switch (formulaElementDto.type) {\r\n case FORMULA_ROW_TYPES.ELEMENT: {\r\n includedElementIds.push(formulaElementDto.includedElementId);\r\n return new FormulaRowElement({\r\n elementData: {\r\n // TODO revisit initialization for formula edit\r\n id: formulaElementDto.includedElementId,\r\n amount: formulaElementDto.includedElementAmount,\r\n },\r\n });\r\n }\r\n case FORMULA_ROW_TYPES.NUMBER: {\r\n return new FormulaRowNumber({\r\n value: formulaElementDto.value,\r\n });\r\n }\r\n case FORMULA_ROW_TYPES.OPERATOR: {\r\n return new FormulaRowOperator({\r\n value: formulaElementDto.value,\r\n });\r\n }\r\n default: {\r\n console.error('INVALID FORMULA ROW TYPE');\r\n return null;\r\n }\r\n }\r\n });\r\n return {\r\n rows,\r\n includedElementIds,\r\n };\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nexport default class InternalReferenceSuggestionList extends ApiModel({\r\n data: {\r\n suggestions: [],\r\n },\r\n status: null,\r\n}) {\r\n get suggestions() {\r\n if (!isNullOrUndefined(this.data) && this.data.suggestions.length > 0) {\r\n return this.data.suggestions;\r\n }\r\n return [];\r\n }\r\n get count() {\r\n return this.suggestions.length;\r\n }\r\n processResponse(response) {\r\n if (response && response.data) {\r\n return {\r\n data: { suggestions: response.data },\r\n status: response.status,\r\n };\r\n }\r\n }\r\n\r\n updateSuggestedIRElementsFromListFromSocketPayload(payload) {\r\n const _elementMap = payload.reduce((elementMap, elementData) => {\r\n elementMap[elementData.id] = elementData;\r\n return elementMap;\r\n }, {});\r\n const suggestions = [...this.data.suggestions];\r\n for (let i = 0; i < suggestions.length; i++) {\r\n const element = suggestions[i];\r\n if (element.id in _elementMap) {\r\n suggestions[i] = { ...element, ..._elementMap[element.id] };\r\n }\r\n }\r\n return this.merge({ data: { suggestions } });\r\n }\r\n updateSuggestedIRListFromSocketPayload(payload) {\r\n return this.merge({ data: { suggestions: payload } });\r\n }\r\n\r\n removeSuggestedIRFromSocketPayload(payload) {\r\n const _elementMap = payload.reduce((elementMap, elementData) => {\r\n elementMap[elementData.elementId] = elementData;\r\n return elementMap;\r\n }, {});\r\n const suggestions = [...this.data.suggestions];\r\n for (let i = 0; i < suggestions.length; i++) {\r\n const element = suggestions[i];\r\n if (element.id in _elementMap) {\r\n suggestions.splice(i, 1);\r\n }\r\n }\r\n return this.merge({ data: { suggestions } });\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class SourceStatementParams extends BaseModel({\r\n projectId: null,\r\n statementId: null,\r\n revisionId: null,\r\n readOnly: false,\r\n documentProcessType: 1,\r\n}) {}\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const toggleNavigationEditMode = createAction(\r\n 'SET_NAVIGATION_EDIT_MODE'\r\n);\r\n\r\nexport const toggleNavigationEditModeDispatch = () => async (\r\n dispatch,\r\n getState\r\n) => {\r\n dispatch(toggleNavigationEditMode());\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class ElementHistory extends ApiModel({\r\n data: {\r\n entries: [],\r\n },\r\n}) {\r\n get entries() {\r\n if (isNullOrUndefined(this.data)) {\r\n return [];\r\n }\r\n return this.data.entries;\r\n }\r\n\r\n processResponse(response) {\r\n return { data: { entries: response.data.result } };\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class SectionTreeListEntry extends BaseModel({\r\n children: [],\r\n id: 0,\r\n is_technical: null,\r\n name: null,\r\n orderNum: null,\r\n parentSectionName: null,\r\n revisionId: null,\r\n type: null,\r\n isNew: false,\r\n}) {\r\n constructor(props) {\r\n super(props);\r\n this.children = this._initChildren({ children: props.children });\r\n }\r\n\r\n _initChildren({ children }) {\r\n if (isNullOrUndefined(children)) {\r\n return null;\r\n }\r\n\r\n return children.map(\r\n (childSection) => new SectionTreeListEntry(childSection),\r\n );\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\n\r\nexport default class AdminModuleMaintenance extends BaseModel({\r\n apiMaintenanceId: null,\r\n apiStartTime: null,\r\n apiEndTime: null,\r\n apiStartDate: null,\r\n apEndDate: null,\r\n apiBannerText: null,\r\n isActive: false,\r\n isLoading: true,\r\n isLoaded: false,\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { DataGridSort } from 'components/common/data-grid/data-grid-component';\r\nimport { ADMIN_MODULE_SORT_COLUMN_KEYS } from 'constants/feature/admin-module-constants';\r\nimport { orderBy } from 'lodash';\r\nimport { getCountryNameByCountryCode } from 'utils/project-utils';\r\n\r\nconst SORT_ORDER = {\r\n ASC: 'asc',\r\n DESC: 'desc',\r\n};\r\nexport default class MonitoringForm extends ApiModel({\r\n data: {\r\n monitoringList: [],\r\n monitoringCountrySelectedOptions: [],\r\n sort: new DataGridSort({\r\n key: ADMIN_MODULE_SORT_COLUMN_KEYS\r\n ? ADMIN_MODULE_SORT_COLUMN_KEYS.country\r\n : null,\r\n order: SORT_ORDER.ASC,\r\n }),\r\n },\r\n}) {\r\n get containerCodes() {\r\n if (!isNullOrUndefined(this.data.monitoringCountrySelectedOptions)) {\r\n return this.data.monitoringCountrySelectedOptions.map(\r\n ({ value }) => value,\r\n );\r\n }\r\n return '';\r\n }\r\n\r\n get totalStatementsInEachStatus() {\r\n if (!isNullOrUndefined(this.data.monitoringList)) {\r\n let totalObj = {\r\n clientName: 'Total',\r\n activeStatements: 0,\r\n wrappedupStatements: 0,\r\n deletedStatements: 0,\r\n containerCode: '',\r\n };\r\n this.data.monitoringList.map((item) => {\r\n totalObj.activeStatements += item.activeStatements;\r\n totalObj.wrappedupStatements += item.wrappedupStatements;\r\n totalObj.deletedStatements += item.deletedStatements;\r\n });\r\n return [totalObj];\r\n }\r\n return [];\r\n }\r\n\r\n get monitoringOptionsSelected() {\r\n return this.data.monitoringCountrySelectedOptions;\r\n }\r\n\r\n processResponse(response) {\r\n const monitoringData = response.data;\r\n let changeContainerCodesToCountryNameUpdatedData = monitoringData.map(\r\n (item) => {\r\n return {\r\n ...item,\r\n containerCode: getCountryNameByCountryCode(item.containerCode),\r\n };\r\n },\r\n );\r\n let orderedData = orderBy(\r\n changeContainerCodesToCountryNameUpdatedData,\r\n [\r\n ADMIN_MODULE_SORT_COLUMN_KEYS.containerCode,\r\n ADMIN_MODULE_SORT_COLUMN_KEYS.clientName,\r\n ],\r\n [SORT_ORDER.ASC, SORT_ORDER.ASC],\r\n );\r\n return {\r\n data: {\r\n ...this.data,\r\n monitoringList: orderedData,\r\n },\r\n };\r\n }\r\n\r\n setCountryOption(option) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n monitoringCountrySelectedOptions: option,\r\n },\r\n });\r\n }\r\n}\r\n","import { createAction } from 'redux-actions';\r\n\r\nexport const setHideOrDisplayElements = createAction(\r\n 'HIDE_OR_DISPLAY_ELEMENTS',\r\n);\r\n\r\nexport const setHideOrDisplayElementsOnStatementPage =\r\n ({ displayValue }) =>\r\n async (dispatch) => {\r\n dispatch(setHideOrDisplayElements(displayValue));\r\n };\r\n","import { checkIfStringContainsOnlySpaces } from 'constants/common/feature-common-utils';\r\nimport {\r\n COMFORT_LETTER_CUSTOM_LABEL_CHAR_LIMIT,\r\n COMFORT_LETTER_DESCRIPTION_CHAR_LIMIT,\r\n} from 'constants/feature/comfort-letter-constants';\r\nimport ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport htmlToText from 'html-to-text';\r\n\r\nexport default class ComfortLetterForm extends ApiModel({\r\n data: {\r\n revisionId: null,\r\n elementId: null,\r\n customLabel: '',\r\n description: '',\r\n descriptionRichText: '',\r\n comfortLetterCreatedBy: null,\r\n comfortLetterCreatedDate: null,\r\n elementComfortLetterCreatedBy: null,\r\n elementComfortLetterCreatedDate: null,\r\n comfortLetterId: null,\r\n },\r\n errorDuplicateDescription: null, // stores the id determined to be duplicate after the last failed request\r\n errorDuplicateLabel: null,\r\n}) {\r\n get id() {\r\n if (this.data) {\r\n return this.data.comfortLetterId;\r\n }\r\n return null;\r\n }\r\n\r\n get revisionId() {\r\n if (this.data) {\r\n return this.data.revisionId;\r\n }\r\n return null;\r\n }\r\n get elementId() {\r\n if (this.data) {\r\n return this.data.elementId;\r\n }\r\n return null;\r\n }\r\n get customLabel() {\r\n if (this.data) {\r\n return this.data.customLabel;\r\n }\r\n return '';\r\n }\r\n get description() {\r\n if (this.data) {\r\n return this.data.description;\r\n }\r\n return '';\r\n }\r\n\r\n get descriptionRichText() {\r\n if (this.data) {\r\n return this.data.descriptionRichText;\r\n }\r\n return '';\r\n }\r\n\r\n get comfortLetterId() {\r\n if (this.data) {\r\n return this.data.comfortLetterId;\r\n }\r\n return null;\r\n }\r\n\r\n toApiFormat() {\r\n return {\r\n elementId: this.elementId,\r\n revisionId: this.revisionId,\r\n label: this.customLabel,\r\n text: this.description,\r\n richText: this.descriptionRichText,\r\n };\r\n }\r\n\r\n toEditApiFormat() {\r\n return {\r\n revisionId: this.revisionId,\r\n comfortLetterId: this.data.comfortLetterId,\r\n label: this.customLabel,\r\n text: this.description,\r\n richText: this.descriptionRichText,\r\n };\r\n }\r\n\r\n initFromElement({ elementDetails }) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n data: {\r\n ...this.data,\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n },\r\n });\r\n }\r\n\r\n setDuplicateLabelLoaded({ duplicate }) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n errorDuplicateLabel: duplicate,\r\n });\r\n }\r\n\r\n setDuplicateDescriptionLoaded({ duplicate }) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n errorDuplicateDescription: duplicate,\r\n });\r\n }\r\n\r\n setCustomLabel(customLabel) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n customLabel: customLabel.trim(),\r\n },\r\n });\r\n }\r\n\r\n setDescription(description) {\r\n const text = htmlToText.fromString(description, {\r\n wordwrap: false, // by default it adds new lines after 80 chars, need to disable to ensure no new characters are added\r\n });\r\n // we need to remove ascii codes from strings\r\n // https://stackoverflow.com/questions/20856197/remove-non-ascii-character-in-\r\n\r\n //We need to remove new line characters\r\n //https://stackoverflow.com/questions/10805125/how-to-remove-all-line-breaks-from-a-string\r\n // text = text.replace(/(\\r\\n|\\n|\\r)/gm, '');\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n description: text.trim()\r\n // eslint-disable-next-line no-control-regex\r\n .replace(/[^\\x00-\\x7F]/g, '')\r\n .replace(/(\\r\\n|\\n|\\r)/gm, ''),\r\n\r\n descriptionRichText: description,\r\n },\r\n });\r\n }\r\n\r\n isCustomLabelTooLong() {\r\n return (\r\n !isNullOrUndefined(this.data.customLabel) &&\r\n this.data.customLabel.length > COMFORT_LETTER_CUSTOM_LABEL_CHAR_LIMIT\r\n );\r\n }\r\n\r\n isCustomLabelTooShort() {\r\n return (\r\n !isNullOrUndefined(this.data.customLabel) &&\r\n (this.data.customLabel.length === 0 ||\r\n checkIfStringContainsOnlySpaces(this.customLabel))\r\n );\r\n }\r\n\r\n isCustomLabelDuplicate() {\r\n return this.data && !isNullOrUndefined(this.errorDuplicateLabel);\r\n }\r\n\r\n isDescriptionDuplicate() {\r\n return this.data && !isNullOrUndefined(this.errorDuplicateDescription);\r\n }\r\n\r\n isCustomLabelValid() {\r\n return !this.isCustomLabelDuplicate() && !this.isCustomLabelTooLong();\r\n }\r\n\r\n isDescriptionTooLong() {\r\n return (\r\n !isNullOrUndefined(this.data && this.data.description) &&\r\n this.data.description.length > COMFORT_LETTER_DESCRIPTION_CHAR_LIMIT\r\n );\r\n }\r\n\r\n isDescriptionTooShort() {\r\n return (\r\n !isNullOrUndefined(this.data && this.data.description) &&\r\n this.data.description.length === 0\r\n );\r\n }\r\n\r\n isDescriptionValid() {\r\n return !this.isDescriptionTooLong() && !this.isDescriptionDuplicate();\r\n }\r\n\r\n isComfortLetterValid() {\r\n return this.isDescriptionValid() && this.isCustomLabelValid();\r\n }\r\n\r\n convertApiResponsetoComfortLetterFormModelFormat(apiResponse) {\r\n return this.merge({\r\n revisionId: apiResponse.revisionId,\r\n elementId: apiResponse.elementId,\r\n customLabel: apiResponse.label,\r\n description: apiResponse.text,\r\n descriptionRichText: apiResponse.richText,\r\n comfortLetterCreatedBy: apiResponse.comfortLetterCreatedBy,\r\n comfortLetterCreatedDate: apiResponse.comfortLetterCreatedDate,\r\n elementComfortLetterCreatedBy: apiResponse.elementcomfortLetterCreatedBy,\r\n elementComfortLetterCreatedDate:\r\n apiResponse.elementcomfortLetterCreatedDate,\r\n comfortLetterId: apiResponse.comfortLetterId,\r\n });\r\n }\r\n}\r\n","export const DIRECT_CALL_RULES = {\r\n NEW_PAGE_VIEW: 'newPageView',\r\n NEW_PROJECT_VIEW: 'projectView',\r\n};\r\n","import BaseModel from 'models/base-model';\r\n\r\nclass AdobeDirectCallRule extends BaseModel({\r\n dataLayer: {},\r\n ruleName: null,\r\n}) {\r\n constructor(ruleName, dataLayer) {\r\n super({ ruleName, dataLayer });\r\n }\r\n}\r\n\r\nexport default AdobeDirectCallRule;\r\n","import { LOCATION_CHANGE } from 'react-router-redux';\r\n\r\nimport { DIRECT_CALL_RULES } from 'constants/feature/adobe-analytics-constants';\r\nimport DirectCallRule from 'models/data/adobe-direct-call-rule-model';\r\nimport {\r\n isDataLayerReady,\r\n isSatelliteReady,\r\n appendDCRQueue,\r\n getDCRQueue,\r\n setDCRQueue,\r\n trackDCR,\r\n getRoutePageName,\r\n} from 'utils/adobe-analytics-utils';\r\nimport { createAction } from 'redux-actions';\r\n\r\nexport const SET_ADOBE_NEW_PROJECT_DATA_ACTION = createAction(\r\n 'adobe-track-new-project-view-action',\r\n);\r\n\r\nconst adobeAnalyticsMiddleware = (store) => (next) => (action) => {\r\n if (action.type === LOCATION_CHANGE) {\r\n const { pathname } = action.payload.location;\r\n const event = new DirectCallRule(DIRECT_CALL_RULES.NEW_PAGE_VIEW, {\r\n pageInfo: { pageName: getRoutePageName(pathname) },\r\n });\r\n appendDCRQueue(event);\r\n } else if (action.type === `${SET_ADOBE_NEW_PROJECT_DATA_ACTION}`) {\r\n const event = new DirectCallRule(DIRECT_CALL_RULES.NEW_PROJECT_VIEW);\r\n appendDCRQueue(event);\r\n }\r\n\r\n const queue = getDCRQueue();\r\n if (isDataLayerReady() && isSatelliteReady() && queue.length > 0) {\r\n queue.forEach((event) => trackDCR(event, false));\r\n setDCRQueue([]);\r\n }\r\n\r\n return next(action);\r\n};\r\n\r\nexport default adobeAnalyticsMiddleware;\r\n","import React, { useEffect, useState } from 'react';\r\nimport classNames from 'classnames';\r\nimport { useDispatch } from 'react-redux';\r\nimport { useLocation } from 'react-router-dom';\r\nimport { ReactComponent as AnnotationIndicator } from 'icons/annotation-indicator.svg';\r\nimport {\r\n isElementReportPreviewPage,\r\n getCalloutVisibilityDetails,\r\n getInitialCalloutVisibilityDetails,\r\n} from 'utils/ocr-annotation-utils';\r\nimport {\r\n getMarkerPosition,\r\n getCalloutPosition,\r\n} from 'utils/ocr-annotation-utils';\r\nimport { updateSideBySideElementCacheByCallouts } from 'store/actions/statement-content-annotation-creation-actions';\r\nimport AnnotationCalloutComponent from './tieout-element-common/annotation-callout-component';\r\nimport { setSelectedElementDetails } from 'store/actions/report-preview-page-actions';\r\nimport { getElementBoundaryInfo } from 'utils/ocr-element-utils';\r\n\r\nconst OcrCallouts = ({\r\n elementId,\r\n BLOCK,\r\n polygonInPixel,\r\n elementDetails,\r\n width,\r\n children,\r\n annotationDisplayFilter,\r\n annotation,\r\n annotationPosition,\r\n setAnnotation,\r\n sectionId,\r\n canvasID,\r\n isLeftView = false,\r\n}) => {\r\n const dispatch = useDispatch();\r\n const url = useLocation().pathname;\r\n const isPreviewPage = isElementReportPreviewPage(url);\r\n\r\n const ANNOTATION_INDICATOR_WIDTH = '13px';\r\n const ANNOTATION_INDICATOR_HEIGHT = '8px';\r\n\r\n const [annotationStyle, setAnnotationStyle] = useState({\r\n marker: {},\r\n callout: {},\r\n });\r\n\r\n const handleIndicatorClick = (elementId) => {\r\n if (isPreviewPage) {\r\n dispatch(\r\n setSelectedElementDetails({\r\n selectedElementId: elementId,\r\n isClickedOnReport: false,\r\n }),\r\n );\r\n } else {\r\n const initialCalloutVisibilityDetails = {\r\n displayMarker: !annotation['marker'],\r\n displayCallout: !annotation['callout'],\r\n displayAnnotation: !annotation['display'],\r\n };\r\n\r\n const { displayCallout } = getCalloutVisibilityDetails(\r\n initialCalloutVisibilityDetails,\r\n annotation.annotationsConfig,\r\n annotationDisplayFilter,\r\n );\r\n\r\n dispatch(\r\n updateSideBySideElementCacheByCallouts({\r\n elementIds: [elementId],\r\n showCallout: displayCallout,\r\n isLeftSideView: isLeftView,\r\n }),\r\n );\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (annotationDisplayFilter.showAll) {\r\n const initialCalloutVisibilityDetails = {\r\n displayMarker: false,\r\n displayCallout: true,\r\n displayAnnotation: true,\r\n };\r\n\r\n const calloutVisibilityDetails = getCalloutVisibilityDetails(\r\n initialCalloutVisibilityDetails,\r\n annotation.annotationsConfig,\r\n annotationDisplayFilter,\r\n );\r\n\r\n setAnnotation({\r\n ...annotation,\r\n marker: calloutVisibilityDetails.displayMarker,\r\n display: calloutVisibilityDetails.displayAnnotation,\r\n callout: calloutVisibilityDetails.displayCallout,\r\n showAll: true,\r\n });\r\n } else {\r\n setAnnotation({\r\n ...annotation,\r\n display: false,\r\n marker: isPreviewPage ? annotation.marker : true,\r\n callout: isPreviewPage ? annotation.callout : false,\r\n showAll: false,\r\n });\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [annotationDisplayFilter.showAll]);\r\n\r\n useEffect(() => {\r\n const initialCalloutVisibilityDetails = getInitialCalloutVisibilityDetails(\r\n annotation,\r\n annotationDisplayFilter,\r\n );\r\n const calloutVisibilityDetails = getCalloutVisibilityDetails(\r\n initialCalloutVisibilityDetails,\r\n annotation.annotationsConfig,\r\n annotationDisplayFilter,\r\n );\r\n\r\n setAnnotation({\r\n ...annotation,\r\n marker: isPreviewPage\r\n ? annotation.marker\r\n : calloutVisibilityDetails.displayMarker,\r\n display: calloutVisibilityDetails.displayAnnotation,\r\n callout: isPreviewPage\r\n ? annotation.callout\r\n : calloutVisibilityDetails.displayCallout,\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n annotationDisplayFilter.workpaper,\r\n annotationDisplayFilter.tickmarks,\r\n annotationDisplayFilter.internalRef,\r\n annotationDisplayFilter.formula,\r\n annotationDisplayFilter.comfortLetter,\r\n ]);\r\n\r\n const { polygonHeight } = getElementBoundaryInfo(polygonInPixel);\r\n\r\n useEffect(() => {\r\n const canvasElement = document.getElementById(canvasID);\r\n const element = document.getElementById(elementId);\r\n const { clientHeight, clientWidth } = canvasElement ? canvasElement : {};\r\n const canvasWidth = clientWidth ? clientWidth : 0;\r\n const canvasHeight = clientHeight ? clientHeight : 0;\r\n const offsetWidth = element ? { [elementId]: element.offsetWidth } : {};\r\n const offsetHeight = element ? { [elementId]: element.offsetHeight } : {};\r\n const { position } = annotationPosition;\r\n const style = {\r\n marker: {\r\n ...getMarkerPosition({ position, polygonInPixel, canvasHeight }),\r\n },\r\n callout: {\r\n ...getCalloutPosition({\r\n position,\r\n polygonInPixel,\r\n canvasHeight,\r\n canvasWidth,\r\n offsetHeight,\r\n offsetWidth,\r\n elementId,\r\n isPreviewPage,\r\n }),\r\n },\r\n };\r\n\r\n setAnnotationStyle(style);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n annotation,\r\n annotationDisplayFilter,\r\n annotationPosition.position,\r\n polygonInPixel,\r\n elementDetails,\r\n ]);\r\n return (\r\n <>\r\n {annotation.marker && (\r\n e.stopPropagation()}\r\n onClick={() => {\r\n !isPreviewPage && handleIndicatorClick(elementId);\r\n }}\r\n >\r\n \r\n \r\n )}\r\n {annotation.callout && (\r\n
          \r\n {\r\n handleIndicatorClick(elementId);\r\n }}\r\n fontSize={\r\n elementDetails && elementDetails.display == '―'\r\n ? polygonHeight\r\n : polygonHeight - 3\r\n }\r\n >\r\n {children}\r\n \r\n
          \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default OcrCallouts;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport const ELEMENT_BLOCK = 'tieout-element';\r\n\r\nconst PreviewReportCalloutComponent = ({ elementDetails }) => {\r\n return (\r\n
          \r\n {elementDetails.previewSequenceID}\r\n
          \r\n );\r\n};\r\n\r\nexport default PreviewReportCalloutComponent;\r\n\r\nPropTypes.PreviewReportCalloutComponent = {\r\n // details of element for which preview sequence id has to be rendered\r\n elementDetails: PropTypes.object.isRequired,\r\n};\r\n","import React, { memo } from 'react';\r\nimport { useLocation } from 'react-router-dom';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { ANNOTATION_DISPLAY_FUNCTIONS } from 'constants/feature/tieout-element-constants';\r\nimport FeatureFlagComponent from 'components/common/feature-flag-component';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport OcrCallouts from 'components/feature/statement-content-panel/ocr-callouts';\r\nimport PreviewReportCalloutComponent from './tieout-element-common/_tieout-preview-report-callout-component';\r\nimport classNames from 'classnames';\r\n\r\nconst ELEMENT_BLOCK = 'tieout-element';\r\n\r\nexport const TieoutCalloutElementOCR = ({\r\n elementDetails,\r\n BLOCK,\r\n elementId,\r\n annotationDisplayFilter,\r\n annotation,\r\n annotationPosition,\r\n polygonInPixel,\r\n setAnnotation,\r\n isOCR,\r\n sectionId,\r\n isLeftView,\r\n canvasID,\r\n}) => {\r\n let hideAnnotations = { flag: false, annotations: false };\r\n\r\n const url = useLocation().pathname;\r\n const isPreviewPage = url.includes(ROUTE_CONSTANTS.REPORT_PREVIEW);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport const SelectedableElement = ({\r\n hideAnnotations,\r\n annotationDisplayFilter,\r\n elementDetails,\r\n isOCR,\r\n isPreviewPage,\r\n}) => {\r\n if (isPreviewPage) {\r\n return ;\r\n } else {\r\n return (\r\n <>\r\n \r\n {!hideAnnotations.annotations && annotationDisplayFilter.comfortLetter\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.comfortLetter({\r\n elementDetails,\r\n })\r\n : null}\r\n \r\n {!hideAnnotations.annotations && annotationDisplayFilter.tickmarks\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.tickmarks({\r\n elementDetails,\r\n })\r\n : null}\r\n {!hideAnnotations.annotations && annotationDisplayFilter.formula\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.formula({\r\n elementDetails,\r\n })\r\n : null}\r\n {!hideAnnotations.annotations && annotationDisplayFilter.internalRef\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.internalRef({\r\n elementDetails,\r\n })\r\n : null}\r\n {!hideAnnotations.annotations && annotationDisplayFilter.workpaper\r\n ? ANNOTATION_DISPLAY_FUNCTIONS.workpaper({\r\n elementDetails,\r\n isOCR,\r\n })\r\n : null}\r\n \r\n );\r\n }\r\n};\r\n\r\nexport default memo(TieoutCalloutElementOCR);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3.99505 2.8875C4.22577 3.08763 4.22473 3.44603 3.99286 3.64481L1.10975 6.11651C0.784905 6.395 0.283082 6.16334 0.28432 5.73547L0.298668 0.775428C0.299906 0.347551 0.80306 0.1188 1.12629 0.399165L3.99505 2.8875Z\",\n fill: \"black\"\n});\n\nvar SvgCaretBlack = function SvgCaretBlack(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 5,\n height: 7,\n viewBox: \"0 0 5 7\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCaretBlack, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/caret-black.d09d7716.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5.20766 13.6799L0.960991 8.99242C0.820281 8.8371 0.735107 8.60207 0.735107 8.4047C0.735107 8.20733 0.820281 7.97229 0.960991 7.81698C1.26217 7.48453 1.72471 7.48453 2.02589 7.81698L4.98177 11.0797V1.70827C4.98177 1.21802 5.29596 0.871216 5.74011 0.871216C6.18425 0.871216 6.49844 1.21802 6.49844 1.70827V11.0797L9.45432 7.81698C9.7555 7.48453 10.218 7.48453 10.5192 7.81698C10.8204 8.14942 10.8204 8.65998 10.5192 8.99242L6.27256 13.6799C6.22853 13.7285 6.19406 13.7523 6.13381 13.7856C6.11443 13.7962 6.11351 13.7969 6.11331 13.7971L6.02438 13.8578C5.83222 13.9285 5.63347 13.9351 5.47429 13.8676C5.37668 13.8552 5.3196 13.8035 5.20766 13.6799Z\",\n fill: \"black\"\n});\n\nvar SvgArrowThickDown = function SvgArrowThickDown(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 11,\n height: 14,\n viewBox: \"0 0 11 14\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgArrowThickDown, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/arrow-thick-down.343888f7.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport { ReactComponent as SortArrow } from 'icons/arrow-thick-down.svg';\r\n\r\nconst SORT_ICON_HEIGHT = '13px';\r\nconst SORT_ICON_WIDTH = '10px';\r\n\r\nconst SORT_ORDER = {\r\n ASC: 'asc',\r\n DESC: 'desc',\r\n};\r\n\r\nexport class DataGridSort {\r\n constructor({ key = null, order = null }) {\r\n /* Currently selected column key to sort the table by */\r\n this.key = key;\r\n /* order to sort, one of ASC, or DESC from below DIRECTION */\r\n this.order = order || SORT_ORDER.DESC;\r\n }\r\n\r\n /**\r\n * Returns a new sort model object based on key passed\r\n * if optional order prop is not sent, defaults to descending order for new keys, or flips order for existing key\r\n * @param {DataGridColumn|DataGridSort} colModel currently selected column model to sort by\r\n */\r\n setSort({ key, order = null }) {\r\n return new DataGridSort({\r\n key,\r\n order:\r\n order ||\r\n (key === this.key && this.isDescending()\r\n ? SORT_ORDER.ASC\r\n : SORT_ORDER.DESC),\r\n });\r\n }\r\n\r\n isAscending() {\r\n return this.order === SORT_ORDER.ASC;\r\n }\r\n\r\n isDescending() {\r\n return this.order === SORT_ORDER.DESC;\r\n }\r\n\r\n /**\r\n * Determines if passed colModel is current sorted column and returns the proper icon\r\n * @param {DataGridColumn} colModel currently evaluated column model\r\n */\r\n getIcon({ key }) {\r\n if (key === this.key) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n}\r\n","import BaseModel from 'models/base-model';\r\nimport clonedeep from 'lodash.clonedeep';\r\nimport { getTranslationByKey } from 'constants/common/feature-common-utils';\r\n\r\nconst ERROR_STATUS_UNAVAILABLE = 'common.error-status-unavailable';\r\nconst ERROR_MESSAGE_UNAVAILABLE = 'common.error-message-unavailable';\r\nconst FAILED_URL_UNAVAILABLE = 'common.failed-url-unavailable';\r\nconst STACK_TRACE_UNAVAILABLE = 'common.stack-trace-unavailable';\r\nconst ERROR_NOT_HANDLED = 'common.error-not-handled';\r\n\r\nexport default class ApiError extends BaseModel({\r\n apiErrorArray: [],\r\n}) {\r\n clearErrorData() {\r\n return this.merge({\r\n apiErrorArray: [],\r\n });\r\n }\r\n\r\n updateErrorData(payload) {\r\n const { locale, response } = payload;\r\n const failedURLResponse = response.config\r\n ? response.config.url\r\n : getTranslationByKey({ locale, key: FAILED_URL_UNAVAILABLE });\r\n\r\n let apiErrorArrayCopy = clonedeep(this.apiErrorArray);\r\n let newErrorObj = {};\r\n\r\n // depending on the error, the backend may return\r\n // a response a different format\r\n if (typeof response.data === 'string') {\r\n newErrorObj.errorStatus = response.status\r\n ? response.status\r\n : getTranslationByKey({ locale, key: ERROR_STATUS_UNAVAILABLE });\r\n newErrorObj.errorMessage =\r\n response.data !== ''\r\n ? response.data\r\n : getTranslationByKey({ locale, key: ERROR_MESSAGE_UNAVAILABLE });\r\n newErrorObj.failedUrl = failedURLResponse;\r\n newErrorObj.stackTrace = getTranslationByKey({\r\n locale,\r\n key: STACK_TRACE_UNAVAILABLE,\r\n });\r\n newErrorObj.handledErrorJsonString = getTranslationByKey({\r\n locale,\r\n key: ERROR_NOT_HANDLED,\r\n });\r\n } else {\r\n const errorData = response.data;\r\n newErrorObj.errorStatus = errorData.status\r\n ? errorData.status\r\n : getTranslationByKey({ locale, key: ERROR_STATUS_UNAVAILABLE });\r\n newErrorObj.errorMessage = errorData.errorMsg\r\n ? errorData.errorMsg\r\n : getTranslationByKey({ locale, key: ERROR_MESSAGE_UNAVAILABLE });\r\n newErrorObj.failedUrl = failedURLResponse;\r\n newErrorObj.stackTrace = getTranslationByKey({\r\n locale,\r\n key: STACK_TRACE_UNAVAILABLE,\r\n });\r\n newErrorObj.handledErrorJsonString = getTranslationByKey({\r\n locale,\r\n key: ERROR_NOT_HANDLED,\r\n });\r\n }\r\n\r\n apiErrorArrayCopy.push(newErrorObj);\r\n return this.merge({ apiErrorArray: apiErrorArrayCopy });\r\n }\r\n\r\n updateErrorStackTrace(payload) {\r\n const { locale, response } = payload;\r\n const stack = response;\r\n let apiErrorArrayCopy = clonedeep(this.apiErrorArray);\r\n\r\n if (apiErrorArrayCopy.length === 0) {\r\n let newErrorObj = {};\r\n newErrorObj.errorStatus = getTranslationByKey({\r\n locale,\r\n key: ERROR_STATUS_UNAVAILABLE,\r\n });\r\n newErrorObj.errorMessage = getTranslationByKey({\r\n locale,\r\n key: ERROR_MESSAGE_UNAVAILABLE,\r\n });\r\n newErrorObj.failedURL = getTranslationByKey({\r\n locale,\r\n key: FAILED_URL_UNAVAILABLE,\r\n });\r\n newErrorObj.handledErrorJsonString = getTranslationByKey({\r\n locale,\r\n key: ERROR_NOT_HANDLED,\r\n });\r\n newErrorObj.stackTrace = stack;\r\n apiErrorArrayCopy.push(newErrorObj);\r\n } else {\r\n apiErrorArrayCopy[apiErrorArrayCopy.length - 1].stackTrace = stack;\r\n }\r\n\r\n return this.merge({ apiErrorArray: apiErrorArrayCopy });\r\n }\r\n\r\n updateCatchedErrorJson(payload) {\r\n const { locale, response } = payload;\r\n const handledErrorJsonString = response;\r\n let apiErrorArrayCopy = clonedeep(this.apiErrorArray);\r\n\r\n if (apiErrorArrayCopy.length === 0) {\r\n let newErrorObj = {};\r\n newErrorObj.errorStatus = getTranslationByKey({\r\n locale,\r\n key: ERROR_STATUS_UNAVAILABLE,\r\n });\r\n newErrorObj.errorMessage = getTranslationByKey({\r\n locale,\r\n key: ERROR_MESSAGE_UNAVAILABLE,\r\n });\r\n newErrorObj.failedURL = getTranslationByKey({\r\n locale,\r\n key: FAILED_URL_UNAVAILABLE,\r\n });\r\n newErrorObj.handledErrorJsonString = handledErrorJsonString;\r\n apiErrorArrayCopy.push(newErrorObj);\r\n } else {\r\n apiErrorArrayCopy[apiErrorArrayCopy.length - 1].handledErrorJsonString =\r\n handledErrorJsonString;\r\n }\r\n\r\n return this.merge({ apiErrorArray: apiErrorArrayCopy });\r\n }\r\n getReadOnlyErrorMessageToDisplay() {\r\n // const { locale, response } = payload;\r\n if (this.apiErrorArray && this.apiErrorArray.length > 0) {\r\n return this.apiErrorArray[0].errorMessage;\r\n } else {\r\n return getTranslationByKey({\r\n locale: 'en-US',\r\n key: ERROR_MESSAGE_UNAVAILABLE,\r\n });\r\n }\r\n }\r\n\r\n getDetailsToCopyToClipboard() {\r\n if (this.apiErrorArray) {\r\n let errorDetails = '';\r\n for (let index = 0; index < this.apiErrorArray.length; index++) {\r\n const error = this.apiErrorArray[index];\r\n const {\r\n errorStatus,\r\n errorMessage,\r\n failedUrl,\r\n stackTrace,\r\n handledErrorJsonString,\r\n } = error;\r\n const newErrorDetail = `Error Status: ${errorStatus}.\\n Error Message: ${errorMessage} \\n Failed URL: ${failedUrl}.\\n\\n Catched Error Json: ${handledErrorJsonString} \\n\\n $ Browser Generated Stack Trace: ${stackTrace}. `;\r\n errorDetails += newErrorDetail + '\\n';\r\n }\r\n return errorDetails;\r\n } else {\r\n return 'Details not available';\r\n }\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport User from 'models/data/user-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class AuthUser extends ApiModel({\r\n data: new User(),\r\n status: null,\r\n}) {\r\n get id() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.id;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: new User(response.result),\r\n status: response.status,\r\n };\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.data) || !isNullOrUndefined(this.data.id);\r\n }\r\n\r\n getUser() {\r\n return this.data;\r\n }\r\n\r\n hasID() {\r\n return !isNullOrUndefined(this.id);\r\n }\r\n\r\n errorNotNull() {\r\n return !this.isLoading && this.error !== null;\r\n }\r\n\r\n isDisabled() {\r\n return this.isInitialized() && !this.getUser().enabled;\r\n }\r\n isUserAuthorized() {\r\n return this.status === 401\r\n ? false\r\n : this.isLoaded &&\r\n this.hasID() &&\r\n !this.errorNotNull() &&\r\n !this.isDisabled();\r\n }\r\n\r\n isAuthStatus401UnAuthorized() {\r\n return this.status === 401;\r\n }\r\n\r\n set401Error(error) {\r\n return this.merge({\r\n status: error.status,\r\n isLoading: false,\r\n isLoaded: true,\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport class PinnedDetials extends ApiModel({\r\n data: {\r\n projects: [],\r\n statements: [],\r\n },\r\n status: null,\r\n}) {\r\n processResponse(response) {\r\n return {\r\n data: {\r\n projects: response.data\r\n ? response.data.filter(\r\n (data) => data.statementId === 0 && data.pinType === 'CLIENT',\r\n )\r\n : [],\r\n statements: response.data\r\n ? response.data.filter(\r\n (data) => data.statementId !== 0 && data.pinType === 'STATEMENT',\r\n )\r\n : [],\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n //getting the pinned projects length\r\n getPinnedProjectsLength() {\r\n return this.data.projects.length;\r\n }\r\n\r\n //getting the pinned statements length\r\n getPinnedStatementsLength() {\r\n return this.data.statements.length;\r\n }\r\n\r\n //getting the pinned statements list\r\n get pinnedStatements() {\r\n return this.data.statements.length ? this.data.statements : [];\r\n }\r\n\r\n //getting the pinned project list\r\n get pinnedProjects() {\r\n return this.data.projects.length ? this.data.projects : [];\r\n }\r\n\r\n // adding new item(project or statement) to existing list\r\n addNewPinnedItem(payload) {\r\n return payload &&\r\n payload.data &&\r\n payload.data.statementId === 0 &&\r\n payload.data.pinType === 'CLIENT'\r\n ? this.merge({\r\n data: {\r\n ...this.data,\r\n projects: this.data.projects.concat([payload.data]),\r\n },\r\n })\r\n : this.merge({\r\n data: {\r\n ...this.data,\r\n statements: this.data.statements.concat([payload.data]),\r\n },\r\n });\r\n }\r\n\r\n // remove new item(project or statement) to existing list\r\n removingPinnedItem(payload) {\r\n return payload &&\r\n payload.data &&\r\n payload.data.statementId === 0 &&\r\n payload.data.pinType === 'CLIENT'\r\n ? this.merge({\r\n data: {\r\n ...this.data,\r\n projects: this.data.projects.filter(\r\n (item) => item.clientId !== payload.data.clientId,\r\n ),\r\n },\r\n })\r\n : this.merge({\r\n data: {\r\n ...this.data,\r\n statements: this.data.statements.filter(\r\n (item) => item.statementId !== payload.data.statementId,\r\n ),\r\n },\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport SectionContentModelOCR from 'models/api/section-content-api-model-ocr-data';\r\n\r\nexport class SectionCacheOCR extends ApiModel({\r\n data: {\r\n map: {},\r\n },\r\n status: null,\r\n}) {\r\n get map() {\r\n if (this.data && this.data.map) {\r\n return this.data.map;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response, isOCR }) {\r\n let _instantiatedMap = {};\r\n response.data.forEach(({ sectionId }, index) => {\r\n const sectionContent = new SectionContentModelOCR();\r\n _instantiatedMap[sectionId] = sectionContent.setLoading();\r\n });\r\n return {\r\n data: {\r\n map: _instantiatedMap,\r\n },\r\n };\r\n }\r\n\r\n get(id) {\r\n return this.map[id];\r\n }\r\n\r\n _mergeSections(updatedSectionsMap) {\r\n return this.merge({\r\n data: {\r\n map: {\r\n ...this.data.map,\r\n ...updatedSectionsMap,\r\n },\r\n },\r\n });\r\n }\r\n\r\n mergeOCRSectionDataLoaded(section) {\r\n const map = {};\r\n map[section.sectionId] =\r\n this.data.map[section.sectionId] &&\r\n this.data.map[section.sectionId].setLoaded(section);\r\n return this._mergeSections(map);\r\n }\r\n\r\n clearSectionOCRContentFromMap({ removedSectionIds }) {\r\n let _clearedSectionsMap = {};\r\n removedSectionIds.forEach((id) => {\r\n _clearedSectionsMap[id] =\r\n this.data.map[id] && this.data.map[id].clearOCRDataContent();\r\n });\r\n return this._mergeSections(_clearedSectionsMap);\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport Note from 'models/data/note-model';\r\nimport { applyNoteFilters } from 'utils/note-filter-util';\r\nimport { UNSELECTED_FILTER } from 'constants/feature/notes/notes-panel-filter-constants';\r\nimport {\r\n FILTER_STATUS,\r\n FILTER_PRIORITY,\r\n FILTER_GHOST,\r\n FILTER_HEADING,\r\n FILTER_CREATED_BY,\r\n FILTER_REPLIED_BY,\r\n FILTER_CREATED_OR_REPLIED,\r\n FILTER_MENTIONED,\r\n} from 'constants/feature/notes-panel-constants';\r\nimport cloneDeep from 'lodash.clonedeep';\r\nexport default class NotesList extends ApiModel({\r\n data: {\r\n notes: [], // type Note\r\n filteredNotes: [],\r\n noteFilters: {\r\n heading: UNSELECTED_FILTER,\r\n status: UNSELECTED_FILTER,\r\n type: UNSELECTED_FILTER,\r\n priority: UNSELECTED_FILTER,\r\n ghost: UNSELECTED_FILTER,\r\n user: UNSELECTED_FILTER,\r\n },\r\n usersListNotesCreatedBy: {},\r\n usersListNotesRepliedBy: {},\r\n statementSegmentFilters: {},\r\n userListCreatedAndReplied: {},\r\n usersListNotesMentions: {},\r\n previousNoteBody: '',\r\n assignedToMe: '',\r\n },\r\n}) {\r\n get notes() {\r\n if (this.hasNotes()) {\r\n return this.data.filteredNotes;\r\n }\r\n return [];\r\n }\r\n\r\n processResponse({ response }) {\r\n const notesResponse = response.data.result.map((entry) => new Note(entry));\r\n\r\n return {\r\n data: {\r\n notes: notesResponse,\r\n filteredNotes: applyNoteFilters(\r\n notesResponse,\r\n this.data.noteFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n noteFilters: this.data.noteFilters,\r\n usersListNotesCreatedBy: this.data.usersListNotesCreatedBy,\r\n usersListNotesRepliedBy: this.data.usersListNotesRepliedBy,\r\n statementSegmentFilters: this.data.statementSegmentFilters,\r\n userListCreatedAndReplied: this.data.userListCreatedAndReplied,\r\n usersListNotesMentions: this.data.usersListNotesMentions,\r\n previousNoteBody: '',\r\n assignedToMe: this.data.assignedToMe,\r\n },\r\n };\r\n }\r\n\r\n setAssignedToMe(payload) {\r\n return this.mergeData({\r\n assignedToMe: payload,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n this.data.noteFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n payload,\r\n ),\r\n });\r\n }\r\n\r\n applyQuickFilter(payload) {\r\n const filterValue = payload.filterVal;\r\n const filterType = payload.filterType;\r\n let updatedFilters = {};\r\n\r\n if (filterType === FILTER_STATUS) {\r\n if (filterValue) {\r\n updatedFilters = {\r\n ...this.data.noteFilters,\r\n status: true,\r\n type: UNSELECTED_FILTER,\r\n priority: false,\r\n ghost: false,\r\n user: UNSELECTED_FILTER,\r\n heading: UNSELECTED_FILTER,\r\n };\r\n } else if (filterValue === false) {\r\n updatedFilters = {\r\n ...this.data.noteFilters,\r\n status: false,\r\n type: UNSELECTED_FILTER,\r\n priority: UNSELECTED_FILTER,\r\n ghost: false,\r\n user: UNSELECTED_FILTER,\r\n heading: UNSELECTED_FILTER,\r\n };\r\n }\r\n } else if (filterType === FILTER_PRIORITY) {\r\n updatedFilters = {\r\n ...this.data.noteFilters,\r\n status: true,\r\n type: UNSELECTED_FILTER,\r\n priority: filterValue,\r\n ghost: false,\r\n user: UNSELECTED_FILTER,\r\n heading: UNSELECTED_FILTER,\r\n };\r\n } else if (filterType === FILTER_GHOST) {\r\n updatedFilters = {\r\n ...this.data.noteFilters,\r\n status: UNSELECTED_FILTER,\r\n type: UNSELECTED_FILTER,\r\n priority: UNSELECTED_FILTER,\r\n ghost: filterValue,\r\n user: UNSELECTED_FILTER,\r\n heading: UNSELECTED_FILTER,\r\n };\r\n }\r\n\r\n const emptyObject = {};\r\n\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n usersListNotesCreatedBy: emptyObject,\r\n usersListNotesRepliedBy: emptyObject,\r\n statementSegmentFilters: emptyObject,\r\n userListCreatedAndReplied: emptyObject,\r\n usersListNotesMentions: emptyObject,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n emptyObject,\r\n emptyObject,\r\n emptyObject,\r\n emptyObject,\r\n emptyObject,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n }\r\n\r\n applyNoteFilter(payload) {\r\n const updatedNoteFilters = payload.updatedFilters;\r\n const updatedCreatedObject = payload.userFilterCreated;\r\n const updatedReplyObject = payload.userFilterReplied;\r\n const updatedStatementSegmentFilters = payload.selectedSegments;\r\n const updatedCreatedAndRepliedObject =\r\n payload.selectedUsersCreatedAndRepliedUsers;\r\n const usersListNotesMentions = payload.userFilterMentionedUsers;\r\n\r\n return this.mergeData({\r\n noteFilters: updatedNoteFilters,\r\n usersListNotesCreatedBy: cloneDeep(updatedCreatedObject),\r\n usersListNotesRepliedBy: cloneDeep(updatedReplyObject),\r\n statementSegmentFilters: updatedStatementSegmentFilters,\r\n userListCreatedAndReplied: updatedCreatedAndRepliedObject,\r\n usersListNotesMentions: usersListNotesMentions,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedNoteFilters,\r\n updatedCreatedObject,\r\n updatedReplyObject,\r\n updatedStatementSegmentFilters,\r\n updatedCreatedAndRepliedObject,\r\n usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n }\r\n\r\n clearAllFilters() {\r\n const updatedFilters = {\r\n ...this.data.noteFilters,\r\n status: UNSELECTED_FILTER,\r\n type: UNSELECTED_FILTER,\r\n priority: UNSELECTED_FILTER,\r\n ghost: UNSELECTED_FILTER,\r\n user: UNSELECTED_FILTER,\r\n heading: UNSELECTED_FILTER,\r\n };\r\n\r\n const emptyObject = {};\r\n\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n usersListNotesCreatedBy: emptyObject,\r\n usersListNotesRepliedBy: emptyObject,\r\n statementSegmentFilters: emptyObject,\r\n userListCreatedAndReplied: emptyObject,\r\n usersListNotesMentions: emptyObject,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n emptyObject,\r\n emptyObject,\r\n emptyObject,\r\n emptyObject,\r\n emptyObject,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n }\r\n\r\n removeNoteFilter(payload) {\r\n const filterType = payload.filterType;\r\n const createdOrRepliedUsers = payload.createdOrRepliedUsers;\r\n\r\n const updatedFilters = {\r\n ...this.data.noteFilters,\r\n [filterType]: UNSELECTED_FILTER,\r\n };\r\n\r\n if (createdOrRepliedUsers === FILTER_CREATED_BY) {\r\n const emptyObject = {};\r\n\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n usersListNotesCreatedBy: emptyObject,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n emptyObject,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n } else if (createdOrRepliedUsers === FILTER_REPLIED_BY) {\r\n const emptyObject = {};\r\n\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n usersListNotesRepliedBy: emptyObject,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n this.data.usersListNotesCreatedBy,\r\n emptyObject,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n } else if (createdOrRepliedUsers === FILTER_CREATED_OR_REPLIED) {\r\n const emptyObject = {};\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n userListCreatedAndReplied: emptyObject,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n emptyObject,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n } else if (createdOrRepliedUsers === FILTER_MENTIONED) {\r\n const emptyObject = {};\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n usersListNotesMentions: emptyObject,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n emptyObject,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n }\r\n\r\n if (filterType === FILTER_HEADING) {\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n statementSegmentFilters: {},\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n {},\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n }\r\n\r\n return this.mergeData({\r\n noteFilters: updatedFilters,\r\n filteredNotes: applyNoteFilters(\r\n this.data.notes,\r\n updatedFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n }\r\n\r\n hasNotes() {\r\n return (\r\n !isNullOrUndefined(this.data) &&\r\n !isNullOrUndefined(this.data.notes) &&\r\n this.data.notes.length > 0\r\n );\r\n }\r\n\r\n deleteNoteWithWebsocket(payload) {\r\n let notesListCopy = cloneDeep(this.data.notes);\r\n let filteredListCopy = cloneDeep(this.data.filteredNotes);\r\n\r\n notesListCopy = notesListCopy.filter(\r\n (note) => note.noteId !== payload.noteId,\r\n );\r\n filteredListCopy = filteredListCopy.filter(\r\n (note) => note.noteId !== payload.noteId,\r\n );\r\n\r\n return this.mergeData({\r\n notes: notesListCopy,\r\n filteredNotes: filteredListCopy,\r\n });\r\n }\r\n\r\n addNoteWithWebsocketPayload(payload) {\r\n const newNoteEntry = new Note(payload);\r\n let notesListCopy = cloneDeep(this.data.notes);\r\n\r\n notesListCopy.push(newNoteEntry);\r\n\r\n // sort notes list by highest sectionId and then by most recently\r\n // added note\r\n notesListCopy.sort(\r\n (a, b) =>\r\n a.sectionId - b.sectionId ||\r\n new Date(b.noteTimestamp) - new Date(a.noteTimestamp),\r\n );\r\n\r\n const newFilteredList = applyNoteFilters(\r\n notesListCopy,\r\n this.data.noteFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n );\r\n\r\n return this.mergeData({\r\n notes: notesListCopy,\r\n filteredNotes: newFilteredList,\r\n });\r\n }\r\n\r\n updateNoteWithWebsocket(payload) {\r\n let notesListCopy = cloneDeep(this.data.notes);\r\n for (let i = 0; i < notesListCopy.length; i++) {\r\n let note = notesListCopy[i];\r\n if (note.noteId === payload.noteId) {\r\n note = {\r\n ...note,\r\n elementId: payload.elementId,\r\n noteType: payload.noteType,\r\n workflowStatus: payload.workflowStatus,\r\n closedBy: payload.closedBy,\r\n closedByName: payload.closedByName,\r\n body: payload.body,\r\n noteDate: payload.noteDate,\r\n closedDate: payload.closedDate,\r\n noteTaker: payload.noteTaker,\r\n noteTakerName: payload.noteTakerName,\r\n notePriorityType: payload.notePriorityType,\r\n revisionNumber: payload.revisionNumber,\r\n };\r\n\r\n notesListCopy[i] = new Note(note);\r\n break;\r\n }\r\n }\r\n\r\n const newFilteredList = applyNoteFilters(\r\n notesListCopy,\r\n this.data.noteFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n );\r\n\r\n return this.mergeData({\r\n notes: notesListCopy,\r\n filteredNotes: newFilteredList,\r\n });\r\n }\r\n\r\n updatePreviousNote(payload) {\r\n return this.mergeData({\r\n previousNoteBody: payload,\r\n });\r\n }\r\n\r\n // We need to modify the note list to include additional details like parentId and isTechnical for particular section.\r\n // We expected to get these details from BE directly, but they are facing some technical issues (inner join to fetch these\r\n // details causes ghost notes to dissappear from the list), which enforces us to fetch these details from sections cache.\r\n addAdditionalDetailsToNotesList(payload = {}) {\r\n const sectionCacheData = payload.sectionCacheData;\r\n let notesListCopy = cloneDeep(this.data.notes);\r\n const newNotes = notesListCopy.map((entry) => {\r\n sectionCacheData &&\r\n sectionCacheData[entry.sectionId] &&\r\n (entry = {\r\n ...entry,\r\n parentId: sectionCacheData[entry.sectionId].parentId,\r\n isTechnical: sectionCacheData[entry.sectionId].isTechnical,\r\n });\r\n return new Note(entry);\r\n });\r\n return this.mergeData({\r\n notes: newNotes,\r\n filteredNotes: applyNoteFilters(\r\n newNotes,\r\n this.data.noteFilters,\r\n this.data.usersListNotesCreatedBy,\r\n this.data.usersListNotesRepliedBy,\r\n this.data.statementSegmentFilters,\r\n this.data.userListCreatedAndReplied,\r\n this.data.usersListNotesMentions,\r\n this.data.assignedToMe,\r\n ),\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport default class SectionAssignments extends ApiModel({\r\n data: {},\r\n}) {\r\n get hasUsersAssignedToSection() {\r\n if (this.data && this.data.assignedUsersMap) {\r\n return Object.keys(this.data.assignedUsersMap).length > 0;\r\n }\r\n return false;\r\n }\r\n\r\n get assignedUsersMap() {\r\n if (this.data && this.data.assignedUsersMap) {\r\n return this.data.assignedUsersMap;\r\n }\r\n return {};\r\n }\r\n\r\n processResponse({ response, usersList }) {\r\n let assignedUsersMap = {};\r\n let assignedUserIdSet = new Set();\r\n\r\n for (let i = 0; response.data.result.length > i; i++) {\r\n assignedUserIdSet.add(response.data.result[i].userId);\r\n }\r\n\r\n for (let i = 0; usersList.length > i; i++) {\r\n const user = usersList[i];\r\n\r\n if (assignedUserIdSet.has(user.id)) {\r\n assignedUsersMap[user.id] = {\r\n name: user.fullName,\r\n };\r\n }\r\n }\r\n\r\n return {\r\n data: {\r\n assignedUsersMap,\r\n },\r\n };\r\n }\r\n\r\n replaceNewWithSocketData(payload) {\r\n let assignedUsersMapCopy = {};\r\n for (let i = 0; i < payload.length; i++) {\r\n assignedUsersMapCopy[payload[i].userId] = { name: payload[i].userName };\r\n }\r\n return this.mergeData({\r\n assignedUsersMap: assignedUsersMapCopy,\r\n });\r\n }\r\n\r\n updateSectionAssignmentInBulkFromSocket(payload) {\r\n if (payload.length > 0) {\r\n //assign\r\n let assignedUsersMapCopy = {};\r\n for (let i = 0; i < payload.length; i++) {\r\n assignedUsersMapCopy[payload[i].userId] = {\r\n name: payload[i].userName,\r\n };\r\n }\r\n\r\n return this.mergeData({\r\n assignedUsersMap: { ...this.assignedUsersMap, ...assignedUsersMapCopy },\r\n });\r\n }\r\n //unassign all\r\n return this.mergeData({\r\n assignedUsersMap: {},\r\n });\r\n }\r\n}\r\n","import ApiModel from 'models/api-model';\r\n\r\nexport class StatementWorkflowStepsData extends ApiModel({\r\n data: {\r\n REGULAR: {}, // type Statement\r\n OCR: {},\r\n },\r\n}) {\r\n get REGULAR() {\r\n return this.data.REGULAR;\r\n }\r\n\r\n get OCR() {\r\n return this.data.OCR;\r\n }\r\n\r\n getWorkflowStepsByDocProcessType(documentProcessTypeEnum) {\r\n return this[documentProcessTypeEnum];\r\n }\r\n\r\n isFailedWorkflowStep(documentProcessTypeEnum) {\r\n return this[documentProcessTypeEnum].FAILED;\r\n }\r\n\r\n isCompletedWorkFlowStep(documentProcessTypeEnum) {\r\n return this[documentProcessTypeEnum].COMPLETED;\r\n }\r\n\r\n isScanningWorkflowStep(documentProcessTypeEnum) {\r\n return this[documentProcessTypeEnum].SCANNING;\r\n }\r\n\r\n processResponse(response) {\r\n return {\r\n data: {\r\n REGULAR: response.data.REGULAR,\r\n OCR: response.data.OCR,\r\n },\r\n };\r\n }\r\n}\r\n","import ApiModel from '../api-model';\r\nimport AdminModuleMaintenance from './admin-module-maintenance-page-model';\r\nimport moment from 'moment';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport default class AdminModuleMaintenanceList extends ApiModel({\r\n data: { maintenanceBannerDataList: [] },\r\n}) {\r\n processResponse(response) {\r\n let maintenanceBannerList = [];\r\n if (response.length === 0) {\r\n let emptyResponse = {\r\n apiMaintenanceId: null,\r\n apiStartTime: null,\r\n apiEndTime: null,\r\n apiStartDate: null,\r\n apEndDate: null,\r\n apiBannerText: '',\r\n isActive: false, // by default it is false\r\n };\r\n maintenanceBannerList.push(\r\n new AdminModuleMaintenance({\r\n ...emptyResponse,\r\n isLoading: false,\r\n isLoaded: true,\r\n }),\r\n );\r\n } else {\r\n for (let index = 0; index < response.length; index++) {\r\n let localStartDateTime = moment(\r\n moment.utc(response[index].startDate).toDate(),\r\n )\r\n .local()\r\n .format('YYYY-MM-DD HH:mm:ss');\r\n let localEndDateTime = moment(\r\n moment.utc(response[index].endDate).toDate(),\r\n )\r\n .local()\r\n .format('YYYY-MM-DD HH:mm:ss');\r\n response[index] = {\r\n apiMaintenanceId: response[index].id,\r\n apiStartTime: moment(localStartDateTime).format('HH:mm'),\r\n apiEndTime: moment(localEndDateTime).format('HH:mm'),\r\n apiStartDate: moment(localStartDateTime),\r\n apEndDate: moment(localEndDateTime),\r\n apiBannerText: response[index].text,\r\n isActive: isNullOrUndefined(response[index].status)\r\n ? false\r\n : response[index].status,\r\n };\r\n maintenanceBannerList.push(\r\n new AdminModuleMaintenance({\r\n ...response[index],\r\n isLoading: false,\r\n isLoaded: true,\r\n }),\r\n );\r\n }\r\n }\r\n return { data: { maintenanceBannerDataList: maintenanceBannerList } };\r\n }\r\n\r\n isEmpty() {\r\n return (\r\n this.data &&\r\n this.data.maintenanceBannerDataList &&\r\n this.data.maintenanceBannerDataList.length === 0\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n getElementFlaggedIcon,\r\n getOCRElementStyleByElementStatus,\r\n} from 'constants/feature/element-panel-constants';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport AmountAttributesDetails from 'components/common/element-amount-attributes-details-component';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { ContentSectionMap } from 'models/api/content-section-map-api-model';\r\nimport { ANNOTATION_DISPLAY_FUNCTIONS } from 'constants/feature/tieout-element-constants';\r\nimport classnames from 'classnames';\r\nimport { ReactComponent as Clear } from 'icons/cross.svg';\r\nimport { connect } from 'react-redux';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport IconButton from './icon-button-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { COMFORT_ASSIGN_ELEMENT } from 'components/feature/statement-content-panel/tieout-element-component';\r\nimport FeatureFlagComponent from './feature-flag-component';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport { checkIfFeatureFlagEnabled } from 'store/actions/selected-statement-actions';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\nimport { getSectionNameBySectionId } from 'utils/statement-content-page-utils';\r\n\r\nexport const ELEMENTS_DETAILS_BLOCK = 'element-details';\r\nexport const ELEMENTS_DETAILS_ID_BLOCK = 'element-details-id';\r\nconst CLEAR_ICON_SIZE = '12';\r\n\r\nconst CLEAR_ICON_TOOLTIP = new TooltipOptions({\r\n text: 'common.remove',\r\n id: 'element-details-icon-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst ElementDetailsComponent = ({\r\n element,\r\n contentSectionMap,\r\n iconSize,\r\n Icon,\r\n enableAction,\r\n onClickIcon,\r\n tooltip,\r\n disabled,\r\n checkIfFeatureFlagEnabled,\r\n isOCR,\r\n}) => {\r\n //if icon, tooltip and iconSize are being received as props it uses its value\r\n Icon = Icon ? Icon : Clear;\r\n iconSize = iconSize ? iconSize : CLEAR_ICON_SIZE;\r\n const elementBookmark = isOCR\r\n ? getSectionNameBySectionId(element.sectionId)\r\n : isNullOrUndefined(\r\n contentSectionMap.getClosestBookmarkSection({\r\n sectionId: element.sectionId,\r\n }),\r\n )\r\n ? element.sectionname\r\n : contentSectionMap.getClosestBookmarkSection({\r\n sectionId: element.sectionId,\r\n }).name;\r\n tooltip = tooltip ? tooltip : CLEAR_ICON_TOOLTIP;\r\n return (\r\n \r\n {\r\n scrollElementIntoView({\r\n elementId: element.id,\r\n sectionId: element.sectionId,\r\n });\r\n }}\r\n >\r\n \r\n {elementBookmark}\r\n \r\n\r\n \r\n {element.label}\r\n \r\n
          \r\n \r\n {getElementFlaggedIcon({ elementDetails: element })}\r\n \r\n {\r\n // IF amount is 0 or any other falsy value then it indicates that element display value is not a number.\r\n // For example display value not a number might look like, display value is a hyphen (-) or any word\r\n element.amount\r\n ? typeof element.display === 'string' &&\r\n element.display.match(/[()]/)\r\n ? `(${element.display.split(/[()]/).join('')})`\r\n : `${element.display}`\r\n : element.display\r\n }\r\n \r\n \r\n \r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.comfortLetter({\r\n elementDetails: element,\r\n })}\r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.tickmarks({\r\n elementDetails: element,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.formula({\r\n elementDetails: element,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.internalRef({\r\n elementDetails: element,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.workpaper({\r\n elementDetails: element,\r\n })}\r\n
          \r\n }\r\n >\r\n
          \r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.comfortLetter({\r\n elementDetails: element,\r\n })}\r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.tickmarks({\r\n elementDetails: element,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.formula({\r\n elementDetails: element,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.internalRef({\r\n elementDetails: element,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.workpaper({\r\n elementDetails: element,\r\n currLeftPanel: LEFT_PANELS.WORKPAPER,\r\n })}\r\n
          \r\n \r\n \r\n \r\n \r\n {enableAction && (\r\n
          \r\n \r\n
          \r\n )}\r\n \r\n );\r\n};\r\n\r\nElementDetailsComponent.propTypes = {\r\n /** the api model containing search results */\r\n element: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Object containing cached section id */\r\n contentSectionMap: PropTypes.instanceOf(ContentSectionMap),\r\n /** size of icon if any */\r\n iconSize: PropTypes.number,\r\n /** Icon if any is provided eg. delete icon, detach icon etc default = cross icon */\r\n Icon: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),\r\n /** Bool for indicating if we want to use the Icon prop and action */\r\n enableAction: PropTypes.bool,\r\n /** action for what happens when icon is clicked */\r\n onClickIcon: PropTypes.func,\r\n /** Tooltip for icon */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /** boolean to determine whether to disable icon */\r\n disabled: PropTypes.bool,\r\n // action method to check if feature flag is enabled for the feature with mentioned name\r\n checkIfFeatureFlagEnabled: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n statementContent: {\r\n sectionsCache: { contentSectionMap },\r\n },\r\n selectedStatement: { isOCR },\r\n },\r\n}) => ({ contentSectionMap, isOCR });\r\n\r\nconst mapDispatchToProps = {\r\n checkIfFeatureFlagEnabled,\r\n};\r\n\r\nexport { ElementDetailsComponent };\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(ElementDetailsComponent);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\nimport RichTextEditor from 'components/common/rich-text-editor-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport ElementDetails from '../../../../models/api/element-details-api-model';\r\nimport { checkIfStringContainsOnlySpaces } from 'constants/common/feature-common-utils';\r\nimport { updateElementComfortLetterRequest } from 'api/comfort-letter-api';\r\nimport ComfortLetterForm from 'models/form/comfort-letter-form-model';\r\nexport const CREATE_COMFORT_LETTER_BLOCK = 'create-comfort-letter-modal';\r\nexport const CREATE_COMFORT_LETTER_ID_BLOCK = 'create-comfort-letter-modal-id';\r\n\r\nexport const EditComfortLetterModal = ({\r\n comfortLetterToEdit,\r\n onCancel,\r\n elementDetails,\r\n onSave,\r\n}) => {\r\n const [comfortLetterInProgress, setComfortLetterInProgress] = React.useState(\r\n new ComfortLetterForm({ data: { ...comfortLetterToEdit } }),\r\n );\r\n\r\n const _handleSave = async () => {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setLoading(),\r\n );\r\n try {\r\n await updateElementComfortLetterRequest({\r\n revisionId: elementDetails.revisionId,\r\n comfortLetter: comfortLetterInProgress,\r\n });\r\n onSave();\r\n } catch (error) {\r\n if (_isErrorForDuplicateDescription(error)) {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDuplicateDescriptionLoaded({\r\n duplicate: error.response.data.rootCause,\r\n }),\r\n );\r\n } else if (_isErrorForDuplicateLabel(error)) {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDuplicateLabelLoaded({\r\n duplicate: error.response.data.rootCause,\r\n }),\r\n );\r\n } else {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setError(error),\r\n );\r\n }\r\n }\r\n };\r\n\r\n const _isErrorForDuplicateDescription = (error) =>\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause &&\r\n error.response.data.rootCause.includes(\r\n 'ValidationException: A comfort letter annotation with this description already exists.', // distinct error message from API\r\n );\r\n\r\n const _isErrorForDuplicateLabel = (error) =>\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause &&\r\n error.response.data.rootCause.includes(\r\n 'A comfort letter annotation with this label already exists.', // distinct error message from API\r\n );\r\n\r\n const _customLabelErrorText = () => {\r\n if (comfortLetterInProgress.isCustomLabelDuplicate())\r\n return 'create-comfort-letter.custom-label.error.duplicate';\r\n else if (\r\n comfortLetterInProgress.isCustomLabelTooLong() &&\r\n !checkIfStringContainsOnlySpaces(comfortLetterInProgress.customLabel)\r\n )\r\n return 'create-comfort-letter.custom-label.error.text-too-long';\r\n };\r\n\r\n const _descriptionErrorText = () => {\r\n if (comfortLetterInProgress.isDescriptionDuplicate())\r\n return 'create-comfort-letter.description.error.duplicate';\r\n else if (\r\n comfortLetterInProgress.isDescriptionTooLong() &&\r\n !checkIfStringContainsOnlySpaces(comfortLetterInProgress.description)\r\n )\r\n return 'create-comfort-letter.description.error.text-too-long';\r\n };\r\n\r\n const _isModified = () => {\r\n return (\r\n comfortLetterInProgress &&\r\n comfortLetterToEdit &&\r\n (comfortLetterInProgress.descriptionRichText !==\r\n comfortLetterToEdit.descriptionRichText ||\r\n comfortLetterInProgress.customLabel !== comfortLetterToEdit.customLabel)\r\n );\r\n };\r\n\r\n React.useEffect(() => {\r\n setComfortLetterInProgress(\r\n comfortLetterInProgress.initFromElement({\r\n elementDetails,\r\n }),\r\n );\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [elementDetails.revisionId]);\r\n\r\n React.useEffect(() => {\r\n _isModified() &&\r\n comfortLetterInProgress.isDescriptionDuplicate() &&\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDuplicateDescriptionLoaded({\r\n duplicate: undefined,\r\n }),\r\n );\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [comfortLetterInProgress.descriptionRichText]);\r\n\r\n const handleComfortLetterDescription = (val) => {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDescription(val),\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n
          \r\n \r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev\r\n .setCustomLabel(val)\r\n .setDuplicateLabelLoaded({ duplicate: undefined }),\r\n )\r\n }\r\n placeholder=\"create-comfort-letter.form.label.placeholder\"\r\n width={'100%'}\r\n type={'text'}\r\n errorText={_customLabelErrorText()}\r\n value={comfortLetterInProgress.customLabel}\r\n />\r\n
          \r\n
          \r\n \r\n );\r\n};\r\n\r\nEditComfortLetterModal.propTypes = {\r\n /** Object of the selected comfort letter to edit */\r\n comfortLetterToEdit: PropTypes.instanceOf(ComfortLetterForm).isRequired,\r\n /**function to close the edit comfort letter modal */\r\n onCancel: PropTypes.func.isRequired,\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** func fired on save click */\r\n onSave: PropTypes.func.isRequired,\r\n};\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst COMFORT_ANNOTATION_PANEL_DELETE_MODAL =\r\n 'comfort-annotation-panel-delete-modal';\r\n\r\nexport const DeleteComfortAnnotationModal = ({ onClose, onDelete }) => (\r\n \r\n \r\n \r\n);\r\n\r\nDeleteComfortAnnotationModal.propTypes = {\r\n /** Action fired when user clicks close */\r\n onClose: PropTypes.func.isRequired,\r\n /** Action fired when user clicks delete */\r\n onDelete: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default DeleteComfortAnnotationModal;\r\n","import React, { useCallback, useEffect, useState, lazy, Suspense } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport Flyout, {\r\n FlyoutHeader,\r\n FlyoutPanelContent,\r\n} from 'components/common/omnia/flyout-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { LEFT_PANELS, RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport { toggleComfortAnnotationPanel } from 'store/actions/panel-controller-actions';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as Information } from 'icons/icon-information-tooltip.svg';\r\nimport ComfortLetterList from 'models/api/comfort-letter-list-api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n fetchComfortAnnotationListForRevision,\r\n fetchComfortAnnotationListForRevisionWithoutLoading,\r\n deleteComfortAnnotation,\r\n} from 'store/actions/comfort-annotations-list-actions';\r\nimport { EditComfortLetterModal } from 'components/feature/element-panel/comfort-letter-panel/edit-comfort-letter-modal';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport Loading from 'components/common/loading-component';\r\nimport { DeleteComfortAnnotationModal } from 'components/feature/element-panel/comfort-letter-panel/delete-comfort-annotation-modal';\r\nimport { COMFORT_ANNOTATION_INFORMATION_TOOLTIP } from 'constants/feature/panel-constants';\r\nimport { getElementComfortLettersWithoutLoading } from 'store/actions/element-panel-actions';\r\nimport { comfortLetterElementIdsUpdatedOrDeleted } from 'store/actions/statement-content-annotation-creation-actions';\r\n\r\nexport const COMFORT_ANNOTATION_PANEL_BLOCK = 'comfort-annotation-panel';\r\nconst COMFORT_ANNOTATION_INFO_ICON_SIZE = '18px';\r\nconst ComfortAnnotationList = lazy(() =>\r\n import(\r\n 'components/feature/toolkit/toolkit-comfort-annotation/_toolkit-comfort-annotation-panel-comfort-annotation-list'\r\n ),\r\n);\r\nexport const ComfortAnnotationPanel = ({\r\n show,\r\n onCancelPanel,\r\n comfortAnnotationList,\r\n fetchComfortAnnotationList,\r\n fetchComfortAnnotationListWithoutLoading,\r\n revisionId,\r\n deleteComfortAnnotation,\r\n rightPanel,\r\n getElementComfortLettersWithoutLoading,\r\n elementDetails,\r\n comfortLetterElementIdsUpdatedOrDeleted,\r\n isOCR,\r\n}) => {\r\n const [showEditComfortLetterModal, setShowEditComfortLetterModal] =\r\n useState(false);\r\n const [comfortLetterToEdit, setComfortLetterToEdit] = useState(null);\r\n const [comfortAnnotationToDelete, setComfortAnnotationToDelete] =\r\n useState(null);\r\n\r\n const _handleComfortletterEditClick = useCallback(({ comfortAnnotation }) => {\r\n setComfortLetterToEdit(comfortAnnotation);\r\n setShowEditComfortLetterModal(true);\r\n }, []);\r\n\r\n const _handleComfortAnnotationDeleteClick = useCallback(\r\n ({ comfortAnnotation }) => {\r\n setComfortAnnotationToDelete(comfortAnnotation);\r\n },\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n [],\r\n );\r\n\r\n // executes code only if comfort letter toolkit and right panels is opened based on element details is modified\r\n useEffect(() => {\r\n show &&\r\n rightPanel &&\r\n getElementComfortLettersWithoutLoading({\r\n elementId: elementDetails.id,\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [elementDetails]);\r\n\r\n useEffect(() => {\r\n show &&\r\n !isNullOrUndefined(revisionId) &&\r\n fetchComfortAnnotationList({ revisionId });\r\n }, [show, revisionId, fetchComfortAnnotationList]);\r\n return (\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 {comfortAnnotationToDelete && (\r\n {\r\n deleteComfortAnnotation({\r\n comfortAnnotation: comfortAnnotationToDelete,\r\n });\r\n setComfortAnnotationToDelete(null);\r\n }}\r\n onClose={() => {\r\n setComfortAnnotationToDelete(null);\r\n }}\r\n />\r\n )}\r\n {showEditComfortLetterModal && (\r\n setShowEditComfortLetterModal(false)}\r\n onSave={() => {\r\n setShowEditComfortLetterModal(false);\r\n fetchComfortAnnotationListWithoutLoading({ revisionId });\r\n comfortLetterElementIdsUpdatedOrDeleted(\r\n comfortLetterToEdit.customLabel,\r\n isOCR,\r\n );\r\n }}\r\n elementDetails={new ElementDetails({ data: { revisionId } })}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nComfortAnnotationPanel.propTypes = {\r\n /** Indicates if the Comfort Annotation panel should be shown */\r\n show: PropTypes.bool.isRequired,\r\n /** Indicates if the right panel opened */\r\n rightPanel: PropTypes.bool.isRequired,\r\n /** function to handle close/cancel panel */\r\n onCancelPanel: PropTypes.func,\r\n /** List of comfort letters for current revision id */\r\n comfortAnnotationList: PropTypes.instanceOf(ComfortLetterList).isRequired,\r\n /** Action to fetch comfort annotation list for a revision */\r\n fetchComfortAnnotationList: PropTypes.func.isRequired,\r\n /** Action to fetch comfort letter list for a revision without loading */\r\n fetchComfortAnnotationListWithoutLoading: PropTypes.func.isRequired,\r\n /** Action to fetch comfort letter list based on selected element in right panel without loading */\r\n getElementComfortLettersWithoutLoading: PropTypes.func.isRequired,\r\n /** Current revision id */\r\n revisionId: PropTypes.number,\r\n /** Action to delete comfort annotation */\r\n deleteComfortAnnotation: PropTypes.func.isRequired,\r\n /** selected element details in right panel */\r\n elementDetails: PropTypes.instanceOf(ElementDetails),\r\n /** returns true if statement is OCR statement */\r\n isOCR: PropTypes.bool,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n comfortAnnotationPanel,\r\n revision,\r\n elementPanel: { elementDetails },\r\n selectedStatement: { isOCR },\r\n },\r\n ui: {\r\n statementPage: {\r\n panels: { left, right },\r\n },\r\n },\r\n}) => ({\r\n show: left === LEFT_PANELS.COMFORT_ANNOTATION,\r\n rightPanel: right === RIGHT_PANELS.ELEMENT,\r\n revisionId: revision.id,\r\n comfortAnnotationList: comfortAnnotationPanel,\r\n elementDetails,\r\n isOCR,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n onCancelPanel: toggleComfortAnnotationPanel,\r\n fetchComfortAnnotationList: fetchComfortAnnotationListForRevision,\r\n fetchComfortAnnotationListWithoutLoading:\r\n fetchComfortAnnotationListForRevisionWithoutLoading,\r\n deleteComfortAnnotation,\r\n getElementComfortLettersWithoutLoading,\r\n comfortLetterElementIdsUpdatedOrDeleted,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(ComfortAnnotationPanel);\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"disclosureAnalyticsHeaderHeight\":\"96px\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"footerHeight\":\"72px\"};","module.exports = __webpack_public_path__ + \"static/media/Guidance_popup.edc523dc.gif\";","const envParam = window.TIEOUT.ENV.ENV_PARAM;\r\nconst oneTrustScriptEnvParam =\r\n window.TIEOUT.ENV.FEATURE.ENABLE_COOKIE_CONSENT_NOTIFICATION;\r\nconst DISABLE_SCRIPT_TYPE = 'text';\r\nconst ENABLE_SCRIPT_TYPE = 'text/javascript';\r\n\r\nfunction addScript(src, dataDomainScript) {\r\n const element = document.createElement('script');\r\n element.type = oneTrustScriptEnvParam\r\n ? ENABLE_SCRIPT_TYPE\r\n : DISABLE_SCRIPT_TYPE;\r\n element.src = src;\r\n element.async = true;\r\n element.setAttribute('data-domain-script', dataDomainScript);\r\n element.setAttribute('charset', 'UTF-8');\r\n document.head.appendChild(element);\r\n}\r\n\r\nlet src;\r\nlet dataDomainScript;\r\nswitch (envParam) {\r\n case 'PROD':\r\n src = 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js';\r\n dataDomainScript = '988f64c0-ebb0-49af-8080-9a3de86edce0';\r\n break;\r\n case 'BCP':\r\n src = 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js';\r\n dataDomainScript = '988f64c0-ebb0-49af-8080-9a3de86edce0';\r\n break;\r\n default:\r\n src = 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js';\r\n dataDomainScript = '988f64c0-ebb0-49af-8080-9a3de86edce0-test';\r\n break;\r\n}\r\n\r\naddScript(src, dataDomainScript);\r\n","/* eslint-disable no-extend-native */\r\n/**\r\n * Polyfill for development that allows the ES6 Map object to be viewable in Redux dev tools\r\n * taken from https://github.com/zalmoxisus/redux-devtools-extension/issues/124#issuecomment-221972997\r\n */\r\nif (process.env.NODE_ENV === 'development') {\r\n Map.prototype.toJSON = function () {\r\n let obj = {};\r\n this.forEach((value, key) => (obj[key] = value));\r\n return obj;\r\n };\r\n}\r\n","const hostname = window.TIEOUT.ENV.DA_BASE_URL;\r\n\r\nfunction addStylesheet(href) {\r\n const element = document.createElement('link');\r\n Object.assign(element, { rel: 'stylesheet', type: 'text/css', href });\r\n document.head.appendChild(element);\r\n}\r\n\r\naddStylesheet(hostname + '/public/CommonStyle/style.css');\r\naddStylesheet(hostname + '/public/HeaderPlugin/styles.bundle.css');\r\n\r\nfunction addScript(attrs = {}, props = {}) {\r\n const element = document.createElement('script');\r\n Object.assign(element, props);\r\n Object.keys(attrs).forEach((key) => {\r\n element.setAttribute(key, attrs[key]);\r\n });\r\n element.setAttribute('type', 'text/javascript');\r\n document.body.appendChild(element);\r\n}\r\n\r\nconst loadMainBundle = () => {\r\n const src = hostname + '/public/HeaderPlugin/main.bundle.js';\r\n addScript({ 'data-auth-type': 'Azure', 'data-name': 'HeaderPlugin', src });\r\n};\r\n\r\nconst loadPolyfillBundle = () => {\r\n const src = hostname + '/public/HeaderPlugin/polyfills.bundle.js';\r\n addScript({ src }, { onload: loadMainBundle });\r\n};\r\n\r\naddScript(\r\n { src: hostname + '/public/HeaderPlugin/inline.bundle.js' },\r\n { onload: loadPolyfillBundle },\r\n);\r\n","const envParam = window.TIEOUT.ENV.ENV_PARAM;\r\n\r\nfunction addScript(src) {\r\n const element = document.createElement('script');\r\n element.type = 'text/javascript';\r\n element.async = true;\r\n element.src = src;\r\n document.head.appendChild(element);\r\n window._walkmeConfig = { smartLoad: true };\r\n}\r\n\r\nvar src = 'https://cdn.walkme.com/users/4a7690aa5e724a2e9323da9b9849482e/test/walkme_4a7690aa5e724a2e9323da9b9849482e_https.js';\r\nswitch (envParam) {\r\n case 'PROD':\r\n case 'BCP':\r\n src = 'https://cdn.walkme.com/users/4a7690aa5e724a2e9323da9b9849482e/walkme_4a7690aa5e724a2e9323da9b9849482e_https.js';\r\n break;\r\n default:\r\n src = 'https://cdn.walkme.com/users/4a7690aa5e724a2e9323da9b9849482e/test/walkme_4a7690aa5e724a2e9323da9b9849482e_https.js';\r\n break;\r\n};\r\n\r\naddScript(src);\r\n","const envParam = window.TIEOUT.ENV.ENV_PARAM;\r\n\r\nfunction addScript(src) {\r\n const element = document.createElement('script');\r\n element.src = src;\r\n element.async = true;\r\n document.head.appendChild(element);\r\n}\r\n\r\nlet src;\r\nswitch (envParam) {\r\n case 'PROD':\r\n case 'BCP':\r\n src =\r\n 'https://assets.adobedtm.com/58d4dfc81ba0/ca6ed953ccc0/launch-d0f8306f72be.min.js';\r\n break;\r\n default:\r\n src =\r\n 'https://assets.adobedtm.com/58d4dfc81ba0/ca6ed953ccc0/launch-d0f8306f72be.min.js';\r\n break;\r\n}\r\n\r\naddScript(src);\r\n","var map = {\n\t\"./ckb.js\": 460,\n\t\"./cs.js\": 461,\n\t\"./da.js\": 462,\n\t\"./de.js\": 463,\n\t\"./en.js\": 361,\n\t\"./es.js\": 464,\n\t\"./fa.js\": 1118,\n\t\"./fr.js\": 465,\n\t\"./he.js\": 466,\n\t\"./index.js\": 1119,\n\t\"./it.js\": 467,\n\t\"./ja.js\": 468,\n\t\"./ko.js\": 469,\n\t\"./lv.js\": 470,\n\t\"./nl.js\": 471,\n\t\"./pl.js\": 472,\n\t\"./pt_br.js\": 473,\n\t\"./ro.js\": 474,\n\t\"./ru.js\": 475,\n\t\"./se.js\": 476,\n\t\"./tr.js\": 1120,\n\t\"./ua.js\": 477,\n\t\"./ur.js\": 478,\n\t\"./zh_cn.js\": 479\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 1117;","// extracted by mini-css-extract-plugin\nmodule.exports = {\"disclosureAnalyticsHeaderHeight\":\"96px\",\"footerHeight\":\"72px\"};","import React from 'react';\r\nimport classnames from 'classnames';\r\n\r\nexport default ({ children, className }) => (\r\n
          {children}
          \r\n);\r\n","import React, { memo } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nexport const NO_PROJECTS_BLOCK = 'no-projects';\r\n\r\nconst NoProjects = () => {\r\n return (\r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n );\r\n};\r\n\r\nexport default memo(NoProjects);\r\n","import React, { memo } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nexport const PROJECT_DELETED_OVERLAY_BLOCK = 'project-deleted-overlay';\r\n\r\nconst ProjectDeletedOverlay = () => {\r\n return (\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\nexport default memo(ProjectDeletedOverlay);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with sketchtool.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"My-Projects\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG-TieOut-|-Project-Cards-|-Default-w-suport-access-hover\",\n transform: \"translate(-24.000000, -250.000000)\",\n fill: \"#86BC25\",\n fillRule: \"nonzero\"\n}, React.createElement(\"g\", {\n id: \"Homepage/-Project-Panel-/-Default\",\n transform: \"translate(0.000000, 48.000000)\"\n}, React.createElement(\"g\", {\n id: \"Homepage-/-Project-Card-/-Default\",\n transform: \"translate(0.000000, 174.527197)\"\n}, React.createElement(\"g\", {\n id: \"Project-Card-/-Selected\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Support-Access\",\n transform: \"translate(24.000000, 27.765690)\"\n}, React.createElement(\"path\", {\n d: \"M14.8858954,1.63204211 C14.8631776,1.44287659 14.746856,1.27788885 14.5762168,1.19275585 C14.4047236,1.10745259 14.2028261,1.11256057 14.0374821,1.20961218 C14.0050282,1.22851171 10.7758649,3.02975565 7.90198651,0.165881644 C7.6799335,-0.0552938814 7.32020762,-0.0552938814 7.09815461,0.165881644 C4.24204044,3.01272905 1.09401197,1.28282656 0.962659069,1.20961218 C0.79714417,1.11426323 0.595417549,1.10745259 0.423924299,1.19275585 C0.2532851,1.27788885 0.136963484,1.44287659 0.114074942,1.63204211 C-1.05580281,11.4119505 7.1560592,15.760544 7.23907287,15.8031105 C7.26401113,15.8150291 7.28997425,15.82201 7.31559575,15.830353 C7.32960217,15.8356313 7.34275454,15.8424419 7.35727339,15.845677 C7.40441696,15.8575956 7.45207295,15.8661089 7.49938732,15.8661089 L7.50058299,15.8661089 C7.54806817,15.8661089 7.59572417,15.8575956 7.64269692,15.845677 C7.65806982,15.8424419 7.67207624,15.8356313 7.68693671,15.830353 C7.71170416,15.82201 7.73698405,15.8150291 7.76089745,15.8031105 C7.84391111,15.760544 16.0559439,11.4119505 14.8858954,1.63204211 Z M12.3480003,2.86459773 L3.83568343,11.3506551 C3.6594075,11.1242014 3.4853521,10.8875316 3.31590857,10.6389433 L11.0881056,2.89013763 C11.5359695,2.92589349 11.9594075,2.91227221 12.3480003,2.86459773 Z M1.17155971,2.52406565 C2.43692026,2.9684599 5.04894693,3.46052862 7.49989975,1.33560901 C8.24873083,1.98602511 9.01122672,2.38955552 9.74707624,2.62452259 L2.7037255,9.64629222 C1.68194002,7.80401416 0.97051633,5.44412747 1.17155971,2.52406565 Z\",\n id: \"shield\"\n})))))));\n\nvar SvgShield = function SvgShield(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"15px\",\n height: \"17px\",\n viewBox: \"0 0 15 17\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgShield, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/shield.c527fa99.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M19.5002 -0.000244141C19.7763 -0.000244141 20.0002 0.223614 20.0002 0.499756C20.0002 6.27582 18.4696 10.0227 15.3644 11.6518L15.14 11.7646L14.995 11.8299C14.9003 15.2994 13.3311 17.9139 10.3237 19.6269L10.0281 19.7898L9.72364 19.9471C9.41677 20.1006 9.05987 19.9064 9.00677 19.5833L9.00004 19.4999V14.9829L8.93531 14.9798C7.93238 14.9061 7.10827 14.629 6.47373 14.1408L6.30538 14.0024L6.14648 13.8535C5.52984 13.2368 5.1661 12.3923 5.04527 11.3337L5.02012 11.0646L5.01704 10.9999H0.500035C0.185527 10.9999 -0.0359446 10.7199 0.00405791 10.4323L0.0215769 10.3539L0.0528212 10.2763C1.64926 7.08345 4.15043 5.32653 7.50288 5.04134L7.82996 5.01834L8.16903 5.00393L8.23537 4.86001C9.72801 1.75387 13.243 0.150837 18.6977 0.00994301L19.1003 0.00224257L19.5002 -0.000244141ZM18.995 1.00393L18.7214 1.00954C13.371 1.14654 10.1501 2.72086 8.96428 5.68562C8.88834 5.87545 8.70449 5.99993 8.50004 5.99993C5.45827 5.99993 3.16852 7.19339 1.58352 9.61192L1.4164 9.87574L1.34203 9.99993H5.50003C5.71481 9.99993 5.89796 10.1353 5.96875 10.3255L5.99198 10.4101L6.00003 10.4999C6.00003 11.7108 6.29106 12.5838 6.85359 13.1464C7.41612 13.7089 8.28918 13.9999 9.50004 13.9999C9.74549 13.9999 9.94964 14.1768 9.99198 14.4101L10 14.4999V18.6559L10.1242 18.5836C12.5408 17.1037 13.8172 14.97 13.9818 12.1402L13.9955 11.823L14 11.4999C14 11.2955 14.1245 11.1116 14.3143 11.0357C17.2068 9.87875 18.7758 6.78486 18.9778 1.66628L18.9904 1.27859L18.995 1.00393ZM13 4.99993C14.1046 4.99993 15 5.89536 15 6.99993C15 8.1045 14.1046 8.99993 13 8.99993C11.8955 8.99993 11 8.1045 11 6.99993C11 5.89536 11.8955 4.99993 13 4.99993ZM13 5.99993C12.4478 5.99993 12 6.44764 12 6.99993C12 7.55221 12.4478 7.99993 13 7.99993C13.5523 7.99993 14 7.55221 14 6.99993C14 6.44764 13.5523 5.99993 13 5.99993Z\",\n fill: \"#43B02A\"\n});\n\nvar SvgRocket = function SvgRocket(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRocket, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/rocket.8dcae6f2.svg\";\nexport { ForwardRef as ReactComponent };","import ApiModel from 'models/api-model';\r\nimport User from 'models/data/user-model';\r\nimport { JOB_TYPES } from 'constants/common/job-type-constants';\r\n\r\nexport class UserList extends ApiModel({\r\n data: {\r\n users: [], // type User\r\n },\r\n}) {\r\n get users() {\r\n if (this.data) {\r\n return this.data.users;\r\n }\r\n return null;\r\n }\r\n\r\n /** We need to combine the response object and the project user entities because jobType comes from the tieout db and the user object comes from the opm database which is not project specific.*/\r\n processResponse({ response, projectUserEntities }) {\r\n return {\r\n data: {\r\n users:\r\n response &&\r\n response.data &&\r\n response.data.map((user) => {\r\n if (projectUserEntities && projectUserEntities.length) {\r\n const userEntityMatch = projectUserEntities.find(\r\n (userEntitiy) => userEntitiy.id === user.id,\r\n );\r\n user.jobType = userEntityMatch.jobType || '';\r\n return new User(user);\r\n }\r\n return new User(user);\r\n }),\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n getPpmdUsers() {\r\n if (this.data) {\r\n return this.data.users.filter((user) => user.jobType === JOB_TYPES.PPMD);\r\n }\r\n return [];\r\n }\r\n\r\n getEngagementOwnerUsers() {\r\n if (this.data) {\r\n return this.data.users.filter(\r\n (user) => user.jobType === JOB_TYPES.ENGAGEMENT_OWNER,\r\n );\r\n }\r\n return [];\r\n }\r\n\r\n getObserverUsers() {\r\n if (this.data) {\r\n return this.data.users.filter(\r\n (user) => user.jobType === JOB_TYPES.OBSERVER,\r\n );\r\n }\r\n return [];\r\n }\r\n\r\n getPreparerReviewerUsers() {\r\n if (this.data) {\r\n return this.data.users.filter(\r\n (user) => user.jobType === JOB_TYPES.PREPARER_REVIEWER,\r\n );\r\n }\r\n return [];\r\n }\r\n\r\n getUsers() {\r\n if (this.data) {\r\n return this.data.users;\r\n }\r\n return [];\r\n }\r\n}\r\n","import { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nexport const EDIT_PROJECT_TOOLTIP = new TooltipOptions({\r\n text: 'common.edit',\r\n id: 'project-details-id-edit-project-button',\r\n position: 'left',\r\n});\r\n\r\nexport const SUPPORT_TEAM_ACCESS_TOOLTIP = new TooltipOptions({\r\n text: 'project-details.support-team-access.tooltip',\r\n id: 'project-details-id-support-team-access',\r\n position: 'right',\r\n});\r\n\r\nexport const COE_TEAM_ACCESS_TOOLTIP = new TooltipOptions({\r\n text: 'project-details.coe-team-access.tooltip',\r\n id: 'project-details-id-coe-team-access',\r\n position: 'right',\r\n});\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Edit-/-Special\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"pencil\",\n transform: \"translate(3.000000, 5.000000)\",\n fill: \"#00a3e0\",\n className: \"edit-icon\"\n}, React.createElement(\"path\", {\n d: \"M3.4173913,9.43130435 C5.02956522,8.68869565 5.92347826,7.47652174 5.64,6.41391304 C5.44521739,5.68695652 4.55826087,4.52173913 0.806956522,4.8573913 C0.488695652,4.88521739 0.253913043,5.16695652 0.283478261,5.48521739 C0.311304348,5.80347826 0.589565217,6.03652174 0.911304348,6.0106087 C3.55304348,5.77217391 4.42782609,6.36521739 4.52173913,6.71130435 C4.62956522,7.12173913 4.06608696,7.85913043 2.93217391,8.38086957 C2.16695652,8.73217391 1.75478261,9.21217391 1.7026087,9.80521739 C1.6173913,10.8226087 2.72,11.6121739 2.84695652,11.6993043 C2.94608696,11.7669565 3.06086957,11.8001739 3.17391304,11.8001739 C3.35826087,11.8001739 3.53913043,11.7130435 3.65217391,11.5495652 C3.83304348,11.2852174 3.76521739,10.9252174 3.5026087,10.7443478 C3.25913043,10.5773913 2.83478261,10.1530435 2.8573913,9.9026087 C2.86782609,9.76365217 3.07826087,9.58782609 3.4173913,9.43130435 Z M16.5982609,2.42782609 L14.96,0.791304348 C14.733913,0.565217391 14.3686957,0.565217391 14.1426087,0.791304348 L5.95652174,8.97565217 C5.89391304,9.04 5.84521739,9.11652174 5.8173913,9.20173913 L4.99826087,11.6591304 C4.92869565,11.866087 4.9826087,12.0956522 5.13913043,12.2504348 C5.24869565,12.3617391 5.39652174,12.4208696 5.54782609,12.4208696 C5.60869565,12.4208696 5.67130435,12.4104348 5.73043478,12.3895652 L8.18608696,11.5721739 C8.27130435,11.5443478 8.34956522,11.4958261 8.41217391,11.4330435 L16.5982609,3.24695652 C16.706087,3.13913043 16.7669565,2.99130435 16.7669565,2.83826087 C16.7669565,2.68347826 16.706087,2.5373913 16.5982609,2.42782609 Z M7.69043478,10.5165217 L6.4626087,10.9269565 L6.87130435,9.69930435 L11.2765217,5.29391304 L12.0956522,6.11147826 L7.69043478,10.5165217 Z M12.9147826,5.29391304 L12.0956522,4.47478261 L14.5513043,2.01913043 L15.3704348,2.83826087 L12.9147826,5.29391304 Z\",\n id: \"icon_351-Special\"\n})));\n\nvar SvgEdit = function SvgEdit(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"22px\",\n height: \"22px\",\n viewBox: \"0 0 22 22\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgEdit, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/edit.b6456830.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo } from 'react';\r\nimport classnames from 'classnames';\r\n\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport { getUserNameByUserData } from 'utils/statement-content-page-utils';\r\n\r\nexport const USER_GRID_BLOCK = 'user-grid';\r\n\r\nconst UserGrid = ({ id, userType, users, numOfColumns }) => {\r\n const cols = [];\r\n for (let i = 0; i < numOfColumns; i++) {\r\n cols[i % numOfColumns] = [];\r\n }\r\n if (users.length) {\r\n users.forEach((user, index) => {\r\n cols[index % numOfColumns].push(user);\r\n });\r\n } else {\r\n cols[0].push({ fullName: 'none' });\r\n }\r\n return (\r\n
          \r\n {cols.map((col, colIndex) => (\r\n \r\n
          \r\n {colIndex === 0 ? : ''}\r\n
          \r\n {col.map((user, cellIndex) => (\r\n \r\n \r\n )\r\n }\r\n isNotInternationalized\r\n />\r\n
          \r\n ))}\r\n \r\n ))}\r\n \r\n );\r\n};\r\n\r\nUserGrid.propTypes = {\r\n /** string representing one of the jobType constants*/\r\n userType: PropTypes.string,\r\n /** Array of users of current jobType*/\r\n users: PropTypes.array,\r\n /** Number of columns that a should be rendered*/\r\n numOfColumns: PropTypes.number,\r\n};\r\n\r\nexport default memo(UserGrid);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Layer_2\",\n \"data-name\": \"Layer 2\"\n}, React.createElement(\"g\", {\n id: \"Layer_1-2\",\n \"data-name\": \"Layer 1\"\n}, React.createElement(\"image\", {\n width: 62,\n height: 62,\n xlinkHref: \"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na2ReZlc1gnyMzotjWYyRrFYJDB0ARwvCxaz3OF0Co0cETQQejaVUp4dGc//x4m+XKqvP4vweBz65DgaZyewU8v7tm6u+0L1n+68HmvXf3/uH9XHnvrHCezHiHTSts+YUPYbqjaNSr77Jb013v2CYeW/PCdwTi7o6KKtrhtpvWMHGkJt6K5xkZZGoUqq1Vax2tJK5lA9koUS2UxBBApDN1iprE3mC8qRWLw8OztTSs/NlTA/nUN5PgVLJI7mWALrrVrNquU191fv6bkTO3pOF3utf3vky5GZF0ZncVwcFAeFAzSsHV7aor6sXPb3Av6aOAKYBYcc4urE9VoTt4OG5FVo9dSiq8qFgFeE7lCxYMkiQbJI8zmU1CLKWhlKUYGeKYNPlmDOFOBfLJB6K21qabf0NKyvvdl8fXs7QnV9xaPCI0PfT5w6+GoERzEnnnX0sWnjEE0Vz1KwRbyLLeorAf5aOZLA83beJ7QY9WSdUV/uYXVoR7MYQJfLjVaXxekICNXw6KayXaEaXxRASjIR1VbJYTRbQrzPXmO2w2dzwWKJKbPC/tjB4r7Rp5PzfeOLOIO4OCSN8ZPySW1R6TN0dRqVdLF3lWdzpcBfEwdA5kXBzXuEJlojLGchpdMIGg0I0SrUck6hwWxt8rZZvC6nKNlqOEE0EZHy4ItlamQW9UgyXepPjBUwvZjDDDKYREKYsc3wYTbEktqgqqkzANJ4w8vvagJ8pcFfK5MDIBHCO3iT4IeTq6deroHzaDVwG1W603DABhNkSOAqCZRQYaAAFRkUuSSf4xakRS6BCMuwGVrSZg0YcVSS8hW8kSf3nir5foksmQBAJiA2DpyTSMTNJOKExNmIADMlRCCMAgbToKIMBXmm0izAUhQ0g0oG1VsTA69I5T4ocaiEyDzeiNF5vNFAFJVJjL5kb57UXPFd2Q8S/FLv/cfdev5P/T+q/wtWIthlyOL3GAAAAABJRU5ErkJggg==\"\n})));\n\nvar SvgOmniaIcon = function SvgOmniaIcon(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n viewBox: \"0 0 62 62\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgOmniaIcon, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/omnia-icon.c75c8ff5.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0.5 14C0.5 6.51781 6.51781 0.5 14 0.5C21.4822 0.5 27.5 6.51781 27.5 14C27.5 21.4822 21.4822 27.5 14 27.5C6.51781 27.5 0.5 21.4822 0.5 14Z\",\n stroke: \"#00A3E0\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M22.6917 14.2333C22.75 14.1167 22.75 13.9417 22.6917 13.7667C22.6333 13.7083 22.6333 13.65 22.575 13.5917L17.9083 8.925C17.675 8.69167 17.325 8.69167 17.0917 8.925C16.8583 9.15833 16.8583 9.50833 17.0917 9.74167L20.7667 13.4167H5.83333C5.48333 13.4167 5.25 13.65 5.25 14C5.25 14.35 5.48333 14.5833 5.83333 14.5833H20.7667L17.0917 18.2583C16.8583 18.4917 16.8583 18.8417 17.0917 19.075C17.2083 19.1917 17.3833 19.25 17.5 19.25C17.6167 19.25 17.7917 19.1917 17.9083 19.075L22.575 14.4083C22.6333 14.35 22.6917 14.2917 22.6917 14.2333Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgArrowRight = function SvgArrowRight(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgArrowRight, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/arrow-right.ac8fb97b.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport UserGrid from 'components/feature/project-details/_project-details-user-grid-component';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport { UserList } from 'models/api/users-list-model';\r\nimport { ReactComponent as OmniaIcon } from 'icons/omnia-icon.svg';\r\nimport { ReactComponent as RightArrowIcon } from 'icons/arrow-right.svg';\r\nimport { push } from 'connected-react-router';\r\nimport { connect } from 'react-redux';\r\nimport { isProjectExistInAMERegion } from 'utils/project-utils';\r\n\r\nexport const USERS_BLOCK = 'project-details-users';\r\nconst USERS_ID_BLOCK = 'project-details-users-id';\r\nconst OMNIA_ICON_SIZE = '18';\r\nconst ARROW_ICON_SIZE = '17';\r\nexport const ExpandedUsers = ({ project, users, omniaDetails }) => {\r\n const { data: { geoCode } = {} } = project;\r\n return (\r\n \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {project.auditClient ? (\r\n project.engagementEntity.engagementId\r\n ) : (\r\n \r\n )}\r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {project.getCreatedDate()}\r\n
          \r\n
          \r\n {omniaDetails.engagementName && (\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
          {geoCode}
          \r\n
          \r\n {isProjectExistInAMERegion(project) && (\r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {project.hasCoeGroup ? (\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\nExpandedUsers.propTypes = {\r\n /** Object representing selected project*/\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** Object with data array of users for selected project */\r\n users: PropTypes.instanceOf(UserList).isRequired,\r\n /** Func that fires action that navigates user to omnia page */\r\n push: PropTypes.func.isRequired,\r\n // Fetches the selected project's omnia engagement data\r\n omniaDetails: PropTypes.object.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({ data: { projectList } }, ownProps) => ({\r\n omniaDetails: projectList.getProjectFromList(ownProps.project.id)\r\n .omniaEngagementEntity,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n push,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ExpandedUsers);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport moment from 'moment';\r\nimport classnames from 'classnames';\r\n\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport NoProjects from 'components/feature/project-details/_project-details-no-projects-component';\r\nimport ProjectDeletedOverlay from 'components/feature/project-details/_project-details-deleted-overlay-component';\r\nimport { ReactComponent as Shield } from 'icons/shield.svg';\r\nimport { ReactComponent as Rocket } from 'icons/rocket.svg';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\n\r\nimport { ProjectList } from 'models/api/project-list-model';\r\nimport { UserList } from 'models/api/users-list-model';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { ROUTE_CONSTANTS, parseRoute } from 'constants/util/route-constants';\r\nimport { getPipeColorForProject } from 'utils/project-utils';\r\nimport {\r\n EDIT_PROJECT_TOOLTIP,\r\n SUPPORT_TEAM_ACCESS_TOOLTIP,\r\n COE_TEAM_ACCESS_TOOLTIP,\r\n} from 'constants/feature/project-details-constants';\r\nimport { getCountryNameByGeoCodeAndCountryCode } from 'utils/project-utils';\r\nimport { ReactComponent as Edit } from 'icons/edit.svg';\r\nimport ProjectApi from 'models/api/project-api-model';\r\n\r\nimport Permissions from 'permissions/permissions';\r\nimport { getSelectedProjectUsersRequest } from 'api/project-list-api';\r\nimport ExpandedUsers from './_project-details-expanded-users-component';\r\n\r\nexport const PROJECT_DETAILS_BLOCK = 'project-details';\r\nexport const PROJECT_DETAILS_ID_BLOCK = 'id-project-details';\r\nconst EDIT_ICON_SIZE = '28px';\r\nconst SHIELD_ICON_SIZE = '24px';\r\nconst ROCKET_ICON_SIZE = '24px';\r\n\r\nclass ProjectDetails extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isExpanded: false,\r\n users: new UserList(),\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { project } = this.props;\r\n const { isExpanded } = this.state;\r\n if (isExpanded) {\r\n if (prevProps.project !== project) {\r\n this.setState({\r\n isExpanded: false,\r\n });\r\n } else if (prevState.isExpanded === false) {\r\n this._fetchSelectedProjectUsers();\r\n }\r\n }\r\n }\r\n\r\n _fetchSelectedProjectUsers = async () => {\r\n const { project } = this.props;\r\n const projectUserEntities = project.userEntities;\r\n try {\r\n this.setState(({ users }) => ({\r\n users: users.setLoading(),\r\n }));\r\n const response = await getSelectedProjectUsersRequest(\r\n project.getUserIds(),\r\n );\r\n this.setState(({ users }) => ({\r\n users: users.setLoaded({\r\n response,\r\n projectUserEntities,\r\n }),\r\n }));\r\n } catch (e) {\r\n this.setState(({ users }) => ({\r\n users: users.setError(e),\r\n }));\r\n }\r\n };\r\n\r\n _toggleMoreProjectInfo = () => {\r\n this.setState((prevState) => {\r\n return {\r\n isExpanded: !prevState.isExpanded,\r\n };\r\n });\r\n };\r\n\r\n _canEdit = () => {\r\n const { project } = this.props;\r\n return Permissions.Project.canEdit(project.id);\r\n };\r\n\r\n render() {\r\n const { projectList, project, push } = this.props;\r\n const { data: { geoCode, countryCode } = {} } = project;\r\n const { users, isExpanded } = this.state;\r\n return (\r\n \r\n {!project.isInitialized() ? (\r\n \r\n ) : (\r\n \r\n {!project.isInitialized() ? null : (\r\n
          \r\n {project.isDeleted() ? : null}\r\n
          \r\n {project.hasAdminGroup ? (\r\n \r\n \r\n \r\n ) : null}\r\n {project.hasCoeGroup ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n {project.name}\r\n {project.legalHold ? (\r\n \r\n \r\n \r\n ) : null}\r\n
          \r\n {this._canEdit() ? (\r\n \r\n {\r\n push(\r\n parseRoute(ROUTE_CONSTANTS.PROJECT_EDIT_PAGE, {\r\n params: { id: project.id },\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 {project.engagementEntity.clientName}\r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {moment(project.engagementEntity.engagementFye)\r\n .utc()\r\n .format(DATE_FORMATS.YEAR)}\r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {project.engagementEntity.engagementName}\r\n
          \r\n
          \r\n
          \r\n \r\n \r\n
          \r\n
          \r\n {getCountryNameByGeoCodeAndCountryCode(\r\n geoCode,\r\n countryCode,\r\n )}\r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {project.hasAdminGroup ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
          \r\n
          \r\n
          \r\n {isExpanded ? (\r\n \r\n ) : null}\r\n \r\n {!isExpanded ? (\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\nProjectDetails.propTypes = {\r\n /** Object representing selected project*/\r\n project: PropTypes.instanceOf(ProjectApi),\r\n /** Object with data array of users for selected project */\r\n users: PropTypes.instanceOf(UserList),\r\n /** Object with data array of projects for current user*/\r\n projectList: PropTypes.instanceOf(ProjectList),\r\n};\r\n\r\nexport default ProjectDetails;\r\n","import { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\nimport ProjectDetails from 'components/feature/project-details/project-details-component';\r\nimport {\r\n initProjectSocketClient,\r\n setProjectSocketClient,\r\n closeProjectSocketClient,\r\n} from 'store/actions/project-socket-actions';\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n projectList,\r\n selectedProject: { project },\r\n },\r\n}) => ({\r\n projectList,\r\n project,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n push,\r\n initProjectSocketClient,\r\n setProjectSocketClient,\r\n closeProjectSocketClient,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ProjectDetails);\r\n","import { KebabMenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport Permissions from 'permissions/permissions';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { ROUTE_CONSTANTS, parseRoute } from 'constants/util/route-constants';\r\nimport { isProjectHasReservedClientName } from 'utils/project-list-utils';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const PROJECTS_AMOUNT = 20;\r\n\r\nexport const getProjectKebabOptions = ({\r\n cardIndex,\r\n project,\r\n onSoftDeleteClick,\r\n onRestoreClick,\r\n onPermanentDeleteClick,\r\n onPinClick,\r\n push,\r\n}) => {\r\n // to account for z-index issues with tooltips, the top project list card's\r\n // menu tooltips need to be positioned bottom so they do not run under the project\r\n // list card header, hence why we check index > 0\r\n const menuTooltipPosition = cardIndex > 0 ? 'top' : 'bottom';\r\n const projectHasReservedClientName = isProjectHasReservedClientName(project);\r\n //Handle when a project is deleted\r\n if (project.isDeleted()) {\r\n const _userCanPermanentlyDelete =\r\n Permissions.Project.canPermanentlyDelete(project.id) &&\r\n !project.legalHold;\r\n const _userCanRestore =\r\n Permissions.Project.canRestore(project.id) && !project.legalHold;\r\n let permDeleteTooltip, restoreToolTip;\r\n if (!_userCanPermanentlyDelete) {\r\n permDeleteTooltip = new TooltipOptions({\r\n text: 'permissions.delete.project',\r\n id: `${project.id}-delete-project-tooltip-id`,\r\n position: menuTooltipPosition,\r\n });\r\n }\r\n if (!_userCanRestore) {\r\n restoreToolTip = new TooltipOptions({\r\n text: 'permissions.delete.project',\r\n id: `${project.id}-delete-project-tooltip-id`,\r\n position: menuTooltipPosition,\r\n });\r\n }\r\n if (projectHasReservedClientName) {\r\n permDeleteTooltip = new TooltipOptions({\r\n text: 'client-name.not-allowed.tooltip',\r\n id: `${project.id}-reserved-project-tooltip-id`,\r\n position: menuTooltipPosition,\r\n });\r\n }\r\n return [\r\n new KebabMenuOption({\r\n id: `project-${project.id}-kebab-option-restore`,\r\n title: 'common.restore',\r\n onSelectOption: () => onRestoreClick(project),\r\n disabled: !_userCanRestore,\r\n tooltip: restoreToolTip,\r\n }),\r\n new KebabMenuOption({\r\n id: `project-${project.id}-kebab-option-permanent-delete`,\r\n title: 'common.delete',\r\n onSelectOption: () => onPermanentDeleteClick(project),\r\n disabled: !_userCanPermanentlyDelete || projectHasReservedClientName,\r\n tooltip: permDeleteTooltip,\r\n }),\r\n ];\r\n } else {\r\n //Otherwise handle when a project is not deleted.\r\n const _userCanEdit = Permissions.Project.canEdit(project.id);\r\n const _userCanSoftDelete =\r\n Permissions.Project.canSoftDelete(project.id) && !project.legalHold;\r\n let editTooltip, softDeleteTooltip;\r\n if (!_userCanEdit) {\r\n editTooltip = new TooltipOptions({\r\n text: 'permissions.edit.project',\r\n id: `${project.id}-edit-project-tooltip-id`,\r\n position: menuTooltipPosition,\r\n });\r\n }\r\n if (!_userCanSoftDelete) {\r\n softDeleteTooltip = new TooltipOptions({\r\n text: 'permissions.delete.project',\r\n id: `${project.id}-delete-project-tooltip-id`,\r\n position: menuTooltipPosition,\r\n });\r\n }\r\n if (projectHasReservedClientName) {\r\n softDeleteTooltip = new TooltipOptions({\r\n text: 'client-name.not-allowed.tooltip',\r\n id: `${project.id}-reserved-project-tooltip-id`,\r\n position: menuTooltipPosition,\r\n });\r\n }\r\n return [\r\n new KebabMenuOption({\r\n id: `project-${project.id}-kebab-option-edit`,\r\n title: 'common.edit',\r\n onSelectOption: () =>\r\n push(\r\n parseRoute(ROUTE_CONSTANTS.PROJECT_EDIT_PAGE, {\r\n params: { id: project.id },\r\n }),\r\n ),\r\n disabled: !_userCanEdit,\r\n tooltip: editTooltip,\r\n }),\r\n new KebabMenuOption({\r\n id: `project-${project.id}-kebab-option-soft-delete`,\r\n title: 'common.delete',\r\n onSelectOption: () => onSoftDeleteClick(),\r\n disabled: !_userCanSoftDelete || projectHasReservedClientName,\r\n tooltip: softDeleteTooltip,\r\n }),\r\n new KebabMenuOption({\r\n id: `project-${project.id}-kebab-option-pin`,\r\n title: isNullOrUndefined(project.pinnedDatetime)\r\n ? 'common.pin'\r\n : 'common.unpin',\r\n onSelectOption: () => onPinClick(project),\r\n }),\r\n ];\r\n }\r\n};\r\n\r\nexport const SUPPORT_TEAM_ACCESS_TOOLTIP = new TooltipOptions({\r\n text: 'project-list.support-team-access.tooltip',\r\n id: 'project-list-id-support-team-access',\r\n position: 'right',\r\n});\r\n\r\nexport const COE_TEAM_ACCESS_TOOLTIP = new TooltipOptions({\r\n text: 'project-details.coe-team-access.tooltip',\r\n id: 'project-details-id-coe-team-access',\r\n position: 'right',\r\n});\r\n\r\nexport const PIN_TOOLTIP = new TooltipOptions({\r\n text: 'common.pin',\r\n id: 'project-pin-status',\r\n position: 'right',\r\n});\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"icon-path-outer\",\n fill: \"#757575\",\n fillRule: \"nonzero\",\n d: \"M.746 3.835H12.09a.629.629 0 0 0 0-1.255H9.975A3.79 3.79 0 0 0 6.418.07a3.787 3.787 0 0 0-3.466 2.257v.002c-.036.083-.064.167-.094.25H.746a.629.629 0 1 0 0 1.256zm5.672-2.51c.917 0 1.737.498 2.18 1.255H4.24a2.523 2.523 0 0 1 2.178-1.254zm5.673 3.766H.746a.627.627 0 1 0 0 1.254v11.92c0 .347.282.628.63.628h10.086c.346 0 .629-.28.629-.627V6.345a.627.627 0 0 0 0-1.254zM2.007 17.638V6.345h8.824v11.293H2.007zm1.26-1.882a.63.63 0 0 0 .63.628.63.63 0 0 0 .631-.628V8.228a.629.629 0 0 0-.63-.628c-.35 0-.631.281-.631.628v7.528zm2.522 0a.629.629 0 0 0 1.26 0V8.228a.629.629 0 0 0-1.26 0v7.528zm2.521 0a.629.629 0 0 0 1.26 0V8.228a.629.629 0 0 0-1.26 0v7.528z\"\n});\n\nvar SvgTrashCan = function SvgTrashCan(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 13,\n height: 19,\n viewBox: \"0 0 13 19\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgTrashCan, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/trash-can.592ac7a0.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport ProjectListEntry from 'models/data/project-list-entry-model';\r\n\r\nexport const SOFT_DELETE_PROJECT_ID_BLOCK = 'project-card-id';\r\n\r\nconst SoftDeleteModal = ({\r\n toggleSoftDeleteModal,\r\n softDeleteAction,\r\n project,\r\n updateFilteredProjectList,\r\n}) => {\r\n return (\r\n {\r\n toggleSoftDeleteModal();\r\n await softDeleteAction({ project });\r\n updateFilteredProjectList();\r\n },\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.no',\r\n onClick: toggleSoftDeleteModal,\r\n })\r\n }\r\n >\r\n
          \r\n \r\n
          \r\n \r\n \r\n );\r\n};\r\n\r\nSoftDeleteModal.propTypes = {\r\n /** Method on the project list card component to show soft delete modal */\r\n toggleSoftDeleteModal: PropTypes.func.isRequired,\r\n /** Function that governs the behavior when the soft delete option is clicked on the project card component */\r\n softDeleteAction: PropTypes.func.isRequired,\r\n /** Project to be soft deleted */\r\n project: PropTypes.instanceOf(ProjectListEntry).isRequired,\r\n /** function fired to update project list with latest project data */\r\n updateFilteredProjectList: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default SoftDeleteModal;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport ProjectListEntry from 'models/data/project-list-entry-model';\r\n\r\nexport const RESTORE_PROJECT_ID_BLOCK = 'project-card-id';\r\n\r\nconst RestoreProjectModal = ({\r\n toggleRestoreModal,\r\n restoreAction,\r\n project,\r\n updateFilteredProjectList,\r\n}) => {\r\n return (\r\n {\r\n toggleRestoreModal();\r\n await restoreAction({ project });\r\n updateFilteredProjectList();\r\n },\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.no',\r\n onClick: toggleRestoreModal,\r\n })\r\n }\r\n >\r\n
          \r\n \r\n
          \r\n \r\n );\r\n};\r\n\r\nRestoreProjectModal.propTypes = {\r\n /** Method on the project list card component to show restore delete modal */\r\n toggleRestoreModal: PropTypes.func.isRequired,\r\n /** Function that governs the behavior when the restore delete option is clicked on the project card component */\r\n restoreAction: PropTypes.func.isRequired,\r\n /** Project to be soft deleted */\r\n project: PropTypes.instanceOf(ProjectListEntry).isRequired,\r\n /** function fired to update project list with latest project data */\r\n updateFilteredProjectList: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default RestoreProjectModal;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport ProjectListEntry from 'models/data/project-list-entry-model';\r\n\r\nconst PERMANENT_DELETE_PROJECT_ID_BLOCK = 'project-card-id';\r\n\r\nconst PermanentDeleteModal = ({\r\n togglePermanentDeleteModal,\r\n permanentDeleteAction,\r\n project,\r\n updateFilteredProjectList,\r\n}) => {\r\n return (\r\n {\r\n togglePermanentDeleteModal();\r\n await permanentDeleteAction({ project });\r\n updateFilteredProjectList();\r\n },\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.no',\r\n onClick: togglePermanentDeleteModal,\r\n })\r\n }\r\n >\r\n
          \r\n \r\n
          \r\n \r\n );\r\n};\r\n\r\nPermanentDeleteModal.propTypes = {\r\n /** Method on the project list card component to show permanent delete modal */\r\n togglePermanentDeleteModal: PropTypes.func.isRequired,\r\n /** Function that governs the behavior when the permanent delete option is clicked on the project card component */\r\n permanentDeleteAction: PropTypes.func.isRequired,\r\n /** Project to be permanently deleted */\r\n project: PropTypes.instanceOf(ProjectListEntry).isRequired,\r\n /** function fired to update project list with latest project data */\r\n updateFilteredProjectList: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default PermanentDeleteModal;\r\n","import React, { Component, createRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport moment from 'moment';\r\nimport classNames from 'classnames';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport {\r\n getProjectKebabOptions,\r\n SUPPORT_TEAM_ACCESS_TOOLTIP,\r\n COE_TEAM_ACCESS_TOOLTIP,\r\n} from 'constants/feature/project-list-constants';\r\nimport Permissions from 'permissions/permissions';\r\nimport ProjectListEntry from 'models/data/project-list-entry-model';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport { KebabDropdown } from 'components/common/dropdown-component';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { ReactComponent as TrashCan } from 'icons/trash-can.svg';\r\nimport { ReactComponent as Shield } from 'icons/shield.svg';\r\nimport { ReactComponent as Rocket } from 'icons/rocket.svg';\r\nimport {\r\n getPipeColorForProject,\r\n isProjectExistsInPinnedDetails,\r\n} from 'utils/project-utils';\r\nimport SoftDeleteModal from 'components/feature/project-list/soft-delete-project-modal';\r\nimport RestoreProjectModal from 'components/feature/project-list/restore-project-modal';\r\nimport PermanentDeleteModal from 'components/feature/project-list/permanent-delete-project-modal';\r\nimport { PROJECT_LIST_SCROLL_CONTAINER_ID } from './project-list-component';\r\nimport { ReactComponent as OmniaIcon } from 'icons/omnia-icon.svg';\r\nimport { ReactComponent as FilledPin } from 'icons/FilledPin.svg';\r\n\r\nconst KEBAB_WIDTH = '24px';\r\nexport const PROJECT_CARD_BLOCK = 'project-card';\r\nlet PROJECT_CARD_ID_BLOCK = 'project-card-id';\r\nconst TRASH_CAN_ICON_SIZE = '20px';\r\nconst SHIELD_ICON_SIZE = '16px';\r\nconst ROCKET_ICON_SIZE = '16px';\r\nconst OMNIA_ICON_SIZE = '22px';\r\nconst PIN_ICON_SIZE = '22px';\r\n\r\nclass ProjectListCard extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.ref = createRef();\r\n this.state = {\r\n showSoftDeleteModal: false,\r\n showPermanentDeleteModal: false,\r\n showRestoreModal: false,\r\n };\r\n }\r\n componentDidMount() {\r\n this._scrollToSelectedProject();\r\n }\r\n\r\n _scrollToSelectedProject = () => {\r\n const { project, selectedProjectID } = this.props;\r\n if (project.id === selectedProjectID) {\r\n const positionCardInViewHeight =\r\n this.ref.current.offsetTop - this.ref.current.offsetHeight;\r\n document.getElementById(PROJECT_LIST_SCROLL_CONTAINER_ID).scrollTo({\r\n top: positionCardInViewHeight,\r\n behavior: 'smooth',\r\n });\r\n }\r\n };\r\n\r\n _toggleSoftDeleteModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showSoftDeleteModal: !state.showSoftDeleteModal,\r\n };\r\n });\r\n };\r\n\r\n // triggers api add/remove project or statement to respective pinned item\r\n _togglePinUnPin = (project) => {\r\n const { updatePinDetails, updateUnpinDetails, pinnedProjects } = this.props;\r\n !isProjectExistsInPinnedDetails(pinnedProjects, parseInt(project.id))\r\n ? updatePinDetails(project.id)\r\n : updateUnpinDetails(project.id);\r\n };\r\n\r\n _toggleRestoreModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showRestoreModal: !state.showRestoreModal,\r\n };\r\n });\r\n };\r\n\r\n _togglePermanentDeleteModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showPermanentDeleteModal: !state.showPermanentDeleteModal,\r\n };\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n project,\r\n onClick,\r\n softDeleteAction,\r\n permanentDeleteAction,\r\n restoreAction,\r\n selectedProjectID,\r\n push,\r\n index,\r\n updateFilteredProjectList,\r\n } = this.props;\r\n const { showSoftDeleteModal, showPermanentDeleteModal, showRestoreModal } =\r\n this.state;\r\n const {\r\n id,\r\n name,\r\n engagementEntity: { clientName, engagementFye, engagementName },\r\n omniaEngagementEntity,\r\n deleteDate,\r\n legalHold,\r\n hasAdminGroup,\r\n hasCoeGroup,\r\n geoCode,\r\n } = project;\r\n\r\n const _showProjectCardKebab =\r\n !project.isDeleted() ||\r\n Permissions.Project.canRestore(project.id) ||\r\n Permissions.Project.canPermanentlyDelete(project.id);\r\n return (\r\n \r\n \r\n {project && project.isProjectPinned ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n {_showProjectCardKebab ? (\r\n {\r\n e.stopPropagation();\r\n }}\r\n />\r\n ) : null}\r\n \r\n {omniaEngagementEntity.engagementName !== null ? (\r\n <>\r\n \r\n \r\n ) : null}\r\n {hasAdminGroup ? (\r\n \r\n \r\n \r\n ) : null}\r\n {hasCoeGroup ? (\r\n \r\n \r\n \r\n ) : null}\r\n {project.isDeleted() ? (\r\n \r\n ) : null}\r\n \r\n {legalHold ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n \r\n {project.isDeleted() ? (\r\n \r\n \r\n \r\n ) : null}\r\n \r\n {clientName ? (\r\n \r\n ) : null}\r\n \r\n
          \r\n \r\n {engagementName ? (\r\n \r\n ) : null}\r\n \r\n
          \r\n \r\n \r\n
          \r\n \r\n {engagementFye\r\n ? moment(engagementFye).utc().format(DATE_FORMATS.YEAR)\r\n : ''}\r\n \r\n \r\n \r\n {showSoftDeleteModal ? (\r\n \r\n ) : null}\r\n {showRestoreModal ? (\r\n \r\n ) : null}\r\n {showPermanentDeleteModal ? (\r\n \r\n ) : null}\r\n
          \r\n );\r\n }\r\n}\r\n\r\nProjectListCard.propTypes = {\r\n /** project the project that is to be displayed through this card*/\r\n project: PropTypes.instanceOf(ProjectListEntry),\r\n /** number that represents the currently selected project ID from the store.*/\r\n selectedProjectID: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n /** function that governs the behaviour when a project card is clicked upon.*/\r\n onClick: PropTypes.func,\r\n /** function that governs the behaviour when the soft delete option is clicked on the project card.*/\r\n softDeleteAction: PropTypes.func,\r\n /** function that governs the behaviour when the restore option is clicked on the project card.*/\r\n restoreAction: PropTypes.func,\r\n /** function that governs the behaviour when the permanent delete option is clicked on the project card.*/\r\n permanentDeleteAction: PropTypes.func,\r\n /** index of card in the list */\r\n index: PropTypes.number.isRequired,\r\n /** function fired to update project list with latest project data */\r\n updateFilteredProjectList: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ProjectListCard;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M14.006 17.3017C13.8974 17.411 13.8364 17.5588 13.8364 17.7129C13.8364 17.867 13.8974 18.0149 14.006 18.1242L16.4793 20.5975C17.0078 21.1373 17.7251 21.4509 18.4802 21.4725H18.556C19.338 21.4542 20.0815 21.1298 20.6269 20.5692C21.1723 20.0085 21.4759 19.2563 21.4727 18.4742C21.4511 17.7191 21.1374 17.0018 20.5977 16.4733L16.8877 12.7633C16.3592 12.2236 15.6419 11.9099 14.8868 11.8883C14.4918 11.8805 14.0994 11.9541 13.734 12.1047C13.3687 12.2552 13.0383 12.4794 12.7635 12.7633C12.6679 12.8749 12.618 13.0185 12.6237 13.1653C12.6293 13.3121 12.6902 13.4514 12.7941 13.5552C12.898 13.6591 13.0372 13.72 13.1841 13.7257C13.3309 13.7313 13.4744 13.6814 13.586 13.5858C13.7503 13.4166 13.9472 13.2823 14.1647 13.1911C14.3822 13.0999 14.616 13.0536 14.8518 13.055C15.3082 13.0677 15.7415 13.2582 16.0593 13.5858L19.781 17.3017C20.1087 17.6195 20.2992 18.0528 20.3118 18.5092C20.316 18.7454 20.271 18.98 20.1796 19.1979C20.0882 19.4158 19.9525 19.6124 19.781 19.775C19.6167 19.9442 19.4198 20.0785 19.2023 20.1697C18.9848 20.2609 18.7511 20.3072 18.5152 20.3058C18.0588 20.2931 17.6255 20.1027 17.3077 19.775L14.8343 17.3017C14.7801 17.247 14.7156 17.2036 14.6445 17.174C14.5734 17.1444 14.4972 17.1291 14.4202 17.1291C14.3432 17.1291 14.2669 17.1444 14.1958 17.174C14.1248 17.2036 14.0602 17.247 14.006 17.3017ZM7.40851 7.38499C7.6761 7.10856 7.99655 6.88875 8.3508 6.73864C8.70504 6.58853 9.08585 6.51117 9.47059 6.51117C9.85533 6.51117 10.2361 6.58853 10.5904 6.73864C10.9446 6.88875 11.2651 7.10856 11.5327 7.38499L14.006 9.87583C14.1016 9.98742 14.1515 10.131 14.1458 10.2778C14.1402 10.4246 14.0793 10.5639 13.9754 10.6677C13.8715 10.7716 13.7323 10.8325 13.5855 10.8382C13.4386 10.8438 13.2951 10.7939 13.1835 10.6983L10.7102 8.225C10.3923 7.89733 9.95901 7.70684 9.50268 7.69416C9.02758 7.69872 8.57324 7.88948 8.23728 8.22544C7.90133 8.56139 7.71057 9.01574 7.70601 9.49083C7.71869 9.94716 7.90918 10.3805 8.23684 10.6983L11.9468 14.4083C12.2647 14.736 12.698 14.9265 13.1543 14.9392C13.3902 14.9406 13.6239 14.8943 13.8415 14.803C14.059 14.7118 14.2558 14.5776 14.4202 14.4083C14.5318 14.3128 14.6753 14.2628 14.8221 14.2685C14.9689 14.2742 15.1082 14.335 15.2121 14.4389C15.316 14.5428 15.3768 14.6821 15.3825 14.8289C15.3882 14.9757 15.3382 15.1192 15.2427 15.2308C14.7013 15.7832 13.9627 16.0979 13.1893 16.1058H13.1193C12.3643 16.0843 11.647 15.7706 11.1185 15.2308L7.40851 11.5208C6.86874 10.9924 6.55507 10.2751 6.53351 9.51999C6.52886 9.12625 6.604 8.73565 6.75438 8.37173C6.90476 8.00781 7.12727 7.6781 7.40851 7.40249V7.38499Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgOmniaLink = function SvgOmniaLink(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgOmniaLink, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/omnia-link.8249af85.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M11 8C11 6.34315 9.65685 5 8 5C6.34315 5 5 6.34315 5 8C5 9.65685 6.34315 11 8 11C9.65685 11 11 9.65685 11 8ZM6 8C6 6.89543 6.89543 6 8 6C9.10457 6 10 6.89543 10 8C10 9.10457 9.10457 10 8 10C6.89543 10 6 9.10457 6 8Z\",\n fill: \"#007CB0\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10 0.5C10 0.223858 9.77614 0 9.5 0H6.5C6.22386 0 6 0.223858 6 0.5L6.00032 2.3413C5.79945 2.41228 5.60348 2.49366 5.41307 2.58479L4.11091 1.28249C3.91565 1.08722 3.59907 1.08722 3.40381 1.28249L1.28249 3.40381C1.08722 3.59907 1.08722 3.91565 1.28249 4.11091L2.58479 5.41307C2.49366 5.60348 2.41228 5.79945 2.3413 6.00032L0.5 6C0.223858 6 0 6.22386 0 6.5V9.5C0 9.77614 0.223858 10 0.5 10L2.34165 10.0007C2.41256 10.2012 2.49382 10.3968 2.58479 10.5869L1.28249 11.8891C1.08722 12.0843 1.08722 12.4009 1.28249 12.5962L3.40381 14.7175C3.59907 14.9128 3.91565 14.9128 4.11091 14.7175L5.41307 13.4152C5.60348 13.5063 5.79945 13.5877 6.00032 13.6587L6 15.5C6 15.7761 6.22386 16 6.5 16H9.5C9.77614 16 10 15.7761 10 15.5L10.0007 13.6583C10.2012 13.5874 10.3968 13.5062 10.5869 13.4152L11.8891 14.7175C12.0843 14.9128 12.4009 14.9128 12.5962 14.7175L14.7175 12.5962C14.9128 12.4009 14.9128 12.0843 14.7175 11.8891L13.4152 10.5869C13.5062 10.3968 13.5874 10.2012 13.6583 10.0007L15.5 10C15.7761 10 16 9.77614 16 9.5V6.5C16 6.22386 15.7761 6 15.5 6L13.6587 6.00032C13.5877 5.79945 13.5063 5.60348 13.4152 5.41307L14.7175 4.11091C14.9128 3.91565 14.9128 3.59907 14.7175 3.40381L12.5962 1.28249C12.4009 1.08722 12.0843 1.08722 11.8891 1.28249L10.5869 2.58479C10.3968 2.49382 10.2012 2.41256 10.0007 2.34165L10 0.5ZM7.00009 1H9.00019L9.00069 2.34203C9.00084 2.76566 9.26792 3.14323 9.66733 3.28445C9.83355 3.34323 9.99639 3.41079 10.1552 3.48681C10.5378 3.66989 10.9942 3.59176 11.2941 3.29186L12.2427 2.34317L13.6568 3.75734L12.7081 4.70592C12.4082 5.00579 12.3301 5.46221 12.5132 5.84476C12.5893 6.00388 12.657 6.167 12.7158 6.33351C12.8571 6.73319 13.235 7.0004 13.6589 7.00032L15 7.00009V9.00019L13.658 9.00069C13.2343 9.00084 12.8568 9.26792 12.7155 9.66733C12.6568 9.83355 12.5892 9.99639 12.5132 10.1552C12.3301 10.5378 12.4082 10.9942 12.7081 11.2941L13.6568 12.2427L12.2427 13.6568L11.2941 12.7081C10.9942 12.4082 10.5378 12.3301 10.1552 12.5132C9.99639 12.5892 9.83355 12.6568 9.66733 12.7155C9.26792 12.8568 9.00084 13.2343 9.00069 13.658L9.00019 15H7.00009L7.00032 13.6589C7.0004 13.235 6.73319 12.8571 6.33351 12.7158C6.167 12.657 6.00388 12.5893 5.84476 12.5132C5.46221 12.3301 5.00579 12.4082 4.70592 12.7081L3.75734 13.6568L2.34317 12.2427L3.29186 11.2941C3.59176 10.9942 3.66989 10.5378 3.48681 10.1552C3.41079 9.99639 3.34323 9.83355 3.28445 9.66733C3.14323 9.26792 2.76566 9.00084 2.34203 9.00069L1 9.00019V7.00009L2.34112 7.00032C2.76502 7.0004 3.14292 6.73319 3.28416 6.33351C3.343 6.167 3.41066 6.00388 3.48681 5.84476C3.66989 5.46221 3.59176 5.00579 3.29186 4.70592L2.34317 3.75734L3.75734 2.34317L4.70592 3.29186C5.00579 3.59176 5.46221 3.66989 5.84476 3.48681C6.00388 3.41066 6.167 3.343 6.33351 3.28416C6.73319 3.14292 7.0004 2.76502 7.00032 2.34112L7.00009 1Z\",\n fill: \"#007CB0\"\n});\n\nvar SvgSettingsIcon = function SvgSettingsIcon(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 16,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgSettingsIcon, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/settings-icon.e21055b3.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ProjectList } from 'models/api/project-list-model';\r\nimport { GEO_OPTIONS } from 'constants/feature/project-list-header-constants';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { ReactComponent as OmniaLinkIcon } from 'icons/omnia-link.svg';\r\nimport Search from 'components/common/search-component';\r\nimport { ReactComponent as AdminModuleIcon } from 'icons/settings-icon.svg';\r\n\r\nexport const ID_BLOCK = 'id-project-list-header';\r\nexport const BLOCK = 'project-list-header';\r\n\r\nconst OMNIA_LINK_ICON_SIZE = '25';\r\n\r\nconst ProjectListHeader = ({\r\n projectList,\r\n push,\r\n searchTerm,\r\n setSearchTerm,\r\n clearSearchTerm,\r\n _executeSearch,\r\n currentUser,\r\n setGeo,\r\n projects,\r\n appliedSearchTerm,\r\n}) => {\r\n return (\r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n \r\n {(currentUser.admin || currentUser.applicationManager) && (\r\n push(ROUTE_CONSTANTS.ADMIN_MODULE_PAGE)}\r\n >\r\n )}\r\n
          \r\n {\r\n push(ROUTE_CONSTANTS.PROJECT_CREATION_PAGE);\r\n }}\r\n id={`${ID_BLOCK}-create-project`}\r\n className={`${BLOCK}__create`}\r\n >\r\n \r\n \r\n {\r\n push(ROUTE_CONSTANTS.OMNIA_ENGAGEMENT_PAGE);\r\n }}\r\n className={`${BLOCK}__omnia-link`}\r\n >\r\n \r\n
          \r\n \r\n
          \r\n
          \r\n {(!!projects.length || appliedSearchTerm) && (\r\n \r\n )}\r\n {!projects.length && !appliedSearchTerm && (\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nProjectListHeader.propTypes = {\r\n /** list of projects */\r\n projectList: PropTypes.instanceOf(ProjectList).isRequired,\r\n /** function for changing route */\r\n push: PropTypes.func.isRequired,\r\n /** the current search term */\r\n searchTerm: PropTypes.string.isRequired,\r\n /** function set the search term when the user types in the search box */\r\n setSearchTerm: PropTypes.func.isRequired,\r\n /** function to clear the search term */\r\n clearSearchTerm: PropTypes.func.isRequired,\r\n /** function that is fired when the search is initiated */\r\n _executeSearch: PropTypes.func.isRequired,\r\n /**Current User Data */\r\n currentUser: PropTypes.object.isRequired,\r\n /**A handler function which will set the geo in state when selected Region dropdown */\r\n setGeo: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(ProjectListHeader);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { ProjectList } from 'models/api/project-list-model';\r\n\r\nimport ProjectListCard from './_project-list-card-component';\r\nimport ProjectListHeader from './_project-list-header-component';\r\nimport { PROJECTS_AMOUNT } from 'constants/feature/project-list-constants';\r\nimport Loading from 'components/common/loading-component';\r\nimport VirtualizedList from 'components/common/virtualized-list-component';\r\nimport classnames from 'classnames';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { GEO_NAMES } from 'constants/feature/project-list-header-constants';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\nimport { PinnedDetials } from 'models/api/pinned-details-model';\r\nimport moment from 'moment';\r\nimport ProjectListEntry from 'models/data/project-list-entry-model';\r\nconst PROJECT_LIST_BLOCK = 'project-list';\r\nexport const PROJECT_LIST_SCROLL_CONTAINER_ID =\r\n 'project-list-scroll-container-id';\r\nconst PROJECT_CARD_SIZE = 198;\r\nconst SELECTED_PROJECT_CLASS_NAME = 'project-card--selected';\r\n\r\nclass ProjectListComponent extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n index: PROJECTS_AMOUNT,\r\n searchTerm: '',\r\n projects: [],\r\n calculatedScrollPosition: null,\r\n };\r\n }\r\n componentDidMount() {\r\n const {\r\n selectedProjectID,\r\n projectList,\r\n fetchProjectList,\r\n getPinnedDetails,\r\n } = this.props;\r\n fetchProjectList();\r\n getPinnedDetails();\r\n\r\n //This code will execute only when user navigate to home page from statement page\r\n if (projectList.getProjects().length) {\r\n const projects = this.getFilteredProjectList();\r\n const calculatedScrollPosition = this.getCalculatedScrollPosition(\r\n projects,\r\n selectedProjectID,\r\n );\r\n const endIndexInVirtualList =\r\n this.getEndIndexOfProjectToBeRenderedInVirtualList(\r\n projects,\r\n selectedProjectID,\r\n );\r\n this.setState({\r\n projects,\r\n index: endIndexInVirtualList,\r\n calculatedScrollPosition,\r\n });\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n //clearing the appliedSearchTerm from redux store to default value.\r\n this.props.setAppliedSearchTerm(EMPTY_STRING);\r\n }\r\n\r\n getFilteredProjectList = () => {\r\n const { projectList } = this.props;\r\n const { data: { selectedGeo, appliedSearchTerm } = {} } = projectList;\r\n const searchTerm = appliedSearchTerm.toLowerCase();\r\n let filteredProjectList = projectList.getProjects().filter((project) => {\r\n if (selectedGeo.value === GEO_NAMES.ALL) {\r\n return project;\r\n }\r\n return project.geoCode === selectedGeo.value;\r\n });\r\n\r\n filteredProjectList = filteredProjectList.filter(\r\n (project) =>\r\n project.name.toLowerCase().indexOf(searchTerm) !== -1 ||\r\n project.engagementEntity.engagementName\r\n .toLowerCase()\r\n .indexOf(searchTerm) !== -1,\r\n );\r\n return this.sortPinProjects(filteredProjectList);\r\n };\r\n\r\n //Calaculate the index value based on selected project.\r\n //we are calculating the index, so that we can decide how much data will be passed to the virtualize list.\r\n //Index will alway be the project length or in the multiple of 'PROJECTS_AMOUNT'.\r\n getEndIndexOfProjectToBeRenderedInVirtualList = (\r\n projects,\r\n selectedProjectID,\r\n ) => {\r\n const indexOfSelectedProject = projects.findIndex(\r\n (item) => item.id === selectedProjectID,\r\n );\r\n const projectSerialNumber =\r\n indexOfSelectedProject === -1 ? 1 : indexOfSelectedProject + 1;\r\n const indexValue =\r\n PROJECTS_AMOUNT * Math.ceil(projectSerialNumber / PROJECTS_AMOUNT);\r\n return indexValue > projects.length ? projects.length : indexValue;\r\n };\r\n\r\n //Calculate the scroll position using selected project in project list and height of project card.\r\n getCalculatedScrollPosition = (projects, selectedProjectID) => {\r\n const indexOfSelectedProject = projects.findIndex(\r\n (item) => item.id === selectedProjectID,\r\n );\r\n return indexOfSelectedProject === -1\r\n ? 0\r\n : PROJECT_CARD_SIZE * indexOfSelectedProject;\r\n };\r\n\r\n updateFilteredProjectAndEndIndexOfVirtualList() {\r\n const { selectedProjectID } = this.props;\r\n const projects = this.getFilteredProjectList();\r\n\r\n const endIndexInVirtualList =\r\n this.getEndIndexOfProjectToBeRenderedInVirtualList(\r\n projects,\r\n selectedProjectID,\r\n );\r\n this.setState({ projects, index: endIndexInVirtualList });\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { projectList, setFirstProjectAsSelectedFromProjectList } =\r\n this.props;\r\n const { projectList: prevProjectList } = prevProps;\r\n const {\r\n data: {\r\n selectedGeo: prevSelectedGeo,\r\n appliedSearchTerm: prevAppliedSearchTerm,\r\n } = {},\r\n } = prevProjectList;\r\n const { data: { selectedGeo, appliedSearchTerm } = {} } = projectList;\r\n const allProjects = projectList.getProjects();\r\n\r\n if (prevProps.projectList !== this.props.projectList) {\r\n const projects = this.getFilteredProjectList();\r\n this.setState({ projects });\r\n }\r\n\r\n if (\r\n prevSelectedGeo &&\r\n selectedGeo &&\r\n prevSelectedGeo.value !== selectedGeo.value\r\n ) {\r\n let filteredProjectList = this.sortPinProjects(allProjects).filter(\r\n (project) => {\r\n if (selectedGeo.value === GEO_NAMES.ALL) {\r\n return project;\r\n }\r\n return project.geoCode === selectedGeo.value;\r\n },\r\n );\r\n\r\n if (appliedSearchTerm) {\r\n const searchTerm = appliedSearchTerm.toLowerCase();\r\n filteredProjectList = this.sortPinProjects(filteredProjectList).filter(\r\n (project) =>\r\n project.name.toLowerCase().indexOf(searchTerm) !== -1 ||\r\n project.engagementEntity.engagementName\r\n .toLowerCase()\r\n .indexOf(searchTerm) !== -1,\r\n );\r\n }\r\n\r\n setFirstProjectAsSelectedFromProjectList({\r\n projectList: filteredProjectList || [],\r\n });\r\n this.setState({\r\n projects: filteredProjectList,\r\n });\r\n }\r\n\r\n if (prevAppliedSearchTerm !== appliedSearchTerm) {\r\n let filteredProjectList = this.sortPinProjects(allProjects).filter(\r\n (project) => {\r\n if (selectedGeo.value === GEO_NAMES.ALL) {\r\n return project;\r\n }\r\n return project.geoCode === selectedGeo.value;\r\n },\r\n );\r\n\r\n const searchTerm = appliedSearchTerm.toLowerCase();\r\n filteredProjectList = filteredProjectList.filter(\r\n (project) =>\r\n project.name.toLowerCase().indexOf(searchTerm) !== -1 ||\r\n project.engagementEntity.engagementName\r\n .toLowerCase()\r\n .indexOf(searchTerm) !== -1,\r\n );\r\n\r\n setFirstProjectAsSelectedFromProjectList({\r\n projectList: filteredProjectList || [],\r\n });\r\n this.setState({\r\n projects: filteredProjectList,\r\n });\r\n }\r\n //This code will execute only when there is change in project list length i.e when new project is created and when this component is initially loaded.\r\n if (\r\n prevProps.projectList.getProjects().length !==\r\n this.props.projectList.getProjects().length\r\n ) {\r\n const projects = this.getFilteredProjectList();\r\n const calculatedScrollPosition = this.getCalculatedScrollPosition(\r\n projects,\r\n this.props.selectedProjectID,\r\n );\r\n const endIndexInVirtualList =\r\n this.getEndIndexOfProjectToBeRenderedInVirtualList(\r\n projects,\r\n this.props.selectedProjectID,\r\n );\r\n setFirstProjectAsSelectedFromProjectList({\r\n projectList: projects || [],\r\n });\r\n\r\n this.setState({\r\n calculatedScrollPosition,\r\n index: endIndexInVirtualList,\r\n });\r\n }\r\n\r\n if (\r\n this.props.projectList.getProjects().length &&\r\n prevProps.pinnedDetails.getPinnedProjectsLength() !==\r\n this.props.pinnedDetails.getPinnedProjectsLength()\r\n ) {\r\n const projects = this.getFilteredProjectList();\r\n const calculatedScrollPosition = this.getCalculatedScrollPosition(\r\n projects,\r\n this.props.selectedProjectID,\r\n );\r\n const endIndexInVirtualList =\r\n this.getEndIndexOfProjectToBeRenderedInVirtualList(\r\n projects,\r\n this.props.selectedProjectID,\r\n );\r\n this.setState({\r\n projects,\r\n calculatedScrollPosition,\r\n index: endIndexInVirtualList,\r\n });\r\n }\r\n }\r\n\r\n // sort the projects based on the pinned project data\r\n sortPinProjects = (projectList) => {\r\n const { pinnedDetails } = this.props;\r\n\r\n const filteredProjectList = projectList.map((item) => {\r\n const pinnedProject = pinnedDetails.pinnedProjects.find(\r\n (data) => parseInt(item.id) === data.clientId,\r\n );\r\n const project = {\r\n ...item,\r\n ...(pinnedProject\r\n ? {\r\n pinnedDatetime: pinnedProject.pinnedDatetime,\r\n }\r\n : { pinnedDatetime: null }),\r\n };\r\n return new ProjectListEntry(project);\r\n });\r\n const sortedPinnedProjectList = filteredProjectList.sort((a, b) => {\r\n if (a.pinnedDatetime === null) return 1; // Move objects with null date to end\r\n if (b.pinnedDatetime === null) return -1; // Move objects with null date to end\r\n return moment(b.pinnedDatetime) - moment(a.pinnedDatetime); // Sort by date\r\n });\r\n return sortedPinnedProjectList;\r\n };\r\n\r\n clearFilteredProjectList() {\r\n const {\r\n projectList,\r\n clearAppliedSearchTerm,\r\n setFirstProjectAsSelectedFromProjectList,\r\n } = this.props;\r\n const { data: { selectedGeo } = {} } = projectList;\r\n const filteredProjectList = projectList.getProjects().filter((project) => {\r\n if (selectedGeo.value === GEO_NAMES.ALL) {\r\n return project;\r\n }\r\n return project.geoCode === selectedGeo.value;\r\n });\r\n const sortedPinnedProjects = this.sortPinProjects(filteredProjectList);\r\n\r\n setFirstProjectAsSelectedFromProjectList({\r\n projectList: sortedPinnedProjects || [],\r\n });\r\n clearAppliedSearchTerm();\r\n this.setState({\r\n searchTerm: '',\r\n projects: sortedPinnedProjects,\r\n calculatedScrollPosition: 0,\r\n });\r\n }\r\n\r\n listScroll = (endItem) => {\r\n const { index } = this.state;\r\n const { projectList } = this.props;\r\n const projectsAmount = projectList.getProjects().length;\r\n if (index !== projectsAmount) {\r\n if (index + endItem <= projectsAmount) {\r\n this.setState({\r\n index: index + endItem,\r\n });\r\n } else {\r\n this.setState({\r\n index: projectsAmount,\r\n });\r\n }\r\n }\r\n };\r\n\r\n setSearchTerm(val) {\r\n this.setState({\r\n searchTerm: val,\r\n });\r\n }\r\n\r\n setGeo(val) {\r\n this.props.setProjectFilterGeo(val);\r\n this.props.clearAppliedSearchTerm();\r\n this.setState({ searchTerm: '' });\r\n }\r\n\r\n _executeSearch() {\r\n this.props.setAppliedSearchTerm(this.state.searchTerm);\r\n }\r\n\r\n render() {\r\n const {\r\n projectList,\r\n setSelectedProjectFromProjectList,\r\n selectedProjectID,\r\n softDeleteProject,\r\n restoreDeletedProject,\r\n permanentlyDeleteProject,\r\n push,\r\n currentUser,\r\n updatePinDetails,\r\n pinnedDetails,\r\n updateUnpinDetails,\r\n } = this.props;\r\n const { index, searchTerm, projects, calculatedScrollPosition } =\r\n this.state;\r\n const { data: { appliedSearchTerm } = {} } = projectList;\r\n const disableScrollCallback = index === projectList.getProjects().length;\r\n const renderFooter = disableScrollCallback ? () => null : () => ;\r\n const useVirtualizedList = projects.length > PROJECTS_AMOUNT;\r\n const projectListLength = projects.length;\r\n return (\r\n \r\n
          \r\n this.setSearchTerm(value)}\r\n clearSearchTerm={() => {\r\n this.clearFilteredProjectList();\r\n }}\r\n setGeo={(value) => this.setGeo(value)}\r\n _executeSearch={() => this._executeSearch()}\r\n currentUser={currentUser}\r\n projects={projects}\r\n appliedSearchTerm={appliedSearchTerm}\r\n />\r\n \r\n {appliedSearchTerm.length > 0 && projects.length === 0 && (\r\n

          \r\n \r\n

          \r\n )}\r\n {useVirtualizedList ? (\r\n (\r\n \r\n setSelectedProjectFromProjectList({\r\n projectListEntry: project,\r\n })\r\n }\r\n softDeleteAction={softDeleteProject}\r\n updateFilteredProjectList={this.updateFilteredProjectAndEndIndexOfVirtualList.bind(\r\n this,\r\n )}\r\n restoreAction={restoreDeletedProject}\r\n permanentDeleteAction={permanentlyDeleteProject}\r\n selectedProjectID={selectedProjectID}\r\n push={push}\r\n updatePinDetails={updatePinDetails}\r\n index={index}\r\n pinnedProjects={pinnedDetails.pinnedProjects}\r\n updateUnpinDetails={updateUnpinDetails}\r\n />\r\n )}\r\n />\r\n ) : (\r\n projects.map((project, index) => {\r\n return (\r\n \r\n setSelectedProjectFromProjectList({\r\n projectListEntry: project,\r\n })\r\n }\r\n softDeleteAction={softDeleteProject}\r\n updateFilteredProjectList={this.updateFilteredProjectAndEndIndexOfVirtualList.bind(\r\n this,\r\n )}\r\n restoreAction={restoreDeletedProject}\r\n permanentDeleteAction={permanentlyDeleteProject}\r\n selectedProjectID={selectedProjectID}\r\n push={push}\r\n updatePinDetails={updatePinDetails}\r\n updateUnpinDetails={updateUnpinDetails}\r\n pinnedProjects={pinnedDetails.pinnedProjects}\r\n index={index}\r\n />\r\n );\r\n })\r\n )}\r\n
          \r\n \r\n
          \r\n );\r\n }\r\n}\r\n\r\nProjectListComponent.propTypes = {\r\n /** function used to fetch the projects through an api call to be displayed.*/\r\n fetchProjectList: PropTypes.func.isRequired,\r\n /** project[] The list of retrieved projects to be displayed.*/\r\n projectList: PropTypes.instanceOf(ProjectList).isRequired,\r\n /** function that is used to set the selected project in the store.*/\r\n setSelectedProjectFromProjectList: PropTypes.func.isRequired,\r\n /** number representing the id of the currently selected project in the store*/\r\n selectedProjectID: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n /** function that calls an action to soft delete a project */\r\n softDeleteProject: PropTypes.func.isRequired,\r\n /** function that calls an action to restore a soft deleted project */\r\n restoreDeletedProject: PropTypes.func.isRequired,\r\n /**function that calls an action to permanently delete a project */\r\n permanentlyDeleteProject: PropTypes.func.isRequired,\r\n /** function for changing route */\r\n push: PropTypes.func.isRequired,\r\n /** Current user data */\r\n currentUser: PropTypes.object.isRequired,\r\n /** project pinned details */\r\n pinnedDetails: PropTypes.instanceOf(PinnedDetials),\r\n};\r\n\r\nexport default ProjectListComponent;\r\nexport { PROJECT_LIST_BLOCK };\r\n","import { connect } from 'react-redux';\r\nimport ProjectListComponent from 'components/feature/project-list/project-list-component';\r\nimport { push } from 'connected-react-router';\r\nimport {\r\n fetchProjectList,\r\n softDeleteProject,\r\n restoreDeletedProject,\r\n permanentlyDeleteProject,\r\n setProjectFilterGeo,\r\n setAppliedSearchTerm,\r\n clearAppliedSearchTerm,\r\n setFirstProjectAsSelectedFromProjectList,\r\n} from 'store/actions/project-list-actions';\r\nimport { setSelectedProjectFromProjectList } from 'store/actions/selected-project-actions';\r\nimport {\r\n getPinnedDetails,\r\n updatePinDetails,\r\n updateUnpinDetails,\r\n} from 'store/actions/pinned-details-actions';\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n projectList,\r\n pinnedDetails,\r\n selectedProject: { id },\r\n currentUser,\r\n },\r\n}) => ({\r\n projectList,\r\n pinnedDetails,\r\n selectedProjectID: id,\r\n currentUser: currentUser.data,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n fetchProjectList,\r\n setSelectedProjectFromProjectList,\r\n setFirstProjectAsSelectedFromProjectList,\r\n softDeleteProject,\r\n restoreDeletedProject,\r\n permanentlyDeleteProject,\r\n push,\r\n setProjectFilterGeo,\r\n setAppliedSearchTerm,\r\n clearAppliedSearchTerm,\r\n getPinnedDetails,\r\n updatePinDetails,\r\n updateUnpinDetails,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(ProjectListComponent);\r\n","import { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\nimport StatementList from 'components/feature/statement-list/statement-list-component';\r\nimport {\r\n softDeleteCurrentRevision,\r\n softDeleteAllRevisions,\r\n permanentlyDeleteRevision,\r\n permanentlyDeleteAllSoftDeletedRevisionsForStatement,\r\n navigateToStatement,\r\n setUploadedFilesAddRevision,\r\n setUploadedFilesAddRevisionError,\r\n uploadRevision,\r\n requestStatementListWithParams,\r\n requestGetStatementList,\r\n copyStatement,\r\n} from 'store/actions/statement-list/statement-list-actions';\r\nimport {\r\n updatePinDetails,\r\n updateUnpinDetails,\r\n} from 'store/actions/pinned-details-actions';\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n currentUser,\r\n pinnedDetails,\r\n statementList: {\r\n statementList,\r\n statementListFilters: { selectedTab, sort },\r\n revision,\r\n },\r\n workflowsMap,\r\n selectedProject: { project },\r\n },\r\n ui: {\r\n statementPage: { statementWorkflowSteps },\r\n },\r\n}) => ({\r\n statementList,\r\n project,\r\n selectedTab,\r\n sortModel: sort,\r\n revisionInProgress: revision,\r\n workflowsMap,\r\n currentUser,\r\n pinnedDetails,\r\n statementWorkflowSteps,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n push,\r\n softDeleteCurrentRevision,\r\n softDeleteAllRevisions,\r\n permanentlyDeleteAllSoftDeletedRevisionsForStatement,\r\n permanentlyDeleteRevision,\r\n navigateToStatement,\r\n selectTabAndGetStatements: requestStatementListWithParams,\r\n setUploadedFilesAddRevision,\r\n setUploadedFilesAddRevisionError,\r\n uploadRevision,\r\n requestSortedStatementList: requestStatementListWithParams,\r\n refreshStatementList: requestGetStatementList,\r\n copyStatement,\r\n updatePinDetails,\r\n updateUnpinDetails,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(StatementList);\r\n","export default class DocumentUploadStatusModel {\r\n id;\r\n status;\r\n statusDisplay;\r\n currentStep;\r\n totalSteps;\r\n constructor({ id, status, statusDisplay, currentStep, totalSteps }) {\r\n this.id = id;\r\n this.status = status;\r\n this.statusDisplay = statusDisplay;\r\n this.currentStep = currentStep;\r\n this.totalSteps = totalSteps;\r\n }\r\n}\r\n","import { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport DocumentUploadStatusModel from 'models/utils/common/document-upload-status-model';\r\n\r\nexport const RETRY_TOOLTIP = new TooltipOptions({\r\n text: 'statement-processing.tooltip.retry',\r\n id: 'statement-processing-id-tooltip-retry',\r\n position: 'left',\r\n});\r\n\r\nexport const DELETE_PERMANENTLY_TOOLTIP = new TooltipOptions({\r\n text: 'statement-processing.tooltip.delete-permanently',\r\n id: 'statement-processing-id-tooltip-delete-permanently',\r\n position: 'left',\r\n});\r\n\r\nexport const MAXIMIZE_TOOLTIP = new TooltipOptions({\r\n text: 'common.maximize',\r\n id: 'statement-processing-id-tooltip-expand',\r\n position: 'left',\r\n});\r\n\r\nexport const MINIMIZE_TOOLTIP = new TooltipOptions({\r\n text: 'common.minimize',\r\n id: 'statement-processing-id-tooltip-expand',\r\n position: 'left',\r\n});\r\n\r\nexport const numOfDocProcessingSteps = 8;\r\n\r\nexport const DOCUMENT_UPLOAD_STATUSES = {\r\n UPLOADING: new DocumentUploadStatusModel({\r\n id: 1,\r\n status: 'UPLOADING',\r\n statusDisplay: 'Processing',\r\n currentStep: 1,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n SCANNING: new DocumentUploadStatusModel({\r\n id: 2,\r\n status: 'SCANNING',\r\n statusDisplay: 'Processing',\r\n currentStep: 2,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n CONVERTING: new DocumentUploadStatusModel({\r\n id: 3,\r\n status: 'CONVERTING',\r\n statusDisplay: 'Processing',\r\n currentStep: 3,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n PENDING: new DocumentUploadStatusModel({\r\n id: 4,\r\n status: 'PENDING',\r\n statusDisplay: 'Processing',\r\n currentStep: 4,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n PARSING: new DocumentUploadStatusModel({\r\n id: 5,\r\n status: 'PARSING',\r\n statusDisplay: 'Processing',\r\n currentStep: 5,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n QUEUED: new DocumentUploadStatusModel({\r\n id: 6,\r\n status: 'QUEUED',\r\n statusDisplay: 'Processing',\r\n currentStep: 6,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n PROCESSING: new DocumentUploadStatusModel({\r\n id: 7,\r\n status: 'PROCESSING',\r\n statusDisplay: 'Processing',\r\n currentStep: 7,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n COMPLETED: new DocumentUploadStatusModel({\r\n id: 8,\r\n status: 'COMPLETED',\r\n statusDisplay: 'Processing',\r\n currentStep: 8,\r\n totalSteps: numOfDocProcessingSteps,\r\n }),\r\n FAILED: new DocumentUploadStatusModel({\r\n id: 9,\r\n status: 'FAILED',\r\n statusDisplay: 'failed',\r\n currentStep: 0,\r\n totalSteps: 0,\r\n }),\r\n};\r\n","import React from 'react';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst RETRY_ID_BLOCK = 'statement-processing-retry-modal-id';\r\n\r\nconst RetryConfirmationModal = (props) => {\r\n const { onClose, onRetry } = props;\r\n\r\n return (\r\n onRetry(),\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.cancel',\r\n onClick: onClose,\r\n })\r\n }\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nRetryConfirmationModal.propTypes = {\r\n /** Modal panel onClose fucntion */\r\n onClose: PropTypes.func.isRequired,\r\n /** Confirm retry fucntion */\r\n onRetry: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default RetryConfirmationModal;\r\n","import React from 'react';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst CANCEL_MODAL_ID_BLOCK = 'statement-processing-cancel-modal-id';\r\n\r\nconst CancelConfirmationModal = (props) => {\r\n const { onClose, onDelete } = props;\r\n\r\n return (\r\n onDelete(),\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.no',\r\n onClick: onClose,\r\n })\r\n }\r\n >\r\n \r\n \r\n );\r\n};\r\n\r\nCancelConfirmationModal.propTypes = {\r\n /** Modal panel onClose fucntion */\r\n onClose: PropTypes.func.isRequired,\r\n /** Confirm deletion fucntion */\r\n onDelete: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default CancelConfirmationModal;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Cross-/-Special\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"g\", {\n id: \"close\"\n}, React.createElement(\"path\", {\n d: \"M14.8225,14 L20.8308333,7.9975 C21.0290365,7.7660565 21.0157105,7.4210534 20.8002452,7.20558812 C20.5847799,6.99012284 20.2397768,6.97679687 20.0083333,7.175 L14,13.1775 L7.9975,7.16916667 C7.7660565,6.97096354 7.4210534,6.98428951 7.20558812,7.19975479 C6.99012284,7.41522007 6.97679687,7.76022317 7.175,7.99166667 L13.1775,14 L7.16916667,20.0025 C7.00269724,20.1450608 6.93018553,20.3689024 6.98144409,20.5819944 C7.03270264,20.7950864 7.19908026,20.961464 7.41217227,21.0127226 C7.62526427,21.0639811 7.8491059,20.9914694 7.99166667,20.825 L14,14.8225 L20.0025,20.8308333 C20.2339435,21.028919 20.5789466,21.0157105 20.7944119,20.8002452 C21.0098772,20.5847799 21.0232031,20.2397768 20.825,20.0083333 L14.8225,14 Z\",\n fill: \"#00a3e0\"\n}), React.createElement(\"rect\", {\n id: \"Rectangle\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n})));\n\nvar SvgCloseNoCircle = function SvgCloseNoCircle(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCloseNoCircle, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/close-no-circle.d4a80981.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Refresh-/-Special\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"path\", {\n d: \"M21.4556522,18.6034783 C21.4556522,18.9234783 21.1965217,19.1826087 20.8765217,19.1826087 L17.9826087,19.1826087 C17.6626087,19.1826087 17.4034783,18.9234783 17.4034783,18.6034783 L17.4034783,15.7095652 C17.4034783,15.3895652 17.6626087,15.1304348 17.9826087,15.1304348 C18.3026087,15.1304348 18.5617391,15.3895652 18.5617391,15.7095652 L18.5617391,17.44 C19.3095652,16.4434783 19.7182609,15.2365217 19.7182609,13.974087 C19.7182609,10.7826087 17.1234783,8.18608696 13.9306087,8.18608696 C10.7391304,8.18608696 8.14434783,10.7826087 8.14434783,13.974087 C8.14434783,17.1652174 10.7391304,19.7617391 13.9306087,19.7617391 C14.2504348,19.7617391 14.5095652,20.0208696 14.5095652,20.3408696 C14.5095652,20.6608696 14.2504348,20.9182609 13.9306087,20.9182609 C10.1008696,20.9182609 6.98608696,17.8034783 6.98608696,13.974087 C6.98608696,10.1443478 10.1008696,7.02782609 13.9306087,7.02782609 C17.76,7.02782609 20.8765217,10.1443478 20.8765217,13.974087 C20.8765217,15.4434783 20.4121739,16.8486957 19.5652174,18.0243478 L20.8765217,18.0243478 C21.1965217,18.0243478 21.4556522,18.2834783 21.4556522,18.6034783 Z\",\n id: \"icon_269-path\",\n fill: \"#da291c\"\n}));\n\nvar SvgRefreshNoCircle = function SvgRefreshNoCircle(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRefreshNoCircle, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/refresh-no-circle.591e2475.svg\";\nexport { ForwardRef as ReactComponent };","import { Component } from 'react';\r\nimport {\r\n requestGetStatementWorkflows,\r\n getStatementWorkflowsWithoutLoading,\r\n} from 'store/actions/statement-workflows-actions';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n initProjectSocketClient,\r\n setProjectSocketClient,\r\n closeProjectSocketClient,\r\n} from 'store/actions/project-socket-actions';\r\nimport { WorkflowsMap } from 'models/api/statement-workflows-map-model';\r\n\r\nconst WORKFLOWS_POLLING_INTERVAL = 15000; //15 sec\r\n\r\nclass StatementWorkflowController extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { intervalId: 0 };\r\n }\r\n componentDidMount() {\r\n const {\r\n socketHasBeenDisconnected,\r\n initProjectSocketClient,\r\n setProjectSocketClient,\r\n project,\r\n } = this.props;\r\n if (socketHasBeenDisconnected) {\r\n initProjectSocketClient(project.id);\r\n setProjectSocketClient();\r\n }\r\n this._setIntervalForWorkflowStatus();\r\n }\r\n\r\n _setIntervalForWorkflowStatus = () => {\r\n const intervalId = setInterval(() => {\r\n const {\r\n socketHasBeenDisconnected,\r\n getStatementWorkflowsWithoutLoading,\r\n workflowsMap,\r\n } = this.props;\r\n if (socketHasBeenDisconnected && workflowsMap.isInitialized()) {\r\n getStatementWorkflowsWithoutLoading();\r\n }\r\n }, WORKFLOWS_POLLING_INTERVAL);\r\n\r\n this.setState({ intervalId });\r\n };\r\n _clearIntervalForWorkflowStatus = () => {\r\n clearInterval(this.state.intervalId);\r\n this.setState({ intervalId: 0 });\r\n };\r\n componentDidUpdate(prevProps, prevState) {\r\n const { project, socketHasBeenDisconnected } = this.props;\r\n this._handleProjectSocket(prevProps.project, project);\r\n if (prevProps.socketHasBeenDisconnected !== socketHasBeenDisconnected) {\r\n if (socketHasBeenDisconnected)\r\n !this.state.intervalId && this._setIntervalForWorkflowStatus();\r\n else this._clearIntervalForWorkflowStatus();\r\n }\r\n }\r\n\r\n _handleProjectSocket = async (previousProject, currentProject) => {\r\n const {\r\n initProjectSocketClient,\r\n setProjectSocketClient,\r\n closeProjectSocketClient,\r\n requestGetStatementWorkflows,\r\n } = this.props;\r\n if (previousProject.id !== currentProject.id) {\r\n await requestGetStatementWorkflows();\r\n previousProject.id &&\r\n (await closeProjectSocketClient(previousProject.id));\r\n if (currentProject.id) {\r\n await initProjectSocketClient(currentProject.id);\r\n await setProjectSocketClient();\r\n }\r\n }\r\n };\r\n\r\n componentWillUnmount() {\r\n const { project, closeProjectSocketClient } = this.props;\r\n closeProjectSocketClient(project.id);\r\n this._clearIntervalForWorkflowStatus();\r\n }\r\n render() {\r\n return null;\r\n }\r\n}\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { project },\r\n workflowsMap,\r\n },\r\n sockets: {\r\n projectSocket: { socketHasBeenDisconnected },\r\n },\r\n}) => ({\r\n project,\r\n workflowsMap,\r\n socketHasBeenDisconnected,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n requestGetStatementWorkflows,\r\n getStatementWorkflowsWithoutLoading,\r\n initProjectSocketClient,\r\n setProjectSocketClient,\r\n closeProjectSocketClient,\r\n};\r\n\r\nStatementWorkflowController.propTypes = {\r\n /** Action to request statement workflows */\r\n requestGetStatementWorkflows: PropTypes.func.isRequired,\r\n /** Action to request statement workflows without loading */\r\n getStatementWorkflowsWithoutLoading: PropTypes.func.isRequired,\r\n /** Action to disconnect project level signalr client */\r\n closeProjectSocketClient: PropTypes.func.isRequired,\r\n /** Action to initialize project level signalr client */\r\n initProjectSocketClient: PropTypes.func.isRequired,\r\n /** Action to set project level signalr client */\r\n setProjectSocketClient: PropTypes.func.isRequired,\r\n /** workflowMap object contains statement details of statement uploading with status inProgress/failed */\r\n workflowsMap: PropTypes.instanceOf(WorkflowsMap),\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(StatementWorkflowController);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Draggable from 'react-draggable';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as ArrowDown } from 'icons/arrow-simple-thick-down.svg';\r\nimport {\r\n MAXIMIZE_TOOLTIP,\r\n MINIMIZE_TOOLTIP,\r\n RETRY_TOOLTIP,\r\n DELETE_PERMANENTLY_TOOLTIP,\r\n} from 'constants/feature/statement-processing-constants';\r\nimport { WorkflowsMap } from 'models/api/statement-workflows-map-model';\r\nimport { DEFAULT_SELECTED_PROJECT_ID } from 'constants/feature/selected-project-constants';\r\nimport RetryConfirmationModal from 'components/feature/statement-processing/retry-confirmation-modal';\r\nimport CancelConfirmationModal from 'components/feature/statement-processing/cancel-confirmation-modal';\r\nimport { ReactComponent as Cancel } from 'icons/close-no-circle.svg';\r\nimport { ReactComponent as Refresh } from 'icons/refresh-no-circle.svg';\r\nimport { toast } from 'react-toastify';\r\nimport Notification from 'components/common/notification-component';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button-red.svg';\r\nimport StatementWorkflowController from './statement-workflow-controller-component';\r\nimport { StatementWorkflowStepsData } from 'models/api/statement-workflow-steps-model';\r\n\r\nexport const STATEMENT_PROCESSING_BLOCK = 'statement-processing';\r\nconst STATEMENT_PROCESSING_ID_BLOCK = 'statement-processing-id';\r\nconst CANCEL_ICON_SIZE = '24px';\r\nconst REFRESH_ICON_SIZE = '24px';\r\nconst ARROW_DOWN_SIZE = '24px';\r\n\r\nclass StatementProcessing extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isOpen: false,\r\n showRetryConfirmModal: false,\r\n showCancelConfirmModal: false,\r\n currentWorkflowRevisionId: null,\r\n currentWorkflowStatementId: null,\r\n isDiplayedInfectedErrorToast: {},\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const {\r\n clearProjectIdWorkflowExpanded,\r\n selectedProjectID,\r\n workflowsMap,\r\n permanentlyDeleteWorkflowRevision,\r\n statementWorkflowSteps,\r\n } = this.props;\r\n const _shouldExpandByDefault =\r\n prevProps.expandByDefault === false &&\r\n this.props.expandByDefault === true;\r\n const _userSwitchedProject =\r\n selectedProjectID !== DEFAULT_SELECTED_PROJECT_ID &&\r\n prevProps.selectedProjectID !== selectedProjectID;\r\n if (_shouldExpandByDefault) {\r\n this.setState({\r\n isOpen: true,\r\n });\r\n } else if (_userSwitchedProject) {\r\n this.setState({ isOpen: false });\r\n clearProjectIdWorkflowExpanded();\r\n }\r\n\r\n const workflowsChanged = !workflowsMap.areWorkFlowsEqual(\r\n prevProps.workflowsMap,\r\n statementWorkflowSteps,\r\n );\r\n\r\n if (workflowsChanged) {\r\n workflowsMap &&\r\n workflowsMap.getWorkflowsListData().forEach((workflow) => {\r\n const workFlowStatus = workflow.getWorkFlowStatus(\r\n statementWorkflowSteps.getWorkflowStepsByDocProcessType(\r\n workflow.documentProcessTypeEnum,\r\n ),\r\n );\r\n const previousWorkFlowStatus = workflow.getPreviousWorkflowStatus(\r\n statementWorkflowSteps.getWorkflowStepsByDocProcessType(\r\n workflow.documentProcessTypeEnum,\r\n ),\r\n );\r\n if (\r\n workFlowStatus &&\r\n previousWorkFlowStatus &&\r\n this._hasWorkFlowFailed(workFlowStatus.status, workflow) &&\r\n this._isWorkFlowScanning(previousWorkFlowStatus.status, workflow) &&\r\n workflow.errorInfo === 'symantec scan failed' &&\r\n !this.state.isDiplayedInfectedErrorToast[workflow.revisionId]\r\n ) {\r\n this._handleInfected(workflow);\r\n permanentlyDeleteWorkflowRevision(\r\n workflow.statementId,\r\n workflow.revisionId,\r\n );\r\n }\r\n });\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n const { clearProjectIdWorkflowExpanded } = this.props;\r\n clearProjectIdWorkflowExpanded();\r\n }\r\n\r\n _toggleProcessingList = () => {\r\n // clear client expanded prop after user interacts\r\n this.props.clearProjectIdWorkflowExpanded();\r\n this.setState((state, props) => {\r\n return {\r\n isOpen: !state.isOpen,\r\n };\r\n });\r\n };\r\n\r\n _hasWorkFlowFailed = (workFlowStatus, workflow) => {\r\n const { statementWorkflowSteps } = this.props;\r\n const docWorkflowSteps = statementWorkflowSteps.isFailedWorkflowStep(\r\n workflow.documentProcessTypeEnum,\r\n );\r\n return workFlowStatus === docWorkflowSteps.status;\r\n };\r\n\r\n _isWorkFlowScanning = (workFlowStatus, workflow) => {\r\n const { statementWorkflowSteps } = this.props;\r\n const docWorkflowSteps = statementWorkflowSteps.isScanningWorkflowStep(\r\n workflow.documentProcessTypeEnum,\r\n );\r\n return workFlowStatus === docWorkflowSteps.status;\r\n };\r\n\r\n _setRetryConfirmModal = () => {\r\n this.setState({\r\n showRetryConfirmModal: !this.state.showRetryConfirmModal,\r\n });\r\n };\r\n\r\n _setCancelConfirmModal = () => {\r\n this.setState({\r\n showCancelConfirmModal: !this.state.showCancelConfirmModal,\r\n });\r\n };\r\n\r\n _handleInfected = (workflow) => {\r\n this.setState(\r\n (prevState) => ({\r\n isDiplayedInfectedErrorToast: {\r\n [workflow.revisionId]: true,\r\n ...prevState.isDiplayedInfectedErrorToast,\r\n },\r\n }),\r\n () => {\r\n toast.error(\r\n }\r\n message={{\r\n id: 'statement-processing.step-failed-for-scanning-message',\r\n }}\r\n title={{\r\n id: 'statement-processing.step-failed-for-scanning-title',\r\n }}\r\n />,\r\n { autoClose: 15000 },\r\n );\r\n },\r\n );\r\n };\r\n\r\n _minifiedPopover = () => {\r\n const { workflowsMap, statementWorkflowSteps } = this.props;\r\n const processingWorkflowsTotal = workflowsMap.getProcessingWorkflowsTotal(\r\n statementWorkflowSteps,\r\n );\r\n const failedWorkflowsTotal = workflowsMap.getFailedWorkflowsTotal(\r\n statementWorkflowSteps,\r\n );\r\n return (\r\n \r\n
          \r\n {processingWorkflowsTotal ? (\r\n \r\n {processingWorkflowsTotal}\r\n \r\n
          \r\n ) : null}\r\n {failedWorkflowsTotal ? (\r\n \r\n {failedWorkflowsTotal}\r\n \r\n \r\n ) : null}\r\n \r\n
          \r\n );\r\n };\r\n\r\n _expandedPopover = () => {\r\n const { workflowsMap, statementWorkflowSteps } = this.props;\r\n return (\r\n \r\n
          \r\n
          \r\n \r\n
          \r\n {workflowsMap.getWorkflowsListData().map((workflow) => {\r\n const workFlowStatus =\r\n workflow.getWorkFlowStatus(\r\n statementWorkflowSteps.getWorkflowStepsByDocProcessType(\r\n workflow.documentProcessTypeEnum,\r\n ),\r\n ) || {};\r\n const previousWorkFlowStatus =\r\n workflow.getPreviousWorkflowStatus(\r\n statementWorkflowSteps.getWorkflowStepsByDocProcessType(\r\n workflow.documentProcessTypeEnum,\r\n ),\r\n ) || {};\r\n return (\r\n \r\n
          \r\n \r\n {!this._hasWorkFlowFailed(\r\n workFlowStatus.status,\r\n workflow,\r\n ) ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
          \r\n \r\n {workflow.statementName}\r\n
          \r\n \r\n {this._hasWorkFlowFailed(workFlowStatus.status, workflow) ? (\r\n
          \r\n {workflow.retryable ? (\r\n \r\n {\r\n this._setRetryConfirmModal();\r\n this.setState({\r\n currentWorkflowRevisionId: workflow.revisionId,\r\n currentWorkflowStatementId: workflow.statementId,\r\n });\r\n }}\r\n />\r\n \r\n ) : null}\r\n
          \r\n ) : null}\r\n \r\n {\r\n this._setCancelConfirmModal();\r\n this.setState({\r\n currentWorkflowRevisionId: workflow.revisionId,\r\n currentWorkflowStatementId: workflow.statementId,\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 render() {\r\n const {\r\n workflowsMap,\r\n retryFailedDocumentUpload,\r\n permanentlyDeleteWorkflowRevision,\r\n selectedProjectID,\r\n } = this.props;\r\n const {\r\n isOpen,\r\n showRetryConfirmModal,\r\n showCancelConfirmModal,\r\n currentWorkflowRevisionId,\r\n currentWorkflowStatementId,\r\n } = this.state;\r\n return (\r\n \r\n \r\n {workflowsMap.isInitialized() ? (\r\n \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n {isOpen ? (\r\n \r\n \r\n \r\n ) : (\r\n \r\n \r\n \r\n )}\r\n
          \r\n {isOpen ? this._expandedPopover() : this._minifiedPopover()}\r\n
          \r\n
          \r\n ) : null}\r\n {showRetryConfirmModal && (\r\n this.setState({ showRetryConfirmModal: false })}\r\n onRetry={() => {\r\n retryFailedDocumentUpload(\r\n currentWorkflowStatementId,\r\n currentWorkflowRevisionId,\r\n selectedProjectID,\r\n );\r\n this._setRetryConfirmModal();\r\n }}\r\n />\r\n )}\r\n {showCancelConfirmModal && (\r\n this.setState({ showCancelConfirmModal: false })}\r\n onDelete={() => {\r\n permanentlyDeleteWorkflowRevision(\r\n currentWorkflowStatementId,\r\n currentWorkflowRevisionId,\r\n );\r\n this._setCancelConfirmModal();\r\n }}\r\n />\r\n )}\r\n
          \r\n );\r\n }\r\n}\r\n\r\nStatementProcessing.propTypes = {\r\n /** Api model of all workflows for the selected project in a map of revision id to workflow */\r\n workflowsMap: PropTypes.instanceOf(WorkflowsMap).isRequired,\r\n /** Currently selected project id */\r\n selectedProjectID: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n /** Action that deletes a failed workflow permanently */\r\n permanentlyDeleteWorkflowRevision: PropTypes.func.isRequired,\r\n /** Action that retries a failed workflow */\r\n retryFailedDocumentUpload: PropTypes.func.isRequired,\r\n /** indicates if workflows should be expanded by default */\r\n expandByDefault: PropTypes.bool.isRequired,\r\n /** clears the project id from redux that would cause this component to be expanded by default */\r\n clearProjectIdWorkflowExpanded: PropTypes.func.isRequired,\r\n /** getting statement workflow steps metadata */\r\n statementWorkflowSteps: PropTypes.instanceOf(StatementWorkflowStepsData),\r\n};\r\n\r\nexport default StatementProcessing;\r\n","import { connect } from 'react-redux';\r\n\r\nimport StatementProcessing from 'components/feature/statement-processing/statement-processing-component';\r\nimport {\r\n permanentlyDeleteWorkflowRevision,\r\n retryFailedDocumentUpload,\r\n clearProjectIdWorkflowExpanded,\r\n} from 'store/actions/statement-workflows-actions';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n workflowsMap,\r\n selectedProject: { id },\r\n },\r\n ui: {\r\n homepage: { projectIdOfWorkflowToExpand },\r\n statementPage: { statementWorkflowSteps },\r\n },\r\n}) => ({\r\n workflowsMap,\r\n /**\r\n * set to override the default isOpen logic of the popover, example of use would be a user creates a statement and is navigated back to home page\r\n * for the project where the user just created a statement, the popover should be open by default\r\n */\r\n selectedProjectID: id,\r\n statementWorkflowSteps,\r\n expandByDefault:\r\n !isNullOrUndefined(projectIdOfWorkflowToExpand) &&\r\n projectIdOfWorkflowToExpand === id,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n permanentlyDeleteWorkflowRevision,\r\n retryFailedDocumentUpload,\r\n clearProjectIdWorkflowExpanded,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(StatementProcessing);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst OMNIA_CONFIRM_MODAL_ID = 'omnia-confirm-modal-id';\r\nexport const OMNIA_CONFIRM_MODAL = 'omnia-confirm-modal';\r\n\r\nconst OmniaConfirmModal = ({ onClickYes, onClickNo }) => {\r\n return (\r\n \r\n
          \r\n \r\n
          \r\n \r\n \r\n );\r\n};\r\n\r\nOmniaConfirmModal.propTypes = {\r\n /** Action fired when user clicks the yes button */\r\n onClickYes: PropTypes.func.isRequired,\r\n /** Action fired when user clicks No || close button */\r\n onClickNo: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default OmniaConfirmModal;\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport class TieoutBuildInfo extends ApiModel({\r\n data: {\r\n omniaEnabled: null,\r\n springProfiles: null,\r\n vstsBuild: null,\r\n projectVersion: null,\r\n },\r\n}) {\r\n get vstsBuild() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.vstsBuild;\r\n }\r\n return null;\r\n }\r\n get projectVersion() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.projectVersion;\r\n }\r\n return null;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: response.data,\r\n };\r\n }\r\n}\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\n\r\nexport const TERMS_OF_USE_ANCHOR = (\r\n \r\n \r\n \r\n);\r\n\r\nexport const PRIVACY_ANCHOR = (\r\n \r\n \r\n \r\n);\r\n\r\nexport const NOTICES_ANCHOR = (\r\n \r\n \r\n \r\n);\r\n\r\nexport const ABOUT_ANCHOR = (\r\n \r\n www.deloitte.com/about\r\n \r\n);\r\n\r\nexport const COOKIES_ANCHOR = (\r\n \r\n \r\n \r\n);\r\n\r\nexport const COOKIES_SETTINGS = (\r\n // eslint-disable-next-line jsx-a11y/anchor-is-valid\r\n document.getElementById('ot-sdk-btn').click()}\r\n target=\"_blank\"\r\n >\r\n \r\n \r\n);\r\n","import React, { useState } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { TieoutBuildInfo } from 'models/api/tieout-build-info-model';\r\nimport { getBuildInfoRequest } from 'api/tieout-info-api';\r\nimport {\r\n // TERMS_OF_USE_ANCHOR,\r\n PRIVACY_ANCHOR,\r\n NOTICES_ANCHOR,\r\n ABOUT_ANCHOR,\r\n COOKIES_ANCHOR,\r\n COOKIES_SETTINGS,\r\n} from 'constants/footer-constants';\r\n\r\nconst FOOTER_BLOCK = 'footer';\r\nconst FOOTER_BLOCK_ID = 'footer_id';\r\n\r\nconst Footer = () => {\r\n const [buildInfo, setBuildInfo] = useState(new TieoutBuildInfo());\r\n\r\n React.useEffect(() => {\r\n const fetchBuildInfo = async () => {\r\n setBuildInfo(buildInfo.setLoading());\r\n try {\r\n const response = await getBuildInfoRequest();\r\n setBuildInfo(buildInfo.setLoaded({ response }));\r\n } catch (error) {\r\n setBuildInfo(buildInfo.setError(error));\r\n }\r\n };\r\n\r\n fetchBuildInfo();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n return (\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\nexport default Footer;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fill: \"none\",\n d: \"M0 0h28v28H0z\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M14 5a9 9 0 1 1 0 18 9 9 0 0 1 0-18zm.808 7.666h-2.334c-.2 0-.333.133-.333.333v1.334c0 .2.133.333.333.333h.667v2.667h-1c-.2 0-.333.133-.333.333v1.333c0 .2.133.334.333.334h4c.2 0 .333-.133.333-.334v-1.333c0-.2-.133-.333-.333-.333h-1v-4.334c0-.2-.133-.333-.333-.333zM14.14 8.5c-.688 0-1.25.563-1.25 1.25 0 .688.563 1.25 1.25 1.25.688 0 1.25-.563 1.25-1.25 0-.688-.563-1.25-1.25-1.25z\"\n});\n\nvar SvgInfoAlt = function SvgInfoAlt(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n height: 24,\n width: 24,\n viewBox: \"0 0 28 28\",\n id: \"sprite-mini-information\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgInfoAlt, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/info-alt.8af7493a.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useEffect, useState } from 'react';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport PropTypes from 'prop-types';\r\nimport { getSummaryOfKeyChanges } from '../../../api/admin-module-api';\r\nimport { EMPTY_STRING } from '../../../constants/common/feature-common-utils';\r\nimport { getText } from '../../../constants/util/admin-module-utility';\r\n\r\nexport const RECENT_UPDATES_ID_BLOCK = 'recent-update-id';\r\nexport const RECENT_UPDATES_BLOCK = 'recent-updates';\r\n\r\nconst RecentUpdatesModal = ({ onClose, onSave }) => {\r\n const [innerTextHtml, setInnerTextHtml] = useState(EMPTY_STRING);\r\n const [showRecentUpdates, setShowRecentUpdates] = useState(false);\r\n\r\n const fetchSummaryOfKeyChanges = async () => getSummaryOfKeyChanges();\r\n\r\n useEffect(() => {\r\n fetchSummaryOfKeyChanges().then((response) => {\r\n setInnerTextHtml(response.text);\r\n setShowRecentUpdates(response.status);\r\n });\r\n }, []);\r\n return (\r\n showRecentUpdates &&\r\n getText(innerTextHtml) && (\r\n onSave(),\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.close',\r\n onClick: () => onClose(),\r\n })\r\n }\r\n >\r\n
          \r\n \r\n
          \r\n \r\n )\r\n );\r\n};\r\n\r\nRecentUpdatesModal.propTypes = {\r\n /** Modal panel onClose function */\r\n onClose: PropTypes.func.isRequired,\r\n /** Modal panel onSave function */\r\n onSave: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default RecentUpdatesModal;\r\n","import React, { useEffect, useRef, useState } from 'react';\r\nimport { getCurrentMaintenanceBanner } from 'api/admin-module-api';\r\nimport { ReactComponent as Information } from 'icons/info.svg';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\nimport PropTypes from 'prop-types';\r\nimport disclosureAnalyticsCSSVariable from '../../../../src/styles/variables/feature/disclosure-analytics-header-variables.scss';\r\nimport homePageCSSVariable from '../../../../src/styles/variables/pages/home-page-variables.scss';\r\nimport HTMLEllipsis from 'react-lines-ellipsis/lib/html';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport responsiveHOC from 'react-lines-ellipsis/lib/responsiveHOC';\r\n\r\nconst MAINTENANCE_BANNER_BLOCK = 'maintenance-banner';\r\nconst MAINTENANCE_BANNER_BLOCK_ID = 'maintenance-banner-id';\r\nexport const MAINTENANCE_BANNER_SESSION_DATA_NAME =\r\n 'maintenance-banner-session-data';\r\nexport const MAINTENANCE_BANNER_SESSION_DATA_VALUE = 'tieout-maintenance-info';\r\nconst BANNER_CLOSE_ICON_SIZE = '28px';\r\n\r\nconst MAINTENANCE_BANNER_ICON_SIZE = '18px';\r\nconst DISCLOSURE_ANALYTICS_BANNER_HEIGHT = parseInt(\r\n disclosureAnalyticsCSSVariable.disclosureAnalyticsHeaderHeight,\r\n);\r\nconst HOME_PAGE_FOOTER_HEIGHT = parseInt(homePageCSSVariable.footerHeight);\r\n\r\nconst ResponsiveLinesEllipsis = responsiveHOC()(HTMLEllipsis);\r\n\r\nexport const MaintenanceBanner = ({ projectListRef, homePageRightRef }) => {\r\n const bannerText = useRef('');\r\n const bannerDivRef = useRef();\r\n\r\n // This state is set to true when we have success while fetching banner text from BE\r\n // And we are ready to display it.\r\n const [showBanner, setShowBanner] = useState(false);\r\n const [showTooltip, setShowTooltip] = useState(false);\r\n const isSessionStoreConsistsBanner = useRef(\r\n sessionStorage.getItem(MAINTENANCE_BANNER_SESSION_DATA_NAME) ===\r\n MAINTENANCE_BANNER_SESSION_DATA_VALUE,\r\n );\r\n\r\n useEffect(() => {\r\n const fetchData = async () => await getCurrentMaintenanceBanner();\r\n !isSessionStoreConsistsBanner.current &&\r\n fetchData().then((response) => {\r\n bannerText.current = response;\r\n if (bannerText.current && typeof bannerText.current === 'string') {\r\n setShowBanner(true);\r\n }\r\n });\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n useEffect(() => {\r\n if (\r\n showBanner &&\r\n projectListRef &&\r\n homePageRightRef &&\r\n !isSessionStoreConsistsBanner.current\r\n ) {\r\n //adjusting project list top property\r\n projectListRef.style.top = `${\r\n DISCLOSURE_ANALYTICS_BANNER_HEIGHT +\r\n parseInt(bannerDivRef.current.clientHeight)\r\n }px`;\r\n //adjusting project list height property\r\n projectListRef.style.height = `calc(\r\n 100vh - ${\r\n DISCLOSURE_ANALYTICS_BANNER_HEIGHT +\r\n HOME_PAGE_FOOTER_HEIGHT +\r\n parseInt(bannerDivRef.current.clientHeight)\r\n }px\r\n )`;\r\n\r\n //adjusting home page right component- containing project details\r\n homePageRightRef.style.top = `${parseInt(\r\n bannerDivRef.current.clientHeight,\r\n )}px`;\r\n }\r\n }, [homePageRightRef, projectListRef, showBanner]);\r\n\r\n const handleBannerClose = () => {\r\n sessionStorage.setItem(\r\n MAINTENANCE_BANNER_SESSION_DATA_NAME,\r\n MAINTENANCE_BANNER_SESSION_DATA_VALUE,\r\n );\r\n setShowBanner(false);\r\n //adjusting project list top property\r\n projectListRef &&\r\n (projectListRef.style.top = `${DISCLOSURE_ANALYTICS_BANNER_HEIGHT}px`);\r\n //adjusting project list height property\r\n projectListRef &&\r\n (projectListRef.style.height = `calc(\r\n 100vh - ${\r\n DISCLOSURE_ANALYTICS_BANNER_HEIGHT + HOME_PAGE_FOOTER_HEIGHT\r\n }px\r\n )`);\r\n\r\n //adjusting home page right component- containing project details\r\n homePageRightRef && (homePageRightRef.style.top = '0px');\r\n };\r\n return (\r\n !isSessionStoreConsistsBanner.current &&\r\n showBanner && (\r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n (\r\n \r\n ),\r\n }}\r\n />\r\n }\r\n isNotInternationalized={true}\r\n position={'bottom'}\r\n active={showTooltip}\r\n >\r\n {\r\n setShowTooltip(clamped);\r\n }}\r\n />\r\n \r\n
          \r\n handleBannerClose()}\r\n />\r\n
          \r\n )\r\n );\r\n};\r\n\r\nMaintenanceBanner.propTypes = {\r\n // ref for project list in home page. It is used here to set style dynamically\r\n projectListRef: PropTypes.object,\r\n // ref for right part of home page. It is used here to set style dynamically\r\n homePageRightRef: PropTypes.object,\r\n};\r\n\r\nexport default MaintenanceBanner;\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\n\r\nimport Page from 'components/util/page-component';\r\nimport ProjectDetailsContainer from 'containers/feature/project-details-container';\r\nimport ProjectListContainer from 'containers/feature/project-list-container';\r\nimport StatementListContainer from 'containers/feature/statement-list/statement-list-container';\r\nimport StatementProcessing from 'containers/feature/statement-processing-container';\r\nimport queryString from 'query-string';\r\nimport OmniaConfirmModal from 'components/feature/omnia/_omnia-engagements-confirmation-modal';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport OmniaEngagement from 'models/api/omnia-engagement-model';\r\nimport Footer from 'components/common/footer-component';\r\nimport { isGoogleChrome } from 'utils/browser-utils';\r\nimport { ReactComponent as InfoIcon } from 'icons/info-alt.svg';\r\nimport RecentUpdatesModal from 'components/feature/home-page/recent-updates-modal';\r\nimport MaintenanceBanner from 'components/feature/home-page/maintenance-banner';\r\n\r\nconst HOME_PAGE_BLOCK = 'home-page';\r\n//LOCAL_STORAGE_DATA_VERSION if we need to release a new set of updates, changing this constant\r\n// will remove the last version local storage and will add a new one for the new version\r\n// so the modal will show up again\r\nexport const LOCAL_STORAGE_DATA_VERSION = 1;\r\n\r\nconst cookieChangeEventController = new AbortController();\r\n\r\nclass HomePage extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.projectListRef = React.createRef();\r\n this.homePageRightRef = React.createRef();\r\n this.state = {\r\n showConfirmModal: false,\r\n showRecentUpdatesModal: false,\r\n OptanonAlertBoxClosedCookie: false,\r\n refProjectList: this.projectListRef.current,\r\n refHomePageRight: this.homePageRightRef.current,\r\n };\r\n }\r\n\r\n componentWillUnmount() {\r\n this.props.cleanUpHomePageStore();\r\n // remove event listener on unmount\r\n cookieChangeEventController.abort();\r\n\r\n let cookieStore = window.cookieStore;\r\n if (\r\n cookieStore &&\r\n window.TIEOUT.ENV.FEATURE.ENABLE_COOKIE_CONSENT_NOTIFICATION\r\n ) {\r\n window.cookieStore.removeEventListener('change', () => {\r\n console.log(\r\n 'Removed event listener for cookie on unmounting of component',\r\n );\r\n });\r\n }\r\n }\r\n\r\n _setLocalStorageValueForShowingRecentUpdates(value) {\r\n localStorage.setItem(\r\n 'SHOW_UPDATES_MODAL',\r\n JSON.stringify({ version: LOCAL_STORAGE_DATA_VERSION, show: value }),\r\n );\r\n }\r\n _setSessionStorageValueForShowingRecentUpdates(value) {\r\n sessionStorage.setItem('TEMPORARY_SHOW_UPDATES_MODAL', value);\r\n }\r\n\r\n componentDidMount() {\r\n // set ref when component is mounted\r\n this.setState({\r\n refProjectList: this.projectListRef.current,\r\n refHomePageRight: this.homePageRightRef.current,\r\n });\r\n // get the current state of deloitte cookie pop up.\r\n // With this information we want to make sure that our summary\r\n // of key changes pop up do not stacks over cookie pop up.\r\n this.setState({\r\n OptanonAlertBoxClosedCookie: document.cookie.includes(\r\n 'OptanonAlertBoxClosed',\r\n ),\r\n });\r\n let cookieStore = window.cookieStore;\r\n if (\r\n cookieStore &&\r\n window.TIEOUT.ENV.FEATURE.ENABLE_COOKIE_CONSENT_NOTIFICATION\r\n ) {\r\n window.cookieStore.addEventListener(\r\n 'change',\r\n () => {\r\n this.setState({\r\n OptanonAlertBoxClosedCookie: document.cookie.includes(\r\n 'OptanonAlertBoxClosed',\r\n ),\r\n });\r\n },\r\n { signal: cookieChangeEventController.signal },\r\n );\r\n }\r\n const { location, verifyOmniaTokenAndGetEngagement } = this.props;\r\n const omniaToken = queryString.parse(location.search);\r\n if (omniaToken.token) {\r\n verifyOmniaTokenAndGetEngagement({\r\n token: omniaToken.token,\r\n });\r\n }\r\n /*recent updates local storage management block of code */\r\n const displayProductUpdatesData =\r\n localStorage.getItem('SHOW_UPDATES_MODAL');\r\n // we first check if the ENABLE_RECENT_UPDATES_NOTIFICATION env variable true or false\r\n if (!window.TIEOUT.ENV.FEATURE.ENABLE_RECENT_UPDATES_NOTIFICATION) {\r\n this.setState({ showRecentUpdatesModal: false });\r\n } else {\r\n // we check if the data exist in the local storage\r\n if (isNullOrUndefined(displayProductUpdatesData)) {\r\n //we add the current version local storage data and set the state to true to show the modal.\r\n this._setLocalStorageValueForShowingRecentUpdates(true);\r\n this._setSessionStorageValueForShowingRecentUpdates(true);\r\n this.setState({ showRecentUpdatesModal: true });\r\n } else {\r\n // we use try to avoid error in thr application if the user changes the local storage data manually\r\n try {\r\n const localStorageData = JSON.parse(displayProductUpdatesData);\r\n // if local storage data exist and the version is different we need to set the data for the new version\r\n if (\r\n localStorageData.version &&\r\n localStorageData.version !== LOCAL_STORAGE_DATA_VERSION\r\n ) {\r\n this._setLocalStorageValueForShowingRecentUpdates(true);\r\n this._setSessionStorageValueForShowingRecentUpdates(true);\r\n this.setState({ showRecentUpdatesModal: true });\r\n } else {\r\n //if the local storage data exist and we didn't changed the version, we check the value\r\n // if its true, we set the state to true to show the modal\r\n /*recent updates local storage management block of code */\r\n let displayProductUpdatesSessionData = sessionStorage.getItem(\r\n 'TEMPORARY_SHOW_UPDATES_MODAL',\r\n );\r\n if (isNullOrUndefined(displayProductUpdatesSessionData)) {\r\n this._setSessionStorageValueForShowingRecentUpdates(true);\r\n displayProductUpdatesSessionData = sessionStorage.getItem(\r\n 'TEMPORARY_SHOW_UPDATES_MODAL',\r\n );\r\n }\r\n\r\n if (localStorageData.show && localStorageData.show === true) {\r\n if (\r\n displayProductUpdatesSessionData &&\r\n displayProductUpdatesSessionData === 'true'\r\n ) {\r\n this.setState({ showRecentUpdatesModal: true });\r\n }\r\n } else {\r\n this._setSessionStorageValueForShowingRecentUpdates(false);\r\n }\r\n }\r\n } catch (error) {\r\n this._setLocalStorageValueForShowingRecentUpdates(true);\r\n this._setSessionStorageValueForShowingRecentUpdates(true);\r\n this.setState({ showRecentUpdatesModal: true });\r\n }\r\n }\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { omniaEngagement, location, push } = this.props;\r\n if (\r\n prevState.refHomePageRight !== this.homePageRightRef.current ||\r\n prevState.refProjectList !== this.projectListRef.current\r\n ) {\r\n this.setState({\r\n refProjectList: this.projectListRef.current,\r\n refHomePageRight: this.homePageRightRef.current,\r\n });\r\n }\r\n const omniaToken = queryString.parse(location.search);\r\n // store the engagementId in session will need later\r\n sessionStorage.setItem('omEngagementId', omniaEngagement.getEngagementId());\r\n /** Navigate directly to homepage when there is an omnia token present, an omnia engagement was already linked and there are projects associated to current user */\r\n if (\r\n omniaToken.token &&\r\n omniaEngagement.hasOmniaEngagementBeenLinked() &&\r\n omniaEngagement.areThereTieoutEngagementEntities()\r\n ) {\r\n push(ROUTE_CONSTANTS.HOME_PAGE);\r\n } else if (\r\n prevProps.omniaEngagement !== omniaEngagement &&\r\n !isNullOrUndefined(omniaEngagement.omniaEngagementEntity) &&\r\n omniaEngagement.areThereTieoutEngagementEntities()\r\n ) {\r\n this.setState({ showConfirmModal: true });\r\n }\r\n }\r\n\r\n _navigateToOmniaEngagementPage = () => {\r\n const { push } = this.props;\r\n push(ROUTE_CONSTANTS.OMNIA_ENGAGEMENT_PAGE);\r\n };\r\n\r\n render() {\r\n const {\r\n showConfirmModal,\r\n showRecentUpdatesModal,\r\n OptanonAlertBoxClosedCookie,\r\n } = this.state;\r\n const { push } = this.props;\r\n const isNotChrome = !isGoogleChrome();\r\n return (\r\n \r\n \r\n {isNotChrome && (\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 {showConfirmModal && (\r\n this._navigateToOmniaEngagementPage()}\r\n onClickNo={() => {\r\n push(ROUTE_CONSTANTS.HOME_PAGE);\r\n this.setState({ showConfirmModal: false });\r\n }}\r\n />\r\n )}\r\n {showRecentUpdatesModal &&\r\n /**We want to check if deloitte cookie consent notice is already shown.\r\n * If it is not shown then we do not want to want to show recent- update modal\r\n * Since it would stack over the cookie notice modal.\r\n */\r\n (!window.TIEOUT.ENV.FEATURE.ENABLE_COOKIE_CONSENT_NOTIFICATION ||\r\n // If cookies is explicitly disabled then don't check if it is shown or not\r\n OptanonAlertBoxClosedCookie) && (\r\n {\r\n this.setState({ showRecentUpdatesModal: false });\r\n this._setSessionStorageValueForShowingRecentUpdates(false);\r\n }}\r\n onSave={() => {\r\n this._setLocalStorageValueForShowingRecentUpdates(false);\r\n this._setSessionStorageValueForShowingRecentUpdates(false);\r\n this.setState({ showRecentUpdatesModal: false });\r\n }}\r\n />\r\n )}\r\n \r\n
          \r\n \r\n );\r\n }\r\n}\r\n\r\nHomePage.propTypes = {\r\n /** On unmount clears all page specific redux store data */\r\n cleanUpHomePageStore: PropTypes.func.isRequired,\r\n /** Redux action to verify the omnia token from browser */\r\n verifyOmniaTokenAndGetEngagement: PropTypes.func.isRequired,\r\n /** the omnia engagement obj */\r\n omniaEngagement: PropTypes.instanceOf(OmniaEngagement).isRequired,\r\n};\r\n\r\nexport default HomePage;\r\n","export function isGoogleChrome() {\r\n const isChromium = window.chrome;\r\n const winNav = window.navigator;\r\n const vendorName = winNav.vendor;\r\n const isOpera = typeof window.opr !== 'undefined';\r\n const isIEedge = winNav.userAgent.indexOf('Edge') > -1;\r\n const isIOSChrome = winNav.userAgent.match('CriOS');\r\n return (\r\n isIOSChrome ||\r\n (isChromium !== null &&\r\n typeof isChromium !== 'undefined' &&\r\n vendorName === 'Google Inc.' &&\r\n isOpera === false &&\r\n isIEedge === false)\r\n );\r\n}\r\n","import { connect } from 'react-redux';\r\nimport { injectIntl } from 'react-intl';\r\n\r\nimport HomePage from 'pages/home-page';\r\n\r\nimport { cleanUpHomePageStore } from 'store/actions/homepage-actions';\r\nimport { verifyOmniaTokenAndGetEngagement } from 'store/actions/omnia-engagement-actions';\r\n\r\nimport { push } from 'connected-react-router';\r\n\r\nconst mapStateToProps = ({ data: { omniaEngagement } }) => ({\r\n omniaEngagement,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n cleanUpHomePageStore,\r\n push,\r\n verifyOmniaTokenAndGetEngagement,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(injectIntl(HomePage));\r\n","import { clearStatementList } from 'store/actions/statement-list/statement-list-actions';\r\nimport { clearProjectIdWorkflowExpanded } from 'store/actions/statement-workflows-actions';\r\nimport { initStatementListFilters } from 'store/actions/statement-list/statement-list-filters-actions';\r\n\r\n/**\r\n * TODO Refactor to a single action that is listend for in all of these reducers\r\n */\r\nexport const cleanUpHomePageStore = () => (dispatch) => {\r\n dispatch(clearStatementList());\r\n dispatch(clearProjectIdWorkflowExpanded());\r\n dispatch(initStatementListFilters());\r\n};\r\n","import React, { memo } from 'react';\r\n\r\nconst CARD_BLOCK = 'card';\r\n\r\nconst Card = ({ children }) => {\r\n return
          {children}
          ;\r\n};\r\n\r\nexport default memo(Card);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Create-a-project\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"DG-TieOut-|-Create-a-Project-|-First-Section-Legal-Hold-Enabled\",\n transform: \"translate(-62.000000, -206.000000)\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Tick\",\n transform: \"translate(62.000000, 206.000000)\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 22,\n height: 22\n}), React.createElement(\"g\", {\n id: \"checkmark\",\n strokeWidth: 1,\n fillRule: \"evenodd\",\n fill: \"#009A44\"\n}, React.createElement(\"path\", {\n d: \"M11.0314286,0.105490683 C5.00397516,0.105490683 0.117515528,4.99195031 0.117515528,11.019677 C0.117515528,17.0471304 5.00397516,21.9337267 11.0314286,21.9337267 C17.058882,21.9337267 21.9453416,17.0471304 21.9453416,11.019677 C21.9453416,4.99195031 17.058882,0.105490683 11.0314286,0.105490683 Z M11.0314286,1.01500621 C16.5478261,1.01500621 21.0352795,5.50300621 21.0352795,11.019677 C21.0352795,16.5359379 16.5478261,21.0240745 11.0314286,21.0240745 C5.51503106,21.0240745 1.02621118,16.5359379 1.02621118,11.019677 C1.02621118,5.50300621 5.51503106,1.01500621 11.0314286,1.01500621 Z M17.2638509,6.60532919 C17.0862112,6.4275528 16.7992547,6.4275528 16.6216149,6.60532919 L7.84757764,15.3786832 L4.98621118,12.5171801 C4.80857143,12.3394037 4.52024845,12.3394037 4.3426087,12.5171801 C4.16496894,12.6946832 4.16496894,12.9824596 4.3426087,13.160236 L7.52645963,16.3434037 C7.6152795,16.432087 7.73142857,16.4764969 7.84757764,16.4764969 C7.96372671,16.4764969 8.08124224,16.432087 8.17006211,16.3434037 L17.2638509,7.24824845 C17.4414907,7.0706087 17.4414907,6.78296894 17.2638509,6.60532919 Z\",\n id: \"icon_success\"\n})))));\n\nvar SvgStepValid = function SvgStepValid(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"22px\",\n height: \"22px\",\n viewBox: \"0 0 22 22\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgStepValid, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/stepValid.3910f7a2.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { injectIntl } from 'react-intl';\r\n\r\nimport { ReactComponent as StepValid } from 'icons/stepValid.svg';\r\n\r\nconst PROGRESS_BAR_BLOCK = 'progress-bar-step';\r\n\r\nconst ProgressBarStep = ({ active, isValid, stepNum, intl }) => {\r\n return (\r\n
          \r\n
          \r\n \r\n \r\n {isValid ? : null}\r\n
          \r\n {`${intl.formatMessage({\r\n id: 'common.step',\r\n })} ${stepNum}`}
          \r\n \r\n
          \r\n
          \r\n );\r\n};\r\n\r\nProgressBarStep.propTypes = {\r\n /** Unique string id for component */\r\n id: PropTypes.string.isRequired,\r\n /** Bool representing if form section is currently focused */\r\n active: PropTypes.bool.isRequired,\r\n /** Bool representing if form section feilds are all valid */\r\n isValid: PropTypes.bool.isRequired,\r\n /** String representing step number */\r\n stepNum: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default injectIntl(memo(ProgressBarStep));\r\n","import BaseModel from 'models/base-model';\r\nexport default class Engagement extends BaseModel({\r\n active: null,\r\n cik: null,\r\n clientId: null,\r\n clientName: null,\r\n clientPrimaryInd: null,\r\n clientPrimarySector: null,\r\n clientType: null,\r\n engagementFye: null,\r\n engagementId: null,\r\n engagementName: null,\r\n secFilerStatus: null,\r\n tickerSymbol: null,\r\n}) {}\r\n","import ApiModel from 'models/api-model';\r\nimport Engagement from 'models/data/engagement-model';\r\n\r\nexport class EngagementList extends ApiModel({\r\n data: {\r\n engagementEntities: [], // type Project\r\n },\r\n status: null,\r\n}) {\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n engagementEntities: response.data.map(\r\n (entity) => new Engagement(entity),\r\n ),\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n getEngagementEntities() {\r\n if (this.data && this.data.engagementEntities) {\r\n return this.data.engagementEntities;\r\n }\r\n return [];\r\n }\r\n}\r\n","import React from 'react';\r\nimport moment from 'moment';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport {\r\n DataGridColumn,\r\n DataGridDropdownColumn,\r\n DataGridIconColumn,\r\n} from 'components/common/data-grid/data-grid-component';\r\nimport MultilineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport {\r\n USER_ROLE_OPTIONS_MAP,\r\n JOB_TYPES,\r\n} from 'constants/common/job-type-constants';\r\nimport { ReactComponent as XIcon } from 'icons/cross.svg';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const LEGAL_HOLD_TOOLTIP = new TooltipOptions({\r\n text: 'project-creation.project-info.legal-hold-verbiage',\r\n id: 'project-creation-id-tooltip-legal-hold',\r\n position: 'right',\r\n});\r\n\r\nexport const getMatDateFormat = (year) => {\r\n const currMonth = new Date().getMonth();\r\n const newDateFormat = new Date().setFullYear(year, currMonth + 1, 0);\r\n return newDateFormat;\r\n};\r\n\r\nexport const getMatEngagementYears = () => {\r\n const currYear = new Date().getFullYear();\r\n let year,\r\n index = 0;\r\n let years = [];\r\n for (year = currYear - 5; year < currYear; year++) {\r\n years.push(\r\n new MenuOption({\r\n id: index,\r\n title: year,\r\n value: getMatDateFormat(year),\r\n isIntl: false,\r\n }),\r\n );\r\n index++;\r\n }\r\n for (year = currYear; year < currYear + 6; year++) {\r\n years.push(\r\n new MenuOption({\r\n id: index,\r\n title: year,\r\n value: getMatDateFormat(year),\r\n isIntl: false,\r\n }),\r\n );\r\n index++;\r\n }\r\n return years;\r\n};\r\n\r\n// Backend ENUM ids\r\nexport const NON_AUDIT_REASON = {\r\n DEMO: 1,\r\n PURSUIT: 2,\r\n TESTING: 3,\r\n SUPPORT: 4,\r\n ASSURANCE: 5,\r\n OTHER: 6,\r\n};\r\n\r\nexport const NON_AUDIT_REASON_MAP = new Map();\r\nNON_AUDIT_REASON_MAP.set(\r\n NON_AUDIT_REASON.DEMO,\r\n new MenuOption({\r\n id: NON_AUDIT_REASON.DEMO,\r\n title: 'project-creation.non-audit-reason.option.demo',\r\n value: NON_AUDIT_REASON.DEMO,\r\n }),\r\n);\r\nNON_AUDIT_REASON_MAP.set(\r\n NON_AUDIT_REASON.PURSUIT,\r\n new MenuOption({\r\n id: NON_AUDIT_REASON.PURSUIT,\r\n title: 'project-creation.non-audit-reason.option.pursuit',\r\n value: NON_AUDIT_REASON.PURSUIT,\r\n }),\r\n);\r\nNON_AUDIT_REASON_MAP.set(\r\n NON_AUDIT_REASON.TESTING,\r\n new MenuOption({\r\n id: NON_AUDIT_REASON.TESTING,\r\n title: 'project-creation.non-audit-reason.option.testing',\r\n value: NON_AUDIT_REASON.TESTING,\r\n }),\r\n);\r\nNON_AUDIT_REASON_MAP.set(\r\n NON_AUDIT_REASON.SUPPORT,\r\n new MenuOption({\r\n id: NON_AUDIT_REASON.SUPPORT,\r\n title: 'project-creation.non-audit-reason.option.support',\r\n value: NON_AUDIT_REASON.SUPPORT,\r\n }),\r\n);\r\nNON_AUDIT_REASON_MAP.set(\r\n NON_AUDIT_REASON.ASSURANCE,\r\n new MenuOption({\r\n id: NON_AUDIT_REASON.ASSURANCE,\r\n title: 'project-creation.non-audit-reason.option.assurance',\r\n value: NON_AUDIT_REASON.ASSURANCE,\r\n }),\r\n);\r\nNON_AUDIT_REASON_MAP.set(\r\n NON_AUDIT_REASON.OTHER,\r\n new MenuOption({\r\n id: NON_AUDIT_REASON.OTHER,\r\n title: 'project-creation.non-audit-reason.option.other',\r\n value: NON_AUDIT_REASON.OTHER,\r\n }),\r\n);\r\n\r\nexport const NON_AUDIT_REASON_OPTIONS = Array.from(\r\n NON_AUDIT_REASON_MAP.values(),\r\n);\r\n\r\nexport const USER_SEARCH_COLUMNS = [\r\n new DataGridColumn({\r\n key: 'preferredFullName',\r\n header: 'project-creation.manage-users.user-heading.name',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-fullName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'email',\r\n header: 'project-creation.manage-users.user-heading.email',\r\n width: '30%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-email-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'title',\r\n header: 'project-creation.manage-users.user-heading.title',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-title-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'region',\r\n header: 'project-creation.manage-users.user-heading.region',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-region-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'officeDescription',\r\n header: 'project-creation.manage-users.user-heading.office',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-office-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n];\r\n\r\nexport const ENGAGEMENT_SEARCH_COLUMNS = [\r\n new DataGridColumn({\r\n key: 'engagementId',\r\n header: 'project-creation.project-info.engagement-heading.engagement-id',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `engagementId-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'clientName',\r\n header: 'project-creation.project-info.engagement-heading.client-name',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `clientName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'engagementName',\r\n header: 'project-creation.project-info.engagement-heading.engagement-name',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `engagementName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'engagementFye',\r\n header: 'project-creation.project-info.engagement-heading.fiscal-year',\r\n width: '25%',\r\n formatter: (rowData) => {\r\n return moment(rowData.engagementFye).format(DATE_FORMATS.YEAR);\r\n },\r\n }),\r\n];\r\n\r\nexport const getAddedUserColumns = ({ onRemoveClick }) => [\r\n new DataGridColumn({\r\n key: 'preferredFullName',\r\n header: 'project-creation.manage-users.user-heading.name',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `manage-users-fullName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'email',\r\n header: 'project-creation.manage-users.user-heading.email',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `manage-users-email-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'title',\r\n header: 'project-creation.manage-users.user-heading.title',\r\n width: '10%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `manage-users-title-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'region',\r\n header: 'project-creation.manage-users.user-heading.region',\r\n width: '10%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `manage-users-region-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'officeDescription',\r\n header: 'project-creation.manage-users.user-heading.office',\r\n width: '10%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `manage-users-office-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridDropdownColumn({\r\n key: 'jobType',\r\n header: 'project-creation.manage-users.user-heading.role',\r\n width: '20%',\r\n placeholder: 'project-creation.manage-users.role-dropdown.placeholder',\r\n isValid: (user) => {\r\n return user.jobType !== '' && !isNullOrUndefined(user.jobType);\r\n },\r\n options: (user) => {\r\n const commonRoleOptions = [\r\n USER_ROLE_OPTIONS_MAP[JOB_TYPES.PREPARER_REVIEWER],\r\n USER_ROLE_OPTIONS_MAP[JOB_TYPES.OBSERVER],\r\n USER_ROLE_OPTIONS_MAP[JOB_TYPES.ENGAGEMENT_OWNER],\r\n ];\r\n\r\n if (user.isPpmd) {\r\n return [...commonRoleOptions, USER_ROLE_OPTIONS_MAP[JOB_TYPES.PPMD]];\r\n }\r\n return commonRoleOptions;\r\n },\r\n }),\r\n new DataGridIconColumn({\r\n Icon: XIcon,\r\n iconHeight: '28px',\r\n iconWidth: '28px',\r\n onClick: onRemoveClick,\r\n }),\r\n];\r\n","import ApiModel from 'models/api-model';\r\nimport { JOB_TYPES } from 'constants/common/job-type-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { USER_ROLE_OPTIONS_MAP } from 'constants/common/job-type-constants';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport {\r\n getMatDateFormat,\r\n NON_AUDIT_REASON_MAP,\r\n} from 'constants/feature/project-creation-constants';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport moment from 'moment';\r\nimport Statement from 'models/data/statement-model';\r\nimport cloneDeep from 'lodash.clonedeep';\r\n\r\nexport const RESERVED_CLIENT_NAME = 'Tie out support';\r\nexport default class ProjectForm extends ApiModel({\r\n data: {\r\n active: null,\r\n adminGroupAddDate: null,\r\n coeGroupAddDate: null,\r\n adminGroupEnabledByUserName: null,\r\n techSupportAccess: false,\r\n supportId: null,\r\n resetSupportId: null,\r\n enabledTechSupportStatementList: [],\r\n resetEnabledTechSupportStatementList: [],\r\n coeGroupEnabledByUserName: null,\r\n cik: null,\r\n deleteDate: null,\r\n engagementEntity: null,\r\n hasAdminGroup: false,\r\n hasCoeGroup: false,\r\n id: null,\r\n geoCode: null,\r\n isNewClient: true,\r\n legalHold: false,\r\n name: '',\r\n symbol: null,\r\n sic: null,\r\n type: null,\r\n userEntities: [], // not of type [User] because we need the array to be of type MenuOption because this fills a dropdown\r\n auditClient: true,\r\n wrappedUpStatements: [],\r\n deletedStatements: [],\r\n activeStatements: [],\r\n failedStatements: [],\r\n containerCode: null,\r\n countryCode: null,\r\n countryOfIssuanceDropdownValue: null,\r\n statementsListForTechSupportOptions: [],\r\n resetStatementsListForTechSupportOptions: [],\r\n },\r\n isAuditClient: -1,\r\n /**\r\n * This is used for the permissions setup on toggling support team access when editing projects. We need to know if it has been\r\n * toggled as we want users to be able to toggle the support team access after they change it once for a better UX.\r\n */\r\n adminGroupHasBeenModified: false,\r\n techSupportAccessHasBeenModified: false,\r\n /**\r\n * This is used for the permissions setup on toggling coe team access when editing projects. We need to know if it has been\r\n * toggled as we want users to be able to toggle the coe team access after they change it once for a better UX.\r\n */\r\n coeGroupHasBeenModified: false,\r\n /**\r\n * This is used for the permissions setup on toggling legal hold when editing projects. We need to know if it has been\r\n * toggled as we want users to be able to toggle legal hold after they change it once for a better UX.\r\n */\r\n legalHoldHasBeenModified: false,\r\n clientNameEdited: false,\r\n nonAuditEngagementEntityDataHasBeenModified: false,\r\n}) {\r\n get engagementEntity() {\r\n return this.data.engagementEntity;\r\n }\r\n get name() {\r\n return this.data.name;\r\n }\r\n get legalHold() {\r\n return this.data.legalHold;\r\n }\r\n get hasAdminGroup() {\r\n return this.data.hasAdminGroup;\r\n }\r\n get techSupportAccess() {\r\n return this.data.techSupportAccess;\r\n }\r\n get supportId() {\r\n return this.data.supportId;\r\n }\r\n get enabledTechSupportStatementList() {\r\n return this.data.enabledTechSupportStatementList;\r\n }\r\n get statementsListForTechSupportOptions() {\r\n return this.data.statementsListForTechSupportOptions;\r\n }\r\n get hasCoeGroup() {\r\n return this.data.hasCoeGroup;\r\n }\r\n get userEntities() {\r\n if (this.data && this.data.userEntities) {\r\n return this.data.userEntities;\r\n }\r\n return [];\r\n }\r\n get id() {\r\n return this.data.id;\r\n }\r\n get engagementFye() {\r\n if (this.data && this.data.engagementEntity) {\r\n return this.data.engagementEntity.engagementFye;\r\n }\r\n return null;\r\n }\r\n get nonAuditReason() {\r\n if (this.data && this.data.engagementEntity) {\r\n return this.data.engagementEntity.nonAuditReason;\r\n }\r\n return null;\r\n }\r\n get auditClient() {\r\n return this.data.auditClient;\r\n }\r\n get clientName() {\r\n if (this.data && this.data.engagementEntity) {\r\n return this.data.engagementEntity.clientName;\r\n }\r\n return null;\r\n }\r\n get engagementName() {\r\n if (this.data && this.data.engagementEntity) {\r\n return this.data.engagementEntity.engagementName;\r\n }\r\n return null;\r\n }\r\n get adminGroupAddDate() {\r\n if (this.data && this.data.adminGroupAddDate) {\r\n return moment\r\n .utc(this.data.adminGroupAddDate)\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR);\r\n }\r\n return null;\r\n }\r\n get coeGroupAddDate() {\r\n if (this.data && this.data.coeGroupAddDate) {\r\n return moment\r\n .utc(this.data.coeGroupAddDate)\r\n .format(DATE_FORMATS.MONTH_DAY_YEAR);\r\n }\r\n return null;\r\n }\r\n\r\n get adminGroupEnabledByUserName() {\r\n if (this.data && this.data.adminGroupEnabledByUserName) {\r\n return this.data.adminGroupEnabledByUserName;\r\n }\r\n return null;\r\n }\r\n\r\n get coeGroupEnabledByUserName() {\r\n if (this.data && this.data.coeGroupEnabledByUserName) {\r\n return this.data.coeGroupEnabledByUserName;\r\n }\r\n return null;\r\n }\r\n\r\n get activeStatements() {\r\n return this.data.activeStatements;\r\n }\r\n get failedStatements() {\r\n return this.data.failedStatements;\r\n }\r\n get wrappedUpStatements() {\r\n return this.data.wrappedUpStatements;\r\n }\r\n get deletedStatements() {\r\n return this.data.deletedStatements;\r\n }\r\n\r\n get containerCode() {\r\n return this.data.containerCode;\r\n }\r\n\r\n get countryOfIssuanceDropdownValue() {\r\n return this.data.countryOfIssuanceDropdownValue;\r\n }\r\n\r\n get countryCode() {\r\n return this.data.countryCode;\r\n }\r\n\r\n getContainerCodeDropdownValue(countryOfIssuanceDropdownValue) {\r\n const [containerCode, countryCode] =\r\n countryOfIssuanceDropdownValue.value.split('-');\r\n return { countryCode, containerCode };\r\n }\r\n\r\n toApiFormat() {\r\n let tickerSymbol = 'N/A';\r\n if (\r\n !isNullOrUndefined(this.data.engagementEntity) &&\r\n !isNullOrUndefined(this.data.engagementEntity.tickerSymbol) &&\r\n this.data.engagementEntity.tickerSymbol !== 'NULL'\r\n ) {\r\n tickerSymbol = this.data.engagementEntity.tickerSymbol;\r\n }\r\n if (this.data) {\r\n const { countryCode, containerCode } = this.getContainerCodeDropdownValue(\r\n this.data.countryOfIssuanceDropdownValue,\r\n );\r\n return {\r\n ...this.data,\r\n id: this.data.id ? parseInt(this.data.id) : null,\r\n legalHold: this.data.legalHold ? 1 : 0,\r\n userEntities: this.data.userEntities.map((user) => ({\r\n ...user,\r\n jobType: this.getDropdownValue(user.jobType),\r\n })),\r\n symbol: tickerSymbol,\r\n engagementEntity: {\r\n ...this.data.engagementEntity,\r\n engagementFye:\r\n typeof this.engagementEntity.engagementFye === 'object'\r\n ? this.getDropdownValue(this.data.engagementEntity.engagementFye)\r\n : this.data.engagementEntity.engagementFye,\r\n nonAuditReason: this.data.engagementEntity.nonAuditReason\r\n ? this.getDropdownValue(this.data.engagementEntity.nonAuditReason)\r\n : null,\r\n },\r\n supportId: this.data.techSupportAccess ? this.data.supportId : null,\r\n disabledTechSupportStatements: this.getDisabledStatementsByResponse(\r\n this.data,\r\n ),\r\n enabledTechSupportStatements:\r\n this.data.techSupportAccess && this.techSupportAccessHasBeenModified\r\n ? this.data.enabledTechSupportStatementList.map((item) => item.id)\r\n : [],\r\n isAuditClient: this.isAuditClient,\r\n activeStatements: this.activeStatements,\r\n wrappedUpStatements: this.wrappedUpStatements,\r\n deletedStatements: this.deletedStatements,\r\n failedStatements: this.failedStatements,\r\n containerCode: containerCode ? containerCode : null,\r\n countryCode: countryCode ? countryCode : null,\r\n };\r\n }\r\n }\r\n\r\n // returns the isSelected statement id's which was previously enabled for tech support access\r\n getDisabledStatementsByResponse(statementData) {\r\n const techSupportData = this.getTechSupportDropdownData(statementData);\r\n\r\n const disabledIds = techSupportData\r\n .filter((item) => item.isSelected && !item.isLabel)\r\n .map((item) => item.id);\r\n\r\n const enabledIds = statementData.enabledTechSupportStatementList.map(\r\n (item) => item.id,\r\n );\r\n\r\n return enabledIds.length\r\n ? disabledIds.filter((element) => !enabledIds.includes(element))\r\n : disabledIds;\r\n }\r\n\r\n isInitialized() {\r\n return !isNullOrUndefined(this.data.id);\r\n }\r\n\r\n getProjectData() {\r\n if (this.data) {\r\n return this.data;\r\n }\r\n }\r\n\r\n get geoCode() {\r\n return this.data.geoCode;\r\n }\r\n\r\n processResponse({ response }) {\r\n //this if statement is necessary because of the the inconsistent returned api data structure\r\n if (response && response.data && !response.data.result) {\r\n const fiscalYear =\r\n response &&\r\n response.data &&\r\n response.data.engagementEntity &&\r\n moment(response.data.engagementEntity.engagementFye).format(\r\n DATE_FORMATS.YEAR,\r\n );\r\n // tech/developer access dropdown options.\r\n const techSupportDropdownOptions = this.getTechSupportDropdownData(\r\n response.data,\r\n );\r\n // filtering statements list which already enabled for tech/developer access\r\n const alreadyTechSupportEnabledStatementsData =\r\n this.getEnabledTechSupportStatementByResponse(\r\n techSupportDropdownOptions,\r\n );\r\n // getting supportId from first tech/developer access enabled statement\r\n const supportIdFromTechSupportEnabledStatement =\r\n this.getSupportIdFromStatementLevel(\r\n alreadyTechSupportEnabledStatementsData,\r\n 'supportId',\r\n );\r\n return {\r\n data: {\r\n ...response.data,\r\n id: `${parseInt(response.data.id)}-${response.data.geoCode}`,\r\n userEntities: response.data.userEntities.map((user) => ({\r\n ...user,\r\n jobType: USER_ROLE_OPTIONS_MAP[user.jobType],\r\n })),\r\n legalHold: response.data.legalHold === 0 ? false : true,\r\n hasCoeGroup: response.data.hasCoeGroup ? true : false, // If undefined or null, then it will be set to false.\r\n wrappedUpStatements: response.data.wrappedUpStatements\r\n ? response.data.wrappedUpStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n deletedStatements: response.data.deletedStatements\r\n ? response.data.deletedStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n activeStatements: response.data.activeStatements\r\n ? response.data.activeStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n failedStatements: response.data.failedStatements\r\n ? response.data.failedStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n engagementEntity: {\r\n ...response.data.engagementEntity,\r\n nonAuditReason: NON_AUDIT_REASON_MAP.get(\r\n response.data.engagementEntity.nonAuditReason,\r\n ),\r\n engagementFye: response.data.auditClient\r\n ? response.data.engagementEntity.engagementFye\r\n : new MenuOption({\r\n id: fiscalYear,\r\n title: fiscalYear,\r\n value: getMatDateFormat(fiscalYear),\r\n isIntl: false,\r\n }),\r\n },\r\n supportId: supportIdFromTechSupportEnabledStatement,\r\n statementsListForTechSupportOptions: techSupportDropdownOptions, // getting the list of statements that are available accross the different status\r\n resetStatementsListForTechSupportOptions: techSupportDropdownOptions,\r\n enabledTechSupportStatementList:\r\n alreadyTechSupportEnabledStatementsData, // getting the list of tech support enabled statements that are available accross the different status\r\n resetSupportId: response.data.techSupportAccess\r\n ? supportIdFromTechSupportEnabledStatement\r\n : null,\r\n resetEnabledTechSupportStatementList:\r\n response.data.techSupportAccess &&\r\n alreadyTechSupportEnabledStatementsData\r\n ? alreadyTechSupportEnabledStatementsData\r\n : [], // used to reset the modified tech support statements list when user clicked on cancel or close model.\r\n },\r\n nonAuditEngagementEntityDataHasBeenModified: false,\r\n status: response.status,\r\n };\r\n } else {\r\n return {\r\n status: response.status,\r\n };\r\n }\r\n }\r\n\r\n resetEnabledTechSupportStatementListData() {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n enabledTechSupportStatementList:\r\n this.data.resetEnabledTechSupportStatementList,\r\n supportId: this.data.resetSupportId,\r\n statementsListForTechSupportOptions:\r\n this.data.resetStatementsListForTechSupportOptions,\r\n },\r\n techSupportAccessHasBeenModified: false,\r\n });\r\n }\r\n\r\n getSupportIdFromStatementLevel(data, key) {\r\n // Check if array is empty\r\n if (!data.length) {\r\n return null;\r\n }\r\n\r\n // Extract first supportId value if any developer access enabled statement\r\n return data.filter((obj) => obj[key])[0][key];\r\n }\r\n\r\n // return an array by merge all the list of statements(having different status) for statementList dropdown in developer support modal dropdown\r\n getTechSupportDropdownData(statementData) {\r\n return [\r\n ...this.transformArray(\r\n statementData.activeStatements\r\n ? statementData.activeStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n 'project-edit.manage-legal-hold-active-card.title',\r\n 1,\r\n ),\r\n ...this.transformArray(\r\n statementData.wrappedUpStatements\r\n ? statementData.wrappedUpStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n 'project-edit.manage-legal-hold-wrapped-card.title',\r\n 2,\r\n ),\r\n ...this.transformArray(\r\n statementData.deletedStatements\r\n ? statementData.deletedStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n 'project-edit.manage-legal-hold-deleted-card.title',\r\n 3,\r\n ),\r\n ...this.transformArray(\r\n statementData.failedStatements\r\n ? statementData.failedStatements.map(\r\n (statement) => new Statement(statement),\r\n )\r\n : [],\r\n 'project-edit.manage-legal-hold-failed-card.title',\r\n 3,\r\n ),\r\n ];\r\n }\r\n\r\n // returns an array from the all statements by tech support is enabled which was based on techsupportaccess from individual statement\r\n getEnabledTechSupportStatementByResponse(statementData) {\r\n return statementData.filter((item) => item.isSelected);\r\n }\r\n\r\n // returns an array by category (generic method to get based on category attribute)\r\n transformArray = (arr, category, id) => {\r\n if (arr.length) {\r\n let newArr = arr.map((item) => ({\r\n id: item.id,\r\n title: item.statementName,\r\n value: item.id,\r\n isCheckboxRequired: true,\r\n isSelected: item.techSupportAccess,\r\n supportId: item.supportId,\r\n isIntl: false,\r\n }));\r\n newArr.unshift({\r\n id: id,\r\n title: category,\r\n value: category,\r\n isIntl: true,\r\n isLabel: true,\r\n });\r\n\r\n return newArr;\r\n }\r\n return [];\r\n };\r\n\r\n /**\r\n * Initializes the first user added to a project as the current user and sets their role as engagement owner\r\n * @param {CurrentUser} currentUser\r\n */\r\n initCurrentUser(currentUser) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n userEntities: [\r\n {\r\n ...currentUser,\r\n jobType: USER_ROLE_OPTIONS_MAP[JOB_TYPES.ENGAGEMENT_OWNER],\r\n },\r\n ],\r\n },\r\n });\r\n }\r\n\r\n addUser(user) {\r\n const _userAlreadyAdded = this.data.userEntities.find(\r\n (alreadyAddedUser) => alreadyAddedUser.id === user.id,\r\n );\r\n if (_userAlreadyAdded) {\r\n // ensure no duplicate users are added\r\n return this;\r\n }\r\n return this.merge({\r\n data: { ...this.data, userEntities: [user, ...this.data.userEntities] },\r\n });\r\n }\r\n\r\n removeUser(userToRemove) {\r\n const userEntities = this.data.userEntities.filter(\r\n (user) => userToRemove.id !== user.id,\r\n );\r\n return this.merge({\r\n data: { ...this.data, userEntities },\r\n });\r\n }\r\n\r\n /**\r\n * Assigns the user for given userId the given role on this project\r\n * @param {string|number} param0.userId id of user to assign role to\r\n * @param {string} param0.role role value to assign to user. should be one of the JOB_TYPES constants\r\n */\r\n assignRoleToUser({ userId, role }) {\r\n const userEntities = this.data.userEntities.map((curUser) => {\r\n if (curUser.id === userId) {\r\n return {\r\n ...curUser,\r\n jobType: role,\r\n };\r\n }\r\n return curUser;\r\n });\r\n\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n userEntities,\r\n },\r\n });\r\n }\r\n setName(name) {\r\n return this.merge({\r\n data: { ...this.data, name },\r\n });\r\n }\r\n\r\n setEngagementEntity(engagementEntity) {\r\n return this.merge({\r\n isAuditClient: 1,\r\n data: { ...this.data, engagementEntity },\r\n });\r\n }\r\n\r\n setLegalHold(legalHold) {\r\n return this.merge({\r\n data: { ...this.data, legalHold },\r\n legalHoldHasBeenModified: true,\r\n });\r\n }\r\n setActiveStatements(activeStatements) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n activeStatements,\r\n },\r\n });\r\n }\r\n setWrappedUpStatements(wrappedUpStatements) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n wrappedUpStatements,\r\n },\r\n });\r\n }\r\n setDeletedStatements(deletedStatements) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n deletedStatements,\r\n },\r\n });\r\n }\r\n containsUser(compareUser) {\r\n return this.userEntities.find((user) => user.id === compareUser.id);\r\n }\r\n\r\n isEngagementOwnerUserAdded() {\r\n return !isNullOrUndefined(\r\n this.data.userEntities.find(\r\n (user) =>\r\n user.jobType && user.jobType.value === JOB_TYPES.ENGAGEMENT_OWNER,\r\n ),\r\n );\r\n }\r\n isPpmdUserAdded() {\r\n return !isNullOrUndefined(\r\n this.data.userEntities.find(\r\n (user) => user.jobType && user.jobType.value === JOB_TYPES.PPMD,\r\n ),\r\n );\r\n }\r\n\r\n /**\r\n * Ensures all users added to project are assigned roles and PPMD and Engagement Owner are also added\r\n */\r\n _allUsersHaveAppropriateRoles() {\r\n const roleSet = new Set();\r\n let allUsersHaveRoles = true;\r\n for (let user of this.data.userEntities) {\r\n const userHasRole = user.jobType && user.jobType.value;\r\n if (!userHasRole) {\r\n allUsersHaveRoles = false;\r\n break;\r\n }\r\n roleSet.add(user.jobType.value);\r\n }\r\n return (\r\n allUsersHaveRoles &&\r\n roleSet.has(JOB_TYPES.PPMD) &&\r\n roleSet.has(JOB_TYPES.ENGAGEMENT_OWNER)\r\n );\r\n }\r\n\r\n toggleHasAdminGroup() {\r\n return this.merge({\r\n data: { ...this.data, hasAdminGroup: !this.data.hasAdminGroup },\r\n adminGroupHasBeenModified: true,\r\n });\r\n }\r\n\r\n // updated the techsupport access boolean value\r\n toggleTechSupportAccess() {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n techSupportAccess:\r\n this.data.enabledTechSupportStatementList.length &&\r\n this.data.supportId\r\n ? true\r\n : false,\r\n },\r\n techSupportAccessHasBeenModified: true,\r\n });\r\n }\r\n\r\n disableTechSupportAccess() {\r\n const modifyStatementsListForTechSupport =\r\n this.data.statementsListForTechSupportOptions.map((item) => {\r\n return { ...item, isSelected: false };\r\n });\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n techSupportAccess: false,\r\n supportId: null,\r\n enabledTechSupportStatementList: [],\r\n statementsListForTechSupportOptions: modifyStatementsListForTechSupport,\r\n },\r\n });\r\n }\r\n\r\n //sets the support id for tech support access\r\n setSupportId(value) {\r\n return this.merge({\r\n data: { ...this.data, supportId: value || null },\r\n });\r\n }\r\n\r\n // return an array by filtering the tech support enabled statments\r\n getEnabledTechSupportStatementById(id) {\r\n return this.data.enabledTechSupportStatementList.filter(\r\n (item) => item.id === id,\r\n );\r\n }\r\n\r\n // add selected statement to enable tech support and if statement already exists then it ignores in the list\r\n setEnabledTechSupportStatementList(statement) {\r\n const isStatementExist = this.getEnabledTechSupportStatementById(\r\n statement.id,\r\n ).length;\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n enabledTechSupportStatementList:\r\n isStatementExist === 0\r\n ? this.data.enabledTechSupportStatementList.concat(statement)\r\n : this.data.enabledTechSupportStatementList.filter(\r\n (item) => item.id !== statement.id,\r\n ),\r\n statementsListForTechSupportOptions:\r\n this.modifySelectableTechSupportStatements(statement, true),\r\n },\r\n });\r\n }\r\n\r\n // remove the statement data from already enabled tech support statements data\r\n removeSelectedTechSupportStatement(statement) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n enabledTechSupportStatementList:\r\n this.data.enabledTechSupportStatementList.filter(\r\n (item) => item.id !== statement.id,\r\n ),\r\n statementsListForTechSupportOptions:\r\n this.modifySelectableTechSupportStatements(statement, false),\r\n },\r\n });\r\n }\r\n\r\n modifySelectableTechSupportStatements(statement, isSelection) {\r\n return this.data.statementsListForTechSupportOptions.map((item) => {\r\n return item.id === statement.id\r\n ? { ...item, isSelected: isSelection ? !item.isSelected : false }\r\n : item;\r\n });\r\n }\r\n\r\n toggleHasCoeGroup() {\r\n return this.merge({\r\n data: { ...this.data, hasCoeGroup: !this.data.hasCoeGroup },\r\n coeGroupHasBeenModified: true,\r\n });\r\n }\r\n\r\n hasAdminGroupBeenModified() {\r\n return this.adminGroupHasBeenModified;\r\n }\r\n hasTechSupportAccessHasBeenModified() {\r\n return this.techSupportAccessHasBeenModified;\r\n }\r\n\r\n hasCoeGroupBeenModified() {\r\n return this.coeGroupHasBeenModified;\r\n }\r\n\r\n hasLegalHoldBeenModified() {\r\n return this.legalHoldHasBeenModified;\r\n }\r\n\r\n isStepOneValid() {\r\n const {\r\n name,\r\n engagementEntity,\r\n auditClient,\r\n countryOfIssuanceDropdownValue,\r\n } = this.data;\r\n if (\r\n auditClient &&\r\n name &&\r\n engagementEntity &&\r\n engagementEntity.clientName &&\r\n engagementEntity.engagementFye &&\r\n engagementEntity.engagementName &&\r\n countryOfIssuanceDropdownValue &&\r\n // for invalid data user is going to see empty dropdown\r\n countryOfIssuanceDropdownValue.title\r\n ) {\r\n /** Disable save if engagementFye contains an obj. In this scenario project is audit client and engagementEntity contains obj of non audit: In this case let the user reset the values by performing another search */\r\n if (engagementEntity.engagementFye instanceof MenuOption) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n if (\r\n !auditClient &&\r\n name &&\r\n engagementEntity &&\r\n engagementEntity.clientName &&\r\n engagementEntity.engagementName &&\r\n engagementEntity.engagementFye &&\r\n engagementEntity.nonAuditReason &&\r\n countryOfIssuanceDropdownValue\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n isStepTwoValid() {\r\n return this._allUsersHaveAppropriateRoles();\r\n }\r\n\r\n isProjectValid() {\r\n return this.isStepOneValid() && this.isStepTwoValid();\r\n }\r\n\r\n isClientNameValid() {\r\n if (this.engagementEntity && this.engagementEntity.clientName) {\r\n return (\r\n this.engagementEntity.clientName\r\n .toLowerCase()\r\n .indexOf(RESERVED_CLIENT_NAME.toLowerCase()) < 0\r\n );\r\n }\r\n return true;\r\n }\r\n\r\n initNotAuditClient(checked) {\r\n const currentYear = new Date().getFullYear();\r\n\r\n const engagementFyeClone = cloneDeep(this.data.engagementEntity);\r\n\r\n return this.merge({\r\n isAuditClient: checked ? 0 : -1,\r\n data: {\r\n ...this.data,\r\n auditClient: !this.data.auditClient,\r\n engagementEntity: {\r\n ...this.data.engagementEntity,\r\n engagementFye:\r\n this.data.isNewClient || !engagementFyeClone\r\n ? new MenuOption({\r\n id: currentYear,\r\n value: getMatDateFormat(currentYear),\r\n title: currentYear,\r\n isIntl: false,\r\n })\r\n : new MenuOption({\r\n id: this.data.engagementEntity.id,\r\n value:\r\n typeof engagementFyeClone.engagementFye === 'string'\r\n ? engagementFyeClone.engagementFye\r\n : this.getDropdownValue(engagementFyeClone.engagementFye),\r\n title: moment(\r\n this.data.engagementEntity.engagementFye,\r\n ).format(DATE_FORMATS.YEAR),\r\n isIntl: false,\r\n }),\r\n },\r\n },\r\n });\r\n }\r\n\r\n setClientName(clientName) {\r\n return this.merge({\r\n isAuditClient: 0,\r\n clientNameEdited: true,\r\n data: {\r\n ...this.data,\r\n engagementEntity: { ...this.data.engagementEntity, clientName },\r\n },\r\n });\r\n }\r\n\r\n setEngagementName(engagementName) {\r\n return this.merge({\r\n isAuditClient: 0,\r\n data: {\r\n ...this.data,\r\n engagementEntity: { ...this.data.engagementEntity, engagementName },\r\n },\r\n });\r\n }\r\n\r\n setNonAuditEngagementEntityDataHasBeenModified(\r\n nonAuditEngagementEntityDataHasBeenModified,\r\n ) {\r\n return this.merge({\r\n nonAuditEngagementEntityDataHasBeenModified,\r\n data: {\r\n ...this.data,\r\n },\r\n });\r\n }\r\n\r\n setEngagementFye(engagementFye) {\r\n return this.merge({\r\n isAuditClient: 0,\r\n data: {\r\n ...this.data,\r\n engagementEntity: { ...this.data.engagementEntity, engagementFye },\r\n },\r\n });\r\n }\r\n\r\n setNonAuditReason(nonAuditReason) {\r\n return this.merge({\r\n isAuditClient: 0,\r\n data: {\r\n ...this.data,\r\n engagementEntity: { ...this.data.engagementEntity, nonAuditReason },\r\n },\r\n });\r\n }\r\n\r\n setCountryOfIssuanceDropdownValue(country) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n countryOfIssuanceDropdownValue: country,\r\n },\r\n });\r\n }\r\n}\r\n","import {\r\n withDefaultContextAsProject,\r\n withDefaultContextAsHomeGeo,\r\n} from 'api/api-default-context';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { CONTEXT_KEY } from './api-client';\r\n\r\nexport const getEngagementEntitiesRequest = (searchTerm) =>\r\n withDefaultContextAsHomeGeo()\r\n .get('/tieout/searchengagements', {\r\n params: {\r\n searchTerm,\r\n },\r\n })\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const getUserListRequest = ({\r\n clientId,\r\n searchString,\r\n pageNumber,\r\n numberOfRows,\r\n memberFirmCode,\r\n}) => {\r\n // for admin page client id is going to be 0 and for create project page it is 0.\r\n // Hence for those cases we want this request to be fired in users Home Geo\r\n let contextKey =\r\n isNullOrUndefined(clientId) || clientId === -1 || clientId === 0\r\n ? CONTEXT_KEY.HOME_GEO_CONTEXT\r\n : null;\r\n return withDefaultContextAsProject({ contextKey }, clientId)\r\n .post(\r\n '/tieout/user/search',\r\n {\r\n searchString,\r\n pageNumber,\r\n numberOfRows,\r\n memberFirmCode,\r\n },\r\n {\r\n params: {\r\n clientId: parseInt(clientId),\r\n },\r\n },\r\n )\r\n .then((response) => {\r\n return response;\r\n });\r\n};\r\n\r\nexport const createNewProjectRequest = (project) =>\r\n withDefaultContextAsHomeGeo()\r\n .post('/tieout/clients', project.toApiFormat())\r\n .then((response) => {\r\n return response;\r\n });\r\n\r\nexport const editProjectRequest = (project, contextKey) => {\r\n return withDefaultContextAsProject({ contextKey }, project.data.id)\r\n .post('/tieout/client/update', project.toApiFormat())\r\n .then((response) => {\r\n response.data.id = project.id;\r\n return response;\r\n });\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport TextInput from 'components/common/text-input-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport {\r\n NON_AUDIT_REASON_OPTIONS,\r\n getMatEngagementYears,\r\n} from 'constants/feature/project-creation-constants';\r\n\r\nexport const NON_AUDIT_INPUT_BLOCK = 'non-audit-textarea';\r\nconst NON_AUDIT_INPUT_ID_BLOCK = 'non-audit-textarea-id';\r\n\r\nconst ProjectCreationNonAuditInputArea = ({\r\n setClientName,\r\n setEngagementName,\r\n setEngagementFye,\r\n projectInProgress,\r\n setNonAuditReason,\r\n}) => {\r\n return (\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\nProjectCreationNonAuditInputArea.propTypes = {\r\n /** Function to set the client name */\r\n setClientName: PropTypes.func.isRequired,\r\n /** Function to set the engagement name */\r\n setEngagementName: PropTypes.func.isRequired,\r\n /** Function to set the fiscal year */\r\n setEngagementFye: PropTypes.func.isRequired,\r\n /** Object that contains working data for form before submission*/\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n};\r\n\r\nexport default ProjectCreationNonAuditInputArea;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport Card from 'components/common/card-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport { ReactComponent as InfoIcon } from 'icons/icon-information-tooltip.svg';\r\nimport { SearchTableDropdownApi } from 'components/common/search-component';\r\nimport ProgressBarStep from 'components/common/progress-bar-step-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { EngagementList } from 'models/api/engagement-list-model';\r\nimport { DataGridDataApi } from 'components/common/data-grid/data-grid-component';\r\nimport { BACKSPACE_KEY_CODE } from 'constants/util/key-code-constants';\r\n\r\nimport { ENGAGEMENT_SEARCH_COLUMNS } from 'constants/feature/project-creation-constants';\r\nimport {\r\n debounceSearch,\r\n getSearchFormattedEngagementEntity,\r\n isSearchCharLengthValid,\r\n} from 'constants/util/search-utility';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport { getEngagementEntitiesRequest } from 'api/project-creation-edit-api';\r\nimport Switch from 'react-switch';\r\nimport NonAuditInputArea from 'components/feature/project-creation/project-info/_project-creation-project-info-non-audit-text-input';\r\nimport { doesUserExistInAMERegion } from 'utils/project-utils';\r\n\r\nexport const PROJECT_INFO_BLOCK = 'project-info';\r\nconst PROJECT_INFO_ID_BLOCK = 'id-project-info';\r\nconst SWITCH_HEIGHT = 20;\r\nconst SWITCH_WIDTH = 45;\r\n\r\nclass ProjectInfo extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n search: '',\r\n engagementEntities: new EngagementList(),\r\n };\r\n // do not call this function directly, call _searchUser, which uses the debounced version of this function\r\n this.debouncedSearch = debounceSearch(this._fetchEngagementEntities);\r\n }\r\n\r\n componentDidMount() {\r\n const { setIsAuditClient } = this.props;\r\n const isAMERegion = doesUserExistInAMERegion();\r\n if (!isAMERegion) {\r\n setIsAuditClient(false);\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { projectInProgress } = this.props;\r\n if (\r\n prevProps.projectInProgress !== projectInProgress &&\r\n !projectInProgress.isAuditClient\r\n ) {\r\n // reset the search field when switch has been turned on\r\n this.setState({ search: '' });\r\n }\r\n }\r\n\r\n _fetchEngagementEntities = async ({ search }) => {\r\n this.setState((state) => ({\r\n engagementEntities: state.engagementEntities.setLoading(),\r\n }));\r\n try {\r\n const response = await getEngagementEntitiesRequest(search);\r\n this.setState((state) => ({\r\n engagementEntities: state.engagementEntities.setLoaded({ response }),\r\n }));\r\n } catch (err) {\r\n this.setState((state) => ({\r\n engagementEntities: state.engagementEntities.setError(err),\r\n }));\r\n }\r\n };\r\n\r\n _searchEngagement = (val) => {\r\n this.setState({ search: val }, () => {\r\n if (isSearchCharLengthValid(val)) {\r\n this.debouncedSearch({ search: val });\r\n }\r\n });\r\n };\r\n\r\n _setEngagementEntity = (entity) => {\r\n const {\r\n setEngagementEntity,\r\n setNonAuditEngagementEntityDataHasBeenModified,\r\n } = this.props;\r\n\r\n this.setState(\r\n {\r\n search: getSearchFormattedEngagementEntity(entity),\r\n },\r\n () => {\r\n setEngagementEntity(entity);\r\n setNonAuditEngagementEntityDataHasBeenModified(true);\r\n },\r\n );\r\n };\r\n\r\n _setEnagementData = () => {\r\n const { projectInProgress, setEngagementEntity } = this.props;\r\n\r\n if (!projectInProgress.nonAuditEngagementEntityDataHasBeenModified) {\r\n this._searchEngagement('');\r\n } else {\r\n this._searchEngagement('');\r\n setEngagementEntity(null);\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n setProjectName,\r\n projectInProgress,\r\n setIsAuditClient,\r\n setClientName,\r\n setEngagementName,\r\n setEngagementFye,\r\n setNonAuditReason,\r\n countryList,\r\n setProjectCountry,\r\n currentUser,\r\n setNonAuditEngagementEntityDataHasBeenModified,\r\n } = this.props;\r\n const { search, engagementEntities } = this.state;\r\n return (\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 setProjectName(text);\r\n }}\r\n value={projectInProgress.name}\r\n maxLength={100}\r\n isValid={true}\r\n errorText={{ id: 'project-edit-input-error-text' }}\r\n type={'text'}\r\n />\r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {currentUser.geoCode}\r\n
          \r\n
          \r\n \r\n
          \r\n {\r\n setProjectCountry(option);\r\n }}\r\n options={countryList.countriesOptions}\r\n value={projectInProgress.countryOfIssuanceDropdownValue}\r\n iconConfig={{\r\n infoText: 'project-creation.project-country.tooltip.info',\r\n tooltipInfoId: `${PROJECT_INFO_ID_BLOCK}-info-tooltip`,\r\n iconComponent: InfoIcon,\r\n }}\r\n />\r\n
          \r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n {\r\n setIsAuditClient(val);\r\n setNonAuditEngagementEntityDataHasBeenModified(false);\r\n }}\r\n checked={!projectInProgress.auditClient}\r\n uncheckedIcon={false}\r\n checkedIcon={false}\r\n height={SWITCH_HEIGHT}\r\n width={SWITCH_WIDTH}\r\n />\r\n
          \r\n {projectInProgress.auditClient ? (\r\n
          \r\n this._searchEngagement(val)}\r\n onClear={() => {\r\n this._setEnagementData();\r\n }}\r\n value={search}\r\n onSelectResult={this._setEngagementEntity}\r\n onKeyDown={(e) =>\r\n e.keyCode === BACKSPACE_KEY_CODE && e.target.value === ''\r\n ? this._searchEngagement('')\r\n : null\r\n }\r\n isValid\r\n errorText={{ id: 'project-edit-input-error-text' }}\r\n showSearchButton\r\n resultsApiModel={\r\n new DataGridDataApi({\r\n apiModel: engagementEntities,\r\n rowItems: engagementEntities.getEngagementEntities(),\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\nProjectInfo.propTypes = {\r\n /** Func that fires action to set project name */\r\n setProjectName: PropTypes.func.isRequired,\r\n /** Func that set the isAuditClient toggle */\r\n setIsAuditClient: PropTypes.func.isRequired,\r\n /** Func that fires action to set engagement entity*/\r\n setEngagementEntity: PropTypes.func.isRequired,\r\n /** Object that contains working data for form before submission*/\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n /** Function to set the client name */\r\n setClientName: PropTypes.func.isRequired,\r\n /** Function to set the engagement name */\r\n setEngagementName: PropTypes.func.isRequired,\r\n /** Function to set the fiscal year */\r\n setEngagementFye: PropTypes.func.isRequired,\r\n /** Function to set the non audit reason */\r\n setNonAuditReason: PropTypes.func.isRequired,\r\n /** Function to check if non audit client has been modified*/\r\n setNonAuditEngagementEntityDataHasBeenModified: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ProjectInfo;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst LEARN_MORE_BLOCK = 'learn-more-modal';\r\nconst LEARN_MORE_ID_BLOCK = 'learn-more-modal-id';\r\n\r\nexport const LearnMoreAboutRolesModal = ({ onClose }) => (\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\nLearnMoreAboutRolesModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst SUPPORT_ACCESS_DISCLAIMER_BLOCK = 'support-access-disclaimer-modal';\r\nconst SUPPORT_ACCESS_DISCLAIMER_ID_BLOCK = 'support-access-disclaimer-modal-id';\r\n\r\nexport const ViewDisclaimerModal = ({ onClose }) => (\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\nViewDisclaimerModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Checkbox from 'components/common/checkbox-component';\r\n\r\nconst SUPPORT_ACCESS_DISCLAIMER_BLOCK = 'support-access-disclaimer-modal';\r\nconst SUPPORT_ACCESS_DISCLAIMER_ID_BLOCK = 'support-access-disclaimer-modal-id';\r\n\r\nexport const AcknowledgeDisclaimerModal = ({ onClose, onSubmit }) => {\r\n const [toggleAcknowledge, setToggleAcknowledge] = useState(false);\r\n return (\r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n setToggleAcknowledge(!toggleAcknowledge)}\r\n label={\r\n 'project-creation-edit.manage-users.acknowledge-support-team-access'\r\n }\r\n id={`${SUPPORT_ACCESS_DISCLAIMER_ID_BLOCK}-disclaimer-checkbox`}\r\n width={'100%'}\r\n isValid={true}\r\n />\r\n
          \r\n \r\n );\r\n};\r\n\r\nAcknowledgeDisclaimerModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** function fired to submit acknowledgement */\r\n onSubmit: PropTypes.func.isRequired,\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nimport Card from 'components/common/card-component';\r\nimport { SearchTableDropdownApi } from 'components/common/search-component';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport DataGrid, {\r\n DataGridData,\r\n DataGridDataApi,\r\n} from 'components/common/data-grid/data-grid-component';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport {\r\n USER_SEARCH_COLUMNS,\r\n getAddedUserColumns,\r\n} from 'constants/feature/project-creation-constants';\r\nimport {\r\n debounceSearch,\r\n isSearchCharLengthValid,\r\n} from 'constants/util/search-utility';\r\nimport ProgressBarStep from 'components/common/progress-bar-step-component';\r\nimport { UserList } from 'models/api/users-list-model';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport { LearnMoreAboutRolesModal } from '../project-info/learn-more-about-roles-modal';\r\nimport { ViewDisclaimerModal } from 'components/feature/project-creation/manage-users/support-team-access-view-disclaimer-modal';\r\nimport { getUserListRequest } from 'api/project-creation-edit-api';\r\nimport { AcknowledgeDisclaimerModal } from 'components/feature/project-creation/manage-users/support-team-access-acknowledge-disclaimer-modal';\r\n\r\nexport const MANAGE_USERS_BLOCK = 'manage-users';\r\nconst MANAGE_USERS_ID_BLOCK = 'manage-users-id';\r\n\r\nclass ManageUsers extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n search: '',\r\n showLearnMoreModal: false,\r\n showViewDisclaimerModal: false,\r\n showAcknowledgeDisclaimerModal: false,\r\n hasBeenOpened: false,\r\n userListModel: new UserList(),\r\n };\r\n // do not call this function directly, call _searchUser, which uses the debounced version of this function\r\n this.debouncedSearch = debounceSearch(this._fetchSearchUserList);\r\n }\r\n\r\n componentDidUpdate() {\r\n const { projectInProgress } = this.props;\r\n const { hasBeenOpened } = this.state;\r\n if (!hasBeenOpened && projectInProgress.isStepOneValid()) {\r\n this.setState({\r\n hasBeenOpened: true,\r\n });\r\n }\r\n }\r\n\r\n _fetchSearchUserList = async ({ search }) => {\r\n const { projectInProgress } = this.props;\r\n this.setState((state) => ({\r\n userListModel: state.userListModel.setLoading(),\r\n }));\r\n try {\r\n const response = await getUserListRequest({\r\n /**\r\n * We need to pass a clientId of 0 to the back-end, as there is different search permissions logic for create than for edit.\r\n * In create, all users are considered to be engagement owners until they hit the create button, so this id of 0 allows us to\r\n * distinguish that flow.\r\n * */\r\n\r\n clientId: !isNullOrUndefined(projectInProgress.id)\r\n ? projectInProgress.id\r\n : -1,\r\n searchString: search,\r\n numberOfRows: 50,\r\n pageNumber: 1,\r\n });\r\n this.setState((state) => ({\r\n userListModel: state.userListModel.setLoaded({ response }),\r\n }));\r\n } catch (err) {\r\n this.setState((state) => ({\r\n userListModel: state.userListModel.setError(err),\r\n }));\r\n }\r\n };\r\n\r\n _searchUser = (val) => {\r\n this.setState({ search: val }, () => {\r\n if (isSearchCharLengthValid(this.state.search)) {\r\n this.debouncedSearch({ search: this.state.search });\r\n }\r\n });\r\n };\r\n\r\n // always display at least one extra row so you don't just have a floating table header\r\n _getNumAddedUserRows = () =>\r\n this.props.projectInProgress.userEntities.length || 1;\r\n\r\n _toggleLearnMoreModal = () => {\r\n this.setState((state) => ({\r\n showLearnMoreModal: !state.showLearnMoreModal,\r\n }));\r\n };\r\n\r\n _toggleViewDisclaimerModal = () => {\r\n this.setState((state) => ({\r\n showViewDisclaimerModal: !state.showViewDisclaimerModal,\r\n }));\r\n };\r\n\r\n _toggleAcknowledgementDisclaimerModal = () => {\r\n this.setState((state) => ({\r\n showAcknowledgeDisclaimerModal: !state.showAcknowledgeDisclaimerModal,\r\n }));\r\n };\r\n\r\n _onSupportTeamAccessChange = () => {\r\n const { projectInProgress, toggleHasAdminGroup } = this.props;\r\n if (projectInProgress.hasAdminGroup) {\r\n toggleHasAdminGroup();\r\n } else {\r\n this._toggleAcknowledgementDisclaimerModal();\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n projectInProgress,\r\n addUserToProject,\r\n removeUserFromProject,\r\n assignUserProjectRole,\r\n toggleHasAdminGroup,\r\n } = this.props;\r\n const {\r\n search,\r\n showLearnMoreModal,\r\n showViewDisclaimerModal,\r\n showAcknowledgeDisclaimerModal,\r\n hasBeenOpened,\r\n userListModel,\r\n } = this.state;\r\n return (\r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n

          \r\n \r\n

          \r\n {hasBeenOpened ? (\r\n \r\n
          \r\n \r\n this._toggleLearnMoreModal()}\r\n >\r\n \r\n \r\n
          \r\n
          \r\n this._searchUser('')}\r\n value={search}\r\n isOptionSelected={(user) =>\r\n projectInProgress.containsUser(user)\r\n }\r\n onSelectResult={(id) => {\r\n addUserToProject(id);\r\n this.setState({\r\n search: '',\r\n });\r\n }}\r\n shouldDisableMenuOption={(user) =>\r\n projectInProgress.containsUser(user)\r\n }\r\n showSearchButton\r\n isValid\r\n resultsApiModel={\r\n new DataGridDataApi({\r\n apiModel: userListModel,\r\n rowItems: userListModel.getUsers(),\r\n })\r\n }\r\n />\r\n
          \r\n {!projectInProgress.isPpmdUserAdded() && (\r\n \r\n )}\r\n {!projectInProgress.isEngagementOwnerUserAdded() && (\r\n \r\n )}\r\n {\r\n assignUserProjectRole({\r\n userId: rowId,\r\n role,\r\n });\r\n }}\r\n />\r\n
          \r\n this._onSupportTeamAccessChange()}\r\n label={'project-creation.manage-users.support-team-access'}\r\n id={`${MANAGE_USERS_ID_BLOCK}-legal-hold-checkbox`}\r\n width={'75%'}\r\n isValid={true}\r\n />\r\n
          \r\n
          \r\n this._toggleViewDisclaimerModal()}\r\n >\r\n \r\n \r\n
          \r\n {projectInProgress.hasAdminGroup && (\r\n \r\n )}\r\n
          \r\n ) : null}\r\n
          \r\n
          \r\n {showLearnMoreModal && (\r\n \r\n )}\r\n {showViewDisclaimerModal && (\r\n \r\n )}\r\n {showAcknowledgeDisclaimerModal && (\r\n this._toggleAcknowledgementDisclaimerModal()}\r\n onSubmit={() => {\r\n toggleHasAdminGroup();\r\n this._toggleAcknowledgementDisclaimerModal();\r\n }}\r\n />\r\n )}\r\n
          \r\n );\r\n }\r\n}\r\n\r\nManageUsers.propTypes = {\r\n /** Project object to create and be submitted */\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n /** Function fired for adding a user to this project */\r\n addUserToProject: PropTypes.func.isRequired,\r\n /** Function fired for removing a user from this project */\r\n removeUserFromProject: PropTypes.func.isRequired,\r\n /** Function fired for assigning a role to a user on this project */\r\n assignUserProjectRole: PropTypes.func.isRequired,\r\n /** Function fired for adding suport team access on this project */\r\n toggleHasAdminGroup: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ManageUsers;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Arrows-/-Arrow-Left-/-Special\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 22,\n height: 22\n}), React.createElement(\"path\", {\n d: \"M14.8006797,13.7501574 C14.6301574,13.5762363 14.3533866,13.5762363 14.184176,13.7501574 L11.4361436,16.5516255 L11.4361436,5.15979138 C11.4361436,4.91362609 11.2406988,4.71428571 10.9994753,4.71428571 C10.7594324,4.71428571 10.5638564,4.91362609 10.5638564,5.15979138 L10.5638564,16.5516255 L7.81582399,13.7501574 C7.64530169,13.5762363 7.36997377,13.5762363 7.1993203,13.7501574 C7.028798,13.9240785 7.028798,14.205028 7.1993203,14.3789492 L10.6910923,17.9416567 C10.7318865,17.9817923 10.7802886,18.0152387 10.832757,18.0379822 C10.8865371,18.0593879 10.9429406,18.0714286 10.9994753,18.0714286 C11.0570594,18.0714286 11.1134629,18.0593879 11.167243,18.0379822 C11.2197114,18.0152387 11.2682447,17.9817923 11.3089077,17.9416567 L14.8006797,14.3789492 C14.971202,14.205028 14.971202,13.9240785 14.8006797,13.7501574 Z\",\n id: \"icon_1017-path\",\n fill: \"#00a3e0\",\n className: \"back-icon\",\n transform: \"translate(11.000000, 11.392857) rotate(-270.000000) translate(-11.000000, -11.392857) \"\n}));\n\nvar SvgBackButton = function SvgBackButton(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"22px\",\n height: \"22px\",\n viewBox: \"0 0 22 22\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgBackButton, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/back-button.660b3574.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\n\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Modal from 'components/common/modal-component';\r\n\r\nexport const PROJECT_CREATION_PAGE_ID_BLOCK = 'project-creation-id';\r\n\r\nconst ProjectCreationCancelModal = ({\r\n toggleCancelModal,\r\n onCancelAndLeavePage,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nProjectCreationCancelModal.propTypes = {\r\n /** Method on the project creation component that closes project creation cancel modal */\r\n toggleCancelModal: PropTypes.func.isRequired,\r\n /** Method on the project creation component that let user leave project creation page */\r\n onCancelAndLeavePage: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ProjectCreationCancelModal;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Page from 'components/util/page-component';\r\nimport ProjectInfoComponent from 'components/feature/project-creation/project-info/project-creation-project-info-component';\r\nimport ManageUsersComponent from 'components/feature/project-creation/manage-users/project-creation-manage-users-component';\r\nimport { ReactComponent as BackButton } from 'icons/back-button.svg';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { history } from 'store/store';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport CountryForm from 'models/form/country-form-model';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport ProjectCreationCancelModal from 'components/feature/project-creation/project-creation-cancel-modal';\r\nimport { createNewProjectRequest } from 'api/project-creation-edit-api';\r\nimport { getContainerListUserHasAccessTo } from 'api/project-list-api';\r\n\r\nconst PROJECT_CREATION_PAGE_BLOCK = 'project-creation';\r\nconst PROJECT_CREATION_PAGE_ID_BLOCK = 'project-creation-id';\r\n\r\nclass ProjectCreation extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n showCancelModal: false,\r\n projectInProgress: new ProjectForm(),\r\n countryList: new CountryForm(),\r\n shouldDisableCreateButton: false,\r\n };\r\n this.unBlockNavigation = null;\r\n this.shouldBlockNavigation = true; // instance variable for indicating if navigation away from page should be blocked\r\n }\r\n\r\n getProjectContainerListData = async () => {\r\n this.setState((state) => ({\r\n countryList: state.countryList.setLoading(),\r\n }));\r\n try {\r\n const data = await getContainerListUserHasAccessTo();\r\n this.setState((state) => ({\r\n countryList: state.countryList.setLoaded(data),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n countryList: state.countryList.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n componentDidMount() {\r\n const { currentUser } = this.props;\r\n this.getProjectContainerListData();\r\n /** Handles logic for blocking navigation with modal prompt and redux clean up */\r\n this.unBlockNavigation = history.block((toLocation) => {\r\n if (\r\n this.shouldBlockNavigation &&\r\n toLocation &&\r\n toLocation.pathname !== ROUTE_CONSTANTS.SESSION_TIMEOUT\r\n ) {\r\n this.setState({ showCancelModal: true });\r\n return false;\r\n }\r\n return true;\r\n });\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.initCurrentUser(currentUser),\r\n }));\r\n /** Prevent browser from navigating away from statenement content page\r\n * if the they type a random url and if formula is not saved */\r\n window.addEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n if (prevState.countryList !== this.state.countryList) {\r\n const { countriesOptions } = this.state.countryList;\r\n if (countriesOptions.length === 1) {\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setCountryOfIssuanceDropdownValue(\r\n countriesOptions[0],\r\n ),\r\n }));\r\n }\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unBlockNavigation();\r\n window.removeEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n\r\n _blockUrlNavigation = (e) => {\r\n if (this.shouldBlockNavigation) {\r\n // Cancel the event\r\n e.preventDefault();\r\n // Chrome requires returnValue to be set\r\n e.returnValue = '';\r\n }\r\n };\r\n\r\n _toggleCancelModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showCancelModal: !state.showCancelModal,\r\n };\r\n });\r\n };\r\n\r\n _createNewProject = async () => {\r\n const { finishProjectCreation } = this.props;\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setLoading(),\r\n }));\r\n try {\r\n const response = await createNewProjectRequest(\r\n this.state.projectInProgress,\r\n );\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setLoaded({ response }),\r\n }));\r\n this.shouldBlockNavigation = false;\r\n\r\n finishProjectCreation(response);\r\n } catch (error) {\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setLoaded(error),\r\n }));\r\n }\r\n };\r\n\r\n _onCancelAndLeavePage = () => {\r\n const { push } = this.props;\r\n this.shouldBlockNavigation = false;\r\n push(ROUTE_CONSTANTS.HOME_PAGE);\r\n };\r\n\r\n _onSave = () => {\r\n this.setState({ shouldDisableCreateButton: true });\r\n this._createNewProject();\r\n };\r\n render() {\r\n const {\r\n showCancelModal,\r\n projectInProgress,\r\n shouldDisableCreateButton,\r\n countryList,\r\n } = this.state;\r\n return (\r\n \r\n
          \r\n
          \r\n this._toggleCancelModal()}\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 this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setName(name),\r\n }))\r\n }\r\n setEngagementEntity={(name) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setEngagementEntity(name),\r\n }))\r\n }\r\n setNonAuditEngagementEntityDataHasBeenModified={(value) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setNonAuditEngagementEntityDataHasBeenModified(\r\n value,\r\n ),\r\n }))\r\n }\r\n setIsAuditClient={(checked) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.initNotAuditClient(checked),\r\n }))\r\n }\r\n setClientName={(client) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setClientName(client),\r\n }))\r\n }\r\n setEngagementName={(engagement) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setEngagementName(engagement),\r\n }))\r\n }\r\n setEngagementFye={(year) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setEngagementFye(year),\r\n }))\r\n }\r\n setNonAuditReason={(option) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setNonAuditReason(option),\r\n }))\r\n }\r\n setProjectCountry={(option) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setCountryOfIssuanceDropdownValue(\r\n option,\r\n ),\r\n }))\r\n }\r\n />\r\n
          \r\n {projectInProgress.isClientNameValid() && (\r\n
          \r\n \r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.addUser(id),\r\n }))\r\n }\r\n assignUserProjectRole={(role, userId) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.assignRoleToUser(role, userId),\r\n }))\r\n }\r\n removeUserFromProject={(user) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.removeUser(user),\r\n }))\r\n }\r\n toggleHasAdminGroup={() =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.toggleHasAdminGroup(),\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 {showCancelModal ? (\r\n \r\n ) : null}\r\n
          \r\n );\r\n }\r\n}\r\n\r\nProjectCreation.propTypes = {\r\n /** Func that fires action that navigates user to home page */\r\n push: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ProjectCreation;\r\n","import { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\n\r\nimport ProjectCreationPage from 'pages/project-creation-page';\r\nimport { finishProjectCreation } from 'store/actions/project-creation-actions';\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n currentUser: { data },\r\n },\r\n}) => ({\r\n currentUser: data,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n finishProjectCreation,\r\n push,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(ProjectCreationPage);\r\n","import { push } from 'connected-react-router';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { fetchCurrentUser } from 'store/actions/current-user-actions';\r\nimport { updateSelectedProjectFromID } from 'store/actions/selected-project-actions';\r\nimport { CONTEXT_KEY } from '../../api/api-client';\r\n\r\nexport const finishProjectCreation =\r\n (projectInProgress) => async (dispatch) => {\r\n const callbackToNavigateToHomePage = () =>\r\n dispatch(push(ROUTE_CONSTANTS.HOME_PAGE));\r\n\r\n //Set the project just created as the currently selected project\r\n dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: projectInProgress.data.result.id,\r\n contextKey: CONTEXT_KEY.HOME_GEO_CONTEXT,\r\n }),\r\n );\r\n\r\n /**\r\n * Update the current user as the user's project roles are stored there,\r\n * and navigate user to homepage once selected project is decided.\r\n * */\r\n await dispatch(fetchCurrentUser(callbackToNavigateToHomePage));\r\n };\r\n","import React from 'react';\r\nimport moment from 'moment';\r\nimport Permissions from 'permissions/permissions';\r\nimport {\r\n DataGridColumn,\r\n DataGridDropdownColumn,\r\n DataGridIconColumn,\r\n} from 'components/common/data-grid/data-grid-component';\r\nimport MultilineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { JOB_TYPES } from 'constants/common/job-type-constants';\r\nimport { ReactComponent as XIcon } from 'icons/cross.svg';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const LEGAL_HOLD_TOOLTIP = new TooltipOptions({\r\n text: 'project-creation.project-info.legal-hold-verbiage',\r\n id: 'project-creation-id-tooltip-legal-hold',\r\n position: 'right',\r\n});\r\n\r\nexport const USER_SEARCH_COLUMNS = [\r\n new DataGridColumn({\r\n key: 'preferredFullName',\r\n header: 'project-edit.manage-users.user-heading.name',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-fullName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'email',\r\n header: 'project-edit.manage-users.user-heading.email',\r\n width: '30%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-email-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'title',\r\n header: 'project-edit.manage-users.user-heading.title',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-title-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'region',\r\n header: 'project-edit.manage-users.user-heading.region',\r\n width: '15%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-region-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'officeDescription',\r\n header: 'project-edit.manage-users.user-heading.office',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `user-search-office-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n];\r\n\r\nexport const ENGAGEMENT_SEARCH_COLUMNS = [\r\n new DataGridColumn({\r\n key: 'engagementId',\r\n header: 'project-edit.project-info.engagement-heading.engagement-id',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `engagementId-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'clientName',\r\n header: 'project-edit.project-info.engagement-heading.client-name',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `clientName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'engagementName',\r\n header: 'project-edit.project-info.engagement-heading.engagement-name',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `engagementName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'engagementFye',\r\n header: 'project-edit.project-info.engagement-heading.fiscal-year',\r\n width: '25%',\r\n formatter: (rowData) => {\r\n return moment(rowData.engagementFye).format(DATE_FORMATS.YEAR);\r\n },\r\n }),\r\n];\r\n\r\nexport const getAddedUserColumns = ({ project, onRemoveClick }) => [\r\n new DataGridColumn({\r\n key: 'preferredFullName',\r\n header: 'project-edit.manage-users.user-heading.name',\r\n width: '25%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-fullName-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'email',\r\n header: 'project-edit.manage-users.user-heading.email',\r\n width: '20%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-email-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'title',\r\n header: 'project-edit.manage-users.user-heading.title',\r\n width: '10%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-title-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'region',\r\n header: 'project-edit.manage-users.user-heading.region',\r\n width: '10%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-region-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridColumn({\r\n key: 'officeDescription',\r\n header: 'project-creation.manage-users.user-heading.office',\r\n width: '10%',\r\n formatter: (rowData, { rowKey }) => {\r\n const colId = `added-users-office-col-${rowKey}`;\r\n return (\r\n \r\n );\r\n },\r\n }),\r\n new DataGridDropdownColumn({\r\n key: 'jobType',\r\n header: 'project-edit.manage-users.user-heading.role',\r\n width: '20%',\r\n placeholder: 'project-edit.manage-users.role-dropdown.placeholder',\r\n isValid: (user) => {\r\n return user.jobType !== '' && !isNullOrUndefined(user.jobType);\r\n },\r\n disabled: !Permissions.Project.canManageUsers(project.id),\r\n options: (user) => {\r\n const commonRoleOptions = [\r\n new MenuOption({\r\n id: `${user.id}-engagement-owner-option`,\r\n title: 'common.user-roles.engagement-owner',\r\n value: JOB_TYPES.ENGAGEMENT_OWNER,\r\n }),\r\n new MenuOption({\r\n id: `${user.id}-observer-option`,\r\n title: 'common.user-roles.observer',\r\n value: JOB_TYPES.OBSERVER,\r\n }),\r\n new MenuOption({\r\n id: `${user.id}-perparer/reviewer-option`,\r\n title: 'common.user-roles.preparer-reviewer',\r\n value: JOB_TYPES.PREPARER_REVIEWER,\r\n }),\r\n ];\r\n\r\n /**\r\n * NOTE:\r\n * - `isPpmd` is the property populated by the backend when we request\r\n * users in the search component. So when we select a user from the search\r\n * it is populated with isPpmd, and we should be able to see the PPMD dropdown option\r\n * - `ppmd` is the field the backend sends for EXISTING users already added to the project\r\n * so we need to check for that field when we are displaying users for the first time when\r\n * we load the project Edit page\r\n */\r\n if (user.isPpmd || user.ppmd) {\r\n return [\r\n ...commonRoleOptions,\r\n new MenuOption({\r\n id: `${user.id}-ppmd-option`,\r\n title: 'common.user-roles.ppmd',\r\n value: JOB_TYPES.PPMD,\r\n }),\r\n ];\r\n }\r\n return commonRoleOptions;\r\n },\r\n }),\r\n new DataGridIconColumn({\r\n Icon: XIcon,\r\n iconHeight: '28px',\r\n iconWidth: '28px',\r\n onClick: onRemoveClick,\r\n disabled: !Permissions.Project.canManageUsers(project.id),\r\n }),\r\n];\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport TextInput from 'components/common/text-input-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport {\r\n NON_AUDIT_REASON_OPTIONS,\r\n getMatEngagementYears,\r\n} from 'constants/feature/project-creation-constants';\r\n\r\nexport const NON_AUDIT_INPUT_BLOCK = 'non-audit-textarea';\r\nconst NON_AUDIT_INPUT_ID_BLOCK = 'non-audit-textarea-id';\r\n\r\nconst ProjectEditNonAuditInputArea = ({\r\n setClientName,\r\n setEngagementName,\r\n setEngagementFye,\r\n projectInProgress,\r\n setNonAuditReason,\r\n}) => {\r\n return (\r\n <>\r\n
          \r\n {projectInProgress.clientNameEdited ? (\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\nProjectEditNonAuditInputArea.propTypes = {\r\n /** Function to set the client name */\r\n setClientName: PropTypes.func.isRequired,\r\n /** Function to set the engagement name */\r\n setEngagementName: PropTypes.func.isRequired,\r\n /** Function to set the fiscal year */\r\n setEngagementFye: PropTypes.func.isRequired,\r\n /** Object that contains working data for form before submission*/\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n};\r\n\r\nexport default ProjectEditNonAuditInputArea;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Card from 'components/common/card-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport { ReactComponent as InfoIcon } from 'icons/icon-information-tooltip.svg';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport { SearchTableDropdownApi } from 'components/common/search-component';\r\nimport { EngagementList } from 'models/api/engagement-list-model';\r\nimport { DataGridDataApi } from 'components/common/data-grid/data-grid-component';\r\nimport { BACKSPACE_KEY_CODE } from 'constants/util/key-code-constants';\r\nimport { ENGAGEMENT_SEARCH_COLUMNS } from 'constants/feature/project-edit-constants';\r\nimport {\r\n debounceSearch,\r\n getSearchFormattedEngagementEntity,\r\n isSearchCharLengthValid,\r\n} from 'constants/util/search-utility';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport { getEngagementEntitiesRequest } from 'api/project-creation-edit-api';\r\nimport Switch from 'react-switch';\r\nimport NonAuditInputArea from 'components/feature/project-edit/project-info/_project-edit-project-info-non-audit-text-input';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\n\r\nexport const EDIT_PROJECT_INFO_BLOCK = 'edit-project-info';\r\nconst EDIT_PROJECT_INFO_ID_BLOCK = 'edit-project-info';\r\nconst SWITCH_HEIGHT = 20;\r\nconst SWITCH_WIDTH = 45;\r\n\r\nclass EditProjectInfo extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n search: '',\r\n engagementEntities: new EngagementList(),\r\n };\r\n // do not call this function directly, call _searchUser, which uses the debounced version of this function\r\n this.debouncedSearch = debounceSearch(this._fetchEngagementEntities);\r\n }\r\n\r\n componentDidMount() {\r\n // init the search value with the properly formatted entity string\r\n // not an anti-pattern because this is setting an initial value and\r\n // the project prop can not be changed anywhere else in the application\r\n const { projectInProgress, setSearch } = this.props;\r\n\r\n let searchText = '';\r\n\r\n if (projectInProgress.auditClient) {\r\n searchText = getSearchFormattedEngagementEntity(\r\n projectInProgress.engagementEntity,\r\n );\r\n }\r\n this.setState({\r\n search: searchText,\r\n });\r\n setSearch(searchText);\r\n }\r\n\r\n _searchEngagement = (val) => {\r\n this.setState({ search: val }, () => {\r\n if (isSearchCharLengthValid(val)) {\r\n this.debouncedSearch({ search: val });\r\n }\r\n });\r\n };\r\n\r\n _fetchEngagementEntities = async ({ search }) => {\r\n this.setState((state) => ({\r\n engagementEntities: state.engagementEntities.setLoading(),\r\n }));\r\n try {\r\n const response = await getEngagementEntitiesRequest(search);\r\n this.setState((state) => ({\r\n engagementEntities: state.engagementEntities.setLoaded({ response }),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n engagementEntities: state.engagementEntities.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _setEngagementEntity = (entity) => {\r\n const {\r\n setEngagementEntity,\r\n setNonAuditEngagementEntityDataHasBeenModified,\r\n setSearch,\r\n } = this.props;\r\n\r\n this.setState(\r\n {\r\n search: getSearchFormattedEngagementEntity(entity),\r\n },\r\n () => {\r\n setEngagementEntity(entity);\r\n setNonAuditEngagementEntityDataHasBeenModified(true);\r\n setSearch(getSearchFormattedEngagementEntity(entity));\r\n },\r\n );\r\n };\r\n\r\n _setEnagementData = () => {\r\n const { projectInProgress, setEngagementEntity, setSearch } = this.props;\r\n\r\n this._searchEngagement('');\r\n setSearch('');\r\n if (projectInProgress.nonAuditEngagementEntityDataHasBeenModified) {\r\n setEngagementEntity(null);\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n setProjectName,\r\n projectInProgress,\r\n setIsAuditClient,\r\n setClientName,\r\n setEngagementName,\r\n setEngagementFye,\r\n setNonAuditReason,\r\n countryList,\r\n setProjectCountry,\r\n setNonAuditEngagementEntityDataHasBeenModified,\r\n } = this.props;\r\n const { search, engagementEntities } = this.state;\r\n return (\r\n
          \r\n \r\n
          \r\n \r\n
          \r\n
          \r\n {\r\n setProjectName(text);\r\n }}\r\n value={projectInProgress.name}\r\n maxLength={100}\r\n required={true}\r\n isValid={true}\r\n errorText={{ id: 'project-edit-input-error-text' }}\r\n type={'text'}\r\n />\r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {projectInProgress && projectInProgress.geoCode}\r\n
          \r\n
          \r\n \r\n
          \r\n {\r\n setProjectCountry(option);\r\n }}\r\n options={countryList.getCountryMenuOptionByGeoCode(\r\n projectInProgress.geoCode,\r\n )}\r\n value={projectInProgress.countryOfIssuanceDropdownValue}\r\n iconConfig={{\r\n infoText: 'project-creation.project-country.tooltip.info',\r\n tooltipInfoId: `${EDIT_PROJECT_INFO_ID_BLOCK}-info-tooltip`,\r\n iconComponent: InfoIcon,\r\n }}\r\n disabled\r\n />\r\n
          \r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n {\r\n setIsAuditClient(val);\r\n this.setState({ search: '' });\r\n setNonAuditEngagementEntityDataHasBeenModified(false);\r\n }}\r\n checked={!projectInProgress.auditClient}\r\n uncheckedIcon={false}\r\n checkedIcon={false}\r\n height={SWITCH_HEIGHT}\r\n width={SWITCH_WIDTH}\r\n disabled={!projectInProgress.isClientNameValid()}\r\n />\r\n
          \r\n {projectInProgress.auditClient ? (\r\n
          \r\n this._searchEngagement(val)}\r\n onClear={() => {\r\n this._setEnagementData();\r\n }}\r\n onKeyDown={(e) =>\r\n e.keyCode === BACKSPACE_KEY_CODE && e.target.value === ''\r\n ? this._setEnagementData()\r\n : null\r\n }\r\n value={search}\r\n onSelectResult={this._setEngagementEntity}\r\n required={true}\r\n isValid={true}\r\n errorText={{ id: 'project-edit-input-error-text' }}\r\n type={'text'}\r\n showSearchButton={true}\r\n resultsApiModel={\r\n new DataGridDataApi({\r\n apiModel: engagementEntities,\r\n rowItems: engagementEntities.getEngagementEntities(),\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\nEditProjectInfo.propTypes = {\r\n /** Func that fires action to set project name */\r\n setProjectName: PropTypes.func.isRequired,\r\n /** Func that fires action to set engagement entity*/\r\n setEngagementEntity: PropTypes.func.isRequired,\r\n /** Object that contains working data for form before submission*/\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n /** Func that set the isAuditClient toggle */\r\n setIsAuditClient: PropTypes.func.isRequired,\r\n /** Function to set the client name */\r\n setClientName: PropTypes.func.isRequired,\r\n /** Function to set the engagement name */\r\n setEngagementName: PropTypes.func.isRequired,\r\n /** Function to set the fiscal year */\r\n setEngagementFye: PropTypes.func.isRequired,\r\n /** Function to set the non audit reason */\r\n setNonAuditReason: PropTypes.func.isRequired,\r\n /** Function to check if non audit client has been modified*/\r\n setNonAuditEngagementEntityDataHasBeenModified: PropTypes.func.isRequired,\r\n /** This function is used to set search value to get in the parent component*/\r\n setSearch: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default EditProjectInfo;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst TECH_SUPPORT_ACCESS_DISCLAIMER_BLOCK =\r\n 'tech-support-access-disclaimer-modal';\r\nconst TECH_SUPPORT_ACCESS_DISCLAIMER_ID_BLOCK =\r\n 'tech-support-access-disclaimer-modal-id';\r\n\r\nexport const ViewTechSupportAccessDisclaimerModal = ({ onClose }) => (\r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n \r\n);\r\n\r\nViewTechSupportAccessDisclaimerModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n","import React, { useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport Chip from 'components/common/chip-component';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\n\r\nexport const TECH_SUPPORT_ACCESS_DISCLAIMER_BLOCK =\r\n 'tech-support-access-disclaimer-modal';\r\nexport const TECH_SUPPORT_ACCESS_DISCLAIMER_ID_BLOCK =\r\n 'tech-support-access-disclaimer-modal-id';\r\nconst MAX_STR_LENGTH = 20;\r\n\r\nexport const TechSupportAcknowledgeDisclaimerModal = ({\r\n onClose,\r\n onSubmit,\r\n onDisable,\r\n projectInProgress,\r\n setSupportId,\r\n setEnabledTechSupportStatementList,\r\n disableTechSupportEditByRole,\r\n onRemoveChip,\r\n}) => {\r\n const [toggleAcknowledge, setToggleAcknowledge] = useState(false);\r\n useEffect(() => {\r\n if (\r\n isNullOrUndefined(projectInProgress.supportId) ||\r\n !projectInProgress.enabledTechSupportStatementList.length\r\n ) {\r\n setToggleAcknowledge(false);\r\n }\r\n }, [\r\n projectInProgress.supportId,\r\n projectInProgress.enabledTechSupportStatementList,\r\n ]);\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n {projectInProgress.enabledTechSupportStatementList.length > 0 &&\r\n projectInProgress.enabledTechSupportStatementList.map((key, i) => {\r\n return (\r\n onRemoveChip(key)}\r\n disabled={disableTechSupportEditByRole}\r\n >\r\n {key.title.length > MAX_STR_LENGTH ? (\r\n \r\n {key.title.slice(0, MAX_STR_LENGTH) + '...'}\r\n \r\n ) : (\r\n key.title\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 setToggleAcknowledge(!toggleAcknowledge);\r\n }}\r\n label={'project-edit.manage-users.acknowledge-tech-support-access'}\r\n id={`${TECH_SUPPORT_ACCESS_DISCLAIMER_BLOCK}-disclaimer-checkbox`}\r\n width={'100%'}\r\n isValid\r\n disabled={\r\n isNullOrUndefined(projectInProgress.supportId) ||\r\n projectInProgress.enabledTechSupportStatementList.length === 0\r\n }\r\n />\r\n
          \r\n \r\n \r\n );\r\n};\r\n\r\nTechSupportAcknowledgeDisclaimerModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** function fired to submit acknowledgement */\r\n onSubmit: PropTypes.func.isRequired,\r\n /** function fired to desible All button */\r\n onDisable: PropTypes.func.isRequired,\r\n /** returns boolean value to disable supportid field to disable based on PPMD and EO role */\r\n disableTechSupportEditByRole: PropTypes.func.isRequired,\r\n /** function fired to remove respected statement the enabled statements list */\r\n onRemoveChip: PropTypes.func,\r\n /** Project object to edit and be submitted */\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n /** Function fired to update tech suport access's supportTicketId on this project */\r\n setSupportId: PropTypes.func,\r\n /** Function fired to update tech suport access's Statementlist on this project */\r\n setEnabledTechSupportStatementList: PropTypes.func,\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Permissions from 'permissions/permissions';\r\nimport { ReactComponent as Pencil } from 'icons/edit-page.svg';\r\nimport Card from 'components/common/card-component';\r\nimport { SearchTableDropdownApi } from 'components/common/search-component';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport DataGrid, {\r\n DataGridData,\r\n DataGridDataApi,\r\n} from 'components/common/data-grid/data-grid-component';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport {\r\n USER_SEARCH_COLUMNS,\r\n getAddedUserColumns,\r\n} from 'constants/feature/project-edit-constants';\r\nimport {\r\n debounceSearch,\r\n isSearchCharLengthValid,\r\n} from 'constants/util/search-utility';\r\nimport { UserList } from 'models/api/users-list-model';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport { LearnMoreAboutRolesModal } from 'components/feature/project-creation/project-info/learn-more-about-roles-modal';\r\nimport { getUserListRequest } from 'api/project-creation-edit-api';\r\nimport { ViewDisclaimerModal } from 'components/feature/project-creation/manage-users/support-team-access-view-disclaimer-modal';\r\nimport { ViewTechSupportAccessDisclaimerModal } from 'components/feature/project-creation/manage-users/tech-support-access-view-disclaimer-modal';\r\nimport { AcknowledgeDisclaimerModal } from 'components/feature/project-creation/manage-users/support-team-access-acknowledge-disclaimer-modal';\r\nimport { TechSupportAcknowledgeDisclaimerModal } from 'components/feature/project-creation/manage-users/tech-support-access-acknowledge-disclaimer-modal';\r\n\r\nexport const EDIT_MANAGE_USERS_BLOCK = 'edit-manage-users';\r\nexport const EDIT_MANAGE_USERS_ID_BLOCK = 'edit-manage-users-id';\r\n\r\nclass EditManageUsers extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n search: '',\r\n showLearnMoreModal: false,\r\n showViewDisclaimerModal: false,\r\n showTechSupportAccessViewDisclaimerModal: false,\r\n showAcknowledgeDisclaimerModal: false,\r\n showTechSupportAccessAcknowledgeDisclaimerModal: false,\r\n userListModel: new UserList(),\r\n };\r\n this.debouncedSearch = debounceSearch(this._fetchSearchUserList);\r\n }\r\n\r\n _searchUser = (val) => {\r\n this.setState({ search: val }, () => {\r\n if (isSearchCharLengthValid(this.state.search)) {\r\n this.debouncedSearch({ search: this.state.search });\r\n }\r\n });\r\n };\r\n\r\n _fetchSearchUserList = async ({ search }) => {\r\n const { projectInProgress } = this.props;\r\n this.setState((state) => ({\r\n userListModel: state.userListModel.setLoading(),\r\n }));\r\n try {\r\n const response = await getUserListRequest({\r\n clientId: projectInProgress.id,\r\n searchString: search,\r\n numberOfRows: 50,\r\n pageNumber: 1,\r\n });\r\n this.setState((state) => ({\r\n userListModel: state.userListModel.setLoaded({ response }),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n userListModel: state.userListModel.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n // always display at least one extra row so you don't just have a floating table header\r\n _getNumAddedUserRows = () =>\r\n this.props.projectInProgress.userEntities.length || 1;\r\n\r\n _toggleLearnMoreModal = () => {\r\n this.setState((state) => ({\r\n showLearnMoreModal: !state.showLearnMoreModal,\r\n }));\r\n };\r\n\r\n _toggleViewDisclaimerModal = () => {\r\n this.setState((state) => ({\r\n showViewDisclaimerModal: !state.showViewDisclaimerModal,\r\n }));\r\n };\r\n\r\n _toggleTechSupportAccessViewDisclaimerModal = () => {\r\n this.setState((state) => ({\r\n showTechSupportAccessViewDisclaimerModal:\r\n !state.showTechSupportAccessViewDisclaimerModal,\r\n }));\r\n };\r\n\r\n _toggleAcknowledgementDisclaimerModal = () => {\r\n this.setState((state) => ({\r\n showAcknowledgeDisclaimerModal: !state.showAcknowledgeDisclaimerModal,\r\n }));\r\n };\r\n\r\n _toggleTechSupportAccessAcknowledgementDisclaimerModal = () => {\r\n this.setState((state) => ({\r\n showTechSupportAccessAcknowledgeDisclaimerModal:\r\n !state.showTechSupportAccessAcknowledgeDisclaimerModal,\r\n }));\r\n };\r\n\r\n _onSupportTeamAccessChange = () => {\r\n const { projectInProgress, toggleHasAdminGroup } = this.props;\r\n if (projectInProgress.hasAdminGroup) {\r\n toggleHasAdminGroup();\r\n } else {\r\n this._toggleAcknowledgementDisclaimerModal();\r\n }\r\n };\r\n\r\n _onTechSupportAccessChange = () => {\r\n const { projectInProgress, toggleTechSupportAccess } = this.props;\r\n this._toggleTechSupportAccessAcknowledgementDisclaimerModal();\r\n if (projectInProgress.techSupportAccess) {\r\n toggleTechSupportAccess();\r\n }\r\n };\r\n\r\n _isSupportTeamAccessCheckboxDisabled = () => {\r\n const { projectInProgress } = this.props;\r\n // We should only block the modification of the admin group of a project after it has been modified.\r\n // Once it is modified, allow the user to back out of their choice.\r\n if (!projectInProgress.hasAdminGroupBeenModified()) {\r\n if (projectInProgress.hasAdminGroup) {\r\n return !Permissions.Project.canDisableSupportTeamAccess(\r\n projectInProgress.id,\r\n );\r\n } else {\r\n return !Permissions.Project.canEnableSupportTeamAccess(\r\n projectInProgress.id,\r\n );\r\n }\r\n } else {\r\n // If it has been modified, allow the user to undo their selection for a better UX.\r\n return false;\r\n }\r\n };\r\n\r\n _isTechSupportAccessCheckboxDisabled = () => {\r\n const { projectInProgress } = this.props;\r\n // We should only block the modification of the admin group of a project after it has been modified.\r\n // Once it is modified, allow the user to back out of their choice.\r\n if (!projectInProgress.hasTechSupportAccessHasBeenModified()) {\r\n if (projectInProgress.techSupportAccess) {\r\n return !Permissions.Project.canDisableTechSupportAccess(\r\n projectInProgress.id,\r\n );\r\n }\r\n return !Permissions.Project.canEnableTechSupportAccess(\r\n projectInProgress.id,\r\n );\r\n }\r\n // If it has been modified, allow the user to undo their selection for a better UX.\r\n return false;\r\n };\r\n\r\n render() {\r\n const {\r\n projectInProgress,\r\n addUserToProject,\r\n removeUserFromProject,\r\n assignUserProjectRole,\r\n toggleHasAdminGroup,\r\n toggleTechSupportAccess,\r\n disableTechSupportAccess,\r\n setSupportId,\r\n setEnabledTechSupportStatementList,\r\n removeSelectedTechSupportStatement,\r\n resetEnabledTechSupportStatementListData,\r\n isTechSupportStatementAccessEnabled,\r\n } = this.props;\r\n const {\r\n search,\r\n showLearnMoreModal,\r\n userListModel,\r\n showViewDisclaimerModal,\r\n showAcknowledgeDisclaimerModal,\r\n showTechSupportAccessViewDisclaimerModal,\r\n showTechSupportAccessAcknowledgeDisclaimerModal,\r\n } = this.state;\r\n const _canManageUsers = !Permissions.Project.canManageUsers(\r\n projectInProgress.id,\r\n );\r\n return (\r\n
          \r\n \r\n

          \r\n \r\n

          \r\n\r\n
          \r\n \r\n this._toggleLearnMoreModal()}\r\n >\r\n \r\n \r\n
          \r\n\r\n
          \r\n this._searchUser(val)}\r\n onClear={() => this._searchUser('')}\r\n value={search}\r\n onSelectResult={(user) => {\r\n addUserToProject(user);\r\n this.setState({\r\n search: '',\r\n });\r\n }}\r\n isOptionSelected={(user) => projectInProgress.containsUser(user)}\r\n shouldDisableMenuOption={(user) =>\r\n projectInProgress.containsUser(user)\r\n }\r\n showSearchButton\r\n isValid\r\n resultsApiModel={\r\n new DataGridDataApi({\r\n apiModel: userListModel,\r\n rowItems: userListModel.getUsers(),\r\n })\r\n }\r\n />\r\n
          \r\n {!projectInProgress.isPpmdUserAdded() && (\r\n \r\n )}\r\n {!projectInProgress.isEngagementOwnerUserAdded() && (\r\n \r\n )}\r\n {\r\n assignUserProjectRole({\r\n userId: rowId,\r\n role,\r\n });\r\n }}\r\n />\r\n
          \r\n this._onSupportTeamAccessChange()}\r\n label={'project-edit.manage-users.support-team-access'}\r\n id={`${EDIT_MANAGE_USERS_ID_BLOCK}-legal-hold-checkbox`}\r\n width={'75%'}\r\n isValid={true}\r\n />\r\n
          \r\n
          \r\n this._toggleViewDisclaimerModal()}\r\n >\r\n \r\n \r\n
          \r\n {projectInProgress.hasAdminGroup && (\r\n \r\n )}\r\n {projectInProgress.hasAdminGroup &&\r\n projectInProgress.adminGroupAddDate && (\r\n \r\n
          \r\n {projectInProgress.adminGroupAddDate}\r\n ),\r\n }}\r\n />\r\n
          \r\n
          \r\n \r\n {projectInProgress.adminGroupEnabledByUserName}\r\n \r\n ),\r\n }}\r\n />\r\n
          \r\n
          \r\n )}\r\n {isTechSupportStatementAccessEnabled && (\r\n \r\n this._onTechSupportAccessChange()}\r\n label={'project-creation.manage-users.tech-support-access'}\r\n id={`${EDIT_MANAGE_USERS_ID_BLOCK}-tech-support-access-checkbox`}\r\n width={'20%'}\r\n isValid\r\n />\r\n {projectInProgress.techSupportAccess && (\r\n \r\n !this._isTechSupportAccessCheckboxDisabled() &&\r\n this._toggleTechSupportAccessAcknowledgementDisclaimerModal()\r\n }\r\n className={`${EDIT_MANAGE_USERS_BLOCK}__pencil-icon`}\r\n />\r\n )}\r\n \r\n )}\r\n {isTechSupportStatementAccessEnabled && (\r\n \r\n \r\n this._toggleTechSupportAccessViewDisclaimerModal()\r\n }\r\n >\r\n \r\n \r\n \r\n )}\r\n {projectInProgress.techSupportAccess && (\r\n \r\n )}\r\n \r\n {showLearnMoreModal && (\r\n \r\n )}\r\n {showViewDisclaimerModal && (\r\n \r\n )}\r\n {showTechSupportAccessViewDisclaimerModal && (\r\n \r\n )}\r\n {showAcknowledgeDisclaimerModal && (\r\n this._toggleAcknowledgementDisclaimerModal()}\r\n onSubmit={() => {\r\n toggleHasAdminGroup();\r\n this._toggleAcknowledgementDisclaimerModal();\r\n }}\r\n />\r\n )}\r\n {showTechSupportAccessAcknowledgeDisclaimerModal && (\r\n {\r\n resetEnabledTechSupportStatementListData();\r\n this._toggleTechSupportAccessAcknowledgementDisclaimerModal();\r\n }}\r\n onSubmit={() => {\r\n toggleTechSupportAccess();\r\n this._toggleTechSupportAccessAcknowledgementDisclaimerModal();\r\n }}\r\n onDisable={() => {\r\n disableTechSupportAccess();\r\n this._toggleTechSupportAccessAcknowledgementDisclaimerModal();\r\n }}\r\n disableTechSupportEditByRole={this._isTechSupportAccessCheckboxDisabled()}\r\n projectInProgress={projectInProgress}\r\n setSupportId={setSupportId}\r\n setEnabledTechSupportStatementList={\r\n setEnabledTechSupportStatementList\r\n }\r\n onRemoveChip={removeSelectedTechSupportStatement}\r\n />\r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nEditManageUsers.propTypes = {\r\n /** Project object to edit and be submitted */\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n /** Function fired for adding a user to this project */\r\n addUserToProject: PropTypes.func.isRequired,\r\n /** Function fired for removing a user from this project */\r\n removeUserFromProject: PropTypes.func.isRequired,\r\n /** Function fired for assigning a role to a user on this project */\r\n assignUserProjectRole: PropTypes.func.isRequired,\r\n /** Function fired for adding suport team access on this project */\r\n toggleHasAdminGroup: PropTypes.func.isRequired,\r\n /** Function fired for adding tech suport team access on this project */\r\n toggleTechSupportAccess: PropTypes.func.isRequired,\r\n /** Function fired to set tech suport access related data is modified on this project */\r\n resetEnabledTechSupportStatementListData: PropTypes.func.isRequired,\r\n /** Function fired to reset tech suport team access on this project */\r\n disableTechSupportAccess: PropTypes.func.isRequired,\r\n /** Function fired to update tech suport access's supportTicketId on this project */\r\n setSupportId: PropTypes.func,\r\n /** Function fired to update tech suport access's Statementlist on this project */\r\n setTechSupportStatementList: PropTypes.func,\r\n /** Function fired to remove statement from tech suport Statementlist on this project */\r\n removeSelectedTechSupportStatement: PropTypes.func,\r\n /** based on this boolean value to check if feature flag is enabled for the feature with mentioned name */\r\n isTechSupportStatementAccessEnabled: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default EditManageUsers;\r\n","import React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport Checkbox from 'components/common/checkbox-component';\r\n\r\nexport const CHECKBOX_LIST_BLOCK = 'checkbox-list';\r\nconst CheckboxList = ({\r\n itemsList,\r\n setCheckbox,\r\n masterCheckboxChecked,\r\n setMasterCheckbox,\r\n disabled,\r\n className,\r\n id,\r\n}) => {\r\n const itemsListLength = itemsList.length;\r\n const checkedAmount = itemsList.filter((element) => {\r\n return element.checked === 1;\r\n }).length;\r\n\r\n /* setMasterCheckbox it is only going to return a value if the user select all the checkboxes manually\r\n so this is going to check if the amount of checked checkboxes is equal to the amount of items on the list\r\n if its true, return a true value to set the master checkbox value , same for false. \r\n This is made like this to handle the case were the user select all the checkboxes manually and the case in which\r\n all the checkboxes are selected and the user deselect one or more checkboxes manually*/\r\n useEffect(() => {\r\n if (checkedAmount === itemsListLength && itemsListLength > 0) {\r\n setMasterCheckbox(true);\r\n } else if (\r\n masterCheckboxChecked &&\r\n itemsListLength > 0 &&\r\n checkedAmount === 0\r\n ) {\r\n setMasterCheckbox(false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [checkedAmount]);\r\n\r\n return (\r\n
          \r\n
          \r\n {\r\n setMasterCheckbox();\r\n }}\r\n masterChecked={checkedAmount > 0 && checkedAmount < itemsListLength}\r\n disabled={disabled}\r\n />\r\n
          \r\n {itemsList.map((item, index) => (\r\n \r\n {\r\n setCheckbox(index);\r\n }}\r\n disabled={item.disabled}\r\n tooltip={item.disabled ? item.tooltip : null}\r\n needsMultilineLabel={true}\r\n />\r\n
          \r\n ))}\r\n \r\n );\r\n};\r\n\r\nCheckboxList.propTypes = {\r\n /* Array of objects to be shown on the list*/\r\n itemsList: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n label: PropTypes.string,\r\n checked: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),\r\n }),\r\n ).isRequired,\r\n /** function to set the current checked status */\r\n setCheckbox: PropTypes.func.isRequired,\r\n /* Id of the current checkbox list */\r\n id: PropTypes.string.isRequired,\r\n /* bool with checked value of master checkbox */\r\n masterCheckboxChecked: PropTypes.bool.isRequired,\r\n /** function to set the current checked status of master checkbox */\r\n setMasterCheckbox: PropTypes.func.isRequired,\r\n /* bool to disable or enable checkbox */\r\n disabled: PropTypes.bool,\r\n /* className to be added to the component */\r\n className: PropTypes.string,\r\n};\r\n\r\nexport default CheckboxList;\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Card from 'components/common/card-component';\r\nimport CheckboxList from 'components/common/checkbox-list-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { LEGAL_HOLD_TOOLTIP } from 'constants/feature/project-edit-constants';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as Information } from 'icons/icon-information-tooltip.svg';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport RolesUtil from 'permissions/utils/roles';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nexport const EDIT_MANAGE_LEGAL_HOLD_BLOCK = 'edit-manage-legal-hold';\r\nconst EDIT_MANAGE_LEGAL_HOLD_ID_BLOCK = 'edit-manage-legal-hold-id';\r\n\r\nconst INFORMATION_ICON_SIZE = '18px';\r\nconst ACTIVE_CHECKBOX = 'active';\r\nconst ARCHIVED_CHECKBOX = 'archived';\r\nconst DELETED_CHECKBOX = 'deleted';\r\n\r\nconst EditManageLegalHold = ({\r\n projectId,\r\n activeStatements,\r\n wrappedUpStatements,\r\n deletedStatements,\r\n setActiveStatements,\r\n setWrappedUpStatements,\r\n setDeletedStatements,\r\n}) => {\r\n const [masterCheckboxActive, setMasterCheckboxActive] = useState(false);\r\n const [masterCheckboxWrapped, setMasterCheckboxWrapped] = useState(false);\r\n const [masterCheckboxDeleted, setMasterCheckboxDeleted] = useState(false);\r\n const hasPermissionToDisableLegalHold = RolesUtil.doesUserHavePPMDRoleForProject(\r\n projectId,\r\n );\r\n //this states are created to keep the original value of the props array\r\n // to be able to keep checkboxes enabled until the user saves the changes\r\n //and avoid disabling the checkboxes after the user clicks on them\r\n // and they don't have permission to disable legal hold\r\n const [copyActiveStatements] = useState(() => {\r\n return JSON.parse(JSON.stringify(activeStatements));\r\n });\r\n const [copyDeletedStatements] = useState(() => {\r\n return JSON.parse(JSON.stringify(deletedStatements));\r\n });\r\n const [copyWrappedUpStatements] = useState(() => {\r\n return JSON.parse(JSON.stringify(wrappedUpStatements));\r\n });\r\n const getCopyArray = (checkboxType) => {\r\n switch (checkboxType) {\r\n case ACTIVE_CHECKBOX: {\r\n return copyActiveStatements;\r\n }\r\n case ARCHIVED_CHECKBOX: {\r\n return copyWrappedUpStatements;\r\n }\r\n case DELETED_CHECKBOX: {\r\n return copyDeletedStatements;\r\n }\r\n default:\r\n }\r\n };\r\n const hasPermissionToEnableLegalHold =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectId);\r\n const ENABLE_LEGAL_HOLD_TOOLTIP = new TooltipOptions({\r\n text: 'project-edit.manage-legal-hold-enable-tooltip.text',\r\n id: 'project-edit-manage-legal-hold-enable-tool-tip',\r\n position: 'right',\r\n });\r\n const DISABLE_LEGAL_HOLD_TOOLTIP = new TooltipOptions({\r\n text: 'project-edit.manage-legal-hold-disable-tooltip.text',\r\n id: 'project-edit-manage-legal-hold-disable-tool-tip',\r\n position: 'right',\r\n });\r\n\r\n const statementToCheckboxInfo = (statementsArray, checkboxType) => {\r\n let checkboxArray = [];\r\n for (let i = 0; i < statementsArray.length; i++) {\r\n checkboxArray.push({\r\n label: statementsArray[i].statementName,\r\n checked: statementsArray[i].legalHold,\r\n tooltip: getCopyArray(checkboxType)[i].legalHold\r\n ? DISABLE_LEGAL_HOLD_TOOLTIP\r\n : ENABLE_LEGAL_HOLD_TOOLTIP,\r\n disabled: getCopyArray(checkboxType)[i].legalHold\r\n ? !hasPermissionToDisableLegalHold\r\n : !hasPermissionToEnableLegalHold,\r\n });\r\n }\r\n return checkboxArray;\r\n };\r\n const checkLegalHoldActive = () => {\r\n if (activeStatements && wrappedUpStatements && deletedStatements) {\r\n return (\r\n activeStatements.some((statement) => statement.isLegalHoldSet()) ||\r\n wrappedUpStatements.some((statement) => statement.isLegalHoldSet()) ||\r\n deletedStatements.some((statement) => statement.isLegalHoldSet())\r\n );\r\n }\r\n return false;\r\n };\r\n const setLegalHold = (index, statements) => {\r\n if (statements[index]) {\r\n statements[index].legalHold = statements[index].legalHold ? 0 : 1;\r\n }\r\n return statements;\r\n };\r\n const setChecked = (index, checkboxType) => {\r\n switch (checkboxType) {\r\n case ACTIVE_CHECKBOX: {\r\n setActiveStatements([...setLegalHold(index, activeStatements)]);\r\n break;\r\n }\r\n case ARCHIVED_CHECKBOX: {\r\n setWrappedUpStatements([...setLegalHold(index, wrappedUpStatements)]);\r\n break;\r\n }\r\n case DELETED_CHECKBOX: {\r\n setDeletedStatements([...setLegalHold(index, deletedStatements)]);\r\n break;\r\n }\r\n\r\n default:\r\n }\r\n };\r\n const checkCanChangeLegalHold = (\r\n masterCheckbox,\r\n statement,\r\n index,\r\n copyArray,\r\n ) => {\r\n if (masterCheckbox) {\r\n if (\r\n !hasPermissionToDisableLegalHold &&\r\n copyArray[index].legalHold !== 1\r\n ) {\r\n return masterCheckbox ? 0 : 1;\r\n } else if (hasPermissionToDisableLegalHold) {\r\n return masterCheckbox ? 0 : 1;\r\n }\r\n } else if (!masterCheckbox && hasPermissionToEnableLegalHold) {\r\n return masterCheckbox ? 0 : 1;\r\n }\r\n return statement.legalHold;\r\n };\r\n\r\n const masterCheckboxToggle = (checkboxType, newValue) => {\r\n //case checkbox list returns a value on setMasterCheckbox function\r\n // to set the checkbox as checked if the user selected all the checkboxes manually\r\n if (newValue !== null && newValue !== undefined) {\r\n switch (checkboxType) {\r\n case ACTIVE_CHECKBOX:\r\n setMasterCheckboxActive(newValue);\r\n break;\r\n case DELETED_CHECKBOX:\r\n setMasterCheckboxDeleted(newValue);\r\n break;\r\n case ARCHIVED_CHECKBOX:\r\n setMasterCheckboxWrapped(newValue);\r\n break;\r\n default:\r\n }\r\n } else {\r\n //case checkbox list returns a null value on setMasterCheckbox function\r\n // so this means user selected clicked on the master checkbox\r\n switch (checkboxType) {\r\n case ACTIVE_CHECKBOX: {\r\n activeStatements.forEach((element, index) => {\r\n element.legalHold = checkCanChangeLegalHold(\r\n masterCheckboxActive,\r\n element,\r\n index,\r\n copyActiveStatements,\r\n );\r\n });\r\n setActiveStatements([...activeStatements]);\r\n setMasterCheckboxActive((prevState) => !prevState);\r\n\r\n break;\r\n }\r\n case ARCHIVED_CHECKBOX: {\r\n wrappedUpStatements.forEach((element, index) => {\r\n element.legalHold = checkCanChangeLegalHold(\r\n masterCheckboxWrapped,\r\n element,\r\n index,\r\n copyWrappedUpStatements,\r\n );\r\n });\r\n setWrappedUpStatements([...wrappedUpStatements]);\r\n setMasterCheckboxWrapped((prevState) => !prevState);\r\n break;\r\n }\r\n case DELETED_CHECKBOX: {\r\n deletedStatements.forEach((element, index) => {\r\n element.legalHold = checkCanChangeLegalHold(\r\n masterCheckboxDeleted,\r\n element,\r\n index,\r\n copyDeletedStatements,\r\n );\r\n });\r\n setDeletedStatements([...deletedStatements]);\r\n setMasterCheckboxDeleted((prevState) => !prevState);\r\n break;\r\n }\r\n\r\n default:\r\n }\r\n }\r\n };\r\n return (\r\n
          \r\n \r\n

          \r\n \r\n \r\n \r\n \r\n

          \r\n
          \r\n \r\n
          \r\n {checkLegalHoldActive() && (\r\n
          \r\n \r\n
          \r\n )}\r\n
          \r\n
          \r\n \r\n
          \r\n \r\n
          \r\n setChecked(index, ACTIVE_CHECKBOX)}\r\n masterCheckboxChecked={masterCheckboxActive}\r\n setMasterCheckbox={(value) =>\r\n masterCheckboxToggle(ACTIVE_CHECKBOX, value)\r\n }\r\n id={`${projectId}-active`}\r\n />\r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n \r\n
          \r\n setChecked(index, ARCHIVED_CHECKBOX)}\r\n masterCheckboxChecked={masterCheckboxWrapped}\r\n setMasterCheckbox={(value) =>\r\n masterCheckboxToggle(ARCHIVED_CHECKBOX, value)\r\n }\r\n id={`${projectId}-archived`}\r\n />\r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n \r\n
          \r\n setChecked(index, DELETED_CHECKBOX)}\r\n masterCheckboxChecked={masterCheckboxDeleted}\r\n setMasterCheckbox={(value) =>\r\n masterCheckboxToggle(DELETED_CHECKBOX, value)\r\n }\r\n id={`${projectId}-deleted`}\r\n />\r\n
          \r\n
          \r\n
          \r\n
          \r\n
          \r\n );\r\n};\r\nEditManageLegalHold.propTypes = {\r\n /* id of the current selected project */\r\n projectId: PropTypes.string.isRequired,\r\n /* array of active statements */\r\n activeStatements: PropTypes.array.isRequired,\r\n /* array of wrapped up statements */\r\n wrappedUpStatements: PropTypes.array.isRequired,\r\n /* array of statements */\r\n deletedStatements: PropTypes.array.isRequired,\r\n /* function to set active statements data on a project */\r\n setActiveStatements: PropTypes.func.isRequired,\r\n /* function to set wrapped up statements data on a project */\r\n setWrappedUpStatements: PropTypes.func.isRequired,\r\n /* function to set deleted statements data on a project */\r\n setDeletedStatements: PropTypes.func.isRequired,\r\n};\r\nexport default EditManageLegalHold;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport {\r\n smoothScrollIntoCenterById,\r\n smoothScrollWithOffset,\r\n} from 'utils/scrolling-utils';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nexport const PROJECT_EDIT_SECTION_MENU_BLOCK = 'project-edit-section-menu';\r\nexport const PROJECT_EDIT_SECTION_MENU_ID_BLOCK =\r\n 'project-edit-section-menu-id';\r\nconst BUTTON_CONTAINER_HEIGHT = 72;\r\n\r\nconst ProjectEditSectionMenu = ({\r\n sectionList,\r\n activeSectionId,\r\n onSectionClick,\r\n}) => {\r\n const onClick = (element) => {\r\n if (element.offsetHeight > window.innerHeight - BUTTON_CONTAINER_HEIGHT) {\r\n const top = element.getBoundingClientRect().top;\r\n smoothScrollWithOffset(BUTTON_CONTAINER_HEIGHT, top); // 72 is the height of the buttons div container\r\n } else {\r\n smoothScrollIntoCenterById(element.id);\r\n }\r\n\r\n onSectionClick(element.id);\r\n };\r\n\r\n return (\r\n
          \r\n {sectionList.map((section, index) => (\r\n onClick(section.element)}\r\n key={`${section.element.id}-${PROJECT_EDIT_SECTION_MENU_ID_BLOCK}`}\r\n id={`${section.element.id}-${PROJECT_EDIT_SECTION_MENU_ID_BLOCK}-${index}`}\r\n >\r\n \r\n \r\n ))}\r\n
          \r\n );\r\n};\r\nProjectEditSectionMenu.propTypes = {\r\n //list of sections for the menu\r\n sectionList: PropTypes.array.isRequired,\r\n // id of the active section on the component\r\n activeSectionId: PropTypes.string.isRequired,\r\n // function to set a section as active\r\n onSectionClick: PropTypes.func.isRequired,\r\n};\r\nexport default ProjectEditSectionMenu;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\n\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Modal from 'components/common/modal-component';\r\n\r\nconst PROJECT_EDIT_PAGE_ID_BLOCK = 'project-edit-id';\r\n\r\nconst ProjectEditCancelModal = ({\r\n toggleCancelModal,\r\n onCancelAndLeavePage,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nProjectEditCancelModal.propTypes = {\r\n /** Method on the project edit component that closes project edit cancel modal */\r\n toggleCancelModal: PropTypes.func.isRequired,\r\n /** Method on the project edit component that let user leave project edit page */\r\n onCancelAndLeavePage: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ProjectEditCancelModal;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst COE_TEAM_ACCESS_DISCLAIMER_BLOCK = 'coe-access-disclaimer-modal';\r\nconst COE_TEAM_ACCESS_DISCLAIMER_ID_BLOCK = 'coe-access-disclaimer-modal-id';\r\n\r\nexport const ViewCOEDisclaimerModal = ({ onClose }) => (\r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n \r\n);\r\n\r\nViewCOEDisclaimerModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n};\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Checkbox from 'components/common/checkbox-component';\r\n\r\nconst COE_ACCESS_DISCLAIMER_BLOCK = 'coe-access-disclaimer-modal';\r\nconst COE_ACCESS_DISCLAIMER_ID_BLOCK = 'coe-access-disclaimer-modal-id';\r\n\r\nexport const AcknoledgeCOEAccessDisclaimerModal = ({ onClose, onSubmit }) => {\r\n const [toggleAcknowledge, setToggleAcknowledge] = useState(false);\r\n return (\r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n setToggleAcknowledge(!toggleAcknowledge)}\r\n label={\r\n 'project-creation-edit.manage-users.acknowledge-support-team-access'\r\n }\r\n id={`${COE_ACCESS_DISCLAIMER_ID_BLOCK}-disclaimer-checkbox`}\r\n width={'100%'}\r\n isValid={true}\r\n />\r\n
          \r\n \r\n );\r\n};\r\n\r\nAcknoledgeCOEAccessDisclaimerModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** function fired to submit acknowledgement */\r\n onSubmit: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport PropTypes from 'prop-types';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport { useState } from 'react';\r\nimport { ViewCOEDisclaimerModal } from './coe-team-access-view-disclaimer';\r\nimport { AcknoledgeCOEAccessDisclaimerModal } from './coe-team-acknowledgement-modal';\r\nimport Card from 'components/common/card-component';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport Permissions from 'permissions/permissions';\r\n\r\nconst EDIT_MANAGE_COE_TEAM_ACCESS_ID_BLOCK = 'manage-coe-team-access-id';\r\nconst EDIT_MANAGE_COE_TEAM_ACCESS_BLOCK = 'manage-coe-team-access';\r\n\r\nexport const EditManageCOETeamAccess = ({\r\n projectInProgress,\r\n toggleHasCoeGroup,\r\n}) => {\r\n const [showViewDisclaimerModal, setShowViewDisclaimerModal] = useState(false);\r\n const [\r\n showAcknowledgeDisclaimerModal,\r\n setShowAcknowledgeDisclaimerModal,\r\n ] = useState(false);\r\n\r\n const _onCoeTeamAccessChange = () => {\r\n projectInProgress.hasCoeGroup\r\n ? toggleHasCoeGroup()\r\n : setShowAcknowledgeDisclaimerModal((prev) => !prev);\r\n };\r\n\r\n const _isCoeTeamAccessCheckboxDisabled = () => {\r\n // We have maintained separate access set for who can enable and who can disable.\r\n // Currently it might seem irrelevant, but in future we might require separate set of people\r\n // having enable privelege and separate set for disable privelege. In that scenario our\r\n // infra will be ready to cope with the requirement.\r\n return (\r\n !Permissions.Project.canDisableCoeTeamAccess(projectInProgress.id) &&\r\n !Permissions.Project.canEnableCoeTeamAccess(projectInProgress.id)\r\n );\r\n };\r\n\r\n return (\r\n
          \r\n \r\n

          \r\n \r\n

          \r\n
          \r\n \r\n
          \r\n\r\n
          \r\n _onCoeTeamAccessChange()}\r\n label={'project-edit.manage-users.coe-team-access'}\r\n id={`${EDIT_MANAGE_COE_TEAM_ACCESS_ID_BLOCK}-coe-team-access-checkbox`}\r\n width={'75%'}\r\n isValid={true}\r\n />\r\n
          \r\n \r\n setShowViewDisclaimerModal((prev) => !prev)}\r\n >\r\n \r\n \r\n {projectInProgress.hasCoeGroup && (\r\n \r\n )}\r\n {projectInProgress.hasCoeGroup && projectInProgress.coeGroupAddDate && (\r\n \r\n
          \r\n {projectInProgress.coeGroupAddDate}\r\n ),\r\n }}\r\n />\r\n
          \r\n
          \r\n {projectInProgress.coeGroupEnabledByUserName}\r\n ),\r\n }}\r\n />\r\n
          \r\n
          \r\n )}\r\n \r\n \r\n {showViewDisclaimerModal && (\r\n setShowViewDisclaimerModal((prev) => !prev)}\r\n />\r\n )}\r\n {showAcknowledgeDisclaimerModal && (\r\n setShowAcknowledgeDisclaimerModal(() => false)}\r\n onSubmit={() => {\r\n toggleHasCoeGroup();\r\n setShowAcknowledgeDisclaimerModal((prev) => !prev);\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\n\r\nEditManageCOETeamAccess.propTypes = {\r\n /** Project object to edit and be submitted */\r\n projectInProgress: PropTypes.instanceOf(ProjectForm).isRequired,\r\n /** Function fired for adding coe team access on this project */\r\n toggleHasCoeGroup: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default EditManageCOETeamAccess;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Page from 'components/util/page-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport EditProjectInfoComponent from 'components/feature/project-edit/project-info/project-edit-project-info-component';\r\nimport EditManageUsersComponent from 'components/feature/project-edit/manage-users/project-edit-manage-users-component';\r\nimport EditManageLegalHold from 'components/feature/project-edit/legal-hold/project-edit-manage-legal-hold-component';\r\nimport ProjectEditSectionMenu from 'components/feature/project-edit/section-menu/project-edit-section-menu-component';\r\nimport { ReactComponent as BackButton } from 'icons/back-button.svg';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport ProjectForm from 'models/form/project-form-model';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { history } from 'store/store';\r\nimport ProjectEditCancelModal from 'components/feature/project-edit/project-edit-cancel-modal';\r\nimport { getSelectedProjectRequest } from 'api/selected-project-api';\r\nimport { editProjectRequest } from 'api/project-creation-edit-api';\r\nimport CountryForm from 'models/form/country-form-model';\r\nimport { getMostVisible } from 'utils/scrolling-utils';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport {\r\n getCountriesListLoadedInModel,\r\n getCountryCodeMenuOption,\r\n isProjectExistInAMERegion,\r\n} from '../utils/project-utils';\r\nimport EditManageCOETeamAccess from 'components/feature/project-edit/manage-coe/project-edit-manage-coe-access';\r\nimport Permissions from 'permissions/permissions';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\n\r\nconst PROJECT_EDIT_PAGE_BLOCK = 'project-edit';\r\nconst PROJECT_EDIT_PAGE_ID_BLOCK = 'project-edit-id';\r\n\r\nclass ProjectEdit extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n showCancelModal: false,\r\n projectInProgress: new ProjectForm(),\r\n activeSection: `${PROJECT_EDIT_PAGE_ID_BLOCK}-project-info-id`,\r\n countryList: new CountryForm(),\r\n sectionsElement: [],\r\n search: '',\r\n };\r\n this.unBlockNavigation = null;\r\n this.shouldBlockNavigation = true; // instance variable for indicating if navigation away from page should be blocked\r\n this.projectInfoRef = React.createRef();\r\n this.manageUsersRef = React.createRef();\r\n this.legalHoldRef = React.createRef();\r\n this.coeUserRef = React.createRef();\r\n }\r\n\r\n async componentDidMount() {\r\n const { projectId } = this.props;\r\n this.setState({\r\n countryList: getCountriesListLoadedInModel(),\r\n });\r\n this._fetchSelectedProjectForEdit(projectId);\r\n /** Handles logic for blocking navigation with modal prompt and redux clean up */\r\n this.unBlockNavigation = history.block((toLocation) => {\r\n if (\r\n this.shouldBlockNavigation &&\r\n toLocation &&\r\n toLocation.pathname !== ROUTE_CONSTANTS.SESSION_TIMEOUT\r\n ) {\r\n this.setState({ showCancelModal: true });\r\n return false;\r\n }\r\n return true;\r\n });\r\n /** Prevent browser from navigating away from statenement content page\r\n * if the they type a random url and if formula is not saved */\r\n window.addEventListener('beforeunload', this._blockUrlNavigation);\r\n //scroll listener to set the current section as active on the section menu\r\n window.addEventListener('scroll', this._handleScroll);\r\n }\r\n componentWillUnmount() {\r\n this.unBlockNavigation();\r\n window.removeEventListener('beforeunload', this._blockUrlNavigation);\r\n window.removeEventListener('scroll', this._handleScroll);\r\n }\r\n checkRefs() {\r\n if (isProjectExistInAMERegion(this.state.projectInProgress)) {\r\n return (\r\n !isNullOrUndefined(this.legalHoldRef.current) &&\r\n !isNullOrUndefined(this.manageUsersRef.current) &&\r\n !isNullOrUndefined(this.projectInfoRef.current) &&\r\n !isNullOrUndefined(this.coeUserRef.current)\r\n );\r\n }\r\n return (\r\n !isNullOrUndefined(this.legalHoldRef.current) &&\r\n !isNullOrUndefined(this.manageUsersRef.current) &&\r\n !isNullOrUndefined(this.projectInfoRef.current)\r\n );\r\n }\r\n componentDidUpdate(prevProps, prevState) {\r\n const { projectInProgress, sectionsElement, countryList } = this.state;\r\n if (\r\n projectInProgress.isLoaded &&\r\n sectionsElement.length === 0 &&\r\n this.checkRefs()\r\n ) {\r\n if (\r\n !this.state.projectInProgress.countryOfIssuanceDropdownValue &&\r\n countryList &&\r\n projectInProgress.geoCode &&\r\n countryList.getCountryMenuOptionByGeoCode(projectInProgress.geoCode)\r\n .length\r\n ) {\r\n this.setState((prevState) => ({\r\n projectInProgress:\r\n prevState.projectInProgress.setCountryOfIssuanceDropdownValue(\r\n getCountryCodeMenuOption(\r\n countryList.getCountryMenuOptionByGeoCode(\r\n prevState.projectInProgress.geoCode,\r\n ),\r\n prevState.projectInProgress.countryCode,\r\n ),\r\n ),\r\n }));\r\n }\r\n\r\n const sectionsInfo = [\r\n {\r\n text: 'project-edit.project-info.title',\r\n element: this.projectInfoRef.current,\r\n },\r\n {\r\n text: 'project-edit.manage-users.title',\r\n element: this.manageUsersRef.current,\r\n },\r\n {\r\n text: 'project-edit.manage-legal-hold.title',\r\n element: this.legalHoldRef.current,\r\n },\r\n ];\r\n\r\n if (isProjectExistInAMERegion(projectInProgress)) {\r\n sectionsInfo.splice(2, 0, {\r\n text: 'project-edit.manage-coe.title',\r\n element: this.coeUserRef.current,\r\n });\r\n }\r\n\r\n this.setState({ sectionsElement: sectionsInfo });\r\n }\r\n }\r\n\r\n _handleScroll = () => {\r\n let sectionContainer = [\r\n this.projectInfoRef.current,\r\n this.manageUsersRef.current,\r\n this.legalHoldRef.current,\r\n ];\r\n if (isProjectExistInAMERegion(this.state.projectInProgress)) {\r\n sectionContainer.push(this.coeUserRef.current);\r\n }\r\n\r\n if (\r\n !sectionContainer.includes(null) &&\r\n !sectionContainer.includes(undefined)\r\n ) {\r\n this._onSectionClick(getMostVisible(sectionContainer));\r\n }\r\n };\r\n\r\n _blockUrlNavigation = (e) => {\r\n if (this.shouldBlockNavigation) {\r\n // Cancel the event\r\n e.preventDefault();\r\n // Chrome requires returnValue to be set\r\n e.returnValue = '';\r\n }\r\n };\r\n\r\n _fetchSelectedProjectForEdit = async (projectId) => {\r\n const { selectedProjectLoaded } = this.props;\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setLoading(),\r\n }));\r\n try {\r\n const response = await getSelectedProjectRequest(projectId);\r\n selectedProjectLoaded({ response });\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setLoaded({ response }),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _updateExistingProject = async () => {\r\n const { projectInProgress } = this.state;\r\n const { finishUpdatingExistingProject } = this.props;\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setLoading(),\r\n }));\r\n try {\r\n const response = await editProjectRequest(projectInProgress);\r\n this.shouldBlockNavigation = false;\r\n finishUpdatingExistingProject(response);\r\n } catch (error) {\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _toggleCancelModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showCancelModal: !state.showCancelModal,\r\n };\r\n });\r\n };\r\n\r\n _onCancelAndLeavePage = () => {\r\n const { push } = this.props;\r\n this.shouldBlockNavigation = false;\r\n push(ROUTE_CONSTANTS.HOME_PAGE);\r\n };\r\n\r\n _onSave = () => {\r\n this._updateExistingProject();\r\n };\r\n\r\n _onSectionClick = (id) => {\r\n this.setState({\r\n activeSection: id,\r\n });\r\n };\r\n\r\n _isDeveloperAccessEnabled = () => {\r\n const { projectInProgress } = this.state;\r\n const { checkIfFeatureFlagEnabled } = this.props;\r\n\r\n const isTechSupportStatementAccessEnabled = checkIfFeatureFlagEnabled({\r\n featureName: FEATURE_NAMES.TECH_SUPPORT_STATEMENT_ACCESS_ENABLED,\r\n });\r\n\r\n if (\r\n projectInProgress.hasAdminGroup &&\r\n isTechSupportStatementAccessEnabled\r\n ) {\r\n return true;\r\n } else if (\r\n !projectInProgress.hasAdminGroup &&\r\n projectInProgress.techSupportAccess &&\r\n isTechSupportStatementAccessEnabled\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n };\r\n\r\n render() {\r\n const {\r\n showCancelModal,\r\n projectInProgress,\r\n activeSection,\r\n sectionsElement,\r\n countryList,\r\n } = this.state;\r\n const { projectId } = this.props;\r\n return (\r\n \r\n \r\n \r\n
          \r\n
          \r\n this._toggleCancelModal()}\r\n >\r\n
          \r\n \r\n
          \r\n \r\n
          \r\n

          \r\n \r\n {projectInProgress.name}\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 this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setName(name),\r\n }))\r\n }\r\n setEngagementEntity={(value) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setEngagementEntity(value),\r\n }))\r\n }\r\n setSearch={(value) => {\r\n this.setState({\r\n search: value,\r\n });\r\n }}\r\n setNonAuditEngagementEntityDataHasBeenModified={(value) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setNonAuditEngagementEntityDataHasBeenModified(\r\n value,\r\n ),\r\n }))\r\n }\r\n setIsAuditClient={(checked) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.initNotAuditClient(checked),\r\n }))\r\n }\r\n setClientName={(client) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setClientName(client),\r\n }))\r\n }\r\n setEngagementName={(engagement) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setEngagementName(\r\n engagement,\r\n ),\r\n }))\r\n }\r\n setEngagementFye={(year) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setEngagementFye(year),\r\n }))\r\n }\r\n setNonAuditReason={(option) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setNonAuditReason(option),\r\n }))\r\n }\r\n setProjectCountry={(option) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setCountryOfIssuanceDropdownValue(\r\n option,\r\n ),\r\n }))\r\n }\r\n />\r\n
          \r\n \r\n \r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.addUser(id),\r\n }))\r\n }\r\n assignUserProjectRole={(role, userId) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.assignRoleToUser(\r\n role,\r\n userId,\r\n ),\r\n }))\r\n }\r\n removeUserFromProject={(user) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.removeUser(user),\r\n }))\r\n }\r\n toggleHasAdminGroup={() =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.toggleHasAdminGroup(),\r\n }))\r\n }\r\n toggleTechSupportAccess={() =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.toggleTechSupportAccess(),\r\n }))\r\n }\r\n disableTechSupportAccess={() =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.disableTechSupportAccess(),\r\n }))\r\n }\r\n resetEnabledTechSupportStatementListData={() =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.resetEnabledTechSupportStatementListData(),\r\n }))\r\n }\r\n setSupportId={(val) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setSupportId(val),\r\n }))\r\n }\r\n setEnabledTechSupportStatementList={(val) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setEnabledTechSupportStatementList(\r\n val,\r\n ),\r\n }))\r\n }\r\n removeSelectedTechSupportStatement={(val) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.removeSelectedTechSupportStatement(\r\n val,\r\n ),\r\n }))\r\n }\r\n />\r\n
          \r\n {isProjectExistInAMERegion(projectInProgress) && (\r\n \r\n \r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.toggleHasCoeGroup(),\r\n }))\r\n }\r\n >\r\n \r\n )}\r\n \r\n \r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setActiveStatements(\r\n activeStatements,\r\n ),\r\n }))\r\n }\r\n setWrappedUpStatements={(wrappedUpStatements) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setWrappedUpStatements(\r\n wrappedUpStatements,\r\n ),\r\n }))\r\n }\r\n setDeletedStatements={(deletedStatements) =>\r\n this.setState((state) => ({\r\n projectInProgress:\r\n state.projectInProgress.setDeletedStatements(\r\n deletedStatements,\r\n ),\r\n }))\r\n }\r\n />\r\n \r\n \r\n \r\n \r\n {showCancelModal ? (\r\n \r\n ) : null}\r\n
          \r\n
          \r\n
          \r\n );\r\n }\r\n}\r\n\r\nProjectEdit.propTypes = {\r\n /** Func that fires action that navigates user to home page */\r\n push: PropTypes.func.isRequired,\r\n /** String id of the project that is going to be edited */\r\n projectId: PropTypes.string.isRequired,\r\n /** List of country in a geo */\r\n countryList: PropTypes.instanceOf(CountryForm),\r\n};\r\n\r\nexport default ProjectEdit;\r\n","import { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\n\r\nimport ProjectEditPage from 'pages/project-edit-page';\r\nimport { finishUpdatingExistingProject } from 'store/actions/project-edit-actions';\r\nimport { selectedProjectLoaded } from 'store/actions/selected-project-actions';\r\nimport { checkIfFeatureFlagEnabled } from 'store/actions/selected-statement-actions';\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n currentUser: { data },\r\n },\r\n },\r\n ownprops,\r\n) => ({\r\n currentUser: data,\r\n projectId: ownprops.match.params.id,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n finishUpdatingExistingProject,\r\n checkIfFeatureFlagEnabled,\r\n push,\r\n selectedProjectLoaded,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ProjectEditPage);\r\n","import { push } from 'connected-react-router';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { fetchCurrentUser } from 'store/actions/current-user-actions';\r\nimport { updateSelectedProjectFromID } from 'store/actions/selected-project-actions';\r\n\r\nexport const finishUpdatingExistingProject = (project) => async (\r\n dispatch,\r\n getState,\r\n) => {\r\n const { id: currentUserId } = getState().data.currentUser;\r\n const usersArray = project.data.userEntities;\r\n const doesUserArrayContainCurrentUser = usersArray.some(\r\n (user) => user.id === currentUserId,\r\n );\r\n /**\r\n * Update the current user as the user's project roles are stored there,\r\n * and once this project is edited, the current user's role may no longer be up to date in the stored current user.\r\n * */\r\n dispatch(fetchCurrentUser());\r\n\r\n //Set the project just edited as the currently selected project\r\n // NOTE: do not call this method if the current user removes themselves from the project. this will cause a 403\r\n if (doesUserArrayContainCurrentUser) {\r\n dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: project.data.id,\r\n }),\r\n );\r\n }\r\n\r\n //Navigate to the home page\r\n dispatch(push(ROUTE_CONSTANTS.HOME_PAGE));\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M50.0002 4.17857C75.2019 4.17857 95.8216 24.7982 95.8216 50C95.8216 75.2018 75.2019 95.8214 50.0002 95.8214C24.7984 95.8214 4.17873 75.2018 4.17873 50C4.17873 24.7982 24.7984 4.17857 50.0002 4.17857ZM50 0C22.2917 0 0 22.2917 0 50C0 77.7083 22.2917 100 50 100C77.7083 100 100 77.7083 100 50C100 22.2917 77.7083 0 50 0Z\",\n fill: \"black\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"mask\", {\n id: \"mask0\",\n \"mask-type\": \"alpha\",\n maskUnits: \"userSpaceOnUse\",\n x: 0,\n y: 0,\n width: 100,\n height: 100\n}, React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M50.0002 4.17857C75.2019 4.17857 95.8216 24.7982 95.8216 50C95.8216 75.2018 75.2019 95.8214 50.0002 95.8214C24.7984 95.8214 4.17873 75.2018 4.17873 50C4.17873 24.7982 24.7984 4.17857 50.0002 4.17857ZM50 0C22.2917 0 0 22.2917 0 50C0 77.7083 22.2917 100 50 100C77.7083 100 100 77.7083 100 50C100 22.2917 77.7083 0 50 0Z\",\n fill: \"white\"\n}));\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n mask: \"url(#mask0)\"\n});\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M50.2083 18.75C49.9999 18.75 49.9999 18.75 50.2083 18.75C49.9999 18.75 49.9999 18.75 50.2083 18.75C49.9999 18.75 49.9999 18.75 50.2083 18.75C39.5833 18.75 30.8333 27.2917 30.8333 37.5C30.8333 44.1667 34.3749 49.5833 34.5833 49.7917C37.0833 53.9583 39.7916 59.1667 39.7916 60.4167V66.6667V66.875V67.0833L41.8749 79.5833C42.0833 80.625 42.9166 81.25 43.9583 81.25H56.4583C57.4999 81.25 58.3333 80.4167 58.5416 79.5833L60.6249 67.0833V66.875V66.6667V60.4167C60.6249 59.1667 63.3333 53.75 65.8333 49.7917C66.0416 49.5833 69.7916 44.1667 69.7916 37.5C69.5833 27.2917 60.6249 18.75 50.2083 18.75ZM54.583 77.0833H45.6247L44.1663 68.75H55.833L54.583 77.0833ZM62.2913 47.5C60.833 49.5833 56.2497 57.0833 56.2497 60.4167V64.5833H52.083V48.75L55.6247 45.2083C56.458 44.375 56.458 43.125 55.6247 42.2917C54.7913 41.4583 53.5413 41.4583 52.708 42.2917L49.9997 45L47.2913 42.2917C46.458 41.4583 45.208 41.4583 44.3747 42.2917C43.5413 43.125 43.5413 44.375 44.3747 45.2083L47.9163 48.5417V64.5833H43.7497V60.4167C43.7497 57.2917 39.3747 49.7917 37.9163 47.5C37.9163 47.5 34.7913 42.9167 34.7913 37.5C34.7913 29.5833 41.6663 23.125 49.9997 22.9167C58.333 22.9167 65.208 29.5833 65.208 37.5C65.4163 42.7083 62.2913 47.2917 62.2913 47.5Z\",\n fill: \"black\"\n});\n\nvar SvgEscSupport = function SvgEscSupport(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 100,\n height: 100,\n viewBox: \"0 0 100 100\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgEscSupport, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/ESC-support.693a31ef.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo, useCallback, useState } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { useDropzone } from 'react-dropzone';\r\nimport {\r\n MAX_STATEMENT_FILE_SIZE,\r\n getStatementSupportedFileTypes,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport Card from 'components/common/card-component';\r\nimport ProgressBarStep from 'components/common/progress-bar-step-component';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { ReactComponent as Document } from 'icons/document.svg';\r\nimport { ReactComponent as ESC } from 'icons/ESC-support.svg';\r\nimport { ReactComponent as Clear } from 'icons/cross.svg';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { isProjectExistInAMERegion } from 'utils/project-utils';\r\n// import { getBetaStmtGuide } from 'api/statement-creation-edit-api';\r\n// import { downloadFile } from 'utils/statement-export-utils';\r\nimport StatementForm from 'models/form/statement-form-model';\r\n\r\nexport const SELECT_STATEMENT_BLOCK = 'select-statement';\r\nexport const SELECT_STATEMENT_ID_BLOCK = 'id-select-statement';\r\nconst DOCUMENT_ICON_SIZE = '100px';\r\nconst CLEAR_ICON_SIZE = '20px';\r\n\r\n/** For dropzone documentation visit https://react-dropzone.netlify.com/ */\r\nconst SelectStatement = ({\r\n setFiles,\r\n setFilesError,\r\n statementInProgress,\r\n project,\r\n featureInfo,\r\n}) => {\r\n const onDrop = useCallback(\r\n (acceptedFiles, rejectedFiles) => {\r\n if (acceptedFiles.length) {\r\n setSelectStatementButtonDisabled(true);\r\n setFiles(acceptedFiles);\r\n }\r\n if (rejectedFiles.length) {\r\n //We can only upload one file in this modal\r\n setFilesError(rejectedFiles);\r\n }\r\n },\r\n [setFiles, setFilesError],\r\n );\r\n const onFileDialogCancel = () => {\r\n if (!statementInProgress.hasUploadedFiles()) {\r\n setSelectStatementButtonDisabled(false);\r\n }\r\n };\r\n\r\n const projectGeo = project.geoCode;\r\n\r\n // const _getBetaStmtGuide = async (event) => {\r\n // event.preventDefault();\r\n // try {\r\n // const response = await getBetaStmtGuide();\r\n // downloadFile(response);\r\n // } catch (error) {\r\n // console.error(error);\r\n // }\r\n // };\r\n\r\n const [selectStatementButtonDisabled, setSelectStatementButtonDisabled] =\r\n useState(false);\r\n const { getRootProps, getInputProps, open, isDragActive } = useDropzone({\r\n accept: getStatementSupportedFileTypes({\r\n pdfUploadEnabled: featureInfo.getOCREnabled(projectGeo),\r\n }),\r\n multiple: false,\r\n onDrop,\r\n onFileDialogCancel,\r\n maxSize: MAX_STATEMENT_FILE_SIZE,\r\n });\r\n const _isFileError = statementInProgress.hasFileError();\r\n return (\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 {_isFileError ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n
          \r\n \r\n \r\n
          \r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n e.stopPropagation()}\r\n >\r\n {chunks},\r\n br: (
          ),\r\n evaluationGuide: (\r\n \r\n \r\n \r\n ),\r\n },\r\n }}\r\n isInternationalized={true}\r\n isInteractive={false}\r\n width={'100%'}\r\n />\r\n \r\n \r\n \r\n ),\r\n },\r\n }}\r\n isInternationalized={true}\r\n width={'100%'}\r\n />\r\n
          \r\n {statementInProgress.hasUploadedFiles() ? (\r\n \r\n {statementInProgress.files.map((file, i) => (\r\n \r\n \r\n {file.name}\r\n
          \r\n {\r\n e.stopPropagation(); //nessarry because all clicks inside the dropzone trigger upload\r\n setFiles(null);\r\n setSelectStatementButtonDisabled(false);\r\n }}\r\n />\r\n
          \r\n ))}\r\n \r\n ) : null}\r\n {\r\n e.stopPropagation(); //nessarry because all clicks inside the dropzone trigger upload\r\n setSelectStatementButtonDisabled(true);\r\n open();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {isProjectExistInAMERegion(project) && (\r\n \r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n {\r\n window.open(ROUTE_CONSTANTS.ESC_SUPPORT);\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\nSelectStatement.propTypes = {\r\n /** function used to set the uploaded file to the statementInProgress object. */\r\n setFiles: PropTypes.func.isRequired,\r\n /** function used to signal that a file was rejected by the react dropzone based on business criteria */\r\n setFilesError: PropTypes.func.isRequired,\r\n /** Object representing the working copy of the statement being created.*/\r\n statementInProgress: PropTypes.instanceOf(StatementForm).isRequired,\r\n};\r\n\r\nexport default memo(SelectStatement);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M336 275L126 485h806c13 0 23 10 23 23s-10 23-23 23H126l210 210c11 11 11 21 0 32-5 5-10 7-16 7s-11-2-16-7L55 524c-11-11-11-21 0-32l249-249c21-22 53 10 32 32z\"\n});\n\nvar SvgLeftArrow = function SvgLeftArrow(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n focusable: \"false\",\n viewBox: \"0 0 1000 1000\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgLeftArrow, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/left-arrow.9b2d6dcf.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M694 242l249 250c12 11 12 21 1 32L694 773c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210-210H68c-13 0-23-10-23-23s10-23 23-23h806L662 275c-21-22 11-54 32-33z\"\n});\n\nvar SvgRightArrow = function SvgRightArrow(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n focusable: \"false\",\n viewBox: \"0 0 1000 1000\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRightArrow, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/right-arrow.8b16d230.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Symbols\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Calendar-\",\n transform: \"translate(-6.000000, -5.000000)\",\n fill: \"#63666a\",\n fillRule: \"nonzero\",\n className: \"calendar-icon-svg\"\n}, React.createElement(\"g\", {\n id: \"calendar\",\n transform: \"translate(6.000000, 5.000000)\"\n}, React.createElement(\"path\", {\n d: \"M14.8886957,1.50956522 L11.9947826,1.50956522 L11.9947826,0.930434783 C11.9947826,0.610434783 11.7356522,0.351304348 11.4156522,0.351304348 C11.0975652,0.351304348 10.8366957,0.610434783 10.8366957,0.930434783 L10.8366957,1.50956522 L5.05043478,1.50956522 L5.05043478,0.930434783 C5.05043478,0.610434783 4.79130435,0.351304348 4.47130435,0.351304348 C4.15130435,0.351304348 3.89217391,0.610434783 3.89217391,0.930434783 L3.89217391,1.50956522 L0.99826087,1.50956522 C0.67826087,1.50956522 0.419130435,1.76695652 0.419130435,2.08695652 L0.419130435,15.9773913 C0.419130435,16.2973913 0.67826087,16.5566957 0.99826087,16.5566957 L14.8886957,16.5566957 C15.2086957,16.5566957 15.4678261,16.2973913 15.4678261,15.9773913 L15.4678261,2.08695652 C15.4678261,1.76695652 15.2086957,1.50956522 14.8886957,1.50956522 Z M14.3095652,15.4 L1.5773913,15.4 L1.5773913,2.66608696 L3.89217391,2.66608696 L3.89217391,3.24521739 C3.89217391,3.56521739 4.15130435,3.82434783 4.47130435,3.82434783 C4.79130435,3.82434783 5.05043478,3.56521739 5.05043478,3.24521739 L5.05043478,2.66608696 L10.8366957,2.66608696 L10.8366957,3.24521739 C10.8366957,3.56521739 11.0975652,3.82434783 11.4156522,3.82434783 C11.7356522,3.82434783 11.9947826,3.56521739 11.9947826,3.24521739 L11.9947826,2.66608696 L14.3095652,2.66608696 L14.3095652,15.4 Z M3.89217391,6.13913043 C3.89217391,6.45913043 3.63304348,6.71826087 3.31304348,6.71826087 C2.99304348,6.71826087 2.73391304,6.45913043 2.73391304,6.13913043 C2.73391304,5.81913043 2.99304348,5.56 3.31304348,5.56 C3.63304348,5.56 3.89217391,5.81913043 3.89217391,6.13913043 Z M6.20695652,6.13913043 C6.20695652,6.45913043 5.94782609,6.71826087 5.62782609,6.71826087 C5.30956522,6.71826087 5.05043478,6.45913043 5.05043478,6.13913043 C5.05043478,5.81913043 5.30956522,5.56 5.62782609,5.56 C5.94782609,5.56 6.20695652,5.81913043 6.20695652,6.13913043 Z M8.52173913,6.13913043 C8.52173913,6.45913043 8.2626087,6.71826087 7.94452174,6.71826087 C7.62434783,6.71826087 7.36521739,6.45913043 7.36521739,6.13913043 C7.36521739,5.81913043 7.62434783,5.56 7.94452174,5.56 C8.2626087,5.56 8.52173913,5.81913043 8.52173913,6.13913043 Z M3.89217391,8.45391304 C3.89217391,8.77391304 3.63304348,9.03304348 3.31304348,9.03304348 C2.99304348,9.03304348 2.73391304,8.77391304 2.73391304,8.45391304 C2.73391304,8.13391304 2.99304348,7.87495652 3.31304348,7.87495652 C3.63304348,7.87495652 3.89217391,8.13391304 3.89217391,8.45391304 Z M6.20695652,8.45391304 C6.20695652,8.77391304 5.94782609,9.03304348 5.62782609,9.03304348 C5.30956522,9.03304348 5.05043478,8.77391304 5.05043478,8.45391304 C5.05043478,8.13391304 5.30956522,7.87495652 5.62782609,7.87495652 C5.94782609,7.87495652 6.20695652,8.13391304 6.20695652,8.45391304 Z M8.52173913,8.45391304 C8.52173913,8.77391304 8.2626087,9.03304348 7.94452174,9.03304348 C7.62434783,9.03304348 7.36521739,8.77391304 7.36521739,8.45391304 C7.36521739,8.13391304 7.62434783,7.87495652 7.94452174,7.87495652 C8.2626087,7.87495652 8.52173913,8.13391304 8.52173913,8.45391304 Z M10.8366957,6.13913043 C10.8366957,6.45913043 10.5791304,6.71826087 10.2591304,6.71826087 C9.93913043,6.71826087 9.68,6.45913043 9.68,6.13913043 C9.68,5.81913043 9.93913043,5.56 10.2591304,5.56 C10.5791304,5.56 10.8366957,5.81913043 10.8366957,6.13913043 Z M10.8366957,8.45391304 C10.8366957,8.77391304 10.5791304,9.03304348 10.2591304,9.03304348 C9.93913043,9.03304348 9.68,8.77391304 9.68,8.45391304 C9.68,8.13391304 9.93913043,7.87495652 10.2591304,7.87495652 C10.5791304,7.87495652 10.8366957,8.13391304 10.8366957,8.45391304 Z M12.573913,5.56 C12.893913,5.56 13.1530435,5.81913043 13.1530435,6.13913043 C13.1530435,6.45913043 12.893913,6.71826087 12.573913,6.71826087 C12.253913,6.71826087 11.9947826,6.45913043 11.9947826,6.13913043 C11.9947826,5.81913043 12.253913,5.56 12.573913,5.56 Z M13.1530435,8.45391304 C13.1530435,8.77391304 12.893913,9.03304348 12.573913,9.03304348 C12.253913,9.03304348 11.9947826,8.77391304 11.9947826,8.45391304 C11.9947826,8.13391304 12.253913,7.87495652 12.573913,7.87495652 C12.893913,7.87495652 13.1530435,8.13391304 13.1530435,8.45391304 Z M3.89217391,10.7686957 C3.89217391,11.0888696 3.63304348,11.3478261 3.31304348,11.3478261 C2.99304348,11.3478261 2.73391304,11.0888696 2.73391304,10.7686957 C2.73391304,10.4488696 2.99304348,10.1895652 3.31304348,10.1895652 C3.63304348,10.1895652 3.89217391,10.4488696 3.89217391,10.7686957 Z M6.20695652,10.7686957 C6.20695652,11.0888696 5.94782609,11.3478261 5.62782609,11.3478261 C5.30956522,11.3478261 5.05043478,11.0888696 5.05043478,10.7686957 C5.05043478,10.4488696 5.30956522,10.1895652 5.62782609,10.1895652 C5.94782609,10.1895652 6.20695652,10.4488696 6.20695652,10.7686957 Z M8.52173913,10.7686957 C8.52173913,11.0888696 8.2626087,11.3478261 7.94452174,11.3478261 C7.62434783,11.3478261 7.36521739,11.0888696 7.36521739,10.7686957 C7.36521739,10.4488696 7.62434783,10.1895652 7.94452174,10.1895652 C8.2626087,10.1895652 8.52173913,10.4488696 8.52173913,10.7686957 Z M10.8366957,10.7686957 C10.8366957,11.0888696 10.5791304,11.3478261 10.2591304,11.3478261 C9.93913043,11.3478261 9.68,11.0888696 9.68,10.7686957 C9.68,10.4488696 9.93913043,10.1895652 10.2591304,10.1895652 C10.5791304,10.1895652 10.8366957,10.4488696 10.8366957,10.7686957 Z M13.1530435,10.7686957 C13.1530435,11.0888696 12.893913,11.3478261 12.573913,11.3478261 C12.253913,11.3478261 11.9947826,11.0888696 11.9947826,10.7686957 C11.9947826,10.4488696 12.253913,10.1895652 12.573913,10.1895652 C12.893913,10.1895652 13.1530435,10.4488696 13.1530435,10.7686957 Z M8.52173913,13.0834783 C8.52173913,13.4034783 8.2626087,13.6627826 7.94452174,13.6627826 C7.62434783,13.6627826 7.36521739,13.4034783 7.36521739,13.0834783 C7.36521739,12.7652174 7.62434783,12.506087 7.94452174,12.506087 C8.2626087,12.506087 8.52173913,12.7652174 8.52173913,13.0834783 Z M10.8366957,13.0834783 C10.8366957,13.4034783 10.5791304,13.6627826 10.2591304,13.6627826 C9.93913043,13.6627826 9.68,13.4034783 9.68,13.0834783 C9.68,12.7652174 9.93913043,12.506087 10.2591304,12.506087 C10.5791304,12.506087 10.8366957,12.7652174 10.8366957,13.0834783 Z M6.20695652,13.0834783 C6.20695652,13.4034783 5.94782609,13.6627826 5.62782609,13.6627826 C5.30956522,13.6627826 5.05043478,13.4034783 5.05043478,13.0834783 C5.05043478,12.7652174 5.30956522,12.506087 5.62782609,12.506087 C5.94782609,12.506087 6.20695652,12.7652174 6.20695652,13.0834783 Z M3.89217391,13.0834783 C3.89217391,13.4034783 3.63304348,13.6627826 3.31304348,13.6627826 C2.99304348,13.6627826 2.73391304,13.4034783 2.73391304,13.0834783 C2.73391304,12.7652174 2.99304348,12.506087 3.31304348,12.506087 C3.63304348,12.506087 3.89217391,12.7652174 3.89217391,13.0834783 Z\"\n}))));\n\nvar SvgCalendar = function SvgCalendar(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"16px\",\n height: \"17px\",\n viewBox: \"0 0 16 17\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCalendar, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/calendar.0f38fe68.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M32 713l453-453c11-11 21-11 32 0l453 453c5 5 7 10 7 16 0 13-10 23-22 23-7 0-12-2-16-7L501 309 64 745c-4 5-9 7-15 7-7 0-12-2-17-7-9-11-9-21 0-32z\"\n});\n\nvar SvgChevronUp = function SvgChevronUp(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n focusable: \"false\",\n viewBox: \"0 0 1000 1000\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgChevronUp, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/chevron-up.db1a87b0.svg\";\nexport { ForwardRef as ReactComponent };","/* eslint-disable react-hooks/exhaustive-deps */\r\nimport React, { useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport moment from 'moment';\r\nimport { ReactComponent as LeftArrowIcon } from 'icons/left-arrow.svg';\r\nimport { ReactComponent as RightArrowIcon } from 'icons/right-arrow.svg';\r\nimport { ReactComponent as Calendar } from 'icons/calendar.svg';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\nimport FormItem from 'components/common/form-item-component';\r\nimport { ReactComponent as UpArrow } from 'icons/chevron-up.svg';\r\nimport useOutsideClick from 'components/hooks/useOutsideClick';\r\nimport {\r\n DATE_FORMATS,\r\n DateFormatRegex,\r\n button,\r\n closeButton,\r\n dateInput,\r\n arrowIcons,\r\n DatePicker,\r\n calendar,\r\n directionIcon,\r\n months,\r\n ARROW_ICON_SIZE,\r\n CALENDAR_ICON_SIZE,\r\n CLEAR_ICON_SIZE,\r\n clrButton,\r\n weekDays,\r\n} from 'constants/util/date-constants';\r\nimport { FormattedMessage, useIntl } from 'react-intl';\r\n\r\nconst CustomDatePicker = ({\r\n id,\r\n format,\r\n width,\r\n className,\r\n disabled,\r\n errorText,\r\n isValid,\r\n label,\r\n required,\r\n tooltip,\r\n onDateChange,\r\n placeHolder,\r\n selectedDate,\r\n shoudlDisablePastDate,\r\n startDate,\r\n endDate,\r\n isFormItemRequired,\r\n}) => {\r\n const [dateValue, setDateValue] = useState('');\r\n const [calendarDate, setCalendarDate] = useState(new Date());\r\n const [showCalendar, setShowCalendar] = useState(false);\r\n const [dateFormat, setDateFormat] = useState(DATE_FORMATS.MONTH_DAY_YEAR);\r\n const [isValidDate, setIsValidDate] = useState(true);\r\n const [disablePastDate, setDisablePastDate] = useState(false);\r\n const isDateSelected = dateValue !== '';\r\n const [showFormItem, setShowFormItem] = useState(true);\r\n const [dateContainer] = useOutsideClick(() => setShowCalendar(false)); // used to handle outside click\r\n const intl = useIntl();\r\n\r\n //On change event method based on the user selecting a date from the calendar with selected date and month as parameters...\r\n const selectDate = (day, month, year) => {\r\n let date = moment({ year, month, date: day });\r\n setDateValue(date.format(dateFormat));\r\n onDateChange(date);\r\n toggleCalendar();\r\n };\r\n\r\n //Toggle method is used to toggle the calendar for date selection...\r\n const toggleCalendar = () => {\r\n setShowCalendar(!showCalendar);\r\n };\r\n\r\n /**this life cycle method is used to update the local variables based on the props passed from the parent component such as\r\n * Selected date, validating the selected date or entered date & past date disabling property from the parent component */\r\n useEffect(() => {\r\n if (!isNullOrUndefined(format)) {\r\n setDateFormat(format);\r\n }\r\n if (!isNullOrUndefined(selectedDate)) {\r\n let value = moment(selectedDate).format(dateFormat);\r\n setDateValue(value);\r\n setCalendarDate(\r\n new Date(\r\n new Date(value).getFullYear(),\r\n new Date(value).getMonth(),\r\n new Date(value).getDate(),\r\n ),\r\n );\r\n } else {\r\n setDateValue('');\r\n }\r\n setIsValidDate(isValid);\r\n if (!isNullOrUndefined(shoudlDisablePastDate)) {\r\n setDisablePastDate(shoudlDisablePastDate);\r\n }\r\n if (!isFormItemRequired) {\r\n setShowFormItem(isFormItemRequired);\r\n }\r\n }, [selectedDate, isValid, shoudlDisablePastDate, isFormItemRequired]);\r\n\r\n // resets the current calendar when the user opens the calendar and moves to the next month of the calendar based on selected date values.\r\n useEffect(() => {\r\n if (selectedDate && showCalendar) {\r\n let value = moment(selectedDate.format(dateFormat));\r\n setCalendarDate(\r\n new Date(\r\n new Date(value).getFullYear(),\r\n new Date(value).getMonth(),\r\n new Date(value).getDate(),\r\n ),\r\n );\r\n } else if (showCalendar) {\r\n setCalendarDate(new Date());\r\n }\r\n }, [showCalendar]);\r\n\r\n // this generic value is used to get value of current month\r\n const currentMonth = calendarDate.getMonth() + 1;\r\n\r\n // this generic value is used to get value of current year\r\n const currentYear = calendarDate.getFullYear();\r\n\r\n // this function is used to check if two dates represent the same day\r\n const isSameDay = (date1, date2) => {\r\n return (\r\n date1.getFullYear() === date2.getFullYear() &&\r\n date1.getMonth() === date2.getMonth() &&\r\n date1.getDate() === date2.getDate()\r\n );\r\n };\r\n\r\n /** this generic method is used to get the calendar and CSS classnames based on certain conditions such as\r\n * past dates are enabled/disbaled based on disablePastDate value and\r\n * disabling the date specified with in the range based on the startDate and endDate values from parent components.\r\n */\r\n const refreshCalendar = () => {\r\n const currentYear = calendarDate.getFullYear();\r\n const currentMonth = calendarDate.getMonth();\r\n const currentDate = new Date();\r\n const firstDayOfMonth = new Date(currentYear, currentMonth, 1);\r\n const daysInMonth = new Date(currentYear, currentMonth + 1, 0).getDate();\r\n const startDay = firstDayOfMonth.getDay();\r\n\r\n const calendarDays = [];\r\n\r\n // Fill in the days of the previous month\r\n for (let i = 0; i < startDay; i++) {\r\n const prevMonthDays = new Date(currentYear, currentMonth, -i).getDate();\r\n // Check if the date is in the past\r\n const dateToCheck = new Date(\r\n currentYear,\r\n currentMonth - 1,\r\n prevMonthDays,\r\n );\r\n const isPastDate = disablePastDate ? dateToCheck < currentDate : false;\r\n // Check if the date is in within range\r\n const isDateOutOfRange = isDateOutOfRangeValue(\r\n dateToCheck,\r\n startDate,\r\n endDate,\r\n );\r\n const prevYear = currentMonth === 0 ? currentYear - 1 : currentYear;\r\n calendarDays.unshift(\r\n \r\n !(isPastDate || isDateOutOfRange) &&\r\n selectDate(\r\n prevMonthDays,\r\n currentMonth === 0\r\n ? prevYear === currentYear - 1\r\n ? 11\r\n : currentMonth\r\n : currentMonth - 1,\r\n prevYear,\r\n )\r\n }\r\n >\r\n {prevMonthDays}\r\n ,\r\n );\r\n }\r\n\r\n // Fill in the days of the current month\r\n for (let i = 1; i <= daysInMonth; i++) {\r\n // Check if the date is in the past\r\n const dateToCheck = new Date(currentYear, currentMonth, i);\r\n const isPastDate = disablePastDate\r\n ? dateToCheck < currentDate && !isSameDay(dateToCheck, currentDate)\r\n : false;\r\n // Check if the date is in within range\r\n const isDateOutOfRange = isDateOutOfRangeValue(\r\n dateToCheck,\r\n startDate,\r\n endDate,\r\n );\r\n calendarDays.push(\r\n \r\n !(isPastDate || isDateOutOfRange) &&\r\n selectDate(i, currentMonth, currentYear)\r\n }\r\n >\r\n {i}\r\n ,\r\n );\r\n }\r\n\r\n // Fill in the days of the next month\r\n const remainingDays = 6 - ((startDay + daysInMonth - 1) % 7);\r\n for (let i = 1; i <= remainingDays; i++) {\r\n const dateToCheck = new Date(currentYear, currentMonth + 1, i);\r\n // Check if the date is in within range\r\n const isDateOutOfRange = endDate ? dateToCheck > endDate : false;\r\n const nextYear = currentMonth + 1 === 12 ? currentYear + 1 : currentYear;\r\n calendarDays.push(\r\n \r\n !isDateOutOfRange &&\r\n selectDate(\r\n i,\r\n currentMonth + 1 === 12\r\n ? nextYear === currentYear + 1\r\n ? 0\r\n : currentMonth\r\n : currentMonth + 1,\r\n nextYear,\r\n )\r\n }\r\n >\r\n {i}\r\n ,\r\n );\r\n }\r\n\r\n return calendarDays;\r\n };\r\n\r\n const isDateOutOfRangeValue = (dateToCheck, startDate, endDate) => {\r\n return startDate && endDate\r\n ? dateToCheck < startDate && dateToCheck > endDate\r\n : false;\r\n };\r\n\r\n // this method is used to enable the CSS for currentDay with in the calendar.\r\n const getStyleForCurrentDate = () => {\r\n if (\r\n isDateSelected &&\r\n currentYear === new Date(dateValue).getFullYear() &&\r\n currentMonth === new Date(dateValue).getMonth() + 1\r\n ) {\r\n return new Date(dateValue).getDate();\r\n } else {\r\n return 0;\r\n }\r\n };\r\n\r\n // this method is used to view the previous month's calendar based on user click on the calendar.\r\n const prevMonth = () => {\r\n setCalendarDate((prevDate) => {\r\n return new Date(prevDate.getFullYear(), prevDate.getMonth() - 1, 1);\r\n });\r\n };\r\n\r\n // this method is used to view the next/upcoming month's calendar based on user click on the calendar.\r\n const nextMonth = () => {\r\n setCalendarDate((prevDate) => {\r\n return new Date(prevDate.getFullYear(), prevDate.getMonth() + 1, 1);\r\n });\r\n };\r\n\r\n // this onChange method allows user to enter a date and updates the validates the user entered date is valid or not.\r\n const onChange = (e) => {\r\n const date = e.target.value;\r\n setDateValue(date);\r\n\r\n if (!DateFormatRegex(dateFormat).test(date)) {\r\n setIsValidDate(false);\r\n onDateChange(date);\r\n } else {\r\n let correctDate = !isNaN(Date.parse(date));\r\n if (correctDate) {\r\n setIsValidDate(isValid);\r\n onDateChange(moment.utc(date));\r\n } else {\r\n setIsValidDate(false);\r\n onDateChange(date);\r\n }\r\n }\r\n };\r\n\r\n // this method is us to clear the selected date or user entered date.\r\n const clearDate = () => {\r\n setDateValue('');\r\n onDateChange(null);\r\n setIsValidDate(false);\r\n toggleCalendar();\r\n };\r\n\r\n const calendarDays = refreshCalendar();\r\n\r\n const dateComponentContent = () => {\r\n return (\r\n
          \r\n \r\n \r\n \r\n \r\n onChange(e)}\r\n onClick={!disabled && toggleCalendar}\r\n />\r\n {isDateSelected && (\r\n clearDate()}\r\n >\r\n \r\n \r\n )}\r\n
          \r\n\r\n {showCalendar && (\r\n
          \r\n
          \r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n \r\n
          \r\n \r\n {currentYear}\r\n \r\n \r\n \r\n
          \r\n
          \r\n
          \r\n {weekDays.map((weekDay) => (\r\n {weekDay}\r\n ))}\r\n
          \r\n
          \r\n {calendarDays.map((dayElement) => dayElement)}\r\n
          \r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n };\r\n\r\n return (\r\n <>\r\n {showFormItem ? (\r\n \r\n {dateComponentContent()}\r\n \r\n ) : (\r\n <>{dateComponentContent()}\r\n )}\r\n \r\n );\r\n};\r\n\r\nCustomDatePicker.defaultProps = {\r\n format: DATE_FORMATS.MONTH_DAY_YEAR,\r\n width: '25%',\r\n disabled: false,\r\n errorText: false,\r\n isValid: true,\r\n required: false,\r\n selectedDate: '',\r\n isReadOnly: false,\r\n isFormItemRequired: true,\r\n};\r\n\r\nCustomDatePicker.PropsTypes = {\r\n /** Unique string id for date picker */\r\n id: PropTypes.string,\r\n /** String representing that format of date that need to selected */\r\n format: PropTypes.string,\r\n /** String percentage representing width of component passed to form item */\r\n width: PropTypes.string,\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** String error copy passed to form item */\r\n disabled: PropTypes.bool,\r\n /** String error copy passed to form item */\r\n errorText: PropTypes.string,\r\n /** Boolean representing if dateComponent output is valid */\r\n isValid: PropTypes.bool,\r\n /** Internationalized Sting id passed to form item */\r\n label: PropTypes.string,\r\n /** Booledn representing if dateComponent field as mandatory */\r\n required: PropTypes.bool,\r\n /** Object with tool tip options passed to form item */\r\n tooltip: PropTypes.string,\r\n /** Function fired when date is changed. return moment object */\r\n onDateChange: PropTypes.func.isRequired,\r\n /** string representing the value that needs to be displayed with the date field */\r\n placeHolder: PropTypes.string,\r\n /** Moment object representing date selected */\r\n selectedDate: PropTypes.string,\r\n /** Boolean representing if past dates to be disable */\r\n shoudlDisablePastDate: PropTypes.bool,\r\n /** string in new Date(values) format representing to startDate which allows users to selection */\r\n startDate: PropTypes.string,\r\n /** string in new Date(values) format representing to endDate which allows users to selection */\r\n endDate: PropTypes.string,\r\n /** Boolean representing whether formItem element is required or not by default it should true and false is used only for other re-usable components */\r\n isFormItemRequired: PropTypes.bool,\r\n};\r\n\r\nexport default CustomDatePicker;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\nimport moment from 'moment';\r\n\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport ProgressBarStep from 'components/common/progress-bar-step-component';\r\nimport Card from 'components/common/card-component';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { fetchStatementCreationPageData } from 'store/actions/statement-creation-page-data-actions';\r\nimport CustomDatePicker from 'constants/feature/dateComponent/customDatePicker';\r\nimport { ReactComponent as Information } from 'icons/icon-information-tooltip.svg';\r\nimport {\r\n STATEMENT_TYPE_OPTIONS,\r\n QUARTER_OPTIONS,\r\n FISCAL_YEAR_OPTIONS,\r\n ACCOUNTING_BASIS_OPTIONS,\r\n REGISTRANT_OPTIONS,\r\n SCALING_OPTIONS,\r\n UNIT_OPTIONS,\r\n LEGAL_HOLD_TOOLTIP,\r\n ENABLE_LEGAL_HOLD_TOOLTIP,\r\n ENABLE_AUTO_IR_TOOLTIP,\r\n AUTO_IR_TOOLTIP,\r\n ENABLE_COMFORT_LETTER_TOOLTIP,\r\n DISABLED_COMFORT_LETTER_TOOLTIP,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport StatementForm from 'models/form/statement-form-model';\r\nimport RolesUtil from 'permissions/utils/roles';\r\nimport StatementCreationPageData from 'models/api/statement-creation-page-data-api-model';\r\nimport { ReactComponent as InfoIcon } from 'icons/icon-information-tooltip.svg';\r\nimport { SearchDropdownApi } from 'components/common/search-component';\r\nimport MenuApiData from 'models/utils/common/menu/menu-api-data-model';\r\n\r\nexport const STATEMENT_INFO_BLOCK = 'statement-info';\r\nexport const SEARCH_DROPDOWN_CLOSE_ICON_SIZE = '23px';\r\nconst MAXIMUM_SEARCH_DROPDOWN_HEIGHT = 450; //px\r\nconst SEARCH_DROPDOWN_NO_RESULT_MESSAGE = 'common.search.no-results-found';\r\nconst STATEMENT_INFO_ID_BLOCK = 'statement-info-id';\r\nconst INFORMATION_ICON_SIZE = '18px';\r\nconst LANGUAGE_DROPDOWN_DISPLAY_LIMIT = 5;\r\nconst MIN_CHAR_LENGTH_TO_SEARCH = 2;\r\nconst PDF_STATEMENT_FILE_TYPE = 'application/pdf';\r\n\r\nexport class StatementInfo extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n search: '',\r\n hasBeenOpened: false,\r\n visitedPeriodEnding: false,\r\n visitedWrapUp: false,\r\n };\r\n }\r\n componentDidMount() {\r\n const { fetchStatementCreationPageData } = this.props;\r\n fetchStatementCreationPageData();\r\n }\r\n componentDidUpdate(prevProps) {\r\n const setPeriodEndingDateInputNode = document.getElementById(\r\n `${STATEMENT_INFO_ID_BLOCK}-period-ending`,\r\n );\r\n const setWrapUpDateInputNode = document.getElementById(\r\n `${STATEMENT_INFO_ID_BLOCK}-wrap-up`,\r\n );\r\n const { statementInProgress } = this.props;\r\n if (\r\n statementInProgress.hasNewFileBeenUploaded(prevProps.statementInProgress)\r\n ) {\r\n //If the file has changed and it is valid, expand step 2.\r\n if (statementInProgress.isStepOneValid()) {\r\n this.setState({\r\n search: '',\r\n hasBeenOpened: true,\r\n visitedPeriodEnding: false,\r\n visitedWrapUp: false,\r\n });\r\n setPeriodEndingDateInputNode &&\r\n (setPeriodEndingDateInputNode.value = '');\r\n setWrapUpDateInputNode && (setWrapUpDateInputNode.value = '');\r\n } else {\r\n //Otherwise do not.\r\n this.setState({\r\n hasBeenOpened: false,\r\n });\r\n }\r\n }\r\n }\r\n\r\n _searchLanguages = (val) => {\r\n this.setState({ search: val });\r\n };\r\n _setLanguage = (option) => {\r\n const { setLanguageType } = this.props;\r\n this.setState({ search: option.title });\r\n setLanguageType(option);\r\n };\r\n _onClearLanguage = () => {\r\n const { setLanguageType } = this.props;\r\n this.setState({ search: '' });\r\n setLanguageType(null);\r\n };\r\n\r\n render() {\r\n const { search, hasBeenOpened, visitedPeriodEnding, visitedWrapUp } =\r\n this.state;\r\n const {\r\n statementInProgress,\r\n setStatementName,\r\n setStatementType,\r\n setDateFormat,\r\n setNumberFormat,\r\n setQuarter,\r\n setFiscalYear,\r\n setPeriodEndingDate,\r\n setAccountingBasis,\r\n setRegistrant,\r\n setWrapUpDate,\r\n setLegalHold,\r\n setAutoIdentifyIrs,\r\n setComfortLetter,\r\n setDefaultScaling,\r\n setDefaultUnit,\r\n statementCreationPageData,\r\n } = this.props;\r\n const _stepTwoValid = statementInProgress.isStepTwoValid();\r\n const projectId = statementInProgress.data.clientId;\r\n const hasPermissionToEnableLegalHold =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectId);\r\n const hasPermissionToEnableAutoIr =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectId) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectId);\r\n\r\n const hasPermissionToEnableComfortLetter =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectId) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectId);\r\n\r\n const isStatementTypePDF = () => {\r\n return (\r\n !!statementInProgress.data.files.length &&\r\n statementInProgress.data.files[0].type === PDF_STATEMENT_FILE_TYPE\r\n );\r\n };\r\n\r\n return (\r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n

          \r\n \r\n

          \r\n {hasBeenOpened ? (\r\n \r\n
          \r\n \r\n
          \r\n \r\n this.setState({\r\n visitedStatementName: true,\r\n })\r\n }\r\n width={'25%'}\r\n onChange={setStatementName}\r\n isValid={statementInProgress.isStatementNameValid()}\r\n errorText={\r\n statementInProgress.doesStatementNameExist()\r\n ? 'statement-create.statement-info.statement-name.too-long-error'\r\n : 'common.error-text.required'\r\n }\r\n type={'text'}\r\n value={statementInProgress.statementName}\r\n />\r\n \r\n\r\n {\r\n setDateFormat(option);\r\n }}\r\n options={statementCreationPageData.dateFormatMenuOptions}\r\n value={statementInProgress.dateformatId}\r\n />\r\n {\r\n setNumberFormat(option);\r\n }}\r\n options={\r\n statementCreationPageData.numberFormatMenuOptions\r\n }\r\n value={statementInProgress.numberFormatId}\r\n />\r\n
          \r\n
          \r\n {\r\n setStatementType(option);\r\n // clear quarter if statement type changes so not stored for values other than 10-Q and Private Quarterly\r\n setQuarter(null);\r\n }}\r\n options={STATEMENT_TYPE_OPTIONS}\r\n value={statementInProgress.statementTypeId}\r\n />\r\n \r\n \r\n {\r\n this.setState({\r\n visitedPeriodEnding: true,\r\n });\r\n }}\r\n isFormItemRequired={true}\r\n errorText={'common.error-text.invalid-date'}\r\n isValid={\r\n !visitedPeriodEnding ||\r\n statementInProgress.isPeriodEndingValid()\r\n }\r\n width={'25%'}\r\n onDateChange={(val) => {\r\n if (val instanceof moment) {\r\n if (!visitedPeriodEnding) {\r\n this.setState({\r\n visitedPeriodEnding: true,\r\n });\r\n }\r\n setPeriodEndingDate(val);\r\n }\r\n }}\r\n selectedDate={statementInProgress.periodEnding}\r\n />\r\n
          \r\n
          \r\n \r\n {\r\n if (val instanceof moment) {\r\n if (!visitedWrapUp) {\r\n this.setState({\r\n visitedWrapUp: true,\r\n });\r\n }\r\n setWrapUpDate(val);\r\n }\r\n }}\r\n isFormItemRequired={true}\r\n selectedDate={statementInProgress.archiveDate}\r\n onClose={() => {\r\n this.setState({\r\n visitedWrapUp: true,\r\n });\r\n }}\r\n errorText={'common.error-text.invalid-date'}\r\n isValid={\r\n !visitedWrapUp || statementInProgress.isWrapUpValid()\r\n }\r\n />\r\n \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {\r\n setAutoIdentifyIrs(\r\n !statementInProgress.autoIdentifyIrs,\r\n );\r\n }}\r\n label={'statement-create.statement-info.auto-ir.label'}\r\n width={'auto'}\r\n isValid={true}\r\n disabled={!hasPermissionToEnableAutoIr}\r\n tooltip={\r\n !hasPermissionToEnableAutoIr\r\n ? ENABLE_AUTO_IR_TOOLTIP\r\n : null\r\n }\r\n />\r\n \r\n \r\n \r\n
          \r\n\r\n {statementInProgress.autoIdentifyIrs ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n\r\n
          \r\n {\r\n setLegalHold(!statementInProgress.legalHold);\r\n }}\r\n label={'statement-create.statement-info.legal-hold.label'}\r\n width={'auto'}\r\n isValid={true}\r\n disabled={!hasPermissionToEnableLegalHold}\r\n tooltip={\r\n !hasPermissionToEnableLegalHold\r\n ? ENABLE_LEGAL_HOLD_TOOLTIP\r\n : null\r\n }\r\n />\r\n \r\n \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n {statementInProgress.legalHold ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n
          \r\n \r\n setComfortLetter(!statementInProgress.comfortLetter)\r\n }\r\n label={\r\n 'statement-edit.statement-info.enable-comfort-letter.label'\r\n }\r\n width={'auto'}\r\n isValid={true}\r\n disabled={!hasPermissionToEnableComfortLetter}\r\n tooltip={\r\n !hasPermissionToEnableComfortLetter\r\n ? DISABLED_COMFORT_LETTER_TOOLTIP\r\n : null\r\n }\r\n />\r\n \r\n \r\n \r\n
          \r\n
          \r\n
          \r\n ) : null}\r\n
          \r\n
          \r\n
          \r\n );\r\n }\r\n}\r\n\r\nStatementInfo.propTypes = {\r\n /** Api model representing form */\r\n statementInProgress: PropTypes.instanceOf(StatementForm).isRequired,\r\n /** Action that sets appropriate value on model */\r\n setStatementName: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setStatementType: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setQuarter: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setFiscalYear: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setPeriodEndingDate: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setAccountingBasis: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setRegistrant: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setWrapUpDate: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setLegalHold: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on model */\r\n setAutoIdentifyIrs: PropTypes.func.isRequired,\r\n /** model representing statement creation page data for language, date & number format dropdowns*/\r\n statementCreationPageData: PropTypes.instanceOf(StatementCreationPageData),\r\n /** Action used for API call to fetch list data of statementCreationPageData*/\r\n fetchStatementCreationPageData: PropTypes.func,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n ui: {\r\n statementPage: { statementCreationPageData },\r\n },\r\n}) => ({\r\n statementCreationPageData: statementCreationPageData,\r\n});\r\nconst mapDispatchToProps = {\r\n fetchStatementCreationPageData,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(StatementInfo);\r\n","import React, { memo } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst NoCarryForwardStatements = () => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default memo(NoCarryForwardStatements);\r\n","import React, { memo } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nconst CARRY_FORWARD_INFO_BLOCK = 'carry-forward-info';\r\n\r\nconst CarryForwardInfo = () => {\r\n return (\r\n
          \r\n
          \r\n \r\n
          \r\n
            \r\n
          1. \r\n \r\n
          2. \r\n
          3. \r\n \r\n
          4. \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 {/* TODO bring this text back when the learn more about carryforward document download link is available */}\r\n {/* */}\r\n
          \r\n
          \r\n );\r\n};\r\n\r\nexport default memo(CarryForwardInfo);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport classnames from 'classnames';\r\nimport FeatureFlagComponent from 'components/common/feature-flag-component';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport ProgressBarStep from 'components/common/progress-bar-step-component';\r\nimport Card from 'components/common/card-component';\r\nimport Radio from 'components/common/radio-component';\r\nimport { RadioOption } from 'models/utils/common/radio-options-model';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport DataGrid from 'components/common/data-grid/data-grid-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport NoCarryForwardStatements from 'components/feature/statement-creation/statement-creation-no-carry-forward-statements-component';\r\nimport CarryForwardInfo from 'components/feature/statement-creation/statement-creation-carryforward-info-component';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport shortid from 'shortid';\r\nimport {\r\n getProjectNameMenuOptions,\r\n defaultSelectedProject,\r\n CARRYFORWARD_COLUMNS,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport { ProjectList } from 'models/api/project-list-model';\r\nimport { StatementList } from 'models/api/statement-list-model';\r\nimport StatementForm from 'models/form/statement-form-model';\r\nimport { DataGridDataApi } from 'components/common/data-grid/data-grid-component';\r\nimport { getProjectListRequest } from 'api/project-list-api';\r\nimport { getStatementListForProjectRequest } from 'api/statement-list-api';\r\nimport ProjectApi from '../../../models/api/project-api-model';\r\nimport { isProjectHasReservedClientName } from 'utils/project-list-utils';\r\n\r\nexport const CARRY_FORWARD_BLOCK = 'carry-forward';\r\nconst CARRY_FORWARD_ID_BLOCK = 'carry-forward-id';\r\n\r\nclass Carryforward extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n hasBeenOpened: false,\r\n projectList: new ProjectList(),\r\n statementList: new StatementList(),\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { statementInProgress } = this.props;\r\n const { hasBeenOpened } = this.state;\r\n if (\r\n statementInProgress.hasNewFileBeenUploaded(prevProps.statementInProgress)\r\n ) {\r\n this.setState({\r\n hasBeenOpened: false,\r\n });\r\n } else if (\r\n !hasBeenOpened &&\r\n statementInProgress.isStepOneValid() &&\r\n statementInProgress.isStepTwoValid()\r\n ) {\r\n this.setState({\r\n hasBeenOpened: true,\r\n });\r\n }\r\n }\r\n\r\n _changeCarryForwordProject = (project) => {\r\n const { changeCarryForwordProject } = this.props;\r\n\r\n changeCarryForwordProject(project);\r\n\r\n this._getActiveProjectStatements(project.id);\r\n };\r\n\r\n _initCarryForwardStatementCreation = async () => {\r\n const { selectedProject } = this.props;\r\n this._fetchProjectList();\r\n this._getActiveProjectStatements(selectedProject.id);\r\n };\r\n\r\n _fetchProjectList = async () => {\r\n this.setState((state) => ({\r\n projectList: state.projectList.setLoading(),\r\n }));\r\n try {\r\n const response = await getProjectListRequest();\r\n this.setState((state) => ({\r\n projectList: state.projectList.setLoaded({ response }),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n projectInProgress: state.projectInProgress.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _getActiveProjectStatements = async (projectId) => {\r\n this.setState((state) => ({\r\n statementList: state.statementList.setLoading(),\r\n }));\r\n try {\r\n const response = await getStatementListForProjectRequest({\r\n projectId,\r\n selectedProject: this.props.selectedProject,\r\n });\r\n this.setState((state) => ({\r\n statementList: state.statementList.setLoaded({ response }),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n statementList: state.statementList.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _setRadioOptionForCarryForward = (val) => {\r\n const {\r\n setCarryForwardStatementCreation,\r\n changeCarryForwordProject,\r\n setCarryForwardStatementIds,\r\n } = this.props;\r\n if (val) {\r\n this._initCarryForwardStatementCreation();\r\n } else {\r\n changeCarryForwordProject(null);\r\n setCarryForwardStatementIds({});\r\n }\r\n\r\n setCarryForwardStatementCreation(val);\r\n };\r\n\r\n _clearCarryForwardStatementIds = () => {\r\n this.props.setCarryForwardStatementIds({});\r\n };\r\n\r\n render() {\r\n const { hasBeenOpened, projectList, statementList } = this.state;\r\n const {\r\n statementInProgress,\r\n setCarryForwardStatementIds,\r\n selectedProject,\r\n setCarryForwardDetails,\r\n } = this.props;\r\n return (\r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n

          \r\n \r\n

          \r\n {hasBeenOpened ? (\r\n \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n {statementInProgress.carryForward ? (\r\n \r\n \r\n {(window.TIEOUT.ENV.ENV_PARAM !== 'PROD' ||\r\n isProjectHasReservedClientName(selectedProject)) && (\r\n
          \r\n \r\n \r\n \r\n {\r\n setCarryForwardDetails({\r\n comparemetadata:\r\n !statementInProgress.carryForwardDetails\r\n .comparemetadata,\r\n });\r\n }}\r\n label={\r\n 'statement-create.carry-forward.betaversion.label'\r\n }\r\n width={'auto'}\r\n isValid={true}\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 setCarryForwardDetails({\r\n autotieout:\r\n !statementInProgress.carryForwardDetails.autotieout,\r\n });\r\n }}\r\n label={'statement-create.carry-forward.autotieout.label'}\r\n width={'auto'}\r\n isValid={true}\r\n />\r\n

          \r\n \r\n

          \r\n \r\n \r\n
          \r\n {\r\n setCarryForwardDetails({\r\n workpapers:\r\n !statementInProgress.carryForwardDetails.workpapers,\r\n });\r\n }}\r\n label={\r\n 'statement-create.carry-forward.annotations.workpaper-reference.label'\r\n }\r\n width={'auto'}\r\n isValid={true}\r\n />\r\n {\r\n setCarryForwardDetails({\r\n tickmarks:\r\n !statementInProgress.carryForwardDetails.tickmarks,\r\n });\r\n }}\r\n label={\r\n 'statement-create.carry-forward.annotations.tickmarks.label'\r\n }\r\n width={'auto'}\r\n isValid={true}\r\n />\r\n {\r\n setCarryForwardDetails({\r\n formulas:\r\n !statementInProgress.carryForwardDetails.formulas,\r\n });\r\n }}\r\n label={\r\n 'statement-create.carry-forward.annotations.formulas.label'\r\n }\r\n width={'auto'}\r\n isValid={true}\r\n />\r\n {\r\n setCarryForwardDetails({\r\n internalreferences:\r\n !statementInProgress.carryForwardDetails\r\n .internalreferences,\r\n });\r\n }}\r\n label={\r\n 'statement-create.carry-forward.annotations.internalreferences.label'\r\n }\r\n width={'auto'}\r\n isValid={true}\r\n />\r\n
          \r\n
            {chunks}
          ,\r\n ul: (...chunks) =>
            {chunks}
          ,\r\n li: (...chunks) => (\r\n \r\n {chunks}\r\n \r\n ),\r\n b: (...chunks) => {chunks},\r\n lineBreak: (\r\n \r\n ),\r\n },\r\n }}\r\n className={`${CARRY_FORWARD_BLOCK}__warning-banner`}\r\n isInternationalized={true}\r\n isInteractive={false}\r\n width={'100%'}\r\n />\r\n
          \r\n
          \r\n {chunks},\r\n lineBreak: (\r\n \r\n ),\r\n },\r\n }}\r\n isInternationalized={true}\r\n isInteractive={false}\r\n width={'100%'}\r\n />\r\n
          \r\n
          \r\n \r\n
          \r\n {statementInProgress.carryForwardStatementIdsArray\r\n .length ? (\r\n \r\n {statementList\r\n .getSelectedCarryForwardStatements(\r\n statementInProgress.carryForwardStatementIdsArray,\r\n )\r\n .map((statement) => (\r\n \r\n \r\n \r\n \r\n \r\n {statement.statementName}\r\n \r\n \r\n \r\n \r\n \r\n ))}\r\n \r\n ) : null}\r\n
          \r\n }\r\n />\r\n
          \r\n {!statementList.getStatements().length ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n \r\n ) : null}\r\n \r\n ) : null}\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nCarryforward.propTypes = {\r\n /** Api model representing the statement being created comming from statement creation as state */\r\n statementInProgress: PropTypes.instanceOf(StatementForm).isRequired,\r\n /** Api model that represents currently selected project */\r\n selectedProject: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** Func that sets all statements you want to carry forward */\r\n setCarryForwardStatementIds: PropTypes.func.isRequired,\r\n /** Method that changes carryforward project */\r\n changeCarryForwordProject: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default Carryforward;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\n\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\n\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst STATEMENT_CREATION_PAGE_ID_BLOCK = 'statement-creation-id';\r\n\r\nconst StatementCreationCancelModal = ({\r\n toggleCancelModal,\r\n onCancelAndLeavePage,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nStatementCreationCancelModal.propTypes = {\r\n /** Method on the statement creation component that closes statement creation cancel modal */\r\n toggleCancelModal: PropTypes.func.isRequired,\r\n /** Method on the statement creation component that let user leave statement creation page */\r\n onCancelAndLeavePage: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementCreationCancelModal;\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport shortid from 'shortid';\r\n\r\nexport const ADDITIONAL_CONSIDERATION_MODAL_BLOCK =\r\n 'additional-consideration-modal';\r\nexport const ADDITIONAL_CONSIDERATION_MODAL_ID =\r\n 'additional-consideration-modal-id';\r\n\r\nexport const AdditionalConsiderationModal = ({ onClose, onSubmit }) => {\r\n const [toggleAcknowledge, setToggleAcknowledge] = useState(false);\r\n return (\r\n \r\n
          \r\n
            {chunks}
          ,\r\n li: (...chunks) => (\r\n \r\n {chunks}\r\n \r\n ),\r\n }}\r\n />\r\n
          \r\n \r\n setToggleAcknowledge(!toggleAcknowledge)}\r\n label={\r\n 'statement-creation-review-consideration.modal.acknowledge-checkbox.label'\r\n }\r\n id={`${ADDITIONAL_CONSIDERATION_MODAL_ID}-disclaimer-checkbox`}\r\n width={'100%'}\r\n isValid={true}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nAdditionalConsiderationModal.propTypes = {\r\n /** function fired to close the modal */\r\n onClose: PropTypes.func.isRequired,\r\n /**function fired to close the modal and initiate statement creation */\r\n onSubmit: PropTypes.func.isRequired,\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport Page from 'components/util/page-component';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { ReactComponent as BackButton } from 'icons/back-button.svg';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\n\r\nimport StatementForm from 'models/form/statement-form-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport SelectStatementComponent from 'components/feature/statement-creation/select-statement/statement-creation-select-statement-component';\r\nimport StatementInfoComponent from 'components/feature/statement-creation/statement-creation-statement-info-component';\r\nimport StatementCarryforwardComponent from 'components/feature/statement-creation/statement-creation-carryforward-component';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport { history } from 'store/store';\r\nimport StatementCreationCancelModal from 'components/feature/statement-creation/statement-creation-cancel-modal';\r\nimport { getSelectedProjectRequest } from 'api/selected-project-api';\r\nimport { createNewStatementRequest } from 'api/statement-creation-edit-api';\r\nimport { AdditionalConsiderationModal } from 'components/feature/statement-creation/statement-creation-additional-consideration-modal';\r\n\r\nconst STATEMENT_CREATION_PAGE_BLOCK = 'statement-creation';\r\nexport const STATEMENT_CREATION_PAGE_ID_BLOCK = 'statement-creation-id';\r\n\r\nclass StatementCreation extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n showCancelModal: false,\r\n showAdditionalConsiderationModal: false,\r\n statementInProgress: new StatementForm({\r\n isLoaded: true, // init as loaded so user can fill out form\r\n }),\r\n\r\n project: new ProjectApi(),\r\n };\r\n this.unBlockNavigation = null;\r\n this.isAdditionalConsiderationModalEnabled =\r\n window.TIEOUT.ENV.FEATURE.ENABLE_CREATE_STATEMENT_ADDITIONAL_CONSIDERATION_MODAL;\r\n this.shouldBlockNavigation = true; // instance variable for indicating if navigation away from page should be blocked\r\n }\r\n\r\n componentDidMount() {\r\n const { projectId } = this.props;\r\n\r\n this._fetchSelectedProjectDetails({ projectId });\r\n /** Handles logic for blocking navigation with modal prompt and redux clean up */\r\n this.unBlockNavigation = history.block((toLocation) => {\r\n if (\r\n this.shouldBlockNavigation &&\r\n toLocation &&\r\n toLocation.pathname !== ROUTE_CONSTANTS.SESSION_TIMEOUT\r\n ) {\r\n this.setState({ showCancelModal: true });\r\n return false;\r\n }\r\n return true;\r\n });\r\n window.addEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n componentWillUnmount() {\r\n this.unBlockNavigation();\r\n window.removeEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n _blockUrlNavigation = (e) => {\r\n if (this.shouldBlockNavigation) {\r\n // Cancel the event\r\n e.preventDefault();\r\n // Chrome requires returnValue to be set\r\n e.returnValue = '';\r\n }\r\n };\r\n\r\n _toggleAdditionalConsiderationModal = () => {\r\n this.setState({\r\n showAdditionalConsiderationModal:\r\n !this.state.showAdditionalConsiderationModal,\r\n });\r\n };\r\n\r\n _onCreateStatement = () => {\r\n const { statementInProgress, project } = this.state;\r\n if (this.isAdditionalConsiderationModalEnabled)\r\n this._toggleAdditionalConsiderationModal();\r\n else\r\n this._createNewStatement({\r\n project: project.getProjectData(),\r\n statement: statementInProgress,\r\n });\r\n };\r\n\r\n _fetchSelectedProjectDetails = async ({ projectId }) => {\r\n const { selectedProjectLoaded } = this.props;\r\n this.setState((state) => ({\r\n project: state.project.setLoading(),\r\n }));\r\n try {\r\n const response = await getSelectedProjectRequest(projectId);\r\n selectedProjectLoaded({ response });\r\n this.setState((state) => ({\r\n project: state.project.setLoaded(response),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n project: state.project.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _toggleCancelModal = () => {\r\n this.setState((state, props) => {\r\n return {\r\n showCancelModal: !state.showCancelModal,\r\n };\r\n });\r\n };\r\n\r\n _onCancelAndLeavePage = () => {\r\n const { push } = this.props;\r\n this.shouldBlockNavigation = false;\r\n push(ROUTE_CONSTANTS.HOME_PAGE);\r\n };\r\n\r\n _setFiles = (files) => {\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setFile(files),\r\n }));\r\n };\r\n\r\n _setFilesError = (rejectedFiles) => {\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setFileError(rejectedFiles),\r\n }));\r\n };\r\n\r\n _createNewStatement = async ({ project, statement }) => {\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setLoading(),\r\n }));\r\n try {\r\n const response = await createNewStatementRequest({\r\n project,\r\n statement,\r\n });\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setLoaded({\r\n response,\r\n }),\r\n }));\r\n this.shouldBlockNavigation = false;\r\n this.props.finishStatementCreation({\r\n project: this.state.project.data,\r\n });\r\n } catch (error) {\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n render() {\r\n const { showCancelModal, statementInProgress, project } = this.state;\r\n const { featureInfo } = this.props;\r\n return (\r\n \r\n \r\n
          \r\n
          \r\n this._toggleCancelModal()}\r\n >\r\n
          \r\n {project.name}\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 this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setStatementName(name),\r\n }))\r\n }\r\n setLanguageType={(lang) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setLanguageType(lang),\r\n }))\r\n }\r\n setDateFormat={(date) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setDateFormat(date),\r\n }))\r\n }\r\n setNumberFormat={(number) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setNumberFormat(number),\r\n }))\r\n }\r\n setStatementType={(statementType) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setStatementType(\r\n statementType,\r\n ),\r\n }))\r\n }\r\n setQuarter={(val) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setQuarter(val),\r\n }))\r\n }\r\n setFiscalYear={(year) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setFiscalYear(year),\r\n }))\r\n }\r\n setPeriodEndingDate={(date) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setPeriodEndingDate(date),\r\n }))\r\n }\r\n setAccountingBasis={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setAccountingBasis(option),\r\n }))\r\n }\r\n setRegistrant={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setRegistrant(option),\r\n }))\r\n }\r\n setWrapUpDate={(date) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setWrapUpDate(date),\r\n }))\r\n }\r\n setLegalHold={(checked) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setLegalHold(checked ? 1 : 0),\r\n }))\r\n }\r\n setAutoIdentifyIrs={(checked) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setAutoIdentifyIrs(\r\n checked ? 1 : 0,\r\n ),\r\n }))\r\n }\r\n setComfortLetter={(checked) =>\r\n this.setState((prevState) => ({\r\n statementInProgress:\r\n prevState.statementInProgress.setComfortLetter(\r\n checked ? 1 : 0,\r\n ),\r\n }))\r\n }\r\n setDefaultScaling={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setDefaultScaling(option),\r\n }))\r\n }\r\n setDefaultUnit={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setDefaultUnit(option),\r\n }))\r\n }\r\n />\r\n
          \r\n
          \r\n \r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setCarryForward(val),\r\n }))\r\n }\r\n setCarryForwardDetails={(val) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setCarryForwardDetails(val),\r\n }))\r\n }\r\n setCarryForwardStatementIds={(val) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setCarryForwardStatementIds(\r\n val,\r\n ),\r\n }))\r\n }\r\n changeCarryForwordProject={(project) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setCarryForwardProject(\r\n project,\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 {this.isAdditionalConsiderationModalEnabled &&\r\n this.state.showAdditionalConsiderationModal && (\r\n {\r\n this._toggleAdditionalConsiderationModal();\r\n this._createNewStatement({\r\n project: project.getProjectData(),\r\n statement: statementInProgress,\r\n });\r\n }}\r\n />\r\n )}\r\n\r\n {showCancelModal ? (\r\n \r\n ) : null}\r\n
          \r\n
          \r\n );\r\n }\r\n}\r\n\r\nStatementCreation.propTypes = {\r\n /** Func that fires action that navigates user to home page */\r\n push: PropTypes.func.isRequired,\r\n /** currently selected project id from the route parameters */\r\n projectId: PropTypes.string.isRequired,\r\n /** Func that fires action which sets the project on the homepage following statement creation */\r\n finishStatementCreation: PropTypes.func.isRequired,\r\n /**Action fired to load selected project details in redux store */\r\n selectedProjectLoaded: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementCreation;\r\n","import { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\n\r\nimport StatementCreationPage from 'pages/statement-creation-page';\r\nimport { selectedProjectLoaded } from 'store/actions/selected-project-actions';\r\nimport { finishStatementCreation } from 'store/actions/statement-creation-actions';\r\n\r\nconst mapStateToProps = ({ data: { featureInfo } }, { match: { params } }) => ({\r\n projectId: params.projectId,\r\n featureInfo,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n finishStatementCreation,\r\n push,\r\n selectedProjectLoaded,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(StatementCreationPage);\r\n","import { push } from 'connected-react-router';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { updateSelectedProjectFromID } from 'store/actions/selected-project-actions';\r\nimport {\r\n setProjectIdWorkflowExpanded,\r\n requestGetStatementWorkflows,\r\n} from 'store/actions/statement-workflows-actions';\r\n\r\nexport const finishStatementCreation = ({ project }) => async (dispatch) => {\r\n //Set the project we just created a statement for as the currently selected project\r\n dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: project.id,\r\n }),\r\n );\r\n //Navigate to the home page\r\n dispatch(push(ROUTE_CONSTANTS.HOME_PAGE));\r\n // ensure workflows popover is expanded when navigate back to home page\r\n dispatch(setProjectIdWorkflowExpanded(project.id));\r\n // request statement workflows immediately so pop up is displayed\r\n dispatch(requestGetStatementWorkflows());\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\n\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport Card from 'components/common/card-component';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport CustomDatePicker from 'constants/feature/dateComponent/customDatePicker';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as Information } from 'icons/icon-information-tooltip.svg';\r\nimport {\r\n STATEMENT_TYPE_OPTIONS,\r\n QUARTER_OPTIONS,\r\n FISCAL_YEAR_OPTIONS,\r\n ACCOUNTING_BASIS_OPTIONS,\r\n REGISTRANT_OPTIONS,\r\n SCALING_OPTIONS,\r\n UNIT_OPTIONS,\r\n LEGAL_HOLD_TOOLTIP,\r\n ENABLE_LEGAL_HOLD_TOOLTIP,\r\n DISABLE_LEGAL_HOLD_TOOLTIP,\r\n ENABLE_AUTO_IR_TOOLTIP,\r\n AUTO_IR_TOOLTIP,\r\n ENABLE_COMFORT_LETTER_TOOLTIP,\r\n DISABLED_COMFORT_LETTER_TOOLTIP,\r\n} from 'constants/feature/statement-creation-constants';\r\nimport StatementForm from 'models/form/statement-form-model';\r\nimport RolesUtil from 'permissions/utils/roles';\r\nimport { fetchStatementCreationPageData } from 'store/actions/statement-creation-page-data-actions';\r\nimport StatementCreationPageData from 'models/api/statement-creation-page-data-api-model';\r\nimport { ReactComponent as InfoIcon } from 'icons/icon-information-tooltip.svg';\r\nimport { SearchDropdownApi } from 'components/common/search-component';\r\nimport { SEARCH_DROPDOWN_CLOSE_ICON_SIZE } from '../statement-creation/statement-creation-statement-info-component';\r\n\r\nexport const STATEMENT_EDIT_INFO_BLOCK = 'statement-edit-info';\r\nconst STATEMENT_EDIT_INFO_ID_BLOCK = 'statement-edit-info-id';\r\nconst INFORMATION_ICON_SIZE = '18px';\r\n\r\nexport class StatementEditInfo extends Component {\r\n constructor() {\r\n super();\r\n this.state = {\r\n copyActiveStatements: new StatementForm(),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { fetchStatementCreationPageData } = this.props;\r\n fetchStatementCreationPageData();\r\n this.setState({\r\n copyActiveStatements: JSON.parse(\r\n JSON.stringify(this.props.statementInProgress),\r\n ),\r\n });\r\n }\r\n render() {\r\n const {\r\n statementInProgress,\r\n setStatementName,\r\n setLanguageType,\r\n setDateFormat,\r\n setNumberFormat,\r\n setStatementType,\r\n setQuarter,\r\n setFiscalYear,\r\n setPeriodEndingDate,\r\n setAccountingBasis,\r\n setRegistrant,\r\n setWrapUpDate,\r\n setLegalHold,\r\n setAutoIdentifyIrs,\r\n setComfortLetter,\r\n setDefaultScaling,\r\n setDefaultUnit,\r\n statementCreationPageData,\r\n } = this.props;\r\n const { copyActiveStatements } = this.state;\r\n const projectId = statementInProgress.data.clientId;\r\n const selectedLanguage = statementCreationPageData.selectedLanguageValue(\r\n statementInProgress.languageType,\r\n );\r\n\r\n const hasPermissionToDisableLegalHold =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId);\r\n const hasPermissionToEnableLegalHold =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectId);\r\n const isLegalHoldCheckboxDisabled = copyActiveStatements.data.legalHold\r\n ? !hasPermissionToDisableLegalHold\r\n : !hasPermissionToEnableLegalHold;\r\n\r\n const hasPermissionToEnableAutoIr =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectId) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectId);\r\n\r\n const hasPermissionToEnableComfortLetter =\r\n RolesUtil.doesUserHavePPMDRoleForProject(projectId) ||\r\n RolesUtil.doesUserHaveEngagementOwnerRoleForProject(projectId) ||\r\n RolesUtil.doesUserHavePreparerReviewerRoleForProject(projectId);\r\n\r\n return (\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 setDateFormat(option);\r\n }}\r\n options={statementCreationPageData.dateFormatMenuOptions}\r\n value={statementCreationPageData.selectedDateFormatValue(\r\n statementInProgress.dateformatId,\r\n )}\r\n disabled\r\n />\r\n {\r\n setNumberFormat(option);\r\n }}\r\n options={statementCreationPageData.numberFormatMenuOptions}\r\n value={statementCreationPageData.selectedNumberFormatValue(\r\n statementInProgress.numberFormatId,\r\n )}\r\n disabled\r\n />\r\n
          \r\n
          \r\n {\r\n setStatementType(option);\r\n // clear quarter if statement type changes so not stored for values other than 10-Q and Private Quarterly\r\n setQuarter(null);\r\n }}\r\n options={STATEMENT_TYPE_OPTIONS}\r\n value={statementInProgress.statementTypeId}\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 setAutoIdentifyIrs(!statementInProgress.autoIdentifyIrs);\r\n }}\r\n label={'statement-edit.statement-info.auto-ir.label'}\r\n width={'auto'}\r\n isValid={true}\r\n disabled={!hasPermissionToEnableAutoIr}\r\n tooltip={\r\n !hasPermissionToEnableAutoIr ? ENABLE_AUTO_IR_TOOLTIP : null\r\n }\r\n />\r\n \r\n \r\n \r\n
          \r\n\r\n {statementInProgress.autoIdentifyIrs ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n\r\n
          \r\n setLegalHold(!statementInProgress.legalHold)}\r\n label={'statement-edit.statement-info.legal-hold.label'}\r\n width={'auto'}\r\n isValid={true}\r\n disabled={isLegalHoldCheckboxDisabled}\r\n tooltip={\r\n isLegalHoldCheckboxDisabled\r\n ? copyActiveStatements.data.legalHold\r\n ? DISABLE_LEGAL_HOLD_TOOLTIP\r\n : ENABLE_LEGAL_HOLD_TOOLTIP\r\n : null\r\n }\r\n />\r\n \r\n \r\n \r\n
          \r\n
          \r\n \r\n
          \r\n {statementInProgress.legalHold ? (\r\n
          \r\n \r\n
          \r\n ) : null}\r\n
          \r\n \r\n setComfortLetter(!statementInProgress.comfortLetter)\r\n }\r\n label={\r\n 'statement-edit.statement-info.enable-comfort-letter.label'\r\n }\r\n width={'auto'}\r\n disabled={!hasPermissionToEnableComfortLetter}\r\n tooltip={\r\n !hasPermissionToEnableComfortLetter\r\n ? DISABLED_COMFORT_LETTER_TOOLTIP\r\n : null\r\n }\r\n isValid={true}\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\nStatementEditInfo.propTypes = {\r\n /** Form model of the statement that is to be edited */\r\n statementInProgress: PropTypes.instanceOf(StatementForm).isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setStatementName: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setStatementType: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setQuarter: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setFiscalYear: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setPeriodEndingDate: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setAccountingBasis: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setRegistrant: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setWrapUpDate: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setLegalHold: PropTypes.func.isRequired,\r\n /** Action that sets appropriate value on the statement in progress model */\r\n setAutoIdentifyIrs: PropTypes.func.isRequired,\r\n /** model representing statement creation page data for language, date & number format dropdowns*/\r\n statementCreationPageData: PropTypes.instanceOf(StatementCreationPageData),\r\n};\r\nconst mapStateToProps = ({\r\n ui: {\r\n statementPage: { statementCreationPageData },\r\n },\r\n}) => ({\r\n statementCreationPageData: statementCreationPageData,\r\n});\r\nconst mapDispatchToProps = {\r\n fetchStatementCreationPageData,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(StatementEditInfo);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\n\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\n\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\n\r\nconst STATEMENT_EDIT_PAGE_ID_BLOCK = 'statement-edit-id';\r\n\r\nconst StatementEditCancelModal = ({\r\n toggleCancelModal,\r\n onCancelAndLeavePage,\r\n}) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nStatementEditCancelModal.propTypes = {\r\n /** Method on the statement edit component that closes statement edit cancel modal */\r\n toggleCancelModal: PropTypes.func.isRequired,\r\n /** Method on the statement edit component that let user leave statement edit page */\r\n onCancelAndLeavePage: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementEditCancelModal;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport moment from 'moment';\r\n\r\nimport Page from 'components/util/page-component';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport StatementEditInfo from 'components/feature/statement-edit/statement-edit-statement-info-component';\r\n\r\nimport selectedProjectApi from 'api/selected-project-api';\r\nimport statementCreateEditApi from 'api/statement-creation-edit-api';\r\n\r\nimport { ReactComponent as BackButton } from 'icons/back-button.svg';\r\nimport StatementEditCancelModal from 'components/feature/statement-edit/statement-edit-cancel-modal';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport StatementForm from 'models/form/statement-form-model';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport { history } from 'store/store';\r\n\r\nconst STATEMENT_EDIT_PAGE_BLOCK = 'statement-edit';\r\nconst STATEMENT_EDIT_PAGE_ID_BLOCK = 'statement-edit-id';\r\n\r\nclass StatementEdit extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n project: new ProjectApi(),\r\n statementInProgress: new StatementForm(),\r\n statementHasBeenModified: false,\r\n showCancelModal: false,\r\n };\r\n this.unBlockNavigation = null;\r\n this.shouldBlockNavigation = true; // instance variable for indicating if navigation away from page should be blocked\r\n }\r\n\r\n _fetchStatementEditInitData = async () => {\r\n const {\r\n projectId,\r\n statementId,\r\n updateSelectedProjectFromIDIfDoesNotExists,\r\n } = this.props;\r\n await updateSelectedProjectFromIDIfDoesNotExists({ projectId });\r\n this._fetchSelectedProjectForEdit(projectId);\r\n this._fetchSelectedStatementForEdit(statementId);\r\n };\r\n\r\n componentDidMount() {\r\n this._fetchStatementEditInitData();\r\n /** Handles logic for blocking navigation with modal prompt and redux clean up */\r\n this.unBlockNavigation = history.block((toLocation) => {\r\n if (\r\n this.shouldBlockNavigation &&\r\n toLocation &&\r\n toLocation.pathname !== ROUTE_CONSTANTS.SESSION_TIMEOUT\r\n ) {\r\n this.setState({ showCancelModal: true });\r\n return false;\r\n }\r\n return true;\r\n });\r\n window.addEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n componentWillUnmount() {\r\n this.unBlockNavigation();\r\n window.removeEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n\r\n _blockUrlNavigation = (e) => {\r\n if (this.shouldBlockNavigation) {\r\n // Cancel the event\r\n e.preventDefault();\r\n // Chrome requires returnValue to be set\r\n e.returnValue = '';\r\n }\r\n };\r\n\r\n _fetchSelectedProjectForEdit = async (projectId) => {\r\n this.setState((state) => ({\r\n project: state.project.setLoading(),\r\n }));\r\n try {\r\n const response = await selectedProjectApi.getSelectedProjectRequest(\r\n projectId,\r\n );\r\n this.setState((state) => ({\r\n project: state.project.setLoaded(response),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n project: state.project.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _fetchSelectedStatementForEdit = async (statementId) => {\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setLoading(),\r\n }));\r\n try {\r\n const response = await statementCreateEditApi.getSelectedStatementRequest(\r\n statementId,\r\n this.props.projectId,\r\n );\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setLoaded({ response }),\r\n }));\r\n } catch (error) {\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n _toggleCancelModal = () => {\r\n this.setState((state) => {\r\n return {\r\n showCancelModal: !state.showCancelModal,\r\n };\r\n });\r\n };\r\n\r\n _onCancelAndLeavePage = () => {\r\n const { push } = this.props;\r\n this.shouldBlockNavigation = false;\r\n push(ROUTE_CONSTANTS.HOME_PAGE);\r\n };\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { statementInProgress, statementHasBeenModified } = this.state;\r\n if (\r\n prevState.statementInProgress.isInitialized() &&\r\n statementInProgress.hasStatementBeenModified(\r\n prevState.statementInProgress,\r\n ) &&\r\n !statementHasBeenModified\r\n ) {\r\n // Set the statement as having been modified if it has been changed at all\r\n this.setState({\r\n statementHasBeenModified: true,\r\n });\r\n }\r\n }\r\n\r\n _editStatement = async () => {\r\n const { statementInProgress, project } = this.state;\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setLoading(),\r\n }));\r\n try {\r\n const response = await statementCreateEditApi.editStatementRequest(\r\n statementInProgress,\r\n project,\r\n );\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setLoaded({ response }),\r\n }));\r\n this.shouldBlockNavigation = false;\r\n this.props.finishStatementEdit({\r\n project: project.data,\r\n });\r\n } catch (error) {\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n project,\r\n statementInProgress,\r\n showCancelModal,\r\n statementHasBeenModified,\r\n } = this.state;\r\n return (\r\n \r\n \r\n \r\n
          \r\n
          \r\n
          \r\n this._toggleCancelModal()}\r\n >\r\n
          \r\n {project.name}\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 this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setStatementName(name),\r\n }))\r\n }\r\n setLanguageType={(lang) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setLanguageType(lang),\r\n }))\r\n }\r\n setDateFormat={(date) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setDateFormat(date),\r\n }))\r\n }\r\n setNumberFormat={(number) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setNumberFormat(number),\r\n }))\r\n }\r\n setStatementType={(statementType) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setStatementType(statementType),\r\n }))\r\n }\r\n setQuarter={(val) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setQuarter(val),\r\n }))\r\n }\r\n setFiscalYear={(year) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setFiscalYear(year),\r\n }))\r\n }\r\n setPeriodEndingDate={(date) => {\r\n if (date instanceof moment) {\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setPeriodEndingDate(date),\r\n }));\r\n }\r\n }}\r\n setAccountingBasis={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setAccountingBasis(option),\r\n }))\r\n }\r\n setRegistrant={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setRegistrant(option),\r\n }))\r\n }\r\n setWrapUpDate={(date) => {\r\n if (date instanceof moment) {\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setWrapUpDate(date),\r\n }));\r\n }\r\n }}\r\n setLegalHold={(checked) =>\r\n this.setState((state) => ({\r\n statementInProgress: state.statementInProgress.setLegalHold(\r\n checked ? 1 : 0,\r\n ),\r\n }))\r\n }\r\n setAutoIdentifyIrs={(checked) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setAutoIdentifyIrs(\r\n checked ? 1 : 0,\r\n ),\r\n }))\r\n }\r\n setComfortLetter={(checked) =>\r\n this.setState((prevState) => ({\r\n statementInProgress:\r\n prevState.statementInProgress.setComfortLetter(\r\n checked ? 1 : 0,\r\n ),\r\n }))\r\n }\r\n setDefaultScaling={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setDefaultScaling(option),\r\n }))\r\n }\r\n setDefaultUnit={(option) =>\r\n this.setState((state) => ({\r\n statementInProgress:\r\n state.statementInProgress.setDefaultUnit(option),\r\n }))\r\n }\r\n />\r\n \r\n {showCancelModal ? (\r\n \r\n ) : null}\r\n
          \r\n
          \r\n
          \r\n );\r\n }\r\n}\r\nStatementEdit.propTypes = {\r\n /** Func that fires action that navigates user to home page */\r\n push: PropTypes.func.isRequired,\r\n /** String id of the project associated with the statement that is going to be edited */\r\n projectId: PropTypes.string.isRequired,\r\n /** String id of the statement that is going to be edited */\r\n statementId: PropTypes.string.isRequired,\r\n /** Func that fires action which sets the project on the homepage following statement editing */\r\n finishStatementEdit: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementEdit;\r\n","import { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\n\r\nimport StatementEditPage from 'pages/statement-edit-page';\r\nimport { finishStatementEdit } from 'store/actions/statement-edit-actions';\r\nimport { updateSelectedProjectFromIDIfDoesNotExists } from 'store/actions/selected-project-actions';\r\n\r\nconst mapStateToProps = (state, ownprops) => ({\r\n projectId: ownprops.match.params.projectId,\r\n statementId: ownprops.match.params.statementId,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n finishStatementEdit,\r\n push,\r\n updateSelectedProjectFromIDIfDoesNotExists,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(StatementEditPage);\r\n","import { push } from 'connected-react-router';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { updateSelectedProjectFromID } from 'store/actions/selected-project-actions';\r\n\r\nexport const finishStatementEdit = ({ project }) => async (dispatch) => {\r\n //Set the project we just edited a statement for as the currently selected project\r\n dispatch(\r\n updateSelectedProjectFromID({\r\n projectId: project.id,\r\n })\r\n );\r\n // Navigate to the home page\r\n dispatch(push(ROUTE_CONSTANTS.HOME_PAGE));\r\n};\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport Switch from 'react-switch';\r\nconst BLACKLINE_VIEW_CONTROL = 'blackline-control';\r\n\r\nconst BlacklineViewToggle = ({\r\n blacklineViewMode,\r\n toggleBlacklineViewMode,\r\n}) => {\r\n return (\r\n
          \r\n \r\n \r\n \r\n \r\n
          \r\n );\r\n};\r\n\r\nexport default BlacklineViewToggle;\r\n","import React, { useState, useRef, useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport { ReactComponent as Kebab } from 'icons/kebab-bold.svg';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport {\r\n OPTIONS1_CHECKBOX_ARRAY,\r\n OPTIONS2_CHECKBOX_ARRAY,\r\n METRICS_CHECKBOX_ARRAY,\r\n DISPLAY_SETTINGS_OPTIONS_ARRAY,\r\n OPTIONS3_CHECKBOX_ARRAY,\r\n} from 'constants/feature/statement-summary-constants';\r\nimport StatementSummaryDisplayOptions from 'models/data/statement-summary-display-options-model';\r\n\r\nexport const SUMMARY_DISPLAY_OPTIONS_DROPDOWN =\r\n 'summary-display-options-dropdown';\r\nexport const SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID =\r\n 'summary-display-options-dropdown-id';\r\nconst KEBAB_SIZE = '25px';\r\nconst ELEMENT_TITLE_INDEX = 0;\r\nconst HEADING_TITLE_INDEX = 3;\r\n\r\nconst StatementSummaryDropDown = ({\r\n displayOptions,\r\n onDisplayOptionChange,\r\n disabled,\r\n isOCR,\r\n}) => {\r\n const [displayMenu, setDisplayMenu] = useState(false);\r\n const containerRef = useRef();\r\n\r\n useEffect(() => {\r\n const onMousedownEvent = (event) => {\r\n if (\r\n containerRef.current &&\r\n !containerRef.current.contains(event.target)\r\n ) {\r\n setDisplayMenu(false);\r\n }\r\n };\r\n document.addEventListener('mousedown', onMousedownEvent, false);\r\n return () => {\r\n document.removeEventListener('mousedown', onMousedownEvent, false);\r\n };\r\n }, [containerRef]);\r\n\r\n return (\r\n
          \r\n !disabled && setDisplayMenu(!displayMenu)}\r\n disabled={disabled}\r\n />\r\n {displayMenu && (\r\n
          \r\n
          \r\n \r\n
          \r\n
          \r\n {DISPLAY_SETTINGS_OPTIONS_ARRAY.map((item) => {\r\n return (\r\n \r\n );\r\n })}\r\n
          \r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n {OPTIONS1_CHECKBOX_ARRAY.map((item, iter) => {\r\n return (\r\n \r\n {iter === ELEMENT_TITLE_INDEX ? (\r\n \r\n \r\n
          \r\n ) : !isOCR && iter === HEADING_TITLE_INDEX ? (\r\n \r\n \r\n
          \r\n ) : (\r\n ''\r\n )}\r\n {isOCR && iter === HEADING_TITLE_INDEX ? (\r\n <>\r\n ) : (\r\n \r\n )}\r\n
          \r\n );\r\n })}\r\n
          \r\n {!displayOptions.unverified &&\r\n !displayOptions.verified &&\r\n !displayOptions.reviewed &&\r\n !displayOptions.signedOff ? null : (\r\n
          \r\n
          \r\n \r\n
          \r\n {METRICS_CHECKBOX_ARRAY.map((item) => (\r\n \r\n ))}\r\n
          \r\n )}\r\n \r\n \r\n {OPTIONS2_CHECKBOX_ARRAY.map((item) => (\r\n \r\n ))}\r\n \r\n \r\n
          \r\n \r\n
          \r\n {OPTIONS3_CHECKBOX_ARRAY.map((item) => (\r\n \r\n ))}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nStatementSummaryDropDown.propTypes = {\r\n /** func to set display options */\r\n onDisplayOptionChange: PropTypes.func.isRequired,\r\n /** Obj containing display options from store */\r\n displayOptions: PropTypes.instanceOf(StatementSummaryDisplayOptions)\r\n .isRequired,\r\n};\r\n\r\nexport default StatementSummaryDropDown;\r\n","import ElementFilters from 'models/data/element-filters-model';\r\nimport { SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID } from 'components/feature/statement-summary/statement-summary-display-options-dropdown';\r\n\r\nexport const unverifiedElementFilter = new ElementFilters({ verified: false });\r\n\r\nexport const verifiedElementFilter = new ElementFilters({ verified: true });\r\n\r\nexport const reviewedElementFilter = new ElementFilters({ reviewed: true });\r\n\r\nexport const flaggedElementFilter = new ElementFilters({\r\n userFlag: true,\r\n formulaFlag: true,\r\n internalReferenceFlag: true,\r\n parentFlagged: true,\r\n});\r\n\r\nexport const DISPLAY_SETTINGS_OPTIONS_ARRAY = [\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-viewAll-checkbox`,\r\n name: 'viewAll',\r\n key: '1',\r\n label: 'statement-summary.elements-view-all.label',\r\n },\r\n];\r\n\r\nexport const OPTIONS1_CHECKBOX_ARRAY = [\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-unverified-checkbox`,\r\n name: 'unverified',\r\n key: '2',\r\n label: 'statement-summary.elements-unverified.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-verified-checkbox`,\r\n name: 'verified',\r\n key: '3',\r\n label: 'statement-summary.elements-verified.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-reviewed-checkbox`,\r\n name: 'reviewed',\r\n key: '4',\r\n label: 'statement-summary.elements-reviewed.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-sign-off-checkbox`,\r\n name: 'signedOff',\r\n key: '5',\r\n label: 'statement-summary.section-sign-off.label',\r\n },\r\n];\r\n\r\nexport const OPTIONS2_CHECKBOX_ARRAY = [\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-notes-checkbox`,\r\n name: 'notes',\r\n key: '7',\r\n label: 'statement-summary.notes.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-flags-checkbox`,\r\n name: 'flags',\r\n key: '8',\r\n label: 'statement-summary.elements-flagged.label',\r\n },\r\n];\r\n\r\nexport const METRICS_CHECKBOX_ARRAY = [\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-percentage-checkbox`,\r\n name: 'percentage',\r\n key: '10',\r\n label: 'statement-summary.metrics.percentages.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-count-checkbox`,\r\n name: 'count',\r\n key: '11',\r\n label: 'statement-summary.metrics.count.label',\r\n },\r\n];\r\n\r\nexport const OPTIONS3_CHECKBOX_ARRAY = [\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-workpaperReference-checkbox`,\r\n name: 'workpaper',\r\n key: '12',\r\n label: 'statement-summary.workpaper.reference.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-footedFormulas-checkbox`,\r\n name: 'formula',\r\n key: '13',\r\n label: 'statement-summary.footed.formulas.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-internalReferences-checkbox`,\r\n name: 'internalRef',\r\n key: '14',\r\n label: 'statement-summary.internal.references.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-tickmarks-checkbox`,\r\n name: 'tickmarks',\r\n key: '15',\r\n label: 'statement-summary.tickmarks.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-comfortLetter-checkbox`,\r\n name: 'comfortLetter',\r\n key: '16',\r\n label: 'statement-summary.comfort.letter.label',\r\n },\r\n {\r\n id: `${SUMMARY_DISPLAY_OPTIONS_DROPDOWN_ID}-notes-checkbox`,\r\n name: 'note',\r\n key: '17',\r\n label: 'statement-summary.notes.annotations.label',\r\n },\r\n];\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport SummaryElements from 'models/api/statement-summary-elements-model';\r\nimport {\r\n verifiedElementFilter,\r\n reviewedElementFilter,\r\n unverifiedElementFilter,\r\n} from 'constants/feature/statement-summary-constants';\r\nimport StatementSummaryDisplayOptions from 'models/data/statement-summary-display-options-model';\r\nimport classnames from 'classnames';\r\n\r\nexport const STATEMENT_SUMMARY_ELEMENTS_BLOCK = 'statement-summary-elements';\r\n\r\nconst StatementSummaryElementsComponent = ({\r\n showElementListPanel,\r\n summaryElements,\r\n displayOptions,\r\n disabled,\r\n}) =>\r\n (displayOptions.verified ||\r\n displayOptions.reviewed ||\r\n displayOptions.unverified) && (\r\n
          \r\n {displayOptions.unverified && (\r\n \r\n
          \r\n showElementListPanel(unverifiedElementFilter)}\r\n >\r\n
          \r\n {displayOptions.percentage &&\r\n `${summaryElements.unverifiedPercentage}%`}\r\n {displayOptions.count && ` (${summaryElements.unverified})`}\r\n
          \r\n \r\n
          \r\n \r\n )}\r\n {displayOptions.verified && (\r\n \r\n
          \r\n showElementListPanel(verifiedElementFilter)}\r\n >\r\n
          \r\n {displayOptions.percentage &&\r\n `${summaryElements.verifiedPercentage}%`}\r\n {displayOptions.count && ` (${summaryElements.verified})`}\r\n
          \r\n \r\n
          \r\n \r\n )}\r\n {displayOptions.reviewed && (\r\n \r\n
          \r\n showElementListPanel(reviewedElementFilter)}\r\n >\r\n
          \r\n {displayOptions.percentage &&\r\n `${summaryElements.reviewedPercentage}%`}\r\n {displayOptions.count && ` (${summaryElements.reviewed})`}\r\n
          \r\n \r\n
          \r\n \r\n )}\r\n
          \r\n );\r\n\r\nStatementSummaryElementsComponent.propTypes = {\r\n /** Action fired when button is clicked to open element list panel */\r\n showElementListPanel: PropTypes.func.isRequired,\r\n /** The count of elements for the selected revision id */\r\n summaryElements: PropTypes.instanceOf(SummaryElements).isRequired,\r\n /** Obj containing display options from store */\r\n displayOptions: PropTypes.instanceOf(StatementSummaryDisplayOptions)\r\n .isRequired,\r\n};\r\n\r\nexport default StatementSummaryElementsComponent;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.24485 0.571442C3.97276 0.571442 1.32005 3.27384 1.32005 6.60722C1.32005 7.68272 1.59905 8.69001 2.08283 9.56428C2.08339 9.56712 2.08227 9.5711 2.08339 9.57281C2.19945 9.77176 2.32835 10.2129 2.32835 10.6415C2.32835 11.397 2.0739 11.8807 1.45787 12.5077C1.03156 12.942 0.691744 13.2848 0.584609 13.3928C0.561173 13.4166 0.568985 13.4286 0.608045 13.4286H7.24485C10.8891 13.4286 13.4286 10.1219 13.4286 7.0489C13.4286 3.9753 11.4198 2.32453 11.4198 2.32453L11.4187 2.3251C10.3479 1.24164 8.87309 0.571442 7.24485 0.571442Z\",\n fill: \"white\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M7.24485 0.571442C3.97276 0.571442 1.32005 3.27384 1.32005 6.60722C1.32005 7.68272 1.59905 8.69001 2.08283 9.56428C2.08339 9.56712 2.08227 9.5711 2.08339 9.57281C2.19945 9.77176 2.32835 10.2129 2.32835 10.6415C2.32835 11.397 2.0739 11.8807 1.45787 12.5077C1.03156 12.942 0.691744 13.2848 0.584609 13.3928C0.561173 13.4166 0.568985 13.4286 0.608045 13.4286H7.24485C10.8891 13.4286 13.4286 10.1219 13.4286 7.0489C13.4286 3.9753 11.4198 2.32453 11.4198 2.32453L11.4187 2.3251C10.3479 1.24164 8.87309 0.571442 7.24485 0.571442\",\n stroke: \"#00A3E0\",\n strokeWidth: 1.08\n});\n\nvar SvgOpenNote = function SvgOpenNote(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 14,\n height: 14,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgOpenNote, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/open-note.809bf1bb.svg\";\nexport { ForwardRef as ReactComponent };","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\n\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as OpenIcon } from 'icons/open-note.svg';\r\nimport SummaryNotes from 'models/api/statement-summary-notes-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport classnames from 'classnames';\r\n\r\nexport const STATEMENT_SUMMARY_NOTES_BLOCK = 'statement-summary-notes';\r\n\r\nconst StatementSummaryNotesComponent = ({\r\n showNotesPanel,\r\n summaryNotes,\r\n shouldShowNotesSummary,\r\n selectMode,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleFormulaCancelModal,\r\n disabled,\r\n}) => {\r\n if (isNullOrUndefined(summaryNotes)) {\r\n return null;\r\n }\r\n return (\r\n shouldShowNotesSummary && (\r\n
          \r\n \r\n {\r\n if (selectMode === ELEMENT_SELECT_MODES.FORMULA.title) {\r\n openCancelModalAfterModalConfirm(true);\r\n toggleFormulaCancelModal(true);\r\n } else if (\r\n selectMode === ELEMENT_SELECT_MODES.INTERNAL_REFERENCE.title\r\n ) {\r\n toggleInternalReferenceCancelModal(true);\r\n openCancelModalAfterModalConfirm(true);\r\n } else {\r\n showNotesPanel();\r\n }\r\n }}\r\n >\r\n \r\n \r\n ({summaryNotes.notes})\r\n
          \r\n \r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nStatementSummaryNotesComponent.propTypes = {\r\n /** Action fired when button is clicked to open notes panel */\r\n showNotesPanel: PropTypes.func.isRequired,\r\n /** The count of notes for the selected revision id */\r\n summaryNotes: PropTypes.instanceOf(SummaryNotes).isRequired,\r\n /** indicates if in range or batch selection mode */\r\n selectMode: PropTypes.string.isRequired,\r\n /** Action toggling the IR modal */\r\n toggleInternalReferenceCancelModal: PropTypes.func.isRequired,\r\n /** Action to open cancel modal */\r\n openCancelModalAfterModalConfirm: PropTypes.func.isRequired,\r\n /** Action toggling the formula cancel modal */\r\n toggleFormulaCancelModal: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementSummaryNotesComponent;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.91683 1.41667H12.8335C13.1835 1.41667 13.4168 1.65 13.4168 2V17.1667C13.4168 17.5167 13.1835 17.75 12.8335 17.75H1.16683C0.816829 17.75 0.583496 17.5167 0.583496 17.1667V2C0.583496 1.65 0.816829 1.41667 1.16683 1.41667H4.0835V0.833333C4.0835 0.483333 4.31683 0.25 4.66683 0.25H9.3335C9.6835 0.25 9.91683 0.483333 9.91683 0.833333V1.41667ZM8.75016 1.41667H5.25016V2.58333H8.75016V1.41667ZM12.2502 16.5833H1.75016V2.58333H4.0835V3.16667C4.0835 3.51667 4.31683 3.75 4.66683 3.75H9.3335C9.6835 3.75 9.91683 3.51667 9.91683 3.16667V2.58333H12.2502V16.5833ZM10.9087 8.61081C11.142 8.37747 11.142 8.02747 10.9087 7.79414C10.6753 7.56081 10.3253 7.56081 10.092 7.79414L5.83366 12.0525L3.90866 10.1275C3.67533 9.89414 3.32533 9.89414 3.09199 10.1275C2.85866 10.3608 2.85866 10.7108 3.09199 10.9441L5.42533 13.2775C5.54199 13.3941 5.65866 13.4525 5.83366 13.4525C6.00866 13.4525 6.12533 13.3941 6.24199 13.2775L10.9087 8.61081Z\",\n fill: \"#009A44\"\n});\n\nvar SvgTaskReviewedOcr = function SvgTaskReviewedOcr(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 14,\n height: 18,\n viewBox: \"0 0 14 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgTaskReviewedOcr, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/task-reviewed-ocr.8249362d.svg\";\nexport { ForwardRef as ReactComponent };","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\n\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport SummarySections from 'models/api/statement-summary-sections-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ReactComponent as TaskReviewedIcon } from 'icons/task-reviewed-ocr.svg';\r\nimport StatementSummaryDisplayOptions from 'models/data/statement-summary-display-options-model';\r\nimport classnames from 'classnames';\r\n\r\nexport const STATEMENT_SUMMARY_SECTIONS_BLOCK = 'statement-summary-sections';\r\n\r\nconst StatementSummarySectionsComponent = ({\r\n summarySections,\r\n displayOptions,\r\n disabled,\r\n}) => {\r\n if (isNullOrUndefined(summarySections)) {\r\n return null;\r\n }\r\n\r\n const TASK_REVIEWED_ICON = (\r\n \r\n );\r\n\r\n return (\r\n displayOptions.signedOff && (\r\n
          \r\n \r\n \r\n {TASK_REVIEWED_ICON}\r\n
          \r\n {displayOptions.percentage &&\r\n `${summarySections.reviewedPercentage()}%`}\r\n {displayOptions.count &&\r\n ` (${summarySections.reviewed}/${summarySections.total})`}\r\n
          \r\n \r\n \r\n
          \r\n )\r\n );\r\n};\r\n\r\nStatementSummarySectionsComponent.propTypes = {\r\n /** The count of notes for the selected revision id */\r\n summarySections: PropTypes.instanceOf(SummarySections),\r\n /** Obj containing display options from store */\r\n displayOptions: PropTypes.instanceOf(StatementSummaryDisplayOptions)\r\n .isRequired,\r\n};\r\n\r\nexport default StatementSummarySectionsComponent;\r\n","import React from 'react';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport PropTypes from 'prop-types';\r\nimport SummaryElements from 'models/api/statement-summary-elements-model';\r\nimport { flaggedElementFilter } from 'constants/feature/statement-summary-constants';\r\nimport { ReactComponent as FlaggedIcon } from 'icons/flag-icon.svg';\r\nimport classnames from 'classnames';\r\n\r\nexport const STATEMENT_SUMMARY_FLAGGED = 'statement-summary-flagged';\r\n\r\nconst StatementSummaryFlaggedComponent = ({\r\n shouldShowFlagsSummary,\r\n summaryElements,\r\n showElementListPanel,\r\n disabled,\r\n}) => {\r\n return (\r\n shouldShowFlagsSummary && (\r\n
          \r\n \r\n showElementListPanel(flaggedElementFilter)}\r\n disabled={disabled}\r\n >\r\n {}\r\n \r\n ({summaryElements.flagged})\r\n
          \r\n \r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nStatementSummaryFlaggedComponent.propTypes = {\r\n /** Action fired when button is clicked to open element list panel */\r\n showElementListPanel: PropTypes.func.isRequired,\r\n /** The count of elements for the selected revision id */\r\n summaryElements: PropTypes.instanceOf(SummaryElements).isRequired,\r\n /** Obj containing boolean for displaying flags option */\r\n shouldShowFlagsSummary: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default StatementSummaryFlaggedComponent;\r\n","import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport SummaryElements from 'models/api/statement-summary-elements-model';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nexport const STATEMENT_SUMMARY_ELEMENTS_TOTAL_BLOCK =\r\n 'statement-summary-elements-total';\r\n\r\nconst StatementSummaryElementsTotal = ({ summaryElements }) => (\r\n
          \r\n

          \r\n (\r\n {summaryElements.totalElements})\r\n

          \r\n
          \r\n);\r\n\r\nStatementSummaryElementsTotal.propTypes = {\r\n /** The count of elements for the selected revision id */\r\n summaryElements: PropTypes.instanceOf(SummaryElements).isRequired,\r\n};\r\n\r\nexport default StatementSummaryElementsTotal;\r\n","import { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\n\r\nexport const ANNOTATION_DISPLAY_FILTER_OPTIONS =\r\n 'annotation-display-filter-options';\r\n\r\nexport const ANNOTATION_DISPLAY_FILTER_OPTIONS_ID =\r\n 'annotation-display-filter-options-id';\r\n\r\nconst annotations = {\r\n workpaper: 'workpaper',\r\n tickmarks: 'tickmarks',\r\n internalRef: 'internalRef',\r\n comfortLetter: 'comfortLetter',\r\n formula: 'formula',\r\n flag: 'flag',\r\n note: 'note',\r\n status: 'status',\r\n};\r\n\r\nexport const DISPLAY_ANNOTATION_CHECKBOX_ARRAY = [\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-workpaper-checkbox`,\r\n name: annotations.workpaper,\r\n key: '1',\r\n label: 'annotation-display-filter-workpaper.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-tickmarks-checkbox`,\r\n name: annotations.tickmarks,\r\n key: '2',\r\n label: 'annotation-display-filter-tickmarks.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-internalRef-checkbox`,\r\n name: annotations.internalRef,\r\n key: '3',\r\n label: 'annotation-display-filter-internalRef.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-formula-checkbox`,\r\n name: annotations.formula,\r\n key: '4',\r\n label: 'annotation-display-filter-formula.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-comfortLetter-checkbox`,\r\n name: annotations.comfortLetter,\r\n featureName: FEATURE_NAMES.COMFORT_LETTER_FEATURE,\r\n key: '5',\r\n label: 'annotation-display-filter-comfortLetter.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-flag-checkbox`,\r\n name: annotations.flag,\r\n key: '6',\r\n label: 'annotation-display-filter-flag.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-status-checkbox`,\r\n name: annotations.status,\r\n key: '7',\r\n label: 'annotation-display-filter-status.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-notes-checkbox`,\r\n name: annotations.note,\r\n key: '8',\r\n label: 'annotation-display-filter-notes.label',\r\n },\r\n];\r\n\r\nexport const DISPLAY_ANNOTATION_SUMMARY_TAB_ARRAY = [\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-workpaper`,\r\n name: annotations.workpaper,\r\n key: '1',\r\n label: 'annotation-display-filter-workpaper-initial.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-formula`,\r\n name: annotations.formula,\r\n key: '2',\r\n label: 'annotation-display-filter-formula-initial.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-internalRef`,\r\n name: annotations.internalRef,\r\n key: '3',\r\n label: 'annotation-display-filter-internalRef-initial.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-tickmarks`,\r\n name: annotations.tickmarks,\r\n key: '4',\r\n label: 'annotation-display-filter-tickmarks-initial.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-comfortLetter`,\r\n name: annotations.comfortLetter,\r\n featureName: FEATURE_NAMES.COMFORT_LETTER_FEATURE,\r\n key: '5',\r\n label: 'annotation-display-filter-comfortLetter-initial.label',\r\n },\r\n {\r\n id: `${ANNOTATION_DISPLAY_FILTER_OPTIONS_ID}-notes`,\r\n name: annotations.note,\r\n key: '6',\r\n },\r\n];\r\n\r\nconst tooltipTexts = {\r\n workpaper: {\r\n selected: 'annotation-display-filter-selected-workpaper-tooltip',\r\n unselected: 'annotation-display-filter-unselected-workpaper-tooltip',\r\n },\r\n formula: {\r\n selected: 'annotation-display-filter-selected-formula-tooltip',\r\n unselected: 'annotation-display-filter-unselected-formula-tooltip',\r\n },\r\n internalRef: {\r\n selected: 'annotation-display-filter-selected-internalRef-tooltip',\r\n unselected: 'annotation-display-filter-unselected-internalRef-tooltip',\r\n },\r\n tickmarks: {\r\n selected: 'annotation-display-filter-selected-tickmarks-tooltip',\r\n unselected: 'annotation-display-filter-unselected-tickmarks-tooltip',\r\n },\r\n comfortLetter: {\r\n selected: 'annotation-display-filter-selected-comfortLetter-tooltip',\r\n unselected: 'annotation-display-filter-unselected-comfortLetter-tooltip',\r\n },\r\n};\r\n\r\nexport const renderTooltipTextBySelection = ({ name, isOptionSelected }) => {\r\n const tooltip = tooltipTexts[name];\r\n if (!tooltip) return;\r\n return isOptionSelected ? tooltip.selected : tooltip.unselected;\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M6.085 9.585H21.2577L23.1727 11.5L21.2577 13.415H6.085V9.585Z\",\n stroke: \"#0076A8\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M23.5 17.5H6.00012\",\n stroke: \"#0076A8\"\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M8 15.5L6 17.5L8 19.5\",\n stroke: \"#0076A8\"\n});\n\nvar SvgAnnotationExpanded = function SvgAnnotationExpanded(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 28,\n viewBox: \"0 0 29 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgAnnotationExpanded, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/annotation-expanded.747b519c.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M17.585 9.585H20.7577L22.6727 11.5L20.7577 13.415H17.585V9.585Z\",\n stroke: \"#0076A8\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M5.49995 17.5L22.9999 17.5\",\n stroke: \"#0076A8\"\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M20.9999 19.5L22.9999 17.5L20.9999 15.5\",\n stroke: \"#0076A8\"\n});\n\nvar SvgAnnotationCollapsed = function SvgAnnotationCollapsed(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgAnnotationCollapsed, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/annotation-collapsed.43f28776.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.67035 9.65928C7.68576 10.6495 6.10014 12.2 5.08304 13.6875C5.01251 13.7882 4.99236 13.9041 5.00243 14.02C5.00243 14.1106 5.02258 14.1963 5.07296 14.2769C6.31226 16.1761 9.58682 19.3953 14.005 19.3953C15.5925 19.3953 17.0556 18.9849 18.3482 18.3371L17.5928 17.5817C16.5078 18.0795 15.302 18.3873 14.0075 18.3877C10.2203 18.3865 7.34976 15.7425 6.10571 13.9948C7.09804 12.6315 8.58918 11.2503 10.4247 10.4136L9.67035 9.65928ZM11.8976 11.8866C11.3456 12.4229 11.0024 13.1727 11.0024 13.9998C11.0024 15.622 12.3223 16.9469 13.9495 16.9469C14.7787 16.9469 15.5282 16.6042 16.0638 16.0527L15.3526 15.3416C14.9989 15.7126 14.5004 15.9444 13.9495 15.9444C12.8815 15.9444 12.01 15.0729 12.01 14.0049C12.01 13.4541 12.2418 12.9555 12.6129 12.6018L11.8976 11.8866ZM13.7808 12.0726L12.9393 11.2311C13.2544 11.1158 13.5947 11.0527 13.9495 11.0527C15.5767 11.0527 16.8966 12.3726 16.8966 13.9998C16.8966 14.3549 16.8338 14.6953 16.7187 15.0105L15.8818 14.1737C15.8866 14.118 15.8891 14.0617 15.8891 14.0049C15.8891 12.9369 15.0176 12.0653 13.9495 12.0653C13.8927 12.0653 13.8364 12.0678 13.7808 12.0726ZM18.6961 16.988C20.0213 16.1662 21.1125 15.0812 21.8941 14.0099C20.6548 12.2618 17.7833 9.61693 13.9949 9.61693C13.1791 9.61693 12.3986 9.73873 11.6613 9.95317L10.8616 9.15342C11.835 8.81049 12.8848 8.60938 13.9949 8.60938C18.413 8.60938 21.6876 11.8285 22.9218 13.7278C22.9722 13.8084 22.9974 13.894 22.9974 13.9797C23.0075 14.0955 22.9873 14.2114 22.9168 14.3172C22.0946 15.5197 20.902 16.7633 19.427 17.7188L18.6961 16.988ZM14.0075 18.3877C14.0066 18.3877 14.0058 18.3877 14.005 18.3877H14.01C14.0092 18.3877 14.0083 18.3877 14.0075 18.3877Z\",\n fill: \"#0076A8\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.81695 7.71333C8.05126 7.47901 8.43116 7.47901 8.66548 7.71333L20.1834 19.2313C20.4177 19.4656 20.4177 19.8455 20.1834 20.0798C19.9491 20.3141 19.5692 20.3141 19.3349 20.0798L7.81695 8.56185C7.58263 8.32754 7.58263 7.94764 7.81695 7.71333Z\",\n fill: \"#0076A8\"\n});\n\nvar SvgShowElementsOnSummaryBar = function SvgShowElementsOnSummaryBar(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgShowElementsOnSummaryBar, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/show-elements-on-summary-bar.80258f40.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M14.51 18.3877C10.7216 18.3877 7.85004 15.7429 6.60571 13.9948C8.18253 11.8285 11.0188 9.61693 14.4949 9.61693C18.2833 9.61693 21.1548 12.2618 22.3941 14.0099C20.8173 16.1711 17.981 18.3877 14.505 18.3877M23.4218 13.7278C22.1876 11.8285 18.913 8.60938 14.4949 8.60938C10.4848 8.60938 7.26062 11.2341 5.58304 13.6875C5.51251 13.7882 5.49236 13.9041 5.50243 14.02C5.50243 14.1106 5.52258 14.1963 5.57296 14.2769C6.81226 16.1761 10.0868 19.3953 14.505 19.3953C18.5201 19.3953 21.7392 16.7706 23.4168 14.3172C23.4873 14.2114 23.5075 14.0955 23.4974 13.9797C23.4974 13.894 23.4722 13.8084 23.4218 13.7278Z\",\n fill: \"#0076A8\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M14.4495 15.9464C13.3815 15.9464 12.51 15.0748 12.51 14.0068C12.51 12.9388 13.3815 12.0673 14.4495 12.0673C15.5176 12.0673 16.3891 12.9388 16.3891 14.0068C16.3891 15.0748 15.5176 15.9464 14.4495 15.9464ZM14.4495 11.0547C12.8223 11.0547 11.5024 12.3796 11.5024 14.0018C11.5024 15.624 12.8223 16.9489 14.4495 16.9489C16.0767 16.9489 17.3966 15.629 17.3966 14.0018C17.3966 12.3746 16.0767 11.0547 14.4495 11.0547Z\",\n fill: \"#0076A8\"\n});\n\nvar SvgHideElementsOnSummaryBar = function SvgHideElementsOnSummaryBar(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 28,\n viewBox: \"0 0 29 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgHideElementsOnSummaryBar, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/hide-elements-on-summary-bar.70266c84.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport { ReactComponent as DisplayEyeIcon } from 'icons/show-elements-on-summary-bar.svg';\r\nimport { ReactComponent as HideEyeIcon } from 'icons/hide-elements-on-summary-bar.svg';\r\nimport classnames from 'classnames';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\n\r\nconst STATEMENT_SUMMARY_ELEMENTS_DISPLAY_BLOCK =\r\n 'statement-summary-elements-display';\r\nconst STATEMENT_SUMMARY_ELEMENTS_DISPLAY_BLOCK_ID =\r\n 'statement-summary-elements-display-id';\r\n\r\nconst STATEMENT_SUMMARY_ELEMENTS_DISPLAY_EYE_ICON_SIZE = 30;\r\n\r\nconst StatementSummaryElementsDisplay = ({\r\n setHideOrDisplayElementsOnStatementPage,\r\n displayElementDetailsOnStatementPage,\r\n disabled,\r\n}) => (\r\n \r\n setHideOrDisplayElementsOnStatementPage({\r\n displayValue: !displayElementDetailsOnStatementPage,\r\n })\r\n }\r\n >\r\n \r\n \r\n {displayElementDetailsOnStatementPage ? (\r\n \r\n ) : (\r\n \r\n )}\r\n \r\n \r\n \r\n);\r\n\r\nexport default StatementSummaryElementsDisplay;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M18.167 8.83335C18.167 13.6658 14.5107 18.1667 10.0003 18.1667C8.54297 18.1667 0.666992 18.1667 0.666992 18.1667C0.666992 18.1667 2.18691 16.8769 2.70866 15.8334C3.29199 14.6667 3.26121 14.1074 2.75205 12.9955C2.16531 11.7141 1.83366 10.2888 1.83366 8.83335C1.83366 4.00086 5.49 0.666687 10.0003 0.666687C14.5107 0.666687 18.167 4.00086 18.167 8.83335Z\",\n fill: \"white\"\n});\n\nvar SvgNoBorderNoteIcon = function SvgNoBorderNoteIcon(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 19,\n height: 19,\n viewBox: \"0 0 19 19\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgNoBorderNoteIcon, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/no-border-note-icon.54099c05.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M8.585 13.585H17.7577L19.6727 15.5L17.7577 17.415H8.585V13.585Z\",\n stroke: \"#0076A8\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M10.5 11.5H18.0001L20.0001 13.5\",\n stroke: \"#0076A8\",\n strokeWidth: 1.17\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M12.5 9.5H18.0001L20.0001 11.5\",\n stroke: \"#0076A8\",\n strokeWidth: 1.17\n});\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M6.5 7V5.5H8\",\n stroke: \"#0076A8\"\n});\n\nvar _ref6 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M8 20.5L6.5 20.5L6.5 19\",\n stroke: \"#0076A8\"\n});\n\nvar _ref7 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M22.5 21.5L22.5 19.5L20.5 19.5L20.5 21.5L22.5 21.5Z\",\n stroke: \"#0076A8\"\n});\n\nvar _ref8 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M20 5.5L21.5 5.5L21.5 7\",\n stroke: \"#0076A8\"\n});\n\nvar _ref9 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 9,\n y1: 5.5,\n x2: 11,\n y2: 5.5,\n stroke: \"#0076A8\"\n});\n\nvar _ref10 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 13,\n y1: 5.5,\n x2: 15,\n y2: 5.5,\n stroke: \"#0076A8\"\n});\n\nvar _ref11 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 9,\n y1: 20.5,\n x2: 11,\n y2: 20.5,\n stroke: \"#0076A8\"\n});\n\nvar _ref12 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 17,\n y1: 5.5,\n x2: 19,\n y2: 5.5,\n stroke: \"#0076A8\"\n});\n\nvar _ref13 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 17,\n y1: 20.5,\n x2: 19,\n y2: 20.5,\n stroke: \"#0076A8\"\n});\n\nvar _ref14 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 13,\n y1: 20.5,\n x2: 15,\n y2: 20.5,\n stroke: \"#0076A8\"\n});\n\nvar _ref15 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 21.5,\n y1: 12,\n x2: 21.5,\n y2: 14,\n stroke: \"#0076A8\"\n});\n\nvar _ref16 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 21.5,\n y1: 8,\n x2: 21.5,\n y2: 10,\n stroke: \"#0076A8\"\n});\n\nvar _ref17 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 21.5,\n y1: 16,\n x2: 21.5,\n y2: 18,\n stroke: \"#0076A8\"\n});\n\nvar _ref18 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 6.5,\n y1: 12,\n x2: 6.5,\n y2: 14,\n stroke: \"#0076A8\"\n});\n\nvar _ref19 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 6.5,\n y1: 8,\n x2: 6.5,\n y2: 10,\n stroke: \"#0076A8\"\n});\n\nvar _ref20 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 6.5,\n y1: 16,\n x2: 6.5,\n y2: 18,\n stroke: \"#0076A8\"\n});\n\nvar SvgExpandAllElementsDefault = function SvgExpandAllElementsDefault(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgExpandAllElementsDefault, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/expand-all-elements-default.ce65cbde.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M8.585 13.585H17.7577L19.6727 15.5L17.7577 17.415H8.585V13.585Z\",\n stroke: \"white\",\n strokeWidth: 1.17\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M10.5 11.5H18.0001L20.0001 13.5\",\n stroke: \"white\",\n strokeWidth: 1.17\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M12.5 9.5H18.0001L20.0001 11.5\",\n stroke: \"white\",\n strokeWidth: 1.17\n});\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M6.5 7V5.5H8\",\n stroke: \"white\"\n});\n\nvar _ref6 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M8 20.5L6.5 20.5L6.5 19\",\n stroke: \"white\"\n});\n\nvar _ref7 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M22.5 21.5L22.5 19.5L20.5 19.5L20.5 21.5L22.5 21.5Z\",\n stroke: \"white\"\n});\n\nvar _ref8 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M20 5.5L21.5 5.5L21.5 7\",\n stroke: \"white\"\n});\n\nvar _ref9 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 9,\n y1: 5.5,\n x2: 11,\n y2: 5.5,\n stroke: \"white\"\n});\n\nvar _ref10 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 13,\n y1: 5.5,\n x2: 15,\n y2: 5.5,\n stroke: \"white\"\n});\n\nvar _ref11 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 9,\n y1: 20.5,\n x2: 11,\n y2: 20.5,\n stroke: \"white\"\n});\n\nvar _ref12 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 17,\n y1: 5.5,\n x2: 19,\n y2: 5.5,\n stroke: \"white\"\n});\n\nvar _ref13 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 17,\n y1: 20.5,\n x2: 19,\n y2: 20.5,\n stroke: \"white\"\n});\n\nvar _ref14 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 13,\n y1: 20.5,\n x2: 15,\n y2: 20.5,\n stroke: \"white\"\n});\n\nvar _ref15 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 21.5,\n y1: 12,\n x2: 21.5,\n y2: 14,\n stroke: \"white\"\n});\n\nvar _ref16 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 21.5,\n y1: 8,\n x2: 21.5,\n y2: 10,\n stroke: \"white\"\n});\n\nvar _ref17 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 21.5,\n y1: 16,\n x2: 21.5,\n y2: 18,\n stroke: \"white\"\n});\n\nvar _ref18 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 6.5,\n y1: 12,\n x2: 6.5,\n y2: 14,\n stroke: \"white\"\n});\n\nvar _ref19 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 6.5,\n y1: 8,\n x2: 6.5,\n y2: 10,\n stroke: \"white\"\n});\n\nvar _ref20 =\n/*#__PURE__*/\nReact.createElement(\"line\", {\n x1: 6.5,\n y1: 16,\n x2: 6.5,\n y2: 18,\n stroke: \"white\"\n});\n\nvar SvgExpandAllElementsActive = function SvgExpandAllElementsActive(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 28,\n height: 28,\n viewBox: \"0 0 28 28\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgExpandAllElementsActive, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/expand-all-elements-active.6656f76c.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport AnnotationDisplayOptions from 'models/data/annotation-display-filter-options-model';\r\nimport classNames from 'classnames';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport {\r\n DISPLAY_ANNOTATION_SUMMARY_TAB_ARRAY,\r\n renderTooltipTextBySelection,\r\n} from 'constants/feature/annotation-display-filter-constants';\r\nimport { ReactComponent as ExpandedIcon } from 'icons/annotation-expanded.svg';\r\nimport { ReactComponent as CollapsedIcon } from 'icons/annotation-collapsed.svg';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport StatementSummaryElementsDisplay from './statement-summary-elements-display';\r\nimport { ReactComponent as SelectedNoteIcon } from 'icons/no-border-note-icon.svg';\r\nimport { ReactComponent as UnselectedNoteIcon } from 'icons/open-note.svg';\r\nimport { ReactComponent as ExpandAllElementsDefault } from 'icons/expand-all-elements-default.svg';\r\nimport { ReactComponent as ExpandAllElementsActive } from 'icons/expand-all-elements-active.svg';\r\nimport { cancelBatchUpdatePanel } from 'store/actions/batch-panel-actions';\r\nimport { clearModeIfPossible } from 'store/actions/modes-actions';\r\nimport Permissions from 'permissions/permissions';\r\n\r\nexport const STATEMENT_SUMMARY_ANNOTATIONS_BLOCK =\r\n 'statement-summary-annotations';\r\nexport const STATEMENT_SUMMARY_ANNOTATIONS_BLOCK_ID =\r\n 'statement-summary-annotations-id';\r\nexport const EXPAND_SELECTED_ELEMENTS_ID = 'expand-selected-elements';\r\nconst ANNOTATION_SUMMARY_ICON_SIZE = '25px';\r\nconst ANNOTATION_ICON_NOTE_ELEMENT = 'note';\r\nconst StatementSummaryAnnotationsComponent = ({\r\n setAnnotationDisplayOption,\r\n disabled,\r\n disableAllElementsCallout,\r\n displaySummaryOptions,\r\n blacklineViewShowElementMode,\r\n setHideOrDisplayElementsOnStatementPage,\r\n displayElementDetailsOnStatementPage,\r\n blacklineViewMode,\r\n setBatchModeSelectedIfPossible,\r\n selectedProjectId,\r\n selectedStatement,\r\n showBatchPanelAction,\r\n annotationDisplayOptions,\r\n cancelBatchUpdatePanel,\r\n clearBatchModeIfPossible,\r\n}) => {\r\n const [displayOptions, setdisplayOptions] = useState(\r\n new AnnotationDisplayOptions(),\r\n );\r\n\r\n useEffect(() => {\r\n return () => {\r\n setAnnotationDisplayOption(new AnnotationDisplayOptions());\r\n };\r\n }, [setAnnotationDisplayOption]);\r\n\r\n const handleChange = (option) => {\r\n let updatedOptions = displayOptions.merge({\r\n [option]: !displayOptions[option],\r\n });\r\n updatedOptions.expandAllElements =\r\n annotationDisplayOptions.expandAllElements;\r\n setdisplayOptions(updatedOptions);\r\n setAnnotationDisplayOption(updatedOptions);\r\n };\r\n\r\n const _setBatchModeWithBannerAndOpenBatchPanel = () => {\r\n setBatchModeSelectedIfPossible(); // setElementSelectModeBatchWithBannerAction action inside modes-action.js\r\n showBatchPanelAction();\r\n };\r\n\r\n const _userCanBatch = Permissions.Element.canEditElement(selectedProjectId);\r\n const readOnly = selectedStatement.isReadOnly();\r\n\r\n const showAllDisabled = disabled && !blacklineViewShowElementMode;\r\n\r\n return (\r\n
          \r\n {\r\n if (!showAllDisabled) {\r\n let updatedOptions = displayOptions.merge({\r\n showAll: !displayOptions['showAll'],\r\n });\r\n if (updatedOptions.showAll) {\r\n let options = new AnnotationDisplayOptions();\r\n options.showAll = true;\r\n options.expandAllElements =\r\n annotationDisplayOptions.expandAllElements;\r\n setdisplayOptions(options);\r\n setAnnotationDisplayOption(options);\r\n disableAllElementsCallout({ showCallout: true });\r\n } else {\r\n setdisplayOptions(updatedOptions);\r\n setAnnotationDisplayOption(updatedOptions);\r\n disableAllElementsCallout({ showCallout: false });\r\n }\r\n }\r\n }}\r\n >\r\n \r\n
          \r\n {displayOptions.showAll ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
          \r\n \r\n
          \r\n {\r\n if (!showAllDisabled) {\r\n if (_userCanBatch || !readOnly || !disabled) {\r\n if (annotationDisplayOptions.expandAllElements) {\r\n cancelBatchUpdatePanel();\r\n clearBatchModeIfPossible();\r\n }\r\n setAnnotationDisplayOption({\r\n ...annotationDisplayOptions,\r\n expandAllElements: !annotationDisplayOptions.expandAllElements,\r\n });\r\n !annotationDisplayOptions.expandAllElements &&\r\n _setBatchModeWithBannerAndOpenBatchPanel();\r\n }\r\n }\r\n }}\r\n >\r\n \r\n
          \r\n {annotationDisplayOptions.expandAllElements ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
          \r\n \r\n \r\n\r\n \r\n {DISPLAY_ANNOTATION_SUMMARY_TAB_ARRAY.map((item) => {\r\n return (\r\n displaySummaryOptions[item.name] && (\r\n !disabled && handleChange(item.name)}\r\n >\r\n {item.name === ANNOTATION_ICON_NOTE_ELEMENT ? (\r\n \r\n \r\n {displayOptions[item.name] ? (\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 {/* We might later show the count of annotations */}\r\n {/* \r\n 201\r\n */}\r\n \r\n )\r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { id: selectedProjectId },\r\n selectedStatement,\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { contentViewMode },\r\n },\r\n },\r\n}) => ({\r\n contentViewMode,\r\n selectedProjectId,\r\n selectedStatement,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n cancelBatchUpdatePanel,\r\n clearBatchModeIfPossible: clearModeIfPossible,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(StatementSummaryAnnotationsComponent);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0 0H13C13.5523 0 14 0.447715 14 1V33C14 33.5523 13.5523 34 13 34H0V0Z\",\n fill: \"white\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0 0H13C13.5523 0 14 0.447715 14 1V33C14 33.5523 13.5523 34 13 34H0V0Z\",\n fill: \"#F5F5F5\"\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n clipPath: \"url(#clip0_1111_120263)\"\n}, React.createElement(\"path\", {\n d: \"M10.2516 15.3672C10.3629 15.3672 10.4464 15.4217 10.502 15.5308C10.5577 15.6398 10.5299 15.7489 10.4464 15.8307L7.66332 18.5569C7.552 18.666 7.38501 18.666 7.27369 18.5569L4.49063 15.8307C4.40713 15.7489 4.3793 15.6398 4.43496 15.5308C4.46279 15.4217 4.57412 15.3672 4.68544 15.3672H10.2516Z\",\n fill: \"black\"\n}));\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"defs\", null, React.createElement(\"clipPath\", {\n id: \"clip0_1111_120263\"\n}, React.createElement(\"rect\", {\n width: 7,\n height: 4,\n fill: \"white\",\n transform: \"translate(4 15)\"\n})));\n\nvar SvgCalloutsDropdownArrow = function SvgCalloutsDropdownArrow(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 14,\n height: 34,\n viewBox: \"0 0 14 34\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCalloutsDropdownArrow, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/callouts-dropdown-arrow.4e819dc5.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useState } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport classnames from 'classnames';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport useOutsideClick from 'components/hooks/useOutsideClick';\r\n\r\nconst BLOCK = 'icon-dropdown';\r\n\r\nconst IconDropDown = ({\r\n displayIconPlaceholder,\r\n arrowIcon,\r\n onSelectOption,\r\n options,\r\n value,\r\n tooltip,\r\n disabled,\r\n}) => {\r\n const [displayOptions, setDisplayOptions] = useState(false);\r\n const [iconDropDownContainer] = useOutsideClick(() =>\r\n setDisplayOptions(false),\r\n ); // used to handle outside click\r\n\r\n const getHighlightedDisplayValue = (display) => {\r\n const children = (\r\n
          \r\n \r\n {display}\r\n
          \r\n {arrowIcon}\r\n \r\n );\r\n\r\n return tooltip.id ? (\r\n \r\n {children}\r\n \r\n ) : (\r\n <>{children}\r\n );\r\n };\r\n return (\r\n !disabled && setDisplayOptions(!displayOptions)}\r\n ref={iconDropDownContainer}\r\n >\r\n {value && value.icon\r\n ? getHighlightedDisplayValue(value.icon)\r\n : getHighlightedDisplayValue(displayIconPlaceholder)}\r\n\r\n {displayOptions && (\r\n
            \r\n {options.map((item) => {\r\n return (\r\n onSelectOption(item)}\r\n >\r\n {item.icon}\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\nexport default IconDropDown;\r\n","import React, { useEffect } from 'react';\r\nimport { ReactComponent as CalloutDirectionSetterLeft } from 'icons/callouts-direction-setter-left.svg';\r\nimport { ReactComponent as CalloutDrodownArrow } from 'icons/callouts-dropdown-arrow.svg';\r\nimport { ANNOTATION_POSITIONS } from 'constants/feature/annotation-elements-constants';\r\nimport IconDropDown from 'components/common/icon-dropdown';\r\n\r\nexport const STATEMENT_ANNOTATIONS_UPDATE_BLOCK =\r\n 'statement-annotations-update-block';\r\nconst ANNOTATION_SUMMARY_ICON_SIZE = '30px';\r\nconst STATEMENT_ANNOTATIONS_UPDATE_BLOCK_ID =\r\n 'statement-annotations-update-block-id';\r\nconst CALLOUT_DROP_DOWN_ARROW_WIDTH = 15;\r\nconst CALLOUT_DROP_DOWN_ARROW_HEIGHT = 30;\r\n\r\nconst StatementAnnotationsUpdate = ({\r\n setAnnotationsDisplayPosition,\r\n annotationDisplayPosition,\r\n disabled,\r\n}) => {\r\n useEffect(() => {\r\n setAnnotationsDisplayPosition({ position: ANNOTATION_POSITIONS[0] });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n const selectAnnotationPosition = (position) => {\r\n setAnnotationsDisplayPosition({ position });\r\n };\r\n\r\n return (\r\n
          \r\n
          \r\n \r\n }\r\n tooltip={{\r\n id: STATEMENT_ANNOTATIONS_UPDATE_BLOCK_ID,\r\n text: disabled\r\n ? null\r\n : 'statement-annotations-update-block-tooltip',\r\n position: 'top',\r\n }}\r\n arrowIcon={\r\n \r\n }\r\n options={ANNOTATION_POSITIONS}\r\n value={annotationDisplayPosition.annotationPosition}\r\n onSelectOption={(position) => selectAnnotationPosition(position)}\r\n disabled={disabled}\r\n />\r\n
          \r\n
          \r\n );\r\n};\r\n\r\nexport default StatementAnnotationsUpdate;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Plus-/-Special\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"g\", {\n id: \"add\",\n transform: \"translate(5.000000, 5.000000)\",\n fill: \"#00A3E0\"\n}, React.createElement(\"path\", {\n d: \"M17.29675,8.44175 L9.72625,8.44175 L9.72625,0.8695 C9.72625,0.54925 9.4655,0.2885 9.1435,0.2885 C8.8215,0.2885 8.56075,0.54925 8.56075,0.8695 L8.56075,8.44175 L0.99025,8.44175 C0.668775,8.44175 0.40785,8.7025 0.40785,9.024675 C0.40785,9.3465 0.668775,9.6055 0.99025,9.6055 L8.56075,9.6055 L8.56075,17.17775 C8.56075,17.49975 8.8215,17.7605 9.1435,17.7605 C9.4655,17.7605 9.72625,17.49975 9.72625,17.17775 L9.72625,9.6055 L17.29675,9.6055 C17.61875,9.6055 17.8795,9.3465 17.8795,9.024675 C17.8795,8.7025 17.61875,8.44175 17.29675,8.44175 Z\",\n id: \"plus\"\n})));\n\nvar SvgPlusZoom = function SvgPlusZoom(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgPlusZoom, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/plus-zoom.3732fb27.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"desc\", null, \"Created with Sketch.\");\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Icons-/-Functional-/-Minus-/-Special\",\n stroke: \"none\",\n strokeWidth: 1,\n fill: \"none\",\n fillRule: \"evenodd\"\n}, React.createElement(\"rect\", {\n id: \"Bounding-Box\",\n x: 0,\n y: 0,\n width: 28,\n height: 28\n}), React.createElement(\"g\", {\n id: \"minus\",\n transform: \"translate(5.000000, 13.000000)\",\n fill: \"#00A3E0\"\n}, React.createElement(\"path\", {\n d: \"M17.29675,0.44175 L0.99025,0.44175 C0.668775,0.44175 0.40785,0.7025 0.40785,1.024675 C0.40785,1.3465 0.668775,1.6055 0.99025,1.6055 L17.29675,1.6055 C17.61875,1.6055 17.8795,1.3465 17.8795,1.024675 C17.8795,0.7025 17.61875,0.44175 17.29675,0.44175 Z\",\n id: \"minus1\"\n})));\n\nvar SvgMinusZoom = function SvgMinusZoom(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: \"28px\",\n height: \"28px\",\n viewBox: \"0 0 28 28\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgMinusZoom, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/minus-zoom.b95950c7.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as FullWidthIcon } from 'icons/fullscreen-increase.svg';\r\nimport { ReactComponent as FixedWidthIcon } from 'icons/fullscreen-decrease.svg';\r\nimport classnames from 'classnames';\r\n\r\nconst ExpandAll = ({\r\n BLOCK,\r\n contentFullMode,\r\n setContentFixedMode,\r\n setContentFullMode,\r\n disabled,\r\n}) => {\r\n const ContentViewModeIcon = contentFullMode ? FixedWidthIcon : FullWidthIcon;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default ExpandAll;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as Plus } from 'icons/plus-zoom.svg';\r\nimport { ReactComponent as Minus } from 'icons/minus-zoom.svg';\r\nimport SideBySideViewZoom from 'models/data/side-by-side-view-zoom-model';\r\nimport Zoom from 'models/data/zoom-model';\r\nimport ExpandAll from './expand-all';\r\nimport classnames from 'classnames';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\n\r\nconst ZOOM_CONTROL_BLOCK = 'zoom-control';\r\nconst SIDE_BY_SIDE_ZOOM_CONTROL = 'side-by-side-zoom-control';\r\nconst ZOOM_CONTROL_ID_BLOCK = 'zoom-control-id';\r\nconst ZOOM_ICON_SIZE = '20px';\r\n\r\nexport const ZoomControl = ({\r\n onPlus,\r\n onMinus,\r\n zoomModel,\r\n contentViewMode,\r\n setContentFixedMode,\r\n setContentFullMode,\r\n shouldDisplayExpandIcon,\r\n}) => {\r\n const { contentFullMode } = contentViewMode;\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {shouldDisplayExpandIcon && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nZoomControl.propTypes = {\r\n /** Function fired when plus button pressed */\r\n onPlus: PropTypes.func.isRequired,\r\n /** Function fired when minus button pressed */\r\n onMinus: PropTypes.func.isRequired,\r\n /** zoom model */\r\n zoomModel: PropTypes.oneOfType([\r\n PropTypes.instanceOf(Zoom),\r\n PropTypes.instanceOf(SideBySideViewZoom),\r\n ]).isRequired,\r\n /** content view mode model */\r\n contentViewMode: PropTypes.object.isRequired,\r\n /** Function fired to set the content to fixed mode */\r\n setContentFixedMode: PropTypes.func.isRequired,\r\n /** Function fired to set the content to full mode */\r\n setContentFullMode: PropTypes.func.isRequired,\r\n /** based on this boolean value expand full view of statement will be viewed in fullmode */\r\n shouldDisplayExpandIcon: PropTypes.bool,\r\n};\r\n\r\nexport default ZoomControl;\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport ZoomControl from 'components/common/zoom-control-component';\r\nimport { SCALE_ALTERATION } from 'constants/feature/statement-content-constants';\r\nimport {\r\n incrementZoom,\r\n decrementZoom,\r\n leftIncrementZoom,\r\n leftDecrementZoom,\r\n rightIncrementZoom,\r\n rightDecrementZoom,\r\n} from 'store/actions/zoom-actions';\r\nimport {\r\n setContentFixedMode,\r\n setContentFullMode,\r\n} from 'store/actions/content-view-modes-actions';\r\n\r\nexport const ZoomControlHOC = (props) => {\r\n const {\r\n zoom,\r\n leftZoom,\r\n leftDecrementZoom,\r\n leftIncrementZoom,\r\n incrementZoom,\r\n decrementZoom,\r\n isLeftSideView,\r\n isSideBySidePage,\r\n rightIncrementZoom,\r\n rightDecrementZoom,\r\n rightZoom,\r\n sectionIdList,\r\n leftSectionIdList,\r\n selectedStatement,\r\n leftSelectedStatement,\r\n ocrCurrentViewPageNumber,\r\n leftOcrCurrentViewPageNumber,\r\n } = props;\r\n const selectedStatementData = isLeftSideView\r\n ? leftSelectedStatement\r\n : selectedStatement;\r\n const { dpi, isOCR } = selectedStatementData;\r\n const scale = SCALE_ALTERATION * (150 / dpi);\r\n const zoomValue = isSideBySidePage\r\n ? isLeftSideView\r\n ? leftZoom\r\n : rightZoom\r\n : zoom;\r\n const currentPageNumber = isSideBySidePage\r\n ? isLeftSideView\r\n ? leftOcrCurrentViewPageNumber\r\n : ocrCurrentViewPageNumber\r\n : ocrCurrentViewPageNumber;\r\n const containerId = isLeftSideView\r\n ? 'statement-content-panel-ocr__document-id-left-view'\r\n : 'statement-content-panel-ocr__document-id';\r\n const sectionIdListData = isLeftSideView ? leftSectionIdList : sectionIdList;\r\n\r\n const getPageTopPosition = ({ isPlusClicked }) => {\r\n const currentZoom = isPlusClicked\r\n ? zoomValue.currentZoom + zoomValue.stepValue\r\n : zoomValue.currentZoom - zoomValue.stepValue;\r\n const currentZoomRatio = currentZoom / 100;\r\n const scaleWithZoom = scale * currentZoomRatio;\r\n const height = sectionIdListData.sectionIds.length\r\n ? sectionIdListData.sectionIds[0].height\r\n : 0;\r\n const actualPageHeight =\r\n (currentPageNumber - 1) * (height * scaleWithZoom + 32);\r\n const container = document.getElementById(containerId);\r\n container.scrollTo({ top: actualPageHeight });\r\n };\r\n\r\n const onPlus = () => {\r\n if (isOCR) {\r\n getPageTopPosition({ isPlusClicked: true });\r\n }\r\n isSideBySidePage\r\n ? isLeftSideView\r\n ? leftIncrementZoom()\r\n : rightIncrementZoom()\r\n : incrementZoom();\r\n };\r\n\r\n const onMinus = () => {\r\n if (isOCR) {\r\n getPageTopPosition({ isPlusClicked: false });\r\n }\r\n isSideBySidePage\r\n ? isLeftSideView\r\n ? leftDecrementZoom()\r\n : rightDecrementZoom()\r\n : decrementZoom();\r\n };\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n copyFormula: { copiedFormula },\r\n selectedStatement,\r\n leftSelectedStatement,\r\n statementContent: { sectionIdList },\r\n leftStatementContent: { leftSectionIdList },\r\n },\r\n ui: {\r\n statementPage: {\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n modes: {\r\n contentViewMode,\r\n ocrCurrentViewPageNumber,\r\n leftOcrCurrentViewPageNumber,\r\n },\r\n },\r\n },\r\n}) => ({\r\n contentViewMode,\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n sectionIdList,\r\n leftSectionIdList,\r\n selectedStatement,\r\n leftSelectedStatement,\r\n ocrCurrentViewPageNumber,\r\n leftOcrCurrentViewPageNumber,\r\n isCopiedFormula:\r\n copiedFormula &&\r\n copiedFormula.data &&\r\n copiedFormula.data.formulas &&\r\n copiedFormula.data.formulas.length > 0,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n setContentFixedMode,\r\n setContentFullMode,\r\n leftIncrementZoom,\r\n leftDecrementZoom,\r\n incrementZoom,\r\n decrementZoom,\r\n rightIncrementZoom,\r\n rightDecrementZoom,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ZoomControlHOC);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M11.5 4C11.7761 4 12 4.22386 12 4.5V15.5C12 15.7761 11.7761 16 11.5 16H0.5C0.223858 16 0 15.7761 0 15.5V4.5C0 4.22386 0.223858 4 0.5 4H11.5ZM11 5H1V15H11V5ZM2.5 2H13.5C13.7455 2 13.9496 2.17688 13.9919 2.41012L14 2.5V13.5C14 13.7761 13.7761 14 13.5 14C13.2545 14 13.0504 13.8231 13.0081 13.5899L13 13.5V3H2.5C2.22386 3 2 2.77614 2 2.5C2 2.25454 2.17688 2.05039 2.41012 2.00806L2.5 2ZM4.5 0H15.5C15.7455 0 15.9496 0.176875 15.9919 0.410124L16 0.5V11.5C16 11.7761 15.7761 12 15.5 12C15.2545 12 15.0504 11.8231 15.0081 11.5899L15 11.5V1H4.5C4.22386 1 4 0.776142 4 0.5C4 0.25454 4.17687 0.0503916 4.41012 0.00805567L4.5 0Z\",\n fill: \"#007CB0\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M8.73504 7.73504L5.08859 11.3815L3.44214 9.73504L3.3729 9.67718C3.17803 9.54219 2.9086 9.56147 2.73504 9.73504C2.53977 9.9303 2.53977 10.2469 2.73504 10.4421L4.73504 12.4421L4.80428 12.5C4.99915 12.635 5.26858 12.6157 5.44214 12.4421L9.44214 8.44214L9.5 8.3729C9.635 8.17803 9.61571 7.9086 9.44214 7.73504C9.24688 7.53977 8.9303 7.53977 8.73504 7.73504Z\",\n fill: \"#007CB0\"\n});\n\nvar SvgBulkAction = function SvgBulkAction(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 16,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgBulkAction, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/bulk-action.c24e0bc0.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as BulkAction } from 'icons/bulk-action.svg';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport Permissions from 'permissions/permissions';\r\n\r\nconst BATCH_SELECT_CONTROL = 'batch-select-control';\r\nconst BATCH_SELECT_ICON_SIZE = '20px';\r\n\r\nexport const BatchSelectControl = ({\r\n setBatchModeSelectedIfPossible,\r\n selectedProjectId,\r\n selectedStatement,\r\n showBatchPanelAction,\r\n disabled,\r\n}) => {\r\n const _setBatchModeWithBannerAndOpenBatchPanel = () => {\r\n setBatchModeSelectedIfPossible(); // setElementSelectModeBatchWithBannerAction action inside modes-action.js\r\n showBatchPanelAction();\r\n };\r\n\r\n const _userCanBatch = Permissions.Element.canEditElement(selectedProjectId);\r\n const readOnly = selectedStatement.isReadOnly();\r\n return (\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\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { id: selectedProjectId },\r\n selectedStatement,\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { contentViewMode },\r\n },\r\n },\r\n}) => ({\r\n contentViewMode,\r\n selectedProjectId,\r\n selectedStatement,\r\n});\r\n\r\nBatchSelectControl.propTypes = {\r\n /** Function fired to set batch selection mode */\r\n setBatchModeSelectedIfPossible: PropTypes.func.isRequired,\r\n /** Currently selected project id of the revision we are viewing */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /** Selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n};\r\n\r\nexport default connect(mapStateToProps)(BatchSelectControl);\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useCallback, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport Revision from 'models/api/revision-api-model';\r\nimport SummaryElementsModel from 'models/api/statement-summary-elements-model';\r\nimport SummaryNotesModel from 'models/api/statement-summary-notes-model';\r\nimport SummarySections from 'models/api/statement-summary-sections-model';\r\nimport {\r\n showStatementNavPanelAction,\r\n showNotesPanelAction,\r\n} from 'store/actions/panel-controller-actions';\r\nimport { fetchStatementSummaryElements } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport { fetchStatementSummaryNotes } from 'store/actions/statement-summary/notes-summary-actions';\r\nimport { fetchStatementSummarySections } from 'store/actions/statement-summary/sections-summary-actions';\r\nimport { setSelectedTabAction } from 'store/actions/statement-navigator/navigator-panel-actions';\r\nimport { STATEMENT_NAV_TABS } from 'constants/feature/statement-navigator-constants';\r\nimport { searchElements } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport { setAnnotationsPosition } from 'store/actions/statement-summary/statement-annotations-update-actions';\r\n\r\nimport StatementSummaryElements from 'components/feature/statement-summary/statement-summary-elements-component';\r\nimport StatementSummaryNotes from 'components/feature/statement-summary/statement-summary-notes-component';\r\nimport StatementSummarySections from 'components/feature/statement-summary/statement-summary-sections-component';\r\nimport SummaryDisplayOptionsDropdown from 'components/feature/statement-summary/statement-summary-display-options-dropdown';\r\nimport { setDisplayOptionAction } from 'store/actions/statement-summary/statement-summary-actions';\r\nimport StatementSummaryDisplayOptions from 'models/data/statement-summary-display-options-model';\r\nimport StatementSummaryFlaggedComponent from 'components/feature/statement-summary/statement-summary-flagged-component';\r\nimport {\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleFormulaCancelModal,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\nimport StatementSummaryElementsTotal from 'components/feature/statement-summary/statement-summary-elements-total-component';\r\nimport StatementSummaryAnnotationsComponent from 'components/feature/statement-summary/statement-summary-annotations-component';\r\nimport { setAnnotationDisplayOption } from 'store/actions/annotation-display-actions';\r\nimport StatementAnnotationsUpdate from './statement-annotations-update';\r\nimport ZoomControlHOC from 'higher-order-components/zoom-control-hoc-component';\r\nimport ExpandAll from 'components/common/expand-all';\r\nimport {\r\n setContentFixedMode,\r\n setContentFullMode,\r\n} from 'store/actions/content-view-modes-actions';\r\nimport BatchSelectControl from 'components/common/batch-select-control-component';\r\nimport { showBatchPanelAction } from 'store/actions/panel-controller-actions';\r\nimport { setElementSelectModeBatchWithBannerAction } from 'store/actions/modes-actions';\r\nimport { setHideOrDisplayElementsOnStatementPage } from 'store/actions/statement-summary/statement-summary-elements-display-actions';\r\nimport { disableAllElementsCallout } from 'store/actions/statement-content-annotation-creation-actions';\r\n\r\nexport const STATEMENT_SUMMARY_BLOCK = 'statement-summary';\r\nconst ZOOM_CONTROL_BLOCK = 'zoom-control';\r\n\r\nconst StatementSummaryComponent = ({\r\n className,\r\n fetchStatementSummaryElements,\r\n fetchStatementSummaryNotes,\r\n fetchStatementSummarySections,\r\n setSelectedNavigatorTab,\r\n showNotesPanel,\r\n summaryElements,\r\n summaryNotes,\r\n summarySections,\r\n revision,\r\n fetchElementSearchResults,\r\n showStatementNavPanelAction,\r\n setDisplayOption,\r\n displayOptions,\r\n selectMode,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleFormulaCancelModal,\r\n annotationDisplayOptions,\r\n setAnnotationDisplayOption,\r\n annotationPosition,\r\n setAnnotationsPosition,\r\n blacklineViewMode,\r\n contentViewMode,\r\n setContentFixedMode,\r\n setContentFullMode,\r\n showBatchPanelAction,\r\n setElementSelectModeBatchWithBannerAction,\r\n setHideOrDisplayElementsOnStatementPage,\r\n displayElementDetailsOnStatementPage,\r\n disableAllElementsCallout,\r\n blacklineViewShowElementMode,\r\n isOCR,\r\n}) => {\r\n const { contentFullMode } = contentViewMode;\r\n useEffect(() => {\r\n fetchStatementSummaryElements({\r\n revisionId: revision.id,\r\n withoutLoading: true,\r\n });\r\n fetchStatementSummaryNotes({ revisionId: revision.id });\r\n fetchStatementSummarySections({ revisionId: revision.id });\r\n }, [\r\n fetchStatementSummaryElements,\r\n fetchStatementSummaryNotes,\r\n fetchStatementSummarySections,\r\n revision.id,\r\n ]);\r\n\r\n const showElementListPanel = useCallback(\r\n (filters) => {\r\n showStatementNavPanelAction();\r\n setSelectedNavigatorTab(STATEMENT_NAV_TABS.elements);\r\n fetchElementSearchResults({ filters, searchTerm: '' });\r\n },\r\n [\r\n fetchElementSearchResults,\r\n setSelectedNavigatorTab,\r\n showStatementNavPanelAction,\r\n ],\r\n );\r\n\r\n return (\r\n
          \r\n \r\n \r\n\r\n \r\n {!isOCR && (\r\n \r\n )}\r\n \r\n \r\n \r\n \r\n setDisplayOption({ key, isOCR })}\r\n displayOptions={displayOptions}\r\n selectMode={selectMode}\r\n toggleInternalReferenceCancelModal={\r\n toggleInternalReferenceCancelModal\r\n }\r\n openCancelModalAfterModalConfirm={openCancelModalAfterModalConfirm}\r\n toggleFormulaCancelModal={toggleFormulaCancelModal}\r\n disabled={blacklineViewMode}\r\n isOCR={isOCR}\r\n />\r\n \r\n \r\n \r\n \r\n
          \r\n );\r\n};\r\n\r\nStatementSummaryComponent.propTypes = {\r\n /** Class name of the statement summary component */\r\n className: PropTypes.string,\r\n /** Action fired when mounted to fetch summary elements data */\r\n fetchStatementSummaryElements: PropTypes.func.isRequired,\r\n /** Action fired when mounted to fetch summary notes data */\r\n fetchStatementSummaryNotes: PropTypes.func.isRequired,\r\n /** Action fired when button is clicked to open selected tab */\r\n setSelectedNavigatorTab: PropTypes.func.isRequired,\r\n /** Action fired when button is clicked to open notes panel */\r\n showNotesPanel: PropTypes.func.isRequired,\r\n /** The count of elements for the selected revision id */\r\n summaryElements: PropTypes.instanceOf(SummaryElementsModel),\r\n /** The count of notes for the selected revision id */\r\n summaryNotes: PropTypes.instanceOf(SummaryNotesModel),\r\n /** The count of sections that have been reviewed for the selected revision id */\r\n summarySections: PropTypes.instanceOf(SummarySections),\r\n /** The revision whose statement summaries are displayed on the global header */\r\n revision: PropTypes.instanceOf(Revision),\r\n /** Action fired to search for elements */\r\n fetchElementSearchResults: PropTypes.func.isRequired,\r\n /** Open statement navigator panel */\r\n showStatementNavPanelAction: PropTypes.func.isRequired,\r\n /** Obj containing display options from store */\r\n displayOptions: PropTypes.instanceOf(StatementSummaryDisplayOptions)\r\n .isRequired,\r\n /** Redux action that sets the display option */\r\n setDisplayOption: PropTypes.func.isRequired,\r\n /** To hide and display statement summary elements */\r\n displayElementDetailsOnStatementPage: PropTypes.bool,\r\n /** To disable all elements level callout which are enabled before enabling statement level callout */\r\n disableAllElementsCallout: PropTypes.func,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedStatement: { isOCR },\r\n statementSummary: {\r\n elements,\r\n notes,\r\n sections,\r\n displayOptions,\r\n annotationPosition,\r\n statementSummaryElementsDisplay: { displayElementDetailsOnStatementPage },\r\n },\r\n revision,\r\n annotationDisplayOptions,\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: {\r\n selectMode,\r\n contentViewMode,\r\n blacklineViewMode,\r\n blacklineViewShowElementMode,\r\n },\r\n },\r\n },\r\n}) => ({\r\n summaryElements: elements,\r\n summaryNotes: notes,\r\n summarySections: sections,\r\n displayOptions,\r\n revision,\r\n selectMode: selectMode.title,\r\n annotationDisplayOptions,\r\n annotationPosition,\r\n blacklineViewMode,\r\n contentViewMode,\r\n displayElementDetailsOnStatementPage,\r\n blacklineViewShowElementMode,\r\n isOCR,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n fetchStatementSummaryElements,\r\n fetchStatementSummaryNotes,\r\n fetchStatementSummarySections,\r\n setSelectedNavigatorTab: setSelectedTabAction,\r\n showNotesPanel: showNotesPanelAction,\r\n showStatementNavPanelAction,\r\n fetchElementSearchResults: searchElements,\r\n setDisplayOption: setDisplayOptionAction,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleFormulaCancelModal,\r\n setAnnotationDisplayOption,\r\n setAnnotationsPosition,\r\n setContentFixedMode,\r\n setContentFullMode,\r\n setElementSelectModeBatchWithBannerAction,\r\n showBatchPanelAction,\r\n setHideOrDisplayElementsOnStatementPage,\r\n disableAllElementsCallout,\r\n};\r\n\r\nexport { StatementSummaryComponent };\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(StatementSummaryComponent);\r\n","export const getInitials = (string) => {\r\n if (typeof string === 'undefined') return;\r\n const initials = string.replace(/[^a-zA-Z- ]/g, '').match(/\\b\\w/g);\r\n return initials[0] + initials[1];\r\n};\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport ActiveUsers from 'models/api/active-users-api-model';\r\nimport { getInitials } from 'utils/text-format-utils';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { connect } from 'react-redux';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport ProjectUsersList from 'models/api/project-users-list-api-model';\r\n\r\nexport const ACTIVE_USERS_LIST_BLOCK = 'active-users';\r\nexport const ACTIVE_USERS_LIST_ID_BLOCK = 'active-users-id';\r\nconst MAX_USERS_AMOUNT = 3;\r\n\r\nexport const ActiveUsersList = ({\r\n activeUsersList,\r\n shouldShowBlackLineToggle,\r\n projectUsersList,\r\n}) => {\r\n const getTooltip = (text, id) => {\r\n return new TooltipOptions({\r\n text: text,\r\n id: `${ACTIVE_USERS_LIST_ID_BLOCK}-${id}`,\r\n position: 'bottom',\r\n });\r\n };\r\n\r\n const getAllUsersNamesTooltip = () => {\r\n let names = '';\r\n\r\n activeUsersList.users.forEach((element, index) => {\r\n if (index === 0) {\r\n names = projectUsersList.data.userIdToUserNameMap[element];\r\n } else {\r\n names = `${names}\\n${projectUsersList.data.userIdToUserNameMap[element]}`;\r\n }\r\n });\r\n return new TooltipOptions({\r\n text: names,\r\n id: `${ACTIVE_USERS_LIST_ID_BLOCK}-all-users`,\r\n position: 'bottom',\r\n });\r\n };\r\n return (\r\n \r\n \r\n {activeUsersList &&\r\n activeUsersList.users &&\r\n activeUsersList.users.map((element, index) => {\r\n if (index < MAX_USERS_AMOUNT) {\r\n return (\r\n \r\n 1\r\n ? `${ACTIVE_USERS_LIST_BLOCK}__user--multiple`\r\n : `${ACTIVE_USERS_LIST_BLOCK}__only`,\r\n )}\r\n >\r\n {getInitials(\r\n projectUsersList.data.userIdToUserNameMap[element],\r\n )}\r\n \r\n \r\n );\r\n }\r\n return null;\r\n })}\r\n {activeUsersList.users.length > MAX_USERS_AMOUNT && (\r\n \r\n \r\n +{activeUsersList.users.length - MAX_USERS_AMOUNT}\r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({ data: { projectUsersList } }) => ({\r\n projectUsersList,\r\n});\r\n\r\nActiveUsersList.propTypes = {\r\n /* object of type ActiveUsers with all the current users connected */\r\n activeUsersList: PropTypes.instanceOf(ActiveUsers).isRequired,\r\n /* bool value that indicates if blackLine is available */\r\n shouldShowBlackLineToggle: PropTypes.bool.isRequired,\r\n /** the instance of all the users in the project */\r\n projectUsersList: PropTypes.instanceOf(ProjectUsersList).isRequired,\r\n};\r\n\r\nexport default connect(mapStateToProps, null)(ActiveUsersList);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M13 25C6.37258 25 1 19.6274 1 13C1 6.37258 6.37258 1 13 1C19.6274 1 25 6.37258 25 13C25 19.6274 19.6274 25 13 25Z\",\n fill: \"#007CB0\",\n stroke: \"#007CB0\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.293 7L14.1464 9.14645C13.9512 9.34171 13.9512 9.65829 14.1464 9.85355C14.32 10.0271 14.5894 10.0464 14.7843 9.91141L14.8536 9.85355L17.8536 6.85355C18.0271 6.67999 18.0464 6.41056 17.9114 6.21569L17.8536 6.14645L14.8536 3.14645C14.6583 2.95118 14.3417 2.95118 14.1464 3.14645C13.9729 3.32001 13.9536 3.58944 14.0886 3.78431L14.1464 3.85355L16.293 6H13C9.21455 6 6.1309 9.00478 6.00406 12.7593L6 13C6 16.866 9.13401 20 13 20C16.866 20 20 16.866 20 13C20 12.7239 19.7761 12.5 19.5 12.5C19.2239 12.5 19 12.7239 19 13C19 16.3137 16.3137 19 13 19C9.68629 19 7 16.3137 7 13C7 9.7616 9.56557 7.12243 12.7751 7.00414L13 7H16.293L14.1464 9.14645L16.293 7Z\",\n fill: \"white\"\n});\n\nvar SvgRefreshHeading = function SvgRefreshHeading(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 26,\n height: 26,\n viewBox: \"0 0 26 26\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRefreshHeading, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/refresh-heading.0cd4243f.svg\";\nexport { ForwardRef as ReactComponent };","import { useEffect, useState } from 'react';\r\n\r\nfunction useScreenSize() {\r\n const [screenSize, setScreenSize] = useState(\r\n window.innerWidth * window.innerHeight,\r\n );\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n return () => {\r\n window.removeEventListener('resize', () => {\r\n setScreenSize(window.innerWidth * window.innerHeight);\r\n });\r\n };\r\n }, []);\r\n\r\n return screenSize;\r\n}\r\n\r\nexport default useScreenSize;\r\n","import React, { memo, useState, useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\n\r\nimport BlacklineViewToggle from 'components/common/blackline-view-toggle-component';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport StatementSummary from 'components/feature/statement-summary/statement-summary-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { ReactComponent as BackButton } from 'icons/back-button.svg';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport Revision from 'models/api/revision-api-model';\r\nimport StatementContentFiltersModel from 'models/data/statement-content-filters-model';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport ActiveUsersList from 'components/feature/active-users/active-users-list-component';\r\nimport ActiveUsers from 'models/api/active-users-api-model';\r\nimport { ReactComponent as RefreshIcon } from 'icons/refresh-heading.svg';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport useScreenSize from 'components/hooks/useScreenSize';\r\n\r\nconst GLOBAL_HEADER_BLOCK = 'global-header';\r\nconst GLOBAL_HEADER_ID_BLOCK = 'global-header-id';\r\n\r\nconst GlobalHeader = ({\r\n revision,\r\n push,\r\n blacklineViewMode,\r\n toggleBlacklineViewMode,\r\n selectedStatement,\r\n activeUsers,\r\n showNavigationRefreshButton,\r\n blacklineSourceGuidList,\r\n blacklineTargetGuidList,\r\n}) => {\r\n const centerSectionRef = useRef();\r\n const [centerSectionWidth, setCenterSectionWidth] = useState(0);\r\n const [showBlacklinebanner, setShowBlacklineBanner] = useState(false);\r\n const screenSize = useScreenSize();\r\n const shouldShowBlackLineToggle =\r\n revision.revisionNumber > 1 && !selectedStatement.statement.isWrappedUp();\r\n const isBlacklineGuidListEmpty =\r\n blacklineTargetGuidList.isGuidListEmpty ||\r\n blacklineSourceGuidList.isGuidListEmpty;\r\n\r\n useEffect(() => {\r\n if (blacklineViewMode && isBlacklineGuidListEmpty) {\r\n setShowBlacklineBanner(true);\r\n }\r\n if (!blacklineViewMode) {\r\n setShowBlacklineBanner(false);\r\n }\r\n }, [blacklineViewMode, isBlacklineGuidListEmpty]);\r\n\r\n useEffect(() => {\r\n if (centerSectionRef && centerSectionRef.current) {\r\n setCenterSectionWidth(centerSectionRef.current.offsetWidth);\r\n }\r\n }, [blacklineViewMode, isBlacklineGuidListEmpty, screenSize]);\r\n\r\n return (\r\n
          \r\n \r\n push(ROUTE_CONSTANTS.HOME_PAGE)}\r\n />\r\n {revision.isInitialized() ? (\r\n \r\n
          \r\n {revision.statementName}\r\n
          \r\n \r\n ) : null}\r\n {revision.isInitialized() ? (\r\n {`V${revision.revisionNumber}`}
          \r\n ) : null}\r\n {showNavigationRefreshButton && (\r\n window.location.reload()}\r\n tooltip={\r\n new TooltipOptions({\r\n text: 'global-header-statement-navigation-refresh.button',\r\n id: `${GLOBAL_HEADER_ID_BLOCK}-statement-tooltip-refresh-nav`,\r\n position: 'bottom',\r\n })\r\n }\r\n />\r\n )}\r\n \r\n \r\n {showBlacklinebanner && (\r\n setShowBlacklineBanner(false)}\r\n />\r\n )}\r\n \r\n \r\n \r\n \r\n {revision.revisionNumber > 1 &&\r\n !selectedStatement.statement.isWrappedUp() && (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nGlobalHeader.propTypes = {\r\n /** The revision whose statement name and revision version number are displayed on the global header */\r\n revision: PropTypes.instanceOf(Revision),\r\n /** The current filters being set on the statement content page. This can include things like the currently selected tab. */\r\n statementContentFilters: PropTypes.instanceOf(StatementContentFiltersModel),\r\n /** Action fired when a user changes the currently selected tab in the header*/\r\n setCurrentStatementContentTab: PropTypes.func.isRequired,\r\n /** Selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n /* array of active users on the current statement */\r\n activeUsers: PropTypes.instanceOf(ActiveUsers).isRequired,\r\n /** Setting this to to false will hide the Refresh Navigation Button */\r\n showNavigationRefreshButton: PropTypes.bool,\r\n};\r\n\r\nexport default memo(GlobalHeader);\r\n","import { connect } from 'react-redux';\r\n\r\nimport GlobalHeader from 'components/common/global-header-component';\r\n\r\nimport { toggleBlacklineViewModeAndRefetchSectionsInView } from 'store/actions/blackline-view-actions';\r\nimport { setCurrentStatementContentTab } from 'store/actions/statement-content-actions';\r\nimport { push } from 'connected-react-router';\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n currentUser,\r\n revision,\r\n selectedProject: { project },\r\n statementContent: { statementContentFilters },\r\n selectedStatement,\r\n activeUsers,\r\n blacklineSourceGuidList,\r\n blacklineTargetGuidList,\r\n },\r\n ui: {\r\n statementPage: {\r\n zoom,\r\n modes: { blacklineViewMode, contentViewMode },\r\n statementNavigatorPanel: { showNavigationRefreshButton },\r\n },\r\n },\r\n },\r\n { urlParams },\r\n) => ({\r\n currentUser,\r\n revision,\r\n project,\r\n urlParams,\r\n zoom,\r\n statementContentFilters,\r\n blacklineViewMode,\r\n contentViewMode,\r\n selectedStatement,\r\n activeUsers,\r\n showNavigationRefreshButton,\r\n blacklineSourceGuidList,\r\n blacklineTargetGuidList,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n setCurrentStatementContentTab,\r\n push,\r\n toggleBlacklineViewMode: toggleBlacklineViewModeAndRefetchSectionsInView,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(GlobalHeader);\r\n","import React, { Component, createRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Loading from 'components/common/loading-component';\r\nimport SectionContentModel from 'models/api/section-content-api-model';\r\nimport { CENTER_PANEL_ID } from 'pages/statement-content-page';\r\nimport { toast } from 'react-toastify';\r\nimport { injectIntl } from 'react-intl';\r\nimport Permissions from 'permissions/permissions';\r\nimport {\r\n initTableControls,\r\n getselectedTextLabel,\r\n} from 'utils/section-rendering-utils';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { SIDE_BY_SIDE_VIEW_LEFT_BLOCK, REPORT_PREVIEW_PAGE_HTML_CONTAINER_ID } from 'constants/feature/statement-content-constants';\r\n\r\nexport const SEGMENT_BLOCK = 'statement-content-segment';\r\nconst SEGMENT_LOADING_HEIGHT = 1000; // px\r\nconst CONTEXT_MENU_MARGIN = 10;\r\nconst MAXIMUM_SELECTION_CHARACTERS = 5000;\r\n\r\nclass SectionContent extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n shouldShow: false,\r\n height: SEGMENT_LOADING_HEIGHT,\r\n };\r\n this.segmentRef = createRef();\r\n this.sectionSegmentRef = createRef(false);\r\n this.sectionSegmentRef.current = false;\r\n this.intersectionObserver = null;\r\n }\r\n _userCanChangeContent =\r\n Permissions.Statement.canChangeContent() ||\r\n Permissions.Note.canManageCoeNotesType(this.props.selectedProjectId);\r\n\r\n componentDidMount() {\r\n const {\r\n section,\r\n shouldRenderImmediately,\r\n sectionId,\r\n addToCurrentSectionIds,\r\n removeFromCurrentSectionIds,\r\n } = this.props;\r\n this._initializeViewportDetection();\r\n\r\n if (!this.intersectionObserverTOC) {\r\n this.intersectionObserverTOC = new IntersectionObserver(\r\n (entries) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting) {\r\n addToCurrentSectionIds(sectionId);\r\n } else {\r\n removeFromCurrentSectionIds(sectionId);\r\n }\r\n });\r\n },\r\n {\r\n threshold: 0.05,\r\n },\r\n );\r\n\r\n this.intersectionObserverTOC.observe(this.segmentRef.current);\r\n }\r\n\r\n if (section.isLoaded) {\r\n initTableControls();\r\n }\r\n if (shouldRenderImmediately && !section.isLoaded) {\r\n this._fetchSectionContent();\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this.intersectionObserver.unobserve(this.segmentRef.current);\r\n\r\n if (this.intersectionObserverTOC) {\r\n this.intersectionObserverTOC.unobserve(this.segmentRef.current);\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { section, isContentPanelScrolling } = this.props;\r\n const { shouldShow } = this.state;\r\n\r\n const _scrollingHasStopped =\r\n prevProps.isContentPanelScrolling && !isContentPanelScrolling;\r\n const _shouldFetchSection =\r\n !this.sectionSegmentRef.current &&\r\n shouldShow &&\r\n !section.isLoaded &&\r\n _scrollingHasStopped;\r\n\r\n if (_shouldFetchSection) {\r\n this._fetchSectionContent();\r\n this.sectionSegmentRef.current = true;\r\n }\r\n\r\n initTableControls();\r\n\r\n this._setSectionHeight();\r\n }\r\n\r\n _enforceSelectionLengthLimit = (selection, intl) => {\r\n if (\r\n selection.getRangeAt(0).toString().length <= MAXIMUM_SELECTION_CHARACTERS\r\n ) {\r\n return true;\r\n } else {\r\n toast.warn(\r\n intl.formatMessage({\r\n id: 'section-content.too-many-characters.warning',\r\n }),\r\n );\r\n\r\n selection.removeAllRanges();\r\n return false;\r\n }\r\n };\r\n\r\n _validateSelection = (selection) =>\r\n selection.type === 'Range' &&\r\n selection.toString().trim() !== '' &&\r\n this.segmentRef.current.contains(selection.focusNode);\r\n\r\n handleMouseUp = (e) => {\r\n // somewhat hackey solution for this bug https://symphonyvsts.visualstudio.com/TieOut2/_workitems/edit/813709\r\n // wrapping the block in setTimeout 0 forces execution to wait for the current eventloop cycle to go through\r\n // otherwise the browser and therefore `_validateSelection` would incorrectly report selection exists although the selection is cleared out immediately\r\n e.persist();\r\n setTimeout(() => {\r\n const selection = window.getSelection();\r\n const selectionLabel = getselectedTextLabel(selection);\r\n const { sectionId, onStatementContextMenu, intl, blacklineViewMode } =\r\n this.props;\r\n\r\n if (\r\n this._validateSelection(selection) &&\r\n this._enforceSelectionLengthLimit(selection, intl) &&\r\n !blacklineViewMode &&\r\n this._userCanChangeContent\r\n ) {\r\n onStatementContextMenu({\r\n position: {\r\n x: e.clientX + CONTEXT_MENU_MARGIN,\r\n y: e.clientY + CONTEXT_MENU_MARGIN,\r\n },\r\n sectionId,\r\n selection: selection,\r\n selectionLabel,\r\n });\r\n e.stopPropagation();\r\n }\r\n }, 0);\r\n };\r\n\r\n _initializeViewportDetection = () => {\r\n const { setSectionInView, clearSectionInView, leftSideBySideView } =\r\n this.props;\r\n const url = window.location.pathname;\r\n const isSideBySideView = url.includes(\r\n ROUTE_CONSTANTS.SIDE_BY_SIDE,\r\n );\r\n const isReportPreviewPage = url.includes(\r\n ROUTE_CONSTANTS.REPORT_PREVIEW,\r\n );\r\n\r\n let contentPanelId;\r\n if(isSideBySideView && leftSideBySideView) {\r\n contentPanelId = SIDE_BY_SIDE_VIEW_LEFT_BLOCK;\r\n } else if(isReportPreviewPage) {\r\n contentPanelId = REPORT_PREVIEW_PAGE_HTML_CONTAINER_ID;\r\n } else {\r\n contentPanelId = CENTER_PANEL_ID;\r\n }\r\n const config = {\r\n root: document.getElementById(contentPanelId), //the element that we check for intersection with\r\n /**\r\n * similar to a CSS margin, extends the vertical intersection\r\n * zone of the viewport with sections by 1000px vertically to pre-load sections\r\n * just before the get into view from either scrolling up or down, for a more\r\n * smooth viewing experience.\r\n **/\r\n rootMargin: `${SEGMENT_LOADING_HEIGHT}px 0px`,\r\n };\r\n\r\n this.intersectionObserver = new IntersectionObserver((entries) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting) {\r\n if (!this.state.shouldShow) {\r\n setSectionInView({ sectionId: this.props.sectionId });\r\n this.setState({\r\n shouldShow: true,\r\n });\r\n }\r\n } else {\r\n if (this.state.shouldShow) {\r\n this.setState({\r\n shouldShow: false,\r\n });\r\n clearSectionInView({ sectionId: this.props.sectionId });\r\n this.sectionSegmentRef.current = false;\r\n }\r\n }\r\n });\r\n }, config);\r\n\r\n this.intersectionObserver.observe(this.segmentRef.current);\r\n };\r\n\r\n _fetchSectionContent = () => {\r\n const { fetchAllSectionRenderingData, sectionId } = this.props;\r\n const isReportPreviewPage = isElementReportPreviewPage(\r\n window.location.pathname,\r\n );\r\n fetchAllSectionRenderingData({ sectionId, isReportPreviewPage });\r\n };\r\n\r\n _setSectionHeight = () => {\r\n const { height, shouldShow } = this.state;\r\n const { section } = this.props;\r\n const currSegRef = this.segmentRef.current;\r\n const newHeight = currSegRef.scrollHeight;\r\n if (shouldShow && section.isLoaded && height !== newHeight) {\r\n this.setState({\r\n height: newHeight,\r\n });\r\n }\r\n };\r\n\r\n _getUnrenderedSection = (children) => {\r\n const { height } = this.state;\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n };\r\n\r\n _renderSegment = () => {\r\n const { shouldShow } = this.state;\r\n const { section } = this.props;\r\n if (shouldShow && section.isLoaded) {\r\n return section.processedReactSegment;\r\n } else if (shouldShow) {\r\n return this._getUnrenderedSection();\r\n }\r\n\r\n return this._getUnrenderedSection();\r\n };\r\n\r\n render() {\r\n const { height } = this.state;\r\n const { sectionId, reactSectionPrefix } = this.props;\r\n return (\r\n \r\n \r\n {this._renderSegment()}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nSectionContent.propTypes = {\r\n /** Section the segment is responsible for fetching and rendering */\r\n section: PropTypes.instanceOf(SectionContentModel),\r\n /** Bool representing if the user is scrolling*/\r\n isContentPanelScrolling: PropTypes.bool.isRequired,\r\n /** Number representing the section id, loaded from the sectionIdList which is the array of sectionIds in the order they should be displayed\r\n * the sectionId list is fetched before anything on the page so if we need sectionId for something, better to rely on this prop */\r\n sectionId: PropTypes.number.isRequired,\r\n /** Action that fetches the currently in view section content and element annotation data */\r\n fetchAllSectionRenderingData: PropTypes.func.isRequired,\r\n /** Action that sets the current section in view to redux*/\r\n setSectionInView: PropTypes.func.isRequired,\r\n /** Flag for whether content should be renderd immediately or wait till in view */\r\n shouldRenderImmediately: PropTypes.bool.isRequired,\r\n /** Actions fired when a section is no longer in view */\r\n clearSectionInView: PropTypes.func.isRequired,\r\n /** Get blacklineViewMode from Redux */\r\n blacklineViewMode: PropTypes.bool,\r\n /**Project Id */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /**string to prefix section id with a constant to identify type (section or element etc.) of node. */\r\n reactSectionPrefix: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default injectIntl(SectionContent);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n fetchAllSectionRenderingData,\r\n fetchAllLeftSectionRenderingData,\r\n setSectionInView,\r\n clearSectionInView,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n addToCurrentSectionIds,\r\n removeFromCurrentSectionIds,\r\n addToLeftCurrentSectionIds,\r\n removeFromLeftCurrentSectionIds,\r\n} from 'store/actions/current-section-actions';\r\nimport SectionContent from 'components/feature/statement-content-panel/section-content-component';\r\nimport {\r\n setLeftSectionInView,\r\n clearLeftSectionInView,\r\n} from 'store/actions/left-statement-section-content-actions';\r\nimport {\r\n REACT_LEFT_STATEMENT_SECTION_ID_PREFIX,\r\n REACT_SECTION_ID_PREFIX,\r\n} from 'constants/feature/statement-content-constants';\r\n\r\nexport const SectionContentHOC = (props) => {\r\n const {\r\n fetchAllLeftSectionRenderingData,\r\n fetchAllSectionRenderingData,\r\n leftSideBySideView,\r\n setSectionInView,\r\n setLeftSectionInView,\r\n clearSectionInView,\r\n clearLeftSectionInView,\r\n addToLeftCurrentSectionIds,\r\n addToCurrentSectionIds,\r\n removeFromLeftCurrentSectionIds,\r\n removeFromCurrentSectionIds,\r\n } = props;\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { id },\r\n },\r\n ui: {\r\n sourceStatementParams,\r\n statementPage: {\r\n modes: { blacklineViewMode },\r\n },\r\n },\r\n}) => ({\r\n sourceStatementParams,\r\n blacklineViewMode,\r\n selectedProjectId: id,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n fetchAllSectionRenderingData,\r\n fetchAllLeftSectionRenderingData,\r\n setSectionInView,\r\n clearSectionInView,\r\n setLeftSectionInView,\r\n clearLeftSectionInView,\r\n addToCurrentSectionIds,\r\n removeFromCurrentSectionIds,\r\n addToLeftCurrentSectionIds,\r\n removeFromLeftCurrentSectionIds,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(SectionContentHOC);\r\n","import { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\n\r\n/**\r\n * Determines, based on the ELEMENT_SELECT_MODE provided, if we are in a select mode that supports\r\n * drag select\r\n * @param {object} mode one of ELEMENT_SELECT_MODES constant values\r\n */\r\nexport const isRangeSelectMode = (mode) => {\r\n const {\r\n BATCH,\r\n RANGE,\r\n FORMULA,\r\n COPY_FORMULA,\r\n BATCH_WITH_BANNER,\r\n SIDE_BY_SIDE,\r\n } = ELEMENT_SELECT_MODES;\r\n return (\r\n !isNullOrUndefined(mode) &&\r\n (mode.id === BATCH.id ||\r\n mode.id === BATCH_WITH_BANNER.id ||\r\n mode.id === RANGE.id ||\r\n mode.id === FORMULA.id ||\r\n mode.id === COPY_FORMULA.id ||\r\n mode.id === SIDE_BY_SIDE.id)\r\n );\r\n};\r\n\r\nexport const shouldElementBatchSelection = (mode) => {\r\n const { COPY_FORMULA } = ELEMENT_SELECT_MODES;\r\n return !isNullOrUndefined(mode) && mode.id === COPY_FORMULA.id;\r\n};\r\n\r\n/**\r\n * Determines, based on the ELEMENT_SELECT_MODE provided, if we are in a select mode that only\r\n * allows for single element selection/clicking (i.e. drag select is not supported)\r\n * @param {object} mode one of ELEMENT_SELECT_MODES constant values\r\n */\r\nexport const isSingleSelectOnlyMode = (mode) => {\r\n const { DEFAULT, INTERNAL_REFERENCE } = ELEMENT_SELECT_MODES;\r\n return (\r\n !isNullOrUndefined(mode) &&\r\n (mode.id === DEFAULT.id || mode.id === INTERNAL_REFERENCE.id)\r\n );\r\n};\r\n\r\n/** Determines if the current mode should have the alternative cursor\r\n * @param {object} mode one of ELEMENT_SELECT_MODES constant values\r\n */\r\nexport const isModeForAddCursor = (mode) => {\r\n const {\r\n BATCH,\r\n BATCH_WITH_BANNER,\r\n FORMULA,\r\n INTERNAL_REFERENCE,\r\n COPY_FORMULA,\r\n } = ELEMENT_SELECT_MODES;\r\n return (\r\n !isNullOrUndefined(mode) &&\r\n (mode.id === BATCH.id ||\r\n mode.id === BATCH_WITH_BANNER.id ||\r\n mode.id === FORMULA.id ||\r\n mode.id === INTERNAL_REFERENCE.id ||\r\n mode.id === COPY_FORMULA.id)\r\n );\r\n};\r\n\r\n/**\r\n * Useful in `componentDidUpdate` lifecycle for making decisions in components\r\n * when the select mode changes\r\n * @param {object} param.prevMode old element-select-mode\r\n * @param {object} param.newMode new element-select-mode\r\n */\r\nexport const isNowDragSelectMode = ({ prevMode, newMode }) => {\r\n return !isRangeSelectMode(prevMode) && isRangeSelectMode(newMode);\r\n};\r\n\r\n/**\r\n * Useful in `componentDidUpdate` lifecycle for making decisions in components\r\n * when the select mode changes\r\n * @param {object} param.prevMode old element-select-mode\r\n * @param {object} param.newMode new element-select-mode\r\n */\r\nexport const isNowNonDragSelectMode = ({ prevMode, newMode }) => {\r\n return isRangeSelectMode(prevMode) && !isRangeSelectMode(newMode);\r\n};\r\n","// imported/inspired by the 5.x code\r\nimport { SEGMENT_BLOCK } from 'components/feature/statement-content-panel/section-content-component';\r\nimport { ANNOTATION_BASE_BLOCK } from 'constants/feature/tieout-element-constants';\r\nimport {\r\n CONTENT_SEARCH_HIGHLIGHT_CLASS,\r\n REACT_SECTION_ID_PREFIX,\r\n STATEMENT_PSEUDO_ELEMENT_ID_PREFIX,\r\n} from 'constants/feature/statement-content-constants';\r\nimport { NOTE_ANCHOR_BLOCK } from 'components/feature/statement-content-panel/note-anchor-component.jsx';\r\n\r\nlet elementSelectorBlacklist =\r\n \"a[id^='CFTO_SECTION_'], a[name^='CFTO_ELEMENT_'], span[id='CFTO_WP_ICON'], span[id='CFTO_TICKMARK_ICON'], span[id='CFTO_FORMULA_RECALC_ICON'], span[id='CFTO_FORMULA_ICON'], span[class='icon-stm-internal-reference'], span[class='icon-stm-wp-reference'], span[class='icon-tickmark'], span[class='icon-stm-view-formula_recalc'], span[class='icon-stm-view-formula'], [class='note-indicator-statement'], [class='tieout-element'], [class='section-anchor'], [class='tieout-element tieout-element--selected tieout-element--selected--opened tieout-element--selected--opened'], [class='tieout-element tieout-element--selected tieout-element--selected--default tieout-element--selected--default']\";\r\n\r\nlet ignoreAnnotation = {\r\n // items which needs to be ignored while adding an element, note, or section\r\n id: ['CFTO_TICKMARK_ICON', 'CFTO_FORMULA_RECALC_ICON', 'CFTO_FORMULA_ICON'],\r\n class: [\r\n `.${ANNOTATION_BASE_BLOCK}`,\r\n '.icon-stm-internal-reference',\r\n '.icon-stm-wp-reference',\r\n '.icon-tickmark',\r\n '.icon-stm-view-formula_recalc',\r\n '.icon-stm-view-formula',\r\n '.note-indicator-statement',\r\n ],\r\n};\r\n\r\nconst ignoreTagsInSelector = ['EM', 'STRONG', 'B'];\r\n\r\nlet sectionIdSelector = `div[id^='${REACT_SECTION_ID_PREFIX}']`;\r\n\r\nconst isTextNote = (node) => node.nodeType === Node.TEXT_NODE;\r\n\r\nconst hasAncestorWithClassName = (node, className, maxDepth = 7) => {\r\n if (!node || !className) {\r\n return false;\r\n }\r\n let currentNode = node;\r\n let currentDepth = 0;\r\n while (currentNode && currentDepth < maxDepth) {\r\n if (String(currentNode.className).includes(className)) {\r\n return true;\r\n }\r\n currentNode = currentNode.parentNode;\r\n currentDepth++;\r\n }\r\n return false;\r\n};\r\n\r\nconst matchesOrContainsNote = (range) => {\r\n const noteSelector = `*[class^='${NOTE_ANCHOR_BLOCK}']`;\r\n const contents = range.cloneContents();\r\n const { startContainer, endContainer } = range;\r\n // Check for note in content\r\n if (\r\n contents.querySelectorAll(noteSelector).length > 0 ||\r\n (contents.matches && contents.matches(noteSelector).length > 0) ||\r\n (contents.className && contents.className.includes(NOTE_ANCHOR_BLOCK))\r\n ) {\r\n return true;\r\n }\r\n // Check for note in ancestors\r\n if (\r\n (isTextNote(startContainer) &&\r\n hasAncestorWithClassName(\r\n startContainer,\r\n STATEMENT_PSEUDO_ELEMENT_ID_PREFIX,\r\n )) ||\r\n (isTextNote(endContainer) &&\r\n hasAncestorWithClassName(\r\n endContainer,\r\n STATEMENT_PSEUDO_ELEMENT_ID_PREFIX,\r\n ))\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nconst matchesOrContainsSection = (range) => {\r\n const noteSelector = `*[class^='${NOTE_ANCHOR_BLOCK}']`;\r\n const contents = range.cloneContents();\r\n const { startContainer, endContainer } = range;\r\n // Check for section anchor in content\r\n if (\r\n contents.querySelectorAll(noteSelector).length > 0 ||\r\n (contents.matches && contents.matches(noteSelector).length > 0) ||\r\n (contents.className && contents.className.includes(NOTE_ANCHOR_BLOCK))\r\n ) {\r\n return true;\r\n }\r\n // Check for section anchor in ancestors\r\n if (\r\n (isTextNote(startContainer) &&\r\n hasAncestorWithClassName(startContainer, 'section-anchor')) ||\r\n (isTextNote(endContainer) &&\r\n hasAncestorWithClassName(endContainer, 'section-anchor'))\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n};\r\n\r\nconst matchSectionCount = (selection) =>\r\n selection.getRangeAt(0).cloneContents().querySelectorAll(sectionIdSelector)\r\n .length;\r\n\r\nconst matchTableCellCount = (selection) =>\r\n selection.getRangeAt(0).cloneContents().querySelectorAll('td').length;\r\n\r\nconst matchParagraphTagCount = (selection) => {\r\n return selection.getRangeAt(0).cloneContents().querySelectorAll('p').length;\r\n};\r\n\r\nconst isInsideTableCells = (selection) => {\r\n let parent = selection.getRangeAt(0).commonAncestorContainer;\r\n\r\n while (parent.nodeType === Node.TEXT_NODE) {\r\n parent = parent.parentNode;\r\n }\r\n return parent.closest('td');\r\n};\r\n\r\nconst NOTE_INDICATOR_ = 'NOTE_INDICATOR_';\r\n\r\nconst matchSectionOrElement = (selection) =>\r\n selection\r\n .getRangeAt(0)\r\n .cloneContents()\r\n .querySelectorAll(elementSelectorBlacklist).length > 0 ||\r\n !!selection.focusNode.parentNode.id.match(/CFTO_ELEMENT_|CFTO_SECTION_/) ||\r\n !!selection.focusNode.parentNode.parentNode.id.match(\r\n /CFTO_ELEMENT_|CFTO_SECTION_/,\r\n );\r\n\r\nexport const getStartCharacterOffsetWithin = (range, element) => {\r\n let offset = 0;\r\n\r\n let preRange = range.cloneRange(),\r\n preRangeText,\r\n preRangeEndContainer = range.startContainer,\r\n preRangeEndOffset = range.startOffset;\r\n\r\n let startContainer =\r\n range.startContainer.nodeType === Node.TEXT_NODE\r\n ? range.startContainer.parentNode\r\n : range.startContainer;\r\n\r\n if (-1 !== ignoreAnnotation.id.indexOf(startContainer.id)) {\r\n // resetting startOffset to zero when selected text is starting with annotation which needs to ignored\r\n preRangeEndOffset = 0;\r\n }\r\n\r\n preRange.selectNodeContents(element);\r\n preRange.setEnd(preRangeEndContainer, preRangeEndOffset);\r\n preRange = removeContentWithIgnorableSelectors({\r\n range: preRange,\r\n ignorable: ignoreAnnotation.class,\r\n });\r\n\r\n preRangeText = preRange.toString();\r\n offset = preRangeText.length;\r\n\r\n return offset;\r\n};\r\n\r\nexport const getEndCharacterOffsetWithin = (range, element) => {\r\n let preRange = range.cloneRange();\r\n preRange.selectNodeContents(element);\r\n preRange.setEnd(range.endContainer, range.endOffset);\r\n preRange = removeContentWithIgnorableSelectors({\r\n range: preRange,\r\n ignorable: ignoreAnnotation.class,\r\n });\r\n return preRange.toString().length;\r\n};\r\n\r\nexport const getContentLength = (range, originalLength) => {\r\n if (\r\n range.commonAncestorContainer &&\r\n range.commonAncestorContainer.parentElement\r\n ) {\r\n const parentElement = range.commonAncestorContainer.parentElement.nodeName;\r\n\r\n // This is a special case - if the parent node contains 'EM', 'STRONG',\r\n // or 'B' then we need to add 1 to the length so it won't cut the last\r\n // selected character\r\n if (ignoreTagsInSelector.includes(parentElement)) {\r\n return originalLength + 1;\r\n }\r\n }\r\n return originalLength;\r\n};\r\n\r\n/**\r\n * Filters ignorable content, like element annotations, out of the current range selection\r\n * useful so we do not include Tieout text content inserted into the document, like element annotations and icons\r\n * @param {Range} param.range current range that may include content that should be ignored\r\n */\r\nconst getRangeMinusIgnorableContent = ({ range }) => {\r\n let rangeClone = range.cloneRange();\r\n rangeClone = removeContentWithIgnorableSelectors({\r\n range: rangeClone,\r\n ignorable: ignoreAnnotation.class,\r\n });\r\n\r\n return rangeClone;\r\n};\r\n\r\nconst removeContentWithIgnorableSelectors = function ({ range, ignorable }) {\r\n let clonedRange = range.cloneRange(),\r\n contentFragment = range.cloneContents(),\r\n ignoreElement = contentFragment.querySelectorAll(ignorable.join(','));\r\n\r\n if (0 < ignoreElement.length) {\r\n // if selection contains ignorable content('i.e., text based annotation')\r\n\r\n ignoreElement.forEach((x) => x.parentNode.removeChild(x));\r\n clonedRange.selectNodeContents(contentFragment); // setting new range content after ignorable element has removed\r\n\r\n return clonedRange;\r\n }\r\n\r\n return range;\r\n};\r\n\r\nconst getElementCSSXPath = function (element, ignoreTag = true) {\r\n let array = [];\r\n let el = element;\r\n\r\n try {\r\n while (el && el.className !== SEGMENT_BLOCK) {\r\n let siblings = 0,\r\n sib = el.previousSibling;\r\n if (sib !== null) {\r\n while (sib !== null) {\r\n if (\r\n sib.tagName === el.tagName &&\r\n sib.id.indexOf(NOTE_INDICATOR_) === -1\r\n ) {\r\n siblings++;\r\n }\r\n sib = sib.previousSibling;\r\n }\r\n }\r\n\r\n array.push(el.tagName + (siblings ? ':eq(' + siblings + ')' : ':eq(0)'));\r\n el = el.parentNode;\r\n }\r\n array.reverse();\r\n // Remove trailing tag names in \"ignoreTagsInSelector\"\r\n if (ignoreTag)\r\n for (let i = array.length - 1; i > 0 && i === array.length - 1; i--) {\r\n const selector = array[i];\r\n const [tagName] = selector.split(':');\r\n if (ignoreTagsInSelector.includes(tagName)) {\r\n array.pop();\r\n }\r\n }\r\n return array.join('>');\r\n } catch (error) {\r\n return '';\r\n }\r\n};\r\n\r\n/**\r\n * Function for determining a safe parent for XPATH creation when adding content like notes/sections/elements to a section\r\n * The parent cannot be a text node nor can it be a tag that was INSERTED by the FE like the mark.`${CONTENT_SEARCH_HIGHLIGHT_CLASS}` that\r\n * are injected when doing content searching\r\n * @param {Range} param.range current window.getSelection().rangeAt(0)\r\n */\r\nconst getSafeParentForRange = ({ range }) => {\r\n return getSafeParentForNode(range.startContainer);\r\n};\r\n\r\nconst isTextContentEmpty = (node) =>\r\n String(node.textContent).trim().length === 0;\r\n\r\nconst getSafeParentForNode = (node) => {\r\n let parent = node;\r\n while (\r\n parent.nodeType === Node.TEXT_NODE ||\r\n String(parent.className).includes(CONTENT_SEARCH_HIGHLIGHT_CLASS) ||\r\n isTextContentEmpty(parent)\r\n ) {\r\n if (isTextContentEmpty(parent) && parent.nextSibling) {\r\n parent = parent.nextSibling;\r\n while (parent.firstChild) {\r\n parent = parent.firstChild;\r\n }\r\n } else {\r\n parent = parent.parentNode;\r\n }\r\n }\r\n return parent;\r\n};\r\n\r\nexport {\r\n matchSectionOrElement,\r\n getElementCSSXPath,\r\n getRangeMinusIgnorableContent,\r\n matchSectionCount,\r\n matchesOrContainsNote,\r\n matchesOrContainsSection,\r\n matchTableCellCount,\r\n getSafeParentForRange,\r\n getSafeParentForNode,\r\n isInsideTableCells,\r\n matchParagraphTagCount,\r\n};\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"g\", {\n id: \"Checkmark\"\n}, React.createElement(\"path\", {\n id: \"Path\",\n d: \"M2 56C2 26.0712 26.0712 2 56 2C85.9288 2 110 26.0712 110 56C110 85.9288 85.9288 110 56 110C26.0712 110 2 85.9288 2 56Z\",\n stroke: \"#43B02A\",\n strokeWidth: 5\n}), React.createElement(\"path\", {\n id: \"checkmark\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M87.8887 33.6271C86.9843 32.7221 85.5235 32.7221 84.6191 33.6271L39.9513 78.2915L25.3843 63.7238C24.48 62.8188 23.0122 62.8188 22.1078 63.7238C21.2035 64.6275 21.2035 66.0925 22.1078 66.9976L38.3165 83.2028C38.7687 83.6543 39.36 83.8804 39.9513 83.8804C40.5426 83.8804 41.1409 83.6543 41.593 83.2028L87.8887 36.9002C88.793 35.9958 88.793 34.5315 87.8887 33.6271Z\",\n stroke: \"#43B02A\",\n strokeWidth: 5\n}));\n\nvar SvgCheckmark = function SvgCheckmark(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 112,\n height: 112,\n viewBox: \"0 0 112 112\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCheckmark, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/checkmark.ff2b51ce.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useEffect, useRef } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { addElementRequest } from 'api/element-api';\r\nimport {\r\n fetchAllSectionRenderingData,\r\n sectionHTMLSegmentsStatementContentLoading,\r\n sectionHTMLSegmentsStatementContentLoadedWithoutResponse,\r\n} from 'store/actions/statement-content-actions';\r\nimport {\r\n initElementPanel,\r\n selectElementCreated,\r\n} from 'store/actions/element-panel-actions';\r\nimport { initCreateNoteFromSelection } from 'store/actions/notes-panel-actions';\r\nimport { fetchStatementSummaryElements } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n matchSectionOrElement,\r\n getStartCharacterOffsetWithin,\r\n getEndCharacterOffsetWithin,\r\n getElementCSSXPath,\r\n getRangeMinusIgnorableContent,\r\n matchSectionCount,\r\n matchesOrContainsNote,\r\n matchesOrContainsSection,\r\n matchTableCellCount,\r\n getSafeParentForRange,\r\n getSafeParentForNode,\r\n isInsideTableCells,\r\n matchParagraphTagCount,\r\n} from 'utils/content-selection-utils';\r\nimport { toast } from 'react-toastify';\r\nimport Notification from 'components/common/notification-component';\r\nimport { injectIntl } from 'react-intl';\r\nimport { setSelectedTabAction } from 'store/actions/statement-navigator/navigator-panel-actions';\r\nimport { setTOCExpandAll } from 'store/actions/TOC-actions';\r\nimport { STATEMENT_NAV_TABS } from 'constants/feature/statement-navigator-constants';\r\nimport Permissions from 'permissions/permissions';\r\nimport { getContentLength } from 'utils/content-selection-utils';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button-red.svg';\r\nimport { ReactComponent as Checkmark } from 'icons/checkmark.svg';\r\n\r\nconst ContextMenu = ({\r\n visible,\r\n position,\r\n hideContextMenu,\r\n centerPanelRef,\r\n revision,\r\n sectionId,\r\n fetchAllSectionRenderingData,\r\n fetchStatementSummaryElements,\r\n selection,\r\n selectionLabel,\r\n initCreateNoteFromSelection,\r\n initElementPanel,\r\n intl,\r\n toggleAddNavigationModal,\r\n setSelectedNavigatorTab,\r\n setTOCExpandAll,\r\n selectedProject,\r\n zoomRatio,\r\n selectElementCreated,\r\n socketHasBeenDisconnected,\r\n sectionHTMLSegmentsStatementContentLoading,\r\n sectionHTMLSegmentsStatementContentLoadedWithoutResponse,\r\n}) => {\r\n const menuRef = useRef(null);\r\n const centerPanel = centerPanelRef.current;\r\n\r\n const range = selection.getRangeAt(0);\r\n\r\n const containsElement = matchSectionOrElement(selection);\r\n const containsSection = matchSectionCount(selection) > 0;\r\n const containsTableCell = isInsideTableCells(selection);\r\n const multipleSectionsSelected = matchSectionCount(selection) > 1;\r\n const selectedCellsCount = matchTableCellCount(selection);\r\n const containsNotes = matchesOrContainsNote(range);\r\n const containsSectionAnchor = matchesOrContainsSection(range);\r\n const selectedParagraphCount = matchParagraphTagCount(selection);\r\n const _userCanChangeContent = Permissions.Statement.canChangeContent();\r\n const canCreateNotes =\r\n Permissions.Note.canManageCoeNotesType(selectedProject) ||\r\n _userCanChangeContent;\r\n\r\n const _permissionToEdit = Permissions.Element.canEditElement(selectedProject);\r\n\r\n useEffect(() => {\r\n menuRef.current.style.left = _calculateX() / zoomRatio + 'px';\r\n\r\n menuRef.current.style.top = _calculateY() / zoomRatio + 'px';\r\n\r\n document.addEventListener('click', _handleClick);\r\n centerPanel.addEventListener('scroll', _handleScroll);\r\n\r\n // clean up\r\n return () => {\r\n document.removeEventListener('click', _handleClick);\r\n centerPanel.removeEventListener('scroll', _handleScroll);\r\n };\r\n });\r\n\r\n const _addElement = async () => {\r\n if (selectedCellsCount > 1) {\r\n toast.error(\r\n }\r\n message={{ id: 'notifications.add-element.error.message' }}\r\n title={{ id: 'notifications.add-element.error.title' }}\r\n />,\r\n { autoClose: 10000 },\r\n );\r\n hideContextMenu();\r\n return;\r\n }\r\n\r\n let text = selection.toString().trim();\r\n\r\n const parent = getSafeParentForRange({ range });\r\n\r\n hideContextMenu();\r\n\r\n try {\r\n const { data } = await addElementRequest({\r\n revisionId: revision.id,\r\n elementDetails: {\r\n selectedText: text,\r\n selector: getElementCSSXPath(parent),\r\n offset: getStartCharacterOffsetWithin(range, parent),\r\n length: text.length,\r\n tieoutSectionId: sectionId,\r\n hasElement: containsElement,\r\n elementId: -1, //id for new element, according to information provided by the backend team\r\n sectionId: sectionId,\r\n label: selectionLabel,\r\n },\r\n });\r\n if (socketHasBeenDisconnected) {\r\n fetchStatementSummaryElements({\r\n revisionId: revision.id,\r\n withoutLoading: true,\r\n });\r\n await fetchAllSectionRenderingData({ sectionId });\r\n } else {\r\n sectionHTMLSegmentsStatementContentLoading([sectionId]);\r\n setTimeout(() => {\r\n sectionHTMLSegmentsStatementContentLoadedWithoutResponse([sectionId]);\r\n }, 5000);\r\n }\r\n\r\n await initElementPanel({ elementId: data.id });\r\n selectElementCreated({ elementId: data.id });\r\n toast.success(\r\n }\r\n message={data.label}\r\n title={{ id: 'notifications.add-element.success.title' }}\r\n truncateMessage\r\n >\r\n \r\n {data.display}\r\n \r\n ,\r\n );\r\n } catch (error) {\r\n console.log(`error adding element ${error.message}`);\r\n }\r\n };\r\n\r\n const _addNote = () => {\r\n const filteredRange = getRangeMinusIgnorableContent({ range });\r\n const text = filteredRange.toString();\r\n\r\n const { startContainer, endContainer } = range;\r\n const startNode = getSafeParentForNode(startContainer);\r\n const endNode = getSafeParentForNode(endContainer);\r\n\r\n const textLength = getContentLength(range, text.length);\r\n\r\n initCreateNoteFromSelection({\r\n data: {\r\n revisionId: revision.id,\r\n selectedText: text,\r\n selector: getElementCSSXPath(startNode),\r\n endSelector: getElementCSSXPath(endNode),\r\n offset: getStartCharacterOffsetWithin(range, startNode),\r\n endOffset: getEndCharacterOffsetWithin(range, endNode),\r\n length: textLength,\r\n hasElement: containsElement,\r\n sectionId: sectionId,\r\n revisionNumber: revision.revisionNumber,\r\n },\r\n });\r\n\r\n hideContextMenu();\r\n };\r\n\r\n const _addNavigation = () => {\r\n setSelectedNavigatorTab(STATEMENT_NAV_TABS.headings);\r\n setTOCExpandAll(true);\r\n toggleAddNavigationModal();\r\n hideContextMenu();\r\n };\r\n\r\n const _handleScroll = () => hideContextMenu();\r\n\r\n const _handleClick = (e) => {\r\n const wasOutside = !menuRef.current.contains(e.target);\r\n\r\n if (wasOutside && visible) {\r\n hideContextMenu();\r\n }\r\n };\r\n\r\n const _calculateY = () => {\r\n const calculatedY =\r\n position.y + centerPanel.scrollTop - centerPanel.offsetTop;\r\n\r\n // make sure the menu doesn't go beyond panel boundaries\r\n return calculatedY + menuRef.current.offsetHeight - centerPanel.scrollTop <\r\n centerPanel.offsetHeight\r\n ? calculatedY\r\n : calculatedY - menuRef.current.offsetHeight;\r\n };\r\n\r\n const _calculateX = () => {\r\n const calculatedX =\r\n position.x + centerPanel.scrollLeft - centerPanel.offsetLeft;\r\n\r\n // make sure the menu doesn't go beyond panel boundaries\r\n return calculatedX + menuRef.current.offsetWidth - centerPanel.scrollLeft <\r\n centerPanel.offsetWidth\r\n ? calculatedX\r\n : calculatedX - menuRef.current.offsetWidth;\r\n };\r\n\r\n return (\r\n visible && (\r\n
            \r\n {_userCanChangeContent &&\r\n !containsElement &&\r\n !containsSectionAnchor &&\r\n !containsNotes && (\r\n
          • \r\n \r\n
          • \r\n )}\r\n {canCreateNotes &&\r\n !containsNotes &&\r\n !containsSectionAnchor &&\r\n !multipleSectionsSelected &&\r\n selectedCellsCount <= 1 &&\r\n selectedParagraphCount <= 1 && (\r\n
          • \r\n \r\n
          • \r\n )}\r\n {_permissionToEdit &&\r\n !containsNotes &&\r\n !containsElement &&\r\n !containsSection &&\r\n !containsSectionAnchor &&\r\n !containsTableCell &&\r\n selectedCellsCount === 0 && (\r\n
          • \r\n \r\n
          • \r\n )}\r\n
          \r\n )\r\n );\r\n};\r\n\r\nContextMenu.propTypes = {\r\n /** indicates if the menu is visible or not */\r\n visible: PropTypes.bool.isRequired,\r\n /** the coordinates where the menu should be displayed on */\r\n position: PropTypes.PropTypes.shape({\r\n x: PropTypes.number.isRequired,\r\n y: PropTypes.number.isRequired,\r\n }).isRequired,\r\n /** calling this function hides the menu */\r\n hideContextMenu: PropTypes.func.isRequired,\r\n /** reference to the parent node */\r\n centerPanelRef: PropTypes.object.isRequired,\r\n /** revision info for current document */\r\n revision: PropTypes.object.isRequired,\r\n /** current section id */\r\n sectionId: PropTypes.number.isRequired,\r\n /** redux action to retrieve section details */\r\n fetchAllSectionRenderingData: PropTypes.func.isRequired,\r\n /** redux action to retrieve statement summary elements */\r\n fetchStatementSummaryElements: PropTypes.func.isRequired,\r\n /** object containing the original window.selection() */\r\n selection: PropTypes.object.isRequired,\r\n /** redux action to initialize and open notes panel when creating a note */\r\n initCreateNoteFromSelection: PropTypes.func.isRequired,\r\n /** redux action to initialize and open element panel */\r\n initElementPanel: PropTypes.func.isRequired,\r\n toggleAddNavigationModal: PropTypes.func.isRequired,\r\n /** value from store indicating current zoom ratio */\r\n zoomRatio: PropTypes.number.isRequired,\r\n /** boolean value that determines if the socket connection has failed */\r\n socketHasBeenDisconnected: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: { revision },\r\n ui: { statementPage },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n}) => ({\r\n revision,\r\n zoomRatio: statementPage.zoom.zoomRatio,\r\n socketHasBeenDisconnected,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n initElementPanel,\r\n initCreateNoteFromSelection,\r\n fetchAllSectionRenderingData,\r\n fetchStatementSummaryElements,\r\n setSelectedNavigatorTab: setSelectedTabAction,\r\n setTOCExpandAll,\r\n selectElementCreated,\r\n sectionHTMLSegmentsStatementContentLoading,\r\n sectionHTMLSegmentsStatementContentLoadedWithoutResponse,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(injectIntl(ContextMenu));\r\n","import classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport React, { memo } from 'react';\r\nimport { injectIntl } from 'react-intl';\r\n\r\nimport FormItem from 'components/common/form-item-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nconst TEXT_AREA_BLOCK = 'text-area';\r\n\r\nconst TextArea = ({\r\n className,\r\n disabled,\r\n errorText,\r\n id,\r\n isValid,\r\n label,\r\n maxLength,\r\n onChange,\r\n onBlur,\r\n placeholder,\r\n tooltip,\r\n value,\r\n width,\r\n intl,\r\n rows = 10,\r\n readOnly,\r\n}) => {\r\n return (\r\n \r\n onChange(e.target.value)}\r\n placeholder={intl.formatMessage({ id: placeholder })}\r\n rows={rows}\r\n value={value}\r\n width={width}\r\n onBlur={onBlur}\r\n readOnly={readOnly}\r\n />\r\n \r\n );\r\n};\r\n\r\nTextArea.propTypes = {\r\n /** String custom class */\r\n className: PropTypes.string,\r\n /** Boolean representing if component should be disabled state */\r\n disabled: PropTypes.bool,\r\n /** Unique string id for text area */\r\n id: PropTypes.string.isRequired,\r\n /** Internationalized Sting id passed to form item */\r\n label: PropTypes.string,\r\n /** Maximum text area length */\r\n maxLength: PropTypes.number,\r\n /** Function fired on user input return value*/\r\n onChange: PropTypes.func.isRequired,\r\n /** Function fired when focus is lost from text area*/\r\n onBlur: PropTypes.func,\r\n /** Internationalized sting id */\r\n placeholder: PropTypes.string,\r\n /** Object with tool tip options passed to form item */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /** Current value of the text area*/\r\n value: PropTypes.string,\r\n /** String percentage representing width of component passed to form item*/\r\n width: PropTypes.string,\r\n /** Read only boolean */\r\n readOnly: PropTypes.bool,\r\n};\r\n\r\nexport default memo(injectIntl(TextArea));\r\n","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\n\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport { addNavigationRequest } from 'api/navigation-api';\r\nimport TextArea from 'components/common/text-area-component';\r\nimport KebabDropdown from 'components/common/dropdown-component';\r\nimport Radio from 'components/common/radio-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { RadioOption } from 'models/utils/common/radio-options-model';\r\nimport {\r\n getStartCharacterOffsetWithin,\r\n getElementCSSXPath,\r\n getSafeParentForRange,\r\n} from 'utils/content-selection-utils';\r\nimport { setTOCRefresh, setTOCExpandAll } from 'store/actions/TOC-actions';\r\nimport { OK } from 'http-status-codes';\r\nimport {\r\n fetchAllSectionRenderingData,\r\n fetchSectionIdListStatementContent,\r\n} from 'store/actions/statement-content-actions';\r\nimport { fetchStatementSummaryElements } from 'store/actions/statement-summary/elements-summary-actions';\r\nimport { getContentSectionMapRequest } from 'store/actions/section-cache-actions';\r\nimport { fetchTheListOfNotes } from 'store/actions/notes-panel-actions';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport { fetchStatementSummarySections } from 'store/actions/statement-summary/sections-summary-actions';\r\nimport { updateSelectedSectionPanel } from 'store/actions/sections-actions';\r\nimport { DEFAULT_ENTITY_STRING } from 'models/api/entity-list-model';\r\nimport { replaceSelectedSectionsContentPanel } from 'store/actions/statement-content-actions';\r\nimport { SECTION_HIGHLIGHT_STATES } from 'constants/feature/section-details-constants';\r\nimport {\r\n setCreateSectionAction,\r\n addNewSectionAction,\r\n removeNewSectionAction,\r\n setNewSectionIdAction,\r\n} from 'store/actions/section-tree-list-actions';\r\nimport { SectionTreeListEntry } from 'models/data/section-tree-list-entry-model';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { isRootLevelSection } from 'utils/section-tree-utils';\r\nimport ConditionalRenderComponent from 'components/util/conditional-render-component';\r\n\r\nconst ADD_NAVIGATOR_ID_BLOCK = 'add-navigator-modal-id';\r\nconst ADD_NAVIGATION_MODAL_BLOCK = 'add-navigator-modal';\r\n\r\nclass AddNavigationModal extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n selectionRange: null,\r\n selectionText: '',\r\n inlineInsertion: this._enableInlineButton(), // cannot create inline if section has subsection\r\n entity: props.entityList.entitiesDropdownMap[DEFAULT_ENTITY_STRING],\r\n };\r\n }\r\n\r\n getSectionParentId(sectionId) {\r\n const { contentSectionMap } = this.props;\r\n const closesBookmark = contentSectionMap.getClosestBookmarkSection({\r\n sectionId,\r\n });\r\n return closesBookmark.id;\r\n }\r\n getNewSection() {\r\n const { selection, sectionId, revision } = this.props;\r\n const { selectionText } = this.state;\r\n const section = new SectionTreeListEntry({\r\n chlidren: [],\r\n id: sectionId,\r\n is_technical: false,\r\n name: selectionText !== '' ? selectionText : selection.toString().trim(),\r\n orderNum: 0,\r\n parentSectionName: null,\r\n revisionId: revision.id,\r\n type: null,\r\n isNew: true,\r\n });\r\n return section;\r\n }\r\n\r\n componentDidMount() {\r\n const {\r\n selection,\r\n sectionId,\r\n setCreateSectionAction,\r\n addNewSectionAction,\r\n contentSectionMap,\r\n } = this.props;\r\n const { inlineInsertion } = this.state;\r\n\r\n this.setState({\r\n selectionRange: selection.getRangeAt(0),\r\n selectionText: selection.toString().trim(),\r\n sectionId: sectionId,\r\n });\r\n setCreateSectionAction(true);\r\n const parentId = this.getSectionParentId(sectionId);\r\n const isExistingSection = contentSectionMap.get(sectionId);\r\n\r\n addNewSectionAction({\r\n section: this.getNewSection(),\r\n parentId,\r\n inline: inlineInsertion,\r\n isExistingSection: isExistingSection,\r\n });\r\n }\r\n\r\n componentWillUnmount() {\r\n const { setCreateSectionAction, sectionId, removeNewSectionAction } =\r\n this.props;\r\n setCreateSectionAction(false);\r\n removeNewSectionAction(sectionId);\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const {\r\n sectionId,\r\n addNewSectionAction,\r\n removeNewSectionAction,\r\n setTOCExpandAll,\r\n } = this.props;\r\n const { inlineInsertion } = this.state;\r\n if (prevState.inlineInsertion !== inlineInsertion) {\r\n removeNewSectionAction(sectionId);\r\n const parentId = this.getSectionParentId(sectionId);\r\n addNewSectionAction({\r\n section: this.getNewSection(),\r\n parentId,\r\n inline: inlineInsertion,\r\n });\r\n setTOCExpandAll(true);\r\n }\r\n }\r\n\r\n highlightCreatedNavigation = (id) => {\r\n const { replaceSelectedSectionsContentPanel } = this.props;\r\n replaceSelectedSectionsContentPanel({\r\n color: SECTION_HIGHLIGHT_STATES.CREATED_NAV,\r\n sectionIds: [id],\r\n });\r\n /** Set one time click event listener to clear green selected elements after\r\n * successful creation of section navigation\r\n */\r\n document.addEventListener(\r\n 'click',\r\n (e) => {\r\n if (!e.ctrlKey) {\r\n replaceSelectedSectionsContentPanel({\r\n color: SECTION_HIGHLIGHT_STATES.DEFAULT,\r\n sectionIds: [id],\r\n });\r\n }\r\n },\r\n {\r\n once: true,\r\n },\r\n );\r\n };\r\n\r\n _addNavigation = async () => {\r\n const {\r\n revision,\r\n sectionId,\r\n setTOCRefresh,\r\n onClose,\r\n fetchAllSectionRenderingData,\r\n fetchStatementSummaryElements,\r\n getContentSectionMapRequest,\r\n fetchSectionIdListStatementContent,\r\n fetchTheListOfNotes,\r\n panels,\r\n fetchStatementSummarySections,\r\n updateSelectedSectionPanel,\r\n socketHasBeenDisconnected,\r\n setNewSectionIdAction,\r\n } = this.props;\r\n\r\n const { selectionRange, inlineInsertion, selectionText, entity } =\r\n this.state;\r\n\r\n const parent = getSafeParentForRange({ range: selectionRange });\r\n onClose();\r\n try {\r\n const {\r\n status,\r\n data: { addedSection },\r\n } = await addNavigationRequest({\r\n revisionId: revision.id,\r\n elementDetails: {\r\n selectedText: selectionText,\r\n selector: getElementCSSXPath(parent, false),\r\n offset: getStartCharacterOffsetWithin(selectionRange, parent),\r\n length: selectionText.length,\r\n tieoutSectionId: sectionId,\r\n hasElement: false,\r\n elementId: -1, //id for new element, according to information provided by the backend team\r\n inline: inlineInsertion,\r\n sectionNameEnumEntity: {\r\n abbreviatedName: selectionText,\r\n entity: entity.value,\r\n name: selectionText,\r\n shortName: selectionText,\r\n type: 'O',\r\n },\r\n },\r\n });\r\n if (status === OK) {\r\n fetchSectionIdListStatementContent(revision.id);\r\n await getContentSectionMapRequest({ revisionId: revision.id });\r\n updateSelectedSectionPanel({ sectionId: addedSection.id });\r\n setTOCRefresh(true);\r\n // sending scrollToSection with true value it is going to make the app scroll to the newly created\r\n // section when its data to render the content is already loaded.\r\n await fetchAllSectionRenderingData({\r\n sectionId: addedSection.id,\r\n scrollToSection: true,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n fetchStatementSummaryElements({ revisionId: revision.id });\r\n fetchStatementSummarySections({ revisionId: revision.id });\r\n }\r\n this.highlightCreatedNavigation(addedSection.id);\r\n setNewSectionIdAction(addedSection.id);\r\n if (panels.right === RIGHT_PANELS.NOTES) {\r\n fetchTheListOfNotes({ revisionId: revision.id });\r\n }\r\n }\r\n } catch (error) {\r\n console.log(`error adding navigation ${error.message}`);\r\n }\r\n };\r\n\r\n _isTechnicalSection = () => {\r\n const { contentSectionMap, sectionId } = this.props;\r\n return contentSectionMap.get(sectionId).isTechnical;\r\n };\r\n\r\n _isRootLevelSection = () => {\r\n const { sectionId, sectionTreeList } = this.props;\r\n const parentId = this.getSectionParentId(sectionId);\r\n const isRootLevel = isRootLevelSection(\r\n sectionTreeList.sectionsHierarchy,\r\n parentId,\r\n );\r\n return isRootLevel;\r\n };\r\n\r\n _enableInlineButton = () => {\r\n const { contentSectionMap, sectionId } = this.props;\r\n const manualHeading = contentSectionMap.get(sectionId).originalText;\r\n const isTechnicalSection = contentSectionMap.get(sectionId).isTechnical;\r\n // enable inline button when it is under manual section or it is a technical section but not a root level section.\r\n /***Background on concept */\r\n /*------------------------- */\r\n // Technical section usually does not participates in hierarchy, so it has to be inline, but we have a limitation where,\r\n // if technical section is a root level section then it should be created in the hierarchy of nearest parent or else\r\n // some functionality related to carryforward will not work.\r\n return (manualHeading || isTechnicalSection) && !this._isRootLevelSection();\r\n };\r\n\r\n _enableIndentButton = () => {\r\n // enable indent button when:\r\n // 1. it is technical section and at the same time a root level section\r\n // 2. it is not a technical section.\r\n return (\r\n (this._isTechnicalSection() && this._isRootLevelSection()) ||\r\n !this._isTechnicalSection()\r\n );\r\n };\r\n\r\n _toolTipText = () => {\r\n if (!this._enableInlineButton()) {\r\n return 'add-navigation-modal.options.inline-disabled';\r\n } else if (!this._enableIndentButton()) {\r\n return 'add-navigation-modal.options.indented-disabled';\r\n }\r\n };\r\n\r\n render() {\r\n const _toolTipTextRadio = this._toolTipText();\r\n const { onClose, entityList } = this.props;\r\n let uniqueId = 0;\r\n return (\r\n \r\n \r\n
          \r\n {\r\n this.setState((state) => ({\r\n selectionText: e,\r\n }));\r\n }}\r\n />\r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n {\r\n e.stopPropagation();\r\n }}\r\n value={this.state.entity}\r\n onSelectOption={(option) => {\r\n this.setState({ entity: option });\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 id: 'add-navigation-modal.options.tooltip-id',\r\n position: 'right',\r\n className: `${ADD_NAVIGATOR_ID_BLOCK}__tooltip`,\r\n })\r\n }\r\n options={[\r\n new RadioOption({\r\n id: 'add-navigation-modal.options.inline-id',\r\n label: 'add-navigation-modal.options.inline',\r\n value: true,\r\n disabled: !this._enableInlineButton(),\r\n tooltipEnabled: !this._enableInlineButton(),\r\n }),\r\n new RadioOption({\r\n id: 'add-navigation-modal.options.indented-id',\r\n label: 'add-navigation-modal.options.indented',\r\n value: false,\r\n disabled: !this._enableIndentButton(),\r\n tooltipEnabled: !this._enableIndentButton(),\r\n }),\r\n ]}\r\n width=\"auto\"\r\n isValid\r\n selectedOption={this.state.inlineInsertion}\r\n onChange={(val) => {\r\n this.setState({\r\n inlineInsertion: val,\r\n });\r\n }}\r\n />\r\n
          \r\n
          \r\n \r\n );\r\n }\r\n}\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n elementPanel: { entityList },\r\n sectionTreeList,\r\n statementContent: {\r\n sectionsCache: { contentSectionMap },\r\n sectionIdList: {\r\n data: { sectionIds },\r\n },\r\n },\r\n revision,\r\n },\r\n ui: {\r\n statementPage: { panels, sectionsInView },\r\n },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n}) => ({\r\n sectionTreeList,\r\n entityList,\r\n revision,\r\n contentSectionMap,\r\n panels,\r\n socketHasBeenDisconnected,\r\n sectionsInView,\r\n sectionIds,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n setTOCRefresh,\r\n fetchStatementSummaryElements,\r\n fetchAllSectionRenderingData,\r\n getContentSectionMapRequest,\r\n fetchSectionIdListStatementContent,\r\n fetchTheListOfNotes,\r\n fetchStatementSummarySections,\r\n updateSelectedSectionPanel,\r\n replaceSelectedSectionsContentPanel,\r\n setCreateSectionAction,\r\n addNewSectionAction,\r\n removeNewSectionAction,\r\n setTOCExpandAll,\r\n setNewSectionIdAction,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(AddNavigationModal);\r\n","import React, { Component, createRef } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport SectionContentHOC from 'higher-order-components/section-content-hoc-component';\r\nimport { SectionIdList } from 'models/api/section-id-list-model';\r\nimport { SectionCache } from 'models/api/sections-cache-model';\r\nimport { LeftSectionCache } from 'models/api/left-sections-cache-model';\r\nimport Zoom from 'models/data/zoom-model';\r\nimport SideBySideViewZoom from 'models/data/side-by-side-view-zoom-model';\r\nimport {\r\n isNowDragSelectMode,\r\n isNowNonDragSelectMode,\r\n isRangeSelectMode,\r\n isModeForAddCursor,\r\n} from 'utils/modes-utils';\r\nimport ElementSelection from 'models/data/element-selection-model';\r\nimport {\r\n ELEMENT_BLOCK,\r\n TIEOUT_ELEMENT_LEFT,\r\n} from 'components/feature/statement-content-panel/tieout-element-component';\r\nimport { doCoordinatesCollide } from 'utils/element-coordinate-utils';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport ContextMenu from './statement-context-menu';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport AddNavigationModal from './add-navigation-modal';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\n\r\nconst STATEMENT_CONTENT_PANEL_BLOCK = 'statement-content-panel';\r\nexport const STATEMENT_CONTENT_PANEL_ID_BLOCK = 'statement-content-panel-id';\r\nconst STATEMENT_CONTENT_PANEL_ZOOM_BLOCK = 'statement-content-panel-zoom-id';\r\nconst STATEMENT_CONTENT_PANEL_ZOOM_LEFT_BLOCK =\r\n 'statement-content-panel-zoom-left-id';\r\n\r\nclass StatementContentPanel extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n topLeftX: null,\r\n topLeftY: null,\r\n selectionWidth: null,\r\n selectionHeight: null,\r\n contextMenuVisible: false,\r\n contextMenuPosition: { x: 0, y: 0 },\r\n contextMenuSectionId: null,\r\n contextMenuSelection: null,\r\n contextMenuLabel: null,\r\n };\r\n this.panelRef = createRef();\r\n\r\n // track coordinates of mouse movement for determining drag-box placement/dimensions\r\n this.mouseStartX = null;\r\n this.mouseStartY = null;\r\n this.mouseCurrentX = null;\r\n this.mouseCurrentY = null;\r\n\r\n this.isUserDragging = false; // flag for ensuring we only do these operations when the user is dragging, as opposed to just clicking an element\r\n this._draggingInitialized = false;\r\n this._centerElementBeforeZoom = null; // reference to the element at the center of the viewport before zoom, used for anchoring the focal point of zoom\r\n this.showAddNavigationModal = false;\r\n }\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n if (nextProps.zoom.currentZoom !== this.props.zoom.currentZoom) {\r\n this._determineCenterElementBeforeZoom();\r\n }\r\n\r\n return true;\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const {\r\n leftSideBySideView,\r\n numberOfSourceElementSelected,\r\n numberOfTargetElementSelected,\r\n isSideBySideView,\r\n } = this.props;\r\n if (\r\n !this._draggingInitialized &&\r\n isNowDragSelectMode({\r\n prevMode: prevProps.selectMode,\r\n newMode: this.props.selectMode,\r\n })\r\n ) {\r\n isSideBySideView &&\r\n (leftSideBySideView ||\r\n (numberOfSourceElementSelected > numberOfTargetElementSelected &&\r\n !leftSideBySideView)) &&\r\n this._initMouseDragEventListeners();\r\n !isSideBySideView && this._initMouseDragEventListeners();\r\n } else if (\r\n this._draggingInitialized &&\r\n isNowNonDragSelectMode({\r\n prevMode: prevProps.selectMode,\r\n newMode: this.props.selectMode,\r\n })\r\n ) {\r\n this._removeMouseDragEventListeners();\r\n }\r\n if (prevProps.zoom.currentZoom !== this.props.zoom.currentZoom) {\r\n this._zoomOnCenterElement();\r\n }\r\n }\r\n\r\n componentWillUnmount() {\r\n this._removeMouseDragEventListeners();\r\n this.props.clearSideBySideElementsMap();\r\n }\r\n\r\n /**\r\n * Finds a reference point element at the center of the viewport which\r\n * we can anchor our zooming to.\r\n * We need to keep the `transform-origin: top left` css property so that\r\n * our content isn't unreachable at the top of the document when zooming\r\n */\r\n _determineCenterElementBeforeZoom = () => {\r\n const { isSideBySideView, isReportPreview } = this.props;\r\n const xCenterOfViewportForSideBySideView =\r\n this.props.centerPanelRef.current.getBoundingClientRect().left +\r\n this.props.centerPanelRef.current.offsetWidth / 2;\r\n const xCenterOfViewport =\r\n isSideBySideView || isReportPreview\r\n ? xCenterOfViewportForSideBySideView\r\n : document.documentElement.offsetWidth / 2;\r\n\r\n const spaceFromTop = isSideBySideView || isReportPreview\r\n ? this.props.centerPanelRef.current.getBoundingClientRect().top\r\n : this.props.centerPanelRef.current.offsetTop;\r\n\r\n const yCenterOfScrollArea =\r\n spaceFromTop + this.props.centerPanelRef.current.offsetHeight / 2;\r\n this._centerElementBeforeZoom = document.elementFromPoint(\r\n xCenterOfViewport,\r\n yCenterOfScrollArea,\r\n );\r\n };\r\n\r\n /**\r\n * Called After zoom updates to ensure that the previous center element is scrolled into the center of the panel\r\n * effectively allows us to \"zoom\" in on the center of focus\r\n * Since we don't specify a zoom 'behavior' the effect is immediate and the user doesn't see the scrolling\r\n */\r\n _zoomOnCenterElement = () => {\r\n this._centerElementBeforeZoom.scrollIntoView({\r\n block: 'center',\r\n });\r\n };\r\n\r\n _initMouseDragEventListeners() {\r\n this.panelRef.current.addEventListener('mousedown', this.onMouseDownDrag);\r\n\r\n this.panelRef.current.addEventListener('mouseup', this.onMouseUpDrag);\r\n\r\n this._draggingInitialized = true;\r\n }\r\n\r\n _removeMouseDragEventListeners() {\r\n this._draggingInitialized = false;\r\n this.panelRef.current.removeEventListener(\r\n 'mousedown',\r\n this.onMouseDownDrag,\r\n );\r\n this.panelRef.current.removeEventListener('mouseup', this.onMouseUpDrag);\r\n }\r\n\r\n onMouseMoveDrag = (e) => {\r\n const { selectMode } = this.props;\r\n const _shouldCancelDrag =\r\n selectMode === ELEMENT_SELECT_MODES.DEFAULT ||\r\n selectMode === ELEMENT_SELECT_MODES.RANGE;\r\n if (_shouldCancelDrag) {\r\n // this can happen if the user releases the ctrl key BEFORE the mouseup event fires\r\n this.panelRef.current.removeEventListener(\r\n 'mousemove',\r\n this.onMouseMoveDrag,\r\n );\r\n this._removeMouseDragEventListeners();\r\n this.isUserDragging = false;\r\n this.initDragStateToDefault();\r\n return;\r\n }\r\n\r\n const { x, y } = this._getCurrentMouseCoordinates(e);\r\n this.mouseCurrentX = x;\r\n this.mouseCurrentY = y;\r\n this.isUserDragging = true;\r\n this.drawDragBox();\r\n };\r\n\r\n onMouseDownDrag = (e) => {\r\n // init drag listener\r\n this.panelRef.current.addEventListener('mousemove', this.onMouseMoveDrag);\r\n const { x, y } = this._getCurrentMouseCoordinates(e);\r\n // set drag start coordinates\r\n this.mouseStartX = x;\r\n this.mouseStartY = y;\r\n };\r\n\r\n onMouseUpDrag = (e) => {\r\n // remove drag listener\r\n this.panelRef.current.removeEventListener(\r\n 'mousemove',\r\n this.onMouseMoveDrag,\r\n );\r\n // select elements based on final position\r\n this.findSelectedElementsOnMouseUp();\r\n this.isUserDragging = false;\r\n };\r\n\r\n onContextMenu = ({ position, sectionId, selection, selectionLabel }) => {\r\n if (this.props.isSideBySideView) {\r\n this.setState({\r\n contextMenuVisible: false,\r\n contextMenuSectionId: null,\r\n contextMenuSelection: null,\r\n contextMenuPosition: { x: 0, y: 0 },\r\n contextMenuLabel: null,\r\n });\r\n } else {\r\n this.setState({\r\n contextMenuVisible: true,\r\n contextMenuSectionId: sectionId,\r\n contextMenuSelection: selection,\r\n contextMenuPosition: position,\r\n contextMenuLabel: selectionLabel,\r\n });\r\n }\r\n };\r\n\r\n onHideContextMenu = () => {\r\n this.setState({\r\n contextMenuVisible: false,\r\n });\r\n };\r\n\r\n /**\r\n * Since the scroll container is now the centerPanel instead of the document\r\n * the x coordinate position needs to be based off the current scroll position\r\n * of the center panel, the mouses position on the page and the offset height of the center panel\r\n *\r\n */\r\n _getCurrentMouseCoordinates = (event) => {\r\n const centerPanelRef = this.props.centerPanelRef.current;\r\n return {\r\n x: event.pageX + centerPanelRef.scrollLeft - centerPanelRef.offsetLeft,\r\n y: event.pageY + centerPanelRef.scrollTop - centerPanelRef.offsetTop,\r\n };\r\n };\r\n\r\n toggleAddNavigationModal = () => {\r\n this.setState({\r\n showAddNavigationModal: !this.state.showAddNavigationModal,\r\n });\r\n };\r\n\r\n drawDragBox = () => {\r\n /* With the mouse event coordinates we can get the top left corner of the \r\n selection box and set those dimensions to state to cause a re-render\r\n so we know where the selection box is on the screen allowing us to then see if any \r\n elements are within the same coordinates. */\r\n const width = Math.abs(this.mouseStartX - this.mouseCurrentX);\r\n const height = Math.abs(this.mouseStartY - this.mouseCurrentY);\r\n let topLeftX;\r\n let topLeftY;\r\n //Here we see which way the user made the selection.\r\n const _downToRight =\r\n this.mouseStartX < this.mouseCurrentX &&\r\n this.mouseStartY < this.mouseCurrentY;\r\n const _upToRight =\r\n this.mouseStartX > this.mouseCurrentX &&\r\n this.mouseStartY > this.mouseCurrentY;\r\n const _downToLeft =\r\n this.mouseStartX > this.mouseCurrentX &&\r\n this.mouseStartY < this.mouseCurrentY;\r\n\r\n if (_downToRight) {\r\n // |_ down to right\r\n topLeftX = this.mouseStartX;\r\n topLeftY = this.mouseStartY;\r\n } else if (_upToRight) {\r\n // _ up to right\r\n // |\r\n topLeftX = this.mouseCurrentX;\r\n topLeftY = this.mouseCurrentY;\r\n } else if (_downToLeft) {\r\n // _| down to left\r\n topLeftX = this.mouseCurrentX;\r\n topLeftY = this.mouseStartY;\r\n } else {\r\n // _ up to left\r\n // |\r\n topLeftX = this.mouseStartX;\r\n topLeftY = this.mouseCurrentY;\r\n }\r\n this.setState({\r\n topLeftX: topLeftX,\r\n topLeftY: topLeftY,\r\n selectionWidth: width,\r\n selectionHeight: height,\r\n });\r\n };\r\n\r\n findSelectedElementsOnMouseUp = () => {\r\n const { dragSelectElements, leftSideBySideView } = this.props;\r\n const centerPanelRef = this.props.centerPanelRef.current;\r\n const { topLeftX, topLeftY, selectionWidth, selectionHeight } = this.state;\r\n //First we get an object of all the tieout elements that could be in the selection and are rendered.\r\n const tieoutElementBlock = leftSideBySideView\r\n ? TIEOUT_ELEMENT_LEFT\r\n : ELEMENT_BLOCK;\r\n const selectableElements = document.querySelectorAll(\r\n `.${tieoutElementBlock}`,\r\n );\r\n const selectionTop = topLeftY;\r\n const selectionLeft = topLeftX;\r\n /* Then we filter those dom nodes to find out if they are positioned within the selection. */\r\n let elementsInSelection;\r\n if (selectableElements) {\r\n elementsInSelection = [...selectableElements].filter((element) => {\r\n const elementBoundingRect = element.getBoundingClientRect();\r\n // accounts for fact that scroll container is centerPanelRef and not page\r\n const currentElementTop =\r\n elementBoundingRect.top +\r\n centerPanelRef.scrollTop -\r\n centerPanelRef.offsetTop;\r\n // accounts for fact that scroll container is centerPanelRef and not page\r\n const currentElementLeft =\r\n elementBoundingRect.left +\r\n centerPanelRef.scrollLeft -\r\n centerPanelRef.offsetLeft;\r\n return this.coordinatesCollide({\r\n selectionTop,\r\n selectionLeft,\r\n selectionHeight: selectionHeight,\r\n selectionWidth: selectionWidth,\r\n elementTop: currentElementTop,\r\n elementLeft: currentElementLeft,\r\n elementHeight: elementBoundingRect.bottom - elementBoundingRect.top,\r\n elementWidth: elementBoundingRect.right - elementBoundingRect.left,\r\n });\r\n });\r\n /* Once we have the elements in the selection we take their id's and set them in redux so \r\n we can perform batch operations on them.*/\r\n if (elementsInSelection.length) {\r\n elementsInSelection = elementsInSelection.map((node) => {\r\n return new ElementSelection({\r\n elementId: Number.parseInt(node.dataset.elementId),\r\n sectionId: Number.parseInt(node.dataset.sectionId),\r\n });\r\n });\r\n //call redux action to store here.\r\n dragSelectElements({\r\n elements: elementsInSelection,\r\n isLeftSideView: leftSideBySideView,\r\n });\r\n }\r\n this.initDragStateToDefault();\r\n }\r\n };\r\n\r\n initDragStateToDefault = () => {\r\n // remove the selection box from the screen\r\n this.setState({\r\n topLeftX: null,\r\n topLeftY: null,\r\n selectionWidth: null,\r\n selectionHeight: null,\r\n });\r\n // ensure we don't fire drag events\r\n this.isUserDragging = false;\r\n\r\n this.mouseStartX = null;\r\n this.mouseStartY = null;\r\n this.mouseCurrentX = null;\r\n this.mouseCurrentY = null;\r\n };\r\n\r\n coordinatesCollide({\r\n selectionTop,\r\n selectionLeft,\r\n selectionWidth,\r\n selectionHeight,\r\n elementTop,\r\n elementLeft,\r\n elementWidth,\r\n elementHeight,\r\n }) {\r\n return doCoordinatesCollide({\r\n aTop: selectionTop,\r\n aLeft: selectionLeft,\r\n aWidth: selectionWidth,\r\n aHeight: selectionHeight,\r\n bTop: elementTop,\r\n bLeft: elementLeft,\r\n bWidth: elementWidth,\r\n bHeight: elementHeight,\r\n });\r\n }\r\n\r\n render() {\r\n const {\r\n sectionsCache,\r\n sectionIdList,\r\n urlParams,\r\n selectMode,\r\n zoom,\r\n isContentPanelScrolling,\r\n centerPanelRef,\r\n selectedProject,\r\n selectedStatement,\r\n leftSideBySideView,\r\n isSideBySideView,\r\n numberOfSourceElementSelected,\r\n numberOfTargetElementSelected,\r\n } = this.props;\r\n const {\r\n selectionWidth,\r\n selectionHeight,\r\n topLeftY,\r\n topLeftX,\r\n contextMenuVisible,\r\n contextMenuPosition,\r\n contextMenuSectionId,\r\n contextMenuSelection,\r\n contextMenuLabel,\r\n showAddNavigationModal,\r\n } = this.state;\r\n\r\n const _isRangeSelectMode = isRangeSelectMode(selectMode);\r\n const isReportPreviewPage = isElementReportPreviewPage(\r\n window.location.pathname,\r\n );\r\n const _shouldCenterZoomedPanel = zoom.zoomRatio < 1;\r\n const readOnly = selectedStatement.isReadOnly();\r\n const isRightSideStatementView = isSideBySideView && !leftSideBySideView;\r\n const rightStatementCursorClassName =\r\n isRightSideStatementView &&\r\n numberOfSourceElementSelected > numberOfTargetElementSelected &&\r\n `${STATEMENT_CONTENT_PANEL_BLOCK}--right-statement-selection-cursor`;\r\n\r\n return (\r\n \r\n {_isRangeSelectMode && (\r\n \r\n )}\r\n \r\n \r\n {sectionIdList.sectionIds.map((sectionId, index) => (\r\n \r\n ))}\r\n \r\n {contextMenuVisible && !readOnly && !isReportPreviewPage && (\r\n \r\n )}\r\n {showAddNavigationModal && (\r\n \r\n )}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nStatementContentPanel.propTypes = {\r\n /** Api model of all the section id's */\r\n sectionIdList: PropTypes.instanceOf(SectionIdList).isRequired,\r\n /** Api model of all the section segments */\r\n sectionsCache: PropTypes.oneOfType([\r\n PropTypes.instanceOf(SectionCache),\r\n PropTypes.instanceOf(LeftSectionCache),\r\n ]).isRequired,\r\n /** Object that holds current url params */\r\n urlParams: PropTypes.object.isRequired,\r\n /** current mode for selecting elements in the content panel */\r\n selectMode: PropTypes.shape({\r\n id: PropTypes.number.isRequired,\r\n }),\r\n /** boolean value will be true only for left statement in side by side page */\r\n leftSideBySideView: PropTypes.bool,\r\n /** action fired after user drags their mouse into a rectangle in a drag select mode */\r\n dragSelectElements: PropTypes.func.isRequired,\r\n /** Model representing current zoom properties */\r\n zoom: PropTypes.oneOfType([\r\n PropTypes.instanceOf(Zoom),\r\n PropTypes.instanceOf(SideBySideViewZoom),\r\n ]).isRequired,\r\n /** Flag for when user is scrolling content panel */\r\n isContentPanelScrolling: PropTypes.bool.isRequired,\r\n /** Selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n /** Boolean value will be true only if it is side-by-side view page*/\r\n isSideBySideView: PropTypes.bool.isRequired,\r\n /** it is an action method to reset side by side mapping data of elements from store, if exists*/\r\n clearSideBySideElementsMap: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default StatementContentPanel;\r\n","export const doCoordinatesCollide = ({\r\n aTop,\r\n aLeft,\r\n aWidth,\r\n aHeight,\r\n bTop,\r\n bLeft,\r\n bWidth,\r\n bHeight,\r\n}) => {\r\n // the inverse of all non - collisions indicates a collision\r\n return !(\r\n // 'a' bottom doesn't touch 'b' top\r\n (\r\n aTop + aHeight < bTop ||\r\n // 'a' top doesn't touch 'b' bottom\r\n aTop > bTop + bHeight ||\r\n // 'a' right doesn't touch 'b' left\r\n aLeft + aWidth < bLeft ||\r\n // 'a' left doesn't touch 'b' right\r\n aLeft > bLeft + bWidth\r\n )\r\n );\r\n};\r\n","import React from 'react';\r\nimport { useParams, useLocation } from 'react-router-dom';\r\n\r\nconst withURLRouter = (WrappedComponent) => (props) => {\r\n const { pathname } = useLocation();\r\n const params = useParams();\r\n\r\n return ;\r\n};\r\n\r\nexport default withURLRouter;\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\nimport StatementContentPanel from 'components/feature/statement-content-panel/statement-content-panel-component';\r\nimport {\r\n initStatementContent,\r\n initLeftStatementContent,\r\n batchSelectElements,\r\n batchSelectElementsInSideBySideMode,\r\n} from 'store/actions/statement-content-actions';\r\nimport withURLRouter from 'withURLRouter';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { clearSideBySideElementsMap } from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\n\r\nconst StatementContentPanelComponentHOC = (props) => {\r\n const {\r\n leftSelectedStatement,\r\n selectedStatement,\r\n leftSectionIdList,\r\n sectionIdList,\r\n sectionsCache,\r\n leftSectionsCache,\r\n leftSideBySideView,\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n URLString,\r\n clearSideBySideElementsMap,\r\n batchSelectElementsInSideBySideMode,\r\n batchSelectElements,\r\n } = props;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n statementContent: {\r\n sectionsCache: { cache },\r\n sectionIdList,\r\n },\r\n leftStatementContent,\r\n leftStatementContent: {\r\n leftSectionIdList,\r\n leftSectionsCache: { leftCache },\r\n },\r\n selectedProject: { id },\r\n selectedStatement,\r\n leftSelectedStatement,\r\n },\r\n ui: {\r\n sideBySideView: { sideBySideElementMap },\r\n statementPage: {\r\n modes: { selectMode },\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n contentHighlightSelector,\r\n },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n sectionsCache: cache,\r\n leftSectionsCache: leftCache,\r\n leftStatementContent,\r\n sectionIdList,\r\n leftSectionIdList,\r\n urlParams: ownProps.urlParams,\r\n selectMode,\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n contentHighlightSelector,\r\n selectedProject: id,\r\n selectedStatement,\r\n leftSelectedStatement,\r\n numberOfSourceElementSelected:\r\n sideBySideElementMap && sideBySideElementMap.sizeOfSourceMapping,\r\n numberOfTargetElementSelected:\r\n sideBySideElementMap && sideBySideElementMap.sizeOfTargetMapping,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n push,\r\n initStatementContent,\r\n initLeftStatementContent,\r\n batchSelectElementsInSideBySideMode,\r\n batchSelectElements,\r\n clearSideBySideElementsMap,\r\n};\r\n\r\nexport default withURLRouter(\r\n connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n )(StatementContentPanelComponentHOC),\r\n);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0.5 9C0.5 4.28864 4.28864 0.5 9 0.5C13.7114 0.5 17.5 4.28864 17.5 9C17.5 13.7114 13.7114 17.5 9 17.5C4.28864 17.5 0.5 13.7114 0.5 9Z\",\n stroke: \"#FFCD00\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M12.9021 8.235C12.9021 7.9929 12.8059 7.76071 12.6347 7.58951C12.4635 7.41832 12.2314 7.32214 11.9893 7.32214H6.05568C5.81357 7.32214 5.58139 7.41832 5.41019 7.58951C5.239 7.76071 5.14282 7.9929 5.14282 8.235V12.7993C5.14282 13.0414 5.239 13.2736 5.41019 13.4448C5.58139 13.616 5.81357 13.7121 6.05568 13.7121H11.9893C12.2314 13.7121 12.4635 13.616 12.6347 13.4448C12.8059 13.2736 12.9021 13.0414 12.9021 12.7993V8.235Z\",\n stroke: \"#FFCD00\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M6.51208 5.72464C6.51208 5.05885 6.77657 4.42033 7.24735 3.94955C7.71813 3.47876 8.35665 3.21428 9.02244 3.21428C9.68823 3.21428 10.3267 3.47876 10.7975 3.94955C11.2683 4.42033 11.5328 5.05885 11.5328 5.72464V7.32214H6.51208V5.72464Z\",\n stroke: \"#FFCD00\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n});\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M9.02244 11.0877C9.33754 11.0877 9.59298 10.8322 9.59298 10.5171C9.59298 10.202 9.33754 9.94659 9.02244 9.94659C8.70734 9.94659 8.4519 10.202 8.4519 10.5171C8.4519 10.8322 8.70734 11.0877 9.02244 11.0877Z\",\n stroke: \"#FFCD00\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n});\n\nvar SvgLock = function SvgLock(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 18,\n viewBox: \"0 0 18 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgLock, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/lock.ccbc6605.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react';\r\nimport shortid from 'shortid';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Lock } from 'icons/lock.svg';\r\nimport { STATEMENT_CONTENT_BLOCK } from './statement-content-page';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport { WorkflowsMap } from 'models/api/statement-workflows-map-model';\r\nimport { getReadOnlyBannerId } from 'utils/statement-content-page-utils';\r\n\r\nconst StatementReadOnlyBanners = ({\r\n selectedStatement,\r\n isBatchModeSelected,\r\n urlParams,\r\n workflowsMap,\r\n}) => {\r\n if (selectedStatement && selectedStatement.isReadOnly()) {\r\n return (\r\n \r\n
          \r\n \r\n {chunks},\r\n br: (\r\n \r\n ),\r\n }}\r\n />\r\n
          \r\n \r\n );\r\n }\r\n return null;\r\n};\r\n\r\nStatementReadOnlyBanners.propTypes = {\r\n /** url params object based on route */\r\n urlParams: PropTypes.object,\r\n /** Currently selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement),\r\n /**For tracing revisions processing/failed*/\r\n workflowsMap: PropTypes.instanceOf(WorkflowsMap),\r\n /** Flag to check if batch mode is selected */\r\n isBatchModeSelected: PropTypes.bool,\r\n};\r\n\r\nexport default StatementReadOnlyBanners;\r\n","import React, { useEffect, useState } from 'react';\r\nimport { injectIntl } from 'react-intl';\r\nimport { addElementRequestOCR } from 'api/element-api';\r\nimport { toast } from 'react-toastify';\r\nimport Notification from 'components/common/notification-component';\r\nimport { ReactComponent as Checkmark } from 'icons/checkmark.svg';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n initElementPanel,\r\n selectElementCreated,\r\n} from 'store/actions/element-panel-actions';\r\nimport Permissions from 'permissions/permissions';\r\nimport { initCreateNoteFromSelection } from 'store/actions/notes-panel-actions';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button-red.svg';\r\n\r\nconst StatementContextMenu = ({\r\n contextMenuData,\r\n clearSelection,\r\n intl,\r\n BLOCK,\r\n initElementPanel,\r\n revision,\r\n selectElementCreated,\r\n selectedProject,\r\n initCreateNoteFromSelection,\r\n overlayCanvas,\r\n}) => {\r\n // eslint-disable-next-line no-unused-vars\r\n const [topPostion, setTopPostion] = useState(contextMenuData.y);\r\n const [leftPosition, setLeftPosition] = useState(contextMenuData.x);\r\n\r\n const _userCanChangeContent = Permissions.Statement.canChangeContent();\r\n // const _permissionToEdit = Permissions.Element.canEditElement(selectedProject); we will use it once creation of bookmarks is completed\r\n const canCreateNotes =\r\n Permissions.Note.canManageCoeNotesType(selectedProject) ||\r\n _userCanChangeContent;\r\n\r\n useEffect(() => {\r\n if (\r\n overlayCanvas &&\r\n overlayCanvas.current &&\r\n // Here 120 is the approx width of context-menu.\r\n // We are subtracting it from its position so that it does not overlaps with the edge of statement content border on right side.\r\n // Subtracting will position it such that its right boundary ends up at the starting of word.\r\n leftPosition + 120 > overlayCanvas.current.width\r\n )\r\n setLeftPosition(leftPosition - 120);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [overlayCanvas.current]);\r\n\r\n const addElement = async () => {\r\n if (contextMenuData.filteredTableData.length > 1) {\r\n toast.error(\r\n }\r\n message={{ id: 'notifications.add-element.error.message' }}\r\n title={{ id: 'notifications.add-element.error.title' }}\r\n />,\r\n { autoClose: 10000 },\r\n );\r\n clearSelection();\r\n return;\r\n }\r\n\r\n const {\r\n preText,\r\n postText,\r\n filtered,\r\n selectedText,\r\n contextLabel,\r\n rowIndex,\r\n columnIndex,\r\n polygon,\r\n isTable,\r\n tableId,\r\n sectionId,\r\n } = contextMenuData;\r\n try {\r\n const { data } = await addElementRequestOCR({\r\n revisionId: revision.id,\r\n elementDetails: {\r\n preText,\r\n postText,\r\n filtered,\r\n selectedText,\r\n contextLabel,\r\n rowIndex,\r\n columnIndex,\r\n polygon,\r\n isTable,\r\n tableId,\r\n sectionId,\r\n },\r\n });\r\n await initElementPanel({ elementId: data.id });\r\n selectElementCreated({ elementId: data.id });\r\n toast.success(\r\n }\r\n message={data.label}\r\n title={{ id: 'notifications.add-element.success.title' }}\r\n truncateMessage\r\n >\r\n \r\n {data.display}\r\n \r\n ,\r\n );\r\n } catch (error) {\r\n console.log('error', error);\r\n }\r\n };\r\n\r\n const addNote = () => {\r\n const {\r\n preText,\r\n postText,\r\n selectedText,\r\n contextLabel,\r\n polygon,\r\n sectionId,\r\n containsElement,\r\n containesElementArray,\r\n } = contextMenuData;\r\n initCreateNoteFromSelection({\r\n data: {\r\n selector: '',\r\n selectedText,\r\n polygon,\r\n elementId: containesElementArray.length ? containesElementArray[0] : -1,\r\n preText,\r\n postText,\r\n contextLabel,\r\n length: selectedText.length,\r\n hasElement: containsElement,\r\n revisionNumber: revision.revisionNumber,\r\n sectionId: sectionId,\r\n revisionId: revision.id,\r\n isOCR: true,\r\n },\r\n });\r\n };\r\n\r\n return (\r\n {\r\n e.stopPropagation();\r\n }}\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n }}\r\n onMouseUp={() => clearSelection()}\r\n style={{ top: topPostion, left: leftPosition, zIndex: 55 }}\r\n className={`${BLOCK}__context-menu`}\r\n >\r\n {_userCanChangeContent &&\r\n !contextMenuData.containsElement &&\r\n !contextMenuData.containsNote && (\r\n
        • \r\n {\r\n addElement();\r\n clearSelection();\r\n }}\r\n >\r\n {intl.formatMessage({\r\n id: 'section-content.context-menu.add-element',\r\n })}\r\n \r\n
        • \r\n )}\r\n {canCreateNotes &&\r\n !contextMenuData.containsNote &&\r\n contextMenuData.filteredTableData.length <= 1 && (\r\n
        • \r\n {\r\n addNote();\r\n clearSelection();\r\n }}\r\n >\r\n {intl.formatMessage({\r\n id: 'section-content.context-menu.add-note',\r\n })}\r\n \r\n
        • \r\n )}\r\n {/*Once bookmark creation is completed we will enable this feature again/*}\r\n {/* {_permissionToEdit &&\r\n !contextMenuData.containsElement &&\r\n contextMenuData.filteredTableData.length === 0 && (\r\n
        • \r\n {\r\n clearSelection();\r\n }}\r\n >\r\n {intl.formatMessage({\r\n id: 'section-content.context-menu.add-navigation',\r\n })}\r\n \r\n
        • \r\n )} */}\r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n revision,\r\n selectedProject: { id },\r\n },\r\n ui: { statementPage },\r\n}) => ({\r\n revision,\r\n zoomRatio: statementPage.zoom.zoomRatio,\r\n selectedProject: id,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n initElementPanel,\r\n selectElementCreated,\r\n initCreateNoteFromSelection,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(injectIntl(StatementContextMenu));\r\n","import React from 'react';\r\n\r\nconst HtmlOverlay = ({ box }) => {\r\n return (\r\n
          \r\n {box && (\r\n
          \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default HtmlOverlay;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { checkIsArrayOfArrays } from 'utils/ocr-text-selection-utils';\r\n\r\nconst RenderPolygonBasedStatementDetails = ({\r\n scale,\r\n coordinates,\r\n children,\r\n displayIcon,\r\n loopCount = null,\r\n}) => {\r\n // Use React.Children.map to iterate over children and React.cloneElement to add props\r\n const childrenWithProps = React.Children.map(children, (child) => {\r\n // Ensure the child is a valid React element\r\n if (React.isValidElement(child)) {\r\n if (coordinates && checkIsArrayOfArrays(coordinates)) {\r\n return coordinates.map((coord, index) => {\r\n // loopCount: prop check to place marker or callout at the first element in case of multi-line element scenario.\r\n let showIcon = false;\r\n if (loopCount === index && displayIcon) {\r\n showIcon = true;\r\n }\r\n\r\n return React.cloneElement(child, {\r\n polygonInPixel: coord.map((childCoord) => {\r\n return parseFloat(childCoord) * scale;\r\n }),\r\n showIcon,\r\n });\r\n });\r\n } else if (coordinates && coordinates.length) {\r\n let showIcon = displayIcon ? true : false;\r\n return React.cloneElement(child, {\r\n polygonInPixel: coordinates.map((coord) => {\r\n return parseFloat(coord) * scale;\r\n }),\r\n showIcon,\r\n });\r\n }\r\n }\r\n });\r\n\r\n return <>{childrenWithProps};\r\n};\r\n\r\nRenderPolygonBasedStatementDetails.prototype = {\r\n children: PropTypes.node.isRequired,\r\n};\r\n\r\nexport default RenderPolygonBasedStatementDetails;\r\n","import React from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { ANNOTATION_DISPLAY_FUNCTIONS } from 'constants/feature/tieout-element-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nconst ANNOTATION_ICON_SIZE = '10px';\r\n\r\nconst ElementFlagComponentOCR = ({\r\n elementDetails,\r\n polygonTop,\r\n polygonLeft,\r\n}) => {\r\n const { annotationDisplayOptions: annotationDisplayFilter } = useSelector(\r\n (store) => store.data,\r\n );\r\n\r\n return (\r\n <>\r\n {!isNullOrUndefined(annotationDisplayFilter) &&\r\n annotationDisplayFilter.flag && (\r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.flagged({\r\n elementDetails: elementDetails,\r\n iconSize: ANNOTATION_ICON_SIZE,\r\n })}\r\n \r\n )}\r\n \r\n );\r\n};\r\nexport default ElementFlagComponentOCR;\r\n","import React, { useMemo } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport Permissions from 'permissions/permissions';\r\nimport { useLocation } from 'react-router-dom';\r\nimport {\r\n isElementReportPreviewPage,\r\n getElementHighlightStatus,\r\n getCssModifierForView,\r\n getCalloutVisibilityDetails,\r\n} from 'utils/ocr-annotation-utils';\r\nimport { getElementBoundaryInfo } from 'utils/ocr-element-utils';\r\nimport {\r\n STATEMENT_ELEMENT_ID_PREFIX,\r\n STATEMENT_LEFT_ELEMENT_ID_PREFIX,\r\n} from 'constants/feature/statement-content-constants';\r\nimport { setSelectedElementDetails } from 'store/actions/report-preview-page-actions';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { onElementClick } from 'components/feature/statement-content-panel/tieout-element-component';\r\nimport ElementFlagComponentOCR from './element-flag-component-ocr';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ElementSelectionLimit } from 'higher-order-components/tieout-element-hoc-component';\r\nimport {\r\n setSourceStatementElementMapAction,\r\n setTargetStatementElementMapAction,\r\n} from 'store/actions/side-by-side-statement/side-by-side-statement-actions';\r\nimport { getExcessiveElementSelectionNotification } from 'constants/feature/tieout-element-utils';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { updateSideBySideElementCacheByCallouts } from 'store/actions/statement-content-annotation-creation-actions';\r\nimport useHoverEffect from 'components/hooks/useHoverEffects';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport { checkIfFeatureFlagEnabled } from 'store/actions/selected-statement-actions';\r\nimport { isModeForAddCursor } from 'utils/modes-utils';\r\n\r\nconst TIEOUT_ELEMENT = 'tieout-element-ocr';\r\nconst SIDE_BY_SIDE_STATEMENT_ELEMENT = 'side-by-side-selected-element';\r\nconst SIDE_BY_SIDE_ELEMENT_IDENTIFIER = 'side-by-side-element-identifier';\r\nconst TIEOUT_ELEMENT_LEFT = 'tieout-element-ocr-left';\r\n\r\nconst TieoutElementOCR = ({\r\n clearSelection,\r\n elementDetails,\r\n polygonInPixel,\r\n tooltip,\r\n showElementStatusAndFlag,\r\n annotationDisplayFilter,\r\n annotation,\r\n isLeftView,\r\n isDisabled,\r\n}) => {\r\n const dispatch = useDispatch();\r\n const url = useLocation().pathname;\r\n const isSideBySideView = url.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE);\r\n const { ui, data } = useSelector((store) => store);\r\n const {\r\n sideBySideView: { sideBySideElementMap },\r\n reportPreviewPage,\r\n statementPage: {\r\n blacklineHighlightedElementId,\r\n selectedElementsMap,\r\n leftSelectedElementsMap,\r\n modes: { selectMode, blacklineViewMode, blacklineViewShowElementMode },\r\n },\r\n } = ui;\r\n const TIEOUT_ELEMENT_CLASS = isLeftView\r\n ? TIEOUT_ELEMENT_LEFT\r\n : TIEOUT_ELEMENT;\r\n\r\n const TIEOUT_ELEMENT_ID_PREFIX = isLeftView\r\n ? STATEMENT_LEFT_ELEMENT_ID_PREFIX\r\n : STATEMENT_ELEMENT_ID_PREFIX;\r\n\r\n const {\r\n selectedProject: { id },\r\n statementSummary: {\r\n statementSummaryElementsDisplay: { displayElementDetailsOnStatementPage },\r\n },\r\n } = data;\r\n\r\n //side-by-side view\r\n const hasPermission =\r\n Permissions.SideBySideStatementViewPermissions.canSelectElement(id);\r\n\r\n const { handleMouseEnter, handleMouseLeave } = useHoverEffect(\r\n TIEOUT_ELEMENT_CLASS,\r\n elementDetails.id,\r\n );\r\n\r\n const isPreviewPage = isElementReportPreviewPage(url);\r\n const isElementSelected = useMemo(() => {\r\n if (isPreviewPage) {\r\n return (\r\n reportPreviewPage.selectedElementId !== null &&\r\n elementDetails.id === reportPreviewPage.selectedElementId &&\r\n !reportPreviewPage.isClickedOnReport\r\n );\r\n } else if (blacklineViewMode) {\r\n const { addedOrChanged } = blacklineHighlightedElementId;\r\n if (addedOrChanged) {\r\n return (\r\n !isLeftView &&\r\n blacklineViewShowElementMode &&\r\n elementDetails.id === addedOrChanged\r\n );\r\n }\r\n\r\n return false;\r\n } else if (isLeftView) {\r\n return leftSelectedElementsMap.has(elementDetails.id);\r\n } else {\r\n return selectedElementsMap.has(elementDetails.id);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [\r\n blacklineViewMode,\r\n blacklineViewShowElementMode,\r\n elementDetails.id,\r\n isLeftView,\r\n isPreviewPage,\r\n leftSelectedElementsMap,\r\n reportPreviewPage.isClickedOnReport,\r\n reportPreviewPage.selectedElementId,\r\n blacklineHighlightedElementId.deleted,\r\n blacklineHighlightedElementId.addedOrChanged,\r\n selectedElementsMap,\r\n ]);\r\n\r\n //side-by-side view\r\n const _shouldEnableTargetElementForSelection = (elementId) => {\r\n if (isSideBySideView && !isLeftView && sideBySideElementMap) {\r\n return (\r\n sideBySideElementMap.mapKeyOfFirstUnmappedTargetElement ||\r\n sideBySideElementMap.getTargetElementMapByElementId(elementId)\r\n );\r\n }\r\n };\r\n\r\n //side-by-side view\r\n const isSideBySideViewDisabled = (elementId) =>\r\n isSideBySideView\r\n ? isLeftView\r\n ? !hasPermission\r\n : !(hasPermission && _shouldEnableTargetElementForSelection(elementId))\r\n : false;\r\n\r\n const isElementHighlighted = useMemo(() => {\r\n return isPreviewPage\r\n ? reportPreviewPage.selectedElementId === elementDetails.id &&\r\n reportPreviewPage.isClickedOnReport\r\n : false;\r\n }, [\r\n elementDetails.id,\r\n isPreviewPage,\r\n reportPreviewPage.isClickedOnReport,\r\n reportPreviewPage.selectedElementId,\r\n ]);\r\n\r\n const elementHighlightState = () => {\r\n return isLeftView\r\n ? leftSelectedElementsMap.getElementHighlightColor(elementDetails.id)\r\n : selectedElementsMap.getElementHighlightColor(elementDetails.id);\r\n };\r\n\r\n const { polygonWidth, polygonHeight, polygonLeft, polygonTop } =\r\n getElementBoundaryInfo(polygonInPixel);\r\n\r\n const styles = {\r\n cursor:\r\n !isSideBySideView && isModeForAddCursor(selectMode) ? 'alias' : 'pointer',\r\n top: polygonTop,\r\n left: polygonLeft,\r\n width: polygonWidth,\r\n height: polygonHeight,\r\n };\r\n\r\n //side-by-side view\r\n const getCountForSelectedElementForSideBySideMapping = (elementId) => {\r\n if (isSideBySideView) {\r\n if (isLeftView) {\r\n return (\r\n sideBySideElementMap &&\r\n sideBySideElementMap.getCountForMappedSourceElement(elementId)\r\n );\r\n }\r\n return (\r\n sideBySideElementMap &&\r\n sideBySideElementMap.getCountForMappedTargetElement(elementId)\r\n );\r\n } else return null;\r\n };\r\n\r\n const _countForSelectedElementForSideBySideMapping =\r\n getCountForSelectedElementForSideBySideMapping(elementDetails.id);\r\n\r\n //side-by-side view\r\n const getCountForSelectedElement = () => {\r\n const elementCount =\r\n sideBySideElementMap && sideBySideElementMap.getCountOfElementsSelected();\r\n return elementCount + 1;\r\n };\r\n\r\n const onClick = (e, elementDetails) => {\r\n e.stopPropagation();\r\n clearSelection();\r\n if (isSideBySideView && hasPermission) {\r\n //side-by-side view\r\n if (getCountForSelectedElement() <= ElementSelectionLimit) {\r\n if (isLeftView)\r\n dispatch(setSourceStatementElementMapAction(elementDetails));\r\n else\r\n _shouldEnableTargetElementForSelection(elementDetails.id) &&\r\n dispatch(setTargetStatementElementMapAction(elementDetails));\r\n } else {\r\n getExcessiveElementSelectionNotification(ElementSelectionLimit);\r\n }\r\n } else {\r\n if (elementDetails) {\r\n const { id, sectionId } = elementDetails;\r\n if (isPreviewPage) {\r\n dispatch(\r\n setSelectedElementDetails({\r\n selectedElementId: id,\r\n isClickedOnReport: false,\r\n }),\r\n );\r\n } else if (!isPreviewPage && !blacklineViewMode) {\r\n dispatch(\r\n onElementClick({ elementId: id, sectionId, isDisabled: false }),\r\n );\r\n }\r\n }\r\n }\r\n };\r\n\r\n const isElementSelectedForSideBySideMap = (elementId) => {\r\n if (isSideBySideView) {\r\n if (isLeftView) {\r\n return (\r\n sideBySideElementMap &&\r\n sideBySideElementMap.getSourceElementMapByElementId(elementId)\r\n );\r\n }\r\n return (\r\n sideBySideElementMap &&\r\n sideBySideElementMap.getTargetElementMapByElementId(elementId)\r\n );\r\n } else return false;\r\n };\r\n\r\n const { isReviewed, isVerified, isUnverified, isSelected, isHighlighted } =\r\n getElementHighlightStatus({\r\n elementDetails,\r\n isElementSelected,\r\n isElementHighlighted,\r\n isPreviewPage,\r\n showElementStatusAndFlag,\r\n reportPreviewPage,\r\n blacklineViewMode,\r\n });\r\n\r\n //side-by-side view\r\n const numberOfSourceElementSelected =\r\n sideBySideElementMap && sideBySideElementMap.sizeOfSourceMapping;\r\n const numberOfTargetElementSelected =\r\n sideBySideElementMap && sideBySideElementMap.sizeOfTargetMapping;\r\n\r\n //side-by-side view\r\n const isCursorAlias =\r\n isSideBySideView && hasPermission // return true if user has permission to the respective statement for elements mapping in side-by-side view\r\n ? isLeftView // returns true if it is left side statement in side-by-side view\r\n ? true\r\n : numberOfSourceElementSelected > numberOfTargetElementSelected // returns true if number of selected source elements is greater than number of selected target elements to change the pointer(disabled to selection pointer) of right statement accordingly in side-by-side view\r\n : false;\r\n\r\n const modifier = getCssModifierForView(\r\n url,\r\n blacklineViewMode,\r\n blacklineViewShowElementMode,\r\n );\r\n\r\n const handleIndicatorOnHover = (elementId, showCallout) => {\r\n if (!annotationDisplayFilter.showAll) {\r\n const initialCalloutVisibilityDetails = {\r\n displayMarker: !annotation['marker'],\r\n displayCallout: !annotation['callout'],\r\n displayAnnotation: !annotation['display'],\r\n };\r\n\r\n const { displayCallout, displayAnnotation } = getCalloutVisibilityDetails(\r\n initialCalloutVisibilityDetails,\r\n annotation.annotationsConfig,\r\n annotationDisplayFilter,\r\n );\r\n\r\n if (!(displayCallout || displayAnnotation)) {\r\n showCallout = false;\r\n }\r\n dispatch(\r\n updateSideBySideElementCacheByCallouts({\r\n elementIds: [elementId],\r\n showCallout,\r\n isLeftSideView: isLeftView,\r\n }),\r\n );\r\n }\r\n };\r\n\r\n const isFeatureFlagEnabledForComfortAssigned = dispatch(\r\n checkIfFeatureFlagEnabled({\r\n featureName: FEATURE_NAMES.COMFORT_ASSIGNED_FEATURE,\r\n }),\r\n );\r\n const showComfortAssignedStatus =\r\n showElementStatusAndFlag &&\r\n isFeatureFlagEnabledForComfortAssigned &&\r\n elementDetails &&\r\n elementDetails.isComfortAssign();\r\n\r\n const getElementCSSFromSelectedElementMap = () => {\r\n switch (true) {\r\n case elementHighlightState() === ELEMENT_HIGHLIGHT_STATES.POST_BATCH:\r\n return `${TIEOUT_ELEMENT}_added`;\r\n case elementHighlightState() ===\r\n ELEMENT_HIGHLIGHT_STATES.ELEMENT_MAP_SUCCESS:\r\n return `${TIEOUT_ELEMENT}_side-by-side-map-success`;\r\n case elementHighlightState() ===\r\n ELEMENT_HIGHLIGHT_STATES.ELEMENT_MAP_FAILURE:\r\n return `${TIEOUT_ELEMENT}_side-by-side-map-failure`;\r\n default:\r\n return '';\r\n }\r\n };\r\n\r\n const renderElements = () => (\r\n <>\r\n {!isNullOrUndefined(_countForSelectedElementForSideBySideMapping) ? (\r\n
          \r\n onClick(e, elementDetails)}\r\n onMouseEnter={() => {\r\n handleIndicatorOnHover(elementDetails.id, true);\r\n }}\r\n onMouseLeave={() => {\r\n handleIndicatorOnHover(elementDetails.id, false);\r\n }}\r\n >
          \r\n
          \r\n \r\n {_countForSelectedElementForSideBySideMapping}\r\n \r\n
          \r\n \r\n ) : (\r\n e.stopPropagation()}\r\n onClick={(e) => onClick(e, elementDetails)}\r\n onMouseEnter={() => {\r\n handleIndicatorOnHover(elementDetails.id, true);\r\n handleMouseEnter();\r\n }}\r\n onMouseLeave={() => {\r\n if (\r\n !annotationDisplayFilter.expandAllElements ||\r\n !isElementSelected\r\n ) {\r\n handleIndicatorOnHover(elementDetails.id, false);\r\n }\r\n handleMouseLeave();\r\n }}\r\n >\r\n )}\r\n \r\n );\r\n\r\n return (\r\n <>\r\n {polygonInPixel && polygonInPixel.length ? (\r\n <>\r\n {showElementStatusAndFlag && displayElementDetailsOnStatementPage && (\r\n \r\n )}\r\n {tooltip ? (\r\n \r\n {renderElements()}\r\n \r\n ) : (\r\n renderElements()\r\n )}\r\n \r\n ) : null}\r\n \r\n );\r\n};\r\nexport default TieoutElementOCR;\r\n\r\nTieoutElementOCR.propTypes = {\r\n /** func to clear text selection */\r\n clearSelection: PropTypes.func.isRequired,\r\n /** Element details object */\r\n elementDetails: PropTypes.object.isRequired,\r\n /** Array containing boundary information */\r\n polygonInPixel: PropTypes.array,\r\n /** Object containing config of tooltip */\r\n tooltip: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]),\r\n /** Boolean to decide the visibility of element status */\r\n showElementStatusAndFlag: PropTypes.bool,\r\n /** Object containing the filter config from summary bar */\r\n annotationDisplayFilter: PropTypes.object.isRequired,\r\n /** Object having properties fordisplaying marker or callout */\r\n annotation: PropTypes.object.isRequired,\r\n /** Booloean to check left or right view */\r\n isLeftView: PropTypes.bool,\r\n};\r\n","import React from 'react';\r\nimport TieoutElementOCR from 'components/feature/statement-content-panel/tieout-elements-component-ocr';\r\nimport { useSelector } from 'react-redux';\r\nimport { hoverCopyFormulaDisabledTooltip } from 'constants/feature/tieout-element-constants';\r\n\r\nconst StatementContentOverlayElementMap = ({\r\n clearSelection,\r\n element,\r\n polygonInPixel,\r\n showElementStatusAndFlag,\r\n annotationDisplayFilter,\r\n annotation,\r\n isLeftView,\r\n}) => {\r\n const { data } = useSelector((store) => store);\r\n\r\n const {\r\n copyFormula: { tableMatrix },\r\n } = data;\r\n\r\n const isPartOfTableMatrix = () => {\r\n if (tableMatrix.length > 0) {\r\n return !!tableMatrix[element.id];\r\n } else {\r\n // Since Formula is not copied - tableMatrix size is zero\r\n return true;\r\n }\r\n };\r\n\r\n const tooltip = !isPartOfTableMatrix()\r\n ? hoverCopyFormulaDisabledTooltip\r\n : false;\r\n\r\n return (\r\n \r\n );\r\n};\r\nexport default StatementContentOverlayElementMap;\r\n","import React, { useEffect, useState } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport TieoutCalloutElementOCR from './tieout-callout-element-component-ocr';\r\nimport StatementContentOverlayElementMap from './section-content-overlay-element-map';\r\nimport {\r\n getCalloutVisibilityDetails,\r\n hasAnnotations,\r\n getInitialCalloutVisibilityDetails,\r\n} from 'utils/ocr-annotation-utils';\r\n\r\nconst ElementDetailsOCR = ({\r\n polygonInPixel,\r\n element,\r\n BLOCK,\r\n sectionId,\r\n markerDisplayValue,\r\n clearSelection,\r\n calloutDisplayValue,\r\n showElementStatusAndFlag,\r\n isPreviewPage,\r\n isLeftView,\r\n showIcon,\r\n canvasID,\r\n}) => {\r\n const {\r\n annotationDisplayOptions: annotationDisplayFilter,\r\n statementSummary: {\r\n annotationPosition,\r\n statementSummaryElementsDisplay: { displayElementDetailsOnStatementPage },\r\n },\r\n selectedStatement: { isOCR, isCftEnabled },\r\n } = useSelector((store) => store.data);\r\n\r\n const [annotation, setAnnotation] = useState({});\r\n\r\n useEffect(() => {\r\n const annotationsConfig = {\r\n tickmarks: element.hasTickmarks(),\r\n formula: element.hasFormula(),\r\n internalRef: element.hasInternalReferenceGroup(),\r\n workpaper: element.hasWorkpapers(),\r\n comfortLetter: element.hasComfortLetters(),\r\n };\r\n const config = {\r\n marker: element.marker,\r\n callout: element.callout,\r\n display: false,\r\n };\r\n const initialCalloutVisibilityDetails = getInitialCalloutVisibilityDetails(\r\n config,\r\n annotationDisplayFilter,\r\n );\r\n const calloutVisibilityDetails = getCalloutVisibilityDetails(\r\n initialCalloutVisibilityDetails,\r\n annotationsConfig,\r\n annotationDisplayFilter,\r\n );\r\n\r\n setAnnotation({\r\n elementDetails: element,\r\n elementId: element.id,\r\n display: calloutVisibilityDetails.displayAnnotation,\r\n marker: isNullOrUndefined(markerDisplayValue)\r\n ? calloutVisibilityDetails.displayMarker\r\n : markerDisplayValue,\r\n callout: isNullOrUndefined(markerDisplayValue)\r\n ? calloutVisibilityDetails.displayCallout\r\n : calloutDisplayValue,\r\n annotationsConfig,\r\n showAll: false,\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [element, calloutDisplayValue]);\r\n\r\n return (\r\n <>\r\n \r\n {(hasAnnotations(element, isCftEnabled) || isPreviewPage) &&\r\n showIcon &&\r\n displayElementDetailsOnStatementPage && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default ElementDetailsOCR;\r\n","import React from 'react';\r\nimport RenderPolygonBasedStatementDetails from 'utils/ocr-statement-details-utils';\r\nimport ElementDetailsOCR from './element-details-ocr';\r\nimport { hasAnnotations } from 'utils/ocr-annotation-utils';\r\nimport { useSelector } from 'react-redux';\r\n\r\nconst ElementDetailsContainerOCR = ({\r\n elementList,\r\n scale,\r\n clearSelection,\r\n isPreviewPage,\r\n BLOCK,\r\n markerDisplayValue,\r\n calloutDisplayValue,\r\n sectionId,\r\n showElementStatusAndFlag = true,\r\n isLeftView,\r\n canvasID,\r\n}) => {\r\n const { data } = useSelector((store) => store);\r\n const {\r\n statementSummary: {\r\n annotationPosition: { position },\r\n },\r\n selectedStatement: { isCftEnabled },\r\n } = data;\r\n\r\n const pageElements = [];\r\n !!elementList.length &&\r\n elementList.forEach((element) => {\r\n if (element.isIncluded) {\r\n const { coordinatesInPixel } = element;\r\n\r\n let loopCount = null;\r\n\r\n if (hasAnnotations(element, isCftEnabled) || isPreviewPage) {\r\n switch (position) {\r\n case 'left':\r\n loopCount = 0;\r\n break;\r\n case 'top':\r\n loopCount = 0;\r\n break;\r\n case 'right':\r\n loopCount = coordinatesInPixel.length - 1;\r\n break;\r\n case 'bottom':\r\n loopCount = coordinatesInPixel.length - 1;\r\n break;\r\n default:\r\n loopCount = 0;\r\n break;\r\n }\r\n }\r\n\r\n pageElements.push(\r\n \r\n \r\n ,\r\n );\r\n }\r\n });\r\n\r\n return <>{pageElements};\r\n};\r\n\r\nexport default ElementDetailsContainerOCR;\r\n","import React from 'react';\r\nimport classnames from 'classnames';\r\nimport { useSelector } from 'react-redux';\r\nimport {\r\n getElementBoundaryInfo,\r\n isPolygonExistInElementList,\r\n} from 'utils/ocr-element-utils';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nconst BLACKLINE_VIEW_CHANGES_BLOCK = 'blackline_view_changes';\r\nconst BLACKLINE_VIEW_CHANGES_BLOCK_ID = 'blackline_view_changes_id';\r\nconst BLACKLINE_VIEW_CHANGE_TYPE = {\r\n ADDED: 'Added',\r\n CHANGED: 'Changed',\r\n DELETED: 'Deleted',\r\n};\r\n\r\nconst BlacklineViewChanges = ({\r\n isSectionLoaded,\r\n elementList,\r\n isLeftView,\r\n scaleWithZoom,\r\n blacklineCache = {},\r\n dpi,\r\n}) => {\r\n const { ui } = useSelector((store) => store);\r\n const {\r\n modes: { blacklineViewShowElementMode },\r\n blacklineHighlightedElementId,\r\n } = ui.statementPage;\r\n\r\n const { blacklineDetails = {} } = blacklineCache;\r\n const { blacklineChanges = [] } = blacklineDetails;\r\n const { addedOrChanged } = blacklineHighlightedElementId;\r\n\r\n if (blacklineCache.isLoaded && isSectionLoaded) {\r\n const blacklineDataToHTMLMap = blacklineChanges.map(({ polygon, type }) => {\r\n const blacklinePolygon = JSON.parse(polygon);\r\n const polygonInPixel = blacklinePolygon.map((coord) => {\r\n return parseFloat(coord) * dpi * scaleWithZoom;\r\n });\r\n const { isElement, elementId } = isPolygonExistInElementList(\r\n elementList,\r\n polygonInPixel,\r\n scaleWithZoom,\r\n );\r\n const { polygonWidth, polygonHeight, polygonLeft, polygonTop } =\r\n getElementBoundaryInfo(polygonInPixel);\r\n const styles = {\r\n position: 'absolute',\r\n zIndex: blacklineViewShowElementMode ? 40 : 50,\r\n top: polygonTop,\r\n left: polygonLeft,\r\n width: polygonWidth,\r\n height: polygonHeight,\r\n };\r\n\r\n let isElementHighlighted = false;\r\n if(blacklineViewShowElementMode) {\r\n isElementHighlighted = false;\r\n } else {\r\n if(addedOrChanged && isElement) {\r\n isElementHighlighted = elementId === addedOrChanged && !isLeftView;\r\n }\r\n }\r\n\r\n\r\n return (\r\n {\r\n isElement &&\r\n e.target.classList.add(`${BLACKLINE_VIEW_CHANGES_BLOCK}--hover`);\r\n }}\r\n onMouseLeave={(e) => {\r\n isElement &&\r\n e.target.classList.remove(\r\n `${BLACKLINE_VIEW_CHANGES_BLOCK}--hover`,\r\n );\r\n }}\r\n >\r\n );\r\n });\r\n\r\n return <>{blacklineDataToHTMLMap};\r\n }\r\n return null;\r\n};\r\n\r\nexport default BlacklineViewChanges;\r\n","import React from 'react';\r\nimport {\r\n getNoteStatusIcon,\r\n getNoteStatusColor,\r\n} from 'constants/feature/notes-panel-constants';\r\nimport useOutsideClick from 'components/hooks/useOutsideClick';\r\nimport useHoverEffect from 'components/hooks/useHoverEffects';\r\nimport classnames from 'classnames';\r\nimport { STATEMENT_PSEUDO_ELEMENT_ID_PREFIX } from 'constants/feature/statement-content-constants';\r\n\r\nconst MAX_POLYGON_WIDTH = 5;\r\nconst PADDING = 6;\r\nconst FIXED_SIZE = 20;\r\nconst BORDER_THICKNESS = '1px';\r\nconst newColor = 'rgba(216, 221, 64, 0.7)';\r\nconst NoteSelectedColor = 'rgba(0, 0, 0, 0.1)';\r\nconst NOTE_ANCHOR_BLOCK = 'note-anchor';\r\nconst NOTE_DETAILS_OCR = 'note-details-ocr';\r\n\r\nconst highlightNotes = ({ isNoteNew, isNotesPanelOpen, isNoteSelected }) => {\r\n if (isNotesPanelOpen && isNoteSelected && !isNoteNew) {\r\n return NoteSelectedColor;\r\n }\r\n if (isNoteSelected && isNoteNew) {\r\n return newColor;\r\n }\r\n return 'unset';\r\n};\r\n\r\nconst NoteDetailsOcr = ({\r\n polygonInPixel,\r\n note,\r\n showIcon,\r\n isNoteSelected,\r\n onNoteClick,\r\n selectMode,\r\n pseudoElementId,\r\n handleNoteClick,\r\n isNoteNew,\r\n panelSelected,\r\n isNotesPanelOpen,\r\n changeIsNewPropertyFromSelectedNote,\r\n isCursorAlias,\r\n shouldNotesDisabled,\r\n}) => {\r\n const polygonWidth = polygonInPixel[2] - polygonInPixel[0];\r\n const polygonHeight = polygonInPixel[7] - polygonInPixel[1];\r\n const updatedPolygonWidth =\r\n polygonWidth > MAX_POLYGON_WIDTH ? polygonWidth : polygonWidth + PADDING;\r\n const updatedPolygonHeight =\r\n polygonHeight > MAX_POLYGON_WIDTH ? polygonHeight : polygonHeight + PADDING;\r\n const polygonTop =\r\n polygonHeight > MAX_POLYGON_WIDTH\r\n ? polygonInPixel[1]\r\n : polygonInPixel[1] - PADDING / 2;\r\n const polygonLeft =\r\n polygonWidth > MAX_POLYGON_WIDTH\r\n ? polygonInPixel[0]\r\n : polygonInPixel[0] - PADDING / 2;\r\n\r\n const [noteElement] = useOutsideClick(\r\n () => isNoteNew && changeIsNewPropertyFromSelectedNote(false),\r\n );\r\n\r\n let remainingSpaceToAddOrSubtract = updatedPolygonHeight - 20;\r\n\r\n const styles = {\r\n top: polygonTop,\r\n left: polygonLeft,\r\n width: updatedPolygonWidth,\r\n height: updatedPolygonHeight,\r\n border: `${BORDER_THICKNESS} solid ${getNoteStatusColor({ note })}`,\r\n backgroundColor: highlightNotes({\r\n isNoteNew,\r\n panelSelected,\r\n isNotesPanelOpen,\r\n isNoteSelected,\r\n }),\r\n };\r\n\r\n const { handleMouseEnter, handleMouseLeave } = useHoverEffect(\r\n `${NOTE_DETAILS_OCR}`,\r\n note.noteId,\r\n );\r\n\r\n const iconProps = {\r\n onMouseDown: (e) => {\r\n e.stopPropagation();\r\n },\r\n onClick: (event) => {\r\n handleNoteClick(event, selectMode, note, pseudoElementId, onNoteClick);\r\n },\r\n onMouseEnter: () => {\r\n handleMouseEnter();\r\n },\r\n onMouseLeave: () => {\r\n handleMouseLeave();\r\n },\r\n height: FIXED_SIZE,\r\n width: FIXED_SIZE,\r\n };\r\n\r\n const notesCursor = {\r\n className: classnames(\r\n isCursorAlias && `${NOTE_ANCHOR_BLOCK}--cursor-alias`,\r\n shouldNotesDisabled && `${NOTE_ANCHOR_BLOCK}--disabled`,\r\n ),\r\n };\r\n\r\n return (\r\n <>\r\n \r\n {showIcon && (\r\n \r\n {getNoteStatusIcon({ note, iconProps, notesCursor })}\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default NoteDetailsOcr;\r\n","import React from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport NoteDetailsOcr from './note-details-ocr';\r\nimport RenderPolygonBasedStatementDetails from 'utils/ocr-statement-details-utils';\r\nimport { useLocation } from 'react-router-dom';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport {\r\n toggleInternalReferenceCancelModal,\r\n toggleFormulaCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\nimport { selectNoteFromContentPanel as onNoteClick } from 'store/actions/notes-panel-actions';\r\nimport { useDispatch } from 'react-redux';\r\nimport { changeIsNewPropertyFromSelectedNote } from 'store/actions/notes-panel-actions';\r\n\r\nconst NotesDetailsContainerOCR = ({ notesList, scale, dpi, leftSideView }) => {\r\n const pathName = useLocation().pathname;\r\n const dispatch = useDispatch();\r\n\r\n const {\r\n data: {\r\n statementSummary: {\r\n statementSummaryElementsDisplay: {\r\n displayElementDetailsOnStatementPage,\r\n },\r\n },\r\n notesPanel: { selectedNote },\r\n annotationDisplayOptions: annotationDisplayFilter,\r\n },\r\n ui: {\r\n statementPage: {\r\n modes: { selectMode },\r\n panels: { right },\r\n },\r\n },\r\n } = useSelector((state) => state);\r\n\r\n const handleNoteClick = (\r\n event,\r\n selectMode,\r\n note,\r\n pseudoElementId,\r\n onNoteClick,\r\n ) => {\r\n if (pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE)) {\r\n return () => {};\r\n } else {\r\n return onClick(event, selectMode, note, pseudoElementId, onNoteClick);\r\n }\r\n };\r\n\r\n const onClick = (event, selectMode, note, pseudoElementId, onNoteClick) => {\r\n if (selectMode === ELEMENT_SELECT_MODES.FORMULA.title) {\r\n dispatch(toggleFormulaCancelModal(true));\r\n dispatch(\r\n storeSelectedNoteId(note.elementId === null ? -1 : note.elementId),\r\n );\r\n dispatch(storeSelectedNotePseudoId(pseudoElementId));\r\n dispatch(openCancelModalAfterModalConfirm(true));\r\n } else if (selectMode === ELEMENT_SELECT_MODES.INTERNAL_REFERENCE.title) {\r\n dispatch(toggleInternalReferenceCancelModal(true));\r\n dispatch(openCancelModalAfterModalConfirm(true));\r\n dispatch(\r\n storeSelectedNoteId(note.elementId === null ? -1 : note.elementId),\r\n );\r\n dispatch(storeSelectedNotePseudoId(pseudoElementId));\r\n } else {\r\n if (event) {\r\n event.stopPropagation();\r\n }\r\n dispatch(\r\n onNoteClick({\r\n elementId: note.elementId === null ? -1 : note.elementId,\r\n pseudoElementId,\r\n }),\r\n );\r\n }\r\n };\r\n\r\n const pageNotes = [];\r\n\r\n !!notesList.length &&\r\n notesList.map((note) => {\r\n if (!note.ghost) {\r\n const {\r\n ocrSelector: { polygon },\r\n } = note;\r\n\r\n let loopCount = polygon.length - 1;\r\n\r\n displayElementDetailsOnStatementPage &&\r\n annotationDisplayFilter.note &&\r\n pageNotes.push(\r\n \r\n \r\n dispatch(changeIsNewPropertyFromSelectedNote(false))\r\n }\r\n isCursorAlias={leftSideView}\r\n shouldNotesDisabled={\r\n pathName.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE)\r\n ? !leftSideView\r\n : leftSideView\r\n }\r\n />\r\n ,\r\n );\r\n }\r\n });\r\n\r\n return <>{pageNotes};\r\n};\r\n\r\nexport default NotesDetailsContainerOCR;\r\n","import React, { memo } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport ContentSearchResults from 'models/api/statement-content-search-results-api-model';\r\nimport {\r\n scrollOCRSelectorIntoView,\r\n scrollSelectorIntoView,\r\n} from 'utils/scrolling-utils';\r\nimport {\r\n setContentHighlightSelector,\r\n deallocateItems,\r\n} from 'store/actions/statement-content-actions';\r\nimport { ContentSectionMap } from 'models/api/content-section-map-api-model';\r\n\r\nexport const CONTENT_SEARCH_BLOCK = 'statement-content-search';\r\nexport const CONTENT_SEARCH_ID_BLOCK = 'statement-content-search-id';\r\n\r\nconst StatementContentSearchResults = ({\r\n searchResultsContent,\r\n searchTerm,\r\n setContentHighlightSelector,\r\n contentSectionMap,\r\n setActiveEntry,\r\n deallocateItems,\r\n isOCR,\r\n}) => {\r\n if (!searchResultsContent.isInitiated()) {\r\n return (\r\n
          \r\n \r\n
          \r\n );\r\n }\r\n\r\n if (\r\n searchResultsContent.isLoaded &&\r\n searchResultsContent.totalOverallResults === 0\r\n ) {\r\n return (\r\n
          \r\n \r\n
          \r\n );\r\n }\r\n\r\n return (\r\n \r\n {searchResultsContent.occurrences.map((entry, index) => {\r\n const { sectionId, selector, context } = entry;\r\n const sectionData = contentSectionMap.getClosestBookmarkSection({\r\n sectionId,\r\n });\r\n const CONTENT_SEARCH_RESULT_BLOCK = `${CONTENT_SEARCH_BLOCK}__entry`;\r\n const regex = new RegExp(\r\n searchTerm.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'),\r\n 'gi',\r\n );\r\n return (\r\n {\r\n isOCR\r\n ? scrollOCRSelectorIntoView(entry)\r\n : scrollSelectorIntoView(entry);\r\n deallocateItems();\r\n !isOCR && setContentHighlightSelector({ sectionId, selector });\r\n setActiveEntry(index);\r\n }}\r\n title={!isOCR ? sectionData.name : sectionId}\r\n className={classnames(\r\n CONTENT_SEARCH_RESULT_BLOCK,\r\n searchResultsContent.selectedIndex === index\r\n ? `${CONTENT_SEARCH_RESULT_BLOCK}--active`\r\n : null,\r\n )}\r\n dangerouslySetInnerHTML={{\r\n __html: isOCR ? context.replace(regex, '$&') : context,\r\n }}\r\n />\r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nStatementContentSearchResults.propTypes = {\r\n /** Search string */\r\n searchTerm: PropTypes.string.isRequired,\r\n /** Api model of search results */\r\n searchResultsContent: PropTypes.instanceOf(ContentSearchResults).isRequired,\r\n /** function fired to set the content highlight selector */\r\n setContentHighlightSelector: PropTypes.func.isRequired,\r\n /** Map of content section id to section meta-data used for populating results tooltip */\r\n contentSectionMap: PropTypes.instanceOf(ContentSectionMap).isRequired,\r\n /** Set a content search result as actively selected */\r\n setActiveEntry: PropTypes.func.isRequired,\r\n /* function to deallocate all the elements, sections, notes or items on content panel */\r\n deallocateItems: PropTypes.func.isRequired,\r\n};\r\n\r\nexport { StatementContentSearchResults };\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n statementContent: {\r\n sectionsCache: { contentSectionMap },\r\n },\r\n selectedStatement: { isOCR },\r\n },\r\n}) => ({ contentSectionMap, isOCR });\r\n\r\nconst mapDispatchToProps = {\r\n setContentHighlightSelector,\r\n deallocateItems,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(memo(StatementContentSearchResults));\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n CONTENT_SEARCH_BLOCK,\r\n CONTENT_SEARCH_ID_BLOCK,\r\n} from '../toolkit/statement-nav/statement-nav-content-search-results-component';\r\n\r\nconst MAX_POLYGON_WIDTH = 5;\r\nconst PADDING = 6;\r\n\r\nconst TieoutContentSearchOCR = ({\r\n contentDetails,\r\n polygonInPixel,\r\n contentSearchResult,\r\n index,\r\n}) => {\r\n const polygonWidth = polygonInPixel[2] - polygonInPixel[0];\r\n const polygonHeight = polygonInPixel[7] - polygonInPixel[1];\r\n\r\n const updatedPolygonWidth =\r\n polygonWidth > MAX_POLYGON_WIDTH ? polygonWidth : polygonWidth + PADDING;\r\n const updatedPolygonHeight =\r\n polygonHeight > MAX_POLYGON_WIDTH ? polygonHeight : polygonHeight + PADDING;\r\n const polygonTop =\r\n polygonHeight > MAX_POLYGON_WIDTH\r\n ? polygonInPixel[1]\r\n : polygonInPixel[1] - PADDING / 2;\r\n const polygonLeft =\r\n polygonWidth > MAX_POLYGON_WIDTH\r\n ? polygonInPixel[0]\r\n : polygonInPixel[0] - PADDING / 2;\r\n\r\n const styles = {\r\n position: 'absolute',\r\n zIndex: 50,\r\n top: polygonTop,\r\n left: polygonLeft,\r\n width: updatedPolygonWidth,\r\n height: updatedPolygonHeight,\r\n };\r\n const CONTENT_SEARCH_RESULT_BLOCK = `${CONTENT_SEARCH_BLOCK}__entry-ocr`;\r\n const renderElements = () => (\r\n e.stopPropagation()}\r\n >\r\n );\r\n\r\n return (\r\n <>\r\n {polygonInPixel && polygonInPixel.length ? <>{renderElements()} : null}\r\n \r\n );\r\n};\r\nexport default TieoutContentSearchOCR;\r\n","import React from 'react';\r\nimport TieoutContentSearchOCR from 'components/feature/statement-content-panel/tieout-content-search-component-ocr';\r\n\r\nconst StatementContentSearchOverlayMap = ({\r\n content,\r\n polygonInPixel,\r\n contentSearchResult,\r\n index,\r\n}) => {\r\n return (\r\n \r\n );\r\n};\r\nexport default StatementContentSearchOverlayMap;\r\n","import React from 'react';\r\nimport RenderPolygonBasedStatementDetails from 'utils/ocr-statement-details-utils';\r\nimport StatementContentSearchOverlayMap from './section-content-search-overlay-map';\r\n\r\nconst StatementContentSearchComponentOCR = ({\r\n contentSearchResult,\r\n scale,\r\n dpi,\r\n pageSectionId,\r\n}) => {\r\n const pageElements = [];\r\n contentSearchResult.isLoaded &&\r\n !!contentSearchResult.occurrences.length &&\r\n contentSearchResult.occurrences.forEach((content, index) => {\r\n const { polygonDetails, sectionId } = content;\r\n const polygonInPixel =\r\n polygonDetails.length &&\r\n polygonDetails.map((subArr) =>\r\n Array.isArray(subArr)\r\n ? subArr.map((element) => element * dpi)\r\n : subArr * dpi,\r\n );\r\n pageSectionId === sectionId &&\r\n pageElements.push(\r\n \r\n \r\n ,\r\n );\r\n });\r\n return <>{pageElements};\r\n};\r\n\r\nexport default StatementContentSearchComponentOCR;\r\n","import React, { useEffect, useRef } from 'react';\r\nimport { useDispatch, useSelector } from 'react-redux';\r\nimport { useLocation } from 'react-router-dom';\r\nimport {\r\n fetchAllOCRSectionRenderingData,\r\n fetchCurrentBlacklineDataBySectionOCR,\r\n fetchPreviousBlacklineDataBySectionOCR,\r\n} from 'store/actions/statement-content-actions-ocr';\r\nimport { isElementReportPreviewPage } from 'utils/ocr-annotation-utils';\r\nimport StatementContextMenu from './statement-context-menu-ocr';\r\nimport HtmlOverlay from './html-overlay';\r\nimport ElementDetailsContainerOCR from './element-details-container-ocr';\r\nimport classNames from 'classnames';\r\nimport BlacklineViewChanges from './blackline-view-changes-ocr';\r\nimport NotesDetailsContainerOCR from './notes-details-container-ocr';\r\nimport StatementContentSearchComponentOCR from './statement-content-search-component-ocr';\r\nimport { OCR_CONTAINER_BLOCK } from 'constants/feature/statement-content-constants';\r\nimport {\r\n isModeForAddCursor,\r\n shouldElementBatchSelection,\r\n} from 'utils/modes-utils';\r\n\r\nconst SectionContentOverlayOCR = ({\r\n BLOCK,\r\n shouldShow,\r\n elementList,\r\n setShouldShow,\r\n sectionMetaData,\r\n isSectionLoaded,\r\n box,\r\n ocrWords,\r\n overlayCanvas,\r\n contextMenuData,\r\n isDrawing,\r\n isContentPanelScrolling,\r\n isBatchModeSelected,\r\n annotationsList,\r\n scaleWithZoom,\r\n clearSelection,\r\n markerDisplayValue,\r\n calloutDisplayValue,\r\n showElementStatusAndFlag = true,\r\n isLeftView,\r\n blacklineViewMode,\r\n isSideBySideView,\r\n numberOfSourceElementSelected,\r\n numberOfTargetElementSelected,\r\n notesList,\r\n contentSearchResult,\r\n dpi,\r\n setSectionInView,\r\n clearSectionInView,\r\n blacklineCache,\r\n blacklineGuidDetails,\r\n}) => {\r\n const canvasID = isLeftView\r\n ? `canvas-left-${sectionMetaData.sectionId}`\r\n : `canvas-${sectionMetaData.sectionId}`;\r\n const SEGMENT_LOADING_HEIGHT = 600; // px\r\n const dispatch = useDispatch();\r\n const url = useLocation().pathname;\r\n const isPreviewPage = isElementReportPreviewPage(url);\r\n const isApiCallMadeToRenderSection = useRef(false);\r\n\r\n const { ui } = useSelector((store) => store);\r\n const {\r\n statementPage: {\r\n modes: { selectMode },\r\n },\r\n } = ui;\r\n\r\n //Fetch the OCR section.\r\n useEffect(() => {\r\n const _shouldFetchSection =\r\n !isApiCallMadeToRenderSection.current &&\r\n shouldShow &&\r\n !isSectionLoaded &&\r\n !isContentPanelScrolling;\r\n if (_shouldFetchSection) {\r\n dispatch(\r\n fetchAllOCRSectionRenderingData({\r\n sectionMetaData,\r\n isLeftView,\r\n }),\r\n );\r\n isApiCallMadeToRenderSection.current = true;\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [isSectionLoaded, shouldShow, isContentPanelScrolling]);\r\n\r\n useEffect(() => {\r\n !shouldShow && (isApiCallMadeToRenderSection.current = false);\r\n }, [shouldShow]);\r\n\r\n //Set sectionsInView using IO.\r\n useEffect(() => {\r\n const rootElementId = isLeftView\r\n ? `${OCR_CONTAINER_BLOCK}__document-id-left-view`\r\n : `${OCR_CONTAINER_BLOCK}__document-id`;\r\n const intersectionObserverConfig = {\r\n root: document.getElementById(rootElementId), //the element that we check for intersection with\r\n rootMargin: `${SEGMENT_LOADING_HEIGHT}px 0px`,\r\n };\r\n const abortController = new AbortController();\r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting) {\r\n if (!shouldShow) {\r\n setSectionInView({ sectionId: sectionMetaData.sectionId });\r\n setShouldShow(true);\r\n }\r\n } else {\r\n if (shouldShow) {\r\n setShouldShow(false);\r\n clearSectionInView({ sectionId: sectionMetaData.sectionId });\r\n }\r\n }\r\n });\r\n }, intersectionObserverConfig);\r\n\r\n const currentOverlayCanvas = overlayCanvas.current;\r\n if (currentOverlayCanvas) observer.observe(currentOverlayCanvas);\r\n return () => {\r\n if (currentOverlayCanvas) {\r\n observer.unobserve(currentOverlayCanvas);\r\n }\r\n abortController.abort();\r\n };\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [sectionMetaData.sectionId, shouldShow]);\r\n\r\n useEffect(() => {\r\n if (blacklineViewMode) {\r\n const rootElementId = isLeftView\r\n ? `${OCR_CONTAINER_BLOCK}__document-id-left-view`\r\n : `${OCR_CONTAINER_BLOCK}__document-id`;\r\n const intersectionObserverConfig = {\r\n root: document.getElementById(rootElementId), //the element that we check for intersection with\r\n rootMargin: `${SEGMENT_LOADING_HEIGHT}px 0px`,\r\n };\r\n const abortController = new AbortController();\r\n const observer = new IntersectionObserver((entries) => {\r\n entries.forEach((entry) => {\r\n if (entry.isIntersecting) {\r\n if (isLeftView) {\r\n !!blacklineGuidDetails &&\r\n dispatch(\r\n fetchPreviousBlacklineDataBySectionOCR({\r\n sectionId: sectionMetaData.sectionId,\r\n blacklineGuidDetails,\r\n }),\r\n );\r\n } else {\r\n !!blacklineGuidDetails &&\r\n dispatch(\r\n fetchCurrentBlacklineDataBySectionOCR({\r\n sectionId: sectionMetaData.sectionId,\r\n blacklineGuidDetails,\r\n }),\r\n );\r\n }\r\n }\r\n });\r\n }, intersectionObserverConfig);\r\n\r\n const currentOverlayCanvas = overlayCanvas.current;\r\n if (currentOverlayCanvas) observer.observe(currentOverlayCanvas);\r\n return () => {\r\n if (currentOverlayCanvas) {\r\n observer.unobserve(currentOverlayCanvas);\r\n }\r\n abortController.abort();\r\n };\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [blacklineViewMode]);\r\n\r\n //set the canvas width and height\r\n useEffect(() => {\r\n const canvas = overlayCanvas.current;\r\n const context = canvas.getContext('2d');\r\n context.canvas.width = sectionMetaData.width * scaleWithZoom;\r\n context.canvas.height = sectionMetaData.height * scaleWithZoom;\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [sectionMetaData.height, sectionMetaData.width, scaleWithZoom]);\r\n\r\n const rightStatementCursorClassName =\r\n numberOfSourceElementSelected > numberOfTargetElementSelected &&\r\n `${BLOCK}--right-statement-selection-cursor`;\r\n\r\n const shouldDisplayBatchBox = () => {\r\n if (!isSideBySideView) return false;\r\n\r\n if (isLeftView) return true;\r\n\r\n return numberOfSourceElementSelected > numberOfTargetElementSelected;\r\n };\r\n\r\n return (\r\n <>\r\n {blacklineViewMode && (\r\n \r\n )}\r\n \r\n {contentSearchResult.isLoaded && (\r\n \r\n )}\r\n \r\n {(!!isBatchModeSelected ||\r\n shouldDisplayBatchBox() ||\r\n shouldElementBatchSelection(selectMode)) && }\r\n \r\n {!isBatchModeSelected &&\r\n contextMenuData.selectedText &&\r\n !isDrawing &&\r\n !isPreviewPage &&\r\n !blacklineViewMode && (\r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nexport default SectionContentOverlayOCR;\r\n","import classNames from 'classnames';\r\nimport React, { useRef, useState, useMemo, useEffect } from 'react';\r\nimport { useSelector } from 'react-redux';\r\nimport SectioContentOverlayOCR from './section-content-overlay-ocr';\r\nimport Loading from 'components/common/loading-component';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { SCALE_ALTERATION } from 'constants/feature/statement-content-constants';\r\nimport {\r\n batchSelectElements,\r\n batchSelectElementsInSideBySideMode,\r\n} from 'store/actions/statement-content-actions';\r\nimport withURLRouter from 'withURLRouter';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n getText,\r\n getClosestWord,\r\n renderSelection,\r\n processCharacterRangeAsTextLines,\r\n selectedElementInBatch,\r\n clearCanvas,\r\n checkIfPolygonIsInsideAnotherPolygon,\r\n checkIsArrayOfArrays,\r\n} from 'utils/ocr-text-selection-utils';\r\nimport { throttle } from 'lodash';\r\nimport { ELEMENT_SELECT_MODES } from 'constants/feature/modes-constants';\r\nimport { shouldElementBatchSelection } from 'utils/modes-utils';\r\n\r\nconst SectionContentOCR = ({\r\n BLOCK,\r\n BLOCK_ID,\r\n sectionMetaData,\r\n sectionCache,\r\n sectionOCRCache,\r\n elementCache,\r\n blacklineCache,\r\n batchSelectElements,\r\n batchSelectElementsInSideBySideMode,\r\n URLString,\r\n isContentPanelScrolling,\r\n isBatchModeSelected,\r\n markerDisplayValue,\r\n calloutDisplayValue,\r\n showElementStatusAndFlag,\r\n clickedSectionId,\r\n setClickedSectionId,\r\n selectedStatement,\r\n leftSelectedStatement,\r\n isLeftView = false,\r\n blacklineViewMode,\r\n LEFT_BLOCK_ID,\r\n blacklineGuidDetails,\r\n setSectionInView,\r\n clearSectionInView,\r\n notesCache,\r\n contentSearchResult,\r\n selectMode,\r\n}) => {\r\n const [shouldShow, setShouldShow] = useState(false);\r\n const [selection, setSelection] = useState(null);\r\n const [isDrawing, setIsDrawing] = useState(false);\r\n const [box, setBox] = useState(null);\r\n const containerRef = useRef(null);\r\n const [annotationsList, setAnnotaionsList] = useState([]);\r\n const { ui } = useSelector((state) => state);\r\n const overlayCanvas = useRef(null);\r\n const {\r\n statementPage: { zoom, leftZoom, rightZoom } = {},\r\n sideBySideView: { sideBySideElementMap },\r\n } = ui;\r\n const elementIdToElementMap = (elementCache && elementCache.elements) || {};\r\n const elementList = Object.values(elementIdToElementMap);\r\n const notesList = Object.values(notesCache || {});\r\n const { width, height, sectionId } = sectionMetaData;\r\n const isSideBySideView = window.location.pathname.includes(\r\n ROUTE_CONSTANTS.SIDE_BY_SIDE,\r\n );\r\n const dpi =\r\n isSideBySideView && isLeftView\r\n ? leftSelectedStatement.dpi\r\n : selectedStatement.dpi;\r\n const scale = SCALE_ALTERATION * (150 / dpi);\r\n const zoomValue = isSideBySideView\r\n ? isLeftView\r\n ? leftZoom\r\n : rightZoom\r\n : zoom;\r\n const scaleWithZoom = scale * zoomValue.zoomRatio;\r\n const pageStyles = {\r\n width: `${width * scaleWithZoom}px`,\r\n height: `${height * scaleWithZoom}px`,\r\n };\r\n\r\n const isLoading = sectionCache && sectionCache.isLoading;\r\n const isSectionLoaded = sectionCache && sectionCache.isLoaded;\r\n const isLoaded = shouldShow && isSectionLoaded;\r\n const {\r\n ocrWords: ocr = [],\r\n ocrLines = [],\r\n ocrTables = [],\r\n } = sectionOCRCache || {};\r\n const [currentSelection, setCurrentSelectionState] = useState([]);\r\n const [contextMenuData, setContextMenuData] = useState({});\r\n const [selectedLines, setSelectedLines] = useState([]);\r\n const numberOfSourceElementSelected =\r\n sideBySideElementMap && sideBySideElementMap.sizeOfSourceMapping;\r\n const numberOfTargetElementSelected =\r\n sideBySideElementMap && sideBySideElementMap.sizeOfTargetMapping;\r\n\r\n useEffect(() => {\r\n const handleMouseDown = () => {\r\n setClickedSectionId(sectionId);\r\n };\r\n const container = containerRef && containerRef.current;\r\n container && container.addEventListener('mousedown', handleMouseDown);\r\n return () =>\r\n container && container.removeEventListener('mousedown', handleMouseDown);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (clickedSectionId !== sectionId) {\r\n clearSelection();\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [clickedSectionId]);\r\n\r\n //We are not getting polygonInPixel data for lines.\r\n const ocrLinesData = useMemo(() => {\r\n return ocrLines.map((item) => {\r\n return {\r\n ...item,\r\n polygon: item.polygon.map((item) => item * dpi * scaleWithZoom),\r\n };\r\n });\r\n }, [dpi, ocrLines, scaleWithZoom]);\r\n\r\n //We are not getting polygonInPixel data for words.\r\n const ocrWords = useMemo(() => {\r\n return ocr.map((item) => {\r\n return {\r\n ...item,\r\n polygon: item.polygon.map((item) => item * dpi * scaleWithZoom),\r\n };\r\n });\r\n }, [dpi, ocr, scaleWithZoom]);\r\n\r\n const ocrTablesData = useMemo(() => {\r\n return ocrTables\r\n .map((item) => {\r\n return item.cells.map((cell) => {\r\n return {\r\n ...cell,\r\n ...cell.bounding_regions[0],\r\n polygon: cell.bounding_regions[0].polygon.map(\r\n (item) => item * dpi * scaleWithZoom,\r\n ),\r\n };\r\n });\r\n })\r\n .flat();\r\n }, [dpi, ocrTables, scaleWithZoom]);\r\n\r\n const highlightSelection = throttle((coordinates) => {\r\n const char = getClosestWord(\r\n coordinates.x,\r\n coordinates.y,\r\n ocrWords,\r\n sectionMetaData,\r\n );\r\n const charExists = char.polygon && char.polygon.length ? char : null;\r\n if (!charExists) {\r\n return;\r\n }\r\n\r\n const startDefined =\r\n currentSelection && currentSelection.startingWord !== null;\r\n\r\n setCurrentSelection({\r\n startingWord: startDefined ? currentSelection.startingWord : char,\r\n endingWord: startDefined ? char : null,\r\n });\r\n }, 50);\r\n\r\n const setCurrentSelection = (curentSelection) => {\r\n setCurrentSelectionState(curentSelection);\r\n const { startingWord, endingWord } = curentSelection;\r\n let endOffset, startOffset;\r\n\r\n if (startingWord) {\r\n if (endingWord) {\r\n const distance = startingWord.span.offset < endingWord.span.offset;\r\n startOffset = distance\r\n ? startingWord.span.offset\r\n : endingWord.span.offset;\r\n endOffset = distance\r\n ? endingWord.span.offset\r\n : startingWord.span.offset;\r\n } else {\r\n startOffset = startingWord.span.offset;\r\n endOffset = startingWord.span.offset;\r\n }\r\n\r\n const { text, characterRange } = getText(\r\n startOffset,\r\n endOffset,\r\n ocrWords,\r\n );\r\n setSelection({\r\n startOffset,\r\n endOffset,\r\n text,\r\n characterRange,\r\n });\r\n\r\n const canvas = overlayCanvas.current;\r\n const lines = processCharacterRangeAsTextLines(characterRange);\r\n setSelectedLines(lines);\r\n clearCanvas(canvas);\r\n renderSelection(lines, canvas);\r\n }\r\n };\r\n\r\n const handleMouseDown = (e) => {\r\n const rect = containerRef.current.getBoundingClientRect();\r\n const startX = e.clientX - rect.left;\r\n const startY = e.clientY - rect.top;\r\n setIsDrawing(true);\r\n\r\n setBox({\r\n startX,\r\n startY,\r\n endX: startX,\r\n endY: startY,\r\n width: 0,\r\n height: 0,\r\n });\r\n if (!isSideBySideView) {\r\n if (!isBatchModeSelected && !shouldElementBatchSelection(selectMode)) {\r\n const canvas = overlayCanvas.current;\r\n clearCanvas(canvas);\r\n setCurrentSelectionState(null);\r\n setSelection(null);\r\n renderSelection([], overlayCanvas.current);\r\n setSelectedLines([]);\r\n const char = getClosestWord(startX, startY, ocrWords, sectionMetaData);\r\n const charExists = char.polygon && char.polygon.length ? char : null;\r\n setCurrentSelection({\r\n startingWord: charExists ? char : null,\r\n endingWord: null,\r\n });\r\n }\r\n }\r\n };\r\n\r\n const handleMouseMove = (e) => {\r\n if (!isDrawing) return;\r\n\r\n const rect = containerRef.current.getBoundingClientRect();\r\n const currentX = e.clientX - rect.left;\r\n const currentY = e.clientY - rect.top;\r\n\r\n setBox((prevBox) => ({\r\n ...prevBox,\r\n endX: currentX,\r\n endY: currentY,\r\n width: Math.abs(currentX - prevBox.startX),\r\n height: Math.abs(currentY - prevBox.startY),\r\n left: Math.min(currentX, prevBox.startX),\r\n top: Math.min(currentY, prevBox.startY),\r\n }));\r\n\r\n if (!isSideBySideView) {\r\n if (!isBatchModeSelected && !shouldElementBatchSelection(selectMode)) {\r\n const coordinates = { x: currentX, y: currentY };\r\n highlightSelection(coordinates);\r\n }\r\n }\r\n };\r\n\r\n //convert polygon data back to inches without scaling.\r\n const polygonConvertor = (polygon) => {\r\n const apiPolygons = [];\r\n\r\n polygon.forEach((polygonData) => {\r\n const { x1, y1, x2, y2 } = polygonData;\r\n\r\n const X1 = x1 / (dpi * scaleWithZoom);\r\n const Y1 = y1 / (dpi * scaleWithZoom);\r\n const X2 = x2 / (dpi * scaleWithZoom);\r\n const Y2 = y1 / (dpi * scaleWithZoom);\r\n const X3 = x2 / (dpi * scaleWithZoom);\r\n const Y3 = y2 / (dpi * scaleWithZoom);\r\n const X4 = x1 / (dpi * scaleWithZoom);\r\n const Y4 = y2 / (dpi * scaleWithZoom);\r\n\r\n apiPolygons.push([X1, Y1, X2, Y2, X3, Y3, X4, Y4]);\r\n });\r\n\r\n return apiPolygons;\r\n };\r\n\r\n const mouseUpActions = () => {\r\n let containsElement = false;\r\n let containesElementArray = [];\r\n let containsNote = false;\r\n\r\n !!elementList.length &&\r\n elementList.forEach((element) => {\r\n if (element.isIncluded) {\r\n const { coordinatesInPixel, id } = element;\r\n if (coordinatesInPixel && checkIsArrayOfArrays(coordinatesInPixel)) {\r\n coordinatesInPixel.forEach((coord) => {\r\n const polygon = coord.map((childCoord) => {\r\n return childCoord * scaleWithZoom;\r\n });\r\n let [x1, y1, , , x3, y3] = polygon;\r\n selectedLines.forEach((lines) => {\r\n const {\r\n innerRectangleLiesWithinOuterRectangle,\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n lines.x1,\r\n lines.y1,\r\n lines.x2,\r\n lines.y2,\r\n x1,\r\n y1,\r\n x3,\r\n y3,\r\n );\r\n if (\r\n innerRectangleLiesWithinOuterRectangle ||\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle\r\n ) {\r\n containesElementArray.push(id);\r\n containsElement = true;\r\n }\r\n });\r\n });\r\n } else if (coordinatesInPixel && coordinatesInPixel.length) {\r\n const polygon = coordinatesInPixel.map((coord) => {\r\n return coord * scaleWithZoom;\r\n });\r\n let [x1, y1, , , x3, y3] = polygon;\r\n selectedLines.forEach((lines) => {\r\n const {\r\n innerRectangleLiesWithinOuterRectangle,\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n lines.x1,\r\n lines.y1,\r\n lines.x2,\r\n lines.y2,\r\n x1,\r\n y1,\r\n x3,\r\n y3,\r\n );\r\n if (\r\n innerRectangleLiesWithinOuterRectangle ||\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle\r\n ) {\r\n containesElementArray.push(id);\r\n containsElement = true;\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n !!notesList.length &&\r\n notesList.forEach((note) => {\r\n const {\r\n ocrSelector: { polygon },\r\n } = note;\r\n if (polygon && checkIsArrayOfArrays(polygon)) {\r\n polygon.forEach((coord) => {\r\n const polygonData = coord.map((childCoord) => {\r\n return childCoord * dpi * scaleWithZoom;\r\n });\r\n let [x1, y1, , , x3, y3] = polygonData;\r\n selectedLines.forEach((lines) => {\r\n const {\r\n innerRectangleLiesWithinOuterRectangle,\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n lines.x1,\r\n lines.y1,\r\n lines.x2,\r\n lines.y2,\r\n x1,\r\n y1,\r\n x3,\r\n y3,\r\n );\r\n if (\r\n innerRectangleLiesWithinOuterRectangle ||\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle\r\n ) {\r\n containsNote = true;\r\n }\r\n });\r\n });\r\n } else if (polygon && polygon.length) {\r\n const polygonData = polygon.map((coord) => {\r\n return coord * dpi * scaleWithZoom;\r\n });\r\n let [x1, y1, , , x3, y3] = polygonData;\r\n selectedLines.forEach((lines) => {\r\n const {\r\n innerRectangleLiesWithinOuterRectangle,\r\n innerRectangleIntersectsOuterRectangle,\r\n outerRectangleIntersectsInnerRectangle,\r\n } = checkIfPolygonIsInsideAnotherPolygon(\r\n lines.x1,\r\n lines.y1,\r\n lines.x2,\r\n lines.y2,\r\n x1,\r\n y1,\r\n x3,\r\n y3,\r\n );\r\n if (\r\n innerRectangleLiesWithinOuterRectangle ||\r\n innerRectangleIntersectsOuterRectangle ||\r\n outerRectangleIntersectsInnerRectangle\r\n ) {\r\n containsNote = true;\r\n }\r\n });\r\n }\r\n });\r\n\r\n let selectedText = selection.text;\r\n let contextLabel = '';\r\n let rowIndex = -1;\r\n let columnIndex = -1;\r\n let polygon = selectedLines;\r\n let isTable = false;\r\n let tableId = -1;\r\n let tableDataSelected = [];\r\n\r\n let ocrLinesSelected = [];\r\n\r\n ocrLinesData.forEach((ocrLines, index) => {\r\n let [x1, y1, , , x3, y3] = ocrLines.polygon;\r\n\r\n selectedLines.forEach((lines) => {\r\n const { innerRectangleLiesWithinOuterRectangle } =\r\n checkIfPolygonIsInsideAnotherPolygon(\r\n x1,\r\n y1,\r\n x3,\r\n y3,\r\n lines.x1,\r\n lines.y1,\r\n lines.x2,\r\n lines.y2,\r\n );\r\n if (innerRectangleLiesWithinOuterRectangle) {\r\n ocrLinesSelected.push({ ...ocrLines, index });\r\n }\r\n });\r\n });\r\n\r\n selectedLines.forEach((lines) => {\r\n ocrTablesData.forEach((tablesData, index) => {\r\n let [x1, y1, , , x3, y3] = tablesData.polygon;\r\n const { innerRectangleLiesWithinOuterRectangle } =\r\n checkIfPolygonIsInsideAnotherPolygon(\r\n x1,\r\n y1,\r\n x3,\r\n y3,\r\n lines.x1,\r\n lines.y1,\r\n lines.x2,\r\n lines.y2,\r\n true,\r\n );\r\n if (innerRectangleLiesWithinOuterRectangle) {\r\n tablesData.content && tableDataSelected.push(tablesData);\r\n }\r\n });\r\n });\r\n\r\n const table_column_row_ids = tableDataSelected.map(\r\n (item) => item.spans[0].offset,\r\n );\r\n const filteredTableData = tableDataSelected.filter(\r\n (item, index) =>\r\n !table_column_row_ids.includes(item.spans[0].offset, index + 1),\r\n );\r\n const offsets = ocrLinesSelected.map((item) => item.spans[0].offset);\r\n const filtered = ocrLinesSelected\r\n .filter(\r\n (item, index) => !offsets.includes(item.spans[0].offset, index + 1),\r\n )\r\n .slice(0, selectedLines.length);\r\n\r\n const startIndex = filtered[0].index;\r\n const endIndex = filtered[filtered.length - 1].index;\r\n\r\n const preText = startIndex > 0 ? ocrLinesData[startIndex - 1] : null;\r\n const postText =\r\n endIndex < ocrLinesData.length - 1 ? ocrLinesData[endIndex + 1] : null;\r\n\r\n const lastWord = ocrWords.find(\r\n ({ span }) => span.offset === selection.endOffset,\r\n );\r\n\r\n filtered.forEach((item) => {\r\n contextLabel += item.content + ' ';\r\n });\r\n\r\n const updatedPolygon = polygonConvertor(polygon);\r\n\r\n setContextMenuData({\r\n preText: preText ? preText.content.trim() : '',\r\n postText: postText ? postText.content.trim() : '',\r\n selectedText: selectedText.trim(),\r\n contextLabel: contextLabel.trim(),\r\n rowIndex,\r\n columnIndex,\r\n polygon: updatedPolygon,\r\n isTable,\r\n tableId,\r\n sectionId,\r\n containsElement,\r\n containsNote,\r\n filteredTableData,\r\n containesElementArray,\r\n x: lastWord.polygon[4],\r\n y: lastWord.polygon[5],\r\n });\r\n };\r\n\r\n const findElementsForBacthUpdate = (batchUpdateCoordinates) => {\r\n const canvas = overlayCanvas.current;\r\n clearCanvas(canvas);\r\n const context = canvas.getContext('2d');\r\n let batchUpdateElements = [];\r\n elementList.forEach((elementDetails) => {\r\n if (elementDetails.isIncluded) {\r\n selectedElementInBatch({\r\n context,\r\n elementDetails,\r\n scale: scaleWithZoom,\r\n batchUpdateCoordinates,\r\n batchUpdateElements,\r\n });\r\n }\r\n });\r\n isSideBySideView\r\n ? batchSelectElementsInSideBySideMode({\r\n elements: batchUpdateElements,\r\n isLeftSideView: isLeftView,\r\n })\r\n : !!batchUpdateElements.length &&\r\n batchSelectElements({\r\n elements: batchUpdateElements,\r\n });\r\n };\r\n\r\n const handleMouseUp = () => {\r\n setIsDrawing(false);\r\n if (\r\n isBatchModeSelected ||\r\n isSideBySideView ||\r\n shouldElementBatchSelection(selectMode)\r\n ) {\r\n let batchUpdateCoordinatesObject = {\r\n starting: {\r\n x: box && box.startX ? box.startX : null,\r\n y: box && box.startY ? box.startY : null,\r\n },\r\n ending: {\r\n x: box && box.endX ? box.endX : null,\r\n y: box && box.endY ? box.endY : null,\r\n },\r\n };\r\n findElementsForBacthUpdate(batchUpdateCoordinatesObject);\r\n setBox(null);\r\n } else {\r\n if (!selection) {\r\n setContextMenuData({});\r\n } else {\r\n mouseUpActions();\r\n }\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n if (isContentPanelScrolling) {\r\n setContextMenuData({});\r\n }\r\n }, [isContentPanelScrolling]);\r\n\r\n const clearSelection = () => {\r\n const canvas = overlayCanvas.current;\r\n setContextMenuData({});\r\n clearCanvas(canvas);\r\n setCurrentSelectionState(null);\r\n setSelection(null);\r\n renderSelection([], overlayCanvas.current);\r\n setSelectedLines([]);\r\n };\r\n\r\n useEffect(() => {\r\n // Updating the position of selection and context menu on zoom change.\r\n let lastWord = {};\r\n if (selection) {\r\n lastWord = ocrWords.find(\r\n ({ span }) => span.offset === selection.endOffset,\r\n );\r\n const canvas = overlayCanvas.current;\r\n\r\n let newArrayOfCharacters = [];\r\n\r\n selection.characterRange.forEach((obj1) => {\r\n let matchingObj = ocrWords.find(\r\n (obj2) =>\r\n JSON.stringify(obj2.polygon_in_pixels) ===\r\n JSON.stringify(obj1.polygon_in_pixels),\r\n );\r\n\r\n if (matchingObj) {\r\n newArrayOfCharacters.push(matchingObj);\r\n }\r\n });\r\n const lines = processCharacterRangeAsTextLines(newArrayOfCharacters);\r\n setSelectedLines(lines);\r\n clearCanvas(canvas);\r\n renderSelection(lines, canvas);\r\n }\r\n\r\n if (Object.entries(lastWord).length) {\r\n setContextMenuData((prevData) => {\r\n return {\r\n ...prevData,\r\n x: lastWord.polygon[4],\r\n y: lastWord.polygon[5],\r\n };\r\n });\r\n }\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [zoom.zoomRatio, overlayCanvas.current]);\r\n\r\n return (\r\n \r\n \r\n \r\n {isLoading && (\r\n
          \r\n \r\n
          \r\n )}\r\n {isLoaded && \"\"}\r\n \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({\r\n ui: {\r\n statementPage: {\r\n modes: { selectMode, blacklineViewMode },\r\n },\r\n },\r\n data: { selectedStatement, leftSelectedStatement, contentSearchResult },\r\n}) => ({\r\n isBatchModeSelected:\r\n selectMode &&\r\n (selectMode.id === ELEMENT_SELECT_MODES.BATCH_WITH_BANNER.id ||\r\n selectMode.id === ELEMENT_SELECT_MODES.BATCH.id ||\r\n selectMode.id === ELEMENT_SELECT_MODES.FORMULA.id),\r\n selectMode,\r\n selectedStatement,\r\n leftSelectedStatement,\r\n blacklineViewMode,\r\n contentSearchResult,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n batchSelectElementsInSideBySideMode,\r\n batchSelectElements,\r\n};\r\n\r\nexport default withURLRouter(\r\n connect(mapStateToProps, mapDispatchToProps)(SectionContentOCR),\r\n);\r\n","import React, { useEffect, useRef, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport StatementReadOnlyBanners from 'pages/statement-read-only-banner';\r\nimport SectionContentOCR from './section-content-component-ocr';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { SectionIdList } from 'models/api/section-id-list-model';\r\nimport { SectionCache } from 'models/api/sections-cache-model';\r\nimport { LeftSectionCache } from 'models/api/left-sections-cache-model';\r\nimport { SectionCacheOCR } from 'models/api/sections-cache-model-ocr-data';\r\nimport { LeftSectionCacheOCR } from 'models/api/left-sections-cache-model-ocr-data';\r\nimport ElementCache from 'models/data/element-cache-model';\r\nimport { BlacklineGuidList } from 'models/api/blackline-guid-list-api-model';\r\nimport BlacklineCache from 'models/data/blackline-cache-model';\r\nimport NoteCache from 'models/data/note-cache-model';\r\nimport Note from 'models/data/note-model';\r\nimport { OCR_CONTAINER_BLOCK } from 'constants/feature/statement-content-constants';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\n\r\nconst SCROLL_TIMEOUT = 150;\r\nconst SUFFIX = '-';\r\nconst BLOCK = OCR_CONTAINER_BLOCK;\r\nlet scrollingTimeout = null;\r\nlet leftScrollingTimeout = null;\r\nexport const BLOCK_ID = `statement-content-panel-page${SUFFIX}`;\r\nexport const LEFT_BLOCK_ID = `statement-content-panel-page-left${SUFFIX}`;\r\n\r\nconst StatementContentPanelOCR = (props) => {\r\n const statementRef = useRef(null);\r\n const leftStatementRef = useRef(null);\r\n const [currentPage, setCurrentPage] = useState(1);\r\n const [isContentPanelScrolling, setContentPanelScrolling] = useState(false);\r\n const [isLeftContentPanelScrolling, setLeftContentPanelScrolling] =\r\n useState(false);\r\n const [clickedSectionId, setClickedSectionId] = useState(null);\r\n const { zoom, leftZoom, rightZoom, isLeftView, URLString } = props;\r\n const _centerElementBeforeZoom = useRef(null);\r\n\r\n const _isSideBySideView = URLString.includes(ROUTE_CONSTANTS.SIDE_BY_SIDE);\r\n const isPreviewPage = URLString.includes(ROUTE_CONSTANTS.REPORT_PREVIEW);\r\n\r\n const zoomValue = _isSideBySideView\r\n ? isLeftView\r\n ? leftZoom\r\n : rightZoom\r\n : zoom;\r\n\r\n useEffect(() => {\r\n const { setOcrCurrentViewPageNumberDispatch } = props;\r\n setOcrCurrentViewPageNumberDispatch(currentPage, isLeftView);\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [currentPage]);\r\n\r\n useEffect(() => {\r\n statementRef &&\r\n statementRef.current &&\r\n statementRef.current.addEventListener('scroll', () => {\r\n if (!isContentPanelScrolling) {\r\n setContentPanelScrolling(true);\r\n }\r\n window.clearTimeout(scrollingTimeout);\r\n scrollingTimeout = setTimeout(() => {\r\n setContentPanelScrolling(false);\r\n }, SCROLL_TIMEOUT);\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n useEffect(() => {\r\n leftStatementRef &&\r\n leftStatementRef.current &&\r\n leftStatementRef.current.addEventListener('scroll', () => {\r\n if (!isLeftContentPanelScrolling) {\r\n setLeftContentPanelScrolling(true);\r\n }\r\n window.clearTimeout(leftScrollingTimeout);\r\n leftScrollingTimeout = setTimeout(() => {\r\n setLeftContentPanelScrolling(false);\r\n }, SCROLL_TIMEOUT);\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n //set first element in viewport in ocr only for report preview page\r\n useEffect(() => {\r\n if(isPreviewPage && props.isSyncScrollingEnabled) {\r\n props.setFirstElementVisibleInViewPortAction(true);\r\n }\r\n }, [isContentPanelScrolling, props.elementCache]);\r\n\r\n const onScrollPage = (event) => {\r\n const { scrollTop, clientHeight, children } = event.target;\r\n const statementViewerCenter = scrollTop + clientHeight / 2;\r\n const childrens = Array.from(children);\r\n const visibleChild = childrens.find(\r\n (c) => c.offsetTop + c.offsetHeight >= statementViewerCenter,\r\n );\r\n if (visibleChild && visibleChild.id) {\r\n const newPage = isLeftView\r\n ? visibleChild.id.replace(LEFT_BLOCK_ID, '')\r\n : visibleChild.id.replace(BLOCK_ID, '');\r\n if (newPage !== currentPage) setCurrentPage(newPage);\r\n }\r\n };\r\n\r\n\r\n const {\r\n sectionIdList,\r\n leftSectionIdList,\r\n cache,\r\n leftCache,\r\n ocrCache,\r\n leftOcrCache,\r\n elementCache,\r\n leftElementCache,\r\n blacklineCache,\r\n leftBlacklineCache,\r\n setLeftSectionInView,\r\n clearLeftSectionInView,\r\n setSectionInView,\r\n clearSectionInView,\r\n blacklineSourceGuidList,\r\n blacklineTargetGuidList,\r\n notesCache,\r\n leftNotesCache,\r\n selectedStatement,\r\n isBatchModeSelected,\r\n urlParams,\r\n workflowsMap,\r\n blacklineViewMode,\r\n } = props;\r\n const sectionIdListData = isLeftView ? leftSectionIdList : sectionIdList;\r\n return (\r\n
          \r\n \r\n {!blacklineViewMode && (\r\n \r\n )}\r\n \r\n {sectionIdListData.sectionIds.map((sectionMetaData, index) => {\r\n const imageCache = isLeftView\r\n ? leftCache.get(sectionMetaData.sectionId)\r\n : cache.get(sectionMetaData.sectionId);\r\n const jsonCache = isLeftView\r\n ? leftOcrCache.get(sectionMetaData.sectionId)\r\n : ocrCache.get(sectionMetaData.sectionId);\r\n const elementListCache = isLeftView\r\n ? leftElementCache.getSection(sectionMetaData.sectionId)\r\n : elementCache.getSection(sectionMetaData.sectionId);\r\n const blacklineListCache = isLeftView\r\n ? leftBlacklineCache.getSection(sectionMetaData.sectionId)\r\n : blacklineCache.getSection(sectionMetaData.sectionId);\r\n const blacklineGuidDetails = isLeftView\r\n ? blacklineSourceGuidList.guidList.filter(\r\n (item) => sectionMetaData.sectionId === item.sectionId,\r\n )[0]\r\n : blacklineTargetGuidList.guidList.filter(\r\n (item) => sectionMetaData.sectionId === item.sectionId,\r\n )[0];\r\n\r\n const notesCacheData = isLeftView\r\n ? leftNotesCache.getSection(sectionMetaData.sectionId)\r\n : notesCache.getSection(sectionMetaData.sectionId);\r\n\r\n let notesListCache = {};\r\n\r\n if (notesCacheData) {\r\n let currNote = notesCacheData.pseudoNotes;\r\n if (!currNote && notesCacheData.getElementNote) {\r\n currNote = notesCacheData.elementNotes;\r\n }\r\n if (!currNote) {\r\n currNote = new Note();\r\n }\r\n\r\n notesListCache = currNote;\r\n }\r\n return (\r\n \r\n );\r\n })}\r\n \r\n
          \r\n \r\n );\r\n};\r\nexport default StatementContentPanelOCR;\r\n\r\nStatementContentPanelOCR.propTypes = {\r\n /** Api model of all the section id's */\r\n sectionIdList: PropTypes.instanceOf(SectionIdList).isRequired,\r\n /** Api model of all the left section id's */\r\n leftSectionIdList: PropTypes.instanceOf(SectionIdList),\r\n /** Api model of all the section segments */\r\n cache: PropTypes.instanceOf(SectionCache),\r\n /** Api model of all the left section segments */\r\n leftCache: PropTypes.instanceOf(LeftSectionCache),\r\n /** Api model of all the ocr section segments */\r\n ocrCache: PropTypes.instanceOf(SectionCacheOCR),\r\n /** Api model of all the left ocr section segments */\r\n leftOcrCache: PropTypes.instanceOf(LeftSectionCacheOCR),\r\n /** Api model of all the sections elements */\r\n elementCache: PropTypes.instanceOf(ElementCache),\r\n /** Api model of all the left sections elements */\r\n leftElementCache: PropTypes.instanceOf(ElementCache),\r\n /** Api model of current blackline changes */\r\n blacklineCache: PropTypes.instanceOf(BlacklineCache),\r\n /** Api model of previous blackline changes */\r\n leftBlacklineCache: PropTypes.instanceOf(BlacklineCache),\r\n /** Action to set left section in view */\r\n setLeftSectionInView: PropTypes.func.isRequired,\r\n /** Action to clear left section in view */\r\n clearLeftSectionInView: PropTypes.func.isRequired,\r\n /** Action to set section in view */\r\n setSectionInView: PropTypes.func.isRequired,\r\n /** Action to clear left section in view */\r\n clearSectionInView: PropTypes.func.isRequired,\r\n /** Api model of blackline guids */\r\n blacklineGuidList: PropTypes.instanceOf(BlacklineGuidList),\r\n /** Api model of sections notes */\r\n notesCache: PropTypes.instanceOf(NoteCache),\r\n /** Api model of sections notes for source statements in side-by-side view */\r\n leftNotesCache: PropTypes.instanceOf(NoteCache),\r\n /** Booloean to check left or right view */\r\n isLeftView: PropTypes.bool,\r\n /** Booloean to check blackline view mode*/\r\n blacklineViewMode: PropTypes.bool,\r\n};\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport StatementContentPanelOCR from 'components/feature/statement-content-panel/statement-content-panel-component-ocr';\r\nimport withURLRouter from 'withURLRouter';\r\nimport {\r\n setLeftSectionInView,\r\n clearLeftSectionInView,\r\n} from 'store/actions/left-statement-section-content-actions';\r\nimport {\r\n setSectionInView,\r\n clearSectionInView,\r\n} from 'store/actions/statement-content-actions';\r\nimport { setFirstElementVisibleInViewPortAction } from 'store/actions/preview-report-page-actions';\r\n\r\nconst StatementContentPanelContainerOCR = (props) => {\r\n return ;\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n blacklineSourceGuidList,\r\n blacklineTargetGuidList,\r\n statementContent: {\r\n sectionIdList,\r\n sectionsCache: { cache, ocrCache, blacklineCache },\r\n elementCache,\r\n notesCache,\r\n },\r\n leftStatementContent: {\r\n leftSectionIdList,\r\n leftSectionsCache: { leftCache, leftOcrCache, leftBlacklineCache },\r\n leftElementCache,\r\n leftNotesCache,\r\n },\r\n },\r\n ui: {\r\n statementPage: {\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n modes: { blacklineViewMode, ocrCurrentViewPageNumber, leftOcrCurrentViewPageNumber },\r\n },\r\n previewPage: { isSyncScrollingEnabled },\r\n },\r\n}) => ({\r\n sectionIdList,\r\n leftSectionIdList,\r\n cache,\r\n leftCache,\r\n ocrCache,\r\n leftOcrCache,\r\n elementCache,\r\n leftElementCache,\r\n leftNotesCache,\r\n blacklineCache,\r\n leftBlacklineCache,\r\n blacklineSourceGuidList,\r\n blacklineTargetGuidList,\r\n zoom,\r\n leftZoom,\r\n rightZoom,\r\n blacklineViewMode,\r\n notesCache,\r\n isSyncScrollingEnabled,\r\n ocrCurrentViewPageNumber, \r\n leftOcrCurrentViewPageNumber\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n setSectionInView,\r\n clearSectionInView,\r\n setLeftSectionInView,\r\n clearLeftSectionInView,\r\n setFirstElementVisibleInViewPortAction,\r\n};\r\n\r\nexport default withURLRouter(\r\n connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n )(StatementContentPanelContainerOCR),\r\n);\r\n","import React, { useEffect, useState } from 'react';\r\nimport classnames from 'classnames';\r\nimport { isEqual } from 'lodash';\r\nimport { SelectedableElement as AnnotationDisplay } from 'constants/feature/element-panel-constants';\r\nimport { getElementDataFromElementCache } from 'utils/statement-content-page-utils';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\n\r\nconst ANNOTATION_DETAILS_BLOCK = 'annotation-details';\r\n\r\nconst AnnotationDetails = ({ elementDetails, className, isCftEnabled }) => {\r\n const [elementData, setElementData] = useState(elementDetails);\r\n const { id, sectionId } = elementDetails;\r\n\r\n useEffect(() => {\r\n const elementDataFromElementCache =\r\n getElementDataFromElementCache({ elementId: id, sectionId }) || {};\r\n\r\n if (!isEqual(elementDataFromElementCache, elementDetails)) {\r\n setElementData(elementDataFromElementCache);\r\n }\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n if (elementDetails.isLoaded === false) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nAnnotationDetails.protoTypes = {\r\n /** selected element details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails),\r\n /** parent className */\r\n className: PropTypes.string,\r\n /** boolean based on comfort letter is enabled from statement level */\r\n isCftEnabled: PropTypes.bool,\r\n};\r\n\r\nexport default AnnotationDetails;\r\n","import React, { memo } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { excludeElement } from 'store/actions/element-panel-actions';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport {\r\n getElementFlaggedIcon,\r\n getOCRElementStyleByElementStatus,\r\n} from 'constants/feature/element-panel-constants';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport AmountAttributeDetails from 'components/common/element-amount-attributes-details-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { ReactComponent as RemoveIcon } from 'icons/cross.svg';\r\nimport Permissions from 'permissions/permissions';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport {\r\n selectElementContentPanel,\r\n deallocateItems,\r\n} from 'store/actions/statement-content-actions';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { getElementResultByNumberFormat } from 'utils/formula-utils';\r\nimport classNames from 'classnames';\r\nimport AnnotationDetails from 'components/common/element-annotation-details-component';\r\n\r\nconst ELEMENT_PANEL_HEADER_BLOCK = 'element-panel-header';\r\nexport const ELEMENT_PANEL_HEADER_ID_BLOCK = 'element-panel-header-id';\r\n\r\nexport const DefaultElementPanelHeader = ({\r\n elementDetails,\r\n excludeElementFromElementList,\r\n selectedStatement,\r\n selectedProjectId,\r\n selectElementContentPanel,\r\n deallocateItems,\r\n}) => {\r\n const getStatusDisplay = () => {\r\n if (isNullOrUndefined(elementDetails)) {\r\n return 'common.loading';\r\n } else if (elementDetails.isReviewed()) {\r\n return 'element.status.reviewed';\r\n } else if (elementDetails.isVerified()) {\r\n return 'element.status.verified';\r\n } else {\r\n return 'element.status.unverified';\r\n }\r\n };\r\n const _permissionToEdit =\r\n Permissions.Element.canEditElement(selectedProjectId);\r\n const readOnly = selectedStatement.isReadOnly();\r\n const numberFormatId =\r\n selectedStatement &&\r\n selectedStatement.statement &&\r\n selectedStatement.statement.numberFormatId;\r\n return (\r\n \r\n
          \r\n
          \r\n \r\n \r\n \r\n
          \r\n \r\n \r\n {elementDetails.sectionname}\r\n \r\n \r\n\r\n \r\n \r\n {elementDetails.label}\r\n \r\n \r\n
          \r\n \r\n \r\n {\r\n scrollElementIntoView({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\r\n });\r\n deallocateItems();\r\n selectElementContentPanel({\r\n elementIds: [elementDetails.id],\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n });\r\n }}\r\n >\r\n {getElementFlaggedIcon({ elementDetails })}\r\n {\r\n // IF amount is 0 or any other falsy value then it indicates that element display value is not a number.\r\n // For example display value not a number might look like, display value is a hyphen (-) or any word\r\n elementDetails.amount\r\n ? typeof elementDetails.display === 'string' &&\r\n elementDetails.display.match(/[()]/)\r\n ? // IF display value is enclosed within parenthesis append ellipsis within parenthesis\r\n `(${elementDetails.display.split(/[()]/).join('')})...`\r\n : `${elementDetails.display}...`\r\n : elementDetails.display\r\n }\r\n \r\n \r\n
          \r\n \r\n \r\n
          \r\n {!readOnly && (\r\n \r\n \r\n \r\n )}\r\n \r\n
          \r\n );\r\n};\r\n\r\nDefaultElementPanelHeader.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n excludeElementFromElementList: PropTypes.func.isRequired,\r\n /** Selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n /** Currently selected project id of the revision we are viewing */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /* Action to highlight an element on content panel */\r\n selectElementContentPanel: PropTypes.func.isRequired,\r\n /* function to deallocate all the elements, sections, notes or items on content panel */\r\n deallocateItems: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { id },\r\n selectedStatement,\r\n },\r\n}) => ({\r\n selectedProjectId: id,\r\n selectedStatement,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n excludeElementFromElementList: excludeElement,\r\n selectElementContentPanel,\r\n deallocateItems,\r\n};\r\n\r\nconst ElementPanelHeader = connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(memo(DefaultElementPanelHeader));\r\nexport default ElementPanelHeader;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as ArrowDown } from 'icons/arrow-simple-thick-down.svg';\r\nimport {\r\n MAXIMIZE_TOOLTIP,\r\n MINIMIZE_TOOLTIP,\r\n} from 'constants/feature/statement-processing-constants';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Caret } from 'icons/caret-black.svg';\r\nimport classNames from 'classnames';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\n\r\nconst EXPANDABLE_ROW_BLOCK = 'expandable-row';\r\nconst EXPANDABLE_ROW_ID_BLOCK = 'element-attribute-id';\r\nconst ARROW_DOWN_SIZE = '24px';\r\nconst CARET_ICON_SIZE = '12px';\r\n\r\nexport const EXPAND_OCR_ROW_TOOLTIP = new TooltipOptions({\r\n text: 'common.expand',\r\n id: 'element-attribute-expand-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nexport const COLLAPSE_OCR_ROW_TOOLTIP = new TooltipOptions({\r\n text: 'common.collapse',\r\n id: 'element-attribute-collapse-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nclass ExpandableRow extends Component {\r\n _expandedExpandableRow = () => {\r\n const { children } = this.props;\r\n return (\r\n
          \r\n
          {children}
          \r\n
          \r\n );\r\n };\r\n\r\n render() {\r\n const {\r\n id,\r\n tooltipId,\r\n title,\r\n expandExpandableRow,\r\n minimizeExpandableRow,\r\n showExpandableRow,\r\n isElementPanel,\r\n } = this.props;\r\n const minimizeId = id\r\n ? `${EXPANDABLE_ROW_ID_BLOCK}-tooltip-minimize-${id}`\r\n : `${EXPANDABLE_ROW_ID_BLOCK}-tooltip-minimize`;\r\n const maximizeId = id\r\n ? `${EXPANDABLE_ROW_ID_BLOCK}-tooltip-maximize-${id}`\r\n : `${EXPANDABLE_ROW_ID_BLOCK}-tooltip-maximize`;\r\n return (\r\n
          \r\n \r\n {isElementPanel && (\r\n \r\n {showExpandableRow ? (\r\n minimizeExpandableRow()}\r\n width={CARET_ICON_SIZE}\r\n height={CARET_ICON_SIZE}\r\n style={{ transform: 'rotate(90deg)' }}\r\n />\r\n ) : (\r\n expandExpandableRow()}\r\n width={CARET_ICON_SIZE}\r\n height={CARET_ICON_SIZE}\r\n />\r\n )}\r\n \r\n )}\r\n \r\n \r\n
          \r\n {!isElementPanel && (\r\n \r\n {showExpandableRow ? (\r\n minimizeExpandableRow()}\r\n width={ARROW_DOWN_SIZE}\r\n height={ARROW_DOWN_SIZE}\r\n style={{ transform: 'rotate(180deg)' }}\r\n />\r\n ) : (\r\n expandExpandableRow()}\r\n width={ARROW_DOWN_SIZE}\r\n height={ARROW_DOWN_SIZE}\r\n />\r\n )}\r\n \r\n )}\r\n \r\n {showExpandableRow ? this._expandedExpandableRow() : null}\r\n \r\n );\r\n }\r\n}\r\n\r\nExpandableRow.propTypes = {\r\n /** Title of expandable row */\r\n title: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.shape({\r\n id: PropTypes.string.isRequired,\r\n values: PropTypes.object,\r\n }),\r\n ]),\r\n\r\n /** Function for expanding the expandableRow Component */\r\n expandExpandableRow: PropTypes.func.isRequired,\r\n /** Function for hiding the expandableRow Component */\r\n minimizeExpandableRow: PropTypes.func.isRequired,\r\n /** Boolean set to false by default and toggles the expandableRow */\r\n showExpandableRow: PropTypes.bool.isRequired,\r\n /** Unique id for tooltip */\r\n tooltipId: PropTypes.string.isRequired,\r\n};\r\n\r\nexport default ExpandableRow;\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"icon-path-outer\",\n d: \"M0.718654 14.8227C0.740298 7.34052 6.77549 1.34014 14.2577 1.36179C21.7398 1.38343 27.7402 7.41862 27.7185 14.9008C27.6969 22.3829 21.6617 28.3833 14.1795 28.3617C6.69739 28.34 0.697009 22.3048 0.718654 14.8227Z\",\n stroke: \"#00A3E0\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"icon-path-inner\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M22.3869 14.302L14.8036 14.2801L14.8256 6.69676C14.8266 6.34676 14.5939 6.11275 14.2439 6.11174C13.8939 6.11073 13.6599 6.34338 13.6589 6.69338L13.637 14.2767L6.05366 14.2547C5.70366 14.2537 5.46965 14.4864 5.46864 14.8364C5.46763 15.1864 5.70028 15.4204 6.05028 15.4214L13.6336 15.4433L13.6116 23.0266C13.6106 23.3766 13.8433 23.6107 14.1933 23.6117C14.5433 23.6127 14.7773 23.38 14.7783 23.03L14.8002 15.4467L22.3835 15.4687C22.7335 15.4697 22.9676 15.237 22.9686 14.887C22.9696 14.537 22.7369 14.303 22.3869 14.302Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgPlusCircleBlue = function SvgPlusCircleBlue(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 29,\n height: 29,\n viewBox: \"0 0 29 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgPlusCircleBlue, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/plus-circle-blue.f941e061.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport TickmarkEntry, {\r\n TICKMARK_ENTRY_BLOCK,\r\n} from 'components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-component';\r\nimport { ReactComponent as PlusCircle } from 'icons/plus-circle-blue.svg';\r\nimport Tickmark from 'models/data/tickmark-model';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nconst ATTACH_ICON_SIZE = '28px';\r\n\r\nconst TICKMARK_ATTACH_TOOLTIP = new TooltipOptions({\r\n text: 'common.attach',\r\n id: 'tickmark-attach-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst TickmarkEntryWithAttach = ({ tickmark, onAddTickmark, disabled }) => {\r\n return (\r\n onAddTickmark(tickmark)}\r\n Icon={PlusCircle}\r\n iconSize={ATTACH_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n }\r\n />\r\n );\r\n};\r\n\r\nTickmarkEntryWithAttach.propTypes = {\r\n /** Tickmark object from the tickmark list endpoint */\r\n tickmark: PropTypes.instanceOf(Tickmark).isRequired,\r\n /** action fired to attach this tickmark to an element */\r\n onAddTickmark: PropTypes.func.isRequired,\r\n /** boolean to disable the button */\r\n disabled: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default memo(TickmarkEntryWithAttach);\r\n","import React, { memo, useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport isFunction from 'lodash/isFunction';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport TickmarkAttachEntry from '../annotations/tickmark-entry/tickmark-entry-with-attach-component';\r\nimport TickmarkList from 'models/api/tickmark-list-api-model';\r\nimport Button from 'components/common/button-component';\r\nimport { ReactComponent as Plus } from 'icons/plus.svg';\r\nimport { MODAL_CLOSE_ICON_ID } from 'components/common/modal-component';\r\nconst TICKMARK_SEARCH_BLOCK = 'tickmark-search-results';\r\n\r\nconst TickmarkSearchResults = ({\r\n tickmarkList,\r\n onAddTickmark,\r\n search,\r\n disabled,\r\n wrapperRef,\r\n isOpen,\r\n onClickOutside,\r\n onCreate,\r\n showCreateButton = false,\r\n}) => {\r\n const resultRef = useRef();\r\n\r\n const style = wrapperRef\r\n ? { top: wrapperRef.getBoundingClientRect().height }\r\n : { position: 'relative', height: '150px' };\r\n\r\n useEffect(() => {\r\n const onMousedownEvent = (event) => {\r\n if (\r\n resultRef.current &&\r\n !resultRef.current.contains(event.target) &&\r\n event.target.id !== MODAL_CLOSE_ICON_ID\r\n ) {\r\n //pass event to callback so that if someone has to restrict the invoke based on event target they can implement it inside callback.\r\n onClickOutside(event);\r\n }\r\n };\r\n document.addEventListener('mousedown', onMousedownEvent, false);\r\n return () => {\r\n document.removeEventListener('mousedown', onMousedownEvent, false);\r\n };\r\n }, [onClickOutside, resultRef]);\r\n\r\n if (!isOpen) {\r\n return null;\r\n }\r\n\r\n return (\r\n
          \r\n \r\n {tickmarkList.hasTickmarks() ? (\r\n tickmarkList.tickmarks.map((tickmark) => (\r\n \r\n ))\r\n ) : (\r\n
          \r\n \r\n
          \r\n )}\r\n {showCreateButton && (\r\n \r\n \r\n \r\n )}\r\n
          \r\n
          \r\n );\r\n};\r\n\r\nTickmarkSearchResults.propTypes = {\r\n /** List of tickmark search results */\r\n tickmarkList: PropTypes.instanceOf(TickmarkList).isRequired,\r\n /** Action fired when the add button is clicked */\r\n onAddTickmark: PropTypes.func.isRequired,\r\n /** Search text */\r\n search: PropTypes.string.isRequired,\r\n /** boolean or func to disable the button */\r\n disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]).isRequired,\r\n /** Ref to wrapper component */\r\n wrapperRef: PropTypes.object,\r\n /** If search results should be rendered */\r\n isOpen: PropTypes.bool.isRequired,\r\n /** Function fired when user clicks outside wrapper */\r\n onClickOutside: PropTypes.func.isRequired,\r\n /**If create button should be rendered just below search result */\r\n showCreateButton: PropTypes.bool,\r\n};\r\n\r\nexport default memo(TickmarkSearchResults);\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as Detach } from 'icons/unlink.svg';\r\nimport TickmarkEntry, {\r\n TICKMARK_ENTRY_BLOCK,\r\n} from 'components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-component';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nconst DETACH_ICON_SIZE = '28px';\r\n\r\nconst TICKMARK_DETACH_TOOLTIP = new TooltipOptions({\r\n text: 'common.detach',\r\n id: 'tickmark-unlink-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst TickmarkEntryWithDetach = ({\r\n tickmark,\r\n onDetach,\r\n disabled,\r\n detachIcon,\r\n tooltip = TICKMARK_DETACH_TOOLTIP,\r\n currentlyExpandedTickmarkID,\r\n updateExpandedTickmarkID,\r\n}) => {\r\n return (\r\n onDetach({ tickmark })}\r\n Icon={detachIcon}\r\n iconSize={DETACH_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n }\r\n />\r\n );\r\n};\r\n\r\nTickmarkEntryWithDetach.defaultProps = {\r\n detachIcon: Detach,\r\n};\r\n\r\nTickmarkEntryWithDetach.propTypes = {\r\n /** Tickmark object from the tickmark list endpoint */\r\n // TODO update shape when shape is defined\r\n tickmark: PropTypes.object.isRequired,\r\n /** action fired to detach a work paper from this element */\r\n onDetach: PropTypes.func.isRequired,\r\n /** boolean to disable the button */\r\n disabled: PropTypes.bool.isRequired,\r\n /** svg to use as detach icon */\r\n detachIcon: PropTypes.object,\r\n /* function to set the currently expanded tickmark id after clicking Show More button */\r\n updateExpandedTickmarkID: PropTypes.func,\r\n /** Tickmark id of the tickmark expanded on the toolkit panel after clicking Show More button */\r\n currentlyExpandedTickmarkID: PropTypes.number,\r\n};\r\n\r\nexport default memo(TickmarkEntryWithDetach);\r\n","import React from 'react';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport Search from 'components/common/search-component';\r\nimport SearchResults from 'components/feature/element-panel/tickmark-panel/_element-tickmark-panel-search-results-component';\r\nimport {\r\n debounceSearch,\r\n isSearchCharLengthValid,\r\n} from 'constants/util/search-utility';\r\nimport TickmarkList from 'models/api/tickmark-list-api-model';\r\nimport Loading from 'components/common/loading-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport shortid from 'shortid';\r\nimport TickmarkDetachEntry from 'components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-with-detach-component';\r\nimport { TICKMARK_REMOVE_TOOLTIP } from 'constants/feature/batch-panel-constants';\r\nimport { ReactComponent as CloseButton } from 'icons/close-button.svg';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport PropTypes from 'prop-types';\r\nimport Tickmark from '../../../models/data/tickmark-model';\r\n\r\nexport const CONFIRM_OVERRIDE_SYSTEM_FLAG = 'confirm-override-system-flag';\r\nexport const MIN_CHAR_LENGTH_TO_SEARCH = 1;\r\nexport const MAX_CHAR_LENGTH_TO_SEARCH = 3999;\r\nexport const CREATE_TICKMARK_DUPLICATE_ERROR =\r\n 'ValidationException: This tickmark already exists, try attaching it from existing tickmarks';\r\n\r\nexport const ConfirmOverrideSystemFlag = ({\r\n onClickCancel,\r\n updateOverrideSystemFlag,\r\n disabled = false,\r\n _fetchTickmarks,\r\n _createNewTickmark,\r\n onTickmarkAttach,\r\n}) => {\r\n const [search, setSearch] = React.useState('');\r\n const searchComponentRef = React.useRef(null);\r\n\r\n // It stores the list of matching (from serach) tickmark fetched from BE to display in dropdown for selection\r\n const [tickmarkList, setTickmarkListModel] = React.useState(\r\n new TickmarkList(),\r\n );\r\n const [loading, setLoading] = React.useState(false);\r\n // It stores tickmark list to be attached to an element\r\n const [attachTickmark, setAttachTickmark] = React.useState(\r\n [], // This will contain elements of type Tickmark\r\n );\r\n const [errorMsgId, seterrorMsgId] = React.useState('');\r\n\r\n const _isRequestErrorForDuplicate = (error) =>\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause.includes(\r\n CREATE_TICKMARK_DUPLICATE_ERROR, // error message from API\r\n );\r\n\r\n const _onClickOutside = (e) => {\r\n if (\r\n !(\r\n (searchComponentRef &&\r\n searchComponentRef.current &&\r\n searchComponentRef.current.contains(e.target)) ||\r\n //cancel button\r\n e.target.id === `${CONFIRM_OVERRIDE_SYSTEM_FLAG}-secondary-button`\r\n )\r\n ) {\r\n _clearSearch();\r\n }\r\n };\r\n\r\n const _clearSearch = () => {\r\n setTickmarkListModel(new TickmarkList());\r\n setSearch('');\r\n seterrorMsgId('');\r\n };\r\n\r\n // This function is used for creating new tickmark, when tickmark does not already exists\r\n const updateAttachTickmarkFromSearch = async () => {\r\n try {\r\n setLoading(true);\r\n\r\n // There was BE requirement to wrap tickmark within some HTML tags.\r\n // tickmark text without HTML tags was causing some orientation issues while displaying tickmark in report.\r\n let tickmarkTextToBeCreated = `

          ${search}

          `;\r\n let response = await _createNewTickmark(tickmarkTextToBeCreated);\r\n setAttachTickmark((attachTickmarkList) => {\r\n attachTickmarkList.push(new Tickmark(response.data.result));\r\n return attachTickmarkList;\r\n });\r\n _clearSearch();\r\n } catch (error) {\r\n if (_isRequestErrorForDuplicate(error)) {\r\n seterrorMsgId('create-tickmark-modal.form.rich-text.error.duplicate');\r\n } else {\r\n console.error(error);\r\n }\r\n } finally {\r\n setLoading(false);\r\n }\r\n };\r\n\r\n // This function is used to attach already existing tickmark\r\n // When we are updating tickmark we need tickmarkId also. Hence we need to update it from object\r\n const updateAttachTickmarkFromObject = (tickmarkToAttach) => {\r\n setAttachTickmark((attachTickmarkList) => {\r\n // We want to refine search such that duplicate tickmarks are not there in dropdown\r\n attachTickmarkList.findIndex(\r\n (tickmark) => tickmarkToAttach.tickmarkId === tickmark.tickmarkId,\r\n ) === -1 && attachTickmarkList.push(new Tickmark(tickmarkToAttach));\r\n return attachTickmarkList;\r\n });\r\n _clearSearch();\r\n };\r\n\r\n const _fetchSuggestedTickmarks = async ({ search }) => {\r\n setTickmarkListModel(tickmarkList.setLoading());\r\n try {\r\n let response = await _fetchTickmarks({ search });\r\n setTickmarkListModel(tickmarkList.setLoaded({ response }));\r\n } catch (error) {\r\n setTickmarkListModel((e) => e.setError(error));\r\n }\r\n };\r\n\r\n const _handleAttachTickmark = async () => {\r\n setLoading(true);\r\n try {\r\n if (\r\n attachTickmark &&\r\n typeof onTickmarkAttach === 'function' &&\r\n attachTickmark.length > 0\r\n ) {\r\n for (\r\n let tickmarkIndex = 0;\r\n tickmarkIndex < attachTickmark.length;\r\n tickmarkIndex++\r\n )\r\n await onTickmarkAttach({ tickmark: attachTickmark[tickmarkIndex] });\r\n }\r\n } catch (error) {\r\n setTickmarkListModel(tickmarkList.setError(error));\r\n } finally {\r\n setLoading(false);\r\n }\r\n _clearSearch();\r\n };\r\n\r\n const debouncedSearch = React.useCallback(\r\n debounceSearch(_fetchSuggestedTickmarks),\r\n );\r\n\r\n const _searchTickmarks = async (val) => {\r\n if (val.length >= MAX_CHAR_LENGTH_TO_SEARCH) {\r\n seterrorMsgId(\r\n 'confirm-override-flag-max-search-length-validation-message',\r\n );\r\n return;\r\n }\r\n seterrorMsgId('');\r\n setSearch(val);\r\n const _shouldClearResults =\r\n !isSearchCharLengthValid(val, MIN_CHAR_LENGTH_TO_SEARCH) &&\r\n tickmarkList.isLoaded &&\r\n tickmarkList.hasTickmarks();\r\n if (isSearchCharLengthValid(val, MIN_CHAR_LENGTH_TO_SEARCH)) {\r\n debouncedSearch({ search: val });\r\n } else if (_shouldClearResults) {\r\n setTickmarkListModel(new TickmarkList());\r\n }\r\n };\r\n\r\n const _shouldOpenMenu = isSearchCharLengthValid(\r\n search,\r\n MIN_CHAR_LENGTH_TO_SEARCH,\r\n );\r\n\r\n const _onDetachTickmark = ({ tickmark }) => {\r\n setAttachTickmark((attachTickmarkList) =>\r\n attachTickmarkList.filter(\r\n (attachedTickmark) =>\r\n attachedTickmark.tickmarkId !== tickmark.tickmarkId,\r\n ),\r\n );\r\n };\r\n\r\n return (\r\n {\r\n setLoading(true);\r\n try {\r\n attachTickmark &&\r\n attachTickmark.length > 0 &&\r\n (await _handleAttachTickmark());\r\n\r\n updateOverrideSystemFlag({\r\n systemFlag: true,\r\n });\r\n } catch (err) {\r\n console.log(err);\r\n } finally {\r\n setLoading(false);\r\n onClickCancel();\r\n }\r\n },\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.cancel',\r\n onClick: onClickCancel,\r\n })\r\n }\r\n >\r\n \r\n {loading ? (\r\n \r\n ) : (\r\n
          \r\n \r\n \r\n _onClickOutside(e)}\r\n showCreateButton={true}\r\n onCreate={updateAttachTickmarkFromSearch}\r\n />\r\n
          \r\n {errorMsgId && (\r\n (\r\n \r\n {chunks}\r\n \r\n ),\r\n errorTxt: (...chunks) => (\r\n {chunks}\r\n ),\r\n maxLength: MAX_CHAR_LENGTH_TO_SEARCH - 1,\r\n }}\r\n />\r\n )}\r\n \r\n {attachTickmark.length > 0 &&\r\n attachTickmark.map(\r\n (selectedTickmark) =>\r\n !isNullOrUndefined(selectedTickmark.tickmarkId) && (\r\n \r\n ),\r\n )}\r\n \r\n \r\n )}\r\n \r\n );\r\n};\r\n\r\nConfirmOverrideSystemFlag.propTypes = {\r\n /**function to handle cancel event */\r\n onClickCancel: PropTypes.func.isRequired,\r\n /**function to make api call and handle enabling of system override flag */\r\n updateOverrideSystemFlag: PropTypes.func.isRequired,\r\n /**function to handle creation of new tickmark. API call is made here */\r\n _createNewTickmark: PropTypes.func.isRequired,\r\n /**It is used to enable/disbale permission to attach tickmark in confirm override system flag modal */\r\n disabled: PropTypes.bool,\r\n /**It is used to fetch matching (with text entered in search box) tickmark */\r\n _fetchTickmarks: PropTypes.func.isRequired,\r\n /**A function used handle request about attaching tickmark to an element */\r\n onTickmarkAttach: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ConfirmOverrideSystemFlag;\r\n","import ApiModel from 'models/api-model';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { TICKMARK_TEXT_CHAR_LIMIT } from 'constants/feature/tickmark-constants';\r\nimport htmlToText from 'html-to-text';\r\nexport default class TickmarkForm extends ApiModel({\r\n data: {\r\n text: '',\r\n richText: '',\r\n tickmarkId: null,\r\n revisionId: null,\r\n elementId: null,\r\n noteOrdinal: null,\r\n },\r\n errorDuplicateTickmarkflag: null, //stores the tickmark id to determine if it is replicated\r\n}) {\r\n get text() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.text;\r\n }\r\n return '';\r\n }\r\n\r\n get richText() {\r\n if (!isNullOrUndefined(this.data)) {\r\n return this.data.richText;\r\n }\r\n return '';\r\n }\r\n\r\n get tickmarkId() {\r\n if (this.data) {\r\n return this.data.tickmarkId;\r\n }\r\n return null;\r\n }\r\n\r\n get revisionId() {\r\n if (this.data) {\r\n return this.data.revisionId;\r\n }\r\n return null;\r\n }\r\n get elementId() {\r\n if (this.data) {\r\n return this.data.elementId;\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Initializes a tickmark form from a normal tickmark model\r\n * @param {Tickmark} tickmark\r\n */\r\n fromTickmark(tickmark) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n error: null,\r\n data: { ...tickmark },\r\n });\r\n }\r\n\r\n toApiFormat() {\r\n return {\r\n ...this.data,\r\n richText: this.data.richText,\r\n text: this.data.text,\r\n };\r\n }\r\n\r\n toEditApiFormat() {\r\n return {\r\n richText: this.data.richText,\r\n text: this.data.text,\r\n tickmarkId: this.data.tickmarkId,\r\n revisionId: this.data.revisionId,\r\n };\r\n }\r\n\r\n initFromElement({ elementDetails }) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n data: {\r\n ...this.data,\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n },\r\n });\r\n }\r\n\r\n setText(richText) {\r\n const text = htmlToText.fromString(richText, {\r\n wordwrap: false, // by default it adds new lines after 80 chars, need to disable to ensure no new characters are added\r\n });\r\n // we need to remove ascii codes from strings\r\n // https://stackoverflow.com/questions/20856197/remove-non-ascii-character-in-\r\n\r\n //We need to remove new line characters\r\n //https://stackoverflow.com/questions/10805125/how-to-remove-all-line-breaks-from-a-string\r\n // text = text.replace(/(\\r\\n|\\n|\\r)/gm, '');\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n // eslint-disable-next-line no-control-regex\r\n text: text.trim().replace(/[^\\x00-\\x7F]/g, '').replace(/(\\r\\n|\\n|\\r)/gm, ''),\r\n richText,\r\n },\r\n });\r\n }\r\n\r\n setDuplicateErrorLoaded({ duplicate }) {\r\n return this.merge({\r\n isLoading: false,\r\n isLoaded: true,\r\n errorDuplicateTickmarkflag: duplicate,\r\n });\r\n }\r\n\r\n isTickmarkIdDuplicate() {\r\n return (\r\n !isNullOrUndefined(this.errorDuplicateTickmarkflag) &&\r\n this.errorDuplicateTickmarkflag === true\r\n );\r\n }\r\n\r\n isTextPresent() {\r\n return this.data && this.data.text && this.data.text.length > 0;\r\n }\r\n\r\n isTextTooLong() {\r\n return this.data.text.length > TICKMARK_TEXT_CHAR_LIMIT;\r\n }\r\n\r\n isTickmarkValid() {\r\n return (\r\n this.isTextPresent() &&\r\n !this.isTextTooLong() &&\r\n !this.isTickmarkIdDuplicate()\r\n );\r\n }\r\n\r\n updateTickmark(tickmark) {\r\n return this.merge({\r\n data: {\r\n ...this.data,\r\n text: tickmark.text,\r\n richText: tickmark.richText,\r\n tickmarkId: tickmark.tickmarkId,\r\n noteOrdinal: tickmark.noteOrdinal,\r\n },\r\n });\r\n }\r\n}\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ExpandableRow from 'components/common/expandable-row-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport {\r\n getReviewTooltip,\r\n hoverVerifyTooltip,\r\n reviewInfoButtonTooltip,\r\n getOverrideSystemFlagTooltip,\r\n disableComfortAssignTooltip,\r\n} from 'constants/feature/element-panel-constants';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { ReactComponent as infoIcon } from 'icons/info.svg';\r\nimport { ReactComponent as infoHoverIcon } from 'icons/icon-information-tooltip.svg';\r\nimport ConfirmOverrideSystemFlag from './confirm-override-system-flag-modal-component';\r\nimport { searchTickmarksByRevisionAndElementRequest } from 'api/tickmark-api';\r\nimport { createTickmarkRequest } from 'api/tickmark-api';\r\nimport TickmarkForm from 'models/form/tickmark-form-model';\r\nimport { ELEMENT_ANNOTATIONS_TABS } from 'constants/feature/element-panel-constants';\r\nimport FeatureFlagComponent from 'components/common/feature-flag-component';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\n\r\nconst ELEMENT_STATUS_BLOCK = 'element-status';\r\nconst ELEMENT_STATUS_ID_BLOCK = 'element-status-id';\r\nconst TOOLTIP_EVENT = 'click';\r\n\r\nclass ElementStatus extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n expanded: true,\r\n showInformationMessage: false,\r\n showConfirmOverrideSystemFlag: false,\r\n };\r\n }\r\n componentDidMount() {\r\n //set tooltip specific size for info button on the right panel when the component is mounted\r\n const infoTooltip = document.getElementById(\r\n `${reviewInfoButtonTooltip().id}-tooltip`,\r\n );\r\n if (infoTooltip) infoTooltip.style.width = '300px';\r\n }\r\n componentDidUpdate() {\r\n //set tooltip specific size for info button on the right panel when the component change (like open and close the tab)\r\n if (this.state.expanded) {\r\n const infoTooltip = document.getElementById(\r\n `${reviewInfoButtonTooltip().id}-tooltip`,\r\n );\r\n if (infoTooltip) infoTooltip.style.width = '300px';\r\n }\r\n }\r\n resetState = () => {\r\n if (this.state.showInformationMessage) {\r\n this.setState({\r\n showInformationMessage: false,\r\n });\r\n }\r\n };\r\n\r\n _fetchTickmarks = async ({ search }) => {\r\n const { elementDetails } = this.props;\r\n const response = await searchTickmarksByRevisionAndElementRequest({\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n search,\r\n });\r\n return response;\r\n };\r\n\r\n _createNewTickmark = async (search) => {\r\n let response;\r\n const { elementDetails, setCurrentElementAnnotationsTab } = this.props;\r\n response = await createTickmarkRequest({\r\n tickmark: new TickmarkForm()\r\n .initFromElement({ elementDetails })\r\n .setText(search),\r\n });\r\n setCurrentElementAnnotationsTab(ELEMENT_ANNOTATIONS_TABS.TICKMARK);\r\n\r\n return response;\r\n };\r\n\r\n onTickmarkAttach = async ({ tickmark }) => {\r\n const {\r\n elementDetails,\r\n onAttachTickmark,\r\n setCurrentElementAnnotationsTab,\r\n } = this.props;\r\n tickmark.revisionId = elementDetails.revisionId;\r\n tickmark.elementId = elementDetails.elementId;\r\n await onAttachTickmark({ tickmark });\r\n setCurrentElementAnnotationsTab(ELEMENT_ANNOTATIONS_TABS.TICKMARK);\r\n };\r\n\r\n render() {\r\n const { expanded, showInformationMessage } = this.state;\r\n const {\r\n elementDetails,\r\n updateVerify,\r\n updateReviewed,\r\n updateUserFlag,\r\n updateOverrideSystemFlag,\r\n updateComfortAssignAnnotation,\r\n disabled,\r\n } = this.props;\r\n return (\r\n \r\n this.setState({ expanded: true })}\r\n minimizeExpandableRow={() =>\r\n this.setState({ expanded: false, showInformationMessage: false })\r\n }\r\n showExpandableRow={expanded}\r\n tooltipId={`${ELEMENT_STATUS_BLOCK}__tooltip`}\r\n isElementPanel={true}\r\n >\r\n
          \r\n
          \r\n {\r\n updateVerify({ verified: !elementDetails.internalVerified });\r\n }}\r\n disabled={\r\n disabled ||\r\n (elementDetails.isVerified() && elementDetails.isReviewed())\r\n }\r\n tooltip={disabled ? null : hoverVerifyTooltip}\r\n />\r\n {\r\n updateUserFlag({ userFlag: !elementDetails.flagUser });\r\n }}\r\n width={'auto'}\r\n disabled={disabled}\r\n />\r\n \r\n \r\n updateComfortAssignAnnotation({\r\n comfortAssignVal: !elementDetails.comfortAssign,\r\n })\r\n }\r\n width={'auto'}\r\n disabled={disabled}\r\n tooltip={disabled ? disableComfortAssignTooltip : null}\r\n />\r\n \r\n
          \r\n
          \r\n \r\n {\r\n updateReviewed({ reviewed: !elementDetails.reviewed });\r\n }}\r\n disabled={disabled || !elementDetails.isVerified()}\r\n tooltip={getReviewTooltip(elementDetails)}\r\n />\r\n {\r\n this.setState({\r\n showInformationMessage: !showInformationMessage,\r\n });\r\n }}\r\n tooltip={reviewInfoButtonTooltip(TOOLTIP_EVENT)}\r\n position={'bottom'}\r\n tooltipOnHideFunction={this.resetState}\r\n />\r\n
          \r\n\r\n \r\n elementDetails.isSystemOverrideFlagged()\r\n ? updateOverrideSystemFlag({\r\n systemFlag: false,\r\n })\r\n : this.setState({\r\n showConfirmOverrideSystemFlag: true,\r\n })\r\n }\r\n width={'auto'}\r\n disabled={\r\n disabled ||\r\n !(\r\n elementDetails.isFormulaFlagged() ||\r\n elementDetails.isInternalRefFlagged() ||\r\n elementDetails.isSystemOverrideFlagged()\r\n )\r\n }\r\n tooltip={getOverrideSystemFlagTooltip(elementDetails)}\r\n />\r\n
          \r\n \r\n \r\n {this.state.showConfirmOverrideSystemFlag && (\r\n \r\n this.setState({\r\n showConfirmOverrideSystemFlag: false,\r\n })\r\n }\r\n updateOverrideSystemFlag={updateOverrideSystemFlag}\r\n _fetchTickmarks={this._fetchTickmarks}\r\n _createNewTickmark={this._createNewTickmark}\r\n onTickmarkAttach={this.onTickmarkAttach}\r\n disabled={disabled}\r\n >\r\n )}\r\n
          \r\n );\r\n }\r\n}\r\nElementStatus.propTypes = {\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Action that set element as verified */\r\n updateVerify: PropTypes.func.isRequired,\r\n /** Action that set element as reviewed */\r\n updateReviewed: PropTypes.func.isRequired,\r\n /** Action to update user flag for element */\r\n updateUserFlag: PropTypes.func.isRequired,\r\n /**Action to update system flag */\r\n updateOverrideSystemFlag: PropTypes.func.isRequired,\r\n /**Action to handle request for attaching tickmark */\r\n onAttachTickmark: PropTypes.func.isRequired,\r\n /**function to make API call and fetch tickmarklist */\r\n fetchTickmarkList: PropTypes.func.isRequired,\r\n /**String that represnts type of left panel opened */\r\n leftPanel: PropTypes.string.isRequired,\r\n /** Action to set boolean value for comfortAssign elements variable */\r\n updateComfortAssignAnnotation: PropTypes.func.isRequired,\r\n /** Action to set the annotations tab */\r\n setCurrentElementAnnotationsTab: PropTypes.func.isRequired,\r\n};\r\nexport default ElementStatus;\r\n","import { connect } from 'react-redux';\r\nimport {\r\n updateVerify,\r\n updateReviewed,\r\n updateUserFlag,\r\n updateOverrideSystemFlag,\r\n updateComfortAssignAnnotation,\r\n} from 'store/actions/element-panel-actions';\r\nimport ElementStatus from 'components/feature/element-panel/element-status-component';\r\nimport {\r\n getElementTickmarksAndUpdateElementCache,\r\n attachTickmarkToElement,\r\n} from 'store/actions/element-panel-actions';\r\nimport { fetchTickmarkListForRevisionWithoutLoading } from '../../../store/actions/tickmark-list-panel-actions';\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n revision,\r\n elementPanel: { elementDetails },\r\n },\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n}) => ({\r\n elementDetails,\r\n leftPanel: left,\r\n});\r\nconst mapDispatchToProps = {\r\n updateVerify,\r\n updateReviewed,\r\n updateUserFlag,\r\n updateOverrideSystemFlag,\r\n updateComfortAssignAnnotation,\r\n onCreateTickmark: getElementTickmarksAndUpdateElementCache,\r\n onAttachTickmark: attachTickmarkToElement,\r\n fetchTickmarkList: fetchTickmarkListForRevisionWithoutLoading,\r\n};\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ElementStatus);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ExpandableRow from 'components/common/expandable-row-component';\r\nimport { SearchDropdownApi } from 'components/common/search-component';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport TabModel from 'models/utils/common/tab-model';\r\n\r\nimport {\r\n SCALING_OPTIONS,\r\n UNIT_OPTIONS,\r\n} from 'constants/feature/element-attribute-constants';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport MenuApiData from 'models/utils/common/menu/menu-api-data-model';\r\nimport { PeriodList } from 'models/api/period-list-model';\r\nimport { EntityList } from 'models/api/entity-list-model';\r\n\r\nconst ELEMENT_ATTRIBUTE_BLOCK = 'element-attributes';\r\nconst ELEMENT_ATTIBUTE_ID_BLOCK = 'element-attribute-id';\r\n\r\nconst PERIOD_DROPDOWN_DISPLAY_LIMIT = 5;\r\nconst ENTITY_DROPDOWN_DISPLAY_LIMIT = 5;\r\nconst MIN_CHAR_LENGTH_TO_SEARCH = 0;\r\n\r\nclass ElementAttribute extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n search: '',\r\n expanded: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { elementDetails } = this.props;\r\n this.setState((state) => ({\r\n search: elementDetails.entity,\r\n }));\r\n }\r\n\r\n componentDidUpdate(prevProps) {\r\n const { elementDetails } = this.props;\r\n if (prevProps.elementDetails.entity !== elementDetails.entity) {\r\n this.setState(() => ({\r\n search: elementDetails.entity,\r\n }));\r\n }\r\n }\r\n\r\n _searchEntities = (val) => {\r\n this.setState({ search: val });\r\n };\r\n\r\n _setEntity = ({ value }) => {\r\n const { updateOrCreateEntity } = this.props;\r\n this.setState(\r\n {\r\n search: value,\r\n },\r\n () => updateOrCreateEntity(value),\r\n );\r\n };\r\n\r\n render() {\r\n const { search, expanded } = this.state;\r\n const {\r\n elementDetails,\r\n updateScaling,\r\n updateOrCreateEntity,\r\n updateUnits,\r\n periodList,\r\n updatePeriod,\r\n entityList,\r\n disabled,\r\n selectedElementPanelAnnotationsTab,\r\n } = this.props;\r\n return (\r\n \r\n this.setState({ expanded: true })}\r\n minimizeExpandableRow={() => this.setState({ expanded: false })}\r\n showExpandableRow={expanded}\r\n tooltipId={`${ELEMENT_ATTRIBUTE_BLOCK}__tooltip`}\r\n isElementPanel={true}\r\n >\r\n
          \r\n
          \r\n
          \r\n \r\n updateScaling(val, selectedElementPanelAnnotationsTab)\r\n }\r\n disabled={disabled}\r\n />\r\n
          \r\n
          \r\n \r\n updateUnits(option, selectedElementPanelAnnotationsTab)\r\n }\r\n disabled={disabled}\r\n />\r\n
          \r\n
          \r\n\r\n
          \r\n
          \r\n \r\n updatePeriod(period, selectedElementPanelAnnotationsTab)\r\n }\r\n numberOfVisibleRows={PERIOD_DROPDOWN_DISPLAY_LIMIT}\r\n isNotIntl\r\n disabled={disabled}\r\n />\r\n
          \r\n
          \r\n\r\n
          \r\n
          \r\n {\r\n this.setState({ search: '' });\r\n }}\r\n isCreate={true}\r\n onCreateClick={() => {\r\n updateOrCreateEntity(\r\n search,\r\n selectedElementPanelAnnotationsTab,\r\n );\r\n }}\r\n minSearchCharLength={MIN_CHAR_LENGTH_TO_SEARCH}\r\n showSearchButton={true}\r\n onSelectResult={this._setEntity}\r\n numberOfVisibleRows={ENTITY_DROPDOWN_DISPLAY_LIMIT}\r\n disabled={disabled}\r\n />\r\n
          \r\n
          \r\n
          \r\n \r\n
          \r\n );\r\n }\r\n}\r\nElementAttribute.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** The list of periods that can be chosen for this element */\r\n periodList: PropTypes.instanceOf(PeriodList).isRequired,\r\n /** The list of periods that can be chosen for this element */\r\n entityList: PropTypes.instanceOf(EntityList).isRequired,\r\n /** Function for updating scaling value */\r\n updateScaling: PropTypes.func.isRequired,\r\n /** Function for updating units value */\r\n updateUnits: PropTypes.func.isRequired,\r\n /** Function for updating entities */\r\n updateOrCreateEntity: PropTypes.func.isRequired,\r\n /** Function for updating period value */\r\n updatePeriod: PropTypes.func.isRequired,\r\n /** Selected tab for the annotations table */\r\n selectedElementPanelAnnotationsTab: PropTypes.instanceOf(TabModel).isRequired,\r\n};\r\nexport default ElementAttribute;\r\n","import { connect } from 'react-redux';\r\nimport {\r\n updateScaling,\r\n updateOrCreateEntity,\r\n updateUnits,\r\n updatePeriod,\r\n} from 'store/actions/element-panel-actions';\r\nimport ElementAttributes from 'components/feature/element-panel/element-attributes-component';\r\nconst mapStateToProps = ({\r\n data: {\r\n elementPanel: { elementDetails, periodList, entityList },\r\n },\r\n}) => ({\r\n elementDetails,\r\n periodList,\r\n entityList,\r\n});\r\nconst mapDispatchToProps = {\r\n updateScaling,\r\n updateOrCreateEntity,\r\n updateUnits,\r\n updatePeriod,\r\n};\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ElementAttributes);\r\n","import moment from 'moment';\r\nimport PropTypes from 'prop-types';\r\nimport React, { useCallback, useEffect, useState } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { connect } from 'react-redux';\r\n\r\nimport ExpandableRow from 'components/common/expandable-row-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { HISTORIC_ACTIONS } from 'constants/feature/element-panel-constants';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport ElementHistory from 'models/api/element-history-api-model';\r\nimport { getHistoryForElementPanel } from 'store/actions/element-panel-actions';\r\nimport { getSystemUserOrUserNameByUserId } from 'utils/statement-content-page-utils';\r\n\r\nexport const ELEMENT_HISTORY_BLOCK = 'element-history';\r\n\r\nexport const ElementHistorySection = ({\r\n elementDetails,\r\n elementHistory,\r\n getHistoryForElementPanel,\r\n}) => {\r\n const [expanded, setExpanded] = useState(false);\r\n\r\n useEffect(() => {\r\n getHistoryForElementPanel();\r\n }, [getHistoryForElementPanel]);\r\n\r\n const renderEntry = useCallback((entry) => {\r\n if (!HISTORIC_ACTIONS[entry.elementAction]) {\r\n return null;\r\n }\r\n return (\r\n
          \r\n

          \r\n \r\n \r\n \r\n {chunks},\r\n }}\r\n />\r\n

          \r\n

          \r\n \r\n

          \r\n
          \r\n );\r\n }, []);\r\n\r\n return (\r\n \r\n setExpanded(true)}\r\n minimizeExpandableRow={() => setExpanded(false)}\r\n showExpandableRow={expanded}\r\n tooltipId={`${ELEMENT_HISTORY_BLOCK}__tooltip`}\r\n isElementPanel={true}\r\n >\r\n {elementHistory.entries.length > 0 ? (\r\n elementHistory.entries.map(renderEntry)\r\n ) : (\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nElementHistorySection.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Specified element's history */\r\n elementHistory: PropTypes.instanceOf(ElementHistory).isRequired,\r\n /** action fired to get history for selected element */\r\n getHistoryForElementPanel: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n elementPanel: { elementDetails, elementHistory },\r\n },\r\n}) => ({\r\n elementDetails,\r\n elementHistory,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n getHistoryForElementPanel,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(ElementHistorySection);\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport TabsGroup from 'components/common/tabs-group-component';\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { getDynamicElementAnnotationsTabs } from 'constants/feature/element-panel-constants';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\nimport ElementComfortLetterList from 'models/api/element-comfort-letter-list-model';\r\n\r\nconst ANNOTATIONS_BLOCK = 'annotations-tabs';\r\nconst ANNOTATIONS_ID_BLOCK = 'annotations-tabs-id';\r\n\r\nconst ElementPanelAnnotationsTab = ({\r\n elementDetails,\r\n formulaList,\r\n selectedElementPanelAnnotationsTab,\r\n setCurrentElementAnnotationsTab,\r\n internalReference,\r\n tickmarkList,\r\n workpaperList,\r\n comfortLetterList,\r\n}) => {\r\n return (\r\n \r\n
          \r\n \r\n
          \r\n
          \r\n );\r\n};\r\n\r\nElementPanelAnnotationsTab.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** The currently selected tab in the element panel */\r\n selectedElementPanelAnnotationsTab: PropTypes.instanceOf(TabModel).isRequired,\r\n /** Action fired when a user changes the currently selected tab in the element annotations tab component*/\r\n setCurrentElementAnnotationsTab: PropTypes.func.isRequired,\r\n /** The list of formulas for the current element*/\r\n formulaList: PropTypes.instanceOf(FormulaList).isRequired,\r\n /** Internal reference that is currently linked to this element */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /** List of workpapers associated with this element */\r\n workpaperList: PropTypes.instanceOf(ElementWorkpaperList).isRequired,\r\n /**List of comfort letters attached to this element */\r\n comfortLetterList: PropTypes.instanceOf(ElementComfortLetterList).isRequired,\r\n};\r\n\r\nexport default memo(ElementPanelAnnotationsTab);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0 2.87501V1.10871C0.662363 0.310474 1.40964 -0.0461826 2.51358 0.0047684C4.17798 0.157621 4.78617 0.840587 6.16507 1.10871C7.38789 1.34648 8.23708 0.548246 8.78055 0.0047684V1.77107C7.88042 2.63724 7.18409 2.79009 6.16507 2.79009C5.14605 2.79009 3.60054 1.73144 2.41168 1.65218C1.39266 1.58425 0.379302 2.42777 0 2.87501Z\",\n fill: \"#00A3E0\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0.016983 6.00001V4.23371C0.679346 3.43547 1.42663 3.07882 2.53057 3.12977C4.19496 3.28262 4.80315 3.96559 6.18205 4.23371C7.40488 4.47148 8.25406 3.67325 8.79754 3.12977V4.89607C7.8974 5.76224 7.20107 5.91509 6.18205 5.91509C5.16303 5.91509 3.61752 4.85644 2.42866 4.77718C1.40964 4.70925 0.396285 5.55277 0.016983 6.00001Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgRoundNumber = function SvgRoundNumber(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 9,\n height: 6,\n viewBox: \"0 0 9 6\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRoundNumber, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/round-number.88b20b4d.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.5858 0C10.851 0 11.1054 0.105357 11.2929 0.292893L14.7071 3.70711C14.8946 3.89464 15 4.149 15 4.41421V12.5C15 12.7761 14.7761 13 14.5 13H10V15.5C10 15.7761 9.77614 16 9.5 16H0.5C0.223858 16 0 15.7761 0 15.5V3.5C0 3.22386 0.223858 3 0.5 3H5V0.5C5 0.223858 5.22386 0 5.5 0H10.5858ZM5 4H1V15H9V8H6C5.48716 8 5.06449 7.61396 5.00673 7.11662L5 7V4ZM10 1H6L6.00109 3.09032C6.10866 3.13942 6.20767 3.20767 6.29289 3.29289L9.70711 6.70711C9.89464 6.89464 10 7.149 10 7.41421V12H14V5H11C10.4872 5 10.0645 4.61396 10.0067 4.11662L10 4V1ZM8.586 7L6 4.415V7H8.586ZM11 1.415V4H13.586L11 1.415Z\",\n fill: \"#007CB0\"\n});\n\nvar SvgCopy = function SvgCopy(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 15,\n height: 16,\n viewBox: \"0 0 15 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCopy, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/copy.c3576409.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport FormulaListEntry from 'models/data/formula/formula-list-entry-model';\r\nimport { ReactComponent as FlaggedIcon } from 'icons/flag-icon.svg';\r\nimport {\r\n getResultDisplay,\r\n ROUND_NUMBER_ICON_HEIGHT,\r\n ROUND_NUMBER_ICON_WIDTH,\r\n} from 'constants/feature/formula-constants';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport { ReactComponent as TrashCan } from 'icons/delete-icon.svg';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { ReactComponent as RoundNumberIcon } from 'icons/round-number.svg';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { ReactComponent as CopyFormulaIcon } from 'icons/copy.svg';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\nimport AutomaticallyIdentifiedAnnotations from 'components/common/automatically-identified-annotations';\r\nimport { AUTOMATION_CREATION_TYPE } from 'constants/feature/element-panel-constants';\r\nimport { shouldRestrictAutomaticIdentifier } from 'utils/statement-content-page-utils';\r\n\r\nconst FORMULA_ENTRY_BLOCK = 'formula-entry';\r\nconst FORMULA_ENTRY_ID_BLOCK = 'formula-entry-id';\r\n\r\nconst FORMULA_ENTRY_FLAGGED_ICON_SIZE = '16px';\r\n\r\nconst TRASHCAN_ICON_SIZE = '28';\r\nconst COPYFORMULA_ICON_SIZE = '18';\r\n\r\nconst FORMULA_ENTRY_TOOLTIP = new TooltipOptions({\r\n text: 'common.delete',\r\n id: 'tooltip-unlink-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst COPY_FORMULA_TOOLTIP = new TooltipOptions({\r\n text: 'element-panel.annotation.content.formula.copy-formula',\r\n id: 'tooltip-copy-formula-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst FormulaEntry = ({\r\n formulaEntry,\r\n units,\r\n onHover,\r\n formulaDeleteAction,\r\n onClick,\r\n disabled,\r\n CopyFormulaAction,\r\n isSelectedForCopy,\r\n isFormulaCopied,\r\n isSystemFlagOverride,\r\n numberFormatId,\r\n}) => {\r\n return (\r\n !disabled && onClick(formulaEntry.id)}\r\n disabled={disabled}\r\n >\r\n
          \r\n {!shouldRestrictAutomaticIdentifier() &&\r\n Object.values(AUTOMATION_CREATION_TYPE).includes(\r\n formulaEntry.creationType,\r\n ) && (\r\n \r\n )}\r\n
          \r\n \r\n {formulaEntry.isFormulaRounded() && (\r\n
          \r\n \r\n
          \r\n )}\r\n {formulaEntry.isFlagged() && !isSystemFlagOverride ? (\r\n \r\n ) : null}\r\n {getResultDisplay({\r\n result: !isNullOrUndefined(formulaEntry.roundingResult)\r\n ? formulaEntry.roundingResult\r\n : formulaEntry.computedResult,\r\n units,\r\n numberFormatId,\r\n })}\r\n
          \r\n
          \r\n {formulaEntry.getExpression(numberFormatId)}\r\n
          \r\n
          \r\n \r\n
          \r\n {/* Don't show option to copy formula for restricted user/read only mode (disabled flag) */}\r\n {/* Don't show option to copy formula when some other formula is already copied (isFormulaCopied flag) */}\r\n {!disabled && !isFormulaCopied && (\r\n {\r\n e.stopPropagation();\r\n CopyFormulaAction(\r\n new FormulaList({\r\n data: {\r\n formulas: [formulaEntry], // type FormulaListEntry\r\n },\r\n }),\r\n );\r\n }}\r\n Icon={CopyFormulaIcon}\r\n iconSize={COPYFORMULA_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n )}\r\n {\r\n e.stopPropagation();\r\n formulaDeleteAction(\r\n formulaEntry.formulaId,\r\n formulaEntry.creationType,\r\n formulaEntry.type,\r\n );\r\n }}\r\n Icon={TrashCan}\r\n iconSize={TRASHCAN_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n
          \r\n \r\n );\r\n};\r\n\r\nFormulaEntry.propTypes = {\r\n /** Specified formula's details */\r\n formulaEntry: PropTypes.instanceOf(FormulaListEntry).isRequired,\r\n /** The units of the formula used for display */\r\n units: PropTypes.instanceOf(MenuOption),\r\n /** Action for deleting a formula from the formula list */\r\n formulaDeleteAction: PropTypes.func.isRequired,\r\n /** Action fired to get details for edit */\r\n onClick: PropTypes.func.isRequired,\r\n /** To Check if disabled */\r\n disabled: PropTypes.bool.isRequired,\r\n /** Action fired once formula is clicked for copy */\r\n CopyFormulaAction: PropTypes.func.isRequired,\r\n /** Returns if formula selected for copy */\r\n isSelectedForCopy: PropTypes.bool.isRequired,\r\n /** Checks if in copy formula mode */\r\n isFormulaCopied: PropTypes.bool.isRequired,\r\n /**Flag to check if system flag is overriden */\r\n isSystemFlagOverride: PropTypes.bool.isRequired,\r\n /**numberFormatId is a number to get the format which amount field of selected statement to be displayed in element/formula panels */\r\n numberFormatId: PropTypes.number,\r\n};\r\n\r\nexport default memo(FormulaEntry);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\nimport FormulaEntry from 'components/feature/element-panel/annotations/_formula-entry-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport Permissions from 'permissions/permissions';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { ReactComponent as CopyFormulaIcon } from 'icons/copy.svg';\r\nimport { getCurrentTable } from 'utils/copy-formula-utils';\r\nimport BatchUpdateElementList from 'models/data/batch-update-element-list-model';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport {\r\n FORMULA_OPTIONS,\r\n FORMULA_OPTIONS_MAP,\r\n} from 'constants/feature/element-panel-constants';\r\nimport { updateFormulaTypeRequest } from 'api/formula-api';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\n\r\nexport const ELEMENT_FORMULA_LIST_BLOCK = 'element-formula-list';\r\nconst ELEMENT_FORMULA_LIST_ID_BLOCK = 'element-formula-list-id';\r\nexport const DEFAULT_HOVERED_FORMULA_INDEX = null;\r\nconst FORMULA_BUTTON_ICON_SIZE = 28;\r\nclass ElementFormulaList extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n hoveredFormulaIndex: DEFAULT_HOVERED_FORMULA_INDEX,\r\n isLoading: false,\r\n isLoaded: true,\r\n error: null,\r\n };\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n const { hoveredFormulaIndex } = this.state;\r\n const {\r\n replaceSelectedElements,\r\n replaceSelectedElementWithoutRemovingOld,\r\n elementDetails,\r\n formulaList,\r\n copyFormulaSelectedElement,\r\n } = this.props;\r\n const _shouldClearHighlightedElements =\r\n hoveredFormulaIndex === DEFAULT_HOVERED_FORMULA_INDEX &&\r\n prevState.hoveredFormulaIndex !== DEFAULT_HOVERED_FORMULA_INDEX;\r\n const _shouldHighlightNewElements =\r\n !_shouldClearHighlightedElements &&\r\n hoveredFormulaIndex !== prevState.hoveredFormulaIndex;\r\n if (_shouldClearHighlightedElements) {\r\n // Clear Hovered Formula elements colour\r\n replaceSelectedElements({ elementIds: [elementDetails.id] });\r\n // Switch to highlighting Elements selected for copy formula\r\n if (\r\n copyFormulaSelectedElement &&\r\n copyFormulaSelectedElement.selectedElementIds &&\r\n copyFormulaSelectedElement.selectedElementIds.length > 0\r\n ) {\r\n replaceSelectedElementWithoutRemovingOld({\r\n elementIds: [...copyFormulaSelectedElement.selectedElementIds],\r\n color: ELEMENT_HIGHLIGHT_STATES.SELECTED_FOR_COPY_FORMULA,\r\n });\r\n }\r\n } else if (_shouldHighlightNewElements) {\r\n // highlight root element and other elements\r\n replaceSelectedElements({\r\n elementIds: [\r\n elementDetails.id,\r\n ...formulaList.get(hoveredFormulaIndex).includedElementIds,\r\n ],\r\n color: ELEMENT_HIGHLIGHT_STATES.HOVERED_FROM_FORMULA,\r\n });\r\n }\r\n }\r\n\r\n _handleFormulaEntryHover = (newIndex) => {\r\n const { hoveredFormulaIndex } = this.state;\r\n if (hoveredFormulaIndex !== newIndex) {\r\n this.setState({\r\n hoveredFormulaIndex: newIndex,\r\n });\r\n }\r\n };\r\n\r\n _clearHoveredFormulaIndex = () => {\r\n this.setState({\r\n hoveredFormulaIndex: DEFAULT_HOVERED_FORMULA_INDEX,\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n onNew,\r\n formulaList,\r\n elementDetails,\r\n formulaDeleteAction,\r\n onEdit,\r\n selectedProjectId,\r\n readOnly,\r\n initcopyFormula,\r\n stopCopyFormula,\r\n isCopiedFormula,\r\n copiedFormula,\r\n copyFormulaSelectedElement,\r\n getTableMatrix,\r\n getHistoryForElementPanel,\r\n getElementFormulasWithoutLoading,\r\n numberFormatId,\r\n isOCR,\r\n getCurrentOCRTable,\r\n getOcrTableMatrix,\r\n updateElementCacheByCalloutAction,\r\n } = this.props;\r\n\r\n const _permissionToEdit =\r\n Permissions.Formula.canEditFormula(selectedProjectId);\r\n\r\n const _onCopyFormula = (copiedFormula) => {\r\n if (isOCR) {\r\n const ocrTable = getCurrentOCRTable(elementDetails);\r\n if (ocrTable.currentTable) {\r\n const tableMatrix = getOcrTableMatrix(ocrTable);\r\n initcopyFormula(tableMatrix, copiedFormula);\r\n }\r\n } else {\r\n const table = getCurrentTable(elementDetails.id);\r\n if (table) {\r\n const tableMatrix = getTableMatrix(table);\r\n initcopyFormula(tableMatrix, copiedFormula);\r\n }\r\n }\r\n };\r\n\r\n const _onStopCopyFormula = () => {\r\n stopCopyFormula();\r\n };\r\n\r\n const setFormulaPanelLoadingState = () => {\r\n this.setState({ isLoading: true, isLoaded: false });\r\n };\r\n const setFormulaPanelLoadedState = () => {\r\n this.setState({ isLoading: false, isLoaded: true });\r\n };\r\n\r\n const _saveFormulaOnSelect = async (option, formula) => {\r\n setFormulaPanelLoadingState();\r\n\r\n try {\r\n await updateFormulaTypeRequest({\r\n id: formula.id,\r\n revisionId: formula.revisionId,\r\n elementId: formula.elementId,\r\n type: option.value,\r\n formulaOverride: 1,\r\n });\r\n await getHistoryForElementPanel();\r\n await getElementFormulasWithoutLoading({\r\n elementId: formula.elementId,\r\n });\r\n setFormulaPanelLoadedState();\r\n updateElementCacheByCalloutAction({\r\n elementIds: [formula.elementId],\r\n showCallout: true,\r\n });\r\n } catch (error) {\r\n this.setState({\r\n isLoading: false,\r\n isLoaded: false,\r\n error: error,\r\n });\r\n }\r\n };\r\n\r\n return (\r\n
          \r\n
          \r\n {!readOnly && (\r\n \r\n \r\n \r\n )}\r\n\r\n {!readOnly &&\r\n _permissionToEdit &&\r\n formulaList.hasFormulas() &&\r\n (!isCopiedFormula ? (\r\n {\r\n e.stopPropagation();\r\n _onCopyFormula(formulaList);\r\n }}\r\n Icon={CopyFormulaIcon}\r\n iconSize={FORMULA_BUTTON_ICON_SIZE}\r\n >\r\n \r\n \r\n ) : (\r\n copyFormulaSelectedElement &&\r\n copyFormulaSelectedElement.selectedElementIds &&\r\n copyFormulaSelectedElement.selectedElementIds.length > 0 && (\r\n \r\n \r\n \r\n )\r\n ))}\r\n
          \r\n \r\n {formulaList.hasFormulas() ? (\r\n formulaList.getFormulas().map((formula, index) => {\r\n return (\r\n <>\r\n {\r\n this._handleFormulaEntryHover(index);\r\n }}\r\n numberFormatId={numberFormatId}\r\n formulaDeleteAction={formulaDeleteAction}\r\n onClick={onEdit}\r\n isSystemFlagOverride={elementDetails.isSystemOverrideFlagged()}\r\n isSelectedForCopy={\r\n copiedFormula &&\r\n copiedFormula.data &&\r\n copiedFormula.data.formulas &&\r\n copiedFormula.data.formulas.length > 0 &&\r\n copiedFormula.data.formulas.findIndex(\r\n (copiedObj) =>\r\n copiedObj.formulaId === formula.formulaId,\r\n ) !== -1\r\n }\r\n isFormulaCopied={isCopiedFormula}\r\n CopyFormulaAction={_onCopyFormula}\r\n selectedProjectId={selectedProjectId}\r\n disabled={!_permissionToEdit || readOnly}\r\n />\r\n \r\n \r\n {\r\n _saveFormulaOnSelect(option, formula);\r\n }}\r\n numberOfVisibleRows={5}\r\n menuClassName={`${ELEMENT_FORMULA_LIST_BLOCK}__formula-dropdown-menu`}\r\n disabled={!_permissionToEdit || readOnly}\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\nElementFormulaList.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Action fired when user clicks the new formula button */\r\n onNew: PropTypes.func.isRequired,\r\n /** Action fired when user clicks the copy all formulas button */\r\n onCopyAll: PropTypes.func.isRequired,\r\n /** The list of formulas for the current element*/\r\n formulaList: PropTypes.instanceOf(FormulaList).isRequired,\r\n /** Action fired to highlight elements in the content panel on hover of a formula entry */\r\n replaceSelectedElements: PropTypes.func.isRequired,\r\n /** Action fired to highlight elements in the content panel without replacing old highlight */\r\n replaceSelectedElementWithoutRemovingOld: PropTypes.func.isRequired,\r\n /** Action for deleting a formula from the formula list */\r\n formulaDeleteAction: PropTypes.func.isRequired,\r\n /** Action fired to get details for edit */\r\n onEdit: PropTypes.func.isRequired,\r\n /** Boolean for read only mode */\r\n readOnly: PropTypes.bool.isRequired,\r\n /** The action used to set copied formulas and Table matrix to the store*/\r\n initcopyFormula: PropTypes.func.isRequired,\r\n /** The action used to clear copied formulas and Table matrix from the store*/\r\n stopCopyFormula: PropTypes.func.isRequired,\r\n /** The action used to obtain table matrix for the concerned copy formula table*/\r\n getTableMatrix: PropTypes.func.isRequired,\r\n /** to check if user has copied formula*/\r\n isCopiedFormula: PropTypes.bool.isRequired,\r\n /** to check if user has copied formula*/\r\n copiedFormula: PropTypes.instanceOf(FormulaList).isRequired,\r\n copyFormulaSelectedElement: PropTypes.instanceOf(BatchUpdateElementList)\r\n .isRequired,\r\n /** action fired to get history for selected element */\r\n getHistoryForElementPanel: PropTypes.func.isRequired,\r\n /** action fired to get updated formulas without loading */\r\n getElementFormulasWithoutLoading: PropTypes.func.isRequired,\r\n /**numberFormatId is a number to get the format which amount field of selected statement to be displayed in element/formula panels */\r\n numberFormatId: PropTypes.number,\r\n /** returns true if statement is OCR statement */\r\n isOCR: PropTypes.bool,\r\n /** function used to get current table based on select element in OCR statement */\r\n getCurrentOCRTable: PropTypes.func,\r\n /** function used to get table matrix of current table in OCR statement */\r\n getOcrTableMatrix: PropTypes.func,\r\n /** set formula updated or added element ids */\r\n updateElementCacheByCalloutAction: PropTypes.func,\r\n};\r\n\r\nexport default ElementFormulaList;\r\n","import { connect } from 'react-redux';\r\nimport {} from 'store/actions/element-panel-actions';\r\nimport ElementFormulaList from 'components/feature/element-panel/annotations/_element-panel-formula-list-annotation-component';\r\nimport {\r\n replaceSelectedElementsContentPanel,\r\n replaceSelectedElementWithoutRemovingOld,\r\n} from 'store/actions/statement-content-actions';\r\nimport { deleteFormulaFromList } from 'store/actions/element-panel-actions';\r\nimport {\r\n initcopyFormula,\r\n stopCopyFormula,\r\n getTableMatrix,\r\n getCurrentOCRTable,\r\n getOcrTableMatrix,\r\n} from 'store/actions/copy-formula-actions';\r\nimport {\r\n getHistoryForElementPanel,\r\n getElementFormulasWithoutLoading,\r\n} from 'store/actions/element-panel-actions';\r\nimport { updateElementCacheByCalloutAction } from 'store/actions/element-cache-actions';\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n elementPanel: { elementDetails, formulaList },\r\n selectedProject: { id },\r\n selectedStatement: { statement, isOCR },\r\n copyFormula: { copiedFormula, copyFormulaSelectedElement },\r\n statementContent: {\r\n sectionsCache: { cache },\r\n },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n ...ownProps,\r\n elementDetails,\r\n formulaList,\r\n copiedFormula,\r\n copyFormulaSelectedElement,\r\n numberFormatId: statement.numberFormatId,\r\n selectedProjectId: id,\r\n isOCR,\r\n isCopiedFormula:\r\n copiedFormula &&\r\n copiedFormula.data &&\r\n copiedFormula.data.formulas &&\r\n copiedFormula.data.formulas.length > 0,\r\n sectionsCache: cache,\r\n});\r\nconst mapDispatchToProps = {\r\n replaceSelectedElements: replaceSelectedElementsContentPanel,\r\n replaceSelectedElementWithoutRemovingOld,\r\n formulaDeleteAction: deleteFormulaFromList,\r\n initcopyFormula: initcopyFormula,\r\n stopCopyFormula: stopCopyFormula,\r\n getTableMatrix,\r\n getOcrTableMatrix,\r\n getHistoryForElementPanel,\r\n getElementFormulasWithoutLoading,\r\n getCurrentOCRTable,\r\n updateElementCacheByCalloutAction,\r\n};\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ElementFormulaList);\r\n","import React from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport AmountAttributeDetails from 'components/common/element-amount-attributes-details-component';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as Unlink } from 'icons/unlink.svg';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { ANNOTATION_DISPLAY_FUNCTIONS } from 'constants/feature/tieout-element-constants';\r\nimport {\r\n getElementFlaggedIcon,\r\n AUTOMATION_CREATION_TYPE,\r\n} from 'constants/feature/element-panel-constants';\r\nimport { COMFORT_ASSIGN_ELEMENT } from 'components/feature/statement-content-panel/tieout-element-component';\r\nimport FeatureFlagComponent from 'components/common/feature-flag-component';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport AutomaticallyIdentifiedAnnotations from 'components/common/automatically-identified-annotations';\r\nimport { shouldRestrictAutomaticIdentifier } from 'utils/statement-content-page-utils';\r\nimport { getOCRElementStyleByElementStatus } from 'constants/feature/element-panel-constants';\r\n\r\nexport const INTERNAL_REFERENCE_ELEMENT_ENTRY_BLOCK =\r\n 'internal-reference-element-entry';\r\nconst INTERNAL_REFERENCE_ELEMENT_ENTRY_ID_BLOCK =\r\n 'internal-reference-element-entry-id';\r\n\r\nconst UNLINK_ICON_SIZE = '28px';\r\n\r\nconst INTERNAL_REF_ENTRY_TOOLTIP = new TooltipOptions({\r\n text: 'common.unlink',\r\n id: 'internal-reference-unlink-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst InternalReferenceElementEntry = ({\r\n elementDetails,\r\n internalReference,\r\n elementDetachAction,\r\n selectElementAction,\r\n selectedElement,\r\n disabled,\r\n highlighted,\r\n checkIfFeatureFlagEnabled,\r\n}) => {\r\n const onElementClick = async () => {\r\n await scrollElementIntoView({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\r\n });\r\n selectElementAction({ elementId: elementDetails.id });\r\n };\r\n\r\n const getCreationType = () => {\r\n return internalReference.internalReferenceElements.length\r\n ? internalReference.internalReferenceElements.filter((item) => {\r\n return item.elementId === elementDetails.id;\r\n })[0].creationType\r\n : '';\r\n };\r\n\r\n return (\r\n {\r\n onElementClick();\r\n }}\r\n >\r\n \r\n \r\n {!shouldRestrictAutomaticIdentifier() &&\r\n Object.values(AUTOMATION_CREATION_TYPE).includes(\r\n getCreationType(),\r\n ) && (\r\n \r\n )}\r\n \r\n {getElementFlaggedIcon({ elementDetails })}\r\n \r\n {elementDetails.display}\r\n \r\n \r\n \r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.comfortLetter({\r\n elementDetails,\r\n })}\r\n \r\n {ANNOTATION_DISPLAY_FUNCTIONS.tickmarkText({\r\n elementDetails,\r\n })}\r\n {/* {ANNOTATION_DISPLAY_FUNCTIONS.formula({\r\n elementDetails,\r\n })} */}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.internalRef({\r\n elementDetails,\r\n })}\r\n {ANNOTATION_DISPLAY_FUNCTIONS.workpaper({\r\n elementDetails,\r\n })}\r\n \r\n \r\n \r\n \r\n {elementDetails.sectionname}\r\n \r\n \r\n \r\n \r\n {elementDetails.label}\r\n \r\n \r\n \r\n \r\n \r\n {\r\n e.stopPropagation();\r\n elementDetachAction({\r\n internalReferenceId: internalReference.id,\r\n elementId: elementDetails.id,\r\n });\r\n }}\r\n Icon={Unlink}\r\n iconSize={UNLINK_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nInternalReferenceElementEntry.propTypes = {\r\n /** elementDetails of the element attached to an internal reference */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /**The model the represents the internal reference. */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /** Action for detaching an element from the internal reference */\r\n elementDetachAction: PropTypes.func.isRequired,\r\n /** Action fired for highlighting an element from the content panel on click*/\r\n selectElementAction: PropTypes.func.isRequired,\r\n /** elementDetails of selected element */\r\n selectedElement: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Indicates whether the buttons are disabled or not */\r\n disabled: PropTypes.bool,\r\n /* bool that indicates if the row needs to be highlighted */\r\n highlighted: PropTypes.bool.isRequired,\r\n // action method to check if feature flag is enabled for the feature with mentioned name\r\n checkIfFeatureFlagEnabled: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default InternalReferenceElementEntry;\r\n","export const WITH_DUPLICATES = 1;\r\nexport const WITHOUT_DUPLICATES = 2;\r\n\r\nexport const getRelatedWorkPapers = (internalRef, duplicateFlag) => {\r\n let workPapers = [];\r\n internalRef &&\r\n internalRef.data &&\r\n internalRef.data.internalReferenceElements &&\r\n internalRef.data.internalReferenceElements.length > 0 &&\r\n internalRef.data.internalReferenceElements.forEach(\r\n (irs) =>\r\n irs.elementEntity &&\r\n irs.elementEntity.elementAnnotations &&\r\n irs.elementEntity.elementAnnotations.workpaperReferenceDto &&\r\n irs.elementEntity.elementAnnotations.workpaperReferenceDto.length > 0 &&\r\n irs.elementEntity.elementAnnotations.workpaperReferenceDto.forEach(\r\n (wps) => {\r\n if (duplicateFlag === WITH_DUPLICATES) {\r\n workPapers.push({\r\n ...wps,\r\n checked: false,\r\n });\r\n } else {\r\n if (\r\n workPapers.findIndex(\r\n (wp) => wp.referenceNumber === wps.referenceNumber,\r\n ) === -1\r\n ) {\r\n workPapers.push({\r\n ...wps,\r\n checked: false,\r\n });\r\n }\r\n }\r\n },\r\n ),\r\n );\r\n return workPapers;\r\n};\r\n\r\nexport const getRelatedTickmarks = (internalRef, duplicateFlag) => {\r\n let tickmarks = [];\r\n internalRef &&\r\n internalRef.data &&\r\n internalRef.data.internalReferenceElements &&\r\n internalRef.data.internalReferenceElements.length > 0 &&\r\n internalRef.data.internalReferenceElements.forEach(\r\n (irs) =>\r\n irs.elementEntity &&\r\n irs.elementEntity.elementAnnotations &&\r\n irs.elementEntity.elementAnnotations.tickmarkDtoList &&\r\n irs.elementEntity.elementAnnotations.tickmarkDtoList.length > 0 &&\r\n irs.elementEntity.elementAnnotations.tickmarkDtoList.forEach(\r\n (ticks) => {\r\n if (duplicateFlag === WITH_DUPLICATES) {\r\n tickmarks.push({\r\n ...ticks,\r\n checked: false,\r\n });\r\n } else {\r\n if (\r\n tickmarks.findIndex(\r\n (tick) => tick.tickmarkId === ticks.tickmarkId,\r\n ) === -1\r\n ) {\r\n tickmarks.push({\r\n ...ticks,\r\n checked: false,\r\n });\r\n }\r\n }\r\n },\r\n ),\r\n );\r\n return tickmarks;\r\n};\r\n","import ApiModel from 'models/api-model';\r\nimport {\r\n UNSELECTED_OPTION,\r\n isOptionUnselected,\r\n} from 'constants/feature/batch-panel-constants';\r\nexport const NOT_SET = '';\r\n/** Pass -1 if update should be ignored */\r\nconst apiBoolFormat = (bool) => (bool === true ? 1 : bool === false ? 0 : -1);\r\n\r\nexport default class BatchElementUpdateForm extends ApiModel({\r\n verify: UNSELECTED_OPTION,\r\n review: UNSELECTED_OPTION,\r\n userFlag: UNSELECTED_OPTION,\r\n flagOverride: UNSELECTED_OPTION,\r\n comfortAssign: UNSELECTED_OPTION,\r\n included: -1,\r\n shouldDeleteFormulas: false,\r\n shouldDeleteComfortLetters: false,\r\n shouldDeleteIntRef: false,\r\n shouldDeleteTickmarks: false,\r\n shouldDeleteWpRefs: false,\r\n tickmarks: [],\r\n shouldAddTickmarks: false,\r\n comfortLetters: [],\r\n shouldAddComfortLetters: false,\r\n workpaperRefs: [],\r\n shouldAddWpRefs: false,\r\n entity: null,\r\n scaling: null,\r\n scalingId: -1,\r\n units: null,\r\n unitsId: -1,\r\n period: null,\r\n}) {\r\n get shouldRefreshStatementSummary() {\r\n return !(\r\n isOptionUnselected(this.verify) && isOptionUnselected(this.review)\r\n );\r\n }\r\n /**\r\n * Override default ApiModel.setLoaded,\r\n * used for handling loading of the batch panel after save\r\n */\r\n setLoaded() {\r\n return this.merge({\r\n error: null,\r\n isLoading: false,\r\n isLoaded: true,\r\n });\r\n }\r\n toApiFormat({ elementIds }) {\r\n return {\r\n elementEntity: {\r\n elementIds,\r\n signFlag: -1,\r\n entity: this.entity,\r\n unitsId: this.unitsId,\r\n scalingId: this.scalingId,\r\n periodType: this.period ? this.period.split(' ')[0] : null,\r\n fiscalYear: this.period ? parseInt(this.period.split(' ')[1]) : -1,\r\n internalVerified: apiBoolFormat(this.verify),\r\n reviewed: apiBoolFormat(this.review),\r\n flagUser: apiBoolFormat(this.userFlag),\r\n comfortAssign: apiBoolFormat(this.comfortAssign),\r\n flagOverride: apiBoolFormat(this.flagOverride),\r\n included: this.included,\r\n },\r\n shouldDeleteFormulas: this.shouldDeleteFormulas,\r\n shouldDeleteIntRef: this.shouldDeleteIntRef,\r\n shouldDeleteTickmarks: this.shouldDeleteTickmarks,\r\n shouldDeleteComfortLetters: this.shouldDeleteComfortLetters,\r\n shouldDeleteWpRefs: this.shouldDeleteWpRefs,\r\n tickmarkIds: this.tickmarks.map((t) => t.tickmarkId),\r\n shouldAddTickmarks: this.shouldAddTickmarks,\r\n comfortLetterIds: this.comfortLetters.map(\r\n (cfltr) => cfltr.comfortLetterId,\r\n ),\r\n shouldAddComfortLetters: this.shouldAddComfortLetters,\r\n workpaperRefIds: this.workpaperRefs.map((wpr) => wpr.workpaperRefId),\r\n shouldAddWpRefs: this.shouldAddWpRefs,\r\n };\r\n }\r\n\r\n hasUpdatesSelected() {\r\n return (\r\n !isOptionUnselected(this.verify) ||\r\n !isOptionUnselected(this.review) ||\r\n !isOptionUnselected(this.userFlag) ||\r\n !isOptionUnselected(this.flagOverride) ||\r\n !isOptionUnselected(this.comfortAssign) ||\r\n this.shouldDeleteFormulas ||\r\n this.shouldDeleteComfortLetters ||\r\n this.shouldDeleteIntRef ||\r\n this.shouldDeleteTickmarks ||\r\n this.shouldDeleteWpRefs ||\r\n (this.shouldAddWpRefs && this.workpaperRefs.length > 0) ||\r\n (this.shouldAddTickmarks && this.tickmarks.length > 0) ||\r\n (this.shouldAddComfortLetters && this.comfortLetters.length > 0) ||\r\n this.scalingId !== -1 ||\r\n this.unitsId !== -1 ||\r\n this.period !== null ||\r\n this.entity !== null\r\n );\r\n }\r\n setVerify(val) {\r\n return this.merge({\r\n verify: val,\r\n });\r\n }\r\n setReview(val) {\r\n return this.merge({\r\n review: val,\r\n });\r\n }\r\n setUserFlag(val) {\r\n return this.merge({\r\n userFlag: val,\r\n });\r\n }\r\n\r\n setComfortAssign(val) {\r\n return this.merge({\r\n comfortAssign: val,\r\n });\r\n }\r\n setSystemFlagOverride(val) {\r\n return this.merge({\r\n flagOverride: val,\r\n });\r\n }\r\n setExclude() {\r\n return this.merge({\r\n included: 0,\r\n });\r\n }\r\n unSetExclude() {\r\n return this.merge({\r\n included: -1,\r\n });\r\n }\r\n toggleDeleteWorkpaper() {\r\n return this.merge({\r\n shouldDeleteWpRefs: !this.shouldDeleteWpRefs,\r\n });\r\n }\r\n\r\n setScaling(val) {\r\n return this.merge({\r\n scaling: val,\r\n scalingId: val === null ? -1 : val.id,\r\n });\r\n }\r\n\r\n setUnits(val) {\r\n return this.merge({\r\n units: val,\r\n unitsId: val === null ? -1 : val.id,\r\n });\r\n }\r\n\r\n setPeriod(val) {\r\n return this.merge({\r\n period: val,\r\n });\r\n }\r\n\r\n toggleDeleteInternalRef() {\r\n return this.merge({\r\n shouldDeleteIntRef: !this.shouldDeleteIntRef,\r\n });\r\n }\r\n\r\n toggleDeleteTickmarks() {\r\n return this.merge({\r\n shouldDeleteTickmarks: !this.shouldDeleteTickmarks,\r\n });\r\n }\r\n\r\n toggleDeleteFormulas() {\r\n return this.merge({\r\n shouldDeleteFormulas: !this.shouldDeleteFormulas,\r\n });\r\n }\r\n\r\n toggleDeleteComfortLetters() {\r\n return this.merge({\r\n shouldDeleteComfortLetters: !this.shouldDeleteComfortLetters,\r\n });\r\n }\r\n\r\n attachWpr(workpaper) {\r\n return this.merge({\r\n workpaperRefs: [workpaper, ...this.workpaperRefs],\r\n shouldAddWpRefs: true,\r\n });\r\n }\r\n\r\n setWorkpaperList(workpapers) {\r\n if (workpapers && workpapers.length > 0) {\r\n return this.merge({\r\n workpaperRefs: [...workpapers, ...this.workpaperRefs],\r\n shouldAddWpRefs: true,\r\n });\r\n }\r\n return this;\r\n }\r\n\r\n removeWpr(workpaper) {\r\n const workpaperRefs = this.workpaperRefs.filter(\r\n (wpr) => wpr.workpaperRefId !== workpaper.workpaperRefId,\r\n );\r\n return this.merge({\r\n workpaperRefs,\r\n shouldAddWpRefs: workpaperRefs.length > 0,\r\n });\r\n }\r\n\r\n updateEntity(val) {\r\n return this.merge({\r\n entity: val,\r\n });\r\n }\r\n\r\n hasTickmark(tickmark) {\r\n return this.tickmarks.some((t) => t.tickmarkId === tickmark.tickmarkId);\r\n }\r\n\r\n hasComfortLetter(comfortLetter) {\r\n return this.comfortLetters.some(\r\n (cfltr) =>\r\n cfltr.comfortLetterId === comfortLetter &&\r\n comfortLetter.comfortLetterId,\r\n );\r\n }\r\n\r\n attachTickmark(tickmark) {\r\n if (this.hasTickmark(tickmark)) return this;\r\n return this.merge({\r\n tickmarks: [tickmark, ...this.tickmarks],\r\n shouldAddTickmarks: true,\r\n });\r\n }\r\n\r\n setTickmarkList(tickmarks) {\r\n if (tickmarks && tickmarks.length > 0) {\r\n return this.merge({\r\n tickmarks: [...tickmarks, ...this.tickmarks],\r\n shouldAddTickmarks: true,\r\n });\r\n }\r\n return this;\r\n }\r\n\r\n attachComfortLetter(comfortLetter) {\r\n if (this.hasComfortLetter(comfortLetter)) return this;\r\n return this.merge({\r\n comfortLetters: [comfortLetter, ...this.comfortLetters],\r\n shouldAddComfortLetters: true,\r\n });\r\n }\r\n\r\n detachTickmark(tickmark) {\r\n const filteredTickmarks = this.tickmarks.filter(\r\n (t) => t.tickmarkId !== tickmark.tickmarkId,\r\n );\r\n return this.merge({\r\n tickmarks: filteredTickmarks,\r\n shouldAddTickmarks: filteredTickmarks.length > 0,\r\n });\r\n }\r\n}\r\n","import React, { useEffect, useState } from 'react';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport Loading from '../../../common/loading-component';\r\nimport InternalReference from '../../../../models/api/internal-reference-model';\r\nimport PropTypes from 'prop-types';\r\nimport TickmarkEntry from 'components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-component';\r\nimport Switch from 'react-switch';\r\nimport {\r\n getRelatedTickmarks,\r\n getRelatedWorkPapers,\r\n WITHOUT_DUPLICATES,\r\n} from 'utils/copy-annotation-to-ir-utils';\r\nimport BatchElementUpdateForm from 'models/form/batch-element-update-form-model';\r\nimport { connect } from 'react-redux';\r\nimport { batchUpdateElementRequest } from 'api/element-api';\r\nimport { handleBatchUpdateSuccess } from 'store/actions/batch-panel-actions';\r\nimport { LEFT_PANELS } from '../../../../constants/feature/panel-constants';\r\nimport WorkpaperToolkitListPanel from 'models/api/workpaper-toolkit-list-panel-api-model';\r\nimport { fetchWorkpaperListForRevision } from 'store/actions/workpaper-toolkit-list-actions';\r\nimport { fetchTickmarkListForRevision } from 'store/actions/tickmark-list-panel-actions';\r\nimport TickmarkList from '../../../../models/api/tickmark-list-api-model';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\n\r\nconst COPY_ANNOTATION_IR_LINKED_ID = 'batch-panel-confirm-modal-id';\r\nconst COPY_ANNOTATION_IR_LINKED_BLOCK = 'batch-panel-confirm-modal';\r\n\r\nexport const ShowLinkedAnnotations = ({\r\n onClickCancel,\r\n internalReference,\r\n leftPanelWorkpaper,\r\n leftPanelTickmark,\r\n revision,\r\n workpaperToolkit,\r\n socketHasBeenDisconnected,\r\n tickmarkPanel,\r\n selectedStatement,\r\n}) => {\r\n const [copyAnnotation, toggleCopyAnnotation] = useState(true);\r\n const [verifyLinkedReference, toggleVerifyLinkedReference] = useState(true);\r\n\r\n const [workPapers, setworkPapers] = useState(\r\n getRelatedWorkPapers(internalReference, WITHOUT_DUPLICATES),\r\n );\r\n\r\n const [tickmarks, setTickmarks] = useState(\r\n getRelatedTickmarks(internalReference, WITHOUT_DUPLICATES),\r\n );\r\n\r\n const elementIds = [];\r\n internalReference &&\r\n internalReference.data &&\r\n internalReference.data.internalReferenceElements &&\r\n internalReference.data.internalReferenceElements.length > 0 &&\r\n internalReference.data.internalReferenceElements.forEach((ir) =>\r\n elementIds.push(ir.elementId),\r\n );\r\n\r\n const [count, setCount] = useState(0);\r\n const [masterChecked, setMasterChecked] = useState(true);\r\n const [loading, setLoading] = useState(false);\r\n\r\n const TOTAL_CHECKBOXES = workPapers.length + tickmarks.length;\r\n\r\n // Called when master checkbox is checked/unchecked\r\n useEffect(() => {\r\n setworkPapers((prevWp) => {\r\n let newWorkPaper = [...prevWp];\r\n newWorkPaper.forEach(\r\n (wps, index) => (newWorkPaper[index].checked = masterChecked),\r\n );\r\n return newWorkPaper;\r\n });\r\n setTickmarks((prevTick) => {\r\n let newTickmarks = [...prevTick];\r\n newTickmarks.forEach(\r\n (ticks, index) => (newTickmarks[index].checked = masterChecked),\r\n );\r\n return newTickmarks;\r\n });\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [masterChecked]);\r\n\r\n // Called to keep track of count everytime workpapers/tickmarks properties are changed\r\n useEffect(() => {\r\n let totalSelected =\r\n workPapers.filter((wps) => wps.checked === true).length +\r\n tickmarks.filter((ticks) => ticks.checked === true).length;\r\n count !== totalSelected && setCount(() => totalSelected);\r\n\r\n // If count of checked checkbox is not updated then no need to update the master checkbox value as well\r\n if (count !== totalSelected) {\r\n totalSelected === TOTAL_CHECKBOXES &&\r\n TOTAL_CHECKBOXES !== 0 &&\r\n masterChecked === false &&\r\n setMasterChecked(true);\r\n totalSelected === 0 && masterChecked === true && setMasterChecked(false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [workPapers, tickmarks]);\r\n\r\n const _onCopyorVerifyAnnotations = async () => {\r\n let apiRequestPayload = new BatchElementUpdateForm({ isLoaded: true });\r\n if (copyAnnotation) {\r\n let checkedWorkPaper = workPapers.filter((wps) => wps.checked === true);\r\n let checkedTickmarks = tickmarks.filter(\r\n (ticks) => ticks.checked === true,\r\n );\r\n apiRequestPayload = apiRequestPayload\r\n .setTickmarkList(checkedTickmarks)\r\n .setWorkpaperList(checkedWorkPaper);\r\n }\r\n if (verifyLinkedReference) {\r\n apiRequestPayload = apiRequestPayload.setVerify(true);\r\n }\r\n\r\n try {\r\n await batchUpdateElementRequest({\r\n elementIds,\r\n updatesModel: apiRequestPayload,\r\n revisionId: revision.id,\r\n });\r\n await handleBatchUpdateSuccess({\r\n elementIds,\r\n revisionId: revision.id,\r\n updateModel: apiRequestPayload,\r\n });\r\n if (\r\n Object.keys(workpaperToolkit.elementsMap).length !== 0 ||\r\n leftPanelWorkpaper\r\n ) {\r\n if (apiRequestPayload.shouldAddWpRefs && socketHasBeenDisconnected) {\r\n fetchWorkpaperListForRevision({\r\n revisionId: revision.id,\r\n });\r\n }\r\n }\r\n if (\r\n Object.keys(tickmarkPanel.elementsMap).length !== 0 ||\r\n leftPanelTickmark\r\n ) {\r\n if (apiRequestPayload.shouldAddTickmarks && socketHasBeenDisconnected) {\r\n fetchTickmarkListForRevision({\r\n revisionId: revision.id,\r\n });\r\n }\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n };\r\n\r\n const onSubmit = async () => {\r\n setLoading(true);\r\n try {\r\n await _onCopyorVerifyAnnotations();\r\n setLoading(false);\r\n onClickCancel();\r\n } catch (e) {\r\n setLoading(false);\r\n onClickCancel();\r\n }\r\n };\r\n\r\n return (\r\n \r\n {loading ? : null}\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 {copyAnnotation &&\r\n (!workPapers.length > 0 && !tickmarks.length > 0 ? (\r\n \r\n ) : (\r\n
          \r\n \r\n 0 && count < TOTAL_CHECKBOXES}\r\n name=\"copy-annotation-master-checkbox\"\r\n checked={masterChecked}\r\n id={`${COPY_ANNOTATION_IR_LINKED_ID}__master-checkbox`}\r\n onChange={() => setMasterChecked(!masterChecked)}\r\n />\r\n
          \r\n \r\n
          \r\n
          \r\n {workPapers.length > 0 && (\r\n
          \r\n
          \r\n \r\n
          \r\n {workPapers.map((wps, index) => (\r\n {\r\n setworkPapers((prev) => {\r\n let newWorkPaper = [...prev];\r\n newWorkPaper[index].checked =\r\n !newWorkPaper[index].checked;\r\n return newWorkPaper;\r\n });\r\n }}\r\n />\r\n ))}\r\n
          \r\n )}\r\n {tickmarks.length > 0 && (\r\n
          \r\n
          \r\n \r\n
          \r\n {tickmarks.map((ticks, index) => (\r\n \r\n {\r\n setTickmarks((prev) => {\r\n let newTickmark = [...prev];\r\n newTickmark[index].checked =\r\n !newTickmark[index].checked;\r\n return newTickmark;\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\nShowLinkedAnnotations.propTypes = {\r\n /**The model the represents the internal reference which is used in the internal reference panel. */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /**Function changes state to close modal */\r\n onClickCancel: PropTypes.func.isRequired,\r\n /** revision info for current document */\r\n revision: PropTypes.object.isRequired,\r\n /*boolean value that indicates if the websocket connection has failed */\r\n socketHasBeenDisconnected: PropTypes.bool.isRequired,\r\n /** Indicates if the tickmark left panel is open */\r\n leftPanelTickmark: PropTypes.bool.isRequired,\r\n /** Indicates if the workpaperReference left panel is open */\r\n leftPanelWorkpaper: PropTypes.bool.isRequired,\r\n /* Workpapers data from store */\r\n workpaperToolkit: PropTypes.instanceOf(WorkpaperToolkitListPanel),\r\n /* tickmark data from store */\r\n tickmarkPanel: PropTypes.instanceOf(TickmarkList),\r\n /** Currently selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: { revision, workpaperToolkit, tickmarkPanel, selectedStatement },\r\n ui: {\r\n statementPage: {\r\n panels: { left },\r\n },\r\n },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n}) => ({\r\n leftPanelWorkpaper: left === LEFT_PANELS.WORKPAPER,\r\n leftPanelTickmark: left === LEFT_PANELS.TICKMARK,\r\n selectedStatement,\r\n revision,\r\n workpaperToolkit,\r\n socketHasBeenDisconnected,\r\n tickmarkPanel,\r\n});\r\n\r\nexport default connect(mapStateToProps)(ShowLinkedAnnotations);\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport classNames from 'classnames';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport ShowLinkedAnnotations from './_copy-annotation-linked-elements-modal-component';\r\nimport { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport InternalReference from '../../../../models/api/internal-reference-model';\r\n\r\nconst COPY_ANNOTATION_CONTROLLER_BLOCK = 'copy-annotation';\r\nconst COPY_ANNOTATION_CONTROLLER_ID = 'copy-annotation-id';\r\n\r\nconst CopyAnnotationButton = ({\r\n componentClassNameConstant = '',\r\n disabled,\r\n internalReference,\r\n}) => {\r\n const [showCopyAnnotationModal, setShowCopyAnnotationModal] = useState(false);\r\n\r\n return (\r\n
          \r\n setShowCopyAnnotationModal((prev) => !prev)}\r\n >\r\n \r\n \r\n {showCopyAnnotationModal && (\r\n setShowCopyAnnotationModal((prev) => !prev)}\r\n internalReference={internalReference}\r\n />\r\n )}\r\n
          \r\n );\r\n};\r\n\r\nCopyAnnotationButton.propTypes = {\r\n /**Custom class used for component specific styles */\r\n componentClassNameConstant: PropTypes.string,\r\n /**If copy annotation button has to be kept disabled */\r\n disabled: PropTypes.bool,\r\n /**The model the represents the internal reference which is used in the internal reference panel. */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n};\r\n\r\nexport default CopyAnnotationButton;\r\n","import { createOrUpdateElementWorkpaperRequest } from 'api/workpaper-api';\r\nimport {\r\n getElementWorkpapersAndUpdateElementCache,\r\n elementWorkpaperListError,\r\n} from 'store/actions/element-panel-actions';\r\nimport {\r\n fetchWorkpaperListForRevisionWithoutLoading,\r\n fetchElementsFromWorkpaper,\r\n} from 'store/actions/workpaper-toolkit-list-actions';\r\nimport { updateElementCacheByCalloutAction } from './element-cache-actions';\r\n\r\nexport const updateWorkpaper =\r\n ({ workpaper }) =>\r\n async (dispatch, getState) => {\r\n const socketModel = getState().sockets;\r\n const { socketHasBeenDisconnected } = socketModel.statementSocket;\r\n try {\r\n const storeData = getState().data;\r\n const { elementDetails } = storeData.elementPanel;\r\n let workpaperModel = workpaper;\r\n // If Workpaper search list doesn't come with the elementId then\r\n // assume it is not copy annotation and take it from store\r\n if (typeof workpaperModel.data.elementId !== 'number') {\r\n workpaperModel.data.elementId = elementDetails.id;\r\n }\r\n await createOrUpdateElementWorkpaperRequest({\r\n workpaperModel,\r\n });\r\n if (socketHasBeenDisconnected) {\r\n await dispatch(getElementWorkpapersAndUpdateElementCache());\r\n await dispatch(\r\n fetchWorkpaperListForRevisionWithoutLoading({\r\n revisionId: storeData.revision.id,\r\n }),\r\n );\r\n dispatch(\r\n fetchElementsFromWorkpaper({\r\n revisionId: workpaper.revisionId,\r\n wpRefId: workpaper.workpaperRefId,\r\n }),\r\n );\r\n }\r\n dispatch(\r\n updateElementCacheByCalloutAction({\r\n elementIds: [elementDetails.id],\r\n showCallout: true,\r\n }),\r\n );\r\n } catch (error) {\r\n dispatch(elementWorkpaperListError(error));\r\n }\r\n };\r\n","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport shortid from 'shortid';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport InternalReferenceElementEntry from 'components/feature/element-panel/annotations/_internal-reference-element-entry-component';\r\nimport Permissions from 'permissions/permissions';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { fetchSuggestedListed } from 'store/actions/internal-reference-suggestion-list-actions';\r\nimport { getInternalReferenceWithoutLoading } from 'store/actions/internal-reference-actions';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { ReactComponent as PlusCircle } from 'icons/plus-circle-blue.svg';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport CopyAnnotationButton from '../internal-reference-panel/_copy-annotation-modal-controller';\r\nimport { updateWorkpaper } from 'store/actions/workpaper-actions';\r\nimport { attachTickmarkToElement } from 'store/actions/element-panel-actions';\r\nimport { checkIfFeatureFlagEnabled } from 'store/actions/selected-statement-actions';\r\n\r\nexport const ELEMENT_INTERNAL_REFERENCE_LIST_BLOCK =\r\n 'element-internal-reference-list';\r\nconst ELEMENT_INTERNAL_REFERENCE_LIST_ID_BLOCK =\r\n 'element-internal-reference-list-id';\r\nexport const DEFAULT_HOVERED_FORMULA_INDEX = null;\r\n\r\nclass ElementInternalReferenceList extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n selectedRow: null,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const {\r\n fetchSuggestedListed,\r\n getInternalReferenceWithoutLoading,\r\n elementDetails,\r\n } = this.props;\r\n fetchSuggestedListed({\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n });\r\n getInternalReferenceWithoutLoading();\r\n }\r\n\r\n setSelected = (selected) => {\r\n this.setState({\r\n selectedRow: selected,\r\n });\r\n };\r\n getInternalReferenceElementList = () => {\r\n const {\r\n elementDetails,\r\n internalReference,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n selectedProjectId,\r\n readOnly,\r\n checkIfFeatureFlagEnabled,\r\n } = this.props;\r\n\r\n const _permissionToEdit = Permissions.InternalReference.canEditInternalRef(\r\n selectedProjectId,\r\n );\r\n\r\n return internalReference\r\n .getInternalReferencesSortedById({ elementId: elementDetails.id })\r\n .map((element, iter) => {\r\n return (\r\n
          this.setSelected(iter)} key={shortid.generate()}>\r\n \r\n
          \r\n );\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n onAddLink,\r\n internalReference,\r\n selectedProjectId,\r\n readOnly,\r\n internalReferenceSuggestionList,\r\n } = this.props;\r\n\r\n const _permissionToEdit = Permissions.InternalReference.canEditInternalRef(\r\n selectedProjectId,\r\n );\r\n\r\n const PLUS_ICON_SIZE = '24px';\r\n\r\n const IR_ATTACH_TOOLTIP = new TooltipOptions({\r\n text: 'element-panel.annotation.content.internal-references.link-ir',\r\n id: 'ir-attach-button-tool-tip',\r\n position: 'top',\r\n });\r\n\r\n return (\r\n
          \r\n \r\n {!readOnly && (\r\n <>\r\n \r\n \r\n \r\n
          \r\n \r\n \r\n \r\n )}\r\n \r\n {/* // Show copy annotation button only when there are few wps, tickmarks to\r\n be copied*/}\r\n {internalReference.hasElements() && (\r\n \r\n )}\r\n \r\n {internalReference.hasElements() ? (\r\n this.getInternalReferenceElementList()\r\n ) : (\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nElementInternalReferenceList.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Internal Reference linked to the current element */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /**The action that is fired to highlight elements from the content panel after we click on them in the internal reference */\r\n selectElementFromInternalReference: PropTypes.func.isRequired,\r\n /**The action that is fired when we wish to detach an element from an internal reference */\r\n detachElementFromInternalReference: PropTypes.func.isRequired,\r\n /** Action fired when user clicks the add link button */\r\n onAddLink: PropTypes.func.isRequired,\r\n /** Currently selected project id of the revision we are viewing */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /** Boolean for read only mode */\r\n readOnly: PropTypes.bool.isRequired,\r\n /** function to fetch the suggested list of internal references */\r\n fetchSuggestedListed: PropTypes.func.isRequired,\r\n // action method to check if feature flag is enabled for the feature with mentioned name\r\n checkIfFeatureFlagEnabled: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { id },\r\n internalReferencePanel: { internalReferenceSuggestionList },\r\n },\r\n}) => ({\r\n selectedProjectId: id,\r\n internalReferenceSuggestionList,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n fetchSuggestedListed,\r\n updateWorkpaper,\r\n attachTickmarkToElement,\r\n getInternalReferenceWithoutLoading,\r\n checkIfFeatureFlagEnabled,\r\n};\r\n\r\nexport { ElementInternalReferenceList };\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(ElementInternalReferenceList);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { AUTOMATION_CREATION_TYPE } from 'constants/feature/element-panel-constants';\r\nimport AutomaticallyIdentifiedAnnotations from 'components/common/automatically-identified-annotations';\r\nimport { shouldRestrictAutomaticIdentifier } from 'utils/statement-content-page-utils';\r\n\r\nexport const WORKPAPER_ENTRY_BLOCK = 'workpaper-entry';\r\nexport const WORKPAPER_ENTRY_ID_BLOCK = 'workpaper-entry-id';\r\n\r\nconst WorkpaperEntry = ({ workpaper, rightComponent }) => {\r\n return (\r\n
          \r\n
          \r\n {!shouldRestrictAutomaticIdentifier() &&\r\n Object.values(AUTOMATION_CREATION_TYPE).includes(\r\n workpaper.creationType,\r\n ) && (\r\n \r\n )}\r\n
          \r\n \r\n {workpaper.referenceNumber}\r\n \r\n \r\n {workpaper.referenceName}\r\n \r\n
          \r\n
          \r\n {rightComponent}\r\n
          \r\n );\r\n};\r\n\r\nWorkpaperEntry.propTypes = {\r\n /** Workpaper object from the workpaper list endpoint */\r\n workpaper: PropTypes.shape({\r\n workpaperRefId: PropTypes.number.isRequired,\r\n referenceName: PropTypes.string,\r\n referenceNumber: PropTypes.string.isRequired,\r\n }),\r\n /** Component used to children to the right of the main content, displayed as flex container with content*/\r\n rightComponent: PropTypes.oneOfType([\r\n PropTypes.node,\r\n PropTypes.arrayOf(PropTypes.node),\r\n ]),\r\n};\r\n\r\nexport default WorkpaperEntry;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as Detach } from 'icons/unlink.svg';\r\n\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport WorkpaperEntry from './workpaper-entry-component';\r\nimport { WORKPAPER_DETACH_TOOLTIP } from 'constants/feature/workpaper-panel-constants';\r\nexport const WORKPAPER_ENTRY_BLOCK = 'workpaper-entry';\r\nconst DETACH_ICON_SIZE = '28px';\r\n\r\nconst WorkpaperEntryWithDetach = ({ workpaper, onDetach, disabled }) => {\r\n return (\r\n {\r\n onDetach({ workpaper });\r\n }}\r\n Icon={Detach}\r\n iconSize={DETACH_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n }\r\n />\r\n );\r\n};\r\n\r\nWorkpaperEntryWithDetach.propTypes = {\r\n /** Workpaper object from the workpaper list endpoint */\r\n workpaper: PropTypes.shape({\r\n workpaperRefId: PropTypes.number.isRequired,\r\n referenceName: PropTypes.string,\r\n referenceNumber: PropTypes.string.isRequired,\r\n }),\r\n /** action fired to detach a work paper from this element */\r\n onDetach: PropTypes.func.isRequired,\r\n /** Indicates whether the buttons are disabled or not */\r\n disabled: PropTypes.bool,\r\n};\r\n\r\nexport default WorkpaperEntryWithDetach;\r\n","import React, { Component, memo } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport WorkpaperEntryWithDetach from 'components/feature/element-panel/annotations/workpaper-entry/workpaper-entry-with-detach-component';\r\nimport Permissions from 'permissions/permissions';\r\n\r\nconst WORKPAPER_LIST_BLOCK = 'annotations-workpaper-list';\r\nconst WORKPAPER_LIST_ID_BLOCK = 'workpaper-list-id';\r\n\r\nclass WorkpaperList extends Component {\r\n render() {\r\n const { onAddLink, workpaperList, onDetach, selectedProjectId, readOnly } =\r\n this.props;\r\n\r\n const _permissionToEdit =\r\n Permissions.WorkpaperReference.canEditWorkpaperRef(selectedProjectId);\r\n\r\n return (\r\n
          \r\n
          \r\n {!readOnly && (\r\n \r\n \r\n \r\n )}\r\n
          \r\n
          \r\n \r\n {workpaperList.hasWorkpapers() ? (\r\n workpaperList.workpapers.map((workpaper) => (\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\nWorkpaperList.propTypes = {\r\n /** Action fired when user clicks the add link button */\r\n onAddLink: PropTypes.func.isRequired,\r\n /** List of workpapers associated with this element */\r\n workpaperList: PropTypes.instanceOf(ElementWorkpaperList).isRequired,\r\n /** action fired to detach a work paper from this element */\r\n onDetach: PropTypes.func.isRequired,\r\n /** Currently selected project id of the revision we are viewing */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /** Boolean for read only mode */\r\n readOnly: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { id },\r\n },\r\n}) => ({\r\n selectedProjectId: id,\r\n});\r\n\r\nconst mapDispatchToProps = () => ({});\r\n\r\nexport { WorkpaperList };\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(memo(WorkpaperList));\r\n","import React, { Component, memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { connect } from 'react-redux';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport ElementTickmarkList from 'models/api/element-tickmark-list-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport TickmarkDetachEntry from 'components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-with-detach-component';\r\nimport Permissions from 'permissions/permissions';\r\n\r\nconst TICKMARK_LIST_BLOCK = 'annotations-tickmark-list';\r\nconst TICKMARK_LIST_ID_BLOCK = 'tickmark-list-id';\r\n\r\nclass TickmarkList extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = { currentTickmarkId: undefined };\r\n }\r\n\r\n updateExpandedTickmarkID = (toggleStatus, id) => {\r\n !toggleStatus && this.setState({ currentTickmarkId: id });\r\n };\r\n\r\n render() {\r\n const {\r\n onAttach,\r\n tickmarkList,\r\n onDetach,\r\n selectedProjectId,\r\n readOnly,\r\n } = this.props;\r\n const _permissionToAttach = Permissions.Tickmark.canEditTickmark(\r\n selectedProjectId,\r\n );\r\n\r\n return (\r\n
          \r\n
          \r\n {!readOnly && (\r\n \r\n \r\n \r\n )}\r\n
          \r\n
          \r\n \r\n {tickmarkList.hasTickmarks() ? (\r\n tickmarkList\r\n .getTickmarksSortedAlphabetically()\r\n .map((tickmark) => (\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\nTickmarkList.propTypes = {\r\n /** Action fired when user clicks the attach button */\r\n onAttach: PropTypes.func.isRequired,\r\n /** List of workpapers associated with this element */\r\n tickmarkList: PropTypes.instanceOf(ElementTickmarkList).isRequired,\r\n /** action fired to detach a work paper from this element */\r\n onDetach: PropTypes.func.isRequired,\r\n /** Currently selected project id */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /** Boolean for read only mode */\r\n readOnly: PropTypes.bool.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n selectedProject: { id },\r\n },\r\n}) => ({ selectedProjectId: id });\r\n\r\nexport { TickmarkList };\r\nexport default connect(mapStateToProps)(memo(TickmarkList));\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\nimport RichTextEditor from 'components/common/rich-text-editor-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport ComfortLetterForm from 'models/form/comfort-letter-form-model';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport ElementDetails from '../../../../models/api/element-details-api-model';\r\nimport { checkIfStringContainsOnlySpaces } from 'constants/common/feature-common-utils';\r\n\r\nexport const CREATE_COMFORT_LETTER_BLOCK = 'create-comfort-letter-modal';\r\nexport const CREATE_COMFORT_LETTER_ID_BLOCK = 'create-comfort-letter-modal-id';\r\n\r\nexport const CreateComfortLetterModal = ({\r\n onClose,\r\n elementDetails,\r\n onCreate,\r\n}) => {\r\n const [comfortLetterInProgress, setComfortLetterInProgress] = React.useState(\r\n new ComfortLetterForm(),\r\n );\r\n\r\n const _handleCreateClick = async () => {\r\n try {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setLoading(),\r\n );\r\n await onCreate({\r\n comfortLetterForm: comfortLetterInProgress,\r\n });\r\n } catch (error) {\r\n if (_isErrorForDuplicateDescription(error)) {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDuplicateDescriptionLoaded({\r\n duplicate: error.response.data.rootCause,\r\n }),\r\n );\r\n } else if (_isErrorForDuplicateLabel(error)) {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDuplicateLabelLoaded({\r\n duplicate: error.response.data.rootCause,\r\n }),\r\n );\r\n } else {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setError(error),\r\n );\r\n }\r\n }\r\n };\r\n\r\n const _isErrorForDuplicateDescription = (error) =>\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause &&\r\n error.response.data.rootCause.includes(\r\n 'ValidationException: A comfort letter annotation with this description already exists.', // distinct error message from API\r\n );\r\n\r\n const _isErrorForDuplicateLabel = (error) =>\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause &&\r\n error.response.data.rootCause.includes(\r\n 'A comfort letter annotation with this label already exists.', // distinct error message from API\r\n );\r\n\r\n const _customLabelErrorText = () => {\r\n if (comfortLetterInProgress.isCustomLabelDuplicate())\r\n return 'create-comfort-letter.custom-label.error.duplicate';\r\n else if (\r\n comfortLetterInProgress.isCustomLabelTooLong() &&\r\n !checkIfStringContainsOnlySpaces(comfortLetterInProgress.customLabel)\r\n )\r\n return 'create-comfort-letter.custom-label.error.text-too-long';\r\n };\r\n\r\n const _descriptionErrorText = () => {\r\n if (comfortLetterInProgress.isDescriptionDuplicate()) {\r\n return 'create-comfort-letter.description.error.duplicate';\r\n } else if (comfortLetterInProgress.isDescriptionTooLong())\r\n return 'create-comfort-letter.description.error.text-too-long';\r\n };\r\n\r\n React.useEffect(() => {\r\n setComfortLetterInProgress(\r\n comfortLetterInProgress.initFromElement({ elementDetails }),\r\n );\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [elementDetails.revisionId]);\r\n\r\n React.useEffect(() => {\r\n comfortLetterInProgress.isDescriptionDuplicate() &&\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDuplicateDescriptionLoaded({\r\n duplicate: undefined,\r\n }),\r\n );\r\n\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [comfortLetterInProgress.descriptionRichText]);\r\n\r\n const handleComfortLetterDescription = (val) => {\r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev.setDescription(val),\r\n );\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n\r\n
          \r\n \r\n setComfortLetterInProgress((comfortLetterPrev) =>\r\n comfortLetterPrev\r\n .setCustomLabel(val)\r\n .setDuplicateLabelLoaded({ duplicate: undefined }),\r\n )\r\n }\r\n placeholder=\"create-comfort-letter.form.label.placeholder\"\r\n width={'100%'}\r\n type={'text'}\r\n errorText={_customLabelErrorText()}\r\n value={comfortLetterInProgress.customLabel}\r\n />\r\n
          \r\n
          \r\n \r\n );\r\n};\r\n\r\nCreateComfortLetterModal.propTypes = {\r\n /**function to close the create comfort letter modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /**function to create comfort letter and refresh concerned components accordingly */\r\n onCreate: PropTypes.func.isRequired,\r\n};\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {\r\n ComfortLetterEntry,\r\n COMFORT_LETTER_ENTRY_BLOCK,\r\n} from './comfort-letter-entry-component';\r\nimport { ReactComponent as PlusCircle } from 'icons/plus-circle-blue.svg';\r\nimport ComfortLetter from 'models/data/comfort-letter-model';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nconst ATTACH_ICON_SIZE = '28px';\r\n\r\nconst COMFORT_LETTER_ATTACH_TOOLTIP = new TooltipOptions({\r\n text: 'common.attach',\r\n id: 'comfort-letter-attach-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst ComfortLetterEntryWithAttach = ({\r\n comfortLetter,\r\n onAddComfortLetter,\r\n disabled,\r\n}) => {\r\n return (\r\n onAddComfortLetter(comfortLetter)}\r\n Icon={PlusCircle}\r\n iconSize={ATTACH_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n }\r\n />\r\n );\r\n};\r\n\r\nComfortLetterEntryWithAttach.propTypes = {\r\n /** comfort letter object from the comfort letter list endpoint */\r\n comfortLetter: PropTypes.instanceOf(ComfortLetter).isRequired,\r\n /** action fired to attach this comfort letter to an element */\r\n onAddComfortLetter: PropTypes.func.isRequired,\r\n /** boolean to disable the button */\r\n disabled: PropTypes.bool.isRequired,\r\n};\r\n\r\nexport default memo(ComfortLetterEntryWithAttach);\r\n","import React, { memo, useEffect, useRef } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport isFunction from 'lodash/isFunction';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport ComfortLetterEntryWithAttach from '../annotations/comfort-letter-entry/comfort-letter-entry-with-attach-component';\r\nimport ComfortLetterList from 'models/api/comfort-letter-list-api-model';\r\nimport Button from 'components/common/button-component';\r\nimport { ReactComponent as Plus } from 'icons/plus.svg';\r\nimport { MODAL_CLOSE_ICON_ID } from 'components/common/modal-component';\r\nimport { hasComfortLetterExistInBatchUpdate } from 'utils/statement-content-page-utils';\r\nexport const COMFORT_LETTER_SEARCH_BLOCK = 'comfort-letter-search-results';\r\n\r\nexport const ComfortLetterSearchResults = ({\r\n comfortLetterList,\r\n onAddComfortLetter,\r\n search,\r\n disabled,\r\n isOpen,\r\n onClickOutside,\r\n onCreate,\r\n showCreateButton = false,\r\n selectedComfortLetterList,\r\n}) => {\r\n const resultRef = useRef();\r\n\r\n useEffect(() => {\r\n const onMousedownEvent = (event) => {\r\n if (\r\n resultRef.current &&\r\n !resultRef.current.contains(event.target) &&\r\n event.target.id !== MODAL_CLOSE_ICON_ID\r\n ) {\r\n //pass event to callback so that if someone has to restrict the invoke based on event target they can implement it inside callback.\r\n onClickOutside(event);\r\n }\r\n };\r\n document.addEventListener('mousedown', onMousedownEvent, false);\r\n return () => {\r\n document.removeEventListener('mousedown', onMousedownEvent, false);\r\n };\r\n }, [onClickOutside, resultRef]);\r\n\r\n if (!isOpen) {\r\n return null;\r\n }\r\n\r\n return (\r\n
          \r\n \r\n {comfortLetterList.hasComfortLetters() ? (\r\n comfortLetterList.comfortLetters.map((comfortLetter) => (\r\n onAddComfortLetter(comfortLetter)}\r\n disabled={\r\n selectedComfortLetterList &&\r\n hasComfortLetterExistInBatchUpdate(\r\n comfortLetter.comfortLetterId,\r\n selectedComfortLetterList,\r\n )\r\n ? true\r\n : isFunction(disabled)\r\n ? disabled(comfortLetter)\r\n : disabled\r\n }\r\n />\r\n ))\r\n ) : (\r\n
          \r\n \r\n
          \r\n )}\r\n {showCreateButton && (\r\n \r\n \r\n \r\n )}\r\n
          \r\n
          \r\n );\r\n};\r\n\r\nComfortLetterSearchResults.propTypes = {\r\n /** List of comfort letter search results */\r\n comfortLetterList: PropTypes.instanceOf(ComfortLetterList).isRequired,\r\n /** Action fired when the add button is clicked */\r\n onAddComfortLetter: PropTypes.func.isRequired,\r\n /** Search text */\r\n search: PropTypes.string.isRequired,\r\n /** boolean or func to disable the button */\r\n disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]).isRequired,\r\n /** Ref to wrapper component */\r\n wrapperRef: PropTypes.object,\r\n /** If search results should be rendered */\r\n isOpen: PropTypes.bool.isRequired,\r\n /** Function fired when user clicks outside wrapper */\r\n onClickOutside: PropTypes.func.isRequired,\r\n /**If create button should be rendered just below search result */\r\n showCreateButton: PropTypes.bool,\r\n};\r\n\r\nexport default memo(ComfortLetterSearchResults);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Plus } from 'icons/plus.svg';\r\nimport Button from 'components/common/button-component';\r\nimport SearchComponent from '../../../common/search-component';\r\nimport { ComfortLetterSearchResults } from './_element-comfort-panel-search-results-component';\r\nimport { useState } from 'react';\r\nimport { useRef } from 'react';\r\nimport ComfortLetterList from 'models/api/comfort-letter-list-api-model';\r\nimport {\r\n debounceSearch,\r\n isSearchCharLengthValid,\r\n} from '../../../../constants/util/search-utility';\r\n\r\nexport const ATTACH_COMFORT_LETTER_BLOCK = 'attach-comfort-letter';\r\nexport const ATTACH_COMFORT_LETTER_ID_BLOCK = 'attach-comfort-letter-id';\r\n\r\nexport const MIN_CHAR_LENGTH_TO_SEARCH = 1;\r\nexport const MAX_CHAR_LENGTH_TO_SEARCH = 10;\r\n\r\nexport const AttachComfortLetter = ({\r\n onCreate,\r\n onAttach,\r\n onSearchComfortLetter,\r\n disabled,\r\n selectedComfortLetterList,\r\n readOnly,\r\n}) => {\r\n const [search, setSearch] = useState('');\r\n const searchComponentRef = useRef();\r\n const [comfortLetters, setComfortLetters] = useState(new ComfortLetterList());\r\n\r\n const _clearSearch = () => {\r\n setComfortLetters(new ComfortLetterList());\r\n setSearch('');\r\n };\r\n\r\n const _shouldOpenMenu = isSearchCharLengthValid(\r\n search,\r\n MIN_CHAR_LENGTH_TO_SEARCH,\r\n );\r\n\r\n const _onClickOutside = (e) => {\r\n if (\r\n !(\r\n (searchComponentRef &&\r\n searchComponentRef.current &&\r\n searchComponentRef.current.contains(e.target)) ||\r\n //cancel button\r\n e.target.id === `${ATTACH_COMFORT_LETTER_BLOCK}-secondary-button`\r\n )\r\n ) {\r\n _clearSearch();\r\n }\r\n };\r\n\r\n const _fetchSuggestedComfortLetters = async ({ search }) => {\r\n setComfortLetters(comfortLetters.setLoading());\r\n try {\r\n let response = await onSearchComfortLetter({\r\n searchTerm: search,\r\n });\r\n setComfortLetters(\r\n comfortLetters.setLoaded({ response }).returnTopNComfortLetters(10),\r\n );\r\n } catch (error) {\r\n setComfortLetters((comfortLetterPrev) =>\r\n comfortLetterPrev.setError(error),\r\n );\r\n }\r\n };\r\n\r\n const debouncedSearch = React.useCallback(\r\n debounceSearch(_fetchSuggestedComfortLetters),\r\n );\r\n\r\n const _searchComfortLetters = (val) => {\r\n setSearch(val);\r\n if (isSearchCharLengthValid(val, MIN_CHAR_LENGTH_TO_SEARCH)) {\r\n debouncedSearch({ search: val });\r\n }\r\n };\r\n\r\n const _handleAttachComfortLetter = async (comfortLetter) => {\r\n try {\r\n await onAttach({ comfortLetter });\r\n } catch (error) {\r\n setComfortLetters(comfortLetters.setError(error));\r\n }\r\n _clearSearch();\r\n };\r\n\r\n return (\r\n
          \r\n { !readOnly && \r\n \r\n }\r\n\r\n \r\n \r\n _onClickOutside(e)}\r\n />\r\n
          \r\n \r\n );\r\n};\r\n\r\nAttachComfortLetter.propTypes = {\r\n /**function fired to show create comfort letter modal */\r\n onCreate: PropTypes.func.isRequired,\r\n /**action method fired to attach existing comfort letter */\r\n onAttach: PropTypes.func.isRequired,\r\n /**function fired to fetch comfort letter list */\r\n onSearchComfortLetter: PropTypes.func.isRequired,\r\n /**boolean value to indicate if we want to disable attach comfort letter button */\r\n disabled: PropTypes.bool,\r\n};\r\n\r\nexport default AttachComfortLetter;\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as Detach } from 'icons/unlink.svg';\r\nimport {\r\n ComfortLetterEntry,\r\n COMFORT_LETTER_ENTRY_BLOCK,\r\n} from './comfort-letter-entry-component';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nconst DETACH_ICON_SIZE = '28px';\r\n\r\nconst COMFORT_LETTER_DETACH_TOOLTIP = new TooltipOptions({\r\n text: 'common.detach',\r\n id: 'comfort-letter-unlink-button-tool-tip',\r\n position: 'left',\r\n});\r\n\r\nconst ComfortLetterEntryWithDetach = ({\r\n comfortLetter,\r\n onDetachComfortLetter,\r\n disabled,\r\n detachIcon,\r\n tooltip = COMFORT_LETTER_DETACH_TOOLTIP,\r\n currentlyExpandedComfortLetterID,\r\n updateExpandedComfortLetterID,\r\n}) => {\r\n return (\r\n onDetachComfortLetter({ comfortLetter })}\r\n Icon={detachIcon}\r\n iconSize={DETACH_ICON_SIZE}\r\n disabled={disabled}\r\n />\r\n }\r\n />\r\n );\r\n};\r\n\r\nComfortLetterEntryWithDetach.defaultProps = {\r\n detachIcon: Detach,\r\n};\r\n\r\nComfortLetterEntryWithDetach.propTypes = {\r\n /** Comformt Letter object from the comfort letter list endpoint */\r\n comfortLetter: PropTypes.object.isRequired,\r\n /** action fired to detach a comfort letter from this element */\r\n onDetachComfortLetter: PropTypes.func.isRequired,\r\n /** boolean to disable the button */\r\n disabled: PropTypes.bool.isRequired,\r\n /** svg to use as detach icon */\r\n detachIcon: PropTypes.object,\r\n /**tooltip to be shown on hover */\r\n tooltip: PropTypes.instanceOf(TooltipOptions),\r\n /* function to set the currently expanded comfort letter id after clicking Show More button */\r\n updateExpandedComfortLetterID: PropTypes.func,\r\n /** Comfort Letter id of the comfort letter expanded on the toolkit panel after clicking Show More button */\r\n currentlyExpandedComfortLetterID: PropTypes.number,\r\n};\r\n\r\nexport default memo(ComfortLetterEntryWithDetach);\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { CreateComfortLetterModal } from '../comfort-letter-panel/create-comfort-letter-modal';\r\nimport ElementDetails from '../../../../models/api/element-details-api-model';\r\nimport {\r\n createElementComfortLetterRequest,\r\n getMatchingComfortLettersForElementRequest,\r\n} from 'api/comfort-letter-api';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport ElementComfortLetterList from 'models/api/element-comfort-letter-list-model';\r\nimport shortid from 'shortid';\r\nimport { AttachComfortLetter } from '../comfort-letter-panel/_comfort-letter-panel-attach-component';\r\nimport { attachComfortLetterAction } from 'store/actions/element-panel-actions';\r\nimport ComfortLetterEntryWithDetach from './comfort-letter-entry/comfort-letter-entry-with-detach-component';\r\nimport Permissions from 'permissions/permissions';\r\nimport { fetchComfortAnnotationListForRevisionWithoutLoading } from 'store/actions/comfort-annotations-list-actions';\r\n\r\nexport const COMFORT_LETTER_LIST_ID_BLOCK = 'comfort-letter-block-id';\r\nexport const COMFORT_LETTER_LIST_BLOCK = 'comfort-letter-block';\r\n\r\nexport const ElementComfortLetterListComponent = ({\r\n elementDetails,\r\n comfortLetterList,\r\n getElementComfortLettersAndUpdateElementCache,\r\n revisionId,\r\n attachComfortLetterAction,\r\n onDetachComfortLetter,\r\n fetchComfortAnnotationListForRevisionWithoutLoading,\r\n readOnly,\r\n}) => {\r\n const [showCreateComfortModal, setShowCreateComfortModal] =\r\n React.useState(false);\r\n\r\n const _handleCreateNewComfortLetter = async ({ comfortLetterForm }) => {\r\n await createElementComfortLetterRequest({ comfortLetterForm });\r\n getElementComfortLettersAndUpdateElementCache();\r\n fetchComfortAnnotationListForRevisionWithoutLoading({ revisionId });\r\n _toggleCreateComfortLettterModal();\r\n };\r\n\r\n const _canDetachOrAttachComfortLetter =\r\n Permissions.Statement.canChangeContent();\r\n\r\n const _toggleCreateComfortLettterModal = () => {\r\n setShowCreateComfortModal((prevModalState) => !prevModalState);\r\n };\r\n\r\n const _searchComfortLetters = async ({ searchTerm }) => {\r\n return await getMatchingComfortLettersForElementRequest({\r\n revisionId,\r\n searchTerm,\r\n elementId: elementDetails.id,\r\n });\r\n };\r\n\r\n const [currentComfortLetterID, setCurrentComfortLetterID] =\r\n React.useState(undefined);\r\n\r\n const updateExpandedComfortLetterID = (toggleStatus, id) => {\r\n !toggleStatus && setCurrentComfortLetterID(id);\r\n };\r\n\r\n return (\r\n
          \r\n \r\n
          \r\n \r\n {comfortLetterList.hasComfortLetter() ? (\r\n comfortLetterList\r\n .getComfortLettersSortedAlphabetically()\r\n .map((comfortLetter) => (\r\n \r\n ))\r\n ) : (\r\n
          \r\n \r\n
          \r\n )}\r\n
          \r\n
          \r\n {showCreateComfortModal && (\r\n \r\n )}\r\n
          \r\n );\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n attachComfortLetterAction,\r\n fetchComfortAnnotationListForRevisionWithoutLoading,\r\n};\r\n\r\nexport default connect(\r\n undefined,\r\n mapDispatchToProps,\r\n)(ElementComfortLetterListComponent);\r\n\r\nElementComfortLetterListComponent.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /**Action fired to get latest comfort letter details and update cache and element panel */\r\n getElementComfortLettersAndUpdateElementCache: PropTypes.func.isRequired,\r\n /**List of comfort letters */\r\n comfortLetterList: PropTypes.instanceOf(ElementComfortLetterList).isRequired,\r\n /**Number to represent revision id */\r\n revisionId: PropTypes.number.isRequired,\r\n /**ation method fired to detach comfort letter */\r\n onDetachComfortLetter: PropTypes.func.isRequired,\r\n /**action method to fetch comfort letter list with element count. It is used to refresh comfort letter toolkit */\r\n fetchComfortAnnotationListForRevisionWithoutLoading:\r\n PropTypes.func.isRequired,\r\n /** action used get element id's by comfort letter is attached to enable callout*/\r\n comfortLetterElementIdsUpdatedOrDeleted: PropTypes.func,\r\n};\r\n","import React, { memo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport { ELEMENT_ANNOTATIONS_TABS } from 'constants/feature/element-panel-constants';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\n\r\nimport ElementPanelAnnotationsTab from 'components/feature/element-panel/annotations/_element-panel-annotations-tab-component';\r\nimport ElementFormulaListContainer from 'containers/feature/element-panel/element-panel-formula-list-annotation-container';\r\nimport InternalReferenceList from 'components/feature/element-panel/annotations/_element-panel-internal-reference-list-annotation-component';\r\nimport WorkpaperList from './_element-panel-workpaper-list-annotation-component';\r\nimport TickmarkList from './_element-panel-tickmark-list-annotation-component';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport ExpandableRow from 'components/common/expandable-row-component';\r\nimport ElementComfortLetterList from 'models/api/element-comfort-letter-list-model';\r\nimport ElementComfortLetterListComponent from './_element-panel-comfort-letter-list-annotation-component';\r\n\r\nconst ELEMENT_ANNOTATIONS_BLOCK = 'element-annotations';\r\n\r\nconst ElementPanelAnnotations = ({\r\n elementDetails,\r\n revisionId,\r\n formulaList,\r\n selectedElementPanelAnnotationsTab,\r\n setCurrentElementAnnotationsTab,\r\n primaryAnnotationActions: {\r\n onCreateNewFormula,\r\n onAddWorkpaper,\r\n onAddInternalReference,\r\n onAttachTickmark,\r\n },\r\n secondaryAnnotationActions: { onCopyAllFormula },\r\n onEditFormula,\r\n internalReference,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n workpaperList,\r\n comfortLetterList,\r\n onDetachWorkpaper,\r\n tickmarkList,\r\n onDetachTickmark,\r\n readOnly,\r\n getElementComfortLettersAndUpdateElementCache,\r\n onDetachComfortLetter,\r\n}) => {\r\n const [showExpandableRow, setShowExpandableRow] = useState(true);\r\n\r\n const getContentForTab = () => {\r\n if (\r\n selectedElementPanelAnnotationsTab.id ===\r\n ELEMENT_ANNOTATIONS_TABS.FORMULA.id\r\n ) {\r\n return (\r\n \r\n );\r\n } else if (\r\n selectedElementPanelAnnotationsTab.id ===\r\n ELEMENT_ANNOTATIONS_TABS.WORK_PAPER_REFERENCE.id\r\n ) {\r\n return (\r\n \r\n );\r\n } else if (\r\n selectedElementPanelAnnotationsTab.id ===\r\n ELEMENT_ANNOTATIONS_TABS.INTERNAL_REFERENCE.id\r\n ) {\r\n return (\r\n \r\n );\r\n } else if (\r\n selectedElementPanelAnnotationsTab.id ===\r\n ELEMENT_ANNOTATIONS_TABS.TICKMARK.id\r\n ) {\r\n return (\r\n \r\n );\r\n } else if (\r\n selectedElementPanelAnnotationsTab.id ===\r\n ELEMENT_ANNOTATIONS_TABS.COMFORT_LETTER.id\r\n ) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n return (\r\n \r\n setShowExpandableRow(false)}\r\n expandExpandableRow={() => setShowExpandableRow(true)}\r\n tooltipId={`${ELEMENT_ANNOTATIONS_BLOCK}__tooltip`}\r\n isElementPanel={true}\r\n >\r\n
          \r\n \r\n
          \r\n {getContentForTab()}\r\n
          \r\n
          \r\n \r\n \r\n );\r\n};\r\n\r\nElementPanelAnnotations.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** The currently selected tab in the element panel */\r\n selectedElementPanelAnnotationsTab: PropTypes.instanceOf(TabModel).isRequired,\r\n /** Map of actions fired when a user clicks on the primary button of the annotations content */\r\n primaryAnnotationActions: PropTypes.object.isRequired,\r\n /** Map of actions fired when a user clicks on the secondary button of the annotations content */\r\n secondaryAnnotationActions: PropTypes.object,\r\n /** The list of formulas for the current element*/\r\n formulaList: PropTypes.instanceOf(FormulaList).isRequired,\r\n /** Action fired to get details for edit */\r\n onEditFormula: PropTypes.func.isRequired,\r\n /** Internal reference that is currently linked to this element */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /**The action that is fired to highlight elements from the content panel after we click on them in the internal reference */\r\n selectElementFromInternalReference: PropTypes.func.isRequired,\r\n /**The action that is fired when we wish to detach an element from an internal reference */\r\n detachElementFromInternalReference: PropTypes.func.isRequired,\r\n /** List of workpapers associated with this element */\r\n workpaperList: PropTypes.instanceOf(ElementWorkpaperList).isRequired,\r\n /** action fired to detach a work paper from this element */\r\n onDetachWorkpaper: PropTypes.func.isRequired,\r\n /** action fired to detach a tickmark from this element */\r\n onDetachTickmark: PropTypes.func.isRequired,\r\n /** Boolean for read only mode */\r\n readOnly: PropTypes.bool.isRequired,\r\n /**List of comfort letters attached to this element */\r\n comfortLetterList: PropTypes.instanceOf(ElementComfortLetterList).isRequired,\r\n /**Action fired to get latest comfort letter details and update cache and element panel */\r\n getElementComfortLettersAndUpdateElementCache: PropTypes.func.isRequired,\r\n /**Number to represent revision id */\r\n revisionId: PropTypes.number.isRequired,\r\n /**ation method fired to detach comfort letter */\r\n onDetachComfortLetter: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(ElementPanelAnnotations);\r\n","import React, { memo } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport {\r\n updateUserFlag,\r\n updateVerify,\r\n updateReviewed,\r\n detachTickmarkFromElement,\r\n detachComfortLetterAction,\r\n} from 'store/actions/element-panel-actions';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport TabModel from 'models/utils/common/tab-model';\r\nimport ElementStatusContainer from 'containers/feature/element-panel/element-status-container';\r\nimport ElementAttributesContainer from 'containers/feature/element-panel/element-attributes-container';\r\nimport ElementHistory from 'components/feature/element-panel/element-history-component';\r\nimport Annotations from './annotations/_element-panel-annotations-component';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport Permissions from 'permissions/permissions';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport ElementComfortLetterList from 'models/api/element-comfort-letter-list-model';\r\nimport { getElementComfortLettersAndUpdateElementCache } from 'store/actions/element-panel-actions';\r\n\r\nexport const ELEMENT_PANEL_BODY_BLOCK = 'element-panel-body';\r\nexport const ELEMENT_PANEL_BODY_ID_BLOCK = 'element-panel-body-id';\r\n\r\nconst ElementPanelBody = ({\r\n selectedProjectId,\r\n elementDetails,\r\n formulaList,\r\n selectedElementPanelAnnotationsTab,\r\n setCurrentElementAnnotationsTab,\r\n primaryAnnotationActions,\r\n secondaryAnnotationActions,\r\n onEditFormula,\r\n internalReference,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n detachTickmarkFromElement,\r\n workpaperList,\r\n onDetachWorkpaper,\r\n tickmarkList,\r\n comfortLetterList,\r\n selectedStatement,\r\n getElementComfortLettersAndUpdateElementCache,\r\n revisionId,\r\n detachComfortLetterAction,\r\n}) => {\r\n const _permissionToEdit =\r\n Permissions.Element.canEditElement(selectedProjectId);\r\n const readOnly = selectedStatement.isReadOnly();\r\n\r\n return (\r\n \r\n
          \r\n \r\n \r\n \r\n \r\n
          \r\n
          \r\n );\r\n};\r\n\r\nElementPanelBody.propTypes = {\r\n /** Currently selected project id of the revision we are viewing */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Selected tab for the annotations table */\r\n selectedElementPanelAnnotationsTab: PropTypes.instanceOf(TabModel).isRequired,\r\n /** Action to set the annotations tab */\r\n setCurrentElementAnnotationsTab: PropTypes.func.isRequired,\r\n /** Map of actions fired when a user clicks on the primary button of the annotations content */\r\n primaryAnnotationActions: PropTypes.object.isRequired,\r\n /** Map of actions fired when a user clicks on the secondary button of the annotations content */\r\n secondaryAnnotationActions: PropTypes.object,\r\n /** The list of formulas for the current element*/\r\n formulaList: PropTypes.instanceOf(FormulaList).isRequired,\r\n /** Action fired to get details for edit */\r\n onEditFormula: PropTypes.func.isRequired,\r\n /** Internal reference that is currently linked to this element */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /**The action that is fired to highlight elements from the content panel after we click on them in the internal reference */\r\n selectElementFromInternalReference: PropTypes.func.isRequired,\r\n /**The action that is fired when we wish to detach an element from an internal reference */\r\n detachElementFromInternalReference: PropTypes.func.isRequired,\r\n /** List of workpapers associated with this element */\r\n workpaperList: PropTypes.instanceOf(ElementWorkpaperList).isRequired,\r\n /** action fired to detach a work paper from this element */\r\n onDetachWorkpaper: PropTypes.func.isRequired,\r\n /** action fired to detach a tickmark from this element */\r\n detachTickmarkFromElement: PropTypes.func.isRequired,\r\n /** Selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n /**List of comfort letters attached to this element */\r\n comfortLetterList: PropTypes.instanceOf(ElementComfortLetterList).isRequired,\r\n /**To update element cache, tickmark toolkit, workpaper toolkit and element search results with latest comfort letter details */\r\n getElementComfortLettersAndUpdateElementCache: PropTypes.func.isRequired,\r\n /**Number to represent revision id */\r\n revisionId: PropTypes.number.isRequired,\r\n /**ation method fired to detach comfort letter */\r\n detachComfortLetterAction: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n revision,\r\n selectedProject: { id },\r\n elementPanel: {\r\n elementDetails,\r\n formulaList,\r\n internalReference,\r\n workpaperList,\r\n tickmarkList,\r\n comfortLetterList,\r\n },\r\n selectedStatement,\r\n },\r\n}) => ({\r\n revisionId: revision.id,\r\n elementDetails,\r\n formulaList,\r\n internalReference,\r\n workpaperList,\r\n tickmarkList,\r\n comfortLetterList,\r\n selectedProjectId: id,\r\n selectedStatement,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n updateUserFlag,\r\n updateVerify,\r\n updateReviewed,\r\n detachTickmarkFromElement,\r\n getElementComfortLettersAndUpdateElementCache,\r\n detachComfortLetterAction,\r\n};\r\n\r\nexport { ElementPanelBody };\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(memo(ElementPanelBody));\r\n","import React, { memo } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as Information } from 'icons/icon-information-tooltip.svg';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nconst INFORMATION_ICON_SIZE = '18px';\r\n\r\nexport const FORMULA_PANEL_HEADER_BLOCK = 'formula-panel-header';\r\nexport const FORMULA_PANEL_HEADER_ID_BLOCK = 'formula-panel-header-id';\r\n\r\nconst FormulaPanelHeader = () => {\r\n const FORMULA_HEADER_INFORMATION_TOOLTIP = new TooltipOptions({\r\n text: {\r\n id: 'formula-panel.header.tooltip-text',\r\n values: {\r\n br:
          ,\r\n b: (...chunks) => (\r\n {chunks}\r\n ),\r\n },\r\n },\r\n id: 'formula-panel-header-id-tooltip-information',\r\n position: 'left',\r\n });\r\n return (\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\nexport default memo(FormulaPanelHeader);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n className: \"icon-path refresh\",\n d: \"M15.4557 11.6035C15.4557 11.9235 15.1965 12.1826 14.8765 12.1826H11.9826C11.6626 12.1826 11.4035 11.9235 11.4035 11.6035V8.70957C11.4035 8.38957 11.6626 8.13044 11.9826 8.13044C12.3026 8.13044 12.5617 8.38957 12.5617 8.70957V10.44C13.3096 9.44348 13.7183 8.23653 13.7183 6.97409C13.7183 3.78261 11.1235 1.18609 7.93061 1.18609C4.73913 1.18609 2.14435 3.78261 2.14435 6.97409C2.14435 10.1652 4.73913 12.7617 7.93061 12.7617C8.25044 12.7617 8.50957 13.0209 8.50957 13.3409C8.50957 13.6609 8.25044 13.9183 7.93061 13.9183C4.10087 13.9183 0.986088 10.8035 0.986088 6.97409C0.986088 3.14435 4.10087 0.027832 7.93061 0.027832C11.76 0.027832 14.8765 3.14435 14.8765 6.97409C14.8765 8.44348 14.4122 9.8487 13.5652 11.0244H14.8765C15.1965 11.0244 15.4557 11.2835 15.4557 11.6035Z\",\n fill: \"black\"\n});\n\nvar SvgRefresh = function SvgRefresh(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 16,\n height: 14,\n viewBox: \"0 0 16 14\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRefresh, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/refresh.2a2a5cf5.svg\";\nexport { ForwardRef as ReactComponent };","import React, { memo, useState } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { ReactComponent as Cross } from 'icons/cross.svg';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport { FORMULA_ROW_OPERATOR_OPTIONS } from 'constants/feature/formula-constants';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\n\r\nconst FORMULA_OPERATOR_BLOCK = 'formula-operator';\r\nconst FORMULA_OPERATOR_ID_BLOCK = 'formula-operator-id';\r\n\r\nconst ICON_SIZE = '18px';\r\nconst FormulaOperator = ({ disableRemove, onSelect, onRemove, operator }) => {\r\n const [operatorHovered, setOperatorHovered] = useState(false);\r\n return (\r\n setOperatorHovered(true)}\r\n onMouseLeave={() => setOperatorHovered(false)}\r\n onMouseOver={() => {\r\n // if another operator is deleted the rest are shifted up\r\n // and the mouseEnter event doesn't fire, but we should still\r\n // trigger the hover state\r\n // mouseOver fires continuously, so we only want to set state if it isn't already set\r\n if (!operatorHovered) {\r\n setOperatorHovered(true);\r\n }\r\n }}\r\n >\r\n {}}\r\n role=\"button\"\r\n />\r\n \r\n \r\n );\r\n};\r\n\r\nFormulaOperator.propTypes = {\r\n /** Indicates if remove X button should be disabled */\r\n disableRemove: PropTypes.bool,\r\n /** Function fired when a operator is selected */\r\n onSelect: PropTypes.func.isRequired,\r\n /** Function fired when a operator is removed using the X button */\r\n onRemove: PropTypes.func.isRequired,\r\n /** Value of selected operator */\r\n operator: PropTypes.instanceOf(MenuOption).isRequired,\r\n};\r\n\r\nexport default memo(FormulaOperator);\r\n","import React, { Component, createRef } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { formatManualInputFormulaRowNumber } from 'utils/number-formatter-util';\r\n\r\nimport { FORMULA_MANUAL_NUMBER_REGEX } from 'constants/feature/formula-constants';\r\nimport FormulaRowNumber from 'models/data/formula/formula-row-number-model';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport shortid from 'shortid';\r\n\r\nexport const FORMULA_ROW_MANUAL_BLOCK = 'formula-row-manual-input';\r\nexport const FORMULA_ROW_MANUAL_ID_BLOCK = 'formula-row-manual-input-id';\r\n\r\nclass FormulaRowManualInput extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n isFocused: false,\r\n numberInput: '',\r\n };\r\n this.textInput = createRef();\r\n }\r\n\r\n componentDidUpdate(prevProps, prevState) {\r\n if (this.state.isFocused && !prevState.isFocused) {\r\n this.textInput.current.focus();\r\n }\r\n }\r\n\r\n handleOnFocus = () => {\r\n const {\r\n formulaRow,\r\n checkEmptyInput,\r\n setSelectedRowNumber,\r\n formulaRowIndex,\r\n } = this.props;\r\n // call checkEmptyInput if input value is 0\r\n if (formulaRow.value.toString() === '0') checkEmptyInput('');\r\n this.setState((state) => ({\r\n isFocused: true,\r\n numberInput: formulaRow.value.toString() === '0' ? '' : formulaRow.value, // clear 0 value when user focuses else display current value\r\n }));\r\n setSelectedRowNumber(formulaRowIndex);\r\n };\r\n\r\n handleOnBlur = () => {\r\n const { setManualNumber, formulaRowIndex } = this.props;\r\n const { numberInput } = this.state;\r\n this.setState((state) => ({\r\n isFocused: false,\r\n numberInput: formatManualInputFormulaRowNumber(state.numberInput),\r\n }));\r\n setManualNumber({ index: formulaRowIndex, number: numberInput });\r\n };\r\n\r\n handleOnChange = (number) => {\r\n const { checkEmptyInput } = this.props;\r\n this.setState({\r\n numberInput: number,\r\n });\r\n checkEmptyInput(number);\r\n };\r\n\r\n render() {\r\n const { formulaRow } = this.props;\r\n const { isFocused, numberInput } = this.state;\r\n const _isNotValid = formulaRow.hasRowError();\r\n return (\r\n
          \r\n {!isFocused ? (\r\n \r\n \r\n {formulaRow.display}\r\n \r\n
          \r\n ) : (\r\n event.preventDefault()} //We cannot paste text into these input boxes.\r\n onChange={this.handleOnChange}\r\n onBlur={this.handleOnBlur}\r\n value={numberInput}\r\n pattern={FORMULA_MANUAL_NUMBER_REGEX}\r\n ref={this.textInput}\r\n />\r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nFormulaRowManualInput.propTypes = {\r\n /** The formula row for this row. */\r\n formulaRow: PropTypes.instanceOf(FormulaRowNumber),\r\n /** The index from the formula rows array on the formula form of this specific formula row */\r\n formulaRowIndex: PropTypes.number.isRequired,\r\n /** The action to be fired when the formula row needs to be set and validated. */\r\n setManualNumber: PropTypes.func.isRequired,\r\n /** Event handler to check for empty input field */\r\n checkEmptyInput: PropTypes.func.isRequired,\r\n /* action to save the selected row number */\r\n setSelectedRowNumber: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default FormulaRowManualInput;\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport FormulaRowElementModel from 'models/data/formula/formula-row-element-model';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport shortid from 'shortid';\r\nimport classnames from 'classnames';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport { getElementResultByNumberFormat } from 'utils/formula-utils';\r\nexport const FORMULA_ROW_ELEMENT_BLOCK = 'formula-row-element-input';\r\nexport const FORMULA_ROW_ELEMENT_ID_BLOCK = 'formula-row-element-input-id';\r\n\r\nconst FormulaRowElement = ({\r\n formulaRow,\r\n sectionId,\r\n setSelectedRow,\r\n checkEmptyInput,\r\n numberFormatId,\r\n}) => {\r\n const formattedFormulaValue = getElementResultByNumberFormat(\r\n formulaRow.value,\r\n numberFormatId,\r\n );\r\n const externalSectionId = formulaRow.elementData.sectionId;\r\n // needs to set isinputempty on elements row after adding a new element row from content panel\r\n // to prevent the value from being minstakenly true\r\n checkEmptyInput(formulaRow.value);\r\n return (\r\n
          \r\n \r\n {\r\n setSelectedRow(formulaRow.elementData.id);\r\n scrollElementIntoView({\r\n elementId: formulaRow.elementId,\r\n sectionId: externalSectionId ? externalSectionId : sectionId,\r\n });\r\n }}\r\n >\r\n \r\n {formattedFormulaValue}\r\n \r\n \r\n
          \r\n \r\n );\r\n};\r\n\r\nFormulaRowElement.propTypes = {\r\n formulaRow: PropTypes.instanceOf(FormulaRowElementModel).isRequired,\r\n /* section id value of current formula row */\r\n sectionId: PropTypes.number,\r\n /* Function to set the current selected row */\r\n setSelectedRow: PropTypes.func,\r\n /** Event handler to check for empty input field */\r\n checkEmptyInput: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default FormulaRowElement;\r\n","import React, { useEffect, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport classnames from 'classnames';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { ReactComponent as arrow } from 'icons/arrow-simple-thick-down.svg';\r\nimport shortid from 'shortid';\r\nimport { getResultDisplay } from 'constants/feature/formula-constants';\r\nimport { round, countDecimals, countDigits } from 'utils/formula-utils';\r\nexport const FORMULA_PANEL_ROUND_NUMBER_MODAL_ID = 'round-number-modal-id';\r\nexport const FORMULA_PANEL_ROUND_NUMBER_MODAL_BLOCK = 'round-number-modal';\r\nconst FormulaPanelRoundNumberModal = ({\r\n onSave,\r\n onCancel,\r\n currentNumber,\r\n inputValue,\r\n setInputValue,\r\n computedResult,\r\n roundingScale,\r\n removeRounding,\r\n numberFormatId,\r\n}) => {\r\n const [newValue, setNewValue] = useState(currentNumber);\r\n const [saveButtonDisabled, setSaveButtonDisabled] = useState(false);\r\n const ROUND_NUMBER_REGEX = /^-?[0-9\\b]*$/;\r\n\r\n const decimalsResult = countDecimals(computedResult);\r\n\r\n const decimals = decimalsResult !== 0 ? decimalsResult : 0;\r\n\r\n const digits = -(countDigits(computedResult) - 1);\r\n\r\n useEffect(() => {\r\n if (inputValue !== '' && inputValue !== '-') {\r\n setNewValue(round(computedResult, inputValue));\r\n }\r\n if (\r\n inputValue === '' ||\r\n inputValue === '-' ||\r\n inputValue < digits ||\r\n inputValue > decimals ||\r\n inputValue === roundingScale ||\r\n (currentNumber === newValue && currentNumber === computedResult)\r\n ) {\r\n if (!saveButtonDisabled) setSaveButtonDisabled(true);\r\n } else {\r\n if (saveButtonDisabled) setSaveButtonDisabled(false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [inputValue]);\r\n\r\n useEffect(() => {\r\n if (\r\n inputValue === '' ||\r\n inputValue === '-' ||\r\n inputValue < digits ||\r\n inputValue > decimals ||\r\n inputValue === roundingScale ||\r\n (currentNumber === newValue && currentNumber === computedResult)\r\n ) {\r\n if (!saveButtonDisabled) setSaveButtonDisabled(true);\r\n } else {\r\n if (saveButtonDisabled) setSaveButtonDisabled(false);\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [newValue]);\r\n const save = () => {\r\n onSave(newValue);\r\n };\r\n const onBlur = () => {\r\n if (\r\n (inputValue !== '-' || inputValue !== '') &&\r\n (inputValue < digits || inputValue > decimals)\r\n ) {\r\n setInputValue('');\r\n setNewValue('');\r\n }\r\n };\r\n\r\n return (\r\n \r\n
          \r\n \r\n \r\n \r\n
          \r\n \r\n = {getResultDisplay({ result: computedResult, numberFormatId })}\r\n \r\n \r\n \r\n \r\n \r\n
          \r\n (\r\n \r\n {chunks}\r\n \r\n ),\r\n li: (...chunks) => (\r\n \r\n {chunks}\r\n \r\n ),\r\n b: (...chunks) => (\r\n \r\n {chunks}\r\n \r\n ),\r\n linebreak: (\r\n \r\n ),\r\n }}\r\n />\r\n
          \r\n \r\n \r\n \r\n {\r\n if (inputValue !== '-') {\r\n if (inputValue === '') {\r\n setInputValue(0);\r\n } else {\r\n if (inputValue + 1 <= decimals) {\r\n setInputValue((prevState) => prevState + 1);\r\n }\r\n }\r\n }\r\n }}\r\n >\r\n {\r\n if (inputValue !== '-') {\r\n if (inputValue === '') {\r\n setInputValue(0);\r\n } else {\r\n if (inputValue - 1 >= digits) {\r\n setInputValue((prevState) => prevState - 1);\r\n }\r\n }\r\n }\r\n }}\r\n >\r\n \r\n {\r\n if (typeof val === 'string') {\r\n if (val !== '' && val !== '-') {\r\n setInputValue(parseInt(val));\r\n } else {\r\n setInputValue(val);\r\n }\r\n } else {\r\n setInputValue(val);\r\n }\r\n }}\r\n type={'text'}\r\n width={'75px'}\r\n pattern={ROUND_NUMBER_REGEX}\r\n onBlur={onBlur}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {inputValue !== '' && inputValue !== '-'\r\n ? `= ${getResultDisplay({ result: newValue, numberFormatId })}`\r\n : ''}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\nFormulaPanelRoundNumberModal.propTypes = {\r\n /** Action fired when user clicks save button */\r\n onSave: PropTypes.func.isRequired,\r\n /** Action fired when user clicks cancel button */\r\n onCancel: PropTypes.func.isRequired,\r\n /* current number to be rounded */\r\n currentNumber: PropTypes.number.isRequired,\r\n /* current computed number of the formula */\r\n computedResult: PropTypes.number.isRequired,\r\n /* input value for the amount of number to round the number */\r\n inputValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\r\n .isRequired,\r\n /* function to set the value of input value */\r\n setInputValue: PropTypes.func.isRequired,\r\n /* current scaling value on formula */\r\n roundingScale: PropTypes.number,\r\n /* function to remove the rounding from the formula and reset modal values*/\r\n removeRounding: PropTypes.func.isRequired,\r\n};\r\nexport default FormulaPanelRoundNumberModal;\r\n","import React, { memo, useEffect, useState, useRef } from 'react';\r\nimport classnames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport FormulaForm from 'models/form/formula-form-model';\r\nimport {\r\n ROUND_NUMBER_ICON_HEIGHT,\r\n ROUND_NUMBER_ICON_WIDTH,\r\n getOriginalComputedValueTooltip,\r\n getResultDisplay,\r\n} from 'constants/feature/formula-constants';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { ReactComponent as PlusIcon } from 'icons/plus.svg';\r\nimport { ReactComponent as RefreshIcon } from 'icons/refresh.svg';\r\nimport { ReactComponent as RoundNumberIcon } from 'icons/round-number.svg';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { ReactComponent as FlaggedIcon } from 'icons/flag-icon.svg';\r\nimport RowOperator from './formula-row/_formula-operator-component';\r\nimport ManualRow from './formula-row/_formula-row-manual-input-component';\r\nimport ElementRow from './formula-row/_formula-row-element-component';\r\nimport { ReactComponent as CrossIcon } from 'icons/cross.svg';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport FormulaPanelRoundNumberModal from './_formula-panel-round-number-modal-component';\r\nimport { shouldDisplayValueBeFlagged } from 'utils/formula-utils';\r\nimport AutomaticallyIdentifiedAnnotations from 'components/common/automatically-identified-annotations';\r\nimport { AUTOMATION_CREATION_TYPE } from 'constants/feature/element-panel-constants';\r\nimport { shouldRestrictAutomaticIdentifier } from 'utils/statement-content-page-utils';\r\n\r\nexport const FORMULA_PANEL_EDIT_BLOCK = 'formula-panel-edit';\r\nexport const FORMULA_PANEL_EDIT_ID_BLOCK = 'formula-panel-edit-id';\r\nexport const FLAGGED_FORMULA_ICON_WIDTH = '15px';\r\nexport const FLAGGED_FORMULA_ICON_HEIGHT = '19px';\r\nconst FORMULA_BUTTON_ICON_SIZE = '17.5';\r\n\r\nconst FormulaPanelEdit = ({\r\n elementDetails,\r\n formulaInProgress,\r\n updateRowOperator,\r\n addOperator,\r\n addManualRow,\r\n setManualNumber,\r\n removeFormulaRow,\r\n removeRowOperator,\r\n removeAllRows,\r\n checkEmptyInput,\r\n selectElement,\r\n setSelectedRow,\r\n deallocateItems,\r\n setRoundingResult,\r\n numberFormatId,\r\n updateElementCacheByCalloutAction,\r\n}) => {\r\n const [selectedRowId, setSelectedRowId] = useState(null);\r\n const previousSelected = useRef('');\r\n const [showRoundNumberModal, setShowRoundNumberModal] = useState(false);\r\n const [toggleShowMore, setToggleShowMore] = useState(true);\r\n const [roundNumberInputValue, setRoundNumberInputValue] = useState(0);\r\n\r\n //this sets the initial value for the input box\r\n useEffect(() => {\r\n const isFirstRounding = isNullOrUndefined(formulaInProgress.roundingScale);\r\n\r\n setRoundNumberInputValue(\r\n isFirstRounding ? '' : formulaInProgress.roundingScale,\r\n );\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [formulaInProgress]);\r\n\r\n /* Manages current and previous clicked formula row */\r\n useEffect(() => {\r\n if (selectedRowId) {\r\n if (previousSelected.current) {\r\n selectElement({\r\n elementIds: [previousSelected.current],\r\n color: ELEMENT_HIGHLIGHT_STATES.HOVERED_FROM_FORMULA,\r\n });\r\n }\r\n deallocateItems();\r\n selectElement({\r\n elementIds: [selectedRowId],\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n });\r\n\r\n previousSelected.current = selectedRowId;\r\n }\r\n }, [deallocateItems, previousSelected, selectElement, selectedRowId]);\r\n\r\n const getFormulaRows = () => {\r\n return formulaInProgress.rows.map((row, index) => {\r\n const rowAbove = formulaInProgress.getRow(index - 1);\r\n const rowBelow = formulaInProgress.getRow(index + 1);\r\n const _rowAboveIsValue =\r\n !isNullOrUndefined(rowAbove) && !rowAbove.isOperator();\r\n const _rowBelowIsValue =\r\n !isNullOrUndefined(rowBelow) && !rowBelow.isOperator();\r\n const _disableRemoveOperator = _rowAboveIsValue && _rowBelowIsValue;\r\n if (row.isOperator()) {\r\n return (\r\n updateRowOperator({ operator, index })}\r\n onRemove={() => removeRowOperator(index)}\r\n operator={row.operator}\r\n />\r\n );\r\n } else {\r\n return (\r\n
          \r\n
          \r\n {row.isManual() && (\r\n \r\n )}\r\n {row.isElement() && (\r\n \r\n )}\r\n {\r\n removeFormulaRow({\r\n formulaRow: row,\r\n formulaRowIndex: index,\r\n });\r\n //if user clicks on any button on the edit formula panel is going to reset the selected row\r\n //to avoid keeping a row value that is not being selected at the moment\r\n setSelectedRow(null);\r\n }}\r\n Icon={CrossIcon}\r\n />\r\n
          \r\n {row.isElement() && !row.elementActive && (\r\n \r\n \r\n
          \r\n )}\r\n \r\n );\r\n }\r\n });\r\n };\r\n\r\n const getValidationMessage = () => {\r\n if (!formulaInProgress.areManualInputsRealNumbers())\r\n return (\r\n \r\n );\r\n\r\n if (!formulaInProgress.areParenthesesBalanced()) {\r\n return (\r\n \r\n );\r\n } else if (\r\n (!isNullOrUndefined(formulaInProgress.formulaId) ||\r\n formulaInProgress.isNewFormula) &&\r\n formulaInProgress.isFormulaFlagged()\r\n ) {\r\n return (\r\n \r\n \r\n \r\n

          \r\n {!toggleShowMore && (\r\n \r\n \r\n

          \r\n )}\r\n \r\n setToggleShowMore((prevToggle) => !prevToggle)\r\n }\r\n >\r\n \r\n \r\n \r\n ),\r\n },\r\n }}\r\n isInternationalized={true}\r\n />\r\n );\r\n }\r\n };\r\n const getRoundedNumberIcon = () => {\r\n return (\r\n
          \r\n \r\n \r\n \r\n
          \r\n );\r\n };\r\n return (\r\n
          \r\n {getValidationMessage() && (\r\n
          \r\n {getValidationMessage()}\r\n
          \r\n )}\r\n
          \r\n \r\n {getFormulaRows()}\r\n \r\n
          \r\n
          \r\n \r\n {!shouldRestrictAutomaticIdentifier() &&\r\n Object.values(AUTOMATION_CREATION_TYPE).includes(\r\n formulaInProgress.data.creationType,\r\n ) && (\r\n \r\n )}\r\n
          \r\n \r\n {(!isNullOrUndefined(formulaInProgress.formulaId) ||\r\n formulaInProgress.isNewFormula) &&\r\n formulaInProgress.isFormulaFlagged(elementDetails) &&\r\n !elementDetails.isSystemOverrideFlagged() && (\r\n
          \r\n =\r\n {formulaInProgress.isFormulaRounded(elementDetails) &&\r\n getRoundedNumberIcon()}\r\n \r\n
          \r\n )}\r\n
          \r\n {(!formulaInProgress.isFormulaFlagged(elementDetails) ||\r\n elementDetails.isSystemOverrideFlagged()) && =}\r\n {formulaInProgress.isFormulaRounded(elementDetails) &&\r\n (!formulaInProgress.isFormulaFlagged(elementDetails) ||\r\n elementDetails.isSystemOverrideFlagged()) &&\r\n getRoundedNumberIcon()}\r\n {getResultDisplay({\r\n result: !isNullOrUndefined(formulaInProgress.roundingResult)\r\n ? formulaInProgress.roundingResult\r\n : formulaInProgress.computedResult,\r\n numberFormatId,\r\n })}\r\n
          \r\n
          \r\n {formulaInProgress.hasRows() && (\r\n setShowRoundNumberModal(true)}\r\n >\r\n \r\n \r\n )}\r\n
          \r\n
          \r\n
          \r\n
          \r\n
          \r\n {/* TODO: on nex sprint we will work on this button functionality, until then it will be hide\r\n {}}\r\n Icon={PlusMinusIcon}\r\n /> */}\r\n {\r\n removeAllRows();\r\n //if user clicks on any button on the edit formula panel is going to reset the selected row\r\n //to avoid keeping a row value that is not being selected at the moment\r\n setSelectedRow(null);\r\n }}\r\n Icon={RefreshIcon}\r\n iconSize={FORMULA_BUTTON_ICON_SIZE}\r\n />\r\n
          \r\n
          \r\n
          \r\n
          \r\n {\r\n addOperator();\r\n //if user clicks on any button on the edit formula panel is going to reset the selected row\r\n //to avoid keeping a row value that is not being selected at the moment\r\n setSelectedRow(null);\r\n }}\r\n disabled={formulaInProgress.disableAddOperator()}\r\n iconSize={FORMULA_BUTTON_ICON_SIZE}\r\n >\r\n \r\n \r\n {\r\n addManualRow();\r\n //if user clicks on any button on the edit formula panel is going to reset the selected row\r\n //to avoid keeping a row value that is not being selected at the moment\r\n setSelectedRow(null);\r\n }}\r\n disabled={formulaInProgress.disableAddRow()}\r\n iconSize={FORMULA_BUTTON_ICON_SIZE}\r\n >\r\n \r\n \r\n
          \r\n
          \r\n
          \r\n \r\n {showRoundNumberModal && (\r\n {\r\n setRoundingResult({ newValue, roundNumberInputValue });\r\n setShowRoundNumberModal(false);\r\n updateElementCacheByCalloutAction({\r\n elementIds: [elementDetails.id],\r\n showCallout: true,\r\n });\r\n }}\r\n onCancel={() => {\r\n if (isNullOrUndefined(formulaInProgress.roundingScale)) {\r\n setRoundNumberInputValue('');\r\n } else {\r\n setRoundNumberInputValue(formulaInProgress.roundingScale);\r\n }\r\n setShowRoundNumberModal(false);\r\n }}\r\n numberFormatId={numberFormatId}\r\n currentNumber={\r\n !isNullOrUndefined(formulaInProgress.roundingResult)\r\n ? formulaInProgress.roundingResult\r\n : formulaInProgress.computedResult\r\n }\r\n inputValue={roundNumberInputValue}\r\n setInputValue={setRoundNumberInputValue}\r\n computedResult={formulaInProgress.result}\r\n roundingScale={formulaInProgress.roundingScale}\r\n removeRounding={() => {\r\n setRoundNumberInputValue('');\r\n setRoundingResult({ newValue: null, roundNumberInputValue: null });\r\n setShowRoundNumberModal(false);\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n};\r\nFormulaPanelEdit.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** The formula we are currently editing */\r\n formulaInProgress: PropTypes.instanceOf(FormulaForm).isRequired,\r\n /** The action to be fired when an operator is updated in a row of the formula */\r\n updateRowOperator: PropTypes.func.isRequired,\r\n /** The action to be fired when we add an operator to the formula */\r\n addOperator: PropTypes.func.isRequired,\r\n /** The action to be fired when we add a row to the formula */\r\n addManualRow: PropTypes.func.isRequired,\r\n /** The action to be fired when one of the formula row needs to persisted and validated. */\r\n setManualNumber: PropTypes.func.isRequired,\r\n /** Action fired when an operator is to be removed */\r\n removeRowOperator: PropTypes.func.isRequired,\r\n /** Action fired when a formula row is to be removed */\r\n removeFormulaRow: PropTypes.func.isRequired,\r\n /** Action fired when we want to remove all the rows. */\r\n removeAllRows: PropTypes.func.isRequired,\r\n /** Event handler to check for empty input field */\r\n checkEmptyInput: PropTypes.func.isRequired,\r\n /* Action to be fired when one formula row is selected */\r\n selectElement: PropTypes.func.isRequired,\r\n /* action to set the value of the actual selected row */\r\n setSelectedRow: PropTypes.func.isRequired,\r\n /* function to deallocate all the elements, sections, notes or items on content panel */\r\n deallocateItems: PropTypes.func.isRequired,\r\n /* action to set the computed value of the current formula */\r\n setRoundingResult: PropTypes.func.isRequired,\r\n /* function to update the callout state for the given element */\r\n updateElementCacheByCalloutAction: PropTypes.func.isRequired,\r\n};\r\nexport default memo(FormulaPanelEdit);\r\n","import { connect } from 'react-redux';\r\n\r\nimport {\r\n addManualFormulaRow,\r\n updateRowOperator,\r\n setFormulaManualNumber,\r\n removeFormulaRow,\r\n addFormulaRowOperator,\r\n removeFormulaRowOperator,\r\n removeAllFormulaRows,\r\n setSelectedRowAction,\r\n setRoundingResultAction,\r\n} from 'store/actions/formula-actions';\r\nimport {\r\n selectElementContentPanel,\r\n deallocateItems,\r\n} from 'store/actions/statement-content-actions';\r\nimport { updateElementCacheByCalloutAction } from 'store/actions/element-cache-actions';\r\n\r\nimport FormulaPanelEdit from 'components/feature/element-panel/formula-panel/_formula-panel-edit-formula-component';\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n elementPanel: { elementDetails },\r\n statementContent: { elementCache },\r\n selectedStatement: { statement },\r\n formulaPanel: { formula },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n ...ownProps,\r\n elementDetails,\r\n formulaInProgress: formula,\r\n numberFormatId: statement && statement.numberFormatId,\r\n elementCache,\r\n});\r\nconst mapDispatchToProps = {\r\n addManualRow: addManualFormulaRow,\r\n updateRowOperator,\r\n setManualNumber: setFormulaManualNumber,\r\n removeFormulaRow,\r\n addOperator: addFormulaRowOperator,\r\n removeRowOperator: removeFormulaRowOperator,\r\n removeAllRows: removeAllFormulaRows,\r\n selectElement: selectElementContentPanel,\r\n setSelectedRow: setSelectedRowAction,\r\n deallocateItems,\r\n setRoundingResult: setRoundingResultAction,\r\n updateElementCacheByCalloutAction,\r\n};\r\nexport default connect(mapStateToProps, mapDispatchToProps)(FormulaPanelEdit);\r\n","import React, { Component } from 'react';\r\nimport classNames from 'classnames';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport {\r\n FORMULA_OPERATOR_TYPE_OPTIONS,\r\n ROUND_NUMBER_ICON_HEIGHT,\r\n ROUND_NUMBER_ICON_WIDTH,\r\n getOriginalComputedValueTooltip,\r\n getResultDisplay,\r\n} from 'constants/feature/formula-constants';\r\nimport FormulaPanelEditContainer from 'containers/feature/formula-panel/formula-panel-edit-formula-container';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport FormulaForm from 'models/form/formula-form-model';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { ReactComponent as FlaggedIcon } from 'icons/flag-icon.svg';\r\nimport { ReactComponent as RoundNumberIcon } from 'icons/round-number.svg';\r\nimport classnames from 'classnames';\r\nimport { shouldDisplayValueBeFlagged } from 'utils/formula-utils';\r\nimport MultiLineEllipsis from 'components/common/multi-line-ellipsis-text-component';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nimport { getElementResultByNumberFormat } from 'utils/formula-utils';\r\nimport { removeCommasFromNumber } from 'utils/number-formatter-util';\r\n\r\nexport const FORMULA_PANEL_CONTENT_BLOCK = 'formula-panel-content';\r\nexport const FORMULA_PANEL_CONTENT_ID_BLOCK = 'formula-panel-content-id';\r\nexport const FLAGGED_FORMULA_ICON_WIDTH = '15px';\r\nexport const FLAGGED_FORMULA_ICON_HEIGHT = '19px';\r\n\r\nconst OPERATOR_DROP_DOWN_WIDTH = '48px';\r\n\r\nclass FormulaPanelContent extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n elementDisplayHovered: false,\r\n isInputEmpty: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { initFormulaCreate } = this.props;\r\n initFormulaCreate();\r\n }\r\n\r\n handleElementDisplayOnMouseEnter = () => {\r\n this.setState((state) => ({\r\n elementDisplayHovered: true,\r\n }));\r\n };\r\n\r\n handleElementDisplayOnMouseLeave = () => {\r\n this.setState((state) => ({\r\n elementDisplayHovered: false,\r\n }));\r\n };\r\n\r\n checkEmptyInput = (number) => {\r\n const { isInputEmpty } = this.state;\r\n if (number === '') {\r\n if (!isInputEmpty) {\r\n this.setState({ isInputEmpty: true });\r\n }\r\n } else {\r\n if (isInputEmpty) {\r\n this.setState({ isInputEmpty: false });\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n elementDetails,\r\n formulaInProgress,\r\n setFormulaOperator,\r\n saveFormula,\r\n onCancel,\r\n numberFormatId,\r\n } = this.props;\r\n const { elementDisplayHovered, isInputEmpty } = this.state;\r\n const _isFormulaValid = formulaInProgress.isFormulaValid();\r\n return (\r\n \r\n
          \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n scrollElementIntoView({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\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 {formulaInProgress.isFormulaRounded(elementDetails) && (\r\n \r\n \r\n \r\n \r\n
          \r\n )}\r\n {(!isNullOrUndefined(formulaInProgress.formulaId) ||\r\n formulaInProgress.isNewFormula) &&\r\n formulaInProgress.isFormulaFlagged(elementDetails) &&\r\n !elementDetails.isSystemOverrideFlagged() && (\r\n \r\n \r\n \r\n )}\r\n \r\n {getResultDisplay({\r\n result: !isNullOrUndefined(\r\n formulaInProgress.roundingResult,\r\n )\r\n ? formulaInProgress.roundingResult\r\n : formulaInProgress.computedResult,\r\n numberFormatId,\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 saveFormula()}\r\n disabled={\r\n isInputEmpty ||\r\n !_isFormulaValid ||\r\n (_isFormulaValid && !formulaInProgress.hasBeenModified)\r\n }\r\n >\r\n \r\n \r\n \r\n \r\n
          \r\n );\r\n }\r\n}\r\n\r\nFormulaPanelContent.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** The formula we are working on from the redux store */\r\n formulaInProgress: PropTypes.instanceOf(FormulaForm).isRequired,\r\n /** The action used to initialize a formula form model for creation */\r\n initFormulaCreate: PropTypes.func.isRequired,\r\n /** The action used to set the operator on the current formula */\r\n setFormulaOperator: PropTypes.func.isRequired,\r\n /** Action fired to save the formula */\r\n saveFormula: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default FormulaPanelContent;\r\n","import { connect } from 'react-redux';\r\n\r\nimport {\r\n initFormulaCreate,\r\n setFormulaOperator,\r\n} from 'store/actions/formula-actions';\r\n\r\nimport FormulaPanelContent from 'components/feature/element-panel/formula-panel/_formula-panel-content-component';\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n elementPanel: { elementDetails },\r\n formulaPanel: { formula },\r\n selectedStatement: { statement },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n ...ownProps,\r\n elementDetails,\r\n numberFormatId: statement && statement.numberFormatId,\r\n formulaInProgress: formula,\r\n});\r\nconst mapDispatchToProps = {\r\n initFormulaCreate,\r\n setFormulaOperator,\r\n};\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(FormulaPanelContent);\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nconst FORMULA_CANCEL_MODAL_ID = 'formula-cancel-modal-id';\r\nconst FormulaCancelModal = ({ onClickYes, onClickNo }) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nFormulaCancelModal.propTypes = {\r\n /** Action fired when user clicks Yes button */\r\n onClickYes: PropTypes.func.isRequired,\r\n /** Action fired when user clicks No || close button */\r\n onClickNo: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(FormulaCancelModal);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Flyout, {\r\n FlyoutHeader,\r\n FlyoutPanelContent,\r\n} from 'components/common/omnia/flyout-component';\r\nimport FormulaPanelHeader from './_formula-panel-header-component';\r\nimport FormulaPanelContentContainer from 'containers/feature/formula-panel/formula-panel-content-container';\r\nimport FormulaCancelModal from './formula-cancel-modal-component';\r\nimport FormulaForm from 'models/form/formula-form-model';\r\nimport { history } from 'store/store';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\nexport const FORMULA_PANEL_BLOCK = 'formula-panel';\r\nexport const FORMULA_PANEL_ID_BLOCK = 'formula-panel-id';\r\n\r\nclass FormulaPanel extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.unBlockNavigation = null;\r\n this.shouldBlockNavigation = false;\r\n this.toLocation = null;\r\n }\r\n\r\n componentDidUpdate() {\r\n const { formulaInProgress } = this.props;\r\n this.shouldBlockNavigation = formulaInProgress.hasBeenModified;\r\n }\r\n\r\n componentDidMount() {\r\n const { toggleFormulaCancelModal } = this.props;\r\n this.unBlockNavigation = history.block((location) => {\r\n if (this.shouldBlockNavigation) {\r\n toggleFormulaCancelModal(true);\r\n this.toLocation = location;\r\n return false;\r\n }\r\n return true;\r\n });\r\n\r\n /** Prevent browser from navigating away from statenement content page\r\n * if the they type a random url and if formula is not saved */\r\n window.addEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n\r\n componentWillUnmount() {\r\n this.unBlockNavigation();\r\n window.removeEventListener('beforeunload', this._blockUrlNavigation);\r\n }\r\n\r\n _blockUrlNavigation = (e) => {\r\n if (this.shouldBlockNavigation) {\r\n // Cancel the event\r\n e.preventDefault();\r\n // Chrome requires returnValue to be set\r\n e.returnValue = '';\r\n }\r\n };\r\n\r\n _toggleCancelModal = () => {\r\n const {\r\n toggleFormulaCancelModal,\r\n cancelModal,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n } = this.props;\r\n const { openFormulaCancelModal } = cancelModal;\r\n toggleFormulaCancelModal(!openFormulaCancelModal);\r\n if (openFormulaCancelModal) {\r\n openCancelModalAfterModalConfirm(false);\r\n storeSelectedNoteId(null);\r\n storeSelectedNotePseudoId(null);\r\n }\r\n };\r\n\r\n /** First action fired when cancel or back button is clicked, determines if\r\n * we should show cancel modal or just close the formula panel\r\n */\r\n _determineActionOnCancel = () => {\r\n this._toggleCancelModal();\r\n this.toLocation = null;\r\n };\r\n\r\n /** Action fired from the cancel modal when we have confirmed that we'd like to\r\n * discard our changes and close the formula panel\r\n */\r\n _confirmCancelFromCancelModal = () => {\r\n const {\r\n closeFormulaPanelFlyout,\r\n toggleNotesPanel,\r\n selectNoteFromContentPanel,\r\n cancelModal,\r\n onSectionClick,\r\n cancelCopyFormula,\r\n } = this.props;\r\n const {\r\n openFormulaCancelModal,\r\n selectedNoteId,\r\n selectedPseudoNoteId,\r\n openNotePanelAfterConfirm,\r\n openSectionPanelAfterconfirm,\r\n selectedSectionId,\r\n } = cancelModal;\r\n let fetchElementsAfterModalClose = true;\r\n this._toggleCancelModal();\r\n cancelCopyFormula();\r\n if (this.toLocation) {\r\n this.shouldBlockNavigation = false;\r\n history.push(this.toLocation.pathname);\r\n fetchElementsAfterModalClose = false;\r\n }\r\n if (openFormulaCancelModal && openNotePanelAfterConfirm) {\r\n closeFormulaPanelFlyout(fetchElementsAfterModalClose);\r\n if (selectedNoteId === null || selectedPseudoNoteId === null) {\r\n toggleNotesPanel();\r\n } else {\r\n selectNoteFromContentPanel({\r\n elementId: selectedNoteId,\r\n pseudoElementId: selectedPseudoNoteId,\r\n });\r\n }\r\n }\r\n if (\r\n openSectionPanelAfterconfirm &&\r\n openFormulaCancelModal &&\r\n !isNullOrUndefined(selectedSectionId)\r\n ) {\r\n closeFormulaPanelFlyout(fetchElementsAfterModalClose);\r\n onSectionClick({ sectionId: selectedSectionId });\r\n } else {\r\n closeFormulaPanelFlyout(fetchElementsAfterModalClose);\r\n }\r\n };\r\n\r\n handleSaveFormula = async () => {\r\n const {\r\n closeFormulaPanelFlyout,\r\n saveFormula,\r\n updateFormula,\r\n formulaInProgress,\r\n } = this.props;\r\n if (formulaInProgress.isCreate()) {\r\n await saveFormula();\r\n } else {\r\n await updateFormula();\r\n }\r\n closeFormulaPanelFlyout();\r\n };\r\n\r\n render() {\r\n const { showFormulaPanel, cancelModal } = this.props;\r\n const { openFormulaCancelModal } = cancelModal;\r\n\r\n return (\r\n <>\r\n \r\n {showFormulaPanel && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {openFormulaCancelModal && (\r\n \r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nFormulaPanel.propTypes = {\r\n /**A boolean indicating if we should show the formula panel or not. */\r\n showFormulaPanel: PropTypes.bool.isRequired,\r\n /**The action that is fired when we need to hide the formula panel. */\r\n closeFormulaPanelFlyout: PropTypes.func.isRequired,\r\n /** Current formula form in progress */\r\n formulaInProgress: PropTypes.instanceOf(FormulaForm).isRequired,\r\n /**The action that is fired when user presses save button on formula-panel */\r\n saveFormula: PropTypes.func.isRequired,\r\n /** Action for updating formula */\r\n updateFormula: PropTypes.func.isRequired,\r\n /** Action to open the note panel */\r\n toggleNotesPanel: PropTypes.func,\r\n /** object value containing the cancel modal model */\r\n cancelModal: PropTypes.object,\r\n /** action fired to open the internal reference cancel modal */\r\n toggleInternalReferenceCancelModal: PropTypes.func,\r\n /** action fired to indicate the note panel will be opened after modal is confirmed */\r\n openCancelModalAfterModalConfirm: PropTypes.func,\r\n /** action fired to store the selected note in redux */\r\n storeSelectedNoteId: PropTypes.func,\r\n /** action fired to store the psuedo id of the selected note in redux */\r\n storeSelectedNotePseudoId: PropTypes.func,\r\n /**The action to open the section. */\r\n onSectionClick: PropTypes.func,\r\n /**The action to open the formula cancel modal. */\r\n toggleFormulaCancelModal: PropTypes.func,\r\n /** returns true if statement is OCR statement */\r\n isOCR: PropTypes.bool,\r\n};\r\n\r\nexport default FormulaPanel;\r\n","import { connect } from 'react-redux';\r\n\r\nimport { selectNoteFromContentPanel } from 'store/actions/notes-panel-actions';\r\nimport {\r\n requestCreateNewFormula,\r\n requestUpdateFormula,\r\n} from 'store/actions/formula-actions';\r\nimport {\r\n toggleFormulaCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\nimport FormulaPanel from 'components/feature/element-panel/formula-panel/formula-panel-component';\r\nimport { toggleNotesPanel } from 'store/actions/panel-controller-actions';\r\nimport { onSectionClick } from 'store/actions/statement-content-actions';\r\nimport { cancelCopyFormula } from 'store/actions/copy-formula-actions';\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n formulaPanel: { formula },\r\n selectedStatement: { isOCR },\r\n },\r\n ui: {\r\n statementPage: { cancelModal },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n ...ownProps,\r\n formulaInProgress: formula,\r\n showCancelModalBoolean: formula.showCancelModalBoolean,\r\n shouldOpenNotePanelAfterCancel: formula.openNotePanelAfterCancel,\r\n selectedNoteId: formula.selectedNoteAfterFormulaCancel,\r\n selectedNotePseudoId: formula.selectedNotePseudoId,\r\n cancelModal,\r\n isOCR,\r\n});\r\nconst mapDispatchToProps = {\r\n saveFormula: requestCreateNewFormula,\r\n updateFormula: requestUpdateFormula,\r\n toggleFormulaCancelModal,\r\n toggleNotesPanel,\r\n selectNoteFromContentPanel,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n onSectionClick,\r\n cancelCopyFormula,\r\n};\r\nexport default connect(mapStateToProps, mapDispatchToProps)(FormulaPanel);\r\n","import React, { memo } from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as Information } from 'icons/icon-information-tooltip.svg';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nconst INFORMATION_ICON_SIZE = '18px';\r\n\r\nexport const INTERNAL_REFERENCE_PANEL_HEADER_BLOCK =\r\n 'internal-reference-panel-header';\r\nexport const INTERNAL_REFERENCE_PANEL_HEADER_ID_BLOCK =\r\n 'internal-reference-panel-header-id';\r\n\r\nconst InternalReferencePanelHeader = () => {\r\n const INTERNAL_REFERENCE_HEADER_INFORMATION_TOOLTIP = new TooltipOptions({\r\n text: {\r\n id: 'internal-reference-panel.header.information-tooltip',\r\n values: {\r\n br:
          ,\r\n b: (...chunks) => (\r\n \r\n {chunks}\r\n \r\n ),\r\n },\r\n },\r\n id: 'internal-reference-panel-id-tooltip-information',\r\n position: 'left',\r\n });\r\n\r\n return (\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\nexport default memo(InternalReferencePanelHeader);\r\n","import React, { useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport ExpandableRow from 'components/common/expandable-row-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport classnames from 'classnames';\r\nimport { ReactComponent as AddLink } from 'icons/plus-circle.svg';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport shortid from 'shortid';\r\nimport { connect } from 'react-redux';\r\nimport { removeSuggestedReferenceRequest } from 'api/internal-reference-api';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport AmountAttributeDetails from 'components/common/element-amount-attributes-details-component';\r\nimport {\r\n UNIT_OPTIONS_MAP,\r\n SCALING_OPTIONS_MAP,\r\n} from 'constants/feature/element-attribute-constants';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport {\r\n fetchSuggestedListed,\r\n internalReferenceSuggestedListError,\r\n} from 'store/actions/internal-reference-suggestion-list-actions';\r\nimport InternalReferenceSuggestionList from 'models/api/internal-reference-suggestion-list-model';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { getOCRElementStyleByElementStatus } from 'constants/feature/element-panel-constants';\r\n\r\nexport const INTERNAL_REFERENCE_SUGGESTED_REFERENCES_BLOCK =\r\n 'internal-reference-panel-suggested-references';\r\nexport const SUGGESTED_REFERENCES_ELEMENT_ENTRY =\r\n 'internal-reference-suggestion-element-entry';\r\n\r\nconst SUGGESTED_REFERENCE_ID_BLOCK = 'suggested-references-id';\r\n\r\nexport const InternalReferenceSuggestedReferences = ({\r\n revisionId,\r\n elementId,\r\n onAddSuggestion,\r\n selectElementFromInternalReference,\r\n expandExpandableRow,\r\n minimizeExpandableRow,\r\n showExpandableRow,\r\n selectedElement,\r\n selectElementContentPanel,\r\n internalReferenceSuggestionList,\r\n fetchSuggestedListed,\r\n internalReferenceSuggestedListError,\r\n}) => {\r\n const [selectedRow, setSelectedRow] = useState(null);\r\n return (\r\n
          \r\n \r\n \r\n {internalReferenceSuggestionList.count > 0 ? (\r\n internalReferenceSuggestionList.suggestions.map(\r\n (suggestedElement, iter) => {\r\n const elementDetails = {\r\n scaling: SCALING_OPTIONS_MAP.get(suggestedElement.scalingId),\r\n units: UNIT_OPTIONS_MAP.get(suggestedElement.unitsId),\r\n period: `${suggestedElement.periodType} ${suggestedElement.fiscalYear}`,\r\n entity: suggestedElement.entity,\r\n };\r\n const elementData = new ElementDetails().setLoaded({\r\n response: { data: { result: suggestedElement } },\r\n });\r\n return (\r\n {\r\n scrollElementIntoView({\r\n elementId: suggestedElement.id,\r\n sectionId: suggestedElement.sectionId,\r\n });\r\n selectElementFromInternalReference({\r\n elementId: suggestedElement.id,\r\n });\r\n setSelectedRow(iter);\r\n selectElementContentPanel({\r\n elementIds: [suggestedElement.id],\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n });\r\n }}\r\n key={shortid.generate()}\r\n >\r\n \r\n \r\n {suggestedElement.display}\r\n
          \r\n \r\n \r\n {suggestedElement.sectionname}\r\n \r\n \r\n \r\n \r\n {suggestedElement.label}\r\n \r\n \r\n \r\n\r\n {\r\n try {\r\n e.stopPropagation();\r\n await removeSuggestedReferenceRequest({\r\n revisionId: revisionId,\r\n sourceElementId: elementId,\r\n suggestedElementId: suggestedElement.id,\r\n });\r\n fetchSuggestedListed({ revisionId, elementId });\r\n } catch (error) {\r\n internalReferenceSuggestedListError(error);\r\n }\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n {\r\n e.stopPropagation();\r\n onAddSuggestion({\r\n targetElementId: suggestedElement.id,\r\n isFromSuggestion: true,\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\nInternalReferenceSuggestedReferences.prototypes = {\r\n /** Specified element's id */\r\n elementId: PropTypes.number.isRequired,\r\n /** Specified revisions's id */\r\n revisionId: PropTypes.number.isRequired,\r\n /** Function for expanding the expandableRow Component */\r\n expandExpandableRow: PropTypes.func.isRequired,\r\n /** Function for hiding the expandableRow Component */\r\n minimizeExpandableRow: PropTypes.func.isRequired,\r\n /** Boolean set to false by default and toggles the expandableRow */\r\n showExpandableRow: PropTypes.bool.isRequired,\r\n /**The action that is fired when we wish to add a suggested reference to an internal reference */\r\n onAddSuggestion: PropTypes.func.isRequired,\r\n /**The action that is fired to highlight elements from the content panel after we click on them in the internal reference */\r\n selectElementFromInternalReference: PropTypes.func.isRequired,\r\n /* Action to highlight an element on content panel */\r\n selectElementContentPanel: PropTypes.func.isRequired,\r\n /* Action to call when an error occurs */\r\n internalReferenceSuggestedListError: PropTypes.func.isRequired,\r\n /* List of suggested elements for that particular IR */\r\n internalReferenceSuggestionList: PropTypes.instanceOf(\r\n InternalReferenceSuggestionList,\r\n ),\r\n /* The details of the selected element */\r\n selectedElement: PropTypes.instanceOf(ElementDetails),\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n internalReferencePanel: { internalReferenceSuggestionList },\r\n },\r\n}) => ({\r\n internalReferenceSuggestionList,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n fetchSuggestedListed,\r\n internalReferenceSuggestedListError,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(InternalReferenceSuggestedReferences);\r\n","import React, { Component } from 'react';\r\nimport shortid from 'shortid';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport InternalReferenceElementEntry from 'components/feature/element-panel/annotations/_internal-reference-element-entry-component';\r\nimport { getElementFlaggedIcon } from 'constants/feature/element-panel-constants';\r\nimport classNames from 'classnames';\r\nimport Banner, { BANNER_TYPES } from 'components/common/banner-component';\r\nimport CopyAnnotationButton from './_copy-annotation-modal-controller';\r\n\r\nconst INTERNAL_REFERENCE_LISTING_BLOCK = 'internal-reference-panel-listing';\r\nconst INTERNAL_REFERENCE_LISTING_ID = 'internal-reference-panel-listing-id';\r\n\r\nclass InternalReferenceListing extends Component {\r\n constructor() {\r\n super();\r\n this.state = {\r\n selectedRow: null,\r\n showCopyAnnotationModal: false,\r\n };\r\n }\r\n setSelected = (selected) => {\r\n this.setState({\r\n selectedRow: selected,\r\n });\r\n };\r\n getInternalReferenceElementList = () => {\r\n const {\r\n elementDetails,\r\n internalReference,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n checkIfFeatureFlagEnabled,\r\n } = this.props;\r\n return internalReference\r\n .getInternalReferencesByTimeCreated({ elementId: elementDetails.id })\r\n .map((element, iter) => {\r\n return (\r\n
          this.setSelected(iter)} key={shortid.generate()}>\r\n \r\n
          \r\n );\r\n });\r\n };\r\n\r\n render() {\r\n const { elementDetails, internalReference } = this.props;\r\n const internalReferenceCount = internalReference.getOtherElementsCount({\r\n elementId: elementDetails.id,\r\n });\r\n return (\r\n
          \r\n {internalReference.hasElements() ? (\r\n \r\n \r\n {elementDetails.isInternalRefFlagged() &&\r\n getElementFlaggedIcon({ elementDetails })}{' '}\r\n \r\n \r\n \r\n {elementDetails.isInternalRefFlagged() && (\r\n \r\n )}\r\n
          \r\n \r\n \r\n ) : (\r\n

          \r\n \r\n

          \r\n )}\r\n \r\n {this.getInternalReferenceElementList()}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nInternalReferenceListing.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /**The model the represents the internal reference which is used in the internal reference panel. */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /**The action that is fired to highlight elements from the content panel after we click on them in the internal reference */\r\n selectElementFromInternalReference: PropTypes.func.isRequired,\r\n /**The action that is fired when we wish to detach an element from an internal reference */\r\n detachElementFromInternalReference: PropTypes.func.isRequired,\r\n // action method to check if feature flag is enabled for the feature with mentioned name\r\n checkIfFeatureFlagEnabled: PropTypes.func.isRequired,\r\n};\r\nexport default InternalReferenceListing;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport ToolTip from 'components/common/tool-tip-component';\r\nimport { ReactComponent as Unlink } from 'icons/unlink.svg';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport AmountAttributeDetails from 'components/common/element-amount-attributes-details-component';\r\nimport InternalReferenceSuggestedReferences from './_internal-reference-panel-suggested-references-component';\r\nimport InternalReferenceListing from './_internal-reference-panel-listing-component';\r\nimport {\r\n getElementFlaggedIcon,\r\n getOCRElementStyleByElementStatus,\r\n} from 'constants/feature/element-panel-constants';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport classNames from 'classnames';\r\n\r\nexport const INTERNAL_REFERENCE_PANEL_CONTENT_BLOCK =\r\n 'internal-reference-panel-content';\r\nexport const INTERNAL_REFERENCE_PANEL_CONTENT_ID_BLOCK =\r\n 'internal-reference-panel-content-id';\r\n\r\nconst UNLINK_ICON_SIZE = '28px';\r\n\r\nclass InternalReferencePanelContent extends Component {\r\n state = { isSuggestedRefExpanded: true };\r\n componentDidMount() {\r\n const { getInternalReferenceWithoutLoading } = this.props;\r\n getInternalReferenceWithoutLoading();\r\n }\r\n\r\n _toggleSuggestedRefExpandableRow = () => {\r\n this.setState({\r\n isSuggestedRefExpanded: !this.state.isSuggestedRefExpanded,\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n elementDetails,\r\n internalReference,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n addSuggestionToInternalReference,\r\n selectElementContentPanel,\r\n deallocateItems,\r\n updateWorkpaper,\r\n attachTickmarkToElement,\r\n getElementInternalReference,\r\n checkIfFeatureFlagEnabled,\r\n } = this.props;\r\n return (\r\n \r\n
          \r\n \r\n \r\n \r\n \r\n
          \r\n \r\n {\r\n scrollElementIntoView({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\r\n });\r\n deallocateItems();\r\n selectElementContentPanel({\r\n elementIds: [elementDetails.id],\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n });\r\n }}\r\n >\r\n {getElementFlaggedIcon({ elementDetails })}\r\n {elementDetails.display}\r\n \r\n {internalReference.hasElements() && (\r\n \r\n IR{internalReference.number}\r\n \r\n )}\r\n \r\n \r\n \r\n {!internalReference.hasElements() ? null : (\r\n \r\n \r\n \r\n detachElementFromInternalReference({\r\n internalReferenceId: internalReference.id,\r\n elementId: elementDetails.id,\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\nInternalReferencePanelContent.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /**The model that represents the internal reference which is used in the internal reference panel. */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /**The action that is fired to refresh the internal reference model used in the panel, as it is also used in the element panel */\r\n getInternalReferenceWithoutLoading: PropTypes.func.isRequired,\r\n /**The action that is fired to highlight elements from the content panel after we click on them in the internal reference */\r\n selectElementFromInternalReference: PropTypes.func.isRequired,\r\n /**The action that is fired when we wish to detach an element from an internal reference */\r\n detachElementFromInternalReference: PropTypes.func.isRequired,\r\n /**The action that is fired when we wish to add a suggested reference to an internal reference */\r\n addSuggestionToInternalReference: PropTypes.func.isRequired,\r\n /* Action to highlight an element on content panel */\r\n selectElementContentPanel: PropTypes.func.isRequired,\r\n /* function to deallocate all the elements, sections, notes or items on content panel */\r\n deallocateItems: PropTypes.func.isRequired,\r\n /**To create/update workpaper and refresh the corresponding element */\r\n updateWorkpaper: PropTypes.func.isRequired,\r\n /**To attach tickmark to an element and refresh the corresponding element*/\r\n attachTickmarkToElement: PropTypes.func.isRequired,\r\n /**This function will refresh IR element data */\r\n getElementInternalReference: PropTypes.func.isRequired,\r\n // action method to check if feature flag is enabled for the feature with mentioned name\r\n checkIfFeatureFlagEnabled: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default InternalReferencePanelContent;\r\n","import { connect } from 'react-redux';\r\n\r\nimport {\r\n getInternalReferenceWithoutLoading,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n addElementToInternalReference,\r\n} from 'store/actions/internal-reference-actions';\r\nimport {\r\n selectElementContentPanel,\r\n deallocateItems,\r\n} from 'store/actions/statement-content-actions';\r\n\r\nimport InternalReferenceContent from 'components/feature/element-panel/internal-reference-panel/_internal-reference-panel-content-component';\r\nimport { updateWorkpaper } from '../../../store/actions/workpaper-actions';\r\nimport { attachTickmarkToElement } from '../../../store/actions/element-panel-actions';\r\nimport { getElementInternalReference } from 'store/actions/internal-reference-actions';\r\nimport { checkIfFeatureFlagEnabled } from 'store/actions/selected-statement-actions';\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n elementPanel: { elementDetails },\r\n internalReferencePanel: { internalReference },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n ...ownProps,\r\n elementDetails,\r\n internalReference,\r\n});\r\nconst mapDispatchToProps = {\r\n getInternalReferenceWithoutLoading,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n addSuggestionToInternalReference: addElementToInternalReference,\r\n selectElementContentPanel,\r\n deallocateItems,\r\n updateWorkpaper,\r\n attachTickmarkToElement,\r\n getElementInternalReference,\r\n checkIfFeatureFlagEnabled,\r\n};\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(InternalReferenceContent);\r\n","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Modal from 'components/common/modal-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nconst FORMULA_CANCEL_MODAL_ID = 'internal-reference-cancel-modal-id';\r\nconst InternalReferenceCancelModal = ({ onClickYes, onClickNo }) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nInternalReferenceCancelModal.propTypes = {\r\n /** Action fired when user clicks Yes button */\r\n onClickYes: PropTypes.func.isRequired,\r\n /** Action fired when user clicks No || close button */\r\n onClickNo: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default InternalReferenceCancelModal;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Flyout, {\r\n FlyoutHeader,\r\n FlyoutPanelContent,\r\n} from 'components/common/omnia/flyout-component';\r\nimport InternalReferencePanelHeader from './_internal-reference-panel-header-component';\r\nimport InternalReferencePanelContentContainer from 'containers/feature/internal-reference/internal-reference-panel-content-container';\r\nimport InternalReferenceCancelModal from 'components/feature/element-panel/internal-reference-panel/_internal-reference-cancel-modal-component';\r\nimport { isNullOrUndefined } from 'utils/object-utils';\r\n\r\nexport const INTERNAL_REFERENCE_PANEL_BLOCK = 'internal-reference-panel';\r\nexport const INTERNAL_REFERENCE_PANEL_ID_BLOCK = 'internal-reference-panel-id';\r\nclass InternalReferencePanel extends Component {\r\n componentDidUpdate(prevProps, prevState) {\r\n if (\r\n !prevProps.showInternalReferencePanel &&\r\n this.props.showInternalReferencePanel\r\n ) {\r\n this.props.initInternalReferencePanel();\r\n }\r\n }\r\n\r\n confirmCancelModal() {\r\n const {\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleNotesPanel,\r\n cancelModal,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n selectNoteFromContentPanel,\r\n onSectionClick,\r\n } = this.props;\r\n const {\r\n selectedNoteId,\r\n selectedPseudoNoteId,\r\n openInternalReferenceCancelModal,\r\n openNotePanelAfterConfirm,\r\n openSectionPanelAfterconfirm,\r\n selectedSectionId,\r\n } = cancelModal;\r\n if (openInternalReferenceCancelModal && openNotePanelAfterConfirm) {\r\n // This will close the IR cancel modal\r\n toggleInternalReferenceCancelModal(false);\r\n\r\n // This is used to set a boolean value in cancel modal object which represent if we want to open notes panel.\r\n // It will just indicate that opening notes panel is required but not open notes panel. Name might be misleading\r\n // . It is an old code. Will take Infra Enabler and try to fix these things\r\n openCancelModalAfterModalConfirm(false);\r\n if (selectedNoteId && selectedPseudoNoteId) {\r\n selectNoteFromContentPanel({\r\n elementId: selectedNoteId,\r\n pseudoElementId: selectedPseudoNoteId,\r\n });\r\n storeSelectedNotePseudoId(null);\r\n storeSelectedNoteId(null);\r\n } else toggleNotesPanel();\r\n }\r\n if (\r\n openSectionPanelAfterconfirm &&\r\n openInternalReferenceCancelModal &&\r\n !isNullOrUndefined(selectedSectionId)\r\n ) {\r\n toggleInternalReferenceCancelModal(false);\r\n openCancelModalAfterModalConfirm(false);\r\n onSectionClick({ sectionId: selectedSectionId });\r\n } else {\r\n toggleInternalReferenceCancelModal(false);\r\n openCancelModalAfterModalConfirm(false);\r\n }\r\n }\r\n\r\n closeModal() {\r\n const {\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n } = this.props;\r\n toggleInternalReferenceCancelModal(false);\r\n openCancelModalAfterModalConfirm(false);\r\n storeSelectedNotePseudoId(null);\r\n storeSelectedNoteId(null);\r\n }\r\n\r\n render() {\r\n const {\r\n showInternalReferencePanel,\r\n closeInternalReferencePanel,\r\n cancelModal,\r\n } = this.props;\r\n const { openInternalReferenceCancelModal } = cancelModal;\r\n return (\r\n <>\r\n \r\n {showInternalReferencePanel && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {openInternalReferenceCancelModal && (\r\n {\r\n this.closeModal();\r\n }}\r\n onClickYes={() => {\r\n closeInternalReferencePanel();\r\n this.confirmCancelModal();\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nInternalReferencePanel.propTypes = {\r\n /**A boolean indicating if we should show the internal reference panel or not. */\r\n showInternalReferencePanel: PropTypes.bool.isRequired,\r\n /**The function that is fired when we need to hide the internal reference panel. */\r\n closeInternalReferencePanel: PropTypes.func.isRequired,\r\n /** Function fired when internal reference panel is shown, initializes redux information */\r\n initInternalReferencePanel: PropTypes.func.isRequired,\r\n // It is an Action method.This is used to set a boolean value in cancel modal object which represent if we want to open notes panel.\r\n // It will just indicate that opening notes panel is required but not open notes panel. Name might be misleading\r\n // . It is an old code. Will take Infra Enabler and try to fix these things\r\n openCancelModalAfterModalConfirm: PropTypes.func.isRequired,\r\n // It is an action method. It is used to close the IR panel cancel modal\r\n toggleInternalReferenceCancelModal: PropTypes.func.isRequired,\r\n /**The action to open the section. */\r\n onSectionClick: PropTypes.func,\r\n /**The action to open the section panel. */\r\n openSectionPanelAfterconfirm: PropTypes.func,\r\n /**The id of selectedsection. */\r\n selectedSectionId: PropTypes.number,\r\n};\r\n\r\nexport default InternalReferencePanel;\r\n","import ApiModel from 'models/api-model';\r\nimport { MenuOption } from 'models/utils/common/menu/menu-option-model';\r\nimport WorkpaperForm from '../form/workpaper-form-model';\r\nimport { isNullOrUndefined } from '../../utils/object-utils';\r\n\r\nexport class WorkpaperReferenceList extends ApiModel({\r\n data: {\r\n workpapers: [],\r\n },\r\n}) {\r\n get workpapers() {\r\n return this.data.workpapers;\r\n }\r\n\r\n processResponse({ response }) {\r\n return {\r\n data: {\r\n workpapers: response.data.result,\r\n },\r\n status: response.status,\r\n };\r\n }\r\n\r\n getSelectedWorkpaper(id) {\r\n const filteredWorkpapers = this.data.workpapers.find(\r\n (workpaper) => workpaper.workpaperRefId === id,\r\n );\r\n return new WorkpaperForm({\r\n data: {\r\n revisionId: filteredWorkpapers.revisionId,\r\n elementId: filteredWorkpapers.elementId,\r\n referenceNumber: filteredWorkpapers.referenceNumber,\r\n referenceName: filteredWorkpapers.referenceName,\r\n workpaperRefId: filteredWorkpapers.workpaperRefId,\r\n workpaperRefCreatedBy: filteredWorkpapers.workpaperRefCreatedBy,\r\n workpaperRefCreatedDate: filteredWorkpapers.workpaperRefCreatedDate,\r\n creationType: filteredWorkpapers.creationType,\r\n },\r\n });\r\n }\r\n\r\n getWorkpaperDropdownValues({ alreadyAddedWorkpaperIds }) {\r\n let workpaperDropdownOptions = {};\r\n this.data.workpapers.forEach((workpaper) => {\r\n workpaperDropdownOptions[workpaper.workpaperRefId] = new MenuOption({\r\n id: workpaper.workpaperRefId,\r\n title: workpaper.referenceNumber,\r\n value: workpaper.referenceNumber,\r\n isIntl: false,\r\n disabled: !isNullOrUndefined(\r\n alreadyAddedWorkpaperIds.find(\r\n (id) => id === workpaper.workpaperRefId,\r\n ),\r\n ),\r\n });\r\n });\r\n\r\n return Object.values(workpaperDropdownOptions);\r\n }\r\n\r\n getFilteredWorkpaperRefs(term) {\r\n return this.data.workpapers.filter(\r\n (workpaper) =>\r\n workpaper.referenceNumber.toLowerCase().indexOf(term.toLowerCase()) !==\r\n -1,\r\n );\r\n }\r\n}\r\n","import React from 'react';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Button from 'components/common/button-component';\r\nimport { ReactComponent as Plus } from 'icons/plus.svg';\r\nimport { SearchDropdownApi } from 'components/common/search-component';\r\nimport {\r\n debounceSearch,\r\n isSearchCharLengthValid,\r\n} from 'constants/util/search-utility';\r\nimport MenuApiData from 'models/utils/common/menu/menu-api-data-model';\r\nimport { WorkpaperReferenceList } from 'models/api/workpaper-reference-list-model';\r\nimport { getWorkpaperReferencesRequest } from 'api/workpaper-api';\r\n\r\nconst ATTACH_WORKPAPER_BLOCK = 'attach-work-paper';\r\nconst ATTACH_WORKPAPER_ID_BLOCK = 'attach-work-paper-id';\r\n\r\nconst MIN_CHAR_LENGTH_TO_SEARCH = 1;\r\n\r\nclass AttachWorkpaper extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n search: '',\r\n workpaperListModel: new WorkpaperReferenceList(),\r\n };\r\n this.debouncedSearch = debounceSearch(this._fetchWorkpaperReferences);\r\n }\r\n\r\n _searchWorkpapers = (val) => {\r\n this.setState({ search: val }, () => {\r\n if (isSearchCharLengthValid(val, MIN_CHAR_LENGTH_TO_SEARCH)) {\r\n this.debouncedSearch({ search: val });\r\n }\r\n });\r\n };\r\n\r\n _fetchWorkpaperReferences = async ({ search }) => {\r\n const { revisionId } = this.props;\r\n this.setState(({ workpaperListModel }) => ({\r\n workpaperListModel: workpaperListModel.setLoading(),\r\n }));\r\n\r\n try {\r\n const response = await getWorkpaperReferencesRequest({\r\n referenceNumber: search,\r\n revisionId,\r\n });\r\n this.setState(({ workpaperListModel }) => ({\r\n workpaperListModel: workpaperListModel.setLoaded({ response }),\r\n }));\r\n } catch (error) {\r\n this.setState(({ workpaperListModel }) => ({\r\n workpaperListModel: workpaperListModel.setError(error),\r\n }));\r\n }\r\n };\r\n\r\n render() {\r\n const {\r\n onCreate,\r\n onSelect,\r\n alreadyAddedWorkpaperIds,\r\n hideTitle,\r\n } = this.props;\r\n const { search, workpaperListModel } = this.state;\r\n\r\n return (\r\n
          \r\n {!hideTitle && (\r\n

          \r\n \r\n

          \r\n )}\r\n onCreate()}\r\n Icon={Plus}\r\n >\r\n \r\n \r\n\r\n
          \r\n this._searchWorkpapers(val)}\r\n value={search}\r\n isValid={true}\r\n resultsApiModel={\r\n new MenuApiData({\r\n apiModel: workpaperListModel,\r\n options: workpaperListModel.getWorkpaperDropdownValues({\r\n alreadyAddedWorkpaperIds: alreadyAddedWorkpaperIds || [],\r\n }),\r\n })\r\n }\r\n disableAutoComplete\r\n onClear={() => this._searchWorkpapers('')}\r\n minSearchCharLength={MIN_CHAR_LENGTH_TO_SEARCH}\r\n showSearchButton\r\n onSelectResult={async (workpaper) => {\r\n await onSelect({\r\n workpaper: workpaperListModel.getSelectedWorkpaper(\r\n workpaper.id,\r\n ),\r\n });\r\n }}\r\n />\r\n
          \r\n
          \r\n );\r\n }\r\n}\r\n\r\nAttachWorkpaper.defaultProps = {\r\n hideTitle: false,\r\n};\r\n\r\nAttachWorkpaper.propTypes = {\r\n /** Currently selected revision */\r\n revisionId: PropTypes.number,\r\n /** Function fired when user clicks Create */\r\n onCreate: PropTypes.func.isRequired,\r\n /** Function fired for when you want to attach a workpaer from search */\r\n onSelect: PropTypes.func.isRequired,\r\n /** Optional List of workpaper ids that should be disabled in the list */\r\n alreadyAddedWorkpaperIds: PropTypes.array,\r\n /** boolean to hide title */\r\n hideTitle: PropTypes.bool,\r\n};\r\n\r\nconst mapStateToProps = ({ data: { revision } }) => ({\r\n revisionId: revision.id,\r\n});\r\n\r\nexport { AttachWorkpaper };\r\nexport default connect(mapStateToProps, null)(AttachWorkpaper);\r\n","import React, { memo } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\nimport WorkpaperEntryWithDetach from 'components/feature/element-panel/annotations/workpaper-entry/workpaper-entry-with-detach-component';\r\n\r\nexport const ALREADY_LINKED_WORKPAPERS_BLOCK = 'already-linked-workpapers';\r\n\r\nconst AlreadyLinkedWorkpapers = ({ workpaperList, onDetachWorkpaper }) => {\r\n return (\r\n
          \r\n

          \r\n \r\n

          \r\n {workpaperList.workpapers.map((workpaper) => (\r\n \r\n ))}\r\n
          \r\n );\r\n};\r\n\r\nAlreadyLinkedWorkpapers.propTypes = {\r\n /** List of workpapers associated with this element */\r\n workpaperList: PropTypes.instanceOf(ElementWorkpaperList).isRequired,\r\n /** action fired to detach a work paper from this element */\r\n onDetachWorkpaper: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(AlreadyLinkedWorkpapers);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport TextInput from 'components/common/text-input-component';\r\nimport TextArea from 'components/common/text-area-component';\r\nimport WorkpaperForm from 'models/form/workpaper-form-model';\r\nimport {\r\n WPR_NUMBER_CHAR_LIMIT,\r\n WPR_NAME_CHAR_LIMIT,\r\n} from 'constants/feature/workpaper-panel-constants';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { checkIfStringContainsOnlySpaces } from 'constants/common/feature-common-utils';\r\n\r\nconst CREATE_WORKPAPER_BLOCK = 'create-workpaper-modal';\r\nconst CREATE_WORKPAPER_ID_BLOCK = 'create-workpaper-modal-id';\r\n\r\nclass CreateWorkpaperModal extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n workpaperInProgress: new WorkpaperForm(),\r\n visitedReferenceName: false,\r\n visitedReferenceNumber: false,\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { elementDetails } = this.props;\r\n this.setState((state) => ({\r\n workpaperInProgress: state.workpaperInProgress.initFromElement({\r\n elementDetails,\r\n }),\r\n }));\r\n }\r\n\r\n _handleCreateClick = async () => {\r\n const { onCreate } = this.props;\r\n const { workpaperInProgress } = this.state;\r\n try {\r\n this.setState((state) => ({\r\n workpaperInProgress: state.workpaperInProgress.setLoading(),\r\n }));\r\n await onCreate({\r\n workpaperModel: workpaperInProgress.trimmedWorkpaperReference(),\r\n });\r\n } catch (error) {\r\n if (this._isRequestErrorForDuplicate(error)) {\r\n this.setState((state) => ({\r\n workpaperInProgress: state.workpaperInProgress.setDuplicateErrorLoaded(\r\n {\r\n duplicate: workpaperInProgress.referenceNumber,\r\n },\r\n ),\r\n }));\r\n } else {\r\n this.setState((state) => ({\r\n workpaperInProgress: state.workpaperInProgress.setError(error),\r\n }));\r\n }\r\n }\r\n };\r\n\r\n _isRequestErrorForDuplicate = (error) =>\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause.includes(\r\n 'This work paper reference number already exists', // distinct error message from API\r\n );\r\n\r\n _referenceNumberErrorText = () => {\r\n const { workpaperInProgress } = this.state;\r\n if (workpaperInProgress.isReferenceNumberDuplicate()) {\r\n return 'create-workpaper-modal.form.reference-number.error.duplicate';\r\n } else if (workpaperInProgress.doesRefNumberHaveIllegalChars()) {\r\n return 'create-workpaper-modal.form.reference-number.error.char-exclude';\r\n }\r\n return {\r\n id: 'create-workpaper-modal.form.reference-number.error.char-count',\r\n values: { limit: WPR_NUMBER_CHAR_LIMIT },\r\n };\r\n };\r\n\r\n render() {\r\n const { onClose } = this.props;\r\n const {\r\n workpaperInProgress,\r\n visitedReferenceName,\r\n visitedReferenceNumber,\r\n } = this.state;\r\n return (\r\n \r\n \r\n

          \r\n \r\n

          \r\n\r\n
          \r\n \r\n this.setState({\r\n visitedReferenceNumber: true,\r\n })\r\n }\r\n width={'100%'}\r\n onChange={(val) => {\r\n this.setState((state) => ({\r\n workpaperInProgress: state.workpaperInProgress.setReferenceNumber(\r\n val,\r\n ),\r\n }));\r\n }}\r\n isValid={\r\n !workpaperInProgress.isReferenceNumberDuplicate() &&\r\n (!visitedReferenceNumber ||\r\n workpaperInProgress.isReferenceNumberValid() ||\r\n checkIfStringContainsOnlySpaces(\r\n workpaperInProgress.referenceNumber,\r\n ))\r\n }\r\n errorText={this._referenceNumberErrorText()}\r\n type={'text'}\r\n value={workpaperInProgress.referenceNumber}\r\n />\r\n
          \r\n
          \r\n {\r\n this.setState((state) => ({\r\n workpaperInProgress: state.workpaperInProgress.setReferenceName(\r\n val,\r\n ),\r\n }));\r\n }}\r\n onBlur={() =>\r\n this.setState({\r\n visitedReferenceName: true,\r\n })\r\n }\r\n placeholder=\"create-workpaper-modal.form.reference-name.placeholder\"\r\n value={workpaperInProgress.referenceName}\r\n width={'100%'}\r\n />\r\n
          \r\n
          \r\n \r\n );\r\n }\r\n}\r\n\r\nCreateWorkpaperModal.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** func fired to close modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** func fired on create click */\r\n onCreate: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default CreateWorkpaperModal;\r\n","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport PropTypes from 'prop-types';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport Flyout, {\r\n FlyoutHeader,\r\n FlyoutPanelContent,\r\n} from 'components/common/omnia/flyout-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport AmountAttributeDetails from 'components/common/element-amount-attributes-details-component';\r\nimport AttachWorkpaper from 'components/feature/element-panel/workpaper-panel/_workpaper-panel-attach-component';\r\nimport AlreadyLinkedWorkpapers from 'components/feature/element-panel/workpaper-panel/_workpaper-panel-already-linked-component';\r\nimport CreateWorkpaperModal from 'components/feature/element-panel/workpaper-panel/create-work-paper-modal';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\nimport { createOrUpdateElementWorkpaperRequest } from 'api/workpaper-api';\r\nimport { fetchWorkpaperListForRevisionWithoutLoading } from 'store/actions/workpaper-toolkit-list-actions';\r\nimport {\r\n deallocateItems,\r\n selectElementContentPanel,\r\n} from 'store/actions/statement-content-actions';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport { updateElementCacheByCalloutAction } from 'store/actions/element-cache-actions';\r\n\r\nconst WORKPAPER_PANEL_BLOCK = 'workpaper-panel';\r\nconst WORKPAPER_PANEL_ID_BLOCK = 'workpaper-panel-id';\r\n\r\nclass WorkpaperPanel extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n showCreateWorkpaperModal: false,\r\n };\r\n }\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n const { closeWorkpaperPanel, elementDetails, showWorkpaperPanel } =\r\n this.props;\r\n\r\n if (!showWorkpaperPanel && !nextProps.showWorkpaperPanel) {\r\n // save some performance by only re-rendering during instances where the the content should be displayed\r\n return false;\r\n }\r\n const _clickedNewElementInContentPanel =\r\n elementDetails.id !== null &&\r\n nextProps.elementDetails.id !== elementDetails.id;\r\n if (_clickedNewElementInContentPanel) {\r\n // close the panel when a new element has been clicked before the component re-renders\r\n closeWorkpaperPanel();\r\n }\r\n\r\n return true;\r\n }\r\n\r\n _toggleCreateWorkPaperModal = () => {\r\n this.setState((state) => ({\r\n showCreateWorkpaperModal: !state.showCreateWorkpaperModal,\r\n }));\r\n };\r\n\r\n _handleCreateNewWorkpaper = async ({ workpaperModel }) => {\r\n const {\r\n fetchWorkpaperList,\r\n revisionId,\r\n socketHasBeenDisconnected,\r\n elementDetails,\r\n updateElementCacheByCalloutAction,\r\n } = this.props;\r\n await createOrUpdateElementWorkpaperRequest({ workpaperModel });\r\n updateElementCacheByCalloutAction({\r\n elementIds: [elementDetails.id],\r\n showCallout: true,\r\n });\r\n\r\n if (socketHasBeenDisconnected) {\r\n const { onCreateWorkaper } = this.props;\r\n await onCreateWorkaper({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\r\n });\r\n fetchWorkpaperList({ revisionId });\r\n }\r\n\r\n this._toggleCreateWorkPaperModal();\r\n };\r\n\r\n render() {\r\n const {\r\n showWorkpaperPanel,\r\n closeWorkpaperPanel,\r\n elementDetails,\r\n workpaperList,\r\n detachElementWorkpaper,\r\n updateWorkpaper,\r\n deallocateItems,\r\n selectElementContentPanel,\r\n } = this.props;\r\n const { showCreateWorkpaperModal } = this.state;\r\n return (\r\n <>\r\n \r\n {showWorkpaperPanel && (\r\n \r\n \r\n

          \r\n \r\n

          \r\n
          \r\n \r\n
          \r\n {\r\n scrollElementIntoView({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\r\n });\r\n deallocateItems();\r\n selectElementContentPanel({\r\n elementIds: [elementDetails.id],\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n });\r\n }}\r\n >\r\n {elementDetails.display}\r\n \r\n \r\n
          \r\n \r\n {workpaperList.hasWorkpapers() && (\r\n \r\n )}\r\n wpr.workpaperRefId,\r\n )}\r\n />\r\n \r\n
          \r\n )}\r\n \r\n {showCreateWorkpaperModal && (\r\n \r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nWorkpaperPanel.propTypes = {\r\n /** List of workpapers associated with this element */\r\n workpaperList: PropTypes.instanceOf(ElementWorkpaperList).isRequired,\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /**A boolean indicating if we should show the workpaper panel or not. */\r\n showWorkpaperPanel: PropTypes.bool.isRequired,\r\n /**The action that is fired when we need to hide the workpaper panel. */\r\n closeWorkpaperPanel: PropTypes.func.isRequired,\r\n /** Action fired after successful workpaper creation */\r\n onCreateWorkaper: PropTypes.func.isRequired,\r\n /** action fired to detach a work paper from this element */\r\n detachElementWorkpaper: PropTypes.func.isRequired,\r\n /** Action for attaching workpaper from search results */\r\n updateWorkpaper: PropTypes.func.isRequired,\r\n /** revision Id of the statement */\r\n revisionId: PropTypes.number.isRequired,\r\n /* Action to be fired when an element from the list selected */\r\n selectElementContentPanel: PropTypes.func.isRequired,\r\n /* function to deallocate all the elements, sections, notes or items on content panel */\r\n deallocateItems: PropTypes.func.isRequired,\r\n /*boolean value that indicates if the websocket connection has failed */\r\n socketHasBeenDisconnected: PropTypes.bool.isRequired,\r\n /* set element id for workpaper added */\r\n updateElementCacheByCalloutAction: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: { revision },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n}) => ({\r\n revisionId: revision.id,\r\n socketHasBeenDisconnected,\r\n});\r\nconst mapDispatchToProps = {\r\n fetchWorkpaperList: fetchWorkpaperListForRevisionWithoutLoading,\r\n deallocateItems,\r\n selectElementContentPanel,\r\n updateElementCacheByCalloutAction,\r\n};\r\n\r\nexport { WorkpaperPanel };\r\nexport default connect(mapStateToProps, mapDispatchToProps)(WorkpaperPanel);\r\n","import { connect } from 'react-redux';\r\nimport {\r\n detachElementWorkpaper,\r\n getElementWorkpapersAndUpdateElementCacheWithParameters,\r\n} from 'store/actions/element-panel-actions';\r\nimport { updateWorkpaper } from 'store/actions/workpaper-actions';\r\nimport WorkpaperPanel from 'components/feature/element-panel/workpaper-panel/workpaper-panel-component';\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n elementPanel: { workpaperList, elementDetails },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n ...ownProps,\r\n workpaperList,\r\n elementDetails,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n detachElementWorkpaper,\r\n onCreateWorkaper: getElementWorkpapersAndUpdateElementCacheWithParameters,\r\n updateWorkpaper,\r\n};\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(WorkpaperPanel);\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport RichTextEditor from 'components/common/rich-text-editor-component';\r\nimport { FormattedMessage } from 'react-intl';\r\n\r\nimport TickmarkForm from 'models/form/tickmark-form-model';\r\nimport { TICKMARK_TEXT_CHAR_LIMIT } from 'constants/feature/tickmark-constants';\r\nconst CREATE_TICKMARK_BLOCK = 'create-tickmark-modal';\r\nconst CREATE_TICKMARK_ID_BLOCK = 'create-tickmark-modal-id';\r\nconst CREATE_TICKMARK_DUPLICATE_ERROR =\r\n 'ValidationException: This tickmark already exists, try attaching it from existing tickmarks';\r\n\r\nclass CreateTickmarkModal extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n tickmarkInProgress: new TickmarkForm(),\r\n };\r\n }\r\n\r\n componentDidMount() {\r\n const { elementDetails } = this.props;\r\n this.setState((state) => ({\r\n tickmarkInProgress: state.tickmarkInProgress.initFromElement({\r\n elementDetails,\r\n }),\r\n }));\r\n }\r\n\r\n _handleCreateClick = async () => {\r\n const { onCreate } = this.props;\r\n const { tickmarkInProgress } = this.state;\r\n try {\r\n this.setState((state) => ({\r\n tickmarkInProgress: state.tickmarkInProgress.setLoading(),\r\n }));\r\n await onCreate({ tickmarkModel: tickmarkInProgress });\r\n } catch (error) {\r\n if (this._isRequestErrorForDuplicate(error)) {\r\n this.setDuplicateTickmarkFlag(true);\r\n } else {\r\n this.setState((state) => ({\r\n tickmarkInProgress: state.tickmarkInProgress.setError(error),\r\n }));\r\n }\r\n }\r\n };\r\n _isRequestErrorForDuplicate = (error) =>\r\n error &&\r\n error.response &&\r\n error.response.data &&\r\n error.response.data.rootCause.includes(\r\n CREATE_TICKMARK_DUPLICATE_ERROR, // error message from API\r\n );\r\n\r\n setDuplicateTickmarkFlag = (flag) => {\r\n this.setState((state) => ({\r\n tickmarkInProgress: state.tickmarkInProgress.setDuplicateErrorLoaded({\r\n duplicate: flag,\r\n }),\r\n }));\r\n };\r\n\r\n render() {\r\n const { onClose } = this.props;\r\n const { tickmarkInProgress } = this.state;\r\n return (\r\n \r\n \r\n {\r\n this.setState((state) => ({\r\n tickmarkInProgress: state.tickmarkInProgress.setText(val),\r\n }));\r\n this.setDuplicateTickmarkFlag(false);\r\n }}\r\n placeholder={{\r\n id: 'tickmark-modal.form.text.placeholder',\r\n values: { limit: TICKMARK_TEXT_CHAR_LIMIT },\r\n }}\r\n width={'100%'}\r\n />\r\n \r\n {this.state.tickmarkInProgress.isTickmarkIdDuplicate() && (\r\n (\r\n {chunks}\r\n ),\r\n }}\r\n />\r\n )}\r\n \r\n );\r\n }\r\n}\r\nCreateTickmarkModal.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** func fired to close modal */\r\n onClose: PropTypes.func.isRequired,\r\n /** func fired on create click */\r\n onCreate: PropTypes.func.isRequired,\r\n};\r\nexport default CreateTickmarkModal;\r\n","import React, { memo, useState, useRef, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport Button from 'components/common/button-component';\r\nimport { ReactComponent as Plus } from 'icons/plus.svg';\r\nimport Search from 'components/common/search-component';\r\nimport {\r\n debounceSearch,\r\n isSearchCharLengthValid,\r\n} from 'constants/util/search-utility';\r\nimport TickmarkList from 'models/api/tickmark-list-api-model';\r\nimport SearchResults from 'components/feature/element-panel/tickmark-panel/_element-tickmark-panel-search-results-component';\r\n\r\nconst ATTACH_TICKMARK_BLOCK = 'attach-tickmark';\r\nconst ATTACH_TICKMARK_ID_BLOCK = 'attach-tickmark-id';\r\n\r\nconst MIN_CHAR_LENGTH_TO_SEARCH = 1;\r\n\r\nconst AttachTickmark = ({\r\n disabled,\r\n hideTitle,\r\n onCreate,\r\n onAttach,\r\n onSearch,\r\n}) => {\r\n const [search, setSearch] = useState('');\r\n const [tickmarkList, setTickmarkListModel] = useState(new TickmarkList());\r\n const wrapperRef = useRef();\r\n\r\n const _searchTickmarks = (val) => {\r\n setSearch(val);\r\n const _shouldClearResults =\r\n !isSearchCharLengthValid(val, MIN_CHAR_LENGTH_TO_SEARCH) &&\r\n tickmarkList.isLoaded &&\r\n tickmarkList.hasTickmarks();\r\n if (isSearchCharLengthValid(val, MIN_CHAR_LENGTH_TO_SEARCH)) {\r\n debouncedSearch({ search: val });\r\n } else if (_shouldClearResults) {\r\n setTickmarkListModel(new TickmarkList());\r\n }\r\n };\r\n\r\n const _fetchTickmarks = async ({ search }) => {\r\n setTickmarkListModel(tickmarkList.setLoading());\r\n\r\n try {\r\n const response = await onSearch({ search });\r\n setTickmarkListModel(tickmarkList.setLoaded({ response }));\r\n } catch (error) {\r\n setTickmarkListModel(tickmarkList.setError(error));\r\n }\r\n };\r\n\r\n const _clearSearch = () => {\r\n setTickmarkListModel(new TickmarkList());\r\n setSearch('');\r\n };\r\n\r\n const _handleAttachTickmark = async (tickmark) => {\r\n try {\r\n await onAttach({ tickmark });\r\n } catch (error) {\r\n setTickmarkListModel(tickmarkList.setError(error));\r\n }\r\n _clearSearch();\r\n };\r\n\r\n const debouncedSearch = useCallback(debounceSearch(_fetchTickmarks), []);\r\n const _shouldOpenMenu = isSearchCharLengthValid(\r\n search,\r\n MIN_CHAR_LENGTH_TO_SEARCH,\r\n );\r\n\r\n return (\r\n
          \r\n {!hideTitle && (\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\nAttachTickmark.defaultProps = {\r\n hideTitle: false,\r\n};\r\n\r\nAttachTickmark.propTypes = {\r\n /** Function fired when user clicks Create */\r\n onCreate: PropTypes.func.isRequired,\r\n /** Function fired when user attaches tickmark from search results */\r\n onAttach: PropTypes.func.isRequired,\r\n /** boolean or func to disable the button */\r\n disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]).isRequired,\r\n /** boolean to hide title */\r\n hideTitle: PropTypes.bool,\r\n};\r\n\r\nexport default memo(AttachTickmark);\r\n","import React, { memo, useState } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport ElementTickmarkList from 'models/api/element-tickmark-list-model';\r\nimport TickmarkDetachEntry from 'components/feature/element-panel/annotations/tickmark-entry/tickmark-entry-with-detach-component';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\n\r\nexport const ALREADY_LINKED_TICKMARKS_BLOCK = 'already-attached-tickmarks';\r\n\r\nconst AlreadyAttachedTickmarks = ({\r\n tickmarkList,\r\n onDetachTickmark,\r\n disabled,\r\n}) => {\r\n const [currentTickmarkId, setCurrentTickmarkId] = useState(undefined);\r\n const updateExpandedTickmarkID = (toggleStatus, id) => {\r\n !toggleStatus && setCurrentTickmarkId(id);\r\n };\r\n return (\r\n
          \r\n \r\n

          \r\n \r\n

          \r\n {tickmarkList.hasTickmarks() ? (\r\n tickmarkList.tickmarks.map((tickmark) => (\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\nAlreadyAttachedTickmarks.propTypes = {\r\n /** List of tickmarks associated with this element */\r\n tickmarkList: PropTypes.instanceOf(ElementTickmarkList).isRequired,\r\n /** action fired to detach a tickmark from this element */\r\n onDetachTickmark: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default memo(AlreadyAttachedTickmarks);\r\n","import React, { Component } from 'react';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport PropTypes from 'prop-types';\r\nimport Flyout, {\r\n FlyoutHeader,\r\n FlyoutPanelContent,\r\n} from 'components/common/omnia/flyout-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { scrollElementIntoView } from 'utils/scrolling-utils';\r\nimport AmountAttributeDetails from 'components/common/element-amount-attributes-details-component';\r\nimport CreateTickmarkModal from 'components/feature/element-panel/tickmark-panel/create-tickmark-modal';\r\nimport AttachTickmark from 'components/feature/element-panel/tickmark-panel/_element-tickmark-panel-attach-component';\r\nimport AlreadyAttached from 'components/feature/element-panel/tickmark-panel/_element-tickmark-panel-already-attached-component';\r\nimport ElementTickmarkList from 'models/api/element-tickmark-list-model';\r\nimport Permissions from 'permissions/permissions';\r\nimport { createElementTickmarkRequest } from 'api/tickmark-api';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\n\r\nconst ELEMENT_TICKMARK_PANEL_BLOCK = 'element-tickmark-panel';\r\nconst ELEMENT_TICKMARK_PANEL_ID_BLOCK = 'element-tickmark-panel-id';\r\n\r\nclass ElementTickmarkPanel extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n showCreateTickmarkModal: false,\r\n };\r\n }\r\n\r\n shouldComponentUpdate(nextProps, nextState) {\r\n const { closeTickmarkPanel, elementDetails, showTickmarkPanel } =\r\n this.props;\r\n\r\n if (!showTickmarkPanel && !nextProps.showTickmarkPanel) {\r\n // save some performance by only re-rendering during instances where the the content should be displayed\r\n return false;\r\n }\r\n const _clickedNewElementInContentPanel =\r\n elementDetails.id !== null &&\r\n nextProps.elementDetails.id !== elementDetails.id;\r\n if (_clickedNewElementInContentPanel) {\r\n // close the panel when a new element has been clicked before the component re-renders\r\n closeTickmarkPanel();\r\n }\r\n\r\n return true;\r\n }\r\n\r\n _toggleCreateTickmarkModal = () => {\r\n this.setState((state) => ({\r\n showCreateTickmarkModal: !state.showCreateTickmarkModal,\r\n }));\r\n };\r\n\r\n _handleCreateNewTickmark = async ({ tickmarkModel }) => {\r\n const { elementDetails, updateElementCacheByCalloutAction } = this.props;\r\n await createElementTickmarkRequest({ tickmarkModel });\r\n const { onCreateTickmark, socketHasBeenDisconnected } = this.props;\r\n socketHasBeenDisconnected && onCreateTickmark();\r\n this._toggleCreateTickmarkModal();\r\n updateElementCacheByCalloutAction({\r\n elementIds: [elementDetails.id],\r\n showCallout: true,\r\n });\r\n };\r\n\r\n _onSearchTickmark = ({ search }) => {\r\n const { elementDetails, onSearchTickmark } = this.props;\r\n return onSearchTickmark({\r\n revisionId: elementDetails.revisionId,\r\n elementId: elementDetails.id,\r\n search,\r\n });\r\n };\r\n\r\n render() {\r\n const {\r\n showTickmarkPanel,\r\n closeTickmarkPanel,\r\n elementDetails,\r\n tickmarkList,\r\n onAttachTickmark,\r\n onDetachTickmark,\r\n selectedProjectId,\r\n deallocateItems,\r\n selectElementContentPanel,\r\n } = this.props;\r\n const { showCreateTickmarkModal } = this.state;\r\n const _permissionToAttach =\r\n Permissions.Tickmark.canEditTickmark(selectedProjectId);\r\n return (\r\n <>\r\n \r\n {showTickmarkPanel && (\r\n <>\r\n \r\n

          \r\n \r\n

          \r\n \r\n \r\n \r\n {\r\n scrollElementIntoView({\r\n elementId: elementDetails.id,\r\n sectionId: elementDetails.sectionId,\r\n });\r\n deallocateItems();\r\n selectElementContentPanel({\r\n elementIds: [elementDetails.id],\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n });\r\n }}\r\n >\r\n {elementDetails.display}\r\n \r\n \r\n
          \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n \r\n {showCreateTickmarkModal && (\r\n \r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nElementTickmarkPanel.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** List of tickmarks associated with this element */\r\n tickmarkList: PropTypes.instanceOf(ElementTickmarkList).isRequired,\r\n /**A boolean indicating if we should show the tickmark panel or not. */\r\n showTickmarkPanel: PropTypes.bool.isRequired,\r\n /**The action that is fired when we need to hide the tickmark panel. */\r\n closeTickmarkPanel: PropTypes.func.isRequired,\r\n /**The action that is fired when a user attaches a tickmark from search results */\r\n onAttachTickmark: PropTypes.func.isRequired,\r\n /**The action that is fired when a user detaches a tickmark from attached tickmarks */\r\n onDetachTickmark: PropTypes.func.isRequired,\r\n /** Currently selected project id */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /* Action to be fired when an element from the list selected */\r\n selectElementContentPanel: PropTypes.func.isRequired,\r\n /* function to deallocate all the elements, sections, notes or items on content panel */\r\n deallocateItems: PropTypes.func.isRequired,\r\n /**This value will indicate if socket at statement level is connected */\r\n socketHasBeenDisconnected: PropTypes.bool,\r\n /* set element id for tickmark added */\r\n updateElementCacheByCalloutAction: PropTypes.func.isRequired,\r\n};\r\n\r\nexport default ElementTickmarkPanel;\r\n","import { connect } from 'react-redux';\r\nimport {\r\n getElementTickmarksAndUpdateElementCache,\r\n attachTickmarkToElement,\r\n detachTickmarkFromElement,\r\n} from 'store/actions/element-panel-actions';\r\nimport ElementTickmarkPanel from 'components/feature/element-panel/tickmark-panel/element-tickmark-panel-component';\r\nimport { searchTickmarksByRevisionAndElementRequest } from 'api/tickmark-api';\r\nimport {\r\n deallocateItems,\r\n selectElementContentPanel,\r\n} from 'store/actions/statement-content-actions';\r\nimport { updateElementCacheByCalloutAction } from 'store/actions/element-cache-actions';\r\n\r\nconst mapStateToProps = (\r\n {\r\n data: {\r\n elementPanel: { tickmarkList, elementDetails },\r\n selectedProject: { id },\r\n },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n },\r\n ownProps,\r\n) => ({\r\n ...ownProps,\r\n tickmarkList,\r\n elementDetails,\r\n selectedProjectId: id,\r\n onSearchTickmark: searchTickmarksByRevisionAndElementRequest,\r\n socketHasBeenDisconnected,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n onCreateTickmark: getElementTickmarksAndUpdateElementCache,\r\n onAttachTickmark: attachTickmarkToElement,\r\n onDetachTickmark: detachTickmarkFromElement,\r\n deallocateItems,\r\n selectElementContentPanel,\r\n updateElementCacheByCalloutAction,\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(ElementTickmarkPanel);\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport { ReactComponent as Information } from 'icons/info.svg';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport classnames from 'classnames';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport shortid from 'shortid';\r\n\r\nconst BANNER_INFO_ICON_SIZE = '18px';\r\nconst COPY_FORMULA_BANNER_BLOCK = 'copy-formula-banner';\r\nconst COPY_FORMULA_BANNER_ID_BLOCK = 'copy-formula-banner-id';\r\n\r\nconst CopyFormulaBanner = (props) => (\r\n
          \r\n
          \r\n \r\n ),\r\n }}\r\n />\r\n ),\r\n id: `${COPY_FORMULA_BANNER_ID_BLOCK}-tooltip-extra-info-drag-related`,\r\n position: 'bottom',\r\n })}\r\n >\r\n \r\n \r\n \r\n \r\n ),\r\n }}\r\n id=\"element-panel.annotation.content.formula.copy-formula-element-selected\"\r\n />\r\n \r\n\r\n \r\n
          \r\n props.cancelCopyFormula()}\r\n >\r\n \r\n \r\n {props.numberOfElementsSelectedForCopy > 0 && (\r\n props.stopCopyFormula()}\r\n >\r\n \r\n \r\n )}\r\n
          \r\n);\r\n\r\nexport default CopyFormulaBanner;\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport ElementDetails from 'models/api/element-details-api-model';\r\nimport { FormulaList } from 'models/api/formula-list-model';\r\nimport ElementPanelHeader from './_element-panel-header-component';\r\nimport ElementPanelBody from './_element-panel-body-component';\r\nimport Flyout, {\r\n FlyoutHeader,\r\n FlyoutPanelContent,\r\n} from 'components/common/omnia/flyout-component';\r\nimport { ELEMENT_ANNOTATIONS_TABS } from 'constants/feature/element-panel-constants';\r\n\r\nimport FormulaPanelContainer from 'containers/feature/formula-panel/formula-panel-container';\r\nimport InternalReferencePanel from 'components/feature/element-panel/internal-reference-panel/internal-reference-panel-component';\r\nimport ElementWorkpaperList from 'models/api/element-workpaper-list-model';\r\nimport WorkpaperPanelContainer from 'containers/feature/workpaper-panel-container';\r\nimport InternalReference from 'models/api/internal-reference-model';\r\nimport TickmarkPanelContainer from 'containers/feature/element-panel/element-tickmark-panel-container';\r\nimport ElementTickmarkList from 'models/api/element-tickmark-list-model';\r\nimport CopyFormulaBanner from 'components/util/copy-formula-banner-component';\r\n\r\nexport const ELEMENT_PANEL_BLOCK = 'element-panel';\r\nexport const ELEMENT_PANEL_ID_BLOCK = 'element-panel-id';\r\n\r\nclass ElementPanel extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n selectedElementPanelAnnotationsTab:\r\n ELEMENT_ANNOTATIONS_TABS.WORK_PAPER_REFERENCE,\r\n showFormulaPanelFlyout: false,\r\n showInternalReferencePanel: false,\r\n showFormulaPanel: false,\r\n showWorkpaperPanel: false,\r\n showTickmarkPanel: false,\r\n };\r\n }\r\n componentDidUpdate(prevProps, prevState) {\r\n const {\r\n elementDetails,\r\n shouldShowElementPanel,\r\n deselectElementContentPanel,\r\n } = this.props;\r\n const { showInternalReferencePanel } = this.state;\r\n if (prevProps.elementDetails.id !== elementDetails.id) {\r\n this.setState((state) => ({\r\n selectedElementPanelAnnotationsTab:\r\n ELEMENT_ANNOTATIONS_TABS.WORK_PAPER_REFERENCE,\r\n }));\r\n }\r\n if (!shouldShowElementPanel) {\r\n deselectElementContentPanel({ elementId: elementDetails.id });\r\n if (showInternalReferencePanel) {\r\n this.toggleInternalReferencePanel();\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Should show when `shouldShowElementPanel` is true and all sub panels are false\r\n */\r\n _shouldRenderElementPanelContent = () => {\r\n const { shouldShowElementPanel } = this.props;\r\n const { showFormulaPanel, showWorkpaperPanel } = this.state;\r\n\r\n return shouldShowElementPanel && !showFormulaPanel && !showWorkpaperPanel;\r\n };\r\n\r\n setCurrentElementAnnotationsTab = (selectedElementPanelAnnotationsTab) => {\r\n this.setState((state) => ({\r\n selectedElementPanelAnnotationsTab: selectedElementPanelAnnotationsTab,\r\n }));\r\n };\r\n\r\n toggleFormulaPanel = () => {\r\n this.setState((state) => ({\r\n showFormulaPanel: !state.showFormulaPanel,\r\n }));\r\n };\r\n createNewFormula = () => {\r\n const { setNewFormulaAction } = this.props;\r\n setNewFormulaAction(true);\r\n this.setState((state) => ({\r\n showFormulaPanel: !state.showFormulaPanel,\r\n }));\r\n };\r\n\r\n toggleInternalReferencePanel = () => {\r\n this.setState((state) => ({\r\n showInternalReferencePanel: !state.showInternalReferencePanel,\r\n }));\r\n };\r\n\r\n _closeFormulaPanel = (fetchElementsAfterModalClose = true) => {\r\n const {\r\n clearFormula,\r\n elementDetails,\r\n fetchSelectedElementDetails,\r\n socketHasBeenDisconnected,\r\n } = this.props;\r\n this.toggleFormulaPanel();\r\n if (fetchElementsAfterModalClose) {\r\n clearFormula({ elementId: elementDetails.id });\r\n if (socketHasBeenDisconnected) {\r\n fetchSelectedElementDetails({ elementId: elementDetails.id });\r\n }\r\n }\r\n };\r\n\r\n _closeInternalReferencePanel = () => {\r\n const {\r\n clearInternalReference,\r\n elementDetails,\r\n fetchSelectedElementDetails,\r\n } = this.props;\r\n this.toggleInternalReferencePanel();\r\n clearInternalReference();\r\n fetchSelectedElementDetails({ elementId: elementDetails.id });\r\n };\r\n\r\n _getFormulaDetailsForEdit = (formulaId) => {\r\n const { fetchSelectedFormulaDetails } = this.props;\r\n fetchSelectedFormulaDetails(formulaId);\r\n this.toggleFormulaPanel();\r\n };\r\n\r\n toggleWorkpaperPanel = () => {\r\n this.setState((state) => ({\r\n showWorkpaperPanel: !state.showWorkpaperPanel,\r\n }));\r\n };\r\n\r\n toggleTickmarkPanel = () => {\r\n this.setState((state) => ({\r\n showTickmarkPanel: !state.showTickmarkPanel,\r\n }));\r\n };\r\n\r\n render() {\r\n const {\r\n elementDetails,\r\n formulaList,\r\n internalReference,\r\n workpaperList,\r\n shouldShowElementPanel,\r\n hideElementPanel,\r\n updateUserFlag,\r\n updateVerify,\r\n updateReviewed,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n detachElementWorkpaper,\r\n initInternalReferencePanel,\r\n tickmarkList,\r\n detachTickmarkFromElement,\r\n excludeElementFromElementList,\r\n cancelModal,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleNotesPanel,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n selectNoteFromContentPanel,\r\n isFormulaCopied,\r\n stopCopyFormula,\r\n cancelCopyFormula,\r\n numberOfElementsSelectedForCopy,\r\n onSectionClick,\r\n } = this.props;\r\n const {\r\n selectedElementPanelAnnotationsTab,\r\n showInternalReferencePanel,\r\n showFormulaPanel,\r\n showWorkpaperPanel,\r\n showTickmarkPanel,\r\n } = this.state;\r\n return (\r\n <>\r\n \r\n {isFormulaCopied && (\r\n \r\n )}\r\n {this._shouldRenderElementPanelContent() && (\r\n // The flyout panel can be shown and hidden, but the content should not exist in the DOM until it is shown for performance\r\n <>\r\n \r\n \r\n \r\n \r\n console.log('COPY ALL CLICKED'),\r\n }}\r\n onEditFormula={this._getFormulaDetailsForEdit}\r\n onDetachWorkpaper={detachElementWorkpaper}\r\n selectElementFromInternalReference={\r\n selectElementFromInternalReference\r\n }\r\n detachElementFromInternalReference={\r\n detachElementFromInternalReference\r\n }\r\n detachTickmarkFromElement={detachTickmarkFromElement}\r\n />\r\n \r\n \r\n )}\r\n \r\n {shouldShowElementPanel && (\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\nElementPanel.propTypes = {\r\n /** Specified element's details */\r\n elementDetails: PropTypes.instanceOf(ElementDetails).isRequired,\r\n /** Indicates if the element panel should be shown */\r\n shouldShowElementPanel: PropTypes.bool.isRequired,\r\n /** Action to hide element flyout panel */\r\n hideElementPanel: PropTypes.func.isRequired,\r\n /** Action to update user flag for element */\r\n updateUserFlag: PropTypes.func.isRequired,\r\n /** Action that set element as verified */\r\n updateVerify: PropTypes.func.isRequired,\r\n /** Action that set element as reviewed */\r\n updateReviewed: PropTypes.func.isRequired,\r\n /**Action used to clear the formula that was being worked on in the formula panel */\r\n clearFormula: PropTypes.func.isRequired,\r\n /** The list of formulas for the current element*/\r\n formulaList: PropTypes.instanceOf(FormulaList).isRequired,\r\n /** Action used to fetch the details of an element,\r\n * used to refresh element details data after returning to element panel from other children panels */\r\n fetchSelectedElementDetails: PropTypes.func.isRequired,\r\n /** Action used to fetch the details of a formula */\r\n fetchSelectedFormulaDetails: PropTypes.func,\r\n /** Action used to clear the internal referecne that is being worked on in the internal reference panel */\r\n clearInternalReference: PropTypes.func.isRequired,\r\n /** Internal reference that is currently linked to this element */\r\n internalReference: PropTypes.instanceOf(InternalReference).isRequired,\r\n /**The action that is fired to highlight elements from the content panel after we click on them in the internal reference */\r\n selectElementFromInternalReference: PropTypes.func.isRequired,\r\n /**The action that is fired when we wish to detach an element from an internal reference */\r\n detachElementFromInternalReference: PropTypes.func.isRequired,\r\n /** List of workpapers associated with this element */\r\n workpaperList: PropTypes.instanceOf(ElementWorkpaperList).isRequired,\r\n /** action fired to detach a work paper from this element */\r\n detachElementWorkpaper: PropTypes.func.isRequired,\r\n /** Function fired when internal reference panel is shown, initializes redux information */\r\n initInternalReferencePanel: PropTypes.func.isRequired,\r\n /** List of tickmarks associated with this element */\r\n tickmarkList: PropTypes.instanceOf(ElementTickmarkList).isRequired,\r\n /** action fired to detach a tickmark from this element */\r\n detachTickmarkFromElement: PropTypes.func.isRequired,\r\n /** action fired to open the internal reference cancel modal */\r\n toggleInternalReferenceCancelModal: PropTypes.func,\r\n /** action fired to indicate the note panel will be opened after modal is confirmed */\r\n openCancelModalAfterModalConfirm: PropTypes.func,\r\n /** action fired to store the selected note in redux */\r\n storeSelectedNoteId: PropTypes.func,\r\n /** action fired to store the psuedo id of the selected note in redux */\r\n storeSelectedNotePseudoId: PropTypes.func,\r\n /** object with cancel modal details */\r\n cancelModal: PropTypes.object,\r\n /* action to set a formula as new */\r\n setNewFormulaAction: PropTypes.func.isRequired,\r\n /** The action used to clear copied formulas and Table matrix from the store*/\r\n stopCopyFormula: PropTypes.func.isRequired,\r\n /** to check if user has copied formula*/\r\n isFormulaCopied: PropTypes.bool.isRequired,\r\n /*To abort copy formula mode and clear related redux store data*/\r\n cancelCopyFormula: PropTypes.func.isRequired,\r\n /*Data from redux store to check number of elements selected for pasting copied formula*/\r\n numberOfElementsSelectedForCopy: PropTypes.number,\r\n /**The action to open the section. */\r\n onSectionClick: PropTypes.func,\r\n};\r\n\r\nexport default ElementPanel;\r\n","import { connect } from 'react-redux';\r\nimport {\r\n hideElementPanel,\r\n updateUserFlag,\r\n updateVerify,\r\n updateReviewed,\r\n fetchSelectedElementDetails,\r\n detachElementWorkpaper,\r\n detachTickmarkFromElement,\r\n excludeElement,\r\n} from 'store/actions/element-panel-actions';\r\nimport {\r\n clearFormula,\r\n fetchSelectedFormulaDetails,\r\n setNewFormulaAction,\r\n} from 'store/actions/formula-actions';\r\nimport {\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n clearInternalReference,\r\n} from 'store/actions/internal-reference-actions';\r\nimport ElementPanel from 'components/feature/element-panel/element-panel-component';\r\nimport { setElementSelectModeInternalReferenceAction } from 'store/actions/modes-actions';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport {\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\nimport { selectNoteFromContentPanel } from 'store/actions/notes-panel-actions';\r\nimport { toggleNotesPanel } from 'store/actions/panel-controller-actions';\r\nimport { deselectElementContentPanel } from 'store/actions/statement-content-actions';\r\nimport { onSectionClick } from 'store/actions/statement-content-actions';\r\nimport {\r\n stopCopyFormula,\r\n cancelCopyFormula,\r\n} from 'store/actions/copy-formula-actions';\r\nconst mapStateToProps = ({\r\n data: {\r\n elementPanel: {\r\n elementDetails,\r\n formulaList,\r\n internalReference,\r\n workpaperList,\r\n tickmarkList,\r\n },\r\n copyFormula: { tableMatrix, copyFormulaSelectedElement },\r\n },\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n cancelModal,\r\n },\r\n },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n}) => ({\r\n elementDetails,\r\n formulaList,\r\n internalReference,\r\n workpaperList,\r\n tickmarkList,\r\n shouldShowElementPanel: right === RIGHT_PANELS.ELEMENT,\r\n cancelModal,\r\n socketHasBeenDisconnected,\r\n isFormulaCopied: tableMatrix && tableMatrix.length > 0,\r\n numberOfElementsSelectedForCopy:\r\n tableMatrix &&\r\n copyFormulaSelectedElement &&\r\n copyFormulaSelectedElement.selectedElementIds &&\r\n copyFormulaSelectedElement.selectedElementIds.length,\r\n});\r\nconst mapDispatchToProps = {\r\n hideElementPanel,\r\n updateUserFlag,\r\n updateVerify,\r\n updateReviewed,\r\n fetchSelectedElementDetails,\r\n clearFormula,\r\n fetchSelectedFormulaDetails,\r\n clearInternalReference,\r\n selectElementFromInternalReference,\r\n detachElementFromInternalReference,\r\n detachElementWorkpaper,\r\n detachTickmarkFromElement,\r\n initInternalReferencePanel: setElementSelectModeInternalReferenceAction,\r\n excludeElementFromElementList: excludeElement,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleNotesPanel,\r\n storeSelectedNoteId,\r\n storeSelectedNotePseudoId,\r\n selectNoteFromContentPanel,\r\n deselectElementContentPanel,\r\n setNewFormulaAction,\r\n stopCopyFormula,\r\n cancelCopyFormula,\r\n onSectionClick,\r\n};\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ElementPanel);\r\n","import React from 'react';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport moment from 'moment';\r\nimport { DATE_FORMATS } from 'constants/util/date-constants';\r\nimport {\r\n SIGN_OFF_HISTORY_OPTIONS,\r\n SYSTEM_USER_NAME,\r\n} from 'constants/feature/section-details-constants';\r\nimport PropTypes from 'prop-types';\r\nimport { getUserNameByUserId } from 'utils/statement-content-page-utils';\r\n\r\nexport const SECTION_DETAILS_HISTORY_ELEMENT = 'section-history-element';\r\n\r\nconst SectionDetailsHistoryElement = ({ history }) => {\r\n const { userName, userId, revisionNumber, sectionAction, date } = history;\r\n const fullUserName = userId >= 0 ? getUserNameByUserId(userId) : userName;\r\n\r\n return (\r\n
          \r\n

          \r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.REVIEW && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.UNREVIEW &&\r\n userName.trim() !== SYSTEM_USER_NAME && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.UNREVIEW &&\r\n userName.trim() === SYSTEM_USER_NAME && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.LABEL_UPDATED && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.ENTITY_UPDATED && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.CREATE && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.ASSIGN_TO && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.UNASSIGN_TO && (\r\n \r\n )}\r\n {sectionAction === SIGN_OFF_HISTORY_OPTIONS.UNASSIGN_ALL && (\r\n \r\n )}\r\n

          \r\n

          \r\n \r\n

          \r\n
          \r\n );\r\n};\r\n\r\nSectionDetailsHistoryElement.propTypes = {\r\n /** history object from the section detail store */\r\n history: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default SectionDetailsHistoryElement;\r\n","import React, { useState } from 'react';\r\nimport ExpandableRow from 'components/common/expandable-row-component';\r\nimport SectionDetailsHistoryElement from 'components/feature/section-details-panel/_section-details-history-element-component';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport { SIGN_OFF_HISTORY_OPTIONS } from 'constants/feature/section-details-constants';\r\nconst SECTION_DETAILS_HISTORY = 'section-details-history';\r\n\r\nexport const SectionDetailsHistoryRow = ({ sectionHistory }) => {\r\n const [showHistory, setShowHistory] = useState(true);\r\n\r\n return (\r\n setShowHistory(false)}\r\n expandExpandableRow={() => setShowHistory(true)}\r\n tooltipId={`${SECTION_DETAILS_HISTORY}-history__tooltip`}\r\n >\r\n \r\n {sectionHistory.data.sectionReviewHistory &&\r\n sectionHistory.data.sectionReviewHistory.result &&\r\n sectionHistory.data.sectionReviewHistory.result\r\n .filter(\r\n (review) =>\r\n review.sectionAction !== SIGN_OFF_HISTORY_OPTIONS.ASSIGN_BY &&\r\n review.sectionAction !== SIGN_OFF_HISTORY_OPTIONS.UNASSIGN_BY,\r\n )\r\n .map((history) => (\r\n
          \r\n \r\n
          \r\n ))}\r\n
          \r\n \r\n );\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n sectionPanel: { sectionReviewHistory },\r\n },\r\n}) => ({\r\n sectionHistory: sectionReviewHistory,\r\n});\r\n\r\nSectionDetailsHistoryRow.propTypes = {\r\n /** history object from the section detail store */\r\n sectionHistory: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default connect(mapStateToProps)(SectionDetailsHistoryRow);\r\n","import React, { useState, useEffect } from 'react';\r\nimport Modal from 'components/common/modal-component';\r\nimport { ModalButton } from 'models/utils/common/modal-button-model';\r\nimport PropTypes from 'prop-types';\r\nimport Dropdown from 'components/common/dropdown-component';\r\nimport { getUserMenuOptions } from 'constants/feature/section-details-constants';\r\nimport Chip from 'components/common/chip-component';\r\nimport { createRevisionSectionAssignment } from 'api/sections-api';\r\nimport SectionAssignments from 'models/api/section-assignments-api-model';\r\n\r\nconst ASSIGN_SECTION_MODAL_ID_BLOCK = 'assign-section-modal-id';\r\nexport const ASSIGN_SECTION_BLOCK = 'assign-section-modal';\r\n\r\nexport const AssignSectionModal = ({\r\n onClose,\r\n sectionAssignments,\r\n usersList,\r\n onSave,\r\n revisionId,\r\n sectionId,\r\n}) => {\r\n const [assignedUsers, setAssignedUsers] = useState({\r\n ...sectionAssignments.assignedUsersMap,\r\n });\r\n const [disableSaveButton, setDisableSaveButton] = useState(true);\r\n const [disableDeleteAllButton, setDisableDeleteAllButton] = useState(false);\r\n useEffect(() => {\r\n const assignedUsersArray = Object.keys(assignedUsers).sort((a, b) => a - b);\r\n const sectionAssignmentsArray = Object.keys({\r\n ...sectionAssignments.assignedUsersMap,\r\n }).sort((a, b) => a - b);\r\n setDisableSaveButton(\r\n JSON.stringify(assignedUsersArray) ===\r\n JSON.stringify(sectionAssignmentsArray),\r\n );\r\n }, [assignedUsers, sectionAssignments.assignedUsersMap]);\r\n\r\n const handleUserSelect = (user) => {\r\n setAssignedUsers({\r\n ...assignedUsers,\r\n [user.id]: {\r\n name: user.title,\r\n },\r\n });\r\n };\r\n\r\n const handleChipRemove = (key) => {\r\n let assignedUsersMap = { ...assignedUsers };\r\n if (key in assignedUsers) {\r\n delete assignedUsersMap[key];\r\n }\r\n setAssignedUsers(assignedUsersMap);\r\n };\r\n\r\n const handleSave = async () => {\r\n setDisableSaveButton(true);\r\n const userIds = Object.keys(assignedUsers);\r\n await createRevisionSectionAssignment({ revisionId, sectionId, userIds });\r\n onSave();\r\n };\r\n\r\n const handleDeleteAll = async () => {\r\n setDisableDeleteAllButton(true);\r\n await createRevisionSectionAssignment({\r\n revisionId,\r\n sectionId,\r\n userIds: [],\r\n });\r\n onSave();\r\n };\r\n return (\r\n 0 || disableSaveButton,\r\n })\r\n }\r\n secondaryModalButton={\r\n new ModalButton({\r\n text: 'common.cancel',\r\n onClick: onClose,\r\n })\r\n }\r\n tertiaryModalButton={\r\n new ModalButton({\r\n text: 'section-details.assign-modal.unassign-all',\r\n onClick: handleDeleteAll,\r\n disabled: disableDeleteAllButton,\r\n })\r\n }\r\n >\r\n
          \r\n {Object.keys(assignedUsers).map((key) => {\r\n return (\r\n handleChipRemove(key)}\r\n >\r\n {assignedUsers[key].name}\r\n \r\n );\r\n })}\r\n
          \r\n handleUserSelect(user)}\r\n isValid={true}\r\n options={getUserMenuOptions(usersList, assignedUsers)}\r\n value={null}\r\n />\r\n \r\n );\r\n};\r\n\r\nAssignSectionModal.propTypes = {\r\n /** Action fired when user clicks Cancel or the 'x' button*/\r\n onClose: PropTypes.func.isRequired,\r\n /** Action fired when the save or delete all button is clicked*/\r\n onSave: PropTypes.func.isRequired,\r\n /** the id of the current revision*/\r\n revisionId: PropTypes.number.isRequired,\r\n /** the id of the section*/\r\n sectionId: PropTypes.number.isRequired,\r\n /** an array of all the usres on the revision*/\r\n usersList: PropTypes.array.isRequired,\r\n /** A reference to the assignments of the selected section */\r\n sectionAssignments: PropTypes.instanceOf(SectionAssignments).isRequired,\r\n};\r\n\r\nexport default AssignSectionModal;\r\n","import React, { useState, useEffect, useCallback } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Flyout, {\r\n FlyoutHeader,\r\n FlyoutPanelContent,\r\n} from 'components/common/omnia/flyout-component';\r\nimport { RIGHT_PANELS } from 'constants/feature/panel-constants';\r\nimport { connect } from 'react-redux';\r\nimport { hideSectionDetailsPanelAction } from 'store/actions/panel-controller-actions';\r\nimport { ReactComponent as TaskReviewedIcon } from 'icons/task-reviewed.svg';\r\nimport { ReactComponent as TaskIcon } from 'icons/task.svg';\r\nimport ExpandableRow from 'components/common/expandable-row-component';\r\nimport {\r\n reviewSectionRequest,\r\n deleteReviewSectionRequest,\r\n} from 'api/sections-api';\r\nimport { CREATED, OK } from 'http-status-codes';\r\nimport {\r\n handleSignOffSuccess,\r\n handleRemoveSignOffSuccess,\r\n} from 'store/actions/sections-actions';\r\nimport { SectionReviewList } from 'models/api/section-review-list-api-model';\r\nimport Permissions from 'permissions/permissions';\r\nimport { TooltipOptions } from 'models/utils/common/tooltip-options-model';\r\nimport {\r\n onSectionClick,\r\n deallocateItems,\r\n} from 'store/actions/statement-content-actions';\r\nimport SectionDetailsHistoryRow from 'components/feature/section-details-panel/_section-details-history-row-component';\r\nimport Checkbox from 'components/common/checkbox-component';\r\nimport IconButton from 'components/common/icon-button-component';\r\nimport { ReactComponent as infoIcon } from 'icons/info.svg';\r\nimport { ReactComponent as infoHoverIcon } from 'icons/icon-information-tooltip.svg';\r\nimport {\r\n reviewInfoButtonTooltip,\r\n hoverReviewTooltip,\r\n} from 'constants/feature/section-details-constants';\r\nimport { ELEMENT_HIGHLIGHT_STATES } from 'constants/feature/tieout-element-constants';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\nimport {\r\n fetchSectionAssignments,\r\n fetchSectionAssignmentsList,\r\n} from 'store/actions/section-assignment-actions';\r\nimport ConditionalRender from 'components/util/conditional-render-component';\r\nimport Button, { BUTTON_TYPES } from 'components/common/button-component';\r\nimport { FormattedMessage } from 'react-intl';\r\nimport AssignSectionModal from 'components/feature/section-details-panel/_section-details-section-assignment-modal-component';\r\nimport { fetchSectionHistoryDetails } from 'store/actions/section-review-history-actions';\r\nimport ProjectApi from 'models/api/project-api-model';\r\nimport ProjectUsersList from 'models/api/project-users-list-api-model';\r\nimport { fetchSectionReviewsLoading } from 'store/actions/sections-actions';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport classnames from 'classnames';\r\nimport { ReactComponent as VerifiedIcon } from 'icons/verified.svg';\r\nimport { ReactComponent as ReviewedIcon } from 'icons/reviewed.svg';\r\nimport { ReactComponent as OpenIcon } from 'icons/open-note.svg';\r\nimport { ReactComponent as FlaggedIcon } from 'icons/flagged.svg';\r\nimport { fetchNotesListAndApplyFilter } from 'store/actions/notes-panel-actions';\r\nimport { showStatementNavPanelAction } from 'store/actions/panel-controller-actions';\r\nimport { setSelectedTabAction } from 'store/actions/statement-navigator/navigator-panel-actions';\r\nimport { STATEMENT_NAV_TABS } from 'constants/feature/statement-navigator-constants';\r\nimport { searchElements } from 'store/actions/statement-navigator/elements-search-panel-actions';\r\nimport {\r\n verifiedElementFilter,\r\n reviewedElementFilter,\r\n flaggedElementFilter,\r\n} from 'constants/feature/statement-summary-constants';\r\nimport { EMPTY_STRING } from 'constants/common/feature-common-utils';\r\nimport { ReactComponent as Refresh } from 'icons/refresh-heading.svg';\r\n\r\nexport const SECTION_PANEL_BLOCK = 'section-panel';\r\nexport const SECTION_PANEL_ID_BLOCK = 'section-panel-id';\r\n\r\nexport const SIGN_ICON_SIZE = '20px';\r\n\r\nconst DISABLED_REVIEW_BUTTON_TOOLTIP = new TooltipOptions({\r\n text: 'section-panel.permissions.disabled-button.tooltip',\r\n id: 'section-panel.permissions.disabled-button.tooltip-id',\r\n position: 'left',\r\n});\r\nconst TOOLTIP_EVENT = 'click';\r\n\r\nconst SectionDetailsPanel = ({\r\n shouldShowSectionPanel,\r\n hideSectionPanel,\r\n section,\r\n revisionId,\r\n sectionReview,\r\n selectedProjectId,\r\n currentUserId,\r\n handleSignOffSuccess,\r\n handleRemoveSignOffSuccess,\r\n onSectionClick,\r\n deallocateItems,\r\n selectedStatement,\r\n fetchSectionAssignments,\r\n sectionAssignments,\r\n fetchSectionHistoryDetails,\r\n fetchSectionAssignmentsList,\r\n projectUsersList,\r\n socketHasBeenDisconnected,\r\n fetchSectionReviewsLoading,\r\n fetchNotesListAndApplyFilter,\r\n showStatementNavPanelAction,\r\n setSelectedNavigatorTab,\r\n fetchElementSearchResults,\r\n}) => {\r\n const permissionToReview =\r\n Permissions.Section.canReviewSection(selectedProjectId);\r\n const permissionToAssign =\r\n Permissions.Section.canAssignSection(selectedProjectId);\r\n\r\n const isStatementReadyOnly = !selectedStatement.isReadOnly();\r\n\r\n const [shouldExpandExpandableRow, setShouldExpandExpandableRow] =\r\n useState(true);\r\n const [toggleStatus, setToggleStatus] = useState(false);\r\n const [showInformationMessage, setShowInformationMessage] = useState(false);\r\n const [showSectionAssignModal, setShowSectionAssignModal] = useState(false);\r\n\r\n useEffect(() => {\r\n if (section.id || section.id === 0) {\r\n fetchSectionAssignments({\r\n revisionId,\r\n sectionId: section.id,\r\n usersList: projectUsersList.users,\r\n });\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [revisionId, section.id, projectUsersList.users]);\r\n\r\n useEffect(() => {\r\n setToggleStatus(\r\n sectionReview.userAlreadyReviewed(currentUserId, section.id),\r\n );\r\n }, [currentUserId, section.id, sectionReview]);\r\n\r\n const _onSectionAssignSaveAndDeleteAllUsers = async () => {\r\n setShowSectionAssignModal(false);\r\n if (socketHasBeenDisconnected) {\r\n await fetchSectionAssignments({\r\n revisionId,\r\n sectionId: section.id,\r\n usersList: projectUsersList.users,\r\n });\r\n await fetchSectionAssignmentsList({ revisionId });\r\n await fetchSectionHistoryDetails({\r\n revisionId,\r\n sectionId: section.id,\r\n });\r\n }\r\n };\r\n\r\n const handleSignOffClick = async () => {\r\n let isSectionAlreadyReviewed =\r\n sectionReview.hasSectionBeenReviewedByOtherUser(\r\n currentUserId,\r\n section.id,\r\n );\r\n await reviewSectionRequest(\r\n revisionId,\r\n section.id,\r\n isSectionAlreadyReviewed,\r\n ).then((response) => {\r\n if (\r\n socketHasBeenDisconnected &&\r\n response &&\r\n response.status === CREATED\r\n ) {\r\n handleSignOffSuccess({\r\n data: response.data,\r\n sectionId: section.id,\r\n });\r\n }\r\n });\r\n };\r\n\r\n const handleRemoveSignOffClick = async () => {\r\n let isSectionAlreadyReviewed =\r\n sectionReview.hasSectionBeenReviewedByOtherUser(\r\n currentUserId,\r\n section.id,\r\n );\r\n await deleteReviewSectionRequest(\r\n revisionId,\r\n section.id,\r\n isSectionAlreadyReviewed,\r\n ).then((response) => {\r\n if (socketHasBeenDisconnected && response && response.status === OK) {\r\n handleRemoveSignOffSuccess(section.id, currentUserId);\r\n }\r\n });\r\n };\r\n const resetState = () => {\r\n setShowInformationMessage(false);\r\n };\r\n //function to click on information button when modal is open to hide the tooltip\r\n const clickOnInfoButton = () => {\r\n if (showInformationMessage) {\r\n document\r\n .getElementById(`${SECTION_PANEL_ID_BLOCK}-review-info-${section.id}`)\r\n .click();\r\n }\r\n };\r\n useEffect(() => {\r\n clickOnInfoButton();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [shouldShowSectionPanel]);\r\n\r\n useEffect(() => {\r\n //set tooltip specific size for info button on the right panel if the panel is open\r\n if (shouldShowSectionPanel && shouldExpandExpandableRow) {\r\n const infoTooltip = document.getElementById(\r\n `${reviewInfoButtonTooltip().id}-tooltip`,\r\n );\r\n if (infoTooltip) infoTooltip.style.width = '300px';\r\n }\r\n //if status row is collapsed, reset the value if the information button to false\r\n if (!shouldExpandExpandableRow) setShowInformationMessage(false);\r\n }, [shouldShowSectionPanel, shouldExpandExpandableRow]);\r\n\r\n const showElementListPanel = useCallback(\r\n (filters) => {\r\n showStatementNavPanelAction();\r\n setSelectedNavigatorTab(STATEMENT_NAV_TABS.elements);\r\n fetchElementSearchResults({\r\n filters: filters.selectSection(section),\r\n searchTerm: EMPTY_STRING,\r\n });\r\n },\r\n [\r\n fetchElementSearchResults,\r\n section,\r\n setSelectedNavigatorTab,\r\n showStatementNavPanelAction,\r\n ],\r\n );\r\n\r\n return (\r\n \r\n \r\n <>\r\n \r\n
          \r\n {sectionReview.hasSectionBeenReviewed(section.id) ? (\r\n \r\n ) : (\r\n \r\n )}\r\n {\r\n deallocateItems();\r\n onSectionClick({\r\n sectionId: section.id,\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n sectionClick: true,\r\n });\r\n }}\r\n >\r\n {section.name}\r\n
          \r\n \r\n {!selectedStatement.isOCR && (\r\n
          \r\n
          \r\n \r\n
          \r\n \r\n ({section.totalElements})\r\n

          \r\n
          \r\n \r\n
          \r\n \r\n \r\n showElementListPanel(verifiedElementFilter)\r\n }\r\n >\r\n \r\n \r\n ({section.verifiedElements})\r\n
          \r\n \r\n \r\n \r\n \r\n showElementListPanel(reviewedElementFilter)\r\n }\r\n >\r\n \r\n \r\n ({section.reviewedElements})\r\n
          \r\n \r\n \r\n
          \r\n \r\n {\r\n let updatedFilters = {\r\n heading: true,\r\n },\r\n selectedSegments = {};\r\n selectedSegments[section.id] = section.name;\r\n fetchNotesListAndApplyFilter({\r\n revisionId,\r\n updatedFilters,\r\n selectedSegments,\r\n });\r\n }}\r\n >\r\n \r\n
          \r\n ({section.totalNotes})\r\n
          \r\n \r\n \r\n \r\n showElementListPanel(flaggedElementFilter)}\r\n >\r\n \r\n
          \r\n ({section.flaggedElements})\r\n
          \r\n \r\n \r\n \r\n \r\n {\r\n onSectionClick({\r\n sectionId: section.id,\r\n color: ELEMENT_HIGHLIGHT_STATES.PANEL_SELECTED,\r\n sectionClick: true,\r\n });\r\n }}\r\n className={`${SECTION_PANEL_BLOCK}__refresh-button`}\r\n >\r\n \r\n \r\n \r\n \r\n )}\r\n \r\n \r\n setShouldExpandExpandableRow(false)}\r\n expandExpandableRow={() => setShouldExpandExpandableRow(true)}\r\n tooltipId={`${SECTION_PANEL_BLOCK}-status__tooltip`}\r\n >\r\n \r\n \r\n {\r\n if (permissionToReview) {\r\n fetchSectionReviewsLoading();\r\n if (toggleStatus) {\r\n setShowInformationMessage(false);\r\n clickOnInfoButton();\r\n handleRemoveSignOffClick();\r\n } else {\r\n handleSignOffClick();\r\n }\r\n }\r\n }}\r\n disabled={\r\n !isStatementReadyOnly\r\n ? !isStatementReadyOnly\r\n : !permissionToReview\r\n }\r\n tooltip={\r\n permissionToReview\r\n ? hoverReviewTooltip\r\n : DISABLED_REVIEW_BUTTON_TOOLTIP\r\n }\r\n checked={toggleStatus}\r\n />\r\n \r\n {\r\n setShowInformationMessage(!showInformationMessage);\r\n }}\r\n tooltip={reviewInfoButtonTooltip(TOOLTIP_EVENT)}\r\n position={'bottom'}\r\n tooltipOnHideFunction={resetState}\r\n />\r\n \r\n \r\n \r\n {isStatementReadyOnly && (\r\n setShowSectionAssignModal(true)}\r\n disabled={!permissionToAssign}\r\n >\r\n \r\n \r\n )}\r\n \r\n \r\n \r\n \r\n {showSectionAssignModal && (\r\n setShowSectionAssignModal(false)}\r\n sectionAssignments={sectionAssignments}\r\n usersList={projectUsersList.users}\r\n onSave={_onSectionAssignSaveAndDeleteAllUsers}\r\n revisionId={revisionId}\r\n sectionId={section.id}\r\n />\r\n )}\r\n \r\n \r\n
          \r\n
          \r\n );\r\n};\r\n\r\nSectionDetailsPanel.propTypes = {\r\n /** Indicates if the element panel should be shown */\r\n shouldShowSectionPanel: PropTypes.bool.isRequired,\r\n /** Action to hide element flyout panel */\r\n hideSectionPanel: PropTypes.func.isRequired,\r\n /** Section from the section detail store */\r\n section: PropTypes.object.isRequired,\r\n /** id of current revision */\r\n revisionId: PropTypes.number.isRequired,\r\n /** contains list of section reviews */\r\n sectionReview: PropTypes.instanceOf(SectionReviewList).isRequired,\r\n /** Id of currently selected project */\r\n selectedProjectId: PropTypes.string.isRequired,\r\n /** Gets the id of currently logged user */\r\n currentUserId: PropTypes.number.isRequired,\r\n /** Action fired after review success for post update of other comps */\r\n handleSignOffSuccess: PropTypes.func.isRequired,\r\n /** Action fired after remove review success for post update of other comps */\r\n handleRemoveSignOffSuccess: PropTypes.func.isRequired,\r\n /** Action fired to scroll the selected section into view */\r\n onSectionClick: PropTypes.func.isRequired,\r\n /* function to deallocate all the elements, sections, notes or items on content panel */\r\n deallocateItems: PropTypes.func.isRequired,\r\n /** Selected statement */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement).isRequired,\r\n /** Action to fetch the list of all section assignments */\r\n fetchSectionAssignments: PropTypes.func.isRequired,\r\n /** Action to fetch the history details for a section */\r\n fetchSectionHistoryDetails: PropTypes.func.isRequired,\r\n /** Action to fetch the assignments for a single section */\r\n fetchSectionAssignmentsList: PropTypes.func.isRequired,\r\n /** A reference to the currently selected project in the store. */\r\n project: PropTypes.instanceOf(ProjectApi).isRequired,\r\n /** The model of all the users on the project */\r\n projectUsersList: PropTypes.instanceOf(ProjectUsersList).isRequired,\r\n /*boolean value that indicates if the websocket connection has failed */\r\n socketHasBeenDisconnected: PropTypes.bool.isRequired,\r\n /**It Changes section review to loading state without any data alteration*/\r\n fetchSectionReviewsLoading: PropTypes.func.isRequired,\r\n /**Action that fetches notes list, opens notes panel, and applies filter */\r\n fetchNotesListAndApplyFilter: PropTypes.func.isRequired,\r\n /** Open statement navigator panel */\r\n showStatementNavPanelAction: PropTypes.func.isRequired,\r\n /** Action fired when button is clicked to open selected tab */\r\n setSelectedNavigatorTab: PropTypes.func.isRequired,\r\n /** Action fired to search for elements */\r\n fetchElementSearchResults: PropTypes.func.isRequired,\r\n};\r\n\r\nconst mapDispatchToProps = {\r\n hideSectionPanel: hideSectionDetailsPanelAction,\r\n handleSignOffSuccess,\r\n handleRemoveSignOffSuccess,\r\n onSectionClick,\r\n deallocateItems,\r\n fetchSectionAssignments,\r\n fetchSectionHistoryDetails,\r\n fetchSectionAssignmentsList,\r\n fetchSectionReviewsLoading,\r\n fetchNotesListAndApplyFilter,\r\n showStatementNavPanelAction,\r\n setSelectedNavigatorTab: setSelectedTabAction,\r\n fetchElementSearchResults: searchElements,\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: {\r\n sectionPanel,\r\n revision,\r\n selectedProject,\r\n currentUser,\r\n selectedStatement,\r\n selectedProject: { project },\r\n projectUsersList,\r\n },\r\n sockets: {\r\n statementSocket: { socketHasBeenDisconnected },\r\n },\r\n ui: {\r\n statementPage: {\r\n panels: { right },\r\n },\r\n },\r\n}) => ({\r\n shouldShowSectionPanel: right === RIGHT_PANELS.SECTION,\r\n section: sectionPanel.selectedSection,\r\n sectionReview: sectionPanel.sectionReviewList,\r\n sectionAssignments: sectionPanel.sectionAssignments,\r\n revisionId: revision.id,\r\n selectedProjectId: selectedProject.id,\r\n currentUserId: currentUser.id,\r\n selectedStatement,\r\n project,\r\n projectUsersList,\r\n socketHasBeenDisconnected,\r\n});\r\n\r\nexport { SectionDetailsPanel };\r\nexport default connect(\r\n mapStateToProps,\r\n mapDispatchToProps,\r\n)(SectionDetailsPanel);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M9.745 9.9817L20.245 10.0121C20.5949 10.0131 20.829 9.78043 20.83 9.43043C20.831 9.08044 20.5983 8.84643 20.2483 8.84542L9.74837 8.81504C9.39837 8.81403 9.16436 9.04669 9.16335 9.39669C9.16234 9.74668 9.395 9.98069 9.745 9.9817Z\",\n fill: \"#A3A3A3\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M20.2348 13.5121L13.2349 13.4918C12.8849 13.4908 12.6508 13.7235 12.6498 14.0735C12.6488 14.4235 12.8815 14.6575 13.2315 14.6585L20.2315 14.6787C20.5815 14.6797 20.8155 14.4471 20.8165 14.0971C20.8175 13.7471 20.5848 13.5131 20.2348 13.5121Z\",\n fill: \"#A3A3A3\"\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M15.5481 18.1652L20.2213 18.1787C20.5713 18.1797 20.804 18.4137 20.803 18.7637C20.802 19.1137 20.568 19.3464 20.218 19.3454L15.5447 19.3319C15.1947 19.3308 14.9621 19.0968 14.9631 18.7468C14.9641 18.3968 15.1981 18.1642 15.5481 18.1652Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgStatementNavigator = function SvgStatementNavigator(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 30,\n height: 29,\n viewBox: \"0 0 30 29\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgStatementNavigator, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/statement-navigator.b8598e23.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n className: \"notes-icon\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.26662 0C3.70368 0 0.815166 2.94261 0.815166 6.57229C0.815166 7.74339 1.11896 8.84022 1.64575 9.7922C1.64696 9.7953 1.64514 9.79963 1.64636 9.80149C1.77274 10.0181 1.91309 10.4985 1.91309 10.9652C1.91309 11.7878 1.63603 12.3145 0.965242 12.9973C0.501039 13.4702 0.131013 13.8434 0.0143545 13.961C-0.0111646 13.987 -0.00265823 14 0.0398735 14H7.26662C11.2348 14 14 10.3994 14 7.05323C14 3.70643 11.8127 1.90892 11.8127 1.90892C10.6467 0.729154 9.04019 0 7.26662 0ZM7.26662 1.08321C8.69751 1.08321 10.0458 1.65019 11.0629 2.67831L11.5453 3.16606C12.0739 3.78813 12.9367 5.10284 12.9367 7.05323C12.9367 9.82624 10.6084 12.9168 7.26662 12.9168H2.41557C2.74611 12.4068 2.97639 11.7872 2.97639 10.9652C2.97639 10.5164 2.88282 10.0163 2.73213 9.61641L2.73274 9.61456L2.72606 9.60094C2.69325 9.51366 2.6574 9.43134 2.61912 9.35582L2.61608 9.35025L2.59603 9.30445L2.57173 9.2605C2.11846 8.44036 1.87846 7.51066 1.87846 6.57229C1.87846 3.54611 4.29548 1.08321 7.26662 1.08321Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgNotes = function SvgNotes(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 14,\n height: 14,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgNotes, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/notes.a81fc2d0.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n className: \"icon-path refresh\",\n d: \"M1.80747 7.98415C1.80747 7.14156 1.20499 6.72027 0 6.72027V5.42242C0.611555 5.42242 1.06568 5.31937 1.3624 5.11325C1.65912 4.90713 1.80747 4.59343 1.80747 4.17214V2.05889C1.80747 1.3522 2.05323 0.832391 2.54473 0.499434C3.03624 0.166476 3.77349 0 4.75651 0V1.23669C4.24009 1.25934 3.86523 1.36467 3.63194 1.55266C3.39864 1.74066 3.28199 2.02038 3.28199 2.39185V4.40997C3.28199 5.31144 2.76331 5.85051 1.72593 6.02718V6.10872C2.76331 6.2718 3.28199 6.8086 3.28199 7.71914V9.75085C3.28199 10.1223 3.39751 10.4032 3.62854 10.5934C3.85957 10.7837 4.23556 10.8834 4.75651 10.8924V12.1359C3.71007 12.1268 2.95697 11.949 2.49717 11.6025C2.03737 11.2559 1.80747 10.6954 1.80747 9.92072V7.98415ZM10.9128 9.93431L10.5934 8.88788H10.5391C10.1767 9.34542 9.81201 9.65685 9.44507 9.8222C9.07814 9.98754 8.60702 10.0702 8.03171 10.0702C7.29331 10.0702 6.71688 9.8709 6.30238 9.47225C5.88788 9.07361 5.68063 8.50963 5.68063 7.78029C5.68063 7.00566 5.96829 6.42129 6.5436 6.02718C7.11892 5.63307 7.99546 5.41789 9.17327 5.38165L10.4711 5.34088V4.93998C10.4711 4.45979 10.359 4.10079 10.1348 3.86297C9.91053 3.62514 9.56286 3.50623 9.09173 3.50623C8.70668 3.50623 8.33749 3.56285 7.98414 3.6761C7.6308 3.78936 7.29105 3.92299 6.96489 4.07701L6.44847 2.93545C6.85617 2.72254 7.30238 2.56059 7.78709 2.4496C8.2718 2.33862 8.72933 2.28313 9.15968 2.28313C10.1155 2.28313 10.8369 2.4915 11.3239 2.90827C11.8109 3.32503 12.0544 3.97961 12.0544 4.87203V9.93431H10.9128ZM8.53454 8.84711C9.11439 8.84711 9.57984 8.68517 9.93092 8.36127C10.282 8.03737 10.4575 7.58324 10.4575 6.99887V6.34655L9.49264 6.38732C8.74065 6.4145 8.19366 6.5402 7.85164 6.76444C7.50962 6.98868 7.33862 7.33182 7.33862 7.79388C7.33862 8.12911 7.43828 8.38845 7.6376 8.57191C7.83692 8.75538 8.1359 8.84711 8.53454 8.84711ZM16.2877 10.0702C16.2877 10.7769 16.0623 11.2956 15.6115 11.6263C15.1608 11.957 14.4394 12.1268 13.4473 12.1359V10.8924C13.8777 10.8879 14.2129 10.8007 14.453 10.6308C14.6931 10.4609 14.8131 10.1676 14.8131 9.75085V7.97056C14.8131 7.42242 14.9332 6.99887 15.1733 6.69989C15.4134 6.4009 15.812 6.20385 16.3692 6.10872V6.02718C15.3318 5.85051 14.8131 5.31144 14.8131 4.40997V2.39185C14.8131 2.02038 14.7101 1.74066 14.504 1.55266C14.2978 1.36467 13.9456 1.25934 13.4473 1.23669V0C14.4575 0 15.1835 0.173271 15.6251 0.519819C16.0668 0.866366 16.2877 1.43374 16.2877 2.22197V4.17214C16.2877 4.62514 16.4315 4.94677 16.7191 5.13703C17.0068 5.32729 17.4337 5.42242 18 5.42242V6.72027C17.4428 6.72027 17.0181 6.81653 16.7259 7.00906C16.4337 7.20159 16.2877 7.52661 16.2877 7.98415V10.0702Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgTickmark = function SvgTickmark(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 13,\n viewBox: \"0 0 18 13\",\n className: \"icon-path tickmark\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgTickmark, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/tickmark.4fbcbfa8.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M16.5 6C16.7455 6 16.9496 6.17688 16.9919 6.41012L17 6.5V19.5C17 19.7455 16.8231 19.9496 16.5899 19.9919L16.5 20H6.5C6.25454 20 6.05039 19.8231 6.00806 19.5899L6 19.5V6.5C6 6.25454 6.17688 6.05039 6.41012 6.00806L6.5 6H16.5ZM7 19H16V15H12.707L13.8536 16.1464C14.0271 16.32 14.0464 16.5894 13.9114 16.7843L13.8536 16.8536C13.68 17.0271 13.4106 17.0464 13.2157 16.9114L13.1464 16.8536L11.1464 14.8536L11.109 14.8117L11.0667 14.7498L11.0376 14.6906L11.0166 14.6281L11.0054 14.5741L11.0018 14.5428L11.0001 14.4895C11.0006 14.4683 11.0023 14.4471 11.0055 14.4261L11 14.5L11.0028 14.4466L11.0166 14.3719L11.0378 14.309L11.0886 14.2157L11.1346 14.1587L13.1464 12.1464C13.3417 11.9512 13.6583 11.9512 13.8536 12.1464C14.0271 12.32 14.0464 12.5894 13.9114 12.7843L13.8536 12.8536L12.707 14H16V7H7V11H10.293L9.14645 9.85355L9.08859 9.78431C8.9536 9.58944 8.97288 9.32001 9.14645 9.14645C9.32001 8.97288 9.58944 8.9536 9.78431 9.08859L9.85355 9.14645L11.8824 11.1779L11.9333 11.2502L11.9624 11.3094L11.9834 11.3719L11.9948 11.4277L12 11.5L11.9972 11.5534L11.9834 11.6281L11.9622 11.691L11.9228 11.767L11.8824 11.8221L9.85355 13.8536L9.78431 13.9114C9.6138 14.0295 9.3862 14.0295 9.21569 13.9114L9.14645 13.8536L9.08859 13.7843C8.97047 13.6138 8.97047 13.3862 9.08859 13.2157L9.14645 13.1464L10.293 12H7V19ZM18.5 4C18.7455 4 18.9496 4.17688 18.9919 4.41012L19 4.5V17.5C19 17.7761 18.7761 18 18.5 18C18.2545 18 18.0504 17.8231 18.0081 17.5899L18 17.5V5H8.5C8.25454 5 8.05039 4.82312 8.00806 4.58988L8 4.5C8 4.25454 8.17688 4.05039 8.41012 4.00806L8.5 4H18.5Z\",\n fill: \"black\"\n});\n\nvar SvgCompareDocuments = function SvgCompareDocuments(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCompareDocuments, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/compare-documents.658ad0f9.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.92492 10.575C1.69159 10.3417 1.69159 9.99167 1.92492 9.75833C2.15825 9.525 2.50825 9.525 2.74159 9.75833L6.41658 13.4333V0.833333C6.41658 0.483333 6.64992 0.25 6.99992 0.25C7.34992 0.25 7.58325 0.483333 7.58325 0.833333V13.4333L11.2583 9.75833C11.4916 9.525 11.8416 9.525 12.0749 9.75833C12.3083 9.99167 12.3083 10.3417 12.0749 10.575L7.40825 15.2417C7.34992 15.3 7.29158 15.3583 7.23325 15.3583C7.17492 15.4167 7.05825 15.4167 6.99992 15.4167C6.94159 15.4167 6.82492 15.4167 6.76659 15.3583C6.70825 15.3 6.64992 15.3 6.59159 15.2417L1.92492 10.575ZM12.8333 14.25C12.4833 14.25 12.2499 14.4833 12.2499 14.8333V16.5833H1.74992V14.8333C1.74992 14.4833 1.51659 14.25 1.16659 14.25C0.816585 14.25 0.583252 14.4833 0.583252 14.8333V17.1667C0.583252 17.5167 0.816585 17.75 1.16659 17.75H12.8333C13.1833 17.75 13.4166 17.5167 13.4166 17.1667V14.8333C13.4166 14.4833 13.1833 14.25 12.8333 14.25Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgExport = function SvgExport(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 14,\n height: 18,\n viewBox: \"0 0 14 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgExport, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/export.06ec63eb.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.92417 8.18182H7.40765L5.96111 3.30183C5.8989 3.08917 5.82113 2.78231 5.7278 2.38123C5.63448 1.98016 5.57809 1.70128 5.55865 1.54458C5.51977 1.78336 5.45658 2.09302 5.36909 2.47357C5.28159 2.85412 5.20868 3.13767 5.15036 3.32421L3.73882 8.18182H2.22229L1.1199 4.08531L0 0H1.4232L2.64226 4.76806C2.83279 5.5329 2.96889 6.20818 3.05055 6.79393C3.09332 6.4768 3.15749 6.12238 3.24303 5.73063C3.32858 5.33889 3.40635 5.02176 3.47635 4.77926L4.86455 0H6.24692L7.67012 4.80164C7.80622 5.24562 7.9501 5.90971 8.10175 6.79393C8.16008 6.26041 8.30006 5.5814 8.52171 4.75687L9.73493 0H11.1465L8.92417 8.18182ZM18 2.47357C18 3.32795 17.7084 3.98271 17.1251 4.43788C16.5418 4.89305 15.7116 5.12063 14.6345 5.12063H13.7479V8.18182H12.3539V0H14.8095C15.8749 0 16.673 0.208927 17.2038 0.626788C17.7346 1.04465 18 1.66024 18 2.47357ZM13.7479 3.99577H14.4887C15.2042 3.99577 15.7291 3.87638 16.0635 3.63761C16.3979 3.39883 16.5651 3.02575 16.5651 2.51834C16.5651 2.04825 16.4154 1.69755 16.116 1.46624C15.8166 1.23492 15.35 1.11926 14.7161 1.11926H13.7479V3.99577Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgWp = function SvgWp(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 9,\n viewBox: \"0 0 18 9\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgWp, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/WP.f7b2d045.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M19.5002 -0.000244141C19.7763 -0.000244141 20.0002 0.223614 20.0002 0.499756C20.0002 6.27582 18.4696 10.0227 15.3644 11.6518L15.14 11.7646L14.995 11.8299C14.9003 15.2994 13.3311 17.9139 10.3237 19.6269L10.0281 19.7898L9.72364 19.9471C9.41677 20.1006 9.05987 19.9064 9.00677 19.5833L9.00004 19.4999V14.9829L8.93531 14.9798C7.93238 14.9061 7.10827 14.629 6.47373 14.1408L6.30538 14.0024L6.14648 13.8535C5.52984 13.2368 5.1661 12.3923 5.04527 11.3337L5.02012 11.0646L5.01704 10.9999H0.500035C0.185527 10.9999 -0.0359446 10.7199 0.00405791 10.4323L0.0215769 10.3539L0.0528212 10.2763C1.64926 7.08345 4.15043 5.32653 7.50288 5.04134L7.82996 5.01834L8.16903 5.00393L8.23537 4.86001C9.72801 1.75387 13.243 0.150837 18.6977 0.00994301L19.1003 0.00224257L19.5002 -0.000244141ZM18.995 1.00393L18.7214 1.00954C13.371 1.14654 10.1501 2.72086 8.96428 5.68562C8.88834 5.87545 8.70449 5.99993 8.50004 5.99993C5.45827 5.99993 3.16852 7.19339 1.58352 9.61192L1.4164 9.87574L1.34203 9.99993H5.50003C5.71481 9.99993 5.89796 10.1353 5.96875 10.3255L5.99198 10.4101L6.00003 10.4999C6.00003 11.7108 6.29106 12.5838 6.85359 13.1464C7.41612 13.7089 8.28918 13.9999 9.50004 13.9999C9.74549 13.9999 9.94964 14.1768 9.99198 14.4101L10 14.4999V18.6559L10.1242 18.5836C12.5408 17.1037 13.8172 14.97 13.9818 12.1402L13.9955 11.823L14 11.4999C14 11.2955 14.1245 11.1116 14.3143 11.0357C17.2068 9.87875 18.7758 6.78486 18.9778 1.66628L18.9904 1.27859L18.995 1.00393ZM13 4.99993C14.1046 4.99993 15 5.89536 15 6.99993C15 8.1045 14.1046 8.99993 13 8.99993C11.8955 8.99993 11 8.1045 11 6.99993C11 5.89536 11.8955 4.99993 13 4.99993ZM13 5.99993C12.4478 5.99993 12 6.44764 12 6.99993C12 7.55221 12.4478 7.99993 13 7.99993C13.5523 7.99993 14 7.55221 14 6.99993C14 6.44764 13.5523 5.99993 13 5.99993Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgRocketGrey = function SvgRocketGrey(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n viewBox: \"0 0 20 20\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgRocketGrey, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/rocket-grey.94d5d94b.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M0 0.5V13.5C0 13.7761 0.223857 14 0.5 14H2.5C2.77614 14 3 13.7761 3 13.5C3 13.2239 2.77614 13 2.5 13H1V1H2.5L2.58988 0.991944C2.82313 0.949608 3 0.74546 3 0.5C3 0.223857 2.77614 0 2.5 0H0.5L0.410124 0.00805569C0.176875 0.0503917 0 0.25454 0 0.5Z\",\n fill: \"#A3A3A3\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M15.5 13H17V1H15.5C15.2239 1 15 0.776142 15 0.5C15 0.223857 15.2239 0 15.5 0H17.5C17.7761 0 18 0.223857 18 0.5V13.5C18 13.7455 17.8231 13.9496 17.5899 13.9919L17.5 14H15.5C15.2239 14 15 13.7761 15 13.5C15 13.2545 15.1769 13.0504 15.4101 13.0081L15.5 13Z\",\n fill: \"#A3A3A3\"\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.4629 0.310684C9.38603 0.12277 9.20316 0 9.00013 0C8.7971 0 8.61423 0.12277 8.53736 0.310684L4.03736 11.3107C3.9328 11.5663 4.05523 11.8582 4.31082 11.9628C4.5664 12.0673 4.85835 11.9449 4.9629 11.6893L6.47217 8H11.5281L13.0374 11.6893C13.1419 11.9449 13.4339 12.0673 13.6894 11.9628C13.945 11.8582 14.0675 11.5663 13.9629 11.3107L9.4629 0.310684ZM11.119 7L9.00013 1.82054L6.88126 7H11.119Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgComfortAnnotation = function SvgComfortAnnotation(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 14,\n viewBox: \"0 0 18 14\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgComfortAnnotation, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/comfort-annotation.9f0a171c.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M17.9712 2.74111C17.9524 2.69675 17.9259 2.65781 17.8916 2.62428L15.3148 0.104928C15.2816 0.072476 15.2406 0.0455409 15.1964 0.028125C15.1521 0.00973558 15.1034 0 15.0547 0H10.2673C10.0649 0 9.9 0.161178 9.9 0.359135V10.4398C9.9 10.6388 10.0649 10.8 10.2673 10.8H17.6316C17.8351 10.8 18 10.6388 18 10.4398V2.87957C18 2.83089 17.9902 2.78438 17.9712 2.74111ZM15.3024 0.9L17.1 2.7H15.3L15.3024 0.9ZM10.8535 9.9L10.8 0.9H14.5218V3.2843C14.5218 3.45197 14.6501 3.58774 14.8085 3.58774H17.1V9.9H10.8535ZM8.07123 2.74111C8.05242 2.69675 8.02587 2.65781 7.99157 2.62428L5.41475 0.104928C5.38156 0.072476 5.34062 0.0455409 5.29637 0.028125C5.25211 0.00973558 5.20343 0 5.15475 0H0.367327C0.164855 0 0 0.161178 0 0.359135V10.4398C0 10.6388 0.164855 10.8 0.367327 10.8H7.73157C7.93515 10.8 8.1 10.6388 8.1 10.4398V2.87957C8.1 2.83089 8.09015 2.78438 8.07123 2.74111ZM5.40235 0.9L7.2 2.7H5.4L5.40235 0.9ZM0.953506 9.9L0.9 0.9H4.62178V3.2843C4.62178 3.45197 4.75007 3.58774 4.9085 3.58774H7.2V9.9H0.953506Z\",\n fill: \"#A3A3A3\"\n});\n\nvar SvgCompare = function SvgCompare(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 11,\n viewBox: \"0 0 18 11\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCompare, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/compare.101931ef.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M5.6 9.26316C6.06944 9.26316 6.45 8.88614 6.45 8.42105C6.45 7.95597 6.06944 7.57895 5.6 7.57895C5.13056 7.57895 4.75 7.95597 4.75 8.42105C4.75 8.88614 5.13056 9.26316 5.6 9.26316Z\",\n fill: \"black\"\n});\n\nvar _ref3 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n d: \"M12.4 9.26316C12.8694 9.26316 13.25 8.88614 13.25 8.42105C13.25 7.95597 12.8694 7.57895 12.4 7.57895C11.9306 7.57895 11.55 7.95597 11.55 8.42105C11.55 8.88614 11.9306 9.26316 12.4 9.26316Z\",\n fill: \"black\"\n});\n\nvar _ref4 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M7.17483 11.0701C7.0088 10.9064 6.74022 10.9066 6.57448 11.0708C6.40851 11.2352 6.40874 11.502 6.57471 11.6665L6.57552 11.6673L6.57689 11.6686L6.58057 11.6722L6.59176 11.6829C6.60089 11.6915 6.61339 11.7031 6.62914 11.7172C6.66063 11.7453 6.70527 11.7837 6.76224 11.8289C6.87592 11.919 7.04022 12.0372 7.24852 12.1551C7.66335 12.39 8.2674 12.6317 9 12.6317C9.73261 12.6317 10.3367 12.39 10.7515 12.1551C10.9598 12.0372 11.1241 11.919 11.2378 11.8289C11.2947 11.7837 11.3394 11.7453 11.3709 11.7172C11.3866 11.7031 11.3991 11.6915 11.4082 11.6829L11.4194 11.6722L11.4231 11.6686L11.4245 11.6673L11.4255 11.6662C11.5915 11.5018 11.5915 11.2352 11.4255 11.0708C11.2599 10.9067 10.9916 10.9062 10.8256 11.0697L10.8249 11.0704L10.822 11.0731C10.8181 11.0768 10.8111 11.0833 10.8011 11.0922C10.7811 11.1101 10.7494 11.1375 10.7068 11.1713C10.6212 11.2391 10.4933 11.3314 10.3298 11.424C10.0008 11.6102 9.5424 11.7896 9 11.7896C8.45761 11.7896 7.99916 11.6102 7.67024 11.424C7.50666 11.3314 7.37877 11.2391 7.29323 11.1713C7.25059 11.1375 7.21886 11.1101 7.19889 11.0922C7.18891 11.0833 7.1819 11.0768 7.17796 11.0731L7.17552 11.0708L7.17483 11.0701Z\",\n fill: \"black\"\n});\n\nvar _ref5 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3.05 4.21053C1.64167 4.21053 0.5 5.3416 0.5 6.73684V11.7895C0.5 14.1149 2.40279 16 4.75 16H13.25C15.5972 16 17.5 14.1149 17.5 11.7895V6.73684C17.5 5.3416 16.3583 4.21053 14.95 4.21053H9.425V3.31536C10.1582 3.1284 10.7 2.46898 10.7 1.68421C10.7 0.754047 9.93888 0 9 0C8.06112 0 7.3 0.754047 7.3 1.68421C7.3 2.46899 7.84178 3.1284 8.575 3.31536V4.21053H3.05ZM3.05 5.05263C2.11112 5.05263 1.35 5.80668 1.35 6.73684V11.7895C1.35 13.6498 2.87223 15.1579 4.75 15.1579H13.25C15.1278 15.1579 16.65 13.6498 16.65 11.7895V6.73684C16.65 5.80668 15.8889 5.05263 14.95 5.05263H3.05ZM9.85 1.68421C9.85 2.14929 9.46944 2.52632 9 2.52632C8.53056 2.52632 8.15 2.14929 8.15 1.68421C8.15 1.21913 8.53056 0.842105 9 0.842105C9.46944 0.842105 9.85 1.21913 9.85 1.68421Z\",\n fill: \"black\"\n});\n\nvar SvgChatBot = function SvgChatBot(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 18,\n height: 16,\n viewBox: \"0 0 18 16\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2, _ref3, _ref4, _ref5);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgChatBot, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/chat-bot.644ce350.svg\";\nexport { ForwardRef as ReactComponent };","import BaseModel from 'models/base-model';\r\nexport default class ToolkitOption extends BaseModel({\r\n Icon: null,\r\n id: null,\r\n shouldDisplay: () => false,\r\n}) {\r\n isSelected(selectedOption) {\r\n return this.id === selectedOption.id;\r\n }\r\n}\r\n","import { ReactComponent as StatementNavIcon } from 'icons/statement-navigator.svg';\r\nimport { ReactComponent as NoteOpen } from 'icons/notes.svg';\r\nimport { ReactComponent as TickmarkIcon } from 'icons/tickmark.svg';\r\nimport { ReactComponent as CompareIcon } from 'icons/compare-documents.svg';\r\nimport { ReactComponent as ExportIcon } from 'icons/export.svg';\r\nimport { ReactComponent as WPIcon } from 'icons/WP.svg';\r\nimport { ReactComponent as Rocket } from 'icons/rocket-grey.svg';\r\nimport { ReactComponent as ComfortAnnotationIcon } from 'icons/comfort-annotation.svg';\r\nimport { ReactComponent as SideBySideIcon } from 'icons/compare.svg';\r\nimport { ReactComponent as ChatBotIcon } from 'icons/chat-bot.svg';\r\n\r\nimport ToolkitOption from 'models/utils/toolkit-option-model';\r\nexport const TOOLKIT_OPTIONS = {\r\n statementNav: new ToolkitOption({\r\n id: 'toolkit-statement-navigator',\r\n Icon: StatementNavIcon,\r\n }),\r\n notes: new ToolkitOption({\r\n id: 'toolkit-notes',\r\n Icon: NoteOpen,\r\n }),\r\n tickmarks: new ToolkitOption({\r\n id: 'toolkit-tickmarks',\r\n Icon: TickmarkIcon,\r\n }),\r\n compare: new ToolkitOption({\r\n id: 'toolkit-compare',\r\n Icon: CompareIcon,\r\n }),\r\n exportOption: new ToolkitOption({\r\n id: 'toolkit-export',\r\n Icon: ExportIcon,\r\n }),\r\n workPaper: new ToolkitOption({\r\n id: 'toolkit-workpaper',\r\n Icon: WPIcon,\r\n }),\r\n auditChecklist: new ToolkitOption({\r\n id: 'toolkit-audit-checklist',\r\n Icon: Rocket,\r\n }),\r\n comfortAnnotationPanel: new ToolkitOption({\r\n id: 'comfort-annotation-panel',\r\n Icon: ComfortAnnotationIcon,\r\n }),\r\n sideBySidePanel: new ToolkitOption({\r\n id: 'side-by-side-view',\r\n Icon: SideBySideIcon,\r\n }),\r\n chatBotpanel: new ToolkitOption({\r\n id: 'chat-bot-view',\r\n Icon: ChatBotIcon,\r\n }),\r\n};\r\n","import React, { Component } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classnames from 'classnames';\r\nimport { withRouter } from 'react-router';\r\nimport {\r\n ELEMENT_SELECT_MODES,\r\n ELEMENT_SELECT_MODES_ARRAY,\r\n CONTENT_HIGHLIGHT_MODES_ARRAY,\r\n} from 'constants/feature/modes-constants';\r\nimport { TOOLKIT_OPTIONS } from 'constants/feature/toolkit-constants';\r\nimport { ROUTE_CONSTANTS } from 'constants/util/route-constants';\r\nimport { isProjectExistInAMERegion } from 'utils/project-utils';\r\nimport Tooltip from 'components/common/tool-tip-component';\r\nimport { connect } from 'react-redux';\r\nimport { push } from 'connected-react-router';\r\nimport {\r\n toggleNotesPanel,\r\n toggleStatementNavPanel,\r\n toggleTickmarkPanel,\r\n toggleComparePanel,\r\n toggleExportPanel,\r\n toggleWorkPaperPanel,\r\n toggleAuditChecklistPanel,\r\n toggleComfortAnnotationPanel,\r\n toggleChatBotPanel,\r\n} from 'store/actions/panel-controller-actions';\r\nimport {\r\n LEFT_PANELS,\r\n RIGHT_PANELS_ARRAY,\r\n LEFT_PANELS_ARRAY,\r\n RIGHT_PANELS,\r\n} from 'constants/feature/panel-constants';\r\nimport {\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n toggleFormulaCancelModal,\r\n} from 'store/actions/panel-cancel-modal-actions';\r\nimport FeatureFlagComponent from 'components/common/feature-flag-component';\r\nimport { FEATURE_NAMES } from 'constants/feature-flag-constants';\r\nimport SelectedStatement from 'models/api/selected-statement-model';\r\n\r\nexport const TOOLKIT_BLOCK = 'toolkit';\r\nconst TOOLKIT_ID_BLOCK = 'toolkit-id';\r\nconst TOOLKIT_ICON_SIZE = '28px';\r\nconst NOTES_ICON_SIZE = '20px';\r\n\r\nclass Toolkit extends Component {\r\n render() {\r\n const {\r\n statementNav,\r\n notes,\r\n tickmarks,\r\n compare,\r\n exportOption,\r\n workPaper,\r\n auditChecklist,\r\n comfortAnnotationPanel,\r\n sideBySidePanel,\r\n chatBotpanel,\r\n } = TOOLKIT_OPTIONS;\r\n const {\r\n onStatementNavClick,\r\n onNotesClick,\r\n onTickmarksClick,\r\n onCompareClick,\r\n currLeftPanel,\r\n currRightPanel,\r\n blacklineViewMode,\r\n onExportClick,\r\n toggleFormulaCancelModal,\r\n selectMode,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n onWorkPaperClick,\r\n onChatBotIconClick,\r\n onAuditChecklistClick,\r\n onComfortAnnotationButtonClick,\r\n push,\r\n match,\r\n project,\r\n selectedStatement,\r\n } = this.props;\r\n return (\r\n
          \r\n \r\n {\r\n onStatementNavClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n if (selectMode.title === ELEMENT_SELECT_MODES.FORMULA.title) {\r\n openCancelModalAfterModalConfirm(true);\r\n toggleFormulaCancelModal(true);\r\n } else if (\r\n selectMode.title ===\r\n ELEMENT_SELECT_MODES.INTERNAL_REFERENCE.title\r\n ) {\r\n toggleInternalReferenceCancelModal(true);\r\n openCancelModalAfterModalConfirm(true);\r\n } else {\r\n onNotesClick();\r\n }\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n onTickmarksClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n onWorkPaperClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n {\r\n onExportClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n {isProjectExistInAMERegion(project) && (\r\n \r\n {\r\n onAuditChecklistClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n \r\n {\r\n onComfortAnnotationButtonClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n push(`${match.url}${ROUTE_CONSTANTS.SIDE_BY_SIDE}`);\r\n }}\r\n >\r\n \r\n \r\n
          \r\n \r\n \r\n \r\n \r\n {selectedStatement.isOCR && (\r\n \r\n {\r\n onChatBotIconClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n {blacklineViewMode && (\r\n \r\n {\r\n onCompareClick();\r\n }}\r\n >\r\n \r\n \r\n \r\n )}\r\n \r\n );\r\n }\r\n}\r\n\r\nToolkit.propTypes = {\r\n /** Current select mode, controls the tools available in the toolkit */\r\n selectMode: PropTypes.oneOf(ELEMENT_SELECT_MODES_ARRAY).isRequired,\r\n /** Current highlight mode, controls the tools available in the toolkit */\r\n highlightMode: PropTypes.oneOf(CONTENT_HIGHLIGHT_MODES_ARRAY),\r\n /** action fired when the statement nav button is clicked */\r\n onStatementNavClick: PropTypes.func.isRequired,\r\n /** Action fired to reveal the notes panel */\r\n onNotesClick: PropTypes.func.isRequired,\r\n /** Action fired to reveal the tickmarks panel */\r\n onTickmarksClick: PropTypes.func.isRequired,\r\n /** Currently open left panel */\r\n currLeftPanel: PropTypes.oneOf(LEFT_PANELS_ARRAY).isRequired,\r\n /** Currently open right panel */\r\n currRightPanel: PropTypes.oneOf(RIGHT_PANELS_ARRAY).isRequired,\r\n /** action fired to open the formula cancel modal */\r\n toggleFormulaCancelModal: PropTypes.func,\r\n /** action fired to open the internal reference cancel modal */\r\n toggleInternalReferenceCancelModal: PropTypes.func,\r\n /** action fired to indicate the note panel will be opened after modal is confirmed */\r\n openCancelModalAfterModalConfirm: PropTypes.func,\r\n /** action fired to open the WP toolkit panel */\r\n onWorkPaperClick: PropTypes.func,\r\n /** action fired to open the Audit Checklist toolkit panel */\r\n onAuditChecklistClick: PropTypes.func,\r\n /** action fired to open the Comfort Annotation toolkit panel */\r\n onComfortAnnotationButtonClick: PropTypes.func,\r\n /** selected statement used to check whethe side-by-side icon should be disabled or not */\r\n selectedStatement: PropTypes.instanceOf(SelectedStatement),\r\n};\r\n\r\nconst mapStateToProps = ({\r\n data: { revision, selectedProject, selectedStatement },\r\n ui: {\r\n statementPage: {\r\n modes: { selectMode, highlightMode, blacklineViewMode },\r\n panels: { left, right },\r\n },\r\n },\r\n}) => ({\r\n revision,\r\n selectMode,\r\n highlightMode,\r\n currLeftPanel: left,\r\n currRightPanel: right,\r\n blacklineViewMode,\r\n project: selectedProject.project,\r\n selectedStatement,\r\n});\r\n\r\nconst mapDispatchToProps = {\r\n onNotesClick: toggleNotesPanel,\r\n onTickmarksClick: toggleTickmarkPanel,\r\n onStatementNavClick: toggleStatementNavPanel,\r\n onCompareClick: toggleComparePanel,\r\n onExportClick: toggleExportPanel,\r\n toggleFormulaCancelModal,\r\n toggleInternalReferenceCancelModal,\r\n openCancelModalAfterModalConfirm,\r\n onWorkPaperClick: toggleWorkPaperPanel,\r\n onChatBotIconClick: toggleChatBotPanel,\r\n onAuditChecklistClick: toggleAuditChecklistPanel,\r\n onComfortAnnotationButtonClick: toggleComfortAnnotationPanel,\r\n push,\r\n};\r\nexport { Toolkit };\r\nexport default withRouter(\r\n connect(mapStateToProps, mapDispatchToProps)(Toolkit),\r\n);\r\n","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5.7451 4.74581L3.41205 7.07885C3.29812 7.19279 3.14913 7.24888 3.00013 7.24888C2.85114 7.24888 2.7004 7.19279 2.58646 7.07885L0.253422 4.74581C0.025552 4.51794 0.025552 4.14809 0.253422 3.92022C0.481292 3.69253 0.851143 3.69253 1.07901 3.92022L2.41644 5.25764V0.833454C2.41644 0.511105 2.67761 0.249756 3.00013 0.249756C3.32266 0.249756 3.58383 0.511105 3.58383 0.833454V5.25764L4.92126 3.92022C5.14913 3.69253 5.51723 3.69253 5.7451 3.92022C5.97297 4.14809 5.97297 4.51794 5.7451 4.74581ZM5.7451 13.2541L3.41205 10.9211C3.18418 10.6932 2.81433 10.6932 2.58646 10.9211L0.253422 13.2541C0.025552 13.482 0.025552 13.8501 0.253422 14.0782C0.367357 14.1919 0.51635 14.2498 0.667095 14.2498C0.816087 14.2498 0.965078 14.1919 1.07901 14.0782L2.41644 12.7406V17.1665C2.41644 17.489 2.67761 17.7502 3.00013 17.7502C3.32266 17.7502 3.58383 17.489 3.58383 17.1665V12.7406L4.92126 14.0782C5.14913 14.3058 5.51723 14.3058 5.7451 14.0782C5.97297 13.8501 5.97297 13.482 5.7451 13.2541Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgCollapseAll = function SvgCollapseAll(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 6,\n height: 18,\n viewBox: \"0 0 6 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgCollapseAll, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/collapse-all.fcef36d2.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.07516 3.575L2.41683 2.23333V6.66667C2.41683 7.01667 2.65016 7.25 3.00016 7.25C3.35016 7.25 3.58349 7.01667 3.58349 6.66667V2.23333L4.92516 3.575C5.04183 3.69167 5.21683 3.75 5.33349 3.75C5.45016 3.75 5.62516 3.69167 5.74183 3.575C5.97516 3.34167 5.97516 2.99167 5.74183 2.75833L3.40849 0.425C3.17516 0.191667 2.82516 0.191667 2.59183 0.425L0.258496 2.75833C0.0251628 2.99167 0.0251628 3.34167 0.258496 3.575C0.491829 3.80833 0.841829 3.80833 1.07516 3.575ZM4.92516 14.425L3.58349 15.7667V11.3333C3.58349 10.9833 3.35016 10.75 3.00016 10.75C2.65016 10.75 2.41683 10.9833 2.41683 11.3333V15.7667L1.07516 14.425C0.841829 14.1917 0.491829 14.1917 0.258496 14.425C0.0251628 14.6583 0.0251628 15.0083 0.258496 15.2417L2.59183 17.575C2.7085 17.6917 2.8835 17.75 3.00016 17.75C3.11683 17.75 3.29183 17.6917 3.40849 17.575L5.74183 15.2417C5.97516 15.0083 5.97516 14.6583 5.74183 14.425C5.50849 14.1917 5.15849 14.1917 4.92516 14.425Z\",\n fill: \"#00A3E0\"\n});\n\nvar SvgExpandAll = function SvgExpandAll(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 6,\n height: 18,\n viewBox: \"0 0 6 18\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgExpandAll, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/expand-all.38f8ae02.svg\";\nexport { ForwardRef as ReactComponent };","function _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar _ref2 =\n/*#__PURE__*/\nReact.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M8.70614 0.66748C8.85608 0.66748 8.96854 0.742453 9.04351 0.892398C9.11849 1.04234 9.081 1.19229 8.96854 1.30475L5.21992 5.05337C5.06998 5.20331 4.84506 5.20331 4.69512 5.05337L0.946497 1.30475C0.834038 1.19229 0.796552 1.04234 0.871525 0.892398C0.909011 0.742453 1.05896 0.66748 1.2089 0.66748L8.70614 0.66748Z\"\n});\n\nvar SvgDownArrow = function SvgDownArrow(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, [\"svgRef\", \"title\"]);\n\n return React.createElement(\"svg\", _extends({\n width: 10,\n height: 6,\n viewBox: \"0 0 10 6\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? React.createElement(\"title\", null, title) : null, _ref2);\n};\n\nvar ForwardRef = React.forwardRef(function (props, ref) {\n return React.createElement(SvgDownArrow, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/down-arrow.298495a8.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useEffect } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport { ReactComponent as ArrowDown } from 'icons/down-arrow.svg';\r\nimport { ReactComponent as Pencil } from 'icons/edit-pencil.svg';\r\nimport { ReactComponent as TaskReviewedIcon } from 'icons/task-reviewed.svg';\r\nimport { ReactComponent as TaskIcon } from 'icons/task.svg';\r\nimport { ReactComponent as TrashCan } from 'icons/delete-icon.svg';\r\nimport { LEFT_PANELS } from 'constants/feature/panel-constants';\r\nimport { smoothScrollIntoTopById } from 'utils/scrolling-utils';\r\nimport ToolTip from './tool-tip-component';\r\n\r\nexport const TREE_VIEW_BLOCK = 'tree-view';\r\nexport const TREE_VIEW_ID_BLOCK = 'tree-view-id';\r\nconst EDIT_SECTION_MODAL = 'statement-content-panel--edit-section';\r\n\r\nconst TreeView = ({\r\n expanded,\r\n children,\r\n toggle,\r\n hidden,\r\n highlighted,\r\n id,\r\n parentId = null,\r\n label,\r\n onSelect,\r\n scrollBasedHighlighted,\r\n navigationEditMode,\r\n onOpenEditNavigation,\r\n onOpenDeleteNavigation,\r\n sectionReview,\r\n panel,\r\n isNew,\r\n recentlyAdded,\r\n setNewSectionId,\r\n isSideBySideViewMode,\r\n showEditAndDeleteIconInRow = false,\r\n isEditAndDeleteNotPermitted = false,\r\n}) => {\r\n // this useEffect works as componentDidMount, it is going to scroll to the current treeView if its new and is being previewed\r\n useEffect(() => {\r\n if (isNew || recentlyAdded) {\r\n smoothScrollIntoTopById(`${TREE_VIEW_ID_BLOCK}-${id}`);\r\n\r\n return () => {\r\n //if there was a recently added section, when this component umount\r\n // we should reset the newSectionId to avoid unnecessary scrolling\r\n if (recentlyAdded) {\r\n setNewSectionId(null);\r\n }\r\n };\r\n }\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const ExpandCollapse = ({ expandable }) => (\r\n {\r\n toggle(id);\r\n e.stopPropagation();\r\n }}\r\n >\r\n {expandable && }\r\n \r\n );\r\n\r\n const renderIcon = () => {\r\n return (\r\n ((panel !== LEFT_PANELS.COMPARE && panel === LEFT_PANELS.STATEMENT_NAV) ||\r\n isSideBySideViewMode) && (\r\n
          \r\n {!isNew &&\r\n sectionReview &&\r\n sectionReview.hasSectionBeenReviewed(id) ? (\r\n \r\n ) : (\r\n \r\n )}\r\n
          \r\n )\r\n );\r\n };\r\n\r\n return (\r\n \r\n