@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,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateParameterizedAggregationsInLayout = validateParameterizedAggregationsInLayout;
|
|
4
|
-
exports.validateTableLayoutAggregations = validateTableLayoutAggregations;
|
|
5
|
-
exports.validatePivotLayoutAggregations = validatePivotLayoutAggregations;
|
|
6
|
-
const ParameterizedAggregationRegistry_1 = require("./ParameterizedAggregationRegistry");
|
|
7
|
-
const parameterizedAggregationHelpers_1 = require("./parameterizedAggregationHelpers");
|
|
8
|
-
function validateParameterizedAggregationsInLayout(layout) {
|
|
9
|
-
const entries = (0, parameterizedAggregationHelpers_1.getAggregationColumnsFromLayout)(layout) || [];
|
|
10
|
-
for (const { AggFunc } of entries) {
|
|
11
|
-
if ((0, ParameterizedAggregationRegistry_1.isParameterizedAggregation)(AggFunc)) {
|
|
12
|
-
const definition = (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinition)(AggFunc.type);
|
|
13
|
-
if (definition && !definition.isComplete(AggFunc)) {
|
|
14
|
-
return `${definition.label} requires all arguments to be selected.`;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
function validateTableLayoutAggregations(layout) {
|
|
21
|
-
return validateParameterizedAggregationsInLayout(layout);
|
|
22
|
-
}
|
|
23
|
-
function validatePivotLayoutAggregations(layout) {
|
|
24
|
-
return validateParameterizedAggregationsInLayout(layout);
|
|
25
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableColumn } from '../../../../AdaptableState/Common/AdaptableColumn';
|
|
3
|
-
import { AggregationColumnValue, TableAggregationColumns } from '../../../../AdaptableState/Common/AggregationColumns';
|
|
4
|
-
export declare const ParameterizedAggFuncPicker: React.FunctionComponent<{
|
|
5
|
-
column: AdaptableColumn;
|
|
6
|
-
aggValue?: AggregationColumnValue;
|
|
7
|
-
aggregationColumnsMap: Record<string, string>;
|
|
8
|
-
numberColumns: AdaptableColumn[];
|
|
9
|
-
aggregationEntries: TableAggregationColumns;
|
|
10
|
-
onChangeEntries: (entries: TableAggregationColumns) => void;
|
|
11
|
-
availableAggregationFunctions?: string[];
|
|
12
|
-
}>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParameterizedAggFuncPicker = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
7
|
-
const ParameterizedAggregationRegistry_1 = require("../../../../Aggregation/ParameterizedAggregationRegistry");
|
|
8
|
-
const parameterizedAggregationWizardHelpers_1 = require("../../../../Aggregation/parameterizedAggregationWizardHelpers");
|
|
9
|
-
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
10
|
-
const Flex_1 = require("../../../../components/Flex");
|
|
11
|
-
const ParameterizedAggFuncPicker = (props) => {
|
|
12
|
-
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
13
|
-
const adaptableAggFunctions = (0, parameterizedAggregationWizardHelpers_1.getAdaptableAggFuncNamesForColumn)(props.column);
|
|
14
|
-
const availableAggregationFunctions = props.availableAggregationFunctions ?? props.column.availableAggregationFunctions ?? [];
|
|
15
|
-
const aggOptions = [
|
|
16
|
-
...new Set([...availableAggregationFunctions, ...adaptableAggFunctions]),
|
|
17
|
-
].map((fnName) => ({
|
|
18
|
-
label: fnName,
|
|
19
|
-
onClick: () => {
|
|
20
|
-
const aggFuncValue = (0, parameterizedAggregationWizardHelpers_1.resolveAggFuncValueFromWizardSelection)(fnName);
|
|
21
|
-
props.onChangeEntries((0, parameterizedAggregationWizardHelpers_1.upsertColumnAggregationEntry)(props.aggregationEntries, props.column.columnId, aggFuncValue));
|
|
22
|
-
},
|
|
23
|
-
}));
|
|
24
|
-
const currentAggFnName = props.aggregationColumnsMap[props.column.columnId];
|
|
25
|
-
const parameterizedDefinition = currentAggFnName
|
|
26
|
-
? (0, ParameterizedAggregationRegistry_1.getParameterizedAggregationDefinitionByAgGridName)(currentAggFnName)
|
|
27
|
-
: undefined;
|
|
28
|
-
const numericColumnsOptions = props.numberColumns
|
|
29
|
-
.filter((col) => col.columnId !== props.column.columnId)
|
|
30
|
-
.map((col) => {
|
|
31
|
-
return {
|
|
32
|
-
label: col.friendlyName,
|
|
33
|
-
onClick: () => {
|
|
34
|
-
const definition = parameterizedDefinition;
|
|
35
|
-
if (!definition?.createDefinition) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
props.onChangeEntries((0, parameterizedAggregationWizardHelpers_1.upsertColumnAggregationEntry)(props.aggregationEntries, props.column.columnId, definition.createDefinition(col.columnId)));
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
const argSelectionLabel = (0, parameterizedAggregationWizardHelpers_1.formatParameterizedArgSelectionLabel)(adaptable.api, props.column.columnId, props.aggValue);
|
|
43
|
-
if (!props.aggValue) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(DropdownButton_1.default, { columns: ['label'], items: aggOptions, className: "twa:ml-2", children: currentAggFnName }), parameterizedDefinition && ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:bg-primary twa:ml-3", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, parameterizedAggregationWizardHelpers_1.getParameterizedArgColumnLabel)(currentAggFnName) }), ' ', (0, jsx_runtime_1.jsx)(DropdownButton_1.default, { columns: ['label'], items: numericColumnsOptions, className: "twa:ml-2", children: argSelectionLabel })] }))] }));
|
|
47
|
-
};
|
|
48
|
-
exports.ParameterizedAggFuncPicker = ParameterizedAggFuncPicker;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledColumnBadgeSettings = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const Tag_1 = require("../../../../../components/Tag");
|
|
6
|
-
const AdaptableContext_1 = require("../../../../AdaptableContext");
|
|
7
|
-
const Flex_1 = require("../../../../../components/Flex");
|
|
8
|
-
const StyledColumnBadgeSettings = ({ data }) => {
|
|
9
|
-
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
10
|
-
const badgeStyle = data.BadgeStyle;
|
|
11
|
-
if (!badgeStyle || !badgeStyle.Badges || badgeStyle.Badges.length === 0) {
|
|
12
|
-
return (0, jsx_runtime_1.jsx)("div", { children: "No Badges Defined" });
|
|
13
|
-
}
|
|
14
|
-
const density = badgeStyle.Density ?? 'Normal';
|
|
15
|
-
const spacing = typeof badgeStyle.Spacing === 'number' ? badgeStyle.Spacing : null;
|
|
16
|
-
const overflowMode = badgeStyle.OverflowMode ?? 'Truncate';
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:my-1 twa:flex-wrap twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Density: ", density] }), spacing != null && (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Spacing: ", spacing, "px"] }), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Overflow: ", overflowMode] })] }), badgeStyle.Badges.map((badge, index) => {
|
|
18
|
-
let ruleString = 'No Rule';
|
|
19
|
-
if (badge.Predicate) {
|
|
20
|
-
ruleString = adaptable.api.predicateApi.predicateToString(badge.Predicate);
|
|
21
|
-
}
|
|
22
|
-
if (badge.Expression) {
|
|
23
|
-
ruleString = badge.Expression.BooleanExpression;
|
|
24
|
-
}
|
|
25
|
-
const iconOnly = badge.Icon && badge.IconOnly;
|
|
26
|
-
const hasIconPosition = badge.Icon && badge.IconPosition;
|
|
27
|
-
const iconPosition = hasIconPosition ? 'Icon Position: ' + badge.IconPosition : '';
|
|
28
|
-
const shape = badge.Shape;
|
|
29
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:my-2", children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: ruleString }), shape && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: `Shape: ${shape}` }), iconOnly && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: 'Icon Only' }), hasIconPosition && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: iconPosition }), typeof badge.IconGap === 'number' && ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:ml-2", children: `Icon Gap: ${badge.IconGap}px` }))] }, index));
|
|
30
|
-
})] }));
|
|
31
|
-
};
|
|
32
|
-
exports.StyledColumnBadgeSettings = StyledColumnBadgeSettings;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableTheme } from '../../types';
|
|
3
|
-
export interface VariantSelectorProps {
|
|
4
|
-
theme: AdaptableTheme;
|
|
5
|
-
onChange: (variant: AdaptableTheme['Variant'] | null) => void;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const VariantSelector: React.FunctionComponent<VariantSelectorProps>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VariantSelector = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
|
|
7
|
-
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
8
|
-
const AdaptableContext_1 = require("../AdaptableContext");
|
|
9
|
-
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
10
|
-
const VariantSelector = (props) => {
|
|
11
|
-
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
12
|
-
const systemTemes = adaptable.api.themeApi
|
|
13
|
-
.getSystemThemes()
|
|
14
|
-
.filter((theme) => theme.Name !== GeneralConstants_1.OS_THEME);
|
|
15
|
-
const options = systemTemes.map((theme) => ({
|
|
16
|
-
label: theme.Description,
|
|
17
|
-
value: theme.Name,
|
|
18
|
-
onClick: () => props.onChange(theme.Name),
|
|
19
|
-
}));
|
|
20
|
-
const label = props.theme.Variant
|
|
21
|
-
? options.find((theme) => theme.value === props.theme.Variant)?.label
|
|
22
|
-
: 'Select a theme';
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(DropdownButton_1.default, { className: "twa:mr-2", columns: ['label'], items: options, disabled: props.disabled, children: label }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { onClick: () => props.onChange(null), disabled: !props.theme.Variant || props.disabled, hidden: props.disabled, icon: "delete" })] }));
|
|
24
|
-
};
|
|
25
|
-
exports.VariantSelector = VariantSelector;
|