@coorpacademy/components 11.35.2-forcedeploy2.15 → 11.35.3-forcedeploy3.1

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 (65) hide show
  1. package/es/molecule/icon-preview/index.d.ts.map +1 -1
  2. package/es/molecule/icon-preview/index.js +2 -1
  3. package/es/molecule/icon-preview/index.js.map +1 -1
  4. package/es/molecule/icon-preview/style.css +4 -0
  5. package/es/molecule/translation-modal/index.d.ts +1 -0
  6. package/es/molecule/translation-modal/index.d.ts.map +1 -1
  7. package/es/molecule/translation-modal/index.js +7 -24
  8. package/es/molecule/translation-modal/index.js.map +1 -1
  9. package/es/organism/list-items/style.css +0 -1
  10. package/es/organism/skill-edition/index.d.ts +52 -1261
  11. package/es/organism/skill-edition/index.d.ts.map +1 -1
  12. package/es/organism/skill-edition/index.js +224 -3
  13. package/es/organism/skill-edition/index.js.map +1 -1
  14. package/es/organism/skill-edition/types.d.ts +117 -1268
  15. package/es/organism/skill-edition/types.d.ts.map +1 -1
  16. package/es/organism/skill-edition/types.js +59 -7
  17. package/es/organism/skill-edition/types.js.map +1 -1
  18. package/es/template/back-office/brand-update/index.d.ts +867 -1416
  19. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  20. package/es/template/back-office/brand-update/index.js +12 -0
  21. package/es/template/back-office/brand-update/index.js.map +1 -1
  22. package/lib/molecule/icon-preview/index.d.ts.map +1 -1
  23. package/lib/molecule/icon-preview/index.js +2 -1
  24. package/lib/molecule/icon-preview/index.js.map +1 -1
  25. package/lib/molecule/icon-preview/style.css +4 -0
  26. package/lib/molecule/translation-modal/index.d.ts +1 -0
  27. package/lib/molecule/translation-modal/index.d.ts.map +1 -1
  28. package/lib/molecule/translation-modal/index.js +6 -23
  29. package/lib/molecule/translation-modal/index.js.map +1 -1
  30. package/lib/organism/list-items/style.css +0 -1
  31. package/lib/organism/skill-edition/index.d.ts +52 -1261
  32. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  33. package/lib/organism/skill-edition/index.js +224 -3
  34. package/lib/organism/skill-edition/index.js.map +1 -1
  35. package/lib/organism/skill-edition/types.d.ts +117 -1268
  36. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  37. package/lib/organism/skill-edition/types.js +59 -7
  38. package/lib/organism/skill-edition/types.js.map +1 -1
  39. package/lib/template/back-office/brand-update/index.d.ts +867 -1416
  40. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  41. package/lib/template/back-office/brand-update/index.js +12 -0
  42. package/lib/template/back-office/brand-update/index.js.map +1 -1
  43. package/locales/bs/global.json +1 -0
  44. package/locales/de/global.json +1 -0
  45. package/locales/es/global.json +1 -0
  46. package/locales/et/global.json +1 -0
  47. package/locales/fi/global.json +1 -0
  48. package/locales/fr/global.json +1 -0
  49. package/locales/hu/global.json +1 -0
  50. package/locales/hy/global.json +1 -0
  51. package/locales/ja/global.json +1 -0
  52. package/locales/nl/global.json +1 -0
  53. package/locales/pl/global.json +1 -0
  54. package/locales/pt/global.json +1 -0
  55. package/locales/ro/global.json +1 -0
  56. package/locales/sk/global.json +1 -0
  57. package/locales/sl/global.json +1 -0
  58. package/locales/sv/global.json +1 -0
  59. package/locales/tl/global.json +1 -0
  60. package/locales/tr/global.json +1 -0
  61. package/locales/uk/global.json +1 -0
  62. package/locales/vi/global.json +1 -0
  63. package/locales/zh/global.json +1 -0
  64. package/locales/zh_TW/global.json +1 -0
  65. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-preview/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAGpD,QAAA,MAAM,WAAW;YAAW,gBAAgB;;;;;;;;CAyB3C,CAAC;AAIF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/icon-preview/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAGpD,QAAA,MAAM,WAAW;YAAW,gBAAgB;;;;;;;;CA2B3C,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -26,7 +26,8 @@ const IconPreview = props => {
26
26
  },
27
27
  gradientBackground: true
28
28
  })), /*#__PURE__*/React.createElement("div", {
29
- className: style.titleWrapper
29
+ className: style.titleWrapper,
30
+ title: title
30
31
  }, title)));
31
32
  };
32
33
  IconPreview.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","FaIcon","createGradientBackground","propTypes","style","IconPreview","props","icon","title","createElement","className","iconPreviewWrapper","background","color","iconPreview","iconWrapper","iconName","name","iconColor","size","faSize","wrapperSize","gradientBackground","titleWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/icon-preview/index.tsx"],"sourcesContent":["import React from 'react';\nimport FaIcon from '../../atom/icon';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport propTypes, {IconPreviewProps} from './types';\nimport style from './style.css';\n\nconst IconPreview = (props: IconPreviewProps) => {\n const {icon, title} = props;\n return (\n <div\n className={style.iconPreviewWrapper}\n style={{background: createGradientBackground(icon.color, '93%', '100%')}}\n >\n <div className={style.iconPreview}>\n <div className={style.iconWrapper}>\n <FaIcon\n {...{\n iconName: icon.name,\n iconColor: icon.color,\n size: {\n faSize: 36,\n wrapperSize: 80\n },\n gradientBackground: true\n }}\n />\n </div>\n <div className={style.titleWrapper}>{title}</div>\n </div>\n </div>\n );\n};\n\nIconPreview.propTypes = propTypes;\n\nexport default IconPreview;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,SAAS,MAA0B,SAAS;AACnD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EAC/C,MAAM;IAACC,IAAI;IAAEC;EAAK,CAAC,GAAGF,KAAK;EAC3B,oBACEN,KAAA,CAAAS,aAAA;IACEC,SAAS,EAAEN,KAAK,CAACO,kBAAmB;IACpCP,KAAK,EAAE;MAACQ,UAAU,EAAEV,wBAAwB,CAACK,IAAI,CAACM,KAAK,EAAE,KAAK,EAAE,MAAM;IAAC;EAAE,gBAEzEb,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACU;EAAY,gBAChCd,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACW;EAAY,gBAChCf,KAAA,CAAAS,aAAA,CAACR,MAAM;IAEHe,QAAQ,EAAET,IAAI,CAACU,IAAI;IACnBC,SAAS,EAAEX,IAAI,CAACM,KAAK;IACrBM,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE;IACf,CAAC;IACDC,kBAAkB,EAAE;EAAI,CAE3B,CACE,CAAC,eACNtB,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACmB;EAAa,GAAEf,KAAW,CAC7C,CACF,CAAC;AAEV,CAAC;AAEDH,WAAW,CAACF,SAAS,GAAAqB,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGvB,SAAS;AAEjC,eAAeE,WAAW","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","FaIcon","createGradientBackground","propTypes","style","IconPreview","props","icon","title","createElement","className","iconPreviewWrapper","background","color","iconPreview","iconWrapper","iconName","name","iconColor","size","faSize","wrapperSize","gradientBackground","titleWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/icon-preview/index.tsx"],"sourcesContent":["import React from 'react';\nimport FaIcon from '../../atom/icon';\nimport {createGradientBackground} from '../../util/get-background-gradient-color';\nimport propTypes, {IconPreviewProps} from './types';\nimport style from './style.css';\n\nconst IconPreview = (props: IconPreviewProps) => {\n const {icon, title} = props;\n return (\n <div\n className={style.iconPreviewWrapper}\n style={{background: createGradientBackground(icon.color, '93%', '100%')}}\n >\n <div className={style.iconPreview}>\n <div className={style.iconWrapper}>\n <FaIcon\n {...{\n iconName: icon.name,\n iconColor: icon.color,\n size: {\n faSize: 36,\n wrapperSize: 80\n },\n gradientBackground: true\n }}\n />\n </div>\n <div className={style.titleWrapper} title={title}>\n {title}\n </div>\n </div>\n </div>\n );\n};\n\nIconPreview.propTypes = propTypes;\n\nexport default IconPreview;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAAQC,wBAAwB,QAAO,0CAA0C;AACjF,OAAOC,SAAS,MAA0B,SAAS;AACnD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,KAAuB,IAAK;EAC/C,MAAM;IAACC,IAAI;IAAEC;EAAK,CAAC,GAAGF,KAAK;EAC3B,oBACEN,KAAA,CAAAS,aAAA;IACEC,SAAS,EAAEN,KAAK,CAACO,kBAAmB;IACpCP,KAAK,EAAE;MAACQ,UAAU,EAAEV,wBAAwB,CAACK,IAAI,CAACM,KAAK,EAAE,KAAK,EAAE,MAAM;IAAC;EAAE,gBAEzEb,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACU;EAAY,gBAChCd,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACW;EAAY,gBAChCf,KAAA,CAAAS,aAAA,CAACR,MAAM;IAEHe,QAAQ,EAAET,IAAI,CAACU,IAAI;IACnBC,SAAS,EAAEX,IAAI,CAACM,KAAK;IACrBM,IAAI,EAAE;MACJC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE;IACf,CAAC;IACDC,kBAAkB,EAAE;EAAI,CAE3B,CACE,CAAC,eACNtB,KAAA,CAAAS,aAAA;IAAKC,SAAS,EAAEN,KAAK,CAACmB,YAAa;IAACf,KAAK,EAAEA;EAAM,GAC9CA,KACE,CACF,CACF,CAAC;AAEV,CAAC;AAEDH,WAAW,CAACF,SAAS,GAAAqB,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGvB,SAAS;AAEjC,eAAeE,WAAW","ignoreList":[]}
@@ -27,4 +27,8 @@
27
27
  font-style: normal;
28
28
  font-weight: 700;
29
29
  line-height: 32px;
30
+ display: -webkit-box;
31
+ -webkit-line-clamp: 2;
32
+ -webkit-box-orient: vertical;
33
+ overflow: hidden;
30
34
  }
@@ -9,6 +9,7 @@ declare namespace TranslationModal {
9
9
  const onCancel: PropTypes.Requireable<(...args: any[]) => any>;
10
10
  const onConfirm: PropTypes.Requireable<(...args: any[]) => any>;
11
11
  const onClose: PropTypes.Requireable<(...args: any[]) => any>;
12
+ const disabled: PropTypes.Requireable<boolean>;
12
13
  const source: PropTypes.Requireable<PropTypes.InferProps<{
13
14
  inputText: PropTypes.Requireable<PropTypes.InferProps<{
14
15
  theme: PropTypes.Requireable<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/translation-modal/index.js"],"names":[],"mappings":";AAmBA,gFAoGC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/translation-modal/index.js"],"names":[],"mappings":";AAmBA,gFA8EC"}
@@ -1,5 +1,5 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { useMemo, useCallback, useState } from 'react';
2
+ import React, { useMemo, useCallback } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import BaseModal from '../base-modal';
5
5
  import Provider from '../../atom/provider';
@@ -29,6 +29,7 @@ const TranslationModal = (props, context) => {
29
29
  onCancel,
30
30
  onConfirm,
31
31
  onClose,
32
+ disabled = false,
32
33
  source: {
33
34
  inputText: sourceInputText,
34
35
  textArea: sourceTextArea,
@@ -45,23 +46,12 @@ const TranslationModal = (props, context) => {
45
46
  translate
46
47
  } = context;
47
48
  const detectScrollbar = true;
48
- const [inputValue, setInputValue] = useState(targetInputText?.value || '');
49
- const [textAreaValue, setTextAreaValue] = useState(targetTextArea?.value || '');
50
49
  const handleCancel = useCallback(() => {
51
50
  onCancel();
52
51
  }, [onCancel]);
53
52
  const handleClose = useCallback(() => {
54
53
  onClose();
55
54
  }, [onClose]);
56
- const handleInputChange = useCallback(e => {
57
- setInputValue(e.target.value);
58
- }, []);
59
- const handleTextAreaChange = useCallback(e => {
60
- setTextAreaValue(e.target.value);
61
- }, []);
62
- const isConfirmDisabled = useMemo(() => {
63
- return !inputValue.trim() || !textAreaValue.trim();
64
- }, [inputValue, textAreaValue]);
65
55
  const footer = useMemo(() => {
66
56
  const cancelButton = {
67
57
  onCancel: handleCancel,
@@ -74,12 +64,12 @@ const TranslationModal = (props, context) => {
74
64
  onConfirm,
75
65
  label: translate('confirm'),
76
66
  iconName: 'plus',
77
- disabled: isConfirmDisabled,
67
+ disabled,
78
68
  color: COLORS.cm_primary_blue
79
69
  }
80
70
  })
81
71
  };
82
- }, [handleCancel, onConfirm, translate, isConfirmDisabled, readOnly]);
72
+ }, [handleCancel, onConfirm, translate, readOnly, disabled]);
83
73
  if (!isOpen) return null;
84
74
  return /*#__PURE__*/React.createElement(BaseModal, {
85
75
  title: translate('translation_title'),
@@ -105,16 +95,8 @@ const TranslationModal = (props, context) => {
105
95
  className: style.separator
106
96
  }), renderInputGroup({
107
97
  title: outputLanguage,
108
- inputProps: {
109
- ...targetInputText,
110
- value: inputValue,
111
- onChange: handleInputChange
112
- },
113
- textAreaProps: {
114
- ...targetTextArea,
115
- value: textAreaValue,
116
- onChange: handleTextAreaChange
117
- },
98
+ inputProps: targetInputText,
99
+ textAreaProps: targetTextArea,
118
100
  disabled: readOnly
119
101
  }))));
120
102
  };
@@ -126,6 +108,7 @@ TranslationModal.propTypes = process.env.NODE_ENV !== "production" ? {
126
108
  onCancel: PropTypes.func,
127
109
  onConfirm: PropTypes.func,
128
110
  onClose: PropTypes.func,
111
+ disabled: PropTypes.bool,
129
112
  source: PropTypes.shape({
130
113
  inputText: PropTypes.shape({
131
114
  ...InputText.propTypes,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","useCallback","useState","PropTypes","BaseModal","Provider","COLORS","InputText","TextArea","style","renderInputGroup","title","inputProps","textAreaProps","disabled","createElement","className","inputGroup","_extends","TranslationModal","props","context","isOpen","onCancel","onConfirm","onClose","source","inputText","sourceInputText","textArea","sourceTextArea","inputLanguage","target","targetInputText","targetTextArea","language","outputLanguage","readOnly","translate","detectScrollbar","inputValue","setInputValue","value","textAreaValue","setTextAreaValue","handleCancel","handleClose","handleInputChange","e","handleTextAreaChange","isConfirmDisabled","trim","footer","cancelButton","label","confirmButton","iconName","color","cm_primary_blue","description","headerIcon","name","backgroundColor","translationModal","horizontalSection","separator","onChange","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","func","shape","theme","string"],"sources":["../../../src/molecule/translation-modal/index.js"],"sourcesContent":["import React, {useMemo, useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport BaseModal from '../base-modal';\nimport Provider from '../../atom/provider';\nimport {COLORS} from '../../variables/colors';\nimport InputText from '../../atom/input-text';\nimport TextArea from '../../atom/input-textarea';\nimport style from './style.css';\n\nconst renderInputGroup = ({title, inputProps, textAreaProps, disabled}) => {\n return (\n <div className={style.inputGroup}>\n <div className={style.title}>{title}</div>\n <InputText {...inputProps} disabled={disabled} />\n <TextArea {...textAreaProps} disabled={disabled} />\n </div>\n );\n};\n\nconst TranslationModal = (props, context) => {\n const {\n isOpen,\n onCancel,\n onConfirm,\n onClose,\n source: {inputText: sourceInputText, textArea: sourceTextArea, inputLanguage},\n target: {inputText: targetInputText, textArea: targetTextArea, language: outputLanguage},\n readOnly = false\n } = props;\n const {translate} = context;\n\n const detectScrollbar = true;\n\n const [inputValue, setInputValue] = useState(targetInputText?.value || '');\n const [textAreaValue, setTextAreaValue] = useState(targetTextArea?.value || '');\n\n const handleCancel = useCallback(() => {\n onCancel();\n }, [onCancel]);\n\n const handleClose = useCallback(() => {\n onClose();\n }, [onClose]);\n\n const handleInputChange = useCallback(e => {\n setInputValue(e.target.value);\n }, []);\n\n const handleTextAreaChange = useCallback(e => {\n setTextAreaValue(e.target.value);\n }, []);\n\n const isConfirmDisabled = useMemo(() => {\n return !inputValue.trim() || !textAreaValue.trim();\n }, [inputValue, textAreaValue]);\n\n const footer = useMemo(() => {\n const cancelButton = {\n onCancel: handleCancel,\n label: translate(readOnly ? 'close' : 'cancel')\n };\n return {\n cancelButton,\n ...(!readOnly && {\n confirmButton: {\n onConfirm,\n label: translate('confirm'),\n iconName: 'plus',\n disabled: isConfirmDisabled,\n color: COLORS.cm_primary_blue\n }\n })\n };\n }, [handleCancel, onConfirm, translate, isConfirmDisabled, readOnly]);\n\n if (!isOpen) return null;\n\n return (\n <BaseModal\n title={translate('translation_title')}\n description={translate('translation_description')}\n isOpen={isOpen}\n onClose={handleClose}\n footer={footer}\n headerIcon={{\n name: 'language',\n backgroundColor: '#D6E6FF'\n }}\n detectScrollbar={detectScrollbar}\n >\n <div className={style.translationModal}>\n <div className={style.horizontalSection}>\n {renderInputGroup({\n title: inputLanguage,\n inputProps: sourceInputText,\n textAreaProps: sourceTextArea,\n disabled: true\n })}\n\n <div className={style.separator} />\n\n {renderInputGroup({\n title: outputLanguage,\n inputProps: {\n ...targetInputText,\n value: inputValue,\n onChange: handleInputChange\n },\n textAreaProps: {\n ...targetTextArea,\n value: textAreaValue,\n onChange: handleTextAreaChange\n },\n disabled: readOnly\n })}\n </div>\n </div>\n </BaseModal>\n );\n};\n\nTranslationModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nTranslationModal.propTypes = {\n isOpen: PropTypes.bool,\n onCancel: PropTypes.func,\n onConfirm: PropTypes.func,\n onClose: PropTypes.func,\n source: PropTypes.shape({\n inputText: PropTypes.shape({\n ...InputText.propTypes,\n theme: PropTypes.string\n }),\n textArea: PropTypes.shape({\n ...TextArea.propTypes,\n theme: PropTypes.string\n }),\n inputLanguage: PropTypes.string\n }),\n target: PropTypes.shape({\n inputText: PropTypes.shape({\n ...InputText.propTypes,\n theme: PropTypes.string\n }),\n textArea: PropTypes.shape({\n ...TextArea.propTypes,\n theme: PropTypes.string\n }),\n language: PropTypes.string\n }),\n readOnly: PropTypes.bool\n};\n\nexport default TranslationModal;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,WAAW,EAAEC,QAAQ,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,QAAQ,MAAM,qBAAqB;AAC1C,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,QAAQ,MAAM,2BAA2B;AAChD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,gBAAgB,GAAGA,CAAC;EAACC,KAAK;EAAEC,UAAU;EAAEC,aAAa;EAAEC;AAAQ,CAAC,KAAK;EACzE,oBACEf,KAAA,CAAAgB,aAAA;IAAKC,SAAS,EAAEP,KAAK,CAACQ;EAAW,gBAC/BlB,KAAA,CAAAgB,aAAA;IAAKC,SAAS,EAAEP,KAAK,CAACE;EAAM,GAAEA,KAAW,CAAC,eAC1CZ,KAAA,CAAAgB,aAAA,CAACR,SAAS,EAAAW,QAAA,KAAKN,UAAU;IAAEE,QAAQ,EAAEA;EAAS,EAAE,CAAC,eACjDf,KAAA,CAAAgB,aAAA,CAACP,QAAQ,EAAAU,QAAA,KAAKL,aAAa;IAAEC,QAAQ,EAAEA;EAAS,EAAE,CAC/C,CAAC;AAEV,CAAC;AAED,MAAMK,gBAAgB,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EAC3C,MAAM;IACJC,MAAM;IACNC,QAAQ;IACRC,SAAS;IACTC,OAAO;IACPC,MAA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AAC8D,SAAS;MACtBO,KAAK,EAAEzE,SAAS,CAAC0E;IACnB,CAAC,CAAC;IACFhD,QAAQ,EAAE1B,SAAS,CAACwE,KAAK,CAAC;MACxB,GAAGnE,QAAQ,CAAC6D,SAAS;MACrBO,KAAK,EAAEzE,SAAS,CAAC0E;IACnB,CAAC,CAAC;IACF1C,QAAQ,EAAEhC,SAAS,CAAC0E;EACtB,CAAC,CAAC;EACFxC,QAAQ,EAAElC,SAAS,CAACsE;AACtB,CAAC;AAED,eAAetD,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","useCallback","PropTypes","BaseModal","Provider","COLORS","InputText","TextArea","style","renderInputGroup","title","inputProps","textAreaProps","disabled","createElement","className","inputGroup","_extends","TranslationModal","props","context","isOpen","onCancel","onConfirm","onClose","source","inputText","sourceInputText","textArea","sourceTextArea","inputLanguage","target","targetInputText","targetTextArea","language","outputLanguage","readOnly","translate","detectScrollbar","handleCancel","handleClose","footer","cancelButton","label","confirmButton","iconName","color","cm_primary_blue","description","headerIcon","name","backgroundColor","translationModal","horizontalSection","separator","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","bool","func","shape","theme","string"],"sources":["../../../src/molecule/translation-modal/index.js"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport BaseModal from '../base-modal';\nimport Provider from '../../atom/provider';\nimport {COLORS} from '../../variables/colors';\nimport InputText from '../../atom/input-text';\nimport TextArea from '../../atom/input-textarea';\nimport style from './style.css';\n\nconst renderInputGroup = ({title, inputProps, textAreaProps, disabled}) => {\n return (\n <div className={style.inputGroup}>\n <div className={style.title}>{title}</div>\n <InputText {...inputProps} disabled={disabled} />\n <TextArea {...textAreaProps} disabled={disabled} />\n </div>\n );\n};\n\nconst TranslationModal = (props, context) => {\n const {\n isOpen,\n onCancel,\n onConfirm,\n onClose,\n disabled = false,\n source: {inputText: sourceInputText, textArea: sourceTextArea, inputLanguage},\n target: {inputText: targetInputText, textArea: targetTextArea, language: outputLanguage},\n readOnly = false\n } = props;\n const {translate} = context;\n\n const detectScrollbar = true;\n\n const handleCancel = useCallback(() => {\n onCancel();\n }, [onCancel]);\n\n const handleClose = useCallback(() => {\n onClose();\n }, [onClose]);\n\n const footer = useMemo(() => {\n const cancelButton = {\n onCancel: handleCancel,\n label: translate(readOnly ? 'close' : 'cancel')\n };\n return {\n cancelButton,\n ...(!readOnly && {\n confirmButton: {\n onConfirm,\n label: translate('confirm'),\n iconName: 'plus',\n disabled,\n color: COLORS.cm_primary_blue\n }\n })\n };\n }, [handleCancel, onConfirm, translate, readOnly, disabled]);\n\n if (!isOpen) return null;\n\n return (\n <BaseModal\n title={translate('translation_title')}\n description={translate('translation_description')}\n isOpen={isOpen}\n onClose={handleClose}\n footer={footer}\n headerIcon={{\n name: 'language',\n backgroundColor: '#D6E6FF'\n }}\n detectScrollbar={detectScrollbar}\n >\n <div className={style.translationModal}>\n <div className={style.horizontalSection}>\n {renderInputGroup({\n title: inputLanguage,\n inputProps: sourceInputText,\n textAreaProps: sourceTextArea,\n disabled: true\n })}\n\n <div className={style.separator} />\n\n {renderInputGroup({\n title: outputLanguage,\n inputProps: targetInputText,\n textAreaProps: targetTextArea,\n disabled: readOnly\n })}\n </div>\n </div>\n </BaseModal>\n );\n};\n\nTranslationModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nTranslationModal.propTypes = {\n isOpen: PropTypes.bool,\n onCancel: PropTypes.func,\n onConfirm: PropTypes.func,\n onClose: PropTypes.func,\n disabled: PropTypes.bool,\n source: PropTypes.shape({\n inputText: PropTypes.shape({\n ...InputText.propTypes,\n theme: PropTypes.string\n }),\n textArea: PropTypes.shape({\n ...TextArea.propTypes,\n theme: PropTypes.string\n }),\n inputLanguage: PropTypes.string\n }),\n target: PropTypes.shape({\n inputText: PropTypes.shape({\n ...InputText.propTypes,\n theme: PropTypes.string\n }),\n textArea: PropTypes.shape({\n ...TextArea.propTypes,\n theme: PropTypes.string\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D;IACnB,CAAC,CAAC;IACFnC,aAAa,EAAE5B,SAAS,CAAC+D;EAC3B,CAAC,CAAC;EACFlC,MAAM,EAAE7B,SAAS,CAAC6D,KAAK,CAAC;IACtBrC,SAAS,EAAExB,SAAS,CAAC6D,KAAK,CAAC;MACzB,GAAGzD,SAAS,CAACmD,SAAS;MACtBO,KAAK,EAAE9D,SAAS,CAAC+D;IACnB,CAAC,CAAC;IACFrC,QAAQ,EAAE1B,SAAS,CAAC6D,KAAK,CAAC;MACxB,GAAGxD,QAAQ,CAACkD,SAAS;MACrBO,KAAK,EAAE9D,SAAS,CAAC+D;IACnB,CAAC,CAAC;IACF/B,QAAQ,EAAEhC,SAAS,CAAC+D;EACtB,CAAC,CAAC;EACF7B,QAAQ,EAAElC,SAAS,CAAC2D;AACtB,CAAC;AAED,eAAe3C,gBAAgB","ignoreList":[]}
@@ -146,7 +146,6 @@
146
146
  font-size: 14px;
147
147
  font-weight: 600;
148
148
  line-height: 20px;
149
- cursor: pointer;
150
149
  margin-top: 32px;
151
150
  width: auto;
152
151
  }