From 147d2099352eed9e43bfb2e230609cab975e5321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asaf=20Ka=C4=9Fan=20Bezgin?= Date: Tue, 3 Aug 2021 16:58:10 +0300 Subject: [PATCH 001/167] NCI-Agency/anet#3698: Update to Bootstrap v5 Update bootstrap 3 to 5. Update react bootstrap 0.33.1 to 2.0.0-rc.0. Fix syntax & prevent white screens. --- anet-dictionary.yml | 16 +- client/config/wdio.config.js | 2 +- client/package.json | 4 +- client/src/components/AdvancedSearch.js | 66 ++++---- .../AdvisorReports/AdvisorReportsTable.js | 4 +- .../OrganizationAdvisorsTable.js | 2 +- client/src/components/AssignPersonModal.js | 14 +- client/src/components/AssignPositionModal.js | 14 +- client/src/components/AvatarEditModal.js | 2 +- client/src/components/ConfirmDestructive.js | 6 +- client/src/components/CreateButton.js | 17 +-- client/src/components/CustomFields.js | 14 +- .../EditAssociatedPositionsModal.js | 12 +- client/src/components/EditHistory.js | 9 +- client/src/components/FieldHelper.js | 38 ++--- client/src/components/GeoLocation.js | 6 +- client/src/components/GuidedTour.js | 2 +- client/src/components/Header.js | 16 +- client/src/components/Kanban.js | 30 ++-- client/src/components/LinkTo.js | 12 +- client/src/components/Messages.js | 6 +- client/src/components/Nav.js | 74 +++++---- .../src/components/NoPaginationTaskTable.js | 2 +- client/src/components/OptionListModal.js | 10 +- client/src/components/OrganizationTable.js | 11 +- .../PendingAssessmentsByPosition.js | 6 +- client/src/components/PeriodsNavigation.js | 4 +- client/src/components/PositionTable.js | 9 +- .../src/components/RelatedObjectNoteModal.js | 6 +- client/src/components/RelatedObjectNotes.js | 30 ++-- client/src/components/RelatedObjectsTable.js | 10 +- client/src/components/RemoveButton.js | 2 +- client/src/components/ReportStatistics.js | 1 - client/src/components/ReportSummary.js | 10 +- client/src/components/ReportWorkflow.js | 2 +- client/src/components/ResponsiveLayout.js | 4 +- client/src/components/SearchBar.js | 8 +- client/src/components/SimilarObjectsModal.js | 2 +- client/src/components/SimpleModal.js | 3 +- client/src/components/TaskTable.js | 9 +- client/src/components/TriggerableConfirm.js | 6 +- client/src/components/UltimatePagination.js | 2 +- .../advancedSearch/CheckboxFilter.js | 11 +- .../advancedSelectWidget/AdvancedSelect.js | 10 +- .../AdvancedSelectOverlayTable.js | 4 +- .../AggregationWidgetContainer.js | 6 +- client/src/components/approvals/Approvals.js | 18 ++- .../approvals/ApprovalsDefinition.js | 17 ++- .../components/assessments/AssessmentModal.js | 4 +- .../assessments/AssessmentResultsTable.css | 4 +- .../assessments/AssessmentResultsTable.js | 1 - .../InstantAssessmentsContainerField.js | 2 +- .../assessments/PeriodicAssessmentResults.js | 24 +-- .../src/components/editor/LinkSourceAnet.js | 4 +- client/src/models/Location.js | 3 +- client/src/pages/Home.js | 27 ++-- client/src/pages/Search.js | 39 +++-- .../pages/admin/AuthorizationGroupTable.js | 2 +- client/src/pages/admin/Index.js | 14 +- client/src/pages/admin/MergeLocations.js | 6 +- client/src/pages/admin/MergePeople.js | 30 ++-- client/src/pages/admin/MergePositions.js | 6 +- client/src/pages/admin/UserActivityTable.js | 4 +- .../pages/admin/authorizationgroup/Form.js | 6 +- client/src/pages/dashboards/BoardDashboard.js | 35 ++--- .../pages/dashboards/DecisivesDashboard.js | 44 +++--- client/src/pages/locations/Form.js | 4 +- client/src/pages/onboarding/Show.js | 4 +- client/src/pages/organizations/Form.js | 4 +- client/src/pages/organizations/Show.js | 10 +- client/src/pages/people/Compact.js | 18 +-- client/src/pages/people/Form.js | 97 ++++++++---- client/src/pages/people/Show.js | 22 +-- client/src/pages/positions/Form.js | 10 +- client/src/pages/positions/Show.js | 2 +- .../pages/reports/AuthorizationGroupTable.js | 2 +- client/src/pages/reports/Compact.js | 12 +- client/src/pages/reports/Form.js | 24 +-- client/src/pages/reports/ReportPeople.js | 30 ++-- client/src/pages/reports/Show.js | 42 +++--- client/src/pages/rollup/Show.js | 14 +- client/src/pages/tasks/Form.js | 4 +- client/src/pages/tasks/Show.js | 4 +- client/tests/models/geoLocation.test.js | 6 +- client/yarn.lock | 141 +++++++++++++++--- docs/INSTALL.md | 16 +- src/main/resources/anet-schema.yml | 4 +- src/main/resources/emails/emailReport.ftlh | 2 +- testDictionaries/no-custom-fields.yml | 6 +- 89 files changed, 707 insertions(+), 595 deletions(-) diff --git a/anet-dictionary.yml b/anet-dictionary.yml index d83858a3ea..5a7d235eaf 100644 --- a/anet-dictionary.yml +++ b/anet-dictionary.yml @@ -47,7 +47,7 @@ fields: longName: label: Objective / Effort description placeholder: Enter an objective / effort description, example .... - componentClass: textarea + as: textarea style: height: 400px topLevel: @@ -59,7 +59,7 @@ fields: longName: label: Description of this Objective placeholder: Enter a description for this Objective, example .... - componentClass: textarea + as: textarea style: height: 400px assessments: @@ -85,7 +85,7 @@ fields: longName: label: Effort description placeholder: Enter an effort description, example .... - componentClass: textarea + as: textarea style: height: 400px assessments: @@ -199,7 +199,7 @@ fields: label: Questions helpText: JSON that defines the assessment (you need to know what you are doing) placeholder: Fill in valid JSON - componentClass: textarea + as: textarea style: height: 200px @@ -467,7 +467,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - componentClass: textarea + as: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] @@ -569,7 +569,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - componentClass: textarea + as: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] @@ -650,7 +650,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - componentClass: textarea + as: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] @@ -732,7 +732,7 @@ fields: label: Textarea field placeholder: Placeholder text for textarea field helpText: Help text for textarea field - componentClass: textarea + as: textarea style: height: 200px visibleWhen: $[?(@ && @.colourOptions === 'GREEN')] diff --git a/client/config/wdio.config.js b/client/config/wdio.config.js index a7376f32c4..81efc257c1 100644 --- a/client/config/wdio.config.js +++ b/client/config/wdio.config.js @@ -110,7 +110,7 @@ const config = { waitforTimeout: 10000, // // Default timeout in milliseconds for request - // if Selenium Grid doesn't send response + // if Selenium Container doesn't send response connectionRetryTimeout: 90000, // // Default request retries count diff --git a/client/package.json b/client/package.json index 952a455beb..3cb749dd4e 100644 --- a/client/package.json +++ b/client/package.json @@ -119,7 +119,7 @@ "@projectstorm/react-diagrams-core": "6.6.1", "@projectstorm/react-diagrams-defaults": "6.6.1", "@projectstorm/react-diagrams-routing": "6.6.1", - "bootstrap": "3.4.1", + "bootstrap": "5.1.1", "change-case": "4.1.2", "classnames": "2.3.1", "closest": "0.0.1", @@ -156,7 +156,7 @@ "prop-types": "15.7.2", "react": "16.14.0", "react-avatar-edit": "1.0.0", - "react-bootstrap": "0.33.1", + "react-bootstrap": "2.0.0-rc.0", "react-confirm-bootstrap": "5.3.1", "react-container-dimensions": "1.4.1", "react-dom": "16.14.0", diff --git a/client/src/components/AdvancedSearch.js b/client/src/components/AdvancedSearch.js index 32a9deea24..b46809394e 100644 --- a/client/src/components/AdvancedSearch.js +++ b/client/src/components/AdvancedSearch.js @@ -1,4 +1,4 @@ -import { Classes, Menu, MenuItem } from "@blueprintjs/core" +import { Classes } from "@blueprintjs/core" import { Popover2, Popover2InteractionKind } from "@blueprintjs/popover2" import "@blueprintjs/popover2/lib/css/blueprint-popover2.css" import styled from "@emotion/styled" @@ -18,9 +18,10 @@ import React, { useState } from "react" import { Button, Col, - ControlLabel, + Dropdown, FormControl, - FormGroup + FormGroup, + Row } from "react-bootstrap" import { connect } from "react-redux" import { useHistory } from "react-router-dom" @@ -74,20 +75,21 @@ const AdvancedSearch = ({ existingKeys.length < Object.keys(filterDefs).length const advancedSearchMenuContent = ( - {Object.keys(filterDefs).map(filterKey => ( - addFilter(filterKey)} - text={filterKey} - shouldDismissPopover={false} - /> + // shouldDismissPopover={false} + > + {filterKey} + ))} - + ) const possibleFilterTypes = Object.keys(ALL_FILTERS).filter(type => @@ -196,7 +198,7 @@ const AdvancedSearch = ({ } }} > - @@ -218,7 +220,7 @@ const AdvancedSearch = ({ Cancel diff --git a/client/src/components/AvatarEditModal.js b/client/src/components/AvatarEditModal.js index 08e4e2a2f7..02611bbdb3 100644 --- a/client/src/components/AvatarEditModal.js +++ b/client/src/components/AvatarEditModal.js @@ -11,7 +11,7 @@ const AvatarEditModal = ({ title, onAvatarUpdate }) => {
- + {title} diff --git a/client/src/components/ConfirmDestructive.js b/client/src/components/ConfirmDestructive.js index 528da1a5b0..b47de3c1b0 100644 --- a/client/src/components/ConfirmDestructive.js +++ b/client/src/components/ConfirmDestructive.js @@ -9,7 +9,7 @@ const ConfirmDestructive = ({ operation, objectType, objectDisplay, - bsStyle, + variant, buttonLabel, children, ...otherProps @@ -28,7 +28,7 @@ const ConfirmDestructive = ({ dialogClassName="react-confirm-bootstrap-modal" confirmBSStyle="primary" > - @@ -40,7 +40,7 @@ ConfirmDestructive.propTypes = { objectType: PropTypes.string.isRequired, operation: PropTypes.string.isRequired, objectDisplay: PropTypes.string.isRequired, - bsStyle: PropTypes.string, + variant: PropTypes.string, buttonLabel: PropTypes.string, children: PropTypes.node } diff --git a/client/src/components/CreateButton.js b/client/src/components/CreateButton.js index 6d50f4c6f5..1f48149806 100644 --- a/client/src/components/CreateButton.js +++ b/client/src/components/CreateButton.js @@ -1,7 +1,7 @@ import AppContext from "components/AppContext" import * as Models from "models" import React, { useContext } from "react" -import { Button, DropdownButton, MenuItem } from "react-bootstrap" +import { Button, Dropdown, DropdownButton } from "react-bootstrap" import { useHistory } from "react-router-dom" const DEFAULT_ACTIONS = [Models.Report] @@ -25,23 +25,18 @@ const CreateButton = () => { if (modelClasses.length > 1) { return ( - + {modelClasses.map((modelClass, i) => { const name = modelClass.displayName() || modelClass.resourceName return ( - onSelect(modelClass)} > New {name} - + ) })} @@ -50,7 +45,7 @@ const CreateButton = () => { const modelClass = modelClasses[0] return (