@omniumretail/component-library 1.0.73 → 1.0.74

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 (177) hide show
  1. package/.storybook/main.js +16 -16
  2. package/.storybook/preview-head.html +20 -20
  3. package/.storybook/preview.js +27 -27
  4. package/NPMPUBLISH.md +29 -29
  5. package/README.md +54 -54
  6. package/bitbucket-pipelines.yml +94 -94
  7. package/dist/bundle.js +290 -246
  8. package/dist/main.css +5 -5
  9. package/dist/types/components/AnalyticsBar/AnalyticsBar.stories.d.ts +5 -5
  10. package/dist/types/components/AnalyticsBar/helpers/codeMutation.d.ts +4 -4
  11. package/dist/types/components/AnalyticsBar/index.d.ts +2 -2
  12. package/dist/types/components/AnalyticsBar/interfaces/analyticsBar.d.ts +12 -12
  13. package/dist/types/components/Button/Button.stories.d.ts +6 -6
  14. package/dist/types/components/Button/index.d.ts +7 -7
  15. package/dist/types/components/Category/Category.stories.d.ts +4 -4
  16. package/dist/types/components/Category/CategoryContent/index.d.ts +7 -7
  17. package/dist/types/components/Category/CategorySidebar/index.d.ts +26 -26
  18. package/dist/types/components/Category/index.d.ts +7 -7
  19. package/dist/types/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +4 -4
  20. package/dist/types/components/CategoryReadOnly/evaluationOptions.d.ts +10 -10
  21. package/dist/types/components/CategoryReadOnly/index.d.ts +9 -9
  22. package/dist/types/components/CategoryResponse/CategoryResponse.stories.d.ts +4 -4
  23. package/dist/types/components/CategoryResponse/evaluationOptions.d.ts +10 -10
  24. package/dist/types/components/CategoryResponse/index.d.ts +9 -9
  25. package/dist/types/components/DatePicker/DatePicker.stories.d.ts +5 -5
  26. package/dist/types/components/DatePicker/index.d.ts +8 -8
  27. package/dist/types/components/DatePickerTag/DatePickerTag.stories.d.ts +5 -5
  28. package/dist/types/components/DatePickerTag/index.d.ts +6 -6
  29. package/dist/types/components/Footer/Footer.stories.d.ts +5 -5
  30. package/dist/types/components/Footer/index.d.ts +4 -4
  31. package/dist/types/components/Input/Input.stories.d.ts +5 -5
  32. package/dist/types/components/Input/index.d.ts +10 -10
  33. package/dist/types/components/InputCountryCode/index.d.ts +10 -10
  34. package/dist/types/components/InputCountryCode/inputCountryCode.stories.d.ts +5 -5
  35. package/dist/types/components/Label/Label.stories.d.ts +6 -6
  36. package/dist/types/components/Label/index.d.ts +7 -7
  37. package/dist/types/components/Link/Link.stories.d.ts +7 -7
  38. package/dist/types/components/Link/index.d.ts +7 -7
  39. package/dist/types/components/Menu/Menu.stories.d.ts +5 -5
  40. package/dist/types/components/Menu/helpers/codeMutation.d.ts +4 -4
  41. package/dist/types/components/Menu/index.d.ts +2 -3
  42. package/dist/types/components/ModalConfirmation/ModalConfirmation.stories.d.ts +5 -5
  43. package/dist/types/components/ModalConfirmation/ModalStatusList.d.ts +5 -5
  44. package/dist/types/components/ModalConfirmation/index.d.ts +9 -9
  45. package/dist/types/components/ModalWithTable/ModalWithTable.stories.d.ts +5 -5
  46. package/dist/types/components/ModalWithTable/index.d.ts +13 -13
  47. package/dist/types/components/Navigation/Navigation.stories.d.ts +5 -5
  48. package/dist/types/components/Navigation/index.d.ts +10 -10
  49. package/dist/types/components/Notification/Notification.stories.d.ts +5 -5
  50. package/dist/types/components/Notification/index.d.ts +9 -9
  51. package/dist/types/components/Questions/Questions.stories.d.ts +4 -4
  52. package/dist/types/components/Questions/SingleQuestion/index.d.ts +1 -1
  53. package/dist/types/components/Questions/index.d.ts +5 -5
  54. package/dist/types/components/Radio/Radio.stories.d.ts +5 -5
  55. package/dist/types/components/Radio/index.d.ts +10 -10
  56. package/dist/types/components/Select/Select.stories.d.ts +6 -6
  57. package/dist/types/components/Select/index.d.ts +5 -5
  58. package/dist/types/components/Separator/Separator.stories.d.ts +6 -6
  59. package/dist/types/components/Separator/index.d.ts +11 -11
  60. package/dist/types/components/Sidebar/Sidebar.stories.d.ts +6 -6
  61. package/dist/types/components/Sidebar/index.d.ts +15 -15
  62. package/dist/types/components/Switch/Switch.stories.d.ts +5 -5
  63. package/dist/types/components/Switch/index.d.ts +2 -2
  64. package/dist/types/components/Table/Table.stories.d.ts +9 -9
  65. package/dist/types/components/Table/index.d.ts +37 -37
  66. package/dist/types/components/Tag/Tag.stories.d.ts +5 -5
  67. package/dist/types/components/Tag/index.d.ts +8 -8
  68. package/dist/types/components/Upload/Upload.stories.d.ts +4 -4
  69. package/dist/types/components/Upload/index.d.ts +8 -8
  70. package/dist/types/components/UserInfo/UserInfo.stories.d.ts +4 -4
  71. package/dist/types/components/UserInfo/index.d.ts +8 -8
  72. package/dist/types/components/index.d.ts +25 -25
  73. package/dist/types/constants/i18n.d.ts +1 -1
  74. package/dist/types/constants/translationHelper.d.ts +2 -2
  75. package/dist/types/index.d.ts +2 -2
  76. package/package.json +198 -198
  77. package/src/assets/scss/_global.scss +89 -89
  78. package/src/assets/scss/index.scss +2 -2
  79. package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +236 -236
  80. package/src/components/AnalyticsBar/helpers/codeMutation.tsx +19 -19
  81. package/src/components/AnalyticsBar/index.tsx +76 -76
  82. package/src/components/AnalyticsBar/interfaces/analyticsBar.tsx +13 -13
  83. package/src/components/AnalyticsBar/styles.module.scss +108 -108
  84. package/src/components/Button/Button.stories.tsx +26 -26
  85. package/src/components/Button/index.tsx +24 -24
  86. package/src/components/Button/styles.module.scss +65 -65
  87. package/src/components/Category/Category.stories.tsx +88 -88
  88. package/src/components/Category/CategoryContent/index.tsx +188 -188
  89. package/src/components/Category/CategoryContent/styles.module.scss +51 -51
  90. package/src/components/Category/CategorySidebar/index.tsx +268 -268
  91. package/src/components/Category/CategorySidebar/styles.module.scss +28 -28
  92. package/src/components/Category/index.tsx +76 -76
  93. package/src/components/Category/styles.module.scss +13 -13
  94. package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +270 -270
  95. package/src/components/CategoryReadOnly/evaluationOptions.tsx +81 -81
  96. package/src/components/CategoryReadOnly/index.tsx +254 -254
  97. package/src/components/CategoryReadOnly/styles.module.scss +184 -184
  98. package/src/components/CategoryResponse/CategoryResponse.stories.tsx +251 -251
  99. package/src/components/CategoryResponse/evaluationOptions.tsx +81 -81
  100. package/src/components/CategoryResponse/index.tsx +277 -277
  101. package/src/components/CategoryResponse/styles.module.scss +180 -180
  102. package/src/components/DatePicker/DatePicker.stories.tsx +16 -16
  103. package/src/components/DatePicker/index.tsx +38 -38
  104. package/src/components/DatePicker/styles.module.scss +3 -3
  105. package/src/components/DatePickerTag/DatePickerTag.stories.tsx +19 -19
  106. package/src/components/DatePickerTag/index.tsx +89 -89
  107. package/src/components/DatePickerTag/styles.module.scss +31 -31
  108. package/src/components/Footer/Footer.stories.tsx +14 -14
  109. package/src/components/Footer/index.tsx +38 -38
  110. package/src/components/Footer/styles.module.scss +38 -38
  111. package/src/components/Input/Input.stories.tsx +13 -13
  112. package/src/components/Input/index.tsx +31 -31
  113. package/src/components/Input/styles.module.scss +8 -8
  114. package/src/components/InputCountryCode/index.tsx +75 -75
  115. package/src/components/InputCountryCode/inputCountryCode.stories.tsx +55 -55
  116. package/src/components/InputCountryCode/styles.module.scss +3 -3
  117. package/src/components/Label/Label.stories.tsx +21 -21
  118. package/src/components/Label/index.tsx +19 -19
  119. package/src/components/Label/styles.module.scss +16 -16
  120. package/src/components/Link/Link.stories.tsx +30 -30
  121. package/src/components/Link/index.tsx +21 -21
  122. package/src/components/Link/styles.module.scss +24 -24
  123. package/src/components/Menu/Menu.stories.tsx +178 -178
  124. package/src/components/Menu/helpers/codeMutation.tsx +19 -19
  125. package/src/components/Menu/index.tsx +23 -23
  126. package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +40 -40
  127. package/src/components/ModalConfirmation/ModalStatusList.tsx +5 -5
  128. package/src/components/ModalConfirmation/index.tsx +70 -70
  129. package/src/components/ModalConfirmation/styles.module.scss +62 -62
  130. package/src/components/ModalWithTable/ModalWithTable.stories.tsx +96 -96
  131. package/src/components/ModalWithTable/index.tsx +232 -232
  132. package/src/components/ModalWithTable/styles.module.scss +77 -77
  133. package/src/components/Navigation/Navigation.stories.tsx +17 -17
  134. package/src/components/Navigation/index.tsx +33 -33
  135. package/src/components/Navigation/styles.module.scss +59 -58
  136. package/src/components/Notification/Notification.stories.tsx +29 -29
  137. package/src/components/Notification/index.tsx +21 -21
  138. package/src/components/Questions/Questions.stories.tsx +37 -37
  139. package/src/components/Questions/SingleQuestion/index.tsx +84 -84
  140. package/src/components/Questions/SingleQuestion/styles.module.scss +81 -81
  141. package/src/components/Questions/index.tsx +78 -78
  142. package/src/components/Radio/Radio.stories.tsx +43 -43
  143. package/src/components/Radio/index.tsx +26 -26
  144. package/src/components/Radio/styles.module.scss +23 -23
  145. package/src/components/Select/Select.stories.tsx +39 -39
  146. package/src/components/Select/index.tsx +27 -27
  147. package/src/components/Select/styles.module.scss +13 -13
  148. package/src/components/Separator/Separator.stories.tsx +22 -22
  149. package/src/components/Separator/index.tsx +27 -27
  150. package/src/components/Separator/styles.module.scss +25 -25
  151. package/src/components/Sidebar/Sidebar.stories.tsx +85 -85
  152. package/src/components/Sidebar/index.tsx +103 -103
  153. package/src/components/Sidebar/styles.module.scss +85 -85
  154. package/src/components/Switch/Switch.stories.tsx +14 -14
  155. package/src/components/Switch/index.tsx +8 -8
  156. package/src/components/Switch/styles.module.scss +7 -7
  157. package/src/components/Table/Table.stories.tsx +222 -222
  158. package/src/components/Table/index.tsx +275 -275
  159. package/src/components/Table/styles.module.scss +75 -75
  160. package/src/components/Tag/Tag.stories.tsx +22 -22
  161. package/src/components/Tag/index.tsx +189 -189
  162. package/src/components/Tag/styles.module.scss +60 -60
  163. package/src/components/Upload/Upload.stories.tsx +45 -45
  164. package/src/components/Upload/index.tsx +91 -91
  165. package/src/components/UserInfo/UserInfo.stories.tsx +37 -37
  166. package/src/components/UserInfo/index.tsx +62 -62
  167. package/src/components/UserInfo/styles.module.scss +29 -29
  168. package/src/components/index.tsx +25 -25
  169. package/src/constants/i18n.ts +25 -25
  170. package/src/constants/translationHelper.ts +7 -7
  171. package/src/index.ts +2 -2
  172. package/src/locales/en.json +86 -86
  173. package/src/locales/es.json +86 -86
  174. package/src/locales/pt.json +86 -86
  175. package/src/types/Global.d.ts +4 -4
  176. package/tsconfig.json +29 -29
  177. package/webpack.config.js +51 -51
@@ -1,76 +1,76 @@
1
- import styles from './styles.module.scss';
2
- import { CategorySidebar, DataNode } from './CategorySidebar';
3
- import { useEffect, useState } from 'react';
4
- import { CategoryContent } from './CategoryContent';
5
-
6
- interface Category {
7
- data: DataNode[];
8
- serverReadyData: any;
9
- }
10
-
11
- const fakeData: any = {
12
- data: [
13
- {
14
- "title": "opgg (Q: 1) ",
15
- "key": "0",
16
- "data": {
17
- "categoryName": "opgg",
18
- "openAnswer": true,
19
- "questions": [
20
- {
21
- "question": "1",
22
- "info": "2"
23
- }
24
- ]
25
- }
26
- },
27
- {
28
- "title": "abcd (Q: 1) (G: 2)",
29
- "key": "1",
30
- "data": {
31
- "categoryName": "abcd",
32
- "openAnswer": false,
33
- "questions": [
34
- {
35
- "question": "ax1",
36
- "info": "se2",
37
- "grade": "1s"
38
- }
39
- ],
40
- "generalEvaluationLevel": "2",
41
- "grade": "2"
42
- }
43
- }
44
- ],
45
- noData: []
46
- }
47
-
48
- export const Category = (props: Category) => {
49
- const {
50
- data
51
- } = props;
52
-
53
- const [categoryContentInfo, setCategoryContentInfo] = useState<any>();
54
- const [categorySidebarInfo, setCategorySidebarInfo] = useState<any>();
55
- const [showContent, setShowContent] = useState<boolean>(false);
56
- const [finalData, setFinalData] = useState<any>();
57
-
58
- useEffect(() => {
59
- props.serverReadyData(finalData)
60
- }, [finalData]);
61
-
62
- useEffect(() => {
63
- setShowContent(categorySidebarInfo?.selectKey?.length > 0);
64
- }, [categorySidebarInfo]);
65
-
66
- return (
67
- <div className={styles.category}>
68
- <div className={styles.sidebarWrapper}>
69
- <CategorySidebar categorySidebarInfo={setCategorySidebarInfo} categoryContentData={categoryContentInfo} data={data} categoryContentFinalData={setFinalData}/>
70
- </div>
71
- <div className={styles.contentWrapper}>
72
- <CategoryContent categoryContentInfo={setCategoryContentInfo} categoryContentShow={showContent} categorySidebarData={categorySidebarInfo} />
73
- </div>
74
- </div>
75
- )
76
- };
1
+ import styles from './styles.module.scss';
2
+ import { CategorySidebar, DataNode } from './CategorySidebar';
3
+ import { useEffect, useState } from 'react';
4
+ import { CategoryContent } from './CategoryContent';
5
+
6
+ interface Category {
7
+ data: DataNode[];
8
+ serverReadyData: any;
9
+ }
10
+
11
+ const fakeData: any = {
12
+ data: [
13
+ {
14
+ "title": "opgg (Q: 1) ",
15
+ "key": "0",
16
+ "data": {
17
+ "categoryName": "opgg",
18
+ "openAnswer": true,
19
+ "questions": [
20
+ {
21
+ "question": "1",
22
+ "info": "2"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "title": "abcd (Q: 1) (G: 2)",
29
+ "key": "1",
30
+ "data": {
31
+ "categoryName": "abcd",
32
+ "openAnswer": false,
33
+ "questions": [
34
+ {
35
+ "question": "ax1",
36
+ "info": "se2",
37
+ "grade": "1s"
38
+ }
39
+ ],
40
+ "generalEvaluationLevel": "2",
41
+ "grade": "2"
42
+ }
43
+ }
44
+ ],
45
+ noData: []
46
+ }
47
+
48
+ export const Category = (props: Category) => {
49
+ const {
50
+ data
51
+ } = props;
52
+
53
+ const [categoryContentInfo, setCategoryContentInfo] = useState<any>();
54
+ const [categorySidebarInfo, setCategorySidebarInfo] = useState<any>();
55
+ const [showContent, setShowContent] = useState<boolean>(false);
56
+ const [finalData, setFinalData] = useState<any>();
57
+
58
+ useEffect(() => {
59
+ props.serverReadyData(finalData)
60
+ }, [finalData]);
61
+
62
+ useEffect(() => {
63
+ setShowContent(categorySidebarInfo?.selectKey?.length > 0);
64
+ }, [categorySidebarInfo]);
65
+
66
+ return (
67
+ <div className={styles.category}>
68
+ <div className={styles.sidebarWrapper}>
69
+ <CategorySidebar categorySidebarInfo={setCategorySidebarInfo} categoryContentData={categoryContentInfo} data={data} categoryContentFinalData={setFinalData}/>
70
+ </div>
71
+ <div className={styles.contentWrapper}>
72
+ <CategoryContent categoryContentInfo={setCategoryContentInfo} categoryContentShow={showContent} categorySidebarData={categorySidebarInfo} />
73
+ </div>
74
+ </div>
75
+ )
76
+ };
@@ -1,13 +1,13 @@
1
- .category {
2
- display: grid;
3
- grid-template-columns: 300px auto;
4
- gap: 16px;
5
- }
6
-
7
- .sidebarWrapper,
8
- .contentWrapper {
9
- background: white;
10
- padding: 20px;
11
- overflow: auto;
12
- }
13
-
1
+ .category {
2
+ display: grid;
3
+ grid-template-columns: 300px auto;
4
+ gap: 16px;
5
+ }
6
+
7
+ .sidebarWrapper,
8
+ .contentWrapper {
9
+ background: white;
10
+ padding: 20px;
11
+ overflow: auto;
12
+ }
13
+