@adaptabletools/adaptable-cjs 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-cjs",
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",
@@ -30,13 +30,21 @@ exports.SystemPredicateDefs = [
30
30
  moduleScope: ['columnFilter', 'flashingcell', 'formatColumn', 'alert', 'badgeStyle'],
31
31
  handler: (context) => {
32
32
  const { inputs = [], column, value, adaptableApi } = context;
33
- const predicateInputs = (context.inputs || []).reduce((acc, input) => {
34
- const predicate = adaptableApi.predicateApi.getPredicateDefById(input);
35
- if (predicate) {
36
- acc.push(predicate);
33
+ const predicateInputs = (context.inputs || [])
34
+ .map((input) => {
35
+ const predicateInput = adaptableApi.predicateApi.getPredicateDefById(input);
36
+ if (!predicateInput) {
37
+ return;
37
38
  }
38
- return acc;
39
- }, []);
39
+ if (adaptableApi.columnScopeApi.isScopeInScope(predicateInput.columnScope,
40
+ // 'In' ColumnScope
41
+ {
42
+ DataTypes: ['text', 'number', 'date', 'textArray', 'numberArray'],
43
+ })) {
44
+ return predicateInput;
45
+ }
46
+ })
47
+ .filter(Boolean);
40
48
  if (predicateInputs.length) {
41
49
  const nestedContext = { ...context };
42
50
  delete nestedContext.inputs;
@@ -103,13 +111,21 @@ exports.SystemPredicateDefs = [
103
111
  moduleScope: ['columnFilter', 'flashingcell', 'formatColumn', 'alert', 'badgeStyle'],
104
112
  handler: (context) => {
105
113
  const { inputs, column, value, adaptableApi } = context;
106
- const predicateInputs = context.inputs.reduce((acc, input) => {
107
- const predicate = adaptableApi.predicateApi.getPredicateDefById(input);
108
- if (predicate) {
109
- acc.push(predicate);
114
+ const predicateInputs = (context.inputs || [])
115
+ .map((input) => {
116
+ const predicateInput = adaptableApi.predicateApi.getPredicateDefById(input);
117
+ if (!predicateInput) {
118
+ return;
119
+ }
120
+ if (adaptableApi.columnScopeApi.isScopeInScope(predicateInput.columnScope,
121
+ // 'NotIn' ColumnScope
122
+ {
123
+ DataTypes: ['text', 'number', 'date', 'textArray', 'numberArray'],
124
+ })) {
125
+ return predicateInput;
110
126
  }
111
- return acc;
112
- }, []);
127
+ })
128
+ .filter(Boolean);
113
129
  if (predicateInputs.length) {
114
130
  const nestedContext = { ...context };
115
131
  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
@@ -102,9 +102,10 @@ function DateFormatter(input, options, strictFormatting = false) {
102
102
  return undefined;
103
103
  }
104
104
  try {
105
- // not sure if this is right if using a custom formatter...
106
105
  if (typeof input === 'string') {
107
- input = new Date(input);
106
+ // Remove timezone info (e.g., Z or +02:00) using regex
107
+ const cleanDateString = input.replace(/([+-]\d{2}:\d{2}|Z)$/, '');
108
+ input = new Date(cleanDateString);
108
109
  }
109
110
  return (0, date_fns_1.format)(input, options?.Pattern || GeneralConstants_1.DEFAULT_DATE_FORMAT_PATTERN);
110
111
  }
@@ -26,6 +26,11 @@ class ModuleService {
26
26
  logMissingAgGridDepsInfos() {
27
27
  // log missing core (required) AG Grid dependencies
28
28
  const agGridModulesAdapter = this.adaptableApi.internalApi.getAgGridModulesAdapter();
29
+ if (agGridModulesAdapter.isAgGridModuleRegistered('AllEnterpriseModule')) {
30
+ // no need to check further if AllEnterprise is registered
31
+ // it may even trigger false positives (e.g. when using SSRM)
32
+ return;
33
+ }
29
34
  const mandatoryAgGridModuleNames = agGridModulesAdapter.getMandatoryAgGridModuleNames();
30
35
  const registeredAgGridModuleNames = agGridModulesAdapter.getAgGridRegisteredModuleNames();
31
36
  const missingAgGridModuleNames = mandatoryAgGridModuleNames.filter((moduleName) => !registeredAgGridModuleNames.includes(moduleName));
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  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" || '',
5
- PUBLISH_TIMESTAMP: 1757491006270 || Date.now(),
6
- VERSION: "21.0.0" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1758028392936 || Date.now(),
6
+ VERSION: "21.0.1" || '--current-version--',
7
7
  };