@coorpacademy/components 11.42.9 → 11.42.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/es/atom/input-checkbox/index.d.ts +1 -0
  2. package/es/atom/input-checkbox/index.d.ts.map +1 -1
  3. package/es/atom/input-checkbox/index.js +6 -4
  4. package/es/atom/input-checkbox/index.js.map +1 -1
  5. package/es/atom/input-checkbox/style.css +18 -0
  6. package/es/atom/radio-group/style.css +1 -0
  7. package/es/molecule/coorp-manager-roles/index.d.ts +1 -0
  8. package/es/molecule/setup-cohort-item/index.d.ts +2 -0
  9. package/es/molecule/skills-chart-side-information-panel/index.d.ts +3 -1
  10. package/es/molecule/skills-chart-side-information-panel/index.d.ts.map +1 -1
  11. package/es/molecule/skills-chart-side-information-panel/index.js +5 -2
  12. package/es/molecule/skills-chart-side-information-panel/index.js.map +1 -1
  13. package/es/molecule/skills-chart-side-information-panel/style.css +20 -1
  14. package/es/molecule/table/index.d.ts +33 -5
  15. package/es/molecule/table/index.d.ts.map +1 -1
  16. package/es/molecule/table/index.js +43 -2
  17. package/es/molecule/table/index.js.map +1 -1
  18. package/es/molecule/table/style.css +21 -2
  19. package/es/organism/assignment-audience/index.d.ts +23 -1
  20. package/es/organism/assignment-audience/index.d.ts.map +1 -1
  21. package/es/organism/assignment-audience/index.js +69 -3
  22. package/es/organism/assignment-audience/index.js.map +1 -1
  23. package/es/organism/assignment-audience/style.css +8 -0
  24. package/es/organism/assignment-audience/types.d.ts +36 -0
  25. package/es/organism/assignment-audience/types.d.ts.map +1 -1
  26. package/es/organism/assignment-audience/types.js +18 -0
  27. package/es/organism/assignment-audience/types.js.map +1 -1
  28. package/es/organism/assignment-edition/index.d.ts +18 -0
  29. package/es/organism/assignment-edition/index.d.ts.map +1 -1
  30. package/es/organism/assignment-edition/index.js +7 -2
  31. package/es/organism/assignment-edition/index.js.map +1 -1
  32. package/es/organism/assignment-edition/style.css +10 -1
  33. package/es/organism/assignment-edition/types.d.ts +18 -0
  34. package/es/organism/assignment-edition/types.d.ts.map +1 -1
  35. package/es/organism/brand-table/index.d.ts +6 -0
  36. package/es/organism/content-selection-list/index.d.ts.map +1 -1
  37. package/es/organism/content-selection-list/index.js +8 -3
  38. package/es/organism/content-selection-list/index.js.map +1 -1
  39. package/es/organism/header-with-actions/index.d.ts +0 -4
  40. package/es/organism/header-with-actions/index.d.ts.map +1 -1
  41. package/es/organism/header-with-actions/index.js +2 -9
  42. package/es/organism/header-with-actions/index.js.map +1 -1
  43. package/es/organism/header-with-actions/types.d.ts +0 -8
  44. package/es/organism/header-with-actions/types.d.ts.map +1 -1
  45. package/es/organism/header-with-actions/types.js +0 -2
  46. package/es/organism/header-with-actions/types.js.map +1 -1
  47. package/es/template/back-office/brand-update/index.d.ts +60 -4
  48. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  49. package/es/template/back-office/brand-update/index.js +12 -2
  50. package/es/template/back-office/brand-update/index.js.map +1 -1
  51. package/es/template/back-office/brand-update/style.css +8 -0
  52. package/lib/atom/input-checkbox/index.d.ts +1 -0
  53. package/lib/atom/input-checkbox/index.d.ts.map +1 -1
  54. package/lib/atom/input-checkbox/index.js +6 -4
  55. package/lib/atom/input-checkbox/index.js.map +1 -1
  56. package/lib/atom/input-checkbox/style.css +18 -0
  57. package/lib/atom/radio-group/style.css +1 -0
  58. package/lib/molecule/coorp-manager-roles/index.d.ts +1 -0
  59. package/lib/molecule/setup-cohort-item/index.d.ts +2 -0
  60. package/lib/molecule/skills-chart-side-information-panel/index.d.ts +3 -1
  61. package/lib/molecule/skills-chart-side-information-panel/index.d.ts.map +1 -1
  62. package/lib/molecule/skills-chart-side-information-panel/index.js +5 -2
  63. package/lib/molecule/skills-chart-side-information-panel/index.js.map +1 -1
  64. package/lib/molecule/skills-chart-side-information-panel/style.css +20 -1
  65. package/lib/molecule/table/index.d.ts +33 -5
  66. package/lib/molecule/table/index.d.ts.map +1 -1
  67. package/lib/molecule/table/index.js +44 -3
  68. package/lib/molecule/table/index.js.map +1 -1
  69. package/lib/molecule/table/style.css +21 -2
  70. package/lib/organism/assignment-audience/index.d.ts +23 -1
  71. package/lib/organism/assignment-audience/index.d.ts.map +1 -1
  72. package/lib/organism/assignment-audience/index.js +69 -3
  73. package/lib/organism/assignment-audience/index.js.map +1 -1
  74. package/lib/organism/assignment-audience/style.css +8 -0
  75. package/lib/organism/assignment-audience/types.d.ts +36 -0
  76. package/lib/organism/assignment-audience/types.d.ts.map +1 -1
  77. package/lib/organism/assignment-audience/types.js +18 -0
  78. package/lib/organism/assignment-audience/types.js.map +1 -1
  79. package/lib/organism/assignment-edition/index.d.ts +18 -0
  80. package/lib/organism/assignment-edition/index.d.ts.map +1 -1
  81. package/lib/organism/assignment-edition/index.js +7 -2
  82. package/lib/organism/assignment-edition/index.js.map +1 -1
  83. package/lib/organism/assignment-edition/style.css +10 -1
  84. package/lib/organism/assignment-edition/types.d.ts +18 -0
  85. package/lib/organism/assignment-edition/types.d.ts.map +1 -1
  86. package/lib/organism/brand-table/index.d.ts +6 -0
  87. package/lib/organism/content-selection-list/index.d.ts.map +1 -1
  88. package/lib/organism/content-selection-list/index.js +8 -3
  89. package/lib/organism/content-selection-list/index.js.map +1 -1
  90. package/lib/organism/header-with-actions/index.d.ts +0 -4
  91. package/lib/organism/header-with-actions/index.d.ts.map +1 -1
  92. package/lib/organism/header-with-actions/index.js +2 -9
  93. package/lib/organism/header-with-actions/index.js.map +1 -1
  94. package/lib/organism/header-with-actions/types.d.ts +0 -8
  95. package/lib/organism/header-with-actions/types.d.ts.map +1 -1
  96. package/lib/organism/header-with-actions/types.js +0 -2
  97. package/lib/organism/header-with-actions/types.js.map +1 -1
  98. package/lib/template/back-office/brand-update/index.d.ts +60 -4
  99. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  100. package/lib/template/back-office/brand-update/index.js +12 -2
  101. package/lib/template/back-office/brand-update/index.js.map +1 -1
  102. package/lib/template/back-office/brand-update/style.css +8 -0
  103. package/locales/bs/global.json +1 -0
  104. package/locales/cs/global.json +1 -0
  105. package/locales/de/global.json +1 -0
  106. package/locales/en/global.json +1 -0
  107. package/locales/es/global.json +1 -0
  108. package/locales/et/global.json +1 -0
  109. package/locales/fi/global.json +1 -0
  110. package/locales/fr/global.json +1 -0
  111. package/locales/hr/global.json +1 -0
  112. package/locales/hu/global.json +1 -0
  113. package/locales/hy/global.json +1 -0
  114. package/locales/it/global.json +1 -0
  115. package/locales/ja/global.json +1 -0
  116. package/locales/ko/global.json +1 -0
  117. package/locales/lt/global.json +1 -0
  118. package/locales/nl/global.json +1 -0
  119. package/locales/pl/global.json +1 -0
  120. package/locales/pt/global.json +1 -0
  121. package/locales/ro/global.json +1 -0
  122. package/locales/ru/global.json +1 -0
  123. package/locales/sk/global.json +1 -0
  124. package/locales/sl/global.json +1 -0
  125. package/locales/sv/global.json +1 -0
  126. package/locales/tl/global.json +1 -0
  127. package/locales/tr/global.json +1 -0
  128. package/locales/uk/global.json +1 -0
  129. package/locales/vi/global.json +1 -0
  130. package/locales/zh/global.json +1 -0
  131. package/locales/zh_TW/global.json +1 -0
  132. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useEffect","useMemo","useRef","uniqueId","BrandFormGroup","AssignmentAudience","ContentSelectionList","Title","RadioWithTitle","InputSwitch","Loader","propTypes","style","AssignmentEdition","information","audience","contents","dates","busy","isFetching","focusSection","root","radioName","section","current","querySelector","findHeader","ancestor","parentElement","header","bottom","getBoundingClientRect","scrollMarginTop","scrollIntoView","block","createElement","className","loaderContainer","loader","theme","ref","container","id","card","title","subtitle","error","fields","field","type","maxLength","disabled","_extends","undefined","role","fieldError","content","map","rule","hint","options","option","index","key","subtitleSize","name","checked","Boolean","reminders","switches","reminder","process","env","NODE_ENV"],"sources":["../../../src/organism/assignment-edition/index.tsx"],"sourcesContent":["import React, {useEffect, useMemo, useRef} from 'react';\nimport uniqueId from 'lodash/fp/uniqueId';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport AssignmentAudience from '../assignment-audience';\nimport ContentSelectionList from '../content-selection-list';\nimport Title from '../../atom/title';\nimport RadioWithTitle from '../../atom/radio-with-title';\nimport InputSwitch from '../../atom/input-switch';\nimport Loader from '../../atom/loader';\nimport {AssignmentEditionProps, propTypes} from './types';\nimport style from './style.css';\n\nexport type {AssignmentEditionProps, AssignmentEditionPropsFixture} from './types';\n\nconst AssignmentEdition = ({\n information,\n audience,\n contents,\n dates,\n busy = false,\n isFetching = false,\n focusSection\n}: AssignmentEditionProps) => {\n const root = useRef<HTMLDivElement>(null);\n const radioName = useMemo(() => uniqueId('assignment-rule-'), []);\n\n useEffect(() => {\n if (!focusSection || isFetching) return;\n const section = root.current?.querySelector<HTMLElement>(`#assignment-${focusSection}`);\n if (!section) return;\n const findHeader = (ancestor: HTMLElement | null): HTMLElement | null => {\n if (!ancestor) return null;\n return (\n ancestor.querySelector<HTMLElement>('[data-name=\"header-with-actions-wrapper\"]') ||\n findHeader(ancestor.parentElement)\n );\n };\n const header = findHeader(root.current?.parentElement || null);\n const bottom = header?.parentElement?.getBoundingClientRect().bottom || 0;\n section.style.scrollMarginTop = `${bottom + 16}px`;\n section.scrollIntoView?.({block: 'start'});\n }, [focusSection, isFetching]);\n\n if (isFetching) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n return (\n <div ref={root} className={style.container}>\n <section\n id=\"assignment-information\"\n data-name=\"assignment-information\"\n className={style.card}\n >\n <BrandFormGroup\n title={information.title}\n subtitle={information.subtitle}\n error={information.error}\n fields={[\n {\n ...information.field,\n type: 'text',\n maxLength: 100,\n theme: 'coorpmanager',\n disabled: busy || information.field.disabled\n }\n ]}\n />\n </section>\n <section id=\"assignment-audience\" data-name=\"assignment-audience\" className={style.card}>\n <AssignmentAudience {...audience} disabled={busy || audience.disabled} />\n </section>\n <section id=\"assignment-contents\" data-name=\"assignment-contents\" className={style.card}>\n <ContentSelectionList\n {...contents}\n error={undefined}\n disabled={busy || contents.disabled}\n />\n {contents.error ? (\n <p role=\"alert\" className={style.fieldError}>\n {contents.error}\n </p>\n ) : null}\n </section>\n <section id=\"assignment-dates\" data-name=\"assignment-dates\" className={style.card}>\n <div className={style.content}>\n <BrandFormGroup\n title={dates.title}\n error={dates.error}\n fields={dates.fields.map(field => ({\n ...field,\n type: 'date',\n theme: 'coorpmanager',\n disabled: busy || field.disabled\n }))}\n />\n <Title type=\"form-group\" title={dates.rule.title} />\n {dates.rule.hint ? <div>{dates.rule.hint}</div> : null}\n {dates.rule.options.map((option, index) => (\n <RadioWithTitle\n {...option}\n key={option['data-name'] || option.title.title}\n title={{\n ...option.title,\n subtitle: option.title.subtitle || '',\n type: 'form-group',\n subtitleSize: 'extra-small',\n 'data-name': `assignment-rule-title-${index}`\n }}\n name={option.name || radioName}\n checked={Boolean(option.checked)}\n disabled={busy || dates.rule.disabled || option.disabled}\n aria-label={option['aria-label'] || option.title.title}\n />\n ))}\n {dates.rule.error ? (\n <p role=\"alert\" className={style.fieldError}>\n {dates.rule.error}\n </p>\n ) : null}\n <div>{dates.reminders.hint}</div>\n {dates.reminders.switches.map((reminder, index) => (\n <InputSwitch\n {...reminder}\n key={reminder.name || reminder['data-name'] || reminder.title || index}\n theme=\"coorpmanager\"\n disabled={busy || reminder.disabled}\n />\n ))}\n </div>\n </section>\n </div>\n );\n};\n\nAssignmentEdition.propTypes = propTypes;\nexport default AssignmentEdition;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAO,OAAO;AACvD,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,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AAQ,CAACnB;EAAS,EACrC,CACF,CACE,CACE,CACN,CAAC;AAEV,CAAC;AAEDtC,iBAAiB,CAACF,SAAS,GAAA4D,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG9D,SAAS;AACvC,eAAeE,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useEffect","useMemo","useRef","uniqueId","BrandFormGroup","AssignmentAudience","ContentSelectionList","Title","RadioWithTitle","InputSwitch","Loader","propTypes","style","AssignmentEdition","information","audience","contents","dates","busy","isFetching","focusSection","root","radioName","section","current","querySelector","findHeader","ancestor","parentElement","header","bottom","getBoundingClientRect","scrollMarginTop","scrollIntoView","block","createElement","className","loaderContainer","loader","theme","ref","container","id","card","title","subtitle","error","fields","field","type","maxLength","disabled","_extends","undefined","role","fieldError","content","map","rule","hint","options","option","index","key","subtitleSize","name","checked","Boolean","reminders","switches","reminder","titlePosition","process","env","NODE_ENV"],"sources":["../../../src/organism/assignment-edition/index.tsx"],"sourcesContent":["import React, {useEffect, useMemo, useRef} from 'react';\nimport uniqueId from 'lodash/fp/uniqueId';\nimport BrandFormGroup from '../../molecule/brand-form-group';\nimport AssignmentAudience from '../assignment-audience';\nimport ContentSelectionList from '../content-selection-list';\nimport Title from '../../atom/title';\nimport RadioWithTitle from '../../atom/radio-with-title';\nimport InputSwitch from '../../atom/input-switch';\nimport Loader from '../../atom/loader';\nimport {AssignmentEditionProps, propTypes} from './types';\nimport style from './style.css';\n\nexport type {AssignmentEditionProps, AssignmentEditionPropsFixture} from './types';\n\nconst AssignmentEdition = ({\n information,\n audience,\n contents,\n dates,\n busy = false,\n isFetching = false,\n focusSection\n}: AssignmentEditionProps) => {\n const root = useRef<HTMLDivElement>(null);\n const radioName = useMemo(() => uniqueId('assignment-rule-'), []);\n\n useEffect(() => {\n if (!focusSection || isFetching) return;\n const section = root.current?.querySelector<HTMLElement>(`#assignment-${focusSection}`);\n if (!section) return;\n const findHeader = (ancestor: HTMLElement | null): HTMLElement | null => {\n if (!ancestor) return null;\n return (\n ancestor.querySelector<HTMLElement>('[data-name=\"header-with-actions-wrapper\"]') ||\n findHeader(ancestor.parentElement)\n );\n };\n const header = findHeader(root.current?.parentElement || null);\n const bottom = header?.parentElement?.getBoundingClientRect().bottom || 0;\n section.style.scrollMarginTop = `${bottom + 16}px`;\n section.scrollIntoView?.({block: 'start'});\n }, [focusSection, isFetching]);\n\n if (isFetching) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n return (\n <div ref={root} className={style.container}>\n <section\n id=\"assignment-information\"\n data-name=\"assignment-information\"\n className={style.card}\n >\n <BrandFormGroup\n title={information.title}\n subtitle={information.subtitle}\n error={information.error}\n fields={[\n {\n ...information.field,\n type: 'text',\n maxLength: 100,\n theme: 'coorpmanager',\n disabled: busy || information.field.disabled\n }\n ]}\n />\n </section>\n <section id=\"assignment-audience\" data-name=\"assignment-audience\" className={style.card}>\n <AssignmentAudience {...audience} disabled={busy || audience.disabled} />\n </section>\n <section id=\"assignment-contents\" data-name=\"assignment-contents\" className={style.card}>\n <ContentSelectionList\n {...contents}\n error={undefined}\n disabled={busy || contents.disabled}\n />\n {contents.error ? (\n <p role=\"alert\" className={style.fieldError}>\n {contents.error}\n </p>\n ) : null}\n </section>\n <section id=\"assignment-dates\" data-name=\"assignment-dates\" className={style.card}>\n <div className={style.content}>\n <BrandFormGroup\n title={dates.title}\n error={dates.error}\n fields={dates.fields.map(field => ({\n ...field,\n type: 'date',\n theme: 'coorpmanager',\n disabled: busy || field.disabled\n }))}\n />\n <Title type=\"form-group\" title={dates.rule.title} />\n {dates.rule.hint ? <p className={style.hint}>{dates.rule.hint}</p> : null}\n {dates.rule.options.map((option, index) => (\n <RadioWithTitle\n {...option}\n key={option['data-name'] || option.title.title}\n title={{\n ...option.title,\n subtitle: option.title.subtitle || '',\n type: 'form-group',\n subtitleSize: 'extra-small',\n 'data-name': `assignment-rule-title-${index}`\n }}\n name={option.name || radioName}\n checked={Boolean(option.checked)}\n disabled={busy || dates.rule.disabled || option.disabled}\n aria-label={option['aria-label'] || option.title.title}\n />\n ))}\n {dates.rule.error ? (\n <p role=\"alert\" className={style.fieldError}>\n {dates.rule.error}\n </p>\n ) : null}\n <p className={style.hint}>{dates.reminders.hint}</p>\n {dates.reminders.switches.map((reminder, index) => (\n <InputSwitch\n {...reminder}\n key={reminder.name || reminder['data-name'] || reminder.title || index}\n titlePosition=\"right\"\n theme=\"coorpmanager\"\n disabled={busy || reminder.disabled}\n />\n ))}\n </div>\n </section>\n </div>\n );\n};\n\nAssignmentEdition.propTypes = propTypes;\nexport default AssignmentEdition;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAO,OAAO;AACvD,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,OAAOC,cAAc,MAAM,iCAAiC;AAC5D,OAAOC,kBAAkB,MAAM,wBAAwB;AACvD,OAAOC,oBAAoB,MAAM,2BAA2B;AAC5D,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAgCC,SAAS,QAAO,SAAS;AACzD,OAAOC,KAAK,MAAM,aAAa;AAI/B,MAAMC,iBAAiB,GAAGA,CAAC;EACzBC,WAAW;EACXC,QAAQ;EACRC,QAAQ;EACRC,KAAK;EACLC,IAAI,GAAG,KAAK;EACZC,UAAU,GAAG,KAAK;EAClBC;AACsB,CAAC,KAAK;EAC5B,MAAMC,IAAI,GAAGnB,MAAM,CAAiB,IAAI,CAAC;EACzC,MAAMoB,SAAS,GAAGrB,OAAO,CAAC,MAAME,QAAQ,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;EAEjEH,SAAS,CAAC,MAAM;IACd,IAAI,CAACoB,YAAY,IAAID,UAAU,EAAE;IACjC,MAAMI,OAAO,G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AID,KAAK,CAACyC,IAAI,CAACP,QAAQ,IAAIU,MAAM,CAACV,QAAS;IACzD,cAAYU,MAAM,CAAC,YAAY,CAAC,IAAIA,MAAM,CAACjB,KAAK,CAACA;EAAM,EACxD,CACF,CAAC,EACD3B,KAAK,CAACyC,IAAI,CAACZ,KAAK,gBACf/C,KAAA,CAAAoC,aAAA;IAAGmB,IAAI,EAAC,OAAO;IAAClB,SAAS,EAAExB,KAAK,CAAC2C;EAAW,GACzCtC,KAAK,CAACyC,IAAI,CAACZ,KACX,CAAC,GACF,IAAI,eACR/C,KAAA,CAAAoC,aAAA;IAAGC,SAAS,EAAExB,KAAK,CAAC+C;EAAK,GAAE1C,KAAK,CAACmD,SAAS,CAACT,IAAQ,CAAC,EACnD1C,KAAK,CAACmD,SAAS,CAACC,QAAQ,CAACZ,GAAG,CAAC,CAACa,QAAQ,EAAER,KAAK,kBAC5C/D,KAAA,CAAAoC,aAAA,CAAC1B,WAAW,EAAA2C,QAAA,KACNkB,QAAQ;IACZP,GAAG,EAAEO,QAAQ,CAACL,IAAI,IAAIK,QAAQ,CAAC,WAAW,CAAC,IAAIA,QAAQ,CAAC1B,KAAK,IAAIkB,KAAM;IACvES,aAAa,EAAC,OAAO;IACrBhC,KAAK,EAAC,cAAc;IACpBY,QAAQ,EAAEjC,IAAI,IAAIoD,QAAQ,CAACnB;EAAS,EACrC,CACF,CACE,CACE,CACN,CAAC;AAEV,CAAC;AAEDtC,iBAAiB,CAACF,SAAS,GAAA6D,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG/D,SAAS;AACvC,eAAeE,iBAAiB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  @value colors: "../../variables/colors.css";
2
- @value white, cm_grey_100 from colors;
2
+ @value white, cm_grey_100, cm_grey_500 from colors;
3
3
 
4
4
  .container {
5
5
  composes: container from '../skill-edition/style.css';
@@ -30,3 +30,12 @@
30
30
  composes: fieldError from '../assignment-audience/style.css';
31
31
  margin: 0;
32
32
  }
33
+
34
+ .hint {
35
+ margin: 0;
36
+ font-family: Gilroy;
37
+ font-size: 14px;
38
+ font-weight: 500;
39
+ line-height: 1.4;
40
+ color: cm_grey_500;
41
+ }
@@ -209,6 +209,24 @@ export declare const propTypes: {
209
209
  }>>;
210
210
  actionText: PropTypes.Requireable<string>;
211
211
  }>>[]>;
212
+ selection: PropTypes.Requireable<PropTypes.InferProps<{
213
+ selectedIds: PropTypes.Validator<string[]>;
214
+ onToggleRow: PropTypes.Validator<(...args: any[]) => any>;
215
+ onTogglePage: PropTypes.Validator<(...args: any[]) => any>;
216
+ summary: PropTypes.Requireable<string>;
217
+ bulkActions: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
218
+ label: PropTypes.Validator<string>;
219
+ variant: PropTypes.Validator<string>;
220
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
221
+ }>>[]>;
222
+ notice: PropTypes.Requireable<PropTypes.InferProps<{
223
+ message: PropTypes.Validator<string>;
224
+ action: PropTypes.Requireable<PropTypes.InferProps<{
225
+ label: PropTypes.Validator<string>;
226
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
227
+ }>>;
228
+ }>>;
229
+ }>>;
212
230
  footnote: PropTypes.Requireable<string>;
213
231
  emptyLabel: PropTypes.Validator<string>;
214
232
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-edition/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAA8B,mBAAmB,EAAC,MAAM,mCAAmC,CAAC;AACnG,OAAoC,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAC,gBAAgB,EAAgC,MAAM,iCAAiC,CAAC;AAEhG,aAAK,SAAS,GAAG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are namespace BrandTable {
39
39
  label: PropTypes.Validator<string>;
40
40
  }> | null | undefined)[]>;
41
41
  }> | null | undefined> | null | undefined)[]>;
42
+ select: PropTypes.Requireable<PropTypes.InferProps<{
43
+ checked: PropTypes.Validator<boolean>;
44
+ disabled: PropTypes.Requireable<boolean>;
45
+ ariaLabel: PropTypes.Validator<string>;
46
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
47
+ }>>;
42
48
  editHref: PropTypes.Requireable<string>;
43
49
  highlighted: PropTypes.Requireable<boolean>;
44
50
  }> | null | undefined)[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,gBAAgB,EAAqD,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,gBAAgB,WAAY;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;WAHQ,MAAM;qBACG,IAAI;;CAyBpB,CAAC;AAgEH,QAAA,MAAM,oBAAoB;wMAYvB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkElB,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/content-selection-list/index.tsx"],"names":[],"mappings":";AASA,OAAO,EAAC,gBAAgB,EAAqD,MAAM,SAAS,CAAC;AAE7F,eAAO,MAAM,gBAAgB,WAAY;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;WAHQ,MAAM;qBACG,IAAI;;CAyBpB,CAAC;AAmEH,QAAA,MAAM,oBAAoB;wMAYvB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsElB,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
@@ -56,11 +56,14 @@ const buildContentItem = (readOnly, hiddenLabel, disabled = false) => ({
56
56
  disabled: disabled || deleteButton?.disabled,
57
57
  'data-name': `button-${deleteButton?.label}`,
58
58
  type: 'primary',
59
+ // Grey like the bin icon: the primary type's white text vanished on the grey row.
59
60
  customStyle: {
60
61
  width: 'fit-content',
61
- backgroundColor: 'transparent'
62
+ backgroundColor: 'transparent',
63
+ color: COLORS.neutral_500
62
64
  },
63
65
  hoverBackgroundColor: COLORS.cm_grey_100,
66
+ hoverColor: COLORS.neutral_500,
64
67
  icon: {
65
68
  position: 'left',
66
69
  faIcon: {
@@ -121,6 +124,8 @@ const ContentSelectionList = ({
121
124
  ...button,
122
125
  disabled: disabled || button.disabled
123
126
  });
127
+ // Nothing to select or delete in an empty list: it shows its placeholder instead.
128
+ const empty = _isEmpty(items);
124
129
  const titleProps = {
125
130
  type: 'form-group',
126
131
  title,
@@ -146,7 +151,7 @@ const ContentSelectionList = ({
146
151
  theme: 'coorpmanager',
147
152
  disabled: disabled || search.disabled
148
153
  } : undefined,
149
- actionButtons: readOnly ? [] : _map(actionButton => ({
154
+ actionButtons: readOnly || empty ? [] : _map(actionButton => ({
150
155
  ...actionButton,
151
156
  disabled: disabled || actionButton.disabled,
152
157
  customStyle: {
@@ -155,7 +160,7 @@ const ContentSelectionList = ({
155
160
  width: 'auto'
156
161
  }
157
162
  }), actionButtons),
158
- checkboxWithTitle: readOnly ? undefined : {
163
+ checkboxWithTitle: readOnly || empty ? undefined : {
159
164
  ...checkboxWithTitleProps,
160
165
  disabled: disabled || checkboxWithTitleProps?.disabled,
161
166
  name: checkboxWithTitleProps?.title,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","classnames","ListItems","Title","Notification","COLORS","contentContainer","style","ContentSelectionListPropTypes","buildButtonProps","button","type","label","hoverBackgroundColor","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","buildContentItem","readOnly","hiddenLabel","disabled","ref","title","subtitle","image","tags","iconName","checkbox","deleteButton","hidden","hint","secondButtonLink","cm_grey_100","neutral_500","imageOverlay","undefined","contentBadge","category","details","id","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","titleProps","required","listProps","content","_isEmpty","_map","theme","actionButton","className","iconColor","createElement","role","message","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string, disabled = false) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton,\n hidden,\n hint\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n disabled: disabled || deleteButton?.disabled,\n 'data-name': `button-${deleteButton?.label}`,\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n imageOverlay: hidden ? 'hidden' : undefined,\n contentBadge: hidden ? {category: 'hidden', label: hiddenLabel} : undefined,\n details: hint,\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : {...checkbox, disabled: disabled || checkbox.disabled}\n };\n };\n\nconst ContentSelectionList = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n disabled = false,\n isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps({...button, disabled: disabled || button.disabled});\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly, hiddenLabel, disabled), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n disabled: disabled || search.disabled\n }\n : undefined,\n actionButtons: readOnly\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n disabled: disabled || actionButton.disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle: readOnly\n ? undefined\n : {\n ...checkboxWithTitleProps,\n disabled: disabled || checkboxWithTitleProps?.disabled,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n className: style.checkboxWithTitle,\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={classnames(contentContainer, style.list)}>\n <Title {...titleProps} />\n {error ? (\n <div role=\"alert\">\n <Notification type=\"error\" message={error} />\n </div>\n ) : null}\n <ListItems {...listProps} />\n </div>\n );\n};\n\nContentSelectionList.propTypes = ContentSelectionListPropTypes;\n\nexport default ContentSelectionList;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,gBAAgB,QAAO,yBAAyB;AACxD,OAAOC,KAAK,MAAM,aAAa;AAC/B,SAA+CC,6BAA6B,QAAO,SAAS;AAE5F,OAAO,MAAMC,gBAAgB,GAAIC,MAIhC,KAAM;EACL,GAAGA,MAAM;EACTC,IAAI,EAAE,SAAS;EACf,YAAY,EAAED,MAAM,CAACE,KAAK;EAC1B,WAAW,EAAE,UAAUF,MAAM,CAACE,KAAK,EAAE;EACrCC,oBAAoB,EAAER,MAAM,CAACS,WAAW;EACxCC,UAAU,EAAEV,MAAM,CAACW,eAAe;EAClCC,IAAI,EAAE;IACJC,QAAQ,EAAE,MAAM;IAChBC,MAAM,EAAE;MACNC,IAAI,EAAE,MAAM;MACZC,KAAK,EAAEhB,MAAM,CAACW,eAAe;MAC7BM,IAAI,EAAE,EAAE;MACRC,WAAW,EAAE;QAACC,OAAO,EAAE;MAAC;IAC1B;EACF,CAAC;EACDD,WAAW,EAAE;IACXE,KAAK,EAAE,aAAa;IACpBC,eAAe,EAAErB,MAAM,CAACsB,UAAU;IAClCN,KAAK,EAAE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M,CAAE,CACzC,CAAC,GACJ,IAAI,eACRhE,KAAA,CAAA4E,aAAA,CAAC1E,SAAS,EAAKkE,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDd,oBAAoB,CAACyB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG1E,6BAA6B;AAE9D,eAAe8C,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","classnames","ListItems","Title","Notification","COLORS","contentContainer","style","ContentSelectionListPropTypes","buildButtonProps","button","type","label","hoverBackgroundColor","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","buildContentItem","readOnly","hiddenLabel","disabled","ref","title","subtitle","image","tags","iconName","checkbox","deleteButton","hidden","hint","secondButtonLink","neutral_500","cm_grey_100","imageOverlay","undefined","contentBadge","category","details","id","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","empty","_isEmpty","titleProps","required","listProps","content","_map","theme","actionButton","className","iconColor","createElement","role","message","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string, disabled = false) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton,\n hidden,\n hint\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n disabled: disabled || deleteButton?.disabled,\n 'data-name': `button-${deleteButton?.label}`,\n type: 'primary',\n // Grey like the bin icon: the primary type's white text vanished on the grey row.\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent',\n color: COLORS.neutral_500\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n hoverColor: COLORS.neutral_500,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n imageOverlay: hidden ? 'hidden' : undefined,\n contentBadge: hidden ? {category: 'hidden', label: hiddenLabel} : undefined,\n details: hint,\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : {...checkbox, disabled: disabled || checkbox.disabled}\n };\n };\n\nconst ContentSelectionList = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n disabled = false,\n isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps({...button, disabled: disabled || button.disabled});\n // Nothing to select or delete in an empty list: it shows its placeholder instead.\n const empty = isEmpty(items);\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly, hiddenLabel, disabled), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n disabled: disabled || search.disabled\n }\n : undefined,\n actionButtons:\n readOnly || empty\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n disabled: disabled || actionButton.disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle:\n readOnly || empty\n ? undefined\n : {\n ...checkboxWithTitleProps,\n disabled: disabled || checkboxWithTitleProps?.disabled,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n className: style.checkboxWithTitle,\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={classnames(contentContainer, style.list)}>\n <Title {...titleProps} />\n {error ? (\n <div role=\"alert\">\n <Notification type=\"error\" message={error} />\n </div>\n ) : null}\n <ListItems {...listProps} />\n </div>\n );\n};\n\nContentSelectionList.propTypes = ContentSelectionListPropTypes;\n\nexport default ContentSelectionList;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,gBAAgB,QAAO,yBAAyB;AACxD,OAAOC,KAAK,MAAM,aAAa;AAC/B,SAA+CC,6BAA6B,QAAO,SAAS;AAE5F,OAAO,MAAMC,gBAAgB,GAAIC,MAIhC,KAAM;EACL,GAAGA,MAAM;EACTC,IAAI,EAAE,SAAS;EACf,YAAY,EAAED,MAAM,CAACE,KAAK;EAC1B,WAAW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KAAK;MACnC,YAAY,EAAE2B,sBAAsB,EAAE3B,KAAK;MAC3C,WAAW,EAAE2B,sBAAsB,EAAE3B,KAAK;MAC1CwC,SAAS,EAAEpE,KAAK,CAACsD,iBAAiB;MAClC5C,IAAI,EAAE;QAACsB,QAAQ,EAAE,OAAO;QAAEqC,SAAS,EAAE,OAAO;QAAEvB,MAAM,EAAE;MAAG;IAC3D,CAAC;IACPU;EACF,CAAC;EAED,oBACE/D,KAAA,CAAA6E,aAAA;IAAKF,SAAS,EAAE1E,UAAU,CAACK,gBAAgB,EAAEC,KAAK,CAACgD,IAAI;EAAE,gBACvDvD,KAAA,CAAA6E,aAAA,CAAC1E,KAAK,EAAKiE,UAAa,CAAC,EACxBJ,KAAK,gBACJhE,KAAA,CAAA6E,aAAA;IAAKC,IAAI,EAAC;EAAO,gBACf9E,KAAA,CAAA6E,aAAA,CAACzE,YAAY;IAACO,IAAI,EAAC,OAAO;IAACoE,OAAO,EAAEf;EAAM,CAAE,CACzC,CAAC,GACJ,IAAI,eACRhE,KAAA,CAAA6E,aAAA,CAAC3E,SAAS,EAAKoE,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDhB,oBAAoB,CAAC0B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG3E,6BAA6B;AAE9D,eAAe8C,oBAAoB","ignoreList":[]}
@@ -13,10 +13,6 @@ declare const HeaderWithActions: {
13
13
  label: import("prop-types").Validator<string>;
14
14
  }> | null | undefined)[]>;
15
15
  subtitle: import("prop-types").Requireable<string>;
16
- breadcrumbs: import("prop-types").Requireable<(import("prop-types").InferProps<{
17
- title: import("prop-types").Validator<string>;
18
- href: import("prop-types").Requireable<string>;
19
- }> | null | undefined)[]>;
20
16
  tag: import("prop-types").Requireable<import("prop-types").InferProps<{
21
17
  label: import("prop-types").Validator<string>;
22
18
  type: import("prop-types").Validator<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AASA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoFvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAQA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6EvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -6,7 +6,6 @@ import ButtonLink from '../../atom/button-link';
6
6
  import ButtonLinkIcon from '../../atom/button-link-icon';
7
7
  import Tag from '../../atom/tag';
8
8
  import AssignmentStatusTag from '../../molecule/assignment-status-tag';
9
- import Breadcrumbs from '../../molecule/breadcrumbs';
10
9
  import BulletPointMenuButton from '../../molecule/bullet-point-menu-button';
11
10
  import HeaderWithActionsPropTypes from './types';
12
11
  import style from './style.css';
@@ -90,15 +89,13 @@ const HeaderWithActions = props => {
90
89
  tag,
91
90
  tags,
92
91
  subtitle,
93
- breadcrumbs,
94
92
  saveStatus,
95
93
  bulletPointMenuButton,
96
94
  actionButtons,
97
95
  isFetching = false
98
96
  } = props;
99
97
  const hasSubtitle = Boolean(subtitle?.trim());
100
- const hasBreadcrumbs = !isEmpty(breadcrumbs);
101
- const hasAdditionalContent = tags !== undefined || hasSubtitle || hasBreadcrumbs;
98
+ const hasAdditionalContent = tags !== undefined || hasSubtitle;
102
99
  return !isFetching ? /*#__PURE__*/React.createElement("div", {
103
100
  className: style.headerWrapper,
104
101
  "data-name": getDataName('wrapper')
@@ -112,11 +109,7 @@ const HeaderWithActions = props => {
112
109
  className: style.button
113
110
  })), /*#__PURE__*/React.createElement("div", {
114
111
  className: hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper
115
- }, hasBreadcrumbs ? /*#__PURE__*/React.createElement("div", {
116
- "data-name": getDataName('breadcrumbs')
117
- }, /*#__PURE__*/React.createElement(Breadcrumbs, {
118
- breadcrumbs: breadcrumbs
119
- })) : null, /*#__PURE__*/React.createElement("div", {
112
+ }, /*#__PURE__*/React.createElement("div", {
120
113
  className: style.statusWrapper
121
114
  }, tags === undefined && tag ? /*#__PURE__*/React.createElement(Tag, tag) : null, saveStatus?.display && saveStatus.label ? /*#__PURE__*/React.createElement("p", {
122
115
  className: style.saveStatus
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","AssignmentStatusTag","Breadcrumbs","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","breadcrumbs","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasBreadcrumbs","hasAdditionalContent","undefined","createElement","className","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","_extends","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","buttonsWrapper","buttons","action","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport Breadcrumbs from '../../molecule/breadcrumbs';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n breadcrumbs,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasBreadcrumbs = !isEmpty(breadcrumbs);\n const hasAdditionalContent = tags !== undefined || hasSubtitle || hasBreadcrumbs;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n {hasBreadcrumbs ? (\n <div data-name={getDataName('breadcrumbs')}>\n <Breadcrumbs breadcrumbs={breadcrumbs} />\n </div>\n ) : null}\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p className={style.subtitle} data-name={getDataName('subtitle')}>\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;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con","Tag","AssignmentStatusTag","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","tags","subtitle","saveStatus","bulletPointMenuButton","actionButtons","isFetching","hasSubtitle","Boolean","trim","hasAdditionalContent","undefined","createElement","className","headerWrapper","extendedTitleAndButtonWrapper","titleAndButtonWrapper","_extends","button","extendedTitleWrapper","titleWrapper","statusWrapper","display","assignmentTitleRow","assignmentTitle","assignmentTags","assignmentTag","index","key","status","buttonsWrapper","buttons","action","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport AssignmentStatusTag from '../../molecule/assignment-status-tag';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {\n closeButton,\n title,\n tag,\n tags,\n subtitle,\n saveStatus,\n bulletPointMenuButton,\n actionButtons,\n isFetching = false\n } = props;\n const hasSubtitle = Boolean(subtitle?.trim());\n const hasAdditionalContent = tags !== undefined || hasSubtitle;\n\n return !isFetching ? (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={\n hasAdditionalContent ? style.extendedTitleAndButtonWrapper : style.titleAndButtonWrapper\n }\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={hasAdditionalContent ? style.extendedTitleWrapper : style.titleWrapper}>\n <div className={style.statusWrapper}>\n {tags === undefined && tag ? <Tag {...tag} /> : null}\n {saveStatus?.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n {tags !== undefined ? (\n <div className={style.assignmentTitleRow}>\n <h3 className={style.assignmentTitle} data-name={getDataName('title')}>\n {title}\n </h3>\n <div className={style.assignmentTags} data-name={getDataName('tags')}>\n {tags.map((assignmentTag, index) => (\n <AssignmentStatusTag\n {...assignmentTag}\n key={`${assignmentTag.status}-${assignmentTag.label}-${index}`}\n />\n ))}\n </div>\n </div>\n ) : (\n <h3 className={style.title} data-name={getDataName('title')}>\n {title}\n </h3>\n )}\n {hasSubtitle ? (\n <p className={style.subtitle} data-name={getDataName('subtitle')}>\n {subtitle}\n </p>\n ) : null}\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n ) : null;\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,mBAAmB,MAAM,sCAAsC;AACtE,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,0BAA0B,MAI1B,SAAS;AAChB,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,MAAc,IAAK,uBAAuBA,MAAM,EAAE;AACvE;AACA,MAAMC,WAAW,GAAGV,GAAG,CAACW,OAAO,CAAC;EAACC,GAAG,EAAE;AAAK,CAAC,CAAC;AAE7C,MAAMC,gBAAgB,GAAGA,CAAC;EAACC,OAAO;EAAEC;AAAmD,CAAC,KAAK;EAC3F,OAAO;IACLC,IAAI,EAAE,SAAS;IACfC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,cAAc;IAC3B,YAAY,EAAEF,SAAS;IACvBD;EACF,CAAC;AACH,CAAC;AAED,MAAMI,eAAe,GAAGA,CAAC;EAACC,QAAQ;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,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CAAC;EAChE,CAAC,EAAEvB,aAAa,CACb,CACF,CAAC,GACJ,IAAI;AACV,CAAC;AAEDT,iBAAiB,CAACqC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGrE,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
@@ -10,10 +10,6 @@ declare const HeaderWithActionsPropTypes: {
10
10
  label: PropTypes.Validator<string>;
11
11
  }> | null | undefined)[]>;
12
12
  subtitle: PropTypes.Requireable<string>;
13
- breadcrumbs: PropTypes.Requireable<(PropTypes.InferProps<{
14
- title: PropTypes.Validator<string>;
15
- href: PropTypes.Requireable<string>;
16
- }> | null | undefined)[]>;
17
13
  tag: PropTypes.Requireable<PropTypes.InferProps<{
18
14
  label: PropTypes.Validator<string>;
19
15
  type: PropTypes.Validator<string>;
@@ -86,10 +82,6 @@ export declare type HeaderWithActionsProps = {
86
82
  label: string;
87
83
  }>;
88
84
  subtitle?: string;
89
- breadcrumbs?: Array<{
90
- title: string;
91
- href?: string;
92
- }>;
93
85
  tag?: TagProps;
94
86
  saveStatus?: SaveStatusProps;
95
87
  actionButtons: ButtonActionProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AAqBnC,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyB/B,CAAC;AAEF,eAAe,0BAA0B,CAAC;AAE1C,aAAK,QAAQ,GAAG;IACd,KAAK,EAAE,WAAW,GAAG,iBAAiB,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9D,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE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AM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IACnC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,aAAa,EAAE,iBAAiB,EAAE,CAAC;IACnC,qBAAqB,CAAC,EAAE,0BAA0B,CAAC;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,oBAAY,6BAA6B,GAAG;IAAC,KAAK,EAAE,sBAAsB,CAAA;CAAC,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import AssignmentStatusTagPropTypes from '../../molecule/assignment-status-tag/types';
3
- import Breadcrumbs from '../../molecule/breadcrumbs';
4
3
  const ButtonMenuPropTypes = {
5
4
  dataName: PropTypes.string,
6
5
  label: PropTypes.string.isRequired,
@@ -24,7 +23,6 @@ const HeaderWithActionsPropTypes = {
24
23
  title: PropTypes.string.isRequired,
25
24
  tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),
26
25
  subtitle: PropTypes.string,
27
- breadcrumbs: Breadcrumbs.propTypes.breadcrumbs,
28
26
  tag: PropTypes.shape({
29
27
  label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,
30
28
  type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","AssignmentStatusTagPropTypes","Breadcrumbs","ButtonMenuPropTypes","dataName","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tags","arrayOf","subtitle","breadcrumbs","propTypes","tag","size","saveStatus","display","actionButtons","bulletPointMenuButton","buttons","buttonAriaLabel","isFetching"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport AssignmentStatusTagPropTypes from '../../molecule/assignment-status-tag/types';\nimport Breadcrumbs from '../../molecule/breadcrumbs';\n\nconst ButtonMenuPropTypes = {\n dataName: PropTypes.string,\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\n\nconst ButtonActionPropTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string\n};\n\nconst HeaderWithActionsPropTypes = {\n closeButton: PropTypes.shape({\n 'aria-label': PropTypes.string,\n onClick: PropTypes.func.isRequired\n }),\n title: PropTypes.string.isRequired,\n tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),\n subtitle: PropTypes.string,\n breadcrumbs: Breadcrumbs.propTypes.breadcrumbs,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }),\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }),\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,\n bulletPointMenuButton: PropTypes.shape({\n buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,\n buttonAriaLabel: PropTypes.string,\n disabled: PropTypes.bool.isRequired\n }),\n isFetching: PropTypes.bool\n};\n\nexport default HeaderWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type ButtonMenuProps = {\n dataName: string;\n label: string;\n iconName: string;\n iconColor: string;\n onClick: () => void;\n};\n\ntype BulletPointMenuButtonProps = {\n buttons: ButtonMenuProps[];\n buttonAriaLabel?: string;\n disabled: boolean;\n};\n\nexport type ButtonActionProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tags?: Array<{status?: string; label: string}>;\n subtitle?: string;\n breadcrumbs?: Array<{title: string; href?: string}>;\n tag?: TagProps;\n saveStatus?: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n isFetching?: boolean;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,4BAA4B,MAAM,4CAA4C;AACrF,OAAOC,WAAW,MAAM,4BAA4B;AAEpD,MAAMC,mBAAmB,GAAG;EAC1BC,QAAQ,EAAEJ,SAAS,CAACK,MAAM;EAC1BC,KAAK,EAAEN,SAAS,CAACK,MAAM,CAACE,UAAU;EAClCC,QAAQ,EAAER,SAAS,CAACK,MAAM,CAACE,UAAU;EACrCE,SAAS,EAAET,SAAS,CAACK,MAAM,CAACE,UAAU;EACtCG,OAAO,EAAEV,SAAS,CAACW,IAAI,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D,KAAK,EAAEN,SAAS,CAACc,KAAK,CAAC,CAAC,iBAAiB,EAAE,OAAO,CAAC;EACrD,CAAC,CAAC;EACFgB,aAAa,EAAE9B,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACmB,KAAK,CAACP,qBAAqB,CAAC,CAAC,CAACL,UAAU;EACnFwB,qBAAqB,EAAE/B,SAAS,CAACmB,KAAK,CAAC;IACrCa,OAAO,EAAEhC,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACmB,KAAK,CAAChB,mBAAmB,CAAC,CAAC,CAACI,UAAU;IAC3E0B,eAAe,EAAEjC,SAAS,CAACK,MAAM;IACjCU,QAAQ,EAAEf,SAAS,CAACgB,IAAI,CAACT;EAC3B,CAAC,CAAC;EACF2B,UAAU,EAAElC,SAAS,CAACgB;AACxB,CAAC;AAED,eAAeC,0BAA0B","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","AssignmentStatusTagPropTypes","ButtonMenuPropTypes","dataName","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tags","arrayOf","subtitle","tag","size","saveStatus","display","actionButtons","bulletPointMenuButton","buttons","buttonAriaLabel","isFetching"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport AssignmentStatusTagPropTypes from '../../molecule/assignment-status-tag/types';\n\nconst ButtonMenuPropTypes = {\n dataName: PropTypes.string,\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\n\nconst ButtonActionPropTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string\n};\n\nconst HeaderWithActionsPropTypes = {\n closeButton: PropTypes.shape({\n 'aria-label': PropTypes.string,\n onClick: PropTypes.func.isRequired\n }),\n title: PropTypes.string.isRequired,\n tags: PropTypes.arrayOf(PropTypes.shape(AssignmentStatusTagPropTypes)),\n subtitle: PropTypes.string,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }),\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }),\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,\n bulletPointMenuButton: PropTypes.shape({\n buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,\n buttonAriaLabel: PropTypes.string,\n disabled: PropTypes.bool.isRequired\n }),\n isFetching: PropTypes.bool\n};\n\nexport default HeaderWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type ButtonMenuProps = {\n dataName: string;\n label: string;\n iconName: string;\n iconColor: string;\n onClick: () => void;\n};\n\ntype BulletPointMenuButtonProps = {\n buttons: ButtonMenuProps[];\n buttonAriaLabel?: string;\n disabled: boolean;\n};\n\nexport type ButtonActionProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tags?: Array<{status?: string; label: string}>;\n subtitle?: string;\n tag?: TagProps;\n saveStatus?: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n isFetching?: boolean;\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iBAAiB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAACP,UAAU;IACxFM,IAAI,EAAEZ,SAAS,CAACa,KAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAACP,UAAU;IACpEkB,IAAI,EAAExB,SAAS,CAACI,MAAM,CAACE;EACzB,CAAC,CAAC;EACFmB,UAAU,EAAEzB,SAAS,CAACkB,KAAK,CAAC;IAC1BQ,OAAO,EAAE1B,SAAS,CAACe,IAAI,CAACT,UAAU;IAClCD,KAAK,EAAEL,SAAS,CAACa,KAAK,CAAC,CAAC,iBAAiB,EAAE,OAAO,CAAC;EACrD,CAAC,CAAC;EACFc,aAAa,EAAE3B,SAAS,CAACqB,OAAO,CAACrB,SAAS,CAACkB,KAAK,CAACP,qBAAqB,CAAC,CAAC,CAACL,UAAU;EACnFsB,qBAAqB,EAAE5B,SAAS,CAACkB,KAAK,CAAC;IACrCW,OAAO,EAAE7B,SAAS,CAACqB,OAAO,CAACrB,SAAS,CAACkB,KAAK,CAAChB,mBAAmB,CAAC,CAAC,CAACI,UAAU;IAC3EwB,eAAe,EAAE9B,SAAS,CAACI,MAAM;IACjCU,QAAQ,EAAEd,SAAS,CAACe,IAAI,CAACT;EAC3B,CAAC,CAAC;EACFyB,UAAU,EAAE/B,SAAS,CAACe;AACxB,CAAC;AAED,eAAeC,0BAA0B","ignoreList":[]}
@@ -5,6 +5,36 @@ declare namespace BrandUpdate {
5
5
  const notifications: never[];
6
6
  }
7
7
  namespace propTypes {
8
+ export const summary: PropTypes.Requireable<PropTypes.InferProps<{
9
+ bar: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
10
+ className: PropTypes.Requireable<string>;
11
+ value: (props: any, propName: any, ...args: any[]) => Error | null;
12
+ max: (props: any, propName: any, ...args: any[]) => Error | null;
13
+ desc: PropTypes.Requireable<string>;
14
+ steps: PropTypes.Requireable<number>;
15
+ style: PropTypes.Requireable<{
16
+ [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
17
+ }>;
18
+ displayInfo: PropTypes.Requireable<boolean>;
19
+ segments: PropTypes.Requireable<(PropTypes.InferProps<{
20
+ value: PropTypes.Validator<number>;
21
+ label: PropTypes.Validator<string>;
22
+ color: PropTypes.Validator<string>;
23
+ }> | null | undefined)[]>;
24
+ title: PropTypes.Requireable<string>;
25
+ subtitle: PropTypes.Requireable<string>;
26
+ ariaLabel: PropTypes.Requireable<string>;
27
+ }>>>;
28
+ tiles: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
29
+ theme: PropTypes.Requireable<string>;
30
+ sidePanelItems: PropTypes.Requireable<(PropTypes.InferProps<{
31
+ icon: PropTypes.Requireable<PropTypes.InferProps<PropTypes.ValidationMap<any>>>;
32
+ title: PropTypes.Requireable<string>;
33
+ value: PropTypes.Requireable<string>;
34
+ legend: PropTypes.Requireable<string>;
35
+ }> | null | undefined)[]>;
36
+ }>>>;
37
+ }>>;
8
38
  const notifications_1: PropTypes.Requireable<(PropTypes.InferProps<{
9
39
  bannerKey: PropTypes.Requireable<string>;
10
40
  type: PropTypes.Requireable<string>;
@@ -232,10 +262,6 @@ declare namespace BrandUpdate {
232
262
  label: PropTypes.Validator<string>;
233
263
  }> | null | undefined)[]>;
234
264
  subtitle: PropTypes.Requireable<string>;
235
- breadcrumbs: PropTypes.Requireable<(PropTypes.InferProps<{
236
- title: PropTypes.Validator<string>;
237
- href: PropTypes.Requireable<string>;
238
- }> | null | undefined)[]>;
239
265
  tag: PropTypes.Requireable<PropTypes.InferProps<{
240
266
  label: PropTypes.Validator<string>;
241
267
  type: PropTypes.Validator<string>;
@@ -355,6 +381,12 @@ declare namespace BrandUpdate {
355
381
  label: PropTypes.Validator<string>;
356
382
  }> | null | undefined)[]>;
357
383
  }> | null | undefined> | null | undefined)[]>;
384
+ select: PropTypes.Requireable<PropTypes.InferProps<{
385
+ checked: PropTypes.Validator<boolean>;
386
+ disabled: PropTypes.Requireable<boolean>;
387
+ ariaLabel: PropTypes.Validator<string>;
388
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
389
+ }>>;
358
390
  editHref: PropTypes.Requireable<string>;
359
391
  highlighted: PropTypes.Requireable<boolean>;
360
392
  }> | null | undefined)[]>;
@@ -2075,6 +2107,24 @@ declare namespace BrandUpdate {
2075
2107
  }>>;
2076
2108
  actionText: PropTypes.Requireable<string>;
2077
2109
  }>>[]>;
2110
+ selection: PropTypes.Requireable<PropTypes.InferProps<{
2111
+ selectedIds: PropTypes.Validator<string[]>;
2112
+ onToggleRow: PropTypes.Validator<(...args: any[]) => any>;
2113
+ onTogglePage: PropTypes.Validator<(...args: any[]) => any>;
2114
+ summary: PropTypes.Requireable<string>;
2115
+ bulkActions: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
2116
+ label: PropTypes.Validator<string>;
2117
+ variant: PropTypes.Validator<string>;
2118
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
2119
+ }>>[]>;
2120
+ notice: PropTypes.Requireable<PropTypes.InferProps<{
2121
+ message: PropTypes.Validator<string>;
2122
+ action: PropTypes.Requireable<PropTypes.InferProps<{
2123
+ label: PropTypes.Validator<string>;
2124
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
2125
+ }>>;
2126
+ }>>;
2127
+ }>>;
2078
2128
  footnote: PropTypes.Requireable<string>;
2079
2129
  emptyLabel: PropTypes.Validator<string>;
2080
2130
  }>>;
@@ -4075,6 +4125,12 @@ declare namespace BrandUpdate {
4075
4125
  label: PropTypes.Validator<string>;
4076
4126
  }> | null | undefined)[]>;
4077
4127
  }> | null | undefined> | null | undefined)[]>;
4128
+ select: PropTypes.Requireable<PropTypes.InferProps<{
4129
+ checked: PropTypes.Validator<boolean>;
4130
+ disabled: PropTypes.Requireable<boolean>;
4131
+ ariaLabel: PropTypes.Validator<string>;
4132
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
4133
+ }>>;
4078
4134
  editHref: PropTypes.Requireable<string>;
4079
4135
  highlighted: PropTypes.Requireable<boolean>;
4080
4136
  }> | null | undefined)[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-update/index.js"],"names":[],"mappings":";AAqQA,sDAyDC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-update/index.js"],"names":[],"mappings":";AAuQA,sDAgEC"}
@@ -10,6 +10,8 @@ import find from 'lodash/fp/find';
10
10
  import some from 'lodash/fp/some';
11
11
  import classNames from 'classnames';
12
12
  import BrandTabs from '../../../molecule/brand-tabs';
13
+ import ProgressBar from '../../../molecule/progress-bar';
14
+ import SkillsChartSideInformationPanel from '../../../molecule/skills-chart-side-information-panel';
13
15
  import RadioGroup from '../../../atom/radio-group';
14
16
  import { IconLinkItem, LinkItem } from '../../../organism/sidebar';
15
17
  import BrandForm from '../../../organism/brand-form';
@@ -253,7 +255,8 @@ const BrandUpdate = props => {
253
255
  documentation,
254
256
  contentFixHeight,
255
257
  title,
256
- scopeControl
258
+ scopeControl,
259
+ summary
257
260
  } = props;
258
261
  const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';
259
262
  const leftNavigation = buildLeftNavigation(logo, items, onItemClick);
@@ -277,12 +280,19 @@ const BrandUpdate = props => {
277
280
  className: style.headerSticky
278
281
  }, headerView), /*#__PURE__*/React.createElement("div", {
279
282
  className: contentStyle
280
- }, notificationsView, titleView, tabsView, contentView, detailsView, documentationView)), popinView);
283
+ }, notificationsView, titleView, summary ? /*#__PURE__*/React.createElement("div", {
284
+ className: style.summary,
285
+ "data-name": "brand-update-summary"
286
+ }, /*#__PURE__*/React.createElement(ProgressBar, summary.bar), /*#__PURE__*/React.createElement(SkillsChartSideInformationPanel, summary.tiles)) : null, tabsView, contentView, detailsView, documentationView)), popinView);
281
287
  };
282
288
  BrandUpdate.defaultProps = {
283
289
  notifications: []
284
290
  };
285
291
  BrandUpdate.propTypes = process.env.NODE_ENV !== "production" ? {
292
+ summary: PropTypes.shape({
293
+ bar: PropTypes.shape(ProgressBar.propTypes).isRequired,
294
+ tiles: PropTypes.shape(SkillsChartSideInformationPanel.propTypes).isRequired
295
+ }),
286
296
  notifications: PropTypes.arrayOf(PropTypes.shape({
287
297
  ...Banner.propTypes
288
298
  })),