@adaptabletools/adaptable-cjs 20.0.0-canary.2 → 20.0.0-canary.20

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 (116) hide show
  1. package/base.css +1288 -898
  2. package/base.css.map +1 -1
  3. package/index.css +428 -898
  4. package/index.css.map +1 -1
  5. package/package.json +4 -4
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -1
  7. package/src/AdaptableOptions/CellSummaryOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
  9. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
  10. package/src/AdaptableOptions/DefaultAdaptableOptions.js +2 -2
  11. package/src/AdaptableOptions/EditOptions.d.ts +14 -3
  12. package/src/AdaptableOptions/ExportOptions.d.ts +11 -20
  13. package/src/AdaptableOptions/PredicateOptions.d.ts +4 -4
  14. package/src/AdaptableOptions/QuickSearchOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +7 -0
  16. package/src/Api/ExportApi.d.ts +1 -6
  17. package/src/Api/Fdc3Api.d.ts +5 -3
  18. package/src/Api/Implementation/AdaptableApiImpl.js +1 -0
  19. package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
  20. package/src/Api/Implementation/ExportApiImpl.d.ts +1 -2
  21. package/src/Api/Implementation/ExportApiImpl.js +17 -10
  22. package/src/Api/Implementation/Fdc3ApiImpl.d.ts +3 -3
  23. package/src/Api/Implementation/Fdc3ApiImpl.js +4 -4
  24. package/src/Api/Implementation/LayoutHelpers.js +8 -27
  25. package/src/Api/Implementation/PredicateApiImpl.js +1 -1
  26. package/src/Api/Implementation/ScheduleApiImpl.js +1 -1
  27. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -1
  28. package/src/Api/Implementation/ThemeApiImpl.js +3 -1
  29. package/src/Api/Internal/ActionColumnInternalApi.js +16 -19
  30. package/src/Api/Internal/AdaptableInternalApi.js +1 -1
  31. package/src/Api/Internal/ColumnFilterInternalApi.js +2 -2
  32. package/src/Api/Internal/ColumnInternalApi.js +1 -2
  33. package/src/Api/Internal/EventInternalApi.js +6 -1
  34. package/src/Api/Internal/ExportInternalApi.d.ts +10 -6
  35. package/src/Api/Internal/ExportInternalApi.js +105 -136
  36. package/src/Api/Internal/RowFormInternalApi.js +1 -1
  37. package/src/Api/ThemeApi.d.ts +2 -0
  38. package/src/PredefinedConfig/AlertState.d.ts +1 -1
  39. package/src/PredefinedConfig/Common/AdaptableColumnContext.d.ts +1 -1
  40. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
  41. package/src/PredefinedConfig/Common/AdaptablePredicate.js +32 -48
  42. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +6 -2
  43. package/src/PredefinedConfig/ExportState.d.ts +10 -17
  44. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  45. package/src/PredefinedConfig/LayoutState.d.ts +17 -17
  46. package/src/PredefinedConfig/StyledColumnState.d.ts +1 -1
  47. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +4 -3
  48. package/src/Redux/ActionsReducers/LayoutRedux.js +3 -3
  49. package/src/Redux/Store/AdaptableStore.js +2 -2
  50. package/src/Strategy/ColumnFilterModule.js +4 -4
  51. package/src/Strategy/StyledColumnModule.js +6 -6
  52. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +5 -6
  53. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +9 -10
  54. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +27 -27
  55. package/src/Utilities/Helpers/AdaptableHelper.d.ts +2 -0
  56. package/src/Utilities/Helpers/AdaptableHelper.js +12 -1
  57. package/src/Utilities/Helpers/DateHelper.js +3 -5
  58. package/src/Utilities/Helpers/FormatHelper.js +19 -6
  59. package/src/Utilities/ObjectFactory.js +1 -0
  60. package/src/Utilities/Services/Fdc3Service.d.ts +2 -2
  61. package/src/Utilities/Services/Fdc3Service.js +7 -2
  62. package/src/Utilities/Services/ThemeService.d.ts +1 -1
  63. package/src/Utilities/Services/ThemeService.js +5 -5
  64. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +41 -0
  65. package/src/View/ColumnInfo/ColumnInfo.js +0 -1
  66. package/src/View/Comments/CommentsEditor.js +5 -2
  67. package/src/View/Comments/CommentsPopup.js +5 -2
  68. package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +1 -1
  69. package/src/View/Components/ColumnFilter/ColumnFilter.js +4 -2
  70. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -1
  71. package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
  72. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
  73. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +6 -2
  74. package/src/View/Components/ColumnFilter/utils.js +2 -2
  75. package/src/View/Components/FilterForm/ListBoxFilterForm.js +3 -3
  76. package/src/View/Dashboard/CustomToolbar.js +2 -2
  77. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +4 -1
  78. package/src/View/Filter/FilterSummary.js +1 -1
  79. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +6 -2
  80. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +7 -2
  81. package/src/View/Note/NotePopup.js +5 -2
  82. package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
  83. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +2 -0
  84. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +18 -2
  85. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
  86. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
  87. package/src/View/StatusBar/AdaptableStatusBar.js +7 -5
  88. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +3 -4
  89. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +348 -191
  90. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -2
  91. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  92. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +4 -4
  93. package/src/agGrid/AdaptableAgGrid.d.ts +4 -8
  94. package/src/agGrid/AdaptableAgGrid.js +71 -117
  95. package/src/agGrid/AgGridAdapter.d.ts +1 -1
  96. package/src/agGrid/AgGridAdapter.js +5 -6
  97. package/src/agGrid/AgGridColumnAdapter.js +5 -10
  98. package/src/agGrid/AgGridExportAdapter.d.ts +24 -1
  99. package/src/agGrid/AgGridExportAdapter.js +24 -25
  100. package/src/agGrid/AgGridThemeAdapter.d.ts +19 -0
  101. package/src/agGrid/AgGridThemeAdapter.js +126 -0
  102. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -1
  103. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +2 -2
  104. package/src/components/ColorPicker/ColorPicker.js +2 -2
  105. package/src/components/Datepicker/DatepickerContext.d.ts +1 -0
  106. package/src/components/Datepicker/index.d.ts +1 -0
  107. package/src/components/OverlayTrigger/useAgGridClassName.js +1 -1
  108. package/src/components/Select/Select.d.ts +1 -0
  109. package/src/components/Select/Select.js +30 -7
  110. package/src/env.js +2 -2
  111. package/src/metamodel/adaptable.metamodel.d.ts +23 -15
  112. package/src/metamodel/adaptable.metamodel.js +1 -1
  113. package/src/migration/VersionUpgrade20.d.ts +3 -0
  114. package/src/migration/VersionUpgrade20.js +141 -12
  115. package/src/types.d.ts +3 -3
  116. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StringFormatter = exports.DateFormatter = exports.NumberFormatter = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  // TODO inspect why the following is erroring on angular build
6
- // import dateFnsFormat from 'date-fns/format';
7
- const format_1 = tslib_1.__importDefault(require("date-fns/format"));
6
+ const date_fns_1 = require("date-fns");
8
7
  const sentence_case_1 = require("sentence-case");
9
8
  const GeneralConstants_1 = require("../Constants/GeneralConstants");
10
9
  const Helper_1 = tslib_1.__importDefault(require("./Helper"));
10
+ const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
11
11
  function NumberFormatter(input, options = {}, rowNode, column, api) {
12
12
  let preparedInput;
13
13
  if (options.Content) {
@@ -103,7 +103,7 @@ function DateFormatter(input, options, strictFormatting = false) {
103
103
  if (typeof input === 'string') {
104
104
  input = new Date(input);
105
105
  }
106
- return (0, format_1.default)(input, options?.Pattern || GeneralConstants_1.DEFAULT_DATE_FORMAT_PATTERN);
106
+ return (0, date_fns_1.format)(input, options?.Pattern || GeneralConstants_1.DEFAULT_DATE_FORMAT_PATTERN);
107
107
  }
108
108
  catch (error) {
109
109
  if (strictFormatting) {
@@ -117,20 +117,33 @@ function DateFormatter(input, options, strictFormatting = false) {
117
117
  }
118
118
  exports.DateFormatter = DateFormatter;
119
119
  function StringFormatter(input, options = {}, rowNode, column, api) {
120
+ let normalisedTextInput = input;
121
+ if (input != undefined && typeof input !== 'string') {
122
+ const warningMessage = column
123
+ ? `StringFormatter: input '${input}' from column ${column.columnId} (${column.dataType}) is not a string, but a ${typeof input}`
124
+ : `StringFormatter: input '${input}' is not a string, received ${typeof input}`;
125
+ if (api) {
126
+ api.logWarn(warningMessage);
127
+ }
128
+ else {
129
+ console.warn(warningMessage);
130
+ }
131
+ normalisedTextInput = `${input}`;
132
+ }
120
133
  let preparedInput;
121
134
  if (options.Content) {
122
135
  const context = {
123
136
  column,
124
137
  rowNode,
125
- input,
138
+ input: normalisedTextInput,
126
139
  api,
127
140
  };
128
141
  preparedInput = formatPlaceholder(options.Content, context);
129
142
  }
130
143
  else {
131
- preparedInput = input;
144
+ preparedInput = normalisedTextInput;
132
145
  }
133
- if (preparedInput == null || preparedInput == undefined) {
146
+ if (StringExtensions_1.default.IsNullOrEmptyOrWhiteSpace(preparedInput)) {
134
147
  return undefined;
135
148
  }
136
149
  if (options.Empty) {
@@ -180,6 +180,7 @@ function CreateEmptyReportSchedule() {
180
180
  Schedule: CreateEmptySchedule(),
181
181
  ReportName: GeneralConstants_1.EMPTY_STRING,
182
182
  ReportFormat: GeneralConstants_1.EMPTY_STRING,
183
+ ExportDestination: 'Download',
183
184
  };
184
185
  }
185
186
  exports.CreateEmptyReportSchedule = CreateEmptyReportSchedule;
@@ -1,7 +1,7 @@
1
1
  import { IAdaptableService } from './Interface/IAdaptableService';
2
2
  import { AdaptableApi } from '../../Api/AdaptableApi';
3
3
  import { Fdc3Options } from '../../AdaptableOptions/Fdc3Options';
4
- import { AppIdentifier, DesktopAgent, IntentResolution } from '@finos/fdc3';
4
+ import { AppIdentifier, Channel, DesktopAgent, IntentResolution } from '@finos/fdc3';
5
5
  import { Context } from '@finos/fdc3/dist/context/ContextTypes';
6
6
  export declare class Fdc3Service implements IAdaptableService {
7
7
  private adaptableApi;
@@ -15,7 +15,7 @@ export declare class Fdc3Service implements IAdaptableService {
15
15
  destroy(): void;
16
16
  raiseIntent(intent: string, context: Context, app?: AppIdentifier): Promise<IntentResolution>;
17
17
  raiseIntentForContext(context: Context, app?: AppIdentifier): Promise<IntentResolution>;
18
- broadcast(context: Context): Promise<void>;
18
+ broadcast(context: Context, channel?: Channel): Promise<void>;
19
19
  private logFdc3Event;
20
20
  private logFdc3Error;
21
21
  private getFdc3Api;
@@ -134,7 +134,7 @@ class Fdc3Service {
134
134
  this.logFdc3Error(error);
135
135
  }
136
136
  }
137
- broadcast(context) {
137
+ broadcast(context, channel) {
138
138
  if (!this.getDesktopAgent()) {
139
139
  return;
140
140
  }
@@ -147,7 +147,12 @@ class Fdc3Service {
147
147
  context,
148
148
  };
149
149
  this.adaptableApi.eventApi.emit('Fdc3Message', payload);
150
- return this.getDesktopAgent().broadcast(context);
150
+ if (channel) {
151
+ return channel.broadcast(context);
152
+ }
153
+ else {
154
+ return this.getDesktopAgent().broadcast(context);
155
+ }
151
156
  }
152
157
  catch (error) {
153
158
  this.logFdc3Error(error);
@@ -5,10 +5,10 @@ export declare class ThemeService implements IThemeService {
5
5
  private unsubscribe;
6
6
  private styleSheetObject;
7
7
  constructor(api: AdaptableApi);
8
+ destroy(): void;
8
9
  subscribe(): void;
9
10
  onThemeChanged: () => void;
10
11
  applyNewThemeVariables(theme: AdaptableTheme): void;
11
- destroy(): void;
12
12
  showMissingThemeFiles(theme: AdaptableTheme): void;
13
13
  getDOMPrefferedColorScheme(): 'dark' | 'light';
14
14
  mapOsTheme(theme: AdaptableTheme | string): AdaptableTheme;
@@ -23,6 +23,11 @@ class ThemeService {
23
23
  ];
24
24
  }
25
25
  }
26
+ destroy() {
27
+ this.api = null;
28
+ this.unsubscribe();
29
+ document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
30
+ }
26
31
  subscribe() {
27
32
  const themeChangedUnsubscribe = this.api.eventApi.on('ThemeChanged', this.onThemeChanged);
28
33
  const prefferedColorSchemeUnsubscribe = this.attachPrefferedColorSchemeListener();
@@ -47,11 +52,6 @@ class ThemeService {
47
52
  str += '}';
48
53
  this.styleSheetObject.replaceSync(str);
49
54
  }
50
- destroy() {
51
- this.api = null;
52
- this.unsubscribe();
53
- document.adoptedStyleSheets = [...document.adoptedStyleSheets].filter((sheet) => sheet !== this.styleSheetObject);
54
- }
55
55
  showMissingThemeFiles(theme) {
56
56
  // run time defined theme
57
57
  // because it may be an empty theme
@@ -46,6 +46,47 @@ const ConfigurationWizard = (props) => {
46
46
  delete newColumn.caption;
47
47
  return newColumn;
48
48
  });
49
+ const columnDefs = adaptableConfig.gridOptions.columnDefs;
50
+ // handle the layout creation
51
+ let Layouts = newAdaptableOptions.predefinedConfig?.Layout?.Layouts || [];
52
+ const NewLayout = {
53
+ TableColumns: columnDefs.map((col) => col.colId ?? col.field),
54
+ Name: 'Default Layout',
55
+ };
56
+ let currentLayoutName = NewLayout.Name;
57
+ let found = false;
58
+ if (!Layouts.length) {
59
+ // no layouts, make this the only one
60
+ Layouts = [NewLayout];
61
+ }
62
+ else {
63
+ Layouts = Layouts.map((layout) => {
64
+ if (found) {
65
+ return layout;
66
+ }
67
+ if (layout.TableColumns?.length === 0) {
68
+ // when finding the first empty layout
69
+ // set its column to be those of the new layout
70
+ found = true;
71
+ // and grab the name so we can put it in the Layout.CurrentLayout state
72
+ currentLayoutName = layout.Name;
73
+ layout = { ...layout };
74
+ layout.TableColumns = NewLayout.TableColumns;
75
+ }
76
+ return layout;
77
+ });
78
+ if (!found) {
79
+ Layouts.push(NewLayout);
80
+ }
81
+ }
82
+ newAdaptableOptions.predefinedConfig = {
83
+ ...newAdaptableOptions.predefinedConfig,
84
+ Layout: {
85
+ ...newAdaptableOptions.predefinedConfig.Layout,
86
+ Layouts: Layouts,
87
+ CurrentLayout: currentLayoutName,
88
+ },
89
+ };
49
90
  newAdaptableOptions.primaryKey = columnsHandle.current.getPrimaryKey();
50
91
  }
51
92
  const newAdaptableConfig = {
@@ -209,7 +209,6 @@ const ModuleView = (props) => {
209
209
  }, moduleInfo: moduleInfo, data: null, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
210
210
  };
211
211
  const ColumnInfo = (props) => {
212
- // const state = useSelector((state: AdaptableState) => state);
213
212
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
214
213
  const [selectedColumnId, setSelectedColumnId] = React.useState(props.selectedColumnId);
215
214
  const column = adaptable.api.columnApi.getColumnWithColumnId(selectedColumnId);
@@ -12,7 +12,7 @@ const CommentsRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/
12
12
  const InternalRedux_1 = require("../../Redux/ActionsReducers/InternalRedux");
13
13
  const AdaptableContext_1 = require("../AdaptableContext");
14
14
  const AdaptableInput_1 = tslib_1.__importDefault(require("../Components/AdaptableInput"));
15
- const format_1 = tslib_1.__importDefault(require("date-fns/format"));
15
+ const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
16
16
  // Edit Mode
17
17
  // [author] [edit, delete]
18
18
  // [text-editor] * this is different
@@ -52,6 +52,9 @@ const CommentsEditor = (props) => {
52
52
  if (!commentThread) {
53
53
  return null;
54
54
  }
55
+ const formatDate = (date, format) => {
56
+ return FormatHelper_1.default.DateFormatter(date, { Pattern: format });
57
+ };
55
58
  return (React.createElement(Panel_1.default, { color: "var(--ab-color-text-on-primary)", onClick: () => props.enableEditMode(), minWidth: 250, className: "ab-CommentPopup", onKeyDown: (event) => {
56
59
  if (event.key === 'Escape') {
57
60
  api.commentApi.hideCommentsPopup();
@@ -79,7 +82,7 @@ const CommentsEditor = (props) => {
79
82
  React.createElement(rebass_1.Flex, { mb: 2, alignItems: "center" },
80
83
  React.createElement(rebass_1.Box, null,
81
84
  React.createElement(rebass_1.Box, { "data-name": "comment-username", fontSize: 3, fontWeight: "bold" }, comment?.Author?.UserName),
82
- comment.Timestamp && (React.createElement(rebass_1.Box, { "data-name": "comment-timestamp", fontSize: 2 }, (0, format_1.default)(comment.Timestamp, api.commentApi.internalApi.getCommentsDateFormat())))),
85
+ comment.Timestamp && (React.createElement(rebass_1.Box, { "data-name": "comment-timestamp", fontSize: 2 }, formatDate(comment.Timestamp, api.commentApi.internalApi.getCommentsDateFormat())))),
83
86
  React.createElement(rebass_1.Box, { flex: 1 }),
84
87
  React.createElement(SimpleButton_1.default, { variant: "text", icon: "edit", disabled: !isOwnComment || isReadOnlyModule, onClick: () => setActiveEditingComment(comment.Uuid) }),
85
88
  React.createElement(SimpleButton_1.default, { variant: "text", icon: "delete", disabled: !isOwnComment || isReadOnlyModule, onClick: () => {
@@ -7,10 +7,10 @@ const react_redux_1 = require("react-redux");
7
7
  const InfiniteTable_1 = require("../../components/InfiniteTable");
8
8
  const Panel_1 = tslib_1.__importDefault(require("../../components/Panel"));
9
9
  const rebass_1 = require("rebass");
10
- const format_1 = tslib_1.__importDefault(require("date-fns/format"));
11
10
  const AdaptableContext_1 = require("../AdaptableContext");
12
11
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
13
12
  const AdaptableButton_1 = require("../Components/AdaptableButton");
13
+ const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
14
14
  const tableDOMProps = {
15
15
  style: {
16
16
  minHeight: 160,
@@ -20,6 +20,9 @@ const tableDOMProps = {
20
20
  const CellComments = (props) => {
21
21
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
22
22
  const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Comment') === 'ReadOnly';
23
+ const formatDate = (date, format) => {
24
+ return FormatHelper_1.default.DateFormatter(date, { Pattern: format });
25
+ };
23
26
  const columnsMap = React.useMemo(() => {
24
27
  const columns = {
25
28
  author: {
@@ -31,7 +34,7 @@ const CellComments = (props) => {
31
34
  field: 'Timestamp',
32
35
  maxWidth: 150,
33
36
  valueGetter: (params) => {
34
- return (0, format_1.default)(params.data.Timestamp, adaptable.api.commentApi.internalApi.getCommentsDateFormat());
37
+ return formatDate(params.data.Timestamp, adaptable.api.commentApi.internalApi.getCommentsDateFormat());
35
38
  },
36
39
  },
37
40
  text: {
@@ -6,7 +6,7 @@ interface ColumnFilterComponentProps {
6
6
  disabled?: boolean;
7
7
  predicate?: QlPredicate;
8
8
  predicateDefs: QlPredicateDef[];
9
- onPredicateChange: (predicate: QlPredicate) => void;
9
+ onPredicateChange: (predicate: QlPredicate | null) => void;
10
10
  wrapperProps?: BoxProps;
11
11
  }
12
12
  export declare const ColumnFilterComponent: React.FunctionComponent<ColumnFilterComponentProps>;
@@ -73,7 +73,9 @@ const ColumnFilterComponent = (props) => {
73
73
  setPredicateNotYetApplied(undefined);
74
74
  };
75
75
  const onPredicateChange = (predicate) => {
76
- if (autoApplyColumnFilter) {
76
+ // even if autoApplyColumnFilter is false, when we explicitly clear the filter
77
+ // we want to apply the filter immediately
78
+ if (autoApplyColumnFilter || !predicate) {
77
79
  props.onPredicateChange(predicate);
78
80
  }
79
81
  else {
@@ -116,7 +118,7 @@ const ColumnFilterComponent = (props) => {
116
118
  return (React.createElement(React.Fragment, null,
117
119
  React.createElement(rebass_1.Flex, { m: 2 },
118
120
  React.createElement(AndOrInput, { onChange: onCombineChange, operator: currentPredicate.operator }),
119
- React.createElement(SimpleButton_1.default, { ml: 2, onClick: () => onPredicateChange({ operator: 'AND', args: [] }) }, "Clear All")),
121
+ React.createElement(SimpleButton_1.default, { ml: 2, onClick: () => onPredicateChange(null) }, "Clear All")),
120
122
  React.createElement(rebass_1.Flex, { flexDirection: "column", className: "ab-ColumnFilter", flex: 1, minHeight: 0, ...props.wrapperProps },
121
123
  React.createElement(rebass_1.Box, { flex: 1, style: { overflow: 'auto' } },
122
124
  currentPredicate.args.map((predicate, index) => {
@@ -82,7 +82,7 @@ const FloatingFilter = (props) => {
82
82
  } }))),
83
83
  isInlineEditable && (React.createElement(SimpleButton_1.default, { px: 0, onClick: () => {
84
84
  adaptable.api.filterApi.columnFilterApi.internalApi.openColumnFilterPopup(props.columnId);
85
- }, icon: "expand", variant: "text" })),
85
+ }, "data-name": "expand-filter", icon: "expand", variant: "text" })),
86
86
  (isMultiple ||
87
87
  !(0, utils_1.isPredicateEmpty)(props.predicate.args[0], singleFilterPredicateDef)) && (React.createElement(SimpleButton_1.default, { "data-name": "clear-filter", p: 0, variant: "text", onClick: handleClear, icon: "close" }))));
88
88
  };
@@ -21,7 +21,7 @@ const LayoutColumnFilter = (props) => {
21
21
  ...props.columnFilter,
22
22
  ColumnId: props.columnFilter.ColumnId,
23
23
  Predicates: newAdaptablePredicates,
24
- PredicatesLogic: newPredicate.operator,
24
+ PredicatesOperator: newPredicate.operator,
25
25
  };
26
26
  props.onColumnFilterChange(newFilter);
27
27
  };
@@ -6,7 +6,7 @@ export declare const useAdaptableFilterWrapper: (columnId: string, handleOnChang
6
6
  qlPredicateDefs: import("@adaptabletools/adaptable/src/parser/src/predicate/types").QlPredicateDef[];
7
7
  columnFilter: ColumnFilter;
8
8
  handleClear: () => LayoutRedux.LayoutColumnFilterClearAction;
9
- handlePredicateChange: (newPredicate: QlPredicate) => void;
9
+ handlePredicateChange: (newPredicate: QlPredicate | null) => void;
10
10
  handleOnChange: (adaptablePredicate: AdaptablePredicate[], logic?: QlLogicalOperator) => void;
11
11
  column: import("../../../types").AdaptableColumn<any>;
12
12
  };
@@ -35,7 +35,7 @@ const useAdaptableFilterWrapper = (columnId, handleOnChangeOverride) => {
35
35
  ...columnFilter,
36
36
  ColumnId: columnId,
37
37
  Predicates: adaptablePredicate,
38
- PredicatesLogic: logic,
38
+ PredicatesOperator: logic,
39
39
  };
40
40
  if (handleOnChangeOverride) {
41
41
  handleOnChangeOverride(newFilter);
@@ -46,11 +46,15 @@ const useAdaptableFilterWrapper = (columnId, handleOnChangeOverride) => {
46
46
  : LayoutRedux.LayoutColumnFilterAdd(newFilter));
47
47
  }
48
48
  };
49
- const handleClear = () => dispatch(LayoutRedux.LayoutColumnFilterClear(columnFilter));
49
+ const handleClear = React.useCallback(() => dispatch(LayoutRedux.LayoutColumnFilterClear(columnId)), [columnId]);
50
50
  /**
51
51
  * Converts a QlPredicate to an AdaptablePredicate and dispatches the change.
52
52
  */
53
53
  const handlePredicateChange = React.useCallback((newPredicate) => {
54
+ if (!newPredicate) {
55
+ handleClear();
56
+ return;
57
+ }
54
58
  const newAdaptablePredicates = newPredicate.args.map(utils_1.mapQlPredicateToAdaptablePredicate);
55
59
  handleOnChange(newAdaptablePredicates, newPredicate.operator);
56
60
  }, [columnId]);
@@ -75,7 +75,7 @@ const qlPredicateToString = (qlPredicate, predicateDefs) => {
75
75
  };
76
76
  exports.qlPredicateToString = qlPredicateToString;
77
77
  const isPredicateEmpty = (predicate, predicateDef) => {
78
- if (!predicateDef.inputs || predicateDef.inputs.length === 0) {
78
+ if (!predicateDef?.inputs || predicateDef.inputs.length === 0) {
79
79
  return false;
80
80
  }
81
81
  return (!predicate ||
@@ -85,7 +85,7 @@ const isPredicateEmpty = (predicate, predicateDef) => {
85
85
  };
86
86
  exports.isPredicateEmpty = isPredicateEmpty;
87
87
  const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicateDefs, columnFilterOptions) => {
88
- const combinator = columnFilter?.PredicatesLogic ?? 'AND';
88
+ const combinator = columnFilter?.PredicatesOperator ?? 'AND';
89
89
  const qlPredicate = {
90
90
  operator: combinator,
91
91
  args: (columnFilter?.Predicates ?? []).map?.(exports.mapAdaptablePredicateToQlPredicate),
@@ -4,7 +4,7 @@ exports.ColumnValuesSelect = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const StringExtensions_1 = require("../../../Utilities/Extensions/StringExtensions");
7
- const isEqual_1 = tslib_1.__importDefault(require("date-fns/isEqual"));
7
+ const date_fns_1 = require("date-fns");
8
8
  const DateHelper_1 = require("../../../Utilities/Helpers/DateHelper");
9
9
  const join_1 = tslib_1.__importDefault(require("../../../components/utils/join"));
10
10
  const Select_1 = require("../../../components/Select");
@@ -17,7 +17,7 @@ const ColumnValuesSelect = (props) => {
17
17
  let isActive = selectedColumnValues.indexOf(distinctValue.value) >= 0;
18
18
  // special case for date objects, need to check against string values
19
19
  if (!isActive && distinctValue.value && distinctValue.value instanceof Date) {
20
- isActive = selectedColumnValues.some((dateStr) => (0, isEqual_1.default)((0, DateHelper_1.parseDateValue)(dateStr), (0, DateHelper_1.parseDateValue)(distinctValue.value)));
20
+ isActive = selectedColumnValues.some((dateStr) => (0, date_fns_1.isEqual)((0, DateHelper_1.parseDateValue)(dateStr), (0, DateHelper_1.parseDateValue)(distinctValue.value)));
21
21
  }
22
22
  const columnLabel = distinctValue.label;
23
23
  if (StringExtensions_1.StringExtensions.IsNullOrEmpty(columnLabel)) {
@@ -28,7 +28,7 @@ const ColumnValuesSelect = (props) => {
28
28
  }
29
29
  return true;
30
30
  });
31
- const component = (React.createElement(Select_1.Select, { isMulti: true, searchable: true, closeMenuOnSelect: false, size: "small", menuStyle: {
31
+ const component = (React.createElement(Select_1.Select, { isMulti: true, showHeaderSelectionCheckbox: true, searchable: true, closeMenuOnSelect: false, size: "small", menuStyle: {
32
32
  minWidth: `var(--ab-cmp-select-column-menu-${column.columnId}__min-width, var(--ab-cmp-select-column-menu__min-width, 260px))`,
33
33
  }, ...props.selectProps, options: options, value: value, isLoading: props.isLoading, onChange: props.onChange }));
34
34
  return (React.createElement("div", { className: (0, join_1.default)(baseClassName, props.isLoading && `${baseClassName}--loading`), onKeyDownCapture: (e) => {
@@ -92,8 +92,8 @@ const CustomToolbarCmp = (props) => {
92
92
  exports.CustomToolbarCmp = CustomToolbarCmp;
93
93
  const CustomToolbarWrapper = (props) => {
94
94
  const { api } = (0, AdaptableContext_1.useAdaptable)();
95
- return (React.createElement(PanelDashboard_1.PanelDashboard, { headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'Configure') !=
96
- undefined, showCloseActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'Close') != undefined, onConfigure: () => {
95
+ return (React.createElement(PanelDashboard_1.PanelDashboard, { headerText: props.customToolbar.title ? props.customToolbar.title : '', showConfigureActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'configure') !=
96
+ undefined, showCloseActionButton: props.customToolbar.toolbarActions?.find((b) => b == 'close') != undefined, onConfigure: () => {
97
97
  const customToolbarConfiguredInfo = {
98
98
  ...api.internalApi.buildBaseContext(),
99
99
  customToolbar: props.customToolbar,
@@ -58,7 +58,10 @@ class DataChangeHistoryPopupComponent extends React.Component {
58
58
  this.props.api.dataChangeHistoryApi.clearDataChangeHistoryEntry(changeToBeUndone);
59
59
  }
60
60
  };
61
- const currentAgGridTheme = this.props.api.themeApi.getAgGridCurrentThemeName();
61
+ const agGridThemeMode = this.props.api.internalApi
62
+ .getAdaptableInstance()
63
+ .agGridThemeAdapter.getAgGridThemeMode();
64
+ const currentAgGridTheme = agGridThemeMode === 'legacy' ? this.props.api.themeApi.getAgGridCurrentThemeName() : '';
62
65
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
63
66
  React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPopup", flexDirection: "column", style: { height: '100%' } },
64
67
  React.createElement(rebass_1.Flex, { style: {
@@ -45,7 +45,7 @@ function mapStateToProps(state) {
45
45
  }
46
46
  function mapDispatchToProps(dispatch) {
47
47
  return {
48
- onClearFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterClear(columnFilter)),
48
+ onClearFilter: (columnFilter) => dispatch(LayoutRedux.LayoutColumnFilterClear(columnFilter.ColumnId)),
49
49
  onClearPopupParams: () => dispatch(PopupRedux.PopupClearParam()),
50
50
  onShare: (entity, config) => dispatch(TeamSharingRedux.TeamSharingShare(entity, ModuleConstants.ColumnFilterModuleId, config)),
51
51
  };
@@ -3,13 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdaptableObjectsSummary = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const react_redux_1 = require("react-redux");
7
6
  const rebass_1 = require("rebass");
8
7
  const AdaptableContext_1 = require("../../AdaptableContext");
9
8
  const AdaptableObjectList_1 = require("../../Components/AdaptableObjectList");
9
+ const useRerender_1 = require("../../../components/utils/useRerender");
10
+ const react_1 = require("react");
10
11
  const AdaptableObjectsSummary = () => {
11
- const state = (0, react_redux_1.useSelector)((state) => state);
12
12
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
+ const rerender = (0, useRerender_1.useRerender)();
14
+ (0, react_1.useEffect)(() => {
15
+ return adaptable.api.eventApi.on('AdaptableStateChanged', rerender);
16
+ }, [adaptable]);
13
17
  const modules = adaptable.ModuleService.getModuleCollection();
14
18
  const baseClassName = 'ab-AdaptableObjectsSummary';
15
19
  return (React.createElement(rebass_1.Box, { className: baseClassName }, [...modules].map(([moduleName, module]) => {
@@ -14,7 +14,9 @@ const AdaptableObjectRow_1 = require("../../Components/AdaptableObjectRow");
14
14
  const PopupPanel_1 = require("../../Components/Popups/AdaptablePopup/PopupPanel");
15
15
  const AdaptableObjectsSummary_1 = require("./AdaptableObjectsSummary");
16
16
  const EnvVars_1 = require("../../../EnvVars");
17
- const version = EnvVars_1.ADAPTABLE_VERSION;
17
+ const agGridModules_1 = require("../../../agGrid/agGridModules");
18
+ const adaptableVersion = EnvVars_1.ADAPTABLE_VERSION;
19
+ const agGridVersion = agGridModules_1.AG_GRID_VERSION;
18
20
  const GridInfoPopup = (props) => {
19
21
  const api = props.api;
20
22
  const CreateGridSummaries = (colItems) => {
@@ -37,7 +39,10 @@ const GridInfoPopup = (props) => {
37
39
  : null;
38
40
  const selectedRowInfo = api.gridApi.getSelectedRowInfo();
39
41
  if (api.optionsApi.getUserInterfaceOptions()?.showAdapTableVersion) {
40
- returnRows.push(createReadOnlyColItem(colItems, 'AdapTable Version', version));
42
+ returnRows.push(createReadOnlyColItem(colItems, 'AdapTable Version', adaptableVersion));
43
+ }
44
+ if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
45
+ returnRows.push(createReadOnlyColItem(colItems, 'AG Grid Version', agGridVersion));
41
46
  }
42
47
  returnRows.push(createReadOnlyColItem(colItems, 'Sorted Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None'));
43
48
  returnRows.push(createReadOnlyColItem(colItems, 'Column Filters', columnFilterDescription));
@@ -6,11 +6,11 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const InfiniteTable_1 = require("../../components/InfiniteTable");
8
8
  const NoteRedux_1 = require("../../Redux/ActionsReducers/NoteRedux");
9
- const format_1 = tslib_1.__importDefault(require("date-fns/format"));
10
9
  const AdaptableContext_1 = require("../AdaptableContext");
11
10
  const AdaptableButton_1 = require("../Components/AdaptableButton");
12
11
  const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
13
12
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
13
+ const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
14
14
  const tableDOMProps = {
15
15
  style: {
16
16
  height: '100%',
@@ -25,6 +25,9 @@ const NotePopup = (props) => {
25
25
  : StringExtensions_1.default.Humanize(adaptable.adaptableOptions.primaryKey);
26
26
  const allNotes = (0, react_redux_1.useSelector)((state) => (0, NoteRedux_1.GetAllNotesSelector)(state.Note));
27
27
  const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
28
+ const formatDate = (date, format) => {
29
+ return FormatHelper_1.default.DateFormatter(date, { Pattern: format });
30
+ };
28
31
  const columnsMap = React.useMemo(() => {
29
32
  const columns = {
30
33
  primaryKey: {
@@ -47,7 +50,7 @@ const NotePopup = (props) => {
47
50
  timestamp: {
48
51
  field: 'Timestamp',
49
52
  valueGetter: (params) => {
50
- return (0, format_1.default)(params.data.Timestamp, adaptable.api.noteApi.internalApi.getNotesDateFormat());
53
+ return formatDate(params.data.Timestamp, adaptable.api.noteApi.internalApi.getNotesDateFormat());
51
54
  },
52
55
  },
53
56
  delete: {
@@ -18,7 +18,7 @@ const useQuickSearchDebounced_1 = require("./useQuickSearchDebounced");
18
18
  const QuickSearchPopupComponent = (props) => {
19
19
  const [searchText, search] = (0, useQuickSearchDebounced_1.useQuickSearchDebounced)(props);
20
20
  const [state, setState] = (0, react_1.useState)({
21
- RunQueryAfterQuickSearch: props.api.optionsApi.getQuickSearchOptions().filterResultsAfterQuickSearch,
21
+ RunQueryAfterQuickSearch: props.api.optionsApi.getQuickSearchOptions().filterGridAfterQuickSearch,
22
22
  EditedStyle: props.QuickSearchStyle,
23
23
  });
24
24
  const onUpdateStyle = (style) => {
@@ -27,7 +27,7 @@ const QuickSearchPopupComponent = (props) => {
27
27
  };
28
28
  const onQuickSearchBehaviourChange = (checked) => {
29
29
  setState({ ...state, RunQueryAfterQuickSearch: checked });
30
- props.api.optionsApi.getAdaptableOptions().quickSearchOptions.filterResultsAfterQuickSearch =
30
+ props.api.optionsApi.getAdaptableOptions().quickSearchOptions.filterGridAfterQuickSearch =
31
31
  checked;
32
32
  };
33
33
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
@@ -1,10 +1,12 @@
1
1
  import * as React from 'react';
2
+ import { ExportDestinationType } from '../../../../AdaptableOptions/ExportOptions';
2
3
  import { Report, ReportFormatType, ReportSchedule } from '../../../../PredefinedConfig/ExportState';
3
4
  interface ReportScheduleProps {
4
5
  report: ReportSchedule;
5
6
  onChange: (reminder: ReportSchedule) => void;
6
7
  allReports: Report[];
7
8
  allFormats: ReportFormatType[];
9
+ allDestinations: ExportDestinationType[];
8
10
  }
9
11
  export declare const ScheduleSettingsReport: React.FunctionComponent<ReportScheduleProps>;
10
12
  export {};
@@ -22,14 +22,24 @@ const ScheduleSettingsReport = (props) => {
22
22
  });
23
23
  },
24
24
  }));
25
+ const destinationOptions = props.allDestinations.map((destination) => ({
26
+ label: destination,
27
+ value: destination,
28
+ onClick: () => {
29
+ props.onChange({
30
+ ...props.report,
31
+ ExportDestination: destination,
32
+ });
33
+ },
34
+ }));
25
35
  return (React.createElement(rebass_1.Box, { "data-name": "schedule-settings-report" },
26
36
  React.createElement(Tabs_1.Tabs, { autoFocus: false, mb: 3 },
27
- React.createElement(Tabs_1.Tabs.Tab, null, "Report Schedule Settings"),
37
+ React.createElement(Tabs_1.Tabs.Tab, null, "Report Settings"),
28
38
  React.createElement(Tabs_1.Tabs.Content, null,
29
39
  React.createElement(FormLayout_1.default, null,
30
40
  React.createElement(FormLayout_1.FormRow, { label: "Export" },
31
41
  React.createElement(rebass_1.Box, { maxWidth: 300 },
32
- React.createElement(Select_1.Select, { "data-name": "select-export", options: reportOptions, value: props?.report?.ReportName, placeholder: "Select Export", onChange: (value) => props.onChange({
42
+ React.createElement(Select_1.Select, { "data-name": "select-report", options: reportOptions, value: props?.report?.ReportName, placeholder: "Select Export", onChange: (value) => props.onChange({
33
43
  ...props.report,
34
44
  ReportName: value,
35
45
  }) }))),
@@ -38,6 +48,12 @@ const ScheduleSettingsReport = (props) => {
38
48
  React.createElement(Select_1.Select, { "data-name": "select-format", options: formatOptions, value: props?.report?.ReportFormat, placeholder: "Select Format", onChange: (value) => props.onChange({
39
49
  ...props.report,
40
50
  ReportFormat: value,
51
+ }) }))),
52
+ React.createElement(FormLayout_1.FormRow, { label: "Destination" },
53
+ React.createElement(rebass_1.Box, { maxWidth: 300 },
54
+ React.createElement(Select_1.Select, { "data-name": "select-destination", options: destinationOptions, value: props?.report?.ExportDestination, placeholder: "Select Format", onChange: (value) => props.onChange({
55
+ ...props.report,
56
+ ExportDestination: value,
41
57
  }) }))))))));
42
58
  };
43
59
  exports.ScheduleSettingsReport = ScheduleSettingsReport;
@@ -43,6 +43,10 @@ const getScheduleSettingsValues = (data) => {
43
43
  label: 'Report Format',
44
44
  value: report?.ReportFormat || 'Not Specified',
45
45
  },
46
+ {
47
+ label: 'Export Destination',
48
+ value: report?.ExportDestination || 'Download',
49
+ },
46
50
  ];
47
51
  }
48
52
  if (data.ScheduleType === Enums_1.ScheduleType.ipushpull) {
@@ -17,7 +17,8 @@ const ScheduleSettingsWizard = (props) => {
17
17
  }
18
18
  if (data?.ScheduleType === Enums_1.ScheduleType.Report) {
19
19
  const allFormats = api.exportApi.getAvailableSystemFormats();
20
- return (React.createElement(ScheduleSettingsReport_1.ScheduleSettingsReport, { allReports: allReports ?? [], allFormats: allFormats ?? [], report: data, onChange: props.onChange }));
20
+ const allDestinations = api.exportApi.getAllExportDestinations();
21
+ return (React.createElement(ScheduleSettingsReport_1.ScheduleSettingsReport, { allReports: allReports ?? [], allFormats: allFormats ?? [], allDestinations: allDestinations ?? [], report: data, onChange: props.onChange }));
21
22
  }
22
23
  if (data?.ScheduleType === Enums_1.ScheduleType.ipushpull) {
23
24
  const ippApi = api.pluginsApi.getipushpullPluginApi();