x25 3.0.0 → 17.0.0

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 (274) hide show
  1. package/Account/Load.js +75 -0
  2. package/Account/actions.js +15 -0
  3. package/Account/index.js +20 -0
  4. package/Account/reducer.js +122 -0
  5. package/Account/request.js +44 -0
  6. package/Async/InitModule.js +190 -0
  7. package/Async/RouteLoading.js +64 -0
  8. package/Async/SimulatedException.js +44 -0
  9. package/Async/index.js +95 -0
  10. package/Async/types.js +1 -0
  11. package/Company/Load.js +82 -0
  12. package/Company/actions.js +15 -0
  13. package/Company/index.js +20 -0
  14. package/Company/reducer.js +165 -0
  15. package/Company/request.js +36 -0
  16. package/Company/util.js +10 -0
  17. package/Header/AccountOptionsContainer.js +144 -0
  18. package/Header/AdminSelectCompany.js +109 -0
  19. package/Header/ClientSelectCompany.js +104 -0
  20. package/Header/Header.js +127 -0
  21. package/Header/HeaderContainer.js +39 -0
  22. package/Header/Logo.js +30 -0
  23. package/Header/LogoutButton.js +39 -0
  24. package/Header/index.js +19 -0
  25. package/Header/request.js +26 -0
  26. package/Header/types.js +1 -0
  27. package/Header/util.js +58 -0
  28. package/Inputs/Business/BankAccount.js +48 -0
  29. package/Inputs/Business/BankName.js +49 -0
  30. package/Inputs/Business/CifField.js +112 -0
  31. package/Inputs/Business/CifFieldContainer.js +157 -0
  32. package/Inputs/Business/Email.js +37 -0
  33. package/Inputs/Business/NidField.js +91 -0
  34. package/Inputs/Business/Phone.js +37 -0
  35. package/Inputs/Business/index.js +34 -0
  36. package/Inputs/Business/request.js +39 -0
  37. package/Inputs/CaptchaBox.js +151 -0
  38. package/Inputs/DateInput.js +172 -0
  39. package/Inputs/DateTemplate.js +200 -0
  40. package/Inputs/DelayInputChange.js +135 -0
  41. package/Inputs/FocusTemplate.js +47 -0
  42. package/Inputs/InputTemplate.js +78 -0
  43. package/Inputs/LabelTemplate.js +59 -0
  44. package/Inputs/NumericInput.js +139 -0
  45. package/Inputs/NumericTemplate.js +148 -0
  46. package/Inputs/Selects/County.js +29 -0
  47. package/Inputs/Selects/Custom.js +56 -0
  48. package/Inputs/Selects/Simple.js +75 -0
  49. package/Inputs/Selects/index.js +52 -0
  50. package/Inputs/SimpleInput.js +42 -0
  51. package/Inputs/SimpleTextarea.js +47 -0
  52. package/Inputs/TextareaTemplate.js +55 -0
  53. package/Inputs/Tooltip.js +82 -0
  54. package/Inputs/index.js +185 -0
  55. package/Messages/Error.js +106 -0
  56. package/Messages/Loading.js +68 -0
  57. package/Messages/index.js +29 -0
  58. package/Modal/Delete.js +240 -0
  59. package/Modal/Root.js +81 -0
  60. package/Modal/SimpleModal.js +57 -0
  61. package/Modal/actions.js +10 -0
  62. package/Modal/getComponent.js +42 -0
  63. package/Modal/index.js +22 -0
  64. package/Modal/reducer.js +53 -0
  65. package/Modal/types.js +7 -0
  66. package/Modal/util.js +17 -0
  67. package/Payment/EstimatePrice/Description.js +92 -0
  68. package/Payment/EstimatePrice/PayBox.js +220 -0
  69. package/Payment/EstimatePrice/index.js +92 -0
  70. package/Payment/EstimatePrice/util.js +21 -0
  71. package/Payment/MobilpayForm.js +86 -0
  72. package/Payment/Modal/BankTransfer.js +233 -0
  73. package/Payment/Modal/CompanyValability.js +28 -0
  74. package/Payment/Modal/DoneForm.js +222 -0
  75. package/Payment/Modal/PaymentDone.js +53 -0
  76. package/Payment/Modal/index.js +27 -0
  77. package/Payment/actions.js +23 -0
  78. package/{src/Payment → Payment}/codes.js +19 -16
  79. package/Payment/index.js +141 -0
  80. package/Payment/request.js +49 -0
  81. package/Payment/types.js +1 -0
  82. package/Payment/util.js +50 -0
  83. package/Payment/validate.js +23 -0
  84. package/Sidebar.js +156 -0
  85. package/Things.js +53 -0
  86. package/actions.js +73 -0
  87. package/config.js +10 -0
  88. package/dev/ErrorBoundary.js +109 -0
  89. package/dev/TheError.js +113 -0
  90. package/dev/index.js +132 -0
  91. package/dev/types.js +1 -0
  92. package/package.json +13 -13
  93. package/prod/SentryErrorBoundary.js +150 -0
  94. package/reducer/captchas.js +51 -0
  95. package/reducer/counties.js +57 -0
  96. package/reducer/index.js +38 -0
  97. package/reducer/module.js +48 -0
  98. package/style/index.css +1 -0
  99. package/style/sidebar.css +1 -0
  100. package/types.js +1 -0
  101. package/utility/calendar.js +45 -0
  102. package/utility/date.js +111 -0
  103. package/utility/index.js +125 -0
  104. package/utility/language.js +20 -0
  105. package/utility/mql.js +6 -0
  106. package/utility/normalize-test.js +54 -0
  107. package/utility/normalize.js +108 -0
  108. package/utility/numbers.js +93 -0
  109. package/utility/numeric.js +103 -0
  110. package/utility/others.js +142 -0
  111. package/utility/strings-test.js +216 -0
  112. package/utility/strings.js +85 -0
  113. package/utility/validation/common.js +278 -0
  114. package/utility/validation/index.js +110 -0
  115. package/utility/validation/specific.js +14 -0
  116. package/utility/validation/validate/bank-test.js +41 -0
  117. package/utility/validation/validate/bank.js +176 -0
  118. package/utility/validation/validate/cif-test.js +37 -0
  119. package/utility/validation/validate/cif.js +44 -0
  120. package/utility/validation/validate/cnp-test.js +68 -0
  121. package/utility/validation/validate/cnp.js +193 -0
  122. package/{src/utility → utility}/validation/validate/date.js +61 -73
  123. package/utility/validation/validate/email-test.js +30 -0
  124. package/utility/validation/validate/email.js +11 -0
  125. package/utility/validation/validate/index.js +65 -0
  126. package/.eslintignore +0 -2
  127. package/.eslintrc.json +0 -275
  128. package/.flowconfig +0 -23
  129. package/conf/dev.js +0 -19
  130. package/conf/dist.js +0 -19
  131. package/conf/polyfills/tempPolyfills.js +0 -7
  132. package/src/Account/Load.jsx +0 -79
  133. package/src/Account/actions.js +0 -10
  134. package/src/Account/index.js +0 -11
  135. package/src/Account/reducer.js +0 -139
  136. package/src/Account/request.js +0 -36
  137. package/src/Async/InitModule.jsx +0 -114
  138. package/src/Async/RouteLoading.jsx +0 -52
  139. package/src/Async/SimulatedException.jsx +0 -19
  140. package/src/Async/index.jsx +0 -75
  141. package/src/Async/types.js +0 -39
  142. package/src/Company/Load.jsx +0 -84
  143. package/src/Company/actions.js +0 -10
  144. package/src/Company/index.js +0 -11
  145. package/src/Company/reducer.js +0 -201
  146. package/src/Company/request.js +0 -30
  147. package/src/Company/util.js +0 -7
  148. package/src/Header/AccountOptionsContainer.jsx +0 -124
  149. package/src/Header/AdminSelectCompany.jsx +0 -101
  150. package/src/Header/ClientSelectCompany.jsx +0 -90
  151. package/src/Header/Header.jsx +0 -120
  152. package/src/Header/HeaderContainer.jsx +0 -30
  153. package/src/Header/Logo.jsx +0 -16
  154. package/src/Header/LogoutButton.jsx +0 -34
  155. package/src/Header/index.jsx +0 -9
  156. package/src/Header/request.js +0 -28
  157. package/src/Header/types.js +0 -6
  158. package/src/Header/util.jsx +0 -61
  159. package/src/Inputs/Business/BankAccount.jsx +0 -39
  160. package/src/Inputs/Business/BankName.jsx +0 -40
  161. package/src/Inputs/Business/CifField.jsx +0 -93
  162. package/src/Inputs/Business/CifFieldContainer.jsx +0 -142
  163. package/src/Inputs/Business/Email.jsx +0 -23
  164. package/src/Inputs/Business/NidField.jsx +0 -77
  165. package/src/Inputs/Business/Phone.jsx +0 -23
  166. package/src/Inputs/Business/index.js +0 -16
  167. package/src/Inputs/Business/request.js +0 -39
  168. package/src/Inputs/CaptchaBox.jsx +0 -131
  169. package/src/Inputs/DateInput.jsx +0 -188
  170. package/src/Inputs/DateTemplate.jsx +0 -213
  171. package/src/Inputs/DelayInputChange.jsx +0 -130
  172. package/src/Inputs/FocusTemplate.jsx +0 -41
  173. package/src/Inputs/InputTemplate.jsx +0 -79
  174. package/src/Inputs/LabelTemplate.jsx +0 -47
  175. package/src/Inputs/NumericInput.jsx +0 -142
  176. package/src/Inputs/NumericTemplate.jsx +0 -155
  177. package/src/Inputs/Selects/County.jsx +0 -19
  178. package/src/Inputs/Selects/Custom.jsx +0 -55
  179. package/src/Inputs/Selects/Simple.jsx +0 -73
  180. package/src/Inputs/Selects/index.jsx +0 -37
  181. package/src/Inputs/SimpleInput.jsx +0 -40
  182. package/src/Inputs/SimpleTextarea.jsx +0 -55
  183. package/src/Inputs/TextareaTemplate.jsx +0 -57
  184. package/src/Inputs/Tooltip.jsx +0 -61
  185. package/src/Inputs/index.js +0 -22
  186. package/src/Messages/Error.jsx +0 -83
  187. package/src/Messages/Loading.jsx +0 -43
  188. package/src/Messages/index.jsx +0 -4
  189. package/src/Modal/Delete.jsx +0 -237
  190. package/src/Modal/Root.jsx +0 -57
  191. package/src/Modal/SimpleModal.jsx +0 -47
  192. package/src/Modal/actions.js +0 -7
  193. package/src/Modal/getComponent.jsx +0 -32
  194. package/src/Modal/index.jsx +0 -12
  195. package/src/Modal/reducer.js +0 -40
  196. package/src/Modal/types.js +0 -6
  197. package/src/Modal/util.js +0 -15
  198. package/src/Payment/EstimatePrice/Description.jsx +0 -101
  199. package/src/Payment/EstimatePrice/PayBox.jsx +0 -173
  200. package/src/Payment/EstimatePrice/index.jsx +0 -63
  201. package/src/Payment/EstimatePrice/util.js +0 -15
  202. package/src/Payment/MobilpayForm.jsx +0 -77
  203. package/src/Payment/Modal/BankTransfer.jsx +0 -129
  204. package/src/Payment/Modal/CompanyValability.jsx +0 -14
  205. package/src/Payment/Modal/DoneForm.jsx +0 -209
  206. package/src/Payment/Modal/PaymentDone.jsx +0 -27
  207. package/src/Payment/Modal/index.js +0 -13
  208. package/src/Payment/actions.jsx +0 -22
  209. package/src/Payment/index.jsx +0 -124
  210. package/src/Payment/request.js +0 -50
  211. package/src/Payment/types.js +0 -14
  212. package/src/Payment/util.jsx +0 -52
  213. package/src/Payment/validate.js +0 -25
  214. package/src/Sidebar.jsx +0 -158
  215. package/src/Things.jsx +0 -35
  216. package/src/actions.js +0 -36
  217. package/src/config.js +0 -7
  218. package/src/dev/ErrorBoundary.jsx +0 -98
  219. package/src/dev/TheError.jsx +0 -87
  220. package/src/dev/index.js +0 -127
  221. package/src/dev/types.js +0 -10
  222. package/src/prod/SentryErrorBoundary.jsx +0 -98
  223. package/src/reducer/captchas.js +0 -44
  224. package/src/reducer/counties.js +0 -46
  225. package/src/reducer/index.js +0 -25
  226. package/src/reducer/module.jsx +0 -43
  227. package/src/style/.sass-lint.yml +0 -84
  228. package/src/style/.stylelintrc.json +0 -161
  229. package/src/style/_fancy-text.scss +0 -37
  230. package/src/style/_fix_bootstrap_placeholder_color.scss +0 -14
  231. package/src/style/_header-company.scss +0 -69
  232. package/src/style/_inputs.scss +0 -12
  233. package/src/style/_minimal.scss +0 -31
  234. package/src/style/_navigation.scss +0 -24
  235. package/src/style/_others.scss +0 -79
  236. package/src/style/index.scss +0 -7
  237. package/src/style/sidebar/_animations.scss +0 -21
  238. package/src/style/sidebar/_dark-theme.scss +0 -77
  239. package/src/style/sidebar/_scroll.scss +0 -37
  240. package/src/style/sidebar/_structure.scss +0 -299
  241. package/src/style/sidebar.scss +0 -4
  242. package/src/types.js +0 -31
  243. package/src/utility/calendar.js +0 -39
  244. package/src/utility/date.js +0 -100
  245. package/src/utility/index.js +0 -12
  246. package/src/utility/language.js +0 -17
  247. package/src/utility/mql.js +0 -3
  248. package/src/utility/normalize-test.js +0 -58
  249. package/src/utility/normalize.js +0 -119
  250. package/src/utility/numbers.js +0 -87
  251. package/src/utility/numeric.js +0 -114
  252. package/src/utility/others.jsx +0 -160
  253. package/src/utility/strings-test.js +0 -136
  254. package/src/utility/strings.js +0 -80
  255. package/src/utility/validation/common.js +0 -360
  256. package/src/utility/validation/index.js +0 -70
  257. package/src/utility/validation/specific.js +0 -9
  258. package/src/utility/validation/validate/bank-test.js +0 -129
  259. package/src/utility/validation/validate/bank.js +0 -176
  260. package/src/utility/validation/validate/cif-test.js +0 -105
  261. package/src/utility/validation/validate/cif.js +0 -44
  262. package/src/utility/validation/validate/cnp-test.js +0 -216
  263. package/src/utility/validation/validate/cnp.js +0 -261
  264. package/src/utility/validation/validate/email-test.js +0 -36
  265. package/src/utility/validation/validate/email.js +0 -6
  266. package/src/utility/validation/validate/index.js +0 -7
  267. package/webpack.config.js +0 -90
  268. package/x25.wiki/Account.md +0 -41
  269. package/x25.wiki/Company.md +0 -39
  270. package/x25.wiki/Header.md +0 -21
  271. package/x25.wiki/Home.md +0 -1
  272. package/x25.wiki/Inputs.md +0 -33
  273. package/x25.wiki/Messages.md +0 -27
  274. package/x25.wiki/Payment.md +0 -42
@@ -1,40 +0,0 @@
1
- // @flow
2
-
3
- import type { Action, State } from "src\\types";
4
-
5
- import * as Immutable from "immutable";
6
-
7
- const initialState = Immutable.List();
8
-
9
- const
10
- showModal = (state : any, { payload : { modalType, modalProps } }) => (
11
- state.push(Immutable.Map({
12
- type : modalType,
13
- props : Immutable.Map(modalProps),
14
- }))
15
- ),
16
- hideModal = (state : any) => (
17
- state.pop()
18
- );
19
-
20
- const reducer = (state : any = initialState, action : Action) => {
21
- switch (action.type) {
22
- case "SHOW_MODAL":
23
- return showModal(state,
24
- action);
25
-
26
- case "HIDE_MODAL":
27
- return hideModal(state);
28
-
29
- default:
30
- return state;
31
- }
32
- };
33
-
34
- const getModals = (state : State) => state.get("modal") || Immutable.List();
35
-
36
- export const selectors = {
37
- getModals,
38
- };
39
-
40
- export default reducer;
@@ -1,6 +0,0 @@
1
- // @flow
2
- import * as React from "react";
3
-
4
- export type ModalsTypes = {
5
- [string]: React.Node,
6
- };
package/src/Modal/util.js DELETED
@@ -1,15 +0,0 @@
1
- // @flow
2
-
3
- import type { ModalsTypes } from "./types";
4
-
5
- let all = {};
6
-
7
- export const injectModals = (newModals : ModalsTypes) => {
8
- all = {
9
- ...all,
10
- // $FlowFixMe
11
- ...newModals,
12
- };
13
- };
14
-
15
- export const getModal = (type : string) => all[type];
@@ -1,101 +0,0 @@
1
- // @flow
2
- /* eslint-disable max-len */
3
-
4
- import React from "react";
5
-
6
- const Description = () => (
7
- <div className="">
8
- <div className="pricing-header px-3 py-3 pt-md-5 pb-md-4 mx-auto text-center">
9
- <h1>
10
- <svg
11
- aria-hidden="true"
12
- data-icon="file-invoice-dollar"
13
- data-prefix="fas" focusable="false" role="img" style={{
14
- width: "2em",
15
- }}
16
- viewBox="0 0 600 600"
17
- xmlns="http://www.w3.org/2000/svg">
18
- <g>
19
- <g>
20
- <g>
21
- <path d="M118.033,127.717h117.73c4.645,0,8.411-3.766,8.411-8.411c0-4.645-3.766-8.412-8.411-8.412h-117.73
22
- c-4.645,0-8.411,3.766-8.411,8.412C109.622,123.951,113.388,127.717,118.033,127.717z" />
23
- <path d="M302.104,157.821h-184.07c-4.645,0-8.411,3.766-8.411,8.412s3.766,8.411,8.411,8.411h184.07
24
- c4.645,0,8.411-3.766,8.411-8.411S306.749,157.821,302.104,157.821z" />
25
- <path d="M118.033,221.569h117.73c4.645,0,8.411-3.766,8.411-8.412c0-4.645-3.766-8.411-8.411-8.411h-117.73
26
- c-4.645,0-8.411,3.766-8.411,8.411C109.622,217.803,113.388,221.569,118.033,221.569z" />
27
- <path d="M287.613,366.171H108.608c-4.645,0-8.411,3.766-8.411,8.412v52.641c0,4.645,3.766,8.411,8.411,8.411h179.005
28
- c4.645,0,8.412-3.766,8.412-8.411v-52.641C296.025,369.937,292.26,366.171,287.613,366.171z M279.202,418.813H117.02v-35.819
29
- h162.182V418.813z" />
30
- <path d="M118.033,268.495h65.793c4.645,0,8.412-3.766,8.412-8.412c0-4.645-3.766-8.411-8.412-8.411h-65.793
31
- c-4.645,0-8.411,3.766-8.411,8.411C109.622,264.729,113.388,268.495,118.033,268.495z" />
32
- <path d="M118.033,315.421h117.73c4.645,0,8.411-3.766,8.411-8.412c0-4.645-3.766-8.411-8.411-8.411h-117.73
33
- c-4.645,0-8.411,3.766-8.411,8.411C109.622,311.655,113.388,315.421,118.033,315.421z" />
34
- <path d="M302.104,63.967h-184.07c-4.645,0-8.411,3.766-8.411,8.412c0,4.645,3.766,8.411,8.411,8.411h184.07
35
- c4.645,0,8.411-3.766,8.411-8.411C310.515,67.733,306.749,63.967,302.104,63.967z" />
36
- <path d="M358.442,315.421h36.213c4.645,0,8.411-3.766,8.411-8.412c0-4.645-3.766-8.411-8.411-8.411h-36.213
37
- c-4.645,0-8.411,3.766-8.411,8.411C350.03,311.655,353.796,315.421,358.442,315.421z" />
38
- <path d="M382.093,391.813v-14.915c2.649,0.688,5.397,1.864,8.145,3.337c1.079,0.59,2.258,0.884,3.435,0.884
39
- c3.728,0,6.672-2.845,6.672-6.574c0-2.943-1.668-4.808-3.533-5.888c-4.219-2.355-8.93-3.924-14.228-4.709v-1.374
40
- c0-2.844-2.258-5.102-5.103-5.102c-2.845,0-5.102,2.258-5.102,5.102v1.179c-12.365,1.276-20.608,8.537-20.608,19.33
41
- c0,11.679,6.967,17.075,21.097,20.902v15.603c-4.514-0.981-8.438-2.845-12.56-5.494c-1.178-0.785-2.551-1.276-3.828-1.276
42
- c-3.827,0-6.771,2.845-6.771,6.672c0,2.65,1.276,4.612,3.337,5.888c5.789,3.532,12.364,5.986,19.332,6.868v5.299
43
- c0,2.844,2.257,5.103,5.102,5.103c2.845,0,5.103-2.259,5.103-5.103v-5.202c12.364-1.374,20.802-8.438,20.802-19.428
44
- C403.386,401.921,397.008,395.836,382.093,391.813z M372.869,389.263c-5.397-1.964-6.771-4.024-6.771-7.066
45
- c0-3.14,2.06-5.496,6.771-6.183V389.263z M382.093,420.075v-13.639c5.299,1.864,6.967,4.022,6.967,7.26
46
- C389.061,417.229,386.705,419.388,382.093,420.075z" />
47
- <path d="M358.442,80.79h36.213c4.645,0,8.411-3.766,8.411-8.411c0-4.645-3.766-8.412-8.411-8.412h-36.213
48
- c-4.645,0-8.411,3.766-8.411,8.412C350.03,77.024,353.796,80.79,358.442,80.79z" />
49
- <path d="M358.442,268.495h36.213c4.645,0,8.411-3.766,8.411-8.412c0-4.645-3.766-8.411-8.411-8.411h-36.213
50
- c-4.645,0-8.411,3.766-8.411,8.411C350.03,264.729,353.796,268.495,358.442,268.495z" />
51
- <path d="M429.771,0H82.224C68.309,0,56.989,11.32,56.989,25.235V491.26c0,11.324,7.087,19.232,17.234,19.232
52
- c3.287,0,6.647-0.865,9.986-2.569l17.684-9.031c2.783-1.421,6.849-2.236,11.157-2.236c4.308,0,8.375,0.815,11.157,2.235
53
- l17.684,9.032c5.147,2.629,11.827,4.076,18.808,4.076c6.98,0,13.66-1.448,18.808-4.077l17.686-9.032
54
- c2.781-1.421,6.847-2.236,11.155-2.236c4.308,0,8.376,0.815,11.158,2.236l17.684,9.032c5.148,2.629,11.827,4.076,18.808,4.076
55
- c6.98,0,13.66-1.448,18.808-4.077l17.686-9.032c2.781-1.421,6.847-2.236,11.155-2.236c4.308,0,8.376,0.815,11.158,2.236
56
- l17.684,9.032c5.147,2.629,11.827,4.076,18.808,4.076c6.982,0,13.66-1.448,18.808-4.077l17.684-9.031
57
- c2.783-1.421,6.849-2.236,11.157-2.236c4.308,0,8.375,0.815,11.157,2.235l17.684,9.032c3.339,1.705,6.698,2.569,9.985,2.569
58
- h0.001c5.081,0,9.627-2.085,12.802-5.87c2.899-3.457,4.431-8.077,4.431-13.362V25.231C455.005,11.32,443.685,0,429.771,0z
59
- M438.182,491.26c0,1.32-0.25,2.092-0.41,2.409c-0.274,0-1.048-0.071-2.335-0.729l-17.683-9.032
60
- c-5.148-2.629-11.827-4.076-18.808-4.076c-6.98,0-13.66,1.448-18.808,4.077l-17.684,9.031c-2.783,1.421-6.849,2.236-11.157,2.236
61
- c-4.308,0-8.375-0.815-11.157-2.235l-17.683-9.032c-5.148-2.629-11.828-4.077-18.809-4.077c-6.982,0-13.66,1.448-18.807,4.077
62
- l-17.684,9.031c-2.783,1.421-6.849,2.236-11.157,2.236c-4.308,0-8.375-0.815-11.157-2.235l-17.684-9.032
63
- c-5.148-2.629-11.828-4.077-18.809-4.077s-13.66,1.448-18.807,4.077l-17.684,9.031c-2.783,1.421-6.849,2.236-11.157,2.236
64
- c-4.308,0-8.375-0.815-11.157-2.235l-17.684-9.032c-5.148-2.629-11.827-4.076-18.808-4.076c-6.98,0-13.66,1.448-18.808,4.077
65
- l-17.684,9.031c-1.289,0.658-2.063,0.729-2.335,0.729H74.22c-0.16-0.317-0.41-1.089-0.41-2.409l0.003-466.027
66
- c0-4.639,3.774-8.412,8.412-8.412h347.547c4.638,0,8.411,3.773,8.411,8.412V491.26z" />
67
- <path d="M358.442,221.569h36.213c4.645,0,8.411-3.766,8.411-8.412c0-4.645-3.766-8.411-8.411-8.411h-36.213
68
- c-4.645,0-8.411,3.766-8.411,8.411C350.03,217.803,353.796,221.569,358.442,221.569z" />
69
- <path d="M358.442,127.717h36.213c4.645,0,8.411-3.766,8.411-8.411c0-4.645-3.766-8.412-8.411-8.412h-36.213
70
- c-4.645,0-8.411,3.766-8.411,8.412C350.03,123.951,353.796,127.717,358.442,127.717z" />
71
- <path d="M358.442,174.644h36.213c4.645,0,8.411-3.766,8.411-8.411s-3.766-8.412-8.411-8.412h-36.213
72
- c-4.645,0-8.411,3.766-8.411,8.412S353.796,174.644,358.442,174.644z" />
73
- </g>
74
- </g>
75
- </g>
76
- <g />
77
- <g />
78
- <g />
79
- <g />
80
- <g />
81
- <g />
82
- <g />
83
- <g />
84
- <g />
85
- <g />
86
- <g />
87
- <g />
88
- <g />
89
- <g />
90
- <g />
91
- </svg>
92
- </h1>
93
- <h2>{"Facturare"}</h2>
94
- <p className="lead">{`
95
- Bucurăte de avantajele facturării online`}
96
- </p>
97
- </div>
98
- </div>
99
- );
100
-
101
- export default Description;
@@ -1,173 +0,0 @@
1
- // @flow
2
- /* eslint-disable no-magic-numbers*/
3
-
4
-
5
- // type PayBox = {
6
- // };
7
-
8
- import type { PayUsingBankTransferType } from "../types";
9
-
10
- import React from "react";
11
- import { Field } from "redux-form/immutable";
12
-
13
- import { LoadingMessage } from "../../Messages";
14
- import { CustomSelect, LabelTemplate } from "../../Inputs";
15
- import { normalizeBoolean, plainNumberToLocale } from "../../utility";
16
-
17
- import { ApplicationCodeInvoiceService } from "../codes";
18
-
19
- import * as Immutable from "immutable";
20
-
21
- import { getPrice } from "./util";
22
-
23
- const createOption = (text, months) => ({
24
- name : `${text}`,
25
- value : months,
26
- });
27
-
28
- const selectOptions = () => ([
29
- createOption("1 lună",
30
- 1),
31
- createOption("3 luni",
32
- 3),
33
- createOption("6 luni",
34
- 6),
35
- createOption("1 an",
36
- 12),
37
- createOption("2 ani",
38
- 24),
39
- ]);
40
-
41
- type PayBoxPropTypes = {
42
- +companyID: number;
43
- +current: any;
44
- +error?: any;
45
- +pristine: bool;
46
- +submitting: bool;
47
- +payUsingBankTransfer: PayUsingBankTransferType;
48
- +handleSubmit: (() => Promise<*>) => Promise<*>;
49
- +createPayment: (data : any) => Promise<*>
50
- };
51
-
52
- class PayBox extends React.Component<PayBoxPropTypes> {
53
- props: PayBoxPropTypes;
54
-
55
- shouldComponentUpdate () {
56
- return true;
57
- }
58
-
59
- render () {
60
- const { current, companyID, error, submitting,
61
- pristine, payUsingBankTransfer } = this.props;
62
-
63
- if (typeof current === "undefined") {
64
- return null;
65
- }
66
-
67
- const
68
- Months = current.get("Months");
69
-
70
- const
71
- amount = getPrice(Months);
72
-
73
- return (
74
- <form
75
- onSubmit={this.props.handleSubmit(this.props.createPayment)}>
76
- {error ? (
77
- <div className="alert alert-danger">
78
- {error}
79
- </div>
80
- ) : null}
81
- <div className="container">
82
- <div className="row">
83
- <div className="col">
84
- <div className="card mb-2 mt-2 shadow-sm">
85
- <div className="card-header">
86
- <h5 className="my-0 font-weight-normal">{"Serviciu facturare online"}</h5>
87
- </div>
88
- <div className="card-body">
89
- <Field
90
- component={CustomSelect}
91
- data={selectOptions()}
92
- disable={submitting}
93
- label="Durată"
94
- name="Months"
95
- />
96
- <h1 className="card-title pricing-card-title">
97
- {`${plainNumberToLocale(amount)} lei`}
98
- </h1>
99
- <ul className="list-unstyled mt-3 mb-4">
100
- <li>
101
- <i className="fa fa-check mr-1 text-success" />
102
- {"Emite facturi simplu online"}
103
- </li>
104
- <li>
105
- <i className="fa fa-check mr-1 text-success" />
106
- {"Trimite facturi pe e-mail"}
107
- </li>
108
- <li>
109
- <i className="fa fa-check mr-1 text-success" />
110
- {"Scapă de stresul facturilor tipizate"}
111
- </li>
112
- </ul>
113
- <div className="container mb-3 small">
114
- <div className="row">
115
- <div className="form-control-label">
116
- <Field
117
- component={LabelTemplate}
118
- label={(
119
- <span>
120
- {"Sunt de acord cu "}
121
- <a href="/settings/termeni-si-conditii/gestiune" target="_blank">
122
- {"termenii și condițiile"}
123
- </a>
124
- </span>
125
- )}
126
- left=""
127
- name="AcceptPolicy"
128
- normalize={normalizeBoolean}
129
- type="checkbox"
130
- />
131
- </div>
132
- </div>
133
- </div>
134
- {
135
- submitting ? (
136
- <LoadingMessage sm />
137
- ) : (
138
- <button
139
- aria-label="Trimite"
140
- className="btn btn-lg btn-block btn-primary"
141
- disabled={submitting || pristine}
142
- type="submit">
143
- <i className="fa fa-credit-card mr-1" />
144
- {"Achiziționez online"}
145
- </button>
146
- )
147
- }
148
- <hr />
149
- <button
150
- className="btn btn-text text-muted curson-pointer m-0 p-0"
151
- disabled={submitting}
152
- onClick={payUsingBankTransfer(
153
- ApplicationCodeInvoiceService,
154
- Immutable.Map({
155
- Months,
156
- companyID,
157
- amount,
158
- }),
159
- )}
160
- type="button">
161
- {"Plătesc prin transfer bancar"}
162
- </button>
163
- </div>
164
- </div>
165
- </div>
166
- </div>
167
- </div>
168
- </form>
169
- );
170
- }
171
- }
172
-
173
- export default PayBox;
@@ -1,63 +0,0 @@
1
- // @flow
2
- /* eslint-disable no-magic-numbers */
3
-
4
- type EstimateBoxProps = {
5
- +id: string;
6
- +formValues: any;
7
- };
8
-
9
- import { connect } from "react-redux";
10
- import { reduxForm, getFormValues } from "redux-form/immutable";
11
-
12
- import React from "react";
13
- import * as Immutable from "immutable";
14
-
15
- import Description from "./Description";
16
- import PayBox from "./PayBox";
17
- import Payment from "../";
18
- import { ApplicationCodeInvoiceService } from "../codes";
19
-
20
- const formID = "PAY_FOR_COMPANY_INVOICES";
21
-
22
- import { validate } from "../validate";
23
-
24
- const PayBoxForm = reduxForm({
25
- form: formID,
26
- validate,
27
- })(PayBox);
28
-
29
- const formValuesSelector = getFormValues(formID);
30
-
31
- const
32
- mapStateToProps = (state : any) => ({
33
- formValues: formValuesSelector(state),
34
- });
35
-
36
- const EstimateBox = (props : EstimateBoxProps) => {
37
- const { id, formValues } = props;
38
-
39
- return (
40
- <div className="container mt-2">
41
- <div className="row">
42
- <div className="col-lg">
43
- <Description />
44
- </div>
45
- <div className="col-lg">
46
- <Payment
47
- application={ApplicationCodeInvoiceService}
48
- companyID={id}>
49
- <PayBoxForm
50
- companyID={id}
51
- current={formValues}
52
- initialValues={Immutable.Map({
53
- Months: 6,
54
- })}
55
- />
56
- </Payment>
57
- </div>
58
- </div>
59
- </div>
60
- );
61
- };
62
-
63
- export default connect(mapStateToProps)(EstimateBox);
@@ -1,15 +0,0 @@
1
- // @flow
2
-
3
- import Big from "big.js";
4
-
5
- const up = 3;
6
-
7
- export const
8
- // in LEI 16.01.2019
9
- pricePerMonth = 10.99,
10
- getPrice = (months : number) => parseFloat(
11
- new Big(months).
12
- times(new Big(pricePerMonth)).
13
- round(0,
14
- up),
15
- );
@@ -1,77 +0,0 @@
1
- // @flow
2
-
3
- type MobilpayFormPropTypes = {
4
- +envKey: string;
5
- +data: string;
6
- }
7
-
8
- const delay = 1200;
9
-
10
- import React from "react";
11
-
12
- import { LoadingMessage } from "../Messages";
13
-
14
- import { config } from "../config";
15
-
16
- class MobilpayForm extends React.Component<MobilpayFormPropTypes> {
17
-
18
- props: MobilpayFormPropTypes;
19
-
20
- form: any;
21
-
22
- timeout: any;
23
-
24
- registerForm: (form :any) => void;
25
- submit: () => void;
26
- startWaiting: () => void;
27
- stopWaiting: () => void;
28
-
29
- constructor (props : MobilpayFormPropTypes) {
30
- super(props);
31
-
32
- this.registerForm = (form : any) => {
33
- this.form = form;
34
- };
35
-
36
- this.submit = () => {
37
- this.form.submit();
38
- };
39
-
40
- this.startWaiting = () => {
41
- this.timeout = setTimeout(() => {
42
- this.submit();
43
- }, delay);
44
- };
45
-
46
- this.stopWaiting = () => {
47
- clearTimeout(this.timeout);
48
- };
49
- }
50
-
51
- componentDidMount () {
52
- this.startWaiting();
53
- }
54
-
55
- shouldComponentUpdate (nextProps : MobilpayFormPropTypes) {
56
- return (
57
- this.props.envKey !== nextProps.envKey ||
58
- this.props.data !== nextProps.data
59
- );
60
- }
61
-
62
- componentWillUnmount () {
63
- this.stopWaiting();
64
- }
65
-
66
- render () {
67
- return (
68
- <form action={config.MobilPayURL} method="POST" ref={this.registerForm}>
69
- <input name="env_key" type="hidden" value={this.props.envKey} />
70
- <input name="data" type="hidden" value={this.props.data} />
71
- <LoadingMessage className="mt-5" message="Se inițiază conexiunea..." />
72
- </form>
73
- );
74
- }
75
- }
76
-
77
- export default MobilpayForm;
@@ -1,129 +0,0 @@
1
- // @flow
2
-
3
- import React from "react";
4
- import { SimpleModal } from "../../Modal";
5
-
6
- import { getDetails, info } from "../util";
7
-
8
- import { numberToLocale } from "../../utility";
9
-
10
- import DoneForm from "./DoneForm";
11
-
12
- type BankTransferPropTypes = {
13
- +application: string;
14
- +options: any;
15
- };
16
-
17
- type BankTransferStateTypes = {
18
- done: bool;
19
- };
20
-
21
- class BankTransfer extends React.Component<BankTransferPropTypes, BankTransferStateTypes> {
22
- props: BankTransferPropTypes;
23
- state: BankTransferStateTypes;
24
-
25
- transferIsDone: () => void;
26
-
27
- constructor (props: BankTransferPropTypes) {
28
- super(props);
29
-
30
- this.state = {
31
- done: false,
32
- };
33
-
34
- this.transferIsDone = () => {
35
- this.setState({
36
- done: true,
37
- });
38
- };
39
- }
40
-
41
- shouldComponentUpdate () {
42
- return (
43
- true
44
- );
45
- }
46
-
47
- render () {
48
- const { application, options } = this.props;
49
-
50
- const details = getDetails(application, options);
51
-
52
- if (this.state.done) {
53
- return <DoneForm details={details} />;
54
- }
55
-
56
- return (
57
- <React.Fragment>
58
- <div>
59
- {"Te rugăm să operezi următorul transfer bancar."}
60
- </div>
61
- <div className="container mt-3">
62
- <div className="row">
63
- <div className="col-lg-8 offset-lg-2 card">
64
- <div className="container card-body">
65
- <div className="row">
66
- <div className="col-md-4 text-md-right">{"Către"}</div>
67
- <div className="col-md-8 font-weight-bold">{info.to}</div>
68
- </div>
69
- <div className="row">
70
- <div className="col-md-4 text-md-right">{""}</div>
71
- <div className="col-md-8 small">
72
- {`C.I.F. ${info.cif} și Reg. Com. ${info.regCom}`}
73
- </div>
74
- </div>
75
- <div className="row">
76
- <div className="col-md-4 text-md-right">{"Din"}</div>
77
- <div className="col-md-8 small">{info.address}</div>
78
- </div>
79
- <hr />
80
- <div className="row">
81
- <div className="col-md-4 text-md-right">{"Numele băncii"}</div>
82
- <div className="col-md-8">{info.bankName}</div>
83
- </div>
84
- <div className="row">
85
- <div className="col-md-4 text-md-right">{"IBAN"}</div>
86
- <div className="col-md-8 font-weight-bold">{info.bankAccount}</div>
87
- </div>
88
- <div className="row">
89
- <div className="col-md-4 text-md-right">{"Suma"}</div>
90
- <div className="col-md-8 font-weight-bold">
91
- {numberToLocale(options.amount)}{" lei"}
92
- </div>
93
- </div>
94
- <div className="row">
95
- <div className="col-md-4 text-md-right">{"Referință"}</div>
96
- <div className="col-md-8 font-weight-bold">
97
- <code>{details}</code>
98
- </div>
99
- </div>
100
- </div>
101
- </div>
102
- </div>
103
- </div>
104
- <div className="alert alert-warning mt-3">
105
- <i className="fa fa-exclamation-circle mr-1" />
106
- {"Este foarte important să scrii cu atenție câmpul \"Referință\""}
107
- </div>
108
- <div className="mt-4">
109
- {"După ce ai efectuat transferul bancar, apasă următorul buton:"}
110
- </div>
111
- <button
112
- className="btn btn-block btn-primary mt-4 mr-1 ml-1 mb-3"
113
- onClick={this.transferIsDone}
114
- type="button">
115
- <i className="fa fa-check mr-1" />
116
- {"Am efectuat transferul bancar"}
117
- </button>
118
- </React.Fragment>
119
- );
120
- }
121
- }
122
-
123
- const ModalBankTransfer = (props : BankTransferPropTypes) => (
124
- <SimpleModal size="lg" title="Transfer bancar">
125
- <BankTransfer {...props} />
126
- </SimpleModal>
127
- );
128
-
129
- export default ModalBankTransfer;
@@ -1,14 +0,0 @@
1
- // @flow
2
-
3
- import React from "react";
4
- import { SimpleModal } from "../../Modal";
5
-
6
- import EstimatePrice from "../EstimatePrice";
7
-
8
- const ModalWrap = ({ id } : { +id : string }) => (
9
- <SimpleModal size="lg" title="Reînnoiește abonamentul">
10
- <EstimatePrice id={id} />
11
- </SimpleModal>
12
- );
13
-
14
- export default ModalWrap;