@remoteoss/remote-flows 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +199 -28
- package/dist/chunk-32G7XF2D.js +2 -0
- package/dist/chunk-32G7XF2D.js.map +1 -0
- package/dist/{chunk-7ZBXCVHC.js → chunk-56PULCHS.js} +2 -2
- package/dist/{chunk-XSTVWDTD.js → chunk-BY2NZ5QF.js} +2 -2
- package/dist/{chunk-BRK6MUQS.js → chunk-DHJSRW7Y.js} +2 -2
- package/dist/{chunk-ZII4VJ3N.js → chunk-HGBJ3RNH.js} +2 -2
- package/dist/chunk-HHNKZK2V.js +2 -0
- package/dist/chunk-HHNKZK2V.js.map +1 -0
- package/dist/chunk-K44YP7ZG.js +20 -0
- package/dist/chunk-K44YP7ZG.js.map +1 -0
- package/dist/flows/CostCalculator/CostCalculator.d.ts +7 -2
- package/dist/flows/CostCalculator/CostCalculator.js +1 -1
- package/dist/flows/CostCalculator/Disclaimer/Disclaimer.js +1 -1
- package/dist/flows/CostCalculator/Disclaimer/index.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/fields.d.ts +1 -1
- package/dist/flows/CostCalculator/hooks.d.ts +17 -11
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +2 -2
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +7 -2
- package/dist/flows/CostCalculator/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/types.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/{types.gen-_BwuB2Vq.d.ts → types.gen-dIMXHE0Y.d.ts} +393 -17
- package/package.json +5 -1
- package/dist/chunk-7EZH5DCX.js +0 -20
- package/dist/chunk-7EZH5DCX.js.map +0 -1
- package/dist/chunk-J2GLSJLO.js +0 -2
- package/dist/chunk-J2GLSJLO.js.map +0 -1
- package/dist/chunk-V7QTPQZS.js +0 -2
- package/dist/chunk-V7QTPQZS.js.map +0 -1
- /package/dist/{chunk-7ZBXCVHC.js.map → chunk-56PULCHS.js.map} +0 -0
- /package/dist/{chunk-XSTVWDTD.js.map → chunk-BY2NZ5QF.js.map} +0 -0
- /package/dist/{chunk-BRK6MUQS.js.map → chunk-DHJSRW7Y.js.map} +0 -0
- /package/dist/{chunk-ZII4VJ3N.js.map → chunk-HGBJ3RNH.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/CostCalculator/CostCalculator.tsx","../src/components/ui/form.tsx","../src/components/ui/label.tsx","../src/components/form/JSONSchemaForm.tsx","../src/components/form/fields/FieldSetField.tsx","../src/components/ui/radio-group.tsx","../src/components/form/fields/RadioGroupField.tsx","../src/components/form/fields/SelectField.tsx","../src/components/ui/select.tsx","../src/components/form/fields/TextField.tsx","../src/components/ui/input.tsx","../src/components/form/fields/fieldsMapping.tsx","../src/components/form/yupValidationResolver.ts"],"sourcesContent":["import React from 'react';\nimport { useForm } from 'react-hook-form';\n\nimport type { CostCalculatorEstimateResponse } from '@/src/client';\nimport { Form } from '@/src/components/ui/form';\n\nimport { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { useValidationFormResolver } from '@/src/components/form/yupValidationResolver';\nimport { Button } from '@/src/components/ui/button';\nimport { Disclaimer } from '@/src/flows/CostCalculator/Disclaimer';\nimport {\n defaultEstimationOptions,\n useCostCalculator,\n} from '@/src/flows/CostCalculator/hooks';\n\nimport type {\n CostCalculatorEstimationFormValues,\n CostCalculatorEstimationOptions,\n} from './types';\n\ntype CostCalculatorProps = Partial<{\n /**\n * Estimation params allows you to customize the parameters sent to the /cost-calculator/estimation endpoint.\n */\n estimationOptions?: CostCalculatorEstimationOptions;\n /**\n * Default values for the form fields.\n */\n defaultValues: Partial<{\n /**\n * Default value for the country field.\n */\n countryRegionSlug: string;\n /**\n * Default value for the currency field.\n */\n currencySlug: string;\n /**\n * Default value for the salary field.\n */\n salary: string;\n }>;\n /**\n * Options for the CostCalculator component.\n */\n options: Partial<{\n /**\n * Disclaimer options.\n */\n disclaimer: {\n /**\n * Label for the disclaimer\n * @default 'Disclaimer'\n * */\n label: string;\n };\n }>;\n /**\n * Callback function that handles form submission. When form is submit, the form values are sent to the consumer app before behind submitted to Remote.\n * @param data - The payload sent to the /cost-calculator/estimation endpoint.\n */\n onSubmit: (data: CostCalculatorEstimationFormValues) => Promise<void> | void;\n /**\n * Callback function to handle the success when the estimation succeeds. The CostCalculatorEstimateResponse is sent back to you.\n * @param data - The response data from the /cost-calculator/estimation endpoint.\n */\n onSuccess: (data: CostCalculatorEstimateResponse) => Promise<void> | void;\n /**\n * Callback function to handle the error when the estimation fails.\n * @param error - The error object.\n */\n onError: (error: Error) => void;\n}>;\n\nexport function CostCalculator({\n estimationOptions = defaultEstimationOptions,\n defaultValues = {\n countryRegionSlug: '',\n currencySlug: '',\n salary: '',\n },\n options,\n onSubmit,\n onError,\n onSuccess,\n}: CostCalculatorProps) {\n const {\n onSubmit: submitCostCalculator,\n fields,\n validationSchema,\n } = useCostCalculator({\n defaultRegion: defaultValues.countryRegionSlug,\n estimationOptions,\n });\n\n const resolver = useValidationFormResolver(validationSchema);\n const form = useForm<CostCalculatorEstimationFormValues>({\n resolver: resolver,\n defaultValues: {\n country: defaultValues?.countryRegionSlug,\n currency: defaultValues?.currencySlug,\n region: '',\n salary: defaultValues?.salary,\n },\n mode: 'onBlur',\n });\n\n const handleSubmit = async (values: CostCalculatorEstimationFormValues) => {\n await onSubmit?.(values);\n\n const estimation = await submitCostCalculator(values);\n\n if (estimation.error) {\n onError?.(estimation.error);\n } else {\n onSuccess?.(estimation.data);\n }\n };\n\n return (\n <>\n <Form {...form}>\n <form\n onSubmit={form.handleSubmit(handleSubmit)}\n className=\"space-y-4 RemoteFlows__CostCalculatorForm\"\n >\n <JSONSchemaFormFields fields={fields} />\n <Button\n type=\"submit\"\n className=\"w-full bg-gray-900 hover:bg-gray-800 text-white\"\n >\n Save\n </Button>\n </form>\n </Form>\n <div className=\"RemoteFlows__CostCalculator__Disclaimer\">\n <Disclaimer label={options?.disclaimer?.label} />\n </div>\n </>\n );\n}\n","import * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n useFormState,\n} from 'react-hook-form';\n\nimport { cn } from '@/src/lib/utils';\nimport { Label } from '@/src/components/ui/label';\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue,\n);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue,\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot=\"form-item\"\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn(\n 'text-base-color mb-1 data-[error=true]:text-destructive',\n className,\n )}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-base-color text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn('text-destructive text-sm', className)}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n","'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n","import React from 'react';\nimport { fieldsMap } from '@/src/components/form/fields/fieldsMapping';\nimport { Fields } from '@remoteoss/json-schema-form';\nimport { SupportedTypes } from '@/src/components/form/fields/types';\n\ntype JSONSchemaFormFieldsProps = {\n fields: Fields;\n};\n\nexport const JSONSchemaFormFields = ({ fields }: JSONSchemaFormFieldsProps) => {\n if (!fields || fields.length === 0) return null;\n\n return (\n <>\n {fields.map((field) => {\n if (field.isVisible === false || field.deprecated) {\n return null; // Skip hidden or deprecated fields\n }\n\n const FieldComponent = fieldsMap[field.inputType as SupportedTypes];\n\n return FieldComponent ? (\n <FieldComponent key={field.name} {...field} />\n ) : (\n <p className=\"error\">\n Field type {field.inputType as string} not supported\n </p>\n );\n })}\n </>\n );\n};\n","import { fieldsMap } from '@/src/components/form/fields/fieldsMapping';\nimport * as React from 'react';\nimport { SupportedTypes } from './types';\n\ntype FieldBase = {\n label: string;\n name: string;\n description: string;\n};\n\ntype FieldWithOptions = FieldBase & {\n type: 'select' | 'radio';\n options: Array<{ value: string; label: string }>;\n};\n\ntype FieldWithoutOptions = FieldBase & {\n type: Exclude<SupportedTypes, 'select' | 'radio'>;\n options?: never;\n};\n\ntype Field = FieldWithOptions | FieldWithoutOptions;\n\ntype FieldSetProps = {\n legend: string;\n name: string;\n fields: Field[];\n};\n\nexport function FieldSetField({ legend, name, fields }: FieldSetProps) {\n return (\n <fieldset className=\"border-1 border-input p-4 rounded-xl RemoteFlows__FieldSetField\">\n <legend className=\"text-sm font-semibold px-2\">{legend}</legend>\n <div className=\"grid gap-4\">\n {fields.map((field) => {\n const FieldComponent = fieldsMap[field.type];\n return (\n <FieldComponent\n {...field}\n key={field.name}\n name={`${name}.${field.name}`}\n />\n );\n })}\n </div>\n </fieldset>\n );\n}\n","import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { CircleIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"relative flex items-center justify-center\"\n >\n <CircleIcon className=\"fill-radio absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n","import {\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from '@/src/components/ui/form';\nimport { RadioGroup, RadioGroupItem } from '@/src/components/ui/radio-group';\nimport * as React from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype RadioGroupFieldProps = {\n name: string;\n label: string;\n description?: string;\n defaultValue?: string;\n options: Array<{ value: string; label: string }>;\n};\n\nexport function RadioGroupField({\n name,\n defaultValue,\n description,\n label,\n options,\n}: RadioGroupFieldProps) {\n const { control } = useFormContext();\n return (\n <FormField\n control={control}\n name={name}\n defaultValue={defaultValue}\n render={({ field, fieldState }) => (\n <FormItem className=\"space-y-3 RemoteFlows__RadioGroupField__Item\">\n <FormLabel>{label}</FormLabel>\n <FormControl>\n <RadioGroup\n onValueChange={field.onChange}\n defaultValue={field.value}\n className=\"flex flex-col space-y-1\"\n >\n {options.map((option) => (\n <FormItem\n key={option.value}\n className=\"flex items-center space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item\"\n >\n <FormControl>\n <RadioGroupItem\n value={option.value}\n className=\"RemoteFlows__RadioField__Input\"\n />\n </FormControl>\n <FormLabel className=\"font-normal mb-0 RemoteFlows__RadioField__Label\">\n {option.label}\n </FormLabel>\n </FormItem>\n ))}\n </RadioGroup>\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {fieldState.error && <FormMessage />}\n </FormItem>\n )}\n />\n );\n}\n","import * as React from 'react';\n\nimport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@/src/components/ui/select';\nimport { useFormContext } from 'react-hook-form';\nimport {\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from '../../ui/form';\n\ntype SelectFieldProps = {\n label: string;\n name: string;\n placeholder?: string;\n description?: string;\n options: Array<{ value: string; label: string }>;\n defaultValue?: string;\n className?: string;\n onChange?: (value: string) => void;\n};\n\nexport function SelectField({\n label,\n name,\n options,\n defaultValue,\n description,\n onChange,\n}: SelectFieldProps) {\n const { control } = useFormContext();\n\n return (\n <FormField\n defaultValue={defaultValue}\n control={control}\n name={name}\n render={({ field, fieldState }) => (\n <FormItem className=\"RemoteFlows__SelectField__Item\">\n <FormLabel className=\"RemoteFlows__SelectField__Label\">\n {label}\n </FormLabel>\n <FormControl>\n <div className=\"relative\">\n <Select\n value={field.value}\n onValueChange={(value: string) => {\n field.onChange(value);\n onChange?.(value);\n }}\n >\n <SelectTrigger\n className=\"RemoteFlows__SelectField__Trigger\"\n aria-invalid={Boolean(fieldState.error)}\n >\n <span className=\"absolute\">\n <SelectValue />\n </span>\n </SelectTrigger>\n <SelectContent className=\"RemoteFlows__SelectField__Content\">\n <SelectGroup className=\"RemoteFlows__SelectField__Group\">\n {options.map((option) => (\n <SelectItem\n key={option.value}\n value={option.value}\n className=\"RemoteFlows__SelectField__SelectItem\"\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectGroup>\n </SelectContent>\n </Select>\n </div>\n </FormControl>\n {description && <FormDescription>{description}</FormDescription>}\n {fieldState.error && <FormMessage />}\n </FormItem>\n )}\n />\n );\n}\n","import * as React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger>) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n 'focus-visible:border-focused',\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild className=\"absolute right-4\">\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('px-2 py-1.5 text-sm font-medium', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 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\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className=\"flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n","import * as React from 'react';\n\nimport { useFormContext } from 'react-hook-form';\nimport {\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from '../../ui/form';\nimport { Input } from '../../ui/input';\n\ntype TextFieldProps = React.ComponentProps<'input'> & {\n label: string;\n description?: string;\n name: string;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\ntype InputModeAttrsProps = Pick<\n React.ComponentProps<'input'>,\n 'type' | 'inputMode' | 'pattern'\n>;\n\nconst inputModeAttrs: InputModeAttrsProps = {\n type: 'text',\n inputMode: 'decimal',\n pattern: '^[0-9.]*$',\n};\n\nexport function TextField({\n name,\n description,\n label,\n type,\n onChange,\n}: TextFieldProps) {\n const { control } = useFormContext();\n const isTypeNumber = type === 'number';\n const typeAttrs = isTypeNumber ? inputModeAttrs : { type };\n return (\n <FormField\n control={control}\n name={name}\n render={({ field, fieldState }) => (\n <FormItem className=\"RemoteFlows__TextField__Item\">\n <FormLabel className=\"RemoteFlows__TextField__Label\">\n {label}\n </FormLabel>\n <FormControl>\n <Input\n {...field}\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n field.onChange(event);\n onChange?.(event);\n }}\n {...typeAttrs}\n className=\"TextField__Input\"\n />\n </FormControl>\n {description && (\n <FormDescription className=\"RemoteFlows__TextField__Description\">\n {description}\n </FormDescription>\n )}\n {fieldState.error && (\n <FormMessage className=\"RemoteFlows__TextField__Error\" />\n )}\n </FormItem>\n )}\n />\n );\n}\n","import * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-focused',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n","import { FieldSetField } from '@/src/components/form/fields/FieldSetField';\nimport { RadioGroupField } from '@/src/components/form/fields/RadioGroupField';\nimport { SelectField } from '@/src/components/form/fields/SelectField';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { SupportedTypes } from '@/src/components/form/fields/types';\nimport React from 'react';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const fieldsMap: Record<SupportedTypes, React.ComponentType<any>> = {\n text: TextField,\n select: SelectField,\n radio: RadioGroupField,\n number: (props) => <TextField {...props} type=\"text\" />,\n fieldset: FieldSetField,\n};\n","import { useCallback } from 'react';\nimport { FieldValues, Resolver } from 'react-hook-form';\nimport type { AnyObjectSchema, InferType, ValidationError } from 'yup';\n\nconst useValidationYupResolver = <T extends AnyObjectSchema>(\n validationSchema: T,\n) => {\n return useCallback(\n async (data: FieldValues) => {\n return await validationSchema.validate(data, {\n abortEarly: false,\n });\n },\n [validationSchema],\n );\n};\n\nfunction iterateErrors(error: ValidationError) {\n const errors = (error as ValidationError).inner.reduce(\n (\n allErrors: Record<string, { type: string; message: string }>,\n currentError: ValidationError,\n ) => {\n return {\n ...allErrors,\n [currentError.path as string]: {\n type: currentError.type ?? 'validation',\n message: currentError.message,\n },\n };\n },\n {} as Record<string, { type: string; message: string }>,\n );\n\n return errors;\n}\n\nexport const useValidationFormResolver = <T extends AnyObjectSchema>(\n validationSchema: T,\n): Resolver<InferType<T>> => {\n const yupValidation = useValidationYupResolver(validationSchema);\n return useCallback(\n async (data: FieldValues) => {\n let values;\n let errors = {};\n\n try {\n values = await yupValidation(data);\n } catch (error) {\n errors = iterateErrors(error as ValidationError);\n }\n\n if (Object.keys(errors).length > 0) {\n return {\n values: {},\n errors: errors,\n };\n }\n\n return {\n values,\n errors: {},\n };\n },\n [validationSchema],\n );\n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AAOC,GAA4C,CACvD,SAAUH,EACV,cAAe,CACb,QAAST,GAAe,kBACxB,SAAUA,GAAe,aACzB,OAAQ,GACR,OAAQA,GAAe,MACzB,EACA,KAAM,QACR,CAAC,EAEKa,GAAeC,EAAA,MAAOC,GAA+C,CACzE,MAAMb,IAAWa,CAAM,EAEvB,IAAMC,EAAa,MAAMX,EAAqBU,CAAM,EAEhDC,EAAW,MACbb,IAAUa,EAAW,KAAK,EAE1BZ,IAAYY,EAAW,IAAI,CAE/B,EAVqB,gBAYrB,OACEC,EAAA,cAAAA,EAAA,cACEA,EAAA,cAACC,EAAA,CAAM,GAAGP,GACRM,EAAA,cAAC,QACC,SAAUN,EAAK,aAAaE,EAAY,EACxC,UAAU,6CAEVI,EAAA,cAACE,GAAA,CAAqB,OAAQb,EAAQ,EACtCW,EAAA,cAACG,EAAA,CACC,KAAK,SACL,UAAU,mDACX,MAED,CACF,CACF,EACAH,EAAA,cAAC,OAAI,UAAU,2CACbA,EAAA,cAACI,EAAA,CAAW,MAAOpB,GAAS,YAAY,MAAO,CACjD,CACF,CAEJ,CAlEgBa,EAAAjB,GAAA","names":["React","useForm","React","Slot","Controller","FormProvider","useFormContext","useFormState","React","LabelPrimitive","Label","className","props","cn","__name","Form","FormProvider","FormFieldContext","FormField","__name","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","useFormContext","formState","useFormState","fieldState","id","FormItem","className","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","body","React","React","FieldSetField","legend","name","fields","field","FieldComponent","fieldsMap","__name","RadioGroupPrimitive","CircleIcon","React","RadioGroup","className","props","cn","__name","RadioGroupItem","CircleIcon","React","useFormContext","RadioGroupField","name","defaultValue","description","label","options","control","useFormContext","FormField","field","fieldState","FormItem","FormLabel","FormControl","RadioGroup","option","RadioGroupItem","FormDescription","FormMessage","__name","React","React","SelectPrimitive","CheckIcon","ChevronDownIcon","ChevronUpIcon","Select","props","__name","SelectGroup","SelectValue","SelectTrigger","className","children","cn","ChevronDownIcon","SelectContent","position","SelectScrollUpButton","SelectScrollDownButton","SelectItem","className","children","props","cn","CheckIcon","__name","SelectScrollUpButton","className","props","cn","ChevronUpIcon","__name","SelectScrollDownButton","ChevronDownIcon","useFormContext","SelectField","label","name","options","defaultValue","description","onChange","control","useFormContext","FormField","field","fieldState","FormItem","FormLabel","FormControl","Select","value","SelectTrigger","SelectValue","SelectContent","SelectGroup","option","SelectItem","FormDescription","FormMessage","__name","React","useFormContext","React","Input","className","type","props","cn","__name","inputModeAttrs","TextField","name","description","label","type","onChange","control","useFormContext","typeAttrs","FormField","field","fieldState","FormItem","FormLabel","FormControl","Input","event","FormDescription","FormMessage","__name","React","fieldsMap","TextField","SelectField","RadioGroupField","__name","props","React","FieldSetField","JSONSchemaFormFields","__name","fields","React","field","FieldComponent","fieldsMap","useCallback","useValidationYupResolver","__name","validationSchema","useCallback","data","iterateErrors","error","allErrors","currentError","useValidationFormResolver","yupValidation","values","errors","CostCalculator","estimationOptions","defaultEstimationOptions","defaultValues","options","onSubmit","onError","onSuccess","submitCostCalculator","fields","validationSchema","useCostCalculator","resolver","useValidationFormResolver","form","useForm","handleSubmit","__name","values","estimation","React","Form","JSONSchemaFormFields","Button","Disclaimer"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|