@adaptabletools/adaptable 23.0.0-canary.3 → 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 (43) hide show
  1. package/package.json +1 -1
  2. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
  3. package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
  4. package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
  5. package/src/AdaptableState/Common/AdaptableForm.js +31 -0
  6. package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
  7. package/src/AdaptableState/Common/Enums.d.ts +0 -5
  8. package/src/AdaptableState/Common/Enums.js +0 -6
  9. package/src/Api/Implementation/LayoutHelpers.js +12 -0
  10. package/src/Strategy/CalculatedColumnModule.js +3 -1
  11. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
  12. package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
  13. package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
  14. package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +115 -0
  15. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
  16. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +8 -16
  17. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  18. package/src/View/Components/Selectors/ColumnSelector.js +5 -0
  19. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +3 -1
  20. package/src/View/Layout/LayoutViewPanel.js +23 -21
  21. package/src/View/renderWithAdaptableContext.js +2 -3
  22. package/src/agGrid/AdaptableAgGrid.d.ts +0 -1
  23. package/src/agGrid/AdaptableAgGrid.js +3 -18
  24. package/src/agGrid/AgGridColumnAdapter.js +1 -4
  25. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +11 -6
  26. package/src/components/Combobox/VirtualizedList.js +5 -5
  27. package/src/components/Combobox/comboboxUtils.d.ts +4 -1
  28. package/src/components/Combobox/comboboxUtils.js +2 -0
  29. package/src/components/Combobox/index.d.ts +1 -0
  30. package/src/components/Combobox/index.js +35 -15
  31. package/src/components/Tree/TreeDropdown/index.js +2 -6
  32. package/src/env.js +2 -2
  33. package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
  34. package/src/metamodel/adaptable.metamodel.d.ts +0 -17
  35. package/src/metamodel/adaptable.metamodel.js +1 -1
  36. package/src/types.d.ts +0 -1
  37. package/tsconfig.esm.tsbuildinfo +1 -1
  38. package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
  39. package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -4
  40. package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
  41. package/src/View/AdaptableComputedCSSVarsContext.js +0 -29
  42. package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
  43. package/src/components/Select/CSSNumericVariableWatch.js +0 -45
@@ -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,4 +0,0 @@
1
- /**
2
- * Whether Adaptable re-applies filtering after data edits; if `applyFilter` value is 'Throttle', `throttleDelay` should be set
3
- */
4
- export {};
@@ -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,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { CSSNumericVariableWatch } from '../components/Select/CSSNumericVariableWatch';
4
- import debounce from '../Utilities/utils/debounce';
5
- import { useMemo } from 'react';
6
- const computedCSSVarNames = [
7
- '--ab-cmp-select-menu__max-width',
8
- '--ab-cmp-select-menu__min-width',
9
- '--ab-cmp-select-menu__max-height',
10
- ];
11
- const defaultValues = Object.fromEntries(computedCSSVarNames.map((varName) => [varName, 0]));
12
- export const AdaptableComputedCSSVarsContext = React.createContext(defaultValues);
13
- export const WithAdaptableComputedCSSVars = ({ children }) => {
14
- const [computedCSSVars, doSetComputedCSSVars] = React.useState(defaultValues);
15
- const setComputedCSSVars = useMemo(() => {
16
- return debounce(doSetComputedCSSVars, 300, { leading: false, trailing: true });
17
- }, [doSetComputedCSSVars]);
18
- return (_jsxs(AdaptableComputedCSSVarsContext.Provider, { value: computedCSSVars, children: [children, computedCSSVarNames.map((varName) => (_jsx(CSSNumericVariableWatch, { varName: varName, onChange: (value) => {
19
- setComputedCSSVars((prev) => ({ ...prev, [varName]: value }));
20
- } }, varName)))] }));
21
- };
22
- export const useAdaptableComputedCSSVars = () => {
23
- const context = React.useContext(AdaptableComputedCSSVarsContext);
24
- return context;
25
- };
26
- export const useAdaptableComputedCSSVar = (varName) => {
27
- const context = React.useContext(AdaptableComputedCSSVarsContext);
28
- return context?.[varName];
29
- };
@@ -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,45 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { useRef } from 'react';
4
- import { useResizeObserver } from '../ResizeObserver';
5
- const WRAPPER_STYLE = {
6
- position: 'absolute',
7
- pointerEvents: 'none',
8
- width: 0,
9
- height: 0,
10
- lineHeight: 0,
11
- fontSize: 0,
12
- overflow: 'hidden',
13
- };
14
- export const useCSSVariableWatch = (params) => {
15
- const lastValueRef = useRef(0);
16
- const onResize = React.useCallback(({ height }) => {
17
- if (height != null && height !== lastValueRef.current) {
18
- lastValueRef.current = height;
19
- params.onChange(height);
20
- }
21
- }, [params.onChange]);
22
- useResizeObserver(params.ref, onResize, { earlyAttach: true });
23
- React.useLayoutEffect(() => {
24
- const value = params.ref.current.getBoundingClientRect().height;
25
- if (value != null) {
26
- lastValueRef.current = value;
27
- return params.onChange(value);
28
- }
29
- else {
30
- console.warn(`Specified variable ${params.varName} not found or does not have a numeric value.`);
31
- }
32
- }, []);
33
- };
34
- export const CSSNumericVariableWatch = (props) => {
35
- const domRef = useRef(null);
36
- useCSSVariableWatch({
37
- ...props,
38
- ref: domRef,
39
- });
40
- const height = props.varName.startsWith('var(') ? props.varName : `var(${props.varName})`;
41
- const { allowInts = false } = props;
42
- return (_jsx("div", { "data-name": "css-variable-watcher", "data-var": props.varName, style: WRAPPER_STYLE, children: _jsx("div", { ref: domRef, style: {
43
- height: allowInts ? `calc(1px * ${height})` : height, // we do multiplication in order to support integer (without px) values as well
44
- } }) }));
45
- };