@adaptabletools/adaptable 11.2.4-canary.0 → 12.0.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 (266) hide show
  1. package/base.css +22 -4
  2. package/bundle.cjs.js +111 -111
  3. package/index.css +26 -4
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
  8. package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
  9. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ActionOptions.js} +0 -0
  10. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
  13. package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
  14. package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
  15. package/src/AdaptableOptions/{SmartEdit.js → ColumnOptions.js} +0 -0
  16. package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
  17. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
  18. package/src/AdaptableOptions/EditOptions.d.ts +92 -4
  19. package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
  20. package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
  21. package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
  22. package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
  23. package/src/AdaptableOptions/GeneralOptions.d.ts +22 -23
  24. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
  25. package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
  26. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
  27. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
  28. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +81 -54
  29. package/src/Api/AdaptableApi.d.ts +6 -3
  30. package/src/Api/ColumnApi.d.ts +6 -3
  31. package/src/Api/ConditionalStyleApi.d.ts +10 -0
  32. package/src/Api/ConfigApi.d.ts +0 -12
  33. package/src/Api/DashboardApi.d.ts +6 -19
  34. package/src/Api/DataSetApi.d.ts +40 -0
  35. package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
  36. package/src/Api/EventApi.d.ts +18 -1
  37. package/src/Api/Events/DataSetChanged.d.ts +5 -0
  38. package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
  39. package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
  40. package/src/Api/Events/RowFormSubmitted.js +2 -0
  41. package/src/Api/Events/SearchChanged.d.ts +3 -4
  42. package/src/Api/FilterApi.d.ts +1 -77
  43. package/src/Api/FinanceApi.d.ts +3 -2
  44. package/src/Api/FormatColumnApi.d.ts +28 -1
  45. package/src/Api/GridApi.d.ts +15 -1
  46. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  47. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  48. package/src/Api/Implementation/AlertApiImpl.js +5 -1
  49. package/src/Api/Implementation/ApiBase.d.ts +3 -0
  50. package/src/Api/Implementation/ApiBase.js +6 -0
  51. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
  52. package/src/Api/Implementation/ColumnApiImpl.js +6 -3
  53. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
  54. package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
  55. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  56. package/src/Api/Implementation/ConfigApiImpl.js +2 -24
  57. package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
  58. package/src/Api/Implementation/DashboardApiImpl.js +5 -29
  59. package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
  60. package/src/Api/Implementation/DataSetApiImpl.js +42 -0
  61. package/src/Api/Implementation/EventApiImpl.js +1 -0
  62. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -16
  63. package/src/Api/Implementation/FilterApiImpl.js +5 -164
  64. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -0
  65. package/src/Api/Implementation/FormatColumnApiImpl.js +34 -0
  66. package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
  67. package/src/Api/Implementation/GridApiImpl.js +41 -1
  68. package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
  69. package/src/Api/Implementation/InternalApiImpl.js +51 -10
  70. package/src/Api/Implementation/LayoutApiImpl.d.ts +18 -1
  71. package/src/Api/Implementation/LayoutApiImpl.js +172 -0
  72. package/src/Api/Implementation/PredicateApiImpl.js +1 -1
  73. package/src/Api/Implementation/SmartEditApiImpl.d.ts +5 -2
  74. package/src/Api/Implementation/SmartEditApiImpl.js +9 -0
  75. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
  76. package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
  77. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  78. package/src/Api/Implementation/UserInterfaceApiImpl.js +7 -25
  79. package/src/Api/InternalApi.d.ts +6 -2
  80. package/src/Api/LayoutApi.d.ts +88 -1
  81. package/src/Api/SmartEditApi.d.ts +14 -3
  82. package/src/Api/TeamSharingApi.d.ts +18 -5
  83. package/src/Api/UserInterfaceApi.d.ts +4 -4
  84. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  85. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
  86. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
  87. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
  88. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
  89. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +6 -3
  90. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
  91. package/src/PredefinedConfig/Common/AdaptablePredicate.js +35 -2
  92. package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
  93. package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
  94. package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
  95. package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
  96. package/src/PredefinedConfig/Common/Enums.js +1 -1
  97. package/src/PredefinedConfig/Common/FDC3Context.d.ts +5 -1
  98. package/src/PredefinedConfig/Common/Types.d.ts +6 -5
  99. package/src/PredefinedConfig/Common/Types.js +2 -3
  100. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  101. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  102. package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
  103. package/src/PredefinedConfig/SystemState.d.ts +4 -2
  104. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
  105. package/src/Redux/ActionsReducers/LayoutRedux.js +135 -1
  106. package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -1
  107. package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
  108. package/src/Redux/Store/AdaptableStore.js +37 -39
  109. package/src/Strategy/AlertModule.d.ts +11 -0
  110. package/src/Strategy/AlertModule.js +14 -0
  111. package/src/Strategy/CellSummaryModule.d.ts +3 -0
  112. package/src/Strategy/CellSummaryModule.js +28 -14
  113. package/src/Strategy/DataSetModule.d.ts +25 -0
  114. package/src/Strategy/DataSetModule.js +65 -0
  115. package/src/Strategy/ExportModule.js +6 -1
  116. package/src/Strategy/FilterModule.d.ts +7 -11
  117. package/src/Strategy/FilterModule.js +24 -15
  118. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  119. package/src/Strategy/FlashingCellModule.js +2 -2
  120. package/src/Strategy/FormatColumnModule.js +1 -1
  121. package/src/Strategy/Interface/IModule.d.ts +3 -1
  122. package/src/Strategy/LayoutModule.js +24 -2
  123. package/src/Strategy/SmartEditModule.d.ts +1 -1
  124. package/src/Strategy/SmartEditModule.js +5 -6
  125. package/src/Strategy/StatusBarModule.js +1 -3
  126. package/src/Strategy/TeamSharingModule.js +1 -1
  127. package/src/Strategy/ToolPanelModule.js +1 -4
  128. package/src/Utilities/Constants/GeneralConstants.d.ts +6 -2
  129. package/src/Utilities/Constants/GeneralConstants.js +6 -2
  130. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
  131. package/src/Utilities/Constants/ModuleConstants.js +2 -2
  132. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +22 -13
  133. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  134. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
  135. package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
  136. package/src/Utilities/ObjectFactory.d.ts +3 -6
  137. package/src/Utilities/ObjectFactory.js +3 -7
  138. package/src/Utilities/Services/EntitlementService.js +7 -1
  139. package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
  140. package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
  141. package/src/Utilities/Services/ModuleService.js +1 -1
  142. package/src/Utilities/Services/ReportService.js +2 -3
  143. package/src/Utilities/Services/RowEditService.d.ts +25 -0
  144. package/src/Utilities/Services/RowEditService.js +165 -0
  145. package/src/Utilities/Services/TeamSharingService.js +4 -4
  146. package/src/View/AdaptablePopover/index.d.ts +1 -0
  147. package/src/View/AdaptablePopover/index.js +5 -6
  148. package/src/View/AdaptableView.js +1 -1
  149. package/src/View/AdaptableViewFactory.js +2 -2
  150. package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
  151. package/src/View/Alert/ActiveAlertsPanel.js +15 -0
  152. package/src/View/Alert/AlertStatusSubPanel.js +3 -8
  153. package/src/View/Alert/AlertViewPanel.js +2 -2
  154. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
  155. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  156. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  157. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
  158. package/src/View/CellSummary/CellSummaryDetails.js +2 -2
  159. package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
  160. package/src/View/CellSummary/CellSummaryPopover.js +3 -6
  161. package/src/View/CellSummary/CellSummaryPopup.js +8 -0
  162. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
  163. package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
  164. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  165. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
  166. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
  167. package/src/View/Components/ExternalRenderer.d.ts +3 -6
  168. package/src/View/Components/ExternalRenderer.js +5 -5
  169. package/src/View/Components/FilterForm/FilterForm.d.ts +5 -2
  170. package/src/View/Components/FilterForm/FilterForm.js +9 -7
  171. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
  172. package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
  173. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
  174. package/src/View/Components/FilterForm/QuickFilterForm.js +21 -7
  175. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  176. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
  177. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
  178. package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
  179. package/src/View/Components/Popups/AdaptableToaster.js +29 -9
  180. package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
  181. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
  182. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
  183. package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
  184. package/src/View/Dashboard/CustomDashboardButton.js +47 -0
  185. package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
  186. package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
  187. package/src/View/Dashboard/Dashboard.d.ts +1 -0
  188. package/src/View/Dashboard/Dashboard.js +8 -34
  189. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
  190. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
  191. package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
  192. package/src/View/DataSet/DataSetSelector.d.ts +7 -0
  193. package/src/View/DataSet/DataSetSelector.js +18 -0
  194. package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
  195. package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
  196. package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
  197. package/src/View/DataSet/DataSetViewPanel.js +58 -0
  198. package/src/View/Filter/ActiveFiltersPanel.js +1 -1
  199. package/src/View/Filter/FilterSummary.d.ts +5 -5
  200. package/src/View/Filter/FilterSummary.js +6 -5
  201. package/src/View/Filter/FilterViewPanel.d.ts +4 -4
  202. package/src/View/Filter/FilterViewPanel.js +11 -14
  203. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
  204. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +51 -22
  205. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
  206. package/src/View/GridInfo/GridInfoPopup.js +1 -1
  207. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
  208. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  209. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -1
  210. package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
  211. package/src/View/SmartEdit/SmartEditPopup.js +3 -4
  212. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
  213. package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
  214. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  215. package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
  216. package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
  217. package/src/View/StatusBar/StatusBarPanel.js +5 -4
  218. package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
  219. package/src/View/UIHelper.d.ts +4 -4
  220. package/src/View/UIHelper.js +4 -4
  221. package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
  222. package/src/agGrid/ActionColumnRenderer.js +9 -6
  223. package/src/agGrid/Adaptable.d.ts +7 -2
  224. package/src/agGrid/Adaptable.js +217 -87
  225. package/src/agGrid/FilterWrapper.js +1 -1
  226. package/src/agGrid/agGridHelper.d.ts +6 -6
  227. package/src/agGrid/agGridHelper.js +34 -56
  228. package/src/agGrid/agGridMenuHelper.js +4 -1
  229. package/src/agGrid/rowEditIcons.d.ts +4 -0
  230. package/src/agGrid/rowEditIcons.js +9 -0
  231. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
  232. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  233. package/src/components/Datepicker/index.js +19 -18
  234. package/src/components/SelectList.d.ts +10 -0
  235. package/src/components/SelectList.js +9 -0
  236. package/src/components/WindowModal/WindowModal.d.ts +2 -0
  237. package/src/components/WindowModal/WindowModal.js +1 -1
  238. package/src/components/icons/{data-source.d.ts → data-set.d.ts} +0 -0
  239. package/src/components/icons/{data-source.js → data-set.js} +0 -0
  240. package/src/components/icons/index.js +2 -2
  241. package/src/metamodel/adaptable.metamodel.d.ts +242 -70
  242. package/src/metamodel/adaptable.metamodel.js +620 -376
  243. package/src/types.d.ts +19 -15
  244. package/version.d.ts +1 -1
  245. package/version.js +1 -1
  246. package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
  247. package/src/Api/DataSourceApi.d.ts +0 -58
  248. package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
  249. package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
  250. package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
  251. package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
  252. package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
  253. package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
  254. package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
  255. package/src/Strategy/DataSourceModule.d.ts +0 -20
  256. package/src/Strategy/DataSourceModule.js +0 -56
  257. package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
  258. package/src/View/Components/Forms/AdaptableForm.js +0 -21
  259. package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
  260. package/src/View/DataSource/DataSourceViewPanel.js +0 -69
  261. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
  262. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
  263. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
  264. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
  265. package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
  266. package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
@@ -1,20 +0,0 @@
1
- /// <reference types="react" />
2
- import { AdaptableModuleBase } from './AdaptableModuleBase';
3
- import * as DataSourceRedux from '../Redux/ActionsReducers/DataSourceRedux';
4
- import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
5
- import { DataSource } from '../PredefinedConfig/DataSourceState';
6
- import { AdaptableObjectView, IModule } from './Interface/IModule';
7
- import { AdaptableApi } from '../Api/AdaptableApi';
8
- import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
9
- export declare class DataSourceModule extends AdaptableModuleBase implements IModule {
10
- constructor(api: AdaptableApi);
11
- getModuleAdaptableObjects(): AdaptableObject[];
12
- hasNamedQueryReferences(): boolean;
13
- getTeamSharingAction(): TeamSharingImportInfo<DataSource>;
14
- toView(dataSource: DataSource): AdaptableObjectView;
15
- toViewAll(): AdaptableObjectView[];
16
- getViewProperties(): {
17
- getDeleteAction: (dataSource: DataSource) => DataSourceRedux.DataSourceDeleteAction;
18
- getEditWizard: () => import("react").FunctionComponent<import("../View/DataSource/Wizard/DataSourceWizard").DataSourceWizardProps>;
19
- };
20
- }
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSourceModule = void 0;
4
- const tslib_1 = require("tslib");
5
- const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
6
- const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
7
- const DataSourceRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/DataSourceRedux"));
8
- const DataSourceWizard_1 = require("../View/DataSource/Wizard/DataSourceWizard");
9
- const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
10
- class DataSourceModule extends AdaptableModuleBase_1.AdaptableModuleBase {
11
- constructor(api) {
12
- super(ModuleConstants.DataSourceModuleId, 'Data Source', 'data-source', 'DataSourcePopup', 'Update the entire data set in AdapTable using pre-populated data sources', api);
13
- }
14
- getModuleAdaptableObjects() {
15
- return this.api.dataSourceApi.getAllDataSource();
16
- }
17
- hasNamedQueryReferences() {
18
- return false;
19
- }
20
- getTeamSharingAction() {
21
- return {
22
- ModuleEntities: this.api.dataSourceApi.getAllDataSource(),
23
- AddAction: DataSourceRedux.DataSourceAdd,
24
- EditAction: DataSourceRedux.DataSourceEdit,
25
- };
26
- }
27
- toView(dataSource) {
28
- var _a;
29
- return {
30
- items: [
31
- {
32
- name: 'Settings',
33
- label: 'Name',
34
- values: [dataSource.Name],
35
- },
36
- {
37
- name: 'Settings',
38
- label: 'Description',
39
- values: [(_a = dataSource.Description) !== null && _a !== void 0 ? _a : 'Not Specified'],
40
- },
41
- getObjectTagsViewItems_1.getObjectTagsViewItems(dataSource, this.api),
42
- ],
43
- abObject: dataSource,
44
- };
45
- }
46
- toViewAll() {
47
- return this.getModuleAdaptableObjects().map((dataSource) => this.toView(dataSource));
48
- }
49
- getViewProperties() {
50
- return {
51
- getDeleteAction: DataSourceRedux.DataSourceDelete,
52
- getEditWizard: () => DataSourceWizard_1.DataSourceWizard,
53
- };
54
- }
55
- }
56
- exports.DataSourceModule = DataSourceModule;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- export declare type AdaptableFormProps = any;
3
- export declare class AdaptableForm extends React.Component<AdaptableFormProps, {}> {
4
- render(): JSX.Element;
5
- CancelOnFormSubmit: (e: React.FormEvent<any>) => void;
6
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdaptableForm = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- class AdaptableForm extends React.Component {
7
- constructor() {
8
- super(...arguments);
9
- this.CancelOnFormSubmit = (e) => {
10
- e.preventDefault();
11
- if (this.props.onSubmit) {
12
- this.props.onSubmit(null);
13
- }
14
- };
15
- }
16
- render() {
17
- const _a = this.props, { children } = _a, attrs = tslib_1.__rest(_a, ["children"]);
18
- return (React.createElement("form", Object.assign({}, attrs, { onSubmit: this.CancelOnFormSubmit }), children));
19
- }
20
- }
21
- exports.AdaptableForm = AdaptableForm;
@@ -1,19 +0,0 @@
1
- import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
2
- import { DataSource } from '../../PredefinedConfig/DataSourceState';
3
- import * as React from 'react';
4
- import * as Redux from 'redux';
5
- export interface DataSourceViewPanelComponentProps extends ViewPanelProps {
6
- CurrentDataSourceName: string;
7
- DataSources: DataSource[];
8
- onSelectDataSource: (DataSource: DataSource) => Redux.Action;
9
- }
10
- interface DataSourceViewPanelComponentState {
11
- CurrentDataSource: DataSource;
12
- }
13
- declare class DataSourceViewPanelComponent extends React.Component<DataSourceViewPanelComponentProps, DataSourceViewPanelComponentState> {
14
- constructor(props: DataSourceViewPanelComponentProps);
15
- render(): JSX.Element;
16
- onSelectedDataSourceChanged(dataSourceName: string): void;
17
- }
18
- export declare let DataSourceViewPanelControl: import("react-redux").ConnectedComponent<typeof DataSourceViewPanelComponent, Pick<React.ClassAttributes<DataSourceViewPanelComponent> & DataSourceViewPanelComponentProps, "ref" | "key">>;
19
- export {};
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSourceViewPanelControl = void 0;
4
- const tslib_1 = require("tslib");
5
- const DataSourceRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/DataSourceRedux"));
6
- const React = tslib_1.__importStar(require("react"));
7
- const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
8
- const rebass_1 = require("rebass");
9
- const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
10
- const react_redux_1 = require("react-redux");
11
- const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
12
- class DataSourceViewPanelComponent extends React.Component {
13
- constructor(props) {
14
- super(props);
15
- this.state = {
16
- CurrentDataSource: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.CurrentDataSourceName)
17
- ? null
18
- : this.props.DataSources.find((ds) => ds.Name == this.props.CurrentDataSourceName),
19
- };
20
- }
21
- render() {
22
- const selectDataSourceString = 'Select Data Source';
23
- let currentDataSourceName = this.state.CurrentDataSource == null
24
- ? selectDataSourceString
25
- : this.state.CurrentDataSource.Name;
26
- let availableDataSources = this.props.DataSources.map((dataSource) => {
27
- return {
28
- value: dataSource.Name,
29
- label: dataSource.Name,
30
- onClick: () => this.onSelectedDataSourceChanged(dataSource.Name),
31
- };
32
- });
33
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
34
- return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__DataSource__wrap` },
35
- React.createElement(DropdownButton_1.default, { marginRight: 2, columns: ['label'], style: { minWidth: 160, fontSize: 'small' }, className: `ab-${elementType}__DataSource__select`, items: availableDataSources, variant: "outlined", tone: 'neutral' }, currentDataSourceName)));
36
- }
37
- onSelectedDataSourceChanged(dataSourceName) {
38
- if (StringExtensions_1.StringExtensions.IsNullOrEmpty(dataSourceName)) {
39
- this.setState({ CurrentDataSource: null });
40
- }
41
- else {
42
- let newDataSource = this.props.DataSources.find((ds) => ds.Name == dataSourceName);
43
- this.setState({ CurrentDataSource: newDataSource });
44
- this.props.onSelectDataSource(newDataSource);
45
- }
46
- }
47
- }
48
- function mapStateToProps(state) {
49
- return {
50
- CurrentDataSourceName: state.DataSource.CurrentDataSource,
51
- DataSources: state.DataSource.DataSources,
52
- };
53
- }
54
- function mapDispatchToProps(dispatch) {
55
- return {
56
- onSelectDataSource: (dataSource) => {
57
- if (dataSource.Form) {
58
- return dispatch(PopupRedux_1.PopupShowForm({
59
- Id: 'data-source-form',
60
- Form: dataSource.Form,
61
- }));
62
- }
63
- else {
64
- return dispatch(DataSourceRedux.DataSourceSelect(dataSource));
65
- }
66
- },
67
- };
68
- }
69
- exports.DataSourceViewPanelControl = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(DataSourceViewPanelComponent);
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const DataSourceSettingsSummary: () => JSX.Element;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSourceSettingsSummary = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const Tag_1 = require("../../../components/Tag");
7
- const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
8
- exports.DataSourceSettingsSummary = () => {
9
- const { data: dataSource } = OnePageAdaptableWizard_1.useOnePageWizardContext();
10
- return (React.createElement(React.Fragment, null,
11
- React.createElement(OnePageAdaptableWizard_1.SummaryText, null,
12
- "Name: ",
13
- React.createElement(Tag_1.Tag, null, dataSource.Name || 'not specified')),
14
- React.createElement(OnePageAdaptableWizard_1.SummaryText, null,
15
- "Name: ",
16
- React.createElement(Tag_1.Tag, null, dataSource.Description || 'not specified'))));
17
- };
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { DataSource } from '../../../types';
3
- export declare const isSettingsValid: (dataSource: DataSource, isNew: boolean, dataSources: DataSource[]) => true | "Data source name not specified" | "A data source already exists with that name" | "Data source description not specified";
4
- interface DataSourceSettingsWizard {
5
- onChange: (dataSource: DataSource) => void;
6
- }
7
- export declare const DataSourceSettingsWizard: React.FunctionComponent<DataSourceSettingsWizard>;
8
- export {};
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSourceSettingsWizard = exports.isSettingsValid = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const rebass_1 = require("rebass");
7
- const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
8
- const Tabs_1 = require("../../../components/Tabs");
9
- const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
10
- const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
11
- exports.isSettingsValid = (dataSource, isNew, dataSources) => {
12
- if (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.Name)) {
13
- return 'Data source name not specified';
14
- }
15
- if (isNew && (dataSources === null || dataSources === void 0 ? void 0 : dataSources.find((item) => item.Name === dataSource.Name))) {
16
- return 'A data source already exists with that name';
17
- }
18
- if (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.Description)) {
19
- return 'Data source description not specified';
20
- }
21
- return true;
22
- };
23
- exports.DataSourceSettingsWizard = (props) => {
24
- const { data: dataSource } = OnePageAdaptableWizard_1.useOnePageWizardContext();
25
- const handleNameChange = (event) => {
26
- var _a;
27
- props.onChange(Object.assign(Object.assign({}, dataSource), { Name: (_a = event.target) === null || _a === void 0 ? void 0 : _a.value }));
28
- };
29
- const handleDescriptionChange = (event) => {
30
- var _a;
31
- props.onChange(Object.assign(Object.assign({}, dataSource), { Description: (_a = event.target) === null || _a === void 0 ? void 0 : _a.value }));
32
- };
33
- return (React.createElement(rebass_1.Box, { "data-name": "data-soruce-settings" },
34
- React.createElement(Tabs_1.Tabs, { autoFocus: false },
35
- React.createElement(Tabs_1.Tabs.Tab, null, "Data Source Settings"),
36
- React.createElement(Tabs_1.Tabs.Content, null,
37
- React.createElement(FormLayout_1.default, null,
38
- React.createElement(FormLayout_1.FormRow, { label: "Name" },
39
- React.createElement(Input_1.default, { width: 300, onChange: handleNameChange, placeholder: "Enter Data Source name", type: "string", value: dataSource === null || dataSource === void 0 ? void 0 : dataSource.Name })),
40
- React.createElement(FormLayout_1.FormRow, { label: "Description" },
41
- React.createElement(Input_1.default, { width: 300, onChange: handleDescriptionChange, placeholder: "Enter description", type: "string", value: dataSource === null || dataSource === void 0 ? void 0 : dataSource.Description })))))));
42
- };
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableOnePageWizardProps } from '../../../View/Wizard/Interface/IAdaptableWizard';
3
- import { DataSource } from '../../../types';
4
- export interface DataSourceWizardProps extends AdaptableOnePageWizardProps<DataSource> {
5
- dataSources: DataSource[];
6
- isNew: boolean;
7
- }
8
- export declare const DataSourceWizard: React.FunctionComponent<DataSourceWizardProps>;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DataSourceWizard = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const rebass_1 = require("rebass");
7
- const OnePageAdaptableWizard_1 = require("../../../View/Wizard/OnePageAdaptableWizard");
8
- const DataSourceSettingsWizard_1 = require("./DataSourceSettingsWizard");
9
- const DataSourceSettingsSummary_1 = require("./DataSourceSettingsSummary");
10
- const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
11
- const react_redux_1 = require("react-redux");
12
- const DataSourceRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/DataSourceRedux"));
13
- const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
14
- exports.DataSourceWizard = (props) => {
15
- const [dataSource, setDataSource] = React.useState(() => {
16
- return props.data ? props.data : ObjectFactory_1.default.CreateEmptyDataSource();
17
- });
18
- const dispatch = react_redux_1.useDispatch();
19
- const handleFinish = () => {
20
- if (props.data) {
21
- dispatch(DataSourceRedux.DataSourceEdit(dataSource));
22
- }
23
- else {
24
- dispatch(DataSourceRedux.DataSourceAdd(dataSource));
25
- }
26
- props.onFinishWizard(dataSource);
27
- };
28
- return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: dataSource, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
29
- {
30
- title: 'Settings',
31
- isValid: (data) => DataSourceSettingsWizard_1.isSettingsValid(data, props.isNew, props.dataSources),
32
- renderSummary: () => React.createElement(DataSourceSettingsSummary_1.DataSourceSettingsSummary, null),
33
- render: () => (React.createElement(rebass_1.Box, { padding: 2 },
34
- React.createElement(DataSourceSettingsWizard_1.DataSourceSettingsWizard, { onChange: setDataSource }))),
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
- '-',
45
- {
46
- render: () => {
47
- return (React.createElement(rebass_1.Box, { padding: 2 },
48
- React.createElement(OnePageAdaptableWizard_1.OnePageWizardSummary, null)));
49
- },
50
- title: 'Summary',
51
- },
52
- ] }));
53
- };