synapse-react-client 3.1.37 → 3.1.38-SWC-6490

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/index.mjs CHANGED
@@ -26093,6 +26093,7 @@ __export(SynapseClient_exports, {
26093
26093
  getSchema: () => getSchema,
26094
26094
  getSchemaBinding: () => getSchemaBinding,
26095
26095
  getSchemaValidationResults: () => getSchemaValidationResults,
26096
+ getSubjects: () => getSubjects,
26096
26097
  getSubmissionById: () => getSubmissionById,
26097
26098
  getSubmissionTeams: () => getSubmissionTeams,
26098
26099
  getSubscribers: () => getSubscribers,
@@ -27304,7 +27305,25 @@ __export(functions_exports, {
27304
27305
  // src/utils/functions/queryUtils.ts
27305
27306
  import { cloneDeep } from "lodash-es";
27306
27307
 
27307
- // ../synapse-types/src/AccessToken/ScopeDescriptions.ts
27308
+ // ../synapse-types/dist/index.mjs
27309
+ var ApprovalState = /* @__PURE__ */ ((ApprovalState2) => {
27310
+ ApprovalState2["APPROVED"] = "APPROVED";
27311
+ ApprovalState2["REVOKED"] = "REVOKED";
27312
+ return ApprovalState2;
27313
+ })(ApprovalState || {});
27314
+ var AccessType = /* @__PURE__ */ ((AccessType2) => {
27315
+ AccessType2["GAIN_ACCESS"] = "GAIN_ACCESS";
27316
+ AccessType2["RENEW_ACCESS"] = "RENEW_ACCESS";
27317
+ AccessType2["REVOKE_ACCESS"] = "REVOKE_ACCESS";
27318
+ return AccessType2;
27319
+ })(AccessType || {});
27320
+ var SubmissionState = /* @__PURE__ */ ((SubmissionState2) => {
27321
+ SubmissionState2["SUBMITTED"] = "SUBMITTED";
27322
+ SubmissionState2["APPROVED"] = "APPROVED";
27323
+ SubmissionState2["REJECTED"] = "REJECTED";
27324
+ SubmissionState2["CANCELLED"] = "CANCELLED";
27325
+ return SubmissionState2;
27326
+ })(SubmissionState || {});
27308
27327
  var scopeDescriptions = {
27309
27328
  openid: {
27310
27329
  displayName: "OpenID",
@@ -27331,34 +27350,33 @@ var scopeDescriptions = {
27331
27350
  description: "Permission to access the resources authorized here when you are not logged in, until you explicitly revoke access"
27332
27351
  }
27333
27352
  };
27334
-
27335
- // ../synapse-types/src/CertificationQuiz/Questions.ts
27336
27353
  var MULTICHOICE_RESPONSE_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.quiz.MultichoiceResponse";
27337
-
27338
- // ../synapse-types/src/docker/DockerRepository.ts
27354
+ var DiscussionThreadOrder = /* @__PURE__ */ ((DiscussionThreadOrder2) => {
27355
+ DiscussionThreadOrder2["NUMBER_OF_REPLIES"] = "NUMBER_OF_REPLIES";
27356
+ DiscussionThreadOrder2["NUMBER_OF_VIEWS"] = "NUMBER_OF_VIEWS";
27357
+ DiscussionThreadOrder2["PINNED_AND_LAST_ACTIVITY"] = "PINNED_AND_LAST_ACTIVITY";
27358
+ DiscussionThreadOrder2["THREAD_TITLE"] = "THREAD_TITLE";
27359
+ return DiscussionThreadOrder2;
27360
+ })(DiscussionThreadOrder || {});
27361
+ var DiscussionReplyOrder = /* @__PURE__ */ ((DiscussionReplyOrder2) => {
27362
+ DiscussionReplyOrder2["CREATED_ON"] = "CREATED_ON";
27363
+ return DiscussionReplyOrder2;
27364
+ })(DiscussionReplyOrder || {});
27365
+ var DiscussionFilter = /* @__PURE__ */ ((DiscussionFilter22) => {
27366
+ DiscussionFilter22["NO_FILTER"] = "NO_FILTER";
27367
+ DiscussionFilter22["DELETED_ONLY"] = "DELETED_ONLY";
27368
+ DiscussionFilter22["EXCLUDE_DELETED"] = "EXCLUDE_DELETED";
27369
+ return DiscussionFilter22;
27370
+ })(DiscussionFilter || {});
27339
27371
  var DOCKER_REPOSITORY_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.docker.DockerRepository";
27340
-
27341
- // ../synapse-types/src/Entity/FileEntity.ts
27342
27372
  var FILE_ENTITY_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.FileEntity";
27343
-
27344
- // ../synapse-types/src/Table/MaterializedView.ts
27345
27373
  var MATERIALIZED_VIEW_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.MaterializedView";
27346
-
27347
- // ../synapse-types/src/Table/EntityView.ts
27348
27374
  var ENTITY_VIEW_TYPE_MASK_FILE = 1;
27349
27375
  var ENTITY_VIEW_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.EntityView";
27350
-
27351
- // ../synapse-types/src/Table/SubmissionView.ts
27352
27376
  var SUBMISSION_VIEW_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.SubmissionView";
27353
-
27354
- // ../synapse-types/src/Table/Dataset.ts
27355
27377
  var DATASET_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.Dataset";
27356
27378
  var DATASET_COLLECTION_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.DatasetCollection";
27357
-
27358
- // ../synapse-types/src/Table/VirtualTable.ts
27359
27379
  var VIRTUAL_TABLE_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.VirtualTable";
27360
-
27361
- // ../synapse-types/src/Table/ConcreteType.ts
27362
27380
  var TABLE_ENTITY_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.TableEntity";
27363
27381
  var VIEW_CONCRETE_TYPE_VALUES = [
27364
27382
  ENTITY_VIEW_CONCRETE_TYPE_VALUE,
@@ -27372,23 +27390,13 @@ var TABLE_CONCRETE_TYPE_VALUES = [
27372
27390
  MATERIALIZED_VIEW_CONCRETE_TYPE_VALUE,
27373
27391
  VIRTUAL_TABLE_CONCRETE_TYPE_VALUE
27374
27392
  ];
27375
-
27376
- // ../synapse-types/src/Entity/Entity.ts
27377
27393
  var VERSIONABLE_ENTITY_CONCRETE_TYPE_VALUES = [
27378
27394
  FILE_ENTITY_CONCRETE_TYPE_VALUE,
27379
27395
  ...TABLE_CONCRETE_TYPE_VALUES
27380
27396
  ];
27381
-
27382
- // ../synapse-types/src/Entity/Folder.ts
27383
27397
  var FOLDER_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.Folder";
27384
-
27385
- // ../synapse-types/src/Entity/Link.ts
27386
27398
  var LINK_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.Link";
27387
-
27388
- // ../synapse-types/src/Entity/Project.ts
27389
27399
  var PROJECT_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.Project";
27390
-
27391
- // ../synapse-types/src/EntityBundle.ts
27392
27400
  var ALL_ENTITY_BUNDLE_FIELDS = {
27393
27401
  includeEntity: true,
27394
27402
  includeEntityPath: true,
@@ -27405,40 +27413,67 @@ var ALL_ENTITY_BUNDLE_FIELDS = {
27405
27413
  includeThreadCount: true,
27406
27414
  includeRestrictionInformation: true
27407
27415
  };
27408
-
27409
- // ../synapse-types/src/EntityType.ts
27410
- var EntityType = /* @__PURE__ */ ((EntityType3) => {
27411
- EntityType3["PROJECT"] = "project";
27412
- EntityType3["FOLDER"] = "folder";
27413
- EntityType3["FILE"] = "file";
27414
- EntityType3["TABLE"] = "table";
27415
- EntityType3["LINK"] = "link";
27416
- EntityType3["ENTITY_VIEW"] = "entityview";
27417
- EntityType3["DOCKER_REPO"] = "dockerrepo";
27418
- EntityType3["SUBMISSION_VIEW"] = "submissionview";
27419
- EntityType3["DATASET"] = "dataset";
27420
- EntityType3["DATASET_COLLECTION"] = "datasetcollection";
27421
- EntityType3["MATERIALIZED_VIEW"] = "materializedview";
27422
- EntityType3["VIRTUAL_TABLE"] = "virtualtable";
27423
- return EntityType3;
27416
+ var SortBy = /* @__PURE__ */ ((SortBy2) => {
27417
+ SortBy2["NAME"] = "NAME";
27418
+ SortBy2["CREATED_ON"] = "CREATED_ON";
27419
+ SortBy2["MODIFIED_ON"] = "MODIFIED_ON";
27420
+ return SortBy2;
27421
+ })(SortBy || {});
27422
+ var Direction = /* @__PURE__ */ ((Direction2) => {
27423
+ Direction2["ASC"] = "ASC";
27424
+ Direction2["DESC"] = "DESC";
27425
+ return Direction2;
27426
+ })(Direction || {});
27427
+ var EntityType = /* @__PURE__ */ ((EntityType22) => {
27428
+ EntityType22["PROJECT"] = "project";
27429
+ EntityType22["FOLDER"] = "folder";
27430
+ EntityType22["FILE"] = "file";
27431
+ EntityType22["TABLE"] = "table";
27432
+ EntityType22["LINK"] = "link";
27433
+ EntityType22["ENTITY_VIEW"] = "entityview";
27434
+ EntityType22["DOCKER_REPO"] = "dockerrepo";
27435
+ EntityType22["SUBMISSION_VIEW"] = "submissionview";
27436
+ EntityType22["DATASET"] = "dataset";
27437
+ EntityType22["DATASET_COLLECTION"] = "datasetcollection";
27438
+ EntityType22["MATERIALIZED_VIEW"] = "materializedview";
27439
+ EntityType22["VIRTUAL_TABLE"] = "virtualtable";
27440
+ return EntityType22;
27424
27441
  })(EntityType || {});
27425
-
27426
- // ../synapse-types/src/File/S3FileHandle.ts
27442
+ var ErrorResponseCode = /* @__PURE__ */ ((ErrorResponseCode2) => {
27443
+ ErrorResponseCode2["PASSWORD_RESET_VIA_EMAIL_REQUIRED"] = "PASSWORD_RESET_VIA_EMAIL_REQUIRED";
27444
+ ErrorResponseCode2["USER_CERTIFICATION_REQUIRED"] = "USER_CERTIFICATION_REQUIRED";
27445
+ ErrorResponseCode2["INVALID_TABLE_QUERY_FACET_COLUMN_REQUEST"] = "INVALID_TABLE_QUERY_FACET_COLUMN_REQUEST";
27446
+ ErrorResponseCode2["OAUTH_CLIENT_NOT_VERIFIED"] = "OAUTH_CLIENT_NOT_VERIFIED";
27447
+ ErrorResponseCode2["TWO_FA_REQUIRED"] = "TWO_FA_REQUIRED";
27448
+ return ErrorResponseCode2;
27449
+ })(ErrorResponseCode || {});
27427
27450
  var S3_FILE_HANDLE_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.file.S3FileHandle";
27428
-
27429
- // ../synapse-types/src/File/GoogleCloudFileHandle.ts
27430
27451
  var GOOGLE_CLOUD_FILE_HANDLE_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.file.GoogleCloudFileHandle";
27431
-
27432
- // ../synapse-types/src/File/ExternalFileHandle.ts
27433
27452
  var EXTERNAL_FILE_HANDLE_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.file.ExternalFileHandle";
27434
-
27435
- // ../synapse-types/src/File/ExternalObjectStoreFileHandle.ts
27436
27453
  var EXTERNAL_OBJECT_STORE_FILE_HANDLE_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.file.ExternalObjectStoreFileHandle";
27437
-
27438
- // ../synapse-types/src/File/ProxyFileHandle.ts
27439
27454
  var PROXY_FILE_HANDLE_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.file.ProxyFileHandle";
27440
-
27441
- // ../synapse-types/src/MarkdownCommands.ts
27455
+ var FileHandleAssociateType = /* @__PURE__ */ ((FileHandleAssociateType2) => {
27456
+ FileHandleAssociateType2["FileEntity"] = "FileEntity";
27457
+ FileHandleAssociateType2["TableEntity"] = "TableEntity";
27458
+ FileHandleAssociateType2["WikiAttachment"] = "WikiAttachment";
27459
+ FileHandleAssociateType2["WikiMarkdown"] = "WikiMarkdown";
27460
+ FileHandleAssociateType2["UserProfileAttachment"] = "UserProfileAttachment";
27461
+ FileHandleAssociateType2["MessageAttachment"] = "MessageAttachment";
27462
+ FileHandleAssociateType2["TeamAttachment"] = "TeamAttachment";
27463
+ FileHandleAssociateType2["SubmissionAttachment"] = "SubmissionAttachment";
27464
+ FileHandleAssociateType2["VerificationSubmission"] = "VerificationSubmission";
27465
+ FileHandleAssociateType2["AccessRequirementAttachment"] = "AccessRequirementAttachment";
27466
+ FileHandleAssociateType2["DataAccessRequestAttachment"] = "DataAccessRequestAttachment";
27467
+ FileHandleAssociateType2["DataAccessSubmissionAttachment"] = "DataAccessSubmissionAttachment";
27468
+ return FileHandleAssociateType2;
27469
+ })(FileHandleAssociateType || {});
27470
+ var StatusEnum = /* @__PURE__ */ ((StatusEnum22) => {
27471
+ StatusEnum22["WAITING_FOR_SUBMISSION"] = "WAITING_FOR_SUBMISSION";
27472
+ StatusEnum22["SUBMITTED_WAITING_FOR_REVIEW"] = "SUBMITTED_WAITING_FOR_REVIEW";
27473
+ StatusEnum22["ACCEPTED"] = "ACCEPTED";
27474
+ StatusEnum22["REJECTED"] = "REJECTED";
27475
+ return StatusEnum22;
27476
+ })(StatusEnum || {});
27442
27477
  var commandList = [
27443
27478
  "title",
27444
27479
  "bold",
@@ -27493,8 +27528,6 @@ var MARKDOWN_COMMANDS_DATA = {
27493
27528
  closeSyntax: "](image-url)"
27494
27529
  }
27495
27530
  };
27496
-
27497
- // ../synapse-types/src/ObjectType.ts
27498
27531
  var ObjectType = /* @__PURE__ */ ((ObjectType2) => {
27499
27532
  ObjectType2["ENTITY"] = "ENTITY";
27500
27533
  ObjectType2["ENTITY_CONTAINER"] = "ENTITY_CONTAINER";
@@ -27528,38 +27561,97 @@ var ObjectType = /* @__PURE__ */ ((ObjectType2) => {
27528
27561
  ObjectType2["MEMBERSHIP_INVITATION"] = "MEMBERSHIP_INVITATION";
27529
27562
  return ObjectType2;
27530
27563
  })(ObjectType || {});
27531
-
27532
- // ../synapse-types/src/Provenance/Provenance.ts
27564
+ var AliasType = /* @__PURE__ */ ((AliasType2) => {
27565
+ AliasType2["USER_NAME"] = "USER_NAME";
27566
+ AliasType2["TEAM_NAME"] = "TEAM_NAME";
27567
+ AliasType2["USER_EMAIL"] = "USER_EMAIL";
27568
+ AliasType2["USER_OPEN_ID"] = "USER_OPEN_ID";
27569
+ AliasType2["USER_ORCID"] = "USER_ORCID";
27570
+ return AliasType2;
27571
+ })(AliasType || {});
27533
27572
  var USED_ENTITY_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.provenance.UsedEntity";
27534
-
27535
- // ../synapse-types/src/SignedToken/SignedTokenConcreteType.ts
27573
+ var RestrictableObjectType = /* @__PURE__ */ ((RestrictableObjectType2) => {
27574
+ RestrictableObjectType2["ENTITY"] = "ENTITY";
27575
+ RestrictableObjectType2["EVALUATION"] = "EVALUATION";
27576
+ RestrictableObjectType2["TEAM"] = "TEAM";
27577
+ return RestrictableObjectType2;
27578
+ })(RestrictableObjectType || {});
27579
+ var RestrictionLevel = /* @__PURE__ */ ((RestrictionLevel2) => {
27580
+ RestrictionLevel2["OPEN"] = "OPEN";
27581
+ RestrictionLevel2["RESTRICTED_BY_TERMS_OF_USE"] = "RESTRICTED_BY_TERMS_OF_USE";
27582
+ RestrictionLevel2["CONTROLLED_BY_ACT"] = "CONTROLLED_BY_ACT";
27583
+ return RestrictionLevel2;
27584
+ })(RestrictionLevel || {});
27536
27585
  var MEMBERSHIP_INVITATION_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.MembershipInvtnSignedToken";
27537
27586
  var JOIN_TEAM_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.JoinTeamSignedToken";
27538
27587
  var INVITEE_VERIFICATION_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.InviteeVerificationSignedToken";
27539
-
27540
- // ../synapse-types/src/util/IsType.ts
27541
27588
  function isTypeViaConcreteTypeFactory(...expectedConcreteTypes) {
27542
27589
  return (object) => !!(object && typeof object === "object" && "concreteType" in object && expectedConcreteTypes.includes(object["concreteType"]));
27543
27590
  }
27544
-
27545
- // ../synapse-types/src/SignedToken/JoinTeamSignedToken.ts
27546
27591
  var isJoinTeamSignedToken = isTypeViaConcreteTypeFactory(
27547
27592
  JOIN_TEAM_CONCRETE_TYPE_VALUE
27548
27593
  );
27549
-
27550
- // ../synapse-types/src/SignedToken/MembershipInvtnSignedToken.ts
27551
27594
  var isMembershipInvtnSignedToken = isTypeViaConcreteTypeFactory(
27552
27595
  MEMBERSHIP_INVITATION_CONCRETE_TYPE_VALUE
27553
27596
  );
27554
-
27555
- // ../synapse-types/src/Table/FacetColumnRequest.ts
27597
+ var SubscriptionObjectType = /* @__PURE__ */ ((SubscriptionObjectType22) => {
27598
+ SubscriptionObjectType22["FORUM"] = "FORUM";
27599
+ SubscriptionObjectType22["THREAD"] = "THREAD";
27600
+ SubscriptionObjectType22["DATA_ACCESS_SUBMISSION"] = "DATA_ACCESS_SUBMISSION";
27601
+ SubscriptionObjectType22["DATA_ACCESS_SUBMISSION_STATUS"] = "DATA_ACCESS_SUBMISSION_STATUS";
27602
+ return SubscriptionObjectType22;
27603
+ })(SubscriptionObjectType || {});
27604
+ var SortByType = /* @__PURE__ */ ((SortByType2) => {
27605
+ SortByType2["SUBSCRIPTION_ID"] = "SUBSCRIPTION_ID";
27606
+ SortByType2["SUBSCRIBER_ID"] = "SUBSCRIBER_ID";
27607
+ SortByType2["OBJECT_ID"] = "OBJECT_ID";
27608
+ SortByType2["OBJECT_TYPE"] = "OBJECT_TYPE";
27609
+ SortByType2["CREATED_ON"] = "CREATED_ON";
27610
+ return SortByType2;
27611
+ })(SortByType || {});
27612
+ var ColumnTypeEnum = /* @__PURE__ */ ((ColumnTypeEnum2) => {
27613
+ ColumnTypeEnum2["STRING"] = "STRING";
27614
+ ColumnTypeEnum2["DOUBLE"] = "DOUBLE";
27615
+ ColumnTypeEnum2["BOOLEAN"] = "BOOLEAN";
27616
+ ColumnTypeEnum2["INTEGER"] = "INTEGER";
27617
+ ColumnTypeEnum2["DATE"] = "DATE";
27618
+ ColumnTypeEnum2["FILEHANDLEID"] = "FILEHANDLEID";
27619
+ ColumnTypeEnum2["ENTITYID"] = "ENTITYID";
27620
+ ColumnTypeEnum2["LINK"] = "LINK";
27621
+ ColumnTypeEnum2["MEDIUMTEXT"] = "MEDIUMTEXT";
27622
+ ColumnTypeEnum2["LARGETEXT"] = "LARGETEXT";
27623
+ ColumnTypeEnum2["USERID"] = "USERID";
27624
+ ColumnTypeEnum2["STRING_LIST"] = "STRING_LIST";
27625
+ ColumnTypeEnum2["INTEGER_LIST"] = "INTEGER_LIST";
27626
+ ColumnTypeEnum2["BOOLEAN_LIST"] = "BOOLEAN_LIST";
27627
+ ColumnTypeEnum2["DATE_LIST"] = "DATE_LIST";
27628
+ ColumnTypeEnum2["USERID_LIST"] = "USERID_LIST";
27629
+ ColumnTypeEnum2["ENTITYID_LIST"] = "ENTITYID_LIST";
27630
+ ColumnTypeEnum2["EVALUATIONID"] = "EVALUATIONID";
27631
+ return ColumnTypeEnum2;
27632
+ })(ColumnTypeEnum || {});
27556
27633
  var FACET_COLUMN_VALUES_REQUEST_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.FacetColumnValuesRequest";
27557
27634
  var FACET_COLUMN_RANGE_REQUEST_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.FacetColumnRangeRequest";
27558
-
27559
- // ../synapse-types/src/Table/QueryFilter.ts
27635
+ var ColumnSingleValueFilterOperator = /* @__PURE__ */ ((ColumnSingleValueFilterOperator2) => {
27636
+ ColumnSingleValueFilterOperator2["LIKE"] = "LIKE";
27637
+ ColumnSingleValueFilterOperator2["EQUAL"] = "EQUAL";
27638
+ ColumnSingleValueFilterOperator2["IN"] = "IN";
27639
+ return ColumnSingleValueFilterOperator2;
27640
+ })(ColumnSingleValueFilterOperator || {});
27641
+ var ColumnMultiValueFunction = /* @__PURE__ */ ((ColumnMultiValueFunction2) => {
27642
+ ColumnMultiValueFunction2["HAS"] = "HAS";
27643
+ ColumnMultiValueFunction2["HAS_LIKE"] = "HAS_LIKE";
27644
+ return ColumnMultiValueFunction2;
27645
+ })(ColumnMultiValueFunction || {});
27560
27646
  var COLUMN_SINGLE_VALUE_QUERY_FILTER_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter";
27561
27647
  var COLUMN_MULTI_VALUE_FUNCTION_QUERY_FILTER_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.ColumnMultiValueFunctionQueryFilter";
27562
27648
  var TEXT_MATCHES_QUERY_FILTER_CONCRETE_TYPE_VALUE = "org.sagebionetworks.repo.model.table.TextMatchesQueryFilter";
27649
+ var TYPE_FILTER = /* @__PURE__ */ ((TYPE_FILTER2) => {
27650
+ TYPE_FILTER2["USERS_ONLY"] = "USERS_ONLY";
27651
+ TYPE_FILTER2["TEAMS_ONLY"] = "TEAMS_ONLY";
27652
+ TYPE_FILTER2["ALL"] = "ALL";
27653
+ return TYPE_FILTER2;
27654
+ })(TYPE_FILTER || {});
27563
27655
 
27564
27656
  // src/utils/types/IsType.ts
27565
27657
  function isTypeViaConcreteTypeFactory2(...expectedConcreteTypes) {
@@ -27711,7 +27803,7 @@ function removePrefixIfSynId(value) {
27711
27803
  var getIgnoredQueryFilterSearchParamKey = (key, namespace) => {
27712
27804
  return `__${namespace ?? ""}_${key}`;
27713
27805
  };
27714
- var getAdditionalFilters = (entityId, searchParams, operator = "LIKE" /* LIKE */) => {
27806
+ var getAdditionalFilters = (entityId, searchParams, operator = ColumnSingleValueFilterOperator.LIKE) => {
27715
27807
  const localStorageQueryFiltersString = localStorage.getItem(
27716
27808
  QUERY_FILTERS_LOCAL_STORAGE_KEY(entityId)
27717
27809
  );
@@ -27730,7 +27822,7 @@ var getAdditionalFilters = (entityId, searchParams, operator = "LIKE" /* LIKE */
27730
27822
  additionalFilters = additionalFilters.concat(
27731
27823
  Object.keys(searchParams || {}).filter((key) => !isQueryWrapperKey(key)).map((key) => {
27732
27824
  switch (operator) {
27733
- case "EQUAL" /* EQUAL */: {
27825
+ case ColumnSingleValueFilterOperator.EQUAL: {
27734
27826
  const filter2 = {
27735
27827
  concreteType: "org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter",
27736
27828
  columnName: key,
@@ -27739,7 +27831,7 @@ var getAdditionalFilters = (entityId, searchParams, operator = "LIKE" /* LIKE */
27739
27831
  };
27740
27832
  return filter2;
27741
27833
  }
27742
- case "IN" /* IN */: {
27834
+ case ColumnSingleValueFilterOperator.IN: {
27743
27835
  const filter2 = {
27744
27836
  concreteType: "org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter",
27745
27837
  columnName: key,
@@ -27748,7 +27840,7 @@ var getAdditionalFilters = (entityId, searchParams, operator = "LIKE" /* LIKE */
27748
27840
  };
27749
27841
  return filter2;
27750
27842
  }
27751
- case "HAS" /* HAS */: {
27843
+ case ColumnMultiValueFunction.HAS: {
27752
27844
  const filter2 = {
27753
27845
  concreteType: "org.sagebionetworks.repo.model.table.ColumnMultiValueFunctionQueryFilter",
27754
27846
  columnName: key,
@@ -27757,7 +27849,7 @@ var getAdditionalFilters = (entityId, searchParams, operator = "LIKE" /* LIKE */
27757
27849
  };
27758
27850
  return filter2;
27759
27851
  }
27760
- case "LIKE" /* LIKE */: {
27852
+ case ColumnSingleValueFilterOperator.LIKE: {
27761
27853
  const filter2 = {
27762
27854
  concreteType: "org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter",
27763
27855
  columnName: key,
@@ -27767,7 +27859,7 @@ var getAdditionalFilters = (entityId, searchParams, operator = "LIKE" /* LIKE */
27767
27859
  };
27768
27860
  return filter2;
27769
27861
  }
27770
- case "HAS_LIKE" /* HAS_LIKE */: {
27862
+ case ColumnMultiValueFunction.HAS_LIKE: {
27771
27863
  const filter2 = {
27772
27864
  concreteType: "org.sagebionetworks.repo.model.table.ColumnMultiValueFunctionQueryFilter",
27773
27865
  columnName: key,
@@ -28201,7 +28293,7 @@ async function returnIfTwoFactorAuthError(fn) {
28201
28293
  try {
28202
28294
  response = await fn();
28203
28295
  } catch (e) {
28204
- if (e instanceof SynapseClientError && e.status === 401 && e.errorResponse && "errorCode" in e.errorResponse && e.errorResponse.errorCode === "TWO_FA_REQUIRED" /* TWO_FA_REQUIRED */ && e.errorResponse.concreteType === "org.sagebionetworks.repo.model.auth.TwoFactorAuthErrorResponse") {
28296
+ if (e instanceof SynapseClientError && e.status === 401 && e.errorResponse && "errorCode" in e.errorResponse && e.errorResponse.errorCode === ErrorResponseCode.TWO_FA_REQUIRED && e.errorResponse.concreteType === "org.sagebionetworks.repo.model.auth.TwoFactorAuthErrorResponse") {
28205
28297
  return e.errorResponse;
28206
28298
  } else {
28207
28299
  throw e;
@@ -28576,7 +28668,7 @@ var updateMyUserProfile = (profile, accessToken = void 0) => {
28576
28668
  0 /* REPO_ENDPOINT */
28577
28669
  );
28578
28670
  };
28579
- var getUserGroupHeaders = (prefix = "", typeFilter = "ALL" /* ALL */, offset = 0, limit = 20) => {
28671
+ var getUserGroupHeaders = (prefix = "", typeFilter = TYPE_FILTER.ALL, offset = 0, limit = 20) => {
28580
28672
  return doGet(
28581
28673
  USER_GROUP_HEADERS + `?prefix=${prefix}&typeFilter=${typeFilter}&offset=${offset}&limit=${limit}`,
28582
28674
  void 0,
@@ -28718,7 +28810,7 @@ var getEntityBundleV2 = (entityId, requestObject, version, accessToken) => {
28718
28810
  function getObjectTypeToString(key) {
28719
28811
  return ObjectType[key];
28720
28812
  }
28721
- var getEntityWiki = (accessToken, ownerId, wikiId = "", objectType = "ENTITY" /* ENTITY */) => {
28813
+ var getEntityWiki = (accessToken, ownerId, wikiId = "", objectType = ObjectType.ENTITY) => {
28722
28814
  const objectTypeString = getObjectTypeToString(objectType);
28723
28815
  const url = `/repo/v1/${objectTypeString?.toLocaleLowerCase()}/${ownerId}/wiki/${wikiId}`;
28724
28816
  return doGet(url, accessToken, 0 /* REPO_ENDPOINT */);
@@ -28917,7 +29009,7 @@ var getWikiPageKeyForAccessRequirement = (accessToken, ownerId) => {
28917
29009
  0 /* REPO_ENDPOINT */
28918
29010
  );
28919
29011
  };
28920
- var getWikiAttachmentsFromEntity = (accessToken, id, wikiId, objectType = "ENTITY" /* ENTITY */) => {
29012
+ var getWikiAttachmentsFromEntity = (accessToken, id, wikiId, objectType = ObjectType.ENTITY) => {
28921
29013
  const objectTypeString = getObjectTypeToString(objectType);
28922
29014
  const url = `/repo/v1/${objectTypeString.toLocaleLowerCase()}/${id}/wiki2/${wikiId}/attachmenthandles`;
28923
29015
  return doGet(url, accessToken, 0 /* REPO_ENDPOINT */);
@@ -28926,7 +29018,7 @@ var getWikiAttachmentsFromEvaluation = (accessToken, id, wikiId) => {
28926
29018
  const url = `/repo/v1/evaluation/${id}/wiki/${wikiId}/attachmenthandles`;
28927
29019
  return doGet(url, accessToken, 0 /* REPO_ENDPOINT */);
28928
29020
  };
28929
- var getPresignedUrlForWikiAttachment = (accessToken, id, wikiId, fileName, objectType = "ENTITY" /* ENTITY */) => {
29021
+ var getPresignedUrlForWikiAttachment = (accessToken, id, wikiId, fileName, objectType = ObjectType.ENTITY) => {
28930
29022
  const objectTypeString = getObjectTypeToString(objectType);
28931
29023
  const url = `/repo/v1/${objectTypeString.toLocaleLowerCase()}/${id}/wiki2/${wikiId}/attachment?fileName=${fileName}&redirect=false`;
28932
29024
  return doGet(url, accessToken, 0 /* REPO_ENDPOINT */);
@@ -29217,7 +29309,7 @@ var getFileResult = (fileEntity, accessToken, includeFileHandles, includePreSign
29217
29309
  const fileHandleAssociationList = [
29218
29310
  {
29219
29311
  associateObjectId: fileEntity.id,
29220
- associateObjectType: "FileEntity" /* FileEntity */,
29312
+ associateObjectType: FileHandleAssociateType.FileEntity,
29221
29313
  fileHandleId: fileEntity.dataFileHandleId
29222
29314
  }
29223
29315
  ];
@@ -30166,7 +30258,7 @@ var deleteReply = (accessToken, replyId) => {
30166
30258
  0 /* REPO_ENDPOINT */
30167
30259
  );
30168
30260
  };
30169
- var getReplies = (accessToken, threadId, limit = 30, offset = 0, sort = "CREATED_ON" /* CREATED_ON */, ascending = true, filter2 = "EXCLUDE_DELETED" /* EXCLUDE_DELETED */) => {
30261
+ var getReplies = (accessToken, threadId, limit = 30, offset = 0, sort = DiscussionReplyOrder.CREATED_ON, ascending = true, filter2 = DiscussionFilter.EXCLUDE_DELETED) => {
30170
30262
  const params = new URLSearchParams();
30171
30263
  params.set("offset", offset.toString());
30172
30264
  params.set("limit", limit.toString());
@@ -30281,7 +30373,7 @@ var forumSearch = (discussionSearchRequest, forumId, accessToken) => {
30281
30373
  0 /* REPO_ENDPOINT */
30282
30374
  );
30283
30375
  };
30284
- var getForumThread = (accessToken, forumId, offset = 0, limit = 20, sort = "PINNED_AND_LAST_ACTIVITY" /* PINNED_AND_LAST_ACTIVITY */, ascending = true, filter2 = "EXCLUDE_DELETED" /* EXCLUDE_DELETED */) => {
30376
+ var getForumThread = (accessToken, forumId, offset = 0, limit = 20, sort = DiscussionThreadOrder.PINNED_AND_LAST_ACTIVITY, ascending = true, filter2 = DiscussionFilter.EXCLUDE_DELETED) => {
30285
30377
  const params = new URLSearchParams();
30286
30378
  params.set("offset", offset.toString());
30287
30379
  params.set("limit", limit?.toString());
@@ -30484,6 +30576,17 @@ var getEntityDownloadActionsRequired = (entityId, accessToken) => {
30484
30576
  0 /* REPO_ENDPOINT */
30485
30577
  );
30486
30578
  };
30579
+ function getSubjects(accessToken, requirementId, nextPageToken) {
30580
+ const params = new URLSearchParams();
30581
+ if (nextPageToken) {
30582
+ params.set("nextPageToken", nextPageToken);
30583
+ }
30584
+ return doGet(
30585
+ `/repo/v1/accessRequirement/${requirementId}/subjects?${params.toString()}`,
30586
+ accessToken,
30587
+ 0 /* REPO_ENDPOINT */
30588
+ );
30589
+ }
30487
30590
 
30488
30591
  // src/synapse-client/index.ts
30489
30592
  var synapse_client_default = SynapseClient_exports;
@@ -31356,7 +31459,7 @@ __export(components_exports, {
31356
31459
  });
31357
31460
 
31358
31461
  // src/components/AccessTokenPage/AccessTokenPage.tsx
31359
- import React358, { useState as useState82 } from "react";
31462
+ import React358, { useState as useState83 } from "react";
31360
31463
 
31361
31464
  // src/synapse-queries/user/usePersonalAccessToken.ts
31362
31465
  import {
@@ -31470,7 +31573,7 @@ var LoadingScreen_default = loadingScreen;
31470
31573
 
31471
31574
  // src/components/AccessTokenPage/AccessTokenCard.tsx
31472
31575
  import dayjs9 from "dayjs";
31473
- import React355, { useState as useState81 } from "react";
31576
+ import React355, { useState as useState82 } from "react";
31474
31577
  import { useErrorHandler as useErrorHandler2 } from "react-error-boundary";
31475
31578
  import DeleteTwoToneIcon from "@mui/icons-material/DeleteTwoTone";
31476
31579
 
@@ -32570,7 +32673,7 @@ import React352 from "react";
32570
32673
  import React351 from "react";
32571
32674
 
32572
32675
  // src/components/Markdown/MarkdownPopover.tsx
32573
- import React350, { useState as useState80 } from "react";
32676
+ import React350, { useState as useState81 } from "react";
32574
32677
 
32575
32678
  // src/components/Markdown/MarkdownSynapse.tsx
32576
32679
  import React348 from "react";
@@ -33162,7 +33265,7 @@ function FileEntityPreview(props) {
33162
33265
  fileHandleAssociation: {
33163
33266
  fileHandleId: dataFileHandleId,
33164
33267
  associateObjectId: bundle.entity.id,
33165
- associateObjectType: "FileEntity" /* FileEntity */
33268
+ associateObjectType: FileHandleAssociateType.FileEntity
33166
33269
  },
33167
33270
  previewType
33168
33271
  }
@@ -33185,7 +33288,7 @@ function FileEntityPreview(props) {
33185
33288
  fileHandleAssociation: {
33186
33289
  fileHandleId: previewFileHandle.id,
33187
33290
  associateObjectId: bundle.entity.id,
33188
- associateObjectType: "FileEntity" /* FileEntity */
33291
+ associateObjectType: FileHandleAssociateType.FileEntity
33189
33292
  },
33190
33293
  previewType
33191
33294
  }
@@ -33873,7 +33976,7 @@ var UserCard = (props) => {
33873
33976
  const { data: fetchedPrincipalId, isLoading: isLoadingAliasLookup } = useGetPrincipalIdForAlias(
33874
33977
  {
33875
33978
  alias,
33876
- type: "USER_NAME" /* USER_NAME */
33979
+ type: AliasType.USER_NAME
33877
33980
  },
33878
33981
  { enabled: !!alias }
33879
33982
  );
@@ -34164,7 +34267,17 @@ function useSubmitDataAccessRequest(options) {
34164
34267
  const queryClient = useQueryClient2();
34165
34268
  const { accessToken, keyFactory } = useSynapseContext();
34166
34269
  return useMutation3(
34167
- ({ request }) => synapse_client_default.submitDataAccessRequest(request, accessToken),
34270
+ async ({ request, accessRequirementId }) => {
34271
+ if (request.subjectId == null || request.subjectType == null) {
34272
+ const { subjects } = await synapse_client_default.getSubjects(
34273
+ accessToken,
34274
+ accessRequirementId
34275
+ );
34276
+ request.subjectId = subjects[0].id;
34277
+ request.subjectType = subjects[0].type;
34278
+ }
34279
+ return synapse_client_default.submitDataAccessRequest(request, accessToken);
34280
+ },
34168
34281
  {
34169
34282
  ...options,
34170
34283
  onSuccess: async (data, variables, ctx) => {
@@ -34560,23 +34673,23 @@ function getEntityTypeFromHeader(header) {
34560
34673
  if (header.node_type) {
34561
34674
  return header.node_type;
34562
34675
  }
34563
- return header.type === void 0 ? "project" /* PROJECT */ : convertToEntityType(header.type);
34676
+ return header.type === void 0 ? EntityType.PROJECT : convertToEntityType(header.type);
34564
34677
  }
34565
34678
  function isContainerType(type) {
34566
34679
  switch (type) {
34567
- case "project" /* PROJECT */:
34568
- case "folder" /* FOLDER */:
34680
+ case EntityType.PROJECT:
34681
+ case EntityType.FOLDER:
34569
34682
  return true;
34570
- case "link" /* LINK */:
34571
- case "dockerrepo" /* DOCKER_REPO */:
34572
- case "file" /* FILE */:
34573
- case "table" /* TABLE */:
34574
- case "submissionview" /* SUBMISSION_VIEW */:
34575
- case "entityview" /* ENTITY_VIEW */:
34576
- case "dataset" /* DATASET */:
34577
- case "datasetcollection" /* DATASET_COLLECTION */:
34578
- case "materializedview" /* MATERIALIZED_VIEW */:
34579
- case "virtualtable" /* VIRTUAL_TABLE */:
34683
+ case EntityType.LINK:
34684
+ case EntityType.DOCKER_REPO:
34685
+ case EntityType.FILE:
34686
+ case EntityType.TABLE:
34687
+ case EntityType.SUBMISSION_VIEW:
34688
+ case EntityType.ENTITY_VIEW:
34689
+ case EntityType.DATASET:
34690
+ case EntityType.DATASET_COLLECTION:
34691
+ case EntityType.MATERIALIZED_VIEW:
34692
+ case EntityType.VIRTUAL_TABLE:
34580
34693
  return false;
34581
34694
  default:
34582
34695
  throw new Error(`Unknown entity type: ${type}`);
@@ -34584,19 +34697,19 @@ function isContainerType(type) {
34584
34697
  }
34585
34698
  function isTableType(type) {
34586
34699
  switch (type) {
34587
- case "project" /* PROJECT */:
34588
- case "folder" /* FOLDER */:
34589
- case "link" /* LINK */:
34590
- case "dockerrepo" /* DOCKER_REPO */:
34591
- case "file" /* FILE */:
34700
+ case EntityType.PROJECT:
34701
+ case EntityType.FOLDER:
34702
+ case EntityType.LINK:
34703
+ case EntityType.DOCKER_REPO:
34704
+ case EntityType.FILE:
34592
34705
  return false;
34593
- case "table" /* TABLE */:
34594
- case "submissionview" /* SUBMISSION_VIEW */:
34595
- case "entityview" /* ENTITY_VIEW */:
34596
- case "dataset" /* DATASET */:
34597
- case "datasetcollection" /* DATASET_COLLECTION */:
34598
- case "materializedview" /* MATERIALIZED_VIEW */:
34599
- case "virtualtable" /* VIRTUAL_TABLE */:
34706
+ case EntityType.TABLE:
34707
+ case EntityType.SUBMISSION_VIEW:
34708
+ case EntityType.ENTITY_VIEW:
34709
+ case EntityType.DATASET:
34710
+ case EntityType.DATASET_COLLECTION:
34711
+ case EntityType.MATERIALIZED_VIEW:
34712
+ case EntityType.VIRTUAL_TABLE:
34600
34713
  return true;
34601
34714
  default:
34602
34715
  throw new Error(`Unknown entity type: ${type}`);
@@ -34604,29 +34717,29 @@ function isTableType(type) {
34604
34717
  }
34605
34718
  function entityTypeToFriendlyName(entityType) {
34606
34719
  switch (entityType) {
34607
- case "project" /* PROJECT */:
34720
+ case EntityType.PROJECT:
34608
34721
  return "Project";
34609
- case "folder" /* FOLDER */:
34722
+ case EntityType.FOLDER:
34610
34723
  return "Folder";
34611
- case "file" /* FILE */:
34724
+ case EntityType.FILE:
34612
34725
  return "File";
34613
- case "table" /* TABLE */:
34726
+ case EntityType.TABLE:
34614
34727
  return "Table";
34615
- case "link" /* LINK */:
34728
+ case EntityType.LINK:
34616
34729
  return "Link";
34617
- case "entityview" /* ENTITY_VIEW */:
34730
+ case EntityType.ENTITY_VIEW:
34618
34731
  return "View";
34619
- case "dockerrepo" /* DOCKER_REPO */:
34732
+ case EntityType.DOCKER_REPO:
34620
34733
  return "Docker Repository";
34621
- case "submissionview" /* SUBMISSION_VIEW */:
34734
+ case EntityType.SUBMISSION_VIEW:
34622
34735
  return "Submission View";
34623
- case "dataset" /* DATASET */:
34736
+ case EntityType.DATASET:
34624
34737
  return "Dataset";
34625
- case "datasetcollection" /* DATASET_COLLECTION */:
34738
+ case EntityType.DATASET_COLLECTION:
34626
34739
  return "Dataset Collection";
34627
- case "materializedview" /* MATERIALIZED_VIEW */:
34740
+ case EntityType.MATERIALIZED_VIEW:
34628
34741
  return "Materialized View";
34629
- case "virtualtable" /* VIRTUAL_TABLE */:
34742
+ case EntityType.VIRTUAL_TABLE:
34630
34743
  return "Virtual Table";
34631
34744
  default:
34632
34745
  console.warn("Entity type could not be mapped to name:", entityType);
@@ -34635,71 +34748,71 @@ function entityTypeToFriendlyName(entityType) {
34635
34748
  }
34636
34749
  function convertToEntityType(typeString) {
34637
34750
  switch (typeString) {
34638
- case "project" /* PROJECT */:
34751
+ case EntityType.PROJECT:
34639
34752
  case "org.sagebionetworks.repo.model.Project":
34640
- return "project" /* PROJECT */;
34641
- case "folder" /* FOLDER */:
34753
+ return EntityType.PROJECT;
34754
+ case EntityType.FOLDER:
34642
34755
  case "org.sagebionetworks.repo.model.Folder":
34643
- return "folder" /* FOLDER */;
34644
- case "file" /* FILE */:
34756
+ return EntityType.FOLDER;
34757
+ case EntityType.FILE:
34645
34758
  case FILE_ENTITY_CONCRETE_TYPE_VALUE:
34646
- return "file" /* FILE */;
34647
- case "link" /* LINK */:
34759
+ return EntityType.FILE;
34760
+ case EntityType.LINK:
34648
34761
  case "org.sagebionetworks.repo.model.Link":
34649
- return "link" /* LINK */;
34650
- case "dockerrepo" /* DOCKER_REPO */:
34762
+ return EntityType.LINK;
34763
+ case EntityType.DOCKER_REPO:
34651
34764
  case "org.sagebionetworks.repo.model.docker.DockerRepository":
34652
- return "dockerrepo" /* DOCKER_REPO */;
34653
- case "table" /* TABLE */:
34765
+ return EntityType.DOCKER_REPO;
34766
+ case EntityType.TABLE:
34654
34767
  case TABLE_ENTITY_CONCRETE_TYPE_VALUE:
34655
- return "table" /* TABLE */;
34656
- case "submissionview" /* SUBMISSION_VIEW */:
34768
+ return EntityType.TABLE;
34769
+ case EntityType.SUBMISSION_VIEW:
34657
34770
  case "org.sagebionetworks.repo.model.table.SubmissionView":
34658
- return "submissionview" /* SUBMISSION_VIEW */;
34659
- case "entityview" /* ENTITY_VIEW */:
34771
+ return EntityType.SUBMISSION_VIEW;
34772
+ case EntityType.ENTITY_VIEW:
34660
34773
  case ENTITY_VIEW_CONCRETE_TYPE_VALUE:
34661
- return "entityview" /* ENTITY_VIEW */;
34662
- case "dataset" /* DATASET */:
34774
+ return EntityType.ENTITY_VIEW;
34775
+ case EntityType.DATASET:
34663
34776
  case DATASET_CONCRETE_TYPE_VALUE:
34664
- return "dataset" /* DATASET */;
34665
- case "datasetcollection" /* DATASET_COLLECTION */:
34777
+ return EntityType.DATASET;
34778
+ case EntityType.DATASET_COLLECTION:
34666
34779
  case DATASET_COLLECTION_CONCRETE_TYPE_VALUE:
34667
- return "datasetcollection" /* DATASET_COLLECTION */;
34668
- case "materializedview" /* MATERIALIZED_VIEW */:
34780
+ return EntityType.DATASET_COLLECTION;
34781
+ case EntityType.MATERIALIZED_VIEW:
34669
34782
  case MATERIALIZED_VIEW_CONCRETE_TYPE_VALUE:
34670
- return "materializedview" /* MATERIALIZED_VIEW */;
34671
- case "virtualtable" /* VIRTUAL_TABLE */:
34783
+ return EntityType.MATERIALIZED_VIEW;
34784
+ case EntityType.VIRTUAL_TABLE:
34672
34785
  case VIRTUAL_TABLE_CONCRETE_TYPE_VALUE:
34673
- return "virtualtable" /* VIRTUAL_TABLE */;
34786
+ return EntityType.VIRTUAL_TABLE;
34674
34787
  default:
34675
34788
  throw new Error(`Unknown entity type: ${typeString}`);
34676
34789
  }
34677
34790
  }
34678
34791
  function convertToConcreteEntityType(type) {
34679
34792
  switch (type) {
34680
- case "project" /* PROJECT */:
34793
+ case EntityType.PROJECT:
34681
34794
  return "org.sagebionetworks.repo.model.Project";
34682
- case "folder" /* FOLDER */:
34795
+ case EntityType.FOLDER:
34683
34796
  return "org.sagebionetworks.repo.model.Folder";
34684
- case "file" /* FILE */:
34797
+ case EntityType.FILE:
34685
34798
  return "org.sagebionetworks.repo.model.FileEntity";
34686
- case "link" /* LINK */:
34799
+ case EntityType.LINK:
34687
34800
  return "org.sagebionetworks.repo.model.Link";
34688
- case "dockerrepo" /* DOCKER_REPO */:
34801
+ case EntityType.DOCKER_REPO:
34689
34802
  return "org.sagebionetworks.repo.model.docker.DockerRepository";
34690
- case "table" /* TABLE */:
34803
+ case EntityType.TABLE:
34691
34804
  return "org.sagebionetworks.repo.model.table.TableEntity";
34692
- case "submissionview" /* SUBMISSION_VIEW */:
34805
+ case EntityType.SUBMISSION_VIEW:
34693
34806
  return "org.sagebionetworks.repo.model.table.SubmissionView";
34694
- case "entityview" /* ENTITY_VIEW */:
34807
+ case EntityType.ENTITY_VIEW:
34695
34808
  return "org.sagebionetworks.repo.model.table.EntityView";
34696
- case "dataset" /* DATASET */:
34809
+ case EntityType.DATASET:
34697
34810
  return "org.sagebionetworks.repo.model.table.Dataset";
34698
- case "datasetcollection" /* DATASET_COLLECTION */:
34811
+ case EntityType.DATASET_COLLECTION:
34699
34812
  return "org.sagebionetworks.repo.model.table.DatasetCollection";
34700
- case "materializedview" /* MATERIALIZED_VIEW */:
34813
+ case EntityType.MATERIALIZED_VIEW:
34701
34814
  return "org.sagebionetworks.repo.model.table.MaterializedView";
34702
- case "virtualtable" /* VIRTUAL_TABLE */:
34815
+ case EntityType.VIRTUAL_TABLE:
34703
34816
  return "org.sagebionetworks.repo.model.table.VirtualTable";
34704
34817
  default:
34705
34818
  throw new Error(`Unknown entity type: ${type}`);
@@ -34707,19 +34820,19 @@ function convertToConcreteEntityType(type) {
34707
34820
  }
34708
34821
  function isVersionableEntityType(type) {
34709
34822
  switch (type) {
34710
- case "project" /* PROJECT */:
34711
- case "folder" /* FOLDER */:
34712
- case "link" /* LINK */:
34713
- case "dockerrepo" /* DOCKER_REPO */:
34714
- case "submissionview" /* SUBMISSION_VIEW */:
34715
- case "materializedview" /* MATERIALIZED_VIEW */:
34716
- case "virtualtable" /* VIRTUAL_TABLE */:
34823
+ case EntityType.PROJECT:
34824
+ case EntityType.FOLDER:
34825
+ case EntityType.LINK:
34826
+ case EntityType.DOCKER_REPO:
34827
+ case EntityType.SUBMISSION_VIEW:
34828
+ case EntityType.MATERIALIZED_VIEW:
34829
+ case EntityType.VIRTUAL_TABLE:
34717
34830
  return false;
34718
- case "file" /* FILE */:
34719
- case "table" /* TABLE */:
34720
- case "entityview" /* ENTITY_VIEW */:
34721
- case "dataset" /* DATASET */:
34722
- case "datasetcollection" /* DATASET_COLLECTION */:
34831
+ case EntityType.FILE:
34832
+ case EntityType.TABLE:
34833
+ case EntityType.ENTITY_VIEW:
34834
+ case EntityType.DATASET:
34835
+ case EntityType.DATASET_COLLECTION:
34723
34836
  return true;
34724
34837
  default:
34725
34838
  throw new Error(`Unknown entity type: ${type}`);
@@ -35721,18 +35834,18 @@ import React169 from "react";
35721
35834
  import React168 from "react";
35722
35835
  var getIconTypeForEntity = (type) => {
35723
35836
  switch (type) {
35724
- case "project" /* PROJECT */:
35725
- case "folder" /* FOLDER */:
35726
- case "file" /* FILE */:
35727
- case "table" /* TABLE */:
35728
- case "link" /* LINK */:
35729
- case "entityview" /* ENTITY_VIEW */:
35730
- case "dockerrepo" /* DOCKER_REPO */:
35731
- case "submissionview" /* SUBMISSION_VIEW */:
35732
- case "dataset" /* DATASET */:
35733
- case "datasetcollection" /* DATASET_COLLECTION */:
35734
- case "materializedview" /* MATERIALIZED_VIEW */:
35735
- case "virtualtable" /* VIRTUAL_TABLE */:
35837
+ case EntityType.PROJECT:
35838
+ case EntityType.FOLDER:
35839
+ case EntityType.FILE:
35840
+ case EntityType.TABLE:
35841
+ case EntityType.LINK:
35842
+ case EntityType.ENTITY_VIEW:
35843
+ case EntityType.DOCKER_REPO:
35844
+ case EntityType.SUBMISSION_VIEW:
35845
+ case EntityType.DATASET:
35846
+ case EntityType.DATASET_COLLECTION:
35847
+ case EntityType.MATERIALIZED_VIEW:
35848
+ case EntityType.VIRTUAL_TABLE:
35736
35849
  return type2SvgIconName[type];
35737
35850
  default:
35738
35851
  return "";
@@ -35810,7 +35923,7 @@ var ProvenanceEntityIcon = (props) => {
35810
35923
  const { entityHeader } = props;
35811
35924
  if (entityHeader) {
35812
35925
  const entityType = convertToEntityType(entityHeader?.type);
35813
- if (entityType == "file" /* FILE */) {
35926
+ if (entityType == EntityType.FILE) {
35814
35927
  const lastPeriodIndex = entityHeader.name.lastIndexOf(".");
35815
35928
  if (lastPeriodIndex > -1) {
35816
35929
  const extension = entityHeader.name.slice(lastPeriodIndex);
@@ -35822,7 +35935,7 @@ var ProvenanceEntityIcon = (props) => {
35822
35935
  return /* @__PURE__ */ React169.createElement(EntityTypeIcon, { type: entityType, includeTooltip: false });
35823
35936
  }
35824
35937
  }
35825
- return /* @__PURE__ */ React169.createElement(EntityTypeIcon, { type: "file" /* FILE */, includeTooltip: false });
35938
+ return /* @__PURE__ */ React169.createElement(EntityTypeIcon, { type: EntityType.FILE, includeTooltip: false });
35826
35939
  };
35827
35940
 
35828
35941
  // src/components/ProvenanceGraph/EntityNodeLabel.tsx
@@ -36491,7 +36604,7 @@ var SynapseImage = class extends React179.Component {
36491
36604
  const fileHandleAssociationList = [
36492
36605
  {
36493
36606
  associateObjectId: synapseId,
36494
- associateObjectType: "FileEntity" /* FileEntity */,
36607
+ associateObjectType: FileHandleAssociateType.FileEntity,
36495
36608
  fileHandleId: data.dataFileHandleId
36496
36609
  }
36497
36610
  ];
@@ -36527,7 +36640,7 @@ var SynapseImage = class extends React179.Component {
36527
36640
  const fileHandleAssociationList = [
36528
36641
  {
36529
36642
  associateObjectId: this.props.wikiId,
36530
- associateObjectType: "WikiAttachment" /* WikiAttachment */,
36643
+ associateObjectType: FileHandleAssociateType.WikiAttachment,
36531
36644
  fileHandleId: id
36532
36645
  }
36533
36646
  ];
@@ -36762,7 +36875,7 @@ var testDownloadSpeed = (accessToken) => {
36762
36875
  const fileHandleAssociationList = [
36763
36876
  {
36764
36877
  associateObjectId: fileEntity.id,
36765
- associateObjectType: "FileEntity" /* FileEntity */,
36878
+ associateObjectType: FileHandleAssociateType.FileEntity,
36766
36879
  fileHandleId: fileEntity.dataFileHandleId
36767
36880
  }
36768
36881
  ];
@@ -37030,7 +37143,7 @@ var DownloadConfirmation = ({
37030
37143
  parentId: folderId,
37031
37144
  includeSumFileSizes: true,
37032
37145
  includeTotalChildCount: true,
37033
- includeTypes: ["file" /* FILE */]
37146
+ includeTypes: [EntityType.FILE]
37034
37147
  });
37035
37148
  useDeepCompareEffect2(() => {
37036
37149
  if (isSuccess && entityChildrenData && downloadListStatistics) {
@@ -37549,13 +37662,13 @@ var getDisplayValue = (value, columnType) => {
37549
37662
  return SynapseConstants_exports.FRIENDLY_VALUE_NOT_SET;
37550
37663
  }
37551
37664
  switch (columnType) {
37552
- case "ENTITYID" /* ENTITYID */:
37553
- case "ENTITYID_LIST" /* ENTITYID_LIST */:
37665
+ case ColumnTypeEnum.ENTITYID:
37666
+ case ColumnTypeEnum.ENTITYID_LIST:
37554
37667
  return getDisplayValueForEntityColumn(value);
37555
- case "USERID" /* USERID */:
37556
- case "USERID_LIST" /* USERID_LIST */:
37668
+ case ColumnTypeEnum.USERID:
37669
+ case ColumnTypeEnum.USERID_LIST:
37557
37670
  return getDisplayValueUserIdColumn(value);
37558
- case "EVALUATIONID" /* EVALUATIONID */:
37671
+ case ColumnTypeEnum.EVALUATIONID:
37559
37672
  return getDisplayValueEvaluationIdColumn(value);
37560
37673
  default:
37561
37674
  return value;
@@ -38424,10 +38537,10 @@ import React276 from "react";
38424
38537
  import React275 from "react";
38425
38538
 
38426
38539
  // src/components/DownloadCart/MeetAccessRequirementCard.tsx
38427
- import React272, { useState as useState56 } from "react";
38540
+ import React272, { useState as useState57 } from "react";
38428
38541
 
38429
38542
  // src/components/AccessRequirementList/AccessRequirementList.tsx
38430
- import React235, { useMemo as useMemo27, useState as useState55 } from "react";
38543
+ import React235, { useMemo as useMemo27, useState as useState56 } from "react";
38431
38544
 
38432
38545
  // src/components/Authentication/StandaloneLoginForm.tsx
38433
38546
  import React206 from "react";
@@ -38951,7 +39064,7 @@ function CancelRequestDataAccess(props) {
38951
39064
  var CancelRequestDataAccess_default = CancelRequestDataAccess;
38952
39065
 
38953
39066
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm.tsx
38954
- import React209, { useState as useState46 } from "react";
39067
+ import React209, { useEffect as useEffect45, useState as useState46 } from "react";
38955
39068
 
38956
39069
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.tsx
38957
39070
  import React208 from "react";
@@ -39009,24 +39122,13 @@ function ManagedACTAccessRequirementFormWikiWrapper(props) {
39009
39122
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm.tsx
39010
39123
  function ResearchProjectForm(props) {
39011
39124
  const { onSave, managedACTAccessRequirement, onHide } = props;
39012
- const [projectLead, setProjectLead] = useState46("");
39013
- const [institution, setInstitution] = useState46("");
39014
- const [intendedDataUseStatement, setIntendedDataUseStatement] = useState46(managedACTAccessRequirement.isIDURequired ? "" : void 0);
39125
+ const [projectLead, setProjectLead] = useState46(void 0);
39126
+ const [institution, setInstitution] = useState46(void 0);
39127
+ const [intendedDataUseStatement, setIntendedDataUseStatement] = useState46(void 0);
39015
39128
  const [alert2, setAlert] = useState46();
39016
39129
  const { data: existingResearchProject, isLoading: isLoadingInitialData } = useGetResearchProject(String(managedACTAccessRequirement.id), {
39017
39130
  // Infinite staleTime ensures this won't be refetched unless explicitly invalidated by the mutation
39018
39131
  staleTime: Infinity,
39019
- onSuccess: (data) => {
39020
- if (data?.projectLead) {
39021
- setProjectLead(data?.projectLead);
39022
- }
39023
- if (data?.institution) {
39024
- setInstitution(data?.institution);
39025
- }
39026
- if (data?.intendedDataUseStatement) {
39027
- setIntendedDataUseStatement(data?.intendedDataUseStatement);
39028
- }
39029
- },
39030
39132
  onError: (e) => {
39031
39133
  console.log(
39032
39134
  "RequestDataAccessStep1: Error getting research project data: ",
@@ -39034,6 +39136,26 @@ function ResearchProjectForm(props) {
39034
39136
  );
39035
39137
  }
39036
39138
  });
39139
+ useEffect45(() => {
39140
+ if (projectLead == void 0 && existingResearchProject?.projectLead) {
39141
+ setProjectLead(existingResearchProject?.projectLead);
39142
+ }
39143
+ if (institution == void 0 && existingResearchProject?.institution) {
39144
+ setInstitution(existingResearchProject?.institution);
39145
+ }
39146
+ if (intendedDataUseStatement == void 0 && existingResearchProject?.intendedDataUseStatement) {
39147
+ setIntendedDataUseStatement(
39148
+ existingResearchProject?.intendedDataUseStatement
39149
+ );
39150
+ }
39151
+ }, [
39152
+ existingResearchProject?.institution,
39153
+ existingResearchProject?.intendedDataUseStatement,
39154
+ existingResearchProject?.projectLead,
39155
+ institution,
39156
+ intendedDataUseStatement,
39157
+ projectLead
39158
+ ]);
39037
39159
  const { mutate, isLoading: isLoadingUpdate } = useUpdateResearchProject({
39038
39160
  onSuccess: (data) => {
39039
39161
  if (onSave) {
@@ -39118,7 +39240,7 @@ function ResearchProjectForm(props) {
39118
39240
  }
39119
39241
 
39120
39242
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm.tsx
39121
- import React219, { useState as useState50 } from "react";
39243
+ import React219, { useEffect as useEffect47, useState as useState51 } from "react";
39122
39244
 
39123
39245
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.tsx
39124
39246
  import React214 from "react";
@@ -39163,7 +39285,7 @@ import Select3, {
39163
39285
  } from "react-select";
39164
39286
 
39165
39287
  // src/components/UserOrTeamBadge/UserOrTeamBadge.tsx
39166
- import React212, { useEffect as useEffect45, useState as useState48 } from "react";
39288
+ import React212, { useEffect as useEffect46, useState as useState48 } from "react";
39167
39289
 
39168
39290
  // src/components/TeamBadge.tsx
39169
39291
  import React211 from "react";
@@ -39199,7 +39321,7 @@ function UserOrTeamBadge(props) {
39199
39321
  enabled: !providedUserGroupHeader
39200
39322
  }
39201
39323
  );
39202
- useEffect45(() => {
39324
+ useEffect46(() => {
39203
39325
  if (principalId && userGroupHeader == void 0 && fetchedUserGroupHeader) {
39204
39326
  setUserGroupHeader(fetchedUserGroupHeader);
39205
39327
  }
@@ -39346,7 +39468,8 @@ var UserSearchBoxV2 = (props) => {
39346
39468
  input: {
39347
39469
  gridArea: "1 / 2 / 4 / 4 !important"
39348
39470
  }
39349
- })
39471
+ }),
39472
+ menu: (base) => ({ ...base, zIndex: 2 })
39350
39473
  },
39351
39474
  components: customSelectComponents,
39352
39475
  onChange: (option) => {
@@ -39371,7 +39494,7 @@ function DataAccessRequestAccessorsEditor(props) {
39371
39494
  if (!currentAccessorIds.includes(ugh.ownerId)) {
39372
39495
  const selectedAccessor = {
39373
39496
  userId: ugh.ownerId,
39374
- type: "GAIN_ACCESS" /* GAIN_ACCESS */
39497
+ type: AccessType.GAIN_ACCESS
39375
39498
  };
39376
39499
  previousValue.push(selectedAccessor);
39377
39500
  }
@@ -39405,7 +39528,7 @@ function DataAccessRequestAccessorsEditor(props) {
39405
39528
  UserSearchBoxV2_default,
39406
39529
  {
39407
39530
  inputId: "requesters",
39408
- typeFilter: "USERS_ONLY" /* USERS_ONLY */,
39531
+ typeFilter: TYPE_FILTER.USERS_ONLY,
39409
39532
  onChange: onSelectUserCallback,
39410
39533
  filterPredicate: (userGroupHeader) => !accessorChanges.map((ac) => ac.userId).includes(userGroupHeader.ownerId),
39411
39534
  value: null
@@ -39425,7 +39548,7 @@ function DataAccessRequestAccessorsEditor(props) {
39425
39548
  }
39426
39549
  ),
39427
39550
  // only display delete button if the user profile is not the current user and has not had access before
39428
- user?.ownerId !== ac.userId && ac.type === "GAIN_ACCESS" /* GAIN_ACCESS */ && /* @__PURE__ */ React214.createElement(
39551
+ user?.ownerId !== ac.userId && ac.type === AccessType.GAIN_ACCESS && /* @__PURE__ */ React214.createElement(
39429
39552
  Button_default,
39430
39553
  {
39431
39554
  "aria-label": `Remove user`,
@@ -39439,7 +39562,8 @@ function DataAccessRequestAccessorsEditor(props) {
39439
39562
  /* @__PURE__ */ React214.createElement(IconSvg_default, { icon: "clear" })
39440
39563
  ),
39441
39564
  // Renewal/Revoke data access, only display if isRenewal is true
39442
- isRenewal && user?.ownerId !== ac.userId && ac.type !== "GAIN_ACCESS" /* GAIN_ACCESS */ && /* @__PURE__ */ React214.createElement(React214.Fragment, null, /* @__PURE__ */ React214.createElement(
39565
+ // TODO: It's possible to that the accessors list is in an illegal state with no way to recover -- see PLFM-7893
39566
+ isRenewal && user?.ownerId !== ac.userId && ac.type !== AccessType.GAIN_ACCESS && /* @__PURE__ */ React214.createElement(React214.Fragment, null, /* @__PURE__ */ React214.createElement(
39443
39567
  RadioGroup,
39444
39568
  {
39445
39569
  id: `accessor-renewal-${ac.userId}`,
@@ -39447,11 +39571,11 @@ function DataAccessRequestAccessorsEditor(props) {
39447
39571
  options: [
39448
39572
  {
39449
39573
  label: "Renew",
39450
- value: "RENEW_ACCESS" /* RENEW_ACCESS */
39574
+ value: AccessType.RENEW_ACCESS
39451
39575
  },
39452
39576
  {
39453
39577
  label: "Revoke",
39454
- value: "REVOKE_ACCESS" /* REVOKE_ACCESS */
39578
+ value: AccessType.REVOKE_ACCESS
39455
39579
  }
39456
39580
  ],
39457
39581
  onChange: (value) => onAccessorAccessTypeChange(
@@ -39471,7 +39595,8 @@ var FileUpload = (props) => {
39471
39595
  id,
39472
39596
  buttonProps = { variant: "contained" },
39473
39597
  label = "Browse...",
39474
- uploadCallback
39598
+ onUploadStart,
39599
+ onComplete
39475
39600
  } = props;
39476
39601
  const { accessToken } = useSynapseContext();
39477
39602
  const hiddenFileInput = React215.useRef(null);
@@ -39482,6 +39607,9 @@ var FileUpload = (props) => {
39482
39607
  };
39483
39608
  const changeHandler = async (e) => {
39484
39609
  if (e.target.files && e.target.files.length > 0) {
39610
+ if (onUploadStart) {
39611
+ onUploadStart();
39612
+ }
39485
39613
  const file = e.target.files[0];
39486
39614
  try {
39487
39615
  const resp = await uploadFile(
@@ -39489,16 +39617,16 @@ var FileUpload = (props) => {
39489
39617
  file.name,
39490
39618
  file
39491
39619
  );
39492
- if (uploadCallback) {
39493
- uploadCallback({
39620
+ if (onComplete) {
39621
+ onComplete({
39494
39622
  success: true,
39495
39623
  resp
39496
39624
  });
39497
39625
  }
39498
39626
  } catch (e2) {
39499
39627
  console.log("FileUpload: fail to upload file", e2);
39500
- if (uploadCallback) {
39501
- uploadCallback({
39628
+ if (onComplete) {
39629
+ onComplete({
39502
39630
  success: false,
39503
39631
  error: e2
39504
39632
  });
@@ -39534,16 +39662,12 @@ function DirectDownloadButton(props) {
39534
39662
  includeFileHandles: false,
39535
39663
  includePreviewPreSignedURLs: false
39536
39664
  };
39537
- try {
39538
- const file = await getFiles(batchFileRequest, accessToken);
39539
- const preSignedURL = file.requestedFiles[0].preSignedURL;
39540
- if (!preSignedURL) {
39541
- console.log("Fail to get file download link");
39542
- } else {
39543
- window.open(preSignedURL);
39544
- }
39545
- } catch (e) {
39546
- console.log("Fail to get file download link", e);
39665
+ const file = await getFiles(batchFileRequest, accessToken);
39666
+ const preSignedURL = file.requestedFiles[0].preSignedURL;
39667
+ if (!preSignedURL) {
39668
+ console.log("Fail to get file download link");
39669
+ } else {
39670
+ window.open(preSignedURL);
39547
39671
  }
39548
39672
  };
39549
39673
  return /* @__PURE__ */ React216.createElement(
@@ -39560,7 +39684,7 @@ function DirectDownloadButton(props) {
39560
39684
  var DirectDownloadButton_default = DirectDownloadButton;
39561
39685
 
39562
39686
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.tsx
39563
- import React217 from "react";
39687
+ import React217, { useState as useState50 } from "react";
39564
39688
  function UploadDocumentField(props) {
39565
39689
  const {
39566
39690
  fileHandleAssociations = [],
@@ -39568,8 +39692,10 @@ function UploadDocumentField(props) {
39568
39692
  id,
39569
39693
  documentName,
39570
39694
  isMultiFileUpload = false,
39571
- onClearAttachment
39695
+ onClearAttachment,
39696
+ isLoading = false
39572
39697
  } = props;
39698
+ const [isUploading, setIsUploading] = useState50(false);
39573
39699
  const { data: fileData } = useGetFileBatch(
39574
39700
  {
39575
39701
  includeFileHandles: true,
@@ -39594,9 +39720,14 @@ function UploadDocumentField(props) {
39594
39720
  FileUpload_default,
39595
39721
  {
39596
39722
  id: `${id}-upload`,
39597
- uploadCallback,
39723
+ onUploadStart: () => setIsUploading(true),
39724
+ onComplete: (res) => {
39725
+ setIsUploading(false);
39726
+ uploadCallback(res);
39727
+ },
39598
39728
  label: `Upload ${documentName}`,
39599
39729
  buttonProps: {
39730
+ disabled: isLoading,
39600
39731
  variant: "outlined",
39601
39732
  endIcon: /* @__PURE__ */ React217.createElement(IconSvg_default, { icon: "upload", wrap: false })
39602
39733
  }
@@ -39630,7 +39761,16 @@ function UploadDocumentField(props) {
39630
39761
  },
39631
39762
  /* @__PURE__ */ React217.createElement(IconSvg_default, { icon: "clear" })
39632
39763
  ));
39633
- })
39764
+ }),
39765
+ isUploading && /* @__PURE__ */ React217.createElement(
39766
+ Button_default,
39767
+ {
39768
+ disabled: true,
39769
+ variant: "text",
39770
+ endIcon: /* @__PURE__ */ React217.createElement(IconSvg_default, { icon: "download", wrap: false })
39771
+ },
39772
+ "Uploading..."
39773
+ )
39634
39774
  );
39635
39775
  }
39636
39776
 
@@ -39679,6 +39819,23 @@ function DocumentTemplate(props) {
39679
39819
  }
39680
39820
 
39681
39821
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm.tsx
39822
+ import { deepEquals } from "@rjsf/utils";
39823
+ function AccessorRequirementHelpText(props) {
39824
+ const { managedACTAccessRequirement } = props;
39825
+ let link = "";
39826
+ let msg = "";
39827
+ if (managedACTAccessRequirement.isCertifiedUserRequired && managedACTAccessRequirement.isValidatedProfileRequired) {
39828
+ link = "https://help.synapse.org/docs/User-Types.2007072795.html";
39829
+ msg = "All data requesters must be certified users and have a validated user profile.";
39830
+ } else if (managedACTAccessRequirement.isCertifiedUserRequired) {
39831
+ link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers";
39832
+ msg = "All data requesters must be a certified user.";
39833
+ } else if (managedACTAccessRequirement.isValidatedProfileRequired) {
39834
+ link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers";
39835
+ msg = "All data requesters must have a validated user profile.";
39836
+ }
39837
+ return link && msg ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, managedACTAccessRequirement.isDUCRequired ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, "This list should match those listed on your DUC.", /* @__PURE__ */ React219.createElement("br", null)) : "", msg, " ", /* @__PURE__ */ React219.createElement(Link_default, { href: link, target: "_blank", rel: "noreferrer" }, "Learn more")) : /* @__PURE__ */ React219.createElement(React219.Fragment, null);
39838
+ }
39682
39839
  function DataAccessRequestAccessorsFilesForm(props) {
39683
39840
  const {
39684
39841
  onSubmissionCreated,
@@ -39687,45 +39844,19 @@ function DataAccessRequestAccessorsFilesForm(props) {
39687
39844
  researchProjectId,
39688
39845
  onCancel
39689
39846
  } = props;
39690
- const { data: user } = useGetCurrentUserProfile();
39691
- const [alert2, setAlert] = useState50();
39692
- const [dataAccessRequest, setDataAccessRequest] = useState50();
39693
- useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {
39694
- // We append the current user onto the accessorChanges, so we wait for that data to populate
39695
- enabled: !!user,
39847
+ const { accessToken } = useSynapseContext();
39848
+ const isLoggedIn = Boolean(accessToken);
39849
+ const { data: user } = useGetCurrentUserProfile({ enabled: isLoggedIn });
39850
+ const [alert2, setAlert] = useState51();
39851
+ const [accessorChanges, setAccessorChanges] = useState51();
39852
+ const [summaryOfUse, setSummaryOfUse] = useState51();
39853
+ const [publication, setPublication] = useState51();
39854
+ const { data: dataAccessRequest, isLoading: isLoadingGetDataAccessRequest } = useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {
39855
+ enabled: isLoggedIn,
39696
39856
  // Infinite staleTime ensures this won't get re-fetched unless explicitly invalidated by the mutation
39697
39857
  staleTime: Infinity,
39698
- select: (data) => {
39699
- const isRenewal2 = data.concreteType === "org.sagebionetworks.repo.model.dataaccess.Renewal";
39700
- const currentUserWithGainAccess = {
39701
- userId: user.ownerId,
39702
- type: isRenewal2 ? "RENEW_ACCESS" /* RENEW_ACCESS */ : "GAIN_ACCESS" /* GAIN_ACCESS */
39703
- };
39704
- if (!data.accessorChanges) {
39705
- data.accessorChanges = [currentUserWithGainAccess];
39706
- } else {
39707
- data.accessorChanges = [
39708
- currentUserWithGainAccess,
39709
- ...data.accessorChanges
39710
- ];
39711
- }
39712
- const seen = /* @__PURE__ */ new Set();
39713
- data.accessorChanges = data.accessorChanges.filter((accessorChange) => {
39714
- return seen.has(accessorChange.userId) ? false : seen.add(accessorChange.userId);
39715
- });
39716
- data.researchProjectId = researchProjectId;
39717
- return data;
39718
- },
39719
- onSuccess: (data) => {
39720
- setAlert(void 0);
39721
- setDataAccessRequest(data);
39722
- },
39723
- onError: (err) => {
39724
- setAlert({
39725
- key: "error",
39726
- message: err.reason
39727
- });
39728
- }
39858
+ // This call should never fail, so if we run into an error, throwing to an error boundary is acceptable
39859
+ useErrorBoundary: true
39729
39860
  });
39730
39861
  const isRenewal = dataAccessRequest?.concreteType === "org.sagebionetworks.repo.model.dataaccess.Renewal";
39731
39862
  function onError(e) {
@@ -39735,24 +39866,93 @@ function DataAccessRequestAccessorsFilesForm(props) {
39735
39866
  message: getErrorMessage(e.reason)
39736
39867
  });
39737
39868
  }
39738
- const { mutate: submit } = useSubmitDataAccessRequest({
39869
+ const { mutate: submit, isLoading: isLoadingSubmitDataAccessRequest } = useSubmitDataAccessRequest({
39739
39870
  onSuccess: () => {
39740
39871
  onSubmissionCreated();
39741
39872
  },
39742
39873
  onError
39743
39874
  });
39744
- const { mutateAsync: updateRequestAsync } = useUpdateDataAccessRequest({
39875
+ const {
39876
+ mutateAsync: updateRequestAsync,
39877
+ isLoading: isLoadingUpdateDataAccessRequest
39878
+ } = useUpdateDataAccessRequest({
39745
39879
  onError
39746
39880
  });
39881
+ const isLoading = isLoadingGetDataAccessRequest || isLoadingUpdateDataAccessRequest || isLoadingSubmitDataAccessRequest;
39882
+ useEffect47(() => {
39883
+ if (dataAccessRequest && user) {
39884
+ let shouldUpdate = false;
39885
+ if (!dataAccessRequest.researchProjectId) {
39886
+ dataAccessRequest.researchProjectId = researchProjectId;
39887
+ shouldUpdate = true;
39888
+ }
39889
+ const currentUserWithGainAccess = {
39890
+ userId: user.ownerId,
39891
+ type: isRenewal ? AccessType.RENEW_ACCESS : AccessType.GAIN_ACCESS
39892
+ };
39893
+ if (!dataAccessRequest.accessorChanges || !dataAccessRequest.accessorChanges.find(
39894
+ (item) => deepEquals(item, currentUserWithGainAccess)
39895
+ )) {
39896
+ dataAccessRequest.accessorChanges = [
39897
+ currentUserWithGainAccess,
39898
+ ...dataAccessRequest.accessorChanges || []
39899
+ ];
39900
+ shouldUpdate = true;
39901
+ }
39902
+ const seen = /* @__PURE__ */ new Set();
39903
+ const uniqueAccessorChanges = dataAccessRequest.accessorChanges.filter(
39904
+ (accessorChange) => {
39905
+ return seen.has(accessorChange.userId) ? false : seen.add(accessorChange.userId);
39906
+ }
39907
+ );
39908
+ if (uniqueAccessorChanges.length !== dataAccessRequest.accessorChanges.length) {
39909
+ dataAccessRequest.accessorChanges = uniqueAccessorChanges;
39910
+ shouldUpdate = true;
39911
+ }
39912
+ if (shouldUpdate) {
39913
+ updateRequestAsync(dataAccessRequest);
39914
+ }
39915
+ }
39916
+ }, [
39917
+ dataAccessRequest,
39918
+ isRenewal,
39919
+ researchProjectId,
39920
+ updateRequestAsync,
39921
+ user
39922
+ ]);
39923
+ useEffect47(() => {
39924
+ if (dataAccessRequest) {
39925
+ if (dataAccessRequest.accessorChanges && accessorChanges == void 0) {
39926
+ setAccessorChanges(dataAccessRequest.accessorChanges);
39927
+ }
39928
+ if (isRenewal && dataAccessRequest.publication && publication == void 0) {
39929
+ setPublication(dataAccessRequest.publication);
39930
+ }
39931
+ if (isRenewal && dataAccessRequest.summaryOfUse && summaryOfUse == void 0) {
39932
+ setSummaryOfUse(dataAccessRequest.summaryOfUse);
39933
+ }
39934
+ }
39935
+ }, [dataAccessRequest]);
39936
+ function getDataAccessRequestWithLocalState() {
39937
+ return {
39938
+ ...dataAccessRequest,
39939
+ // append local state to the request
39940
+ accessorChanges,
39941
+ publication,
39942
+ summaryOfUse
39943
+ };
39944
+ }
39747
39945
  async function handleSubmit() {
39748
39946
  if (dataAccessRequest) {
39749
- const requestObject = await updateRequestAsync(dataAccessRequest);
39947
+ const requestObject = await updateRequestAsync(
39948
+ getDataAccessRequestWithLocalState()
39949
+ );
39750
39950
  submit({
39751
39951
  request: {
39752
39952
  requestId: requestObject.id,
39753
39953
  requestEtag: requestObject.etag,
39754
39954
  subjectId: entityId,
39755
- subjectType: "ENTITY" /* ENTITY */
39955
+ subjectType: RestrictableObjectType.ENTITY
39756
39956
  },
39757
39957
  accessRequirementId: String(managedACTAccessRequirement.id)
39758
39958
  });
@@ -39762,41 +39962,30 @@ function DataAccessRequestAccessorsFilesForm(props) {
39762
39962
  return /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement("strong", null, "Sorry, there is an error in submitting your request."), /* @__PURE__ */ React219.createElement("br", null), reason);
39763
39963
  };
39764
39964
  const onAccessorChange = (updater) => {
39765
- setDataAccessRequest((req) => ({
39766
- ...req,
39767
- // Copy the array so the caller doesn't have to worry about immutability
39768
- accessorChanges: [...updater(req.accessorChanges || [])]
39769
- }));
39965
+ setAccessorChanges([...updater(accessorChanges || [])]);
39770
39966
  };
39771
39967
  const onClearAttachment = (fid) => {
39772
- setDataAccessRequest((req) => {
39773
- if (req) {
39774
- return {
39775
- ...req,
39776
- attachments: req.attachments?.filter((item) => item !== fid)
39777
- };
39778
- }
39779
- return req;
39968
+ updateRequestAsync({
39969
+ ...dataAccessRequest,
39970
+ attachments: dataAccessRequest.attachments?.filter((item) => item !== fid)
39780
39971
  });
39781
39972
  };
39782
39973
  const uploadCallback = (data, context) => {
39783
39974
  if (data.resp && data.success) {
39784
39975
  const uploadResponse = data.resp;
39785
39976
  if (context === "attachments") {
39786
- setDataAccessRequest((req) => {
39787
- return {
39788
- ...req,
39789
- attachments: [
39790
- ...req.attachments || [],
39791
- uploadResponse.fileHandleId
39792
- ]
39793
- };
39977
+ updateRequestAsync({
39978
+ ...dataAccessRequest,
39979
+ attachments: [
39980
+ ...dataAccessRequest.attachments || [],
39981
+ uploadResponse.fileHandleId
39982
+ ]
39794
39983
  });
39795
39984
  } else {
39796
- setDataAccessRequest((req) => ({
39797
- ...req,
39985
+ updateRequestAsync({
39986
+ ...dataAccessRequest,
39798
39987
  [context]: uploadResponse.fileHandleId
39799
- }));
39988
+ });
39800
39989
  }
39801
39990
  } else if (!data.success && data.error) {
39802
39991
  console.log(
@@ -39809,46 +39998,24 @@ function DataAccessRequestAccessorsFilesForm(props) {
39809
39998
  });
39810
39999
  }
39811
40000
  };
39812
- const handleTextAreaInputChange = (e, key) => {
39813
- const value = e.target.value;
39814
- setDataAccessRequest((req) => ({
39815
- ...req,
39816
- [key]: value
39817
- }));
39818
- };
39819
- const AccessorRequirementHelpText = () => {
39820
- let link = "";
39821
- let msg = "";
39822
- if (managedACTAccessRequirement.isCertifiedUserRequired && managedACTAccessRequirement.isValidatedProfileRequired) {
39823
- link = "https://help.synapse.org/docs/User-Types.2007072795.html";
39824
- msg = "All data requesters must be certified users and have a validated user profile.";
39825
- } else if (managedACTAccessRequirement.isCertifiedUserRequired) {
39826
- link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers";
39827
- msg = "All data requesters must be a certified user.";
39828
- } else if (managedACTAccessRequirement.isValidatedProfileRequired) {
39829
- link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers";
39830
- msg = "All data requesters must have a validated user profile.";
39831
- }
39832
- return link && msg ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, managedACTAccessRequirement.isDUCRequired ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, "This list should match those listed on your DUC.", /* @__PURE__ */ React219.createElement("br", null)) : "", msg, " ", /* @__PURE__ */ React219.createElement(Link_default, { href: link, target: "_blank", rel: "noreferrer" }, "Learn more")) : /* @__PURE__ */ React219.createElement(React219.Fragment, null);
39833
- };
39834
40001
  const ducFileHandleAssociation = dataAccessRequest?.ducFileHandleId ? [
39835
40002
  {
39836
40003
  fileHandleId: dataAccessRequest?.ducFileHandleId,
39837
- associateObjectType: "AccessRequirementAttachment" /* AccessRequirementAttachment */,
39838
- associateObjectId: String(managedACTAccessRequirement.id)
40004
+ associateObjectType: FileHandleAssociateType.DataAccessRequestAttachment,
40005
+ associateObjectId: String(dataAccessRequest.id)
39839
40006
  }
39840
40007
  ] : [];
39841
40008
  const irbFileHandleAssociation = dataAccessRequest?.irbFileHandleId ? [
39842
40009
  {
39843
40010
  fileHandleId: dataAccessRequest.irbFileHandleId,
39844
- associateObjectType: "AccessRequirementAttachment" /* AccessRequirementAttachment */,
39845
- associateObjectId: String(managedACTAccessRequirement.id)
40011
+ associateObjectType: FileHandleAssociateType.DataAccessRequestAttachment,
40012
+ associateObjectId: String(dataAccessRequest.id)
39846
40013
  }
39847
40014
  ] : [];
39848
40015
  const attachmentFileHandleAssociations = (dataAccessRequest?.attachments || []).map((attachmentFileHandleId) => ({
39849
40016
  fileHandleId: attachmentFileHandleId,
39850
- associateObjectType: "AccessRequirementAttachment" /* AccessRequirementAttachment */,
39851
- associateObjectId: String(managedACTAccessRequirement.id)
40017
+ associateObjectType: FileHandleAssociateType.DataAccessRequestAttachment,
40018
+ associateObjectId: String(dataAccessRequest.id)
39852
40019
  })) ?? [];
39853
40020
  return /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(DialogTitle_default, null, /* @__PURE__ */ React219.createElement(Stack_default, { direction: "row", alignItems: "center", gap: "5px" }, "Request Access", /* @__PURE__ */ React219.createElement(Box_default, { sx: { flexGrow: 1 } }), /* @__PURE__ */ React219.createElement(IconButton_default, { onClick: props.onHide }, /* @__PURE__ */ React219.createElement(IconSvg_default, { icon: "close", wrap: false, sx: { color: "grey.700" } })))), /* @__PURE__ */ React219.createElement(DialogContent_default, null, /* @__PURE__ */ React219.createElement(
39854
40021
  ManagedACTAccessRequirementFormWikiWrapper,
@@ -39866,13 +40033,18 @@ function DataAccessRequestAccessorsFilesForm(props) {
39866
40033
  onSubmit: (e) => e.preventDefault()
39867
40034
  },
39868
40035
  /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { mb: 2 } }, "Please provide the information below to submit the request for access."),
39869
- dataAccessRequest && /* @__PURE__ */ React219.createElement(
40036
+ dataAccessRequest && user && /* @__PURE__ */ React219.createElement(
39870
40037
  DataAccessRequestAccessorsEditor,
39871
40038
  {
39872
- accessorChanges: dataAccessRequest.accessorChanges || [],
40039
+ accessorChanges: accessorChanges || [],
39873
40040
  onChange: onAccessorChange,
39874
40041
  isRenewal,
39875
- helpText: /* @__PURE__ */ React219.createElement(AccessorRequirementHelpText, null)
40042
+ helpText: /* @__PURE__ */ React219.createElement(
40043
+ AccessorRequirementHelpText,
40044
+ {
40045
+ managedACTAccessRequirement
40046
+ }
40047
+ )
39876
40048
  }
39877
40049
  ),
39878
40050
  (managedACTAccessRequirement?.isDUCRequired || managedACTAccessRequirement?.isIRBApprovalRequired || managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } }),
@@ -39883,61 +40055,66 @@ function DataAccessRequestAccessorsFilesForm(props) {
39883
40055
  description: "As a first step, you will need to download the most current version of the Data Use Certificate.",
39884
40056
  fileHandleAssociation: {
39885
40057
  fileHandleId: managedACTAccessRequirement.ducTemplateFileHandleId,
39886
- associateObjectType: "AccessRequirementAttachment" /* AccessRequirementAttachment */,
40058
+ associateObjectType: FileHandleAssociateType.AccessRequirementAttachment,
39887
40059
  associateObjectId: String(managedACTAccessRequirement.id)
39888
40060
  },
39889
40061
  downloadButtonText: "Download DUC Template"
39890
40062
  }
39891
- ), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { mt: 4, mb: 2 } }, "Fill out and upload a Data Use Certificate"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must download and fill out a Data Use Certificate (DUC). Be sure to upload the completed DUC below once you've completed it."), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", component: "ol" }, /* @__PURE__ */ React219.createElement("li", null, "Download the DUC template file."), /* @__PURE__ */ React219.createElement("li", null, "Fill out the DUC template, following the instructions in the file."), /* @__PURE__ */ React219.createElement("li", null, "Upload the completed certificate using the button below:")), /* @__PURE__ */ React219.createElement(
40063
+ ), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { mt: 4, mb: 2 } }, "Fill out and upload a Data Use Certificate"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must download and fill out a Data Use Certificate (DUC). Be sure to upload the completed DUC below once you've completed it."), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", component: "ol" }, /* @__PURE__ */ React219.createElement("li", null, "Download the DUC template file."), /* @__PURE__ */ React219.createElement("li", null, "Fill out the DUC template, following the instructions in the file."), /* @__PURE__ */ React219.createElement("li", null, "Upload the completed certificate using the button below:")), /* @__PURE__ */ React219.createElement(SynapseErrorBoundary, null, /* @__PURE__ */ React219.createElement(
39892
40064
  UploadDocumentField,
39893
40065
  {
39894
40066
  id: "duc",
40067
+ isLoading,
39895
40068
  uploadCallback: (resp) => uploadCallback(resp, "ducFileHandleId"),
39896
40069
  documentName: "Data Use Certificate",
39897
40070
  fileHandleAssociations: ducFileHandleAssociation
39898
40071
  }
39899
- ), (managedACTAccessRequirement?.isIRBApprovalRequired || managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
39900
- managedACTAccessRequirement?.isIRBApprovalRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "IRB Approval"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "Upload a signed IRB letter on institutional letterhead. The letter must include the names of all the datasets requested, as well as the names of the data requesters above. Use the button below to upload the document."), /* @__PURE__ */ React219.createElement(
40072
+ )), (managedACTAccessRequirement?.isIRBApprovalRequired || managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
40073
+ managedACTAccessRequirement?.isIRBApprovalRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "IRB Approval"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "Upload a signed IRB letter on institutional letterhead. The letter must include the names of all the datasets requested, as well as the names of the data requesters above. Use the button below to upload the document."), /* @__PURE__ */ React219.createElement(SynapseErrorBoundary, null, /* @__PURE__ */ React219.createElement(
39901
40074
  UploadDocumentField,
39902
40075
  {
39903
40076
  id: "irb",
40077
+ isLoading,
39904
40078
  documentName: "IRB Approval Letter",
39905
40079
  uploadCallback: (resp) => uploadCallback(resp, "irbFileHandleId"),
39906
40080
  fileHandleAssociations: irbFileHandleAssociation
39907
40081
  }
39908
- ), (managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
40082
+ )), (managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
39909
40083
  /* Attachments */
39910
- managedACTAccessRequirement?.areOtherAttachmentsRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "Upload other required documents"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must upload other required documents. Please review the instructions to gain data access to determine which documents must also be uploaded."), /* @__PURE__ */ React219.createElement(
40084
+ managedACTAccessRequirement?.areOtherAttachmentsRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "Upload other required documents"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must upload other required documents. Please review the instructions to gain data access to determine which documents must also be uploaded."), /* @__PURE__ */ React219.createElement(SynapseErrorBoundary, null, /* @__PURE__ */ React219.createElement(
39911
40085
  UploadDocumentField,
39912
40086
  {
39913
40087
  id: "file-attachment",
40088
+ isLoading,
39914
40089
  documentName: "Attachment",
39915
40090
  uploadCallback: (res) => uploadCallback(res, "attachments"),
39916
40091
  isMultiFileUpload: true,
39917
40092
  fileHandleAssociations: attachmentFileHandleAssociations,
39918
40093
  onClearAttachment
39919
40094
  }
39920
- ), isRenewal && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
40095
+ )), isRenewal && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
39921
40096
  // Publications & Summary of Use
39922
40097
  isRenewal && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(
39923
40098
  TextField3,
39924
40099
  {
39925
40100
  id: "publications",
39926
40101
  label: "Publication(s)",
40102
+ disabled: isLoadingSubmitDataAccessRequest,
39927
40103
  multiline: true,
39928
40104
  rows: 3,
39929
- value: dataAccessRequest?.publication,
39930
- onChange: (e) => handleTextAreaInputChange(e, "publication")
40105
+ value: publication,
40106
+ onChange: (e) => setPublication(e.target.value)
39931
40107
  }
39932
40108
  ), /* @__PURE__ */ React219.createElement(
39933
40109
  TextField3,
39934
40110
  {
39935
40111
  id: "summaryOfUse",
39936
40112
  label: "Summary of use",
39937
- value: dataAccessRequest?.summaryOfUse,
40113
+ value: summaryOfUse,
40114
+ disabled: isLoadingSubmitDataAccessRequest,
39938
40115
  multiline: true,
39939
40116
  rows: 3,
39940
- onChange: (e) => handleTextAreaInputChange(e, "summaryOfUse")
40117
+ onChange: (e) => setSummaryOfUse(e.target.value)
39941
40118
  }
39942
40119
  ))
39943
40120
  )
@@ -39945,9 +40122,10 @@ function DataAccessRequestAccessorsFilesForm(props) {
39945
40122
  Button_default,
39946
40123
  {
39947
40124
  variant: "outlined",
40125
+ disabled: isLoadingSubmitDataAccessRequest,
39948
40126
  onClick: () => {
39949
40127
  if (dataAccessRequest) {
39950
- onCancel(dataAccessRequest);
40128
+ onCancel(getDataAccessRequestWithLocalState());
39951
40129
  }
39952
40130
  }
39953
40131
  },
@@ -39956,6 +40134,7 @@ function DataAccessRequestAccessorsFilesForm(props) {
39956
40134
  Button_default,
39957
40135
  {
39958
40136
  variant: "contained",
40137
+ disabled: isLoadingSubmitDataAccessRequest,
39959
40138
  onClick: () => {
39960
40139
  handleSubmit();
39961
40140
  }
@@ -40182,7 +40361,7 @@ function ValidationRequirement() {
40182
40361
  import React230 from "react";
40183
40362
 
40184
40363
  // src/components/Authentication/TwoFactorEnrollmentForm.tsx
40185
- import React229, { useEffect as useEffect46, useRef as useRef36, useState as useState51 } from "react";
40364
+ import React229, { useEffect as useEffect48, useRef as useRef36, useState as useState52 } from "react";
40186
40365
 
40187
40366
  // src/components/styled/LeftRightPanel.tsx
40188
40367
  import React227 from "react";
@@ -40330,9 +40509,9 @@ var SectionInnerGrid = styled_default(
40330
40509
  var TWO_FACTOR_DOCS_LINK = "https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#Adding-Two-Factor-Authentication-(2FA)-to-your-account";
40331
40510
  function TwoFactorEnrollmentForm(props) {
40332
40511
  const { onTwoFactorEnrollmentSuccess, onBackClicked } = props;
40333
- const [totp, setTotp] = useState51("");
40334
- const [hasQrCode, setHasQrCode] = useState51(false);
40335
- const [showSecretInModal, setShowSecretInModal] = useState51(false);
40512
+ const [totp, setTotp] = useState52("");
40513
+ const [hasQrCode, setHasQrCode] = useState52(false);
40514
+ const [showSecretInModal, setShowSecretInModal] = useState52(false);
40336
40515
  const { data: currentUserEmail } = useGetNotificationEmail();
40337
40516
  const qrCodeCanvasElement = useRef36(null);
40338
40517
  const { mutate: start2FAEnrollment2, data: totpSecret } = useStartTwoFactorEnrollment();
@@ -40343,10 +40522,10 @@ function TwoFactorEnrollmentForm(props) {
40343
40522
  } = useFinishTwoFactorEnrollment({
40344
40523
  onSuccess: onTwoFactorEnrollmentSuccess
40345
40524
  });
40346
- useEffect46(() => {
40525
+ useEffect48(() => {
40347
40526
  start2FAEnrollment2();
40348
40527
  }, []);
40349
- useEffect46(() => {
40528
+ useEffect48(() => {
40350
40529
  async function createQrCode() {
40351
40530
  if (totpSecret && currentUserEmail && qrCodeCanvasElement.current) {
40352
40531
  await toCanvas(
@@ -40534,13 +40713,13 @@ function TwoFactorAuthEnabledRequirement() {
40534
40713
  }
40535
40714
 
40536
40715
  // src/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.tsx
40537
- import React231, { useState as useState52 } from "react";
40716
+ import React231, { useState as useState53 } from "react";
40538
40717
  function UnmanagedACTAccessRequirementItem(props) {
40539
40718
  const { accessRequirement, entityId, onHide } = props;
40540
40719
  const { accessToken } = useSynapseContext();
40541
40720
  const { data: accessRequirementStatus, isLoading: isLoadingStatus } = useGetAccessRequirementStatus(String(accessRequirement.id));
40542
40721
  const isApproved = accessRequirementStatus?.isApproved;
40543
- const [showACTContactInfoInstructions, setShowACTContactInfoInstructions] = useState52(false);
40722
+ const [showACTContactInfoInstructions, setShowACTContactInfoInstructions] = useState53(false);
40544
40723
  let acceptButtonText = "";
40545
40724
  if (window.location.hostname === "www.synapse.org" || window.location.hostname === "staging.synapse.org") {
40546
40725
  acceptButtonText = "Request access";
@@ -40596,7 +40775,7 @@ function UnmanagedACTAccessRequirementItem(props) {
40596
40775
 
40597
40776
  // src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItem.tsx
40598
40777
  import React232 from "react";
40599
- import { useState as useState53 } from "react";
40778
+ import { useState as useState54 } from "react";
40600
40779
  function ManagedACTAccessRequirementItem(props) {
40601
40780
  const { accessRequirement, onHide, onRequestAccess } = props;
40602
40781
  const { data: wikiPage } = useGetAccessRequirementWikiPageKey(
@@ -40614,9 +40793,9 @@ function ManagedACTAccessRequirementItem(props) {
40614
40793
  });
40615
40794
  }
40616
40795
  });
40617
- const [hideMarkdown, setHideMarkdown] = useState53(true);
40618
- const [alert2, setAlert] = useState53();
40619
- const isApproved = accessRequirementStatus?.currentSubmissionStatus?.state === "APPROVED" /* APPROVED */;
40796
+ const [hideMarkdown, setHideMarkdown] = useState54(true);
40797
+ const [alert2, setAlert] = useState54();
40798
+ const isApproved = accessRequirementStatus?.currentSubmissionStatus?.state === SubmissionState.APPROVED;
40620
40799
  let markdown = /* @__PURE__ */ React232.createElement(React232.Fragment, null);
40621
40800
  if (wikiPage) {
40622
40801
  markdown = /* @__PURE__ */ React232.createElement(
@@ -40639,8 +40818,8 @@ function ManagedACTAccessRequirementItem(props) {
40639
40818
  },
40640
40819
  alert2.message
40641
40820
  ),
40642
- accessRequirementStatus?.currentSubmissionStatus?.state === "SUBMITTED" /* SUBMITTED */ && /* @__PURE__ */ React232.createElement(Alert_default, { className: "access-requirement-list-alert", severity: "info" }, /* @__PURE__ */ React232.createElement("strong", null, "You have submitted a data access request.")),
40643
- accessRequirementStatus?.currentSubmissionStatus?.state === "APPROVED" /* APPROVED */ && /* @__PURE__ */ React232.createElement(
40821
+ accessRequirementStatus?.currentSubmissionStatus?.state === SubmissionState.SUBMITTED && /* @__PURE__ */ React232.createElement(Alert_default, { className: "access-requirement-list-alert", severity: "info" }, /* @__PURE__ */ React232.createElement("strong", null, "You have submitted a data access request.")),
40822
+ accessRequirementStatus?.currentSubmissionStatus?.state === SubmissionState.APPROVED && /* @__PURE__ */ React232.createElement(
40644
40823
  Alert_default,
40645
40824
  {
40646
40825
  className: "access-requirement-list-alert",
@@ -40648,8 +40827,8 @@ function ManagedACTAccessRequirementItem(props) {
40648
40827
  },
40649
40828
  /* @__PURE__ */ React232.createElement("strong", null, "Your data access request has been approved.")
40650
40829
  ),
40651
- accessRequirementStatus?.currentSubmissionStatus?.state === "REJECTED" /* REJECTED */ && /* @__PURE__ */ React232.createElement(Alert_default, { className: "access-requirement-list-alert", severity: "error" }, /* @__PURE__ */ React232.createElement(React232.Fragment, null, /* @__PURE__ */ React232.createElement("strong", null, "Your data access request has been rejected."), /* @__PURE__ */ React232.createElement("br", null), accessRequirementStatus?.currentSubmissionStatus.rejectedReason || "")),
40652
- accessRequirementStatus?.currentSubmissionStatus?.state === "CANCELLED" /* CANCELLED */ && /* @__PURE__ */ React232.createElement(
40830
+ accessRequirementStatus?.currentSubmissionStatus?.state === SubmissionState.REJECTED && /* @__PURE__ */ React232.createElement(Alert_default, { className: "access-requirement-list-alert", severity: "error" }, /* @__PURE__ */ React232.createElement(React232.Fragment, null, /* @__PURE__ */ React232.createElement("strong", null, "Your data access request has been rejected."), /* @__PURE__ */ React232.createElement("br", null), accessRequirementStatus?.currentSubmissionStatus.rejectedReason || "")),
40831
+ accessRequirementStatus?.currentSubmissionStatus?.state === SubmissionState.CANCELLED && /* @__PURE__ */ React232.createElement(
40653
40832
  Alert_default,
40654
40833
  {
40655
40834
  className: "access-requirement-list-alert",
@@ -40673,16 +40852,16 @@ function ManagedACTAccessRequirementItem(props) {
40673
40852
  children: "I do not accept"
40674
40853
  });
40675
40854
  } else if ([
40676
- "APPROVED" /* APPROVED */,
40677
- "REJECTED" /* REJECTED */,
40678
- "CANCELLED" /* CANCELLED */
40855
+ SubmissionState.APPROVED,
40856
+ SubmissionState.REJECTED,
40857
+ SubmissionState.CANCELLED
40679
40858
  ].includes(accessRequirementStatus.currentSubmissionStatus.state)) {
40680
40859
  actions.push({
40681
40860
  variant: "outlined",
40682
40861
  onClick: onRequestAccess,
40683
40862
  children: "Update Request"
40684
40863
  });
40685
- } else if (accessRequirementStatus.currentSubmissionStatus.state === "SUBMITTED" /* SUBMITTED */) {
40864
+ } else if (accessRequirementStatus.currentSubmissionStatus.state === SubmissionState.SUBMITTED) {
40686
40865
  actions.push({
40687
40866
  variant: "outlined",
40688
40867
  onClick: () => {
@@ -40698,14 +40877,14 @@ function ManagedACTAccessRequirementItem(props) {
40698
40877
  let requirementItemState = "LOADING" /* LOADING */;
40699
40878
  if (!isLoading) {
40700
40879
  switch (accessRequirementStatus?.currentSubmissionStatus?.state) {
40701
- case "APPROVED" /* APPROVED */:
40880
+ case SubmissionState.APPROVED:
40702
40881
  requirementItemState = "COMPLETE" /* COMPLETE */;
40703
40882
  break;
40704
- case "SUBMITTED" /* SUBMITTED */:
40883
+ case SubmissionState.SUBMITTED:
40705
40884
  requirementItemState = "PENDING" /* PENDING */;
40706
40885
  break;
40707
- case "REJECTED" /* REJECTED */:
40708
- case "CANCELLED" /* CANCELLED */:
40886
+ case SubmissionState.REJECTED:
40887
+ case SubmissionState.CANCELLED:
40709
40888
  default:
40710
40889
  requirementItemState = "LOCKED" /* LOCKED */;
40711
40890
  }
@@ -40735,7 +40914,7 @@ function ManagedACTAccessRequirementItem(props) {
40735
40914
  import React234 from "react";
40736
40915
 
40737
40916
  // src/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.tsx
40738
- import React233, { useState as useState54 } from "react";
40917
+ import React233, { useState as useState55 } from "react";
40739
40918
  function SelfSignAccessRequirementItem(props) {
40740
40919
  const { accessRequirement, onHide } = props;
40741
40920
  const { accessToken } = useSynapseContext();
@@ -40752,7 +40931,7 @@ function SelfSignAccessRequirementItem(props) {
40752
40931
  // TermsOfUse ARs have the terms embedded in the AR, there is no Wiki.
40753
40932
  { enabled: !isTermsOfUse }
40754
40933
  );
40755
- const [showTerms, setShowTerms] = useState54(false);
40934
+ const [showTerms, setShowTerms] = useState55(false);
40756
40935
  const {
40757
40936
  mutate: createAccessApproval2,
40758
40937
  isLoading,
@@ -40767,7 +40946,7 @@ function SelfSignAccessRequirementItem(props) {
40767
40946
  requirementId: accessRequirement?.id,
40768
40947
  submitterId: user?.ownerId,
40769
40948
  accessorId: user?.ownerId,
40770
- state: "APPROVED" /* APPROVED */
40949
+ state: ApprovalState.APPROVED
40771
40950
  };
40772
40951
  createAccessApproval2(accessApprovalRequest);
40773
40952
  };
@@ -40905,12 +41084,12 @@ function AccessRequirementList(props) {
40905
41084
  } = props;
40906
41085
  const { accessToken } = useSynapseContext();
40907
41086
  const isSignedIn = !!accessToken;
40908
- const [requestDataStep, setRequestDataStep] = useState55(
41087
+ const [requestDataStep, setRequestDataStep] = useState56(
40909
41088
  0 /* SHOW_ALL_ARS */
40910
41089
  );
40911
- const [managedACTAccessRequirement, setManagedACTAccessRequirement] = useState55();
40912
- const [researchProjectId, setResearchProjectId] = useState55("");
40913
- const [dataAccessRequest, setDataAccessRequest] = useState55();
41090
+ const [managedACTAccessRequirement, setManagedACTAccessRequirement] = useState56();
41091
+ const [researchProjectId, setResearchProjectId] = useState56("");
41092
+ const [dataAccessRequest, setDataAccessRequest] = useState56();
40914
41093
  const entityHeaderProps = {
40915
41094
  ids: [entityId],
40916
41095
  type: "ENTITY_HEADER"
@@ -41879,7 +42058,7 @@ var MeetAccessRequirementCard = ({ accessRequirementId, count }) => {
41879
42058
  accessRequirementId,
41880
42059
  { useErrorBoundary: true }
41881
42060
  );
41882
- const [isShowingAccessRequirement, setIsShowingAccessRequirement] = useState56(false);
42061
+ const [isShowingAccessRequirement, setIsShowingAccessRequirement] = useState57(false);
41883
42062
  let title = void 0;
41884
42063
  let iconType = "";
41885
42064
  let description = "";
@@ -41983,7 +42162,7 @@ var RequestDownloadCard = ({
41983
42162
  };
41984
42163
 
41985
42164
  // src/components/DownloadCart/EnableTwoFaRequirementCard.tsx
41986
- import React274, { useState as useState57 } from "react";
42165
+ import React274, { useState as useState58 } from "react";
41987
42166
  var REQUIRES_2FA_CARD_TITLE = "Requires Two-Factor Authentication";
41988
42167
  function EnableTwoFaRequirementCard(props) {
41989
42168
  const { accessRequirementId, count } = props;
@@ -41993,7 +42172,7 @@ function EnableTwoFaRequirementCard(props) {
41993
42172
  useErrorBoundary: true
41994
42173
  }
41995
42174
  );
41996
- const [isShowingAccessRequirement, setIsShowingAccessRequirement] = useState57(false);
42175
+ const [isShowingAccessRequirement, setIsShowingAccessRequirement] = useState58(false);
41997
42176
  return /* @__PURE__ */ React274.createElement(React274.Fragment, null, /* @__PURE__ */ React274.createElement(
41998
42177
  ActionRequiredCard,
41999
42178
  {
@@ -42184,7 +42363,7 @@ var Search2 = class extends React278.Component {
42184
42363
  if (columnModel?.columnType.endsWith("_LIST")) {
42185
42364
  const columnMultiValueQueryFilter = {
42186
42365
  columnName,
42187
- function: "HAS_LIKE" /* HAS_LIKE */,
42366
+ function: ColumnMultiValueFunction.HAS_LIKE,
42188
42367
  values: [`%${searchText}%`],
42189
42368
  concreteType: "org.sagebionetworks.repo.model.table.ColumnMultiValueFunctionQueryFilter"
42190
42369
  };
@@ -42192,7 +42371,7 @@ var Search2 = class extends React278.Component {
42192
42371
  } else {
42193
42372
  const columnSingleValueQueryFilter = {
42194
42373
  columnName,
42195
- operator: "LIKE" /* LIKE */,
42374
+ operator: ColumnSingleValueFilterOperator.LIKE,
42196
42375
  values: [`%${searchText}%`],
42197
42376
  concreteType: "org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter"
42198
42377
  };
@@ -42212,11 +42391,11 @@ var Search2 = class extends React278.Component {
42212
42391
  };
42213
42392
  isSupportedColumn = (columnModel) => {
42214
42393
  switch (columnModel?.columnType) {
42215
- case "FILEHANDLEID" /* FILEHANDLEID */:
42216
- case "ENTITYID" /* ENTITYID */:
42217
- case "DATE" /* DATE */:
42218
- case "DATE_LIST" /* DATE_LIST */:
42219
- case "USERID" /* USERID */:
42394
+ case ColumnTypeEnum.FILEHANDLEID:
42395
+ case ColumnTypeEnum.ENTITYID:
42396
+ case ColumnTypeEnum.DATE:
42397
+ case ColumnTypeEnum.DATE_LIST:
42398
+ case ColumnTypeEnum.USERID:
42220
42399
  return false;
42221
42400
  default:
42222
42401
  return true;
@@ -42338,7 +42517,7 @@ var SearchV2_default = Search2;
42338
42517
 
42339
42518
  // src/components/SqlEditor.tsx
42340
42519
  import { SearchTwoTone as SearchTwoTone2 } from "@mui/icons-material";
42341
- import React279, { useEffect as useEffect47, useRef as useRef37, useState as useState58 } from "react";
42520
+ import React279, { useEffect as useEffect49, useRef as useRef37, useState as useState59 } from "react";
42342
42521
  var helpMessageCopy = "The data within tables and views can be retrieved by using a SQL-like query language either from the web interface or from the programmatic clients.";
42343
42522
  var helpLink = "https://help.synapse.org/docs/Querying-Tables,-Views,-and-Datasets.2667642897.html#QueryingTables,Views,andDatasets-UsingAdvancedSearchQueries";
42344
42523
  var SqlEditor = ({
@@ -42349,9 +42528,9 @@ var SqlEditor = ({
42349
42528
  const {
42350
42529
  topLevelControlsState: { showSqlEditor, showFacetFilter }
42351
42530
  } = useQueryVisualizationContext();
42352
- const [sql, setSql] = useState58("");
42531
+ const [sql, setSql] = useState59("");
42353
42532
  const inputRef = useRef37(null);
42354
- useEffect47(() => {
42533
+ useEffect49(() => {
42355
42534
  if (showSqlEditor) {
42356
42535
  const defaultSql = getLastQueryRequest().query.sql;
42357
42536
  setSql(defaultSql);
@@ -42407,7 +42586,7 @@ var SqlEditor_default = SqlEditor;
42407
42586
 
42408
42587
  // src/components/SynapseTable/TopLevelControls.tsx
42409
42588
  import { cloneDeep as cloneDeep3 } from "lodash-es";
42410
- import React293, { useMemo as useMemo29, useState as useState62 } from "react";
42589
+ import React293, { useMemo as useMemo29, useState as useState63 } from "react";
42411
42590
 
42412
42591
  // src/components/widgets/ElementWithTooltip.tsx
42413
42592
  import React283 from "react";
@@ -42693,10 +42872,10 @@ var DownloadLoginModal = (props) => {
42693
42872
  };
42694
42873
 
42695
42874
  // src/components/ProgrammaticTableDownload/ProgrammaticTableDownload.tsx
42696
- import React286, { useEffect as useEffect48, useMemo as useMemo28, useState as useState60 } from "react";
42875
+ import React286, { useEffect as useEffect50, useMemo as useMemo28, useState as useState61 } from "react";
42697
42876
 
42698
42877
  // src/components/ProgrammaticInstructionsModal.tsx
42699
- import React285, { useState as useState59 } from "react";
42878
+ import React285, { useState as useState60 } from "react";
42700
42879
  var ProgrammaticInstructionsModal = ({
42701
42880
  show,
42702
42881
  title,
@@ -42718,7 +42897,7 @@ var ProgrammaticInstructionsModal = ({
42718
42897
  } else {
42719
42898
  defaultTab = "R" /* R */;
42720
42899
  }
42721
- const [currentTab, setCurrentTab] = useState59(defaultTab);
42900
+ const [currentTab, setCurrentTab] = useState60(defaultTab);
42722
42901
  const installationInstructions = /* @__PURE__ */ React285.createElement(Typography_default, { variant: "body1" }, "Installation instructions are available at our", " ", /* @__PURE__ */ React285.createElement(
42723
42902
  Link_default,
42724
42903
  {
@@ -42794,7 +42973,7 @@ function ProgrammaticTableDownload({
42794
42973
  queryBundleRequest,
42795
42974
  onHide
42796
42975
  }) {
42797
- const [generatedSql, setGeneratedSql] = useState60("...");
42976
+ const [generatedSql, setGeneratedSql] = useState61("...");
42798
42977
  const {
42799
42978
  data: asyncJobStatus,
42800
42979
  isLoading: queryIsLoading,
@@ -42811,7 +42990,7 @@ function ProgrammaticTableDownload({
42811
42990
  );
42812
42991
  const combinedSql = asyncJobStatus?.responseBody?.combinedSql;
42813
42992
  const isLoadingNewBundle = queryIsLoading || newQueryIsFetching;
42814
- useEffect48(() => {
42993
+ useEffect50(() => {
42815
42994
  if (combinedSql && !isLoadingNewBundle) {
42816
42995
  const indexOfFrom = combinedSql.toUpperCase().indexOf("FROM SYN");
42817
42996
  const selectStarTransformedSql = `SELECT * ${combinedSql.substring(
@@ -42970,13 +43149,13 @@ var DownloadOptions = (props) => {
42970
43149
  };
42971
43150
 
42972
43151
  // src/components/SynapseTable/table-top/ColumnSelection.tsx
42973
- import React288, { useState as useState61 } from "react";
43152
+ import React288, { useState as useState62 } from "react";
42974
43153
  import { Dropdown as Dropdown3 } from "react-bootstrap";
42975
43154
  var tooltipColumnSelectionId = "addAndRemoveColumns";
42976
43155
  var ColumnSelection = (props) => {
42977
43156
  const { headers, isColumnSelected, toggleColumnSelection, darkTheme } = props;
42978
43157
  const { getColumnDisplayName } = useQueryVisualizationContext();
42979
- const [show, setShow] = useState61(false);
43158
+ const [show, setShow] = useState62(false);
42980
43159
  const onDropdownClick = (_show, _event, metadata) => {
42981
43160
  if (metadata.source === "rootClose") {
42982
43161
  setShow(false);
@@ -43298,7 +43477,7 @@ var TopLevelControls = (props) => {
43298
43477
  setColumnsToShowInTable
43299
43478
  } = useQueryVisualizationContext();
43300
43479
  const { showCopyToClipboard } = topLevelControlsState;
43301
- const [hasRecentlyCopiedToClipboard, setHasRecentlyCopiedToClipboard] = useState62(false);
43480
+ const [hasRecentlyCopiedToClipboard, setHasRecentlyCopiedToClipboard] = useState63(false);
43302
43481
  const setControlState = (control) => {
43303
43482
  const updatedTopLevelControlsState = {
43304
43483
  [control]: !topLevelControlsState[control]
@@ -43314,7 +43493,7 @@ var TopLevelControls = (props) => {
43314
43493
  ...updatedTopLevelControlsState
43315
43494
  }));
43316
43495
  };
43317
- const [isShowingExportToCavaticaModal, setIsShowingExportToCavaticaModal] = useState62(false);
43496
+ const [isShowingExportToCavaticaModal, setIsShowingExportToCavaticaModal] = useState63(false);
43318
43497
  const refresh = () => {
43319
43498
  setSelectedRows([]);
43320
43499
  executeQueryRequest(getLastQueryRequest());
@@ -43507,20 +43686,20 @@ var TopLevelControls = (props) => {
43507
43686
  var TopLevelControls_default = TopLevelControls;
43508
43687
 
43509
43688
  // src/components/widgets/facet-nav/FacetNav.tsx
43510
- import React309, { useEffect as useEffect50, useMemo as useMemo30, useState as useState69 } from "react";
43689
+ import React309, { useEffect as useEffect52, useMemo as useMemo30, useState as useState70 } from "react";
43511
43690
 
43512
43691
  // src/components/widgets/query-filter/FacetFilterControls.tsx
43513
43692
  import React303 from "react";
43514
43693
  import { useDeepCompareEffectNoCheck as useDeepCompareEffectNoCheck2 } from "use-deep-compare-effect";
43515
43694
 
43516
43695
  // src/components/widgets/query-filter/EnumFacetFilter.tsx
43517
- import React298, { useState as useState64 } from "react";
43696
+ import React298, { useState as useState65 } from "react";
43518
43697
  import { Dropdown as Dropdown4 } from "react-bootstrap";
43519
43698
  import useDeepCompareEffect4 from "use-deep-compare-effect";
43520
43699
 
43521
43700
  // src/components/widgets/Checkbox.tsx
43522
43701
  import { uniqueId as _uniqueId2 } from "lodash-es";
43523
- import React294, { useEffect as useEffect49, useState as useState63 } from "react";
43702
+ import React294, { useEffect as useEffect51, useState as useState64 } from "react";
43524
43703
  var Checkbox = (props) => {
43525
43704
  const {
43526
43705
  checked: propsChecked = false,
@@ -43528,9 +43707,9 @@ var Checkbox = (props) => {
43528
43707
  isSelectAll = false,
43529
43708
  disabled = false
43530
43709
  } = props;
43531
- const [checked, setChecked] = useState63(propsChecked);
43532
- const [uniqueId3] = useState63(_uniqueId2("src-checkbox-"));
43533
- useEffect49(() => {
43710
+ const [checked, setChecked] = useState64(propsChecked);
43711
+ const [uniqueId3] = useState64(_uniqueId2("src-checkbox-"));
43712
+ useEffect51(() => {
43534
43713
  setChecked(propsChecked);
43535
43714
  }, [propsChecked]);
43536
43715
  const handleCheckboxChange = (event) => {
@@ -43656,12 +43835,12 @@ var EnumFacetFilter = ({
43656
43835
  dropdownType = "Icon",
43657
43836
  collapsed = false
43658
43837
  }) => {
43659
- const [isShowAll, setIsShowAll] = useState64(false);
43660
- const [isCollapsed, setIsCollapsed] = useState64(collapsed);
43661
- const [isShowDropdown, setIsShowDropdown] = useState64(false);
43662
- const [showSearch, setShowSearch] = useState64(false);
43663
- const [searchTerm, setSearchText] = useState64("");
43664
- const [filteredSet, setFilteredSet] = useState64(facetValues);
43838
+ const [isShowAll, setIsShowAll] = useState65(false);
43839
+ const [isCollapsed, setIsCollapsed] = useState65(collapsed);
43840
+ const [isShowDropdown, setIsShowDropdown] = useState65(false);
43841
+ const [showSearch, setShowSearch] = useState65(false);
43842
+ const [searchTerm, setSearchText] = useState65("");
43843
+ const [filteredSet, setFilteredSet] = useState65(facetValues);
43665
43844
  useDeepCompareEffect4(() => {
43666
43845
  setFilteredSet(facetValues);
43667
43846
  }, [facetValues]);
@@ -43671,17 +43850,17 @@ var EnumFacetFilter = ({
43671
43850
  const selectedValuesMap = {};
43672
43851
  let timer;
43673
43852
  const allIsSelected = facetValues.filter((item) => item.isSelected).length === 0;
43674
- const userIds = columnModel?.columnType === "USERID" /* USERID */ || columnModel?.columnType === "USERID_LIST" /* USERID_LIST */ ? facetValues.map((facet) => facet.value) : [];
43853
+ const userIds = columnModel?.columnType === ColumnTypeEnum.USERID || columnModel?.columnType === ColumnTypeEnum.USERID_LIST ? facetValues.map((facet) => facet.value) : [];
43675
43854
  const userGroupHeaders = useGetInfoFromIds({
43676
43855
  ids: userIds,
43677
43856
  type: "USER_PROFILE"
43678
43857
  });
43679
- const entityIds = columnModel?.columnType === "ENTITYID" /* ENTITYID */ || columnModel?.columnType === "ENTITYID_LIST" /* ENTITYID_LIST */ ? facetValues.map((facet) => facet.value) : [];
43858
+ const entityIds = columnModel?.columnType === ColumnTypeEnum.ENTITYID || columnModel?.columnType === ColumnTypeEnum.ENTITYID_LIST ? facetValues.map((facet) => facet.value) : [];
43680
43859
  const entityHeaders = useGetInfoFromIds({
43681
43860
  ids: entityIds,
43682
43861
  type: "ENTITY_HEADER"
43683
43862
  });
43684
- const evaluationIds = columnModel?.columnType === "EVALUATIONID" /* EVALUATIONID */ ? facetValues.map((facet) => facet.value) : [];
43863
+ const evaluationIds = columnModel?.columnType === ColumnTypeEnum.EVALUATIONID ? facetValues.map((facet) => facet.value) : [];
43685
43864
  const evaluations = useGetInfoFromIds({
43686
43865
  ids: evaluationIds,
43687
43866
  type: "EVALUATION_QUEUE"
@@ -43871,7 +44050,7 @@ function EnumFacetFilterOption({
43871
44050
  initialIsSelected,
43872
44051
  onChange
43873
44052
  }) {
43874
- const [isSelected, setIsSelected] = useState64(initialIsSelected);
44053
+ const [isSelected, setIsSelected] = useState65(initialIsSelected);
43875
44054
  React298.useEffect(() => {
43876
44055
  setIsSelected(initialIsSelected);
43877
44056
  }, [initialIsSelected]);
@@ -43927,15 +44106,15 @@ var FacetChip = ({
43927
44106
 
43928
44107
  // src/components/widgets/query-filter/RangeFacetFilter.tsx
43929
44108
  import React302 from "react";
43930
- import { useState as useState67 } from "react";
44109
+ import { useState as useState68 } from "react";
43931
44110
 
43932
44111
  // src/components/widgets/Range.tsx
43933
- import React300, { useState as useState65 } from "react";
44112
+ import React300, { useState as useState66 } from "react";
43934
44113
  import dayjs6 from "dayjs";
43935
44114
  var Range = (props) => {
43936
44115
  const errorText = "Min value should be less then max value";
43937
- const [error, setError] = useState65(false);
43938
- const [values, setValues] = useState65(
44116
+ const [error, setError] = useState66(false);
44117
+ const [values, setValues] = useState66(
43939
44118
  () => props.type === "number" && props.initialValues ? props.initialValues : props.initialValues && {
43940
44119
  min: dayjs6(props.initialValues.min).format("YYYY-MM-DD"),
43941
44120
  max: dayjs6(props.initialValues.max).format("YYYY-MM-DD")
@@ -43997,7 +44176,7 @@ var Range = (props) => {
43997
44176
 
43998
44177
  // src/components/widgets/RangeSlider.tsx
43999
44178
  import React301 from "react";
44000
- import { useState as useState66 } from "react";
44179
+ import { useState as useState67 } from "react";
44001
44180
  function ValueLabelComponent(props) {
44002
44181
  const { children, value } = props;
44003
44182
  return /* @__PURE__ */ React301.createElement(Tooltip_default, { enterTouchDelay: 0, placement: "top", title: value }, children);
@@ -44012,7 +44191,7 @@ function getInitialValues(initialValues, domain) {
44012
44191
  function RangeSlider(props) {
44013
44192
  const { doUpdateOnApply = true, onChange, step } = props;
44014
44193
  const stringArrToNumArr = (inputArr) => inputArr.map((value) => Number(value));
44015
- const [values, setValues] = useState66(
44194
+ const [values, setValues] = useState67(
44016
44195
  () => getInitialValues(props.initialValues, props.domain)
44017
44196
  );
44018
44197
  const numDomain = stringArrToNumArr(props.domain);
@@ -44057,7 +44236,7 @@ var RangeFacetFilter = ({
44057
44236
  onChange,
44058
44237
  collapsed = false
44059
44238
  }) => {
44060
- const [isCollapsed, setIsCollapsed] = useState67(collapsed);
44239
+ const [isCollapsed, setIsCollapsed] = useState68(collapsed);
44061
44240
  const options = [
44062
44241
  { label: FRIENDLY_VALUE_NOT_SET, value: "org.sagebionetworks.UNDEFINED_NULL_NOTSET" /* NOT_SET */ },
44063
44242
  { label: "Any", value: "" /* ANY */ },
@@ -44082,7 +44261,7 @@ var RangeFacetFilter = ({
44082
44261
  onChangeCallback([radioValue2, radioValue2]);
44083
44262
  }
44084
44263
  };
44085
- const [radioValue, setRadioValue] = useState67(
44264
+ const [radioValue, setRadioValue] = useState68(
44086
44265
  getRadioValue(selectedMin, hasAnyValue)
44087
44266
  );
44088
44267
  const result = /* @__PURE__ */ React302.createElement("div", null, /* @__PURE__ */ React302.createElement(
@@ -44335,7 +44514,7 @@ function FacetFilterControlsOrLoader(props) {
44335
44514
  // src/components/widgets/facet-nav/FacetNavPanel.tsx
44336
44515
  import { InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
44337
44516
  import Plotly2 from "plotly.js-basic-dist";
44338
- import React305, { useCallback as useCallback21, useState as useState68 } from "react";
44517
+ import React305, { useCallback as useCallback21, useState as useState69 } from "react";
44339
44518
  import { Dropdown as Dropdown5 } from "react-bootstrap";
44340
44519
  import createPlotlyComponent2 from "react-plotly.js/factory";
44341
44520
  import { SizeMe } from "react-sizeme";
@@ -44674,7 +44853,7 @@ async function extractPlotDataArray(facetToPlot, columnType, index, plotType, ac
44674
44853
  SynapseConstants_exports.FRIENDLY_VALUE_NOT_SET
44675
44854
  );
44676
44855
  const filteredValues = facetValues.map((value) => value.value).filter((val) => val !== SynapseConstants_exports.VALUE_NOT_SET);
44677
- if (columnType2 === "ENTITYID" /* ENTITYID */ || columnType2 === "ENTITYID_LIST" /* ENTITYID_LIST */) {
44856
+ if (columnType2 === ColumnTypeEnum.ENTITYID || columnType2 === ColumnTypeEnum.ENTITYID_LIST) {
44678
44857
  const response = await synapse_client_default.getEntityHeadersByIds(
44679
44858
  filteredValues,
44680
44859
  accessToken2
@@ -44682,7 +44861,7 @@ async function extractPlotDataArray(facetToPlot, columnType, index, plotType, ac
44682
44861
  for (const header of response.results) {
44683
44862
  map.set(header.id, header.name);
44684
44863
  }
44685
- } else if (columnType2 === "USERID" /* USERID */ || columnType2 === "USERID_LIST" /* USERID_LIST */) {
44864
+ } else if (columnType2 === ColumnTypeEnum.USERID || columnType2 === ColumnTypeEnum.USERID_LIST) {
44686
44865
  const response = await synapse_client_default.getGroupHeadersBatch(
44687
44866
  filteredValues,
44688
44867
  accessToken2
@@ -44794,7 +44973,7 @@ var FacetNavPanel = (props) => {
44794
44973
  const { accessToken } = useSynapseContext();
44795
44974
  const { data, isLoadingNewBundle, getLastQueryRequest } = useQueryContext();
44796
44975
  const { getColumnDisplayName } = useQueryVisualizationContext();
44797
- const [showModal, setShowModal] = useState68(false);
44976
+ const [showModal, setShowModal] = useState69(false);
44798
44977
  const plotTitle = getColumnDisplayName(facetToPlot.columnName);
44799
44978
  const getColumnType = useCallback21(
44800
44979
  () => data?.columnModels?.find(
@@ -45192,11 +45371,11 @@ var FacetNav = ({
45192
45371
  asyncJobStatus
45193
45372
  } = useQueryContext();
45194
45373
  const { topLevelControlsState } = useQueryVisualizationContext();
45195
- const [facetUiStateArray, setFacetUiStateArray] = useState69([]);
45196
- const [isFirstTime, setIsFirstTime] = useState69(true);
45374
+ const [facetUiStateArray, setFacetUiStateArray] = useState70([]);
45375
+ const [isFirstTime, setIsFirstTime] = useState70(true);
45197
45376
  const { showFacetVisualization, showFacetFilter } = topLevelControlsState;
45198
45377
  const lastQueryRequest = getLastQueryRequest();
45199
- useEffect50(() => {
45378
+ useEffect52(() => {
45200
45379
  const result = getFacets(data, facetsToPlot);
45201
45380
  if (result.length === 0) {
45202
45381
  return;
@@ -45350,7 +45529,7 @@ import React317 from "react";
45350
45529
  import React312 from "react";
45351
45530
 
45352
45531
  // src/components/QuerySortSelector.tsx
45353
- import React311, { useState as useState70 } from "react";
45532
+ import React311, { useState as useState71 } from "react";
45354
45533
  import Select4, { components as components2 } from "react-select";
45355
45534
 
45356
45535
  // src/components/SchemaDrivenAnnotationEditor/widget/SelectWidget.tsx
@@ -45454,10 +45633,10 @@ var QuerySortSelector = ({
45454
45633
  const queryContext = useQueryContext();
45455
45634
  const { getLastQueryRequest, executeQueryRequest } = queryContext;
45456
45635
  const { getColumnDisplayName } = useQueryVisualizationContext();
45457
- const [sortColumn, setSortColumn] = useState70(
45636
+ const [sortColumn, setSortColumn] = useState71(
45458
45637
  defaultColumn
45459
45638
  );
45460
- const [sortDirection, setSortDirection] = useState70(defaultDirection);
45639
+ const [sortDirection, setSortDirection] = useState71(defaultDirection);
45461
45640
  const enumOptions = sortableColumns.map((sortableColumn) => {
45462
45641
  return {
45463
45642
  value: sortableColumn,
@@ -45548,7 +45727,7 @@ var CardContainerLogic = (props) => {
45548
45727
  };
45549
45728
 
45550
45729
  // src/components/HeaderCard.tsx
45551
- import React313, { useState as useState71, useEffect as useEffect51 } from "react";
45730
+ import React313, { useState as useState72, useEffect as useEffect53 } from "react";
45552
45731
  var HeaderCard = ({
45553
45732
  type,
45554
45733
  title,
@@ -45566,11 +45745,11 @@ var HeaderCard = ({
45566
45745
  const descriptionElement = document.querySelector(
45567
45746
  'meta[name="description"]'
45568
45747
  );
45569
- const [docTitle] = useState71(document.title);
45570
- const [docDescription] = useState71(
45748
+ const [docTitle] = useState72(document.title);
45749
+ const [docDescription] = useState72(
45571
45750
  descriptionElement ? descriptionElement.getAttribute("content") : ""
45572
45751
  );
45573
- useEffect51(() => {
45752
+ useEffect53(() => {
45574
45753
  if (title && document.title !== title) {
45575
45754
  document.title = title;
45576
45755
  }
@@ -45643,7 +45822,7 @@ var IconList = (props) => {
45643
45822
  var IconList_default = IconList;
45644
45823
 
45645
45824
  // src/components/widgets/FileHandleLink.tsx
45646
- import React315, { useEffect as useEffect52, useState as useState72 } from "react";
45825
+ import React315, { useEffect as useEffect54, useState as useState73 } from "react";
45647
45826
  var FileHandleLink = (props) => {
45648
45827
  const {
45649
45828
  fileHandleAssociation,
@@ -45652,8 +45831,8 @@ var FileHandleLink = (props) => {
45652
45831
  displayValue
45653
45832
  } = props;
45654
45833
  const { accessToken } = useSynapseContext();
45655
- const [batchFileResult, setBatchFileResult] = useState72();
45656
- useEffect52(() => {
45834
+ const [batchFileResult, setBatchFileResult] = useState73();
45835
+ useEffect54(() => {
45657
45836
  if (displayValue === void 0) {
45658
45837
  const getFiles2 = async () => {
45659
45838
  const batchFileRequest = {
@@ -45701,7 +45880,7 @@ var FileHandleLink = (props) => {
45701
45880
  };
45702
45881
 
45703
45882
  // src/components/widgets/ImageFileHandle.tsx
45704
- import React316, { useEffect as useEffect53, useState as useState73 } from "react";
45883
+ import React316, { useEffect as useEffect55, useState as useState74 } from "react";
45705
45884
  import { useInView as useInView2 } from "react-intersection-observer";
45706
45885
  var ImageFileHandle = (props) => {
45707
45886
  const {
@@ -45712,12 +45891,12 @@ var ImageFileHandle = (props) => {
45712
45891
  }
45713
45892
  } = props;
45714
45893
  const { accessToken } = useSynapseContext();
45715
- const [url, setUrl] = useState73();
45894
+ const [url, setUrl] = useState74();
45716
45895
  const { ref, inView } = useInView2({
45717
45896
  triggerOnce: true,
45718
45897
  rootMargin: "500px 0px"
45719
45898
  });
45720
- useEffect53(() => {
45899
+ useEffect55(() => {
45721
45900
  const getData = () => {
45722
45901
  if (fileHandleId && associateObjectId && associateObjectType && inView) {
45723
45902
  synapse_client_default.getActualFileHandleByIdURL(
@@ -45766,13 +45945,13 @@ var getFileHandleAssociation = (table, fileHandleId, rowSynapseId) => {
45766
45945
  fileHandleAssociation = {
45767
45946
  fileHandleId,
45768
45947
  associateObjectId: table?.id ?? "",
45769
- associateObjectType: "TableEntity" /* TableEntity */
45948
+ associateObjectType: FileHandleAssociateType.TableEntity
45770
45949
  };
45771
45950
  } else if (rowSynapseId) {
45772
45951
  fileHandleAssociation = {
45773
45952
  fileHandleId,
45774
45953
  associateObjectId: rowSynapseId,
45775
- associateObjectType: "FileEntity" /* FileEntity */
45954
+ associateObjectType: FileHandleAssociateType.FileEntity
45776
45955
  };
45777
45956
  }
45778
45957
  }
@@ -45859,7 +46038,7 @@ var SynapseCardLabel = (props) => {
45859
46038
  if (isHeader) {
45860
46039
  newClassName = className?.concat(" ", "SRC-lightLink");
45861
46040
  }
45862
- if (columnModelType === "USERID_LIST" /* USERID_LIST */ && strList) {
46041
+ if (columnModelType === ColumnTypeEnum.USERID_LIST && strList) {
45863
46042
  return /* @__PURE__ */ React317.createElement("p", null, strList.map((val, index) => {
45864
46043
  return /* @__PURE__ */ React317.createElement(React317.Fragment, { key: val }, /* @__PURE__ */ React317.createElement(
45865
46044
  UserCard_default,
@@ -45871,7 +46050,7 @@ var SynapseCardLabel = (props) => {
45871
46050
  ), index < strList.length - 1 && ",\xA0\xA0");
45872
46051
  }));
45873
46052
  }
45874
- if (columnModelType === "USERID" /* USERID */ && str) {
46053
+ if (columnModelType === ColumnTypeEnum.USERID && str) {
45875
46054
  return /* @__PURE__ */ React317.createElement(UserCard_default, { ownerId: str, size: SMALL_USER_CARD, className: newClassName });
45876
46055
  }
45877
46056
  if (!labelLink) {
@@ -46286,7 +46465,7 @@ var GenericCard = class extends React317.Component {
46286
46465
  className: "SRC-boldText SRC-blackText",
46287
46466
  style: { margin: "none" }
46288
46467
  },
46289
- !titleLinkConfig && titleColumnType === "FILEHANDLEID" /* FILEHANDLEID */ && fileHandleAssociation ? /* @__PURE__ */ React317.createElement(
46468
+ !titleLinkConfig && titleColumnType === ColumnTypeEnum.FILEHANDLEID && fileHandleAssociation ? /* @__PURE__ */ React317.createElement(
46290
46469
  FileHandleLink,
46291
46470
  {
46292
46471
  fileHandleAssociation,
@@ -46560,7 +46739,7 @@ var UserCardList = class extends React321.Component {
46560
46739
  (el) => el.name === "institution"
46561
46740
  );
46562
46741
  const ownerId = data.queryResult.queryResults.headers.findIndex(
46563
- (el) => el.columnType === "USERID" /* USERID */
46742
+ (el) => el.columnType === ColumnTypeEnum.USERID
46564
46743
  );
46565
46744
  const nullOwnerIdsRows = data.queryResult.queryResults.rows.filter(
46566
46745
  (el) => !el.values[ownerId]
@@ -46690,7 +46869,7 @@ function CardContainer(props) {
46690
46869
  let cards;
46691
46870
  if (type === MEDIUM_USER_CARD) {
46692
46871
  const userIdColumnIndex = data.queryResult.queryResults.headers.findIndex(
46693
- (el) => el.columnType === "USERID" /* USERID */
46872
+ (el) => el.columnType === ColumnTypeEnum.USERID
46694
46873
  );
46695
46874
  if (userIdColumnIndex === -1) {
46696
46875
  throw Error(
@@ -46790,7 +46969,7 @@ var AddToDownloadListV2 = (props) => {
46790
46969
  var AddToDownloadListV2_default = AddToDownloadListV2;
46791
46970
 
46792
46971
  // src/components/DirectDownload.tsx
46793
- import React324, { useEffect as useEffect54, useState as useState74 } from "react";
46972
+ import React324, { useEffect as useEffect56, useState as useState75 } from "react";
46794
46973
  import { useInView as useInView3 } from "react-intersection-observer";
46795
46974
  import { UAParser } from "ua-parser-js";
46796
46975
  var DirectDownload = (props) => {
@@ -46805,13 +46984,13 @@ var DirectDownload = (props) => {
46805
46984
  stopPropagation = false
46806
46985
  } = props;
46807
46986
  const { ref, inView } = useInView3();
46808
- const [isExternalFile, setIsExternalFile] = useState74(false);
46809
- const [hasFileAccess, setHasFileAccess] = useState74(false);
46810
- const [fileEntity, setFileEntity] = useState74();
46811
- const [externalURL, setExternalURL] = useState74();
46812
- const [fileName, setFileName] = useState74("");
46987
+ const [isExternalFile, setIsExternalFile] = useState75(false);
46988
+ const [hasFileAccess, setHasFileAccess] = useState75(false);
46989
+ const [fileEntity, setFileEntity] = useState75();
46990
+ const [externalURL, setExternalURL] = useState75();
46991
+ const [fileName, setFileName] = useState75("");
46813
46992
  let mounted = true;
46814
- useEffect54(() => {
46993
+ useEffect56(() => {
46815
46994
  if (mounted && inView) {
46816
46995
  getFileEntityFileHandle();
46817
46996
  }
@@ -46833,7 +47012,7 @@ var DirectDownload = (props) => {
46833
47012
  safariDownloadWindow.document.body.innerHTML = "Downloading file on Safari...";
46834
47013
  }
46835
47014
  try {
46836
- if (associatedObjectType === "TableEntity" /* TableEntity */) {
47015
+ if (associatedObjectType === FileHandleAssociateType.TableEntity) {
46837
47016
  const files = await getTableEntityFileHandle(true);
46838
47017
  preSignedURL = files.requestedFiles[0].preSignedURL;
46839
47018
  } else {
@@ -46907,7 +47086,7 @@ var DirectDownload = (props) => {
46907
47086
  }).catch((err) => {
46908
47087
  console.log("Error on getFileEntityFileHandle = ", err);
46909
47088
  });
46910
- } else if (associatedObjectType === "TableEntity" /* TableEntity */) {
47089
+ } else if (associatedObjectType === FileHandleAssociateType.TableEntity) {
46911
47090
  const files = await getTableEntityFileHandle();
46912
47091
  const fh = files.requestedFiles[0].fileHandle;
46913
47092
  if (displayFileName && fh && hasFileHandle(fh)) {
@@ -47037,7 +47216,7 @@ function useGetFileHandleDownloadType(entityId, entityVersionNumber) {
47037
47216
  );
47038
47217
  const restrictionInformationRequest = React325.useMemo(
47039
47218
  () => ({
47040
- restrictableObjectType: "ENTITY" /* ENTITY */,
47219
+ restrictableObjectType: RestrictableObjectType.ENTITY,
47041
47220
  objectId: entityId
47042
47221
  }),
47043
47222
  [entityId]
@@ -47083,7 +47262,7 @@ function HasAccessV2(props) {
47083
47262
  const { accessToken } = useSynapseContext();
47084
47263
  const restrictionInformationRequest = React325.useMemo(
47085
47264
  () => ({
47086
- restrictableObjectType: "ENTITY" /* ENTITY */,
47265
+ restrictableObjectType: RestrictableObjectType.ENTITY,
47087
47266
  objectId: entityId
47088
47267
  }),
47089
47268
  [entityId]
@@ -47117,7 +47296,7 @@ function HasAccessV2(props) {
47117
47296
  let linkText = "";
47118
47297
  if (hasUnmetAccessRequirement) {
47119
47298
  linkText = "Request Access";
47120
- } else if ("OPEN" /* OPEN */ === restrictionLevel) {
47299
+ } else if (RestrictionLevel.OPEN === restrictionLevel) {
47121
47300
  return /* @__PURE__ */ React325.createElement(React325.Fragment, null);
47122
47301
  } else {
47123
47302
  linkText = "View Terms";
@@ -47177,7 +47356,7 @@ import React331 from "react";
47177
47356
  import dayjs7 from "dayjs";
47178
47357
 
47179
47358
  // src/components/EntityIdList.tsx
47180
- import React328, { useEffect as useEffect55, useState as useState75 } from "react";
47359
+ import React328, { useEffect as useEffect57, useState as useState76 } from "react";
47181
47360
  import { useInView as useInView4 } from "react-intersection-observer";
47182
47361
 
47183
47362
  // src/components/EntityLink.tsx
@@ -47280,10 +47459,10 @@ var EntityLink = (props) => {
47280
47459
  var EntityIdList = (props) => {
47281
47460
  const { accessToken } = useSynapseContext();
47282
47461
  const { entityIdList } = props;
47283
- const [entityLinkArray, setEntityLinkArray] = useState75([/* @__PURE__ */ React328.createElement(React328.Fragment, null)]);
47462
+ const [entityLinkArray, setEntityLinkArray] = useState76([/* @__PURE__ */ React328.createElement(React328.Fragment, null)]);
47284
47463
  const { ref, inView } = useInView4();
47285
47464
  let mounted = true;
47286
- useEffect55(() => {
47465
+ useEffect57(() => {
47287
47466
  if (inView) {
47288
47467
  getEntityTypes();
47289
47468
  }
@@ -47310,15 +47489,15 @@ var EntityIdList = (props) => {
47310
47489
  var EntityIdList_default = EntityIdList;
47311
47490
 
47312
47491
  // src/components/EvaluationIdRenderer.tsx
47313
- import React329, { useEffect as useEffect56, useState as useState76 } from "react";
47492
+ import React329, { useEffect as useEffect58, useState as useState77 } from "react";
47314
47493
  import { useInView as useInView5 } from "react-intersection-observer";
47315
47494
  var EvaluationIdRenderer = (props) => {
47316
47495
  const { accessToken } = useSynapseContext();
47317
47496
  const { evaluationId } = props;
47318
- const [evaluationName, setEvaluationName] = useState76();
47497
+ const [evaluationName, setEvaluationName] = useState77();
47319
47498
  const { ref, inView } = useInView5();
47320
47499
  let mounted = true;
47321
- useEffect56(() => {
47500
+ useEffect58(() => {
47322
47501
  if (mounted && inView) {
47323
47502
  getEvaluationQueue();
47324
47503
  }
@@ -47343,15 +47522,15 @@ var EvaluationIdRenderer = (props) => {
47343
47522
  var EvaluationIdRenderer_default = EvaluationIdRenderer;
47344
47523
 
47345
47524
  // src/components/UserIdList.tsx
47346
- import React330, { useEffect as useEffect57, useState as useState77 } from "react";
47525
+ import React330, { useEffect as useEffect59, useState as useState78 } from "react";
47347
47526
  import { useInView as useInView6 } from "react-intersection-observer";
47348
47527
  var UserIdList = (props) => {
47349
47528
  const { accessToken } = useSynapseContext();
47350
47529
  const { userIds } = props;
47351
- const [profileCards, setProfileCards] = useState77();
47530
+ const [profileCards, setProfileCards] = useState78();
47352
47531
  const { ref, inView } = useInView6();
47353
47532
  let mounted = true;
47354
- useEffect57(() => {
47533
+ useEffect59(() => {
47355
47534
  if (mounted && inView) {
47356
47535
  getUserProfilesToRender();
47357
47536
  }
@@ -47429,7 +47608,7 @@ var SynapseTableCell = ({
47429
47608
  ));
47430
47609
  }
47431
47610
  switch (columnType) {
47432
- case "ENTITYID" /* ENTITYID */:
47611
+ case ColumnTypeEnum.ENTITYID:
47433
47612
  return /* @__PURE__ */ React331.createElement("p", null, /* @__PURE__ */ React331.createElement(
47434
47613
  EntityLink,
47435
47614
  {
@@ -47439,49 +47618,49 @@ var SynapseTableCell = ({
47439
47618
  }
47440
47619
  ));
47441
47620
  break;
47442
- case "DATE_LIST" /* DATE_LIST */: {
47621
+ case ColumnTypeEnum.DATE_LIST: {
47443
47622
  const jsonData = JSON.parse(columnValue);
47444
47623
  return /* @__PURE__ */ React331.createElement("p", null, jsonData.map((val, index) => {
47445
47624
  return /* @__PURE__ */ React331.createElement("span", { key: index, className: isBold }, formatDate(dayjs7(Number(val))), index !== jsonData.length - 1 ? ", " : "");
47446
47625
  }), " ");
47447
47626
  }
47448
- case "BOOLEAN_LIST" /* BOOLEAN_LIST */: {
47627
+ case ColumnTypeEnum.BOOLEAN_LIST: {
47449
47628
  const jsonData = JSON.parse(columnValue);
47450
47629
  return /* @__PURE__ */ React331.createElement("p", null, jsonData.map((val, index) => {
47451
47630
  return /* @__PURE__ */ React331.createElement("span", { key: index, className: isBold }, val ? "true" : "false", index !== jsonData.length - 1 ? ", " : "");
47452
47631
  }));
47453
47632
  }
47454
- case "FILEHANDLEID" /* FILEHANDLEID */:
47633
+ case ColumnTypeEnum.FILEHANDLEID:
47455
47634
  return /* @__PURE__ */ React331.createElement(React331.Fragment, null, entity && /* @__PURE__ */ React331.createElement(
47456
47635
  DirectDownload_default,
47457
47636
  {
47458
47637
  associatedObjectId: entity.id,
47459
- associatedObjectType: "TableEntity" /* TableEntity */,
47638
+ associatedObjectType: FileHandleAssociateType.TableEntity,
47460
47639
  fileHandleId: columnValue,
47461
47640
  displayFileName: true
47462
47641
  }
47463
47642
  ));
47464
- case "ENTITYID_LIST" /* ENTITYID_LIST */: {
47643
+ case ColumnTypeEnum.ENTITYID_LIST: {
47465
47644
  const jsonData = JSON.parse(columnValue);
47466
47645
  return /* @__PURE__ */ React331.createElement("p", null, /* @__PURE__ */ React331.createElement(EntityIdList_default, { entityIdList: jsonData }));
47467
47646
  }
47468
- case "USERID_LIST" /* USERID_LIST */: {
47647
+ case ColumnTypeEnum.USERID_LIST: {
47469
47648
  const jsonData = JSON.parse(columnValue);
47470
47649
  return /* @__PURE__ */ React331.createElement(UserIdList_default, { userIds: jsonData });
47471
47650
  }
47472
- case "STRING_LIST" /* STRING_LIST */:
47473
- case "INTEGER_LIST" /* INTEGER_LIST */: {
47651
+ case ColumnTypeEnum.STRING_LIST:
47652
+ case ColumnTypeEnum.INTEGER_LIST: {
47474
47653
  const jsonData = JSON.parse(columnValue);
47475
47654
  return /* @__PURE__ */ React331.createElement("p", { className: isBold }, jsonData.map((val, index) => {
47476
47655
  return /* @__PURE__ */ React331.createElement(React331.Fragment, { key: val }, val, index !== jsonData.length - 1 ? ", " : "");
47477
47656
  }));
47478
47657
  }
47479
- case "EVALUATIONID" /* EVALUATIONID */: {
47658
+ case ColumnTypeEnum.EVALUATIONID: {
47480
47659
  return /* @__PURE__ */ React331.createElement(EvaluationIdRenderer_default, { evaluationId: columnValue });
47481
47660
  }
47482
- case "DATE" /* DATE */:
47661
+ case ColumnTypeEnum.DATE:
47483
47662
  return /* @__PURE__ */ React331.createElement("p", { className: isBold }, formatDate(dayjs7(Number(columnValue))));
47484
- case "USERID" /* USERID */:
47663
+ case ColumnTypeEnum.USERID:
47485
47664
  if (Object.prototype.hasOwnProperty.call(mapUserIdToHeader, columnValue)) {
47486
47665
  const cachedData = mapUserIdToHeader[columnValue];
47487
47666
  const { ownerId, userName } = cachedData;
@@ -47513,14 +47692,14 @@ var SynapseTableCell = ({
47513
47692
  }
47514
47693
  }
47515
47694
  break;
47516
- case "LINK" /* LINK */:
47695
+ case ColumnTypeEnum.LINK:
47517
47696
  return /* @__PURE__ */ React331.createElement("a", { target: "_blank", rel: "noopener noreferrer", href: columnValue }, columnValue);
47518
- case "STRING" /* STRING */:
47519
- case "DOUBLE" /* DOUBLE */:
47520
- case "INTEGER" /* INTEGER */:
47521
- case "BOOLEAN" /* BOOLEAN */:
47522
- case "MEDIUMTEXT" /* MEDIUMTEXT */:
47523
- case "LARGETEXT" /* LARGETEXT */: {
47697
+ case ColumnTypeEnum.STRING:
47698
+ case ColumnTypeEnum.DOUBLE:
47699
+ case ColumnTypeEnum.INTEGER:
47700
+ case ColumnTypeEnum.BOOLEAN:
47701
+ case ColumnTypeEnum.MEDIUMTEXT:
47702
+ case ColumnTypeEnum.LARGETEXT: {
47524
47703
  return /* @__PURE__ */ React331.createElement("p", { className: isBold }, columnValue);
47525
47704
  }
47526
47705
  default:
@@ -47686,11 +47865,11 @@ var EntityIDColumnCopyIcon = () => {
47686
47865
  var EntityIDColumnCopyIcon_default = EntityIDColumnCopyIcon;
47687
47866
 
47688
47867
  // src/components/SynapseTable/ExpandableTableDataCell.tsx
47689
- import React335, { useRef as useRef38, useState as useState78 } from "react";
47868
+ import React335, { useRef as useRef38, useState as useState79 } from "react";
47690
47869
  import useResizeObserver from "@react-hook/resize-observer";
47691
47870
  function ExpandableTableDataCell(props) {
47692
- const [isExpanded, setIsExpanded] = useState78(false);
47693
- const [isOverflowingWhenNotExpanded, setIsOverflowingWhenNotExpanded] = useState78(false);
47871
+ const [isExpanded, setIsExpanded] = useState79(false);
47872
+ const [isOverflowingWhenNotExpanded, setIsOverflowingWhenNotExpanded] = useState79(false);
47694
47873
  const tdRef = useRef38(null);
47695
47874
  useResizeObserver(tdRef, ({ target }) => {
47696
47875
  if (!isExpanded) {
@@ -47846,11 +48025,11 @@ var SynapseTable = class extends React336.Component {
47846
48025
  const mapUserIdToHeader = cloneDeep4(this.state.mapUserIdToHeader);
47847
48026
  const entityIdColumnIndicies = getColumnIndicesWithType(
47848
48027
  data,
47849
- "ENTITYID" /* ENTITYID */
48028
+ ColumnTypeEnum.ENTITYID
47850
48029
  );
47851
48030
  const userIdColumnIndicies = getColumnIndicesWithType(
47852
48031
  data,
47853
- "USERID" /* USERID */
48032
+ ColumnTypeEnum.USERID
47854
48033
  );
47855
48034
  const distinctEntityIds = getUniqueEntities(
47856
48035
  data,
@@ -48208,15 +48387,15 @@ var SynapseTable = class extends React336.Component {
48208
48387
  }
48209
48388
  isSortableColumn(column) {
48210
48389
  switch (column) {
48211
- case "USERID" /* USERID */:
48212
- case "ENTITYID" /* ENTITYID */:
48213
- case "FILEHANDLEID" /* FILEHANDLEID */:
48214
- case "STRING_LIST" /* STRING_LIST */:
48215
- case "INTEGER_LIST" /* INTEGER_LIST */:
48216
- case "BOOLEAN_LIST" /* BOOLEAN_LIST */:
48217
- case "DATE_LIST" /* DATE_LIST */:
48218
- case "USERID_LIST" /* USERID_LIST */:
48219
- case "ENTITYID_LIST" /* ENTITYID_LIST */:
48390
+ case ColumnTypeEnum.USERID:
48391
+ case ColumnTypeEnum.ENTITYID:
48392
+ case ColumnTypeEnum.FILEHANDLEID:
48393
+ case ColumnTypeEnum.STRING_LIST:
48394
+ case ColumnTypeEnum.INTEGER_LIST:
48395
+ case ColumnTypeEnum.BOOLEAN_LIST:
48396
+ case ColumnTypeEnum.DATE_LIST:
48397
+ case ColumnTypeEnum.USERID_LIST:
48398
+ case ColumnTypeEnum.ENTITYID_LIST:
48220
48399
  return false;
48221
48400
  default:
48222
48401
  return true;
@@ -48249,7 +48428,7 @@ var SynapseTable = class extends React336.Component {
48249
48428
  );
48250
48429
  const columnModel = columnModels.find((el) => el.name === column.name);
48251
48430
  const isLockedColumn = column.name.toLowerCase() === lockedColumn?.columnName?.toLowerCase();
48252
- const isEntityIDColumn = columnModel && columnModel.name == "id" && columnModel.columnType == "ENTITYID" /* ENTITYID */;
48431
+ const isEntityIDColumn = columnModel && columnModel.name == "id" && columnModel.columnType == ColumnTypeEnum.ENTITYID;
48253
48432
  return /* @__PURE__ */ React336.createElement("th", { key: column.name }, /* @__PURE__ */ React336.createElement("div", { className: "SRC-split" }, /* @__PURE__ */ React336.createElement("span", { style: { whiteSpace: "nowrap" } }, displayColumnName), /* @__PURE__ */ React336.createElement("div", { className: "SRC-centerContent" }, isFacetSelection && !isLockedColumn && this.configureFacetDropdown(
48254
48433
  facet,
48255
48434
  columnModel,
@@ -48763,14 +48942,14 @@ import React345 from "react";
48763
48942
 
48764
48943
  // src/components/widgets/SynapseVideo.tsx
48765
48944
  import React344 from "react";
48766
- import { useEffect as useEffect58, useState as useState79 } from "react";
48945
+ import { useEffect as useEffect60, useState as useState80 } from "react";
48767
48946
  function SynapseVideo({ params }) {
48768
48947
  const { accessToken } = useSynapseContext();
48769
- const [externalVideoUrl, setExternalVideoUrl] = useState79();
48770
- const [synapseVideoPresignedUrl, setSynapseVideoPresignedUrl] = useState79();
48948
+ const [externalVideoUrl, setExternalVideoUrl] = useState80();
48949
+ const [synapseVideoPresignedUrl, setSynapseVideoPresignedUrl] = useState80();
48771
48950
  const videoWidth = params.width ?? "";
48772
48951
  const videoHeight = params.height ?? "";
48773
- useEffect58(() => {
48952
+ useEffect60(() => {
48774
48953
  const getVideo = () => {
48775
48954
  if (params.videoId)
48776
48955
  setExternalVideoUrl(`https://www.youtube.com/embed/${params.videoId}`);
@@ -48783,7 +48962,7 @@ function SynapseVideo({ params }) {
48783
48962
  const fileHandleAssociationList = [
48784
48963
  {
48785
48964
  associateObjectId: videoKey,
48786
- associateObjectType: "FileEntity" /* FileEntity */,
48965
+ associateObjectType: FileHandleAssociateType.FileEntity,
48787
48966
  fileHandleId: data.dataFileHandleId
48788
48967
  }
48789
48968
  ];
@@ -49383,7 +49562,7 @@ var MarkdownPopover = ({
49383
49562
  maxWidth = "500px",
49384
49563
  minWidth = "300px"
49385
49564
  }) => {
49386
- const [show, setShow] = useState80(false);
49565
+ const [show, setShow] = useState81(false);
49387
49566
  const content2 = /* @__PURE__ */ React350.createElement(Box_default, { sx: { padding: "20px" } }, /* @__PURE__ */ React350.createElement(Typography_default, { variant: "body1", marginBottom: 2 }, /* @__PURE__ */ React350.createElement(MarkdownSynapse_default, { ...contentProps })), /* @__PURE__ */ React350.createElement(Box_default, { sx: buttonBoxSx }, actionButton && /* @__PURE__ */ React350.createElement(
49388
49567
  Button_default,
49389
49568
  {
@@ -49585,7 +49764,7 @@ var AccessTokenCard = ({
49585
49764
  onDelete
49586
49765
  }) => {
49587
49766
  const { accessToken: authToken } = useSynapseContext();
49588
- const [showModal, setShowModal] = useState81(false);
49767
+ const [showModal, setShowModal] = useState82(false);
49589
49768
  const handleError = useErrorHandler2();
49590
49769
  const isExpired = accessToken.state === "EXPIRED";
49591
49770
  return /* @__PURE__ */ React355.createElement(
@@ -49817,7 +49996,7 @@ var AccessTokenPage = ({
49817
49996
  title,
49818
49997
  body
49819
49998
  }) => {
49820
- const [showCreateTokenModal, setShowCreateTokenModal] = useState82(false);
49999
+ const [showCreateTokenModal, setShowCreateTokenModal] = useState83(false);
49821
50000
  const {
49822
50001
  data: infiniteData,
49823
50002
  isLoading,
@@ -49990,7 +50169,7 @@ function TwoFactorAuthSettingsPanel(props) {
49990
50169
  }
49991
50170
 
49992
50171
  // src/components/Authentication/TwoFactorBackupCodes.tsx
49993
- import React367, { useEffect as useEffect60, useState as useState83 } from "react";
50172
+ import React367, { useEffect as useEffect62, useState as useState84 } from "react";
49994
50173
  import { useMutation as useMutation10 } from "react-query";
49995
50174
 
49996
50175
  // src/assets/icons/FrontHand.tsx
@@ -50101,11 +50280,11 @@ function RecoveryCodeGrid(props) {
50101
50280
  }
50102
50281
 
50103
50282
  // src/utils/hooks/useMediaPrintOnly.ts
50104
- import { useEffect as useEffect59 } from "react";
50283
+ import { useEffect as useEffect61 } from "react";
50105
50284
  function useMediaPrintOnly() {
50106
50285
  const visibleOnPrintClassName = "printable";
50107
50286
  const hiddenOnPrintClassName = "noPrint";
50108
- useEffect59(() => {
50287
+ useEffect61(() => {
50109
50288
  const temporaryPrintStyle = document.createElement("style");
50110
50289
  temporaryPrintStyle.innerHTML = `@media print {
50111
50290
  * {
@@ -50145,7 +50324,7 @@ function useMediaPrintOnly() {
50145
50324
  function TwoFactorBackupCodes(props) {
50146
50325
  const { showReplaceOldCodesWarning, onClose } = props;
50147
50326
  const theme = useTheme();
50148
- const [hasConfirmedRegeneration, setHasConfirmedRegeneration] = useState83(
50327
+ const [hasConfirmedRegeneration, setHasConfirmedRegeneration] = useState84(
50149
50328
  !showReplaceOldCodesWarning
50150
50329
  );
50151
50330
  const { accessToken } = useSynapseContext();
@@ -50159,7 +50338,7 @@ function TwoFactorBackupCodes(props) {
50159
50338
  setHasConfirmedRegeneration(true);
50160
50339
  }
50161
50340
  });
50162
- useEffect60(() => {
50341
+ useEffect62(() => {
50163
50342
  if (!showReplaceOldCodesWarning) {
50164
50343
  generateCodes();
50165
50344
  }
@@ -50302,17 +50481,17 @@ function TwoFactorBackupCodes(props) {
50302
50481
  }
50303
50482
 
50304
50483
  // src/components/CertificationQuiz/CertificationQuiz.tsx
50305
- import React368, { useEffect as useEffect61, useState as useState84 } from "react";
50484
+ import React368, { useEffect as useEffect63, useState as useState85 } from "react";
50306
50485
  import { HelpOutlineTwoTone as HelpOutlineTwoTone3 } from "@mui/icons-material";
50307
50486
  import { useErrorHandler as useErrorHandler3 } from "react-error-boundary";
50308
50487
  var CertificationQuiz = () => {
50309
50488
  const { accessToken } = useSynapseContext();
50310
50489
  const handleError = useErrorHandler3();
50311
- const [quiz, setQuiz] = useState84();
50312
- const [questionResponse, setQuestionResponse] = useState84(
50490
+ const [quiz, setQuiz] = useState85();
50491
+ const [questionResponse, setQuestionResponse] = useState85(
50313
50492
  []
50314
50493
  );
50315
- const [passingRecord, setPassingRecord] = useState84();
50494
+ const [passingRecord, setPassingRecord] = useState85();
50316
50495
  const formRef = React368.useRef(null);
50317
50496
  const GETTING_STARTED_URL = "https://help.synapse.org/docs/Getting-Started.2055471150.html";
50318
50497
  const getQuiz = async () => {
@@ -50322,7 +50501,7 @@ var CertificationQuiz = () => {
50322
50501
  handleError(err);
50323
50502
  }
50324
50503
  };
50325
- useEffect61(() => {
50504
+ useEffect63(() => {
50326
50505
  getQuiz();
50327
50506
  }, [accessToken]);
50328
50507
  const onUpdateAnswer = (questionIndex, answer) => {
@@ -50469,15 +50648,15 @@ var CertificationQuiz = () => {
50469
50648
  var CertificationQuiz_default = CertificationQuiz;
50470
50649
 
50471
50650
  // src/components/ChallengeDetailPage/ChallengeDetailPage.tsx
50472
- import React382, { useState as useState92 } from "react";
50651
+ import React382, { useState as useState93 } from "react";
50473
50652
 
50474
50653
  // src/components/ChallengeRegisterButton/ChallengeRegisterButton.tsx
50475
- import React371, { useEffect as useEffect63, useState as useState86 } from "react";
50654
+ import React371, { useEffect as useEffect65, useState as useState87 } from "react";
50476
50655
  import ExitToAppIcon from "@mui/icons-material/ExitToApp";
50477
50656
  import { Box as Box2 } from "@mui/system";
50478
50657
 
50479
50658
  // src/components/widgets/SpinnerButton.tsx
50480
- import React370, { useEffect as useEffect62, useRef as useRef39, useState as useState85 } from "react";
50659
+ import React370, { useEffect as useEffect64, useRef as useRef39, useState as useState86 } from "react";
50481
50660
 
50482
50661
  // src/components/widgets/LoginAwareButton.tsx
50483
50662
  import * as React369 from "react";
@@ -50508,9 +50687,9 @@ var SpinnerButton = ({
50508
50687
  showSpinner = false,
50509
50688
  ...props
50510
50689
  }) => {
50511
- const [width, setWidth] = useState85(0);
50690
+ const [width, setWidth] = useState86(0);
50512
50691
  const elementRef = useRef39(null);
50513
- useEffect62(() => {
50692
+ useEffect64(() => {
50514
50693
  if (elementRef) {
50515
50694
  const n = elementRef.current?.offsetWidth ?? 0;
50516
50695
  setWidth(n);
@@ -50554,13 +50733,13 @@ var ChallengeRegisterButton = ({
50554
50733
  onLeaveClick
50555
50734
  }) => {
50556
50735
  const { accessToken } = useSynapseContext();
50557
- const [challenge, setChallenge] = useState86();
50736
+ const [challenge, setChallenge] = useState87();
50558
50737
  const { data: userProfile } = useGetCurrentUserProfile();
50559
- const [isRegistered, setIsRegistered] = useState86(false);
50560
- const [hasSubmissionTeam, setHasSubmissionTeam] = useState86(false);
50561
- const [loading, setLoading] = useState86(true);
50562
- const [requestError, setRequestError] = useState86();
50563
- useEffect63(() => {
50738
+ const [isRegistered, setIsRegistered] = useState87(false);
50739
+ const [hasSubmissionTeam, setHasSubmissionTeam] = useState87(false);
50740
+ const [loading, setLoading] = useState87(true);
50741
+ const [requestError, setRequestError] = useState87();
50742
+ useEffect65(() => {
50564
50743
  if (requestError && onChallengeError)
50565
50744
  onChallengeError(requestError);
50566
50745
  }, [requestError, onChallengeError]);
@@ -50659,7 +50838,7 @@ var ChallengeRegisterButton_default = ChallengeRegisterButton;
50659
50838
  var ChallengeRegisterButton_default2 = ChallengeRegisterButton_default;
50660
50839
 
50661
50840
  // src/components/ChallengeTeamWizard/ChallengeTeamWizard.tsx
50662
- import React381, { useEffect as useEffect66, useState as useState91 } from "react";
50841
+ import React381, { useEffect as useEffect68, useState as useState92 } from "react";
50663
50842
 
50664
50843
  // src/components/StepperDialog/StepperDialog.tsx
50665
50844
  import React372 from "react";
@@ -50725,7 +50904,7 @@ var StepperDialog = ({
50725
50904
  var StepperDialog_default = StepperDialog;
50726
50905
 
50727
50906
  // src/components/ChallengeTeamWizard/CreateChallengeTeam.tsx
50728
- import React373, { useState as useState87 } from "react";
50907
+ import React373, { useState as useState88 } from "react";
50729
50908
 
50730
50909
  // src/components/TextField/index.ts
50731
50910
  var TextField_default2 = TextField3;
@@ -50735,7 +50914,7 @@ var CreateChallengeTeam = ({
50735
50914
  onChangeTeamInfo,
50736
50915
  onError
50737
50916
  }) => {
50738
- const [team, setTeam] = useState87({
50917
+ const [team, setTeam] = useState88({
50739
50918
  name: "",
50740
50919
  description: "",
50741
50920
  message: "",
@@ -50807,7 +50986,7 @@ import React378 from "react";
50807
50986
  import ControlPointIcon from "@mui/icons-material/ControlPoint";
50808
50987
 
50809
50988
  // src/components/ChallengeTeamWizard/ChallengeTeamTable.tsx
50810
- import React377, { useEffect as useEffect65, useState as useState89 } from "react";
50989
+ import React377, { useEffect as useEffect67, useState as useState90 } from "react";
50811
50990
  import { DataGrid } from "@mui/x-data-grid";
50812
50991
  import dayjs10 from "dayjs";
50813
50992
 
@@ -50863,15 +51042,15 @@ var SkeletonButton = ({
50863
51042
  };
50864
51043
 
50865
51044
  // src/components/Skeleton/SkeletonParagraph.tsx
50866
- import React376, { useEffect as useEffect64, useState as useState88 } from "react";
51045
+ import React376, { useEffect as useEffect66, useState as useState89 } from "react";
50867
51046
  import { times as times2 } from "lodash-es";
50868
51047
  var SkeletonParagraph = ({
50869
51048
  numRows = 5,
50870
51049
  rowHeight,
50871
51050
  className
50872
51051
  }) => {
50873
- const [skeletons, setSkeletons] = useState88([]);
50874
- useEffect64(() => {
51052
+ const [skeletons, setSkeletons] = useState89([]);
51053
+ useEffect66(() => {
50875
51054
  const elements = [];
50876
51055
  times2(numRows, (i) => {
50877
51056
  elements.push(
@@ -50914,11 +51093,11 @@ function ChallengeTeamTable({
50914
51093
  challengeId,
50915
51094
  onSelectTeam
50916
51095
  }) {
50917
- const [allRows, setAllRows] = useState89([]);
50918
- const [teamIdList, setTeamIdList] = useState89([]);
50919
- const [teamsById, setTeamsById] = useState89({});
51096
+ const [allRows, setAllRows] = useState90([]);
51097
+ const [teamIdList, setTeamIdList] = useState90([]);
51098
+ const [teamsById, setTeamsById] = useState90({});
50920
51099
  const { data: regTeams } = useGetChallengeTeamList(challengeId);
50921
- const [selectedTeam, setSelectedTeam] = useState89();
51100
+ const [selectedTeam, setSelectedTeam] = useState90();
50922
51101
  const { data: teamsList, isLoading } = useGetTeamList(teamIdList, {
50923
51102
  enabled: !!teamIdList.length
50924
51103
  });
@@ -50934,11 +51113,11 @@ function ChallengeTeamTable({
50934
51113
  description: team.description
50935
51114
  };
50936
51115
  };
50937
- useEffect65(() => {
51116
+ useEffect67(() => {
50938
51117
  const ids = regTeams?.map((team) => team.teamId) ?? [];
50939
51118
  setTeamIdList(ids);
50940
51119
  }, [regTeams]);
50941
- useEffect65(() => {
51120
+ useEffect67(() => {
50942
51121
  const teams = teamsList?.list.filter((team) => team.canRequestMembership !== false) ?? [];
50943
51122
  const row = [];
50944
51123
  const teamRecords = {};
@@ -51090,12 +51269,12 @@ var RegistrationSuccessful = ({
51090
51269
  };
51091
51270
 
51092
51271
  // src/components/ChallengeTeamWizard/JoinRequestForm.tsx
51093
- import React380, { useState as useState90 } from "react";
51272
+ import React380, { useState as useState91 } from "react";
51094
51273
  var JoinRequestForm = ({
51095
51274
  team,
51096
51275
  joinMessageChange
51097
51276
  }) => {
51098
- const [message, setMessage] = useState90("");
51277
+ const [message, setMessage] = useState91("");
51099
51278
  if (!team)
51100
51279
  return null;
51101
51280
  const handleMessageChange = (event) => {
@@ -51156,24 +51335,24 @@ var steps = {
51156
51335
  var EMPTY_ID2 = "";
51157
51336
  var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
51158
51337
  const { accessToken, keyFactory } = useSynapseContext();
51159
- const [loading, setLoading] = useState91(true);
51160
- const [step, setStep] = useState91(steps.SELECT_YOUR_CHALLENGE_TEAM);
51161
- const [errorMessage, setErrorMessage] = useState91();
51162
- const [selectedTeam, setSelectedTeam] = useState91();
51163
- const [createdNewTeam, setCreatedNewTeam] = useState91(false);
51164
- const [confirming, setConfirming] = useState91(false);
51165
- const [hasSubmissionTeam, setHasSubmissionTeam] = useState91(false);
51338
+ const [loading, setLoading] = useState92(true);
51339
+ const [step, setStep] = useState92(steps.SELECT_YOUR_CHALLENGE_TEAM);
51340
+ const [errorMessage, setErrorMessage] = useState92();
51341
+ const [selectedTeam, setSelectedTeam] = useState92();
51342
+ const [createdNewTeam, setCreatedNewTeam] = useState92(false);
51343
+ const [confirming, setConfirming] = useState92(false);
51344
+ const [hasSubmissionTeam, setHasSubmissionTeam] = useState92(false);
51166
51345
  const queryClient = useQueryClient9();
51167
- const [membershipStatus, setMembershipStatus] = useState91({});
51168
- const [inviteMembersSuccess, setInviteMembersSuccess] = useState91(false);
51169
- const [registerChallengeSuccess, setRegisterChallengeSuccess] = useState91(false);
51170
- const [newTeam, setNewTeam] = useState91({
51346
+ const [membershipStatus, setMembershipStatus] = useState92({});
51347
+ const [inviteMembersSuccess, setInviteMembersSuccess] = useState92(false);
51348
+ const [registerChallengeSuccess, setRegisterChallengeSuccess] = useState92(false);
51349
+ const [newTeam, setNewTeam] = useState92({
51171
51350
  name: "",
51172
51351
  description: "",
51173
51352
  message: "",
51174
51353
  invitees: ""
51175
51354
  });
51176
- const [joinMessage, setJoinMessage] = useState91("");
51355
+ const [joinMessage, setJoinMessage] = useState92("");
51177
51356
  const { data: userProfile } = useGetCurrentUserProfile();
51178
51357
  const { data: challenge } = useGetEntityChallenge(projectId);
51179
51358
  const participantTeamId = challenge ? challenge.participantTeamId : EMPTY_ID2;
@@ -51182,7 +51361,7 @@ var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
51182
51361
  participantTeamId,
51183
51362
  userId
51184
51363
  );
51185
- useEffect66(() => {
51364
+ useEffect68(() => {
51186
51365
  if (challengeTeamMembershipStatus && !challengeTeamMembershipStatus?.isMember && accessToken) {
51187
51366
  addTeamMemberAsAuthenticatedUserOrAdmin(
51188
51367
  participantTeamId,
@@ -51208,7 +51387,7 @@ var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
51208
51387
  keyFactory
51209
51388
  ]);
51210
51389
  const { data: userSubmissionTeams, error: userSubmissionTeamError } = useGetUserSubmissionTeamsInfinite(challenge?.id ?? EMPTY_ID2, 1);
51211
- useEffect66(() => {
51390
+ useEffect68(() => {
51212
51391
  if (userSubmissionTeams) {
51213
51392
  const isReg = userSubmissionTeams.results.length > 0;
51214
51393
  if (isReg) {
@@ -51274,20 +51453,20 @@ var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
51274
51453
  canJoin: false
51275
51454
  };
51276
51455
  };
51277
- useEffect66(() => {
51456
+ useEffect68(() => {
51278
51457
  const isLoggedOut = !!userProfile && userProfile.ownerId === ANONYMOUS_PRINCIPAL_ID.toString();
51279
51458
  if (isLoggedOut) {
51280
51459
  setLoading(false);
51281
51460
  setErrorMessage("Please login to continue.");
51282
51461
  }
51283
51462
  }, [accessToken, userProfile, projectId, challenge]);
51284
- useEffect66(() => {
51463
+ useEffect68(() => {
51285
51464
  if (inviteMembersSuccess && registerChallengeSuccess) {
51286
51465
  setConfirming(false);
51287
51466
  handleStepChange(step.confirmStep);
51288
51467
  }
51289
51468
  }, [registerChallengeSuccess, inviteMembersSuccess, step]);
51290
- useEffect66(() => {
51469
+ useEffect68(() => {
51291
51470
  if (selectedTeam && selectedTeam.id in membershipStatus && step.id === "SELECT_YOUR_CHALLENGE_TEAM" /* SELECT_YOUR_CHALLENGE_TEAM */) {
51292
51471
  const { canJoin, errorMessage: errorMessage2 } = canUserJoinTeam();
51293
51472
  if (canJoin) {
@@ -51519,10 +51698,10 @@ var ConfirmationDialog_default = ConfirmationDialog;
51519
51698
  // src/components/ChallengeDetailPage/ChallengeDetailPage.tsx
51520
51699
  function ChallengeDetailPage({ projectId }) {
51521
51700
  const { accessToken } = useSynapseContext();
51522
- const [showWizard, setShowWizard] = useState92(false);
51523
- const [showRequirements, setShowRequirements] = useState92(false);
51524
- const [challenge, setChallenge] = useState92();
51525
- const [showLeaveConfirm, setShowLeaveConfirm] = useState92(false);
51701
+ const [showWizard, setShowWizard] = useState93(false);
51702
+ const [showRequirements, setShowRequirements] = useState93(false);
51703
+ const [challenge, setChallenge] = useState93();
51704
+ const [showLeaveConfirm, setShowLeaveConfirm] = useState93(false);
51526
51705
  const { data: userProfile } = synapse_queries_exports.useGetCurrentUserProfile();
51527
51706
  const { data: project } = useGetEntity(projectId);
51528
51707
  const toggleShowWizard = (b) => {
@@ -51615,7 +51794,7 @@ import { Map as Map2 } from "immutable";
51615
51794
 
51616
51795
  // src/components/EntityFinder/EntityFinder.tsx
51617
51796
  import pluralize3 from "pluralize";
51618
- import React421, { useCallback as useCallback26, useEffect as useEffect77, useMemo as useMemo35, useRef as useRef43, useState as useState105 } from "react";
51797
+ import React421, { useCallback as useCallback26, useEffect as useEffect79, useMemo as useMemo35, useRef as useRef43, useState as useState106 } from "react";
51619
51798
  import ArrowBackOutlinedIcon from "@mui/icons-material/ArrowBackOutlined";
51620
51799
  import ClearIcon from "@mui/icons-material/Clear";
51621
51800
  import SearchIcon2 from "@mui/icons-material/Search";
@@ -51651,23 +51830,23 @@ var Breadcrumbs = ({
51651
51830
  };
51652
51831
 
51653
51832
  // src/components/EntityFinder/details/EntityDetailsList.tsx
51654
- import React417, { useState as useState101 } from "react";
51833
+ import React417, { useState as useState102 } from "react";
51655
51834
  import useDeepCompareEffect5 from "use-deep-compare-effect";
51656
51835
 
51657
51836
  // src/components/EntityFinder/details/configurations/EntityChildrenDetails.tsx
51658
- import React413, { useState as useState100 } from "react";
51837
+ import React413, { useState as useState101 } from "react";
51659
51838
 
51660
51839
  // src/components/EntityFinder/details/view/DetailsView.tsx
51661
51840
  import BaseTable, {
51662
51841
  AutoResizer,
51663
51842
  Column
51664
51843
  } from "@sage-bionetworks/react-base-table";
51665
- import React412, { useCallback as useCallback23, useEffect as useEffect73, useMemo as useMemo33, useState as useState99 } from "react";
51844
+ import React412, { useCallback as useCallback23, useEffect as useEffect75, useMemo as useMemo33, useState as useState100 } from "react";
51666
51845
  import { useQueryClient as useQueryClient10 } from "react-query";
51667
51846
 
51668
51847
  // src/components/EntityFinder/details/view/DetailsViewTableRenderers.tsx
51669
51848
  import dayjs14 from "dayjs";
51670
- import React410, { useEffect as useEffect72 } from "react";
51849
+ import React410, { useEffect as useEffect74 } from "react";
51671
51850
  import { Form as Form5 } from "react-bootstrap";
51672
51851
 
51673
51852
  // src/assets/icons/Sort.tsx
@@ -51683,7 +51862,7 @@ var SortIcon = ({ direction, active, ...props }) => /* @__PURE__ */ React384.cre
51683
51862
  fill: "none",
51684
51863
  xmlns: "http://www.w3.org/2000/svg"
51685
51864
  },
51686
- direction.toUpperCase() === "DESC" /* DESC */ ? /* @__PURE__ */ React384.createElement(
51865
+ direction.toUpperCase() === Direction.DESC ? /* @__PURE__ */ React384.createElement(
51687
51866
  "path",
51688
51867
  {
51689
51868
  className: "SRC-Sort-Path",
@@ -51712,16 +51891,16 @@ import {
51712
51891
  PublicTwoTone as PublicTwoTone2
51713
51892
  } from "@mui/icons-material";
51714
51893
  import { isEmpty as isEmpty8 } from "lodash-es";
51715
- import React409, { useEffect as useEffect71, useState as useState98 } from "react";
51894
+ import React409, { useEffect as useEffect73, useState as useState99 } from "react";
51716
51895
  import { useInView as useInView7 } from "react-intersection-observer";
51717
51896
 
51718
51897
  // src/components/entity/metadata/EntityModal.tsx
51719
- import React408, { useRef as useRef42, useState as useState97 } from "react";
51898
+ import React408, { useRef as useRef42, useState as useState98 } from "react";
51720
51899
 
51721
51900
  // src/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.tsx
51722
51901
  import Form4 from "@rjsf/mui";
51723
51902
  import isEmpty6 from "lodash-es/isEmpty";
51724
- import React405, { useCallback as useCallback22, useEffect as useEffect70, useMemo as useMemo32, useRef as useRef41 } from "react";
51903
+ import React405, { useCallback as useCallback22, useEffect as useEffect72, useMemo as useMemo32, useRef as useRef41 } from "react";
51725
51904
 
51726
51905
  // src/assets/icons/AddToList.tsx
51727
51906
  import React385 from "react";
@@ -51743,7 +51922,7 @@ var AddToList_default = AddToList;
51743
51922
 
51744
51923
  // src/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.tsx
51745
51924
  import { isEqual as isEqual3 } from "lodash-es";
51746
- import React387, { useEffect as useEffect67, useState as useState93 } from "react";
51925
+ import React387, { useEffect as useEffect69, useState as useState94 } from "react";
51747
51926
 
51748
51927
  // src/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.ts
51749
51928
  import { flatMap, groupBy, isEmpty as isEmpty5 } from "lodash-es";
@@ -51917,11 +52096,11 @@ function AdditionalPropertiesSchemaField(props) {
51917
52096
  const id = idSchema.$id;
51918
52097
  const { ArrayField } = registry.fields;
51919
52098
  const { SelectWidget: SelectWidget2 } = registry.widgets;
51920
- const [propertyType, setPropertyType] = useState93(
52099
+ const [propertyType, setPropertyType] = useState94(
51921
52100
  guessPropertyType(convertToArray(formData))
51922
52101
  );
51923
- const [nextPropertyType, setNextPropertyType] = useState93(propertyType);
51924
- useEffect67(() => {
52102
+ const [nextPropertyType, setNextPropertyType] = useState94(propertyType);
52103
+ useEffect69(() => {
51925
52104
  function onNextPropertyTypeUpdate() {
51926
52105
  if (Array.isArray(formData)) {
51927
52106
  const dataIsEmpty = formData.length === 0 || formData.every((item) => item == null || item == "");
@@ -51938,7 +52117,7 @@ function AdditionalPropertiesSchemaField(props) {
51938
52117
  }
51939
52118
  onNextPropertyTypeUpdate();
51940
52119
  }, [nextPropertyType]);
51941
- useEffect67(() => {
52120
+ useEffect69(() => {
51942
52121
  function coerceDataAndUpdateWidget() {
51943
52122
  if (Array.isArray(formData)) {
51944
52123
  if (formData.every((item) => item == null)) {
@@ -52051,7 +52230,7 @@ import dayjs12 from "dayjs";
52051
52230
  import React390 from "react";
52052
52231
 
52053
52232
  // src/components/Evaluation/CalendarWithIconFormGroup.tsx
52054
- import React389, { useState as useState94 } from "react";
52233
+ import React389, { useState as useState95 } from "react";
52055
52234
  import dayjs11 from "dayjs";
52056
52235
  import { Form as Form3, InputGroup } from "react-bootstrap";
52057
52236
  import "react-datetime/css/react-datetime.css";
@@ -52066,7 +52245,7 @@ dayjs11.extend(utc2);
52066
52245
  dayjs11.extend(timezone);
52067
52246
  dayjs11.extend(advancedFormat);
52068
52247
  var CalendarWithIconFormGroup = ({ value, setterCallback, label, disabled = false }) => {
52069
- const [id] = useState94(uniqueId2("calendar-with-icon-form-group-"));
52248
+ const [id] = useState95(uniqueId2("calendar-with-icon-form-group-"));
52070
52249
  return /* @__PURE__ */ React389.createElement(Form3.Group, { className: "calendar-with-icon-form-group" }, /* @__PURE__ */ React389.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs }, label && /* @__PURE__ */ React389.createElement("label", { htmlFor: id }, label), /* @__PURE__ */ React389.createElement(InputGroup, null, /* @__PURE__ */ React389.createElement(
52071
52250
  DateTimePicker,
52072
52251
  {
@@ -52244,18 +52423,18 @@ var TextWidget_default = TextWidget;
52244
52423
  import validator2 from "@rjsf/validator-ajv8";
52245
52424
 
52246
52425
  // src/components/SchemaDrivenAnnotationEditor/field/CustomObjectField.tsx
52247
- import React393, { useEffect as useEffect68 } from "react";
52426
+ import React393, { useEffect as useEffect70 } from "react";
52248
52427
  import { getDefaultRegistry } from "@rjsf/core";
52249
52428
  import {
52250
52429
  ADDITIONAL_PROPERTY_FLAG as ADDITIONAL_PROPERTY_FLAG2,
52251
- deepEquals,
52430
+ deepEquals as deepEquals2,
52252
52431
  PROPERTIES_KEY
52253
52432
  } from "@rjsf/utils";
52254
52433
  function CustomObjectField(props) {
52255
52434
  const {
52256
52435
  fields: { ObjectField }
52257
52436
  } = getDefaultRegistry();
52258
- useEffect68(() => {
52437
+ useEffect70(() => {
52259
52438
  const { schema, formData, onChange } = props;
52260
52439
  const newFormData = { ...formData };
52261
52440
  if (schema[PROPERTIES_KEY]) {
@@ -52273,7 +52452,7 @@ function CustomObjectField(props) {
52273
52452
  }
52274
52453
  }
52275
52454
  );
52276
- if (!deepEquals(formData, newFormData)) {
52455
+ if (!deepEquals2(formData, newFormData)) {
52277
52456
  onChange(newFormData);
52278
52457
  }
52279
52458
  }
@@ -52379,7 +52558,7 @@ import {
52379
52558
  getTemplate as getTemplate2,
52380
52559
  getUiOptions as getUiOptions2
52381
52560
  } from "@rjsf/utils";
52382
- import React395, { useEffect as useEffect69, useState as useState95 } from "react";
52561
+ import React395, { useEffect as useEffect71, useState as useState96 } from "react";
52383
52562
  import { HelpOutline } from "@mui/icons-material";
52384
52563
  function ArrayFieldTemplate(props) {
52385
52564
  const { idSchema, uiSchema, items, registry, schema } = props;
@@ -52393,8 +52572,8 @@ function ArrayFieldTemplate(props) {
52393
52572
  );
52394
52573
  const isAdditionalProperty = !!props.schema[ADDITIONAL_PROPERTY_FLAG3];
52395
52574
  const additionalPropertyContext = useAdditionalPropertyContext();
52396
- const [showDetails, setShowDetails] = useState95(false);
52397
- useEffect69(() => {
52575
+ const [showDetails, setShowDetails] = useState96(false);
52576
+ useEffect71(() => {
52398
52577
  if (props.items.length === 0) {
52399
52578
  props.onAddClick();
52400
52579
  }
@@ -52497,7 +52676,7 @@ function WrapIfAdditionalTemplate(props) {
52497
52676
  }
52498
52677
 
52499
52678
  // src/components/SchemaDrivenAnnotationEditor/template/FieldTemplate.tsx
52500
- import React397, { useState as useState96 } from "react";
52679
+ import React397, { useState as useState97 } from "react";
52501
52680
  import {
52502
52681
  getTemplate as getTemplate3,
52503
52682
  getUiOptions as getUiOptions3
@@ -52520,7 +52699,7 @@ function FieldTemplate(props) {
52520
52699
  } = props;
52521
52700
  const uiOptions = getUiOptions3(uiSchema);
52522
52701
  const WrapIfAdditionalTemplate2 = getTemplate3("WrapIfAdditionalTemplate", registry, uiOptions);
52523
- const [showDetails, setShowDetails] = useState96(false);
52702
+ const [showDetails, setShowDetails] = useState97(false);
52524
52703
  if (hidden) {
52525
52704
  return /* @__PURE__ */ React397.createElement("div", { className: "hidden" }, children);
52526
52705
  }
@@ -52840,7 +53019,7 @@ function SchemaDrivenAnnotationEditor(props) {
52840
53019
  getTransformErrors(entityJson?.concreteType),
52841
53020
  [entityJson?.concreteType]
52842
53021
  );
52843
- useEffect70(() => {
53022
+ useEffect72(() => {
52844
53023
  if (annotations) {
52845
53024
  setFormData(annotations);
52846
53025
  }
@@ -53072,7 +53251,7 @@ function getStorageLocationName(fileHandle) {
53072
53251
  }
53073
53252
  function getDataFileHandle(entityBundle) {
53074
53253
  let dataFileHandle = void 0;
53075
- if (entityBundle.entityType === "file" /* FILE */) {
53254
+ if (entityBundle.entityType === EntityType.FILE) {
53076
53255
  dataFileHandle = entityBundle.fileHandles.filter(
53077
53256
  (fh) => fh.id === entityBundle.entity.dataFileHandleId
53078
53257
  )[0];
@@ -53128,9 +53307,9 @@ function EntityModal(props) {
53128
53307
  showTabs = true
53129
53308
  } = props;
53130
53309
  const annotationEditorFormRef = useRef42(null);
53131
- const [currentTab, setCurrentTab] = useState97(initialTab);
53132
- const [isInEditMode, setIsInEditMode] = useState97(false);
53133
- const [hasClickedCancel, setHasClickedCancel] = useState97(false);
53310
+ const [currentTab, setCurrentTab] = useState98(initialTab);
53311
+ const [isInEditMode, setIsInEditMode] = useState98(false);
53312
+ const [hasClickedCancel, setHasClickedCancel] = useState98(false);
53134
53313
  const { data: entityBundle } = useEntityBundle_default(entityId, versionNumber);
53135
53314
  const canEdit = entityBundle && entityBundle.permissions.canEdit;
53136
53315
  const isVersionable = entityBundle && isVersionableEntityType(entityBundle.entityType);
@@ -53279,9 +53458,9 @@ var EntityBadgeIcons = (props) => {
53279
53458
  // 60 seconds
53280
53459
  }
53281
53460
  );
53282
- const [showModal, setShowModal] = useState98(false);
53283
- const [showUnlinkConfirmModal, setShowUnlinkConfirmModal] = useState98(false);
53284
- const [schemaConformance, setSchemaConformance] = useState98(
53461
+ const [showModal, setShowModal] = useState99(false);
53462
+ const [showUnlinkConfirmModal, setShowUnlinkConfirmModal] = useState99(false);
53463
+ const [schemaConformance, setSchemaConformance] = useState99(
53285
53464
  "" /* NO_SCHEMA */
53286
53465
  );
53287
53466
  const { isInExperimentalMode } = useSynapseContext();
@@ -53297,7 +53476,7 @@ var EntityBadgeIcons = (props) => {
53297
53476
  });
53298
53477
  const maxAnnosToShow = 10;
53299
53478
  const annotationsCount = bundle?.annotations && !isEmpty8(bundle.annotations.annotations) ? Object.keys(bundle.annotations.annotations).length : 0;
53300
- useEffect71(() => {
53479
+ useEffect73(() => {
53301
53480
  if (isInExperimentalMode && schemaValidationResults) {
53302
53481
  if (schemaValidationResults.isValid) {
53303
53482
  setSchemaConformance("Valid" /* VALID */);
@@ -53418,7 +53597,7 @@ var EntityBadgeIcons = (props) => {
53418
53597
  "data-testid": "discussion-icon"
53419
53598
  }
53420
53599
  )
53421
- ), showUnlink && bundle.entityType === "link" /* LINK */ && bundle.permissions?.canDelete && /* @__PURE__ */ React409.createElement(React409.Fragment, null, /* @__PURE__ */ React409.createElement(
53600
+ ), showUnlink && bundle.entityType === EntityType.LINK && bundle.permissions?.canDelete && /* @__PURE__ */ React409.createElement(React409.Fragment, null, /* @__PURE__ */ React409.createElement(
53422
53601
  WarningDialog_default,
53423
53602
  {
53424
53603
  open: showUnlinkConfirmModal,
@@ -53564,7 +53743,7 @@ function getLatestVersionText(versionSelection, entityType) {
53564
53743
  let versionDisplay = "Latest";
53565
53744
  let snapshotDisplay = "";
53566
53745
  if (isTableType(entityType)) {
53567
- if (entityType === "dataset" /* DATASET */) {
53746
+ if (entityType === EntityType.DATASET) {
53568
53747
  versionDisplay = "Draft";
53569
53748
  snapshotDisplay = "Stable Version";
53570
53749
  } else {
@@ -53607,7 +53786,7 @@ var DetailsViewVersionRenderer = ({
53607
53786
  // 60 seconds
53608
53787
  });
53609
53788
  const versions = versionData?.pages.flatMap((page) => page.results) ?? [];
53610
- useEffect72(() => {
53789
+ useEffect74(() => {
53611
53790
  if (isSelected && versionSelection == "REQUIRED" /* REQUIRED */ && currentSelectedVersion === NO_VERSION_NUMBER && versions.length > 0) {
53612
53791
  toggleSelection({
53613
53792
  targetId: id,
@@ -53711,8 +53890,8 @@ var DetailsView = ({
53711
53890
  const queryClient = useQueryClient10();
53712
53891
  const { accessToken } = useSynapseContext();
53713
53892
  const showSelectColumn = selectColumnType !== "none";
53714
- const [shouldSelectAll, setShouldSelectAll] = useState99(false);
53715
- const [showLoadingScreen, setShowLoadingScreen] = useState99(false);
53893
+ const [shouldSelectAll, setShouldSelectAll] = useState100(false);
53894
+ const [showLoadingScreen, setShowLoadingScreen] = useState100(false);
53716
53895
  const cancelQuery = () => {
53717
53896
  queryClient.cancelQueries([
53718
53897
  "entitychildren",
@@ -53732,7 +53911,7 @@ var DetailsView = ({
53732
53911
  return "default";
53733
53912
  }
53734
53913
  };
53735
- useEffect73(() => {
53914
+ useEffect75(() => {
53736
53915
  async function handleSelectAll() {
53737
53916
  if (shouldSelectAll) {
53738
53917
  if (hasNextPage && fetchNextPage) {
@@ -53934,7 +54113,7 @@ var DetailsView = ({
53934
54113
  if (sort && setSort) {
53935
54114
  setSort(
53936
54115
  key,
53937
- order === "asc" ? "ASC" /* ASC */ : "DESC" /* DESC */
54116
+ order === "asc" ? Direction.ASC : Direction.DESC
53938
54117
  );
53939
54118
  }
53940
54119
  },
@@ -53997,7 +54176,7 @@ var DetailsView = ({
53997
54176
  /* @__PURE__ */ React412.createElement(
53998
54177
  Column,
53999
54178
  {
54000
- key: "NAME" /* NAME */,
54179
+ key: SortBy.NAME,
54001
54180
  title: "Name",
54002
54181
  width: 800,
54003
54182
  sortable: sort != null,
@@ -54047,7 +54226,7 @@ var DetailsView = ({
54047
54226
  /* @__PURE__ */ React412.createElement(
54048
54227
  Column,
54049
54228
  {
54050
- key: "CREATED_ON" /* CREATED_ON */,
54229
+ key: SortBy.CREATED_ON,
54051
54230
  sortable: sort != null,
54052
54231
  title: "Created On",
54053
54232
  width: 220,
@@ -54058,7 +54237,7 @@ var DetailsView = ({
54058
54237
  /* @__PURE__ */ React412.createElement(
54059
54238
  Column,
54060
54239
  {
54061
- key: "MODIFIED_ON" /* MODIFIED_ON */,
54240
+ key: SortBy.MODIFIED_ON,
54062
54241
  title: "Modified On",
54063
54242
  width: 220,
54064
54243
  minWidth: 170,
@@ -54081,8 +54260,8 @@ var DetailsView = ({
54081
54260
 
54082
54261
  // src/components/EntityFinder/details/configurations/EntityChildrenDetails.tsx
54083
54262
  var EntityChildrenDetails = ({ parentContainerId, ...sharedProps }) => {
54084
- const [sortBy3, setSortBy] = useState100("NAME" /* NAME */);
54085
- const [sortDirection, setSortDirection] = useState100("ASC" /* ASC */);
54263
+ const [sortBy3, setSortBy] = useState101(SortBy.NAME);
54264
+ const [sortDirection, setSortDirection] = useState101(Direction.ASC);
54086
54265
  const getChildrenInfiniteRequestObject = {
54087
54266
  parentId: parentContainerId,
54088
54267
  includeTotalChildCount: true,
@@ -54253,7 +54432,7 @@ var SearchDetails = ({
54253
54432
 
54254
54433
  // src/components/EntityFinder/details/EntityDetailsList.tsx
54255
54434
  var EntityDetailsList = ({ configuration, ...sharedProps }) => {
54256
- const [component, setComponent] = useState101(/* @__PURE__ */ React417.createElement(React417.Fragment, null));
54435
+ const [component, setComponent] = useState102(/* @__PURE__ */ React417.createElement(React417.Fragment, null));
54257
54436
  useDeepCompareEffect5(() => {
54258
54437
  const getComponentFromConfiguration = (config) => {
54259
54438
  switch (config.type) {
@@ -54320,7 +54499,7 @@ var EntityDetailsList = ({ configuration, ...sharedProps }) => {
54320
54499
 
54321
54500
  // src/components/EntityFinder/SelectionPane.tsx
54322
54501
  import { Clear as Clear2 } from "@mui/icons-material";
54323
- import React418, { useEffect as useEffect74, useState as useState102 } from "react";
54502
+ import React418, { useEffect as useEffect76, useState as useState103 } from "react";
54324
54503
  var SelectionPane = ({
54325
54504
  title,
54326
54505
  selectedEntities,
@@ -54354,10 +54533,10 @@ var EntityPathDisplay = ({ entity, toggleSelection }) => {
54354
54533
  entity.targetId,
54355
54534
  entity.targetVersionNumber
54356
54535
  );
54357
- const [entityName, setEntityName] = useState102("");
54358
- const [fullPath, setFullPath] = useState102("");
54359
- const [displayedPath, setDisplayedPath] = useState102("");
54360
- useEffect74(() => {
54536
+ const [entityName, setEntityName] = useState103("");
54537
+ const [fullPath, setFullPath] = useState103("");
54538
+ const [displayedPath, setDisplayedPath] = useState103("");
54539
+ useEffect76(() => {
54361
54540
  if (bundle?.path?.path) {
54362
54541
  const header = bundle.path.path[bundle.path.path.length - 1];
54363
54542
  setEntityName(header.name ?? header.id);
@@ -54396,16 +54575,16 @@ var EntityPathDisplay = ({ entity, toggleSelection }) => {
54396
54575
  // src/components/EntityFinder/tree/EntityTree.tsx
54397
54576
  import React420, {
54398
54577
  useCallback as useCallback25,
54399
- useEffect as useEffect76,
54578
+ useEffect as useEffect78,
54400
54579
  useMemo as useMemo34,
54401
- useState as useState104
54580
+ useState as useState105
54402
54581
  } from "react";
54403
54582
  import { Dropdown as Dropdown6 } from "react-bootstrap";
54404
54583
 
54405
54584
  // src/components/EntityFinder/tree/VirtualizedTree.tsx
54406
54585
  import { cloneDeep as cloneDeep5 } from "lodash-es";
54407
54586
  import dayjs15 from "dayjs";
54408
- import React419, { useCallback as useCallback24, useEffect as useEffect75, useState as useState103 } from "react";
54587
+ import React419, { useCallback as useCallback24, useEffect as useEffect77, useState as useState104 } from "react";
54409
54588
  import { useInView as useInView8 } from "react-intersection-observer";
54410
54589
  import AutoSizer from "react-virtualized-auto-sizer";
54411
54590
  import {
@@ -54505,13 +54684,13 @@ function Node4(props) {
54505
54684
  style,
54506
54685
  setOpen
54507
54686
  } = props;
54508
- const [isLoading, setLoading] = useState103(false);
54687
+ const [isLoading, setLoading] = useState104(false);
54509
54688
  const nodeText = isEntityHeaderNode(node) ? /* @__PURE__ */ React419.createElement("span", null, node.name) : isRootNodeConfiguration(node) ? /* @__PURE__ */ React419.createElement("span", null, node.nodeText) : (
54510
54689
  // Pagination node
54511
54690
  /* @__PURE__ */ React419.createElement(Skeleton_default, { width: 100 })
54512
54691
  );
54513
54692
  const { ref, inView } = useInView8();
54514
- useEffect75(() => {
54693
+ useEffect77(() => {
54515
54694
  if (isPaginationNode(node) && inView) {
54516
54695
  getNextPageOfChildren();
54517
54696
  }
@@ -54526,7 +54705,7 @@ function Node4(props) {
54526
54705
  await setOpen(!isOpen);
54527
54706
  }
54528
54707
  }, [getNextPageOfChildren, node, isOpen, setOpen]);
54529
- useEffect75(() => {
54708
+ useEffect77(() => {
54530
54709
  if (treeNodeType === 1 /* DUAL_PANE */ && isSelected && !isOpen) {
54531
54710
  toggleExpand();
54532
54711
  }
@@ -54666,10 +54845,10 @@ var VirtualizedTree = (props) => {
54666
54845
  autoExpand
54667
54846
  } = props;
54668
54847
  const { accessToken } = useSynapseContext();
54669
- const [rootNode, setRootNode] = useState103(
54848
+ const [rootNode, setRootNode] = useState104(
54670
54849
  rootNodeConfiguration
54671
54850
  );
54672
- useEffect75(() => {
54851
+ useEffect77(() => {
54673
54852
  setRootNode(rootNodeConfiguration);
54674
54853
  }, [rootNodeConfiguration, rootNodeConfiguration.children]);
54675
54854
  const itemSize = useCallback24(
@@ -54782,7 +54961,7 @@ function EntityTree(props) {
54782
54961
  initialContainer = null,
54783
54962
  currentContainer,
54784
54963
  setCurrentContainer,
54785
- visibleTypes = ["project" /* PROJECT */, "folder" /* FOLDER */],
54964
+ visibleTypes = [EntityType.PROJECT, EntityType.FOLDER],
54786
54965
  toggleSelection,
54787
54966
  selectedEntities,
54788
54967
  setDetailsViewConfiguration,
@@ -54794,8 +54973,8 @@ function EntityTree(props) {
54794
54973
  const DEFAULT_CONFIGURATION = {
54795
54974
  type: 5 /* PROMPT */
54796
54975
  };
54797
- const [scope, setScope] = useState104(initialScope);
54798
- useEffect76(() => {
54976
+ const [scope, setScope] = useState105(initialScope);
54977
+ useEffect78(() => {
54799
54978
  if (setDetailsViewConfiguration) {
54800
54979
  setDetailsViewConfiguration(DEFAULT_CONFIGURATION);
54801
54980
  }
@@ -54901,7 +55080,7 @@ function EntityTree(props) {
54901
55080
  projectHeader,
54902
55081
  scope
54903
55082
  ]);
54904
- useEffect76(() => {
55083
+ useEffect78(() => {
54905
55084
  if (setDetailsViewConfiguration || setBreadcrumbItems) {
54906
55085
  let detailsViewConfig;
54907
55086
  let breadcrumbItems = [];
@@ -55065,7 +55244,7 @@ function EntityTree(props) {
55065
55244
  // src/components/EntityFinder/EntityFinder.tsx
55066
55245
  var DEFAULT_SELECTABLE_TYPES = Object.values(EntityType);
55067
55246
  var TABLE_DEFAULT_VISIBLE_TYPES = Object.values(EntityType);
55068
- var TREE_DEFAULT_VISIBLE_TYPES = ["project" /* PROJECT */, "folder" /* FOLDER */];
55247
+ var TREE_DEFAULT_VISIBLE_TYPES = [EntityType.PROJECT, EntityType.FOLDER];
55069
55248
  var NO_VERSION_NUMBER = -1;
55070
55249
  var searchForOnlyTypesBooleanQuery = (entityTypes) => {
55071
55250
  const allTypes = Object.values(EntityType);
@@ -55090,14 +55269,14 @@ var EntityFinder = ({
55090
55269
  treeOnly = false
55091
55270
  }) => {
55092
55271
  const { accessToken } = useSynapseContext();
55093
- const [searchActive, setSearchActive] = useState105(false);
55094
- const [searchInput, setSearchInput] = useState105();
55095
- const [searchTerms, setSearchTerms] = useState105();
55096
- const [breadcrumbsProps, setBreadcrumbsProps] = useState105({
55272
+ const [searchActive, setSearchActive] = useState106(false);
55273
+ const [searchInput, setSearchInput] = useState106();
55274
+ const [searchTerms, setSearchTerms] = useState106();
55275
+ const [breadcrumbsProps, setBreadcrumbsProps] = useState106({
55097
55276
  items: []
55098
55277
  });
55099
- const [searchByIdResults, setSearchByIdResults] = useState105([]);
55100
- const [configFromTreeView, setConfigFromTreeView] = useState105({
55278
+ const [searchByIdResults, setSearchByIdResults] = useState106([]);
55279
+ const [configFromTreeView, setConfigFromTreeView] = useState106({
55101
55280
  type: 5 /* PROMPT */
55102
55281
  });
55103
55282
  const searchInputRef = useRef43(null);
@@ -55109,7 +55288,7 @@ var EntityFinder = ({
55109
55288
  () => [...visibleTypesInList, ...selectableTypes],
55110
55289
  [visibleTypesInList, selectableTypes]
55111
55290
  );
55112
- const [currentContainer, setCurrentContainer] = useState105(initialContainer);
55291
+ const [currentContainer, setCurrentContainer] = useState106(initialContainer);
55113
55292
  const handleError = useErrorHandler4();
55114
55293
  const setBreadcrumbs = useCallback26(
55115
55294
  (items) => {
@@ -55133,7 +55312,7 @@ var EntityFinder = ({
55133
55312
  },
55134
55313
  [selectableTypes]
55135
55314
  );
55136
- useEffect77(() => {
55315
+ useEffect79(() => {
55137
55316
  onSelectedChange(
55138
55317
  selectedEntities.toArray().map(([id, version]) => {
55139
55318
  return {
@@ -55143,7 +55322,7 @@ var EntityFinder = ({
55143
55322
  })
55144
55323
  );
55145
55324
  }, [selectedEntities, onSelectedChange]);
55146
- useEffect77(() => {
55325
+ useEffect79(() => {
55147
55326
  if (searchTerms?.length === 1) {
55148
55327
  const searchTermReference = parseSynId(searchTerms[0]);
55149
55328
  if (searchTermReference) {
@@ -55390,14 +55569,14 @@ function useEntitySelection(selectMultiple) {
55390
55569
  }
55391
55570
 
55392
55571
  // src/components/ChallengeDataDownload/ChallengeEntityChildrenDetails.tsx
55393
- import React424, { useState as useState107 } from "react";
55572
+ import React424, { useState as useState108 } from "react";
55394
55573
 
55395
55574
  // src/components/ChallengeDataDownload/ChallengeDataTable.tsx
55396
55575
  import BaseTable2, {
55397
55576
  AutoResizer as AutoResizer2,
55398
55577
  Column as Column2
55399
55578
  } from "@sage-bionetworks/react-base-table";
55400
- import React423, { useCallback as useCallback28, useEffect as useEffect78, useMemo as useMemo36, useState as useState106 } from "react";
55579
+ import React423, { useCallback as useCallback28, useEffect as useEffect80, useMemo as useMemo36, useState as useState107 } from "react";
55401
55580
  import { useQueryClient as useQueryClient11 } from "react-query";
55402
55581
 
55403
55582
  // src/components/ChallengeDataDownload/Renderers.tsx
@@ -55453,8 +55632,8 @@ var ChallengeDataTable = ({
55453
55632
  const queryClient = useQueryClient11();
55454
55633
  const { accessToken } = useSynapseContext();
55455
55634
  const showSelectColumn = selectColumnType !== "none";
55456
- const [shouldSelectAll, setShouldSelectAll] = useState106(false);
55457
- const [showLoadingScreen, setShowLoadingScreen] = useState106(false);
55635
+ const [shouldSelectAll, setShouldSelectAll] = useState107(false);
55636
+ const [showLoadingScreen, setShowLoadingScreen] = useState107(false);
55458
55637
  const cancelQuery = () => {
55459
55638
  queryClient.cancelQueries([
55460
55639
  "entitychildren",
@@ -55474,7 +55653,7 @@ var ChallengeDataTable = ({
55474
55653
  return "default";
55475
55654
  }
55476
55655
  };
55477
- useEffect78(() => {
55656
+ useEffect80(() => {
55478
55657
  async function handleSelectAll() {
55479
55658
  if (shouldSelectAll) {
55480
55659
  if (hasNextPage && fetchNextPage) {
@@ -55676,7 +55855,7 @@ var ChallengeDataTable = ({
55676
55855
  if (sort && setSort) {
55677
55856
  setSort(
55678
55857
  key,
55679
- order === "asc" ? "ASC" /* ASC */ : "DESC" /* DESC */
55858
+ order === "asc" ? Direction.ASC : Direction.DESC
55680
55859
  );
55681
55860
  }
55682
55861
  },
@@ -55739,7 +55918,7 @@ var ChallengeDataTable = ({
55739
55918
  /* @__PURE__ */ React423.createElement(
55740
55919
  Column2,
55741
55920
  {
55742
- key: "NAME" /* NAME */,
55921
+ key: SortBy.NAME,
55743
55922
  title: "File Name",
55744
55923
  width: 500,
55745
55924
  sortable: sort != null,
@@ -55761,7 +55940,7 @@ var ChallengeDataTable = ({
55761
55940
  /* @__PURE__ */ React423.createElement(
55762
55941
  Column2,
55763
55942
  {
55764
- key: "MODIFIED_ON" /* MODIFIED_ON */,
55943
+ key: SortBy.MODIFIED_ON,
55765
55944
  title: "Modified On",
55766
55945
  width: 220,
55767
55946
  minWidth: 170,
@@ -55795,8 +55974,8 @@ var ChallengeDataTable = ({
55795
55974
 
55796
55975
  // src/components/ChallengeDataDownload/ChallengeEntityChildrenDetails.tsx
55797
55976
  var ChallengeEntityChildrenDetails = ({ parentContainerId, ...sharedProps }) => {
55798
- const [sortBy3, setSortBy] = useState107("NAME" /* NAME */);
55799
- const [sortDirection, setSortDirection] = useState107("ASC" /* ASC */);
55977
+ const [sortBy3, setSortBy] = useState108(SortBy.NAME);
55978
+ const [sortDirection, setSortDirection] = useState108(Direction.ASC);
55800
55979
  const getChildrenInfiniteRequestObject = {
55801
55980
  parentId: parentContainerId,
55802
55981
  includeTotalChildCount: true,
@@ -55885,9 +56064,9 @@ function ChallengeDataDownload({
55885
56064
  versionSelection: "REQUIRED" /* REQUIRED */,
55886
56065
  selectColumnType: "checkbox",
55887
56066
  enableSelectAll: true,
55888
- visibleTypes: ["file" /* FILE */],
56067
+ visibleTypes: [EntityType.FILE],
55889
56068
  selected: selectedEntities,
55890
- selectableTypes: ["file" /* FILE */],
56069
+ selectableTypes: [EntityType.FILE],
55891
56070
  isIdSelected,
55892
56071
  isSelectable: () => true,
55893
56072
  toggleSelection
@@ -55913,26 +56092,26 @@ function ChallengeDataDownload({
55913
56092
 
55914
56093
  // src/components/DownloadCart/DownloadCartPage.tsx
55915
56094
  import React433 from "react";
55916
- import { useEffect as useEffect81, useState as useState111 } from "react";
56095
+ import { useEffect as useEffect83, useState as useState112 } from "react";
55917
56096
 
55918
56097
  // src/components/DownloadCart/AvailableForDownloadTable.tsx
55919
56098
  import React428 from "react";
55920
56099
  import { QueryClient as QueryClient2, QueryClientProvider as QueryClientProvider2 } from "react-query";
55921
56100
 
55922
56101
  // src/components/DownloadCart/DownloadListTable.tsx
55923
- import React427, { useState as useState109, useEffect as useEffect79 } from "react";
56102
+ import React427, { useState as useState110, useEffect as useEffect81 } from "react";
55924
56103
  import { useErrorHandler as useErrorHandler5 } from "react-error-boundary";
55925
56104
  import { Dropdown as Dropdown7, Table as Table2 } from "react-bootstrap";
55926
56105
  import { useInView as useInView9 } from "react-intersection-observer";
55927
56106
  import dayjs16 from "dayjs";
55928
56107
 
55929
56108
  // src/components/DownloadCart/DirectProgrammaticDownload.tsx
55930
- import React426, { useState as useState108 } from "react";
56109
+ import React426, { useState as useState109 } from "react";
55931
56110
  function DirectProgrammaticDownload({
55932
56111
  entityId,
55933
56112
  version
55934
56113
  }) {
55935
- const [isShowingModal, setIsShowingModal] = useState108(false);
56114
+ const [isShowingModal, setIsShowingModal] = useState109(false);
55936
56115
  const rCode = `library(synapser)
55937
56116
  synLogin('username','password')
55938
56117
 
@@ -55987,9 +56166,9 @@ function DownloadListTable(props) {
55987
56166
  const { accessToken } = useSynapseContext();
55988
56167
  const handleError = useErrorHandler5();
55989
56168
  const { ref, inView } = useInView9();
55990
- const [copyingAllSynapseIDs, setCopyingAllSynapseIDs] = useState109(false);
55991
- const [sort, setSort] = useState109(void 0);
55992
- const [filter2, setFilter] = useState109(void 0);
56169
+ const [copyingAllSynapseIDs, setCopyingAllSynapseIDs] = useState110(false);
56170
+ const [sort, setSort] = useState110(void 0);
56171
+ const [filter2, setFilter] = useState110(void 0);
55993
56172
  const {
55994
56173
  data,
55995
56174
  status,
@@ -56001,18 +56180,18 @@ function DownloadListTable(props) {
56001
56180
  error: newError,
56002
56181
  refetch
56003
56182
  } = useGetAvailableFilesToDownloadInfinite(sort, filter2);
56004
- useEffect79(() => {
56183
+ useEffect81(() => {
56005
56184
  if (refetch) {
56006
56185
  refetch();
56007
56186
  }
56008
56187
  }, [filesStatistics, refetch]);
56009
- useEffect79(() => {
56188
+ useEffect81(() => {
56010
56189
  if (isError && newError) {
56011
56190
  handleError(newError);
56012
56191
  }
56013
56192
  }, [isError, newError, handleError]);
56014
56193
  const allRows = data?.pages.flatMap((page) => page.page) ?? [];
56015
- useEffect79(() => {
56194
+ useEffect81(() => {
56016
56195
  const copyAllSynapseIDs = () => {
56017
56196
  const synIDs = allRows.map((item) => {
56018
56197
  return `${item.fileEntityId}.${item.versionNumber}`;
@@ -56066,7 +56245,7 @@ function DownloadListTable(props) {
56066
56245
  role: "button",
56067
56246
  style: { height: "20px" },
56068
56247
  active: sort?.field === columnSortBy,
56069
- direction: sort?.field === columnSortBy ? sort.direction === "DESC" ? "DESC" /* DESC */ : "ASC" /* ASC */ : "DESC" /* DESC */,
56248
+ direction: sort?.field === columnSortBy ? sort.direction === "DESC" ? Direction.DESC : Direction.ASC : Direction.DESC,
56070
56249
  onClick: () => {
56071
56250
  const direction = columnSortBy === sort?.field ? sort.direction === "ASC" ? "DESC" : "ASC" : "DESC";
56072
56251
  setSort({
@@ -56152,7 +56331,7 @@ function DownloadListTable(props) {
56152
56331
  DirectDownload_default,
56153
56332
  {
56154
56333
  associatedObjectId: item.fileEntityId,
56155
- associatedObjectType: "FileEntity" /* FileEntity */,
56334
+ associatedObjectType: FileHandleAssociateType.FileEntity,
56156
56335
  entityVersionNumber: item.versionNumber.toString(),
56157
56336
  displayFileName: false,
56158
56337
  onClickCallback: (isExternalLink) => {
@@ -56259,7 +56438,7 @@ function DownloadListStats(props) {
56259
56438
  }
56260
56439
 
56261
56440
  // src/components/DownloadCart/DownloadListActionsRequired.tsx
56262
- import React431, { useEffect as useEffect80 } from "react";
56441
+ import React431, { useEffect as useEffect82 } from "react";
56263
56442
  import { useInView as useInView10 } from "react-intersection-observer";
56264
56443
  var DownloadListActionsRequired = (props) => {
56265
56444
  const { ref, inView } = useInView10();
@@ -56273,7 +56452,7 @@ var DownloadListActionsRequired = (props) => {
56273
56452
  } = useGetDownloadListActionsRequiredInfinite({
56274
56453
  useErrorBoundary: true
56275
56454
  });
56276
- useEffect80(() => {
56455
+ useEffect82(() => {
56277
56456
  if (status === "success" && !isFetchingNextPage && hasNextPage && fetchNextPage && inView) {
56278
56457
  fetchNextPage();
56279
56458
  }
@@ -56296,14 +56475,14 @@ var DownloadListActionsRequired = (props) => {
56296
56475
  };
56297
56476
 
56298
56477
  // src/components/DownloadCart/CreatePackageV2.tsx
56299
- import React432, { useState as useState110 } from "react";
56478
+ import React432, { useState as useState111 } from "react";
56300
56479
  var TEMPLATE_ERROR_FILE_NAME = "Please provide a package file name and try again.";
56301
56480
  var CreatePackageV2 = (props) => {
56302
56481
  const { accessToken } = useSynapseContext();
56303
- const [isLoading, setIsLoading] = useState110(false);
56304
- const [fileName, setZipFileName] = useState110("");
56305
- const [alert2, setAlert] = useState110();
56306
- const [bulkFileDownloadResponse, setBulkFileDownloadResponse] = useState110(void 0);
56482
+ const [isLoading, setIsLoading] = useState111(false);
56483
+ const [fileName, setZipFileName] = useState111("");
56484
+ const [alert2, setAlert] = useState111();
56485
+ const [bulkFileDownloadResponse, setBulkFileDownloadResponse] = useState111(void 0);
56307
56486
  const { onPackageCreation } = props;
56308
56487
  const createPackageHandler = async (event) => {
56309
56488
  event.preventDefault();
@@ -56391,11 +56570,11 @@ dl_list_file_entities = syn.get_download_list()`;
56391
56570
  var cliDownloadCode = `synapse get-download-list`;
56392
56571
  var DownloadCartPage = (props) => {
56393
56572
  const { accessToken } = useSynapseContext();
56394
- const [selectedTabIndex, setSelectedTabIndex] = useState111(0);
56395
- const [isShowingCreatePackageUI, setIsShowingCreatePackageUI] = useState111(false);
56396
- const [isShowingModal, setIsShowingModal] = useState111(false);
56397
- const [isShowingDownloadSuccessAlert, setIsShowingDownloadSuccessAlert] = useState111(false);
56398
- const [error, setError] = useState111();
56573
+ const [selectedTabIndex, setSelectedTabIndex] = useState112(0);
56574
+ const [isShowingCreatePackageUI, setIsShowingCreatePackageUI] = useState112(false);
56575
+ const [isShowingModal, setIsShowingModal] = useState112(false);
56576
+ const [isShowingDownloadSuccessAlert, setIsShowingDownloadSuccessAlert] = useState112(false);
56577
+ const [error, setError] = useState112();
56399
56578
  const {
56400
56579
  data,
56401
56580
  isLoading,
@@ -56403,12 +56582,12 @@ var DownloadCartPage = (props) => {
56403
56582
  error: newError,
56404
56583
  refetch
56405
56584
  } = useGetDownloadListStatistics();
56406
- useEffect81(() => {
56585
+ useEffect83(() => {
56407
56586
  if (isError && newError) {
56408
56587
  setError(newError);
56409
56588
  }
56410
56589
  }, [isError, newError]);
56411
- useEffect81(() => {
56590
+ useEffect83(() => {
56412
56591
  if (data && data.numberOfFilesRequiringAction == 0) {
56413
56592
  setSelectedTabIndex(1);
56414
56593
  }
@@ -56563,7 +56742,7 @@ var DownloadCartPage = (props) => {
56563
56742
  };
56564
56743
 
56565
56744
  // src/components/DownloadCart/ShowDownloadV2.tsx
56566
- import React434, { useEffect as useEffect82 } from "react";
56745
+ import React434, { useEffect as useEffect84 } from "react";
56567
56746
  import { useErrorHandler as useErrorHandler6 } from "react-error-boundary";
56568
56747
  function ShowDownloadV2({ to, className = "" }) {
56569
56748
  const { accessToken } = useSynapseContext();
@@ -56575,7 +56754,7 @@ function ShowDownloadV2({ to, className = "" }) {
56575
56754
  isError,
56576
56755
  error: newError
56577
56756
  } = useGetDownloadListStatistics();
56578
- useEffect82(() => {
56757
+ useEffect84(() => {
56579
56758
  if (isError && newError && accessToken) {
56580
56759
  handleError(newError);
56581
56760
  }
@@ -56854,7 +57033,7 @@ var EntityForm = class extends React435.Component {
56854
57033
  __publicField(EntityForm, "contextType", SynapseContext);
56855
57034
 
56856
57035
  // src/components/Evaluation/EvaluationCard.tsx
56857
- import React437, { useEffect as useEffect83, useState as useState112 } from "react";
57036
+ import React437, { useEffect as useEffect85, useState as useState113 } from "react";
56858
57037
  import { Card as Card2, Col, Dropdown as Dropdown8, Row as Row5 } from "react-bootstrap";
56859
57038
 
56860
57039
  // src/components/Evaluation/CreatedOnByUserDiv.tsx
@@ -56883,9 +57062,9 @@ var EvaluationCard = ({
56883
57062
  onDeleteSuccess
56884
57063
  }) => {
56885
57064
  const { accessToken } = useSynapseContext();
56886
- const [error, setError] = useState112();
56887
- const [permissions, setPermissions] = useState112();
56888
- useEffect83(() => {
57065
+ const [error, setError] = useState113();
57066
+ const [permissions, setPermissions] = useState113();
57067
+ useEffect85(() => {
56889
57068
  setError(void 0);
56890
57069
  getEvaluationPermissions(evaluation.id, accessToken).then((retrievedPermissions) => {
56891
57070
  setPermissions(retrievedPermissions);
@@ -56921,7 +57100,7 @@ var EvaluationCard = ({
56921
57100
  )))));
56922
57101
  };
56923
57102
  var EvaluationCardDropdown = ({ permissions, onEdit, onModifyAccess, onDelete }) => {
56924
- const [deleteWarningShow, setDeleteWarningShow] = useState112(false);
57103
+ const [deleteWarningShow, setDeleteWarningShow] = useState113(false);
56925
57104
  if (!(permissions.canEdit || permissions.canChangePermissions || permissions.canDelete)) {
56926
57105
  return null;
56927
57106
  }
@@ -56962,11 +57141,11 @@ var EvaluationCardDropdown = ({ permissions, onEdit, onModifyAccess, onDelete })
56962
57141
  };
56963
57142
 
56964
57143
  // src/components/Evaluation/EvaluationEditorPage.tsx
56965
- import React444, { useState as useState117 } from "react";
57144
+ import React444, { useState as useState118 } from "react";
56966
57145
 
56967
57146
  // src/components/Evaluation/EvaluationEditor.tsx
56968
57147
  import { Col as Col2, Dropdown as Dropdown9, Form as Form7, Row as Row6 } from "react-bootstrap";
56969
- import React438, { useEffect as useEffect84, useState as useState113 } from "react";
57148
+ import React438, { useEffect as useEffect86, useState as useState114 } from "react";
56970
57149
  var EvaluationEditor = ({
56971
57150
  evaluationId,
56972
57151
  entityId,
@@ -56977,21 +57156,21 @@ var EvaluationEditor = ({
56977
57156
  throw new Error("please use either evaluationId or entityId but not both");
56978
57157
  }
56979
57158
  const { accessToken } = useSynapseContext();
56980
- const [error, setError] = useState113();
56981
- const [showSaveSuccess, setShowSaveSuccess] = useState113(false);
56982
- useEffect84(() => {
57159
+ const [error, setError] = useState114();
57160
+ const [showSaveSuccess, setShowSaveSuccess] = useState114(false);
57161
+ useEffect86(() => {
56983
57162
  if (error) {
56984
57163
  setShowSaveSuccess(false);
56985
57164
  }
56986
57165
  }, [error]);
56987
- const [name, setName] = useState113("");
56988
- const [description, setDescription] = useState113("");
56989
- const [submissionInstructionsMessage, setSubmissionInstructionsMessage] = useState113("");
56990
- const [submissionReceiptMessage, setSubmissionReceiptMessage] = useState113("");
56991
- const [evaluation, setEvaluation] = useState113({
57166
+ const [name, setName] = useState114("");
57167
+ const [description, setDescription] = useState114("");
57168
+ const [submissionInstructionsMessage, setSubmissionInstructionsMessage] = useState114("");
57169
+ const [submissionReceiptMessage, setSubmissionReceiptMessage] = useState114("");
57170
+ const [evaluation, setEvaluation] = useState114({
56992
57171
  contentSource: entityId
56993
57172
  });
56994
- useEffect84(() => {
57173
+ useEffect86(() => {
56995
57174
  setName(evaluation.name ?? "");
56996
57175
  setDescription(evaluation.description ?? "");
56997
57176
  setSubmissionInstructionsMessage(
@@ -56999,7 +57178,7 @@ var EvaluationEditor = ({
56999
57178
  );
57000
57179
  setSubmissionReceiptMessage(evaluation.submissionReceiptMessage ?? "");
57001
57180
  }, [evaluation]);
57002
- useEffect84(() => {
57181
+ useEffect86(() => {
57003
57182
  if (evaluationId) {
57004
57183
  setError(void 0);
57005
57184
  synapse_client_default.getEvaluation(evaluationId, accessToken).then((retrievedEvaluation) => {
@@ -57091,7 +57270,7 @@ var EvaluationEditor = ({
57091
57270
  )))));
57092
57271
  };
57093
57272
  var EvaluationEditorDropdown = ({ onClick, onDelete }) => {
57094
- const [deleteWarningShow, setDeleteWarningShow] = useState113(false);
57273
+ const [deleteWarningShow, setDeleteWarningShow] = useState114(false);
57095
57274
  return /* @__PURE__ */ React438.createElement(React438.Fragment, null, onDelete && /* @__PURE__ */ React438.createElement(
57096
57275
  WarningDialog_default,
57097
57276
  {
@@ -57120,15 +57299,15 @@ var EvaluationEditorDropdown = ({ onClick, onDelete }) => {
57120
57299
  };
57121
57300
 
57122
57301
  // src/components/Evaluation/EvaluationRoundEditorList.tsx
57123
- import React443, { useEffect as useEffect87, useState as useState116 } from "react";
57302
+ import React443, { useEffect as useEffect89, useState as useState117 } from "react";
57124
57303
 
57125
57304
  // src/components/Evaluation/EvaluationRoundEditor.tsx
57126
- import React442, { useEffect as useEffect86, useState as useState115 } from "react";
57305
+ import React442, { useEffect as useEffect88, useState as useState116 } from "react";
57127
57306
  import { Card as Card3, Col as Col3, Form as Form8, FormControl as FormControl4, FormGroup as FormGroup3, Row as Row7 } from "react-bootstrap";
57128
57307
  import dayjs17 from "dayjs";
57129
57308
 
57130
57309
  // src/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.tsx
57131
- import React440, { useCallback as useCallback30, useEffect as useEffect85 } from "react";
57310
+ import React440, { useCallback as useCallback30, useEffect as useEffect87 } from "react";
57132
57311
  import { CloseTwoTone as CloseTwoTone2, AddBox } from "@mui/icons-material";
57133
57312
 
57134
57313
  // src/components/Evaluation/round_limits/EvaluationRoundLimitOptions.tsx
@@ -57200,7 +57379,7 @@ var EvaluationRoundLimitOptionsList = ({ limitInputs, handleChange, handleDelete
57200
57379
  maxSubmissionString: ""
57201
57380
  });
57202
57381
  }, [onAddNewLimit, selectedTypes]);
57203
- useEffect85(() => {
57382
+ useEffect87(() => {
57204
57383
  if (limitInputs.length === 0) {
57205
57384
  addNewLimit();
57206
57385
  }
@@ -57279,9 +57458,9 @@ var convertRoundLimitsToInput = (evaluationRoundLimits) => {
57279
57458
 
57280
57459
  // src/components/Evaluation/EvaluationRoundEditorDropdown.tsx
57281
57460
  import { Dropdown as Dropdown10 } from "react-bootstrap";
57282
- import React441, { useState as useState114 } from "react";
57461
+ import React441, { useState as useState115 } from "react";
57283
57462
  var EvaluationRoundEditorDropdown = ({ onSave, onDelete }) => {
57284
- const [deleteWarningShow, setDeleteWarningShow] = useState114(false);
57463
+ const [deleteWarningShow, setDeleteWarningShow] = useState115(false);
57285
57464
  return /* @__PURE__ */ React441.createElement(React441.Fragment, null, /* @__PURE__ */ React441.createElement(
57286
57465
  WarningDialog_default,
57287
57466
  {
@@ -57376,23 +57555,23 @@ var convertInputsToEvaluationRound = (evaluationRoundInputProp, startDate, endDa
57376
57555
  };
57377
57556
  var EvaluationRoundEditor = ({ evaluationRoundInput, onSave, onDelete }) => {
57378
57557
  const { accessToken } = useSynapseContext();
57379
- const [error, setError] = useState115();
57380
- const [showSaveSuccess, setShowSaveSuccess] = useState115(false);
57381
- useEffect86(() => {
57558
+ const [error, setError] = useState116();
57559
+ const [showSaveSuccess, setShowSaveSuccess] = useState116(false);
57560
+ useEffect88(() => {
57382
57561
  if (error) {
57383
57562
  setShowSaveSuccess(false);
57384
57563
  }
57385
57564
  }, [error]);
57386
- const [startDate, setStartDate] = useState115(
57565
+ const [startDate, setStartDate] = useState116(
57387
57566
  dayjs17(evaluationRoundInput.roundStart)
57388
57567
  );
57389
- const [endDate, setEndDate] = useState115(
57568
+ const [endDate, setEndDate] = useState116(
57390
57569
  dayjs17(evaluationRoundInput.roundEnd)
57391
57570
  );
57392
- const [totalSubmissionLimit, setTotalSubmissionLimit] = useState115(
57571
+ const [totalSubmissionLimit, setTotalSubmissionLimit] = useState116(
57393
57572
  evaluationRoundInput.totalSubmissionLimit
57394
57573
  );
57395
- const [advancedMode, setAdvancedMode] = useState115(false);
57574
+ const [advancedMode, setAdvancedMode] = useState116(false);
57396
57575
  const {
57397
57576
  list: advancedLimits,
57398
57577
  handleListRemove,
@@ -57551,7 +57730,7 @@ var fetchEvaluationList = (evaluationId, accessToken, setListCallback, errorHand
57551
57730
  };
57552
57731
  var EvaluationRoundEditorList = ({ evaluationId }) => {
57553
57732
  const { accessToken } = useSynapseContext();
57554
- const [error, setError] = useState116();
57733
+ const [error, setError] = useState117();
57555
57734
  const {
57556
57735
  list: evaluationRoundInputList,
57557
57736
  appendToList: appendToEvaluationRoundInputList,
@@ -57559,7 +57738,7 @@ var EvaluationRoundEditorList = ({ evaluationId }) => {
57559
57738
  handleListRemove: handleEvaluationRoundInputListRemove,
57560
57739
  setList: setEvaluationRoundInputList
57561
57740
  } = useListState([]);
57562
- useEffect87(
57741
+ useEffect89(
57563
57742
  () => {
57564
57743
  fetchEvaluationList(
57565
57744
  evaluationId,
@@ -57613,7 +57792,7 @@ var EvaluationEditorPage = ({
57613
57792
  entityId,
57614
57793
  onDeleteSuccess
57615
57794
  }) => {
57616
- const [savedEvaluationId, setSavedEvaluationId] = useState117(evaluationId);
57795
+ const [savedEvaluationId, setSavedEvaluationId] = useState118(evaluationId);
57617
57796
  return /* @__PURE__ */ React444.createElement("div", { className: "bootstrap-4-backport" }, /* @__PURE__ */ React444.createElement(
57618
57797
  EvaluationEditor,
57619
57798
  {
@@ -57629,7 +57808,7 @@ var EvaluationEditorPage = ({
57629
57808
  )));
57630
57809
  };
57631
57810
  var FakeEvaluationRoundEditorList = () => {
57632
- const [showEvaluationNotExistAlert, setShowEvaluationNotExistAlert] = useState117(false);
57811
+ const [showEvaluationNotExistAlert, setShowEvaluationNotExistAlert] = useState118(false);
57633
57812
  return /* @__PURE__ */ React444.createElement("div", { "data-testid": "FakeEvaluationRoundEditorList" }, showEvaluationNotExistAlert ? /* @__PURE__ */ React444.createElement(Alert_default, { severity: "info" }, "Evaluation Rounds can be edited once the Evaluation has been created.") : /* @__PURE__ */ React444.createElement(
57634
57813
  Button_default,
57635
57814
  {
@@ -57646,15 +57825,15 @@ var FakeEvaluationRoundEditorList = () => {
57646
57825
 
57647
57826
  // src/components/ExperimentalMode/ExperimentalMode.tsx
57648
57827
  import React445 from "react";
57649
- import { useEffect as useEffect88, useState as useState118 } from "react";
57828
+ import { useEffect as useEffect90, useState as useState119 } from "react";
57650
57829
  import UniversalCookies2 from "universal-cookie";
57651
57830
  import { InfoOutlined as InfoOutlined3 } from "@mui/icons-material";
57652
57831
  var experimentalModeText = "This mode gives you early access to features that are still in development. Please note that we do not guarantee an absence of errors, and that the data created using these features may be lost during product upgrade.";
57653
57832
  var ExperimentalMode = () => {
57654
- const [isExperimentalModeOn, setIsExperimentalModeOn] = useState118(false);
57833
+ const [isExperimentalModeOn, setIsExperimentalModeOn] = useState119(false);
57655
57834
  const cookies2 = new UniversalCookies2();
57656
57835
  let mounted = true;
57657
- useEffect88(() => {
57836
+ useEffect90(() => {
57658
57837
  if (mounted) {
57659
57838
  if (isInSynapseExperimentalMode()) {
57660
57839
  setIsExperimentalModeOn(true);
@@ -57694,13 +57873,13 @@ var ExperimentalMode = () => {
57694
57873
  var ExperimentalMode_default = ExperimentalMode;
57695
57874
 
57696
57875
  // src/components/ExternalFileHandleLink/ExternalFileHandleLink.tsx
57697
- import React446, { useEffect as useEffect89, useState as useState119 } from "react";
57876
+ import React446, { useEffect as useEffect91, useState as useState120 } from "react";
57698
57877
  import { OpenInNewTwoTone as OpenInNewTwoTone2 } from "@mui/icons-material";
57699
57878
  var ExternalFileHandleLink = (props) => {
57700
57879
  const { accessToken } = useSynapseContext();
57701
57880
  const { synId, className } = props;
57702
- const [data, setData] = useState119(void 0);
57703
- useEffect89(() => {
57881
+ const [data, setData] = useState120(void 0);
57882
+ useEffect91(() => {
57704
57883
  const getEntity2 = async () => {
57705
57884
  try {
57706
57885
  const fileEntity2 = await synapse_client_default.getEntity(
@@ -57714,7 +57893,7 @@ var ExternalFileHandleLink = (props) => {
57714
57893
  requestedFiles: [
57715
57894
  {
57716
57895
  associateObjectId: synId,
57717
- associateObjectType: "FileEntity" /* FileEntity */,
57896
+ associateObjectType: FileHandleAssociateType.FileEntity,
57718
57897
  fileHandleId: fileEntity2.dataFileHandleId
57719
57898
  }
57720
57899
  ],
@@ -57756,7 +57935,7 @@ var ExternalFileHandleLink = (props) => {
57756
57935
 
57757
57936
  // src/components/FeaturedDataTabs/FeaturedDataTabs.tsx
57758
57937
  import React452 from "react";
57759
- import { useState as useState121 } from "react";
57938
+ import { useState as useState122 } from "react";
57760
57939
 
57761
57940
  // src/components/FeaturedDataTabs/FeaturedDataPlots.tsx
57762
57941
  import React451 from "react";
@@ -57765,7 +57944,7 @@ import React451 from "react";
57765
57944
  import React449 from "react";
57766
57945
 
57767
57946
  // src/components/FeaturedDataTabs/FacetPlotsCard.tsx
57768
- import React448, { useEffect as useEffect90, useState as useState120 } from "react";
57947
+ import React448, { useEffect as useEffect92, useState as useState121 } from "react";
57769
57948
  import Plotly3 from "plotly.js-basic-dist";
57770
57949
  import createPlotlyComponent3 from "react-plotly.js/factory";
57771
57950
  import { SizeMe as SizeMe3 } from "react-sizeme";
@@ -58007,10 +58186,10 @@ var FacetPlotsCard = ({
58007
58186
  const { accessToken } = useSynapseContext();
58008
58187
  const { data, isLoadingNewBundle } = useQueryContext();
58009
58188
  const { getColumnDisplayName } = useQueryVisualizationContext();
58010
- const [facetPlotDataArray, setFacetPlotDataArray] = useState120([]);
58011
- const [facetDataArray, setFacetDataArray] = useState120([]);
58012
- const [selectedFacetValue, setSelectedFacetValue] = useState120("");
58013
- useEffect90(() => {
58189
+ const [facetPlotDataArray, setFacetPlotDataArray] = useState121([]);
58190
+ const [facetDataArray, setFacetDataArray] = useState121([]);
58191
+ const [selectedFacetValue, setSelectedFacetValue] = useState121("");
58192
+ useEffect92(() => {
58014
58193
  if (!facetsToPlot || !data) {
58015
58194
  return;
58016
58195
  } else {
@@ -58274,7 +58453,7 @@ var FeaturedDataPlots_default = FeaturedDataPlots;
58274
58453
 
58275
58454
  // src/components/FeaturedDataTabs/FeaturedDataTabs.tsx
58276
58455
  var FeaturedDataTabs = (props) => {
58277
- const [selectedTabIndex, setSelectedTabIndex] = useState121(0);
58456
+ const [selectedTabIndex, setSelectedTabIndex] = useState122(0);
58278
58457
  const { configs, rgbIndex, sql } = props;
58279
58458
  const selectedTabProps = configs[selectedTabIndex];
58280
58459
  return /* @__PURE__ */ React452.createElement("div", { className: "FeaturedDataTabs" }, /* @__PURE__ */ React452.createElement("div", { className: "FeaturedDataTabs__tabs" }, configs.map((config, index) => {
@@ -58318,7 +58497,7 @@ var FeaturedDataTabs = (props) => {
58318
58497
  var FeaturedDataTabs_default = FeaturedDataTabs;
58319
58498
 
58320
58499
  // src/components/FeaturedToolsList/FeaturedToolsList.tsx
58321
- import React454, { useState as useState122, useEffect as useEffect91 } from "react";
58500
+ import React454, { useState as useState123, useEffect as useEffect93 } from "react";
58322
58501
 
58323
58502
  // src/components/FeaturedToolsList/FeaturedToolCard.tsx
58324
58503
  import dayjs18 from "dayjs";
@@ -58365,10 +58544,10 @@ var FeaturedToolsList = ({
58365
58544
  }
58366
58545
  };
58367
58546
  const { accessToken } = useSynapseContext();
58368
- const [tools, setTools] = useState122([]);
58369
- const [error, setError] = useState122();
58547
+ const [tools, setTools] = useState123([]);
58548
+ const [error, setError] = useState123();
58370
58549
  const { data: queryResultBundle, error: queryError } = useGetQueryResultBundle(queryBundleRequest);
58371
- useEffect91(() => {
58550
+ useEffect93(() => {
58372
58551
  const getData = () => {
58373
58552
  try {
58374
58553
  const idIndex = getFieldIndex(idColumnName, queryResultBundle);
@@ -58435,7 +58614,7 @@ var FeaturedToolsList_default = FeaturedToolsList;
58435
58614
 
58436
58615
  // src/components/Forum/DiscussionThread.tsx
58437
58616
  import dayjs20 from "dayjs";
58438
- import React460, { useState as useState126 } from "react";
58617
+ import React460, { useState as useState127 } from "react";
58439
58618
 
58440
58619
  // src/synapse-queries/forum/useReply.ts
58441
58620
  import {
@@ -58754,14 +58933,14 @@ function useUnPinThread(options) {
58754
58933
 
58755
58934
  // src/components/Forum/DiscussionReply.tsx
58756
58935
  import dayjs19 from "dayjs";
58757
- import React458, { useState as useState125 } from "react";
58936
+ import React458, { useState as useState126 } from "react";
58758
58937
 
58759
58938
  // src/components/Forum/ForumThreadEditor.tsx
58760
- import React457, { useState as useState124 } from "react";
58939
+ import React457, { useState as useState125 } from "react";
58761
58940
  import { FormControl as FormControl5 } from "react-bootstrap";
58762
58941
 
58763
58942
  // src/components/Markdown/MarkdownEditor.tsx
58764
- import React456, { useRef as useRef44, useState as useState123, useEffect as useEffect92 } from "react";
58943
+ import React456, { useRef as useRef44, useState as useState124, useEffect as useEffect94 } from "react";
58765
58944
 
58766
58945
  // src/components/Markdown/UserMentionModal.tsx
58767
58946
  import React455, { useCallback as useCallback32 } from "react";
@@ -58790,7 +58969,7 @@ var UserMentionModal = ({
58790
58969
  {
58791
58970
  placeholder: "Search for a user or team name",
58792
58971
  onChange: onUserChange,
58793
- typeFilter: "ALL" /* ALL */,
58972
+ typeFilter: TYPE_FILTER.ALL,
58794
58973
  focusOnSelect: true
58795
58974
  }
58796
58975
  ),
@@ -58812,18 +58991,18 @@ var MarkdownEditor = ({
58812
58991
  text,
58813
58992
  setText
58814
58993
  }) => {
58815
- const [currentTab, setCurrentTab] = useState123("WRITE");
58816
- const [selectionStart, setSelectionStart] = useState123(0);
58817
- const [isShowingTagModal, setIsShowingTagModal] = useState123(false);
58818
- const [tagModalWithKeyboard, setTagModalWithKeyboard] = useState123(false);
58994
+ const [currentTab, setCurrentTab] = useState124("WRITE");
58995
+ const [selectionStart, setSelectionStart] = useState124(0);
58996
+ const [isShowingTagModal, setIsShowingTagModal] = useState124(false);
58997
+ const [tagModalWithKeyboard, setTagModalWithKeyboard] = useState124(false);
58819
58998
  const textAreaRef = useRef44(null);
58820
- useEffect92(() => {
58999
+ useEffect94(() => {
58821
59000
  const input = textAreaRef.current;
58822
59001
  if (input) {
58823
59002
  input.setSelectionRange(selectionStart, selectionStart);
58824
59003
  }
58825
59004
  }, [textAreaRef, selectionStart]);
58826
- useEffect92(() => {
59005
+ useEffect94(() => {
58827
59006
  textAreaRef.current?.focus();
58828
59007
  }, [isShowingTagModal]);
58829
59008
  const handleUserTag = (user) => {
@@ -58943,8 +59122,8 @@ var ForumThreadEditor = (props) => {
58943
59122
  isDialog,
58944
59123
  openDialog
58945
59124
  } = props;
58946
- const [title, setTitle] = useState124(initialTitle ?? "");
58947
- const [text, setText] = useState124(initialText ?? "");
59125
+ const [title, setTitle] = useState125(initialTitle ?? "");
59126
+ const [text, setText] = useState125(initialText ?? "");
58948
59127
  const { mutate: updateTitle, isLoading: isLoadingTitle } = useUpdateThreadTitle({
58949
59128
  onSuccess: () => onClose()
58950
59129
  });
@@ -59031,8 +59210,8 @@ var DiscussionReply = ({
59031
59210
  reply,
59032
59211
  onClickLink = () => alert("This functionality has not been implemented yet")
59033
59212
  }) => {
59034
- const [showReplyModal, setShowReplyModal] = useState125(false);
59035
- const [showDeleteModal, setShowDeleteModal] = useState125(false);
59213
+ const [showReplyModal, setShowReplyModal] = useState126(false);
59214
+ const [showDeleteModal, setShowDeleteModal] = useState126(false);
59036
59215
  const { data: currentUserProfile } = useGetCurrentUserProfile();
59037
59216
  const { data: entityBundle } = useGetEntityBundle(reply.projectId);
59038
59217
  const { data: message, isLoading } = useGetReply(reply);
@@ -59056,7 +59235,7 @@ var DiscussionReply = ({
59056
59235
  MarkdownSynapse_default,
59057
59236
  {
59058
59237
  markdown: message,
59059
- objectType: "REPLY" /* REPLY */
59238
+ objectType: ObjectType.REPLY
59060
59239
  }
59061
59240
  ), /* @__PURE__ */ React458.createElement("span", null, "posted ", formatDate(dayjs19(reply.createdOn), "M/D/YYYY")), /* @__PURE__ */ React458.createElement("div", { style: { float: "right" } }, /* @__PURE__ */ React458.createElement("button", { onClick: () => onClickLink() }, /* @__PURE__ */ React458.createElement(IconSvg_default, { icon: "link" })), isCurrentUserAuthor && /* @__PURE__ */ React458.createElement("button", { onClick: () => setShowReplyModal(true) }, /* @__PURE__ */ React458.createElement(IconSvg_default, { icon: "edit" })), entityBundle?.permissions.canModerate && /* @__PURE__ */ React458.createElement("button", { onClick: () => setShowDeleteModal(true) }, /* @__PURE__ */ React458.createElement(IconSvg_default, { icon: "delete" }))))), /* @__PURE__ */ React458.createElement(
59062
59241
  ForumThreadEditor,
@@ -59113,8 +59292,8 @@ function useGetSubscription(objectId, objectType, options) {
59113
59292
  const subscriptionRequest = {
59114
59293
  objectType,
59115
59294
  idList: [objectId],
59116
- sortByType: "OBJECT_ID" /* OBJECT_ID */,
59117
- sortDirection: "ASC" /* ASC */
59295
+ sortByType: SortByType.OBJECT_ID,
59296
+ sortDirection: Direction.ASC
59118
59297
  };
59119
59298
  const subscriptionList = await synapse_client_default.postSubscriptionList(
59120
59299
  accessToken,
@@ -59308,14 +59487,14 @@ var SIGN_IN_TEXT = "You will need to sign in for access to that resource";
59308
59487
  var INPUT_PLACEHOLDER = "Write a reply...";
59309
59488
  function DiscussionThread(props) {
59310
59489
  const { threadId, limit } = props;
59311
- const [orderByDatePosted, setOrderByDatePosted] = useState126(true);
59312
- const [showThreadModal, setShowThreadModal] = useState126(false);
59313
- const [showReplyEditor1, setShowReplyEditor1] = useState126(false);
59314
- const [showReplyEditor2, setShowReplyEditor2] = useState126(false);
59315
- const [showDeleteModal, setShowDeleteModal] = useState126(false);
59316
- const [showSignInModal, setShowSignInModal] = useState126(false);
59317
- const [showRestoreModal, setShowRestoreModal] = useState126(false);
59318
- const [showSubscriberModal, setShowSubscriberModal] = useState126(false);
59490
+ const [orderByDatePosted, setOrderByDatePosted] = useState127(true);
59491
+ const [showThreadModal, setShowThreadModal] = useState127(false);
59492
+ const [showReplyEditor1, setShowReplyEditor1] = useState127(false);
59493
+ const [showReplyEditor2, setShowReplyEditor2] = useState127(false);
59494
+ const [showDeleteModal, setShowDeleteModal] = useState127(false);
59495
+ const [showSignInModal, setShowSignInModal] = useState127(false);
59496
+ const [showRestoreModal, setShowRestoreModal] = useState127(false);
59497
+ const [showSubscriberModal, setShowSubscriberModal] = useState127(false);
59319
59498
  const { threadData, threadBody, togglePin } = useGetThread(threadId);
59320
59499
  const { data: currentUserProfile } = useGetCurrentUserProfile();
59321
59500
  const { data: entityBundle } = useGetEntityBundle(
@@ -59328,7 +59507,7 @@ function DiscussionThread(props) {
59328
59507
  );
59329
59508
  const { subscription, toggleSubscribed, isLoading } = useSubscription(
59330
59509
  threadId,
59331
- "THREAD" /* THREAD */
59510
+ SubscriptionObjectType.THREAD
59332
59511
  );
59333
59512
  const { mutate: deleteThread2 } = useDeleteThread({
59334
59513
  onSuccess: () => {
@@ -59387,7 +59566,7 @@ function DiscussionThread(props) {
59387
59566
  SubscribersModal,
59388
59567
  {
59389
59568
  id: threadId,
59390
- objectType: "THREAD" /* THREAD */,
59569
+ objectType: SubscriptionObjectType.THREAD,
59391
59570
  showModal: showSubscriberModal,
59392
59571
  handleModal: setShowSubscriberModal
59393
59572
  }
@@ -59395,7 +59574,7 @@ function DiscussionThread(props) {
59395
59574
  MarkdownSynapse_default,
59396
59575
  {
59397
59576
  markdown: threadBody,
59398
- objectType: "THREAD" /* THREAD */
59577
+ objectType: ObjectType.THREAD
59399
59578
  }
59400
59579
  )), /* @__PURE__ */ React460.createElement("span", null, "posted ", formatDate(dayjs20(threadData.createdOn), "M/D/YYYY")), /* @__PURE__ */ React460.createElement(
59401
59580
  ForumThreadEditor,
@@ -59505,7 +59684,7 @@ function DiscussionThread(props) {
59505
59684
  }
59506
59685
 
59507
59686
  // src/components/Forum/ForumPage.tsx
59508
- import React462, { useState as useState128 } from "react";
59687
+ import React462, { useState as useState129 } from "react";
59509
59688
 
59510
59689
  // src/synapse-queries/forum/useForum.ts
59511
59690
  import {
@@ -59561,7 +59740,7 @@ function useGetForumInfinite(forumId, limit, sort, ascending, filter2, options)
59561
59740
 
59562
59741
  // src/components/Forum/ForumTable.tsx
59563
59742
  import dayjs21 from "dayjs";
59564
- import React461, { useState as useState127 } from "react";
59743
+ import React461, { useState as useState128 } from "react";
59565
59744
  import { Table as Table3 } from "react-bootstrap";
59566
59745
  var ForumTable = ({
59567
59746
  forumId,
@@ -59569,10 +59748,10 @@ var ForumTable = ({
59569
59748
  filter: filter2,
59570
59749
  onClickLink
59571
59750
  }) => {
59572
- const [sort, setSort] = useState127(
59573
- "PINNED_AND_LAST_ACTIVITY" /* PINNED_AND_LAST_ACTIVITY */
59751
+ const [sort, setSort] = useState128(
59752
+ DiscussionThreadOrder.PINNED_AND_LAST_ACTIVITY
59574
59753
  );
59575
- const [isAscending, setIsAscending] = useState127(false);
59754
+ const [isAscending, setIsAscending] = useState128(false);
59576
59755
  const { data, hasNextPage, fetchNextPage } = useGetForumInfinite(
59577
59756
  forumId,
59578
59757
  limit,
@@ -59595,36 +59774,36 @@ var ForumTable = ({
59595
59774
  {
59596
59775
  role: "button",
59597
59776
  "aria-label": "Sort by Topic",
59598
- active: sort === "THREAD_TITLE" /* THREAD_TITLE */,
59599
- direction: sort === "THREAD_TITLE" ? isAscending === false ? "DESC" /* DESC */ : "ASC" /* ASC */ : "DESC" /* DESC */,
59600
- onClick: () => onSort("THREAD_TITLE" /* THREAD_TITLE */)
59777
+ active: sort === DiscussionThreadOrder.THREAD_TITLE,
59778
+ direction: sort === "THREAD_TITLE" ? isAscending === false ? Direction.DESC : Direction.ASC : Direction.DESC,
59779
+ onClick: () => onSort(DiscussionThreadOrder.THREAD_TITLE)
59601
59780
  }
59602
59781
  ))), /* @__PURE__ */ React461.createElement("th", null, "Author"), /* @__PURE__ */ React461.createElement("th", null, "Active Users"), /* @__PURE__ */ React461.createElement("th", null, /* @__PURE__ */ React461.createElement("span", { className: "SRC-split" }, /* @__PURE__ */ React461.createElement("span", null, "Replies"), /* @__PURE__ */ React461.createElement(
59603
59782
  Sort_default,
59604
59783
  {
59605
59784
  role: "button",
59606
59785
  "aria-label": "Sort by Replies",
59607
- active: sort === "NUMBER_OF_REPLIES" /* NUMBER_OF_REPLIES */,
59608
- direction: sort === "NUMBER_OF_REPLIES" ? isAscending === false ? "DESC" /* DESC */ : "ASC" /* ASC */ : "DESC" /* DESC */,
59609
- onClick: () => onSort("NUMBER_OF_REPLIES" /* NUMBER_OF_REPLIES */)
59786
+ active: sort === DiscussionThreadOrder.NUMBER_OF_REPLIES,
59787
+ direction: sort === "NUMBER_OF_REPLIES" ? isAscending === false ? Direction.DESC : Direction.ASC : Direction.DESC,
59788
+ onClick: () => onSort(DiscussionThreadOrder.NUMBER_OF_REPLIES)
59610
59789
  }
59611
59790
  ))), /* @__PURE__ */ React461.createElement("th", null, /* @__PURE__ */ React461.createElement("span", { className: "SRC-split" }, /* @__PURE__ */ React461.createElement("span", null, "Views"), /* @__PURE__ */ React461.createElement(
59612
59791
  Sort_default,
59613
59792
  {
59614
59793
  role: "button",
59615
59794
  "aria-label": "Sort by Views",
59616
- active: sort === "NUMBER_OF_VIEWS" /* NUMBER_OF_VIEWS */,
59617
- direction: sort === "NUMBER_OF_VIEWS" ? isAscending === false ? "DESC" /* DESC */ : "ASC" /* ASC */ : "DESC" /* DESC */,
59618
- onClick: () => onSort("NUMBER_OF_VIEWS" /* NUMBER_OF_VIEWS */)
59795
+ active: sort === DiscussionThreadOrder.NUMBER_OF_VIEWS,
59796
+ direction: sort === "NUMBER_OF_VIEWS" ? isAscending === false ? Direction.DESC : Direction.ASC : Direction.DESC,
59797
+ onClick: () => onSort(DiscussionThreadOrder.NUMBER_OF_VIEWS)
59619
59798
  }
59620
59799
  ))), /* @__PURE__ */ React461.createElement("th", null, /* @__PURE__ */ React461.createElement("span", { className: "SRC-split" }, /* @__PURE__ */ React461.createElement("span", null, "Activity"), /* @__PURE__ */ React461.createElement(
59621
59800
  Sort_default,
59622
59801
  {
59623
59802
  role: "button",
59624
59803
  "aria-label": "Sort by Last Activity",
59625
- active: sort === "PINNED_AND_LAST_ACTIVITY" /* PINNED_AND_LAST_ACTIVITY */,
59626
- direction: sort === "PINNED_AND_LAST_ACTIVITY" ? isAscending === false ? "DESC" /* DESC */ : "ASC" /* ASC */ : "DESC" /* DESC */,
59627
- onClick: () => onSort("PINNED_AND_LAST_ACTIVITY" /* PINNED_AND_LAST_ACTIVITY */)
59804
+ active: sort === DiscussionThreadOrder.PINNED_AND_LAST_ACTIVITY,
59805
+ direction: sort === "PINNED_AND_LAST_ACTIVITY" ? isAscending === false ? Direction.DESC : Direction.ASC : Direction.DESC,
59806
+ onClick: () => onSort(DiscussionThreadOrder.PINNED_AND_LAST_ACTIVITY)
59628
59807
  }
59629
59808
  ))))), /* @__PURE__ */ React461.createElement("tbody", null, threads.map((item) => {
59630
59809
  return /* @__PURE__ */ React461.createElement("tr", { key: item.id }, /* @__PURE__ */ React461.createElement("td", null, /* @__PURE__ */ React461.createElement(Link_default, { onClick: () => onClickLink(item.id) }, item.isPinned ? /* @__PURE__ */ React461.createElement(IconSvg_default, { icon: "pushpin" }) : /* @__PURE__ */ React461.createElement(React461.Fragment, null), item.title)), /* @__PURE__ */ React461.createElement("td", null, /* @__PURE__ */ React461.createElement(UserCard_default, { size: SMALL_USER_CARD, ownerId: item.createdBy })), /* @__PURE__ */ React461.createElement("td", null, item.activeAuthors.map((user) => /* @__PURE__ */ React461.createElement("div", { key: user, className: "avatarContainer" }, /* @__PURE__ */ React461.createElement(
@@ -59657,13 +59836,13 @@ var ForumPage = ({
59657
59836
  limit,
59658
59837
  onClickLink
59659
59838
  }) => {
59660
- const [showThreadModal, setShowThreadModal] = useState128(false);
59661
- const [showSignInModal, setShowSignInModal] = useState128(false);
59662
- const [showDeletedThread, setShowDeletedThread] = useState128(false);
59663
- const [showSubscriberModal, setShowSubscriberModal] = useState128(false);
59839
+ const [showThreadModal, setShowThreadModal] = useState129(false);
59840
+ const [showSignInModal, setShowSignInModal] = useState129(false);
59841
+ const [showDeletedThread, setShowDeletedThread] = useState129(false);
59842
+ const [showSubscriberModal, setShowSubscriberModal] = useState129(false);
59664
59843
  const { subscription, isLoading, toggleSubscribed } = useSubscription(
59665
59844
  forumId,
59666
- "FORUM" /* FORUM */
59845
+ SubscriptionObjectType.FORUM
59667
59846
  );
59668
59847
  function handleFollowBtn() {
59669
59848
  try {
@@ -59688,7 +59867,7 @@ var ForumPage = ({
59688
59867
  SubscribersModal,
59689
59868
  {
59690
59869
  id: forumId,
59691
- objectType: "FORUM" /* FORUM */,
59870
+ objectType: SubscriptionObjectType.FORUM,
59692
59871
  showModal: showSubscriberModal,
59693
59872
  handleModal: setShowSubscriberModal
59694
59873
  }
@@ -59723,7 +59902,7 @@ var ForumPage = ({
59723
59902
  onClickLink,
59724
59903
  forumId,
59725
59904
  limit,
59726
- filter: "DELETED_ONLY" /* DELETED_ONLY */
59905
+ filter: DiscussionFilter.DELETED_ONLY
59727
59906
  }
59728
59907
  )), /* @__PURE__ */ React462.createElement(
59729
59908
  ForumTable,
@@ -59731,7 +59910,7 @@ var ForumPage = ({
59731
59910
  onClickLink,
59732
59911
  forumId,
59733
59912
  limit,
59734
- filter: "EXCLUDE_DELETED" /* EXCLUDE_DELETED */
59913
+ filter: DiscussionFilter.EXCLUDE_DELETED
59735
59914
  }
59736
59915
  ), /* @__PURE__ */ React462.createElement(
59737
59916
  ForumThreadEditor,
@@ -59758,18 +59937,18 @@ var ForumPage = ({
59758
59937
  };
59759
59938
 
59760
59939
  // src/components/Goals/Goals.tsx
59761
- import React466, { useEffect as useEffect93, useState as useState130 } from "react";
59940
+ import React466, { useEffect as useEffect95, useState as useState131 } from "react";
59762
59941
 
59763
59942
  // src/components/Goals/Goals.Mobile.tsx
59764
59943
  import React464 from "react";
59765
59944
 
59766
59945
  // src/components/home_page/ExpandableContent.tsx
59767
- import React463, { useState as useState129 } from "react";
59946
+ import React463, { useState as useState130 } from "react";
59768
59947
  function ExpandableContent({
59769
59948
  title,
59770
59949
  content: content2
59771
59950
  }) {
59772
- const [isExpanded, setIsExpanded] = useState129(false);
59951
+ const [isExpanded, setIsExpanded] = useState130(false);
59773
59952
  return /* @__PURE__ */ React463.createElement("div", { className: "ExpandableContent" }, /* @__PURE__ */ React463.createElement("div", { className: "ExpandableContent__button__container" }, /* @__PURE__ */ React463.createElement(
59774
59953
  "button",
59775
59954
  {
@@ -59840,8 +60019,8 @@ function GoalsDesktop({
59840
60019
  var Goals = (props) => {
59841
60020
  const { entityId } = props;
59842
60021
  const { accessToken } = useSynapseContext();
59843
- const [assets, setAssets] = useState130();
59844
- const [error, setError] = useState130();
60022
+ const [assets, setAssets] = useState131();
60023
+ const [error, setError] = useState131();
59845
60024
  const showDesktop = useShowDesktop();
59846
60025
  const queryBundleRequest = {
59847
60026
  concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
@@ -59852,7 +60031,7 @@ var Goals = (props) => {
59852
60031
  }
59853
60032
  };
59854
60033
  const { data: queryResultBundle } = useGetQueryResultBundle(queryBundleRequest);
59855
- useEffect93(() => {
60034
+ useEffect95(() => {
59856
60035
  const getData = async () => {
59857
60036
  try {
59858
60037
  const assetColumnIndex = getFieldIndex(
@@ -59872,7 +60051,7 @@ var Goals = (props) => {
59872
60051
  (fileId) => {
59873
60052
  return {
59874
60053
  associateObjectId: entityId,
59875
- associateObjectType: "TableEntity" /* TableEntity */,
60054
+ associateObjectType: FileHandleAssociateType.TableEntity,
59876
60055
  fileHandleId: fileId
59877
60056
  };
59878
60057
  }
@@ -59941,7 +60120,7 @@ var Goals = (props) => {
59941
60120
 
59942
60121
  // src/components/GoogleMap/GoogleMap.tsx
59943
60122
  import { GoogleMap, LoadScript } from "@react-google-maps/api";
59944
- import React468, { useCallback as useCallback34, useMemo as useMemo38, useState as useState131 } from "react";
60123
+ import React468, { useCallback as useCallback34, useMemo as useMemo38, useState as useState132 } from "react";
59945
60124
  import { useQuery as useQuery31 } from "react-query";
59946
60125
 
59947
60126
  // src/components/GoogleMap/SynapseUserMarker.tsx
@@ -59984,7 +60163,7 @@ function Map3(props) {
59984
60163
  const { data: apiKey } = useQuery31("googleMapsApiKey", getGoogleMapsApiKey, {
59985
60164
  useErrorBoundary: true
59986
60165
  });
59987
- const [currentOpenGeoData, setCurrentOpenGeoData] = useState131(
60166
+ const [currentOpenGeoData, setCurrentOpenGeoData] = useState132(
59988
60167
  null
59989
60168
  );
59990
60169
  const { data: geoData, isLoading: isLoadingGeoData } = useQuery31(
@@ -60059,12 +60238,12 @@ var GoogleMap_default = Map3;
60059
60238
  var IconSvg_default2 = IconSvg_default;
60060
60239
 
60061
60240
  // src/components/Markdown/MarkdownCollapse.tsx
60062
- import React469, { useState as useState132 } from "react";
60241
+ import React469, { useState as useState133 } from "react";
60063
60242
  import { Collapse as Collapse4, SafeAnchor } from "react-bootstrap";
60064
60243
  var MarkdownCollapse = (props) => {
60065
- const [show, setShow] = useState132(false);
60066
- const [wordCount, setWordCount] = useState132();
60067
- const [plainText, setPlainText] = useState132();
60244
+ const [show, setShow] = useState133(false);
60245
+ const [wordCount, setWordCount] = useState133();
60246
+ const [plainText, setPlainText] = useState133();
60068
60247
  const onMarkdownProcessingDone = (textContent) => {
60069
60248
  if (textContent) {
60070
60249
  setPlainText(textContent.trim());
@@ -60112,12 +60291,12 @@ var MarkdownCollapse = (props) => {
60112
60291
  };
60113
60292
 
60114
60293
  // src/components/OAuthClientManagement/OAuthManagement.tsx
60115
- import React471, { useState as useState134 } from "react";
60294
+ import React471, { useState as useState135 } from "react";
60116
60295
  import { Table as Table4 } from "react-bootstrap";
60117
60296
  import dayjs22 from "dayjs";
60118
60297
 
60119
60298
  // src/components/OAuthClientManagement/CreateOAuthClient.tsx
60120
- import React470, { useEffect as useEffect94, useMemo as useMemo39, useState as useState133 } from "react";
60299
+ import React470, { useEffect as useEffect96, useMemo as useMemo39, useState as useState134 } from "react";
60121
60300
  import DeleteTwoToneIcon2 from "@mui/icons-material/DeleteTwoTone";
60122
60301
  var INPUT_CHANGE_DEBOUNCE_DELAY_MS = 500;
60123
60302
  var GRID_NARROW = 12;
@@ -60134,16 +60313,16 @@ var CreateOAuthModal = ({
60134
60313
  setIsShowingModal
60135
60314
  }) => {
60136
60315
  const { accessToken } = useSynapseContext();
60137
- const [clientName, setClientName] = useState133("");
60138
- const [redirectUris, setRedirectUris] = useState133([{ uri: "" }]);
60139
- const [policyUri, setPolicyUri] = useState133();
60140
- const [clientUri, setClientUri] = useState133();
60141
- const [sectorUri, setSectorUri] = useState133();
60142
- const [tosUri, setTosUri] = useState133();
60143
- const [warnTrigger, setWarnTrigger] = useState133(false);
60144
- const [isDelete, setIsDelete] = useState133(false);
60145
- const [updatedClient, setUpdatedClient] = useState133();
60146
- const [error, setError] = useState133();
60316
+ const [clientName, setClientName] = useState134("");
60317
+ const [redirectUris, setRedirectUris] = useState134([{ uri: "" }]);
60318
+ const [policyUri, setPolicyUri] = useState134();
60319
+ const [clientUri, setClientUri] = useState134();
60320
+ const [sectorUri, setSectorUri] = useState134();
60321
+ const [tosUri, setTosUri] = useState134();
60322
+ const [warnTrigger, setWarnTrigger] = useState134(false);
60323
+ const [isDelete, setIsDelete] = useState134(false);
60324
+ const [updatedClient, setUpdatedClient] = useState134();
60325
+ const [error, setError] = useState134();
60147
60326
  const warningHeader = "Are you absolutely sure?";
60148
60327
  const warningBody = "Editing this detail will render your client invalid and will require you to resubmit verification. This action cannot be undone.";
60149
60328
  const oAuthClient = useMemo39(() => {
@@ -60167,7 +60346,7 @@ var CreateOAuthModal = ({
60167
60346
  sectorUri,
60168
60347
  tosUri
60169
60348
  ]);
60170
- useEffect94(() => {
60349
+ useEffect96(() => {
60171
60350
  setClientName(client?.client_name ?? "");
60172
60351
  setRedirectUris(
60173
60352
  client?.redirect_uris.map((str) => ({ uri: str })) ?? [{ uri: "" }]
@@ -60448,14 +60627,14 @@ var CreateOAuthModal = ({
60448
60627
  // src/components/OAuthClientManagement/OAuthManagement.tsx
60449
60628
  var OAuthManagement = () => {
60450
60629
  const { accessToken } = useSynapseContext();
60451
- const [isShowingCreateClientModal, setIsShowingCreateClientModal] = useState134(false);
60452
- const [isEdit, setIsEdit] = useState134(false);
60453
- const [selectedClient, setSelectedClient] = useState134();
60454
- const [isShowingConfirmModal, setIsShowingConfirmModal] = useState134(false);
60455
- const [isShowingSecretWarning, setIsShowingSecretWarning] = useState134(false);
60456
- const [isShowingSecret, setIsShowingSecret] = useState134(false);
60457
- const [secret, setSecret] = useState134();
60458
- const [isShowingVerification, setIsShowingVerification] = useState134(false);
60630
+ const [isShowingCreateClientModal, setIsShowingCreateClientModal] = useState135(false);
60631
+ const [isEdit, setIsEdit] = useState135(false);
60632
+ const [selectedClient, setSelectedClient] = useState135();
60633
+ const [isShowingConfirmModal, setIsShowingConfirmModal] = useState135(false);
60634
+ const [isShowingSecretWarning, setIsShowingSecretWarning] = useState135(false);
60635
+ const [isShowingSecret, setIsShowingSecret] = useState135(false);
60636
+ const [secret, setSecret] = useState135();
60637
+ const [isShowingVerification, setIsShowingVerification] = useState135(false);
60459
60638
  const { data, hasNextPage, fetchNextPage } = useGetOAuthClientInfinite();
60460
60639
  const oAuthClientList = data?.pages.flatMap((page) => page.results) ?? [];
60461
60640
  const warningHeader = "Are you absolutely sure?";
@@ -60587,7 +60766,7 @@ var OAuthManagement = () => {
60587
60766
  };
60588
60767
 
60589
60768
  // src/components/Plot/ThemesPlot.tsx
60590
- import React474, { useEffect as useEffect95, useState as useState135 } from "react";
60769
+ import React474, { useEffect as useEffect97, useState as useState136 } from "react";
60591
60770
  import _7 from "lodash-es";
60592
60771
 
60593
60772
  // src/components/Plot/DotPlot.tsx
@@ -60942,11 +61121,11 @@ function ThemesPlot({
60942
61121
  dotPlotYAxisLabel = "Research Themes"
60943
61122
  }) {
60944
61123
  const { accessToken } = useSynapseContext();
60945
- const [isLoaded, setIsLoaded] = useState135(false);
60946
- const [dotPlotQueryData, setDotPlotQueryData] = useState135([]);
60947
- const [topBarPlotData, setTopBarQueryData] = useState135([]);
60948
- const [sideBarPlotData, setSideBarQueryData] = useState135([]);
60949
- useEffect95(() => {
61124
+ const [isLoaded, setIsLoaded] = useState136(false);
61125
+ const [dotPlotQueryData, setDotPlotQueryData] = useState136([]);
61126
+ const [topBarPlotData, setTopBarQueryData] = useState136([]);
61127
+ const [sideBarPlotData, setSideBarQueryData] = useState136([]);
61128
+ useEffect97(() => {
60950
61129
  const dotPlotData = fetchData(accessToken, dotPlot);
60951
61130
  const topBarPlotData2 = fetchData(accessToken, topBarPlot);
60952
61131
  const sideBarPlotData2 = fetchData(accessToken, sideBarPlot);
@@ -61099,7 +61278,7 @@ function ThemesPlot({
61099
61278
  }
61100
61279
 
61101
61280
  // src/components/Plot/UpsetPlot.tsx
61102
- import React475, { useEffect as useEffect96, useState as useState136 } from "react";
61281
+ import React475, { useEffect as useEffect98, useState as useState137 } from "react";
61103
61282
  import UpSetJS, {
61104
61283
  extractSets,
61105
61284
  generateCombinations
@@ -61127,15 +61306,15 @@ var UpsetPlot = ({
61127
61306
  summaryLink
61128
61307
  }) => {
61129
61308
  const { accessToken } = useSynapseContext();
61130
- const [isLoading, setIsLoading] = useState136();
61131
- const [data, setData] = useState136();
61132
- const [error, setError] = useState136();
61133
- const [selection, setSelection] = useState136(null);
61309
+ const [isLoading, setIsLoading] = useState137();
61310
+ const [data, setData] = useState137();
61311
+ const [error, setError] = useState137();
61312
+ const [selection, setSelection] = useState137(null);
61134
61313
  const { colorPalette } = ColorGradient_default(rgbIndex, 2);
61135
61314
  const updateFontSizes = {
61136
61315
  setLabel: "14px"
61137
61316
  };
61138
- useEffect96(() => {
61317
+ useEffect98(() => {
61139
61318
  let isCancelled = false;
61140
61319
  const getPlotData = async () => {
61141
61320
  setIsLoading(true);
@@ -61241,11 +61420,11 @@ var UpsetPlot = ({
61241
61420
  };
61242
61421
 
61243
61422
  // src/components/ProjectViewCarousel/ProjectViewCarousel.tsx
61244
- import React479, { useState as useState138, useEffect as useEffect97 } from "react";
61423
+ import React479, { useState as useState139, useEffect as useEffect99 } from "react";
61245
61424
 
61246
61425
  // src/components/Carousel.tsx
61247
61426
  import BrainhubCarousel from "@brainhubeu/react-carousel";
61248
- import React477, { useState as useState137 } from "react";
61427
+ import React477, { useState as useState138 } from "react";
61249
61428
 
61250
61429
  // src/assets/icons/Arrow.tsx
61251
61430
  import React476 from "react";
@@ -61302,7 +61481,7 @@ var Carousel = ({
61302
61481
  isLoading = false
61303
61482
  }) => {
61304
61483
  const showDesktop = useShowDesktop();
61305
- const [currentIndex, setCurrentIndex] = useState137(0);
61484
+ const [currentIndex, setCurrentIndex] = useState138(0);
61306
61485
  const styledChildren = React477.Children.map(children, (child, index) => {
61307
61486
  let childClass = child.props.className ?? "";
61308
61487
  if (index === mod(currentIndex, children.length)) {
@@ -61378,14 +61557,14 @@ var ProjectViewCarousel = ({ entityId }) => {
61378
61557
  }
61379
61558
  };
61380
61559
  const { accessToken } = useSynapseContext();
61381
- const [projects, setProjects] = useState138([]);
61382
- const [error, setError] = useState138();
61560
+ const [projects, setProjects] = useState139([]);
61561
+ const [error, setError] = useState139();
61383
61562
  const {
61384
61563
  data: queryResultBundle,
61385
61564
  error: queryError,
61386
61565
  isLoading
61387
61566
  } = useGetQueryResultBundle(queryBundleRequest);
61388
- useEffect97(() => {
61567
+ useEffect99(() => {
61389
61568
  let isMounted = true;
61390
61569
  const getData = async () => {
61391
61570
  try {
@@ -61682,9 +61861,9 @@ var RenderIfInView = class extends React484.Component {
61682
61861
  import React487 from "react";
61683
61862
 
61684
61863
  // src/components/Resources/Resources.Desktop.tsx
61685
- import React485, { useState as useState139 } from "react";
61864
+ import React485, { useState as useState140 } from "react";
61686
61865
  function ResourcesDesktop({ data }) {
61687
- const [index, setIndex] = useState139(0);
61866
+ const [index, setIndex] = useState140(0);
61688
61867
  return /* @__PURE__ */ React485.createElement("div", { className: "control-container" }, /* @__PURE__ */ React485.createElement("div", { className: "button-container" }, data?.map((el, curIndex) => {
61689
61868
  return /* @__PURE__ */ React485.createElement(
61690
61869
  "button",
@@ -61866,7 +62045,7 @@ var InputSizedButton = styled_default(Button_default, {
61866
62045
  }));
61867
62046
 
61868
62047
  // src/components/SubscriptionPage/SubscriptionPage.tsx
61869
- import React495, { useId as useId6, useState as useState141 } from "react";
62048
+ import React495, { useId as useId6, useState as useState142 } from "react";
61870
62049
 
61871
62050
  // src/components/SubscriptionPage/SubscriptionItem.tsx
61872
62051
  import React493 from "react";
@@ -61907,7 +62086,7 @@ function ForumTopic(props) {
61907
62086
  });
61908
62087
  const { isSubscribed, isLoading, toggleSubscribed } = useSubscription(
61909
62088
  subscription.objectId,
61910
- "FORUM" /* FORUM */
62089
+ SubscriptionObjectType.FORUM
61911
62090
  );
61912
62091
  let href;
61913
62092
  if (forum) {
@@ -61933,7 +62112,7 @@ function SubscriptionItem(props) {
61933
62112
  const { threadData } = useGetThread(subscription.objectId);
61934
62113
  const { isSubscribed, isLoading, toggleSubscribed } = useSubscription(
61935
62114
  subscription.objectId,
61936
- "THREAD" /* THREAD */
62115
+ SubscriptionObjectType.THREAD
61937
62116
  );
61938
62117
  let href;
61939
62118
  if (threadData) {
@@ -61956,9 +62135,9 @@ function SubscriptionItem(props) {
61956
62135
  function SubscriptionItem2(props) {
61957
62136
  const { subscription } = props;
61958
62137
  switch (subscription.objectType) {
61959
- case "FORUM" /* FORUM */:
62138
+ case SubscriptionObjectType.FORUM:
61960
62139
  return /* @__PURE__ */ React493.createElement(ForumTopic, { subscription });
61961
- case "THREAD" /* THREAD */:
62140
+ case SubscriptionObjectType.THREAD:
61962
62141
  return /* @__PURE__ */ React493.createElement(SubscriptionItem, { subscription });
61963
62142
  default:
61964
62143
  console.warn(
@@ -61969,7 +62148,7 @@ function SubscriptionItem2(props) {
61969
62148
  }
61970
62149
 
61971
62150
  // src/components/DropdownSelect/DropdownSelect.tsx
61972
- import React494, { useState as useState140 } from "react";
62151
+ import React494, { useState as useState141 } from "react";
61973
62152
  function DropdownSelect(props) {
61974
62153
  const {
61975
62154
  options,
@@ -61981,7 +62160,7 @@ function DropdownSelect(props) {
61981
62160
  } = props;
61982
62161
  const [open, setOpen] = React494.useState(false);
61983
62162
  const anchorRef = React494.useRef(null);
61984
- const [selectedIndexLocal, setSelectedIndexLocal] = useState140(
62163
+ const [selectedIndexLocal, setSelectedIndexLocal] = useState141(
61985
62164
  selectedIndex ?? 0
61986
62165
  );
61987
62166
  const handleMenuItemClick = (event, index) => {
@@ -62068,14 +62247,14 @@ var sortOptions = [
62068
62247
  { value: "DESC", label: "Most Recent" }
62069
62248
  ];
62070
62249
  function SubscriptionPage() {
62071
- const [objectType, setObjectType] = useState141(
62072
- "FORUM" /* FORUM */
62250
+ const [objectType, setObjectType] = useState142(
62251
+ SubscriptionObjectType.FORUM
62073
62252
  );
62074
- const [sortDirection, setSortDirection] = useState141(sortOptions[0]);
62253
+ const [sortDirection, setSortDirection] = useState142(sortOptions[0]);
62075
62254
  const instanceSpecificQueryKey = useId6();
62076
62255
  const currentFilter = {
62077
62256
  objectType,
62078
- sortBy: "CREATED_ON" /* CREATED_ON */,
62257
+ sortBy: SortByType.CREATED_ON,
62079
62258
  sortDirection: sortDirection.value
62080
62259
  };
62081
62260
  const { data, hasNextPage, isFetchingNextPage, fetchNextPage } = useGetAllSubscriptions(
@@ -62107,8 +62286,8 @@ function SubscriptionPage() {
62107
62286
  textColor: "secondary",
62108
62287
  indicatorColor: "secondary"
62109
62288
  },
62110
- /* @__PURE__ */ React495.createElement(Tab_default, { value: "FORUM" /* FORUM */, label: "Project Forums" }),
62111
- /* @__PURE__ */ React495.createElement(Tab_default, { value: "THREAD" /* THREAD */, label: "Threads" })
62289
+ /* @__PURE__ */ React495.createElement(Tab_default, { value: SubscriptionObjectType.FORUM, label: "Project Forums" }),
62290
+ /* @__PURE__ */ React495.createElement(Tab_default, { value: SubscriptionObjectType.THREAD, label: "Threads" })
62112
62291
  ), /* @__PURE__ */ React495.createElement(Stack_default, { gap: 0.5 }, data?.pages.map((subscription) => /* @__PURE__ */ React495.createElement(
62113
62292
  SubscriptionItem2,
62114
62293
  {
@@ -62130,14 +62309,14 @@ function SubscriptionPage() {
62130
62309
  }
62131
62310
 
62132
62311
  // src/components/SubsectionRowRenderer/SubsectionRowRenderer.tsx
62133
- import React496, { useState as useState142 } from "react";
62312
+ import React496, { useState as useState143 } from "react";
62134
62313
  import { useDeepCompareEffectNoCheck as useDeepCompareEffectNoCheck4 } from "use-deep-compare-effect";
62135
62314
  var LIST_COLUMN_TYPES = [
62136
- "BOOLEAN_LIST" /* BOOLEAN_LIST */,
62137
- "DATE_LIST" /* DATE_LIST */,
62138
- "ENTITYID_LIST" /* ENTITYID_LIST */,
62139
- "INTEGER_LIST" /* INTEGER_LIST */,
62140
- "STRING_LIST" /* STRING_LIST */
62315
+ ColumnTypeEnum.BOOLEAN_LIST,
62316
+ ColumnTypeEnum.DATE_LIST,
62317
+ ColumnTypeEnum.ENTITYID_LIST,
62318
+ ColumnTypeEnum.INTEGER_LIST,
62319
+ ColumnTypeEnum.STRING_LIST
62141
62320
  ];
62142
62321
  var SubsectionRowRenderer = ({
62143
62322
  sql,
@@ -62150,8 +62329,8 @@ var SubsectionRowRenderer = ({
62150
62329
  limit
62151
62330
  }) => {
62152
62331
  const { accessToken } = useSynapseContext();
62153
- const [rowSet, setRowSet] = useState142();
62154
- const [isLoading, setIsLoading] = useState142();
62332
+ const [rowSet, setRowSet] = useState143();
62333
+ const [isLoading, setIsLoading] = useState143();
62155
62334
  let mounted = true;
62156
62335
  useDeepCompareEffectNoCheck4(() => {
62157
62336
  const fetchData2 = async function() {
@@ -63910,11 +64089,11 @@ var _SynapseFormSubmissionGrid = class extends React505.Component {
63910
64089
  };
63911
64090
  var SynapseFormSubmissionGrid = _SynapseFormSubmissionGrid;
63912
64091
  __publicField(SynapseFormSubmissionGrid, "requestFilter", {
63913
- IN_PROGRESS: ["WAITING_FOR_SUBMISSION" /* WAITING_FOR_SUBMISSION */],
64092
+ IN_PROGRESS: [StatusEnum.WAITING_FOR_SUBMISSION],
63914
64093
  SUBMITTED: [
63915
- "SUBMITTED_WAITING_FOR_REVIEW" /* SUBMITTED_WAITING_FOR_REVIEW */,
63916
- "ACCEPTED" /* ACCEPTED */,
63917
- "REJECTED" /* REJECTED */
64094
+ StatusEnum.SUBMITTED_WAITING_FOR_REVIEW,
64095
+ StatusEnum.ACCEPTED,
64096
+ StatusEnum.REJECTED
63918
64097
  ]
63919
64098
  });
63920
64099
 
@@ -63949,16 +64128,16 @@ var SystemUseNotification = (sxProps) => {
63949
64128
  var SystemUseNotification_default = SystemUseNotification;
63950
64129
 
63951
64130
  // src/components/TableFeedCards/TableFeedCards.tsx
63952
- import React507, { useEffect as useEffect98, useState as useState143 } from "react";
64131
+ import React507, { useEffect as useEffect100, useState as useState144 } from "react";
63953
64132
  import dayjs25 from "dayjs";
63954
64133
  var TableFeedCards = ({
63955
64134
  tableEntityId
63956
64135
  }) => {
63957
64136
  const { accessToken } = useSynapseContext();
63958
- const [rowSet, setRowSet] = useState143();
63959
- const [itemCountShowing, setItemCountShowing] = useState143(3);
64137
+ const [rowSet, setRowSet] = useState144();
64138
+ const [itemCountShowing, setItemCountShowing] = useState144(3);
63960
64139
  let mounted = true;
63961
- useEffect98(() => {
64140
+ useEffect100(() => {
63962
64141
  const executeQuery = () => {
63963
64142
  if (mounted) {
63964
64143
  if (rowSet) {
@@ -64031,10 +64210,10 @@ var TableFeedCards = ({
64031
64210
  var TableFeedCards_default = TableFeedCards;
64032
64211
 
64033
64212
  // src/components/TermsAndConditions/TermsAndConditions.tsx
64034
- import React518, { useEffect as useEffect100, useState as useState145 } from "react";
64213
+ import React518, { useEffect as useEffect102, useState as useState146 } from "react";
64035
64214
 
64036
64215
  // src/components/TermsAndConditions/TermsAndConditionsItem.tsx
64037
- import React509, { useEffect as useEffect99, useState as useState144 } from "react";
64216
+ import React509, { useEffect as useEffect101, useState as useState145 } from "react";
64038
64217
 
64039
64218
  // src/assets/icons/terms/CheckIcon.tsx
64040
64219
  import React508 from "react";
@@ -64051,10 +64230,10 @@ var CheckIcon = (props) => {
64051
64230
  // src/components/TermsAndConditions/TermsAndConditionsItem.tsx
64052
64231
  var TermsAndConditionsItem = (props) => {
64053
64232
  const { id, item, enabled, checked, onChange } = props;
64054
- const [showDesc, setShowDes] = useState144(false);
64055
- const [isChecked, setIsChecked] = useState144(false);
64233
+ const [showDesc, setShowDes] = useState145(false);
64234
+ const [isChecked, setIsChecked] = useState145(false);
64056
64235
  let mounted = true;
64057
- useEffect99(() => {
64236
+ useEffect101(() => {
64058
64237
  if (mounted) {
64059
64238
  setIsChecked(checked);
64060
64239
  }
@@ -64575,13 +64754,13 @@ var TermsAndConditions = ({
64575
64754
  const governancePolicy = "https://help.synapse.org/docs/Synapse-Governance.2004255211.html";
64576
64755
  const getInitialCheckboxState = () => Array.from(Array(checkboxCount).fill(false));
64577
64756
  let mounted = true;
64578
- const [checkboxChecked, setCheckboxChecked] = useState145(
64757
+ const [checkboxChecked, setCheckboxChecked] = useState146(
64579
64758
  getInitialCheckboxState()
64580
64759
  );
64581
- const [checkboxEnabled, setCheckboxEnabled] = useState145(
64760
+ const [checkboxEnabled, setCheckboxEnabled] = useState146(
64582
64761
  getInitialCheckboxState().fill(true, 0, 1)
64583
64762
  );
64584
- useEffect100(() => {
64763
+ useEffect102(() => {
64585
64764
  if (mounted) {
64586
64765
  checkFormCompleted();
64587
64766
  }
@@ -64636,7 +64815,7 @@ var TermsAndConditions = ({
64636
64815
  var TermsAndConditions_default = TermsAndConditions;
64637
64816
 
64638
64817
  // src/components/UserCardList/UserCardListRotate.tsx
64639
- import React519, { useState as useState146 } from "react";
64818
+ import React519, { useState as useState147 } from "react";
64640
64819
  import { useDeepCompareEffectNoCheck as useDeepCompareEffectNoCheck5 } from "use-deep-compare-effect";
64641
64820
  var STORED_UID_KEY = "sage_rotate_uids";
64642
64821
  var DEFAULT_DISPLAY_COUNT = 3;
@@ -64680,9 +64859,9 @@ var UserCardListRotate = ({
64680
64859
  sqlOperator
64681
64860
  }) => {
64682
64861
  const { accessToken } = useSynapseContext();
64683
- const [userIds, setUserIds] = useState146([]);
64684
- const [queryData, setQueryData] = useState146();
64685
- const [isLoading, setIsLoading] = useState146();
64862
+ const [userIds, setUserIds] = useState147([]);
64863
+ const [queryData, setQueryData] = useState147();
64864
+ const [isLoading, setIsLoading] = useState147();
64686
64865
  let mounted = true;
64687
64866
  const storageUidKey = `${STORED_UID_KEY}-${sql}-${JSON.stringify(
64688
64867
  selectedFacets
@@ -64714,7 +64893,7 @@ var UserCardListRotate = ({
64714
64893
  const { queryResult } = queryResultBundle;
64715
64894
  if (queryResult?.queryResults.rows) {
64716
64895
  const ownerIdColumnIndex = queryResult.queryResults.headers.findIndex(
64717
- (el) => el.columnType === "USERID" /* USERID */
64896
+ (el) => el.columnType === ColumnTypeEnum.USERID
64718
64897
  );
64719
64898
  const ids = queryResult.queryResults.rows.map((d) => d.values[ownerIdColumnIndex]).filter((id) => id !== null);
64720
64899
  if (mounted) {
@@ -64766,9 +64945,9 @@ function UserCardListGroupsMobile(props) {
64766
64945
  }
64767
64946
 
64768
64947
  // src/components/UserCardList/UserCardListGroups/UserCardListGroups.Desktop.tsx
64769
- import React521, { useState as useState147 } from "react";
64948
+ import React521, { useState as useState148 } from "react";
64770
64949
  function UserCardListGroupsDesktop(props) {
64771
- const [selectedGroupIndex, setSelectedGroupIndex] = useState147(0);
64950
+ const [selectedGroupIndex, setSelectedGroupIndex] = useState148(0);
64772
64951
  const { columnName, facetValues, ...rest } = props;
64773
64952
  const selectedFacet = {
64774
64953
  columnName,
@@ -64811,10 +64990,10 @@ function UserCardListGroups(props) {
64811
64990
  }
64812
64991
 
64813
64992
  // src/components/UserProfileLinks/UserProfileLinks.tsx
64814
- import React526, { useState as useState148, useMemo as useMemo40 } from "react";
64993
+ import React526, { useState as useState149, useMemo as useMemo40 } from "react";
64815
64994
 
64816
64995
  // src/components/UserProfileLinks/UserChallenges.tsx
64817
- import React523, { useEffect as useEffect101 } from "react";
64996
+ import React523, { useEffect as useEffect103 } from "react";
64818
64997
  import { useErrorHandler as useErrorHandler7 } from "react-error-boundary";
64819
64998
  import { useInView as useInView11 } from "react-intersection-observer";
64820
64999
  function UserChallenges({ userId }) {
@@ -64830,12 +65009,12 @@ function UserChallenges({ userId }) {
64830
65009
  isError,
64831
65010
  error: newError
64832
65011
  } = useGetUserChallengesInfinite(userId);
64833
- useEffect101(() => {
65012
+ useEffect103(() => {
64834
65013
  if (isError && newError) {
64835
65014
  handleError(newError);
64836
65015
  }
64837
65016
  }, [isError, newError, handleError]);
64838
- useEffect101(() => {
65017
+ useEffect103(() => {
64839
65018
  if (status === "success" && !isFetching && hasNextPage && fetchNextPage && inView) {
64840
65019
  fetchNextPage();
64841
65020
  }
@@ -64858,7 +65037,7 @@ function UserChallenges({ userId }) {
64858
65037
  }
64859
65038
 
64860
65039
  // src/components/UserProfileLinks/UserProjects.tsx
64861
- import React524, { useEffect as useEffect102 } from "react";
65040
+ import React524, { useEffect as useEffect104 } from "react";
64862
65041
  import { useErrorHandler as useErrorHandler8 } from "react-error-boundary";
64863
65042
  import { useInView as useInView12 } from "react-intersection-observer";
64864
65043
  function UserProjects({ userId }) {
@@ -64875,12 +65054,12 @@ function UserProjects({ userId }) {
64875
65054
  isError,
64876
65055
  error: newError
64877
65056
  } = useGetUserProjectsInfinite(userId, getProjectsParameters);
64878
- useEffect102(() => {
65057
+ useEffect104(() => {
64879
65058
  if (isError && newError) {
64880
65059
  handleError(newError);
64881
65060
  }
64882
65061
  }, [isError, newError, handleError]);
64883
- useEffect102(() => {
65062
+ useEffect104(() => {
64884
65063
  if (status === "success" && !isFetching && hasNextPage && fetchNextPage && inView) {
64885
65064
  fetchNextPage();
64886
65065
  }
@@ -64903,7 +65082,7 @@ function UserProjects({ userId }) {
64903
65082
  }
64904
65083
 
64905
65084
  // src/components/UserProfileLinks/UserTeams.tsx
64906
- import React525, { useEffect as useEffect103 } from "react";
65085
+ import React525, { useEffect as useEffect105 } from "react";
64907
65086
  import { useErrorHandler as useErrorHandler9 } from "react-error-boundary";
64908
65087
  import { useInView as useInView13 } from "react-intersection-observer";
64909
65088
  function UserTeams({ userId }) {
@@ -64919,12 +65098,12 @@ function UserTeams({ userId }) {
64919
65098
  isError,
64920
65099
  error: newError
64921
65100
  } = useGetUserTeamsInfinite(userId);
64922
- useEffect103(() => {
65101
+ useEffect105(() => {
64923
65102
  if (isError && newError) {
64924
65103
  handleError(newError);
64925
65104
  }
64926
65105
  }, [isError, newError, handleError]);
64927
- useEffect103(() => {
65106
+ useEffect105(() => {
64928
65107
  if (status === "success" && !isFetching && hasNextPage && fetchNextPage && inView) {
64929
65108
  fetchNextPage();
64930
65109
  }
@@ -64948,7 +65127,7 @@ function UserTeams({ userId }) {
64948
65127
 
64949
65128
  // src/components/UserProfileLinks/UserProfileLinks.tsx
64950
65129
  function UserProfileLinks({ userId }) {
64951
- const [currentTab, setCurrentTab] = useState148("Projects");
65130
+ const [currentTab, setCurrentTab] = useState149("Projects");
64952
65131
  const { data: userProfile } = useGetUserProfile(userId);
64953
65132
  const userProfileLinksConfig = useMemo40(
64954
65133
  () => [