@adaptabletools/adaptable 11.0.9 → 11.1.1-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.
Files changed (150) hide show
  1. package/base.css +19 -11
  2. package/bundle.cjs.js +125 -125
  3. package/index.css +23 -11
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -2
  8. package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
  9. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  11. package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
  12. package/src/Api/AlertApi.d.ts +5 -6
  13. package/src/Api/BulkUpdateApi.d.ts +5 -0
  14. package/src/Api/ConfigApi.d.ts +1 -1
  15. package/src/Api/DataChangeHistoryApi.d.ts +3 -3
  16. package/src/Api/EventApi.d.ts +1 -1
  17. package/src/Api/Events/CellChanged.d.ts +2 -2
  18. package/src/Api/Events/GridDataChanged.d.ts +5 -1
  19. package/src/Api/ExportApi.d.ts +3 -3
  20. package/src/Api/FreeTextColumnApi.d.ts +3 -3
  21. package/src/Api/GridApi.d.ts +27 -6
  22. package/src/Api/Implementation/AlertApiImpl.d.ts +7 -4
  23. package/src/Api/Implementation/AlertApiImpl.js +86 -59
  24. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
  25. package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -0
  26. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  27. package/src/Api/Implementation/ConfigApiImpl.js +7 -2
  28. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +3 -3
  29. package/src/Api/Implementation/EventApiImpl.js +1 -1
  30. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
  31. package/src/Api/Implementation/ExportApiImpl.js +7 -8
  32. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +2 -2
  33. package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -7
  34. package/src/Api/Implementation/GridApiImpl.d.ts +11 -3
  35. package/src/Api/Implementation/GridApiImpl.js +29 -8
  36. package/src/Api/Implementation/InternalApiImpl.d.ts +11 -4
  37. package/src/Api/Implementation/InternalApiImpl.js +41 -5
  38. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -1
  39. package/src/Api/Implementation/LayoutApiImpl.js +19 -4
  40. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  41. package/src/Api/Implementation/SettingsPanelApiImpl.js +7 -1
  42. package/src/Api/InternalApi.d.ts +10 -3
  43. package/src/Api/LayoutApi.d.ts +14 -3
  44. package/src/PredefinedConfig/AlertState.d.ts +7 -3
  45. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +35 -6
  46. package/src/PredefinedConfig/Common/AdaptableAlert.js +7 -0
  47. package/src/PredefinedConfig/Common/AdaptableFlashingCell.d.ts +2 -2
  48. package/src/PredefinedConfig/Common/AdaptablePredicate.js +20 -0
  49. package/src/PredefinedConfig/Common/{DataChangedInfo.d.ts → CellDataChangedInfo.d.ts} +2 -6
  50. package/src/PredefinedConfig/Common/{DataChangedInfo.js → CellDataChangedInfo.js} +0 -0
  51. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -1
  52. package/src/PredefinedConfig/Common/DataChangedScope.d.ts +4 -0
  53. package/src/PredefinedConfig/Common/DataChangedScope.js +2 -0
  54. package/src/PredefinedConfig/Common/Entitlement.d.ts +2 -2
  55. package/src/PredefinedConfig/Common/Menu.d.ts +3 -0
  56. package/src/PredefinedConfig/Common/RowsHighlightInfo.d.ts +15 -0
  57. package/src/PredefinedConfig/Common/RowsHighlightInfo.js +2 -0
  58. package/src/PredefinedConfig/ConfigState.d.ts +4 -1
  59. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  60. package/src/PredefinedConfig/PopupState.d.ts +2 -1
  61. package/src/PredefinedConfig/SystemState.d.ts +2 -2
  62. package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
  63. package/src/Redux/ActionsReducers/GridRedux.d.ts +5 -5
  64. package/src/Redux/ActionsReducers/PopupRedux.d.ts +18 -0
  65. package/src/Redux/ActionsReducers/PopupRedux.js +36 -1
  66. package/src/Redux/ActionsReducers/SystemRedux.d.ts +16 -5
  67. package/src/Redux/ActionsReducers/SystemRedux.js +37 -6
  68. package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -0
  69. package/src/Redux/Store/AdaptableReduxMerger.js +40 -4
  70. package/src/Redux/Store/AdaptableStore.js +76 -34
  71. package/src/Strategy/AlertModule.d.ts +5 -3
  72. package/src/Strategy/AlertModule.js +68 -22
  73. package/src/Strategy/BulkUpdateModule.js +7 -2
  74. package/src/Strategy/DataChangeHistoryModule.js +8 -6
  75. package/src/Strategy/ExportModule.js +1 -0
  76. package/src/Strategy/FlashingCellModule.d.ts +2 -2
  77. package/src/Strategy/FlashingCellModule.js +21 -15
  78. package/src/Strategy/FormatColumnModule.js +4 -2
  79. package/src/Strategy/SmartEditModule.js +6 -0
  80. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  81. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
  82. package/src/Utilities/Defaults/DefaultSettingsPanel.js +6 -2
  83. package/src/Utilities/Emitter.d.ts +1 -1
  84. package/src/Utilities/Emitter.js +6 -3
  85. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  86. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  87. package/src/Utilities/Interface/MessagePopups.d.ts +13 -0
  88. package/src/Utilities/ObjectFactory.d.ts +9 -7
  89. package/src/Utilities/ObjectFactory.js +26 -12
  90. package/src/Utilities/Services/CalculatedColumnExpressionService.js +3 -3
  91. package/src/Utilities/Services/DataService.d.ts +5 -5
  92. package/src/Utilities/Services/DataService.js +12 -10
  93. package/src/Utilities/Services/Interface/IAlertService.d.ts +2 -2
  94. package/src/Utilities/Services/Interface/IDataService.d.ts +6 -6
  95. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
  96. package/src/Utilities/Services/Interface/IValidationService.d.ts +4 -4
  97. package/src/Utilities/Services/LicenseService.js +1 -1
  98. package/src/Utilities/Services/ModuleService.js +1 -1
  99. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  100. package/src/Utilities/Services/ValidationService.d.ts +4 -4
  101. package/src/Utilities/Services/ValidationService.js +18 -17
  102. package/src/View/AdaptableView.js +2 -0
  103. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +16 -9
  104. package/src/View/Alert/Wizard/AlertButtonsEditor.js +13 -3
  105. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -0
  106. package/src/View/Alert/Wizard/AlertWizard.js +83 -1
  107. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
  108. package/src/View/Components/FilterForm/FilterForm.js +2 -2
  109. package/src/View/Components/Panels/PanelFooter.d.ts +10 -0
  110. package/src/View/Components/Panels/PanelFooter.js +14 -0
  111. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +12 -7
  112. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -1
  113. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -1
  114. package/src/View/Components/Popups/{AdaptablePopup/Utilities.d.ts → Utilities.d.ts} +4 -0
  115. package/src/View/Components/Popups/{AdaptablePopup/Utilities.js → Utilities.js} +5 -2
  116. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +6 -0
  117. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +32 -0
  118. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +4 -0
  119. package/src/View/Components/Popups/WindowPopups/windowFactory.js +8 -0
  120. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +2 -2
  121. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +2 -2
  122. package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +3 -0
  123. package/src/View/Layout/LayoutEditorStandalonePopup.js +76 -0
  124. package/src/View/Layout/LayoutPopup.js +3 -24
  125. package/src/View/Layout/LayoutViewPanel.d.ts +1 -4
  126. package/src/View/Layout/LayoutViewPanel.js +5 -18
  127. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.d.ts +9 -0
  128. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.js +55 -0
  129. package/src/View/Layout/Wizard/LayoutEditor/index.js +3 -68
  130. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  131. package/src/View/Layout/Wizard/LayoutEditorWizard.js +35 -7
  132. package/src/View/SystemStatus/SystemStatusEntityRow.js +1 -2
  133. package/src/agGrid/Adaptable.d.ts +6 -4
  134. package/src/agGrid/Adaptable.js +115 -117
  135. package/src/agGrid/agGridHelper.d.ts +1 -1
  136. package/src/agGrid/agGridHelper.js +23 -8
  137. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  138. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  139. package/src/components/Dialog/index.js +1 -1
  140. package/src/components/Modal/index.js +1 -1
  141. package/src/components/WindowModal/WindowModal.d.ts +10 -8
  142. package/src/components/WindowModal/WindowModal.js +4 -2
  143. package/src/components/WindowModal/useStacking.d.ts +9 -0
  144. package/src/components/WindowModal/useStacking.js +45 -0
  145. package/src/env.js +3 -3
  146. package/src/metamodel/adaptable.metamodel.d.ts +85 -45
  147. package/src/metamodel/adaptable.metamodel.js +185 -84
  148. package/src/types.d.ts +5 -3
  149. package/version.d.ts +1 -1
  150. package/version.js +1 -1
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LayoutEditorStandalonePopup = 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 uuid_1 = require("../../components/utils/uuid");
8
+ const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
9
+ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
10
+ const AdaptableContext_1 = require("../AdaptableContext");
11
+ const PanelFooter_1 = require("../Components/Panels/PanelFooter");
12
+ const PanelWithImage_1 = require("../Components/Panels/PanelWithImage");
13
+ const LayoutEditorWizard_1 = require("./Wizard/LayoutEditorWizard");
14
+ const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
15
+ exports.LayoutEditorStandalonePopup = (props) => {
16
+ /**
17
+ * This is here because the old code mutates the object.
18
+ * And we need a way to trigger an update/render.
19
+ *
20
+ * I've left the mutation because we might want to use the old PopupWizard.
21
+ * And it currently, the refactoring of the editor out of the scope of this feature.
22
+ */
23
+ const [stateLayout, setStateLayout] = React.useState(null);
24
+ const adaptable = AdaptableContext_1.useAdaptable();
25
+ const dispatch = react_redux_1.useDispatch();
26
+ const layoutModule = adaptable.ModuleService.getModuleById('Layout');
27
+ const layouts = react_redux_1.useSelector((state) => state.Layout.Layouts);
28
+ const layoutData = React.useMemo(() => {
29
+ var _a;
30
+ let layoutData = null;
31
+ const layoutToCloneOrEdit = (_a = props === null || props === void 0 ? void 0 : props.popupProps) === null || _a === void 0 ? void 0 : _a.layout;
32
+ switch (props.popupProps.action) {
33
+ case 'Clone':
34
+ layoutData = Helper_1.default.cloneObject(layoutToCloneOrEdit);
35
+ layoutData.Name = '';
36
+ layoutData.IsReadOnly = false;
37
+ layoutData.Uuid = uuid_1.createUuid();
38
+ break;
39
+ case 'New':
40
+ layoutData = ObjectFactory_1.default.CreateEmptyLayout({ Name: '' });
41
+ break;
42
+ case 'Edit':
43
+ layoutData = Helper_1.default.cloneObject(layoutToCloneOrEdit);
44
+ break;
45
+ }
46
+ return layoutData;
47
+ }, []);
48
+ const handleCancel = React.useCallback(() => {
49
+ props.onDismiss();
50
+ }, []);
51
+ const handleAccept = React.useCallback(() => {
52
+ var _a;
53
+ switch ((_a = props === null || props === void 0 ? void 0 : props.popupProps) === null || _a === void 0 ? void 0 : _a.action) {
54
+ case 'Edit':
55
+ const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
56
+ dispatch(LayoutRedux.LayoutSave(layoutData));
57
+ if (currentLayout.Uuid === layoutData.Uuid) {
58
+ dispatch(LayoutRedux.LayoutSelect(layoutData.Name));
59
+ }
60
+ break;
61
+ case 'Clone':
62
+ dispatch(LayoutRedux.LayoutAdd(layoutData));
63
+ dispatch(LayoutRedux.LayoutSelect(layoutData.Name));
64
+ break;
65
+ case 'New':
66
+ dispatch(LayoutRedux.LayoutAdd(layoutData));
67
+ dispatch(LayoutRedux.LayoutSelect(layoutData.Name));
68
+ }
69
+ props.onDismiss();
70
+ }, []);
71
+ const finishDisabled = !layoutData.Name;
72
+ return (React.createElement(React.Fragment, null,
73
+ React.createElement(PanelWithImage_1.PanelWithImage, { bodyProps: { padding: 2 }, flex: 1, glyphicon: layoutModule.moduleInfo.Glyph, header: layoutModule.moduleInfo.FriendlyName, infoLink: layoutModule.moduleInfo.HelpPage, infoLinkDisabled: false, variant: "primary" },
74
+ React.createElement(LayoutEditorWizard_1.LayoutEditorWizard, { data: layoutData, api: adaptable.api, Layouts: layouts, moduleInfo: layoutModule.moduleInfo, onLayoutChange: setStateLayout, updateGoBackState: () => null })),
75
+ React.createElement(PanelFooter_1.PanelFooter, { acceptDisabled: finishDisabled, onAccept: handleAccept, onCancel: handleCancel })));
76
+ };
@@ -10,7 +10,6 @@ const TeamSharingRedux = tslib_1.__importStar(require("../../Redux/ActionsReduce
10
10
  const LayoutWizard_1 = require("./Wizard/LayoutWizard");
11
11
  const LayoutEntityRow_1 = require("./LayoutEntityRow");
12
12
  const Helper_1 = require("../../Utilities/Helpers/Helper");
13
- const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
14
13
  const ButtonNew_1 = require("../Components/Buttons/ButtonNew");
15
14
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
16
15
  const AdaptableObjectCollection_1 = require("../Components/AdaptableObjectCollection");
@@ -18,7 +17,6 @@ const EditableConfigEntityState_1 = require("../Components/SharedProps/EditableC
18
17
  const UIHelper_1 = require("../UIHelper");
19
18
  const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
20
19
  const EmptyContent_1 = tslib_1.__importDefault(require("../../components/EmptyContent"));
21
- const uuid_1 = require("../../components/utils/uuid");
22
20
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
23
21
  class LayoutPopupComponent extends React.Component {
24
22
  constructor(props) {
@@ -82,32 +80,13 @@ class LayoutPopupComponent extends React.Component {
82
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() }))));
83
81
  }
84
82
  onNew() {
85
- this.setState({
86
- editedAdaptableObject: ObjectFactory_1.ObjectFactory.CreateEmptyLayout({
87
- Name: '',
88
- }),
89
- wizardStartIndex: 0,
90
- wizardStatus: EditableConfigEntityState_1.WizardStatus.New,
91
- });
83
+ this.props.api.layoutApi.showLayoutEditor(null, 'New');
92
84
  }
93
85
  onEdit(layout) {
94
- const clonedObject = Helper_1.Helper.cloneObject(layout);
95
- this.setState({
96
- editedAdaptableObject: clonedObject,
97
- wizardStartIndex: 0,
98
- wizardStatus: EditableConfigEntityState_1.WizardStatus.Edit,
99
- });
86
+ this.props.api.layoutApi.showLayoutEditor(layout.Name, 'Edit');
100
87
  }
101
88
  onClone(layout) {
102
- let clonedObject = Helper_1.Helper.cloneObject(layout);
103
- clonedObject.Name = '';
104
- clonedObject.IsReadOnly = false;
105
- clonedObject.Uuid = uuid_1.createUuid();
106
- this.setState({
107
- editedAdaptableObject: clonedObject,
108
- wizardStartIndex: 0,
109
- wizardStatus: EditableConfigEntityState_1.WizardStatus.New,
110
- });
89
+ this.props.api.layoutApi.showLayoutEditor(layout.Name, 'Clone');
111
90
  }
112
91
  onCloseWizard() {
113
92
  this.props.onClearPopupParams();
@@ -1,14 +1,11 @@
1
1
  import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
2
2
  import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
3
3
  import { Layout } from '../../PredefinedConfig/LayoutState';
4
- import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
5
4
  import * as React from 'react';
5
+ export declare const COMPONENT_LAYOUT_POPUP_NAME = "LayoutEditorStandalonePopup";
6
6
  export interface LayoutViewPanelComponentProps extends ViewPanelProps {
7
7
  onSelectLayout: (layoutName: string) => LayoutRedux.LayoutSelectAction;
8
8
  onSaveLayout: (layout: Layout) => void;
9
- onNewLayout: (popup: string) => PopupRedux.PopupShowScreenAction;
10
- onCloneLayout: (popup: string) => PopupRedux.PopupShowScreenAction;
11
- onEditLayout: (popup: string) => PopupRedux.PopupShowScreenAction;
12
9
  Layouts: Layout[];
13
10
  CurrentDraftLayout: Layout;
14
11
  CanSave: boolean;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LayoutViewPanelControl = void 0;
3
+ exports.LayoutViewPanelControl = exports.COMPONENT_LAYOUT_POPUP_NAME = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
6
- const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
7
6
  const React = tslib_1.__importStar(require("react"));
8
7
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
9
8
  const rebass_1 = require("rebass");
@@ -14,9 +13,9 @@ const ButtonSave_1 = require("../Components/Buttons/ButtonSave");
14
13
  const ButtonEdit_1 = require("../Components/Buttons/ButtonEdit");
15
14
  const ButtonNew_1 = require("../Components/Buttons/ButtonNew");
16
15
  const ButtonDelete_1 = require("../Components/Buttons/ButtonDelete");
17
- const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
18
16
  const react_redux_1 = require("react-redux");
19
17
  const ButtonClone_1 = require("../Components/Buttons/ButtonClone");
18
+ exports.COMPONENT_LAYOUT_POPUP_NAME = 'LayoutEditorStandalonePopup';
20
19
  class LayoutViewPanelComponent extends React.Component {
21
20
  render() {
22
21
  let layoutEntity = this.props.Layouts.find((x) => x.Name == this.props.CurrentLayoutName || x.Uuid == this.props.CurrentLayoutName);
@@ -34,9 +33,9 @@ class LayoutViewPanelComponent extends React.Component {
34
33
  React.createElement(DropdownButton_1.default, { marginRight: 2, columns: ['label'], style: { width: '100%', fontSize: 'small' }, className: `ab-${elementType}__Layout__select`, items: availableLayoutOptions, disabled: availableLayoutOptions.length == 0 }, layoutEntity ? layoutEntity.Name : null)),
35
34
  React.createElement(rebass_1.Flex, { flexDirection: "row", className: join_1.default(this.props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Layout__wrap`) },
36
35
  isManualSaveLayout && (React.createElement(ButtonSave_1.ButtonSave, { className: `ab-${elementType}__Layout__save`, onClick: () => this.onSaveLayout(), tooltip: "Save Changes to Current Layout", disabled: !this.props.CanSave, accessLevel: accessLevel })),
37
- React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => this.props.onEditLayout(this.props.moduleInfo.Popup), tooltip: "Edit Layout", className: `ab-${elementType}__Layout__edit`, accessLevel: accessLevel }),
38
- React.createElement(ButtonClone_1.ButtonClone, { onClick: () => this.props.onCloneLayout(this.props.moduleInfo.Popup), tooltip: "Clone Layout", className: `ab-${elementType}__Layout__clone`, tone: "neutral", variant: "text", children: null, accessLevel: cloneAccessLevel }),
39
- React.createElement(ButtonNew_1.ButtonNew, { children: null, tone: "neutral", variant: "text", className: `ab-${elementType}__Layout__new`, onClick: () => this.props.onNewLayout(this.props.moduleInfo.Popup), tooltip: "Create a new Layout", accessLevel: newAccessLevel }),
36
+ React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => this.props.api.layoutApi.showLayoutEditor(layoutEntity.Name), tooltip: "Edit Layout", className: `ab-${elementType}__Layout__edit`, accessLevel: accessLevel }),
37
+ React.createElement(ButtonClone_1.ButtonClone, { onClick: () => this.props.api.layoutApi.showLayoutEditor(layoutEntity.Name, 'Clone'), tooltip: "Clone Layout", className: `ab-${elementType}__Layout__clone`, tone: "neutral", variant: "text", children: null, accessLevel: cloneAccessLevel }),
38
+ React.createElement(ButtonNew_1.ButtonNew, { children: null, tone: "neutral", variant: "text", className: `ab-${elementType}__Layout__new`, onClick: () => this.props.api.layoutApi.showLayoutEditor(null, 'New'), tooltip: "Create a new Layout", accessLevel: newAccessLevel }),
40
39
  React.createElement(ButtonDelete_1.ButtonDelete, { tooltip: "Delete Layout", disabled: this.props.Layouts.length <= 1, className: `ab-${elementType}__Layout__delete`, ConfirmAction: LayoutRedux.LayoutDelete(layoutEntity), ConfirmationMsg: "Are you sure you want to delete '" + this.props.CurrentLayoutName + "'?", ConfirmationTitle: 'Delete Layout', accessLevel: accessLevel }))));
41
40
  }
42
41
  onSaveLayout() {
@@ -66,18 +65,6 @@ function mapDispatchToProps(dispatch) {
66
65
  dispatch(LayoutRedux.LayoutSave(layout));
67
66
  dispatch(LayoutRedux.LayoutUpdateCurrentDraft(null));
68
67
  },
69
- onNewLayout: (popup) => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.LayoutModuleId, popup, {
70
- action: 'New',
71
- source: 'Toolbar',
72
- })),
73
- onCloneLayout: (popup) => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.LayoutModuleId, popup, {
74
- action: 'Clone',
75
- source: 'Toolbar',
76
- })),
77
- onEditLayout: (popup) => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.LayoutModuleId, popup, {
78
- action: 'Edit',
79
- source: 'Toolbar',
80
- })),
81
68
  };
82
69
  }
83
70
  exports.LayoutViewPanelControl = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(LayoutViewPanelComponent);
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { AdaptableColumnProperties } from '../../../../PredefinedConfig/Common/AdaptableColumn';
3
+ export declare const ColumnLabels: (props: AdaptableColumnProperties & {
4
+ children?: React.ReactNode;
5
+ labels?: Record<string, React.ReactNode>;
6
+ flexDirection?: 'row' | 'column';
7
+ showBoth?: boolean;
8
+ showTitle?: boolean;
9
+ }) => JSX.Element;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ColumnLabels = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ exports.ColumnLabels = (props) => {
8
+ const { children, showBoth, showTitle, flexDirection = 'row', labels: labelsProp } = props, columnProperties = tslib_1.__rest(props, ["children", "showBoth", "showTitle", "flexDirection", "labels"]);
9
+ const labelNames = [
10
+ 'Aggregatable',
11
+ 'Filterable',
12
+ 'Groupable',
13
+ 'Moveable',
14
+ 'Pivotable',
15
+ 'Sortable',
16
+ ];
17
+ const labels = labelNames.map((name) => columnProperties[name.toLocaleLowerCase()] ? name.charAt(0) : '');
18
+ const flexProps = {
19
+ [flexDirection === 'row' ? 'alignItems' : 'justifyContent']: 'center',
20
+ };
21
+ return (React.createElement(rebass_1.Flex, Object.assign({ flexDirection: flexDirection }, flexProps, { width: "100%" }),
22
+ showTitle ? React.createElement(rebass_1.Text, { mr: 2 }, "Behaviours:") : null,
23
+ labels.map((l, index) => {
24
+ const enabled = !!l;
25
+ const labelName = labelNames[index];
26
+ const letter = labelName.charAt(0);
27
+ const renderBox = (enabled, key) => {
28
+ return (React.createElement(rebass_1.Flex, { className: "ab-LayoutEditor__LegendLetter", width: '20px', height: '20px', alignItems: "center", justifyContent: "center", fontSize: 2, ml: 2, backgroundColor: "defaultbackground", title: enabled ? labelName : `Not ${labelName}`, style: {
29
+ overflow: 'hidden',
30
+ cursor: 'auto',
31
+ position: 'relative',
32
+ fontWeight: 600,
33
+ lineHeight: 0,
34
+ border: `1px solid var(--ab-color-${enabled ? 'accent' : 'inputborder'})`,
35
+ borderRadius: 'var(--ab__border-radius)',
36
+ opacity: enabled ? 1 : 0.5,
37
+ }, key: `${letter}${key ? key : ''}` },
38
+ !enabled ? (React.createElement("div", { style: {
39
+ background: 'currentColor',
40
+ position: 'absolute',
41
+ bottom: '-100%',
42
+ right: 0,
43
+ width: 2,
44
+ height: '200%',
45
+ transform: 'skewX(45deg)',
46
+ } })) : null,
47
+ letter));
48
+ };
49
+ return (React.createElement(rebass_1.Flex, { key: letter, mt: flexDirection === 'row' ? 0 : 2, flexDirection: "row", alignItems: "center" },
50
+ renderBox(enabled),
51
+ showBoth ? renderBox(!enabled, 'label') : null,
52
+ labelsProp ? (React.createElement(rebass_1.Flex, { key: "labelProps", flex: 1, ml: 2, className: "ab-LayoutEditor__LegendLetterDescription" }, labelsProp[labelName])) : null));
53
+ }),
54
+ children));
55
+ };
@@ -21,61 +21,12 @@ const PivotList_1 = require("./PivotList");
21
21
  const ButtonInfo_1 = require("../../../Components/Buttons/ButtonInfo");
22
22
  const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
23
23
  const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
24
+ const ColumnLabels_1 = require("./ColumnLabels");
24
25
  const verticalPanelStyle = {
25
26
  minHeight: 150,
26
- flex: '1 0 auto',
27
27
  overflow: 'auto',
28
28
  };
29
29
  const ListPanel = (props) => (React.createElement(Panel_1.default, Object.assign({ variant: "modern", bodyProps: { padding: 0 }, style: Object.assign(Object.assign({}, verticalPanelStyle), props.style) }, props)));
30
- const ColumnLabels = (props) => {
31
- const { children, showBoth, showTitle, flexDirection = 'row', labels: labelsProp } = props, columnProperties = tslib_1.__rest(props, ["children", "showBoth", "showTitle", "flexDirection", "labels"]);
32
- const labelNames = [
33
- 'Aggregatable',
34
- 'Filterable',
35
- 'Groupable',
36
- 'Moveable',
37
- 'Pivotable',
38
- 'Sortable',
39
- ];
40
- const labels = labelNames.map((name) => columnProperties[name.toLocaleLowerCase()] ? name.charAt(0) : '');
41
- const flexProps = {
42
- [flexDirection === 'row' ? 'alignItems' : 'justifyContent']: 'center',
43
- };
44
- return (React.createElement(rebass_1.Flex, Object.assign({ flexDirection: flexDirection }, flexProps, { width: "100%" }),
45
- showTitle ? React.createElement(rebass_1.Text, { mr: 2 }, "Behaviours:") : null,
46
- labels.map((l, index) => {
47
- const enabled = !!l;
48
- const labelName = labelNames[index];
49
- const letter = labelName.charAt(0);
50
- const renderBox = (enabled, key) => {
51
- return (React.createElement(rebass_1.Flex, { className: "ab-LayoutEditor__LegendLetter", width: '20px', height: '20px', alignItems: "center", justifyContent: "center", fontSize: 2, ml: 2, backgroundColor: "defaultbackground", title: enabled ? labelName : `Not ${labelName}`, style: {
52
- overflow: 'hidden',
53
- cursor: 'auto',
54
- position: 'relative',
55
- fontWeight: 600,
56
- lineHeight: 0,
57
- border: `1px solid var(--ab-color-${enabled ? 'accent' : 'inputborder'})`,
58
- borderRadius: 'var(--ab__border-radius)',
59
- opacity: enabled ? 1 : 0.5,
60
- }, key: `${letter}${key ? key : ''}` },
61
- !enabled ? (React.createElement("div", { style: {
62
- background: 'currentColor',
63
- position: 'absolute',
64
- bottom: '-100%',
65
- right: 0,
66
- width: 2,
67
- height: '200%',
68
- transform: 'skewX(45deg)',
69
- } })) : null,
70
- letter));
71
- };
72
- return (React.createElement(rebass_1.Flex, { key: letter, mt: flexDirection === 'row' ? 0 : 2, flexDirection: "row", alignItems: "center" },
73
- renderBox(enabled),
74
- showBoth ? renderBox(!enabled, 'label') : null,
75
- labelsProp ? (React.createElement(rebass_1.Flex, { key: "labelProps", flex: 1, ml: 2, className: "ab-LayoutEditor__LegendLetterDescription" }, labelsProp[labelName])) : null));
76
- }),
77
- children));
78
- };
79
30
  function areEqual(_prevProps, _nextProps) {
80
31
  /*
81
32
  * For now we don't need updates from the parent - the initial layout we receive on mount is enough
@@ -297,7 +248,7 @@ exports.LayoutEditor = React.memo((props) => {
297
248
  whiteSpace: 'nowrap',
298
249
  }, onChange: setColumnVisibility.bind(null, c) }, "Visible")),
299
250
  React.createElement(rebass_1.Flex, { padding: 2, flexDirection: "column" },
300
- React.createElement(ColumnLabels, { showTitle: true, sortable: c.sortable, filterable: c.filterable, moveable: c.moveable, pivotable: c.pivotable, groupable: c.groupable, aggregatable: c.aggregatable }, ' '),
251
+ React.createElement(ColumnLabels_1.ColumnLabels, { showTitle: true, sortable: c.sortable, filterable: c.filterable, moveable: c.moveable, pivotable: c.pivotable, groupable: c.groupable, aggregatable: c.aggregatable }, ' '),
301
252
  React.createElement(rebass_1.Flex, { flexDirection: "row", mt: 2 },
302
253
  React.createElement(rebass_1.Flex, { flex: 3, alignItems: "baseline" },
303
254
  React.createElement(rebass_1.Text, { fontSize: 3, mr: 2 }, "Header:"),
@@ -415,21 +366,5 @@ exports.LayoutEditor = React.memo((props) => {
415
366
  React.createElement(icons_1.Icon, { name: "clear" }))));
416
367
  }, getItemStyle: (columnId, snapshot, draggableStyle) => {
417
368
  return getItemStyle_1.getItemStyle(allColumnsMap[columnId], layout, state.dragSource, snapshot, draggableStyle);
418
- } })),
419
- React.createElement(ListPanel, { header: "Legend: Column Behaviour", className: "ab-LayoutEditor__LegendPanel", style: {
420
- gridRow: '1 /1',
421
- gridColumn: '3/3',
422
- }, bodyProps: {
423
- padding: 2,
424
- backgroundColor: 'defaultbackground',
425
- color: 'text-on-defaultbackground',
426
- } },
427
- React.createElement(ColumnLabels, { flexDirection: "column", showBoth: true, labels: {
428
- Sortable: 'Able to be sorted',
429
- Filterable: 'Can be filtered',
430
- Aggregatable: 'Shows aggregations (in grouped rows)',
431
- Groupable: 'Can form a row group',
432
- Moveable: 'Is draggable and movable',
433
- Pivotable: 'Eligible for pivoting',
434
- }, sortable: true, filterable: true, moveable: true, pivotable: true, groupable: true, aggregatable: true })))));
369
+ } })))));
435
370
  }, areEqual);
@@ -3,6 +3,7 @@ import { AdaptableWizardStep, AdaptableWizardStepProps } from '../../Wizard/Inte
3
3
  import { Layout } from '../../../PredefinedConfig/LayoutState';
4
4
  export interface LayoutEditorWizardProps extends AdaptableWizardStepProps<Layout> {
5
5
  Layouts: Layout[];
6
+ onLayoutChange?: (layout: Layout) => void;
6
7
  }
7
8
  export interface LayoutEditorWizardState {
8
9
  layoutName: string;
@@ -8,6 +8,10 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayou
8
8
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
9
9
  const LayoutEditor_1 = require("./LayoutEditor");
10
10
  const ErrorBox_1 = tslib_1.__importDefault(require("../../../components/ErrorBox"));
11
+ const AdaptablePopover_1 = require("../../AdaptablePopover");
12
+ const rebass_1 = require("rebass");
13
+ const Panel_1 = tslib_1.__importDefault(require("../../../components/Panel"));
14
+ const ColumnLabels_1 = require("./LayoutEditor/ColumnLabels");
11
15
  class LayoutEditorWizard extends React.Component {
12
16
  constructor(props) {
13
17
  super(props);
@@ -35,11 +39,13 @@ class LayoutEditorWizard extends React.Component {
35
39
  return ErrorMessage;
36
40
  };
37
41
  this.updateLayout = (layout) => {
42
+ var _a, _b;
38
43
  const updatedLayout = Object.assign(Object.assign({}, this.state.layout), layout);
39
44
  Object.assign(this.props.data, updatedLayout);
40
45
  this.setState({
41
46
  layout: updatedLayout,
42
47
  });
48
+ (_b = (_a = this.props) === null || _a === void 0 ? void 0 : _a.onLayoutChange) === null || _b === void 0 ? void 0 : _b.call(_a, updatedLayout);
43
49
  };
44
50
  this.onLayoutChange = (layout) => {
45
51
  layout = Object.assign(Object.assign({}, layout), { Name: this.state.layoutName });
@@ -64,14 +70,36 @@ class LayoutEditorWizard extends React.Component {
64
70
  };
65
71
  }
66
72
  render() {
67
- return (React.createElement("div", { "data-name": 'layout-editor', style: { flex: 1, overflow: 'auto' } },
73
+ return (React.createElement("div", { "data-name": 'layout-editor', style: { height: '100%' } },
68
74
  React.createElement(WizardPanel_1.default, { bodyProps: { padding: 0 } },
69
- React.createElement(FormLayout_1.default, { columns: ['label', 'children'], m: 2, width: "30rem" },
70
- React.createElement(FormLayout_1.FormRow, { label: "Layout Name" },
71
- React.createElement(Input_1.default, { value: this.state.layoutName, "data-name": "layout-editor-name-input", width: "100%", autoFocus: true, placeholder: "Type a name", onChange: this.onLayoutNameChange }),
72
- ' '),
73
- this.state.errorMessage ? (React.createElement(FormLayout_1.FormRow, { label: "" },
74
- React.createElement(ErrorBox_1.default, null, this.state.errorMessage))) : null),
75
+ React.createElement(rebass_1.Flex, null,
76
+ React.createElement(rebass_1.Box, { width: 350 },
77
+ React.createElement(FormLayout_1.default, { columns: ['label', 'children'], m: 2 },
78
+ React.createElement(FormLayout_1.FormRow, { label: "Layout Name" },
79
+ React.createElement(Input_1.default, { value: this.state.layoutName, "data-name": "layout-editor-name-input", width: "100%", autoFocus: true, placeholder: "Type a name", onChange: this.onLayoutNameChange }),
80
+ ' '),
81
+ this.state.errorMessage ? (React.createElement(FormLayout_1.FormRow, { label: "" },
82
+ React.createElement(ErrorBox_1.default, null, this.state.errorMessage))) : null)),
83
+ React.createElement(rebass_1.Flex, { flex: 1, pr: 2, alignItems: "center", justifyContent: "end" },
84
+ React.createElement(rebass_1.Text, { mr: 2 }, "Legend"),
85
+ React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 200, bodyText: [
86
+ React.createElement(Panel_1.default, { variant: "modern", header: "Legend: Column Behaviour", className: "ab-LayoutEditor__LegendPanel", style: {
87
+ gridRow: '1 /1',
88
+ gridColumn: '3/3',
89
+ }, bodyProps: {
90
+ padding: 2,
91
+ backgroundColor: 'defaultbackground',
92
+ color: 'text-on-defaultbackground',
93
+ } },
94
+ React.createElement(ColumnLabels_1.ColumnLabels, { flexDirection: "column", showBoth: true, labels: {
95
+ Sortable: 'Able to be sorted',
96
+ Filterable: 'Can be filtered',
97
+ Aggregatable: 'Shows aggregations (in grouped rows)',
98
+ Groupable: 'Can form a row group',
99
+ Moveable: 'Is draggable and movable',
100
+ Pivotable: 'Eligible for pivoting',
101
+ }, sortable: true, filterable: true, moveable: true, pivotable: true, groupable: true, aggregatable: true })),
102
+ ] }))),
75
103
  React.createElement(LayoutEditor_1.LayoutEditor, { api: this.props.api, layout: this.state.layout, onLayoutChange: this.onLayoutChange }))));
76
104
  }
77
105
  canNext() {
@@ -4,7 +4,6 @@ exports.SystemStatusEntityRow = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
7
- const EntityRowItem_1 = require("../Components/EntityRowItem");
8
7
  const rebass_1 = require("rebass");
9
8
  const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
10
9
  const Helper_1 = require("../../Utilities/Helpers/Helper");
@@ -25,7 +24,7 @@ class SystemStatusEntityRow extends React.Component {
25
24
  " ",
26
25
  systemStatus.statusFurtherInformation ? '...' : ''),
27
26
  systemStatus.statusFurtherInformation ? (React.createElement(rebass_1.Box, { margin: 2, style: { whiteSpace: 'normal' } }, systemStatus.statusFurtherInformation)) : null)) : null;
28
- colItems[1].Content = React.createElement(EntityRowItem_1.EntityRowItem, { Content: systemStatus.timestamp.toLocaleString() });
27
+ colItems[1].Content = systemStatus.timestamp.toLocaleString();
29
28
  return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: colItems });
30
29
  }
31
30
  }
@@ -1,4 +1,4 @@
1
- import { ColDef, ColGroupDef, Column, ExcelStyle, GridOptions, GridReadyEvent, Module, RowNode, ValueGetterParams, ValueSetterParams } from '@ag-grid-community/all-modules';
1
+ import { ColDef, ColGroupDef, Column, ExcelStyle, GridOptions, Module, RowNode, ValueGetterParams, ValueSetterParams } from '@ag-grid-community/all-modules';
2
2
  import { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard } from '../AdaptableInterfaces/AdaptableNoCodeWizard';
3
3
  import { IAdaptable } from '../AdaptableInterfaces/IAdaptable';
4
4
  import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
@@ -7,7 +7,7 @@ import { AdaptableApi } from '../Api/AdaptableApi';
7
7
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
8
8
  import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
9
9
  import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
10
- import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
10
+ import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
11
11
  import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
12
12
  import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
13
13
  import { ReportData } from '../PredefinedConfig/ExportState';
@@ -149,7 +149,7 @@ export declare class Adaptable implements IAdaptable {
149
149
  private updateLayoutFromGrid;
150
150
  setSelectedCells(): SelectedCellInfo | undefined;
151
151
  setSelectedRows(): SelectedRowInfo | undefined;
152
- setValue(dataChangedInfo: DataChangedInfo): void;
152
+ setValue(cellDataChangedInfo: CellDataChangedInfo): void;
153
153
  cancelEdit(): void;
154
154
  isCellEditable(rowNode: RowNode, column: Column): boolean;
155
155
  getDistinctValuesForColumn(column: AdaptableColumn, visibleRowsOnly: boolean, skipRowNode?: RowNode, permittedValues?: any[]): GridCell[];
@@ -178,6 +178,7 @@ export declare class Adaptable implements IAdaptable {
178
178
  forAllRowNodesDo(func: (rowNode: RowNode) => void): void;
179
179
  forAllVisibleRowNodesDo(func: (rowNode: RowNode, rowIndex: number) => void): void;
180
180
  getVisibleRowNodes(): RowNode[];
181
+ getRowsInViewport(): RowNode[];
181
182
  selectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
182
183
  deSelectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
183
184
  selectNode(rowNode: RowNode, clearSelection: boolean): void;
@@ -187,6 +188,7 @@ export declare class Adaptable implements IAdaptable {
187
188
  redrawBody(): void;
188
189
  redrawHeader(): void;
189
190
  redrawRow(rowNode: RowNode): void;
191
+ redrawRows(rowNodes: RowNode[]): void;
190
192
  refreshCells(rowNodes: RowNode[], columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
191
193
  jumpToRow(rowNode: RowNode): void;
192
194
  jumpToColumn(columnId: string): void;
@@ -241,6 +243,7 @@ export declare class Adaptable implements IAdaptable {
241
243
  getAdaptableContainerElement(): HTMLElement | null;
242
244
  getAgGridContainerElement(): HTMLElement | null;
243
245
  private initInternalGridLogic;
246
+ private updateColumnFilterActiveState;
244
247
  buildStandaloneColumnHeader(adaptableColumn: AdaptableColumn): AdaptableMenuItem[];
245
248
  prepareGrid(): void;
246
249
  setupColumns(): void;
@@ -360,5 +363,4 @@ export declare class AdaptableNoCodeWizard implements IAdaptableNoCodeWizard {
360
363
  constructor(adaptableOptions: AdaptableOptions, extraOptions?: AdaptableNoCodeWizardOptions);
361
364
  render(container?: HTMLElement | null): void;
362
365
  }
363
- export declare const bindAdaptableAgGrid: (gridReadyEvent: GridReadyEvent, gridOptions: GridOptions) => void;
364
366
  export {};