@coorpacademy/components 11.32.24-alpha.0 → 11.32.24

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.
Files changed (189) hide show
  1. package/es/atom/button-link/index.d.ts +1 -0
  2. package/es/atom/button-link/index.d.ts.map +1 -1
  3. package/es/atom/button-link/index.js +4 -2
  4. package/es/atom/button-link/index.js.map +1 -1
  5. package/es/atom/button-link/types.d.ts +2 -0
  6. package/es/atom/button-link/types.d.ts.map +1 -1
  7. package/es/atom/button-link/types.js +1 -0
  8. package/es/atom/button-link/types.js.map +1 -1
  9. package/es/atom/circular-progress-bar/index.d.ts.map +1 -1
  10. package/es/atom/circular-progress-bar/index.js +2 -9
  11. package/es/atom/circular-progress-bar/index.js.map +1 -1
  12. package/es/atom/input-doublestep/index.d.ts +1 -0
  13. package/es/atom/input-doublestep/index.d.ts.map +1 -1
  14. package/es/atom/input-doublestep/index.js +38 -13
  15. package/es/atom/input-doublestep/index.js.map +1 -1
  16. package/es/atom/input-doublestep/style.css +7 -67
  17. package/es/atom/select/index.js +1 -1
  18. package/es/atom/select/index.js.map +1 -1
  19. package/es/molecule/base-modal/index.d.ts +1 -0
  20. package/es/molecule/base-modal/index.d.ts.map +1 -1
  21. package/es/molecule/base-modal/index.js +8 -6
  22. package/es/molecule/base-modal/index.js.map +1 -1
  23. package/es/molecule/brand-create-form/index.d.ts.map +1 -1
  24. package/es/molecule/brand-create-form/index.js +9 -4
  25. package/es/molecule/brand-create-form/index.js.map +1 -1
  26. package/es/molecule/brand-download-box/index.d.ts.map +1 -1
  27. package/es/molecule/brand-download-box/index.js +11 -6
  28. package/es/molecule/brand-download-box/index.js.map +1 -1
  29. package/es/molecule/brand-download-box/style.css +6 -5
  30. package/es/molecule/brand-form-group/index.d.ts.map +1 -1
  31. package/es/molecule/brand-form-group/index.js +12 -1
  32. package/es/molecule/brand-form-group/index.js.map +1 -1
  33. package/es/molecule/cm-popin/style.css +1 -1
  34. package/es/molecule/cm-popin/types.d.ts +3 -0
  35. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  36. package/es/molecule/discipline-associated-skills/index.js +1 -1
  37. package/es/molecule/discipline-associated-skills/index.js.map +1 -1
  38. package/es/molecule/draggable-list/index.d.ts +1 -0
  39. package/es/molecule/expandible-actionable-table/index.d.ts +1 -0
  40. package/es/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  41. package/es/molecule/expandible-actionable-table/types.d.ts +1 -0
  42. package/es/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  43. package/es/molecule/learning-priority-modal/index.d.ts.map +1 -1
  44. package/es/molecule/learning-priority-modal/index.js +8 -15
  45. package/es/molecule/learning-priority-modal/index.js.map +1 -1
  46. package/es/molecule/learning-priority-modal/style.css +0 -1
  47. package/es/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
  48. package/es/molecule/learning-priority-setup-item/index.js +1 -1
  49. package/es/molecule/learning-priority-setup-item/index.js.map +1 -1
  50. package/es/molecule/setup-section/index.d.ts.map +1 -1
  51. package/es/molecule/setup-section/index.js +3 -1
  52. package/es/molecule/setup-section/index.js.map +1 -1
  53. package/es/molecule/setup-section/style.css +2 -2
  54. package/es/molecule/skill-picker-modal/index.js +1 -1
  55. package/es/molecule/skill-picker-modal/index.js.map +1 -1
  56. package/es/organism/brand-form/index.d.ts.map +1 -1
  57. package/es/organism/brand-form/index.js +24 -15
  58. package/es/organism/brand-form/index.js.map +1 -1
  59. package/es/organism/brand-learning-priorities/index.d.ts +1 -21
  60. package/es/organism/brand-learning-priorities/index.d.ts.map +1 -1
  61. package/es/organism/brand-learning-priorities/index.js +1 -14
  62. package/es/organism/brand-learning-priorities/index.js.map +1 -1
  63. package/es/organism/brand-learning-priorities/style.css +2 -0
  64. package/es/organism/list-item/index.d.ts +3 -1
  65. package/es/organism/list-item/index.d.ts.map +1 -1
  66. package/es/organism/list-item/index.js +7 -5
  67. package/es/organism/list-item/index.js.map +1 -1
  68. package/es/organism/list-items/index.d.ts +3 -0
  69. package/es/organism/setup-header/index.d.ts +4 -0
  70. package/es/organism/wizard-contents/index.d.ts +3 -0
  71. package/es/template/app-player/loading/index.d.ts +3 -0
  72. package/es/template/app-player/player/index.d.ts +6 -0
  73. package/es/template/app-player/player/slides/index.d.ts +3 -0
  74. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  75. package/es/template/app-player/popin-correction/index.d.ts +3 -0
  76. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  77. package/es/template/app-player/popin-end/index.d.ts +3 -0
  78. package/es/template/app-review/index.d.ts +3 -0
  79. package/es/template/app-review/index.d.ts.map +1 -1
  80. package/es/template/app-review/player/prop-types.d.ts +3 -0
  81. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  82. package/es/template/app-review/prop-types.d.ts +3 -0
  83. package/es/template/app-review/prop-types.d.ts.map +1 -1
  84. package/es/template/back-office/brand-create/index.d.ts +4 -0
  85. package/es/template/back-office/brand-create/index.d.ts.map +1 -1
  86. package/es/template/back-office/brand-list/index.d.ts +4 -0
  87. package/es/template/back-office/brand-list/index.d.ts.map +1 -1
  88. package/es/template/back-office/brand-update/index.d.ts +14 -0
  89. package/es/template/back-office/dashboard-preview/index.d.ts +4 -0
  90. package/es/template/back-office/layout/index.d.ts +4 -0
  91. package/es/template/back-office/layout/index.d.ts.map +1 -1
  92. package/es/template/common/dashboard/index.d.ts +6 -0
  93. package/es/template/common/search-page/index.d.ts +3 -0
  94. package/es/template/external-course/index.d.ts +3 -0
  95. package/lib/atom/button-link/index.d.ts +1 -0
  96. package/lib/atom/button-link/index.d.ts.map +1 -1
  97. package/lib/atom/button-link/index.js +4 -2
  98. package/lib/atom/button-link/index.js.map +1 -1
  99. package/lib/atom/button-link/types.d.ts +2 -0
  100. package/lib/atom/button-link/types.d.ts.map +1 -1
  101. package/lib/atom/button-link/types.js +1 -0
  102. package/lib/atom/button-link/types.js.map +1 -1
  103. package/lib/atom/circular-progress-bar/index.d.ts.map +1 -1
  104. package/lib/atom/circular-progress-bar/index.js +1 -8
  105. package/lib/atom/circular-progress-bar/index.js.map +1 -1
  106. package/lib/atom/input-doublestep/index.d.ts +1 -0
  107. package/lib/atom/input-doublestep/index.d.ts.map +1 -1
  108. package/lib/atom/input-doublestep/index.js +39 -13
  109. package/lib/atom/input-doublestep/index.js.map +1 -1
  110. package/lib/atom/input-doublestep/style.css +7 -67
  111. package/lib/atom/select/index.js +1 -1
  112. package/lib/atom/select/index.js.map +1 -1
  113. package/lib/molecule/base-modal/index.d.ts +1 -0
  114. package/lib/molecule/base-modal/index.d.ts.map +1 -1
  115. package/lib/molecule/base-modal/index.js +8 -6
  116. package/lib/molecule/base-modal/index.js.map +1 -1
  117. package/lib/molecule/brand-create-form/index.d.ts.map +1 -1
  118. package/lib/molecule/brand-create-form/index.js +9 -4
  119. package/lib/molecule/brand-create-form/index.js.map +1 -1
  120. package/lib/molecule/brand-download-box/index.d.ts.map +1 -1
  121. package/lib/molecule/brand-download-box/index.js +11 -6
  122. package/lib/molecule/brand-download-box/index.js.map +1 -1
  123. package/lib/molecule/brand-download-box/style.css +6 -5
  124. package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
  125. package/lib/molecule/brand-form-group/index.js +12 -1
  126. package/lib/molecule/brand-form-group/index.js.map +1 -1
  127. package/lib/molecule/cm-popin/style.css +1 -1
  128. package/lib/molecule/cm-popin/types.d.ts +3 -0
  129. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  130. package/lib/molecule/discipline-associated-skills/index.js +1 -1
  131. package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
  132. package/lib/molecule/draggable-list/index.d.ts +1 -0
  133. package/lib/molecule/expandible-actionable-table/index.d.ts +1 -0
  134. package/lib/molecule/expandible-actionable-table/index.d.ts.map +1 -1
  135. package/lib/molecule/expandible-actionable-table/types.d.ts +1 -0
  136. package/lib/molecule/expandible-actionable-table/types.d.ts.map +1 -1
  137. package/lib/molecule/learning-priority-modal/index.d.ts.map +1 -1
  138. package/lib/molecule/learning-priority-modal/index.js +9 -14
  139. package/lib/molecule/learning-priority-modal/index.js.map +1 -1
  140. package/lib/molecule/learning-priority-modal/style.css +0 -1
  141. package/lib/molecule/learning-priority-setup-item/index.d.ts.map +1 -1
  142. package/lib/molecule/learning-priority-setup-item/index.js +1 -1
  143. package/lib/molecule/learning-priority-setup-item/index.js.map +1 -1
  144. package/lib/molecule/setup-section/index.d.ts.map +1 -1
  145. package/lib/molecule/setup-section/index.js +4 -1
  146. package/lib/molecule/setup-section/index.js.map +1 -1
  147. package/lib/molecule/setup-section/style.css +2 -2
  148. package/lib/molecule/skill-picker-modal/index.js +1 -1
  149. package/lib/molecule/skill-picker-modal/index.js.map +1 -1
  150. package/lib/organism/brand-form/index.d.ts.map +1 -1
  151. package/lib/organism/brand-form/index.js +24 -15
  152. package/lib/organism/brand-form/index.js.map +1 -1
  153. package/lib/organism/brand-learning-priorities/index.d.ts +1 -21
  154. package/lib/organism/brand-learning-priorities/index.d.ts.map +1 -1
  155. package/lib/organism/brand-learning-priorities/index.js +3 -15
  156. package/lib/organism/brand-learning-priorities/index.js.map +1 -1
  157. package/lib/organism/brand-learning-priorities/style.css +2 -0
  158. package/lib/organism/list-item/index.d.ts +3 -1
  159. package/lib/organism/list-item/index.d.ts.map +1 -1
  160. package/lib/organism/list-item/index.js +7 -5
  161. package/lib/organism/list-item/index.js.map +1 -1
  162. package/lib/organism/list-items/index.d.ts +3 -0
  163. package/lib/organism/setup-header/index.d.ts +4 -0
  164. package/lib/organism/wizard-contents/index.d.ts +3 -0
  165. package/lib/template/app-player/loading/index.d.ts +3 -0
  166. package/lib/template/app-player/player/index.d.ts +6 -0
  167. package/lib/template/app-player/player/slides/index.d.ts +3 -0
  168. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  169. package/lib/template/app-player/popin-correction/index.d.ts +3 -0
  170. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  171. package/lib/template/app-player/popin-end/index.d.ts +3 -0
  172. package/lib/template/app-review/index.d.ts +3 -0
  173. package/lib/template/app-review/index.d.ts.map +1 -1
  174. package/lib/template/app-review/player/prop-types.d.ts +3 -0
  175. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  176. package/lib/template/app-review/prop-types.d.ts +3 -0
  177. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  178. package/lib/template/back-office/brand-create/index.d.ts +4 -0
  179. package/lib/template/back-office/brand-create/index.d.ts.map +1 -1
  180. package/lib/template/back-office/brand-list/index.d.ts +4 -0
  181. package/lib/template/back-office/brand-list/index.d.ts.map +1 -1
  182. package/lib/template/back-office/brand-update/index.d.ts +14 -0
  183. package/lib/template/back-office/dashboard-preview/index.d.ts +4 -0
  184. package/lib/template/back-office/layout/index.d.ts +4 -0
  185. package/lib/template/back-office/layout/index.d.ts.map +1 -1
  186. package/lib/template/common/dashboard/index.d.ts +6 -0
  187. package/lib/template/common/search-page/index.d.ts +3 -0
  188. package/lib/template/external-course/index.d.ts +3 -0
  189. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["inputContainerStyle","default","style","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","imageUploadContainer","bulkUploadContainer","buttonType","buildField","index","input","theme","size","styleInput","styleField","fieldMassiveBattle","defineLayoutClass","layout","classNames","grid","layoutBulk","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","subtitleSize","fieldsList","convert","cap","useMemo","wrapper","groupGrid","titleWrapper","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","InputFileDraggable","SetupSlider","SetupSections","InputText","BrandDownloadBox","BrandUploadBox","Button","ButtonLink","SelectMultiple","Roles","TitleAndInput"],"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(['titleAndInput'])\n })\n ])\n )\n};\nexport default BrandFormGroup;\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,mBAAmB,GAAG;EAC1BC,OAAO,EAAEC,cAAA,CAAMC,YADW;EAE1BC,MAAM,EAAEF,cAAA,CAAMG,WAFY;EAG1BC,KAAK,EAAEJ,cAAA,CAAMK;AAHa,CAA5B;;AAMA,MAAMC,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IAACC;EAAD,IAASD,KAAf;;EAEA,QAAQC,IAAR;IACE,KAAK,cAAL;MACE,oBAAO,6BAAC,qBAAD,EAAkBD,KAAlB,CAAP;;IACF,KAAK,OAAL;MACE,oBAAO,6BAAC,mBAAD,EAAgBA,KAAhB,CAAP;;IACF,KAAK,UAAL;MACE,oBAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;IACF,KAAK,QAAL;MACE,oBAAO,6BAAC,oBAAD,EAAiBA,KAAjB,CAAP;;IACF,KAAK,UAAL;MACE,oBAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;IACF,KAAK,MAAL;MACE,oBAAO,6BAAC,kBAAD,EAAeA,KAAf,CAAP;;IACF,KAAK,YAAL;MACE,oBAAO,6BAAC,wBAAD,EAAqBA,KAArB,CAAP;;IACF,KAAK,QAAL;MACE,oBAAO,6BAAC,eAAD,eAAYA,KAAZ;QAAmB,KAAK,EAAE;MAA1B,GAAP;;IACF,KAAK,gBAAL;MACE,oBAAO,6BAAC,uBAAD,E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AAUM,KAAV,CAAgB,CAAC,gBAAD,CAAhB;EAFR,GA9EkB,EAkFlBN,kBAAA,CAAUI,KAAV,cACKoB,0BAAA,CAAMzB,SADX;IAEEhC,IAAI,EAAEiC,kBAAA,CAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;EAFR,GAlFkB,EAsFlBN,kBAAA,CAAUI,KAAV,CAAgBc,kBAAA,CAAUnB,SAA1B,CAtFkB,EAuFlBC,kBAAA,CAAUI,KAAV,cACKqB,sBAAA,CAAc1B,SADnB;IAEEhC,IAAI,EAAEiC,kBAAA,CAAUM,KAAV,CAAgB,CAAC,eAAD,CAAhB;EAFR,GAvFkB,CAApB,CADM;AANiB,CAA3B;eAqGetB,c"}
1
+ {"version":3,"file":"index.js","names":["inputContainerStyle","default","style","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","classNames","grid","layoutBulk","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","subtitleSize","fieldsList","convert","cap","useMemo","wrapper","groupGrid","titleWrapper","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","InputFileDraggable","SetupSlider","SetupSections","InputText","BrandDownloadBox","BrandUploadBox","Button","ButtonLink","SelectMultiple","Roles","TitleAndInput"],"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;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,mBAAmB,GAAG;EAC1BC,OAAO,EAAEC,cAAA,CAAMC,YADW;EAE1BC,MAAM,EAAEF,cAAA,CAAMG,WAFY;EAG1BC,KAAK,EAAEJ,cAAA,CAAMK;AAHa,CAA5B;;AAMA,MAAMC,UAAU,GAAGC,KAAK,IAAI;EAC1B,MAAM;IAACC;EAAD,IAASD,KAAf;;EAEA,QAAQC,IAAR;IACE,KAAK,cAAL;MACE,oBAAO,6BAAC,qBAAD,EAAkBD,KAAlB,CAAP;;IACF,KAAK,OAAL;MACE,oBAAO,6BAAC,mBAAD,EAAgBA,KAAhB,CAAP;;IACF,KAAK,UAAL;MACE,oBAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;IACF,KAAK,QAAL;MACE,oBAAO,6BAAC,oBAAD,EAAiBA,KAAjB,CAAP;;IACF,KAAK,UAAL;MACE,oBAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;IACF,KAAK,MAAL;MACE,oBAAO,6BAAC,kBAAD,EAAeA,KAAf,CAAP;;IACF,KAAK,YAAL;MACE,oBAAO,6BAAC,wBAAD,EAAqBA,KAArB,CAAP;;IACF,KAAK,QAAL;MACE,oBAAO,6BAAC,eAAD,eAAYA,KAAZ;QAAmB,KAAK,EAAE;MAA1B,GAAP;;IACF,KAAK,gBAAL;MACE,oBAAO,6BAAC,uBAAD,EAAoBA,KAApB,CAAP;;IACF,KAAK,UAAL;MACE,oBAAO,6BAAC,sBAAD,EA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AWvB,SAAX,CAAqBrC,IAFnC;IAGEA,IAAI,EAAEsC,kBAAA,CAAUM,KAAV,CAAgB,CAAC,YAAD,CAAhB;EAHR,GAzEkB,EA8ElBN,kBAAA,CAAUI,KAAV,cACKmB,uBAAA,CAAexB,SADpB;IAEErC,IAAI,EAAEsC,kBAAA,CAAUM,KAAV,CAAgB,CAAC,gBAAD,CAAhB;EAFR,GA9EkB,EAkFlBN,kBAAA,CAAUI,KAAV,cACKoB,0BAAA,CAAMzB,SADX;IAEErC,IAAI,EAAEsC,kBAAA,CAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;EAFR,GAlFkB,EAsFlBN,kBAAA,CAAUI,KAAV,CAAgBc,kBAAA,CAAUnB,SAA1B,CAtFkB,EAuFlBC,kBAAA,CAAUI,KAAV,cACKqB,sBAAA,CAAc1B,SADnB;IAEErC,IAAI,EAAEsC,kBAAA,CAAUM,KAAV,CAAgB,CAAC,eAAD,CAAhB;EAFR,GAvFkB,CAApB,CADM;AANiB,CAA3B;eAqGetB,c"}
@@ -50,7 +50,7 @@
50
50
  width: fit-content;
51
51
  flex-grow: 0;
52
52
  margin: 16px;
53
- padding: 16px 16px 20px 16px;
53
+ padding: 16px 16px 16px 16px;
54
54
  border-radius: 20px;
55
55
  background-color: cm_grey_50;
56
56
  display: flex;
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,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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"}
@@ -52,7 +52,7 @@ const DisciplineAssociatedSkills = (props, context) => {
52
52
  }, skill.locale)), []);
53
53
  const TooltipContentElement = (0, _react.useCallback)(skill => /*#__PURE__*/_react.default.createElement("div", {
54
54
  className: _style.default.tooltipContentWrapper
55
- }, skill.focused ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("b", null, translate('skill_focused_chip_tooltip'))) : null, /*#__PURE__*/_react.default.createElement("div", null, skill.locale)), []);
55
+ }, skill.focused ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("b", null, translate('skill_focused_chip_tooltip'))) : null, /*#__PURE__*/_react.default.createElement("div", null, skill.locale)), [translate]);
56
56
  return !(0, _isEmpty2.default)(skills) ? /*#__PURE__*/_react.default.createElement("div", {
57
57
  "data-name": "discipline-associated-skills",
58
58
  className: _style.default.associatedSkillsWrapper
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["DisciplineAssociatedSkills","props","context","translate","skills","skillsBaseUrl","onSkillClick","hrefFormat","useCallback","skill","ref","AnchorElement","style","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","event","preventDefault","handleAnchorElement","handleTooltipContentElement","classnames","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","Provider","childContextTypes","propTypes","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;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,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,GAAG,IAAAC,kBAAA,EACjBC,KAAK,IAAKJ,aAAa,GAAI,GAAEA,aAAc,IAAGI,KAAK,CAACC,GAAI,EAAjC,GAAqC,EAD3C,EAEjB,CAACL,aAAD,CAFiB,CAAnB;EAKA,MAAMM,aAAa,GAAG,IAAAH,kBAAA,EACpBC,KAAK,iBACH;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,GACGJ,KAAK,CAACK,OAAN,gBACC,6BAAC,aAAD;IACE,QAAQ,EAAC,gBADX;IAEE,IAAI,EAAE;MACJC,MAAM,EAAE,EADJ;MAEJC,WAAW,EAAE;IAFT;EAFR,EADD,GAQG,IATN,eAUE;IAAK,SAAS,EAAEJ,cAAA,CAAMK;EAAtB,GAA+CR,KAAK,CAACS,MAArD,CAVF,CAFkB,EAepB,EAfoB,CAAtB;EAkBA,MAAMC,qBAAqB,GAAG,IAAAX,kBAAA,EAC5BC,KAAK,iBACH;IAAK,SAAS,EAAEG,cAAA,CAAMQ;EAAtB,GACGX,KAAK,CAACK,OAAN,gBACC,uDACE,wCAAIX,SAAS,CAAC,4BAAD,CAAb,CADF,CADD,GAIG,IALN,e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mC,YAA3B,GAA0C;EACxChC,SAAS,EAAEiC,iBAAA,CAASC,iBAAT,CAA2BlC;AADE,CAA1C;AAIAH,0BAA0B,CAACsC,SAA3B,2CAAuC;EACrClC,MAAM,EAAEmC,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUE,KAAV,CAAgB;IACd/B,GAAG,EAAE6B,kBAAA,CAAUG,MADD;IAEdxB,MAAM,EAAEqB,kBAAA,CAAUG,MAFJ;IAGd5B,OAAO,EAAEyB,kBAAA,CAAUI;EAHL,CAAhB,CADM,CAD6B;EAQrCtC,aAAa,EAAEkC,kBAAA,CAAUG,MARY;EASrCpC,YAAY,EAAEiC,kBAAA,CAAUK;AATa,CAAvC;eAYe5C,0B"}
1
+ {"version":3,"file":"index.js","names":["DisciplineAssociatedSkills","props","context","translate","skills","skillsBaseUrl","onSkillClick","hrefFormat","useCallback","skill","ref","AnchorElement","style","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","event","preventDefault","handleAnchorElement","handleTooltipContentElement","classnames","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","Provider","childContextTypes","propTypes","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;;AACA;;AACA;;AA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;IAGd5B,OAAO,EAAEyB,kBAAA,CAAUI;EAHL,CAAhB,CADM,CAD6B;EAQrCtC,aAAa,EAAEkC,kBAAA,CAAUG,MARY;EASrCpC,YAAY,EAAEiC,kBAAA,CAAUK;AATa,CAAvC;eAYe5C,0B"}
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoL/E,CAAC;AASF,eAAe,yBAAyB,CAAC"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBrB,CAAC;AAEF,oBAAY,KAAK,GACb,MAAM,GACN,CAAC,eAAe,GAAG;IACjB,aAAa,EAAE,QAAQ,CAAC;CACzB,CAAC,GACF,CAAC,oBAAoB,GAAG;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AY,OAAO,GAAG,MAAM,EAAE,CAAC;AAC/B,oBAAY,IAAI,GAAG,GAAG,EAAE,CAAC;AAEzB,oBAAY,KAAK,GAAG;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,GAAG,MAAM,GAAG,IAAI,GAAG,GAAG,EAAE,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,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":";AAgEA,qFAuKC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learning-priority-modal/index.js"],"names":[],"mappings":";AA2DA,qFA0KC"}
@@ -7,8 +7,6 @@ var _pick2 = _interopRequireDefault(require("lodash/fp/pick"));
7
7
 
8
8
  var _assign2 = _interopRequireDefault(require("lodash/fp/assign"));
9
9
 
10
- var _get2 = _interopRequireDefault(require("lodash/fp/get"));
11
-
12
10
  var _react = _interopRequireWildcard(require("react"));
13
11
 
14
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -31,6 +29,8 @@ var _searchForm = _interopRequireDefault(require("../search-form"));
31
29
 
32
30
  var _searchValueIncluded = _interopRequireDefault(require("../../util/search-value-included"));
33
31
 
32
+ var _colors = require("../../variables/colors");
33
+
34
34
  var _style = _interopRequireDefault(require("./style.css"));
35
35
 
36
36
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -41,17 +41,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
41
41
 
42
42
  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); }
43
43
 
44
- const FilterButton = (props, context) => {
44
+ const FilterButton = props => {
45
45
  const {
46
46
  active,
47
47
  filter,
48
48
  itemTotal,
49
49
  onClick
50
50
  } = props;
51
- const {
52
- skin
53
- } = context;
54
- const primarySkinColor = (0, _get2.default)('common.primary', skin);
51
+ const primarySkinColor = _colors.COLORS.cm_primary_blue;
55
52
  const Content = (0, _react.useCallback)(() => /*#__PURE__*/_react.default.createElement("div", null, filter, /*#__PURE__*/_react.default.createElement("span", {
56
53
  className: active ? _style.default.skillFilterNumber : _style.default.skillFilterNumberInActive,
57
54
  style: {
@@ -73,10 +70,6 @@ const FilterButton = (props, context) => {
73
70
  return /*#__PURE__*/_react.default.createElement(_buttonLink.default, buttonProps);
74
71
  };
75
72
 
76
- FilterButton.contextTypes = {
77
- skin: _provider.default.childContextTypes.skin,
78
- translate: _provider.default.childContextTypes.translate
79
- };
80
73
  FilterButton.propTypes = process.env.NODE_ENV !== "production" ? {
81
74
  active: _propTypes.default.bool,
82
75
  filter: _propTypes.default.string,
@@ -148,10 +141,11 @@ const LearningPriorityModal = (props, context) => {
148
141
  },
149
142
  label: translate('add'),
150
143
  iconName: 'plus',
151
- disabled: isLoading || !selectedPriority
144
+ disabled: isLoading || !selectedPriority,
145
+ color: _colors.COLORS.cm_primary_blue
152
146
  }
153
147
  };
154
- }, [handleCancel, setSelectedPriority, setSelectedPriorityType, onAdd, translate, selectedPriority, selectedPriorityType, isLoading]);
148
+ }, [handleCancel, setSelectedPriority, setSelectedPriorityType, onAdd, onClose, translate, selectedPriority, selectedPriorityType, isLoading]);
155
149
  if (!isLoading && !priorities || !isOpen) return null;
156
150
  return /*#__PURE__*/_react.default.createElement(_baseModal.default, {
157
151
  title: translate('learning_priority_modal_title'),
@@ -222,12 +216,13 @@ const LearningPriorityModal = (props, context) => {
222
216
  setSelectedPriorityType(type);
223
217
  }
224
218
 
225
- if (filterValue !== 'all' && type !== filterValue) return null;
219
+ if (filterValue !== 'all' && type !== filterValue || !type || !title) return null;
226
220
  return /*#__PURE__*/_react.default.createElement(_listItem.default, _extends({}, courses !== null ? {
227
221
  subtitle: `${courses} ${translate('courses')}`
228
222
  } : {}, {
229
223
  title: title,
230
224
  selected: selected || selectedPriority === priorityRef,
225
+ selectedColor: _colors.COLORS.cm_primary_blue,
231
226
  disabled: disabled,
232
227
  onClick: handlePriorityClick,
233
228
  tags: [{
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["FilterButton","props","context","active","filter","itemTotal","onClick","skin","primarySkinColor","Content","useCallback","style","skillFilterNumber","skillFilterNumberInActive","backgroundColor","convert","color","buttonProps","customStyle","transition","width","content","contextTypes","Provider","childContextTypes","translate","propTypes","PropTypes","bool","string","number","func","LearningPriorityModal","priorities","preselected","isOpen","isLoading","filters","onCancel","onAdd","onClose","selectedPriority","setSelectedPriority","useState","selectedPriorityType","setSelectedPriorityType","searchValue","setSearchValue","filterValue","setFilterValue","searchResults","setSearchResults","handleCancel","handleClose","handleSearch","value","priority","searchValueIncluded","title","handleSearchReset","useEffect","priorityList","useMemo","map","isPreSelectedPriority","some","selected","priorityRef","disabled","footer","cancelButton","label","confirmButton","onConfirm","iconName","LearningPriorityContainer","loaderContainer","loader","searchWrapper","placeholder","onChange","filterWrapper","length","index","name","count","handleChange","filterButtonWrapper","priorityListWrapper","courses","type","handlePriorityClick","subtitle","arrayOf","shape","oneOf","SelectOptionPropTypes"],"sources":["../../../src/molecule/learning-priority-modal/index.js"],"sourcesContent":["import React, {useEffect, useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, assign, pick} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport BaseModal from '../base-modal';\nimport ListItem from '../../organism/list-item';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport Provider from '../../atom/provider';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport SearchForm from '../search-form';\nimport searchValueIncluded from '../../util/search-value-included';\nimport style from './style.css';\n\nconst FilterButton = (props, context) => {\n const {active, filter, itemTotal, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const Content = useCallback(\n () => (\n <div>\n {filter}\n <span\n className={active ? style.skillFilterNumber : style.skillFilterNumberInActive}\n style={{\n backgroundColor: active ? convert(`color(${primarySkinColor} a(0.07))`) : '#EAEAEB',\n color: active ? primarySkinColor : '#515161'\n }}\n >\n {itemTotal}\n </span>\n </div>\n ),\n [filter, itemTotal, active, primarySkinColor]\n );\n\n const buttonProps = {\n customStyle: {\n backgroundColor: active ? convert(`color(${primarySkinColor} a(0.07))`) : 'transparent',\n color: active ? primarySkinColor : '#9999A8',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n onClick,\n content: <Content />,\n 'data-name': 'change-skill-focus-button'\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n active: PropTypes.bool,\n filter: PropTypes.string,\n itemTotal: PropTypes.number,\n onClick: PropTypes.func\n};\n\nconst LearningPriorityModal = (props, context) => {\n const {priorities, preselected, isOpen, isLoading, filters, onCancel, onAdd, onClose} = props;\n const {translate} = context;\n\n const [selectedPriority, setSelectedPriority] = useState('');\n const [selectedPriorityType, setSelectedPriorityType] = useState('');\n const [searchValue, setSearchValue] = useState('');\n const [filterValue, setFilterValue] = useState('all');\n const [searchResults, setSearchResults] = useState(priorities);\n\n const handleCancel = useCallback(() => {\n setSelectedPriority('');\n setSelectedPriorityType('');\n onCancel();\n }, [setSelectedPriority, setSelectedPriorityType, onCancel]);\n\n const handleClose = useCallback(() => {\n setSelectedPriority('');\n setSelectedPriorityType('');\n onClose();\n }, [setSelectedPriority, setSelectedPriorityType, onClose]);\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n setSearchResults(priorities.filter(priority => searchValueIncluded(priority.title, value)));\n },\n [priorities, setSearchValue, setSearchResults]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n setSearchResults(priorities);\n }, [priorities, setSearchValue, setSearchResults]);\n\n useEffect(() => {\n setSearchResults(priorities);\n }, [priorities]);\n\n const priorityList = useMemo(() => {\n return searchResults.map(priority => {\n const isPreSelectedPriority = preselected.some(selected => selected === priority.priorityRef);\n return assign(\n {\n selected: isPreSelectedPriority,\n disabled: isPreSelectedPriority\n },\n pick(['title', 'priorityRef', 'type', 'courses'], priority)\n );\n });\n }, [searchResults, preselected]);\n\n const footer = useMemo(() => {\n return {\n cancelButton: {\n onCancel: handleCancel,\n label: translate('cancel')\n },\n confirmButton: {\n onConfirm: () => {\n onAdd(selectedPriority, selectedPriorityType);\n setSelectedPriority('');\n setSelectedPriorityType('');\n onClose();\n },\n label: translate('add'),\n iconName: 'plus',\n disabled: isLoading || !selectedPriority\n }\n };\n }, [\n handleCancel,\n setSelectedPriority,\n setSelectedPriorityType,\n onAdd,\n translate,\n selectedPriority,\n selectedPriorityType,\n isLoading\n ]);\n\n if ((!isLoading && !priorities) || !isOpen) return null;\n\n return (\n <BaseModal\n title={translate('learning_priority_modal_title')}\n description={translate('learning_priority_modal_description')}\n isOpen={isOpen}\n onClose={handleClose}\n footer={footer}\n >\n <div className={style.LearningPriorityContainer}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_priority_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n />\n </div>\n <div className={style.filterWrapper}>\n {searchResults.length > 0\n ? filters.map((filter, index) => {\n const {name, value, count} = filter;\n\n function handleChange() {\n setFilterValue(value);\n handleSearchReset();\n }\n\n if (count === 0) return null;\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n active={filterValue === value}\n filter={name}\n onClick={handleChange}\n itemTotal={count}\n />\n </div>\n );\n })\n : null}\n </div>\n <div className={style.priorityListWrapper}>\n {priorityList.map(priority => {\n const {title, priorityRef, courses = null, type, selected, disabled} = priority;\n function handlePriorityClick() {\n if (selectedPriority === priorityRef) {\n setSelectedPriority('');\n setSelectedPriorityType('');\n return;\n }\n setSelectedPriority(priorityRef);\n setSelectedPriorityType(type);\n }\n\n if (filterValue !== 'all' && type !== filterValue) return null;\n\n return (\n <ListItem\n {...(courses !== null ? {subtitle: `${courses} ${translate('courses')}`} : {})}\n title={title}\n selected={selected || selectedPriority === priorityRef}\n disabled={disabled}\n onClick={handlePriorityClick}\n tags={[{label: type, type: 'default'}]}\n key={priorityRef}\n backgroundColor=\"skin\"\n />\n );\n })}\n </div>\n </>\n )}\n </div>\n </BaseModal>\n );\n};\n\nLearningPriorityModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearningPriorityModal.propTypes = {\n priorities: PropTypes.arrayOf(\n PropTypes.shape({\n priorityRef: PropTypes.string,\n title: PropTypes.string,\n courses: PropTypes.number,\n type: PropTypes.oneOf(['skill', 'playlist', 'certificate'])\n })\n ),\n preselected: PropTypes.arrayOf(PropTypes.string),\n isOpen: PropTypes.bool,\n isLoading: PropTypes.bool,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n ...SelectOptionPropTypes,\n count: PropTypes.number\n })\n ),\n onCanc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AA,CAAUC,IAXW;EAYhCS,OAAO,EAAEV,kBAAA,CAAUkE,OAAV,CACPlE,kBAAA,CAAUmE,KAAV,cACKE,6BADL;IAEEX,KAAK,EAAE1D,kBAAA,CAAUG;EAFnB,GADO,CAZuB;EAkBhCQ,QAAQ,EAAEX,kBAAA,CAAUI,IAlBY;EAmBhCQ,KAAK,EAAEZ,kBAAA,CAAUI,IAnBe;EAoBhCS,OAAO,EAAEb,kBAAA,CAAUI;AApBa,CAAlC;eAuBeC,qB"}
1
+ {"version":3,"file":"index.js","names":["FilterButton","props","active","filter","itemTotal","onClick","primarySkinColor","COLORS","cm_primary_blue","Content","useCallback","style","skillFilterNumber","skillFilterNumberInActive","backgroundColor","convert","color","buttonProps","customStyle","transition","width","content","propTypes","PropTypes","bool","string","number","func","LearningPriorityModal","context","priorities","preselected","isOpen","isLoading","filters","onCancel","onAdd","onClose","translate","selectedPriority","setSelectedPriority","useState","selectedPriorityType","setSelectedPriorityType","searchValue","setSearchValue","filterValue","setFilterValue","searchResults","setSearchResults","handleCancel","handleClose","handleSearch","value","priority","searchValueIncluded","title","handleSearchReset","useEffect","priorityList","useMemo","map","isPreSelectedPriority","some","selected","priorityRef","disabled","footer","cancelButton","label","confirmButton","onConfirm","iconName","LearningPriorityContainer","loaderContainer","loader","searchWrapper","placeholder","onChange","filterWrapper","length","index","name","count","handleChange","filterButtonWrapper","priorityListWrapper","courses","type","handlePriorityClick","subtitle","contextTypes","Provider","childContextTypes","arrayOf","shape","oneOf","SelectOptionPropTypes"],"sources":["../../../src/molecule/learning-priority-modal/index.js"],"sourcesContent":["import React, {useEffect, useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {assign, pick} from 'lodash/fp';\nimport {convert} from 'css-color-function';\nimport BaseModal from '../base-modal';\nimport ListItem from '../../organism/list-item';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport Provider from '../../atom/provider';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport SearchForm from '../search-form';\nimport searchValueIncluded from '../../util/search-value-included';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst FilterButton = props => {\n const {active, filter, itemTotal, onClick} = props;\n const primarySkinColor = COLORS.cm_primary_blue;\n\n const Content = useCallback(\n () => (\n <div>\n {filter}\n <span\n className={active ? style.skillFilterNumber : style.skillFilterNumberInActive}\n style={{\n backgroundColor: active ? convert(`color(${primarySkinColor} a(0.07))`) : '#EAEAEB',\n color: active ? primarySkinColor : '#515161'\n }}\n >\n {itemTotal}\n </span>\n </div>\n ),\n [filter, itemTotal, active, primarySkinColor]\n );\n\n const buttonProps = {\n customStyle: {\n backgroundColor: active ? convert(`color(${primarySkinColor} a(0.07))`) : 'transparent',\n color: active ? primarySkinColor : '#9999A8',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n onClick,\n content: <Content />,\n 'data-name': 'change-skill-focus-button'\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.propTypes = {\n active: PropTypes.bool,\n filter: PropTypes.string,\n itemTotal: PropTypes.number,\n onClick: PropTypes.func\n};\n\nconst LearningPriorityModal = (props, context) => {\n const {priorities, preselected, isOpen, isLoading, filters, onCancel, onAdd, onClose} = props;\n const {translate} = context;\n\n const [selectedPriority, setSelectedPriority] = useState('');\n const [selectedPriorityType, setSelectedPriorityType] = useState('');\n const [searchValue, setSearchValue] = useState('');\n const [filterValue, setFilterValue] = useState('all');\n const [searchResults, setSearchResults] = useState(priorities);\n\n const handleCancel = useCallback(() => {\n setSelectedPriority('');\n setSelectedPriorityType('');\n onCancel();\n }, [setSelectedPriority, setSelectedPriorityType, onCancel]);\n\n const handleClose = useCallback(() => {\n setSelectedPriority('');\n setSelectedPriorityType('');\n onClose();\n }, [setSelectedPriority, setSelectedPriorityType, onClose]);\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n setSearchResults(priorities.filter(priority => searchValueIncluded(priority.title, value)));\n },\n [priorities, setSearchValue, setSearchResults]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n setSearchResults(priorities);\n }, [priorities, setSearchValue, setSearchResults]);\n\n useEffect(() => {\n setSearchResults(priorities);\n }, [priorities]);\n\n const priorityList = useMemo(() => {\n return searchResults.map(priority => {\n const isPreSelectedPriority = preselected.some(selected => selected === priority.priorityRef);\n return assign(\n {\n selected: isPreSelectedPriority,\n disabled: isPreSelectedPriority\n },\n pick(['title', 'priorityRef', 'type', 'courses'], priority)\n );\n });\n }, [searchResults, preselected]);\n\n const footer = useMemo(() => {\n return {\n cancelButton: {\n onCancel: handleCancel,\n label: translate('cancel')\n },\n confirmButton: {\n onConfirm: () => {\n onAdd(selectedPriority, selectedPriorityType);\n setSelectedPriority('');\n setSelectedPriorityType('');\n onClose();\n },\n label: translate('add'),\n iconName: 'plus',\n disabled: isLoading || !selectedPriority,\n color: COLORS.cm_primary_blue\n }\n };\n }, [\n handleCancel,\n setSelectedPriority,\n setSelectedPriorityType,\n onAdd,\n onClose,\n translate,\n selectedPriority,\n selectedPriorityType,\n isLoading\n ]);\n\n if ((!isLoading && !priorities) || !isOpen) return null;\n\n return (\n <BaseModal\n title={translate('learning_priority_modal_title')}\n description={translate('learning_priority_modal_description')}\n isOpen={isOpen}\n onClose={handleClose}\n footer={footer}\n >\n <div className={style.LearningPriorityContainer}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_priority_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n />\n </div>\n <div className={style.filterWrapper}>\n {searchResults.length > 0\n ? filters.map((filter, index) => {\n const {name, value, count} = filter;\n\n function handleChange() {\n setFilterValue(value);\n handleSearchReset();\n }\n\n if (count === 0) return null;\n\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton\n active={filterValue === value}\n filter={name}\n onClick={handleChange}\n itemTotal={count}\n />\n </div>\n );\n })\n : null}\n </div>\n <div className={style.priorityListWrapper}>\n {priorityList.map(priority => {\n const {title, priorityRef, courses = null, type, selected, disabled} = priority;\n function handlePriorityClick() {\n if (selectedPriority === priorityRef) {\n setSelectedPriority('');\n setSelectedPriorityType('');\n return;\n }\n setSelectedPriority(priorityRef);\n setSelectedPriorityType(type);\n }\n\n if ((filterValue !== 'all' && type !== filterValue) || !type || !title) return null;\n\n return (\n <ListItem\n {...(courses !== null ? {subtitle: `${courses} ${translate('courses')}`} : {})}\n title={title}\n selected={selected || selectedPriority === priorityRef}\n selectedColor={COLORS.cm_primary_blue}\n disabled={disabled}\n onClick={handlePriorityClick}\n tags={[{label: type, type: 'default'}]}\n key={priorityRef}\n backgroundColor=\"skin\"\n />\n );\n })}\n </div>\n </>\n )}\n </div>\n </BaseModal>\n );\n};\n\nLearningPriorityModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearningPriorityModal.propTypes = {\n priorities: PropTypes.arrayOf(\n PropTypes.shape({\n priorityRef: PropTypes.string,\n title: PropTypes.string,\n courses: PropTypes.number,\n type: PropTypes.oneOf(['skill', 'playlist', 'certificate'])\n })\n ),\n preselected: PropTypes.arrayOf(PropTypes.string),\n isOpen: PropTypes.bool,\n isLoading: PropTypes.bool,\n filters: PropTypes.arrayOf(\n PropTypes.shape({\n ...SelectOptionPropTypes,\n count: PropTypes.number\n })\n ),\n onCancel: PropTypes.func,\n onAdd: PropTypes.func,\n onClose: PropTypes.func\n};\n\nexport default LearningPriorityModal;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,YAAY,GAAGC,KAAK,IAAI;EAC5B,MAAM;IAACC,MAAD;IAASC,MAAT;IAAiBC,SAAjB;IAA4BC;EAA5B,IAAuCJ,KAA7C;EACA,MAAMK,gBAAg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9
 
11
10
  .loaderContainer {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learning-priority-setup-item/index.js"],"names":[],"mappings":";AAOA,kFAsDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learning-priority-setup-item/index.js"],"names":[],"mappings":";AAOA,kFAyDC"}
@@ -34,7 +34,7 @@ const LearningPrioritySetupItem = (props, context) => {
34
34
  const {
35
35
  translate
36
36
  } = context;
37
- const handleRemovePriority = (0, _react.useCallback)(() => onRemove(priorityRef, type), [priorityRef, type]);
37
+ const handleRemovePriority = (0, _react.useCallback)(() => onRemove(priorityRef, type), [priorityRef, type, onRemove]);
38
38
 
39
39
  const handleTypeTranslate = itemType => {
40
40
  switch (itemType) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["LearningPrioritySetupItem","props","context","priorityRef","id","title","courses","type","ariaLabel","onRemove","translate","handleRemovePriority","useCallback","handleTypeTranslate","itemType","style","container","containerInfos","titleWrapper","width","backgroundColor","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","number","oneOf","func"],"sources":["../../../src/molecule/learning-priority-setup-item/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst LearningPrioritySetupItem = (props, context) => {\n const {priorityRef, id, title, courses = null, type, 'aria-label': ariaLabel, onRemove} = props;\n\n const {translate} = context;\n\n const handleRemovePriority = useCallback(() => onRemove(priorityRef, type), [priorityRef, type]);\n\n const handleTypeTranslate = itemType => {\n switch (itemType) {\n case 'skill':\n return translate('skill');\n case 'playlist':\n return translate('playlist');\n case 'certificate':\n return translate('certificate');\n }\n };\n\n return (\n <div\n className={style.container}\n aria-label={ariaLabel}\n data-name={`learning-priority-setup-item-${id}`}\n >\n <div className={style.containerInfos}>\n <div className={style.titleWrapper}>\n <div className={style.title}>{title}</div>\n <div>\n <Tag label={handleTypeTranslate(type)} size={'S'} />\n </div>\n </div>\n {courses !== null ? (\n <span className={style.courses}>{`${courses} ${translate('courses')}`}</span>\n ) : null}\n </div>\n <ButtonLink\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n backgroundColor: 'transparent'\n }}\n hoverBackgroundColor=\"#EAEAEB\"\n icon={{\n position: 'left',\n faIcon: {\n name: 'trash',\n color: '#515161',\n size: 16\n }\n }}\n onClick={handleRemovePriority}\n />\n </div>\n );\n};\n\nLearningPrioritySetupItem.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearningPrioritySetupItem.propTypes = {\n 'aria-label': PropTypes.string,\n id: PropTypes.string,\n priorityRef: PropTypes.string,\n title: PropTypes.string,\n courses: PropTypes.number,\n type: PropTypes.oneOf(['skill', 'playlist', 'certificate']),\n onRemove: PropTypes.func\n};\n\nexport default LearningPrioritySetupItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,yBAAyB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACpD,MAAM;IAACC,WAAD;IAAcC,EAAd;IAAkBC,KAAlB;IAAyBC,OAAO,GAAG,IAAnC;IAAyCC,IAAzC;IAA+C,cAAcC,SAA7D;IAAwEC;EAAxE,IAAoFR,KAA1F;EAEA,MAAM;IAACS;EAAD,IAAcR,OAApB;EAEA,MAAMS,oBAAoB,GAAG,IAAAC,kBAAA,EAAY,MAAMH,QAAQ,CAACN,WAAD,EAAcI,IAAd,CAA1B,EAA+C,CAACJ,WAAD,EAAcI,IAAd,CAA/C,CAA7B;;EAEA,MAAMM,mBAAmB,GAAGC,QAAQ,IAAI;IACtC,QAAQA,QAAR;MACE,KAAK,OAAL;QACE,OAAOJ,SAAS,CAAC,OAAD,CAAhB;;MACF,KAAK,UAAL;QACE,OAAOA,SAAS,CAAC,UAAD,CAAhB;;MACF,K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CAAUC,MAJmB;EAKpCzB,OAAO,EAAEwB,kBAAA,CAAUE,MALiB;EAMpCzB,IAAI,EAAEuB,kBAAA,CAAUG,KAAV,CAAgB,CAAC,OAAD,EAAU,UAAV,EAAsB,aAAtB,CAAhB,CAN8B;EAOpCxB,QAAQ,EAAEqB,kBAAA,CAAUI;AAPgB,CAAtC;eAUelC,yB"}
1
+ {"version":3,"file":"index.js","names":["LearningPrioritySetupItem","props","context","priorityRef","id","title","courses","type","ariaLabel","onRemove","translate","handleRemovePriority","useCallback","handleTypeTranslate","itemType","style","container","containerInfos","titleWrapper","width","backgroundColor","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","number","oneOf","func"],"sources":["../../../src/molecule/learning-priority-setup-item/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst LearningPrioritySetupItem = (props, context) => {\n const {priorityRef, id, title, courses = null, type, 'aria-label': ariaLabel, onRemove} = props;\n\n const {translate} = context;\n\n const handleRemovePriority = useCallback(\n () => onRemove(priorityRef, type),\n [priorityRef, type, onRemove]\n );\n\n const handleTypeTranslate = itemType => {\n switch (itemType) {\n case 'skill':\n return translate('skill');\n case 'playlist':\n return translate('playlist');\n case 'certificate':\n return translate('certificate');\n }\n };\n\n return (\n <div\n className={style.container}\n aria-label={ariaLabel}\n data-name={`learning-priority-setup-item-${id}`}\n >\n <div className={style.containerInfos}>\n <div className={style.titleWrapper}>\n <div className={style.title}>{title}</div>\n <div>\n <Tag label={handleTypeTranslate(type)} size={'S'} />\n </div>\n </div>\n {courses !== null ? (\n <span className={style.courses}>{`${courses} ${translate('courses')}`}</span>\n ) : null}\n </div>\n <ButtonLink\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n backgroundColor: 'transparent'\n }}\n hoverBackgroundColor=\"#EAEAEB\"\n icon={{\n position: 'left',\n faIcon: {\n name: 'trash',\n color: '#515161',\n size: 16\n }\n }}\n onClick={handleRemovePriority}\n />\n </div>\n );\n};\n\nLearningPrioritySetupItem.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nLearningPrioritySetupItem.propTypes = {\n 'aria-label': PropTypes.string,\n id: PropTypes.string,\n priorityRef: PropTypes.string,\n title: PropTypes.string,\n courses: PropTypes.number,\n type: PropTypes.oneOf(['skill', 'playlist', 'certificate']),\n onRemove: PropTypes.func\n};\n\nexport default LearningPrioritySetupItem;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,yBAAyB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACpD,MAAM;IAACC,WAAD;IAAcC,EAAd;IAAkBC,KAAlB;IAAyBC,OAAO,GAAG,IAAnC;IAAyCC,IAAzC;IAA+C,cAAcC,SAA7D;IAAwEC;EAAxE,IAAoFR,KAA1F;EAEA,MAAM;IAACS;EAAD,IAAcR,OAApB;EAEA,MAAMS,oBAAoB,GAAG,IAAAC,kBAAA,EAC3B,MAAMH,QAAQ,CAACN,WAAD,EAAcI,IAAd,CADa,EAE3B,CAACJ,WAAD,EAAcI,IAAd,EAAoBE,QAApB,CAF2B,CAA7B;;EAKA,MAAMI,mBAAmB,GAAGC,QAAQ,IAAI;IACtC,QAAQA,QAAR;MACE,KAAK,OAAL;QACE,OAAOJ,SAAS,CAAC,OAAD,CAAhB;;MACF,KAAK,UAAL;QACE,OAAOA,SAAS,CAAC,UAAD,CAAhB;;MACF,KAAK,aAAL;QACE,OAAOA,SAAS,CAAC,aAAD,CAAhB;IANJ;EAQD,CATD;;EAWA,oBACE;IACE,SAAS,EAAEK,cAAA,CAAMC,SADnB;IAEE,cAAYR,SAFd;IAGE,aAAY,gCAA+BJ,EAAG;EAHhD,gBAKE;IAAK,SAAS,EAAEW,cAAA,CAAME;EAAtB,gBACE;IAAK,SAAS,EAAEF,cAAA,CA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"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/setup-section/index.js"],"names":[],"mappings":";AAsCA,qEAeC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7CD,mFAiBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/setup-section/index.js"],"names":[],"mappings":";AA0CA,qEAeC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhDD,mFAqBC"}
@@ -15,6 +15,8 @@ var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
15
15
 
16
16
  var _radioGroup = _interopRequireDefault(require("../../atom/radio-group"));
17
17
 
18
+ var _colors = require("../../variables/colors");
19
+
18
20
  var _style = _interopRequireDefault(require("./style.css"));
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -41,7 +43,8 @@ const ContentTypesToggler = (props, context) => {
41
43
  }, /*#__PURE__*/_react.default.createElement(_radioGroup.default, _extends({}, contentTypes, {
42
44
  style: {
43
45
  color: contentTypesColor
44
- }
46
+ },
47
+ color: _colors.COLORS.cm_primary_blue
45
48
  })));
46
49
  };
47
50
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ContentTypesToggler","props","context","skin","contentTypes","brand","orange","contentTypesColor","style","contentTypeWrapper","color","contextTypes","Provider","childContextTypes","propTypes","PropTypes","shape","RadioGroup","modified","bool","SetupSection","translate","title","display","wrapper","settings","label","string","isRequired","onUp","func","onDown","InputSwitch"],"sources":["../../../src/molecule/setup-section/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport style from './style.css';\n\nconst ContentTypesToggler = (props, context) => {\n const {skin} = context;\n const {contentTypes} = props;\n\n if (!contentTypes) {\n return null;\n }\n\n const brand = get('common.brand', skin);\n const orange = get('common.orange', skin);\n const contentTypesColor = get('modified', contentTypes) ? orange : brand;\n\n return (\n <div className={style.contentTypeWrapper}>\n <RadioGroup {...contentTypes} style={{color: contentTypesColor}} />\n </div>\n );\n};\n\nContentTypesToggler.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nContentTypesToggler.propTypes = {\n contentTypes: PropTypes.shape({\n ...RadioGroup.propTypes,\n modified: PropTypes.bool\n })\n};\n\nconst SetupSection = (props, context) => {\n const {translate} = context;\n\n const {title, display, contentTypes} = props;\n\n return (\n <div className={style.wrapper}>\n <div className={style.title}>{title}</div>\n <div className={style.settings}>\n <ContentTypesToggler contentTypes={contentTypes} />\n <div className={style.label}>{translate('Show')}</div>\n <InputSwitch {...display} />\n </div>\n </div>\n );\n};\n\nSetupSection.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nSetupSection.propTypes = {\n title: PropTypes.string.isRequired,\n onUp: PropTypes.func,\n onDown: PropTypes.func,\n display: PropTypes.shape(InputSwitch.propTypes),\n contentTypes: ContentTypesToggler.propTypes.contentTypes\n};\n\nexport default SetupSection;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC9C,MAAM;IAACC;EAAD,IAASD,OAAf;EACA,MAAM;IAACE;EAAD,IAAiBH,KAAvB;;EAEA,IAAI,CAACG,YAAL,EAAmB;IACjB,OAAO,IAAP;EACD;;EAED,MAAMC,KAAK,GAAG,mBAAI,cAAJ,EAAoBF,IAApB,CAAd;EACA,MAAMG,MAAM,GAAG,mBAAI,eAAJ,EAAqBH,IAArB,CAAf;EACA,MAAMI,iBAAiB,GAAG,mBAAI,UAAJ,EAAgBH,YAAhB,IAAgCE,MAAhC,GAAyCD,KAAnE;EAEA,oBACE;IAAK,SAAS,EAAEG,c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AEhB,kBAAA,CAAUe,IAHK;EAIvBP,OAAO,EAAER,kBAAA,CAAUC,KAAV,CAAgBgB,oBAAA,CAAYlB,SAA5B,CAJc;EAKvBV,YAAY,EAAEJ,mBAAmB,CAACc,SAApB,CAA8BV;AALrB,CAAzB;eAQegB,Y"}
1
+ {"version":3,"file":"index.js","names":["ContentTypesToggler","props","context","skin","contentTypes","brand","orange","contentTypesColor","style","contentTypeWrapper","color","COLORS","cm_primary_blue","contextTypes","Provider","childContextTypes","propTypes","PropTypes","shape","RadioGroup","modified","bool","SetupSection","translate","title","display","wrapper","settings","label","string","isRequired","onUp","func","onDown","InputSwitch"],"sources":["../../../src/molecule/setup-section/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport InputSwitch from '../../atom/input-switch';\nimport RadioGroup from '../../atom/radio-group';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst ContentTypesToggler = (props, context) => {\n const {skin} = context;\n const {contentTypes} = props;\n\n if (!contentTypes) {\n return null;\n }\n\n const brand = get('common.brand', skin);\n const orange = get('common.orange', skin);\n const contentTypesColor = get('modified', contentTypes) ? orange : brand;\n\n return (\n <div className={style.contentTypeWrapper}>\n <RadioGroup\n {...contentTypes}\n style={{color: contentTypesColor}}\n color={COLORS.cm_primary_blue}\n />\n </div>\n );\n};\nContentTypesToggler.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nContentTypesToggler.propTypes = {\n contentTypes: PropTypes.shape({\n ...RadioGroup.propTypes,\n modified: PropTypes.bool\n })\n};\n\nconst SetupSection = (props, context) => {\n const {translate} = context;\n\n const {title, display, contentTypes} = props;\n\n return (\n <div className={style.wrapper}>\n <div className={style.title}>{title}</div>\n <div className={style.settings}>\n <ContentTypesToggler contentTypes={contentTypes} />\n <div className={style.label}>{translate('Show')}</div>\n <InputSwitch {...display} />\n </div>\n </div>\n );\n};\n\nSetupSection.contextTypes = {\n translate: Provider.childContextTypes.translate,\n skin: Provider.childContextTypes.skin\n};\n\nSetupSection.propTypes = {\n title: PropTypes.string.isRequired,\n onUp: PropTypes.func,\n onDown: PropTypes.func,\n display: PropTypes.shape(InputSwitch.propTypes),\n contentTypes: ContentTypesToggler.propTypes.contentTypes\n};\n\nexport default SetupSection;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC9C,MAAM;IAACC;EAAD,IAASD,OAAf;EACA,MAAM;IAACE;EAAD,IAAiBH,KAAvB;;EAEA,IAAI,CAACG,YAAL,EAAmB;IACjB,OAAO,IAAP;EACD;;EAED,MAAMC,KAAK,GAAG,mBAAI,cAAJ,EAAoBF,IAApB,CAAd;EACA,MAAMG,MAAM,GAAG,mBAAI,eAAJ,EAAqBH,IAArB,CAAf;EACA,MAAMI,iBAAiB,GAAG,mBAAI,UAAJ,EAAgBH,YAAhB,IAAgCE,MAAhC,GAAyCD,KAAnE;EAEA,oBACE;IAAK,SAAS,EAAEG,cAAA,CAAMC;EAAtB,gBACE,6BAAC,mBAAD,eACML,YADN;IAEE,KAAK,EAAE;MAACM,KAAK,EAAEH;IAAR,CAFT;IAGE,KAAK,EAAEI,cAAA,CAAOC;EAHhB,GADF,CADF;AASD,CArBD;;AAsBAZ,mBAAmB,CAACa,YAApB,GAAmC;EACjCV,IAAI,EAAEW,iBAAA,CAASC,iBAAT,CAA2BZ;AADA,CAAnC;AAIAH,mBAAmB,CAACgB,SAApB,2CAAgC;EAC9BZ,YAAY,EAAEa,kBAAA,CAAUC,KAAV,cACTC,mBAAA,CAAWH,SADF;IAEZI,QAAQ,EAAEH,kBAAA,CAAUI;EAFR;AADgB,CAAhC;;AAOA,MAAMC,YAAY,GAAG,CAACrB,KAAD,EAAQC,OAAR,KAAoB;EACvC,MAAM;IAACqB;EAAD,IAAcrB,OAApB;EAEA,MAAM;IAACsB,KAAD;IAAQC,OAAR;IAAiBrB;EAAjB,IAAiCH,KAAvC;EAEA,oBACE;IAAK,SAAS,EAAEO,cAAA,CAAMkB;EAAtB,gBACE;IAAK,SAAS,EAAElB,cAAA,CAAMgB;EAAtB,GAA8BA,KAA9B,CADF,eAEE;IAAK,SAAS,EAAEhB,cAAA,CAAMmB;EAAtB,gBACE,6BAAC,mBAAD;IAAqB,YAAY,EAAEvB;EAAnC,EADF,eAEE;IAAK,SAAS,EAAEI,cAAA,CAAMoB;EAAtB,GAA8BL,SAAS,CAAC,MAAD,CAAvC,CAFF,eAGE,6BAAC,oBAAD,EAAiBE,OAAjB,CAHF,CAFF,CADF;AAUD,CAfD;;AAiBAH,YAAY,CAACT,YAAb,GAA4B;EAC1BU,SAAS,EAAET,iBAAA,CAASC,iBAAT,CAA2BQ,SADZ;EAE1BpB,IAAI,EAAEW,iBAAA,CAASC,iBAAT,CAA2BZ;AAFP,CAA5B;AAKAmB,YAAY,CAACN,SAAb,2CAAyB;EACvBQ,KAAK,EAAEP,kBAAA,CAAUY,MAAV,CAAiBC,UADD;EAEvBC,IAAI,EAAEd,kBAAA,CAAUe,IAFO;EAGvBC,MAAM,EAAEhB,kBAAA,CAAUe,IAHK;EAIvBP,OAAO,EAAER,kBAAA,CAAUC,KAAV,CAAgBgB,oBAAA,CAAYlB,SAA5B,CAJc;EAKvBZ,YAAY,EAAEJ,mBAAmB,CAACgB,SAApB,CAA8BZ;AALrB,CAAzB;eAQekB,Y"}
@@ -2,7 +2,7 @@
2
2
  @value mobile from breakpoints;
3
3
  @value colors: "../../variables/colors.css";
4
4
  @value xtraLightGrey from colors;
5
- @value brand from colors;
5
+ @value cm_primary_blue from colors;
6
6
  @value primaryAdd1 from colors;
7
7
 
8
8
  .wrapper {
@@ -20,7 +20,7 @@
20
20
  .title {
21
21
  font-family: 'Gilroy';
22
22
  font-size: 14px;
23
- color: brand;
23
+ color: cm_primary_blue;
24
24
  font-weight: 700;
25
25
  }
26
26
 
@@ -59,7 +59,7 @@ const SkillPickerModal = (props, context) => {
59
59
  };
60
60
  });
61
61
  }, [skills, selectedSkillList, skillsLocales]);
62
- const isError = (0, _react.useMemo)(() => selectedSkillList.length > maxSelectedSkills || selectedSkillList.length < minSelectedSkills, [selectedSkillList, maxSelectedSkills]);
62
+ const isError = (0, _react.useMemo)(() => selectedSkillList.length > maxSelectedSkills || selectedSkillList.length < minSelectedSkills, [selectedSkillList, maxSelectedSkills, minSelectedSkills]);
63
63
  const footer = (0, _react.useMemo)(() => {
64
64
  const footerDescription = selectedSkillList.length > maxSelectedSkills ? translate('skill_focus_footer_error_description', {
65
65
  skillNumber: selectedSkillList.length - maxSelectedSkills
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["SkillPickerModal","props","context","skills","selectedSkills","skillsLocales","isOpen","isLoading","maxSelectedSkills","minSelectedSkills","onCancel","onConfirm","onClose","translate","selectedSkillList","setSelectedSkillList","useState","handleCancel","useCallback","handleClose","skillList","useMemo","map","skill","skillTitle","skillRef","focus","includes","isError","length","footer","footerDescription","skillNumber","text","cancelButton","label","disabled","confirmButton","iconName","name","backgroundColor","style","skillPickerContainer","loaderContainer","loader","marginBottom","display","gap","flexWrap","index","handleChipClick","newSelectedSkillList","filter","selectedSkill","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","string","objectOf","bool","number","func"],"sources":["../../../src/molecule/skill-picker-modal/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport filter from 'lodash/fp/filter';\nimport BaseModal from '../base-modal';\nimport Chip from '../../atom/chip';\nimport Loader from '../../atom/loader';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst SkillPickerModal = (props, context) => {\n const {\n skills,\n selectedSkills,\n skillsLocales,\n isOpen,\n isLoading,\n maxSelectedSkills = 6,\n minSelectedSkills = 3,\n onCancel,\n onConfirm,\n onClose\n } = props;\n const {translate} = context;\n\n const [selectedSkillList, setSelectedSkillList] = useState(selectedSkills);\n\n const handleCancel = useCallback(() => {\n setSelectedSkillList(selectedSkills);\n onCancel();\n }, [setSelectedSkillList, selectedSkills, onCancel]);\n\n const handleClose = useCallback(() => {\n setSelectedSkillList(selectedSkills);\n onClose();\n }, [setSelectedSkillList, selectedSkills, onClose]);\n\n const skillList = useMemo(() => {\n return skills.map(skill => {\n return {\n skillTitle: skillsLocales[skill],\n skillRef: skill,\n focus: selectedSkillList.includes(skill)\n };\n });\n }, [skills, selectedSkillList, skillsLocales]);\n\n const isError = useMemo(\n () =>\n selectedSkillList.length > maxSelectedSkills || selectedSkillList.length < minSelectedSkills,\n [selectedSkillList, maxSelectedSkills]\n );\n\n const footer = useMemo(() => {\n const footerDescription =\n selectedSkillList.length > maxSelectedSkills\n ? translate('skill_focus_footer_error_description', {\n skillNumber: selectedSkillList.length - maxSelectedSkills\n })\n : translate('skill_focus_footer_description', {\n skillNumber: minSelectedSkills - selectedSkillList.length\n });\n return {\n text: isLoading || !isError ? '' : footerDescription,\n isError,\n cancelButton: {\n onCancel: handleCancel,\n label: translate('cancel'),\n disabled: isLoading || isError\n },\n confirmButton: {\n onConfirm: () => onConfirm(selectedSkillList),\n label: translate('confirm'),\n iconName: 'circle-check',\n disabled: isLoading || isError\n }\n };\n }, [\n isError,\n handleCancel,\n onConfirm,\n translate,\n selectedSkillList,\n isLoading,\n maxSelectedSkills,\n minSelectedSkills\n ]);\n\n if ((!isLoading && !skills) || !isOpen) return null;\n\n return (\n <BaseModal\n title={translate('skill_focus')}\n description={translate('skill_focus_description')}\n isOpen={isOpen}\n onClose={handleClose}\n footer={footer}\n headerIcon={{\n name: 'bullseye-arrow',\n backgroundColor: '#DDD1FF'\n }}\n >\n <div className={style.skillPickerContainer}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <>\n <div style={{marginBottom: '16px'}}>\n {`${selectedSkillList.length} ${translate('selected')}`}\n </div>\n <div style={{display: 'flex', gap: '16px', flexWrap: 'wrap'}}>\n {skillList.map((skill, index) => {\n const {skillTitle, skillRef, focus} = skill;\n function handleChipClick() {\n const newSelectedSkillList = focus\n ? filter(selectedSkill => selectedSkill !== skillRef, selectedSkillList)\n : [...selectedSkillList, skill.skillRef];\n setSelectedSkillList(newSelectedSkillList);\n }\n\n return (\n <Chip\n text={skillTitle}\n selected={focus}\n onClick={handleChipClick}\n key={index}\n backgroundColor=\"skin\"\n />\n );\n })}\n </div>\n </>\n )}\n </div>\n </BaseModal>\n );\n};\n\nSkillPickerModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nSkillPickerModal.propTypes = {\n skills: PropTypes.arrayOf(PropTypes.string),\n selectedSkills: PropTypes.arrayOf(PropTypes.string),\n skillsLocales: PropTypes.objectOf(PropTypes.string),\n isOpen: PropTypes.bool,\n isLoading: PropTypes.bool,\n minSelectedSkills: PropTypes.number,\n maxSelectedSkills: PropTypes.number,\n onCancel: PropTypes.func,\n onConfirm: PropTypes.func,\n onClose: PropTypes.func\n};\n\nexport default SkillPickerModal;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJC,MADI;IAEJC,cAFI;IAGJC,aAHI;IAIJC,MAJI;IAKJC,SALI;IAMJC,iBAAiB,GAAG,CANhB;IAOJC,iBAAiB,GAAG,CAPhB;IAQJC,QARI;IASJC,SATI;IAUJC;EAVI,IAWFX,KAXJ;EAYA,MAAM;IAACY;EAAD,IAAcX,OAApB;EAEA,MAAM,CAACY,iBAAD,EAAoBC,oBAApB,IAA4C,IAAAC,eAAA,EAASZ,cAAT,CAAlD;EAEA,MAAMa,YAAY,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACrCH,oBAAoB,CAACX,cAAD,CAApB;IACAM,QAAQ;EACT,CAHoB,EAGlB,CAACK,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;EAS3BrD,SAAS,EAAE+C,kBAAA,CAAUM,IATM;EAU3BpD,OAAO,EAAE8C,kBAAA,CAAUM;AAVQ,CAA7B;eAaehE,gB"}
1
+ {"version":3,"file":"index.js","names":["SkillPickerModal","props","context","skills","selectedSkills","skillsLocales","isOpen","isLoading","maxSelectedSkills","minSelectedSkills","onCancel","onConfirm","onClose","translate","selectedSkillList","setSelectedSkillList","useState","handleCancel","useCallback","handleClose","skillList","useMemo","map","skill","skillTitle","skillRef","focus","includes","isError","length","footer","footerDescription","skillNumber","text","cancelButton","label","disabled","confirmButton","iconName","name","backgroundColor","style","skillPickerContainer","loaderContainer","loader","marginBottom","display","gap","flexWrap","index","handleChipClick","newSelectedSkillList","filter","selectedSkill","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","string","objectOf","bool","number","func"],"sources":["../../../src/molecule/skill-picker-modal/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport filter from 'lodash/fp/filter';\nimport BaseModal from '../base-modal';\nimport Chip from '../../atom/chip';\nimport Loader from '../../atom/loader';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst SkillPickerModal = (props, context) => {\n const {\n skills,\n selectedSkills,\n skillsLocales,\n isOpen,\n isLoading,\n maxSelectedSkills = 6,\n minSelectedSkills = 3,\n onCancel,\n onConfirm,\n onClose\n } = props;\n const {translate} = context;\n\n const [selectedSkillList, setSelectedSkillList] = useState(selectedSkills);\n\n const handleCancel = useCallback(() => {\n setSelectedSkillList(selectedSkills);\n onCancel();\n }, [setSelectedSkillList, selectedSkills, onCancel]);\n\n const handleClose = useCallback(() => {\n setSelectedSkillList(selectedSkills);\n onClose();\n }, [setSelectedSkillList, selectedSkills, onClose]);\n\n const skillList = useMemo(() => {\n return skills.map(skill => {\n return {\n skillTitle: skillsLocales[skill],\n skillRef: skill,\n focus: selectedSkillList.includes(skill)\n };\n });\n }, [skills, selectedSkillList, skillsLocales]);\n\n const isError = useMemo(\n () =>\n selectedSkillList.length > maxSelectedSkills || selectedSkillList.length < minSelectedSkills,\n [selectedSkillList, maxSelectedSkills, minSelectedSkills]\n );\n\n const footer = useMemo(() => {\n const footerDescription =\n selectedSkillList.length > maxSelectedSkills\n ? translate('skill_focus_footer_error_description', {\n skillNumber: selectedSkillList.length - maxSelectedSkills\n })\n : translate('skill_focus_footer_description', {\n skillNumber: minSelectedSkills - selectedSkillList.length\n });\n return {\n text: isLoading || !isError ? '' : footerDescription,\n isError,\n cancelButton: {\n onCancel: handleCancel,\n label: translate('cancel'),\n disabled: isLoading || isError\n },\n confirmButton: {\n onConfirm: () => onConfirm(selectedSkillList),\n label: translate('confirm'),\n iconName: 'circle-check',\n disabled: isLoading || isError\n }\n };\n }, [\n isError,\n handleCancel,\n onConfirm,\n translate,\n selectedSkillList,\n isLoading,\n maxSelectedSkills,\n minSelectedSkills\n ]);\n\n if ((!isLoading && !skills) || !isOpen) return null;\n\n return (\n <BaseModal\n title={translate('skill_focus')}\n description={translate('skill_focus_description')}\n isOpen={isOpen}\n onClose={handleClose}\n footer={footer}\n headerIcon={{\n name: 'bullseye-arrow',\n backgroundColor: '#DDD1FF'\n }}\n >\n <div className={style.skillPickerContainer}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n <>\n <div style={{marginBottom: '16px'}}>\n {`${selectedSkillList.length} ${translate('selected')}`}\n </div>\n <div style={{display: 'flex', gap: '16px', flexWrap: 'wrap'}}>\n {skillList.map((skill, index) => {\n const {skillTitle, skillRef, focus} = skill;\n function handleChipClick() {\n const newSelectedSkillList = focus\n ? filter(selectedSkill => selectedSkill !== skillRef, selectedSkillList)\n : [...selectedSkillList, skill.skillRef];\n setSelectedSkillList(newSelectedSkillList);\n }\n\n return (\n <Chip\n text={skillTitle}\n selected={focus}\n onClick={handleChipClick}\n key={index}\n backgroundColor=\"skin\"\n />\n );\n })}\n </div>\n </>\n )}\n </div>\n </BaseModal>\n );\n};\n\nSkillPickerModal.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nSkillPickerModal.propTypes = {\n skills: PropTypes.arrayOf(PropTypes.string),\n selectedSkills: PropTypes.arrayOf(PropTypes.string),\n skillsLocales: PropTypes.objectOf(PropTypes.string),\n isOpen: PropTypes.bool,\n isLoading: PropTypes.bool,\n minSelectedSkills: PropTypes.number,\n maxSelectedSkills: PropTypes.number,\n onCancel: PropTypes.func,\n onConfirm: PropTypes.func,\n onClose: PropTypes.func\n};\n\nexport default SkillPickerModal;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJC,MADI;IAEJC,cAFI;IAGJC,aAHI;IAIJC,MAJI;IAKJC,SALI;IAMJC,iBAAiB,GAAG,CANhB;IAOJC,iBAAiB,GAAG,CAPhB;IAQJC,QARI;IASJC,SATI;IAUJC;EAVI,IAWFX,KAXJ;EAYA,MAAM;IAACY;EAAD,IAAcX,OAApB;EAEA,MAAM,CAACY,iBAAD,EAAoBC,oBAApB,IAA4C,IAAAC,eAAA,EAASZ,cAAT,CAAlD;EAEA,MAAMa,YAAY,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACrCH,oBAAoB,CAACX,cAAD,CAApB;IACAM,QAAQ;EACT,CAHoB,EAGlB,CAACK,oBAAD,EAAuBX,cAAvB,EAAuCM,QAAvC,CAHkB,CAArB;EAKA,MAAMS,WAAW,GAAG,IAAAD,kBAAA,EAAY,MAAM;IACpCH,oBAAoB,CAACX,cAAD,CAApB;IACAQ,OAAO;EACR,CAHmB,EAGjB,CAACG,oBAAD,EAAuBX,cAAvB,EAAuCQ,OAAvC,CAHiB,CAApB;EAKA,MAAMQ,SAAS,GAAG,IAAAC,cAAA,EAAQ,MAAM;IAC9B,OAAOlB,MAAM,CAACmB,GAAP,CAAWC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GAE9B,CAAC,GAAGA,iBAAJ,EAAuBS,KAAK,CAACE,QAA7B,CAFJ;MAGAV,oBAAoB,CAACoC,oBAAD,CAApB;IACD;;IAED,oBACE,6BAAC,aAAD;MACE,IAAI,EAAE3B,UADR;MAEE,QAAQ,EAAEE,KAFZ;MAGE,OAAO,EAAEwB,eAHX;MAIE,GAAG,EAAED,KAJP;MAKE,eAAe,EAAC;IALlB,EADF;EASD,CAlBA,CADH,CAJF,CANJ,CAXF,CADF;AAgDD,CAhID;;AAkIAjD,gBAAgB,CAACsD,YAAjB,GAAgC;EAC9BzC,SAAS,EAAE0C,iBAAA,CAASC,iBAAT,CAA2B3C;AADR,CAAhC;AAIAb,gBAAgB,CAACyD,SAAjB,2CAA6B;EAC3BtD,MAAM,EAAEuD,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,MAA5B,CADmB;EAE3BxD,cAAc,EAAEsD,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,MAA5B,CAFW;EAG3BvD,aAAa,EAAEqD,kBAAA,CAAUG,QAAV,CAAmBH,kBAAA,CAAUE,MAA7B,CAHY;EAI3BtD,MAAM,EAAEoD,kBAAA,CAAUI,IAJS;EAK3BvD,SAAS,EAAEmD,kBAAA,CAAUI,IALM;EAM3BrD,iBAAiB,EAAEiD,kBAAA,CAAUK,MANF;EAO3BvD,iBAAiB,EAAEkD,kBAAA,CAAUK,MAPF;EAQ3BrD,QAAQ,EAAEgD,kBAAA,CAAUM,IARO;EAS3BrD,SAAS,EAAE+C,kBAAA,CAAUM,IATM;EAU3BpD,OAAO,EAAE8C,kBAAA,CAAUM;AAVQ,CAA7B;eAaehE,gB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/brand-form/index.js"],"names":[],"mappings":";AAkEA,kEAgFC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/brand-form/index.js"],"names":[],"mappings":";AA8EA,kEAgFC"}