@adaptabletools/adaptable 11.1.14 → 11.2.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.
Files changed (198) hide show
  1. package/base.css +2 -0
  2. package/bundle.cjs.js +98 -98
  3. package/index.css +3 -0
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/AlertOptions.d.ts +8 -2
  8. package/src/AdaptableOptions/DashboardOptions.d.ts +4 -3
  9. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/FilterOptions.d.ts +5 -4
  11. package/src/AdaptableOptions/LayoutOptions.d.ts +56 -10
  12. package/src/AdaptableOptions/ToolPanelOptions.d.ts +4 -3
  13. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +18 -16
  14. package/src/Api/AdaptableApi.d.ts +10 -0
  15. package/src/Api/AlertApi.d.ts +3 -1
  16. package/src/Api/ConditionalStyleApi.d.ts +3 -1
  17. package/src/Api/ConfigApi.d.ts +3 -3
  18. package/src/Api/CustomSortApi.d.ts +3 -1
  19. package/src/Api/EventApi.d.ts +1 -0
  20. package/src/Api/Events/LayoutChanged.d.ts +1 -1
  21. package/src/Api/ExportApi.d.ts +16 -0
  22. package/src/Api/FinanceApi.d.ts +104 -3
  23. package/src/Api/FlashingCellApi.d.ts +3 -1
  24. package/src/Api/FormatColumnApi.d.ts +3 -1
  25. package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.js +53 -0
  27. package/src/Api/Implementation/AlertApiImpl.d.ts +3 -1
  28. package/src/Api/Implementation/AlertApiImpl.js +7 -6
  29. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  30. package/src/Api/Implementation/ApiBase.js +5 -2
  31. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +3 -1
  32. package/src/Api/Implementation/ConditionalStyleApiImpl.js +5 -4
  33. package/src/Api/Implementation/ConfigApiImpl.js +5 -1
  34. package/src/Api/Implementation/CustomSortApiImpl.d.ts +3 -1
  35. package/src/Api/Implementation/CustomSortApiImpl.js +6 -5
  36. package/src/Api/Implementation/EventApiImpl.d.ts +1 -0
  37. package/src/Api/Implementation/EventApiImpl.js +3 -0
  38. package/src/Api/Implementation/ExportApiImpl.d.ts +3 -0
  39. package/src/Api/Implementation/ExportApiImpl.js +10 -0
  40. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +3 -1
  41. package/src/Api/Implementation/FlashingCellApiImpl.js +8 -6
  42. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -1
  43. package/src/Api/Implementation/FormatColumnApiImpl.js +7 -6
  44. package/src/Api/Implementation/InternalApiImpl.d.ts +14 -5
  45. package/src/Api/Implementation/InternalApiImpl.js +75 -3
  46. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +3 -1
  47. package/src/Api/Implementation/PlusMinusApiImpl.js +6 -8
  48. package/src/Api/Implementation/ScheduleApiImpl.d.ts +17 -6
  49. package/src/Api/Implementation/ScheduleApiImpl.js +25 -12
  50. package/src/Api/Implementation/ShortcutApiImpl.d.ts +3 -1
  51. package/src/Api/Implementation/ShortcutApiImpl.js +5 -4
  52. package/src/Api/Implementation/ToolPanelApiImpl.d.ts +1 -2
  53. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  54. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
  55. package/src/Api/InternalApi.d.ts +14 -7
  56. package/src/Api/LayoutApi.d.ts +4 -6
  57. package/src/Api/PlusMinusApi.d.ts +3 -1
  58. package/src/Api/ScheduleApi.d.ts +20 -6
  59. package/src/Api/ShortcutApi.d.ts +3 -1
  60. package/src/Api/ToolPanelApi.d.ts +1 -2
  61. package/src/PredefinedConfig/AlertState.d.ts +3 -3
  62. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +2 -5
  63. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -1
  64. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +4 -3
  65. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +18 -1
  66. package/src/PredefinedConfig/Common/AdaptablePredicate.js +9 -0
  67. package/src/PredefinedConfig/Common/BaseContext.d.ts +10 -0
  68. package/src/PredefinedConfig/Common/BaseContext.js +2 -0
  69. package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -3
  70. package/src/PredefinedConfig/Common/FDC3Context.d.ts +9 -9
  71. package/src/PredefinedConfig/Common/Menu.d.ts +4 -13
  72. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
  73. package/src/PredefinedConfig/DataSourceState.d.ts +2 -2
  74. package/src/PredefinedConfig/FilterState.d.ts +1 -1
  75. package/src/PredefinedConfig/SystemState.d.ts +1 -0
  76. package/src/PredefinedConfig/Uuid.js +1 -0
  77. package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -5
  78. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  79. package/src/Redux/ActionsReducers/SystemRedux.js +11 -1
  80. package/src/Redux/Store/AdaptableStore.d.ts +1 -0
  81. package/src/Redux/Store/AdaptableStore.js +6 -1
  82. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -0
  83. package/src/Strategy/AdaptableModuleBase.d.ts +5 -0
  84. package/src/Strategy/AdaptableModuleBase.js +9 -0
  85. package/src/Strategy/AlertModule.d.ts +4 -1
  86. package/src/Strategy/AlertModule.js +12 -4
  87. package/src/Strategy/CalculatedColumnModule.d.ts +3 -17
  88. package/src/Strategy/CalculatedColumnModule.js +2 -0
  89. package/src/Strategy/ConditionalStyleModule.d.ts +4 -1
  90. package/src/Strategy/ConditionalStyleModule.js +12 -4
  91. package/src/Strategy/CustomSortModule.d.ts +4 -1
  92. package/src/Strategy/CustomSortModule.js +10 -3
  93. package/src/Strategy/DataSourceModule.js +2 -0
  94. package/src/Strategy/ExportModule.d.ts +5 -3
  95. package/src/Strategy/ExportModule.js +10 -0
  96. package/src/Strategy/FlashingCellModule.d.ts +4 -1
  97. package/src/Strategy/FlashingCellModule.js +10 -5
  98. package/src/Strategy/FormatColumnModule.d.ts +4 -1
  99. package/src/Strategy/FormatColumnModule.js +10 -3
  100. package/src/Strategy/FreeTextColumnModule.js +2 -0
  101. package/src/Strategy/Interface/IModule.d.ts +6 -3
  102. package/src/Strategy/Interface/IScheduleModule.d.ts +1 -1
  103. package/src/Strategy/LayoutModule.d.ts +2 -1
  104. package/src/Strategy/LayoutModule.js +35 -2
  105. package/src/Strategy/PlusMinusModule.d.ts +4 -1
  106. package/src/Strategy/PlusMinusModule.js +15 -7
  107. package/src/Strategy/QueryModule.d.ts +2 -8
  108. package/src/Strategy/QueryModule.js +2 -0
  109. package/src/Strategy/ScheduleModule.d.ts +8 -4
  110. package/src/Strategy/ScheduleModule.js +16 -9
  111. package/src/Strategy/ShortcutModule.d.ts +4 -1
  112. package/src/Strategy/ShortcutModule.js +14 -4
  113. package/src/Strategy/StatusBarModule.d.ts +2 -1
  114. package/src/Strategy/StatusBarModule.js +2 -3
  115. package/src/Strategy/Utilities/getAlertBehaviourViewItems.d.ts +2 -2
  116. package/src/Strategy/Utilities/getAlertBehaviourViewItems.js +2 -2
  117. package/src/Strategy/Utilities/getObjectTagsViewItems.d.ts +4 -0
  118. package/src/Strategy/Utilities/getObjectTagsViewItems.js +13 -0
  119. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -1
  120. package/src/Utilities/Emitter.d.ts +1 -0
  121. package/src/Utilities/Emitter.js +9 -0
  122. package/src/Utilities/Extensions/TypeExtensions.d.ts +2 -0
  123. package/src/Utilities/Interface/MessagePopups.d.ts +3 -3
  124. package/src/Utilities/ObjectFactory.d.ts +2 -2
  125. package/src/Utilities/Services/AlertService.js +1 -1
  126. package/src/Utilities/Services/DataService.js +1 -1
  127. package/src/Utilities/Services/Interface/IModuleService.d.ts +1 -1
  128. package/src/Utilities/Services/ModuleService.d.ts +1 -1
  129. package/src/Utilities/Services/ModuleService.js +1 -0
  130. package/src/View/Alert/AlertStatusSubPanel.js +2 -1
  131. package/src/View/Alert/Wizard/AlertWizard.js +9 -0
  132. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -4
  133. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +9 -0
  134. package/src/View/ColorPicker.d.ts +1 -1
  135. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  136. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  137. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -0
  138. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  139. package/src/View/Components/FilterForm/FilterForm.js +1 -1
  140. package/src/View/Components/FilterForm/QuickFilterForm.js +11 -7
  141. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  142. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  143. package/src/View/Components/Panels/PanelWithImage.d.ts +3 -3
  144. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +22 -0
  145. package/src/View/Components/Popups/AdaptableToaster.js +3 -1
  146. package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +3 -3
  147. package/src/View/Components/TagValueSelector/index.d.ts +13 -0
  148. package/src/View/Components/TagValueSelector/index.js +22 -0
  149. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -2
  150. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +9 -0
  151. package/src/View/CustomSort/Wizard/CustomSortWizard.js +9 -0
  152. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +1 -1
  153. package/src/View/DataSource/Wizard/DataSourceWizard.js +10 -0
  154. package/src/View/Export/ExportSelector.d.ts +4 -0
  155. package/src/View/Export/ExportSelector.js +75 -0
  156. package/src/View/Export/ExportViewPanel.js +6 -7
  157. package/src/View/Export/ReportExportDropdown.d.ts +2 -5
  158. package/src/View/Export/Wizard/NewReportWizard.js +9 -0
  159. package/src/View/Export/constants.d.ts +2 -0
  160. package/src/View/Export/constants.js +5 -0
  161. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +9 -0
  162. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +9 -0
  163. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +9 -0
  164. package/src/View/GridInfo/GridOptionsComponent.d.ts +0 -1
  165. package/src/View/GridInfo/GridOptionsComponent.js +0 -1
  166. package/src/View/Layout/LayoutCloneButton.d.ts +6 -0
  167. package/src/View/Layout/LayoutCloneButton.js +15 -0
  168. package/src/View/Layout/LayoutRadioSelector.d.ts +2 -1
  169. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  170. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -1
  171. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  172. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +9 -0
  173. package/src/View/Query/Wizard/NamedQueryWizard.js +9 -0
  174. package/src/View/Schedule/Wizard/ScheduleWizard.js +10 -0
  175. package/src/View/Shortcut/Wizard/ShortcutWizard.js +10 -0
  176. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  177. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  178. package/src/View/Wizard/ObjectTagsWizardSection.d.ts +8 -0
  179. package/src/View/Wizard/ObjectTagsWizardSection.js +22 -0
  180. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
  181. package/src/View/Wizard/OnePageAdaptableWizard.js +12 -5
  182. package/src/agGrid/Adaptable.d.ts +14 -1
  183. package/src/agGrid/Adaptable.js +103 -68
  184. package/src/agGrid/agGridHelper.js +2 -1
  185. package/src/agGrid/createAgStatusPanelComponent.js +1 -0
  186. package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +8 -7
  187. package/src/components/Datepicker/index.d.ts +1 -1
  188. package/src/components/ExpressionEditor/index.js +5 -2
  189. package/src/components/Input/index.d.ts +1 -1
  190. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  191. package/src/components/PopupWithFooter.d.ts +1 -1
  192. package/src/components/Textarea/index.d.ts +1 -1
  193. package/src/components/WindowModal/useStacking.js +2 -2
  194. package/src/metamodel/adaptable.metamodel.d.ts +44 -2
  195. package/src/metamodel/adaptable.metamodel.js +229 -21
  196. package/src/types.d.ts +6 -5
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
@@ -85,12 +85,13 @@ export declare const PanelWithImage: React.ForwardRefExoticComponent<{
85
85
  key?: string | number;
86
86
  list?: string;
87
87
  step?: string | number;
88
- contextMenu?: string;
89
88
  type?: string;
90
89
  min?: string | number;
90
+ contextMenu?: string;
91
+ value?: string | number | readonly string[];
92
+ onKeyDown?: ((event: React.KeyboardEvent<HTMLElement>) => void) & ((event: React.KeyboardEvent<HTMLDivElement>) => void);
91
93
  rows?: number;
92
94
  name?: string;
93
- value?: string | number | readonly string[];
94
95
  className?: string;
95
96
  id?: string;
96
97
  lang?: string;
@@ -183,7 +184,6 @@ export declare const PanelWithImage: React.ForwardRefExoticComponent<{
183
184
  onLoadCapture?: ((event: React.SyntheticEvent<HTMLElement, Event>) => void) & ((event: React.SyntheticEvent<HTMLDivElement, Event>) => void);
184
185
  onError?: ((event: React.SyntheticEvent<HTMLElement, Event>) => void) & ((event: React.SyntheticEvent<HTMLDivElement, Event>) => void);
185
186
  onErrorCapture?: ((event: React.SyntheticEvent<HTMLElement, Event>) => void) & ((event: React.SyntheticEvent<HTMLDivElement, Event>) => void);
186
- onKeyDown?: ((event: React.KeyboardEvent<HTMLElement>) => void) & ((event: React.KeyboardEvent<HTMLDivElement>) => void);
187
187
  onKeyDownCapture?: ((event: React.KeyboardEvent<HTMLElement>) => void) & ((event: React.KeyboardEvent<HTMLDivElement>) => void);
188
188
  onKeyPress?: ((event: React.KeyboardEvent<HTMLElement>) => void) & ((event: React.KeyboardEvent<HTMLDivElement>) => void);
189
189
  onKeyPressCapture?: ((event: React.KeyboardEvent<HTMLElement>) => void) & ((event: React.KeyboardEvent<HTMLDivElement>) => void);
@@ -10,6 +10,9 @@ const icons_1 = require("../../../../components/icons");
10
10
  const AdaptableObjectList_1 = require("../../AdaptableObjectList");
11
11
  const ButtonNew_1 = require("../../Buttons/ButtonNew");
12
12
  const PopupPanel_1 = require("./PopupPanel");
13
+ const rebass_1 = require("rebass");
14
+ const CheckBox_1 = require("../../../../components/CheckBox");
15
+ const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
13
16
  exports.AdaptablePopupModuleView = (props) => {
14
17
  var _a, _b, _c, _d, _e;
15
18
  /**
@@ -83,7 +86,26 @@ exports.AdaptablePopupModuleView = (props) => {
83
86
  props.onClosePopup();
84
87
  }
85
88
  };
89
+ const adaptableModule = props.api.internalApi
90
+ .getModuleService()
91
+ .getModuleById(props.module.moduleInfo.ModuleName);
92
+ const dispatch = react_redux_1.useDispatch();
93
+ const showLayoutNotAssociatedObjects = react_redux_1.useSelector((state) => state.System.ShowLayoutNotAssociatedObjects);
94
+ const toggleButtonShowLayoutAssociatedObjects = () => {
95
+ if (!(adaptableModule === null || adaptableModule === void 0 ? void 0 : adaptableModule.canBeAssociatedWithLayouts())) {
96
+ return;
97
+ }
98
+ if (!props.api.internalApi.hasLayoutSpecificObjects()) {
99
+ return;
100
+ }
101
+ return (React.createElement(rebass_1.Flex, { justifyContent: "flex-start" },
102
+ React.createElement(CheckBox_1.CheckBox, { padding: 0, margin: 0, checked: showLayoutNotAssociatedObjects, onChange: (checked) => dispatch(SystemRedux_1.SystemLayoutShowNotAssociatedObjects(checked)) },
103
+ "Show ",
104
+ moduleInfo.FriendlyName,
105
+ "s not available in current Layout")));
106
+ };
86
107
  return (React.createElement(PopupPanel_1.PopupPanel, { glyphicon: moduleInfo.Glyph, infoLink: moduleInfo.HelpPage, headerText: moduleInfo.FriendlyName, button: newButton, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
108
+ !!(items === null || items === void 0 ? void 0 : items.length) && toggleButtonShowLayoutAssociatedObjects(),
87
109
  (items === null || items === void 0 ? void 0 : items.length) ? (React.createElement(AdaptableObjectList_1.AdaptableObjectList, { module: props.module, items: items })) : (React.createElement(EmptyContent_1.default, null, emptyContent !== null && emptyContent !== void 0 ? emptyContent : `Click 'New' to create a new ${moduleInfo.FriendlyName}`)),
88
110
  isWizardOpen && EditWizard && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, popupParams: props.popupParams, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
89
111
  };
@@ -9,7 +9,9 @@ const react_toastify_1 = require("react-toastify");
9
9
  exports.showToast = (props) => {
10
10
  const toastProps = ObjectFactory_1.default.CreateToastOptions(props.api.internalApi.getAdaptableOptions().notificationsOptions, {
11
11
  onClose: () => {
12
- props.api.internalApi.hidePopupAlert();
12
+ if (!props.api.isDestroyed()) {
13
+ props.api.internalApi.hidePopupAlert();
14
+ }
13
15
  },
14
16
  });
15
17
  const content = (React.createElement(AdaptablePopupAlert_1.AdaptablePopupAlert, Object.assign({ headless: true }, props, { onClose: () => {
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
- import { AdaptableForm, ButtonContext } from '../../../../../types';
2
+ import { AdaptableForm, BaseContext } from '../../../../../types';
3
3
  export interface FormDialogProps {
4
4
  id: string;
5
5
  formProps: any;
6
- prepareContext: (context: ButtonContext) => Promise<ButtonContext> | ButtonContext;
7
- form: AdaptableForm<ButtonContext>;
6
+ prepareContext: (context: BaseContext) => Promise<BaseContext> | BaseContext;
7
+ form: AdaptableForm<BaseContext>;
8
8
  }
9
9
  export declare const FormDialog: React.FunctionComponent<FormDialogProps>;
10
10
  export declare const FormPopups: React.FunctionComponent;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { ValueSelectorProps } from '../ValueSelector';
3
+ import { AdaptableObjectTag } from '../../../PredefinedConfig/Common/AdaptableObject';
4
+ export interface TagsSelectorProps extends Omit<ValueSelectorProps<AdaptableObjectTag, string | number>, 'options' | 'value' | 'onChange' | 'allowReorder' | 'toIdentifier' | 'toLabel' | 'selectionBoxPosition' | 'noSelectionLabel' | 'xSelectedLabel'> {
5
+ availableTags?: AdaptableObjectTag[];
6
+ selectedTags?: AdaptableObjectTag[];
7
+ onChange: (selectedTags: AdaptableObjectTag[]) => void;
8
+ }
9
+ export declare const TagValueSelector: (props: TagsSelectorProps) => JSX.Element;
10
+ export interface TagValueOptionsTagsProps {
11
+ tags?: AdaptableObjectTag[];
12
+ }
13
+ export declare const TagValueOptionsTags: (props: TagValueOptionsTagsProps) => JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TagValueOptionsTags = exports.TagValueSelector = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const ValueSelector_1 = require("../ValueSelector");
7
+ const AdaptableContext_1 = require("../../AdaptableContext");
8
+ exports.TagValueSelector = (props) => {
9
+ const { api } = AdaptableContext_1.useAdaptable();
10
+ const getDefaultTags = () => {
11
+ var _a;
12
+ return (_a = api.internalApi.getAvailableTags()) !== null && _a !== void 0 ? _a : [];
13
+ };
14
+ const { availableTags = getDefaultTags(), selectedTags = [], onChange, singleSelect } = props;
15
+ return (React.createElement(ValueSelector_1.ValueSelector, { options: availableTags, value: selectedTags.map((tag) => tag.value), singleSelect: singleSelect, allowReorder: false, onChange: (selectedTagsIds, selectedTagsMap) => {
16
+ onChange(selectedTagsIds.map((id) => selectedTagsMap.get(id)));
17
+ }, selectionBoxPosition: 'top', toIdentifier: (tag) => tag.value, toLabel: (tag) => tag.label, noSelectionLabel: singleSelect ? 'Select a tag' : 'You have not selected any tags.', xSelectedLabel: singleSelect ? () => 'Selected tag:' : () => 'Selected tags:' }));
18
+ };
19
+ exports.TagValueOptionsTags = (props) => {
20
+ const { tags = [] } = props;
21
+ return (React.createElement(ValueSelector_1.ValueOptionsTags, { options: tags, value: tags.map((tag) => tag.value), toIdentifier: (tag) => tag.value, toLabel: (tag) => tag.label, allowWrap: true, readOnly: true }));
22
+ };
@@ -194,11 +194,11 @@ const AdaptableToolPanelComponent = (props) => {
194
194
  }
195
195
  };
196
196
  const renderToolPanelConfigureButton = (initialTab) => {
197
- const popupParams = initialTab
197
+ const moduleParams = initialTab
198
198
  ? { source: 'Other', config: { initialTab } }
199
199
  : undefined;
200
200
  return (React.createElement(ButtonConfigure_1.ButtonConfigure, { iconSize: 16, tone: "none", marginLeft: 2, className: "ab-ToolPanel__configure-button", tooltip: 'Configure ToolPanels', onClick: () => {
201
- props.api.toolPanelApi.showToolPanelPopup(popupParams);
201
+ props.api.internalApi.showSettingsPanel('ToolPanel', moduleParams);
202
202
  } }));
203
203
  };
204
204
  const toolPanelButtons = renderToolPanelButtons();
@@ -18,6 +18,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
18
18
  const react_redux_1 = require("react-redux");
19
19
  const ConditionalStyleRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ConditionalStyleRedux"));
20
20
  const ConditionalStyleSettingsWizardSettings_1 = require("./ConditionalStyleSettingsWizardSettings");
21
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
21
22
  exports.ConditionalStyleWizard = (props) => {
22
23
  var _a;
23
24
  const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
@@ -91,6 +92,14 @@ exports.ConditionalStyleWizard = (props) => {
91
92
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
92
93
  React.createElement(ConditionalStyleSettingsWizardSettings_1.ConditionalStyleSettingsWizardSettings, { onChange: setConditionalStyle }))),
93
94
  },
95
+ {
96
+ details: 'Select Conditional Style tags',
97
+ title: 'Tags',
98
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
99
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
100
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setConditionalStyle }))),
101
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
102
+ },
94
103
  '-',
95
104
  {
96
105
  details: 'Review the Conditional Style',
@@ -12,6 +12,7 @@ const CustomSortValuesWizardSection_1 = require("./CustomSortValuesWizardSection
12
12
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
13
13
  const react_redux_1 = require("react-redux");
14
14
  const CustomSortRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CustomSortRedux"));
15
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
15
16
  exports.CustomSortWizard = (props) => {
16
17
  var _a, _b;
17
18
  let data = props.data;
@@ -59,6 +60,14 @@ exports.CustomSortWizard = (props) => {
59
60
  render: () => (React.createElement(rebass_1.Box, { padding: 2, style: { height: '100%' } },
60
61
  React.createElement(CustomSortValuesWizardSection_1.CustomSortValuesWizardSection, { onChange: setCustomSort }))),
61
62
  },
63
+ {
64
+ details: 'Select Custom Sort tags',
65
+ title: 'Tags',
66
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
67
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
68
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setCustomSort }))),
69
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
70
+ },
62
71
  '-',
63
72
  {
64
73
  title: 'Summary',
@@ -32,7 +32,7 @@ exports.DataSourceSettingsWizard = (props) => {
32
32
  };
33
33
  return (React.createElement(rebass_1.Box, { "data-name": "data-soruce-settings" },
34
34
  React.createElement(Tabs_1.Tabs, { autoFocus: false },
35
- React.createElement(Tabs_1.Tabs.Tab, null, "Data Soruce Settings"),
35
+ React.createElement(Tabs_1.Tabs.Tab, null, "Data Source Settings"),
36
36
  React.createElement(Tabs_1.Tabs.Content, null,
37
37
  React.createElement(FormLayout_1.default, null,
38
38
  React.createElement(FormLayout_1.FormRow, { label: "Name" },
@@ -10,6 +10,7 @@ const DataSourceSettingsSummary_1 = require("./DataSourceSettingsSummary");
10
10
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
11
11
  const react_redux_1 = require("react-redux");
12
12
  const DataSourceRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/DataSourceRedux"));
13
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
13
14
  exports.DataSourceWizard = (props) => {
14
15
  const [dataSource, setDataSource] = React.useState(() => {
15
16
  return props.data ? props.data : ObjectFactory_1.default.CreateEmptyDataSource();
@@ -32,6 +33,15 @@ exports.DataSourceWizard = (props) => {
32
33
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
33
34
  React.createElement(DataSourceSettingsWizard_1.DataSourceSettingsWizard, { onChange: setDataSource }))),
34
35
  },
36
+ {
37
+ details: 'Select Data Source tags',
38
+ title: 'Tags',
39
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
40
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
41
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setDataSource }))),
42
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
43
+ },
44
+ '-',
35
45
  {
36
46
  render: () => {
37
47
  return (React.createElement(rebass_1.Box, { padding: 2 },
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export interface ExportSelectorProps {
3
+ }
4
+ export declare const ExportSelector: React.FunctionComponent<ExportSelectorProps>;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExportSelector = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
7
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
8
+ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
9
+ const AdaptableContext_1 = require("../AdaptableContext");
10
+ const constants_1 = require("./constants");
11
+ const dropdownStyle = {
12
+ padding: 2,
13
+ fontSize: 'small',
14
+ };
15
+ const isCustomDestination = (destination) => {
16
+ return !!destination.name;
17
+ };
18
+ exports.ExportSelector = () => {
19
+ const adaptable = AdaptableContext_1.useAdaptable();
20
+ // reports
21
+ const handleReportChange = (report) => {
22
+ adaptable.api.exportApi.selectReport(report);
23
+ };
24
+ const allReports = adaptable.api.exportApi.getAllReports();
25
+ const allReportNames = allReports.map((report) => report.Name);
26
+ const reportItems = allReportNames.map((report) => {
27
+ return {
28
+ label: report,
29
+ value: report,
30
+ onClick: () => handleReportChange(report),
31
+ };
32
+ });
33
+ const currentReport = adaptable.api.exportApi.getCurrentReport();
34
+ const currentReportId = StringExtensions_1.default.IsNullOrEmpty(currentReport === null || currentReport === void 0 ? void 0 : currentReport.Name)
35
+ ? currentReport
36
+ : currentReport.Name;
37
+ // destinations
38
+ const handleDestinationChange = (destination) => {
39
+ adaptable.api.exportApi.selectDestination(destination);
40
+ };
41
+ const destinationItems = [
42
+ ...adaptable.api.exportApi.getAvailableExportDestinations().map((destination) => ({
43
+ label: destination,
44
+ onClick: () => handleDestinationChange(destination),
45
+ })),
46
+ ...adaptable.api.exportApi.getAllCustomDestination().map((destination) => ({
47
+ label: destination.name,
48
+ onClick: () => handleDestinationChange(destination.name),
49
+ })),
50
+ ];
51
+ const currentDestination = adaptable.api.exportApi.getCurrentDestination();
52
+ let currentDestinationId = null;
53
+ if (typeof currentDestination === 'string') {
54
+ currentDestinationId = currentDestination;
55
+ }
56
+ else if (currentDestination && 'name' in currentDestination) {
57
+ currentDestinationId = currentDestination.name;
58
+ }
59
+ else {
60
+ currentDestinationId = constants_1.SELECT_DESTINATION_STRING;
61
+ }
62
+ // export
63
+ const handleExport = () => {
64
+ if (isCustomDestination(currentDestination)) {
65
+ adaptable.api.exportApi.sendReport(currentReport.Name, currentDestination.name);
66
+ }
67
+ else {
68
+ adaptable.api.exportApi.sendReport(currentReport.Name, currentDestination);
69
+ }
70
+ };
71
+ return (React.createElement(React.Fragment, null,
72
+ React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, style: dropdownStyle, items: reportItems, columns: ['label'], onClear: () => handleReportChange(null), showClearButton: !!currentReport, variant: "outlined", marginRight: 2 }, currentReportId !== null && currentReportId !== void 0 ? currentReportId : constants_1.SELECT_REPORT_STRING),
73
+ React.createElement(DropdownButton_1.default, { disabled: currentReportId === constants_1.SELECT_REPORT_STRING, style: dropdownStyle, items: destinationItems, columns: ['label'], onClear: () => handleDestinationChange(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId),
74
+ React.createElement(SimpleButton_1.default, { disabled: currentDestinationId === constants_1.SELECT_DESTINATION_STRING, iconSize: 15, icon: "export", variant: "text", onClick: handleExport })));
75
+ };
@@ -21,13 +21,12 @@ const ButtonSchedule_1 = require("../Components/Buttons/ButtonSchedule");
21
21
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
22
22
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
23
23
  const react_redux_1 = require("react-redux");
24
- const SELECT_REPORT_STRING = 'Select Report';
25
- const SELECT_DESTINATION_STRING = 'Select Destination';
24
+ const constants_1 = require("./constants");
26
25
  class ExportViewPanelComponent extends React.Component {
27
26
  render() {
28
27
  let currentReport = this.props.api.exportApi.getReportByName(this.props.CurrentReport);
29
28
  let currentReportId = StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.CurrentReport)
30
- ? SELECT_REPORT_STRING
29
+ ? constants_1.SELECT_REPORT_STRING
31
30
  : this.props.CurrentReport;
32
31
  const allReportNames = this.getAllReportNames();
33
32
  let reportItems = allReportNames.map((report) => {
@@ -40,11 +39,11 @@ class ExportViewPanelComponent extends React.Component {
40
39
  if (currentReport && !allReportNames.includes(currentReport.Name)) {
41
40
  // current report is not available
42
41
  currentReport = undefined;
43
- currentReportId = SELECT_REPORT_STRING;
42
+ currentReportId = constants_1.SELECT_REPORT_STRING;
44
43
  }
45
44
  let currentDestination = this.props.api.exportApi.getDestinationByName(this.props.CurrentDestination);
46
45
  let currentDestinationId = StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.CurrentDestination)
47
- ? SELECT_DESTINATION_STRING
46
+ ? constants_1.SELECT_DESTINATION_STRING
48
47
  : this.props.CurrentDestination;
49
48
  const destinationItems = [
50
49
  ...this.props.api.exportApi.getAvailableExportDestinations().map((destination) => ({
@@ -66,7 +65,7 @@ class ExportViewPanelComponent extends React.Component {
66
65
  .includes(this.props.CurrentDestination)) {
67
66
  // current destination is not available
68
67
  currentDestination = undefined;
69
- currentDestinationId = SELECT_DESTINATION_STRING;
68
+ currentDestinationId = constants_1.SELECT_DESTINATION_STRING;
70
69
  }
71
70
  let accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(currentReport, this.props.accessLevel);
72
71
  let deleteMessage = "Are you sure you want to delete '";
@@ -81,7 +80,7 @@ class ExportViewPanelComponent extends React.Component {
81
80
  React.createElement(rebass_1.Flex, { flex: 1 },
82
81
  React.createElement(DropdownButton_1.default, { disabled: allReportNames.length == 0, style: { width: '100%', fontSize: 'small' }, items: reportItems, columns: ['label'], className: `ab-${elementType}__Export__select`, onClear: () => this.onSelectedReportChanged(null), showClearButton: !!currentReport, variant: "outlined", marginRight: 2 }, currentReportId)),
83
82
  React.createElement(rebass_1.Flex, { flex: 1 },
84
- React.createElement(DropdownButton_1.default, { disabled: currentReportId === SELECT_REPORT_STRING, style: { width: '100%', fontSize: 'small' }, items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
83
+ React.createElement(DropdownButton_1.default, { disabled: currentReportId === constants_1.SELECT_REPORT_STRING, style: { width: '100%', fontSize: 'small' }, items: destinationItems, columns: ['label'], className: `ab-${elementType}__Export__export`, onClear: () => this.onSelectedDestinationChanged(null), showClearButton: !!currentDestination, variant: "outlined", marginRight: 2 }, currentDestinationId)),
85
84
  React.createElement(rebass_1.Flex, { className: join_1.default(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls`), style: { width: '100%' } },
86
85
  React.createElement(ButtonExport_1.ButtonExport, { onClick: () => onApplyExport(), tooltip: "Export Report", className: `ab-${elementType}__Export__export`, disabled: currentReport == null || currentDestination == null }),
87
86
  React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => this.props.onEditReport(this.props.moduleInfo.Popup), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null || currentReport.ReportColumnScope == 'CustomColumns', accessLevel: accessLevel }),
@@ -1,5 +1,2 @@
1
- import * as React from 'react';
2
- import { Report } from '../../../types';
3
- export declare const ReportExportDropdown: React.FunctionComponent<{
4
- data: Report;
5
- }>;
1
+ import { AdaptableModuleViewAction } from '../../Strategy/Interface/IModule';
2
+ export declare const ReportExportDropdown: AdaptableModuleViewAction;
@@ -13,6 +13,7 @@ const ReportNameWizardSection_1 = require("./ReportNameWizardSection");
13
13
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
14
14
  const react_redux_1 = require("react-redux");
15
15
  const ExportRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ExportRedux"));
16
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
16
17
  exports.NewReportWizard = (props) => {
17
18
  var _a, _b;
18
19
  const isEdit = ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) ? props.popupParams.action === 'Edit'
@@ -59,6 +60,14 @@ exports.NewReportWizard = (props) => {
59
60
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
60
61
  React.createElement(ReportNameWizardSection_1.ReportNameWizardSection, { onChange: setReport }))),
61
62
  },
63
+ {
64
+ details: 'Select Report tags',
65
+ title: 'Tags',
66
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
67
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
68
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setReport }))),
69
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
70
+ },
62
71
  '-',
63
72
  {
64
73
  title: 'Summary',
@@ -0,0 +1,2 @@
1
+ export declare const SELECT_REPORT_STRING: string;
2
+ export declare const SELECT_DESTINATION_STRING: string;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SELECT_DESTINATION_STRING = exports.SELECT_REPORT_STRING = void 0;
4
+ exports.SELECT_REPORT_STRING = 'Select Report';
5
+ exports.SELECT_DESTINATION_STRING = 'Select Destination';
@@ -18,6 +18,7 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
18
18
  const react_redux_1 = require("react-redux");
19
19
  const isValidFlashingCellRules_1 = require("./isValidFlashingCellRules");
20
20
  const FlashingCellRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FlashingCellRedux"));
21
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
21
22
  exports.FlashingCellWizard = (props) => {
22
23
  const { api } = AdaptableContext_1.useAdaptable();
23
24
  const [flashingCell, setFlashingCell] = react_1.useState(() => {
@@ -84,6 +85,14 @@ exports.FlashingCellWizard = (props) => {
84
85
  renderSummary: FlashingCellStyleWizardSection_1.renderFlashingAlertStyleSummary,
85
86
  title: 'Flash Styles',
86
87
  },
88
+ {
89
+ details: 'Select Flashing Cell tags',
90
+ title: 'Tags',
91
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
92
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
93
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setFlashingCell }))),
94
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
95
+ },
87
96
  '-',
88
97
  {
89
98
  details: 'Review the Flashing Cell Rule',
@@ -16,6 +16,7 @@ const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
16
16
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
17
17
  const react_redux_1 = require("react-redux");
18
18
  const FormatColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FormatColumnRedux"));
19
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
19
20
  const adjustDisplayFormat = (formatColumn, api) => {
20
21
  formatColumn = Object.assign({}, formatColumn);
21
22
  const formatDataType = FormatColumnFormatWizardSection_1.getFormatDisplayTypeForScope(formatColumn.Scope, api);
@@ -137,6 +138,14 @@ function FormatColumnWizard(props) {
137
138
  React.createElement(FormatColumnSettingsWizardSection_1.FormatColumnSettingsWizardSection, { onChange: setFormatColumn })));
138
139
  },
139
140
  },
141
+ {
142
+ details: 'Select Format Column tags',
143
+ title: 'Tags',
144
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
145
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
146
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setFormatColumn }))),
147
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
148
+ },
140
149
  '-',
141
150
  {
142
151
  details: 'Review the Format Column',
@@ -11,6 +11,7 @@ const FreeTextColumnSettingsWizardSection_1 = require("./FreeTextColumnSettingsW
11
11
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
12
12
  const FreeTextColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FreeTextColumnRedux"));
13
13
  const react_redux_1 = require("react-redux");
14
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
14
15
  exports.FreeTextColumnWizard = (props) => {
15
16
  var _a;
16
17
  const allFreeTextColumns = react_redux_1.useSelector((state) => state.FreeTextColumn.FreeTextColumns);
@@ -45,6 +46,14 @@ exports.FreeTextColumnWizard = (props) => {
45
46
  React.createElement(FreeTextColumnSettingsWizardSection_1.FreeTextColumnSettingsWizardSection, { isEdit: Boolean(props.data), onChange: setFreeTextColumn })));
46
47
  },
47
48
  },
49
+ {
50
+ details: 'Select Free Text Column tags',
51
+ title: 'Tags',
52
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
53
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
54
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setFreeTextColumn }))),
55
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
56
+ },
48
57
  '-',
49
58
  {
50
59
  details: 'Review the Free Text Column',
@@ -4,7 +4,6 @@ interface GridOptionsProps extends React.ClassAttributes<GridOptionsComponent> {
4
4
  api: AdaptableApi;
5
5
  }
6
6
  export interface GridOptionsState {
7
- testString: string;
8
7
  showTotalFooter: boolean;
9
8
  showGroupFooter: boolean;
10
9
  }
@@ -11,7 +11,6 @@ class GridOptionsComponent extends React.Component {
11
11
  super(props);
12
12
  const gridOptions = props.api.internalApi.getAgGridInstance();
13
13
  this.state = {
14
- testString: 'Hello world',
15
14
  showTotalFooter: gridOptions.groupIncludeTotalFooter,
16
15
  showGroupFooter: gridOptions.groupIncludeFooter,
17
16
  };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import { AccessLevel, Layout } from '../../../types';
3
+ export declare const LayoutCloneButton: React.FunctionComponent<{
4
+ data: Layout;
5
+ accessLevel: AccessLevel;
6
+ }>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LayoutCloneButton = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
7
+ const AdaptableContext_1 = require("../AdaptableContext");
8
+ exports.LayoutCloneButton = ({ data, accessLevel }) => {
9
+ const adaptable = AdaptableContext_1.useAdaptable();
10
+ const isDisabled = accessLevel === 'ReadOnly';
11
+ const handleClick = React.useCallback(() => {
12
+ adaptable.api.layoutApi.showLayoutEditor(data.Name, 'Clone');
13
+ }, []);
14
+ return React.createElement(SimpleButton_1.default, { onClick: handleClick, disabled: isDisabled, variant: "text", icon: "clone" });
15
+ };
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import { Layout } from '../../../types';
2
+ import { AccessLevel, Layout } from '../../../types';
3
3
  export declare const LayoutRadioSelector: React.FunctionComponent<{
4
4
  data: Layout;
5
5
  id?: string;
6
+ accessLevel: AccessLevel;
6
7
  }>;
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
7
7
  const AdaptableContext_1 = require("../AdaptableContext");
8
- exports.LayoutRadioSelector = ({ data, }) => {
8
+ exports.LayoutRadioSelector = ({ data }) => {
9
9
  const adaptable = AdaptableContext_1.useAdaptable();
10
10
  const currentLayout = adaptable.api.layoutApi.getCurrentLayout();
11
11
  const layouts = adaptable.api.layoutApi.getAllLayout();
@@ -4,6 +4,7 @@ exports.LayoutStatusBarSubPanelPopover = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
+ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
7
8
  const AdaptableContext_1 = require("../AdaptableContext");
8
9
  const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
9
10
  const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
@@ -14,12 +15,16 @@ const colItems = [
14
15
  ];
15
16
  exports.LayoutStatusBarSubPanelPopover = () => {
16
17
  const adaptable = AdaptableContext_1.useAdaptable();
18
+ const accessLevel = adaptable.EntitlementService.getEntitlementAccessLevelForModule(ModuleConstants.LayoutModuleId);
17
19
  const layouts = adaptable.api.layoutApi.getAllLayout();
18
20
  return (React.createElement(rebass_1.Flex, { flexDirection: "column" },
19
21
  React.createElement(PanelWithRow_1.PanelWithRow, { colItems: colItems }),
20
22
  layouts.map((layout) => {
21
23
  return (React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: layout.Name, colItems: [
22
- { Content: React.createElement(LayoutRadioSelector_1.LayoutRadioSelector, { id: layout.Name, data: layout }), Size: 1 },
24
+ {
25
+ Content: (React.createElement(LayoutRadioSelector_1.LayoutRadioSelector, { accessLevel: accessLevel, id: layout.Name, data: layout })),
26
+ Size: 1,
27
+ },
23
28
  {
24
29
  Content: (React.createElement("label", { style: { cursor: 'pointer' }, htmlFor: layout.Name }, layout.Name)),
25
30
  Size: 4,
@@ -43,6 +43,7 @@ export declare class LayoutEditorWizard extends React.Component<LayoutEditorWiza
43
43
  Uuid?: string;
44
44
  Source?: "Config" | "User";
45
45
  IsReadOnly?: boolean;
46
+ Tags?: import("../../../PredefinedConfig/Common/AdaptableObject").AdaptableObjectTag[];
46
47
  };
47
48
  canNext(): boolean;
48
49
  canBack(): boolean;
@@ -11,6 +11,7 @@ const PlusMinusSettingsWizardSection_1 = require("./PlusMinusSettingsWizardSecti
11
11
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
12
12
  const react_redux_1 = require("react-redux");
13
13
  const PlusMinusRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PlusMinusRedux"));
14
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
14
15
  exports.PlusMinusWizard = (props) => {
15
16
  const [plusMinus, setPlusMinus] = React.useState(() => {
16
17
  var _a, _b, _c, _d, _e;
@@ -67,6 +68,14 @@ exports.PlusMinusWizard = (props) => {
67
68
  renderSummary: () => React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsSummary, { hasCondition: hasCondition }),
68
69
  render: () => (React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
69
70
  },
71
+ {
72
+ details: 'Select Plus/Minus tags',
73
+ title: 'Tags',
74
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
75
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
76
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setPlusMinus }))),
77
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
78
+ },
70
79
  '-',
71
80
  {
72
81
  render: () => {
@@ -12,6 +12,7 @@ const NamedQueryExpressionWizardSection_1 = require("./NamedQueryExpressionWizar
12
12
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
13
13
  const react_redux_1 = require("react-redux");
14
14
  const QueryRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/QueryRedux"));
15
+ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
15
16
  function NamedQueryWizard(props) {
16
17
  const [namedQuery, setNamedQuery] = react_1.useState(() => {
17
18
  var _a, _b;
@@ -47,6 +48,14 @@ function NamedQueryWizard(props) {
47
48
  return React.createElement(NamedQuerySettingsWizardSection_1.NamedQuerySettingsWizardSection, { onChange: setNamedQuery });
48
49
  },
49
50
  },
51
+ {
52
+ details: 'Select Query tags',
53
+ title: 'Tags',
54
+ isVisible: (_, api) => api.internalApi.shouldDisplayTagSections(),
55
+ render: () => (React.createElement(rebass_1.Box, { padding: 2 },
56
+ React.createElement(ObjectTagsWizardSection_1.ObjectTagsWizardSection, { onChange: setNamedQuery }))),
57
+ renderSummary: ObjectTagsWizardSection_1.renderObjectTagsSummary,
58
+ },
50
59
  '-',
51
60
  {
52
61
  title: 'Summary',