@adaptabletools/adaptable 22.0.1-canary.2 → 22.0.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.
- package/package.json +1 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +23 -5
- package/src/View/Export/ExportViewPanel.js +1 -1
- package/src/View/QuickSearch/QuickSearchInput.js +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +8 -4
- package/src/View/StateManagement/StateManagementViewPanel.js +1 -1
- package/src/View/SystemStatus/SystemStatusViewPanel.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +9 -3
- package/src/env.js +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "22.0.1
|
|
3
|
+
"version": "22.0.1",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -50,7 +50,7 @@ export class ColumnFilterInternalApi extends ApiBase {
|
|
|
50
50
|
Predicates: [
|
|
51
51
|
{
|
|
52
52
|
PredicateId: this.getPredicateApi().internalApi.getEqualityPredicateForDataType(column.dataType),
|
|
53
|
-
Inputs: [...new Set([gridCell.
|
|
53
|
+
Inputs: [...new Set([gridCell.normalisedValue])],
|
|
54
54
|
},
|
|
55
55
|
],
|
|
56
56
|
};
|
|
@@ -187,7 +187,9 @@ export class AdaptableStore {
|
|
|
187
187
|
// but having the emitter emit the event here
|
|
188
188
|
// is really useful
|
|
189
189
|
const emitterArg = { action, state, newState };
|
|
190
|
-
|
|
190
|
+
if (!NON_PERSIST_ACTIONS[action.type]) {
|
|
191
|
+
this.emitter.emit(action.type, emitterArg);
|
|
192
|
+
}
|
|
191
193
|
const finalState = emitterArg.newState;
|
|
192
194
|
const shouldPersist = state !== finalState &&
|
|
193
195
|
didPersistentStateChange(state, finalState) &&
|
|
@@ -210,10 +212,26 @@ export class AdaptableStore {
|
|
|
210
212
|
return finalState;
|
|
211
213
|
};
|
|
212
214
|
const beforeEmitterMiddleware = (middlewareAPI) => (next) => (action) => {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
if (!NON_PERSIST_ACTIONS[action.type]) {
|
|
216
|
+
const wasProgressActive = middlewareAPI.getState().Popup?.ProgressIndicator?.active;
|
|
217
|
+
this.beforeEmitter.emitSync(action.type, {
|
|
218
|
+
action,
|
|
219
|
+
state: middlewareAPI.getState(),
|
|
220
|
+
});
|
|
221
|
+
const isProgressActive = middlewareAPI.getState().Popup?.ProgressIndicator?.active;
|
|
222
|
+
if (!wasProgressActive && isProgressActive) {
|
|
223
|
+
// double rAF: first frame lets React render + ProgressIndicator's
|
|
224
|
+
// useEffect schedule its own rAF for setVisible(); second frame
|
|
225
|
+
// runs after the browser has actually painted the indicator
|
|
226
|
+
// see #raf_progress_indicator
|
|
227
|
+
requestAnimationFrame(() => {
|
|
228
|
+
requestAnimationFrame(() => {
|
|
229
|
+
next(action);
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
return action;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
217
235
|
return next(action);
|
|
218
236
|
};
|
|
219
237
|
const devToolsActionMarkerMiddleware = createDevToolsActionMarkerMiddleware(adaptable);
|
|
@@ -29,7 +29,7 @@ export const ExportViewPanel = (props) => {
|
|
|
29
29
|
: 'Are you sure you want to delete this report?';
|
|
30
30
|
const isToolbar = props.viewType === 'Toolbar';
|
|
31
31
|
const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
|
|
32
|
-
return (React.createElement(Flex, { flexDirection: "row", className: clsx(`ab-${elementType}__CellSummary__wrap twa:gap-
|
|
32
|
+
return (React.createElement(Flex, { flexDirection: "row", className: clsx(`ab-${elementType}__CellSummary__wrap twa:gap-1 twa:flex-row`, {
|
|
33
33
|
'twa:min-w-[486px] twa:flex-nowrap': isToolbar,
|
|
34
34
|
'twa:flex-1 twa:flex-wrap': !isToolbar,
|
|
35
35
|
}) },
|
|
@@ -17,7 +17,7 @@ export const QuickSearchInput = (props) => {
|
|
|
17
17
|
QuickSearchText,
|
|
18
18
|
onRunQuickSearch,
|
|
19
19
|
});
|
|
20
|
-
return (React.createElement(AdaptableFormControlTextClear, { onClick: props.onClick, "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: twMerge('ab-QuickSearch__control twa:h-full', props.className), value: searchText, OnTextChange: search, inputClassName: twMerge('twa:w-[10rem]', props.inputClassName), actionTools: isServerSideRowModel ? null : (React.createElement(Flex, { flexDirection: "row", alignItems: "center", className: "twa:flex-none" },
|
|
20
|
+
return (React.createElement(AdaptableFormControlTextClear, { onClick: props.onClick, "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: twMerge('ab-QuickSearch__control twa:h-full twa:min-h-input', props.className), value: searchText, OnTextChange: search, inputClassName: twMerge('twa:w-[10rem]', props.inputClassName), actionTools: isServerSideRowModel ? null : (React.createElement(Flex, { flexDirection: "row", alignItems: "center", className: "twa:flex-none" },
|
|
21
21
|
React.createElement(SimpleButton, { "aria-label": 'Previous Match', icon: "arrow-up", className: "twa:px-0 twa:py-0 twa:mr-1", disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoPreviousMatch() }),
|
|
22
22
|
React.createElement(SimpleButton, { "aria-label": 'Next Match', icon: "arrow-down", className: "twa:px-0 twa:py-0 twa:mr-1", disabled: !searchText, variant: "text", onClick: () => adaptable.api.quickSearchApi.gotoNextMatch() }))) }));
|
|
23
23
|
};
|
|
@@ -12,6 +12,7 @@ import { UIHelper } from '../UIHelper';
|
|
|
12
12
|
import { connect } from 'react-redux';
|
|
13
13
|
import { Select } from '../../components/Select';
|
|
14
14
|
import { Flex } from '../../components/Flex';
|
|
15
|
+
import clsx from 'clsx';
|
|
15
16
|
class SmartEditViewPanelComponent extends React.Component {
|
|
16
17
|
cleanupEvent;
|
|
17
18
|
constructor(props) {
|
|
@@ -65,15 +66,18 @@ class SmartEditViewPanelComponent extends React.Component {
|
|
|
65
66
|
!this.props.IsValidSelection ||
|
|
66
67
|
this.props.api.layoutApi.isCurrentLayoutPivot() == true;
|
|
67
68
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
68
|
-
return (React.createElement(Flex, { flexDirection: "row", className: `ab-${elementType}__SmartEdit__wrap
|
|
69
|
-
|
|
69
|
+
return (React.createElement(Flex, { flexDirection: "row", className: clsx(`ab-${elementType}__SmartEdit__wrap twa:gap-1 twa:flex-row`, {
|
|
70
|
+
'twa:flex-nowrap': this.props.viewType === 'Toolbar',
|
|
71
|
+
'twa:flex-wrap': this.props.viewType !== 'Toolbar',
|
|
72
|
+
}), flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
73
|
+
React.createElement(Flex, { className: "twa:gap-1" },
|
|
70
74
|
React.createElement(Select, { "aria-label": 'Select Smart Edit Operation', value: typeof this.props.SmartEditOperation === 'object'
|
|
71
75
|
? this.props.SmartEditOperation.name
|
|
72
|
-
: this.props.SmartEditOperation, options: operationMenuItems, onChange: (operation) => this.props.onSmartEditOperationChange(operation)
|
|
76
|
+
: this.props.SmartEditOperation, options: operationMenuItems, onChange: (operation) => this.props.onSmartEditOperationChange(operation) }),
|
|
73
77
|
React.createElement(Input, { style: {
|
|
74
78
|
width: '5rem',
|
|
75
79
|
}, className: `ab-${elementType}__SmartEdit__select-value`, value: this.props.SmartEditValue.toString(), type: "number", placeholder: "Enter a Number", step: "any", onChange: (e) => this.onSmartEditValueChange(e), disabled: shouldDisable })),
|
|
76
|
-
React.createElement(Flex,
|
|
80
|
+
React.createElement(Flex, { className: "twa:gap-1" },
|
|
77
81
|
!shouldDisable && (React.createElement(ButtonApply, { onClick: () => this.onApplyClick(), style: applyButtonStyle, className: `ab-${elementType}__SmartEdit__apply`, tooltip: "Apply Smart Edit", disabled: StringExtensions.IsNullOrEmpty(`${this.props.SmartEditValue}`) ||
|
|
78
82
|
(this.props.PreviewInfo != null &&
|
|
79
83
|
this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Apply Smart Edit')),
|
|
@@ -8,7 +8,7 @@ import { Flex } from '../../components/Flex';
|
|
|
8
8
|
export const StateManagementViewPanel = (props) => {
|
|
9
9
|
const isToolbar = props.viewType === 'Toolbar';
|
|
10
10
|
const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
|
|
11
|
-
return (React.createElement(Flex, { flexDirection: isToolbar ? 'row' : 'column', className: join(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__StateManagement__wrap`) },
|
|
11
|
+
return (React.createElement(Flex, { flexDirection: isToolbar ? 'row' : 'column', className: join(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__StateManagement__wrap twa:min-h-input`) },
|
|
12
12
|
React.createElement(Flex, { flexDirection: "row" },
|
|
13
13
|
React.createElement(LoadButton, { tooltip: "Load Initial Adaptable State", variant: "text", icon: "upload", onLoad: (json) => props.api.stateApi.reloadInitialState(json), accessLevel: props.accessLevel }, !isToolbar && 'Load'),
|
|
14
14
|
React.createElement(ClearButton, { icon: "delete", tooltip: "Clear User State", variant: "text", onClick: () => props.api.stateApi.reloadInitialState(), accessLevel: props.accessLevel }, !isToolbar && 'Clear')),
|
|
@@ -12,7 +12,7 @@ class SystemStatusViewPanelComponent extends React.Component {
|
|
|
12
12
|
const message = currentSystemStatusMessageInfo?.statusMessage;
|
|
13
13
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
14
14
|
return (React.createElement(Flex, { alignItems: "stretch", className: `ab-${elementType}__SystemStatus__wrap` },
|
|
15
|
-
React.createElement(Flex, { style: { color, backgroundColor: message ? background : '' }, className: `ab-${elementType}__SystemStatus__text twa:mr-2 twa:p-2 twa:text-2 twa:rounded-standard`, alignItems: "center", "data-name": "system-status-message" }, message || '0 Messages')));
|
|
15
|
+
React.createElement(Flex, { style: { color, backgroundColor: message ? background : '' }, className: `ab-${elementType}__SystemStatus__text twa:mr-2 twa:p-2 twa:text-2 twa:rounded-standard twa:min-h-input`, alignItems: "center", "data-name": "system-status-message" }, message || '0 Messages')));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
function mapStateToProps(state) {
|
|
@@ -2209,10 +2209,16 @@ export class AdaptableAgGrid {
|
|
|
2209
2209
|
return typeof rawValue !== 'string' ? String(rawValue) : rawValue;
|
|
2210
2210
|
}
|
|
2211
2211
|
if (dataType === 'number') {
|
|
2212
|
+
if (typeof rawValue === 'number') {
|
|
2213
|
+
return rawValue;
|
|
2214
|
+
}
|
|
2212
2215
|
// empty string or space should not be converted to 0
|
|
2213
|
-
|
|
2214
|
-
? Number(rawValue)
|
|
2215
|
-
|
|
2216
|
+
if (typeof rawValue === 'string') {
|
|
2217
|
+
return StringExtensions.IsNumeric(rawValue) ? Number(rawValue) : rawValue;
|
|
2218
|
+
}
|
|
2219
|
+
// handle objects with toString() (e.g. from valueGetters)
|
|
2220
|
+
const numValue = Number(rawValue);
|
|
2221
|
+
return isNaN(numValue) ? rawValue : numValue;
|
|
2216
2222
|
}
|
|
2217
2223
|
if (dataType === 'boolean') {
|
|
2218
2224
|
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "22.0.1
|
|
3
|
+
PUBLISH_TIMESTAMP: 1772196168049 || Date.now(),
|
|
4
|
+
VERSION: "22.0.1" || '--current-version--',
|
|
5
5
|
};
|