@gooddata/sdk-ui-kit 11.52.0 → 11.53.0-alpha.1
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/@ui/UiConfigEditor/ConfigEditorToolbar.d.ts +26 -0
- package/esm/@ui/UiConfigEditor/ConfigEditorToolbar.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/ConfigEditorToolbar.js +38 -0
- package/esm/@ui/UiConfigEditor/UiConfigEditor.d.ts +20 -0
- package/esm/@ui/UiConfigEditor/UiConfigEditor.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/UiConfigEditor.js +229 -0
- package/esm/@ui/UiConfigEditor/configEditorGrammars.d.ts +15 -0
- package/esm/@ui/UiConfigEditor/configEditorGrammars.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/configEditorGrammars.js +50 -0
- package/esm/@ui/UiConfigEditor/configEditorHighlighting.d.ts +6 -0
- package/esm/@ui/UiConfigEditor/configEditorHighlighting.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/configEditorHighlighting.js +31 -0
- package/esm/@ui/UiConfigEditor/configEditorLanguage.d.ts +43 -0
- package/esm/@ui/UiConfigEditor/configEditorLanguage.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/configEditorLanguage.js +179 -0
- package/esm/@ui/UiConfigEditor/types.d.ts +135 -0
- package/esm/@ui/UiConfigEditor/types.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/types.js +2 -0
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.d.ts.map +1 -1
- package/esm/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.js +5 -2
- package/esm/@ui/UiSubmenuHeader/UiSubmenuHeader.d.ts +2 -2
- package/esm/@ui/UiSubmenuHeader/UiSubmenuHeader.d.ts.map +1 -1
- package/esm/@ui/UiSubmenuHeader/UiSubmenuHeader.js +1 -0
- package/esm/Dialog/StylingEditorDialog/StylingEditorDialog.d.ts +13 -0
- package/esm/Dialog/StylingEditorDialog/StylingEditorDialog.d.ts.map +1 -1
- package/esm/Dialog/StylingEditorDialog/StylingEditorDialog.js +19 -4
- package/esm/List/DateDatasetsListItem.d.ts.map +1 -1
- package/esm/List/DateDatasetsListItem.js +1 -2
- package/esm/index.d.ts +5 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -1
- package/esm/sdk-ui-kit.d.ts +204 -36
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts +7 -1
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/SyntaxHighlightingInput.js +2 -1
- package/esm/syntaxHighlightingInput/hooks/useChangeHandler.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useChangeHandler.js +9 -2
- package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts +4 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirror.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirror.js +2 -2
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorChange.d.ts +12 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorChange.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorChange.js +10 -8
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorEditable.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorEditable.js +11 -4
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorKeymap.d.ts +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorKeymap.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorKeymap.js +26 -22
- package/esm/syntaxHighlightingInput/syntaxErrorLinter.d.ts +24 -0
- package/esm/syntaxHighlightingInput/syntaxErrorLinter.d.ts.map +1 -0
- package/esm/syntaxHighlightingInput/syntaxErrorLinter.js +49 -0
- package/package.json +13 -11
- package/src/@ui/UiConfigEditor/UiConfigEditor.scss +169 -0
- package/src/@ui/UiMenu/UiMenu.scss +6 -0
- package/src/@ui/UiSubmenuHeader/UiSubmenuHeader.scss +15 -0
- package/src/@ui/index.scss +1 -0
- package/styles/css/main.css +132 -0
- package/styles/css/main.css.map +1 -1
- package/styles/css/stylingEditorDialog.css +5 -0
- package/styles/css/stylingEditorDialog.css.map +1 -1
- package/styles/scss/stylingEditorDialog.scss +8 -0
- package/esm/syntaxHighlightingInput/YamlEditor.d.ts +0 -35
- package/esm/syntaxHighlightingInput/YamlEditor.d.ts.map +0 -1
- package/esm/syntaxHighlightingInput/YamlEditor.js +0 -32
- package/esm/syntaxHighlightingInput/yamlSyntaxLinter.d.ts +0 -12
- package/esm/syntaxHighlightingInput/yamlSyntaxLinter.d.ts.map +0 -1
- package/esm/syntaxHighlightingInput/yamlSyntaxLinter.js +0 -32
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { isScalar, parseDocument, stringify, visit } from "yaml";
|
|
3
|
+
/**
|
|
4
|
+
* Indentation of the JSON the editor emits.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately 4, matching the `JSON.stringify(content, null, 4)` that the consuming dialogs use to
|
|
7
|
+
* seed their definition field. A dialog that compares the current text against that seed to decide
|
|
8
|
+
* whether the form is dirty would otherwise report a pristine form as changed the moment the value
|
|
9
|
+
* round-trips through YAML.
|
|
10
|
+
*/
|
|
11
|
+
const JSON_INDENT = 4;
|
|
12
|
+
/**
|
|
13
|
+
* `lineWidth: 0` disables YAML's default line folding, which would otherwise wrap long strings
|
|
14
|
+
* (URLs, base64 images, font declarations) across lines and make them painful to edit.
|
|
15
|
+
*/
|
|
16
|
+
const YAML_FORMAT_OPTIONS = { indent: 2, lineWidth: 0 };
|
|
17
|
+
/**
|
|
18
|
+
* `aliasDuplicateObjects: false` prevents anchors/aliases (`&ref` / `*ref`) for objects that appear
|
|
19
|
+
* twice — valid YAML, but surprising in a config file and lost on the way back to JSON.
|
|
20
|
+
*/
|
|
21
|
+
const YAML_STRINGIFY_OPTIONS = { ...YAML_FORMAT_OPTIONS, aliasDuplicateObjects: false };
|
|
22
|
+
const isBlank = (text) => text.trim() === "";
|
|
23
|
+
/**
|
|
24
|
+
* Rejects values a projection would silently corrupt.
|
|
25
|
+
*
|
|
26
|
+
* YAML can express more than JSON: `.nan` / `.inf` load as non-finite numbers that `JSON.stringify`
|
|
27
|
+
* writes as `null`, and a tag like `!!binary` loads as a `Uint8Array` that it writes as an
|
|
28
|
+
* index-keyed object. And both parsers round an integer beyond `Number.MAX_SAFE_INTEGER` to the
|
|
29
|
+
* nearest double, so serializing it back writes a *different* number. Either way the value saved
|
|
30
|
+
* would differ from the text on screen with no indication, so such text is refused here and
|
|
31
|
+
* surfaces as a parse failure the caller already reports.
|
|
32
|
+
*/
|
|
33
|
+
function assertProjectable(value) {
|
|
34
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (typeof value === "number") {
|
|
38
|
+
// Negative zero passes both integer checks, but `JSON.stringify` writes it as plain 0.
|
|
39
|
+
if (!Number.isFinite(value) ||
|
|
40
|
+
(Number.isInteger(value) && !Number.isSafeInteger(value)) ||
|
|
41
|
+
Object.is(value, -0)) {
|
|
42
|
+
throw new Error("The value contains a number that cannot be projected faithfully");
|
|
43
|
+
}
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
value.forEach(assertProjectable);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
// Anything beyond a plain object came from a YAML tag (binary, timestamp, …) and has no faithful
|
|
51
|
+
// JSON form.
|
|
52
|
+
if (typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
|
|
53
|
+
Object.values(value).forEach(assertProjectable);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
throw new Error("The value cannot be projected into JSON faithfully");
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Parses a YAML draft into the plain value it denotes, refusing anything JSON cannot express.
|
|
60
|
+
*
|
|
61
|
+
* Warnings are treated as failures too: the one the parser produces is an unresolvable tag, which it
|
|
62
|
+
* would otherwise quietly read as its bare scalar — text saying `!myTag foo` but a value saying
|
|
63
|
+
* `"foo"`.
|
|
64
|
+
*
|
|
65
|
+
* Returns `undefined` for a document with no content (blank or comments only), which has no value
|
|
66
|
+
* form at all.
|
|
67
|
+
*/
|
|
68
|
+
function parseYaml(draft) {
|
|
69
|
+
const document = parseDocument(draft);
|
|
70
|
+
const problem = document.errors[0] ?? document.warnings[0];
|
|
71
|
+
if (problem !== undefined) {
|
|
72
|
+
throw problem;
|
|
73
|
+
}
|
|
74
|
+
if (document.contents === null) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
// Mapping keys are checked on the document, before `toJS()` erases the distinction: a typed key
|
|
78
|
+
// like `1:` or `true:` comes out as the object property "1" / "true", so the JSON emitted would
|
|
79
|
+
// quietly say a string where the text on screen says a number or boolean.
|
|
80
|
+
visit(document, {
|
|
81
|
+
Pair(_, pair) {
|
|
82
|
+
if (!isScalar(pair.key) || typeof pair.key.value !== "string") {
|
|
83
|
+
throw new Error("YAML contains a mapping key JSON cannot represent");
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
const parsed = document.toJS();
|
|
88
|
+
assertProjectable(parsed);
|
|
89
|
+
return parsed;
|
|
90
|
+
}
|
|
91
|
+
function parseText(text, language) {
|
|
92
|
+
if (language === "yaml") {
|
|
93
|
+
return parseYaml(text);
|
|
94
|
+
}
|
|
95
|
+
// JSON.parse rounds too — an integer past MAX_SAFE_INTEGER comes back as a different number —
|
|
96
|
+
// so the same fidelity guard applies before this value may drive a projection.
|
|
97
|
+
const parsed = JSON.parse(text);
|
|
98
|
+
assertProjectable(parsed);
|
|
99
|
+
return parsed;
|
|
100
|
+
}
|
|
101
|
+
function stringifyValue(value, language) {
|
|
102
|
+
return language === "json"
|
|
103
|
+
? JSON.stringify(value, null, JSON_INDENT)
|
|
104
|
+
: stringify(value, YAML_STRINGIFY_OPTIONS);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Whether `text` is a value in `language` that can be projected into another language and back.
|
|
108
|
+
*
|
|
109
|
+
* Text the user is midway through breaking is not: re-reading it in another language could give it a
|
|
110
|
+
* different meaning (`foo` is broken JSON but a valid YAML string), so switching language must leave
|
|
111
|
+
* it alone rather than quietly turning it into something that parses. Neither is a comment-only YAML
|
|
112
|
+
* document, whose projection would be empty — losing the comments.
|
|
113
|
+
*
|
|
114
|
+
* @internal
|
|
115
|
+
*/
|
|
116
|
+
export function isProjectable(text, language) {
|
|
117
|
+
if (isBlank(text)) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
try {
|
|
121
|
+
return parseText(text, language) !== undefined;
|
|
122
|
+
}
|
|
123
|
+
catch {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Converts text from one of the editor's languages into another.
|
|
129
|
+
*
|
|
130
|
+
* Unconvertible text is passed through verbatim rather than swallowed — unparseable text, and a
|
|
131
|
+
* comment-only YAML document, whose projection would be empty. In the display direction that keeps
|
|
132
|
+
* a language switch from silently discarding what is on screen; in the primary direction it hands
|
|
133
|
+
* the caller the raw text, whose own validation is what reports the problem while the user is
|
|
134
|
+
* mid-edit.
|
|
135
|
+
*
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
export function convertText(text, fromLanguage, toLanguage) {
|
|
139
|
+
if (fromLanguage === toLanguage || isBlank(text)) {
|
|
140
|
+
return text;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
const parsed = parseText(text, fromLanguage);
|
|
144
|
+
// A YAML document with no content beyond comments denotes no value, which has no text form.
|
|
145
|
+
return parsed === undefined ? text : stringifyValue(parsed, toLanguage);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return text;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Re-formats the displayed text in its own language.
|
|
153
|
+
*
|
|
154
|
+
* YAML is re-formatted structurally — indentation and spacing are normalized while comments, blank
|
|
155
|
+
* lines and scalar styles are kept — so a hand-annotated document is tidied, never stripped.
|
|
156
|
+
*
|
|
157
|
+
* Returns `undefined` when there is nothing to format — blank or unparseable input — so the caller
|
|
158
|
+
* can disable the action instead of offering a no-op.
|
|
159
|
+
*
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
export function beautify(draft, language) {
|
|
163
|
+
if (isBlank(draft)) {
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
if (language === "json") {
|
|
167
|
+
try {
|
|
168
|
+
// The guarded parse, so re-formatting can never rewrite a number the parser rounded.
|
|
169
|
+
return JSON.stringify(parseText(draft, "json"), null, JSON_INDENT);
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return undefined;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const document = parseDocument(draft);
|
|
176
|
+
// Warnings do not block formatting: an unresolved tag is kept verbatim by the serializer, so
|
|
177
|
+
// re-formatting around it is safe — unlike projecting to another language, which would drop it.
|
|
178
|
+
return document.errors.length > 0 ? undefined : document.toString(YAML_FORMAT_OPTIONS);
|
|
179
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { type ReactNode, type Ref } from "react";
|
|
2
|
+
import { type YamlCompletionSource } from "../../syntaxHighlightingInput/yamlPosition.js";
|
|
3
|
+
import { type ConfigEditorLanguage } from "./configEditorLanguage.js";
|
|
4
|
+
/**
|
|
5
|
+
* Imperative operations on the editor's text, for callers that need to act at the cursor.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface IUiConfigEditorApi {
|
|
10
|
+
/** Replaces the current selection with `text` and leaves the caret directly after it. */
|
|
11
|
+
insertAtCursor: (text: string) => void;
|
|
12
|
+
focus: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* What the editor hands a caller rendering the toolbar's context menu.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export interface IUiConfigEditorContextMenuProps {
|
|
20
|
+
/** Closes the menu — pass straight to `UiMenu`'s `onClose`. */
|
|
21
|
+
onClose: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Identity for the menu, naming it after the button that opened it. Spread onto `UiMenu`'s
|
|
24
|
+
* required `ariaAttributes`.
|
|
25
|
+
*/
|
|
26
|
+
ariaAttributes: {
|
|
27
|
+
id: string;
|
|
28
|
+
"aria-labelledby": string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The editor's localized texts, gathered in one object so adding a text does not grow the prop
|
|
33
|
+
* list. The caller localizes them, as with the other kit primitives; every key is optional.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export interface IUiConfigEditorLabels {
|
|
38
|
+
/**
|
|
39
|
+
* Radio label per offered language, keyed by the language. Optional and partial: a language
|
|
40
|
+
* without an entry falls back to its technical name ("JSON", "YAML"), which as format names
|
|
41
|
+
* are usually left untranslated.
|
|
42
|
+
*/
|
|
43
|
+
languages?: Partial<Record<ConfigEditorLanguage, string>>;
|
|
44
|
+
/** Label of the action that re-formats the current text. Defaults to "Auto-format". */
|
|
45
|
+
autoFormat?: string;
|
|
46
|
+
/** Accessible name for the language radio group, e.g. "Editor language". */
|
|
47
|
+
languageSwitcher?: string;
|
|
48
|
+
/** Accessible name for the button opening the context menu, e.g. "More actions". */
|
|
49
|
+
contextMenu?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Localized message shown on each syntax-error diagnostic in the lint gutter. Read when the
|
|
52
|
+
* editor mounts (and whenever the language changes); a later change to it is not picked up on
|
|
53
|
+
* its own. Without it no syntax linting is installed.
|
|
54
|
+
*/
|
|
55
|
+
syntaxError?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export interface IUiConfigEditorProps {
|
|
61
|
+
/**
|
|
62
|
+
* The value, as text in the primary language. The component's single source of truth — any other
|
|
63
|
+
* offered language is only ever a rendering of it.
|
|
64
|
+
*/
|
|
65
|
+
value: string;
|
|
66
|
+
/**
|
|
67
|
+
* Fires with the next value, as text in the primary language.
|
|
68
|
+
*
|
|
69
|
+
* While a draft cannot be parsed, the raw draft is passed through verbatim instead. Callers
|
|
70
|
+
* already validate this value by parsing it, so the invalid text reaching them unchanged is what
|
|
71
|
+
* makes their existing "invalid definition" handling report the problem.
|
|
72
|
+
*/
|
|
73
|
+
onChange: (next: string) => void;
|
|
74
|
+
/** Language the value is written in — what `onChange` emits. Defaults to JSON. */
|
|
75
|
+
primaryLanguage?: ConfigEditorLanguage;
|
|
76
|
+
/**
|
|
77
|
+
* Languages offered in the toolbar's switcher, in render order. With fewer than two entries no
|
|
78
|
+
* switcher is rendered at all and the value is shown in the primary language, verbatim — the
|
|
79
|
+
* editor never converts anything. Defaults to JSON and YAML.
|
|
80
|
+
*
|
|
81
|
+
* Only a JSON primary offers projections: YAML is a superset of JSON, so projecting the other
|
|
82
|
+
* way an invalid JSON draft can be a valid YAML document, and the pass-through contract could
|
|
83
|
+
* hand the caller text that validates as something the user never saw validated. With any
|
|
84
|
+
* other primary the editor is single-language regardless of this prop.
|
|
85
|
+
*/
|
|
86
|
+
languages?: ConfigEditorLanguage[];
|
|
87
|
+
/**
|
|
88
|
+
* Language the text is displayed in. Controlled: the caller owns it, and any persistence of it.
|
|
89
|
+
* Defaults to the primary language, which is also what a single-language editor always
|
|
90
|
+
* displays. Honored only with a JSON primary, and the switcher renders only when this and
|
|
91
|
+
* `onLanguageChange` are both supplied — the controlled pair is what makes a selection able to
|
|
92
|
+
* take effect.
|
|
93
|
+
*/
|
|
94
|
+
language?: ConfigEditorLanguage;
|
|
95
|
+
/**
|
|
96
|
+
* Reports the language the user picked in the switcher. Without it no switcher is rendered,
|
|
97
|
+
* whatever `languages` offers — the editor is controlled and cannot honor a selection it has
|
|
98
|
+
* no way to report.
|
|
99
|
+
*/
|
|
100
|
+
onLanguageChange?: (next: ConfigEditorLanguage) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Schema-aware autocompletion for YAML, consulted while YAML is the displayed language. It is
|
|
103
|
+
* handed the position's enclosing mapping keys, so completions can follow the document's shape.
|
|
104
|
+
*/
|
|
105
|
+
completionSource?: YamlCompletionSource;
|
|
106
|
+
/** The editor's localized texts. Anything omitted falls back to a neutral default. */
|
|
107
|
+
labels?: IUiConfigEditorLabels;
|
|
108
|
+
/**
|
|
109
|
+
* Renders the contents of the toolbar's context menu, usually a `UiMenu`.
|
|
110
|
+
*
|
|
111
|
+
* The editor owns the button that opens it and the popover it sits in; what goes inside is the
|
|
112
|
+
* caller's, since the actions on offer are specific to what is being edited. Omit the prop and
|
|
113
|
+
* no button is rendered at all.
|
|
114
|
+
*/
|
|
115
|
+
renderContextMenu?: (props: IUiConfigEditorContextMenuProps) => ReactNode;
|
|
116
|
+
/**
|
|
117
|
+
* Accessible name for the editor, wired to its aria-label. CodeMirror has no labellable input
|
|
118
|
+
* element, so a visible caption cannot be attached with `htmlFor` — pass its text here too.
|
|
119
|
+
*/
|
|
120
|
+
label?: string;
|
|
121
|
+
placeholder?: string;
|
|
122
|
+
/**
|
|
123
|
+
* Renders the value without allowing edits, while keeping it focusable and selectable so it can
|
|
124
|
+
* still be read and copied with a keyboard or screen reader. The language toggle stays available
|
|
125
|
+
* — switching it only changes how the value is displayed.
|
|
126
|
+
*/
|
|
127
|
+
readOnly?: boolean;
|
|
128
|
+
/** Blocks editing and the whole toolbar, e.g. while a save is in flight. */
|
|
129
|
+
disabled?: boolean;
|
|
130
|
+
/** Visible height, in text rows. The editor also grows to fill a taller parent. */
|
|
131
|
+
rows?: number;
|
|
132
|
+
dataTestId?: string;
|
|
133
|
+
editorRef?: Ref<IUiConfigEditorApi>;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiConfigEditor/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAE1F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B,yFAAyF;IACzF,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC5C,iEAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,cAAc,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1D,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,oFAAkF;IAClF,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACxD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,sFAAsF;IACtF,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,+BAA+B,KAAK,SAAS,CAAC;IAC1E;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;CACvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultUiMenuHeader.d.ts","sourceRoot":"","sources":["../../../../../src/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAQtE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"DefaultUiMenuHeader.d.ts","sourceRoot":"","sources":["../../../../../src/@ui/UiMenu/components/defaults/DefaultUiMenuHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAwC,MAAM,OAAO,CAAC;AAQtE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAyDhC,CAAC"}
|
|
@@ -21,8 +21,9 @@ export const DefaultUiMenuHeader = memo(function DefaultUiMenuHeader() {
|
|
|
21
21
|
focusedItem: ctx.focusedItem,
|
|
22
22
|
shownCustomContentItemId: ctx.shownCustomContentItemId,
|
|
23
23
|
setShownCustomContentItemId: ctx.setShownCustomContentItemId,
|
|
24
|
+
size: ctx.size,
|
|
24
25
|
}));
|
|
25
|
-
const { setFocusedId, onClose, parentItem, focusedItem, shownCustomContentItemId, setShownCustomContentItemId, } = useContextStore(selector);
|
|
26
|
+
const { setFocusedId, onClose, parentItem, focusedItem, shownCustomContentItemId, setShownCustomContentItemId, size, } = useContextStore(selector);
|
|
26
27
|
const parentItemId = parentItem?.id;
|
|
27
28
|
const handleBack = useCallback(() => {
|
|
28
29
|
if (parentItemId === undefined) {
|
|
@@ -37,5 +38,7 @@ export const DefaultUiMenuHeader = memo(function DefaultUiMenuHeader() {
|
|
|
37
38
|
return null;
|
|
38
39
|
}
|
|
39
40
|
const title = parentItem?.stringTitle ?? focusedItem?.stringTitle;
|
|
40
|
-
return (_jsx("div", { role: "presentation", className: e("menu-header"), children: _jsx(UiSubmenuHeader, { title: title, onBack: handleBack, onClose: onClose, backAriaLabel: formatMessage({ id: "menu.back" }), closeAriaLabel: formatMessage({ id: "menu.close" }), useShortenedTitle: true,
|
|
41
|
+
return (_jsx("div", { role: "presentation", className: e("menu-header"), children: _jsx(UiSubmenuHeader, { title: title, onBack: handleBack, onClose: onClose, backAriaLabel: formatMessage({ id: "menu.back" }), closeAriaLabel: formatMessage({ id: "menu.close" }), useShortenedTitle: true,
|
|
42
|
+
// The header follows the menu's density: a small menu gets the small header.
|
|
43
|
+
height: size === "small" ? "small" : "large" }) }));
|
|
41
44
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type MouseEvent, type Ref } from "react";
|
|
2
|
-
import { type SizeLarge, type SizeMedium } from "../@types/size.js";
|
|
2
|
+
import { type SizeLarge, type SizeMedium, type SizeSmall } from "../@types/size.js";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
@@ -15,7 +15,7 @@ export interface IUiSubmenuHeaderProps {
|
|
|
15
15
|
useShortenedTitle?: boolean;
|
|
16
16
|
textColor?: string;
|
|
17
17
|
backgroundColor?: string;
|
|
18
|
-
height?: SizeMedium | SizeLarge;
|
|
18
|
+
height?: SizeSmall | SizeMedium | SizeLarge;
|
|
19
19
|
titleId?: string;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiSubmenuHeader.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSubmenuHeader/UiSubmenuHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAOlD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"UiSubmenuHeader.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSubmenuHeader/UiSubmenuHeader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAOlD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAIpF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACpD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACrD,uEAAuE;IACvE,aAAa,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC5B,KAAU,EACV,WAAW,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,MAAiB,EACjB,OAAO,EACV,EAAE,qBAAqB,2CAmFvB"}
|
|
@@ -14,6 +14,7 @@ export function UiSubmenuHeader({ title = "", tooltipText, onBack, onClose, back
|
|
|
14
14
|
const heightClass = cx({
|
|
15
15
|
"gd-ui-kit-submenu-header--large": height === "large",
|
|
16
16
|
"gd-ui-kit-submenu-header--medium": height === "medium",
|
|
17
|
+
"gd-ui-kit-submenu-header--small": height === "small",
|
|
17
18
|
});
|
|
18
19
|
const backButtonSize = "small";
|
|
19
20
|
const closeButtonSize = "small";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type IColorPalette, type ITheme, type ObjRef } from "@gooddata/sdk-model";
|
|
2
3
|
import { type IDialogBaseProps } from "../typings.js";
|
|
3
4
|
import { type TStylingEditorDialogFooterProps } from "./StylingEditorDialogFooter.js";
|
|
@@ -43,6 +44,18 @@ export interface IStylingEditorDialogProps<T extends StylingPickerItemContent> e
|
|
|
43
44
|
* this never prevents submission — use it for content that applies but degrades the result.
|
|
44
45
|
*/
|
|
45
46
|
validateDefinitionWarning?: (content: T) => string | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Optionally replaces the definition editor, e.g. with a syntax-highlighting one.
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* `value` is the definition as JSON text, and `onChange` expects JSON text back — the same
|
|
52
|
+
* contract as the plain textarea rendered when this is not supplied. Anything richer (a language
|
|
53
|
+
* toggle and its persistence, for instance) stays owned by the caller.
|
|
54
|
+
*/
|
|
55
|
+
renderDefinitionEditor?: (props: {
|
|
56
|
+
value: string;
|
|
57
|
+
onChange: (next: string) => void;
|
|
58
|
+
}) => ReactNode;
|
|
46
59
|
}
|
|
47
60
|
/**
|
|
48
61
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StylingEditorDialog.d.ts","sourceRoot":"","sources":["../../../src/Dialog/StylingEditorDialog/StylingEditorDialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StylingEditorDialog.d.ts","sourceRoot":"","sources":["../../../src/Dialog/StylingEditorDialog/StylingEditorDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAKvE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQnF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAEH,KAAK,+BAA+B,EACvC,MAAM,gCAAgC,CAAC;AAGxC;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG,aAAa,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,wBAAwB;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,wBAAwB,CACzE,SAAQ,+BAA+B,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,WAAW,CAAC;IACxF,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IACnC,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,MAAM,EAAE,CAAC;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC;IACxD;;;;;;;OAOG;IACH,yBAAyB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/D;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,KAAK,SAAS,CAAC;CACtG;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,wBAAwB,EAAE,KAAK,EAAE,yBAAyB,CAAC,CAAC,CAAC,2CAM1G"}
|
|
@@ -18,7 +18,7 @@ import { StylingExample } from "./StylingExample.js";
|
|
|
18
18
|
export function StylingEditorDialog(props) {
|
|
19
19
|
return (_jsx(IntlWrapper, { locale: props.locale, children: _jsx(StylingEditorDialogCore, { ...props }) }));
|
|
20
20
|
}
|
|
21
|
-
function StylingEditorDialogCore({ title, tooltip, link, stylingItem, examples, exampleToColorPreview, onClose, onSubmit, onCancel, disableSubmit, showProgressIndicator, showBackButton, onHelpClick, onExit = () => { }, className, onInvalidDefinition = () => { }, validateDefinition, validateDefinitionWarning, }) {
|
|
21
|
+
function StylingEditorDialogCore({ title, tooltip, link, stylingItem, examples, exampleToColorPreview, onClose, onSubmit, onCancel, disableSubmit, showProgressIndicator, showBackButton, onHelpClick, onExit = () => { }, className, onInvalidDefinition = () => { }, validateDefinition, validateDefinitionWarning, renderDefinitionEditor, }) {
|
|
22
22
|
const intl = useIntl();
|
|
23
23
|
const providedExamples = !!examples && examples.length !== 0 && !!exampleToColorPreview;
|
|
24
24
|
const initialNameField = stylingItem?.name ?? "";
|
|
@@ -27,7 +27,15 @@ function StylingEditorDialogCore({ title, tooltip, link, stylingItem, examples,
|
|
|
27
27
|
const [definitionField, setDefinitionField] = useState(initialDefinitionField);
|
|
28
28
|
const parsedDefinition = useMemo(() => {
|
|
29
29
|
try {
|
|
30
|
-
|
|
30
|
+
const parsed = JSON.parse(definitionField);
|
|
31
|
+
// A theme is an object and a colour palette an array, so a bare scalar is never a valid
|
|
32
|
+
// definition even though JSON.parse accepts it. Worth rejecting explicitly: a
|
|
33
|
+
// syntax-highlighting editor offering YAML makes `foo` — a bare string — an easy thing to
|
|
34
|
+
// leave behind mid-edit, and it would otherwise submit as the whole styling content.
|
|
35
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
36
|
+
return { ok: false };
|
|
37
|
+
}
|
|
38
|
+
return { ok: true, content: parsed };
|
|
31
39
|
}
|
|
32
40
|
catch {
|
|
33
41
|
return { ok: false };
|
|
@@ -110,8 +118,15 @@ function StylingEditorDialogCore({ title, tooltip, link, stylingItem, examples,
|
|
|
110
118
|
] }), _jsxs("div", { className: "gd-styling-editor-dialog-content", children: [
|
|
111
119
|
_jsxs("form", { className: "gd-styling-editor-dialog-content-form", onSubmit: (e) => e.preventDefault(), children: [
|
|
112
120
|
_jsxs("label", { className: "gd-styling-editor-dialog-content-form-input", children: [intl.formatMessage({ id: "stylingEditor.dialog.name" }), _jsx("input", { "aria-label": "Styling item name", className: "gd-input-field s-input-field", type: "text", value: nameField, onChange: (e) => setNameField(e.target.value) })
|
|
113
|
-
] }),
|
|
114
|
-
|
|
121
|
+
] }), renderDefinitionEditor ? (
|
|
122
|
+
// Not a <label>: a custom editor brings its own controls, and a label
|
|
123
|
+
// wrapping them would route clicks on those to the labelled element. The
|
|
124
|
+
// editor is expected to carry its own accessible name instead.
|
|
125
|
+
_jsxs("div", { className: "gd-styling-editor-dialog-content-form-textarea", children: [intl.formatMessage({ id: "stylingEditor.dialog.definition" }), renderDefinitionEditor({
|
|
126
|
+
value: definitionField,
|
|
127
|
+
onChange: setDefinitionField,
|
|
128
|
+
})] })) : (_jsxs("label", { className: "gd-styling-editor-dialog-content-form-textarea", children: [intl.formatMessage({ id: "stylingEditor.dialog.definition" }), _jsx("textarea", { "aria-label": "Styling item definition", className: "gd-input-field s-textarea-field", wrap: "off", value: definitionField, onChange: (e) => setDefinitionField(e.target.value) })
|
|
129
|
+
] })), definitionContentWarning && !definitionContentError ? (_jsx(Message, { type: "warning", className: "gd-styling-editor-dialog-content-form-warning s-styling-editor-warning", children: definitionContentWarning })) : null] }), providedExamples ? (_jsxs("div", { className: cx("gd-styling-editor-dialog-content-examples", "s-gd-styling-editor-dialog-content-examples"), children: [
|
|
115
130
|
_jsx(BubbleHeaderSeparator, { title: intl.formatMessage({ id: "stylingEditor.dialog.examples" }), message: tooltip }), _jsx("div", { className: "gd-styling-editor-dialog-content-examples-list", children: examples.map((example, index) => (_jsx(StylingExample, { name: example.name ?? "", colors: exampleToColorPreview(example.content), onClick: () => {
|
|
116
131
|
setNameField(example.name ?? "");
|
|
117
132
|
setDefinitionField(JSON.stringify(example.content, null, 4));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateDatasetsListItem.d.ts","sourceRoot":"","sources":["../../src/List/DateDatasetsListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DateDatasetsListItem.d.ts","sourceRoot":"","sources":["../../src/List/DateDatasetsListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAqB,MAAM,OAAO,CAAC;AAQ3D;;GAEG;AACH,eAAO,MAAM,gCAAgC,wCAAwC,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CACpD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,EAAE,EACF,KAAK,EACL,QAAQ,EACR,UAAU,EACV,WAAW,EACX,KAAK,EACL,OAAO,EACV,EAAE,0BAA0B,2CAoC5B"}
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
5
|
-
import { FormattedMessage } from "react-intl";
|
|
6
5
|
import { simplifyText } from "@gooddata/util";
|
|
7
6
|
import { ShortenedText } from "../ShortenedText/ShortenedText.js";
|
|
8
7
|
/**
|
|
@@ -22,7 +21,7 @@ export function DateDatasetsListItem({ id, title, isHeader, isSelected, isUnrela
|
|
|
22
21
|
}
|
|
23
22
|
}, [width]);
|
|
24
23
|
if (isHeader) {
|
|
25
|
-
return
|
|
24
|
+
return _jsx("div", { className: "gd-list-item gd-list-item-header", children: title });
|
|
26
25
|
}
|
|
27
26
|
const classNames = cx(DATE_DATASET_LIST_ITEM_CLASSNAME, `s-${id}`, `s-${simplifyText(title ?? "")}`, {
|
|
28
27
|
"is-selected": isSelected,
|
package/esm/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export { createStandardPresets, STANDARD_PRESET_DEFINITIONS, type IStandardPrese
|
|
|
30
30
|
export { createTemplates, createAllTemplates, createAdvancedTemplates, STANDARD_TEMPLATE_DEFINITIONS, CURRENCY_TEMPLATE_DEFINITIONS, ADVANCED_TEMPLATE_DEFINITIONS, CURRENCY_TEMPLATE_IDS, DEFAULT_TEMPLATE_PREFIX, type ITemplateDefinition, } from "./measureNumberFormat/presets/templates.js";
|
|
31
31
|
export { useMetricTypePresets, useStandardPresets, useFormatTemplates, type UseMetricTypePresetsConfig, type UseMetricTypePresetsResult, } from "./measureNumberFormat/hooks/useMetricTypePresets.js";
|
|
32
32
|
export { type ISyntaxHighlightingInputProps, SyntaxHighlightingInput, } from "./syntaxHighlightingInput/SyntaxHighlightingInput.js";
|
|
33
|
-
export { type
|
|
33
|
+
export { type ExternalChangeSelection } from "./syntaxHighlightingInput/hooks/useCodemirrorChange.js";
|
|
34
34
|
export { type IYamlPosition, type YamlCompletionSource, yamlPositionAt, } from "./syntaxHighlightingInput/yamlPosition.js";
|
|
35
35
|
export type { IDropdownButtonAccessibilityConfig, IButtonAccessibilityConfig, IButtonProps, } from "./Button/typings.js";
|
|
36
36
|
export { Button } from "./Button/Button.js";
|
|
@@ -468,6 +468,10 @@ export { UiConfirmDialogCard, type IUiConfirmDialogCardProps, type ConfirmDialog
|
|
|
468
468
|
export { UiModalDialog, type IUiModalDialogProps } from "./@ui/UiModalDialog/UiModalDialog.js";
|
|
469
469
|
export { UiDialogBody, type IUiDialogBodyProps } from "./@ui/UiModalDialog/UiDialogBody.js";
|
|
470
470
|
export { UiTextInput, type IUiTextInputProps, type IUiTextInputIconAfterButton, } from "./@ui/UiTextInput/UiTextInput.js";
|
|
471
|
+
export { UiConfigEditor } from "./@ui/UiConfigEditor/UiConfigEditor.js";
|
|
472
|
+
export { type IUiConfigEditorProps, type IUiConfigEditorApi, type IUiConfigEditorContextMenuProps, type IUiConfigEditorLabels, } from "./@ui/UiConfigEditor/types.js";
|
|
473
|
+
export { preloadUiConfigEditorGrammars } from "./@ui/UiConfigEditor/configEditorGrammars.js";
|
|
474
|
+
export { type ConfigEditorLanguage } from "./@ui/UiConfigEditor/configEditorLanguage.js";
|
|
471
475
|
export { UiRadio, type IUiRadioProps } from "./@ui/UiRadio/UiRadio.js";
|
|
472
476
|
export { UiRadioRow, type IUiRadioRowProps } from "./@ui/UiRadioRow/UiRadioRow.js";
|
|
473
477
|
export { UiAvatar, type IUiAvatarProps } from "./@ui/UiAvatar/UiAvatar.js";
|