@gooddata/code-cli 0.47.0-alpha.2 → 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.
- package/dist/fixtures/rules/dashboards.mdc +6 -0
- package/dist/index.js +58 -3
- package/package.json +1 -1
|
@@ -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.
|
|
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) => {
|
|
@@ -139981,11 +139981,13 @@ function yamlDashboardToDeclarative(entities, input) {
|
|
|
139981
139981
|
const yamlVersion = input.version ?? "2";
|
|
139982
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);
|
|
139983
139983
|
const plugins = yamlPluginsToDeclarative(input.plugins);
|
|
139984
|
+
const timezoneConfig = yamlTimezoneConfigToDeclarative(input.timezone_config);
|
|
139984
139985
|
const [, permissions] = toDeclarativePermissions(input.permissions);
|
|
139985
139986
|
const content = yamlVersion === "3" ? {
|
|
139986
139987
|
version: "3",
|
|
139987
139988
|
plugins,
|
|
139988
139989
|
tabs,
|
|
139990
|
+
...timezoneConfig ? { timezoneConfig } : {},
|
|
139989
139991
|
...input.cross_filtering === false ? { disableCrossFiltering: true } : {},
|
|
139990
139992
|
...input.user_filters_save === false ? { disableUserFilterSave: true } : {},
|
|
139991
139993
|
...input.user_filters_reset === false ? { disableUserFilterReset: true } : {},
|
|
@@ -139999,6 +140001,7 @@ function yamlDashboardToDeclarative(entities, input) {
|
|
|
139999
140001
|
measureValueFilterConfigs,
|
|
140000
140002
|
dateFilterConfig,
|
|
140001
140003
|
dateFilterConfigs,
|
|
140004
|
+
...timezoneConfig ? { timezoneConfig } : {},
|
|
140002
140005
|
...tabs ? { tabs } : {},
|
|
140003
140006
|
...input.cross_filtering === false ? { disableCrossFiltering: true } : {},
|
|
140004
140007
|
...input.user_filters_save === false ? { disableUserFilterSave: true } : {},
|
|
@@ -140277,6 +140280,14 @@ function yamlPluginToDeclarative$1(input) {
|
|
|
140277
140280
|
parameters: serialiseParameters(input.parameters ?? "")
|
|
140278
140281
|
};
|
|
140279
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
|
+
}
|
|
140280
140291
|
function isFilterGroup$1(filter) {
|
|
140281
140292
|
return typeof filter === "object" && filter !== null && "type" in filter && filter.type === "filter_group" && "filters" in filter;
|
|
140282
140293
|
}
|
|
@@ -141881,6 +141892,7 @@ function declarativeDashboardToYaml(entities, dashboard, filterContexts, context
|
|
|
141881
141892
|
if (content.disableUserFilterSave) doc.add(entryWithSpace("user_filters_save", false));
|
|
141882
141893
|
if (content.disableFilterViews) doc.add(entryWithSpace("filter_views", false));
|
|
141883
141894
|
if (content.disablePersistentFiltersAcrossTabs) doc.add(entryWithSpace("persistent_filters_across_tabs", false));
|
|
141895
|
+
if (content.timezoneConfig) doc.add(entryWithSpace("timezone_config", declarativeTimezoneConfigToYaml(content.timezoneConfig)));
|
|
141884
141896
|
const hasMultipleTabs = content.tabs && content.tabs.length > 1;
|
|
141885
141897
|
const hasSingleTabWithTitle = content.tabs?.length === 1 && content.tabs[0].title;
|
|
141886
141898
|
const shouldUseTabs = hasMultipleTabs || hasSingleTabWithTitle;
|
|
@@ -142035,6 +142047,13 @@ function declarativeRichTextWidgetToYaml(widget, size) {
|
|
|
142035
142047
|
if (size?.xl?.gridHeight) yamlWidget.add(new import_dist.Pair("rows", size.xl.gridHeight));
|
|
142036
142048
|
return yamlWidget;
|
|
142037
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
|
+
}
|
|
142038
142057
|
function declarativeVisualizationSwitcherWidgetToYaml(widget, size, entities, errorContext) {
|
|
142039
142058
|
const yamlWidget = new import_dist.YAMLMap();
|
|
142040
142059
|
if (widget.localIdentifier) yamlWidget.add(new import_dist.Pair("id", widget.localIdentifier));
|
|
@@ -146526,6 +146545,10 @@ const metadata_v1 = {
|
|
|
146526
146545
|
"type": "boolean",
|
|
146527
146546
|
"description": "Whether persistent filters across tabs are enabled for this dashboard. Defaults to true."
|
|
146528
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
|
+
},
|
|
146529
146552
|
"enable_section_headers": {
|
|
146530
146553
|
"type": "boolean",
|
|
146531
146554
|
"description": "Applies to the root layout. Whether all sections headers are enabled. Defaults to true."
|
|
@@ -151498,6 +151521,10 @@ const metadata_v1 = {
|
|
|
151498
151521
|
"type": "boolean",
|
|
151499
151522
|
"description": "Whether persistent filters across tabs are enabled for this dashboard. Defaults to true."
|
|
151500
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
|
+
},
|
|
151501
151528
|
"enable_section_headers": {
|
|
151502
151529
|
"type": "boolean",
|
|
151503
151530
|
"description": "Applies to the root layout. Whether all sections headers are enabled. Defaults to true."
|
|
@@ -151557,6 +151584,24 @@ const metadata_v1 = {
|
|
|
151557
151584
|
},
|
|
151558
151585
|
"required": ["id", "type"]
|
|
151559
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
|
+
},
|
|
151560
151605
|
"section": {
|
|
151561
151606
|
"type": "object",
|
|
151562
151607
|
"additionalProperties": false,
|
|
@@ -151610,6 +151655,16 @@ const metadata_v1 = {
|
|
|
151610
151655
|
"sections"
|
|
151611
151656
|
]
|
|
151612
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
|
+
},
|
|
151613
151668
|
"widget": {
|
|
151614
151669
|
"title": "Widget",
|
|
151615
151670
|
"type": "object",
|
|
@@ -159814,7 +159869,7 @@ async function open(state, emitter, file) {
|
|
|
159814
159869
|
//#endregion
|
|
159815
159870
|
//#region ../code/package.json
|
|
159816
159871
|
var name = "@gooddata/code";
|
|
159817
|
-
var version = "0.47.0-alpha.
|
|
159872
|
+
var version = "0.47.0-alpha.3";
|
|
159818
159873
|
//#endregion
|
|
159819
159874
|
//#region ../../../sdk/libs/api-client-tiger/src/axios.ts
|
|
159820
159875
|
/**
|
|
@@ -159836,7 +159891,7 @@ const _CONFIG = {
|
|
|
159836
159891
|
common: {
|
|
159837
159892
|
"X-Requested-With": "XMLHttpRequest",
|
|
159838
159893
|
"X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
|
|
159839
|
-
"X-GDC-JS-PACKAGE-VERSION": "11.51.0-alpha.
|
|
159894
|
+
"X-GDC-JS-PACKAGE-VERSION": "11.51.0-alpha.3"
|
|
159840
159895
|
},
|
|
159841
159896
|
post: { "Content-Type": "application/json;charset=utf8" },
|
|
159842
159897
|
put: { "Content-Type": "application/json;charset=utf8" }
|