@coorpacademy/components 11.34.3 → 11.34.4-alpha.3
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/icon-editor/index.d.ts.map +1 -1
- package/es/organism/icon-editor/index.js +13 -6
- package/es/organism/icon-editor/index.js.map +1 -1
- 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 +115 -5
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/types.d.ts +87 -371
- 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/icon-editor/index.d.ts.map +1 -1
- package/lib/organism/icon-editor/index.js +13 -6
- package/lib/organism/icon-editor/index.js.map +1 -1
- 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 +115 -5
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/types.d.ts +87 -371
- 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/icon-editor/index.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGtE,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,UAAU;YAAW,eAAe,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/icon-editor/index.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAGtE,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,UAAU;YAAW,eAAe,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B1E,CAAC;AAQF,eAAe,UAAU,CAAC"}
|
|
@@ -18,11 +18,18 @@ const IconEditor = (props, legacyContext) => {
|
|
|
18
18
|
title,
|
|
19
19
|
icon
|
|
20
20
|
} = iconPreview;
|
|
21
|
-
const
|
|
21
|
+
const {
|
|
22
|
+
value,
|
|
23
|
+
description,
|
|
24
|
+
handleChange
|
|
25
|
+
} = inputText;
|
|
26
|
+
const isValidColor = validateColor(inputText.value);
|
|
27
|
+
const previewColor = isValidColor ? value : COLORS.white;
|
|
28
|
+
const inputError = value && (!isValidColor ? translate('invalid_color') : undefined);
|
|
22
29
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPreview, {
|
|
23
30
|
icon: {
|
|
24
31
|
...icon,
|
|
25
|
-
color:
|
|
32
|
+
color: previewColor
|
|
26
33
|
},
|
|
27
34
|
title: title
|
|
28
35
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -32,12 +39,12 @@ const IconEditor = (props, legacyContext) => {
|
|
|
32
39
|
title: translate('icon_editor_color'),
|
|
33
40
|
placeholder: COLORS.white,
|
|
34
41
|
theme: "coorpmanager",
|
|
35
|
-
description:
|
|
36
|
-
value:
|
|
37
|
-
error:
|
|
42
|
+
description: description,
|
|
43
|
+
value: value,
|
|
44
|
+
error: inputError,
|
|
38
45
|
disabled: false,
|
|
39
46
|
valid: false,
|
|
40
|
-
onChange:
|
|
47
|
+
onChange: handleChange,
|
|
41
48
|
inputColor: true
|
|
42
49
|
}), /*#__PURE__*/React.createElement(ButtonLink, buttonLink)));
|
|
43
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","IconPreview","InputText","ButtonLink","Provider","GetTranslateFromContext","validateColor","COLORS","style","propTypes","IconEditor","props","legacyContext","translate","iconPreview","inputText","buttonLink","title","icon","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","IconPreview","InputText","ButtonLink","Provider","GetTranslateFromContext","validateColor","COLORS","style","propTypes","IconEditor","props","legacyContext","translate","iconPreview","inputText","buttonLink","title","icon","value","description","handleChange","isValidColor","previewColor","white","inputError","undefined","createElement","Fragment","color","className","inputButtonContainer","type","placeholder","theme","error","disabled","valid","onChange","inputColor","contextTypes","childContextTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/icon-editor/index.tsx"],"sourcesContent":["import React from 'react';\nimport IconPreview from '../../molecule/icon-preview';\nimport InputText from '../../atom/input-text';\nimport ButtonLink from '../../atom/button-link';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {validateColor} from '../../util/validate-color';\nimport type {WebContextValues} from '../../atom/provider/web-context';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\nimport propTypes, {IconEditorProps} from './types';\n\nconst IconEditor = (props: IconEditorProps, legacyContext: WebContextValues) => {\n const translate = GetTranslateFromContext(legacyContext);\n const {iconPreview, inputText, buttonLink} = props;\n const {title, icon} = iconPreview;\n const {value, description, handleChange} = inputText;\n\n const isValidColor = validateColor(inputText.value);\n const previewColor = isValidColor ? value : COLORS.white;\n const inputError = value && (!isValidColor ? translate('invalid_color') : undefined);\n\n return (\n <>\n <IconPreview icon={{...icon, color: previewColor}} title={title} />\n <div className={style.inputButtonContainer}>\n <InputText\n type=\"text\"\n title={translate('icon_editor_color')}\n placeholder={COLORS.white}\n theme=\"coorpmanager\"\n description={description}\n value={value}\n error={inputError}\n disabled={false}\n valid={false}\n onChange={handleChange}\n inputColor\n />\n <ButtonLink {...buttonLink} />\n </div>\n </>\n );\n};\n\nIconEditor.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nIconEditor.propTypes = propTypes;\n\nexport default IconEditor;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,WAAW,MAAM,6BAA6B;AACrD,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,qBAAqB;AACrE,SAAQC,aAAa,QAAO,2BAA2B;AAEvD,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,MAAyB,SAAS;AAElD,MAAMC,UAAU,GAAGA,CAACC,KAAsB,EAAEC,aAA+B,KAAK;EAC9E,MAAMC,SAAS,GAAGR,uBAAuB,CAACO,aAAa,CAAC;EACxD,MAAM;IAACE,WAAW;IAAEC,SAAS;IAAEC;EAAU,CAAC,GAAGL,KAAK;EAClD,MAAM;IAACM,KAAK;IAAEC;EAAI,CAAC,GAAGJ,WAAW;EACjC,MAAM;IAACK,KAAK;IAAEC,WAAW;IAAEC;EAAY,CAAC,GAAGN,SAAS;EAEpD,MAAMO,YAAY,GAAGhB,aAAa,CAACS,SAAS,CAACI,KAAK,CAAC;EACnD,MAAMI,YAAY,GAAGD,YAAY,GAAGH,KAAK,GAAGZ,MAAM,CAACiB,KAAK;EACxD,MAAMC,UAAU,GAAGN,KAAK,KAAK,CAACG,YAAY,GAAGT,SAAS,CAAC,eAAe,CAAC,GAAGa,SAAS,CAAC;EAEpF,oBACE1B,KAAA,CAAA2B,aAAA,CAAA3B,KAAA,CAAA4B,QAAA,qBACE5B,KAAA,CAAA2B,aAAA,CAAC1B,WAAW;IAACiB,IAAI,EAAE;MAAC,GAAGA,IAAI;MAAEW,KAAK,EAAEN;IAAY,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