@adaptabletools/adaptable-cjs 23.0.0-canary.4 → 23.0.0-canary.6
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/index.css +117 -62
- package/package.json +9 -4
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
- package/src/AdaptableState/Common/AggregationColumns.js +30 -3
- package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
- package/src/AdaptableState/Common/Enums.d.ts +5 -5
- package/src/AdaptableState/Common/Enums.js +4 -4
- package/src/AdaptableState/PlusMinusState.d.ts +3 -3
- package/src/AdaptableState/ShortcutState.d.ts +2 -6
- package/src/AdaptableState/StyledColumnState.d.ts +3 -5
- package/src/AdaptableState/ThemeState.d.ts +33 -28
- package/src/Api/EventApi.d.ts +14 -1
- package/src/Api/Events/ThemeChanged.d.ts +6 -0
- package/src/Api/Events/ThemeSelected.d.ts +11 -0
- package/src/Api/Events/ThemeSelected.js +2 -0
- package/src/Api/Implementation/EventApiImpl.js +4 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -14
- package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
- package/src/Api/Implementation/LayoutHelpers.js +19 -8
- package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
- package/src/Api/Implementation/ThemeApiImpl.js +19 -15
- package/src/Api/Internal/EventInternalApi.d.ts +2 -0
- package/src/Api/Internal/EventInternalApi.js +8 -1
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
- package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
- package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
- package/src/Api/Internal/ThemeInternalApi.js +0 -10
- package/src/Api/LayoutApi.d.ts +1 -8
- package/src/Api/ThemeApi.d.ts +6 -2
- package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
- package/src/Strategy/FormatColumnModule.js +12 -5
- package/src/Strategy/LayoutModule.js +13 -8
- package/src/Strategy/StyledColumnModule.js +58 -30
- package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
- package/src/Utilities/Constants/ReduxConstants.js +1 -14
- package/src/Utilities/Helpers/FormatHelper.js +20 -1
- package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
- package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
- package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
- package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
- package/src/Utilities/ObjectFactory.d.ts +1 -3
- package/src/Utilities/ObjectFactory.js +0 -9
- package/src/Utilities/Services/ThemeService.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +32 -41
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
- package/src/View/Comments/CommentsEditor.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
- package/src/View/Components/ModuleProfile.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
- package/src/View/Components/RangesComponent.d.ts +7 -2
- package/src/View/Components/RangesComponent.js +94 -22
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +1 -1
- package/src/View/Components/ValueSelector/index.js +70 -57
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
- package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
- package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
- package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
- package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -20
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
- package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
- package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
- package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
- package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
- package/src/View/Shortcut/shortcutOperations.js +32 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
- package/src/View/Theme/ThemePopup.d.ts +2 -14
- package/src/View/Theme/ThemePopup.js +1 -36
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +34 -24
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +27 -17
- package/src/agGrid/AgGridColumnAdapter.js +9 -15
- package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
- package/src/agGrid/AgGridMenuAdapter.js +20 -37
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
- package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
- package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
- package/src/agGrid/createAgGridIcon.d.ts +10 -0
- package/src/agGrid/createAgGridIcon.js +19 -0
- package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/Input/NumberInput.js +1 -1
- package/src/components/Panel/index.js +1 -1
- package/src/components/SimpleButton/index.js +4 -4
- package/src/components/Toggle/Toggle.js +1 -1
- package/src/components/Toggle/ToggleGroup.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +2 -9
- package/src/metamodel/adaptable.metamodel.d.ts +39 -29
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -4
- package/themes/dark.css +1 -68
- package/themes/light.css +1 -5
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
- package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
- package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
- package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
- package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
- package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
- package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
- package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
- package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
- package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
- package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
- package/src/Aggregation/validateParameterizedAggregations.js +0 -25
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
- package/src/View/Theme/VariantSelector.d.ts +0 -8
- package/src/View/Theme/VariantSelector.js +0 -25
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UploadSection = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const index_1 = tslib_1.__importDefault(require("../../../../../components/Radio/index"));
|
|
7
|
-
const index_2 = require("../../../../../components/Tabs/index");
|
|
8
5
|
const UploadFileSection_1 = require("./UploadFileSection");
|
|
9
6
|
const UploadTextSection_1 = require("./UploadTextSection");
|
|
10
7
|
const Flex_1 = require("../../../../../components/Flex");
|
|
8
|
+
const Card_1 = require("../../../../../components/Card");
|
|
9
|
+
const TypeRadio_1 = require("../../../../Wizard/TypeRadio");
|
|
11
10
|
const UploadSection = (props) => {
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Import Type" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether to import from a file or pasted text" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "File", description: "Upload a file in a supported format", checked: props.importType === 'file', onClick: () => props.onImportTypeChange('file') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Text", description: "Paste CSV, JSON, or other supported text directly", checked: props.importType === 'text', onClick: () => props.onImportTypeChange('text') })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: props.importType === 'file' ? 'File Upload' : 'Paste Text' }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: props.importType === 'file'
|
|
12
|
+
? 'Select or drag a file to load the data for import'
|
|
13
|
+
: 'Paste your data below — CSV or JSON is detected automatically' })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-0", children: props.importType === 'file' ? ((0, jsx_runtime_1.jsx)(UploadFileSection_1.ImportFileSection, { readFile: props.readFile, supportedFileFormats: props.supportedFileFormats, message: props.fileMessage })) : ((0, jsx_runtime_1.jsx)(UploadTextSection_1.ImportTextSection, { message: props.textMessage, text: props.text, onTextChange: props.onTextChange })) })] })] }));
|
|
13
14
|
};
|
|
14
15
|
exports.UploadSection = UploadSection;
|
|
@@ -5,7 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const index_1 = tslib_1.__importDefault(require("../../../../../components/HelpBlock/index"));
|
|
7
7
|
const index_2 = tslib_1.__importDefault(require("../../../../../components/Textarea/index"));
|
|
8
|
+
const Flex_1 = require("../../../../../components/Flex");
|
|
8
9
|
const ImportTextSection = (props) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full twa:min-h-[200px]", children: [(0, jsx_runtime_1.jsx)(index_2.default, { value: props.text, onChange: (event) => props.onTextChange(event.target.value), className: "twa:flex-1 twa:min-h-[200px]" }), props.message ? (0, jsx_runtime_1.jsx)(index_1.default, { className: "twa:mt-2", children: props.message }) : null] }));
|
|
10
11
|
};
|
|
11
12
|
exports.ImportTextSection = ImportTextSection;
|
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ValidationSection = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
7
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
8
|
-
const Tabs_1 = require("../../../../components/Tabs");
|
|
9
6
|
const DataPreview_1 = require("./DataPreview");
|
|
10
7
|
const Flex_1 = require("../../../../components/Flex");
|
|
11
|
-
const
|
|
12
|
-
if (!errors) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
if (!errors[primaryKeyValue]) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
return errors[primaryKeyValue];
|
|
19
|
-
};
|
|
8
|
+
const Card_1 = require("../../../../components/Card");
|
|
20
9
|
const ValidationSection = (props) => {
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Import Options" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose how rows that fail validation should be handled" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onChange: () => {
|
|
11
|
+
props.onSkipInvalidRowsChange(!props.skipInvalidRows);
|
|
12
|
+
}, checked: props.skipInvalidRows, children: "Exclude invalid rows from import" }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Preview" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Review imported data and fix any validation errors before importing" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-0", children: (0, jsx_runtime_1.jsx)(DataPreview_1.DataPreview, { columnsMap: props.columnsMap, data: props.data, errors: props.errors, editable: true, onDataChange: props.onDataChange }) })] })] }));
|
|
24
13
|
};
|
|
25
14
|
exports.ValidationSection = ValidationSection;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReportColumnsWizardSection = exports.renderReportColumnsSummary = exports.isValidReportColumnsScope = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
7
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
8
5
|
const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
9
6
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
10
7
|
const Flex_1 = require("../../../components/Flex");
|
|
8
|
+
const Card_1 = require("../../../components/Card");
|
|
9
|
+
const TypeRadio_1 = require("../../Wizard/TypeRadio");
|
|
11
10
|
const isValidReportColumnsScope = (report) => {
|
|
12
11
|
if (report.ReportColumnScope === 'ScopeColumns') {
|
|
13
12
|
return report.Scope != null ? true : 'Column scope is not defined';
|
|
@@ -24,29 +23,27 @@ const renderReportColumnsSummary = (report) => {
|
|
|
24
23
|
};
|
|
25
24
|
exports.renderReportColumnsSummary = renderReportColumnsSummary;
|
|
26
25
|
const ReportColumnsWizardSection = (props) => {
|
|
27
|
-
const {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
props.onChange(report);
|
|
50
|
-
} }) })) : null] }));
|
|
26
|
+
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
27
|
+
const handleColumnScopeChange = (ReportColumnScope) => {
|
|
28
|
+
const report = {
|
|
29
|
+
...data,
|
|
30
|
+
ReportColumnScope,
|
|
31
|
+
};
|
|
32
|
+
if (report.ReportColumnScope !== 'ScopeColumns') {
|
|
33
|
+
delete report.Scope;
|
|
34
|
+
}
|
|
35
|
+
else if (!report.Scope) {
|
|
36
|
+
report.Scope = {
|
|
37
|
+
ColumnIds: [],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
props.onChange(report);
|
|
41
|
+
};
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3 twa:shrink-0", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Columns" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose which columns to include in the Report" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "All Columns", description: "All columns in the datasource will be included, whether visible or not at time of export", checked: data.ReportColumnScope === 'AllColumns', onClick: () => handleColumnScopeChange('AllColumns') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Visible Columns", description: "Only columns that are visible at the time the Report is exported will be included", checked: data.ReportColumnScope === 'VisibleColumns', onClick: () => handleColumnScopeChange('VisibleColumns') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Bespoke Columns", description: "Only selected columns will be exported \u2014 whether visible or not", checked: data.ReportColumnScope === 'ScopeColumns', onClick: () => handleColumnScopeChange('ScopeColumns') })] }) })] }) }), data.ReportColumnScope === 'ScopeColumns' ? ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:mb-2 twa:border-b-foreground/20", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium", children: "Column Selection" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:max-w-[520px]", children: "Select the columns to include in the Report" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto twa:p-2", children: (0, jsx_runtime_1.jsx)(NewScopeComponent_1.NewScopeComponent, { hideWholeRow: true, isColumnAvailable: (column) => Boolean(column.exportable), descriptions: {
|
|
43
|
+
rowScope: 'Apply Scope for: Row, or one or more Columns, or one or more Data Types',
|
|
44
|
+
columnScope: 'Selected columns will be included in the report',
|
|
45
|
+
}, scope: data.Scope, updateScope: (Scope) => {
|
|
46
|
+
props.onChange({ ...data, Scope });
|
|
47
|
+
} }) })] })) : null] }));
|
|
51
48
|
};
|
|
52
49
|
exports.ReportColumnsWizardSection = ReportColumnsWizardSection;
|
|
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ReportNameWizardSection = exports.isValidReportName = exports.renderReportNameSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const ErrorBox_1 = tslib_1.__importDefault(require("../../../components/ErrorBox"));
|
|
7
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
8
6
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
9
7
|
const Tag_1 = require("../../../components/Tag");
|
|
10
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
11
9
|
const Flex_1 = require("../../../components/Flex");
|
|
10
|
+
const Card_1 = require("../../../components/Card");
|
|
12
11
|
const renderReportNameSummary = (report) => {
|
|
13
12
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2", children: [' ', "Report Name: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: report.Name })] }));
|
|
14
13
|
};
|
|
@@ -27,14 +26,12 @@ const isValidReportName = (report, api) => {
|
|
|
27
26
|
};
|
|
28
27
|
exports.isValidReportName = isValidReportName;
|
|
29
28
|
const ReportNameWizardSection = (props) => {
|
|
30
|
-
const {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
} })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), ErrorMessage ? (0, jsx_runtime_1.jsx)(ErrorBox_1.default, { children: ErrorMessage }) : null] })] }) }));
|
|
29
|
+
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Name" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the Report" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "export-name", className: "twa:max-w-[300px] twa:w-full", type: "text", autoFocus: true, placeholder: "Enter Name", value: data.Name, onChange: (e) => {
|
|
31
|
+
props.onChange({
|
|
32
|
+
...data,
|
|
33
|
+
Name: e.target.value,
|
|
34
|
+
});
|
|
35
|
+
} }) })] }) }));
|
|
39
36
|
};
|
|
40
37
|
exports.ReportNameWizardSection = ReportNameWizardSection;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReportRowsWizardSection = exports.renderReportRowsSummary = exports.isValidReportRowsQuery = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
|
|
8
7
|
const ExpressionPreview_1 = require("../../../components/ExpressionEditor/ExpressionPreview");
|
|
9
|
-
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
10
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
11
8
|
const Tag_1 = require("../../../components/Tag");
|
|
12
9
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
13
10
|
const Flex_1 = require("../../../components/Flex");
|
|
11
|
+
const Card_1 = require("../../../components/Card");
|
|
12
|
+
const TypeRadio_1 = require("../../Wizard/TypeRadio");
|
|
14
13
|
const isValidReportRowsQuery = (report) => {
|
|
15
14
|
if (report.ReportRowScope === 'ExpressionRows' && !report.Query?.BooleanExpression) {
|
|
16
15
|
return 'Rows query cannot be empty';
|
|
@@ -19,36 +18,34 @@ const isValidReportRowsQuery = (report) => {
|
|
|
19
18
|
};
|
|
20
19
|
exports.isValidReportRowsQuery = isValidReportRowsQuery;
|
|
21
20
|
const renderReportRowsSummary = (report) => {
|
|
22
|
-
const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
23
21
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2", children: [report.ReportRowScope === 'AllRows' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Include ", (0, jsx_runtime_1.jsx)("b", { children: "all Rows" }), " in the Report"] })) : null, report.ReportRowScope === 'VisibleRows' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Include ", (0, jsx_runtime_1.jsx)("b", { children: "only visible Rows" }), " in the Report"] })) : null, report.ReportRowScope === 'ExpressionRows' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Include Rows matching the query:", ' ', (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, jsx_runtime_1.jsx)(ExpressionPreview_1.ExpressionPreview, { query: report.Query }) })] })) : null] }));
|
|
24
22
|
};
|
|
25
23
|
exports.renderReportRowsSummary = renderReportRowsSummary;
|
|
26
24
|
const ReportRowsWizardSection = (props) => {
|
|
27
25
|
const { api, data, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
28
26
|
const initialData = (0, react_1.useMemo)(() => api.internalApi.getQueryPreviewData(), []);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "AllRows", children: (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:m-0", checked: data.ReportRowScope == 'AllRows', tabIndex: -1, children: "All Rows" }) }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "VisibleRows", children: (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:m-0", checked: data.ReportRowScope == 'VisibleRows', tabIndex: -1, children: "Visible Rows" }) }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { value: "ExpressionRows", children: (0, jsx_runtime_1.jsx)(Radio_1.default, { className: "twa:m-0", checked: data.ReportRowScope == 'ExpressionRows', tabIndex: -1, children: "By Query" }) }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "AllRows", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2 twa:text-2", children: "All Rows in the datasource will be included in the report, whether visible or not at time of export." }) }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { value: "VisibleRows", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2 twa:text-2", children: "Only Rows that are visible at the time the Report is exported will be included in the Export" }) }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Content, { value: "ExpressionRows", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2 twa:pl-0 twa:text-2", children: "Only the Rows which match the Query will be exported - whether visible or not." }), (0, jsx_runtime_1.jsx)(ExpressionEditor_1.ExpressionEditor, { allowSaveNamedQuery: true, type: 'boolean', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query?.BooleanExpression ?? '', onChange: (BooleanExpression) => {
|
|
27
|
+
const handleRowScopeChange = (ReportRowScope) => {
|
|
28
|
+
const report = {
|
|
29
|
+
...data,
|
|
30
|
+
ReportRowScope,
|
|
31
|
+
};
|
|
32
|
+
if (report.ReportRowScope !== 'ExpressionRows') {
|
|
33
|
+
delete report.Query;
|
|
34
|
+
}
|
|
35
|
+
else if (!report.Query) {
|
|
36
|
+
report.Query = {
|
|
37
|
+
BooleanExpression: '',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
props.onChange(report);
|
|
41
|
+
};
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Rows" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose which rows to include in the Report" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "All Rows", description: "All rows in the datasource will be included, whether visible or not at time of export", checked: data.ReportRowScope === 'AllRows', onClick: () => handleRowScopeChange('AllRows') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "Visible Rows", description: "Only rows that are visible at the time the Report is exported will be included", checked: data.ReportRowScope === 'VisibleRows', onClick: () => handleRowScopeChange('VisibleRows') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: "By Query", description: "Only rows matching the query will be exported \u2014 whether visible or not", checked: data.ReportRowScope === 'ExpressionRows', onClick: () => handleRowScopeChange('ExpressionRows') })] }) })] }), data.ReportRowScope === 'ExpressionRows' ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Query" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Build a boolean expression to filter which rows are included" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-0", children: (0, jsx_runtime_1.jsx)(ExpressionEditor_1.ExpressionEditor, { allowSaveNamedQuery: true, type: 'boolean', module: moduleInfo.ModuleName, className: "twa:pl-0", value: data.Query?.BooleanExpression ?? '', onChange: (BooleanExpression) => {
|
|
46
43
|
props.onChange({
|
|
47
44
|
...data,
|
|
48
45
|
Query: {
|
|
49
46
|
BooleanExpression,
|
|
50
47
|
},
|
|
51
48
|
});
|
|
52
|
-
}, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })
|
|
49
|
+
}, initialData: initialData, columns: api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api }) })] })) : null] }));
|
|
53
50
|
};
|
|
54
51
|
exports.ReportRowsWizardSection = ReportRowsWizardSection;
|
|
@@ -8,6 +8,8 @@ interface ScheduledReportSettingsProps {
|
|
|
8
8
|
allDestinations: ExportDestinationType[];
|
|
9
9
|
/** When set, the user picks which report this schedule exports (Export popup → New Schedule). */
|
|
10
10
|
allReportNames?: ReportNameType[];
|
|
11
|
+
/** When set, the report is fixed (schedule created from a specific report). */
|
|
12
|
+
fixedReportName?: ReportNameType;
|
|
11
13
|
}
|
|
12
14
|
export declare const ScheduledReportSettings: React.FunctionComponent<ScheduledReportSettingsProps>;
|
|
13
15
|
export {};
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ScheduledReportSettings = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
7
6
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
8
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
9
7
|
const Flex_1 = require("../../../components/Flex");
|
|
10
8
|
const NewSelect_1 = require("../../../components/NewSelect");
|
|
9
|
+
const Card_1 = require("../../../components/Card");
|
|
10
|
+
const Tag_1 = require("../../../components/Tag");
|
|
11
11
|
const ScheduledReportSettings = (props) => {
|
|
12
12
|
const handleNameChange = (event) => {
|
|
13
13
|
props.onChange({
|
|
@@ -27,15 +27,15 @@ const ScheduledReportSettings = (props) => {
|
|
|
27
27
|
label: reportName,
|
|
28
28
|
value: reportName,
|
|
29
29
|
}));
|
|
30
|
-
return ((0, jsx_runtime_1.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", "data-name": "scheduled-report-settings", children: [props.fixedReportName ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Report" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "The report that will be exported on this schedule" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: props.fixedReportName }) })] })) : null, props.allReportNames ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Report" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose which report to export on this schedule" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:max-w-[300px]", "data-name": "select-report", items: reportOptions, value: props.reportSchedule?.ReportName || undefined, placeholder: "Select Report", onValueChange: (value) => props.onChange({
|
|
31
|
+
...props.reportSchedule,
|
|
32
|
+
ReportName: value,
|
|
33
|
+
}) }) })] })) : null, (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Name" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for this scheduled export" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "schedule-name", className: "twa:max-w-[300px] twa:w-full", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.reportSchedule?.Name ?? '' }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Format" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose the export file format" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:max-w-[300px]", "data-name": "select-format", items: formatOptions, value: props.reportSchedule?.ReportFormat, placeholder: "Select Format", onValueChange: (value) => props.onChange({
|
|
34
|
+
...props.reportSchedule,
|
|
35
|
+
ReportFormat: value,
|
|
36
|
+
}) }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Destination" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose where the exported report is sent" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:max-w-[300px]", "data-name": "select-destination", items: destinationOptions, value: props.reportSchedule?.ExportDestination, placeholder: "Select Destination", onValueChange: (value) => props.onChange({
|
|
37
|
+
...props.reportSchedule,
|
|
38
|
+
ExportDestination: value,
|
|
39
|
+
}) }) })] })] }));
|
|
40
40
|
};
|
|
41
41
|
exports.ScheduledReportSettings = ScheduledReportSettings;
|
|
@@ -8,7 +8,6 @@ const react_redux_1 = require("react-redux");
|
|
|
8
8
|
const ExportRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ExportRedux"));
|
|
9
9
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
10
10
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
11
|
-
const Tag_1 = require("../../../components/Tag");
|
|
12
11
|
const ScheduleScheduleWizard_1 = require("../../Schedule/Wizard/ScheduleScheduleWizard");
|
|
13
12
|
const ScheduleScheduleSummary_1 = require("../../Schedule/Wizard/ScheduleScheduleSummary");
|
|
14
13
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
@@ -50,7 +49,7 @@ const ScheduledReportWizard = (props) => {
|
|
|
50
49
|
title: 'Settings',
|
|
51
50
|
isValid: (data, api) => (0, isReportScheduledSettingsValid_1.isReportScheduleSettingsValid)(data, api),
|
|
52
51
|
renderSummary: () => (0, jsx_runtime_1.jsx)(ScheduledReportSettingsSummary_1.ScheduledReportSettingsSummary, {}),
|
|
53
|
-
render: () => ((0, jsx_runtime_1.jsx)(
|
|
52
|
+
render: () => ((0, jsx_runtime_1.jsx)(ScheduledReportSettingsSection, { onChange: setReportSchedule, reportName: reportName })),
|
|
54
53
|
},
|
|
55
54
|
{
|
|
56
55
|
title: 'Schedule',
|
|
@@ -81,5 +80,5 @@ const ScheduledReportSettingsSection = (props) => {
|
|
|
81
80
|
const allReportNames = fixedReportName
|
|
82
81
|
? undefined
|
|
83
82
|
: api.exportApi.internalApi.getAllAvailableReportNames();
|
|
84
|
-
return ((0, jsx_runtime_1.
|
|
83
|
+
return ((0, jsx_runtime_1.jsx)(ScheduledReportSettings_1.ScheduledReportSettings, { reportSchedule: data, onChange: props.onChange, allFormats: allFormats ?? [], allDestinations: allDestinations ?? [], allReportNames: allReportNames, fixedReportName: fixedReportName }));
|
|
85
84
|
};
|
|
@@ -5,6 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
6
6
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
7
7
|
const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
|
|
8
|
+
const Flex_1 = require("../../../components/Flex");
|
|
9
|
+
const Card_1 = require("../../../components/Card");
|
|
8
10
|
const renderFlashingAlertRulesSummary = (flashingAlert) => {
|
|
9
11
|
const { api: { flashingCellApi }, } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
10
12
|
const FlashTarget = flashingAlert.FlashTarget ?? flashingCellApi.getFlashingCellFlashTarget(flashingAlert);
|
|
@@ -18,11 +20,11 @@ exports.renderFlashingAlertRulesSummary = renderFlashingAlertRulesSummary;
|
|
|
18
20
|
const FlashingAlertRulesWizardSection = (props) => {
|
|
19
21
|
const { data, api, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
20
22
|
const predicateDefs = api.flashingCellApi.getFlashingCellPredicateDefsForScope(data.Scope);
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "AnyChange", data: data, predicateDefs: predicateDefs, getPredicateDefsForColId: (colId) => api.flashingCellApi.getFlashingCellPredicateDefsForScope({ ColumnIds: [colId] }), onChange: props.onChange, showAggregation: false, showObservable: false, showBoolean: true, showPredicate: true, descriptions: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full twa:gap-3 twa:p-3", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Rule" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Build the rule that determines when cells should flash on a data change" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-0", children: (0, jsx_runtime_1.jsx)(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "AnyChange", data: data, predicateDefs: predicateDefs, getPredicateDefsForColId: (colId) => api.flashingCellApi.getFlashingCellPredicateDefsForScope({ ColumnIds: [colId] }), onChange: props.onChange, showAggregation: false, showObservable: false, showBoolean: true, showPredicate: true, descriptions: {
|
|
24
|
+
selectPredicate: 'Select a Flashing Cell Rule - to be applied when data changes',
|
|
25
|
+
useBooleanQuery: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Use an BooleanQuery if ", (0, jsx_runtime_1.jsx)("i", { children: "Scope" }), " is 'All Columns' - so any data change may be evaluated in a complex BooleanExpression"] })),
|
|
26
|
+
useObservableQuery: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Use an ObservableQuery if ", (0, jsx_runtime_1.jsx)("i", { children: "Scope" }), " is 'All Columns' - so any data change may be evaluated in a complex ObservableExpression"] })),
|
|
27
|
+
useAggregationQuery: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Use an AggregatedBooleanQuery if ", (0, jsx_runtime_1.jsx)("i", { children: "Scope" }), " is 'All Columns' - so any data change may be evaluated in a complex AggregatedBooleanExpression"] })),
|
|
28
|
+
} }) })] }) }));
|
|
27
29
|
};
|
|
28
30
|
exports.FlashingAlertRulesWizardSection = FlashingAlertRulesWizardSection;
|
|
@@ -13,25 +13,24 @@ const FlashingAlertScopeWizardSection = (props) => {
|
|
|
13
13
|
const availableColumns = React.useMemo(() => api.columnApi
|
|
14
14
|
.getUIAvailableColumns()
|
|
15
15
|
.filter((column) => !column.isActionColumn && !api.columnApi.isFdc3Column(column.columnId)), [api]);
|
|
16
|
-
return ((0, jsx_runtime_1.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} }) }));
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:mb-2 twa:border-b-foreground/20", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium", children: "Columns" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:max-w-[520px]", children: "Specify which data changes should trigger cell flashing" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto twa:p-2", children: (0, jsx_runtime_1.jsx)(NewScopeComponent_1.NewScopeComponent, { descriptions: {
|
|
17
|
+
rowScope: 'Changes anywhere in the row will trigger a Flashing Cell',
|
|
18
|
+
columnScope: 'Changes in selected columns will trigger a Flashing Cell',
|
|
19
|
+
dataTypeScope: 'Changes in columns with these Data Types will trigger a Flashing Cell',
|
|
20
|
+
}, scopeColumns: availableColumns, scope: data.Scope, updateScope: (Scope) => {
|
|
21
|
+
const newData = { ...data, Scope };
|
|
22
|
+
if (newData.Rule.Predicates) {
|
|
23
|
+
const validPredicateIds = new Set(api.flashingCellApi.getFlashingCellPredicateDefsForScope(Scope).map((def) => def.id));
|
|
24
|
+
newData.Rule = {
|
|
25
|
+
Predicates: newData.Rule.Predicates.filter((p) => validPredicateIds.has(p.PredicateId)).filter((predicate) => {
|
|
26
|
+
if ((0, ColumnScope_1.isScopeColumnIds)(Scope) && Scope.ColumnIds.length > 1) {
|
|
27
|
+
return predicate.PredicateId !== 'In' && predicate.PredicateId !== 'NotIn';
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
props.onChange(newData);
|
|
34
|
+
} }) })] }));
|
|
36
35
|
};
|
|
37
36
|
exports.FlashingAlertScopeWizardSection = FlashingAlertScopeWizardSection;
|
|
@@ -7,14 +7,14 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
9
9
|
const usePrevious_1 = tslib_1.__importDefault(require("../../../components/utils/usePrevious"));
|
|
10
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
11
10
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
12
11
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
13
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
14
12
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
15
13
|
const Flex_1 = require("../../../components/Flex");
|
|
16
14
|
const Tag_1 = require("../../../components/Tag");
|
|
17
15
|
const OnePageAdaptableWizard_2 = require("../../Wizard/OnePageAdaptableWizard");
|
|
16
|
+
const Card_1 = require("../../../components/Card");
|
|
17
|
+
const TypeRadio_1 = require("../../Wizard/TypeRadio");
|
|
18
18
|
const isSettingsValid = (data, api) => {
|
|
19
19
|
if (!data.Name?.trim()) {
|
|
20
20
|
return 'Name is required';
|
|
@@ -27,8 +27,17 @@ const isSettingsValid = (data, api) => {
|
|
|
27
27
|
return true;
|
|
28
28
|
};
|
|
29
29
|
exports.isSettingsValid = isSettingsValid;
|
|
30
|
+
const formatFlashTarget = (flashTarget) => {
|
|
31
|
+
if (!flashTarget) {
|
|
32
|
+
return 'Not specified';
|
|
33
|
+
}
|
|
34
|
+
if (typeof flashTarget === 'string') {
|
|
35
|
+
return flashTarget;
|
|
36
|
+
}
|
|
37
|
+
return flashTarget.join(', ');
|
|
38
|
+
};
|
|
30
39
|
const renderFlashingAlertSettingsSummary = (flashingAlert) => {
|
|
31
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_2.SummaryText, { children: ["Name ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: flashingAlert.Name || 'Not specified' })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: flashingAlert.FlashDuration === 'always' ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Flashing is never removed" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Flashing is removed after ", (0, jsx_runtime_1.jsx)(CodeBlock_1.CodeBlock, { children: flashingAlert.FlashDuration }), ' ', "milliseconds"] })) })] }));
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_2.SummaryText, { children: ["Name ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: flashingAlert.Name || 'Not specified' })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: flashingAlert.FlashDuration === 'always' ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Flashing is never removed" })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Flashing is removed after ", (0, jsx_runtime_1.jsx)(CodeBlock_1.CodeBlock, { children: flashingAlert.FlashDuration }), ' ', "milliseconds"] })) }), (0, jsx_runtime_1.jsxs)(OnePageAdaptableWizard_2.SummaryText, { children: ["Flash Target ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: formatFlashTarget(flashingAlert.FlashTarget) })] })] }));
|
|
32
41
|
};
|
|
33
42
|
exports.renderFlashingAlertSettingsSummary = renderFlashingAlertSettingsSummary;
|
|
34
43
|
const FlashingAlertSettingsWizardSection = (props) => {
|
|
@@ -52,7 +61,7 @@ const FlashingAlertSettingsWizardSection = (props) => {
|
|
|
52
61
|
inputRef.current?.focus();
|
|
53
62
|
}
|
|
54
63
|
}, [duration, oldDuration]);
|
|
55
|
-
const
|
|
64
|
+
const handleDurationTypeChange = (type) => {
|
|
56
65
|
setDuration(type === 'number' ? numberDuration.current : 'always');
|
|
57
66
|
};
|
|
58
67
|
const handleTargetChange = (type, checked) => {
|
|
@@ -73,12 +82,12 @@ const FlashingAlertSettingsWizardSection = (props) => {
|
|
|
73
82
|
FlashTarget,
|
|
74
83
|
});
|
|
75
84
|
};
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
const isTargetChecked = (type) => flashingCell?.FlashTarget === type || flashingCell?.FlashTarget?.includes?.(type);
|
|
86
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": "flashing-cell-settings", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Name" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the Flashing Cell rule" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "flashing-cell-name", className: "twa:max-w-[300px] twa:w-full", onChange: handleNameChange, placeholder: "Enter Name", value: flashingCell.Name ?? '' }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Flash Duration" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose how long the flash style remains visible after a change" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3", children: [(0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { "data-name": "duration-always", text: "Always", description: "The flash style is never removed automatically", checked: duration === 'always', onClick: () => handleDurationTypeChange('always') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { "data-name": "duration-timed", text: "Timed", description: "The flash style is removed after a set number of milliseconds", checked: duration !== 'always', onClick: () => handleDurationTypeChange('number') }), duration !== 'always' ? ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-6", children: [(0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "duration-input", readOnly: props.readOnly, type: "number", name: "value", ref: inputRef, className: "twa:w-24 twa:mr-2", value: duration, onChange: (event) => {
|
|
87
|
+
const value = event.target.value;
|
|
88
|
+
const parsed = Number(value);
|
|
89
|
+
numberDuration.current = isNaN(parsed) ? 500 : parsed;
|
|
90
|
+
setDuration(numberDuration.current);
|
|
91
|
+
} }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: "ms" })] })) : null] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Flash Target" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose which parts of the grid flash when a change occurs" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "flashing-target", onChange: (checked) => handleTargetChange('cell', checked), checked: isTargetChecked('cell'), children: "Cell" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "flashing-target-row", onChange: (checked) => handleTargetChange('row', checked), checked: isTargetChecked('row'), children: "Row" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "flashing-target-aggFuncCell", onChange: (checked) => handleTargetChange('aggFuncCell', checked), checked: isTargetChecked('aggFuncCell'), children: "Aggregated Function Cell" })] }) })] })] }) }));
|
|
83
92
|
};
|
|
84
93
|
exports.FlashingAlertSettingsWizardSection = FlashingAlertSettingsWizardSection;
|
|
@@ -3,15 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.renderFlashingAlertStyleSummary = exports.FlashingCellStyle = exports.FlashingAlertStyleWizardSection = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
6
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
7
6
|
const StyleComponent_1 = require("../../Components/StyleComponent");
|
|
8
7
|
const StylePreview_1 = require("../../../components/StylePreview");
|
|
9
8
|
const Flex_1 = require("../../../components/Flex");
|
|
10
|
-
const
|
|
9
|
+
const Card_1 = require("../../../components/Card");
|
|
10
|
+
const FLASH_STYLE_CARDS = [
|
|
11
|
+
{
|
|
12
|
+
key: 'UpChangeStyle',
|
|
13
|
+
title: 'Up Change Style',
|
|
14
|
+
description: 'Style applied when a cell value increases',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
key: 'DownChangeStyle',
|
|
18
|
+
title: 'Down Change Style',
|
|
19
|
+
description: 'Style applied when a cell value decreases',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
key: 'NeutralChangeStyle',
|
|
23
|
+
title: 'Neutral Change Style',
|
|
24
|
+
description: 'Style applied when a cell value changes but not up or down (e.g. text edits)',
|
|
25
|
+
},
|
|
26
|
+
];
|
|
11
27
|
const FlashingAlertStyleWizardSection = (props) => {
|
|
12
28
|
let { data: flashingAlert, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
13
29
|
flashingAlert = flashingAlert ?? props.flashingAlert;
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: FLASH_STYLE_CARDS.map(({ key, title, description }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: title }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: description })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(StyleComponent_1.StyleComponent, { headless: true, api: api, Style: flashingAlert[key] ?? {}, UpdateStyle: (style) => props.onStyleChange(key, style) }) })] }, key))) }));
|
|
15
31
|
};
|
|
16
32
|
exports.FlashingAlertStyleWizardSection = FlashingAlertStyleWizardSection;
|
|
17
33
|
const FlashingCellStyle = (props) => {
|