@coorpacademy/components 11.32.24-alpha.6 → 11.32.25
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/button-link/index.d.ts +1 -0
- package/es/atom/button-link/index.d.ts.map +1 -1
- package/es/atom/button-link/index.js +4 -2
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/button-link/types.d.ts +2 -0
- package/es/atom/button-link/types.d.ts.map +1 -1
- package/es/atom/button-link/types.js +1 -0
- package/es/atom/button-link/types.js.map +1 -1
- package/es/atom/circular-progress-bar/index.d.ts.map +1 -1
- package/es/atom/circular-progress-bar/index.js +1 -10
- package/es/atom/circular-progress-bar/index.js.map +1 -1
- package/es/atom/input-doublestep/index.d.ts +1 -0
- package/es/atom/input-doublestep/index.d.ts.map +1 -1
- package/es/atom/input-doublestep/index.js +38 -13
- package/es/atom/input-doublestep/index.js.map +1 -1
- package/es/atom/input-doublestep/style.css +7 -67
- package/es/atom/select/index.js +1 -1
- package/es/atom/select/index.js.map +1 -1
- package/es/molecule/base-modal/index.d.ts +1 -0
- package/es/molecule/base-modal/index.d.ts.map +1 -1
- package/es/molecule/base-modal/index.js +8 -6
- package/es/molecule/base-modal/index.js.map +1 -1
- package/es/molecule/brand-create-form/index.d.ts.map +1 -1
- package/es/molecule/brand-create-form/index.js +9 -4
- package/es/molecule/brand-create-form/index.js.map +1 -1
- package/es/molecule/brand-download-box/index.d.ts.map +1 -1
- package/es/molecule/brand-download-box/index.js +11 -6
- package/es/molecule/brand-download-box/index.js.map +1 -1
- package/es/molecule/brand-download-box/style.css +6 -5
- package/es/molecule/brand-form-group/index.d.ts.map +1 -1
- package/es/molecule/brand-form-group/index.js +12 -1
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +1 -1
- package/es/molecule/cm-popin/types.d.ts +3 -0
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/discipline-associated-skills/index.js +1 -1
- package/es/molecule/discipline-associated-skills/index.js.map +1 -1
- package/es/molecule/draggable-list/index.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/es/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/es/molecule/learning-priority-modal/index.d.ts.map +1 -1
- package/es/molecule/learning-priority-modal/index.js +8 -15
- package/es/molecule/learning-priority-modal/index.js.map +1 -1
- package/es/molecule/learning-priority-modal/style.css +0 -1
- package/es/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
- package/es/molecule/learning-priority-setup-item/index.js +1 -1
- package/es/molecule/learning-priority-setup-item/index.js.map +1 -1
- package/es/molecule/learning-profile-radar-chart/index.d.ts.map +1 -1
- package/es/molecule/learning-profile-radar-chart/index.js +0 -2
- package/es/molecule/learning-profile-radar-chart/index.js.map +1 -1
- package/es/molecule/playlist-detail-cover/index.d.ts +14 -0
- package/es/molecule/playlist-detail-cover/index.d.ts.map +1 -0
- package/es/molecule/playlist-detail-cover/index.js +52 -0
- package/es/molecule/playlist-detail-cover/index.js.map +1 -0
- package/es/molecule/playlist-detail-cover/style.css +17 -0
- package/es/molecule/setup-section/index.d.ts.map +1 -1
- package/es/molecule/setup-section/index.js +3 -1
- package/es/molecule/setup-section/index.js.map +1 -1
- package/es/molecule/setup-section/style.css +2 -2
- package/es/molecule/skill-picker-modal/index.js +1 -1
- package/es/molecule/skill-picker-modal/index.js.map +1 -1
- package/es/organism/brand-form/index.d.ts.map +1 -1
- package/es/organism/brand-form/index.js +24 -15
- package/es/organism/brand-form/index.js.map +1 -1
- package/es/organism/brand-learning-priorities/index.d.ts +1 -21
- package/es/organism/brand-learning-priorities/index.d.ts.map +1 -1
- package/es/organism/brand-learning-priorities/index.js +1 -14
- package/es/organism/brand-learning-priorities/index.js.map +1 -1
- package/es/organism/brand-learning-priorities/style.css +2 -0
- package/es/organism/list-item/index.d.ts +3 -1
- package/es/organism/list-item/index.d.ts.map +1 -1
- package/es/organism/list-item/index.js +7 -5
- package/es/organism/list-item/index.js.map +1 -1
- package/es/organism/list-items/index.d.ts +3 -0
- package/es/organism/setup-header/index.d.ts +4 -0
- package/es/organism/wizard-contents/index.d.ts +3 -0
- package/es/template/app-player/loading/index.d.ts +3 -0
- package/es/template/app-player/player/index.d.ts +6 -0
- package/es/template/app-player/player/slides/index.d.ts +3 -0
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +3 -0
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts +3 -0
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +3 -0
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +3 -0
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-create/index.d.ts +4 -0
- package/es/template/back-office/brand-create/index.d.ts.map +1 -1
- package/es/template/back-office/brand-list/index.d.ts +4 -0
- package/es/template/back-office/brand-list/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +14 -0
- package/es/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts +4 -0
- package/es/template/back-office/layout/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.d.ts +6 -0
- package/es/template/common/search-page/index.d.ts +3 -0
- package/es/template/external-course/index.d.ts +3 -0
- package/es/template/my-learning/index.js +1 -1
- package/es/template/my-learning/index.js.map +1 -1
- package/es/template/playlist-detail/index.d.ts +96 -0
- package/es/template/playlist-detail/index.d.ts.map +1 -0
- package/es/template/playlist-detail/index.js +109 -0
- package/es/template/playlist-detail/index.js.map +1 -0
- package/es/template/playlist-detail/style.css +108 -0
- package/es/template/skill-detail/all-courses.d.ts +1 -1
- package/es/template/skill-detail/all-courses.js +3 -3
- package/es/template/skill-detail/all-courses.js.map +1 -1
- package/es/template/skill-detail/index.d.ts +39 -4
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +2 -4
- package/es/template/skill-detail/index.js.map +1 -1
- package/es/util/external-content.d.ts +1 -0
- package/es/util/external-content.d.ts.map +1 -1
- package/es/util/external-content.js +1 -0
- package/es/util/external-content.js.map +1 -1
- package/lib/atom/button-link/index.d.ts +1 -0
- package/lib/atom/button-link/index.d.ts.map +1 -1
- package/lib/atom/button-link/index.js +4 -2
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/button-link/types.d.ts +2 -0
- package/lib/atom/button-link/types.d.ts.map +1 -1
- package/lib/atom/button-link/types.js +1 -0
- package/lib/atom/button-link/types.js.map +1 -1
- package/lib/atom/circular-progress-bar/index.d.ts.map +1 -1
- package/lib/atom/circular-progress-bar/index.js +1 -10
- package/lib/atom/circular-progress-bar/index.js.map +1 -1
- package/lib/atom/input-doublestep/index.d.ts +1 -0
- package/lib/atom/input-doublestep/index.d.ts.map +1 -1
- package/lib/atom/input-doublestep/index.js +39 -13
- package/lib/atom/input-doublestep/index.js.map +1 -1
- package/lib/atom/input-doublestep/style.css +7 -67
- package/lib/atom/select/index.js +1 -1
- package/lib/atom/select/index.js.map +1 -1
- package/lib/molecule/base-modal/index.d.ts +1 -0
- package/lib/molecule/base-modal/index.d.ts.map +1 -1
- package/lib/molecule/base-modal/index.js +8 -6
- package/lib/molecule/base-modal/index.js.map +1 -1
- package/lib/molecule/brand-create-form/index.d.ts.map +1 -1
- package/lib/molecule/brand-create-form/index.js +9 -4
- package/lib/molecule/brand-create-form/index.js.map +1 -1
- package/lib/molecule/brand-download-box/index.d.ts.map +1 -1
- package/lib/molecule/brand-download-box/index.js +11 -6
- package/lib/molecule/brand-download-box/index.js.map +1 -1
- package/lib/molecule/brand-download-box/style.css +6 -5
- package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
- package/lib/molecule/brand-form-group/index.js +12 -1
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +1 -1
- package/lib/molecule/cm-popin/types.d.ts +3 -0
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/discipline-associated-skills/index.js +1 -1
- package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
- package/lib/molecule/draggable-list/index.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
- package/lib/molecule/expandible-actionable-table/types.d.ts +1 -0
- package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
- package/lib/molecule/learning-priority-modal/index.d.ts.map +1 -1
- package/lib/molecule/learning-priority-modal/index.js +9 -14
- package/lib/molecule/learning-priority-modal/index.js.map +1 -1
- package/lib/molecule/learning-priority-modal/style.css +0 -1
- package/lib/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
- package/lib/molecule/learning-priority-setup-item/index.js +1 -1
- package/lib/molecule/learning-priority-setup-item/index.js.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/index.d.ts.map +1 -1
- package/lib/molecule/learning-profile-radar-chart/index.js +0 -2
- package/lib/molecule/learning-profile-radar-chart/index.js.map +1 -1
- package/lib/molecule/playlist-detail-cover/index.d.ts +14 -0
- package/lib/molecule/playlist-detail-cover/index.d.ts.map +1 -0
- package/lib/molecule/playlist-detail-cover/index.js +68 -0
- package/lib/molecule/playlist-detail-cover/index.js.map +1 -0
- package/lib/molecule/playlist-detail-cover/style.css +17 -0
- package/lib/molecule/setup-section/index.d.ts.map +1 -1
- package/lib/molecule/setup-section/index.js +4 -1
- package/lib/molecule/setup-section/index.js.map +1 -1
- package/lib/molecule/setup-section/style.css +2 -2
- package/lib/molecule/skill-picker-modal/index.js +1 -1
- package/lib/molecule/skill-picker-modal/index.js.map +1 -1
- package/lib/organism/brand-form/index.d.ts.map +1 -1
- package/lib/organism/brand-form/index.js +24 -15
- package/lib/organism/brand-form/index.js.map +1 -1
- package/lib/organism/brand-learning-priorities/index.d.ts +1 -21
- package/lib/organism/brand-learning-priorities/index.d.ts.map +1 -1
- package/lib/organism/brand-learning-priorities/index.js +3 -15
- package/lib/organism/brand-learning-priorities/index.js.map +1 -1
- package/lib/organism/brand-learning-priorities/style.css +2 -0
- package/lib/organism/list-item/index.d.ts +3 -1
- package/lib/organism/list-item/index.d.ts.map +1 -1
- package/lib/organism/list-item/index.js +7 -5
- package/lib/organism/list-item/index.js.map +1 -1
- package/lib/organism/list-items/index.d.ts +3 -0
- package/lib/organism/setup-header/index.d.ts +4 -0
- package/lib/organism/wizard-contents/index.d.ts +3 -0
- package/lib/template/app-player/loading/index.d.ts +3 -0
- package/lib/template/app-player/player/index.d.ts +6 -0
- package/lib/template/app-player/player/slides/index.d.ts +3 -0
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +3 -0
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts +3 -0
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +3 -0
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +3 -0
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-create/index.d.ts +4 -0
- package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-list/index.d.ts +4 -0
- package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +14 -0
- package/lib/template/back-office/dashboard-preview/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts +4 -0
- package/lib/template/back-office/layout/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.d.ts +6 -0
- package/lib/template/common/search-page/index.d.ts +3 -0
- package/lib/template/external-course/index.d.ts +3 -0
- package/lib/template/my-learning/index.js +1 -1
- package/lib/template/my-learning/index.js.map +1 -1
- package/lib/template/playlist-detail/index.d.ts +96 -0
- package/lib/template/playlist-detail/index.d.ts.map +1 -0
- package/lib/template/playlist-detail/index.js +134 -0
- package/lib/template/playlist-detail/index.js.map +1 -0
- package/lib/template/playlist-detail/style.css +108 -0
- package/lib/template/skill-detail/all-courses.d.ts +1 -1
- package/lib/template/skill-detail/all-courses.js +3 -3
- package/lib/template/skill-detail/all-courses.js.map +1 -1
- package/lib/template/skill-detail/index.d.ts +39 -4
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +3 -2
- package/lib/template/skill-detail/index.js.map +1 -1
- package/lib/util/external-content.d.ts +1 -0
- package/lib/util/external-content.d.ts.map +1 -1
- package/lib/util/external-content.js +3 -1
- package/lib/util/external-content.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","convert","Provider","Icon","ButtonLink","style","BaseModal","props","context","title","description","headerIcon","children","isOpen","footer","onClose","skin","Footer","cancelButton","confirmButton","text","isError","label","cancelLabel","onCancel","disabled","cancelDisabled","confirmLabel","onConfirm","confirmDisabled","iconName","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","convert","Provider","Icon","ButtonLink","style","BaseModal","props","context","title","description","headerIcon","children","isOpen","footer","onClose","skin","Footer","cancelButton","confirmButton","text","isError","label","cancelLabel","onCancel","disabled","cancelDisabled","confirmLabel","onConfirm","confirmDisabled","iconName","color","buttonConfirmColor","footerCTAWrapper","className","footerCancelButton","type","onClick","customStyle","backgroundColor","hoverBackgroundColor","hoverColor","footerConfirmButton","icon","position","faIcon","name","size","footerDescription","footerDescriptionError","handleOnClose","e","stopPropagation","modalWrapper","modal","header","faSize","wrapperSize","headerContent","headerTitle","headerDescription","headerCloseIcon","body","contextTypes","childContextTypes","propTypes","string","shape","node","bool","oneOfType","func","boolean"],"sources":["../../../src/molecule/base-modal/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, get} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport Provider from '../../atom/provider';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst BaseModal = (props, context) => {\n const {title, description, headerIcon, children, isOpen, footer, onClose} = props;\n const {skin} = context;\n\n const Footer = useCallback(() => {\n if (isEmpty(footer)) return null;\n if (typeof footer === 'function') return footer();\n\n const {cancelButton, confirmButton, text, isError} = footer;\n const {label: cancelLabel, onCancel, disabled: cancelDisabled} = cancelButton || {};\n const {\n label: confirmLabel,\n onConfirm,\n disabled: confirmDisabled,\n iconName,\n color\n } = confirmButton || {};\n const buttonConfirmColor = color || get('common.primary', skin);\n\n return (\n <div className={style.footer}>\n <div className={style.footerCTAWrapper}>\n {onCancel && cancelLabel ? (\n <ButtonLink\n {...{\n className: style.footerCancelButton,\n type: 'secondary',\n onClick: onCancel,\n label: cancelLabel,\n disabled: cancelDisabled\n }}\n />\n ) : null}\n {onConfirm && confirmLabel ? (\n <div>\n <ButtonLink\n {...{\n customStyle: {backgroundColor: buttonConfirmColor},\n hoverBackgroundColor: convert(\n `hsl(from ${buttonConfirmColor} h s calc(l*(1 - 0.08)))`\n ),\n hoverColor: '#FFFFFF',\n className: style.footerConfirmButton,\n type: 'primary',\n onClick: onConfirm,\n label: confirmLabel,\n disabled: confirmDisabled,\n ...(iconName\n ? {\n icon: {\n position: 'left',\n faIcon: {\n name: iconName,\n color: '#FFFFFF',\n size: 16\n }\n }\n }\n : {})\n }}\n />\n </div>\n ) : null}\n </div>\n {text ? (\n <div\n className={`${style.footerDescription} ${isError ? style.footerDescriptionError : ''}`}\n >\n {text}\n </div>\n ) : null}\n </div>\n );\n }, [footer, skin]);\n\n if (!isOpen || !title || !children) return null;\n\n function handleOnClose(e) {\n e?.stopPropagation();\n onClose();\n }\n\n return (\n <div className={style.modalWrapper}>\n <div className={style.modal}>\n <header className={style.header}>\n {headerIcon?.name ? (\n <div className={style.headerIcon}>\n <Icon\n iconName={headerIcon.name}\n iconColor={headerIcon.color}\n backgroundColor={headerIcon.backgroundColor}\n size={{faSize: 20, wrapperSize: 48}}\n />\n </div>\n ) : null}\n <div className={style.headerContent}>\n <div className={style.headerTitle}>{title}</div>\n {description ? <div className={style.headerDescription}>{description}</div> : null}\n </div>\n <div className={style.headerCloseIcon} onClick={handleOnClose}>\n <Icon iconName=\"close\" backgroundColor=\"#F4F4F5\" size={{faSize: 14, wrapperSize: 28}} />\n </div>\n </header>\n <div className={style.body}>{children}</div>\n <Footer />\n </div>\n </div>\n );\n};\n\nBaseModal.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nBaseModal.propTypes = {\n title: PropTypes.string,\n headerIcon: PropTypes.shape({\n name: PropTypes.string,\n color: PropTypes.string,\n backgroundColor: PropTypes.string\n }),\n description: PropTypes.string,\n children: PropTypes.node,\n isOpen: PropTypes.bool,\n footer: PropTypes.oneOfType([\n PropTypes.func,\n PropTypes.shape({\n text: PropTypes.string,\n isError: PropTypes.boolean,\n cancelButton: PropTypes.shape({\n label: PropTypes.string,\n onCancel: PropTypes.func,\n disabled: PropTypes.bool\n }),\n confirmButton: PropTypes.shape({\n label: PropTypes.string,\n onConfirm: PropTypes.func,\n iconName: PropTypes.string,\n disabled: PropTypes.bool,\n color: PropTypes.string\n })\n })\n ]),\n onClose: PropTypes.func\n};\n\nexport default BaseModal;\n"],"mappings":";;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;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;IACd/C,IAAI,EAAEpB,SAAS,CAACkE,MADF;IAEd7C,OAAO,EAAErB,SAAS,CAACwE,OAFL;IAGdtD,YAAY,EAAElB,SAAS,CAACmE,KAAV,CAAgB;MAC5B7C,KAAK,EAAEtB,SAAS,CAACkE,MADW;MAE5B1C,QAAQ,EAAExB,SAAS,CAACuE,IAFQ;MAG5B9C,QAAQ,EAAEzB,SAAS,CAACqE;IAHQ,CAAhB,CAHA;IAQdlD,aAAa,EAAEnB,SAAS,CAACmE,KAAV,CAAgB;MAC7B7C,KAAK,EAAEtB,SAAS,CAACkE,MADY;MAE7BtC,SAAS,EAAE5B,SAAS,CAACuE,IAFQ;MAG7BzC,QAAQ,EAAE9B,SAAS,CAACkE,MAHS;MAI7BzC,QAAQ,EAAEzB,SAAS,CAACqE,IAJS;MAK7BtC,KAAK,EAAE/B,SAAS,CAACkE;IALY,CAAhB;EARD,CAAhB,CAF0B,CAApB,CAVY;EA6BpBnD,OAAO,EAAEf,SAAS,CAACuE;AA7BC,CAAtB;AAgCA,eAAejE,SAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-create-form/index.js"],"names":[],"mappings":";AAOA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-create-form/index.js"],"names":[],"mappings":";AAOA,wEA4DC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import ButtonLink from '../../atom/button-link';
|
|
4
4
|
import Loader from '../../atom/loader';
|
|
5
5
|
import Provider from '../../atom/provider';
|
|
6
6
|
import style from './style.css';
|
|
@@ -31,11 +31,16 @@ const BrandCreateForm = (props, context) => {
|
|
|
31
31
|
className: style.wait
|
|
32
32
|
}, waitMessage), /*#__PURE__*/React.createElement("div", {
|
|
33
33
|
className: style.loading
|
|
34
|
-
}, /*#__PURE__*/React.createElement(Loader, null))) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(
|
|
34
|
+
}, /*#__PURE__*/React.createElement(Loader, null))) : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(ButtonLink, {
|
|
35
|
+
type: "primary",
|
|
35
36
|
"data-name": "brand_create_submit_button",
|
|
36
|
-
|
|
37
|
+
usage: "submit",
|
|
38
|
+
customStyle: {
|
|
39
|
+
display: 'inline-block',
|
|
40
|
+
width: 'fit-content'
|
|
41
|
+
},
|
|
37
42
|
disabled: disabled,
|
|
38
|
-
|
|
43
|
+
label: submitValue
|
|
39
44
|
}));
|
|
40
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
46
|
className: wrapperClass
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","ButtonLink","Loader","Provider","style","BrandCreateForm","props","context","title","subtitle","description","field","onSubmit","submitValue","isPending","isModified","translate","waitMessage","wrapperClass","error","modifiedWrapper","wrapper","fieldClass","default","disabled","onChange","handleChange","e","target","value","actionView","wait","loading","display","width","header","content","placeholder","label","contextTypes","childContextTypes","propTypes","string","isRequired","shape","func","bool"],"sources":["../../../src/molecule/brand-create-form/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst BrandCreateForm = (props, context) => {\n const {title, subtitle, description, field, onSubmit, submitValue, isPending, isModified} = props;\n const {translate} = context;\n const waitMessage = translate('Wait_creation');\n\n const wrapperClass =\n isModified || isPending || field.error ? style.modifiedWrapper : style.wrapper;\n const fieldClass = field.error ? style.error : style.default;\n const disabled = isPending || !isModified;\n const {onChange} = field;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n\n const actionView = isPending ? (\n <div>\n <div className={style.wait}>{waitMessage}</div>\n <div className={style.loading}>\n <Loader />\n </div>\n </div>\n ) : (\n <div>\n <ButtonLink\n type=\"primary\"\n data-name=\"brand_create_submit_button\"\n usage=\"submit\"\n customStyle={{\n display: 'inline-block',\n width: 'fit-content'\n }}\n disabled={disabled}\n label={submitValue}\n />\n </div>\n );\n\n return (\n <div className={wrapperClass}>\n <div className={style.header}>\n <h1>{title}</h1>\n </div>\n <form className={style.content} onSubmit={onSubmit}>\n <h2>{subtitle}</h2>\n <div className={style.description}>{description}</div>\n <div className={fieldClass}>\n <label>\n <input\n type=\"text\"\n maxLength=\"40\"\n data-name=\"brand_create_text_input\"\n placeholder={field.placeholder}\n defaultValue={field.value}\n onInput={handleChange}\n />\n {field.label}\n </label>\n </div>\n {actionView}\n </form>\n </div>\n );\n};\n\nBrandCreateForm.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nBrandCreateForm.propTypes = {\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n field: PropTypes.shape({\n placeholder: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n error: PropTypes.string,\n value: PropTypes.string\n }).isRequired,\n onSubmit: PropTypes.func.isRequired,\n submitValue: PropTypes.string.isRequired,\n isPending: PropTypes.bool,\n isModified: PropTypes.bool\n};\n\nexport default BrandCreateForm;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,eAAe,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC1C,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC,WAAl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U,EAAEf,SAAS,CAAC8C;AAdI,CAA5B;AAiBA,eAAezC,eAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-download-box/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-download-box/index.js"],"names":[],"mappings":";AAQA,yEA8BC"}
|
|
@@ -2,7 +2,7 @@ import _get from "lodash/fp/get";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { NovaSolidInterfaceFeedbackInterfaceAlertCircle as AlertIcon } from '@coorpacademy/nova-icons';
|
|
5
|
-
import
|
|
5
|
+
import ButtonLink from '../../atom/button-link';
|
|
6
6
|
import Provider from '../../atom/provider';
|
|
7
7
|
import style from './style.css';
|
|
8
8
|
|
|
@@ -41,13 +41,18 @@ const BrandDownloadBox = (props, context) => {
|
|
|
41
41
|
}, description));
|
|
42
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
43
43
|
className: style.wrapper
|
|
44
|
-
}, type, /*#__PURE__*/React.createElement(
|
|
44
|
+
}, type, /*#__PURE__*/React.createElement(ButtonLink, {
|
|
45
45
|
className: style.button,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
link: {
|
|
47
|
+
href,
|
|
48
|
+
download: true
|
|
49
|
+
},
|
|
49
50
|
onClick: onClick,
|
|
50
|
-
|
|
51
|
+
label: submitValue,
|
|
52
|
+
customStyle: {
|
|
53
|
+
backgroundColor: '#FFA000',
|
|
54
|
+
color: 'white'
|
|
55
|
+
}
|
|
51
56
|
}));
|
|
52
57
|
};
|
|
53
58
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertCircle","AlertIcon","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertCircle","AlertIcon","ButtonLink","Provider","style","BrandDownloadBox","props","context","title","warning","description","href","onClick","submitValue","skin","negativeColor","type","texts","icon","color","titleTexts","wrapper","button","download","backgroundColor","contextTypes","childContextTypes","propTypes","string","func"],"sources":["../../../src/molecule/brand-download-box/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {NovaSolidInterfaceFeedbackInterfaceAlertCircle as AlertIcon} from '@coorpacademy/nova-icons';\nimport {get} from 'lodash/fp';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst BrandDownloadBox = (props, context) => {\n const {title = '', warning = '', description = '', href = '', onClick, submitValue = ''} = props;\n const {skin} = context;\n const negativeColor = get('common.negative', skin);\n\n const type = warning ? (\n <div className={style.texts}>\n <AlertIcon className={style.icon} style={{color: negativeColor}} />\n <span className={style.warning}>{warning}</span>\n <p className={style.description}>{description}</p>\n </div>\n ) : (\n <div className={style.titleTexts}>\n <span className={style.title}>{title}</span>\n <p className={style.description}>{description}</p>\n </div>\n );\n\n return (\n <div className={style.wrapper}>\n {type}\n <ButtonLink\n className={style.button}\n link={{href, download: true}}\n onClick={onClick}\n label={submitValue}\n customStyle={{backgroundColor: '#FFA000', color: 'white'}}\n />\n </div>\n );\n};\n\nBrandDownloadBox.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nBrandDownloadBox.propTypes = {\n title: PropTypes.string,\n warning: PropTypes.string,\n description: PropTypes.string,\n href: PropTypes.string,\n onClick: PropTypes.func,\n submitValue: PropTypes.string\n};\n\nexport default BrandDownloadBox;\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,8CAA8C,IAAIC,SAA1D,QAA0E,0BAA1E;AAEA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,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jB,GAAgC;EAC9BX,IAAI,EAAEX,QAAQ,CAACuB,iBAAT,CAA2BZ;AADH,CAAhC;AAIAT,gBAAgB,CAACsB,SAAjB,2CAA6B;EAC3BnB,KAAK,EAAET,SAAS,CAAC6B,MADU;EAE3BnB,OAAO,EAAEV,SAAS,CAAC6B,MAFQ;EAG3BlB,WAAW,EAAEX,SAAS,CAAC6B,MAHI;EAI3BjB,IAAI,EAAEZ,SAAS,CAAC6B,MAJW;EAK3BhB,OAAO,EAAEb,SAAS,CAAC8B,IALQ;EAM3BhB,WAAW,EAAEd,SAAS,CAAC6B;AANI,CAA7B;AASA,eAAevB,gBAAf"}
|
|
@@ -19,10 +19,6 @@
|
|
|
19
19
|
width: 80%;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.wrapper > .button {
|
|
23
|
-
background-color: dark;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
22
|
.icon {
|
|
27
23
|
width: 32px;
|
|
28
24
|
height: 32px;
|
|
@@ -47,13 +43,18 @@
|
|
|
47
43
|
font-size: 13px;
|
|
48
44
|
}
|
|
49
45
|
|
|
46
|
+
.button {
|
|
47
|
+
width: 200px;
|
|
48
|
+
flex-shrink: 0;
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
}
|
|
51
|
+
|
|
50
52
|
@media mobile {
|
|
51
53
|
.wrapper {
|
|
52
54
|
display: block;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
.button {
|
|
56
|
-
display: block;
|
|
57
58
|
width: 100%;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-form-group/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/brand-form-group/index.js"],"names":[],"mappings":";AA6HA,yDAuBC"}
|
|
@@ -101,7 +101,18 @@ const buildInput = field => {
|
|
|
101
101
|
|
|
102
102
|
case 'button':
|
|
103
103
|
case 'link':
|
|
104
|
-
return /*#__PURE__*/React.createElement(
|
|
104
|
+
return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, field, {
|
|
105
|
+
type: "primary",
|
|
106
|
+
label: field.submitValue,
|
|
107
|
+
link: field.href ? {
|
|
108
|
+
href: field.href,
|
|
109
|
+
target: field.target,
|
|
110
|
+
download: field.download
|
|
111
|
+
} : null,
|
|
112
|
+
customStyle: {
|
|
113
|
+
width: 'fit-content'
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
105
116
|
|
|
106
117
|
case 'buttonLink':
|
|
107
118
|
return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, field, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classNames","Autocomplete","Select","SelectMultiple","InputText","InputColor","InputCheckbox","InputReadonly","InputSwitch","BrandUploadBox","BrandDownloadBox","Button","InputTextarea","InputHTML","InputDoublestep","InputFileDraggable","SetupSlider","SetupSections","Title","Roles","TitleAndCheckBoxWrapper","ButtonLink","TitleAndInput","style","inputContainerStyle","default","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","imageUploadContainer","bulkUploadContainer","buttonType","buildField","index","input","theme","size","styleInput","styleField","fieldMassiveBattle","defineLayoutClass","layout","grid","layoutBulk","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","subtitleSize","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","propTypes","string","arrayOf","oneOfType","shape","oneOf"],"sources":["../../../src/molecule/brand-form-group/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport InputFileDraggable from '../../atom/input-file-draggable';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport TitleAndCheckBoxWrapper from '../title-and-checkbox-wrapper';\nimport ButtonLink from '../../atom/button-link';\nimport TitleAndInput from '../../organism/title-and-input';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return (\n <div className={style.imageUploadContainer}>\n <InputFileDraggable {...field} />\n </div>\n );\n case 'bulkUpload':\n return (\n <div className={style.bulkUploadContainer}>\n <InputFileDraggable {...field} />\n </div>\n );\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'buttonLink':\n return <ButtonLink {...field} type={field.buttonType} />;\n case 'roles':\n return <Roles {...field} />;\n case 'titleAndCheckBoxWrapper':\n return <TitleAndCheckBoxWrapper {...field} />;\n case 'titleAndInput':\n return <TitleAndInput {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field.type === 'titleAndInput' ? field.field : field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n const styleField = field.type === 'titleAndInput' ? style.fieldMassiveBattle : styleInput;\n\n return (\n <div className={styleField} key={index}>\n {input}\n </div>\n );\n};\n\nconst defineLayoutClass = layout => {\n if (layout === 'grid') return classNames(style.grid);\n else if (layout === 'bulkLayout') return classNames(style.layoutBulk);\n else return classNames(null);\n};\n\nconst BrandFormGroup = props => {\n const {\n title,\n subtitle = '',\n fieldsLayout = '',\n groupLayout = '',\n fields = [],\n subtitleSize = 'standard'\n } = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n const layout = useMemo(() => defineLayoutClass(fieldsLayout), [fieldsLayout]);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} subtitleSize={subtitleSize} type={'form-group'} />\n </div>\n <div className={layout}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n subtitleSize: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...InputFileDraggable.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...InputFileDraggable.propTypes,\n type: PropTypes.oneOf(['bulkImage'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...ButtonLink.propTypes,\n buttonType: ButtonLink.propTypes.type,\n type: PropTypes.oneOf(['buttonLink'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes),\n PropTypes.shape({\n ...TitleAndInput.propTypes,\n type: PropTypes.oneOf(['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;EAFR,GAjEkB,EAqElBrE,SAAS,CAACoE,KAAV,cACKxD,MAAM,CAACoD,SADZ;IAEE9B,IAAI,EAAElC,SAAS,CAACqE,KAAV,CAAgB,CAAC,QAAD,CAAhB;EAFR,GArEkB,EAyElBrE,SAAS,CAACoE,KAAV,cACK9C,UAAU,CAAC0C,SADhB;IAEE3B,UAAU,EAAEf,UAAU,CAAC0C,SAAX,CAAqB9B,IAFnC;IAGEA,IAAI,EAAElC,SAAS,CAACqE,KAAV,CAAgB,CAAC,YAAD,CAAhB;EAHR,GAzEkB,EA8ElBrE,SAAS,CAACoE,KAAV,cACKhE,cAAc,CAAC4D,SADpB;IAEE9B,IAAI,EAAElC,SAAS,CAACqE,KAAV,CAAgB,CAAC,gBAAD,CAAhB;EAFR,GA9EkB,EAkFlBrE,SAAS,CAACoE,KAAV,cACKhD,KAAK,CAAC4C,SADX;IAEE9B,IAAI,EAAElC,SAAS,CAACqE,KAAV,CAAgB,CAAC,OAAD,CAAhB;EAFR,GAlFkB,EAsFlBrE,SAAS,CAACoE,KAAV,CAAgB/D,SAAS,CAAC2D,SAA1B,CAtFkB,EAuFlBhE,SAAS,CAACoE,KAAV,cACK7C,aAAa,CAACyC,SADnB;IAEE9B,IAAI,EAAElC,SAAS,CAACqE,KAAV,CAAgB,CAAC,eAAD,CAAhB;EAFR,GAvFkB,CAApB,CADM;AANiB,CAA3B;AAqGA,eAAenB,cAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classNames","Autocomplete","Select","SelectMultiple","InputText","InputColor","InputCheckbox","InputReadonly","InputSwitch","BrandUploadBox","BrandDownloadBox","Button","InputTextarea","InputHTML","InputDoublestep","InputFileDraggable","SetupSlider","SetupSections","Title","Roles","TitleAndCheckBoxWrapper","ButtonLink","TitleAndInput","style","inputContainerStyle","default","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","imageUploadContainer","bulkUploadContainer","submitValue","href","target","download","width","buttonType","buildField","index","input","theme","size","styleInput","styleField","fieldMassiveBattle","defineLayoutClass","layout","grid","layoutBulk","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","subtitleSize","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","propTypes","string","arrayOf","oneOfType","shape","oneOf"],"sources":["../../../src/molecule/brand-form-group/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport InputFileDraggable from '../../atom/input-file-draggable';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport TitleAndCheckBoxWrapper from '../title-and-checkbox-wrapper';\nimport ButtonLink from '../../atom/button-link';\nimport TitleAndInput from '../../organism/title-and-input';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return (\n <div className={style.imageUploadContainer}>\n <InputFileDraggable {...field} />\n </div>\n );\n case 'bulkUpload':\n return (\n <div className={style.bulkUploadContainer}>\n <InputFileDraggable {...field} />\n </div>\n );\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return (\n <ButtonLink\n {...field}\n type=\"primary\"\n label={field.submitValue}\n link={\n field.href ? {href: field.href, target: field.target, download: field.download} : null\n }\n customStyle={{width: 'fit-content'}}\n />\n );\n case 'buttonLink':\n return <ButtonLink {...field} type={field.buttonType} />;\n case 'roles':\n return <Roles {...field} />;\n case 'titleAndCheckBoxWrapper':\n return <TitleAndCheckBoxWrapper {...field} />;\n case 'titleAndInput':\n return <TitleAndInput {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field.type === 'titleAndInput' ? field.field : field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n const styleField = field.type === 'titleAndInput' ? style.fieldMassiveBattle : styleInput;\n\n return (\n <div className={styleField} key={index}>\n {input}\n </div>\n );\n};\n\nconst defineLayoutClass = layout => {\n if (layout === 'grid') return classNames(style.grid);\n else if (layout === 'bulkLayout') return classNames(style.layoutBulk);\n else return classNames(null);\n};\n\nconst BrandFormGroup = props => {\n const {\n title,\n subtitle = '',\n fieldsLayout = '',\n groupLayout = '',\n fields = [],\n subtitleSize = 'standard'\n } = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n const layout = useMemo(() => defineLayoutClass(fieldsLayout), [fieldsLayout]);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} subtitleSize={subtitleSize} type={'form-group'} />\n </div>\n <div className={layout}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n subtitleSize: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...InputFileDraggable.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...InputFileDraggable.propTypes,\n type: PropTypes.oneOf(['bulkImage'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...ButtonLink.propTypes,\n buttonType: ButtonLink.propTypes.type,\n type: PropTypes.oneOf(['buttonLink'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes),\n PropTypes.shape({\n ...TitleAndInput.propTypes,\n type: PropTypes.oneOf(['titleAndInput'])\n })\n ])\n )\n};\nexport default BrandFormGroup;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,aAAP,MAA0B,2BAA1B;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,eAAP,MAA4B,6BAA5B;AACA,OAAOC,kBAAP,MAA+B,iCAA/B;AAC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AS,CAACyE,KAAV,cACKrE,cAAc,CAACiE,SADpB;IAEEnC,IAAI,EAAElC,SAAS,CAAC0E,KAAV,CAAgB,CAAC,gBAAD,CAAhB;EAFR,GA9EkB,EAkFlB1E,SAAS,CAACyE,KAAV,cACKrD,KAAK,CAACiD,SADX;IAEEnC,IAAI,EAAElC,SAAS,CAAC0E,KAAV,CAAgB,CAAC,OAAD,CAAhB;EAFR,GAlFkB,EAsFlB1E,SAAS,CAACyE,KAAV,CAAgBpE,SAAS,CAACgE,SAA1B,CAtFkB,EAuFlBrE,SAAS,CAACyE,KAAV,cACKlD,aAAa,CAAC8C,SADnB;IAEEnC,IAAI,EAAElC,SAAS,CAAC0E,KAAV,CAAgB,CAAC,eAAD,CAAhB;EAFR,GAvFkB,CAApB,CADM;AANiB,CAA3B;AAqGA,eAAenB,cAAf"}
|
|
@@ -91,6 +91,7 @@ declare const propTypes: {
|
|
|
91
91
|
'aria-label': PropTypes.Requireable<string>;
|
|
92
92
|
buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
|
|
93
93
|
type: PropTypes.Requireable<string>;
|
|
94
|
+
usage: PropTypes.Requireable<string>;
|
|
94
95
|
label: PropTypes.Requireable<string>;
|
|
95
96
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
96
97
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -135,6 +136,7 @@ declare const propTypes: {
|
|
|
135
136
|
title: PropTypes.Validator<string>;
|
|
136
137
|
subtitle: PropTypes.Requireable<string>;
|
|
137
138
|
selected: PropTypes.Requireable<boolean>;
|
|
139
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
138
140
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
139
141
|
label: PropTypes.Requireable<string>;
|
|
140
142
|
type: PropTypes.Requireable<string>;
|
|
@@ -229,6 +231,7 @@ declare const propTypes: {
|
|
|
229
231
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
230
232
|
componentType: PropTypes.Requireable<string>;
|
|
231
233
|
type: PropTypes.Requireable<string>;
|
|
234
|
+
usage: PropTypes.Requireable<string>;
|
|
232
235
|
label: PropTypes.Requireable<string>;
|
|
233
236
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
234
237
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAKnC,OAAO,IAAI,MAAM,iBAAiB,CAAC;AACnC,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAGlD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDd,CAAC;AAEF,aAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,UAAU,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,GAAG,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,eAAe,CAAC;IAC/B,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;QACzB,IAAI,EACA,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,GAChD,SAAS,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;CACpD,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -32,7 +32,7 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
32
32
|
}, skill.locale)), []);
|
|
33
33
|
const TooltipContentElement = useCallback(skill => /*#__PURE__*/React.createElement("div", {
|
|
34
34
|
className: style.tooltipContentWrapper
|
|
35
|
-
}, skill.focused ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, translate('skill_focused_chip_tooltip'))) : null, /*#__PURE__*/React.createElement("div", null, skill.locale)), []);
|
|
35
|
+
}, skill.focused ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, translate('skill_focused_chip_tooltip'))) : null, /*#__PURE__*/React.createElement("div", null, skill.locale)), [translate]);
|
|
36
36
|
return !_isEmpty(skills) ? /*#__PURE__*/React.createElement("div", {
|
|
37
37
|
"data-name": "discipline-associated-skills",
|
|
38
38
|
className: style.associatedSkillsWrapper
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","skillsBaseUrl","onSkillClick","hrefFormat","skill","ref","AnchorElement","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","event","preventDefault","handleAnchorElement","handleTooltipContentElement","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], skillsBaseUrl, onSkillClick} = props;\n\n const hrefFormat = useCallback(\n skill => (skillsBaseUrl ? `${skillsBaseUrl}/${skill.ref}` : ''),\n [skillsBaseUrl]\n );\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick(event) {\n if (!skillsBaseUrl) event.preventDefault();\n onSkillClick();\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <a\n href={hrefFormat(skill)}\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </a>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n skillsBaseUrl: PropTypes.string,\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf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","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","skillsBaseUrl","onSkillClick","hrefFormat","skill","ref","AnchorElement","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","event","preventDefault","handleAnchorElement","handleTooltipContentElement","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], skillsBaseUrl, onSkillClick} = props;\n\n const hrefFormat = useCallback(\n skill => (skillsBaseUrl ? `${skillsBaseUrl}/${skill.ref}` : ''),\n [skillsBaseUrl]\n );\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n [translate]\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick(event) {\n if (!skillsBaseUrl) event.preventDefault();\n onSkillClick();\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <a\n href={hrefFormat(skill)}\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </a>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n skillsBaseUrl: PropTypes.string,\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,cAAP,MAA2B,4BAA3B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,0BAA0B,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrD,MAAM;IAACC;EAAD,IAAcD,OAApB;EAEA,MAAM;IAACE,MAAM,GAAG,EAAV;IAAcC,aAAd;IAA6BC;EAA7B,IAA6CL,KAAnD;EAEA,MAAMM,UAAU,GAAGf,WAAW,CAC5Bg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OT,qBAAqB,CAACT,KAAD,CAA5B;IACD;;IACD,oBACE;MACE,IAAI,EAAED,UAAU,CAACC,KAAD,CADlB;MAEE,GAAG,EAAE,WAFP;MAGE,SAAS,EAAEd,UAAU,CAACK,KAAK,CAAC4B,WAAP,EAAoBnB,KAAK,CAACI,OAAN,IAAiBb,KAAK,CAAC6B,kBAA3C,CAHvB;MAIE,OAAO,EAAEN;IAJX,gBAME,oBAAC,OAAD;MACE,aAAa,EAAEG,mBADjB;MAEE,QAAQ,EAAE,EAFZ;MAGE,SAAS,EAAE,CAHb;MAIE,sBAAsB,EAAE1B,KAAK,CAAC8B,eAJhC;MAKE,gBAAgB,EAAErB,KAAK,CAACI,OAAN,GAAgBb,KAAK,CAAC+B,mBAAtB,GAA4C/B,KAAK,CAACgC,OALtE;MAME,cAAc,EAAEL,2BANlB;MAOE,oCAAoC,EAAEvB,SAAS,CAAC,2BAAD;IAPjD,EANF,CADF;EAkBD,CA7BA,CADH,CADF,CADF,CADK,GAqCH,IArCJ;AAsCD,CAhFD;;AAkFAH,0BAA0B,CAACgC,YAA3B,GAA0C;EACxC7B,SAAS,EAAEN,QAAQ,CAACoC,iBAAT,CAA2B9B;AADE,CAA1C;AAIAH,0BAA0B,CAACkC,SAA3B,2CAAuC;EACrC9B,MAAM,EAAEX,SAAS,CAAC0C,OAAV,CACN1C,SAAS,CAAC2C,KAAV,CAAgB;IACd3B,GAAG,EAAEhB,SAAS,CAAC4C,MADD;IAEdrB,MAAM,EAAEvB,SAAS,CAAC4C,MAFJ;IAGdzB,OAAO,EAAEnB,SAAS,CAAC6C;EAHL,CAAhB,CADM,CAD6B;EAQrCjC,aAAa,EAAEZ,SAAS,CAAC4C,MARY;EASrC/B,YAAY,EAAEb,SAAS,CAAC8C;AATa,CAAvC;AAYA,eAAevC,0BAAf"}
|
|
@@ -63,6 +63,7 @@ declare namespace DraggableList {
|
|
|
63
63
|
title: PropTypes.Validator<string>;
|
|
64
64
|
subtitle: PropTypes.Requireable<string>;
|
|
65
65
|
selected: PropTypes.Requireable<boolean>;
|
|
66
|
+
selectedColor: PropTypes.Requireable<string>;
|
|
66
67
|
dataColumns: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
67
68
|
label: PropTypes.Requireable<string>;
|
|
68
69
|
type: PropTypes.Requireable<string>;
|
|
@@ -64,6 +64,7 @@ declare const ActionableExpandableTable: {
|
|
|
64
64
|
lastField: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
65
65
|
componentType: import("prop-types").Requireable<string>;
|
|
66
66
|
type: import("prop-types").Requireable<string>;
|
|
67
|
+
usage: import("prop-types").Requireable<string>;
|
|
67
68
|
label: import("prop-types").Requireable<string>;
|
|
68
69
|
content: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
69
70
|
'aria-label': import("prop-types").Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAOjE,OAAO,EAA2C,KAAK,EAAY,MAAM,SAAS,CAAC;AAqCnF,QAAA,MAAM,yBAAyB;YAAW,KAAK,iBAAiB,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAOjE,OAAO,EAA2C,KAAK,EAAY,MAAM,SAAS,CAAC;AAqCnF,QAAA,MAAM,yBAAyB;YAAW,KAAK,iBAAiB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoL/E,CAAC;AASF,eAAe,yBAAyB,CAAC"}
|
|
@@ -41,6 +41,7 @@ export declare const propTypes: {
|
|
|
41
41
|
lastField: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
42
42
|
componentType: PropTypes.Requireable<string>;
|
|
43
43
|
type: PropTypes.Requireable<string>;
|
|
44
|
+
usage: PropTypes.Requireable<string>;
|
|
44
45
|
label: PropTypes.Requireable<string>;
|
|
45
46
|
content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
46
47
|
'aria-label': PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAC,0BAA0B,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,KAAK,IAAI,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAC,KAAK,IAAI,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AA0BzE,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/molecule/expandible-actionable-table/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAInC,OAAO,EAAC,0BAA0B,EAAC,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAC,KAAK,IAAI,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAC,KAAK,IAAI,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AA0BzE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,EAAE,MAAM,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,oBAAY,WAAW,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learning-priority-modal/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learning-priority-modal/index.js"],"names":[],"mappings":";AA2DA,qFA0KC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _pick from "lodash/fp/pick";
|
|
2
2
|
import _assign from "lodash/fp/assign";
|
|
3
|
-
import _get from "lodash/fp/get";
|
|
4
3
|
|
|
5
4
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
5
|
|
|
@@ -15,21 +14,17 @@ import Provider from '../../atom/provider';
|
|
|
15
14
|
import { SelectOptionPropTypes } from '../../atom/select';
|
|
16
15
|
import SearchForm from '../search-form';
|
|
17
16
|
import searchValueIncluded from '../../util/search-value-included';
|
|
17
|
+
import { COLORS } from '../../variables/colors';
|
|
18
18
|
import style from './style.css';
|
|
19
19
|
|
|
20
|
-
const FilterButton =
|
|
20
|
+
const FilterButton = props => {
|
|
21
21
|
const {
|
|
22
22
|
active,
|
|
23
23
|
filter,
|
|
24
24
|
itemTotal,
|
|
25
25
|
onClick
|
|
26
26
|
} = props;
|
|
27
|
-
const
|
|
28
|
-
skin
|
|
29
|
-
} = context;
|
|
30
|
-
|
|
31
|
-
const primarySkinColor = _get('common.primary', skin);
|
|
32
|
-
|
|
27
|
+
const primarySkinColor = COLORS.cm_primary_blue;
|
|
33
28
|
const Content = useCallback(() => /*#__PURE__*/React.createElement("div", null, filter, /*#__PURE__*/React.createElement("span", {
|
|
34
29
|
className: active ? style.skillFilterNumber : style.skillFilterNumberInActive,
|
|
35
30
|
style: {
|
|
@@ -51,10 +46,6 @@ const FilterButton = (props, context) => {
|
|
|
51
46
|
return /*#__PURE__*/React.createElement(ButtonLink, buttonProps);
|
|
52
47
|
};
|
|
53
48
|
|
|
54
|
-
FilterButton.contextTypes = {
|
|
55
|
-
skin: Provider.childContextTypes.skin,
|
|
56
|
-
translate: Provider.childContextTypes.translate
|
|
57
|
-
};
|
|
58
49
|
FilterButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
59
50
|
active: PropTypes.bool,
|
|
60
51
|
filter: PropTypes.string,
|
|
@@ -126,10 +117,11 @@ const LearningPriorityModal = (props, context) => {
|
|
|
126
117
|
},
|
|
127
118
|
label: translate('add'),
|
|
128
119
|
iconName: 'plus',
|
|
129
|
-
disabled: isLoading || !selectedPriority
|
|
120
|
+
disabled: isLoading || !selectedPriority,
|
|
121
|
+
color: COLORS.cm_primary_blue
|
|
130
122
|
}
|
|
131
123
|
};
|
|
132
|
-
}, [handleCancel, setSelectedPriority, setSelectedPriorityType, onAdd, translate, selectedPriority, selectedPriorityType, isLoading]);
|
|
124
|
+
}, [handleCancel, setSelectedPriority, setSelectedPriorityType, onAdd, onClose, translate, selectedPriority, selectedPriorityType, isLoading]);
|
|
133
125
|
if (!isLoading && !priorities || !isOpen) return null;
|
|
134
126
|
return /*#__PURE__*/React.createElement(BaseModal, {
|
|
135
127
|
title: translate('learning_priority_modal_title'),
|
|
@@ -200,12 +192,13 @@ const LearningPriorityModal = (props, context) => {
|
|
|
200
192
|
setSelectedPriorityType(type);
|
|
201
193
|
}
|
|
202
194
|
|
|
203
|
-
if (filterValue !== 'all' && type !== filterValue) return null;
|
|
195
|
+
if (filterValue !== 'all' && type !== filterValue || !type || !title) return null;
|
|
204
196
|
return /*#__PURE__*/React.createElement(ListItem, _extends({}, courses !== null ? {
|
|
205
197
|
subtitle: `${courses} ${translate('courses')}`
|
|
206
198
|
} : {}, {
|
|
207
199
|
title: title,
|
|
208
200
|
selected: selected || selectedPriority === priorityRef,
|
|
201
|
+
selectedColor: COLORS.cm_primary_blue,
|
|
209
202
|
disabled: disabled,
|
|
210
203
|
onClick: handlePriorityClick,
|
|
211
204
|
tags: [{
|