@adaptabletools/adaptable-cjs 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-cjs",
3
- "version": "22.0.1-canary.2",
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",
@@ -54,7 +54,7 @@ class ColumnFilterInternalApi extends ApiBase_1.ApiBase {
54
54
  Predicates: [
55
55
  {
56
56
  PredicateId: this.getPredicateApi().internalApi.getEqualityPredicateForDataType(column.dataType),
57
- Inputs: [...new Set([gridCell.rawValue])],
57
+ Inputs: [...new Set([gridCell.normalisedValue])],
58
58
  },
59
59
  ],
60
60
  };
@@ -193,7 +193,9 @@ class AdaptableStore {
193
193
  // but having the emitter emit the event here
194
194
  // is really useful
195
195
  const emitterArg = { action, state, newState };
196
- this.emitter.emit(action.type, emitterArg);
196
+ if (!NON_PERSIST_ACTIONS[action.type]) {
197
+ this.emitter.emit(action.type, emitterArg);
198
+ }
197
199
  const finalState = emitterArg.newState;
198
200
  const shouldPersist = state !== finalState &&
199
201
  didPersistentStateChange(state, finalState) &&
@@ -216,10 +218,26 @@ class AdaptableStore {
216
218
  return finalState;
217
219
  };
218
220
  const beforeEmitterMiddleware = (middlewareAPI) => (next) => (action) => {
219
- this.beforeEmitter.emitSync(action.type, {
220
- action,
221
- state: middlewareAPI.getState(),
222
- });
221
+ if (!NON_PERSIST_ACTIONS[action.type]) {
222
+ const wasProgressActive = middlewareAPI.getState().Popup?.ProgressIndicator?.active;
223
+ this.beforeEmitter.emitSync(action.type, {
224
+ action,
225
+ state: middlewareAPI.getState(),
226
+ });
227
+ const isProgressActive = middlewareAPI.getState().Popup?.ProgressIndicator?.active;
228
+ if (!wasProgressActive && isProgressActive) {
229
+ // double rAF: first frame lets React render + ProgressIndicator's
230
+ // useEffect schedule its own rAF for setVisible(); second frame
231
+ // runs after the browser has actually painted the indicator
232
+ // see #raf_progress_indicator
233
+ requestAnimationFrame(() => {
234
+ requestAnimationFrame(() => {
235
+ next(action);
236
+ });
237
+ });
238
+ return action;
239
+ }
240
+ }
223
241
  return next(action);
224
242
  };
225
243
  const devToolsActionMarkerMiddleware = createDevToolsActionMarkerMiddleware(adaptable);
@@ -33,7 +33,7 @@ const ExportViewPanel = (props) => {
33
33
  : 'Are you sure you want to delete this report?';
34
34
  const isToolbar = props.viewType === 'Toolbar';
35
35
  const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
36
- return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, clsx_1.default)(`ab-${elementType}__CellSummary__wrap twa:gap-2 twa:flex-row`, {
36
+ return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, clsx_1.default)(`ab-${elementType}__CellSummary__wrap twa:gap-1 twa:flex-row`, {
37
37
  'twa:min-w-[486px] twa:flex-nowrap': isToolbar,
38
38
  'twa:flex-1 twa:flex-wrap': !isToolbar,
39
39
  }) },
@@ -21,7 +21,7 @@ const QuickSearchInput = (props) => {
21
21
  QuickSearchText,
22
22
  onRunQuickSearch,
23
23
  });
24
- return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { onClick: props.onClick, "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: (0, twMerge_1.twMerge)('ab-QuickSearch__control twa:h-full', props.className), value: searchText, OnTextChange: search, inputClassName: (0, twMerge_1.twMerge)('twa:w-[10rem]', props.inputClassName), actionTools: isServerSideRowModel ? null : (react_1.default.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:flex-none" },
24
+ return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { onClick: props.onClick, "aria-label": 'Quick Search', type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: (0, twMerge_1.twMerge)('ab-QuickSearch__control twa:h-full twa:min-h-input', props.className), value: searchText, OnTextChange: search, inputClassName: (0, twMerge_1.twMerge)('twa:w-[10rem]', props.inputClassName), actionTools: isServerSideRowModel ? null : (react_1.default.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:flex-none" },
25
25
  react_1.default.createElement(SimpleButton_1.default, { "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() }),
26
26
  react_1.default.createElement(SimpleButton_1.default, { "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() }))) }));
27
27
  };
@@ -16,6 +16,7 @@ const UIHelper_1 = require("../UIHelper");
16
16
  const react_redux_1 = require("react-redux");
17
17
  const Select_1 = require("../../components/Select");
18
18
  const Flex_1 = require("../../components/Flex");
19
+ const clsx_1 = tslib_1.__importDefault(require("clsx"));
19
20
  class SmartEditViewPanelComponent extends React.Component {
20
21
  cleanupEvent;
21
22
  constructor(props) {
@@ -69,15 +70,18 @@ class SmartEditViewPanelComponent extends React.Component {
69
70
  !this.props.IsValidSelection ||
70
71
  this.props.api.layoutApi.isCurrentLayoutPivot() == true;
71
72
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
72
- return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__SmartEdit__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
73
- React.createElement(Flex_1.Flex, null,
73
+ return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, clsx_1.default)(`ab-${elementType}__SmartEdit__wrap twa:gap-1 twa:flex-row`, {
74
+ 'twa:flex-nowrap': this.props.viewType === 'Toolbar',
75
+ 'twa:flex-wrap': this.props.viewType !== 'Toolbar',
76
+ }), flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
77
+ React.createElement(Flex_1.Flex, { className: "twa:gap-1" },
74
78
  React.createElement(Select_1.Select, { "aria-label": 'Select Smart Edit Operation', value: typeof this.props.SmartEditOperation === 'object'
75
79
  ? this.props.SmartEditOperation.name
76
- : this.props.SmartEditOperation, options: operationMenuItems, onChange: (operation) => this.props.onSmartEditOperationChange(operation), style: { marginRight: 1 } }),
80
+ : this.props.SmartEditOperation, options: operationMenuItems, onChange: (operation) => this.props.onSmartEditOperationChange(operation) }),
77
81
  React.createElement(Input_1.default, { style: {
78
82
  width: '5rem',
79
83
  }, 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 })),
80
- React.createElement(Flex_1.Flex, null,
84
+ React.createElement(Flex_1.Flex, { className: "twa:gap-1" },
81
85
  !shouldDisable && (React.createElement(ButtonApply_1.ButtonApply, { onClick: () => this.onApplyClick(), style: applyButtonStyle, className: `ab-${elementType}__SmartEdit__apply`, tooltip: "Apply Smart Edit", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(`${this.props.SmartEditValue}`) ||
82
86
  (this.props.PreviewInfo != null &&
83
87
  this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Apply Smart Edit')),
@@ -12,7 +12,7 @@ const Flex_1 = require("../../components/Flex");
12
12
  const StateManagementViewPanel = (props) => {
13
13
  const isToolbar = props.viewType === 'Toolbar';
14
14
  const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
15
- return (React.createElement(Flex_1.Flex, { flexDirection: isToolbar ? 'row' : 'column', className: (0, join_1.default)(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__StateManagement__wrap`) },
15
+ return (React.createElement(Flex_1.Flex, { flexDirection: isToolbar ? 'row' : 'column', className: (0, join_1.default)(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__StateManagement__wrap twa:min-h-input`) },
16
16
  React.createElement(Flex_1.Flex, { flexDirection: "row" },
17
17
  React.createElement(LoadButton_1.LoadButton, { tooltip: "Load Initial Adaptable State", variant: "text", icon: "upload", onLoad: (json) => props.api.stateApi.reloadInitialState(json), accessLevel: props.accessLevel }, !isToolbar && 'Load'),
18
18
  React.createElement(ClearButton_1.ClearButton, { icon: "delete", tooltip: "Clear User State", variant: "text", onClick: () => props.api.stateApi.reloadInitialState(), accessLevel: props.accessLevel }, !isToolbar && 'Clear')),
@@ -16,7 +16,7 @@ class SystemStatusViewPanelComponent extends React.Component {
16
16
  const message = currentSystemStatusMessageInfo?.statusMessage;
17
17
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
18
18
  return (React.createElement(Flex_1.Flex, { alignItems: "stretch", className: `ab-${elementType}__SystemStatus__wrap` },
19
- React.createElement(Flex_1.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')));
19
+ React.createElement(Flex_1.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')));
20
20
  }
21
21
  }
22
22
  function mapStateToProps(state) {
@@ -2213,10 +2213,16 @@ class AdaptableAgGrid {
2213
2213
  return typeof rawValue !== 'string' ? String(rawValue) : rawValue;
2214
2214
  }
2215
2215
  if (dataType === 'number') {
2216
+ if (typeof rawValue === 'number') {
2217
+ return rawValue;
2218
+ }
2216
2219
  // empty string or space should not be converted to 0
2217
- return typeof rawValue !== 'number' && StringExtensions_1.default.IsNumeric(rawValue)
2218
- ? Number(rawValue)
2219
- : rawValue;
2220
+ if (typeof rawValue === 'string') {
2221
+ return StringExtensions_1.default.IsNumeric(rawValue) ? Number(rawValue) : rawValue;
2222
+ }
2223
+ // handle objects with toString() (e.g. from valueGetters)
2224
+ const numValue = Number(rawValue);
2225
+ return isNaN(numValue) ? rawValue : numValue;
2220
2226
  }
2221
2227
  if (dataType === 'boolean') {
2222
2228
  return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
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: 1772181385361 || Date.now(),
6
- VERSION: "22.0.1-canary.2" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1772196204253 || Date.now(),
6
+ VERSION: "22.0.1" || '--current-version--',
7
7
  };