@coorpacademy/components 11.14.23 → 11.14.24-alpha.11
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/autocomplete/index.d.ts +3 -1
- package/es/atom/autocomplete/index.d.ts.map +1 -1
- package/es/atom/autocomplete/index.js +55 -19
- package/es/atom/autocomplete/index.js.map +1 -1
- package/es/atom/autocomplete/style.css +223 -0
- package/es/molecule/brand-form-group/index.d.ts +3 -1
- package/es/molecule/select-multiple/index.d.ts.map +1 -1
- package/es/molecule/select-multiple/index.js +2 -1
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/select-multiple/style.css +1 -1
- package/es/organism/brand-form/index.d.ts +4 -1
- package/es/organism/brand-form/index.d.ts.map +1 -1
- package/es/organism/brand-form/index.js +17 -7
- package/es/organism/brand-form/index.js.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +4 -1
- package/es/template/back-office/brand-update/index.d.ts +4 -1
- package/lib/atom/autocomplete/index.d.ts +3 -1
- package/lib/atom/autocomplete/index.d.ts.map +1 -1
- package/lib/atom/autocomplete/index.js +58 -18
- package/lib/atom/autocomplete/index.js.map +1 -1
- package/lib/atom/autocomplete/style.css +223 -0
- package/lib/molecule/brand-form-group/index.d.ts +3 -1
- package/lib/molecule/select-multiple/index.d.ts.map +1 -1
- package/lib/molecule/select-multiple/index.js +2 -1
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/select-multiple/style.css +1 -1
- package/lib/organism/brand-form/index.d.ts +4 -1
- package/lib/organism/brand-form/index.d.ts.map +1 -1
- package/lib/organism/brand-form/index.js +18 -7
- package/lib/organism/brand-form/index.js.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +4 -1
- package/lib/template/back-office/brand-update/index.d.ts +4 -1
- package/locales/.mtslconfig.json +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["themeStyle","setup","style","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","current","getChoices","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","useCallback","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","error","disabled","skin","isOpened","updateIsOpened","useState","nodeRef","useRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","useEffect","document","addEventListener","removeEventListener","isCMTheme","handleOnClickOnListElement","lines","convert","cap","selection","isActive","titleView","classnames","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","hideHint","__html","mainClass","default","showPlaceholder","behaviourClassName","getClassState","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","color","arrow","down","activeChoices","list","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","TitledCheckbox","func","string","arrayOf","oneOf"],"sources":["../../../src/molecule/select-multiple/index.js"],"sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = {current: options};\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n return onChange({...choice, selected: checked});\n },\n [onChange, choice]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} title={choice.name} data-name={`${choice.name}-language`}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(\n e => {\n if (disabled) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n updateIsOpened(prev => !prev);\n },\n [disabled]\n );\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n return onChange(getChoices());\n }\n updateIsOpened(false);\n return onChange(choice);\n },\n [multiple, onChange, setChoices, getChoices]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const handleOnClickOnListElement = choice => () => handleChange(choice);\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li\n key={i}\n className={style.choice}\n onClick={isCMTheme && !multiple ? handleOnClickOnListElement({...choice, i}) : null}\n >\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView = isCMTheme ? (\n <div\n className={classnames(style.hint, isActive && style.hideHint)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div\n className={style.select}\n title={selection || placeholder}\n data-name={`select-languages`}\n onClick={handleOnClick}\n >\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n style={{color: black}}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n style={{color: black}}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,KAAK,EAAEC,cAAA,CAAMD,KADI;EAEjBE,OAAO,EAAED,cAAA,CAAMC,OAFE;EAGjBC,OAAO,EAAEF,cAAA,CAAME,OAHE;EAIjBC,YAAY,EAAEH,cAAA,CAAMG;AAJH,CAAnB;;AAOO,MAAMC,UAAU,GAAGC,OAAO,IAAI;EACnC,MAAMC,UAAU,GAAG;IAACC,OAAO,EAAEF;EAAV,CAAnB;;EAEA,MAAMG,UAAU,GAAG,MAAM;IACvB,OAAOF,UAAU,CAACC,OAAlB;EACD,CAFD;;EAIA,MAAME,UAAU,GAAGC,MAAM,IAAI;IAC3B,MAAMC,OAAO,GAAG,mBAAK,IAAGD,MAAM,CAACE,CAAE,YAAjB,EAA8B,CAACF,MAAM,CAACG,QAAtC,EAAgDL,UAAU,EAA1D,CAAhB;IAEAF,UAAU,CAACC,OAAX,GAAqBI,OAAO,CAACG,MAAR,CAAeC,CAAC,IAAIA,CAAC,CAACF,QAAtB,CAArB;EACD,CAJD;;EAMA,OAAO,CAACL,UAAD,EAAaC,U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a;IAAK,SAAS,EAAEtD,cAAA,CAAM4B;EAAtB,GAAoCA,WAApC,CAAb,GAAsE,IA1CzE,EA2CGyC,QA3CH,CADF;AA+CD,CApLD;;AAsLA7C,cAAc,CAACiE,YAAf,GAA8B;EAC5BvD,IAAI,EAAEwD,iBAAA,CAASC,iBAAT,CAA2BzD;AADL,CAA9B;AAIAlB,cAAc,CAAC4E,SAAf,2CAA2B;EACzB3E,QAAQ,EAAE4E,kBAAA,CAAUC,IADK;EAEzBpF,MAAM,EAAEqF,uBAAA,CAAeH,SAAf,CAAyBlF,MAFR;EAGzBQ,QAAQ,EAAE2E,kBAAA,CAAUG;AAHK,CAA3B;AAMAxE,cAAc,CAACoE,SAAf,2CAA2B;EACzBnE,KAAK,EAAEoE,kBAAA,CAAUI,MADQ;EAEzBtE,WAAW,EAAEkE,kBAAA,CAAUI,MAFE;EAGzBrE,WAAW,EAAEiE,kBAAA,CAAUI,MAHE;EAIzBpE,IAAI,EAAEgE,kBAAA,CAAUI,MAJS;EAKzB5F,OAAO,EAAEwF,kBAAA,CAAUK,OAAV,CAAkBH,uBAAA,CAAeH,SAAf,CAAyBlF,MAA3C,CALgB;EAMzBQ,QAAQ,EAAE2E,kBAAA,CAAUG,IANK;EAOzBlE,OAAO,EAAE+D,kBAAA,CAAUG,IAPM;EAQzB/E,QAAQ,EAAE4E,kBAAA,CAAUC,IARK;EASzB/D,QAAQ,EAAE8D,kBAAA,CAAUC,IATK;EAUzB7D,QAAQ,EAAE4D,kBAAA,CAAUC,IAVK;EAWzB9D,KAAK,EAAE6D,kBAAA,CAAUI,MAXQ;EAYzBvE,KAAK,EAAEmE,kBAAA,CAAUM,KAAV,CAAgB,oBAAKrG,UAAL,CAAhB;AAZkB,CAA3B;eAee0B,c"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["themeStyle","setup","style","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","current","getChoices","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","useCallback","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","error","disabled","skin","isOpened","updateIsOpened","useState","nodeRef","useRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","console","log","useEffect","document","addEventListener","removeEventListener","isCMTheme","handleOnClickOnListElement","lines","convert","cap","selection","isActive","titleView","classnames","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","hideHint","__html","mainClass","default","showPlaceholder","behaviourClassName","getClassState","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","color","arrow","down","activeChoices","list","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","TitledCheckbox","func","string","arrayOf","oneOf"],"sources":["../../../src/molecule/select-multiple/index.js"],"sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = {current: options};\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n return onChange({...choice, selected: checked});\n },\n [onChange, choice]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} title={choice.name} data-name={`${choice.name}-language`}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(\n e => {\n if (disabled) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n updateIsOpened(prev => !prev);\n },\n [disabled]\n );\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n console.log('--->', choice);\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n return onChange(getChoices());\n }\n updateIsOpened(false);\n return onChange(choice);\n },\n [multiple, onChange, setChoices, getChoices]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const handleOnClickOnListElement = choice => () => handleChange(choice);\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li\n key={i}\n className={style.choice}\n onClick={isCMTheme && !multiple ? handleOnClickOnListElement({...choice, i}) : null}\n >\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView = isCMTheme ? (\n <div\n className={classnames(style.hint, isActive && style.hideHint)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div\n className={style.select}\n title={selection || placeholder}\n data-name={`select-languages`}\n onClick={handleOnClick}\n >\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n style={{color: black}}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n style={{color: black}}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;EACjBC,KAAK,EAAEC,cAAA,CAAMD,KADI;EAEjBE,OAAO,EAAED,cAAA,CAAMC,OAFE;EAGjBC,OAAO,EAAEF,cAAA,CAAME,OAHE;EAIjBC,YAAY,EAAEH,cAAA,CAAMG;AAJH,CAAnB;;AAOO,MAAMC,UAAU,GAAGC,OAAO,IAAI;EACnC,MAAMC,UAAU,GAAG;IAACC,OAAO,EAAEF;EAAV,CAAnB;;EAEA,MAAMG,UAAU,GAAG,MAAM;IACvB,OAAOF,UAAU,CAACC,OAAlB;EACD,CAFD;;EAIA,MAAME,UAAU,GAAGC,MAAM,IAAI;IAC3B,MAAMC,OAAO,GAAG,mBAAK,IAAGD,MAAM,CAACE,CAAE,YAAjB,EAA8B,CAACF,MAAM,CAACG,QAAtC,EAAgDL,UAAU,EAA1D,CAAhB;IAEAF,UAAU,CAACC,OAAX,GAAqBI,OAAO,CAACG,MAAR,CAAeC,CAAC,IAAIA,CAAC,CAACF,QAAtB,CAArB;EACD,CAJD;;EAMA,OAAO,CAACL,UAAD,EAAaC,UAAb,CAAP;AACD,CAdM;;;;AAgBP,MAAMO,cAAc,GAAG,CAAC;EAACC,QAAD;E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+
errorMessage: PropTypes.Requireable<string>;
|
|
66
67
|
suggestions: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
67
68
|
name: PropTypes.Requireable<string>;
|
|
68
69
|
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
69
70
|
}> | null | undefined)[]>;
|
|
70
|
-
|
|
71
|
+
theme: PropTypes.Requireable<string>;
|
|
72
|
+
onInput: PropTypes.Requireable<(...args: any[]) => any>;
|
|
71
73
|
onFetch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
72
74
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
73
75
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -510,6 +512,7 @@ declare namespace BrandForm {
|
|
|
510
512
|
}>>;
|
|
511
513
|
export { tooltip_1 as tooltip };
|
|
512
514
|
export const isLoading: PropTypes.Requireable<boolean>;
|
|
515
|
+
export const theme: PropTypes.Requireable<string>;
|
|
513
516
|
}
|
|
514
517
|
}
|
|
515
518
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/brand-form/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/brand-form/index.js"],"names":[],"mappings":";AA6DA,kEA+EC"}
|
|
@@ -17,6 +17,8 @@ var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
|
17
17
|
|
|
18
18
|
var _button = _interopRequireDefault(require("../../atom/button"));
|
|
19
19
|
|
|
20
|
+
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
21
|
+
|
|
20
22
|
var _link = _interopRequireDefault(require("../../atom/link"));
|
|
21
23
|
|
|
22
24
|
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
@@ -29,7 +31,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
32
|
-
const buildButtonSection = (onSubmit, submitValue, onReset, resetValue, tooltip, disabled, isModified, isPending, darkColor) => {
|
|
34
|
+
const buildButtonSection = (onSubmit, submitValue, onReset, resetValue, tooltip, disabled, isModified, isPending, darkColor, theme) => {
|
|
33
35
|
if (!onSubmit && !onReset) {
|
|
34
36
|
return null;
|
|
35
37
|
}
|
|
@@ -39,7 +41,14 @@ const buildButtonSection = (onSubmit, submitValue, onReset, resetValue, tooltip,
|
|
|
39
41
|
"data-tip": tooltip.title,
|
|
40
42
|
"data-for": "submitButton",
|
|
41
43
|
className: _style.default.saveButton
|
|
42
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
44
|
+
}, theme === 'coorpmanager' ? /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
45
|
+
type: "primary",
|
|
46
|
+
label: submitValue,
|
|
47
|
+
disabled: disabledSubmit,
|
|
48
|
+
"data-testid": "submit-button",
|
|
49
|
+
buttonType: "submit",
|
|
50
|
+
onClick: onSubmit
|
|
51
|
+
}) : /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
43
52
|
type: "submit",
|
|
44
53
|
disabled: disabledSubmit,
|
|
45
54
|
submitValue: submitValue
|
|
@@ -59,7 +68,7 @@ const buildButtonSection = (onSubmit, submitValue, onReset, resetValue, tooltip,
|
|
|
59
68
|
}, submitButton, resetButton);
|
|
60
69
|
};
|
|
61
70
|
|
|
62
|
-
|
|
71
|
+
const BrandForm = (props, context) => {
|
|
63
72
|
const {
|
|
64
73
|
groups,
|
|
65
74
|
disabled,
|
|
@@ -71,7 +80,8 @@ function BrandForm(props, context) {
|
|
|
71
80
|
resetValue,
|
|
72
81
|
back,
|
|
73
82
|
tooltip,
|
|
74
|
-
isLoading
|
|
83
|
+
isLoading,
|
|
84
|
+
theme
|
|
75
85
|
} = props;
|
|
76
86
|
const {
|
|
77
87
|
skin
|
|
@@ -94,7 +104,7 @@ function BrandForm(props, context) {
|
|
|
94
104
|
key: index
|
|
95
105
|
}, /*#__PURE__*/_react.default.createElement(_brandFormGroup.default, group));
|
|
96
106
|
});
|
|
97
|
-
const buttonSection = buildButtonSection(onSubmit, submitValue, onReset, resetValue, tooltip, disabled, isModified, isPending, darkColor);
|
|
107
|
+
const buttonSection = buildButtonSection(onSubmit, submitValue, onReset, resetValue, tooltip, disabled, isModified, isPending, darkColor, theme);
|
|
98
108
|
const handleSubmit = (0, _react.useMemo)(() => e => {
|
|
99
109
|
e.preventDefault();
|
|
100
110
|
return onSubmit(e);
|
|
@@ -113,7 +123,7 @@ function BrandForm(props, context) {
|
|
|
113
123
|
onReset: handleReset,
|
|
114
124
|
className: _style.default.form
|
|
115
125
|
}, brandGroups, buttonSection));
|
|
116
|
-
}
|
|
126
|
+
};
|
|
117
127
|
|
|
118
128
|
BrandForm.contextTypes = {
|
|
119
129
|
skin: _provider.default.childContextTypes.skin
|
|
@@ -141,7 +151,8 @@ BrandForm.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
141
151
|
title: _propTypes.default.string,
|
|
142
152
|
place: _propTypes.default.string
|
|
143
153
|
}),
|
|
144
|
-
isLoading: _propTypes.default.bool
|
|
154
|
+
isLoading: _propTypes.default.bool,
|
|
155
|
+
theme: _propTypes.default.string
|
|
145
156
|
} : {};
|
|
146
157
|
var _default = BrandForm;
|
|
147
158
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["buildButtonSection","onSubmit","submitValue","onReset","resetValue","tooltip","disabled","isModified","isPending","darkColor","disabledSubmit","submitButton","title","style","saveButton","cancelBackground","backgroundColor","resetButton","buttons","BrandForm","props","context","groups","back","isLoading","skin","backView","color","arrowBack","link","backDesc","desc","brandGroups","map","group","index","buttonSection","handleSubmit","useMemo","e","preventDefault","handleReset","loaderContainer","loader","form","contextTypes","Provider","childContextTypes","defaultProps","place","propTypes","PropTypes","arrayOf","shape","BrandFormGroup","isRequired","bool","func","Button","Link","children","href","string"],"sources":["../../../src/organism/brand-form/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowLeft as ArrowLeft} from '@coorpacademy/nova-icons';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport Link from '../../atom/link';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildButtonSection = (\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n tooltip,\n disabled,\n isModified,\n isPending,\n darkColor\n) => {\n if (!onSubmit && !onReset) {\n return null;\n }\n\n const disabledSubmit = disabled || isPending || !isModified;\n const submitButton = onSubmit ? (\n <div data-tip={tooltip.title} data-for=\"submitButton\" className={style.saveButton}>\n <Button type=\"submit\" disabled={disabledSubmit} submitValue={submitValue} />\n </div>\n ) : null;\n\n const cancelBackground = {backgroundColor: darkColor};\n\n const resetButton = onReset ? (\n <div className={style.resetButton}>\n <Button type=\"reset\" submitValue={resetValue} style={cancelBackground} />\n </div>\n ) : null;\n\n return (\n <div className={style.buttons}>\n {submitButton}\n {resetButton}\n </div>\n );\n};\
|
|
1
|
+
{"version":3,"file":"index.js","names":["buildButtonSection","onSubmit","submitValue","onReset","resetValue","tooltip","disabled","isModified","isPending","darkColor","theme","disabledSubmit","submitButton","title","style","saveButton","cancelBackground","backgroundColor","resetButton","buttons","BrandForm","props","context","groups","back","isLoading","skin","backView","color","arrowBack","link","backDesc","desc","brandGroups","map","group","index","buttonSection","handleSubmit","useMemo","e","preventDefault","handleReset","loaderContainer","loader","form","contextTypes","Provider","childContextTypes","defaultProps","place","propTypes","PropTypes","arrayOf","shape","BrandFormGroup","isRequired","bool","func","Button","Link","children","href","string"],"sources":["../../../src/organism/brand-form/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowLeft as ArrowLeft} from '@coorpacademy/nova-icons';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport Provider from '../../atom/provider';\nimport Button from '../../atom/button';\nimport ButtonLink from '../../atom/button-link';\nimport Link from '../../atom/link';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildButtonSection = (\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n tooltip,\n disabled,\n isModified,\n isPending,\n darkColor,\n theme\n) => {\n if (!onSubmit && !onReset) {\n return null;\n }\n\n const disabledSubmit = disabled || isPending || !isModified;\n const submitButton = onSubmit ? (\n <div data-tip={tooltip.title} data-for=\"submitButton\" className={style.saveButton}>\n {theme === 'coorpmanager' ? (\n <ButtonLink\n type=\"primary\"\n label={submitValue}\n disabled={disabledSubmit}\n data-testid=\"submit-button\"\n buttonType=\"submit\"\n onClick={onSubmit}\n />\n ) : (\n <Button type=\"submit\" disabled={disabledSubmit} submitValue={submitValue} />\n )}\n </div>\n ) : null;\n\n const cancelBackground = {backgroundColor: darkColor};\n\n const resetButton = onReset ? (\n <div className={style.resetButton}>\n <Button type=\"reset\" submitValue={resetValue} style={cancelBackground} />\n </div>\n ) : null;\n\n return (\n <div className={style.buttons}>\n {submitButton}\n {resetButton}\n </div>\n );\n};\nconst BrandForm = (props, context) => {\n const {\n groups,\n disabled,\n isModified,\n isPending,\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n back,\n tooltip,\n isLoading,\n theme\n } = props;\n const {skin} = context;\n const darkColor = get('common.dark', skin);\n\n const backView = back ? (\n <p className={style.back}>\n <ArrowLeft style={{color: darkColor}} className={style.arrowBack} />\n <Link href={back.link} className={style.backDesc}>\n {back.desc}\n </Link>\n </p>\n ) : null;\n\n const brandGroups = groups.map((group, index) => {\n return (\n <div className={style.group} key={index}>\n <BrandFormGroup {...group} />\n </div>\n );\n });\n\n const buttonSection = buildButtonSection(\n onSubmit,\n submitValue,\n onReset,\n resetValue,\n tooltip,\n disabled,\n isModified,\n isPending,\n darkColor,\n theme\n );\n\n const handleSubmit = useMemo(\n () => e => {\n e.preventDefault();\n return onSubmit(e);\n },\n [onSubmit]\n );\n\n const handleReset = useMemo(\n () => e => {\n e.preventDefault();\n return onReset(e);\n },\n [onReset]\n );\n\n return (\n <div>\n {backView}\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <form onSubmit={handleSubmit} onReset={handleReset} className={style.form}>\n {brandGroups}\n {buttonSection}\n </form>\n )}\n </div>\n );\n};\n\nBrandForm.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nBrandForm.defaultProps = {\n tooltip: {\n title: '',\n place: 'top'\n }\n};\n\nBrandForm.propTypes = {\n groups: PropTypes.arrayOf(PropTypes.shape(BrandFormGroup.propTypes)).isRequired,\n disabled: PropTypes.bool,\n isModified: PropTypes.bool,\n isPending: PropTypes.bool,\n onSubmit: PropTypes.func,\n submitValue: Button.propTypes.submitValue,\n onReset: PropTypes.func,\n resetValue: Button.propTypes.submitValue,\n back: PropTypes.shape({\n desc: Link.propTypes.children,\n link: Link.propTypes.href\n }),\n tooltip: PropTypes.shape({\n title: PropTypes.string,\n place: PropTypes.string\n }),\n isLoading: PropTypes.bool,\n theme: PropTypes.string\n};\n\nexport default BrandForm;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,kBAAkB,GAAG,CACzBC,QADyB,EAEzBC,WAFyB,EAGzBC,OAHyB,EAIzBC,UAJyB,EAKzBC,OALyB,EAMzBC,QANyB,EAOzBC,UAPyB,EAQzBC,SARyB,EASzBC,SATyB,EAUzBC,KAVyB,KAWtB;EACH,IAAI,CAACT,QAAD,IAAa,CAACE,OAAlB,EAA2B;IACzB,OAAO,IAAP;EACD;;EAED,MAAMQ,cAAc,GAAGL,QAAQ,IAAIE,SAAZ,IAAyB,CAACD,UAAjD;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/C,KAAK,EAAE0C,kBAAA,CAAUW;AAlBG,CAAtB;eAqBe3C,S"}
|
|
@@ -80,11 +80,13 @@ declare namespace WizardContents {
|
|
|
80
80
|
required: PropTypes.Requireable<boolean>;
|
|
81
81
|
modified: PropTypes.Requireable<boolean>;
|
|
82
82
|
error: PropTypes.Requireable<boolean>;
|
|
83
|
+
errorMessage: PropTypes.Requireable<string>;
|
|
83
84
|
suggestions: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
84
85
|
name: PropTypes.Requireable<string>;
|
|
85
86
|
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
86
87
|
}> | null | undefined)[]>;
|
|
87
|
-
|
|
88
|
+
theme: PropTypes.Requireable<string>;
|
|
89
|
+
onInput: PropTypes.Requireable<(...args: any[]) => any>;
|
|
88
90
|
onFetch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
89
91
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
90
92
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -526,6 +528,7 @@ declare namespace WizardContents {
|
|
|
526
528
|
place: PropTypes.Requireable<string>;
|
|
527
529
|
}>>;
|
|
528
530
|
isLoading: PropTypes.Requireable<boolean>;
|
|
531
|
+
theme: PropTypes.Requireable<string>;
|
|
529
532
|
}> | PropTypes.InferProps<{
|
|
530
533
|
type: PropTypes.Requireable<string>;
|
|
531
534
|
languageTabs: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -165,11 +165,13 @@ declare namespace BrandUpdate {
|
|
|
165
165
|
required: PropTypes.Requireable<boolean>;
|
|
166
166
|
modified: PropTypes.Requireable<boolean>;
|
|
167
167
|
error: PropTypes.Requireable<boolean>;
|
|
168
|
+
errorMessage: PropTypes.Requireable<string>;
|
|
168
169
|
suggestions: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
169
170
|
name: PropTypes.Requireable<string>;
|
|
170
171
|
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
171
172
|
}> | null | undefined)[]>;
|
|
172
|
-
|
|
173
|
+
theme: PropTypes.Requireable<string>;
|
|
174
|
+
onInput: PropTypes.Requireable<(...args: any[]) => any>;
|
|
173
175
|
onFetch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
174
176
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
175
177
|
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -611,6 +613,7 @@ declare namespace BrandUpdate {
|
|
|
611
613
|
place: PropTypes.Requireable<string>;
|
|
612
614
|
}>>;
|
|
613
615
|
isLoading: PropTypes.Requireable<boolean>;
|
|
616
|
+
theme: PropTypes.Requireable<string>;
|
|
614
617
|
}> | PropTypes.InferProps<{
|
|
615
618
|
key: PropTypes.Requireable<string>;
|
|
616
619
|
type: PropTypes.Requireable<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ignore_dirs":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.14.
|
|
3
|
+
"version": "11.14.24-alpha.11+35608fadb",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"last 2 versions",
|
|
169
169
|
"IE 11"
|
|
170
170
|
],
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "35608fadb99fb2d4cd493abe003fecd5b14e06fd"
|
|
172
172
|
}
|