@adaptabletools/adaptable-cjs 23.0.0-canary.2 → 23.0.0-canary.4

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 (105) hide show
  1. package/index.css +68 -73
  2. package/package.json +1 -1
  3. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
  4. package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
  5. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -3
  6. package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
  7. package/src/AdaptableState/Common/AdaptableForm.js +34 -0
  8. package/src/AdaptableState/Common/AdaptableFormat.d.ts +1 -1
  9. package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
  10. package/src/AdaptableState/Common/Enums.d.ts +0 -5
  11. package/src/AdaptableState/Common/Enums.js +1 -7
  12. package/src/Api/EventApi.d.ts +1 -1
  13. package/src/Api/Events/ReportScheduleRan.d.ts +4 -0
  14. package/src/Api/Implementation/LayoutHelpers.js +12 -0
  15. package/src/Api/Internal/EventInternalApi.js +2 -1
  16. package/src/Strategy/CalculatedColumnModule.js +3 -1
  17. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
  18. package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
  19. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
  20. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
  21. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
  22. package/src/View/AdaptablePopover/index.js +1 -1
  23. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +8 -16
  24. package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -1
  25. package/src/View/Components/Buttons/ButtonInfo.js +4 -4
  26. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +1 -1
  27. package/src/View/Components/ColumnFilter/ColumnFilter.js +15 -5
  28. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  29. package/src/View/Components/ColumnFilter/FloatingFilter.js +57 -59
  30. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
  31. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
  32. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
  33. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
  34. package/src/View/Components/Selectors/ColumnSelector.js +5 -0
  35. package/src/View/Components/ValueSelector/index.js +1 -1
  36. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +3 -1
  37. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +3 -8
  38. package/src/View/GridFilter/GridFilterViewPanel.js +1 -1
  39. package/src/View/Layout/LayoutViewPanel.js +23 -21
  40. package/src/View/Layout/Wizard/sections/ColumnsSection.js +3 -3
  41. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +1 -1
  42. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +1 -1
  43. package/src/View/Layout/Wizard/sections/SettingsSection.js +1 -1
  44. package/src/View/License/LicenseWatermark.js +1 -1
  45. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +1 -1
  46. package/src/View/Wizard/OnePageWizards.js +1 -1
  47. package/src/View/renderWithAdaptableContext.js +1 -2
  48. package/src/agGrid/AdaptableAgGrid.d.ts +0 -1
  49. package/src/agGrid/AdaptableAgGrid.js +3 -18
  50. package/src/agGrid/AgGridColumnAdapter.js +1 -4
  51. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
  52. package/src/components/Card/index.js +1 -1
  53. package/src/components/Combobox/VirtualizedList.js +5 -5
  54. package/src/components/Combobox/comboboxUtils.d.ts +4 -1
  55. package/src/components/Combobox/comboboxUtils.js +2 -0
  56. package/src/components/Combobox/index.d.ts +1 -0
  57. package/src/components/Combobox/index.js +39 -13
  58. package/src/components/Datepicker/index.js +2 -2
  59. package/src/components/Dialog/index.js +1 -1
  60. package/src/components/DragAndDropContext/TabList.js +1 -1
  61. package/src/components/Dropdown/Arrows.js +0 -1
  62. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  63. package/src/components/ExpressionEditor/index.js +1 -1
  64. package/src/components/Input/index.js +1 -1
  65. package/src/components/NewDropdownButton/index.d.ts +1 -0
  66. package/src/components/NewDropdownButton/index.js +2 -2
  67. package/src/components/NewSelect/index.d.ts +2 -0
  68. package/src/components/NewSelect/index.js +10 -7
  69. package/src/components/Panel/index.js +1 -1
  70. package/src/components/SimpleButton/index.js +1 -1
  71. package/src/components/Tabs/index.js +1 -1
  72. package/src/components/Tree/TreeDropdown/index.js +5 -13
  73. package/src/components/ui/button.d.ts +5 -2
  74. package/src/components/ui/button.js +8 -6
  75. package/src/components/ui/combobox.d.ts +16 -16
  76. package/src/components/ui/combobox.js +48 -49
  77. package/src/components/ui/input-group.d.ts +10 -9
  78. package/src/components/ui/input-group.js +19 -16
  79. package/src/components/ui/input.d.ts +2 -2
  80. package/src/components/ui/input.js +7 -4
  81. package/src/components/ui/popover.d.ts +5 -5
  82. package/src/components/ui/popover.js +5 -5
  83. package/src/components/ui/select.d.ts +7 -6
  84. package/src/components/ui/select.js +19 -17
  85. package/src/components/ui/textarea.d.ts +2 -2
  86. package/src/components/ui/textarea.js +7 -4
  87. package/src/components/ui/tooltip.d.ts +6 -5
  88. package/src/components/ui/tooltip.js +10 -7
  89. package/src/env.js +2 -2
  90. package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
  91. package/src/lib/utils.d.ts +20 -0
  92. package/src/lib/utils.js +48 -1
  93. package/src/metamodel/adaptable.metamodel.d.ts +7 -19
  94. package/src/metamodel/adaptable.metamodel.js +1 -1
  95. package/src/migration/VersionUpgrade23.d.ts +2 -3
  96. package/src/migration/VersionUpgrade23.js +4 -16
  97. package/src/types.d.ts +0 -1
  98. package/themes/dark.css +7 -17
  99. package/tsconfig.cjs.tsbuildinfo +1 -1
  100. package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
  101. package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
  102. package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
  103. package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
  104. package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
  105. package/src/components/Select/CSSNumericVariableWatch.js +0 -51
@@ -1,17 +0,0 @@
1
- /**
2
- * Whether Adaptable re-applies filtering after data edits; if `applyFilter` value is 'Throttle', `throttleDelay` should be set
3
- */
4
- export interface FilterActionOnDataChange {
5
- /**
6
- * When to re-apply Filters: 'Always', 'Never' or 'Throttle'
7
- */
8
- applyFilter: ApplyFilterAction;
9
- /**
10
- * Delay in ms (when `applyFilter` is set to 'Throttle')
11
- */
12
- throttleDelay?: number;
13
- }
14
- /**
15
- * When to apply a Filter: 'Always', 'Never' or 'Throttle'
16
- */
17
- export type ApplyFilterAction = 'Always' | 'Never' | 'Throttle';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * Whether Adaptable re-applies filtering after data edits; if `applyFilter` value is 'Throttle', `throttleDelay` should be set
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- declare const computedCSSVarNames: readonly ["--ab-cmp-select-menu__max-width", "--ab-cmp-select-menu__min-width", "--ab-cmp-select-menu__max-height"];
3
- type AdaptableComputedCSSVars = {
4
- [key in (typeof computedCSSVarNames)[number]]: string | number;
5
- };
6
- export declare const AdaptableComputedCSSVarsContext: React.Context<AdaptableComputedCSSVars>;
7
- export declare const WithAdaptableComputedCSSVars: ({ children }: {
8
- children: React.ReactNode;
9
- }) => React.JSX.Element;
10
- export declare const useAdaptableComputedCSSVars: () => AdaptableComputedCSSVars;
11
- export declare const useAdaptableComputedCSSVar: (varName: (typeof computedCSSVarNames)[number]) => string | number;
12
- export {};
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useAdaptableComputedCSSVar = exports.useAdaptableComputedCSSVars = exports.WithAdaptableComputedCSSVars = exports.AdaptableComputedCSSVarsContext = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const React = tslib_1.__importStar(require("react"));
7
- const CSSNumericVariableWatch_1 = require("../components/Select/CSSNumericVariableWatch");
8
- const debounce_1 = tslib_1.__importDefault(require("../Utilities/utils/debounce"));
9
- const react_1 = require("react");
10
- const computedCSSVarNames = [
11
- '--ab-cmp-select-menu__max-width',
12
- '--ab-cmp-select-menu__min-width',
13
- '--ab-cmp-select-menu__max-height',
14
- ];
15
- const defaultValues = Object.fromEntries(computedCSSVarNames.map((varName) => [varName, 0]));
16
- exports.AdaptableComputedCSSVarsContext = React.createContext(defaultValues);
17
- const WithAdaptableComputedCSSVars = ({ children }) => {
18
- const [computedCSSVars, doSetComputedCSSVars] = React.useState(defaultValues);
19
- const setComputedCSSVars = (0, react_1.useMemo)(() => {
20
- return (0, debounce_1.default)(doSetComputedCSSVars, 300, { leading: false, trailing: true });
21
- }, [doSetComputedCSSVars]);
22
- return ((0, jsx_runtime_1.jsxs)(exports.AdaptableComputedCSSVarsContext.Provider, { value: computedCSSVars, children: [children, computedCSSVarNames.map((varName) => ((0, jsx_runtime_1.jsx)(CSSNumericVariableWatch_1.CSSNumericVariableWatch, { varName: varName, onChange: (value) => {
23
- setComputedCSSVars((prev) => ({ ...prev, [varName]: value }));
24
- } }, varName)))] }));
25
- };
26
- exports.WithAdaptableComputedCSSVars = WithAdaptableComputedCSSVars;
27
- const useAdaptableComputedCSSVars = () => {
28
- const context = React.useContext(exports.AdaptableComputedCSSVarsContext);
29
- return context;
30
- };
31
- exports.useAdaptableComputedCSSVars = useAdaptableComputedCSSVars;
32
- const useAdaptableComputedCSSVar = (varName) => {
33
- const context = React.useContext(exports.AdaptableComputedCSSVarsContext);
34
- return context?.[varName];
35
- };
36
- exports.useAdaptableComputedCSSVar = useAdaptableComputedCSSVar;
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- type CSSVariableWatcherProps = {
3
- varName: string;
4
- onChange: (value: number) => void;
5
- allowInts?: boolean;
6
- };
7
- export declare const useCSSVariableWatch: (params: CSSVariableWatcherProps & {
8
- ref: React.MutableRefObject<HTMLElement | null>;
9
- }) => void;
10
- export declare const CSSNumericVariableWatch: (props: CSSVariableWatcherProps) => React.JSX.Element;
11
- export {};
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CSSNumericVariableWatch = exports.useCSSVariableWatch = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const React = tslib_1.__importStar(require("react"));
7
- const react_1 = require("react");
8
- const ResizeObserver_1 = require("../ResizeObserver");
9
- const WRAPPER_STYLE = {
10
- position: 'absolute',
11
- pointerEvents: 'none',
12
- width: 0,
13
- height: 0,
14
- lineHeight: 0,
15
- fontSize: 0,
16
- overflow: 'hidden',
17
- };
18
- const useCSSVariableWatch = (params) => {
19
- const lastValueRef = (0, react_1.useRef)(0);
20
- const onResize = React.useCallback(({ height }) => {
21
- if (height != null && height !== lastValueRef.current) {
22
- lastValueRef.current = height;
23
- params.onChange(height);
24
- }
25
- }, [params.onChange]);
26
- (0, ResizeObserver_1.useResizeObserver)(params.ref, onResize, { earlyAttach: true });
27
- React.useLayoutEffect(() => {
28
- const value = params.ref.current.getBoundingClientRect().height;
29
- if (value != null) {
30
- lastValueRef.current = value;
31
- return params.onChange(value);
32
- }
33
- else {
34
- console.warn(`Specified variable ${params.varName} not found or does not have a numeric value.`);
35
- }
36
- }, []);
37
- };
38
- exports.useCSSVariableWatch = useCSSVariableWatch;
39
- const CSSNumericVariableWatch = (props) => {
40
- const domRef = (0, react_1.useRef)(null);
41
- (0, exports.useCSSVariableWatch)({
42
- ...props,
43
- ref: domRef,
44
- });
45
- const height = props.varName.startsWith('var(') ? props.varName : `var(${props.varName})`;
46
- const { allowInts = false } = props;
47
- return ((0, jsx_runtime_1.jsx)("div", { "data-name": "css-variable-watcher", "data-var": props.varName, style: WRAPPER_STYLE, children: (0, jsx_runtime_1.jsx)("div", { ref: domRef, style: {
48
- height: allowInts ? `calc(1px * ${height})` : height, // we do multiplication in order to support integer (without px) values as well
49
- } }) }));
50
- };
51
- exports.CSSNumericVariableWatch = CSSNumericVariableWatch;