@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
|
@@ -3,15 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AlertTypeWizardSection = exports.renderAlertTypeSummary = exports.isSettingsValid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
7
6
|
const getAlertType_1 = require("../Utilities/getAlertType");
|
|
8
7
|
const TypeRadio_1 = require("../../Wizard/TypeRadio");
|
|
9
8
|
const Tag_1 = require("../../../components/Tag");
|
|
10
9
|
const Flex_1 = require("../../../components/Flex");
|
|
11
10
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
12
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
13
11
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
14
12
|
const OnePageAdaptableWizard_2 = require("../../Wizard/OnePageAdaptableWizard");
|
|
13
|
+
const Card_1 = require("../../../components/Card");
|
|
15
14
|
const isSettingsValid = (data, api) => {
|
|
16
15
|
if (!data.Name?.trim()) {
|
|
17
16
|
return 'Name is required';
|
|
@@ -38,6 +37,6 @@ const AlertTypeWizardSection = (props) => {
|
|
|
38
37
|
Name: event.target.value,
|
|
39
38
|
});
|
|
40
39
|
};
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsxs)(
|
|
40
|
+
return ((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 Alert" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "alert-name", className: "twa:max-w-[300px] twa:w-full", onChange: handleNameChange, placeholder: "Enter Name", value: data.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: "Alert 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 when the Alert should fire" })] }), (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: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === getAlertType_1.AlertType.DataChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.DataChange) }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === getAlertType_1.AlertType.RowChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.RowChange) }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Aggregation), checked: props.alertType === getAlertType_1.AlertType.Aggregation }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Observable), checked: props.alertType === getAlertType_1.AlertType.Observable }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === getAlertType_1.AlertType.Validation, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Validation) }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Scheduled), description: "A reminder fires at a date and time you choose", checked: props.alertType === getAlertType_1.AlertType.Scheduled, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Scheduled) })] }) })] })] }));
|
|
42
41
|
};
|
|
43
42
|
exports.AlertTypeWizardSection = AlertTypeWizardSection;
|
|
@@ -5,13 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
9
8
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
10
9
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
11
|
-
const ErrorBox_1 = tslib_1.__importDefault(require("../../../components/ErrorBox"));
|
|
12
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
13
10
|
const Tag_1 = require("../../../components/Tag");
|
|
14
11
|
const Flex_1 = require("../../../components/Flex");
|
|
12
|
+
const Card_1 = require("../../../components/Card");
|
|
15
13
|
const renderCalculatedColumnDefinitionSummary = (data) => {
|
|
16
14
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2 twa:grid twa:items-center twa:grid-cols-[auto_1fr] twa:gap-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Column Identifier:" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.ColumnId }) }), data.FriendlyName ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Column Name:" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: data.FriendlyName ?? data.ColumnId }) })] })) : null] }));
|
|
17
15
|
};
|
|
@@ -27,7 +25,7 @@ const isValidCalculatedColumnDefinition = (data, api) => {
|
|
|
27
25
|
};
|
|
28
26
|
exports.isValidCalculatedColumnDefinition = isValidCalculatedColumnDefinition;
|
|
29
27
|
const CalculatedColumnDefinitionWizardSection = (props) => {
|
|
30
|
-
const { data
|
|
28
|
+
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
31
29
|
const handleColumnIdChange = (event) => {
|
|
32
30
|
let e = event.target;
|
|
33
31
|
props.onChange({
|
|
@@ -43,8 +41,6 @@ const CalculatedColumnDefinitionWizardSection = (props) => {
|
|
|
43
41
|
});
|
|
44
42
|
};
|
|
45
43
|
const inEdit = props.isEdit;
|
|
46
|
-
const validCheck = (0, exports.isValidCalculatedColumnDefinition)(data, api);
|
|
47
|
-
const ErrorMessage = validCheck === true ? null : validCheck;
|
|
48
44
|
const [ColumnNameFocused, setColumnNameFocused] = (0, react_1.useState)(false);
|
|
49
45
|
const ColumnName = data.FriendlyName;
|
|
50
46
|
const ColumnId = data.ColumnId;
|
|
@@ -58,12 +54,12 @@ const CalculatedColumnDefinitionWizardSection = (props) => {
|
|
|
58
54
|
},
|
|
59
55
|
});
|
|
60
56
|
};
|
|
61
|
-
return ((0, jsx_runtime_1.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": 'calculated-column-definition', 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: "Column Name" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Unique identifier for the Calculated Column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "column-id", value: data.ColumnId || '', className: "twa:max-w-[500px] twa:w-full", autoFocus: !inEdit, disabled: inEdit, type: "text", placeholder: "Enter a Column Name", onChange: handleColumnIdChange }) })] }), (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: "Column Header" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Display name shown in the Column Header (Name used if not provided)" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "column-name", autoFocus: inEdit, onFocus: () => {
|
|
58
|
+
setColumnNameFocused(true);
|
|
59
|
+
}, onBlur: () => {
|
|
60
|
+
setColumnNameFocused(false);
|
|
61
|
+
}, value: ColumnNameFocused ? ColumnName || '' : ColumnName || ColumnId || '', className: "twa:max-w-[500px] twa:w-full", type: "text", placeholder: "Enter a Column Header (optional)", onChange: handleColumnNameChange }) })] }), (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: "Column Header Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional text shown when hovering over the Column Header" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "header-tooltip", type: "text", className: "twa:max-w-[500px] twa:w-full", value: HeaderToolTip, onChange: (e) => handleSpecialColumnSettingsChange({
|
|
62
|
+
HeaderToolTip: e.target.value,
|
|
63
|
+
}) }) })] }), (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: "Cell Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Show the Expression as a tooltip when hovering over each cell" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip, children: "Show Expression as Cell Tooltip" }) })] })] }) }));
|
|
68
64
|
};
|
|
69
65
|
exports.CalculatedColumnDefinitionWizardSection = CalculatedColumnDefinitionWizardSection;
|
|
@@ -5,10 +5,24 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
7
7
|
const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
|
|
8
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
9
8
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
10
9
|
const StringExtensions_1 = require("../../../Utilities/Extensions/StringExtensions");
|
|
11
10
|
const Flex_1 = require("../../../components/Flex");
|
|
11
|
+
const Card_1 = require("../../../components/Card");
|
|
12
|
+
const getExpressionTypeDescription = (expressionType) => {
|
|
13
|
+
switch (expressionType) {
|
|
14
|
+
case 'ScalarExpression':
|
|
15
|
+
return 'Define an expression using values from other cells in each row';
|
|
16
|
+
case 'AggregatedScalarExpression':
|
|
17
|
+
return 'Define an expression using aggregated values from other rows';
|
|
18
|
+
case 'CumulativeAggregatedExpression':
|
|
19
|
+
return 'Define a cumulative expression using values from other rows';
|
|
20
|
+
case 'QuantileAggregatedExpression':
|
|
21
|
+
return 'Define a quantile expression using values from other rows';
|
|
22
|
+
default:
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
};
|
|
12
26
|
const renderCalculatedColumnExpressionSummary = (data) => {
|
|
13
27
|
const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
14
28
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-2", children: ["Column scalar expression:", ' ', (0, jsx_runtime_1.jsx)(CodeBlock_1.CodeBlock, { children: api.internalApi.getAdaptableQueryExpressionText(data.Query) })] }));
|
|
@@ -39,8 +53,6 @@ const CalculatedColumnExpressionWizardSection = (props) => {
|
|
|
39
53
|
CalculatedColumnSettings: {
|
|
40
54
|
...data.CalculatedColumnSettings,
|
|
41
55
|
DataType: dataType,
|
|
42
|
-
// Pivotable,
|
|
43
|
-
// Aggregatable,
|
|
44
56
|
},
|
|
45
57
|
});
|
|
46
58
|
};
|
|
@@ -55,17 +67,18 @@ const CalculatedColumnExpressionWizardSection = (props) => {
|
|
|
55
67
|
}
|
|
56
68
|
};
|
|
57
69
|
const columns = api.columnApi.internalApi.getQueryableColumnsForUIEditor();
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
const expressionEditor = (() => {
|
|
71
|
+
switch (props.expressionType) {
|
|
72
|
+
case 'ScalarExpression':
|
|
73
|
+
return ((0, jsx_runtime_1.jsx)(ExpressionEditor_1.ExpressionEditor, { type: 'scalar', module: moduleInfo.ModuleName, className: "twa:pl-0", value: data.Query.ScalarExpression, onChange: (ScalarExpression) => setCalculatedColumnExpression({ ScalarExpression }), initialData: initialData, columns: columns, fields: api.expressionApi.internalApi.getAvailableFields(), namedQueries: api.namedQueryApi.getNamedQueries(), isFullExpression: true, api: api }));
|
|
74
|
+
case 'AggregatedScalarExpression':
|
|
75
|
+
case 'CumulativeAggregatedExpression':
|
|
76
|
+
case 'QuantileAggregatedExpression':
|
|
77
|
+
return ((0, jsx_runtime_1.jsx)(ExpressionEditor_1.ExpressionEditor, { type: getEditorType(props.expressionType), module: moduleInfo.ModuleName, className: "twa:pl-0", value: data.Query.AggregatedScalarExpression, onChange: (AggregatedScalarExpression) => setCalculatedColumnExpression({ AggregatedScalarExpression }), initialData: initialData, columns: columns, namedQueries: api.namedQueryApi.getNamedQueries(), isFullExpression: true, api: api }));
|
|
78
|
+
default:
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
})();
|
|
82
|
+
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: (0, StringExtensions_1.Humanize)(props.expressionType) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: getExpressionTypeDescription(props.expressionType) })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-0", children: expressionEditor })] }) }));
|
|
70
83
|
};
|
|
71
84
|
exports.CalculatedColumnExpressionWizardSection = CalculatedColumnExpressionWizardSection;
|
|
@@ -6,15 +6,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
10
9
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
11
|
-
const ErrorBox_1 = tslib_1.__importDefault(require("../../../components/ErrorBox"));
|
|
12
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
13
10
|
const SpecialColumnSettingsWizardStep_1 = require("../../SpecialColumnSettingsWizardStep");
|
|
14
11
|
const getCalculatedColumnSettingsTags_1 = require("../Utilities/getCalculatedColumnSettingsTags");
|
|
15
12
|
const Flex_1 = require("../../../components/Flex");
|
|
16
13
|
const Tag_1 = require("../../../components/Tag/Tag");
|
|
17
14
|
const NewSelect_1 = require("../../../components/NewSelect");
|
|
15
|
+
const Card_1 = require("../../../components/Card");
|
|
18
16
|
const renderCalculatedColumnSettingsSummary = (data) => {
|
|
19
17
|
const options = (0, getCalculatedColumnSettingsTags_1.getCalculatedColumnSettingsTags)(data.CalculatedColumnSettings);
|
|
20
18
|
return (0, jsx_runtime_1.jsx)(Tag_1.TagList, { tags: options });
|
|
@@ -22,7 +20,7 @@ const renderCalculatedColumnSettingsSummary = (data) => {
|
|
|
22
20
|
exports.renderCalculatedColumnSettingsSummary = renderCalculatedColumnSettingsSummary;
|
|
23
21
|
const isValidCalculatedColumnSettings = (data) => {
|
|
24
22
|
if (!data.CalculatedColumnSettings?.DataType) {
|
|
25
|
-
return '
|
|
23
|
+
return 'Please select a data type (could not be inferred from the expression)';
|
|
26
24
|
}
|
|
27
25
|
return true;
|
|
28
26
|
};
|
|
@@ -70,10 +68,10 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
70
68
|
{ value: 'boolean', label: 'Boolean' },
|
|
71
69
|
{ value: 'numberArray', label: 'NumberArray' },
|
|
72
70
|
];
|
|
73
|
-
return ((0, jsx_runtime_1.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": 'calculated-column-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: "Data 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 the data type for the Calculated Column values" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { className: "twa:p-1 twa:gap-1", children: [(0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { "data-name": "column-type", placeholder: "Select Data Type", items: options, value: dataType, onValueChange: (value) => handleDataTypeChange(value), className: "twa:max-w-[300px]" }), ErrorMessage ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:text-error", children: ErrorMessage })) : 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: "Width" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional Column Width in pixels" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "column-width", type: "number", className: "twa:max-w-[300px]", value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
|
|
72
|
+
Width: Number(e.target.value),
|
|
73
|
+
}) }) })] }), (0, jsx_runtime_1.jsx)(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false,
|
|
74
|
+
// @ts-ignore CalculatedColumn has a broader DataType
|
|
75
|
+
settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })] }) }));
|
|
78
76
|
};
|
|
79
77
|
exports.CalculatedColumnSettingsWizardSection = CalculatedColumnSettingsWizardSection;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculatedColumnTypeWizardSection = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
6
5
|
const TypeRadio_1 = require("../../Wizard/TypeRadio");
|
|
7
6
|
const Flex_1 = require("../../../components/Flex");
|
|
7
|
+
const Card_1 = require("../../../components/Card");
|
|
8
8
|
const CalculatedColumnTypeWizardSection = (props) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
9
|
+
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.jsx)(Card_1.Card.Title, { children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Calculated Column Type" }) }), (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: 'Standard', description: "The calculated value is derived from other cells in the row", checked: props.type === 'ScalarExpression', onClick: () => props.onTypeChange('ScalarExpression') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: 'Aggregated', description: "The calculated value is derived from other rows", checked: props.type === 'AggregatedScalarExpression', onClick: () => props.onTypeChange('AggregatedScalarExpression') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: 'Cumulative', description: "The calculated value is derived cumulatively from other rows", checked: props.type === 'CumulativeAggregatedExpression', onClick: () => props.onTypeChange('CumulativeAggregatedExpression') }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { text: 'Quantile', description: "The calculated value is derived from other rows using quantile aggregations", checked: props.type === 'QuantileAggregatedExpression', onClick: () => props.onTypeChange('QuantileAggregatedExpression') })] }) })] }) }));
|
|
10
10
|
};
|
|
11
11
|
exports.CalculatedColumnTypeWizardSection = CalculatedColumnTypeWizardSection;
|
|
@@ -59,7 +59,7 @@ class CellSummaryViewPanelComponent extends React.Component {
|
|
|
59
59
|
'twa:flex-1 twa:flex-wrap': !isToolbar,
|
|
60
60
|
}), children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:flex-1", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { ariaLabel: "Cell Summary Operation Selector", className: `ab-${elementType}__CellSummary__select twa:w-full`, disabled: shouldDisable, items: [...operationMenuItems, ...operationDefinitions], onValueChange: (x) => this.props.onCellSummaryOperationChange(x), value: this.props.CellSummaryOperation }) }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:items-center twa:gap-1", children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: (0, clsx_1.default)(`ab-${elementType}__CellSummary__value twa:min-w-[50px]`, {
|
|
61
61
|
'twa:rounded-standard twa:text-color-text-on-info twa:bg-color-info twa:text-2': !isToolbar,
|
|
62
|
-
'twa:flex-1 twa:text-
|
|
62
|
+
'twa:flex-1 twa:text-primary-foreground twa:justify-center': isToolbar,
|
|
63
63
|
}), children: operationValue }), (0, jsx_runtime_1.jsx)(AdaptablePopover_1.AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur", tooltipText: 'Show Cell Summaries', disabled: !this.props.CellSummary?.Count })] }) })] }));
|
|
64
64
|
}
|
|
65
65
|
checkSelectedCells() {
|
|
@@ -6,7 +6,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
9
|
-
const PreviewChartSection_1 = require("./PreviewChartSection");
|
|
10
9
|
const SettingsSection_1 = require("./SettingsSection");
|
|
11
10
|
const ObjectTagsWizardSection_1 = require("../../../Wizard/ObjectTagsWizardSection");
|
|
12
11
|
const Flex_1 = require("../../../../components/Flex");
|
|
@@ -21,10 +20,10 @@ const AgChargingWizard = (props) => {
|
|
|
21
20
|
}, [chartDefinition]);
|
|
22
21
|
return ((0, jsx_runtime_1.jsx)(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: chartDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
23
22
|
{
|
|
24
|
-
title: '
|
|
25
|
-
details: '
|
|
23
|
+
title: 'Chart',
|
|
24
|
+
details: 'Configure chart properties and preview the result',
|
|
26
25
|
isValid: SettingsSection_1.isSettingsValid,
|
|
27
|
-
render: () => ((0, jsx_runtime_1.jsx)(
|
|
26
|
+
render: () => ((0, jsx_runtime_1.jsx)(SettingsSection_1.SettingsSection, { chartDefinition: chartDefinition, onChange: setChartDefinition })),
|
|
28
27
|
},
|
|
29
28
|
{
|
|
30
29
|
details: 'Select Chart Tags',
|
|
@@ -33,12 +32,6 @@ const AgChargingWizard = (props) => {
|
|
|
33
32
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setChartDefinition }) })),
|
|
34
33
|
renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
|
|
35
34
|
},
|
|
36
|
-
'-',
|
|
37
|
-
{
|
|
38
|
-
title: 'Preview Chart',
|
|
39
|
-
details: 'Chart Preview',
|
|
40
|
-
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(PreviewChartSection_1.PreviewChartSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }) })),
|
|
41
|
-
},
|
|
42
35
|
] }));
|
|
43
36
|
};
|
|
44
37
|
exports.AgChargingWizard = AgChargingWizard;
|
|
@@ -33,6 +33,6 @@ const PreviewChartSection = (props) => {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
}, [currentChartModels]);
|
|
36
|
-
return (0, jsx_runtime_1.jsx)("div", { ref: divRef });
|
|
36
|
+
return (0, jsx_runtime_1.jsx)("div", { ref: divRef, className: "twa:min-h-[280px] twa:h-full twa:w-full" });
|
|
37
37
|
};
|
|
38
38
|
exports.PreviewChartSection = PreviewChartSection;
|
|
@@ -3,57 +3,48 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SettingsSection = exports.isSettingsValid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
6
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
8
7
|
const NewSelect_1 = require("../../../../components/NewSelect");
|
|
9
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
10
8
|
const chartingHelper_1 = require("../../../../Utilities/Helpers/chartingHelper");
|
|
11
|
-
const
|
|
9
|
+
const Flex_1 = require("../../../../components/Flex");
|
|
10
|
+
const Card_1 = require("../../../../components/Card");
|
|
11
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
12
|
+
const PreviewChartSection_1 = require("./PreviewChartSection");
|
|
12
13
|
const isSettingsValid = (chartDefinition, api) => {
|
|
13
14
|
return (0, chartingHelper_1.validateChartName)(api, chartDefinition.Name, chartDefinition.Uuid);
|
|
14
15
|
};
|
|
15
16
|
exports.isSettingsValid = isSettingsValid;
|
|
17
|
+
const AGG_FUNCS = ['sum', 'min', 'max', 'count', 'avg', 'first', 'last'];
|
|
16
18
|
const SettingsSection = (props) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Model: props.chartDefinition.Model,
|
|
22
|
-
});
|
|
23
|
-
}, [props.chartDefinition]);
|
|
24
|
-
const handleUnLinkChange = React.useCallback(() => {
|
|
25
|
-
props.onChange({
|
|
26
|
-
...props.chartDefinition,
|
|
27
|
-
Model: {
|
|
28
|
-
...props.chartDefinition.Model,
|
|
29
|
-
unlinkChart: !props.chartDefinition.Model.unlinkChart,
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
}, [props.chartDefinition]);
|
|
33
|
-
const handleSuppressChartRanges = React.useCallback(() => {
|
|
34
|
-
props.onChange({
|
|
35
|
-
...props.chartDefinition,
|
|
36
|
-
Model: {
|
|
37
|
-
...props.chartDefinition.Model,
|
|
38
|
-
suppressChartRanges: !props.chartDefinition.Model.suppressChartRanges,
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
}, [props.chartDefinition]);
|
|
42
|
-
const aggFuncs = ['sum', 'min', 'max', 'count', 'avg', 'first', 'last'];
|
|
43
|
-
const aggFunc = props.chartDefinition.Model.aggFunc;
|
|
44
|
-
const handleAggFuncChange = React.useCallback((value) => {
|
|
45
|
-
props.onChange({
|
|
46
|
-
...props.chartDefinition,
|
|
47
|
-
Model: {
|
|
48
|
-
...props.chartDefinition.Model,
|
|
49
|
-
aggFunc: value,
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
}, [props.chartDefinition]);
|
|
53
|
-
const aggFuncsOptions = aggFuncs.map((option) => ({
|
|
19
|
+
const { chartDefinition, onChange } = props;
|
|
20
|
+
const aggFunc = chartDefinition.Model.aggFunc;
|
|
21
|
+
const showAggFunc = chartDefinition.Model.modelType === 'range' && typeof aggFunc !== 'function';
|
|
22
|
+
const aggFuncsOptions = AGG_FUNCS.map((option) => ({
|
|
54
23
|
label: option,
|
|
55
24
|
value: option,
|
|
56
25
|
}));
|
|
57
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3 twa:h-full twa:min-h-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: "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 chart" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "chart-name", className: "twa:max-w-[300px] twa:w-full", onChange: (event) => onChange({
|
|
27
|
+
...chartDefinition,
|
|
28
|
+
Name: event.target.value,
|
|
29
|
+
Model: chartDefinition.Model,
|
|
30
|
+
}), value: chartDefinition.Name ?? '', placeholder: "Enter chart 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: "Unlink Chart" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "When enabled, the chart is not linked to the grid data range" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "unlink-chart", checked: chartDefinition.Model.unlinkChart, onChange: (checked) => onChange({
|
|
31
|
+
...chartDefinition,
|
|
32
|
+
Model: {
|
|
33
|
+
...chartDefinition.Model,
|
|
34
|
+
unlinkChart: checked,
|
|
35
|
+
},
|
|
36
|
+
}), children: "Unlink from data" }) })] }), (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: "Suppress Chart Ranges" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Hide chart range highlights on the grid while the chart is open" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppress-chart-ranges", checked: chartDefinition.Model.suppressChartRanges, onChange: (checked) => onChange({
|
|
37
|
+
...chartDefinition,
|
|
38
|
+
Model: {
|
|
39
|
+
...chartDefinition.Model,
|
|
40
|
+
suppressChartRanges: checked,
|
|
41
|
+
},
|
|
42
|
+
}), children: "Suppress chart ranges" }) })] }), showAggFunc ? ((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: "Aggregation" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Aggregation function used for range charts" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { "data-name": "chart-agg-func", placeholder: "Select", className: "twa:max-w-[300px]", items: aggFuncsOptions, value: aggFunc || undefined, onValueChange: (value) => onChange({
|
|
43
|
+
...chartDefinition,
|
|
44
|
+
Model: {
|
|
45
|
+
...chartDefinition.Model,
|
|
46
|
+
aggFunc: value,
|
|
47
|
+
},
|
|
48
|
+
}) }) })] })) : null, (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: "Live preview of the chart \u2014 changes here are reflected in the chart model" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-[280px]", children: (0, jsx_runtime_1.jsx)(PreviewChartSection_1.PreviewChartSection, { chartDefinition: chartDefinition, onChange: onChange }) })] })] }));
|
|
58
49
|
};
|
|
59
50
|
exports.SettingsSection = SettingsSection;
|
|
@@ -7,25 +7,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
7
7
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
9
9
|
const SettingsSection_1 = require("./SettingsSection");
|
|
10
|
-
const Flex_1 = require("../../../../components/Flex");
|
|
11
|
-
const PreviewChartSection = ({ chartDefinition }) => {
|
|
12
|
-
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
13
|
-
const divRef = React.useRef(null);
|
|
14
|
-
React.useEffect(() => {
|
|
15
|
-
if (!divRef.current) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const container = {
|
|
19
|
-
name: 'Preview Chart',
|
|
20
|
-
element: divRef.current,
|
|
21
|
-
};
|
|
22
|
-
const transientChartDefinition = adaptable.api.chartingApi.internalApi.onPreviewExternalChart(chartDefinition, container);
|
|
23
|
-
return () => {
|
|
24
|
-
adaptable.api.chartingApi.internalApi.onHideExternalChart(transientChartDefinition);
|
|
25
|
-
};
|
|
26
|
-
}, [divRef]);
|
|
27
|
-
return (0, jsx_runtime_1.jsx)("div", { ref: divRef });
|
|
28
|
-
};
|
|
29
10
|
const ExternalChartingWizard = (props) => {
|
|
30
11
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
31
12
|
const onPreviewChart = adaptable.api.optionsApi.getChartingOptions().externalChartingOptions?.onPreviewChart;
|
|
@@ -38,19 +19,11 @@ const ExternalChartingWizard = (props) => {
|
|
|
38
19
|
};
|
|
39
20
|
return ((0, jsx_runtime_1.jsx)(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: chartDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
40
21
|
{
|
|
41
|
-
title: '
|
|
42
|
-
details: '
|
|
22
|
+
title: 'Chart',
|
|
23
|
+
details: 'Configure chart properties and preview the result',
|
|
43
24
|
isValid: SettingsSection_1.isSettingsValid,
|
|
44
|
-
render: () => ((0, jsx_runtime_1.jsx)(
|
|
25
|
+
render: () => ((0, jsx_runtime_1.jsx)(SettingsSection_1.SettingsSection, { chartDefinition: chartDefinition, onChange: setChartDefinition, showPreview: Boolean(onPreviewChart) })),
|
|
45
26
|
},
|
|
46
|
-
|
|
47
|
-
? {
|
|
48
|
-
title: 'Preview Chart',
|
|
49
|
-
render: () => {
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(PreviewChartSection, { chartDefinition: chartDefinition }) }));
|
|
51
|
-
},
|
|
52
|
-
}
|
|
53
|
-
: null,
|
|
54
|
-
].filter(Boolean) }));
|
|
27
|
+
] }));
|
|
55
28
|
};
|
|
56
29
|
exports.ExternalChartingWizard = ExternalChartingWizard;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreviewChartSection = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
8
|
+
const PreviewChartSection = (props) => {
|
|
9
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
10
|
+
const divRef = React.useRef(null);
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
if (!divRef.current) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const container = {
|
|
16
|
+
name: 'Preview Chart',
|
|
17
|
+
element: divRef.current,
|
|
18
|
+
};
|
|
19
|
+
const transientChartDefinition = adaptable.api.chartingApi.internalApi.onPreviewExternalChart(props.chartDefinition, container);
|
|
20
|
+
return () => {
|
|
21
|
+
adaptable.api.chartingApi.internalApi.onHideExternalChart(transientChartDefinition);
|
|
22
|
+
};
|
|
23
|
+
}, [divRef]);
|
|
24
|
+
return (0, jsx_runtime_1.jsx)("div", { ref: divRef, className: "twa:min-h-[280px] twa:h-full twa:w-full" });
|
|
25
|
+
};
|
|
26
|
+
exports.PreviewChartSection = PreviewChartSection;
|
|
@@ -5,5 +5,6 @@ export declare const isSettingsValid: (chartDefinition: ExternalChartDefinition,
|
|
|
5
5
|
export interface SettingsSectionProps {
|
|
6
6
|
chartDefinition: ExternalChartDefinition;
|
|
7
7
|
onChange: (chartDefinition: ExternalChartDefinition) => void;
|
|
8
|
+
showPreview?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare const SettingsSection: React.FunctionComponent<SettingsSectionProps>;
|
|
@@ -3,17 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SettingsSection = exports.isSettingsValid = 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 chartingHelper_1 = require("../../../../Utilities/Helpers/chartingHelper");
|
|
8
|
-
const
|
|
7
|
+
const Flex_1 = require("../../../../components/Flex");
|
|
8
|
+
const Card_1 = require("../../../../components/Card");
|
|
9
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
10
|
+
const PreviewChartSection_1 = require("./PreviewChartSection");
|
|
9
11
|
const isSettingsValid = (chartDefinition, api) => {
|
|
10
12
|
return (0, chartingHelper_1.validateChartName)(api, chartDefinition.Name, chartDefinition.Uuid);
|
|
11
13
|
};
|
|
12
14
|
exports.isSettingsValid = isSettingsValid;
|
|
13
15
|
const SettingsSection = (props) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const { chartDefinition, onChange, showPreview } = props;
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3 twa:h-full twa:min-h-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: "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 chart" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "chart-name", className: "twa:max-w-[300px] twa:w-full", value: chartDefinition.Name ?? '', placeholder: "Enter chart name", onChange: (event) => onChange({
|
|
18
|
+
...chartDefinition,
|
|
19
|
+
Name: event.target.value,
|
|
20
|
+
}) }) })] }), showPreview ? ((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: "Live preview of the external chart" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-[280px]", children: (0, jsx_runtime_1.jsx)(PreviewChartSection_1.PreviewChartSection, { chartDefinition: chartDefinition }) })] })) : null] }));
|
|
18
21
|
};
|
|
19
22
|
exports.SettingsSection = SettingsSection;
|
|
@@ -57,7 +57,7 @@ const CommentsEditor = (props) => {
|
|
|
57
57
|
const formatDate = (date, format) => {
|
|
58
58
|
return FormatHelper_1.default.DateFormatter(date, { Pattern: format });
|
|
59
59
|
};
|
|
60
|
-
return ((0, jsx_runtime_1.jsxs)(Panel_1.default, { color: "var(--ab-color-
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(Panel_1.default, { color: "var(--ab-color-primary-foreground)", onClick: () => props.enableEditMode(), className: "ab-CommentPopup twa:min-w-[250px]", onKeyDown: (event) => {
|
|
61
61
|
if (event.key === 'Escape') {
|
|
62
62
|
api.commentApi.hideCommentsPopup();
|
|
63
63
|
}
|
|
@@ -82,7 +82,6 @@ const ColumnFilterInput = (props) => {
|
|
|
82
82
|
} }));
|
|
83
83
|
}
|
|
84
84
|
if (usePrimitiveInputs === false && (type === 'number' || type === 'text')) {
|
|
85
|
-
// we use the permitted values selector
|
|
86
85
|
return ((0, jsx_runtime_1.jsx)(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', value: liveValue, columnId: columnId, onFocus: onFocus, onBlur: onBlur, onChange: (value) => {
|
|
87
86
|
if (value == undefined) {
|
|
88
87
|
onClear();
|
|
@@ -40,7 +40,9 @@ const ColumnFilterInputList = (props) => {
|
|
|
40
40
|
}
|
|
41
41
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (matchingInputs ?? []).map((input, index) => {
|
|
42
42
|
const value = props?.predicate?.args?.[index];
|
|
43
|
-
|
|
43
|
+
const operator = props.predicate?.operator;
|
|
44
|
+
const usePermittedValuesSelector = input === 'number' || operator === 'Is' || operator === 'IsNot';
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(ColumnFilterInput_1.ColumnFilterInput, { columnId: props.columnId, usePrimitiveInputs: !usePermittedValuesSelector, disabled: props.disabled, type: input, value: value, onKeyDown: props.onKeyDown, onClear: () => {
|
|
44
46
|
const args = [...props.predicate.args];
|
|
45
47
|
args.splice(index, 1);
|
|
46
48
|
const newPredicate = {
|
|
@@ -8,7 +8,7 @@ const icons_1 = require("../../components/icons");
|
|
|
8
8
|
class ModuleProfile extends React.Component {
|
|
9
9
|
render() {
|
|
10
10
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { name: this.props.moduleInfo.Glyph, style: {
|
|
11
|
-
fill: 'var(--ab-color-
|
|
11
|
+
fill: 'var(--ab-color-primary-foreground)',
|
|
12
12
|
} }), ' ', this.props.moduleInfo.FriendlyName] }));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { WindowPopupChildProps } from './WindowPopups';
|
|
2
2
|
export declare const WINDOW_GRID_FILTER_EDITOR = "WINDOW_GRID_FILTER_EDITOR";
|
|
3
3
|
export declare const SHOW_PIVOT_COLUMN_DETAILS = "SHOW_PIVOT_COLUMN_DETAILS";
|
|
4
|
-
export declare const SHOW_THEME_EDITOR = "SHOW_THEME_EDITOR";
|
|
5
4
|
export declare const WINDOW_SHOW_TRANSPOSED_VIEW = "WINDOW_SHOW_TRANSPOSED_VIEW";
|
|
6
5
|
export declare const COLUMN_FILTER_WINDOW = "COLUMN_FILTER_WINDOW";
|
|
7
6
|
export declare const windowFactory: Record<string, React.FunctionComponent<WindowPopupChildProps>>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.windowFactory = exports.COLUMN_FILTER_WINDOW = exports.WINDOW_SHOW_TRANSPOSED_VIEW = exports.
|
|
3
|
+
exports.windowFactory = exports.COLUMN_FILTER_WINDOW = exports.WINDOW_SHOW_TRANSPOSED_VIEW = exports.SHOW_PIVOT_COLUMN_DETAILS = exports.WINDOW_GRID_FILTER_EDITOR = void 0;
|
|
4
4
|
const GridFilterWindowPopup_1 = require("../../../GridFilter/GridFilterWindowPopup");
|
|
5
5
|
const PivotDetailsPopoup_1 = require("../../../Layout/PivotDetailsPopoup");
|
|
6
6
|
const TransposedPopup_1 = require("../../../Layout/TransposedPopup");
|
|
7
7
|
const ColumnFilterWindow_1 = require("../../ColumnFilter/ColumnFilterWindow");
|
|
8
8
|
exports.WINDOW_GRID_FILTER_EDITOR = 'WINDOW_GRID_FILTER_EDITOR';
|
|
9
9
|
exports.SHOW_PIVOT_COLUMN_DETAILS = 'SHOW_PIVOT_COLUMN_DETAILS';
|
|
10
|
-
exports.SHOW_THEME_EDITOR = 'SHOW_THEME_EDITOR';
|
|
11
10
|
exports.WINDOW_SHOW_TRANSPOSED_VIEW = 'WINDOW_SHOW_TRANSPOSED_VIEW';
|
|
12
11
|
exports.COLUMN_FILTER_WINDOW = 'COLUMN_FILTER_WINDOW';
|
|
13
12
|
exports.windowFactory = {
|