@adaptabletools/adaptable 13.1.1-canary.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 (52) hide show
  1. package/base.css +561 -1971
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +224 -224
  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/GeneralOptions.d.ts +6 -0
  11. package/src/Api/IPushPullApi.d.ts +1 -1
  12. package/src/Api/Implementation/FormatColumnApiImpl.js +3 -3
  13. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
  14. package/src/Api/Implementation/InternalApiImpl.js +7 -0
  15. package/src/Api/InternalApi.d.ts +4 -0
  16. package/src/PredefinedConfig/SystemState.d.ts +7 -0
  17. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +1 -1
  18. package/src/Redux/ActionsReducers/QuickSearchRedux.js +1 -1
  19. package/src/Redux/ActionsReducers/SystemRedux.d.ts +8 -0
  20. package/src/Redux/ActionsReducers/SystemRedux.js +32 -2
  21. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  22. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +0 -4
  23. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +8 -10
  24. package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
  25. package/src/Utilities/Helpers/FormatHelper.js +7 -1
  26. package/src/Utilities/Services/LicenseService/index.js +1 -1
  27. package/src/View/Components/Charting/ChartingViewPanel.js +9 -7
  28. package/src/View/Components/Charting/ShowChartButton.js +6 -6
  29. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
  30. package/src/View/Components/RangesComponent.js +1 -1
  31. package/src/View/Dashboard/Dashboard.js +3 -2
  32. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  33. package/src/agGrid/Adaptable.d.ts +10 -1
  34. package/src/agGrid/Adaptable.js +74 -6
  35. package/src/components/ColorPicker/ColorPicker.js +1 -1
  36. package/src/components/Datepicker/index.d.ts +1 -1
  37. package/src/components/Datepicker/index.js +1 -1
  38. package/src/components/DropdownButton/index.js +2 -2
  39. package/src/components/OverlayTrigger/Overlay.d.ts +1 -4
  40. package/src/components/OverlayTrigger/Overlay.js +3 -40
  41. package/src/components/OverlayTrigger/index.d.ts +4 -4
  42. package/src/components/OverlayTrigger/index.js +71 -50
  43. package/src/components/SimpleButton/index.d.ts +0 -2
  44. package/src/components/SimpleButton/index.js +2 -2
  45. package/src/components/Tooltip/index.d.ts +1 -3
  46. package/src/components/Tooltip/index.js +2 -2
  47. package/src/metamodel/adaptable.metamodel.d.ts +7 -0
  48. package/src/metamodel/adaptable.metamodel.js +1 -1
  49. package/version.d.ts +1 -1
  50. package/version.js +1 -1
  51. package/src/components/OverlayTrigger/getOverlayStyle.d.ts +0 -13
  52. package/src/components/OverlayTrigger/getOverlayStyle.js +0 -56
@@ -71,7 +71,7 @@ function NumberFormatter(input, options = {}) {
71
71
  return s;
72
72
  }
73
73
  exports.NumberFormatter = NumberFormatter;
74
- function DateFormatter(input, options) {
74
+ function DateFormatter(input, options, strictFormatting = false) {
75
75
  if (input == null || input == undefined || input == 'Invalid Date') {
76
76
  return undefined;
77
77
  }
@@ -83,6 +83,12 @@ function DateFormatter(input, options) {
83
83
  return (0, format_1.default)(input, (options === null || options === void 0 ? void 0 : options.Pattern) || GeneralConstants_1.DEFAULT_DATE_FORMAT_PATTERN);
84
84
  }
85
85
  catch (error) {
86
+ if (strictFormatting) {
87
+ return `Invalid date formatting pattern`;
88
+ }
89
+ if (typeof input !== 'string') {
90
+ return String(input);
91
+ }
86
92
  return input;
87
93
  }
88
94
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),s=require("../../../Redux/ActionsReducers/PopupRedux"),t=e.__importDefault(require("../../ObjectFactory")),o=require("../../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../../Constants/DocumentationLinkConstants"),r=require("../../license/decode"),c=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",d=10,p=864e5;var E;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(E=exports.LicenseValidityType||(exports.LicenseValidityType={}));const _=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,I=/(https):\/\/\S+(\.csb\.app)/g,O=/(https):\/\/\S+(\.adaptabletools\.com)/g,u="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,s]=Array.from(_.exec(u)||[]);return"https"===a&&"sandpack.codesandbox.io"===s},A=()=>{const[e,a,s]=Array.from(I.exec(u)||[]);return"https"===a&&".csb.app"===s},N=()=>{const[e,a,s]=Array.from(O.exec(u)||[]);return"https"===a&&".adaptabletools.com"===s};class L{constructor(e,a,s){this.adaptable=e,this.adaptable=e;let t=null;if(a)try{t=(0,r.decode)(a)}catch(e){t=e}h()||A()||N()||this.handleLicenseValidation(t,this.getValidityType(t,s))}getValidityType(e,a){if(!e)return E.NO_LICENSE;if(e instanceof Error)return E.INVALID_LICENSE;const s=new Date(a.publishedAt),t=new Date(e.end),o=t<new Date,i=e.trial;let n=null;return n=o?t>s?i?E.NON_PRODUCTION_EXPIRED_IN_SCOPE:E.COMMERCIAL_EXPIRED_IN_SCOPE:i?E.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:E.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?E.NON_PRODUCTION_VALID:E.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var s;const t=new Date;t.setHours(0,0,0,0);let d=0;e instanceof Error||!(null==e?void 0:e.end)||(d=Math.floor(((null===(s=null==e?void 0:e.end)||void 0===s?void 0:s.getTime())-t.getTime())/864e5),d=(0,i.default)(d,0,1/0));let p="",E="";!e||e instanceof Error||!e.appName||e.appName==r.GENERIC_APP_NAME||(p=e.appName,E=" for application [APP_NAME]");const _=(e,a=n.LicenseDocsLink,s=l,t=d,o=p)=>e.replace("[LINK]",a).replace("[EMAIL]",s).replace("[APP_NAME]",o).replace("[DAYS]",`${t}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(_("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":(0,o.ConsoleLogByMessageType)(_("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":(0,o.ConsoleLogByMessageType)(_("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(_("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(d<=10)(0,o.ConsoleLogByMessageType)(_(`This AdapTable license${E} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,c.shouldLogThankYouMessage)()&&(0,o.ConsoleLogByMessageType)(_(`Thank you for using a valid AdapTable license${E}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(_(`This AdapTable license${E} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(_(`This AdapTable license${E} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,s.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:t.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=L;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),s=require("../../../Redux/ActionsReducers/PopupRedux"),t=e.__importDefault(require("../../ObjectFactory")),o=require("../../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../../Constants/DocumentationLinkConstants"),r=require("../../license/decode"),c=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",d=10,p=864e5;var E;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(E=exports.LicenseValidityType||(exports.LicenseValidityType={}));const _=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,I=/(https):\/\/\S+(\.csb\.app)/g,O=/(https):\/\/\S+(\.adaptabletools\.com)/g,u="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,s]=Array.from(_.exec(u)||[]);return"https"===a&&"sandpack.codesandbox.io"===s},A=()=>{const[e,a,s]=Array.from(I.exec(u)||[]);return"https"===a&&".csb.app"===s},N=()=>{const[e,a,s]=Array.from(O.exec(u)||[]);return"https"===a&&".adaptabletools.com"===s};class L{constructor(e,a,s){this.adaptable=e,this.adaptable=e;let t=null;if(a)try{t=(0,r.decode)(a)}catch(e){t=e}h()||A()||N()||this.handleLicenseValidation(t,this.getValidityType(t,s))}getValidityType(e,a){if(!e)return E.NO_LICENSE;if(e instanceof Error)return E.INVALID_LICENSE;const s=new Date(a.publishedAt),t=new Date(e.end),o=t<new Date,i=e.trial;let n=null;return n=o?t>s?i?E.NON_PRODUCTION_EXPIRED_IN_SCOPE:E.COMMERCIAL_EXPIRED_IN_SCOPE:i?E.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:E.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?E.NON_PRODUCTION_VALID:E.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var s;const t=new Date;t.setHours(0,0,0,0);let E=0;e instanceof Error||!(null==e?void 0:e.end)||(E=Math.floor(((null===(s=null==e?void 0:e.end)||void 0===s?void 0:s.getTime())-t.getTime())/p),E=(0,i.default)(E,0,1/0));let _="",I="";!e||e instanceof Error||!e.appName||e.appName==r.GENERIC_APP_NAME||(_=e.appName,I=" for application [APP_NAME]");const O=(e,a=n.LicenseDocsLink,s=l,t=E,o=_)=>e.replace("[LINK]",a).replace("[EMAIL]",s).replace("[APP_NAME]",o).replace("[DAYS]",`${t}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(O("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":(0,o.ConsoleLogByMessageType)(O("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":(0,o.ConsoleLogByMessageType)(O("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(O("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(E<=d)(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,c.shouldLogThankYouMessage)()&&(0,o.ConsoleLogByMessageType)(O(`Thank you for using a valid AdapTable license${I}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,s.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:t.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=L;
@@ -55,15 +55,17 @@ const ChartingViewPanel = (props) => {
55
55
  setSelectedContainer(null);
56
56
  },
57
57
  },
58
- ...chartContainers.map((contianerDef) => ({
59
- label: contianerDef.name,
60
- onClick: () => {
61
- setSelectedContainer(contianerDef);
62
- },
63
- })),
58
+ ...(chartContainers
59
+ ? chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.map((contianerDef) => ({
60
+ label: contianerDef.name,
61
+ onClick: () => {
62
+ setSelectedContainer(contianerDef);
63
+ },
64
+ }))
65
+ : []),
64
66
  ];
65
67
  const chartSelector = (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], className: `ab-${elementType}__Chart__select`, items: options, disabled: !hasCharts }, content));
66
- const containerSelector = Boolean(chartContainers.length) && (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], items: containerOptions, disabled: !isSelectedChart }, (selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name) || 'Ag Grid Window'));
68
+ const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], items: containerOptions, disabled: !isSelectedChart }, (selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name) || 'Ag Grid Window'));
67
69
  const chartButton = (React.createElement(SimpleButton_1.default, { onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'outlined', tone: 'neutral' }, isOpen ? 'Close' : 'Open'));
68
70
  if (elementType === 'DashboardToolbar') {
69
71
  return (React.createElement(rebass_1.Flex, { width: "100%", alignItems: "center" },
@@ -25,12 +25,12 @@ const ShowChartButton = (props) => {
25
25
  showChart(null);
26
26
  },
27
27
  },
28
- ...chartContainers.map((contianerDef) => ({
29
- label: contianerDef.name,
30
- onClick: () => {
31
- showChart(contianerDef);
32
- },
33
- })),
28
+ ...(chartContainers
29
+ ? chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.map((contianerDef) => ({
30
+ label: contianerDef.name,
31
+ onClick: () => showChart(contianerDef),
32
+ }))
33
+ : []),
34
34
  ];
35
35
  return (React.createElement(DropdownButton_1.default, { "data-name": "show-chart-dropdown", variant: "text", columns: ['label'], items: containerOptions },
36
36
  React.createElement(SimpleButton_1.default, { variant: "raised", tone: "success" }, "Open")));
@@ -142,7 +142,7 @@ class QuickFilterFormComponent extends React.Component {
142
142
  showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
143
143
  }
144
144
  return (React.createElement(React.Fragment, null,
145
- showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', alignHorizontal: "left", targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { flexDirection: "column", "data-name": "quick-filter" },
145
+ showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { flexDirection: "column", "data-name": "quick-filter" },
146
146
  (filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) && (React.createElement(SimpleButton_1.default, { p: 2, variant: "text", onClick: () => this.clearFilter() },
147
147
  React.createElement("span", { style: { width: 20, marginRight: 10 } },
148
148
  React.createElement(icons_1.Icon, { name: "delete" })),
@@ -247,7 +247,7 @@ class QuickFilterFormComponent extends React.Component {
247
247
  return label !== null && label !== void 0 ? label : input;
248
248
  }).join(', ');
249
249
  }
250
- return (React.createElement(OverlayTrigger_1.default, { alignHorizontal: "left", showEvent: showEvent,
250
+ return (React.createElement(OverlayTrigger_1.default, { showEvent: showEvent,
251
251
  // cannot hide on blur, because the form input receives the input when this is opened
252
252
  hideEvent: "mouseleave", hideDelay: 300, ref: (api) => {
253
253
  this.valuesDropdown = api;
@@ -80,7 +80,7 @@ class RangesComponent extends React.Component {
80
80
  React.createElement(ColorPicker_1.ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
81
81
  this.changeRangeColor(index, color);
82
82
  }, mr: 2, height: 33 })),
83
- this.props.showRangeDirection && (React.createElement(CheckBox_1.CheckBox, { disabled: this.props.disabled, checked: range.ReverseGradient && range.ReverseGradient == true, onChange: (checked) => this.changeRangeDirectionUp(index, checked) }, "Reverse Gradient")),
83
+ this.props.showRangeDirection && (React.createElement(CheckBox_1.CheckBox, { disabled: this.props.disabled, checked: range.ReverseGradient && range.ReverseGradient == true, onChange: (checked) => this.changeRangeDirectionUp(index, checked), ml: 2 }, "Reverse Gradient")),
84
84
  React.createElement(SimpleButton_1.default, { ml: 2, mb: 1, icon: "delete", disabled: this.props.disabled || (this.props.ranges && this.props.ranges.length == 1), onClick: () => this.removeRange(index) })))),
85
85
  React.createElement("div", null,
86
86
  React.createElement(SimpleButton_1.default, { disabled: this.props.disabled, variant: "raised", "data-name": "add", onClick: () => this.addRange() }, "Add New Range"))))),
@@ -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,
@@ -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;
@@ -1516,9 +1516,10 @@ class Adaptable {
1516
1516
  * This is the opposite of setLayout
1517
1517
  */
1518
1518
  updateLayoutFromGrid() {
1519
+ var _a, _b;
1519
1520
  const currentLayout = this.api.layoutApi.getCurrentLayout();
1520
1521
  const layout = Object.assign({}, currentLayout);
1521
- const columnOrder = [];
1522
+ let columnOrder = [];
1522
1523
  const columnFlexes = {};
1523
1524
  const pinnedColumns = {};
1524
1525
  const columnSorts = [];
@@ -1568,6 +1569,12 @@ class Adaptable {
1568
1569
  });
1569
1570
  groupedColumns = groupedColumns.filter((x) => !!x);
1570
1571
  pivotedColumns = pivotedColumns.filter((x) => !!x);
1572
+ if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.generalOptions) === null || _b === void 0 ? void 0 : _b.keepGroupedColumnIndex) {
1573
+ columnOrder = this.restoreUnGroupColumnOrder({
1574
+ columnOrder,
1575
+ newGroupColumns: groupedColumns,
1576
+ });
1577
+ }
1571
1578
  layout.ColumnWidthMap = columnWidths;
1572
1579
  // layout.ColumnFlexMap = columnFlexes;
1573
1580
  layout.PinnedColumnsMap = pinnedColumns;
@@ -2850,9 +2857,13 @@ class Adaptable {
2850
2857
  * Action: Make the column invisible
2851
2858
  */
2852
2859
  this.gridOptions.api.addEventListener(core_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, (this.listenerColumnRowGroupChanged = (params) => {
2860
+ var _a, _b;
2853
2861
  if (this.api.internalApi.isGridInPivotMode()) {
2854
2862
  return;
2855
2863
  }
2864
+ if ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.generalOptions) === null || _b === void 0 ? void 0 : _b.keepGroupedColumnIndex) {
2865
+ this.persistColumnIndexBeforeGrouping(params);
2866
+ }
2856
2867
  if (this.adaptableOptions.columnOptions.hideColumnWhenGrouped === true &&
2857
2868
  params.source !== 'api') {
2858
2869
  params.columns.forEach((col) => {
@@ -4665,17 +4676,19 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4665
4676
  return this.ReportService.getCellExportValueFromRowNode(rowNode, columnId);
4666
4677
  }
4667
4678
  processRowGroupForExcelExport(rowNode) {
4668
- if (!rowNode.field || !rowNode.key) {
4679
+ var _a, _b, _c, _d, _e;
4680
+ const columnId = (_c = (_a = rowNode.field) !== null && _a !== void 0 ? _a : (_b = rowNode.rowGroupColumn) === null || _b === void 0 ? void 0 : _b.getColId()) !== null && _c !== void 0 ? _c : (_e = (_d = rowNode.rowGroupColumn) === null || _d === void 0 ? void 0 : _d.getColDef()) === null || _e === void 0 ? void 0 : _e.field;
4681
+ if (!columnId || !rowNode.key) {
4669
4682
  return;
4670
4683
  }
4671
- const columnId = rowNode.field;
4672
4684
  let rawValue = rowNode.key;
4673
4685
  if (this.api.columnApi.getColumnDataTypeFromColumnId(columnId) === 'Date' &&
4674
4686
  typeof rawValue === 'string') {
4675
4687
  // AG-Grid converts the value to string, we have to reconvert it back
4676
- const numericRawValue = parseInt(rawValue);
4677
- if (!isNaN(numericRawValue)) {
4678
- rawValue = numericRawValue;
4688
+ const dateRawValue = (0, DateHelper_1.parseDateValue)(rawValue);
4689
+ if (dateRawValue != undefined) {
4690
+ // @ts-ignore
4691
+ rawValue = dateRawValue;
4679
4692
  }
4680
4693
  }
4681
4694
  return this.ReportService.getCellExportValueFromRawValue(rowNode, rawValue, columnId);
@@ -4809,6 +4822,61 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4809
4822
  this.columnMinMaxValuesCache[columnId] = Object.assign(Object.assign({}, this.columnMinMaxValuesCache[columnId]), { [minMax]: value });
4810
4823
  return value;
4811
4824
  }
4825
+ persistColumnIndexBeforeGrouping(params) {
4826
+ const layout = this.api.layoutApi.getCurrentLayout();
4827
+ const columnGroupsInLayout = layout.RowGroupedColumns;
4828
+ const columnGroupsInGrid = params.columns.map((col) => col.getColId());
4829
+ // what is new
4830
+ const newGroups = columnGroupsInGrid.filter((colId) => !columnGroupsInLayout.includes(colId));
4831
+ newGroups.forEach((colId) => {
4832
+ const columnIndex = layout.Columns.findIndex((columnIdInLayout) => columnIdInLayout === colId);
4833
+ // user may group after a column not in layout
4834
+ if (columnIndex !== -1) {
4835
+ this.api.internalApi.persistPreviousGroupedColumnsIndex(layout.Uuid, colId, columnIndex);
4836
+ }
4837
+ });
4838
+ }
4839
+ /**
4840
+ * Restores the order previous grouping order.
4841
+
4842
+ */
4843
+ restoreUnGroupColumnOrder({ newGroupColumns, columnOrder, }) {
4844
+ var _a;
4845
+ const newColumnOrder = [...columnOrder];
4846
+ const currentLayout = this.api.layoutApi.getCurrentLayout();
4847
+ const previousGroupedColumnsIndex = this.api.internalApi.getPreviousGroupedColumnsIndex(currentLayout.Uuid);
4848
+ const isUnGroup = newGroupColumns.length < ((_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length);
4849
+ if (!isUnGroup) {
4850
+ return columnOrder;
4851
+ }
4852
+ if (!previousGroupedColumnsIndex) {
4853
+ return columnOrder;
4854
+ }
4855
+ for (let [colId, previousIndex] of Object.entries(previousGroupedColumnsIndex)) {
4856
+ const isStillGrouped = newGroupColumns.includes(colId);
4857
+ const isAlreadyInGrid = currentLayout.Columns.includes(colId); // was not just added by ungrouping
4858
+ if (isStillGrouped) {
4859
+ break;
4860
+ }
4861
+ if (isAlreadyInGrid) {
4862
+ // no longer grouped, but already in grid, this means it was already in grid before ungrouping
4863
+ // in this case the state can be cleared
4864
+ this.api.internalApi.persistPreviousGroupedColumnsIndex(currentLayout.Uuid, colId, null);
4865
+ break;
4866
+ }
4867
+ const indexInGrid = newColumnOrder.indexOf(colId);
4868
+ const hasDifferentPositionAsPreviousLayout = previousIndex !== null && // if null, the reorder was already applied
4869
+ indexInGrid > 0 && // needs to be in grid
4870
+ previousIndex !== indexInGrid;
4871
+ const isPreviousPositionInRange = previousIndex < newColumnOrder.length;
4872
+ if (hasDifferentPositionAsPreviousLayout && isPreviousPositionInRange) {
4873
+ newColumnOrder.splice(indexInGrid, 1);
4874
+ newColumnOrder.splice(previousIndex, 0, colId);
4875
+ }
4876
+ this.api.internalApi.persistPreviousGroupedColumnsIndex(currentLayout.Uuid, colId, null);
4877
+ }
4878
+ return newColumnOrder;
4879
+ }
4812
4880
  }
4813
4881
  exports.Adaptable = Adaptable;
4814
4882
  class AdaptableNoCodeWizard {
@@ -43,5 +43,5 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
43
43
  React.createElement(Input_1.default, { className: "ab-ColorPicker-range", style: { background: rangeBackround }, value: alpha, onChange: (event) => {
44
44
  const color = tinycolor(value).setAlpha(event.target.value).toRgbString();
45
45
  props.onChange(color);
46
- }, min: 0, max: 1, step: 0.1, type: "range" })))));
46
+ }, min: 0, max: 1, step: 0.01, type: "range" })))));
47
47
  });
@@ -15,4 +15,4 @@ export declare type DatepickerProps = Omit<BoxProps, 'value' | 'onChange' | 'def
15
15
  showWeekNumber?: boolean;
16
16
  showOutsideDays?: boolean;
17
17
  };
18
- export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx" | "showOutsideDays" | "showWeekNumber" | "onHide" | "showClearButton" | "datepickerButtons" | "dateProps"> & React.RefAttributes<HTMLInputElement>>;
18
+ export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx" | "onHide" | "showOutsideDays" | "showWeekNumber" | "showClearButton" | "datepickerButtons" | "dateProps"> & React.RefAttributes<HTMLInputElement>>;
@@ -87,7 +87,7 @@ exports.Datepicker = React.forwardRef((props, ref) => {
87
87
  }, accessLevel: 'Full' })) : null;
88
88
  const calendarButton = (React.createElement(SimpleButton_1.default, { disabled: disabled, variant: "text", icon: "calendar", tooltip: "Date", iconSize: 20, px: 0, py: 0, onClick: () => setVisible(true) }));
89
89
  return (React.createElement(rebass_1.Flex, null,
90
- React.createElement(OverlayTrigger_1.default, { visible: visible, alignHorizontal: 'left', render: () => (React.createElement(DatepickerOverlay, { onHide: () => setVisible(false), onKeyDown: (e) => {
90
+ React.createElement(OverlayTrigger_1.default, { visible: visible, render: () => (React.createElement(DatepickerOverlay, { onHide: () => setVisible(false), onKeyDown: (e) => {
91
91
  if (e.key === 'Escape' || e.key === 'Enter') {
92
92
  setVisible(false, e.key);
93
93
  }
@@ -102,9 +102,9 @@ const DropdownButton = React.forwardRef((props, theRef) => {
102
102
  hasClearButton ? clearButton : null,
103
103
  icon));
104
104
  const buttonRef = (0, react_1.useRef)(null);
105
- return (React.createElement(OverlayTrigger_1.default, Object.assign({ visible: expanded, constrainTo: constrainTo, anchor: "vertical", targetOffset: listOffset, render: () => {
105
+ return (React.createElement(OverlayTrigger_1.default, Object.assign({ visible: expanded, targetOffset: listOffset, render: () => {
106
106
  return (React.createElement("div", { "data-name": `${dropdownButtonClassName}`, style: listStyle, className: `${baseClassName}__list` }, content));
107
- } }, overlayProps, { target: domProps.tooltip ? (node) => node.previousSibling : undefined }),
107
+ } }, overlayProps),
108
108
  React.createElement(SimpleButton_1.default, Object.assign({ iconPosition: "end" }, (showToggleIcon && { icon, paddingRight: 0 }), domProps, { ref: (btn) => {
109
109
  buttonRef.current = btn;
110
110
  if (!theRef) {
@@ -1,11 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { HTMLAttributes } from 'react';
3
- import { BoundingClientRect } from '../utils/getAvailableSizeInfo';
4
3
  export interface OverlayProps extends HTMLAttributes<HTMLElement> {
5
4
  visible: boolean;
6
- anchor: 'vertical' | 'horizontal';
7
- position: 'top' | 'bottom' | 'left' | 'right';
8
- getConstrainRect: () => BoundingClientRect;
5
+ onTransitionEnd?: () => void;
9
6
  }
10
7
  export declare const useRefresh: () => () => void;
11
8
  declare const Overlay: React.ForwardRefExoticComponent<OverlayProps & React.RefAttributes<Element>>;
@@ -6,8 +6,6 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_1 = require("react");
7
7
  const batchUpdate_1 = tslib_1.__importDefault(require("../utils/batchUpdate"));
8
8
  const usePrevious_1 = tslib_1.__importDefault(require("../utils/usePrevious"));
9
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
10
- const utils_1 = require("./utils");
11
9
  const useRefresh = () => {
12
10
  const [x, update] = (0, react_1.useState)(0);
13
11
  return () => {
@@ -15,13 +13,8 @@ const useRefresh = () => {
15
13
  };
16
14
  };
17
15
  exports.useRefresh = useRefresh;
18
- const translateToValues = (x) => x
19
- .split('(')[1]
20
- .split(')')[0]
21
- .split(',')
22
- .map((s) => s.trim());
23
16
  const Overlay = React.forwardRef((props, ref) => {
24
- const { visible, getConstrainRect, anchor, position } = props, domProps = tslib_1.__rest(props, ["visible", "getConstrainRect", "anchor", "position"]);
17
+ const { visible } = props, domProps = tslib_1.__rest(props, ["visible"]);
25
18
  const domRef = (0, react_1.useRef)(null);
26
19
  const setRef = (node) => {
27
20
  domRef.current = node;
@@ -40,44 +33,14 @@ const Overlay = React.forwardRef((props, ref) => {
40
33
  setOpacity(props.visible ? 1 : 0);
41
34
  }).commit();
42
35
  }, [visible]);
43
- (0, react_1.useLayoutEffect)(() => {
44
- if (!visible) {
45
- return;
46
- }
47
- const constrainRect = getConstrainRect();
48
- const domNode = domRef.current;
49
- const thisRect = (0, utils_1.getRect)(domNode);
50
- const intersection = (0, utils_1.getIntersection)(constrainRect, thisRect);
51
- if (!(0, isEqual_1.default)(intersection, thisRect)) {
52
- const transform = props.style
53
- ? props.style.transform || 'translate3d(0px, 0px, 0px)'
54
- : 'translate3d(0px, 0px, 0px)';
55
- const horizontalDiff = Math.round(thisRect.left < constrainRect.left
56
- ? constrainRect.left - thisRect.left
57
- : thisRect.right > constrainRect.right
58
- ? constrainRect.right - thisRect.right
59
- : 0);
60
- const verticalDiff = Math.round(thisRect.top < constrainRect.top
61
- ? constrainRect.top - thisRect.top
62
- : thisRect.bottom > constrainRect.bottom
63
- ? constrainRect.bottom - thisRect.bottom
64
- : 0);
65
- const values = translateToValues(transform);
66
- if (horizontalDiff) {
67
- values[0] = `calc(${values[0]} + ${horizontalDiff}px)`;
68
- }
69
- if (verticalDiff) {
70
- values[1] = `calc(${values[1]} + ${verticalDiff}px)`;
71
- }
72
- domNode.style.transform = `translate3d(${values.join(', ')})`;
73
- }
74
- }, [visible]);
75
36
  if (prevVisible && !visible) {
76
37
  transitionInProgressRef.current = true;
77
38
  }
78
39
  const onTransitionEnd = () => {
40
+ var _a;
79
41
  transitionInProgressRef.current = false;
80
42
  refresh();
43
+ (_a = props === null || props === void 0 ? void 0 : props.onTransitionEnd) === null || _a === void 0 ? void 0 : _a.call(props);
81
44
  };
82
45
  const renderTime = Date.now();
83
46
  const renderTimeRef = (0, react_1.useRef)(renderTime);
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode, CSSProperties } from 'react';
3
- import { BoundingClientRect } from '../utils/getAvailableSizeInfo';
4
- import { OverlayHorizontalAlign } from './getOverlayStyle';
3
+ import { OverlayShowParams } from '../InfiniteTable';
5
4
  export declare type ConstrainToType = ((node: HTMLElement) => HTMLElement) | string;
6
- export declare const getConstrainRect: (target: HTMLElement, constrainTo?: ConstrainToType) => BoundingClientRect;
5
+ export declare const getConstrainElement: (target: HTMLElement, constrainTo?: ConstrainToType) => HTMLElement;
6
+ export declare const getConstrainRect: (target: HTMLElement, constrainTo?: ConstrainToType) => import("../utils/getAvailableSizeInfo").BoundingClientRect;
7
7
  export interface OverlayTriggerProps extends React.HTMLAttributes<HTMLElement> {
8
8
  opacityTransitionDuration?: string | number;
9
9
  children: React.ReactNode;
@@ -20,7 +20,7 @@ export interface OverlayTriggerProps extends React.HTMLAttributes<HTMLElement> {
20
20
  targetOffset?: number;
21
21
  defaultZIndex?: number;
22
22
  anchor?: 'vertical' | 'horizontal';
23
- alignHorizontal?: OverlayHorizontalAlign;
23
+ alignPosition?: OverlayShowParams['alignPosition'];
24
24
  constrainTo?: ConstrainToType;
25
25
  }
26
26
  declare const OverlayTrigger: React.ForwardRefExoticComponent<OverlayTriggerProps & React.RefAttributes<{