@adaptabletools/adaptable 16.0.0-canary.3 → 16.0.0-canary.5
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/README.md +2 -0
- package/base.css +31 -23
- package/base.css.map +1 -1
- package/bundle.cjs.js +184 -184
- package/index.css +43 -31
- package/index.css.map +1 -1
- package/package.json +10 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +9 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +1 -10
- package/src/AdaptableOptions/Fdc3Options.d.ts +279 -0
- package/src/AdaptableOptions/Fdc3Options.js +5 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +25 -25
- package/src/AdaptableOptions/GroupingOptions.d.ts +8 -0
- package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +6 -6
- package/src/Api/AdaptableApi.d.ts +7 -2
- package/src/Api/ColumnApi.d.ts +0 -5
- package/src/Api/EventApi.d.ts +3 -3
- package/src/Api/Events/ThemeChanged.d.ts +0 -6
- package/src/Api/Events/ThemeEdited.d.ts +11 -0
- package/src/Api/Fdc3Api.d.ts +91 -0
- package/src/Api/Fdc3Api.js +2 -0
- package/src/Api/FinanceApi.d.ts +13 -13
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
- package/src/Api/Implementation/ApiBase.d.ts +4 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ColumnApiImpl.js +0 -3
- package/src/Api/Implementation/Fdc3ApiImpl.d.ts +28 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +87 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +2 -0
- package/src/Api/Implementation/QuickSearchApiImpl.js +7 -0
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +11 -4
- package/src/Api/Internal/AdaptableInternalApi.js +59 -10
- package/src/Api/Internal/ColumnInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnInternalApi.js +4 -0
- package/src/Api/Internal/Fdc3InternalApi.d.ts +27 -0
- package/src/Api/Internal/Fdc3InternalApi.js +442 -0
- package/src/Api/OptionsApi.d.ts +5 -0
- package/src/Api/QuickSearchApi.d.ts +8 -0
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/{FDC3Context.d.ts → FDC3Context_DEPR.d.ts} +22 -22
- package/src/PredefinedConfig/Common/FDC3Context_DEPR.js +2 -0
- package/src/PredefinedConfig/Common/Fdc3Context.d.ts +55 -0
- package/src/PredefinedConfig/Common/Fdc3Context.js +36 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +71 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.js +107 -0
- package/src/PredefinedConfig/Common/Types.d.ts +2 -2
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +12 -6
- package/src/Redux/ActionsReducers/SystemRedux.js +18 -2
- package/src/Redux/Store/AdaptableStore.js +2 -2
- package/src/Strategy/Fdc3Module.d.ts +13 -0
- package/src/Strategy/Fdc3Module.js +105 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +4 -0
- package/src/Utilities/Constants/GeneralConstants.js +6 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
- package/src/Utilities/Constants/ModuleConstants.js +5 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +11 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
- package/src/Utilities/Services/Fdc3Service.d.ts +20 -0
- package/src/Utilities/Services/Fdc3Service.js +92 -0
- package/src/View/AdaptableView.js +9 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/Utilities.js +1 -1
- package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.d.ts +2 -0
- package/src/View/QuickSearch/FloatingQuickSearch/FloatingQuickSearch.js +26 -0
- package/src/View/QuickSearch/QuickSearchInput.d.ts +6 -0
- package/src/View/QuickSearch/QuickSearchInput.js +22 -0
- package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +2 -5
- package/src/View/QuickSearch/QuickSearchViewPanel.js +5 -19
- package/src/agGrid/ActionColumnRenderer.js +2 -31
- package/src/agGrid/Adaptable.d.ts +2 -0
- package/src/agGrid/Adaptable.js +22 -16
- package/src/agGrid/agGridHelper.js +7 -2
- package/src/components/Drawer/index.d.ts +6 -0
- package/src/components/Drawer/index.js +60 -0
- package/src/components/ExpressionEditor/index.js +4 -2
- package/src/components/icons/fdc3.d.ts +3 -0
- package/src/components/icons/fdc3.js +9 -0
- package/src/components/icons/index.js +3 -1
- package/src/metamodel/adaptable.metamodel.d.ts +161 -19
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +8 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/src/{PredefinedConfig/Common/FDC3Context.js → Api/Events/ThemeEdited.js} +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Fdc3Module = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
|
|
6
|
+
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
7
|
+
class Fdc3Module extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
8
|
+
constructor(api) {
|
|
9
|
+
super(ModuleConstants.Fdc3ModuleId, ModuleConstants.Fdc3FriendlyName, 'fdc3', null, 'The FDC3 Module - handles the FDC3 integration', api);
|
|
10
|
+
}
|
|
11
|
+
isModuleAvailable() {
|
|
12
|
+
return this.getFdc3Options().enableFdc3;
|
|
13
|
+
}
|
|
14
|
+
addContextMenuItems(menuContext) {
|
|
15
|
+
var _a, _b, _c, _d;
|
|
16
|
+
if (!this.isModuleAvailable()) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const currentColumnId = menuContext.adaptableColumn.columnId;
|
|
20
|
+
const currentRowNode = menuContext.rowNode;
|
|
21
|
+
const contextMenuItems = [];
|
|
22
|
+
// Raise Intent menu items
|
|
23
|
+
// standard intents
|
|
24
|
+
const raiseIntents = ((_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.raises) || {};
|
|
25
|
+
Object.keys(raiseIntents).forEach((intent) => {
|
|
26
|
+
const contextConfigs = raiseIntents[intent];
|
|
27
|
+
const configsWithMenuItemsForCurrentColumn = contextConfigs.filter((configElem) => { var _a; return (_a = configElem.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); });
|
|
28
|
+
configsWithMenuItemsForCurrentColumn.forEach((raiseContextConfig) => {
|
|
29
|
+
contextMenuItems.push(this.buildRaiseIntentMenuItem(intent, raiseContextConfig.contextType, currentRowNode));
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
// custom intents
|
|
33
|
+
const raiseCustomIntents = ((_b = this.getFdc3Options().customIntents) === null || _b === void 0 ? void 0 : _b.raises) || {};
|
|
34
|
+
Object.keys(raiseCustomIntents).forEach((intent) => {
|
|
35
|
+
const contextConfigs = raiseCustomIntents[intent];
|
|
36
|
+
const configsWithMenuItemsForCurrentColumn = contextConfigs.filter((configElem) => { var _a; return (_a = configElem.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId); });
|
|
37
|
+
configsWithMenuItemsForCurrentColumn.forEach((raiseContextConfig) => {
|
|
38
|
+
contextMenuItems.push(this.buildRaiseIntentMenuItem(intent, raiseContextConfig.contextType, currentRowNode));
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
// Broadcast menu items
|
|
42
|
+
// standard contexts
|
|
43
|
+
const broadcastContext = ((_c = this.getFdc3Options().contexts) === null || _c === void 0 ? void 0 : _c.broadcasts) || {};
|
|
44
|
+
Object.keys(broadcastContext).forEach((contextType) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const config = broadcastContext[contextType];
|
|
47
|
+
if ((_a = config === null || config === void 0 ? void 0 : config.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId)) {
|
|
48
|
+
contextMenuItems.push(this.buildBroadcastMenuItem(contextType, currentRowNode));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
// custom contexts
|
|
52
|
+
const broadcastCustomContext = ((_d = this.getFdc3Options().customContexts) === null || _d === void 0 ? void 0 : _d.broadcasts) || {};
|
|
53
|
+
Object.keys(broadcastCustomContext).forEach((contextType) => {
|
|
54
|
+
var _a;
|
|
55
|
+
const config = broadcastCustomContext[contextType];
|
|
56
|
+
if ((_a = config === null || config === void 0 ? void 0 : config.contextMenu) === null || _a === void 0 ? void 0 : _a.columnIds.includes(currentColumnId)) {
|
|
57
|
+
contextMenuItems.push(this.buildBroadcastMenuItem(contextType, currentRowNode));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
if (contextMenuItems.length > 1) {
|
|
61
|
+
const groupMenuItem = {
|
|
62
|
+
label: 'FDC3',
|
|
63
|
+
icon: {
|
|
64
|
+
name: 'fdc3',
|
|
65
|
+
},
|
|
66
|
+
isVisible: true,
|
|
67
|
+
subItems: contextMenuItems,
|
|
68
|
+
};
|
|
69
|
+
return [groupMenuItem];
|
|
70
|
+
}
|
|
71
|
+
else if (contextMenuItems.length === 1) {
|
|
72
|
+
contextMenuItems[0].icon = {
|
|
73
|
+
name: 'fdc3',
|
|
74
|
+
};
|
|
75
|
+
return contextMenuItems;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
buildRaiseIntentMenuItem(intent, context, rowNode) {
|
|
79
|
+
const menuItem = {
|
|
80
|
+
label: `Raise ${intent}`,
|
|
81
|
+
onClick: () => {
|
|
82
|
+
this.getFdc3Api().raiseIntentFromRow(rowNode, intent, context);
|
|
83
|
+
},
|
|
84
|
+
isVisible: true,
|
|
85
|
+
};
|
|
86
|
+
return menuItem;
|
|
87
|
+
}
|
|
88
|
+
buildBroadcastMenuItem(context, rowNode) {
|
|
89
|
+
const menuItem = {
|
|
90
|
+
label: `Broadcast ${this.getFdc3Api().getContextLabel(context)}`,
|
|
91
|
+
onClick: () => {
|
|
92
|
+
this.getFdc3Api().broadcastFromRow(rowNode, context);
|
|
93
|
+
},
|
|
94
|
+
isVisible: true,
|
|
95
|
+
};
|
|
96
|
+
return menuItem;
|
|
97
|
+
}
|
|
98
|
+
getFdc3Options() {
|
|
99
|
+
return this.api.optionsApi.getFdc3Options();
|
|
100
|
+
}
|
|
101
|
+
getFdc3Api() {
|
|
102
|
+
return this.api.fdc3Api;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.Fdc3Module = Fdc3Module;
|
|
@@ -23,12 +23,16 @@ export declare const FILTER_THROTTLE: 'Always' | 'Never' | 'Throttle';
|
|
|
23
23
|
export declare const EMPTY_STRING: string;
|
|
24
24
|
export declare const EMPTY_ARRAY: any[];
|
|
25
25
|
export declare const AB_SPECIAL_COLUMN: AdaptableColumnType;
|
|
26
|
+
export declare const AB_ROW_ACTIONS_COLUMN: AdaptableColumnType;
|
|
27
|
+
export declare const AB_FDC3_COLUMN: AdaptableColumnType;
|
|
26
28
|
export declare const HALF_SECOND: number;
|
|
27
29
|
export declare const AG_GRID_GROUPED_COLUMN: string;
|
|
28
30
|
export declare const AG_GRID_PIVOT_COLUMN: string;
|
|
29
31
|
export declare const AG_GRID_CHART_WINDOW = "AG Grid Window";
|
|
30
32
|
export declare const ADAPTABLE_ROW_ACTION_BUTTONS = "adaptableRowActionButtons";
|
|
31
33
|
export declare const ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = "(ActionRowButtons)";
|
|
34
|
+
export declare const ADAPTABLE_FDC3_ACTION_COLUMN = "fdc3ActionColumn";
|
|
35
|
+
export declare const ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = "(FDC3ActionColumn)";
|
|
32
36
|
export declare const DEFAULT_DATE_FORMAT_PATTERN = "dd-MM-yyyy";
|
|
33
37
|
export declare const SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE: number;
|
|
34
38
|
export declare const QUICK_SEARCH_DEFAULT_BACK_COLOR: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = void 0;
|
|
3
|
+
exports.FLASHING_CELL_DEFAULT_DOWN_COLOR_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_UP_COLOR_STATE_PROPERTY = exports.CURRENT_REPORT_STATE_PROPERTY = exports.CURRENT_LAYOUT_STATE_PROPERTY = exports.SUMMARY_OPERATION_STATE_PROPERTY = exports.ALERT_DEFAULT_SHOW_POPUP = exports.ALERT_DEFAULT_MESSAGE_TYPE = exports.PLUS_MINUS_DEFAULT_NUDGE_VALUE = exports.SERVER_VALIDATION_MESSAGE_TYPE = exports.SERVER_VALIDATION_HEADER = exports.DEFAULT_LIVE_REPORT_THROTTLE_TIME = exports.THEME_DEFAULT_CURRENT_THEME = exports.SYSTEM_DEFAULT_SYSTEM_STATUS_TYPE = exports.CELL_SUMMARY_DEFAULT_OPERATION = exports.QUICK_SEARCH_DEBOUNCE_TIME = exports.QUICK_SEARCH_DEFAULT_FORE_COLOR = exports.QUICK_SEARCH_DEFAULT_BACK_COLOR = exports.SYSTEM_STATUS_DEFAULT_MAX_MESSAGES_IN_STORE = exports.DEFAULT_DATE_FORMAT_PATTERN = exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = exports.ADAPTABLE_FDC3_ACTION_COLUMN = exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = exports.ADAPTABLE_ROW_ACTION_BUTTONS = exports.AG_GRID_CHART_WINDOW = exports.AG_GRID_PIVOT_COLUMN = exports.AG_GRID_GROUPED_COLUMN = exports.HALF_SECOND = exports.AB_FDC3_COLUMN = exports.AB_ROW_ACTIONS_COLUMN = exports.AB_SPECIAL_COLUMN = exports.EMPTY_ARRAY = exports.EMPTY_STRING = exports.FILTER_THROTTLE = exports.FILTER_NEVER = exports.FILTER_ALWAYS = exports.ALL_COLUMN_VALUES = exports.READ_ONLY_STYLE = exports.MENU_PREFIX = exports.AGGRID_TOOLPANEL_COLUMNS = exports.AGGRID_TOOLPANEL_FILTERS = exports.ADAPTABLE_TOOLPANEL_COMPONENT = exports.ADAPTABLE_TOOLPANEL_ID = exports.ADAPTABLE = exports.ADAPTABLE_ID = exports.USER_NAME = exports.DARK_THEME = exports.LIGHT_THEME = exports.DEFAULT_LAYOUT = exports.MISSING_COLUMN = exports.AUTOGENERATED_PK_COLUMN = void 0;
|
|
4
|
+
exports.THEME_STYLE = exports.SELECTED_ROWS_REPORT = exports.SELECTED_CELLS_REPORT = exports.CURRENT_DATA_REPORT = exports.ALL_DATA_REPORT = exports.VISUAL_DATA_REPORT = exports.SYSTEM_THEMES = exports.SMART_EDIT_MATH_OPERATION_STATE_PROPERTY = exports.SMART_EDIT_VALUE_STATE_PROPERTY = exports.QUICK_SEARCH_STYLE_STATE_PROPERTY = exports.QUICK_SEARCH_TEXT_STATE_PROPERTY = exports.CURRENT_THEME_STATE_PROPERTY = exports.FLASHING_CELL_DEFAULT_DURATION_STATE_PROPERTY = void 0;
|
|
5
5
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
6
6
|
const UIHelper_1 = require("../../View/UIHelper");
|
|
7
7
|
exports.AUTOGENERATED_PK_COLUMN = '__ADAPTABLE_PK__';
|
|
@@ -26,12 +26,16 @@ exports.FILTER_THROTTLE = 'Throttle';
|
|
|
26
26
|
exports.EMPTY_STRING = '';
|
|
27
27
|
exports.EMPTY_ARRAY = [];
|
|
28
28
|
exports.AB_SPECIAL_COLUMN = 'abSpecialColumn';
|
|
29
|
+
exports.AB_ROW_ACTIONS_COLUMN = 'abRowActionsColumn';
|
|
30
|
+
exports.AB_FDC3_COLUMN = 'abFdc3Column';
|
|
29
31
|
exports.HALF_SECOND = 500;
|
|
30
32
|
exports.AG_GRID_GROUPED_COLUMN = 'ag-Grid-AutoColumn';
|
|
31
33
|
exports.AG_GRID_PIVOT_COLUMN = 'pivot_';
|
|
32
34
|
exports.AG_GRID_CHART_WINDOW = 'AG Grid Window';
|
|
33
35
|
exports.ADAPTABLE_ROW_ACTION_BUTTONS = 'adaptableRowActionButtons';
|
|
34
36
|
exports.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME = '(ActionRowButtons)';
|
|
37
|
+
exports.ADAPTABLE_FDC3_ACTION_COLUMN = 'fdc3ActionColumn';
|
|
38
|
+
exports.ADAPTABLE_FDC3_ACTION_COLUMN_FRIENDLY_NAME = '(FDC3ActionColumn)';
|
|
35
39
|
exports.DEFAULT_DATE_FORMAT_PATTERN = 'dd-MM-yyyy';
|
|
36
40
|
/*
|
|
37
41
|
Redux / State Defaults
|
|
@@ -21,6 +21,8 @@ export declare const DataSetModuleId: ModuleConstants;
|
|
|
21
21
|
export declare const DataSetFriendlyName = "Data Set";
|
|
22
22
|
export declare const ExportModuleId: ModuleConstants;
|
|
23
23
|
export declare const ExportFriendlyName = "Export";
|
|
24
|
+
export declare const Fdc3ModuleId: ModuleConstants;
|
|
25
|
+
export declare const Fdc3FriendlyName = "FDC3";
|
|
24
26
|
export declare const FilterModuleId: ModuleConstants;
|
|
25
27
|
export declare const FilterFriendlyName = "Filter";
|
|
26
28
|
export declare const FormatColumnModuleId: ModuleConstants;
|
|
@@ -77,6 +79,7 @@ export declare const ADAPTABLE_MODULE_MAP: {
|
|
|
77
79
|
DataChangeHistory: string;
|
|
78
80
|
DataSet: string;
|
|
79
81
|
Export: string;
|
|
82
|
+
Fdc3: string;
|
|
80
83
|
Filter: string;
|
|
81
84
|
FormatColumn: string;
|
|
82
85
|
FreeTextColumn: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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 = void 0;
|
|
3
|
+
exports.ShortcutFriendlyName = exports.ShortcutModuleId = exports.ScheduleFriendlyName = exports.ScheduleModuleId = 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.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 = void 0;
|
|
5
5
|
exports.AlertModuleId = 'Alert';
|
|
6
6
|
exports.AlertModuleFriendlyName = 'Alert';
|
|
7
7
|
exports.FlashingCellModuleId = 'FlashingCell';
|
|
@@ -24,6 +24,8 @@ exports.DataSetModuleId = 'DataSet';
|
|
|
24
24
|
exports.DataSetFriendlyName = 'Data Set';
|
|
25
25
|
exports.ExportModuleId = 'Export';
|
|
26
26
|
exports.ExportFriendlyName = 'Export';
|
|
27
|
+
exports.Fdc3ModuleId = 'Fdc3';
|
|
28
|
+
exports.Fdc3FriendlyName = 'FDC3';
|
|
27
29
|
exports.FilterModuleId = 'Filter';
|
|
28
30
|
exports.FilterFriendlyName = 'Filter';
|
|
29
31
|
exports.FormatColumnModuleId = 'FormatColumn';
|
|
@@ -80,6 +82,7 @@ exports.ADAPTABLE_MODULE_MAP = {
|
|
|
80
82
|
[exports.DataChangeHistoryModuleId]: exports.DataChangeHistoryFriendlyName,
|
|
81
83
|
[exports.DataSetModuleId]: exports.DataSetFriendlyName,
|
|
82
84
|
[exports.ExportModuleId]: exports.ExportFriendlyName,
|
|
85
|
+
[exports.Fdc3ModuleId]: exports.Fdc3FriendlyName,
|
|
83
86
|
[exports.FilterModuleId]: exports.FilterFriendlyName,
|
|
84
87
|
[exports.FormatColumnModuleId]: exports.FormatColumnFriendlyName,
|
|
85
88
|
[exports.FreeTextColumnModuleId]: exports.FreeTextColumnFriendlyName,
|
|
@@ -91,7 +91,6 @@ exports.DefaultAdaptableOptions = {
|
|
|
91
91
|
columnFriendlyName: undefined,
|
|
92
92
|
columnTypes: GeneralConstants_1.EMPTY_ARRAY,
|
|
93
93
|
showMissingColumnsWarning: true,
|
|
94
|
-
autoOrderGroupedColumns: true,
|
|
95
94
|
},
|
|
96
95
|
dashboardOptions: {
|
|
97
96
|
canFloat: true,
|
|
@@ -157,6 +156,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
157
156
|
showGroupingTotalsAsHeader: false,
|
|
158
157
|
unbalancedGroupsKey: undefined,
|
|
159
158
|
restoreUngroupedColumns: false,
|
|
159
|
+
autoOrderGroupedColumns: true,
|
|
160
160
|
},
|
|
161
161
|
formatColumnOptions: {
|
|
162
162
|
customDisplayFormatters: undefined,
|
|
@@ -294,4 +294,14 @@ exports.DefaultAdaptableOptions = {
|
|
|
294
294
|
saveStrategy: 'none',
|
|
295
295
|
agGridContainerName: GeneralConstants.AG_GRID_CHART_WINDOW,
|
|
296
296
|
},
|
|
297
|
+
fdc3Options: {
|
|
298
|
+
enableFdc3: false,
|
|
299
|
+
enableLogging: false,
|
|
300
|
+
actionColumnDefaultConfiguration: {
|
|
301
|
+
headerName: 'FDC3 Actions',
|
|
302
|
+
width: 200,
|
|
303
|
+
resizable: true,
|
|
304
|
+
movable: false,
|
|
305
|
+
},
|
|
306
|
+
},
|
|
297
307
|
};
|
|
@@ -30,8 +30,7 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
30
30
|
// to do
|
|
31
31
|
returnedAdaptableOptions.actionRowOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions, adaptableOptions.actionRowOptions);
|
|
32
32
|
returnedAdaptableOptions.actionRowOptions.actionRowButtonOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowButtonOptions, returnedAdaptableOptions.actionRowOptions.actionRowButtonOptions);
|
|
33
|
-
returnedAdaptableOptions.actionRowOptions.actionRowFormOptions =
|
|
34
|
-
Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowFormOptions, returnedAdaptableOptions.actionRowOptions.actionRowFormOptions);
|
|
33
|
+
returnedAdaptableOptions.actionRowOptions.actionRowFormOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.actionRowOptions.actionRowFormOptions, returnedAdaptableOptions.actionRowOptions.actionRowFormOptions);
|
|
35
34
|
returnedAdaptableOptions.containerOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.containerOptions, adaptableOptions.containerOptions);
|
|
36
35
|
returnedAdaptableOptions.groupingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.groupingOptions, adaptableOptions.groupingOptions);
|
|
37
36
|
returnedAdaptableOptions.quickSearchOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.quickSearchOptions, adaptableOptions.quickSearchOptions);
|
|
@@ -46,6 +45,8 @@ function assignAdaptableOptions(adaptableOptions) {
|
|
|
46
45
|
returnedAdaptableOptions.dataChangeHistoryOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.dataChangeHistoryOptions, adaptableOptions.dataChangeHistoryOptions);
|
|
47
46
|
returnedAdaptableOptions.chartingOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.chartingOptions, adaptableOptions.chartingOptions);
|
|
48
47
|
returnedAdaptableOptions.settingsPanelOptions = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.settingsPanelOptions, adaptableOptions.settingsPanelOptions);
|
|
48
|
+
returnedAdaptableOptions.fdc3Options = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options, adaptableOptions.fdc3Options);
|
|
49
|
+
returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration = Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration, returnedAdaptableOptions.fdc3Options.actionColumnDefaultConfiguration);
|
|
49
50
|
const { predefinedConfig } = returnedAdaptableOptions;
|
|
50
51
|
if (predefinedConfig) {
|
|
51
52
|
returnedAdaptableOptions.predefinedConfig =
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IAdaptableService } from './Interface/IAdaptableService';
|
|
2
|
+
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
|
+
import { DesktopAgent, IntentResolution } from '@finos/fdc3';
|
|
4
|
+
import { Context } from '@finos/fdc3/dist/context/ContextTypes';
|
|
5
|
+
import { AppIdentifier } from '@finos/fdc3/dist/api/AppIdentifier';
|
|
6
|
+
export declare class Fdc3Service implements IAdaptableService {
|
|
7
|
+
private adaptableApi;
|
|
8
|
+
private contextHandlerSubscriptions;
|
|
9
|
+
private intentHandlerSubscriptions;
|
|
10
|
+
loggedAgentError: boolean;
|
|
11
|
+
constructor(adaptableApi: AdaptableApi);
|
|
12
|
+
getDesktopAgent(): DesktopAgent;
|
|
13
|
+
destroy(): void;
|
|
14
|
+
raiseIntent(intent: string, context: Context, app?: AppIdentifier): Promise<IntentResolution>;
|
|
15
|
+
raiseIntentForContext(context: Context, app?: AppIdentifier): Promise<IntentResolution>;
|
|
16
|
+
broadcast(context: Context): Promise<void>;
|
|
17
|
+
private logFdc3Event;
|
|
18
|
+
private getFdc3Api;
|
|
19
|
+
private getFdc3Options;
|
|
20
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Fdc3Service = void 0;
|
|
4
|
+
class Fdc3Service {
|
|
5
|
+
constructor(adaptableApi) {
|
|
6
|
+
this.adaptableApi = adaptableApi;
|
|
7
|
+
this.contextHandlerSubscriptions = [];
|
|
8
|
+
this.intentHandlerSubscriptions = [];
|
|
9
|
+
this.loggedAgentError = false;
|
|
10
|
+
this.adaptableApi.eventApi.on('AdaptableReady', () => {
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
12
|
+
const adaptableHandleIntentFn = this.getFdc3Options().handleIntent;
|
|
13
|
+
const listenForStandardIntents = (_b = (_a = this.getFdc3Options().intents) === null || _a === void 0 ? void 0 : _a.listensFor) !== null && _b !== void 0 ? _b : [];
|
|
14
|
+
const listenForCustomIntents = (_d = (_c = this.getFdc3Options().customIntents) === null || _c === void 0 ? void 0 : _c.listensFor) !== null && _d !== void 0 ? _d : [];
|
|
15
|
+
const listenForIntents = [...listenForStandardIntents, ...listenForCustomIntents];
|
|
16
|
+
if (listenForIntents.length) {
|
|
17
|
+
if (!adaptableHandleIntentFn) {
|
|
18
|
+
this.adaptableApi.logError(`Following FDC3 Intent Listener(s) have been provided but no 'handleIntent' function has been supplied in the FDC3 Options`, listenForIntents);
|
|
19
|
+
}
|
|
20
|
+
listenForIntents.forEach((intent) => {
|
|
21
|
+
var _a;
|
|
22
|
+
(_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.addIntentListener(intent, (context, metadata) => {
|
|
23
|
+
this.logFdc3Event('IN', `Intent`, JSON.stringify(context));
|
|
24
|
+
const fnContext = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { context,
|
|
25
|
+
intent,
|
|
26
|
+
metadata });
|
|
27
|
+
adaptableHandleIntentFn === null || adaptableHandleIntentFn === void 0 ? void 0 : adaptableHandleIntentFn(fnContext);
|
|
28
|
+
}).then((listener) => this.intentHandlerSubscriptions.push(listener));
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const adaptableHandleContextFn = this.getFdc3Options().handleContext;
|
|
32
|
+
const listenForStandardContexts = (_f = (_e = this.getFdc3Options().contexts) === null || _e === void 0 ? void 0 : _e.listensFor) !== null && _f !== void 0 ? _f : [];
|
|
33
|
+
const listenForCustomContexts = (_h = (_g = this.getFdc3Options().customContexts) === null || _g === void 0 ? void 0 : _g.listensFor) !== null && _h !== void 0 ? _h : [];
|
|
34
|
+
const listenForContexts = [...listenForStandardContexts, ...listenForCustomContexts];
|
|
35
|
+
if (listenForContexts === null || listenForContexts === void 0 ? void 0 : listenForContexts.length) {
|
|
36
|
+
if (!adaptableHandleContextFn) {
|
|
37
|
+
this.adaptableApi.logError(`Following FDC3 Context Listener(s) have been provided but no 'handleContext' function has been supplied in the FDC3 Options`, listenForContexts);
|
|
38
|
+
}
|
|
39
|
+
listenForContexts.forEach((contextType) => {
|
|
40
|
+
var _a;
|
|
41
|
+
(_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.addContextListener(contextType, (context, metadata) => {
|
|
42
|
+
this.logFdc3Event('IN', `Context`, JSON.stringify(context));
|
|
43
|
+
const fnContext = Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { context,
|
|
44
|
+
metadata });
|
|
45
|
+
adaptableHandleContextFn === null || adaptableHandleContextFn === void 0 ? void 0 : adaptableHandleContextFn(fnContext);
|
|
46
|
+
}).then((listener) => this.contextHandlerSubscriptions.push(listener));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getDesktopAgent() {
|
|
52
|
+
if (globalThis.fdc3 == null && !this.loggedAgentError) {
|
|
53
|
+
this.loggedAgentError = true;
|
|
54
|
+
this.adaptableApi.logError('FDC3 Desktop Agent not found. This should be provided by the wrapper application.');
|
|
55
|
+
}
|
|
56
|
+
return globalThis.fdc3;
|
|
57
|
+
}
|
|
58
|
+
destroy() {
|
|
59
|
+
this.contextHandlerSubscriptions.forEach((subscription) => subscription.unsubscribe());
|
|
60
|
+
this.intentHandlerSubscriptions.forEach((subscription) => subscription.unsubscribe());
|
|
61
|
+
}
|
|
62
|
+
raiseIntent(intent, context, app) {
|
|
63
|
+
var _a;
|
|
64
|
+
this.logFdc3Event('OUT', `raise ${intent}`, JSON.stringify(context));
|
|
65
|
+
return (_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.raiseIntent(intent, context, app);
|
|
66
|
+
}
|
|
67
|
+
raiseIntentForContext(context, app) {
|
|
68
|
+
var _a;
|
|
69
|
+
this.logFdc3Event('OUT', `raise for context`, JSON.stringify(context));
|
|
70
|
+
return (_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.raiseIntentForContext(context, app);
|
|
71
|
+
}
|
|
72
|
+
broadcast(context) {
|
|
73
|
+
var _a;
|
|
74
|
+
this.logFdc3Event('OUT', `broadcast`, JSON.stringify(context));
|
|
75
|
+
return (_a = this.getDesktopAgent()) === null || _a === void 0 ? void 0 : _a.broadcast(context);
|
|
76
|
+
}
|
|
77
|
+
logFdc3Event(type, ...params) {
|
|
78
|
+
if (!this.getFdc3Options().enableLogging) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.adaptableApi.internalApi
|
|
82
|
+
.getAdaptableInstance()
|
|
83
|
+
.logger.consoleLog(`FDC3::${type} - `, params.join(' : '));
|
|
84
|
+
}
|
|
85
|
+
getFdc3Api() {
|
|
86
|
+
return this.adaptableApi.fdc3Api;
|
|
87
|
+
}
|
|
88
|
+
getFdc3Options() {
|
|
89
|
+
return this.adaptableApi.optionsApi.getFdc3Options();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.Fdc3Service = Fdc3Service;
|
|
@@ -4,24 +4,26 @@ exports.AdaptableApp = 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
|
+
const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressIndicator");
|
|
8
|
+
const Toastify_1 = require("../components/Toastify");
|
|
7
9
|
const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
|
|
10
|
+
const AdaptableLoadingScreen_1 = require("./Components/Popups/AdaptableLoadingScreen");
|
|
8
11
|
const AdaptablePopup_1 = require("./Components/Popups/AdaptablePopup");
|
|
12
|
+
const AdaptablePopupConfirmation_1 = require("./Components/Popups/AdaptablePopupConfirmation");
|
|
9
13
|
const AdaptablePopupPrompt_1 = require("./Components/Popups/AdaptablePopupPrompt");
|
|
14
|
+
const FormPopups_1 = require("./Components/Popups/FormPopups/FormPopups");
|
|
15
|
+
const WindowPopups_1 = require("./Components/Popups/WindowPopups/WindowPopups");
|
|
10
16
|
const Dashboard_1 = require("./Dashboard/Dashboard");
|
|
11
|
-
const AdaptablePopupConfirmation_1 = require("./Components/Popups/AdaptablePopupConfirmation");
|
|
12
|
-
const AdaptableLoadingScreen_1 = require("./Components/Popups/AdaptableLoadingScreen");
|
|
13
|
-
const renderWithAdaptableContext_1 = require("./renderWithAdaptableContext");
|
|
14
17
|
const License_1 = require("./License");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const FormPopups_1 = require("./Components/Popups/FormPopups/FormPopups");
|
|
18
|
-
const Toastify_1 = require("../components/Toastify");
|
|
18
|
+
const FloatingQuickSearch_1 = require("./QuickSearch/FloatingQuickSearch/FloatingQuickSearch");
|
|
19
|
+
const renderWithAdaptableContext_1 = require("./renderWithAdaptableContext");
|
|
19
20
|
class AdaptableView extends React.Component {
|
|
20
21
|
render() {
|
|
21
22
|
var _a, _b, _c, _d;
|
|
22
23
|
const watermark = (_d = (_c = (_b = (_a = this.props.AdaptableApi) === null || _a === void 0 ? void 0 : _a.internalApi) === null || _b === void 0 ? void 0 : _b.getSystemState()) === null || _c === void 0 ? void 0 : _c.License) === null || _d === void 0 ? void 0 : _d.watermark;
|
|
23
24
|
const adaptableOptions = this.props.AdaptableApi.optionsApi.getAdaptableOptions();
|
|
24
25
|
return (React.createElement("div", null,
|
|
26
|
+
React.createElement(FloatingQuickSearch_1.QuickSearchDrawer, null),
|
|
25
27
|
this.props.AdaptableApi.internalApi.getModuleService().isModuleAvailable('Dashboard') && (React.createElement(Dashboard_1.Dashboard, { api: this.props.AdaptableApi })),
|
|
26
28
|
React.createElement(AdaptableLoadingScreen_1.AdaptableLoadingScreen, { onClose: this.props.onCloseLoadingPopup, showLoadingScreen: this.props.PopupState.LoadingPopup.ShowLoadingPopup }),
|
|
27
29
|
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 })),
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { AdaptableOptions } from '../../../AdaptableOptions/AdaptableOptions';
|
|
2
2
|
import { GridOptions } from '@ag-grid-community/core';
|
|
3
|
+
/**
|
|
4
|
+
* Config used by No Code Plugin to set up AdapTable
|
|
5
|
+
*/
|
|
3
6
|
export interface AdaptableConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Adaptable Options object
|
|
9
|
+
*/
|
|
4
10
|
adaptableOptions: AdaptableOptions;
|
|
11
|
+
/**
|
|
12
|
+
* AG Grid Grid Options object
|
|
13
|
+
*/
|
|
5
14
|
gridOptions: GridOptions;
|
|
6
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.columnFilter = void 0;
|
|
4
|
-
const columnFilter = (column, searchText) => [column.friendlyName, column.columnId].some((candidate) => candidate.toLowerCase().includes(searchText.toLowerCase()));
|
|
4
|
+
const columnFilter = (column, searchText) => [column.friendlyName, column.columnId].some((candidate) => candidate === null || candidate === void 0 ? void 0 : candidate.toLowerCase().includes(searchText.toLowerCase()));
|
|
5
5
|
exports.columnFilter = columnFilter;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuickSearchDrawer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const rebass_1 = require("rebass");
|
|
8
|
+
const index_1 = require("../../../components/Drawer/index");
|
|
9
|
+
const SystemRedux_1 = require("../../../Redux/ActionsReducers/SystemRedux");
|
|
10
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
11
|
+
const QuickSearchInput_1 = require("../QuickSearchInput");
|
|
12
|
+
const QuickSearchDrawer = () => {
|
|
13
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
14
|
+
const isOpen = (0, react_redux_1.useSelector)((state) => (0, SystemRedux_1.SystemQuickSearchFloatingVisibilitySelector)(state.System));
|
|
15
|
+
return (React.createElement(index_1.Drawer, { open: isOpen, onOpenChange: (open) => {
|
|
16
|
+
if (open) {
|
|
17
|
+
adaptable.api.quickSearchApi.showFloatingQuickSearch();
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
adaptable.api.quickSearchApi.hideFloatingQuickSearch();
|
|
21
|
+
}
|
|
22
|
+
} },
|
|
23
|
+
React.createElement(rebass_1.Flex, { className: "ab-FloatinQuickSearch" },
|
|
24
|
+
React.createElement(QuickSearchInput_1.QuickSearchInput, { autoFocus: true }))));
|
|
25
|
+
};
|
|
26
|
+
exports.QuickSearchDrawer = QuickSearchDrawer;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QuickSearchInput = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
|
|
8
|
+
const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
|
|
9
|
+
const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
|
|
10
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
11
|
+
const QuickSearchInput = (props) => {
|
|
12
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
13
|
+
const QuickSearchText = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
|
|
14
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
15
|
+
const onRunQuickSearch = (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText));
|
|
16
|
+
const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)({
|
|
17
|
+
QuickSearchText,
|
|
18
|
+
onRunQuickSearch,
|
|
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: '7rem' } }));
|
|
21
|
+
};
|
|
22
|
+
exports.QuickSearchInput = QuickSearchInput;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
3
|
-
import * as
|
|
2
|
+
import * as React from 'react';
|
|
4
3
|
export interface QuickSearchViewPanelComponentProps extends ViewPanelProps {
|
|
5
|
-
onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction;
|
|
6
|
-
QuickSearchText: string;
|
|
7
4
|
}
|
|
8
|
-
export declare const QuickSearchViewPanelControl:
|
|
5
|
+
export declare const QuickSearchViewPanelControl: React.FunctionComponent<QuickSearchViewPanelComponentProps>;
|
|
@@ -2,24 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QuickSearchViewPanelControl = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
|
|
6
|
-
const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
|
|
7
|
-
const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
|
|
8
|
-
const react_redux_1 = require("react-redux");
|
|
9
5
|
const React = tslib_1.__importStar(require("react"));
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
6
|
+
const QuickSearchInput_1 = require("./QuickSearchInput");
|
|
7
|
+
const QuickSearchViewPanelControl = (props) => {
|
|
8
|
+
let elementType = props.viewType === 'ToolPanel' ? 'DashboardToolbar' : 'ToolPanel';
|
|
9
|
+
return React.createElement(QuickSearchInput_1.QuickSearchInput, { className: `ab-${elementType}__QuickSearch__text` });
|
|
14
10
|
};
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
QuickSearchText: state.QuickSearch.QuickSearchText,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function mapDispatchToProps(dispatch) {
|
|
21
|
-
return {
|
|
22
|
-
onRunQuickSearch: (newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
exports.QuickSearchViewPanelControl = (0, react_redux_1.connect)(mapStateToProps, mapDispatchToProps)(QuickSearchViewPanelComponent);
|
|
11
|
+
exports.QuickSearchViewPanelControl = QuickSearchViewPanelControl;
|
|
@@ -4,31 +4,8 @@ exports.ActionColumnRenderer = exports.ReactActionColumnRenderer = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const SimpleButton_1 = tslib_1.__importDefault(require("../components/SimpleButton"));
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const uuid_1 = require("../components/utils/uuid");
|
|
8
7
|
const useRerender_1 = require("../components/utils/useRerender");
|
|
9
|
-
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
10
8
|
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
11
|
-
function getActionButtonsAndActionColumn(adaptable, actionColumn, colId) {
|
|
12
|
-
var _a;
|
|
13
|
-
const actionCol = actionColumn
|
|
14
|
-
? actionColumn
|
|
15
|
-
: (_a = adaptable.api.actionColumnApi.getActionColumns()) === null || _a === void 0 ? void 0 : _a.find((ac) => ac.columnId == colId);
|
|
16
|
-
if (actionCol && actionCol.actionColumnButton) {
|
|
17
|
-
let actionButtons = Array.isArray(actionCol.actionColumnButton)
|
|
18
|
-
? actionCol.actionColumnButton
|
|
19
|
-
: [actionCol.actionColumnButton];
|
|
20
|
-
if (!actionButtons.length) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
// actionButtons don't have IDs, so we need to generate them to be used later as a react component key
|
|
24
|
-
actionButtons = actionButtons.map((actionButton) => (Object.assign(Object.assign({}, actionButton), { Uuid: (0, uuid_1.createUuid)() })));
|
|
25
|
-
return { actionButtons, actionColumn: actionCol };
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
actionButtons: [],
|
|
29
|
-
actionColumn: actionCol,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
9
|
const ActionButtons = (props) => {
|
|
33
10
|
const { buttons, adaptableApi, context, rerender } = props;
|
|
34
11
|
return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
|
|
@@ -60,10 +37,7 @@ const ActionButtons = (props) => {
|
|
|
60
37
|
const ReactActionColumnRenderer = (props) => {
|
|
61
38
|
const rerender = (0, useRerender_1.useRerender)();
|
|
62
39
|
const adaptable = props.api.__adaptable;
|
|
63
|
-
const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(
|
|
64
|
-
columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
65
|
-
actionColumnButton: adaptable.getActionRowButtonDefs(),
|
|
66
|
-
}, props.colDef.colId);
|
|
40
|
+
const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(props.colDef);
|
|
67
41
|
if (!actionColumn || !actionButtons.length) {
|
|
68
42
|
return null;
|
|
69
43
|
}
|
|
@@ -89,10 +63,7 @@ class ActionColumnRenderer {
|
|
|
89
63
|
// gets called once before the renderer is used
|
|
90
64
|
init(params) {
|
|
91
65
|
const adaptable = params.api.__adaptable;
|
|
92
|
-
const { actionButtons, actionColumn } = getActionButtonsAndActionColumn(
|
|
93
|
-
columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
94
|
-
actionColumnButton: adaptable.getActionRowButtonDefs(),
|
|
95
|
-
}, params.colDef.colId);
|
|
66
|
+
const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(params.colDef);
|
|
96
67
|
if (!actionColumn || !actionButtons.length) {
|
|
97
68
|
return;
|
|
98
69
|
}
|
|
@@ -38,6 +38,7 @@ import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelSer
|
|
|
38
38
|
import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
|
|
39
39
|
import { RenderReactRootFn } from '../renderReactRoot';
|
|
40
40
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
41
|
+
import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
|
|
41
42
|
declare type RuntimeConfig = {
|
|
42
43
|
gridOptions: GridOptions;
|
|
43
44
|
waitForAgGrid?: boolean;
|
|
@@ -63,6 +64,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
63
64
|
TeamSharingService: ITeamSharingService;
|
|
64
65
|
MetamodelService: IMetamodelService;
|
|
65
66
|
RowEditService: IRowEditService;
|
|
67
|
+
Fdc3Service: Fdc3Service;
|
|
66
68
|
private LicenseService;
|
|
67
69
|
private ChartingService;
|
|
68
70
|
private ThemeService;
|