@squaredr/fieldcraft-pro 1.1.1 → 1.3.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/{chunk-RSU3X25P.mjs → chunk-4BX7FCXH.mjs} +416 -21
- package/dist/{chunk-CJBC3KWB.mjs → chunk-GNBXIG63.mjs} +127 -15
- package/dist/form-builder/index.js +125 -13
- package/dist/form-builder/index.mjs +1 -1
- package/dist/index.js +540 -33
- package/dist/index.mjs +3 -3
- package/dist/response-viewer/index.d.mts +10 -0
- package/dist/response-viewer/index.d.ts +10 -0
- package/dist/response-viewer/index.js +414 -19
- package/dist/response-viewer/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +7 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from './chunk-QQ4JZGTD.mjs';
|
|
2
2
|
import { requireLicense } from './chunk-VECQKSWS.mjs';
|
|
3
|
-
import { forwardRef, createContext, Component, useRef, useEffect, useCallback,
|
|
3
|
+
import { forwardRef, createContext, Component, useRef, useState, useEffect, useCallback, useMemo, useContext } from 'react';
|
|
4
4
|
import { DndContext, DragOverlay, useSensors, useSensor, MouseSensor, TouchSensor, useDraggable, useDroppable } from '@dnd-kit/core';
|
|
5
|
-
import { ChevronDown, Undo2, Redo2, Upload, Download, Save, Search, ChevronRight, Plus, Settings, Copy, Trash2,
|
|
5
|
+
import { ChevronDown, Undo2, Redo2, Upload, Download, Save, X, PanelLeft, PanelRight, Search, ChevronRight, Plus, Settings, Copy, Trash2, HelpCircle, MoveVertical, Minus, Video, Image, FileText, PartyPopper, Hand, ShieldCheck, SeparatorHorizontal, Info, Heading, Trophy, EyeOff, Calculator, CreditCard, MapPin, Repeat, Grid3X3, Camera, PenTool, Paperclip, CalendarCheck, CalendarRange, Clock, Calendar, ArrowUpDown, Globe, ToggleLeft, CheckSquare, CircleDot, ListOrdered, TrendingUp, BarChart3, Star, SlidersHorizontal, Hash, UserCheck, Link, PhoneCall, Phone, Mail, AlignLeft, Type, GripVertical } from 'lucide-react';
|
|
6
6
|
import { Button, Separator, Input, Badge, Textarea, Label, Switch } from '@squaredr/fieldcraft-react';
|
|
7
7
|
import { validateSchema, FormEngineSchemaError } from '@squaredr/fieldcraft-core';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -2862,6 +2862,17 @@ function FormBuilderCore(props) {
|
|
|
2862
2862
|
const builderState = useBuilderState(initialSchema);
|
|
2863
2863
|
const dragDrop = useDragDrop(builderState);
|
|
2864
2864
|
const fileInputRef = useRef(null);
|
|
2865
|
+
const [mobilePanel, setMobilePanel] = useState("none");
|
|
2866
|
+
useEffect(() => {
|
|
2867
|
+
if (builderState.selectedItem && window.innerWidth < 768) {
|
|
2868
|
+
setMobilePanel("properties");
|
|
2869
|
+
}
|
|
2870
|
+
}, [builderState.selectedItem]);
|
|
2871
|
+
useEffect(() => {
|
|
2872
|
+
if (!dragDrop.activeDragItem && mobilePanel === "palette") {
|
|
2873
|
+
setMobilePanel("none");
|
|
2874
|
+
}
|
|
2875
|
+
}, [dragDrop.activeDragItem]);
|
|
2865
2876
|
useEffect(() => {
|
|
2866
2877
|
if (onChange && builderState.isDirty) {
|
|
2867
2878
|
onChange(builderState.schema);
|
|
@@ -2983,7 +2994,7 @@ ${details}`);
|
|
|
2983
2994
|
role: "application",
|
|
2984
2995
|
"aria-label": "Form Builder",
|
|
2985
2996
|
children: [
|
|
2986
|
-
/* @__PURE__ */ jsxs("div", { className: "h-12 shrink-0 grid px-4 bg-card border-b border-border", style: { gridTemplateColumns: "1fr auto 1fr" }, role: "toolbar", "aria-label": "Builder toolbar", children: [
|
|
2997
|
+
/* @__PURE__ */ jsxs("div", { className: "h-12 shrink-0 hidden md:grid px-4 bg-card border-b border-border", style: { gridTemplateColumns: "1fr auto 1fr" }, role: "toolbar", "aria-label": "Builder toolbar", children: [
|
|
2987
2998
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2988
2999
|
/* @__PURE__ */ jsx(
|
|
2989
3000
|
Button,
|
|
@@ -3043,23 +3054,124 @@ ${details}`);
|
|
|
3043
3054
|
/* @__PURE__ */ jsx(Save, { size: 14, strokeWidth: 2 }),
|
|
3044
3055
|
"Save"
|
|
3045
3056
|
] })
|
|
3057
|
+
] })
|
|
3058
|
+
] }),
|
|
3059
|
+
/* @__PURE__ */ jsxs("div", { className: "shrink-0 md:hidden bg-card border-b border-border", role: "toolbar", "aria-label": "Builder toolbar", children: [
|
|
3060
|
+
/* @__PURE__ */ jsxs("div", { className: "h-10 grid px-2", style: { gridTemplateColumns: "auto 1fr auto" }, children: [
|
|
3061
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(
|
|
3062
|
+
Button,
|
|
3063
|
+
{
|
|
3064
|
+
variant: mobilePanel === "palette" ? "secondary" : "ghost",
|
|
3065
|
+
size: "icon-sm",
|
|
3066
|
+
onClick: () => setMobilePanel((p) => p === "palette" ? "none" : "palette"),
|
|
3067
|
+
title: "Toggle field palette",
|
|
3068
|
+
"aria-label": "Toggle field palette",
|
|
3069
|
+
children: mobilePanel === "palette" ? /* @__PURE__ */ jsx(X, { size: 16, strokeWidth: 1.75 }) : /* @__PURE__ */ jsx(PanelLeft, { size: 16, strokeWidth: 1.75 })
|
|
3070
|
+
}
|
|
3071
|
+
) }),
|
|
3072
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-1", children: [
|
|
3073
|
+
toolbarExtra,
|
|
3074
|
+
/* @__PURE__ */ jsxs(Button, { onClick: handleSave, size: "sm", className: "border-0 shadow-sm fcb-glow ml-1", "aria-label": "Save form", children: [
|
|
3075
|
+
/* @__PURE__ */ jsx(Save, { size: 14, strokeWidth: 2 }),
|
|
3076
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "Save" })
|
|
3077
|
+
] })
|
|
3078
|
+
] }),
|
|
3079
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(
|
|
3080
|
+
Button,
|
|
3081
|
+
{
|
|
3082
|
+
variant: mobilePanel === "properties" ? "secondary" : "ghost",
|
|
3083
|
+
size: "icon-sm",
|
|
3084
|
+
onClick: () => setMobilePanel((p) => p === "properties" ? "none" : "properties"),
|
|
3085
|
+
title: "Toggle properties panel",
|
|
3086
|
+
"aria-label": "Toggle properties panel",
|
|
3087
|
+
children: mobilePanel === "properties" ? /* @__PURE__ */ jsx(X, { size: 16, strokeWidth: 1.75 }) : /* @__PURE__ */ jsx(PanelRight, { size: 16, strokeWidth: 1.75 })
|
|
3088
|
+
}
|
|
3089
|
+
) })
|
|
3046
3090
|
] }),
|
|
3047
|
-
/* @__PURE__ */
|
|
3048
|
-
"
|
|
3091
|
+
/* @__PURE__ */ jsxs("div", { className: "h-9 flex items-center justify-between px-2 border-t border-border/50", children: [
|
|
3092
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3093
|
+
/* @__PURE__ */ jsx(
|
|
3094
|
+
Button,
|
|
3095
|
+
{
|
|
3096
|
+
variant: "ghost",
|
|
3097
|
+
size: "icon-sm",
|
|
3098
|
+
onClick: builderState.undo,
|
|
3099
|
+
disabled: !builderState.canUndo,
|
|
3100
|
+
className: "disabled:opacity-30",
|
|
3101
|
+
title: "Undo (Ctrl+Z)",
|
|
3102
|
+
"aria-label": "Undo",
|
|
3103
|
+
children: /* @__PURE__ */ jsx(Undo2, { size: 15, strokeWidth: 1.75 })
|
|
3104
|
+
}
|
|
3105
|
+
),
|
|
3106
|
+
/* @__PURE__ */ jsx(
|
|
3107
|
+
Button,
|
|
3108
|
+
{
|
|
3109
|
+
variant: "ghost",
|
|
3110
|
+
size: "icon-sm",
|
|
3111
|
+
onClick: builderState.redo,
|
|
3112
|
+
disabled: !builderState.canRedo,
|
|
3113
|
+
className: "disabled:opacity-30",
|
|
3114
|
+
title: "Redo (Ctrl+Shift+Z)",
|
|
3115
|
+
"aria-label": "Redo",
|
|
3116
|
+
children: /* @__PURE__ */ jsx(Redo2, { size: 15, strokeWidth: 1.75 })
|
|
3117
|
+
}
|
|
3118
|
+
),
|
|
3119
|
+
builderState.isDirty && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3120
|
+
/* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mx-1 h-4" }),
|
|
3121
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-primary", role: "status", children: "Unsaved" })
|
|
3122
|
+
] })
|
|
3123
|
+
] }),
|
|
3124
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3125
|
+
/* @__PURE__ */ jsx(
|
|
3126
|
+
Button,
|
|
3127
|
+
{
|
|
3128
|
+
variant: "ghost",
|
|
3129
|
+
size: "icon-sm",
|
|
3130
|
+
onClick: handleImport,
|
|
3131
|
+
title: "Import schema JSON",
|
|
3132
|
+
"aria-label": "Import schema",
|
|
3133
|
+
children: /* @__PURE__ */ jsx(Upload, { size: 14, strokeWidth: 1.75 })
|
|
3134
|
+
}
|
|
3135
|
+
),
|
|
3136
|
+
/* @__PURE__ */ jsx(
|
|
3137
|
+
Button,
|
|
3138
|
+
{
|
|
3139
|
+
variant: "ghost",
|
|
3140
|
+
size: "icon-sm",
|
|
3141
|
+
onClick: handleExport,
|
|
3142
|
+
title: "Export schema JSON",
|
|
3143
|
+
"aria-label": "Export schema",
|
|
3144
|
+
children: /* @__PURE__ */ jsx(Download, { size: 14, strokeWidth: 1.75 })
|
|
3145
|
+
}
|
|
3146
|
+
)
|
|
3147
|
+
] })
|
|
3148
|
+
] })
|
|
3149
|
+
] }),
|
|
3150
|
+
/* @__PURE__ */ jsx(
|
|
3151
|
+
"input",
|
|
3152
|
+
{
|
|
3153
|
+
ref: fileInputRef,
|
|
3154
|
+
type: "file",
|
|
3155
|
+
accept: ".json,application/json",
|
|
3156
|
+
onChange: handleFileChange,
|
|
3157
|
+
className: "hidden",
|
|
3158
|
+
"aria-hidden": "true"
|
|
3159
|
+
}
|
|
3160
|
+
),
|
|
3161
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
3162
|
+
/* @__PURE__ */ jsx("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx(QuestionPalette, { questionTypes: mergedQuestionTypes, palette }) }),
|
|
3163
|
+
/* @__PURE__ */ jsx(FormCanvas, { builderState }),
|
|
3164
|
+
/* @__PURE__ */ jsx("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsx(PropertiesPanel, { builderState }) }),
|
|
3165
|
+
mobilePanel === "palette" && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 z-20 md:hidden shadow-lg", children: /* @__PURE__ */ jsx(QuestionPalette, { questionTypes: mergedQuestionTypes, palette }) }),
|
|
3166
|
+
mobilePanel === "properties" && /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 z-20 md:hidden shadow-lg", children: /* @__PURE__ */ jsx(PropertiesPanel, { builderState }) }),
|
|
3167
|
+
mobilePanel !== "none" && /* @__PURE__ */ jsx(
|
|
3168
|
+
"div",
|
|
3049
3169
|
{
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
accept: ".json,application/json",
|
|
3053
|
-
onChange: handleFileChange,
|
|
3054
|
-
className: "hidden",
|
|
3170
|
+
className: "absolute inset-0 z-10 bg-black/20 md:hidden",
|
|
3171
|
+
onClick: () => setMobilePanel("none"),
|
|
3055
3172
|
"aria-hidden": "true"
|
|
3056
3173
|
}
|
|
3057
3174
|
)
|
|
3058
|
-
] }),
|
|
3059
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
3060
|
-
/* @__PURE__ */ jsx(QuestionPalette, { questionTypes: mergedQuestionTypes, palette }),
|
|
3061
|
-
/* @__PURE__ */ jsx(FormCanvas, { builderState }),
|
|
3062
|
-
/* @__PURE__ */ jsx(PropertiesPanel, { builderState })
|
|
3063
3175
|
] })
|
|
3064
3176
|
]
|
|
3065
3177
|
}
|
|
@@ -3189,6 +3189,17 @@ function FormBuilderCore(props) {
|
|
|
3189
3189
|
const builderState = useBuilderState(initialSchema);
|
|
3190
3190
|
const dragDrop = useDragDrop(builderState);
|
|
3191
3191
|
const fileInputRef = react.useRef(null);
|
|
3192
|
+
const [mobilePanel, setMobilePanel] = react.useState("none");
|
|
3193
|
+
react.useEffect(() => {
|
|
3194
|
+
if (builderState.selectedItem && window.innerWidth < 768) {
|
|
3195
|
+
setMobilePanel("properties");
|
|
3196
|
+
}
|
|
3197
|
+
}, [builderState.selectedItem]);
|
|
3198
|
+
react.useEffect(() => {
|
|
3199
|
+
if (!dragDrop.activeDragItem && mobilePanel === "palette") {
|
|
3200
|
+
setMobilePanel("none");
|
|
3201
|
+
}
|
|
3202
|
+
}, [dragDrop.activeDragItem]);
|
|
3192
3203
|
react.useEffect(() => {
|
|
3193
3204
|
if (onChange && builderState.isDirty) {
|
|
3194
3205
|
onChange(builderState.schema);
|
|
@@ -3310,7 +3321,7 @@ ${details}`);
|
|
|
3310
3321
|
role: "application",
|
|
3311
3322
|
"aria-label": "Form Builder",
|
|
3312
3323
|
children: [
|
|
3313
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-12 shrink-0 grid px-4 bg-card border-b border-border", style: { gridTemplateColumns: "1fr auto 1fr" }, role: "toolbar", "aria-label": "Builder toolbar", children: [
|
|
3324
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-12 shrink-0 hidden md:grid px-4 bg-card border-b border-border", style: { gridTemplateColumns: "1fr auto 1fr" }, role: "toolbar", "aria-label": "Builder toolbar", children: [
|
|
3314
3325
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3315
3326
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3316
3327
|
fieldcraftReact.Button,
|
|
@@ -3370,23 +3381,124 @@ ${details}`);
|
|
|
3370
3381
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { size: 14, strokeWidth: 2 }),
|
|
3371
3382
|
"Save"
|
|
3372
3383
|
] })
|
|
3384
|
+
] })
|
|
3385
|
+
] }),
|
|
3386
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "shrink-0 md:hidden bg-card border-b border-border", role: "toolbar", "aria-label": "Builder toolbar", children: [
|
|
3387
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-10 grid px-2", style: { gridTemplateColumns: "auto 1fr auto" }, children: [
|
|
3388
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3389
|
+
fieldcraftReact.Button,
|
|
3390
|
+
{
|
|
3391
|
+
variant: mobilePanel === "palette" ? "secondary" : "ghost",
|
|
3392
|
+
size: "icon-sm",
|
|
3393
|
+
onClick: () => setMobilePanel((p) => p === "palette" ? "none" : "palette"),
|
|
3394
|
+
title: "Toggle field palette",
|
|
3395
|
+
"aria-label": "Toggle field palette",
|
|
3396
|
+
children: mobilePanel === "palette" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 16, strokeWidth: 1.75 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeft, { size: 16, strokeWidth: 1.75 })
|
|
3397
|
+
}
|
|
3398
|
+
) }),
|
|
3399
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
|
|
3400
|
+
toolbarExtra,
|
|
3401
|
+
/* @__PURE__ */ jsxRuntime.jsxs(fieldcraftReact.Button, { onClick: handleSave, size: "sm", className: "border-0 shadow-sm fcb-glow ml-1", "aria-label": "Save form", children: [
|
|
3402
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Save, { size: 14, strokeWidth: 2 }),
|
|
3403
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Save" })
|
|
3404
|
+
] })
|
|
3405
|
+
] }),
|
|
3406
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3407
|
+
fieldcraftReact.Button,
|
|
3408
|
+
{
|
|
3409
|
+
variant: mobilePanel === "properties" ? "secondary" : "ghost",
|
|
3410
|
+
size: "icon-sm",
|
|
3411
|
+
onClick: () => setMobilePanel((p) => p === "properties" ? "none" : "properties"),
|
|
3412
|
+
title: "Toggle properties panel",
|
|
3413
|
+
"aria-label": "Toggle properties panel",
|
|
3414
|
+
children: mobilePanel === "properties" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { size: 16, strokeWidth: 1.75 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelRight, { size: 16, strokeWidth: 1.75 })
|
|
3415
|
+
}
|
|
3416
|
+
) })
|
|
3373
3417
|
] }),
|
|
3374
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3375
|
-
"
|
|
3418
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-9 flex items-center justify-between px-2 border-t border-border/50", children: [
|
|
3419
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3420
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3421
|
+
fieldcraftReact.Button,
|
|
3422
|
+
{
|
|
3423
|
+
variant: "ghost",
|
|
3424
|
+
size: "icon-sm",
|
|
3425
|
+
onClick: builderState.undo,
|
|
3426
|
+
disabled: !builderState.canUndo,
|
|
3427
|
+
className: "disabled:opacity-30",
|
|
3428
|
+
title: "Undo (Ctrl+Z)",
|
|
3429
|
+
"aria-label": "Undo",
|
|
3430
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Undo2, { size: 15, strokeWidth: 1.75 })
|
|
3431
|
+
}
|
|
3432
|
+
),
|
|
3433
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3434
|
+
fieldcraftReact.Button,
|
|
3435
|
+
{
|
|
3436
|
+
variant: "ghost",
|
|
3437
|
+
size: "icon-sm",
|
|
3438
|
+
onClick: builderState.redo,
|
|
3439
|
+
disabled: !builderState.canRedo,
|
|
3440
|
+
className: "disabled:opacity-30",
|
|
3441
|
+
title: "Redo (Ctrl+Shift+Z)",
|
|
3442
|
+
"aria-label": "Redo",
|
|
3443
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Redo2, { size: 15, strokeWidth: 1.75 })
|
|
3444
|
+
}
|
|
3445
|
+
),
|
|
3446
|
+
builderState.isDirty && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3447
|
+
/* @__PURE__ */ jsxRuntime.jsx(fieldcraftReact.Separator, { orientation: "vertical", className: "mx-1 h-4" }),
|
|
3448
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-primary", role: "status", children: "Unsaved" })
|
|
3449
|
+
] })
|
|
3450
|
+
] }),
|
|
3451
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3452
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3453
|
+
fieldcraftReact.Button,
|
|
3454
|
+
{
|
|
3455
|
+
variant: "ghost",
|
|
3456
|
+
size: "icon-sm",
|
|
3457
|
+
onClick: handleImport,
|
|
3458
|
+
title: "Import schema JSON",
|
|
3459
|
+
"aria-label": "Import schema",
|
|
3460
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { size: 14, strokeWidth: 1.75 })
|
|
3461
|
+
}
|
|
3462
|
+
),
|
|
3463
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3464
|
+
fieldcraftReact.Button,
|
|
3465
|
+
{
|
|
3466
|
+
variant: "ghost",
|
|
3467
|
+
size: "icon-sm",
|
|
3468
|
+
onClick: handleExport,
|
|
3469
|
+
title: "Export schema JSON",
|
|
3470
|
+
"aria-label": "Export schema",
|
|
3471
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Download, { size: 14, strokeWidth: 1.75 })
|
|
3472
|
+
}
|
|
3473
|
+
)
|
|
3474
|
+
] })
|
|
3475
|
+
] })
|
|
3476
|
+
] }),
|
|
3477
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3478
|
+
"input",
|
|
3479
|
+
{
|
|
3480
|
+
ref: fileInputRef,
|
|
3481
|
+
type: "file",
|
|
3482
|
+
accept: ".json,application/json",
|
|
3483
|
+
onChange: handleFileChange,
|
|
3484
|
+
className: "hidden",
|
|
3485
|
+
"aria-hidden": "true"
|
|
3486
|
+
}
|
|
3487
|
+
),
|
|
3488
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex overflow-hidden relative", children: [
|
|
3489
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsxRuntime.jsx(QuestionPalette, { questionTypes: mergedQuestionTypes, palette }) }),
|
|
3490
|
+
/* @__PURE__ */ jsxRuntime.jsx(FormCanvas, { builderState }),
|
|
3491
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex", children: /* @__PURE__ */ jsxRuntime.jsx(PropertiesPanel, { builderState }) }),
|
|
3492
|
+
mobilePanel === "palette" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 left-0 z-20 md:hidden shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(QuestionPalette, { questionTypes: mergedQuestionTypes, palette }) }),
|
|
3493
|
+
mobilePanel === "properties" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-y-0 right-0 z-20 md:hidden shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(PropertiesPanel, { builderState }) }),
|
|
3494
|
+
mobilePanel !== "none" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3495
|
+
"div",
|
|
3376
3496
|
{
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
accept: ".json,application/json",
|
|
3380
|
-
onChange: handleFileChange,
|
|
3381
|
-
className: "hidden",
|
|
3497
|
+
className: "absolute inset-0 z-10 bg-black/20 md:hidden",
|
|
3498
|
+
onClick: () => setMobilePanel("none"),
|
|
3382
3499
|
"aria-hidden": "true"
|
|
3383
3500
|
}
|
|
3384
3501
|
)
|
|
3385
|
-
] }),
|
|
3386
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex overflow-hidden", children: [
|
|
3387
|
-
/* @__PURE__ */ jsxRuntime.jsx(QuestionPalette, { questionTypes: mergedQuestionTypes, palette }),
|
|
3388
|
-
/* @__PURE__ */ jsxRuntime.jsx(FormCanvas, { builderState }),
|
|
3389
|
-
/* @__PURE__ */ jsxRuntime.jsx(PropertiesPanel, { builderState })
|
|
3390
3502
|
] })
|
|
3391
3503
|
]
|
|
3392
3504
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { DEFAULT_PALETTE, DEFAULT_SCHEMA, FormBuilder, FormBuilderThemeProvider, QUESTION_TYPE_INFO, addOption, addQuestion, addSection, cleanPreset, duplicateQuestion, duplicateSection, findQuestion, findSection, generateId, generateOptionId, generateQuestionId, generateSectionId, moveOption, moveQuestion, moveSection, removeOption, removeQuestion, removeSection, squaredrDarkPreset, updateOption, updateQuestion, updateSection, useBuilderState, useBuilderTheme, useDragDrop, useUndoRedo } from '../chunk-
|
|
1
|
+
export { DEFAULT_PALETTE, DEFAULT_SCHEMA, FormBuilder, FormBuilderThemeProvider, QUESTION_TYPE_INFO, addOption, addQuestion, addSection, cleanPreset, duplicateQuestion, duplicateSection, findQuestion, findSection, generateId, generateOptionId, generateQuestionId, generateSectionId, moveOption, moveQuestion, moveSection, removeOption, removeQuestion, removeSection, squaredrDarkPreset, updateOption, updateQuestion, updateSection, useBuilderState, useBuilderTheme, useDragDrop, useUndoRedo } from '../chunk-GNBXIG63.mjs';
|
|
2
2
|
export { cn } from '../chunk-QQ4JZGTD.mjs';
|
|
3
3
|
import '../chunk-VECQKSWS.mjs';
|