@adaptabletools/adaptable 12.0.9 → 12.1.0-canary.0
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/base.css +231 -120
- package/bundle.cjs.js +142 -114
- package/index.css +268 -130
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +1 -2
- package/src/Api/ColumnApi.d.ts +5 -0
- package/src/Api/FilterApi.d.ts +15 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +2 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +10 -0
- package/src/Api/Implementation/FilterApiImpl.d.ts +6 -1
- package/src/Api/Implementation/FilterApiImpl.js +58 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -1
- package/src/Api/Implementation/LayoutApiImpl.js +8 -16
- package/src/Api/Implementation/ScheduleApiImpl.js +4 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +7 -2
- package/src/PredefinedConfig/LayoutState.d.ts +2 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +4 -0
- package/src/Redux/Store/AdaptableStore.js +11 -5
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/LayoutModule.js +10 -17
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/Utilities/{getAlertBehaviourViewItems.d.ts → Alert/getAlertBehaviourViewItems.d.ts} +0 -0
- package/src/Strategy/Utilities/{getAlertBehaviourViewItems.js → Alert/getAlertBehaviourViewItems.js} +2 -2
- package/src/Strategy/Utilities/{getAlertPreviewViewItems.d.ts → Alert/getAlertPreviewViewItems.d.ts} +2 -2
- package/src/Strategy/Utilities/{getAlertPreviewViewItems.js → Alert/getAlertPreviewViewItems.js} +2 -2
- package/src/Strategy/Utilities/{getCustomSortColumnViewItems.d.ts → CustomSort/getCustomSortColumnViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getCustomSortColumnViewItems.js → CustomSort/getCustomSortColumnViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getCustomSortSortOrderViewItems.d.ts → CustomSort/getCustomSortSortOrderViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getCustomSortSortOrderViewItems.js → CustomSort/getCustomSortSortOrderViewItems.js} +0 -0
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +3 -0
- package/src/Strategy/Utilities/{getExportColumnsViewItems.js → Export/getExportColumnsViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getExportRowsViewItems.d.ts → Export/getExportRowsViewItems.d.ts} +0 -0
- package/src/Strategy/Utilities/{getExportRowsViewItems.js → Export/getExportRowsViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFlashingCellDurationViewItems.d.ts → FlashingCell/getFlashingCellDurationViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFlashingCellDurationViewItems.js → FlashingCell/getFlashingCellDurationViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFlashingCellStyleViewItems.d.ts → FlashingCell/getFlashingCellStyleViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFlashingCellStyleViewItems.js → FlashingCell/getFlashingCellStyleViewItems.js} +1 -1
- package/src/Strategy/Utilities/{getFlashingTargetViewItems.d.ts → FlashingCell/getFlashingTargetViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFlashingTargetViewItems.js → FlashingCell/getFlashingTargetViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFormatColumnSettingsViewItems.d.ts → FormatColumn/getFormatColumnSettingsViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFormatColumnSettingsViewItems.js → FormatColumn/getFormatColumnSettingsViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFormatColumnStyleViewItems.d.ts → FormatColumn/getFormatColumnStyleViewItems.d.ts} +0 -0
- package/src/Strategy/Utilities/{getFormatColumnStyleViewItems.js → FormatColumn/getFormatColumnStyleViewItems.js} +1 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +24 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +14 -0
- package/src/Strategy/Utilities/{getShortcutSettingsViewItems.d.ts → Shortcut/getShortcutSettingsViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getShortcutSettingsViewItems.js → Shortcut/getShortcutSettingsViewItems.js} +0 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +4 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +134 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -6
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +12 -11
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +24 -1
- package/src/View/AdaptableView.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +27 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +46 -36
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +4 -2
- package/src/View/Components/Popups/AdaptableToaster.js +16 -33
- package/src/View/Components/ValueSelector/index.d.ts +10 -1
- package/src/View/Components/ValueSelector/index.js +16 -8
- package/src/View/FormatColumn/FormatColumnSummary.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.d.ts +4 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +127 -13
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +102 -0
- package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +226 -0
- package/src/View/Layout/Wizard/sections/FilterSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +35 -0
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +39 -0
- package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +46 -0
- package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/SettingsSection.js +51 -0
- package/src/View/Layout/Wizard/sections/SortSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/SortSection.js +69 -0
- package/src/View/Layout/Wizard/sections/Utilities.d.ts +2 -0
- package/src/View/Layout/Wizard/sections/Utilities.js +5 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +7 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
- package/src/View/StatusBar/StatusBarPanel.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +3 -3
- package/src/View/Wizard/OnePageWizards.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.js +1 -1
- package/src/agGrid/Adaptable.d.ts +2 -0
- package/src/agGrid/Adaptable.js +33 -9
- package/src/agGrid/agGridHelper.js +11 -1
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -0
- package/src/components/ExpressionEditor/index.js +1 -1
- package/src/components/Tabs/index.js +4 -2
- package/src/components/icons/arrow-down-long.d.ts +3 -0
- package/src/components/icons/arrow-down-long.js +7 -0
- package/src/components/icons/arrow-up-long.d.ts +3 -0
- package/src/components/icons/arrow-up-long.js +7 -0
- package/src/components/icons/index.js +4 -0
- package/src/metamodel/adaptable.metamodel.d.ts +9 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Strategy/Utilities/getExportColumnsViewItems.d.ts +0 -3
- package/src/View/Layout/LayoutEntityRow.d.ts +0 -13
- package/src/View/Layout/LayoutEntityRow.js +0 -23
- package/src/View/Layout/LayoutPopup.d.ts +0 -32
- package/src/View/Layout/LayoutPopup.js +0 -153
package/src/types.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export type { AdaptableMessageType } from './PredefinedConfig/Common/AdaptableMe
|
|
|
119
119
|
export type { AdaptableObject, AdaptableObjectTag, } from './PredefinedConfig/Common/AdaptableObject';
|
|
120
120
|
export type { SuspendableObject } from './PredefinedConfig/Common/SuspendableObject';
|
|
121
121
|
export type { AdaptableQuery, AdaptableAggregatedBooleanQuery, AdaptableAggregatedScalarQuery, AdaptableBooleanQuery, AdaptableObservableQuery, AdaptableScalarQuery, } from './PredefinedConfig/Common/AdaptableQuery';
|
|
122
|
-
export type { AdaptablePredicate, AdaptablePredicateDef, ModuleScope, PredicateDefHandlerParams, PredicateDefInput, PredicateDefToStringParams, } from './PredefinedConfig/Common/AdaptablePredicate';
|
|
122
|
+
export type { AdaptablePredicate, AdaptablePredicateDef, ModuleScope, PredicateDefHandlerParams, PredicateDefInput, PredicateDefToStringParams, ColumnFilterDef, } from './PredefinedConfig/Common/AdaptablePredicate';
|
|
123
123
|
export type { FDC3Context, InstrumentContext, InstrumentListContext, PositionContext, PortfolioContext, ContactContext, ContactListContext, CountryContext, OrganizationContext, AdaptableFDC3EventInfo, FDC3ContextType, CustomFDC3Context, } from './PredefinedConfig/Common/FDC3Context';
|
|
124
124
|
export type { AdaptableScope } from './PredefinedConfig/Common/AdaptableScope';
|
|
125
125
|
export type { AdaptableStyle } from './PredefinedConfig/Common/AdaptableStyle';
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "12.0.
|
|
1
|
+
declare const _default: "12.1.0-canary.0";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '12.0.
|
|
3
|
+
exports.default = '12.1.0-canary.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { SharedEntityRowProps } from '../Components/SharedProps/ConfigEntityRowProps';
|
|
3
|
-
import { Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
|
-
import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
|
|
5
|
-
export interface LayoutEntityRowProps<LayoutEntityRow> extends SharedEntityRowProps<LayoutEntityRow> {
|
|
6
|
-
IsCurrentLayout: boolean;
|
|
7
|
-
canDelete: boolean;
|
|
8
|
-
onSelect: (Layout: Layout) => void;
|
|
9
|
-
cloneAccessLevel: AccessLevel;
|
|
10
|
-
}
|
|
11
|
-
export declare class LayoutEntityRow extends React.Component<LayoutEntityRowProps<LayoutEntityRow>, {}> {
|
|
12
|
-
render(): any;
|
|
13
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutEntityRow = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const EntityListActionButtons_1 = require("../Components/Buttons/EntityListActionButtons");
|
|
7
|
-
const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
|
|
8
|
-
const EntityRowItem_1 = require("../Components/EntityRowItem");
|
|
9
|
-
const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
|
|
10
|
-
const Helper_1 = require("../../Utilities/Helpers/Helper");
|
|
11
|
-
class LayoutEntityRow extends React.Component {
|
|
12
|
-
render() {
|
|
13
|
-
let layout = this.props.adaptableObject;
|
|
14
|
-
let colItems = Helper_1.cloneObject(this.props.colItems);
|
|
15
|
-
colItems[0].Content = (React.createElement(EntityRowItem_1.EntityRowItem, { Content: React.createElement(Radio_1.default, { style: { padding: '0px', margin: '0px' }, onChange: () => this.props.onSelect(layout), checked: this.props.IsCurrentLayout }) }));
|
|
16
|
-
colItems[1].Content = React.createElement(EntityRowItem_1.EntityRowItem, { Content: layout.Name });
|
|
17
|
-
colItems[2].Content = (React.createElement(EntityRowItem_1.EntityRowItem, { Content: this.props.api.layoutApi.getLayoutDescription(layout) }));
|
|
18
|
-
let buttons = (React.createElement(EntityListActionButtons_1.EntityListActionButtons, { showClone: true, confirmDeleteAction: this.props.onDeleteConfirm, showShare: this.props.teamSharingActivated, editClick: () => this.props.onEdit(layout), cloneClick: () => this.props.onClone(layout), shareClick: (config) => this.props.onShare(config), overrideDisableEdit: false, overrideDisableDelete: !this.props.canDelete, entityType: this.props.moduleInfo.FriendlyName, accessLevel: this.props.accessLevel, cloneAccessLevel: this.props.cloneAccessLevel }));
|
|
19
|
-
colItems[3].Content = buttons;
|
|
20
|
-
return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: colItems });
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.LayoutEntityRow = LayoutEntityRow;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
|
|
3
|
-
import * as TeamSharingRedux from '../../Redux/ActionsReducers/TeamSharingRedux';
|
|
4
|
-
import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
|
|
5
|
-
import { EditableConfigEntityState } from '../Components/SharedProps/EditableConfigEntityState';
|
|
6
|
-
import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
7
|
-
import { Layout } from '../../PredefinedConfig/LayoutState';
|
|
8
|
-
import { SharedEntityConfig } from '../../PredefinedConfig/TeamSharingState';
|
|
9
|
-
interface LayoutPopupProps extends ModuleViewPopupProps<LayoutPopupComponent> {
|
|
10
|
-
Layouts: Layout[];
|
|
11
|
-
CurrentLayoutName: string;
|
|
12
|
-
CurrentLayoutDraft: Layout | undefined;
|
|
13
|
-
onSaveLayout: (layout: Layout) => void;
|
|
14
|
-
onAddLayout: (layout: Layout) => void;
|
|
15
|
-
onSelectLayout: (SelectedSearchName: string) => LayoutRedux.LayoutSelectAction;
|
|
16
|
-
onShare: (entity: AdaptableObject, config: SharedEntityConfig) => TeamSharingRedux.TeamSharingShareAction;
|
|
17
|
-
}
|
|
18
|
-
declare class LayoutPopupComponent extends React.Component<LayoutPopupProps, EditableConfigEntityState> {
|
|
19
|
-
constructor(props: LayoutPopupProps);
|
|
20
|
-
shouldClosePopupOnFinishWizard: boolean;
|
|
21
|
-
componentDidMount(): void;
|
|
22
|
-
render(): JSX.Element;
|
|
23
|
-
onNew(): void;
|
|
24
|
-
onEdit(layout: Layout): void;
|
|
25
|
-
onClone(layout: Layout): void;
|
|
26
|
-
onCloseWizard(): void;
|
|
27
|
-
onFinishWizard(): void;
|
|
28
|
-
canFinishWizard(): boolean;
|
|
29
|
-
private getCurrentLayout;
|
|
30
|
-
}
|
|
31
|
-
export declare let LayoutPopup: import("react-redux").ConnectedComponent<typeof LayoutPopupComponent, import("react-redux").Omit<React.ClassAttributes<LayoutPopupComponent> & LayoutPopupProps, "ref" | "key" | "api" | "onSuspend" | "accessLevel" | "popupParams" | "onClearPopupParams" | "teamSharingActivated" | "onClosePopup" | "moduleInfo" | "onUnSuspend" | "modalContainer" | "onShare" | "onSelectLayout" | "onSaveLayout" | "Layouts" | "CurrentLayoutName" | "CurrentLayoutDraft" | "onAddLayout">>;
|
|
32
|
-
export {};
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LayoutPopup = 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 PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
8
|
-
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
9
|
-
const TeamSharingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/TeamSharingRedux"));
|
|
10
|
-
const LayoutWizard_1 = require("./Wizard/LayoutWizard");
|
|
11
|
-
const LayoutEntityRow_1 = require("./LayoutEntityRow");
|
|
12
|
-
const Helper_1 = require("../../Utilities/Helpers/Helper");
|
|
13
|
-
const ButtonNew_1 = require("../Components/Buttons/ButtonNew");
|
|
14
|
-
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
15
|
-
const AdaptableObjectCollection_1 = require("../Components/AdaptableObjectCollection");
|
|
16
|
-
const EditableConfigEntityState_1 = require("../Components/SharedProps/EditableConfigEntityState");
|
|
17
|
-
const UIHelper_1 = require("../UIHelper");
|
|
18
|
-
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
19
|
-
const EmptyContent_1 = tslib_1.__importDefault(require("../../components/EmptyContent"));
|
|
20
|
-
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
|
|
21
|
-
class LayoutPopupComponent extends React.Component {
|
|
22
|
-
constructor(props) {
|
|
23
|
-
super(props);
|
|
24
|
-
this.shouldClosePopupOnFinishWizard = false;
|
|
25
|
-
this.state = UIHelper_1.UIHelper.getEmptyConfigState();
|
|
26
|
-
}
|
|
27
|
-
componentDidMount() {
|
|
28
|
-
var _a;
|
|
29
|
-
if (this.props.popupParams) {
|
|
30
|
-
// if we come in from a function then open the current layout
|
|
31
|
-
if (this.props.popupParams.source == 'ModuleButton') {
|
|
32
|
-
const currentLayout = this.getCurrentLayout();
|
|
33
|
-
if (currentLayout) {
|
|
34
|
-
this.onEdit(currentLayout);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (this.props.popupParams.action) {
|
|
38
|
-
if (this.props.popupParams.action == 'New') {
|
|
39
|
-
this.onNew();
|
|
40
|
-
}
|
|
41
|
-
if (this.props.popupParams.action == 'Clone') {
|
|
42
|
-
// try to get the current layout draft (relevant especially when autoSaveLayouts is FALSE
|
|
43
|
-
const clonedLayout = (_a = this.props.CurrentLayoutDraft) !== null && _a !== void 0 ? _a : this.getCurrentLayout();
|
|
44
|
-
if (clonedLayout) {
|
|
45
|
-
this.onClone(clonedLayout);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (this.props.popupParams.action == 'Edit') {
|
|
49
|
-
const currentLayout = this.getCurrentLayout();
|
|
50
|
-
if (currentLayout) {
|
|
51
|
-
this.onEdit(currentLayout);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
this.shouldClosePopupOnFinishWizard =
|
|
56
|
-
this.props.popupParams.source &&
|
|
57
|
-
(this.props.popupParams.source == 'Toolbar' ||
|
|
58
|
-
this.props.popupParams.source == 'ModuleButton' ||
|
|
59
|
-
this.props.popupParams.source == 'ColumnMenu');
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
render() {
|
|
63
|
-
let colItems = [
|
|
64
|
-
{ Content: 'Current', Size: 1 },
|
|
65
|
-
{ Content: 'Name', Size: 2 },
|
|
66
|
-
{ Content: 'Details', Size: 7 },
|
|
67
|
-
{ Content: '', Size: 2 },
|
|
68
|
-
];
|
|
69
|
-
let layoutRows = this.props.Layouts.map((layout) => {
|
|
70
|
-
let accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(layout, this.props.accessLevel);
|
|
71
|
-
return (React.createElement(LayoutEntityRow_1.LayoutEntityRow, { key: layout.Uuid, colItems: colItems, api: this.props.api, IsCurrentLayout: layout.Name == this.props.CurrentLayoutName, moduleInfo: this.props.moduleInfo, adaptableObject: layout, onEdit: () => this.onEdit(layout), onClone: () => this.onClone(layout), onShare: (config) => this.props.onShare(layout, config), teamSharingActivated: this.props.teamSharingActivated, onDeleteConfirm: LayoutRedux.LayoutDelete(layout), canDelete: this.props.Layouts.length > 1, onSelect: () => this.props.onSelectLayout(layout.Name), accessLevel: accessLevel, cloneAccessLevel: this.props.accessLevel }));
|
|
72
|
-
});
|
|
73
|
-
let newSearchButton = (React.createElement(ButtonNew_1.ButtonNew, { onClick: () => this.onNew(), tooltip: "Create New Layout", accessLevel: this.props.accessLevel, style: {
|
|
74
|
-
color: 'var(--ab-color-text-on-add)',
|
|
75
|
-
fill: 'var(--ab-color-text-on-add)',
|
|
76
|
-
background: 'var(--ab-color-action-add)',
|
|
77
|
-
} }));
|
|
78
|
-
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), button: newSearchButton, glyphicon: this.props.moduleInfo.Glyph },
|
|
79
|
-
layoutRows.length > 0 ? (React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { colItems: colItems, items: layoutRows })) : (React.createElement(EmptyContent_1.default, null, "Click 'New' to start creating layouts.")),
|
|
80
|
-
this.state.editedAdaptableObject != null && (React.createElement(LayoutWizard_1.LayoutWizard, { moduleInfo: this.props.moduleInfo, editedAdaptableObject: this.state.editedAdaptableObject, configEntities: this.props.Layouts, modalContainer: this.props.modalContainer, ColumnSorts: this.props.api.gridApi.getColumnSorts(), api: this.props.api, wizardStartIndex: this.state.wizardStartIndex, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: () => this.onFinishWizard(), canFinishWizard: () => this.canFinishWizard() }))));
|
|
81
|
-
}
|
|
82
|
-
onNew() {
|
|
83
|
-
this.props.api.layoutApi.showLayoutEditor(null, 'New');
|
|
84
|
-
}
|
|
85
|
-
onEdit(layout) {
|
|
86
|
-
this.props.api.layoutApi.showLayoutEditor(layout.Name, 'Edit');
|
|
87
|
-
}
|
|
88
|
-
onClone(layout) {
|
|
89
|
-
this.props.api.layoutApi.showLayoutEditor(layout.Name, 'Clone');
|
|
90
|
-
}
|
|
91
|
-
onCloseWizard() {
|
|
92
|
-
this.props.onClearPopupParams();
|
|
93
|
-
this.setState({
|
|
94
|
-
editedAdaptableObject: null,
|
|
95
|
-
wizardStartIndex: 0,
|
|
96
|
-
wizardStatus: EditableConfigEntityState_1.WizardStatus.None,
|
|
97
|
-
});
|
|
98
|
-
if (this.shouldClosePopupOnFinishWizard) {
|
|
99
|
-
this.props.onClosePopup();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
onFinishWizard() {
|
|
103
|
-
const clonedObject = Helper_1.Helper.cloneObject(this.state.editedAdaptableObject);
|
|
104
|
-
const isNew = this.state.wizardStatus == EditableConfigEntityState_1.WizardStatus.New;
|
|
105
|
-
if (isNew) {
|
|
106
|
-
this.props.onAddLayout(clonedObject);
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
this.props.onSaveLayout(clonedObject);
|
|
110
|
-
}
|
|
111
|
-
let currentLayout = this.getCurrentLayout();
|
|
112
|
-
let shouldChangeLayout = isNew || (currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.Uuid) == clonedObject.Uuid;
|
|
113
|
-
this.setState({
|
|
114
|
-
editedAdaptableObject: null,
|
|
115
|
-
wizardStartIndex: 0,
|
|
116
|
-
wizardStatus: EditableConfigEntityState_1.WizardStatus.None,
|
|
117
|
-
});
|
|
118
|
-
if (shouldChangeLayout) {
|
|
119
|
-
// its new so make it the selected layout or name has changed.
|
|
120
|
-
this.props.onSelectLayout(clonedObject.Name);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
canFinishWizard() {
|
|
124
|
-
let layout = this.state.editedAdaptableObject;
|
|
125
|
-
return !layout.IsReadOnly && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(layout.Name);
|
|
126
|
-
}
|
|
127
|
-
getCurrentLayout() {
|
|
128
|
-
return this.props.Layouts.find((layout) => layout.Name == this.props.CurrentLayoutName);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function mapStateToProps(state) {
|
|
132
|
-
return {
|
|
133
|
-
Layouts: state.Layout.Layouts,
|
|
134
|
-
CurrentLayoutName: state.Layout.CurrentLayout,
|
|
135
|
-
CurrentLayoutDraft: state.Grid.CurrentLayout,
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
function mapDispatchToProps(dispatch) {
|
|
139
|
-
return {
|
|
140
|
-
onSaveLayout: (layout) => {
|
|
141
|
-
// SAVE it when user clicks FINISH, even if autoSave: false
|
|
142
|
-
// since it makes sense to persist when clicking FINISH - for the user
|
|
143
|
-
// clicking FINISH is equivalent to clicking save
|
|
144
|
-
dispatch(LayoutRedux.LayoutSave(layout));
|
|
145
|
-
},
|
|
146
|
-
onAddLayout: (layout) => {
|
|
147
|
-
dispatch(LayoutRedux.LayoutAdd(layout));
|
|
148
|
-
},
|
|
149
|
-
onSelectLayout: (selectedSearchName) => dispatch(LayoutRedux.LayoutSelect(selectedSearchName)),
|
|
150
|
-
onShare: (entity, config) => dispatch(TeamSharingRedux.TeamSharingShare(entity, ModuleConstants.LayoutModuleId, config)),
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
exports.LayoutPopup = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(LayoutPopupComponent);
|