@omniumretail/shared-resources 0.0.23 → 0.0.24

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 (183) hide show
  1. package/.eslintrc.json +31 -31
  2. package/README.md +44 -44
  3. package/dist/bundle.js +193 -237
  4. package/dist/types/components/BottomDrawer/index.d.ts +9 -9
  5. package/dist/types/components/Button/index.d.ts +2 -2
  6. package/dist/types/components/Footer/index.d.ts +3 -3
  7. package/dist/types/components/Form/FormInputField/index.d.ts +8 -8
  8. package/dist/types/components/Form/FormSelectField/index.d.ts +9 -9
  9. package/dist/types/components/Form/index.d.ts +2 -2
  10. package/dist/types/components/Header/index.d.ts +4 -4
  11. package/dist/types/components/Link/index.d.ts +6 -6
  12. package/dist/types/components/Navigation/index.d.ts +8 -8
  13. package/dist/types/components/Page/index.d.ts +13 -13
  14. package/dist/types/components/SharedContextProvider/index.d.ts +7 -7
  15. package/dist/types/components/index.d.ts +9 -9
  16. package/dist/types/constants/Icons.d.ts +14 -13
  17. package/dist/types/constants/QueryClient.d.ts +2 -2
  18. package/dist/types/constants/index.d.ts +2 -2
  19. package/dist/types/contexts/useStore.d.ts +8 -8
  20. package/dist/types/hooks/activateEvaluationCycleQuery.hook.d.ts +2 -2
  21. package/dist/types/hooks/activateQuestionnaireQuery.hook.d.ts +2 -2
  22. package/dist/types/hooks/cancelEvaluationCycleQuery.hook.d.ts +2 -2
  23. package/dist/types/hooks/cancelQuestionnaireQuery.hook.d.ts +2 -2
  24. package/dist/types/hooks/deleteEvaluationCycleQuery.hook.d.ts +2 -2
  25. package/dist/types/hooks/deleteQuestionnaireQuery.hook.d.ts +2 -2
  26. package/dist/types/hooks/duplicateQuestionnaireQuery.hook.d.ts +2 -2
  27. package/dist/types/hooks/finishEvaluationCycleQuery.hook.d.ts +2 -2
  28. package/dist/types/hooks/finishQuestionnaireQuery.hook.d.ts +2 -2
  29. package/dist/types/hooks/index.d.ts +39 -41
  30. package/dist/types/hooks/useAllRolesQuery.hook.d.ts +11 -11
  31. package/dist/types/hooks/useAllStoreQuery.hook.d.ts +11 -11
  32. package/dist/types/hooks/useAnalyticsEvaluationCyclesQuery.hook.d.ts +7 -7
  33. package/dist/types/hooks/useAnalyticsQuestionsQuery.hook.d.ts +9 -9
  34. package/dist/types/hooks/useAnalyticsSideBarQuery.hook.d.ts +7 -7
  35. package/dist/types/hooks/useAnalyticsUserIdQuery.hook.d.ts +9 -9
  36. package/dist/types/hooks/useAnalyticsUserQuery.hook.d.ts +9 -9
  37. package/dist/types/hooks/useAnswerIdQuery.hook.d.ts +2 -2
  38. package/dist/types/hooks/useAnswerMutateQuery.hook.d.ts +9 -9
  39. package/dist/types/hooks/useAnswersUserSupervisorQuery.hook.d.ts +7 -7
  40. package/dist/types/hooks/useApplicationDataQuery.hook.d.ts +2 -2
  41. package/dist/types/hooks/useContractStatesQuery.hook.d.ts +7 -7
  42. package/dist/types/hooks/useCountriesQuery.hook.d.ts +7 -7
  43. package/dist/types/hooks/useCustomersQuery.hook.d.ts +138 -138
  44. package/dist/types/hooks/useEvaluationCycleIdQuery.hook.d.ts +2 -2
  45. package/dist/types/hooks/useEvaluationCycleMutateQuery.hook.d.ts +2 -2
  46. package/dist/types/hooks/useEvaluationCycleQuery.hook.d.ts +8 -8
  47. package/dist/types/hooks/useJobTitlesQuery.hook.d.ts +7 -7
  48. package/dist/types/hooks/useProductHierarchies.hook.d.ts +7 -7
  49. package/dist/types/hooks/useProductsQuery.hook.d.ts +138 -138
  50. package/dist/types/hooks/useQuestionnaireIdQuery.hook.d.ts +2 -2
  51. package/dist/types/hooks/useQuestionnaireMutateQuery.hook.d.ts +2 -2
  52. package/dist/types/hooks/useQuestionnaireQuery.hook.d.ts +9 -9
  53. package/dist/types/hooks/useSingleUserIdMutateQuery.hook.d.ts +2 -2
  54. package/dist/types/hooks/useSingleUserIdQuery.hook.d.ts +2 -2
  55. package/dist/types/hooks/useStoreQuery.d.ts +7 -7
  56. package/dist/types/hooks/useTermNotificationQuery.hook.d.ts +2 -2
  57. package/dist/types/hooks/useUserBlockQuery.hook.d.ts +2 -2
  58. package/dist/types/hooks/useUserEmailVerifQuery.hook.d.ts +2 -2
  59. package/dist/types/hooks/useUserIdQuery.hook.d.ts +2 -2
  60. package/dist/types/hooks/useUserListQuery.hook.d.ts +8 -8
  61. package/dist/types/hooks/useUserQuery.hook.d.ts +10 -10
  62. package/dist/types/index.d.ts +7 -7
  63. package/dist/types/interfaces/AnalyticsEvaluationCycle.d.ts +19 -19
  64. package/dist/types/interfaces/AnalyticsUserId.d.ts +11 -11
  65. package/dist/types/interfaces/Answer.d.ts +12 -12
  66. package/dist/types/interfaces/AnswersUserSupervisor.d.ts +42 -42
  67. package/dist/types/interfaces/ApplicationsByCategory.d.ts +16 -16
  68. package/dist/types/interfaces/Brand.d.ts +4 -4
  69. package/dist/types/interfaces/Cart.d.ts +9 -9
  70. package/dist/types/interfaces/Configuration.d.ts +6 -6
  71. package/dist/types/interfaces/ContractStates.d.ts +7 -7
  72. package/dist/types/interfaces/Countries.d.ts +10 -10
  73. package/dist/types/interfaces/Customer.d.ts +21 -21
  74. package/dist/types/interfaces/EvaluationCycle.d.ts +32 -32
  75. package/dist/types/interfaces/JobTitles.d.ts +7 -7
  76. package/dist/types/interfaces/Product.d.ts +16 -35
  77. package/dist/types/interfaces/ProductsHierarchies.d.ts +5 -8
  78. package/dist/types/interfaces/Questionnaire.d.ts +36 -36
  79. package/dist/types/interfaces/ResponseList.d.ts +5 -5
  80. package/dist/types/interfaces/Roles.d.ts +5 -5
  81. package/dist/types/interfaces/Store.d.ts +7 -7
  82. package/dist/types/interfaces/TermNotification.d.ts +5 -5
  83. package/dist/types/interfaces/User.d.ts +65 -65
  84. package/dist/types/interfaces/index.d.ts +19 -21
  85. package/dist/types/services/ApiService/index.d.ts +9 -9
  86. package/dist/types/services/InitService/index.d.ts +3 -3
  87. package/dist/types/services/index.d.ts +2 -2
  88. package/package.json +54 -54
  89. package/src/assets/sitoo.svg +9 -9
  90. package/src/components/BottomDrawer/index.tsx +32 -32
  91. package/src/components/BottomDrawer/styles.module.scss +59 -59
  92. package/src/components/Button/index.tsx +7 -7
  93. package/src/components/Footer/index.tsx +44 -44
  94. package/src/components/Footer/styles.module.scss +33 -33
  95. package/src/components/Form/FormInputField/index.tsx +18 -18
  96. package/src/components/Form/FormSelectField/index.tsx +16 -16
  97. package/src/components/Form/index.ts +2 -2
  98. package/src/components/Header/index.tsx +20 -20
  99. package/src/components/Header/styles.module.scss +16 -16
  100. package/src/components/Link/index.tsx +21 -21
  101. package/src/components/Link/styles.module.scss +24 -24
  102. package/src/components/Navigation/index.tsx +30 -30
  103. package/src/components/Navigation/styles.module.scss +34 -34
  104. package/src/components/Page/index.tsx +35 -35
  105. package/src/components/Page/styles.module.scss +26 -26
  106. package/src/components/SharedContextProvider/index.tsx +30 -30
  107. package/src/components/index.ts +9 -9
  108. package/src/constants/Icons.ts +20 -19
  109. package/src/constants/QueryClient.ts +10 -10
  110. package/src/constants/index.ts +2 -2
  111. package/src/contexts/useStore.tsx +20 -20
  112. package/src/global.scss +124 -124
  113. package/src/hooks/activateEvaluationCycleQuery.hook.ts +15 -15
  114. package/src/hooks/activateQuestionnaireQuery.hook.ts +15 -15
  115. package/src/hooks/cancelEvaluationCycleQuery.hook.ts +15 -15
  116. package/src/hooks/cancelQuestionnaireQuery.hook.ts +15 -15
  117. package/src/hooks/deleteEvaluationCycleQuery.hook.ts +15 -15
  118. package/src/hooks/deleteQuestionnaireQuery.hook.ts +15 -15
  119. package/src/hooks/duplicateQuestionnaireQuery.hook.ts +14 -14
  120. package/src/hooks/finishEvaluationCycleQuery.hook.ts +15 -15
  121. package/src/hooks/finishQuestionnaireQuery.hook.ts +15 -15
  122. package/src/hooks/index.ts +41 -41
  123. package/src/hooks/useAllRolesQuery.hook.ts +21 -21
  124. package/src/hooks/useAllStoreQuery.hook.ts +27 -27
  125. package/src/hooks/useAnalyticsEvaluationCyclesQuery.hook.ts +21 -21
  126. package/src/hooks/useAnalyticsQuestionsQuery.hook.ts +22 -22
  127. package/src/hooks/useAnalyticsSideBarQuery.hook.ts +21 -21
  128. package/src/hooks/useAnalyticsUserIdQuery.hook.ts +24 -24
  129. package/src/hooks/useAnalyticsUserQuery.hook.ts +27 -27
  130. package/src/hooks/useAnswerIdQuery.hook.ts +13 -13
  131. package/src/hooks/useAnswerMutateQuery.hook.ts +31 -31
  132. package/src/hooks/useAnswersUserSupervisorQuery.hook.tsx +21 -21
  133. package/src/hooks/useApplicationDataQuery.hook.ts +10 -10
  134. package/src/hooks/useContractStatesQuery.hook.ts +14 -14
  135. package/src/hooks/useCountriesQuery.hook.ts +14 -14
  136. package/src/hooks/useCustomersQuery.hook.ts +30 -30
  137. package/src/hooks/useEvaluationCycleIdQuery.hook.ts +13 -13
  138. package/src/hooks/useEvaluationCycleMutateQuery.hook.ts +17 -17
  139. package/src/hooks/useEvaluationCycleQuery.hook.ts +25 -25
  140. package/src/hooks/useJobTitlesQuery.hook.ts +14 -14
  141. package/src/hooks/useProductHierarchies.hook.ts +12 -12
  142. package/src/hooks/useProductsQuery.hook.ts +30 -30
  143. package/src/hooks/useQuestionnaireIdQuery.hook.ts +13 -13
  144. package/src/hooks/useQuestionnaireMutateQuery.hook.ts +17 -17
  145. package/src/hooks/useQuestionnaireQuery.hook.ts +27 -27
  146. package/src/hooks/useSingleUserIdMutateQuery.hook.ts +18 -18
  147. package/src/hooks/useSingleUserIdQuery.hook.ts +14 -14
  148. package/src/hooks/useStoreQuery.ts +13 -13
  149. package/src/hooks/useTermNotificationQuery.hook.ts +11 -11
  150. package/src/hooks/useUserBlockQuery.hook.ts +15 -15
  151. package/src/hooks/useUserEmailVerifQuery.hook.ts +15 -15
  152. package/src/hooks/useUserIdQuery.hook.ts +14 -14
  153. package/src/hooks/useUserListQuery.hook.ts +25 -25
  154. package/src/hooks/useUserQuery.hook.ts +29 -29
  155. package/src/index.ts +9 -9
  156. package/src/interfaces/AnalyticsEvaluationCycle.ts +24 -24
  157. package/src/interfaces/AnalyticsUserId.ts +12 -12
  158. package/src/interfaces/Answer.ts +13 -13
  159. package/src/interfaces/AnswersUserSupervisor.ts +45 -45
  160. package/src/interfaces/ApplicationsByCategory.ts +19 -19
  161. package/src/interfaces/Brand.ts +4 -4
  162. package/src/interfaces/Cart.ts +12 -12
  163. package/src/interfaces/Configuration.ts +7 -7
  164. package/src/interfaces/ContractStates.ts +7 -7
  165. package/src/interfaces/Countries.ts +10 -10
  166. package/src/interfaces/Customer.ts +23 -23
  167. package/src/interfaces/EvaluationCycle.ts +32 -32
  168. package/src/interfaces/JobTitles.ts +7 -7
  169. package/src/interfaces/Product.ts +18 -38
  170. package/src/interfaces/ProductsHierarchies.ts +6 -9
  171. package/src/interfaces/Questionnaire.ts +38 -38
  172. package/src/interfaces/ResponseList.ts +6 -6
  173. package/src/interfaces/Roles.ts +5 -5
  174. package/src/interfaces/Store.ts +8 -8
  175. package/src/interfaces/TermNotification.ts +5 -5
  176. package/src/interfaces/User.ts +69 -69
  177. package/src/interfaces/index.ts +21 -21
  178. package/src/services/ApiService/index.ts +125 -125
  179. package/src/services/InitService/index.ts +7 -7
  180. package/src/services/index.ts +3 -3
  181. package/src/types/Global.d.ts +4 -4
  182. package/tsconfig.json +27 -27
  183. package/webpack.config.js +48 -48
@@ -1,33 +1,33 @@
1
- import { Drawer, DrawerProps } from "antd";
2
- import styles from './styles.module.scss';
3
-
4
- interface BottomDrawerProps extends DrawerProps {
5
- haveReset?: boolean;
6
- resetButtonName?: string;
7
- closeButtonName: string;
8
- onReset?: () => void;
9
- }
10
-
11
- export const BottomDrawer = ({ haveReset = false, resetButtonName, closeButtonName, onReset, ...restProps }: BottomDrawerProps) => {
12
-
13
- const extraContent = haveReset ? (
14
- <button
15
- type="button"
16
- className={ styles.resetButton }
17
- onClick={onReset}
18
- >
19
- { resetButtonName }
20
- </button>
21
- ) : null;
22
-
23
- return (
24
- <Drawer
25
- { ...restProps }
26
- className={ styles.drawerComponent }
27
- height="80%"
28
- placement="bottom"
29
- closeIcon={ closeButtonName }
30
- extra={ extraContent }
31
- />
32
- );
1
+ import { Drawer, DrawerProps } from "antd";
2
+ import styles from './styles.module.scss';
3
+
4
+ interface BottomDrawerProps extends DrawerProps {
5
+ haveReset?: boolean;
6
+ resetButtonName?: string;
7
+ closeButtonName: string;
8
+ onReset?: () => void;
9
+ }
10
+
11
+ export const BottomDrawer = ({ haveReset = false, resetButtonName, closeButtonName, onReset, ...restProps }: BottomDrawerProps) => {
12
+
13
+ const extraContent = haveReset ? (
14
+ <button
15
+ type="button"
16
+ className={ styles.resetButton }
17
+ onClick={onReset}
18
+ >
19
+ { resetButtonName }
20
+ </button>
21
+ ) : null;
22
+
23
+ return (
24
+ <Drawer
25
+ { ...restProps }
26
+ className={ styles.drawerComponent }
27
+ height="80%"
28
+ placement="bottom"
29
+ closeIcon={ closeButtonName }
30
+ extra={ extraContent }
31
+ />
32
+ );
33
33
  };
@@ -1,59 +1,59 @@
1
- .drawerComponent {
2
-
3
- :global {
4
-
5
- .ant-drawer-content-wrapper {
6
- top: 10%;
7
- }
8
-
9
- .ant-drawer-content {
10
- background: var(--app-footer-color);
11
- border-radius: 7px 7px 0px 0px;
12
- }
13
-
14
- .ant-drawer-header {
15
- border-bottom: 1px solid var(--disabled-input);
16
- text-align: center;
17
- padding: 16px 0px;
18
- }
19
-
20
- .ant-drawer-title {
21
- font-weight: 700;
22
- font-size: 14px;
23
- color: var(--app-footer-bg-color);
24
- }
25
-
26
- .ant-drawer-close {
27
- position: absolute;
28
- top: 15px;
29
- right: 0px;
30
- font-weight: 400;
31
- font-size: 12px;
32
- color: var(--active-button-color);
33
- }
34
-
35
- }
36
-
37
- .resetButton {
38
- display: inline-block;
39
- margin-left: 12px;
40
- font-style: normal;
41
- line-height: 1;
42
- text-align: center;
43
- text-transform: none;
44
- text-decoration: none;
45
- background: transparent;
46
- border: 0;
47
- outline: 0;
48
- cursor: pointer;
49
- transition: color 0.3s;
50
- text-rendering: auto;
51
- position: absolute;
52
- top: 15px;
53
- left: 0px;
54
- font-weight: 400;
55
- font-size: 12px;
56
- color: var(--active-button-color);
57
- }
58
-
59
- }
1
+ .drawerComponent {
2
+
3
+ :global {
4
+
5
+ .ant-drawer-content-wrapper {
6
+ top: 10%;
7
+ }
8
+
9
+ .ant-drawer-content {
10
+ background: var(--app-footer-color);
11
+ border-radius: 7px 7px 0px 0px;
12
+ }
13
+
14
+ .ant-drawer-header {
15
+ border-bottom: 1px solid var(--disabled-input);
16
+ text-align: center;
17
+ padding: 16px 0px;
18
+ }
19
+
20
+ .ant-drawer-title {
21
+ font-weight: 700;
22
+ font-size: 14px;
23
+ color: var(--app-footer-bg-color);
24
+ }
25
+
26
+ .ant-drawer-close {
27
+ position: absolute;
28
+ top: 15px;
29
+ right: 0px;
30
+ font-weight: 400;
31
+ font-size: 12px;
32
+ color: var(--active-button-color);
33
+ }
34
+
35
+ }
36
+
37
+ .resetButton {
38
+ display: inline-block;
39
+ margin-left: 12px;
40
+ font-style: normal;
41
+ line-height: 1;
42
+ text-align: center;
43
+ text-transform: none;
44
+ text-decoration: none;
45
+ background: transparent;
46
+ border: 0;
47
+ outline: 0;
48
+ cursor: pointer;
49
+ transition: color 0.3s;
50
+ text-rendering: auto;
51
+ position: absolute;
52
+ top: 15px;
53
+ left: 0px;
54
+ font-weight: 400;
55
+ font-size: 12px;
56
+ color: var(--active-button-color);
57
+ }
58
+
59
+ }
@@ -1,7 +1,7 @@
1
- import { Button as AntButton, ButtonProps } from 'antd';
2
-
3
- export const Button = (props: ButtonProps) => {
4
- return (
5
- <AntButton { ...props } />
6
- );
7
- };
1
+ import { Button as AntButton, ButtonProps } from 'antd';
2
+
3
+ export const Button = (props: ButtonProps) => {
4
+ return (
5
+ <AntButton { ...props } />
6
+ );
7
+ };
@@ -1,44 +1,44 @@
1
- import { Row, Col } from 'antd';
2
- import add from 'date-fns/add';
3
- import format from 'date-fns/format';
4
- import classNames from 'classnames';
5
- import logo from '../../assets/omniu-retail_branco_s-fundo.png';
6
- import { useState, useEffect } from 'react';
7
-
8
- import styles from './styles.module.scss';
9
-
10
- export const FooterComponent = ({ className }: { className?: string }) => {
11
- const [date, setDate] = useState(new Date());
12
-
13
- useEffect(() => {
14
- const time = (function updateDate() {
15
- const nextMinute = add(new Date(), { minutes: 1, seconds: 0 });
16
- return setTimeout(() => {
17
- setDate(new Date());
18
- updateDate();
19
- }, nextMinute.getTime() - new Date().getTime());
20
- }());
21
-
22
- return () => clearTimeout(time);
23
- });
24
-
25
- return (
26
- <div className={ classNames(styles.footerComponent, className) }>
27
- <Row>
28
- <Col xs={ 12 } className={ styles.dateTime }>
29
- <div className={ styles.date }>
30
- {format(date, 'dd/MM/yyyy')}
31
- </div>
32
-
33
- <div className={ styles.time }>
34
- {format(date, 'HH:mm')}
35
- </div>
36
- </Col>
37
-
38
- <Col xs={ 12 } className={ styles.omniumLogo }>
39
- <img src={ logo } className={ styles.omniumLogoImg } alt="omniu logo" />
40
- </Col>
41
- </Row>
42
- </div>
43
- );
44
- }
1
+ import { Row, Col } from 'antd';
2
+ import add from 'date-fns/add';
3
+ import format from 'date-fns/format';
4
+ import classNames from 'classnames';
5
+ import logo from '../../assets/omniu-retail_branco_s-fundo.png';
6
+ import { useState, useEffect } from 'react';
7
+
8
+ import styles from './styles.module.scss';
9
+
10
+ export const FooterComponent = ({ className }: { className?: string }) => {
11
+ const [date, setDate] = useState(new Date());
12
+
13
+ useEffect(() => {
14
+ const time = (function updateDate() {
15
+ const nextMinute = add(new Date(), { minutes: 1, seconds: 0 });
16
+ return setTimeout(() => {
17
+ setDate(new Date());
18
+ updateDate();
19
+ }, nextMinute.getTime() - new Date().getTime());
20
+ }());
21
+
22
+ return () => clearTimeout(time);
23
+ });
24
+
25
+ return (
26
+ <div className={ classNames(styles.footerComponent, className) }>
27
+ <Row>
28
+ <Col xs={ 12 } className={ styles.dateTime }>
29
+ <div className={ styles.date }>
30
+ {format(date, 'dd/MM/yyyy')}
31
+ </div>
32
+
33
+ <div className={ styles.time }>
34
+ {format(date, 'HH:mm')}
35
+ </div>
36
+ </Col>
37
+
38
+ <Col xs={ 12 } className={ styles.omniumLogo }>
39
+ <img src={ logo } className={ styles.omniumLogoImg } alt="omniu logo" />
40
+ </Col>
41
+ </Row>
42
+ </div>
43
+ );
44
+ }
@@ -1,33 +1,33 @@
1
- .footerComponent {
2
- height: 60px;
3
- background-color: var(--app-footer-bg-color);
4
- padding: 13px 24px;
5
- box-sizing: border-box;
6
-
7
- .date,
8
- .time {
9
- font-weight: 500;
10
- font-size: 10px;
11
- color: var(--app-footer-color);
12
- display: inline-flex;
13
- }
14
-
15
- .dateTime {
16
- line-height: 12px;
17
- }
18
-
19
- .time {
20
- margin-left: 8px;
21
- }
22
-
23
- .omniumLogo {
24
- line-height: 12px;
25
- text-align: right;
26
- }
27
-
28
- .omniumLogoImg {
29
- height: 23px;
30
- margin-top: -5px;
31
- margin-right: -6px;
32
- }
33
- }
1
+ .footerComponent {
2
+ height: 60px;
3
+ background-color: var(--app-footer-bg-color);
4
+ padding: 13px 24px;
5
+ box-sizing: border-box;
6
+
7
+ .date,
8
+ .time {
9
+ font-weight: 500;
10
+ font-size: 10px;
11
+ color: var(--app-footer-color);
12
+ display: inline-flex;
13
+ }
14
+
15
+ .dateTime {
16
+ line-height: 12px;
17
+ }
18
+
19
+ .time {
20
+ margin-left: 8px;
21
+ }
22
+
23
+ .omniumLogo {
24
+ line-height: 12px;
25
+ text-align: right;
26
+ }
27
+
28
+ .omniumLogoImg {
29
+ height: 23px;
30
+ margin-top: -5px;
31
+ margin-right: -6px;
32
+ }
33
+ }
@@ -1,18 +1,18 @@
1
- import { Form, FormItemProps, Input, InputProps } from 'antd';
2
-
3
- interface FormInputFieldProps extends Omit<FormItemProps, "name"> {
4
- name: string;
5
- inputProps?: InputProps;
6
- }
7
-
8
- export const InputField = (inputProps: InputProps) => (
9
- <Input { ...inputProps } />
10
- );
11
-
12
- export const FormInputField = ({ inputProps, ...itemProps }: FormInputFieldProps) => {
13
- return (
14
- <Form.Item { ...itemProps }>
15
- <InputField { ...inputProps } />
16
- </Form.Item>
17
- )
18
- };
1
+ import { Form, FormItemProps, Input, InputProps } from 'antd';
2
+
3
+ interface FormInputFieldProps extends Omit<FormItemProps, "name"> {
4
+ name: string;
5
+ inputProps?: InputProps;
6
+ }
7
+
8
+ export const InputField = (inputProps: InputProps) => (
9
+ <Input { ...inputProps } />
10
+ );
11
+
12
+ export const FormInputField = ({ inputProps, ...itemProps }: FormInputFieldProps) => {
13
+ return (
14
+ <Form.Item { ...itemProps }>
15
+ <InputField { ...inputProps } />
16
+ </Form.Item>
17
+ )
18
+ };
@@ -1,16 +1,16 @@
1
- import { Form, FormItemProps, Select } from 'antd';
2
- import { LabeledValue, SelectProps } from 'antd/lib/select';
3
-
4
- interface FormSelectFieldProps extends Omit<FormItemProps, "name"> {
5
- name: string;
6
- options: LabeledValue[];
7
- selectProps?: SelectProps<LabeledValue>
8
- }
9
-
10
- export const FormSelectField = ({ options, selectProps, ...itemProps }: FormSelectFieldProps) => {
11
- return (
12
- <Form.Item { ...itemProps }>
13
- <Select { ...selectProps } options={ options } />
14
- </Form.Item>
15
- )
16
- };
1
+ import { Form, FormItemProps, Select } from 'antd';
2
+ import { LabeledValue, SelectProps } from 'antd/lib/select';
3
+
4
+ interface FormSelectFieldProps extends Omit<FormItemProps, "name"> {
5
+ name: string;
6
+ options: LabeledValue[];
7
+ selectProps?: SelectProps<LabeledValue>
8
+ }
9
+
10
+ export const FormSelectField = ({ options, selectProps, ...itemProps }: FormSelectFieldProps) => {
11
+ return (
12
+ <Form.Item { ...itemProps }>
13
+ <Select { ...selectProps } options={ options } />
14
+ </Form.Item>
15
+ )
16
+ };
@@ -1,2 +1,2 @@
1
- export * from './FormInputField';
2
- export * from './FormSelectField';
1
+ export * from './FormInputField';
2
+ export * from './FormSelectField';
@@ -1,20 +1,20 @@
1
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
2
- import { icons, } from '../../constants/Icons';
3
- import sitooIcon from '../../assets/sitoo.svg';
4
- import styles from './styles.module.scss';
5
-
6
- export interface HeaderProps {
7
- onOpenMenu: () => void;
8
- }
9
-
10
- export const Header = ({ onOpenMenu }: HeaderProps) => (
11
- <div className={ styles.header }>
12
- <FontAwesomeIcon icon={ icons.faBars } onClick={ onOpenMenu } />
13
-
14
- <div className={ styles.logoContainer }>
15
- <img src={ sitooIcon } />
16
- </div>
17
-
18
- <FontAwesomeIcon icon={ icons.faUserTie } />
19
- </div>
20
- );
1
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
2
+ import { icons, } from '../../constants/Icons';
3
+ import sitooIcon from '../../assets/sitoo.svg';
4
+ import styles from './styles.module.scss';
5
+
6
+ export interface HeaderProps {
7
+ onOpenMenu: () => void;
8
+ }
9
+
10
+ export const Header = ({ onOpenMenu }: HeaderProps) => (
11
+ <div className={ styles.header }>
12
+ <FontAwesomeIcon icon={ icons.faBars } onClick={ onOpenMenu } />
13
+
14
+ <div className={ styles.logoContainer }>
15
+ <img src={ sitooIcon } />
16
+ </div>
17
+
18
+ <FontAwesomeIcon icon={ icons.faUserTie } />
19
+ </div>
20
+ );
@@ -1,16 +1,16 @@
1
-
2
- .header {
3
- height: 88px;
4
- display: flex;
5
- align-items: flex-end;
6
- padding: 13px 20px;
7
- border-bottom: 2px solid #E5E5E5;
8
- box-sizing: border-box;
9
- }
10
-
11
- .logoContainer {
12
- display: flex;
13
- flex-grow: 1;
14
- align-items: flex-end;
15
- justify-content: center;
16
- }
1
+
2
+ .header {
3
+ height: 88px;
4
+ display: flex;
5
+ align-items: flex-end;
6
+ padding: 13px 20px;
7
+ border-bottom: 2px solid #E5E5E5;
8
+ box-sizing: border-box;
9
+ }
10
+
11
+ .logoContainer {
12
+ display: flex;
13
+ flex-grow: 1;
14
+ align-items: flex-end;
15
+ justify-content: center;
16
+ }
@@ -1,21 +1,21 @@
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
- }
9
-
10
- export const Link = (props: CustomLinkProps) => {
11
- const { iconAlignRight, linkSecondary } = props;
12
-
13
- const linkClasses = classNames({
14
- [styles.iconAlignRight]: iconAlignRight,
15
- [styles.linkSecondary]: linkSecondary,
16
- }, [styles.link])
17
-
18
- return (
19
- <AntButton { ...props } className={ linkClasses } type={'link'} />
20
- );
21
- };
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
+ }
9
+
10
+ export const Link = (props: CustomLinkProps) => {
11
+ const { iconAlignRight, linkSecondary } = props;
12
+
13
+ const linkClasses = classNames({
14
+ [styles.iconAlignRight]: iconAlignRight,
15
+ [styles.linkSecondary]: linkSecondary,
16
+ }, [styles.link])
17
+
18
+ return (
19
+ <AntButton { ...props } className={ linkClasses } type={'link'} />
20
+ );
21
+ };
@@ -1,24 +1,24 @@
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
+ .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,30 +1,30 @@
1
- import styles from './styles.module.scss';
2
- import { Link } from '../Link/index';
3
- import { ArrowLeftOutlined, HomeOutlined, LogoutOutlined } from '@ant-design/icons';
4
-
5
- export interface NavigationProps {
6
- backLink?: boolean;
7
- title: string;
8
- homeLink?: boolean;
9
- loginLink?: boolean;
10
- onClickFunction?: () => void;
11
- }
12
-
13
- export const Navigation = (props: NavigationProps) => {
14
- const { backLink, title, homeLink, onClickFunction, loginLink } = props;
15
-
16
- return (
17
- <div className={styles.navigation}>
18
- <div className={styles.columnLeft}>
19
- { backLink && <Link href="#" icon={<ArrowLeftOutlined />} linkSecondary> Voltar </Link> }
20
- </div>
21
- <div className={styles.columnCenter}>
22
- <h1 className={styles.title}>{title}</h1>
23
- </div>
24
- <div className={styles.columnRight}>
25
- {homeLink && <Link href="" icon={<HomeOutlined />} linkSecondary iconAlignRight> Home </Link>}
26
- {loginLink && <Link href="#" onClick={onClickFunction} icon={<LogoutOutlined />} linkSecondary iconAlignRight> Log Out</Link>}
27
- </div>
28
- </div>
29
- )
30
- };
1
+ import styles from './styles.module.scss';
2
+ import { Link } from '../Link/index';
3
+ import { ArrowLeftOutlined, HomeOutlined, LogoutOutlined } from '@ant-design/icons';
4
+
5
+ export interface NavigationProps {
6
+ backLink?: boolean;
7
+ title: string;
8
+ homeLink?: boolean;
9
+ loginLink?: boolean;
10
+ onClickFunction?: () => void;
11
+ }
12
+
13
+ export const Navigation = (props: NavigationProps) => {
14
+ const { backLink, title, homeLink, onClickFunction, loginLink } = props;
15
+
16
+ return (
17
+ <div className={styles.navigation}>
18
+ <div className={styles.columnLeft}>
19
+ { backLink && <Link href="#" icon={<ArrowLeftOutlined />} linkSecondary> Voltar </Link> }
20
+ </div>
21
+ <div className={styles.columnCenter}>
22
+ <h1 className={styles.title}>{title}</h1>
23
+ </div>
24
+ <div className={styles.columnRight}>
25
+ {homeLink && <Link href="" icon={<HomeOutlined />} linkSecondary iconAlignRight> Home </Link>}
26
+ {loginLink && <Link href="#" onClick={onClickFunction} icon={<LogoutOutlined />} linkSecondary iconAlignRight> Log Out</Link>}
27
+ </div>
28
+ </div>
29
+ )
30
+ };