@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
package/src/lib/utils.js CHANGED
@@ -1,10 +1,57 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.POPUP_Z_INDEX = void 0;
3
+ exports.getFocusableElements = exports.POPUP_Z_INDEX = void 0;
4
4
  exports.cn = cn;
5
+ exports.captureTab = captureTab;
5
6
  const clsx_1 = require("clsx");
6
7
  const twMerge_1 = require("../twMerge");
7
8
  function cn(...inputs) {
8
9
  return (0, twMerge_1.twMerge)((0, clsx_1.clsx)(inputs));
9
10
  }
10
11
  exports.POPUP_Z_INDEX = 'twa:z-[9999999]';
12
+ const FOCUSABLE_SELECTOR = [
13
+ 'a[href]',
14
+ 'button:not([disabled])',
15
+ 'input:not([disabled])',
16
+ 'select:not([disabled])',
17
+ 'textarea:not([disabled])',
18
+ '[tabindex]:not([tabindex="-1"])',
19
+ ].join(',');
20
+ const getFocusableElements = (root) => {
21
+ return Array.from(root.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => {
22
+ if (el.hasAttribute('disabled') || el.getAttribute('aria-hidden') === 'true') {
23
+ return false;
24
+ }
25
+ // ignore elements that aren't actually rendered (e.g. display:none)
26
+ return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
27
+ });
28
+ };
29
+ exports.getFocusableElements = getFocusableElements;
30
+ function captureTab(node, event) {
31
+ if (event === undefined) {
32
+ return (deferredEvent) => captureTab(node, deferredEvent);
33
+ }
34
+ if (event.key !== 'Tab')
35
+ return;
36
+ const root = node instanceof HTMLElement ? node : (node?.current ?? null);
37
+ if (!root)
38
+ return;
39
+ const active = document.activeElement;
40
+ if (!active || !root.contains(active))
41
+ return;
42
+ const focusable = (0, exports.getFocusableElements)(root);
43
+ if (focusable.length === 0)
44
+ return;
45
+ const first = focusable[0];
46
+ const last = focusable[focusable.length - 1];
47
+ if (event.shiftKey) {
48
+ if (active === first) {
49
+ event.preventDefault();
50
+ last.focus();
51
+ }
52
+ }
53
+ else if (active === last) {
54
+ event.preventDefault();
55
+ first.focus();
56
+ }
57
+ }
@@ -1113,9 +1113,6 @@ export declare const ADAPTABLE_METAMODEL: {
1113
1113
  o: boolean;
1114
1114
  }[];
1115
1115
  };
1116
- ApplyFilterAction: {
1117
- k: string;
1118
- };
1119
1116
  AutoGenerateTagsForLayoutsContext: {
1120
1117
  k: string;
1121
1118
  p: {
@@ -2965,20 +2962,6 @@ export declare const ADAPTABLE_METAMODEL: {
2965
2962
  r?: undefined;
2966
2963
  })[];
2967
2964
  };
2968
- FilterActionOnDataChange: {
2969
- k: string;
2970
- p: ({
2971
- n: string;
2972
- k: string;
2973
- r: string;
2974
- o?: undefined;
2975
- } | {
2976
- n: string;
2977
- k: string;
2978
- o: boolean;
2979
- r?: undefined;
2980
- })[];
2981
- };
2982
2965
  FilterApi: {
2983
2966
  k: string;
2984
2967
  p: ({
@@ -4319,12 +4302,17 @@ export declare const ADAPTABLE_METAMODEL: {
4319
4302
  };
4320
4303
  ReportScheduleRanInfo: {
4321
4304
  k: string;
4322
- p: {
4305
+ p: ({
4306
+ n: string;
4307
+ k: string;
4308
+ o?: undefined;
4309
+ r?: undefined;
4310
+ } | {
4323
4311
  n: string;
4324
4312
  k: string;
4325
4313
  o: boolean;
4326
4314
  r: string;
4327
- }[];
4315
+ })[];
4328
4316
  };
4329
4317
  ResolveContextDataContext: {
4330
4318
  k: string;