@gen-epix/ui-client-casedb 4.3.0 → 4.3.2
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/_chunks/Dashboard.js +613 -666
- package/dist/_chunks/Dashboard.js.map +1 -1
- package/dist/_chunks/LegendaItem.js.map +1 -1
- package/dist/_chunks/UploadUtil.js +4 -6
- package/dist/_chunks/UploadUtil.js.map +1 -1
- package/dist/_chunks/_baseClone.js +1 -1
- package/dist/_chunks/_baseClone.js.map +1 -1
- package/dist/_chunks/cloneDeep.js +1 -1
- package/dist/_chunks/cloneDeep.js.map +1 -1
- package/dist/_chunks/esm.js +93 -101
- package/dist/_chunks/esm.js.map +1 -1
- package/dist/_chunks/react.js +1 -1
- package/dist/_chunks/react.js.map +1 -1
- package/dist/_chunks/shallow.js +2 -2
- package/dist/_chunks/shallow.js.map +1 -1
- package/dist/_chunks/sync.js +4 -4
- package/dist/_chunks/sync.js.map +1 -1
- package/dist/_chunks/vanilla.js +1 -1
- package/dist/_chunks/vanilla.js.map +1 -1
- package/dist/_chunks/yup.js +2 -2
- package/dist/_chunks/yup.js.map +1 -1
- package/dist/components/app/CaseDbApp/CaseDbApp.d.ts +1 -1
- package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.d.ts +1 -1
- package/dist/components/ui/CaseContentForm/CaseContentForm.d.ts +1 -1
- package/dist/components/ui/CaseInfoDialog/CaseCaseSetInfo.d.ts +1 -1
- package/dist/components/ui/CaseInfoDialog/CaseContent.d.ts +1 -1
- package/dist/components/ui/CaseInfoDialog/CaseInfoForm.d.ts +1 -1
- package/dist/components/ui/CaseInfoDialog/CaseSharingForm.d.ts +1 -1
- package/dist/components/ui/CaseInfoDialog/CaseSharingInfo.d.ts +1 -1
- package/dist/components/ui/CaseInfoDialog/ReadOnlyCaseContent.d.ts +1 -1
- package/dist/components/ui/CaseSetInfoDialog/CaseSetContent.d.ts +1 -1
- package/dist/components/ui/CaseSetInfoDialog/CaseSetDescription.d.ts +1 -1
- package/dist/components/ui/CaseSetInfoDialog/CaseSetForm.d.ts +1 -1
- package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingForm.d.ts +1 -1
- package/dist/components/ui/CaseSetInfoDialog/CaseSetSharingInfo.d.ts +1 -1
- package/dist/components/ui/CaseSummary/CaseSummary.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoAccessRights.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoColAccessRights.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoData.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogContent.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoRegions.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoTrees.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoValues.d.ts +1 -1
- package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoVariableDetails.d.ts +1 -1
- package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarning.d.ts +1 -1
- package/dist/components/ui/CasesAlreadyInCaseSetWarning/CasesAlreadyInCaseSetWarningCaseSetLink.d.ts +1 -1
- package/dist/components/ui/CompletCaseTypeLoader/CompletCaseTypeLoader.d.ts +1 -1
- package/dist/components/ui/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/components/ui/ContextMenu/index.js +1 -1
- package/dist/components/ui/ContextMenu/index.js.map +1 -1
- package/dist/components/ui/CreateEventDialog/CreateEventDialogSuccessNotificationMessage.d.ts +1 -1
- package/dist/components/ui/CreateEventDialog/index.js +1 -1
- package/dist/components/ui/CreateEventDialog/index.js.map +1 -1
- package/dist/components/ui/CustomTabPanel/CustomTabPanel.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardContent.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardDownloadSidebarItem.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardGeneralSettingsForm.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardLayoutRenderer.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardLayoutSettingsForm.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardSearch.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardSearchSettings.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardSettingsSidebarItem.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardWidget.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardWidgetPlaceHolder.d.ts +1 -1
- package/dist/components/ui/Dashboard/DashboardWidgetSettingsForm.d.ts +1 -1
- package/dist/components/ui/Dashboard/context/DashboardContextProvider.d.ts +1 -1
- package/dist/components/ui/DashboardEditCases/DashboardEditCases.d.ts +1 -1
- package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoader.d.ts +1 -1
- package/dist/components/ui/DashboardStoreLoader/DashboardStoreLoaderContent.d.ts +1 -1
- package/dist/components/ui/DataCollectionAccessInfo/DataCollectionAccessInfo.d.ts +1 -1
- package/dist/components/ui/EpiCurveWidget/EpiCurveBarChart.d.ts +1 -1
- package/dist/components/ui/EpiCurveWidget/EpiCurveStackedAreaChart.d.ts +1 -1
- package/dist/components/ui/EpiCurveWidget/EpiCurveWidget.d.ts +1 -1
- package/dist/components/ui/Grouping/Grouping.d.ts +1 -1
- package/dist/components/ui/HistogramWidget/HistogramWidget.d.ts +1 -1
- package/dist/components/ui/HistogramWidget/index.js +1 -1
- package/dist/components/ui/HistogramWidget/index.js.map +1 -1
- package/dist/components/ui/HomePageTrends/HomePageTrendCard.d.ts +1 -1
- package/dist/components/ui/HomePageTrends/HomePageTrends.d.ts +1 -1
- package/dist/components/ui/LegendaItem/LegendaItem.d.ts +1 -1
- package/dist/components/ui/LineListWidget/LineListWidget.d.ts +1 -1
- package/dist/components/ui/LineListWidget/LineListWidgetIsInEventCell.d.ts +1 -1
- package/dist/components/ui/LineListWidget/LineListWidgetIsOwnCaseCell.d.ts +1 -1
- package/dist/components/ui/LineListWidget/LineListWidgetPrimaryMenu.d.ts +1 -1
- package/dist/components/ui/LineListWidget/LineListWidgetSecondaryMenu.d.ts +1 -1
- package/dist/components/ui/LineListWidget/LineListWidgetTitle.d.ts +1 -1
- package/dist/components/ui/MapWidget/MapWidget.d.ts +1 -1
- package/dist/components/ui/PanelSeparator/PanelSeparatorHorizontal.d.ts +1 -1
- package/dist/components/ui/PanelSeparator/PanelSeparatorVertical.d.ts +1 -1
- package/dist/components/ui/PanelSeparator/index.js +50 -2
- package/dist/components/ui/PanelSeparator/index.js.map +1 -0
- package/dist/components/ui/TreeDescription/TreeDescription.d.ts +1 -1
- package/dist/components/ui/TreeWidget/TreeWidget.d.ts +1 -1
- package/dist/components/ui/Upload/Upload.d.ts +1 -1
- package/dist/components/ui/Upload/UploadCaseResultTable.d.ts +1 -1
- package/dist/components/ui/Upload/UploadCreateCases.d.ts +1 -1
- package/dist/components/ui/Upload/UploadMapColumns.d.ts +1 -1
- package/dist/components/ui/Upload/UploadMapSequences.d.ts +1 -1
- package/dist/components/ui/Upload/UploadNavigation.d.ts +1 -1
- package/dist/components/ui/Upload/UploadPreviewNavigation.d.ts +1 -1
- package/dist/components/ui/Upload/UploadSelectFile.d.ts +1 -1
- package/dist/components/ui/Upload/UploadSelectSequenceFiles.d.ts +1 -1
- package/dist/components/ui/UserRightsDialog/UserRightsDialogCaseAccessPolicy.d.ts +1 -1
- package/dist/components/ui/Warning/Warning.d.ts +1 -1
- package/dist/components/ui/WidgetHeaderIconButton/WidgetHeaderIconButton.d.ts +1 -1
- package/dist/components/ui/WidgetMenu/WidgetMenu.d.ts +1 -1
- package/dist/components/ui/WidgetUnavailable/WidgetUnavailable.d.ts +1 -1
- package/dist/context/caseAbac/CaseAbacContextProvider.d.ts +1 -1
- package/dist/context/caseTypeAbac/CaseTypeAbacContextProvider.d.ts +1 -1
- package/dist/pages/CaseDbUsersAdminPage/CaseDbUsersAdminPage.d.ts +1 -1
- package/dist/pages/CaseSetCategoryAdminPage/CaseSetCategoryAdminPage.d.ts +1 -1
- package/dist/pages/CaseSetStatusAdminPage/CaseSetStatusAdminPage.d.ts +1 -1
- package/dist/pages/CaseTypeSetCategoriesAdminPage/CaseTypeSetCategoriesAdminPage.d.ts +1 -1
- package/dist/pages/CaseTypeSetsAdminPage/CaseTypeSetsAdminPage.d.ts +1 -1
- package/dist/pages/CaseTypesAdminPage/CaseTypesAdminPage.d.ts +1 -1
- package/dist/pages/CasesDetailPage/CasesDetailPage.d.ts +1 -1
- package/dist/pages/CasesDetailPage/index.js +16 -16
- package/dist/pages/CasesPage/CasesPage.d.ts +1 -1
- package/dist/pages/ColSetsAdminPage/ColSetsAdminPage.d.ts +1 -1
- package/dist/pages/ColsAdminPage/ColsAdminPage.d.ts +1 -1
- package/dist/pages/ColsAdminPage/index.js +77 -77
- package/dist/pages/ColsAdminPage/index.js.map +1 -1
- package/dist/pages/ConceptRelationsAdminPage/ConceptRelationsAdminPage.d.ts +1 -1
- package/dist/pages/ConceptSetsAdminPage/ConceptSetsAdminPage.d.ts +1 -1
- package/dist/pages/ConceptsAdminPage/ConceptsAdminPage.d.ts +1 -1
- package/dist/pages/ConceptsAdminPage/index.js +31 -31
- package/dist/pages/DataCollectionSetsAdminPage/DataCollectionSetsAdminPage.d.ts +1 -1
- package/dist/pages/DataCollectionVisualizationPage/DataCollectionVisualizationPage.d.ts +1 -1
- package/dist/pages/DataCollectionVisualizationPage/index.js +1 -1
- package/dist/pages/DataCollectionVisualizationPage/index.js.map +1 -1
- package/dist/pages/DataCollectionsAdminPage/DataCollectionsAdminPage.d.ts +1 -1
- package/dist/pages/DimsAdminPage/DimsAdminPage.d.ts +1 -1
- package/dist/pages/DimsAdminPage/index.js +46 -46
- package/dist/pages/DiseasesAdminPage/DiseasesAdminPage.d.ts +1 -1
- package/dist/pages/EtiologicalAgentsAdminPage/EtiologicalAgentsAdminPage.d.ts +1 -1
- package/dist/pages/EtiologiesAdminPage/EtiologiesAdminPage.d.ts +1 -1
- package/dist/pages/EventsDetailPage/EventsDetailPage.d.ts +1 -1
- package/dist/pages/EventsDetailPage/index.js +18 -18
- package/dist/pages/EventsPage/EventsPage.d.ts +1 -1
- package/dist/pages/HomePage/HomePage.d.ts +1 -1
- package/dist/pages/OrganizationAccessCasePoliciesAdminPage/OrganizationAccessCasePoliciesAdminPage.d.ts +1 -1
- package/dist/pages/OrganizationShareCasePoliciesAdminPage/OrganizationShareCasePoliciesAdminPage.d.ts +1 -1
- package/dist/pages/RefColsAdminPage/RefColsAdminPage.d.ts +1 -1
- package/dist/pages/RefColsAdminPage/index.js +94 -94
- package/dist/pages/RefDimsAdminPage/RefDimsAdminPage.d.ts +1 -1
- package/dist/pages/RegionRelationsAdminPage/RegionRelationsAdminPage.d.ts +1 -1
- package/dist/pages/RegionSetShapesAdminPage/RegionSetShapesAdminPage.d.ts +1 -1
- package/dist/pages/RegionSetShapesAdminPage/index.js +26 -26
- package/dist/pages/RegionSetsAdminPage/RegionSetsAdminPage.d.ts +1 -1
- package/dist/pages/RegionsAdminPage/RegionsAdminPage.d.ts +1 -1
- package/dist/pages/RegionsAdminPage/index.js +33 -33
- package/dist/pages/TrendsPage/TrendsPage.d.ts +1 -1
- package/dist/pages/UploadPage/UploadPage.d.ts +1 -1
- package/dist/pages/UserAccessCasePoliciesAdminPage/UserAccessCasePoliciesAdminPage.d.ts +1 -1
- package/dist/pages/UserEffectiveRightsAdminPage/UserEffectiveRightsAdminPage.d.ts +1 -1
- package/dist/pages/UserEffectiveRightsAdminPage/index.js +56 -56
- package/dist/pages/UserEffectiveRightsAdminPage/index.js.map +1 -1
- package/dist/pages/UserEffectiveRightsTesterAdminPage/UserEffectiveRightsTesterAdminPage.d.ts +1 -1
- package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +45 -45
- package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -1
- package/dist/pages/UserShareCasePoliciesAdminPage/UserShareCasePoliciesAdminPage.d.ts +1 -1
- package/dist/utils/CaseDbStandardConfigUtil/index.js +1 -5
- package/dist/utils/CaseDbStandardConfigUtil/index.js.map +1 -1
- package/dist/utils/MapUtil/index.js +1 -1
- package/dist/utils/MapUtil/index.js.map +1 -1
- package/package.json +33 -28
- package/dist/_chunks/PanelSeparator.js +0 -1666
- package/dist/_chunks/PanelSeparator.js.map +0 -1
- package/dist/_chunks/chunk-OB3PAWPO.js +0 -1162
- package/dist/_chunks/chunk-OB3PAWPO.js.map +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { CASEDB_QUERY_KEY as e } from "../../constants/query.js";
|
|
2
2
|
import { CaseDbDataUtil as t } from "../../utils/CaseDbDataUtil/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
3
|
+
import { useRefColsValidationRulesQuery as n } from "../../dataHooks/useRefColsValidationRulesQuery/index.js";
|
|
4
|
+
import { useRefDimMapQuery as r, useRefDimOptionsQuery as i } from "../../dataHooks/useRefDimsQuery/index.js";
|
|
5
|
+
import { useConceptSetMapQuery as a, useConceptSetOptionsQuery as o } from "../../dataHooks/useConceptSetsQuery/index.js";
|
|
6
|
+
import { n as s } from "../../_chunks/useUnit.js";
|
|
7
|
+
import { useColTypeOptionsQuery as c } from "../../dataHooks/useColTypesQuery/index.js";
|
|
8
|
+
import { useGeneticDistanceProtocolOptionsQuery as l } from "../../dataHooks/useGeneticDistanceProtocolsQuery/index.js";
|
|
9
|
+
import { useRegionSetOptionsQuery as u } from "../../dataHooks/useRegionSetsQuery/index.js";
|
|
10
|
+
import { mixed as d, object as f, string as p } from "yup";
|
|
11
|
+
import { CaseDbCaseApi as m, CaseDbColType as h, CaseDbCommandName as g } from "@gen-epix/api-casedb";
|
|
12
|
+
import { FORM_FIELD_DEFINITION_TYPE as _ } from "@gen-epix/ui-core-form/models/form";
|
|
13
|
+
import { useCallback as v, useMemo as y, useRef as b } from "react";
|
|
14
|
+
import { useTranslation as x } from "react-i18next";
|
|
15
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
16
|
+
import { useArray as C } from "@gen-epix/ui-core/hooks/useArray";
|
|
17
|
+
import { TableUtil as w } from "@gen-epix/ui-client-common/utils/TableUtil";
|
|
18
|
+
import { TestIdUtil as T } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
19
|
+
import { SchemaUtil as E } from "@gen-epix/ui-core-form/utils/SchemaUtil";
|
|
20
|
+
import { CrudPage as D } from "@gen-epix/ui-client-common/pages/CrudPage";
|
|
21
|
+
import { useParams as O } from "react-router-dom";
|
|
22
22
|
//#region src/pages/RefColsAdminPage/RefColsAdminPage.tsx
|
|
23
23
|
var k = [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
h.NOMINAL,
|
|
25
|
+
h.ORDINAL,
|
|
26
|
+
h.INTERVAL
|
|
27
27
|
], A = () => {
|
|
28
|
-
let { refDimId: A } =
|
|
28
|
+
let { refDimId: A } = O(), { t: j } = x(), M = i(), N = r(), P = c(), F = o(), I = a(), L = u(), R = s(), z = l(), B = n(), V = b(/* @__PURE__ */ new Map()), H = C([
|
|
29
29
|
R,
|
|
30
30
|
I,
|
|
31
31
|
N,
|
|
@@ -35,57 +35,57 @@ var k = [
|
|
|
35
35
|
L,
|
|
36
36
|
z,
|
|
37
37
|
B
|
|
38
|
-
]), U =
|
|
38
|
+
]), U = v(async (e) => (await m.getInstance().refColsGetAll(null, null, { signal: e }))?.data, []), W = v((e) => A ? e.filter((e) => e.ref_dim_id === A) : e, [A]), G = v(async (e) => await m.getInstance().refColsDeleteOne(e.id), []), K = v(async (e, t) => (await m.getInstance().refColsPutOne(t.id, {
|
|
39
39
|
id: t.id,
|
|
40
40
|
...e
|
|
41
|
-
})).data, []), q =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
], []), X =
|
|
51
|
-
code:
|
|
52
|
-
code_suffix:
|
|
53
|
-
col_type:
|
|
54
|
-
concept_set_id:
|
|
41
|
+
})).data, []), q = v(async (e) => (await m.getInstance().refColsPostOne(e)).data, []), J = v((e) => e.label, []), Y = y(() => [
|
|
42
|
+
h.INTERVAL,
|
|
43
|
+
h.DECIMAL_0,
|
|
44
|
+
h.DECIMAL_1,
|
|
45
|
+
h.DECIMAL_2,
|
|
46
|
+
h.DECIMAL_3,
|
|
47
|
+
h.DECIMAL_4,
|
|
48
|
+
h.DECIMAL_5,
|
|
49
|
+
h.DECIMAL_6
|
|
50
|
+
], []), X = y(() => f().shape({
|
|
51
|
+
code: E.code,
|
|
52
|
+
code_suffix: E.code,
|
|
53
|
+
col_type: d().required().oneOf(Object.values(h)),
|
|
54
|
+
concept_set_id: p().when("col_type", {
|
|
55
55
|
is: (e) => k.includes(e),
|
|
56
|
-
otherwise: () =>
|
|
57
|
-
then: () =>
|
|
56
|
+
otherwise: () => p().nullable().notRequired(),
|
|
57
|
+
then: () => p().uuid4().required()
|
|
58
58
|
}),
|
|
59
|
-
description:
|
|
60
|
-
genetic_distance_protocol_id:
|
|
61
|
-
is: (e) => e ===
|
|
62
|
-
otherwise: () =>
|
|
63
|
-
then: () =>
|
|
59
|
+
description: E.description,
|
|
60
|
+
genetic_distance_protocol_id: p().when("col_type", {
|
|
61
|
+
is: (e) => e === h.GENETIC_DISTANCE,
|
|
62
|
+
otherwise: () => p().nullable().notRequired(),
|
|
63
|
+
then: () => p().uuid4().required()
|
|
64
64
|
}),
|
|
65
|
-
label:
|
|
66
|
-
rank:
|
|
67
|
-
ref_dim_id:
|
|
68
|
-
regex:
|
|
69
|
-
is: (e) => e ===
|
|
70
|
-
otherwise: () =>
|
|
71
|
-
then: () =>
|
|
65
|
+
label: E.label,
|
|
66
|
+
rank: E.rank,
|
|
67
|
+
ref_dim_id: p().uuid4().required().max(100),
|
|
68
|
+
regex: p().when("col_type", {
|
|
69
|
+
is: (e) => e === h.REGULAR_LANGUAGE,
|
|
70
|
+
otherwise: () => p().regex().max(500).nullable().notRequired(),
|
|
71
|
+
then: () => p().regex().max(500).required()
|
|
72
72
|
}),
|
|
73
|
-
region_set_id:
|
|
74
|
-
is: (e) => e ===
|
|
75
|
-
otherwise: () =>
|
|
76
|
-
then: () =>
|
|
73
|
+
region_set_id: p().when("col_type", {
|
|
74
|
+
is: (e) => e === h.GEO_REGION,
|
|
75
|
+
otherwise: () => p().nullable().notRequired(),
|
|
76
|
+
then: () => p().uuid4().required()
|
|
77
77
|
}),
|
|
78
|
-
schema_definition:
|
|
79
|
-
is: (e) => [
|
|
80
|
-
otherwise: () =>
|
|
81
|
-
then: () =>
|
|
78
|
+
schema_definition: p().when("col_type", {
|
|
79
|
+
is: (e) => [h.CONTEXT_FREE_GRAMMAR_JSON, h.CONTEXT_FREE_GRAMMAR_XML].includes(e),
|
|
80
|
+
otherwise: () => p().nullable().notRequired(),
|
|
81
|
+
then: () => p().freeFormText().max(1e4).required()
|
|
82
82
|
}),
|
|
83
|
-
schema_uri:
|
|
84
|
-
is: (e) => [
|
|
85
|
-
otherwise: () =>
|
|
86
|
-
then: () =>
|
|
83
|
+
schema_uri: p().when("col_type", {
|
|
84
|
+
is: (e) => [h.CONTEXT_FREE_GRAMMAR_JSON, h.CONTEXT_FREE_GRAMMAR_XML].includes(e),
|
|
85
|
+
otherwise: () => p().url().max(1e3).nullable().notRequired(),
|
|
86
|
+
then: () => p().url().max(1e3).required()
|
|
87
87
|
}),
|
|
88
|
-
unit:
|
|
88
|
+
unit: d().nullable().test({
|
|
89
89
|
message: j`Unit is required for this column type`,
|
|
90
90
|
name: "unit-is-required-for-col-type",
|
|
91
91
|
test: (e, t) => {
|
|
@@ -106,7 +106,7 @@ var k = [
|
|
|
106
106
|
Y,
|
|
107
107
|
I.map,
|
|
108
108
|
j
|
|
109
|
-
]), Z =
|
|
109
|
+
]), Z = v((e) => {
|
|
110
110
|
if (V.current.has(e)) return V.current.get(e);
|
|
111
111
|
let n = t.getColTypeOptionsForRefDimId({
|
|
112
112
|
colsValidationRules: B.data?.valid_col_types_by_dim_type ?? {},
|
|
@@ -119,12 +119,12 @@ var k = [
|
|
|
119
119
|
P.options,
|
|
120
120
|
B.data?.valid_col_types_by_dim_type,
|
|
121
121
|
N.map
|
|
122
|
-
]), Q =
|
|
122
|
+
]), Q = v((e, t, n) => {
|
|
123
123
|
if (t.col_type && t.concept_set_id && !k.includes(t.col_type) && n.setValue("concept_set_id", null), t.col_type && t.unit && !Y.includes(t.col_type) && n.setValue("unit", null), t.concept_set_id) {
|
|
124
124
|
let e = I.map.get(t.concept_set_id)?.unit;
|
|
125
125
|
e && t.unit !== e && n.setValue("unit", e);
|
|
126
126
|
}
|
|
127
|
-
if (t.col_type && t.region_set_id && t.col_type !==
|
|
127
|
+
if (t.col_type && t.region_set_id && t.col_type !== h.GEO_REGION && n.setValue("region_set_id", null), t.col_type && t.genetic_distance_protocol_id && t.col_type !== h.GENETIC_DISTANCE && n.setValue("genetic_distance_protocol_id", null), t.col_type && t.ref_dim_id) {
|
|
128
128
|
let e = Z(t.ref_dim_id);
|
|
129
129
|
e.find((e) => e.value === t.col_type) || n.setValue("col_type", e.length === 1 ? e[0].value : null);
|
|
130
130
|
}
|
|
@@ -132,18 +132,18 @@ var k = [
|
|
|
132
132
|
Y,
|
|
133
133
|
I.map,
|
|
134
134
|
Z
|
|
135
|
-
]), $ =
|
|
135
|
+
]), $ = v((e, t) => {
|
|
136
136
|
let n = t?.ref_dim_id ?? e?.ref_dim_id ?? A ?? null, r = t?.col_type ?? e?.col_type ?? null;
|
|
137
137
|
return [
|
|
138
138
|
{
|
|
139
|
-
definition:
|
|
139
|
+
definition: _.AUTOCOMPLETE,
|
|
140
140
|
disabled: !!e,
|
|
141
141
|
label: j`Reference dimension`,
|
|
142
142
|
name: "ref_dim_id",
|
|
143
143
|
options: M.options
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
|
-
definition:
|
|
146
|
+
definition: _.AUTOCOMPLETE,
|
|
147
147
|
disabled: !!e,
|
|
148
148
|
label: j`Column type`,
|
|
149
149
|
loading: P.isLoading,
|
|
@@ -151,70 +151,70 @@ var k = [
|
|
|
151
151
|
options: Z(n)
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
definition:
|
|
154
|
+
definition: _.TEXTFIELD,
|
|
155
155
|
label: j`Label`,
|
|
156
156
|
name: "label"
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
definition:
|
|
159
|
+
definition: _.TEXTFIELD,
|
|
160
160
|
label: j`Description`,
|
|
161
161
|
multiline: !0,
|
|
162
162
|
name: "description",
|
|
163
163
|
rows: 5
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
|
-
definition:
|
|
166
|
+
definition: _.TEXTFIELD,
|
|
167
167
|
label: j`Code`,
|
|
168
168
|
name: "code"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
definition:
|
|
171
|
+
definition: _.TEXTFIELD,
|
|
172
172
|
label: j`Column code prefix`,
|
|
173
173
|
name: "code_suffix"
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
|
-
definition:
|
|
176
|
+
definition: _.AUTOCOMPLETE,
|
|
177
177
|
label: j`Concept set`,
|
|
178
178
|
name: "concept_set_id",
|
|
179
179
|
options: F.options
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
|
-
definition:
|
|
182
|
+
definition: _.AUTOCOMPLETE,
|
|
183
183
|
label: j`Region set`,
|
|
184
184
|
name: "region_set_id",
|
|
185
185
|
options: L.options
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
|
-
definition:
|
|
188
|
+
definition: _.AUTOCOMPLETE,
|
|
189
189
|
label: j`Genetic distance protocol`,
|
|
190
190
|
name: "genetic_distance_protocol_id",
|
|
191
191
|
options: z.options
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
|
-
definition:
|
|
194
|
+
definition: _.TEXTFIELD,
|
|
195
195
|
label: j`Rank`,
|
|
196
196
|
name: "rank",
|
|
197
197
|
type: "number"
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
|
-
definition:
|
|
200
|
+
definition: _.TEXTFIELD,
|
|
201
201
|
label: j`Regex`,
|
|
202
202
|
name: "regex"
|
|
203
203
|
},
|
|
204
204
|
{
|
|
205
|
-
definition:
|
|
205
|
+
definition: _.TEXTFIELD,
|
|
206
206
|
label: j`Schema URI`,
|
|
207
207
|
name: "schema_uri"
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
|
-
definition:
|
|
210
|
+
definition: _.TEXTFIELD,
|
|
211
211
|
label: j`Schema definition`,
|
|
212
212
|
multiline: !0,
|
|
213
213
|
name: "schema_definition",
|
|
214
214
|
rows: 10
|
|
215
215
|
},
|
|
216
216
|
{
|
|
217
|
-
definition:
|
|
217
|
+
definition: _.AUTOCOMPLETE,
|
|
218
218
|
disabled: !r || !Y.includes(r),
|
|
219
219
|
label: j`Unit`,
|
|
220
220
|
loading: R.isLoading,
|
|
@@ -234,23 +234,23 @@ var k = [
|
|
|
234
234
|
Y,
|
|
235
235
|
R.isLoading,
|
|
236
236
|
R.options
|
|
237
|
-
]), ee =
|
|
237
|
+
]), ee = y(() => {
|
|
238
238
|
let e = [];
|
|
239
|
-
return A || e.push(
|
|
239
|
+
return A || e.push(w.createOptionsColumn({
|
|
240
240
|
id: "ref_dim_id",
|
|
241
241
|
name: j`Reference dimension`,
|
|
242
242
|
options: M.options
|
|
243
|
-
})), e.push(
|
|
243
|
+
})), e.push(w.createTextColumn({
|
|
244
244
|
id: "code",
|
|
245
245
|
name: j`Code`
|
|
246
|
-
}),
|
|
246
|
+
}), w.createOptionsColumn({
|
|
247
247
|
id: "col_type",
|
|
248
248
|
name: j`Column type`,
|
|
249
249
|
options: P.options
|
|
250
|
-
}),
|
|
250
|
+
}), w.createTextColumn({
|
|
251
251
|
id: "label",
|
|
252
252
|
name: j`Label`
|
|
253
|
-
}),
|
|
253
|
+
}), w.createNumberColumn({
|
|
254
254
|
id: "rank",
|
|
255
255
|
name: j`Rank`
|
|
256
256
|
})), e;
|
|
@@ -259,11 +259,11 @@ var k = [
|
|
|
259
259
|
A,
|
|
260
260
|
M.options,
|
|
261
261
|
j
|
|
262
|
-
]), te =
|
|
262
|
+
]), te = v((e, t) => ({
|
|
263
263
|
id: t.id,
|
|
264
264
|
ref_dim_id: t.ref_dim_id,
|
|
265
265
|
...e
|
|
266
|
-
}), []), ne =
|
|
266
|
+
}), []), ne = y(() => ({ ref_dim_id: A ?? null }), [A]), re = y(() => {
|
|
267
267
|
let e = [];
|
|
268
268
|
return A && N.map.has(A) && e.push(N.map.get(A)?.code), e.push(j`Reference columns`), e;
|
|
269
269
|
}, [
|
|
@@ -271,10 +271,10 @@ var k = [
|
|
|
271
271
|
N.map,
|
|
272
272
|
j
|
|
273
273
|
]);
|
|
274
|
-
return /* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ S(D, {
|
|
275
275
|
createItemDialogTitle: j`Create new reference column`,
|
|
276
276
|
createOne: q,
|
|
277
|
-
crudCommandType:
|
|
277
|
+
crudCommandType: g.RefColCrudCommand,
|
|
278
278
|
defaultNewItem: ne,
|
|
279
279
|
defaultSortByField: A ? "rank" : "ref_dim_id",
|
|
280
280
|
defaultSortDirection: "asc",
|
|
@@ -291,7 +291,7 @@ var k = [
|
|
|
291
291
|
schema: X,
|
|
292
292
|
tableColumns: ee,
|
|
293
293
|
tableStoreStorageNamePostFix: A ? "RefDim" : void 0,
|
|
294
|
-
testIdAttributes:
|
|
294
|
+
testIdAttributes: T.createAttributes("RefColsAdminPage"),
|
|
295
295
|
title: re,
|
|
296
296
|
updateOne: K
|
|
297
297
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RefDimsAdminPage: () => import(
|
|
1
|
+
export declare const RefDimsAdminPage: () => import('react').JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RegionRelationsAdminPage: () => import(
|
|
1
|
+
export declare const RegionRelationsAdminPage: () => import('react').JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RegionSetShapesAdminPage: () => import(
|
|
1
|
+
export declare const RegionSetShapesAdminPage: () => import('react').JSX.Element;
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import { CASEDB_QUERY_KEY as e } from "../../constants/query.js";
|
|
2
|
-
import { t } from "../../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
2
|
+
import { useRegionSetsMapQuery as t } from "../../dataHooks/useRegionSetsQuery/index.js";
|
|
3
|
+
import { number as n, object as r, string as i } from "yup";
|
|
4
|
+
import { CaseDbCommandName as a, CaseDbGeoApi as o } from "@gen-epix/api-casedb";
|
|
5
|
+
import { FORM_FIELD_DEFINITION_TYPE as s } from "@gen-epix/ui-core-form/models/form";
|
|
6
|
+
import { useCallback as c, useMemo as l } from "react";
|
|
7
|
+
import { useTranslation as u } from "react-i18next";
|
|
8
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
9
|
+
import { useArray as f } from "@gen-epix/ui-core/hooks/useArray";
|
|
10
|
+
import { TableUtil as p } from "@gen-epix/ui-client-common/utils/TableUtil";
|
|
11
|
+
import { TestIdUtil as m } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
12
|
+
import { CrudPage as h } from "@gen-epix/ui-client-common/pages/CrudPage";
|
|
13
|
+
import { useParams as g } from "react-router-dom";
|
|
14
14
|
//#region src/pages/RegionSetShapesAdminPage/RegionSetShapesAdminPage.tsx
|
|
15
15
|
var _ = () => {
|
|
16
|
-
let { regionSetId: _ } =
|
|
16
|
+
let { regionSetId: _ } = g(), { t: v } = u(), y = t(), b = f([y]), x = c(async (e) => (await o.getInstance().regionSetShapesGetAll(null, null, { signal: e }))?.data, []), S = c((e) => e.filter((e) => e.region_set_id === _), [_]), C = c(async (e) => await o.getInstance().regionSetShapesDeleteOne(e.id), []), w = c(async (e, t) => (await o.getInstance().regionSetShapesPutOne(t.id, {
|
|
17
17
|
...e,
|
|
18
18
|
id: t.id,
|
|
19
19
|
region_set_id: _
|
|
20
|
-
})).data, [_]), T =
|
|
20
|
+
})).data, [_]), T = c(async (e) => (await o.getInstance().regionSetShapesPostOne({
|
|
21
21
|
...e,
|
|
22
22
|
region_set_id: _
|
|
23
|
-
})).data, [_]), E =
|
|
24
|
-
geo_json:
|
|
25
|
-
scale:
|
|
26
|
-
}), []), O =
|
|
27
|
-
definition:
|
|
23
|
+
})).data, [_]), E = c((e) => `${y.map.get(_).name} - ${e.scale}`, [_, y.map]), D = l(() => r().shape({
|
|
24
|
+
geo_json: i().freeFormText(),
|
|
25
|
+
scale: n().required().positive().transform((e, t) => t === "" ? void 0 : t)
|
|
26
|
+
}), []), O = l(() => [{
|
|
27
|
+
definition: s.TEXTFIELD,
|
|
28
28
|
label: v`Scale`,
|
|
29
29
|
name: "scale",
|
|
30
30
|
type: "number"
|
|
31
31
|
}, {
|
|
32
|
-
definition:
|
|
32
|
+
definition: s.TEXTFIELD,
|
|
33
33
|
label: v`Scale`,
|
|
34
34
|
multiline: !0,
|
|
35
35
|
name: "geo_json",
|
|
36
36
|
rows: 20
|
|
37
|
-
}], [v]), k =
|
|
37
|
+
}], [v]), k = l(() => [p.createNumberColumn({
|
|
38
38
|
id: "scale",
|
|
39
39
|
name: v`Scale`
|
|
40
|
-
}),
|
|
40
|
+
}), p.createBooleanColumn({
|
|
41
41
|
id: "geo_json",
|
|
42
42
|
name: v`GEO JSON`
|
|
43
|
-
})], [v]), A =
|
|
43
|
+
})], [v]), A = c((e, t) => ({
|
|
44
44
|
id: t.id,
|
|
45
45
|
region_set_id: t.region_set_id,
|
|
46
46
|
...e
|
|
47
47
|
}), []);
|
|
48
|
-
return /* @__PURE__ */
|
|
48
|
+
return /* @__PURE__ */ d(h, {
|
|
49
49
|
createItemDialogTitle: v`Create new region set shape`,
|
|
50
50
|
createOne: T,
|
|
51
|
-
crudCommandType:
|
|
51
|
+
crudCommandType: a.RegionSetShapeCrudCommand,
|
|
52
52
|
defaultSortByField: "scale",
|
|
53
53
|
defaultSortDirection: "asc",
|
|
54
54
|
deleteOne: C,
|
|
@@ -62,7 +62,7 @@ var _ = () => {
|
|
|
62
62
|
resourceQueryKeyBase: e.REGION_SET_SHAPES,
|
|
63
63
|
schema: D,
|
|
64
64
|
tableColumns: k,
|
|
65
|
-
testIdAttributes:
|
|
65
|
+
testIdAttributes: m.createAttributes("RegionSetShapesAdminPage"),
|
|
66
66
|
title: v`Region set shapes`,
|
|
67
67
|
updateOne: w
|
|
68
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RegionSetsAdminPage: () => import(
|
|
1
|
+
export declare const RegionSetsAdminPage: () => import('react').JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RegionsAdminPage: () => import(
|
|
1
|
+
export declare const RegionsAdminPage: () => import('react').JSX.Element;
|
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
import { CASEDB_QUERY_KEY as e } from "../../constants/query.js";
|
|
2
|
-
import { t } from "
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { object as t } from "yup";
|
|
3
|
+
import { CaseDbCommandName as n, CaseDbGeoApi as r } from "@gen-epix/api-casedb";
|
|
4
|
+
import { FORM_FIELD_DEFINITION_TYPE as i } from "@gen-epix/ui-core-form/models/form";
|
|
5
|
+
import { useCallback as a, useMemo as o } from "react";
|
|
6
|
+
import { useTranslation as s } from "react-i18next";
|
|
7
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
8
|
+
import { TableUtil as l } from "@gen-epix/ui-client-common/utils/TableUtil";
|
|
9
|
+
import { TestIdUtil as u } from "@gen-epix/ui-core/utils/TestIdUtil";
|
|
10
|
+
import { SchemaUtil as d } from "@gen-epix/ui-core-form/utils/SchemaUtil";
|
|
11
|
+
import { CrudPage as f } from "@gen-epix/ui-client-common/pages/CrudPage";
|
|
12
|
+
import { useParams as p } from "react-router-dom";
|
|
13
13
|
//#region src/pages/RegionsAdminPage/RegionsAdminPage.tsx
|
|
14
14
|
var m = () => {
|
|
15
|
-
let { regionSetId: m } =
|
|
15
|
+
let { regionSetId: m } = p(), { t: h } = s(), g = a(async (e) => (await r.getInstance().regionsGetAll(null, null, { signal: e }))?.data, []), _ = a((e) => e.filter((e) => e.region_set_id === m), [m]), v = a(async (e) => await r.getInstance().regionsDeleteOne(e.id), []), y = a(async (e, t) => (await r.getInstance().regionsPutOne(t.id, {
|
|
16
16
|
...e,
|
|
17
17
|
id: t.id,
|
|
18
18
|
region_set_id: m
|
|
19
|
-
})).data, [m]), b =
|
|
19
|
+
})).data, [m]), b = a(async (e) => (await r.getInstance().regionsPostOne({
|
|
20
20
|
...e,
|
|
21
21
|
region_set_id: m
|
|
22
|
-
})).data, [m]), x =
|
|
23
|
-
center_lat:
|
|
24
|
-
center_lon:
|
|
25
|
-
centroid_lat:
|
|
26
|
-
centroid_lon:
|
|
27
|
-
code:
|
|
28
|
-
name:
|
|
29
|
-
}), []), C =
|
|
22
|
+
})).data, [m]), x = a((e) => e.name, []), S = o(() => t().shape({
|
|
23
|
+
center_lat: d.number.required(),
|
|
24
|
+
center_lon: d.number.required(),
|
|
25
|
+
centroid_lat: d.number.required(),
|
|
26
|
+
centroid_lon: d.number.required(),
|
|
27
|
+
code: d.code,
|
|
28
|
+
name: d.name
|
|
29
|
+
}), []), C = o(() => [
|
|
30
30
|
{
|
|
31
|
-
definition:
|
|
31
|
+
definition: i.TEXTFIELD,
|
|
32
32
|
label: h`Name`,
|
|
33
33
|
name: "name"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
definition:
|
|
36
|
+
definition: i.TEXTFIELD,
|
|
37
37
|
label: h`Code`,
|
|
38
38
|
name: "code"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
definition:
|
|
41
|
+
definition: i.TEXTFIELD,
|
|
42
42
|
label: h`Centroid latitude`,
|
|
43
43
|
name: "centroid_lat",
|
|
44
44
|
type: "number"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
definition:
|
|
47
|
+
definition: i.TEXTFIELD,
|
|
48
48
|
label: h`Centroid longitude`,
|
|
49
49
|
name: "centroid_lon",
|
|
50
50
|
type: "number"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
definition:
|
|
53
|
+
definition: i.TEXTFIELD,
|
|
54
54
|
label: h`Center latitude`,
|
|
55
55
|
name: "center_lat",
|
|
56
56
|
type: "number"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
|
-
definition:
|
|
59
|
+
definition: i.TEXTFIELD,
|
|
60
60
|
label: h`Center longitude`,
|
|
61
61
|
name: "center_lon",
|
|
62
62
|
type: "number"
|
|
63
63
|
}
|
|
64
|
-
], [h]), w =
|
|
64
|
+
], [h]), w = o(() => [l.createTextColumn({
|
|
65
65
|
id: "name",
|
|
66
66
|
name: h`Name`
|
|
67
|
-
}),
|
|
67
|
+
}), l.createTextColumn({
|
|
68
68
|
id: "code",
|
|
69
69
|
name: h`Code`
|
|
70
|
-
})], [h]), T =
|
|
70
|
+
})], [h]), T = a((e, t) => ({
|
|
71
71
|
id: t.id,
|
|
72
72
|
region_set_id: t.region_set_id,
|
|
73
73
|
...e
|
|
74
74
|
}), []);
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ c(f, {
|
|
76
76
|
createItemDialogTitle: h`Create new region`,
|
|
77
77
|
createOne: b,
|
|
78
|
-
crudCommandType:
|
|
78
|
+
crudCommandType: n.RegionCrudCommand,
|
|
79
79
|
defaultSortByField: "name",
|
|
80
80
|
defaultSortDirection: "asc",
|
|
81
81
|
deleteOne: v,
|
|
@@ -88,7 +88,7 @@ var m = () => {
|
|
|
88
88
|
resourceQueryKeyBase: e.REGIONS,
|
|
89
89
|
schema: S,
|
|
90
90
|
tableColumns: w,
|
|
91
|
-
testIdAttributes:
|
|
91
|
+
testIdAttributes: u.createAttributes("RegionsAdminPage"),
|
|
92
92
|
title: h`Regions`,
|
|
93
93
|
updateOne: y
|
|
94
94
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TrendsPage: () => import(
|
|
1
|
+
export declare const TrendsPage: () => import('react').JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const UploadPage: () => import(
|
|
1
|
+
export declare const UploadPage: () => import('react').JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const UserAccessCasePoliciesAdminPage: () => import(
|
|
1
|
+
export declare const UserAccessCasePoliciesAdminPage: () => import('react').JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const UserEffectiveRightsAdminPage: () => import(
|
|
1
|
+
export declare const UserEffectiveRightsAdminPage: () => import('react').JSX.Element;
|