@adaptabletools/adaptable 16.2.0-canary.0 → 16.2.0-canary.2
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 +1 -1
- package/base.css.map +1 -1
- package/bundle.cjs.js +100 -100
- package/index.css +1 -1
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/DataImportOptions.d.ts +17 -5
- package/src/AdaptableOptions/GroupingOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
- package/src/Api/ColumnApi.d.ts +3 -3
- package/src/Api/EventApi.d.ts +13 -2
- package/src/Api/Events/DataImported.d.ts +19 -0
- package/src/Api/Events/DataImported.js +2 -0
- package/src/Api/Internal/DataImportInternalApi.d.ts +6 -0
- package/src/Api/Internal/DataImportInternalApi.js +28 -11
- package/src/Api/Internal/FilterInternalApi.d.ts +1 -1
- package/src/Api/Internal/FilterInternalApi.js +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +2 -2
- package/src/PredefinedConfig/DashboardState.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +1 -0
- package/src/Utilities/Services/ModuleService.js +2 -0
- package/src/View/DataImport/DataImportPopup.js +1 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +4 -2
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +1 -1
- package/src/agGrid/Adaptable.js +7 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.js +5 -0
- package/src/metamodel/adaptable.metamodel.d.ts +20 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -17,7 +17,7 @@ const DataImportPopup = (props) => {
|
|
|
17
17
|
}
|
|
18
18
|
}, []);
|
|
19
19
|
return (React.createElement(React.Fragment, null,
|
|
20
|
-
React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Data Import', glyphicon: 'import' },
|
|
20
|
+
React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Data Import', glyphicon: 'import', infoLink: props.moduleInfo.HelpPage },
|
|
21
21
|
React.createElement(rebass_1.Box, null,
|
|
22
22
|
React.createElement(HelpBlock_1.default, { mb: 2, fontSize: 3 }, "Click the 'Import Data' button to insert or update data into AdapTable"),
|
|
23
23
|
React.createElement(SimpleButton_1.default, { icon: "import", variant: "raised", onClick: () => setIsWizardOpen(true) }, "Import Data"))),
|
|
@@ -25,8 +25,9 @@ const DataImportWizard = (props) => {
|
|
|
25
25
|
// - new data is loaded
|
|
26
26
|
const [importType, setImportType] = React.useState('file');
|
|
27
27
|
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
28
|
+
const hasDynamicallyAddedPrimaryKey = typeof dataImportOptions.getPrimaryKeyValue === 'function';
|
|
28
29
|
const getPrimaryKeyValue = (rowData) => {
|
|
29
|
-
if (
|
|
30
|
+
if (hasDynamicallyAddedPrimaryKey) {
|
|
30
31
|
return dataImportOptions.getPrimaryKeyValue(Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(adaptable.api)), { rowData }));
|
|
31
32
|
}
|
|
32
33
|
return rowData[primaryKey];
|
|
@@ -215,7 +216,8 @@ const DataImportWizard = (props) => {
|
|
|
215
216
|
if (columnsErrors && Object.keys(columnsErrors).length > 0) {
|
|
216
217
|
return 'Some fields do not have a corresponding column.';
|
|
217
218
|
}
|
|
218
|
-
if (!
|
|
219
|
+
if (!hasDynamicallyAddedPrimaryKey &&
|
|
220
|
+
!(columnsMap === null || columnsMap === void 0 ? void 0 : columnsMap.some((map) => { var _a; return ((_a = map === null || map === void 0 ? void 0 : map.abColumn) === null || _a === void 0 ? void 0 : _a.field) === primaryKey; }))) {
|
|
219
221
|
return 'You need to select a column for the primary key.';
|
|
220
222
|
}
|
|
221
223
|
return true;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -1742,6 +1742,13 @@ class Adaptable {
|
|
|
1742
1742
|
this.api.gridApi.getFirstDisplayedRowNode()) {
|
|
1743
1743
|
layout.ExpandedRowGroupValues = this.getExpandRowGroupsKeys();
|
|
1744
1744
|
}
|
|
1745
|
+
const previousVisibleColumns = currentLayout.Columns;
|
|
1746
|
+
const newVisibleColumns = layout.Columns;
|
|
1747
|
+
// check if all new columns were previously visible
|
|
1748
|
+
const someColumnsAreNew = newVisibleColumns.some((colId) => !previousVisibleColumns.includes(colId));
|
|
1749
|
+
if (someColumnsAreNew) {
|
|
1750
|
+
this.setupColumns();
|
|
1751
|
+
}
|
|
1745
1752
|
this.persistLayout(layout);
|
|
1746
1753
|
}
|
|
1747
1754
|
// This method returns selected cells ONLY (if selection mode is cells or multiple cells).
|
|
@@ -2308,6 +2308,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2308
2308
|
desc: string;
|
|
2309
2309
|
}[];
|
|
2310
2310
|
};
|
|
2311
|
+
DataImportValidationError: {
|
|
2312
|
+
name: string;
|
|
2313
|
+
kind: string;
|
|
2314
|
+
desc: string;
|
|
2315
|
+
props: {
|
|
2316
|
+
name: string;
|
|
2317
|
+
kind: string;
|
|
2318
|
+
desc: string;
|
|
2319
|
+
}[];
|
|
2320
|
+
};
|
|
2311
2321
|
DataSet: {
|
|
2312
2322
|
name: string;
|
|
2313
2323
|
kind: string;
|
|
@@ -4078,6 +4088,16 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4078
4088
|
defVal?: undefined;
|
|
4079
4089
|
})[];
|
|
4080
4090
|
};
|
|
4091
|
+
PreprocessDataContext: {
|
|
4092
|
+
name: string;
|
|
4093
|
+
kind: string;
|
|
4094
|
+
desc: string;
|
|
4095
|
+
props: {
|
|
4096
|
+
name: string;
|
|
4097
|
+
kind: string;
|
|
4098
|
+
desc: string;
|
|
4099
|
+
}[];
|
|
4100
|
+
};
|
|
4081
4101
|
PreProcessExportContext: {
|
|
4082
4102
|
name: string;
|
|
4083
4103
|
kind: string;
|