@gooddata/sdk-ui-catalog 11.51.0-alpha.3 → 11.51.0-alpha.5
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/esm/asCode/AsCodeDialog.d.ts.map +1 -1
- package/esm/asCode/AsCodeDialog.js +28 -15
- package/esm/asCode/AsCodeEditorBody.d.ts +2 -2
- package/esm/asCode/AsCodeEditorBody.d.ts.map +1 -1
- package/esm/asCode/AsCodeEditorBody.js +1 -0
- package/esm/asCode/descriptor.d.ts +13 -3
- package/esm/asCode/descriptor.d.ts.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/localization/bundles/de-DE.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/de-DE.localization-bundle.js +9 -2
- package/esm/localization/bundles/en-AU.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-AU.localization-bundle.js +9 -2
- package/esm/localization/bundles/en-GB.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-GB.localization-bundle.js +9 -2
- package/esm/localization/bundles/en-US.localization-bundle.d.ts +28 -0
- package/esm/localization/bundles/en-US.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/en-US.localization-bundle.js +31 -3
- package/esm/localization/bundles/es-419.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/es-419.localization-bundle.js +9 -2
- package/esm/localization/bundles/es-ES.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/es-ES.localization-bundle.js +9 -2
- package/esm/localization/bundles/fi-FI.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fi-FI.localization-bundle.js +9 -2
- package/esm/localization/bundles/fr-CA.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fr-CA.localization-bundle.js +9 -2
- package/esm/localization/bundles/fr-FR.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/fr-FR.localization-bundle.js +9 -2
- package/esm/localization/bundles/id-ID.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/id-ID.localization-bundle.js +9 -2
- package/esm/localization/bundles/it-IT.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/it-IT.localization-bundle.js +9 -2
- package/esm/localization/bundles/ja-JP.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ja-JP.localization-bundle.js +9 -2
- package/esm/localization/bundles/ko-KR.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ko-KR.localization-bundle.js +9 -2
- package/esm/localization/bundles/nl-NL.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/nl-NL.localization-bundle.js +9 -2
- package/esm/localization/bundles/pl-PL.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pl-PL.localization-bundle.js +9 -2
- package/esm/localization/bundles/pt-BR.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pt-BR.localization-bundle.js +9 -2
- package/esm/localization/bundles/pt-PT.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/pt-PT.localization-bundle.js +9 -2
- package/esm/localization/bundles/ru-RU.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/ru-RU.localization-bundle.js +9 -2
- package/esm/localization/bundles/sl-SI.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/sl-SI.localization-bundle.js +9 -2
- package/esm/localization/bundles/th-TH.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/th-TH.localization-bundle.js +9 -2
- package/esm/localization/bundles/tr-TR.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/tr-TR.localization-bundle.js +9 -2
- package/esm/localization/bundles/uk-UA.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/uk-UA.localization-bundle.js +9 -2
- package/esm/localization/bundles/vi-VN.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/vi-VN.localization-bundle.js +9 -2
- package/esm/localization/bundles/zh-HK.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-HK.localization-bundle.js +9 -2
- package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-Hans.localization-bundle.js +9 -2
- package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts +7 -0
- package/esm/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/localization/bundles/zh-Hant.localization-bundle.js +9 -2
- package/esm/metric/metricDescriptor.d.ts.map +1 -1
- package/esm/metric/metricDescriptor.js +6 -2
- package/esm/parameter/parameterCompletions.d.ts +1 -1
- package/esm/parameter/parameterCompletions.d.ts.map +1 -1
- package/esm/parameter/parameterCompletions.js +50 -23
- package/esm/parameter/parameterDescriptor.d.ts.map +1 -1
- package/esm/parameter/parameterDescriptor.js +14 -2
- package/esm/parameter/parameterSchema.d.ts +55 -15
- package/esm/parameter/parameterSchema.d.ts.map +1 -1
- package/esm/parameter/parameterSchema.js +60 -38
- package/esm/parameter/parameterValidation.d.ts +2 -2
- package/esm/parameter/parameterValidation.d.ts.map +1 -1
- package/esm/parameter/parameterValidation.js +7 -5
- package/esm/sdk-ui-catalog.d.ts +14 -3
- package/package.json +15 -15
- package/styles/css/codeDialog.css +10 -0
- package/styles/css/codeDialog.css.map +1 -1
- package/styles/css/detail.css +10 -0
- package/styles/css/detail.css.map +1 -1
- package/styles/css/main.css +10 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/codeDialog.scss +11 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { snippetCompletion, } from "@codemirror/autocomplete";
|
|
2
3
|
import { parameterSchemaKeys } from "./parameterSchema.js";
|
|
3
4
|
/**
|
|
4
5
|
* Creates a CodeMirror completion source that suggests allowed YAML property
|
|
@@ -10,8 +11,8 @@ import { parameterSchemaKeys } from "./parameterSchema.js";
|
|
|
10
11
|
* always offer every enabled type.
|
|
11
12
|
*/
|
|
12
13
|
export function createParameterCompletions(enabledTypes) {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
14
|
+
const vocabularyByType = new Map(enabledTypes.map((type) => [type, toVocabulary(parameterSchemaKeys([type]))]));
|
|
15
|
+
const fallbackVocabulary = toVocabulary(parameterSchemaKeys(enabledTypes));
|
|
15
16
|
const typeValueOptions = {
|
|
16
17
|
"": [{ label: "parameter", type: "constant" }],
|
|
17
18
|
definition: enabledTypes.map((label) => ({ label, type: "constant" })),
|
|
@@ -19,45 +20,63 @@ export function createParameterCompletions(enabledTypes) {
|
|
|
19
20
|
return function completeParameter(context) {
|
|
20
21
|
const line = context.state.doc.lineAt(context.pos);
|
|
21
22
|
const before = line.text.slice(0, context.pos - line.from);
|
|
22
|
-
// Trigger on a key name at the start of a line,
|
|
23
|
+
// Trigger on a key name at the start of a line, on a key inside a sequence item, or on the
|
|
24
|
+
// value of a `type:` key; the three patterns are mutually exclusive.
|
|
23
25
|
const keyMatch = before.match(/^(\s*)(\w*)$/);
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
+
const itemMatch = before.match(/^(\s*)-\s+(\w*)$/);
|
|
27
|
+
const typeMatch = before.match(/^(\s*)type:\s+(\w*)$/);
|
|
28
|
+
const match = keyMatch ?? itemMatch ?? typeMatch;
|
|
26
29
|
if (!match) {
|
|
27
30
|
return null;
|
|
28
31
|
}
|
|
29
32
|
const indent = match[1].length;
|
|
30
33
|
const word = match[2];
|
|
31
|
-
const
|
|
32
|
-
|
|
34
|
+
const from = context.pos - word.length;
|
|
35
|
+
const parent = getParentKey(context.state.doc, line.number, indent);
|
|
36
|
+
if (parent === null) {
|
|
33
37
|
return null;
|
|
34
38
|
}
|
|
39
|
+
if (typeMatch) {
|
|
40
|
+
const options = typeValueOptions[parent.key];
|
|
41
|
+
return options ? { from, options } : null;
|
|
42
|
+
}
|
|
35
43
|
const declaredType = getDeclaredType(context.state.doc);
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
44
|
+
const vocabulary = (declaredType ? vocabularyByType.get(declaredType) : undefined) ?? fallbackVocabulary;
|
|
45
|
+
const entry = vocabulary[parent.key];
|
|
46
|
+
// A sequence's keys are valid only inside a `- ` item; a mapping's keys only outside one.
|
|
47
|
+
const inItem = itemMatch !== null || parent.inItem;
|
|
48
|
+
if (!entry || (entry.kind === "sequence") !== inItem) {
|
|
39
49
|
return null;
|
|
40
50
|
}
|
|
41
|
-
return { from:
|
|
51
|
+
return { from, options: entry.options };
|
|
42
52
|
};
|
|
43
53
|
}
|
|
44
|
-
function
|
|
45
|
-
return Object.fromEntries(Object.entries(
|
|
54
|
+
function toVocabulary(schemaKeys) {
|
|
55
|
+
return Object.fromEntries(Object.entries(schemaKeys).map(([parent, { kind, keys }]) => [
|
|
46
56
|
parent,
|
|
47
|
-
keys.map((
|
|
57
|
+
{ kind, options: keys.map((key) => toKeyOption(key, schemaKeys)) },
|
|
48
58
|
]));
|
|
49
59
|
}
|
|
60
|
+
function toKeyOption(label, schemaKeys) {
|
|
61
|
+
const child = schemaKeys[label];
|
|
62
|
+
if (child?.kind === "sequence") {
|
|
63
|
+
return snippetCompletion(`${label}:\n\t- ${child.keys[0]}: \${}`, { label, type: "property" });
|
|
64
|
+
}
|
|
65
|
+
return { label, type: "property" };
|
|
66
|
+
}
|
|
50
67
|
/**
|
|
51
|
-
* The key whose block
|
|
52
|
-
* `key
|
|
68
|
+
* The key whose block a new entry at column `indent` would join: the nearest less-indented `key:` line
|
|
69
|
+
* above. `key` is `""` only for the top-level mapping (`indent === 0`); the result is `null` when the
|
|
53
70
|
* enclosing line is not a mapping key or an indented line has no less-indented ancestor above it (an
|
|
54
|
-
* orphaned line, which is not top-level).
|
|
55
|
-
*
|
|
56
|
-
*
|
|
71
|
+
* orphaned line, which is not top-level). When the nearest ancestor is a sequence item, it resolves
|
|
72
|
+
* to the key owning that sequence with `inItem` set, so continuation lines inside an item
|
|
73
|
+
* report the list's key (e.g. `allowedValues`). Derived purely from indentation, not from a parsed
|
|
74
|
+
* syntax tree, so it also resolves the parent on a blank indented line; the flip side is that it does
|
|
75
|
+
* not understand block scalars (`|`, `>`), whose literal content is scanned as if it were mapping keys.
|
|
57
76
|
*/
|
|
58
77
|
function getParentKey(doc, lineNumber, indent) {
|
|
59
78
|
if (indent === 0) {
|
|
60
|
-
return "";
|
|
79
|
+
return { key: "", inItem: false };
|
|
61
80
|
}
|
|
62
81
|
for (let number = lineNumber - 1; number >= 1; number--) {
|
|
63
82
|
const text = doc.line(number).text;
|
|
@@ -66,7 +85,12 @@ function getParentKey(doc, lineNumber, indent) {
|
|
|
66
85
|
if (content === "" || content.startsWith("#") || text.length - content.length >= indent) {
|
|
67
86
|
continue;
|
|
68
87
|
}
|
|
69
|
-
|
|
88
|
+
if (content === "-" || content.startsWith("- ")) {
|
|
89
|
+
const parent = getParentKey(doc, number, text.length - content.length);
|
|
90
|
+
return parent && { key: parent.key, inItem: true };
|
|
91
|
+
}
|
|
92
|
+
const key = content.match(/^([\w-]+):/)?.[1];
|
|
93
|
+
return key === undefined ? null : { key, inItem: false };
|
|
70
94
|
}
|
|
71
95
|
// Indented with no less-indented ancestor: an orphaned line, not top-level.
|
|
72
96
|
return null;
|
|
@@ -79,8 +103,11 @@ function getParentKey(doc, lineNumber, indent) {
|
|
|
79
103
|
function getDeclaredType(doc) {
|
|
80
104
|
for (let number = 1; number <= doc.lines; number++) {
|
|
81
105
|
const match = doc.line(number).text.match(/^(\s+)type:\s*(\w+)/);
|
|
82
|
-
if (match
|
|
83
|
-
|
|
106
|
+
if (match) {
|
|
107
|
+
const parent = getParentKey(doc, number, match[1].length);
|
|
108
|
+
if (parent?.key === "definition" && !parent.inItem) {
|
|
109
|
+
return match[2];
|
|
110
|
+
}
|
|
84
111
|
}
|
|
85
112
|
}
|
|
86
113
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameterDescriptor.d.ts","sourceRoot":"","sources":["../../src/parameter/parameterDescriptor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AAQ9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"parameterDescriptor.d.ts","sourceRoot":"","sources":["../../src/parameter/parameterDescriptor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,qBAAqB,CAAC;AAQ9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAoFrE;;GAEG;AACH,eAAO,MAAM,mBAAmB,gHAiC9B,CAAC"}
|
|
@@ -36,6 +36,14 @@ const errorMessages = defineMessages({
|
|
|
36
36
|
invalidDefaultValue: { id: "analyticsCatalog.parameter.validation.invalidDefaultValue" },
|
|
37
37
|
invalidConstraints: { id: "analyticsCatalog.parameter.validation.invalidConstraints" },
|
|
38
38
|
invalidConstraintRange: { id: "analyticsCatalog.parameter.validation.invalidConstraintRange" },
|
|
39
|
+
invalidAllowedValue: { id: "analyticsCatalog.parameter.validation.invalidAllowedValue" },
|
|
40
|
+
invalidAllowedValueTitle: { id: "analyticsCatalog.parameter.validation.invalidAllowedValueTitle" },
|
|
41
|
+
duplicateAllowedValues: { id: "analyticsCatalog.parameter.validation.duplicateAllowedValues" },
|
|
42
|
+
emptyAllowedValues: { id: "analyticsCatalog.parameter.validation.emptyAllowedValues" },
|
|
43
|
+
constraintsAllowedValuesExclusive: {
|
|
44
|
+
id: "analyticsCatalog.parameter.validation.constraintsAllowedValuesExclusive",
|
|
45
|
+
},
|
|
46
|
+
unsupportedCardinality: { id: "analyticsCatalog.parameter.validation.unsupportedCardinality" },
|
|
39
47
|
invalidTags: { id: "analyticsCatalog.parameter.validation.invalidTags" },
|
|
40
48
|
});
|
|
41
49
|
function useParameterEditing() {
|
|
@@ -45,8 +53,12 @@ function useParameterEditing() {
|
|
|
45
53
|
return useMemo(() => ({
|
|
46
54
|
completionSource,
|
|
47
55
|
syntaxErrorMessage: intl.formatMessage(errorMessages.syntax),
|
|
48
|
-
// Parameter YAML round-trips 1:1 to its definition, so serialization is a plain stringify
|
|
49
|
-
|
|
56
|
+
// Parameter YAML round-trips 1:1 to its definition, so serialization is a plain stringify and
|
|
57
|
+
// every definition has a code form.
|
|
58
|
+
serialize: (definition) => ({
|
|
59
|
+
yaml: serializeParameterToYaml(definition),
|
|
60
|
+
hasCodeForm: true,
|
|
61
|
+
}),
|
|
50
62
|
validate: (value, context) => {
|
|
51
63
|
const result = validateParameterYaml(value, {
|
|
52
64
|
enabledTypes,
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import * as z from "zod/mini";
|
|
2
2
|
import type { ParameterType } from "@gooddata/sdk-model";
|
|
3
|
+
/**
|
|
4
|
+
* Codes carried by schema issues via `issue.message`; `classifySchemaError` routes each to the
|
|
5
|
+
* equally named validation error code, so every entry needs a localized message wired up.
|
|
6
|
+
*/
|
|
7
|
+
export declare const schemaErrorCodes: readonly ["invalidConstraintRange", "invalidAllowedValue", "invalidAllowedValueTitle", "duplicateAllowedValues", "emptyAllowedValues", "constraintsAllowedValuesExclusive", "unsupportedCardinality", "invalidDefaultValue"];
|
|
8
|
+
export type SchemaErrorCode = (typeof schemaErrorCodes)[number];
|
|
9
|
+
export type ParameterSchemaInput = z.input<typeof parameterSchema>;
|
|
10
|
+
export type ParameterSchema = z.infer<typeof parameterSchema>;
|
|
11
|
+
export type ParameterSchemaKeys = Record<string, SchemaKeysEntry>;
|
|
12
|
+
/** Child keys reachable under a parent key: directly in its mapping, or inside each item of its sequence. */
|
|
13
|
+
export type SchemaKeysEntry = {
|
|
14
|
+
kind: "mapping" | "sequence";
|
|
15
|
+
keys: string[];
|
|
16
|
+
};
|
|
17
|
+
/** Parent key → child-key entry for the schema restricted to `enabledTypes`; powers YAML editor autocompletion. */
|
|
18
|
+
export declare function parameterSchemaKeys(enabledTypes: ParameterType[]): ParameterSchemaKeys;
|
|
19
|
+
/** Runtime validation schema restricted to the enabled types; the static types stay the full union. */
|
|
20
|
+
export declare function buildParameterSchema(enabledTypes: ParameterType[]): z.ZodMiniObject<{
|
|
21
|
+
definition: z.ZodMiniDiscriminatedUnion<readonly [z.core.$ZodTypeDiscriminable, ...z.core.$ZodTypeDiscriminable[]], "type">;
|
|
22
|
+
type: z.ZodMiniDefault<z.ZodMiniLiteral<"parameter">>;
|
|
23
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
24
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
25
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
26
|
+
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
27
|
+
}, z.core.$strict>;
|
|
3
28
|
/** Full-union schema: single source for the editor vocabulary and the exported types, independent of the flag. */
|
|
4
29
|
declare const parameterSchema: z.ZodMiniObject<{
|
|
5
30
|
type: z.ZodMiniDefault<z.ZodMiniLiteral<"parameter">>;
|
|
@@ -14,27 +39,42 @@ declare const parameterSchema: z.ZodMiniObject<{
|
|
|
14
39
|
min: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
15
40
|
max: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
16
41
|
}, z.core.$strict>>;
|
|
17
|
-
}, z.core.$strict>, z.ZodMiniObject<{
|
|
42
|
+
}, z.core.$strict>, z.ZodMiniPipe<z.ZodMiniObject<{
|
|
18
43
|
type: z.ZodMiniLiteral<"STRING">;
|
|
19
44
|
defaultValue: z.ZodMiniString<string>;
|
|
20
45
|
constraints: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
21
46
|
minLength: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
22
47
|
maxLength: z.ZodMiniOptional<z.ZodMiniNumberFormat>;
|
|
48
|
+
allowedValues: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
49
|
+
value: z.ZodMiniString<string>;
|
|
50
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
|
+
}, z.core.$strict>>>;
|
|
23
52
|
}, z.core.$strict>>;
|
|
24
|
-
|
|
25
|
-
}, z.core.$strict
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
cardinality: z.ZodMiniOptional<z.ZodMiniLiteral<"multi" | "single">>;
|
|
54
|
+
}, z.core.$strict>, z.ZodMiniTransform<{
|
|
55
|
+
type: "STRING";
|
|
56
|
+
defaultValue: string;
|
|
57
|
+
constraints?: {
|
|
58
|
+
minLength?: number | undefined;
|
|
59
|
+
maxLength?: number | undefined;
|
|
60
|
+
allowedValues?: {
|
|
61
|
+
value: string;
|
|
62
|
+
title?: string | undefined;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
} | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
type: "STRING";
|
|
67
|
+
defaultValue: string;
|
|
68
|
+
constraints?: {
|
|
69
|
+
minLength?: number | undefined;
|
|
70
|
+
maxLength?: number | undefined;
|
|
71
|
+
allowedValues?: {
|
|
72
|
+
value: string;
|
|
73
|
+
title?: string | undefined;
|
|
74
|
+
}[] | undefined;
|
|
75
|
+
} | undefined;
|
|
76
|
+
cardinality?: "multi" | "single" | undefined;
|
|
77
|
+
}>>], "type">;
|
|
38
78
|
}, z.core.$strict>;
|
|
39
79
|
export {};
|
|
40
80
|
//# sourceMappingURL=parameterSchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameterSchema.d.ts","sourceRoot":"","sources":["../../src/parameter/parameterSchema.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"parameterSchema.d.ts","sourceRoot":"","sources":["../../src/parameter/parameterSchema.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,8NASnB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAElE,6GAA6G;AAC7G,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,SAAS,GAAG,UAAU,CAAC;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,qHAAmH;AACnH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,aAAa,EAAE,GAAG,mBAAmB,CAEtF;AAED,uGAAuG;AACvG,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,aAAa,EAAE;;;;;;;mBAMjE;AAkFD,kHAAkH;AAClH,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOnB,CAAC"}
|
|
@@ -1,39 +1,53 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { union } from "lodash-es";
|
|
3
3
|
import * as z from "zod/mini";
|
|
4
|
+
/**
|
|
5
|
+
* Codes carried by schema issues via `issue.message`; `classifySchemaError` routes each to the
|
|
6
|
+
* equally named validation error code, so every entry needs a localized message wired up.
|
|
7
|
+
*/
|
|
8
|
+
export const schemaErrorCodes = [
|
|
9
|
+
"invalidConstraintRange",
|
|
10
|
+
"invalidAllowedValue",
|
|
11
|
+
"invalidAllowedValueTitle",
|
|
12
|
+
"duplicateAllowedValues",
|
|
13
|
+
"emptyAllowedValues",
|
|
14
|
+
"constraintsAllowedValuesExclusive",
|
|
15
|
+
"unsupportedCardinality",
|
|
16
|
+
"invalidDefaultValue",
|
|
17
|
+
];
|
|
18
|
+
/** Parent key → child-key entry for the schema restricted to `enabledTypes`; powers YAML editor autocompletion. */
|
|
19
|
+
export function parameterSchemaKeys(enabledTypes) {
|
|
20
|
+
return deriveSchemaKeys(buildParameterSchema(enabledTypes));
|
|
21
|
+
}
|
|
22
|
+
/** Runtime validation schema restricted to the enabled types; the static types stay the full union. */
|
|
23
|
+
export function buildParameterSchema(enabledTypes) {
|
|
24
|
+
// Re-spread to a non-empty tuple: `discriminatedUnion` requires it and it preserves the inferred union.
|
|
25
|
+
const [first, ...rest] = enabledTypes.map((type) => definitionSchemas[type]);
|
|
26
|
+
return z.extend(parameterSchema, {
|
|
27
|
+
definition: z.discriminatedUnion("type", [first, ...rest]),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
4
30
|
const numberConstraintsSchema = z
|
|
5
31
|
.strictObject({
|
|
6
32
|
min: z.optional(z.number()),
|
|
7
33
|
max: z.optional(z.number()),
|
|
8
34
|
})
|
|
9
|
-
.check((
|
|
10
|
-
const { min, max } = ctx.value;
|
|
11
|
-
if (min !== undefined && max !== undefined && min > max) {
|
|
12
|
-
ctx.issues.push({
|
|
13
|
-
code: "custom",
|
|
14
|
-
message: "invalidConstraintRange",
|
|
15
|
-
input: ctx.value,
|
|
16
|
-
path: [],
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
35
|
+
.check(rule("invalidConstraintRange", ({ min, max }) => min === undefined || max === undefined || min <= max));
|
|
20
36
|
const lengthSchema = z.int().check(z.nonnegative());
|
|
37
|
+
const allowedValueSchema = z
|
|
38
|
+
.strictObject({
|
|
39
|
+
value: z.string("invalidAllowedValue"),
|
|
40
|
+
title: z.optional(z.string("invalidAllowedValueTitle")),
|
|
41
|
+
})
|
|
42
|
+
.check(rule("invalidAllowedValue", ({ value }) => value !== ""), rule("invalidAllowedValueTitle", ({ value, title }) => (title ?? value).trim() !== ""));
|
|
43
|
+
const allowedValuesSchema = z.array(allowedValueSchema).check(rule("emptyAllowedValues", (entries) => entries.length > 0), rule("duplicateAllowedValues", (entries) => allUnique(entries.map((entry) => entry.value))), rule("duplicateAllowedValues", (entries) => allUnique(entries.map((entry) => entry.title ?? entry.value))));
|
|
21
44
|
const stringConstraintsSchema = z
|
|
22
45
|
.strictObject({
|
|
23
46
|
minLength: z.optional(lengthSchema),
|
|
24
47
|
maxLength: z.optional(lengthSchema),
|
|
48
|
+
allowedValues: z.optional(allowedValuesSchema),
|
|
25
49
|
})
|
|
26
|
-
.check((
|
|
27
|
-
const { minLength, maxLength } = ctx.value;
|
|
28
|
-
if (minLength !== undefined && maxLength !== undefined && minLength > maxLength) {
|
|
29
|
-
ctx.issues.push({
|
|
30
|
-
code: "custom",
|
|
31
|
-
message: "invalidConstraintRange",
|
|
32
|
-
input: ctx.value,
|
|
33
|
-
path: [],
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
});
|
|
50
|
+
.check(rule("invalidConstraintRange", ({ minLength, maxLength }) => minLength === undefined || maxLength === undefined || minLength <= maxLength), rule("constraintsAllowedValuesExclusive", ({ minLength, maxLength, allowedValues }) => allowedValues === undefined || (minLength === undefined && maxLength === undefined)));
|
|
37
51
|
/** One arm per model type; `satisfies` breaks the build if the model gains a type without an arm. */
|
|
38
52
|
const definitionSchemas = {
|
|
39
53
|
NUMBER: z.strictObject({
|
|
@@ -41,11 +55,15 @@ const definitionSchemas = {
|
|
|
41
55
|
defaultValue: z.number(),
|
|
42
56
|
constraints: z.optional(numberConstraintsSchema),
|
|
43
57
|
}),
|
|
44
|
-
STRING: z.
|
|
58
|
+
STRING: z.pipe(z
|
|
59
|
+
.strictObject({
|
|
45
60
|
type: z.literal("STRING"),
|
|
46
61
|
defaultValue: z.string(),
|
|
47
62
|
constraints: z.optional(stringConstraintsSchema),
|
|
48
|
-
|
|
63
|
+
cardinality: z.optional(z.literal(["single", "multi"], "unsupportedCardinality")),
|
|
64
|
+
})
|
|
65
|
+
.check(rule("unsupportedCardinality", ({ cardinality }) => cardinality !== "multi", ["cardinality"]), rule("invalidDefaultValue", ({ defaultValue, constraints }) => !constraints?.allowedValues?.length ||
|
|
66
|
+
constraints.allowedValues.some((allowed) => allowed.value === defaultValue), ["defaultValue"])), z.transform(({ cardinality: _cardinality, ...definition }) => definition)),
|
|
49
67
|
};
|
|
50
68
|
/** Full-union schema: single source for the editor vocabulary and the exported types, independent of the flag. */
|
|
51
69
|
const parameterSchema = z.strictObject({
|
|
@@ -56,25 +74,26 @@ const parameterSchema = z.strictObject({
|
|
|
56
74
|
tags: z.optional(z.array(z.string())),
|
|
57
75
|
definition: z.discriminatedUnion("type", [definitionSchemas.NUMBER, definitionSchemas.STRING]),
|
|
58
76
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return deriveSchemaKeys(buildParameterSchema(enabledTypes));
|
|
77
|
+
function rule(code, predicate, path) {
|
|
78
|
+
return z.refine(predicate, { message: code, path });
|
|
62
79
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// Re-spread to a non-empty tuple: `discriminatedUnion` requires it and it preserves the inferred union.
|
|
66
|
-
const [first, ...rest] = enabledTypes.map((type) => definitionSchemas[type]);
|
|
67
|
-
return z.extend(parameterSchema, {
|
|
68
|
-
definition: z.discriminatedUnion("type", [first, ...rest]),
|
|
69
|
-
});
|
|
80
|
+
function allUnique(items) {
|
|
81
|
+
return new Set(items).size === items.length;
|
|
70
82
|
}
|
|
71
|
-
/** Map of parent key →
|
|
72
|
-
function deriveSchemaKeys(schema, parentKey = "", result = {}) {
|
|
83
|
+
/** Map of parent key → child-key entry; an array-of-objects child is recorded as a `sequence` entry. */
|
|
84
|
+
function deriveSchemaKeys(schema, parentKey = "", kind = "mapping", result = {}) {
|
|
73
85
|
for (const object of objectSchemasOf(schema)) {
|
|
74
86
|
const { shape } = object._zod.def;
|
|
75
|
-
result[parentKey] = union(result[parentKey], Object.keys(shape));
|
|
87
|
+
result[parentKey] = { kind, keys: union(result[parentKey]?.keys, Object.keys(shape)) };
|
|
76
88
|
for (const [key, child] of Object.entries(shape)) {
|
|
77
|
-
|
|
89
|
+
const inner = unwrap(child);
|
|
90
|
+
if (inner._zod.def.type === "array") {
|
|
91
|
+
const element = unwrap(inner._zod.def.element);
|
|
92
|
+
deriveSchemaKeys(element, key, "sequence", result);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
deriveSchemaKeys(inner, key, "mapping", result);
|
|
96
|
+
}
|
|
78
97
|
}
|
|
79
98
|
}
|
|
80
99
|
return result;
|
|
@@ -95,5 +114,8 @@ function unwrap(schema) {
|
|
|
95
114
|
if (type === "optional" || type === "default") {
|
|
96
115
|
return unwrap(schema._zod.def.innerType);
|
|
97
116
|
}
|
|
117
|
+
if (type === "pipe") {
|
|
118
|
+
return unwrap(schema._zod.def.in);
|
|
119
|
+
}
|
|
98
120
|
return schema;
|
|
99
121
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ParameterType } from "@gooddata/sdk-model";
|
|
2
|
-
import { type ParameterSchema } from "./parameterSchema.js";
|
|
2
|
+
import { type ParameterSchema, type SchemaErrorCode } from "./parameterSchema.js";
|
|
3
3
|
export type ParameterValidationResult = {
|
|
4
4
|
isValid: true;
|
|
5
5
|
parameter: ParameterSchema;
|
|
@@ -8,7 +8,7 @@ export type ParameterValidationResult = {
|
|
|
8
8
|
errorCode: ParameterValidationErrorCode;
|
|
9
9
|
type?: ParameterType;
|
|
10
10
|
};
|
|
11
|
-
export type ParameterValidationErrorCode = "empty" | "syntax" | "invalidStructure" | "idImmutable" | "unsupportedType" | "invalidDefaultValue" | "invalidConstraints" | "
|
|
11
|
+
export type ParameterValidationErrorCode = "empty" | "syntax" | "invalidStructure" | "idImmutable" | "unsupportedType" | "invalidDefaultValue" | "invalidConstraints" | "invalidTags" | SchemaErrorCode;
|
|
12
12
|
type ValidateParameterYamlOptions = {
|
|
13
13
|
enabledTypes: ParameterType[];
|
|
14
14
|
fixedIdentifier?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameterValidation.d.ts","sourceRoot":"","sources":["../../src/parameter/parameterValidation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,
|
|
1
|
+
{"version":3,"file":"parameterValidation.d.ts","sourceRoot":"","sources":["../../src/parameter/parameterValidation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,eAAe,EAGvB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,yBAAyB,GAC/B;IACI,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,eAAe,CAAC;CAC9B,GACD;IACI,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,4BAA4B,CAAC;IACxC,IAAI,CAAC,EAAE,aAAa,CAAC;CACxB,CAAC;AAER,MAAM,MAAM,4BAA4B,GAClC,OAAO,GACP,QAAQ,GACR,kBAAkB,GAClB,aAAa,GACb,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,aAAa,GACb,eAAe,CAAC;AAEtB,KAAK,4BAA4B,GAAG;IAChC,YAAY,EAAE,aAAa,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,4BAA4B,GACtC,yBAAyB,CAY3B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { validateYaml } from "../asCode/validateYaml.js";
|
|
3
|
-
import { buildParameterSchema } from "./parameterSchema.js";
|
|
3
|
+
import { buildParameterSchema, schemaErrorCodes, } from "./parameterSchema.js";
|
|
4
4
|
export function validateParameterYaml(value, options) {
|
|
5
5
|
const result = validateYaml(value, {
|
|
6
6
|
schema: buildParameterSchema(options.enabledTypes),
|
|
@@ -16,10 +16,8 @@ export function validateParameterYaml(value, options) {
|
|
|
16
16
|
function classifySchemaError(error, declaredType) {
|
|
17
17
|
for (const issue of error.issues) {
|
|
18
18
|
const path = issue.path.map(String).join(".");
|
|
19
|
-
if (issue.
|
|
20
|
-
|
|
21
|
-
return invalid("invalidConstraintRange", declaredType);
|
|
22
|
-
}
|
|
19
|
+
if (isSchemaErrorCode(issue.message)) {
|
|
20
|
+
return invalid(issue.message, declaredType);
|
|
23
21
|
}
|
|
24
22
|
if (path === "definition.type") {
|
|
25
23
|
return invalid("unsupportedType");
|
|
@@ -36,6 +34,10 @@ function classifySchemaError(error, declaredType) {
|
|
|
36
34
|
}
|
|
37
35
|
return invalid("invalidStructure");
|
|
38
36
|
}
|
|
37
|
+
const schemaErrorCodeSet = new Set(schemaErrorCodes);
|
|
38
|
+
function isSchemaErrorCode(message) {
|
|
39
|
+
return schemaErrorCodeSet.has(message);
|
|
40
|
+
}
|
|
39
41
|
function readDeclaredType(parsed) {
|
|
40
42
|
if (!parsed || typeof parsed !== "object") {
|
|
41
43
|
return undefined;
|
package/esm/sdk-ui-catalog.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CertificationStatus } from '@gooddata/sdk-model';
|
|
2
|
-
import type { CompletionSource } from '@codemirror/autocomplete';
|
|
3
2
|
import type { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
|
|
4
3
|
import type { IDataSetMetadataObject } from '@gooddata/sdk-model';
|
|
5
4
|
import type { IdentifierRef } from '@gooddata/sdk-model';
|
|
@@ -11,6 +10,7 @@ import { MouseEvent as MouseEvent_2 } from 'react';
|
|
|
11
10
|
import type { ObjectType as ObjectType_2 } from '@gooddata/sdk-model';
|
|
12
11
|
import { PropsWithChildren } from 'react';
|
|
13
12
|
import { ReactNode } from 'react';
|
|
13
|
+
import type { YamlCompletionSource } from '@gooddata/sdk-ui-kit';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @public
|
|
@@ -35,6 +35,16 @@ export declare function AnalyticsCatalogDetailContent({ backend, workspace, loca
|
|
|
35
35
|
*/
|
|
36
36
|
export declare function AnalyticsCatalogFilter<T>(props: IAnalyticsCatalogFilterProps<T>): JSX.Element;
|
|
37
37
|
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare type AsCodeSerialization = {
|
|
40
|
+
yaml: string;
|
|
41
|
+
/**
|
|
42
|
+
* False for a definition with no code form at all, so no edit of it can be saved — as opposed to a
|
|
43
|
+
* document the codec's own rules reject, which the author can act on.
|
|
44
|
+
*/
|
|
45
|
+
hasCodeForm: boolean;
|
|
46
|
+
};
|
|
47
|
+
|
|
38
48
|
/** @internal */
|
|
39
49
|
export declare type AsCodeValidation<TDef> = {
|
|
40
50
|
isValid: true;
|
|
@@ -221,9 +231,10 @@ export declare interface IAnalyticsCatalogProps {
|
|
|
221
231
|
|
|
222
232
|
/** @internal */
|
|
223
233
|
export declare interface IAsCodeEditing<TDef> {
|
|
224
|
-
completionSource:
|
|
234
|
+
completionSource: YamlCompletionSource;
|
|
225
235
|
syntaxErrorMessage: string;
|
|
226
|
-
|
|
236
|
+
/** A throw is a failure to load the object, not a document error: the dialog closes. */
|
|
237
|
+
serialize(definition: TDef): AsCodeSerialization;
|
|
227
238
|
validate(value: string, context: AsCodeValidationContext): AsCodeValidation<TDef>;
|
|
228
239
|
/** Re-adds content the YAML can't express; applied on every persisting path. Omit if lossless. */
|
|
229
240
|
reconcile?(base: TDef, edited: TDef): TDef;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-catalog",
|
|
3
|
-
"version": "11.51.0-alpha.
|
|
3
|
+
"version": "11.51.0-alpha.5",
|
|
4
4
|
"description": "GoodData SDK - Analytics Catalog",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"tslib": "2.8.1",
|
|
42
42
|
"yaml": "2.8.3",
|
|
43
43
|
"zod": "4.3.6",
|
|
44
|
-
"@gooddata/sdk-backend-spi": "11.51.0-alpha.
|
|
45
|
-
"@gooddata/sdk-code-schemas": "11.51.0-alpha.
|
|
46
|
-
"@gooddata/sdk-model": "11.51.0-alpha.
|
|
47
|
-
"@gooddata/sdk-ui": "11.51.0-alpha.
|
|
48
|
-
"@gooddata/sdk-ui
|
|
49
|
-
"@gooddata/sdk-ui-
|
|
50
|
-
"@gooddata/sdk-ui-semantic-search": "11.51.0-alpha.
|
|
51
|
-
"@gooddata/sdk-ui-theme-provider": "11.51.0-alpha.
|
|
52
|
-
"@gooddata/util": "11.51.0-alpha.
|
|
44
|
+
"@gooddata/sdk-backend-spi": "11.51.0-alpha.5",
|
|
45
|
+
"@gooddata/sdk-code-schemas": "11.51.0-alpha.5",
|
|
46
|
+
"@gooddata/sdk-model": "11.51.0-alpha.5",
|
|
47
|
+
"@gooddata/sdk-ui-ext": "11.51.0-alpha.5",
|
|
48
|
+
"@gooddata/sdk-ui": "11.51.0-alpha.5",
|
|
49
|
+
"@gooddata/sdk-ui-kit": "11.51.0-alpha.5",
|
|
50
|
+
"@gooddata/sdk-ui-semantic-search": "11.51.0-alpha.5",
|
|
51
|
+
"@gooddata/sdk-ui-theme-provider": "11.51.0-alpha.5",
|
|
52
|
+
"@gooddata/util": "11.51.0-alpha.5"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -89,11 +89,11 @@
|
|
|
89
89
|
"typescript": "5.9.3",
|
|
90
90
|
"vitest": "4.1.8",
|
|
91
91
|
"vitest-dom": "0.1.1",
|
|
92
|
-
"@gooddata/i18n-toolkit": "11.51.0-alpha.
|
|
93
|
-
"@gooddata/eslint-config": "11.51.0-alpha.
|
|
94
|
-
"@gooddata/oxlint-config": "11.51.0-alpha.
|
|
95
|
-
"@gooddata/
|
|
96
|
-
"@gooddata/
|
|
92
|
+
"@gooddata/i18n-toolkit": "11.51.0-alpha.5",
|
|
93
|
+
"@gooddata/eslint-config": "11.51.0-alpha.5",
|
|
94
|
+
"@gooddata/oxlint-config": "11.51.0-alpha.5",
|
|
95
|
+
"@gooddata/sdk-backend-mockingbird": "11.51.0-alpha.5",
|
|
96
|
+
"@gooddata/stylelint-config": "11.51.0-alpha.5"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
99
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -97,6 +97,16 @@
|
|
|
97
97
|
font-weight: 700;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
.gd-ascode-dialog-notice {
|
|
101
|
+
background-color: var(--gd-palette-warning-dimmed, #fce7cc);
|
|
102
|
+
color: var(--gd-palette-warning-text-dimmed, #685945);
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
line-height: 20px;
|
|
105
|
+
padding: 4px 10px;
|
|
106
|
+
margin: 0 20px 10px;
|
|
107
|
+
border-radius: 3px;
|
|
108
|
+
}
|
|
109
|
+
|
|
100
110
|
.gd-ascode-dialog-footer-left {
|
|
101
111
|
display: flex;
|
|
102
112
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/codeDialog.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss"],"names":[],"mappings":"AAIA;EACI;EACA;EACA;EACA;EACA;;AAGA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIR;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI,cCpCU;;ADwClB;EACI;;AAGJ;EACI;EACA;EACA;EACA;;;AAKZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA","file":"codeDialog.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../scss/codeDialog.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss"],"names":[],"mappings":"AAIA;EACI;EACA;EACA;EACA;EACA;;AAGA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIR;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI,cCpCU;;ADwClB;EACI;;AAGJ;EACI;EACA;EACA;EACA;;;AAKZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA","file":"codeDialog.css"}
|
package/styles/css/detail.css
CHANGED
|
@@ -113,6 +113,16 @@
|
|
|
113
113
|
font-weight: 700;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
.gd-ascode-dialog-notice {
|
|
117
|
+
background-color: var(--gd-palette-warning-dimmed, #fce7cc);
|
|
118
|
+
color: var(--gd-palette-warning-text-dimmed, #685945);
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
line-height: 20px;
|
|
121
|
+
padding: 4px 10px;
|
|
122
|
+
margin: 0 20px 10px;
|
|
123
|
+
border-radius: 3px;
|
|
124
|
+
}
|
|
125
|
+
|
|
116
126
|
.gd-ascode-dialog-footer-left {
|
|
117
127
|
display: flex;
|
|
118
128
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/objectType.scss","../scss/codeDialog.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss","../scss/detail.scss"],"names":[],"mappings":"AAKI;EAEI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EAEI;;AAGJ;EACI;;;ACpBR;EACI;EACA;EACA;EACA;EACA;;AAGA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIR;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI,cCpCU;;ADwClB;EACI;;AAGJ;EACI;EACA;EACA;EACA;;;AAKZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EACI;EACA;EACA;EACA;EACA;EACA;;;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../scss/objectType.scss","../scss/codeDialog.scss","../../node_modules/@gooddata/sdk-ui-kit/styles/scss/variables.scss","../scss/detail.scss"],"names":[],"mappings":"AAKI;EAEI;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EAEI;;AAGJ;EACI;;;ACpBR;EACI;EACA;EACA;EACA;EACA;;AAGA;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIR;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI,cCpCU;;ADwClB;EACI;;AAGJ;EACI;EACA;EACA;EACA;;;AAKZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;;AAIR;EAEI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;;;AErHJ;EACI,aDwFc;ECvFd,WAJgB;EAKhB,OAVI;EAWJ;;AAEA;EANJ;IAOQ;;;AAGJ;EAEI;EACA;;AAGJ;EACI;EACA;EACA;;AAEA;EACI;;AAIR;EACI;EACA;EACA;;AAGA;EACI;EACA;EACA;;AAIJ;EACI;EACA;;AAEA;EACI;EACA;EACA;EACA;;AAIR;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA,ODzCA;EC0CA,WAtEE;EAuEF,aAtES;EAuET;EACA;;AAEA;EACI;;AAOJ;EACI;EACA;EACA;EACA;EACA;;AAGJ;EAGI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAGJ;EAGI;;AAGJ;EACI,ODpGG;;ACuGP;EACI;EACA,ODtGJ;ECuGI;EACA;;AAGJ;EAEI;;AAGJ;EACI;;AAIR;EACI;;AAEA;EACI,ODzHJ;EC0HI,aA/IQ;EAgJR,WAjJC;EAkJD;EACA;EACA;;AAGJ;EACI,OD9HJ;EC+HI,WAvJA;EAwJA;EACA;EACA;EACA;EACA;;AAGJ;EACI,OD/IG;;ACkJP;EACI;EACA,ODjJJ;;ACqJJ;EACI;;AAEA;EACI;;AAKZ;EACI;EACA;;AAIR;EACI;EACA;EACA;;AAEA;EACI;;AAKR;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;AAAA;EAEI;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;;AAMR;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;;AAGJ;EACI;;AAIR;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAEA;EACI;;AAKZ;EACI;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;;AAIR;EACI;EACA;EACA;EACA,ODtRQ;ECuRR;EACA;EACA;EACA;;AAEA;EACI;EACA;;AAKJ;EACI;;AAGJ;EACI;EACA;;AAKJ;EACI;EACA;;AAGJ;EACI,ODvTW;;AC0Tf;EACI;EACA,ODzTI;;AC6TZ;EACI,OD1TQ;EC2TR;EACA;EACA;EACA;;AAGJ;EACI;EACA;;AAEA;EACI,OD7UW;EC8UX;EACA;EACA;EACA;;AAIR;EACI;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;;AAEJ;EACI;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;;AAIR;EACI,MDnZS;;ACqZb;AAAA;EAEI,MDtZQ;;ACwZZ;AAAA;EAEI,MDxZO;;AC0ZX;EACI;;AAEJ;EACI;;AAGJ;EACI,QDjZW;;;ACuZnB;EACI;EACA;EACA;EACA;EACA;EACA;EACA,kBDpaS;ECqaT;EACA;;AAEA;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;EACA;EACA;;AAGJ;EACI;EACA;EACA;EACA;;AAGI;EACI;EACA;;AAIR;EACI;;AAGJ;EACI;;AAIR;EACI;EACA;EACA,kBDrdK;ECsdL;EACA;EACA,OD3cI;;AC6cJ;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;EACA;;AAGJ;EACI","file":"detail.css"}
|
package/styles/css/main.css
CHANGED
|
@@ -429,6 +429,16 @@
|
|
|
429
429
|
font-weight: 700;
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
+
.gd-ascode-dialog-notice {
|
|
433
|
+
background-color: var(--gd-palette-warning-dimmed, #fce7cc);
|
|
434
|
+
color: var(--gd-palette-warning-text-dimmed, #685945);
|
|
435
|
+
font-size: 14px;
|
|
436
|
+
line-height: 20px;
|
|
437
|
+
padding: 4px 10px;
|
|
438
|
+
margin: 0 20px 10px;
|
|
439
|
+
border-radius: 3px;
|
|
440
|
+
}
|
|
441
|
+
|
|
432
442
|
.gd-ascode-dialog-footer-left {
|
|
433
443
|
display: flex;
|
|
434
444
|
align-items: center;
|