@case-framework/survey-ui 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/hooks/use-document-keydown.d.ts +1 -1
- package/dist/src/components/rich-text/index.d.ts +1 -1
- package/dist/src/components/rich-text-editor/plugins/command-handler-plugin.d.ts +1 -1
- package/dist/src/components/rich-text-editor/plugins/image-dialog-plugin.d.ts +1 -1
- package/dist/src/components/rich-text-editor/plugins/sync-editor-value-plugin.d.ts +1 -1
- package/dist/src/components/ui/card.d.ts +1 -1
- package/dist/src/dev/_components/nav-input.d.ts +1 -1
- package/dist/src/modules/default-item-registry/items/form/model.d.ts +1 -1
- package/dist/src/modules/default-item-registry/items/form/search-adapter.d.ts +2 -0
- package/dist/src/modules/survey-editor/assets/survey-image-asset-manager.d.ts +1 -1
- package/dist/src/modules/survey-editor/editor-card/add-items/types.d.ts +1 -1
- package/dist/src/modules/survey-editor/editor-card/item-type-icon-with-tooltip.d.ts +1 -1
- package/dist/src/modules/survey-editor/index.d.ts +1 -1
- package/dist/src/modules/survey-editor/localization/default-all.d.ts +2 -0
- package/dist/src/modules/survey-editor/localization/default-en.d.ts +1 -2
- package/dist/src/modules/survey-editor/localization/default-nl.d.ts +2 -0
- package/dist/src/modules/survey-editor/localization/index.d.ts +4 -2
- package/dist/src/modules/survey-editor/navigation/types.d.ts +3 -3
- package/dist/src/modules/survey-editor/session-file.d.ts +1 -1
- package/dist/src/modules/survey-player/index.d.ts +1 -1
- package/dist/survey-editor-defaults.css +6 -6
- package/dist/survey-ui.cjs.js +71 -71
- package/dist/survey-ui.cjs.js.map +1 -1
- package/dist/survey-ui.css +1 -1
- package/dist/survey-ui.es.js +10698 -9622
- package/dist/survey-ui.es.js.map +1 -1
- package/package.json +38 -38
|
@@ -3,5 +3,5 @@ interface UseDocumentKeydownOptions {
|
|
|
3
3
|
enabled?: boolean;
|
|
4
4
|
ignoreEditableTargets?: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const useDocumentKeydown: (onKeyDown: (event: KeyboardEvent) => void, { enabled, ignoreEditableTargets
|
|
6
|
+
export declare const useDocumentKeydown: (onKeyDown: (event: KeyboardEvent) => void, { enabled, ignoreEditableTargets }?: UseDocumentKeydownOptions) => void;
|
|
7
7
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { RichTextBlockEditor, type RichTextBlockEditorChange, type RichTextBlockEditorProps, } from './rich-text-block-editor';
|
|
2
|
-
export { RichTextContentView, type RichTextContentViewProps
|
|
2
|
+
export { RichTextContentView, type RichTextContentViewProps } from './rich-text-content-view';
|
|
3
3
|
export { createRichTextEditorValueFromContent, createRichTextEditorValueFromText, getRichTextContentFromEditorState, writeContentToEditor, } from './rich-text-survey-content';
|
|
4
4
|
export type { RichTextImageAssetOption } from './types';
|
|
5
5
|
export { DEFAULT_BLOCK_CONTENT_POLICY, DEFAULT_COMPACT_CONTENT_POLICY, isBlockContentPolicyVariant, mergeRichTextContentPolicy, sanitizeContentForPolicy, } from './content-policy';
|
|
@@ -2,4 +2,4 @@ export interface CommandHandlerPluginProps {
|
|
|
2
2
|
/** When true, registers Lexical's horizontal rule insert command (block editor only). */
|
|
3
3
|
horizontalRuleCommandEnabled?: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare function CommandHandlerPlugin({ horizontalRuleCommandEnabled }: CommandHandlerPluginProps): null;
|
|
5
|
+
export declare function CommandHandlerPlugin({ horizontalRuleCommandEnabled, }: CommandHandlerPluginProps): null;
|
|
@@ -8,4 +8,4 @@ declare function CardDescription({ className, ...props }: React.ComponentProps<"
|
|
|
8
8
|
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent
|
|
11
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
|
@@ -31,5 +31,5 @@ interface NavInputProps {
|
|
|
31
31
|
* Simple input field component for navigation.
|
|
32
32
|
* Examples: item-editor, item-editor:someId, translation-mode
|
|
33
33
|
*/
|
|
34
|
-
export declare function NavInput({ result, placeholder, className }: NavInputProps): ReactNode;
|
|
34
|
+
export declare function NavInput({ result, placeholder, className, }: NavInputProps): ReactNode;
|
|
35
35
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SurveyItemTranslations } from '@case-framework/survey-core';
|
|
2
2
|
export type FormFieldType = "input" | "textarea" | "number" | "datepicker" | "switch" | "select" | "slider";
|
|
3
3
|
export declare const FORM_DATEPICKER_FIELD_MODES: readonly ["year", "year-month", "year-month-day"];
|
|
4
|
-
export type FormDatepickerFieldMode = typeof FORM_DATEPICKER_FIELD_MODES[number];
|
|
4
|
+
export type FormDatepickerFieldMode = (typeof FORM_DATEPICKER_FIELD_MODES)[number];
|
|
5
5
|
export interface FormFieldRendererSlotDefinition {
|
|
6
6
|
id: "field" | "label" | "description" | "error";
|
|
7
7
|
entryLabel: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export interface SurveyImageAssetManagerProps {
|
|
2
2
|
className?: string;
|
|
3
3
|
}
|
|
4
|
-
export declare function SurveyImageAssetManager({ className
|
|
4
|
+
export declare function SurveyImageAssetManager({ className }: SurveyImageAssetManagerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LucideIcon } from 'lucide-react';
|
|
2
2
|
import { ItemTypeInfos } from '../../../../../modules/survey-editor/utils/item-type-infos';
|
|
3
|
-
export type AddDialogView =
|
|
3
|
+
export type AddDialogView = "entry" | "blank-item" | "structure" | "ai" | "catalogue";
|
|
4
4
|
export interface ItemTypeOption extends ItemTypeInfos {
|
|
5
5
|
itemType: string;
|
|
6
6
|
categories: string[];
|
|
@@ -4,5 +4,5 @@ interface ItemTypeIconWithTooltipProps {
|
|
|
4
4
|
color?: string;
|
|
5
5
|
iconClassName?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const ItemTypeIconWithTooltip: ({ typeInfos, color, iconClassName }: ItemTypeIconWithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const ItemTypeIconWithTooltip: ({ typeInfos, color, iconClassName, }: ItemTypeIconWithTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default ItemTypeIconWithTooltip;
|
|
@@ -14,4 +14,4 @@ export { APPLY_RICH_TEXT_STYLE_COMMAND, CONVERT_RICH_TEXT_LINK_TO_TEXT_COMMAND,
|
|
|
14
14
|
export { SurveyImageAssetManager, useSurveyAssets, useSurveyImageAssets, useUnusedSurveyAssetCount, } from './assets';
|
|
15
15
|
export type { RichTextBlockEditorChange, RichTextBlockEditorProps, RichTextContentPolicy, RichTextContentViewProps, RichTextEditorVariant, RichTextStyleAttribute, RichTextSupportedBlockType, } from '../../../components/rich-text';
|
|
16
16
|
export type { RichTextEditorChange, RichTextEditorProps, RichTextLinkPayload, SerializedRichTextLinkNode, RichTextStyleControl, RichTextTemplateVariable, SerializedTemplateVariableNode, } from '../../../components/rich-text-editor';
|
|
17
|
-
export type { SurveyImageAssetManagerProps
|
|
17
|
+
export type { SurveyImageAssetManagerProps } from './assets';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { EditorLocalizationMessages
|
|
1
|
+
import { EditorLocalizationMessages } from './types';
|
|
2
2
|
export declare const DEFAULT_EDITOR_LANGUAGE = "en";
|
|
3
3
|
export declare const surveyEditorEnMessages: EditorLocalizationMessages;
|
|
4
|
-
export declare const defaultSurveyEditorLocalizations: SurveyEditorLocalizations;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { DEFAULT_EDITOR_LANGUAGE,
|
|
1
|
+
export { DEFAULT_EDITOR_LANGUAGE, surveyEditorEnMessages } from './default-en';
|
|
2
|
+
export { defaultSurveyEditorLocalizations } from './default-all';
|
|
3
|
+
export { surveyEditorNlMessages } from './default-nl';
|
|
2
4
|
export { createEditorTranslator, createNamespacedEditorTranslator, mergeEditorLocalizations, } from './runtime';
|
|
3
|
-
export { DEFAULT_DATE_FNS_LOCALES, getDateFnsLocale, mergeDateFnsLocales
|
|
5
|
+
export { DEFAULT_DATE_FNS_LOCALES, getDateFnsLocale, mergeDateFnsLocales } from './date-fns';
|
|
4
6
|
export type { EditorLocalizationMessages, EditorTranslate, EditorTranslationValues, SurveyEditorLocalizations, } from './types';
|
|
5
7
|
export type { SurveyEditorDateLocales } from './date-fns';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface ItemEditorLocation {
|
|
2
|
-
view:
|
|
2
|
+
view: "item-editor";
|
|
3
3
|
itemId?: string;
|
|
4
4
|
}
|
|
5
5
|
export interface TranslationModeLocation {
|
|
6
|
-
view:
|
|
6
|
+
view: "translation-mode";
|
|
7
7
|
}
|
|
8
8
|
export interface AssetManagerLocation {
|
|
9
|
-
view:
|
|
9
|
+
view: "asset-manager";
|
|
10
10
|
}
|
|
11
11
|
export type SurveyEditorLocation = ItemEditorLocation | TranslationModeLocation | AssetManagerLocation;
|
|
12
12
|
export interface SurveyEditorNavigationAdapter {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Survey, ItemTypeRegistry } from '@case-framework/survey-core';
|
|
2
2
|
import { SerializedSurveyEditor } from '@case-framework/survey-core/editor';
|
|
3
|
-
export type ParsedSurveySessionFormat =
|
|
3
|
+
export type ParsedSurveySessionFormat = "raw-survey" | "serialized-editor";
|
|
4
4
|
export interface ParsedSurveySession {
|
|
5
5
|
format: ParsedSurveySessionFormat;
|
|
6
6
|
state: SerializedSurveyEditor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SurveyPlayer } from './survey-player';
|
|
2
2
|
export { SurveyContextProvider, useSurveyCtx, useSurveyTranslation, type SurveyContextProviderProps, } from './survey-context';
|
|
3
|
-
export { SurveyItemRenderer, type SurveyItemRendererProps
|
|
3
|
+
export { SurveyItemRenderer, type SurveyItemRendererProps } from './survey-item/survey-item';
|
|
4
4
|
export type { SurveyPlayerProps } from './survey-player';
|
|
5
5
|
export type { SurveyPlayerLocalizationMessages, SurveyPlayerLocalizations, SurveyPlayerTranslate, SurveyPlayerTranslationValue, SurveyPlayerTranslationValues, } from './localization/types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
.survey-editor {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/* Editor card / preview canvas — neutral near-white */
|
|
3
|
+
--surface-bg-color: oklch(99.1% 0 0);
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/*
|
|
6
6
|
* Rich text emphasis (Lexical + preview). Chosen for strong contrast on
|
|
7
7
|
* --surface-bg-color and clearly distinct hues so “primary” vs “accent” reads
|
|
8
8
|
* in the UI (not tied to global --primary / --accent, which are tuned for chrome).
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* Primary — cool / structural: main wording emphasis (question tone, lead-in).
|
|
11
11
|
* Accent — warm / focal: secondary highlight (callouts, supplementary emphasis).
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
13
|
+
--rich-text-editor-primary-color: oklch(0.36 0.12 264);
|
|
14
|
+
--rich-text-editor-accent-color: oklch(0.44 0.15 48);
|
|
15
|
+
}
|