@adaptabletools/adaptable-cjs 22.0.0-canary.5 → 22.0.0-canary.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +0 -3
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/CustomSortOptions.d.ts +1 -2
- package/src/AdaptableState/AlertState.d.ts +6 -3
- package/src/AdaptableState/ChartingState.d.ts +5 -5
- package/src/AdaptableState/Common/AdaptableObject.d.ts +4 -9
- package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
- package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +18 -0
- package/src/AdaptableState/Common/ColumnHighlightInfo.js +2 -0
- package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
- package/src/AdaptableState/Common/NamedObject.js +2 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +7 -3
- package/src/AdaptableState/Common/SuspendableObject.d.ts +10 -0
- package/src/AdaptableState/Common/SuspendableObject.js +2 -0
- package/src/AdaptableState/CustomSortState.d.ts +6 -2
- package/src/AdaptableState/DashboardState.d.ts +3 -3
- package/src/AdaptableState/ExportState.d.ts +3 -3
- package/src/AdaptableState/FlashingCellState.d.ts +6 -2
- package/src/AdaptableState/FormatColumnState.d.ts +6 -2
- package/src/AdaptableState/InternalState.d.ts +2 -0
- package/src/AdaptableState/LayoutState.d.ts +3 -3
- package/src/AdaptableState/NamedQueryState.d.ts +3 -3
- package/src/AdaptableState/PlusMinusState.d.ts +6 -2
- package/src/AdaptableState/ShortcutState.d.ts +6 -2
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/ThemeState.d.ts +3 -3
- package/src/Api/AlertApi.d.ts +6 -0
- package/src/Api/CustomSortApi.d.ts +6 -0
- package/src/Api/FlashingCellApi.d.ts +6 -0
- package/src/Api/FormatColumnApi.d.ts +10 -4
- package/src/Api/GridApi.d.ts +18 -3
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +3 -0
- package/src/Api/Implementation/ChartingApiImpl.js +2 -2
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
- package/src/Api/Implementation/FormatColumnApiImpl.js +6 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -0
- package/src/Api/Implementation/GridApiImpl.js +14 -0
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
- package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +1 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
- package/src/Api/PlusMinusApi.d.ts +6 -0
- package/src/Api/ScheduleApi.d.ts +6 -0
- package/src/Api/ShortcutApi.d.ts +6 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +17 -1
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.js +42 -3
- package/src/Redux/Store/AdaptableStore.js +39 -16
- package/src/Strategy/BulkUpdateModule.js +8 -8
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +11 -7
- package/src/Strategy/SmartEditModule.js +10 -10
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/Fdc3Service.js +4 -4
- package/src/Utilities/Services/ModuleService.js +1 -3
- package/src/Utilities/Services/ThemeService.js +2 -6
- package/src/Utilities/Services/ValidationService.js +1 -1
- package/src/Utilities/logDeprecation.js +3 -4
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/ColumnFilter/FloatingFilter.js +41 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +54 -2
- package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
- package/src/View/Components/NewScopeComponent.js +3 -3
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +11 -11
- package/src/View/StateManagement/handleExportState.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +47 -51
- package/src/agGrid/AgGridAdapter.js +8 -8
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
- package/src/agGrid/AgGridColumnAdapter.js +15 -4
- package/src/agGrid/AgGridExportAdapter.js +5 -5
- package/src/agGrid/AgGridThemeAdapter.js +2 -2
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.js +77 -14
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +25 -18
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +2 -2
- package/src/migration/VersionUpgrade17.js +4 -4
- package/src/migration/VersionUpgrade20.js +4 -4
- package/src/types.d.ts +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -119,6 +119,7 @@ const doesOptionMatchValue = function (value) {
|
|
|
119
119
|
};
|
|
120
120
|
const Select = function (props) {
|
|
121
121
|
let maxLabelLength = 0;
|
|
122
|
+
const inputId = (0, react_1.useId)();
|
|
122
123
|
const computedCSSVars = (0, AdaptableComputedCSSVarsContext_1.useAdaptableComputedCSSVars)();
|
|
123
124
|
const CSS_VARS_VALUES = {
|
|
124
125
|
'--ab-cmp-select-menu__max-width': computedCSSVars['--ab-cmp-select-menu__max-width'] || '60vw',
|
|
@@ -130,14 +131,15 @@ const Select = function (props) {
|
|
|
130
131
|
// relevant for menulist search only
|
|
131
132
|
const menulistInputRef = React.useRef(null);
|
|
132
133
|
const [isSelectMenuOpen, setIsSelectMenuOpen] = (0, react_1.useState)(false);
|
|
133
|
-
const
|
|
134
|
+
const propsOnMenuOpen = props.onMenuOpen;
|
|
135
|
+
const openSelectMenu = React.useCallback(() => {
|
|
134
136
|
setIsSelectMenuOpen(true);
|
|
135
137
|
// it's a react-select bug, onMenuOpen is not called with controlled menuIsOpen
|
|
136
|
-
|
|
137
|
-
};
|
|
138
|
-
const closeSelectMenu = () => {
|
|
138
|
+
propsOnMenuOpen?.();
|
|
139
|
+
}, [propsOnMenuOpen]);
|
|
140
|
+
const closeSelectMenu = React.useCallback(() => {
|
|
139
141
|
setIsSelectMenuOpen(false);
|
|
140
|
-
};
|
|
142
|
+
}, []);
|
|
141
143
|
const ref = React.useRef(null);
|
|
142
144
|
const valueToOptionMap = new Map((props.options || []).map((opt) => {
|
|
143
145
|
let label = opt.label;
|
|
@@ -203,6 +205,18 @@ const Select = function (props) {
|
|
|
203
205
|
/**
|
|
204
206
|
* If on each render a new reference is passed, the menu will not open using the keyboard.
|
|
205
207
|
*/
|
|
208
|
+
/**
|
|
209
|
+
* Use refs for isSelectMenuOpen, openSelectMenu, and closeSelectMenu so that
|
|
210
|
+
* SelectContainer is stable across re-renders. If SelectContainer gets a new
|
|
211
|
+
* reference when menu opens/closes, react-select recreates its internal
|
|
212
|
+
* component tree, the DummyInput is removed from DOM, and focus is lost.
|
|
213
|
+
*/
|
|
214
|
+
const isSelectMenuOpenRef = React.useRef(isSelectMenuOpen);
|
|
215
|
+
isSelectMenuOpenRef.current = isSelectMenuOpen;
|
|
216
|
+
const openSelectMenuRef = React.useRef(openSelectMenu);
|
|
217
|
+
openSelectMenuRef.current = openSelectMenu;
|
|
218
|
+
const closeSelectMenuRef = React.useRef(closeSelectMenu);
|
|
219
|
+
closeSelectMenuRef.current = closeSelectMenu;
|
|
206
220
|
const SelectContainer = React.useMemo(() => {
|
|
207
221
|
return (selectContainerProps) => {
|
|
208
222
|
return (React.createElement(react_select_1.components.SelectContainer, { ...selectContainerProps, innerProps: {
|
|
@@ -215,15 +229,50 @@ const Select = function (props) {
|
|
|
215
229
|
if (!searchableInMenulist) {
|
|
216
230
|
return;
|
|
217
231
|
}
|
|
218
|
-
if (!
|
|
219
|
-
|
|
232
|
+
if (!isSelectMenuOpenRef.current) {
|
|
233
|
+
openSelectMenuRef.current();
|
|
220
234
|
e.stopPropagation();
|
|
221
235
|
e.preventDefault();
|
|
222
236
|
}
|
|
223
237
|
},
|
|
238
|
+
onKeyDownCapture: (e) => {
|
|
239
|
+
if (!searchableInMenulist) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (isSelectMenuOpenRef.current) {
|
|
243
|
+
if (e.key === 'Escape') {
|
|
244
|
+
closeSelectMenuRef.current();
|
|
245
|
+
e.stopPropagation();
|
|
246
|
+
e.preventDefault();
|
|
247
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
248
|
+
// we do this because the focus is lost when the menu is closed
|
|
249
|
+
// and document.body is set as the active element
|
|
250
|
+
requestAnimationFrame(() => {
|
|
251
|
+
document.getElementById(inputId)?.focus();
|
|
252
|
+
// we need to do it again
|
|
253
|
+
// also don't store a ref to the input element
|
|
254
|
+
// but query the DOM again
|
|
255
|
+
// as the old ref is no longer in the DOM
|
|
256
|
+
// because of a react-select bug I presume
|
|
257
|
+
requestAnimationFrame(() => {
|
|
258
|
+
document.getElementById(inputId)?.focus();
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
// open the menu
|
|
265
|
+
if (e.key === 'Enter' || e.key === ' ' || e.key === 'ArrowDown') {
|
|
266
|
+
openSelectMenuRef.current();
|
|
267
|
+
e.stopPropagation();
|
|
268
|
+
e.preventDefault();
|
|
269
|
+
e.nativeEvent.stopImmediatePropagation();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
224
273
|
} }));
|
|
225
274
|
};
|
|
226
|
-
}, [
|
|
275
|
+
}, [searchableInMenulist]);
|
|
227
276
|
const resizable = props.resizable ?? false;
|
|
228
277
|
const ValueContainer = React.useMemo(() => {
|
|
229
278
|
return (props) => {
|
|
@@ -525,11 +574,25 @@ const Select = function (props) {
|
|
|
525
574
|
setInputValue(value);
|
|
526
575
|
props.onInputChange?.(value);
|
|
527
576
|
}, [props.onInputChange, isMulti]);
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
577
|
+
/**
|
|
578
|
+
* Use refs for selectedOption and renderSingleValue so that the
|
|
579
|
+
* SingleValue component function is stable across re-renders.
|
|
580
|
+
* If SingleValue gets a new reference on each render, selectComponents changes,
|
|
581
|
+
* react-select recreates its internal component tree, the DummyInput is removed
|
|
582
|
+
* from DOM, and focus is lost (the keyboard stops working).
|
|
583
|
+
* See the comment above SelectContainer about this exact issue.
|
|
584
|
+
*/
|
|
585
|
+
const selectedOptionRef = React.useRef(selectedOption);
|
|
586
|
+
selectedOptionRef.current = selectedOption;
|
|
587
|
+
const renderSingleValueRef = React.useRef(props.renderSingleValue);
|
|
588
|
+
renderSingleValueRef.current = props.renderSingleValue;
|
|
589
|
+
const SingleValue = React.useMemo(() => {
|
|
590
|
+
return (singleValueProps) => {
|
|
591
|
+
return (React.createElement(react_select_1.components.SingleValue, { ...singleValueProps }, renderSingleValueRef.current
|
|
592
|
+
? renderSingleValueRef.current(selectedOptionRef.current)
|
|
593
|
+
: singleValueProps.children));
|
|
594
|
+
};
|
|
595
|
+
}, []);
|
|
533
596
|
const selectComponents = (0, react_1.useMemo)(() => {
|
|
534
597
|
return {
|
|
535
598
|
SelectContainer,
|
|
@@ -550,7 +613,7 @@ const Select = function (props) {
|
|
|
550
613
|
MenuList,
|
|
551
614
|
]);
|
|
552
615
|
return (React.createElement(React.Fragment, null,
|
|
553
|
-
React.createElement(SelectComponent, { ref: ref, openMenuOnClick: searchableInMenulist ? false : undefined, openMenuOnFocus: searchableInMenulist ? false : undefined, menuIsOpen: searchableInMenulist ? isSelectMenuOpen : undefined, isSearchable: searchableInline, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, clsx_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
616
|
+
React.createElement(SelectComponent, { ref: ref, openMenuOnClick: searchableInMenulist ? false : undefined, openMenuOnFocus: searchableInMenulist ? false : undefined, menuIsOpen: searchableInMenulist ? isSelectMenuOpen : undefined, isSearchable: searchableInline, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, inputId: inputId, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, clsx_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
|
|
554
617
|
// This needed so the menu is not clipped by overflow: hidden
|
|
555
618
|
menuPortalTarget: (0, OverlayTrigger_1.ensurePortalElement)(), isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
|
|
556
619
|
if (isMulti) {
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "22.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1770740703905 || Date.now(),
|
|
6
|
+
VERSION: "22.0.0-canary.7" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -1094,6 +1094,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1094
1094
|
defVal: string;
|
|
1095
1095
|
})[];
|
|
1096
1096
|
};
|
|
1097
|
+
AdaptableTransientState: {
|
|
1098
|
+
name: string;
|
|
1099
|
+
kind: string;
|
|
1100
|
+
desc: string;
|
|
1101
|
+
};
|
|
1097
1102
|
AdaptableVersion: {
|
|
1098
1103
|
name: string;
|
|
1099
1104
|
kind: string;
|
|
@@ -1290,6 +1295,12 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1290
1295
|
desc: string;
|
|
1291
1296
|
ref: string;
|
|
1292
1297
|
isOpt?: undefined;
|
|
1298
|
+
} | {
|
|
1299
|
+
name: string;
|
|
1300
|
+
kind: string;
|
|
1301
|
+
desc: string;
|
|
1302
|
+
isOpt?: undefined;
|
|
1303
|
+
ref?: undefined;
|
|
1293
1304
|
})[];
|
|
1294
1305
|
};
|
|
1295
1306
|
AlertDefinitionPredicate: {
|
|
@@ -2157,20 +2168,12 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2157
2168
|
name: string;
|
|
2158
2169
|
kind: string;
|
|
2159
2170
|
desc: string;
|
|
2160
|
-
isOpt?: undefined;
|
|
2161
|
-
ref?: undefined;
|
|
2162
|
-
} | {
|
|
2163
|
-
name: string;
|
|
2164
|
-
kind: string;
|
|
2165
|
-
desc: string;
|
|
2166
|
-
isOpt: boolean;
|
|
2167
2171
|
ref?: undefined;
|
|
2168
2172
|
} | {
|
|
2169
2173
|
name: string;
|
|
2170
2174
|
kind: string;
|
|
2171
2175
|
desc: string;
|
|
2172
2176
|
ref: string;
|
|
2173
|
-
isOpt?: undefined;
|
|
2174
2177
|
})[];
|
|
2175
2178
|
};
|
|
2176
2179
|
CommandHandler: {
|
|
@@ -3669,6 +3672,13 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3669
3672
|
isOpt: boolean;
|
|
3670
3673
|
defVal: string;
|
|
3671
3674
|
ref?: undefined;
|
|
3675
|
+
} | {
|
|
3676
|
+
name: string;
|
|
3677
|
+
kind: string;
|
|
3678
|
+
desc: string;
|
|
3679
|
+
isOpt?: undefined;
|
|
3680
|
+
defVal?: undefined;
|
|
3681
|
+
ref?: undefined;
|
|
3672
3682
|
} | {
|
|
3673
3683
|
name: string;
|
|
3674
3684
|
kind: string;
|
|
@@ -3725,6 +3735,13 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3725
3735
|
isOpt: boolean;
|
|
3726
3736
|
ref: string;
|
|
3727
3737
|
defVal?: undefined;
|
|
3738
|
+
} | {
|
|
3739
|
+
name: string;
|
|
3740
|
+
kind: string;
|
|
3741
|
+
desc: string;
|
|
3742
|
+
isOpt?: undefined;
|
|
3743
|
+
ref?: undefined;
|
|
3744
|
+
defVal?: undefined;
|
|
3728
3745
|
} | {
|
|
3729
3746
|
name: string;
|
|
3730
3747
|
kind: string;
|
|
@@ -4477,16 +4494,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4477
4494
|
kind: string;
|
|
4478
4495
|
desc: string;
|
|
4479
4496
|
};
|
|
4480
|
-
NamedObject: {
|
|
4481
|
-
name: string;
|
|
4482
|
-
kind: string;
|
|
4483
|
-
desc: string;
|
|
4484
|
-
props: {
|
|
4485
|
-
name: string;
|
|
4486
|
-
kind: string;
|
|
4487
|
-
desc: string;
|
|
4488
|
-
}[];
|
|
4489
|
-
};
|
|
4490
4497
|
NamedQuery: {
|
|
4491
4498
|
name: string;
|
|
4492
4499
|
kind: string;
|