@gooddata/sdk-code-convertors 11.55.0-alpha.3 → 11.55.0-alpha.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.
@@ -30,7 +30,7 @@ export type TableConfigProperties = {
30
30
  conditionalFormatting: {
31
31
  version?: string;
32
32
  enabled: boolean;
33
- rules: Array<{
33
+ rules: readonly {
34
34
  id: string;
35
35
  target: {
36
36
  kind: "measure";
@@ -39,7 +39,7 @@ export type TableConfigProperties = {
39
39
  kind: "attribute";
40
40
  attributeIdentifier: string;
41
41
  };
42
- conditions: Array<{
42
+ conditions: readonly {
43
43
  id: string;
44
44
  operator: string;
45
45
  value: {
@@ -66,8 +66,15 @@ export type TableConfigProperties = {
66
66
  backgroundColor?: string;
67
67
  scope: "cell" | "row";
68
68
  };
69
- }>;
70
- }>;
69
+ }[];
70
+ }[];
71
+ suppressedTargets?: readonly ({
72
+ kind: "measure";
73
+ measureIdentifier: string;
74
+ } | {
75
+ kind: "attribute";
76
+ attributeIdentifier: string;
77
+ })[];
71
78
  };
72
79
  };
73
80
  /** @internal */
@@ -149,7 +156,7 @@ export declare function tableSave(fields: Visualisation["query"]["fields"] | und
149
156
  conditionalFormatting: {
150
157
  version?: string | undefined;
151
158
  enabled: boolean;
152
- rules: {
159
+ rules: readonly {
153
160
  id: string;
154
161
  target: {
155
162
  kind: "measure";
@@ -158,7 +165,7 @@ export declare function tableSave(fields: Visualisation["query"]["fields"] | und
158
165
  kind: "attribute";
159
166
  attributeIdentifier: string;
160
167
  };
161
- conditions: {
168
+ conditions: readonly {
162
169
  id: string;
163
170
  operator: string;
164
171
  value: {
@@ -187,6 +194,13 @@ export declare function tableSave(fields: Visualisation["query"]["fields"] | und
187
194
  };
188
195
  }[];
189
196
  }[];
197
+ suppressedTargets?: readonly ({
198
+ kind: "measure";
199
+ measureIdentifier: string;
200
+ } | {
201
+ kind: "attribute";
202
+ attributeIdentifier: string;
203
+ })[] | undefined;
190
204
  } | undefined;
191
205
  } | undefined;
192
206
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/configs/table.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAKnE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAI3B,MAAM,YAAY,CAAC;AAEpB,gBAAgB;AAChB,MAAM,MAAM,qBAAqB,GAAG;IAChC,YAAY,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IACrC,qBAAqB,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1C,qBAAqB,EAAE,KAAK,GAAG,MAAM,CAAC;IACtC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,uBAAuB,EAAE,OAAO,CAAC;IACjC,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnD,YAAY,EAAE;QACV,QAAQ,EAAE,OAAO,CAAC;QAClB,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,KAAK,CAAC;YACnB,QAAQ,EAAE,aAAa,EAAE,CAAC;YAC1B,QAAQ,EAAE,OAAO,CAAC;YAClB,cAAc,EAAE,OAAO,CAAC;YACxB,SAAS,EAAE,QAAQ,GAAG,YAAY,CAAC;SACtC,CAAC,CAAC;KACN,CAAC;IACF,mBAAmB,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,KAAK,CAAC;IACrE,qBAAqB,EAAE;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,O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adConditionalFormattingTarget(target) {
125
+ return target.kind === "measure"
126
+ ? { measure: target.measureIdentifier }
127
+ : { attribute: target.attributeIdentifier };
128
+ }
129
+ function saveConditionalFormattingTarget(target) {
130
+ return target.measure === undefined
131
+ ? { kind: "attribute", attributeIdentifier: target.attribute ?? "" }
132
+ : { kind: "measure", measureIdentifier: target.measure };
133
+ }
124
134
  function loadConditionalFormattingRule(rule) {
125
135
  return {
126
136
  id: rule.id,
127
- target: rule.target.kind === "measure"
128
- ? { measure: rule.target.measureIdentifier }
129
- : { attribute: rule.target.attributeIdentifier },
137
+ target: loadConditionalFormattingTarget(rule.target),
130
138
  conditions: rule.conditions.map(loadConditionalFormattingCondition),
131
139
  };
132
140
  }
133
141
  function loadConditionalFormatting(value) {
134
- if (!value || (value.rules.length === 0 && !value.enabled)) {
142
+ const suppressedTargets = value?.suppressedTargets ?? [];
143
+ if (!value || (value.rules.length === 0 && !value.enabled && suppressedTargets.length === 0)) {
135
144
  return undefined;
136
145
  }
137
146
  return {
138
147
  ...(value.version ? { version: value.version } : {}),
139
148
  enabled: value.enabled,
140
149
  rules: value.rules.map(loadConditionalFormattingRule),
150
+ ...(suppressedTargets.length > 0
151
+ ? { suppressed_targets: suppressedTargets.map(loadConditionalFormattingTarget) }
152
+ : {}),
141
153
  };
142
154
  }
143
155
  // YAML -> internal
@@ -168,9 +180,7 @@ function saveConditionalFormattingValue(value) {
168
180
  function saveConditionalFormattingRule(rule) {
169
181
  return {
170
182
  id: rule.id,
171
- target: rule.target.measure === undefined
172
- ? { kind: "attribute", attributeIdentifier: rule.target.attribute ?? "" }
173
- : { kind: "measure", measureIdentifier: rule.target.measure },
183
+ target: saveConditionalFormattingTarget(rule.target),
174
184
  conditions: rule.conditions.map((condition) => ({
175
185
  id: condition.id,
176
186
  operator: condition.operator.toUpperCase(),
@@ -185,15 +195,23 @@ function saveConditionalFormattingRule(rule) {
185
195
  }
186
196
  function saveConditionalFormatting(value) {
187
197
  const rules = value?.rules ?? [];
198
+ const suppressedTargets = value?.suppressed_targets ?? [];
188
199
  // Same drop condition as loadConditionalFormatting: drop only the fully-empty default so the
189
200
  // config round-trips symmetrically (an enabled-but-ruleless config is preserved on both sides).
190
- if (!value || (rules.length === 0 && !value.enabled)) {
201
+ if (!value || (rules.length === 0 && !value.enabled && suppressedTargets.length === 0)) {
191
202
  return undefined;
192
203
  }
193
204
  return {
194
205
  ...(value.version ? { version: value.version } : {}),
195
206
  enabled: value.enabled ?? false,
196
207
  rules: rules.map(saveConditionalFormattingRule),
208
+ // Omit when empty, mirroring loadConditionalFormatting's own suppressed_targets handling above —
209
+ // otherwise every YAML->insight conversion writes an explicit `suppressedTargets: []` even for
210
+ // insights that never had `suppressed_targets`, making absent/[]/populated three spellings of
211
+ // the same thing that every downstream comparator would have to normalize against.
212
+ ...(suppressedTargets.length > 0
213
+ ? { suppressedTargets: suppressedTargets.map(saveConditionalFormattingTarget) }
214
+ : {}),
197
215
  };
198
216
  }
199
217
  /** @internal */
@@ -353,12 +353,15 @@ function buildFilters(entities, filters_by) {
353
353
  if (isRankingFilter(filter)) {
354
354
  filters.push({
355
355
  rankingFilter: {
356
- measures: [
357
- createIdentifier(filter.using) || createLocalIdentifier(filter.using),
358
- ...(filter.attribute
359
- ? [createIdentifier(filter.attribute) || createLocalIdentifier(filter.attribute)]
360
- : []),
361
- ],
356
+ measures: [createIdentifier(filter.using) || createLocalIdentifier(filter.using)],
357
+ ...(filter.attribute
358
+ ? {
359
+ dimensionality: [
360
+ createIdentifier(filter.attribute) ||
361
+ createLocalIdentifier(filter.attribute),
362
+ ],
363
+ }
364
+ : {}),
362
365
  operator: filter.top === undefined ? "BOTTOM" : "TOP",
363
366
  value: filter.top === undefined ? filter.bottom : filter.top,
364
367
  },
@@ -3740,7 +3740,7 @@ export declare type TableConfigProperties = {
3740
3740
  conditionalFormatting: {
3741
3741
  version?: string;
3742
3742
  enabled: boolean;
3743
- rules: Array<{
3743
+ rules: readonly {
3744
3744
  id: string;
3745
3745
  target: {
3746
3746
  kind: "measure";
@@ -3749,7 +3749,7 @@ export declare type TableConfigProperties = {
3749
3749
  kind: "attribute";
3750
3750
  attributeIdentifier: string;
3751
3751
  };
3752
- conditions: Array<{
3752
+ conditions: readonly {
3753
3753
  id: string;
3754
3754
  operator: string;
3755
3755
  value: {
@@ -3776,8 +3776,15 @@ export declare type TableConfigProperties = {
3776
3776
  backgroundColor?: string;
3777
3777
  scope: "cell" | "row";
3778
3778
  };
3779
- }>;
3780
- }>;
3779
+ }[];
3780
+ }[];
3781
+ suppressedTargets?: readonly ({
3782
+ kind: "measure";
3783
+ measureIdentifier: string;
3784
+ } | {
3785
+ kind: "attribute";
3786
+ attributeIdentifier: string;
3787
+ })[];
3781
3788
  };
3782
3789
  };
3783
3790
 
@@ -3859,7 +3866,7 @@ export declare function tableSave(fields: Visualisation["query"]["fields"] | und
3859
3866
  conditionalFormatting: {
3860
3867
  version?: string | undefined;
3861
3868
  enabled: boolean;
3862
- rules: {
3869
+ rules: readonly {
3863
3870
  id: string;
3864
3871
  target: {
3865
3872
  kind: "measure";
@@ -3868,7 +3875,7 @@ export declare function tableSave(fields: Visualisation["query"]["fields"] | und
3868
3875
  kind: "attribute";
3869
3876
  attributeIdentifier: string;
3870
3877
  };
3871
- conditions: {
3878
+ conditions: readonly {
3872
3879
  id: string;
3873
3880
  operator: string;
3874
3881
  value: {
@@ -3897,6 +3904,13 @@ export declare function tableSave(fields: Visualisation["query"]["fields"] | und
3897
3904
  };
3898
3905
  }[];
3899
3906
  }[];
3907
+ suppressedTargets?: readonly ({
3908
+ kind: "measure";
3909
+ measureIdentifier: string;
3910
+ } | {
3911
+ kind: "attribute";
3912
+ attributeIdentifier: string;
3913
+ })[] | undefined;
3900
3914
  } | undefined;
3901
3915
  } | undefined;
3902
3916
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-code-convertors",
3
- "version": "11.55.0-alpha.3",
3
+ "version": "11.55.0-alpha.4",
4
4
  "description": "GoodData AAC declarative converters",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -26,9 +26,9 @@
26
26
  "dependencies": {
27
27
  "uuid": "11.1.1",
28
28
  "yaml": "2.8.3",
29
- "@gooddata/api-client-tiger": "11.55.0-alpha.3",
30
- "@gooddata/sdk-code-schemas": "11.55.0-alpha.3",
31
- "@gooddata/sdk-model": "11.55.0-alpha.3"
29
+ "@gooddata/api-client-tiger": "11.55.0-alpha.4",
30
+ "@gooddata/sdk-code-schemas": "11.55.0-alpha.4",
31
+ "@gooddata/sdk-model": "11.55.0-alpha.4"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@microsoft/api-extractor": "7.58.12",
@@ -43,13 +43,13 @@
43
43
  "eslint-plugin-no-barrel-files": "1.2.2",
44
44
  "eslint-plugin-sonarjs": "3.0.6",
45
45
  "npm-run-all": "4.1.5",
46
- "oxfmt": "0.52.0",
46
+ "oxfmt": "0.58.0",
47
47
  "oxlint": "1.57.0",
48
48
  "oxlint-tsgolint": "0.15.0",
49
49
  "typescript": "5.9.3",
50
50
  "vitest": "4.1.8",
51
- "@gooddata/eslint-config": "11.55.0-alpha.3",
52
- "@gooddata/oxlint-config": "11.55.0-alpha.3"
51
+ "@gooddata/eslint-config": "11.55.0-alpha.4",
52
+ "@gooddata/oxlint-config": "11.55.0-alpha.4"
53
53
  },
54
54
  "scripts": {
55
55
  "_phase:build": "npm run build",