@adaptabletools/adaptable 22.0.0-canary.3 → 22.0.0-canary.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/index.css +58 -29
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  5. package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
  6. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
  7. package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
  8. package/src/AdaptableState/AlertState.d.ts +2 -2
  9. package/src/AdaptableState/ChartingState.d.ts +3 -3
  10. package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
  11. package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
  12. package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
  13. package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
  14. package/src/AdaptableState/Common/AdaptableStyle.d.ts +1 -1
  15. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  16. package/src/AdaptableState/Common/Schedule.d.ts +3 -4
  17. package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
  18. package/src/AdaptableState/CustomSortState.d.ts +2 -2
  19. package/src/AdaptableState/DashboardState.d.ts +2 -2
  20. package/src/AdaptableState/ExportState.d.ts +2 -2
  21. package/src/AdaptableState/FlashingCellState.d.ts +2 -2
  22. package/src/AdaptableState/FormatColumnState.d.ts +2 -2
  23. package/src/AdaptableState/LayoutState.d.ts +8 -3
  24. package/src/AdaptableState/NamedQueryState.d.ts +2 -2
  25. package/src/AdaptableState/PlusMinusState.d.ts +2 -2
  26. package/src/AdaptableState/ShortcutState.d.ts +2 -2
  27. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  28. package/src/AdaptableState/ThemeState.d.ts +2 -2
  29. package/src/Api/CustomSortApi.d.ts +6 -3
  30. package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
  31. package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
  32. package/src/Api/Implementation/LayoutHelpers.js +7 -0
  33. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  34. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
  35. package/src/Strategy/AlertModule.js +4 -0
  36. package/src/Strategy/CustomSortModule.js +4 -0
  37. package/src/Strategy/FlashingCellModule.js +5 -0
  38. package/src/Strategy/FormatColumnModule.js +4 -0
  39. package/src/Strategy/LayoutModule.js +4 -4
  40. package/src/Strategy/PlusMinusModule.js +4 -0
  41. package/src/Strategy/ScheduleModule.js +4 -0
  42. package/src/Strategy/ShortcutModule.js +4 -0
  43. package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
  44. package/src/Utilities/Extensions/StringExtensions.js +16 -0
  45. package/src/Utilities/Helpers/FormatHelper.js +9 -2
  46. package/src/Utilities/ObjectFactory.js +15 -2
  47. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
  48. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
  49. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +47 -12
  50. package/src/View/Alert/Wizard/AlertWizard.js +14 -10
  51. package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
  52. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
  53. package/src/View/Components/StyleComponent.d.ts +1 -0
  54. package/src/View/Components/StyleComponent.js +84 -33
  55. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  56. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +40 -14
  57. package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
  58. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
  59. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
  60. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +34 -14
  61. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +14 -10
  62. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +47 -29
  63. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +20 -9
  64. package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
  65. package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
  66. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
  67. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
  68. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
  69. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
  70. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
  71. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +12 -2
  72. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
  73. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
  74. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
  75. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
  76. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
  77. package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
  78. package/src/components/ColorPicker/ColorPicker.js +5 -4
  79. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  80. package/src/env.js +2 -2
  81. package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
  82. package/src/layout-manager/src/index.js +25 -7
  83. package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
  84. package/src/metamodel/adaptable.metamodel.d.ts +30 -0
  85. package/src/metamodel/adaptable.metamodel.js +1 -1
  86. package/src/migration/AdaptableUpgradeHelper.js +1 -1
  87. package/src/migration/VersionUpgrade22.d.ts +15 -0
  88. package/src/migration/VersionUpgrade22.js +160 -0
  89. package/src/types.d.ts +1 -2
  90. package/tsconfig.esm.tsbuildinfo +1 -1
  91. package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
  92. package/src/AdaptableState/Common/SuspendableObject.js +0 -1
  93. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +0 -1
  94. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -632
  95. package/src/View/Alert/AlertEntityRow.d.ts +0 -11
  96. package/src/View/Alert/AlertEntityRow.js +0 -28
  97. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
  98. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -58
  99. package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
  100. package/src/View/Components/Buttons/ButtonFunction.js +0 -8
  101. package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
  102. package/src/View/Components/Buttons/ButtonGeneral.js +0 -7
  103. package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
  104. package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -5
  105. package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
  106. package/src/View/Components/Buttons/ButtonShow.js +0 -7
  107. package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
  108. package/src/View/Components/Buttons/ButtonShowChart.js +0 -7
  109. package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
  110. package/src/View/Components/Buttons/ButtonUndo.js +0 -7
  111. package/src/View/Components/ExpressionWizard.d.ts +0 -24
  112. package/src/View/Components/ExpressionWizard.js +0 -77
  113. package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
  114. package/src/View/Components/FilterForm/Waiting.js +0 -14
  115. package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
  116. package/src/View/Components/Panels/PanelFooter.js +0 -9
  117. package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
  118. package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -15
  119. package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
  120. package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -26
  121. package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
  122. package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -45
  123. package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
  124. package/src/View/Components/SharedProps/WizardScopeState.js +0 -1
  125. package/src/View/Components/WizardSummaryRow.d.ts +0 -9
  126. package/src/View/Components/WizardSummaryRow.js +0 -11
  127. package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
  128. package/src/View/CustomSort/CustomSortSummary.js +0 -105
  129. package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
  130. package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -19
  131. package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
  132. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -68
  133. package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
  134. package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -68
  135. package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
  136. package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -56
  137. package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
  138. package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -35
  139. package/src/View/Filter/FilterSummary.d.ts +0 -18
  140. package/src/View/Filter/FilterSummary.js +0 -48
  141. package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
  142. package/src/View/FormatColumn/FormatColumnSummary.js +0 -90
  143. package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
  144. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -88
  145. package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
  146. package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -94
  147. package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
  148. package/src/View/PlusMinus/PlusMinusSummary.js +0 -95
  149. package/src/View/Wizard/WizardLegend.d.ts +0 -12
  150. package/src/View/Wizard/WizardLegend.js +0 -23
@@ -1,94 +0,0 @@
1
- import * as React from 'react';
2
- import { useEffect, useState } from 'react';
3
- import { PanelWithButton } from '../../Components/Panels/PanelWithButton';
4
- import { ButtonMinimise } from '../../Components/Buttons/ButtonMinimise';
5
- import { ButtonMaximise } from '../../Components/Buttons/ButtonMaximise';
6
- import { AdaptableObjectCollection } from '../../Components/AdaptableObjectCollection';
7
- import { AdaptableObjectRow } from '../../Components/AdaptableObjectRow';
8
- import { AdaptablePopover } from '../../AdaptablePopover';
9
- import { Box } from '../../../components/Flex';
10
- export const AdaptableOptionsComponent = (props) => {
11
- const { api } = props;
12
- const getAdaptableOptionsColItems = () => [
13
- { Content: 'Property', Size: 5 },
14
- { Content: 'Value', Size: 5 },
15
- { Content: '', Size: 2 },
16
- ];
17
- const formatOptionValue = (optionValue) => {
18
- if (optionValue == undefined || optionValue == null) {
19
- return 'None';
20
- }
21
- const optionValueType = typeof optionValue;
22
- switch (optionValueType) {
23
- case 'string':
24
- case 'number':
25
- case 'bigint':
26
- return optionValue;
27
- case 'boolean':
28
- return optionValue ? 'True' : 'False';
29
- case 'function':
30
- return 'Function';
31
- case 'object':
32
- if (Array.isArray(optionValue)) {
33
- return `[${optionValue
34
- .map((optionValueItem) => formatOptionValue(optionValueItem))
35
- .join(', ')}]`;
36
- }
37
- if (optionValue instanceof HTMLElement) {
38
- return 'HTMLElement';
39
- }
40
- default:
41
- // should never happen, but just in case, to avoid a react runtime error
42
- return 'Complex value';
43
- }
44
- };
45
- const buildGridInfoOptionEntry = (gridInfoOption) => {
46
- const colItems = getAdaptableOptionsColItems();
47
- colItems[0].Content = gridInfoOption.name;
48
- const formattedOptionValue = formatOptionValue(gridInfoOption.value);
49
- const isUserDefinedValue = gridInfoOption.value !== gridInfoOption.defaultValue;
50
- colItems[1].Content = isUserDefinedValue ? (React.createElement(React.Fragment, null,
51
- React.createElement("span", { style: { fontWeight: 'bold' } }, formattedOptionValue),
52
- React.createElement("span", { style: { fontStyle: 'italic' } },
53
- ' ',
54
- "(Default: ",
55
- formatOptionValue(gridInfoOption.defaultValue),
56
- ")"))) : (formattedOptionValue);
57
- let infoButton = React.createElement(AdaptablePopover, { headerText: null, bodyText: [gridInfoOption.description] });
58
- colItems[2].Content = infoButton;
59
- return colItems;
60
- };
61
- const buildGridInfoOptionComponentContainer = (containerContainerName, gridInfoOptionContainer) => {
62
- const gridInfoOptionComponents = gridInfoOptionContainer.items.map((gridInfoOption) => {
63
- const gridOptionColItems = buildGridInfoOptionEntry(gridInfoOption);
64
- return React.createElement(AdaptableObjectRow, { key: `${gridInfoOption.name}`, colItems: gridOptionColItems });
65
- });
66
- return (React.createElement(AdaptableObjectCollection, { colItems: getAdaptableOptionsColItems(), items: gridInfoOptionComponents }));
67
- };
68
- const [gridInfoOptions, setGridInfoOptions] = useState();
69
- const [gridInfoContainerComponents, setGridInfoContainerComponents] = useState();
70
- useEffect(() => {
71
- const gridInfoOptions = api.internalApi.getMetamodelService().getGridInfoOptions();
72
- const gridInfoContainerComponentMap = new Map();
73
- gridInfoOptions.forEach((gridInfoOptionContainer, containerName) => {
74
- gridInfoContainerComponentMap.set(containerName, buildGridInfoOptionComponentContainer(containerName, gridInfoOptionContainer));
75
- });
76
- setGridInfoContainerComponents(gridInfoContainerComponentMap);
77
- setGridInfoOptions(gridInfoOptions);
78
- }, []);
79
- const [expandedComponentContainer, setExpandedComponentContainer] = useState('');
80
- return (React.createElement(Box, { className: "ab-AdaptableOptions twa:p-2", "data-name": "gridInfo-adaptableOptions-content" }, gridInfoOptions &&
81
- Array.from(gridInfoOptions.entries()).map(([containerName, container]) => (React.createElement(OptionContainerComponent, { key: containerName, name: containerName, label: container.containerLabel, viewMode: containerName === expandedComponentContainer ? 'expanded' : 'collapsed', onViewModeChange: (newViewMode) => setExpandedComponentContainer(newViewMode === 'expanded' ? containerName : '') }, gridInfoContainerComponents.get(containerName))))));
82
- };
83
- const OptionContainerComponent = (props) => {
84
- const { viewMode, name, label, onViewModeChange, children } = props;
85
- const requestViewModeChange = () => {
86
- onViewModeChange(viewMode === 'expanded' ? 'collapsed' : 'expanded');
87
- };
88
- const panelButton = viewMode === 'expanded' ? (React.createElement(ButtonMinimise, { onClick: () => requestViewModeChange(), tooltip: `Hide ${label}` })) : (React.createElement(ButtonMaximise, { onClick: () => requestViewModeChange(), tooltip: `Show ${label}` }));
89
- return (React.createElement(PanelWithButton, { className: `ab-OptionsContainer options-container-${name} twa:mb-3`, variant: "default", headerText: label, headerProps: {
90
- className: `twa:text-3 twa:cursor-pointer ${viewMode === 'expanded' ? 'twa:font-extrabold' : 'twa:font-normal'}`,
91
- 'data-name': `options-container-header-${name}`,
92
- onClick: () => requestViewModeChange(),
93
- }, button: panelButton }, viewMode === 'expanded' && children));
94
- };
@@ -1,22 +0,0 @@
1
- import * as React from 'react';
2
- import { ModuleSummaryProps } from '../Components/SharedProps/ModuleSummaryProps';
3
- import { EditableConfigEntityState } from '../Components/SharedProps/EditableConfigEntityState';
4
- import * as PlusMinusRedux from '../../Redux/ActionsReducers/PlusMinusRedux';
5
- import { PlusMinusNudge } from '../../AdaptableState/PlusMinusState';
6
- export interface PlusMinusSummaryProps extends ModuleSummaryProps<PlusMinusSummaryComponent> {
7
- PlusMinusNudges: PlusMinusNudge[];
8
- onAddPlusMinusNudge: (PlusMinus: PlusMinusNudge) => PlusMinusRedux.PlusMinusNudgeAddAction;
9
- onEditPlusMinusNudge: (PlusMinus: PlusMinusNudge) => PlusMinusRedux.PlusMinusNudgeEditAction;
10
- }
11
- export declare class PlusMinusSummaryComponent extends React.Component<PlusMinusSummaryProps, EditableConfigEntityState> {
12
- constructor(props: PlusMinusSummaryProps);
13
- render(): any;
14
- onNew(): void;
15
- onEdit(PlusMinus: PlusMinusNudge): void;
16
- onCloseWizard(): void;
17
- onFinishWizard(): void;
18
- canFinishWizard(): boolean;
19
- }
20
- export declare let PlusMinusSummary: import("react-redux").ConnectedComponent<typeof PlusMinusSummaryComponent, {
21
- [x: string]: any;
22
- }>;
@@ -1,95 +0,0 @@
1
- import * as React from 'react';
2
- import { WizardStatus, } from '../Components/SharedProps/EditableConfigEntityState';
3
- import { connect } from 'react-redux';
4
- import { Helper } from '../../Utilities/Helpers/Helper';
5
- import * as PlusMinusRedux from '../../Redux/ActionsReducers/PlusMinusRedux';
6
- import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
7
- import { ObjectFactory } from '../../Utilities/ObjectFactory';
8
- import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
9
- import { ModuleHeader } from '../Components/ModuleSummary/ModuleHeader';
10
- import { ModuleDetail } from '../Components/ModuleSummary/ModuleDetail';
11
- import * as TeamSharingRedux from '../../Redux/ActionsReducers/TeamSharingRedux';
12
- import { UIHelper } from '../UIHelper';
13
- import { PlusMinusWizard } from './Wizard/PlusMinusWizard';
14
- export class PlusMinusSummaryComponent extends React.Component {
15
- constructor(props) {
16
- super(props);
17
- this.state = UIHelper.getEmptyConfigState();
18
- }
19
- render() {
20
- let moduleSummaries = [];
21
- // title row
22
- let titleRow = (React.createElement(ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: Helper.returnItemCount(this.props.PlusMinusNudges.filter((item) => this.props.api.columnScopeApi.isColumnInScopeColumns(this.props.summarisedColumn, item.Scope)), this.props.moduleInfo.FriendlyName), onNew: () => this.onNew(), newButtonTooltip: 'Plus / Minus Rule', accessLevel: this.props.accessLevel }));
23
- moduleSummaries.push(titleRow);
24
- // existing items
25
- this.props.PlusMinusNudges.map((item, index) => {
26
- if (this.props.api.columnScopeApi.isColumnInScopeColumns(this.props.summarisedColumn, item.Scope)) {
27
- let detailRow = (React.createElement(ModuleDetail, { key: 'PM' + index, item1: 'Nudge Value: ' + item.NudgeValue, item2: item.Rule?.BooleanExpression ? item.Rule.BooleanExpression : 'Always', configEnity: item, showShare: this.props.teamSharingActivated, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(item), onShare: (config) => this.props.onShare(item, config), onDelete: PlusMinusRedux.PlusMinusNudgeDelete(item), accessLevel: this.props.accessLevel }));
28
- moduleSummaries.push(detailRow);
29
- }
30
- });
31
- return (React.createElement("div", null,
32
- moduleSummaries,
33
- this.state.editedAdaptableObject && (React.createElement(PlusMinusWizard, { moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: null, wizardStartIndex: this.state.wizardStartIndex, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: () => this.onFinishWizard() }))));
34
- }
35
- onNew() {
36
- let configEntity = ObjectFactory.CreateEmptyPlusMinusNudge();
37
- configEntity.Scope = {
38
- ColumnIds: [this.props.summarisedColumn.columnId],
39
- };
40
- this.setState({
41
- editedAdaptableObject: configEntity,
42
- wizardStartIndex: 1,
43
- wizardStatus: WizardStatus.New,
44
- });
45
- }
46
- onEdit(PlusMinus) {
47
- this.setState({
48
- editedAdaptableObject: Helper.cloneObject(PlusMinus),
49
- wizardStartIndex: 1,
50
- wizardStatus: WizardStatus.Edit,
51
- });
52
- }
53
- onCloseWizard() {
54
- this.setState({
55
- editedAdaptableObject: null,
56
- wizardStartIndex: 0,
57
- wizardStatus: WizardStatus.None,
58
- });
59
- }
60
- onFinishWizard() {
61
- let plusMinusNudge = this.state.editedAdaptableObject;
62
- if (this.state.wizardStatus == WizardStatus.Edit) {
63
- this.props.onEditPlusMinusNudge(plusMinusNudge);
64
- }
65
- else {
66
- this.props.onAddPlusMinusNudge(plusMinusNudge);
67
- }
68
- this.setState({
69
- editedAdaptableObject: null,
70
- wizardStartIndex: 0,
71
- wizardStatus: WizardStatus.None,
72
- });
73
- }
74
- canFinishWizard() {
75
- let plusMinus = this.state.editedAdaptableObject;
76
- if (!plusMinus.NudgeValue) {
77
- return false;
78
- }
79
- return true;
80
- }
81
- }
82
- function mapStateToProps(state, ownProps) {
83
- return {
84
- PlusMinusNudges: state.PlusMinus.PlusMinusNudges,
85
- };
86
- }
87
- function mapDispatchToProps(dispatch) {
88
- return {
89
- onAddPlusMinusNudge: (PlusMinusNudge) => dispatch(PlusMinusRedux.PlusMinusNudgeAdd(PlusMinusNudge)),
90
- onEditPlusMinusNudge: (PlusMinusNudge) => dispatch(PlusMinusRedux.PlusMinusNudgeEdit(PlusMinusNudge)),
91
- onClearPopupParams: () => dispatch(PopupRedux.PopupClearParam()),
92
- onShare: (entity, config) => dispatch(TeamSharingRedux.TeamSharingShare(entity, ModuleConstants.PlusMinusModuleId, config)),
93
- };
94
- }
95
- export let PlusMinusSummary = connect(mapStateToProps, mapDispatchToProps)(PlusMinusSummaryComponent);
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- export interface WizardLegendProps extends React.ClassAttributes<WizardLegend> {
3
- StepNames: string[];
4
- ActiveStepName: string;
5
- FriendlyName: string;
6
- CanShowAllSteps: boolean;
7
- onStepButtonClicked: (stepName: string) => void;
8
- }
9
- export declare class WizardLegend extends React.Component<WizardLegendProps, {}> {
10
- render(): any;
11
- private onStepButtonClicked;
12
- }
@@ -1,23 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../components/SimpleButton';
3
- import { Box } from '../../components/Flex';
4
- export class WizardLegend extends React.Component {
5
- render() {
6
- let count = this.props.StepNames.length - 1;
7
- let activeStepIndex = this.props.StepNames.findIndex((s) => s == this.props.ActiveStepName);
8
- let stepButtons = this.props.StepNames.map((s, index) => {
9
- let isActiveStep = index == activeStepIndex;
10
- let isDisabled = this.props.CanShowAllSteps
11
- ? false
12
- : isActiveStep || index > activeStepIndex;
13
- let lastStep = index == count;
14
- return (React.createElement("div", { className: "ab-WizardLegend__step twa:inline-block", "data-name": s, key: index },
15
- React.createElement(SimpleButton, { variant: isActiveStep ? 'raised' : 'outlined', tone: isActiveStep ? 'accent' : 'neutral', disabled: isDisabled, onClick: () => this.onStepButtonClicked(s) }, s),
16
- lastStep == false && (React.createElement(Box, { "data-name": "separator", className: "ab-WizardLegend__step__separator twa:mx-2 twa:inline-block" }, "\u2014"))));
17
- });
18
- return React.createElement("div", null, stepButtons);
19
- }
20
- onStepButtonClicked(stepName) {
21
- this.props.onStepButtonClicked(stepName);
22
- }
23
- }