@krak-stack/registry 0.10.18 → 0.10.20
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/CHANGELOG.md +31 -0
- package/README.md +18 -0
- package/dist/components/ui/code-block.js +7 -7
- package/dist/components/ui/copy-button.js +7 -7
- package/dist/components/ui/copy-value.d.ts +4 -1
- package/dist/components/ui/copy-value.js +49 -16
- package/dist/components/ui/data-table.d.ts +3 -3
- package/dist/components/ui/data-table.js +23 -17
- package/dist/components/ui/editing-locale-switcher.js +7 -7
- package/dist/components/ui/effect-form.js +8 -8
- package/dist/components/ui/email-composer.js +871 -0
- package/dist/components/ui/email-editor.d.ts +3 -1
- package/dist/components/ui/email-editor.js +294 -471
- package/dist/components/ui/error-component.js +7 -7
- package/dist/components/ui/form.d.ts +7 -7
- package/dist/components/ui/form.js +18 -14
- package/dist/components/ui/icon-input.js +1 -1
- package/dist/components/ui/map-menu.d.ts +1 -1
- package/dist/components/ui/map-menu.js +183 -60
- package/dist/components/ui/pagination.js +7 -7
- package/dist/components/ui/phone-number-input.js +1 -1
- package/dist/components/ui/rich-text-editor.d.ts +15 -13
- package/dist/components/ui/rich-text-editor.js +280 -661
- package/dist/components/ui/select-with-custom-input.js +7 -7
- package/dist/components/ui/select.js +159 -0
- package/dist/components/ui/timezone-select.js +1 -1
- package/dist/components/ui/virtualized-combobox.js +1 -1
- package/dist/lib/docs.js +7 -7
- package/dist/lib/email-composer/index.js +110 -0
- package/dist/lib/email-composer/schema.js +13 -0
- package/dist/lib/email-document/legacy-rich-text/editor.d.ts +70 -0
- package/dist/lib/email-document/legacy-rich-text/schema.d.ts +65 -0
- package/dist/lib/email-document/legacy-rich-text/tiptap.d.ts +39 -0
- package/dist/lib/email-document/model.d.ts +1 -1
- package/dist/lib/email-document/model.js +2 -2
- package/dist/lib/email-document/render.js +2 -2
- package/dist/lib/email-document/schema.js +1 -1
- package/dist/lib/rich-text/model.js +79 -111
- package/dist/lib/rich-text/schema.d.ts +5 -55
- package/dist/lib/rich-text/schema.js +17 -36
- package/dist/lib/rich-text/tiptap.d.ts +12 -0
- package/dist/services/agent/client/index.js +7 -7
- package/dist/services/events/client/audit-log-table.js +23 -17
- package/dist/services/webhooks/client/delivery-table.js +30 -24
- package/package.json +24 -1
- package/dist/lib/rich-text/dom.d.ts +0 -40
- /package/dist/lib/{rich-text → email-document/legacy-rich-text}/model.d.ts +0 -0
|
@@ -102,16 +102,16 @@ function CopyButton({
|
|
|
102
102
|
clearTimeout(copyTimeout.current);
|
|
103
103
|
copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
|
|
104
104
|
};
|
|
105
|
-
const copy =
|
|
106
|
-
|
|
107
|
-
await navigator.clipboard.writeText(value);
|
|
105
|
+
const copy = () => {
|
|
106
|
+
Promise.resolve().then(() => navigator.clipboard.writeText(value)).then(() => {
|
|
108
107
|
setCopyState("copied");
|
|
109
108
|
onCopied?.();
|
|
110
|
-
|
|
109
|
+
resetCopyState();
|
|
110
|
+
}).catch((cause) => {
|
|
111
111
|
setCopyState("failed");
|
|
112
|
-
onCopyError?.(
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
onCopyError?.(cause instanceof Error ? cause : new Error(labels.copyFailed, { cause }));
|
|
113
|
+
resetCopyState();
|
|
114
|
+
});
|
|
115
115
|
};
|
|
116
116
|
const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
|
|
117
117
|
return /* @__PURE__ */ jsxs(Button, {
|
|
@@ -51,7 +51,7 @@ export declare const ErrorMessage: ({ text }: {
|
|
|
51
51
|
text: string;
|
|
52
52
|
}) => JSX.Element;
|
|
53
53
|
export declare function FieldError({ errors }: {
|
|
54
|
-
errors?:
|
|
54
|
+
errors?: readonly unknown[];
|
|
55
55
|
}): JSX.Element | null;
|
|
56
56
|
export type DefaultFormOptions = {
|
|
57
57
|
legend?: string;
|
|
@@ -144,8 +144,8 @@ declare const RevertButton: ({ locale, messages, original, }: {
|
|
|
144
144
|
locale?: string;
|
|
145
145
|
messages?: FormMessageTranslations;
|
|
146
146
|
original: string;
|
|
147
|
-
}) => JSX.Element |
|
|
148
|
-
declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/form
|
|
147
|
+
}) => JSX.Element | null;
|
|
148
|
+
declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/react-form").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
149
149
|
readonly TextField: typeof TextField;
|
|
150
150
|
readonly TextAreaField: typeof TextAreaField;
|
|
151
151
|
readonly SelectField: typeof SelectField;
|
|
@@ -161,7 +161,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
161
161
|
readonly FormError: typeof FormError;
|
|
162
162
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
163
163
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
164
|
-
}>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/form
|
|
164
|
+
}>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
165
165
|
readonly TextField: typeof TextField;
|
|
166
166
|
readonly TextAreaField: typeof TextAreaField;
|
|
167
167
|
readonly SelectField: typeof SelectField;
|
|
@@ -178,7 +178,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
178
178
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
179
179
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
180
180
|
}, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
181
|
-
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/form
|
|
181
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
|
|
182
182
|
readonly TextField: typeof TextField;
|
|
183
183
|
readonly TextAreaField: typeof TextAreaField;
|
|
184
184
|
readonly SelectField: typeof SelectField;
|
|
@@ -211,8 +211,8 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
211
211
|
readonly FormError: typeof FormError;
|
|
212
212
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
213
213
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
214
|
-
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/form
|
|
215
|
-
form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/form
|
|
214
|
+
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/react-form").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/react-form").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
|
|
215
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/react-form").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
216
216
|
readonly TextField: typeof TextField;
|
|
217
217
|
readonly TextAreaField: typeof TextAreaField;
|
|
218
218
|
readonly SelectField: typeof SelectField;
|
|
@@ -32,7 +32,7 @@ function SelectTrigger({
|
|
|
32
32
|
return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
33
33
|
"data-slot": "select-trigger",
|
|
34
34
|
"data-size": size,
|
|
35
|
-
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border
|
|
35
|
+
className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
36
36
|
...props,
|
|
37
37
|
children: [
|
|
38
38
|
children,
|
|
@@ -49,9 +49,9 @@ function SelectContent({
|
|
|
49
49
|
children,
|
|
50
50
|
side = "bottom",
|
|
51
51
|
sideOffset = 4,
|
|
52
|
-
align = "
|
|
52
|
+
align = "start",
|
|
53
53
|
alignOffset = 0,
|
|
54
|
-
alignItemWithTrigger =
|
|
54
|
+
alignItemWithTrigger = false,
|
|
55
55
|
...props
|
|
56
56
|
}) {
|
|
57
57
|
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, {
|
|
@@ -65,7 +65,7 @@ function SelectContent({
|
|
|
65
65
|
children: /* @__PURE__ */ jsxs(SelectPrimitive.Popup, {
|
|
66
66
|
"data-slot": "select-content",
|
|
67
67
|
"data-align-trigger": alignItemWithTrigger,
|
|
68
|
-
className: cn("
|
|
68
|
+
className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
|
|
69
69
|
...props,
|
|
70
70
|
children: [
|
|
71
71
|
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
@@ -85,7 +85,7 @@ function SelectItem({
|
|
|
85
85
|
}) {
|
|
86
86
|
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
87
87
|
"data-slot": "select-item",
|
|
88
|
-
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none
|
|
88
|
+
className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
89
89
|
...props,
|
|
90
90
|
children: [
|
|
91
91
|
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, {
|
|
@@ -109,7 +109,7 @@ function SelectScrollUpButton({
|
|
|
109
109
|
}) {
|
|
110
110
|
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpArrow, {
|
|
111
111
|
"data-slot": "select-scroll-up-button",
|
|
112
|
-
className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center
|
|
112
|
+
className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
113
113
|
...props,
|
|
114
114
|
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
115
115
|
});
|
|
@@ -120,7 +120,7 @@ function SelectScrollDownButton({
|
|
|
120
120
|
}) {
|
|
121
121
|
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownArrow, {
|
|
122
122
|
"data-slot": "select-scroll-down-button",
|
|
123
|
-
className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center
|
|
123
|
+
className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
124
124
|
...props,
|
|
125
125
|
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
126
126
|
});
|
|
@@ -1172,7 +1172,7 @@ var defaultClear = (label) => /* @__PURE__ */ jsx12(ComboboxPrimitive.Clear, {
|
|
|
1172
1172
|
})
|
|
1173
1173
|
});
|
|
1174
1174
|
var selectedLabel = (value, placeholder) => {
|
|
1175
|
-
if (
|
|
1175
|
+
if (value && !("label" in value)) {
|
|
1176
1176
|
return value.length > 0 ? value.map(({ label }) => label).join(", ") : placeholder;
|
|
1177
1177
|
}
|
|
1178
1178
|
return value && "label" in value ? value.label : placeholder;
|
|
@@ -1323,10 +1323,13 @@ var ErrorMessage = ({ text }) => {
|
|
|
1323
1323
|
children: text
|
|
1324
1324
|
});
|
|
1325
1325
|
};
|
|
1326
|
+
var FieldErrorValue = Schema2.Struct({
|
|
1327
|
+
message: Schema2.String
|
|
1328
|
+
}).annotate({ identifier: "FieldErrorValue" });
|
|
1326
1329
|
function FieldError({ errors = [] }) {
|
|
1327
1330
|
return errors?.length > 0 ? /* @__PURE__ */ jsx13(ErrorMessage, {
|
|
1328
1331
|
text: errors.map((error) => {
|
|
1329
|
-
return error.message
|
|
1332
|
+
return Schema2.decodeUnknownOption(FieldErrorValue)(error).pipe(Option.map(({ message }) => message), Option.getOrElse(() => "")).split(" ").map((word) => {
|
|
1330
1333
|
if (word.startsWith("t:"))
|
|
1331
1334
|
return word.slice(2);
|
|
1332
1335
|
return word;
|
|
@@ -1666,7 +1669,7 @@ var SingleSearchableSelectControl = ({
|
|
|
1666
1669
|
ariaLabel,
|
|
1667
1670
|
emptyLabel,
|
|
1668
1671
|
items: mergedItems,
|
|
1669
|
-
locale,
|
|
1672
|
+
locale: useKrakstackLocale3(locale),
|
|
1670
1673
|
...messages ? { messages } : {},
|
|
1671
1674
|
onValueChange: (option) => field.handleChange(option?.value ?? ""),
|
|
1672
1675
|
placeholder,
|
|
@@ -1698,7 +1701,7 @@ var MultipleSearchableSelectControl = ({
|
|
|
1698
1701
|
ariaLabel,
|
|
1699
1702
|
emptyLabel,
|
|
1700
1703
|
items: mergedItems,
|
|
1701
|
-
locale,
|
|
1704
|
+
locale: useKrakstackLocale3(locale),
|
|
1702
1705
|
...messages ? { messages } : {},
|
|
1703
1706
|
multiple: true,
|
|
1704
1707
|
onValueChange: (options) => field.handleChange(options.map(({ value }) => value)),
|
|
@@ -1752,7 +1755,7 @@ var SearchableSelectField = ({
|
|
|
1752
1755
|
};
|
|
1753
1756
|
var FileField = ({
|
|
1754
1757
|
label,
|
|
1755
|
-
accept,
|
|
1758
|
+
accept = "",
|
|
1756
1759
|
filePickerMessages,
|
|
1757
1760
|
locale: localeOverride,
|
|
1758
1761
|
messages,
|
|
@@ -1821,7 +1824,7 @@ var ImageField = ({
|
|
|
1821
1824
|
alt: label,
|
|
1822
1825
|
height: size.height,
|
|
1823
1826
|
width: size.width,
|
|
1824
|
-
src: imageUrl
|
|
1827
|
+
src: imageUrl ?? ""
|
|
1825
1828
|
};
|
|
1826
1829
|
return /* @__PURE__ */ jsxs6(Field, {
|
|
1827
1830
|
"data-invalid": invalid,
|
|
@@ -1961,7 +1964,7 @@ var FieldWrapper = ({
|
|
|
1961
1964
|
variant: "outline",
|
|
1962
1965
|
children: [
|
|
1963
1966
|
/* @__PURE__ */ jsx13(Languages, {}),
|
|
1964
|
-
locales.find((l) => l.value === editingLocale)
|
|
1967
|
+
locales.find((l) => l.value === editingLocale)?.label ?? editingLocale
|
|
1965
1968
|
]
|
|
1966
1969
|
})
|
|
1967
1970
|
]
|
|
@@ -1993,6 +1996,7 @@ var RevertButton = ({
|
|
|
1993
1996
|
})
|
|
1994
1997
|
});
|
|
1995
1998
|
}
|
|
1999
|
+
return null;
|
|
1996
2000
|
};
|
|
1997
2001
|
var { useAppForm, withForm, withFieldGroup } = createFormHook({
|
|
1998
2002
|
fieldContext,
|
|
@@ -345,7 +345,7 @@ var defaultClear = (label) => /* @__PURE__ */ jsx4(ComboboxPrimitive.Clear, {
|
|
|
345
345
|
})
|
|
346
346
|
});
|
|
347
347
|
var selectedLabel = (value, placeholder) => {
|
|
348
|
-
if (
|
|
348
|
+
if (value && !("label" in value)) {
|
|
349
349
|
return value.length > 0 ? value.map(({ label }) => label).join(", ") : placeholder;
|
|
350
350
|
}
|
|
351
351
|
return value && "label" in value ? value.label : placeholder;
|
|
@@ -8,7 +8,7 @@ export declare enum MapMenuPresentation {
|
|
|
8
8
|
Inline = "inline"
|
|
9
9
|
}
|
|
10
10
|
export type MapMenuPoint = GoogleMapPoint;
|
|
11
|
-
export declare const mapMenuRadiiKm: readonly [1, 2, 5, 10, 20, 40, 60, 80, 100, 250, 500];
|
|
11
|
+
export declare const mapMenuRadiiKm: readonly [1, 2, 5, 10, 20, 40, 50, 60, 80, 100, 250, 500];
|
|
12
12
|
export type MapMenuLocation = {
|
|
13
13
|
id: string;
|
|
14
14
|
label: string;
|