@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
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Split a string into words: handles camelCase, PascalCase, UPPER_CASE,
|
|
3
|
-
* UPPER_SNAKE_CASE, snake_case, kebab-case, spaces, and dot.notation.
|
|
4
|
-
*
|
|
5
|
-
* Shared helper used by kebabCase, startCase, and sentenceCase.
|
|
6
|
-
*/
|
|
7
|
-
export default function words(str: string): string[];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = words;
|
|
4
|
-
/**
|
|
5
|
-
* Split a string into words: handles camelCase, PascalCase, UPPER_CASE,
|
|
6
|
-
* UPPER_SNAKE_CASE, snake_case, kebab-case, spaces, and dot.notation.
|
|
7
|
-
*
|
|
8
|
-
* Shared helper used by kebabCase, startCase, and sentenceCase.
|
|
9
|
-
*/
|
|
10
|
-
function words(str) {
|
|
11
|
-
const matches = str.match(/[A-Z]?[a-z]+|[A-Z]+(?=[A-Z][a-z]|\d|$|[^a-zA-Z0-9])|[A-Z]|[0-9]+/g);
|
|
12
|
-
return matches || [];
|
|
13
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BarChartCellTextLayoutEditor = 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 barChartCellText_1 = require("../../../../../Utilities/Helpers/barChartCellText");
|
|
8
|
-
const CheckBox_1 = require("../../../../../components/CheckBox");
|
|
9
|
-
const Flex_1 = require("../../../../../components/Flex");
|
|
10
|
-
const NewSelect_1 = require("../../../../../components/NewSelect");
|
|
11
|
-
const TOKEN_LABELS = {
|
|
12
|
-
CellValue: 'Cell Value',
|
|
13
|
-
PercentageValue: 'Percent Value',
|
|
14
|
-
};
|
|
15
|
-
const TOKENS = ['CellValue', 'PercentageValue'];
|
|
16
|
-
const HORIZONTAL_CHOICES = [
|
|
17
|
-
{ value: 'Left', label: 'Left' },
|
|
18
|
-
{ value: 'Center', label: 'Center' },
|
|
19
|
-
{ value: 'Right', label: 'Right' },
|
|
20
|
-
];
|
|
21
|
-
const VERTICAL_CHOICES = [
|
|
22
|
-
{ value: 'Above', label: 'Above Bar' },
|
|
23
|
-
{ value: 'Below', label: 'Below Bar' },
|
|
24
|
-
{ value: 'Merged', label: 'Merged' },
|
|
25
|
-
];
|
|
26
|
-
const tokenKey = (token) => token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
27
|
-
const BarChartCellTextLayoutEditor = ({ disabled, cellTextProperties, onToggle, onPlacementChange }) => {
|
|
28
|
-
const layout = (0, barChartCellText_1.resolveBarChartCellTextLayout)(cellTextProperties);
|
|
29
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:inline-grid twa:grid-cols-[160px_140px_140px] twa:gap-x-4 twa:gap-y-2 twa:items-center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:font-medium twa:opacity-80", children: "Value" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:font-medium twa:opacity-80", children: "Horizontal" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:font-medium twa:opacity-80", children: "Vertical" }), TOKENS.map((token) => {
|
|
30
|
-
const placement = layout[tokenKey(token)];
|
|
31
|
-
const isShown = Boolean(placement);
|
|
32
|
-
const rowDisabled = disabled || !isShown;
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: isShown, onChange: (checked) => onToggle(token, checked), children: TOKEN_LABELS[token] }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", disabled: rowDisabled, value: placement?.Horizontal ?? 'Left', onValueChange: (v) => onPlacementChange(token, {
|
|
34
|
-
Horizontal: v,
|
|
35
|
-
}), items: HORIZONTAL_CHOICES }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", disabled: rowDisabled, value: placement?.Vertical ?? 'Below', onValueChange: (v) => onPlacementChange(token, {
|
|
36
|
-
Vertical: v,
|
|
37
|
-
}), items: VERTICAL_CHOICES }) })] }, token));
|
|
38
|
-
})] }));
|
|
39
|
-
};
|
|
40
|
-
exports.BarChartCellTextLayoutEditor = BarChartCellTextLayoutEditor;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { MenuItemDef } from 'ag-grid-enterprise';
|
|
2
|
-
import { AdaptableApi } from '../types';
|
|
3
|
-
import { ColumnMenuContext } from '../AdaptableState/Common/Menu';
|
|
4
|
-
/**
|
|
5
|
-
* Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
|
|
6
|
-
*
|
|
7
|
-
* AG Grid does not allow customizing the built-in submenu, so we rebuild an
|
|
8
|
-
* equivalent one: the column's existing aggregation functions plus a
|
|
9
|
-
* `Weighted Average` item whose submenu lists the numeric columns that can be
|
|
10
|
-
* used as the weight parameter.
|
|
11
|
-
*
|
|
12
|
-
* Both standard and weighted selections persist through the current Layout
|
|
13
|
-
* (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
|
|
14
|
-
* chosen `weightedColumnId` back from the Layout.
|
|
15
|
-
*
|
|
16
|
-
* Weighted Average is never used in Pivot Layouts, so this only deals with the
|
|
17
|
-
* Table Layout aggregations and the caller skips it entirely in Pivot mode.
|
|
18
|
-
*/
|
|
19
|
-
export declare function buildValueAggregationMenuItem(adaptableApi: AdaptableApi, menuContext: ColumnMenuContext): MenuItemDef;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildValueAggregationMenuItem = buildValueAggregationMenuItem;
|
|
4
|
-
const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
|
|
5
|
-
const toFuncLabel = (funcName) => {
|
|
6
|
-
if (funcName === 'avg') {
|
|
7
|
-
return 'Average';
|
|
8
|
-
}
|
|
9
|
-
if (funcName === 'weightedAvg') {
|
|
10
|
-
return 'Weighted Average';
|
|
11
|
-
}
|
|
12
|
-
return funcName ? funcName.charAt(0).toUpperCase() + funcName.slice(1) : funcName;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
|
|
16
|
-
*
|
|
17
|
-
* AG Grid does not allow customizing the built-in submenu, so we rebuild an
|
|
18
|
-
* equivalent one: the column's existing aggregation functions plus a
|
|
19
|
-
* `Weighted Average` item whose submenu lists the numeric columns that can be
|
|
20
|
-
* used as the weight parameter.
|
|
21
|
-
*
|
|
22
|
-
* Both standard and weighted selections persist through the current Layout
|
|
23
|
-
* (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
|
|
24
|
-
* chosen `weightedColumnId` back from the Layout.
|
|
25
|
-
*
|
|
26
|
-
* Weighted Average is never used in Pivot Layouts, so this only deals with the
|
|
27
|
-
* Table Layout aggregations and the caller skips it entirely in Pivot mode.
|
|
28
|
-
*/
|
|
29
|
-
function buildValueAggregationMenuItem(adaptableApi, menuContext) {
|
|
30
|
-
const column = menuContext.adaptableColumn;
|
|
31
|
-
const columnId = column.columnId;
|
|
32
|
-
const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
|
|
33
|
-
const aggregationColumns = currentLayout.TableAggregationColumns || [];
|
|
34
|
-
const currentAggFunc = aggregationColumns.find((agg) => agg.ColumnId === columnId)?.AggFunc;
|
|
35
|
-
let activeAggFuncName;
|
|
36
|
-
if (currentAggFunc != null) {
|
|
37
|
-
const aggFuncName = (0, AggregationColumns_1.getAggFuncName)(currentAggFunc);
|
|
38
|
-
activeAggFuncName = aggFuncName === true ? column.aggregationFunction : aggFuncName;
|
|
39
|
-
}
|
|
40
|
-
const activeWeightColumnId = (0, AggregationColumns_1.isWeightedAverageAggregation)(currentAggFunc)
|
|
41
|
-
? currentAggFunc.weightedColumnId
|
|
42
|
-
: undefined;
|
|
43
|
-
const applyAggregation = (aggFuncValue) => {
|
|
44
|
-
const upsert = (cols) => {
|
|
45
|
-
const list = cols ? [...cols] : [];
|
|
46
|
-
const index = list.findIndex((col) => col.ColumnId === columnId);
|
|
47
|
-
if (index >= 0) {
|
|
48
|
-
list[index] = { ...list[index], AggFunc: aggFuncValue };
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
list.push({ ColumnId: columnId, AggFunc: aggFuncValue });
|
|
52
|
-
}
|
|
53
|
-
return list;
|
|
54
|
-
};
|
|
55
|
-
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
56
|
-
const tableLayout = layout;
|
|
57
|
-
return {
|
|
58
|
-
...tableLayout,
|
|
59
|
-
TableAggregationColumns: upsert(tableLayout.TableAggregationColumns),
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const removeAggregation = () => {
|
|
64
|
-
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
65
|
-
const tableLayout = layout;
|
|
66
|
-
return {
|
|
67
|
-
...tableLayout,
|
|
68
|
-
TableAggregationColumns: (tableLayout.TableAggregationColumns || []).filter((col) => col.ColumnId !== columnId),
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
// 'None' clears any aggregation for the column and is checked when none is set
|
|
73
|
-
const subMenu = [
|
|
74
|
-
{
|
|
75
|
-
name: 'None',
|
|
76
|
-
checked: activeAggFuncName == null,
|
|
77
|
-
action: () => removeAggregation(),
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
// getDisplayAggFuncNames already positions weightedAvg right after 'avg'
|
|
81
|
-
// (and only includes it when the column is eligible)
|
|
82
|
-
const aggFuncItems = (0, AggregationColumns_1.getDisplayAggFuncNames)(column).map((funcName) => {
|
|
83
|
-
// Weighted Average needs a weight column parameter, so instead of a plain
|
|
84
|
-
// action it gets a submenu listing the numeric columns usable as the weight.
|
|
85
|
-
if (funcName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME) {
|
|
86
|
-
const weightColumnItems = adaptableApi.columnApi
|
|
87
|
-
.getNumericColumns()
|
|
88
|
-
.filter((numericColumn) => numericColumn.columnId !== columnId)
|
|
89
|
-
.map((numericColumn) => ({
|
|
90
|
-
name: numericColumn.friendlyName ?? numericColumn.columnId,
|
|
91
|
-
checked: activeWeightColumnId === numericColumn.columnId,
|
|
92
|
-
action: () => applyAggregation({
|
|
93
|
-
type: 'weightedAverage',
|
|
94
|
-
weightedColumnId: numericColumn.columnId,
|
|
95
|
-
}),
|
|
96
|
-
}));
|
|
97
|
-
return {
|
|
98
|
-
name: 'Weighted Average',
|
|
99
|
-
checked: activeAggFuncName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME,
|
|
100
|
-
subMenu: weightColumnItems,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
return {
|
|
104
|
-
name: toFuncLabel(funcName),
|
|
105
|
-
checked: activeAggFuncName === funcName,
|
|
106
|
-
action: () => applyAggregation(funcName),
|
|
107
|
-
};
|
|
108
|
-
});
|
|
109
|
-
subMenu.push(...aggFuncItems);
|
|
110
|
-
return {
|
|
111
|
-
name: 'Value Aggregation',
|
|
112
|
-
subMenu,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
-
import type { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
|
-
import type { StyledColumn } from '../../AdaptableState/StyledColumnState';
|
|
4
|
-
/**
|
|
5
|
-
* Returns `true` when the Styled Column should render on the given row.
|
|
6
|
-
*
|
|
7
|
-
* Single source of truth consulted by every styled-column cell renderer
|
|
8
|
-
* (Badge / Icon / Rating / Percent Bar / Bullet Chart / Range Bar) and
|
|
9
|
-
* by `getStyledColumnStyle` (Gradient / Percent Bar cellStyle).
|
|
10
|
-
*
|
|
11
|
-
* Semantics:
|
|
12
|
-
* - **Type capabilities** first: some types never target certain row kinds
|
|
13
|
-
* (see `styledColumnRowKindSupport.ts`). Unsupported kinds always
|
|
14
|
-
* return `false` regardless of `RowScope`.
|
|
15
|
-
* - When `StyledColumn.RowScope` is **set**, the explicit `Exclude*`
|
|
16
|
-
* flags win. Unset flags default to "include" — i.e. `RowScope: {}`
|
|
17
|
-
* means "render on every *supported* row kind".
|
|
18
|
-
* - When `StyledColumn.RowScope` is **unset**, the historical per-type
|
|
19
|
-
* default applies:
|
|
20
|
-
* - Badge: render on every row kind (that the type supports).
|
|
21
|
-
* - All other types: render on every row kind *except* group rows
|
|
22
|
-
* (matches the hardcoded "isGroupRowNode → plain text" check that
|
|
23
|
-
* every other styled-column renderer used to carry), again
|
|
24
|
-
* intersected with type capabilities (e.g. Sparkline → data only).
|
|
25
|
-
*
|
|
26
|
-
* The per-type default lets us promote `RowScope` cleanly without
|
|
27
|
-
* altering existing user-visible behaviour: state that doesn't mention
|
|
28
|
-
* `RowScope` keeps rendering exactly as before.
|
|
29
|
-
*/
|
|
30
|
-
export declare const shouldRenderStyledColumnOnRow: (styledColumn: StyledColumn, node: IRowNode, api: AdaptableApi) => boolean;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldRenderStyledColumnOnRow = void 0;
|
|
4
|
-
const styledColumnRowKindSupport_1 = require("../../Utilities/Helpers/styledColumnRowKindSupport");
|
|
5
|
-
/**
|
|
6
|
-
* Returns `true` when the Styled Column should render on the given row.
|
|
7
|
-
*
|
|
8
|
-
* Single source of truth consulted by every styled-column cell renderer
|
|
9
|
-
* (Badge / Icon / Rating / Percent Bar / Bullet Chart / Range Bar) and
|
|
10
|
-
* by `getStyledColumnStyle` (Gradient / Percent Bar cellStyle).
|
|
11
|
-
*
|
|
12
|
-
* Semantics:
|
|
13
|
-
* - **Type capabilities** first: some types never target certain row kinds
|
|
14
|
-
* (see `styledColumnRowKindSupport.ts`). Unsupported kinds always
|
|
15
|
-
* return `false` regardless of `RowScope`.
|
|
16
|
-
* - When `StyledColumn.RowScope` is **set**, the explicit `Exclude*`
|
|
17
|
-
* flags win. Unset flags default to "include" — i.e. `RowScope: {}`
|
|
18
|
-
* means "render on every *supported* row kind".
|
|
19
|
-
* - When `StyledColumn.RowScope` is **unset**, the historical per-type
|
|
20
|
-
* default applies:
|
|
21
|
-
* - Badge: render on every row kind (that the type supports).
|
|
22
|
-
* - All other types: render on every row kind *except* group rows
|
|
23
|
-
* (matches the hardcoded "isGroupRowNode → plain text" check that
|
|
24
|
-
* every other styled-column renderer used to carry), again
|
|
25
|
-
* intersected with type capabilities (e.g. Sparkline → data only).
|
|
26
|
-
*
|
|
27
|
-
* The per-type default lets us promote `RowScope` cleanly without
|
|
28
|
-
* altering existing user-visible behaviour: state that doesn't mention
|
|
29
|
-
* `RowScope` keeps rendering exactly as before.
|
|
30
|
-
*/
|
|
31
|
-
const shouldRenderStyledColumnOnRow = (styledColumn, node, api) => {
|
|
32
|
-
const rowKind = (0, styledColumnRowKindSupport_1.getStyledColumnRowKindForNode)(node, api);
|
|
33
|
-
if (!(0, styledColumnRowKindSupport_1.isStyledColumnRowKindSupported)(styledColumn, rowKind)) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
const isGroup = api.gridApi.isGroupRowNode(node);
|
|
37
|
-
const isTotal = api.gridApi.isGrandTotalRowNode(node);
|
|
38
|
-
const isSummary = !isTotal && api.gridApi.isSummaryNode(node);
|
|
39
|
-
const isLeaf = !isGroup && !isSummary && !isTotal;
|
|
40
|
-
const scope = styledColumn.RowScope;
|
|
41
|
-
if (scope) {
|
|
42
|
-
if (isLeaf && scope.ExcludeDataRows)
|
|
43
|
-
return false;
|
|
44
|
-
if (isGroup && scope.ExcludeGroupRows)
|
|
45
|
-
return false;
|
|
46
|
-
if (isSummary && scope.ExcludeSummaryRows)
|
|
47
|
-
return false;
|
|
48
|
-
if (isTotal && scope.ExcludeTotalRows)
|
|
49
|
-
return false;
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
// No explicit RowScope → fall back to historical per-type behaviour.
|
|
53
|
-
if (styledColumn.BadgeStyle) {
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
return !isGroup;
|
|
57
|
-
};
|
|
58
|
-
exports.shouldRenderStyledColumnOnRow = shouldRenderStyledColumnOnRow;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates an AG Grid icon element for the given icon name.
|
|
3
|
-
*
|
|
4
|
-
* Mimics AG Grid's internal icon creation, producing a
|
|
5
|
-
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
6
|
-
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
7
|
-
*
|
|
8
|
-
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
9
|
-
*/
|
|
10
|
-
export declare function createAgGridIcon(name: string): HTMLElement;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAgGridIcon = createAgGridIcon;
|
|
4
|
-
/**
|
|
5
|
-
* Creates an AG Grid icon element for the given icon name.
|
|
6
|
-
*
|
|
7
|
-
* Mimics AG Grid's internal icon creation, producing a
|
|
8
|
-
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
9
|
-
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
10
|
-
*
|
|
11
|
-
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
12
|
-
*/
|
|
13
|
-
function createAgGridIcon(name) {
|
|
14
|
-
const element = document.createElement('span');
|
|
15
|
-
element.className = `ag-icon ag-icon-${name}`;
|
|
16
|
-
element.setAttribute('role', 'presentation');
|
|
17
|
-
element.setAttribute('unselectable', 'on');
|
|
18
|
-
return element;
|
|
19
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/AdaptableState/StyledColumns/Common/{BarChartMarker.js → BarStyleProperties.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|