@adaptabletools/adaptable 12.1.5 → 12.1.8-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 (214) hide show
  1. package/base.css +11 -49
  2. package/bundle.cjs.js +106 -106
  3. package/index.css +13 -60
  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 +12 -4
  8. package/src/AdaptableOptions/ColumnOptions.d.ts +2 -4
  9. package/src/AdaptableOptions/FilterOptions.d.ts +19 -0
  10. package/src/AdaptableOptions/FinancePluginOptions.d.ts +22 -1
  11. package/src/AdaptableOptions/StateOptions.d.ts +25 -12
  12. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +31 -24
  13. package/src/Api/ColumnApi.d.ts +6 -1
  14. package/src/Api/ExportApi.d.ts +5 -0
  15. package/src/Api/FilterApi.d.ts +29 -0
  16. package/src/Api/FlashingCellApi.d.ts +8 -0
  17. package/src/Api/GridApi.d.ts +1 -0
  18. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
  19. package/src/Api/Implementation/ColumnApiImpl.js +7 -2
  20. package/src/Api/Implementation/DataSetApiImpl.js +1 -1
  21. package/src/Api/Implementation/ExportApiImpl.d.ts +3 -1
  22. package/src/Api/Implementation/ExportApiImpl.js +19 -3
  23. package/src/Api/Implementation/FilterApiImpl.d.ts +6 -0
  24. package/src/Api/Implementation/FilterApiImpl.js +42 -4
  25. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  26. package/src/Api/Implementation/FlashingCellApiImpl.js +4 -0
  27. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  28. package/src/Api/Implementation/GridApiImpl.js +4 -4
  29. package/src/Api/Implementation/InternalApiImpl.d.ts +0 -1
  30. package/src/Api/Implementation/InternalApiImpl.js +0 -3
  31. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -1
  32. package/src/Api/Implementation/LayoutApiImpl.js +4 -3
  33. package/src/Api/Implementation/PredicateApiImpl.js +4 -0
  34. package/src/Api/Implementation/QueryApiImpl.js +1 -1
  35. package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -1
  36. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -1
  37. package/src/Api/InternalApi.d.ts +0 -1
  38. package/src/Api/LayoutApi.d.ts +1 -1
  39. package/src/Api/SystemStatusApi.d.ts +1 -1
  40. package/src/Api/ToolPanelApi.d.ts +1 -1
  41. package/src/PredefinedConfig/CalculatedColumnState.d.ts +2 -2
  42. package/src/PredefinedConfig/Common/AdaptableColumn.js +3 -2
  43. package/src/PredefinedConfig/Common/AdaptablePredicate.js +30 -10
  44. package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -1
  45. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +6 -0
  46. package/src/PredefinedConfig/Common/AggregationColumns.js +4 -0
  47. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
  48. package/src/PredefinedConfig/Common/Enums.d.ts +0 -15
  49. package/src/PredefinedConfig/Common/Enums.js +1 -18
  50. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +6 -6
  51. package/src/PredefinedConfig/ExportState.d.ts +12 -4
  52. package/src/PredefinedConfig/LayoutState.d.ts +2 -1
  53. package/src/PredefinedConfig/PopupState.d.ts +1 -2
  54. package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
  55. package/src/Redux/ActionsReducers/AlertRedux.js +1 -1
  56. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
  57. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +1 -1
  58. package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
  59. package/src/Redux/ActionsReducers/CustomSortRedux.js +1 -1
  60. package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +1 -1
  61. package/src/Redux/ActionsReducers/FlashingCellRedux.js +1 -1
  62. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
  63. package/src/Redux/ActionsReducers/FormatColumnRedux.js +1 -1
  64. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +28 -0
  65. package/src/Redux/ActionsReducers/LayoutRedux.js +80 -2
  66. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
  67. package/src/Redux/ActionsReducers/PlusMinusRedux.js +1 -1
  68. package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
  69. package/src/Redux/ActionsReducers/PopupRedux.js +1 -28
  70. package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
  71. package/src/Redux/ActionsReducers/ScheduleRedux.js +5 -5
  72. package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
  73. package/src/Redux/ActionsReducers/ShortcutRedux.js +1 -1
  74. package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -2
  75. package/src/Redux/ActionsReducers/SystemRedux.js +1 -2
  76. package/src/Redux/Store/AdaptableStore.js +30 -16
  77. package/src/Strategy/AlertModule.d.ts +1 -0
  78. package/src/Strategy/AlertModule.js +20 -0
  79. package/src/Strategy/CalculatedColumnModule.js +2 -2
  80. package/src/Strategy/ExportModule.d.ts +0 -1
  81. package/src/Strategy/ExportModule.js +0 -16
  82. package/src/Strategy/FilterModule.js +6 -0
  83. package/src/Strategy/FlashingCellModule.js +2 -2
  84. package/src/Strategy/Interface/IModule.d.ts +4 -0
  85. package/src/Strategy/LayoutModule.js +20 -20
  86. package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +16 -1
  87. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +15 -11
  88. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  89. package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
  90. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
  91. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +12 -2
  92. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +30 -66
  93. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +22 -6
  94. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +423 -220
  95. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +7 -1
  96. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +23 -7
  97. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +0 -1
  98. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -54
  99. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +17 -5
  100. package/src/Utilities/Extensions/ArrayExtensions.js +6 -0
  101. package/src/Utilities/Helpers/CalendarHelper.js +10 -7
  102. package/src/Utilities/Helpers/DateHelper.d.ts +0 -26
  103. package/src/Utilities/Helpers/DateHelper.js +2 -32
  104. package/src/Utilities/Interface/MessagePopups.d.ts +0 -4
  105. package/src/Utilities/ObjectFactory.d.ts +6 -4
  106. package/src/Utilities/ObjectFactory.js +30 -17
  107. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +25 -0
  108. package/src/Utilities/Services/AggregatedScalarLiveValue.js +103 -0
  109. package/src/Utilities/Services/AlertService.d.ts +0 -1
  110. package/src/Utilities/Services/AlertService.js +5 -17
  111. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +4 -4
  112. package/src/Utilities/Services/CalculatedColumnExpressionService.js +29 -154
  113. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
  114. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +6 -3
  115. package/src/Utilities/Services/QueryLanguageService.d.ts +6 -3
  116. package/src/Utilities/Services/QueryLanguageService.js +23 -6
  117. package/src/Utilities/Services/ReportService.js +47 -46
  118. package/src/View/AdaptableView.js +1 -2
  119. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.d.ts +2 -0
  120. package/src/View/CalculatedColumn/Utilities/{getCalculatedColumnSettingTags.js → getCalculatedColumnSettingsTags.js} +5 -3
  121. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +10 -0
  122. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +80 -0
  123. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +21 -15
  124. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -2
  125. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +10 -53
  126. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +14 -3
  127. package/src/View/Components/AdaptableDateInput/index.js +1 -1
  128. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +42 -6
  129. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
  130. package/src/View/Components/EntityRulesEditor/index.js +26 -5
  131. package/src/View/Components/FilterForm/FilterForm.js +10 -5
  132. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -0
  133. package/src/View/Components/FilterForm/QuickFilterForm.js +12 -7
  134. package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +9 -0
  135. package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +28 -0
  136. package/src/View/Components/PermittedValuesSelector/index.d.ts +1 -0
  137. package/src/View/Components/PermittedValuesSelector/index.js +5 -0
  138. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +2 -2
  139. package/src/View/Components/Popups/AdaptableToaster.js +2 -7
  140. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
  141. package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -4
  142. package/src/View/Export/ExportViewPanel.d.ts +1 -2
  143. package/src/View/Export/ExportViewPanel.js +2 -6
  144. package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -2
  145. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +11 -12
  146. package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -2
  147. package/src/View/Export/Wizard/ReportRowTypeWizard.js +12 -13
  148. package/src/View/Export/Wizard/ReportSettingsWizard.js +1 -2
  149. package/src/View/Filter/FilterViewPanel.js +20 -4
  150. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  151. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
  152. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  153. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +1 -1
  154. package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.d.ts +0 -0
  155. package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.js +0 -0
  156. package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
  157. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +1 -0
  158. package/src/View/Layout/Wizard/sections/AggregationsSection.js +69 -8
  159. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  160. package/src/View/Query/QueryViewPanel.js +1 -1
  161. package/src/agGrid/Adaptable.d.ts +12 -3
  162. package/src/agGrid/Adaptable.js +225 -152
  163. package/src/agGrid/agGridHelper.d.ts +1 -0
  164. package/src/agGrid/agGridHelper.js +5 -3
  165. package/src/agGrid/agGridMenuHelper.d.ts +1 -0
  166. package/src/agGrid/agGridMenuHelper.js +4 -2
  167. package/src/agGrid/weightedAverage.d.ts +6 -0
  168. package/src/agGrid/weightedAverage.js +66 -0
  169. package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -0
  170. package/src/components/ExpressionEditor/BaseEditorInput.js +2 -3
  171. package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
  172. package/src/components/ExpressionEditor/EditorInput.js +24 -4
  173. package/src/components/ExpressionEditor/{EditorInputReactive.d.ts → EditorInputWithWhereClause.d.ts} +3 -3
  174. package/src/components/ExpressionEditor/{EditorInputReactive.js → EditorInputWithWhereClause.js} +6 -5
  175. package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.d.ts +2 -0
  176. package/src/components/ExpressionEditor/{editorButtonsReactive.js → editorButtonsAggregatedBoolean.js} +22 -37
  177. package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
  178. package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.d.ts +2 -0
  179. package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +50 -0
  180. package/src/components/ExpressionEditor/editorButtonsObservable.d.ts +2 -0
  181. package/src/components/ExpressionEditor/editorButtonsObservable.js +40 -0
  182. package/src/components/ExpressionEditor/index.d.ts +1 -1
  183. package/src/components/ExpressionEditor/index.js +26 -5
  184. package/src/components/ProgressIndicator/ProgressIndicator.js +10 -12
  185. package/src/metamodel/adaptable.metamodel.d.ts +129 -7
  186. package/src/metamodel/adaptable.metamodel.js +1 -1
  187. package/src/parser/src/types.d.ts +1 -1
  188. package/src/types.d.ts +4 -4
  189. package/version.d.ts +1 -1
  190. package/version.js +1 -1
  191. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.d.ts +0 -2
  192. package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +0 -3
  193. package/src/View/Layout/LayoutEditorStandalonePopup.js +0 -78
  194. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.d.ts +0 -27
  195. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +0 -86
  196. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.d.ts +0 -16
  197. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +0 -89
  198. package/src/View/Layout/Wizard/LayoutEditor/PivotList.d.ts +0 -15
  199. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +0 -70
  200. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.d.ts +0 -15
  201. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +0 -70
  202. package/src/View/Layout/Wizard/LayoutEditor/droppableIds.d.ts +0 -7
  203. package/src/View/Layout/Wizard/LayoutEditor/droppableIds.js +0 -11
  204. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.d.ts +0 -6
  205. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +0 -26
  206. package/src/View/Layout/Wizard/LayoutEditor/index.d.ts +0 -9
  207. package/src/View/Layout/Wizard/LayoutEditor/index.js +0 -367
  208. package/src/View/Layout/Wizard/LayoutEditor/reducer.d.ts +0 -28
  209. package/src/View/Layout/Wizard/LayoutEditor/reducer.js +0 -46
  210. package/src/View/Layout/Wizard/LayoutEditor/utils.d.ts +0 -10
  211. package/src/View/Layout/Wizard/LayoutEditor/utils.js +0 -14
  212. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +0 -30
  213. package/src/View/Layout/Wizard/LayoutEditorWizard.js +0 -132
  214. package/src/components/ExpressionEditor/editorButtonsReactive.d.ts +0 -2
@@ -16,7 +16,7 @@ export declare type Token = {
16
16
  */
17
17
  export interface ExpressionContext extends BaseContext {
18
18
  /**
19
- * Current row node in grid being evaluated
19
+ * Current AG Grid Row Node being evaluated
20
20
  */
21
21
  node: any;
22
22
  /**
package/src/types.d.ts CHANGED
@@ -21,18 +21,18 @@ export type { IPushPullPluginOptions } from './AdaptableOptions/IPushPullPluginO
21
21
  export type { LayoutOptions, LayoutViewOptions, LayoutTagOptions, LayoutAvailableContext, AutoGenerateTagsForLayoutsContext, LayoutAssociatedObject, } from './AdaptableOptions/LayoutOptions';
22
22
  export type { OpenFinPluginOptions } from './AdaptableOptions/OpenFinPluginOptions';
23
23
  export type { MasterDetailPluginOptions } from './AdaptableOptions/MasterDetailPluginOptions';
24
- export type { FinancePluginOptions, WeightedAverageColumn, FDC3Column, InstrumentColumn, PositionColumn, CountryColumn, InstrumentIntent, InstrumentIntents, PositionIntent, PositionIntents, ContactIntent, ContactIntents, CountryIntent, CountryIntents, ContactColumn, OrganizationColumn, OrganizationIntent, OrganizationIntents, FDC3Intent, RaiseFDC3IntentContext, CustomFDC3Column, CustomFDC3Intent, } from './AdaptableOptions/FinancePluginOptions';
24
+ export type { FinancePluginOptions, WeightedAverageColumn, FDC3Column, InstrumentColumn, PositionColumn, CountryColumn, InstrumentIntent, InstrumentIntents, PositionIntent, PositionIntents, ContactIntent, ContactIntents, CountryIntent, CountryIntents, ContactColumn, OrganizationColumn, OrganizationIntent, OrganizationIntents, FDC3Intent, RaiseFDC3IntentContext, FDC3DesktopAgent, CustomFDC3Column, CustomFDC3Intent, } from './AdaptableOptions/FinancePluginOptions';
25
25
  export type { DateInputOptions } from './AdaptableOptions/DateInputOptions';
26
26
  export type { FilterOptions } from './AdaptableOptions/FilterOptions';
27
27
  export type { SearchOptions } from './AdaptableOptions/SearchOptions';
28
28
  export type { ColumnOptions, ColumnFriendlyNameContext } from './AdaptableOptions/ColumnOptions';
29
- export type { AdaptablePersistStateFunction, AdaptableStateFunctionConfig, AdaptableLoadStateFunction, StateOptions, } from './AdaptableOptions/StateOptions';
29
+ export type { AdaptablePersistStateFunction, AdaptableStateFunctionConfig, AdaptableLoadStateFunction, AdaptableSaveStateFunction, AdaptableClearStateFunction, StateOptions, } from './AdaptableOptions/StateOptions';
30
30
  export type { AccessLevel, Entitlement } from './PredefinedConfig/Common/Entitlement';
31
31
  export type { FilterActionOnDataChange } from './PredefinedConfig/Common/FilterActionOnDataChange';
32
32
  export type { ConfigState } from './PredefinedConfig/ConfigState';
33
33
  export type { TeamSharingOptions } from './AdaptableOptions/TeamSharingOptions';
34
34
  export type { ToolPanelOptions, CustomToolPanel, ToolPanelButtonContext, CustomToolPanelButtonContext, } from './AdaptableOptions/ToolPanelOptions';
35
- export type { UserInterfaceOptions, CellValuesList, BasePermittedValues, PermittedValues, EditLookUpPermittedValues, FilterPermittedValues, CustomSortPermittedValues, BulkUpdatePermittedValues, EditLookUpContext, PermittedValuesContext, FilterPermittedValuesContext, BulkUpdatePermittedValuesContext, GridInfoSections, GridInfoSection, ObjectTagsContext, CustomDisplayFormatter, CustomDisplayFormatterContext, } from './AdaptableOptions/UserInterfaceOptions';
35
+ export type { UserInterfaceOptions, BasePermittedValues, PermittedValues, EditLookUpPermittedValues, FilterPermittedValues, CustomSortPermittedValues, BulkUpdatePermittedValues, EditLookUpContext, PermittedValuesContext, FilterPermittedValuesContext, BulkUpdatePermittedValuesContext, GridInfoSections, GridInfoSection, ObjectTagsContext, CustomDisplayFormatter, CustomDisplayFormatterContext, } from './AdaptableOptions/UserInterfaceOptions';
36
36
  export type { MenuOptions } from './AdaptableOptions/MenuOptions';
37
37
  export type { CustomSettingsPanel, SettingsPanelOptions, } from './AdaptableOptions/SettingsPanelOptions';
38
38
  export type { EntitlementOptions, EntitlementContext } from './AdaptableOptions/EntitlementOptions';
@@ -147,7 +147,7 @@ export type { ConditionalStyle, ConditionalStyleRule, ConditionalStyleState, } f
147
147
  export type { ChartDefinition, ChartingState } from './PredefinedConfig/ChartingState';
148
148
  export type { CustomSort, CustomSortState } from './PredefinedConfig/CustomSortState';
149
149
  export type { DashboardState, DashboardTab, AdaptableCoordinate, } from './PredefinedConfig/DashboardState';
150
- export type { ExportState, Report, ReportData, ReportSchedule, SystemReportName, SystemReportNames, } from './PredefinedConfig/ExportState';
150
+ export type { ExportState, Report, ReportData, ReportSchedule, SystemReportName, SystemReportNames, ReportRowScope, ReportColumnScope, } from './PredefinedConfig/ExportState';
151
151
  export type { ColumnFilter, ColumnFilterPredicate, SystemFilterPredicateIds, SystemFilterPredicateId, } from './PredefinedConfig/Common/ColumnFilter';
152
152
  export type { FormatColumn, ColumnStyle, PercentBarStyle, GradientStyle, CellColorRange, ColumnComparison, CellTextOptions, CellTextOption, FormatColumnState, } from './PredefinedConfig/FormatColumnState';
153
153
  export type { FreeTextColumn, FreeTextColumnState, FreeTextStoredValue, FreeTextColumnSettings, } from './PredefinedConfig/FreeTextColumnState';
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "12.1.5";
1
+ declare const _default: "12.1.8-canary.0";
2
2
  export default _default;
package/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '12.1.5'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
3
+ exports.default = '12.1.8-canary.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
@@ -1,2 +0,0 @@
1
- import { CalculatedColumnSettings } from '../../../types';
2
- export declare const getCalculatedColumnSettingTags: (settings: CalculatedColumnSettings) => string[];
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import { WindowPopupChildProps } from '../Components/Popups/WindowPopups/WindowPopups';
3
- export declare const LayoutEditorStandalonePopup: React.FunctionComponent<WindowPopupChildProps>;
@@ -1,78 +0,0 @@
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 LayoutEditorWizard_1 = require("./Wizard/LayoutEditorWizard");
13
- const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
14
- const rebass_1 = require("rebass");
15
- const 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(rebass_1.Flex, { height: "100%", flexDirection: "column" },
73
- React.createElement(LayoutEditorWizard_1.LayoutEditorWizard, { data: layoutData, api: adaptable.api, Layouts: layouts, moduleInfo: layoutModule.moduleInfo, onLayoutChange: setStateLayout,
74
- // @ts-ignore
75
- updateGoBackState: () => null }),
76
- React.createElement(PanelFooter_1.PanelFooter, { acceptDisabled: finishDisabled, onAccept: handleAccept, onCancel: handleCancel })));
77
- };
78
- exports.LayoutEditorStandalonePopup = LayoutEditorStandalonePopup;
@@ -1,27 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableColumn } from '../../../../PredefinedConfig/Common/AdaptableColumn';
3
- import { CSSProperties } from 'react';
4
- export declare type OnDragEnd = (result: {
5
- destination?: {
6
- index: number;
7
- droppableId: string;
8
- };
9
- source: {
10
- index: number;
11
- columnId?: string;
12
- column?: AdaptableColumn;
13
- droppableId: string;
14
- };
15
- }) => void;
16
- export interface ColumnListProps {
17
- columns: AdaptableColumn[];
18
- isDropDisabled?: boolean;
19
- getItemStyle: (c: AdaptableColumn, { isDragging, draggingOver }: {
20
- isDragging: boolean;
21
- draggingOver?: string;
22
- }, draggableStyle: CSSProperties) => CSSProperties;
23
- onReady?: (onDragEnd: OnDragEnd) => void;
24
- onColumnOrderChange: (columns: AdaptableColumn[]) => void;
25
- renderItem?: (c: AdaptableColumn) => React.ReactNode;
26
- }
27
- export declare const ColumnList: (props: ColumnListProps) => JSX.Element;
@@ -1,86 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ColumnList = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const react_beautiful_dnd_1 = require("react-beautiful-dnd");
7
- const AdaptableColumn_1 = require("../../../../PredefinedConfig/Common/AdaptableColumn");
8
- const react_1 = require("react");
9
- const react_2 = require("react");
10
- const droppableIds_1 = require("./droppableIds");
11
- const utils_1 = require("./utils");
12
- const rebass_1 = require("rebass");
13
- const AdaptableFormControlTextClear_1 = require("../../../Components/Forms/AdaptableFormControlTextClear");
14
- const reorder_1 = require("../../../../Utilities/reorder");
15
- const ColumnList = (props) => {
16
- const [columns, setColumns] = react_2.useState(props.columns);
17
- const [search, setSearch] = react_2.useState('');
18
- const onDragEnd = React.useCallback((result) => {
19
- const { source, destination } = result;
20
- if (!destination) {
21
- return;
22
- }
23
- if (source.droppableId !== droppableIds_1.LayoutEditorDroppableIds.ColumnList ||
24
- source.droppableId !== destination.droppableId) {
25
- return;
26
- }
27
- if (!source.column || !source.column.moveable) {
28
- return;
29
- }
30
- if (destination.index === source.index) {
31
- return;
32
- }
33
- const newColumns = reorder_1.reorder(columns, source.index, destination.index);
34
- const newDropIndex = newColumns.indexOf(source.column);
35
- if (search && source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList) {
36
- // cannot drop on this list while searching
37
- return;
38
- }
39
- if (!source.column.isFixed &&
40
- newColumns.slice(newDropIndex).filter((c) => c.isFixed).length) {
41
- // there are fixed cols after this one, so it's an invalid drop
42
- return;
43
- }
44
- if (!AdaptableColumn_1.isValidOrderForColumnGroups({
45
- oldColumns: columns,
46
- newColumns,
47
- })) {
48
- return;
49
- }
50
- setColumns(newColumns);
51
- if (props.onColumnOrderChange) {
52
- props.onColumnOrderChange(newColumns);
53
- }
54
- }, [columns, setColumns, props.onColumnOrderChange, search]);
55
- react_1.useEffect(() => {
56
- if (props.onReady) {
57
- props.onReady(onDragEnd);
58
- }
59
- }, [onDragEnd]);
60
- const renderColumn = react_2.useCallback((c) => {
61
- const defaultRenderColumn = (c) => {
62
- return React.createElement(React.Fragment, null, c.friendlyName);
63
- };
64
- return (props.renderItem || defaultRenderColumn)(c);
65
- }, [props.renderItem]);
66
- return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.ColumnList, isDropDisabled: search ? true : props.isDropDisabled }, (provided, snapshot) => {
67
- return (React.createElement("div", Object.assign({ className: "ab-LayoutEditor__ColumnList" }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
68
- React.createElement(rebass_1.Box, { px: 2, mb: 2 },
69
- React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { placeholder: "Search a column", width: "100%", value: search, OnTextChange: setSearch })),
70
- columns.map((c, index) => {
71
- return (React.createElement(react_beautiful_dnd_1.Draggable, { key: `${c.columnId}-column`, draggableId: c.columnId, index: index }, (provided, snapshot) => {
72
- const style = props.getItemStyle(c, snapshot, provided.draggableProps.style);
73
- style.padding = 0;
74
- // required in case of non-string values returned by `headerValueGetter`
75
- const columnFriendlyName = typeof c.friendlyName === 'string' ? c.friendlyName : `${c.friendlyName}`;
76
- if (search &&
77
- columnFriendlyName.toLowerCase().indexOf(search.toLowerCase()) == -1) {
78
- style.display = 'none';
79
- }
80
- return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__ColumnList__column", style: style }), renderColumn(c)));
81
- }));
82
- }),
83
- provided.placeholder));
84
- }));
85
- };
86
- exports.ColumnList = ColumnList;
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import { CSSProperties } from 'react';
3
- import { ColumnSort } from '../../../../PredefinedConfig/Common/ColumnSort';
4
- import { OnDragEnd } from './ColumnList';
5
- export interface ColumnSortListProps {
6
- columnSorts?: ColumnSort[];
7
- isDropDisabled?: boolean;
8
- onReady?: (onDragEnd: OnDragEnd) => void;
9
- onColumnSortsChange: (sorts: ColumnSort[]) => void;
10
- getItemStyle?: (columnId: string, { isDragging, draggingOver }: {
11
- isDragging: boolean;
12
- draggingOver?: string;
13
- }, draggableStyle: CSSProperties) => CSSProperties;
14
- renderItem: (c: ColumnSort, clear: () => void, toggleSort: () => void) => React.ReactNode;
15
- }
16
- export declare const ColumnSortList: (props: ColumnSortListProps) => JSX.Element;
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ColumnSortList = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const react_1 = require("react");
7
- const react_beautiful_dnd_1 = require("react-beautiful-dnd");
8
- const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
9
- const droppableIds_1 = require("./droppableIds");
10
- const utils_1 = require("./utils");
11
- const reorder_1 = require("../../../../Utilities/reorder");
12
- const ColumnSortList = (props) => {
13
- const columnSorts = props.columnSorts || [];
14
- const setColumnSorts = (columnSorts) => {
15
- props.onColumnSortsChange(columnSorts);
16
- };
17
- const onDragEnd = React.useCallback((result) => {
18
- const { destination, source } = result;
19
- if (!destination) {
20
- return;
21
- }
22
- const columnDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
23
- destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList;
24
- const sortDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList &&
25
- destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList;
26
- const valid = columnDrag || sortDrag;
27
- if (!valid) {
28
- return;
29
- }
30
- if (sortDrag) {
31
- if (destination.index === source.index) {
32
- return;
33
- }
34
- const newColumnSorts = reorder_1.reorder(columnSorts, source.index, destination.index);
35
- setColumnSorts(newColumnSorts);
36
- if (props.onColumnSortsChange) {
37
- props.onColumnSortsChange(newColumnSorts);
38
- }
39
- return;
40
- }
41
- if (columnDrag) {
42
- if (!source.column.sortable) {
43
- return;
44
- }
45
- if (columnSorts.filter((c) => c.ColumnId === source.columnId)[0]) {
46
- return false;
47
- }
48
- const newColumnSorts = [...columnSorts];
49
- newColumnSorts.splice(destination.index, 0, {
50
- SortOrder: 'Asc',
51
- ColumnId: source.columnId,
52
- });
53
- setColumnSorts(newColumnSorts);
54
- if (props.onColumnSortsChange) {
55
- props.onColumnSortsChange(newColumnSorts);
56
- }
57
- return;
58
- }
59
- }, [columnSorts, setColumnSorts, props.onColumnSortsChange]);
60
- const toggleSort = (c) => {
61
- setColumnSorts(columnSorts.map((sort) => {
62
- if (sort.ColumnId === c.ColumnId) {
63
- sort = Object.assign(Object.assign({}, sort), { SortOrder: c.SortOrder === 'Asc' ? 'Desc' : 'Asc' });
64
- }
65
- return sort;
66
- }));
67
- };
68
- react_1.useEffect(() => {
69
- if (props.onReady) {
70
- props.onReady(onDragEnd);
71
- }
72
- }, [onDragEnd]);
73
- const renderItem = (c) => {
74
- return props.renderItem(c, () => {
75
- setColumnSorts(props.columnSorts.filter((sort) => sort.ColumnId !== c.ColumnId));
76
- }, () => {
77
- toggleSort(c);
78
- });
79
- };
80
- return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.ColumnSortList, isDropDisabled: props.isDropDisabled }, (provided, snapshot) => (React.createElement("div", Object.assign({ className: `ab-LayoutEditor__ColumnSortList ${!columnSorts.length ? 'ab-LayoutEditor__ColumnSortList--empty' : ''}` }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
81
- !columnSorts.length ? React.createElement(HelpBlock_1.default, null, "Drag columns to create sort order") : null,
82
- columnSorts.map((c, index) => {
83
- return (React.createElement(react_beautiful_dnd_1.Draggable, { key: `${c.ColumnId}-sort`, draggableId: `${c.ColumnId}-sort`, index: index }, (provided, snapshot) => {
84
- return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__ColumnSortList__column", style: props.getItemStyle(c.ColumnId, snapshot, provided.draggableProps.style) }), renderItem(c)));
85
- }));
86
- }),
87
- provided.placeholder))));
88
- };
89
- exports.ColumnSortList = ColumnSortList;
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { CSSProperties } from 'react';
3
- import { OnDragEnd } from './ColumnList';
4
- export interface PivotListProps {
5
- pivotColumns?: string[];
6
- isDropDisabled?: boolean;
7
- onReady?: (onDragEnd: OnDragEnd) => void;
8
- onPivotColumnsChange: (rowGroups: string[]) => void;
9
- getItemStyle?: (columnId: string, { isDragging, draggingOver }: {
10
- isDragging: boolean;
11
- draggingOver?: string;
12
- }, draggableStyle: CSSProperties) => CSSProperties;
13
- renderItem?: (columnId: string, clear: () => void) => React.ReactNode;
14
- }
15
- export declare const PivotList: (props: PivotListProps) => JSX.Element;
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PivotList = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const react_beautiful_dnd_1 = require("react-beautiful-dnd");
7
- const react_1 = require("react");
8
- const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
9
- const droppableIds_1 = require("./droppableIds");
10
- const utils_1 = require("./utils");
11
- const reorder_1 = require("../../../../Utilities/reorder");
12
- const PivotList = (props) => {
13
- const pivotColumns = props.pivotColumns || [];
14
- const setPivotColumns = (pivotColumns) => {
15
- props.onPivotColumnsChange(pivotColumns);
16
- };
17
- const onDragEnd = React.useCallback((result) => {
18
- const { destination, source } = result;
19
- if (!destination) {
20
- return;
21
- }
22
- const columnDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
23
- destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.PivotList;
24
- const pivotDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.PivotList &&
25
- destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.PivotList;
26
- const valid = columnDrag || pivotDrag;
27
- if (!valid) {
28
- return;
29
- }
30
- if (pivotDrag) {
31
- if (destination.index === source.index) {
32
- return;
33
- }
34
- const newPivotColumns = reorder_1.reorder(pivotColumns, source.index, destination.index);
35
- setPivotColumns(newPivotColumns);
36
- return;
37
- }
38
- if (columnDrag) {
39
- if (!source.column.pivotable) {
40
- return;
41
- }
42
- if (pivotColumns.filter((colId) => colId === source.columnId)[0]) {
43
- return false;
44
- }
45
- const newPivotColumns = [...pivotColumns];
46
- newPivotColumns.splice(destination.index, 0, source.columnId);
47
- setPivotColumns(newPivotColumns);
48
- return;
49
- }
50
- }, [pivotColumns, setPivotColumns, props.onPivotColumnsChange]);
51
- react_1.useEffect(() => {
52
- if (props.onReady) {
53
- props.onReady(onDragEnd);
54
- }
55
- }, [onDragEnd]);
56
- const renderItem = React.useCallback((colId) => {
57
- return props.renderItem(colId, () => {
58
- setPivotColumns(pivotColumns.filter((pivotColId) => pivotColId !== colId));
59
- });
60
- }, [props.renderItem]);
61
- return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.PivotList, isDropDisabled: props.isDropDisabled }, (provided, snapshot) => (React.createElement("div", Object.assign({ className: `ab-LayoutEditor__PivotList ${!pivotColumns.length ? 'ab-LayoutEditor__PivotList--empty' : ''}` }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
62
- !pivotColumns.length ? React.createElement(HelpBlock_1.default, null, "Drag columns to pivot") : null,
63
- pivotColumns.map((colId, index) => {
64
- return (React.createElement(react_beautiful_dnd_1.Draggable, { key: colId, draggableId: `${colId}-pivot`, index: index }, (provided, snapshot) => {
65
- return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__PivotList__column", style: props.getItemStyle(colId, snapshot, provided.draggableProps.style) }), renderItem(colId)));
66
- }));
67
- }),
68
- provided.placeholder))));
69
- };
70
- exports.PivotList = PivotList;
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import { CSSProperties } from 'react';
3
- import { OnDragEnd } from './ColumnList';
4
- export interface RowGroupsListProps {
5
- rowGroups?: string[];
6
- isDropDisabled?: boolean;
7
- onReady?: (onDragEnd: OnDragEnd) => void;
8
- onRowGroupsChange: (rowGroups: string[]) => void;
9
- getItemStyle?: (columnId: string, { isDragging, draggingOver }: {
10
- isDragging: boolean;
11
- draggingOver?: string;
12
- }, draggableStyle: CSSProperties) => CSSProperties;
13
- renderItem?: (columnId: string, clear: () => void) => React.ReactNode;
14
- }
15
- export declare const RowGroupsList: (props: RowGroupsListProps) => JSX.Element;
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RowGroupsList = void 0;
4
- const tslib_1 = require("tslib");
5
- const React = tslib_1.__importStar(require("react"));
6
- const react_beautiful_dnd_1 = require("react-beautiful-dnd");
7
- const react_1 = require("react");
8
- const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
9
- const droppableIds_1 = require("./droppableIds");
10
- const utils_1 = require("./utils");
11
- const reorder_1 = require("../../../../Utilities/reorder");
12
- const RowGroupsList = (props) => {
13
- const rowGroups = props.rowGroups || [];
14
- const setRowGroups = (rowGroups) => {
15
- props.onRowGroupsChange(rowGroups);
16
- };
17
- const onDragEnd = React.useCallback((result) => {
18
- const { destination, source } = result;
19
- if (!destination) {
20
- return;
21
- }
22
- const columnDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
23
- destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.RowGroupsList;
24
- const rowGroupsDrag = source.droppableId === droppableIds_1.LayoutEditorDroppableIds.RowGroupsList &&
25
- destination.droppableId === droppableIds_1.LayoutEditorDroppableIds.RowGroupsList;
26
- const valid = columnDrag || rowGroupsDrag;
27
- if (!valid) {
28
- return;
29
- }
30
- if (rowGroupsDrag) {
31
- if (destination.index === source.index) {
32
- return;
33
- }
34
- const newRowGroups = reorder_1.reorder(rowGroups, source.index, destination.index);
35
- setRowGroups(newRowGroups);
36
- return;
37
- }
38
- if (columnDrag) {
39
- if (!source.column.groupable) {
40
- return;
41
- }
42
- if (rowGroups.filter((colId) => colId === source.columnId)[0]) {
43
- return false;
44
- }
45
- const newRowGroups = [...rowGroups];
46
- newRowGroups.splice(destination.index, 0, source.columnId);
47
- setRowGroups(newRowGroups);
48
- return;
49
- }
50
- }, [rowGroups, setRowGroups, props.onRowGroupsChange]);
51
- react_1.useEffect(() => {
52
- if (props.onReady) {
53
- props.onReady(onDragEnd);
54
- }
55
- }, [onDragEnd]);
56
- const renderItem = React.useCallback((colId) => {
57
- return props.renderItem(colId, () => {
58
- setRowGroups(rowGroups.filter((rowGroup) => rowGroup !== colId));
59
- });
60
- }, [props.renderItem]);
61
- return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: droppableIds_1.LayoutEditorDroppableIds.RowGroupsList, isDropDisabled: props.isDropDisabled }, (provided, snapshot) => (React.createElement("div", Object.assign({ className: `ab-LayoutEditor__RowGroupsList ${!rowGroups.length ? 'ab-LayoutEditor__RowGroupsList--empty' : ''}` }, provided.droppableProps, { ref: provided.innerRef, style: utils_1.getListStyle(snapshot) }),
62
- !rowGroups.length ? React.createElement(HelpBlock_1.default, null, "Drag columns to create row groups") : null,
63
- rowGroups.map((colId, index) => {
64
- return (React.createElement(react_beautiful_dnd_1.Draggable, { key: colId, draggableId: `${colId}-rowGroup`, index: index }, (provided, snapshot) => {
65
- return (React.createElement("div", Object.assign({ ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { className: "ab-LayoutEditor__RowGroupsList__column", style: props.getItemStyle(colId, snapshot, provided.draggableProps.style) }), renderItem(colId)));
66
- }));
67
- }),
68
- provided.placeholder))));
69
- };
70
- exports.RowGroupsList = RowGroupsList;
@@ -1,7 +0,0 @@
1
- export declare enum LayoutEditorDroppableIds {
2
- None = "",
3
- ColumnList = "ColumnList",
4
- ColumnSortList = "ColumnSortList",
5
- RowGroupsList = "RowGroupsList",
6
- PivotList = "PivotList"
7
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LayoutEditorDroppableIds = void 0;
4
- var LayoutEditorDroppableIds;
5
- (function (LayoutEditorDroppableIds) {
6
- LayoutEditorDroppableIds["None"] = "";
7
- LayoutEditorDroppableIds["ColumnList"] = "ColumnList";
8
- LayoutEditorDroppableIds["ColumnSortList"] = "ColumnSortList";
9
- LayoutEditorDroppableIds["RowGroupsList"] = "RowGroupsList";
10
- LayoutEditorDroppableIds["PivotList"] = "PivotList";
11
- })(LayoutEditorDroppableIds = exports.LayoutEditorDroppableIds || (exports.LayoutEditorDroppableIds = {}));
@@ -1,6 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- import { AdaptableColumn, Layout } from '../../../../types';
3
- import { LayoutEditorDroppableIds } from './droppableIds';
4
- import { DraggableSnapshot } from './utils';
5
- export declare type LayoutGetItemStyle = (column: AdaptableColumn, layout: Layout, dragSource: LayoutEditorDroppableIds, { isDragging, draggingOver }: DraggableSnapshot, draggableStyle: CSSProperties) => CSSProperties;
6
- export declare const getItemStyle: LayoutGetItemStyle;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getItemStyle = void 0;
4
- const droppableIds_1 = require("./droppableIds");
5
- const getItemStyle = (column, layout, dragSource, snapshot, draggableStyle) => {
6
- const { isDragging, draggingOver } = snapshot;
7
- const result = Object.assign({ userSelect: 'none', background: isDragging ? 'var(--ab-color-secondarylight)' : '', color: isDragging ? 'var(--ab-color-text-on-secondarylight)' : '', opacity: 1 }, draggableStyle);
8
- if (isDragging) {
9
- // dragging from column list to column sort list
10
- if (dragSource == droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
11
- draggingOver === droppableIds_1.LayoutEditorDroppableIds.ColumnSortList &&
12
- //if col not sortable or is already in the sort order
13
- (!column.sortable ||
14
- (layout.ColumnSorts &&
15
- layout.ColumnSorts.filter((sort) => sort.ColumnId === column.columnId)[0]))) {
16
- }
17
- //dragging things on the first column, from any other column
18
- if (dragSource != droppableIds_1.LayoutEditorDroppableIds.ColumnList &&
19
- draggingOver === droppableIds_1.LayoutEditorDroppableIds.ColumnList) {
20
- // result.background = '';
21
- // result.color = '';
22
- }
23
- }
24
- return result;
25
- };
26
- exports.getItemStyle = getItemStyle;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import { Layout } from '../../../../PredefinedConfig/LayoutState';
3
- import { AdaptableApi } from '../../../../Api/AdaptableApi';
4
- export interface LayoutEditorProps {
5
- api: AdaptableApi;
6
- layout: Layout;
7
- onLayoutChange?: (layout: Layout) => void;
8
- }
9
- export declare const LayoutEditor: React.MemoExoticComponent<(props: LayoutEditorProps) => JSX.Element>;