@coorpacademy/components 11.6.1 → 11.7.3-alpha.29

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/README.md +3 -3
  2. package/es/atom/loader/index.native.d.ts +10 -0
  3. package/es/atom/loader/index.native.d.ts.map +1 -0
  4. package/es/atom/loader/index.native.js +192 -0
  5. package/es/atom/loader/index.native.js.map +1 -0
  6. package/es/atom/select/index.d.ts +18 -0
  7. package/es/atom/select/index.d.ts.map +1 -1
  8. package/es/atom/select/index.js +69 -15
  9. package/es/atom/select/index.js.map +1 -1
  10. package/es/molecule/answer/index.d.ts.map +1 -1
  11. package/es/molecule/answer/index.js +17 -12
  12. package/es/molecule/answer/index.js.map +1 -1
  13. package/es/molecule/brand-form-group/index.d.ts +18 -0
  14. package/es/molecule/empty-state-dashboard/index.d.ts +23 -0
  15. package/es/molecule/empty-state-dashboard/index.d.ts.map +1 -0
  16. package/es/molecule/empty-state-dashboard/index.js +31 -0
  17. package/es/molecule/empty-state-dashboard/index.js.map +1 -0
  18. package/es/molecule/empty-state-dashboard/style.css +55 -0
  19. package/es/molecule/empty-state-dashboard/types.d.ts +19 -0
  20. package/es/molecule/empty-state-dashboard/types.d.ts.map +1 -0
  21. package/es/molecule/empty-state-dashboard/types.js +19 -0
  22. package/es/molecule/empty-state-dashboard/types.js.map +1 -0
  23. package/es/molecule/filters/filters-wrapper.d.ts +1 -0
  24. package/es/molecule/filters/filters-wrapper.d.ts.map +1 -1
  25. package/es/molecule/filters/filters-wrapper.js +9 -5
  26. package/es/molecule/filters/filters-wrapper.js.map +1 -1
  27. package/es/molecule/filters/index.d.ts +10 -0
  28. package/es/molecule/filters/index.d.ts.map +1 -1
  29. package/es/molecule/filters/index.js +6 -3
  30. package/es/molecule/filters/index.js.map +1 -1
  31. package/es/molecule/questions/drop-down/index.d.ts +1 -0
  32. package/es/molecule/questions/drop-down/index.d.ts.map +1 -1
  33. package/es/molecule/questions/drop-down/index.js +9 -5
  34. package/es/molecule/questions/drop-down/index.js.map +1 -1
  35. package/es/molecule/questions/qcm/index.d.ts +1 -0
  36. package/es/molecule/questions/qcm/index.d.ts.map +1 -1
  37. package/es/molecule/questions/qcm/index.js +9 -5
  38. package/es/molecule/questions/qcm/index.js.map +1 -1
  39. package/es/molecule/questions/qcm-drag/index.d.ts +3 -1
  40. package/es/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  41. package/es/molecule/questions/qcm-drag/index.js +9 -5
  42. package/es/molecule/questions/qcm-drag/index.js.map +1 -1
  43. package/es/molecule/questions/qcm-graphic/index.d.ts +1 -0
  44. package/es/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  45. package/es/molecule/questions/qcm-graphic/index.js +9 -5
  46. package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
  47. package/es/molecule/questions/question-range/index.d.ts +1 -0
  48. package/es/molecule/questions/question-range/index.d.ts.map +1 -1
  49. package/es/molecule/questions/question-range/index.js +10 -6
  50. package/es/molecule/questions/question-range/index.js.map +1 -1
  51. package/es/molecule/questions/template/index.d.ts +6 -2
  52. package/es/molecule/questions/template/index.d.ts.map +1 -1
  53. package/es/molecule/questions/template/index.js +9 -5
  54. package/es/molecule/questions/template/index.js.map +1 -1
  55. package/es/molecule/setup-slide/index.d.ts +9 -0
  56. package/es/molecule/setup-slider/index.d.ts +9 -0
  57. package/es/organism/brand-form/index.d.ts +18 -0
  58. package/es/organism/list-item/index.d.ts +8 -6
  59. package/es/organism/list-item/index.d.ts.map +1 -1
  60. package/es/organism/list-item/index.js +16 -2
  61. package/es/organism/list-item/index.js.map +1 -1
  62. package/es/organism/list-item/style.css +18 -0
  63. package/es/organism/list-items/index.d.ts +2 -0
  64. package/es/organism/list-items/index.js +5 -1
  65. package/es/organism/list-items/index.js.map +1 -1
  66. package/es/organism/user-preferences/index.d.ts +1 -0
  67. package/es/organism/user-preferences/index.d.ts.map +1 -1
  68. package/es/organism/user-preferences/index.js +9 -5
  69. package/es/organism/user-preferences/index.js.map +1 -1
  70. package/es/organism/wizard-contents/index.d.ts +18 -0
  71. package/es/template/activity/index.d.ts +36 -40
  72. package/es/template/activity/index.d.ts.map +1 -1
  73. package/es/template/activity/index.js +89 -111
  74. package/es/template/activity/index.js.map +1 -1
  75. package/es/template/activity/stars-summary.d.ts +9 -18
  76. package/es/template/activity/stars-summary.d.ts.map +1 -1
  77. package/es/template/activity/stars-summary.js +94 -122
  78. package/es/template/activity/stars-summary.js.map +1 -1
  79. package/es/template/back-office/brand-update/index.d.ts +56 -0
  80. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  81. package/es/template/back-office/brand-update/index.js +12 -3
  82. package/es/template/back-office/brand-update/index.js.map +1 -1
  83. package/es/template/back-office/brand-update/style.css +5 -1
  84. package/es/template/common/search-page/index.d.ts +11 -0
  85. package/es/template/common/search-page/index.d.ts.map +1 -1
  86. package/es/template/common/search-page/index.js +6 -3
  87. package/es/template/common/search-page/index.js.map +1 -1
  88. package/es/util/button-icons.d.ts +1 -0
  89. package/es/util/button-icons.d.ts.map +1 -1
  90. package/es/util/button-icons.js +3 -2
  91. package/es/util/button-icons.js.map +1 -1
  92. package/lib/atom/loader/index.native.d.ts +10 -0
  93. package/lib/atom/loader/index.native.d.ts.map +1 -0
  94. package/lib/atom/loader/index.native.js +205 -0
  95. package/lib/atom/loader/index.native.js.map +1 -0
  96. package/lib/atom/select/index.d.ts +18 -0
  97. package/lib/atom/select/index.d.ts.map +1 -1
  98. package/lib/atom/select/index.js +72 -14
  99. package/lib/atom/select/index.js.map +1 -1
  100. package/lib/molecule/answer/index.d.ts.map +1 -1
  101. package/lib/molecule/answer/index.js +18 -13
  102. package/lib/molecule/answer/index.js.map +1 -1
  103. package/lib/molecule/brand-form-group/index.d.ts +18 -0
  104. package/lib/molecule/empty-state-dashboard/index.d.ts +23 -0
  105. package/lib/molecule/empty-state-dashboard/index.d.ts.map +1 -0
  106. package/lib/molecule/empty-state-dashboard/index.js +42 -0
  107. package/lib/molecule/empty-state-dashboard/index.js.map +1 -0
  108. package/lib/molecule/empty-state-dashboard/style.css +55 -0
  109. package/lib/molecule/empty-state-dashboard/types.d.ts +19 -0
  110. package/lib/molecule/empty-state-dashboard/types.d.ts.map +1 -0
  111. package/lib/molecule/empty-state-dashboard/types.js +29 -0
  112. package/lib/molecule/empty-state-dashboard/types.js.map +1 -0
  113. package/lib/molecule/filters/filters-wrapper.d.ts +1 -0
  114. package/lib/molecule/filters/filters-wrapper.d.ts.map +1 -1
  115. package/lib/molecule/filters/filters-wrapper.js +9 -5
  116. package/lib/molecule/filters/filters-wrapper.js.map +1 -1
  117. package/lib/molecule/filters/index.d.ts +10 -0
  118. package/lib/molecule/filters/index.d.ts.map +1 -1
  119. package/lib/molecule/filters/index.js +6 -3
  120. package/lib/molecule/filters/index.js.map +1 -1
  121. package/lib/molecule/questions/drop-down/index.d.ts +1 -0
  122. package/lib/molecule/questions/drop-down/index.d.ts.map +1 -1
  123. package/lib/molecule/questions/drop-down/index.js +9 -5
  124. package/lib/molecule/questions/drop-down/index.js.map +1 -1
  125. package/lib/molecule/questions/qcm/index.d.ts +1 -0
  126. package/lib/molecule/questions/qcm/index.d.ts.map +1 -1
  127. package/lib/molecule/questions/qcm/index.js +9 -5
  128. package/lib/molecule/questions/qcm/index.js.map +1 -1
  129. package/lib/molecule/questions/qcm-drag/index.d.ts +3 -1
  130. package/lib/molecule/questions/qcm-drag/index.d.ts.map +1 -1
  131. package/lib/molecule/questions/qcm-drag/index.js +9 -5
  132. package/lib/molecule/questions/qcm-drag/index.js.map +1 -1
  133. package/lib/molecule/questions/qcm-graphic/index.d.ts +1 -0
  134. package/lib/molecule/questions/qcm-graphic/index.d.ts.map +1 -1
  135. package/lib/molecule/questions/qcm-graphic/index.js +9 -5
  136. package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
  137. package/lib/molecule/questions/question-range/index.d.ts +1 -0
  138. package/lib/molecule/questions/question-range/index.d.ts.map +1 -1
  139. package/lib/molecule/questions/question-range/index.js +10 -6
  140. package/lib/molecule/questions/question-range/index.js.map +1 -1
  141. package/lib/molecule/questions/template/index.d.ts +6 -2
  142. package/lib/molecule/questions/template/index.d.ts.map +1 -1
  143. package/lib/molecule/questions/template/index.js +9 -5
  144. package/lib/molecule/questions/template/index.js.map +1 -1
  145. package/lib/molecule/setup-slide/index.d.ts +9 -0
  146. package/lib/molecule/setup-slider/index.d.ts +9 -0
  147. package/lib/organism/brand-form/index.d.ts +18 -0
  148. package/lib/organism/list-item/index.d.ts +8 -6
  149. package/lib/organism/list-item/index.d.ts.map +1 -1
  150. package/lib/organism/list-item/index.js +16 -2
  151. package/lib/organism/list-item/index.js.map +1 -1
  152. package/lib/organism/list-item/style.css +18 -0
  153. package/lib/organism/list-items/index.d.ts +2 -0
  154. package/lib/organism/list-items/index.js +5 -1
  155. package/lib/organism/list-items/index.js.map +1 -1
  156. package/lib/organism/user-preferences/index.d.ts +1 -0
  157. package/lib/organism/user-preferences/index.d.ts.map +1 -1
  158. package/lib/organism/user-preferences/index.js +9 -5
  159. package/lib/organism/user-preferences/index.js.map +1 -1
  160. package/lib/organism/wizard-contents/index.d.ts +18 -0
  161. package/lib/template/activity/index.d.ts +36 -40
  162. package/lib/template/activity/index.d.ts.map +1 -1
  163. package/lib/template/activity/index.js +95 -110
  164. package/lib/template/activity/index.js.map +1 -1
  165. package/lib/template/activity/stars-summary.d.ts +9 -18
  166. package/lib/template/activity/stars-summary.d.ts.map +1 -1
  167. package/lib/template/activity/stars-summary.js +90 -119
  168. package/lib/template/activity/stars-summary.js.map +1 -1
  169. package/lib/template/back-office/brand-update/index.d.ts +56 -0
  170. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  171. package/lib/template/back-office/brand-update/index.js +13 -3
  172. package/lib/template/back-office/brand-update/index.js.map +1 -1
  173. package/lib/template/back-office/brand-update/style.css +5 -1
  174. package/lib/template/common/search-page/index.d.ts +11 -0
  175. package/lib/template/common/search-page/index.d.ts.map +1 -1
  176. package/lib/template/common/search-page/index.js +6 -3
  177. package/lib/template/common/search-page/index.js.map +1 -1
  178. package/lib/util/button-icons.d.ts +1 -0
  179. package/lib/util/button-icons.d.ts.map +1 -1
  180. package/lib/util/button-icons.js +2 -1
  181. package/lib/util/button-icons.js.map +1 -1
  182. package/locales/bs/global.json +8 -1
  183. package/locales/cs/global.json +9 -1
  184. package/locales/de/global.json +9 -1
  185. package/locales/en/global.json +1 -1
  186. package/locales/es/global.json +9 -1
  187. package/locales/et/global.json +9 -1
  188. package/locales/fr/global.json +1 -1
  189. package/locales/hr/global.json +9 -1
  190. package/locales/hu/global.json +9 -1
  191. package/locales/hy/global.json +0 -1
  192. package/locales/it/global.json +9 -1
  193. package/locales/ja/global.json +9 -1
  194. package/locales/ko/global.json +9 -1
  195. package/locales/nl/global.json +9 -1
  196. package/locales/pl/global.json +9 -1
  197. package/locales/pt/global.json +9 -1
  198. package/locales/ro/global.json +9 -1
  199. package/locales/ru/global.json +1 -1
  200. package/locales/sk/global.json +9 -1
  201. package/locales/tl/global.json +9 -1
  202. package/locales/tr/global.json +9 -1
  203. package/locales/uk/global.json +9 -1
  204. package/locales/vi/global.json +9 -1
  205. package/locales/zh/global.json +9 -1
  206. package/locales/zh_TW/global.json +9 -1
  207. package/package.json +3 -3
@@ -5,176 +5,148 @@ import _get from "lodash/fp/get";
5
5
 
6
6
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
7
7
 
8
- import React, { useMemo } from 'react';
8
+ import React, { useCallback, useMemo, useState } from 'react';
9
9
  import PropTypes from 'prop-types';
10
10
  import { NovaCompositionNavigationArrowLeft as ArrowLeft, NovaCompositionNavigationArrowRight as ArrowRight, NovaCompositionCoorpacademyStar as StarIcon } from '@coorpacademy/nova-icons';
11
- import Provider from '../../atom/provider';
11
+ import Provider, { GetSkinFromContext } from '../../atom/provider';
12
12
  import EngineStars from './engine-stars';
13
13
  import style from './stars-summary.css';
14
14
 
15
15
  const EngineTab = ({
16
16
  engine,
17
17
  engineIndex,
18
- firstItem
18
+ firstItemIndex
19
19
  }) => {
20
20
  const {
21
21
  type
22
22
  } = engine;
23
- const state = engineIndex < firstItem ? 'hidden' : 'active';
23
+ const state = useMemo(() => engineIndex < firstItemIndex ? 'hidden' : 'active', [engineIndex, firstItemIndex]);
24
+ const dataName = useMemo(() => `${type}_total_${state}`, [state, type]);
24
25
  return /*#__PURE__*/React.createElement("li", {
25
26
  className: style[state],
26
27
  key: type,
27
- "data-name": `${type}_total_${state}`
28
+ "data-name": dataName
28
29
  }, /*#__PURE__*/React.createElement(EngineStars, _extends({}, engine, {
29
- className: engineIndex < firstItem ? style.hidden : style.active
30
+ className: engineIndex < firstItemIndex ? style.hidden : style.active
30
31
  })));
31
32
  };
32
33
 
33
34
  EngineTab.propTypes = process.env.NODE_ENV !== "production" ? {
34
35
  engine: PropTypes.shape(EngineStars.propTypes),
35
36
  engineIndex: PropTypes.number,
36
- firstItem: PropTypes.number
37
+ firstItemIndex: PropTypes.number
37
38
  } : {};
38
39
 
39
40
  const EngineTabs = ({
40
41
  engines,
41
- firstItem
42
+ firstItemIndex
42
43
  }) => {
43
44
  return useMemo(() => _map.convert({
44
45
  cap: false
45
46
  })((engine, index) => /*#__PURE__*/React.createElement(EngineTab, {
46
47
  engine: engine,
47
48
  key: `engineTab_${index}`,
48
- firstItem: firstItem,
49
+ firstItemIndex: firstItemIndex,
49
50
  engineIndex: index
50
- }), engines), [engines, firstItem]);
51
+ }), engines), [engines, firstItemIndex]);
51
52
  };
52
53
 
53
54
  EngineTabs.propTypes = process.env.NODE_ENV !== "production" ? {
54
55
  engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),
55
- firstItem: PropTypes.number
56
+ firstItemIndex: PropTypes.number
56
57
  } : {};
57
58
 
58
- class StarsSummary extends React.Component {
59
- constructor(props) {
60
- super(props);
61
- const {
62
- engines = []
63
- } = props;
64
- this.state = {
65
- firstItem: 0,
66
- totalItems: engines.length
67
- };
68
- this.handleOnLeft = this.handleOnLeft.bind(this);
69
- this.handleOnRight = this.handleOnRight.bind(this);
70
- this.scrollTo = this.scrollTo.bind(this);
71
- }
72
-
73
- handleOnLeft() {
74
- const {
75
- firstItem
76
- } = this.state;
77
- this.scrollTo(firstItem - 1);
78
- }
79
-
80
- handleOnRight() {
81
- const {
82
- firstItem
83
- } = this.state;
84
- this.scrollTo(firstItem + 1);
85
- }
86
-
87
- scrollTo(page) {
88
- this.setState({
89
- firstItem: page
90
- });
59
+ const StarsSummary = (props, legacyContext) => {
60
+ const {
61
+ total,
62
+ engines
63
+ } = props;
64
+ const skin = GetSkinFromContext(legacyContext);
65
+ const [firstItemIndex, setFirstItemIndex] = useState(0);
66
+ const [totalItems] = useState(engines.length);
67
+
68
+ const dark = _getOr('#90A4AE', 'common.dark', skin);
69
+
70
+ const primary = _get('common.primary', skin);
71
+
72
+ const scrollTo = useCallback(page => setFirstItemIndex(page), []);
73
+ const handleOnLeft = useCallback(() => {
74
+ scrollTo(firstItemIndex - 1);
75
+ }, [firstItemIndex, scrollTo]);
76
+ const handleOnRight = useCallback(() => {
77
+ scrollTo(firstItemIndex + 1);
78
+ }, [firstItemIndex, scrollTo]);
79
+
80
+ if (_isEmpty(engines)) {
81
+ return null;
91
82
  }
92
83
 
93
- render() {
94
- const {
95
- total,
96
- engines = []
97
- } = this.props;
98
- const {
99
- skin
100
- } = this.context;
101
- const {
102
- firstItem,
103
- totalItems
104
- } = this.state;
105
-
106
- const dark = _getOr('#90A4AE', 'common.dark', skin);
107
-
108
- const primary = _get('common.primary', skin);
109
-
110
- if (_isEmpty(engines)) {
111
- return null;
84
+ const leftArrowView = totalItems > 6 && firstItemIndex > 0 ? /*#__PURE__*/React.createElement("div", {
85
+ className: style.circle,
86
+ onClick: handleOnLeft,
87
+ "data-name": "left-arrow",
88
+ "data-testid": "stars-summary-left-arrow"
89
+ }, /*#__PURE__*/React.createElement(ArrowLeft, {
90
+ color: dark,
91
+ className: style.left,
92
+ width: 10,
93
+ height: 10
94
+ })) : null;
95
+ const rightArrowView = totalItems > 6 && firstItemIndex < totalItems - 6 ? /*#__PURE__*/React.createElement("div", {
96
+ className: style.circle,
97
+ onClick: handleOnRight,
98
+ "data-name": "right-arrow",
99
+ "data-testid": "stars-summary-right-arrow"
100
+ }, /*#__PURE__*/React.createElement(ArrowRight, {
101
+ color: dark,
102
+ className: style.right,
103
+ width: 10,
104
+ height: 10
105
+ })) : null;
106
+ return /*#__PURE__*/React.createElement("div", {
107
+ "data-name": "myStars",
108
+ className: style.myStars
109
+ }, /*#__PURE__*/React.createElement("div", {
110
+ "data-name": "myStars-wrapper",
111
+ className: style.myStarsWrapper,
112
+ "data-testid": `stars-summary-engine-index-${firstItemIndex}`
113
+ }, /*#__PURE__*/React.createElement("ul", {
114
+ className: style.allStars,
115
+ "data-name": "engineList",
116
+ "data-testid": "stars-summary-engine-tabs"
117
+ }, /*#__PURE__*/React.createElement(EngineTabs, {
118
+ engines: engines,
119
+ firstItemIndex: firstItemIndex
120
+ })), /*#__PURE__*/React.createElement("div", {
121
+ className: style.footerSummaryStars,
122
+ style: {
123
+ backgroundColor: primary
112
124
  }
113
-
114
- const leftArrowView = totalItems > 6 && firstItem > 0 ? /*#__PURE__*/React.createElement("div", {
115
- className: style.circle,
116
- onClick: this.handleOnLeft,
117
- "data-name": "left-arrow"
118
- }, /*#__PURE__*/React.createElement(ArrowLeft, {
119
- color: dark,
120
- className: style.left,
121
- width: 10,
122
- height: 10
123
- })) : null;
124
- const rightArrowView = totalItems > 6 && firstItem < totalItems - 6 ? /*#__PURE__*/React.createElement("div", {
125
- className: style.circle,
126
- onClick: this.handleOnRight,
127
- "data-name": "right-arrow"
128
- }, /*#__PURE__*/React.createElement(ArrowRight, {
129
- color: dark,
130
- className: style.right,
131
- width: 10,
132
- height: 10
133
- })) : null;
134
- return /*#__PURE__*/React.createElement("div", {
135
- "data-name": "myStars",
136
- className: style.myStars
137
- }, /*#__PURE__*/React.createElement("div", {
138
- "data-name": "myStars-wrapper",
139
- className: style.myStarsWrapper
140
- }, /*#__PURE__*/React.createElement("ul", {
141
- className: style.allStars,
142
- "data-name": "engineList"
143
- }, /*#__PURE__*/React.createElement(EngineTabs, {
144
- engines: engines,
145
- firstItem: firstItem
146
- })), /*#__PURE__*/React.createElement("div", {
147
- className: style.footerSummaryStars,
148
- style: {
149
- backgroundColor: primary
150
- }
151
- }, /*#__PURE__*/React.createElement("div", {
152
- className: style.totalStars
153
- }, /*#__PURE__*/React.createElement("span", null, total.label), /*#__PURE__*/React.createElement("p", {
154
- "data-name": "star-counter"
155
- }, total.stars), /*#__PURE__*/React.createElement("div", {
156
- className: style.iconBubble
157
- }, /*#__PURE__*/React.createElement(StarIcon, {
158
- className: style.iconHeader,
159
- color: primary
160
- }))), /*#__PURE__*/React.createElement("div", {
161
- className: style.navigationLeft
162
- }, leftArrowView), /*#__PURE__*/React.createElement("div", {
163
- className: style.navigationRight
164
- }, rightArrowView))));
165
- }
166
-
167
- }
168
-
169
- StarsSummary.contextTypes = {
170
- skin: Provider.childContextTypes.skin
125
+ }, /*#__PURE__*/React.createElement("div", {
126
+ className: style.totalStars
127
+ }, /*#__PURE__*/React.createElement("span", null, total.label), /*#__PURE__*/React.createElement("p", {
128
+ "data-name": "star-counter"
129
+ }, total.stars), /*#__PURE__*/React.createElement("div", {
130
+ className: style.iconBubble
131
+ }, /*#__PURE__*/React.createElement(StarIcon, {
132
+ className: style.iconHeader,
133
+ color: primary
134
+ }))), /*#__PURE__*/React.createElement("div", {
135
+ className: style.navigationLeft
136
+ }, leftArrowView), /*#__PURE__*/React.createElement("div", {
137
+ className: style.navigationRight
138
+ }, rightArrowView))));
171
139
  };
140
+
172
141
  StarsSummary.propTypes = process.env.NODE_ENV !== "production" ? {
173
142
  total: PropTypes.shape({
174
143
  label: PropTypes.string.isRequired,
175
144
  stars: PropTypes.number.isRequired
176
145
  }).isRequired,
177
- engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes))
146
+ engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)).isRequired
178
147
  } : {};
148
+ StarsSummary.contextTypes = {
149
+ skin: Provider.childContextTypes.skin
150
+ };
179
151
  export default StarsSummary;
180
152
  //# sourceMappingURL=stars-summary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stars-summary.js","names":["React","useMemo","PropTypes","NovaCompositionNavigationArrowLeft","ArrowLeft","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyStar","StarIcon","Provider","EngineStars","style","EngineTab","engine","engineIndex","firstItem","type","state","hidden","active","propTypes","shape","number","EngineTabs","engines","convert","cap","index","arrayOf","StarsSummary","Component","constructor","props","totalItems","length","handleOnLeft","bind","handleOnRight","scrollTo","page","setState","render","total","skin","context","dark","primary","leftArrowView","circle","left","rightArrowView","right","myStars","myStarsWrapper","allStars","footerSummaryStars","backgroundColor","totalStars","label","stars","iconBubble","iconHeader","navigationLeft","navigationRight","contextTypes","childContextTypes","string","isRequired"],"sources":["../../../src/template/activity/stars-summary.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, isEmpty, map} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyStar as StarIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../atom/provider';\nimport EngineStars from './engine-stars';\nimport style from './stars-summary.css';\n\nconst EngineTab = ({engine, engineIndex, firstItem}) => {\n const {type} = engine;\n const state = engineIndex < firstItem ? 'hidden' : 'active';\n return (\n <li className={style[state]} key={type} data-name={`${type}_total_${state}`}>\n <EngineStars {...engine} className={engineIndex < firstItem ? style.hidden : style.active} />\n </li>\n );\n};\nEngineTab.propTypes = {\n engine: PropTypes.shape(EngineStars.propTypes),\n engineIndex: PropTypes.number,\n firstItem: PropTypes.number\n};\n\nconst EngineTabs = ({engines, firstItem}) => {\n return useMemo(\n () =>\n map.convert({cap: false})(\n (engine, index) => (\n <EngineTab\n engine={engine}\n key={`engineTab_${index}`}\n firstItem={firstItem}\n engineIndex={index}\n />\n ),\n engines\n ),\n [engines, firstItem]\n );\n};\n\nEngineTabs.propTypes = {\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n firstItem: PropTypes.number\n};\n\nclass StarsSummary extends React.Component {\n static propTypes = {\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes))\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n\n const {engines = []} = props;\n this.state = {\n firstItem: 0,\n totalItems: engines.length\n };\n\n this.handleOnLeft = this.handleOnLeft.bind(this);\n this.handleOnRight = this.handleOnRight.bind(this);\n this.scrollTo = this.scrollTo.bind(this);\n }\n\n handleOnLeft() {\n const {firstItem} = this.state;\n this.scrollTo(firstItem - 1);\n }\n\n handleOnRight() {\n const {firstItem} = this.state;\n this.scrollTo(firstItem + 1);\n }\n\n scrollTo(page) {\n this.setState({\n firstItem: page\n });\n }\n\n render() {\n const {total, engines = []} = this.props;\n const {skin} = this.context;\n const {firstItem, totalItems} = this.state;\n const dark = getOr('#90A4AE', 'common.dark', skin);\n const primary = get('common.primary', skin);\n\n if (isEmpty(engines)) {\n return null;\n }\n const leftArrowView =\n totalItems > 6 && firstItem > 0 ? (\n <div className={style.circle} onClick={this.handleOnLeft} data-name=\"left-arrow\">\n <ArrowLeft color={dark} className={style.left} width={10} height={10} />\n </div>\n ) : null;\n\n const rightArrowView =\n totalItems > 6 && firstItem < totalItems - 6 ? (\n <div className={style.circle} onClick={this.handleOnRight} data-name=\"right-arrow\">\n <ArrowRight color={dark} className={style.right} width={10} height={10} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"myStars\" className={style.myStars}>\n <div data-name=\"myStars-wrapper\" className={style.myStarsWrapper}>\n <ul className={style.allStars} data-name=\"engineList\">\n <EngineTabs engines={engines} firstItem={firstItem} />\n </ul>\n <div\n className={style.footerSummaryStars}\n style={{\n backgroundColor: primary\n }}\n >\n <div className={style.totalStars}>\n <span>{total.label}</span>\n <p data-name=\"star-counter\">{total.stars}</p>\n <div className={style.iconBubble}>\n <StarIcon className={style.iconHeader} color={primary} />\n </div>\n </div>\n <div className={style.navigationLeft}>{leftArrowView}</div>\n <div className={style.navigationRight}>{rightArrowView}</div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default StarsSummary;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SACEC,kCAAkC,IAAIC,SADxC,EAEEC,mCAAmC,IAAIC,UAFzC,EAGEC,+BAA+B,IAAIC,QAHrC,QAIO,0BAJP;AAKA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,OAAOC,KAAP,MAAkB,qBAAlB;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC,MAAD;EAASC,WAAT;EAAsBC;AAAtB,CAAD,KAAsC;EACtD,MAAM;IAACC;EAAD,IAASH,MAAf;EACA,MAAMI,KAAK,GAAGH,WAAW,GAAGC,SAAd,GAA0B,QAA1B,GAAqC,QAAnD;EACA,oBACE;IAAI,SAAS,EAAEJ,KAAK,CAACM,KAAD,CAApB;IAA6B,GAAG,EAAED,IAAlC;IAAwC,aAAY,GAAEA,IAAK,UAASC,KAAM;EAA1E,gBACE,oBAAC,WAAD,eAAiBJ,MAAjB;IAAyB,SAAS,EAAEC,WAAW,GAAGC,SAAd,GAA0BJ,KAAK,CAACO,MAAhC,GAAyCP,KAAK,CAACQ;EAAnF,GADF,CADF;AAKD,CARD;;AASAP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B;IACrBqC,KAAK,EAAExD,SAAS,CAACgE,MAAV,CAAiBC,UADH;IAErBR,KAAK,EAAEzD,SAAS,CAACoB,MAAV,CAAiB6C;EAFH,CAAhB,EAGJA,UAJc;EAKjB3C,OAAO,EAAEtB,SAAS,CAAC0B,OAAV,CAAkB1B,SAAS,CAACmB,KAAV,CAAgBX,WAAW,CAACU,SAA5B,CAAlB;AALQ,C;AA8FrB,eAAeS,YAAf"}
1
+ {"version":3,"file":"stars-summary.js","names":["React","useCallback","useMemo","useState","PropTypes","NovaCompositionNavigationArrowLeft","ArrowLeft","NovaCompositionNavigationArrowRight","ArrowRight","NovaCompositionCoorpacademyStar","StarIcon","Provider","GetSkinFromContext","EngineStars","style","EngineTab","engine","engineIndex","firstItemIndex","type","state","dataName","hidden","active","propTypes","shape","number","EngineTabs","engines","convert","cap","index","arrayOf","StarsSummary","props","legacyContext","total","skin","setFirstItemIndex","totalItems","length","dark","primary","scrollTo","page","handleOnLeft","handleOnRight","leftArrowView","circle","left","rightArrowView","right","myStars","myStarsWrapper","allStars","footerSummaryStars","backgroundColor","totalStars","label","stars","iconBubble","iconHeader","navigationLeft","navigationRight","string","isRequired","contextTypes","childContextTypes"],"sources":["../../../src/template/activity/stars-summary.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, isEmpty, map} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyStar as StarIcon\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../../atom/provider';\nimport EngineStars from './engine-stars';\nimport style from './stars-summary.css';\n\nconst EngineTab = ({engine, engineIndex, firstItemIndex}) => {\n const {type} = engine;\n const state = useMemo(\n () => (engineIndex < firstItemIndex ? 'hidden' : 'active'),\n [engineIndex, firstItemIndex]\n );\n const dataName = useMemo(() => `${type}_total_${state}`, [state, type]);\n\n return (\n <li className={style[state]} key={type} data-name={dataName}>\n <EngineStars\n {...engine}\n className={engineIndex < firstItemIndex ? style.hidden : style.active}\n />\n </li>\n );\n};\nEngineTab.propTypes = {\n engine: PropTypes.shape(EngineStars.propTypes),\n engineIndex: PropTypes.number,\n firstItemIndex: PropTypes.number\n};\n\nconst EngineTabs = ({engines, firstItemIndex}) => {\n return useMemo(\n () =>\n map.convert({cap: false})(\n (engine, index) => (\n <EngineTab\n engine={engine}\n key={`engineTab_${index}`}\n firstItemIndex={firstItemIndex}\n engineIndex={index}\n />\n ),\n engines\n ),\n [engines, firstItemIndex]\n );\n};\n\nEngineTabs.propTypes = {\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n firstItemIndex: PropTypes.number\n};\n\nconst StarsSummary = (props, legacyContext) => {\n const {total, engines} = props;\n const skin = GetSkinFromContext(legacyContext);\n\n const [firstItemIndex, setFirstItemIndex] = useState(0);\n const [totalItems] = useState(engines.length);\n\n const dark = getOr('#90A4AE', 'common.dark', skin);\n const primary = get('common.primary', skin);\n\n const scrollTo = useCallback(page => setFirstItemIndex(page), []);\n\n const handleOnLeft = useCallback(() => {\n scrollTo(firstItemIndex - 1);\n }, [firstItemIndex, scrollTo]);\n\n const handleOnRight = useCallback(() => {\n scrollTo(firstItemIndex + 1);\n }, [firstItemIndex, scrollTo]);\n\n if (isEmpty(engines)) {\n return null;\n }\n\n const leftArrowView =\n totalItems > 6 && firstItemIndex > 0 ? (\n <div\n className={style.circle}\n onClick={handleOnLeft}\n data-name=\"left-arrow\"\n data-testid=\"stars-summary-left-arrow\"\n >\n <ArrowLeft color={dark} className={style.left} width={10} height={10} />\n </div>\n ) : null;\n\n const rightArrowView =\n totalItems > 6 && firstItemIndex < totalItems - 6 ? (\n <div\n className={style.circle}\n onClick={handleOnRight}\n data-name=\"right-arrow\"\n data-testid=\"stars-summary-right-arrow\"\n >\n <ArrowRight color={dark} className={style.right} width={10} height={10} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"myStars\" className={style.myStars}>\n <div\n data-name=\"myStars-wrapper\"\n className={style.myStarsWrapper}\n data-testid={`stars-summary-engine-index-${firstItemIndex}`}\n >\n <ul\n className={style.allStars}\n data-name=\"engineList\"\n data-testid=\"stars-summary-engine-tabs\"\n >\n <EngineTabs engines={engines} firstItemIndex={firstItemIndex} />\n </ul>\n <div\n className={style.footerSummaryStars}\n style={{\n backgroundColor: primary\n }}\n >\n <div className={style.totalStars}>\n <span>{total.label}</span>\n <p data-name=\"star-counter\">{total.stars}</p>\n <div className={style.iconBubble}>\n <StarIcon className={style.iconHeader} color={primary} />\n </div>\n </div>\n <div className={style.navigationLeft}>{leftArrowView}</div>\n <div className={style.navigationRight}>{rightArrowView}</div>\n </div>\n </div>\n </div>\n );\n};\n\nStarsSummary.propTypes = {\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)).isRequired\n};\n\nStarsSummary.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nexport default StarsSummary;\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,OAA5B,EAAqCC,QAArC,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,SACEC,kCAAkC,IAAIC,SADxC,EAEEC,mCAAmC,IAAIC,UAFzC,EAGEC,+BAA+B,IAAIC,QAHrC,QAIO,0BAJP;AAKA,OAAOC,QAAP,IAAkBC,kBAAlB,QAA2C,qBAA3C;AACA,OAAOC,WAAP,MAAwB,gBAAxB;AACA,OAAOC,KAAP,MAAkB,qBAAlB;;AAEA,MAAMC,SAAS,GAAG,CAAC;EAACC,MAAD;EAASC,WAAT;EAAsBC;AAAtB,CAAD,KAA2C;EAC3D,MAAM;IAACC;EAAD,IAASH,MAAf;EACA,MAAMI,KAAK,GAAGlB,OAAO,CACnB,MAAOe,WAAW,GAAGC,cAAd,GAA+B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,EAAEjC,KAAK,CAACiD;EAAtB,GAAwCb,cAAxC,CAdF,CAZF,CADF,CADF;AAiCD,CAjFD;;AAmFAjB,YAAY,CAACT,SAAb,2CAAyB;EACvBY,KAAK,EAAEhC,SAAS,CAACqB,KAAV,CAAgB;IACrBiC,KAAK,EAAEtD,SAAS,CAAC4D,MAAV,CAAiBC,UADH;IAErBN,KAAK,EAAEvD,SAAS,CAACsB,MAAV,CAAiBuC;EAFH,CAAhB,EAGJA,UAJoB;EAKvBrC,OAAO,EAAExB,SAAS,CAAC4B,OAAV,CAAkB5B,SAAS,CAACqB,KAAV,CAAgBZ,WAAW,CAACW,SAA5B,CAAlB,EAA0DyC;AAL5C,CAAzB;AAQAhC,YAAY,CAACiC,YAAb,GAA4B;EAC1B7B,IAAI,EAAE1B,QAAQ,CAACwD,iBAAT,CAA2B9B;AADP,CAA5B;AAIA,eAAeJ,YAAf"}
@@ -228,6 +228,15 @@ declare namespace BrandUpdate {
228
228
  selected: PropTypes.Requireable<boolean>;
229
229
  validOption: PropTypes.Requireable<boolean>;
230
230
  }> | null | undefined)[]>;
231
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
232
+ label: PropTypes.Validator<string>;
233
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
234
+ name: PropTypes.Validator<string>;
235
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
236
+ selected: PropTypes.Requireable<boolean>;
237
+ validOption: PropTypes.Requireable<boolean>;
238
+ }> | null | undefined)[]>;
239
+ }> | null | undefined)[]>;
231
240
  modified: PropTypes.Requireable<boolean>;
232
241
  error: PropTypes.Requireable<boolean>;
233
242
  'aria-label': PropTypes.Requireable<string>;
@@ -332,6 +341,15 @@ declare namespace BrandUpdate {
332
341
  selected: PropTypes.Requireable<boolean>;
333
342
  validOption: PropTypes.Requireable<boolean>;
334
343
  }> | null | undefined)[]>;
344
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
345
+ label: PropTypes.Validator<string>;
346
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
347
+ name: PropTypes.Validator<string>;
348
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
349
+ selected: PropTypes.Requireable<boolean>;
350
+ validOption: PropTypes.Requireable<boolean>;
351
+ }> | null | undefined)[]>;
352
+ }> | null | undefined)[]>;
335
353
  modified: PropTypes.Requireable<boolean>;
336
354
  error: PropTypes.Requireable<boolean>;
337
355
  'aria-label': PropTypes.Requireable<string>;
@@ -851,6 +869,15 @@ declare namespace BrandUpdate {
851
869
  selected: PropTypes.Requireable<boolean>;
852
870
  validOption: PropTypes.Requireable<boolean>;
853
871
  }> | null | undefined)[]>;
872
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
873
+ label: PropTypes.Validator<string>;
874
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
875
+ name: PropTypes.Validator<string>;
876
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
877
+ selected: PropTypes.Requireable<boolean>;
878
+ validOption: PropTypes.Requireable<boolean>;
879
+ }> | null | undefined)[]>;
880
+ }> | null | undefined)[]>;
854
881
  modified: PropTypes.Requireable<boolean>;
855
882
  error: PropTypes.Requireable<boolean>;
856
883
  'aria-label': PropTypes.Requireable<string>;
@@ -955,6 +982,15 @@ declare namespace BrandUpdate {
955
982
  selected: PropTypes.Requireable<boolean>;
956
983
  validOption: PropTypes.Requireable<boolean>;
957
984
  }> | null | undefined)[]>;
985
+ optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
986
+ label: PropTypes.Validator<string>;
987
+ options: PropTypes.Requireable<(PropTypes.InferProps<{
988
+ name: PropTypes.Validator<string>;
989
+ value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
990
+ selected: PropTypes.Requireable<boolean>;
991
+ validOption: PropTypes.Requireable<boolean>;
992
+ }> | null | undefined)[]>;
993
+ }> | null | undefined)[]>;
958
994
  modified: PropTypes.Requireable<boolean>;
959
995
  error: PropTypes.Requireable<boolean>;
960
996
  'aria-label': PropTypes.Requireable<string>;
@@ -1443,8 +1479,27 @@ declare namespace BrandUpdate {
1443
1479
  type: PropTypes.Requireable<string>;
1444
1480
  }> | null | undefined)[]>;
1445
1481
  title: PropTypes.Validator<string>;
1482
+ order: PropTypes.Requireable<number>;
1483
+ 'aria-label': PropTypes.Requireable<string>;
1446
1484
  }> | null | undefined)[]>;
1447
1485
  title: PropTypes.Requireable<string>;
1486
+ }> | PropTypes.InferProps<{
1487
+ key: PropTypes.Requireable<string>;
1488
+ type: PropTypes.Requireable<string>;
1489
+ mainText: PropTypes.Requireable<string>;
1490
+ subText: PropTypes.Requireable<string>;
1491
+ imageUrl: PropTypes.Requireable<any>;
1492
+ buttonLink: PropTypes.Requireable<PropTypes.InferProps<{
1493
+ type: PropTypes.Requireable<string>;
1494
+ label: PropTypes.Requireable<string>;
1495
+ ariaLabel: PropTypes.Requireable<string>;
1496
+ dataName: PropTypes.Requireable<string>;
1497
+ icon: PropTypes.Requireable<PropTypes.InferProps<{
1498
+ position: PropTypes.Requireable<string>;
1499
+ type: PropTypes.Requireable<string>;
1500
+ }>>;
1501
+ onClick: PropTypes.Requireable<(...args: any[]) => any>;
1502
+ }>>;
1448
1503
  }> | null | undefined>>;
1449
1504
  export const documentation: PropTypes.Requireable<PropTypes.InferProps<{
1450
1505
  content: PropTypes.Requireable<string>;
@@ -1543,6 +1598,7 @@ declare namespace BrandUpdate {
1543
1598
  headerTitle: PropTypes.Requireable<string>;
1544
1599
  }>>;
1545
1600
  export const onItemClick: PropTypes.Requireable<(...args: any[]) => any>;
1601
+ export const contentFixHeight: PropTypes.Requireable<boolean>;
1546
1602
  }
1547
1603
  }
1548
1604
  import PropTypes from "prop-types";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-update/index.js"],"names":[],"mappings":";AAmLA,sDAkCC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/back-office/brand-update/index.js"],"names":[],"mappings":";AAsLA,sDA6CC"}
@@ -23,6 +23,7 @@ import Loader from '../../../atom/loader';
23
23
  import Accordion from '../../../organism/accordion/coorp-manager';
24
24
  import CmPopin from '../../../molecule/cm-popin';
25
25
  import ButtonLinkIconOnly from '../../../atom/button-link-icon-only';
26
+ import EmptyStateDashboard from '../../../molecule/empty-state-dashboard';
26
27
  import style from './style.css';
27
28
 
28
29
  const getStyle = isSelected => isSelected ? style.selectedElement : style.unselectedElement;
@@ -176,6 +177,9 @@ const buildContentView = content => {
176
177
 
177
178
  case 'wizard':
178
179
  return /*#__PURE__*/React.createElement(WizardContents, content);
180
+
181
+ case 'empty-state-dashboard':
182
+ return /*#__PURE__*/React.createElement(EmptyStateDashboard, content);
179
183
  }
180
184
  };
181
185
 
@@ -193,7 +197,8 @@ const BrandUpdate = props => {
193
197
  details,
194
198
  popin,
195
199
  onItemClick,
196
- documentation
200
+ documentation,
201
+ contentFixHeight
197
202
  } = props;
198
203
  const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';
199
204
  const leftNavigation = buildLeftNavigation(logo, items, onItemClick);
@@ -204,7 +209,7 @@ const BrandUpdate = props => {
204
209
  const contentView = buildContentView(content);
205
210
  const detailsView = buildDetailsView(details);
206
211
  const popinView = buildPopin(popin);
207
- const contentStyle = classNames([style.content, !isEmpty(notifications) && style.contentWithNotifications]);
212
+ const contentStyle = classNames([style.content, !isEmpty(notifications) && style.contentWithNotifications, contentFixHeight && style.contentFixHeight]);
208
213
  return /*#__PURE__*/React.createElement("div", {
209
214
  className: style.container
210
215
  }, /*#__PURE__*/React.createElement("div", {
@@ -264,6 +269,9 @@ BrandUpdate.propTypes = process.env.NODE_ENV !== "production" ? {
264
269
  })), PropTypes.shape(_extends({}, ListItems.propTypes, {
265
270
  key: PropTypes.string,
266
271
  type: PropTypes.oneOf(['list-content'])
272
+ })), PropTypes.shape(_extends({}, EmptyStateDashboard.propTypes, {
273
+ key: PropTypes.string,
274
+ type: PropTypes.oneOf(['empty-state-dashboard'])
267
275
  }))]),
268
276
  documentation: PropTypes.shape({
269
277
  content: PropTypes.string,
@@ -275,7 +283,8 @@ BrandUpdate.propTypes = process.env.NODE_ENV !== "production" ? {
275
283
  key: PropTypes.string,
276
284
  type: PropTypes.oneOf(['list'])
277
285
  })),
278
- onItemClick: PropTypes.func
286
+ onItemClick: PropTypes.func,
287
+ contentFixHeight: PropTypes.bool
279
288
  } : {};
280
289
  export default BrandUpdate;
281
290
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","map","pipe","get","isEmpty","find","classNames","BrandTabs","IconLinkItem","LinkItem","BrandForm","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","Banner","Header","Loader","Accordion","CmPopin","ButtonLinkIconOnly","style","getStyle","isSelected","selectedElement","unselectedElement","subTabsView","_subTabs","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","notificationsList","notification","buildHeader","header","buildPopin","popin","buildDocumentation","documentation","show","onClose","content","open","documentationContent","__html","closeButton","buildTabs","selectedTab","e","showTabs","subTabs","undefined","buildContentView","loaderContainer","loader","buildDetailsView","details","BrandUpdate","props","leftNavigation","notificationsView","documentationView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","arrayOf","shape","string","isRequired","bool","oneOfType","oneOf","func"],"sources":["../../../../src/template/back-office/brand-update/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport ButtonLinkIconOnly from '../../../atom/button-link-icon-only';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildDocumentation = documentation => {\n if (!documentation) return null;\n const {show = false, onClose, content = ''} = documentation;\n return (\n <div className={classNames(style.documentation, show && style.open)}>\n <div\n className={style.documentationContent}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n {onClose ? (\n <ButtonLinkIconOnly\n className={style.closeButton}\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n return <WizardContents {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {notifications, header, items, content, details, popin, onItemClick, documentation} = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const documentationView = buildDocumentation(documentation);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n {documentationView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content'])\n })\n ]),\n documentation: PropTypes.shape({\n content: PropTypes.string,\n show: PropTypes.bool,\n onClose: PropTypes.func\n }),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func\n};\n\nexport default BrandUpdate;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,SAAQC,YAAR,EAAsBC,QAAtB,QAAqC,2BAArC;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,UAAP,MAAuB,+BAAvB;AACA,OAAOC,WAAP,MAAwB,gCAAxB;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,MAAP,MAAmB,0BAAnB;AACA,OAAOC,MAAP,MAAmB,gCAAnB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,SAAP,MAAsB,2CAAtB;AACA,OAAOC,OAAP,MAAoB,4BAApB;AACA,OAAOC,kBAAP,MAA+B,qCAA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V,cACJvF,UAAU,CAACqF,SADP;IAEPtD,GAAG,EAAE1C,SAAS,CAACmG,MAFR;IAGPhE,IAAI,EAAEnC,SAAS,CAACuG,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAHC,GA3Ea;EAgFtB/D,WAAW,EAAExC,SAAS,CAACwG;AAhFD,CAAxB;AAmFA,eAAezB,WAAf"}
1
+ {"version":3,"file":"index.js","names":["React","PropTypes","map","pipe","get","isEmpty","find","classNames","BrandTabs","IconLinkItem","LinkItem","BrandForm","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","Banner","Header","Loader","Accordion","CmPopin","ButtonLinkIconOnly","EmptyStateDashboard","style","getStyle","isSelected","selectedElement","unselectedElement","subTabsView","_subTabs","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","notificationsList","notification","buildHeader","header","buildPopin","popin","buildDocumentation","documentation","show","onClose","content","open","documentationContent","__html","closeButton","buildTabs","selectedTab","e","showTabs","subTabs","undefined","buildContentView","loaderContainer","loader","buildDetailsView","details","BrandUpdate","props","contentFixHeight","leftNavigation","notificationsView","documentationView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","arrayOf","shape","string","isRequired","bool","oneOfType","oneOf","func"],"sources":["../../../../src/template/back-office/brand-update/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport ButtonLinkIconOnly from '../../../atom/button-link-icon-only';\nimport EmptyStateDashboard from '../../../molecule/empty-state-dashboard';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildDocumentation = documentation => {\n if (!documentation) return null;\n const {show = false, onClose, content = ''} = documentation;\n return (\n <div className={classNames(style.documentation, show && style.open)}>\n <div\n className={style.documentationContent}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n {onClose ? (\n <ButtonLinkIconOnly\n className={style.closeButton}\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </div>\n );\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n return <WizardContents {...content} />;\n case 'empty-state-dashboard':\n return <EmptyStateDashboard {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {\n notifications,\n header,\n items,\n content,\n details,\n popin,\n onItemClick,\n documentation,\n contentFixHeight\n } = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const documentationView = buildDocumentation(documentation);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications,\n contentFixHeight && style.contentFixHeight\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n {documentationView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content'])\n }),\n PropTypes.shape({\n ...EmptyStateDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['empty-state-dashboard'])\n })\n ]),\n documentation: PropTypes.shape({\n content: PropTypes.string,\n show: PropTypes.bool,\n onClose: PropTypes.func\n }),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func,\n contentFixHeight: PropTypes.bool\n};\n\nexport default BrandUpdate;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,SAAQC,YAAR,EAAsBC,QAAtB,QAAqC,2BAArC;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,UAAP,MAAuB,+BAAvB;AACA,OAAOC,WAAP,MAAwB,gCAAxB;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,cAAP,MAA2B,mCAA3B;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,MAAP,M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ACoG,KAAV,cACK7E,mBAAmB,CAAC2E,SADzB;IAEEvD,GAAG,EAAE3C,SAAS,CAACqG,MAFjB;IAGEjE,IAAI,EAAEpC,SAAS,CAACyG,KAAV,CAAgB,CAAC,uBAAD,CAAhB;EAHR,GApC2B,CAApB,CAhCa;EA0EtB5C,aAAa,EAAE7D,SAAS,CAACoG,KAAV,CAAgB;IAC7BpC,OAAO,EAAEhE,SAAS,CAACqG,MADU;IAE7BvC,IAAI,EAAE9D,SAAS,CAACuG,IAFa;IAG7BxC,OAAO,EAAE/D,SAAS,CAAC0G;EAHU,CAAhB,CA1EO;EA+EtB/C,KAAK,EAAE3D,SAAS,CAACoG,KAAV,cAAoB/E,OAAO,CAAC6E,SAA5B,EA/Ee;EAgFtBnB,OAAO,EAAE/E,SAAS,CAACoG,KAAV,cACJzF,UAAU,CAACuF,SADP;IAEPvD,GAAG,EAAE3C,SAAS,CAACqG,MAFR;IAGPjE,IAAI,EAAEpC,SAAS,CAACyG,KAAV,CAAgB,CAAC,MAAD,CAAhB;EAHC,GAhFa;EAqFtBhE,WAAW,EAAEzC,SAAS,CAAC0G,IArFD;EAsFtBxB,gBAAgB,EAAElF,SAAS,CAACuG;AAtFN,CAAxB;AAyFA,eAAevB,WAAf"}
@@ -86,7 +86,8 @@
86
86
  height: 100%;
87
87
  overflow: scroll;
88
88
  z-index: 999;
89
- min-width: 240px
89
+ min-width: 240px;
90
+ width: 232px;
90
91
  }
91
92
 
92
93
  .content {
@@ -102,6 +103,9 @@
102
103
  top: 100px;
103
104
  }
104
105
 
106
+ .contentFixHeight {
107
+ height: calc(100% - 124px);
108
+ }
105
109
  .selectedElement {
106
110
  font-size: 12px;
107
111
  background-color: cm_grey_100;