@adaptabletools/adaptable 21.0.0 → 21.0.1

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": "21.0.0",
3
+ "version": "21.0.1",
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",
@@ -26,13 +26,21 @@ export const SystemPredicateDefs = [
26
26
  moduleScope: ['columnFilter', 'flashingcell', 'formatColumn', 'alert', 'badgeStyle'],
27
27
  handler: (context) => {
28
28
  const { inputs = [], column, value, adaptableApi } = context;
29
- const predicateInputs = (context.inputs || []).reduce((acc, input) => {
30
- const predicate = adaptableApi.predicateApi.getPredicateDefById(input);
31
- if (predicate) {
32
- acc.push(predicate);
29
+ const predicateInputs = (context.inputs || [])
30
+ .map((input) => {
31
+ const predicateInput = adaptableApi.predicateApi.getPredicateDefById(input);
32
+ if (!predicateInput) {
33
+ return;
33
34
  }
34
- return acc;
35
- }, []);
35
+ if (adaptableApi.columnScopeApi.isScopeInScope(predicateInput.columnScope,
36
+ // 'In' ColumnScope
37
+ {
38
+ DataTypes: ['text', 'number', 'date', 'textArray', 'numberArray'],
39
+ })) {
40
+ return predicateInput;
41
+ }
42
+ })
43
+ .filter(Boolean);
36
44
  if (predicateInputs.length) {
37
45
  const nestedContext = { ...context };
38
46
  delete nestedContext.inputs;
@@ -99,13 +107,21 @@ export const SystemPredicateDefs = [
99
107
  moduleScope: ['columnFilter', 'flashingcell', 'formatColumn', 'alert', 'badgeStyle'],
100
108
  handler: (context) => {
101
109
  const { inputs, column, value, adaptableApi } = context;
102
- const predicateInputs = context.inputs.reduce((acc, input) => {
103
- const predicate = adaptableApi.predicateApi.getPredicateDefById(input);
104
- if (predicate) {
105
- acc.push(predicate);
110
+ const predicateInputs = (context.inputs || [])
111
+ .map((input) => {
112
+ const predicateInput = adaptableApi.predicateApi.getPredicateDefById(input);
113
+ if (!predicateInput) {
114
+ return;
115
+ }
116
+ if (adaptableApi.columnScopeApi.isScopeInScope(predicateInput.columnScope,
117
+ // 'NotIn' ColumnScope
118
+ {
119
+ DataTypes: ['text', 'number', 'date', 'textArray', 'numberArray'],
120
+ })) {
121
+ return predicateInput;
106
122
  }
107
- return acc;
108
- }, []);
123
+ })
124
+ .filter(Boolean);
109
125
  if (predicateInputs.length) {
110
126
  const nestedContext = { ...context };
111
127
  delete nestedContext.inputs;
@@ -46,6 +46,11 @@ export interface PredicateApi {
46
46
  * @param predicate Predicate Definition to stringify
47
47
  */
48
48
  predicateToString(predicate: AdaptablePredicate): string;
49
+ /**
50
+ * Stringifies a list of Predicate Definitions, using the given logical operator (AND/OR)
51
+ * @param predicates List of Predicate Definitions to stringify
52
+ * @param logicalOperator Logical operator to use to join the stringified Predicates (default AND)
53
+ */
49
54
  predicatesToString(predicates: AdaptablePredicate[], logicalOperator?: string): string;
50
55
  /**
51
56
  * Checks whether a given Predicate Definition is valid
@@ -97,9 +97,10 @@ export function DateFormatter(input, options, strictFormatting = false) {
97
97
  return undefined;
98
98
  }
99
99
  try {
100
- // not sure if this is right if using a custom formatter...
101
100
  if (typeof input === 'string') {
102
- input = new Date(input);
101
+ // Remove timezone info (e.g., Z or +02:00) using regex
102
+ const cleanDateString = input.replace(/([+-]\d{2}:\d{2}|Z)$/, '');
103
+ input = new Date(cleanDateString);
103
104
  }
104
105
  return dateFnsFormat(input, options?.Pattern || DEFAULT_DATE_FORMAT_PATTERN);
105
106
  }
@@ -22,6 +22,11 @@ export class ModuleService {
22
22
  logMissingAgGridDepsInfos() {
23
23
  // log missing core (required) AG Grid dependencies
24
24
  const agGridModulesAdapter = this.adaptableApi.internalApi.getAgGridModulesAdapter();
25
+ if (agGridModulesAdapter.isAgGridModuleRegistered('AllEnterpriseModule')) {
26
+ // no need to check further if AllEnterprise is registered
27
+ // it may even trigger false positives (e.g. when using SSRM)
28
+ return;
29
+ }
25
30
  const mandatoryAgGridModuleNames = agGridModulesAdapter.getMandatoryAgGridModuleNames();
26
31
  const registeredAgGridModuleNames = agGridModulesAdapter.getAgGridRegisteredModuleNames();
27
32
  const missingAgGridModuleNames = mandatoryAgGridModuleNames.filter((moduleName) => !registeredAgGridModuleNames.includes(moduleName));
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1757490972135 || Date.now(),
4
- VERSION: "21.0.0" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1758028360767 || Date.now(),
4
+ VERSION: "21.0.1" || '--current-version--',
5
5
  };