synapse-react-client 4.0.21 → 4.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.d.ts +1 -0
- package/dist/SWC.index.d.ts.map +1 -1
- package/dist/SWC.index.js +2 -1
- package/dist/SWC.index.js.map +1 -1
- package/dist/assets/icons/GeneticsIcon.d.ts +3 -0
- package/dist/assets/icons/GeneticsIcon.d.ts.map +1 -0
- package/dist/assets/icons/GeneticsIcon.js +14 -0
- package/dist/assets/icons/GeneticsIcon.js.map +1 -0
- package/dist/components/CardContainer/CardContainer.d.ts.map +1 -1
- package/dist/components/CardContainer/CardContainer.js +43 -49
- package/dist/components/CardContainer/CardContainer.js.map +1 -1
- package/dist/components/CardContainerLogic/CardContainerLogic.d.ts +13 -0
- package/dist/components/CardContainerLogic/CardContainerLogic.d.ts.map +1 -1
- package/dist/components/CardContainerLogic/CardContainerLogic.js +64 -40
- package/dist/components/CardContainerLogic/CardContainerLogic.js.map +1 -1
- package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js +1 -1
- package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.css +1 -1
- package/dist/components/DataExplorer/DataExplorer.module.js +16 -16
- package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.module.scss +0 -1
- package/dist/components/DataGrid/DataGrid.d.ts +1 -0
- package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/DataGrid.js +72 -72
- package/dist/components/DataGrid/DataGrid.js.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.js +209 -206
- package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
- package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts +2 -1
- package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js +51 -42
- package/dist/components/DataGrid/components/ColumnHeaderWithTooltip.js.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.js +68 -67
- package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.d.ts +1 -0
- package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.js +4 -3
- package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
- package/dist/components/DataGrid/utils/modelColsToGrid.d.ts +1 -1
- package/dist/components/DataGrid/utils/modelColsToGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/modelColsToGrid.js +15 -14
- package/dist/components/DataGrid/utils/modelColsToGrid.js.map +1 -1
- package/dist/components/DataGrid/utils/normalizeWebsocketError.d.ts +7 -0
- package/dist/components/DataGrid/utils/normalizeWebsocketError.d.ts.map +1 -0
- package/dist/components/DataGrid/utils/normalizeWebsocketError.js +8 -0
- package/dist/components/DataGrid/utils/normalizeWebsocketError.js.map +1 -0
- package/dist/components/EntityCitation/EntityCitation.d.ts.map +1 -1
- package/dist/components/EntityCitation/EntityCitation.js +23 -8
- package/dist/components/EntityCitation/EntityCitation.js.map +1 -1
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.d.ts +18 -0
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.d.ts.map +1 -0
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js +112 -0
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js.map +1 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.d.ts +31 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.d.ts.map +1 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.js +198 -0
- package/dist/components/GenericCard/DuoTermTags/duoTerms.js.map +1 -0
- package/dist/components/GenericCard/SynapseCardLabel.d.ts.map +1 -1
- package/dist/components/GenericCard/SynapseCardLabel.js +4 -8
- package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.d.ts +6 -0
- package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +168 -153
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/Goals/Goals.d.ts +8 -0
- package/dist/components/Goals/Goals.d.ts.map +1 -1
- package/dist/components/Goals/Goals.js +54 -40
- package/dist/components/Goals/Goals.js.map +1 -1
- package/dist/components/IconSvg/IconSvg.d.ts +1 -1
- package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
- package/dist/components/IconSvg/IconSvg.js +19 -18
- package/dist/components/IconSvg/IconSvg.js.map +1 -1
- package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.d.ts +9 -0
- package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.d.ts.map +1 -0
- package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js +69 -0
- package/dist/components/ProjectVisibilityChip/ProjectVisibilityChip.js.map +1 -0
- package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.d.ts +13 -0
- package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.d.ts.map +1 -0
- package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.js +11 -0
- package/dist/components/ProjectVisibilityChip/getProjectVisibilityFromACL.js.map +1 -0
- package/dist/components/ProjectVisibilityChip/index.d.ts +5 -0
- package/dist/components/ProjectVisibilityChip/index.d.ts.map +1 -0
- package/dist/components/ProjectVisibilityChip/index.js +7 -0
- package/dist/components/ProjectVisibilityChip/index.js.map +1 -0
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.d.ts +21 -0
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationContext.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts +10 -0
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +66 -60
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +2 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/RowSetView.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/RowSetView.js +9 -12
- package/dist/components/QueryWrapperPlotNav/RowSetView.js.map +1 -1
- package/dist/components/RssFeedCards/RssFeedCards.d.ts +7 -15
- package/dist/components/RssFeedCards/RssFeedCards.d.ts.map +1 -1
- package/dist/components/RssFeedCards/RssFeedCards.js +114 -123
- package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +33 -6
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +93 -55
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts +3 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js +39 -37
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js.map +1 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts +3 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js +4 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js.map +1 -1
- package/dist/components/UserCardList/UserCardList.d.ts +2 -20
- package/dist/components/UserCardList/UserCardList.d.ts.map +1 -1
- package/dist/components/UserCardList/UserCardList.js +49 -72
- package/dist/components/UserCardList/UserCardList.js.map +1 -1
- package/dist/components/UserCardList/UserCardListRotate.d.ts +13 -0
- package/dist/components/UserCardList/UserCardListRotate.d.ts.map +1 -1
- package/dist/components/UserCardList/UserCardListRotate.js +82 -57
- package/dist/components/UserCardList/UserCardListRotate.js.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts +5 -2
- package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.js +68 -51
- package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/menu/ComplexMenu.d.ts +8 -1
- package/dist/components/menu/ComplexMenu.d.ts.map +1 -1
- package/dist/components/menu/ComplexMenu.js +50 -20
- package/dist/components/menu/ComplexMenu.js.map +1 -1
- package/dist/components/widgets/facet-nav/FacetValueChip.d.ts +25 -0
- package/dist/components/widgets/facet-nav/FacetValueChip.d.ts.map +1 -0
- package/dist/components/widgets/facet-nav/FacetValueChip.js +40 -0
- package/dist/components/widgets/facet-nav/FacetValueChip.js.map +1 -0
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.d.ts +10 -5
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.js +10 -17
- package/dist/components/widgets/facet-nav/SelectionCriteriaPill.js.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js +11 -10
- package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +70 -54
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts +2 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js +17 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +2 -0
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +7 -7
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCard.d.ts.map +1 -1
- package/dist/features/curator/dashboard/components/CurationTaskCard.js +99 -45
- package/dist/features/curator/dashboard/components/CurationTaskCard.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +174 -149
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.d.ts +6 -0
- package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/utils/constants.js +19 -2
- package/dist/features/entity/metadata-task/utils/constants.js.map +1 -1
- package/dist/style/abstracts/_cssVariables.scss +1 -0
- package/dist/style/components/_total-query-results.scss +10 -34
- package/dist/style/main.css +1 -1
- package/dist/synapse-queries/KeyFactory.d.ts +1 -0
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +3 -0
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.js +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
- package/dist/synapse-queries/index.js +46 -44
- package/dist/synapse-queries/user/index.js +3 -3
- package/dist/synapse-queries/user/useUserBundle.d.ts +12 -0
- package/dist/synapse-queries/user/useUserBundle.d.ts.map +1 -1
- package/dist/synapse-queries/user/useUserBundle.js +50 -36
- package/dist/synapse-queries/user/useUserBundle.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/AppUtils/session/SessionInitializedGuard.d.ts +10 -5
- package/dist/utils/AppUtils/session/SessionInitializedGuard.d.ts.map +1 -1
- package/dist/utils/AppUtils/session/SessionInitializedGuard.js +13 -9
- package/dist/utils/AppUtils/session/SessionInitializedGuard.js.map +1 -1
- package/dist/utils/functions/SqlFunctions.d.ts +1 -1
- package/dist/utils/functions/SqlFunctions.d.ts.map +1 -1
- package/dist/utils/functions/SqlFunctions.js +1 -1
- package/dist/utils/functions/SqlFunctions.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChallengeSubmissionStepper.js","names":[],"sources":["../../../src/components/ChallengeSubmission/ChallengeSubmissionStepper.tsx"],"sourcesContent":["import SynapseClient from '@/synapse-client'\nimport { useSynapseContext } from '@/utils'\nimport { Typography } from '@mui/material'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport {\n DockerCommit,\n EvaluationSubmission,\n TeamSubmissionEligibility,\n} from '@sage-bionetworks/synapse-types'\nimport { useState } from 'react'\nimport StepperDialog from '../StepperDialog'\nimport { Step } from '../StepperDialog/StepperDialog'\nimport { displayToast } from '../ToastMessage'\nimport { EntityItem } from './ChallengeSubmission'\nimport EvaluationQueueList from './EvaluationQueueList'\nimport SubmissionCommitList from './SubmissionCommitList'\n\nenum StepsEnum {\n SELECT_COMMIT = 'SELECT_COMMIT',\n SELECT_EVALUATION = 'SELECT_EVALUATION',\n SUBMISSION_SUCCESS = 'SUBMISSION_SUCCESS',\n}\ntype StepKey = keyof typeof StepsEnum\ntype StepList<TStepId = string> = {\n [key in StepKey]: Step<TStepId>\n}\n\nconst stepsDocker: StepList<StepsEnum> = {\n SELECT_COMMIT: {\n id: StepsEnum.SELECT_COMMIT,\n title: 'Select Commit for Submission',\n nextStep: StepsEnum.SELECT_EVALUATION,\n nextEnabled: false,\n },\n SELECT_EVALUATION: {\n id: StepsEnum.SELECT_EVALUATION,\n title: 'Select Evaluation Queue',\n previousStep: StepsEnum.SELECT_COMMIT,\n confirmStep: StepsEnum.SUBMISSION_SUCCESS,\n confirmButtonText: 'Submit',\n },\n SUBMISSION_SUCCESS: {\n id: StepsEnum.SUBMISSION_SUCCESS,\n title: 'Submission Successful!',\n confirmButtonText: 'Close',\n confirmEnabled: true,\n },\n}\n\nconst stepsFile: StepList<StepsEnum> = {\n SELECT_COMMIT: { id: StepsEnum.SELECT_COMMIT, title: '' },\n SELECT_EVALUATION: {\n id: StepsEnum.SELECT_EVALUATION,\n title: 'Select Evaluation Queue',\n confirmStep: StepsEnum.SUBMISSION_SUCCESS,\n confirmButtonText: 'Submit',\n },\n SUBMISSION_SUCCESS: {\n id: StepsEnum.SUBMISSION_SUCCESS,\n title: 'Submission Successful!',\n confirmButtonText: 'Close',\n confirmEnabled: true,\n },\n}\n\nconst getSteps = (\n entityType: typeof EntityType.dockerrepo | typeof EntityType.file,\n) => {\n return entityType === EntityType.dockerrepo ? stepsDocker : stepsFile\n}\n\ntype ChallengeSubmissionStepperProps = {\n projectId: string\n userId: string\n teamId: string\n entity: EntityItem\n entityType: typeof EntityType.dockerrepo | typeof EntityType.file\n isShowingModal: boolean\n onClose: () => void\n}\n\nfunction ChallengeSubmissionStepper({\n projectId,\n userId,\n teamId,\n entity,\n entityType,\n isShowingModal,\n onClose,\n}: ChallengeSubmissionStepperProps) {\n const { accessToken } = useSynapseContext()\n const steps = getSteps(entityType)\n const initialStep =\n entityType === EntityType.dockerrepo\n ? steps.SELECT_COMMIT\n : steps.SELECT_EVALUATION\n const [step, setStep] = useState<Step<StepsEnum>>(initialStep)\n const [errorMessage, setErrorMessage] = useState<string>()\n const [selectedCommit, setSelectedCommit] = useState<DockerCommit>()\n\n const [submissionName, setSubmissionName] = useState<string>('')\n const [selectedEval, setSelectedEval] = useState<string | undefined>()\n const [confirming, setConfirming] = useState<boolean>(false)\n\n const hide = () => {\n setErrorMessage(undefined)\n setSelectedCommit(undefined)\n setSubmissionName('')\n setSelectedEval(undefined)\n setConfirming(false)\n onClose()\n setStep(initialStep)\n }\n\n function handleStepChange(value?: StepsEnum) {\n if (!value || !steps[value]) return\n setErrorMessage(undefined)\n setStep(steps[value])\n }\n\n async function confirmEligibility() {\n if (!selectedEval) return setErrorMessage('Please select an evaluation.')\n try {\n return await SynapseClient.getSubmissionEligibility(\n selectedEval,\n teamId,\n accessToken,\n )\n } catch (err) {\n return setErrorMessage(err.message)\n }\n }\n\n async function submitForEvaluation(eligibility: TeamSubmissionEligibility) {\n if (!entity.id || (entityType === EntityType.dockerrepo && !selectedCommit))\n return setErrorMessage('Error: Invalid entity or commit.')\n\n const contributors = eligibility.membersEligibility\n .filter(\n member =>\n !member.hasConflictingSubmission &&\n member.isEligible &&\n !member.isQuotaFilled &&\n member.isRegistered,\n )\n .map(member => {\n return { principalId: member.principalId.toString() }\n })\n\n const submission: EvaluationSubmission = {\n userId: userId,\n evaluationId: selectedEval!,\n entityId: entity.id,\n versionNumber: entity.versionNumber ??
|
|
1
|
+
{"version":3,"file":"ChallengeSubmissionStepper.js","names":[],"sources":["../../../src/components/ChallengeSubmission/ChallengeSubmissionStepper.tsx"],"sourcesContent":["import SynapseClient from '@/synapse-client'\nimport { useSynapseContext } from '@/utils'\nimport { Typography } from '@mui/material'\nimport { EntityType } from '@sage-bionetworks/synapse-client'\nimport {\n DockerCommit,\n EvaluationSubmission,\n TeamSubmissionEligibility,\n} from '@sage-bionetworks/synapse-types'\nimport { useState } from 'react'\nimport StepperDialog from '../StepperDialog'\nimport { Step } from '../StepperDialog/StepperDialog'\nimport { displayToast } from '../ToastMessage'\nimport { EntityItem } from './ChallengeSubmission'\nimport EvaluationQueueList from './EvaluationQueueList'\nimport SubmissionCommitList from './SubmissionCommitList'\n\nenum StepsEnum {\n SELECT_COMMIT = 'SELECT_COMMIT',\n SELECT_EVALUATION = 'SELECT_EVALUATION',\n SUBMISSION_SUCCESS = 'SUBMISSION_SUCCESS',\n}\ntype StepKey = keyof typeof StepsEnum\ntype StepList<TStepId = string> = {\n [key in StepKey]: Step<TStepId>\n}\n\nconst stepsDocker: StepList<StepsEnum> = {\n SELECT_COMMIT: {\n id: StepsEnum.SELECT_COMMIT,\n title: 'Select Commit for Submission',\n nextStep: StepsEnum.SELECT_EVALUATION,\n nextEnabled: false,\n },\n SELECT_EVALUATION: {\n id: StepsEnum.SELECT_EVALUATION,\n title: 'Select Evaluation Queue',\n previousStep: StepsEnum.SELECT_COMMIT,\n confirmStep: StepsEnum.SUBMISSION_SUCCESS,\n confirmButtonText: 'Submit',\n },\n SUBMISSION_SUCCESS: {\n id: StepsEnum.SUBMISSION_SUCCESS,\n title: 'Submission Successful!',\n confirmButtonText: 'Close',\n confirmEnabled: true,\n },\n}\n\nconst stepsFile: StepList<StepsEnum> = {\n SELECT_COMMIT: { id: StepsEnum.SELECT_COMMIT, title: '' },\n SELECT_EVALUATION: {\n id: StepsEnum.SELECT_EVALUATION,\n title: 'Select Evaluation Queue',\n confirmStep: StepsEnum.SUBMISSION_SUCCESS,\n confirmButtonText: 'Submit',\n },\n SUBMISSION_SUCCESS: {\n id: StepsEnum.SUBMISSION_SUCCESS,\n title: 'Submission Successful!',\n confirmButtonText: 'Close',\n confirmEnabled: true,\n },\n}\n\nconst getSteps = (\n entityType: typeof EntityType.dockerrepo | typeof EntityType.file,\n) => {\n return entityType === EntityType.dockerrepo ? stepsDocker : stepsFile\n}\n\ntype ChallengeSubmissionStepperProps = {\n projectId: string\n userId: string\n teamId: string\n entity: EntityItem\n entityType: typeof EntityType.dockerrepo | typeof EntityType.file\n isShowingModal: boolean\n onClose: () => void\n}\n\nfunction ChallengeSubmissionStepper({\n projectId,\n userId,\n teamId,\n entity,\n entityType,\n isShowingModal,\n onClose,\n}: ChallengeSubmissionStepperProps) {\n const { accessToken } = useSynapseContext()\n const steps = getSteps(entityType)\n const initialStep =\n entityType === EntityType.dockerrepo\n ? steps.SELECT_COMMIT\n : steps.SELECT_EVALUATION\n const [step, setStep] = useState<Step<StepsEnum>>(initialStep)\n const [errorMessage, setErrorMessage] = useState<string>()\n const [selectedCommit, setSelectedCommit] = useState<DockerCommit>()\n\n const [submissionName, setSubmissionName] = useState<string>('')\n const [selectedEval, setSelectedEval] = useState<string | undefined>()\n const [confirming, setConfirming] = useState<boolean>(false)\n\n const hide = () => {\n setErrorMessage(undefined)\n setSelectedCommit(undefined)\n setSubmissionName('')\n setSelectedEval(undefined)\n setConfirming(false)\n onClose()\n setStep(initialStep)\n }\n\n function handleStepChange(value?: StepsEnum) {\n if (!value || !steps[value]) return\n setErrorMessage(undefined)\n setStep(steps[value])\n }\n\n async function confirmEligibility() {\n if (!selectedEval) return setErrorMessage('Please select an evaluation.')\n try {\n return await SynapseClient.getSubmissionEligibility(\n selectedEval,\n teamId,\n accessToken,\n )\n } catch (err) {\n return setErrorMessage(err.message)\n }\n }\n\n async function submitForEvaluation(eligibility: TeamSubmissionEligibility) {\n if (!entity.id || (entityType === EntityType.dockerrepo && !selectedCommit))\n return setErrorMessage('Error: Invalid entity or commit.')\n\n const contributors = eligibility.membersEligibility\n .filter(\n member =>\n !member.hasConflictingSubmission &&\n member.isEligible &&\n !member.isQuotaFilled &&\n member.isRegistered,\n )\n .map(member => {\n return { principalId: member.principalId.toString() }\n })\n\n const submission: EvaluationSubmission = {\n userId: userId,\n evaluationId: selectedEval!,\n entityId: entity.id,\n versionNumber: entity.versionNumber ?? 1,\n teamId: teamId,\n contributors,\n }\n if (entityType === EntityType.dockerrepo) {\n submission.dockerRepositoryName = entity.repositoryName\n submission.dockerDigest = selectedCommit!.digest\n }\n\n if (submissionName !== '') submission['name'] = submissionName\n\n try {\n await SynapseClient.submitToEvaluation(\n accessToken,\n submission,\n entity.etag!,\n eligibility.eligibilityStateHash,\n )\n displayToast('Submitted successfully!', 'success')\n hide()\n } catch (e) {\n setErrorMessage(e.message)\n }\n }\n\n const onConfirmHandler = async () => {\n const eligibility = await confirmEligibility()\n if (eligibility) {\n await submitForEvaluation(eligibility)\n }\n }\n\n const onCommitChanged = (value: DockerCommit) => {\n setSelectedCommit(value)\n setStep({ ...step, nextEnabled: true })\n }\n\n function stepperContent() {\n switch (step.id) {\n case StepsEnum.SELECT_COMMIT:\n return (\n <SubmissionCommitList\n repository={entity}\n selectedCommit={selectedCommit}\n onCommitChanged={onCommitChanged}\n />\n )\n break\n case StepsEnum.SELECT_EVALUATION:\n return (\n <EvaluationQueueList\n projectId={projectId}\n submissonName={submissionName}\n onSubmissionNameChange={setSubmissionName}\n selectedEvaluation={selectedEval}\n onEvaluationChange={value => {\n setStep({ ...step, confirmEnabled: true })\n setSelectedEval(value)\n }}\n />\n )\n case StepsEnum.SUBMISSION_SUCCESS:\n return (\n <Typography variant=\"body1\" sx={{ fontSize: '16px' }}>\n Your submission will be scored and results posted to the Challenge\n Leaderboard.\n </Typography>\n )\n default:\n return <></>\n }\n }\n\n return (\n <StepperDialog\n errorMessage={errorMessage}\n onCancel={hide}\n onStepChange={handleStepChange as (arg: string) => void}\n open={isShowingModal}\n onConfirm={() => {\n onConfirmHandler()\n }}\n confirming={confirming}\n step={step}\n content={stepperContent()}\n loading={false}\n />\n )\n}\n\nexport default ChallengeSubmissionStepper\n"],"mappings":";;;;;;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;GACD,CAAA;GAEL,KAAA,sBACE,OACE,kBAAC,GAAD;IAAY,SAAQ;IAAQ,IAAI,EAAE,UAAU,OAAO;cAAG;GAG1C,CAAA;GAEhB,SACE,OAAO,kBAAA,GAAA,CAAI,CAAA;EACf;CACF;CAEA,OACE,kBAAC,GAAD;EACgB;EACd,UAAU;EACV,cAAc;EACd,MAAM;EACN,iBAAiB;GACf,EAAiB;EACnB;EACY;EACN;EACN,SAAS,EAAe;EACxB,SAAS;CACV,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._dataExplorerTitle_pjkyv_1.MuiTypography-root{color:var(--data-explorer-title-color,var(--synapse-primary-action-color));font-size:36px;line-height:40px}._dataExplorerSubtitle_pjkyv_7.MuiTypography-root{line-height:140%}@media (width>=1024px){._dataExplorerButton_pjkyv_12{width:fit-content}}._dataExplorerTextContainer_pjkyv_17{gap:16px}@media (width>=1024px){._dataExplorerTextContainer_pjkyv_17{flex:0 0 30%;max-width:30%}}._dataExplorerContainer_pjkyv_27{flex-direction:column;flex:1 0 0;align-items:flex-start;gap:60px;padding:40px 0;display:flex}@media (width>=1024px){._dataExplorerContainer_pjkyv_27{flex-direction:row}}._dataContainer_pjkyv_41{flex:60%;grid-template-rows:repeat(9,fit-content(100%));grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;display:inline-grid}._dataRowTitle_pjkyv_51{color:var(--synapse-primary-action-color,#4d558d);overflow-wrap:break-word;word-break:break-word;flex:0 auto;min-width:0;font-size:16px;font-weight:400;line-height:26.4px}@media (width>=1024px){._dataRowTitle_pjkyv_51{font-size:19.8px}}._dataRowInner_pjkyv_67{flex:1;justify-content:space-between;align-items:center;min-width:0;display:flex}._dataRow_pjkyv_51{border:1px solid #0000;border-radius:3.3px;justify-content:space-between;justify-self:stretch;align-items:center;gap:17.6px;min-height:66.6px;padding:8.8px 26.4px;transition:background-color .2s,border-color .2s,box-shadow .2s,transform .2s;display:flex;position:relative;text-decoration:none!important}._dataRow_pjkyv_51:hover{z-index:1;background-color:#fff;border-color:#e1e1e1;transform:scale(1.1);box-shadow:0 4px 8px #0000001a}._dataRow_pjkyv_51:hover ._viewCta_pjkyv_96{opacity:1;pointer-events:auto}._dataRowLeft_pjkyv_101{flex:1;align-items:center;gap:16px;min-width:0;display:inline-flex}._iconContainer_pjkyv_109{border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:49px;height:49px;display:flex}._dataRowNamePill_pjkyv_119{flex:1 1 0;align-items:center;gap:8px;min-width:0;display:flex}._fileCount_pjkyv_127{color:#787090;border:1px solid #d8d5e0;border-radius:80px;flex-shrink:0;justify-content:center;align-items:center;gap:10px;padding:4px 8px;font-size:14px;font-weight:400;line-height:24px;display:flex}._viewCta_pjkyv_96{opacity:0;white-space:nowrap;color:var(--synapse-primary-action-color,#4d558d);background:linear-gradient(90deg,#0000,#fff 25% 100%);border-radius:0 2px 2px 0;align-items:center;gap:4px;padding-left:40px;padding-right:26.4px;transition:opacity .2s;display:inline-flex;position:absolute;top:0;bottom:0;right:0}._viewCtaText_pjkyv_160{color:var(--synapse-primary-action-color,#4d558d);font-size:16px;font-weight:400;line-height:26.4px}._viewCtaIcon_pjkyv_167.MuiSvgIcon-root{color:var(--synapse-primary-action-color,#5a488f);font-size:24px}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import './DataExplorer.css';var e = {
|
|
2
|
-
dataExplorerTitle: "
|
|
3
|
-
dataExplorerSubtitle: "
|
|
4
|
-
dataExplorerButton: "
|
|
5
|
-
dataExplorerTextContainer: "
|
|
6
|
-
dataExplorerContainer: "
|
|
7
|
-
dataContainer: "
|
|
8
|
-
dataRowTitle: "
|
|
9
|
-
dataRowInner: "
|
|
10
|
-
dataRow: "
|
|
11
|
-
viewCta: "
|
|
12
|
-
dataRowLeft: "
|
|
13
|
-
iconContainer: "
|
|
14
|
-
dataRowNamePill: "
|
|
15
|
-
fileCount: "
|
|
16
|
-
viewCtaText: "
|
|
17
|
-
viewCtaIcon: "
|
|
2
|
+
dataExplorerTitle: "_dataExplorerTitle_pjkyv_1",
|
|
3
|
+
dataExplorerSubtitle: "_dataExplorerSubtitle_pjkyv_7",
|
|
4
|
+
dataExplorerButton: "_dataExplorerButton_pjkyv_12",
|
|
5
|
+
dataExplorerTextContainer: "_dataExplorerTextContainer_pjkyv_17",
|
|
6
|
+
dataExplorerContainer: "_dataExplorerContainer_pjkyv_27",
|
|
7
|
+
dataContainer: "_dataContainer_pjkyv_41",
|
|
8
|
+
dataRowTitle: "_dataRowTitle_pjkyv_51",
|
|
9
|
+
dataRowInner: "_dataRowInner_pjkyv_67",
|
|
10
|
+
dataRow: "_dataRow_pjkyv_51",
|
|
11
|
+
viewCta: "_viewCta_pjkyv_96",
|
|
12
|
+
dataRowLeft: "_dataRowLeft_pjkyv_101",
|
|
13
|
+
iconContainer: "_iconContainer_pjkyv_109",
|
|
14
|
+
dataRowNamePill: "_dataRowNamePill_pjkyv_119",
|
|
15
|
+
fileCount: "_fileCount_pjkyv_127",
|
|
16
|
+
viewCtaText: "_viewCtaText_pjkyv_160",
|
|
17
|
+
viewCtaIcon: "_viewCtaIcon_pjkyv_167"
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
20
20
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataExplorer.module.js","names":[],"sources":["../../../src/components/DataExplorer/DataExplorer.module.scss"],"sourcesContent":["@use 'sass:map';\n@use '../../style/abstracts/variables' as SrcVariables;\n\n.dataExplorerTitle:global(.MuiTypography-root) {\n color: var(--data-explorer-title-color, var(--synapse-primary-action-color));\n font-size: 36px;\n line-height: 40px; /* 111.111% */\n
|
|
1
|
+
{"version":3,"file":"DataExplorer.module.js","names":[],"sources":["../../../src/components/DataExplorer/DataExplorer.module.scss"],"sourcesContent":["@use 'sass:map';\n@use '../../style/abstracts/variables' as SrcVariables;\n\n.dataExplorerTitle:global(.MuiTypography-root) {\n color: var(--data-explorer-title-color, var(--synapse-primary-action-color));\n font-size: 36px;\n line-height: 40px; /* 111.111% */\n}\n\n.dataExplorerSubtitle:global(.MuiTypography-root) {\n line-height: 140%;\n}\n\n.dataExplorerButton {\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n width: fit-content;\n }\n}\n\n.dataExplorerTextContainer {\n gap: 16px;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n flex: 0 0 30%;\n max-width: 30%;\n }\n}\n\n.dataExplorerContainer {\n display: flex;\n padding: 40px 0;\n align-items: flex-start;\n gap: 60px;\n flex: 1 0 0;\n flex-direction: column;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n flex-direction: row;\n }\n}\n\n.dataContainer {\n display: inline-grid;\n row-gap: 8px;\n column-gap: 8px;\n flex: 1 1 60%;\n min-width: 0;\n grid-template-rows: repeat(9, fit-content(100%));\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.dataRowTitle {\n color: var(--synapse-primary-action-color, #4d558d);\n font-size: 16px;\n font-weight: 400;\n line-height: 26.4px;\n flex: 0 1 auto;\n min-width: 0;\n overflow-wrap: break-word;\n word-break: break-word;\n\n @media (min-width: map.get(SrcVariables.$breakpoints, 'large')) {\n font-size: 19.8px;\n }\n}\n\n.dataRowInner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: 1;\n min-width: 0;\n}\n\n.dataRow {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 8.8px 26.4px;\n min-height: 66.6px;\n gap: 17.6px;\n justify-self: stretch;\n position: relative;\n border-radius: 3.3px;\n border: 1px solid transparent;\n text-decoration: none !important;\n transition:\n background-color 200ms ease,\n border-color 200ms ease,\n box-shadow 200ms ease,\n transform 200ms ease;\n\n &:hover {\n background-color: #fff;\n border-color: #e1e1e1;\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);\n transform: scale(1.1);\n z-index: 1;\n .viewCta {\n opacity: 1;\n pointer-events: auto;\n }\n }\n}\n\n.dataRowLeft {\n display: inline-flex;\n align-items: center;\n gap: 16px;\n min-width: 0;\n flex: 1;\n}\n\n.iconContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 49px;\n height: 49px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.dataRowNamePill {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1 1 0;\n min-width: 0;\n}\n\n.fileCount {\n display: flex;\n padding: 4px 8px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n border-radius: 80px;\n border: 1px solid #d8d5e0;\n color: #787090;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px; /* 171.429% */\n flex-shrink: 0;\n}\n\n.viewCta {\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n display: inline-flex;\n align-items: center;\n padding-right: 26.4px;\n padding-left: 40px;\n gap: 4px;\n opacity: 0;\n white-space: nowrap;\n color: var(--synapse-primary-action-color, #4d558d);\n background: linear-gradient(to right, transparent, #fff 25%, #fff 100%);\n border-radius: 0 2px 2px 0;\n transition: opacity 200ms ease;\n}\n\n.viewCtaText {\n color: var(--synapse-primary-action-color, #4d558d);\n font-size: 16px;\n font-weight: 400;\n line-height: 26.4px; /* 165% */\n}\n\n.viewCtaIcon:global(.MuiSvgIcon-root) {\n font-size: 24px;\n color: var(--synapse-primary-action-color, #5a488f);\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/DataGrid.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAA;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EAEL,gBAAgB,EACjB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,uDAAuD,CAAA;AAC9D,OAAO,8CAA8C,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAMxE,O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OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IACjD,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,oBAAoB,EAAE,mBAAmB,CAAA;IACzC,SAAS,EAAE,WAAW,EAAE,CAAA;IACxB,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,WAAW,GAAG,SAAS,CAAA;IACnC,aAAa,EAAE,eAAe,GAAG,IAAI,CAAA;IACrC,YAAY,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,IAAI,CAAA;IACxE,qBAAqB,EAAE,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,eAAe,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAA;IAC5E,gBAAgB,CAAC,EAAE,SAAS,eAAe,EAAE,CAAA;IAC7C,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAuOpD"}
|
|
@@ -5,25 +5,25 @@ import '../../style/components/_data-grid-extra.css';/* empty css
|
|
|
5
5
|
import { renderAddRowsComponent as r, renderRecordSetContextMenu as i, renderViewContextMenu as ee } from "./components/contextMenu.js";
|
|
6
6
|
import { getCellClassName as te } from "./utils/getCellClassName.js";
|
|
7
7
|
import { useColumnResizeHandles as ne } from "./hooks/useColumnResizeHandles.js";
|
|
8
|
-
import { useEffect as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import
|
|
11
|
-
import { c as
|
|
12
|
-
import { DynamicDataSheetGrid as
|
|
8
|
+
import { useEffect as re, useRef as a, useState as o } from "react";
|
|
9
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
10
|
+
import c from "classnames";
|
|
11
|
+
import { c as l } from "react/compiler-runtime";
|
|
12
|
+
import { DynamicDataSheetGrid as ie } from "@sage-bionetworks/react-datasheet-grid";
|
|
13
13
|
import "@sage-bionetworks/react-datasheet-grid/dist/style.css";
|
|
14
14
|
//#region src/components/DataGrid/DataGrid.tsx
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
let [
|
|
19
|
-
|
|
20
|
-
!
|
|
21
|
-
let n =
|
|
15
|
+
function u(u) {
|
|
16
|
+
let p = l(43), { gridRef: m, rowValues: h, columnNames: g, columnOrder: _, schemaPropertiesInfo: v, entityIsView: y, jsonSchema: b, lastSelection: x, handleChange: S, handleSelectionChange: C, remoteSelections: w, upsertKey: T } = u, E;
|
|
17
|
+
p[0] === Symbol.for("react.memo_cache_sentinel") ? (E = {}, p[0] = E) : E = p[0];
|
|
18
|
+
let [D, O] = o(E), [k, ae] = o(!1), A, j;
|
|
19
|
+
p[1] !== g || p[2] !== _ || p[3] !== v ? (A = () => {
|
|
20
|
+
!g || !_ || O((e) => {
|
|
21
|
+
let n = _.map((e) => g[e]);
|
|
22
22
|
if (!n.some((t) => !e[t])) return e;
|
|
23
23
|
let r = { ...e };
|
|
24
24
|
return n.forEach((e, n) => {
|
|
25
25
|
if (!r[e]) {
|
|
26
|
-
let i =
|
|
26
|
+
let i = v[e];
|
|
27
27
|
r[e] = t(e, i, {
|
|
28
28
|
showPinIcon: n === 0,
|
|
29
29
|
hasDescription: !!i?.description
|
|
@@ -31,102 +31,102 @@ function d(d) {
|
|
|
31
31
|
}
|
|
32
32
|
}), r;
|
|
33
33
|
});
|
|
34
|
-
},
|
|
35
|
-
h,
|
|
34
|
+
}, j = [
|
|
36
35
|
g,
|
|
37
|
-
_
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
_,
|
|
37
|
+
v
|
|
38
|
+
], p[1] = g, p[2] = _, p[3] = v, p[4] = A, p[5] = j) : (A = p[4], j = p[5]), re(A, j);
|
|
39
|
+
let M;
|
|
40
|
+
p[6] === _ ? M = p[7] : (M = (e) => {
|
|
41
|
+
typeof e != "number" || e < 0 || !_ || e >= _.length || e === 0 && ae(f);
|
|
42
|
+
}, p[6] = _, p[7] = M);
|
|
43
|
+
let N = M, P;
|
|
44
|
+
p[8] === k ? P = p[9] : (P = k ? new Set([0]) : /* @__PURE__ */ new Set(), p[8] = k, p[9] = P);
|
|
45
|
+
let F = P, I;
|
|
46
|
+
p[10] !== g || p[11] !== _ || p[12] !== D || p[13] !== N || p[14] !== F || p[15] !== v || p[16] !== T ? (I = n(g, _, v, D, F, N, T), p[10] = g, p[11] = _, p[12] = D, p[13] = N, p[14] = F, p[15] = v, p[16] = T, p[17] = I) : I = p[17];
|
|
47
|
+
let L = I, [R, z] = o(null), B = y ? ee : i, V = y ? !1 : r, H;
|
|
48
|
+
p[18] !== b || p[19] !== R ? (H = (e) => {
|
|
49
49
|
let { rowData: t, rowIndex: n } = e;
|
|
50
|
-
return
|
|
51
|
-
"row-valid": !!
|
|
52
|
-
"row-invalid": !!
|
|
53
|
-
"row-unknown": !!
|
|
54
|
-
"row-selected":
|
|
50
|
+
return c({
|
|
51
|
+
"row-valid": !!b && t.__validationStatus === "valid",
|
|
52
|
+
"row-invalid": !!b && t.__validationStatus === "invalid",
|
|
53
|
+
"row-unknown": !!b && t.__validationStatus === "pending",
|
|
54
|
+
"row-selected": R === n
|
|
55
55
|
});
|
|
56
|
-
},
|
|
57
|
-
let
|
|
58
|
-
|
|
56
|
+
}, p[18] = b, p[19] = R, p[20] = H) : H = p[20];
|
|
57
|
+
let U = H, W;
|
|
58
|
+
p[21] !== L || p[22] !== x || p[23] !== w || p[24] !== R ? (W = (e) => {
|
|
59
59
|
let { rowData: t, rowIndex: n, columnId: r } = e;
|
|
60
60
|
return te({
|
|
61
61
|
rowData: t,
|
|
62
62
|
rowIndex: n,
|
|
63
63
|
columnId: r || "",
|
|
64
|
-
selectedRowIndex:
|
|
65
|
-
lastSelection:
|
|
66
|
-
colValues:
|
|
67
|
-
remoteSelections:
|
|
64
|
+
selectedRowIndex: R,
|
|
65
|
+
lastSelection: x,
|
|
66
|
+
colValues: L,
|
|
67
|
+
remoteSelections: w
|
|
68
68
|
});
|
|
69
|
-
},
|
|
70
|
-
let
|
|
71
|
-
|
|
69
|
+
}, p[21] = L, p[22] = x, p[23] = w, p[24] = R, p[25] = W) : W = p[25];
|
|
70
|
+
let G = W, oe = d, K;
|
|
71
|
+
p[26] === Symbol.for("react.memo_cache_sentinel") ? (K = (e) => {
|
|
72
72
|
let { cell: t } = e;
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
let e =
|
|
73
|
+
z(t ? t.row : null);
|
|
74
|
+
}, p[26] = K) : K = p[26];
|
|
75
|
+
let se = K, q = a(null), J = a(null), Y;
|
|
76
|
+
p[27] === m ? Y = p[28] : (Y = (e, t) => {
|
|
77
|
+
if (m.current) {
|
|
78
|
+
let e = m.current.activeCell;
|
|
79
79
|
e ? J.current = {
|
|
80
80
|
col: e.col,
|
|
81
81
|
row: e.row
|
|
82
82
|
} : J.current = null;
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
O((n) => ({
|
|
85
85
|
...n,
|
|
86
86
|
[e]: t
|
|
87
87
|
}));
|
|
88
|
-
},
|
|
88
|
+
}, p[27] = m, p[28] = Y);
|
|
89
89
|
let X = Y, Z;
|
|
90
|
-
|
|
90
|
+
p[29] !== L || p[30] !== X ? (Z = {
|
|
91
91
|
wrapperRef: q,
|
|
92
|
-
colValues:
|
|
92
|
+
colValues: L,
|
|
93
93
|
onColumnResize: X
|
|
94
|
-
},
|
|
94
|
+
}, p[29] = L, p[30] = X, p[31] = Z) : Z = p[31], ne(Z);
|
|
95
95
|
let Q;
|
|
96
|
-
|
|
96
|
+
p[32] === Symbol.for("react.memo_cache_sentinel") ? (Q = {
|
|
97
97
|
position: "relative",
|
|
98
98
|
width: "100%"
|
|
99
|
-
},
|
|
99
|
+
}, p[32] = Q) : Q = p[32];
|
|
100
100
|
let $;
|
|
101
|
-
return
|
|
101
|
+
return p[33] !== V || p[34] !== G || p[35] !== L || p[36] !== B || p[37] !== m || p[38] !== S || p[39] !== C || p[40] !== U || p[41] !== h ? ($ = /* @__PURE__ */ s("div", {
|
|
102
102
|
ref: q,
|
|
103
103
|
style: Q,
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
-
ref:
|
|
106
|
-
value:
|
|
107
|
-
columns:
|
|
104
|
+
children: /* @__PURE__ */ s(ie, {
|
|
105
|
+
ref: m,
|
|
106
|
+
value: h,
|
|
107
|
+
columns: L,
|
|
108
108
|
autoAddRow: !1,
|
|
109
109
|
disableSmartDelete: !0,
|
|
110
|
-
addRowsComponent:
|
|
111
|
-
contextMenuComponent:
|
|
110
|
+
addRowsComponent: V,
|
|
111
|
+
contextMenuComponent: B,
|
|
112
112
|
rowKey: e,
|
|
113
|
-
rowClassName:
|
|
114
|
-
cellClassName:
|
|
115
|
-
duplicateRow:
|
|
116
|
-
onChange:
|
|
117
|
-
onActiveCellChange:
|
|
118
|
-
onSelectionChange:
|
|
113
|
+
rowClassName: U,
|
|
114
|
+
cellClassName: G,
|
|
115
|
+
duplicateRow: oe,
|
|
116
|
+
onChange: S,
|
|
117
|
+
onActiveCellChange: se,
|
|
118
|
+
onSelectionChange: C
|
|
119
119
|
})
|
|
120
|
-
}),
|
|
120
|
+
}), p[33] = V, p[34] = G, p[35] = L, p[36] = B, p[37] = m, p[38] = S, p[39] = C, p[40] = U, p[41] = h, p[42] = $) : $ = p[42], $;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function d(e) {
|
|
123
123
|
let { rowData: t } = e;
|
|
124
124
|
return { ...t };
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function f(e) {
|
|
127
127
|
return !e;
|
|
128
128
|
}
|
|
129
129
|
//#endregion
|
|
130
|
-
export {
|
|
130
|
+
export { u as default };
|
|
131
131
|
|
|
132
132
|
//# sourceMappingURL=DataGrid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataGrid.js","names":["modelColsToGrid","SchemaPropertiesMap","classNames","JSONSchema7","useEffect","useMemo","useState","useRef","useCallback","DynamicDataSheetGrid","DataSheetGridRef","SelectionWithId","renderAddRowsComponent","renderRecordSetContextMenu","renderViewContextMenu","DataGridRow","Operation","GRID_ROW_REACT_KEY_PROPERTY","getCellClassName","useColumnResizeHandles","calculateDefaultColumnWidth","HeaderOptions","RemoteSelection","DataGridProps","gridRef","React","RefObject","columnNames","columnOrder","schemaPropertiesInfo","rowValues","entityIsView","jsonSchema","lastSelection","handleChange","newValue","operations","handleSelectionChange","opts","selection","remoteSelections","DataGrid","props","$","_c","t0","Symbol","for","columnWidths","setColumnWidths","isPinned","setIsPinned","t1","t2","prev","modelColumnNames","map","idx","needsUpdate","some","name","newWidths","forEach","columnName","arrayIndex","propertyInfo","headerOptions","showPinIcon","hasDescription","description","t3","columnIndex","length","_temp","handleTogglePin","t4","Set","pinnedColumnsSet","t5","colValues","selectedRowIndex","setSelectedRowIndex","contextMenuComponent","addRowsComponent","t6","t7","rowData","rowIndex","__validationStatus","rowClassNameCallback","t8","rowData_0","rowIndex_0","columnId","cellClassNameCallback","duplicateRowCallback","_temp2","t9","cell","row","handleActiveCellChange","wrapperRef","activeCellBeforeResizeRef","columnName_0","newWidth","current","activeCell","col","prev_1","handleColumnResize","t10","onColumnResize","t11","position","width","t12","rowData_1","prev_0"],"sources":["../../../src/components/DataGrid/DataGrid.tsx"],"sourcesContent":["import { modelColsToGrid } from '@/components/DataGrid/utils/modelColsToGrid'\nimport { SchemaPropertiesMap } from '@/utils/jsonschema/getSchemaPropertyInfo'\nimport classNames from 'classnames'\nimport { JSONSchema7 } from 'json-schema'\nimport { useEffect, useMemo, useState, useRef, useCallback } from 'react'\nimport {\n DynamicDataSheetGrid,\n DataSheetGridRef,\n} from '@sage-bionetworks/react-datasheet-grid'\nimport '@sage-bionetworks/react-datasheet-grid/dist/style.css'\nimport '../../style/components/_data-grid-extra.scss'\nimport { SelectionWithId } from '@sage-bionetworks/react-datasheet-grid'\nimport {\n renderAddRowsComponent,\n renderRecordSetContextMenu,\n renderViewContextMenu,\n} from './components/contextMenu'\nimport { DataGridRow, Operation } from './DataGridTypes'\nimport { GRID_ROW_REACT_KEY_PROPERTY } from './utils/DataGridUtils'\nimport { getCellClassName } from './utils/getCellClassName'\nimport { useColumnResizeHandles } from './hooks/useColumnResizeHandles'\nimport {\n calculateDefaultColumnWidth,\n HeaderOptions,\n} from './utils/calculateColumnWidth'\nimport type { RemoteSelection } from './hooks/useRemoteSelections'\n\ntype DataGridProps = {\n gridRef: React.RefObject<DataSheetGridRef | null>\n columnNames: string[]\n columnOrder: number[]\n schemaPropertiesInfo: SchemaPropertiesMap\n rowValues: DataGridRow[]\n entityIsView: boolean\n jsonSchema: JSONSchema7 | undefined\n lastSelection: SelectionWithId | null\n handleChange: (newValue: DataGridRow[], operations: Operation[]) => void\n handleSelectionChange: (opts: { selection: SelectionWithId | null }) => void\n remoteSelections?: readonly RemoteSelection[]\n}\n\n/**\n * Component that renders a data grid/spreadsheet using react-datasheet-grid.\n * @param props\n * @constructor\n */\nexport default function DataGrid(props: DataGridProps) {\n const {\n gridRef,\n rowValues,\n columnNames,\n columnOrder,\n schemaPropertiesInfo,\n entityIsView,\n jsonSchema,\n lastSelection,\n handleChange,\n handleSelectionChange,\n remoteSelections,\n } = props\n\n // Move columnWidths state into DataGrid\n const [columnWidths, setColumnWidths] = useState<Record<string, number>>({})\n\n // Pin state management for first column\n const [isPinned, setIsPinned] = useState(false)\n\n // Initialize column widths with defaults when columns first become available\n useEffect(() => {\n if (!columnNames || !columnOrder) {\n return\n }\n\n // Initialize widths for any columns that don't have them yet\n setColumnWidths(prev => {\n const modelColumnNames = columnOrder.map(idx => columnNames[idx])\n\n // Check if any columns need initialization\n const needsUpdate = modelColumnNames.some(name => !prev[name])\n\n if (!needsUpdate) {\n return prev // Return same reference to avoid triggering updates\n }\n\n const newWidths = { ...prev }\n modelColumnNames.forEach((columnName, arrayIndex) => {\n if (!newWidths[columnName]) {\n // Calculate default width using centralized function\n const propertyInfo = schemaPropertiesInfo[columnName]\n const headerOptions: HeaderOptions = {\n showPinIcon: arrayIndex === 0,\n hasDescription: !!propertyInfo?.description,\n }\n newWidths[columnName] = calculateDefaultColumnWidth(\n columnName,\n propertyInfo,\n headerOptions,\n )\n }\n })\n return newWidths\n })\n }, [columnNames, columnOrder, schemaPropertiesInfo])\n\n // Handler to toggle pin state for the first column only\n const handleTogglePin = useCallback(\n (columnIndex: number) => {\n // Validate columnIndex\n if (\n typeof columnIndex !== 'number' ||\n columnIndex < 0 ||\n !columnOrder ||\n columnIndex >= columnOrder.length\n ) {\n return\n }\n\n if (columnIndex !== 0) return // Only allow first column pinning\n\n setIsPinned(prev => !prev)\n },\n [columnOrder],\n )\n\n // Memoize the pinned columns set to prevent recalculation during scroll\n const pinnedColumnsSet = useMemo<Set<number>>(() => {\n return isPinned ? new Set([0]) : new Set()\n }, [isPinned])\n\n const colValues = useMemo(\n () =>\n modelColsToGrid(\n columnNames,\n columnOrder,\n schemaPropertiesInfo,\n columnWidths,\n pinnedColumnsSet,\n handleTogglePin,\n ),\n [\n columnNames,\n columnOrder,\n schemaPropertiesInfo,\n columnWidths,\n pinnedColumnsSet,\n handleTogglePin,\n ],\n )\n const [selectedRowIndex, setSelectedRowIndex] = useState<number | null>(null)\n\n // Memoize contextMenuComponent\n const contextMenuComponent = useMemo(\n () => (entityIsView ? renderViewContextMenu : renderRecordSetContextMenu),\n [entityIsView],\n )\n\n // Memoize addRowsComponent\n const addRowsComponent = useMemo(\n () => (entityIsView ? false : renderAddRowsComponent),\n [entityIsView],\n )\n\n // Wrap rowClassName in useCallback\n const rowClassNameCallback = useCallback(\n ({ rowData, rowIndex }: { rowData: DataGridRow; rowIndex: number }) =>\n classNames({\n 'row-valid': !!jsonSchema && rowData.__validationStatus === 'valid',\n 'row-invalid': !!jsonSchema && rowData.__validationStatus === 'invalid',\n 'row-unknown': !!jsonSchema && rowData.__validationStatus === 'pending',\n 'row-selected': selectedRowIndex === rowIndex,\n }),\n [jsonSchema, selectedRowIndex],\n )\n\n // Wrap cellClassName in useCallback\n const cellClassNameCallback = useCallback(\n ({\n rowData,\n rowIndex,\n columnId,\n }: {\n rowData: unknown\n rowIndex: number\n columnId?: string\n }) => {\n return getCellClassName({\n rowData: rowData as DataGridRow,\n rowIndex,\n columnId: columnId || '',\n selectedRowIndex,\n lastSelection,\n colValues,\n remoteSelections,\n })\n },\n [selectedRowIndex, lastSelection, colValues, remoteSelections],\n )\n\n // Wrap duplicateRow in useCallback\n const duplicateRowCallback = useCallback(\n ({ rowData }: { rowData: DataGridRow }) => ({\n ...rowData,\n }),\n [],\n )\n\n // Wrap onActiveCellChange in useCallback\n const handleActiveCellChange = useCallback(\n ({ cell }: { cell: { row: number; col: number } | null }) => {\n setSelectedRowIndex(cell ? cell.row : null)\n },\n [],\n )\n\n // Wrapper ref for the grid container\n const wrapperRef = useRef<HTMLDivElement | null>(null)\n\n // Store the active cell before column resize so we can restore it\n const activeCellBeforeResizeRef = useRef<{ col: number; row: number } | null>(\n null,\n )\n\n // Handle column resize callback\n const handleColumnResize = useCallback(\n (columnName: string, newWidth: number) => {\n // Save the current active cell before updating widths (which will trigger remount)\n if (gridRef.current) {\n const activeCell = gridRef.current.activeCell\n if (activeCell) {\n activeCellBeforeResizeRef.current = {\n col: activeCell.col,\n row: activeCell.row,\n }\n } else {\n // Explicitly clear the ref if there's no active cell\n activeCellBeforeResizeRef.current = null\n }\n }\n\n setColumnWidths(prev => ({\n ...prev,\n [columnName]: newWidth,\n }))\n },\n [gridRef],\n )\n\n // Setup column resize handles\n useColumnResizeHandles({\n wrapperRef,\n colValues,\n onColumnResize: handleColumnResize,\n })\n\n return (\n <div ref={wrapperRef} style={{ position: 'relative', width: '100%' }}>\n <DynamicDataSheetGrid\n ref={gridRef}\n value={rowValues}\n columns={colValues}\n autoAddRow={false}\n disableSmartDelete\n addRowsComponent={addRowsComponent}\n contextMenuComponent={contextMenuComponent}\n rowKey={GRID_ROW_REACT_KEY_PROPERTY}\n rowClassName={rowClassNameCallback}\n cellClassName={cellClassNameCallback}\n duplicateRow={duplicateRowCallback}\n onChange={handleChange}\n onActiveCellChange={handleActiveCellChange}\n onSelectionChange={handleSelectionChange}\n />\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA8CA,SAAeyC,EAAAC,GAAA;CAAA,IAAAC,IAAAC,GAAA,EAAA,GACb,EAAApB,YAAAM,cAAAH,gBAAAC,gBAAAC,yBAAAE,iBAAAC,eAAAC,kBAAAC,iBAAAG,0BAAAG,wBAYIE,GAAKG;CAAA,AAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,KAGgEF,IAAA,CAAC,GAACF,EAAA,KAAAE,KAAAA,IAAAF,EAAA;CAA3E,IAAA,CAAAK,GAAAC,KAAwC3C,EAAiCuC,CAAE,GAG3E,CAAAK,GAAAC,KAAgC7C,EAAS,EAAK,GAAC8C,GAAAC;CAG/CjD,AAH+CuC,EAAA,OAAAhB,KAAAgB,EAAA,OAAAf,KAAAe,EAAA,OAAAd,KAGrCuB,UAAA;EACJ,CAACzB,KAAD,CAAiBC,KAKrBqB,GAAgBK,MAAA;GACd,IAAAC,IAAyB3B,EAAW4B,KAAKC,MAAO9B,EAAY8B,EAAI;GAKhE,IAAI,CAFgBF,EAAgBI,MAAMC,MAAQ,CAACN,EAAKM,EAEnDF,GAAW,OACPJ;GAGT,IAAAO,IAAkB,EAAA,GAAKP,EAAK;GAe1B,OAdFC,EAAgBO,SAASC,GAAAC,MAAA;IACvB,IAAI,CAACH,EAAUE,IAAW;KAExB,IAAAE,IAAqBpC,EAAqBkC;KAK1CF,EAAUE,KAAc3C,EACtB2C,GACAE,GACAC;MAPmCC,aACtBH,MAAe;MAACI,gBACb,CAA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A;GACUkE,oBAAAA;GACD/D,mBAAAA;EAAqB,CAAA;CAEtC,CAAA,GAAAM,EAAA,MAAAwC,GAAAxC,EAAA,MAAAmD,GAAAnD,EAAA,MAAAoC,GAAApC,EAAA,MAAAuC,GAAAvC,EAAA,MAAAnB,GAAAmB,EAAA,MAAAT,GAAAS,EAAA,MAAAN,GAAAM,EAAA,MAAA8C,GAAA9C,EAAA,MAAAb,GAAAa,EAAA,MAAAwE,KAAAA,IAAAxE,EAAA,KAjBNwE;AAiBM;AAlOK,SAAAnB,GAAAnD,GAAA;CA0JV,IAAA,EAAAyC,SAAA8B,MAAAvE;CAAqC,OAAM,EAAA,GACvCyC,EACL;AAAC;AA5JU,SAAAb,GAAA4C,GAAA;CAAA,OAyEW,CAAC/D;AAAI"}
|
|
1
|
+
{"version":3,"file":"DataGrid.js","names":["modelColsToGrid","SchemaPropertiesMap","classNames","JSONSchema7","useEffect","useMemo","useState","useRef","useCallback","DynamicDataSheetGrid","DataSheetGridRef","SelectionWithId","renderAddRowsComponent","renderRecordSetContextMenu","renderViewContextMenu","DataGridRow","Operation","GRID_ROW_REACT_KEY_PROPERTY","getCellClassName","useColumnResizeHandles","calculateDefaultColumnWidth","HeaderOptions","RemoteSelection","DataGridProps","gridRef","React","RefObject","columnNames","columnOrder","schemaPropertiesInfo","rowValues","entityIsView","jsonSchema","lastSelection","handleChange","newValue","operations","handleSelectionChange","opts","selection","remoteSelections","upsertKey","DataGrid","props","$","_c","t0","Symbol","for","columnWidths","setColumnWidths","isPinned","setIsPinned","t1","t2","prev","modelColumnNames","map","idx","needsUpdate","some","name","newWidths","forEach","columnName","arrayIndex","propertyInfo","headerOptions","showPinIcon","hasDescription","description","t3","columnIndex","length","_temp","handleTogglePin","t4","Set","pinnedColumnsSet","t5","colValues","selectedRowIndex","setSelectedRowIndex","contextMenuComponent","addRowsComponent","t6","t7","rowData","rowIndex","__validationStatus","rowClassNameCallback","t8","rowData_0","rowIndex_0","columnId","cellClassNameCallback","duplicateRowCallback","_temp2","t9","cell","row","handleActiveCellChange","wrapperRef","activeCellBeforeResizeRef","columnName_0","newWidth","current","activeCell","col","prev_1","handleColumnResize","t10","onColumnResize","t11","position","width","t12","rowData_1","prev_0"],"sources":["../../../src/components/DataGrid/DataGrid.tsx"],"sourcesContent":["import { modelColsToGrid } from '@/components/DataGrid/utils/modelColsToGrid'\nimport { SchemaPropertiesMap } from '@/utils/jsonschema/getSchemaPropertyInfo'\nimport classNames from 'classnames'\nimport { JSONSchema7 } from 'json-schema'\nimport { useEffect, useMemo, useState, useRef, useCallback } from 'react'\nimport {\n DynamicDataSheetGrid,\n DataSheetGridRef,\n} from '@sage-bionetworks/react-datasheet-grid'\nimport '@sage-bionetworks/react-datasheet-grid/dist/style.css'\nimport '../../style/components/_data-grid-extra.scss'\nimport { SelectionWithId } from '@sage-bionetworks/react-datasheet-grid'\nimport {\n renderAddRowsComponent,\n renderRecordSetContextMenu,\n renderViewContextMenu,\n} from './components/contextMenu'\nimport { DataGridRow, Operation } from './DataGridTypes'\nimport { GRID_ROW_REACT_KEY_PROPERTY } from './utils/DataGridUtils'\nimport { getCellClassName } from './utils/getCellClassName'\nimport { useColumnResizeHandles } from './hooks/useColumnResizeHandles'\nimport {\n calculateDefaultColumnWidth,\n HeaderOptions,\n} from './utils/calculateColumnWidth'\nimport type { RemoteSelection } from './hooks/useRemoteSelections'\n\ntype DataGridProps = {\n gridRef: React.RefObject<DataSheetGridRef | null>\n columnNames: string[]\n columnOrder: number[]\n schemaPropertiesInfo: SchemaPropertiesMap\n rowValues: DataGridRow[]\n entityIsView: boolean\n jsonSchema: JSONSchema7 | undefined\n lastSelection: SelectionWithId | null\n handleChange: (newValue: DataGridRow[], operations: Operation[]) => void\n handleSelectionChange: (opts: { selection: SelectionWithId | null }) => void\n remoteSelections?: readonly RemoteSelection[]\n upsertKey?: string[]\n}\n\n/**\n * Component that renders a data grid/spreadsheet using react-datasheet-grid.\n * @param props\n * @constructor\n */\nexport default function DataGrid(props: DataGridProps) {\n const {\n gridRef,\n rowValues,\n columnNames,\n columnOrder,\n schemaPropertiesInfo,\n entityIsView,\n jsonSchema,\n lastSelection,\n handleChange,\n handleSelectionChange,\n remoteSelections,\n upsertKey,\n } = props\n\n // Move columnWidths state into DataGrid\n const [columnWidths, setColumnWidths] = useState<Record<string, number>>({})\n\n // Pin state management for first column\n const [isPinned, setIsPinned] = useState(false)\n\n // Initialize column widths with defaults when columns first become available\n useEffect(() => {\n if (!columnNames || !columnOrder) {\n return\n }\n\n // Initialize widths for any columns that don't have them yet\n setColumnWidths(prev => {\n const modelColumnNames = columnOrder.map(idx => columnNames[idx])\n\n // Check if any columns need initialization\n const needsUpdate = modelColumnNames.some(name => !prev[name])\n\n if (!needsUpdate) {\n return prev // Return same reference to avoid triggering updates\n }\n\n const newWidths = { ...prev }\n modelColumnNames.forEach((columnName, arrayIndex) => {\n if (!newWidths[columnName]) {\n // Calculate default width using centralized function\n const propertyInfo = schemaPropertiesInfo[columnName]\n const headerOptions: HeaderOptions = {\n showPinIcon: arrayIndex === 0,\n hasDescription: !!propertyInfo?.description,\n }\n newWidths[columnName] = calculateDefaultColumnWidth(\n columnName,\n propertyInfo,\n headerOptions,\n )\n }\n })\n return newWidths\n })\n }, [columnNames, columnOrder, schemaPropertiesInfo])\n\n // Handler to toggle pin state for the first column only\n const handleTogglePin = useCallback(\n (columnIndex: number) => {\n // Validate columnIndex\n if (\n typeof columnIndex !== 'number' ||\n columnIndex < 0 ||\n !columnOrder ||\n columnIndex >= columnOrder.length\n ) {\n return\n }\n\n if (columnIndex !== 0) return // Only allow first column pinning\n\n setIsPinned(prev => !prev)\n },\n [columnOrder],\n )\n\n // Memoize the pinned columns set to prevent recalculation during scroll\n const pinnedColumnsSet = useMemo<Set<number>>(() => {\n return isPinned ? new Set([0]) : new Set()\n }, [isPinned])\n\n const colValues = useMemo(\n () =>\n modelColsToGrid(\n columnNames,\n columnOrder,\n schemaPropertiesInfo,\n columnWidths,\n pinnedColumnsSet,\n handleTogglePin,\n upsertKey,\n ),\n [\n columnNames,\n columnOrder,\n schemaPropertiesInfo,\n columnWidths,\n pinnedColumnsSet,\n handleTogglePin,\n upsertKey,\n ],\n )\n const [selectedRowIndex, setSelectedRowIndex] = useState<number | null>(null)\n\n // Memoize contextMenuComponent\n const contextMenuComponent = useMemo(\n () => (entityIsView ? renderViewContextMenu : renderRecordSetContextMenu),\n [entityIsView],\n )\n\n // Memoize addRowsComponent\n const addRowsComponent = useMemo(\n () => (entityIsView ? false : renderAddRowsComponent),\n [entityIsView],\n )\n\n // Wrap rowClassName in useCallback\n const rowClassNameCallback = useCallback(\n ({ rowData, rowIndex }: { rowData: DataGridRow; rowIndex: number }) =>\n classNames({\n 'row-valid': !!jsonSchema && rowData.__validationStatus === 'valid',\n 'row-invalid': !!jsonSchema && rowData.__validationStatus === 'invalid',\n 'row-unknown': !!jsonSchema && rowData.__validationStatus === 'pending',\n 'row-selected': selectedRowIndex === rowIndex,\n }),\n [jsonSchema, selectedRowIndex],\n )\n\n // Wrap cellClassName in useCallback\n const cellClassNameCallback = useCallback(\n ({\n rowData,\n rowIndex,\n columnId,\n }: {\n rowData: unknown\n rowIndex: number\n columnId?: string\n }) => {\n return getCellClassName({\n rowData: rowData as DataGridRow,\n rowIndex,\n columnId: columnId || '',\n selectedRowIndex,\n lastSelection,\n colValues,\n remoteSelections,\n })\n },\n [selectedRowIndex, lastSelection, colValues, remoteSelections],\n )\n\n // Wrap duplicateRow in useCallback\n const duplicateRowCallback = useCallback(\n ({ rowData }: { rowData: DataGridRow }) => ({\n ...rowData,\n }),\n [],\n )\n\n // Wrap onActiveCellChange in useCallback\n const handleActiveCellChange = useCallback(\n ({ cell }: { cell: { row: number; col: number } | null }) => {\n setSelectedRowIndex(cell ? cell.row : null)\n },\n [],\n )\n\n // Wrapper ref for the grid container\n const wrapperRef = useRef<HTMLDivElement | null>(null)\n\n // Store the active cell before column resize so we can restore it\n const activeCellBeforeResizeRef = useRef<{ col: number; row: number } | null>(\n null,\n )\n\n // Handle column resize callback\n const handleColumnResize = useCallback(\n (columnName: string, newWidth: number) => {\n // Save the current active cell before updating widths (which will trigger remount)\n if (gridRef.current) {\n const activeCell = gridRef.current.activeCell\n if (activeCell) {\n activeCellBeforeResizeRef.current = {\n col: activeCell.col,\n row: activeCell.row,\n }\n } else {\n // Explicitly clear the ref if there's no active cell\n activeCellBeforeResizeRef.current = null\n }\n }\n\n setColumnWidths(prev => ({\n ...prev,\n [columnName]: newWidth,\n }))\n },\n [gridRef],\n )\n\n // Setup column resize handles\n useColumnResizeHandles({\n wrapperRef,\n colValues,\n onColumnResize: handleColumnResize,\n })\n\n return (\n <div ref={wrapperRef} style={{ position: 'relative', width: '100%' }}>\n <DynamicDataSheetGrid\n ref={gridRef}\n value={rowValues}\n columns={colValues}\n autoAddRow={false}\n disableSmartDelete\n addRowsComponent={addRowsComponent}\n contextMenuComponent={contextMenuComponent}\n rowKey={GRID_ROW_REACT_KEY_PROPERTY}\n rowClassName={rowClassNameCallback}\n cellClassName={cellClassNameCallback}\n duplicateRow={duplicateRowCallback}\n onChange={handleChange}\n onActiveCellChange={handleActiveCellChange}\n onSelectionChange={handleSelectionChange}\n />\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA+CA,SAAe0C,EAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,EAAA,GACb,EAAArB,YAAAM,cAAAH,gBAAAC,gBAAAC,yBAAAE,iBAAAC,eAAAC,kBAAAC,iBAAAG,0BAAAG,qBAAAC,iBAaIE,GAAKG;CAAA,AAAAF,EAAA,OAAAG,OAAAC,IAAA,2BAAA,KAGgEF,IAAA,CAAC,GAACF,EAAA,KAAAE,KAAAA,IAAAF,EAAA;CAA3E,IAAA,CAAAK,GAAAC,KAAwC5C,EAAiCwC,CAAE,GAG3E,CAAAK,GAAAC,MAAgC9C,EAAS,EAAK,GAAC+C,GAAAC;CAG/ClD,AAH+CwC,EAAA,OAAAjB,KAAAiB,EAAA,OAAAhB,KAAAg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,gBAAgB,GAAG;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACpD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD,CAAA;
|
|
1
|
+
{"version":3,"file":"SynapseGrid.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/SynapseGrid.tsx"],"names":[],"mappings":"AAcA,OAAO,EACL,iBAAiB,EAElB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EACL,GAAG,EAOJ,MAAM,OAAO,CAAA;AAsBd,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACpD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD,CAAA;AAqfD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAM3C;AAED,eAAe,WAAW,CAAA"}
|