@gooddata/code-cli 0.43.0-alpha.1 → 0.43.0-alpha.2
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/index.js +88 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37366,7 +37366,7 @@ function isPromise(value) {
|
|
|
37366
37366
|
//#endregion
|
|
37367
37367
|
//#region package.json
|
|
37368
37368
|
var name$1 = "@gooddata/code-cli";
|
|
37369
|
-
var version$1 = "0.43.0-alpha.
|
|
37369
|
+
var version$1 = "0.43.0-alpha.2";
|
|
37370
37370
|
//#endregion
|
|
37371
37371
|
//#region ../code/esm/features/references/types.js
|
|
37372
37372
|
var UpdateReferencesType;
|
|
@@ -40633,6 +40633,10 @@ const metadata_v1 = {
|
|
|
40633
40633
|
}
|
|
40634
40634
|
}
|
|
40635
40635
|
},
|
|
40636
|
+
"line_style_mapping": {
|
|
40637
|
+
"$ref": "#/$defs/lineStyleMapping",
|
|
40638
|
+
"description": "Per-series line style and weight overrides. Keys are measure identifiers."
|
|
40639
|
+
},
|
|
40636
40640
|
"conditional_formatting": {
|
|
40637
40641
|
"type": "object",
|
|
40638
40642
|
"description": "Conditional formatting rules that color cells or rows based on their values.",
|
|
@@ -42745,6 +42749,41 @@ const metadata_v1 = {
|
|
|
42745
42749
|
"snippets": ["color"]
|
|
42746
42750
|
}]
|
|
42747
42751
|
},
|
|
42752
|
+
"lineStyleMapping": {
|
|
42753
|
+
"title": "Line Style Mapping",
|
|
42754
|
+
"type": "object",
|
|
42755
|
+
"$semantic": {
|
|
42756
|
+
"type": "reference",
|
|
42757
|
+
"source": "current.query.metric.localId",
|
|
42758
|
+
"mode": "property"
|
|
42759
|
+
},
|
|
42760
|
+
"additionalProperties": {
|
|
42761
|
+
"type": "object",
|
|
42762
|
+
"additionalProperties": false,
|
|
42763
|
+
"minProperties": 1,
|
|
42764
|
+
"properties": {
|
|
42765
|
+
"style": {
|
|
42766
|
+
"type": "string",
|
|
42767
|
+
"enum": [
|
|
42768
|
+
"solid",
|
|
42769
|
+
"dashed",
|
|
42770
|
+
"dotted"
|
|
42771
|
+
],
|
|
42772
|
+
"description": "Line stroke style for this series."
|
|
42773
|
+
},
|
|
42774
|
+
"width": {
|
|
42775
|
+
"type": "integer",
|
|
42776
|
+
"enum": [
|
|
42777
|
+
1,
|
|
42778
|
+
2,
|
|
42779
|
+
3,
|
|
42780
|
+
4
|
|
42781
|
+
],
|
|
42782
|
+
"description": "Line stroke width in pixels for this series."
|
|
42783
|
+
}
|
|
42784
|
+
}
|
|
42785
|
+
}
|
|
42786
|
+
},
|
|
42748
42787
|
"complexColorItem": {
|
|
42749
42788
|
"title": "Color",
|
|
42750
42789
|
"oneOf": [{ "type": "number" }, {
|
|
@@ -90757,6 +90796,42 @@ function getIdByDef(def) {
|
|
|
90757
90796
|
}
|
|
90758
90797
|
}
|
|
90759
90798
|
/** @public */
|
|
90799
|
+
function loadLineStyleMapping(mappings) {
|
|
90800
|
+
if (!mappings || mappings.length === 0) return;
|
|
90801
|
+
const deduped = /* @__PURE__ */ new Map();
|
|
90802
|
+
for (const { id, lineStyle, lineWidth } of mappings) {
|
|
90803
|
+
const entry = {};
|
|
90804
|
+
if (lineStyle !== void 0) entry["style"] = lineStyle;
|
|
90805
|
+
if (lineWidth !== void 0) entry["width"] = lineWidth;
|
|
90806
|
+
if (Object.keys(entry).length > 0) deduped.set(id, entry);
|
|
90807
|
+
}
|
|
90808
|
+
if (deduped.size === 0) return;
|
|
90809
|
+
const map = new import_dist$1.YAMLMap();
|
|
90810
|
+
for (const [id, entry] of deduped) map.add(new import_dist$1.Pair(id, entry));
|
|
90811
|
+
return map;
|
|
90812
|
+
}
|
|
90813
|
+
const VALID_LINE_STYLES = [
|
|
90814
|
+
"solid",
|
|
90815
|
+
"dashed",
|
|
90816
|
+
"dotted"
|
|
90817
|
+
];
|
|
90818
|
+
const VALID_LINE_WIDTHS = [
|
|
90819
|
+
1,
|
|
90820
|
+
2,
|
|
90821
|
+
3,
|
|
90822
|
+
4
|
|
90823
|
+
];
|
|
90824
|
+
/** @public */
|
|
90825
|
+
function saveLineStyleMapping(mapping) {
|
|
90826
|
+
if (!mapping) return;
|
|
90827
|
+
const entries = Object.entries(mapping).map(([id, val]) => ({
|
|
90828
|
+
id,
|
|
90829
|
+
lineStyle: VALID_LINE_STYLES.includes(val.style) ? val.style : void 0,
|
|
90830
|
+
lineWidth: VALID_LINE_WIDTHS.includes(val.width) ? val.width : void 0
|
|
90831
|
+
})).filter((e) => e.lineStyle !== void 0 || e.lineWidth !== void 0);
|
|
90832
|
+
return entries.length > 0 ? entries : void 0;
|
|
90833
|
+
}
|
|
90834
|
+
/** @public */
|
|
90760
90835
|
function loadColumnsWidth(widths) {
|
|
90761
90836
|
if (widths.length === 0) return;
|
|
90762
90837
|
return widths.map((width) => {
|
|
@@ -91731,7 +91806,8 @@ const DEFAULTS$16 = {
|
|
|
91731
91806
|
disableKeyDriveAnalysisOn: {},
|
|
91732
91807
|
customTooltip: DEFAULT_CUSTOM_TOOLTIP,
|
|
91733
91808
|
thresholdMeasures: [],
|
|
91734
|
-
thresholdExcludedMeasures: []
|
|
91809
|
+
thresholdExcludedMeasures: [],
|
|
91810
|
+
lineStyleMapping: []
|
|
91735
91811
|
};
|
|
91736
91812
|
/** @internal */
|
|
91737
91813
|
function comboChartLoad(props) {
|
|
@@ -91806,6 +91882,7 @@ function comboChartLoad(props) {
|
|
|
91806
91882
|
case "customTooltip": return [["custom_tooltip", loadCustomTooltip(value)]];
|
|
91807
91883
|
case "thresholdMeasures": return [["line_style_control_metrics", getValueOrDefault(value, DEFAULTS$16.thresholdMeasures, "array")]];
|
|
91808
91884
|
case "thresholdExcludedMeasures": return [["line_style_excluded_metrics", getValueOrDefault(value, DEFAULTS$16.thresholdExcludedMeasures, "array")]];
|
|
91885
|
+
case "lineStyleMapping": return [["line_style_mapping", loadLineStyleMapping(value)]];
|
|
91809
91886
|
default: return [];
|
|
91810
91887
|
}
|
|
91811
91888
|
});
|
|
@@ -91881,7 +91958,8 @@ function comboChartSave(_fields, config, buckets = []) {
|
|
|
91881
91958
|
disableKeyDriveAnalysisOn: saveConfigObject(config.disable_key_drive_analysis),
|
|
91882
91959
|
customTooltip: saveConfigObject(saveCustomTooltip(config.custom_tooltip)),
|
|
91883
91960
|
thresholdMeasures: getValueOrDefault(config.line_style_control_metrics, DEFAULTS$16.thresholdMeasures, "array"),
|
|
91884
|
-
thresholdExcludedMeasures: getValueOrDefault(config.line_style_excluded_metrics, DEFAULTS$16.thresholdExcludedMeasures, "array")
|
|
91961
|
+
thresholdExcludedMeasures: getValueOrDefault(config.line_style_excluded_metrics, DEFAULTS$16.thresholdExcludedMeasures, "array"),
|
|
91962
|
+
lineStyleMapping: saveLineStyleMapping(config["line_style_mapping"])
|
|
91885
91963
|
});
|
|
91886
91964
|
}
|
|
91887
91965
|
/**
|
|
@@ -92761,7 +92839,8 @@ const DEFAULTS$8 = {
|
|
|
92761
92839
|
disableKeyDriveAnalysisOn: {},
|
|
92762
92840
|
customTooltip: DEFAULT_CUSTOM_TOOLTIP,
|
|
92763
92841
|
thresholdMeasures: [],
|
|
92764
|
-
thresholdExcludedMeasures: []
|
|
92842
|
+
thresholdExcludedMeasures: [],
|
|
92843
|
+
lineStyleMapping: []
|
|
92765
92844
|
};
|
|
92766
92845
|
/** @internal */
|
|
92767
92846
|
function lineChartLoad(props) {
|
|
@@ -92835,6 +92914,7 @@ function lineChartLoad(props) {
|
|
|
92835
92914
|
case "customTooltip": return [["custom_tooltip", loadCustomTooltip(value)]];
|
|
92836
92915
|
case "thresholdMeasures": return [["line_style_control_metrics", getValueOrDefault(value, DEFAULTS$8.thresholdMeasures, "array")]];
|
|
92837
92916
|
case "thresholdExcludedMeasures": return [["line_style_excluded_metrics", getValueOrDefault(value, DEFAULTS$8.thresholdExcludedMeasures, "array")]];
|
|
92917
|
+
case "lineStyleMapping": return [["line_style_mapping", loadLineStyleMapping(value)]];
|
|
92838
92918
|
default: return [];
|
|
92839
92919
|
}
|
|
92840
92920
|
});
|
|
@@ -92899,7 +92979,8 @@ function lineChartSave(_fields, config) {
|
|
|
92899
92979
|
disableKeyDriveAnalysisOn: saveConfigObject(config.disable_key_drive_analysis),
|
|
92900
92980
|
customTooltip: saveConfigObject(saveCustomTooltip(config.custom_tooltip)),
|
|
92901
92981
|
thresholdMeasures: getValueOrDefault(config.line_style_control_metrics, DEFAULTS$8.thresholdMeasures, "array"),
|
|
92902
|
-
thresholdExcludedMeasures: getValueOrDefault(config.line_style_excluded_metrics, DEFAULTS$8.thresholdExcludedMeasures, "array")
|
|
92982
|
+
thresholdExcludedMeasures: getValueOrDefault(config.line_style_excluded_metrics, DEFAULTS$8.thresholdExcludedMeasures, "array"),
|
|
92983
|
+
lineStyleMapping: saveLineStyleMapping(config["line_style_mapping"])
|
|
92903
92984
|
});
|
|
92904
92985
|
}
|
|
92905
92986
|
/**
|
|
@@ -151405,7 +151486,7 @@ const _CONFIG = {
|
|
|
151405
151486
|
common: {
|
|
151406
151487
|
"X-Requested-With": "XMLHttpRequest",
|
|
151407
151488
|
"X-GDC-JS-PACKAGE": "@gooddata/api-client-tiger",
|
|
151408
|
-
"X-GDC-JS-PACKAGE-VERSION": "11.47.0-alpha.
|
|
151489
|
+
"X-GDC-JS-PACKAGE-VERSION": "11.47.0-alpha.2"
|
|
151409
151490
|
},
|
|
151410
151491
|
post: { "Content-Type": "application/json;charset=utf8" },
|
|
151411
151492
|
put: { "Content-Type": "application/json;charset=utf8" }
|
|
@@ -196999,7 +197080,7 @@ async function get(state, opts) {
|
|
|
196999
197080
|
//#endregion
|
|
197000
197081
|
//#region ../code/package.json
|
|
197001
197082
|
var name = "@gooddata/code";
|
|
197002
|
-
var version = "0.43.0-alpha.
|
|
197083
|
+
var version = "0.43.0-alpha.2";
|
|
197003
197084
|
//#endregion
|
|
197004
197085
|
//#region ../code/esm/actions/initialize.js
|
|
197005
197086
|
async function initialize(state, emitter, options) {
|