@adaptabletools/adaptable 11.0.5 → 11.0.8
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 -2
- package/bundle.cjs.js +110 -110
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +2 -2
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/BulkUpdateApi.d.ts +1 -1
- package/src/Api/CalculatedColumnApi.d.ts +1 -1
- package/src/Api/CellSummaryApi.d.ts +1 -1
- package/src/Api/ConditionalStyleApi.d.ts +1 -1
- package/src/Api/CustomSortApi.d.ts +1 -1
- package/src/Api/DashboardApi.d.ts +1 -1
- package/src/Api/DataSourceApi.d.ts +1 -1
- package/src/Api/ExportApi.d.ts +7 -2
- package/src/Api/FormatColumnApi.d.ts +1 -1
- package/src/Api/FreeTextColumnApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -1
- package/src/Api/Implementation/ExportApiImpl.js +14 -1
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
- package/src/Api/Implementation/LayoutApiImpl.js +12 -0
- package/src/Api/LayoutApi.d.ts +14 -2
- package/src/Api/PlusMinusApi.d.ts +1 -1
- package/src/Api/QueryApi.d.ts +1 -1
- package/src/Api/QuickSearchApi.d.ts +1 -1
- package/src/Api/ScheduleApi.d.ts +1 -1
- package/src/Api/ShortcutApi.d.ts +1 -1
- package/src/Api/SmartEditApi.d.ts +1 -1
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +8 -8
- package/src/agGrid/PercentBarRenderer.js +2 -1
- package/src/agGrid/agGridHelper.js +4 -0
- package/src/metamodel/adaptable.metamodel.js +46 -22
- package/src/types.d.ts +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": "11.0.
|
|
3
|
+
"version": "11.0.8",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1647511077741;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -35,9 +35,9 @@ export interface GeneralOptions {
|
|
|
35
35
|
*/
|
|
36
36
|
showGroupingTotalsAsHeader?: boolean;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Order Grouped Column automatically, deriving from Adaptable State if available (CustomSort or Layout ColumnSort)
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* The default group order will be derived from (in the specified priority): 1. an active CustomSort, 2. the defined ColDef Comparator, 3. current Layout ColumnSort or 4. alphanumerically
|
|
41
41
|
* @defaultValue true
|
|
42
42
|
* @gridInfoItem
|
|
43
43
|
*/
|
package/src/Api/AlertApi.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export interface AlertApi {
|
|
|
131
131
|
*/
|
|
132
132
|
showAlertError(alertHeader: string, alertMessage: string): void;
|
|
133
133
|
/**
|
|
134
|
-
* Opens
|
|
134
|
+
* Opens Settings Panel with Alert section selected and visible
|
|
135
135
|
*/
|
|
136
136
|
showAlertPopup(): void;
|
|
137
137
|
/**
|
|
@@ -48,7 +48,7 @@ export interface CalculatedColumnApi {
|
|
|
48
48
|
*/
|
|
49
49
|
deleteCalculatedColumn(calcColumn: string): void;
|
|
50
50
|
/**
|
|
51
|
-
* Opens Calculated Column
|
|
51
|
+
* Opens Settings Panel with Calculated Column section selected and visible
|
|
52
52
|
*/
|
|
53
53
|
showCalculatedColumnPopup(): void;
|
|
54
54
|
/**
|
|
@@ -16,7 +16,7 @@ export interface CellSummaryApi {
|
|
|
16
16
|
*/
|
|
17
17
|
getCellSummaryOperationDefinitions(): CellSummaryOperation[];
|
|
18
18
|
/**
|
|
19
|
-
* Opens Cell Summary
|
|
19
|
+
* Opens Settings Panel with Cell Summary section selected and visible
|
|
20
20
|
*/
|
|
21
21
|
showCellSummaryPopup(): void;
|
|
22
22
|
}
|
|
@@ -30,7 +30,7 @@ export interface ConditionalStyleApi {
|
|
|
30
30
|
*/
|
|
31
31
|
getAllSuspendedConditionalStyle(): ConditionalStyle[];
|
|
32
32
|
/**
|
|
33
|
-
* Opens Conditional Style
|
|
33
|
+
* Opens Settings Panel with Conditional Style section selected and visible
|
|
34
34
|
*/
|
|
35
35
|
showConditionalStylePopup(): void;
|
|
36
36
|
/**
|
|
@@ -119,7 +119,7 @@ export interface DashboardApi {
|
|
|
119
119
|
*/
|
|
120
120
|
isToolbarVisible(toolbar: AdaptableDashboardToolbar | string): boolean;
|
|
121
121
|
/**
|
|
122
|
-
* Opens
|
|
122
|
+
* Opens Settings Panel with Dashboard section selected and visible
|
|
123
123
|
*/
|
|
124
124
|
showDashboardPopup(): void;
|
|
125
125
|
/**
|
package/src/Api/ExportApi.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export interface ExportApi {
|
|
|
77
77
|
*/
|
|
78
78
|
exportDataToExcel(reportData: ReportData, fileName: string): void;
|
|
79
79
|
/**
|
|
80
|
-
* Opens Export
|
|
80
|
+
* Opens Settings Panel with Export section selected and visible
|
|
81
81
|
*/
|
|
82
82
|
showExportPopup(): void;
|
|
83
83
|
/**
|
|
@@ -121,5 +121,10 @@ export interface ExportApi {
|
|
|
121
121
|
* Runs the report function of the CustomReport with the given reportName
|
|
122
122
|
* @param reportName custom report name
|
|
123
123
|
*/
|
|
124
|
-
runCustomReport(reportName: string): ReportData;
|
|
124
|
+
runCustomReport(reportName: string): ReportData | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Returns the ReportData for the Report with the given name
|
|
127
|
+
* @param reportName - the name of the report
|
|
128
|
+
*/
|
|
129
|
+
getReportDataForReport(reportName: string): ReportData | undefined;
|
|
125
130
|
}
|
|
@@ -99,7 +99,7 @@ export interface FormatColumnApi {
|
|
|
99
99
|
*/
|
|
100
100
|
applyFormatColumnDisplayFormats(): void;
|
|
101
101
|
/**
|
|
102
|
-
* Opens
|
|
102
|
+
* Opens Settings Panel with Format Column section selected and visible
|
|
103
103
|
*/
|
|
104
104
|
showFormatColumnPopup(): void;
|
|
105
105
|
/**
|
|
@@ -65,7 +65,7 @@ export interface FreeTextColumnApi {
|
|
|
65
65
|
*/
|
|
66
66
|
checkFreeTextColumnForDataChange(dataChangedInfo: DataChangedInfo): void;
|
|
67
67
|
/**
|
|
68
|
-
* Opens
|
|
68
|
+
* Opens Settings Panel with Free Text Column section selected and visible
|
|
69
69
|
*/
|
|
70
70
|
showFreeTextColumnPopup(): void;
|
|
71
71
|
/**
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -27,5 +27,6 @@ export declare class ExportApiImpl extends ApiBase implements ExportApi {
|
|
|
27
27
|
editReports(reports: Report[]): Report[];
|
|
28
28
|
isDataChangeInReport(dataChangedInfo: DataChangedInfo, report: Report): boolean;
|
|
29
29
|
exportVisualDataToExcel(): void;
|
|
30
|
-
runCustomReport(customReportName: string): ReportData;
|
|
30
|
+
runCustomReport(customReportName: string): ReportData | undefined;
|
|
31
|
+
getReportDataForReport(reportName: string): ReportData | undefined;
|
|
31
32
|
}
|
|
@@ -6,6 +6,7 @@ const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/Ex
|
|
|
6
6
|
const ApiBase_1 = require("./ApiBase");
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
8
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
9
|
+
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
9
10
|
class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
10
11
|
getExportState() {
|
|
11
12
|
return this.getAdaptableState().Export;
|
|
@@ -162,7 +163,19 @@ class ExportApiImpl extends ApiBase_1.ApiBase {
|
|
|
162
163
|
runCustomReport(customReportName) {
|
|
163
164
|
var _a;
|
|
164
165
|
const customReport = (_a = this.getExportOptions().customReports) === null || _a === void 0 ? void 0 : _a.find((cr) => cr.name == customReportName);
|
|
165
|
-
|
|
166
|
+
if (!customReport) {
|
|
167
|
+
LoggingHelper_1.LogAdaptableWarning(`Custom Report '${customReportName}' not found!`);
|
|
168
|
+
return undefined;
|
|
169
|
+
}
|
|
170
|
+
return customReport.onRunReport();
|
|
171
|
+
}
|
|
172
|
+
getReportDataForReport(reportName) {
|
|
173
|
+
const report = this.getReportByName(reportName);
|
|
174
|
+
if (!report) {
|
|
175
|
+
LoggingHelper_1.LogAdaptableWarning(`Report '${reportName}' not found!`);
|
|
176
|
+
return undefined;
|
|
177
|
+
}
|
|
178
|
+
return this.adaptable.api.internalApi.getReportService().getReportData(report);
|
|
166
179
|
}
|
|
167
180
|
}
|
|
168
181
|
exports.ExportApiImpl = ExportApiImpl;
|
|
@@ -2,6 +2,7 @@ import { ApiBase } from './ApiBase';
|
|
|
2
2
|
import { LayoutApi } from '../LayoutApi';
|
|
3
3
|
import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
5
|
+
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
5
6
|
export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
6
7
|
getLayoutState(): LayoutState;
|
|
7
8
|
shouldAutoSaveLayout: (layout?: Layout) => boolean;
|
|
@@ -12,6 +13,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
12
13
|
setLayout(layoutName: string): void;
|
|
13
14
|
fireLayoutChangedEvent(trigger: string, oldSate: LayoutState, newState: LayoutState): void;
|
|
14
15
|
getCurrentLayout(): Layout;
|
|
16
|
+
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
15
17
|
getCurrentLayoutName(): string;
|
|
16
18
|
getLayoutByName(layoutName: string): Layout | null;
|
|
17
19
|
getAllLayout(): Layout[];
|
|
@@ -30,5 +32,6 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
30
32
|
createDefaultLayoutIfNeeded(): Layout | null;
|
|
31
33
|
showChangeColumnCaption(column: AdaptableColumn): void;
|
|
32
34
|
showLayoutPopup(): void;
|
|
35
|
+
showLayoutEditor(): void;
|
|
33
36
|
isCurrentLayoutReadOnly(): boolean;
|
|
34
37
|
}
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const ApiBase_1 = require("./ApiBase");
|
|
8
|
+
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
8
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
9
10
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
10
11
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
@@ -69,6 +70,11 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
69
70
|
let layoutName = state.Layout.CurrentLayout;
|
|
70
71
|
return (this.getLayoutByName(layoutName) || ObjectFactory_1.default.CreateEmptyLayout({ Name: GeneralConstants_1.DEFAULT_LAYOUT }));
|
|
71
72
|
}
|
|
73
|
+
getCurrentLayoutColumnSort(columnId) {
|
|
74
|
+
var _a, _b, _c, _d;
|
|
75
|
+
const currentLayout = this.getCurrentLayout();
|
|
76
|
+
return ((_d = (_c = (_b = (_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.ColumnSorts) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (sort) => sort.ColumnId === columnId)) === null || _c === void 0 ? void 0 : _c.SortOrder) !== null && _d !== void 0 ? _d : null);
|
|
77
|
+
}
|
|
72
78
|
getCurrentLayoutName() {
|
|
73
79
|
return this.getAdaptableState().Layout.CurrentLayout;
|
|
74
80
|
}
|
|
@@ -243,6 +249,12 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
243
249
|
showLayoutPopup() {
|
|
244
250
|
this.showModulePopup(ModuleConstants.LayoutModuleId);
|
|
245
251
|
}
|
|
252
|
+
showLayoutEditor() {
|
|
253
|
+
this.dispatchAction(PopupRedux.PopupShowScreen(ModuleConstants.LayoutModuleId, 'LayoutPopup', {
|
|
254
|
+
action: 'Edit',
|
|
255
|
+
source: 'Other',
|
|
256
|
+
}));
|
|
257
|
+
}
|
|
246
258
|
isCurrentLayoutReadOnly() {
|
|
247
259
|
const currentLayout = this.getCurrentLayout();
|
|
248
260
|
if (currentLayout) {
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdaptableColumn } from '../../types';
|
|
1
|
+
import { AdaptableColumn, ColumnSort } from '../../types';
|
|
2
2
|
import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
|
|
3
3
|
/**
|
|
4
4
|
* Provides run-time access to the Layout Module and associated state
|
|
@@ -24,6 +24,11 @@ export interface LayoutApi {
|
|
|
24
24
|
* @returns layout
|
|
25
25
|
*/
|
|
26
26
|
getCurrentLayout(): Layout;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves the sort order of a column from the current layout
|
|
29
|
+
* @param columnId Column id
|
|
30
|
+
*/
|
|
31
|
+
getCurrentLayoutColumnSort(columnId: string): ColumnSort['SortOrder'] | null;
|
|
27
32
|
/**
|
|
28
33
|
* Retrieves map with visible columns in current Layout
|
|
29
34
|
*/
|
|
@@ -119,15 +124,22 @@ export interface LayoutApi {
|
|
|
119
124
|
*/
|
|
120
125
|
createDefaultLayoutIfNeeded(): Layout | null;
|
|
121
126
|
/**
|
|
122
|
-
* Opens Layout
|
|
127
|
+
* Opens Settings Panel with Layout section selected and visible
|
|
123
128
|
*/
|
|
124
129
|
showLayoutPopup(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Opens the Layout Editor for the current Layout
|
|
132
|
+
*/
|
|
133
|
+
showLayoutEditor(): void;
|
|
125
134
|
/**
|
|
126
135
|
* Sets a new Caption / Header for a Column (this Layout only)
|
|
127
136
|
* @param columnId Column to Update
|
|
128
137
|
* @param caption New Caption to display
|
|
129
138
|
*/
|
|
130
139
|
setColumnCaption(columnId: string, caption: string): void;
|
|
140
|
+
/**
|
|
141
|
+
* Specifies where Current Layout is editable
|
|
142
|
+
*/
|
|
131
143
|
isCurrentLayoutReadOnly(): boolean;
|
|
132
144
|
/**
|
|
133
145
|
* Opens change column caption popup
|
package/src/Api/QueryApi.d.ts
CHANGED
package/src/Api/ScheduleApi.d.ts
CHANGED
|
@@ -247,7 +247,7 @@ export interface ScheduleApi {
|
|
|
247
247
|
*/
|
|
248
248
|
applySchedule(schedule: BaseSchedule, scheduleType: 'Report' | 'ipushpull' | 'Glue42' | 'Reminder' | 'OpenFin'): void;
|
|
249
249
|
/**
|
|
250
|
-
* Opens Schedule
|
|
250
|
+
* Opens Settings Panel with Schedule section selected and visible
|
|
251
251
|
*/
|
|
252
252
|
showSchedulePopup(): void;
|
|
253
253
|
}
|
package/src/Api/ShortcutApi.d.ts
CHANGED
package/src/Api/ThemeApi.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = void 0;
|
|
4
4
|
exports.HOST_URL_DOCS = 'https://docs.adaptabletools.com';
|
|
5
5
|
//export const HOST_URL_DOCS = 'http://localhost:3000';
|
|
6
|
-
exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/
|
|
7
|
-
exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
8
|
-
exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
9
|
-
exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
10
|
-
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
11
|
-
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/
|
|
12
|
-
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/
|
|
13
|
-
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/
|
|
6
|
+
exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/guide/ui-expression-editor`;
|
|
7
|
+
exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-boolean`;
|
|
8
|
+
exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-scalar`;
|
|
9
|
+
exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-observable`;
|
|
10
|
+
exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation#aggregated-boolean-expressions`;
|
|
11
|
+
exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation#aggregated-scalar-expressions`;
|
|
12
|
+
exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-predicate`;
|
|
13
|
+
exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/dev-guide-tutorial-primary-key`;
|
|
14
14
|
exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/licensing`;
|
|
@@ -516,6 +516,10 @@ class agGridHelper {
|
|
|
516
516
|
if (definedColumnComparator) {
|
|
517
517
|
return definedColumnComparator(nodeA.key, nodeB.key);
|
|
518
518
|
}
|
|
519
|
+
const sortOder = adaptable.api.layoutApi.getCurrentLayoutColumnSort(firstGroupedColumn.columnId);
|
|
520
|
+
if (sortOder === 'Desc') {
|
|
521
|
+
return nodeA.key > nodeB.key ? -1 : 1;
|
|
522
|
+
}
|
|
519
523
|
}
|
|
520
524
|
// if no comparator available, just sort alphanumerically
|
|
521
525
|
if (nodeA.key == nodeB.key) {
|