@adaptabletools/adaptable-cjs 22.0.0-canary.9 → 22.0.0

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 (168) hide show
  1. package/index.css +1157 -1319
  2. package/index.css.map +1 -1
  3. package/index.d.ts +8 -8
  4. package/index.js +8 -8
  5. package/package.json +1 -4
  6. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  7. package/src/AdaptableState/Common/AdaptableColumn.d.ts +3 -3
  8. package/src/AdaptableState/Common/AdaptableForm.d.ts +1 -1
  9. package/src/AdaptableState/Common/AggregationColumns.d.ts +1 -0
  10. package/src/AdaptableState/Common/AggregationColumns.js +2 -1
  11. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +15 -5
  12. package/src/AdaptableState/Common/TransposeConfig.d.ts +4 -9
  13. package/src/AdaptableState/InitialState.d.ts +1 -1
  14. package/src/AdaptableState/UserInterfaceState.d.ts +1 -1
  15. package/src/Api/ColumnApi.d.ts +1 -1
  16. package/src/Api/GridApi.d.ts +4 -0
  17. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  18. package/src/Api/Implementation/ApiBase.js +1 -1
  19. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  20. package/src/Api/Implementation/ColumnApiImpl.js +4 -4
  21. package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
  22. package/src/Api/Implementation/GridApiImpl.js +6 -5
  23. package/src/Api/Implementation/LayoutHelpers.js +1 -1
  24. package/src/Api/Internal/ColumnInternalApi.d.ts +1 -1
  25. package/src/Api/Internal/ColumnInternalApi.js +5 -3
  26. package/src/Api/Internal/EventInternalApi.js +1 -1
  27. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  28. package/src/Redux/Store/AdaptableReduxMerger.js +5 -6
  29. package/src/Strategy/FormatColumnModule.js +2 -2
  30. package/src/Strategy/LayoutModule.js +1 -1
  31. package/src/Strategy/StyledColumnModule.js +14 -6
  32. package/src/Strategy/TeamSharingModule.js +2 -2
  33. package/src/Strategy/Utilities/FormatColumn/{getFormatColumnSettingsTargetItems.d.ts → getFormatColumnRowTargetItems.d.ts} +1 -1
  34. package/src/Strategy/Utilities/FormatColumn/getFormatColumnRowTargetItems.js +26 -0
  35. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +5 -13
  36. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
  37. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +1 -1
  38. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  39. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  40. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  41. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  42. package/src/Utilities/Helpers/FormatHelper.js +2 -2
  43. package/src/Utilities/Hooks/index.d.ts +1 -2
  44. package/src/Utilities/Hooks/index.js +1 -3
  45. package/src/Utilities/Services/LicenseService/index.js +1 -1
  46. package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
  47. package/src/Utilities/Services/RowSummaryService.js +2 -2
  48. package/src/Utilities/getScopeViewItems.js +1 -1
  49. package/src/Utilities/only.d.ts +15 -0
  50. package/src/Utilities/only.js +58 -0
  51. package/src/Utilities/utils/chunk.d.ts +6 -0
  52. package/src/Utilities/utils/chunk.js +20 -0
  53. package/src/Utilities/utils/clamp.d.ts +5 -0
  54. package/src/Utilities/utils/clamp.js +10 -0
  55. package/src/Utilities/utils/cloneDeepWith.d.ts +9 -0
  56. package/src/Utilities/utils/cloneDeepWith.js +70 -0
  57. package/src/Utilities/utils/debounce.d.ts +20 -0
  58. package/src/Utilities/utils/debounce.js +124 -0
  59. package/src/Utilities/utils/flatten.d.ts +5 -0
  60. package/src/Utilities/utils/flatten.js +10 -0
  61. package/src/Utilities/utils/flattenDeep.d.ts +5 -0
  62. package/src/Utilities/utils/flattenDeep.js +10 -0
  63. package/src/Utilities/utils/get.d.ts +6 -0
  64. package/src/Utilities/utils/get.js +38 -0
  65. package/src/Utilities/utils/index.d.ts +22 -0
  66. package/src/Utilities/utils/index.js +48 -0
  67. package/src/Utilities/utils/isArray.d.ts +6 -0
  68. package/src/Utilities/utils/isArray.js +8 -0
  69. package/src/Utilities/utils/isEqual.d.ts +5 -0
  70. package/src/Utilities/utils/isEqual.js +127 -0
  71. package/src/Utilities/utils/isObject.d.ts +6 -0
  72. package/src/Utilities/utils/isObject.js +12 -0
  73. package/src/Utilities/utils/isPlainObject.d.ts +6 -0
  74. package/src/Utilities/utils/isPlainObject.js +20 -0
  75. package/src/Utilities/utils/kebabCase.d.ts +5 -0
  76. package/src/Utilities/utils/kebabCase.js +12 -0
  77. package/src/Utilities/utils/merge.d.ts +11 -0
  78. package/src/Utilities/utils/merge.js +44 -0
  79. package/src/Utilities/utils/mergeWith.d.ts +7 -0
  80. package/src/Utilities/utils/mergeWith.js +50 -0
  81. package/src/Utilities/utils/orderBy.d.ts +8 -0
  82. package/src/Utilities/utils/orderBy.js +33 -0
  83. package/src/Utilities/utils/parseInt.d.ts +6 -0
  84. package/src/Utilities/utils/parseInt.js +12 -0
  85. package/src/Utilities/utils/sentenceCase.d.ts +6 -0
  86. package/src/Utilities/utils/sentenceCase.js +19 -0
  87. package/src/Utilities/utils/startCase.d.ts +5 -0
  88. package/src/Utilities/utils/startCase.js +15 -0
  89. package/src/Utilities/utils/throttle.d.ts +17 -0
  90. package/src/Utilities/utils/throttle.js +23 -0
  91. package/src/Utilities/utils/toNumber.d.ts +5 -0
  92. package/src/Utilities/utils/toNumber.js +42 -0
  93. package/src/Utilities/utils/uniq.d.ts +7 -0
  94. package/src/Utilities/utils/uniq.js +12 -0
  95. package/src/Utilities/utils/uniqBy.d.ts +8 -0
  96. package/src/Utilities/utils/uniqBy.js +25 -0
  97. package/src/Utilities/utils/words.d.ts +7 -0
  98. package/src/Utilities/utils/words.js +13 -0
  99. package/src/Utilities/weightedAverage.js +1 -1
  100. package/src/View/AdaptableComputedCSSVarsContext.js +1 -1
  101. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  102. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
  103. package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
  104. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  105. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
  106. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
  107. package/src/View/Components/RangesComponent.js +1 -1
  108. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  109. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  110. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  111. package/src/View/Components/ValueSelector/index.js +7 -2
  112. package/src/View/Dashboard/CustomDashboardButton.js +1 -1
  113. package/src/View/Dashboard/Dashboard.js +1 -1
  114. package/src/View/Dashboard/DashboardPopup.js +4 -3
  115. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  116. package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
  117. package/src/View/Export/Wizard/NewReportWizard.js +8 -8
  118. package/src/View/Filter/FilterViewPanel.d.ts +1 -1
  119. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +19 -10
  120. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  121. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  122. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.d.ts +8 -0
  123. package/src/View/FormatColumn/Wizard/FormatColumnRowScopeWizardSection.js +86 -0
  124. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +22 -61
  125. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -10
  126. package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
  127. package/src/View/Layout/LayoutViewPanel.js +1 -1
  128. package/src/View/Layout/TransposedPopup.js +0 -1
  129. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  130. package/src/View/Note/NoteEditor.js +1 -1
  131. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  132. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  133. package/src/View/StyledColumn/Wizard/StyledColumnBadgeRowsSection.d.ts +8 -0
  134. package/src/View/StyledColumn/Wizard/{StyledColumnWizardSettingsSection.js → StyledColumnBadgeRowsSection.js} +22 -22
  135. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +10 -11
  136. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
  137. package/src/View/Theme/ThemeEditor.js +1 -1
  138. package/src/View/Theme/ThemeField.js +1 -1
  139. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  140. package/src/View/Wizard/OnePageWizards.js +1 -1
  141. package/src/agGrid/AdaptableAgGrid.js +25 -6
  142. package/src/agGrid/AgGridAdapter.js +4 -4
  143. package/src/agGrid/AgGridColumnAdapter.js +11 -4
  144. package/src/agGrid/AgGridExportAdapter.d.ts +2 -2
  145. package/src/agGrid/AgGridExportAdapter.js +7 -6
  146. package/src/agGrid/cellRenderers/PercentBarRenderer.js +17 -5
  147. package/src/components/ColorPicker/ColorPicker.js +1 -1
  148. package/src/components/DropdownButton/renderItem.js +1 -1
  149. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -1
  150. package/src/components/FormLayout/index.js +1 -1
  151. package/src/components/OverlayTrigger/index.js +1 -1
  152. package/src/components/Select/Select.js +4 -0
  153. package/src/env.js +2 -2
  154. package/src/layout-manager/src/isLayoutEqual.js +1 -1
  155. package/src/metamodel/adaptable.metamodel.d.ts +12 -1
  156. package/src/metamodel/adaptable.metamodel.js +1 -1
  157. package/src/migration/VersionUpgrade22.js +9 -0
  158. package/themes/dark.css +2 -3
  159. package/themes/light.css +1 -1
  160. package/tsconfig.cjs.tsbuildinfo +1 -1
  161. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +0 -16
  162. package/src/Utilities/Hooks/useAdaptableState.d.ts +0 -3
  163. package/src/Utilities/Hooks/useAdaptableState.js +0 -42
  164. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +0 -8
  165. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +0 -37
  166. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +0 -8
  167. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.d.ts → FormatColumnColumnScopeWizardSection.d.ts} +0 -0
  168. /package/src/View/FormatColumn/Wizard/{FormatColumnScopeWizardSection.js → FormatColumnColumnScopeWizardSection.js} +0 -0
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * Recursively merges own enumerable string keyed properties of source objects into
4
+ * the destination object. Source properties that resolve to undefined are skipped if
5
+ * a destination value exists. Array and plain object properties are merged recursively.
6
+ * Other objects and value types are overridden by assignment.
7
+ * Drop-in replacement for lodash/merge.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.default = merge;
11
+ const tslib_1 = require("tslib");
12
+ const isPlainObject_1 = tslib_1.__importDefault(require("./isPlainObject"));
13
+ function baseMerge(target, source) {
14
+ if (source == null) {
15
+ return target;
16
+ }
17
+ const keys = Object.keys(source);
18
+ for (const key of keys) {
19
+ const srcValue = source[key];
20
+ const tgtValue = target[key];
21
+ if (Array.isArray(srcValue)) {
22
+ if (!Array.isArray(tgtValue)) {
23
+ target[key] = [];
24
+ }
25
+ baseMerge(target[key], srcValue);
26
+ }
27
+ else if ((0, isPlainObject_1.default)(srcValue)) {
28
+ if (!(0, isPlainObject_1.default)(tgtValue)) {
29
+ target[key] = {};
30
+ }
31
+ baseMerge(target[key], srcValue);
32
+ }
33
+ else if (srcValue !== undefined) {
34
+ target[key] = srcValue;
35
+ }
36
+ }
37
+ return target;
38
+ }
39
+ function merge(target, ...sources) {
40
+ for (const source of sources) {
41
+ baseMerge(target, source);
42
+ }
43
+ return target;
44
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This method is like `merge` except that it accepts customizer which is
3
+ * invoked to produce the merged values of the destination and source properties.
4
+ * If customizer returns undefined, merging is handled by the method instead.
5
+ * Drop-in replacement for lodash/mergeWith.
6
+ */
7
+ export default function mergeWith<T extends object>(target: T, ...args: any[]): T;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /**
3
+ * This method is like `merge` except that it accepts customizer which is
4
+ * invoked to produce the merged values of the destination and source properties.
5
+ * If customizer returns undefined, merging is handled by the method instead.
6
+ * Drop-in replacement for lodash/mergeWith.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = mergeWith;
10
+ const tslib_1 = require("tslib");
11
+ const isPlainObject_1 = tslib_1.__importDefault(require("./isPlainObject"));
12
+ function baseMergeWith(target, source, customizer) {
13
+ if (source == null) {
14
+ return target;
15
+ }
16
+ const keys = Object.keys(source);
17
+ for (const key of keys) {
18
+ const srcValue = source[key];
19
+ const tgtValue = target[key];
20
+ const customResult = customizer(tgtValue, srcValue, key, target, source);
21
+ if (customResult !== undefined) {
22
+ target[key] = customResult;
23
+ }
24
+ else if (Array.isArray(srcValue)) {
25
+ if (!Array.isArray(tgtValue)) {
26
+ target[key] = [];
27
+ }
28
+ baseMergeWith(target[key], srcValue, customizer);
29
+ }
30
+ else if ((0, isPlainObject_1.default)(srcValue)) {
31
+ if (!(0, isPlainObject_1.default)(tgtValue)) {
32
+ target[key] = {};
33
+ }
34
+ baseMergeWith(target[key], srcValue, customizer);
35
+ }
36
+ else if (srcValue !== undefined) {
37
+ target[key] = srcValue;
38
+ }
39
+ }
40
+ return target;
41
+ }
42
+ function mergeWith(target, ...args) {
43
+ // The last argument is the customizer function
44
+ const customizer = args[args.length - 1];
45
+ const sources = args.slice(0, -1);
46
+ for (const source of sources) {
47
+ baseMergeWith(target, source, customizer);
48
+ }
49
+ return target;
50
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This method is like `sortBy` except that it allows specifying the sort
3
+ * orders of the iteratees to sort by. If orders is unspecified, all values
4
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
5
+ * descending or "asc" for ascending sort order of corresponding values.
6
+ * Drop-in replacement for lodash/orderBy.
7
+ */
8
+ export default function orderBy<T>(collection: T[], iteratees: ((item: T) => any)[] | string[], orders?: ('asc' | 'desc')[]): T[];
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = orderBy;
4
+ /**
5
+ * This method is like `sortBy` except that it allows specifying the sort
6
+ * orders of the iteratees to sort by. If orders is unspecified, all values
7
+ * are sorted in ascending order. Otherwise, specify an order of "desc" for
8
+ * descending or "asc" for ascending sort order of corresponding values.
9
+ * Drop-in replacement for lodash/orderBy.
10
+ */
11
+ function orderBy(collection, iteratees, orders) {
12
+ const result = [...collection];
13
+ const fns = iteratees.map((iteratee) => typeof iteratee === 'function' ? iteratee : (item) => item?.[iteratee]);
14
+ result.sort((a, b) => {
15
+ for (let i = 0; i < fns.length; i++) {
16
+ const valA = fns[i](a);
17
+ const valB = fns[i](b);
18
+ if (valA !== valB) {
19
+ const order = orders?.[i] === 'desc' ? -1 : 1;
20
+ if (valA == null)
21
+ return 1;
22
+ if (valB == null)
23
+ return -1;
24
+ if (valA < valB)
25
+ return -order;
26
+ if (valA > valB)
27
+ return order;
28
+ }
29
+ }
30
+ return 0;
31
+ });
32
+ return result;
33
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Converts string to an integer of the specified radix.
3
+ * If radix is undefined or 0, a radix of 10 is used (unlike native parseInt which auto-detects).
4
+ * Drop-in replacement for lodash/parseInt.
5
+ */
6
+ export default function parseIntFn(string: string, radix?: number): number;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = parseIntFn;
4
+ /**
5
+ * Converts string to an integer of the specified radix.
6
+ * If radix is undefined or 0, a radix of 10 is used (unlike native parseInt which auto-detects).
7
+ * Drop-in replacement for lodash/parseInt.
8
+ */
9
+ function parseIntFn(string, radix) {
10
+ const str = typeof string === 'string' ? string.trim() : String(string);
11
+ return globalThis.parseInt(str, radix || 10);
12
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Converts string to Sentence case.
3
+ * Splits on camelCase, PascalCase, dots, underscores, hyphens, and non-alphanumeric characters.
4
+ * Drop-in replacement for the sentence-case package.
5
+ */
6
+ export default function sentenceCase(input: string): string;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /**
3
+ * Converts string to Sentence case.
4
+ * Splits on camelCase, PascalCase, dots, underscores, hyphens, and non-alphanumeric characters.
5
+ * Drop-in replacement for the sentence-case package.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.default = sentenceCase;
9
+ const tslib_1 = require("tslib");
10
+ const words_1 = tslib_1.__importDefault(require("./words"));
11
+ function sentenceCase(input) {
12
+ const parts = (0, words_1.default)(input);
13
+ if (parts.length === 0) {
14
+ return '';
15
+ }
16
+ return parts
17
+ .map((w, i) => (i === 0 ? w.charAt(0).toUpperCase() + w.slice(1).toLowerCase() : w.toLowerCase()))
18
+ .join(' ');
19
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Converts string to Start Case.
3
+ * Drop-in replacement for lodash/startCase.
4
+ */
5
+ export default function startCase(string: string): string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * Converts string to Start Case.
4
+ * Drop-in replacement for lodash/startCase.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = startCase;
8
+ const tslib_1 = require("tslib");
9
+ const words_1 = tslib_1.__importDefault(require("./words"));
10
+ function capitalize(word) {
11
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
12
+ }
13
+ function startCase(string) {
14
+ return (0, words_1.default)(string).map(capitalize).join(' ');
15
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Creates a throttled function that only invokes func at most once per
3
+ * every wait milliseconds. The throttled function comes with a cancel
4
+ * method to cancel delayed func invocations and a flush method to
5
+ * immediately invoke them.
6
+ *
7
+ * Supports options: { leading, trailing }
8
+ * Drop-in replacement for lodash/throttle.
9
+ *
10
+ * Implemented using debounce with maxWait (same approach as lodash).
11
+ */
12
+ import { DebouncedFunction } from './debounce';
13
+ export interface ThrottleOptions {
14
+ leading?: boolean;
15
+ trailing?: boolean;
16
+ }
17
+ export default function throttle<T extends (...args: any[]) => any>(func: T, wait?: number, options?: ThrottleOptions): DebouncedFunction<T>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * Creates a throttled function that only invokes func at most once per
4
+ * every wait milliseconds. The throttled function comes with a cancel
5
+ * method to cancel delayed func invocations and a flush method to
6
+ * immediately invoke them.
7
+ *
8
+ * Supports options: { leading, trailing }
9
+ * Drop-in replacement for lodash/throttle.
10
+ *
11
+ * Implemented using debounce with maxWait (same approach as lodash).
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.default = throttle;
15
+ const tslib_1 = require("tslib");
16
+ const debounce_1 = tslib_1.__importDefault(require("./debounce"));
17
+ function throttle(func, wait = 0, options) {
18
+ return (0, debounce_1.default)(func, wait, {
19
+ leading: options?.leading ?? true,
20
+ trailing: options?.trailing ?? true,
21
+ maxWait: wait,
22
+ });
23
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Converts value to a number.
3
+ * Drop-in replacement for lodash/toNumber.
4
+ */
5
+ export default function toNumber(value: any): number;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * Converts value to a number.
4
+ * Drop-in replacement for lodash/toNumber.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.default = toNumber;
8
+ const reTrimStart = /^\s+/;
9
+ const reTrimEnd = /\s+$/;
10
+ const reIsBinary = /^0b[01]+$/i;
11
+ const reIsOctal = /^0o[0-7]+$/i;
12
+ const reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
13
+ function toNumber(value) {
14
+ if (typeof value === 'number') {
15
+ return value;
16
+ }
17
+ if (typeof value === 'symbol') {
18
+ return NaN;
19
+ }
20
+ if (typeof value === 'boolean') {
21
+ return value ? 1 : 0;
22
+ }
23
+ if (value == null) {
24
+ return value === undefined ? NaN : 0;
25
+ }
26
+ if (typeof value === 'string') {
27
+ const trimmed = value.replace(reTrimStart, '').replace(reTrimEnd, '');
28
+ if (reIsBinary.test(trimmed)) {
29
+ return globalThis.parseInt(trimmed.slice(2), 2);
30
+ }
31
+ if (reIsOctal.test(trimmed)) {
32
+ return globalThis.parseInt(trimmed.slice(2), 8);
33
+ }
34
+ if (reIsBadHex.test(trimmed)) {
35
+ return NaN;
36
+ }
37
+ return +trimmed;
38
+ }
39
+ // Objects: try valueOf
40
+ const other = typeof value.valueOf === 'function' ? value.valueOf() : value;
41
+ return +other;
42
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Creates a duplicate-free version of an array, using SameValueZero for equality comparisons,
3
+ * in which only the first occurrence of each element is kept. The order of result values is
4
+ * determined by the order they occur in the array.
5
+ * Drop-in replacement for lodash/uniq.
6
+ */
7
+ export default function uniq<T>(array: T[]): T[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = uniq;
4
+ /**
5
+ * Creates a duplicate-free version of an array, using SameValueZero for equality comparisons,
6
+ * in which only the first occurrence of each element is kept. The order of result values is
7
+ * determined by the order they occur in the array.
8
+ * Drop-in replacement for lodash/uniq.
9
+ */
10
+ function uniq(array) {
11
+ return [...new Set(array)];
12
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This method is like `uniq` except that it accepts iteratee which is
3
+ * invoked for each element in array to generate the criterion by which
4
+ * uniqueness is computed. The order of result values is determined by the
5
+ * order they occur in the array. The iteratee is invoked with one argument: (value).
6
+ * Drop-in replacement for lodash/uniqBy.
7
+ */
8
+ export default function uniqBy<T>(array: T[], iteratee: ((value: T) => any) | string): T[];
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = uniqBy;
4
+ /**
5
+ * This method is like `uniq` except that it accepts iteratee which is
6
+ * invoked for each element in array to generate the criterion by which
7
+ * uniqueness is computed. The order of result values is determined by the
8
+ * order they occur in the array. The iteratee is invoked with one argument: (value).
9
+ * Drop-in replacement for lodash/uniqBy.
10
+ */
11
+ function uniqBy(array, iteratee) {
12
+ const seen = new Set();
13
+ const result = [];
14
+ const fn = typeof iteratee === 'function'
15
+ ? iteratee
16
+ : (value) => value?.[iteratee];
17
+ for (const item of array) {
18
+ const key = fn(item);
19
+ if (!seen.has(key)) {
20
+ seen.add(key);
21
+ result.push(item);
22
+ }
23
+ }
24
+ return result;
25
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Split a string into words: handles camelCase, PascalCase, UPPER_CASE,
3
+ * UPPER_SNAKE_CASE, snake_case, kebab-case, spaces, and dot.notation.
4
+ *
5
+ * Shared helper used by kebabCase, startCase, and sentenceCase.
6
+ */
7
+ export default function words(str: string): string[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = words;
4
+ /**
5
+ * Split a string into words: handles camelCase, PascalCase, UPPER_CASE,
6
+ * UPPER_SNAKE_CASE, snake_case, kebab-case, spaces, and dot.notation.
7
+ *
8
+ * Shared helper used by kebabCase, startCase, and sentenceCase.
9
+ */
10
+ function words(str) {
11
+ const matches = str.match(/[A-Z]?[a-z]+|[A-Z]+(?=[A-Z][a-z]|\d|$|[^a-zA-Z0-9])|[A-Z]|[0-9]+/g);
12
+ return matches || [];
13
+ }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.weightedAverage = exports.getNumericValue = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const toNumber_1 = tslib_1.__importDefault(require("lodash/toNumber"));
5
+ const toNumber_1 = tslib_1.__importDefault(require("./utils/toNumber"));
6
6
  const getNumericValue = (input) => {
7
7
  if (typeof input === 'number') {
8
8
  return input;
@@ -4,7 +4,7 @@ exports.useAdaptableComputedCSSVar = exports.useAdaptableComputedCSSVars = expor
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const CSSNumericVariableWatch_1 = require("../components/Select/CSSNumericVariableWatch");
7
- const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
7
+ const debounce_1 = tslib_1.__importDefault(require("../Utilities/utils/debounce"));
8
8
  const react_1 = require("react");
9
9
  const computedCSSVarNames = [
10
10
  '--ab-cmp-select-menu__max-width',
@@ -11,7 +11,7 @@ const react_1 = require("react");
11
11
  const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
12
12
  const InfiniteTable_1 = require("../../../components/InfiniteTable");
13
13
  const Flex_1 = require("../../../components/Flex");
14
- const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
14
+ const throttle_1 = tslib_1.__importDefault(require("../../../Utilities/utils/throttle"));
15
15
  const twMerge_1 = require("../../../twMerge");
16
16
  const dataTypes = [
17
17
  {
@@ -12,7 +12,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/E
12
12
  const AdaptableIconSelector_1 = require("../../Components/AdaptableIconSelector");
13
13
  const Select_1 = require("../../../components/Select");
14
14
  const Flex_1 = require("../../../components/Flex");
15
- const sentence_case_1 = require("sentence-case");
15
+ const sentenceCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/sentenceCase"));
16
16
  function renderCommand(command) {
17
17
  switch (command) {
18
18
  case 'highlight-cell':
@@ -225,7 +225,7 @@ const AlertButtonsEditor = (props) => {
225
225
  buttonCommands.map((commandName) => {
226
226
  return (React.createElement(CheckBox_1.CheckBox, { key: commandName, className: "twa:mr-3", onChange: (checked) => handleCommandChange(checked, commandName), checked: button.Command === commandName ||
227
227
  (Array.isArray(button.Command) && button.Command.includes(commandName)) },
228
- React.createElement(Flex_1.Box, { className: "twa:text-2" }, (0, sentence_case_1.sentenceCase)(commandName))));
228
+ React.createElement(Flex_1.Box, { className: "twa:text-2" }, (0, sentenceCase_1.default)(commandName))));
229
229
  }),
230
230
  btnUserFunctions.length ? (React.createElement(CheckBox_1.CheckBox, { checked: true, disabled: true },
231
231
  React.createElement(Flex_1.Box, { className: "twa:text-2" },
@@ -4,7 +4,7 @@ exports.PreviewChartSection = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
- const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
7
+ const isEqual_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/isEqual"));
8
8
  const InternalRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/InternalRedux"));
9
9
  const AdaptableContext_1 = require("../../../AdaptableContext");
10
10
  const PreviewChartSection = (props) => {
@@ -8,7 +8,7 @@ const AdaptableInput_1 = tslib_1.__importDefault(require("../../AdaptableInput")
8
8
  const AdaptableDateInlineInput_1 = require("../../AdaptableInput/AdaptableDateInlineInput");
9
9
  const PermittedValuesSelector_1 = require("../../Selectors/PermittedValuesSelector");
10
10
  const AdaptableContext_1 = require("../../../AdaptableContext");
11
- const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
11
+ const debounce_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/debounce"));
12
12
  const react_1 = require("react");
13
13
  function debounceOrImmediate(fn, time) {
14
14
  return time && time > 0 ? (0, debounce_1.default)(fn, time) : fn;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ColumnFilterInputList = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const lodash_1 = require("lodash");
5
+ const debounce_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/debounce"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const utils_1 = require("../../../../components/ExpressionEditor/QueryBuilder/utils");
8
8
  const Panel_1 = tslib_1.__importDefault(require("../../../../components/Panel"));
@@ -21,7 +21,7 @@ const ColumnFilterInputList = (props) => {
21
21
  const matchingInputs = predicateDef
22
22
  ? (0, utils_1.getOperatorMatchingInputs)(fnTypeInput, predicateDef?.inputs, true)
23
23
  : [];
24
- const debouncedPredicateChange = React.useCallback((0, lodash_1.debounce)((predicate) => {
24
+ const debouncedPredicateChange = React.useCallback((0, debounce_1.default)((predicate) => {
25
25
  props.onPredicateChange(predicate);
26
26
  }, 300), [props.predicate, props.columnId]);
27
27
  if (['date[]', 'number[]', 'text[]'].includes(matchingInputs[0])) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FloatingFilterInputList = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const lodash_1 = require("lodash");
5
+ const debounce_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/debounce"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const utils_1 = require("../../../../components/ExpressionEditor/QueryBuilder/utils");
8
8
  const adaptableQlUtils_1 = require("../../../../Utilities/adaptableQlUtils");
@@ -20,7 +20,7 @@ const FloatingFilterInputList = (props) => {
20
20
  const matchingInputs = predicateDef
21
21
  ? (0, utils_1.getOperatorMatchingInputs)(fnTypeInput, predicateDef?.inputs, true)
22
22
  : [];
23
- const debouncedPredicateChange = React.useCallback((0, lodash_1.debounce)((predicate) => {
23
+ const debouncedPredicateChange = React.useCallback((0, debounce_1.default)((predicate) => {
24
24
  props.onPredicateChange(predicate);
25
25
  }, 300), [props.predicate, props.columnId]);
26
26
  if (['date[]', 'number[]', 'text[]'].includes(matchingInputs[0])) {
@@ -4,7 +4,7 @@ exports.RangesComponent = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const ColorPicker_1 = require("../../components/ColorPicker");
7
- const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
7
+ const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
8
8
  const CheckBox_1 = require("../../components/CheckBox");
9
9
  const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
10
10
  const NumberInput_1 = require("../../components/Input/NumberInput");
@@ -102,6 +102,6 @@ const PermittedValuesSelector = function (props) {
102
102
  reload();
103
103
  }
104
104
  };
105
- return (React.createElement(Select_1.Select, { "aria-label": "Permitted Values Selector", searchable: props.searchable, size: props.size, isMulti: props.isMulti, className: props.className, disabled: props.disabled, closeMenuOnSelect: !props.isMulti, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, onMenuOpen: reload, options: options, isLoading: isLoading, onInputChange: onInputChange, onChange: handleOnChange, onFocus: props.onFocus, onBlur: props.onBlur, value: props.value }));
105
+ return (React.createElement(Select_1.Select, { "aria-label": "Permitted Values Selector", searchable: props.searchable ?? 'menulist', size: props.size, isMulti: props.isMulti, className: props.className, disabled: props.disabled, closeMenuOnSelect: !props.isMulti, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, onMenuOpen: reload, options: options, isLoading: isLoading, onInputChange: onInputChange, onChange: handleOnChange, onFocus: props.onFocus, onBlur: props.onBlur, value: props.value }));
106
106
  };
107
107
  exports.PermittedValuesSelector = PermittedValuesSelector;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAdaptableToolPanelAgGridComponent = exports.ConnectedAdaptableToolPanel = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
6
+ const kebabCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/kebabCase"));
7
7
  const ToolPanelRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ToolPanelRedux"));
8
8
  const react_redux_1 = require("react-redux");
9
9
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
@@ -7,7 +7,7 @@ const react_1 = require("react");
7
7
  const AdaptableContext_1 = require("../../AdaptableContext");
8
8
  const uuid_1 = require("../../../components/utils/uuid");
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
10
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
10
+ const kebabCase_1 = tslib_1.__importDefault(require("../../../Utilities/utils/kebabCase"));
11
11
  const CustomToolPanelContent = (props) => {
12
12
  const { customToolPanel } = props;
13
13
  const { api } = (0, AdaptableContext_1.useAdaptable)();
@@ -164,7 +164,12 @@ const renderSelectionSection = (props) => {
164
164
  const { value, options, disabled, singleSelect, toLabel, toIdentifier, } = props;
165
165
  const selectionBox = (React.createElement(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2 twa:py-2" },
166
166
  React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('twa:flex twa:flex-row', 'twa:border-b twa:border-primarydark/30 twa:rounded-standard') },
167
- React.createElement(CheckBox_1.CheckBox, { className: "twa:ml-0.5 twa:font-bold", checked: !value.length ? false : value.length === options.length ? true : null, onChange: (checked) => {
167
+ singleSelect ? (React.createElement(Flex_1.Box, { className: "twa:flex twa:flex-row twa:text-3 twa:font-normal" },
168
+ "(",
169
+ value.length,
170
+ " of ",
171
+ options.length,
172
+ " selected)")) : (React.createElement(CheckBox_1.CheckBox, { className: "twa:ml-0.5 twa:font-bold", checked: !value.length ? false : value.length === options.length ? true : null, onChange: (checked) => {
168
173
  if (checked) {
169
174
  props.onSelectAll();
170
175
  }
@@ -179,7 +184,7 @@ const renderSelectionSection = (props) => {
179
184
  value.length,
180
185
  " of ",
181
186
  options.length,
182
- " selected)"))),
187
+ " selected)")))),
183
188
  React.createElement("div", { className: "twa:flex-1" }),
184
189
  React.createElement(Flex_1.Box, { className: "twa:mr-2 twa:text-2 twa:font-normal" }, props.showOnlySelectedCheckbox))));
185
190
  return React.createElement(Flex_1.Box, { className: (0, clsx_1.default)(`${baseClassName}__header `) }, selectionBox);
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_1 = require("react");
7
7
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
8
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
8
+ const kebabCase_1 = tslib_1.__importDefault(require("../../Utilities/utils/kebabCase"));
9
9
  const CustomDashboardButton = (props) => {
10
10
  const { button } = props;
11
11
  const [componentRevision, setComponentRevision] = (0, react_1.useState)(1);
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Dashboard = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
5
+ const kebabCase_1 = tslib_1.__importDefault(require("../../Utilities/utils/kebabCase"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const react_redux_1 = require("react-redux");
8
8
  const Dashboard_1 = require("../../components/Dashboard");
@@ -75,9 +75,10 @@ class DashboardPopupComponent extends React.Component {
75
75
  React.createElement(Card_1.Card, null,
76
76
  React.createElement(Card_1.Card.Title, { gap: 8 }, "Display Settings"),
77
77
  React.createElement(Card_1.Card.Body, { gap: 2, className: "twa:p-2" },
78
- React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible'),
79
- this.props.DashboardState.Tabs?.length > 0 ? (React.createElement(ToggleButton_1.ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded')) : null,
80
- this.props.api.optionsApi.getDashboardOptions().canFloat ? (React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (pinned) => this.props.onSetDashboardFloating(!pinned), checked: !this.props.IsFloating, "data-name": "floating" }, this.props.IsFloating ? 'Floating' : 'Pinned')) : null)))),
78
+ React.createElement("div", { className: "twa:flex twa:flex-row twa:items-center twa:justify-start twa:gap-3" },
79
+ React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible'),
80
+ this.props.DashboardState.Tabs?.length > 0 ? (React.createElement(ToggleButton_1.ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded')) : null,
81
+ this.props.api.optionsApi.getDashboardOptions().canFloat ? (React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (pinned) => this.props.onSetDashboardFloating(!pinned), checked: !this.props.IsFloating, "data-name": "floating" }, this.props.IsFloating ? 'Floating' : 'Pinned')) : null))))),
81
82
  React.createElement(Card_1.Card, { className: "twa:flex-1 twa:overflow-hidden", gap: 0 },
82
83
  React.createElement(Card_1.Card.Title, null, "Contents"),
83
84
  React.createElement(Card_1.Card.Body, { className: "twa:p-2" },
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataPreview = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
5
+ const flatten_1 = tslib_1.__importDefault(require("../../../../Utilities/utils/flatten"));
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
8
8
  const icons_1 = require("../../../../components/icons");