@adaptabletools/adaptable 24.0.0-canary.6 → 24.0.0-canary.8

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 (85) hide show
  1. package/index.css +36 -173
  2. package/package.json +1 -1
  3. package/src/AdaptableOptions/DefaultAdaptableOptions.js +6 -0
  4. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +83 -4
  5. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +4 -0
  6. package/src/Api/Implementation/QuickSearchApiImpl.js +2 -2
  7. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -1
  8. package/src/Api/Implementation/UserInterfaceApiImpl.js +9 -15
  9. package/src/Api/Internal/AdaptableInternalApi.js +5 -3
  10. package/src/Api/Internal/StateInternalApi.js +4 -3
  11. package/src/Api/UserInterfaceApi.d.ts +0 -4
  12. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +9 -0
  13. package/src/Redux/ActionsReducers/QuickSearchRedux.js +9 -0
  14. package/src/Redux/Store/AdaptableStore.js +4 -2
  15. package/src/Utilities/Helpers/UIHelper.d.ts +6 -11
  16. package/src/Utilities/Helpers/UIHelper.js +6 -33
  17. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +9 -11
  18. package/src/View/Components/StyleComponent.js +2 -2
  19. package/src/View/Dashboard/Dashboard.d.ts +1 -1
  20. package/src/View/Dashboard/Dashboard.js +1 -1
  21. package/src/View/Filter/ColumnFilter/ColumnFilterNew.js +14 -9
  22. package/src/View/QuickSearch/QuickSearchInput.js +1 -1
  23. package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
  24. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  25. package/src/View/QuickSearch/Utilities/useQuickSearchDebounced.d.ts +2 -2
  26. package/src/View/StyledColumn/RangesComponent.js +8 -11
  27. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +0 -2
  28. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +2 -2
  29. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
  30. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +0 -3
  31. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +3 -3
  32. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +7 -11
  33. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +4 -4
  34. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -2
  35. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -2
  36. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +7 -7
  37. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +4 -4
  38. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +3 -3
  39. package/src/components/ColorField/index.d.ts +13 -0
  40. package/src/components/ColorField/index.js +26 -0
  41. package/src/components/aql/QueryBuilder/GroupEditor.js +1 -1
  42. package/src/components/aql/QueryBuilder/QueryBuilder.d.ts +5 -0
  43. package/src/components/aql/QueryBuilder/QueryBuilder.js +1 -1
  44. package/src/components/aql/QueryBuilder/context.d.ts +7 -0
  45. package/src/components/aql/QueryBuilder/context.js +3 -1
  46. package/src/env.js +2 -2
  47. package/src/migration/VersionUpgrade24.d.ts +9 -0
  48. package/src/migration/VersionUpgrade24.js +27 -0
  49. package/src/setupDevTools.js +163 -9
  50. package/src/types.d.ts +1 -1
  51. package/tsconfig.esm.tsbuildinfo +1 -1
  52. package/vendor/components/ColorField/index.d.ts +53 -0
  53. package/vendor/components/ColorField/index.d.ts.map +1 -0
  54. package/vendor/components/ColorField/index.js +80 -0
  55. package/vendor/components/ColorField/index.js.map +1 -0
  56. package/vendor/components/ColorPicker/colorPickerTab.d.ts +2 -2
  57. package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -1
  58. package/vendor/components/ColorPicker/colorPickerTab.js +6 -28
  59. package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -1
  60. package/vendor/components/ColorPicker/index.d.ts +76 -9
  61. package/vendor/components/ColorPicker/index.d.ts.map +1 -1
  62. package/vendor/components/ColorPicker/index.js +217 -27
  63. package/vendor/components/ColorPicker/index.js.map +1 -1
  64. package/vendor/components/ColorPicker/themeColors.d.ts +74 -4
  65. package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -1
  66. package/vendor/components/ColorPicker/themeColors.js +206 -18
  67. package/vendor/components/ColorPicker/themeColors.js.map +1 -1
  68. package/vendor/components/NumberInput/index.d.ts +51 -0
  69. package/vendor/components/NumberInput/index.d.ts.map +1 -0
  70. package/vendor/components/NumberInput/index.js +82 -0
  71. package/vendor/components/NumberInput/index.js.map +1 -0
  72. package/vendor/components/index.css +73 -24
  73. package/vendor/components/index.d.ts +6 -2
  74. package/vendor/components/index.d.ts.map +1 -1
  75. package/vendor/components/index.js +3 -1
  76. package/vendor/components/index.js.map +1 -1
  77. package/vendor/components/ui/input-group.d.ts.map +1 -1
  78. package/vendor/components/ui/input-group.js +5 -4
  79. package/vendor/components/ui/input-group.js.map +1 -1
  80. package/src/components/ColorPicker/ColorPicker.d.ts +0 -12
  81. package/src/components/ColorPicker/ColorPicker.js +0 -48
  82. package/src/components/ColorPicker/OptionalColorPicker.d.ts +0 -12
  83. package/src/components/ColorPicker/OptionalColorPicker.js +0 -13
  84. package/src/components/ColorPicker/index.d.ts +0 -2
  85. package/src/components/ColorPicker/index.js +0 -2
package/index.css CHANGED
@@ -611,6 +611,9 @@
611
611
  .twa\:field-sizing-content {
612
612
  field-sizing: content;
613
613
  }
614
+ .twa\:aspect-auto {
615
+ aspect-ratio: auto;
616
+ }
614
617
  .twa\:aspect-square {
615
618
  aspect-ratio: 1 / 1;
616
619
  }
@@ -662,10 +665,6 @@
662
665
  width: calc(var(--ab-base-space) * 16);
663
666
  height: calc(var(--ab-base-space) * 16);
664
667
  }
665
- .twa\:size-\[calc\(100\%-2\*var\(--ab-base-space\)\)\] {
666
- width: calc(100% - 2 * var(--ab-base-space));
667
- height: calc(100% - 2 * var(--ab-base-space));
668
- }
669
668
  .twa\:size-auto {
670
669
  width: auto;
671
670
  height: auto;
@@ -721,9 +720,6 @@
721
720
  .twa\:h-\[22px\] {
722
721
  height: 22px;
723
722
  }
724
- .twa\:h-\[24px\] {
725
- height: 24px;
726
- }
727
723
  .twa\:h-\[33px\] {
728
724
  height: 33px;
729
725
  }
@@ -736,6 +732,9 @@
736
732
  .twa\:h-\[calc\(100\%-1px\)\] {
737
733
  height: calc(100% - 1px);
738
734
  }
735
+ .twa\:h-\[calc\(100\%-2\*var\(--ab-base-space\)\)\] {
736
+ height: calc(100% - 2 * var(--ab-base-space));
737
+ }
739
738
  .twa\:h-\[min\(22rem\,var\(--total-size\)\)\] {
740
739
  height: min(22rem, var(--total-size));
741
740
  }
@@ -907,6 +906,9 @@
907
906
  .twa\:w-8 {
908
907
  width: calc(var(--ab-base-space) * 8);
909
908
  }
909
+ .twa\:w-12 {
910
+ width: calc(var(--ab-base-space) * 12);
911
+ }
910
912
  .twa\:w-20 {
911
913
  width: calc(var(--ab-base-space) * 20);
912
914
  }
@@ -955,9 +957,6 @@
955
957
  .twa\:w-\[15rem\] {
956
958
  width: 15rem;
957
959
  }
958
- .twa\:w-\[36px\] {
959
- width: 36px;
960
- }
961
960
  .twa\:w-\[44px\] {
962
961
  width: 44px;
963
962
  }
@@ -1027,6 +1026,9 @@
1027
1026
  .twa\:max-w-3xl {
1028
1027
  max-width: var(--twa-container-3xl);
1029
1028
  }
1029
+ .twa\:max-w-28 {
1030
+ max-width: calc(var(--ab-base-space) * 28);
1031
+ }
1030
1032
  .twa\:max-w-50 {
1031
1033
  max-width: calc(var(--ab-base-space) * 50);
1032
1034
  }
@@ -2444,9 +2446,6 @@
2444
2446
  .twa\:opacity-0 {
2445
2447
  opacity: 0%;
2446
2448
  }
2447
- .twa\:opacity-30 {
2448
- opacity: 30%;
2449
- }
2450
2449
  .twa\:opacity-50 {
2451
2450
  opacity: 50%;
2452
2451
  }
@@ -4112,19 +4111,6 @@
4112
4111
  background-color: color-mix(in oklab, var(--ab-color-destructive) 20%, transparent);
4113
4112
  }
4114
4113
  }
4115
- .twa\:\[\&_\.ab-ColorPicker-swatch\]\:absolute .ab-ColorPicker-swatch {
4116
- position: absolute;
4117
- }
4118
- .twa\:\[\&_\.ab-ColorPicker-swatch\]\:inset-0 .ab-ColorPicker-swatch {
4119
- inset: 0px;
4120
- }
4121
- .twa\:\[\&_\.ab-ColorPicker-swatch\]\:size-full .ab-ColorPicker-swatch {
4122
- width: 100%;
4123
- height: 100%;
4124
- }
4125
- .twa\:\[\&_\.ab-ColorPicker-swatch\]\:opacity-0 .ab-ColorPicker-swatch {
4126
- opacity: 0%;
4127
- }
4128
4114
  .twa\:\[\&_\.ab-Input\]\:w-full .ab-Input {
4129
4115
  width: 100%;
4130
4116
  }
@@ -6360,26 +6346,26 @@
6360
6346
  --ab-color-palette-10: #4a5568;
6361
6347
  --ab-color-palette-11: #f3e8ff;
6362
6348
  --ab-color-palette-12: #553c9a;
6363
- --ab-color-swatch-1: #000000;
6364
- --ab-color-swatch-2: #ffffff;
6365
- --ab-color-swatch-3: #d3d3d3;
6366
- --ab-color-swatch-4: #808080;
6367
- --ab-color-swatch-5: #a52a2a;
6368
- --ab-color-swatch-6: #006400;
6369
- --ab-color-swatch-7: #008000;
6370
- --ab-color-swatch-8: #32cd32;
6371
- --ab-color-swatch-9: #ffff00;
6372
- --ab-color-swatch-10: #ffffe0;
6373
- --ab-color-swatch-11: #00008b;
6374
- --ab-color-swatch-12: #0000ff;
6375
- --ab-color-swatch-13: #87cefa;
6376
- --ab-color-swatch-14: #00ffff;
6377
- --ab-color-swatch-15: #ff00ff;
6378
- --ab-color-swatch-16: #800080;
6379
- --ab-color-swatch-17: #8b0000;
6380
- --ab-color-swatch-18: #ff0000;
6381
- --ab-color-swatch-19: #dc143c;
6382
- --ab-color-swatch-20: #ffa500;
6349
+ --ab-color-palette-13: #000000;
6350
+ --ab-color-palette-14: #ffffff;
6351
+ --ab-color-palette-15: #d3d3d3;
6352
+ --ab-color-palette-16: #808080;
6353
+ --ab-color-palette-17: #a52a2a;
6354
+ --ab-color-palette-18: #006400;
6355
+ --ab-color-palette-19: #008000;
6356
+ --ab-color-palette-20: #32cd32;
6357
+ --ab-color-palette-21: #ffff00;
6358
+ --ab-color-palette-22: #ffffe0;
6359
+ --ab-color-palette-23: #00008b;
6360
+ --ab-color-palette-24: #0000ff;
6361
+ --ab-color-palette-25: #87cefa;
6362
+ --ab-color-palette-26: #00ffff;
6363
+ --ab-color-palette-27: #ff00ff;
6364
+ --ab-color-palette-28: #800080;
6365
+ --ab-color-palette-29: #8b0000;
6366
+ --ab-color-palette-30: #ff0000;
6367
+ --ab-color-palette-31: #dc143c;
6368
+ --ab-color-palette-32: #ffa500;
6383
6369
  --ab-icon-fill: currentColor;
6384
6370
  --ab-custom-scrollbar-size: 8px;
6385
6371
  --ab-color-custom-scrollbar-track: var(--ab-color-background);
@@ -9000,133 +8986,6 @@
9000
8986
  .ab-ModuleSelector__UnusedGroups--row .ab-ModuleSelector__UnusedPanel {
9001
8987
  margin-bottom: 0;
9002
8988
  }
9003
- .ab-ColorPicker-swatch {
9004
- width: 36px;
9005
- height: 24px;
9006
- min-height: 24px !important;
9007
- padding: 0;
9008
- box-sizing: border-box;
9009
- flex-shrink: 0;
9010
- cursor: pointer;
9011
- }
9012
- .ab-ColorPicker-swatch::-webkit-color-swatch-wrapper {
9013
- padding: 0;
9014
- }
9015
- .ab-ColorPicker-swatch::-webkit-color-swatch {
9016
- border: none;
9017
- border-radius: calc(var(--ab-border-radius-input, 4px) - 1px);
9018
- }
9019
- .ab-ColorPicker-swatch::-moz-color-swatch {
9020
- border: none;
9021
- }
9022
- .ab-OptionalColorPicker-empty {
9023
- width: 36px;
9024
- height: 24px;
9025
- min-height: 24px;
9026
- padding: 0;
9027
- border: 1px dashed var(--ab-color-border, #ccc);
9028
- border-radius: var(--ab-border-radius-input, 4px);
9029
- cursor: pointer;
9030
- background-color: #fff;
9031
- background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
9032
- background-size: 6px 6px;
9033
- background-position: 0 0, 0 3px, 3px -3px, -3px 0;
9034
- }
9035
- .ab-OptionalColorPicker-empty:hover:not(:disabled) {
9036
- border-color: var(--ab-color-accent, #43429e);
9037
- }
9038
- .ab-OptionalColorPicker-empty:disabled {
9039
- opacity: 0.3;
9040
- cursor: not-allowed;
9041
- }
9042
- .ab-ColorPicker-range[type='range'] {
9043
- width: 120px;
9044
- margin: 0;
9045
- height: 12px !important;
9046
- min-height: 12px !important;
9047
- padding: 0;
9048
- border-radius: 6px;
9049
- -webkit-appearance: none;
9050
- appearance: none;
9051
- }
9052
- .ab-ColorPicker-range[type='range']:focus {
9053
- outline: none;
9054
- }
9055
- .ab-ColorPicker-range[type='range']::-webkit-slider-runnable-track {
9056
- background: transparent;
9057
- border: 0;
9058
- width: 100%;
9059
- height: 12px;
9060
- cursor: pointer;
9061
- }
9062
- .ab-ColorPicker-range[type='range']::-webkit-slider-thumb {
9063
- margin-top: -4px;
9064
- width: 20px;
9065
- height: 20px;
9066
- background: #ffffff;
9067
- border: 1px solid #000000;
9068
- border-radius: 50%;
9069
- cursor: pointer;
9070
- -webkit-appearance: none;
9071
- box-sizing: border-box;
9072
- }
9073
- .ab-ColorPicker-range[type='range']:focus::-webkit-slider-runnable-track {
9074
- background: none;
9075
- }
9076
- .ab-ColorPicker-range[type='range']::-moz-range-track {
9077
- background: transparent;
9078
- border: 0;
9079
- width: 100%;
9080
- height: 12px;
9081
- cursor: pointer;
9082
- }
9083
- .ab-ColorPicker-range[type='range']::-moz-range-thumb {
9084
- width: 20px;
9085
- height: 20px;
9086
- background: #ffffff;
9087
- border: 1px solid #000000;
9088
- border-radius: 50%;
9089
- cursor: pointer;
9090
- box-sizing: border-box;
9091
- }
9092
- .ab-ColorPicker-range[type='range']::-ms-track {
9093
- background: transparent;
9094
- border-color: transparent;
9095
- border-width: 1px 0;
9096
- color: transparent;
9097
- width: 100%;
9098
- height: 12px;
9099
- cursor: pointer;
9100
- }
9101
- .ab-ColorPicker-range[type='range']::-ms-fill-lower {
9102
- background: #43429e;
9103
- border: 0;
9104
- }
9105
- .ab-ColorPicker-range[type='range']::-ms-fill-upper {
9106
- background: none;
9107
- border: 0;
9108
- }
9109
- .ab-ColorPicker-range[type='range']::-ms-thumb {
9110
- width: 20px;
9111
- height: 20px;
9112
- background: #ffffff;
9113
- border: 1px solid #000000;
9114
- border-radius: 50%;
9115
- cursor: pointer;
9116
- margin-top: 0px;
9117
- box-sizing: border-box;
9118
- }
9119
- .ab-ColorPicker-range[type='range']:focus::-ms-fill-lower {
9120
- background: none;
9121
- }
9122
- .ab-ColorPicker-range[type='range']:focus::-ms-fill-upper {
9123
- background: none;
9124
- }
9125
- @supports (-ms-ime-align: auto) {
9126
- .ab-ColorPicker-range[type='range'] {
9127
- margin: 0;
9128
- }
9129
- }
9130
8989
  .ab-AdaptableOptions {
9131
8990
  background: var(--ab-cmp-adaptable-options__background-color);
9132
8991
  }
@@ -9665,6 +9524,10 @@
9665
9524
  min-width: 0;
9666
9525
  max-width: none;
9667
9526
  width: 100%;
9527
+ --ab-color-input-background: var(--ab-color-primarylight);
9528
+ }
9529
+ .ab--theme-dark .ab-AgGridColumnFilter-host--tool-panel, .ab--theme-dark .ab-ColumnFilter--tool-panel {
9530
+ --ab-color-input-background: unset;
9668
9531
  }
9669
9532
  .ab-IconSelector__Popup {
9670
9533
  color: var(--ab-cmp-icon-selector__popup__color);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "24.0.0-canary.6",
3
+ "version": "24.0.0-canary.8",
4
4
  "description": "Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -334,6 +334,12 @@ const DefaultAdaptableOptions = {
334
334
  showOutsideDays: true,
335
335
  datepickerButtons: ['close', 'today'],
336
336
  },
337
+ colourPickerOptions: {
338
+ tabs: ['Custom', 'Palette'],
339
+ orderPaletteColours: true,
340
+ removeDuplicates: true,
341
+ showGroupLabels: false,
342
+ },
337
343
  editableCellStyle: undefined,
338
344
  readOnlyCellStyle: undefined,
339
345
  editedCellStyle: undefined,
@@ -1,4 +1,5 @@
1
1
  import { AdaptableIcon } from '../AdaptableState/Common/AdaptableIcon';
2
+ import { AdaptableModule } from '../AdaptableState/Common/Types';
2
3
  import { DateInputOptions } from './DateInputOptions';
3
4
  import { AdaptableObjectTag } from '../AdaptableState/Common/AdaptableObject';
4
5
  import { AdaptableStyle } from '../AdaptableState/Common/AdaptableStyle';
@@ -30,9 +31,9 @@ export interface UserInterfaceOptions<TData = any> {
30
31
  */
31
32
  dateInputOptions?: DateInputOptions;
32
33
  /**
33
- * @deprecated Override `--ab-color-swatch-*`, `--ab-color-palette-*`, and semantic `--ab-color-*` variables in light/dark theme instead; will be removed in future release
34
+ * Options for the Colour Picker, including which colours to display
34
35
  */
35
- colorPalette?: string[] | ((currentTheme: string) => string[]);
36
+ colourPickerOptions?: ColourPickerOptions;
36
37
  /**
37
38
  * Style to set for editable Cells
38
39
  */
@@ -52,9 +53,11 @@ export interface UserInterfaceOptions<TData = any> {
52
53
  */
53
54
  styleClassNames?: string[];
54
55
  /**
55
- * Optional list of AdaptableObjectTags that can be associated with AdaptableObjects
56
+ * Optional list of AdaptableObjectTags that can be associated with AdaptableObjects.
57
+ *
58
+ * When provided as a function, return `undefined` to provide no tags.
56
59
  */
57
- objectTags?: AdaptableObjectTag[] | ((context: ObjectTagsContext) => AdaptableObjectTag[]);
60
+ objectTags?: AdaptableObjectTag[] | ((context: ObjectTagsContext) => AdaptableObjectTag[] | undefined);
58
61
  /**
59
62
  * Provide links to AdapTable documentation (in Module popups and Expression Editor)
60
63
  *
@@ -132,6 +135,82 @@ export interface LoadingScreenOptions<TData = any> {
132
135
  */
133
136
  loadingScreenText?: string;
134
137
  }
138
+ /**
139
+ * Options for the Colour Picker.
140
+ */
141
+ export interface ColourPickerOptions {
142
+ /**
143
+ * Colour Picker tabs to display in order provided; `Custom`, `Palette`, or both
144
+ *
145
+ * @defaultValue ['Custom', 'Palette']
146
+ */
147
+ tabs?: ColourPickerTab[];
148
+ /**
149
+ * Orders Palette swatches around the colour wheel; if `false`, each colour stays the order supplied
150
+ *
151
+ * @defaultValue true
152
+ */
153
+ orderPaletteColours?: boolean;
154
+ /**
155
+ * Leave out duplicates of swatches already displayed
156
+ *
157
+ * @defaultValue true
158
+ */
159
+ removeDuplicates?: boolean;
160
+ /**
161
+ * Chooses which of the supplied colours (theme & colour palette) the Palette tab shows
162
+ */
163
+ filterColours?: (context: ColourPickerFilterContext) => ColourPickerFilterResult | void;
164
+ /**
165
+ * Show **Theme** and **Palette** headings on the Palette tab (if both have colours)
166
+ *
167
+ * @defaultValue false
168
+ */
169
+ showGroupLabels?: boolean;
170
+ }
171
+ /**
172
+ * Colour Picker tabs: `Custom` is free colour picker, `Palette` is list of swatches
173
+ */
174
+ export type ColourPickerTab = 'Custom' | 'Palette';
175
+ /**
176
+ * A colour the Colour Picker can offer. `value` is what gets stored
177
+ */
178
+ export interface ColourPickerColour {
179
+ /**
180
+ * The CSS value that gets stored, e.g. `var(--ab-color-success)`.
181
+ */
182
+ value: string;
183
+ /** The name shown for the colour, e.g. "Success" or "Palette 3". */
184
+ label: string;
185
+ /**
186
+ * The colour as the active theme paints it
187
+ */
188
+ hex?: string;
189
+ }
190
+ /**
191
+ * Colours available when Colour Picker opens, and module being edited.
192
+ */
193
+ export interface ColourPickerFilterContext {
194
+ /**
195
+ * Available Theme colours
196
+ */
197
+ themeColours: ColourPickerColour[];
198
+ /**
199
+ * Available Palette colours
200
+ */
201
+ paletteColours: ColourPickerColour[];
202
+ /**
203
+ * Module being edited
204
+ */
205
+ module?: AdaptableModule;
206
+ }
207
+ /**
208
+ * Colours to show - must be in list provided (otherwise ignored)
209
+ */
210
+ export interface ColourPickerFilterResult {
211
+ themeColours: ColourPickerColour[];
212
+ paletteColours: ColourPickerColour[];
213
+ }
135
214
  /**
136
215
  * Context used when evaluating Object Tags
137
216
  */
@@ -7,10 +7,14 @@ import { NumericStyledColumn } from './Common/NumericStyledColumn';
7
7
  export interface ZeroCentredColors {
8
8
  /**
9
9
  * Colour applied to negative cell values (`Col-Min`…`0`)
10
+ *
11
+ * @defaultValue `var(--ab-color-destructive)`
10
12
  */
11
13
  NegativeColor: string;
12
14
  /**
13
15
  * Colour applied to positive cell values (`0`…`Col-Max`)
16
+ *
17
+ * @defaultValue `var(--ab-color-success)`
14
18
  */
15
19
  PositiveColor: string;
16
20
  }
@@ -8,10 +8,10 @@ export class QuickSearchApiImpl extends ApiBase {
8
8
  return this.getAdaptableState().QuickSearch;
9
9
  }
10
10
  runQuickSearch(quickSearchText) {
11
- this.dispatchAction(QuickSearchRedux.QuickSearchRun(quickSearchText));
11
+ this.dispatchAction(QuickSearchRedux.QuickSearchTextAction(quickSearchText));
12
12
  }
13
13
  clearQuickSearch() {
14
- this.dispatchAction(QuickSearchRedux.QuickSearchRun(''));
14
+ this.dispatchAction(QuickSearchRedux.QuickSearchClear());
15
15
  }
16
16
  gotoNextMatch() {
17
17
  this.getAdaptableApi().agGridApi.findNext();
@@ -11,7 +11,6 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
11
11
  internalApi: UserInterfaceInternalApi;
12
12
  private showProgressIndicatorTimeout;
13
13
  constructor(_adaptable: IAdaptable);
14
- getColorPalette(): string[];
15
14
  getCustomIcons(): CustomIcon[];
16
15
  getStyleClassNames(): string[] | undefined;
17
16
  getEditableCellStyle(): AdaptableStyle | undefined;
@@ -1,8 +1,6 @@
1
1
  import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
2
2
  import { ArrayExtensions } from '../../Utilities/Extensions/ArrayExtensions';
3
3
  import { resolveValueOrFunction } from '../../Utilities/Helpers/ValueOrFunctionHelper';
4
- import { logDeprecation } from '../../Utilities/logDeprecation';
5
- import UIHelper from '../../Utilities/Helpers/UIHelper';
6
4
  import { CUSTOM_WINDOW_FACTORY_ID } from '../../View/Components/Popups/WindowPopups/WindowPopups';
7
5
  import { UserInterfaceInternalApi } from '../Internal/UserInterfaceInternalApi';
8
6
  import { ApiBase } from './ApiBase';
@@ -15,16 +13,6 @@ export class UserInterfaceApiImpl extends ApiBase {
15
13
  super(_adaptable);
16
14
  this.internalApi = new UserInterfaceInternalApi(_adaptable);
17
15
  }
18
- getColorPalette() {
19
- const colorPalette = this.getUserInterfaceOptions().colorPalette;
20
- if (colorPalette != null) {
21
- logDeprecation(this._adaptable.logger, 'UserInterfaceOptions', 'colorPalette', undefined, 'Override `--ab-color-swatch-*`, `--ab-color-palette-*`, and semantic `--ab-color-*` variables in your light or dark theme CSS instead. `colorPalette` will be removed in a future major release.');
22
- if (typeof colorPalette === 'function' || Array.isArray(colorPalette)) {
23
- return resolveValueOrFunction(colorPalette, this.getThemeApi().getCurrentTheme());
24
- }
25
- }
26
- return UIHelper.getDefaultColorPalette();
27
- }
28
16
  getCustomIcons() {
29
17
  return resolveValueOrFunction(this.getUserInterfaceOptions().customIcons) ?? [];
30
18
  }
@@ -42,9 +30,15 @@ export class UserInterfaceApiImpl extends ApiBase {
42
30
  }
43
31
  getAdaptableObjectTags() {
44
32
  const objectTags = this.getUserInterfaceOptions().objectTags;
45
- const resolvedTags = resolveValueOrFunction(objectTags, this.getAdaptableInternalApi().buildBaseContext());
46
- if (resolvedTags && ArrayExtensions.IsNotNullOrEmpty(resolvedTags)) {
47
- return resolvedTags;
33
+ if (typeof objectTags === 'function') {
34
+ const tags = objectTags(this.getAdaptableInternalApi().buildBaseContext());
35
+ if (!Array.isArray(tags)) {
36
+ return;
37
+ }
38
+ return tags.filter((tag) => typeof tag === 'string');
39
+ }
40
+ if (objectTags && ArrayExtensions.IsNotNullOrEmpty(objectTags)) {
41
+ return objectTags;
48
42
  }
49
43
  }
50
44
  getAdaptableObjectsWithTag(tag, adaptableModule) {
@@ -276,9 +276,11 @@ export class AdaptableInternalApi extends ApiBase {
276
276
  return userInterfaceOptions.objectTags;
277
277
  }
278
278
  if (typeof userInterfaceOptions.objectTags === 'function') {
279
- return userInterfaceOptions
280
- .objectTags(this.buildBaseContext())
281
- .filter((tag) => typeof tag === 'string');
279
+ const tags = userInterfaceOptions.objectTags(this.buildBaseContext());
280
+ if (!Array.isArray(tags)) {
281
+ return;
282
+ }
283
+ return tags.filter((tag) => typeof tag === 'string');
282
284
  }
283
285
  }
284
286
  dispatchReduxAction(action) {
@@ -92,14 +92,15 @@ export class StateInternalApi extends ApiBase {
92
92
  rowModelType: this._adaptable.agGridAdapter.getGridOption('rowModelType'),
93
93
  treeData: this._adaptable.agGridAdapter.getGridOption('treeData'),
94
94
  };
95
- const clonedState = state.Internal
96
- ? JSON.parse(JSON.stringify(state))
97
- : getPersistableState(JSON.parse(JSON.stringify(state)));
95
+ const clonedState = getPersistableState(JSON.parse(JSON.stringify(state)));
98
96
  let processedState = this._adaptable.migrateLoadedAdaptableState(clonedState);
99
97
  processedState = this._adaptable.normalizeAdaptableState(processedState, agGridOptions);
98
+ const oldState = this.getAdaptableApi().stateApi.getPersistentState();
100
99
  this.getAdaptableStore().TheStore.dispatch(LoadState(processedState));
101
100
  this.getAdaptableStore().TheStore.dispatch(InitState());
102
101
  this._adaptable.refreshLayout();
102
+ const newState = this.getAdaptableApi().stateApi.getPersistentState();
103
+ this.getEventApi().internalApi.fireAdaptableStateReloadedEvent(oldState, newState);
103
104
  void this.getAdaptableStore()
104
105
  .saveStateNow(this._adaptable)
105
106
  .then(() => resolve())
@@ -8,10 +8,6 @@ import { UserInterfaceState } from '../AdaptableState/UserInterfaceState';
8
8
  * Functions relating to User Interface section of Adaptable State
9
9
  */
10
10
  export interface UserInterfaceApi {
11
- /**
12
- * Retrieves Color Palette currently being used
13
- */
14
- getColorPalette(): string[];
15
11
  /**
16
12
  * Retrieves Custom Icons provided by users
17
13
  */
@@ -14,6 +14,10 @@ export declare const QUICK_SEARCH_DEFAULT_CURRENT_TEXT_MATCH_STYLE: {
14
14
  * @ReduxAction Runs Quick Search
15
15
  */
16
16
  export declare const QUICK_SEARCH_RUN = "QUICK_SEARCH_RUN";
17
+ /**
18
+ * @ReduxAction Clears Quick Search text
19
+ */
20
+ export declare const QUICK_SEARCH_CLEAR = "QUICK_SEARCH_CLEAR";
17
21
  /**
18
22
  * @ReduxAction Sets Quick Search whole-cell style (SSRM / legacy)
19
23
  */
@@ -33,6 +37,8 @@ export declare const QUICK_SEARCH_READY = "QUICK_SEARCH_READY";
33
37
  export interface QuickSearchRunAction extends Redux.Action {
34
38
  quickSearchText: string;
35
39
  }
40
+ export interface QuickSearchClearAction extends Redux.Action {
41
+ }
36
42
  export interface QuickSearchSetMatchingCellStyleAction extends Redux.Action {
37
43
  matchingCellStyle: AdaptableStyle;
38
44
  }
@@ -46,6 +52,9 @@ export interface QuickSearchReadyAction extends Redux.Action {
46
52
  quickSearchState: QuickSearchState;
47
53
  }
48
54
  export declare const QuickSearchRun: (quickSearchText: string) => QuickSearchRunAction;
55
+ export declare const QuickSearchClear: () => QuickSearchClearAction;
56
+ /** Runs Quick Search, or clears it when the text is empty. */
57
+ export declare const QuickSearchTextAction: (quickSearchText: string) => QuickSearchRunAction | QuickSearchClearAction;
49
58
  export declare const QuickSearchSetCellMatchingStyle: (matchingCellStyle: AdaptableStyle) => QuickSearchSetMatchingCellStyleAction;
50
59
  export declare const QuickSearchSetTextMatchingStyle: (textMatchStyle: AdaptableStyle) => QuickSearchSetTextMatchingStyleAction;
51
60
  export declare const QuickSearchSetCurrentTextMatchingStyle: (currentTextMatchStyle: AdaptableStyle) => QuickSearchSetCurrentTextMatchingStyleAction;
@@ -10,6 +10,7 @@ export const QUICK_SEARCH_DEFAULT_CURRENT_TEXT_MATCH_STYLE = {
10
10
  FontWeight: 'Bold',
11
11
  };
12
12
  export const QUICK_SEARCH_RUN = 'QUICK_SEARCH_RUN';
13
+ export const QUICK_SEARCH_CLEAR = 'QUICK_SEARCH_CLEAR';
13
14
  export const QUICK_SEARCH_SET_CELL_MATCHING_STYLE = 'QUICK_SEARCH_SET_CELL_MATCHING_STYLE';
14
15
  export const QUICK_SEARCH_SET_TEXT_MATCHING_STYLE = 'QUICK_SEARCH_SET_TEXT_MATCHING_STYLE';
15
16
  export const QUICK_SEARCH_SET_CURRENT_TEXT_MATCHING_STYLE = 'QUICK_SEARCH_SET_CURRENT_TEXT_MATCHING_STYLE';
@@ -18,6 +19,10 @@ export const QuickSearchRun = (quickSearchText) => ({
18
19
  type: QUICK_SEARCH_RUN,
19
20
  quickSearchText,
20
21
  });
22
+ export const QuickSearchClear = () => ({
23
+ type: QUICK_SEARCH_CLEAR,
24
+ });
25
+ export const QuickSearchTextAction = (quickSearchText) => quickSearchText ? QuickSearchRun(quickSearchText) : QuickSearchClear();
21
26
  export const QuickSearchSetCellMatchingStyle = (matchingCellStyle) => ({
22
27
  type: QUICK_SEARCH_SET_CELL_MATCHING_STYLE,
23
28
  matchingCellStyle: matchingCellStyle,
@@ -43,6 +48,10 @@ export const QuickSearchReducer = (state = initialState, action) => {
43
48
  return Object.assign({}, state, {
44
49
  QuickSearchText: action.quickSearchText,
45
50
  });
51
+ case QUICK_SEARCH_CLEAR:
52
+ return Object.assign({}, state, {
53
+ QuickSearchText: EMPTY_STRING,
54
+ });
46
55
  case QUICK_SEARCH_SET_CELL_MATCHING_STYLE:
47
56
  return Object.assign({}, state, {
48
57
  CellMatchStyle: action.matchingCellStyle,
@@ -720,10 +720,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
720
720
  adaptable.refreshSortIfColumnsSorted();
721
721
  return returnAction;
722
722
  }
723
+ case QuickSearchRedux.QUICK_SEARCH_CLEAR:
723
724
  case QuickSearchRedux.QUICK_SEARCH_RUN: {
724
725
  let returnAction = next(action);
725
- const actionTyped = action;
726
- const searchText = actionTyped.quickSearchText;
726
+ const searchText = action.type === QuickSearchRedux.QUICK_SEARCH_CLEAR
727
+ ? ''
728
+ : action.quickSearchText;
727
729
  adaptable.setAgGridFindSearchValue(searchText);
728
730
  adaptable.api.gridApi.refreshAllCells(true);
729
731
  if (adaptable.adaptableOptions.quickSearchOptions.filterGridAfterQuickSearch) {
@@ -8,15 +8,13 @@ import { AdaptableAlert } from '../../AdaptableState/Common/AdaptableAlert';
8
8
  import { AdaptableMessageType } from '../../AdaptableState/Common/AdaptableMessageType';
9
9
  /** A theme colour token as a CSS value: `themeColorVar('badge')` → `var(--ab-color-badge)`. */
10
10
  export declare function themeColorVar(token: string): string;
11
- /** Generic swatch entries for the Colour Picker (resolved at runtime per active theme). */
12
- export declare function getSwatchColorVar(index: number): string;
13
11
  /** Default colour of a new range in Range Bar, Bullet and Ranges styled columns. */
14
12
  export declare function getDefaultRangeColor(): string;
15
- export declare function getSwatchColorPaletteEntries(): string[];
16
- /** Theme semantic colours for the Colour Picker (resolved at runtime per active theme). */
17
- export declare function getThemeSemanticColorPaletteEntries(): string[];
18
- /** Swatch and theme semantic entries (default Colour Picker set). */
19
- export declare function getDefaultColorPalette(): string[];
13
+ /** Default colours for a new Gradient Zero Centred range (follows the theme). */
14
+ export declare function getDefaultZeroCentredColors(): {
15
+ NegativeColor: string;
16
+ PositiveColor: string;
17
+ };
20
18
  export declare function getEmptyConfigState(): EditableConfigEntityState;
21
19
  export declare function getDescriptionForDataType(dataType: AdaptableColumnDataType): "text" | "number" | "date";
22
20
  export declare function getPlaceholderForDataType(dataType: AdaptableColumnDataType): "Enter Value" | "Enter Number" | "Enter Date";
@@ -44,11 +42,8 @@ export declare function setCSSVariableValue(cssVariable: string, value: string):
44
42
  export declare function isBrowserDocumentAvailable(): boolean;
45
43
  export declare const UIHelper: {
46
44
  themeColorVar: typeof themeColorVar;
47
- getSwatchColorVar: typeof getSwatchColorVar;
48
45
  getDefaultRangeColor: typeof getDefaultRangeColor;
49
- getSwatchColorPaletteEntries: typeof getSwatchColorPaletteEntries;
50
- getThemeSemanticColorPaletteEntries: typeof getThemeSemanticColorPaletteEntries;
51
- getDefaultColorPalette: typeof getDefaultColorPalette;
46
+ getDefaultZeroCentredColors: typeof getDefaultZeroCentredColors;
52
47
  getEmptyConfigState: typeof getEmptyConfigState;
53
48
  getDescriptionForDataType: typeof getDescriptionForDataType;
54
49
  getPlaceholderForDataType: typeof getPlaceholderForDataType;