@coorpacademy/components 11.39.4-alpha.2 → 11.39.4-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/input-textarea/index.d.ts.map +1 -1
- package/es/atom/input-textarea/index.js +2 -0
- package/es/atom/input-textarea/index.js.map +1 -1
- package/es/molecule/icon-preview/style.css +0 -3
- package/es/organism/skill-edition/index.d.ts +4 -4
- package/es/organism/skill-edition/index.js +28 -28
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/style.css +2 -3
- package/es/organism/skill-edition/types.d.ts +8 -8
- package/es/organism/skill-edition/types.js +4 -4
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +4 -4
- package/lib/atom/input-textarea/index.d.ts.map +1 -1
- package/lib/atom/input-textarea/index.js +2 -0
- package/lib/atom/input-textarea/index.js.map +1 -1
- package/lib/molecule/icon-preview/style.css +0 -3
- package/lib/organism/skill-edition/index.d.ts +4 -4
- package/lib/organism/skill-edition/index.js +28 -28
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/style.css +2 -3
- package/lib/organism/skill-edition/types.d.ts +8 -8
- package/lib/organism/skill-edition/types.js +4 -4
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +4 -4
- package/package.json +2 -2
|
@@ -1660,7 +1660,7 @@ declare namespace BrandUpdate {
|
|
|
1660
1660
|
title: PropTypes.Validator<string>;
|
|
1661
1661
|
onEditClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
1662
1662
|
onDeleteClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
1663
|
-
|
|
1663
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
1664
1664
|
}>>;
|
|
1665
1665
|
}>;
|
|
1666
1666
|
button: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
@@ -1672,7 +1672,7 @@ declare namespace BrandUpdate {
|
|
|
1672
1672
|
title: PropTypes.Requireable<string>;
|
|
1673
1673
|
description: PropTypes.Requireable<string>;
|
|
1674
1674
|
}>>;
|
|
1675
|
-
|
|
1675
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
1676
1676
|
}>>>;
|
|
1677
1677
|
content: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
1678
1678
|
title: PropTypes.Validator<string>;
|
|
@@ -1723,10 +1723,10 @@ declare namespace BrandUpdate {
|
|
|
1723
1723
|
checked: PropTypes.Requireable<boolean>;
|
|
1724
1724
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
1725
1725
|
}>>;
|
|
1726
|
-
|
|
1726
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
1727
1727
|
}>>>;
|
|
1728
1728
|
isFetching: PropTypes.Requireable<boolean>;
|
|
1729
|
-
|
|
1729
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
1730
1730
|
}> | null | undefined>>;
|
|
1731
1731
|
export const documentation: PropTypes.Requireable<PropTypes.InferProps<{
|
|
1732
1732
|
content: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-textarea/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-textarea/index.js"],"names":[],"mappings":";AAmBA,wDA0EC"}
|
|
@@ -11,6 +11,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _novaIcons = require("@coorpacademy/nova-icons");
|
|
12
12
|
var _getClassState = _interopRequireDefault(require("../../util/get-class-state"));
|
|
13
13
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
14
|
+
var _uuid = require("uuid");
|
|
14
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -68,6 +69,7 @@ const InputTextarea = props => {
|
|
|
68
69
|
}, /*#__PURE__*/_react.default.createElement("label", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
69
70
|
className: (0, _classnames.default)(_style.default.title, (0, _isEmpty2.default)(value) && _style.default.noValue)
|
|
70
71
|
}, propsTitle, toolTipView), /*#__PURE__*/_react.default.createElement("textarea", {
|
|
72
|
+
id: (0, _uuid.v5)('textarea-', _uuid.v5.URL),
|
|
71
73
|
name: name,
|
|
72
74
|
value: value,
|
|
73
75
|
placeholder: placeholder,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_novaIcons","_getClassState","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","themeStyle","setup","style","coorpmanager","cockpit","defaultStyle","InputTextarea","props","title","propsTitle","name","placeholder","value","hint","theme","onChange","_noop2","error","valid","description","disabled","readOnly","modified","mainClass","className","getClassState","handleChange","useMemo","target","descriptionView","createElement","toolTipView","infoIconWrapper","NovaCompositionCoorpacademyInformationIcon","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","NovaSolidStatusClose","leftIcon","validIconView","NovaSolidStatusCheckCircle2","classnames","readonly","_isEmpty2","noValue","propTypes","process","env","NODE_ENV","PropTypes","string","oneOf","_keys2","bool","func","_default","exports"],"sources":["../../../src/atom/input-textarea/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputTextarea = props => {\n const {\n title: propsTitle,\n name,\n placeholder,\n value,\n hint,\n theme = 'default',\n onChange = noop,\n error,\n valid,\n description,\n disabled,\n readOnly = false,\n modified = false\n } = props;\n\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n readOnly && style.readonly\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n <textarea\n name={name}\n value={value}\n placeholder={placeholder}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n data-testid={name}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputTextarea.propTypes = {\n placeholder: PropTypes.string,\n title: PropTypes.string,\n name: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n valid: PropTypes.bool\n};\nexport default InputTextarea;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_classnames","_novaIcons","_getClassState","_style","_uuid","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","themeStyle","setup","style","coorpmanager","cockpit","defaultStyle","InputTextarea","props","title","propsTitle","name","placeholder","value","hint","theme","onChange","_noop2","error","valid","description","disabled","readOnly","modified","mainClass","className","getClassState","handleChange","useMemo","target","descriptionView","createElement","toolTipView","infoIconWrapper","NovaCompositionCoorpacademyInformationIcon","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","NovaSolidStatusClose","leftIcon","validIconView","NovaSolidStatusCheckCircle2","classnames","readonly","_isEmpty2","noValue","id","uuidV5","URL","propTypes","process","env","NODE_ENV","PropTypes","string","oneOf","_keys2","bool","func","_default","exports"],"sources":["../../../src/atom/input-textarea/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\nimport {v5 as uuidV5} from 'uuid';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputTextarea = props => {\n const {\n title: propsTitle,\n name,\n placeholder,\n value,\n hint,\n theme = 'default',\n onChange = noop,\n error,\n valid,\n description,\n disabled,\n readOnly = false,\n modified = false\n } = props;\n\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n readOnly && style.readonly\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n <textarea\n id={uuidV5('textarea-', uuidV5.URL)}\n name={name}\n value={value}\n placeholder={placeholder}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n data-testid={name}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputTextarea.propTypes = {\n placeholder: PropTypes.string,\n title: PropTypes.string,\n name: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n valid: PropTypes.bool\n};\nexport default InputTextarea;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAKA,IAAAK,cAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AAAkC,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CA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B9C,IAAI,EAAE6C,kBAAS,CAACC,MAAM;EACtB1C,KAAK,EAAEyC,kBAAS,CAACE,KAAK,CAAC,IAAAC,MAAA,CAAAxE,OAAA,EAAKc,UAAU,CAAC,CAAC;EACxCoB,QAAQ,EAAEmC,kBAAS,CAACI,IAAI;EACxBtC,QAAQ,EAAEkC,kBAAS,CAACI,IAAI;EACxB/C,KAAK,EAAE2C,kBAAS,CAACC,MAAM;EACvB3C,IAAI,EAAE0C,kBAAS,CAACC,MAAM;EACtBvC,KAAK,EAAEsC,kBAAS,CAACC,MAAM;EACvBzC,QAAQ,EAAEwC,kBAAS,CAACK,IAAI;EACxBzC,WAAW,EAAEoC,kBAAS,CAACC,MAAM;EAC7BlC,QAAQ,EAAEiC,kBAAS,CAACI,IAAI;EACxBzC,KAAK,EAAEqC,kBAAS,CAACI;AACnB,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAA5E,OAAA,GACaoB,aAAa","ignoreList":[]}
|
|
@@ -114,7 +114,7 @@ declare const SkillEdition: {
|
|
|
114
114
|
title: import("prop-types").Validator<string>;
|
|
115
115
|
onEditClick: import("prop-types").Validator<(...args: any[]) => any>;
|
|
116
116
|
onDeleteClick: import("prop-types").Validator<(...args: any[]) => any>;
|
|
117
|
-
|
|
117
|
+
readOnly: import("prop-types").Requireable<boolean>;
|
|
118
118
|
}>>;
|
|
119
119
|
}>;
|
|
120
120
|
button: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
@@ -126,7 +126,7 @@ declare const SkillEdition: {
|
|
|
126
126
|
title: import("prop-types").Requireable<string>;
|
|
127
127
|
description: import("prop-types").Requireable<string>;
|
|
128
128
|
}>>;
|
|
129
|
-
|
|
129
|
+
readOnly: import("prop-types").Requireable<boolean>;
|
|
130
130
|
}>>>;
|
|
131
131
|
content: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
|
|
132
132
|
title: import("prop-types").Validator<string>;
|
|
@@ -177,10 +177,10 @@ declare const SkillEdition: {
|
|
|
177
177
|
checked: import("prop-types").Requireable<boolean>;
|
|
178
178
|
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
179
179
|
}>>;
|
|
180
|
-
|
|
180
|
+
readOnly: import("prop-types").Requireable<boolean>;
|
|
181
181
|
}>>>;
|
|
182
182
|
isFetching: import("prop-types").Requireable<boolean>;
|
|
183
|
-
|
|
183
|
+
readOnly: import("prop-types").Requireable<boolean>;
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
186
|
export default SkillEdition;
|
|
@@ -18,11 +18,11 @@ var _types = _interopRequireDefault(require("./types"));
|
|
|
18
18
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
20
|
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); }
|
|
21
|
-
const buildFormField = (field, type,
|
|
21
|
+
const buildFormField = (field, type, readOnly) => {
|
|
22
22
|
const fieldWithoutOverrides = (0, _omit2.default)(['type', 'theme', 'size', 'readOnly'], field);
|
|
23
23
|
return {
|
|
24
24
|
...fieldWithoutOverrides,
|
|
25
|
-
readOnly:
|
|
25
|
+
readOnly: readOnly,
|
|
26
26
|
type,
|
|
27
27
|
theme: 'coorpmanager',
|
|
28
28
|
size: 'large'
|
|
@@ -53,7 +53,7 @@ const SkillInformations = skillInformations => {
|
|
|
53
53
|
const {
|
|
54
54
|
form,
|
|
55
55
|
iconEditor,
|
|
56
|
-
|
|
56
|
+
readOnly
|
|
57
57
|
} = skillInformations;
|
|
58
58
|
const {
|
|
59
59
|
select,
|
|
@@ -71,9 +71,9 @@ const SkillInformations = skillInformations => {
|
|
|
71
71
|
iconPreview: iconEditor.iconPreview,
|
|
72
72
|
inputText: {
|
|
73
73
|
...iconEditor.inputText,
|
|
74
|
-
readOnly:
|
|
74
|
+
readOnly: readOnly
|
|
75
75
|
},
|
|
76
|
-
buttonLink: iconEditor.buttonLink && !
|
|
76
|
+
buttonLink: iconEditor.buttonLink && !readOnly ? {
|
|
77
77
|
type: 'secondary',
|
|
78
78
|
label: iconEditor.buttonLink.label,
|
|
79
79
|
ariaLabel: iconEditor.buttonLink.ariaLabel,
|
|
@@ -109,7 +109,7 @@ const SkillInformations = skillInformations => {
|
|
|
109
109
|
onChange: select.field.onChange,
|
|
110
110
|
theme: 'skillDetail',
|
|
111
111
|
size: 'large',
|
|
112
|
-
readOnly:
|
|
112
|
+
readOnly: readOnly
|
|
113
113
|
}
|
|
114
114
|
}, {
|
|
115
115
|
...buildTitleAndInputField({
|
|
@@ -117,13 +117,13 @@ const SkillInformations = skillInformations => {
|
|
|
117
117
|
required: true,
|
|
118
118
|
childType: 'inputText'
|
|
119
119
|
}),
|
|
120
|
-
field: buildFormField(inputText.field, 'text',
|
|
120
|
+
field: buildFormField(inputText.field, 'text', readOnly)
|
|
121
121
|
}, {
|
|
122
122
|
...buildTitleAndInputField({
|
|
123
123
|
title: inputTextArea.title,
|
|
124
124
|
childType: 'inputTextArea'
|
|
125
125
|
}),
|
|
126
|
-
field: buildFormField(inputTextArea.field, 'textarea',
|
|
126
|
+
field: buildFormField(inputTextArea.field, 'textarea', readOnly)
|
|
127
127
|
}];
|
|
128
128
|
const formProps = {
|
|
129
129
|
title: form.title,
|
|
@@ -173,9 +173,9 @@ const buildTranslationItems = ({
|
|
|
173
173
|
title: itemTitle,
|
|
174
174
|
onEditClick,
|
|
175
175
|
onDeleteClick,
|
|
176
|
-
|
|
176
|
+
readOnly = false
|
|
177
177
|
}, index) => ({
|
|
178
|
-
...(
|
|
178
|
+
...(readOnly ? {} : {
|
|
179
179
|
secondButtonLink: {
|
|
180
180
|
'aria-label': 'Delete',
|
|
181
181
|
type: 'primary',
|
|
@@ -198,7 +198,7 @@ const buildTranslationItems = ({
|
|
|
198
198
|
id: index,
|
|
199
199
|
title: itemTitle,
|
|
200
200
|
buttonLink: {
|
|
201
|
-
'aria-label':
|
|
201
|
+
'aria-label': readOnly ? 'View Custom SKill' : 'Edit Custom Skill',
|
|
202
202
|
type: 'primary',
|
|
203
203
|
customStyle: {
|
|
204
204
|
width: 'fit-content',
|
|
@@ -208,7 +208,7 @@ const buildTranslationItems = ({
|
|
|
208
208
|
icon: {
|
|
209
209
|
position: 'left',
|
|
210
210
|
faIcon: {
|
|
211
|
-
name:
|
|
211
|
+
name: readOnly ? 'eye' : 'edit',
|
|
212
212
|
color: _colors.COLORS.neutral_500,
|
|
213
213
|
size: 16
|
|
214
214
|
}
|
|
@@ -223,7 +223,7 @@ const Translations = ({
|
|
|
223
223
|
button,
|
|
224
224
|
localesOptions,
|
|
225
225
|
emptyResult,
|
|
226
|
-
|
|
226
|
+
readOnly = false
|
|
227
227
|
}) => {
|
|
228
228
|
const buttonProps = buildButtonProps(button);
|
|
229
229
|
const translationMenuAction = {
|
|
@@ -269,15 +269,15 @@ const Translations = ({
|
|
|
269
269
|
}),
|
|
270
270
|
items: uncappedMap((item, index) => buildTranslationItems({
|
|
271
271
|
...item,
|
|
272
|
-
|
|
272
|
+
readOnly
|
|
273
273
|
}, index), items),
|
|
274
274
|
type: 'list'
|
|
275
275
|
},
|
|
276
|
-
buttonMenuAction:
|
|
276
|
+
buttonMenuAction: readOnly ? undefined : translationMenuAction
|
|
277
277
|
};
|
|
278
278
|
return /*#__PURE__*/_react.default.createElement(_listItems.default, translationProps);
|
|
279
279
|
};
|
|
280
|
-
const buildContentItem =
|
|
280
|
+
const buildContentItem = readOnly => ({
|
|
281
281
|
ref,
|
|
282
282
|
title,
|
|
283
283
|
subtitle,
|
|
@@ -290,7 +290,7 @@ const buildContentItem = readonly => ({
|
|
|
290
290
|
deleteButton
|
|
291
291
|
}) => {
|
|
292
292
|
return {
|
|
293
|
-
...(
|
|
293
|
+
...(readOnly ? {} : {
|
|
294
294
|
secondButtonLink: {
|
|
295
295
|
...deleteButton,
|
|
296
296
|
'data-name': `button-${deleteButton?.label}`,
|
|
@@ -327,7 +327,7 @@ const buildContentItem = readonly => ({
|
|
|
327
327
|
position: 'left'
|
|
328
328
|
}
|
|
329
329
|
}],
|
|
330
|
-
checkbox:
|
|
330
|
+
checkbox: readOnly ? undefined : checkbox
|
|
331
331
|
};
|
|
332
332
|
};
|
|
333
333
|
const Content = ({
|
|
@@ -343,7 +343,7 @@ const Content = ({
|
|
|
343
343
|
},
|
|
344
344
|
actionButtons,
|
|
345
345
|
checkboxWithTitle: checkboxWithTitleProps,
|
|
346
|
-
|
|
346
|
+
readOnly = false,
|
|
347
347
|
isFetching = false
|
|
348
348
|
}) => {
|
|
349
349
|
const buttonProps = buildButtonProps(button);
|
|
@@ -351,7 +351,7 @@ const Content = ({
|
|
|
351
351
|
type: 'form-group',
|
|
352
352
|
title,
|
|
353
353
|
subtitle,
|
|
354
|
-
button: !
|
|
354
|
+
button: !readOnly ? buttonProps : undefined,
|
|
355
355
|
required: true
|
|
356
356
|
};
|
|
357
357
|
const listProps = {
|
|
@@ -377,16 +377,16 @@ const Content = ({
|
|
|
377
377
|
button: buttonProps
|
|
378
378
|
}
|
|
379
379
|
}),
|
|
380
|
-
items: (0, _map2.default)(buildContentItem(
|
|
380
|
+
items: (0, _map2.default)(buildContentItem(readOnly), items),
|
|
381
381
|
type: 'list'
|
|
382
382
|
},
|
|
383
383
|
search: {
|
|
384
384
|
...search,
|
|
385
385
|
theme: 'coorpmanager',
|
|
386
|
-
// Keep search interactive even in
|
|
386
|
+
// Keep search interactive even in readOnly mode
|
|
387
387
|
disabled: false
|
|
388
388
|
},
|
|
389
|
-
actionButtons:
|
|
389
|
+
actionButtons: readOnly ? [] : (0, _map2.default)(actionButton => ({
|
|
390
390
|
...actionButton,
|
|
391
391
|
customStyle: {
|
|
392
392
|
fontWeight: '600',
|
|
@@ -394,7 +394,7 @@ const Content = ({
|
|
|
394
394
|
width: 'auto'
|
|
395
395
|
}
|
|
396
396
|
}), actionButtons),
|
|
397
|
-
checkboxWithTitle:
|
|
397
|
+
checkboxWithTitle: readOnly ? undefined : {
|
|
398
398
|
...checkboxWithTitleProps,
|
|
399
399
|
name: checkboxWithTitleProps?.title,
|
|
400
400
|
'aria-label': checkboxWithTitleProps?.title,
|
|
@@ -422,7 +422,7 @@ const SkillEdition = props => {
|
|
|
422
422
|
translations,
|
|
423
423
|
content,
|
|
424
424
|
isFetching = false,
|
|
425
|
-
|
|
425
|
+
readOnly
|
|
426
426
|
} = props;
|
|
427
427
|
return isFetching ? /*#__PURE__*/_react.default.createElement("div", {
|
|
428
428
|
className: _style.default.loaderContainer
|
|
@@ -432,11 +432,11 @@ const SkillEdition = props => {
|
|
|
432
432
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
433
433
|
className: _style.default.container
|
|
434
434
|
}, /*#__PURE__*/_react.default.createElement(SkillInformations, _extends({}, skillInformations, {
|
|
435
|
-
|
|
435
|
+
readOnly: readOnly
|
|
436
436
|
})), /*#__PURE__*/_react.default.createElement(Translations, _extends({}, translations, {
|
|
437
|
-
|
|
437
|
+
readOnly: readOnly
|
|
438
438
|
})), /*#__PURE__*/_react.default.createElement(Content, _extends({}, content, {
|
|
439
|
-
|
|
439
|
+
readOnly: readOnly
|
|
440
440
|
})));
|
|
441
441
|
};
|
|
442
442
|
SkillEdition.propTypes = process.env.NODE_ENV !== "production" ? _types.default : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_title","_titleAndInput","_colors","_loader","_types","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","buildFormField","field","type","readonly","fieldWithoutOverrides","_omit2","readOnly","theme","size","buildTitleAndInputField","title","subtitle","required","dataName","childType","titleSize","subtitleSize","undefined","SkillInformations","skillInformations","form","iconEditor","select","inputTextArea","inputText","iconEditorProps","iconPreview","buttonLink","label","ariaLabel","icon","position","faIcon","name","onClick","customStyle","borderRadius","fontWeight","fields","options","onChange","formProps","createElement","className","style","skillInformationsContainer","uncappedMap","_map2","convert","cap","buildButtonProps","button","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","color","padding","width","backgroundColor","cm_blue_50","buildTranslationItems","itemTitle","onEditClick","onDeleteClick","index","secondButtonLink","cm_grey_100","neutral_500","id","Translations","items","localesOptions","emptyResult","buttonProps","translationMenuAction","menu","buttons","optionLabel","ref","optionRef","optionOnClick","disabled","_includes2","_keys2","menuWrapper","maxHeight","translationProps","content","_isEmpty2","item","buttonMenuAction","buildContentItem","image","tags","iconName","checkbox","deleteButton","preset","Content","list","listTitle","search","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","titleProps","listProps","iconColor","white","cm_grey_500","fontSize","actionButton","contentContainer","SkillEdition","props","translations","loaderContainer","loader","container","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport {includes, isEmpty, keys, map, omit} from 'lodash/fp';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport TitleAndInput from '../title-and-input';\nimport {COLORS} from '../../variables/colors';\nimport Loader from '../../atom/loader';\nimport propTypes, {\n TranslationPropsType,\n SkillEditionPropsType,\n SkillInformationsProps,\n InputTextareaProps,\n InputTextProps,\n ContentPropsType,\n ContentListItemType\n} from './types';\nimport style from './style.css';\n\nconst buildFormField = (\n field: InputTextareaProps | InputTextProps,\n type: 'text' | 'textarea',\n readonly?: boolean\n) => {\n const fieldWithoutOverrides = omit(['type', 'theme', 'size', 'readOnly'], field);\n return {\n ...fieldWithoutOverrides,\n readOnly: readonly,\n type,\n theme: 'coorpmanager',\n size: 'large'\n };\n};\n\nconst buildTitleAndInputField = ({\n title,\n subtitle,\n required = false,\n dataName,\n childType\n}: {\n title: string;\n subtitle?: string;\n required?: boolean;\n dataName?: string;\n childType?: string;\n}) => {\n return {\n title: {\n type: 'form-group',\n title,\n subtitle,\n titleSize: 'small-and-light',\n subtitleSize: subtitle ? 'standard-without-margin' : undefined,\n required,\n 'data-name': dataName\n },\n childType,\n type: 'titleAndInput'\n };\n};\n\nconst SkillInformations = (skillInformations: SkillInformationsProps & {readonly?: boolean}) => {\n const {form, iconEditor, readonly} = skillInformations;\n const {select, inputTextArea, inputText} = form;\n\n const iconEditorProps = {\n title: {\n type: 'form-group',\n title: iconEditor.title,\n titleSize: 'small-and-light',\n required: true\n },\n field: {\n iconPreview: iconEditor.iconPreview,\n inputText: {...iconEditor.inputText, readOnly: readonly},\n buttonLink:\n iconEditor.buttonLink && !readonly\n ? {\n type: 'secondary',\n label: iconEditor.buttonLink.label,\n ariaLabel: iconEditor.buttonLink.ariaLabel,\n dataName: 'open-icon-modal-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'arrows-rotate',\n size: 16\n }\n },\n onClick: iconEditor.buttonLink.onClick,\n customStyle: {\n borderRadius: '12px',\n fontWeight: '500'\n }\n }\n : undefined,\n size: 'large'\n },\n childType: 'iconEditor'\n };\n\n const fields = [\n {\n ...buildTitleAndInputField({\n title: select.title,\n subtitle: select.subtitle,\n required: true,\n dataName: select['data-name'],\n childType: 'select'\n }),\n field: {\n options: select.field.options,\n 'aria-label': select.field['aria-label'],\n onChange: select.field.onChange,\n theme: 'skillDetail',\n size: 'large',\n readOnly: readonly\n }\n },\n {\n ...buildTitleAndInputField({\n title: inputText.title,\n required: true,\n childType: 'inputText'\n }),\n field: buildFormField(inputText.field, 'text', readonly)\n },\n {\n ...buildTitleAndInputField({\n title: inputTextArea.title,\n childType: 'inputTextArea'\n }),\n field: buildFormField(inputTextArea.field, 'textarea', readonly)\n }\n ];\n\n const formProps = {\n title: form.title,\n subtitle: form.subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium',\n fields\n };\n\n return (\n <div className={style.skillInformationsContainer}>\n <BrandFormGroup {...formProps} />\n <div className={style.iconEditor}>\n <TitleAndInput {...iconEditorProps} />\n </div>\n </div>\n );\n};\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst buildButtonProps = (button: TranslationPropsType['button']) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildTranslationItems = (\n {\n title: itemTitle,\n onEditClick,\n onDeleteClick,\n readonly = false\n }: {title: string; onEditClick: () => void; onDeleteClick: () => void; readonly?: boolean},\n index: number\n) => ({\n ...(readonly\n ? {}\n : {\n secondButtonLink: {\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onDeleteClick\n }\n }),\n id: index,\n title: itemTitle,\n buttonLink: {\n 'aria-label': readonly ? 'View Custom SKill' : 'Edit Custom Skill',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: readonly ? 'eye' : 'edit',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onEditClick\n }\n});\n\nconst Translations = ({\n title,\n subtitle,\n items,\n button,\n localesOptions,\n emptyResult,\n readonly = false\n}: TranslationPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const translationMenuAction = {\n button: buttonProps,\n menu: {\n buttons: map(\n ({\n label: optionLabel,\n ref: optionRef,\n onClick: optionOnClick\n }: {\n label: string;\n ref: string;\n onClick: () => void;\n }) => ({\n type: 'defaultLeft',\n onClick: optionOnClick,\n customStyle: {width: '238px'},\n label: optionLabel,\n 'data-name': optionLabel,\n // disable if current locale option is already in items list\n disabled: includes(optionRef, keys(items))\n }),\n localesOptions\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '252px'}\n }\n };\n\n const translationProps = {\n title: {\n title,\n type: 'form-group',\n subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium'\n },\n 'aria-label': title,\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: translationMenuAction}}),\n items: uncappedMap(\n (\n item: {title: string; onEditClick: () => void; onDeleteClick: () => void},\n index: number\n ) => buildTranslationItems({...item, readonly}, index),\n items\n ),\n type: 'list'\n },\n buttonMenuAction: readonly ? undefined : translationMenuAction\n };\n\n return <ListItems {...translationProps} />;\n};\n\nconst buildContentItem =\n (readonly: boolean) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton\n }: ContentListItemType) => {\n return {\n ...(readonly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n 'data-name': `button-${deleteButton?.label}`,\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readonly ? undefined : checkbox\n };\n };\n\nconst Content = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, checkbox, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readonly = false,\n isFetching = false\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readonly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n ...(!isEmpty(checkbox) && {\n ...checkbox,\n icon: {iconName: 'minus', iconColor: COLORS.white, preset: 's'},\n customStyle: {fontWeight: 600, color: COLORS.cm_grey_500, fontSize: '16px'}\n }),\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readonly), items),\n type: 'list'\n },\n search: {\n ...search,\n theme: 'coorpmanager',\n // Keep search interactive even in readonly mode\n disabled: false\n },\n actionButtons: readonly\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle: readonly\n ? undefined\n : {\n ...checkboxWithTitleProps,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n customStyle: {fontWeight: 600, color: COLORS.neutral_500, fontSize: '16px'},\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={style.contentContainer}>\n <Title {...titleProps} />\n <ListItems {...listProps} />\n </div>\n );\n};\n\nconst SkillEdition = (props: SkillEditionPropsType) => {\n const {skillInformations, translations, content, isFetching = false, readonly} = props;\n\n return isFetching ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <div className={style.container}>\n <SkillInformations {...skillInformations} readonly={readonly} />\n <Translations {...translations} readonly={readonly} />\n <Content {...content} readonly={readonly} />\n </div>\n );\n};\n\nSkillEdition.propTypes = propTypes;\n\nexport default SkillEdition;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA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G,KAAK;IAAExG;EAAQ,CAAC,GAAGkH,KAAK;EAEtF,OAAOV,UAAU,gBACfrI,MAAA,CAAAa,OAAA,CAAAuD,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAAC2E;EAAgB,gBACpCjJ,MAAA,CAAAa,OAAA,CAAAuD,aAAA,CAAC5D,OAAA,CAAAK,OAAM;IAACwD,SAAS,EAAEC,cAAK,CAAC4E,MAAO;IAACjH,KAAK,EAAC;EAAc,CAAE,CACpD,CAAC,gBAENjC,MAAA,CAAAa,OAAA,CAAAuD,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAAC6E;EAAU,gBAC9BnJ,MAAA,CAAAa,OAAA,CAAAuD,aAAA,CAACxB,iBAAiB,EAAA9B,QAAA,KAAK+B,iBAAiB;IAAEhB,QAAQ,EAAEA;EAAS,EAAE,CAAC,eAChE7B,MAAA,CAAAa,OAAA,CAAAuD,aAAA,CAAC6B,YAAY,EAAAnF,QAAA,KAAKkI,YAAY;IAAEnH,QAAQ,EAAEA;EAAS,EAAE,CAAC,eACtD7B,MAAA,CAAAa,OAAA,CAAAuD,aAAA,CAAC0D,OAAO,EAAAhH,QAAA,KAAKqG,OAAO;IAAEtF,QAAQ,EAAEA;EAAS,EAAE,CACxC,CACN;AACH,CAAC;AAEDiH,YAAY,CAACM,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAA5I,OAAA,GAEpBiI,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_brandFormGroup","_listItems","_title","_titleAndInput","_colors","_loader","_types","_style","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","buildFormField","field","type","readOnly","fieldWithoutOverrides","_omit2","theme","size","buildTitleAndInputField","title","subtitle","required","dataName","childType","titleSize","subtitleSize","undefined","SkillInformations","skillInformations","form","iconEditor","select","inputTextArea","inputText","iconEditorProps","iconPreview","buttonLink","label","ariaLabel","icon","position","faIcon","name","onClick","customStyle","borderRadius","fontWeight","fields","options","onChange","formProps","createElement","className","style","skillInformationsContainer","uncappedMap","_map2","convert","cap","buildButtonProps","button","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","color","padding","width","backgroundColor","cm_blue_50","buildTranslationItems","itemTitle","onEditClick","onDeleteClick","index","secondButtonLink","cm_grey_100","neutral_500","id","Translations","items","localesOptions","emptyResult","buttonProps","translationMenuAction","menu","buttons","optionLabel","ref","optionRef","optionOnClick","disabled","_includes2","_keys2","menuWrapper","maxHeight","translationProps","content","_isEmpty2","item","buttonMenuAction","buildContentItem","image","tags","iconName","checkbox","deleteButton","preset","Content","list","listTitle","search","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","titleProps","listProps","iconColor","white","cm_grey_500","fontSize","actionButton","contentContainer","SkillEdition","props","translations","loaderContainer","loader","container","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport {includes, isEmpty, keys, map, omit} from 'lodash/fp';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport TitleAndInput from '../title-and-input';\nimport {COLORS} from '../../variables/colors';\nimport Loader from '../../atom/loader';\nimport propTypes, {\n TranslationPropsType,\n SkillEditionPropsType,\n SkillInformationsProps,\n InputTextareaProps,\n InputTextProps,\n ContentPropsType,\n ContentListItemType\n} from './types';\nimport style from './style.css';\n\nconst buildFormField = (\n field: InputTextareaProps | InputTextProps,\n type: 'text' | 'textarea',\n readOnly?: boolean\n) => {\n const fieldWithoutOverrides = omit(['type', 'theme', 'size', 'readOnly'], field);\n return {\n ...fieldWithoutOverrides,\n readOnly: readOnly,\n type,\n theme: 'coorpmanager',\n size: 'large'\n };\n};\n\nconst buildTitleAndInputField = ({\n title,\n subtitle,\n required = false,\n dataName,\n childType\n}: {\n title: string;\n subtitle?: string;\n required?: boolean;\n dataName?: string;\n childType?: string;\n}) => {\n return {\n title: {\n type: 'form-group',\n title,\n subtitle,\n titleSize: 'small-and-light',\n subtitleSize: subtitle ? 'standard-without-margin' : undefined,\n required,\n 'data-name': dataName\n },\n childType,\n type: 'titleAndInput'\n };\n};\n\nconst SkillInformations = (skillInformations: SkillInformationsProps & {readOnly?: boolean}) => {\n const {form, iconEditor, readOnly} = skillInformations;\n const {select, inputTextArea, inputText} = form;\n\n const iconEditorProps = {\n title: {\n type: 'form-group',\n title: iconEditor.title,\n titleSize: 'small-and-light',\n required: true\n },\n field: {\n iconPreview: iconEditor.iconPreview,\n inputText: {...iconEditor.inputText, readOnly: readOnly},\n buttonLink:\n iconEditor.buttonLink && !readOnly\n ? {\n type: 'secondary',\n label: iconEditor.buttonLink.label,\n ariaLabel: iconEditor.buttonLink.ariaLabel,\n dataName: 'open-icon-modal-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'arrows-rotate',\n size: 16\n }\n },\n onClick: iconEditor.buttonLink.onClick,\n customStyle: {\n borderRadius: '12px',\n fontWeight: '500'\n }\n }\n : undefined,\n size: 'large'\n },\n childType: 'iconEditor'\n };\n\n const fields = [\n {\n ...buildTitleAndInputField({\n title: select.title,\n subtitle: select.subtitle,\n required: true,\n dataName: select['data-name'],\n childType: 'select'\n }),\n field: {\n options: select.field.options,\n 'aria-label': select.field['aria-label'],\n onChange: select.field.onChange,\n theme: 'skillDetail',\n size: 'large',\n readOnly: readOnly\n }\n },\n {\n ...buildTitleAndInputField({\n title: inputText.title,\n required: true,\n childType: 'inputText'\n }),\n field: buildFormField(inputText.field, 'text', readOnly)\n },\n {\n ...buildTitleAndInputField({\n title: inputTextArea.title,\n childType: 'inputTextArea'\n }),\n field: buildFormField(inputTextArea.field, 'textarea', readOnly)\n }\n ];\n\n const formProps = {\n title: form.title,\n subtitle: form.subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium',\n fields\n };\n\n return (\n <div className={style.skillInformationsContainer}>\n <BrandFormGroup {...formProps} />\n <div className={style.iconEditor}>\n <TitleAndInput {...iconEditorProps} />\n </div>\n </div>\n );\n};\n\n// @ts-expect-error convert is not recognized by the types\nconst uncappedMap = map.convert({cap: false});\n\nconst buildButtonProps = (button: TranslationPropsType['button']) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildTranslationItems = (\n {\n title: itemTitle,\n onEditClick,\n onDeleteClick,\n readOnly = false\n }: {title: string; onEditClick: () => void; onDeleteClick: () => void; readOnly?: boolean},\n index: number\n) => ({\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onDeleteClick\n }\n }),\n id: index,\n title: itemTitle,\n buttonLink: {\n 'aria-label': readOnly ? 'View Custom SKill' : 'Edit Custom Skill',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: readOnly ? 'eye' : 'edit',\n color: COLORS.neutral_500,\n size: 16\n }\n },\n onClick: onEditClick\n }\n});\n\nconst Translations = ({\n title,\n subtitle,\n items,\n button,\n localesOptions,\n emptyResult,\n readOnly = false\n}: TranslationPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const translationMenuAction = {\n button: buttonProps,\n menu: {\n buttons: map(\n ({\n label: optionLabel,\n ref: optionRef,\n onClick: optionOnClick\n }: {\n label: string;\n ref: string;\n onClick: () => void;\n }) => ({\n type: 'defaultLeft',\n onClick: optionOnClick,\n customStyle: {width: '238px'},\n label: optionLabel,\n 'data-name': optionLabel,\n // disable if current locale option is already in items list\n disabled: includes(optionRef, keys(items))\n }),\n localesOptions\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '252px'}\n }\n };\n\n const translationProps = {\n title: {\n title,\n type: 'form-group',\n subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium'\n },\n 'aria-label': title,\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: translationMenuAction}}),\n items: uncappedMap(\n (\n item: {title: string; onEditClick: () => void; onDeleteClick: () => void},\n index: number\n ) => buildTranslationItems({...item, readOnly}, index),\n items\n ),\n type: 'list'\n },\n buttonMenuAction: readOnly ? undefined : translationMenuAction\n };\n\n return <ListItems {...translationProps} />;\n};\n\nconst buildContentItem =\n (readOnly: boolean) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n 'data-name': `button-${deleteButton?.label}`,\n 'aria-label': 'Delete',\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : checkbox\n };\n };\n\nconst Content = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, checkbox, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n isFetching = false\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps(button);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n ...(!isEmpty(checkbox) && {\n ...checkbox,\n icon: {iconName: 'minus', iconColor: COLORS.white, preset: 's'},\n customStyle: {fontWeight: 600, color: COLORS.cm_grey_500, fontSize: '16px'}\n }),\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly), items),\n type: 'list'\n },\n search: {\n ...search,\n theme: 'coorpmanager',\n // Keep search interactive even in readOnly mode\n disabled: false\n },\n actionButtons: readOnly\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle: readOnly\n ? undefined\n : {\n ...checkboxWithTitleProps,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n customStyle: {fontWeight: 600, color: COLORS.neutral_500, fontSize: '16px'},\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={style.contentContainer}>\n <Title {...titleProps} />\n <ListItems {...listProps} />\n </div>\n );\n};\n\nconst SkillEdition = (props: SkillEditionPropsType) => {\n const {skillInformations, translations, content, isFetching = false, readOnly} = props;\n\n return isFetching ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <div className={style.container}>\n <SkillInformations {...skillInformations} readOnly={readOnly} />\n <Translations {...translations} readOnly={readOnly} />\n <Content {...content} readOnly={readOnly} />\n </div>\n );\n};\n\nSkillEdition.propTypes = propTypes;\n\nexport default SkillE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AIC,KAA4B,IAAK;EACrD,MAAM;IAAClG,iBAAiB;IAAEmG,YAAY;IAAE7B,OAAO;IAAEkB,UAAU,GAAG,KAAK;IAAEvG;EAAQ,CAAC,GAAGiH,KAAK;EAEtF,OAAOV,UAAU,gBACfpI,MAAA,CAAAa,OAAA,CAAAsD,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAAC2E;EAAgB,gBACpChJ,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAAC3D,OAAA,CAAAK,OAAM;IAACuD,SAAS,EAAEC,cAAK,CAAC4E,MAAO;IAACjH,KAAK,EAAC;EAAc,CAAE,CACpD,CAAC,gBAENhC,MAAA,CAAAa,OAAA,CAAAsD,aAAA;IAAKC,SAAS,EAAEC,cAAK,CAAC6E;EAAU,gBAC9BlJ,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAACxB,iBAAiB,EAAA7B,QAAA,KAAK8B,iBAAiB;IAAEf,QAAQ,EAAEA;EAAS,EAAE,CAAC,eAChE7B,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAAC6B,YAAY,EAAAlF,QAAA,KAAKiI,YAAY;IAAElH,QAAQ,EAAEA;EAAS,EAAE,CAAC,eACtD7B,MAAA,CAAAa,OAAA,CAAAsD,aAAA,CAAC0D,OAAO,EAAA/G,QAAA,KAAKoG,OAAO;IAAErF,QAAQ,EAAEA;EAAS,EAAE,CACxC,CACN;AACH,CAAC;AAEDgH,YAAY,CAACM,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAA3I,OAAA,GAEpBgI,YAAY","ignoreList":[]}
|
|
@@ -113,7 +113,7 @@ declare const SkillEditionPropTypes: {
|
|
|
113
113
|
title: PropTypes.Validator<string>;
|
|
114
114
|
onEditClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
115
115
|
onDeleteClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
116
|
-
|
|
116
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
117
117
|
}>>;
|
|
118
118
|
}>;
|
|
119
119
|
button: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
@@ -125,7 +125,7 @@ declare const SkillEditionPropTypes: {
|
|
|
125
125
|
title: PropTypes.Requireable<string>;
|
|
126
126
|
description: PropTypes.Requireable<string>;
|
|
127
127
|
}>>;
|
|
128
|
-
|
|
128
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
129
129
|
}>>>;
|
|
130
130
|
content: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
131
131
|
title: PropTypes.Validator<string>;
|
|
@@ -176,10 +176,10 @@ declare const SkillEditionPropTypes: {
|
|
|
176
176
|
checked: PropTypes.Requireable<boolean>;
|
|
177
177
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
178
178
|
}>>;
|
|
179
|
-
|
|
179
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
180
180
|
}>>>;
|
|
181
181
|
isFetching: PropTypes.Requireable<boolean>;
|
|
182
|
-
|
|
182
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
183
183
|
};
|
|
184
184
|
export default SkillEditionPropTypes;
|
|
185
185
|
export declare type SelectOption = {
|
|
@@ -244,7 +244,7 @@ export declare type TranslationPropsType = {
|
|
|
244
244
|
title: string;
|
|
245
245
|
onEditClick: () => void;
|
|
246
246
|
onDeleteClick: () => void;
|
|
247
|
-
|
|
247
|
+
readOnly?: boolean;
|
|
248
248
|
};
|
|
249
249
|
};
|
|
250
250
|
button: {
|
|
@@ -256,7 +256,7 @@ export declare type TranslationPropsType = {
|
|
|
256
256
|
title: string;
|
|
257
257
|
description: string;
|
|
258
258
|
};
|
|
259
|
-
|
|
259
|
+
readOnly?: boolean;
|
|
260
260
|
};
|
|
261
261
|
export declare type ContentListItemType = {
|
|
262
262
|
ref: string;
|
|
@@ -306,14 +306,14 @@ export declare type ContentPropsType = {
|
|
|
306
306
|
actionButtons?: ButtonLinkProps[];
|
|
307
307
|
checkboxWithTitle?: CheckboxWithTitleProps;
|
|
308
308
|
isFetching?: boolean;
|
|
309
|
-
|
|
309
|
+
readOnly?: boolean;
|
|
310
310
|
};
|
|
311
311
|
export declare type SkillEditionPropsType = {
|
|
312
312
|
skillInformations: SkillInformationsProps;
|
|
313
313
|
translations: TranslationPropsType;
|
|
314
314
|
content: ContentPropsType;
|
|
315
315
|
isFetching?: boolean;
|
|
316
|
-
|
|
316
|
+
readOnly?: boolean;
|
|
317
317
|
};
|
|
318
318
|
export declare type InputTextProps = {
|
|
319
319
|
autoFocus?: boolean;
|
|
@@ -53,7 +53,7 @@ const translationPropTypes = _propTypes.default.shape({
|
|
|
53
53
|
title: _propTypes.default.string.isRequired,
|
|
54
54
|
onEditClick: _propTypes.default.func.isRequired,
|
|
55
55
|
onDeleteClick: _propTypes.default.func.isRequired,
|
|
56
|
-
|
|
56
|
+
readOnly: _propTypes.default.bool
|
|
57
57
|
}).isRequired),
|
|
58
58
|
button: _propTypes.default.shape({
|
|
59
59
|
label: _propTypes.default.string.isRequired,
|
|
@@ -64,7 +64,7 @@ const translationPropTypes = _propTypes.default.shape({
|
|
|
64
64
|
title: _propTypes.default.string,
|
|
65
65
|
description: _propTypes.default.string
|
|
66
66
|
}),
|
|
67
|
-
|
|
67
|
+
readOnly: _propTypes.default.bool
|
|
68
68
|
});
|
|
69
69
|
const contentPropTypes = _propTypes.default.shape({
|
|
70
70
|
title: _propTypes.default.string.isRequired,
|
|
@@ -115,7 +115,7 @@ const contentPropTypes = _propTypes.default.shape({
|
|
|
115
115
|
checked: _propTypes.default.bool,
|
|
116
116
|
onChange: _propTypes.default.func
|
|
117
117
|
}),
|
|
118
|
-
|
|
118
|
+
readOnly: _propTypes.default.bool
|
|
119
119
|
});
|
|
120
120
|
const SkillEditionPropTypes = {
|
|
121
121
|
skillInformations: _propTypes.default.shape({
|
|
@@ -125,7 +125,7 @@ const SkillEditionPropTypes = {
|
|
|
125
125
|
translations: translationPropTypes.isRequired,
|
|
126
126
|
content: contentPropTypes.isRequired,
|
|
127
127
|
isFetching: _propTypes.default.bool,
|
|
128
|
-
|
|
128
|
+
readOnly: _propTypes.default.bool
|
|
129
129
|
};
|
|
130
130
|
var _default = exports.default = SkillEditionPropTypes;
|
|
131
131
|
const themeStyle = exports.themeStyle = {
|