theme.keycloak.v2.admin.resources.assets.TimeSelectorControl-BQB3aFfv.js.map Maven / Gradle / Ivy
{"version":3,"file":"TimeSelectorControl-BQB3aFfv.js","sources":["../../src/components/time-selector/TimeSelectorControl.tsx"],"sourcesContent":["import { FormGroup, ValidatedOptions } from \"@patternfly/react-core\";\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n UseControllerProps,\n useFormContext,\n} from \"react-hook-form\";\nimport { FormErrorText, HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport { TimeSelector, TimeSelectorProps } from \"./TimeSelector\";\n\nexport type NumberControlOption = {\n key: string;\n value: string;\n};\n\nexport type TimeSelectorControlProps<\n T extends FieldValues,\n P extends FieldPath = FieldPath,\n> = Omit &\n UseControllerProps & {\n name: string;\n label?: string;\n labelIcon?: string;\n controller: Omit;\n };\n\nexport const TimeSelectorControl = <\n T extends FieldValues,\n P extends FieldPath = FieldPath,\n>({\n name,\n label,\n controller,\n labelIcon,\n ...rest\n}: TimeSelectorControlProps) => {\n const {\n control,\n formState: { errors },\n } = useFormContext();\n\n const error = errors[name];\n\n return (\n \n ) : undefined\n }\n >\n (\n \n )}\n />\n {error && }\n \n );\n};\n"],"names":["TimeSelectorControl","name","label","controller","labelIcon","rest","control","errors","useFormContext","error","jsxs","FormGroup","jsx","HelpItem","Controller","field","TimeSelector","ValidatedOptions","FormErrorText"],"mappings":"6KA4BO,MAAMA,EAAsB,CAGjC,CACA,KAAAC,EACA,MAAAC,EACA,WAAAC,EACA,UAAAC,EACA,GAAGC,CACL,IAAsC,CAC9B,KAAA,CACJ,QAAAC,EACA,UAAW,CAAE,OAAAC,CAAO,GAClBC,EAAe,EAEbC,EAAQF,EAAON,CAAI,EAGvB,OAAAS,EAACC,EAAA,CACC,WAAYR,EAAW,OAAO,WAAa,GAC3C,MAAOD,GAASD,EAChB,QAASA,EACT,UACEG,EACGQ,EAAAC,EAAA,CAAS,SAAUT,EAAW,aAAcH,EAAM,EACjD,OAGN,SAAA,CAAAW,EAACE,EAAA,CACE,GAAGX,EACJ,KAAAF,EACA,QAAAK,EACA,OAAQ,CAAC,CAAE,MAAAS,CAAA,IACTH,EAACI,EAAA,CACE,GAAGX,EACJ,GAAIJ,EACJ,cAAaA,EACb,MAAOc,EAAM,MACb,SAAUA,EAAM,SAChB,UACEN,EAAQQ,EAAiB,MAAQA,EAAiB,OAAA,CAEtD,CAAA,CAEJ,EACCR,GAASG,EAACM,EAAc,CAAA,QAAST,EAAM,QAAmB,CAAA,CAAA,CAAA,CAGjE"}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy