@adaptabletools/adaptable-cjs 22.0.0-canary.8 → 22.0.0
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/agGrid.d.ts +9 -9
- package/agGrid.js +1 -0
- package/index.css +1157 -1319
- package/index.css.map +1 -1
- package/index.d.ts +66 -0
- package/index.js +85 -0
- package/package.json +3 -6
- package/src/AdaptableOptions/ColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +13 -13
- package/src/AdaptableState/Common/AdaptableForm.d.ts +1 -1
- package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -0
- package/src/AdaptableState/Common/AggregationColumns.js +2 -1
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +15 -5
- package/src/AdaptableState/Common/TransposeConfig.d.ts +4 -9
- package/src/AdaptableState/InitialState.d.ts +1 -1
- package/src/AdaptableState/UserInterfaceState.d.ts +1 -1
- package/src/Api/ColumnApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +4 -0
- package/src/Api/Implementation/ApiBase.d.ts +1 -1
- package/src/Api/Implementation/ApiBase.js +1 -1
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +4 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +6 -5
- package/src/Api/Implementation/LayoutHelpers.js +1 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +1 -1
- package/src/Api/Internal/ColumnInternalApi.js +5 -3
- package/src/Api/Internal/EventInternalApi.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -6
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/Strategy/StyledColumnModule.js +14 -6
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Strategy/Utilities/FormatColumn/{getFormatColumnSettingsTargetItems.d.ts → getFormatColumnRowTargetItems.d.ts} +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnRowTargetItems.js +26 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +5 -13
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
- package/src/Utilities/Helpers/FormatHelper.js +2 -2
- package/src/Utilities/Hooks/index.d.ts +1 -2
- package/src/Utilities/Hooks/index.js +1 -3
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +2 -2
- package/src/Utilities/getScopeViewItems.js +1 -1
- package/src/Utilities/only.d.ts +15 -0
- package/src/Utilities/only.js +58 -0
- package/src/Utilities/utils/chunk.d.ts +6 -0
- package/src/Utilities/utils/chunk.js +20 -0
- package/src/Utilities/utils/clamp.d.ts +5 -0
- package/src/Utilities/utils/clamp.js +10 -0
- package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
- package/src/Utilities/utils/cloneDeepWith.js +70 -0
- package/src/Utilities/utils/debounce.d.ts +20 -0
- package/src/Utilities/utils/debounce.js +124 -0
- package/src/Utilities/utils/flatten.d.ts +5 -0
- package/src/Utilities/utils/flatten.js +10 -0
- package/src/Utilities/utils/flattenDeep.d.ts +5 -0
- package/src/Utilities/utils/flattenDeep.js +10 -0
- package/src/Utilities/utils/get.d.ts +6 -0
- package/src/Utilities/utils/get.js +38 -0
- package/src/Utilities/utils/index.d.ts +22 -0
- package/src/Utilities/utils/index.js +48 -0
- package/src/Utilities/utils/isArray.d.ts +6 -0
- package/src/Utilities/utils/isArray.js +8 -0
- package/src/Utilities/utils/isEqual.d.ts +5 -0
- package/src/Utilities/utils/isEqual.js +127 -0
- package/src/Utilities/utils/isObject.d.ts +6 -0
- package/src/Utilities/utils/isObject.js +12 -0
- package/src/Utilities/utils/isPlainObject.d.ts +6 -0
- package/src/Utilities/utils/isPlainObject.js +20 -0
- package/src/Utilities/utils/kebabCase.d.ts +5 -0
- package/src/Utilities/utils/kebabCase.js +12 -0
- package/src/Utilities/utils/merge.d.ts +11 -0
- package/src/Utilities/utils/merge.js +44 -0
- package/src/Utilities/utils/mergeWith.d.ts +7 -0
- package/src/Utilities/utils/mergeWith.js +50 -0
- package/src/Utilities/utils/orderBy.d.ts +8 -0
- package/src/Utilities/utils/orderBy.js +33 -0
- package/src/Utilities/utils/parseInt.d.ts +6 -0
- package/src/Utilities/utils/parseInt.js +12 -0
- package/src/Utilities/utils/sentenceCase.d.ts +6 -0
- package/src/Utilities/utils/sentenceCase.js +19 -0
- package/src/Utilities/utils/startCase.d.ts +5 -0
- package/src/Utilities/utils/startCase.js +15 -0
- package/src/Utilities/utils/throttle.d.ts +17 -0
- package/src/Utilities/utils/throttle.js +23 -0
- package/src/Utilities/utils/toNumber.d.ts +5 -0
- package/src/Utilities/utils/toNumber.js +42 -0
- package/src/Utilities/utils/uniq.d.ts +7 -0
- package/src/Utilities/utils/uniq.js +12 -0
- package/src/Utilities/utils/uniqBy.d.ts +8 -0
- package/src/Utilities/utils/uniqBy.js +25 -0
- package/src/Utilities/utils/words.d.ts +7 -0
- package/src/Utilities/utils/words.js +13 -0
- package/src/Utilities/weightedAverage.js +1 -1
- package/src/View/AdaptableComputedCSSVarsContext.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ValueSelector/index.js +7 -2
- package/src/View/Dashboard/CustomDashboardButton.js +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +4 -3
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
- package/src/View/Export/Wizard/NewReportWizard.js +8 -8
- package/src/View/Filter/FilterViewPanel.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +19 -10
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.js +86 -0
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -10
- package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/TransposedPopup.js +0 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Note/NoteEditor.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeRowsSection.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/{StyledColumnWizardSettingsSection.js → StyledColumnBadgeRowsSection.js} +22 -22
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +10 -11
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
- package/src/View/Theme/ThemeEditor.js +1 -1
- package/src/View/Theme/ThemeField.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/View/Wizard/OnePageWizards.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +25 -6
- package/src/agGrid/AgGridAdapter.js +4 -4
- package/src/agGrid/AgGridColumnAdapter.js +11 -4
- package/src/agGrid/AgGridExportAdapter.d.ts +2 -2
- package/src/agGrid/AgGridExportAdapter.js +7 -6
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +17 -5
- package/src/components/ColorPicker/ColorPicker.js +1 -1
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.js +4 -0
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +12 -1
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade22.js +9 -0
- package/src/types.d.ts +2 -2
- package/themes/dark.css +2 -3
- package/themes/light.css +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -16
- package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
- package/src/Utilities/Hooks/useAdaptableState.js +0 -42
- package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
- package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -37
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +0 -8
- /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.d.ts → FormatColumnColumnScopeWizardSection.d.ts} +0 -0
- /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.js → FormatColumnColumnScopeWizardSection.js} +0 -0
|
@@ -25,14 +25,14 @@ const QueryViewPanelComponent = (props) => {
|
|
|
25
25
|
const disabled = isReadOnly || isSuspended || gridFilterAccessLevel === 'ReadOnly';
|
|
26
26
|
const buttonExpand = (React.createElement(ButtonExpand_1.ButtonExpand, { disabled: disabled, accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", onClick: onExpand, tooltip: "Edit the Expression in UI", className: "twa:ml-1" }));
|
|
27
27
|
const renderExpressionLabel = () => {
|
|
28
|
-
const baseClasses = 'twa:font-mono twa:text-
|
|
28
|
+
const baseClasses = 'twa:font-mono twa:text-s twa:py-2 twa:px-2 twa:overflow-hidden twa:text-ellipsis twa:whitespace-nowrap twa:bg-defaultbackground twa:text-text-on-defaultbackground twa:rounded twa:cursor-pointer twa:leading-4 twa:flex twa:items-center';
|
|
29
29
|
const placeholderClasses = 'twa:text-gray-400 twa:italic';
|
|
30
30
|
const labelClassName = (0, clsx_1.default)(baseClasses, {
|
|
31
31
|
[placeholderClasses]: !expression,
|
|
32
32
|
});
|
|
33
33
|
const expressionLabel = (React.createElement(Tooltip_1.default, { label: expression || 'Click to edit Grid Filter' },
|
|
34
|
-
React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('twa:flex-1 twa:h-full twa:min-w-0', labelClassName), "data-name": "grid-filter-input", onClick: onExpand }, expression || 'Grid Filter')));
|
|
35
|
-
return (React.createElement(FieldWrap_1.default, { className: "twa:flex-1 twa:min-w-0 twa:overflow-visible" },
|
|
34
|
+
React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('twa:flex-1 twa:h-full twa:min-w-0', labelClassName), "data-name": "grid-filter-input", onClick: onExpand }, expression || 'Grid Filter...')));
|
|
35
|
+
return (React.createElement(FieldWrap_1.default, { className: "twa:flex-1 twa:min-w-0 twa:min-h-input twa:overflow-visible" },
|
|
36
36
|
buttonExpand,
|
|
37
37
|
expressionLabel,
|
|
38
38
|
gridFilter && !isExpressionValid && (React.createElement(ButtonInvalid_1.ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Grid Filter" }))));
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
7
7
|
const react_redux_1 = require("react-redux");
|
|
8
|
-
const isEqual_1 = tslib_1.__importDefault(require("
|
|
8
|
+
const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
|
|
9
9
|
const Select_1 = require("../../components/Select");
|
|
10
10
|
const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
|
|
11
11
|
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
@@ -84,7 +84,6 @@ const TransposedPopup = (props) => {
|
|
|
84
84
|
const transposeConfig = {
|
|
85
85
|
transposedColumnId: rawConfig.transposedColumnId ?? primaryKey,
|
|
86
86
|
hideTransposedColumn: rawConfig.hideTransposedColumn ?? true,
|
|
87
|
-
autosize: rawConfig.autosize ?? true,
|
|
88
87
|
columnsToTranspose: rawConfig.columnsToTranspose,
|
|
89
88
|
rowsToTranspose: rawConfig.rowsToTranspose,
|
|
90
89
|
};
|
|
@@ -370,7 +370,7 @@ const ColumnsSection = (props) => {
|
|
|
370
370
|
const visibleIds = layout.TableColumns.filter((colId) => {
|
|
371
371
|
return (layout.ColumnVisibility?.[colId] !== false &&
|
|
372
372
|
adaptable.api.columnApi.isSelectionColumn(colId) === false &&
|
|
373
|
-
!adaptable.api.columnApi.internalApi.
|
|
373
|
+
!adaptable.api.columnApi.internalApi.isColumnUIHidden(colId));
|
|
374
374
|
});
|
|
375
375
|
const currentlyDisplayedColumnIds = searchInputValue
|
|
376
376
|
? currentOrder
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NoteEditor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const throttle_1 = tslib_1.__importDefault(require("
|
|
5
|
+
const throttle_1 = tslib_1.__importDefault(require("../../Utilities/utils/throttle"));
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const Textarea_1 = tslib_1.__importDefault(require("../../components/Textarea"));
|
|
8
8
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useQuickSearchDebounced = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const debounce_1 = tslib_1.__importDefault(require("
|
|
6
|
+
const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
|
|
7
7
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
8
8
|
const useQuickSearchDebounced = (props) => {
|
|
9
9
|
const [searchText, setSearchText] = (0, react_1.useState)(props.QuickSearchText ?? '');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SpecialColumnSettingsWizardStep = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const chunk_1 = tslib_1.__importDefault(require("
|
|
5
|
+
const chunk_1 = tslib_1.__importDefault(require("../Utilities/utils/chunk"));
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const CheckBox_1 = require("../components/CheckBox");
|
|
8
8
|
const FormLayout_1 = tslib_1.__importStar(require("../components/FormLayout"));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyledColumn } from '../../../types';
|
|
3
|
+
type StyledColumnBadgeRowsSectionProps = {
|
|
4
|
+
onChange: (data: StyledColumn) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const renderStyledColumnBadgeRowsSummary: (data: StyledColumn) => React.JSX.Element;
|
|
7
|
+
export declare const StyledColumnBadgeRowsSection: (props: StyledColumnBadgeRowsSectionProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StyledColumnBadgeRowsSection = exports.renderStyledColumnBadgeRowsSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
@@ -9,7 +9,7 @@ const Tabs_1 = require("../../../components/Tabs");
|
|
|
9
9
|
const Tag_1 = require("../../../components/Tag");
|
|
10
10
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
11
11
|
const Flex_1 = require("../../../components/Flex");
|
|
12
|
-
const
|
|
12
|
+
const renderStyledColumnBadgeRowsSummary = (data) => {
|
|
13
13
|
const badgeStyle = data;
|
|
14
14
|
return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
15
15
|
React.createElement(Flex_1.Box, { className: "twa:mt-3" },
|
|
@@ -26,82 +26,82 @@ const renderStyledColumnWizardSettingsSummary = (data) => {
|
|
|
26
26
|
"Total Rows ",
|
|
27
27
|
React.createElement(Tag_1.Tag, null, badgeStyle.RowScope?.ExcludeTotalRows ? 'no' : 'yes'))));
|
|
28
28
|
};
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
29
|
+
exports.renderStyledColumnBadgeRowsSummary = renderStyledColumnBadgeRowsSummary;
|
|
30
|
+
const StyledColumnBadgeRowsSection = (props) => {
|
|
31
31
|
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
32
|
-
const onExcludeDataRowsChanged = (
|
|
32
|
+
const onExcludeDataRowsChanged = (includeDataRows) => {
|
|
33
33
|
props.onChange({
|
|
34
34
|
...data,
|
|
35
35
|
BadgeStyle: {
|
|
36
36
|
...data.BadgeStyle,
|
|
37
37
|
RowScope: {
|
|
38
38
|
...data.BadgeStyle.RowScope,
|
|
39
|
-
ExcludeDataRows,
|
|
39
|
+
ExcludeDataRows: !includeDataRows,
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
|
-
const onExcludeGroupedRowsChanged = (
|
|
44
|
+
const onExcludeGroupedRowsChanged = (includeGroupedRows) => {
|
|
45
45
|
props.onChange({
|
|
46
46
|
...data,
|
|
47
47
|
BadgeStyle: {
|
|
48
48
|
...data.BadgeStyle,
|
|
49
49
|
RowScope: {
|
|
50
50
|
...data.BadgeStyle.RowScope,
|
|
51
|
-
ExcludeGroupRows:
|
|
51
|
+
ExcludeGroupRows: !includeGroupedRows,
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
-
const onExcludeSummaryRowsChanged = (
|
|
56
|
+
const onExcludeSummaryRowsChanged = (includeSummaryRows) => {
|
|
57
57
|
props.onChange({
|
|
58
58
|
...data,
|
|
59
59
|
BadgeStyle: {
|
|
60
60
|
...data.BadgeStyle,
|
|
61
61
|
RowScope: {
|
|
62
62
|
...data.BadgeStyle.RowScope,
|
|
63
|
-
ExcludeSummaryRows,
|
|
63
|
+
ExcludeSummaryRows: !includeSummaryRows,
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
const onExcludeTotalRowsChanged = (
|
|
68
|
+
const onExcludeTotalRowsChanged = (includeTotalRows) => {
|
|
69
69
|
props.onChange({
|
|
70
70
|
...data,
|
|
71
71
|
BadgeStyle: {
|
|
72
72
|
...data.BadgeStyle,
|
|
73
73
|
RowScope: {
|
|
74
74
|
...data.BadgeStyle.RowScope,
|
|
75
|
-
ExcludeTotalRows,
|
|
75
|
+
ExcludeTotalRows: !includeTotalRows,
|
|
76
76
|
},
|
|
77
77
|
},
|
|
78
78
|
});
|
|
79
79
|
};
|
|
80
80
|
return (React.createElement(Tabs_1.Tabs, null,
|
|
81
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "
|
|
81
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Row Types"),
|
|
82
82
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
83
83
|
React.createElement(Flex_1.Flex, { flexDirection: "row" },
|
|
84
84
|
React.createElement(FormLayout_1.default, null,
|
|
85
|
-
React.createElement(FormLayout_1.FormRow, { label: "
|
|
85
|
+
React.createElement(FormLayout_1.FormRow, { label: "Data (leaf) Rows:" },
|
|
86
86
|
React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
87
87
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-data-rows-checkbox", className: "twa:mr-2", checked:
|
|
88
88
|
// @ts-ignore
|
|
89
|
-
data.BadgeStyle.RowScope?.ExcludeDataRows, onChange: onExcludeDataRowsChanged }))),
|
|
90
|
-
React.createElement(FormLayout_1.FormRow, { label: "
|
|
89
|
+
!data.BadgeStyle.RowScope?.ExcludeDataRows, onChange: onExcludeDataRowsChanged }))),
|
|
90
|
+
React.createElement(FormLayout_1.FormRow, { label: "Group Rows:" },
|
|
91
91
|
React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
92
92
|
React.createElement(CheckBox_1.CheckBox, { className: "twa:mr-2", "data-name": "exclude-grouped-rows-checkbox", checked:
|
|
93
93
|
// @ts-ignore
|
|
94
|
-
data.BadgeStyle.RowScope?.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged }))),
|
|
95
|
-
React.createElement(FormLayout_1.FormRow, { label: "
|
|
94
|
+
!data.BadgeStyle.RowScope?.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged }))),
|
|
95
|
+
React.createElement(FormLayout_1.FormRow, { label: "Summary Rows:" },
|
|
96
96
|
React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
97
97
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-summary-rows-checkbox", className: "twa:mr-2", checked:
|
|
98
98
|
// @ts-ignore
|
|
99
|
-
data.BadgeStyle.RowScope?.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged }))),
|
|
99
|
+
!data.BadgeStyle.RowScope?.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged }))),
|
|
100
100
|
' ',
|
|
101
|
-
React.createElement(FormLayout_1.FormRow, { label: "
|
|
101
|
+
React.createElement(FormLayout_1.FormRow, { label: "Total Rows:" },
|
|
102
102
|
React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
|
|
103
103
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-total-rows-checkbox", className: "twa:mr-2", checked:
|
|
104
104
|
// @ts-ignore
|
|
105
|
-
data.BadgeStyle.RowScope?.ExcludeTotalRows, onChange: onExcludeTotalRowsChanged }))))))));
|
|
105
|
+
!data.BadgeStyle.RowScope?.ExcludeTotalRows, onChange: onExcludeTotalRowsChanged }))))))));
|
|
106
106
|
};
|
|
107
|
-
exports.
|
|
107
|
+
exports.StyledColumnBadgeRowsSection = StyledColumnBadgeRowsSection;
|
|
@@ -12,7 +12,7 @@ const StyledColumnWizardTypeSection_1 = require("./StyledColumnWizardTypeSection
|
|
|
12
12
|
const StyledColumnWizardColumnSection_1 = require("./StyledColumnWizardColumnSection");
|
|
13
13
|
const StyledColumnWizardStyleSection_1 = require("./StyledColumnWizardStyleSection");
|
|
14
14
|
const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
15
|
-
const
|
|
15
|
+
const StyledColumnBadgeRowsSection_1 = require("./StyledColumnBadgeRowsSection");
|
|
16
16
|
const StyledColumnSparklineSettingsSection_1 = require("./StyledColumnSparklineSettingsSection");
|
|
17
17
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
18
18
|
const StyledColumnBadgeSection_1 = require("./StyledColumnBadgeSection");
|
|
@@ -52,15 +52,6 @@ const StyledColumnWizard = (props) => {
|
|
|
52
52
|
}
|
|
53
53
|
props.onFinishWizard(styledColumn);
|
|
54
54
|
};
|
|
55
|
-
const AdditionalSettingSection = {
|
|
56
|
-
details: 'Apply Additional Settings',
|
|
57
|
-
renderSummary: StyledColumnWizardSettingsSection_1.renderStyledColumnWizardSettingsSummary,
|
|
58
|
-
render: () => {
|
|
59
|
-
return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
60
|
-
React.createElement(StyledColumnWizardSettingsSection_1.StyledColumnWizardSettingsSection, { onChange: setStyledColumn })));
|
|
61
|
-
},
|
|
62
|
-
title: 'Settings',
|
|
63
|
-
};
|
|
64
55
|
const specificSteps = [];
|
|
65
56
|
if (styledColumn.SparklineStyle) {
|
|
66
57
|
specificSteps.push({
|
|
@@ -97,6 +88,15 @@ const StyledColumnWizard = (props) => {
|
|
|
97
88
|
);
|
|
98
89
|
}
|
|
99
90
|
else if (styledColumn.BadgeStyle) {
|
|
91
|
+
specificSteps.push({
|
|
92
|
+
details: 'Select the Rows where the Badge will be applied',
|
|
93
|
+
renderSummary: StyledColumnBadgeRowsSection_1.renderStyledColumnBadgeRowsSummary,
|
|
94
|
+
render: () => {
|
|
95
|
+
return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
96
|
+
React.createElement(StyledColumnBadgeRowsSection_1.StyledColumnBadgeRowsSection, { onChange: setStyledColumn })));
|
|
97
|
+
},
|
|
98
|
+
title: 'Rows',
|
|
99
|
+
});
|
|
100
100
|
specificSteps.push({
|
|
101
101
|
title: 'Badges',
|
|
102
102
|
details: 'Create Badge Styles',
|
|
@@ -114,7 +114,6 @@ const StyledColumnWizard = (props) => {
|
|
|
114
114
|
render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
115
115
|
React.createElement(StyledColumnBadgeSection_1.StyledColumnBadgeSection, { onChange: setStyledColumn }))),
|
|
116
116
|
});
|
|
117
|
-
specificSteps.push(AdditionalSettingSection);
|
|
118
117
|
}
|
|
119
118
|
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: styledColumn, onFinish: handleFinish, onHide: props.onCloseWizard, sections: [
|
|
120
119
|
{
|
|
@@ -9,8 +9,8 @@ declare class SystemStatusViewPanelComponent extends React.Component<SystemStatu
|
|
|
9
9
|
render(): React.JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export declare let SystemStatusViewPanel: import("react-redux").ConnectedComponent<typeof SystemStatusViewPanelComponent, {
|
|
12
|
-
ref?: React.Ref<SystemStatusViewPanelComponent>;
|
|
13
12
|
key?: React.Key | null | undefined;
|
|
13
|
+
ref?: React.Ref<SystemStatusViewPanelComponent>;
|
|
14
14
|
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
|
|
15
15
|
store?: import("redux").Store;
|
|
16
16
|
}>;
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
|
|
7
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
8
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../Components/AdaptableInput"));
|
|
9
|
-
const throttle_1 = tslib_1.__importDefault(require("
|
|
9
|
+
const throttle_1 = tslib_1.__importDefault(require("../../Utilities/utils/throttle"));
|
|
10
10
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
11
11
|
const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
|
|
12
12
|
const ThemeField_1 = require("./ThemeField");
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Field = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const throttle_1 = tslib_1.__importDefault(require("
|
|
6
|
+
const throttle_1 = tslib_1.__importDefault(require("../../Utilities/utils/throttle"));
|
|
7
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
8
|
const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
|
|
9
9
|
const FormLayout_1 = require("../../components/FormLayout");
|
|
@@ -12,7 +12,7 @@ const AdaptableContext_1 = require("../AdaptableContext");
|
|
|
12
12
|
const Tabs_1 = require("../../components/Tabs");
|
|
13
13
|
const NamedQueryContext_1 = require("../../components/ExpressionEditor/NamedQueryContext");
|
|
14
14
|
const OnePageWizards_1 = require("./OnePageWizards");
|
|
15
|
-
const kebabCase_1 = tslib_1.__importDefault(require("
|
|
15
|
+
const kebabCase_1 = tslib_1.__importDefault(require("../../Utilities/utils/kebabCase"));
|
|
16
16
|
const Flex_1 = require("../../components/Flex");
|
|
17
17
|
const twMerge_1 = require("../../twMerge");
|
|
18
18
|
const SummaryTag = (props) => (React.createElement(Flex_1.Box, { ...props }));
|
|
@@ -164,7 +164,7 @@ const OnePageWizard = (props) => {
|
|
|
164
164
|
} },
|
|
165
165
|
React.createElement(KeyHint_1.KeyHint, { className: "twa:mr-2 twa:inline-block twa:text-color-accent-foreground" }, navIndex),
|
|
166
166
|
React.createElement("div", { className: "twa:flex-1" }, section.title),
|
|
167
|
-
React.createElement(icons_1.Icon, { name: "error", className: (0, clsx_1.default)('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:
|
|
167
|
+
React.createElement(icons_1.Icon, { name: "error", className: (0, clsx_1.default)('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:invisible') })));
|
|
168
168
|
}),
|
|
169
169
|
selectedFeedback,
|
|
170
170
|
React.createElement(Flex_1.Box, { className: "twa:flex-1" }),
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdaptableAgGrid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const throttle_1 = tslib_1.__importDefault(require("
|
|
6
|
-
const debounce_1 = tslib_1.__importDefault(require("
|
|
5
|
+
const throttle_1 = tslib_1.__importDefault(require("../Utilities/utils/throttle"));
|
|
6
|
+
const debounce_1 = tslib_1.__importDefault(require("../Utilities/utils/debounce"));
|
|
7
7
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
8
8
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
9
9
|
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
@@ -91,6 +91,7 @@ const Modal_1 = require("../components/Modal");
|
|
|
91
91
|
const AdaptableLoadingScreen_1 = require("../View/Components/Popups/AdaptableLoadingScreen");
|
|
92
92
|
const react_1 = require("react");
|
|
93
93
|
const createAgStatusPanelComponent_1 = require("../Utilities/createAgStatusPanelComponent");
|
|
94
|
+
const only_1 = require("../Utilities/only");
|
|
94
95
|
const weightedAverage_1 = require("../Utilities/weightedAverage");
|
|
95
96
|
const RowSummary_1 = require("../AdaptableState/Common/RowSummary");
|
|
96
97
|
const FlashingCellService_1 = require("../Utilities/Services/FlashingCellService");
|
|
@@ -1084,6 +1085,9 @@ class AdaptableAgGrid {
|
|
|
1084
1085
|
*/
|
|
1085
1086
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'aggFuncs', (original_aggFuncs) => {
|
|
1086
1087
|
const aggregationFunctions = original_aggFuncs || {};
|
|
1088
|
+
aggregationFunctions[AggregationColumns_1.ONLY_AGG_FN_NAME] = (params) => {
|
|
1089
|
+
return (0, only_1.only)(params, params.column.getColId());
|
|
1090
|
+
};
|
|
1087
1091
|
aggregationFunctions[AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME] = (params) => {
|
|
1088
1092
|
const columnId = params.column.getColId();
|
|
1089
1093
|
const adaptableAggFunc = this.getActiveAdaptableAggFuncForCol(columnId);
|
|
@@ -1466,6 +1470,18 @@ class AdaptableAgGrid {
|
|
|
1466
1470
|
caseSensitive: !!this.adaptableOptions.quickSearchOptions.isQuickSearchCaseSensitive,
|
|
1467
1471
|
};
|
|
1468
1472
|
});
|
|
1473
|
+
/**
|
|
1474
|
+
* suppressOverlays
|
|
1475
|
+
*/
|
|
1476
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'suppressOverlays', (original_suppressOverlays) => {
|
|
1477
|
+
// we want to suppress the exporting overlay because having it enabled will turn api.exportDataAsExcel() and api.exportDataAsCsv() into async operations,
|
|
1478
|
+
// see #export_data_synchronously
|
|
1479
|
+
let suppressOverlays = original_suppressOverlays || [];
|
|
1480
|
+
if (!suppressOverlays.includes('exporting')) {
|
|
1481
|
+
suppressOverlays.push('exporting');
|
|
1482
|
+
}
|
|
1483
|
+
return suppressOverlays;
|
|
1484
|
+
});
|
|
1469
1485
|
}
|
|
1470
1486
|
/**
|
|
1471
1487
|
* Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
|
|
@@ -2545,12 +2561,15 @@ class AdaptableAgGrid {
|
|
|
2545
2561
|
updatedRows: [],
|
|
2546
2562
|
removedRows: [],
|
|
2547
2563
|
};
|
|
2548
|
-
if (!dataRowConfig
|
|
2564
|
+
if (!dataRowConfig) {
|
|
2565
|
+
return result;
|
|
2566
|
+
}
|
|
2567
|
+
if (!dataRowConfig.addRows || !dataRowConfig.updateRows || !dataRowConfig.deleteRows) {
|
|
2549
2568
|
return result;
|
|
2550
2569
|
}
|
|
2551
|
-
const addDataRows = dataRowConfig.
|
|
2552
|
-
const updateDataRows = dataRowConfig.
|
|
2553
|
-
const removeDataRows = dataRowConfig.
|
|
2570
|
+
const addDataRows = dataRowConfig.addRows;
|
|
2571
|
+
const updateDataRows = dataRowConfig.updateRows;
|
|
2572
|
+
const removeDataRows = dataRowConfig.deleteRows;
|
|
2554
2573
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
2555
2574
|
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2556
2575
|
}
|
|
@@ -475,8 +475,8 @@ class AgGridAdapter {
|
|
|
475
475
|
? 'number'
|
|
476
476
|
: this.deriveAdaptableColumnDataType(agGridColumn, false);
|
|
477
477
|
const isTreeColumn = this.isTreeColumn(isGeneratedRowGroupColumn);
|
|
478
|
-
const
|
|
479
|
-
const visible = !
|
|
478
|
+
const isUIHiddenColumn = this.adaptableApi.columnApi.internalApi.isColumnUIHidden(colDef);
|
|
479
|
+
const visible = !isUIHiddenColumn || agGridColumn.isVisible();
|
|
480
480
|
const isGenerated = isGeneratedRowGroupColumn || isGeneratedPivotResultColumn || isGeneratedSelectionColumn;
|
|
481
481
|
const abColumn = {
|
|
482
482
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
@@ -486,9 +486,9 @@ class AgGridAdapter {
|
|
|
486
486
|
resizable: colDef.resizable !== false,
|
|
487
487
|
friendlyName: friendlyName,
|
|
488
488
|
isPrimaryKey: ColumnId === pkColumn,
|
|
489
|
-
dataType
|
|
489
|
+
dataType,
|
|
490
490
|
visible,
|
|
491
|
-
|
|
491
|
+
isUIHiddenColumn,
|
|
492
492
|
readOnly: this.isColumnReadonly(colDef),
|
|
493
493
|
columnGroup: ColumnGroup,
|
|
494
494
|
fieldOnly: isGenerated ? false : this.isColumnFieldonly(colDef),
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AgGridColumnAdapter = void 0;
|
|
4
4
|
exports.getEditorForColumnDataType = getEditorForColumnDataType;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const kebabCase_1 = tslib_1.__importDefault(require("
|
|
7
|
-
const merge_1 = tslib_1.__importDefault(require("
|
|
6
|
+
const kebabCase_1 = tslib_1.__importDefault(require("../Utilities/utils/kebabCase"));
|
|
7
|
+
const merge_1 = tslib_1.__importDefault(require("../Utilities/utils/merge"));
|
|
8
8
|
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
9
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
10
10
|
const AdaptableColumn_1 = require("../AdaptableState/Common/AdaptableColumn");
|
|
@@ -538,8 +538,15 @@ class AgGridColumnAdapter {
|
|
|
538
538
|
returnValue = params.value;
|
|
539
539
|
}
|
|
540
540
|
if (textOptions.includes('PercentageValue')) {
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
let percentageValue;
|
|
542
|
+
if (styledColumn.PercentBarStyle.ColumnComparison) {
|
|
543
|
+
const absMax = Math.abs(max);
|
|
544
|
+
percentageValue = absMax === 0 ? 0 : (Number(params.value) / absMax) * 100;
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
const clampedValue = Helper_1.default.clamp(params.value, min, max);
|
|
548
|
+
percentageValue = ((clampedValue - min) / (max - min)) * 100;
|
|
549
|
+
}
|
|
543
550
|
returnValue += ' ' + `(${percentageValue.toFixed(0)}%)`;
|
|
544
551
|
}
|
|
545
552
|
return returnValue ? returnValue : params.value;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
|
-
import { Report, ReportFormatType } from '../AdaptableState/ExportState';
|
|
3
1
|
import { CsvExportParams, ExcelExportParams, ExcelStyle } from 'ag-grid-enterprise';
|
|
4
2
|
import { CustomExportParams, ExportDestinationType, ExportResultData } from '../AdaptableOptions/ExportOptions';
|
|
3
|
+
import { Report, ReportFormatType } from '../AdaptableState/ExportState';
|
|
5
4
|
import { Layout } from '../AdaptableState/LayoutState';
|
|
5
|
+
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
6
6
|
export interface ExportConfig {
|
|
7
7
|
report: Report;
|
|
8
8
|
format: ReportFormatType;
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AgGridExportAdapter = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
|
|
6
|
-
const waitForTimeout_1 = require("../Utilities/waitForTimeout");
|
|
7
|
-
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
8
|
-
const FormatHelper_1 = tslib_1.__importStar(require("../Utilities/Helpers/FormatHelper"));
|
|
9
5
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
10
|
-
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
11
|
-
const Uuid_1 = require("../AdaptableState/Uuid");
|
|
12
6
|
const udsv_1 = require("udsv");
|
|
7
|
+
const Uuid_1 = require("../AdaptableState/Uuid");
|
|
13
8
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
9
|
+
const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
|
|
10
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
11
|
+
const FormatHelper_1 = tslib_1.__importStar(require("../Utilities/Helpers/FormatHelper"));
|
|
12
|
+
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
13
|
+
const waitForTimeout_1 = require("../Utilities/waitForTimeout");
|
|
14
14
|
class AgGridExportAdapter {
|
|
15
15
|
_adaptableInstance;
|
|
16
16
|
/**
|
|
@@ -91,6 +91,7 @@ class AgGridExportAdapter {
|
|
|
91
91
|
this.patchExcelStyles(exportContext);
|
|
92
92
|
excelStylesWerePatched = true;
|
|
93
93
|
}
|
|
94
|
+
// see #export_data_synchronously
|
|
94
95
|
// 1. easiest case, we download the file using AG Grid
|
|
95
96
|
// these methods will automatically handle the file download
|
|
96
97
|
if (exportContext.destination === 'Download' && exportContext.isExcelReport) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getPercentBarRendererForColumn = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
-
const clamp_1 = tslib_1.__importDefault(require("
|
|
6
|
+
const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
|
|
7
7
|
const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
8
8
|
if (!styledColumn.PercentBarStyle) {
|
|
9
9
|
return;
|
|
@@ -25,10 +25,22 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
25
25
|
}
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
const clampedValue = (0, clamp_1.default)(value, min, max);
|
|
29
|
-
const percentageValue = ((clampedValue - min) / (max - min)) * 100;
|
|
30
|
-
let cellBackColor;
|
|
31
28
|
const percentBarStyle = styledColumn.PercentBarStyle;
|
|
29
|
+
let percentageValue;
|
|
30
|
+
let barWidthPercent;
|
|
31
|
+
if (percentBarStyle.ColumnComparison) {
|
|
32
|
+
// Finance convention: (difference / |base|) * 100 — signed %, use |price| when base is negative
|
|
33
|
+
const absMax = Math.abs(max);
|
|
34
|
+
percentageValue = absMax === 0 ? 0 : (Number(value) / absMax) * 100;
|
|
35
|
+
// Bar width uses |percentage| so 50% and -50% have the same visual width
|
|
36
|
+
barWidthPercent = Math.min(100, Math.abs(percentageValue));
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
const clampedValue = (0, clamp_1.default)(value, min, max);
|
|
40
|
+
percentageValue = ((clampedValue - min) / (max - min)) * 100;
|
|
41
|
+
barWidthPercent = percentageValue;
|
|
42
|
+
}
|
|
43
|
+
let cellBackColor;
|
|
32
44
|
if (percentBarStyle.ColumnComparison) {
|
|
33
45
|
cellBackColor = percentBarStyle.ColumnComparison.Color;
|
|
34
46
|
}
|
|
@@ -56,7 +68,7 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
56
68
|
barInsideEl.className = 'ab-PercentBar__barInside';
|
|
57
69
|
barInsideEl.style.background = cellBackColor;
|
|
58
70
|
barInsideEl.style.height = '100%';
|
|
59
|
-
barInsideEl.style.width = `${
|
|
71
|
+
barInsideEl.style.width = `${barWidthPercent.toFixed(0)}%`;
|
|
60
72
|
barEl.append(barInsideEl);
|
|
61
73
|
this.eGui.append(barEl);
|
|
62
74
|
if (hasCellText) {
|
|
@@ -4,7 +4,7 @@ exports.ColorPicker = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const debounce_1 = tslib_1.__importDefault(require("
|
|
7
|
+
const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
|
|
8
8
|
const Input_1 = tslib_1.__importDefault(require("../Input"));
|
|
9
9
|
const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
|
|
10
10
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const React = tslib_1.__importStar(require("react"));
|
|
5
|
-
const isPlainObject_1 = tslib_1.__importDefault(require("
|
|
5
|
+
const isPlainObject_1 = tslib_1.__importDefault(require("../../Utilities/utils/isPlainObject"));
|
|
6
6
|
exports.default = ({ domProps, item, onItemClick, index, columns, className, idProperty, style, }) => {
|
|
7
7
|
const key = item[idProperty] || index;
|
|
8
8
|
if (!(0, isPlainObject_1.default)(item)) {
|
|
@@ -135,7 +135,7 @@ const PrimitiveValueInput = (props) => {
|
|
|
135
135
|
} }));
|
|
136
136
|
}
|
|
137
137
|
else if (!['date', 'boolean'].includes(props.inputType)) {
|
|
138
|
-
editor = (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, searchable: '
|
|
138
|
+
editor = (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, searchable: 'menulist', value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
|
|
139
139
|
props.onChange(value);
|
|
140
140
|
} }));
|
|
141
141
|
}
|
|
@@ -4,7 +4,7 @@ exports.FormRow = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const merge_1 = tslib_1.__importDefault(require("
|
|
7
|
+
const merge_1 = tslib_1.__importDefault(require("../../Utilities/utils/merge"));
|
|
8
8
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
9
9
|
const Flex_1 = require("../Flex");
|
|
10
10
|
const FormLayoutContext = (0, react_1.createContext)(null);
|
|
@@ -4,7 +4,7 @@ exports.ensurePortalElement = exports.getConstrainRect = exports.getConstrainEle
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const debounce_1 = tslib_1.__importDefault(require("
|
|
7
|
+
const debounce_1 = tslib_1.__importDefault(require("../../Utilities/utils/debounce"));
|
|
8
8
|
const batchUpdate_1 = tslib_1.__importDefault(require("../utils/batchUpdate"));
|
|
9
9
|
const selectParent_1 = tslib_1.__importDefault(require("../utils/selectParent"));
|
|
10
10
|
const useProperty_1 = tslib_1.__importDefault(require("../utils/useProperty"));
|
|
@@ -366,6 +366,10 @@ const Select = function (props) {
|
|
|
366
366
|
// and then pass the actual values to Resizable
|
|
367
367
|
minWidth: CSS_VARS_VALUES['--ab-cmp-select-menu__min-width'], maxHeight: CSS_VARS_VALUES['--ab-cmp-select-menu__max-height'], maxWidth: CSS_VARS_VALUES['--ab-cmp-select-menu__max-width'], defaultSize: sizeRef.current, onResizeStop: onResizeStop, onResizeStart: (e) => {
|
|
368
368
|
e.preventDefault();
|
|
369
|
+
}, handleClasses: {
|
|
370
|
+
right: 'ab-Select-resize-handle ab-Select-resize-handle--right',
|
|
371
|
+
bottom: 'ab-Select-resize-handle ab-Select-resize-handle--bottom',
|
|
372
|
+
bottomRight: 'ab-Select-resize-handle ab-Select-resize-handle--bottom-right',
|
|
369
373
|
} }, theChildren)) : (theChildren))));
|
|
370
374
|
};
|
|
371
375
|
}, [resizable, JSON.stringify(CSS_VARS_VALUES)]);
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "22.0.0
|
|
5
|
+
PUBLISH_TIMESTAMP: 1771927501120 || Date.now(),
|
|
6
|
+
VERSION: "22.0.0" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -5,7 +5,7 @@ exports.isTableLayoutEqual = isTableLayoutEqual;
|
|
|
5
5
|
exports.isPivotLayoutEqual = isPivotLayoutEqual;
|
|
6
6
|
exports.isLayoutEqual = isLayoutEqual;
|
|
7
7
|
const tslib_1 = require("tslib");
|
|
8
|
-
const isEqual_1 = tslib_1.__importDefault(require("
|
|
8
|
+
const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
|
|
9
9
|
const infinite_react_1 = require("@infinite-table/infinite-react");
|
|
10
10
|
const isPivotLayoutModel_1 = require("./isPivotLayoutModel");
|
|
11
11
|
const normalizeLayoutModel_1 = require("./normalizeLayoutModel");
|