@coorpacademy/components 11.34.2 → 11.34.3-alpha.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.
- package/es/organism/skill-edition/index.d.ts +1065 -1383
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +109 -2
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/types.d.ts +87 -370
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +39 -4
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +47 -366
- package/lib/organism/skill-edition/index.d.ts +1065 -1383
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +109 -2
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/types.d.ts +87 -370
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +39 -4
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +47 -366
- package/locales/.mtslconfig.json +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAOnC,OAAkB,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AA6CrD,QAAA,MAAM,YAAY;YAAW,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F7C,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -5,19 +5,126 @@ import Title from '../../atom/title';
|
|
|
5
5
|
import TitleAndInput from '../title-and-input';
|
|
6
6
|
import propTypes from './types';
|
|
7
7
|
import style from './style.css';
|
|
8
|
+
const buildFormField = (field, type) => {
|
|
9
|
+
return {
|
|
10
|
+
...field,
|
|
11
|
+
type,
|
|
12
|
+
theme: 'coorpmanager',
|
|
13
|
+
size: 'large'
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const buildTitleAndInputField = ({
|
|
17
|
+
title,
|
|
18
|
+
subtitle,
|
|
19
|
+
required = false,
|
|
20
|
+
dataName,
|
|
21
|
+
childType
|
|
22
|
+
}) => {
|
|
23
|
+
return {
|
|
24
|
+
title: {
|
|
25
|
+
type: 'form-group',
|
|
26
|
+
title,
|
|
27
|
+
subtitle,
|
|
28
|
+
titleSize: 'small-and-light',
|
|
29
|
+
subtitleSize: subtitle ? 'standard-without-margin' : undefined,
|
|
30
|
+
required,
|
|
31
|
+
'data-name': dataName
|
|
32
|
+
},
|
|
33
|
+
childType,
|
|
34
|
+
type: 'titleAndInput'
|
|
35
|
+
};
|
|
36
|
+
};
|
|
8
37
|
const SkillEdition = props => {
|
|
9
38
|
const {
|
|
10
39
|
skillInformations,
|
|
11
40
|
translations,
|
|
12
41
|
content
|
|
13
42
|
} = props;
|
|
43
|
+
const {
|
|
44
|
+
form,
|
|
45
|
+
iconEditor
|
|
46
|
+
} = skillInformations;
|
|
47
|
+
const {
|
|
48
|
+
select,
|
|
49
|
+
inputTextArea,
|
|
50
|
+
inputText
|
|
51
|
+
} = form;
|
|
52
|
+
const fields = [{
|
|
53
|
+
...buildTitleAndInputField({
|
|
54
|
+
title: select.title,
|
|
55
|
+
subtitle: select.subtitle,
|
|
56
|
+
required: true,
|
|
57
|
+
dataName: select['data-name'],
|
|
58
|
+
childType: 'select'
|
|
59
|
+
}),
|
|
60
|
+
field: {
|
|
61
|
+
options: select.field.options,
|
|
62
|
+
'aria-label': select.field['aria-label'],
|
|
63
|
+
onChange: select.field.onChange,
|
|
64
|
+
theme: 'skillDetail',
|
|
65
|
+
size: 'large'
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
...buildTitleAndInputField({
|
|
69
|
+
title: inputText.title,
|
|
70
|
+
required: true,
|
|
71
|
+
childType: 'inputText'
|
|
72
|
+
}),
|
|
73
|
+
field: buildFormField(inputText.field, 'text')
|
|
74
|
+
}, {
|
|
75
|
+
...buildTitleAndInputField({
|
|
76
|
+
title: inputTextArea.title,
|
|
77
|
+
childType: 'inputTextArea'
|
|
78
|
+
}),
|
|
79
|
+
field: buildFormField(inputTextArea.field, 'textarea')
|
|
80
|
+
}];
|
|
81
|
+
const formProps = {
|
|
82
|
+
title: skillInformations.form.title,
|
|
83
|
+
subtitle: skillInformations.form.subtitle,
|
|
84
|
+
titleSize: 'xl-strong',
|
|
85
|
+
subtitleSize: 'medium',
|
|
86
|
+
fields
|
|
87
|
+
};
|
|
88
|
+
const iconEditorProps = {
|
|
89
|
+
title: {
|
|
90
|
+
type: 'form-group',
|
|
91
|
+
title: iconEditor.title,
|
|
92
|
+
titleSize: 'small-and-light',
|
|
93
|
+
required: true
|
|
94
|
+
},
|
|
95
|
+
field: {
|
|
96
|
+
iconPreview: iconEditor.iconPreview,
|
|
97
|
+
inputText: iconEditor.inputText,
|
|
98
|
+
buttonLink: {
|
|
99
|
+
type: 'secondary',
|
|
100
|
+
label: iconEditor.buttonLink.label,
|
|
101
|
+
ariaLabel: iconEditor.buttonLink.ariaLabel,
|
|
102
|
+
dataName: iconEditor.buttonLink.ariaLabel,
|
|
103
|
+
icon: {
|
|
104
|
+
position: 'left',
|
|
105
|
+
faIcon: {
|
|
106
|
+
name: 'arrows-rotate',
|
|
107
|
+
size: 16
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
onClick: iconEditor.buttonLink.onClick,
|
|
111
|
+
customStyle: {
|
|
112
|
+
borderRadius: '12px',
|
|
113
|
+
padding: '0 8px 0 16px',
|
|
114
|
+
fontWeight: '500'
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
size: 'large'
|
|
118
|
+
},
|
|
119
|
+
childType: 'iconEditor'
|
|
120
|
+
};
|
|
14
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
15
122
|
className: style.container
|
|
16
123
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17
124
|
className: style.skillInformationsContainer
|
|
18
|
-
}, /*#__PURE__*/React.createElement(BrandFormGroup,
|
|
125
|
+
}, /*#__PURE__*/React.createElement(BrandFormGroup, formProps), /*#__PURE__*/React.createElement("div", {
|
|
19
126
|
className: style.iconEditor
|
|
20
|
-
}, /*#__PURE__*/React.createElement(TitleAndInput,
|
|
127
|
+
}, /*#__PURE__*/React.createElement(TitleAndInput, iconEditorProps))), /*#__PURE__*/React.createElement(ListItems, translations), /*#__PURE__*/React.createElement("div", {
|
|
21
128
|
className: style.contentContainer
|
|
22
129
|
}, /*#__PURE__*/React.createElement(Title, content.title), /*#__PURE__*/React.createElement(ListItems, content.listContent)));
|
|
23
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","BrandFormGroup","ListItems","Title","TitleAndInput","propTypes","style","SkillEdition","props","skillInformations","translations","content","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","BrandFormGroup","ListItems","Title","TitleAndInput","propTypes","style","buildFormField","field","type","theme","size","buildTitleAndInputField","title","subtitle","required","dataName","childType","titleSize","subtitleSize","undefined","SkillEdition","props","skillInformations","translations","content","form","iconEditor","select","inputTextArea","inputText","fields","options","onChange","formProps","iconEditorProps","iconPreview","buttonLink","label","ariaLabel","icon","position","faIcon","name","onClick","customStyle","borderRadius","padding","fontWeight","createElement","className","container","skillInformationsContainer","contentContainer","listContent","process","env","NODE_ENV"],"sources":["../../../src/organism/skill-edition/index.tsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport TitleAndInput from '../title-and-input';\nimport InputText from '../../atom/input-text';\nimport InputTextarea from '../../atom/input-textarea';\nimport propTypes, {SkillEditionProps} from './types';\nimport style from './style.css';\n\nconst buildFormField = (\n field:\n | PropTypes.InferProps<typeof InputText.propTypes>\n | PropTypes.InferProps<typeof InputTextarea.propTypes>,\n type: 'text' | 'textarea'\n) => {\n return {\n ...field,\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 SkillEdition = (props: SkillEditionProps) => {\n const {skillInformations, translations, content} = props;\n const {form, iconEditor} = skillInformations;\n const {select, inputTextArea, inputText} = form;\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 }\n },\n {\n ...buildTitleAndInputField({\n title: inputText.title,\n required: true,\n childType: 'inputText'\n }),\n field: buildFormField(inputText.field, 'text')\n },\n {\n ...buildTitleAndInputField({\n title: inputTextArea.title,\n childType: 'inputTextArea'\n }),\n field: buildFormField(inputTextArea.field, 'textarea')\n }\n ];\n\n const formProps = {\n title: skillInformations.form.title,\n subtitle: skillInformations.form.subtitle,\n titleSize: 'xl-strong',\n subtitleSize: 'medium',\n fields\n };\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,\n buttonLink: {\n type: 'secondary',\n label: iconEditor.buttonLink.label,\n ariaLabel: iconEditor.buttonLink.ariaLabel,\n dataName: iconEditor.buttonLink.ariaLabel,\n icon: {\n position: 'left',\n faIcon: {\n name: 'arrows-rotate',\n size: 16\n }\n },\n onClick: iconEditor.buttonLink.onClick,\n customStyle: {borderRadius: '12px', padding: '0 8px 0 16px', fontWeight: '500'}\n },\n size: 'large'\n },\n childType: 'iconEditor'\n };\n\n return (\n <div className={style.container}>\n <div className={style.skillInformationsContainer}>\n <BrandFormGroup {...formProps} />\n <div className={style.iconEditor}>\n <TitleAndInput {...iconEditorProps} />\n </div>\n </div>\n <ListItems {...translations} />\n <div className={style.contentContainer}>\n <Title {...content.title} />\n <ListItems {...content.listContent} />\n </div>\n </div>\n );\n};\n\nSkillEdition.propTypes = propTypes;\n\nexport default SkillEdition;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,aAAa,MAAM,oBAAoB;AAG9C,OAAOC,SAAS,MAA2B,SAAS;AACpD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,cAAc,GAAGA,CACrBC,KAEwD,EACxDC,IAAyB,KACtB;EACH,OAAO;IACL,GAAGD,KAAK;IACRC,IAAI;IACJC,KAAK,EAAE,cAAc;IACrBC,IAAI,EAAE;EACR,CAAC;AACH,CAAC;AAED,MAAMC,uBAAuB,GAAGA,CAAC;E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