theme.keycloak.v2.admin.resources.assets.KeySelect-jKxsKqdI.js.map Maven / Gradle / Ivy
{"version":3,"file":"KeySelect-jKxsKqdI.js","sources":["../../../../../node_modules/.pnpm/@[email protected]/node_modules/@patternfly/react-styles/css/components/ActionList/action-list.mjs","../../../../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@patternfly/react-core/dist/esm/components/ActionList/ActionList.js","../../../../../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@patternfly/react-core/dist/esm/components/ActionList/ActionListItem.js","../../src/components/key-value-form/KeySelect.tsx"],"sourcesContent":["import './action-list.css';\nexport default {\n \"actionList\": \"pf-v5-c-action-list\",\n \"actionListGroup\": \"pf-v5-c-action-list__group\",\n \"modifiers\": {\n \"icons\": \"pf-m-icons\"\n }\n};","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { css } from '@patternfly/react-styles';\nimport styles from '@patternfly/react-styles/css/components/ActionList/action-list.mjs';\nexport const ActionList = (_a) => {\n var { children, isIconList, className = '' } = _a, props = __rest(_a, [\"children\", \"isIconList\", \"className\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(styles.actionList, isIconList && styles.modifiers.icons, className) }, props), children));\n};\nActionList.displayName = 'ActionList';\n//# sourceMappingURL=ActionList.js.map","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { css } from '@patternfly/react-styles';\nimport styles from '@patternfly/react-styles/css/components/ActionList/action-list.mjs';\nexport const ActionListItem = (_a) => {\n var { children, className = '' } = _a, props = __rest(_a, [\"children\", \"className\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(`${styles.actionList}__item`, className) }, props), children));\n};\nActionListItem.displayName = 'ActionListItem';\n//# sourceMappingURL=ActionListItem.js.map","import { KeycloakSelect } from \"@keycloak/keycloak-ui-shared\";\nimport {\n Grid,\n GridItem,\n SelectOption,\n TextInput,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { UseControllerProps, useController } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport useToggle from \"../../utils/useToggle\";\nimport { DefaultValue } from \"./KeyValueInput\";\n\ntype KeySelectProp = UseControllerProps & {\n selectItems: DefaultValue[];\n};\n\nexport const KeySelect = ({ selectItems, ...rest }: KeySelectProp) => {\n const { t } = useTranslation();\n const [open, toggle] = useToggle();\n const { field } = useController(rest);\n const [custom, setCustom] = useState(\n !selectItems.map(({ key }) => key).includes(field.value),\n );\n\n return (\n \n \n toggle()}\n isOpen={open}\n onSelect={(value) => {\n if (value) {\n setCustom(false);\n }\n field.onChange(value);\n toggle();\n }}\n selections={!custom ? [field.value] : \"\"}\n >\n {[\n setCustom(true)}>\n {t(\"customAttribute\")}\n ,\n ...selectItems.map((item) => (\n \n {item.label}\n \n )),\n ]}\n \n \n {custom && (\n \n \n \n )}\n \n );\n};\n"],"names":["styles","ActionList","_a","children","isIconList","className","props","__rest","React","css","ActionListItem","KeySelect","selectItems","rest","t","useTranslation","open","toggle","useToggle","field","useController","custom","setCustom","useState","key","Grid","jsx","GridItem","KeycloakSelect","value","SelectOption","item","TextInput"],"mappings":"2PACA,MAAeA,EAAA,CACb,WAAc,sBACd,gBAAmB,6BACnB,UAAa,CACX,MAAS,YACV,CACH,ECHaC,EAAcC,GAAO,CAC9B,GAAI,CAAE,SAAAC,EAAU,WAAAC,EAAY,UAAAC,EAAY,EAAI,EAAGH,EAAII,EAAQC,EAAOL,EAAI,CAAC,WAAY,aAAc,WAAW,CAAC,EAC7G,OAAQM,EAAM,cAAc,MAAO,OAAO,OAAO,CAAE,UAAWC,EAAIT,EAAO,WAAYI,GAAcJ,EAAO,UAAU,MAAOK,CAAS,GAAKC,CAAK,EAAGH,CAAQ,CAC7J,EACAF,EAAW,YAAc,aCJb,MAACS,EAAkBR,GAAO,CAClC,GAAI,CAAE,SAAAC,EAAU,UAAAE,EAAY,EAAI,EAAGH,EAAII,EAAQC,EAAOL,EAAI,CAAC,WAAY,WAAW,CAAC,EACnF,OAAQM,EAAM,cAAc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