@overmap-ai/core 1.0.57-export-overmap-reducer.3 → 1.0.57-export-overmap-reducer.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forms/fields/BaseField/layouts.d.ts +3 -2
- package/dist/forms/fields/typings.d.ts +3 -3
- package/dist/forms/renderer/index.d.ts +0 -1
- package/dist/overmap-core.js +353 -500
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +342 -489
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/store/slices/projectSlice.d.ts +1 -0
- package/dist/store/slices/rehydratedSlice.d.ts +1 -0
- package/dist/store/slices/settingsSlice.d.ts +1 -1
- package/dist/style.css +0 -7
- package/package.json +1 -1
- package/dist/forms/renderer/FormSubmissionBrowser/FormSubmissionBrowser.d.ts +0 -28
|
@@ -2839,6 +2839,12 @@ var __publicField = (obj, key, value) => {
|
|
|
2839
2839
|
const selectRecentProjects = (state) => {
|
|
2840
2840
|
return state.projectReducer.recentProjectIds;
|
|
2841
2841
|
};
|
|
2842
|
+
const selectProject = restructureCreateSelectorWithArgs(
|
|
2843
|
+
toolkit.createSelector(
|
|
2844
|
+
[selectProjects, (_state, projectId) => projectId],
|
|
2845
|
+
(projects, projectId) => projects[projectId]
|
|
2846
|
+
)
|
|
2847
|
+
);
|
|
2842
2848
|
const selectSortedProjects = toolkit.createSelector(
|
|
2843
2849
|
[selectActiveProject, selectProjects],
|
|
2844
2850
|
(activeProject, projects) => {
|
|
@@ -3210,15 +3216,17 @@ var __publicField = (obj, key, value) => {
|
|
|
3210
3216
|
}
|
|
3211
3217
|
}
|
|
3212
3218
|
});
|
|
3219
|
+
const { setRehydrated } = rehydratedSlice.actions;
|
|
3213
3220
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
3214
3221
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
3215
3222
|
const initialState$8 = {
|
|
3216
3223
|
useIssueTemplate: false,
|
|
3224
|
+
// TODO: marked for deletion
|
|
3217
3225
|
placementMode: false,
|
|
3218
3226
|
enableClustering: false,
|
|
3219
3227
|
svgLayout: false,
|
|
3220
|
-
// TODO: this is no longer used
|
|
3221
3228
|
expandedSections: {
|
|
3229
|
+
// TODO: marked for deletion
|
|
3222
3230
|
Issues: true,
|
|
3223
3231
|
"Map Layers": false,
|
|
3224
3232
|
Components: false,
|
|
@@ -3264,6 +3272,8 @@ var __publicField = (obj, key, value) => {
|
|
|
3264
3272
|
const {
|
|
3265
3273
|
setEnableDuplicateIssues,
|
|
3266
3274
|
setEnablePlacementMode,
|
|
3275
|
+
setEnableSvgLayout,
|
|
3276
|
+
// TODO: needs to actually be used in /web
|
|
3267
3277
|
setSectionExpanded,
|
|
3268
3278
|
setEnableClustering,
|
|
3269
3279
|
setAppearance,
|
|
@@ -8380,7 +8390,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8380
8390
|
const patchfieldBorder = "_patchfieldBorder_1w0fq_73";
|
|
8381
8391
|
const title = "_title_1w0fq_73";
|
|
8382
8392
|
const error = "_error_1w0fq_89";
|
|
8383
|
-
const styles$
|
|
8393
|
+
const styles$c = {
|
|
8384
8394
|
description: description$2,
|
|
8385
8395
|
floatingButtonContainer: floatingButtonContainer$2,
|
|
8386
8396
|
FullScreenImageContainer: FullScreenImageContainer$2,
|
|
@@ -8493,179 +8503,6 @@ var __publicField = (obj, key, value) => {
|
|
|
8493
8503
|
}
|
|
8494
8504
|
__publicField(BaseField, "fieldTypeName");
|
|
8495
8505
|
__publicField(BaseField, "fieldTypeDescription");
|
|
8496
|
-
const description$1 = "_description_10o76_1";
|
|
8497
|
-
const floatingButtonContainer$1 = "_floatingButtonContainer_10o76_5";
|
|
8498
|
-
const FullScreenImageContainer$1 = "_FullScreenImageContainer_10o76_12";
|
|
8499
|
-
const TopBarContainer$1 = "_TopBarContainer_10o76_22";
|
|
8500
|
-
const fileName$1 = "_fileName_10o76_31";
|
|
8501
|
-
const longIconButton$1 = "_longIconButton_10o76_36";
|
|
8502
|
-
const previewImage$1 = "_previewImage_10o76_42";
|
|
8503
|
-
const FullScreenImage$1 = "_FullScreenImage_10o76_12";
|
|
8504
|
-
const styles$c = {
|
|
8505
|
-
description: description$1,
|
|
8506
|
-
floatingButtonContainer: floatingButtonContainer$1,
|
|
8507
|
-
FullScreenImageContainer: FullScreenImageContainer$1,
|
|
8508
|
-
TopBarContainer: TopBarContainer$1,
|
|
8509
|
-
fileName: fileName$1,
|
|
8510
|
-
longIconButton: longIconButton$1,
|
|
8511
|
-
previewImage: previewImage$1,
|
|
8512
|
-
FullScreenImage: FullScreenImage$1
|
|
8513
|
-
};
|
|
8514
|
-
const FullScreenImagePreview = React.memo((props) => {
|
|
8515
|
-
const { file, url, name, setShowPreview } = props;
|
|
8516
|
-
const handleDownload = React.useCallback(
|
|
8517
|
-
(event) => {
|
|
8518
|
-
event.stopPropagation();
|
|
8519
|
-
const blob = new Blob([file]);
|
|
8520
|
-
saveAs(blob, name);
|
|
8521
|
-
},
|
|
8522
|
-
[name, file]
|
|
8523
|
-
);
|
|
8524
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8525
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8526
|
-
"button",
|
|
8527
|
-
{
|
|
8528
|
-
className: styles$c.FullScreenImageContainer,
|
|
8529
|
-
type: "button",
|
|
8530
|
-
onClick: () => {
|
|
8531
|
-
setShowPreview(false);
|
|
8532
|
-
},
|
|
8533
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8534
|
-
"img",
|
|
8535
|
-
{
|
|
8536
|
-
className: styles$c.FullScreenImage,
|
|
8537
|
-
src: url,
|
|
8538
|
-
alt: name,
|
|
8539
|
-
onClick: (e) => {
|
|
8540
|
-
e.stopPropagation();
|
|
8541
|
-
}
|
|
8542
|
-
}
|
|
8543
|
-
)
|
|
8544
|
-
}
|
|
8545
|
-
),
|
|
8546
|
-
/* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { className: styles$c.TopBarContainer, align: "center", children: [
|
|
8547
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8548
|
-
blocks.IconButton,
|
|
8549
|
-
{
|
|
8550
|
-
className: styles$c.longIconButton,
|
|
8551
|
-
variant: "soft",
|
|
8552
|
-
"aria-label": "Exit preview",
|
|
8553
|
-
onClick: () => {
|
|
8554
|
-
setShowPreview(false);
|
|
8555
|
-
},
|
|
8556
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiArrowLeftLine" })
|
|
8557
|
-
}
|
|
8558
|
-
),
|
|
8559
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { className: styles$c.fileName, children: name }),
|
|
8560
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8561
|
-
blocks.IconButton,
|
|
8562
|
-
{
|
|
8563
|
-
className: styles$c.longIconButton,
|
|
8564
|
-
variant: "soft",
|
|
8565
|
-
"aria-label": `Download ${name}`,
|
|
8566
|
-
onClick: handleDownload,
|
|
8567
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiDownload2Line" })
|
|
8568
|
-
}
|
|
8569
|
-
)
|
|
8570
|
-
] })
|
|
8571
|
-
] });
|
|
8572
|
-
});
|
|
8573
|
-
FullScreenImagePreview.displayName = "FullScreenImagePreview";
|
|
8574
|
-
const InputWithLabel = (props) => {
|
|
8575
|
-
const { label, children, size, severity, inputId, labelId, image, flexProps } = props;
|
|
8576
|
-
const [resolvedImage, setResolvedImage] = React.useState(void 0);
|
|
8577
|
-
const [showImagePreview, setShowImagePreview] = React.useState(false);
|
|
8578
|
-
React.useEffect(() => {
|
|
8579
|
-
if (image instanceof Promise) {
|
|
8580
|
-
image.then(setResolvedImage).catch(console.error);
|
|
8581
|
-
} else {
|
|
8582
|
-
setResolvedImage(image);
|
|
8583
|
-
}
|
|
8584
|
-
}, [image]);
|
|
8585
|
-
const resolvedImageURL = resolvedImage ? URL.createObjectURL(resolvedImage) : void 0;
|
|
8586
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { direction: "column", gap: "2", children: [
|
|
8587
|
-
resolvedImage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8588
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8589
|
-
"img",
|
|
8590
|
-
{
|
|
8591
|
-
className: styles$c.previewImage,
|
|
8592
|
-
src: resolvedImageURL,
|
|
8593
|
-
alt: resolvedImage.name,
|
|
8594
|
-
onClick: () => {
|
|
8595
|
-
setShowImagePreview(true);
|
|
8596
|
-
}
|
|
8597
|
-
}
|
|
8598
|
-
),
|
|
8599
|
-
showImagePreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8600
|
-
FullScreenImagePreview,
|
|
8601
|
-
{
|
|
8602
|
-
file: resolvedImage,
|
|
8603
|
-
url: resolvedImageURL,
|
|
8604
|
-
name: resolvedImage.name,
|
|
8605
|
-
setShowPreview: setShowImagePreview
|
|
8606
|
-
}
|
|
8607
|
-
)
|
|
8608
|
-
] }),
|
|
8609
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Flex, { direction: "column", gap: "1", asChild: true, ...flexProps, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, children: [
|
|
8610
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size, severity, id: labelId, children: label }),
|
|
8611
|
-
children
|
|
8612
|
-
] }) })
|
|
8613
|
-
] });
|
|
8614
|
-
};
|
|
8615
|
-
const InputWithHelpText = (props) => {
|
|
8616
|
-
const { helpText, children, severity } = props;
|
|
8617
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { direction: "column", gap: "1", children: [
|
|
8618
|
-
children,
|
|
8619
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Flex, { direction: "column", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size: "1", severity, className: styles$c.description, children: helpText }) })
|
|
8620
|
-
] });
|
|
8621
|
-
};
|
|
8622
|
-
const InputWithLabelAndHelpText = (props) => {
|
|
8623
|
-
const { children, ...restProps } = props;
|
|
8624
|
-
return /* @__PURE__ */ jsxRuntime.jsx(InputWithHelpText, { ...restProps, children });
|
|
8625
|
-
};
|
|
8626
|
-
const useFormikInput = (props) => {
|
|
8627
|
-
const { id, field, formId: formId2, size, showInputOnly, ...rest } = props;
|
|
8628
|
-
const [fieldProps, meta, helpers] = formik.useField(field.getId());
|
|
8629
|
-
const { touched } = meta;
|
|
8630
|
-
const helpText = meta.error ?? field.description;
|
|
8631
|
-
const severity = meta.error ? "danger" : void 0;
|
|
8632
|
-
const inputId = id ?? `${formId2}-${field.getId()}-input`;
|
|
8633
|
-
const labelId = `${inputId}-label`;
|
|
8634
|
-
const label = field.required ? `${field.label} *` : field.label;
|
|
8635
|
-
const fieldPropsWithValidation = React.useMemo(() => {
|
|
8636
|
-
const handleChange = (e) => {
|
|
8637
|
-
const value = field.getValueFromChangeEvent(e);
|
|
8638
|
-
void helpers.setValue(value, false).then();
|
|
8639
|
-
if (touched || !field.onlyValidateAfterTouched) {
|
|
8640
|
-
helpers.setError(field.getError(value));
|
|
8641
|
-
}
|
|
8642
|
-
};
|
|
8643
|
-
const handleBlur = (e) => {
|
|
8644
|
-
void helpers.setTouched(true, false).then();
|
|
8645
|
-
helpers.setError(field.getError(field.getValueFromChangeEvent(e)));
|
|
8646
|
-
};
|
|
8647
|
-
return {
|
|
8648
|
-
...fieldProps,
|
|
8649
|
-
onChange: handleChange,
|
|
8650
|
-
onBlur: handleBlur
|
|
8651
|
-
};
|
|
8652
|
-
}, [field, fieldProps, helpers, touched]);
|
|
8653
|
-
return [
|
|
8654
|
-
{
|
|
8655
|
-
helpText,
|
|
8656
|
-
size,
|
|
8657
|
-
severity,
|
|
8658
|
-
inputId,
|
|
8659
|
-
labelId,
|
|
8660
|
-
label,
|
|
8661
|
-
showInputOnly,
|
|
8662
|
-
fieldProps: fieldPropsWithValidation,
|
|
8663
|
-
helpers,
|
|
8664
|
-
field
|
|
8665
|
-
},
|
|
8666
|
-
{ ...rest, "aria-labelledby": labelId }
|
|
8667
|
-
];
|
|
8668
|
-
};
|
|
8669
8506
|
function getDefaultExportFromCjs(x) {
|
|
8670
8507
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
8671
8508
|
}
|
|
@@ -9533,10 +9370,10 @@ var __publicField = (obj, key, value) => {
|
|
|
9533
9370
|
});
|
|
9534
9371
|
Text.displayName = "Text";
|
|
9535
9372
|
const sizes$7 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
9536
|
-
const variants$
|
|
9373
|
+
const variants$4 = ["solid", "soft", "outline", "ghost"];
|
|
9537
9374
|
const codePropDefs = {
|
|
9538
9375
|
size: { type: "enum", values: sizes$7, default: void 0, responsive: true },
|
|
9539
|
-
variant: { type: "enum", values: variants$
|
|
9376
|
+
variant: { type: "enum", values: variants$4, default: "soft" },
|
|
9540
9377
|
weight: weightProp,
|
|
9541
9378
|
color: colorProp,
|
|
9542
9379
|
highContrast: highContrastProp
|
|
@@ -9703,10 +9540,10 @@ var __publicField = (obj, key, value) => {
|
|
|
9703
9540
|
const $e698a72e93240346$export$be92b6f5f03c0fe9 = $e698a72e93240346$export$48513f6b9f8ce62d;
|
|
9704
9541
|
const $e698a72e93240346$export$adb584737d712b70 = $e698a72e93240346$export$59aad738f51d1c05;
|
|
9705
9542
|
const sizes$6 = ["1", "2", "3"];
|
|
9706
|
-
const variants$
|
|
9543
|
+
const variants$3 = ["classic", "surface", "soft"];
|
|
9707
9544
|
const checkboxPropDefs = {
|
|
9708
9545
|
size: { type: "enum", values: sizes$6, default: "2", responsive: true },
|
|
9709
|
-
variant: { type: "enum", values: variants$
|
|
9546
|
+
variant: { type: "enum", values: variants$3, default: "surface" },
|
|
9710
9547
|
color: colorProp,
|
|
9711
9548
|
highContrast: highContrastProp
|
|
9712
9549
|
};
|
|
@@ -11383,10 +11220,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11383
11220
|
const $faa2e61a3361514f$export$9a58ef0d7ad3278c = $faa2e61a3361514f$export$a5cf38a7a000fe77;
|
|
11384
11221
|
const $faa2e61a3361514f$export$6521433ed15a34db = $faa2e61a3361514f$export$2c1b491743890dec;
|
|
11385
11222
|
const sizes$5 = ["1", "2", "3"];
|
|
11386
|
-
const variants$
|
|
11223
|
+
const variants$2 = ["classic", "surface", "soft"];
|
|
11387
11224
|
const sliderPropDefs = {
|
|
11388
11225
|
size: { type: "enum", values: sizes$5, default: "2", responsive: true },
|
|
11389
|
-
variant: { type: "enum", values: variants$
|
|
11226
|
+
variant: { type: "enum", values: variants$2, default: "surface" },
|
|
11390
11227
|
color: colorProp,
|
|
11391
11228
|
highContrast: highContrastProp,
|
|
11392
11229
|
radius: radiusProp
|
|
@@ -11408,10 +11245,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11408
11245
|
});
|
|
11409
11246
|
Slider.displayName = "Slider";
|
|
11410
11247
|
const sizes$4 = ["1", "2", "3"];
|
|
11411
|
-
const variants$
|
|
11248
|
+
const variants$1 = ["classic", "surface", "soft"];
|
|
11412
11249
|
const textFieldPropDefs = {
|
|
11413
11250
|
size: { type: "enum", values: sizes$4, default: "2", responsive: true },
|
|
11414
|
-
variant: { type: "enum", values: variants$
|
|
11251
|
+
variant: { type: "enum", values: variants$1, default: "surface" },
|
|
11415
11252
|
color: colorProp,
|
|
11416
11253
|
radius: radiusProp
|
|
11417
11254
|
};
|
|
@@ -11500,125 +11337,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11500
11337
|
);
|
|
11501
11338
|
});
|
|
11502
11339
|
ScrollArea.displayName = "ScrollArea";
|
|
11503
|
-
const $
|
|
11504
|
-
const [$cddcb0b647441e34$var$createAvatarContext, $cddcb0b647441e34$export$90370d16b488820f] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($cddcb0b647441e34$var$AVATAR_NAME);
|
|
11505
|
-
const [$cddcb0b647441e34$var$AvatarProvider, $cddcb0b647441e34$var$useAvatarContext] = $cddcb0b647441e34$var$createAvatarContext($cddcb0b647441e34$var$AVATAR_NAME);
|
|
11506
|
-
const $cddcb0b647441e34$export$e2255cf6045e8d47 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11507
|
-
const { __scopeAvatar, ...avatarProps } = props;
|
|
11508
|
-
const [imageLoadingStatus, setImageLoadingStatus] = React.useState("idle");
|
|
11509
|
-
return /* @__PURE__ */ React.createElement($cddcb0b647441e34$var$AvatarProvider, {
|
|
11510
|
-
scope: __scopeAvatar,
|
|
11511
|
-
imageLoadingStatus,
|
|
11512
|
-
onImageLoadingStatusChange: setImageLoadingStatus
|
|
11513
|
-
}, /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, avatarProps, {
|
|
11514
|
-
ref: forwardedRef
|
|
11515
|
-
})));
|
|
11516
|
-
});
|
|
11517
|
-
const $cddcb0b647441e34$var$IMAGE_NAME = "AvatarImage";
|
|
11518
|
-
const $cddcb0b647441e34$export$2cd8ae1985206fe8 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11519
|
-
const { __scopeAvatar, src, onLoadingStatusChange = () => {
|
|
11520
|
-
}, ...imageProps } = props;
|
|
11521
|
-
const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$IMAGE_NAME, __scopeAvatar);
|
|
11522
|
-
const imageLoadingStatus = $cddcb0b647441e34$var$useImageLoadingStatus(src);
|
|
11523
|
-
const handleLoadingStatusChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a((status) => {
|
|
11524
|
-
onLoadingStatusChange(status);
|
|
11525
|
-
context.onImageLoadingStatusChange(status);
|
|
11526
|
-
});
|
|
11527
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
11528
|
-
if (imageLoadingStatus !== "idle")
|
|
11529
|
-
handleLoadingStatusChange(imageLoadingStatus);
|
|
11530
|
-
}, [
|
|
11531
|
-
imageLoadingStatus,
|
|
11532
|
-
handleLoadingStatusChange
|
|
11533
|
-
]);
|
|
11534
|
-
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.img, _extends$1({}, imageProps, {
|
|
11535
|
-
ref: forwardedRef,
|
|
11536
|
-
src
|
|
11537
|
-
})) : null;
|
|
11538
|
-
});
|
|
11539
|
-
const $cddcb0b647441e34$var$FALLBACK_NAME = "AvatarFallback";
|
|
11540
|
-
const $cddcb0b647441e34$export$69fffb6a9571fbfe = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11541
|
-
const { __scopeAvatar, delayMs, ...fallbackProps } = props;
|
|
11542
|
-
const context = $cddcb0b647441e34$var$useAvatarContext($cddcb0b647441e34$var$FALLBACK_NAME, __scopeAvatar);
|
|
11543
|
-
const [canRender, setCanRender] = React.useState(delayMs === void 0);
|
|
11544
|
-
React.useEffect(() => {
|
|
11545
|
-
if (delayMs !== void 0) {
|
|
11546
|
-
const timerId = window.setTimeout(
|
|
11547
|
-
() => setCanRender(true),
|
|
11548
|
-
delayMs
|
|
11549
|
-
);
|
|
11550
|
-
return () => window.clearTimeout(timerId);
|
|
11551
|
-
}
|
|
11552
|
-
}, [
|
|
11553
|
-
delayMs
|
|
11554
|
-
]);
|
|
11555
|
-
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends$1({}, fallbackProps, {
|
|
11556
|
-
ref: forwardedRef
|
|
11557
|
-
})) : null;
|
|
11558
|
-
});
|
|
11559
|
-
function $cddcb0b647441e34$var$useImageLoadingStatus(src) {
|
|
11560
|
-
const [loadingStatus, setLoadingStatus] = React.useState("idle");
|
|
11561
|
-
$9f79659886946c16$export$e5c5a5f917a5871c(() => {
|
|
11562
|
-
if (!src) {
|
|
11563
|
-
setLoadingStatus("error");
|
|
11564
|
-
return;
|
|
11565
|
-
}
|
|
11566
|
-
let isMounted = true;
|
|
11567
|
-
const image = new window.Image();
|
|
11568
|
-
const updateStatus = (status) => () => {
|
|
11569
|
-
if (!isMounted)
|
|
11570
|
-
return;
|
|
11571
|
-
setLoadingStatus(status);
|
|
11572
|
-
};
|
|
11573
|
-
setLoadingStatus("loading");
|
|
11574
|
-
image.onload = updateStatus("loaded");
|
|
11575
|
-
image.onerror = updateStatus("error");
|
|
11576
|
-
image.src = src;
|
|
11577
|
-
return () => {
|
|
11578
|
-
isMounted = false;
|
|
11579
|
-
};
|
|
11580
|
-
}, [
|
|
11581
|
-
src
|
|
11582
|
-
]);
|
|
11583
|
-
return loadingStatus;
|
|
11584
|
-
}
|
|
11585
|
-
const $cddcb0b647441e34$export$be92b6f5f03c0fe9 = $cddcb0b647441e34$export$e2255cf6045e8d47;
|
|
11586
|
-
const $cddcb0b647441e34$export$3e431a229df88919 = $cddcb0b647441e34$export$2cd8ae1985206fe8;
|
|
11587
|
-
const $cddcb0b647441e34$export$fb8d7f40caaeea67 = $cddcb0b647441e34$export$69fffb6a9571fbfe;
|
|
11588
|
-
const sizes$2 = ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
11589
|
-
const variants$1 = ["solid", "soft"];
|
|
11590
|
-
const avatarPropDefs = {
|
|
11591
|
-
size: { type: "enum", values: sizes$2, default: "3", responsive: true },
|
|
11592
|
-
variant: { type: "enum", values: variants$1, default: "soft" },
|
|
11593
|
-
color: { ...colorProp, default: void 0 },
|
|
11594
|
-
highContrast: highContrastProp,
|
|
11595
|
-
radius: radiusProp,
|
|
11596
|
-
fallback: { type: "ReactNode", default: void 0, required: true }
|
|
11597
|
-
};
|
|
11598
|
-
const Avatar = React__namespace.forwardRef((props, forwardedRef) => {
|
|
11599
|
-
const { rest: marginRest, ...marginProps } = extractMarginProps(props);
|
|
11600
|
-
const { className, style, size = avatarPropDefs.size.default, variant = avatarPropDefs.variant.default, color = avatarPropDefs.color.default, highContrast = avatarPropDefs.highContrast.default, radius = avatarPropDefs.radius.default, fallback, ...imageProps } = marginRest;
|
|
11601
|
-
const [status, setStatus] = React__namespace.useState("idle");
|
|
11602
|
-
return React__namespace.createElement(
|
|
11603
|
-
$cddcb0b647441e34$export$be92b6f5f03c0fe9,
|
|
11604
|
-
{ "data-accent-color": color, "data-radius": radius, className: classNames("rt-AvatarRoot", className, withBreakpoints(size, "rt-r-size"), `rt-variant-${variant}`, { "rt-high-contrast": highContrast }, withMarginProps(marginProps)), style },
|
|
11605
|
-
status === "idle" || status === "loading" ? React__namespace.createElement("span", { className: "rt-AvatarFallback" }) : null,
|
|
11606
|
-
status === "error" ? React__namespace.createElement($cddcb0b647441e34$export$fb8d7f40caaeea67, { className: classNames("rt-AvatarFallback", {
|
|
11607
|
-
"rt-one-letter": typeof fallback === "string" && fallback.length === 1,
|
|
11608
|
-
"rt-two-letters": typeof fallback === "string" && fallback.length === 2
|
|
11609
|
-
}), delayMs: 0 }, fallback) : null,
|
|
11610
|
-
React__namespace.createElement($cddcb0b647441e34$export$3e431a229df88919, { ref: forwardedRef, className: "rt-AvatarImage", ...imageProps, onLoadingStatusChange: (status2) => {
|
|
11611
|
-
var _a2;
|
|
11612
|
-
(_a2 = imageProps.onLoadingStatusChange) === null || _a2 === void 0 ? void 0 : _a2.call(imageProps, status2);
|
|
11613
|
-
setStatus(status2);
|
|
11614
|
-
} })
|
|
11615
|
-
);
|
|
11616
|
-
});
|
|
11617
|
-
Avatar.displayName = "Avatar";
|
|
11618
|
-
const sizes$1 = ["1", "2", "3", "4", "5"];
|
|
11340
|
+
const sizes$2 = ["1", "2", "3", "4", "5"];
|
|
11619
11341
|
const variants = ["surface", "classic", "ghost"];
|
|
11620
11342
|
const cardPropDefs = {
|
|
11621
|
-
size: { type: "enum", values: sizes$
|
|
11343
|
+
size: { type: "enum", values: sizes$2, default: "1", responsive: true },
|
|
11622
11344
|
variant: { type: "enum", values: variants, default: "surface" }
|
|
11623
11345
|
};
|
|
11624
11346
|
const Card = React__namespace.forwardRef((props, forwardedRef) => {
|
|
@@ -11634,6 +11356,58 @@ var __publicField = (obj, key, value) => {
|
|
|
11634
11356
|
return React__namespace.createElement(Comp, { ref: forwardedRef, ...cardProps, className: classNames("rt-reset", "rt-Card", className, withBreakpoints(size, "rt-r-size"), `rt-variant-${variant}`, withMarginProps(marginProps)) }, asChild ? getChild() : React__namespace.createElement("div", { className: "rt-CardInner" }, children));
|
|
11635
11357
|
});
|
|
11636
11358
|
Card.displayName = "Card";
|
|
11359
|
+
const $89eedd556c436f6a$var$DEFAULT_ORIENTATION = "horizontal";
|
|
11360
|
+
const $89eedd556c436f6a$var$ORIENTATIONS = [
|
|
11361
|
+
"horizontal",
|
|
11362
|
+
"vertical"
|
|
11363
|
+
];
|
|
11364
|
+
const $89eedd556c436f6a$export$1ff3c3f08ae963c0 = /* @__PURE__ */ React.forwardRef((props, forwardedRef) => {
|
|
11365
|
+
const { decorative, orientation: orientationProp = $89eedd556c436f6a$var$DEFAULT_ORIENTATION, ...domProps } = props;
|
|
11366
|
+
const orientation = $89eedd556c436f6a$var$isValidOrientation(orientationProp) ? orientationProp : $89eedd556c436f6a$var$DEFAULT_ORIENTATION;
|
|
11367
|
+
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
|
11368
|
+
const semanticProps = decorative ? {
|
|
11369
|
+
role: "none"
|
|
11370
|
+
} : {
|
|
11371
|
+
"aria-orientation": ariaOrientation,
|
|
11372
|
+
role: "separator"
|
|
11373
|
+
};
|
|
11374
|
+
return /* @__PURE__ */ React.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends$1({
|
|
11375
|
+
"data-orientation": orientation
|
|
11376
|
+
}, semanticProps, domProps, {
|
|
11377
|
+
ref: forwardedRef
|
|
11378
|
+
}));
|
|
11379
|
+
});
|
|
11380
|
+
$89eedd556c436f6a$export$1ff3c3f08ae963c0.propTypes = {
|
|
11381
|
+
orientation(props, propName, componentName) {
|
|
11382
|
+
const propValue = props[propName];
|
|
11383
|
+
const strVal = String(propValue);
|
|
11384
|
+
if (propValue && !$89eedd556c436f6a$var$isValidOrientation(propValue))
|
|
11385
|
+
return new Error($89eedd556c436f6a$var$getInvalidOrientationError(strVal, componentName));
|
|
11386
|
+
return null;
|
|
11387
|
+
}
|
|
11388
|
+
};
|
|
11389
|
+
function $89eedd556c436f6a$var$getInvalidOrientationError(value, componentName) {
|
|
11390
|
+
return `Invalid prop \`orientation\` of value \`${value}\` supplied to \`${componentName}\`, expected one of:
|
|
11391
|
+
- horizontal
|
|
11392
|
+
- vertical
|
|
11393
|
+
|
|
11394
|
+
Defaulting to \`${$89eedd556c436f6a$var$DEFAULT_ORIENTATION}\`.`;
|
|
11395
|
+
}
|
|
11396
|
+
function $89eedd556c436f6a$var$isValidOrientation(orientation) {
|
|
11397
|
+
return $89eedd556c436f6a$var$ORIENTATIONS.includes(orientation);
|
|
11398
|
+
}
|
|
11399
|
+
const $89eedd556c436f6a$export$be92b6f5f03c0fe9 = $89eedd556c436f6a$export$1ff3c3f08ae963c0;
|
|
11400
|
+
const sizes$1 = ["1", "2", "3", "4"];
|
|
11401
|
+
const separatorPropDefs = {
|
|
11402
|
+
size: { type: "enum", values: sizes$1, default: "1", responsive: true },
|
|
11403
|
+
color: { ...colorProp, default: "gray" }
|
|
11404
|
+
};
|
|
11405
|
+
const Separator = React__namespace.forwardRef((props, forwardedRef) => {
|
|
11406
|
+
const { rest: marginRest, ...marginProps } = extractMarginProps(props);
|
|
11407
|
+
const { className, size = separatorPropDefs.size.default, color = separatorPropDefs.color.default, ...separatorProps } = marginRest;
|
|
11408
|
+
return React__namespace.createElement($89eedd556c436f6a$export$be92b6f5f03c0fe9, { "data-accent-color": color, ...separatorProps, ref: forwardedRef, className: classNames("rt-Separator", className, withBreakpoints(size, "rt-r-size"), withMarginProps(marginProps)) });
|
|
11409
|
+
});
|
|
11410
|
+
Separator.displayName = "Separator";
|
|
11637
11411
|
const $69cb30bb0017df05$var$TABS_NAME = "Tabs";
|
|
11638
11412
|
const [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($69cb30bb0017df05$var$TABS_NAME, [
|
|
11639
11413
|
$d7bdfb9eb0fdf311$export$c7109489551a4f4
|
|
@@ -11804,6 +11578,181 @@ var __publicField = (obj, key, value) => {
|
|
|
11804
11578
|
Trigger: TabsTrigger,
|
|
11805
11579
|
Content: TabsContent
|
|
11806
11580
|
});
|
|
11581
|
+
const description$1 = "_description_10o76_1";
|
|
11582
|
+
const floatingButtonContainer$1 = "_floatingButtonContainer_10o76_5";
|
|
11583
|
+
const FullScreenImageContainer$1 = "_FullScreenImageContainer_10o76_12";
|
|
11584
|
+
const TopBarContainer$1 = "_TopBarContainer_10o76_22";
|
|
11585
|
+
const fileName$1 = "_fileName_10o76_31";
|
|
11586
|
+
const longIconButton$1 = "_longIconButton_10o76_36";
|
|
11587
|
+
const previewImage$1 = "_previewImage_10o76_42";
|
|
11588
|
+
const FullScreenImage$1 = "_FullScreenImage_10o76_12";
|
|
11589
|
+
const styles$b = {
|
|
11590
|
+
description: description$1,
|
|
11591
|
+
floatingButtonContainer: floatingButtonContainer$1,
|
|
11592
|
+
FullScreenImageContainer: FullScreenImageContainer$1,
|
|
11593
|
+
TopBarContainer: TopBarContainer$1,
|
|
11594
|
+
fileName: fileName$1,
|
|
11595
|
+
longIconButton: longIconButton$1,
|
|
11596
|
+
previewImage: previewImage$1,
|
|
11597
|
+
FullScreenImage: FullScreenImage$1
|
|
11598
|
+
};
|
|
11599
|
+
const FullScreenImagePreview = React.memo((props) => {
|
|
11600
|
+
const { file, url, name, setShowPreview } = props;
|
|
11601
|
+
const handleDownload = React.useCallback(
|
|
11602
|
+
(event) => {
|
|
11603
|
+
event.stopPropagation();
|
|
11604
|
+
const blob = new Blob([file]);
|
|
11605
|
+
saveAs(blob, name);
|
|
11606
|
+
},
|
|
11607
|
+
[name, file]
|
|
11608
|
+
);
|
|
11609
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11610
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11611
|
+
"button",
|
|
11612
|
+
{
|
|
11613
|
+
className: styles$b.FullScreenImageContainer,
|
|
11614
|
+
type: "button",
|
|
11615
|
+
onClick: () => {
|
|
11616
|
+
setShowPreview(false);
|
|
11617
|
+
},
|
|
11618
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11619
|
+
"img",
|
|
11620
|
+
{
|
|
11621
|
+
className: styles$b.FullScreenImage,
|
|
11622
|
+
src: url,
|
|
11623
|
+
alt: name,
|
|
11624
|
+
onClick: (e) => {
|
|
11625
|
+
e.stopPropagation();
|
|
11626
|
+
}
|
|
11627
|
+
}
|
|
11628
|
+
)
|
|
11629
|
+
}
|
|
11630
|
+
),
|
|
11631
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles$b.TopBarContainer, align: "center", children: [
|
|
11632
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11633
|
+
blocks.IconButton,
|
|
11634
|
+
{
|
|
11635
|
+
className: styles$b.longIconButton,
|
|
11636
|
+
variant: "soft",
|
|
11637
|
+
"aria-label": "Exit preview",
|
|
11638
|
+
onClick: () => {
|
|
11639
|
+
setShowPreview(false);
|
|
11640
|
+
},
|
|
11641
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiArrowLeftLine" })
|
|
11642
|
+
}
|
|
11643
|
+
),
|
|
11644
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { className: styles$b.fileName, children: name }),
|
|
11645
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11646
|
+
blocks.IconButton,
|
|
11647
|
+
{
|
|
11648
|
+
className: styles$b.longIconButton,
|
|
11649
|
+
variant: "soft",
|
|
11650
|
+
"aria-label": `Download ${name}`,
|
|
11651
|
+
onClick: handleDownload,
|
|
11652
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiDownload2Line" })
|
|
11653
|
+
}
|
|
11654
|
+
)
|
|
11655
|
+
] })
|
|
11656
|
+
] });
|
|
11657
|
+
});
|
|
11658
|
+
FullScreenImagePreview.displayName = "FullScreenImagePreview";
|
|
11659
|
+
const InputWithLabel = (props) => {
|
|
11660
|
+
const { label, children, size, severity, inputId, labelId, image, flexProps } = props;
|
|
11661
|
+
const [resolvedImage, setResolvedImage] = React.useState(void 0);
|
|
11662
|
+
const [showImagePreview, setShowImagePreview] = React.useState(false);
|
|
11663
|
+
const color = blocks.useSeverityColor(severity);
|
|
11664
|
+
React.useEffect(() => {
|
|
11665
|
+
if (image instanceof Promise) {
|
|
11666
|
+
image.then(setResolvedImage).catch(console.error);
|
|
11667
|
+
} else {
|
|
11668
|
+
setResolvedImage(image);
|
|
11669
|
+
}
|
|
11670
|
+
}, [image]);
|
|
11671
|
+
const resolvedImageURL = resolvedImage ? URL.createObjectURL(resolvedImage) : void 0;
|
|
11672
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
11673
|
+
resolvedImage && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11674
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11675
|
+
"img",
|
|
11676
|
+
{
|
|
11677
|
+
className: styles$b.previewImage,
|
|
11678
|
+
src: resolvedImageURL,
|
|
11679
|
+
alt: resolvedImage.name,
|
|
11680
|
+
onClick: () => {
|
|
11681
|
+
setShowImagePreview(true);
|
|
11682
|
+
}
|
|
11683
|
+
}
|
|
11684
|
+
),
|
|
11685
|
+
showImagePreview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11686
|
+
FullScreenImagePreview,
|
|
11687
|
+
{
|
|
11688
|
+
file: resolvedImage,
|
|
11689
|
+
url: resolvedImageURL,
|
|
11690
|
+
name: resolvedImage.name,
|
|
11691
|
+
setShowPreview: setShowImagePreview
|
|
11692
|
+
}
|
|
11693
|
+
)
|
|
11694
|
+
] }),
|
|
11695
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", gap: "1", asChild: true, ...flexProps, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: inputId, children: [
|
|
11696
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { size, color, id: labelId, children: label }),
|
|
11697
|
+
children
|
|
11698
|
+
] }) })
|
|
11699
|
+
] });
|
|
11700
|
+
};
|
|
11701
|
+
const InputWithHelpText = (props) => {
|
|
11702
|
+
const { helpText, children, severity } = props;
|
|
11703
|
+
const color = blocks.useSeverityColor(severity);
|
|
11704
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "1", children: [
|
|
11705
|
+
children,
|
|
11706
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "1", color, className: styles$b.description, children: helpText }) })
|
|
11707
|
+
] });
|
|
11708
|
+
};
|
|
11709
|
+
const InputWithLabelAndHelpText = (props) => {
|
|
11710
|
+
const { children, ...restProps } = props;
|
|
11711
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InputWithHelpText, { ...restProps, children });
|
|
11712
|
+
};
|
|
11713
|
+
const useFormikInput = (props) => {
|
|
11714
|
+
const { id, field, formId: formId2, size, showInputOnly, ...rest } = props;
|
|
11715
|
+
const [fieldProps, meta, helpers] = formik.useField(field.getId());
|
|
11716
|
+
const { touched } = meta;
|
|
11717
|
+
const helpText = meta.error ?? field.description;
|
|
11718
|
+
const severity = meta.error ? "danger" : void 0;
|
|
11719
|
+
const inputId = id ?? `${formId2}-${field.getId()}-input`;
|
|
11720
|
+
const labelId = `${inputId}-label`;
|
|
11721
|
+
const label = field.required ? `${field.label} *` : field.label;
|
|
11722
|
+
const fieldPropsWithValidation = React.useMemo(() => {
|
|
11723
|
+
const handleChange = (e) => {
|
|
11724
|
+
const value = field.getValueFromChangeEvent(e);
|
|
11725
|
+
void helpers.setValue(value, false).then();
|
|
11726
|
+
if (touched || !field.onlyValidateAfterTouched) {
|
|
11727
|
+
helpers.setError(field.getError(value));
|
|
11728
|
+
}
|
|
11729
|
+
};
|
|
11730
|
+
const handleBlur = (e) => {
|
|
11731
|
+
void helpers.setTouched(true, false).then();
|
|
11732
|
+
helpers.setError(field.getError(field.getValueFromChangeEvent(e)));
|
|
11733
|
+
};
|
|
11734
|
+
return {
|
|
11735
|
+
...fieldProps,
|
|
11736
|
+
onChange: handleChange,
|
|
11737
|
+
onBlur: handleBlur
|
|
11738
|
+
};
|
|
11739
|
+
}, [field, fieldProps, helpers, touched]);
|
|
11740
|
+
return [
|
|
11741
|
+
{
|
|
11742
|
+
helpText,
|
|
11743
|
+
size,
|
|
11744
|
+
severity,
|
|
11745
|
+
inputId,
|
|
11746
|
+
labelId,
|
|
11747
|
+
label,
|
|
11748
|
+
showInputOnly,
|
|
11749
|
+
fieldProps: fieldPropsWithValidation,
|
|
11750
|
+
helpers,
|
|
11751
|
+
field
|
|
11752
|
+
},
|
|
11753
|
+
{ ...rest, "aria-labelledby": labelId }
|
|
11754
|
+
];
|
|
11755
|
+
};
|
|
11807
11756
|
const truthyValues = [true, "true"];
|
|
11808
11757
|
const BooleanInput = React.memo((props) => {
|
|
11809
11758
|
const [{ inputId, labelId, size, severity, showInputOnly, field, fieldProps }, rest] = useFormikInput(props);
|
|
@@ -12387,7 +12336,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12387
12336
|
});
|
|
12388
12337
|
const clickableLinkContainer = "_clickableLinkContainer_1ace7_1";
|
|
12389
12338
|
const TextFieldInputCopy = "_TextFieldInputCopy_1ace7_5";
|
|
12390
|
-
const styles$
|
|
12339
|
+
const styles$a = {
|
|
12391
12340
|
clickableLinkContainer,
|
|
12392
12341
|
TextFieldInputCopy
|
|
12393
12342
|
};
|
|
@@ -12416,13 +12365,13 @@ var __publicField = (obj, key, value) => {
|
|
|
12416
12365
|
placeholder: field.placeholder,
|
|
12417
12366
|
color
|
|
12418
12367
|
}
|
|
12419
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(TextField$1.Root, { className: styles$
|
|
12368
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(TextField$1.Root, { className: styles$a.clickableLinkContainer, children: [
|
|
12420
12369
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12421
12370
|
"div",
|
|
12422
12371
|
{
|
|
12423
12372
|
className: classNames$1(
|
|
12424
12373
|
"rt-TextFieldInput rt-r-size-2 rt-variant-surface",
|
|
12425
|
-
styles$
|
|
12374
|
+
styles$a.TextFieldInputCopy
|
|
12426
12375
|
),
|
|
12427
12376
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12428
12377
|
Linkify,
|
|
@@ -12810,7 +12759,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12810
12759
|
},
|
|
12811
12760
|
[setValueAndTouched, value]
|
|
12812
12761
|
);
|
|
12813
|
-
return /* @__PURE__ */ jsxRuntime.jsx(dnd.DragDropContext, { onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12762
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dnd.DragDropContext, { onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
12814
12763
|
/* @__PURE__ */ jsxRuntime.jsx(InputWithLabelAndHelpText, { helpText: updatedHelpText, severity, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12815
12764
|
InputWithLabel,
|
|
12816
12765
|
{
|
|
@@ -12820,7 +12769,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12820
12769
|
labelId,
|
|
12821
12770
|
label,
|
|
12822
12771
|
image: showInputOnly ? void 0 : field.image,
|
|
12823
|
-
children: (!disabled || value.length === 0) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12772
|
+
children: (!disabled || value.length === 0) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "2", children: [
|
|
12824
12773
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { grow: "1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12825
12774
|
TextField$1.Input,
|
|
12826
12775
|
{
|
|
@@ -12848,7 +12797,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12848
12797
|
] })
|
|
12849
12798
|
}
|
|
12850
12799
|
) }),
|
|
12851
|
-
/* @__PURE__ */ jsxRuntime.jsx(dnd.Droppable, { droppableId, children: (droppableProvided) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12800
|
+
/* @__PURE__ */ jsxRuntime.jsx(dnd.Droppable, { droppableId, children: (droppableProvided) => /* @__PURE__ */ jsxRuntime.jsxs(Flex, { ...droppableProvided.droppableProps, ref: droppableProvided.innerRef, direction: "column", children: [
|
|
12852
12801
|
value.map((option, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12853
12802
|
dnd.Draggable,
|
|
12854
12803
|
{
|
|
@@ -12856,7 +12805,7 @@ var __publicField = (obj, key, value) => {
|
|
|
12856
12805
|
index: index2,
|
|
12857
12806
|
isDragDisabled: disabled,
|
|
12858
12807
|
children: ({ draggableProps, dragHandleProps, innerRef }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
12859
|
-
|
|
12808
|
+
Flex,
|
|
12860
12809
|
{
|
|
12861
12810
|
...dragHandleProps,
|
|
12862
12811
|
...draggableProps,
|
|
@@ -13114,7 +13063,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13114
13063
|
__publicField(_MultiSelectField, "Icon", RiCheckboxLine);
|
|
13115
13064
|
let MultiSelectField = _MultiSelectField;
|
|
13116
13065
|
const QrScannerWrapper = "_QrScannerWrapper_1puz3_1";
|
|
13117
|
-
const styles$
|
|
13066
|
+
const styles$9 = {
|
|
13118
13067
|
QrScannerWrapper
|
|
13119
13068
|
};
|
|
13120
13069
|
const QrInput = React.memo((props) => {
|
|
@@ -13210,7 +13159,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13210
13159
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13211
13160
|
Flex,
|
|
13212
13161
|
{
|
|
13213
|
-
className: styles$
|
|
13162
|
+
className: styles$9.QrScannerWrapper,
|
|
13214
13163
|
width: "100%",
|
|
13215
13164
|
height: "100%",
|
|
13216
13165
|
direction: "column",
|
|
@@ -13325,7 +13274,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13325
13274
|
const Relative = "_Relative_103p8_15";
|
|
13326
13275
|
const PDFScrollArea = "_PDFScrollArea_103p8_19";
|
|
13327
13276
|
const ErrorContainer = "_ErrorContainer_103p8_24";
|
|
13328
|
-
const styles$
|
|
13277
|
+
const styles$8 = {
|
|
13329
13278
|
PDFViewerTopbar,
|
|
13330
13279
|
PDFViewerOverlay,
|
|
13331
13280
|
PDFContainer,
|
|
@@ -13382,10 +13331,10 @@ var __publicField = (obj, key, value) => {
|
|
|
13382
13331
|
{
|
|
13383
13332
|
open: true,
|
|
13384
13333
|
overlay: true,
|
|
13385
|
-
overlayClass: styles$
|
|
13334
|
+
overlayClass: styles$8.PDFViewerOverlay,
|
|
13386
13335
|
onOpenChange: onClose,
|
|
13387
13336
|
content: () => /* @__PURE__ */ jsxRuntime.jsxs(Flex, { width: "100%", height: "100%", align: "center", direction: "column", children: [
|
|
13388
|
-
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$
|
|
13337
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$8.PDFViewerTopbar, height: "8", width: "100%", align: "center", px: "2", shrink: "0", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.ButtonGroup, { width: "100%", variant: "soft", severity: "info", highContrast: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Grid, { columns: "3", width: "100%", children: [
|
|
13389
13338
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "2", width: "100%", children: [
|
|
13390
13339
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { onClick: onClose, "aria-label": "close", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiCloseLine" }) }),
|
|
13391
13340
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { onClick: handleDownload, "aria-label": "download", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiDownload2Line" }) })
|
|
@@ -13416,16 +13365,16 @@ var __publicField = (obj, key, value) => {
|
|
|
13416
13365
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13417
13366
|
Flex,
|
|
13418
13367
|
{
|
|
13419
|
-
className: styles$
|
|
13368
|
+
className: styles$8.PDFContainer,
|
|
13420
13369
|
width: "max-content",
|
|
13421
13370
|
height: "max-content",
|
|
13422
13371
|
direction: "column",
|
|
13423
13372
|
align: "center",
|
|
13424
13373
|
justify: "center",
|
|
13425
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: styles$
|
|
13374
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: styles$8.PDFScrollArea, scrollbars: "both", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13426
13375
|
reactPdf.Document,
|
|
13427
13376
|
{
|
|
13428
|
-
className: styles$
|
|
13377
|
+
className: styles$8.Relative,
|
|
13429
13378
|
file,
|
|
13430
13379
|
onLoadSuccess: handleLoadSuccess,
|
|
13431
13380
|
onLoadError: handleLoadError,
|
|
@@ -13474,7 +13423,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13474
13423
|
});
|
|
13475
13424
|
SpinnerComponent.displayName = "SpinnerComponent";
|
|
13476
13425
|
const ErrorComponent = React.memo(() => {
|
|
13477
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles$
|
|
13426
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles$8.ErrorContainer, align: "center", justify: "center", direction: "column", children: [
|
|
13478
13427
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.IconColorUtility, { severity: "info", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiFileWarningLine", size: 40 }) }),
|
|
13479
13428
|
/* @__PURE__ */ jsxRuntime.jsx(Text, { size: "2", color: "gray", weight: "light", children: "Failed to load" })
|
|
13480
13429
|
] });
|
|
@@ -13483,7 +13432,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13483
13432
|
const SUPPORTED_PDF_FILE_TYPES = ["application/pdf"];
|
|
13484
13433
|
const ImageViewerTopbar = "_ImageViewerTopbar_1n2bl_1";
|
|
13485
13434
|
const ImageViewerOverlay = "_ImageViewerOverlay_1n2bl_5";
|
|
13486
|
-
const styles$
|
|
13435
|
+
const styles$7 = {
|
|
13487
13436
|
ImageViewerTopbar,
|
|
13488
13437
|
ImageViewerOverlay
|
|
13489
13438
|
};
|
|
@@ -13546,9 +13495,9 @@ var __publicField = (obj, key, value) => {
|
|
|
13546
13495
|
open: true,
|
|
13547
13496
|
onOpenChange: onClose,
|
|
13548
13497
|
overlay: true,
|
|
13549
|
-
overlayClass: styles$
|
|
13498
|
+
overlayClass: styles$7.ImageViewerOverlay,
|
|
13550
13499
|
content: () => /* @__PURE__ */ jsxRuntime.jsxs(Flex, { width: "100%", height: "100%", direction: "column", children: [
|
|
13551
|
-
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$
|
|
13500
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$7.ImageViewerTopbar, height: "8", width: "100%", align: "center", px: "2", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.ButtonGroup, { width: "100%", severity: "info", variant: "soft", highContrast: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Grid, { columns: "3", width: "100%", children: [
|
|
13552
13501
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { justify: "start", gap: "2", children: [
|
|
13553
13502
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { onClick: onClose, "aria-label": "close", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiCloseLine" }) }),
|
|
13554
13503
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { onClick: handleDownload, "aria-label": "close", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiDownload2Line" }) })
|
|
@@ -13616,7 +13565,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13616
13565
|
const Spreadsheet = "_Spreadsheet_qnmq7_1";
|
|
13617
13566
|
const SpreadsheetViewerContent = "_SpreadsheetViewerContent_qnmq7_17";
|
|
13618
13567
|
const SpreadsheetOverlay = "_SpreadsheetOverlay_qnmq7_24";
|
|
13619
|
-
const styles$
|
|
13568
|
+
const styles$6 = {
|
|
13620
13569
|
SpreadsheetViewer: SpreadsheetViewer$1,
|
|
13621
13570
|
SpreadsheetViewerTopbar,
|
|
13622
13571
|
Spreadsheet,
|
|
@@ -13693,10 +13642,10 @@ var __publicField = (obj, key, value) => {
|
|
|
13693
13642
|
{
|
|
13694
13643
|
open: true,
|
|
13695
13644
|
overlay: true,
|
|
13696
|
-
overlayClass: styles$
|
|
13645
|
+
overlayClass: styles$6.SpreadsheetOverlay,
|
|
13697
13646
|
onOpenChange: onClose,
|
|
13698
13647
|
content: () => /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", width: "100%", height: "100%", style: { overflow: "none" }, children: [
|
|
13699
|
-
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$
|
|
13648
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$6.SpreadsheetViewerTopbar, height: "8", width: "100%", px: "2", shrink: "0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13700
13649
|
blocks.ButtonGroup,
|
|
13701
13650
|
{
|
|
13702
13651
|
align: "center",
|
|
@@ -13734,7 +13683,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13734
13683
|
p: "2",
|
|
13735
13684
|
style: { overflow: "hidden" },
|
|
13736
13685
|
children: /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(blocks.Spinner, {}), children: [
|
|
13737
|
-
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$
|
|
13686
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$6.SpreadsheetViewerContent, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13738
13687
|
ScrollArea,
|
|
13739
13688
|
{
|
|
13740
13689
|
scrollbars: "both",
|
|
@@ -13747,7 +13696,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13747
13696
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13748
13697
|
Spreadsheet2,
|
|
13749
13698
|
{
|
|
13750
|
-
className: styles$
|
|
13699
|
+
className: styles$6.Spreadsheet,
|
|
13751
13700
|
data: data.data,
|
|
13752
13701
|
rowLabels: data.rowLabels,
|
|
13753
13702
|
columnLabels: data.columnLabels
|
|
@@ -13808,7 +13757,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13808
13757
|
const Prompt = "_Prompt_8zvut_14";
|
|
13809
13758
|
const centered = "_centered_8zvut_25";
|
|
13810
13759
|
const MarkupImage = "_MarkupImage_8zvut_25";
|
|
13811
|
-
const styles$
|
|
13760
|
+
const styles$5 = {
|
|
13812
13761
|
ImageMarkupContent,
|
|
13813
13762
|
ImageMarkupOverlay,
|
|
13814
13763
|
ImageMarkupTopbar,
|
|
@@ -13932,7 +13881,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13932
13881
|
{
|
|
13933
13882
|
open: true,
|
|
13934
13883
|
overlay: true,
|
|
13935
|
-
overlayClass: styles$
|
|
13884
|
+
overlayClass: styles$5.ImageMarkupOverlay,
|
|
13936
13885
|
onOpenChange: onClose,
|
|
13937
13886
|
content: () => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13938
13887
|
originalImageSize && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13946,7 +13895,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13946
13895
|
}
|
|
13947
13896
|
),
|
|
13948
13897
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { height: "100%", width: "100%", position: "relative", direction: "column", children: [
|
|
13949
|
-
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$
|
|
13898
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles$5.ImageMarkupTopbar, height: "8", width: "100%", align: "center", px: "2", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.ButtonGroup, { severity: "info", size: "medium", variant: "soft", width: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(Grid, { columns: "3", width: "100%", children: [
|
|
13950
13899
|
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "2", children: [
|
|
13951
13900
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { "aria-label": "close", onClick: handleCancel, children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiCloseLine" }) }),
|
|
13952
13901
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { "aria-label": `Download ${file.name}`, onClick: handleDownload, children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiDownload2Line" }) })
|
|
@@ -13961,7 +13910,7 @@ var __publicField = (obj, key, value) => {
|
|
|
13961
13910
|
trigger: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13962
13911
|
blocks.IconButton,
|
|
13963
13912
|
{
|
|
13964
|
-
className: styles$
|
|
13913
|
+
className: styles$5.MarkupEditButton,
|
|
13965
13914
|
"aria-label": "Markup color picker",
|
|
13966
13915
|
type: "button",
|
|
13967
13916
|
variant: "solid",
|
|
@@ -14009,7 +13958,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14009
13958
|
children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiEraserFill" })
|
|
14010
13959
|
}
|
|
14011
13960
|
),
|
|
14012
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13961
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, { orientation: "vertical", size: "4" }),
|
|
14013
13962
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.Tooltip, { content: "Undo last", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { "aria-label": "undo", onClick: handleUndoLast, children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiArrowGoBackLine" }) }) }),
|
|
14014
13963
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.Tooltip, { content: "redo last", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { "aria-label": "undo", onClick: handleRedoLast, children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiArrowGoForwardLine" }) }) }),
|
|
14015
13964
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.Tooltip, { content: "Undo all", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.IconButton, { "aria-label": "undo all", onClick: handleUndoAll, children: /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiLoopLeftLine" }) }) })
|
|
@@ -14036,7 +13985,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14036
13985
|
alt: "Photo attachment",
|
|
14037
13986
|
ref: watchResizeTarget,
|
|
14038
13987
|
src: file.objectURL,
|
|
14039
|
-
className: styles$
|
|
13988
|
+
className: styles$5.MarkupImage
|
|
14040
13989
|
}
|
|
14041
13990
|
),
|
|
14042
13991
|
loading ? /* @__PURE__ */ jsxRuntime.jsx(blocks.Spinner, {}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14117,7 +14066,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14117
14066
|
FileViewerProvider.displayName = "FileViewerProvider";
|
|
14118
14067
|
const FileCard$1 = "_FileCard_ledcm_1";
|
|
14119
14068
|
const Errored = "_Errored_ledcm_7";
|
|
14120
|
-
const styles$
|
|
14069
|
+
const styles$4 = {
|
|
14121
14070
|
FileCard: FileCard$1,
|
|
14122
14071
|
Errored
|
|
14123
14072
|
};
|
|
@@ -14133,9 +14082,9 @@ var __publicField = (obj, key, value) => {
|
|
|
14133
14082
|
blocks.OvermapItem,
|
|
14134
14083
|
{
|
|
14135
14084
|
className: classNames$1(
|
|
14136
|
-
styles$
|
|
14085
|
+
styles$4.FileCard,
|
|
14137
14086
|
{
|
|
14138
|
-
[styles$
|
|
14087
|
+
[styles$4.Errored]: error2
|
|
14139
14088
|
},
|
|
14140
14089
|
className
|
|
14141
14090
|
),
|
|
@@ -14154,7 +14103,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14154
14103
|
const Image$1 = "_Image_kbztw_1";
|
|
14155
14104
|
const Footer = "_Footer_kbztw_19";
|
|
14156
14105
|
const Loading = "_Loading_kbztw_22";
|
|
14157
|
-
const styles$
|
|
14106
|
+
const styles$3 = {
|
|
14158
14107
|
ImageCard: ImageCard$1,
|
|
14159
14108
|
ImageInset,
|
|
14160
14109
|
Image: Image$1,
|
|
@@ -14180,7 +14129,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14180
14129
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14181
14130
|
Flex,
|
|
14182
14131
|
{
|
|
14183
|
-
className: classNames$1(className, styles$
|
|
14132
|
+
className: classNames$1(className, styles$3.ImageCard),
|
|
14184
14133
|
width: "100%",
|
|
14185
14134
|
direction: "column",
|
|
14186
14135
|
position: "relative",
|
|
@@ -14190,12 +14139,12 @@ var __publicField = (obj, key, value) => {
|
|
|
14190
14139
|
...rest,
|
|
14191
14140
|
children: [
|
|
14192
14141
|
!file && !error2 && /* @__PURE__ */ jsxRuntime.jsx(Flex, { width: "100%", height: "100%", align: "center", justify: "center", position: "absolute", children: /* @__PURE__ */ jsxRuntime.jsx(blocks.Spinner, {}) }),
|
|
14193
|
-
/* @__PURE__ */ jsxRuntime.jsx(Inset, { className: styles$
|
|
14142
|
+
/* @__PURE__ */ jsxRuntime.jsx(Inset, { className: styles$3.ImageInset, ref: imageInsetRef, clip: "padding-box", side: "y", pb: "0", children: file && !error2 && /* @__PURE__ */ jsxRuntime.jsx("img", { className: styles$3.Image, src: URL.createObjectURL(file), alt: alt ?? file.name }) }),
|
|
14194
14143
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14195
14144
|
blocks.OvermapItem,
|
|
14196
14145
|
{
|
|
14197
|
-
className: classNames$1(styles$
|
|
14198
|
-
[styles$
|
|
14146
|
+
className: classNames$1(styles$3.Footer, {
|
|
14147
|
+
[styles$3.Loading]: !file
|
|
14199
14148
|
}),
|
|
14200
14149
|
size,
|
|
14201
14150
|
ref: fileCardRef,
|
|
@@ -14244,7 +14193,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14244
14193
|
const multipleButtonText = value ? "Select new files" : "Select files";
|
|
14245
14194
|
const singleButtonText = value ? "Select new file" : "Select a file";
|
|
14246
14195
|
const buttonText = field.maxFiles > 1 ? multipleButtonText : singleButtonText;
|
|
14247
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14196
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
14248
14197
|
/* @__PURE__ */ jsxRuntime.jsx(InputWithLabelAndHelpText, { helpText: updatedHelpText, severity, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14249
14198
|
InputWithLabel,
|
|
14250
14199
|
{
|
|
@@ -14255,7 +14204,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14255
14204
|
label,
|
|
14256
14205
|
image: showInputOnly ? void 0 : field.image,
|
|
14257
14206
|
children: [
|
|
14258
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14207
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "row", gap: "2", children: /* @__PURE__ */ jsxRuntime.jsx(Box, { width: "max-content", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(blocks.Button, { ...rest, variant: "soft", onClick: handleClick, id: "upload-input-upload-button", children: [
|
|
14259
14208
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiUpload2Line" }),
|
|
14260
14209
|
" ",
|
|
14261
14210
|
buttonText
|
|
@@ -14278,7 +14227,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14278
14227
|
]
|
|
14279
14228
|
}
|
|
14280
14229
|
) }),
|
|
14281
|
-
Array.isArray(value) && value.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14230
|
+
Array.isArray(value) && value.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", gap: "2", height: "max-content", children: value.map((file, index2) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14282
14231
|
DisplayFile,
|
|
14283
14232
|
{
|
|
14284
14233
|
field,
|
|
@@ -14594,7 +14543,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14594
14543
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: field.getInput(props) }, field.getId());
|
|
14595
14544
|
});
|
|
14596
14545
|
}, [fields, props]);
|
|
14597
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14546
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", gap: "2", children: inputs });
|
|
14598
14547
|
};
|
|
14599
14548
|
const FieldSectionLayout = React.memo((props) => {
|
|
14600
14549
|
const { field: section, ...rest } = props;
|
|
@@ -14619,10 +14568,10 @@ var __publicField = (obj, key, value) => {
|
|
|
14619
14568
|
if (!label) {
|
|
14620
14569
|
return inputs;
|
|
14621
14570
|
}
|
|
14622
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14623
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14571
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "3", children: [
|
|
14572
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", children: [
|
|
14624
14573
|
/* @__PURE__ */ jsxRuntime.jsx(Heading, { as: "h3", size: "3", children: label }),
|
|
14625
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14574
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { className: styles$b.description, children: description2 })
|
|
14626
14575
|
] }),
|
|
14627
14576
|
inputs
|
|
14628
14577
|
] }) });
|
|
@@ -14865,7 +14814,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14865
14814
|
[schema.title]
|
|
14866
14815
|
);
|
|
14867
14816
|
const Description = React.useMemo(
|
|
14868
|
-
() => typeof schema.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14817
|
+
() => typeof schema.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Text, { className: styles$b.description, children: schema.description }) : schema.description,
|
|
14869
14818
|
[schema.description]
|
|
14870
14819
|
);
|
|
14871
14820
|
const inputs = useFieldInputs(schema.fields, { formId: formId2, disabled: readonly });
|
|
@@ -14875,13 +14824,13 @@ var __publicField = (obj, key, value) => {
|
|
|
14875
14824
|
if (onDirtyChange)
|
|
14876
14825
|
onDirtyChange(dirty);
|
|
14877
14826
|
}, [dirty, onDirty, onDirtyChange]);
|
|
14878
|
-
return /* @__PURE__ */ jsxRuntime.jsx(formik.FormikProvider, { value: formik$1, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14879
|
-
!hideTitle && /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14827
|
+
return /* @__PURE__ */ jsxRuntime.jsx(formik.FormikProvider, { value: formik$1, children: /* @__PURE__ */ jsxRuntime.jsx(Flex, { ref, direction: "column", gap: "2", className, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: formId2, onSubmit: formik$1.handleSubmit, children: [
|
|
14828
|
+
!hideTitle && /* @__PURE__ */ jsxRuntime.jsx(Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "1", children: [
|
|
14880
14829
|
Title,
|
|
14881
14830
|
!hideDescription && Description
|
|
14882
14831
|
] }) }),
|
|
14883
14832
|
inputs,
|
|
14884
|
-
!readonly && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14833
|
+
!readonly && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles$b.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
|
|
14885
14834
|
cancelText && /* @__PURE__ */ jsxRuntime.jsx(blocks.Button, { severity: "info", ...buttonProps, type: "button", onClick: onCancel, children: cancelText }),
|
|
14886
14835
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.Button, { ...buttonProps, type: "submit", disabled: !formik$1.isValid, children: submitText })
|
|
14887
14836
|
] })
|
|
@@ -14933,7 +14882,7 @@ var __publicField = (obj, key, value) => {
|
|
|
14933
14882
|
);
|
|
14934
14883
|
const favoriteIcon = "_favoriteIcon_1bixi_1";
|
|
14935
14884
|
const regularIcon = "_regularIcon_1bixi_9";
|
|
14936
|
-
const styles$
|
|
14885
|
+
const styles$2 = {
|
|
14937
14886
|
favoriteIcon,
|
|
14938
14887
|
regularIcon
|
|
14939
14888
|
};
|
|
@@ -14993,8 +14942,8 @@ var __publicField = (obj, key, value) => {
|
|
|
14993
14942
|
const numberOfForms = reactRedux.useSelector(selectGeneralFormCount) || 0;
|
|
14994
14943
|
const numberOfHiddenForms = numberOfForms - attachableUserForms.length;
|
|
14995
14944
|
const overflowMessage = attachableUserForms.length == maxResults && numberOfHiddenForms > 0 ? `Only the first ${maxResults} results are shown (${numberOfHiddenForms} hidden)` : numberOfHiddenForms > 0 && `${numberOfHiddenForms} hidden forms`;
|
|
14996
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14997
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14945
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { ref, direction: "column", gap: "2", children: [
|
|
14946
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "2", grow: "1", children: [
|
|
14998
14947
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { grow: "1", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(TextField$1.Root, { size: "3", children: /* @__PURE__ */ jsxRuntime.jsx(TextField$1.Input, { placeholder: "Filter", value: filter, onChange: handleChange }) }) }),
|
|
14999
14948
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15000
14949
|
blocks.Select,
|
|
@@ -15018,7 +14967,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15018
14967
|
},
|
|
15019
14968
|
form.offline_id
|
|
15020
14969
|
)) }),
|
|
15021
|
-
/* @__PURE__ */ jsxRuntime.jsx(Box, { px: "3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14970
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { px: "3", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "2", color: "gray", children: overflowMessage }) })
|
|
15022
14971
|
] });
|
|
15023
14972
|
})
|
|
15024
14973
|
);
|
|
@@ -15044,12 +14993,12 @@ var __publicField = (obj, key, value) => {
|
|
|
15044
14993
|
onSelectForm(form);
|
|
15045
14994
|
},
|
|
15046
14995
|
asChild: true,
|
|
15047
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15048
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
14996
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { justify: "between", gap: "2", py: "2", px: "3", ...blocks.divButtonProps, children: [
|
|
14997
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { grow: "1", align: "center", gap: "2", children: [
|
|
15049
14998
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15050
14999
|
blocks.IconButton,
|
|
15051
15000
|
{
|
|
15052
|
-
className: classNames$1(form.favorite ? styles$
|
|
15001
|
+
className: classNames$1(form.favorite ? styles$2.favoriteIcon : styles$2.regularIcon),
|
|
15053
15002
|
variant: "ghost",
|
|
15054
15003
|
onClick: handleFavoriteClick,
|
|
15055
15004
|
"aria-label": form.favorite ? "Favorite form" : "Standard form",
|
|
@@ -15057,10 +15006,10 @@ var __publicField = (obj, key, value) => {
|
|
|
15057
15006
|
children: form.favorite ? /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiStarFill" }) : /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiStarLine" })
|
|
15058
15007
|
}
|
|
15059
15008
|
),
|
|
15060
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15009
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { children: form.latestRevision.title }),
|
|
15061
15010
|
form.latestRevision.description && /* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiQuestionLine" })
|
|
15062
15011
|
] }),
|
|
15063
|
-
owner && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15012
|
+
owner && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: "2", children: [
|
|
15064
15013
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiUserLine" }),
|
|
15065
15014
|
" ",
|
|
15066
15015
|
owner
|
|
@@ -15073,101 +15022,6 @@ var __publicField = (obj, key, value) => {
|
|
|
15073
15022
|
}
|
|
15074
15023
|
return ret;
|
|
15075
15024
|
};
|
|
15076
|
-
const submissionsContainer = "_submissionsContainer_9iirt_1";
|
|
15077
|
-
const stopHorizontalOverflow = "_stopHorizontalOverflow_9iirt_6";
|
|
15078
|
-
const styles$2 = {
|
|
15079
|
-
submissionsContainer,
|
|
15080
|
-
stopHorizontalOverflow
|
|
15081
|
-
};
|
|
15082
|
-
const FormSubmissionBrowserEntry = React.memo((props) => {
|
|
15083
|
-
var _a2;
|
|
15084
|
-
const { submission, onSubmissionClick, compact, labelType, rowDecorator } = props;
|
|
15085
|
-
const currentUser = reactRedux.useSelector(selectCurrentUser);
|
|
15086
|
-
const createdBy = reactRedux.useSelector(selectUser("created_by" in submission ? submission.created_by : currentUser.id));
|
|
15087
|
-
const dateToUse = submission.submitted_at;
|
|
15088
|
-
const formattedDateTime = getLocalDateString(dateToUse);
|
|
15089
|
-
const revision = reactRedux.useSelector(selectFormRevision(submission.form_revision));
|
|
15090
|
-
if (!revision) {
|
|
15091
|
-
throw new Error(`Could not find revision ${submission.form_revision} for submission ${submission.offline_id}.`);
|
|
15092
|
-
}
|
|
15093
|
-
const latestRevisionNumber = (_a2 = reactRedux.useSelector(selectLatestFormRevisionOfForm(revision.form))) == null ? void 0 : _a2.revision;
|
|
15094
|
-
const creatorProfileSrc = useFileSrc({
|
|
15095
|
-
file: (createdBy == null ? void 0 : createdBy.profile.file) ?? null,
|
|
15096
|
-
fileSha1: (createdBy == null ? void 0 : createdBy.profile.file_sha1) ?? null
|
|
15097
|
-
});
|
|
15098
|
-
const creatorProfileFallback = (createdBy == null ? void 0 : createdBy.username.charAt(0).toUpperCase()) ?? "?";
|
|
15099
|
-
const isLatestRevision = revision.revision === latestRevisionNumber;
|
|
15100
|
-
const handleClick = React.useCallback(() => {
|
|
15101
|
-
if (onSubmissionClick) {
|
|
15102
|
-
onSubmissionClick({ submission });
|
|
15103
|
-
}
|
|
15104
|
-
}, [submission, onSubmissionClick]);
|
|
15105
|
-
const row = /* @__PURE__ */ jsxRuntime.jsx(blocks.ButtonList.Item, { onClick: handleClick, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { grow: "1", width: "100%", p: "2", gap: "2", justify: "between", children: [
|
|
15106
|
-
/* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { gap: "2", align: "center", className: styles$2.stopHorizontalOverflow, children: [
|
|
15107
|
-
/* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: creatorProfileSrc, size: "1", fallback: creatorProfileFallback }),
|
|
15108
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size: "2", noWrap: true, children: labelType === "creator" ? (createdBy || currentUser).username : revision.title })
|
|
15109
|
-
] }),
|
|
15110
|
-
/* @__PURE__ */ jsxRuntime.jsxs(blocks.Flex, { gap: "2", align: "center", children: [
|
|
15111
|
-
!compact && (revision.revision ? /* @__PURE__ */ jsxRuntime.jsxs(blocks.Badge, { variant: "soft", severity: isLatestRevision ? "primary" : "info", children: [
|
|
15112
|
-
"Revision #$",
|
|
15113
|
-
revision.revision
|
|
15114
|
-
] }) : !!latestRevisionNumber && /* @__PURE__ */ jsxRuntime.jsx(blocks.Badge, { children: "Original" })),
|
|
15115
|
-
/* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size: "2", noWrap: true, children: formattedDateTime })
|
|
15116
|
-
] })
|
|
15117
|
-
] }) });
|
|
15118
|
-
if (rowDecorator) {
|
|
15119
|
-
return rowDecorator(submission, row);
|
|
15120
|
-
}
|
|
15121
|
-
return row;
|
|
15122
|
-
});
|
|
15123
|
-
FormSubmissionBrowserEntry.displayName = "FormSubmissionBrowserEntry";
|
|
15124
|
-
const FormSubmissionBrowser = React.memo((props) => {
|
|
15125
|
-
const {
|
|
15126
|
-
formId: formId2,
|
|
15127
|
-
submissions: propSubmissions,
|
|
15128
|
-
compact = false,
|
|
15129
|
-
className,
|
|
15130
|
-
after,
|
|
15131
|
-
variant = "outline",
|
|
15132
|
-
...submissionEntryProps
|
|
15133
|
-
} = props;
|
|
15134
|
-
if (!!formId2 === !!propSubmissions) {
|
|
15135
|
-
throw new Error("Either formId or submissions must be provided, but not both.");
|
|
15136
|
-
}
|
|
15137
|
-
const submissions = reactRedux.useSelector(propSubmissions ? () => propSubmissions : selectFormSubmissionsOfForm(formId2));
|
|
15138
|
-
const sortedSubmissions = React.useMemo(
|
|
15139
|
-
() => submissions == null ? void 0 : submissions.sort((a, b) => {
|
|
15140
|
-
return a.submitted_at.localeCompare(b.submitted_at);
|
|
15141
|
-
}),
|
|
15142
|
-
[submissions]
|
|
15143
|
-
);
|
|
15144
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15145
|
-
blocks.ButtonList.Root,
|
|
15146
|
-
{
|
|
15147
|
-
className: classNames$1(styles$2.submissionsContainer, className),
|
|
15148
|
-
size: "small",
|
|
15149
|
-
variant,
|
|
15150
|
-
before: !compact && /* @__PURE__ */ jsxRuntime.jsxs(blocks.Text, { severity: "info", children: [
|
|
15151
|
-
"There are ",
|
|
15152
|
-
((submissions == null ? void 0 : submissions.length) || 0).toString(),
|
|
15153
|
-
" submissions of this form."
|
|
15154
|
-
] }),
|
|
15155
|
-
after,
|
|
15156
|
-
children: sortedSubmissions == null ? void 0 : sortedSubmissions.map((submission, index2) => {
|
|
15157
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15158
|
-
FormSubmissionBrowserEntry,
|
|
15159
|
-
{
|
|
15160
|
-
submission,
|
|
15161
|
-
compact,
|
|
15162
|
-
...submissionEntryProps
|
|
15163
|
-
},
|
|
15164
|
-
index2
|
|
15165
|
-
);
|
|
15166
|
-
})
|
|
15167
|
-
}
|
|
15168
|
-
);
|
|
15169
|
-
});
|
|
15170
|
-
FormSubmissionBrowser.displayName = "FormSubmissionBrowser";
|
|
15171
15025
|
const PatchField = React.memo((props) => {
|
|
15172
15026
|
const { name, render } = props;
|
|
15173
15027
|
const { submitForm } = formik.useFormikContext();
|
|
@@ -15327,7 +15181,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15327
15181
|
return actions2;
|
|
15328
15182
|
}, [duplicate, index2, move, remove2, sectionIndex, type, values.fields]);
|
|
15329
15183
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15330
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15184
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { display: forMobile(false, "flex"), direction: "column", gap: "5", mx: "2", children: actions.map((Action) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15331
15185
|
blocks.IconButton,
|
|
15332
15186
|
{
|
|
15333
15187
|
type: "button",
|
|
@@ -15436,12 +15290,12 @@ var __publicField = (obj, key, value) => {
|
|
|
15436
15290
|
hoverEffects: ["spin90Clockwise"],
|
|
15437
15291
|
children: [
|
|
15438
15292
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiSettings2Line" }),
|
|
15439
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15293
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { children: "Settings" })
|
|
15440
15294
|
]
|
|
15441
15295
|
},
|
|
15442
15296
|
"settings"
|
|
15443
15297
|
),
|
|
15444
|
-
children: () => /* @__PURE__ */ jsxRuntime.jsx(
|
|
15298
|
+
children: () => /* @__PURE__ */ jsxRuntime.jsx(Flex, { className: styles.popoverInputsContainer, direction: "column", children: popoverInputs })
|
|
15445
15299
|
}
|
|
15446
15300
|
);
|
|
15447
15301
|
});
|
|
@@ -15577,15 +15431,16 @@ var __publicField = (obj, key, value) => {
|
|
|
15577
15431
|
const error2 = get(errors, fieldCls === FieldSection ? `${parentPath}.${index2}.condition` : field.getId());
|
|
15578
15432
|
return error2 && (typeof error2 !== "object" || hasKeys(error2));
|
|
15579
15433
|
});
|
|
15434
|
+
const color = blocks.useSeverityColor(popoverHasErrors ? "danger" : "primary");
|
|
15580
15435
|
const deserializedField = React.useMemo(() => deserialize(initial), [initial]);
|
|
15581
15436
|
const previewInput2 = useFieldInput(deserializedField, { formId, disabled: true, showInputOnly: true });
|
|
15582
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15583
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15584
|
-
fieldCls === FieldSection && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15437
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { ref: containerRef, align: "center", grow: "1", children: [
|
|
15438
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", width: "100%", children: [
|
|
15439
|
+
fieldCls === FieldSection && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "1", children: [
|
|
15585
15440
|
directlyShownFields.length > 0 && directlyShownInputs,
|
|
15586
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15441
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: "2", children: [
|
|
15587
15442
|
showPopoverInputs && /* @__PURE__ */ jsxRuntime.jsx(FieldSettingsPopover, { popoverInputs, hasError: popoverHasErrors }),
|
|
15588
|
-
isSection(initial) && initial.conditional && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15443
|
+
isSection(initial) && initial.conditional && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: "1", color, children: /* @__PURE__ */ jsxRuntime.jsxs(Em, { children: [
|
|
15589
15444
|
"Display only if ",
|
|
15590
15445
|
/* @__PURE__ */ jsxRuntime.jsx(Strong, { children: conditionLabel }),
|
|
15591
15446
|
" ",
|
|
@@ -15595,22 +15450,18 @@ var __publicField = (obj, key, value) => {
|
|
|
15595
15450
|
] }) })
|
|
15596
15451
|
] })
|
|
15597
15452
|
] }),
|
|
15598
|
-
fieldCls !== FieldSection && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15453
|
+
fieldCls !== FieldSection && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
15599
15454
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15600
15455
|
PatchField,
|
|
15601
15456
|
{
|
|
15602
15457
|
name: `${parentPath}.${index2}.required`,
|
|
15603
|
-
render: ({ setValue, value }) => /* @__PURE__ */ jsxRuntime.
|
|
15604
|
-
|
|
15605
|
-
{
|
|
15606
|
-
|
|
15607
|
-
onCheckedChange: setValue,
|
|
15608
|
-
label: /* @__PURE__ */ jsxRuntime.jsx(blocks.Text, { size: "2", children: "Required field" })
|
|
15609
|
-
}
|
|
15610
|
-
)
|
|
15458
|
+
render: ({ setValue, value }) => /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "1", align: "center", children: [
|
|
15459
|
+
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { checked: value, onCheckedChange: setValue }),
|
|
15460
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { size: "2", children: "Required field" })
|
|
15461
|
+
] })
|
|
15611
15462
|
}
|
|
15612
15463
|
),
|
|
15613
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15464
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: "3", children: [
|
|
15614
15465
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.Badge, { className: styles.typeBadge, children: (_f = fieldTypeItems.flat().find((item) => item.value === type)) == null ? void 0 : _f.children }),
|
|
15615
15466
|
showPopoverInputs && /* @__PURE__ */ jsxRuntime.jsx(FieldSettingsPopover, { popoverInputs, hasError: popoverHasErrors })
|
|
15616
15467
|
] }),
|
|
@@ -15782,7 +15633,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15782
15633
|
borderColor: "var(--accent-3)"
|
|
15783
15634
|
},
|
|
15784
15635
|
mb: "4",
|
|
15785
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15636
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "4", justify: "between", align: "center", children: [
|
|
15786
15637
|
/* @__PURE__ */ jsxRuntime.jsx(FieldBuilder, { ...editFieldProps }),
|
|
15787
15638
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15788
15639
|
FieldActions,
|
|
@@ -15941,8 +15792,8 @@ var __publicField = (obj, key, value) => {
|
|
|
15941
15792
|
...draggableProvided.draggableProps,
|
|
15942
15793
|
...draggableProvided.dragHandleProps,
|
|
15943
15794
|
mb: "4",
|
|
15944
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15945
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
15795
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: "3", justify: "between", align: "center", children: [
|
|
15796
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "2", grow: "1", children: [
|
|
15946
15797
|
!fieldsOnly && /* @__PURE__ */ jsxRuntime.jsx(FieldBuilder, { ...editSectionProps }),
|
|
15947
15798
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15948
15799
|
dnd.Droppable,
|
|
@@ -15951,7 +15802,7 @@ var __publicField = (obj, key, value) => {
|
|
|
15951
15802
|
type: "SECTION",
|
|
15952
15803
|
isDropDisabled,
|
|
15953
15804
|
children: (droppableProvided) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15954
|
-
|
|
15805
|
+
Flex,
|
|
15955
15806
|
{
|
|
15956
15807
|
ref: droppableProvided.innerRef,
|
|
15957
15808
|
...droppableProvided.droppableProps,
|
|
@@ -16110,7 +15961,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16110
15961
|
[values, setFieldValue]
|
|
16111
15962
|
);
|
|
16112
15963
|
return /* @__PURE__ */ jsxRuntime.jsx(dnd.DragDropContext, { onDragStart: handleDragStart, onDragEnd: handleDragEnd, children: /* @__PURE__ */ jsxRuntime.jsx(dnd.Droppable, { droppableId: "droppable", type: "ROOT", children: (droppableProvided) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16113
|
-
|
|
15964
|
+
Flex,
|
|
16114
15965
|
{
|
|
16115
15966
|
ref: droppableProvided.innerRef,
|
|
16116
15967
|
...droppableProvided.droppableProps,
|
|
@@ -16228,19 +16079,20 @@ var __publicField = (obj, key, value) => {
|
|
|
16228
16079
|
validateOnBlur: false
|
|
16229
16080
|
});
|
|
16230
16081
|
const previewSchema = React.useMemo(() => formRevisionToSchema(formik$1.values), [formik$1.values]);
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16082
|
+
const dangerColor = blocks.useSeverityColor("danger");
|
|
16083
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Tabs.Root, { ref, defaultValue: "edit", children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", gap: "2", children: [
|
|
16084
|
+
showTabs && /* @__PURE__ */ jsxRuntime.jsxs(Tabs.List, { className: classNames$1(styles$c.tabsList, tabsListClassName), children: [
|
|
16085
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tabs.Trigger, { className: styles$c.tabTrigger, value: "edit", children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: "2", children: [
|
|
16234
16086
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiPencilLine" }),
|
|
16235
16087
|
"Edit"
|
|
16236
16088
|
] }) }),
|
|
16237
|
-
/* @__PURE__ */ jsxRuntime.jsx(Tabs.Trigger, { className: styles$
|
|
16089
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tabs.Trigger, { className: styles$c.tabTrigger, value: "preview", children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "center", gap: "2", children: [
|
|
16238
16090
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.RiIcon, { icon: "RiEyeLine" }),
|
|
16239
16091
|
"Preview"
|
|
16240
16092
|
] }) })
|
|
16241
16093
|
] }),
|
|
16242
16094
|
/* @__PURE__ */ jsxRuntime.jsxs(Tabs.Content, { value: "edit", children: [
|
|
16243
|
-
showExplainerText && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16095
|
+
showExplainerText && /* @__PURE__ */ jsxRuntime.jsxs(Text, { children: [
|
|
16244
16096
|
"Create your form using various field types. Sections can be",
|
|
16245
16097
|
" ",
|
|
16246
16098
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "conditionally rendered" }),
|
|
@@ -16248,7 +16100,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16248
16100
|
" ",
|
|
16249
16101
|
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "answers to fields in preceding sections. " })
|
|
16250
16102
|
] }),
|
|
16251
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16103
|
+
/* @__PURE__ */ jsxRuntime.jsx(Flex, { asChild: true, direction: "column", gap: "2", mt: "3", children: /* @__PURE__ */ jsxRuntime.jsxs("form", { id: formId, onSubmit: formik$1.handleSubmit, children: [
|
|
16252
16104
|
/* @__PURE__ */ jsxRuntime.jsxs(formik.FormikProvider, { value: formik$1, children: [
|
|
16253
16105
|
showFormTitle && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16254
16106
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -16258,8 +16110,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16258
16110
|
render: ({ setValue, value, meta }) => /* @__PURE__ */ jsxRuntime.jsx(InputWithHelpText, { severity: "danger", helpText: meta.error ?? null, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16259
16111
|
blocks.Input,
|
|
16260
16112
|
{
|
|
16261
|
-
className: classNames$1(styles$
|
|
16262
|
-
[styles$
|
|
16113
|
+
className: classNames$1(styles$c.title, {
|
|
16114
|
+
[styles$c.error]: meta.error
|
|
16263
16115
|
}),
|
|
16264
16116
|
placeholder: "Form title",
|
|
16265
16117
|
value,
|
|
@@ -16281,7 +16133,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16281
16133
|
render: ({ setValue, value }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16282
16134
|
blocks.TextArea,
|
|
16283
16135
|
{
|
|
16284
|
-
className: styles$
|
|
16136
|
+
className: styles$c.description,
|
|
16285
16137
|
placeholder: "Explain the purpose of this form",
|
|
16286
16138
|
value,
|
|
16287
16139
|
onChange: (event) => {
|
|
@@ -16297,9 +16149,9 @@ var __publicField = (obj, key, value) => {
|
|
|
16297
16149
|
)
|
|
16298
16150
|
] }),
|
|
16299
16151
|
/* @__PURE__ */ jsxRuntime.jsx(FieldsEditor, { fieldsOnly }),
|
|
16300
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16152
|
+
/* @__PURE__ */ jsxRuntime.jsx(Text, { color: dangerColor, size: "1", children: typeof formik$1.errors.fields === "string" && formik$1.errors.fields })
|
|
16301
16153
|
] }),
|
|
16302
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
16154
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Flex, { className: styles$c.floatingButtonContainer, align: "center", justify: "end", gap: "2", children: [
|
|
16303
16155
|
onCancel && /* @__PURE__ */ jsxRuntime.jsx(blocks.Button, { type: "button", variant: "solid", severity: "info", onClick: onCancel, children: "Cancel" }),
|
|
16304
16156
|
/* @__PURE__ */ jsxRuntime.jsx(blocks.Button, { type: "submit", children: "Save form" })
|
|
16305
16157
|
] })
|
|
@@ -16321,7 +16173,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16321
16173
|
FormBrowser,
|
|
16322
16174
|
FormBuilder,
|
|
16323
16175
|
FormRenderer,
|
|
16324
|
-
FormSubmissionBrowser,
|
|
16325
16176
|
FormSubmissionViewer,
|
|
16326
16177
|
InputWithHelpText,
|
|
16327
16178
|
InputWithLabel,
|
|
@@ -16400,7 +16251,6 @@ var __publicField = (obj, key, value) => {
|
|
|
16400
16251
|
exports2.FormBrowser = FormBrowser;
|
|
16401
16252
|
exports2.FormBuilder = FormBuilder;
|
|
16402
16253
|
exports2.FormRenderer = FormRenderer;
|
|
16403
|
-
exports2.FormSubmissionBrowser = FormSubmissionBrowser;
|
|
16404
16254
|
exports2.FormSubmissionViewer = FormSubmissionViewer;
|
|
16405
16255
|
exports2.GREEN = GREEN;
|
|
16406
16256
|
exports2.HttpMethod = HttpMethod;
|
|
@@ -16849,6 +16699,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16849
16699
|
exports2.selectOrganizationsWithAccess = selectOrganizationsWithAccess;
|
|
16850
16700
|
exports2.selectPermittedWorkspaceIds = selectPermittedWorkspaceIds;
|
|
16851
16701
|
exports2.selectPhotoAttachmentsOfIssue = selectPhotoAttachmentsOfIssue;
|
|
16702
|
+
exports2.selectProject = selectProject;
|
|
16852
16703
|
exports2.selectProjectAccess = selectProjectAccess;
|
|
16853
16704
|
exports2.selectProjectAccessForUser = selectProjectAccessForUser;
|
|
16854
16705
|
exports2.selectProjectAccessUserMapping = selectProjectAccessUserMapping;
|
|
@@ -16920,6 +16771,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16920
16771
|
exports2.setEnableClustering = setEnableClustering;
|
|
16921
16772
|
exports2.setEnableDuplicateIssues = setEnableDuplicateIssues;
|
|
16922
16773
|
exports2.setEnablePlacementMode = setEnablePlacementMode;
|
|
16774
|
+
exports2.setEnableSvgLayout = setEnableSvgLayout;
|
|
16923
16775
|
exports2.setFormRevision = setFormRevision;
|
|
16924
16776
|
exports2.setFormRevisionAttachments = setFormRevisionAttachments;
|
|
16925
16777
|
exports2.setFormRevisions = setFormRevisions;
|
|
@@ -16949,6 +16801,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16949
16801
|
exports2.setProjectAttachments = setProjectAttachments;
|
|
16950
16802
|
exports2.setProjectFileVisible = setProjectFileVisible;
|
|
16951
16803
|
exports2.setProjects = setProjects;
|
|
16804
|
+
exports2.setRehydrated = setRehydrated;
|
|
16952
16805
|
exports2.setSectionExpanded = setSectionExpanded;
|
|
16953
16806
|
exports2.setShowTooltips = setShowTooltips;
|
|
16954
16807
|
exports2.setStageCompletions = setStageCompletions;
|