@coorpacademy/components 11.42.4 → 11.42.6

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 (215) hide show
  1. package/es/atom/checkbox-with-title/index.d.ts +1 -0
  2. package/es/atom/checkbox-with-title/index.d.ts.map +1 -1
  3. package/es/atom/checkbox-with-title/index.js +6 -1
  4. package/es/atom/checkbox-with-title/index.js.map +1 -1
  5. package/es/atom/input-search/index.d.ts +1 -0
  6. package/es/atom/input-search/index.d.ts.map +1 -1
  7. package/es/atom/input-search/index.js +7 -2
  8. package/es/atom/input-search/index.js.map +1 -1
  9. package/es/atom/input-text/index.d.ts +1 -0
  10. package/es/atom/input-text/index.d.ts.map +1 -1
  11. package/es/atom/input-text/index.js +3 -0
  12. package/es/atom/input-text/index.js.map +1 -1
  13. package/es/atom/input-text-with-title/index.d.ts +1 -0
  14. package/es/molecule/brand-form-group/index.d.ts +1 -0
  15. package/es/molecule/brand-form-group/index.d.ts.map +1 -1
  16. package/es/molecule/brand-form-group/index.js +10 -1
  17. package/es/molecule/brand-form-group/index.js.map +1 -1
  18. package/es/molecule/cm-popin/types.d.ts +3 -0
  19. package/es/molecule/cm-popin/types.d.ts.map +1 -1
  20. package/es/molecule/course-sections/index.d.ts +1 -0
  21. package/es/molecule/drag-and-drop/index.d.ts +1 -0
  22. package/es/molecule/drag-and-drop/upload-report.d.ts +1 -0
  23. package/es/molecule/draggable-list/index.d.ts +1 -0
  24. package/es/molecule/multi-filter-panel/index.d.ts +1 -0
  25. package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
  26. package/es/molecule/multi-filter-panel/prop-types.d.ts +1 -0
  27. package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
  28. package/es/molecule/search-form/index.d.ts +1 -0
  29. package/es/molecule/title-and-checkbox-wrapper/index.d.ts +2 -0
  30. package/es/molecule/translation-modal/index.d.ts +2 -0
  31. package/es/organism/assignment-edition/index.d.ts +259 -0
  32. package/es/organism/assignment-edition/index.d.ts.map +1 -0
  33. package/es/organism/assignment-edition/index.js +116 -0
  34. package/es/organism/assignment-edition/index.js.map +1 -0
  35. package/es/organism/assignment-edition/style.css +27 -0
  36. package/es/organism/assignment-edition/types.d.ts +310 -0
  37. package/es/organism/assignment-edition/types.d.ts.map +1 -0
  38. package/es/organism/assignment-edition/types.js +53 -0
  39. package/es/organism/assignment-edition/types.js.map +1 -0
  40. package/es/organism/brand-form/index.d.ts +1 -0
  41. package/es/organism/brand-learning-priorities/index.d.ts +1 -0
  42. package/es/organism/brand-table/index.d.ts +1 -0
  43. package/es/organism/content-selection-list/index.d.ts +8 -1
  44. package/es/organism/content-selection-list/index.d.ts.map +1 -1
  45. package/es/organism/content-selection-list/index.js +15 -6
  46. package/es/organism/content-selection-list/index.js.map +1 -1
  47. package/es/organism/content-selection-list/types.d.ts +13 -0
  48. package/es/organism/content-selection-list/types.d.ts.map +1 -1
  49. package/es/organism/content-selection-list/types.js +7 -0
  50. package/es/organism/content-selection-list/types.js.map +1 -1
  51. package/es/organism/content-skill-modal/index.d.ts +15 -0
  52. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  53. package/es/organism/content-skill-modal/index.js +27 -8
  54. package/es/organism/content-skill-modal/index.js.map +1 -1
  55. package/es/organism/content-skill-modal/types.d.ts +28 -1
  56. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  57. package/es/organism/content-skill-modal/types.js +14 -1
  58. package/es/organism/content-skill-modal/types.js.map +1 -1
  59. package/es/organism/content-translation/index.d.ts +1 -0
  60. package/es/organism/filter-checkbox-and-search/index.d.ts +1 -0
  61. package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  62. package/es/organism/filter-checkbox-and-search/props-types.d.ts +1 -0
  63. package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  64. package/es/organism/icon-editor/index.d.ts +1 -0
  65. package/es/organism/icon-editor/index.d.ts.map +1 -1
  66. package/es/organism/icon-editor/types.d.ts +1 -0
  67. package/es/organism/icon-editor/types.d.ts.map +1 -1
  68. package/es/organism/list-item/index.d.ts +1 -0
  69. package/es/organism/list-items/index.d.ts +3 -0
  70. package/es/organism/mooc-header/index.d.ts +1 -0
  71. package/es/organism/mooc-header/index.d.ts.map +1 -1
  72. package/es/organism/rewards-form/index.d.ts +2 -0
  73. package/es/organism/select-opponents/index.d.ts +2 -0
  74. package/es/organism/select-opponents/index.d.ts.map +1 -1
  75. package/es/organism/select-opponents/types.d.ts +2 -0
  76. package/es/organism/select-opponents/types.d.ts.map +1 -1
  77. package/es/organism/skill-edition/index.d.ts +9 -0
  78. package/es/organism/skill-edition/index.d.ts.map +1 -1
  79. package/es/organism/skill-edition/types.d.ts +9 -0
  80. package/es/organism/skill-edition/types.d.ts.map +1 -1
  81. package/es/organism/title-and-input/index.d.ts +4 -0
  82. package/es/organism/title-and-input/index.d.ts.map +1 -1
  83. package/es/organism/title-and-input/types.d.ts +4 -0
  84. package/es/organism/title-and-input/types.d.ts.map +1 -1
  85. package/es/organism/wizard-contents/index.d.ts +5 -0
  86. package/es/template/app-player/loading/index.d.ts +3 -0
  87. package/es/template/app-player/player/index.d.ts +6 -0
  88. package/es/template/app-player/player/slides/index.d.ts +3 -0
  89. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  90. package/es/template/app-player/popin-correction/index.d.ts +3 -0
  91. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  92. package/es/template/app-player/popin-end/index.d.ts +3 -0
  93. package/es/template/app-review/index.d.ts +3 -0
  94. package/es/template/app-review/index.d.ts.map +1 -1
  95. package/es/template/app-review/player/prop-types.d.ts +3 -0
  96. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  97. package/es/template/app-review/prop-types.d.ts +3 -0
  98. package/es/template/app-review/prop-types.d.ts.map +1 -1
  99. package/es/template/back-office/brand-update/index.d.ts +288 -0
  100. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  101. package/es/template/back-office/brand-update/index.js +7 -0
  102. package/es/template/back-office/brand-update/index.js.map +1 -1
  103. package/es/template/certification-detail/index.d.ts +3 -0
  104. package/es/template/common/dashboard/index.d.ts +6 -0
  105. package/es/template/common/search-page/index.d.ts +3 -0
  106. package/es/template/external-course/index.d.ts +3 -0
  107. package/es/template/playlist-detail/index.d.ts +3 -0
  108. package/lib/atom/checkbox-with-title/index.d.ts +1 -0
  109. package/lib/atom/checkbox-with-title/index.d.ts.map +1 -1
  110. package/lib/atom/checkbox-with-title/index.js +6 -1
  111. package/lib/atom/checkbox-with-title/index.js.map +1 -1
  112. package/lib/atom/input-search/index.d.ts +1 -0
  113. package/lib/atom/input-search/index.d.ts.map +1 -1
  114. package/lib/atom/input-search/index.js +7 -2
  115. package/lib/atom/input-search/index.js.map +1 -1
  116. package/lib/atom/input-text/index.d.ts +1 -0
  117. package/lib/atom/input-text/index.d.ts.map +1 -1
  118. package/lib/atom/input-text/index.js +3 -0
  119. package/lib/atom/input-text/index.js.map +1 -1
  120. package/lib/atom/input-text-with-title/index.d.ts +1 -0
  121. package/lib/molecule/brand-form-group/index.d.ts +1 -0
  122. package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
  123. package/lib/molecule/brand-form-group/index.js +10 -1
  124. package/lib/molecule/brand-form-group/index.js.map +1 -1
  125. package/lib/molecule/cm-popin/types.d.ts +3 -0
  126. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  127. package/lib/molecule/course-sections/index.d.ts +1 -0
  128. package/lib/molecule/drag-and-drop/index.d.ts +1 -0
  129. package/lib/molecule/drag-and-drop/upload-report.d.ts +1 -0
  130. package/lib/molecule/draggable-list/index.d.ts +1 -0
  131. package/lib/molecule/multi-filter-panel/index.d.ts +1 -0
  132. package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
  133. package/lib/molecule/multi-filter-panel/prop-types.d.ts +1 -0
  134. package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
  135. package/lib/molecule/search-form/index.d.ts +1 -0
  136. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -0
  137. package/lib/molecule/translation-modal/index.d.ts +2 -0
  138. package/lib/organism/assignment-edition/index.d.ts +259 -0
  139. package/lib/organism/assignment-edition/index.d.ts.map +1 -0
  140. package/lib/organism/assignment-edition/index.js +123 -0
  141. package/lib/organism/assignment-edition/index.js.map +1 -0
  142. package/lib/organism/assignment-edition/style.css +27 -0
  143. package/lib/organism/assignment-edition/types.d.ts +310 -0
  144. package/lib/organism/assignment-edition/types.d.ts.map +1 -0
  145. package/lib/organism/assignment-edition/types.js +58 -0
  146. package/lib/organism/assignment-edition/types.js.map +1 -0
  147. package/lib/organism/brand-form/index.d.ts +1 -0
  148. package/lib/organism/brand-learning-priorities/index.d.ts +1 -0
  149. package/lib/organism/brand-table/index.d.ts +1 -0
  150. package/lib/organism/content-selection-list/index.d.ts +8 -1
  151. package/lib/organism/content-selection-list/index.d.ts.map +1 -1
  152. package/lib/organism/content-selection-list/index.js +15 -6
  153. package/lib/organism/content-selection-list/index.js.map +1 -1
  154. package/lib/organism/content-selection-list/types.d.ts +13 -0
  155. package/lib/organism/content-selection-list/types.d.ts.map +1 -1
  156. package/lib/organism/content-selection-list/types.js +7 -0
  157. package/lib/organism/content-selection-list/types.js.map +1 -1
  158. package/lib/organism/content-skill-modal/index.d.ts +15 -0
  159. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  160. package/lib/organism/content-skill-modal/index.js +27 -8
  161. package/lib/organism/content-skill-modal/index.js.map +1 -1
  162. package/lib/organism/content-skill-modal/types.d.ts +28 -1
  163. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  164. package/lib/organism/content-skill-modal/types.js +14 -1
  165. package/lib/organism/content-skill-modal/types.js.map +1 -1
  166. package/lib/organism/content-translation/index.d.ts +1 -0
  167. package/lib/organism/filter-checkbox-and-search/index.d.ts +1 -0
  168. package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  169. package/lib/organism/filter-checkbox-and-search/props-types.d.ts +1 -0
  170. package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  171. package/lib/organism/icon-editor/index.d.ts +1 -0
  172. package/lib/organism/icon-editor/index.d.ts.map +1 -1
  173. package/lib/organism/icon-editor/types.d.ts +1 -0
  174. package/lib/organism/icon-editor/types.d.ts.map +1 -1
  175. package/lib/organism/list-item/index.d.ts +1 -0
  176. package/lib/organism/list-items/index.d.ts +3 -0
  177. package/lib/organism/mooc-header/index.d.ts +1 -0
  178. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  179. package/lib/organism/rewards-form/index.d.ts +2 -0
  180. package/lib/organism/select-opponents/index.d.ts +2 -0
  181. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  182. package/lib/organism/select-opponents/types.d.ts +2 -0
  183. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  184. package/lib/organism/skill-edition/index.d.ts +9 -0
  185. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  186. package/lib/organism/skill-edition/types.d.ts +9 -0
  187. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  188. package/lib/organism/title-and-input/index.d.ts +4 -0
  189. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  190. package/lib/organism/title-and-input/types.d.ts +4 -0
  191. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  192. package/lib/organism/wizard-contents/index.d.ts +5 -0
  193. package/lib/template/app-player/loading/index.d.ts +3 -0
  194. package/lib/template/app-player/player/index.d.ts +6 -0
  195. package/lib/template/app-player/player/slides/index.d.ts +3 -0
  196. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  197. package/lib/template/app-player/popin-correction/index.d.ts +3 -0
  198. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  199. package/lib/template/app-player/popin-end/index.d.ts +3 -0
  200. package/lib/template/app-review/index.d.ts +3 -0
  201. package/lib/template/app-review/index.d.ts.map +1 -1
  202. package/lib/template/app-review/player/prop-types.d.ts +3 -0
  203. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  204. package/lib/template/app-review/prop-types.d.ts +3 -0
  205. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  206. package/lib/template/back-office/brand-update/index.d.ts +288 -0
  207. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  208. package/lib/template/back-office/brand-update/index.js +7 -0
  209. package/lib/template/back-office/brand-update/index.js.map +1 -1
  210. package/lib/template/certification-detail/index.d.ts +3 -0
  211. package/lib/template/common/dashboard/index.d.ts +6 -0
  212. package/lib/template/common/search-page/index.d.ts +3 -0
  213. package/lib/template/external-course/index.d.ts +3 -0
  214. package/lib/template/playlist-detail/index.d.ts +3 -0
  215. package/package.json +2 -2
@@ -0,0 +1,310 @@
1
+ import PropTypes from 'prop-types';
2
+ import InputText from '../../atom/input-text';
3
+ import InputDate from '../../atom/input-date';
4
+ import InputSwitch from '../../atom/input-switch';
5
+ import { RadioWithTitleProps } from '../../atom/radio-with-title/types';
6
+ import { AssignmentAudienceProps } from '../assignment-audience/types';
7
+ import { ContentPropsType } from '../content-selection-list/types';
8
+ declare type TextField = Partial<Omit<PropTypes.InferProps<typeof InputText.propTypes>, 'onChange'>> & {
9
+ type?: 'text';
10
+ onChange: (value: string) => void;
11
+ };
12
+ declare type DateField = Partial<Omit<PropTypes.InferProps<typeof InputDate.propTypes>, 'onChange'>> & {
13
+ type?: 'date';
14
+ onChange: (value: string) => void;
15
+ };
16
+ declare type ReminderSwitch = Partial<Omit<PropTypes.InferProps<typeof InputSwitch.propTypes>, 'onChange'>> & {
17
+ onChange: (value: boolean) => void;
18
+ };
19
+ declare type RuleOption = Omit<RadioWithTitleProps, 'title' | 'aria-label' | 'checked'> & {
20
+ title: {
21
+ title: string;
22
+ subtitle?: string;
23
+ };
24
+ checked?: boolean;
25
+ 'aria-label'?: string;
26
+ };
27
+ export declare type AssignmentEditionProps = {
28
+ information: {
29
+ title: string;
30
+ subtitle?: string;
31
+ error?: string;
32
+ field: TextField;
33
+ };
34
+ audience: AssignmentAudienceProps;
35
+ contents: ContentPropsType;
36
+ dates: {
37
+ title: string;
38
+ error?: string;
39
+ fields: DateField[];
40
+ rule: {
41
+ title: string;
42
+ hint?: string;
43
+ disabled?: boolean;
44
+ options: RuleOption[];
45
+ };
46
+ reminders: {
47
+ hint: string;
48
+ switches: ReminderSwitch[];
49
+ };
50
+ };
51
+ busy?: boolean;
52
+ isFetching?: boolean;
53
+ focusSection?: 'information' | 'audience' | 'contents' | 'dates';
54
+ };
55
+ export declare type AssignmentEditionPropsFixture = {
56
+ props: AssignmentEditionProps;
57
+ };
58
+ export declare const propTypes: {
59
+ information: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
60
+ title: PropTypes.Validator<string>;
61
+ subtitle: PropTypes.Requireable<string>;
62
+ error: PropTypes.Requireable<string>;
63
+ field: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
64
+ type: PropTypes.Requireable<string>;
65
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
66
+ autoFocus: PropTypes.Requireable<boolean>;
67
+ title: PropTypes.Requireable<string>;
68
+ placeholder: PropTypes.Requireable<string>;
69
+ defaultValue: PropTypes.Requireable<string>;
70
+ theme: PropTypes.Requireable<string>;
71
+ maxLength: PropTypes.Requireable<number>;
72
+ disabled: PropTypes.Requireable<boolean>;
73
+ readOnly: PropTypes.Requireable<boolean>;
74
+ value: PropTypes.Requireable<string>;
75
+ hint: PropTypes.Requireable<string>;
76
+ error: PropTypes.Requireable<string>;
77
+ description: PropTypes.Requireable<string>;
78
+ modified: PropTypes.Requireable<boolean>;
79
+ valid: PropTypes.Requireable<boolean>;
80
+ 'aria-label': PropTypes.Requireable<string>;
81
+ 'data-name': PropTypes.Requireable<string>;
82
+ inputColor: PropTypes.Requireable<boolean>;
83
+ }>>>;
84
+ }>>>;
85
+ audience: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
86
+ title: PropTypes.Validator<string>;
87
+ subtitle: PropTypes.Requireable<string>;
88
+ disabledExplanation: PropTypes.Requireable<string>;
89
+ team: PropTypes.Requireable<PropTypes.InferProps<{
90
+ label: PropTypes.Validator<string>;
91
+ name: PropTypes.Validator<string>;
92
+ }>>;
93
+ invalidTargets: PropTypes.Requireable<(PropTypes.InferProps<{
94
+ ref: PropTypes.Validator<string>;
95
+ label: PropTypes.Validator<string>;
96
+ onRemove: PropTypes.Validator<(...args: any[]) => any>;
97
+ }> | null | undefined)[]>;
98
+ invalidLabel: PropTypes.Requireable<string>;
99
+ error: PropTypes.Requireable<string>;
100
+ disabled: PropTypes.Requireable<boolean>;
101
+ everyone: PropTypes.Requireable<PropTypes.InferProps<{
102
+ title: PropTypes.Requireable<string>;
103
+ label: PropTypes.Validator<string>;
104
+ value: PropTypes.Validator<boolean>;
105
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
106
+ }>>;
107
+ populations: PropTypes.Requireable<PropTypes.InferProps<{
108
+ title: PropTypes.Requireable<string>;
109
+ subtitle: PropTypes.Requireable<string>;
110
+ label: PropTypes.Requireable<string>;
111
+ options: PropTypes.Validator<(PropTypes.InferProps<{
112
+ name: PropTypes.Validator<string>;
113
+ value: PropTypes.Validator<string>;
114
+ selected: PropTypes.Validator<boolean>;
115
+ count: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
116
+ }> | null | undefined)[]>;
117
+ removeLabel: PropTypes.Requireable<string>;
118
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
119
+ }>>;
120
+ upload: PropTypes.Requireable<PropTypes.InferProps<{
121
+ title: PropTypes.Requireable<string>;
122
+ subtitle: PropTypes.Requireable<string>;
123
+ templateLink: PropTypes.Requireable<PropTypes.InferProps<{
124
+ label: PropTypes.Requireable<string>;
125
+ href: PropTypes.Requireable<string>;
126
+ }>>;
127
+ templatePreview: PropTypes.Requireable<PropTypes.InferProps<{
128
+ header: PropTypes.Validator<string>;
129
+ rows: PropTypes.Requireable<(string | null | undefined)[]>;
130
+ }>>;
131
+ dropzone: PropTypes.Requireable<PropTypes.InferProps<{
132
+ description: PropTypes.Requireable<string>;
133
+ browse: PropTypes.Requireable<string>;
134
+ dropLabel: PropTypes.Requireable<string>;
135
+ loadingLabel: PropTypes.Requireable<string>;
136
+ }>>;
137
+ status: PropTypes.Validator<string>;
138
+ error: PropTypes.Requireable<string>;
139
+ onUpload: PropTypes.Validator<(...args: any[]) => any>;
140
+ file: PropTypes.Requireable<PropTypes.InferProps<{
141
+ name: PropTypes.Requireable<string>;
142
+ detail: PropTypes.Requireable<string>;
143
+ }>>;
144
+ summary: PropTypes.Requireable<PropTypes.InferProps<{
145
+ valid: PropTypes.Requireable<string>;
146
+ unknown: PropTypes.Requireable<string>;
147
+ ambiguous: PropTypes.Requireable<string>;
148
+ inactive: PropTypes.Requireable<string>;
149
+ }>>;
150
+ keptLabel: PropTypes.Requireable<string>;
151
+ report: PropTypes.Requireable<PropTypes.InferProps<{
152
+ label: PropTypes.Validator<string>;
153
+ onDownload: PropTypes.Validator<(...args: any[]) => any>;
154
+ }>>;
155
+ removeLabel: PropTypes.Requireable<string>;
156
+ onRemove: PropTypes.Requireable<(...args: any[]) => any>;
157
+ }>>;
158
+ individuals: PropTypes.Requireable<PropTypes.InferProps<{
159
+ title: PropTypes.Requireable<string>;
160
+ placeholder: PropTypes.Requireable<string>;
161
+ value: PropTypes.Requireable<string>;
162
+ suggestions: PropTypes.Requireable<(PropTypes.InferProps<{
163
+ id: PropTypes.Validator<string>;
164
+ label: PropTypes.Validator<string>;
165
+ login: PropTypes.Validator<string>;
166
+ }> | null | undefined)[]>;
167
+ selected: PropTypes.Requireable<(PropTypes.InferProps<{
168
+ id: PropTypes.Validator<string>;
169
+ label: PropTypes.Validator<string>;
170
+ login: PropTypes.Validator<string>;
171
+ }> | null | undefined)[]>;
172
+ removeLabel: PropTypes.Requireable<string>;
173
+ onSearch: PropTypes.Validator<(...args: any[]) => any>;
174
+ onAdd: PropTypes.Validator<(...args: any[]) => any>;
175
+ onRemove: PropTypes.Validator<(...args: any[]) => any>;
176
+ }>>;
177
+ total: PropTypes.Requireable<PropTypes.InferProps<{
178
+ label: PropTypes.Validator<string>;
179
+ detail: PropTypes.Requireable<string>;
180
+ }>>;
181
+ }>>>;
182
+ contents: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
183
+ disabled: PropTypes.Requireable<boolean>;
184
+ title: PropTypes.Validator<string>;
185
+ subtitle: PropTypes.Requireable<string>;
186
+ button: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
187
+ label: PropTypes.Validator<string>;
188
+ disabled: PropTypes.Requireable<boolean>;
189
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
190
+ }>>>;
191
+ list: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
192
+ title: PropTypes.Requireable<string>;
193
+ items: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
194
+ hidden: PropTypes.Requireable<boolean>;
195
+ hint: PropTypes.Requireable<string>;
196
+ ref: PropTypes.Validator<string>;
197
+ title: PropTypes.Validator<string>;
198
+ subtitle: PropTypes.Validator<string>;
199
+ image: PropTypes.Validator<string>;
200
+ tags: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
201
+ label: PropTypes.Validator<string>;
202
+ iconName: PropTypes.Validator<string>;
203
+ }>>>;
204
+ checkbox: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
205
+ checked: PropTypes.Validator<boolean>;
206
+ disabled: PropTypes.Requireable<boolean>;
207
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
208
+ }>>>;
209
+ deleteButton: PropTypes.Requireable<PropTypes.InferProps<{
210
+ label: PropTypes.Requireable<string>;
211
+ 'aria-label': PropTypes.Requireable<string>;
212
+ disabled: PropTypes.Requireable<boolean>;
213
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
214
+ }>>;
215
+ }>>[]>;
216
+ search: PropTypes.Requireable<PropTypes.InferProps<{
217
+ value: PropTypes.Validator<string>;
218
+ placeholder: PropTypes.Validator<string>;
219
+ disabled: PropTypes.Requireable<boolean>;
220
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
221
+ }>>;
222
+ emptyResult: PropTypes.Requireable<PropTypes.InferProps<{
223
+ title: PropTypes.Validator<string>;
224
+ description: PropTypes.Validator<string>;
225
+ }>>;
226
+ checkbox: PropTypes.Requireable<PropTypes.InferProps<{
227
+ title: PropTypes.Validator<string>;
228
+ checked: PropTypes.Validator<boolean>;
229
+ disabled: PropTypes.Requireable<boolean>;
230
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
231
+ }>>;
232
+ }>>>;
233
+ error: PropTypes.Requireable<string>;
234
+ hiddenLabel: PropTypes.Requireable<string>;
235
+ isFetching: PropTypes.Requireable<boolean>;
236
+ actionButtons: PropTypes.Requireable<(object | null | undefined)[]>;
237
+ checkboxWithTitle: PropTypes.Requireable<PropTypes.InferProps<{
238
+ title: PropTypes.Requireable<string>;
239
+ checked: PropTypes.Requireable<boolean>;
240
+ disabled: PropTypes.Requireable<boolean>;
241
+ onChange: PropTypes.Requireable<(...args: any[]) => any>;
242
+ }>>;
243
+ readOnly: PropTypes.Requireable<boolean>;
244
+ }>>>;
245
+ dates: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
246
+ title: PropTypes.Validator<string>;
247
+ error: PropTypes.Requireable<string>;
248
+ fields: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
249
+ type: PropTypes.Requireable<string>;
250
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
251
+ title: PropTypes.Requireable<string>;
252
+ name: PropTypes.Requireable<string>;
253
+ value: PropTypes.Requireable<string>;
254
+ min: PropTypes.Requireable<string>;
255
+ max: PropTypes.Requireable<string>;
256
+ error: PropTypes.Requireable<string>;
257
+ hint: PropTypes.Requireable<string>;
258
+ disabled: PropTypes.Requireable<boolean>;
259
+ required: PropTypes.Requireable<boolean>;
260
+ modified: PropTypes.Requireable<boolean>;
261
+ suffix: PropTypes.Requireable<string>;
262
+ theme: PropTypes.Requireable<string>;
263
+ }>>[]>;
264
+ rule: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
265
+ title: PropTypes.Validator<string>;
266
+ hint: PropTypes.Requireable<string>;
267
+ disabled: PropTypes.Requireable<boolean>;
268
+ options: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
269
+ title: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
270
+ title: PropTypes.Validator<string>;
271
+ subtitle: PropTypes.Requireable<string>;
272
+ }>>>;
273
+ name: PropTypes.Requireable<string>;
274
+ checked: PropTypes.Requireable<boolean>;
275
+ disabled: PropTypes.Requireable<boolean>;
276
+ example: PropTypes.Requireable<string>;
277
+ hint: PropTypes.Requireable<string>;
278
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
279
+ 'aria-label': PropTypes.Requireable<string>;
280
+ 'data-name': PropTypes.Requireable<string>;
281
+ }>>[]>;
282
+ }>>>;
283
+ reminders: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
284
+ hint: PropTypes.Validator<string>;
285
+ switches: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
286
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
287
+ title: PropTypes.Requireable<string>;
288
+ name: PropTypes.Requireable<string>;
289
+ id: PropTypes.Requireable<string>;
290
+ value: PropTypes.Requireable<boolean>;
291
+ disabled: PropTypes.Requireable<boolean>;
292
+ description: PropTypes.Requireable<string>;
293
+ 'aria-labelledby': PropTypes.Requireable<string>;
294
+ 'aria-label': PropTypes.Requireable<string>;
295
+ modified: PropTypes.Requireable<boolean>;
296
+ titlePosition: PropTypes.Requireable<string>;
297
+ theme: PropTypes.Requireable<string>;
298
+ details: PropTypes.Requireable<string>;
299
+ 'data-name': PropTypes.Requireable<string>;
300
+ requiredSelection: PropTypes.Requireable<boolean>;
301
+ icon: PropTypes.Requireable<string>;
302
+ }>>[]>;
303
+ }>>>;
304
+ }>>>;
305
+ busy: PropTypes.Requireable<boolean>;
306
+ isFetching: PropTypes.Requireable<boolean>;
307
+ focusSection: PropTypes.Requireable<string>;
308
+ };
309
+ export {};
310
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDrB,CAAC"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.propTypes = void 0;
5
+ var _propTypes = _interopRequireDefault(require("prop-types"));
6
+ var _inputText = _interopRequireDefault(require("../../atom/input-text"));
7
+ var _inputDate = _interopRequireDefault(require("../../atom/input-date"));
8
+ var _inputSwitch = _interopRequireDefault(require("../../atom/input-switch"));
9
+ var _types = require("../../atom/radio-with-title/types");
10
+ var _types2 = _interopRequireDefault(require("../assignment-audience/types"));
11
+ var _types3 = require("../content-selection-list/types");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const propTypes = exports.propTypes = {
14
+ information: _propTypes.default.shape({
15
+ title: _propTypes.default.string.isRequired,
16
+ subtitle: _propTypes.default.string,
17
+ error: _propTypes.default.string,
18
+ field: _propTypes.default.shape({
19
+ ..._inputText.default.propTypes,
20
+ type: _propTypes.default.oneOf(['text']),
21
+ onChange: _propTypes.default.func.isRequired
22
+ }).isRequired
23
+ }).isRequired,
24
+ audience: _propTypes.default.shape(_types2.default).isRequired,
25
+ contents: _propTypes.default.shape(_types3.ContentSelectionListPropTypes).isRequired,
26
+ dates: _propTypes.default.shape({
27
+ title: _propTypes.default.string.isRequired,
28
+ error: _propTypes.default.string,
29
+ fields: _propTypes.default.arrayOf(_propTypes.default.shape({
30
+ ..._inputDate.default.propTypes,
31
+ type: _propTypes.default.oneOf(['date']),
32
+ onChange: _propTypes.default.func.isRequired
33
+ }).isRequired).isRequired,
34
+ rule: _propTypes.default.shape({
35
+ title: _propTypes.default.string.isRequired,
36
+ hint: _propTypes.default.string,
37
+ disabled: _propTypes.default.bool,
38
+ options: _propTypes.default.arrayOf(_propTypes.default.shape({
39
+ ..._types.propTypes,
40
+ title: _propTypes.default.shape({
41
+ title: _propTypes.default.string.isRequired,
42
+ subtitle: _propTypes.default.string
43
+ }).isRequired
44
+ }).isRequired).isRequired
45
+ }).isRequired,
46
+ reminders: _propTypes.default.shape({
47
+ hint: _propTypes.default.string.isRequired,
48
+ switches: _propTypes.default.arrayOf(_propTypes.default.shape({
49
+ ..._inputSwitch.default.propTypes,
50
+ onChange: _propTypes.default.func.isRequired
51
+ }).isRequired).isRequired
52
+ }).isRequired
53
+ }).isRequired,
54
+ busy: _propTypes.default.bool,
55
+ isFetching: _propTypes.default.bool,
56
+ focusSection: _propTypes.default.oneOf(['information', 'audience', 'contents', 'dates'])
57
+ };
58
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_inputText","_inputDate","_inputSwitch","_types","_types2","_types3","e","__esModule","default","propTypes","exports","information","PropTypes","shape","title","string","isRequired","subtitle","error","field","InputText","type","oneOf","onChange","func","audience","AssignmentAudiencePropTypes","contents","ContentSelectionListPropTypes","dates","fields","arrayOf","InputDate","rule","hint","disabled","bool","options","radioPropTypes","reminders","switches","InputSwitch","busy","isFetching","focusSection"],"sources":["../../../src/organism/assignment-edition/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport InputText from '../../atom/input-text';\nimport InputDate from '../../atom/input-date';\nimport InputSwitch from '../../atom/input-switch';\nimport {propTypes as radioPropTypes, RadioWithTitleProps} from '../../atom/radio-with-title/types';\nimport AssignmentAudiencePropTypes, {AssignmentAudienceProps} from '../assignment-audience/types';\nimport {ContentPropsType, ContentSelectionListPropTypes} from '../content-selection-list/types';\n\ntype TextField = Partial<Omit<PropTypes.InferProps<typeof InputText.propTypes>, 'onChange'>> & {\n type?: 'text';\n onChange: (value: string) => void;\n};\ntype DateField = Partial<Omit<PropTypes.InferProps<typeof InputDate.propTypes>, 'onChange'>> & {\n type?: 'date';\n onChange: (value: string) => void;\n};\ntype ReminderSwitch = Partial<\n Omit<PropTypes.InferProps<typeof InputSwitch.propTypes>, 'onChange'>\n> & {\n onChange: (value: boolean) => void;\n};\ntype RuleOption = Omit<RadioWithTitleProps, 'title' | 'aria-label' | 'checked'> & {\n title: {title: string; subtitle?: string};\n checked?: boolean;\n 'aria-label'?: string;\n};\n\nexport type AssignmentEditionProps = {\n information: {\n title: string;\n subtitle?: string;\n error?: string;\n field: TextField;\n };\n audience: AssignmentAudienceProps;\n contents: ContentPropsType;\n dates: {\n title: string;\n error?: string;\n fields: DateField[];\n rule: {\n title: string;\n hint?: string;\n disabled?: boolean;\n options: RuleOption[];\n };\n reminders: {hint: string; switches: ReminderSwitch[]};\n };\n busy?: boolean;\n isFetching?: boolean;\n focusSection?: 'information' | 'audience' | 'contents' | 'dates';\n};\nexport type AssignmentEditionPropsFixture = {props: AssignmentEditionProps};\n\nexport const propTypes = {\n information: PropTypes.shape({\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string,\n error: PropTypes.string,\n field: PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n onChange: PropTypes.func.isRequired\n }).isRequired\n }).isRequired,\n audience: PropTypes.shape(AssignmentAudiencePropTypes).isRequired,\n contents: PropTypes.shape(ContentSelectionListPropTypes).isRequired,\n dates: PropTypes.shape({\n title: PropTypes.string.isRequired,\n error: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.shape({\n ...InputDate.propTypes,\n type: PropTypes.oneOf(['date']),\n onChange: PropTypes.func.isRequired\n }).isRequired\n ).isRequired,\n rule: PropTypes.shape({\n title: PropTypes.string.isRequired,\n hint: PropTypes.string,\n disabled: PropTypes.bool,\n options: PropTypes.arrayOf(\n PropTypes.shape({\n ...radioPropTypes,\n title: PropTypes.shape({\n title: PropTypes.string.isRequired,\n subtitle: PropTypes.string\n }).isRequired\n }).isRequired\n ).isRequired\n }).isRequired,\n reminders: PropTypes.shape({\n hint: PropTypes.string.isRequired,\n switches: PropTypes.arrayOf(\n PropTypes.shape({\n ...InputSwitch.propTypes,\n onChange: PropTypes.func.isRequired\n }).isRequired\n ).isRequired\n }).isRequired\n }).isRequired,\n busy: PropTypes.bool,\n isFetching: PropTypes.bool,\n focusSection: PropTypes.oneOf(['information', 'audience', 'contents', 'dates'])\n};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAAgG,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAgDzF,MAAMG,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG;EACvBE,WAAW,EAAEC,kBAAS,CAACC,KAAK,CAAC;IAC3BC,KAAK,EAAEF,kBAAS,CAACG,MAAM,CAACC,UAAU;IAClCC,QAAQ,EAAEL,kBAAS,CAACG,MAAM;IAC1BG,KAAK,EAAEN,kBAAS,CAACG,MAAM;IACvBI,KAAK,EAAEP,kBAAS,CAACC,KAAK,CAAC;MACrB,GAAGO,kBAAS,CAACX,SAAS;MACtBY,IAAI,EAAET,kBAAS,CAACU,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;MAC/BC,QAAQ,EAAEX,kBAAS,CAACY,IAAI,CAACR;IAC3B,CAAC,CAAC,CAACA;EACL,CAAC,CAAC,CAACA,UAAU;EACbS,QAAQ,EAAEb,kBAAS,CAACC,KAAK,CAACa,eAA2B,CAAC,CAACV,UAAU;EACjEW,QAAQ,EAAEf,kBAAS,CAACC,KAAK,CAACe,qCAA6B,CAAC,CAACZ,UAAU;EACnEa,KAAK,EAAEjB,kBAAS,CAACC,KAAK,CAAC;IACrBC,KAAK,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9B,kBAAS,CAACwB,IAAI;EACpBO,UAAU,EAAE/B,kBAAS,CAACwB,IAAI;EAC1BQ,YAAY,EAAEhC,kBAAS,CAACU,KAAK,CAAC,CAAC,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC;AAChF,CAAC","ignoreList":[]}
@@ -33,6 +33,7 @@ declare namespace BrandForm {
33
33
  namespace propTypes {
34
34
  export const groups: PropTypes.Validator<(PropTypes.InferProps<{
35
35
  title: PropTypes.Requireable<string>;
36
+ error: PropTypes.Requireable<string>;
36
37
  subtitle: PropTypes.Requireable<string>;
37
38
  titleSize: PropTypes.Requireable<string>;
38
39
  subtitleSize: PropTypes.Requireable<string>;
@@ -96,6 +96,7 @@ declare namespace BrandLearningPriorities {
96
96
  title: PropTypes.Requireable<string>;
97
97
  name: PropTypes.Requireable<string>;
98
98
  checked: PropTypes.Requireable<boolean>;
99
+ disabled: PropTypes.Requireable<boolean>;
99
100
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
100
101
  'aria-label': PropTypes.Requireable<string>;
101
102
  'data-name': PropTypes.Requireable<string>;
@@ -4,6 +4,7 @@ declare namespace BrandTable {
4
4
  namespace propTypes {
5
5
  const search: PropTypes.Requireable<PropTypes.InferProps<{
6
6
  value: PropTypes.Requireable<string>;
7
+ disabled: PropTypes.Requireable<boolean>;
7
8
  placeholder: PropTypes.Validator<string>;
8
9
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
9
10
  onClear: PropTypes.Requireable<(...args: any[]) => any>;
@@ -33,12 +33,14 @@ export declare const buildButtonProps: (button: {
33
33
  disabled?: boolean | undefined;
34
34
  };
35
35
  declare const ContentSelectionList: {
36
- ({ title, subtitle, button, list: { title: listTitle, items, search, emptyResult }, actionButtons, checkboxWithTitle: checkboxWithTitleProps, readOnly, isFetching, error, hiddenLabel }: ContentPropsType): JSX.Element;
36
+ ({ title, subtitle, button, list: { title: listTitle, items, search, emptyResult }, actionButtons, checkboxWithTitle: checkboxWithTitleProps, readOnly, disabled, isFetching, error, hiddenLabel }: ContentPropsType): JSX.Element;
37
37
  propTypes: {
38
+ disabled: import("prop-types").Requireable<boolean>;
38
39
  title: import("prop-types").Validator<string>;
39
40
  subtitle: import("prop-types").Requireable<string>;
40
41
  button: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
41
42
  label: import("prop-types").Validator<string>;
43
+ disabled: import("prop-types").Requireable<boolean>;
42
44
  onClick: import("prop-types").Validator<(...args: any[]) => any>;
43
45
  }>>>;
44
46
  list: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
@@ -56,17 +58,20 @@ declare const ContentSelectionList: {
56
58
  }>>>;
57
59
  checkbox: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
58
60
  checked: import("prop-types").Validator<boolean>;
61
+ disabled: import("prop-types").Requireable<boolean>;
59
62
  onChange: import("prop-types").Validator<(...args: any[]) => any>;
60
63
  }>>>;
61
64
  deleteButton: import("prop-types").Requireable<import("prop-types").InferProps<{
62
65
  label: import("prop-types").Requireable<string>;
63
66
  'aria-label': import("prop-types").Requireable<string>;
67
+ disabled: import("prop-types").Requireable<boolean>;
64
68
  onClick: import("prop-types").Requireable<(...args: any[]) => any>;
65
69
  }>>;
66
70
  }>>[]>;
67
71
  search: import("prop-types").Requireable<import("prop-types").InferProps<{
68
72
  value: import("prop-types").Validator<string>;
69
73
  placeholder: import("prop-types").Validator<string>;
74
+ disabled: import("prop-types").Requireable<boolean>;
70
75
  onChange: import("prop-types").Validator<(...args: any[]) => any>;
71
76
  }>>;
72
77
  emptyResult: import("prop-types").Requireable<import("prop-types").InferProps<{
@@ -76,6 +81,7 @@ declare const ContentSelectionList: {
76
81
  checkbox: import("prop-types").Requireable<import("prop-types").InferProps<{
77
82
  title: import("prop-types").Validator<string>;
78
83
  checked: import("prop-types").Validator<boolean>;
84
+ disabled: import("prop-types").Requireable<boolean>;
79
85
  onChange: import("prop-types").Validator<(...args: any[]) => any>;
80
86
  }>>;
81
87
  }>>>;
@@ -86,6 +92,7 @@ declare const ContentSelectionList: {
86
92
  checkboxWithTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
87
93
  title: import("prop-types").Requireable<string>;
88
94
  checked: import("prop-types").Requireable<boolean>;
95
+ disabled: import("prop-types").Requireable<boolean>;
89
96
  onChange: import("prop-types").Requireable<(...args: any[]) => any>;
90
97
  }>>;
91
98
  readOnly: import("prop-types").Requireable<boolean>;
@@ -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;AA+DH,QAAA,MAAM,oBAAoB;8LAWvB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiElB,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;AAgEH,QAAA,MAAM,oBAAoB;wMAYvB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkElB,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
@@ -41,7 +41,7 @@ const buildButtonProps = button => ({
41
41
  }
42
42
  });
43
43
  exports.buildButtonProps = buildButtonProps;
44
- const buildContentItem = (readOnly, hiddenLabel) => ({
44
+ const buildContentItem = (readOnly, hiddenLabel, disabled = false) => ({
45
45
  ref,
46
46
  title,
47
47
  subtitle,
@@ -59,6 +59,7 @@ const buildContentItem = (readOnly, hiddenLabel) => ({
59
59
  ...(readOnly ? {} : {
60
60
  secondButtonLink: {
61
61
  ...deleteButton,
62
+ disabled: disabled || deleteButton?.disabled,
62
63
  'data-name': `button-${deleteButton?.label}`,
63
64
  type: 'primary',
64
65
  customStyle: {
@@ -98,7 +99,10 @@ const buildContentItem = (readOnly, hiddenLabel) => ({
98
99
  position: 'left'
99
100
  }
100
101
  }],
101
- checkbox: readOnly ? undefined : checkbox
102
+ checkbox: readOnly ? undefined : {
103
+ ...checkbox,
104
+ disabled: disabled || checkbox.disabled
105
+ }
102
106
  };
103
107
  };
104
108
  const ContentSelectionList = ({
@@ -114,11 +118,15 @@ const ContentSelectionList = ({
114
118
  actionButtons,
115
119
  checkboxWithTitle: checkboxWithTitleProps,
116
120
  readOnly = false,
121
+ disabled = false,
117
122
  isFetching = false,
118
123
  error,
119
124
  hiddenLabel
120
125
  }) => {
121
- const buttonProps = buildButtonProps(button);
126
+ const buttonProps = buildButtonProps({
127
+ ...button,
128
+ disabled: disabled || button.disabled
129
+ });
122
130
  const titleProps = {
123
131
  type: 'form-group',
124
132
  title,
@@ -136,17 +144,17 @@ const ContentSelectionList = ({
136
144
  button: buttonProps
137
145
  }
138
146
  }),
139
- items: (0, _map2.default)(buildContentItem(readOnly, hiddenLabel), items),
147
+ items: (0, _map2.default)(buildContentItem(readOnly, hiddenLabel, disabled), items),
140
148
  type: 'list'
141
149
  },
142
150
  search: search ? {
143
151
  ...search,
144
152
  theme: 'coorpmanager',
145
- // Keep search interactive even in readOnly mode
146
- disabled: false
153
+ disabled: disabled || search.disabled
147
154
  } : undefined,
148
155
  actionButtons: readOnly ? [] : (0, _map2.default)(actionButton => ({
149
156
  ...actionButton,
157
+ disabled: disabled || actionButton.disabled,
150
158
  customStyle: {
151
159
  fontWeight: '600',
152
160
  borderRadius: '12px',
@@ -155,6 +163,7 @@ const ContentSelectionList = ({
155
163
  }), actionButtons),
156
164
  checkboxWithTitle: readOnly ? undefined : {
157
165
  ...checkboxWithTitleProps,
166
+ disabled: disabled || checkboxWithTitleProps?.disabled,
158
167
  name: checkboxWithTitleProps?.title,
159
168
  'aria-label': checkboxWithTitleProps?.title,
160
169
  'data-name': checkboxWithTitleProps?.title,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_classnames","_listItems","_title","_notification","_colors","_styles","_style","_types","e","__esModule","default","buildButtonProps","button","type","label","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","exports","buildContentItem","readOnly","hiddenLabel","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","_isEmpty2","_map2","theme","disabled","actionButton","className","style","iconColor","createElement","classnames","contentContainer","role","message","propTypes","process","env","NODE_ENV","ContentSelectionListPropTypes","_default"],"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) =>\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 '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\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 isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps(button);\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), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n // Keep search interactive even in readOnly mode\n disabled: false\n }\n : undefined,\n actionButtons: readOnly\n ? []\n : map(\n actionButton => ({\n ...actionButton,\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 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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAA6F,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAA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EAACC,wBAAgB,EAAEJ,cAAK,CAACrB,IAAI;EAAE,gBACvD7D,MAAA,CAAAa,OAAA,CAAAuE,aAAA,CAAC/E,MAAA,CAAAQ,OAAK,EAAK2D,UAAa,CAAC,EACxBF,KAAK,gBACJtE,MAAA,CAAAa,OAAA,CAAAuE,aAAA;IAAKG,IAAI,EAAC;EAAO,gBACfvF,MAAA,CAAAa,OAAA,CAAAuE,aAAA,CAAC9E,aAAA,CAAAO,OAAY;IAACG,IAAI,EAAC,OAAO;IAACwE,OAAO,EAAElB;EAAM,CAAE,CACzC,CAAC,GACJ,IAAI,eACRtE,MAAA,CAAAa,OAAA,CAAAuE,aAAA,CAAChF,UAAA,CAAAS,OAAS,EAAK6D,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDd,oBAAoB,CAAC6B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGC,oCAA6B;AAAC,IAAAC,QAAA,GAAA1D,OAAA,CAAAvB,OAAA,GAEhD+C,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_classnames","_listItems","_title","_notification","_colors","_styles","_style","_types","e","__esModule","default","buildButtonProps","button","type","label","hoverBackgroundColor","COLORS","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","exports","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","_isEmpty2","_map2","theme","actionButton","className","style","iconColor","createElement","classnames","contentContainer","role","message","propTypes","process","env","NODE_ENV","ContentSelectionListPropTypes","_default"],"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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,UAAA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