@adaptabletools/adaptable 12.1.0-canary.0 → 12.1.0-canary.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/bundle.cjs.js +72 -71
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +11 -11
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +8 -3
- package/src/View/AdaptableView.js +2 -3
- package/src/View/Components/Popups/AdaptableToaster.js +7 -8
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "12.1.0-canary.
|
|
3
|
+
"version": "12.1.0-canary.1",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1658495234609;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -25,9 +25,9 @@ import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatus
|
|
|
25
25
|
import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
|
|
26
26
|
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
27
27
|
import { ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
28
|
-
import { ToastOptions } from 'react-toastify/dist/react-toastify.js';
|
|
29
28
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
30
29
|
import { AdaptableApi } from '../../types';
|
|
30
|
+
import type { ToastOptions } from 'react-toastify';
|
|
31
31
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
32
32
|
export declare function CreateEmptyCalculatedColumn(isFilterable: boolean): CalculatedColumn;
|
|
33
33
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
@@ -4,7 +4,7 @@ exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplay
|
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
7
|
-
const
|
|
7
|
+
const { toast, Bounce, Flip, Slide, Zoom } = require('react-toastify/dist/react-toastify.js');
|
|
8
8
|
function CreateEmptyCustomSort() {
|
|
9
9
|
return { Uuid: Uuid_1.createUuid(), ColumnId: GeneralConstants_1.EMPTY_STRING, SortedValues: [] };
|
|
10
10
|
}
|
|
@@ -393,29 +393,29 @@ exports.CreateToastOptions = CreateToastOptions;
|
|
|
393
393
|
function getToastPosition(position) {
|
|
394
394
|
switch (position) {
|
|
395
395
|
case 'BottomLeft':
|
|
396
|
-
return
|
|
396
|
+
return toast.POSITION.BOTTOM_LEFT;
|
|
397
397
|
case 'BottomCenter':
|
|
398
|
-
return
|
|
398
|
+
return toast.POSITION.BOTTOM_CENTER;
|
|
399
399
|
case 'BottomRight':
|
|
400
|
-
return
|
|
400
|
+
return toast.POSITION.BOTTOM_RIGHT;
|
|
401
401
|
case 'TopLeft':
|
|
402
|
-
return
|
|
402
|
+
return toast.POSITION.TOP_LEFT;
|
|
403
403
|
case 'TopCenter':
|
|
404
|
-
return
|
|
404
|
+
return toast.POSITION.TOP_CENTER;
|
|
405
405
|
case 'TopRight':
|
|
406
|
-
return
|
|
406
|
+
return toast.POSITION.TOP_RIGHT;
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
function getToastTransition(transition) {
|
|
410
410
|
switch (transition) {
|
|
411
411
|
case 'Bounce':
|
|
412
|
-
return
|
|
412
|
+
return Bounce;
|
|
413
413
|
case 'Slide':
|
|
414
|
-
return
|
|
414
|
+
return Slide;
|
|
415
415
|
case 'Zoom':
|
|
416
|
-
return
|
|
416
|
+
return Zoom;
|
|
417
417
|
case 'Flip':
|
|
418
|
-
return
|
|
418
|
+
return Flip;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
exports.ObjectFactory = {
|
|
@@ -122,12 +122,17 @@ class CalculatedColumnExpressionService {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
createAggregatedScalarCalculatedColumn(calculatedColumn) {
|
|
125
|
-
var _a;
|
|
125
|
+
var _a, _b;
|
|
126
126
|
// if there is already an aggregated scalar, delete it (possible when editing)
|
|
127
127
|
this.destroyAggregatedScalarCalculatedColumn(calculatedColumn);
|
|
128
128
|
if ((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.AggregatedScalarExpression) {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
try {
|
|
130
|
+
const aggregatedScalarCalculatedColumn = new AggregatedScalarCalculatedColumn(calculatedColumn, this.adaptableApi);
|
|
131
|
+
this.aggregatedScalarCalculatedColumnsMap.set(calculatedColumn.Uuid, aggregatedScalarCalculatedColumn);
|
|
132
|
+
}
|
|
133
|
+
catch (e) {
|
|
134
|
+
LoggingHelper_1.LogAdaptableError(`Creating CalculatedColumn ('${(_b = calculatedColumn.Query) === null || _b === void 0 ? void 0 : _b.AggregatedScalarExpression}') failed!\n${e.message}`);
|
|
135
|
+
}
|
|
131
136
|
}
|
|
132
137
|
}
|
|
133
138
|
destroyAggregatedScalarCalculatedColumn(calculatedColumn) {
|
|
@@ -13,10 +13,9 @@ const AdaptableLoadingScreen_1 = require("./Components/Popups/AdaptableLoadingSc
|
|
|
13
13
|
const renderWithAdaptableContext_1 = require("./renderWithAdaptableContext");
|
|
14
14
|
const License_1 = require("./License");
|
|
15
15
|
const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressIndicator");
|
|
16
|
-
//@ts-ignore - we need to avoid the esm from react-toastify for now
|
|
17
|
-
const react_toastify_js_1 = require("react-toastify/dist/react-toastify.js");
|
|
18
16
|
const WindowPopups_1 = require("./Components/Popups/WindowPopups/WindowPopups");
|
|
19
17
|
const FormPopups_1 = require("./Components/Popups/FormPopups/FormPopups");
|
|
18
|
+
const { ToastContainer } = require('react-toastify/dist/react-toastify.js');
|
|
20
19
|
class AdaptableView extends React.Component {
|
|
21
20
|
render() {
|
|
22
21
|
var _a, _b, _c, _d;
|
|
@@ -28,7 +27,7 @@ class AdaptableView extends React.Component {
|
|
|
28
27
|
this.props.PopupState.PromptPopup.ShowPromptPopup && (React.createElement(AdaptablePopupPrompt_1.AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup, onConfirmActionCreator: this.props.PopupState.PromptPopup.ConfirmActionCreator, defaultValue: this.props.PopupState.PromptPopup.DefaultValue })),
|
|
29
28
|
React.createElement(AdaptablePopupConfirmation_1.AdaptablePopupConfirmation, { header: this.props.PopupState.ConfirmationPopup.Header, messsage: this.props.PopupState.ConfirmationPopup.Msg, showPopup: this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup, cancelButtonText: this.props.PopupState.ConfirmationPopup.CancelButtonText, confirmButtonText: this.props.PopupState.ConfirmationPopup.ConfirmButtonText, onCancel: this.props.onCancelConfirmationPopup, onConfirm: this.props.onConfirmConfirmationPopup, showInputBox: this.props.PopupState.ConfirmationPopup.ShowInputBox, messageType: this.props.PopupState.ConfirmationPopup.MessageType, api: this.props.AdaptableApi }),
|
|
30
29
|
Boolean(this.props.PopupState.ScreenPopup.ShowScreenPopup) && (React.createElement(AdaptablePopup_1.AdaptablePopup, { componentName: this.props.PopupState.ScreenPopup.ComponentName, componentModule: this.props.PopupState.ScreenPopup.ComponentModule, onHide: this.props.onCloseScreenPopup, api: this.props.AdaptableApi, onClearParams: () => this.props.onClearPopupParams(), moduleParams: this.props.PopupState.ScreenPopup.Params, moduleProps: this.props.PopupState.ScreenPopup.PopupProps })),
|
|
31
|
-
React.createElement(
|
|
30
|
+
React.createElement(ToastContainer
|
|
32
31
|
// we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
|
|
33
32
|
// instance is destroyed and re-created many times
|
|
34
33
|
, {
|
|
@@ -5,14 +5,13 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
7
7
|
const AdaptablePopupAlert_1 = require("./AdaptablePopupAlert");
|
|
8
|
-
|
|
9
|
-
const react_toastify_js_1 = require("react-toastify/dist/react-toastify.js");
|
|
8
|
+
const { toast } = require('react-toastify/dist/react-toastify.js');
|
|
10
9
|
const showToast = (props) => {
|
|
11
10
|
// we're doing this hack and not simply using props.api in order not to have a memory
|
|
12
11
|
// leak where the api is still kept around in memory by the toaster
|
|
13
12
|
let api = props.api;
|
|
14
13
|
const off = api.eventApi.on('AdaptableDestroy', () => {
|
|
15
|
-
|
|
14
|
+
toast.dismiss(toastId);
|
|
16
15
|
api = null;
|
|
17
16
|
});
|
|
18
17
|
const adaptableOptions = props.api.internalApi.getAdaptableOptions();
|
|
@@ -28,21 +27,21 @@ const showToast = (props) => {
|
|
|
28
27
|
},
|
|
29
28
|
});
|
|
30
29
|
const content = (React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, { headless: true, adaptableAlert: props.adaptableAlert, onClose: () => {
|
|
31
|
-
|
|
30
|
+
toast.dismiss(toastId);
|
|
32
31
|
} }));
|
|
33
32
|
let toastId;
|
|
34
33
|
switch (props.adaptableAlert.alertDefinition.MessageType) {
|
|
35
34
|
case 'Info':
|
|
36
|
-
toastId =
|
|
35
|
+
toastId = toast.info(content, toastProps);
|
|
37
36
|
break;
|
|
38
37
|
case 'Error':
|
|
39
|
-
toastId =
|
|
38
|
+
toastId = toast.error(content, toastProps);
|
|
40
39
|
break;
|
|
41
40
|
case 'Success':
|
|
42
|
-
toastId =
|
|
41
|
+
toastId = toast.success(content, toastProps);
|
|
43
42
|
break;
|
|
44
43
|
case 'Warning':
|
|
45
|
-
toastId =
|
|
44
|
+
toastId = toast.warn(content, toastProps);
|
|
46
45
|
break;
|
|
47
46
|
}
|
|
48
47
|
};
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "12.1.0-canary.
|
|
1
|
+
declare const _default: "12.1.0-canary.1";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '12.1.0-canary.
|
|
3
|
+
exports.default = '12.1.0-canary.1'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|