@adaptabletools/adaptable 16.2.0-canary.3 → 16.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle.cjs.js +147 -147
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/DataImportOptions.d.ts +7 -7
- package/src/Api/DashboardApi.d.ts +18 -5
- package/src/Api/Implementation/DashboardApiImpl.d.ts +4 -3
- package/src/Api/Implementation/DashboardApiImpl.js +28 -6
- package/src/Api/Internal/AdaptableInternalApi.d.ts +1 -2
- package/src/Api/Internal/DashboardInternalApi.d.ts +3 -0
- package/src/Api/Internal/DashboardInternalApi.js +9 -0
- package/src/Api/Internal/DataImportInternalApi.js +3 -3
- package/src/View/Dashboard/CustomToolbar.js +19 -16
- package/src/View/Dashboard/PinnedDashboard.js +2 -2
- package/src/View/Query/QueryViewPanel.js +1 -1
- package/src/View/QuickSearch/QuickSearchInput.d.ts +1 -0
- package/src/View/QuickSearch/QuickSearchInput.js +2 -1
- package/src/View/QuickSearch/QuickSearchViewPanel.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +2 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.1",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1700847739740;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -19,17 +19,17 @@ export interface DataImportOptions<T = Record<string, unknown>> {
|
|
|
19
19
|
/**
|
|
20
20
|
* Function to handle the Imported Data and apply it to the Grid. If not provided then the Data will be applied to the Grid automatically.
|
|
21
21
|
*/
|
|
22
|
-
handleImportedData?: (context: HandleImportedDataContext<T>) => Promise<HandleImportedDataResolution>;
|
|
22
|
+
handleImportedData?: (context: HandleImportedDataContext<T>) => Promise<void | HandleImportedDataResolution>;
|
|
23
23
|
/**
|
|
24
24
|
* Function to pre-process the data before it is imported
|
|
25
25
|
*
|
|
26
|
-
* @experimental might change in a future version
|
|
26
|
+
* @experimental It might change in a future version
|
|
27
27
|
*/
|
|
28
28
|
_preprocessData?: (context: PreprocessDataContext<T>) => Record<string, unknown>[];
|
|
29
29
|
/**
|
|
30
30
|
* Function to get the Primary Key value for a data row (defaults to value of the primaryKey column)
|
|
31
31
|
*
|
|
32
|
-
* @experimental might change in a future version
|
|
32
|
+
* @experimental It might change in a future version
|
|
33
33
|
*/
|
|
34
34
|
_getPrimaryKeyValue?: (context: GetPrimaryKeyValueContext<T>) => string | number;
|
|
35
35
|
}
|
|
@@ -78,16 +78,16 @@ export interface DataImportValidationError {
|
|
|
78
78
|
error: string;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
* Context
|
|
81
|
+
* Context passed to the `validate` function
|
|
82
82
|
*/
|
|
83
83
|
export interface DataImportValidateContext<T = Record<string, unknown>> extends BaseContext {
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Imported Row Data
|
|
86
86
|
*/
|
|
87
87
|
rowData: T;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
* Context
|
|
90
|
+
* Context passed to the `getPrimaryKeyValue` function
|
|
91
91
|
*/
|
|
92
92
|
export interface GetPrimaryKeyValueContext<T = Record<string, unknown>> extends BaseContext {
|
|
93
93
|
/**
|
|
@@ -102,7 +102,7 @@ export interface HandleImportedDataResolution {
|
|
|
102
102
|
/**
|
|
103
103
|
* Whether to emit the `DataImported` event
|
|
104
104
|
*/
|
|
105
|
-
emitDataImportedEvent
|
|
105
|
+
emitDataImportedEvent: boolean;
|
|
106
106
|
/**
|
|
107
107
|
* Rows that were added
|
|
108
108
|
*/
|
|
@@ -33,16 +33,18 @@ export interface DashboardApi {
|
|
|
33
33
|
*/
|
|
34
34
|
setDashboardTitle(title: string): void;
|
|
35
35
|
/**
|
|
36
|
-
* Returns
|
|
36
|
+
* Returns the HTML Element for the given Custom Toolbar. This should only be used in Vanilla AdapTable for toolbars created via a `render` function.
|
|
37
37
|
* @param customToolbarName the name of the Custom Toolbar
|
|
38
|
+
*
|
|
38
39
|
*/
|
|
39
|
-
|
|
40
|
+
getCustomToolbarHTMLElement(customToolbarName: string): HTMLElement | null;
|
|
40
41
|
/**
|
|
41
|
-
*
|
|
42
|
+
* Renders the given HTML string in the given Custom Toolbar. This should only be used in Vanilla AdapTable for toolbars created via a `render` function!
|
|
42
43
|
* @param customToolbarName name of Custom Toolbar hosting content
|
|
43
|
-
* @param
|
|
44
|
+
* @param htmlContent HTML string to render
|
|
45
|
+
*
|
|
44
46
|
*/
|
|
45
|
-
|
|
47
|
+
setCustomToolbarHTMLContent(customToolbarName: string, htmlContent: string): void;
|
|
46
48
|
/**
|
|
47
49
|
* Returns Custom Toolbar with the given name
|
|
48
50
|
* @param customToolbarName the name of the Custom Toolbar
|
|
@@ -137,4 +139,15 @@ export interface DashboardApi {
|
|
|
137
139
|
* Is Dashboard Visible
|
|
138
140
|
*/
|
|
139
141
|
isDashboardVisible(): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* DEPRECATED
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated use `getCustomToolbarHTMLElement` instead
|
|
147
|
+
*/
|
|
148
|
+
getCustomToolbarContentsDiv(customToolbarName: string): HTMLElement | null;
|
|
149
|
+
/**
|
|
150
|
+
* @deprecated use `setCustomToolbarHTMLContent` instead
|
|
151
|
+
*/
|
|
152
|
+
setCustomToolbarContents(customToolbarName: string, contents: string): void;
|
|
140
153
|
}
|
|
@@ -3,8 +3,7 @@ import { DashboardApi } from '../DashboardApi';
|
|
|
3
3
|
import { DashboardState, DashboardTab } from '../../PredefinedConfig/DashboardState';
|
|
4
4
|
import { AdaptableDashboardToolbar, AdaptableDashboardToolbars, AdaptableModuleButtons } from '../../PredefinedConfig/Common/Types';
|
|
5
5
|
import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
|
|
6
|
-
import { DashboardButtonContext } from '../../types';
|
|
7
|
-
import { CustomToolbar } from '../../AdaptableOptions/DashboardOptions';
|
|
6
|
+
import { CustomToolbar, DashboardButtonContext } from '../../types';
|
|
8
7
|
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
9
8
|
import { DashboardInternalApi } from '../Internal/DashboardInternalApi';
|
|
10
9
|
export declare class DashboardApiImpl extends ApiBase implements DashboardApi {
|
|
@@ -17,7 +16,9 @@ export declare class DashboardApiImpl extends ApiBase implements DashboardApi {
|
|
|
17
16
|
setModuleButtons(moduleButtons: AdaptableModuleButtons): void;
|
|
18
17
|
setDashboardTitle(title: string): void;
|
|
19
18
|
getCustomToolbarContentsDiv(customToolbarName: string): HTMLElement | null;
|
|
19
|
+
getCustomToolbarHTMLElement(customToolbarName: string): HTMLElement | null;
|
|
20
20
|
setCustomToolbarContents(customToolbarName: string, contents: string): void;
|
|
21
|
+
setCustomToolbarHTMLContent(customToolbarName: string, htmlContent: string): void;
|
|
21
22
|
getCustomToolbarByName(customToolbarName: string): CustomToolbar;
|
|
22
23
|
getTabByName(tabName: string): DashboardTab;
|
|
23
24
|
collapseDashboard(): void;
|
|
@@ -32,7 +33,7 @@ export declare class DashboardApiImpl extends ApiBase implements DashboardApi {
|
|
|
32
33
|
isToolbarVisible(toolbar: AdaptableDashboardToolbar | string): boolean;
|
|
33
34
|
setActiveTabIndex(tabIndex: number): void;
|
|
34
35
|
setActiveTab(tabName: string): void;
|
|
35
|
-
getCurrentToolbars(): AdaptableDashboardToolbars | string[]
|
|
36
|
+
getCurrentToolbars(): AdaptableDashboardToolbars | string[];
|
|
36
37
|
openDashboardSettingsPanel(): void;
|
|
37
38
|
isDashboardCollapsed(): boolean;
|
|
38
39
|
isDashboardExpanded(): boolean;
|
|
@@ -8,6 +8,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
8
8
|
const React = tslib_1.__importStar(require("react"));
|
|
9
9
|
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
10
10
|
const DashboardInternalApi_1 = require("../Internal/DashboardInternalApi");
|
|
11
|
+
const logDeprecation_1 = require("../../Utilities/logDeprecation");
|
|
11
12
|
class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
12
13
|
constructor(adaptable) {
|
|
13
14
|
super(adaptable);
|
|
@@ -41,17 +42,38 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
41
42
|
this.dispatchAction(DashboardRedux.DashboardSetTitle(title));
|
|
42
43
|
}
|
|
43
44
|
getCustomToolbarContentsDiv(customToolbarName) {
|
|
45
|
+
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'DashboardApi', 'getCustomToolbarContentsDiv', 'getCustomToolbarHTMLElement');
|
|
44
46
|
let customToolbar = this.getCustomToolbarByName(customToolbarName);
|
|
45
47
|
if (customToolbar) {
|
|
46
|
-
let divId =
|
|
48
|
+
let divId = this.internalApi.getCustomToolbarRenderContainerId(customToolbarName);
|
|
47
49
|
return document.getElementById(divId);
|
|
48
50
|
}
|
|
49
51
|
return null;
|
|
50
52
|
}
|
|
53
|
+
getCustomToolbarHTMLElement(customToolbarName) {
|
|
54
|
+
let customToolbar = this.getCustomToolbarByName(customToolbarName);
|
|
55
|
+
if (!customToolbar) {
|
|
56
|
+
this.logWarn(`Could not find custom toolbar with name ${customToolbarName}`);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (customToolbar.render) {
|
|
60
|
+
return document.getElementById(this.internalApi.getCustomToolbarRenderContainerId(customToolbarName));
|
|
61
|
+
}
|
|
62
|
+
if (customToolbar.toolbarButtons) {
|
|
63
|
+
return document.getElementById(this.internalApi.getCustomToolbarButtonsContainerId(customToolbarName));
|
|
64
|
+
}
|
|
65
|
+
if (customToolbar.frameworkComponent) {
|
|
66
|
+
return document.getElementById(this.internalApi.getCustomToolbarComponentContainerId(customToolbarName));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
51
69
|
setCustomToolbarContents(customToolbarName, contents) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'DashboardApi', 'setCustomToolbarContents', 'setCustomToolbarHTMLContent');
|
|
71
|
+
this.setCustomToolbarHTMLContent(customToolbarName, contents);
|
|
72
|
+
}
|
|
73
|
+
setCustomToolbarHTMLContent(customToolbarName, htmlContent) {
|
|
74
|
+
let customRenderedContainer = this.getCustomToolbarHTMLElement(customToolbarName);
|
|
75
|
+
if (customRenderedContainer) {
|
|
76
|
+
this.adaptable.renderReactRoot(React.createElement("div", { dangerouslySetInnerHTML: { __html: htmlContent } }), customRenderedContainer);
|
|
55
77
|
}
|
|
56
78
|
}
|
|
57
79
|
getCustomToolbarByName(customToolbarName) {
|
|
@@ -104,11 +126,11 @@ class DashboardApiImpl extends ApiBase_1.ApiBase {
|
|
|
104
126
|
getCurrentToolbars() {
|
|
105
127
|
// if hidden or collapsed return fasle
|
|
106
128
|
if (this.getDashboardState().IsCollapsed == true || this.getDashboardState().IsHidden == true) {
|
|
107
|
-
return
|
|
129
|
+
return [];
|
|
108
130
|
}
|
|
109
131
|
const currentTab = this.getActiveTab();
|
|
110
132
|
if (!currentTab) {
|
|
111
|
-
return
|
|
133
|
+
return [];
|
|
112
134
|
}
|
|
113
135
|
return currentTab.Toolbars;
|
|
114
136
|
}
|
|
@@ -16,7 +16,7 @@ import { IDataService } from '../../Utilities/Services/Interface/IDataService';
|
|
|
16
16
|
import { IEntitlementService } from '../../Utilities/Services/Interface/IEntitlementService';
|
|
17
17
|
import { IQueryLanguageService } from '../../Utilities/Services/Interface/IQueryLanguageService';
|
|
18
18
|
import { IAlertService } from '../../Utilities/Services/Interface/IAlertService';
|
|
19
|
-
import { IRowNode } from '@ag-grid-community/core';
|
|
19
|
+
import { ColDef, IRowNode } from '@ag-grid-community/core';
|
|
20
20
|
import { ITeamSharingService } from '../../Utilities/Services/Interface/ITeamSharingService';
|
|
21
21
|
import { ButtonStyle } from '../../PredefinedConfig/Common/ButtonStyle';
|
|
22
22
|
import { AdaptableButton } from '../../PredefinedConfig/Common/AdaptableButton';
|
|
@@ -26,7 +26,6 @@ import { IModuleCollection } from '../../Strategy/Interface/IModule';
|
|
|
26
26
|
import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
27
27
|
import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
|
|
28
28
|
import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
|
|
29
|
-
import { ColDef } from '@ag-grid-community/core/dist/esm/es6/entities/colDef';
|
|
30
29
|
export declare class AdaptableInternalApi extends ApiBase {
|
|
31
30
|
getSystemState(): SystemState;
|
|
32
31
|
showPopupConfirmation(confirmation: UIConfirmation): void;
|
|
@@ -6,4 +6,7 @@ export declare class DashboardInternalApi extends ApiBase {
|
|
|
6
6
|
*/
|
|
7
7
|
fireDashboardChangedEvent(trigger: string, oldDashboardState: DashboardState, newDashboardState: DashboardState): void;
|
|
8
8
|
isToolbarInActiveTab(toolbarName: string, dashboardState: DashboardState): boolean;
|
|
9
|
+
getCustomToolbarRenderContainerId(customToolbarName: string): string;
|
|
10
|
+
getCustomToolbarButtonsContainerId(customToolbarName: string): string;
|
|
11
|
+
getCustomToolbarComponentContainerId(customToolbarName: string): string;
|
|
9
12
|
}
|
|
@@ -49,5 +49,14 @@ class DashboardInternalApi extends ApiBase_1.ApiBase {
|
|
|
49
49
|
}
|
|
50
50
|
return false;
|
|
51
51
|
}
|
|
52
|
+
getCustomToolbarRenderContainerId(customToolbarName) {
|
|
53
|
+
return `ab-CustomToolbar__${customToolbarName}__renderContent`;
|
|
54
|
+
}
|
|
55
|
+
getCustomToolbarButtonsContainerId(customToolbarName) {
|
|
56
|
+
return `ab-CustomToolbar__${customToolbarName}__buttons`;
|
|
57
|
+
}
|
|
58
|
+
getCustomToolbarComponentContainerId(customToolbarName) {
|
|
59
|
+
return `ab-CustomToolbar__${customToolbarName}__component`;
|
|
60
|
+
}
|
|
52
61
|
}
|
|
53
62
|
exports.DashboardInternalApi = DashboardInternalApi;
|
|
@@ -12,9 +12,9 @@ class DataImportInternalApi extends ApiBase_1.ApiBase {
|
|
|
12
12
|
importData = dataImportOptions._preprocessData(Object.assign({ data: partialRows }, (0, ObjectFactory_1.createBaseContext)(this.getAdaptableApi())));
|
|
13
13
|
}
|
|
14
14
|
if (typeof dataImportOptions.handleImportedData === 'function') {
|
|
15
|
-
const
|
|
16
|
-
if (emitDataImportedEvent) {
|
|
17
|
-
this.publishDataImportedEvent(importData, addedRows, updatedRows);
|
|
15
|
+
const resolution = await dataImportOptions.handleImportedData(Object.assign({ data: importData }, (0, ObjectFactory_1.createBaseContext)(this.getAdaptableApi())));
|
|
16
|
+
if (resolution && (resolution === null || resolution === void 0 ? void 0 : resolution.emitDataImportedEvent)) {
|
|
17
|
+
this.publishDataImportedEvent(importData, resolution.addedRows, resolution.updatedRows);
|
|
18
18
|
}
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
@@ -8,15 +8,17 @@ const AdaptableContext_1 = require("../AdaptableContext");
|
|
|
8
8
|
const AdaptableButton_1 = require("../Components/AdaptableButton");
|
|
9
9
|
const PanelDashboard_1 = require("../Components/Panels/PanelDashboard");
|
|
10
10
|
const CustomToolbarCmp = (props) => {
|
|
11
|
-
|
|
12
|
-
let buttonsDivId = 'ab-CustomToolbar__' + props.customToolbar.name + '__buttons';
|
|
13
|
-
const [contentsHTML, setContentsHTML] = (0, react_1.useState)('');
|
|
11
|
+
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
14
12
|
// dummy object which is used to force a re-render of the toolbar
|
|
15
13
|
const [componentRevision, setComponentRevision] = (0, react_1.useState)(1);
|
|
16
|
-
const
|
|
17
|
-
const
|
|
14
|
+
const renderContentContainerId = api.dashboardApi.internalApi.getCustomToolbarRenderContainerId(props.customToolbar.name);
|
|
15
|
+
const renderContentContainerRef = (0, react_1.useRef)(null);
|
|
16
|
+
const [renderedContentHTML, setRenderedContentHTML] = (0, react_1.useState)('');
|
|
17
|
+
const buttonsContainerId = api.dashboardApi.internalApi.getCustomToolbarButtonsContainerId(props.customToolbar.name);
|
|
18
|
+
const componentContainerId = api.dashboardApi.internalApi.getCustomToolbarComponentContainerId(props.customToolbar.name);
|
|
19
|
+
const componentContainerRef = (0, react_1.useRef)(null);
|
|
18
20
|
(0, react_1.useLayoutEffect)(() => {
|
|
19
|
-
const element =
|
|
21
|
+
const element = renderContentContainerRef.current;
|
|
20
22
|
const adaptableApi = api;
|
|
21
23
|
if (props.customToolbar.render) {
|
|
22
24
|
const html = props.customToolbar.render({
|
|
@@ -26,11 +28,11 @@ const CustomToolbarCmp = (props) => {
|
|
|
26
28
|
userName: adaptableApi.optionsApi.getUserName(),
|
|
27
29
|
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
28
30
|
});
|
|
29
|
-
|
|
31
|
+
setRenderedContentHTML(html);
|
|
30
32
|
}
|
|
31
33
|
}, [componentRevision, props.dashboardRevision]);
|
|
32
34
|
(0, react_1.useLayoutEffect)(() => {
|
|
33
|
-
const element =
|
|
35
|
+
const element = renderContentContainerRef.current;
|
|
34
36
|
const adaptableApi = api;
|
|
35
37
|
// cleanup runs in a separate effect, this way it's executed only once on unmount
|
|
36
38
|
return () => {
|
|
@@ -46,26 +48,26 @@ const CustomToolbarCmp = (props) => {
|
|
|
46
48
|
};
|
|
47
49
|
}, []);
|
|
48
50
|
(0, react_1.useLayoutEffect)(() => {
|
|
49
|
-
const
|
|
51
|
+
const containerElement = componentContainerRef.current;
|
|
50
52
|
const adaptableApi = api;
|
|
51
53
|
if (props.customToolbar.frameworkComponent) {
|
|
52
|
-
adaptableApi.internalApi.createFrameworkComponent(
|
|
54
|
+
adaptableApi.internalApi.createFrameworkComponent(containerElement, props.customToolbar.frameworkComponent, 'toolbar');
|
|
53
55
|
}
|
|
54
56
|
const destroyUnsubscribe = adaptableApi.eventApi.on('AdaptableDestroy', () => {
|
|
55
57
|
var _a;
|
|
56
|
-
(_a = adaptableApi === null || adaptableApi === void 0 ? void 0 : adaptableApi.internalApi) === null || _a === void 0 ? void 0 : _a.destroyFrameworkComponent(
|
|
58
|
+
(_a = adaptableApi === null || adaptableApi === void 0 ? void 0 : adaptableApi.internalApi) === null || _a === void 0 ? void 0 : _a.destroyFrameworkComponent(containerElement, props.customToolbar.frameworkComponent, 'toolbar');
|
|
57
59
|
});
|
|
58
60
|
return () => {
|
|
59
61
|
var _a;
|
|
60
62
|
destroyUnsubscribe();
|
|
61
63
|
if (props.customToolbar.frameworkComponent) {
|
|
62
|
-
(_a = adaptableApi === null || adaptableApi === void 0 ? void 0 : adaptableApi.internalApi) === null || _a === void 0 ? void 0 : _a.destroyFrameworkComponent(
|
|
64
|
+
(_a = adaptableApi === null || adaptableApi === void 0 ? void 0 : adaptableApi.internalApi) === null || _a === void 0 ? void 0 : _a.destroyFrameworkComponent(containerElement, props.customToolbar.frameworkComponent, 'toolbar');
|
|
63
65
|
}
|
|
64
66
|
};
|
|
65
67
|
}, []);
|
|
66
68
|
return (React.createElement(React.Fragment, null,
|
|
67
|
-
|
|
68
|
-
props.customToolbar.toolbarButtons && (React.createElement("div", { id:
|
|
69
|
+
props.customToolbar.render && (React.createElement("div", { id: renderContentContainerId, ref: renderContentContainerRef, className: `ab-CustomToolbar__rendered-content ab-CustomToolbar--${props.customToolbar.name}`, style: { minHeight: 22 }, dangerouslySetInnerHTML: { __html: renderedContentHTML } })),
|
|
70
|
+
props.customToolbar.toolbarButtons && (React.createElement("div", { id: buttonsContainerId, className: `ab-CustomToolbar__buttons ab-CustomToolbar--${props.customToolbar.name}`, style: { minHeight: 22 } }, props.customToolbar.toolbarButtons.map((button, index) => {
|
|
69
71
|
const dashboardContext = {
|
|
70
72
|
customToolbar: props.customToolbar,
|
|
71
73
|
adaptableApi: api,
|
|
@@ -90,12 +92,13 @@ const CustomToolbarCmp = (props) => {
|
|
|
90
92
|
setComponentRevision(componentRevision + 1);
|
|
91
93
|
}, 16);
|
|
92
94
|
} }, buttonLabel));
|
|
93
|
-
})))
|
|
95
|
+
}))),
|
|
96
|
+
props.customToolbar.frameworkComponent && (React.createElement("div", { id: componentContainerId, ref: componentContainerRef, style: { minHeight: 22 }, className: `ab-CustomToolbar__component ab-CustomToolbar--${props.customToolbar.name}` }))));
|
|
94
97
|
};
|
|
95
98
|
exports.CustomToolbarCmp = CustomToolbarCmp;
|
|
96
99
|
const CustomToolbarWrapper = (props) => {
|
|
97
100
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
98
|
-
return (React.createElement(PanelDashboard_1.PanelDashboard, {
|
|
101
|
+
return (React.createElement(PanelDashboard_1.PanelDashboard, { headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureButton: props.customToolbar.showConfigureButton != null &&
|
|
99
102
|
props.customToolbar.showConfigureButton == true, showCloseButton: props.customToolbar.showCloseButton != null && props.customToolbar.showCloseButton == true, onConfigure: () => {
|
|
100
103
|
const customToolbarConfiguredInfo = {
|
|
101
104
|
adaptableApi: api,
|
|
@@ -13,9 +13,9 @@ const PinnedDashboard = (props) => {
|
|
|
13
13
|
return React.createElement(React.Fragment, null);
|
|
14
14
|
}
|
|
15
15
|
return (React.createElement(rebass_1.Flex, { p: 1, className: "ab-Dashboard__pinned-content" }, pinnedToolbars.map((toolbar, index) => {
|
|
16
|
-
return (React.createElement(rebass_1.Box, { mr: 2, mb: 1, className: `ab-Dashboard__pinned-container ab-Dashboard__pinned-container--${toolbar}` },
|
|
16
|
+
return (React.createElement(rebass_1.Box, { key: index, mr: 2, mb: 1, className: `ab-Dashboard__pinned-container ab-Dashboard__pinned-container--${toolbar}` },
|
|
17
17
|
React.createElement(rebass_1.Box, { className: "ab-Dashboard__toolbar-content" },
|
|
18
|
-
React.createElement(DashboardToolbarFactory_1.DashboardToolbarFactory, {
|
|
18
|
+
React.createElement(DashboardToolbarFactory_1.DashboardToolbarFactory, { toolbarName: toolbar }))));
|
|
19
19
|
})));
|
|
20
20
|
};
|
|
21
21
|
exports.PinnedDashboard = PinnedDashboard;
|
|
@@ -86,7 +86,7 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
const renderTextInput = () => {
|
|
89
|
-
return this.props.viewType === 'Toolbar' ? (React.createElement(FieldWrap_1.default, { marginRight: 1, width:
|
|
89
|
+
return this.props.viewType === 'Toolbar' ? (React.createElement(FieldWrap_1.default, { marginRight: 1, width: 500 },
|
|
90
90
|
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.api.queryApi.expandCurrentQuery(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
91
91
|
React.createElement(Input_1.default, { type: "text", "data-name": "query-input", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
92
92
|
isExpressionValid ? (React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => this.runQuery(), tooltip: '', accessLevel: 'Full', variant: "text", tone: "neutral", disabled: this.state.expression == '' || this.state.expression == this.props.CurrentQuery, marginRight: 1 })) : (React.createElement(ButtonInvalid_1.ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Query", marginRight: 1 })),
|
|
@@ -9,6 +9,7 @@ const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFo
|
|
|
9
9
|
const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
|
|
10
10
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
11
11
|
const QuickSearchInput = (props) => {
|
|
12
|
+
var _a;
|
|
12
13
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
13
14
|
const QuickSearchText = (0, react_redux_1.useSelector)((state) => state.QuickSearch.QuickSearchText);
|
|
14
15
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
@@ -17,6 +18,6 @@ const QuickSearchInput = (props) => {
|
|
|
17
18
|
QuickSearchText,
|
|
18
19
|
onRunQuickSearch,
|
|
19
20
|
});
|
|
20
|
-
return (react_1.default.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", autoFocus: props.autoFocus, placeholder: adaptable.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: props.className, value: searchText, OnTextChange: search, style: { height: '100%' }, inputStyle: { width: '10rem' } }));
|
|
21
|
+
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: (_a = props.width) !== null && _a !== void 0 ? _a : '10rem' } }));
|
|
21
22
|
};
|
|
22
23
|
exports.QuickSearchInput = QuickSearchInput;
|
|
@@ -6,6 +6,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const QuickSearchInput_1 = require("./QuickSearchInput");
|
|
7
7
|
const QuickSearchViewPanelControl = (props) => {
|
|
8
8
|
let elementType = props.viewType === 'ToolPanel' ? 'DashboardToolbar' : 'ToolPanel';
|
|
9
|
-
return React.createElement(QuickSearchInput_1.QuickSearchInput, { className: `ab-${elementType}__QuickSearch__text
|
|
9
|
+
return React.createElement(QuickSearchInput_1.QuickSearchInput, { className: `ab-${elementType}__QuickSearch__text`, width: '15rem' });
|
|
10
10
|
};
|
|
11
11
|
exports.QuickSearchViewPanelControl = QuickSearchViewPanelControl;
|
|
@@ -3503,17 +3503,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3503
3503
|
name: string;
|
|
3504
3504
|
kind: string;
|
|
3505
3505
|
desc: string;
|
|
3506
|
-
props:
|
|
3507
|
-
name: string;
|
|
3508
|
-
kind: string;
|
|
3509
|
-
desc: string;
|
|
3510
|
-
isOpt?: undefined;
|
|
3511
|
-
} | {
|
|
3506
|
+
props: {
|
|
3512
3507
|
name: string;
|
|
3513
3508
|
kind: string;
|
|
3514
3509
|
desc: string;
|
|
3515
|
-
|
|
3516
|
-
})[];
|
|
3510
|
+
}[];
|
|
3517
3511
|
};
|
|
3518
3512
|
IAdaptableNoCodeWizard: {
|
|
3519
3513
|
name: string;
|