@omniumretail/component-library 1.2.70 → 1.2.72

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 (249) hide show
  1. package/dist/component-library.umd.js +1154 -0
  2. package/dist/{types/components → components}/AnalyticsBar/helpers/codeMutation.d.ts +2 -2
  3. package/dist/{types/components → components}/AnalyticsBar/index.d.ts +2 -1
  4. package/dist/{types/components → components}/Button/index.d.ts +2 -1
  5. package/dist/{types/components → components}/Category/index.d.ts +2 -1
  6. package/dist/{types/components → components}/CategoryReadOnly/index.d.ts +2 -1
  7. package/dist/{types/components → components}/CategoryResponse/index.d.ts +3 -2
  8. package/dist/{types/components → components}/DatePicker/index.d.ts +2 -1
  9. package/dist/{types/components → components}/DatePickerTag/index.d.ts +2 -1
  10. package/dist/{types/components → components}/DropdownButton/index.d.ts +3 -2
  11. package/dist/{types/components → components}/Footer2/index.d.ts +2 -1
  12. package/dist/{types/components → components}/Header/Header.data.d.ts +2 -1
  13. package/dist/{types/components → components}/Header/Header.types.d.ts +2 -1
  14. package/dist/{types/components → components}/Header/index.d.ts +2 -1
  15. package/dist/{types/components → components}/Input/index.d.ts +2 -1
  16. package/dist/{types/components → components}/InputCountryCode/index.d.ts +2 -1
  17. package/dist/{types/components → components}/Link/index.d.ts +2 -1
  18. package/dist/{types/components → components}/Menu/helpers/codeMutation.d.ts +2 -2
  19. package/dist/{types/components → components}/Menu/index.d.ts +2 -1
  20. package/dist/{types/components → components}/MobileTable/index.d.ts +2 -1
  21. package/dist/{types/components → components}/ModalWithTable/index.d.ts +2 -1
  22. package/dist/{types/components → components}/Notification/index.d.ts +2 -1
  23. package/dist/{types/components → components}/Radio/index.d.ts +3 -2
  24. package/dist/{types/components → components}/ResponsiveTable/index.d.ts +2 -1
  25. package/dist/{types/components → components}/Select/index.d.ts +2 -1
  26. package/dist/{types/components → components}/Switch/index.d.ts +2 -1
  27. package/dist/{types/components → components}/Table/index.d.ts +2 -1
  28. package/dist/{types/components → components}/Tag/index.d.ts +3 -2
  29. package/dist/{types/components → components}/Upload/index.d.ts +3 -2
  30. package/dist/{types/components → components}/WebCam/index.d.ts +2 -1
  31. package/{src/locales/en.json → dist/locales/en.json.d.ts} +4 -2
  32. package/{src/locales/es.json → dist/locales/es.json.d.ts} +4 -2
  33. package/{src/locales/pt.json → dist/locales/pt.json.d.ts} +4 -1
  34. package/package.json +98 -183
  35. package/NPMPUBLISH.md +0 -29
  36. package/bitbucket-pipelines.yml +0 -95
  37. package/dist/780.bundle.js +0 -1
  38. package/dist/838.bundle.js +0 -2
  39. package/dist/838.bundle.js.LICENSE.txt +0 -1
  40. package/dist/bundle.js +0 -2
  41. package/dist/bundle.js.LICENSE.txt +0 -451
  42. package/dist/main.css +0 -36
  43. package/dist/types/components/AnalyticsBar/AnalyticsBar.stories.d.ts +0 -4
  44. package/dist/types/components/BellNotifications/BellNotifications.stories.d.ts +0 -4
  45. package/dist/types/components/Button/Button.stories.d.ts +0 -5
  46. package/dist/types/components/Category/Category.stories.d.ts +0 -3
  47. package/dist/types/components/CategoryReadOnly/CategoryReadOnly.stories.d.ts +0 -3
  48. package/dist/types/components/CategoryResponse/CategoryResponse.stories.d.ts +0 -3
  49. package/dist/types/components/DatePicker/DatePicker.stories.d.ts +0 -4
  50. package/dist/types/components/DatePickerTag/DatePickerTag.stories.d.ts +0 -4
  51. package/dist/types/components/DropdownButton/DropdownButton.stories.d.ts +0 -4
  52. package/dist/types/components/ExportTableData/ExportTableData.stories.d.ts +0 -3
  53. package/dist/types/components/Footer/Footer.stories.d.ts +0 -4
  54. package/dist/types/components/Footer2/Footer.stories.d.ts +0 -5
  55. package/dist/types/components/Header/Header.stories.d.ts +0 -4
  56. package/dist/types/components/Input/Input.stories.d.ts +0 -4
  57. package/dist/types/components/InputCountryCode/inputCountryCode.stories.d.ts +0 -4
  58. package/dist/types/components/Label/Label.stories.d.ts +0 -5
  59. package/dist/types/components/Link/Link.stories.d.ts +0 -6
  60. package/dist/types/components/Menu/Menu.stories.d.ts +0 -4
  61. package/dist/types/components/MobileTable/MobileTable.stories.d.ts +0 -4
  62. package/dist/types/components/ModalConfirmation/ModalConfirmation.stories.d.ts +0 -4
  63. package/dist/types/components/ModalWithTable/ModalWithTable.stories.d.ts +0 -4
  64. package/dist/types/components/Navigation/Navigation.stories.d.ts +0 -4
  65. package/dist/types/components/Notification/Notification.stories.d.ts +0 -4
  66. package/dist/types/components/Questions/Questions.stories.d.ts +0 -3
  67. package/dist/types/components/Radio/Radio.stories.d.ts +0 -4
  68. package/dist/types/components/ResponseType/ResponseType.stories.d.ts +0 -3
  69. package/dist/types/components/ResponsiveTable/ResponsiveTable.stories.d.ts +0 -8
  70. package/dist/types/components/Select/Select.stories.d.ts +0 -5
  71. package/dist/types/components/Separator/Separator.stories.d.ts +0 -5
  72. package/dist/types/components/Sidebar/Sidebar.stories.d.ts +0 -5
  73. package/dist/types/components/Switch/Switch.stories.d.ts +0 -4
  74. package/dist/types/components/Table/Table.stories.d.ts +0 -8
  75. package/dist/types/components/Tag/Tag.stories.d.ts +0 -4
  76. package/dist/types/components/Upload/Upload.stories.d.ts +0 -3
  77. package/dist/types/components/UserInfo/UserInfo.stories.d.ts +0 -3
  78. package/dist/types/components/WebCam/WebCam.stories.d.ts +0 -3
  79. package/src/assets/code-brackets.svg +0 -1
  80. package/src/assets/colors.svg +0 -1
  81. package/src/assets/comments.svg +0 -1
  82. package/src/assets/direction.svg +0 -1
  83. package/src/assets/flow.svg +0 -1
  84. package/src/assets/fonts/Silka-Bold.woff2 +0 -0
  85. package/src/assets/fonts/Silka-Regular.woff2 +0 -0
  86. package/src/assets/images/A2AI-logo.png +0 -0
  87. package/src/assets/images/omnium-retail-logo-white.png +0 -0
  88. package/src/assets/images/omnium-retail-logo.png +0 -0
  89. package/src/assets/images/omnium-retail_icon.png +0 -0
  90. package/src/assets/plugin.svg +0 -1
  91. package/src/assets/repo.svg +0 -1
  92. package/src/assets/scss/_combinations.scss +0 -0
  93. package/src/assets/scss/_global.scss +0 -89
  94. package/src/assets/scss/index.scss +0 -2
  95. package/src/assets/stackalt.svg +0 -1
  96. package/src/components/AnalyticsBar/AnalyticsBar.stories.tsx +0 -236
  97. package/src/components/AnalyticsBar/helpers/codeMutation.tsx +0 -19
  98. package/src/components/AnalyticsBar/index.tsx +0 -76
  99. package/src/components/AnalyticsBar/interfaces/analyticsBar.tsx +0 -13
  100. package/src/components/AnalyticsBar/styles.module.scss +0 -137
  101. package/src/components/BellNotifications/BellNotifications.stories.tsx +0 -200
  102. package/src/components/BellNotifications/index.tsx +0 -154
  103. package/src/components/BellNotifications/styles.module.scss +0 -239
  104. package/src/components/Button/Button.stories.tsx +0 -26
  105. package/src/components/Button/index.tsx +0 -24
  106. package/src/components/Button/styles.module.scss +0 -70
  107. package/src/components/Category/Category.stories.tsx +0 -371
  108. package/src/components/Category/CategoryContent/index.tsx +0 -255
  109. package/src/components/Category/CategoryContent/styles.module.scss +0 -69
  110. package/src/components/Category/CategorySidebar/index.tsx +0 -344
  111. package/src/components/Category/CategorySidebar/styles.module.scss +0 -28
  112. package/src/components/Category/index.tsx +0 -58
  113. package/src/components/Category/styles.module.scss +0 -13
  114. package/src/components/CategoryReadOnly/CategoryReadOnly.stories.tsx +0 -274
  115. package/src/components/CategoryReadOnly/evaluationOptions.tsx +0 -81
  116. package/src/components/CategoryReadOnly/index.tsx +0 -328
  117. package/src/components/CategoryReadOnly/styles.module.scss +0 -214
  118. package/src/components/CategoryResponse/CategoryResponse.stories.tsx +0 -312
  119. package/src/components/CategoryResponse/evaluationOptions.tsx +0 -81
  120. package/src/components/CategoryResponse/index.tsx +0 -502
  121. package/src/components/CategoryResponse/styles.module.scss +0 -365
  122. package/src/components/DatePicker/DatePicker.stories.tsx +0 -16
  123. package/src/components/DatePicker/index.tsx +0 -38
  124. package/src/components/DatePicker/styles.module.scss +0 -3
  125. package/src/components/DatePickerTag/DatePickerTag.stories.tsx +0 -19
  126. package/src/components/DatePickerTag/index.tsx +0 -91
  127. package/src/components/DatePickerTag/styles.module.scss +0 -32
  128. package/src/components/DropdownButton/DropdownButton.stories.tsx +0 -24
  129. package/src/components/DropdownButton/index.tsx +0 -36
  130. package/src/components/DropdownButton/styles.module.scss +0 -9
  131. package/src/components/ExportTableData/ExportTableData.stories.tsx +0 -43
  132. package/src/components/ExportTableData/index.tsx +0 -37
  133. package/src/components/ExportTableData/styles.module.scss +0 -4
  134. package/src/components/Footer/Footer.stories.tsx +0 -15
  135. package/src/components/Footer/index.tsx +0 -45
  136. package/src/components/Footer/styles.module.scss +0 -38
  137. package/src/components/Footer2/Footer.stories.tsx +0 -184
  138. package/src/components/Footer2/index.tsx +0 -322
  139. package/src/components/Footer2/styles.module.scss +0 -292
  140. package/src/components/Header/Header.data.ts +0 -26
  141. package/src/components/Header/Header.stories.tsx +0 -236
  142. package/src/components/Header/Header.types.ts +0 -32
  143. package/src/components/Header/README.md +0 -38
  144. package/src/components/Header/index.tsx +0 -200
  145. package/src/components/Header/styles.module.scss +0 -216
  146. package/src/components/Input/Input.stories.tsx +0 -13
  147. package/src/components/Input/index.tsx +0 -31
  148. package/src/components/Input/styles.module.scss +0 -8
  149. package/src/components/InputCountryCode/index.tsx +0 -79
  150. package/src/components/InputCountryCode/inputCountryCode.stories.tsx +0 -55
  151. package/src/components/InputCountryCode/styles.module.scss +0 -3
  152. package/src/components/Label/Label.stories.tsx +0 -21
  153. package/src/components/Label/index.tsx +0 -19
  154. package/src/components/Label/styles.module.scss +0 -17
  155. package/src/components/Link/Link.stories.tsx +0 -30
  156. package/src/components/Link/index.tsx +0 -21
  157. package/src/components/Link/styles.module.scss +0 -24
  158. package/src/components/Menu/Menu.stories.tsx +0 -178
  159. package/src/components/Menu/helpers/codeMutation.tsx +0 -19
  160. package/src/components/Menu/index.tsx +0 -24
  161. package/src/components/Menu/styles.module.scss +0 -0
  162. package/src/components/MobileTable/MobileTable.stories.tsx +0 -27
  163. package/src/components/MobileTable/index.tsx +0 -102
  164. package/src/components/MobileTable/styles.module.scss +0 -75
  165. package/src/components/ModalConfirmation/ModalConfirmation.stories.tsx +0 -40
  166. package/src/components/ModalConfirmation/ModalStatusList.tsx +0 -5
  167. package/src/components/ModalConfirmation/index.tsx +0 -71
  168. package/src/components/ModalConfirmation/styles.module.scss +0 -62
  169. package/src/components/ModalWithTable/ModalWithTable.stories.tsx +0 -99
  170. package/src/components/ModalWithTable/index.tsx +0 -238
  171. package/src/components/ModalWithTable/styles.module.scss +0 -77
  172. package/src/components/Navigation/Navigation.stories.tsx +0 -21
  173. package/src/components/Navigation/index.tsx +0 -91
  174. package/src/components/Navigation/styles.module.scss +0 -91
  175. package/src/components/Notification/Notification.stories.tsx +0 -32
  176. package/src/components/Notification/index.tsx +0 -28
  177. package/src/components/Questions/Questions.stories.tsx +0 -37
  178. package/src/components/Questions/SingleQuestion/index.tsx +0 -337
  179. package/src/components/Questions/SingleQuestion/styles.module.scss +0 -142
  180. package/src/components/Questions/index.tsx +0 -124
  181. package/src/components/Questions/styles.modules.scss +0 -0
  182. package/src/components/Radio/Radio.stories.tsx +0 -43
  183. package/src/components/Radio/index.tsx +0 -26
  184. package/src/components/Radio/styles.module.scss +0 -24
  185. package/src/components/ResponseType/ResponseType.stories.tsx +0 -393
  186. package/src/components/ResponseType/index.tsx +0 -100
  187. package/src/components/ResponseType/styles.module.scss +0 -31
  188. package/src/components/ResponsiveTable/ResponsiveTable.stories.tsx +0 -386
  189. package/src/components/ResponsiveTable/index.tsx +0 -389
  190. package/src/components/ResponsiveTable/styles.module.scss +0 -153
  191. package/src/components/Select/Select.stories.tsx +0 -39
  192. package/src/components/Select/index.tsx +0 -27
  193. package/src/components/Select/styles.module.scss +0 -19
  194. package/src/components/Separator/Separator.stories.tsx +0 -22
  195. package/src/components/Separator/index.tsx +0 -27
  196. package/src/components/Separator/styles.module.scss +0 -25
  197. package/src/components/Sidebar/Sidebar.stories.tsx +0 -85
  198. package/src/components/Sidebar/index.tsx +0 -127
  199. package/src/components/Sidebar/styles.module.scss +0 -141
  200. package/src/components/Switch/Switch.stories.tsx +0 -14
  201. package/src/components/Switch/index.tsx +0 -18
  202. package/src/components/Switch/styles.module.scss +0 -7
  203. package/src/components/Table/Table.stories.tsx +0 -337
  204. package/src/components/Table/index.tsx +0 -313
  205. package/src/components/Table/styles.module.scss +0 -97
  206. package/src/components/Tag/Tag.stories.tsx +0 -32
  207. package/src/components/Tag/index.tsx +0 -295
  208. package/src/components/Tag/styles.module.scss +0 -104
  209. package/src/components/Upload/Upload.stories.tsx +0 -45
  210. package/src/components/Upload/index.tsx +0 -112
  211. package/src/components/Upload/styles.module.scss +0 -29
  212. package/src/components/UserInfo/UserInfo.stories.tsx +0 -38
  213. package/src/components/UserInfo/index.tsx +0 -77
  214. package/src/components/UserInfo/styles.module.scss +0 -35
  215. package/src/components/WebCam/WebCam.stories.tsx +0 -24
  216. package/src/components/WebCam/index.tsx +0 -73
  217. package/src/components/WebCam/styles.module.scss +0 -37
  218. package/src/components/index.tsx +0 -34
  219. package/src/constants/i18n.ts +0 -25
  220. package/src/constants/logoCompanyHelper.ts +0 -52
  221. package/src/constants/translationHelper.ts +0 -7
  222. package/src/index.ts +0 -3
  223. package/src/types/Global.d.ts +0 -4
  224. package/tsconfig.json +0 -29
  225. package/webpack.config.js +0 -51
  226. /package/dist/{types/components → components}/AnalyticsBar/interfaces/analyticsBar.d.ts +0 -0
  227. /package/dist/{types/components → components}/BellNotifications/index.d.ts +0 -0
  228. /package/dist/{types/components → components}/Category/CategoryContent/index.d.ts +0 -0
  229. /package/dist/{types/components → components}/Category/CategorySidebar/index.d.ts +0 -0
  230. /package/dist/{types/components → components}/CategoryReadOnly/evaluationOptions.d.ts +0 -0
  231. /package/dist/{types/components → components}/CategoryResponse/evaluationOptions.d.ts +0 -0
  232. /package/dist/{types/components → components}/ExportTableData/index.d.ts +0 -0
  233. /package/dist/{types/components → components}/Footer/index.d.ts +0 -0
  234. /package/dist/{types/components → components}/Label/index.d.ts +0 -0
  235. /package/dist/{types/components → components}/ModalConfirmation/ModalStatusList.d.ts +0 -0
  236. /package/dist/{types/components → components}/ModalConfirmation/index.d.ts +0 -0
  237. /package/dist/{types/components → components}/Navigation/index.d.ts +0 -0
  238. /package/dist/{types/components → components}/Questions/SingleQuestion/index.d.ts +0 -0
  239. /package/dist/{types/components → components}/Questions/index.d.ts +0 -0
  240. /package/dist/{types/components → components}/ResponseType/index.d.ts +0 -0
  241. /package/dist/{types/components → components}/Separator/index.d.ts +0 -0
  242. /package/dist/{types/components → components}/Sidebar/index.d.ts +0 -0
  243. /package/dist/{types/components → components}/UserInfo/index.d.ts +0 -0
  244. /package/dist/{types/components → components}/index.d.ts +0 -0
  245. /package/dist/{types/constants → constants}/i18n.d.ts +0 -0
  246. /package/dist/{types/constants → constants}/logoCompanyHelper.d.ts +0 -0
  247. /package/dist/{types/constants → constants}/translationHelper.d.ts +0 -0
  248. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
  249. /package/{public → dist}/index.ts +0 -0
@@ -1,21 +0,0 @@
1
- import { Button as AntButton, ButtonProps } from 'antd';
2
- import styles from './styles.module.scss';
3
- import classNames from 'classnames';
4
-
5
- export interface CustomLinkProps extends ButtonProps {
6
- iconAlignRight?: boolean;
7
- linkSecondary?: boolean;
8
- customClass?: string;
9
- }
10
-
11
- export const Link = ({customClass, iconAlignRight, linkSecondary, ...props}: CustomLinkProps) => {
12
- const linkClasses = classNames({
13
- [styles.iconAlignRight]: iconAlignRight,
14
- [styles.linkSecondary]: linkSecondary,
15
- [`${customClass}`]: customClass,
16
- }, [styles.link]);
17
-
18
- return (
19
- <AntButton { ...props } className={ linkClasses } type={'link'} />
20
- );
21
- };
@@ -1,24 +0,0 @@
1
- .link {
2
- display: inline-flex;
3
- text-decoration: none;
4
- height: auto;
5
-
6
- color: var(--color-black);
7
- font-size: var(--font-size-body-3);
8
- line-height: 100%;
9
- font-weight: 300;
10
- font-style: var(--font-style-italic);
11
- }
12
-
13
- .linkSecondary {
14
- color: var(--color-orange);
15
- font-style: var(--font-style-normal);
16
- }
17
-
18
- .iconAlignRight {
19
- span:nth-child(2) {
20
- margin-inline-end: 8px;
21
- margin-inline-start: 0;
22
- order: -1;
23
- }
24
- }
@@ -1,178 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react-webpack5";
2
- import { Menu } from '.';
3
- import { MenuProps } from 'antd';
4
- import { getItem } from './helpers/codeMutation';
5
-
6
- export default {
7
- title: 'Menu',
8
- component: Menu,
9
- } as Meta;
10
-
11
- const Template: StoryFn<MenuProps> = (args: any) => {
12
- const data = [
13
- {
14
- "Year": 2023,
15
- "EvaluationCycles": [
16
- {
17
- "Id": "D5A77A3B-1163-4590-9C98-2E6D62442F62",
18
- "Type": "Permanent",
19
- "Name": "EV1",
20
- "Year": 2023,
21
- "StartDate": "2023-03-01T00:00:00Z",
22
- "EndDate": "2023-05-31T23:00:00Z",
23
- "Users": [
24
- {
25
- "UserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
26
- "UserAnswer": null,
27
- "UserScore": null,
28
- "SupervisorId": null,
29
- "SupervisorAnswer": null,
30
- "SupervisorScore": null
31
- },
32
- {
33
- "UserId": "9D361E92-A748-4E4A-BC5E-0134CE62328E",
34
- "UserAnswer": "982FF376-56AD-4E3F-B0D0-5BD4282A7F78",
35
- "UserScore": 3.333,
36
- "SupervisorId": null,
37
- "SupervisorAnswer": null,
38
- "SupervisorScore": null
39
- },
40
- {
41
- "UserId": "594A4DD5-12B1-4ED0-B00C-EDF729B85C57",
42
- "UserAnswer": null,
43
- "UserScore": null,
44
- "SupervisorId": null,
45
- "SupervisorAnswer": null,
46
- "SupervisorScore": null
47
- }
48
- ],
49
- "QuestionnaireId": "4C15A0A0-7DDF-4952-810C-B46105807CB7",
50
- "State": "Started",
51
- "Notifications": [],
52
- "NotificationAgenda": null,
53
- "Status": "A",
54
- "IsOnlyForUsers": false,
55
- "CreateDate": "2023-02-27T10:50:41.737Z",
56
- "UpdateDate": "2023-02-27T10:52:50.661Z",
57
- "CreateUserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
58
- "UpdateUserId": null,
59
- "InitiatDate": "2023-02-27T10:51:00Z",
60
- "CancelDate": "0001-01-01T00:00:00Z"
61
- },
62
- {
63
- "Id": "42A6EFDD-6D74-4905-94AE-5B5588967BE6",
64
- "Type": "Permanent",
65
- "Name": "EV1",
66
- "Year": 2023,
67
- "StartDate": "2023-03-01T00:00:00Z",
68
- "EndDate": "2023-05-31T23:00:00Z",
69
- "Users": [],
70
- "QuestionnaireId": "4C15A0A0-7DDF-4952-810C-B46105807CB7",
71
- "State": "Draft",
72
- "Notifications": [],
73
- "NotificationAgenda": null,
74
- "Status": "A",
75
- "IsOnlyForUsers": false,
76
- "CreateDate": "2023-02-27T14:52:16.523Z",
77
- "UpdateDate": "2023-02-27T14:53:04.987Z",
78
- "CreateUserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
79
- "UpdateUserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
80
- "InitiatDate": "0001-01-01T00:00:00Z",
81
- "CancelDate": "0001-01-01T00:00:00Z"
82
- }
83
- ]
84
- },
85
- {
86
- "Year": 2024,
87
- "EvaluationCycles": [
88
- {
89
- "Id": "D5A77A3B-1163-4590-9C98-2E6D62442F62",
90
- "Type": "Permanent",
91
- "Name": "EV2",
92
- "Year": 2024,
93
- "StartDate": "2023-03-01T00:00:00Z",
94
- "EndDate": "2023-05-31T23:00:00Z",
95
- "Users": [
96
- {
97
- "UserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
98
- "UserAnswer": null,
99
- "UserScore": null,
100
- "SupervisorId": null,
101
- "SupervisorAnswer": null,
102
- "SupervisorScore": null
103
- },
104
- {
105
- "UserId": "9D361E92-A748-4E4A-BC5E-0134CE62328E",
106
- "UserAnswer": "982FF376-56AD-4E3F-B0D0-5BD4282A7F78",
107
- "UserScore": 3.333,
108
- "SupervisorId": null,
109
- "SupervisorAnswer": null,
110
- "SupervisorScore": null
111
- },
112
- {
113
- "UserId": "594A4DD5-12B1-4ED0-B00C-EDF729B85C57",
114
- "UserAnswer": null,
115
- "UserScore": null,
116
- "SupervisorId": null,
117
- "SupervisorAnswer": null,
118
- "SupervisorScore": null
119
- }
120
- ],
121
- "QuestionnaireId": "4C15A0A0-7DDF-4952-810C-B46105807CB7",
122
- "State": "Started",
123
- "Notifications": [],
124
- "NotificationAgenda": null,
125
- "Status": "A",
126
- "IsOnlyForUsers": false,
127
- "CreateDate": "2023-02-27T10:50:41.737Z",
128
- "UpdateDate": "2023-02-27T10:52:50.661Z",
129
- "CreateUserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
130
- "UpdateUserId": null,
131
- "InitiatDate": "2023-02-27T10:51:00Z",
132
- "CancelDate": "0001-01-01T00:00:00Z"
133
- },
134
- {
135
- "Id": "42A6EFDD-6D74-4905-94AE-5B5588967BE6",
136
- "Type": "Permanent",
137
- "Name": "EV2",
138
- "Year": 2024,
139
- "StartDate": "2023-03-01T00:00:00Z",
140
- "EndDate": "2023-05-31T23:00:00Z",
141
- "Users": [],
142
- "QuestionnaireId": "4C15A0A0-7DDF-4952-810C-B46105807CB7",
143
- "State": "Draft",
144
- "Notifications": [],
145
- "NotificationAgenda": null,
146
- "Status": "A",
147
- "IsOnlyForUsers": false,
148
- "CreateDate": "2023-02-27T14:52:16.523Z",
149
- "UpdateDate": "2023-02-27T14:53:04.987Z",
150
- "CreateUserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
151
- "UpdateUserId": "A200F4C5-8E41-41D4-A90C-B15EEC448517",
152
- "InitiatDate": "0001-01-01T00:00:00Z",
153
- "CancelDate": "0001-01-01T00:00:00Z"
154
- }
155
- ]
156
- }
157
- ];
158
-
159
- const items = data.map((el: any, index: any) => {
160
- return (
161
- getItem(
162
- el.Year,
163
- index,
164
- <></>,
165
- el.EvaluationCycles?.map((evCycle: any, subIndex: any) => {
166
- return getItem(evCycle.Name, `${index}-${subIndex}`);
167
- })
168
- )
169
- )
170
- });
171
-
172
-
173
- return <Menu {...args} items={items}></Menu>;
174
- }
175
-
176
- export const Primary = Template.bind({});
177
- Primary.args = {
178
- };
@@ -1,19 +0,0 @@
1
- import type { MenuProps } from 'antd';
2
-
3
- export type MenuItem = Required<MenuProps>['items'][number];
4
-
5
- export function getItem(
6
- label: React.ReactNode,
7
- key: React.Key,
8
- icon?: React.ReactNode,
9
- children?: MenuItem[],
10
- type?: 'group',
11
- ): MenuItem {
12
- return {
13
- key,
14
- icon,
15
- children,
16
- label,
17
- type,
18
- } as MenuItem;
19
- }
@@ -1,24 +0,0 @@
1
- import styles from './styles.module.scss';
2
- import { MinusOutlined, PlusOutlined } from '@ant-design/icons';
3
- import type { MenuProps } from 'antd';
4
- import { Menu as MenuAntd} from 'antd';
5
-
6
- export const Menu = (props: MenuProps) => {
7
- const {
8
- items,
9
- mode
10
- } = props;
11
-
12
- const onClick: MenuProps['onClick'] = (e) => {
13
- // console.log('click ', e);
14
- };
15
-
16
- return (
17
- <MenuAntd
18
- onClick={onClick}
19
- mode={mode || "inline"}
20
- items={items}
21
- expandIcon={({ isOpen }) => (isOpen ? <MinusOutlined /> : <PlusOutlined />)}
22
- />
23
- );
24
- };
File without changes
@@ -1,27 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react-webpack5";
2
- import { useEffect, useState } from "react";
3
- import { MobileTable, MobileTableProps } from '.';
4
-
5
- export default {
6
- title: 'MobileTable',
7
- component: MobileTable,
8
- } as Meta;
9
-
10
- const Template: StoryFn<MobileTableProps> = (args: any) => {
11
- const [modalData, setModalData] = useState<any>({});
12
- const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
13
-
14
-
15
-
16
-
17
- return (
18
- <>
19
- <MobileTable {...args}></MobileTable>
20
- </>
21
- )
22
- }
23
-
24
- export const Primary = Template.bind({});
25
- Primary.args = {
26
-
27
- };
@@ -1,102 +0,0 @@
1
- import styles from './styles.module.scss';
2
- import { Descriptions, Dropdown, Menu, Modal } from 'antd';
3
- import { useTranslation } from 'react-i18next';
4
- import {
5
- LeftCircleOutlined,
6
- RightCircleOutlined,
7
- } from "@ant-design/icons";
8
- import { Dispatch, SetStateAction } from 'react';
9
- import React from 'react';
10
- import { Button } from '../Button';
11
-
12
- interface Action {
13
- key: string;
14
- label: string;
15
- onClick: () => void;
16
- }
17
-
18
- export interface MobileTableProps {
19
- data: Record<string, any>;
20
- translation: string;
21
- modalVisible: boolean;
22
- setModalVisible: Dispatch<SetStateAction<boolean>>;
23
- title: string;
24
- hasArrows?: boolean;
25
- actions?: Action[];
26
- handlePrev?: () => void;
27
- handleNext?: () => void;
28
- hiddenColumns?: string[];
29
- modalTableData?: any;
30
- currentIndex?: number;
31
- }
32
-
33
- export const MobileTable = (
34
- {
35
- data, title, translation, modalVisible, setModalVisible, actions = [], hiddenColumns = [], hasArrows = true, handleNext, handlePrev, modalTableData, currentIndex
36
- }: MobileTableProps) => {
37
-
38
- const { t } = useTranslation();
39
-
40
- const menu = (
41
- <Menu>
42
- {actions?.map((action, index) => (
43
- <React.Fragment key={action.key}>
44
- <Menu.Item key={action.key} onClick={action.onClick}>
45
- {action.label}
46
- </Menu.Item>
47
-
48
- {index < actions.length - 1 && <Menu.Divider />}
49
- </React.Fragment>
50
- )) || []}
51
- </Menu>
52
- );
53
-
54
- return (
55
- <Modal
56
- title={title}
57
- open={modalVisible}
58
- onCancel={() => setModalVisible(false)}
59
- className={styles.fullScreenModal}
60
- wrapClassName={styles.wrapModal}
61
- centered
62
- footer={(
63
- <div className={`${styles.footer} ${hasArrows ? styles.center : ""}`}>
64
- {hasArrows &&
65
- <LeftCircleOutlined
66
- className={`${styles.arrowIcons} ${currentIndex === 0 ? styles.disabledIcon : ""}`}
67
- onClick={handlePrev}
68
- disabled={currentIndex === 0}
69
- />
70
- }
71
-
72
- {actions?.length > 0 &&
73
- <Dropdown overlay={menu}>
74
- <Button>{t("tableHeadings.action")}</Button>
75
- </Dropdown>
76
- }
77
-
78
-
79
- {hasArrows &&
80
- <RightCircleOutlined
81
- className={`${styles.arrowIcons} ${currentIndex === modalTableData?.length! - 1 ? styles.disabledIcon : ""}`}
82
- onClick={handleNext}
83
- disabled={currentIndex === modalTableData?.length! - 1}
84
- />
85
- }
86
- </div>
87
- )}
88
- >
89
- <div className={styles.details}>
90
- <Descriptions bordered column={{ xs: 1, sm: 1, md: 1 }}>
91
- {Object.entries(data)
92
- .filter(([key]) => !hiddenColumns.includes(key))
93
- .map(([key, value]) => (
94
- <Descriptions.Item key={key} label={t(`${translation}.${key}`, key)}>
95
- {Array.isArray(value) ? value.join(", ") : value ?? "-"}
96
- </Descriptions.Item>
97
- ))}
98
- </Descriptions>
99
- </div>
100
- </Modal>
101
- );
102
- };
@@ -1,75 +0,0 @@
1
- .details {
2
- display: flex;
3
- align-items: center;
4
- width: 100%;
5
- margin: 16px 0;
6
- box-sizing: border-box;
7
-
8
- :global {
9
- .ant-descriptions {
10
- width: calc(100vw - 24px);
11
- }
12
-
13
- .ant-descriptions-item-label {
14
- max-width: 140px !important;
15
- padding: 8px 16px !important;
16
- color: var(--color-blue) !important;
17
- font-weight: 700 !important;
18
- font-size: 12px !important;
19
- }
20
-
21
- .ant-descriptions-item-content {
22
- padding: 8px 16px !important;
23
- font-size: 12px !important;
24
- }
25
- }
26
- }
27
-
28
- .fullScreenModal {
29
- width: 100vw !important;
30
- max-width: 100vw !important;
31
- padding: 0px 12px;
32
- }
33
-
34
- .wrapModal {
35
- overflow: hidden !important;
36
-
37
- :global {
38
- .ant-modal .ant-modal-body {
39
- overflow-y: auto;
40
- overflow-x: hidden;
41
- max-height: 80vh;
42
- }
43
-
44
- .ant-modal .ant-modal-content {
45
- padding: 20px 12px !important;
46
- }
47
-
48
- .ant-modal-header {
49
- text-align: center !important;
50
- }
51
-
52
- .ant-modal-close {
53
- color: var(--button-default-background-hover-color);
54
- }
55
- }
56
- }
57
-
58
- .footer {
59
- display: flex;
60
- justify-content: center;
61
-
62
- &.center {
63
- justify-content: space-between;
64
- }
65
- }
66
-
67
- .arrowIcons {
68
- color: var(--button-default-background);
69
- font-size: 26px;
70
- }
71
-
72
- .disabledIcon {
73
- color: #c7cac9;
74
- pointer-events: none;
75
- }
@@ -1,40 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react-webpack5";
2
- import { useEffect, useState } from "react";
3
- import { ModalConfirmation, ModalConfirmationProps } from '.';
4
- import { ModalStatus } from './ModalStatusList';
5
-
6
- export default {
7
- title: 'ModalConfirmation',
8
- component: ModalConfirmation,
9
- } as Meta;
10
-
11
- const Template: StoryFn<ModalConfirmationProps> = (args: any) => {
12
- const [modalData, setModalData] = useState<any>({});
13
- const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
14
-
15
- console.log(modalData);
16
-
17
- const onClickMe = () => {
18
- setIsModalOpen(true);
19
- }
20
-
21
- useEffect(() => {
22
- setIsModalOpen(modalData.status === ModalStatus.OPEN);
23
- }, [modalData])
24
-
25
-
26
- return (
27
- <>
28
- <button onClick={() => onClickMe()}> Button </button>
29
- <ModalConfirmation {...args} isOpen={isModalOpen} modalData={setModalData}></ModalConfirmation>
30
- </>
31
- )
32
- }
33
-
34
- export const Primary = Template.bind({});
35
- Primary.args = {
36
- closeText: 'cancelar',
37
- title: 'Tem a certeza que deseja alterar o tipo de ciclo?',
38
- description: 'Ao alterar, todos os dados inseridos serão eliminados.',
39
- buttonText: 'Alterar',
40
- };
@@ -1,5 +0,0 @@
1
- export const ModalStatus = {
2
- CANCELED: "CANCELED",
3
- OPEN: "OPEN",
4
- REQUESTED_CHANGES: "REQUESTED_CHANGES",
5
- }
@@ -1,71 +0,0 @@
1
- import { Button } from '../Button';
2
- import { Modal } from 'antd';
3
- import { useEffect, useState } from 'react';
4
- import { CloseOutlined } from '@ant-design/icons';
5
- import styles from './styles.module.scss';
6
- import { ModalStatus } from './ModalStatusList';
7
-
8
- export interface ModalConfirmationProps {
9
- closeText: string;
10
- title: string;
11
- description: string;
12
- buttonText: string;
13
- isOpen: boolean;
14
- modalData?: any;
15
- }
16
-
17
- export const ModalConfirmation = (props: ModalConfirmationProps) => {
18
- const {
19
- closeText,
20
- title,
21
- description,
22
- buttonText,
23
- isOpen = false,
24
- modalData,
25
- } = props;
26
-
27
- const [status, setStatus] = useState<string>('');
28
-
29
- useEffect(()=> {
30
- isOpen &&
31
- setStatus(ModalStatus.OPEN);
32
- }, [isOpen])
33
-
34
-
35
- const closeAndChangeStatus = (status: string) => {
36
- setStatus(status);
37
- }
38
-
39
- useEffect(() => {
40
- modalData({
41
- "status": status,
42
- });
43
- }, [status]);
44
-
45
- return (
46
- <>
47
- <Modal
48
- destroyOnClose={true}
49
- closeIcon={
50
- <div className={styles.closeButton}>
51
- <p>{closeText}</p><CloseOutlined />
52
- </div>
53
- }
54
- open={status === ModalStatus.OPEN}
55
- onCancel={() => closeAndChangeStatus(ModalStatus.CANCELED)}
56
- centered
57
- width={'742px'}
58
- footer={[
59
- <Button key="submit" onClick={() => closeAndChangeStatus(ModalStatus.REQUESTED_CHANGES)}>
60
- {buttonText}
61
- </Button>
62
- ]}
63
- className={styles.modal}
64
- maskClosable={false}
65
- >
66
- <h2 className={styles.title}>{title}</h2>
67
- <p className={styles.description}>{description}</p>
68
- </Modal>
69
- </>
70
- )
71
- }
@@ -1,62 +0,0 @@
1
- .modal {
2
- :global {
3
- .ant-modal-close {
4
- width: auto;
5
- color: var(--button-default-background);
6
-
7
- &:hover {
8
- background-color: transparent;
9
- color: var(--button-default-background-hover-color);
10
- }
11
- }
12
-
13
- .ant-modal-content {
14
- padding: 36px 24px;
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
- flex-direction: column;
19
- text-align: center;
20
-
21
- @media(min-width: 742px) {
22
- padding: 64px;
23
- }
24
- }
25
- }
26
-
27
- .ant-modal-close {
28
- &:hover {
29
- .closeButton {
30
- color: red;
31
- }
32
- }
33
- }
34
-
35
- .closeButton {
36
- display: flex;
37
- align-items: center;
38
- justify-content: center;
39
- flex-direction: row;
40
- gap: 8px;
41
- color: inherit;
42
- font-size: var(--font-size-body-3);
43
- line-height: 100%;
44
- font-weight: var(--font-weight-light);
45
- text-transform: capitalize;
46
- letter-spacing: .6px;
47
- }
48
-
49
- .title {
50
- color: var(--color-blue);
51
- font-weight: var(--font-weight-semibold);
52
- font-size: var(--font-size-body-6);
53
- line-height: 100%;
54
- }
55
-
56
- .description {
57
- color: var(--color-black);
58
- font-size: var(--font-size-body-4);
59
- margin: 12px 0 24px 0;
60
- padding: 0;
61
- }
62
- }