@pstdio/ui 0.18.0 → 0.20.0
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/{MermaidComponent-BPiVFNYK.js → MermaidComponent-AmAjWLPm.js} +3 -3
- package/dist/{MermaidComponent-BPiVFNYK.js.map → MermaidComponent-AmAjWLPm.js.map} +1 -1
- package/dist/browser-storage-DPtOQJx0.js +127 -0
- package/dist/browser-storage-DPtOQJx0.js.map +1 -0
- package/dist/chat-ui.js +938 -897
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/chat-ui/components/chat-message-list-items.d.ts +17 -0
- package/dist/components/chat-ui/components/message-types.d.ts +1 -0
- package/dist/components/chat-ui/components/timeline.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +1 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +3 -2
- package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +1 -0
- package/dist/components/data-table/data-table-header.d.ts +3 -1
- package/dist/components/data-table/data-table-skeleton.d.ts +13 -0
- package/dist/components/data-table/edit-mode-data-table-body.d.ts +29 -0
- package/dist/components/data-table/edit-mode-data-table-cell.d.ts +15 -0
- package/dist/components/data-table/edit-mode-data-table-editors.d.ts +19 -0
- package/dist/components/data-table/edit-mode-data-table-header.d.ts +23 -0
- package/dist/components/data-table/edit-mode-data-table-selection.d.ts +12 -0
- package/dist/components/data-table/edit-mode-data-table.d.ts +2 -0
- package/dist/components/data-table/edit-mode-story.d.ts +5 -0
- package/dist/components/data-table/index.d.ts +3 -1
- package/dist/components/data-table/pagination-footer.d.ts +8 -5
- package/dist/components/data-table/types.d.ts +24 -0
- package/dist/components/overlays/dialog-accept-shortcut.d.ts +12 -0
- package/dist/components/overlays/index.d.ts +1 -0
- package/dist/components/param-editor/index.d.ts +3 -1
- package/dist/components/param-editor/inputs/selection-input.d.ts +5 -0
- package/dist/components/param-editor/inputs/selection-menu.d.ts +6 -0
- package/dist/components/param-editor/param-editor-row.d.ts +17 -0
- package/dist/components/param-editor/param-editor.types.d.ts +18 -0
- package/dist/components/primitives/glyph-icon.d.ts +16 -0
- package/dist/components/primitives/icon-color-picker.d.ts +3 -13
- package/dist/components/primitives/icon-options.d.ts +301 -0
- package/dist/components/primitives/index.d.ts +10 -3
- package/dist/components/primitives/segmented-control.d.ts +20 -0
- package/dist/components/primitives/tag-swatch.d.ts +10 -0
- package/dist/components/rich-text/index.d.ts +2 -0
- package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +7 -0
- package/dist/components/rich-text/markdown-editor/markdown-table.story-fixture.d.ts +3 -0
- package/dist/components/rich-text/markdown-editor/plugins/MarkdownSectionNavigationPlugin.d.ts +8 -0
- package/dist/components/rich-text/markdown-editor/plugins/MarkdownSlashCommandPlugin.d.ts +1 -0
- package/dist/components/rich-text/markdown-editor/plugins/markdown-history-plugin.d.ts +1 -0
- package/dist/components/rich-text/markdown-editor/plugins/markdown-section-navigation.d.ts +20 -0
- package/dist/components/rich-text/rich-message/rich-message.d.ts +2 -0
- package/dist/components/rich-text/shared/markdown-ast.d.ts +6 -0
- package/dist/components/rich-text/shared/markdown-codec.d.ts +3 -0
- package/dist/components/rich-text/shared/markdown-export.d.ts +2 -0
- package/dist/components/rich-text/shared/markdown-import.d.ts +2 -0
- package/dist/components/rich-text/shared/markdown-inline.d.ts +5 -0
- package/dist/components/rich-text/shared/markdown-table.d.ts +41 -0
- package/dist/components/rich-text/shared/markdown-url-context.d.ts +9 -0
- package/dist/components/rich-text/shared/markdown-url.d.ts +3 -0
- package/dist/components/rich-text/shared/nodes/DataTableNode.d.ts +13 -11
- package/dist/components/rich-text/shared/nodes/MarkdownImageNode.d.ts +35 -0
- package/dist/components/rich-text/shared/nodes/MarkdownLinkNode.d.ts +18 -0
- package/dist/components/rich-text/shared/nodes/RawHtmlNode.d.ts +31 -0
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.d.ts +4 -2
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +1 -1
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +1 -1
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +1 -0
- package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +2 -3
- package/dist/components/tag-editor/index.d.ts +4 -0
- package/dist/components/tag-editor/tag-editor-heading.d.ts +11 -0
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor-save-bar.d.ts +13 -0
- package/dist/components/tag-editor/tag-editor.types.d.ts +11 -11
- package/dist/components/tag-editor/tag-settings-panel.d.ts +3 -1
- package/dist/data-table.js +773 -931
- package/dist/data-table.js.map +1 -1
- package/dist/dialog-accept-shortcut-DAEBsoWW.js +7 -0
- package/dist/dialog-accept-shortcut-DAEBsoWW.js.map +1 -0
- package/dist/diff.js +4 -4
- package/dist/edit-mode-data-table-4GMiDy75.js +775 -0
- package/dist/edit-mode-data-table-4GMiDy75.js.map +1 -0
- package/dist/editor-config-Dyh8n5A2.js +2416 -0
- package/dist/editor-config-Dyh8n5A2.js.map +1 -0
- package/dist/font/css/prompt-studio-icons.css +36 -6
- package/dist/font/prompt-studio-icons.eot +0 -0
- package/dist/font/prompt-studio-icons.svg +1 -1
- package/dist/font/prompt-studio-icons.ttf +0 -0
- package/dist/font/prompt-studio-icons.woff +0 -0
- package/dist/font/prompt-studio-icons.woff2 +0 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1976 -1712
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-Db1mIWWd.js → kanban-renderer-toolbar-BcUZvGyY.js} +384 -386
- package/dist/kanban-renderer-toolbar-BcUZvGyY.js.map +1 -0
- package/dist/kanban-renderer.js +144 -140
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/{lazy-markdown-editor-DwhqQ-NN.js → lazy-markdown-editor-CWSREEhf.js} +2 -2
- package/dist/{lazy-markdown-editor-DwhqQ-NN.js.map → lazy-markdown-editor-CWSREEhf.js.map} +1 -1
- package/dist/list-row-B8L4TGsh.js +821 -0
- package/dist/list-row-B8L4TGsh.js.map +1 -0
- package/dist/{mermaid-renderer-DZo3qj6D.js → mermaid-renderer-H3IhLqnQ.js} +3 -3
- package/dist/{mermaid-renderer-DZo3qj6D.js.map → mermaid-renderer-H3IhLqnQ.js.map} +1 -1
- package/dist/mermaid.js +1 -1
- package/dist/number-input-WUfejtNx.js +343 -0
- package/dist/number-input-WUfejtNx.js.map +1 -0
- package/dist/param-editor-field-C8zRDStn.js +2845 -0
- package/dist/param-editor-field-C8zRDStn.js.map +1 -0
- package/dist/param-editor-w3xH-t8A.js +161 -0
- package/dist/param-editor-w3xH-t8A.js.map +1 -0
- package/dist/rich-message-jZ2oPQhU.js +658 -0
- package/dist/rich-message-jZ2oPQhU.js.map +1 -0
- package/dist/rich-text.js +182 -110
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/primitives/sizes.d.ts +59 -0
- package/dist/theme/recipes/button.d.ts +11 -0
- package/dist/theme/recipes/segmented-control.d.ts +22 -0
- package/dist/theme/recipes/switch.d.ts +1 -0
- package/dist/theme/recipes/tabs.d.ts +11 -0
- package/dist/{theme-poQlUgt0.js → theme-J8K8KbZi.js} +211 -120
- package/dist/theme-J8K8KbZi.js.map +1 -0
- package/dist/{theme-preference-DOzHx64J.js → theme-preference-DyymrYpR.js} +2 -2
- package/dist/{theme-preference-DOzHx64J.js.map → theme-preference-DyymrYpR.js.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{tree-list-BAja2eXU.js → tree-list-CC13pOYi.js} +2 -2
- package/dist/{tree-list-BAja2eXU.js.map → tree-list-CC13pOYi.js.map} +1 -1
- package/package.json +10 -2
- package/dist/browser-storage-BinyFNJX.js +0 -40
- package/dist/browser-storage-BinyFNJX.js.map +0 -1
- package/dist/checkbox-B2zYVemL.js +0 -70
- package/dist/checkbox-B2zYVemL.js.map +0 -1
- package/dist/components/data-table/editable-cells-story.d.ts +0 -9
- package/dist/kanban-renderer-toolbar-Db1mIWWd.js.map +0 -1
- package/dist/list-row-BYWwcbGK.js +0 -823
- package/dist/list-row-BYWwcbGK.js.map +0 -1
- package/dist/markdown-DDd2ESoH.js +0 -743
- package/dist/markdown-DDd2ESoH.js.map +0 -1
- package/dist/markdown-editor-CYVkzt8t.js +0 -741
- package/dist/markdown-editor-CYVkzt8t.js.map +0 -1
- package/dist/param-editor-BCZOw5Gt.js +0 -140
- package/dist/param-editor-BCZOw5Gt.js.map +0 -1
- package/dist/param-editor-field-ZzZwgjZ_.js +0 -2094
- package/dist/param-editor-field-ZzZwgjZ_.js.map +0 -1
- package/dist/resource-badge-CuItchgL.js +0 -98
- package/dist/resource-badge-CuItchgL.js.map +0 -1
- package/dist/rich-message--eRzjWYK.js +0 -730
- package/dist/rich-message--eRzjWYK.js.map +0 -1
- package/dist/scroll-area-BMbg1WcD.js +0 -91
- package/dist/scroll-area-BMbg1WcD.js.map +0 -1
- package/dist/theme-poQlUgt0.js.map +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DecoratorNode, LexicalEditor, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type SerializedMarkdownImageNode = Spread<{
|
|
4
|
+
source: string;
|
|
5
|
+
alt: string;
|
|
6
|
+
title: string | null;
|
|
7
|
+
}, SerializedLexicalNode>;
|
|
8
|
+
interface MarkdownImageProps {
|
|
9
|
+
source: string;
|
|
10
|
+
alt: string;
|
|
11
|
+
title: string | null;
|
|
12
|
+
onLoad?: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare const MarkdownImage: (props: MarkdownImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare class MarkdownImageNode extends DecoratorNode<ReactNode> {
|
|
16
|
+
__source: string;
|
|
17
|
+
__alt: string;
|
|
18
|
+
__title: string | null;
|
|
19
|
+
static getType(): string;
|
|
20
|
+
static clone(node: MarkdownImageNode): MarkdownImageNode;
|
|
21
|
+
constructor(source: string, alt: string, title?: string | null, key?: NodeKey);
|
|
22
|
+
createDOM(): HTMLSpanElement;
|
|
23
|
+
updateDOM(): boolean;
|
|
24
|
+
isInline(): boolean;
|
|
25
|
+
getSource(): string;
|
|
26
|
+
getAlt(): string;
|
|
27
|
+
getTitle(): string | null;
|
|
28
|
+
getTextContent(): string;
|
|
29
|
+
exportJSON(): SerializedMarkdownImageNode;
|
|
30
|
+
static importJSON(node: SerializedMarkdownImageNode): MarkdownImageNode;
|
|
31
|
+
decorate(editor: LexicalEditor): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
}
|
|
33
|
+
export declare const $createMarkdownImageNode: (source: string, alt: string, title?: string | null) => MarkdownImageNode;
|
|
34
|
+
export declare const $isMarkdownImageNode: (node: LexicalNode | null | undefined) => node is MarkdownImageNode;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LinkAttributes, LinkNode, SerializedLinkNode } from '@lexical/link';
|
|
2
|
+
import { LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
3
|
+
import { MarkdownUrlResolver } from '../markdown-url';
|
|
4
|
+
export type SerializedMarkdownLinkNode = Spread<{
|
|
5
|
+
source: string;
|
|
6
|
+
}, Spread<SerializedLinkNode, SerializedLexicalNode>>;
|
|
7
|
+
export declare class MarkdownLinkNode extends LinkNode {
|
|
8
|
+
__source: string;
|
|
9
|
+
static getType(): string;
|
|
10
|
+
static clone(node: MarkdownLinkNode): MarkdownLinkNode;
|
|
11
|
+
constructor(source?: string, resolvedUrl?: string | null, attributes?: LinkAttributes, key?: NodeKey);
|
|
12
|
+
getSource(): string;
|
|
13
|
+
setURL(url: string): this;
|
|
14
|
+
exportJSON(): SerializedMarkdownLinkNode;
|
|
15
|
+
static importJSON(node: SerializedMarkdownLinkNode): MarkdownLinkNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const $createMarkdownLinkNode: (source: string, resolver?: MarkdownUrlResolver, attributes?: LinkAttributes) => MarkdownLinkNode;
|
|
18
|
+
export declare const $isMarkdownLinkNode: (node: LexicalNode | null | undefined) => node is MarkdownLinkNode;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DecoratorNode, LexicalNode, NodeKey, SerializedLexicalNode, Spread } from 'lexical';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type RawHtmlDisplay = "inline" | "block";
|
|
4
|
+
export type SerializedRawHtmlNode = Spread<{
|
|
5
|
+
source: string;
|
|
6
|
+
display: RawHtmlDisplay;
|
|
7
|
+
}, SerializedLexicalNode>;
|
|
8
|
+
interface RawHtmlProps {
|
|
9
|
+
source: string;
|
|
10
|
+
display: RawHtmlDisplay;
|
|
11
|
+
}
|
|
12
|
+
export declare const RawHtml: (props: RawHtmlProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export declare class RawHtmlNode extends DecoratorNode<ReactNode> {
|
|
14
|
+
__source: string;
|
|
15
|
+
__display: RawHtmlDisplay;
|
|
16
|
+
static getType(): string;
|
|
17
|
+
static clone(node: RawHtmlNode): RawHtmlNode;
|
|
18
|
+
constructor(source: string, display: RawHtmlDisplay, key?: NodeKey);
|
|
19
|
+
createDOM(): HTMLDivElement | HTMLSpanElement;
|
|
20
|
+
updateDOM(previous: RawHtmlNode): boolean;
|
|
21
|
+
isInline(): boolean;
|
|
22
|
+
getSource(): string;
|
|
23
|
+
getDisplay(): RawHtmlDisplay;
|
|
24
|
+
getTextContent(): string;
|
|
25
|
+
exportJSON(): SerializedRawHtmlNode;
|
|
26
|
+
static importJSON(node: SerializedRawHtmlNode): RawHtmlNode;
|
|
27
|
+
decorate(): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
}
|
|
29
|
+
export declare const $createRawHtmlNode: (source: string, display: RawHtmlDisplay) => RawHtmlNode;
|
|
30
|
+
export declare const $isRawHtmlNode: (node: LexicalNode | null | undefined) => node is RawHtmlNode;
|
|
31
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HeadingTagType } from '@lexical/rich-text';
|
|
1
2
|
import { LexicalEditor } from 'lexical';
|
|
2
3
|
import { BlockType } from './resolve-block-type';
|
|
3
4
|
interface FloatingToolbarButtonsProps {
|
|
@@ -6,10 +7,11 @@ interface FloatingToolbarButtonsProps {
|
|
|
6
7
|
isBold: boolean;
|
|
7
8
|
isItalic: boolean;
|
|
8
9
|
isUnderline: boolean;
|
|
10
|
+
isCode: boolean;
|
|
9
11
|
isLink: boolean;
|
|
10
|
-
formatHeading: (headingSize:
|
|
12
|
+
formatHeading: (headingSize: HeadingTagType) => void;
|
|
11
13
|
formatList: (type: "bullet" | "number" | "check") => void;
|
|
12
|
-
|
|
14
|
+
formatQuote: () => void;
|
|
13
15
|
insertLink: () => void;
|
|
14
16
|
}
|
|
15
17
|
export declare function FloatingToolbarButtons(props: FloatingToolbarButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,4 +14,4 @@ export declare const blockTypeToBlockName: {
|
|
|
14
14
|
quote: string;
|
|
15
15
|
};
|
|
16
16
|
export type BlockType = keyof typeof blockTypeToBlockName;
|
|
17
|
-
export declare const resolveBlockTypeFromAnchor: (anchorNode: LexicalNode) => "number" | "code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "
|
|
17
|
+
export declare const resolveBlockTypeFromAnchor: (anchorNode: LexicalNode) => "number" | "code" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "paragraph" | "bullet" | "check" | "quote" | null;
|
package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function setFloatingElemPos(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, verticalGap?: number, horizontalOffset?: number, placement?: "above" | "legacy"): void;
|
|
1
|
+
export declare function setFloatingElemPos(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, verticalGap?: number, horizontalOffset?: number, placement?: "above" | "legacy", coordinateSpace?: "anchor" | "viewport"): void;
|
|
@@ -20,3 +20,4 @@ export declare class MermaidNode extends DecoratorNode<ReactNode> {
|
|
|
20
20
|
decorate(): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
}
|
|
22
22
|
export declare function $isMermaidNode(node: LexicalNode | null | undefined): node is MermaidNode;
|
|
23
|
+
export declare function $createMermaidNode(code: string): MermaidNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextMatchTransformer } from '@lexical/markdown';
|
|
2
2
|
import { TextNode } from 'lexical';
|
|
3
|
-
export declare const TABLE: ElementTransformer;
|
|
4
3
|
export declare const UNDERLINE_INS_TAG: TextMatchTransformer;
|
|
5
4
|
export declare const UNDERLINE_U_TAG: TextMatchTransformer;
|
|
6
5
|
export declare const LINK: TextMatchTransformer;
|
|
@@ -14,4 +13,4 @@ export declare const TRANSFORMERS_EXTENDED: (Readonly<{
|
|
|
14
13
|
getEndIndex?: (node: TextNode, match: RegExpMatchArray) => number | false;
|
|
15
14
|
trigger?: string;
|
|
16
15
|
type: "text-match";
|
|
17
|
-
}> | ElementTransformer)[];
|
|
16
|
+
}> | import('@lexical/markdown').ElementTransformer)[];
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { TagEditor } from './tag-editor';
|
|
2
2
|
export type { TagEditorAction, TagEditorProps, TagEditorValue } from './tag-editor.types';
|
|
3
|
+
export type { TagEditorHeadingProps } from './tag-editor-heading';
|
|
4
|
+
export { TagEditorHeading } from './tag-editor-heading';
|
|
5
|
+
export type { TagEditorSaveBarProps } from './tag-editor-save-bar';
|
|
6
|
+
export { TagEditorSaveBar } from './tag-editor-save-bar';
|
|
3
7
|
export type { SaveTagSettingsInput, TagSettingsPanelProps } from './tag-settings-panel';
|
|
4
8
|
export { TagSettingsPanel } from './tag-settings-panel';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface TagEditorHeadingProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Appends the unsaved-changes marker. */
|
|
5
|
+
hasChanges?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Screen heading for a tag settings panel. The asterisk stays quiet on purpose —
|
|
9
|
+
* the enabled Save button in the same header is the loud signal.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TagEditorHeading: (props: TagEditorHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconColorPickerIconOption } from '../primitives/icon-
|
|
1
|
+
import { IconColorPickerIconOption } from '../primitives/icon-options';
|
|
2
2
|
import { TagEditorAction, TagEditorValue } from './tag-editor.types';
|
|
3
3
|
interface TagEditorRowProps {
|
|
4
4
|
actionOptions?: TagEditorAction[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface TagEditorSaveBarProps {
|
|
2
|
+
onSave: () => void;
|
|
3
|
+
onReset: () => void;
|
|
4
|
+
hasChanges?: boolean;
|
|
5
|
+
isSaving?: boolean;
|
|
6
|
+
resetLabel?: string;
|
|
7
|
+
saveLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The single commit point for a tag settings screen, anchored in its header.
|
|
11
|
+
* Reset only appears while edits are pending, so the resting state stays quiet.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TagEditorSaveBar: (props: TagEditorSaveBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IconColorPickerIconOption } from '../primitives/icon-options';
|
|
2
3
|
export interface TagEditorValue {
|
|
3
4
|
id: string;
|
|
4
5
|
name: string;
|
|
@@ -14,31 +15,30 @@ export interface TagEditorAction {
|
|
|
14
15
|
label: string;
|
|
15
16
|
}
|
|
16
17
|
export interface TagEditorProps {
|
|
17
|
-
title: string;
|
|
18
|
-
description?: string;
|
|
19
18
|
values: TagEditorValue[];
|
|
20
19
|
onValuesChange: (values: TagEditorValue[]) => void;
|
|
21
|
-
onSave: () => void | Promise<void>;
|
|
22
|
-
onCancel: () => void;
|
|
23
20
|
onDeleteValue?: (value: TagEditorValue) => void;
|
|
24
21
|
onSetDefault?: (value: TagEditorValue) => void;
|
|
22
|
+
/** Enables inline renaming of the tag definition itself. */
|
|
23
|
+
onTitleChange?: (title: string) => void;
|
|
24
|
+
title?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
/** Rendered on the right of the header row, e.g. a mode toggle and a delete action. */
|
|
27
|
+
headerActions?: ReactNode;
|
|
28
|
+
/** Marks the heading with the unsaved-changes asterisk. */
|
|
25
29
|
hasChanges?: boolean;
|
|
26
30
|
isSaving?: boolean;
|
|
27
31
|
addLabel?: string;
|
|
28
|
-
|
|
32
|
+
/** Name given to a freshly added option before it is renamed inline. */
|
|
33
|
+
addName?: string;
|
|
29
34
|
actionOptions?: TagEditorAction[];
|
|
30
|
-
actionsColumnLabel?: string;
|
|
31
|
-
cancelLabel?: string;
|
|
32
35
|
defaultAddColor?: string;
|
|
33
36
|
defaultAddIcon?: string | null;
|
|
34
|
-
defaultColumnLabel?: string;
|
|
35
37
|
deleteButtonText?: string;
|
|
36
38
|
deleteHeadline?: string;
|
|
37
39
|
deleteNotificationText?: (value: TagEditorValue) => string;
|
|
38
40
|
colorOptions?: readonly string[];
|
|
39
41
|
iconOptions?: readonly IconColorPickerIconOption[];
|
|
40
|
-
saveLabel?: string;
|
|
41
42
|
showDefault?: boolean;
|
|
42
43
|
showIcons?: boolean;
|
|
43
|
-
valueColumnLabel?: string;
|
|
44
44
|
}
|
|
@@ -4,7 +4,7 @@ export interface SaveTagSettingsInput<TValue> {
|
|
|
4
4
|
drafts: TagEditorValue[];
|
|
5
5
|
values: TValue[];
|
|
6
6
|
}
|
|
7
|
-
type EditorLabels = Pick<TagEditorProps, "actionOptions" | "
|
|
7
|
+
type EditorLabels = Pick<TagEditorProps, "actionOptions" | "addLabel" | "addName" | "colorOptions" | "deleteButtonText" | "deleteHeadline" | "deleteNotificationText" | "description" | "iconOptions" | "showIcons" | "title">;
|
|
8
8
|
type SortableValue = {
|
|
9
9
|
id: string;
|
|
10
10
|
sortOrder: number;
|
|
@@ -12,6 +12,8 @@ type SortableValue = {
|
|
|
12
12
|
export interface TagSettingsPanelProps<TValue extends SortableValue> extends EditorLabels {
|
|
13
13
|
errorTitle: string;
|
|
14
14
|
loadingText?: string;
|
|
15
|
+
resetLabel?: string;
|
|
16
|
+
saveLabel?: string;
|
|
15
17
|
/** Loaded values; pass undefined while the initial load is pending. */
|
|
16
18
|
values: TValue[] | undefined;
|
|
17
19
|
/** Load/save error surfaced by the host's data layer. */
|