@bigbinary/neeto-molecules 5.2.22 → 5.2.24

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.
Files changed (41) hide show
  1. package/dist/cjs/v2/ToggleFeatureCard.js +13 -7
  2. package/dist/cjs/v2/ToggleFeatureCard.js.map +1 -1
  3. package/dist/v2/ToggleFeatureCard.js +13 -7
  4. package/dist/v2/ToggleFeatureCard.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/translations/ar.json +18 -17
  7. package/src/translations/bg.json +18 -17
  8. package/src/translations/ca.json +18 -17
  9. package/src/translations/cs.json +18 -17
  10. package/src/translations/da.json +18 -17
  11. package/src/translations/de.json +18 -17
  12. package/src/translations/es-MX.json +18 -17
  13. package/src/translations/es.json +18 -17
  14. package/src/translations/et.json +18 -17
  15. package/src/translations/fi.json +18 -17
  16. package/src/translations/fil.json +18 -17
  17. package/src/translations/fr.json +18 -17
  18. package/src/translations/he.json +18 -17
  19. package/src/translations/hi.json +18 -17
  20. package/src/translations/hr.json +18 -17
  21. package/src/translations/hu.json +18 -17
  22. package/src/translations/id.json +18 -17
  23. package/src/translations/it.json +18 -17
  24. package/src/translations/ja.json +18 -17
  25. package/src/translations/ko.json +18 -17
  26. package/src/translations/nl.json +18 -17
  27. package/src/translations/pl.json +18 -17
  28. package/src/translations/pt-BR.json +18 -17
  29. package/src/translations/pt.json +18 -17
  30. package/src/translations/ro.json +18 -17
  31. package/src/translations/ru.json +18 -17
  32. package/src/translations/sk.json +18 -17
  33. package/src/translations/sl.json +18 -17
  34. package/src/translations/sv.json +18 -17
  35. package/src/translations/th.json +18 -17
  36. package/src/translations/tr.json +18 -17
  37. package/src/translations/uk.json +18 -17
  38. package/src/translations/vi.json +18 -17
  39. package/src/translations/zh-CN.json +18 -17
  40. package/src/translations/zh-TW.json +18 -17
  41. package/types/v2/ToggleFeatureCard.d.ts +6 -0
@@ -28,7 +28,7 @@ var useScrollIntoView = function useScrollIntoView(_ref) {
28
28
  };
29
29
 
30
30
  var _excluded$1 = ["enabledCondition", "name", "isDisabled", "switchDataTestid", "tooltipProps"],
31
- _excluded2 = ["enabledSwitchText", "disabledSwitchText"];
31
+ _excluded2$1 = ["enabledSwitchText", "disabledSwitchText"];
32
32
  function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
33
33
  function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34
34
  var TooltipSwitch = function TooltipSwitch(_ref) {
@@ -43,7 +43,7 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
43
43
  otherProps = _objectWithoutProperties(_ref, _excluded$1);
44
44
  var enabledSwitchText = tooltipProps.enabledSwitchText,
45
45
  disabledSwitchText = tooltipProps.disabledSwitchText,
46
- neetoAtomsTooltipProps = _objectWithoutProperties(tooltipProps, _excluded2);
46
+ neetoAtomsTooltipProps = _objectWithoutProperties(tooltipProps, _excluded2$1);
47
47
  var tooltipContent = enabledCondition ? enabledSwitchText : disabledSwitchText;
48
48
  return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Tooltip, _objectSpread$1(_objectSpread$1({
49
49
  content: tooltipContent,
@@ -61,7 +61,8 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
61
61
  }));
62
62
  };
63
63
 
64
- var _excluded = ["className"];
64
+ var _excluded = ["className"],
65
+ _excluded2 = ["className"];
65
66
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
66
67
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
67
68
  var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
@@ -90,6 +91,8 @@ var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
90
91
  editButtonProps = _ref$editButtonProps === void 0 ? {} : _ref$editButtonProps,
91
92
  _ref$titleProps = _ref.titleProps,
92
93
  titleProps = _ref$titleProps === void 0 ? {} : _ref$titleProps,
94
+ _ref$descriptionProps = _ref.descriptionProps,
95
+ descriptionProps = _ref$descriptionProps === void 0 ? {} : _ref$descriptionProps,
93
96
  _ref$className = _ref.className,
94
97
  className = _ref$className === void 0 ? "" : _ref$className;
95
98
  var _useTranslation = reactI18next.useTranslation(),
@@ -98,6 +101,8 @@ var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
98
101
  var id = neetoCist.slugify(title);
99
102
  var titleClassName = titleProps.className,
100
103
  otherTitleProps = _objectWithoutProperties(titleProps, _excluded);
104
+ var descriptionClassName = descriptionProps.className,
105
+ otherDescriptionProps = _objectWithoutProperties(descriptionProps, _excluded2);
101
106
  var _useState = React.useState(false),
102
107
  _useState2 = _slicedToArray(_useState, 2),
103
108
  isEditing = _useState2[0],
@@ -165,12 +170,13 @@ var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
165
170
  "data-testid": neetoCist.isPresent(titleDataTestid) ? titleDataTestid : "toggle-feature-card-title",
166
171
  children: title
167
172
  }))]
168
- }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
169
- className: "mb-4 whitespace-pre-line",
170
- variant: "body2",
173
+ }), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, _objectSpread(_objectSpread({
174
+ variant: "body2"
175
+ }, otherDescriptionProps), {}, {
176
+ className: classnames("mb-4 whitespace-pre-line", descriptionClassName),
171
177
  "data-testid": neetoCist.isPresent(descriptionDataTestid) ? descriptionDataTestid : "toggle-feature-card-description",
172
178
  children: description
173
- }), hasInput && !isEditing && /*#__PURE__*/jsxRuntime.jsxs("div", {
179
+ })), hasInput && !isEditing && /*#__PURE__*/jsxRuntime.jsxs("div", {
174
180
  className: "m-0 flex flex-row items-center gap-x-2",
175
181
  children: [inputProps === null || inputProps === void 0 ? void 0 : inputProps.display, /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, _objectSpread({
176
182
  label: t("neetoMolecules.common.actions.edit"),
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleFeatureCard.js","sources":["../../../src/v2/components/ToggleFeatureCard/hooks/useScrollIntoView.js","../../../src/v2/components/ToggleFeatureCard/ToolTipSwitch.jsx","../../../src/v2/components/ToggleFeatureCard/index.jsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nconst useScrollIntoView = ({ elementId, trigger }) => {\n useEffect(() => {\n if (!trigger) return;\n document.getElementById(elementId)?.scrollIntoView();\n }, [trigger]);\n};\n\nexport default useScrollIntoView;\n","import { Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Switch as FormikSwitch } from \"@bigbinary/neeto-atoms/formik\";\nimport { isPresent } from \"neetocist\";\n\nconst TooltipSwitch = ({\n enabledCondition,\n name = \"\",\n isDisabled = false,\n switchDataTestid,\n tooltipProps = {},\n ...otherProps\n}) => {\n const { enabledSwitchText, disabledSwitchText, ...neetoAtomsTooltipProps } =\n tooltipProps;\n\n const tooltipContent = enabledCondition\n ? enabledSwitchText\n : disabledSwitchText;\n\n return (\n <Tooltip\n content={tooltipContent}\n disabled={!tooltipContent}\n position=\"top\"\n {...neetoAtomsTooltipProps}\n >\n <span>\n <FormikSwitch\n disabled={isDisabled}\n data-testid={\n isPresent(switchDataTestid)\n ? switchDataTestid\n : \"toggle-feature-card-switch\"\n }\n {...{ name, ...otherProps }}\n />\n </span>\n </Tooltip>\n );\n};\n\nexport default TooltipSwitch;\n","import { useRef, useState, useEffect } from \"react\";\n\nimport { Button, Label, Typography } from \"@bigbinary/neeto-atoms\";\nimport { Input } from \"@bigbinary/neeto-atoms/formik\";\nimport classnames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { X } from \"lucide-react\";\nimport { isPresent, slugify } from \"neetocist\";\nimport useOnClickOutside from \"neetocommons/v2/react-utils/useOnClickOutside\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZES } from \"./constants\";\nimport useScrollIntoView from \"./hooks/useScrollIntoView\";\nimport TooltipSwitch from \"./ToolTipSwitch\";\n\nconst ToggleFeatureCard = ({\n isCardStyleEnabled = true,\n title = \"\",\n description = null,\n switchName = \"switch\",\n titleDataTestid = \"\",\n switchDataTestid = \"\",\n descriptionDataTestid = \"\",\n isDisabled = false,\n children = null,\n inputProps,\n switchProps = {},\n editButtonProps = {},\n titleProps = {},\n className = \"\",\n}) => {\n const { t } = useTranslation();\n const cardRef = useRef();\n const id = slugify(title);\n const { className: titleClassName, ...otherTitleProps } = titleProps;\n\n const [isEditing, setIsEditing] = useState(false);\n\n const { setFieldValue, values, submitCount, errors, initialValues } =\n useFormikContext();\n\n useEffect(() => {\n if (!(submitCount >= 1 && isEmpty(errors))) return;\n setIsEditing(false);\n }, [submitCount]);\n\n useEffect(() => {\n if (isEmpty(errors)) return;\n setIsEditing(true);\n }, [values, errors]);\n\n const [shouldHighlight, setShouldHighlight] = useState(\n location.hash.split(\"#\")[1] === id\n );\n\n const hasInput = values?.[switchName] && inputProps?.name;\n const enabledCondition = values?.[switchName];\n\n const handleInputReset = () => {\n setIsEditing(false);\n hasInput &&\n setFieldValue(inputProps?.name, initialValues?.[inputProps?.name]);\n };\n\n useOnClickOutside(cardRef, () => setShouldHighlight(false));\n\n useScrollIntoView({ elementId: id, trigger: shouldHighlight });\n\n const inputRef = useHotkeys(\"enter\", () => setIsEditing(false), {\n mode: \"scoped\",\n });\n\n return (\n <div\n {...{ id }}\n data-testid=\"feature-card-container\"\n ref={cardRef}\n className={classnames(\n \"flex flex-col gap-y-2 rounded-lg\",\n { \"bg-card text-card-foreground border p-4\": isCardStyleEnabled },\n { \"border-border\": isCardStyleEnabled && !shouldHighlight },\n { \"border-primary ring-primary ring-1\": shouldHighlight },\n className\n )}\n >\n <Label className=\"flex flex-row items-center gap-2\">\n <TooltipSwitch\n {...{\n enabledCondition,\n isDisabled,\n switchDataTestid,\n ...switchProps,\n }}\n name={switchName}\n />\n <Typography\n variant=\"h5\"\n {...otherTitleProps}\n as=\"span\"\n className={classnames(\"leading-snug\", titleClassName)}\n data-testid={\n isPresent(titleDataTestid)\n ? titleDataTestid\n : \"toggle-feature-card-title\"\n }\n >\n {title}\n </Typography>\n </Label>\n <Typography\n className=\"mb-4 whitespace-pre-line\"\n variant=\"body2\"\n data-testid={\n isPresent(descriptionDataTestid)\n ? descriptionDataTestid\n : \"toggle-feature-card-description\"\n }\n >\n {description}\n </Typography>\n {hasInput && !isEditing && (\n <div className=\"m-0 flex flex-row items-center gap-x-2\">\n {inputProps?.display}\n <Button\n label={t(\"neetoMolecules.common.actions.edit\")}\n size=\"sm\"\n type=\"button\"\n variant=\"link\"\n data-testid={\n isPresent(inputProps?.editButtonDataTestid)\n ? inputProps?.editButtonDataTestid\n : \"toggle-feature-card-input-display-edit\"\n }\n onClick={() => setIsEditing(true)}\n {...editButtonProps}\n />\n </div>\n )}\n {hasInput && isEditing && (\n <Input\n autoFocus\n label={inputProps?.label}\n name={inputProps?.name}\n placeholder={inputProps?.placeholder}\n ref={inputRef}\n size=\"medium\"\n data-testid={\n isPresent(inputProps?.dataTestid)\n ? inputProps?.dataTestid\n : \"toggle-feature-card-input-field\"\n }\n suffix={\n <Button\n data-testid=\"toggle-feature-card-input-reset\"\n icon={X}\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={handleInputReset}\n />\n }\n {...inputProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nToggleFeatureCard.propTypes = {\n /**\n * The title that will be displayed for the card.\n */\n title: PropTypes.string,\n /**\n * The descripton text for the particular feature or setting.\n */\n description: PropTypes.string,\n /**\n * The formik name of the feature or setting to be toggled. eg:\n {switchName: \"enableEmails\"}.\n */\n switchName: PropTypes.string,\n /**\n * Can be used to disable the toggle switch conditionally.\n */\n isDisabled: PropTypes.bool,\n /**\n * Can be used to enable the card appearance.\n */\n isCardStyleEnabled: PropTypes.bool,\n /**\n * Custom child components to be displayed in the card.\n */\n children: PropTypes.node,\n /**\n * Can be used to add an input field for a setting or a feature.\n For example, `Enable email notifications` card can have an email input field.\n */\n inputProps: PropTypes.shape({\n name: PropTypes.string,\n display: PropTypes.node,\n label: PropTypes.string,\n editButtonTooltip: PropTypes.string,\n editButtonDataTestid: PropTypes.string,\n placeholder: PropTypes.string,\n dataTestid: PropTypes.string,\n onChange: PropTypes.func,\n suffix: PropTypes.node,\n prefix: PropTypes.node,\n className: PropTypes.string,\n nakedInput: PropTypes.bool,\n size: PropTypes.oneOf(Object.values(SIZES)),\n type: PropTypes.string,\n maxLength: PropTypes.number,\n contentSize: PropTypes.number,\n unlimitedChars: PropTypes.bool,\n }),\n /**\n * Can be used to add props to the switch component.\n */\n switchProps: PropTypes.shape({\n onChange: PropTypes.func,\n className: PropTypes.string,\n checked: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n enabledSwitchText: PropTypes.string,\n disabledSwitchText: PropTypes.string,\n }),\n }),\n /**\n * Can be used to add props to the edit button component.\n */\n editButtonProps: PropTypes.shape({\n onClick: PropTypes.func,\n className: PropTypes.string,\n style: PropTypes.string,\n size: PropTypes.string,\n type: PropTypes.string,\n tooltipProps: PropTypes.object,\n }),\n /**\n * Can be used to add props to the title Typography component. eg:\n {titleProps: {variant: \"h6\"}}.\n */\n titleProps: PropTypes.shape({\n variant: PropTypes.string,\n weight: PropTypes.string,\n color: PropTypes.string,\n className: PropTypes.string,\n }),\n /**\n * To specify external classnames as overrides to the ToggleFeatureCard wrapper.\n */\n className: PropTypes.string,\n};\n\nexport default ToggleFeatureCard;\n"],"names":["useScrollIntoView","_ref","elementId","trigger","useEffect","_document$getElementB","document","getElementById","scrollIntoView","TooltipSwitch","enabledCondition","_ref$name","name","_ref$isDisabled","isDisabled","switchDataTestid","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","enabledSwitchText","disabledSwitchText","neetoAtomsTooltipProps","_excluded2","tooltipContent","_jsx","Tooltip","_objectSpread","content","disabled","position","children","FormikSwitch","isPresent","ToggleFeatureCard","_ref$isCardStyleEnabl","isCardStyleEnabled","_ref$title","title","_ref$description","description","_ref$switchName","switchName","_ref$titleDataTestid","titleDataTestid","_ref$switchDataTestid","_ref$descriptionDataT","descriptionDataTestid","_ref$children","inputProps","_ref$switchProps","switchProps","_ref$editButtonProps","editButtonProps","_ref$titleProps","titleProps","_ref$className","className","_useTranslation","useTranslation","t","cardRef","useRef","id","slugify","titleClassName","otherTitleProps","_useState","useState","_useState2","_slicedToArray","isEditing","setIsEditing","_useFormikContext","useFormikContext","setFieldValue","values","submitCount","errors","initialValues","isEmpty","_useState3","location","hash","split","_useState4","shouldHighlight","setShouldHighlight","hasInput","handleInputReset","useOnClickOutside","inputRef","useHotkeys","mode","_jsxs","ref","classnames","Label","Typography","variant","as","display","Button","label","size","type","editButtonDataTestid","onClick","Input","autoFocus","placeholder","dataTestid","suffix","icon","X"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAA+B;AAAA,EAAA,IAAzBC,SAAS,GAAAD,IAAA,CAATC,S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,UAAU,aAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAE8D,UAAU,CAAC,GAC7B9D,UAAU,aAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAE8D,UAAU,GACtB,iCACL;MACDC,MAAM,eACJvF,cAAA,CAAC6E,iBAAM,EAAA;AACL,QAAA,aAAA,EAAY,iCAAiC;AAC7CW,QAAAA,IAAI,EAAEC,GAAE;AACRV,QAAAA,IAAI,EAAC,IAAI;AACTC,QAAAA,IAAI,EAAC,QAAQ;AACbN,QAAAA,OAAO,EAAC,OAAO;AACfQ,QAAAA,OAAO,EAAElB;OACV;AACF,KAAA,EACGxC,UAAU,CACf,CACF,EACAlB,QAAQ;AAAA,GACN,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"ToggleFeatureCard.js","sources":["../../../src/v2/components/ToggleFeatureCard/hooks/useScrollIntoView.js","../../../src/v2/components/ToggleFeatureCard/ToolTipSwitch.jsx","../../../src/v2/components/ToggleFeatureCard/index.jsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nconst useScrollIntoView = ({ elementId, trigger }) => {\n useEffect(() => {\n if (!trigger) return;\n document.getElementById(elementId)?.scrollIntoView();\n }, [trigger]);\n};\n\nexport default useScrollIntoView;\n","import { Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Switch as FormikSwitch } from \"@bigbinary/neeto-atoms/formik\";\nimport { isPresent } from \"neetocist\";\n\nconst TooltipSwitch = ({\n enabledCondition,\n name = \"\",\n isDisabled = false,\n switchDataTestid,\n tooltipProps = {},\n ...otherProps\n}) => {\n const { enabledSwitchText, disabledSwitchText, ...neetoAtomsTooltipProps } =\n tooltipProps;\n\n const tooltipContent = enabledCondition\n ? enabledSwitchText\n : disabledSwitchText;\n\n return (\n <Tooltip\n content={tooltipContent}\n disabled={!tooltipContent}\n position=\"top\"\n {...neetoAtomsTooltipProps}\n >\n <span>\n <FormikSwitch\n disabled={isDisabled}\n data-testid={\n isPresent(switchDataTestid)\n ? switchDataTestid\n : \"toggle-feature-card-switch\"\n }\n {...{ name, ...otherProps }}\n />\n </span>\n </Tooltip>\n );\n};\n\nexport default TooltipSwitch;\n","import { useRef, useState, useEffect } from \"react\";\n\nimport { Button, Label, Typography } from \"@bigbinary/neeto-atoms\";\nimport { Input } from \"@bigbinary/neeto-atoms/formik\";\nimport classnames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { X } from \"lucide-react\";\nimport { isPresent, slugify } from \"neetocist\";\nimport useOnClickOutside from \"neetocommons/v2/react-utils/useOnClickOutside\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZES } from \"./constants\";\nimport useScrollIntoView from \"./hooks/useScrollIntoView\";\nimport TooltipSwitch from \"./ToolTipSwitch\";\n\nconst ToggleFeatureCard = ({\n isCardStyleEnabled = true,\n title = \"\",\n description = null,\n switchName = \"switch\",\n titleDataTestid = \"\",\n switchDataTestid = \"\",\n descriptionDataTestid = \"\",\n isDisabled = false,\n children = null,\n inputProps,\n switchProps = {},\n editButtonProps = {},\n titleProps = {},\n descriptionProps = {},\n className = \"\",\n}) => {\n const { t } = useTranslation();\n const cardRef = useRef();\n const id = slugify(title);\n const { className: titleClassName, ...otherTitleProps } = titleProps;\n const { className: descriptionClassName, ...otherDescriptionProps } =\n descriptionProps;\n\n const [isEditing, setIsEditing] = useState(false);\n\n const { setFieldValue, values, submitCount, errors, initialValues } =\n useFormikContext();\n\n useEffect(() => {\n if (!(submitCount >= 1 && isEmpty(errors))) return;\n setIsEditing(false);\n }, [submitCount]);\n\n useEffect(() => {\n if (isEmpty(errors)) return;\n setIsEditing(true);\n }, [values, errors]);\n\n const [shouldHighlight, setShouldHighlight] = useState(\n location.hash.split(\"#\")[1] === id\n );\n\n const hasInput = values?.[switchName] && inputProps?.name;\n const enabledCondition = values?.[switchName];\n\n const handleInputReset = () => {\n setIsEditing(false);\n hasInput &&\n setFieldValue(inputProps?.name, initialValues?.[inputProps?.name]);\n };\n\n useOnClickOutside(cardRef, () => setShouldHighlight(false));\n\n useScrollIntoView({ elementId: id, trigger: shouldHighlight });\n\n const inputRef = useHotkeys(\"enter\", () => setIsEditing(false), {\n mode: \"scoped\",\n });\n\n return (\n <div\n {...{ id }}\n data-testid=\"feature-card-container\"\n ref={cardRef}\n className={classnames(\n \"flex flex-col gap-y-2 rounded-lg\",\n { \"bg-card text-card-foreground border p-4\": isCardStyleEnabled },\n { \"border-border\": isCardStyleEnabled && !shouldHighlight },\n { \"border-primary ring-primary ring-1\": shouldHighlight },\n className\n )}\n >\n <Label className=\"flex flex-row items-center gap-2\">\n <TooltipSwitch\n {...{\n enabledCondition,\n isDisabled,\n switchDataTestid,\n ...switchProps,\n }}\n name={switchName}\n />\n <Typography\n variant=\"h5\"\n {...otherTitleProps}\n as=\"span\"\n className={classnames(\"leading-snug\", titleClassName)}\n data-testid={\n isPresent(titleDataTestid)\n ? titleDataTestid\n : \"toggle-feature-card-title\"\n }\n >\n {title}\n </Typography>\n </Label>\n <Typography\n variant=\"body2\"\n {...otherDescriptionProps}\n className={classnames(\"mb-4 whitespace-pre-line\", descriptionClassName)}\n data-testid={\n isPresent(descriptionDataTestid)\n ? descriptionDataTestid\n : \"toggle-feature-card-description\"\n }\n >\n {description}\n </Typography>\n {hasInput && !isEditing && (\n <div className=\"m-0 flex flex-row items-center gap-x-2\">\n {inputProps?.display}\n <Button\n label={t(\"neetoMolecules.common.actions.edit\")}\n size=\"sm\"\n type=\"button\"\n variant=\"link\"\n data-testid={\n isPresent(inputProps?.editButtonDataTestid)\n ? inputProps?.editButtonDataTestid\n : \"toggle-feature-card-input-display-edit\"\n }\n onClick={() => setIsEditing(true)}\n {...editButtonProps}\n />\n </div>\n )}\n {hasInput && isEditing && (\n <Input\n autoFocus\n label={inputProps?.label}\n name={inputProps?.name}\n placeholder={inputProps?.placeholder}\n ref={inputRef}\n size=\"medium\"\n data-testid={\n isPresent(inputProps?.dataTestid)\n ? inputProps?.dataTestid\n : \"toggle-feature-card-input-field\"\n }\n suffix={\n <Button\n data-testid=\"toggle-feature-card-input-reset\"\n icon={X}\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={handleInputReset}\n />\n }\n {...inputProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nToggleFeatureCard.propTypes = {\n /**\n * The title that will be displayed for the card.\n */\n title: PropTypes.string,\n /**\n * The descripton text for the particular feature or setting.\n */\n description: PropTypes.string,\n /**\n * The formik name of the feature or setting to be toggled. eg:\n {switchName: \"enableEmails\"}.\n */\n switchName: PropTypes.string,\n /**\n * Can be used to disable the toggle switch conditionally.\n */\n isDisabled: PropTypes.bool,\n /**\n * Can be used to enable the card appearance.\n */\n isCardStyleEnabled: PropTypes.bool,\n /**\n * Custom child components to be displayed in the card.\n */\n children: PropTypes.node,\n /**\n * Can be used to add an input field for a setting or a feature.\n For example, `Enable email notifications` card can have an email input field.\n */\n inputProps: PropTypes.shape({\n name: PropTypes.string,\n display: PropTypes.node,\n label: PropTypes.string,\n editButtonTooltip: PropTypes.string,\n editButtonDataTestid: PropTypes.string,\n placeholder: PropTypes.string,\n dataTestid: PropTypes.string,\n onChange: PropTypes.func,\n suffix: PropTypes.node,\n prefix: PropTypes.node,\n className: PropTypes.string,\n nakedInput: PropTypes.bool,\n size: PropTypes.oneOf(Object.values(SIZES)),\n type: PropTypes.string,\n maxLength: PropTypes.number,\n contentSize: PropTypes.number,\n unlimitedChars: PropTypes.bool,\n }),\n /**\n * Can be used to add props to the switch component.\n */\n switchProps: PropTypes.shape({\n onChange: PropTypes.func,\n className: PropTypes.string,\n checked: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n enabledSwitchText: PropTypes.string,\n disabledSwitchText: PropTypes.string,\n }),\n }),\n /**\n * Can be used to add props to the edit button component.\n */\n editButtonProps: PropTypes.shape({\n onClick: PropTypes.func,\n className: PropTypes.string,\n style: PropTypes.string,\n size: PropTypes.string,\n type: PropTypes.string,\n tooltipProps: PropTypes.object,\n }),\n /**\n * Can be used to add props to the title Typography component. eg:\n {titleProps: {variant: \"h6\"}}.\n */\n titleProps: PropTypes.shape({\n variant: PropTypes.string,\n weight: PropTypes.string,\n color: PropTypes.string,\n className: PropTypes.string,\n }),\n /**\n * Can be used to add props to the description Typography component. eg:\n {descriptionProps: {color: \"muted\"}}.\n */\n descriptionProps: PropTypes.shape({\n variant: PropTypes.string,\n weight: PropTypes.string,\n color: PropTypes.string,\n className: PropTypes.string,\n }),\n /**\n * To specify external classnames as overrides to the ToggleFeatureCard wrapper.\n */\n className: PropTypes.string,\n};\n\nexport default ToggleFeatureCard;\n"],"names":["useScrollIntoView","_ref","elementId","trigger","useEffect","_document$getElementB","document","getElementById","scrollIntoView","TooltipSwitch","enabledCondition","_ref$name","name","_ref$isDisabled","isDisabled","switchDataTestid","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","enabledSwitchText","disabledSwitchText","neetoAtomsTooltipProps","_excluded2","tooltipContent","_jsx","Tooltip","_objectSpread","content","disabled","position","children","FormikSwitch","isPresent","ToggleFeatureCard","_ref$isCardStyleEnabl","isCardStyleEnabled","_ref$title","title","_ref$description","description","_ref$switchName","switchName","_ref$titleDataTestid","titleDataTestid","_ref$switchDataTestid","_ref$descriptionDataT","descriptionDataTestid","_ref$children","inputProps","_ref$switchProps","switchProps","_ref$editButtonProps","editButtonProps","_ref$titleProps","titleProps","_ref$descriptionProps","descriptionProps","_ref$className","className","_useTranslation","useTranslation","t","cardRef","useRef","id","slugify","titleClassName","otherTitleProps","descriptionClassName","otherDescriptionProps","_useState","useState","_useState2","_slicedToArray","isEditing","setIsEditing","_useFormikContext","useFormikContext","setFieldValue","values","submitCount","errors","initialValues","isEmpty","_useState3","location","hash","split","_useState4","shouldHighlight","setShouldHighlight","hasInput","handleInputReset","useOnClickOutside","inputRef","useHotkeys","mode","_jsxs","ref","classnames","Label","Typography","variant","as","display","Button","label","size","type","editButtonDataTestid","onClick","Input","autoFocus","placeholder","dataTestid","suffix","icon","X"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAA+B;AAAA,EAAA,IAAzBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;AAC7CC,EAAAA,eAAS,CAAC,YAAM;AAAA,IAAA,IAAAC,qBAAA;IACd,IAAI,CAACF,OAAO,EAAE;AACd,IAAA,CAAAE,qBAAA,GAAAC,QAAQ,CAACC,cAAc,CAACL,SAAS,CAAC,MAAA,IAAA,IAAAG,qBAAA,KAAA,MAAA,IAAlCA,qBAAA,CAAoCG,cAAc,EAAE;AACtD,EAAA,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC;AACf,CAAC;;;;;;ACHD,IAAMM,aAAa,GAAG,SAAhBA,aAAaA,CAAAR,IAAA,EAOb;AAAA,EAAA,IANJS,gBAAgB,GAAAT,IAAA,CAAhBS,gBAAgB;IAAAC,SAAA,GAAAV,IAAA,CAChBW,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,SAAA;IAAAE,eAAA,GAAAZ,IAAA,CACTa,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,eAAA;IAClBE,gBAAgB,GAAAd,IAAA,CAAhBc,gBAAgB;IAAAC,iBAAA,GAAAf,IAAA,CAChBgB,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,iBAAA;AACdE,IAAAA,UAAU,GAAAC,wBAAA,CAAAlB,IAAA,EAAAmB,WAAA,CAAA;AAEb,EAAA,IAAQC,iBAAiB,GACvBJ,YAAY,CADNI,iBAAiB;IAAEC,kBAAkB,GAC3CL,YAAY,CADaK,kBAAkB;AAAKC,IAAA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AAC,EAC9BvB,eAAe,CACpB,CAAC;KACC,CACN,EACAuC,QAAQ,IAAIjB,SAAS,iBACpBlD,cAAA,CAACuF,YAAK,EAAArF,aAAA,CAAA;MACJsF,SAAS,EAAA,IAAA;AACTN,MAAAA,KAAK,EAAE1D,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAE0D,KAAM;AACzBhG,MAAAA,IAAI,EAAEsC,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEtC,IAAK;AACvBuG,MAAAA,WAAW,EAAEjE,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEiE,WAAY;AACrCf,MAAAA,GAAG,EAAEJ,QAAS;AACda,MAAAA,IAAI,EAAC,QAAQ;AACb,MAAA,aAAA,EACE3E,mBAAS,CAACgB,UAAU,aAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEkE,UAAU,CAAC,GAC7BlE,UAAU,aAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEkE,UAAU,GACtB,iCACL;MACDC,MAAM,eACJ3F,cAAA,CAACiF,iBAAM,EAAA;AACL,QAAA,aAAA,EAAY,iCAAiC;AAC7CW,QAAAA,IAAI,EAAEC,GAAE;AACRV,QAAAA,IAAI,EAAC,IAAI;AACTC,QAAAA,IAAI,EAAC,QAAQ;AACbN,QAAAA,OAAO,EAAC,OAAO;AACfQ,QAAAA,OAAO,EAAElB;OACV;AACF,KAAA,EACG5C,UAAU,CACf,CACF,EACAlB,QAAQ;AAAA,GACN,CAAC;AAEV;;;;"}
@@ -26,7 +26,7 @@ var useScrollIntoView = function useScrollIntoView(_ref) {
26
26
  };
27
27
 
28
28
  var _excluded$1 = ["enabledCondition", "name", "isDisabled", "switchDataTestid", "tooltipProps"],
29
- _excluded2 = ["enabledSwitchText", "disabledSwitchText"];
29
+ _excluded2$1 = ["enabledSwitchText", "disabledSwitchText"];
30
30
  function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
31
31
  function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
32
32
  var TooltipSwitch = function TooltipSwitch(_ref) {
@@ -41,7 +41,7 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
41
41
  otherProps = _objectWithoutProperties(_ref, _excluded$1);
42
42
  var enabledSwitchText = tooltipProps.enabledSwitchText,
43
43
  disabledSwitchText = tooltipProps.disabledSwitchText,
44
- neetoAtomsTooltipProps = _objectWithoutProperties(tooltipProps, _excluded2);
44
+ neetoAtomsTooltipProps = _objectWithoutProperties(tooltipProps, _excluded2$1);
45
45
  var tooltipContent = enabledCondition ? enabledSwitchText : disabledSwitchText;
46
46
  return /*#__PURE__*/jsx(Tooltip, _objectSpread$1(_objectSpread$1({
47
47
  content: tooltipContent,
@@ -59,7 +59,8 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
59
59
  }));
60
60
  };
61
61
 
62
- var _excluded = ["className"];
62
+ var _excluded = ["className"],
63
+ _excluded2 = ["className"];
63
64
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
64
65
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
65
66
  var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
@@ -88,6 +89,8 @@ var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
88
89
  editButtonProps = _ref$editButtonProps === void 0 ? {} : _ref$editButtonProps,
89
90
  _ref$titleProps = _ref.titleProps,
90
91
  titleProps = _ref$titleProps === void 0 ? {} : _ref$titleProps,
92
+ _ref$descriptionProps = _ref.descriptionProps,
93
+ descriptionProps = _ref$descriptionProps === void 0 ? {} : _ref$descriptionProps,
91
94
  _ref$className = _ref.className,
92
95
  className = _ref$className === void 0 ? "" : _ref$className;
93
96
  var _useTranslation = useTranslation(),
@@ -96,6 +99,8 @@ var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
96
99
  var id = slugify(title);
97
100
  var titleClassName = titleProps.className,
98
101
  otherTitleProps = _objectWithoutProperties(titleProps, _excluded);
102
+ var descriptionClassName = descriptionProps.className,
103
+ otherDescriptionProps = _objectWithoutProperties(descriptionProps, _excluded2);
99
104
  var _useState = useState(false),
100
105
  _useState2 = _slicedToArray(_useState, 2),
101
106
  isEditing = _useState2[0],
@@ -163,12 +168,13 @@ var ToggleFeatureCard = function ToggleFeatureCard(_ref) {
163
168
  "data-testid": isPresent(titleDataTestid) ? titleDataTestid : "toggle-feature-card-title",
164
169
  children: title
165
170
  }))]
166
- }), /*#__PURE__*/jsx(Typography, {
167
- className: "mb-4 whitespace-pre-line",
168
- variant: "body2",
171
+ }), /*#__PURE__*/jsx(Typography, _objectSpread(_objectSpread({
172
+ variant: "body2"
173
+ }, otherDescriptionProps), {}, {
174
+ className: classnames("mb-4 whitespace-pre-line", descriptionClassName),
169
175
  "data-testid": isPresent(descriptionDataTestid) ? descriptionDataTestid : "toggle-feature-card-description",
170
176
  children: description
171
- }), hasInput && !isEditing && /*#__PURE__*/jsxs("div", {
177
+ })), hasInput && !isEditing && /*#__PURE__*/jsxs("div", {
172
178
  className: "m-0 flex flex-row items-center gap-x-2",
173
179
  children: [inputProps === null || inputProps === void 0 ? void 0 : inputProps.display, /*#__PURE__*/jsx(Button, _objectSpread({
174
180
  label: t("neetoMolecules.common.actions.edit"),
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleFeatureCard.js","sources":["../../src/v2/components/ToggleFeatureCard/hooks/useScrollIntoView.js","../../src/v2/components/ToggleFeatureCard/ToolTipSwitch.jsx","../../src/v2/components/ToggleFeatureCard/index.jsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nconst useScrollIntoView = ({ elementId, trigger }) => {\n useEffect(() => {\n if (!trigger) return;\n document.getElementById(elementId)?.scrollIntoView();\n }, [trigger]);\n};\n\nexport default useScrollIntoView;\n","import { Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Switch as FormikSwitch } from \"@bigbinary/neeto-atoms/formik\";\nimport { isPresent } from \"neetocist\";\n\nconst TooltipSwitch = ({\n enabledCondition,\n name = \"\",\n isDisabled = false,\n switchDataTestid,\n tooltipProps = {},\n ...otherProps\n}) => {\n const { enabledSwitchText, disabledSwitchText, ...neetoAtomsTooltipProps } =\n tooltipProps;\n\n const tooltipContent = enabledCondition\n ? enabledSwitchText\n : disabledSwitchText;\n\n return (\n <Tooltip\n content={tooltipContent}\n disabled={!tooltipContent}\n position=\"top\"\n {...neetoAtomsTooltipProps}\n >\n <span>\n <FormikSwitch\n disabled={isDisabled}\n data-testid={\n isPresent(switchDataTestid)\n ? switchDataTestid\n : \"toggle-feature-card-switch\"\n }\n {...{ name, ...otherProps }}\n />\n </span>\n </Tooltip>\n );\n};\n\nexport default TooltipSwitch;\n","import { useRef, useState, useEffect } from \"react\";\n\nimport { Button, Label, Typography } from \"@bigbinary/neeto-atoms\";\nimport { Input } from \"@bigbinary/neeto-atoms/formik\";\nimport classnames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { X } from \"lucide-react\";\nimport { isPresent, slugify } from \"neetocist\";\nimport useOnClickOutside from \"neetocommons/v2/react-utils/useOnClickOutside\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZES } from \"./constants\";\nimport useScrollIntoView from \"./hooks/useScrollIntoView\";\nimport TooltipSwitch from \"./ToolTipSwitch\";\n\nconst ToggleFeatureCard = ({\n isCardStyleEnabled = true,\n title = \"\",\n description = null,\n switchName = \"switch\",\n titleDataTestid = \"\",\n switchDataTestid = \"\",\n descriptionDataTestid = \"\",\n isDisabled = false,\n children = null,\n inputProps,\n switchProps = {},\n editButtonProps = {},\n titleProps = {},\n className = \"\",\n}) => {\n const { t } = useTranslation();\n const cardRef = useRef();\n const id = slugify(title);\n const { className: titleClassName, ...otherTitleProps } = titleProps;\n\n const [isEditing, setIsEditing] = useState(false);\n\n const { setFieldValue, values, submitCount, errors, initialValues } =\n useFormikContext();\n\n useEffect(() => {\n if (!(submitCount >= 1 && isEmpty(errors))) return;\n setIsEditing(false);\n }, [submitCount]);\n\n useEffect(() => {\n if (isEmpty(errors)) return;\n setIsEditing(true);\n }, [values, errors]);\n\n const [shouldHighlight, setShouldHighlight] = useState(\n location.hash.split(\"#\")[1] === id\n );\n\n const hasInput = values?.[switchName] && inputProps?.name;\n const enabledCondition = values?.[switchName];\n\n const handleInputReset = () => {\n setIsEditing(false);\n hasInput &&\n setFieldValue(inputProps?.name, initialValues?.[inputProps?.name]);\n };\n\n useOnClickOutside(cardRef, () => setShouldHighlight(false));\n\n useScrollIntoView({ elementId: id, trigger: shouldHighlight });\n\n const inputRef = useHotkeys(\"enter\", () => setIsEditing(false), {\n mode: \"scoped\",\n });\n\n return (\n <div\n {...{ id }}\n data-testid=\"feature-card-container\"\n ref={cardRef}\n className={classnames(\n \"flex flex-col gap-y-2 rounded-lg\",\n { \"bg-card text-card-foreground border p-4\": isCardStyleEnabled },\n { \"border-border\": isCardStyleEnabled && !shouldHighlight },\n { \"border-primary ring-primary ring-1\": shouldHighlight },\n className\n )}\n >\n <Label className=\"flex flex-row items-center gap-2\">\n <TooltipSwitch\n {...{\n enabledCondition,\n isDisabled,\n switchDataTestid,\n ...switchProps,\n }}\n name={switchName}\n />\n <Typography\n variant=\"h5\"\n {...otherTitleProps}\n as=\"span\"\n className={classnames(\"leading-snug\", titleClassName)}\n data-testid={\n isPresent(titleDataTestid)\n ? titleDataTestid\n : \"toggle-feature-card-title\"\n }\n >\n {title}\n </Typography>\n </Label>\n <Typography\n className=\"mb-4 whitespace-pre-line\"\n variant=\"body2\"\n data-testid={\n isPresent(descriptionDataTestid)\n ? descriptionDataTestid\n : \"toggle-feature-card-description\"\n }\n >\n {description}\n </Typography>\n {hasInput && !isEditing && (\n <div className=\"m-0 flex flex-row items-center gap-x-2\">\n {inputProps?.display}\n <Button\n label={t(\"neetoMolecules.common.actions.edit\")}\n size=\"sm\"\n type=\"button\"\n variant=\"link\"\n data-testid={\n isPresent(inputProps?.editButtonDataTestid)\n ? inputProps?.editButtonDataTestid\n : \"toggle-feature-card-input-display-edit\"\n }\n onClick={() => setIsEditing(true)}\n {...editButtonProps}\n />\n </div>\n )}\n {hasInput && isEditing && (\n <Input\n autoFocus\n label={inputProps?.label}\n name={inputProps?.name}\n placeholder={inputProps?.placeholder}\n ref={inputRef}\n size=\"medium\"\n data-testid={\n isPresent(inputProps?.dataTestid)\n ? inputProps?.dataTestid\n : \"toggle-feature-card-input-field\"\n }\n suffix={\n <Button\n data-testid=\"toggle-feature-card-input-reset\"\n icon={X}\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={handleInputReset}\n />\n }\n {...inputProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nToggleFeatureCard.propTypes = {\n /**\n * The title that will be displayed for the card.\n */\n title: PropTypes.string,\n /**\n * The descripton text for the particular feature or setting.\n */\n description: PropTypes.string,\n /**\n * The formik name of the feature or setting to be toggled. eg:\n {switchName: \"enableEmails\"}.\n */\n switchName: PropTypes.string,\n /**\n * Can be used to disable the toggle switch conditionally.\n */\n isDisabled: PropTypes.bool,\n /**\n * Can be used to enable the card appearance.\n */\n isCardStyleEnabled: PropTypes.bool,\n /**\n * Custom child components to be displayed in the card.\n */\n children: PropTypes.node,\n /**\n * Can be used to add an input field for a setting or a feature.\n For example, `Enable email notifications` card can have an email input field.\n */\n inputProps: PropTypes.shape({\n name: PropTypes.string,\n display: PropTypes.node,\n label: PropTypes.string,\n editButtonTooltip: PropTypes.string,\n editButtonDataTestid: PropTypes.string,\n placeholder: PropTypes.string,\n dataTestid: PropTypes.string,\n onChange: PropTypes.func,\n suffix: PropTypes.node,\n prefix: PropTypes.node,\n className: PropTypes.string,\n nakedInput: PropTypes.bool,\n size: PropTypes.oneOf(Object.values(SIZES)),\n type: PropTypes.string,\n maxLength: PropTypes.number,\n contentSize: PropTypes.number,\n unlimitedChars: PropTypes.bool,\n }),\n /**\n * Can be used to add props to the switch component.\n */\n switchProps: PropTypes.shape({\n onChange: PropTypes.func,\n className: PropTypes.string,\n checked: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n enabledSwitchText: PropTypes.string,\n disabledSwitchText: PropTypes.string,\n }),\n }),\n /**\n * Can be used to add props to the edit button component.\n */\n editButtonProps: PropTypes.shape({\n onClick: PropTypes.func,\n className: PropTypes.string,\n style: PropTypes.string,\n size: PropTypes.string,\n type: PropTypes.string,\n tooltipProps: PropTypes.object,\n }),\n /**\n * Can be used to add props to the title Typography component. eg:\n {titleProps: {variant: \"h6\"}}.\n */\n titleProps: PropTypes.shape({\n variant: PropTypes.string,\n weight: PropTypes.string,\n color: PropTypes.string,\n className: PropTypes.string,\n }),\n /**\n * To specify external classnames as overrides to the ToggleFeatureCard wrapper.\n */\n className: PropTypes.string,\n};\n\nexport default ToggleFeatureCard;\n"],"names":["useScrollIntoView","_ref","elementId","trigger","useEffect","_document$getElementB","document","getElementById","scrollIntoView","TooltipSwitch","enabledCondition","_ref$name","name","_ref$isDisabled","isDisabled","switchDataTestid","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","enabledSwitchText","disabledSwitchText","neetoAtomsTooltipProps","_excluded2","tooltipContent","_jsx","Tooltip","_objectSpread","content","disabled","position","children","FormikSwitch","isPresent","ToggleFeatureCard","_ref$isCardStyleEnabl","isCardStyleEnabled","_ref$title","title","_ref$description","description","_ref$switchName","switchName","_ref$titleDataTestid","titleDataTestid","_ref$switchDataTestid","_ref$descriptionDataT","descriptionDataTestid","_ref$children","inputProps","_ref$switchProps","switchProps","_ref$editButtonProps","editButtonProps","_ref$titleProps","titleProps","_ref$className","className","_useTranslation","useTranslation","t","cardRef","useRef","id","slugify","titleClassName","otherTitleProps","_useState","useState","_useState2","_slicedToArray","isEditing","setIsEditing","_useFormikContext","useFormikContext","setFieldValue","values","submitCount","errors","initialValues","isEmpty","_useState3","location","hash","split","_useState4","shouldHighlight","setShouldHighlight","hasInput","handleInputReset","useOnClickOutside","inputRef","useHotkeys","mode","_jsxs","ref","classnames","Label","Typography","variant","as","display","Button","label","size","type","editButtonDataTestid","onClick","Input","autoFocus","placeholder","dataTestid","suffix","icon","X"],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAA+B;AAAA,EAAA,IAAzBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;AAC7CC,EAAAA,SAAS,CAAC,YAAM;AAAA,IAAA,IAAAC,qBAAA;IACd,IAAI,CAACF,OAAO,EAAE;AACd,IAAA,CAAAE,qBAAA,GAAAC,QAAQ,CAACC,cAAc,CAACL,SAAS,CAAC,MAAA,IAAA,IAAAG,qBAAA,KAAA,MAAA,IA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AAA,IAAI,EAAEC,CAAE;AACRV,QAAAA,IAAI,EAAC,IAAI;AACTC,QAAAA,IAAI,EAAC,QAAQ;AACbN,QAAAA,OAAO,EAAC,OAAO;AACfQ,QAAAA,OAAO,EAAElB;OACV;AACF,KAAA,EACGxC,UAAU,CACf,CACF,EACAlB,QAAQ;AAAA,GACN,CAAC;AAEV;;;;"}
1
+ {"version":3,"file":"ToggleFeatureCard.js","sources":["../../src/v2/components/ToggleFeatureCard/hooks/useScrollIntoView.js","../../src/v2/components/ToggleFeatureCard/ToolTipSwitch.jsx","../../src/v2/components/ToggleFeatureCard/index.jsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nconst useScrollIntoView = ({ elementId, trigger }) => {\n useEffect(() => {\n if (!trigger) return;\n document.getElementById(elementId)?.scrollIntoView();\n }, [trigger]);\n};\n\nexport default useScrollIntoView;\n","import { Tooltip } from \"@bigbinary/neeto-atoms\";\nimport { Switch as FormikSwitch } from \"@bigbinary/neeto-atoms/formik\";\nimport { isPresent } from \"neetocist\";\n\nconst TooltipSwitch = ({\n enabledCondition,\n name = \"\",\n isDisabled = false,\n switchDataTestid,\n tooltipProps = {},\n ...otherProps\n}) => {\n const { enabledSwitchText, disabledSwitchText, ...neetoAtomsTooltipProps } =\n tooltipProps;\n\n const tooltipContent = enabledCondition\n ? enabledSwitchText\n : disabledSwitchText;\n\n return (\n <Tooltip\n content={tooltipContent}\n disabled={!tooltipContent}\n position=\"top\"\n {...neetoAtomsTooltipProps}\n >\n <span>\n <FormikSwitch\n disabled={isDisabled}\n data-testid={\n isPresent(switchDataTestid)\n ? switchDataTestid\n : \"toggle-feature-card-switch\"\n }\n {...{ name, ...otherProps }}\n />\n </span>\n </Tooltip>\n );\n};\n\nexport default TooltipSwitch;\n","import { useRef, useState, useEffect } from \"react\";\n\nimport { Button, Label, Typography } from \"@bigbinary/neeto-atoms\";\nimport { Input } from \"@bigbinary/neeto-atoms/formik\";\nimport classnames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { X } from \"lucide-react\";\nimport { isPresent, slugify } from \"neetocist\";\nimport useOnClickOutside from \"neetocommons/v2/react-utils/useOnClickOutside\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZES } from \"./constants\";\nimport useScrollIntoView from \"./hooks/useScrollIntoView\";\nimport TooltipSwitch from \"./ToolTipSwitch\";\n\nconst ToggleFeatureCard = ({\n isCardStyleEnabled = true,\n title = \"\",\n description = null,\n switchName = \"switch\",\n titleDataTestid = \"\",\n switchDataTestid = \"\",\n descriptionDataTestid = \"\",\n isDisabled = false,\n children = null,\n inputProps,\n switchProps = {},\n editButtonProps = {},\n titleProps = {},\n descriptionProps = {},\n className = \"\",\n}) => {\n const { t } = useTranslation();\n const cardRef = useRef();\n const id = slugify(title);\n const { className: titleClassName, ...otherTitleProps } = titleProps;\n const { className: descriptionClassName, ...otherDescriptionProps } =\n descriptionProps;\n\n const [isEditing, setIsEditing] = useState(false);\n\n const { setFieldValue, values, submitCount, errors, initialValues } =\n useFormikContext();\n\n useEffect(() => {\n if (!(submitCount >= 1 && isEmpty(errors))) return;\n setIsEditing(false);\n }, [submitCount]);\n\n useEffect(() => {\n if (isEmpty(errors)) return;\n setIsEditing(true);\n }, [values, errors]);\n\n const [shouldHighlight, setShouldHighlight] = useState(\n location.hash.split(\"#\")[1] === id\n );\n\n const hasInput = values?.[switchName] && inputProps?.name;\n const enabledCondition = values?.[switchName];\n\n const handleInputReset = () => {\n setIsEditing(false);\n hasInput &&\n setFieldValue(inputProps?.name, initialValues?.[inputProps?.name]);\n };\n\n useOnClickOutside(cardRef, () => setShouldHighlight(false));\n\n useScrollIntoView({ elementId: id, trigger: shouldHighlight });\n\n const inputRef = useHotkeys(\"enter\", () => setIsEditing(false), {\n mode: \"scoped\",\n });\n\n return (\n <div\n {...{ id }}\n data-testid=\"feature-card-container\"\n ref={cardRef}\n className={classnames(\n \"flex flex-col gap-y-2 rounded-lg\",\n { \"bg-card text-card-foreground border p-4\": isCardStyleEnabled },\n { \"border-border\": isCardStyleEnabled && !shouldHighlight },\n { \"border-primary ring-primary ring-1\": shouldHighlight },\n className\n )}\n >\n <Label className=\"flex flex-row items-center gap-2\">\n <TooltipSwitch\n {...{\n enabledCondition,\n isDisabled,\n switchDataTestid,\n ...switchProps,\n }}\n name={switchName}\n />\n <Typography\n variant=\"h5\"\n {...otherTitleProps}\n as=\"span\"\n className={classnames(\"leading-snug\", titleClassName)}\n data-testid={\n isPresent(titleDataTestid)\n ? titleDataTestid\n : \"toggle-feature-card-title\"\n }\n >\n {title}\n </Typography>\n </Label>\n <Typography\n variant=\"body2\"\n {...otherDescriptionProps}\n className={classnames(\"mb-4 whitespace-pre-line\", descriptionClassName)}\n data-testid={\n isPresent(descriptionDataTestid)\n ? descriptionDataTestid\n : \"toggle-feature-card-description\"\n }\n >\n {description}\n </Typography>\n {hasInput && !isEditing && (\n <div className=\"m-0 flex flex-row items-center gap-x-2\">\n {inputProps?.display}\n <Button\n label={t(\"neetoMolecules.common.actions.edit\")}\n size=\"sm\"\n type=\"button\"\n variant=\"link\"\n data-testid={\n isPresent(inputProps?.editButtonDataTestid)\n ? inputProps?.editButtonDataTestid\n : \"toggle-feature-card-input-display-edit\"\n }\n onClick={() => setIsEditing(true)}\n {...editButtonProps}\n />\n </div>\n )}\n {hasInput && isEditing && (\n <Input\n autoFocus\n label={inputProps?.label}\n name={inputProps?.name}\n placeholder={inputProps?.placeholder}\n ref={inputRef}\n size=\"medium\"\n data-testid={\n isPresent(inputProps?.dataTestid)\n ? inputProps?.dataTestid\n : \"toggle-feature-card-input-field\"\n }\n suffix={\n <Button\n data-testid=\"toggle-feature-card-input-reset\"\n icon={X}\n size=\"sm\"\n type=\"button\"\n variant=\"ghost\"\n onClick={handleInputReset}\n />\n }\n {...inputProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nToggleFeatureCard.propTypes = {\n /**\n * The title that will be displayed for the card.\n */\n title: PropTypes.string,\n /**\n * The descripton text for the particular feature or setting.\n */\n description: PropTypes.string,\n /**\n * The formik name of the feature or setting to be toggled. eg:\n {switchName: \"enableEmails\"}.\n */\n switchName: PropTypes.string,\n /**\n * Can be used to disable the toggle switch conditionally.\n */\n isDisabled: PropTypes.bool,\n /**\n * Can be used to enable the card appearance.\n */\n isCardStyleEnabled: PropTypes.bool,\n /**\n * Custom child components to be displayed in the card.\n */\n children: PropTypes.node,\n /**\n * Can be used to add an input field for a setting or a feature.\n For example, `Enable email notifications` card can have an email input field.\n */\n inputProps: PropTypes.shape({\n name: PropTypes.string,\n display: PropTypes.node,\n label: PropTypes.string,\n editButtonTooltip: PropTypes.string,\n editButtonDataTestid: PropTypes.string,\n placeholder: PropTypes.string,\n dataTestid: PropTypes.string,\n onChange: PropTypes.func,\n suffix: PropTypes.node,\n prefix: PropTypes.node,\n className: PropTypes.string,\n nakedInput: PropTypes.bool,\n size: PropTypes.oneOf(Object.values(SIZES)),\n type: PropTypes.string,\n maxLength: PropTypes.number,\n contentSize: PropTypes.number,\n unlimitedChars: PropTypes.bool,\n }),\n /**\n * Can be used to add props to the switch component.\n */\n switchProps: PropTypes.shape({\n onChange: PropTypes.func,\n className: PropTypes.string,\n checked: PropTypes.bool,\n tooltipProps: PropTypes.shape({\n enabledSwitchText: PropTypes.string,\n disabledSwitchText: PropTypes.string,\n }),\n }),\n /**\n * Can be used to add props to the edit button component.\n */\n editButtonProps: PropTypes.shape({\n onClick: PropTypes.func,\n className: PropTypes.string,\n style: PropTypes.string,\n size: PropTypes.string,\n type: PropTypes.string,\n tooltipProps: PropTypes.object,\n }),\n /**\n * Can be used to add props to the title Typography component. eg:\n {titleProps: {variant: \"h6\"}}.\n */\n titleProps: PropTypes.shape({\n variant: PropTypes.string,\n weight: PropTypes.string,\n color: PropTypes.string,\n className: PropTypes.string,\n }),\n /**\n * Can be used to add props to the description Typography component. eg:\n {descriptionProps: {color: \"muted\"}}.\n */\n descriptionProps: PropTypes.shape({\n variant: PropTypes.string,\n weight: PropTypes.string,\n color: PropTypes.string,\n className: PropTypes.string,\n }),\n /**\n * To specify external classnames as overrides to the ToggleFeatureCard wrapper.\n */\n className: PropTypes.string,\n};\n\nexport default ToggleFeatureCard;\n"],"names":["useScrollIntoView","_ref","elementId","trigger","useEffect","_document$getElementB","document","getElementById","scrollIntoView","TooltipSwitch","enabledCondition","_ref$name","name","_ref$isDisabled","isDisabled","switchDataTestid","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","enabledSwitchText","disabledSwitchText","neetoAtomsTooltipProps","_excluded2","tooltipContent","_jsx","Tooltip","_objectSpread","content","disabled","position","children","FormikSwitch","isPresent","ToggleFeatureCard","_ref$isCardStyleEnabl","isCardStyleEnabled","_ref$title","title","_ref$description","description","_ref$switchName","switchName","_ref$titleDataTestid","titleDataTestid","_ref$switchDataTestid","_ref$descriptionDataT","descriptionDataTestid","_ref$children","inputProps","_ref$switchProps","switchProps","_ref$editButtonProps","editButtonProps","_ref$titleProps","titleProps","_ref$descriptionProps","descriptionProps","_ref$className","className","_useTranslation","useTranslation","t","cardRef","useRef","id","slugify","titleClassName","otherTitleProps","descriptionClassName","otherDescriptionProps","_useState","useState","_useState2","_slicedToArray","isEditing","setIsEditing","_useFormikContext","useFormikContext","setFieldValue","values","submitCount","errors","initialValues","isEmpty","_useState3","location","hash","split","_useState4","shouldHighlight","setShouldHighlight","hasInput","handleInputReset","useOnClickOutside","inputRef","useHotkeys","mode","_jsxs","ref","classnames","Label","Typography","variant","as","display","Button","label","size","type","editButtonDataTestid","onClick","Input","autoFocus","placeholder","dataTestid","suffix","icon","X"],"mappings":";;;;;;;;;;;;;;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAA+B;AAAA,EAAA,IAAzBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;AAC7CC,EAAA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AEsC,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEtC,IAAK;AACvBuG,MAAAA,WAAW,EAAEjE,UAAU,KAAA,IAAA,IAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEiE,WAAY;AACrCf,MAAAA,GAAG,EAAEJ,QAAS;AACda,MAAAA,IAAI,EAAC,QAAQ;AACb,MAAA,aAAA,EACE3E,SAAS,CAACgB,UAAU,aAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEkE,UAAU,CAAC,GAC7BlE,UAAU,aAAVA,UAAU,KAAA,MAAA,GAAA,MAAA,GAAVA,UAAU,CAAEkE,UAAU,GACtB,iCACL;MACDC,MAAM,eACJ3F,GAAA,CAACiF,MAAM,EAAA;AACL,QAAA,aAAA,EAAY,iCAAiC;AAC7CW,QAAAA,IAAI,EAAEC,CAAE;AACRV,QAAAA,IAAI,EAAC,IAAI;AACTC,QAAAA,IAAI,EAAC,QAAQ;AACbN,QAAAA,OAAO,EAAC,OAAO;AACfQ,QAAAA,OAAO,EAAElB;OACV;AACF,KAAA,EACG5C,UAAU,CACf,CACF,EACAlB,QAAQ;AAAA,GACN,CAAC;AAEV;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "5.2.22",
3
+ "version": "5.2.24",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -537,18 +537,18 @@
537
537
  }
538
538
  },
539
539
  "text": {
540
- "invitedUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أضاف</Semibold> <Code>{{emailList}}</Code> إلى {{productSuffix, anyCase}}.",
541
- "invitedUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حاول</Semibold> دعوة مستخدم {{productSuffix, anyCase}}{{errorMessage}}.",
542
- "userSignedUp": "<Bold>{{userIdentifier}}</Bold> <Semibold>سجل</Semibold> في {{productSuffix, anyCase}}.",
543
- "updatedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>غير</Semibold> <Code>{{affectedUser}}'s</Code> <ChangedFields></ChangedFields> في {{productSuffix, anyCase}}.",
544
- "bulkUpdateUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold>: <Code>{{emailList}}</Code> في {{productSuffix, anyCase}}.",
545
- "bulkUpdateUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold> في {{productSuffix, anyCase}}{{errorMessage}}.",
546
- "updatedUserProfile": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>غير</Semibold> <ChangedFields></ChangedFields> في {{productSuffix, anyCase}}.",
547
- "createdRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أنشأ</Semibold> <Code>{{roleName}}</Code> دور في {{productSuffix, anyCase}}.",
540
+ "invitedUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أضاف</Semibold> <Code>{{emailList}}</Code>.",
541
+ "invitedUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حاول</Semibold> دعوة مستخدم {{errorMessage}}.",
542
+ "userSignedUp": "<Bold>{{userIdentifier,anyCase}}</Bold> <Semibold>سجل</Semibold>.",
543
+ "updatedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>غير</Semibold> <Code>{{affectedUser}}'s</Code> <ChangedFields></ChangedFields>.",
544
+ "bulkUpdateUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold>: <Code>{{emailList}}</Code>.",
545
+ "bulkUpdateUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold> {{errorMessage}}.",
546
+ "updatedUserProfile": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>غير</Semibold> <ChangedFields></ChangedFields>.",
547
+ "createdRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أنشأ</Semibold> <Code>{{roleName}}</Code> دور.",
548
548
  "updatedRole_other": "{{performedBy, anyCase}} <Semibold>حدث</Semibold> <Code>{{roleName}}</Code> دورًا مع <Code>{{addedPermissionsText}}</Code> الأذونات في {{productSuffix, anyCase}}",
549
549
  "updatedRole_one": "{{performedBy, anyCase}} <Semibold>حدث</Semibold> <Code>{{roleName}}</Code> دورًا مع <Code>{{addedPermissionsText}}</Code> الإذن في {{productSuffix, anyCase}}",
550
- "deletedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حذف</Semibold> <Code>{{roleName}}</Code> دور في {{productSuffix, anyCase}}.",
551
- "performedAction": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>نفذ</Semibold> إجراء على {{productSuffix, anyCase}}.",
550
+ "deletedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حذف</Semibold> <Code>{{roleName}}</Code> دور.",
551
+ "performedAction": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>نفذ</Semibold> إجراء.",
552
552
  "updatedFieldsWithPreviousValue": "<Semibold>{{field}}</Semibold> من <Code>{{from, anyCase}}</Code> إلى <Code>{{to, anyCase}}</Code>",
553
553
  "updatedFieldsWithNewValue": "<Semibold>{{field}}</Semibold> إلى <Code>{{to, anyCase}}</Code>",
554
554
  "connectedGoogleCalender": "{{performedBy, anyCase}} <Semibold>تم الاتصال بـ Google Calendar</Semibold> باستخدام <Code>{{emailAddress}}</Code>.",
@@ -559,15 +559,15 @@
559
559
  "disconnectedZoomAccount": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>غير متصل بدمج Zoom</Semibold> في {{productSuffix, anyCase}}.",
560
560
  "connectedCustomDomain": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>متصل بالنطاق المخصص:</Semibold> <Code>{{hostname, anyCase}}</Code> على {{productSuffix, anyCase}}.",
561
561
  "updatedFields": "<Semibold>{{field}}</Semibold>",
562
- "updatedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حدّث</Semibold> <Code>{{roleName}}</Code> دور في {{productSuffix, anyCase}}.",
563
- "updatedRoleName": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أعاد تسمية</Semibold> <Code>{{name.from}}</Code> دور إلى <Code>{{name.to}}</Code> في {{productSuffix, anyCase}}.",
564
- "addedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أضاف</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) إلى <Code>{{roleName}}</Code> دور في {{productSuffix, anyCase}}.",
565
- "removedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أزال</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) من <Code>{{roleName}}</Code> دور في {{productSuffix, anyCase}}.",
566
- "modifiedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أضاف</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) و <Semibold>أزال</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) من <Code>{{roleName}}</Code> دور في {{productSuffix, anyCase}}.",
562
+ "updatedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حدث</Semibold> <Code>{{roleName}}</Code> دور.",
563
+ "updatedRoleName": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>إعادة تسمية</Semibold> <Code>{{name.from}}</Code> دور إلى <Code>{{name.to}}</Code>.",
564
+ "addedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أضاف</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) إلى <Code>{{roleName}}</Code> دور.",
565
+ "removedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أزال</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) من <Code>{{roleName}}</Code> دور.",
566
+ "modifiedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أضاف</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) و<Semibold>أزال</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) من <Code>{{roleName}}</Code> دور.",
567
567
  "createdApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أنشأ</Semibold> مفتاح API مع التسمية <Semibold>{{label, anyCase}}</Semibold> في {{productSuffix, anyCase}}.",
568
568
  "deletedApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حذف</Semibold> مفتاح API مع التسمية <Semibold>{{label, anyCase}}</Semibold> في {{productSuffix, anyCase}}.",
569
569
  "updatedApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>حدّث</Semibold> مفتاح API مع التسمية <Semibold>{{label, anyCase}}</Semibold> في {{productSuffix, anyCase}}.",
570
- "removedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أزال</Semibold> <Code>{{affectedUser}}</Code> من {{productSuffix, anyCase}}.",
570
+ "removedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>أزال</Semibold> <Code>{{affectedUser}}</Code>.",
571
571
  "googleDisconnectedGoogleCalendar": "جوجل <Semibold>فصل تقويم جوجل</Semibold> لـ <Code>{{emailAddress}}</Code> (متصل بواسطة {{performedBy, anyCase}}).",
572
572
  "connectedGoogleMeet": "{{performedBy, anyCase}} <Semibold>متصل بجوجل ميت</Semibold> باستخدام <Code>{{emailAddress}}</Code>.",
573
573
  "disconnectedGoogleMeet": "{{performedBy, anyCase}} <Semibold>فصل جوجل ميت</Semibold> لـ <Code>{{emailAddress}}</Code>.",
@@ -590,7 +590,8 @@
590
590
  "integrationDisconnectedOnBehalf": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>منفصل {{integrationName, anyCase}}</Semibold> نيابةً عن <Code>{{integrationOwner, anyCase}}</Code> باستخدام <Code>{{detail, anyCase}}</Code>.",
591
591
  "integrationDisconnectedOnBehalfWithoutDetail": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>منفصل {{integrationName, anyCase}}</Semibold> نيابةً عن <Code>{{integrationOwner, anyCase}}</Code>.",
592
592
  "integrationDisconnectedByProvider": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>منفصل</Semibold> من أجل <Code>{{detail, anyCase}}</Code> (متصل بواسطة {{performedBy, anyCase}}).",
593
- "integrationDisconnectedByProviderWithoutDetail": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>منفصل</Semibold> (متصل بواسطة {{performedBy, anyCase}})."
593
+ "integrationDisconnectedByProviderWithoutDetail": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>منفصل</Semibold> (متصل بواسطة {{performedBy, anyCase}}).",
594
+ "userLoggedIn": "<Bold>{{userIdentifier,anyCase}}</Bold> <Semibold>سجل الدخول عبر</Semibold> <Code>{{loginMethod,anyCase}}</Code> من <Code>{{ipAddress}}</Code> باستخدام <Code>{{userAgent,anyCase}}</Code>."
594
595
  }
595
596
  },
596
597
  "ipRestriction": {
@@ -548,18 +548,18 @@
548
548
  "noData": "Няма налични журнали за одит за показване.",
549
549
  "noError": "Детайлите на грешката не са налични. Моля, проверете журналите за повече информация.",
550
550
  "text": {
551
- "invitedUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>добави</Semibold> <Code>{{emailList}}</Code> към {{productSuffix, anyCase}}.",
552
- "invitedUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>опита</Semibold> да поканя потребител {{productSuffix, anyCase}}{{errorMessage}}.",
553
- "userSignedUp": "<Bold>{{userIdentifier}}</Bold> <Semibold>се записа</Semibold> в {{productSuffix, anyCase}}.",
554
- "updatedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>промени</Semibold> <Code>{{affectedUser}}'s</Code> <ChangedFields></ChangedFields> в {{productSuffix, anyCase}}.",
555
- "bulkUpdateUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold>: <Code>{{emailList}}</Code> на {{productSuffix, anyCase}}.",
556
- "bulkUpdateUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold> в {{productSuffix, anyCase}}{{errorMessage}}.",
557
- "updatedUserProfile": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>промени</Semibold> <ChangedFields></ChangedFields> в {{productSuffix, anyCase}}.",
558
- "createdRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>създаде</Semibold> <Code>{{roleName}}</Code> роля в {{productSuffix, anyCase}}.",
551
+ "invitedUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>добави</Semibold> <Code>{{emailList}}</Code>.",
552
+ "invitedUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>опита</Semibold> да покани потребител {{errorMessage}}.",
553
+ "userSignedUp": "<Bold>{{userIdentifier,anyCase}}</Bold> <Semibold>се записа</Semibold>.",
554
+ "updatedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>промени</Semibold> <Code>{{affectedUser}}'s</Code> <ChangedFields></ChangedFields>.",
555
+ "bulkUpdateUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold>: <Code>{{emailList}}</Code>.",
556
+ "bulkUpdateUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold> {{errorMessage}}.",
557
+ "updatedUserProfile": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>промени</Semibold> <ChangedFields></ChangedFields>.",
558
+ "createdRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>създаде</Semibold> <Code>{{roleName}}</Code> роля.",
559
559
  "updatedRole_other": "{{performedBy, anyCase}} <Semibold>актуализира</Semibold> <Code>{{roleName}}</Code> роля с <Code>{{addedPermissionsText}}</Code> права на {{productSuffix, anyCase}}",
560
560
  "updatedRole_one": "{{performedBy, anyCase}} <Semibold>актуализира</Semibold> <Code>{{roleName}}</Code> роля с <Code>{{addedPermissionsText}}</Code> право на {{productSuffix, anyCase}}",
561
- "deletedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>изтри</Semibold> <Code>{{roleName}}</Code> роля в {{productSuffix, anyCase}}.",
562
- "performedAction": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>изпълни</Semibold> действие на {{productSuffix, anyCase}}.",
561
+ "deletedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>изтри</Semibold> <Code>{{roleName}}</Code> роля.",
562
+ "performedAction": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>извърши</Semibold> действие.",
563
563
  "updatedFieldsWithPreviousValue": "<Semibold>{{field}}</Semibold> от <Code>{{from, anyCase}}</Code> на <Code>{{to, anyCase}}</Code>",
564
564
  "updatedFieldsWithNewValue": "<Semibold>{{field}}</Semibold> на <Code>{{to, anyCase}}</Code>",
565
565
  "connectedGoogleCalender": "{{performedBy, anyCase}} <Semibold>свързан Google Calendar</Semibold> с <Code>{{emailAddress}}</Code>.",
@@ -570,15 +570,15 @@
570
570
  "disconnectedZoomAccount": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>изключи интеграцията Zoom</Semibold> на {{productSuffix, anyCase}}.",
571
571
  "connectedCustomDomain": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>се свърза с персонален домейн:</Semibold> <Code>{{hostname, anyCase}}</Code> на {{productSuffix, anyCase}}.",
572
572
  "updatedFields": "<Semibold>{{field}}</Semibold>",
573
- "updatedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>актуализира</Semibold> <Code>{{roleName}}</Code> роля в {{productSuffix, anyCase}}.",
574
- "updatedRoleName": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>преименува</Semibold> <Code>{{name.from}}</Code> роля на <Code>{{name.to}}</Code> в {{productSuffix, anyCase}}.",
575
- "addedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>добави</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) към <Code>{{roleName}}</Code> роля в {{productSuffix, anyCase}}.",
576
- "removedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>изтри</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) от <Code>{{roleName}}</Code> роля в {{productSuffix, anyCase}}.",
577
- "modifiedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>добави</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) и <Semibold>изтри</Semibold> {{__XL OPEN_Code}}{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) от <Code>{{roleName}}</Code> роля в {{productSuffix, anyCase}}.",
573
+ "updatedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>актуализира</Semibold> <Code>{{roleName}}</Code> роля.",
574
+ "updatedRoleName": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>преименува</Semibold> <Code>{{name.from}}</Code> роля на <Code>{{name.to}}</Code>.",
575
+ "addedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>добави</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) на <Code>{{roleName}}</Code> роля.",
576
+ "removedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>отстрани</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) от <Code>{{roleName}}</Code> роля.",
577
+ "modifiedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>добави</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) и <Semibold>отстрани</Semibold> {{__XL OPEN_Code}}{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) от <Code>{{roleName}}</Code> роля.",
578
578
  "createdApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>създаде</Semibold> API ключ с етикет <Semibold>{{label, anyCase}}</Semibold> на {{productSuffix, anyCase}}.",
579
579
  "deletedApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>изтри</Semibold> API ключ с етикет <Semibold>{{label, anyCase}}</Semibold> на {{productSuffix, anyCase}}.",
580
580
  "updatedApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>актуализира</Semibold> API ключ с етикет <Semibold>{{label, anyCase}}</Semibold> на {{productSuffix, anyCase}}.",
581
- "removedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>изтри</Semibold> <Code>{{affectedUser}}</Code> от {{productSuffix, anyCase}}.",
581
+ "removedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>отстрани</Semibold> <Code>{{affectedUser}}</Code>.",
582
582
  "googleDisconnectedGoogleCalendar": "Google <Semibold>прекъснат Google Calendar</Semibold> за <Code>{{emailAddress}}</Code> (прекъснат от {{performedBy, anyCase}}).",
583
583
  "connectedGoogleMeet": "{{performedBy, anyCase}} <Semibold>свързан Google Meet</Semibold> с <Code>{{emailAddress}}</Code>.",
584
584
  "disconnectedGoogleMeet": "{{performedBy, anyCase}} <Semibold>прекъснат Google Meet</Semibold> за <Code>{{emailAddress}}</Code>.",
@@ -601,7 +601,8 @@
601
601
  "integrationDisconnectedOnBehalf": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>отключи {{integrationName, anyCase}}</Semibold> от името на <Code>{{integrationOwner, anyCase}}</Code> с помощта на <Code>{{detail, anyCase}}</Code>.",
602
602
  "integrationDisconnectedOnBehalfWithoutDetail": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>отключи {{integrationName, anyCase}}</Semibold> от името на <Code>{{integrationOwner, anyCase}}</Code>.",
603
603
  "integrationDisconnectedByProvider": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>отключи</Semibold> за <Code>{{detail, anyCase}}</Code> (свързан от {{performedBy, anyCase}}).",
604
- "integrationDisconnectedByProviderWithoutDetail": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>отключи</Semibold> (свързан от {{performedBy, anyCase}})."
604
+ "integrationDisconnectedByProviderWithoutDetail": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>отключи</Semibold> (свързан от {{performedBy, anyCase}}).",
605
+ "userLoggedIn": "<Bold>{{userIdentifier,anyCase}}</Bold> <Semibold>влезе чрез</Semibold> <Code>{{loginMethod,anyCase}}</Code> от <Code>{{ipAddress}}</Code> с помощта на <Code>{{userAgent,anyCase}}</Code>."
605
606
  }
606
607
  },
607
608
  "ipRestriction": {
@@ -537,18 +537,18 @@
537
537
  }
538
538
  },
539
539
  "text": {
540
- "invitedUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha afegit</Semibold> <Code>{{emailList}}</Code> a {{productSuffix, anyCase}}.",
541
- "invitedUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha intentat</Semibold> convidar un usuari {{productSuffix, anyCase}}{{errorMessage}}.",
542
- "userSignedUp": "<Bold>{{userIdentifier}}</Bold> <Semibold>s'ha inscrit</Semibold> a {{productSuffix, anyCase}}.",
543
- "updatedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha canviat</Semibold> <Code>{{affectedUser}}'s</Code> <ChangedFields></ChangedFields> a {{productSuffix, anyCase}}.",
544
- "bulkUpdateUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold>: <Code>{{emailList}}</Code> a {{productSuffix, anyCase}}.",
545
- "bulkUpdateUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold> a {{productSuffix, anyCase}}{{errorMessage}}.",
546
- "updatedUserProfile": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha canviat</Semibold> <ChangedFields></ChangedFields> a {{productSuffix, anyCase}}.",
547
- "createdRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha creat</Semibold> <Code>{{roleName}}</Code> rol a {{productSuffix, anyCase}}.",
540
+ "invitedUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha afegit</Semibold> <Code>{{emailList}}</Code>.",
541
+ "invitedUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha intentat</Semibold> convidar un usuari {{errorMessage}}.",
542
+ "userSignedUp": "<Bold>{{userIdentifier,anyCase}}</Bold> <Semibold>s'ha registrat</Semibold>.",
543
+ "updatedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha canviat</Semibold> <Code>{{affectedUser}}'s</Code> <ChangedFields></ChangedFields>.",
544
+ "bulkUpdateUsers": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold>: <Code>{{emailList}}</Code>.",
545
+ "bulkUpdateUsersFailed": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>{{message}}</Semibold> {{errorMessage}}.",
546
+ "updatedUserProfile": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha canviat</Semibold> <ChangedFields></ChangedFields>.",
547
+ "createdRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha creat</Semibold> <Code>{{roleName}}</Code> paper.",
548
548
  "updatedRole_other": "{{performedBy, anyCase}} <Semibold>ha actualitzat</Semibold> <Code>{{roleName}}</Code> rol amb <Code>{{addedPermissionsText}}</Code> permisos a {{productSuffix, anyCase}}",
549
549
  "updatedRole_one": "{{performedBy, anyCase}} <Semibold>ha actualitzat</Semibold> <Code>{{roleName}}</Code> rol amb <Code>{{addedPermissionsText}}</Code> permís a {{productSuffix, anyCase}}",
550
- "deletedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha eliminat</Semibold> <Code>{{roleName}}</Code> rol a {{productSuffix, anyCase}}.",
551
- "performedAction": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha realitzat</Semibold> una acció a {{productSuffix, anyCase}}.",
550
+ "deletedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha eliminat</Semibold> <Code>{{roleName}}</Code> paper.",
551
+ "performedAction": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha realitzat</Semibold> una acció.",
552
552
  "updatedFieldsWithPreviousValue": "<Semibold>{{field}}</Semibold> de <Code>{{from, anyCase}}</Code> a <Code>{{to, anyCase}}</Code>",
553
553
  "updatedFieldsWithNewValue": "<Semibold>{{field}}</Semibold> a <Code>{{to, anyCase}}</Code>",
554
554
  "connectedGoogleCalender": "{{performedBy, anyCase}} <Semibold>ha connectat Google Calendar</Semibold> utilitzant <Code>{{emailAddress}}</Code>.",
@@ -559,15 +559,15 @@
559
559
  "disconnectedZoomAccount": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha desconnectat la integració de Zoom</Semibold> a {{productSuffix, anyCase}}.",
560
560
  "connectedCustomDomain": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>connectat al domini personalitzat:</Semibold> <Code>{{hostname, anyCase}}</Code> el {{productSuffix, anyCase}}.",
561
561
  "updatedFields": "<Semibold>{{field}}</Semibold>",
562
- "updatedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha actualitzat</Semibold> <Code>{{roleName}}</Code> rol a {{productSuffix, anyCase}}.",
563
- "updatedRoleName": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha renomé</Semibold> <Code>{{name.from}}</Code> rol a <Code>{{name.to}}</Code> a {{productSuffix, anyCase}}.",
564
- "addedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha afegit</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) a <Code>{{roleName}}</Code> rol a {{productSuffix, anyCase}}.",
565
- "removedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha eliminat</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) de <Code>{{roleName}}</Code> rol a {{productSuffix, anyCase}}.",
566
- "modifiedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha afegit</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) i <Semibold>ha eliminat</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) de <Code>{{roleName}}</Code> rol a {{productSuffix, anyCase}}.",
562
+ "updatedRole": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha actualitzat</Semibold> <Code>{{roleName}}</Code> paper.",
563
+ "updatedRoleName": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha renombrat</Semibold> <Code>{{name.from}}</Code> paper a <Code>{{name.to}}</Code>.",
564
+ "addedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha afegit</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) a <Code>{{roleName}}</Code> paper.",
565
+ "removedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha eliminat</Semibold> <Code>{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) de <Code>{{roleName}}</Code> paper.",
566
+ "modifiedRolePermission": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha afegit</Semibold> <Code>{{addedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{addedPermissionsCount}} }) i <Semibold>ha eliminat</Semibold> {{__XL OPEN_Code}}{{removedPermissionsText}}</Code> $t(neetoMolecules.common.permission, {\"count\": {{removedPermissionsCount}} }) de <Code>{{roleName}}</Code> paper.",
567
567
  "createdApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha creat</Semibold> una clau d'API amb etiqueta <Semibold>{{label, anyCase}}</Semibold> a {{productSuffix, anyCase}}.",
568
568
  "deletedApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha eliminat</Semibold> una clau d'API amb etiqueta <Semibold>{{label, anyCase}}</Semibold> a {{productSuffix, anyCase}}.",
569
569
  "updatedApiKey": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha actualitzat</Semibold> una clau d'API amb etiqueta <Semibold>{{label, anyCase}}</Semibold> a {{productSuffix, anyCase}}.",
570
- "removedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha eliminat</Semibold> <Code>{{affectedUser}}</Code> de {{productSuffix, anyCase}}.",
570
+ "removedUser": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>ha eliminat</Semibold> <Code>{{affectedUser}}</Code>.",
571
571
  "googleDisconnectedGoogleCalendar": "Google <Semibold>desconnectat Google Calendar</Semibold> per <Code>{{emailAddress}}</Code> (conectat per {{performedBy, anyCase}}).",
572
572
  "connectedGoogleMeet": "{{performedBy, anyCase}} <Semibold>connectat Google Meet</Semibold> utilitzant <Code>{{emailAddress}}</Code>.",
573
573
  "disconnectedGoogleMeet": "{{performedBy, anyCase}} <Semibold>desconnectat Google Meet</Semibold> per <Code>{{emailAddress}}</Code>.",
@@ -590,7 +590,8 @@
590
590
  "integrationDisconnectedOnBehalf": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>desconnectat {{integrationName, anyCase}}</Semibold> per <Code>{{integrationOwner, anyCase}}</Code> utilitzant <Code>{{detail, anyCase}}</Code>.",
591
591
  "integrationDisconnectedOnBehalfWithoutDetail": "<Bold>{{performedBy, anyCase}}</Bold> <Semibold>desconnectat {{integrationName, anyCase}}</Semibold> per <Code>{{integrationOwner, anyCase}}</Code>.",
592
592
  "integrationDisconnectedByProvider": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>desconnectat</Semibold> per <Code>{{detail, anyCase}}</Code> (connectat per {{performedBy, anyCase}}).",
593
- "integrationDisconnectedByProviderWithoutDetail": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>desconnectat</Semibold> (connectat per {{performedBy, anyCase}})."
593
+ "integrationDisconnectedByProviderWithoutDetail": "<Bold>{{integrationName, anyCase}}</Bold> <Semibold>desconnectat</Semibold> (connectat per {{performedBy, anyCase}}).",
594
+ "userLoggedIn": "<Bold>{{userIdentifier,anyCase}}</Bold> <Semibold>ha iniciat sessió a través de</Semibold> <Code>{{loginMethod,anyCase}}</Code> des de <Code>{{ipAddress}}</Code> utilitzant <Code>{{userAgent,anyCase}}</Code>."
594
595
  }
595
596
  },
596
597
  "ipRestriction": {