@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,21 +0,0 @@
1
- import * as React from 'react';
2
- import { ModuleSummaryProps } from '../Components/SharedProps/ModuleSummaryProps';
3
- import { EditableConfigEntityState } from '../Components/SharedProps/EditableConfigEntityState';
4
- import { CalculatedColumn } from '../../AdaptableState/CalculatedColumnState';
5
- import type { Action } from 'redux';
6
- export interface CalculatedColumnSummaryProps extends ModuleSummaryProps<CalculatedColumnSummaryComponent> {
7
- CalculatedColumns: CalculatedColumn[];
8
- onEdit: (calculatedColumn: CalculatedColumn) => void;
9
- onDeleteConfirm: Action;
10
- }
11
- export declare class CalculatedColumnSummaryComponent extends React.Component<CalculatedColumnSummaryProps, EditableConfigEntityState> {
12
- constructor(props: CalculatedColumnSummaryProps);
13
- render(): any;
14
- onEdit(calculatedColumn: CalculatedColumn): void;
15
- onCloseWizard(): void;
16
- onFinishWizard: (calculatedColumn: CalculatedColumn) => void;
17
- }
18
- export declare let CalculatedColumnSummary: import("react-redux").ConnectedComponent<typeof CalculatedColumnSummaryComponent, {
19
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
20
- store?: import("redux").Store;
21
- }>;
@@ -1,58 +0,0 @@
1
- import * as React from 'react';
2
- import { connect } from 'react-redux';
3
- import { Helper } from '../../Utilities/Helpers/Helper';
4
- import * as CalculatedColumnRedux from '../../Redux/ActionsReducers/CalculatedColumnRedux';
5
- import { WizardStatus, } from '../Components/SharedProps/EditableConfigEntityState';
6
- import { UIHelper } from '../UIHelper';
7
- import { ModuleDetail } from '../Components/ModuleSummary/ModuleDetail';
8
- import { CalculatedColumnWizard } from './Wizard/CalculatedColumnWizard';
9
- export class CalculatedColumnSummaryComponent extends React.Component {
10
- constructor(props) {
11
- super(props);
12
- this.state = UIHelper.getEmptyConfigState();
13
- }
14
- render() {
15
- let detailRow;
16
- this.props.CalculatedColumns.map((item, index) => {
17
- if (item.ColumnId == this.props.summarisedColumn.columnId) {
18
- detailRow = (React.createElement(ModuleDetail, { key: 'UF' + index, item1: this.props.moduleInfo.FriendlyName, item2: this.props.api.internalApi.getAdaptableQueryExpressionText(item.Query), configEnity: item, showShare: this.props.teamSharingActivated, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(item), onShare: (config) => this.props.onShare(item, config), onDelete: CalculatedColumnRedux.CalculatedColumnDelete(item), showBold: true, accessLevel: this.props.accessLevel }));
19
- }
20
- });
21
- return (React.createElement("div", null,
22
- detailRow,
23
- this.state.editedAdaptableObject && (React.createElement(CalculatedColumnWizard, { moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.CalculatedColumns, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
24
- }
25
- onEdit(calculatedColumn) {
26
- this.setState({
27
- editedAdaptableObject: Helper.cloneObject(calculatedColumn),
28
- wizardStartIndex: 0,
29
- wizardStatus: WizardStatus.Edit,
30
- });
31
- }
32
- onCloseWizard() {
33
- this.setState({
34
- editedAdaptableObject: null,
35
- wizardStartIndex: 0,
36
- wizardStatus: WizardStatus.None,
37
- });
38
- }
39
- onFinishWizard = (calculatedColumn) => {
40
- this.props.onEdit(calculatedColumn);
41
- this.setState({
42
- editedAdaptableObject: null,
43
- wizardStartIndex: 0,
44
- wizardStatus: WizardStatus.None,
45
- });
46
- };
47
- }
48
- function mapStateToProps(state) {
49
- return {
50
- CalculatedColumns: state.CalculatedColumn.CalculatedColumns,
51
- };
52
- }
53
- function mapDispatchToProps(dispatch) {
54
- return {
55
- onEdit: (calculatedColumn) => dispatch(CalculatedColumnRedux.CalculatedColumnEdit(calculatedColumn)),
56
- };
57
- }
58
- export let CalculatedColumnSummary = connect(mapStateToProps, mapDispatchToProps)(CalculatedColumnSummaryComponent);
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { SimpleButtonProps } from '../../../components/SimpleButton';
3
- export interface ModuleButtonProps extends SimpleButtonProps {
4
- }
5
- export declare class ButtonFunction extends React.Component<ModuleButtonProps, {}> {
6
- render(): React.JSX.Element;
7
- }
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../../components/SimpleButton';
3
- import { twMerge } from '../../../twMerge';
4
- export class ButtonFunction extends React.Component {
5
- render() {
6
- return (React.createElement(SimpleButton, { "data-name": "function", tooltip: "Module", iconSize: 20, icon: "function", ...this.props, className: twMerge('twa:mr-1', this.props.className) }));
7
- }
8
- }
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { SimpleButtonProps } from '../../../components/SimpleButton';
3
- export declare class ButtonGeneral extends React.Component<SimpleButtonProps, {}> {
4
- render(): React.JSX.Element;
5
- }
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../../components/SimpleButton';
3
- export class ButtonGeneral extends React.Component {
4
- render() {
5
- return React.createElement(SimpleButton, { tooltip: "", variant: "text", ...this.props });
6
- }
7
- }
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import { SimpleButtonProps } from '../../../components/SimpleButton';
3
- declare const _default: (props: SimpleButtonProps) => React.JSX.Element;
4
- export default _default;
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../../components/SimpleButton';
3
- export default (props) => {
4
- return React.createElement(SimpleButton, { ...props, icon: 'delete', variant: "text", "data-name": "preview-delete" });
5
- };
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { SimpleButtonProps } from '../../../components/SimpleButton';
3
- export declare class ButtonShow extends React.Component<SimpleButtonProps, {}> {
4
- render(): React.JSX.Element;
5
- }
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../../components/SimpleButton';
3
- export class ButtonShow extends React.Component {
4
- render() {
5
- return (React.createElement(SimpleButton, { "data-name": "show", tooltip: "Show", iconSize: 18, icon: "check", variant: "text", ...this.props }));
6
- }
7
- }
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { SimpleButtonProps } from '../../../components/SimpleButton';
3
- export declare class ButtonShowChart extends React.Component<SimpleButtonProps, {}> {
4
- render(): React.JSX.Element;
5
- }
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../../components/SimpleButton';
3
- export class ButtonShowChart extends React.Component {
4
- render() {
5
- return (React.createElement(SimpleButton, { "data-name": "show-chart", tooltip: "Show Chart", iconSize: 20, icon: "chart", variant: "text", ...this.props }));
6
- }
7
- }
@@ -1,5 +0,0 @@
1
- import * as React from 'react';
2
- import { SimpleButtonProps } from '../../../components/SimpleButton';
3
- export declare class ButtonUndo extends React.Component<SimpleButtonProps, {}> {
4
- render(): React.JSX.Element;
5
- }
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../../components/SimpleButton';
3
- export class ButtonUndo extends React.Component {
4
- render() {
5
- return (React.createElement(SimpleButton, { "data-name": "undo", iconSize: 20, tooltip: "Undo", icon: 'undo', variant: "text", ...this.props }));
6
- }
7
- }
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableModule } from '../../AdaptableState/Common/Types';
3
- import { AdaptableWizardStep, AdaptableWizardStepProps } from '../Wizard/Interface/IAdaptableWizard';
4
- export interface ExpressionWizardProps extends AdaptableWizardStepProps<any> {
5
- onSetNewNamedQuery: (newNamedQuery: string) => void;
6
- callingModule?: AdaptableModule;
7
- }
8
- export interface ExpressionWizardState {
9
- expression?: string;
10
- saveToNamedQueries: boolean;
11
- newNamedQuery: string;
12
- }
13
- export declare class ExpressionWizard extends React.Component<ExpressionWizardProps, ExpressionWizardState> implements AdaptableWizardStep {
14
- constructor(props: ExpressionWizardProps);
15
- render(): React.JSX.Element;
16
- isValidExpression(): boolean;
17
- handleCustomExpressionChange: (expression: string) => void;
18
- canNext(): boolean;
19
- canBack(): boolean;
20
- next(): void;
21
- back(): void;
22
- getIndexStepIncrement(): number;
23
- getIndexStepDecrement(): number;
24
- }
@@ -1,77 +0,0 @@
1
- import * as React from 'react';
2
- import { CheckBox } from '../../components/CheckBox';
3
- import { ExpressionEditor } from '../../components/ExpressionEditor';
4
- import Input from '../../components/Input';
5
- import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
6
- import { NamedQueryModuleId } from '../../Utilities/Constants/ModuleConstants';
7
- import { useMemo } from 'react';
8
- import { Flex } from '../../components/Flex';
9
- export class ExpressionWizard extends React.Component {
10
- constructor(props) {
11
- super(props);
12
- this.state = {
13
- // this is realy horrible but its only way to use the Expression Wizard for both Report (that has Query) and Format Column (that has Rule)
14
- // once we move to the new Wizard we can remove this monstrosity
15
- expression: this.props.callingModule && this.props.callingModule == 'Export'
16
- ? this.props.data.Query?.BooleanExpression
17
- : this.props.data.Rule?.BooleanExpression,
18
- saveToNamedQueries: false,
19
- newNamedQuery: '',
20
- };
21
- }
22
- render() {
23
- const initialData = useMemo(() => this.props.api.internalApi.getQueryPreviewData(), []);
24
- return (React.createElement(React.Fragment, null,
25
- React.createElement(ExpressionEditor, { type: 'boolean', module: NamedQueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.internalApi.getQueryableColumnsForUIEditor(), fields: this.props.api.expressionApi.internalApi.getAvailableFields(), namedQueries: this.props.api.namedQueryApi.getNamedQueries(), api: this.props.api }),
26
- ' ',
27
- React.createElement(Flex, { flexDirection: "row", className: "twa:p-1 twa:mb-2 twa:ml-1", alignItems: "center", "data-name": "expression-wizard-save-option" },
28
- React.createElement(CheckBox, { className: "twa:ml-2 twa:mb-2", disabled: !this.isValidExpression(), checked: this.state.saveToNamedQueries, onChange: (checked) => this.setState({
29
- saveToNamedQueries: checked,
30
- }, () => this.props.updateGoBackState()) }, "Save as new Named Query"),
31
- this.state.saveToNamedQueries && (React.createElement(Input, { className: "twa:ml-2 twa:min-w-[20rem]", value: this.state.newNamedQuery, onChange: (e) => this.setState({
32
- newNamedQuery: e.target.value,
33
- }, () => this.props.updateGoBackState()) })))));
34
- }
35
- isValidExpression() {
36
- return (StringExtensions.IsNotNullOrEmpty(this.state.expression) &&
37
- this.props.api.internalApi
38
- .getQueryLanguageService()
39
- .validateBoolean(this.state.expression, NamedQueryModuleId).isValid);
40
- }
41
- handleCustomExpressionChange = (expression) => {
42
- this.setState({
43
- expression,
44
- }, () => this.props.updateGoBackState());
45
- };
46
- canNext() {
47
- if (this.isValidExpression() == false) {
48
- return false;
49
- }
50
- if (this.state.saveToNamedQueries && StringExtensions.IsNullOrEmpty(this.state.newNamedQuery)) {
51
- return false;
52
- }
53
- return true;
54
- }
55
- canBack() {
56
- return true;
57
- }
58
- next() {
59
- this.props.callingModule == 'Export'
60
- ? (this.props.data.Query = {
61
- BooleanExpression: this.state.expression,
62
- })
63
- : (this.props.data.Rule = {
64
- BooleanExpression: this.state.expression,
65
- });
66
- if (this.state.saveToNamedQueries) {
67
- this.props.onSetNewNamedQuery(this.state.newNamedQuery);
68
- }
69
- }
70
- back() { }
71
- getIndexStepIncrement() {
72
- return 1;
73
- }
74
- getIndexStepDecrement() {
75
- return 1;
76
- }
77
- }
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- export type WaitingProps = React.ClassAttributes<Waiting> & {
3
- WaitingMessage: string;
4
- } & FlexProps & {
5
- className?: string;
6
- };
7
- import { FlexProps } from '../../../components/Flex';
8
- export declare class Waiting extends React.Component<WaitingProps, {}> {
9
- render(): any;
10
- }
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import IconRefresh from '../../../components/icons/refresh';
3
- import { Flex } from '../../../components/Flex';
4
- import { twMerge } from '../../../twMerge';
5
- export class Waiting extends React.Component {
6
- render() {
7
- const { WaitingMessage, ...props } = this.props;
8
- return (React.createElement(Flex, { flexDirection: "column", ...props, className: twMerge(`twa:my-2`, props.className) },
9
- React.createElement(Flex, { flexDirection: "row", justifyContent: "center" },
10
- React.createElement(IconRefresh, null)),
11
- React.createElement(Flex, { flexDirection: "row", justifyContent: "center" },
12
- React.createElement("h5", null, WaitingMessage))));
13
- }
14
- }
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- export interface PanelFooterProps {
3
- onCancel: () => void;
4
- onAccept: () => void;
5
- cancelDisabled?: boolean;
6
- acceptDisabled?: boolean;
7
- acceptText?: React.ReactElement;
8
- cancelText?: React.ReactElement;
9
- }
10
- export declare const PanelFooter: React.FunctionComponent<PanelFooterProps>;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import SimpleButton from '../../../components/SimpleButton';
3
- import { Flex, Box } from '../../../components/Flex';
4
- export const PanelFooter = (props) => {
5
- return (React.createElement(Flex, { className: "ab-Panel__Footer twa:p-1 twa:bg-primary", flexDirection: "row", alignItems: "center" },
6
- React.createElement(SimpleButton, { className: "twa:m-1", variant: "text", "data-name": "action-cancel", onClick: props.onCancel, disabled: props.cancelDisabled }, props.cancelText ?? 'CANCEL'),
7
- React.createElement(Box, { className: "twa:flex-1" }),
8
- React.createElement(SimpleButton, { variant: "raised", tone: "accent", "data-name": "action-finish", className: "twa:m-1", onClick: props.onAccept, disabled: props.acceptDisabled }, props.cancelText ?? 'Finish')));
9
- };
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { PanelProps } from '../../../components/Panel';
3
- export interface PanelWithTwoButtonsProps extends Omit<PanelProps, 'flex'> {
4
- firstButtonContent?: React.ReactNode;
5
- firstButton?: React.ReactElement<any>;
6
- secondButtonContent?: React.ReactNode;
7
- secondButton?: React.ReactElement<any>;
8
- headerText: string;
9
- }
10
- export declare class PanelWithTwoButtons extends React.Component<PanelWithTwoButtonsProps, {}> {
11
- render(): React.JSX.Element;
12
- }
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- import Panel from '../../../components/Panel';
3
- import { Flex } from '../../../components/Flex';
4
- //We cannot destructure this.props using the react way in typescript which is a real pain as you
5
- //need to transfer props individually as a consequence
6
- //let { buttonContent, ...other } = this.props
7
- export class PanelWithTwoButtons extends React.Component {
8
- render() {
9
- let header = (React.createElement(Flex, { alignItems: "center", className: "twa:w-full" },
10
- React.createElement(Flex, { className: "twa:flex-1" }, this.props.headerText),
11
- this.props.secondButton,
12
- this.props.firstButton));
13
- return (React.createElement(Panel, { ...this.props, header: header }, this.props.children));
14
- }
15
- }
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { PanelProps } from '../../../components/Panel';
3
- export interface ToolPanelSettingsPanelProps extends PanelProps {
4
- button: React.ReactElement<any>;
5
- }
6
- export declare class ToolPanelSettingsPanel extends React.Component<ToolPanelSettingsPanelProps, {}> {
7
- render(): React.JSX.Element;
8
- }
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import { Icon } from '../../../components/icons';
3
- import Panel from '../../../components/Panel';
4
- //We cannot destructure this.props using the react way in typescript which is a real pain as you
5
- //need to transfer props individually as a consequence
6
- //let { buttonContent, ...other } = this.props
7
- export class ToolPanelSettingsPanel extends React.Component {
8
- render() {
9
- let header = (React.createElement("span", { style: { verticalAlign: 'middle' } },
10
- ' ',
11
- React.createElement(Icon, { name: 'spanner' }),
12
- " ",
13
- React.createElement("span", null, "Settings"),
14
- this.props.button &&
15
- React.cloneElement(this.props.button, {
16
- style: {
17
- float: 'right',
18
- border: '0px',
19
- background: 'none',
20
- borderRadius: '0px',
21
- boxShadow: 'none',
22
- },
23
- })));
24
- return (React.createElement(Panel, { header: header, style: { margin: '0px', padding: '0px' } }, this.props.children));
25
- }
26
- }
@@ -1,18 +0,0 @@
1
- import * as React from 'react';
2
- import { SelectionMode } from '../../../AdaptableState/Common/Enums';
3
- import { AdaptableColumn } from '../../../AdaptableState/Common/AdaptableColumn';
4
- export interface ColumnSelectorProps extends React.HTMLProps<ColumnSelector> {
5
- ColumnList: AdaptableColumn[];
6
- SelectedColumnIds: string[];
7
- onColumnChange: (SelectedColumns: AdaptableColumn[]) => void;
8
- SelectionMode: SelectionMode;
9
- className?: string;
10
- placeHolder?: string;
11
- showClearButton?: boolean;
12
- disabled?: boolean;
13
- }
14
- export declare class ColumnSelector extends React.Component<ColumnSelectorProps, {}> {
15
- render(): React.JSX.Element;
16
- onClearButton(): void;
17
- onColumnChange(selected: AdaptableColumn[], isEmptySelection: boolean): void;
18
- }
@@ -1,45 +0,0 @@
1
- import * as React from 'react';
2
- import { StringExtensions } from '../../../Utilities/Extensions/StringExtensions';
3
- import { SortOrder } from '../../../AdaptableState/Common/Enums';
4
- import { ArrayExtensions } from '../../../Utilities/Extensions/ArrayExtensions';
5
- import FormLayout, { FormRow } from '../../../components/FormLayout';
6
- import DropdownButton from '../../../components/DropdownButton';
7
- export class ColumnSelector extends React.Component {
8
- render() {
9
- const sortedColumns = ArrayExtensions.sortArrayWithProperty(SortOrder.Asc, this.props.ColumnList, 'friendlyName');
10
- const selectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x));
11
- const isEmptySelectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x)).length == 0;
12
- let sortedColumnOptions = sortedColumns.map((column) => {
13
- return {
14
- label: column.friendlyName,
15
- value: column.columnId,
16
- disabled: this.props.disabled,
17
- onClick: () => {
18
- const selected = sortedColumns.filter((c) => c.columnId === column.columnId);
19
- if (!selected.length) {
20
- this.onClearButton();
21
- }
22
- else {
23
- this.onColumnChange(selected, isEmptySelectedColumnIds);
24
- }
25
- },
26
- };
27
- });
28
- let currentColumnName = selectedColumnIds.length > 0
29
- ? this.props.ColumnList.find((c) => c.columnId == selectedColumnIds[0])?.friendlyName
30
- : 'Select a column';
31
- return (React.createElement("div", { "data-name": 'column-selector' },
32
- React.createElement(FormLayout, { columns: [{ name: 'columnSelector', style: { display: 'flex' } }], style: this.props.style },
33
- React.createElement(FormRow, null,
34
- React.createElement(DropdownButton, { className: "twa:w-full twa:text-0 twa:mr-2", columns: ['label'], showClearButton: currentColumnName != 'Select a column', onClear: () => this.onClearButton(), items: sortedColumnOptions, disabled: this.props.disabled || sortedColumnOptions.length == 0 }, currentColumnName)))));
35
- }
36
- onClearButton() {
37
- this.props.onColumnChange([]);
38
- }
39
- onColumnChange(selected, isEmptySelection) {
40
- if (selected.length == 0 && isEmptySelection) {
41
- return; // must be a nicer way but we want to avoid ridiculous amounts of prop calls
42
- }
43
- this.props.onColumnChange(selected);
44
- }
45
- }
@@ -1,4 +0,0 @@
1
- import { ColumnScope } from '../../../AdaptableState/Common/ColumnScope';
2
- export interface WizardScopeState {
3
- scope: ColumnScope;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import { BaseRowProps } from './SharedProps/ConfigEntityRowProps';
3
- export interface WizardSummaryRowProps<WizardSummaryRow> extends BaseRowProps<WizardSummaryRow> {
4
- propertyName: string;
5
- propertyValue: any;
6
- }
7
- export declare class WizardSummaryRow extends React.Component<WizardSummaryRowProps<WizardSummaryRow>, {}> {
8
- render(): any;
9
- }
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- import { AdaptableObjectRow } from './AdaptableObjectRow';
3
- import { cloneObject } from '../../Utilities/Helpers/Helper';
4
- export class WizardSummaryRow extends React.Component {
5
- render() {
6
- let colItems = cloneObject(this.props.colItems);
7
- colItems[0].Content = this.props.propertyName;
8
- colItems[1].Content = this.props.propertyValue;
9
- return React.createElement(AdaptableObjectRow, { colItems: colItems, fontSize: 'medium' });
10
- }
11
- }
@@ -1,23 +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 CustomSortRedux from '../../Redux/ActionsReducers/CustomSortRedux';
5
- import { CustomSort } from '../../AdaptableState/CustomSortState';
6
- export interface CustomSortSummaryProps extends ModuleSummaryProps<CustomSortSummaryComponent> {
7
- CustomSorts: CustomSort[];
8
- onAddCustomSort: (customSort: CustomSort) => CustomSortRedux.CustomSortAddAction;
9
- onEditCustomSort: (customSort: CustomSort) => CustomSortRedux.CustomSortEditAction;
10
- }
11
- export declare class CustomSortSummaryComponent extends React.Component<CustomSortSummaryProps, EditableConfigEntityState> {
12
- constructor(props: CustomSortSummaryProps);
13
- render(): any;
14
- onNew(): void;
15
- onEdit(customSort: CustomSort): void;
16
- onCloseWizard(): void;
17
- onFinishWizard: (customSort: CustomSort) => void;
18
- canFinishWizard(): boolean;
19
- private getCustomSortedValues;
20
- }
21
- export declare let CustomSortSummary: import("react-redux").ConnectedComponent<typeof CustomSortSummaryComponent, {
22
- [x: string]: any;
23
- }>;
@@ -1,105 +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 CustomSortRedux from '../../Redux/ActionsReducers/CustomSortRedux';
6
- import { ObjectFactory } from '../../Utilities/ObjectFactory';
7
- import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
8
- import { ModuleHeader } from '../Components/ModuleSummary/ModuleHeader';
9
- import { ModuleDetail } from '../Components/ModuleSummary/ModuleDetail';
10
- import { ModuleProfile } from '../Components/ModuleProfile';
11
- import * as TeamSharingRedux from '../../Redux/ActionsReducers/TeamSharingRedux';
12
- import { UIHelper } from '../UIHelper';
13
- import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
14
- import { ArrayExtensions } from '../../Utilities/Extensions/ArrayExtensions';
15
- import { CustomSortWizard } from './Wizard/CustomSortWizard';
16
- export class CustomSortSummaryComponent extends React.Component {
17
- constructor(props) {
18
- super(props);
19
- this.state = UIHelper.getEmptyConfigState();
20
- }
21
- render() {
22
- const customSort = this.props.CustomSorts.find((c) => c.ColumnId == this.props.summarisedColumn.columnId);
23
- const columnSortComparer = this.props.api.customSortApi.internalApi.getCustomSortComparer(this.props.summarisedColumn.columnId);
24
- let noCustomSort = customSort == null && columnSortComparer == null;
25
- let customSortRow;
26
- if (!this.props.summarisedColumn.sortable) {
27
- customSortRow = (React.createElement(ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: 'Column is not sortable', newButtonDisabled: true, onNew: () => this.onNew(), newButtonTooltip: this.props.moduleInfo.FriendlyName, accessLevel: this.props.accessLevel }));
28
- }
29
- else if (noCustomSort) {
30
- // title row
31
- customSortRow = (React.createElement(ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: 'No Custom Sort Set', onNew: () => this.onNew(), accessLevel: this.props.accessLevel, newButtonTooltip: this.props.moduleInfo.FriendlyName }));
32
- }
33
- else if (columnSortComparer != null) {
34
- customSortRow = (React.createElement(ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: 'Using a Custom Sort Comparer Function', onNew: () => this.onNew(), accessLevel: this.props.accessLevel, newButtonTooltip: this.props.moduleInfo.FriendlyName }));
35
- }
36
- else {
37
- customSortRow = (React.createElement(ModuleDetail, { key: this.props.moduleInfo.FriendlyName, item1: React.createElement(ModuleProfile, { moduleInfo: this.props.moduleInfo }), item2: this.getCustomSortedValues(customSort), configEnity: customSort, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(customSort), showEdit: customSort != undefined, onShare: (config) => this.props.onShare(customSort, config), showShare: this.props.teamSharingActivated, onDelete: CustomSortRedux.CustomSortDelete(customSort), showBold: true, accessLevel: this.props.accessLevel }));
38
- }
39
- return (React.createElement(React.Fragment, null,
40
- customSortRow,
41
- this.state.editedAdaptableObject && (React.createElement(CustomSortWizard, { isNew: this.state.wizardStatus === WizardStatus.New, moduleInfo: this.props.moduleInfo, data: this.state.editedAdaptableObject, configEntities: this.props.CustomSorts, onCloseWizard: () => this.onCloseWizard(), onFinishWizard: this.onFinishWizard }))));
42
- }
43
- onNew() {
44
- let configEntity = ObjectFactory.CreateEmptyCustomSort();
45
- configEntity.ColumnId = this.props.summarisedColumn.columnId;
46
- this.setState({
47
- editedAdaptableObject: configEntity,
48
- wizardStartIndex: 1,
49
- wizardStatus: WizardStatus.New,
50
- });
51
- }
52
- onEdit(customSort) {
53
- this.setState({
54
- editedAdaptableObject: Helper.cloneObject(customSort),
55
- wizardStartIndex: 1,
56
- wizardStatus: WizardStatus.Edit,
57
- });
58
- }
59
- onCloseWizard() {
60
- this.setState({
61
- editedAdaptableObject: null,
62
- wizardStartIndex: 0,
63
- wizardStatus: WizardStatus.None,
64
- });
65
- }
66
- onFinishWizard = (customSort) => {
67
- if (this.props.CustomSorts.find((x) => x.ColumnId == customSort.ColumnId)) {
68
- this.props.onEditCustomSort(customSort);
69
- }
70
- else {
71
- this.props.onAddCustomSort(customSort);
72
- }
73
- this.setState({
74
- editedAdaptableObject: null,
75
- wizardStartIndex: 0,
76
- wizardStatus: WizardStatus.None,
77
- });
78
- };
79
- canFinishWizard() {
80
- let customSort = this.state.editedAdaptableObject;
81
- return (StringExtensions.IsNotNullOrEmpty(customSort.ColumnId) &&
82
- ArrayExtensions.IsNotNullOrEmpty(customSort.SortedValues));
83
- }
84
- getCustomSortedValues(customSort) {
85
- if (ArrayExtensions.IsNotNullOrEmpty(customSort.SortedValues)) {
86
- return customSort.SortedValues.join(', ');
87
- }
88
- else {
89
- return '[Has bespoke Custom Sort implementing using bespoke function]';
90
- }
91
- }
92
- }
93
- function mapStateToProps(state, ownProps) {
94
- return {
95
- CustomSorts: state.CustomSort.CustomSorts,
96
- };
97
- }
98
- function mapDispatchToProps(dispatch) {
99
- return {
100
- onAddCustomSort: (customSort) => dispatch(CustomSortRedux.CustomSortAdd(customSort)),
101
- onEditCustomSort: (customSort) => dispatch(CustomSortRedux.CustomSortEdit(customSort)),
102
- onShare: (entity, config) => dispatch(TeamSharingRedux.TeamSharingShare(entity, ModuleConstants.CustomSortModuleId, config)),
103
- };
104
- }
105
- export let CustomSortSummary = connect(mapStateToProps, mapDispatchToProps)(CustomSortSummaryComponent);
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import { ValidationErrorsMap } from '../DataImportWizard';
3
- interface ImportSectionProps {
4
- data?: Record<string, unknown>[];
5
- onDataChange?: (data: Record<string, unknown>[]) => void;
6
- errors: ValidationErrorsMap | null;
7
- }
8
- export declare const ImportSection: React.FunctionComponent<ImportSectionProps>;
9
- export {};