@adaptabletools/adaptable 23.0.0-canary.0 → 23.0.0-canary.1

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 (48) hide show
  1. package/index.css +26 -3
  2. package/package.json +1 -1
  3. package/src/AdaptableOptions/ColumnMenuOptions.d.ts +3 -3
  4. package/src/AdaptableOptions/ContextMenuOptions.d.ts +3 -3
  5. package/src/Strategy/ExportModule.js +13 -1
  6. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
  7. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +2 -2
  8. package/src/View/Alert/Wizard/AlertWizard.js +3 -3
  9. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +3 -1
  10. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +7 -1
  11. package/src/View/Components/ColumnFilter/ColumnFilter.d.ts +2 -1
  12. package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -2
  13. package/src/View/Components/ColumnFilter/columnFilterLocation.d.ts +2 -0
  14. package/src/View/Components/ColumnFilter/columnFilterLocation.js +1 -0
  15. package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
  16. package/src/View/Export/Wizard/ExportPopupWizardRouter.js +10 -1
  17. package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +3 -1
  18. package/src/View/Export/Wizard/ScheduledReportSettings.js +8 -1
  19. package/src/View/Export/Wizard/ScheduledReportWizard.js +8 -3
  20. package/src/View/Export/Wizard/isReportScheduledSettingsValid.d.ts +1 -1
  21. package/src/View/Export/Wizard/isReportScheduledSettingsValid.js +3 -0
  22. package/src/View/Layout/Wizard/LayoutWizard.js +7 -2
  23. package/src/View/renderWithAdaptableContext.js +1 -1
  24. package/src/agGrid/AdaptableFrameworkComponent.d.ts +25 -3
  25. package/src/agGrid/AgGridFilterAdapter.js +3 -1
  26. package/src/components/Combobox/index.js +1 -1
  27. package/src/components/Datepicker/index.js +4 -4
  28. package/src/components/NewDropdownButton/index.js +1 -1
  29. package/src/components/NewSelect/index.js +2 -2
  30. package/src/components/NewTooltip/index.js +1 -1
  31. package/src/components/ui/button.js +1 -1
  32. package/src/components/ui/calendar.d.ts +1 -1
  33. package/src/components/ui/calendar.js +2 -2
  34. package/src/components/ui/combobox.js +3 -3
  35. package/src/components/ui/dropdown-menu.js +1 -1
  36. package/src/components/ui/input-group.d.ts +1 -1
  37. package/src/components/ui/input-group.js +4 -4
  38. package/src/components/ui/input.js +1 -1
  39. package/src/components/ui/popover.js +1 -1
  40. package/src/components/ui/select.js +1 -1
  41. package/src/components/ui/textarea.js +1 -1
  42. package/src/components/ui/tooltip.js +1 -1
  43. package/src/env.js +2 -2
  44. package/src/metamodel/adaptable.metamodel.d.ts +12 -0
  45. package/src/metamodel/adaptable.metamodel.js +1 -1
  46. package/src/types.d.ts +1 -1
  47. package/themes/dark.css +10 -2
  48. package/tsconfig.esm.tsbuildinfo +1 -1
package/index.css CHANGED
@@ -1443,6 +1443,14 @@
1443
1443
  border-bottom-color: color-mix(in oklab, var(--ab-color-foreground) 20%, transparent);
1444
1444
  }
1445
1445
  }
1446
+ .twa\:border-b-text-on-defaultbackground\/20 {
1447
+ border-bottom-color: var(--ab-color-text-on-defaultbackground);
1448
+ }
1449
+ @supports (color: color-mix(in lab, red, red)) {
1450
+ .twa\:border-b-text-on-defaultbackground\/20 {
1451
+ border-bottom-color: color-mix(in oklab, var(--ab-color-text-on-defaultbackground) 20%, transparent);
1452
+ }
1453
+ }
1446
1454
  .twa\:bg-\(--ab-cmp-input--disabled__background\) {
1447
1455
  background-color: var(--ab-cmp-input--disabled__background);
1448
1456
  }
@@ -1509,7 +1517,7 @@
1509
1517
  background-color: currentcolor;
1510
1518
  }
1511
1519
  .twa\:bg-defaultbackground {
1512
- background-color: var(--ab-color-background);
1520
+ background-color: var(--ab-color-defaultbackground);
1513
1521
  }
1514
1522
  .twa\:bg-destructive\/10 {
1515
1523
  background-color: var(--ab-color-destructive);
@@ -5497,8 +5505,8 @@
5497
5505
  --ab-focus__outline: none;
5498
5506
  --ab-color-background: var(--ab-color-defaultbackground, oklch(1 0 0));
5499
5507
  --ab-color-foreground: var(--ab-color-text-on-defaultbackground);
5500
- --ab-color-popover: var(--ab-color-background);
5501
- --ab-color-popover-foreground: var(--ab-color-foreground);
5508
+ --ab-color-popover: var(--ab-color-defaultbackground);
5509
+ --ab-color-popover-foreground: var(--ab-color-text-on-defaultbackground);
5502
5510
  --ab-color-secondary: oklch(0.97 0 0);
5503
5511
  --ab-color-secondary-foreground: oklch(0.205 0 0);
5504
5512
  --ab-color-muted: var(--ab-color-primarylight);
@@ -5704,6 +5712,10 @@
5704
5712
  --ab-cmp-tabs__padding: calc(var(--ab-base-space) * 2);
5705
5713
  --ab-cmp-tabs-strip__background: var(--ab-color-defaultbackground);
5706
5714
  --ab-cmp-tabs-active__background: var(--ab-color-primarylight);
5715
+ --ab-cmp-tabs__font-weight: 400;
5716
+ --ab-cmp-tabs__color: inherit;
5717
+ --ab-cmp-tabs-inactive__opacity: 0.72;
5718
+ --ab-cmp-tabs-inactive-separator__color: var(--ab-color-primarydark);
5707
5719
  }
5708
5720
  :root {
5709
5721
  --ab-cmp-panel_header__background: var(--ab-color-primary);
@@ -6392,18 +6404,29 @@
6392
6404
  z-index: 10;
6393
6405
  overflow: visible;
6394
6406
  }
6407
+ .ab-Tabs__Tab {
6408
+ font-weight: var(--ab-cmp-tabs__font-weight);
6409
+ color: var(--ab-cmp-tabs__color);
6410
+ }
6395
6411
  .ab-Tabs__Tab:focus:after {
6396
6412
  box-shadow: var(--ab-focus__box-shadow);
6397
6413
  }
6398
6414
  .ab-Tabs__Tab:focus {
6399
6415
  outline: none;
6400
6416
  }
6417
+ .ab-Tabs__Tab:not(.ab-Tabs__Tab--active) {
6418
+ opacity: var(--ab-cmp-tabs-inactive__opacity);
6419
+ }
6420
+ .ab-Tabs__Tab:not(.ab-Tabs__Tab--active) + .ab-Tabs__Tab:not(.ab-Tabs__Tab--active) {
6421
+ box-shadow: inset 1px 0 0 var(--ab-cmp-tabs-inactive-separator__color);
6422
+ }
6401
6423
  .ab-Tabs__Tab--active + .ab-Tabs__Filler, .ab-Tabs__Tab--active + .ab-Tabs__Tab {
6402
6424
  border-bottom-left-radius: var(--ab-border-radius);
6403
6425
  }
6404
6426
  .ab-Tabs__Tab--active {
6405
6427
  position: relative;
6406
6428
  z-index: 30;
6429
+ opacity: 1;
6407
6430
  }
6408
6431
  .ab-Tabs__Tab--active:after {
6409
6432
  content: '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "23.0.0-canary.0",
3
+ "version": "23.0.0-canary.1",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,6 +1,6 @@
1
1
  import { AdaptableColumnMenuItemName, AdaptableMenuItem, AgGridMenuItem, ColumnMenuContext, MenuSeparator } from '../AdaptableState/Common/Menu';
2
2
  import { AdaptableIcon } from '../types';
3
- import { AdaptableFrameworkComponent } from '../agGrid/AdaptableFrameworkComponent';
3
+ import { MenuItemFrameworkComponent } from '../agGrid/AdaptableFrameworkComponent';
4
4
  /**
5
5
  * Options for managing menus in AdapTable – provided using 2 collections
6
6
  */
@@ -115,12 +115,12 @@ export interface UserColumnMenuItem {
115
115
  * The `onSetup` callback on `AngularFrameworkComponent` is NOT honoured
116
116
  * for menu items because AG Grid owns the component lifecycle.
117
117
  */
118
- frameworkComponent?: AdaptableFrameworkComponent;
118
+ frameworkComponent?: MenuItemFrameworkComponent<ColumnMenuContext>;
119
119
  /**
120
120
  * Extra parameters passed through to the Framework Component (alongside
121
121
  * `adaptableApi` and `menuContext`).
122
122
  */
123
- menuItemParams?: any;
123
+ menuItemParams?: Record<string, unknown>;
124
124
  }
125
125
  /**
126
126
  * Defines AG Grid Column Menu Items
@@ -1,7 +1,7 @@
1
1
  import { MenuSeparator } from '@infinite-table/infinite-react';
2
2
  import { AdaptableContextMenuItemName, AdaptableMenuItem, AgGridMenuItem, ContextMenuContext } from '../AdaptableState/Common/Menu';
3
3
  import { AdaptableIcon } from '../types';
4
- import { AdaptableFrameworkComponent } from '../agGrid/AdaptableFrameworkComponent';
4
+ import { MenuItemFrameworkComponent } from '../agGrid/AdaptableFrameworkComponent';
5
5
  /**
6
6
  * Options for managing menus in AdapTable – provided using 2 collections
7
7
  */
@@ -110,12 +110,12 @@ export interface UserContextMenuItem {
110
110
  * The `onSetup` callback on `AngularFrameworkComponent` is NOT honoured
111
111
  * for menu items because AG Grid owns the component lifecycle.
112
112
  */
113
- frameworkComponent?: AdaptableFrameworkComponent;
113
+ frameworkComponent?: MenuItemFrameworkComponent<ContextMenuContext>;
114
114
  /**
115
115
  * Extra parameters passed through to the Framework Component (alongside
116
116
  * `adaptableApi` and `menuContext`).
117
117
  */
118
- menuItemParams?: any;
118
+ menuItemParams?: Record<string, unknown>;
119
119
  }
120
120
  /**
121
121
  * Defines AG Grid Context Menu Items
@@ -178,7 +178,19 @@ export class ExportModule extends AdaptableModuleBase {
178
178
  render: ExportSchedulesTab,
179
179
  },
180
180
  ],
181
- newTooltipText: 'Create New Report',
181
+ abObjectTypes: [
182
+ {
183
+ name: 'Report',
184
+ label: 'New Report',
185
+ accessLevel: this.AccessLevel,
186
+ },
187
+ {
188
+ name: 'Schedule',
189
+ label: 'New Schedule',
190
+ accessLevel: this.AccessLevel,
191
+ },
192
+ ],
193
+ newTooltipText: 'Create new Export item',
182
194
  actions: [ReportListItem],
183
195
  getDeleteAction: ExportRedux.ReportDelete,
184
196
  getDeleteConfirmationMsg: (abObject) => {
@@ -82,7 +82,7 @@ export const AlertNotificationWizardSection = (props) => {
82
82
  },
83
83
  });
84
84
  };
85
- return (_jsxs(_Fragment, { children: [_jsxs(Tabs, { "data-name": "display-options", className: "twa:mt-2 twa:mb-3", autoFocus: false, children: [_jsx(Tabs.Tab, { children: "Notification Options" }), _jsxs(Tabs.Content, { children: [_jsxs(Flex, { flexDirection: "column", alignItems: "flex-start", className: isScheduled ? 'twa:gap-2' : undefined, children: [_jsx(CheckBox, { className: isScheduled ? 'twa:my-0' : undefined, checked: data.AlertProperties?.DisplayNotification, onChange: (DisplayNotification) => {
85
+ return (_jsxs(_Fragment, { children: [_jsxs(Tabs, { "data-name": "display-options", className: "twa:mt-2 twa:mb-3", autoFocus: false, children: [_jsx(Tabs.Tab, { children: "Notification Options" }), _jsxs(Tabs.Content, { children: [_jsxs(Flex, { flexDirection: "column", alignItems: "flex-start", className: isScheduled ? 'twa:gap-4' : undefined, children: [_jsx(CheckBox, { className: isScheduled ? 'twa:my-0' : undefined, checked: data.AlertProperties?.DisplayNotification, onChange: (DisplayNotification) => {
86
86
  if (isScheduled && scheduledData) {
87
87
  updateScheduledProperties({ DisplayNotification });
88
88
  return;
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { isRuleBasedAlertDefinition } from '../../../Utilities/Helpers/ScheduledAlertHelper';
3
3
  import { EntityRulesEditor, EntityRulesSummary } from '../../Components/EntityRulesEditor';
4
4
  import { Tag } from '../../../components/Tag';
@@ -11,7 +11,7 @@ import { Box } from '../../../components/Flex';
11
11
  export const getRuleStepDescription = (alertType) => {
12
12
  switch (alertType) {
13
13
  case 'DataChange':
14
- return (_jsxs(_Fragment, { children: ["Build the Rule ", _jsx("b", { children: "when" }), " the Alert should trigger (using a Predicate or a Query)"] }));
14
+ return (_jsx(_Fragment, { children: "Build the Rule for when the Alert should trigger (using a Predicate or a Query)" }));
15
15
  case 'RowChange':
16
16
  return _jsx(_Fragment, { children: "Specify which type of Row Change will trigger the Alert" });
17
17
  case 'Validation':
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useState, useCallback } from 'react';
3
3
  import { OnePageAdaptableWizard, OnePageWizardSummary } from '../../Wizard/OnePageAdaptableWizard';
4
4
  import { cloneObject } from '../../../Utilities/Helpers/Helper';
@@ -81,7 +81,7 @@ export const AlertWizard = (props) => {
81
81
  {
82
82
  title: 'Name & Type',
83
83
  isValid: isSettingsValid,
84
- details: (_jsxs(_Fragment, { children: ["Enter Name and select ", _jsx("b", { children: "what" }), " type of change in AdapTable will cause the Alert to fire"] })),
84
+ details: (_jsx(_Fragment, { children: "Enter Name and select and select an Alert Type" })),
85
85
  render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange, onChange: setAlertDefinition }) })),
86
86
  renderSummary: () => renderAlertTypeSummary(alertType),
87
87
  },
@@ -95,7 +95,7 @@ export const AlertWizard = (props) => {
95
95
  {
96
96
  title: 'Trigger',
97
97
  isVisible: () => alertType === AlertType.DataChange || alertType == AlertType.Validation,
98
- details: (_jsxs(_Fragment, { children: ["Specify ", _jsx("b", { children: "where" }), " data changes should trigger the Alert"] })),
98
+ details: (_jsx(_Fragment, { children: "Specify which columns should trigger the Alert" })),
99
99
  isValid: (data) => isRuleBasedAlertDefinition(data) ? isScopeValid(data) : true,
100
100
  render: () => (_jsx(AlertScopeWizardSection, { alertType: alertType, onChange: setAlertDefinition })),
101
101
  renderSummary: renderScopeSummary,
@@ -1,5 +1,7 @@
1
1
  import * as React from 'react';
2
- export type ColumnFilterLocation = 'columnMenu' | 'filterForm';
2
+ import { ColumnFilterLocation } from './columnFilterLocation';
3
+ export type { ColumnFilterLocation } from './columnFilterLocation';
4
+ export { isEmbeddedColumnFilterLocation } from './columnFilterLocation';
3
5
  export declare const ColumnFilterLocationProvider: React.Provider<ColumnFilterLocation>;
4
6
  export declare const useColumnFilterLocation: () => ColumnFilterLocation;
5
7
  export interface AdaptableColumnFilterProps {
@@ -2,6 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { ColumnFilterComponent } from './ColumnFilter';
4
4
  import { useAdaptableFilterWrapper } from './useAdaptableFilterWrapper';
5
+ import Panel from '../../../components/Panel';
6
+ export { isEmbeddedColumnFilterLocation } from './columnFilterLocation';
5
7
  const ColumnFilterLocationContext = React.createContext(null);
6
8
  export const ColumnFilterLocationProvider = ColumnFilterLocationContext.Provider;
7
9
  export const useColumnFilterLocation = () => {
@@ -13,7 +15,11 @@ export const useColumnFilterLocation = () => {
13
15
  */
14
16
  export const AdaptableColumnFilter = (props) => {
15
17
  const { qlPredicate, qlPredicateDefs, columnFilter, handlePredicateChange } = useAdaptableFilterWrapper(props.columnId, 'FilterForm');
16
- return (_jsx(ColumnFilterLocationProvider, { value: props.location, children: _jsx(ColumnFilterComponent, { location: props.location, wrapperProps: props.wrapperProps, columnId: props.columnId, predicate: qlPredicate, predicateDefs: qlPredicateDefs, disabled: columnFilter?.IsSuspended, onPredicateChange: React.useCallback((predicate) => {
18
+ const filterContent = (_jsx(ColumnFilterLocationProvider, { value: props.location, children: _jsx(ColumnFilterComponent, { location: props.location, wrapperProps: props.wrapperProps, columnId: props.columnId, predicate: qlPredicate, predicateDefs: qlPredicateDefs, disabled: columnFilter?.IsSuspended, onPredicateChange: React.useCallback((predicate) => {
17
19
  handlePredicateChange(predicate);
18
20
  }, [handlePredicateChange]) }) }));
21
+ if (props.location === 'filtersToolPanel') {
22
+ return (_jsx(Panel, { className: "twa:mb-2", bodyProps: { className: 'twa:p-0' }, children: filterContent }));
23
+ }
24
+ return filterContent;
19
25
  };
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { QlPredicate, QlPredicateDef } from '../../../parser/src/predicate';
3
+ import { ColumnFilterLocation } from './columnFilterLocation';
3
4
  interface ColumnFilterComponentProps {
4
- location: 'columnMenu' | 'filterForm';
5
+ location: ColumnFilterLocation;
5
6
  hideActionButtons?: boolean;
6
7
  columnId: string;
7
8
  disabled?: boolean;
@@ -10,6 +10,7 @@ import { Box, Flex } from '../../../components/Flex';
10
10
  import clsx from 'clsx';
11
11
  import { twMerge } from '../../../twMerge';
12
12
  import { SingleSelect } from '../../../components/NewSelect';
13
+ import { isEmbeddedColumnFilterLocation } from './columnFilterLocation';
13
14
  const ColumnFilterPredicateDropdown = (props) => {
14
15
  const predicateDef = usePredicateDef(props.predicate?.operator, props.predicateDefs);
15
16
  const options = props.predicateDefs.map((predicateDef) => {
@@ -129,10 +130,10 @@ export const ColumnFilterComponent = (props) => {
129
130
  .some((adaptablePredicate) => adaptable.api.predicateApi.isValidPredicate(adaptablePredicate));
130
131
  };
131
132
  return (_jsxs(_Fragment, { children: [_jsxs(Flex, { flexDirection: "column", className: clsx({
132
- 'twa:bg-primarylight': true,
133
133
  'twa:pb-2': !props.hideActionButtons,
134
- 'twa:mb-2': props.location === 'filterForm',
134
+ 'twa:mb-2': isEmbeddedColumnFilterLocation(props.location),
135
135
  'twa:mt-2 twa:ml-2 twa:mr-2': props.location === 'columnMenu',
136
+ 'twa:mx-2': props.location === 'filtersToolPanel',
136
137
  'twa:rounded-standard': true,
137
138
  }), children: [_jsx(Flex, { className: "twa:m-2", children: _jsx(AndOrInput, { onChange: onCombineChange, operator: currentPredicate.operator }) }), !props.hideActionButtons && (_jsxs(Flex, { className: "ab-ColumnFilter-actions twa:ml-2 twa:mr-2", justifyContent: "space-between", children: [_jsx(Box, { className: "ab-ColumnFilter-action-clearall", children: _jsx(SimpleButton, { "aria-label": 'Clear All Filters', onClick: () => clearAllFilters(), children: "Clear All" }) }), manuallyApplyColumnFilter ? (_jsxs(_Fragment, { children: [_jsx(Box, { className: "twa:flex-1", "data-name": "spacer" }), _jsx(Box, { className: "ab-ColumnFilter-action-reset twa:mr-2", children: _jsx(SimpleButton, { "aria-label": 'Reset All', tone: "neutral", variant: "raised", onClick: () => {
138
139
  setPredicateNotYetApplied(props.predicate);
@@ -0,0 +1,2 @@
1
+ export type ColumnFilterLocation = 'columnMenu' | 'filterForm' | 'filtersToolPanel';
2
+ export declare const isEmbeddedColumnFilterLocation: (location: ColumnFilterLocation) => boolean;
@@ -0,0 +1 @@
1
+ export const isEmbeddedColumnFilterLocation = (location) => location === 'filterForm' || location === 'filtersToolPanel';
@@ -8,6 +8,7 @@ import { toDisplayValueDefault, toDisplayValueFromOptionTree, } from '../../../c
8
8
  import { AG_GRID_GROUPED_COLUMN } from '../../../Utilities/Constants/GeneralConstants';
9
9
  import { useMemo } from 'react';
10
10
  import { GridFilterCombobox } from '../../../components/Combobox';
11
+ import { isEmbeddedColumnFilterLocation } from '../ColumnFilter/columnFilterLocation';
11
12
  import { useColumnFilterLocation } from '../ColumnFilter/AdaptableColumnFilter';
12
13
  import { GridFilterTreeDropdown } from '../../../components/Tree/TreeDropdown';
13
14
  const baseClassName = 'ab-ListBoxFilterForm';
@@ -161,7 +162,7 @@ export const ColumnValuesSelect = (props) => {
161
162
  : props.onChange, items: options,
162
163
  // for dates, the treeDateOptions have ids that are numbers
163
164
  // so we have to add the `toDateValue` function to convert the values to the correct format
164
- value: selectedColumnValues, primaryKey: 'value', isLoading: props.isLoading, onOpenChange: onOpenChange, showClear: location === 'filterForm' })) : (_jsx(GridFilterCombobox, { disabled: props.disabled, ...selectProps, onOpenChange: onOpenChange, items: options, value: value, isLoading: props.isLoading, onValueChange: props.onChange, showClear: location === 'filterForm' }, "select"));
165
+ value: selectedColumnValues, primaryKey: 'value', isLoading: props.isLoading, onOpenChange: onOpenChange, showClear: isEmbeddedColumnFilterLocation(location) })) : (_jsx(GridFilterCombobox, { disabled: props.disabled, ...selectProps, onOpenChange: onOpenChange, items: options, value: value, isLoading: props.isLoading, onValueChange: props.onChange, showClear: isEmbeddedColumnFilterLocation(location) }, "select"));
165
166
  return (_jsx("div", { className: join(baseClassName, 'twa:relative', props.isLoading && `${baseClassName}--loading`, !value.length && `${baseClassName}--empty`), onKeyDownCapture: (e) => {
166
167
  if (e.key === 'Tab') {
167
168
  // Prevent AG Grid from hijacking Tab; keep browser default focus navigation.
@@ -1,8 +1,17 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { NewReportWizard } from './NewReportWizard';
3
3
  import { ScheduledReportWizard } from './ScheduledReportWizard';
4
- export const ExportPopupWizardRouter = (props) => {
4
+ const isScheduledReportWizard = (props) => {
5
5
  if (props.popupParams?.action === 'NewSchedule') {
6
+ return true;
7
+ }
8
+ if (props.data != null && 'Schedule' in props.data) {
9
+ return true;
10
+ }
11
+ return props.abObjectType?.name === 'Schedule';
12
+ };
13
+ export const ExportPopupWizardRouter = (props) => {
14
+ if (isScheduledReportWizard(props)) {
6
15
  const scheduleProps = props;
7
16
  return _jsx(ScheduledReportWizard, { ...scheduleProps });
8
17
  }
@@ -1,11 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { ExportDestinationType } from '../../../AdaptableOptions/ExportOptions';
3
- import { ReportFormatType, ReportSchedule } from '../../../AdaptableState/ExportState';
3
+ import { ReportFormatType, ReportNameType, ReportSchedule } from '../../../AdaptableState/ExportState';
4
4
  interface ScheduledReportSettingsProps {
5
5
  reportSchedule: ReportSchedule;
6
6
  onChange: (reportSchedule: ReportSchedule) => void;
7
7
  allFormats: ReportFormatType[];
8
8
  allDestinations: ExportDestinationType[];
9
+ /** When set, the user picks which report this schedule exports (Export popup → New Schedule). */
10
+ allReportNames?: ReportNameType[];
9
11
  }
10
12
  export declare const ScheduledReportSettings: React.FunctionComponent<ScheduledReportSettingsProps>;
11
13
  export {};
@@ -19,7 +19,14 @@ export const ScheduledReportSettings = (props) => {
19
19
  label: destination,
20
20
  value: destination,
21
21
  }));
22
- return (_jsx(Box, { "data-name": "scheduled-report-settings", children: _jsxs(Tabs, { autoFocus: false, className: "twa:mb-3", children: [_jsx(Tabs.Tab, { children: "Settings" }), _jsx(Tabs.Content, { children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Name", children: _jsx(Input, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.reportSchedule?.Name ?? '' }) }), _jsx(FormRow, { label: "Format", children: _jsx(Box, { className: "twa:max-w-[300px]", children: _jsx(SingleSelect, { className: "twa:w-full", "data-name": "select-format", items: formatOptions, value: props.reportSchedule?.ReportFormat, placeholder: "Select Format", onValueChange: (value) => props.onChange({
22
+ const reportOptions = (props.allReportNames ?? []).map((reportName) => ({
23
+ label: reportName,
24
+ value: reportName,
25
+ }));
26
+ return (_jsx(Box, { "data-name": "scheduled-report-settings", children: _jsxs(Tabs, { autoFocus: false, className: "twa:mb-3", children: [_jsx(Tabs.Tab, { children: "Settings" }), _jsx(Tabs.Content, { children: _jsxs(FormLayout, { children: [props.allReportNames && (_jsx(FormRow, { label: "Report", children: _jsx(Box, { className: "twa:max-w-[300px]", children: _jsx(SingleSelect, { className: "twa:w-full", "data-name": "select-report", items: reportOptions, value: props.reportSchedule?.ReportName || undefined, placeholder: "Select Report", onValueChange: (value) => props.onChange({
27
+ ...props.reportSchedule,
28
+ ReportName: value,
29
+ }) }) }) })), _jsx(FormRow, { label: "Name", children: _jsx(Input, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.reportSchedule?.Name ?? '' }) }), _jsx(FormRow, { label: "Format", children: _jsx(Box, { className: "twa:max-w-[300px]", children: _jsx(SingleSelect, { className: "twa:w-full", "data-name": "select-format", items: formatOptions, value: props.reportSchedule?.ReportFormat, placeholder: "Select Format", onValueChange: (value) => props.onChange({
23
30
  ...props.reportSchedule,
24
31
  ReportFormat: value,
25
32
  }) }) }) }), _jsx(FormRow, { label: "Destination", children: _jsx(Box, { className: "twa:max-w-[300px]", children: _jsx(SingleSelect, { className: "twa:w-full", "data-name": "select-destination", items: destinationOptions, value: props.reportSchedule?.ExportDestination, placeholder: "Select Destination", onValueChange: (value) => props.onChange({
@@ -24,10 +24,11 @@ export const ScheduledReportWizard = (props) => {
24
24
  });
25
25
  const dispatch = useDispatch();
26
26
  const handleFinish = () => {
27
- if (!reportName) {
27
+ const resolvedReportName = reportName ?? reportSchedule.ReportName;
28
+ if (!resolvedReportName?.trim()) {
28
29
  return;
29
30
  }
30
- const scheduleToSave = { ...reportSchedule, ReportName: reportName };
31
+ const scheduleToSave = { ...reportSchedule, ReportName: resolvedReportName };
31
32
  const action = isNew
32
33
  ? ExportRedux.ScheduledReportAdd(scheduleToSave)
33
34
  : ExportRedux.ScheduledReportEdit(scheduleToSave);
@@ -71,5 +72,9 @@ const ScheduledReportSettingsSection = (props) => {
71
72
  const { data, api } = useOnePageAdaptableWizardContext();
72
73
  const allFormats = api.exportApi.getAvailableSystemFormats();
73
74
  const allDestinations = api.exportApi.getAllExportDestinations();
74
- return (_jsxs(_Fragment, { children: [props.reportName && (_jsxs(SummaryText, { children: ["Report: ", _jsx(Tag, { children: props.reportName })] })), _jsx(ScheduledReportSettings, { reportSchedule: data, onChange: props.onChange, allFormats: allFormats ?? [], allDestinations: allDestinations ?? [] })] }));
75
+ const fixedReportName = props.reportName;
76
+ const allReportNames = fixedReportName
77
+ ? undefined
78
+ : api.exportApi.internalApi.getAllAvailableReportNames();
79
+ return (_jsxs(_Fragment, { children: [fixedReportName && (_jsxs(SummaryText, { children: ["Report: ", _jsx(Tag, { children: fixedReportName })] })), _jsx(ScheduledReportSettings, { reportSchedule: data, onChange: props.onChange, allFormats: allFormats ?? [], allDestinations: allDestinations ?? [], allReportNames: allReportNames })] }));
75
80
  };
@@ -1,3 +1,3 @@
1
1
  import { AdaptableApi } from '../../../Api/AdaptableApi';
2
2
  import { ReportSchedule } from '../../../AdaptableState/ExportState';
3
- export declare const isReportScheduleSettingsValid: (reportSchedule: ReportSchedule, api: AdaptableApi) => true | "A name is required." | "A scheduled export with this name already exists." | "Please select a report format.";
3
+ export declare const isReportScheduleSettingsValid: (reportSchedule: ReportSchedule, api: AdaptableApi) => true | "A name is required." | "A scheduled export with this name already exists." | "Please select a report." | "Please select a report format.";
@@ -8,6 +8,9 @@ export const isReportScheduleSettingsValid = (reportSchedule, api) => {
8
8
  if (isDuplicateName) {
9
9
  return 'A scheduled export with this name already exists.';
10
10
  }
11
+ if (StringExtensions.IsNullOrEmpty(reportSchedule?.ReportName?.trim())) {
12
+ return 'Please select a report.';
13
+ }
11
14
  if (StringExtensions.IsNullOrEmpty(reportSchedule?.ReportFormat)) {
12
15
  return 'Please select a report format.';
13
16
  }
@@ -20,6 +20,10 @@ import { isPivotLayout } from '../../../Utilities/isPivotLayout';
20
20
  import { PivotRowGroupingSection, PivotRowGroupingSectionSummary, } from './sections/PivotRowGroupingSection';
21
21
  import { isPivotAggregationsSectionValid, PivotAggregationsSection, PivotAggregationsSectionSummary, } from './sections/PivotAggregationsSection';
22
22
  import { Box } from '../../../components/Flex';
23
+ const getLayoutWizardTitle = (layout, moduleFriendlyName) => {
24
+ const layoutName = layout.Name?.trim();
25
+ return layoutName ? `${moduleFriendlyName} (${layoutName})` : moduleFriendlyName;
26
+ };
23
27
  export const LayoutWizard = (props) => {
24
28
  const dispatch = useDispatch();
25
29
  const adaptable = useAdaptable();
@@ -73,7 +77,8 @@ export const LayoutWizard = (props) => {
73
77
  props.onFinishWizard(layout);
74
78
  };
75
79
  const layoutSupportedFeatures = adaptable.api.layoutApi.internalApi.getLayoutSupportedFeatures();
76
- return isPivotLayout(layout) ? (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
80
+ const wizardTitle = getLayoutWizardTitle(layout, props.moduleInfo.FriendlyName);
81
+ return isPivotLayout(layout) ? (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, moduleName: wizardTitle, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
77
82
  {
78
83
  title: 'Settings',
79
84
  details: 'Configure Pivot Layout',
@@ -151,7 +156,7 @@ export const LayoutWizard = (props) => {
151
156
  render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(OnePageWizardSummary, {}) })),
152
157
  title: 'Summary',
153
158
  },
154
- ] })) : (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
159
+ ] })) : (_jsx(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, moduleName: wizardTitle, data: layout, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
155
160
  {
156
161
  title: 'Settings',
157
162
  details: 'Configure Table Layout',
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Provider } from 'react-redux';
3
3
  import AdaptableContext from './AdaptableContext';
4
4
  import { WithAdaptableComputedCSSVars } from './AdaptableComputedCSSVarsContext';
5
- import { TooltipProvider } from '~/components/ui/tooltip';
5
+ import { TooltipProvider } from "../components/ui/tooltip";
6
6
  export const renderWithAdaptableContext = (children, adaptable) => {
7
7
  return (_jsx(TooltipProvider, { delay: 300, children: _jsx(Provider, { store: adaptable.adaptableStore.TheStore, children: _jsx(WithAdaptableComputedCSSVars, { children: _jsx(AdaptableContext.Provider, { value: adaptable, children: children }) }) }) }));
8
8
  };
@@ -1,5 +1,5 @@
1
1
  import { AdaptableApi } from '../Api/AdaptableApi';
2
- import { ReactElement } from 'react';
2
+ import { ComponentType, ReactElement } from 'react';
3
3
  import { BaseContext } from '../types';
4
4
  /**
5
5
  * Base Component for Bespoke Components: can be Angular, React or Vue
@@ -21,12 +21,34 @@ export type AngularFrameworkComponent<T = unknown> = {
21
21
  }) => Partial<T>;
22
22
  };
23
23
  /**
24
- *
25
- * A function that returns a ReactNode
24
+ * A function that returns a ReactNode (toolbars, settings panels, tool panels, etc.).
25
+ * For custom Column / Context menu rows, use `ReactMenuItemFrameworkComponent` instead.
26
26
  */
27
27
  export type ReactFrameworkComponent = ({ adaptableApi, }: {
28
28
  adaptableApi: AdaptableApi;
29
29
  }) => ReactElement;
30
+ /** AdapTable extras passed on AG Grid `menuItemParams` for custom menu items. */
31
+ export interface AdaptableMenuItemParams<TMenuContext = unknown> {
32
+ adaptableApi: AdaptableApi;
33
+ menuContext: TMenuContext;
34
+ }
35
+ /**
36
+ * Props AG Grid passes to React custom menu item components, with AdapTable
37
+ * `menuItemParams` (see `AgGridMenuAdapter.mapCustomMenuItemToAgGridMenuDefinition`).
38
+ */
39
+ export interface AdaptableReactMenuItemProps<TMenuContext = unknown> {
40
+ name: string;
41
+ menuItemParams: AdaptableMenuItemParams<TMenuContext> & Record<string, unknown>;
42
+ }
43
+ /**
44
+ * React component for custom Column / Context menu rows (AG Grid `menuItem`).
45
+ * Unlike `ReactFrameworkComponent`, receives `name` and `menuItemParams`, not only `adaptableApi`.
46
+ */
47
+ export type ReactMenuItemFrameworkComponent<TMenuContext = unknown> = ComponentType<AdaptableReactMenuItemProps<TMenuContext>>;
48
+ /**
49
+ * Framework component for a custom menu item (Column Menu or Context Menu).
50
+ */
51
+ export type MenuItemFrameworkComponent<TMenuContext = unknown> = AngularFrameworkComponent | VueFrameworkComponent | ReactMenuItemFrameworkComponent<TMenuContext>;
30
52
  /**
31
53
  * Creates a Vue Component to be used in AdapTable UI controls
32
54
  */
@@ -38,10 +38,12 @@ export const AgGridFilterAdapterFactory = (adaptable) => {
38
38
  const columnId = this.column.getColId();
39
39
  let column = adaptable.api.columnApi.getColumnWithColumnId(columnId);
40
40
  if (column) {
41
+ const isFiltersToolPanel = typeof params?.hidePopup !== 'function';
42
+ const location = isFiltersToolPanel ? 'filtersToolPanel' : 'columnMenu';
41
43
  this.unmountReactRoot = adaptable.renderReactRoot(renderWithAdaptableContext(React.createElement(AdaptableColumnFilter, {
42
44
  columnId,
43
45
  wrapperProps: { className: 'twa:p-2' },
44
- location: 'columnMenu',
46
+ location,
45
47
  }), adaptable), this.filterContainer);
46
48
  }
47
49
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxPrimitive, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor, RESIZABLE_VIRTUALIZED_LIST_CLASS, } from '~/components/ui/combobox';
3
+ import { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxPrimitive, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor, RESIZABLE_VIRTUALIZED_LIST_CLASS, } from "../ui/combobox";
4
4
  import { cn } from '../../lib/utils';
5
5
  import { ChevronDownIcon, Loader2Icon, PlusIcon } from 'lucide-react';
6
6
  import { useMemo } from 'react';
@@ -9,10 +9,10 @@ import { useDatepickerContext } from './DatepickerContext';
9
9
  import { AdaptableDateInlineInput } from '../../View/Components/AdaptableInput/AdaptableDateInlineInput';
10
10
  import { isValid, addYears, endOfYear, startOfYear, addDays, addBusinessDays, } from 'date-fns';
11
11
  import { Flex } from '../Flex';
12
- import { cn } from '~/lib/utils';
13
- import { Popover, PopoverContent, PopoverTrigger } from '~/components/ui/popover';
14
- import { Calendar } from '~/components/ui/calendar';
15
- import { InputGroup, InputGroupAddon } from '~/components/ui/input-group';
12
+ import { cn } from "../../lib/utils";
13
+ import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
14
+ import { Calendar } from "../ui/calendar";
15
+ import { InputGroup, InputGroupAddon } from "../ui/input-group";
16
16
  import { SingleSelect } from '../NewSelect';
17
17
  import { targetOwn } from '../twUtils';
18
18
  // ── Caption dropdown components (month/year) ──────────────────────────
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from '~/components/ui/dropdown-menu';
3
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "../ui/dropdown-menu";
4
4
  import { NewTooltip } from '../NewTooltip';
5
5
  import { cn } from '../../lib/utils';
6
6
  import { ChevronDownIcon } from 'lucide-react';
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from '~/components/ui/select';
3
- import { Tooltip, TooltipContent, TooltipTrigger } from '~/components/ui/tooltip';
2
+ import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from "../ui/select";
3
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip";
4
4
  import { cn } from '../../lib/utils';
5
5
  import React from 'react';
6
6
  const getItemTitle = (label, value) => {
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Tooltip, TooltipTrigger, TooltipContent } from '~/components/ui/tooltip';
2
+ import { Tooltip, TooltipTrigger, TooltipContent } from "../ui/tooltip";
3
3
  export function NewTooltip({ label, children, side, align }) {
4
4
  if (!label) {
5
5
  return _jsx(_Fragment, { children: children });
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Button as ButtonPrimitive } from '@base-ui/react/button';
3
3
  import { cva } from 'class-variance-authority';
4
- import { cn } from '~/lib/utils';
4
+ import { cn } from "../../lib/utils";
5
5
  const buttonVariants = cva('twa:group/button twa:inline-flex twa:shrink-0 twa:items-center twa:justify-center twa:rounded-button twa:border twa:border-transparent twa:bg-clip-padding twa:text-sm twa:font-medium twa:whitespace-nowrap twa:transition-all twa:outline-none twa:select-none twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50 twa:active:translate-y-px twa:disabled:pointer-events-none twa:disabled:opacity-50 twa:aria-invalid:border-destructive twa:aria-invalid:ring-3 twa:aria-invalid:ring-destructive/20 twa:dark:aria-invalid:border-destructive/50 twa:dark:aria-invalid:ring-destructive/40 twa:[&_svg]:pointer-events-none twa:[&_svg]:shrink-0 twa:[&_svg:not([class*=size-])]:size-4', {
6
6
  variants: {
7
7
  variant: {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { DayPicker } from 'react-day-picker';
3
- import { Button } from '~/components/ui/button';
3
+ import { Button } from "./button";
4
4
  declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, locale, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
5
  buttonVariant?: React.ComponentProps<typeof Button>['variant'];
6
6
  }): React.JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { DayPicker, getDefaultClassNames, useDayPicker, } from 'react-day-picker';
4
- import { cn } from '~/lib/utils';
5
- import { Button, buttonVariants } from '~/components/ui/button';
4
+ import { cn } from "../../lib/utils";
5
+ import { Button, buttonVariants } from "./button";
6
6
  import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from 'lucide-react';
7
7
  const CalendarRoot = ({ className, rootRef, ...props }) => {
8
8
  return _jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props });
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import { Combobox as ComboboxPrimitive } from '@base-ui/react';
4
- import { cn, POPUP_Z_INDEX } from '~/lib/utils';
5
- import { Button } from '~/components/ui/button';
6
- import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from '~/components/ui/input-group';
4
+ import { cn, POPUP_Z_INDEX } from "../../lib/utils";
5
+ import { Button } from "./button";
6
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, } from "./input-group";
7
7
  import { CheckIcon, ChevronDownIcon, XIcon, Loader2Icon } from 'lucide-react';
8
8
  import { CheckBox } from '../CheckBox';
9
9
  const useFilteredItems = ComboboxPrimitive.useFilteredItems;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Menu as MenuPrimitive } from '@base-ui/react/menu';
3
- import { cn, POPUP_Z_INDEX } from '~/lib/utils';
3
+ import { cn, POPUP_Z_INDEX } from "../../lib/utils";
4
4
  import { ChevronRightIcon, CheckIcon } from 'lucide-react';
5
5
  function DropdownMenu({ ...props }) {
6
6
  return _jsx(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });