@adaptabletools/adaptable-cjs 21.0.0-canary.0 → 21.0.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/package.json +1 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +32 -1
- package/src/Api/Implementation/LayoutApiImpl.js +6 -6
- package/src/Api/Internal/LayoutInternalApi.d.ts +5 -0
- package/src/Api/Internal/LayoutInternalApi.js +43 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -0
- package/src/Utilities/ObjectFactory.d.ts +7 -3
- package/src/Utilities/ObjectFactory.js +27 -18
- package/src/View/Layout/Wizard/LayoutWizard.js +5 -7
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +39 -27
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "21.0.0-canary.
|
|
3
|
+
"version": "21.0.0-canary.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",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Layout } from '../AdaptableState/LayoutState';
|
|
1
|
+
import { Layout, PivotLayout, TableLayout } from '../AdaptableState/LayoutState';
|
|
2
2
|
import { AdaptableObjectTag } from '../AdaptableState/Common/AdaptableObject';
|
|
3
3
|
import { BaseContext, LayoutExtensionModule, LayoutExtensionObject } from '../../types';
|
|
4
4
|
/**
|
|
@@ -17,6 +17,10 @@ export interface LayoutOptions {
|
|
|
17
17
|
* Columns to display in Table that opens when viewing Pivot Cell contents
|
|
18
18
|
*/
|
|
19
19
|
pivotPreviewColumns?: string[] | ((context: PivotPreviewColumnsContext) => string[]);
|
|
20
|
+
/**
|
|
21
|
+
* Default properties to apply when creating a new Layout (Table or Pivot)
|
|
22
|
+
*/
|
|
23
|
+
defaultLayoutProperties?: DefaultLayoutProperties | ((context: DefaultLayoutPropertiesContext) => DefaultTableLayoutProperties | DefaultPivotLayoutProperties);
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Options for managing Tags in Layouts (used to enhance Layouts)
|
|
@@ -93,3 +97,30 @@ export interface PivotPreviewColumnsContext extends BaseContext {
|
|
|
93
97
|
*/
|
|
94
98
|
columnId: string;
|
|
95
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Default properties to apply when creating a new Table Layout
|
|
102
|
+
*/
|
|
103
|
+
export type DefaultTableLayoutProperties = Partial<Omit<TableLayout, 'Name'>>;
|
|
104
|
+
/**
|
|
105
|
+
* Default properties to apply when creating a new Pivot Layout
|
|
106
|
+
*/
|
|
107
|
+
export type DefaultPivotLayoutProperties = Partial<Omit<PivotLayout, 'Name'>>;
|
|
108
|
+
/**
|
|
109
|
+
* Default properties to apply when creating a new Layout (Table or Pivot)
|
|
110
|
+
*/
|
|
111
|
+
export interface DefaultLayoutProperties {
|
|
112
|
+
/**
|
|
113
|
+
* Default properties to apply when creating a new Table Layout
|
|
114
|
+
*/
|
|
115
|
+
tableLayout?: DefaultTableLayoutProperties;
|
|
116
|
+
/**
|
|
117
|
+
* Default properties to apply when creating a new Pivot Layout
|
|
118
|
+
*/
|
|
119
|
+
pivotLayout?: DefaultPivotLayoutProperties;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Context for `LayoutOptions.defaultLayoutProperties` function
|
|
123
|
+
*/
|
|
124
|
+
export interface DefaultLayoutPropertiesContext extends BaseContext {
|
|
125
|
+
layoutType: 'table' | 'pivot';
|
|
126
|
+
}
|
|
@@ -6,8 +6,6 @@ const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/La
|
|
|
6
6
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
7
7
|
const ApiBase_1 = require("./ApiBase");
|
|
8
8
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
9
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
10
|
-
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
11
9
|
const Uuid_1 = require("../../AdaptableState/Uuid");
|
|
12
10
|
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
13
11
|
const LayoutInternalApi_1 = require("../Internal/LayoutInternalApi");
|
|
@@ -279,7 +277,7 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
279
277
|
this.logError("Cannot create layout with the Name: '" + layoutToCreate.Name + "' as it already exists");
|
|
280
278
|
return false;
|
|
281
279
|
}
|
|
282
|
-
const newLayout =
|
|
280
|
+
const newLayout = this.internalApi.buildInitialLayout(layoutToCreate);
|
|
283
281
|
this.addUidToAdaptableObject(newLayout);
|
|
284
282
|
this.dispatchAction(LayoutRedux.LayoutAdd(newLayout));
|
|
285
283
|
return newLayout;
|
|
@@ -296,9 +294,11 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
296
294
|
this.logError("Cannot clone layout with Name: '" + layoutName + "' as other Layout does not exist");
|
|
297
295
|
return false;
|
|
298
296
|
}
|
|
299
|
-
const newLayout =
|
|
300
|
-
|
|
301
|
-
|
|
297
|
+
const newLayout = {
|
|
298
|
+
...this.internalApi.cloneLayout(layoutToClone),
|
|
299
|
+
Name: layoutName,
|
|
300
|
+
Uuid: (0, Uuid_1.createUuid)(),
|
|
301
|
+
};
|
|
302
302
|
this.dispatchAction(LayoutRedux.LayoutAdd(newLayout));
|
|
303
303
|
return this.getLayoutById(newLayout.Uuid);
|
|
304
304
|
}
|
|
@@ -32,4 +32,9 @@ export declare class LayoutInternalApi extends ApiBase {
|
|
|
32
32
|
setupRowSummaries(): void;
|
|
33
33
|
refreshLayout(): void;
|
|
34
34
|
getChangedColumnSorts(oldSorts: LayoutBase['ColumnSorts'], newSorts: LayoutBase['ColumnSorts']): string[];
|
|
35
|
+
buildInitialLayout(providedLayout: Partial<Layout> & {
|
|
36
|
+
Name: string;
|
|
37
|
+
}, type?: 'table' | 'pivot'): Layout;
|
|
38
|
+
private getDefaultLayoutProperties;
|
|
39
|
+
cloneLayout(layoutToClone: Layout): Omit<Layout, 'Name'>;
|
|
35
40
|
}
|
|
@@ -6,6 +6,9 @@ const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
|
|
|
6
6
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
7
7
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
8
8
|
const LayoutHelpers_1 = require("../Implementation/LayoutHelpers");
|
|
9
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
10
|
+
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
11
|
+
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
9
12
|
class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
10
13
|
getNormalizedLayout(layout) {
|
|
11
14
|
return (0, LayoutHelpers_1.normalizeLayout)(layout);
|
|
@@ -210,5 +213,45 @@ class LayoutInternalApi extends ApiBase_1.ApiBase {
|
|
|
210
213
|
});
|
|
211
214
|
return changedColumnIds;
|
|
212
215
|
}
|
|
216
|
+
buildInitialLayout(providedLayout, type) {
|
|
217
|
+
const layoutType = type || ((0, LayoutHelpers_1.isPivotLayout)(providedLayout) ? 'pivot' : 'table');
|
|
218
|
+
const providedTableLayout = providedLayout;
|
|
219
|
+
const providedPivotLayout = providedLayout;
|
|
220
|
+
const initialEmptyLayout = layoutType === 'pivot'
|
|
221
|
+
? ObjectFactory_1.default.CreateEmptyPivotLayout({ ...providedPivotLayout })
|
|
222
|
+
: ObjectFactory_1.default.CreateEmptyTableLayout({ ...providedTableLayout });
|
|
223
|
+
const defaultLayoutProperties = this.getDefaultLayoutProperties(layoutType);
|
|
224
|
+
const initialLayout = {
|
|
225
|
+
...initialEmptyLayout,
|
|
226
|
+
...defaultLayoutProperties,
|
|
227
|
+
};
|
|
228
|
+
return initialLayout;
|
|
229
|
+
}
|
|
230
|
+
getDefaultLayoutProperties(layoutType) {
|
|
231
|
+
const defaultLayoutPropertiesOption = this.getLayoutOptions().defaultLayoutProperties;
|
|
232
|
+
if (typeof defaultLayoutPropertiesOption === 'object') {
|
|
233
|
+
const initialProps = layoutType === 'table'
|
|
234
|
+
? defaultLayoutPropertiesOption.tableLayout
|
|
235
|
+
: defaultLayoutPropertiesOption.pivotLayout;
|
|
236
|
+
return initialProps;
|
|
237
|
+
}
|
|
238
|
+
if (typeof defaultLayoutPropertiesOption === 'function') {
|
|
239
|
+
const context = {
|
|
240
|
+
layoutType,
|
|
241
|
+
...this.getAdaptableInternalApi().buildBaseContext(),
|
|
242
|
+
};
|
|
243
|
+
return defaultLayoutPropertiesOption(context);
|
|
244
|
+
}
|
|
245
|
+
return {};
|
|
246
|
+
}
|
|
247
|
+
cloneLayout(layoutToClone) {
|
|
248
|
+
let clonedLayout = Helper_1.default.cloneObject(layoutToClone);
|
|
249
|
+
let result = {
|
|
250
|
+
...this.buildInitialLayout(clonedLayout),
|
|
251
|
+
};
|
|
252
|
+
result = AdaptableHelper_1.default.removeAdaptableObjectPrimitivesInlineDeep(result);
|
|
253
|
+
delete result.Name;
|
|
254
|
+
return result;
|
|
255
|
+
}
|
|
213
256
|
}
|
|
214
257
|
exports.LayoutInternalApi = LayoutInternalApi;
|
|
@@ -14,6 +14,7 @@ export declare const AdaptableHelper: {
|
|
|
14
14
|
addAdaptableObjectPrimitives: typeof addAdaptableObjectPrimitives;
|
|
15
15
|
removeAdaptableObjectPrimitives: typeof removeAdaptableObjectPrimitives;
|
|
16
16
|
removeAdaptableObjectPrimitivesInline: typeof removeAdaptableObjectPrimitivesInline;
|
|
17
|
+
removeAdaptableObjectPrimitivesInlineDeep: typeof removeAdaptableObjectPrimitivesInlineDeep;
|
|
17
18
|
isAdaptableObject: typeof isAdaptableObject;
|
|
18
19
|
};
|
|
19
20
|
export default AdaptableHelper;
|
|
@@ -117,6 +117,7 @@ exports.AdaptableHelper = {
|
|
|
117
117
|
addAdaptableObjectPrimitives,
|
|
118
118
|
removeAdaptableObjectPrimitives,
|
|
119
119
|
removeAdaptableObjectPrimitivesInline,
|
|
120
|
+
removeAdaptableObjectPrimitivesInlineDeep,
|
|
120
121
|
isAdaptableObject,
|
|
121
122
|
};
|
|
122
123
|
exports.default = exports.AdaptableHelper;
|
|
@@ -23,7 +23,7 @@ import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
|
|
|
23
23
|
import { CellSummmaryInfo } from '../AdaptableState/Common/CellSummary';
|
|
24
24
|
import { AdaptableTheme, ChartDefinition, ColumnFilter, CommentThread, CustomDisplayFormatterContext, FlashingCellDefinition, RowDataChangedInfo, SpecialColumnSettings, SystemFilterPredicateId } from '../types';
|
|
25
25
|
import { IRowNode } from 'ag-grid-enterprise';
|
|
26
|
-
import { AdaptableApi, AdaptableComment, BadgeStyleDefinition, CellAddress, NamedQuery, PivotLayout } from '../../types';
|
|
26
|
+
import { AdaptableApi, AdaptableComment, BadgeStyleDefinition, CellAddress, NamedQuery, PivotLayout, TableLayout } from '../../types';
|
|
27
27
|
import { ToastOptions } from '../components/Toastify';
|
|
28
28
|
import { StyledColumn } from '../AdaptableState/StyledColumnState';
|
|
29
29
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
@@ -51,12 +51,15 @@ export declare function CreateEmptySchedule(): Schedule;
|
|
|
51
51
|
export declare function CreateEmptyShortcut(): Shortcut;
|
|
52
52
|
export declare function CreateEmptyFormatColumn(): FormatColumn;
|
|
53
53
|
export declare function CreateEmptyFreeTextColumn(defaultSpecialColumnSettings: Partial<SpecialColumnSettings>): FreeTextColumn;
|
|
54
|
-
export declare function CreateEmptyPivotLayout(
|
|
54
|
+
export declare function CreateEmptyPivotLayout(pivotLayout?: Partial<PivotLayout> & {
|
|
55
55
|
Name: string;
|
|
56
56
|
}): PivotLayout;
|
|
57
|
+
export declare function CreateEmptyTableLayout(tableLayout?: Partial<TableLayout> & {
|
|
58
|
+
Name: string;
|
|
59
|
+
}): TableLayout;
|
|
57
60
|
export declare function CreateEmptyLayout(layout?: Partial<Layout> & {
|
|
58
61
|
Name: string;
|
|
59
|
-
}
|
|
62
|
+
}): Layout;
|
|
60
63
|
export declare function CreateEmptyStyle(): AdaptableStyle;
|
|
61
64
|
export declare function CreateSystemStatusMessageInfo(message: string, type: AdaptableMessageType, furtherInfo?: string): SystemStatusMessageInfo;
|
|
62
65
|
export declare function CreateEmptyCellSummmary(): CellSummmaryInfo;
|
|
@@ -100,6 +103,7 @@ export declare const ObjectFactory: {
|
|
|
100
103
|
CreateEmptyFreeTextColumn: typeof CreateEmptyFreeTextColumn;
|
|
101
104
|
CreateEmptyLayout: typeof CreateEmptyLayout;
|
|
102
105
|
CreateEmptyPivotLayout: typeof CreateEmptyPivotLayout;
|
|
106
|
+
CreateEmptyTableLayout: typeof CreateEmptyTableLayout;
|
|
103
107
|
CreateColumnFilter: typeof CreateColumnFilter;
|
|
104
108
|
CreateEmptyStyle: typeof CreateEmptyStyle;
|
|
105
109
|
CreateEmptyCellSummmary: typeof CreateEmptyCellSummmary;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateEmptyCommentThread = exports.CreateEmptyTheme = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateDefaultStyledColumnBadge = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyPivotLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateAdaptableComment = exports.CreateEmptyCustomSort = void 0;
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateEmptyCommentThread = exports.CreateEmptyTheme = exports.CreateCustomDisplayFormatterContext = exports.CreateEmptyChartDefinition = exports.CreateDefaultStyledColumnBadge = exports.CreateEmptyStyledColumn = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyTableLayout = exports.CreateEmptyPivotLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateAdaptableComment = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../AdaptableState/Common/Enums");
|
|
5
5
|
const Uuid_1 = require("../AdaptableState/Uuid");
|
|
6
6
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
@@ -274,37 +274,45 @@ function CreateEmptyFreeTextColumn(defaultSpecialColumnSettings) {
|
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
exports.CreateEmptyFreeTextColumn = CreateEmptyFreeTextColumn;
|
|
277
|
-
function CreateEmptyPivotLayout(
|
|
277
|
+
function CreateEmptyPivotLayout(pivotLayout) {
|
|
278
278
|
const result = {
|
|
279
|
-
|
|
280
|
-
ColumnSorts: layout.ColumnSorts || [],
|
|
281
|
-
ColumnFilters: layout.ColumnFilters || [],
|
|
279
|
+
...pivotLayout,
|
|
282
280
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
281
|
+
ColumnSizing: pivotLayout.ColumnSizing || {},
|
|
282
|
+
ColumnHeaders: pivotLayout.ColumnHeaders || {},
|
|
283
|
+
ColumnPinning: pivotLayout.ColumnPinning || {},
|
|
284
|
+
ColumnSorts: pivotLayout.ColumnSorts || [],
|
|
285
|
+
ColumnFilters: pivotLayout.ColumnFilters || [],
|
|
286
|
+
PivotColumns: pivotLayout.PivotColumns || [],
|
|
287
|
+
PivotAggregationColumns: pivotLayout.PivotAggregationColumns || [],
|
|
288
|
+
PivotGroupedColumns: pivotLayout.PivotGroupedColumns || [],
|
|
287
289
|
};
|
|
288
290
|
return result;
|
|
289
291
|
}
|
|
290
292
|
exports.CreateEmptyPivotLayout = CreateEmptyPivotLayout;
|
|
291
|
-
function
|
|
292
|
-
if ((0, LayoutHelpers_1.isPivotLayout)(layout)) {
|
|
293
|
-
return CreateEmptyPivotLayout(layout);
|
|
294
|
-
}
|
|
295
|
-
const tableLayout = layout;
|
|
293
|
+
function CreateEmptyTableLayout(tableLayout) {
|
|
296
294
|
const result = {
|
|
297
295
|
...tableLayout,
|
|
298
296
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
299
|
-
|
|
297
|
+
ColumnSizing: tableLayout.ColumnSizing || {},
|
|
298
|
+
ColumnHeaders: tableLayout.ColumnHeaders || {},
|
|
299
|
+
ColumnPinning: tableLayout.ColumnPinning || {},
|
|
300
300
|
ColumnSorts: tableLayout.ColumnSorts || [],
|
|
301
301
|
ColumnFilters: tableLayout.ColumnFilters || [],
|
|
302
|
-
|
|
303
|
-
RowGroupedColumns: tableLayout.RowGroupedColumns ||
|
|
304
|
-
(adaptableColumns ? adaptableColumns.filter((c) => c.isGrouped).map((c) => c.columnId) : []),
|
|
302
|
+
TableColumns: tableLayout.TableColumns || [],
|
|
303
|
+
RowGroupedColumns: tableLayout.RowGroupedColumns || [],
|
|
305
304
|
};
|
|
306
305
|
return result;
|
|
307
306
|
}
|
|
307
|
+
exports.CreateEmptyTableLayout = CreateEmptyTableLayout;
|
|
308
|
+
function CreateEmptyLayout(layout) {
|
|
309
|
+
if ((0, LayoutHelpers_1.isPivotLayout)(layout)) {
|
|
310
|
+
return CreateEmptyPivotLayout(layout);
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
return CreateEmptyTableLayout(layout);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
308
316
|
exports.CreateEmptyLayout = CreateEmptyLayout;
|
|
309
317
|
function CreateEmptyStyle() {
|
|
310
318
|
return {
|
|
@@ -485,6 +493,7 @@ exports.ObjectFactory = {
|
|
|
485
493
|
CreateEmptyFreeTextColumn,
|
|
486
494
|
CreateEmptyLayout,
|
|
487
495
|
CreateEmptyPivotLayout,
|
|
496
|
+
CreateEmptyTableLayout,
|
|
488
497
|
CreateColumnFilter,
|
|
489
498
|
CreateEmptyStyle,
|
|
490
499
|
CreateEmptyCellSummmary,
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const LayoutRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/LayoutRedux"));
|
|
7
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
9
8
|
const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
10
9
|
const SettingsSection_1 = require("./sections/SettingsSection");
|
|
11
10
|
const rebass_1 = require("rebass");
|
|
@@ -33,17 +32,17 @@ const LayoutWizard = (props) => {
|
|
|
33
32
|
if (initialLayout) {
|
|
34
33
|
preparedLayout = (0, Helper_1.cloneObject)(initialLayout);
|
|
35
34
|
if (props?.popupParams?.action === 'Clone') {
|
|
36
|
-
preparedLayout
|
|
37
|
-
|
|
35
|
+
preparedLayout = {
|
|
36
|
+
...adaptable.api.layoutApi.internalApi.cloneLayout(preparedLayout),
|
|
37
|
+
Name: '',
|
|
38
|
+
};
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
else {
|
|
41
42
|
const shouldCreatePivot = props.popupParams?.config?.layoutType === 'pivot' ||
|
|
42
43
|
props.abObjectType?.name?.toLowerCase().includes('pivot') ||
|
|
43
44
|
false;
|
|
44
|
-
preparedLayout = shouldCreatePivot
|
|
45
|
-
? ObjectFactory_1.default.CreateEmptyPivotLayout({ Name: '' })
|
|
46
|
-
: ObjectFactory_1.default.CreateEmptyLayout({ Name: '' });
|
|
45
|
+
preparedLayout = adaptable.api.layoutApi.internalApi.buildInitialLayout({ Name: '' }, shouldCreatePivot ? 'pivot' : 'table');
|
|
47
46
|
}
|
|
48
47
|
if (preparedLayout.SuppressAggFuncInHeader === undefined) {
|
|
49
48
|
preparedLayout.SuppressAggFuncInHeader =
|
|
@@ -66,7 +65,6 @@ const LayoutWizard = (props) => {
|
|
|
66
65
|
break;
|
|
67
66
|
case 'Clone':
|
|
68
67
|
const clonedLayout = { ...layout };
|
|
69
|
-
delete clonedLayout.Uuid;
|
|
70
68
|
dispatch(LayoutRedux.LayoutAdd(clonedLayout));
|
|
71
69
|
dispatch(LayoutRedux.LayoutSelect(clonedLayout.Name));
|
|
72
70
|
break;
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "21.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1756456094068 || Date.now(),
|
|
6
|
+
VERSION: "21.0.0-canary.1" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -2408,22 +2408,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2408
2408
|
ref?: undefined;
|
|
2409
2409
|
})[];
|
|
2410
2410
|
};
|
|
2411
|
-
CustomEditColumnValueInfo: {
|
|
2412
|
-
name: string;
|
|
2413
|
-
kind: string;
|
|
2414
|
-
desc: string;
|
|
2415
|
-
props: ({
|
|
2416
|
-
name: string;
|
|
2417
|
-
kind: string;
|
|
2418
|
-
desc: string;
|
|
2419
|
-
isOpt: boolean;
|
|
2420
|
-
} | {
|
|
2421
|
-
name: string;
|
|
2422
|
-
kind: string;
|
|
2423
|
-
desc: string;
|
|
2424
|
-
isOpt?: undefined;
|
|
2425
|
-
})[];
|
|
2426
|
-
};
|
|
2427
2411
|
CustomEditColumnValuesContext: {
|
|
2428
2412
|
name: string;
|
|
2429
2413
|
kind: string;
|
|
@@ -3024,6 +3008,28 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3024
3008
|
kind: string;
|
|
3025
3009
|
desc: string;
|
|
3026
3010
|
};
|
|
3011
|
+
DefaultLayoutProperties: {
|
|
3012
|
+
name: string;
|
|
3013
|
+
kind: string;
|
|
3014
|
+
desc: string;
|
|
3015
|
+
props: {
|
|
3016
|
+
name: string;
|
|
3017
|
+
kind: string;
|
|
3018
|
+
desc: string;
|
|
3019
|
+
isOpt: boolean;
|
|
3020
|
+
ref: string;
|
|
3021
|
+
}[];
|
|
3022
|
+
};
|
|
3023
|
+
DefaultLayoutPropertiesContext: {
|
|
3024
|
+
name: string;
|
|
3025
|
+
kind: string;
|
|
3026
|
+
desc: string;
|
|
3027
|
+
};
|
|
3028
|
+
DefaultPivotLayoutProperties: {
|
|
3029
|
+
name: string;
|
|
3030
|
+
kind: string;
|
|
3031
|
+
desc: string;
|
|
3032
|
+
};
|
|
3027
3033
|
DefaultPredicateFilterContext: {
|
|
3028
3034
|
name: string;
|
|
3029
3035
|
kind: string;
|
|
@@ -3040,6 +3046,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3040
3046
|
ref: string;
|
|
3041
3047
|
})[];
|
|
3042
3048
|
};
|
|
3049
|
+
DefaultTableLayoutProperties: {
|
|
3050
|
+
name: string;
|
|
3051
|
+
kind: string;
|
|
3052
|
+
desc: string;
|
|
3053
|
+
};
|
|
3043
3054
|
DetailInitContext: {
|
|
3044
3055
|
name: string;
|
|
3045
3056
|
kind: string;
|
|
@@ -4037,27 +4048,28 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4037
4048
|
name: string;
|
|
4038
4049
|
kind: string;
|
|
4039
4050
|
desc: string;
|
|
4040
|
-
props: {
|
|
4051
|
+
props: ({
|
|
4041
4052
|
name: string;
|
|
4042
4053
|
kind: string;
|
|
4043
4054
|
desc: string;
|
|
4044
|
-
|
|
4055
|
+
isOpt?: undefined;
|
|
4056
|
+
} | {
|
|
4057
|
+
name: string;
|
|
4058
|
+
kind: string;
|
|
4059
|
+
desc: string;
|
|
4060
|
+
isOpt: boolean;
|
|
4061
|
+
})[];
|
|
4045
4062
|
};
|
|
4046
4063
|
InFilterValueInfo: {
|
|
4047
4064
|
name: string;
|
|
4048
4065
|
kind: string;
|
|
4049
4066
|
desc: string;
|
|
4050
|
-
props:
|
|
4067
|
+
props: {
|
|
4051
4068
|
name: string;
|
|
4052
4069
|
kind: string;
|
|
4053
4070
|
desc: string;
|
|
4054
4071
|
isOpt: boolean;
|
|
4055
|
-
}
|
|
4056
|
-
name: string;
|
|
4057
|
-
kind: string;
|
|
4058
|
-
desc: string;
|
|
4059
|
-
isOpt?: undefined;
|
|
4060
|
-
})[];
|
|
4072
|
+
}[];
|
|
4061
4073
|
};
|
|
4062
4074
|
InitialState: {
|
|
4063
4075
|
name: string;
|
|
@@ -4244,13 +4256,13 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4244
4256
|
kind: string;
|
|
4245
4257
|
desc: string;
|
|
4246
4258
|
isOpt: boolean;
|
|
4247
|
-
ref
|
|
4259
|
+
ref?: undefined;
|
|
4248
4260
|
} | {
|
|
4249
4261
|
name: string;
|
|
4250
4262
|
kind: string;
|
|
4251
4263
|
desc: string;
|
|
4252
4264
|
isOpt: boolean;
|
|
4253
|
-
ref
|
|
4265
|
+
ref: string;
|
|
4254
4266
|
})[];
|
|
4255
4267
|
};
|
|
4256
4268
|
LayoutState: {
|