@adaptabletools/adaptable 16.0.10-canary.0 → 16.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/agGrid.d.ts +4 -0
- package/agGrid.js +4 -0
- package/base.css +2 -0
- package/base.css.map +1 -1
- package/bundle.cjs.js +162 -161
- package/index.css +4 -0
- 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/AdaptableFrameworkComponent.d.ts +12 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/ChartingOptions.d.ts +44 -39
- package/src/AdaptableOptions/DataImportOptions.d.ts +67 -0
- package/src/AdaptableOptions/DataImportOptions.js +2 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +147 -8
- package/src/AdaptableOptions/MenuOptions.js +75 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/DataImportApi.d.ts +9 -0
- package/src/Api/DataImportApi.js +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/DataImportApiImpl.d.ts +10 -0
- package/src/Api/Implementation/DataImportApiImpl.js +14 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -1
- package/src/Api/Implementation/OptionsApiImpl.d.ts +1 -0
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +22 -0
- package/src/Api/Internal/ChartingInternalApi.js +15 -15
- package/src/Api/Internal/DataImportInternalApi.d.ts +4 -0
- package/src/Api/Internal/DataImportInternalApi.js +53 -0
- package/src/Api/OptionsApi.d.ts +5 -0
- package/src/Api/UserInterfaceApi.d.ts +14 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +1 -6
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +2 -0
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/DataImportModule.d.ts +11 -0
- package/src/Strategy/DataImportModule.js +36 -0
- package/src/Strategy/Fdc3Module.js +3 -2
- package/src/Strategy/LayoutModule.js +1 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
- package/src/Utilities/Constants/ModuleConstants.js +4 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +2 -2
- package/src/Utilities/Services/ModuleService.js +2 -0
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +1 -1
- package/src/View/Components/ExternalRenderer.d.ts +1 -0
- package/src/View/Components/ExternalRenderer.js +2 -1
- package/src/View/Components/Panels/PanelWithImage.js +3 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +4 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +14 -4
- package/src/View/DataImport/DataImportPopup.d.ts +6 -0
- package/src/View/DataImport/DataImportPopup.js +32 -0
- package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +8 -0
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +176 -0
- package/src/View/DataImport/DataImportWizard/index.d.ts +1 -0
- package/src/View/DataImport/DataImportWizard/index.js +4 -0
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.d.ts +10 -0
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +154 -0
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +9 -0
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +24 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.d.ts +8 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadFileSection.js +11 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +13 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +23 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.d.ts +8 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +13 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.d.ts +1 -0
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/index.js +4 -0
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.d.ts +11 -0
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +35 -0
- package/src/View/DataImport/systemFileHandlers.d.ts +3 -0
- package/src/View/DataImport/systemFileHandlers.js +44 -0
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.js +2 -2
- package/src/agGrid/agGridHelper.js +2 -0
- package/src/agGrid/agGridMenuHelper.d.ts +20 -9
- package/src/agGrid/agGridMenuHelper.js +288 -133
- package/src/components/FileDroppable/index.d.ts +2 -1
- package/src/components/FileDroppable/index.js +8 -7
- package/src/components/icons/import.d.ts +3 -0
- package/src/components/icons/import.js +7 -0
- package/src/components/icons/index.js +2 -0
- package/src/metamodel/adaptable.metamodel.d.ts +171 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/index.d.ts +2 -2
- package/src/parser/src/index.js +4 -4
- package/src/parser/src/tokenizer.d.ts +1 -1
- package/src/parser/src/tokenizer.js +14 -6
- package/src/parser/src/types.d.ts +2 -2
- package/src/types.d.ts +5 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as Redux from 'redux';
|
|
2
1
|
import { GridCell } from '../Selection/GridCell';
|
|
3
2
|
import { AdaptableColumn } from './AdaptableColumn';
|
|
4
3
|
import { AdaptableModule } from './Types';
|
|
@@ -17,11 +16,7 @@ export interface AdaptableMenuItem {
|
|
|
17
16
|
/**
|
|
18
17
|
* Adaptable Module associated with (Adaptable) menu item.
|
|
19
18
|
*/
|
|
20
|
-
module
|
|
21
|
-
/**
|
|
22
|
-
* Adaptable Redux Action to invoke when (Adaptable) menu item is clicked
|
|
23
|
-
*/
|
|
24
|
-
reduxAction?: Redux.Action;
|
|
19
|
+
module: AdaptableModule | 'General' | 'CustomSettingsPanel';
|
|
25
20
|
/**
|
|
26
21
|
* Function to invoke when (custom) menu item is clicked
|
|
27
22
|
*/
|
|
@@ -11,7 +11,7 @@ export declare const ALL_TOOLBARS: AdaptableDashboardToolbar[];
|
|
|
11
11
|
/**
|
|
12
12
|
* Modules which can appear in the AdapTable Status Bar
|
|
13
13
|
*/
|
|
14
|
-
export declare type AdaptableStatusBarPanel = 'Alert' | 'CalculatedColumn' | 'BulkUpdate' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'SmartEdit' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
|
|
14
|
+
export declare type AdaptableStatusBarPanel = 'Alert' | 'CalculatedColumn' | 'BulkUpdate' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'SmartEdit' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
|
|
15
15
|
export declare const ALL_STATUS_SUB_PANELS: AdaptableStatusBarPanel[];
|
|
16
16
|
export declare type AdaptableToolPanels = AdaptableToolPanel[];
|
|
17
17
|
/**
|
|
@@ -28,18 +28,18 @@ export declare type AdaptableModuleButtons = AdaptableModuleButton[];
|
|
|
28
28
|
/**
|
|
29
29
|
* List of all the Module buttons Adaptable provides - each Module has a popup for which this is a shortcut button
|
|
30
30
|
*/
|
|
31
|
-
export declare type AdaptableModuleButton = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme';
|
|
31
|
+
export declare type AdaptableModuleButton = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataImport' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme';
|
|
32
32
|
export declare type AdaptableStateKeys = AdaptableStateKey[];
|
|
33
33
|
export declare type AdaptableStateKey = keyof AdaptablePersistentState | 'OpenFin' | 'Glue42' | 'IPushPull';
|
|
34
34
|
/**
|
|
35
35
|
* Modules provided by AdapTable, subject to Entitlements and usually have Predefined Config
|
|
36
36
|
*/
|
|
37
|
-
export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'ColumnInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes';
|
|
37
|
+
export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Fdc3' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'ColumnInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StyledColumn' | 'StateManagement' | 'StatusBar' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes' | 'DataImport';
|
|
38
38
|
export declare const ALL_MODULES: AdaptableModule[];
|
|
39
39
|
/**
|
|
40
40
|
* Modules which can appear in the Settings Panel
|
|
41
41
|
*/
|
|
42
|
-
export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes';
|
|
42
|
+
export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'Charting' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSet' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'ColumnInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'StatusBar' | 'StyledColumn' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'Notes' | 'DataImport';
|
|
43
43
|
export declare type TypeHint<Base, Literals> = (Base & {
|
|
44
44
|
__subType?: true;
|
|
45
45
|
}) | Literals;
|
|
@@ -35,6 +35,7 @@ exports.ALL_STATUS_SUB_PANELS = [
|
|
|
35
35
|
'Charting',
|
|
36
36
|
'Dashboard',
|
|
37
37
|
'DataChangeHistory',
|
|
38
|
+
'DataImport',
|
|
38
39
|
'DataSet',
|
|
39
40
|
'Export',
|
|
40
41
|
'Filter',
|
|
@@ -87,6 +88,7 @@ exports.ALL_MODULES = [
|
|
|
87
88
|
ModuleConstants.DashboardModuleId,
|
|
88
89
|
ModuleConstants.DataChangeHistoryModuleId,
|
|
89
90
|
ModuleConstants.DataSetModuleId,
|
|
91
|
+
ModuleConstants.DataImportModuleId,
|
|
90
92
|
ModuleConstants.ExportModuleId,
|
|
91
93
|
ModuleConstants.FilterModuleId,
|
|
92
94
|
ModuleConstants.FlashingCellModuleId,
|
|
@@ -36,7 +36,7 @@ class ChartingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
36
36
|
}
|
|
37
37
|
isModuleAvailable() {
|
|
38
38
|
const agChartsAvailable = this.api.chartingApi.isChartingEnabled() && super.isModuleAvailable();
|
|
39
|
-
const externalChartsAvailable = this.api.optionsApi.getChartingOptions().
|
|
39
|
+
const externalChartsAvailable = this.api.optionsApi.getChartingOptions().externalChartingOptions;
|
|
40
40
|
return Boolean(agChartsAvailable || externalChartsAvailable);
|
|
41
41
|
}
|
|
42
42
|
getModuleAdaptableObjects() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
2
|
+
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
3
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
4
|
+
import { IModule } from './Interface/IModule';
|
|
5
|
+
export declare class DataImportModule extends AdaptableModuleBase implements IModule {
|
|
6
|
+
constructor(api: AdaptableApi);
|
|
7
|
+
addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
8
|
+
addContextMenuItems(): AdaptableMenuItem[] | undefined;
|
|
9
|
+
addColumnMenuItems(): AdaptableMenuItem[] | undefined;
|
|
10
|
+
private getOpenPopupMenuItem;
|
|
11
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataImportModule = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
6
|
+
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
7
|
+
class DataImportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
|
+
constructor(api) {
|
|
9
|
+
super(ModuleConstants.DataImportModuleId, ModuleConstants.DataImportFriendyName, 'import', 'DataImportPopup', 'Import Data', api);
|
|
10
|
+
}
|
|
11
|
+
addModuleMenuItem(source) {
|
|
12
|
+
if (this.isModuleAvailable()) {
|
|
13
|
+
return this.getOpenPopupMenuItem(source);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
addContextMenuItems() {
|
|
17
|
+
if (this.isModuleAvailable()) {
|
|
18
|
+
return [this.getOpenPopupMenuItem('ContextMenu')];
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
addColumnMenuItems() {
|
|
23
|
+
if (this.isModuleAvailable()) {
|
|
24
|
+
return [this.getOpenPopupMenuItem('ColumnMenu')];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
getOpenPopupMenuItem(source) {
|
|
28
|
+
const moduleParams = {
|
|
29
|
+
action: 'New',
|
|
30
|
+
source: source,
|
|
31
|
+
maxWidth: this.getPopupMaxWidth(),
|
|
32
|
+
};
|
|
33
|
+
return this.createColumnMenuItemShowPopup('Import Data', this.moduleInfo.Popup, this.moduleInfo.Glyph, moduleParams);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.DataImportModule = DataImportModule;
|
|
@@ -30,6 +30,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
30
30
|
});
|
|
31
31
|
if (contextMenuItems.length > 1) {
|
|
32
32
|
const groupMenuItem = {
|
|
33
|
+
module: this.moduleInfo.ModuleName,
|
|
33
34
|
label: 'FDC3',
|
|
34
35
|
icon: {
|
|
35
36
|
name: 'fdc3',
|
|
@@ -51,7 +52,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
51
52
|
this.getFdc3Api().raiseIntentFromRow(rowNode, intentType, contextType);
|
|
52
53
|
},
|
|
53
54
|
isVisible: true,
|
|
54
|
-
module:
|
|
55
|
+
module: this.moduleInfo.ModuleName,
|
|
55
56
|
};
|
|
56
57
|
if ((_a = intentConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.icon) {
|
|
57
58
|
const menuItemIcon = ((_b = intentConfig.contextMenu) === null || _b === void 0 ? void 0 : _b.icon) === '_defaultFdc3'
|
|
@@ -70,7 +71,7 @@ class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
70
71
|
this.getFdc3Api().broadcastFromRow(rowNode, contextType);
|
|
71
72
|
},
|
|
72
73
|
isVisible: true,
|
|
73
|
-
module:
|
|
74
|
+
module: this.moduleInfo.ModuleName,
|
|
74
75
|
};
|
|
75
76
|
if ((_a = contextConfig.contextMenu) === null || _a === void 0 ? void 0 : _a.icon) {
|
|
76
77
|
const menuItemIcon = ((_b = contextConfig.contextMenu) === null || _b === void 0 ? void 0 : _b.icon) === '_defaultFdc3'
|
|
@@ -71,6 +71,8 @@ export declare const SettingsPanelModuleId: ModuleConstants;
|
|
|
71
71
|
export declare const SettingsPanelFriendlyName = "Settings Panel";
|
|
72
72
|
export declare const StatusBarModuleId: ModuleConstants;
|
|
73
73
|
export declare const StatusBarFriendlyName = "Status Bar";
|
|
74
|
+
export declare const DataImportModuleId: ModuleConstants;
|
|
75
|
+
export declare const DataImportFriendyName = "Data Import";
|
|
74
76
|
export declare const ADAPTABLE_MODULE_MAP: {
|
|
75
77
|
Alert: string;
|
|
76
78
|
FlashingCell: string;
|
|
@@ -108,4 +110,5 @@ export declare const ADAPTABLE_MODULE_MAP: {
|
|
|
108
110
|
StatusBar: string;
|
|
109
111
|
Notes: string;
|
|
110
112
|
ColumnInfo: string;
|
|
113
|
+
DataImport: string;
|
|
111
114
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QuickSearchFriendlyName = exports.QuickSearchModuleId = exports.QueryFriendlyName = exports.QueryModuleId = exports.PlusMinusFriendlyName = exports.PlusMinusModuleId = exports.OpenFinFriendlyName = exports.OpenFinModuleId = exports.LayoutFriendlyName = exports.LayoutModuleId = exports.IPushPullFriendlyName = exports.IPushPullModuleId = exports.NotesFriendlyName = exports.NotesModuleId = exports.ColumnInfoFriendlyName = exports.ColumnInfoModuleId = exports.GridInfoFriendlyName = exports.GridInfoModuleId = exports.Glue42FriendlyName = exports.Glue42ModuleId = exports.FreeTextColumnFriendlyName = exports.FreeTextColumnModuleId = exports.FormatColumnFriendlyName = exports.FormatColumnModuleId = exports.FilterFriendlyName = exports.FilterModuleId = exports.Fdc3FriendlyName = exports.Fdc3ModuleId = exports.ExportFriendlyName = exports.ExportModuleId = exports.DataSetFriendlyName = exports.DataSetModuleId = exports.DataChangeHistoryFriendlyName = exports.DataChangeHistoryModuleId = exports.DashboardFriendlyName = exports.DashboardModuleId = exports.CustomSortFriendlyName = exports.CustomSortModuleId = exports.ChartingFriendlyName = exports.ChartingModuleId = exports.CellSummaryFriendlyName = exports.CellSummaryModuleId = exports.CalculatedColumnFriendlyName = exports.CalculatedColumnModuleId = exports.BulkUpdateFriendlyName = exports.BulkUpdateModuleId = exports.FlashingCellFriendlyName = exports.FlashingCellModuleId = exports.AlertModuleFriendlyName = exports.AlertModuleId = void 0;
|
|
4
|
-
exports.ADAPTABLE_MODULE_MAP = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.StyledColumnFriendlyName = exports.StyledColumnModuleId = exports.SmartEditFriendlyName = exports.SmartEditModuleId = exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = void 0;
|
|
4
|
+
exports.ADAPTABLE_MODULE_MAP = exports.DataImportFriendyName = exports.DataImportModuleId = exports.StatusBarFriendlyName = exports.StatusBarModuleId = exports.SettingsPanelFriendlyName = exports.SettingsPanelModuleId = exports.ToolPanelFriendlyName = exports.ToolPanelModuleId = exports.ThemeFriendlyName = exports.ThemeModuleId = exports.TeamSharingFriendlyName = exports.TeamSharingModuleId = exports.SystemStatusFriendlyName = exports.SystemStatusModuleId = exports.StateManagementFriendlyName = exports.StateManagementModuleId = exports.StyledColumnFriendlyName = exports.StyledColumnModuleId = exports.SmartEditFriendlyName = exports.SmartEditModuleId = exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = void 0;
|
|
5
5
|
exports.AlertModuleId = 'Alert';
|
|
6
6
|
exports.AlertModuleFriendlyName = 'Alert';
|
|
7
7
|
exports.FlashingCellModuleId = 'FlashingCell';
|
|
@@ -74,6 +74,8 @@ exports.SettingsPanelModuleId = 'SettingsPanel';
|
|
|
74
74
|
exports.SettingsPanelFriendlyName = 'Settings Panel';
|
|
75
75
|
exports.StatusBarModuleId = 'StatusBar';
|
|
76
76
|
exports.StatusBarFriendlyName = 'Status Bar';
|
|
77
|
+
exports.DataImportModuleId = 'DataImport';
|
|
78
|
+
exports.DataImportFriendyName = 'Data Import';
|
|
77
79
|
exports.ADAPTABLE_MODULE_MAP = {
|
|
78
80
|
[exports.AlertModuleId]: exports.AlertModuleFriendlyName,
|
|
79
81
|
[exports.FlashingCellModuleId]: exports.FlashingCellFriendlyName,
|
|
@@ -111,4 +113,5 @@ exports.ADAPTABLE_MODULE_MAP = {
|
|
|
111
113
|
[exports.StatusBarModuleId]: exports.StatusBarFriendlyName,
|
|
112
114
|
[exports.NotesModuleId]: exports.NotesFriendlyName,
|
|
113
115
|
[exports.ColumnInfoModuleId]: exports.ColumnInfoFriendlyName,
|
|
116
|
+
[exports.DataImportModuleId]: exports.DataImportFriendyName,
|
|
114
117
|
};
|
|
@@ -40,6 +40,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
40
40
|
showSystemStatusMessageNotifications: false,
|
|
41
41
|
maxSystemMessagesInStore: 100,
|
|
42
42
|
},
|
|
43
|
+
dataImportOptions: {},
|
|
43
44
|
flashingCellOptions: {
|
|
44
45
|
defaultFlashDuration: 500,
|
|
45
46
|
defaultFlashTarget: 'cell',
|
|
@@ -296,6 +297,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
296
297
|
chartingOptions: {
|
|
297
298
|
saveStrategy: 'none',
|
|
298
299
|
agGridContainerName: GeneralConstants.AG_GRID_CHART_WINDOW,
|
|
300
|
+
externalChartingOptions: {},
|
|
299
301
|
},
|
|
300
302
|
fdc3Options: {
|
|
301
303
|
enableLogging: false,
|
|
@@ -11,6 +11,7 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
11
11
|
const returnedAdaptableOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions, adaptableOptions);
|
|
12
12
|
returnedAdaptableOptions.adaptableStateKey =
|
|
13
13
|
(_a = returnedAdaptableOptions.adaptableStateKey) !== null && _a !== void 0 ? _a : returnedAdaptableOptions.adaptableId;
|
|
14
|
+
returnedAdaptableOptions.dataImportOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dataImportOptions, adaptableOptions.dataImportOptions);
|
|
14
15
|
returnedAdaptableOptions.expressionOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.expressionOptions, adaptableOptions.expressionOptions);
|
|
15
16
|
returnedAdaptableOptions.calendarOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.calendarOptions, adaptableOptions.calendarOptions);
|
|
16
17
|
returnedAdaptableOptions.columnOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.columnOptions, adaptableOptions.columnOptions);
|
|
@@ -43,6 +44,7 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
43
44
|
returnedAdaptableOptions.toolPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.toolPanelOptions, adaptableOptions.toolPanelOptions);
|
|
44
45
|
returnedAdaptableOptions.dataChangeHistoryOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dataChangeHistoryOptions, adaptableOptions.dataChangeHistoryOptions);
|
|
45
46
|
returnedAdaptableOptions.chartingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.chartingOptions, adaptableOptions.chartingOptions);
|
|
47
|
+
returnedAdaptableOptions.chartingOptions.externalChartingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.chartingOptions.externalChartingOptions, returnedAdaptableOptions.chartingOptions.externalChartingOptions);
|
|
46
48
|
returnedAdaptableOptions.settingsPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.settingsPanelOptions, adaptableOptions.settingsPanelOptions);
|
|
47
49
|
returnedAdaptableOptions.fdc3Options = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options, adaptableOptions.fdc3Options);
|
|
48
50
|
returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration, returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Action } from 'redux';
|
|
2
|
-
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
3
|
-
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
4
2
|
import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
|
|
3
|
+
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
5
4
|
import { AdaptableForm, BaseContext } from '../../types';
|
|
5
|
+
import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupProps';
|
|
6
6
|
export interface UIConfirmation {
|
|
7
7
|
Header: string;
|
|
8
8
|
Msg: string;
|
|
@@ -143,6 +143,8 @@ class ModuleService {
|
|
|
143
143
|
return learnUrl + 'handbook-column-formatting#styled-columns';
|
|
144
144
|
case 'Charting':
|
|
145
145
|
return learnUrl + 'handbook-charts';
|
|
146
|
+
case 'DataImport':
|
|
147
|
+
return learnUrl + 'handbook-data-import';
|
|
146
148
|
default:
|
|
147
149
|
return 'good';
|
|
148
150
|
}
|
|
@@ -33,6 +33,7 @@ const StatusBarPopup_1 = require("./StatusBar/StatusBarPopup");
|
|
|
33
33
|
const ChartingViewPanel_1 = require("./Charting/ChartingViewPanel");
|
|
34
34
|
const ColumnInfoPopup_1 = require("./ColumnInfo/ColumnInfoPopup");
|
|
35
35
|
const NotesListing_1 = require("./Notes/NotesListing");
|
|
36
|
+
const DataImportPopup_1 = require("./DataImport/DataImportPopup");
|
|
36
37
|
exports.AdaptableViewFactory = {
|
|
37
38
|
BulkUpdatePopup: BulkUpdatePopup_1.BulkUpdatePopup,
|
|
38
39
|
DashboardPopup: DashboardPopup_1.DashboardPopup,
|
|
@@ -48,6 +49,7 @@ exports.AdaptableViewFactory = {
|
|
|
48
49
|
SystemStatusPopup: SystemStatusPopup_1.SystemStatusPopup,
|
|
49
50
|
DataChangeHistoryPopup: DataChangeHistoryPopup_1.DataChangeHistoryPopup,
|
|
50
51
|
NotesPopup: NotesListing_1.NotesListing,
|
|
52
|
+
DataImportPopup: DataImportPopup_1.DataImportPopup,
|
|
51
53
|
};
|
|
52
54
|
exports.AdaptableViewPanelFactory = new Map([
|
|
53
55
|
[ModuleConstants.AlertModuleId, AlertViewPanel_1.AlertViewPanelControl],
|
|
@@ -28,7 +28,7 @@ const PreviewChartSection = ({ chartDefinition }) => {
|
|
|
28
28
|
const ExternalChartingWizard = (props) => {
|
|
29
29
|
var _a;
|
|
30
30
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
31
|
-
const onPreviewChart = (_a = adaptable.api.optionsApi.getChartingOptions().
|
|
31
|
+
const onPreviewChart = (_a = adaptable.api.optionsApi.getChartingOptions().externalChartingOptions) === null || _a === void 0 ? void 0 : _a.onPreviewChart;
|
|
32
32
|
const [chartDefinition, setChartDefinition] = React.useState(() => {
|
|
33
33
|
var _a, _b;
|
|
34
34
|
return (_a = props.data) !== null && _a !== void 0 ? _a : (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.value;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
7
7
|
const ExternalRenderer = (_a) => {
|
|
8
|
-
var { render, frameworkComponent, componentName = 'N/A' } = _a, rest = tslib_1.__rest(_a, ["render", "frameworkComponent", "componentName"]);
|
|
8
|
+
var { render, frameworkComponent, componentName = 'N/A', onDestroy } = _a, rest = tslib_1.__rest(_a, ["render", "frameworkComponent", "componentName", "onDestroy"]);
|
|
9
9
|
const ref = React.useRef();
|
|
10
10
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
11
11
|
const [contentsHTML, setContentsHTML] = React.useState('');
|
|
@@ -36,6 +36,7 @@ const ExternalRenderer = (_a) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
else if (frameworkComponent) {
|
|
39
|
+
onDestroy === null || onDestroy === void 0 ? void 0 : onDestroy();
|
|
39
40
|
adaptableApi.internalApi.destroyFrameworkComponent(element, frameworkComponent,
|
|
40
41
|
// @ts-ignore
|
|
41
42
|
componentName);
|
|
@@ -13,6 +13,7 @@ const ButtonInfo_1 = require("../Buttons/ButtonInfo");
|
|
|
13
13
|
//let { buttonContent, ...other } = this.props
|
|
14
14
|
class PanelWithImageCmp extends React.Component {
|
|
15
15
|
render() {
|
|
16
|
+
var _a;
|
|
16
17
|
const IconCmp = icons_1.allIcons[(this.props.icon || this.props.glyphicon)];
|
|
17
18
|
const headerStyle = {};
|
|
18
19
|
if (this.props.headerColor) {
|
|
@@ -21,10 +22,9 @@ class PanelWithImageCmp extends React.Component {
|
|
|
21
22
|
}
|
|
22
23
|
let headerRow = (React.createElement(rebass_1.Flex, { flex: 1 },
|
|
23
24
|
React.createElement(rebass_1.Flex, { alignItems: "center" },
|
|
24
|
-
React.createElement(rebass_1.Flex, { alignItems: "center", style: headerStyle },
|
|
25
|
+
React.createElement(rebass_1.Flex, { minHeight: 15, alignItems: "center", style: headerStyle },
|
|
25
26
|
IconCmp ? React.createElement(IconCmp, null) : null,
|
|
26
|
-
React.createElement(rebass_1.Box, { marginRight: 2 }),
|
|
27
|
-
this.props.header,
|
|
27
|
+
React.createElement(rebass_1.Box, { marginRight: 2 }), (_a = this.props.header) !== null && _a !== void 0 ? _a : '',
|
|
28
28
|
React.createElement(rebass_1.Box, { marginRight: 2, "data-name": "space-after" }),
|
|
29
29
|
this.props.infoLink != null && !this.props.infoLinkDisabled && (React.createElement(ButtonInfo_1.ButtonInfo, { onClick: () => window.open(this.props.infoLink, '_blank' // <- opens the link in a new tab or window.
|
|
30
30
|
) }))),
|
|
@@ -39,7 +39,7 @@ const AdaptablePopup = (props) => {
|
|
|
39
39
|
let componentName = props.componentName;
|
|
40
40
|
// ts forces to check for General, there is no menu item General
|
|
41
41
|
const useFirstItem = !props.componentName;
|
|
42
|
-
if (useFirstItem && firstMenuModule !== 'General') {
|
|
42
|
+
if (useFirstItem && firstMenuModule !== 'General' && firstMenuModule !== 'CustomSettingsPanel') {
|
|
43
43
|
componentModule = firstMenuModule;
|
|
44
44
|
}
|
|
45
45
|
const customSettingsPanel = (_c = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _c === void 0 ? void 0 : _c.find((customPanel) => useFirstItem ? customPanel.name === firstMenuItem.label : customPanel.name === componentName);
|
|
@@ -43,10 +43,13 @@ const Navigation = (props) => {
|
|
|
43
43
|
const isActive = props.activeItem === menuItem.module || menuItem.label === props.activeItem;
|
|
44
44
|
const className = (0, join_1.default)(baseClassName, isActive && `${baseClassName}--active`);
|
|
45
45
|
let customIcon = (_d = (_c = (_b = (_a = props.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (customSettingPanel) => customSettingPanel.name === menuItem.label)) === null || _c === void 0 ? void 0 : _c.icon) !== null && _d !== void 0 ? _d : null;
|
|
46
|
+
const dataName = menuItem.module === 'CustomSettingsPanel'
|
|
47
|
+
? `CSP-${menuItem.label}`
|
|
48
|
+
: (_e = menuItem.module) !== null && _e !== void 0 ? _e : menuItem.label;
|
|
46
49
|
return (React.createElement("li", { className: className, key: menuItem.label },
|
|
47
50
|
React.createElement("button", { type: "button", className: `${baseClassName}__Button`, onClick: () => {
|
|
48
51
|
dispatch(menuItem.reduxAction);
|
|
49
|
-
}, "data-name":
|
|
52
|
+
}, "data-name": dataName },
|
|
50
53
|
menuItem.icon && (React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: menuItem.icon, iconClassName: `${baseClassName}__Icon` })),
|
|
51
54
|
customIcon && React.createElement(AdaptableIconComponent_1.AdaptableIconComponent, { icon: customIcon }),
|
|
52
55
|
menuItem.label)));
|
|
@@ -21,6 +21,7 @@ const useMenuItems = () => {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
const visibleItems = allMenuItems.filter((item) => item.module !== 'General' &&
|
|
24
|
+
item.module !== 'CustomSettingsPanel' &&
|
|
24
25
|
!DefaultSettingsPanel_1.STANDALONE_MODULE_POPUPS.includes(item.module) &&
|
|
25
26
|
item.isVisible);
|
|
26
27
|
return navigationItems
|
|
@@ -32,7 +33,9 @@ const useMenuItems = () => {
|
|
|
32
33
|
const customSettingsPanel = (_b = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (panel) => panel.name === moduleName);
|
|
33
34
|
let customPanelMenuItem = null;
|
|
34
35
|
if (customSettingsPanel) {
|
|
36
|
+
// @ts-ignore
|
|
35
37
|
customPanelMenuItem = {
|
|
38
|
+
module: 'CustomSettingsPanel',
|
|
36
39
|
label: customSettingsPanel.name,
|
|
37
40
|
isVisible: true,
|
|
38
41
|
reduxAction: PopupRedux.PopupShowScreen(null, customSettingsPanel.name),
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WindowPopups = void 0;
|
|
3
|
+
exports.WindowPopups = exports.CUSTOM_WINDOW_FACTORY_ID = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
|
|
8
8
|
const PopupRedux_1 = require("../../../../Redux/ActionsReducers/PopupRedux");
|
|
9
9
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
10
|
+
const ExternalRenderer_1 = require("../../ExternalRenderer");
|
|
10
11
|
const PanelWithImage_1 = require("../../Panels/PanelWithImage");
|
|
11
12
|
const Utilities_1 = require("../Utilities");
|
|
12
13
|
const windowFactory_1 = require("./windowFactory");
|
|
13
14
|
const NoopComponent = () => {
|
|
14
15
|
return React.createElement(React.Fragment, null);
|
|
15
16
|
};
|
|
17
|
+
exports.CUSTOM_WINDOW_FACTORY_ID = 'CUSTOM_WINDOW_FACTORY_ID';
|
|
16
18
|
const WindowPopups = () => {
|
|
17
19
|
const [windowModalSettings, setWindowModalSettings] = React.useState({});
|
|
18
20
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -20,18 +22,26 @@ const WindowPopups = () => {
|
|
|
20
22
|
const windowItems = (0, react_redux_1.useSelector)((state) => state.Popup.WindowPopup.PopupList);
|
|
21
23
|
return (React.createElement(React.Fragment, null, windowItems === null || windowItems === void 0 ? void 0 : windowItems.map((windowItem) => {
|
|
22
24
|
var _a, _b, _c, _d, _e, _f;
|
|
23
|
-
|
|
25
|
+
let Component = (_a = windowFactory_1.windowFactory[windowItem.FactoryId]) !== null && _a !== void 0 ? _a : null;
|
|
24
26
|
const _g = (_b = windowItem === null || windowItem === void 0 ? void 0 : windowItem.PopupProps) !== null && _b !== void 0 ? _b : {}, { windowModalProps } = _g, restPopupProps = tslib_1.__rest(_g, ["windowModalProps"]);
|
|
25
27
|
const handleDismiss = () => {
|
|
26
28
|
dispatch((0, PopupRedux_1.PopupHideWindow)(windowItem.Id));
|
|
27
29
|
};
|
|
28
30
|
const size = (_d = (_c = windowModalSettings === null || windowModalSettings === void 0 ? void 0 : windowModalSettings[windowItem.Id]) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : (0, Utilities_1.getWindowPopupSize)();
|
|
29
31
|
const position = (_f = (_e = windowModalSettings === null || windowModalSettings === void 0 ? void 0 : windowModalSettings[windowItem.Id]) === null || _e === void 0 ? void 0 : _e.position) !== null && _f !== void 0 ? _f : (0, Utilities_1.getMiddlePosition)(size);
|
|
32
|
+
let componentNode = null;
|
|
33
|
+
if (!Component &&
|
|
34
|
+
(windowItem.PopupProps.render || windowItem.PopupProps.frameworkComponent)) {
|
|
35
|
+
componentNode = (React.createElement(ExternalRenderer_1.ExternalRenderer, { render: windowItem.PopupProps.render, frameworkComponent: windowItem.PopupProps.frameworkComponent, onDestroy: windowItem.PopupProps.onFrameworkComponentDestroyed }));
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
Component = Component !== null && Component !== void 0 ? Component : NoopComponent;
|
|
39
|
+
componentNode = (React.createElement(Component, { api: adaptable.api, onDismiss: handleDismiss, popupProps: restPopupProps }));
|
|
40
|
+
}
|
|
30
41
|
return (React.createElement(Dialog_1.default, { "data-name": windowItem.Id, style: { height: '100%' }, className: "ab-Window-Modal", key: windowItem.Id, windowModal: true, windowModalProps: Object.assign(Object.assign({}, windowModalProps), { onChange: (settings) => {
|
|
31
42
|
setWindowModalSettings((settingsMap) => (Object.assign(Object.assign({}, settingsMap), { [windowItem.Id]: settings })));
|
|
32
43
|
}, handleSelector: '.ab-Window-Modal .ab-Panel__header', size: size, position: position }), fixed: false, padding: 0, onDismiss: handleDismiss, isOpen: true, showCloseButton: true },
|
|
33
|
-
React.createElement(PanelWithImage_1.PanelWithImage, { style: { height: '100%' }, bodyProps: { padding: 0, height: '100%' }, header: windowItem.Title, glyphicon: windowItem.Icon, variant: "primary" },
|
|
34
|
-
React.createElement(Component, { api: adaptable.api, onDismiss: handleDismiss, popupProps: restPopupProps }))));
|
|
44
|
+
React.createElement(PanelWithImage_1.PanelWithImage, { style: { height: '100%' }, bodyProps: { padding: 0, height: '100%' }, header: windowItem.Title, glyphicon: windowItem.Icon, variant: "primary" }, componentNode)));
|
|
35
45
|
})));
|
|
36
46
|
};
|
|
37
47
|
exports.WindowPopups = WindowPopups;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
|
|
3
|
+
interface DataImportPopupProps extends ModuleViewPopupProps<null> {
|
|
4
|
+
}
|
|
5
|
+
export declare const DataImportPopup: React.FunctionComponent<DataImportPopupProps>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataImportPopup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
|
|
8
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
9
|
+
const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
10
|
+
const DataImportWizard_1 = require("./DataImportWizard");
|
|
11
|
+
const DataImportPopup = (props) => {
|
|
12
|
+
const [isWizardOpen, setIsWizardOpen] = React.useState(false);
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' && ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.source) !== 'ModuleMenu') {
|
|
16
|
+
setIsWizardOpen(true);
|
|
17
|
+
}
|
|
18
|
+
}, []);
|
|
19
|
+
return (React.createElement(React.Fragment, null,
|
|
20
|
+
React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Data Import', glyphicon: 'import' },
|
|
21
|
+
React.createElement(rebass_1.Box, null,
|
|
22
|
+
React.createElement(HelpBlock_1.default, { mb: 2, fontSize: 3 }, "Click the 'Import Data' button to insert or update data into AdapTable"),
|
|
23
|
+
React.createElement(SimpleButton_1.default, { icon: "import", variant: "raised", onClick: () => setIsWizardOpen(true) }, "Import Data"))),
|
|
24
|
+
isWizardOpen && (React.createElement(DataImportWizard_1.DataImportWizard, { onClose: () => {
|
|
25
|
+
var _a;
|
|
26
|
+
setIsWizardOpen(false);
|
|
27
|
+
if (['Toolbar', 'ContextMenu', 'ColumnMenu', 'ModuleButton'].includes((_a = props === null || props === void 0 ? void 0 : props.popupParams) === null || _a === void 0 ? void 0 : _a.source)) {
|
|
28
|
+
props.onClosePopup();
|
|
29
|
+
}
|
|
30
|
+
} }))));
|
|
31
|
+
};
|
|
32
|
+
exports.DataImportPopup = DataImportPopup;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataImportValidationError } from '../../../types';
|
|
3
|
+
export interface ValidationErrorsMap {
|
|
4
|
+
[key: string]: DataImportValidationError[] | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const DataImportWizard: (props: {
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}) => JSX.Element;
|