@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,29 +0,0 @@
1
- .loadFile {
2
- color: var(--color-black);
3
- background-color: var(--color-white);
4
- border: 1px var(--color-black) solid;
5
- min-width: 100px;
6
- height: 20px;
7
- font-size: 10px;
8
- padding: unset;
9
-
10
- @media(max-width: 767px) {
11
- min-width: 0px;
12
- }
13
-
14
- &:hover {
15
- background-color: var(--color-grey-light);
16
- color: var(--color-black) !important;
17
- border: 1px var(--color-black) solid !important;
18
- }
19
- }
20
-
21
- :global {
22
- .ant-upload-wrapper {
23
- line-height: 12px;
24
- }
25
-
26
- .ant-upload-wrapper .ant-upload-list .ant-upload-list-item {
27
- max-width: 100px;
28
- }
29
- }
@@ -1,38 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react-webpack5";
2
- import { UserInfo } from '.';
3
-
4
- export default {
5
- title: 'UserInfo',
6
- component: UserInfo,
7
- } as Meta;
8
-
9
- const Template: StoryFn<any> = (args: any) => {
10
-
11
- const data = {
12
- Date: "946080000",
13
- "Store": [
14
- "ola",
15
- "adeus"
16
- ],
17
- "Team": "Delivery Team",
18
- "Supervisor": "Jane Dõe Lórd Rings",
19
- "TypeOfContract": "Omnium.APE.Services.API.Models.Users.ContractStateDto",
20
- "Nationality": "PT",
21
- "CivilStatus": "single",
22
- "IdentificationDocument": "55613145664",
23
- "NTaxpayer": "14244",
24
- "NIB": "12312331",
25
- "SocialSecurity": "123123132",
26
- "NChildren": "2",
27
- "Workload": "2 horas",
28
- "Description": "One Desccription",
29
- "Comments": "One CommentsdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwOne CommentsdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwOne CommentsdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwOne CommentsdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwOne CommentsdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwOne CommentsdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwOne Commentsdwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww",
30
- "Image": "https://omnium-user-images.s3.eu-west-1.amazonaws.com/Users/.jpg"
31
- };
32
-
33
- return <UserInfo {...args} userData={data} userName={ "Diogo Carvalho" } userCode={ "121212" } userImage={"https://omnium-user-images.s3.eu-west-1.amazonaws.com/Users/.jpg"} userInfoTranslationsKey={'userInfoColumn'}></UserInfo>;
34
- }
35
-
36
- export const Primary = Template.bind({});
37
- Primary.args = {
38
- };
@@ -1,77 +0,0 @@
1
- import React from 'react';
2
- import styles from './styles.module.scss';
3
- import classNames from 'classnames';
4
- import { Label } from '../Label';
5
- import { useTranslation } from 'react-i18next';
6
-
7
- export interface UserInfoProps {
8
- userData: any;
9
- userImage: string;
10
- userName: string;
11
- userCode: string;
12
- userInfoTranslationsKey?: string;
13
- customClass?: string;
14
- }
15
-
16
- export const UserInfo = ({
17
- userData,
18
- customClass,
19
- userImage,
20
- userName,
21
- userCode,
22
- userInfoTranslationsKey,
23
- }: UserInfoProps) => {
24
- const { t } = useTranslation();
25
-
26
- const userInfoStyle = classNames(
27
- {
28
- [`${customClass}`]: customClass,
29
- },
30
- [styles.userInfo]
31
- );
32
-
33
- return (
34
- <div className={userInfoStyle}>
35
- <img src={userImage} className={styles.userImage} />
36
-
37
- <Label customStyle={styles.userName}>{userName}</Label>
38
-
39
- <h3 className={styles.userCode}>{userCode}</h3>
40
-
41
- {Object.entries(userData)?.map(([key, value]: any) => {
42
- if (
43
- userInfoTranslationsKey &&
44
- t(`${userInfoTranslationsKey}.${key}`) === `${userInfoTranslationsKey}.${key}`
45
- ) {
46
- // Verificar se a chave de tradução não existe
47
- return null; // Pular a renderização desse campo
48
- }
49
-
50
- if (key === 'Store') {
51
- return (
52
- <div key={key}>
53
- <h3 className={styles.userInfoTitles}>
54
- {userInfoTranslationsKey ? t(`${userInfoTranslationsKey}.${key}`) : key}
55
- </h3>
56
- {value?.map((store: string, index: number) => (
57
- <h3 key={`${key}-${index}`} className={styles.userInfoDesc}>
58
- {store}
59
- </h3>
60
- ))}
61
- </div>
62
- );
63
- }
64
-
65
- return (
66
- <div key={key}>
67
- <h3 className={styles.userInfoTitles}>
68
- {userInfoTranslationsKey ? t(`${userInfoTranslationsKey}.${key}`) : key}
69
- </h3>
70
-
71
- <h3 className={styles.userInfoDesc}>{value as string}</h3>
72
- </div>
73
- );
74
- })}
75
- </div>
76
- );
77
- };
@@ -1,35 +0,0 @@
1
- .userInfo {
2
- display: flex;
3
- flex-direction: column;
4
- background-color: var(--white-color);
5
- padding: 24px;
6
- color: var(--color-black);
7
- width: 150px;
8
- word-wrap: break-word;
9
- }
10
-
11
- .userImage {
12
- width: 150px;
13
- }
14
-
15
- .userName {
16
- color: var(--color-blue) !important;
17
- font-size: var(--font-size-body-5);
18
- font-weight: var(--font-weight-bold);
19
- }
20
-
21
- .userCode {
22
- font-weight: var(--font-weight-semibold);
23
- font-size: var(--font-size-label);
24
- margin-top: 0px;
25
- }
26
-
27
- .userInfoTitles {
28
- font-weight: var(--font-weight-bold);
29
- font-size: var(--font-size-body-base);
30
- }
31
-
32
- .userInfoDesc {
33
- font-weight: var(--font-weight-regular);
34
- font-size: var(--font-size-label);
35
- }
@@ -1,24 +0,0 @@
1
- import { Meta, StoryFn } from "@storybook/react-webpack5";
2
- import { CameraCapture } from '.';
3
- import { useState } from "react";
4
- import { Button } from "antd";
5
-
6
- export default {
7
- title: 'CameraCapture',
8
- component: CameraCapture,
9
- } as Meta;
10
-
11
- const Template: StoryFn<any> = (args: any) => {
12
- const [openCamera, setOpenCamera] = useState(false);
13
- const [imgSrc, setImgSrc] = useState("");
14
-
15
- return <>
16
- <p>Source: {imgSrc}</p>
17
- <Button onClick={() => setOpenCamera(!openCamera)}>Open</Button>
18
- <CameraCapture {...args} setImgSrc={setImgSrc} isCameraOn={openCamera}></CameraCapture>
19
- </>;
20
- }
21
-
22
- export const Primary = Template.bind({});
23
- Primary.args = {
24
- };
@@ -1,73 +0,0 @@
1
- import React, { useRef, useState } from 'react';
2
- import styles from './styles.module.scss';
3
- import Webcam from 'react-webcam';
4
- import { useTranslation } from 'react-i18next';
5
- import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
6
- import classNames from 'classnames';
7
- import { Button } from 'antd';
8
-
9
- interface CameraCaptureProps {
10
- isCameraOn: boolean;
11
- customClass?: string;
12
- setImgSrc: React.Dispatch<React.SetStateAction<string>>;
13
- }
14
-
15
- export const CameraCapture: React.FC<CameraCaptureProps> = ({ isCameraOn, customClass, setImgSrc }) => {
16
- const { t } = useTranslation();
17
-
18
- const webcamRef = useRef<Webcam>(null);
19
- const [imageSrc, setImageSrc] = useState<string | null>(null);
20
- const [captured, setCaptured] = useState(false);
21
-
22
- const capture = () => {
23
- const imageSrc = webcamRef.current?.getScreenshot();
24
- if (imageSrc) {
25
- setImageSrc(imageSrc);
26
- setCaptured(true);
27
- }
28
- };
29
-
30
- const retake = () => {
31
- setImageSrc(null);
32
- setCaptured(false);
33
- };
34
-
35
-
36
- const confirm = () => {
37
- setImgSrc(imageSrc as string);
38
- setCaptured(false);
39
- };
40
-
41
- const webCamStyle = classNames({
42
- [`${customClass}`]: customClass,
43
- }, [styles.webCam]);
44
-
45
- return (
46
- <div className={styles.cameraCapture}>
47
- <div>
48
- {isCameraOn && !captured && (
49
- <Webcam
50
- audio={false}
51
- ref={webcamRef}
52
- screenshotFormat="image/jpeg"
53
- className={webCamStyle}
54
- />
55
- )}
56
- </div>
57
-
58
- {isCameraOn && !captured && (
59
- <Button onClick={capture}>{t('components.webCam.takePhoto')}</Button>
60
- )}
61
-
62
- {captured && (
63
- <div className={styles.capturedImage}>
64
- <img src={imageSrc || ''} alt="Captured" />
65
- <div className={styles.buttonGroup}>
66
- <CloseOutlined onClick={retake} title={t('components.webCam.takeAgain')!} className={styles.closeButton} />
67
- <CheckOutlined onClick={confirm} title={t('components.webCam.confirm')!} className={styles.checkButton} />
68
- </div>
69
- </div>
70
- )}
71
- </div>
72
- );
73
- };
@@ -1,37 +0,0 @@
1
- .cameraCapture {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: center;
5
- justify-content: center;
6
- }
7
-
8
- .webCam {
9
- height: 300px;
10
- width: 400px;
11
- }
12
-
13
- .buttonGroup {
14
- display: flex;
15
- justify-content: space-between;
16
- margin: 10px 10px 0px 10px;
17
- font-size: 20px;
18
- }
19
-
20
- .closeButton {
21
- color: #ff4d4f;
22
- }
23
-
24
- .checkButton {
25
- color: #52c41a;
26
- }
27
-
28
- .capturedImage {
29
- margin-top: 20px;
30
- border-radius: 4px;
31
- overflow: hidden;
32
- }
33
-
34
- .capturedImage img {
35
- width: 100%;
36
- height: auto;
37
- }
@@ -1,34 +0,0 @@
1
- export * from './Button';
2
- export * from './Navigation';
3
- export * from './Input';
4
- export * from './InputCountryCode';
5
- export * from './Label';
6
- export * from './Link';
7
- export * from './Select';
8
- export * from './Separator';
9
- export * from './Table';
10
- export * from './Tag';
11
- export * from './DatePicker';
12
- export * from './Radio';
13
- export * from './Footer';
14
- export * from './ModalConfirmation';
15
- export * from './ModalWithTable';
16
- export * from './Sidebar';
17
- export * from './Switch';
18
- export * from './Category';
19
- export * from './DatePickerTag';
20
- export * from './AnalyticsBar';
21
- export * from './CategoryResponse';
22
- export * from './Upload';
23
- export * from './UserInfo';
24
- export * from './CategoryReadOnly';
25
- export * from './Notification';
26
- export * from './ExportTableData';
27
- export * from './DropdownButton';
28
- export * from './ResponsiveTable';
29
- export * from './WebCam';
30
- export * from './ResponseType';
31
- export * from './Header';
32
- export * from './BellNotifications';
33
- export * from './MobileTable';
34
- export * from './Footer2';
@@ -1,25 +0,0 @@
1
- import i18next from 'i18next';
2
- import LanguageDetector from 'i18next-browser-languagedetector';
3
- import { initReactI18next } from "react-i18next";
4
- import en from '../locales/en.json';
5
- import es from '../locales/es.json';
6
- import pt from '../locales/pt.json';
7
- var merge = require('lodash.merge');
8
-
9
- export const mergei18n = (appResources: any) => {
10
- i18next
11
- .use(initReactI18next)
12
- .use(LanguageDetector)
13
- .init({
14
- resources: merge({
15
- en: { translation: en },
16
- pt: { translation: pt },
17
- es: { translation: es },
18
- }, appResources),
19
- detection: {
20
- order: ['querystring', 'navigator', 'htmlTag'],
21
- lookupQuerystring: 'lng',
22
- htmlTag: document.documentElement,
23
- },
24
- });
25
- }
@@ -1,52 +0,0 @@
1
- import omniumIcon from '../assets/images/omnium-retail-logo.png';
2
- import a2ai from '../assets/images/A2AI-logo.png';
3
- import omniumWhiteIcon from '../assets/images/omnium-retail-logo-white.png';
4
-
5
- export interface CompanyLogo {
6
- normal: string;
7
- white: string;
8
- alt: string;
9
- }
10
-
11
- const logoMap: Record<string, CompanyLogo> = {
12
- omnium: {
13
- normal: omniumIcon,
14
- white: omniumWhiteIcon,
15
- alt: 'Omnium Retail Logo'
16
- },
17
- a2ai: {
18
- normal: a2ai,
19
- white: a2ai,
20
- alt: 'A2AI Logo'
21
- }
22
- };
23
-
24
- /**
25
- * Obtém os logos de uma empresa específica
26
- * @param companyName - Nome da empresa
27
- * @returns Objeto com os logos normal, white e alt da empresa
28
- */
29
- export const getCompanyLogos = (companyName: string): CompanyLogo => {
30
- const companyKey = companyName.toLowerCase();
31
- return logoMap[companyKey] || logoMap['omnium']; // Fallback para omnium se não encontrar
32
- };
33
-
34
- /**
35
- * Verifica se uma empresa possui logos configurados
36
- * @param companyName - Nome da empresa
37
- * @returns Boolean indicando se a empresa existe no mapa de logos
38
- */
39
- export const hasCompanyLogos = (companyName: string): boolean => {
40
- const companyKey = companyName.toLowerCase();
41
- return companyKey in logoMap;
42
- };
43
-
44
- /**
45
- * Obtém a lista de empresas disponíveis
46
- * @returns Array com os nomes das empresas configuradas
47
- */
48
- export const getAvailableCompanies = (): string[] => {
49
- return Object.keys(logoMap);
50
- };
51
-
52
- export default { getCompanyLogos, hasCompanyLogos, getAvailableCompanies };
@@ -1,7 +0,0 @@
1
- import i18next from 'i18next';
2
-
3
- const translate = (key: any, options = {}) => {
4
- return i18next.t(key, options);
5
- };
6
-
7
- export default translate;
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './components';
2
- export * from './constants/i18n';
3
- export * from './constants/logoCompanyHelper';
@@ -1,4 +0,0 @@
1
- declare module "*.module.css";
2
- declare module "*.module.scss";
3
- declare module "*.png";
4
- declare module "*.svg";
package/tsconfig.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "lib": [
5
- "dom",
6
- "dom.iterable",
7
- "esnext"
8
- ],
9
- "allowJs": true,
10
- "skipLibCheck": true,
11
- "esModuleInterop": true,
12
- "allowSyntheticDefaultImports": true,
13
- "strict": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "noFallthroughCasesInSwitch": true,
16
- "module": "esnext",
17
- "moduleResolution": "node",
18
- "resolveJsonModule": true,
19
- "isolatedModules": true,
20
- "declaration": true,
21
- "declarationDir": "./dist/types",
22
- "noEmit": false,
23
- "baseUrl": "src",
24
- "jsx": "react-jsx"
25
- },
26
- "include": [
27
- "src"
28
- ]
29
- }
package/webpack.config.js DELETED
@@ -1,51 +0,0 @@
1
- const path = require('path');
2
- const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3
-
4
- module.exports = {
5
- mode: 'production',
6
- entry: './src/index.ts',
7
- devtool: false,
8
- output: {
9
- path: path.resolve(__dirname, 'dist'),
10
- filename: 'bundle.js',
11
- libraryTarget: 'umd',
12
- library: 'lib',
13
- },
14
- resolve: {
15
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
16
- },
17
- module: {
18
- rules: [
19
- {
20
- test: /\.s?css$/,
21
- use: [
22
- { loader: MiniCssExtractPlugin.loader },
23
- {
24
- loader: 'css-loader',
25
- options: {
26
- modules: true
27
- }
28
- },
29
- { loader: 'sass-loader' }
30
- ]
31
- },
32
- {
33
- test: /\.(png|svg|jpg|gif)$/,
34
- loader: 'url-loader',
35
- options: {
36
- limit: Infinity, // everything
37
- name: '[name].[hash:7].[ext]',
38
- }
39
- },
40
- { test: /\.tsx?$/, use: 'ts-loader' },
41
- ],
42
- },
43
- plugins: [new MiniCssExtractPlugin()],
44
- externals: {
45
- react: "react",
46
- "react-dom": "react-dom",
47
- "react-router-dom": "react-router-dom",
48
- "react-i18next": "react-i18next",
49
- "i18next": "i18next",
50
- },
51
- };
File without changes
File without changes
File without changes