@adaptabletools/adaptable-cjs 23.0.0-canary.8 → 23.0.0-canary.9
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 +29 -14
- package/package.json +1 -1
- package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +2 -3
- package/src/AdaptableState/Common/Enums.d.ts +0 -12
- package/src/AdaptableState/Common/Enums.js +1 -16
- package/src/{Utilities → AdaptableState/Common}/MenuItem.d.ts +4 -4
- package/src/{Utilities → AdaptableState/Common}/MenuItem.js +1 -1
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +5 -5
- package/src/AdaptableState/StyledColumns/Common/{BarChartCellText.d.ts → BarStyleProperties.d.ts} +34 -10
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +2 -2
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +2 -2
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +5 -5
- package/src/Api/Implementation/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +5 -5
- package/src/Api/Implementation/ExportApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutHelpers.js +2 -3
- package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
- package/src/Api/Implementation/ThemeApiImpl.js +2 -2
- package/src/Api/Internal/ActionColumnInternalApi.js +2 -2
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/ChartingInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +2 -2
- package/src/Api/Internal/EventInternalApi.js +3 -4
- package/src/Api/Internal/ExportInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
- package/src/Api/Internal/GridInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
- package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
- package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +2 -3
- package/src/Redux/Store/AdaptableReduxMerger.js +7 -9
- package/src/Redux/Store/AdaptableStore.js +5 -5
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +1 -1
- package/src/Strategy/AlertModule.d.ts +1 -1
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/ChartingModule.d.ts +1 -1
- package/src/Strategy/ChartingModule.js +4 -4
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +2 -2
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +8 -8
- package/src/Strategy/SettingsPanelModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/TeamSharingModule.js +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +54 -1
- package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
- package/src/Utilities/Extensions/NumberExtensions.js +78 -0
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +277 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
- package/src/Utilities/Extensions/StringExtensions.js +49 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +7 -7
- package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
- package/src/Utilities/Helpers/DateHelper.js +2 -2
- package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +5 -5
- package/src/Utilities/Helpers/Helper.d.ts +0 -6
- package/src/Utilities/Helpers/Helper.js +0 -38
- package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +2 -3
- package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
- package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
- package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +16 -1
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
- package/src/Utilities/Helpers/{barChartCellText.js → StyledColumns/BarStylesHelper.js} +48 -47
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -4
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +9 -9
- package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
- package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +16 -0
- package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -2
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +11 -12
- package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +124 -0
- package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
- package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +25 -9
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +118 -2
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +6 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/Alert/Utilities/getAlertType.js +1 -1
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
- package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +3 -3
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -3
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +2 -2
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Comments/CommentsEditor.js +2 -2
- package/src/View/Comments/CommentsPopup.js +2 -2
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -2
- package/src/View/Components/Popups/Utilities.js +5 -5
- package/src/View/Components/RangesComponent.d.ts +3 -3
- package/src/View/Components/RangesComponent.js +5 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -3
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -3
- package/src/View/Dashboard/CustomDashboardButton.js +2 -3
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -2
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -13
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +4 -4
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +2 -2
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Note/NoteEditor.js +2 -2
- package/src/View/Note/NotePopup.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -4
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +16 -20
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +8 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +14 -16
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextLayoutEditor.d.ts → BarStyleCellTextLayoutEditor.d.ts} +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.d.ts → BarStyleCellTextPreview.d.ts} +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.js → BarStyleCellTextPreview.js} +9 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +7 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +19 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +7 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +11 -15
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/View/Wizard/OnePageWizards.js +3 -1
- package/src/agGrid/AdaptableAgGrid.js +11 -11
- package/src/agGrid/AgGridColumnAdapter.js +30 -29
- package/src/agGrid/AgGridExportAdapter.js +3 -3
- package/src/agGrid/AgGridMenuAdapter.js +129 -4
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -2
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +8 -8
- package/src/agGrid/cellRenderers/IconRenderer.js +7 -8
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +9 -9
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +10 -11
- package/src/agGrid/cellRenderers/RatingRenderer.js +6 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/components/ColorPicker/ColorPicker.js +2 -2
- package/src/components/Datepicker/index.js +2 -2
- package/src/components/FormLayout/index.js +2 -2
- package/src/components/OverlayTrigger/index.js +2 -2
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +4 -5
- package/src/metamodel/adaptable.metamodel.d.ts +41 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.js +2 -2
- package/src/types.d.ts +3 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +0 -7
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +0 -24
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
- package/src/Utilities/Helpers/barChartCellText.d.ts +0 -63
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -18
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -19
- package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
- package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -70
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -120
- package/src/Utilities/utils/chunk.d.ts +0 -6
- package/src/Utilities/utils/chunk.js +0 -20
- package/src/Utilities/utils/clamp.d.ts +0 -5
- package/src/Utilities/utils/clamp.js +0 -10
- package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
- package/src/Utilities/utils/cloneDeepWith.js +0 -70
- package/src/Utilities/utils/debounce.d.ts +0 -20
- package/src/Utilities/utils/flatten.d.ts +0 -5
- package/src/Utilities/utils/flatten.js +0 -10
- package/src/Utilities/utils/flattenDeep.d.ts +0 -5
- package/src/Utilities/utils/flattenDeep.js +0 -10
- package/src/Utilities/utils/get.d.ts +0 -6
- package/src/Utilities/utils/get.js +0 -38
- package/src/Utilities/utils/index.d.ts +0 -22
- package/src/Utilities/utils/index.js +0 -48
- package/src/Utilities/utils/isArray.d.ts +0 -6
- package/src/Utilities/utils/isArray.js +0 -8
- package/src/Utilities/utils/isEqual.d.ts +0 -5
- package/src/Utilities/utils/isEqual.js +0 -127
- package/src/Utilities/utils/isObject.d.ts +0 -6
- package/src/Utilities/utils/isObject.js +0 -12
- package/src/Utilities/utils/isPlainObject.d.ts +0 -6
- package/src/Utilities/utils/isPlainObject.js +0 -20
- package/src/Utilities/utils/kebabCase.d.ts +0 -5
- package/src/Utilities/utils/kebabCase.js +0 -12
- package/src/Utilities/utils/merge.d.ts +0 -11
- package/src/Utilities/utils/merge.js +0 -44
- package/src/Utilities/utils/mergeWith.d.ts +0 -7
- package/src/Utilities/utils/mergeWith.js +0 -50
- package/src/Utilities/utils/orderBy.d.ts +0 -8
- package/src/Utilities/utils/orderBy.js +0 -33
- package/src/Utilities/utils/parseInt.d.ts +0 -6
- package/src/Utilities/utils/parseInt.js +0 -12
- package/src/Utilities/utils/sentenceCase.d.ts +0 -6
- package/src/Utilities/utils/sentenceCase.js +0 -19
- package/src/Utilities/utils/startCase.d.ts +0 -5
- package/src/Utilities/utils/startCase.js +0 -15
- package/src/Utilities/utils/throttle.d.ts +0 -17
- package/src/Utilities/utils/throttle.js +0 -23
- package/src/Utilities/utils/toNumber.d.ts +0 -5
- package/src/Utilities/utils/toNumber.js +0 -42
- package/src/Utilities/utils/uniq.d.ts +0 -7
- package/src/Utilities/utils/uniq.js +0 -12
- package/src/Utilities/utils/uniqBy.d.ts +0 -8
- package/src/Utilities/utils/uniqBy.js +0 -25
- package/src/Utilities/utils/words.d.ts +0 -7
- package/src/Utilities/utils/words.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +0 -40
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
- package/src/agGrid/buildValueAggregationMenuItem.js +0 -114
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js +0 -58
- package/src/agGrid/createAgGridIcon.d.ts +0 -10
- package/src/agGrid/createAgGridIcon.js +0 -19
- /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
- /package/src/AdaptableState/StyledColumns/Common/{BarChartMarker.js → BarStyleProperties.js} +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
- /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
- /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
- /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
- /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js}
RENAMED
|
@@ -8,10 +8,10 @@ exports.getScheduledAlertNotificationForm = getScheduledAlertNotificationForm;
|
|
|
8
8
|
exports.scheduledAlertIncludeSuspendButton = scheduledAlertIncludeSuspendButton;
|
|
9
9
|
exports.CreateEmptyScheduledAlertDefinition = CreateEmptyScheduledAlertDefinition;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("
|
|
12
|
-
const GeneralConstants_1 = require("
|
|
13
|
-
const ObjectDefaultConstants_1 = require("
|
|
14
|
-
const Uuid_1 = require("
|
|
11
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../ObjectFactory"));
|
|
12
|
+
const GeneralConstants_1 = require("../../Constants/GeneralConstants");
|
|
13
|
+
const ObjectDefaultConstants_1 = require("../../Constants/ObjectDefaultConstants");
|
|
14
|
+
const Uuid_1 = require("../../../AdaptableState/Uuid");
|
|
15
15
|
function isScheduledAlertDefinition(alert) {
|
|
16
16
|
return alert != null && 'Schedule' in alert;
|
|
17
17
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IAdaptable } from '
|
|
1
|
+
import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
2
2
|
export declare function refreshScheduledAlertJobs(adaptable: IAdaptable): void;
|
|
3
3
|
export declare function refreshScheduledReportJobs(adaptable: IAdaptable): void;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.refreshScheduledAlertJobs = refreshScheduledAlertJobs;
|
|
4
4
|
exports.refreshScheduledReportJobs = refreshScheduledReportJobs;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const ModuleConstants = tslib_1.__importStar(require("
|
|
6
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Constants/ModuleConstants"));
|
|
7
7
|
function refreshScheduledAlertJobs(adaptable) {
|
|
8
8
|
const alertModule = adaptable.adaptableModules.get(ModuleConstants.AlertModuleId);
|
|
9
9
|
alertModule?.setUpScheduledAlertJobs?.();
|
package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExportState, ReportNameType, ReportSchedule } from '
|
|
1
|
+
import { ExportState, ReportNameType, ReportSchedule } from '../../../AdaptableState/ExportState';
|
|
2
2
|
export declare function reportScheduleToSchedule(reportSchedule: {
|
|
3
3
|
ReportName?: string;
|
|
4
4
|
ScheduleType?: string;
|
package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js}
RENAMED
|
@@ -8,7 +8,7 @@ exports.exportStateNeedsScheduleUuids = exportStateNeedsScheduleUuids;
|
|
|
8
8
|
exports.ensureExportStateSchedulesUuids = ensureExportStateSchedulesUuids;
|
|
9
9
|
exports.replaceScheduledReportScheduleInList = replaceScheduledReportScheduleInList;
|
|
10
10
|
exports.countSchedulesForReport = countSchedulesForReport;
|
|
11
|
-
const Uuid_1 = require("
|
|
11
|
+
const Uuid_1 = require("../../../AdaptableState/Uuid");
|
|
12
12
|
function reportScheduleToSchedule(reportSchedule) {
|
|
13
13
|
const { ReportName: reportName, ScheduleType: _scheduleType, ...schedule } = reportSchedule;
|
|
14
14
|
return {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
2
|
+
import { SettingsPanelNavigation, SettingsPanelNavigationGroup, SettingsPanelOptions } from '../../AdaptableOptions/SettingsPanelOptions';
|
|
3
|
+
export declare const DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS: SettingsPanelNavigationGroup[];
|
|
4
|
+
export declare const buildDefaultSettingsPanelNavigation: (customPanelNames?: string[]) => SettingsPanelNavigation;
|
|
5
|
+
export declare const resolveSettingsPanelNavigation: (api: AdaptableApi, settingsPanelOptions: SettingsPanelOptions) => SettingsPanelNavigation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildDefaultSettingsPanelNavigation = exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS = void 0;
|
|
3
|
+
exports.resolveSettingsPanelNavigation = exports.buildDefaultSettingsPanelNavigation = exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS = void 0;
|
|
4
4
|
exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS = [
|
|
5
5
|
{
|
|
6
6
|
label: 'Grid & UI',
|
|
@@ -49,3 +49,18 @@ const buildDefaultSettingsPanelNavigation = (customPanelNames = []) => {
|
|
|
49
49
|
return { groups };
|
|
50
50
|
};
|
|
51
51
|
exports.buildDefaultSettingsPanelNavigation = buildDefaultSettingsPanelNavigation;
|
|
52
|
+
const cloneSettingsPanelNavigation = (navigation) => ({
|
|
53
|
+
groups: navigation.groups.map((group) => ({
|
|
54
|
+
label: group.label,
|
|
55
|
+
items: [...group.items],
|
|
56
|
+
})),
|
|
57
|
+
});
|
|
58
|
+
const resolveSettingsPanelNavigation = (api, settingsPanelOptions) => {
|
|
59
|
+
const defaultNavigation = (0, exports.buildDefaultSettingsPanelNavigation)(settingsPanelOptions.customSettingsPanels?.map((panel) => panel.name) ?? []);
|
|
60
|
+
if (!settingsPanelOptions.navigation) {
|
|
61
|
+
return defaultNavigation;
|
|
62
|
+
}
|
|
63
|
+
const context = api.internalApi.buildBaseContext();
|
|
64
|
+
return settingsPanelOptions.navigation(context, cloneSettingsPanelNavigation(defaultNavigation));
|
|
65
|
+
};
|
|
66
|
+
exports.resolveSettingsPanelNavigation = resolveSettingsPanelNavigation;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BarStyleCellTextHorizontalAlignment, BarStyleCellTextLayout, BarStyleCellTextPlacement, BarStyleCellTextProperties, BarStyleCellTextVerticalAlignment } from '../../../AdaptableState/StyledColumns/Common/BarStyleProperties';
|
|
2
|
+
import { CellTextOption, CellTextOptions } from '../../../AdaptableState/StyledColumns/Common/CellTextOptions';
|
|
3
|
+
export type BarStyleCellTextLabels = {
|
|
4
|
+
cellValue?: string;
|
|
5
|
+
percentage?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const resolveBarStyleCellTextLayout: (props: BarStyleCellTextProperties | undefined) => BarStyleCellTextLayout;
|
|
8
|
+
/** True when any value is configured for display. */
|
|
9
|
+
export declare const hasBarStyleCellTextConfigured: (props: BarStyleCellTextProperties | undefined) => boolean;
|
|
10
|
+
/** Set of value tokens that currently have a placement. */
|
|
11
|
+
export declare const getActiveBarStyleCellTextTokens: (props: BarStyleCellTextProperties | undefined) => CellTextOptions;
|
|
12
|
+
export declare const mergeBarStyleCellTextProperties: (current: BarStyleCellTextProperties | undefined, patch: Partial<BarStyleCellTextProperties>) => BarStyleCellTextProperties | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
15
|
+
*/
|
|
16
|
+
export declare const setBarStyleCellTextPlacement: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, placement: BarStyleCellTextPlacement | undefined) => BarStyleCellTextProperties | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
19
|
+
* needed). Used by the wizard's placement pickers.
|
|
20
|
+
*/
|
|
21
|
+
export declare const patchBarStyleCellTextPlacement: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, patch: Partial<BarStyleCellTextPlacement>) => BarStyleCellTextProperties | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
24
|
+
* value we use the default placement (Left / Below).
|
|
25
|
+
*/
|
|
26
|
+
export declare const toggleBarStyleCellTextToken: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, show: boolean) => {
|
|
27
|
+
CellTextProperties: BarStyleCellTextProperties | undefined;
|
|
28
|
+
};
|
|
29
|
+
export declare const buildBarStyleCellTextLabels: (props: BarStyleCellTextProperties | undefined, cellValueLabel: string | undefined, percentageLabel: string | undefined) => BarStyleCellTextLabels;
|
|
30
|
+
export declare const hasBarStyleCellTextLabels: (labels: BarStyleCellTextLabels) => boolean;
|
|
31
|
+
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
32
|
+
export declare const joinBarStyleCellTextLabels: (labels: BarStyleCellTextLabels) => string;
|
|
33
|
+
export type BarStyleCellTextSlotEntry = {
|
|
34
|
+
vertical: BarStyleCellTextVerticalAlignment;
|
|
35
|
+
horizontal: BarStyleCellTextHorizontalAlignment;
|
|
36
|
+
/** Labels in render order (Cell Value first, then Percent Value). */
|
|
37
|
+
parts: string[];
|
|
38
|
+
/** The joined text, ready to render. */
|
|
39
|
+
text: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Resolve which placements are populated and what text goes in each cell of
|
|
43
|
+
* the 3 × 3 grid. Empty slots are omitted. Two values landing on the same
|
|
44
|
+
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
45
|
+
* Value before Percent Value.
|
|
46
|
+
*/
|
|
47
|
+
export declare const resolveBarStyleCellTextSlots: (props: BarStyleCellTextProperties | undefined, labels: BarStyleCellTextLabels) => BarStyleCellTextSlotEntry[];
|
|
48
|
+
export type BarStyleCellTextSlotPresence = {
|
|
49
|
+
hasAbove: boolean;
|
|
50
|
+
hasBelow: boolean;
|
|
51
|
+
hasMerged: boolean;
|
|
52
|
+
};
|
|
53
|
+
export declare const getBarStyleCellTextSlotPresence: (props: BarStyleCellTextProperties | undefined) => BarStyleCellTextSlotPresence;
|
|
54
|
+
export declare const formatBarStyleCellTextLayoutSummary: (layout: BarStyleCellTextLayout) => string | undefined;
|
|
55
|
+
export type MountBarStyleCellTextArgs = {
|
|
56
|
+
wrapperEl: HTMLElement;
|
|
57
|
+
mergedOverlayEl?: HTMLElement;
|
|
58
|
+
textClassName: string;
|
|
59
|
+
cellTextProperties?: BarStyleCellTextProperties;
|
|
60
|
+
labels: BarStyleCellTextLabels;
|
|
61
|
+
mergedPointerEventsNone?: boolean;
|
|
62
|
+
};
|
|
63
|
+
export declare const mountBarStyleCellText: (args: MountBarStyleCellTextArgs) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mountBarStyleCellText = exports.formatBarStyleCellTextLayoutSummary = exports.getBarStyleCellTextSlotPresence = exports.resolveBarStyleCellTextSlots = exports.joinBarStyleCellTextLabels = exports.hasBarStyleCellTextLabels = exports.buildBarStyleCellTextLabels = exports.toggleBarStyleCellTextToken = exports.patchBarStyleCellTextPlacement = exports.setBarStyleCellTextPlacement = exports.mergeBarStyleCellTextProperties = exports.getActiveBarStyleCellTextTokens = exports.hasBarStyleCellTextConfigured = exports.resolveBarStyleCellTextLayout = void 0;
|
|
4
4
|
/** Default placement applied to a value whose Horizontal/Vertical were omitted. */
|
|
5
5
|
const DEFAULT_PLACEMENT = {
|
|
6
6
|
Horizontal: 'Left',
|
|
@@ -8,12 +8,13 @@ const DEFAULT_PLACEMENT = {
|
|
|
8
8
|
};
|
|
9
9
|
const HORIZONTAL_VALUES = ['Left', 'Center', 'Right'];
|
|
10
10
|
const VERTICAL_VALUES = ['Above', 'Below', 'Merged'];
|
|
11
|
-
const isHorizontal = (value) => typeof value === 'string' &&
|
|
12
|
-
HORIZONTAL_VALUES.includes(value);
|
|
11
|
+
const isHorizontal = (value) => typeof value === 'string' && HORIZONTAL_VALUES.includes(value);
|
|
13
12
|
const isVertical = (value) => typeof value === 'string' && VERTICAL_VALUES.includes(value);
|
|
14
13
|
/** Normalise a placement, applying defaults for missing axes. */
|
|
15
14
|
const sanitizePlacement = (placement) => ({
|
|
16
|
-
Horizontal: isHorizontal(placement?.Horizontal)
|
|
15
|
+
Horizontal: isHorizontal(placement?.Horizontal)
|
|
16
|
+
? placement.Horizontal
|
|
17
|
+
: DEFAULT_PLACEMENT.Horizontal,
|
|
17
18
|
Vertical: isVertical(placement?.Vertical) ? placement.Vertical : DEFAULT_PLACEMENT.Vertical,
|
|
18
19
|
});
|
|
19
20
|
/** Returns a layout with only the values that are actually present, defaults filled in. */
|
|
@@ -27,17 +28,17 @@ const sanitizeCellTextLayout = (layout) => {
|
|
|
27
28
|
}
|
|
28
29
|
return result;
|
|
29
30
|
};
|
|
30
|
-
const
|
|
31
|
-
exports.
|
|
31
|
+
const resolveBarStyleCellTextLayout = (props) => sanitizeCellTextLayout(props?.CellTextLayout);
|
|
32
|
+
exports.resolveBarStyleCellTextLayout = resolveBarStyleCellTextLayout;
|
|
32
33
|
/** True when any value is configured for display. */
|
|
33
|
-
const
|
|
34
|
-
const layout = (0, exports.
|
|
34
|
+
const hasBarStyleCellTextConfigured = (props) => {
|
|
35
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
35
36
|
return Boolean(layout.CellValue || layout.PercentValue);
|
|
36
37
|
};
|
|
37
|
-
exports.
|
|
38
|
+
exports.hasBarStyleCellTextConfigured = hasBarStyleCellTextConfigured;
|
|
38
39
|
/** Set of value tokens that currently have a placement. */
|
|
39
|
-
const
|
|
40
|
-
const layout = (0, exports.
|
|
40
|
+
const getActiveBarStyleCellTextTokens = (props) => {
|
|
41
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
41
42
|
const tokens = [];
|
|
42
43
|
if (layout.CellValue) {
|
|
43
44
|
tokens.push('CellValue');
|
|
@@ -47,8 +48,8 @@ const getActiveBarChartCellTextTokens = (props) => {
|
|
|
47
48
|
}
|
|
48
49
|
return tokens;
|
|
49
50
|
};
|
|
50
|
-
exports.
|
|
51
|
-
const
|
|
51
|
+
exports.getActiveBarStyleCellTextTokens = getActiveBarStyleCellTextTokens;
|
|
52
|
+
const mergeBarStyleCellTextProperties = (current, patch) => {
|
|
52
53
|
const merged = { ...current, ...patch };
|
|
53
54
|
if (merged.CellTextLayout) {
|
|
54
55
|
merged.CellTextLayout = sanitizeCellTextLayout(merged.CellTextLayout);
|
|
@@ -61,12 +62,12 @@ const mergeBarChartCellTextProperties = (current, patch) => {
|
|
|
61
62
|
}
|
|
62
63
|
return merged;
|
|
63
64
|
};
|
|
64
|
-
exports.
|
|
65
|
+
exports.mergeBarStyleCellTextProperties = mergeBarStyleCellTextProperties;
|
|
65
66
|
/**
|
|
66
67
|
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
67
68
|
*/
|
|
68
|
-
const
|
|
69
|
-
const layout = (0, exports.
|
|
69
|
+
const setBarStyleCellTextPlacement = (current, token, placement) => {
|
|
70
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
70
71
|
const next = { ...layout };
|
|
71
72
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
72
73
|
if (placement) {
|
|
@@ -75,46 +76,46 @@ const setBarChartCellTextPlacement = (current, token, placement) => {
|
|
|
75
76
|
else {
|
|
76
77
|
delete next[key];
|
|
77
78
|
}
|
|
78
|
-
return (0, exports.
|
|
79
|
+
return (0, exports.mergeBarStyleCellTextProperties)(current, { CellTextLayout: next });
|
|
79
80
|
};
|
|
80
|
-
exports.
|
|
81
|
+
exports.setBarStyleCellTextPlacement = setBarStyleCellTextPlacement;
|
|
81
82
|
/**
|
|
82
83
|
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
83
84
|
* needed). Used by the wizard's placement pickers.
|
|
84
85
|
*/
|
|
85
|
-
const
|
|
86
|
-
const layout = (0, exports.
|
|
86
|
+
const patchBarStyleCellTextPlacement = (current, token, patch) => {
|
|
87
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
87
88
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
88
89
|
const existing = layout[key];
|
|
89
90
|
const nextPlacement = {
|
|
90
91
|
...(existing ?? DEFAULT_PLACEMENT),
|
|
91
92
|
...patch,
|
|
92
93
|
};
|
|
93
|
-
return (0, exports.
|
|
94
|
+
return (0, exports.setBarStyleCellTextPlacement)(current, token, nextPlacement);
|
|
94
95
|
};
|
|
95
|
-
exports.
|
|
96
|
+
exports.patchBarStyleCellTextPlacement = patchBarStyleCellTextPlacement;
|
|
96
97
|
/**
|
|
97
98
|
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
98
99
|
* value we use the default placement (Left / Below).
|
|
99
100
|
*/
|
|
100
|
-
const
|
|
101
|
-
const layout = (0, exports.
|
|
101
|
+
const toggleBarStyleCellTextToken = (current, token, show) => {
|
|
102
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
102
103
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
103
104
|
if (show && !layout[key]) {
|
|
104
105
|
return {
|
|
105
|
-
CellTextProperties: (0, exports.
|
|
106
|
+
CellTextProperties: (0, exports.setBarStyleCellTextPlacement)(current, token, DEFAULT_PLACEMENT),
|
|
106
107
|
};
|
|
107
108
|
}
|
|
108
109
|
if (!show && layout[key]) {
|
|
109
110
|
return {
|
|
110
|
-
CellTextProperties: (0, exports.
|
|
111
|
+
CellTextProperties: (0, exports.setBarStyleCellTextPlacement)(current, token, undefined),
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
return { CellTextProperties: current };
|
|
114
115
|
};
|
|
115
|
-
exports.
|
|
116
|
-
const
|
|
117
|
-
const layout = (0, exports.
|
|
116
|
+
exports.toggleBarStyleCellTextToken = toggleBarStyleCellTextToken;
|
|
117
|
+
const buildBarStyleCellTextLabels = (props, cellValueLabel, percentageLabel) => {
|
|
118
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
118
119
|
const labels = {};
|
|
119
120
|
if (layout.CellValue && cellValueLabel != undefined) {
|
|
120
121
|
labels.cellValue = cellValueLabel;
|
|
@@ -124,11 +125,11 @@ const buildBarChartCellTextLabels = (props, cellValueLabel, percentageLabel) =>
|
|
|
124
125
|
}
|
|
125
126
|
return labels;
|
|
126
127
|
};
|
|
127
|
-
exports.
|
|
128
|
-
const
|
|
129
|
-
exports.
|
|
128
|
+
exports.buildBarStyleCellTextLabels = buildBarStyleCellTextLabels;
|
|
129
|
+
const hasBarStyleCellTextLabels = (labels) => Boolean(labels.cellValue || labels.percentage);
|
|
130
|
+
exports.hasBarStyleCellTextLabels = hasBarStyleCellTextLabels;
|
|
130
131
|
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
131
|
-
const
|
|
132
|
+
const joinBarStyleCellTextLabels = (labels) => {
|
|
132
133
|
const parts = [];
|
|
133
134
|
if (labels.cellValue)
|
|
134
135
|
parts.push(labels.cellValue);
|
|
@@ -136,15 +137,15 @@ const joinBarChartCellTextLabels = (labels) => {
|
|
|
136
137
|
parts.push(labels.percentage);
|
|
137
138
|
return parts.join(' ');
|
|
138
139
|
};
|
|
139
|
-
exports.
|
|
140
|
+
exports.joinBarStyleCellTextLabels = joinBarStyleCellTextLabels;
|
|
140
141
|
/**
|
|
141
142
|
* Resolve which placements are populated and what text goes in each cell of
|
|
142
143
|
* the 3 × 3 grid. Empty slots are omitted. Two values landing on the same
|
|
143
144
|
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
144
145
|
* Value before Percent Value.
|
|
145
146
|
*/
|
|
146
|
-
const
|
|
147
|
-
const layout = (0, exports.
|
|
147
|
+
const resolveBarStyleCellTextSlots = (props, labels) => {
|
|
148
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
148
149
|
// Iteration order matters when both values share a slot: Cell Value first,
|
|
149
150
|
// then Percent Value (matches the legacy "joined" behaviour).
|
|
150
151
|
const candidates = [];
|
|
@@ -179,9 +180,9 @@ const resolveBarChartCellTextSlots = (props, labels) => {
|
|
|
179
180
|
}
|
|
180
181
|
return Array.from(slotMap.values());
|
|
181
182
|
};
|
|
182
|
-
exports.
|
|
183
|
-
const
|
|
184
|
-
const layout = (0, exports.
|
|
183
|
+
exports.resolveBarStyleCellTextSlots = resolveBarStyleCellTextSlots;
|
|
184
|
+
const getBarStyleCellTextSlotPresence = (props) => {
|
|
185
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
185
186
|
const verticals = new Set();
|
|
186
187
|
if (layout.CellValue)
|
|
187
188
|
verticals.add(sanitizePlacement(layout.CellValue).Vertical);
|
|
@@ -193,7 +194,7 @@ const getBarChartCellTextSlotPresence = (props) => {
|
|
|
193
194
|
hasMerged: verticals.has('Merged'),
|
|
194
195
|
};
|
|
195
196
|
};
|
|
196
|
-
exports.
|
|
197
|
+
exports.getBarStyleCellTextSlotPresence = getBarStyleCellTextSlotPresence;
|
|
197
198
|
// ---------------------------------------------------------------------------
|
|
198
199
|
// Summary formatting
|
|
199
200
|
// ---------------------------------------------------------------------------
|
|
@@ -212,7 +213,7 @@ const formatPlacementSummary = (placement) => {
|
|
|
212
213
|
const { Horizontal, Vertical } = sanitizePlacement(placement);
|
|
213
214
|
return `${VERTICAL_LABEL[Vertical]}-${HORIZONTAL_LABEL[Horizontal]}`;
|
|
214
215
|
};
|
|
215
|
-
const
|
|
216
|
+
const formatBarStyleCellTextLayoutSummary = (layout) => {
|
|
216
217
|
const parts = [];
|
|
217
218
|
if (layout.CellValue) {
|
|
218
219
|
parts.push(`${formatTokenLabel('CellValue')}: ${formatPlacementSummary(layout.CellValue)}`);
|
|
@@ -222,7 +223,7 @@ const formatBarChartCellTextLayoutSummary = (layout) => {
|
|
|
222
223
|
}
|
|
223
224
|
return parts.length ? parts.join('; ') : undefined;
|
|
224
225
|
};
|
|
225
|
-
exports.
|
|
226
|
+
exports.formatBarStyleCellTextLayoutSummary = formatBarStyleCellTextLayoutSummary;
|
|
226
227
|
// ---------------------------------------------------------------------------
|
|
227
228
|
// DOM mount
|
|
228
229
|
// ---------------------------------------------------------------------------
|
|
@@ -282,12 +283,12 @@ const createCellTextRow = (slots, textClassName, compact) => {
|
|
|
282
283
|
}
|
|
283
284
|
return row;
|
|
284
285
|
};
|
|
285
|
-
const
|
|
286
|
+
const mountBarStyleCellText = (args) => {
|
|
286
287
|
const { cellTextProperties, labels, wrapperEl, textClassName } = args;
|
|
287
|
-
if (!(0, exports.
|
|
288
|
+
if (!(0, exports.hasBarStyleCellTextConfigured)(cellTextProperties) || !(0, exports.hasBarStyleCellTextLabels)(labels)) {
|
|
288
289
|
return;
|
|
289
290
|
}
|
|
290
|
-
const slots = (0, exports.
|
|
291
|
+
const slots = (0, exports.resolveBarStyleCellTextSlots)(cellTextProperties, labels);
|
|
291
292
|
if (!slots.length) {
|
|
292
293
|
return;
|
|
293
294
|
}
|
|
@@ -302,7 +303,7 @@ const mountBarChartCellText = (args) => {
|
|
|
302
303
|
// (i.e. the two tokens claim two separate bands of vertical space). When
|
|
303
304
|
// they share a vertical band — or when only one token is configured —
|
|
304
305
|
// we have room for the full-size font.
|
|
305
|
-
const layout = (0, exports.
|
|
306
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(cellTextProperties);
|
|
306
307
|
const compact = Boolean(layout.CellValue &&
|
|
307
308
|
layout.PercentValue &&
|
|
308
309
|
sanitizePlacement(layout.CellValue).Vertical !==
|
|
@@ -330,4 +331,4 @@ const mountBarChartCellText = (args) => {
|
|
|
330
331
|
mergedOverlayEl.append(row);
|
|
331
332
|
}
|
|
332
333
|
};
|
|
333
|
-
exports.
|
|
334
|
+
exports.mountBarStyleCellText = mountBarStyleCellText;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { IRowNode } from 'ag-grid-community';
|
|
3
|
-
import { StyledColumn } from '
|
|
4
|
-
import { CellColorRange, NumericStyledColumn } from '
|
|
5
|
-
import { GradientStyle } from '
|
|
6
|
-
import { AdaptableApi } from '
|
|
3
|
+
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
4
|
+
import { CellColorRange, NumericStyledColumn } from '../../../AdaptableState/StyledColumns/Common/NumericStyledColumn';
|
|
5
|
+
import { GradientStyle } from '../../../AdaptableState/StyledColumns/GradientStyle';
|
|
6
|
+
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
7
7
|
/**
|
|
8
8
|
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
9
9
|
* Slightly above zero so the bottom-edge value of every range still shows its
|
package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js}
RENAMED
|
@@ -8,9 +8,9 @@ exports.gradientStyleRangeLookupValueType = gradientStyleRangeLookupValueType;
|
|
|
8
8
|
exports.isNegativeZeroCentredBand = isNegativeZeroCentredBand;
|
|
9
9
|
const tslib_1 = require("tslib");
|
|
10
10
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
11
|
-
const StyleHelper_1 = require("
|
|
12
|
-
const StyleHelper_2 = require("
|
|
13
|
-
const
|
|
11
|
+
const StyleHelper_1 = require("../StyleHelper");
|
|
12
|
+
const StyleHelper_2 = require("../StyleHelper");
|
|
13
|
+
const NumberExtensions_1 = require("../../Extensions/NumberExtensions");
|
|
14
14
|
/**
|
|
15
15
|
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
16
16
|
* Slightly above zero so the bottom-edge value of every range still shows its
|
|
@@ -131,11 +131,11 @@ const getZeroCentredGradientPreviewCellStyle = (cellValue, gradientStyle) => {
|
|
|
131
131
|
const reverseGradient = matchingRange.Min === previewMin && matchingRange.Max === 0;
|
|
132
132
|
const minAlphaBound = gradientStyle.MinAlpha ?? exports.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
133
133
|
const maxAlphaBound = gradientStyle.MaxAlpha ?? exports.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
134
|
-
const lo = Math.min((0,
|
|
135
|
-
const hi = Math.max((0,
|
|
134
|
+
const lo = Math.min((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
135
|
+
const hi = Math.max((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
136
136
|
const span = Math.abs(max - min);
|
|
137
137
|
let t = span === 0 ? 0.5 : (Number(cellValue) - min) / span;
|
|
138
|
-
t = (0,
|
|
138
|
+
t = (0, NumberExtensions_1.clamp)(t, 0, 1);
|
|
139
139
|
if (reverseGradient) {
|
|
140
140
|
t = 1 - t;
|
|
141
141
|
}
|
|
@@ -197,11 +197,11 @@ const getGradientPreviewCellStyle = (cellValue, styledColumn, api, rowNode) => {
|
|
|
197
197
|
}
|
|
198
198
|
const minAlphaBound = gradientStyle.MinAlpha ?? exports.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
199
199
|
const maxAlphaBound = gradientStyle.MaxAlpha ?? exports.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
200
|
-
const lo = Math.min((0,
|
|
201
|
-
const hi = Math.max((0,
|
|
200
|
+
const lo = Math.min((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
201
|
+
const hi = Math.max((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
202
202
|
const span = Math.abs(max - min);
|
|
203
203
|
let t = span === 0 ? 0.5 : (Number(cellValue) - min) / span;
|
|
204
|
-
t = (0,
|
|
204
|
+
t = (0, NumberExtensions_1.clamp)(t, 0, 1);
|
|
205
205
|
if (reverseGradient) {
|
|
206
206
|
t = 1 - t;
|
|
207
207
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { IconStyleBuiltInPreset, IconStyleMapping } from '
|
|
1
|
+
import { IconStyleBuiltInPreset, IconStyleMapping } from '../../../AdaptableState/StyledColumns/IconStyle';
|
|
2
|
+
/**
|
|
3
|
+
* Icon Column Style resolves one key → glyph per scalar cell value; AdapTable
|
|
4
|
+
* array column types are not supported (use Badge Style for per-element visuals).
|
|
5
|
+
*/
|
|
6
|
+
export declare function isUnsupportedColumnDataTypeForIconStyle(dataType?: string): boolean;
|
|
2
7
|
export declare const ICON_STYLE_PRESETS: Record<IconStyleBuiltInPreset, IconStyleMapping[]>;
|
|
3
8
|
/** Returns a fresh copy of the mappings for a given preset. */
|
|
4
9
|
export declare const getIconStylePresetMappings: (preset: IconStyleBuiltInPreset) => IconStyleMapping[];
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICON_STYLE_PRESET_DESCRIPTIONS = exports.ICON_STYLE_PRESET_LABELS = exports.getIconStylePresetMappings = exports.ICON_STYLE_PRESETS = void 0;
|
|
4
|
+
exports.isUnsupportedColumnDataTypeForIconStyle = isUnsupportedColumnDataTypeForIconStyle;
|
|
5
|
+
/**
|
|
6
|
+
* Icon Column Style resolves one key → glyph per scalar cell value; AdapTable
|
|
7
|
+
* array column types are not supported (use Badge Style for per-element visuals).
|
|
8
|
+
*/
|
|
9
|
+
function isUnsupportedColumnDataTypeForIconStyle(dataType) {
|
|
10
|
+
switch (dataType) {
|
|
11
|
+
case 'textArray':
|
|
12
|
+
case 'numberArray':
|
|
13
|
+
case 'tupleArray':
|
|
14
|
+
case 'objectArray':
|
|
15
|
+
return true;
|
|
16
|
+
default:
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
4
20
|
/**
|
|
5
21
|
* Built-in {@link IconStyle} mapping presets.
|
|
6
22
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StyledColumn } from '
|
|
2
|
-
import { PercentBarStyle } from '
|
|
1
|
+
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
2
|
+
import { PercentBarStyle } from '../../../AdaptableState/StyledColumns/PercentBarStyle';
|
|
3
3
|
export declare const hasPercentBarRangesConfigured: (pb: PercentBarStyle | undefined) => boolean;
|
|
4
4
|
/** Illustrative scale for preview — shows negatives when origin is Auto or Zero. */
|
|
5
5
|
export declare const getPercentBarPreviewScale: (pb: PercentBarStyle) => {
|
package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js}
RENAMED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.hasPercentBarStylePreview = exports.getPercentBarPreviewResolvedBarColor = exports.getPercentBarPreviewTrackColor = exports.formatPercentBarPreviewCellText = exports.getPercentBarPreviewGeometry = exports.getPercentBarPreviewSampleValues = exports.getPercentBarPreviewScale = exports.hasPercentBarRangesConfigured = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const barChartCellText_1 = require("./barChartCellText");
|
|
4
|
+
const StyleHelper_1 = require("../StyleHelper");
|
|
5
|
+
const NumberExtensions_1 = require("../../Extensions/NumberExtensions");
|
|
6
|
+
const GradientStyleHelper_1 = require("./GradientStyleHelper");
|
|
7
|
+
const BarStylesHelper_1 = require("./BarStylesHelper");
|
|
9
8
|
const evenlySpacedValues = (min, max, count) => {
|
|
10
9
|
if (count <= 1) {
|
|
11
10
|
return [min];
|
|
@@ -17,7 +16,7 @@ const toFraction = (value, min, max) => {
|
|
|
17
16
|
if (max === min) {
|
|
18
17
|
return 0;
|
|
19
18
|
}
|
|
20
|
-
return (0,
|
|
19
|
+
return (0, NumberExtensions_1.clamp)((value - min) / (max - min), 0, 1);
|
|
21
20
|
};
|
|
22
21
|
const resolveOrigin = (percentBarStyle, cellValue, min, max) => {
|
|
23
22
|
const origin = percentBarStyle.Origin ?? 'Auto';
|
|
@@ -73,14 +72,14 @@ exports.hasPercentBarRangesConfigured = hasPercentBarRangesConfigured;
|
|
|
73
72
|
const getPercentBarPreviewScale = (pb) => {
|
|
74
73
|
const origin = pb.Origin ?? 'Auto';
|
|
75
74
|
if (origin === 'Zero' || origin === 'Auto') {
|
|
76
|
-
return { min:
|
|
75
|
+
return { min: GradientStyleHelper_1.ZERO_CENTRED_PREVIEW_SCALE_MIN, max: GradientStyleHelper_1.ZERO_CENTRED_PREVIEW_SCALE_MAX };
|
|
77
76
|
}
|
|
78
77
|
return { min: 0, max: 100 };
|
|
79
78
|
};
|
|
80
79
|
exports.getPercentBarPreviewScale = getPercentBarPreviewScale;
|
|
81
80
|
const getPercentBarPreviewSampleValues = (pb) => {
|
|
82
81
|
const { min, max } = (0, exports.getPercentBarPreviewScale)(pb);
|
|
83
|
-
return evenlySpacedValues(min, max,
|
|
82
|
+
return evenlySpacedValues(min, max, GradientStyleHelper_1.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
|
|
84
83
|
};
|
|
85
84
|
exports.getPercentBarPreviewSampleValues = getPercentBarPreviewSampleValues;
|
|
86
85
|
const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
|
|
@@ -115,7 +114,7 @@ const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
|
|
|
115
114
|
barWidthPercent = 0;
|
|
116
115
|
}
|
|
117
116
|
else {
|
|
118
|
-
percentageValue = (((0,
|
|
117
|
+
percentageValue = (((0, NumberExtensions_1.clamp)(numericValue, min, max) - min) / (max - min)) * 100;
|
|
119
118
|
const origin = resolveOrigin(pb, numericValue, min, max);
|
|
120
119
|
const valueFrac = toFraction(numericValue, min, max);
|
|
121
120
|
const originFrac = toFraction(origin, min, max);
|
|
@@ -133,8 +132,8 @@ const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
|
|
|
133
132
|
};
|
|
134
133
|
exports.getPercentBarPreviewGeometry = getPercentBarPreviewGeometry;
|
|
135
134
|
const formatPercentBarPreviewCellText = (numericValue, percentageValue, pb) => {
|
|
136
|
-
const labels = (0,
|
|
137
|
-
return (0,
|
|
135
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(pb.CellTextProperties, Number.isInteger(numericValue) ? String(numericValue) : numericValue.toFixed(1), `${percentageValue.toFixed(0)}%`);
|
|
136
|
+
return (0, BarStylesHelper_1.joinBarStyleCellTextLabels)(labels);
|
|
138
137
|
};
|
|
139
138
|
exports.formatPercentBarPreviewCellText = formatPercentBarPreviewCellText;
|
|
140
139
|
const getPercentBarPreviewTrackColor = (pb) => {
|
|
@@ -144,7 +143,7 @@ const getPercentBarPreviewTrackColor = (pb) => {
|
|
|
144
143
|
return pb.BackColor ?? undefined;
|
|
145
144
|
};
|
|
146
145
|
exports.getPercentBarPreviewTrackColor = getPercentBarPreviewTrackColor;
|
|
147
|
-
const getPercentBarPreviewResolvedBarColor = (color) => color ? (0, StyleHelper_1.getVariableColor)(color) : undefined;
|
|
146
|
+
const getPercentBarPreviewResolvedBarColor = (color) => (color ? (0, StyleHelper_1.getVariableColor)(color) : undefined);
|
|
148
147
|
exports.getPercentBarPreviewResolvedBarColor = getPercentBarPreviewResolvedBarColor;
|
|
149
148
|
const hasPercentBarStylePreview = (styledColumn) => (0, exports.hasPercentBarRangesConfigured)(styledColumn.PercentBarStyle);
|
|
150
149
|
exports.hasPercentBarStylePreview = hasPercentBarStylePreview;
|
package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveSparklineOptionsForRender = resolveSparklineOptionsForRender;
|
|
4
|
-
const StyleHelper_1 = require("
|
|
4
|
+
const StyleHelper_1 = require("../StyleHelper");
|
|
5
5
|
const resolveCssColor = (color) => {
|
|
6
6
|
if (color == null || color === '') {
|
|
7
7
|
return color;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
+
import type { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
3
|
+
import type { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
4
|
+
import type { RowScope } from '../../../AdaptableState/Common/RowScope';
|
|
5
|
+
/**
|
|
6
|
+
* Row kinds used by {@link RowScope} and the Styled Column Scope wizard.
|
|
7
|
+
* All are available to all Styled Columns with exception of Sparkline (which is data rows only)
|
|
8
|
+
*/
|
|
9
|
+
export type StyledColumnRowKind = 'Data' | 'Group' | 'Summary' | 'Total';
|
|
10
|
+
export declare const STYLED_COLUMN_ROW_KINDS: StyledColumnRowKind[];
|
|
11
|
+
export declare const STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY: Record<StyledColumnRowKind, keyof RowScope>;
|
|
12
|
+
export declare const isStyledColumnRowKindSupported: (styledColumn: StyledColumn, kind: StyledColumnRowKind) => boolean;
|
|
13
|
+
export declare const getStyledColumnRowKindDisabledReason: (styledColumn: StyledColumn, kind: StyledColumnRowKind) => string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Classifies the AG Grid row node into a single {@link StyledColumnRowKind}.
|
|
16
|
+
* Order matches {@link shouldRenderStyledColumnOnRow}: total before summary,
|
|
17
|
+
* summary before group.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getStyledColumnRowKindForNode: (node: IRowNode, api: AdaptableApi) => StyledColumnRowKind;
|
|
20
|
+
/**
|
|
21
|
+
* Forces `Exclude*` to `true` for row kinds that do not apply to the current
|
|
22
|
+
* Styled Column type, so persisted state cannot contradict the capability
|
|
23
|
+
* matrix. Returns `undefined` when no change is needed.
|
|
24
|
+
*/
|
|
25
|
+
export declare const sanitizeStyledColumnRowScope: (styledColumn: StyledColumn) => RowScope | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Returns `true` when the Styled Column should render on the given row.
|
|
28
|
+
*
|
|
29
|
+
* Single source of truth consulted by every styled-column cell renderer
|
|
30
|
+
* (Badge / Icon / Rating / Percent Bar / Bullet Chart / Range Bar) and
|
|
31
|
+
* by `getStyledColumnStyle` (Gradient / Percent Bar cellStyle).
|
|
32
|
+
*
|
|
33
|
+
* Semantics:
|
|
34
|
+
* - **Type capabilities** first: some types never target certain row kinds
|
|
35
|
+
* (see {@link isStyledColumnRowKindSupported}). Unsupported kinds always
|
|
36
|
+
* return `false` regardless of `RowScope`.
|
|
37
|
+
* - When `StyledColumn.RowScope` is **set**, the explicit `Exclude*`
|
|
38
|
+
* flags win. Unset flags default to "include" — i.e. `RowScope: {}`
|
|
39
|
+
* means "render on every *supported* row kind".
|
|
40
|
+
* - When `StyledColumn.RowScope` is **unset**, the historical per-type
|
|
41
|
+
* default applies:
|
|
42
|
+
* - Badge: render on every row kind (that the type supports).
|
|
43
|
+
* - All other types: render on every row kind *except* group rows
|
|
44
|
+
* (matches the hardcoded "isGroupRowNode → plain text" check that
|
|
45
|
+
* every other styled-column renderer used to carry), again
|
|
46
|
+
* intersected with type capabilities (e.g. Sparkline → data only).
|
|
47
|
+
*
|
|
48
|
+
* The per-type default lets us promote `RowScope` cleanly without
|
|
49
|
+
* altering existing user-visible behaviour: state that doesn't mention
|
|
50
|
+
* `RowScope` keeps rendering exactly as before.
|
|
51
|
+
*/
|
|
52
|
+
export declare const shouldRenderStyledColumnOnRow: (styledColumn: StyledColumn, node: IRowNode, api: AdaptableApi) => boolean;
|