@coorpacademy/components 11.42.4 → 11.42.5

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 (207) 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 +4 -0
  52. package/es/organism/content-skill-modal/index.d.ts.map +1 -1
  53. package/es/organism/content-skill-modal/types.d.ts +4 -0
  54. package/es/organism/content-skill-modal/types.d.ts.map +1 -1
  55. package/es/organism/content-translation/index.d.ts +1 -0
  56. package/es/organism/filter-checkbox-and-search/index.d.ts +1 -0
  57. package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  58. package/es/organism/filter-checkbox-and-search/props-types.d.ts +1 -0
  59. package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  60. package/es/organism/icon-editor/index.d.ts +1 -0
  61. package/es/organism/icon-editor/index.d.ts.map +1 -1
  62. package/es/organism/icon-editor/types.d.ts +1 -0
  63. package/es/organism/icon-editor/types.d.ts.map +1 -1
  64. package/es/organism/list-item/index.d.ts +1 -0
  65. package/es/organism/list-items/index.d.ts +3 -0
  66. package/es/organism/mooc-header/index.d.ts +1 -0
  67. package/es/organism/mooc-header/index.d.ts.map +1 -1
  68. package/es/organism/rewards-form/index.d.ts +2 -0
  69. package/es/organism/select-opponents/index.d.ts +2 -0
  70. package/es/organism/select-opponents/index.d.ts.map +1 -1
  71. package/es/organism/select-opponents/types.d.ts +2 -0
  72. package/es/organism/select-opponents/types.d.ts.map +1 -1
  73. package/es/organism/skill-edition/index.d.ts +9 -0
  74. package/es/organism/skill-edition/index.d.ts.map +1 -1
  75. package/es/organism/skill-edition/types.d.ts +9 -0
  76. package/es/organism/skill-edition/types.d.ts.map +1 -1
  77. package/es/organism/title-and-input/index.d.ts +4 -0
  78. package/es/organism/title-and-input/index.d.ts.map +1 -1
  79. package/es/organism/title-and-input/types.d.ts +4 -0
  80. package/es/organism/title-and-input/types.d.ts.map +1 -1
  81. package/es/organism/wizard-contents/index.d.ts +5 -0
  82. package/es/template/app-player/loading/index.d.ts +3 -0
  83. package/es/template/app-player/player/index.d.ts +6 -0
  84. package/es/template/app-player/player/slides/index.d.ts +3 -0
  85. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  86. package/es/template/app-player/popin-correction/index.d.ts +3 -0
  87. package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
  88. package/es/template/app-player/popin-end/index.d.ts +3 -0
  89. package/es/template/app-review/index.d.ts +3 -0
  90. package/es/template/app-review/index.d.ts.map +1 -1
  91. package/es/template/app-review/player/prop-types.d.ts +3 -0
  92. package/es/template/app-review/player/prop-types.d.ts.map +1 -1
  93. package/es/template/app-review/prop-types.d.ts +3 -0
  94. package/es/template/app-review/prop-types.d.ts.map +1 -1
  95. package/es/template/back-office/brand-update/index.d.ts +277 -0
  96. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  97. package/es/template/back-office/brand-update/index.js +7 -0
  98. package/es/template/back-office/brand-update/index.js.map +1 -1
  99. package/es/template/certification-detail/index.d.ts +3 -0
  100. package/es/template/common/dashboard/index.d.ts +6 -0
  101. package/es/template/common/search-page/index.d.ts +3 -0
  102. package/es/template/external-course/index.d.ts +3 -0
  103. package/es/template/playlist-detail/index.d.ts +3 -0
  104. package/lib/atom/checkbox-with-title/index.d.ts +1 -0
  105. package/lib/atom/checkbox-with-title/index.d.ts.map +1 -1
  106. package/lib/atom/checkbox-with-title/index.js +6 -1
  107. package/lib/atom/checkbox-with-title/index.js.map +1 -1
  108. package/lib/atom/input-search/index.d.ts +1 -0
  109. package/lib/atom/input-search/index.d.ts.map +1 -1
  110. package/lib/atom/input-search/index.js +7 -2
  111. package/lib/atom/input-search/index.js.map +1 -1
  112. package/lib/atom/input-text/index.d.ts +1 -0
  113. package/lib/atom/input-text/index.d.ts.map +1 -1
  114. package/lib/atom/input-text/index.js +3 -0
  115. package/lib/atom/input-text/index.js.map +1 -1
  116. package/lib/atom/input-text-with-title/index.d.ts +1 -0
  117. package/lib/molecule/brand-form-group/index.d.ts +1 -0
  118. package/lib/molecule/brand-form-group/index.d.ts.map +1 -1
  119. package/lib/molecule/brand-form-group/index.js +10 -1
  120. package/lib/molecule/brand-form-group/index.js.map +1 -1
  121. package/lib/molecule/cm-popin/types.d.ts +3 -0
  122. package/lib/molecule/cm-popin/types.d.ts.map +1 -1
  123. package/lib/molecule/course-sections/index.d.ts +1 -0
  124. package/lib/molecule/drag-and-drop/index.d.ts +1 -0
  125. package/lib/molecule/drag-and-drop/upload-report.d.ts +1 -0
  126. package/lib/molecule/draggable-list/index.d.ts +1 -0
  127. package/lib/molecule/multi-filter-panel/index.d.ts +1 -0
  128. package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
  129. package/lib/molecule/multi-filter-panel/prop-types.d.ts +1 -0
  130. package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
  131. package/lib/molecule/search-form/index.d.ts +1 -0
  132. package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +2 -0
  133. package/lib/molecule/translation-modal/index.d.ts +2 -0
  134. package/lib/organism/assignment-edition/index.d.ts +259 -0
  135. package/lib/organism/assignment-edition/index.d.ts.map +1 -0
  136. package/lib/organism/assignment-edition/index.js +123 -0
  137. package/lib/organism/assignment-edition/index.js.map +1 -0
  138. package/lib/organism/assignment-edition/style.css +27 -0
  139. package/lib/organism/assignment-edition/types.d.ts +310 -0
  140. package/lib/organism/assignment-edition/types.d.ts.map +1 -0
  141. package/lib/organism/assignment-edition/types.js +58 -0
  142. package/lib/organism/assignment-edition/types.js.map +1 -0
  143. package/lib/organism/brand-form/index.d.ts +1 -0
  144. package/lib/organism/brand-learning-priorities/index.d.ts +1 -0
  145. package/lib/organism/brand-table/index.d.ts +1 -0
  146. package/lib/organism/content-selection-list/index.d.ts +8 -1
  147. package/lib/organism/content-selection-list/index.d.ts.map +1 -1
  148. package/lib/organism/content-selection-list/index.js +15 -6
  149. package/lib/organism/content-selection-list/index.js.map +1 -1
  150. package/lib/organism/content-selection-list/types.d.ts +13 -0
  151. package/lib/organism/content-selection-list/types.d.ts.map +1 -1
  152. package/lib/organism/content-selection-list/types.js +7 -0
  153. package/lib/organism/content-selection-list/types.js.map +1 -1
  154. package/lib/organism/content-skill-modal/index.d.ts +4 -0
  155. package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
  156. package/lib/organism/content-skill-modal/types.d.ts +4 -0
  157. package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
  158. package/lib/organism/content-translation/index.d.ts +1 -0
  159. package/lib/organism/filter-checkbox-and-search/index.d.ts +1 -0
  160. package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
  161. package/lib/organism/filter-checkbox-and-search/props-types.d.ts +1 -0
  162. package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
  163. package/lib/organism/icon-editor/index.d.ts +1 -0
  164. package/lib/organism/icon-editor/index.d.ts.map +1 -1
  165. package/lib/organism/icon-editor/types.d.ts +1 -0
  166. package/lib/organism/icon-editor/types.d.ts.map +1 -1
  167. package/lib/organism/list-item/index.d.ts +1 -0
  168. package/lib/organism/list-items/index.d.ts +3 -0
  169. package/lib/organism/mooc-header/index.d.ts +1 -0
  170. package/lib/organism/mooc-header/index.d.ts.map +1 -1
  171. package/lib/organism/rewards-form/index.d.ts +2 -0
  172. package/lib/organism/select-opponents/index.d.ts +2 -0
  173. package/lib/organism/select-opponents/index.d.ts.map +1 -1
  174. package/lib/organism/select-opponents/types.d.ts +2 -0
  175. package/lib/organism/select-opponents/types.d.ts.map +1 -1
  176. package/lib/organism/skill-edition/index.d.ts +9 -0
  177. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  178. package/lib/organism/skill-edition/types.d.ts +9 -0
  179. package/lib/organism/skill-edition/types.d.ts.map +1 -1
  180. package/lib/organism/title-and-input/index.d.ts +4 -0
  181. package/lib/organism/title-and-input/index.d.ts.map +1 -1
  182. package/lib/organism/title-and-input/types.d.ts +4 -0
  183. package/lib/organism/title-and-input/types.d.ts.map +1 -1
  184. package/lib/organism/wizard-contents/index.d.ts +5 -0
  185. package/lib/template/app-player/loading/index.d.ts +3 -0
  186. package/lib/template/app-player/player/index.d.ts +6 -0
  187. package/lib/template/app-player/player/slides/index.d.ts +3 -0
  188. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  189. package/lib/template/app-player/popin-correction/index.d.ts +3 -0
  190. package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
  191. package/lib/template/app-player/popin-end/index.d.ts +3 -0
  192. package/lib/template/app-review/index.d.ts +3 -0
  193. package/lib/template/app-review/index.d.ts.map +1 -1
  194. package/lib/template/app-review/player/prop-types.d.ts +3 -0
  195. package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
  196. package/lib/template/app-review/prop-types.d.ts +3 -0
  197. package/lib/template/app-review/prop-types.d.ts.map +1 -1
  198. package/lib/template/back-office/brand-update/index.d.ts +277 -0
  199. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  200. package/lib/template/back-office/brand-update/index.js +7 -0
  201. package/lib/template/back-office/brand-update/index.js.map +1 -1
  202. package/lib/template/certification-detail/index.d.ts +3 -0
  203. package/lib/template/common/dashboard/index.d.ts +6 -0
  204. package/lib/template/common/search-page/index.d.ts +3 -0
  205. package/lib/template/external-course/index.d.ts +3 -0
  206. package/lib/template/playlist-detail/index.d.ts +3 -0
  207. 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 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/assignment-edition/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAA8B,mBAAmB,EAAC,MA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AC;QACf,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,QAAQ,EAAE,uBAAuB,CAAC;IAClC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,SAAS,EAAE,CAAC;QACpB,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,OAAO,EAAE,UAAU,EAAE,CAAC;SACvB,CAAC;QACF,SAAS,EAAE;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,cAAc,EAAE,CAAA;SAAC,CAAC;KACvD,CAAC;IACF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;CAClE,CAAC;AACF,oBAAY,6BAA6B,GAAG;IAAC,KAAK,EAAE,sBAAsB,CAAA;CAAC,CAAC;AAE5E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDrB,CAAC"}
@@ -0,0 +1,53 @@
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 { propTypes as radioPropTypes } from '../../atom/radio-with-title/types';
6
+ import AssignmentAudiencePropTypes from '../assignment-audience/types';
7
+ import { ContentSelectionListPropTypes } from '../content-selection-list/types';
8
+ export const propTypes = {
9
+ information: PropTypes.shape({
10
+ title: PropTypes.string.isRequired,
11
+ subtitle: PropTypes.string,
12
+ error: PropTypes.string,
13
+ field: PropTypes.shape({
14
+ ...InputText.propTypes,
15
+ type: PropTypes.oneOf(['text']),
16
+ onChange: PropTypes.func.isRequired
17
+ }).isRequired
18
+ }).isRequired,
19
+ audience: PropTypes.shape(AssignmentAudiencePropTypes).isRequired,
20
+ contents: PropTypes.shape(ContentSelectionListPropTypes).isRequired,
21
+ dates: PropTypes.shape({
22
+ title: PropTypes.string.isRequired,
23
+ error: PropTypes.string,
24
+ fields: PropTypes.arrayOf(PropTypes.shape({
25
+ ...InputDate.propTypes,
26
+ type: PropTypes.oneOf(['date']),
27
+ onChange: PropTypes.func.isRequired
28
+ }).isRequired).isRequired,
29
+ rule: PropTypes.shape({
30
+ title: PropTypes.string.isRequired,
31
+ hint: PropTypes.string,
32
+ disabled: PropTypes.bool,
33
+ options: PropTypes.arrayOf(PropTypes.shape({
34
+ ...radioPropTypes,
35
+ title: PropTypes.shape({
36
+ title: PropTypes.string.isRequired,
37
+ subtitle: PropTypes.string
38
+ }).isRequired
39
+ }).isRequired).isRequired
40
+ }).isRequired,
41
+ reminders: PropTypes.shape({
42
+ hint: PropTypes.string.isRequired,
43
+ switches: PropTypes.arrayOf(PropTypes.shape({
44
+ ...InputSwitch.propTypes,
45
+ onChange: PropTypes.func.isRequired
46
+ }).isRequired).isRequired
47
+ }).isRequired
48
+ }).isRequired,
49
+ busy: PropTypes.bool,
50
+ isFetching: PropTypes.bool,
51
+ focusSection: PropTypes.oneOf(['information', 'audience', 'contents', 'dates'])
52
+ };
53
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["PropTypes","InputText","InputDate","InputSwitch","propTypes","radioPropTypes","AssignmentAudiencePropTypes","ContentSelectionListPropTypes","information","shape","title","string","isRequired","subtitle","error","field","type","oneOf","onChange","func","audience","contents","dates","fields","arrayOf","rule","hint","disabled","bool","options","reminders","switches","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,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,SAAS,MAAM,uBAAuB;AAC7C,OAAOC,WAAW,MAAM,yBAAyB;AACjD,SAAQC,SAAS,IAAIC,cAAc,QAA4B,mCAAmC;AAClG,OAAOC,2BAA2B,MAAiC,8BAA8B;AACjG,SAA0BC,6BAA6B,QAAO,iCAAiC;AAgD/F,OAAO,MAAMH,SAAS,GAAG;EACvBI,WAAW,EAAER,SAAS,CAACS,KAAK,CAAC;IAC3BC,KAAK,EAAEV,SAAS,CAACW,MAAM,CAACC,UAAU;IAClCC,QAAQ,EAAEb,SAAS,CAACW,MAAM;IAC1BG,KAAK,EAA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,CAAC,CAACC;MACL,CAAC,CAAC,CAACA,UACL,CAAC,CAACA;IACJ,CAAC,CAAC,CAACA,UAAU;IACbkB,SAAS,EAAE9B,SAAS,CAACS,KAAK,CAAC;MACzBiB,IAAI,EAAE1B,SAAS,CAACW,MAAM,CAACC,UAAU;MACjCmB,QAAQ,EAAE/B,SAAS,CAACwB,OAAO,CACzBxB,SAAS,CAACS,KAAK,CAAC;QACd,GAAGN,WAAW,CAACC,SAAS;QACxBc,QAAQ,EAAElB,SAAS,CAACmB,IAAI,CAACP;MAC3B,CAAC,CAAC,CAACA,UACL,CAAC,CAACA;IACJ,CAAC,CAAC,CAACA;EACL,CAAC,CAAC,CAACA,UAAU;EACboB,IAAI,EAAEhC,SAAS,CAAC4B,IAAI;EACpBK,UAAU,EAAEjC,SAAS,CAAC4B,IAAI;EAC1BM,YAAY,EAAElC,SAAS,CAACiB,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"}
@@ -35,7 +35,7 @@ export const buildButtonProps = button => ({
35
35
  fontWeight: 600
36
36
  }
37
37
  });
38
- const buildContentItem = (readOnly, hiddenLabel) => ({
38
+ const buildContentItem = (readOnly, hiddenLabel, disabled = false) => ({
39
39
  ref,
40
40
  title,
41
41
  subtitle,
@@ -53,6 +53,7 @@ const buildContentItem = (readOnly, hiddenLabel) => ({
53
53
  ...(readOnly ? {} : {
54
54
  secondButtonLink: {
55
55
  ...deleteButton,
56
+ disabled: disabled || deleteButton?.disabled,
56
57
  'data-name': `button-${deleteButton?.label}`,
57
58
  type: 'primary',
58
59
  customStyle: {
@@ -92,7 +93,10 @@ const buildContentItem = (readOnly, hiddenLabel) => ({
92
93
  position: 'left'
93
94
  }
94
95
  }],
95
- checkbox: readOnly ? undefined : checkbox
96
+ checkbox: readOnly ? undefined : {
97
+ ...checkbox,
98
+ disabled: disabled || checkbox.disabled
99
+ }
96
100
  };
97
101
  };
98
102
  const ContentSelectionList = ({
@@ -108,11 +112,15 @@ const ContentSelectionList = ({
108
112
  actionButtons,
109
113
  checkboxWithTitle: checkboxWithTitleProps,
110
114
  readOnly = false,
115
+ disabled = false,
111
116
  isFetching = false,
112
117
  error,
113
118
  hiddenLabel
114
119
  }) => {
115
- const buttonProps = buildButtonProps(button);
120
+ const buttonProps = buildButtonProps({
121
+ ...button,
122
+ disabled: disabled || button.disabled
123
+ });
116
124
  const titleProps = {
117
125
  type: 'form-group',
118
126
  title,
@@ -130,17 +138,17 @@ const ContentSelectionList = ({
130
138
  button: buttonProps
131
139
  }
132
140
  }),
133
- items: _map(buildContentItem(readOnly, hiddenLabel), items),
141
+ items: _map(buildContentItem(readOnly, hiddenLabel, disabled), items),
134
142
  type: 'list'
135
143
  },
136
144
  search: search ? {
137
145
  ...search,
138
146
  theme: 'coorpmanager',
139
- // Keep search interactive even in readOnly mode
140
- disabled: false
147
+ disabled: disabled || search.disabled
141
148
  } : undefined,
142
149
  actionButtons: readOnly ? [] : _map(actionButton => ({
143
150
  ...actionButton,
151
+ disabled: disabled || actionButton.disabled,
144
152
  customStyle: {
145
153
  fontWeight: '600',
146
154
  borderRadius: '12px',
@@ -149,6 +157,7 @@ const ContentSelectionList = ({
149
157
  }), actionButtons),
150
158
  checkboxWithTitle: readOnly ? undefined : {
151
159
  ...checkboxWithTitleProps,
160
+ disabled: disabled || checkboxWithTitleProps?.disabled,
152
161
  name: checkboxWithTitleProps?.title,
153
162
  'aria-label': checkboxWithTitleProps?.title,
154
163
  'data-name': checkboxWithTitleProps?.title,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","classnames","ListItems","Title","Notification","COLORS","contentContainer","style","ContentSelectionListPropTypes","buildButtonProps","button","type","label","hoverBackgroundColor","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","buildContentItem","readOnly","hiddenLabel","ref","title","subtitle","image","tags","iconName","checkbox","deleteButton","hidden","hint","secondButtonLink","cm_grey_100","neutral_500","imageOverlay","undefined","contentBadge","category","details","id","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","titleProps","required","listProps","content","_isEmpty","_map","theme","disabled","actionButton","className","iconColor","createElement","role","message","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string) =>\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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MA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D,KAAA,CAAA4E,aAAA;IAAKF,SAAS,EAAEzE,UAAU,CAACK,gBAAgB,EAAEC,KAAK,CAAC+C,IAAI;EAAE,gBACvDtD,KAAA,CAAA4E,aAAA,CAACzE,KAAK,EAAK8D,UAAa,CAAC,EACxBF,KAAK,gBACJ/D,KAAA,CAAA4E,aAAA;IAAKC,IAAI,EAAC;EAAO,gBACf7E,KAAA,CAAA4E,aAAA,CAACxE,YAAY;IAACO,IAAI,EAAC,OAAO;IAACmE,OAAO,EAAEf;EAAM,CAAE,CACzC,CAAC,GACJ,IAAI,eACR/D,KAAA,CAAA4E,aAAA,CAAC1E,SAAS,EAAKiE,SAAY,CACxB,CAAC;AAEV,CAAC;AAEDd,oBAAoB,CAAC0B,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG1E,6BAA6B;AAE9D,eAAe6C,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","classnames","ListItems","Title","Notification","COLORS","contentContainer","style","ContentSelectionListPropTypes","buildButtonProps","button","type","label","hoverBackgroundColor","primary_100","hoverColor","cm_primary_blue","icon","position","faIcon","name","color","size","customStyle","padding","width","backgroundColor","cm_blue_50","borderRadius","fontWeight","buildContentItem","readOnly","hiddenLabel","disabled","ref","title","subtitle","image","tags","iconName","checkbox","deleteButton","hidden","hint","secondButtonLink","cm_grey_100","neutral_500","imageOverlay","undefined","contentBadge","category","details","id","preset","ContentSelectionList","list","listTitle","items","search","emptyResult","actionButtons","checkboxWithTitle","checkboxWithTitleProps","isFetching","error","buttonProps","titleProps","required","listProps","content","_isEmpty","_map","theme","actionButton","className","iconColor","createElement","role","message","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/content-selection-list/index.tsx"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport {isEmpty, map} from 'lodash/fp';\nimport ListItems from '../list-items';\nimport Title from '../../atom/title';\nimport Notification from '../../atom/notification';\nimport {COLORS} from '../../variables/colors';\nimport {contentContainer} from '../skill-edition/styles';\nimport style from './style.css';\nimport {ContentPropsType, ContentListItemType, ContentSelectionListPropTypes} from './types';\n\nexport const buildButtonProps = (button: {\n label: string;\n onClick?: () => void;\n disabled?: boolean;\n}) => ({\n ...button,\n type: 'primary',\n 'aria-label': button.label,\n 'data-name': `button-${button.label}`,\n hoverBackgroundColor: COLORS.primary_100,\n hoverColor: COLORS.cm_primary_blue,\n icon: {\n position: 'left',\n faIcon: {\n name: 'plus',\n color: COLORS.cm_primary_blue,\n size: 14,\n customStyle: {padding: 0}\n }\n },\n customStyle: {\n width: 'fit-content',\n backgroundColor: COLORS.cm_blue_50,\n color: COLORS.cm_primary_blue,\n borderRadius: '12px',\n fontWeight: 600\n }\n});\n\nconst buildContentItem =\n (readOnly: boolean, hiddenLabel?: string, disabled = false) =>\n ({\n ref,\n title,\n subtitle,\n image,\n tags: {label, iconName},\n checkbox,\n deleteButton,\n hidden,\n hint\n }: ContentListItemType) => {\n return {\n ...(readOnly\n ? {}\n : {\n secondButtonLink: {\n ...deleteButton,\n disabled: disabled || deleteButton?.disabled,\n 'data-name': `button-${deleteButton?.label}`,\n type: 'primary',\n customStyle: {\n width: 'fit-content',\n backgroundColor: 'transparent'\n },\n hoverBackgroundColor: COLORS.cm_grey_100,\n icon: {\n position: 'left',\n faIcon: {\n name: 'trash',\n color: COLORS.neutral_500,\n size: 16\n }\n }\n }\n }),\n imageOverlay: hidden ? 'hidden' : undefined,\n contentBadge: hidden ? {category: 'hidden', label: hiddenLabel} : undefined,\n details: hint,\n id: ref,\n title,\n subtitle,\n image,\n tags: [\n {\n label,\n type: 'default',\n icon: {\n iconName,\n preset: 's',\n customStyle: {\n padding: 0\n },\n position: 'left'\n }\n }\n ],\n checkbox: readOnly ? undefined : {...checkbox, disabled: disabled || checkbox.disabled}\n };\n };\n\nconst ContentSelectionList = ({\n title,\n subtitle,\n button,\n list: {title: listTitle, items, search, emptyResult},\n actionButtons,\n checkboxWithTitle: checkboxWithTitleProps,\n readOnly = false,\n disabled = false,\n isFetching = false,\n error,\n hiddenLabel\n}: ContentPropsType) => {\n const buttonProps = buildButtonProps({...button, disabled: disabled || button.disabled});\n\n const titleProps = {\n type: 'form-group',\n title,\n subtitle,\n button: !readOnly ? buttonProps : undefined,\n required: true\n };\n\n const listProps = {\n title: listTitle,\n 'aria-label': 'content list items',\n content: {\n ...(!isEmpty(emptyResult) && {emptyResult: {...emptyResult, button: buttonProps}}),\n items: map(buildContentItem(readOnly, hiddenLabel, disabled), items),\n type: 'list'\n },\n search: search\n ? {\n ...search,\n theme: 'coorpmanager',\n disabled: disabled || search.disabled\n }\n : undefined,\n actionButtons: readOnly\n ? []\n : map(\n actionButton => ({\n ...actionButton,\n disabled: disabled || actionButton.disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px',\n width: 'auto'\n }\n }),\n actionButtons\n ),\n\n checkboxWithTitle: readOnly\n ? undefined\n : {\n ...checkboxWithTitleProps,\n disabled: disabled || checkboxWithTitleProps?.disabled,\n name: checkboxWithTitleProps?.title,\n 'aria-label': checkboxWithTitleProps?.title,\n 'data-name': checkboxWithTitleProps?.title,\n className: style.checkboxWithTitle,\n icon: {iconName: 'minus', iconColor: 'white', preset: 's'}\n },\n isFetching\n };\n\n return (\n <div className={classnames(contentContainer, style.list)}>\n <Title {...titleProps} />\n {error ? (\n <div role=\"alert\">\n <Notification type=\"error\" message={error} />\n </div>\n ) : null}\n <ListItems {...listProps} />\n </div>\n );\n};\n\nContentSelectionList.propTypes = ContentSelectionListPropTypes;\n\nexport default ContentSelectionList;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,SAAS,MAAM,eAAe;AACrC,OAAOC,KAAK,MAAM,kBAAkB;AACpC,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,SAAQC,gBAAgB,QAAO,yBAAyB;AACxD,OAAOC,KAAK,MAAM,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