@adaptabletools/adaptable 15.3.3 → 15.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "15.3.3",
3
+ "version": "15.3.4",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1686306171405;
1
+ declare const _default: 1686481266992;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1686306171405;
3
+ exports.default = 1686481266992;
@@ -104,7 +104,7 @@ export interface ActionRowButtonOptions<TData = any> {
104
104
  * Optional configuration that merges with built-in action row button and overrides default configuration
105
105
  * @defaultValue undefined
106
106
  */
107
- customConfiguration?: (context: ActionRowButtonConfigurationContext) => Partial<AdaptableButton<ActionColumnContext<TData>>>;
107
+ customConfiguration?: (context: ActionRowButtonConfigurationContext) => Partial<AdaptableButton<ActionColumnContext<TData>>> | undefined;
108
108
  /**
109
109
  * Action Row Buttons position: 'pinnedLeft' | 'pinnedRight
110
110
  * @defaultValue 'pinnedLeft'
@@ -126,9 +126,9 @@ export interface ActionRowButtonOptions<TData = any> {
126
126
  */
127
127
  actionRowFormOptions?: ActionRowFormOptions<TData>;
128
128
  /**
129
- * Prevents direct editing in Grid cells even for editable columns
130
- * @defaultValue false
131
- */
129
+ * Prevents direct editing in Grid cells even for editable columns
130
+ * @defaultValue false
131
+ */
132
132
  disableInlineEditing?: boolean;
133
133
  }
134
134
  /**
@@ -1,4 +1,4 @@
1
- import { AdaptablePredicateDef, AdaptableScope, BaseContext, PredicateModuleScope, SystemAlertPredicateIds, SystemFilterPredicateIds, SystemFlashingCellPredicateIds, SystemFormatColumnPredicateIds } from '../types';
1
+ import { AdaptablePredicateDef, AdaptableScope, BaseContext, PredicateModuleScope, SystemAlertPredicateIds, SystemBadgeStylePredicateIds, SystemFilterPredicateIds, SystemFlashingCellPredicateIds, SystemFormatColumnPredicateIds } from '../types';
2
2
  /**
3
3
  * Options for managing Adaptable Predicates using AdaptableQL
4
4
  */
@@ -7,6 +7,10 @@ export interface PredicateOptions {
7
7
  * Which System Filter Predicates are available
8
8
  */
9
9
  systemFilterPredicates?: SystemFilterPredicateIds | ((context: SystemPredicatesContext) => SystemFilterPredicateIds);
10
+ /**
11
+ * Which System Badge Style Predicates are available
12
+ */
13
+ systemBadgeStylePredicates?: SystemBadgeStylePredicateIds | ((context: SystemPredicatesContext) => SystemBadgeStylePredicateIds);
10
14
  /**
11
15
  * Which System Alert Predicates are available
12
16
  */
@@ -32,5 +32,4 @@ export declare class StyledColumnApiImpl extends ApiBase implements StyledColumn
32
32
  suspendStyledColumn(styledColumn: StyledColumn): void;
33
33
  unSuspendStyledColumn(styledColumn: StyledColumn): void;
34
34
  openStyledColumnSettingsPanel(): void;
35
- getBadgePredicateDefsForColumn(columnId: string): import("../../types").AdaptablePredicateDef[];
36
35
  }
@@ -111,17 +111,5 @@ class StyledColumnApiImpl extends ApiBase_1.ApiBase {
111
111
  openStyledColumnSettingsPanel() {
112
112
  this.showModulePopup(ModuleConstants.StyledColumnModuleId);
113
113
  }
114
- getBadgePredicateDefsForColumn(columnId) {
115
- const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
116
- if (!column) {
117
- return undefined;
118
- }
119
- const scope = {
120
- ColumnIds: [column.columnId],
121
- };
122
- return this.getAdaptableApi()
123
- .predicateApi.internalApi.getFilterPredicateDefs(scope)
124
- .filter((predicate) => this.adaptable.api.scopeApi.isColumnInScope(column, predicate.columnScope));
125
- }
126
114
  }
127
115
  exports.StyledColumnApiImpl = StyledColumnApiImpl;
@@ -20,6 +20,7 @@ export declare class PredicateInternalApi extends ApiBase {
20
20
  */
21
21
  getAlertPredicateDefs(scope: AdaptableScope): AdaptablePredicateDef[];
22
22
  private getSystemAlertPredicateIds;
23
+ private getSystemBadgeStylePredicateIds;
23
24
  /**
24
25
  * Get all Format Column Predicate Definitions - System and Custom
25
26
  */
@@ -35,4 +36,8 @@ export declare class PredicateInternalApi extends ApiBase {
35
36
  * @param dataType DataType of Column
36
37
  */
37
38
  getEqualityPredicateForDataType(dataType: AdaptableColumnDataType): SystemFilterPredicateId;
39
+ /**
40
+ * Get all Badge Style Predicate Definitions - System and Custom
41
+ */
42
+ getBadgeStylePredicateDefs(scope: AdaptableScope): AdaptablePredicateDef[];
38
43
  }
@@ -30,7 +30,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
30
30
  .getSystemPredicateDefs()
31
31
  .filter((p) => p.moduleScope.includes('filter')),
32
32
  moduleScope: 'filter',
33
- columnScope: scope
33
+ columnScope: scope,
34
34
  };
35
35
  return systemFilterPredicates(systemPredicateContext);
36
36
  }
@@ -55,12 +55,27 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
55
55
  .getSystemPredicateDefs()
56
56
  .filter((p) => p.moduleScope.includes('alert')),
57
57
  moduleScope: 'alert',
58
- columnScope: scope
58
+ columnScope: scope,
59
59
  };
60
60
  return systemAlertPredicates(systemPredicateContext);
61
61
  }
62
62
  return systemAlertPredicates;
63
63
  }
64
+ getSystemBadgeStylePredicateIds(scope) {
65
+ const systemBadgeStylePredicates = this.getAdaptableQLOptions().predicateOptions.systemBadgeStylePredicates;
66
+ if (typeof systemBadgeStylePredicates === 'function') {
67
+ const systemPredicateContext = {
68
+ adaptableApi: this.adaptable.api,
69
+ systemPredicateDefs: this.getPredicateApi()
70
+ .getSystemPredicateDefs()
71
+ .filter((p) => p.moduleScope.includes('badgeStyle')),
72
+ moduleScope: 'badgeStyle',
73
+ columnScope: scope,
74
+ };
75
+ return systemBadgeStylePredicates(systemPredicateContext);
76
+ }
77
+ return systemBadgeStylePredicates;
78
+ }
64
79
  /**
65
80
  * Get all Format Column Predicate Definitions - System and Custom
66
81
  */
@@ -80,7 +95,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
80
95
  .getSystemPredicateDefs()
81
96
  .filter((p) => p.moduleScope.includes('formatColumn')),
82
97
  moduleScope: 'formatColumn',
83
- columnScope: scope
98
+ columnScope: scope,
84
99
  };
85
100
  return systemFormatColumnPredicates(systemPredicateContext);
86
101
  }
@@ -105,7 +120,7 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
105
120
  .getSystemPredicateDefs()
106
121
  .filter((p) => p.moduleScope.includes('flashingcell')),
107
122
  moduleScope: 'flashingcell',
108
- columnScope: scope
123
+ columnScope: scope,
109
124
  };
110
125
  return systemFlashingCellPredicates(systemPredicateContext);
111
126
  }
@@ -133,5 +148,15 @@ class PredicateInternalApi extends ApiBase_1.ApiBase {
133
148
  }
134
149
  return predicateId;
135
150
  }
151
+ /**
152
+ * Get all Badge Style Predicate Definitions - System and Custom
153
+ */
154
+ getBadgeStylePredicateDefs(scope) {
155
+ var _a;
156
+ return [
157
+ ...(_a = this.getSystemBadgeStylePredicateIds(scope)) === null || _a === void 0 ? void 0 : _a.map((predicateId) => this.getPredicateApi().getPredicateDefById(predicateId)),
158
+ ...this.getPredicateApi().getCustomPredicateDefs(),
159
+ ].filter((predicateDef) => predicateDef.moduleScope.includes('badgeStyle'));
160
+ }
136
161
  }
137
162
  exports.PredicateInternalApi = PredicateInternalApi;
@@ -58,4 +58,5 @@ export declare class StyledColumnInternalApi extends ApiBase {
58
58
  */
59
59
  hasStyledColumnRelativeCellRange(styledColumn: StyledColumn): boolean;
60
60
  getApplicableBadge(styledColumn: StyledColumn, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>): BadgeStyleDefinition | null;
61
+ getBadgePredicateDefsForColumn(columnId: string): import("../../types").AdaptablePredicateDef[];
61
62
  }
@@ -269,5 +269,17 @@ class StyledColumnInternalApi extends ApiBase_1.ApiBase {
269
269
  const [firstBadgeWithAll] = badgesWithAll;
270
270
  return firstBadgeWithAll !== null && firstBadgeWithAll !== void 0 ? firstBadgeWithAll : null;
271
271
  }
272
+ getBadgePredicateDefsForColumn(columnId) {
273
+ const column = this.getAdaptableApi().columnApi.getColumnWithColumnId(columnId);
274
+ if (!column) {
275
+ return undefined;
276
+ }
277
+ const scope = {
278
+ ColumnIds: [column.columnId],
279
+ };
280
+ return this.getAdaptableApi()
281
+ .predicateApi.internalApi.getBadgeStylePredicateDefs(scope)
282
+ .filter((predicate) => this.adaptable.api.scopeApi.isColumnInScope(column, predicate.columnScope));
283
+ }
272
284
  }
273
285
  exports.StyledColumnInternalApi = StyledColumnInternalApi;
@@ -1,6 +1,5 @@
1
1
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
2
2
  import { StyledColumn, StyledColumnState } from '../PredefinedConfig/StyledColumnState';
3
- import { AdaptablePredicateDef } from '../types';
4
3
  /**
5
4
  * Provides run-time access to Styled Column Module and associated state
6
5
  */
@@ -118,11 +117,7 @@ export interface StyledColumnApi {
118
117
  */
119
118
  getAllSuspendedStyledColumn(): StyledColumn[];
120
119
  /**
121
- * If this AdapTable instance can display Sparklines (e.g. is AG Grid SparklinesModule installed)
120
+ * Can this AdapTable instance display Sparklines (e.g. is AG Grid SparklinesModule installed)
122
121
  */
123
122
  canDisplaySparklines(): boolean;
124
- /**
125
- * Get all Predicates available for a given column
126
- */
127
- getBadgePredicateDefsForColumn(columnId: string): AdaptablePredicateDef[];
128
123
  }
@@ -51,4 +51,4 @@ export interface AdaptableBaseIcon {
51
51
  /**
52
52
  * All AdapTable internal icon names
53
53
  */
54
- export declare type AdaptableInternalIconName = 'add' | 'alert' | 'analysis' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold';
54
+ export declare type AdaptableInternalIconName = 'add' | 'alert' | 'building' | 'laptop' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrow-up-long' | 'arrow-down-long' | 'arrow-expand' | 'paperclip' | 'unfilled-circle' | 'boolean-list' | 'broadcast' | 'brush' | 'spanner' | 'edit-table' | 'chart-and-grid' | 'calendar' | 'call' | 'cells' | 'flag' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'columns' | 'filter-list' | 'comment' | 'contains' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'drag' | 'edit' | 'ends-with' | 'equals' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'lightning' | 'folder' | 'folder-open' | 'folder-shared' | 'color-palette' | 'horizontal-lines' | 'function' | 'greater-than' | 'greater-than-or-equal' | 'history' | 'home' | 'import-export' | 'info' | 'brain' | 'download' | 'grid' | 'less-than' | 'less-than-or-equal' | 'list' | 'logout' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'filled-circle' | 'not-contains' | 'not-equal' | 'open-in-new' | 'pause' | 'percent' | 'percent-tag' | 'person' | 'pie-chart' | 'play' | 'plus' | 'add-circle' | 'search' | 'search-table' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'settings' | 'link' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'assignment' | 'statusbar' | 'stop' | 'traffic-lights' | 'tab-unselected' | 'theme' | 'clipboard' | 'target' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'downloaded' | 'upload' | 'warning' | 'gradient' | 'badge' | 'italic' | 'bold' | 'align-left' | 'align-right' | 'align-center' | 'align-justify' | 'underline' | 'strikethrough' | 'overline' | 'case-upper' | 'case-lower' | 'case-sentence' | 'visibility-on' | 'visibility-off' | 'visibility-off-bold' | 'visibility-on-bold';
@@ -109,7 +109,7 @@ export interface PredicateDefHandlerParams {
109
109
  export interface PredicateDefToStringParams {
110
110
  inputs: any[];
111
111
  }
112
- export declare type PredicateModuleScope = 'filter' | 'alert' | 'flashingcell' | 'formatColumn';
112
+ export declare type PredicateModuleScope = 'filter' | 'alert' | 'flashingcell' | 'formatColumn' | 'badgeStyle';
113
113
  /**
114
114
  * Array of Predicate Defs which are shipped by AdapTable
115
115
  */
@@ -118,6 +118,7 @@ export declare const SystemFilterPredicateIds: string[];
118
118
  export declare const SystemAlertPredicateIds: string[];
119
119
  export declare const SystemFormatColumnPredicateIds: string[];
120
120
  export declare const SystemFlashingCellPredicateIds: string[];
121
+ export declare const SystemBadgeStylePredicateIds: string[];
121
122
  /**
122
123
  * Column Filter Definition for a specific Column
123
124
  */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SystemFlashingCellPredicateIds = exports.SystemFormatColumnPredicateIds = exports.SystemAlertPredicateIds = exports.SystemFilterPredicateIds = exports.SystemPredicateDefs = void 0;
3
+ exports.SystemBadgeStylePredicateIds = exports.SystemFlashingCellPredicateIds = exports.SystemFormatColumnPredicateIds = exports.SystemAlertPredicateIds = exports.SystemFilterPredicateIds = exports.SystemPredicateDefs = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
6
6
  const isToday_1 = tslib_1.__importDefault(require("date-fns/isToday"));
@@ -26,7 +26,7 @@ exports.SystemPredicateDefs = [
26
26
  label: 'Values',
27
27
  icon: { text: 'IN' },
28
28
  columnScope: { DataTypes: ['String', 'Number', 'Date'] },
29
- moduleScope: ['filter', 'formatColumn', 'alert'],
29
+ moduleScope: ['filter', 'formatColumn', 'alert', 'badgeStyle'],
30
30
  handler: ({ inputs, column, value }) => {
31
31
  if (inputs.length === 0) {
32
32
  return true;
@@ -52,7 +52,7 @@ exports.SystemPredicateDefs = [
52
52
  label: 'Exclude Values',
53
53
  icon: { text: '!IN' },
54
54
  columnScope: { DataTypes: ['String', 'Number', 'Date'] },
55
- moduleScope: ['filter', 'formatColumn', 'alert'],
55
+ moduleScope: ['filter', 'formatColumn', 'alert', 'badgeStyle'],
56
56
  handler: ({ inputs, column, value }) => {
57
57
  // basically negation of IN
58
58
  if (inputs.length === 0) {
@@ -78,7 +78,7 @@ exports.SystemPredicateDefs = [
78
78
  label: 'Blanks',
79
79
  icon: { name: 'unfilled-circle' },
80
80
  columnScope: { All: true },
81
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
81
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
82
82
  handler: ({ value }) => Helper_1.default.IsInputNullOrEmpty(value),
83
83
  },
84
84
  {
@@ -86,7 +86,7 @@ exports.SystemPredicateDefs = [
86
86
  label: 'Non Blanks',
87
87
  icon: { name: 'filled-circle' },
88
88
  columnScope: { All: true },
89
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
89
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
90
90
  handler: ({ value }) => Helper_1.default.IsInputNotNullOrEmpty(value),
91
91
  },
92
92
  // Numeric System Filters
@@ -95,7 +95,7 @@ exports.SystemPredicateDefs = [
95
95
  label: 'Greater Than',
96
96
  icon: { name: 'greater-than' },
97
97
  columnScope: { DataTypes: ['Number'] },
98
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
98
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
99
99
  inputs: [{ type: 'number' }],
100
100
  handler: ({ value, inputs }) => Number(value) > Number(inputs[0]),
101
101
  toString: ({ inputs }) => `> ${inputs[0]}`,
@@ -106,7 +106,7 @@ exports.SystemPredicateDefs = [
106
106
  label: 'Less Than',
107
107
  icon: { name: 'less-than' },
108
108
  columnScope: { DataTypes: ['Number'] },
109
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
109
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
110
110
  inputs: [{ type: 'number' }],
111
111
  handler: ({ value, inputs }) => Number(value) < Number(inputs[0]),
112
112
  toString: ({ inputs }) => `< ${inputs[0]}`,
@@ -117,7 +117,7 @@ exports.SystemPredicateDefs = [
117
117
  label: 'Positive',
118
118
  icon: { text: '>0' },
119
119
  columnScope: { DataTypes: ['Number'] },
120
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
120
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
121
121
  handler: ({ value }) => Number(value) > 0,
122
122
  },
123
123
  {
@@ -125,7 +125,7 @@ exports.SystemPredicateDefs = [
125
125
  label: 'Negative',
126
126
  icon: { text: '<0' },
127
127
  columnScope: { DataTypes: ['Number'] },
128
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
128
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
129
129
  handler: ({ value }) => Number(value) < 0,
130
130
  },
131
131
  {
@@ -133,7 +133,7 @@ exports.SystemPredicateDefs = [
133
133
  label: 'Zero',
134
134
  icon: { text: '=0' },
135
135
  columnScope: { DataTypes: ['Number'] },
136
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
136
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
137
137
  handler: ({ value }) => {
138
138
  if (typeof value === 'string' && !StringExtensions_1.default.IsNumeric(value)) {
139
139
  return false;
@@ -149,7 +149,7 @@ exports.SystemPredicateDefs = [
149
149
  label: 'Equals',
150
150
  icon: { name: 'equals' },
151
151
  columnScope: { DataTypes: ['Number'] },
152
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
152
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
153
153
  inputs: [{ type: 'number' }],
154
154
  handler: ({ value, inputs }) => {
155
155
  const input = inputs[0];
@@ -167,7 +167,7 @@ exports.SystemPredicateDefs = [
167
167
  label: 'Not Equals',
168
168
  icon: { name: 'not-equal' },
169
169
  columnScope: { DataTypes: ['Number'] },
170
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
170
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
171
171
  inputs: [{ type: 'number' }],
172
172
  handler: ({ value, inputs }) => {
173
173
  const input = inputs[0];
@@ -185,7 +185,7 @@ exports.SystemPredicateDefs = [
185
185
  label: 'Between',
186
186
  icon: { text: 'BE' },
187
187
  columnScope: { DataTypes: ['Number'] },
188
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
188
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
189
189
  inputs: [{ type: 'number' }, { type: 'number' }],
190
190
  handler: ({ value, inputs }) => Number(value) >= Number(inputs[0]) && Number(value) <= Number(inputs[1]),
191
191
  toString: ({ inputs }) => `Between ${inputs[0]}:${inputs[1]}`,
@@ -196,7 +196,7 @@ exports.SystemPredicateDefs = [
196
196
  label: 'Not Between',
197
197
  icon: { text: '!BE' },
198
198
  columnScope: { DataTypes: ['Number'] },
199
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
199
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
200
200
  inputs: [{ type: 'number' }, { type: 'number' }],
201
201
  handler: ({ value, inputs }) => Number(value) < Number(inputs[0]) || Number(value) > Number(inputs[1]),
202
202
  toString: ({ inputs }) => `Not Between ${inputs[0]}:${inputs[1]}`,
@@ -224,7 +224,7 @@ exports.SystemPredicateDefs = [
224
224
  label: 'Equals',
225
225
  icon: { name: 'equals' },
226
226
  columnScope: { DataTypes: ['String'] },
227
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
227
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
228
228
  inputs: [{ type: 'text' }],
229
229
  handler: ({ value, inputs, api }) => {
230
230
  if (!value) {
@@ -243,7 +243,7 @@ exports.SystemPredicateDefs = [
243
243
  label: 'Not Equals',
244
244
  icon: { name: 'not-equal' },
245
245
  columnScope: { DataTypes: ['String'] },
246
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
246
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
247
247
  inputs: [{ type: 'text' }],
248
248
  handler: ({ value, inputs, api }) => {
249
249
  if (!value) {
@@ -262,7 +262,7 @@ exports.SystemPredicateDefs = [
262
262
  label: 'Contains',
263
263
  icon: { name: 'contains' },
264
264
  columnScope: { DataTypes: ['String'] },
265
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
265
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
266
266
  inputs: [{ type: 'text' }],
267
267
  handler: ({ value, inputs, api }) => {
268
268
  if (!value) {
@@ -280,7 +280,7 @@ exports.SystemPredicateDefs = [
280
280
  label: 'Not Contains',
281
281
  icon: { name: 'not-contains' },
282
282
  columnScope: { DataTypes: ['String'] },
283
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
283
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
284
284
  inputs: [{ type: 'text' }],
285
285
  handler: ({ value, inputs, api }) => {
286
286
  if (!value) {
@@ -298,7 +298,7 @@ exports.SystemPredicateDefs = [
298
298
  label: 'Starts With',
299
299
  icon: { name: 'starts-with' },
300
300
  columnScope: { DataTypes: ['String'] },
301
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
301
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
302
302
  inputs: [{ type: 'text' }],
303
303
  handler: ({ value, inputs, api }) => {
304
304
  if (!value) {
@@ -316,7 +316,7 @@ exports.SystemPredicateDefs = [
316
316
  label: 'Ends With',
317
317
  icon: { name: 'ends-with' },
318
318
  columnScope: { DataTypes: ['String'] },
319
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
319
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
320
320
  inputs: [{ type: 'text' }],
321
321
  handler: ({ value, inputs, api }) => {
322
322
  if (!value) {
@@ -334,7 +334,7 @@ exports.SystemPredicateDefs = [
334
334
  label: 'Regex',
335
335
  icon: { name: 'regex' },
336
336
  columnScope: { DataTypes: ['String'] },
337
- moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn'],
337
+ moduleScope: ['filter', 'alert', 'flashingcell', 'formatColumn', 'badgeStyle'],
338
338
  inputs: [{ type: 'text' }],
339
339
  handler: ({ value, inputs }) => new RegExp(inputs[0]).test(value),
340
340
  toString: ({ inputs }) => `Regex ${inputs[0]}`,
@@ -611,3 +611,4 @@ exports.SystemFilterPredicateIds = exports.SystemPredicateDefs.filter((p) => p.m
611
611
  exports.SystemAlertPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('alert')).map((p) => p.id);
612
612
  exports.SystemFormatColumnPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('formatColumn')).map((p) => p.id);
613
613
  exports.SystemFlashingCellPredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('flashingcell')).map((p) => p.id);
614
+ exports.SystemBadgeStylePredicateIds = exports.SystemPredicateDefs.filter((p) => p.moduleScope.includes('badgeStyle')).map((p) => p.id);
@@ -55,7 +55,7 @@ export interface PercentBarStyle extends NumericStyledColumn {
55
55
  */
56
56
  CellText?: CellTextOptions;
57
57
  /**
58
- * Position of text in cell relative to Percent Bar
58
+ * Position of text in Cell relative to Percent Bar, "Above", "Below" or "Merged"
59
59
  * @defaultValue Below
60
60
  */
61
61
  CellTextPosition?: 'Above' | 'Below' | 'Merged';
@@ -151,7 +151,7 @@ export declare type SparkLineStyle = {
151
151
  /**
152
152
  * Predicates available when creating a Badge Style Rule
153
153
  */
154
- export declare type SystemBadgeStylePredicateId = 'Values' | 'ExcludeValues' | 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'InRange' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'BooleanToggle';
154
+ export declare type SystemBadgeStylePredicateId = 'Values' | 'ExcludeValues' | 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex';
155
155
  /**
156
156
  * System Predicate Ids available for Badge Style
157
157
  */
@@ -167,7 +167,7 @@ export interface BadgeStylePredicate extends AdaptablePredicate {
167
167
  */
168
168
  export interface BadgeStyleDefinition {
169
169
  /**
170
- * Optional Rule for when Badge is displayed
170
+ * Optional Rule for deciding whether Badge is displayed
171
171
  */
172
172
  Predicate?: BadgeStylePredicate;
173
173
  /**
@@ -179,7 +179,7 @@ export interface BadgeStyleDefinition {
179
179
  */
180
180
  HideText?: boolean;
181
181
  /**
182
- * Icon to display in Bidge
182
+ * Icon to display in Badge
183
183
  */
184
184
  Icon?: AdaptableInternalIcon | AdaptableExternalIcon;
185
185
  /**
@@ -191,5 +191,8 @@ export interface BadgeStyleDefinition {
191
191
  * Collection of Badge Style Definitions to display in a Badge Styled Column
192
192
  */
193
193
  export interface BadgeStyle {
194
+ /**
195
+ * Collection of Badge Style Definitions
196
+ */
194
197
  Badges?: BadgeStyleDefinition[];
195
198
  }
@@ -73,6 +73,7 @@ exports.DefaultAdaptableOptions = {
73
73
  systemAlertPredicates: AdaptablePredicate_1.SystemAlertPredicateIds,
74
74
  systemFormatColumnPredicates: AdaptablePredicate_1.SystemFormatColumnPredicateIds,
75
75
  systemFlashingCellPredicates: AdaptablePredicate_1.SystemFlashingCellPredicateIds,
76
+ systemBadgeStylePredicates: AdaptablePredicate_1.SystemBadgeStylePredicateIds,
76
77
  },
77
78
  },
78
79
  containerOptions: {
@@ -23,7 +23,7 @@ const BadgeEditor = (props) => {
23
23
  var _a, _b;
24
24
  const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
25
25
  const { badge, columnId, onChange } = props;
26
- const predicateDefs = api.styledColumnApi.getBadgePredicateDefsForColumn(columnId);
26
+ const predicateDefs = api.styledColumnApi.internalApi.getBadgePredicateDefsForColumn(columnId);
27
27
  let previewValue = 'Hello world';
28
28
  if (api.columnApi.getColumnDataTypeForColumnId(columnId) === 'Number') {
29
29
  previewValue = '12345';
@@ -2384,6 +2384,9 @@ class Adaptable {
2384
2384
  adaptableApi: this.api,
2385
2385
  actionRowButtonType,
2386
2386
  });
2387
+ if (!customButtonConfig) {
2388
+ return defaultButtonConfig;
2389
+ }
2387
2390
  return Object.assign(Object.assign({}, defaultButtonConfig), customButtonConfig);
2388
2391
  })
2389
2392
  .filter(Boolean);
@@ -154,7 +154,7 @@ const allIcons = {
154
154
  'chart-and-grid': calculated_column_1.default,
155
155
  laptop: application_1.default,
156
156
  alert: alert_1.default,
157
- analysis: analysis_1.default,
157
+ building: analysis_1.default,
158
158
  'edit-table': bulk_update_1.default,
159
159
  chart: chart_1.default,
160
160
  'column-add': column_add_1.default,
@@ -1160,6 +1160,12 @@ export declare const ADAPTABLE_METAMODEL: {
1160
1160
  name: string;
1161
1161
  kind: string;
1162
1162
  desc: string;
1163
+ props: {
1164
+ name: string;
1165
+ kind: string;
1166
+ desc: string;
1167
+ isOpt: boolean;
1168
+ }[];
1163
1169
  };
1164
1170
  BadgeStyleDefinition: {
1165
1171
  name: string;