@gooddata/code-cli 0.47.0-alpha.1 → 0.47.0-alpha.3

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.
@@ -28,6 +28,7 @@ dashboards support:
28
28
  - `sections`: (array, optional) Nested sections for container widgets.
29
29
 
30
30
  - `filters`: (object, optional) Dashboard-level filters. Each filter can be a `date_filter` or `attribute_filter` with fields like `type`, `granularity`, `from`, `to`, and `using`.
31
+ - `timezone_config`: (object, optional) Dashboard-level timezone settings. `timezone_id` accepts an IANA timezone ID such as `Europe/Prague` or the `$browserDetected` sentinel; `show_timezone_info` controls the indicator; `allow_user_override_in_view_mode` allows a session-only viewer override. Omit the object to use the workspace setting.
31
32
  - `permissions`: (object, optional) Dashboard-level permissions. Common keys are `VIEW` and `EDIT`, with user or group assignments.
32
33
 
33
34
  # Best Practices
@@ -48,6 +49,11 @@ title: Example Dashboard
48
49
 
49
50
  description: Overview of key business metrics and trends.
50
51
 
52
+ timezone_config:
53
+ timezone_id: $browserDetected
54
+ show_timezone_info: true
55
+ allow_user_override_in_view_mode: true
56
+
51
57
  sections:
52
58
  - title: Sales Overview
53
59
  description: How is your company performing?
package/dist/index.js CHANGED
@@ -37370,7 +37370,7 @@ function isPromise(value) {
37370
37370
  //#endregion
37371
37371
  //#region package.json
37372
37372
  var name$1 = "@gooddata/code-cli";
37373
- var version$1 = "0.47.0-alpha.1";
37373
+ var version$1 = "0.47.0-alpha.3";
37374
37374
  //#endregion
37375
37375
  //#region ../../../common/temp/aac/node_modules/.pnpm/vscode-languageserver@8.1.0/node_modules/vscode-languageserver/lib/common/utils/is.js
37376
37376
  var require_is$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
@@ -106469,6 +106469,7 @@ function cfGranularityToYaml(granularity) {
106469
106469
  function convertGranularity$1(gran) {
106470
106470
  const g = gran;
106471
106471
  switch (g) {
106472
+ case "SECOND": return "GDC.time.second";
106472
106473
  case "MINUTE": return "GDC.time.minute";
106473
106474
  case "HOUR": return "GDC.time.hour";
106474
106475
  case "DAY": return "GDC.time.date";
@@ -106478,6 +106479,9 @@ function convertGranularity$1(gran) {
106478
106479
  case "QUARTER": return "GDC.time.quarter";
106479
106480
  case "YEAR": return "GDC.time.year";
106480
106481
  case "MINUTE_OF_HOUR": return "GDC.time.minute_in_hour";
106482
+ case "MINUTE_OF_DAY": return "GDC.time.minute_in_day";
106483
+ case "SECOND_OF_MINUTE": return "GDC.time.second_in_minute";
106484
+ case "SECOND_OF_DAY": return "GDC.time.second_in_day";
106481
106485
  case "HOUR_OF_DAY": return "GDC.time.hour_in_day";
106482
106486
  case "DAY_OF_WEEK": return "GDC.time.day_in_week";
106483
106487
  case "DAY_OF_MONTH": return "GDC.time.day_in_month";
@@ -106500,6 +106504,7 @@ function convertGranularity$1(gran) {
106500
106504
  /** @public */
106501
106505
  function parseGranularity(gran) {
106502
106506
  switch (gran) {
106507
+ case "GDC.time.second": return "SECOND";
106503
106508
  case "GDC.time.minute": return "MINUTE";
106504
106509
  case "GDC.time.hour": return "HOUR";
106505
106510
  case "GDC.time.date": return "DAY";
@@ -106509,6 +106514,9 @@ function parseGranularity(gran) {
106509
106514
  case "GDC.time.quarter": return "QUARTER";
106510
106515
  case "GDC.time.year": return "YEAR";
106511
106516
  case "GDC.time.minute_in_hour": return "MINUTE_OF_HOUR";
106517
+ case "GDC.time.minute_in_day": return "MINUTE_OF_DAY";
106518
+ case "GDC.time.second_in_minute": return "SECOND_OF_MINUTE";
106519
+ case "GDC.time.second_in_day": return "SECOND_OF_DAY";
106512
106520
  case "GDC.time.hour_in_day": return "HOUR_OF_DAY";
106513
106521
  case "GDC.time.day_in_week": return "DAY_OF_WEEK";
106514
106522
  case "GDC.time.day_in_euweek": return "DAY_OF_WEEK_EU";
@@ -106531,6 +106539,7 @@ function parseGranularity(gran) {
106531
106539
  }
106532
106540
  function convertGranularityToId$1(gran) {
106533
106541
  switch (gran) {
106542
+ case "SECOND": return "second";
106534
106543
  case "MINUTE": return "minute";
106535
106544
  case "HOUR": return "hour";
106536
106545
  case "DAY": return "day";
@@ -106540,6 +106549,9 @@ function convertGranularityToId$1(gran) {
106540
106549
  case "QUARTER": return "quarter";
106541
106550
  case "YEAR": return "year";
106542
106551
  case "MINUTE_OF_HOUR": return "minuteOfHour";
106552
+ case "MINUTE_OF_DAY": return "minuteOfDay";
106553
+ case "SECOND_OF_MINUTE": return "secondOfMinute";
106554
+ case "SECOND_OF_DAY": return "secondOfDay";
106543
106555
  case "HOUR_OF_DAY": return "hourOfDay";
106544
106556
  case "DAY_OF_WEEK": return "dayOfWeek";
106545
106557
  case "DAY_OF_MONTH": return "dayOfMonth";
@@ -106570,6 +106582,10 @@ function convertGranularityToDeclarativeDatasetGranularity(gran) {
106570
106582
  case "HOUR_OF_DAY": return "HOUR_OF_DAY";
106571
106583
  case "MINUTE": return "MINUTE";
106572
106584
  case "MINUTE_OF_HOUR": return "MINUTE_OF_HOUR";
106585
+ case "SECOND": return "SECOND";
106586
+ case "SECOND_OF_MINUTE": return "SECOND_OF_MINUTE";
106587
+ case "SECOND_OF_DAY": return "SECOND_OF_DAY";
106588
+ case "MINUTE_OF_DAY": return "MINUTE_OF_DAY";
106573
106589
  case "MONTH": return "MONTH";
106574
106590
  case "MONTH_OF_YEAR": return "MONTH_OF_YEAR";
106575
106591
  case "QUARTER": return "QUARTER";
@@ -107736,6 +107752,7 @@ function parseGranularityValue$1(gran, value) {
107736
107752
  * Regular expression to detect granularity suffixes at the end of an ID
107737
107753
  */
107738
107754
  const GRANULARITY_SUFFIX_REGEX$1 = new RegExp(`\\.(${[
107755
+ "second",
107739
107756
  "minute",
107740
107757
  "hour",
107741
107758
  "day",
@@ -107743,7 +107760,10 @@ const GRANULARITY_SUFFIX_REGEX$1 = new RegExp(`\\.(${[
107743
107760
  "month",
107744
107761
  "quarter",
107745
107762
  "year",
107763
+ "secondOfMinute",
107764
+ "secondOfDay",
107746
107765
  "minuteOfHour",
107766
+ "minuteOfDay",
107747
107767
  "hourOfDay",
107748
107768
  "dayOfWeek",
107749
107769
  "dayOfMonth",
@@ -139961,11 +139981,13 @@ function yamlDashboardToDeclarative(entities, input) {
139961
139981
  const yamlVersion = input.version ?? "2";
139962
139982
  const { layout, filterContext, dateFilterConfig, dateFilterConfigs, attributeFilterConfigs, measureValueFilterConfigs, tabs, tabFilterContexts } = yamlVersion === "3" ? hasTabs ? processDashboardWithTabsV3(entities, input) : processDashboardWithoutTabsV3(entities, input) : hasTabs ? processDashboardWithTabsV2(entities, input) : processDashboardWithoutTabsV2(entities, input);
139963
139983
  const plugins = yamlPluginsToDeclarative(input.plugins);
139984
+ const timezoneConfig = yamlTimezoneConfigToDeclarative(input.timezone_config);
139964
139985
  const [, permissions] = toDeclarativePermissions(input.permissions);
139965
139986
  const content = yamlVersion === "3" ? {
139966
139987
  version: "3",
139967
139988
  plugins,
139968
139989
  tabs,
139990
+ ...timezoneConfig ? { timezoneConfig } : {},
139969
139991
  ...input.cross_filtering === false ? { disableCrossFiltering: true } : {},
139970
139992
  ...input.user_filters_save === false ? { disableUserFilterSave: true } : {},
139971
139993
  ...input.user_filters_reset === false ? { disableUserFilterReset: true } : {},
@@ -139979,6 +140001,7 @@ function yamlDashboardToDeclarative(entities, input) {
139979
140001
  measureValueFilterConfigs,
139980
140002
  dateFilterConfig,
139981
140003
  dateFilterConfigs,
140004
+ ...timezoneConfig ? { timezoneConfig } : {},
139982
140005
  ...tabs ? { tabs } : {},
139983
140006
  ...input.cross_filtering === false ? { disableCrossFiltering: true } : {},
139984
140007
  ...input.user_filters_save === false ? { disableUserFilterSave: true } : {},
@@ -140257,6 +140280,14 @@ function yamlPluginToDeclarative$1(input) {
140257
140280
  parameters: serialiseParameters(input.parameters ?? "")
140258
140281
  };
140259
140282
  }
140283
+ function yamlTimezoneConfigToDeclarative(input) {
140284
+ if (!input) return;
140285
+ return {
140286
+ ...input.timezone_id ? { timezoneId: input.timezone_id } : {},
140287
+ ...input.show_timezone_info === void 0 ? {} : { showTimezoneInfo: input.show_timezone_info },
140288
+ ...input.allow_user_override_in_view_mode === void 0 ? {} : { allowUserOverrideInViewMode: input.allow_user_override_in_view_mode }
140289
+ };
140290
+ }
140260
140291
  function isFilterGroup$1(filter) {
140261
140292
  return typeof filter === "object" && filter !== null && "type" in filter && filter.type === "filter_group" && "filters" in filter;
140262
140293
  }
@@ -141861,6 +141892,7 @@ function declarativeDashboardToYaml(entities, dashboard, filterContexts, context
141861
141892
  if (content.disableUserFilterSave) doc.add(entryWithSpace("user_filters_save", false));
141862
141893
  if (content.disableFilterViews) doc.add(entryWithSpace("filter_views", false));
141863
141894
  if (content.disablePersistentFiltersAcrossTabs) doc.add(entryWithSpace("persistent_filters_across_tabs", false));
141895
+ if (content.timezoneConfig) doc.add(entryWithSpace("timezone_config", declarativeTimezoneConfigToYaml(content.timezoneConfig)));
141864
141896
  const hasMultipleTabs = content.tabs && content.tabs.length > 1;
141865
141897
  const hasSingleTabWithTitle = content.tabs?.length === 1 && content.tabs[0].title;
141866
141898
  const shouldUseTabs = hasMultipleTabs || hasSingleTabWithTitle;
@@ -142015,6 +142047,13 @@ function declarativeRichTextWidgetToYaml(widget, size) {
142015
142047
  if (size?.xl?.gridHeight) yamlWidget.add(new import_dist.Pair("rows", size.xl.gridHeight));
142016
142048
  return yamlWidget;
142017
142049
  }
142050
+ function declarativeTimezoneConfigToYaml(config) {
142051
+ return {
142052
+ ...config.timezoneId ? { timezone_id: config.timezoneId } : {},
142053
+ ...config.showTimezoneInfo === void 0 ? {} : { show_timezone_info: config.showTimezoneInfo },
142054
+ ...config.allowUserOverrideInViewMode === void 0 ? {} : { allow_user_override_in_view_mode: config.allowUserOverrideInViewMode }
142055
+ };
142056
+ }
142018
142057
  function declarativeVisualizationSwitcherWidgetToYaml(widget, size, entities, errorContext) {
142019
142058
  const yamlWidget = new import_dist.YAMLMap();
142020
142059
  if (widget.localIdentifier) yamlWidget.add(new import_dist.Pair("id", widget.localIdentifier));
@@ -143503,6 +143542,7 @@ function resolvedRelatedManifest(state, file) {
143503
143542
  function convertGranularity(gran) {
143504
143543
  const g = gran;
143505
143544
  switch (g) {
143545
+ case "SECOND": return "GDC.time.second";
143506
143546
  case "MINUTE": return "GDC.time.minute";
143507
143547
  case "HOUR": return "GDC.time.hour";
143508
143548
  case "DAY": return "GDC.time.date";
@@ -143512,6 +143552,9 @@ function convertGranularity(gran) {
143512
143552
  case "QUARTER": return "GDC.time.quarter";
143513
143553
  case "YEAR": return "GDC.time.year";
143514
143554
  case "MINUTE_OF_HOUR": return "GDC.time.minute_in_hour";
143555
+ case "MINUTE_OF_DAY": return "GDC.time.minute_in_day";
143556
+ case "SECOND_OF_MINUTE": return "GDC.time.second_in_minute";
143557
+ case "SECOND_OF_DAY": return "GDC.time.second_in_day";
143515
143558
  case "HOUR_OF_DAY": return "GDC.time.hour_in_day";
143516
143559
  case "DAY_OF_WEEK": return "GDC.time.day_in_week";
143517
143560
  case "DAY_OF_MONTH": return "GDC.time.day_in_month";
@@ -143533,6 +143576,7 @@ function convertGranularity(gran) {
143533
143576
  }
143534
143577
  function convertGranularityToId(gran) {
143535
143578
  switch (gran) {
143579
+ case "SECOND": return "second";
143536
143580
  case "MINUTE": return "minute";
143537
143581
  case "HOUR": return "hour";
143538
143582
  case "DAY": return "day";
@@ -143542,6 +143586,9 @@ function convertGranularityToId(gran) {
143542
143586
  case "QUARTER": return "quarter";
143543
143587
  case "YEAR": return "year";
143544
143588
  case "MINUTE_OF_HOUR": return "minuteOfHour";
143589
+ case "MINUTE_OF_DAY": return "minuteOfDay";
143590
+ case "SECOND_OF_MINUTE": return "secondOfMinute";
143591
+ case "SECOND_OF_DAY": return "secondOfDay";
143545
143592
  case "HOUR_OF_DAY": return "hourOfDay";
143546
143593
  case "DAY_OF_WEEK": return "dayOfWeek";
143547
143594
  case "DAY_OF_MONTH": return "dayOfMonth";
@@ -143857,6 +143904,7 @@ function buildDatasetLabel(label, id) {
143857
143904
  * Valid granularity suffixes that can be appended to dataset field IDs
143858
143905
  */
143859
143906
  const VALID_GRANULARITY_SUFFIXES = [
143907
+ "second",
143860
143908
  "minute",
143861
143909
  "hour",
143862
143910
  "day",
@@ -143864,7 +143912,10 @@ const VALID_GRANULARITY_SUFFIXES = [
143864
143912
  "month",
143865
143913
  "quarter",
143866
143914
  "year",
143915
+ "secondOfMinute",
143916
+ "secondOfDay",
143867
143917
  "minuteOfHour",
143918
+ "minuteOfDay",
143868
143919
  "hourOfDay",
143869
143920
  "dayOfWeek",
143870
143921
  "dayOfMonth",
@@ -146316,6 +146367,7 @@ const metadata_v1 = {
146316
146367
  "items": {
146317
146368
  "type": "string",
146318
146369
  "enum": [
146370
+ "SECOND",
146319
146371
  "MINUTE",
146320
146372
  "HOUR",
146321
146373
  "DAY",
@@ -146324,7 +146376,10 @@ const metadata_v1 = {
146324
146376
  "MONTH",
146325
146377
  "QUARTER",
146326
146378
  "YEAR",
146379
+ "SECOND_OF_MINUTE",
146380
+ "SECOND_OF_DAY",
146327
146381
  "MINUTE_OF_HOUR",
146382
+ "MINUTE_OF_DAY",
146328
146383
  "HOUR_OF_DAY",
146329
146384
  "DAY_OF_WEEK",
146330
146385
  "DAY_OF_WEEK_EU",
@@ -146490,6 +146545,10 @@ const metadata_v1 = {
146490
146545
  "type": "boolean",
146491
146546
  "description": "Whether persistent filters across tabs are enabled for this dashboard. Defaults to true."
146492
146547
  },
146548
+ "timezone_config": {
146549
+ "$ref": "#/$defs/timezoneConfig",
146550
+ "description": "Dashboard-level timezone configuration. If omitted, the workspace or organization timezone setting is used."
146551
+ },
146493
146552
  "enable_section_headers": {
146494
146553
  "type": "boolean",
146495
146554
  "description": "Applies to the root layout. Whether all sections headers are enabled. Defaults to true."
@@ -150548,6 +150607,7 @@ const metadata_v1 = {
150548
150607
  "granularity": {
150549
150608
  "type": "string",
150550
150609
  "enum": [
150610
+ "SECOND",
150551
150611
  "MINUTE",
150552
150612
  "HOUR",
150553
150613
  "DAY",
@@ -150556,7 +150616,10 @@ const metadata_v1 = {
150556
150616
  "MONTH",
150557
150617
  "QUARTER",
150558
150618
  "YEAR",
150619
+ "SECOND_OF_MINUTE",
150620
+ "SECOND_OF_DAY",
150559
150621
  "MINUTE_OF_HOUR",
150622
+ "MINUTE_OF_DAY",
150560
150623
  "HOUR_OF_DAY",
150561
150624
  "DAY_OF_WEEK",
150562
150625
  "DAY_OF_MONTH",
@@ -150610,6 +150673,7 @@ const metadata_v1 = {
150610
150673
  "granularity": {
150611
150674
  "type": "string",
150612
150675
  "enum": [
150676
+ "SECOND",
150613
150677
  "MINUTE",
150614
150678
  "HOUR",
150615
150679
  "DAY",
@@ -150618,7 +150682,10 @@ const metadata_v1 = {
150618
150682
  "MONTH",
150619
150683
  "QUARTER",
150620
150684
  "YEAR",
150685
+ "SECOND_OF_MINUTE",
150686
+ "SECOND_OF_DAY",
150621
150687
  "MINUTE_OF_HOUR",
150688
+ "MINUTE_OF_DAY",
150622
150689
  "HOUR_OF_DAY",
150623
150690
  "DAY_OF_WEEK",
150624
150691
  "DAY_OF_MONTH",
@@ -151454,6 +151521,10 @@ const metadata_v1 = {
151454
151521
  "type": "boolean",
151455
151522
  "description": "Whether persistent filters across tabs are enabled for this dashboard. Defaults to true."
151456
151523
  },
151524
+ "timezone_config": {
151525
+ "$ref": "#/$defs/timezoneConfig",
151526
+ "description": "Dashboard-level timezone configuration. If omitted, the workspace or organization timezone setting is used."
151527
+ },
151457
151528
  "enable_section_headers": {
151458
151529
  "type": "boolean",
151459
151530
  "description": "Applies to the root layout. Whether all sections headers are enabled. Defaults to true."
@@ -151513,6 +151584,24 @@ const metadata_v1 = {
151513
151584
  },
151514
151585
  "required": ["id", "type"]
151515
151586
  },
151587
+ "timezoneConfig": {
151588
+ "type": "object",
151589
+ "additionalProperties": false,
151590
+ "properties": {
151591
+ "timezone_id": {
151592
+ "$ref": "#/$defs/timezoneId",
151593
+ "description": "Dashboard default timezone. Use an IANA timezone ID or $browserDetected. If omitted, the workspace or organization timezone setting is used."
151594
+ },
151595
+ "show_timezone_info": {
151596
+ "type": "boolean",
151597
+ "description": "Whether the dashboard timezone indicator is visible."
151598
+ },
151599
+ "allow_user_override_in_view_mode": {
151600
+ "type": "boolean",
151601
+ "description": "Whether viewers can override the dashboard timezone for their current session."
151602
+ }
151603
+ }
151604
+ },
151516
151605
  "section": {
151517
151606
  "type": "object",
151518
151607
  "additionalProperties": false,
@@ -151566,6 +151655,16 @@ const metadata_v1 = {
151566
151655
  "sections"
151567
151656
  ]
151568
151657
  },
151658
+ "timezoneId": {
151659
+ "description": "An IANA timezone ID (for example, Europe/Prague or UTC) or $browserDetected to use the viewer browser timezone.",
151660
+ "oneOf": [{
151661
+ "type": "string",
151662
+ "const": "$browserDetected"
151663
+ }, {
151664
+ "type": "string",
151665
+ "pattern": "^[A-Za-z][A-Za-z0-9_+.-]*(?:/[A-Za-z0-9_+.-]+)*$"
151666
+ }]
151667
+ },
151569
151668
  "widget": {
151570
151669
  "title": "Widget",
151571
151670
  "type": "object",
@@ -152338,6 +152437,7 @@ const metadata_v1 = {
152338
152437
  "items": {
152339
152438
  "type": "string",
152340
152439
  "enum": [
152440
+ "SECOND",
152341
152441
  "MINUTE",
152342
152442
  "HOUR",
152343
152443
  "DAY",
@@ -152346,7 +152446,10 @@ const metadata_v1 = {
152346
152446
  "MONTH",
152347
152447
  "QUARTER",
152348
152448
  "YEAR",
152449
+ "SECOND_OF_MINUTE",
152450
+ "SECOND_OF_DAY",
152349
152451
  "MINUTE_OF_HOUR",
152452
+ "MINUTE_OF_DAY",
152350
152453
  "HOUR_OF_DAY",
152351
152454
  "DAY_OF_WEEK",
152352
152455
  "DAY_OF_WEEK_EU",
@@ -159766,7 +159869,7 @@ async function open(state, emitter, file) {
159766
159869
  //#endregion
159767
159870
  //#region ../code/package.json
159768
159871
  var name = "@gooddata/code";
159769
- var version = "0.47.0-alpha.1";
159872
+ var version = "0.47.0-alpha.3";
159770
159873
  //#endregion
159771
159874
  //#region ../../../sdk/libs/api-client-tiger/src/axios.ts
159772
159875
  /**
@@ -159788,7 +159891,7 @@ const _CONFIG = {
159788
159891
  common: {
159789
159892
  "X-Requested-With": "XMLHttpRequest",
159790
159893
  "X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
159791
- "X-GDC-JS-PACKAGE-VERSION": "11.51.0-alpha.1"
159894
+ "X-GDC-JS-PACKAGE-VERSION": "11.51.0-alpha.3"
159792
159895
  },
159793
159896
  post: { "Content-Type": "application/json;charset=utf8" },
159794
159897
  put: { "Content-Type": "application/json;charset=utf8" }
@@ -190876,7 +190979,7 @@ async function getUserDetails(axios, id) {
190876
190979
  }
190877
190980
  //#endregion
190878
190981
  //#region ../../../sdk/libs/api-client-tiger/src/generated/result-json-api/base.ts
190879
- const BASE_PATH$1 = "https://automation.staging-ui.stg11.panther.intgdc.com".replace(/\/+$/, "");
190982
+ const BASE_PATH$1 = "https://staging.dev-latest.stg11.panther.intgdc.com".replace(/\/+$/, "");
190880
190983
  var BaseAPI$1 = class {
190881
190984
  basePath;
190882
190985
  axios;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/code-cli",
3
- "version": "0.47.0-alpha.1",
3
+ "version": "0.47.0-alpha.3",
4
4
  "description": "GoodData CLI",
5
5
  "keywords": [
6
6
  "analytics",