@adaptabletools/adaptable 13.1.0 → 13.1.1

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.
Files changed (83) hide show
  1. package/base.css +561 -1971
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +222 -222
  4. package/index.css +196 -847
  5. package/index.css.map +1 -1
  6. package/package.json +2 -2
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableOptions/ActionOptions.d.ts +4 -1
  10. package/src/AdaptableOptions/AlertOptions.d.ts +4 -0
  11. package/src/AdaptableOptions/FinancePluginOptions.d.ts +9 -0
  12. package/src/AdaptableOptions/GeneralOptions.d.ts +6 -0
  13. package/src/Api/AlertApi.d.ts +5 -0
  14. package/src/Api/ColumnApi.d.ts +14 -0
  15. package/src/Api/FinanceApi.d.ts +5 -0
  16. package/src/Api/GridApi.d.ts +1 -0
  17. package/src/Api/IPushPullApi.d.ts +1 -1
  18. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
  19. package/src/Api/Implementation/AlertApiImpl.js +14 -0
  20. package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -0
  21. package/src/Api/Implementation/ColumnApiImpl.js +11 -0
  22. package/src/Api/Implementation/FormatColumnApiImpl.js +3 -3
  23. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  24. package/src/Api/Implementation/GridApiImpl.js +3 -0
  25. package/src/Api/Implementation/InternalApiImpl.d.ts +6 -0
  26. package/src/Api/Implementation/InternalApiImpl.js +66 -0
  27. package/src/Api/InternalApi.d.ts +6 -0
  28. package/src/PredefinedConfig/AlertState.d.ts +4 -0
  29. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  30. package/src/PredefinedConfig/Common/FDC3Context.d.ts +2 -2
  31. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  32. package/src/PredefinedConfig/StyledColumnState.d.ts +5 -0
  33. package/src/PredefinedConfig/SystemState.d.ts +7 -0
  34. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +1 -1
  35. package/src/Redux/ActionsReducers/QuickSearchRedux.js +1 -1
  36. package/src/Redux/ActionsReducers/SystemRedux.d.ts +8 -0
  37. package/src/Redux/ActionsReducers/SystemRedux.js +32 -2
  38. package/src/Strategy/AlertModule.js +1 -1
  39. package/src/Strategy/FlashingCellModule.js +1 -1
  40. package/src/Strategy/StyledColumnModule.js +5 -2
  41. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  42. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +0 -4
  43. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +8 -10
  44. package/src/Utilities/Extensions/ObjectExtensions.d.ts +10 -0
  45. package/src/Utilities/Extensions/ObjectExtensions.js +20 -0
  46. package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
  47. package/src/Utilities/Helpers/FormatHelper.js +7 -1
  48. package/src/Utilities/Services/LicenseService/index.js +1 -1
  49. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +16 -8
  50. package/src/View/Components/Charting/ChartingViewPanel.js +9 -7
  51. package/src/View/Components/Charting/ShowChartButton.js +6 -6
  52. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +2 -2
  53. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
  54. package/src/View/Components/RangesComponent.js +1 -1
  55. package/src/View/Dashboard/Dashboard.js +3 -2
  56. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  57. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +6 -0
  58. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +285 -0
  59. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +28 -17
  60. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +7 -1
  61. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +16 -7
  62. package/src/agGrid/Adaptable.d.ts +10 -1
  63. package/src/agGrid/Adaptable.js +89 -7
  64. package/src/agGrid/agGridHelper.js +12 -0
  65. package/src/components/ColorPicker/ColorPicker.js +1 -1
  66. package/src/components/Datepicker/index.d.ts +1 -1
  67. package/src/components/Datepicker/index.js +1 -1
  68. package/src/components/DropdownButton/index.js +2 -2
  69. package/src/components/ExpressionEditor/index.js +3 -41
  70. package/src/components/OverlayTrigger/Overlay.d.ts +1 -4
  71. package/src/components/OverlayTrigger/Overlay.js +3 -40
  72. package/src/components/OverlayTrigger/index.d.ts +4 -4
  73. package/src/components/OverlayTrigger/index.js +71 -50
  74. package/src/components/SimpleButton/index.d.ts +0 -2
  75. package/src/components/SimpleButton/index.js +2 -2
  76. package/src/components/Tooltip/index.d.ts +1 -3
  77. package/src/components/Tooltip/index.js +2 -2
  78. package/src/metamodel/adaptable.metamodel.d.ts +7 -0
  79. package/src/metamodel/adaptable.metamodel.js +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/src/components/OverlayTrigger/getOverlayStyle.d.ts +0 -13
  83. package/src/components/OverlayTrigger/getOverlayStyle.js +0 -56
@@ -125,8 +125,9 @@ const DashboardComponent = (props) => {
125
125
  }
126
126
  }, left: React.createElement(React.Fragment, null,
127
127
  React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: applicationIcon, iconClassName: "ab-Dashboard__application-icon" }),
128
- dashboardOptions.buttonsLocation === 'left' && renderModuleButtons()), right: React.createElement(React.Fragment, null,
129
- renderDashboardButtons(),
128
+ dashboardOptions.buttonsLocation === 'left' && renderModuleButtons(),
129
+ dashboardOptions.buttonsLocation === 'left' && renderDashboardButtons()), right: React.createElement(React.Fragment, null,
130
+ dashboardOptions.buttonsLocation === 'right' && renderDashboardButtons(),
130
131
  dashboardOptions.buttonsLocation === 'right' && renderModuleButtons(),
131
132
  shouldRenderQuickSearchHeader && renderQuickSearch()), onShowDashboardPopup: props.onShowDashboardPopup }, props.DashboardState.Tabs &&
132
133
  props.DashboardState.Tabs.map((tab, index) => (React.createElement(Dashboard_1.DashboardTab, { key: index, title: tab.Name }, renderTab(tab))))));
@@ -165,8 +165,8 @@ const renderDateFormat = (data, _onChange, setFormatOption, scopedCustomFormatte
165
165
  ")."),
166
166
  React.createElement(FormLayout_1.default, null,
167
167
  React.createElement(FormLayout_1.FormRow, { label: "Pattern" },
168
- React.createElement(Input_1.default, { "data-name": "patern", value: data.DisplayFormat.Options.Pattern, onChange: (e) => setFormatOption('Pattern', e.currentTarget.value), mr: 2 }),
169
- React.createElement("span", null, FormatHelper_1.default.DateFormatter(new Date(), data.DisplayFormat.Options)))))),
168
+ React.createElement(Input_1.default, { "data-name": "pattern", value: data.DisplayFormat.Options.Pattern, onChange: (e) => setFormatOption('Pattern', e.currentTarget.value), mr: 2 }),
169
+ React.createElement("span", null, FormatHelper_1.default.DateFormatter(new Date(), data.DisplayFormat.Options, true)))))),
170
170
  scopedCustomFormatters.length > 0 && (React.createElement(Tabs_1.Tabs, { marginTop: 2, keyboardNavigation: false },
171
171
  React.createElement(Tabs_1.Tabs.Tab, null, "Custom Formats"),
172
172
  React.createElement(Tabs_1.Tabs.Content, null,
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { StyledColumn } from '../../../types';
3
+ export interface StyledColumnSparklineSettingsSectionProps {
4
+ onChange: (data: StyledColumn) => void;
5
+ }
6
+ export declare const StyledColumnSparklineSettingsSection: React.FunctionComponent<StyledColumnSparklineSettingsSectionProps>;
@@ -0,0 +1,285 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledColumnSparklineSettingsSection = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ const CheckBox_1 = require("../../../components/CheckBox");
8
+ const ColorPicker_1 = require("../../../components/ColorPicker");
9
+ const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
10
+ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
11
+ const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
12
+ const Tabs_1 = require("../../../components/Tabs");
13
+ const Tag_1 = require("../../../components/Tag");
14
+ const ObjectExtensions_1 = require("../../../Utilities/Extensions/ObjectExtensions");
15
+ const StringExtensions_1 = require("../../../Utilities/Extensions/StringExtensions");
16
+ const LoggingHelper_1 = require("../../../Utilities/Helpers/LoggingHelper");
17
+ const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
18
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
19
+ const CommonProperties = (props) => {
20
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
21
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
22
+ const axisTypeOptions = React.useMemo(() => {
23
+ return [
24
+ {
25
+ label: 'Number',
26
+ value: 'number',
27
+ onClick: () => props.onOptionChange(['axis', 'type'], 'number'),
28
+ },
29
+ {
30
+ label: 'Category',
31
+ value: 'category',
32
+ onClick: () => props.onOptionChange(['axis', 'type'], 'category'),
33
+ },
34
+ {
35
+ label: 'Time',
36
+ value: 'time',
37
+ onClick: () => props.onOptionChange(['axis', 'type'], 'time'),
38
+ },
39
+ ];
40
+ }, [data]);
41
+ return (React.createElement(Tabs_1.Tabs, { mb: 2 },
42
+ React.createElement(Tabs_1.Tabs.Tab, null, "Padding"),
43
+ React.createElement(Tabs_1.Tabs.Tab, null, "Axis"),
44
+ React.createElement(Tabs_1.Tabs.Tab, null, "Highlight Style"),
45
+ React.createElement(Tabs_1.Tabs.Content, null,
46
+ React.createElement(FormLayout_1.default, null,
47
+ React.createElement(FormLayout_1.FormRow, { label: "Top" },
48
+ React.createElement(Input_1.default, { onChange: (event) => { var _a; return props.onOptionChange(['padding', 'top'], (_a = event.target.value) !== null && _a !== void 0 ? _a : 0); }, type: "number", value: (_b = (_a = data.SparkLineStyle.options) === null || _a === void 0 ? void 0 : _a.padding) === null || _b === void 0 ? void 0 : _b.top })),
49
+ React.createElement(FormLayout_1.FormRow, { label: "Bottom" },
50
+ React.createElement(Input_1.default, { onChange: (event) => { var _a; return props.onOptionChange(['padding', 'bottom'], (_a = event.target.value) !== null && _a !== void 0 ? _a : 0); }, type: "number", value: (_d = (_c = data.SparkLineStyle.options) === null || _c === void 0 ? void 0 : _c.padding) === null || _d === void 0 ? void 0 : _d.bottom })),
51
+ React.createElement(FormLayout_1.FormRow, { label: "Left" },
52
+ React.createElement(Input_1.default, { onChange: (event) => { var _a; return props.onOptionChange(['padding', 'left'], (_a = event.target.value) !== null && _a !== void 0 ? _a : 0); }, type: "number", value: (_f = (_e = data.SparkLineStyle.options) === null || _e === void 0 ? void 0 : _e.padding) === null || _f === void 0 ? void 0 : _f.left })),
53
+ React.createElement(FormLayout_1.FormRow, { label: "Right" },
54
+ React.createElement(Input_1.default, { onChange: (event) => { var _a; return props.onOptionChange(['padding', 'right'], (_a = event.target.value) !== null && _a !== void 0 ? _a : 0); }, type: "number", value: (_h = (_g = data.SparkLineStyle.options) === null || _g === void 0 ? void 0 : _g.padding) === null || _h === void 0 ? void 0 : _h.right })))),
55
+ React.createElement(Tabs_1.Tabs.Content, null,
56
+ React.createElement(FormLayout_1.default, null,
57
+ React.createElement(FormLayout_1.FormRow, { label: "Axis Type" },
58
+ React.createElement(DropdownButton_1.default, { columns: ['label'], items: axisTypeOptions }, (_k = (_j = axisTypeOptions.find((option) => { var _a, _b, _c; return option.value === ((_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.SparkLineStyle) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.axis) === null || _c === void 0 ? void 0 : _c.type); })) === null || _j === void 0 ? void 0 : _j.label) !== null && _k !== void 0 ? _k : 'Select Type')),
59
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke Color" },
60
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_p = (_o = (_m = (_l = data.SparkLineStyle) === null || _l === void 0 ? void 0 : _l.options) === null || _m === void 0 ? void 0 : _m.axis) === null || _o === void 0 ? void 0 : _o.stroke) !== null && _p !== void 0 ? _p : '#fff', onChange: (color) => props.onOptionChange(['axis', 'stroke'], color) })),
61
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke Width" },
62
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_t = (_s = (_r = (_q = data.SparkLineStyle) === null || _q === void 0 ? void 0 : _q.options) === null || _r === void 0 ? void 0 : _r.axis) === null || _s === void 0 ? void 0 : _s.strokeWidth) !== null && _t !== void 0 ? _t : 0, onChange: (event) => props.onOptionChange(['axis', 'strokeWidth'], parseFloat(event.target.value)) })))),
63
+ React.createElement(Tabs_1.Tabs.Content, null,
64
+ React.createElement(FormLayout_1.default, null,
65
+ React.createElement(FormLayout_1.FormRow, { label: "Size" },
66
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_w = (_v = (_u = data.SparkLineStyle) === null || _u === void 0 ? void 0 : _u.options) === null || _v === void 0 ? void 0 : _v.highlightStyle) === null || _w === void 0 ? void 0 : _w.size, onChange: (event) => props.onOptionChange(['highlightStyle', 'size'], parseFloat(event.target.value)) })),
67
+ React.createElement(FormLayout_1.FormRow, { label: "Fill" },
68
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_0 = (_z = (_y = (_x = data.SparkLineStyle) === null || _x === void 0 ? void 0 : _x.options) === null || _y === void 0 ? void 0 : _y.highlightStyle) === null || _z === void 0 ? void 0 : _z.fill) !== null && _0 !== void 0 ? _0 : 'yellow', onChange: (color) => props.onOptionChange(['highlightStyle', 'fill'], color) })),
69
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke" },
70
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_4 = (_3 = (_2 = (_1 = data.SparkLineStyle) === null || _1 === void 0 ? void 0 : _1.options) === null || _2 === void 0 ? void 0 : _2.highlightStyle) === null || _3 === void 0 ? void 0 : _3.stroke) !== null && _4 !== void 0 ? _4 : 'silver', onChange: (color) => props.onOptionChange(['highlightStyle', 'stroke'], color) })),
71
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke Width" },
72
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_7 = (_6 = (_5 = data.SparkLineStyle) === null || _5 === void 0 ? void 0 : _5.options) === null || _6 === void 0 ? void 0 : _6.highlightStyle) === null || _7 === void 0 ? void 0 : _7.strokeWidth, onChange: (event) => props.onOptionChange(['highlightStyle', 'strokeWidth'], parseFloat(event.target.value)) }))))));
73
+ };
74
+ const SparklineMarkerProperties = (props) => {
75
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
76
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
77
+ const sparklineOptions = data.SparkLineStyle.options;
78
+ return (React.createElement(FormLayout_1.default, null,
79
+ React.createElement(FormLayout_1.FormRow, { label: "Enabled" },
80
+ React.createElement(CheckBox_1.CheckBox, { checked: (_b = (_a = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.marker) === null || _a === void 0 ? void 0 : _a.enabled) !== null && _b !== void 0 ? _b : true, onChange: (checked) => props.onOptionChange(['marker', 'enabled'], checked) })),
81
+ React.createElement(FormLayout_1.FormRow, { label: "Size" },
82
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_d = (_c = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.marker) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : 0, onChange: (event) => props.onOptionChange(['marker', 'size'], parseFloat(event.target.value)) })),
83
+ React.createElement(FormLayout_1.FormRow, { label: "Fill" },
84
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_f = (_e = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.marker) === null || _e === void 0 ? void 0 : _e.fill) !== null && _f !== void 0 ? _f : 'rgb(124, 181, 236)', onChange: (color) => props.onOptionChange(['marker', 'fill'], color) })),
85
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke" },
86
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_h = (_g = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.marker) === null || _g === void 0 ? void 0 : _g.stroke) !== null && _h !== void 0 ? _h : 'rgb(124, 181, 236)', onChange: (color) => props.onOptionChange(['marker', 'stroke'], color) })),
87
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke Width" },
88
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_k = (_j = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.marker) === null || _j === void 0 ? void 0 : _j.strokeWidth) !== null && _k !== void 0 ? _k : 1, onChange: (event) => props.onOptionChange(['marker', 'strokeWidth'], parseFloat(event.target.value)) }))));
89
+ };
90
+ const SparklineLineProperties = (props) => {
91
+ var _a, _b, _c;
92
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
93
+ const sparklineOptions = data.SparkLineStyle.options;
94
+ return (React.createElement(FormLayout_1.default, null,
95
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke" },
96
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_b = (_a = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.line) === null || _a === void 0 ? void 0 : _a.stroke) !== null && _b !== void 0 ? _b : 'rgb(124, 181, 236)', onChange: (color) => props.onOptionChange(['line', 'stroke'], color) })),
97
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke Width" },
98
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_c = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.line) === null || _c === void 0 ? void 0 : _c.strokeWidth, onChange: (event) => props.onOptionChange(['line', 'strokeWidth'], parseFloat(event.target.value)) }))));
99
+ };
100
+ const CrossHairsProperties = (props) => {
101
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
102
+ const sparklineOptions = data.SparkLineStyle.options;
103
+ const lineDashes = [
104
+ 'dash',
105
+ 'dashDot',
106
+ 'dashDotDot',
107
+ 'dot',
108
+ 'longDash',
109
+ 'longDashDot',
110
+ 'longDashDotDot',
111
+ 'shortDash',
112
+ 'shortDashDot',
113
+ 'shortDashDotDot',
114
+ 'shortDot',
115
+ 'solid',
116
+ ];
117
+ const lineCapOptions = [
118
+ 'butt',
119
+ 'round',
120
+ 'square',
121
+ ];
122
+ const buildLineDashProperties = (key) => {
123
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
124
+ const lineDashOptions = lineDashes.map((item) => ({
125
+ label: (0, StringExtensions_1.Humanize)(item),
126
+ value: item,
127
+ onClick: () => props.onOptionChange(['crosshairs', key, 'lineDash'], item),
128
+ }));
129
+ const lineCapOptionsItems = lineCapOptions.map((item) => ({
130
+ label: (0, StringExtensions_1.Humanize)(item),
131
+ value: item,
132
+ onClick: () => props.onOptionChange(['crosshairs', key, 'lineCap'], item),
133
+ }));
134
+ return (React.createElement(FormLayout_1.default, null,
135
+ React.createElement(FormLayout_1.FormRow, { label: "Show" },
136
+ React.createElement(CheckBox_1.CheckBox, { checked: (_c = (_b = (_a = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.crosshairs) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : true, onChange: (checked) => props.onOptionChange(['crosshairs', key, 'enabled'], checked) })),
137
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke" },
138
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_f = (_e = (_d = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.crosshairs) === null || _d === void 0 ? void 0 : _d[key]) === null || _e === void 0 ? void 0 : _e.stroke) !== null && _f !== void 0 ? _f : 'rgba(0,0,0, 0.54)', onChange: (color) => props.onOptionChange(['crosshairs', key, 'stroke'], color) })),
139
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke Width" },
140
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_j = (_h = (_g = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.crosshairs) === null || _g === void 0 ? void 0 : _g[key]) === null || _h === void 0 ? void 0 : _h.strokeWidth) !== null && _j !== void 0 ? _j : 1, onChange: (event) => props.onOptionChange(['crosshairs', key, 'strokeWidth'], event.target.value) })),
141
+ React.createElement(FormLayout_1.FormRow, { label: "Line Dash" },
142
+ React.createElement(DropdownButton_1.default, { columns: ['label'], items: lineDashOptions }, (_l = (_k = lineDashOptions.find((option) => { var _a, _b; return option.value === ((_b = (_a = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.crosshairs) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.lineDash); })) === null || _k === void 0 ? void 0 : _k.label) !== null && _l !== void 0 ? _l : 'Solid')),
143
+ React.createElement(FormLayout_1.FormRow, { label: "Line Cap" },
144
+ React.createElement(DropdownButton_1.default, { columns: ['label'], items: lineCapOptionsItems }, (_o = (_m = lineCapOptionsItems.find((option) => { var _a, _b; return option.value === ((_b = (_a = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.crosshairs) === null || _a === void 0 ? void 0 : _a[key]) === null || _b === void 0 ? void 0 : _b.lineCap); })) === null || _m === void 0 ? void 0 : _m.label) !== null && _o !== void 0 ? _o : 'Butt'))));
145
+ };
146
+ return (React.createElement(rebass_1.Flex, null,
147
+ React.createElement(rebass_1.Box, { mr: 3 },
148
+ React.createElement(rebass_1.Box, null, "X Line"),
149
+ buildLineDashProperties('xLine')),
150
+ React.createElement(rebass_1.Box, null,
151
+ React.createElement(rebass_1.Box, null, "Y Line"),
152
+ buildLineDashProperties('yLine'))));
153
+ };
154
+ const TypeAreaProperties = (props) => {
155
+ var _a;
156
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
157
+ const sparklineOptions = data.SparkLineStyle.options;
158
+ return (React.createElement(Tabs_1.Tabs, { mb: 2 },
159
+ React.createElement(Tabs_1.Tabs.Tab, null, "Stroke"),
160
+ React.createElement(Tabs_1.Tabs.Tab, null, "Line"),
161
+ React.createElement(Tabs_1.Tabs.Tab, null, "Marker"),
162
+ React.createElement(Tabs_1.Tabs.Tab, null, "Cross Hairs"),
163
+ React.createElement(Tabs_1.Tabs.Content, null,
164
+ React.createElement(FormLayout_1.default, null,
165
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke" },
166
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_a = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.fill) !== null && _a !== void 0 ? _a : 'rgba(124, 181, 236, 0.25)', onChange: (color) => props.onOptionChange(['fill'], color) })))),
167
+ React.createElement(Tabs_1.Tabs.Content, null,
168
+ React.createElement(SparklineLineProperties, { onOptionChange: props.onOptionChange })),
169
+ React.createElement(Tabs_1.Tabs.Content, null,
170
+ React.createElement(SparklineMarkerProperties, { onOptionChange: props.onOptionChange })),
171
+ React.createElement(Tabs_1.Tabs.Content, null,
172
+ React.createElement(CrossHairsProperties, { onOptionChange: props.onOptionChange }))));
173
+ };
174
+ const TypeLineProperties = (props) => {
175
+ return (React.createElement(Tabs_1.Tabs, { mb: 2 },
176
+ React.createElement(Tabs_1.Tabs.Tab, null, "Line"),
177
+ React.createElement(Tabs_1.Tabs.Tab, null, "Marker"),
178
+ React.createElement(Tabs_1.Tabs.Tab, null, "Cross Hairs"),
179
+ React.createElement(Tabs_1.Tabs.Content, null,
180
+ React.createElement(SparklineLineProperties, { onOptionChange: props.onOptionChange })),
181
+ React.createElement(Tabs_1.Tabs.Content, null,
182
+ React.createElement(SparklineMarkerProperties, { onOptionChange: props.onOptionChange })),
183
+ React.createElement(Tabs_1.Tabs.Content, null,
184
+ React.createElement(CrossHairsProperties, { onOptionChange: props.onOptionChange }))));
185
+ };
186
+ const TypeColumnBarProperties = (props) => {
187
+ var _a, _b, _c, _d, _e;
188
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
189
+ const sparklineOptions = data.SparkLineStyle.options;
190
+ return (React.createElement(Tabs_1.Tabs, { mb: 2 },
191
+ React.createElement(Tabs_1.Tabs.Tab, null, "General"),
192
+ React.createElement(Tabs_1.Tabs.Content, null,
193
+ React.createElement(FormLayout_1.default, null,
194
+ React.createElement(FormLayout_1.FormRow, { label: "Fill" },
195
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_a = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.fill) !== null && _a !== void 0 ? _a : 'rgb(124, 181, 236)', onChange: (color) => props.onOptionChange(['fill'], color) })),
196
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke" },
197
+ React.createElement(ColorPicker_1.ColorPicker, { api: api, value: (_b = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.stroke) !== null && _b !== void 0 ? _b : 'silver', onChange: (color) => props.onOptionChange(['stroke'], color) })),
198
+ React.createElement(FormLayout_1.FormRow, { label: "Stroke Width" },
199
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_c = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.strokeWidth) !== null && _c !== void 0 ? _c : 1, onChange: (event) => props.onOptionChange(['strokeWidth'], event.target.value) })),
200
+ React.createElement(FormLayout_1.FormRow, { label: "Padding Inner" },
201
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_d = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.paddingInner) !== null && _d !== void 0 ? _d : 0.1, onChange: (event) => props.onOptionChange(['paddingInner'], event.target.value) })),
202
+ React.createElement(FormLayout_1.FormRow, { label: "Padding Outer" },
203
+ React.createElement(AdaptableInput_1.default, { type: "number", value: (_e = sparklineOptions === null || sparklineOptions === void 0 ? void 0 : sparklineOptions.paddingOuter) !== null && _e !== void 0 ? _e : 0.2, onChange: (event) => props.onOptionChange(['paddingOuter'], event.target.value) }))))));
204
+ };
205
+ const SparklineObjectNumberArrayProperties = (props) => {
206
+ var _a, _b;
207
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
208
+ const sparkLineOptions = data.SparkLineStyle.options;
209
+ const [sparklineDataItem, setSparklineDataItem] = React.useState('');
210
+ React.useEffect(() => {
211
+ var _a, _b, _c;
212
+ try {
213
+ let cellData = null;
214
+ const MAX_ROWS_TO_CHECK = 20;
215
+ let currentRow = 0;
216
+ while (!cellData || currentRow < MAX_ROWS_TO_CHECK) {
217
+ const rowWithData = (_a = api.gridApi.getRowNodeForIndex(currentRow)) === null || _a === void 0 ? void 0 : _a.data;
218
+ const column = api.columnApi.getColumnFromId(data.ColumnId);
219
+ if ((_b = rowWithData === null || rowWithData === void 0 ? void 0 : rowWithData[column === null || column === void 0 ? void 0 : column.field]) === null || _b === void 0 ? void 0 : _b[0]) {
220
+ cellData = (_c = rowWithData === null || rowWithData === void 0 ? void 0 : rowWithData[column === null || column === void 0 ? void 0 : column.field]) === null || _c === void 0 ? void 0 : _c[0];
221
+ break;
222
+ }
223
+ currentRow++;
224
+ }
225
+ if (cellData) {
226
+ const str = JSON.stringify(cellData, null, 2).replace(/[{}",]/g, '');
227
+ setSparklineDataItem(str);
228
+ }
229
+ }
230
+ catch (e) {
231
+ (0, LoggingHelper_1.ConsoleLogError)('Error parsing sparkline data', e);
232
+ }
233
+ }, [data]);
234
+ return (React.createElement(React.Fragment, null,
235
+ React.createElement(FormLayout_1.FormRow, { label: "X Key" },
236
+ React.createElement(Input_1.default, { onChange: (event) => props.onOptionChange(['xKey'], event.target.value), value: (_a = sparkLineOptions.xKey) !== null && _a !== void 0 ? _a : 'x' })),
237
+ React.createElement(FormLayout_1.FormRow, { label: "Y Key" },
238
+ React.createElement(Input_1.default, { onChange: (event) => props.onOptionChange(['yKey'], event.target.value), value: (_b = sparkLineOptions.yKey) !== null && _b !== void 0 ? _b : 'y' })),
239
+ sparklineDataItem && (React.createElement(FormLayout_1.FormRow, { label: "Preview" },
240
+ React.createElement(Tag_1.Tag, null, sparklineDataItem)))));
241
+ };
242
+ const StyledColumnSparklineSettingsSection = (props) => {
243
+ var _a, _b, _c;
244
+ const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
245
+ const handleTypeChange = React.useCallback((type) => {
246
+ const newStyledColumn = Object.assign(Object.assign({}, data), { SparkLineStyle: Object.assign(Object.assign({}, data.SparkLineStyle), { options: Object.assign(Object.assign({}, data.SparkLineStyle.options), { type }) }) });
247
+ props.onChange(newStyledColumn);
248
+ }, [data]);
249
+ const sparklineTypeOptions = React.useMemo(() => [
250
+ { label: 'Line', value: 'line', onClick: () => handleTypeChange('line') },
251
+ { label: 'Area', value: 'area', onClick: () => handleTypeChange('area') },
252
+ { label: 'Column', value: 'column', onClick: () => handleTypeChange('column') },
253
+ { label: 'Bar', value: 'bar', onClick: () => handleTypeChange('bar') },
254
+ ], [data]);
255
+ const handleOptionChange = React.useCallback((path, value) => {
256
+ var _a;
257
+ const newOptions = (0, ObjectExtensions_1.setInPath)((_a = data.SparkLineStyle.options) !== null && _a !== void 0 ? _a : {}, path, value);
258
+ props.onChange(Object.assign(Object.assign({}, data), { SparkLineStyle: Object.assign(Object.assign({}, data.SparkLineStyle), { options: newOptions }) }));
259
+ }, [data]);
260
+ const isObjectNumberArray = ((_a = api.columnApi.getColumnFromId(data.ColumnId)) === null || _a === void 0 ? void 0 : _a.dataType) === 'ObjectNumberArray';
261
+ return (React.createElement(React.Fragment, null,
262
+ React.createElement(Tabs_1.Tabs, { mb: 2 },
263
+ React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
264
+ React.createElement(Tabs_1.Tabs.Content, null,
265
+ React.createElement(FormLayout_1.default, null,
266
+ React.createElement(FormLayout_1.FormRow, { label: "Type" },
267
+ React.createElement(DropdownButton_1.default, { columns: ['label'], items: sparklineTypeOptions }, (_c = (_b = sparklineTypeOptions.find((option) => { var _a; return option.value === ((_a = data.SparkLineStyle.options) === null || _a === void 0 ? void 0 : _a.type); })) === null || _b === void 0 ? void 0 : _b.label) !== null && _c !== void 0 ? _c : 'Select Type')),
268
+ isObjectNumberArray && (React.createElement(SparklineObjectNumberArrayProperties, { onOptionChange: handleOptionChange }))))),
269
+ React.createElement(CommonProperties, { onOptionChange: handleOptionChange }),
270
+ (() => {
271
+ var _a;
272
+ switch ((_a = data.SparkLineStyle.options) === null || _a === void 0 ? void 0 : _a.type) {
273
+ case 'line':
274
+ return React.createElement(TypeLineProperties, { onOptionChange: handleOptionChange });
275
+ case 'area':
276
+ return React.createElement(TypeAreaProperties, { onOptionChange: handleOptionChange });
277
+ case 'column':
278
+ return React.createElement(TypeColumnBarProperties, { onOptionChange: handleOptionChange });
279
+ case 'bar':
280
+ // It is the same as column. If they diverge, we can split them out.
281
+ return React.createElement(TypeColumnBarProperties, { onOptionChange: handleOptionChange });
282
+ }
283
+ })()));
284
+ };
285
+ exports.StyledColumnSparklineSettingsSection = StyledColumnSparklineSettingsSection;
@@ -14,6 +14,7 @@ const StyledColumnWizardColumnSection_1 = require("./StyledColumnWizardColumnSec
14
14
  const StyledColumnWizardStyleSection_1 = require("./StyledColumnWizardStyleSection");
15
15
  const Helper_1 = require("../../../Utilities/Helpers/Helper");
16
16
  const StyledColumnWizardSettingsSection_1 = require("./StyledColumnWizardSettingsSection");
17
+ const StyledColumnSparklineSettingsSection_1 = require("./StyledColumnSparklineSettingsSection");
17
18
  const StyledColumnWizard = (props) => {
18
19
  var _a, _b;
19
20
  const data = (_a = props.data) !== null && _a !== void 0 ? _a : (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.value;
@@ -35,6 +36,32 @@ const StyledColumnWizard = (props) => {
35
36
  }
36
37
  props.onFinishWizard(styledColumn);
37
38
  };
39
+ const checkboxGrandientPercentSteps = [
40
+ {
41
+ details: 'Select the style to apply',
42
+ renderSummary: StyledColumnWizardStyleSection_1.renderStyledColumnStyleSummary,
43
+ render: () => {
44
+ return (React.createElement(rebass_1.Box, { padding: 2 },
45
+ React.createElement(StyledColumnWizardStyleSection_1.StyledColumnWizardStyleSection, { onChange: setStyledColumn })));
46
+ },
47
+ title: 'Style',
48
+ },
49
+ {
50
+ renderSummary: StyledColumnWizardSettingsSection_1.renderStyledColumnWizardSettingsSummary,
51
+ render: () => {
52
+ return (React.createElement(rebass_1.Box, { padding: 2 },
53
+ React.createElement(StyledColumnWizardSettingsSection_1.StyledColumnWizardSettingsSection, { onChange: setStyledColumn })));
54
+ },
55
+ title: 'Settings',
56
+ },
57
+ ];
58
+ const sparklineSteps = [
59
+ {
60
+ title: 'Settings',
61
+ render: () => (React.createElement(rebass_1.Box, { p: 2 },
62
+ React.createElement(StyledColumnSparklineSettingsSection_1.StyledColumnSparklineSettingsSection, { onChange: setStyledColumn }))),
63
+ },
64
+ ];
38
65
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: styledColumn, onFinish: handleFinish, onHide: props.onCloseWizard, sections: [
39
66
  {
40
67
  details: 'Select a Styled Column Type',
@@ -55,23 +82,7 @@ const StyledColumnWizard = (props) => {
55
82
  },
56
83
  title: 'Column',
57
84
  },
58
- {
59
- details: 'Select the style to apply',
60
- renderSummary: StyledColumnWizardStyleSection_1.renderStyledColumnStyleSummary,
61
- render: () => {
62
- return (React.createElement(rebass_1.Box, { padding: 2 },
63
- React.createElement(StyledColumnWizardStyleSection_1.StyledColumnWizardStyleSection, { onChange: setStyledColumn })));
64
- },
65
- title: 'Style',
66
- },
67
- {
68
- renderSummary: StyledColumnWizardSettingsSection_1.renderStyledColumnWizardSettingsSummary,
69
- render: () => {
70
- return (React.createElement(rebass_1.Box, { padding: 2 },
71
- React.createElement(StyledColumnWizardSettingsSection_1.StyledColumnWizardSettingsSection, { onChange: setStyledColumn })));
72
- },
73
- title: 'Settings',
74
- },
85
+ ...(styledColumn.SparkLineStyle ? sparklineSteps : checkboxGrandientPercentSteps),
75
86
  '-',
76
87
  {
77
88
  title: 'Summary',
@@ -30,7 +30,13 @@ const StyledColumnWizardColumnSection = (props) => {
30
30
  const sortableCols = React.useMemo(() => {
31
31
  const sortableColumns = data.CheckBoxStyle
32
32
  ? api.columnApi.getBooleanColumns()
33
- : api.columnApi.getNumericColumns();
33
+ : data.SparkLineStyle
34
+ ? [
35
+ ...api.columnApi.getNumberArrayColumns(),
36
+ ...api.columnApi.getTupleNumberArrayColumns(),
37
+ ...api.columnApi.getObjectNumberArrayColumns(),
38
+ ]
39
+ : api.columnApi.getNumericColumns();
34
40
  const styledColumns = api.styledColumnApi.getAllStyledColumn();
35
41
  const usedColumnIds = styledColumns
36
42
  .map((styledColumn) => {
@@ -19,6 +19,9 @@ const renderStyledColumnTypeSummary = (data) => {
19
19
  else if (data.CheckBoxStyle) {
20
20
  type = 'Check Box';
21
21
  }
22
+ else if (data.SparkLineStyle) {
23
+ type = 'Spark Line';
24
+ }
22
25
  return (React.createElement(rebass_1.Text, { pr: 2, py: 2 },
23
26
  "Type ",
24
27
  React.createElement(Tag_1.Tag, null, type)));
@@ -28,21 +31,26 @@ const StyledColumnWizardTypeSection = (props) => {
28
31
  const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
29
32
  const handleTypeChange = (type) => {
30
33
  const newStyledColumn = Object.assign({}, data);
34
+ delete newStyledColumn.GradientStyle;
35
+ delete newStyledColumn.PercentBarStyle;
36
+ delete newStyledColumn.CheckBoxStyle;
37
+ delete newStyledColumn.SparkLineStyle;
31
38
  switch (type) {
32
39
  case 'gradient':
33
40
  newStyledColumn.GradientStyle = {};
34
- delete newStyledColumn.PercentBarStyle;
35
- delete newStyledColumn.CheckBoxStyle;
36
41
  break;
37
42
  case 'percent':
38
43
  newStyledColumn.PercentBarStyle = {};
39
- delete newStyledColumn.GradientStyle;
40
- delete newStyledColumn.CheckBoxStyle;
41
44
  break;
42
45
  case 'checkbox':
43
46
  newStyledColumn.CheckBoxStyle = true;
44
- delete newStyledColumn.GradientStyle;
45
- delete newStyledColumn.PercentBarStyle;
47
+ break;
48
+ case 'sparkline':
49
+ newStyledColumn.SparkLineStyle = {
50
+ options: {
51
+ type: 'line',
52
+ },
53
+ };
46
54
  break;
47
55
  }
48
56
  newStyledColumn.ColumnId = null;
@@ -54,6 +62,7 @@ const StyledColumnWizardTypeSection = (props) => {
54
62
  React.createElement(Tabs_1.Tabs.Content, null,
55
63
  React.createElement(Radio_1.default, { checked: Boolean(data.GradientStyle), onChange: () => handleTypeChange('gradient') }, "Gradient Column"),
56
64
  React.createElement(Radio_1.default, { onChange: () => handleTypeChange('percent'), checked: Boolean(data.PercentBarStyle) }, "Percent Bar"),
57
- React.createElement(Radio_1.default, { onChange: () => handleTypeChange('checkbox'), checked: Boolean(data.CheckBoxStyle) }, "Check Box")))));
65
+ React.createElement(Radio_1.default, { onChange: () => handleTypeChange('checkbox'), checked: Boolean(data.CheckBoxStyle) }, "Check Box"),
66
+ React.createElement(Radio_1.default, { onChange: () => handleTypeChange('sparkline'), checked: Boolean(data.SparkLineStyle) }, "Sparkline")))));
58
67
  };
59
68
  exports.StyledColumnWizardTypeSection = StyledColumnWizardTypeSection;
@@ -1,4 +1,4 @@
1
- import { ChartRef, ColDef, ColGroupDef, Column, ExcelStyle, GridOptions, Module, ModuleNames, RowNode } from '@ag-grid-community/core';
1
+ import { ChartRef, ColDef, ColGroupDef, Column, ColumnRowGroupChangedEvent, ExcelStyle, GridOptions, Module, ModuleNames, RowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard } from '../AdaptableInterfaces/AdaptableNoCodeWizard';
3
3
  import { AdaptableVariant, IAdaptable } from '../AdaptableInterfaces/IAdaptable';
4
4
  import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
@@ -395,6 +395,15 @@ export declare class Adaptable implements IAdaptable {
395
395
  private mapAggregationColumnsFromGrid;
396
396
  resetMinMaxCachedValueForColumn(column: AdaptableColumn): void;
397
397
  getMinMaxCachedValueForColumn(column: AdaptableColumn, minMax: 'min' | 'max'): number;
398
+ persistColumnIndexBeforeGrouping(params: ColumnRowGroupChangedEvent): void;
399
+ /**
400
+ * Restores the order previous grouping order.
401
+
402
+ */
403
+ restoreUnGroupColumnOrder({ newGroupColumns, columnOrder, }: {
404
+ newGroupColumns: string[];
405
+ columnOrder: string[];
406
+ }): string[];
398
407
  }
399
408
  export declare class AdaptableNoCodeWizard implements IAdaptableNoCodeWizard {
400
409
  private init;