@coorpacademy/components 11.42.11 → 11.43.0

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 (71) hide show
  1. package/es/atom/input-checkbox/style.css +9 -5
  2. package/es/organism/assignment-audience/index.d.ts +14 -13
  3. package/es/organism/assignment-audience/index.d.ts.map +1 -1
  4. package/es/organism/assignment-audience/index.js +62 -62
  5. package/es/organism/assignment-audience/index.js.map +1 -1
  6. package/es/organism/assignment-audience/style.css +13 -1
  7. package/es/organism/assignment-audience/types.d.ts +26 -24
  8. package/es/organism/assignment-audience/types.d.ts.map +1 -1
  9. package/es/organism/assignment-audience/types.js +14 -15
  10. package/es/organism/assignment-audience/types.js.map +1 -1
  11. package/es/organism/assignment-edition/index.d.ts +13 -12
  12. package/es/organism/assignment-edition/index.d.ts.map +1 -1
  13. package/es/organism/assignment-edition/types.d.ts +13 -12
  14. package/es/organism/assignment-edition/types.d.ts.map +1 -1
  15. package/es/organism/search-and-chips-results/index.d.ts +2 -0
  16. package/es/organism/search-and-chips-results/index.d.ts.map +1 -1
  17. package/es/organism/search-and-chips-results/index.js +16 -7
  18. package/es/organism/search-and-chips-results/index.js.map +1 -1
  19. package/es/organism/search-and-chips-results/style.css +11 -1
  20. package/es/organism/wizard-contents/index.d.ts +2 -0
  21. package/es/template/back-office/brand-update/index.d.ts +13 -12
  22. package/lib/atom/input-checkbox/style.css +9 -5
  23. package/lib/organism/assignment-audience/index.d.ts +14 -13
  24. package/lib/organism/assignment-audience/index.d.ts.map +1 -1
  25. package/lib/organism/assignment-audience/index.js +62 -62
  26. package/lib/organism/assignment-audience/index.js.map +1 -1
  27. package/lib/organism/assignment-audience/style.css +13 -1
  28. package/lib/organism/assignment-audience/types.d.ts +26 -24
  29. package/lib/organism/assignment-audience/types.d.ts.map +1 -1
  30. package/lib/organism/assignment-audience/types.js +14 -15
  31. package/lib/organism/assignment-audience/types.js.map +1 -1
  32. package/lib/organism/assignment-edition/index.d.ts +13 -12
  33. package/lib/organism/assignment-edition/index.d.ts.map +1 -1
  34. package/lib/organism/assignment-edition/types.d.ts +13 -12
  35. package/lib/organism/assignment-edition/types.d.ts.map +1 -1
  36. package/lib/organism/search-and-chips-results/index.d.ts +2 -0
  37. package/lib/organism/search-and-chips-results/index.d.ts.map +1 -1
  38. package/lib/organism/search-and-chips-results/index.js +16 -7
  39. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  40. package/lib/organism/search-and-chips-results/style.css +11 -1
  41. package/lib/organism/wizard-contents/index.d.ts +2 -0
  42. package/lib/template/back-office/brand-update/index.d.ts +13 -12
  43. package/locales/bs/global.json +1 -1
  44. package/locales/cs/global.json +1 -1
  45. package/locales/de/global.json +1 -1
  46. package/locales/es/global.json +1 -1
  47. package/locales/et/global.json +1 -1
  48. package/locales/fi/global.json +1 -1
  49. package/locales/fr/global.json +1 -1
  50. package/locales/hr/global.json +1 -1
  51. package/locales/hu/global.json +1 -1
  52. package/locales/hy/global.json +1 -1
  53. package/locales/it/global.json +1 -1
  54. package/locales/ja/global.json +1 -1
  55. package/locales/ko/global.json +1 -1
  56. package/locales/lt/global.json +1 -1
  57. package/locales/nl/global.json +1 -1
  58. package/locales/pl/global.json +1 -1
  59. package/locales/pt/global.json +1 -1
  60. package/locales/ro/global.json +1 -1
  61. package/locales/ru/global.json +1 -1
  62. package/locales/sk/global.json +1 -1
  63. package/locales/sl/global.json +1 -1
  64. package/locales/sv/global.json +1 -1
  65. package/locales/tl/global.json +1 -1
  66. package/locales/tr/global.json +1 -1
  67. package/locales/uk/global.json +1 -1
  68. package/locales/vi/global.json +1 -1
  69. package/locales/zh/global.json +1 -1
  70. package/locales/zh_TW/global.json +1 -1
  71. package/package.json +2 -2
@@ -159,12 +159,16 @@
159
159
  margin-left: 0;
160
160
  }
161
161
 
162
- .accessibleTitle {
163
- composes: visuallyHidden from "../../molecule/wizard-summary/style.css";
164
- }
165
-
162
+ /* Visually hidden, declared here: a cross-file composes would re-emit wizard-summary's whole CSS
163
+ late in the bundle (see organism/assignment-audience/style.css). */
164
+ .accessibleTitle,
166
165
  .focusableInput {
167
- composes: visuallyHidden from "../../molecule/wizard-summary/style.css";
166
+ position: absolute;
167
+ width: 1px;
168
+ height: 1px;
169
+ overflow: hidden;
170
+ clip: rect(0 0 0 0);
171
+ white-space: nowrap;
168
172
  }
169
173
 
170
174
  .hiddenTitle input {
@@ -2,15 +2,11 @@
2
2
  import { WebContextValues } from '../../atom/provider/web-context';
3
3
  import { AssignmentAudienceProps } from './types';
4
4
  declare const AssignmentAudience: {
5
- ({ title, subtitle, disabledExplanation, everyone, team, invalidTargets, invalidLabel, error, disabled, populations, upload, individuals, total, assigned }: AssignmentAudienceProps, context: WebContextValues): JSX.Element;
5
+ ({ title, subtitle, disabledExplanation, invalidTargets, invalidLabel, error, disabled, populations, upload, individuals, total, assigned }: AssignmentAudienceProps, context: WebContextValues): JSX.Element;
6
6
  propTypes: {
7
7
  title: import("prop-types").Validator<string>;
8
8
  subtitle: import("prop-types").Requireable<string>;
9
9
  disabledExplanation: import("prop-types").Requireable<string>;
10
- team: import("prop-types").Requireable<import("prop-types").InferProps<{
11
- label: import("prop-types").Validator<string>;
12
- name: import("prop-types").Validator<string>;
13
- }>>;
14
10
  invalidTargets: import("prop-types").Requireable<(import("prop-types").InferProps<{
15
11
  ref: import("prop-types").Validator<string>;
16
12
  label: import("prop-types").Validator<string>;
@@ -19,23 +15,28 @@ declare const AssignmentAudience: {
19
15
  invalidLabel: import("prop-types").Requireable<string>;
20
16
  error: import("prop-types").Requireable<string>;
21
17
  disabled: import("prop-types").Requireable<boolean>;
22
- everyone: import("prop-types").Requireable<import("prop-types").InferProps<{
23
- title: import("prop-types").Requireable<string>;
24
- label: import("prop-types").Validator<string>;
25
- value: import("prop-types").Validator<boolean>;
26
- onChange: import("prop-types").Validator<(...args: any[]) => any>;
27
- }>>;
28
18
  populations: import("prop-types").Requireable<import("prop-types").InferProps<{
29
19
  title: import("prop-types").Requireable<string>;
30
20
  subtitle: import("prop-types").Requireable<string>;
31
- label: import("prop-types").Requireable<string>;
21
+ selectAllLabel: import("prop-types").Requireable<string>;
22
+ unselectAllLabel: import("prop-types").Requireable<string>;
23
+ search: import("prop-types").Requireable<import("prop-types").InferProps<{
24
+ placeholder: import("prop-types").Requireable<string>;
25
+ value: import("prop-types").Requireable<string>;
26
+ onChange: import("prop-types").Requireable<(...args: any[]) => any>;
27
+ }>>;
28
+ emptyMessages: import("prop-types").Requireable<import("prop-types").InferProps<{
29
+ firstMessage: import("prop-types").Requireable<string>;
30
+ secondMessage: import("prop-types").Requireable<string>;
31
+ }>>;
32
32
  options: import("prop-types").Validator<(import("prop-types").InferProps<{
33
33
  name: import("prop-types").Validator<string>;
34
34
  value: import("prop-types").Validator<string>;
35
35
  selected: import("prop-types").Validator<boolean>;
36
36
  count: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
37
+ all: import("prop-types").Requireable<boolean>;
38
+ locked: import("prop-types").Requireable<boolean>;
37
39
  }> | null | undefined)[]>;
38
- removeLabel: import("prop-types").Requireable<string>;
39
40
  onChange: import("prop-types").Validator<(...args: any[]) => any>;
40
41
  }>>;
41
42
  upload: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-audience/index.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAoC,EAClC,uBAAuB,EAGxB,MAAM,SAAS,CAAC;AAwDjB,QAAA,MAAM,kBAAkB;iKAgBnB,uBAAuB,WACjB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAue1B,CAAC;AAQF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-audience/index.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAEjE,OAAoC,EAAC,uBAAuB,EAAU,MAAM,SAAS,CAAC;AAwDtF,QAAA,MAAM,kBAAkB;iJAcnB,uBAAuB,WACjB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwe1B,CAAC;AAQF,eAAe,kBAAkB,CAAC"}
@@ -1,8 +1,7 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useCallback, useMemo } from 'react';
3
3
  import uniqueId from 'lodash/fp/uniqueId';
4
- import InputSwitch from '../../atom/input-switch';
5
- import SelectMultiple from '../../molecule/select-multiple';
4
+ import SearchAndChipsResults from '../search-and-chips-results';
6
5
  import Banner from '../../molecule/banner';
7
6
  import InputFileDraggable from '../../atom/input-file-draggable';
8
7
  import Autocomplete from '../../atom/autocomplete';
@@ -64,8 +63,6 @@ const AssignmentAudience = ({
64
63
  title,
65
64
  subtitle,
66
65
  disabledExplanation,
67
- everyone,
68
- team,
69
66
  invalidTargets,
70
67
  invalidLabel,
71
68
  error,
@@ -85,14 +82,33 @@ const AssignmentAudience = ({
85
82
  const handleSelectionAction = useCallback(onClick => () => {
86
83
  if (!disabled) onClick();
87
84
  }, [disabled]);
88
- const sourcesDisabled = disabled || Boolean(everyone?.value);
85
+ const populationOptions = populations?.options || [];
86
+ const isSelected = option => option.selected || option.locked;
87
+ const allSelected = populationOptions.some(option => option.all && isSelected(option));
88
+ const sourcesDisabled = disabled || allSelected;
89
+ const showExplanation = allSelected && Boolean(disabledExplanation);
89
90
  const loading = upload?.status === 'loading';
90
- const onEveryoneChange = everyone?.onChange;
91
- const handleEveryoneChange = useCallback(nextValue => {
92
- if (!disabled) onEveryoneChange?.(nextValue);
93
- }, [disabled, onEveryoneChange]);
94
- const populationOptions = populations?.options;
95
- const onPopulationsChange = populations?.onChange;
91
+ const populationQuery = (populations?.search?.value || '').toLowerCase();
92
+ const listedOptions = populationOptions.filter(option => option.name.toLowerCase().includes(populationQuery));
93
+ const listedSelected = listedOptions.length > 0 && listedOptions.every(isSelected);
94
+ const emitSelection = select => {
95
+ if (!disabled) populations?.onChange(populationOptions.filter(select).map(option => ({
96
+ ...option,
97
+ selected: true
98
+ })));
99
+ };
100
+ const handlePopulationToggle = value => () => {
101
+ const target = populationOptions.find(option => option.value === value);
102
+ if (!target || target.locked) return;
103
+ emitSelection(option => option.value === value ? !isSelected(option) : isSelected(option));
104
+ };
105
+ const handleBulkSelection = () => {
106
+ if (listedOptions.length === 0) return;
107
+ emitSelection(option => option.locked || (listedOptions.includes(option) ? !listedSelected : isSelected(option)));
108
+ };
109
+ const handlePopulationSearch = value => {
110
+ if (!disabled) populations?.search?.onChange?.(value);
111
+ };
96
112
  const onUpload = upload?.onUpload;
97
113
  const onRemoveFile = upload?.onRemove;
98
114
  const value = individuals?.value || '';
@@ -102,13 +118,6 @@ const AssignmentAudience = ({
102
118
  const onAdd = individuals?.onAdd;
103
119
  const onRemove = individuals?.onRemove;
104
120
  const explanationId = useMemo(() => uniqueId('assignment-audience-explanation-'), []);
105
- const handlePopulations = useCallback(choices => !sourcesDisabled && onPopulationsChange?.((populationOptions || []).filter(option => choices.some(choice => choice.value === option.value)).map(option => ({
106
- ...option,
107
- selected: true
108
- }))), [sourcesDisabled, populationOptions, onPopulationsChange]);
109
- const selectedPopulations = useMemo(() => (populationOptions || []).filter(option => option.selected), [populationOptions]);
110
- const handleRemovePopulation = useCallback(populationValue => () => !sourcesDisabled && onPopulationsChange?.(selectedPopulations.filter(option => option.value !== populationValue)), [sourcesDisabled, selectedPopulations, onPopulationsChange]);
111
-
112
121
  // The native input receives both a browse and a drop, and fires change for each.
113
122
  const handleFileChange = useCallback(event => {
114
123
  const file = event.target.files && event.target.files[0];
@@ -154,13 +163,7 @@ const AssignmentAudience = ({
154
163
  }), error ? /*#__PURE__*/React.createElement("p", {
155
164
  role: "alert",
156
165
  className: style.fieldError
157
- }, error) : null, team ? /*#__PURE__*/React.createElement(Block, {
158
- name: "team"
159
- }, /*#__PURE__*/React.createElement(Chip, {
160
- text: team.label,
161
- subText: team.name,
162
- customIcon: "none"
163
- })) : null, invalidTargets?.length ? /*#__PURE__*/React.createElement("fieldset", {
166
+ }, error) : null, invalidTargets?.length ? /*#__PURE__*/React.createElement("fieldset", {
164
167
  disabled: disabled,
165
168
  className: style.sources,
166
169
  "data-name": "invalid-targets"
@@ -177,48 +180,45 @@ const AssignmentAudience = ({
177
180
  if (!disabled) target.onRemove();
178
181
  }
179
182
  }]
180
- })))) : null, everyone ? /*#__PURE__*/React.createElement(Block, {
181
- name: "everyone",
182
- title: everyone.title
183
- }, /*#__PURE__*/React.createElement(InputSwitch, {
184
- title: everyone.label,
185
- value: everyone.value,
183
+ })))) : null, populations ? /*#__PURE__*/React.createElement("fieldset", {
186
184
  disabled: disabled,
187
- onChange: handleEveryoneChange,
188
- theme: "coorpmanager",
189
- "data-name": "assignment-everyone",
190
- "aria-label": everyone.label
191
- }), everyone.value ? /*#__PURE__*/React.createElement("p", {
185
+ className: style.sources
186
+ }, /*#__PURE__*/React.createElement(Block, {
187
+ name: "populations",
188
+ title: populations.title,
189
+ subtitle: populations.subtitle
190
+ }, /*#__PURE__*/React.createElement(SearchAndChipsResults, {
191
+ resultsMaxHeight: 236,
192
+ "results-aria-label": populations.title,
193
+ emptyMessages: populations.emptyMessages,
194
+ results: listedOptions.map(option => ({
195
+ text: option.name,
196
+ information: option.count === undefined || option.count === null ? '' : String(option.count),
197
+ selected: Boolean(isSelected(option)),
198
+ onClick: handlePopulationToggle(option.value)
199
+ })),
200
+ selectAllButton: populationOptions.length >= 2 ? {
201
+ label: listedSelected ? populations.unselectAllLabel : populations.selectAllLabel,
202
+ icon: listedSelected ? 'close' : 'add',
203
+ disabled: disabled || listedOptions.length === 0,
204
+ onClick: handleBulkSelection
205
+ } : undefined,
206
+ search: populationOptions.length >= 2 && populations.search ? {
207
+ placeholder: populations.search.placeholder || '',
208
+ value: populations.search.value || '',
209
+ disabled,
210
+ onChange: handlePopulationSearch,
211
+ onClear: () => handlePopulationSearch('')
212
+ } : undefined
213
+ }), showExplanation ? /*#__PURE__*/React.createElement("p", {
192
214
  id: explanationId,
193
215
  className: style.explanation
194
- }, disabledExplanation) : null) : null, /*#__PURE__*/React.createElement("fieldset", {
216
+ }, disabledExplanation) : null)) : null, upload || individuals ? /*#__PURE__*/React.createElement("fieldset", {
195
217
  disabled: sourcesDisabled,
196
- "aria-describedby": everyone?.value && disabledExplanation ? explanationId : undefined,
218
+ "aria-describedby": showExplanation ? explanationId : undefined,
197
219
  className: style.sources,
198
220
  "data-name": "audience-sources"
199
- }, populations ? /*#__PURE__*/React.createElement(Block, {
200
- name: "populations",
201
- title: populations.title,
202
- subtitle: populations.subtitle
203
- }, /*#__PURE__*/React.createElement(SelectMultiple, {
204
- title: populations.label,
205
- options: populations.options,
206
- multiple: true,
207
- theme: "coorpmanager",
208
- disabled: sourcesDisabled,
209
- onChange: handlePopulations
210
- }), selectedPopulations.length > 0 ? /*#__PURE__*/React.createElement("div", {
211
- className: style.chips,
212
- "data-name": "population-chips"
213
- }, selectedPopulations.map(option => /*#__PURE__*/React.createElement(Chip, {
214
- key: option.value,
215
- text: option.name,
216
- subText: option.count === undefined ? undefined : `${option.count}`,
217
- selected: true,
218
- customIcon: sourcesDisabled ? 'none' : 'times',
219
- ariaLabel: sourcesDisabled ? undefined : chipLabel(populations.removeLabel, option.name),
220
- onClick: sourcesDisabled ? undefined : handleRemovePopulation(option.value)
221
- }))) : null) : null, upload ? /*#__PURE__*/React.createElement(Block, {
221
+ }, upload ? /*#__PURE__*/React.createElement(Block, {
222
222
  name: "upload",
223
223
  title: upload.title,
224
224
  subtitle: upload.subtitle,
@@ -284,7 +284,7 @@ const AssignmentAudience = ({
284
284
  customIcon: sourcesDisabled ? 'none' : 'times',
285
285
  ariaLabel: sourcesDisabled ? undefined : chipLabel(individuals.removeLabel, learner.label),
286
286
  onClick: sourcesDisabled ? undefined : handleRemove(learner.id)
287
- }))) : null) : null), total ? /*#__PURE__*/React.createElement("div", {
287
+ }))) : null) : null) : null, total ? /*#__PURE__*/React.createElement("div", {
288
288
  className: style.total,
289
289
  "data-name": "estimated-audience",
290
290
  "aria-live": "polite"
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useMemo","uniqueId","InputSwitch","SelectMultiple","Banner","InputFileDraggable","Autocomplete","Title","ButtonLink","Search","Table","ACTION_LOOKS","Chip","Provider","GetTranslateFromContext","UploadResult","AssignmentAudiencePropTypes","style","FIT_CONTENT","width","ACCEPTED_FILES","join","Block","name","title","subtitle","button","children","createElement","className","block","blockHead","type","titleSize","headingLevel","TemplatePreview","header","rows","templatePreview","templateHeader","templateRows","map","row","key","chipLabel","removeLabel","undefined","AssignmentAudience","disabledExplanation","everyone","team","invalidTargets","invalidLabel","error","disabled","populations","upload","individuals","total","assigned","context","translate","selection","selectedIds","Set","selectableRows","filter","action","pageSelected","length","every","has","id","pageDisabled","handleSelectionAction","onClick","sourcesDisabled","Boolean","value","loading","status","onEveryoneChange","onChange","handleEveryoneChange","nextValue","populationOptions","options","onPopulationsChange","onUpload","onRemoveFile","onRemove","suggestions","selected","onSearch","onAdd","explanationId","handlePopulations","choices","option","some","choice","selectedPopulations","handleRemovePopulation","populationValue","handleFileChange","event","file","target","files","handleCancelCheck","availableSuggestions","suggestion","learner","handleSearch","handleAdd","find","item","handleRemove","handleAssignedToggle","onToggle","handleAssignedFilter","onFilter","handleAssignedSearch","query","search","handleAssignedPrevious","pagination","onPrevious","handleAssignedNext","onNext","container","role","fieldError","text","label","subText","customIcon","sources","ref","message","cta","theme","explanation","multiple","chips","count","ariaLabel","templateLink","link","href","download","customStyle","uploadMain","dropzone","_extends","report","onDownload","filesTypes","description","uploadLabel","browse","errorButtonLabel","dragAndDropLabel","dropLabel","loadingLabel","onReset","placeholder","login","onInput","onSuggestionSelected","totalLabel","detail","muted","assignedCard","notice","assignedControls","toggleLabel","assignedButton","expanded","Fragment","assignedFilters","filters","assignedFilterSelected","assignedFilter","assignedToolbar","assignedSearch","assignedPagination","bulkActions","assignedSelectionBar","summary","index","color","icon","variant","content","position","faIcon","size","assignedSelectionNotice","assignedTable","editable","selectAll","checked","onTogglePage","columns","column","select","fields","onToggleRow","actionText","emptyLabel","footnote","assignedFootnote","propTypes","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/organism/assignment-audience/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo} from 'react';\nimport uniqueId from 'lodash/fp/uniqueId';\nimport InputSwitch from '../../atom/input-switch';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport Banner from '../../molecule/banner';\nimport InputFileDraggable from '../../atom/input-file-draggable';\nimport Autocomplete from '../../atom/autocomplete';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport Search from '../../atom/input-search';\nimport Table, {ACTION_LOOKS} from '../../molecule/table';\nimport Chip from '../../atom/chip';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport UploadResult from './upload-result';\nimport AssignmentAudiencePropTypes, {\n AssignmentAudienceProps,\n Learner,\n PopulationOption\n} from './types';\nimport style from './style.css';\n\n// ButtonLink is full width by default: in the Title row it would squeeze the title column.\nconst FIT_CONTENT = {width: 'fit-content'};\n\n// csv, xls and xlsx, as the types FilesPropType knows\nconst ACCEPTED_FILES = [\n 'text/csv',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n].join(',');\n\ntype BlockProps = {\n name: string;\n title?: string;\n subtitle?: string;\n // The Title's right-hand ButtonLink\n button?: Record<string, unknown>;\n children?: React.ReactNode;\n};\n\nconst Block = ({name, title, subtitle, button, children}: BlockProps) => (\n <section data-name={name} className={style.block}>\n {title ? (\n <div className={style.blockHead}>\n <Title\n type=\"form-group\"\n titleSize=\"medium\"\n title={title}\n subtitle={subtitle}\n button={button}\n headingLevel={3}\n />\n </div>\n ) : null}\n {children}\n </section>\n);\n\n// A sample of the file to upload: its one column, a header and two example logins.\nconst TemplatePreview = ({header, rows = []}: {header: string; rows?: string[]}) => (\n <div className={style.templatePreview} data-name=\"upload-template-preview\">\n <div className={style.templateHeader}>{header}</div>\n <ul className={style.templateRows}>\n {rows.map(row => (\n <li key={row}>{row}</li>\n ))}\n </ul>\n </div>\n);\n\n// A removable chip says what a click does, e.g. « Remove Camille Durand »; no label, its text.\nconst chipLabel = (removeLabel: string | undefined, name: string) =>\n removeLabel ? `${removeLabel} ${name}` : undefined;\n\nconst AssignmentAudience = (\n {\n title,\n subtitle,\n disabledExplanation,\n everyone,\n team,\n invalidTargets,\n invalidLabel,\n error,\n disabled = false,\n populations,\n upload,\n individuals,\n total,\n assigned\n }: AssignmentAudienceProps,\n context: WebContextValues\n) => {\n const translate = GetTranslateFromContext(context);\n\n const selection = assigned?.selection;\n const selectedIds = new Set(selection?.selectedIds);\n const selectableRows = assigned?.rows.filter(row => row.action) || [];\n const pageSelected =\n selectableRows.length > 0 && selectableRows.every(row => selectedIds.has(row.id));\n const pageDisabled = disabled || selectableRows.length === 0;\n\n const handleSelectionAction = useCallback(\n (onClick: () => void) => () => {\n if (!disabled) onClick();\n },\n [disabled]\n );\n const sourcesDisabled = disabled || Boolean(everyone?.value);\n const loading = upload?.status === 'loading';\n const onEveryoneChange = everyone?.onChange;\n const handleEveryoneChange = useCallback(\n (nextValue: boolean) => {\n if (!disabled) onEveryoneChange?.(nextValue);\n },\n [disabled, onEveryoneChange]\n );\n const populationOptions = populations?.options;\n const onPopulationsChange = populations?.onChange;\n const onUpload = upload?.onUpload;\n const onRemoveFile = upload?.onRemove;\n const value = individuals?.value || '';\n const suggestions = individuals?.suggestions;\n const selected = individuals?.selected;\n const onSearch = individuals?.onSearch;\n const onAdd = individuals?.onAdd;\n const onRemove = individuals?.onRemove;\n const explanationId = useMemo(() => uniqueId('assignment-audience-explanation-'), []);\n const handlePopulations = useCallback(\n (choices: PopulationOption[]) =>\n !sourcesDisabled &&\n onPopulationsChange?.(\n (populationOptions || [])\n .filter(option => choices.some(choice => choice.value === option.value))\n .map(option => ({...option, selected: true}))\n ),\n [sourcesDisabled, populationOptions, onPopulationsChange]\n );\n const selectedPopulations = useMemo(\n () => (populationOptions || []).filter(option => option.selected),\n [populationOptions]\n );\n const handleRemovePopulation = useCallback(\n (populationValue: string) => () =>\n !sourcesDisabled &&\n onPopulationsChange?.(selectedPopulations.filter(option => option.value !== populationValue)),\n [sourcesDisabled, selectedPopulations, onPopulationsChange]\n );\n\n // The native input receives both a browse and a drop, and fires change for each.\n const handleFileChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files && event.target.files[0];\n if (sourcesDisabled || loading || !file) return;\n onUpload?.(file);\n },\n [sourcesDisabled, loading, onUpload]\n );\n\n // The loader's cross cancels the check: the file is dropped, as with Remove.\n const handleCancelCheck = useCallback(() => {\n if (!sourcesDisabled) onRemoveFile?.();\n }, [sourcesDisabled, onRemoveFile]);\n\n const availableSuggestions = useMemo(\n () =>\n sourcesDisabled\n ? []\n : (suggestions || []).filter(\n suggestion => !selected?.some(learner => learner.id === suggestion.id)\n ),\n [sourcesDisabled, suggestions, selected]\n );\n const handleSearch = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) =>\n !sourcesDisabled && onSearch?.(event.target.value),\n [sourcesDisabled, onSearch]\n );\n const handleAdd = useCallback(\n ({suggestion}: {suggestion: {value: string}}) => {\n const learner = availableSuggestions.find(item => item.id === suggestion.value);\n if (!sourcesDisabled && learner) onAdd?.(learner);\n },\n [sourcesDisabled, availableSuggestions, onAdd]\n );\n const handleRemove = useCallback(\n (id: string) => () => {\n if (!sourcesDisabled) onRemove?.(id);\n },\n [sourcesDisabled, onRemove]\n );\n\n // Toggle, filters and pager sit in a <fieldset disabled> when `disabled`: the browser never\n // fires their clicks, so they need no guard. The search input still emits input events.\n const handleAssignedToggle = useCallback(() => assigned?.onToggle(), [assigned]);\n const handleAssignedFilter = useCallback(\n (key: string) => () => assigned?.onFilter(key),\n [assigned]\n );\n const handleAssignedSearch = useCallback(\n (query: string) => {\n if (!disabled) assigned?.search.onChange(query);\n },\n [disabled, assigned]\n );\n const handleAssignedPrevious = useCallback(() => assigned?.pagination.onPrevious?.(), [assigned]);\n const handleAssignedNext = useCallback(() => assigned?.pagination.onNext?.(), [assigned]);\n\n return (\n <section className={style.container} data-name=\"assignment-audience\" aria-label={title}>\n <Title\n type=\"form-group\"\n titleSize=\"xl-strong\"\n title={title}\n subtitle={subtitle}\n headingLevel={2}\n />\n {error ? (\n <p role=\"alert\" className={style.fieldError}>\n {error}\n </p>\n ) : null}\n {team ? (\n <Block name=\"team\">\n <Chip text={team.label} subText={team.name} customIcon=\"none\" />\n </Block>\n ) : null}\n {invalidTargets?.length ? (\n <fieldset disabled={disabled} className={style.sources} data-name=\"invalid-targets\">\n {invalidTargets.map(target => (\n <div key={target.ref} data-target-ref={target.ref}>\n <Banner\n type=\"error\"\n message={invalidLabel ? `${target.label}: ${invalidLabel}` : target.label}\n cta={[\n {\n type: 'button',\n label: 'Remove',\n action: () => {\n if (!disabled) target.onRemove();\n }\n }\n ]}\n />\n </div>\n ))}\n </fieldset>\n ) : null}\n {everyone ? (\n <Block name=\"everyone\" title={everyone.title}>\n <InputSwitch\n title={everyone.label}\n value={everyone.value}\n disabled={disabled}\n onChange={handleEveryoneChange}\n theme=\"coorpmanager\"\n data-name=\"assignment-everyone\"\n aria-label={everyone.label}\n />\n {everyone.value ? (\n <p id={explanationId} className={style.explanation}>\n {disabledExplanation}\n </p>\n ) : null}\n </Block>\n ) : null}\n <fieldset\n disabled={sourcesDisabled}\n aria-describedby={everyone?.value && disabledExplanation ? explanationId : undefined}\n className={style.sources}\n data-name=\"audience-sources\"\n >\n {populations ? (\n <Block name=\"populations\" title={populations.title} subtitle={populations.subtitle}>\n <SelectMultiple\n title={populations.label}\n options={populations.options}\n multiple\n theme=\"coorpmanager\"\n disabled={sourcesDisabled}\n onChange={handlePopulations}\n />\n {selectedPopulations.length > 0 ? (\n <div className={style.chips} data-name=\"population-chips\">\n {selectedPopulations.map(option => (\n <Chip\n key={option.value}\n text={option.name}\n subText={option.count === undefined ? undefined : `${option.count}`}\n selected\n customIcon={sourcesDisabled ? 'none' : 'times'}\n ariaLabel={\n sourcesDisabled ? undefined : chipLabel(populations.removeLabel, option.name)\n }\n onClick={sourcesDisabled ? undefined : handleRemovePopulation(option.value)}\n />\n ))}\n </div>\n ) : null}\n </Block>\n ) : null}\n {upload ? (\n <Block\n name=\"upload\"\n title={upload.title}\n subtitle={upload.subtitle}\n button={\n upload.templateLink\n ? {\n type: 'text',\n label: upload.templateLink.label,\n link: sourcesDisabled\n ? undefined\n : {href: upload.templateLink.href, download: true},\n disabled: sourcesDisabled,\n 'data-name': 'upload-template-link',\n customStyle: FIT_CONTENT\n }\n : undefined\n }\n >\n <div className={style.upload}>\n {upload.templatePreview ? <TemplatePreview {...upload.templatePreview} /> : null}\n <div\n className={upload.status === 'done' ? style.uploadMain : style.dropzone}\n aria-busy={loading}\n aria-live=\"polite\"\n data-name=\"upload-dropzone\"\n >\n {upload.status === 'done' ? (\n <UploadResult\n {...upload}\n onRemove={upload.onRemove ? handleCancelCheck : undefined}\n report={\n upload.report\n ? {\n ...upload.report,\n onDownload: () => {\n if (!sourcesDisabled) upload.report?.onDownload();\n }\n }\n : undefined\n }\n />\n ) : (\n <InputFileDraggable\n name=\"assignment-audience-file\"\n filesTypes={ACCEPTED_FILES}\n description={upload.dropzone?.description}\n uploadLabel={upload.dropzone?.browse}\n errorButtonLabel={upload.dropzone?.browse}\n dragAndDropLabel={upload.dropzone?.dropLabel}\n loadingLabel={upload.dropzone?.loadingLabel}\n loading={loading}\n disabled={sourcesDisabled}\n error={upload.status === 'error' ? upload.error : ''}\n onChange={handleFileChange}\n onReset={handleCancelCheck}\n />\n )}\n </div>\n </div>\n </Block>\n ) : null}\n {individuals ? (\n <Block name=\"individuals\" title={individuals.title}>\n <Autocomplete\n title={individuals.placeholder}\n theme=\"coorpmanager\"\n value={value}\n suggestions={availableSuggestions.map(learner => ({\n name: `${learner.label} · ${learner.login}`,\n value: learner.id\n }))}\n onInput={handleSearch}\n onSuggestionSelected={handleAdd}\n />\n {(selected?.length || 0) > 0 ? (\n <div className={style.chips}>\n {selected?.map((learner: Learner) => (\n <Chip\n key={learner.id}\n text={learner.label}\n subText={learner.login}\n selected\n customIcon={sourcesDisabled ? 'none' : 'times'}\n ariaLabel={\n sourcesDisabled\n ? undefined\n : chipLabel(individuals.removeLabel, learner.label)\n }\n onClick={sourcesDisabled ? undefined : handleRemove(learner.id)}\n />\n ))}\n </div>\n ) : null}\n </Block>\n ) : null}\n </fieldset>\n {total ? (\n <div className={style.total} data-name=\"estimated-audience\" aria-live=\"polite\">\n <span className={style.totalLabel}>{total.label}</span>\n {total.detail ? <span className={style.muted}>{total.detail}</span> : null}\n </div>\n ) : null}\n {assigned ? (\n <div className={style.assignedCard} data-name=\"assigned-learners\">\n {assigned.notice ? (\n <div role=\"status\">\n <Banner type=\"info\" message={assigned.notice} />\n </div>\n ) : null}\n <fieldset disabled={disabled} className={style.assignedControls}>\n <Block\n name=\"assigned-header\"\n title={assigned.title}\n subtitle={assigned.subtitle}\n button={{\n label: assigned.toggleLabel,\n type: 'secondary',\n className: style.assignedButton,\n disabled,\n onClick: handleAssignedToggle\n }}\n />\n {assigned.expanded ? (\n <>\n <div className={style.assignedFilters}>\n {assigned.filters.map(filter => (\n <button\n key={filter.key}\n type=\"button\"\n aria-pressed={filter.selected}\n className={\n filter.selected ? style.assignedFilterSelected : style.assignedFilter\n }\n disabled={disabled}\n onClick={handleAssignedFilter(filter.key)}\n >\n {filter.label}\n </button>\n ))}\n </div>\n <div className={style.assignedToolbar}>\n <div className={style.assignedSearch}>\n <Search\n value={assigned.search.value}\n placeholder={assigned.search.placeholder}\n onChange={handleAssignedSearch}\n />\n </div>\n <div className={style.assignedPagination}>\n <span>{assigned.pagination.label}</span>\n <ButtonLink\n label=\"‹\"\n type=\"secondary\"\n className={style.assignedButton}\n disabled={disabled || !assigned.pagination.onPrevious}\n onClick={handleAssignedPrevious}\n />\n <ButtonLink\n label=\"›\"\n type=\"secondary\"\n className={style.assignedButton}\n disabled={disabled || !assigned.pagination.onNext}\n onClick={handleAssignedNext}\n />\n </div>\n </div>\n\n {selection?.bulkActions?.length ? (\n <div className={style.assignedSelectionBar} data-name=\"assigned-selection-bar\">\n {selection.summary ? <span>{selection.summary}</span> : null}\n {selection.bulkActions.map((action, index) => {\n const {className, color, icon} = ACTION_LOOKS[action.variant];\n return (\n <ButtonLink\n key={index}\n type=\"text\"\n label={action.label}\n content={<span>{action.label}</span>}\n className={className}\n disabled={disabled}\n onClick={handleSelectionAction(action.onClick)}\n icon={{\n position: 'left',\n faIcon: {name: icon, size: 14, color}\n }}\n />\n );\n })}\n </div>\n ) : null}\n\n {selection?.notice ? (\n <div\n className={style.assignedSelectionNotice}\n data-name=\"assigned-selection-notice\"\n >\n <span>{selection.notice.message}</span>\n {selection.notice.action ? (\n <ButtonLink\n type=\"text\"\n label={selection.notice.action.label}\n content={<span>{selection.notice.action.label}</span>}\n className={style.assignedButton}\n customStyle={FIT_CONTENT}\n disabled={disabled}\n onClick={handleSelectionAction(selection.notice.action.onClick)}\n />\n ) : null}\n </div>\n ) : null}\n {assigned.rows.length > 0 ? (\n <div className={style.assignedTable}>\n <Table\n editable={false}\n selectAll={\n selection\n ? {\n checked: pageSelected,\n disabled: pageDisabled,\n ariaLabel: translate('Select all learners on this page'),\n onChange: () => {\n if (!pageDisabled) selection.onTogglePage();\n }\n }\n : undefined\n }\n columns={[\n ...assigned.columns.map(column => ({\n title: column\n })),\n {title: ''}\n ]}\n rows={assigned.rows.map(row => ({\n id: row.id,\n select: selection\n ? {\n checked: Boolean(row.action) && selectedIds.has(row.id),\n disabled: disabled || !row.action,\n ariaLabel: row.fields[0] || row.id,\n onChange: () => {\n if (!disabled && row.action) selection.onToggleRow(row.id);\n }\n }\n : undefined,\n fields: [\n ...row.fields,\n row.action\n ? {\n // A row shows its state next to the action it allows, in every filter.\n text: row.actionText,\n action: {\n ...row.action,\n onClick: () => {\n if (!disabled) row.action?.onClick();\n }\n }\n }\n : {text: row.actionText ?? ''}\n ]\n }))}\n />\n </div>\n ) : (\n <p className={style.muted}>{assigned.emptyLabel}</p>\n )}\n {assigned.footnote ? (\n <p className={style.assignedFootnote}>{assigned.footnote}</p>\n ) : null}\n </>\n ) : null}\n </fieldset>\n </div>\n ) : null}\n </section>\n );\n};\n\nAssignmentAudience.propTypes = AssignmentAudiencePropTypes;\n\nAssignmentAudience.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default AssignmentAudience;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,QAAO,OAAO;AACjD,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,OAAOC,WAAW,MAAM,yBAAyB;AACjD,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,kBAAkB,MAAM,iCAAiC;AAChE,OAAOC,YAAY,MAAM,yBAAyB;AAClD,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,KAAK,IAAGC,YAAY,QAAO,sBAAsB;A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CAAC8B,EAAE;QAClCU,QAAQ,EAAEA,CAAA,KAAM;UACd,IAAI,CAAC5B,QAAQ,IAAIZ,GAAG,CAACyB,MAAM,EAAEL,SAAS,CAACkJ,WAAW,CAACtK,GAAG,CAAC8B,EAAE,CAAC;QAC5D;MACF,CAAC,GACD1B,SAAS;MACbiK,MAAM,EAAE,CACN,GAAGrK,GAAG,CAACqK,MAAM,EACbrK,GAAG,CAACyB,MAAM,GACN;QACE;QACAkE,IAAI,EAAE3F,GAAG,CAACuK,UAAU;QACpB9I,MAAM,EAAE;UACN,GAAGzB,GAAG,CAACyB,MAAM;UACbQ,OAAO,EAAEA,CAAA,KAAM;YACb,IAAI,CAACrB,QAAQ,EAAEZ,GAAG,CAACyB,MAAM,EAAEQ,OAAO,CAAC,CAAC;UACtC;QACF;MACF,CAAC,GACD;QAAC0D,IAAI,EAAE3F,GAAG,CAACuK,UAAU,IAAI;MAAE,CAAC;IAEpC,CAAC,CAAC;EAAE,CACL,CACE,CAAC,gBAENnN,KAAA,CAAA8B,aAAA;IAAGC,SAAS,EAAEZ,KAAK,CAAC2J;EAAM,GAAEjH,QAAQ,CAACuJ,UAAc,CACpD,EACAvJ,QAAQ,CAACwJ,QAAQ,gBAChBrN,KAAA,CAAA8B,aAAA;IAAGC,SAAS,EAAEZ,KAAK,CAACmM;EAAiB,GAAEzJ,QAAQ,CAACwJ,QAAY,CAAC,GAC3D,IACJ,CAAC,GACD,IACI,CACP,CAAC,GACJ,IACG,CAAC;AAEd,CAAC;AAEDpK,kBAAkB,CAACsK,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGxM,2BAA2B;AAE1D+B,kBAAkB,CAAC0K,YAAY,GAAG;EAChC5J,SAAS,EAAEhD,QAAQ,CAAC6M,iBAAiB,CAAC7J;AACxC,CAAC;AAED,eAAed,kBAAkB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useMemo","uniqueId","SearchAndChipsResults","Banner","InputFileDraggable","Autocomplete","Title","ButtonLink","Search","Table","ACTION_LOOKS","Chip","Provider","GetTranslateFromContext","UploadResult","AssignmentAudiencePropTypes","style","FIT_CONTENT","width","ACCEPTED_FILES","join","Block","name","title","subtitle","button","children","createElement","className","block","blockHead","type","titleSize","headingLevel","TemplatePreview","header","rows","templatePreview","templateHeader","templateRows","map","row","key","chipLabel","removeLabel","undefined","AssignmentAudience","disabledExplanation","invalidTargets","invalidLabel","error","disabled","populations","upload","individuals","total","assigned","context","translate","selection","selectedIds","Set","selectableRows","filter","action","pageSelected","length","every","has","id","pageDisabled","handleSelectionAction","onClick","populationOptions","options","isSelected","option","selected","locked","allSelected","some","all","sourcesDisabled","showExplanation","Boolean","loading","status","populationQuery","search","value","toLowerCase","listedOptions","includes","listedSelected","emitSelection","select","onChange","handlePopulationToggle","target","find","handleBulkSelection","handlePopulationSearch","onUpload","onRemoveFile","onRemove","suggestions","onSearch","onAdd","explanationId","handleFileChange","event","file","files","handleCancelCheck","availableSuggestions","suggestion","learner","handleSearch","handleAdd","item","handleRemove","handleAssignedToggle","onToggle","handleAssignedFilter","onFilter","handleAssignedSearch","query","handleAssignedPrevious","pagination","onPrevious","handleAssignedNext","onNext","container","role","fieldError","sources","ref","message","label","cta","resultsMaxHeight","emptyMessages","results","text","information","count","String","selectAllButton","unselectAllLabel","selectAllLabel","icon","placeholder","onClear","explanation","templateLink","link","href","download","customStyle","uploadMain","dropzone","_extends","report","onDownload","filesTypes","description","uploadLabel","browse","errorButtonLabel","dragAndDropLabel","dropLabel","loadingLabel","onReset","theme","login","onInput","onSuggestionSelected","chips","subText","customIcon","ariaLabel","totalLabel","detail","muted","assignedCard","notice","assignedControls","toggleLabel","assignedButton","expanded","Fragment","assignedFilters","filters","assignedFilterSelected","assignedFilter","assignedToolbar","assignedSearch","assignedPagination","bulkActions","assignedSelectionBar","summary","index","color","variant","content","position","faIcon","size","assignedSelectionNotice","assignedTable","editable","selectAll","checked","onTogglePage","columns","column","fields","onToggleRow","actionText","emptyLabel","footnote","assignedFootnote","propTypes","process","env","NODE_ENV","contextTypes","childContextTypes"],"sources":["../../../src/organism/assignment-audience/index.tsx"],"sourcesContent":["import React, {useCallback, useMemo} from 'react';\nimport uniqueId from 'lodash/fp/uniqueId';\nimport SearchAndChipsResults from '../search-and-chips-results';\nimport Banner from '../../molecule/banner';\nimport InputFileDraggable from '../../atom/input-file-draggable';\nimport Autocomplete from '../../atom/autocomplete';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport Search from '../../atom/input-search';\nimport Table, {ACTION_LOOKS} from '../../molecule/table';\nimport Chip from '../../atom/chip';\nimport Provider, {GetTranslateFromContext} from '../../atom/provider';\nimport {WebContextValues} from '../../atom/provider/web-context';\nimport UploadResult from './upload-result';\nimport AssignmentAudiencePropTypes, {AssignmentAudienceProps, Learner} from './types';\nimport style from './style.css';\n\n// ButtonLink is full width by default: in the Title row it would squeeze the title column.\nconst FIT_CONTENT = {width: 'fit-content'};\n\n// csv, xls and xlsx, as the types FilesPropType knows\nconst ACCEPTED_FILES = [\n 'text/csv',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n].join(',');\n\ntype BlockProps = {\n name: string;\n title?: string;\n subtitle?: string;\n // The Title's right-hand ButtonLink\n button?: Record<string, unknown>;\n children?: React.ReactNode;\n};\n\nconst Block = ({name, title, subtitle, button, children}: BlockProps) => (\n <section data-name={name} className={style.block}>\n {title ? (\n <div className={style.blockHead}>\n <Title\n type=\"form-group\"\n titleSize=\"medium\"\n title={title}\n subtitle={subtitle}\n button={button}\n headingLevel={3}\n />\n </div>\n ) : null}\n {children}\n </section>\n);\n\n// A sample of the file to upload: its one column, a header and two example logins.\nconst TemplatePreview = ({header, rows = []}: {header: string; rows?: string[]}) => (\n <div className={style.templatePreview} data-name=\"upload-template-preview\">\n <div className={style.templateHeader}>{header}</div>\n <ul className={style.templateRows}>\n {rows.map(row => (\n <li key={row}>{row}</li>\n ))}\n </ul>\n </div>\n);\n\n// A removable chip says what a click does, e.g. « Remove Camille Durand »; no label, its text.\nconst chipLabel = (removeLabel: string | undefined, name: string) =>\n removeLabel ? `${removeLabel} ${name}` : undefined;\n\nconst AssignmentAudience = (\n {\n title,\n subtitle,\n disabledExplanation,\n invalidTargets,\n invalidLabel,\n error,\n disabled = false,\n populations,\n upload,\n individuals,\n total,\n assigned\n }: AssignmentAudienceProps,\n context: WebContextValues\n) => {\n const translate = GetTranslateFromContext(context);\n\n const selection = assigned?.selection;\n const selectedIds = new Set(selection?.selectedIds);\n const selectableRows = assigned?.rows.filter(row => row.action) || [];\n const pageSelected =\n selectableRows.length > 0 && selectableRows.every(row => selectedIds.has(row.id));\n const pageDisabled = disabled || selectableRows.length === 0;\n\n const handleSelectionAction = useCallback(\n (onClick: () => void) => () => {\n if (!disabled) onClick();\n },\n [disabled]\n );\n\n const populationOptions = populations?.options || [];\n const isSelected = (option: typeof populationOptions[number]) => option.selected || option.locked;\n const allSelected = populationOptions.some(option => option.all && isSelected(option));\n const sourcesDisabled = disabled || allSelected;\n const showExplanation = allSelected && Boolean(disabledExplanation);\n const loading = upload?.status === 'loading';\n const populationQuery = (populations?.search?.value || '').toLowerCase();\n const listedOptions = populationOptions.filter(option =>\n option.name.toLowerCase().includes(populationQuery)\n );\n const listedSelected = listedOptions.length > 0 && listedOptions.every(isSelected);\n const emitSelection = (\n select: (option: typeof populationOptions[number]) => boolean | undefined\n ) => {\n if (!disabled)\n populations?.onChange(\n populationOptions.filter(select).map(option => ({...option, selected: true}))\n );\n };\n const handlePopulationToggle = (value: string) => () => {\n const target = populationOptions.find(option => option.value === value);\n if (!target || target.locked) return;\n emitSelection(option => (option.value === value ? !isSelected(option) : isSelected(option)));\n };\n const handleBulkSelection = () => {\n if (listedOptions.length === 0) return;\n emitSelection(\n option =>\n option.locked || (listedOptions.includes(option) ? !listedSelected : isSelected(option))\n );\n };\n const handlePopulationSearch = (value: string) => {\n if (!disabled) populations?.search?.onChange?.(value);\n };\n const onUpload = upload?.onUpload;\n const onRemoveFile = upload?.onRemove;\n const value = individuals?.value || '';\n const suggestions = individuals?.suggestions;\n const selected = individuals?.selected;\n const onSearch = individuals?.onSearch;\n const onAdd = individuals?.onAdd;\n const onRemove = individuals?.onRemove;\n const explanationId = useMemo(() => uniqueId('assignment-audience-explanation-'), []);\n // The native input receives both a browse and a drop, and fires change for each.\n const handleFileChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files && event.target.files[0];\n if (sourcesDisabled || loading || !file) return;\n onUpload?.(file);\n },\n [sourcesDisabled, loading, onUpload]\n );\n\n // The loader's cross cancels the check: the file is dropped, as with Remove.\n const handleCancelCheck = useCallback(() => {\n if (!sourcesDisabled) onRemoveFile?.();\n }, [sourcesDisabled, onRemoveFile]);\n\n const availableSuggestions = useMemo(\n () =>\n sourcesDisabled\n ? []\n : (suggestions || []).filter(\n suggestion => !selected?.some(learner => learner.id === suggestion.id)\n ),\n [sourcesDisabled, suggestions, selected]\n );\n const handleSearch = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) =>\n !sourcesDisabled && onSearch?.(event.target.value),\n [sourcesDisabled, onSearch]\n );\n const handleAdd = useCallback(\n ({suggestion}: {suggestion: {value: string}}) => {\n const learner = availableSuggestions.find(item => item.id === suggestion.value);\n if (!sourcesDisabled && learner) onAdd?.(learner);\n },\n [sourcesDisabled, availableSuggestions, onAdd]\n );\n const handleRemove = useCallback(\n (id: string) => () => {\n if (!sourcesDisabled) onRemove?.(id);\n },\n [sourcesDisabled, onRemove]\n );\n\n // Toggle, filters and pager sit in a <fieldset disabled> when `disabled`: the browser never\n // fires their clicks, so they need no guard. The search input still emits input events.\n const handleAssignedToggle = useCallback(() => assigned?.onToggle(), [assigned]);\n const handleAssignedFilter = useCallback(\n (key: string) => () => assigned?.onFilter(key),\n [assigned]\n );\n const handleAssignedSearch = useCallback(\n (query: string) => {\n if (!disabled) assigned?.search.onChange(query);\n },\n [disabled, assigned]\n );\n const handleAssignedPrevious = useCallback(() => assigned?.pagination.onPrevious?.(), [assigned]);\n const handleAssignedNext = useCallback(() => assigned?.pagination.onNext?.(), [assigned]);\n\n return (\n <section className={style.container} data-name=\"assignment-audience\" aria-label={title}>\n <Title\n type=\"form-group\"\n titleSize=\"xl-strong\"\n title={title}\n subtitle={subtitle}\n headingLevel={2}\n />\n {error ? (\n <p role=\"alert\" className={style.fieldError}>\n {error}\n </p>\n ) : null}\n {invalidTargets?.length ? (\n <fieldset disabled={disabled} className={style.sources} data-name=\"invalid-targets\">\n {invalidTargets.map(target => (\n <div key={target.ref} data-target-ref={target.ref}>\n <Banner\n type=\"error\"\n message={invalidLabel ? `${target.label}: ${invalidLabel}` : target.label}\n cta={[\n {\n type: 'button',\n label: 'Remove',\n action: () => {\n if (!disabled) target.onRemove();\n }\n }\n ]}\n />\n </div>\n ))}\n </fieldset>\n ) : null}\n\n {populations ? (\n <fieldset disabled={disabled} className={style.sources}>\n <Block name=\"populations\" title={populations.title} subtitle={populations.subtitle}>\n <SearchAndChipsResults\n resultsMaxHeight={236}\n results-aria-label={populations.title}\n emptyMessages={populations.emptyMessages}\n results={listedOptions.map(option => ({\n text: option.name,\n information:\n option.count === undefined || option.count === null ? '' : String(option.count),\n selected: Boolean(isSelected(option)),\n onClick: handlePopulationToggle(option.value)\n }))}\n selectAllButton={\n populationOptions.length >= 2\n ? {\n label: listedSelected\n ? populations.unselectAllLabel\n : populations.selectAllLabel,\n icon: listedSelected ? 'close' : 'add',\n disabled: disabled || listedOptions.length === 0,\n onClick: handleBulkSelection\n }\n : undefined\n }\n search={\n populationOptions.length >= 2 && populations.search\n ? {\n placeholder: populations.search.placeholder || '',\n value: populations.search.value || '',\n disabled,\n onChange: handlePopulationSearch,\n onClear: () => handlePopulationSearch('')\n }\n : undefined\n }\n />\n {showExplanation ? (\n <p id={explanationId} className={style.explanation}>\n {disabledExplanation}\n </p>\n ) : null}\n </Block>\n </fieldset>\n ) : null}\n\n {upload || individuals ? (\n <fieldset\n disabled={sourcesDisabled}\n aria-describedby={showExplanation ? explanationId : undefined}\n className={style.sources}\n data-name=\"audience-sources\"\n >\n {upload ? (\n <Block\n name=\"upload\"\n title={upload.title}\n subtitle={upload.subtitle}\n button={\n upload.templateLink\n ? {\n type: 'text',\n label: upload.templateLink.label,\n link: sourcesDisabled\n ? undefined\n : {href: upload.templateLink.href, download: true},\n disabled: sourcesDisabled,\n 'data-name': 'upload-template-link',\n customStyle: FIT_CONTENT\n }\n : undefined\n }\n >\n <div className={style.upload}>\n {upload.templatePreview ? <TemplatePreview {...upload.templatePreview} /> : null}\n <div\n className={upload.status === 'done' ? style.uploadMain : style.dropzone}\n aria-busy={loading}\n aria-live=\"polite\"\n data-name=\"upload-dropzone\"\n >\n {upload.status === 'done' ? (\n <UploadResult\n {...upload}\n onRemove={upload.onRemove ? handleCancelCheck : undefined}\n report={\n upload.report\n ? {\n ...upload.report,\n onDownload: () => {\n if (!sourcesDisabled) upload.report?.onDownload();\n }\n }\n : undefined\n }\n />\n ) : (\n <InputFileDraggable\n name=\"assignment-audience-file\"\n filesTypes={ACCEPTED_FILES}\n description={upload.dropzone?.description}\n uploadLabel={upload.dropzone?.browse}\n errorButtonLabel={upload.dropzone?.browse}\n dragAndDropLabel={upload.dropzone?.dropLabel}\n loadingLabel={upload.dropzone?.loadingLabel}\n loading={loading}\n disabled={sourcesDisabled}\n error={upload.status === 'error' ? upload.error : ''}\n onChange={handleFileChange}\n onReset={handleCancelCheck}\n />\n )}\n </div>\n </div>\n </Block>\n ) : null}\n {individuals ? (\n <Block name=\"individuals\" title={individuals.title}>\n <Autocomplete\n title={individuals.placeholder}\n theme=\"coorpmanager\"\n value={value}\n suggestions={availableSuggestions.map(learner => ({\n name: `${learner.label} · ${learner.login}`,\n value: learner.id\n }))}\n onInput={handleSearch}\n onSuggestionSelected={handleAdd}\n />\n {(selected?.length || 0) > 0 ? (\n <div className={style.chips}>\n {selected?.map((learner: Learner) => (\n <Chip\n key={learner.id}\n text={learner.label}\n subText={learner.login}\n selected\n customIcon={sourcesDisabled ? 'none' : 'times'}\n ariaLabel={\n sourcesDisabled\n ? undefined\n : chipLabel(individuals.removeLabel, learner.label)\n }\n onClick={sourcesDisabled ? undefined : handleRemove(learner.id)}\n />\n ))}\n </div>\n ) : null}\n </Block>\n ) : null}\n </fieldset>\n ) : null}\n {total ? (\n <div className={style.total} data-name=\"estimated-audience\" aria-live=\"polite\">\n <span className={style.totalLabel}>{total.label}</span>\n {total.detail ? <span className={style.muted}>{total.detail}</span> : null}\n </div>\n ) : null}\n {assigned ? (\n <div className={style.assignedCard} data-name=\"assigned-learners\">\n {assigned.notice ? (\n <div role=\"status\">\n <Banner type=\"info\" message={assigned.notice} />\n </div>\n ) : null}\n <fieldset disabled={disabled} className={style.assignedControls}>\n <Block\n name=\"assigned-header\"\n title={assigned.title}\n subtitle={assigned.subtitle}\n button={{\n label: assigned.toggleLabel,\n type: 'secondary',\n className: style.assignedButton,\n disabled,\n onClick: handleAssignedToggle\n }}\n />\n {assigned.expanded ? (\n <>\n <div className={style.assignedFilters}>\n {assigned.filters.map(filter => (\n <button\n key={filter.key}\n type=\"button\"\n aria-pressed={filter.selected}\n className={\n filter.selected ? style.assignedFilterSelected : style.assignedFilter\n }\n disabled={disabled}\n onClick={handleAssignedFilter(filter.key)}\n >\n {filter.label}\n </button>\n ))}\n </div>\n <div className={style.assignedToolbar}>\n <div className={style.assignedSearch}>\n <Search\n value={assigned.search.value}\n placeholder={assigned.search.placeholder}\n onChange={handleAssignedSearch}\n />\n </div>\n <div className={style.assignedPagination}>\n <span>{assigned.pagination.label}</span>\n <ButtonLink\n label=\"‹\"\n type=\"secondary\"\n className={style.assignedButton}\n disabled={disabled || !assigned.pagination.onPrevious}\n onClick={handleAssignedPrevious}\n />\n <ButtonLink\n label=\"›\"\n type=\"secondary\"\n className={style.assignedButton}\n disabled={disabled || !assigned.pagination.onNext}\n onClick={handleAssignedNext}\n />\n </div>\n </div>\n\n {selection?.bulkActions?.length ? (\n <div className={style.assignedSelectionBar} data-name=\"assigned-selection-bar\">\n {selection.summary ? <span>{selection.summary}</span> : null}\n {selection.bulkActions.map((action, index) => {\n const {className, color, icon} = ACTION_LOOKS[action.variant];\n return (\n <ButtonLink\n key={index}\n type=\"text\"\n label={action.label}\n content={<span>{action.label}</span>}\n className={className}\n disabled={disabled}\n onClick={handleSelectionAction(action.onClick)}\n icon={{\n position: 'left',\n faIcon: {name: icon, size: 14, color}\n }}\n />\n );\n })}\n </div>\n ) : null}\n\n {selection?.notice ? (\n <div\n className={style.assignedSelectionNotice}\n data-name=\"assigned-selection-notice\"\n >\n <span>{selection.notice.message}</span>\n {selection.notice.action ? (\n <ButtonLink\n type=\"text\"\n label={selection.notice.action.label}\n content={<span>{selection.notice.action.label}</span>}\n className={style.assignedButton}\n customStyle={FIT_CONTENT}\n disabled={disabled}\n onClick={handleSelectionAction(selection.notice.action.onClick)}\n />\n ) : null}\n </div>\n ) : null}\n {assigned.rows.length > 0 ? (\n <div className={style.assignedTable}>\n <Table\n editable={false}\n selectAll={\n selection\n ? {\n checked: pageSelected,\n disabled: pageDisabled,\n ariaLabel: translate('Select all learners on this page'),\n onChange: () => {\n if (!pageDisabled) selection.onTogglePage();\n }\n }\n : undefined\n }\n columns={[\n ...assigned.columns.map(column => ({\n title: column\n })),\n {title: ''}\n ]}\n rows={assigned.rows.map(row => ({\n id: row.id,\n select: selection\n ? {\n checked: Boolean(row.action) && selectedIds.has(row.id),\n disabled: disabled || !row.action,\n ariaLabel: row.fields[0] || row.id,\n onChange: () => {\n if (!disabled && row.action) selection.onToggleRow(row.id);\n }\n }\n : undefined,\n fields: [\n ...row.fields,\n row.action\n ? {\n // A row shows its state next to the action it allows, in every filter.\n text: row.actionText,\n action: {\n ...row.action,\n onClick: () => {\n if (!disabled) row.action?.onClick();\n }\n }\n }\n : {text: row.actionText ?? ''}\n ]\n }))}\n />\n </div>\n ) : (\n <p className={style.muted}>{assigned.emptyLabel}</p>\n )}\n {assigned.footnote ? (\n <p className={style.assignedFootnote}>{assigned.footnote}</p>\n ) : null}\n </>\n ) : null}\n </fieldset>\n </div>\n ) : null}\n </section>\n );\n};\n\nAssignmentAudience.propTypes = AssignmentAudiencePropTypes;\n\nAssignmentAudience.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nexport default AssignmentAudience;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,QAAO,OAAO;AACjD,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,OAAOC,qBAAqB,MAAM,6BAA6B;AAC/D,OAAOC,MAAM,MAAM,uBAAuB;AAC1C,OAAOC,kBAAkB,MAAM,iCAAiC;AAChE,OAAOC,YAAY,MAAM,yBAAyB;AAClD,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,MAAM,MAAM,yBAAyB;AAC5C,OAAOC,KAAK,IAAGC,YAAY,QAAO,sBAAsB;AACxD,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,QAAQ,IAAGC,uBAAuB,QAAO,qBAAqB;AAErE,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,2BAA2B,MAA0C,SAAS;AACrF,OAAOC,KAAK,MAAM,aAAa;;AAE/B;AACA,MAAMC,WAAW,GAAG;EAACC,KAAK,EAAE;AAAa,CAAC;;AAE1C;AACA,MAAMC,cAAc,GAAG,CACrB,UAAU,EACV,0BAA0B,EAC1B,mEAAmE,CACpE,CAACC,IAAI,CAAC,GAAG,CAAC;AAWX,MAAMC,KAAK,GAAGA,CAAC;EAACC,IAAI;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM;EAAEC;AAAoB,CAAC,kBAClE5B,KAAA,CAAA6B,aAAA;EAAS,aAAWL,IAAK;EAACM,SAAS,EAAEZ,KAAK,CAACa;AAAM,GAC9CN,KAAK,gBACJzB,KAAA,CAAA6B,aAAA;EAAKC,SAAS,EAAEZ,KAAK,CA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AAQ,EAAEV,GAAG,CAACuB,MAAM,EAAEQ,OAAO,CAAC,CAAC;UACtC;QACF;MACF,CAAC,GACD;QAACuE,IAAI,EAAEtG,GAAG,CAACiL,UAAU,IAAI;MAAE,CAAC;IAEpC,CAAC,CAAC;EAAE,CACL,CACE,CAAC,gBAEN5N,KAAA,CAAA6B,aAAA;IAAGC,SAAS,EAAEZ,KAAK,CAACuK;EAAM,GAAE/H,QAAQ,CAACmK,UAAc,CACpD,EACAnK,QAAQ,CAACoK,QAAQ,gBAChB9N,KAAA,CAAA6B,aAAA;IAAGC,SAAS,EAAEZ,KAAK,CAAC6M;EAAiB,GAAErK,QAAQ,CAACoK,QAAY,CAAC,GAC3D,IACJ,CAAC,GACD,IACI,CACP,CAAC,GACJ,IACG,CAAC;AAEd,CAAC;AAED9K,kBAAkB,CAACgL,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGlN,2BAA2B;AAE1D+B,kBAAkB,CAACoL,YAAY,GAAG;EAChCxK,SAAS,EAAE9C,QAAQ,CAACuN,iBAAiB,CAACzK;AACxC,CAAC;AAED,eAAeZ,kBAAkB","ignoreList":[]}
@@ -142,10 +142,22 @@
142
142
  gap: 8px;
143
143
  }
144
144
 
145
+ /* No `composes` from button-link: a cross-file composes re-emits all of button-link's CSS late in
146
+ the bundle, and that copy overrides every component that sizes a ButtonLink (Coorpmanager-wide
147
+ layout break, 2026-11-04). Declare the button look locally instead. */
145
148
  .assignedFilter {
146
- composes: button from "../../atom/button-link/style.css";
147
149
  display: inline-flex;
148
150
  width: auto;
151
+ height: 44px;
152
+ border-radius: 8px;
153
+ font-family: Gilroy;
154
+ font-size: 14px;
155
+ font-weight: bold;
156
+ justify-content: center;
157
+ align-items: center;
158
+ cursor: pointer;
159
+ padding: 12px 16px;
160
+ user-select: none;
149
161
  border: 1px solid cm_grey_200;
150
162
  background: cm_grey_50;
151
163
  color: cm_grey_700;
@@ -24,10 +24,6 @@ declare const AssignmentAudiencePropTypes: {
24
24
  title: PropTypes.Validator<string>;
25
25
  subtitle: PropTypes.Requireable<string>;
26
26
  disabledExplanation: PropTypes.Requireable<string>;
27
- team: PropTypes.Requireable<PropTypes.InferProps<{
28
- label: PropTypes.Validator<string>;
29
- name: PropTypes.Validator<string>;
30
- }>>;
31
27
  invalidTargets: PropTypes.Requireable<(PropTypes.InferProps<{
32
28
  ref: PropTypes.Validator<string>;
33
29
  label: PropTypes.Validator<string>;
@@ -36,23 +32,28 @@ declare const AssignmentAudiencePropTypes: {
36
32
  invalidLabel: PropTypes.Requireable<string>;
37
33
  error: PropTypes.Requireable<string>;
38
34
  disabled: PropTypes.Requireable<boolean>;
39
- everyone: PropTypes.Requireable<PropTypes.InferProps<{
40
- title: PropTypes.Requireable<string>;
41
- label: PropTypes.Validator<string>;
42
- value: PropTypes.Validator<boolean>;
43
- onChange: PropTypes.Validator<(...args: any[]) => any>;
44
- }>>;
45
35
  populations: PropTypes.Requireable<PropTypes.InferProps<{
46
36
  title: PropTypes.Requireable<string>;
47
37
  subtitle: PropTypes.Requireable<string>;
48
- label: PropTypes.Requireable<string>;
38
+ selectAllLabel: PropTypes.Requireable<string>;
39
+ unselectAllLabel: PropTypes.Requireable<string>;
40
+ search: PropTypes.Requireable<PropTypes.InferProps<{
41
+ placeholder: PropTypes.Requireable<string>;
42
+ value: PropTypes.Requireable<string>;
43
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
44
+ }>>;
45
+ emptyMessages: PropTypes.Requireable<PropTypes.InferProps<{
46
+ firstMessage: PropTypes.Requireable<string>;
47
+ secondMessage: PropTypes.Requireable<string>;
48
+ }>>;
49
49
  options: PropTypes.Validator<(PropTypes.InferProps<{
50
50
  name: PropTypes.Validator<string>;
51
51
  value: PropTypes.Validator<string>;
52
52
  selected: PropTypes.Validator<boolean>;
53
53
  count: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
54
+ all: PropTypes.Requireable<boolean>;
55
+ locked: PropTypes.Requireable<boolean>;
54
56
  }> | null | undefined)[]>;
55
- removeLabel: PropTypes.Requireable<string>;
56
57
  onChange: PropTypes.Validator<(...args: any[]) => any>;
57
58
  }>>;
58
59
  upload: PropTypes.Requireable<PropTypes.InferProps<{
@@ -193,6 +194,8 @@ export declare type PopulationOption = {
193
194
  value: string;
194
195
  selected: boolean;
195
196
  count?: string | number;
197
+ all?: boolean;
198
+ locked?: boolean;
196
199
  };
197
200
  export declare type Learner = {
198
201
  id: string;
@@ -258,10 +261,6 @@ export declare type AssignmentAudienceProps = {
258
261
  title: string;
259
262
  subtitle?: string;
260
263
  disabledExplanation?: string;
261
- team?: {
262
- label: string;
263
- name: string;
264
- };
265
264
  invalidTargets?: Array<{
266
265
  ref: string;
267
266
  label: string;
@@ -270,18 +269,21 @@ export declare type AssignmentAudienceProps = {
270
269
  invalidLabel?: string;
271
270
  error?: string;
272
271
  disabled?: boolean;
273
- everyone?: {
274
- title?: string;
275
- label: string;
276
- value: boolean;
277
- onChange: (value: boolean) => void;
278
- };
279
272
  populations?: {
280
273
  title?: string;
281
274
  subtitle?: string;
282
- label?: string;
275
+ selectAllLabel?: string;
276
+ unselectAllLabel?: string;
277
+ search?: {
278
+ placeholder?: string;
279
+ value?: string;
280
+ onChange?: (query: string) => void;
281
+ };
282
+ emptyMessages?: {
283
+ firstMessage?: string;
284
+ secondMessage?: string;
285
+ };
283
286
  options: PopulationOption[];
284
- removeLabel?: string;
285
287
  onChange: (selected: PopulationOption[]) => void;
286
288
  };
287
289
  upload?: UploadResultProps & {