@adaptabletools/adaptable 16.1.1-canary.1 → 16.2.0-canary.0
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/base.css +5 -0
- package/base.css.map +1 -1
- package/bundle.cjs.js +195 -197
- package/index.css +9 -0
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
- package/src/Api/Internal/AlertInternalApi.d.ts +3 -2
- package/src/Api/Internal/AlertInternalApi.js +35 -5
- package/src/Api/Internal/GridInternalApi.js +1 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +4 -4
- package/src/PredefinedConfig/Common/Fdc3Intent.js +4 -19
- package/src/PredefinedConfig/DashboardState.d.ts +4 -0
- package/src/Redux/ActionsReducers/DashboardRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/DashboardRedux.js +14 -1
- package/src/Strategy/AlertModule.js +14 -31
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -0
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +14 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +93 -1
- package/src/Utilities/Services/AlertService.js +13 -6
- package/src/Utilities/Services/DataService.d.ts +4 -1
- package/src/Utilities/Services/DataService.js +10 -5
- package/src/Utilities/Services/Interface/IAlertService.d.ts +12 -3
- package/src/Utilities/Services/Interface/IAlertService.js +9 -0
- package/src/Utilities/Services/Interface/IDataService.d.ts +3 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +0 -5
- package/src/View/Dashboard/{CustomToolbarWrapper.d.ts → CustomToolbar.d.ts} +1 -0
- package/src/View/Dashboard/{CustomToolbarWrapper.js → CustomToolbar.js} +36 -33
- package/src/View/Dashboard/Dashboard.d.ts +2 -2
- package/src/View/Dashboard/Dashboard.js +20 -24
- package/src/View/Dashboard/DashboardPopup.d.ts +2 -1
- package/src/View/Dashboard/DashboardPopup.js +7 -3
- package/src/View/Dashboard/DashboardToolbarFactory.d.ts +7 -0
- package/src/View/Dashboard/DashboardToolbarFactory.js +46 -0
- package/src/View/Dashboard/PinnedDashboard.d.ts +5 -0
- package/src/View/Dashboard/PinnedDashboard.js +21 -0
- package/src/View/Dashboard/PinnedToolbarsSelector.d.ts +5 -0
- package/src/View/Dashboard/PinnedToolbarsSelector.js +52 -0
- package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +6 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +71 -9
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.d.ts +8 -0
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +119 -0
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.d.ts +2 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +13 -17
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.d.ts +2 -1
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchInput.js +1 -1
- package/src/components/Dashboard/Dashboard.d.ts +1 -0
- package/src/components/Dashboard/Dashboard.js +2 -1
- package/src/components/DragAndDropContext/ModuleManager.js +1 -1
- package/src/components/DragAndDropContext/TabList.js +1 -1
- package/src/components/ExpressionEditor/editorButtonsObservable.js +5 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/index.js +4 -1
- package/src/parser/src/tokenizer.js +5 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -43,15 +43,9 @@ const DataPreview = (props) => {
|
|
|
43
43
|
" step and provide Data"));
|
|
44
44
|
}
|
|
45
45
|
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
46
|
-
const dataSample = props.data[0];
|
|
47
46
|
const columns = React.useMemo(() => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
const adaptableColumnsInData = adaptable.api.columnApi.getColumns().filter((c) => {
|
|
52
|
-
var _a;
|
|
53
|
-
return dataSample && ((_a = c.field) !== null && _a !== void 0 ? _a : c.columnId) in dataSample;
|
|
54
|
-
});
|
|
47
|
+
var _a;
|
|
48
|
+
const mappedAdaptableColumns = (_a = props.columnsMap) === null || _a === void 0 ? void 0 : _a.filter((map) => map.include && map.abColumn);
|
|
55
49
|
const mapDataType = (dataType) => {
|
|
56
50
|
switch (dataType) {
|
|
57
51
|
case 'Boolean':
|
|
@@ -69,23 +63,25 @@ const DataPreview = (props) => {
|
|
|
69
63
|
}
|
|
70
64
|
return rowData[primaryKey];
|
|
71
65
|
};
|
|
72
|
-
const infiniteColumns =
|
|
73
|
-
|
|
66
|
+
const infiniteColumns = mappedAdaptableColumns.reduce((acc, colMap) => {
|
|
67
|
+
var _a;
|
|
68
|
+
const isPrimaryKey = ((_a = colMap === null || colMap === void 0 ? void 0 : colMap.abColumn) === null || _a === void 0 ? void 0 : _a.columnId) === primaryKey;
|
|
74
69
|
let editable = !isPrimaryKey;
|
|
75
70
|
if (props.editable !== undefined && !isPrimaryKey) {
|
|
76
71
|
editable = props.editable;
|
|
77
72
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
const abColumn = colMap.abColumn;
|
|
74
|
+
acc[colMap.field] = {
|
|
75
|
+
field: colMap.field,
|
|
76
|
+
header: adaptable.api.columnApi.getFriendlyNameForColumnId(colMap.abColumn.columnId),
|
|
77
|
+
dataType: mapDataType(abColumn.dataType),
|
|
82
78
|
defaultEditable: editable,
|
|
83
79
|
valueGetter: (params) => {
|
|
84
|
-
if (
|
|
85
|
-
return params.data[
|
|
80
|
+
if (abColumn.dataType === 'Boolean') {
|
|
81
|
+
return params.data[colMap.field] ? 'True' : 'False';
|
|
86
82
|
}
|
|
87
83
|
else {
|
|
88
|
-
return params.data[
|
|
84
|
+
return params.data[colMap.field];
|
|
89
85
|
}
|
|
90
86
|
},
|
|
91
87
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ValidationErrorsMap } from '../DataImportWizard';
|
|
2
|
+
import { ColumnsMap, ValidationErrorsMap } from '../DataImportWizard';
|
|
3
3
|
interface ValidationSectionProps {
|
|
4
4
|
data?: Record<string, unknown>[];
|
|
5
5
|
onDataChange?: (data: Record<string, unknown>[]) => void;
|
|
6
6
|
errors: ValidationErrorsMap | null;
|
|
7
7
|
skipInvalidRows: boolean;
|
|
8
8
|
onSkipInvalidRowsChange: (skipInvalidRows: boolean) => void;
|
|
9
|
+
columnsMap: ColumnsMap[] | null;
|
|
9
10
|
}
|
|
10
11
|
export declare const ValidationSection: React.FunctionComponent<ValidationSectionProps>;
|
|
11
12
|
export {};
|
|
@@ -30,6 +30,6 @@ const ValidationSection = (props) => {
|
|
|
30
30
|
React.createElement(Tabs_1.Tabs, { flex: 1 },
|
|
31
31
|
React.createElement(Tabs_1.Tabs.Tab, null, "Preview"),
|
|
32
32
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
33
|
-
React.createElement(DataPreview_1.DataPreview, { data: props.data, errors: props.errors, editable: true, onDataChange: props.onDataChange })))));
|
|
33
|
+
React.createElement(DataPreview_1.DataPreview, { columnsMap: props.columnsMap, data: props.data, errors: props.errors, editable: true, onDataChange: props.onDataChange })))));
|
|
34
34
|
};
|
|
35
35
|
exports.ValidationSection = ValidationSection;
|
|
@@ -17,6 +17,6 @@ const QuickSearchInput = (props) => {
|
|
|
17
17
|
QuickSearchText,
|
|
18
18
|
onRunQuickSearch,
|
|
19
19
|
});
|
|
20
|
-
return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: props.className, value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: '
|
|
20
|
+
return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: props.className, value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: '10rem' } }));
|
|
21
21
|
};
|
|
22
22
|
exports.QuickSearchInput = QuickSearchInput;
|
|
@@ -78,6 +78,7 @@ function Dashboard(props) {
|
|
|
78
78
|
// @ts-ignore
|
|
79
79
|
ref: targetRef, className: (0, join_1.default)(`ab-Dashboard`, collapsed ? 'ab-Dashboard--collapsed' : '', floating ? 'ab-Dashboard--floating' : '', inline ? 'ab-Dashboard--inline' : ''), style: floating ? floatingStyle : undefined },
|
|
80
80
|
expanded && inline ? renderHomeToolbar() : renderBar(),
|
|
81
|
-
expanded && children && children.length ? (React.createElement("div", { className: "ab-Dashboard__content" }, children[activeTabIndex] ? children[activeTabIndex].props.children : null)) : null
|
|
81
|
+
expanded && children && children.length ? (React.createElement("div", { className: "ab-Dashboard__content" }, children[activeTabIndex] ? children[activeTabIndex].props.children : null)) : null,
|
|
82
|
+
props.footer));
|
|
82
83
|
}
|
|
83
84
|
exports.Dashboard = Dashboard;
|
|
@@ -21,7 +21,7 @@ const ModuleManager = (props) => {
|
|
|
21
21
|
const unusedItems = React.useMemo(() => availableItems
|
|
22
22
|
.map((t) => t.Id)
|
|
23
23
|
.filter((item) => {
|
|
24
|
-
return !tabs.some((tab) => tab.Items.includes(item));
|
|
24
|
+
return !tabs.some((tab) => { var _a; return (_a = tab.Items) === null || _a === void 0 ? void 0 : _a.includes(item); });
|
|
25
25
|
}), [tabs, availableItems]);
|
|
26
26
|
const handleToolbarDragEnd = (result) => {
|
|
27
27
|
const { source, destination, draggableId } = result;
|
|
@@ -33,7 +33,7 @@ function TabItem({ tab, tabIndex, onRemove, onRemoveToolbar, onChangeTabName, di
|
|
|
33
33
|
}
|
|
34
34
|
exports.TabItem = TabItem;
|
|
35
35
|
function ToolbarList({ toolbars, droppableId, onRemove, disabled, }) {
|
|
36
|
-
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableId, type: "TOOLBAR" }, (provided, snapshot) => (React.createElement(rebass_1.Box, Object.assign({ className: "ab-ModuleSelector__ToolbarList", ref: provided.innerRef }, (disabled ? {} : provided.droppableProps), { "data-name": "dashboard-toolbar-drop-target", backgroundColor: snapshot.isDraggingOver ? 'var(--ab-dashboard-tab-drop-target__background)' : '' }),
|
|
36
|
+
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableId, type: "TOOLBAR" }, (provided, snapshot) => (React.createElement(rebass_1.Box, Object.assign({ className: "ab-ModuleSelector__ToolbarList", ref: provided.innerRef }, (disabled ? {} : provided.droppableProps), { "data-name": "dashboard-toolbar-drop-target", backgroundColor: snapshot.isDraggingOver ? 'var(--ab-dashboard-tab-drop-target__background)' : '' }), toolbars === null || toolbars === void 0 ? void 0 :
|
|
37
37
|
toolbars.map((toolbar, toolbarIndex) => (React.createElement(ToolbarItem, { disabled: disabled, key: toolbar, toolbar: toolbar, toolbarIndex: toolbarIndex, onRemove: () => onRemove(toolbarIndex) }))),
|
|
38
38
|
provided.placeholder))));
|
|
39
39
|
}
|