@gen3/frontend 0.10.75 → 0.10.76
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/cjs/index.js +16 -35
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.d.ts +0 -1
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.d.ts.map +1 -1
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.js +3 -3
- package/dist/dts/components/Buttons/DownloadButtons/JSONObjectDownloadButton.js.map +1 -1
- package/dist/dts/components/Buttons/UploadJSONButton.d.ts.map +1 -1
- package/dist/dts/components/Buttons/UploadJSONButton.js +12 -1
- package/dist/dts/components/Buttons/UploadJSONButton.js.map +1 -1
- package/dist/dts/components/Content/TextContent.d.ts +2 -1
- package/dist/dts/components/Content/TextContent.d.ts.map +1 -1
- package/dist/dts/components/Content/TextContent.js +8 -5
- package/dist/dts/components/Content/TextContent.js.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts +12 -8
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.d.ts.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js +11 -17
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.js.map +1 -1
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js +4 -18
- package/dist/dts/components/DropdownWithIcon/DropdownWithIcon.unit.test.js.map +1 -1
- package/dist/dts/components/Login/LoginProvidersPanel.d.ts.map +1 -1
- package/dist/dts/components/Login/LoginProvidersPanel.js +8 -5
- package/dist/dts/components/Login/LoginProvidersPanel.js.map +1 -1
- package/dist/dts/components/MessageCards/ErrorCard.js +1 -1
- package/dist/dts/components/MessageCards/ErrorCard.js.map +1 -1
- package/dist/dts/components/MessageCards/WarningCard.js +1 -1
- package/dist/dts/components/MessageCards/WarningCard.js.map +1 -1
- package/dist/dts/components/MessagePanel.d.ts.map +1 -1
- package/dist/dts/components/MessagePanel.js +1 -1
- package/dist/dts/components/MessagePanel.js.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.d.ts +2 -3
- package/dist/dts/components/Providers/Gen3Provider.d.ts.map +1 -1
- package/dist/dts/components/Providers/Gen3Provider.js +4 -8
- package/dist/dts/components/Providers/Gen3Provider.js.map +1 -1
- package/dist/dts/components/Providers/ResourceMonitor.d.ts +1 -1
- package/dist/dts/components/Providers/ResourceMonitor.d.ts.map +1 -1
- package/dist/dts/components/Providers/ResourceMonitor.js +131 -48
- package/dist/dts/components/Providers/ResourceMonitor.js.map +1 -1
- package/dist/dts/components/charts/echarts/BarChart.d.ts.map +1 -1
- package/dist/dts/components/charts/echarts/BarChart.js +4 -28
- package/dist/dts/components/charts/echarts/BarChart.js.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.d.ts.map +1 -1
- package/dist/dts/components/facets/FacetControlsHeader.js +1 -0
- package/dist/dts/components/facets/FacetControlsHeader.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts +0 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortBuilder.js +1 -13
- package/dist/dts/features/CohortBuilder/CohortBuilder.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortManager.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortManager.js +17 -0
- package/dist/dts/features/CohortBuilder/CohortManager.js.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortPanel.js +2 -3
- package/dist/dts/features/CohortBuilder/CohortPanel.js.map +1 -1
- package/dist/dts/features/CohortBuilder/CohortSelector.d.ts +3 -0
- package/dist/dts/features/CohortBuilder/CohortSelector.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/CohortSelector.js +18 -0
- package/dist/dts/features/CohortBuilder/CohortSelector.js.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryExpression/QueryExpressionSection.d.ts → QueryExpressionSection.d.ts} +4 -1
- package/dist/dts/features/CohortBuilder/QueryExpressionSection.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryExpression/QueryExpressionSection.js → QueryExpressionSection.js} +28 -36
- package/dist/dts/features/CohortBuilder/QueryExpressionSection.js.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpressionsExpandedContext.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryExpressionsExpandedContext.js.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryExpression/QueryRepresentation.d.ts → QueryRepresentation.d.ts} +1 -1
- package/dist/dts/features/CohortBuilder/QueryRepresentation.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/{QueryExpression/QueryRepresentation.js → QueryRepresentation.js} +30 -23
- package/dist/dts/features/CohortBuilder/QueryRepresentation.js.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryRepresentationLabel.d.ts.map +1 -0
- package/dist/dts/features/CohortBuilder/QueryRepresentationLabel.js.map +1 -0
- package/dist/dts/features/CohortBuilder/hooks.d.ts +0 -1
- package/dist/dts/features/CohortBuilder/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/hooks.js +1 -52
- package/dist/dts/features/CohortBuilder/hooks.js.map +1 -1
- package/dist/dts/features/CohortBuilder/style.d.ts +0 -6
- package/dist/dts/features/CohortBuilder/style.d.ts.map +1 -1
- package/dist/dts/features/CohortBuilder/style.js +0 -11
- package/dist/dts/features/CohortBuilder/style.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js +4 -6
- package/dist/dts/features/CohortDiscovery/ChartsAndFacetsPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/FilterPanels/createFacetPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/IndexPanel.js +3 -5
- package/dist/dts/features/CohortDiscovery/IndexPanel.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.d.ts +0 -2
- package/dist/dts/features/CohortDiscovery/appApi.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/appApi.js +0 -2
- package/dist/dts/features/CohortDiscovery/appApi.js.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.d.ts +0 -10
- package/dist/dts/features/CohortDiscovery/hooks.d.ts.map +1 -1
- package/dist/dts/features/CohortDiscovery/hooks.js +1 -38
- package/dist/dts/features/CohortDiscovery/hooks.js.map +1 -1
- package/dist/dts/features/CohortDiversity/diversityApi.d.ts +12 -12
- package/dist/dts/features/Crosswalk/CrosswalkPanel.d.ts +1 -1
- package/dist/dts/features/Crosswalk/CrosswalkPanel.d.ts.map +1 -1
- package/dist/dts/features/Crosswalk/CrosswalkPanel.js +11 -11
- package/dist/dts/features/Crosswalk/CrosswalkPanel.js.map +1 -1
- package/dist/dts/features/Crosswalk/types.d.ts +1 -0
- package/dist/dts/features/Crosswalk/types.d.ts.map +1 -1
- package/dist/dts/features/DataLibrary/QueryDetails.d.ts.map +1 -1
- package/dist/dts/features/DataLibrary/QueryDetails.js +2 -2
- package/dist/dts/features/DataLibrary/QueryDetails.js.map +1 -1
- package/dist/dts/features/Dictionary/Dictionary.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/Dictionary.js +1 -0
- package/dist/dts/features/Dictionary/Dictionary.js.map +1 -1
- package/dist/dts/features/Dictionary/index.d.ts +3 -1
- package/dist/dts/features/Dictionary/index.d.ts.map +1 -1
- package/dist/dts/features/Dictionary/index.js +3 -1
- package/dist/dts/features/Dictionary/index.js.map +1 -1
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.d.ts +7 -0
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.d.ts.map +1 -0
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.js +39 -0
- package/dist/dts/features/Dictionary/metadata/MetadataDictionary.js.map +1 -0
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.d.ts +9 -0
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.d.ts.map +1 -0
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.js +113 -0
- package/dist/dts/features/Dictionary/metadata/MetadataPropertiesTable.js.map +1 -0
- package/dist/dts/features/Dictionary/metadata/registerApp.d.ts +3 -0
- package/dist/dts/features/Dictionary/metadata/registerApp.d.ts.map +1 -0
- package/dist/dts/features/Dictionary/metadata/registerApp.js +13 -0
- package/dist/dts/features/Dictionary/metadata/registerApp.js.map +1 -0
- package/dist/dts/features/Dictionary/metadata/types.d.ts +17 -0
- package/dist/dts/features/Dictionary/metadata/types.d.ts.map +1 -0
- package/dist/dts/features/Dictionary/metadata/types.js +2 -0
- package/dist/dts/features/Dictionary/metadata/types.js.map +1 -0
- package/dist/dts/features/Navigation/TopBar.d.ts.map +1 -1
- package/dist/dts/features/Navigation/TopBar.js +4 -3
- package/dist/dts/features/Navigation/TopBar.js.map +1 -1
- package/dist/dts/features/Workspace/ExternalLogins/ExternalLoginsStatus.d.ts.map +1 -1
- package/dist/dts/features/Workspace/ExternalLogins/ExternalLoginsStatus.js +1 -1
- package/dist/dts/features/Workspace/ExternalLogins/ExternalLoginsStatus.js.map +1 -1
- package/dist/dts/features/Workspace/NotebookCard.d.ts.map +1 -1
- package/dist/dts/features/Workspace/NotebookCard.js +30 -8
- package/dist/dts/features/Workspace/NotebookCard.js.map +1 -1
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.d.ts.map +1 -1
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js +3 -4
- package/dist/dts/features/Workspace/PaymentPanel/PaymentPanel.js.map +1 -1
- package/dist/dts/features/Workspace/StatusAndControls.d.ts.map +1 -1
- package/dist/dts/features/Workspace/StatusAndControls.js +3 -4
- package/dist/dts/features/Workspace/StatusAndControls.js.map +1 -1
- package/dist/dts/features/Workspace/Workspace.d.ts.map +1 -1
- package/dist/dts/features/Workspace/Workspace.js +0 -1
- package/dist/dts/features/Workspace/Workspace.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js +4 -1
- package/dist/dts/features/Workspace/WorkspaceNotebookPanelWithControls.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspacePanel.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspacePanel.js +10 -9
- package/dist/dts/features/Workspace/WorkspacePanel.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceProvider.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceProvider.js +1 -0
- package/dist/dts/features/Workspace/WorkspaceProvider.js.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.d.ts +2 -1
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.d.ts.map +1 -1
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.js +56 -27
- package/dist/dts/features/Workspace/WorkspaceStatusProvider.js.map +1 -1
- package/dist/dts/features/Workspace/types.d.ts +10 -0
- package/dist/dts/features/Workspace/types.d.ts.map +1 -1
- package/dist/dts/features/Workspace/types.js +10 -1
- package/dist/dts/features/Workspace/types.js.map +1 -1
- package/dist/dts/index.d.ts +3 -2
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/index.js +3 -2
- package/dist/dts/index.js.map +1 -1
- package/dist/dts/lib/session/session.d.ts.map +1 -1
- package/dist/dts/lib/session/session.js +7 -7
- package/dist/dts/lib/session/session.js.map +1 -1
- package/dist/dts/pages/Crosswalk/data.d.ts +2 -3
- package/dist/dts/pages/Crosswalk/data.d.ts.map +1 -1
- package/dist/dts/pages/Crosswalk/data.js +27 -11
- package/dist/dts/pages/Crosswalk/data.js.map +1 -1
- package/dist/dts/pages/Theme/index.d.ts.map +1 -1
- package/dist/dts/utils/date.d.ts +0 -6
- package/dist/dts/utils/date.d.ts.map +1 -1
- package/dist/dts/utils/date.js +0 -12
- package/dist/dts/utils/date.js.map +1 -1
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/index.js +1 -0
- package/dist/dts/utils/index.js.map +1 -1
- package/dist/dts/utils/time.d.ts +15 -0
- package/dist/dts/utils/time.d.ts.map +1 -1
- package/dist/dts/utils/time.js +105 -0
- package/dist/dts/utils/time.js.map +1 -1
- package/dist/esm/index.js +16 -35
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +46 -15
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -4
- package/LICENSE +0 -201
- package/dist/dts/components/CountButton/CountButton.d.ts +0 -19
- package/dist/dts/components/CountButton/CountButton.d.ts.map +0 -1
- package/dist/dts/components/CountButton/CountButton.js +0 -18
- package/dist/dts/components/CountButton/CountButton.js.map +0 -1
- package/dist/dts/components/ErrorMessage.d.ts +0 -6
- package/dist/dts/components/ErrorMessage.d.ts.map +0 -1
- package/dist/dts/components/ErrorMessage.js +0 -8
- package/dist/dts/components/ErrorMessage.js.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts +0 -10
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js +0 -53
- package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.d.ts +0 -7
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.js +0 -38
- package/dist/dts/features/CohortBuilder/CohortManager/CohortManager.js.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts +0 -13
- package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js +0 -56
- package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.d.ts +0 -4
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.js +0 -22
- package/dist/dts/features/CohortBuilder/CohortManager/cohortUtils.js.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js +0 -320
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts +0 -29
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +0 -85
- package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.d.ts +0 -6
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.js +0 -55
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpression.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.d.ts +0 -13
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.js +0 -41
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionContext.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionSection.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionsExpandedContext.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryExpressionsExpandedContext.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentation.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentation.js.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentationLabel.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/QueryExpression/QueryRepresentationLabel.js.map +0 -1
- package/dist/dts/features/CohortBuilder/cohortUtils.d.ts +0 -4
- package/dist/dts/features/CohortBuilder/cohortUtils.d.ts.map +0 -1
- package/dist/dts/features/CohortBuilder/cohortUtils.js +0 -23
- package/dist/dts/features/CohortBuilder/cohortUtils.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortManager.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortManager.js +0 -57
- package/dist/dts/features/CohortDiscovery/CohortManager.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts +0 -23
- package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js +0 -35
- package/dist/dts/features/CohortDiscovery/CohortSelectors.js.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts +0 -91
- package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts.map +0 -1
- package/dist/dts/features/CohortDiscovery/CohortSlice.js +0 -93
- package/dist/dts/features/CohortDiscovery/CohortSlice.js.map +0 -1
- package/dist/dts/utils/icons.d.ts +0 -18
- package/dist/dts/utils/icons.d.ts.map +0 -1
- package/dist/dts/utils/icons.js +0 -18
- package/dist/dts/utils/icons.js.map +0 -1
- /package/dist/dts/features/{CohortDiscovery → CohortBuilder}/CohortManager.d.ts +0 -0
- /package/dist/dts/features/CohortBuilder/{QueryExpression/QueryExpressionsExpandedContext.d.ts → QueryExpressionsExpandedContext.d.ts} +0 -0
- /package/dist/dts/features/CohortBuilder/{QueryExpression/QueryExpressionsExpandedContext.js → QueryExpressionsExpandedContext.js} +0 -0
- /package/dist/dts/features/CohortBuilder/{QueryExpression/QueryRepresentationLabel.d.ts → QueryRepresentationLabel.d.ts} +0 -0
- /package/dist/dts/features/CohortBuilder/{QueryExpression/QueryRepresentationLabel.js → QueryRepresentationLabel.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSONObjectDownloadButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Buttons/DownloadButtons/JSONObjectDownloadButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"JSONObjectDownloadButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Buttons/DownloadButtons/JSONObjectDownloadButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoD1D,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -39,8 +39,8 @@ import { useState } from 'react';
|
|
|
39
39
|
import { Button, Tooltip } from '@mantine/core';
|
|
40
40
|
import { Icon } from '@iconify/react';
|
|
41
41
|
var JSONObjectDownloadButton = function (_a) {
|
|
42
|
-
var getData = _a.getData, _b = _a.filename, filename = _b === void 0 ? 'data.json' : _b, _c = _a.icon, icon = _c === void 0 ? 'gen3:download' : _c,
|
|
43
|
-
var
|
|
42
|
+
var getData = _a.getData, _b = _a.filename, filename = _b === void 0 ? 'data.json' : _b, _c = _a.icon, icon = _c === void 0 ? 'gen3:download' : _c, tooltip = _a.tooltip;
|
|
43
|
+
var _d = useState(false), isDownloading = _d[0], setIsDownloading = _d[1];
|
|
44
44
|
var saveToJSONFile = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
45
45
|
var data, blob, url, link;
|
|
46
46
|
return __generator(this, function (_a) {
|
|
@@ -69,7 +69,7 @@ var JSONObjectDownloadButton = function (_a) {
|
|
|
69
69
|
return [2 /*return*/];
|
|
70
70
|
});
|
|
71
71
|
}); };
|
|
72
|
-
return (_jsx(Tooltip, { label: tooltip, disabled: !tooltip, children: _jsx(Button, { variant: "
|
|
72
|
+
return (_jsx(Tooltip, { label: tooltip, disabled: !tooltip, children: _jsx(Button, { variant: "outline", onClick: saveToJSONFile, disabled: isDownloading, loading: isDownloading, classNames: { root: 'bg-base-max' }, className: "flex items-center gap-2", children: _jsx(Icon, { icon: icon, height: "1.5rem" }) }) }));
|
|
73
73
|
};
|
|
74
74
|
export default JSONObjectDownloadButton;
|
|
75
75
|
//# sourceMappingURL=JSONObjectDownloadButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSONObjectDownloadButton.js","sourceRoot":"","sources":["../../../../../src/components/Buttons/DownloadButtons/JSONObjectDownloadButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"JSONObjectDownloadButton.js","sourceRoot":"","sources":["../../../../../src/components/Buttons/DownloadButtons/JSONObjectDownloadButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAUtC,IAAM,wBAAwB,GAAiC,UAAC,EAK/D;QAJC,OAAO,aAAA,EACP,gBAAsB,EAAtB,QAAQ,mBAAG,WAAW,KAAA,EACtB,YAAsB,EAAtB,IAAI,mBAAG,eAAe,KAAA,EACtB,OAAO,aAAA;IAED,IAAA,KAAoC,QAAQ,CAAC,KAAK,CAAC,EAAlD,aAAa,QAAA,EAAE,gBAAgB,QAAmB,CAAC;IAE1D,IAAM,cAAc,GAAG;;;YACrB,gBAAgB,CAAC,IAAI,CAAC,CAAC;YAEvB,IAAI,CAAC;gBACG,IAAI,GAAG,OAAO,EAAE,CAAC;gBAEjB,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;oBACrD,IAAI,EAAE,kBAAkB;iBACzB,CAAC,CAAC;gBAGG,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAGhC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;gBACzC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;gBAChB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAEzB,yCAAyC;gBACzC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBAChC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;gBAChC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;YAC3B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;YAC7C,CAAC;oBAAS,CAAC;gBACT,gBAAgB,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC;;;SACF,CAAC;IAEF,OAAO,CACL,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,YACzC,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,cAAc,EACvB,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EACnC,SAAS,EAAC,yBAAyB,YAEnC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,GAAQ,GAClC,GACD,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadJSONButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/UploadJSONButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,qBAAqB;IAC7B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"UploadJSONButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Buttons/UploadJSONButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,qBAAqB;IAC7B,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAmCrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
13
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
14
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -59,7 +70,7 @@ var UploadJSONButton = function (_a) {
|
|
|
59
70
|
case 2: return [2 /*return*/];
|
|
60
71
|
}
|
|
61
72
|
});
|
|
62
|
-
}); }, accept: "application/json", children: function () { return (_jsx(Tooltip, { label: tooltip, disabled: !tooltip, children: _jsx(Button, { loading: processingFile, variant: "
|
|
73
|
+
}); }, accept: "application/json", children: function (props) { return (_jsx(Tooltip, { label: tooltip, disabled: !tooltip, children: _jsx(Button, __assign({}, props, { loading: processingFile, variant: "outline", classNames: { root: 'bg-base-max' }, children: _jsx(Icon, { icon: icon, height: "1.5rem" }) })) })); } }));
|
|
63
74
|
};
|
|
64
75
|
export default UploadJSONButton;
|
|
65
76
|
//# sourceMappingURL=UploadJSONButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadJSONButton.js","sourceRoot":"","sources":["../../../../src/components/Buttons/UploadJSONButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploadJSONButton.js","sourceRoot":"","sources":["../../../../src/components/Buttons/UploadJSONButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAQtC,IAAM,gBAAgB,GAAoC,UAAC,EAI1D;QAHC,gBAAgB,sBAAA,EAChB,OAAO,aAAA,EACP,YAAoB,EAApB,IAAI,mBAAG,aAAa,KAAA;IAEd,IAAA,KAAkB,QAAQ,CAAc,IAAI,CAAC,EAA5C,IAAI,QAAA,EAAE,OAAO,QAA+B,CAAC;IAC9C,IAAA,KAAsC,QAAQ,CAAC,KAAK,CAAC,EAApD,cAAc,QAAA,EAAE,iBAAiB,QAAmB,CAAC;IAE5D,OAAO,CACL,KAAC,UAAU,IACT,QAAQ,EAAE,UAAO,IAAI;;;;;6BACf,CAAA,IAAI,KAAK,IAAI,CAAA,EAAb,wBAAa;wBACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;wBACxB,OAAO,CAAC,IAAI,CAAC,CAAC;wBACG,qBAAM,IAAI,CAAC,IAAI,EAAE,EAAA;;wBAA5B,QAAQ,GAAG,SAAiB;wBAClC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;wBAC3B,iBAAiB,CAAC,KAAK,CAAC,CAAC;;;;;aAE5B,EACD,MAAM,EAAC,kBAAkB,YAExB,UAAC,KAAK,IAAK,OAAA,CACV,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,YACzC,KAAC,MAAM,eACD,KAAK,IACT,OAAO,EAAE,cAAc,EACvB,OAAO,EAAC,SAAS,EACjB,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,YAEnC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAC,QAAQ,GAAQ,IAClC,GACD,CACX,EAXW,CAWX,GACU,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -13,7 +13,8 @@ export interface TextContentProps {
|
|
|
13
13
|
readonly type?: ContentType;
|
|
14
14
|
readonly email?: string;
|
|
15
15
|
readonly link?: string;
|
|
16
|
+
readonly linkText?: string;
|
|
16
17
|
}
|
|
17
|
-
declare const TextContent: ({ text, className, type, email, link, }: TextContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const TextContent: ({ text, className, type, email, link, linkText, }: TextContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export default TextContent;
|
|
19
20
|
//# sourceMappingURL=TextContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/TextContent.tsx"],"names":[],"mappings":"AAQA,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,IAAI,SAAS;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TextContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/TextContent.tsx"],"names":[],"mappings":"AAQA,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,IAAI,SAAS;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AACD,QAAA,MAAM,WAAW,sDAOd,gBAAgB,4CA8GlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -37,7 +37,7 @@ export var ContentType;
|
|
|
37
37
|
ContentType["Link"] = "link";
|
|
38
38
|
})(ContentType || (ContentType = {}));
|
|
39
39
|
var TextContent = function (_a) {
|
|
40
|
-
var text = _a.text, _b = _a.className, className = _b === void 0 ? 'inline text-base-contrast
|
|
40
|
+
var text = _a.text, _b = _a.className, className = _b === void 0 ? 'inline text-base-contrast-min font-medium margin-block-start-1 margin-block-end-1' : _b, _c = _a.type, type = _c === void 0 ? ContentType.Text : _c, _d = _a.email, email = _d === void 0 ? undefined : _d, _e = _a.link, link = _e === void 0 ? undefined : _e, _f = _a.linkText, linkText = _f === void 0 ? undefined : _f;
|
|
41
41
|
switch (type) {
|
|
42
42
|
case ContentType.Html: {
|
|
43
43
|
var textString = Array.isArray(text) ? text.join('') : text;
|
|
@@ -70,7 +70,7 @@ var TextContent = function (_a) {
|
|
|
70
70
|
}, children: textString }) }));
|
|
71
71
|
}
|
|
72
72
|
case ContentType.TextWithEmail: {
|
|
73
|
-
var DEFAULT_STYLE = 'inline
|
|
73
|
+
var DEFAULT_STYLE = 'inline text-base-contrast-min font-medium margin-block-start-1 margin-block-end-1';
|
|
74
74
|
var mergedClassname = className
|
|
75
75
|
? twMerge(DEFAULT_STYLE, className)
|
|
76
76
|
: DEFAULT_STYLE;
|
|
@@ -78,16 +78,19 @@ var TextContent = function (_a) {
|
|
|
78
78
|
return (_jsx("div", { className: mergedClassname, children: _jsxs("span", { children: [textString, email && (_jsx(Anchor, { classNames: { root: mergedClassname }, href: "mailto:".concat(email), children: " ".concat(email, ".") }))] }) }));
|
|
79
79
|
}
|
|
80
80
|
case ContentType.TextWithLink: {
|
|
81
|
-
var DEFAULT_STYLE = 'inline
|
|
81
|
+
var DEFAULT_STYLE = 'inline text-base-contrast-min font-medium margin-block-start-1 margin-block-end-1';
|
|
82
82
|
var mergedClassname = className
|
|
83
83
|
? twMerge(DEFAULT_STYLE, className)
|
|
84
84
|
: DEFAULT_STYLE;
|
|
85
85
|
var textString = Array.isArray(text) ? text.join('') : text;
|
|
86
|
-
|
|
86
|
+
if (!link) {
|
|
87
|
+
return _jsx("div", { className: mergedClassname, children: " Link is not defined." });
|
|
88
|
+
}
|
|
89
|
+
return (_jsx("div", { className: mergedClassname, children: _jsxs("span", { children: [textString, link && (_jsx(Anchor, { classNames: { root: mergedClassname }, href: link, children: " ".concat(linkText !== null && linkText !== void 0 ? linkText : link, ".") }))] }) }));
|
|
87
90
|
}
|
|
88
91
|
case ContentType.Text:
|
|
89
92
|
default:
|
|
90
|
-
return (_jsx("div", { className: className, children: _jsx("p", { children: text }) }));
|
|
93
|
+
return (_jsx("div", { className: className, children: _jsx("p", { children: text.toString() }) }));
|
|
91
94
|
}
|
|
92
95
|
};
|
|
93
96
|
export default TextContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextContent.js","sourceRoot":"","sources":["../../../../src/components/Content/TextContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,CAAN,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,8CAA+B,CAAA;IAC/B,4CAA6B,CAAA;IAC7B,4BAAa,CAAA;AACf,CAAC,EARW,WAAW,KAAX,WAAW,QAQtB;
|
|
1
|
+
{"version":3,"file":"TextContent.js","sourceRoot":"","sources":["../../../../src/components/Content/TextContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,CAAN,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,sCAAuB,CAAA;IACvB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,8CAA+B,CAAA;IAC/B,4CAA6B,CAAA;IAC7B,4BAAa,CAAA;AACf,CAAC,EARW,WAAW,KAAX,WAAW,QAQtB;AAUD,IAAM,WAAW,GAAG,UAAC,EAOF;QANjB,IAAI,UAAA,EACJ,iBAA+F,EAA/F,SAAS,mBAAG,mFAAmF,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
import { ReactNode } from 'react';
|
|
3
3
|
interface DropdownWithIconProps {
|
|
4
4
|
/**
|
|
5
5
|
* if true, doesn't set width to be "target"
|
|
6
6
|
*/
|
|
7
|
-
disableTargetWidth?:
|
|
7
|
+
disableTargetWidth?: string;
|
|
8
8
|
/**
|
|
9
|
-
* Left
|
|
9
|
+
* Left Icon for the taret button, can be undefined too
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
LeftIcon?: JSX.Element;
|
|
12
12
|
/**
|
|
13
|
-
* Right
|
|
13
|
+
* Right Icon for the taret button, can be undefined too (default to dropdown icon)
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
RightIcon?: JSX.Element;
|
|
16
16
|
/**
|
|
17
17
|
* Content for target button
|
|
18
18
|
*/
|
|
@@ -46,12 +46,16 @@ interface DropdownWithIconProps {
|
|
|
46
46
|
* whether the dropdown should fill the height of its parent
|
|
47
47
|
*/
|
|
48
48
|
fullHeight?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* custom z-index for Menu, defaults to undefined
|
|
51
|
+
*/
|
|
52
|
+
zIndex?: number;
|
|
49
53
|
/**
|
|
50
54
|
* custom test id
|
|
51
55
|
*/
|
|
52
56
|
customDataTestId?: string;
|
|
53
57
|
/**
|
|
54
|
-
|
|
58
|
+
tooltip
|
|
55
59
|
*/
|
|
56
60
|
tooltip?: string;
|
|
57
61
|
/**
|
|
@@ -59,6 +63,6 @@ interface DropdownWithIconProps {
|
|
|
59
63
|
*/
|
|
60
64
|
buttonAriaLabel?: string;
|
|
61
65
|
}
|
|
62
|
-
export declare const DropdownWithIcon: ({ disableTargetWidth,
|
|
66
|
+
export declare const DropdownWithIcon: ({ disableTargetWidth, LeftIcon, RightIcon, TargetButtonChildren, targetButtonDisabled, dropdownElements, menuLabelText, menuLabelCustomClass, customPosition, fullHeight, zIndex, customDataTestId, tooltip, buttonAriaLabel, }: DropdownWithIconProps) => JSX.Element;
|
|
63
67
|
export {};
|
|
64
68
|
//# sourceMappingURL=DropdownWithIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownWithIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropdownWithIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,UAAU,qBAAqB;IAC7B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACxB;;OAEG;IACH,oBAAoB,EAAE,SAAS,CAAC;IAChC;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,gBAAgB,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;IACH;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,oOAiB1B,qBAAqB,KAAG,GAAG,CAAC,OAkE9B,CAAC"}
|
|
@@ -9,28 +9,22 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx,
|
|
13
|
-
import
|
|
14
|
-
import { Button, Menu
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import React from 'react';
|
|
14
|
+
import { Button, Menu } from '@mantine/core';
|
|
15
|
+
import { Tooltip } from '@mantine/core';
|
|
16
|
+
import { IoMdArrowDropdown as Dropdown } from 'react-icons/io';
|
|
15
17
|
import { focusStyles } from '../../utils';
|
|
16
|
-
import { DropdownIcon } from '../../utils/icons';
|
|
17
18
|
export var DropdownWithIcon = function (_a) {
|
|
18
|
-
var disableTargetWidth = _a.disableTargetWidth,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
root:
|
|
22
|
-
},
|
|
19
|
+
var disableTargetWidth = _a.disableTargetWidth, LeftIcon = _a.LeftIcon, _b = _a.RightIcon, RightIcon = _b === void 0 ? (_jsx(Dropdown, { size: "1.25em", "aria-hidden": "true", "data-testid": "dropdown-icon" })) : _b, TargetButtonChildren = _a.TargetButtonChildren, targetButtonDisabled = _a.targetButtonDisabled, dropdownElements = _a.dropdownElements, menuLabelText = _a.menuLabelText, menuLabelCustomClass = _a.menuLabelCustomClass, customPosition = _a.customPosition, fullHeight = _a.fullHeight, _c = _a.zIndex, zIndex = _c === void 0 ? undefined : _c, _d = _a.customDataTestId, customDataTestId = _d === void 0 ? undefined : _d, _e = _a.tooltip, tooltip = _e === void 0 ? undefined : _e, _f = _a.buttonAriaLabel, buttonAriaLabel = _f === void 0 ? undefined : _f;
|
|
20
|
+
return (_jsxs(Menu, __assign({ width: disableTargetWidth !== null && disableTargetWidth !== void 0 ? disableTargetWidth : 'target' }, (customPosition && { position: customPosition }), { "data-testid": customDataTestId !== null && customDataTestId !== void 0 ? customDataTestId : 'menu-elem', zIndex: zIndex, children: [_jsx(Menu.Target, { children: _jsx(Button, __assign({ variant: "outline", color: "primary", className: "bg-base-max border-primary data-disabled:opacity-50 data-disabled:bg-base-max data-disabled:text-primary ".concat(focusStyles) }, (LeftIcon && { leftIcon: LeftIcon }), { rightSection: RightIcon, disabled: targetButtonDisabled, classNames: {
|
|
21
|
+
// rightIcon: 'border-l pl-1 -mr-2',
|
|
22
|
+
root: fullHeight ? 'h-full' : undefined,
|
|
23
|
+
}, "aria-label": buttonAriaLabel, children: _jsx("div", { children: (tooltip === null || tooltip === void 0 ? void 0 : tooltip.length) && !targetButtonDisabled ? (_jsx("div", { children: _jsx(Tooltip, { label: tooltip, children: _jsx("div", { children: TargetButtonChildren }) }) })) : (_jsx("div", { children: TargetButtonChildren })) }) })) }), _jsxs(Menu.Dropdown, { "data-testid": "dropdown-menu-options", className: "border-1 border-secondary", children: [menuLabelText && (_jsxs(React.Fragment, { children: [_jsx(Menu.Label, { className: menuLabelCustomClass !== null && menuLabelCustomClass !== void 0 ? menuLabelCustomClass : 'font-bold', "data-testid": "menu-label", children: menuLabelText }), _jsx(Menu.Divider, {})] })), dropdownElements === null || dropdownElements === void 0 ? void 0 : dropdownElements.map(function (_a, idx) {
|
|
23
24
|
var title = _a.title, onClick = _a.onClick, icon = _a.icon, disabled = _a.disabled;
|
|
24
25
|
return (_jsx(Menu.Item, { onClick: function () {
|
|
25
|
-
|
|
26
|
-
if (onClick) {
|
|
26
|
+
if (onClick)
|
|
27
27
|
onClick();
|
|
28
|
-
}
|
|
29
|
-
// This is done inorder to set the last focused element as the menu target element
|
|
30
|
-
// This is done to return focus to the target element if the modal is closed with ESC
|
|
31
|
-
if (targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) {
|
|
32
|
-
(_a = targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
33
|
-
}
|
|
34
28
|
}, "data-testid": "".concat(title, "-").concat(idx), leftSection: icon && icon, disabled: disabled, children: title }, "".concat(title, "-").concat(idx)));
|
|
35
29
|
})] })] })));
|
|
36
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownWithIcon.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"DropdownWithIcon.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,iBAAiB,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoE1C,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,EAiBT;QAhBtB,kBAAkB,wBAAA,EAClB,QAAQ,cAAA,EACR,iBAEC,EAFD,SAAS,mBAAG,CACV,KAAC,QAAQ,IAAC,IAAI,EAAC,QAAQ,iBAAa,MAAM,iBAAa,eAAe,GAAG,CAC1E,KAAA,EACD,oBAAoB,0BAAA,EACpB,oBAAoB,0BAAA,EACpB,gBAAgB,sBAAA,EAChB,aAAa,mBAAA,EACb,oBAAoB,0BAAA,EACpB,cAAc,oBAAA,EACd,UAAU,gBAAA,EACV,cAAkB,EAAlB,MAAM,mBAAG,SAAS,KAAA,EAClB,wBAA4B,EAA5B,gBAAgB,mBAAG,SAAS,KAAA,EAC5B,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,uBAA2B,EAA3B,eA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gBAAgB,CAAE,GAAG,CAAC,UAAC,EAAkC,EAAE,GAAG;4BAArC,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,IAAI,UAAA,EAAE,QAAQ,cAAA;wBAAY,OAAA,CAClE,KAAC,IAAI,CAAC,IAAI,IACR,OAAO,EAAE;gCACP,IAAI,OAAO;oCAAE,OAAO,EAAE,CAAC;4BACzB,CAAC,iBAEY,UAAG,KAAK,cAAI,GAAG,CAAE,EAC9B,WAAW,EAAE,IAAI,IAAI,IAAI,EACzB,QAAQ,EAAE,QAAQ,YAEjB,KAAK,IALD,UAAG,KAAK,cAAI,GAAG,CAAE,CAMZ,CACb;oBAZmE,CAYnE,CAAC,IACY,KACX,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -36,7 +36,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
};
|
|
37
37
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
38
|
import { render } from '@testing-library/react';
|
|
39
|
-
import { waitFor } from '@testing-library/react';
|
|
40
39
|
import { DropdownWithIcon } from './DropdownWithIcon';
|
|
41
40
|
import userEvent from '@testing-library/user-event';
|
|
42
41
|
describe('<DropdownWithIcon />', function () {
|
|
@@ -45,7 +44,7 @@ describe('<DropdownWithIcon />', function () {
|
|
|
45
44
|
expect(getByTestId('dropdown-icon')).toBeDefined();
|
|
46
45
|
});
|
|
47
46
|
it('if right icon is provided, provided icon should render', function () {
|
|
48
|
-
var getByLabelText = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }],
|
|
47
|
+
var getByLabelText = render(_jsx(DropdownWithIcon, { TargetButtonChildren: "test", dropdownElements: [{ title: 'test' }, { title: 'test2' }], RightIcon: _jsx("div", { "aria-label": "test-icon" }) })).getByLabelText;
|
|
49
48
|
expect(getByLabelText('test-icon')).toBeDefined();
|
|
50
49
|
});
|
|
51
50
|
it('target button should be disabled if targetButtonDisabled props is true', function () {
|
|
@@ -65,11 +64,7 @@ describe('<DropdownWithIcon />', function () {
|
|
|
65
64
|
return [4 /*yield*/, userEvent.click(getByTestId('menu-elem'))];
|
|
66
65
|
case 1:
|
|
67
66
|
_b.sent();
|
|
68
|
-
|
|
69
|
-
timeout: 2000,
|
|
70
|
-
})];
|
|
71
|
-
case 2:
|
|
72
|
-
_b.sent();
|
|
67
|
+
expect(getByTestId('menu-label')).toBeDefined();
|
|
73
68
|
expect(getByText('test menu label text')).toBeInTheDocument();
|
|
74
69
|
return [2 /*return*/];
|
|
75
70
|
}
|
|
@@ -101,15 +96,10 @@ describe('<DropdownWithIcon />', function () {
|
|
|
101
96
|
] })).getByTestId;
|
|
102
97
|
return [4 /*yield*/, userEvent.click(getByTestId('menu-elem'))];
|
|
103
98
|
case 1:
|
|
104
|
-
_a.sent();
|
|
105
|
-
return [4 /*yield*/, waitFor(function () { return expect(getByTestId('test-0')).toBeInTheDocument(); }, {
|
|
106
|
-
timeout: 2000,
|
|
107
|
-
})];
|
|
108
|
-
case 2:
|
|
109
99
|
_a.sent();
|
|
110
100
|
firstMenuItem = getByTestId('test-0');
|
|
111
101
|
return [4 /*yield*/, userEvent.click(firstMenuItem)];
|
|
112
|
-
case
|
|
102
|
+
case 2:
|
|
113
103
|
_a.sent();
|
|
114
104
|
expect(mockOnClickCallBack1).toBeCalled();
|
|
115
105
|
return [2 /*return*/];
|
|
@@ -128,11 +118,7 @@ describe('<DropdownWithIcon />', function () {
|
|
|
128
118
|
return [4 /*yield*/, userEvent.click(getByTestId('menu-elem'))];
|
|
129
119
|
case 1:
|
|
130
120
|
_a.sent();
|
|
131
|
-
|
|
132
|
-
timeout: 2000,
|
|
133
|
-
})];
|
|
134
|
-
case 2:
|
|
135
|
-
_a.sent();
|
|
121
|
+
expect(getByTestId('itemD-0')).toBeDisabled();
|
|
136
122
|
expect(getByTestId('itemE-1')).not.toBeDisabled();
|
|
137
123
|
return [2 /*return*/];
|
|
138
124
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownWithIcon.unit.test.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.unit.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DropdownWithIcon.unit.test.js","sourceRoot":"","sources":["../../../../src/components/DropdownWithIcon/DropdownWithIcon.unit.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAEpD,QAAQ,CAAC,sBAAsB,EAAE;IAC/B,EAAE,CAAC,kEAAkE,EAAE;QAC7D,IAAA,WAAW,GAAK,MAAM,CAC5B,KAAC,gBAAgB,IACf,oBAAoB,EAAC,MAAM,EAC3B,gBAAgB,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,GACzD,CACH,YALkB,CAKjB;QAEF,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE;QACnD,IAAA,cAAc,GAAK,MAAM,CAC/B,KAAC,gBAAgB,IACf,oBAAoB,EAAC,MAAM,EAC3B,gBAAgB,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EACzD,SAAS,EAAE,4BAAgB,WAAW,GAAG,GACzC,CACH,eANqB,CAMpB;QAEF,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC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,MAAM,EAC3B,gBAAgB,EAAE;4BAChB,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;4BAClC,EAAE,KAAK,EAAE,OAAO,EAAE;yBACnB,GACD,CACH,YARkB,CAQjB;oBAEF,qBAAM,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,EAAA;;oBAA/C,SAA+C,CAAC;oBAChD,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;oBAC9C,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;;;;SACnD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginProvidersPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Login/LoginProvidersPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoginProvidersPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/Login/LoginProvidersPanel.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA4D7C,QAAA,MAAM,mBAAmB,4BAA6B,kBAAkB,4CA4DvE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { Box, Button, LoadingOverlay, Select, Stack } from '@mantine/core';
|
|
3
|
+
import { Box, Button, Center, LoadingOverlay, Select, Stack, } from '@mantine/core';
|
|
4
4
|
import { useGetLoginProvidersQuery, } from '@gen3/core';
|
|
5
5
|
import { ErrorCard } from '../MessageCards';
|
|
6
6
|
var LoginProviderMultipleItems = function (_a) {
|
|
@@ -20,14 +20,17 @@ var LoginProviderSingleItem = function (_a) {
|
|
|
20
20
|
};
|
|
21
21
|
var LoginProvidersPanel = function (_a) {
|
|
22
22
|
var handleLoginSelected = _a.handleLoginSelected;
|
|
23
|
-
var _b = useGetLoginProvidersQuery(), data = _b.data, isSuccess = _b.isSuccess, isError = _b.isError;
|
|
23
|
+
var _b = useGetLoginProvidersQuery(), data = _b.data, isSuccess = _b.isSuccess, isError = _b.isError, isLoading = _b.isLoading, isFetching = _b.isFetching;
|
|
24
24
|
if (isError) {
|
|
25
|
-
return _jsx(ErrorCard, { message: 'request to authentication service failed' });
|
|
25
|
+
return (_jsx(Center, { children: _jsx(ErrorCard, { message: 'request to authentication service failed' }) }));
|
|
26
26
|
}
|
|
27
|
-
if (
|
|
27
|
+
if (isLoading || isFetching) {
|
|
28
28
|
return _jsx(LoadingOverlay, { visible: !isSuccess });
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
if (isSuccess && !data) {
|
|
31
|
+
return (_jsx(Center, { children: _jsx(ErrorCard, { message: 'no logins defined' }) }));
|
|
32
|
+
}
|
|
33
|
+
return (_jsx(Box, { className: "flex flex-col items-center justify-center", children: _jsxs(Stack, { align: "center", className: "w-1/3", children: [data && data.default_provider.urls.length > 1 ? (_jsx(LoginProviderMultipleItems, { provider: data.default_provider, handleLoginSelected: handleLoginSelected })) : (data && (_jsx(LoginProviderSingleItem, { provider: data.default_provider, handleLoginSelected: handleLoginSelected }))), data === null || data === void 0 ? void 0 : data.providers.filter(function (x) { return x.name !== data.default_provider.name; }).map(function (x) {
|
|
31
34
|
return x.urls.length > 1 ? (_jsx(LoginProviderMultipleItems, { provider: x, handleLoginSelected: handleLoginSelected }, x.name)) : (_jsx(LoginProviderSingleItem, { provider: x, handleLoginSelected: handleLoginSelected }, x.name));
|
|
32
35
|
})] }) }));
|
|
33
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoginProvidersPanel.js","sourceRoot":"","sources":["../../../../src/components/Login/LoginProvidersPanel.tsx"],"names":[],"mappings":";AAAA,OAAc,EA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0B,IACzB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,mBAAmB,EAAE,mBAAmB,GACxC,CACH,CAAC,CAAC,CAAC,CACF,IAAI,IAAI,CACN,KAAC,uBAAuB,IACtB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,mBAAmB,EAAE,mBAAmB,GACxC,CACH,CACF,EACA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,CACb,MAAM,CAAC,UAAC,CAAM,IAAK,OAAA,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAArC,CAAqC,EACxD,GAAG,CAAC,UAAC,CAAoB;oBACxB,OAAA,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAClB,KAAC,0BAA0B,IAEzB,QAAQ,EAAE,CAAC,EACX,mBAAmB,EAAE,mBAAmB,IAFnC,CAAC,CAAC,IAAI,CAGX,CACH,CAAC,CAAC,CAAC,CACF,KAAC,uBAAuB,IAEtB,QAAQ,EAAE,CAAC,EACX,mBAAmB,EAAE,mBAAmB,IAFnC,CAAC,CAAC,IAAI,CAGX,CACH;gBAZD,CAYC,CACF,IACG,GACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { IconAlertTriangle } from '
|
|
2
|
+
import { BsExclamationTriangle as IconAlertTriangle } from 'react-icons/bs';
|
|
3
3
|
import MessageCard from './MessageCard';
|
|
4
4
|
var ErrorCard = function (_a) {
|
|
5
5
|
var message = _a.message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorCard.js","sourceRoot":"","sources":["../../../../src/components/MessageCards/ErrorCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ErrorCard.js","sourceRoot":"","sources":["../../../../src/components/MessageCards/ErrorCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,WAAsC,MAAM,eAAe,CAAC;AAEnE,IAAM,SAAS,GAA8C,UAAC,EAE3C;QADjB,OAAO,aAAA;IAC6B,OAAA,CACpC,KAAC,WAAW,IACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,KAAC,iBAAiB,IAAC,IAAI,EAAE,EAAE,GAAI,EACrC,KAAK,EAAC,WAAW,GACjB,CACH;AANqC,CAMrC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { IconAlertTriangle } from '
|
|
2
|
+
import { BsExclamationTriangle as IconAlertTriangle } from 'react-icons/bs';
|
|
3
3
|
import MessageCard from './MessageCard';
|
|
4
4
|
var WarningCard = function (_a) {
|
|
5
5
|
var message = _a.message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningCard.js","sourceRoot":"","sources":["../../../../src/components/MessageCards/WarningCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WarningCard.js","sourceRoot":"","sources":["../../../../src/components/MessageCards/WarningCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,qBAAqB,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,WAAsC,MAAM,eAAe,CAAC;AAEnE,IAAM,WAAW,GAA8C,UAAC,EAE7C;QADjB,OAAO,aAAA;IAC6B,OAAA,CACpC,KAAC,WAAW,IACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,KAAC,iBAAiB,IAAC,IAAI,EAAE,EAAE,GAAI,EACrC,KAAK,EAAC,WAAW,GACjB,CACH;AANqC,CAMrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessagePanel.d.ts","sourceRoot":"","sources":["../../../src/components/MessagePanel.tsx"],"names":[],"mappings":"AAGA,UAAU,OAAO;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,YAAY,yBAAkC,OAAO,4CAgB1D,CAAC;
|
|
1
|
+
{"version":3,"file":"MessagePanel.d.ts","sourceRoot":"","sources":["../../../src/components/MessagePanel.tsx"],"names":[],"mappings":"AAGA,UAAU,OAAO;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,YAAY,yBAAkC,OAAO,4CAgB1D,CAAC;AAGF,eAAe,YAAY,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Paper, Text } from '@mantine/core';
|
|
3
3
|
var MessagePanel = function (_a) {
|
|
4
4
|
var message = _a.message, _b = _a.isError, isError = _b === void 0 ? false : _b;
|
|
5
|
-
return (_jsx("div", { className: "relative w-full flex flex-col", children: _jsx(Paper, { shadow: "md", radius: "lg", p: "md", children: _jsx("div", { className: "w-1/2 mx-auto text-center mt-4 bg-base-lightest hover:bg-base-lighter p-4 border-bg-base-light border-r-8", children: _jsx(Text, { size: "lg", fw: "bold", color: isError ? '
|
|
5
|
+
return (_jsx("div", { className: "relative w-full flex flex-col", children: _jsx(Paper, { shadow: "md", radius: "lg", p: "md", children: _jsx("div", { className: "w-1/2 mx-auto text-center mt-4 bg-base-lightest hover:bg-base-lighter p-4 border-bg-base-light border-r-8", children: _jsx(Text, { size: "lg", fw: "bold", color: isError ? 'red' : 'primary-contrast', children: message }) }) }) }));
|
|
6
6
|
};
|
|
7
7
|
export default MessagePanel;
|
|
8
8
|
//# sourceMappingURL=MessagePanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessagePanel.js","sourceRoot":"","sources":["../../../src/components/MessagePanel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQ5C,IAAM,YAAY,GAAG,UAAC,EAAqC;QAAnC,OAAO,aAAA,EAAE,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA;IAC9C,OAAO,CACL,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,KAAK,IAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,YACnC,cAAK,SAAS,EAAC,2GAA2G,YACxH,KAAC,IAAI,IACH,IAAI,EAAC,IAAI,EACT,EAAE,EAAC,MAAM,EACT,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"MessagePanel.js","sourceRoot":"","sources":["../../../src/components/MessagePanel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQ5C,IAAM,YAAY,GAAG,UAAC,EAAqC;QAAnC,OAAO,aAAA,EAAE,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA;IAC9C,OAAO,CACL,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,KAAK,IAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,YACnC,cAAK,SAAS,EAAC,2GAA2G,YACxH,KAAC,IAAI,IACH,IAAI,EAAC,IAAI,EACT,EAAE,EAAC,MAAM,EACT,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB,YAE1C,OAAO,GACH,GACH,GACA,GACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAGF,eAAe,YAAY,CAAC"}
|
|
@@ -4,18 +4,17 @@ import { type RegisteredIcons, type Fonts } from '../../lib/content/types';
|
|
|
4
4
|
import { SessionConfiguration } from '../../lib/session/types';
|
|
5
5
|
import { type ModalsConfig } from '../Modals';
|
|
6
6
|
interface Gen3ProviderProps {
|
|
7
|
-
colors: Record<string, TenStringArray>;
|
|
8
7
|
icons: Array<RegisteredIcons>;
|
|
9
|
-
fonts: Fonts;
|
|
10
8
|
sessionConfig: SessionConfiguration;
|
|
11
9
|
modalsConfig: ModalsConfig;
|
|
12
10
|
children?: ReactNode | undefined;
|
|
13
11
|
}
|
|
12
|
+
export declare const createMantineTheme: (fonts: Fonts, colors: Record<string, TenStringArray>) => import("type-fest/source/partial-deep").PartialObjectDeep<import("@mantine/core").MantineTheme, {}>;
|
|
14
13
|
/**
|
|
15
14
|
* Gen3Provider wraps around the entire app and provides general configurations
|
|
16
15
|
* for the whole website like color scheme, icons, fonts, and sessionConfigs like
|
|
17
16
|
* inactivity limits for session timeouts.
|
|
18
17
|
*/
|
|
19
|
-
declare const Gen3Provider: ({
|
|
18
|
+
declare const Gen3Provider: ({ icons, sessionConfig, modalsConfig, children, }: Gen3ProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
19
|
export default Gen3Provider;
|
|
21
20
|
//# sourceMappingURL=Gen3Provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gen3Provider.d.ts","sourceRoot":"","sources":["../../../../src/components/Providers/Gen3Provider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Gen3Provider.d.ts","sourceRoot":"","sources":["../../../../src/components/Providers/Gen3Provider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAI3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAElE,UAAU,iBAAiB;IACzB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC9B,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAClC;AAGD,eAAO,MAAM,kBAAkB,UACtB,KAAK,UACJ,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,wGAoDvC,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,YAAY,sDAKf,iBAAiB,4CAiBnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -12,17 +12,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useEffect } from 'react';
|
|
14
14
|
import { CoreProvider } from '@gen3/core';
|
|
15
|
-
import { createTheme
|
|
16
|
-
// createEmotionCache,
|
|
17
|
-
// EmotionCache,
|
|
18
|
-
} from '@mantine/core';
|
|
15
|
+
import { createTheme } from '@mantine/core';
|
|
19
16
|
import { SessionProvider } from '../../lib/session/session';
|
|
20
17
|
import { ModalsProvider } from '@mantine/modals';
|
|
21
18
|
import { Notifications } from '@mantine/notifications';
|
|
22
19
|
import { addCollection } from '@iconify/react';
|
|
23
20
|
import { Gen3ModalsProvider } from '../Modals';
|
|
24
21
|
// Define theme for mantine v7
|
|
25
|
-
var createMantineTheme = function (fonts, colors) {
|
|
22
|
+
export var createMantineTheme = function (fonts, colors) {
|
|
26
23
|
var theme = createTheme({
|
|
27
24
|
// use V2 font in MantineProvider
|
|
28
25
|
fontFamily: fonts.fontFamily,
|
|
@@ -73,12 +70,11 @@ var createMantineTheme = function (fonts, colors) {
|
|
|
73
70
|
* inactivity limits for session timeouts.
|
|
74
71
|
*/
|
|
75
72
|
var Gen3Provider = function (_a) {
|
|
76
|
-
var
|
|
73
|
+
var icons = _a.icons, sessionConfig = _a.sessionConfig, modalsConfig = _a.modalsConfig, children = _a.children;
|
|
77
74
|
useEffect(function () {
|
|
78
75
|
icons.forEach(function (i) { return addCollection(i); });
|
|
79
76
|
}, [icons]);
|
|
80
|
-
|
|
81
|
-
return (_jsx(CoreProvider, { children: _jsx(MantineProvider, { theme: theme, children: _jsxs(ModalsProvider, { children: [_jsx(Notifications, {}), _jsx(SessionProvider, __assign({}, sessionConfig, { children: _jsx(Gen3ModalsProvider, { config: modalsConfig, children: children }) }))] }) }) }));
|
|
77
|
+
return (_jsx(CoreProvider, { children: _jsxs(ModalsProvider, { children: [_jsx(Notifications, {}), _jsx(SessionProvider, __assign({}, sessionConfig, { children: _jsx(Gen3ModalsProvider, { config: modalsConfig, children: children }) }))] }) }));
|
|
82
78
|
};
|
|
83
79
|
export default Gen3Provider;
|
|
84
80
|
//# sourceMappingURL=Gen3Provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gen3Provider.js","sourceRoot":"","sources":["../../../../src/components/Providers/Gen3Provider.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"Gen3Provider.js","sourceRoot":"","sources":["../../../../src/components/Providers/Gen3Provider.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC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IAAM,YAAY,GAAG,UAAC,EAKF;QAJlB,KAAK,WAAA,EACL,aAAa,mBAAA,EACb,YAAY,kBAAA,EACZ,QAAQ,cAAA;IAER,SAAS,CAAC;QACR,KAAK,CAAC,OAAO,CAAC,UAAC,CAAC,IAAK,OAAA,aAAa,CAAC,CAAC,CAAC,EAAhB,CAAgB,CAAC,CAAC;IACzC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACL,KAAC,YAAY,cACX,MAAC,cAAc,eACb,KAAC,aAAa,KAAG,EACjB,KAAC,eAAe,eAAK,aAAa,cAChC,KAAC,kBAAkB,IAAC,MAAM,EAAE,YAAY,YACrC,QAAQ,GACU,IACL,IACH,GACJ,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceMonitor.d.ts","sourceRoot":"","sources":["../../../../src/components/Providers/ResourceMonitor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResourceMonitor.d.ts","sourceRoot":"","sources":["../../../../src/components/Providers/ResourceMonitor.tsx"],"names":[],"mappings":"AAsEA;;;GAGG;AAEH,eAAO,MAAM,2BAA2B,YAsLvC,CAAC"}
|