x25 17.0.15 → 17.0.19

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 (191) hide show
  1. package/Account/actions.d.ts +2 -0
  2. package/Account/actions.js +10 -15
  3. package/Account/actions.js.map +1 -0
  4. package/Account/request.d.ts +1 -0
  5. package/Account/request.js +51 -44
  6. package/Account/request.js.map +1 -0
  7. package/Messages/Error.d.ts +9 -0
  8. package/Messages/Error.js +35 -108
  9. package/Messages/Error.js.map +1 -0
  10. package/Messages/Loading.d.ts +7 -0
  11. package/Messages/Loading.js +32 -70
  12. package/Messages/Loading.js.map +1 -0
  13. package/Messages/index.d.ts +2 -0
  14. package/Messages/index.js +15 -29
  15. package/Messages/index.js.map +1 -0
  16. package/Modal/Root.d.ts +10 -0
  17. package/Modal/Root.js +63 -81
  18. package/Modal/Root.js.map +1 -0
  19. package/Modal/SimpleModal.d.ts +10 -0
  20. package/Modal/SimpleModal.js +32 -57
  21. package/Modal/SimpleModal.js.map +1 -0
  22. package/Modal/actions.d.ts +2 -0
  23. package/Modal/actions.js +8 -10
  24. package/Modal/actions.js.map +1 -0
  25. package/Modal/getComponent.d.ts +2 -0
  26. package/Modal/getComponent.js +21 -42
  27. package/Modal/getComponent.js.map +1 -0
  28. package/Modal/reducer.d.ts +6 -0
  29. package/Modal/reducer.js +45 -53
  30. package/Modal/reducer.js.map +1 -0
  31. package/Modal/types.d.ts +2 -0
  32. package/Modal/types.js +3 -7
  33. package/Modal/types.js.map +1 -0
  34. package/Modal/util.d.ts +3 -0
  35. package/Modal/util.js +22 -17
  36. package/Modal/util.js.map +1 -0
  37. package/Things.d.ts +2 -0
  38. package/Things.js +22 -53
  39. package/Things.js.map +1 -0
  40. package/actions.d.ts +11 -0
  41. package/actions.js +50 -73
  42. package/actions.js.map +1 -0
  43. package/config.d.ts +2 -0
  44. package/config.js +9 -10
  45. package/config.js.map +1 -0
  46. package/index.d.ts +0 -0
  47. package/index.js +2 -0
  48. package/index.js.map +1 -0
  49. package/package.json +70 -81
  50. package/types/index.d.ts +21 -0
  51. package/types/index.js +3 -0
  52. package/types/index.js.map +1 -0
  53. package/utility/calendar.d.ts +15 -0
  54. package/utility/calendar.js +33 -45
  55. package/utility/calendar.js.map +1 -0
  56. package/utility/date.d.ts +13 -0
  57. package/utility/date.js +68 -111
  58. package/utility/date.js.map +1 -0
  59. package/utility/index.d.ts +10 -0
  60. package/utility/index.js +23 -125
  61. package/utility/index.js.map +1 -0
  62. package/utility/mql.d.ts +1 -0
  63. package/utility/mql.js +5 -6
  64. package/utility/mql.js.map +1 -0
  65. package/utility/normalize.d.ts +21 -0
  66. package/utility/normalize.js +63 -107
  67. package/utility/normalize.js.map +1 -0
  68. package/utility/numbers.d.ts +4 -0
  69. package/utility/numbers.js +37 -82
  70. package/utility/numbers.js.map +1 -0
  71. package/utility/numeric.d.ts +5 -0
  72. package/utility/numeric.js +59 -103
  73. package/utility/numeric.js.map +1 -0
  74. package/utility/others.d.ts +15 -0
  75. package/utility/others.js +36 -92
  76. package/utility/others.js.map +1 -0
  77. package/utility/strings.d.ts +5 -0
  78. package/utility/strings.js +40 -85
  79. package/utility/strings.js.map +1 -0
  80. package/utility/validation/common.d.ts +61 -0
  81. package/utility/validation/common.js +169 -277
  82. package/utility/validation/common.js.map +1 -0
  83. package/utility/validation/index.d.ts +15 -0
  84. package/utility/validation/index.js +72 -112
  85. package/utility/validation/index.js.map +1 -0
  86. package/utility/validation/specific.d.ts +4 -0
  87. package/utility/validation/specific.js +10 -14
  88. package/utility/validation/specific.js.map +1 -0
  89. package/utility/validation/validate/date.d.ts +2 -0
  90. package/utility/validation/validate/date.js +44 -61
  91. package/utility/validation/validate/date.js.map +1 -0
  92. package/utility/validation/validate/email.d.ts +1 -0
  93. package/utility/validation/validate/email.js +9 -11
  94. package/utility/validation/validate/email.js.map +1 -0
  95. package/utility/validation/validate/index.d.ts +2 -0
  96. package/utility/validation/validate/index.js +15 -65
  97. package/utility/validation/validate/index.js.map +1 -0
  98. package/utility/words.d.ts +108 -0
  99. package/utility/words.js +161 -176
  100. package/utility/words.js.map +1 -0
  101. package/Account/Load.js +0 -78
  102. package/Account/index.js +0 -20
  103. package/Account/reducer.js +0 -122
  104. package/Async/InitModule.js +0 -190
  105. package/Async/RouteLoading.js +0 -66
  106. package/Async/SimulatedException.js +0 -44
  107. package/Async/index.js +0 -98
  108. package/Async/types.js +0 -1
  109. package/Company/Load.js +0 -85
  110. package/Company/actions.js +0 -15
  111. package/Company/index.js +0 -20
  112. package/Company/reducer.js +0 -165
  113. package/Company/request.js +0 -36
  114. package/Company/util.js +0 -10
  115. package/Header/AccountOptionsContainer.js +0 -146
  116. package/Header/AdminSelectCompany.js +0 -109
  117. package/Header/ClientSelectCompany.js +0 -106
  118. package/Header/Header.js +0 -129
  119. package/Header/HeaderContainer.js +0 -39
  120. package/Header/Logo.js +0 -30
  121. package/Header/LogoutButton.js +0 -41
  122. package/Header/index.js +0 -19
  123. package/Header/request.js +0 -26
  124. package/Header/types.js +0 -1
  125. package/Header/util.js +0 -60
  126. package/Inputs/Business/BankAccount.js +0 -50
  127. package/Inputs/Business/BankName.js +0 -51
  128. package/Inputs/Business/CifField.js +0 -114
  129. package/Inputs/Business/CifFieldContainer.js +0 -157
  130. package/Inputs/Business/Email.js +0 -37
  131. package/Inputs/Business/NidField.js +0 -93
  132. package/Inputs/Business/Phone.js +0 -37
  133. package/Inputs/Business/index.js +0 -34
  134. package/Inputs/Business/request.js +0 -39
  135. package/Inputs/CaptchaBox.js +0 -153
  136. package/Inputs/DateInput.js +0 -172
  137. package/Inputs/DateTemplate.js +0 -200
  138. package/Inputs/DelayInputChange.js +0 -135
  139. package/Inputs/FocusTemplate.js +0 -47
  140. package/Inputs/InputTemplate.js +0 -78
  141. package/Inputs/LabelTemplate.js +0 -59
  142. package/Inputs/NumericInput.js +0 -139
  143. package/Inputs/NumericTemplate.js +0 -148
  144. package/Inputs/Selects/County.js +0 -29
  145. package/Inputs/Selects/Custom.js +0 -56
  146. package/Inputs/Selects/Simple.js +0 -77
  147. package/Inputs/Selects/index.js +0 -52
  148. package/Inputs/SimpleInput.js +0 -42
  149. package/Inputs/SimpleTextarea.js +0 -47
  150. package/Inputs/TextareaTemplate.js +0 -55
  151. package/Inputs/Tooltip.js +0 -82
  152. package/Inputs/index.js +0 -185
  153. package/Modal/Delete.js +0 -240
  154. package/Modal/index.js +0 -22
  155. package/Payment/EstimatePrice/Description.js +0 -92
  156. package/Payment/EstimatePrice/PayBox.js +0 -220
  157. package/Payment/EstimatePrice/index.js +0 -92
  158. package/Payment/EstimatePrice/util.js +0 -21
  159. package/Payment/MobilpayForm.js +0 -86
  160. package/Payment/Modal/BankTransfer.js +0 -233
  161. package/Payment/Modal/CompanyValability.js +0 -28
  162. package/Payment/Modal/DoneForm.js +0 -222
  163. package/Payment/Modal/PaymentDone.js +0 -53
  164. package/Payment/Modal/index.js +0 -27
  165. package/Payment/actions.js +0 -23
  166. package/Payment/codes.js +0 -53
  167. package/Payment/index.js +0 -141
  168. package/Payment/request.js +0 -49
  169. package/Payment/types.js +0 -1
  170. package/Payment/util.js +0 -50
  171. package/Payment/validate.js +0 -23
  172. package/Sidebar.js +0 -156
  173. package/dev/ErrorBoundary.js +0 -111
  174. package/dev/TheError.js +0 -113
  175. package/dev/index.js +0 -134
  176. package/dev/types.js +0 -1
  177. package/prod/SentryErrorBoundary.js +0 -140
  178. package/reducer/captchas.js +0 -51
  179. package/reducer/counties.js +0 -57
  180. package/reducer/index.js +0 -38
  181. package/reducer/module.js +0 -48
  182. package/types.js +0 -1
  183. package/utility/normalize-test.js +0 -54
  184. package/utility/strings-test.js +0 -216
  185. package/utility/validation/validate/bank-test.js +0 -41
  186. package/utility/validation/validate/bank.js +0 -176
  187. package/utility/validation/validate/cif-test.js +0 -37
  188. package/utility/validation/validate/cif.js +0 -44
  189. package/utility/validation/validate/cnp-test.js +0 -68
  190. package/utility/validation/validate/cnp.js +0 -193
  191. package/utility/validation/validate/email-test.js +0 -30
@@ -0,0 +1,2 @@
1
+ import type { Action } from "types";
2
+ export declare const fetchInitialInformation: (appName: string) => Action;
@@ -1,15 +1,10 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.fetchInitialInformation = undefined;
7
-
8
- var _request = require("./request");
9
-
10
- var fetchInitialInformation = exports.fetchInitialInformation = function fetchInitialInformation(appName) {
11
- return {
12
- type: "FETCH_INITIAL_INFORMATION",
13
- payload: (0, _request.fetchInitialInformation)(appName)
14
- };
15
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchInitialInformation = void 0;
4
+ var request_1 = require("./request");
5
+ var fetchInitialInformation = function (appName) { return ({
6
+ type: "FETCH_INITIAL_INFORMATION",
7
+ payload: (0, request_1.fetchInitialInformation)(appName),
8
+ }); };
9
+ exports.fetchInitialInformation = fetchInitialInformation;
10
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/Account/actions.ts"],"names":[],"mappings":";;;AACA,qCAAsF;AAE/E,IAAM,uBAAuB,GAAG,UAAC,OAAe,IAAa,OAAA,CAAC;IACnE,IAAI,EAAM,2BAA2B;IACrC,OAAO,EAAG,IAAA,iCAA8B,EAAC,OAAO,CAAC;CAClD,CAAC,EAHkE,CAGlE,CAAC;AAHU,QAAA,uBAAuB,2BAGjC"}
@@ -0,0 +1 @@
1
+ export declare const fetchInitialInformation: (app: string) => Promise<any>;
@@ -1,44 +1,51 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.fetchInitialInformation = undefined;
7
-
8
- var _superagent = require("superagent");
9
-
10
- var _superagent2 = _interopRequireDefault(_superagent);
11
-
12
- var _immutable = require("immutable");
13
-
14
- var Immutable = _interopRequireWildcard(_immutable);
15
-
16
- var _utility = require("../utility");
17
-
18
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
-
22
- var normalizeInitialInformation = function normalizeInitialInformation(info) {
23
- var Account = info.Account,
24
- IsConnected = info.IsConnected,
25
- Counties = info.Counties,
26
- Companies = info.Companies;
27
-
28
-
29
- return {
30
- Account: Immutable.Map(Account || {}),
31
- IsConnected: IsConnected,
32
- Error: IsConnected ? _utility.noError : "Not connected",
33
- Counties: typeof Counties === "undefined" ? Immutable.List() : (0, _utility.normalizeArrayByField)(Counties, "Short").entities,
34
- Companies: typeof Companies === "undefined" ? Immutable.List() : (0, _utility.normalizeArray)(Companies).entities
35
- };
36
- };
37
-
38
- var fetchInitialInformation = exports.fetchInitialInformation = function fetchInitialInformation(app) {
39
- return new Promise(function (resolve, reject) {
40
- return _superagent2.default.get("/api/extern/get-initial-information").type("form").query({ app: app }).end((0, _utility.withPromiseCallback)(function (reponse) {
41
- return resolve(normalizeInitialInformation(reponse));
42
- }, reject));
43
- });
44
- };
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __importDefault = (this && this.__importDefault) || function (mod) {
22
+ return (mod && mod.__esModule) ? mod : { "default": mod };
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.fetchInitialInformation = void 0;
26
+ var superagent_1 = __importDefault(require("superagent"));
27
+ var Immutable = __importStar(require("immutable"));
28
+ var utility_1 = require("../utility");
29
+ var normalizeInitialInformation = function (info) {
30
+ var Account = info.Account, IsConnected = info.IsConnected, Counties = info.Counties, Companies = info.Companies;
31
+ return {
32
+ Account: Immutable.Map(Account || {}),
33
+ IsConnected: IsConnected,
34
+ Error: IsConnected ? utility_1.noError : "Not connected",
35
+ Counties: (typeof Counties === "undefined"
36
+ ? Immutable.List()
37
+ : (0, utility_1.normalizeArrayByField)(Counties, "Short").entities),
38
+ Companies: (typeof Companies === "undefined"
39
+ ? Immutable.List()
40
+ : (0, utility_1.normalizeArray)(Companies).entities),
41
+ };
42
+ };
43
+ var fetchInitialInformation = function (app) { return new Promise(function (resolve, reject) { return superagent_1.default.
44
+ get("/api/extern/get-initial-information").
45
+ type("form").
46
+ query({
47
+ app: app,
48
+ }).
49
+ end((0, utility_1.withPromiseCallback)(function (response) { return resolve(normalizeInitialInformation(response)); }, reject)); }); };
50
+ exports.fetchInitialInformation = fetchInitialInformation;
51
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/Account/request.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA+B;AAC/B,mDAAuC;AACvC,sCAAiG;AAEjG,IAAM,2BAA2B,GAAG,UAAC,IAAS;IAE1C,IAAA,OAAO,GAIL,IAAI,QAJC,EACP,WAAW,GAGT,IAAI,YAHK,EACX,QAAQ,GAEN,IAAI,SAFE,EACR,SAAS,GACP,IAAI,UADG,CACF;IAET,OAAO;QACL,OAAO,EAAI,SAAS,CAAC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QACvC,WAAW,aAAA;QACX,KAAK,EAAM,WAAW,CAAC,CAAC,CAAC,iBAAO,CAAC,CAAC,CAAC,eAAe;QAClD,QAAQ,EAAG,CACT,OAAO,QAAQ,KAAK,WAAW;YAC7B,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE;YAClB,CAAC,CAAC,IAAA,+BAAqB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CACtD;QACD,SAAS,EAAE,CACT,OAAO,SAAS,KAAK,WAAW;YAC9B,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE;YAClB,CAAC,CAAC,IAAA,wBAAc,EAAC,SAAS,CAAC,CAAC,QAAQ,CACvC;KACF,CAAC;AACJ,CAAC,CAAC;AAEK,IACL,uBAAuB,GAAG,UAAC,GAAW,IAAK,OAC1C,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM,IAAK,OAAA,oBAAK;IACpC,GAAG,CAAC,qCAAqC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC;IACZ,KAAK,CAAC;IACJ,GAAG,KAAA;CACJ,CAAC;IACF,GAAG,CACD,IAAA,6BAAmB,EAAC,UAAC,QAAQ,IAAK,OAAA,OAAO,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC,EAA9C,CAA8C,EAAE,MAAM,CAAC,CAAC,EAP7D,CAO6D,CAC5E,EATwB,CASxB,CAAC;AATpB,QAAA,uBAAuB,2BASH"}
@@ -0,0 +1,9 @@
1
+ declare type ErrorMessageProps = {
2
+ readonly message: string;
3
+ readonly details?: string;
4
+ readonly itemNotFound?: boolean;
5
+ readonly onRetry?: () => void;
6
+ };
7
+ export declare const ErrorMessage: ({ message, onRetry, }: ErrorMessageProps) => JSX.Element;
8
+ export declare const LargeErrorMessage: ({ message, onRetry, details, itemNotFound, }: ErrorMessageProps) => JSX.Element;
9
+ export {};
package/Messages/Error.js CHANGED
@@ -1,108 +1,35 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.LargeErrorMessage = exports.ErrorMessage = undefined;
7
-
8
- var _react = require("react");
9
-
10
- var _react2 = _interopRequireDefault(_react);
11
-
12
- var _utility = require("../utility");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- var ErrorMessage = exports.ErrorMessage = function ErrorMessage(_ref) {
17
- var message = _ref.message,
18
- onRetry = _ref.onRetry;
19
- return _react2.default.createElement(
20
- "div",
21
- { className: "container alert alert-warning" },
22
- _react2.default.createElement(
23
- "div",
24
- { className: "row" },
25
- _react2.default.createElement(
26
- "div",
27
- { className: "col-2 col-sm-1" },
28
- _react2.default.createElement("i", { className: "fa fa-exclamation-triangle fa-2x" })
29
- ),
30
- _react2.default.createElement(
31
- "div",
32
- { className: "col-7 col-sm-8" },
33
- _react2.default.createElement(
34
- "h5",
35
- null,
36
- message
37
- )
38
- ),
39
- _react2.default.createElement(
40
- "div",
41
- { className: "col-3 col-sm-3 text-right" },
42
- typeof onRetry === "undefined" ? null : _react2.default.createElement(
43
- "button",
44
- {
45
- className: "btn btn-primary btn-sm",
46
- onClick: onRetry,
47
- type: "button" },
48
- _react2.default.createElement(
49
- "span",
50
- { className: "hidden-sm-down" },
51
- _utility.words.TryAgain
52
- ),
53
- _react2.default.createElement(
54
- "span",
55
- { className: "visible-up d-md-none" },
56
- _react2.default.createElement("i", { className: "fa fa-refresh" })
57
- )
58
- )
59
- )
60
- )
61
- );
62
- };
63
-
64
- var LargeErrorMessage = exports.LargeErrorMessage = function LargeErrorMessage(_ref2) {
65
- var message = _ref2.message,
66
- onRetry = _ref2.onRetry,
67
- details = _ref2.details,
68
- itemNotFound = _ref2.itemNotFound;
69
- return _react2.default.createElement(
70
- "div",
71
- { className: "container mt-5" },
72
- _react2.default.createElement(
73
- "div",
74
- { className: "row" },
75
- _react2.default.createElement(
76
- "div",
77
- { className: "offset-md-1 offset-xl-2 col-md-2 col-xl-1 text-warning text-center" },
78
- _react2.default.createElement("i", { className: "fa fa-exclamation-triangle fa-5x" })
79
- ),
80
- _react2.default.createElement(
81
- "div",
82
- { className: "col-md-8 col-xl-5" },
83
- _react2.default.createElement(
84
- "h3",
85
- null,
86
- message
87
- ),
88
- _react2.default.createElement(
89
- "div",
90
- { className: "mt-3 text-muted" },
91
- itemNotFound ? _utility.words.ErrorNeverExisted : details || _utility.words.ErrorConnection
92
- ),
93
- _react2.default.createElement(
94
- "div",
95
- { className: "text-right mt-3" },
96
- typeof onRetry === "undefined" ? null : _react2.default.createElement(
97
- "button",
98
- {
99
- className: "btn btn-primary",
100
- onClick: onRetry,
101
- type: "button" },
102
- _utility.words.TryAgain
103
- )
104
- )
105
- )
106
- )
107
- );
108
- };
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LargeErrorMessage = exports.ErrorMessage = void 0;
7
+ var react_1 = __importDefault(require("react"));
8
+ var utility_1 = require("../utility");
9
+ var ErrorMessage = function (_a) {
10
+ var message = _a.message, onRetry = _a.onRetry;
11
+ return (react_1.default.createElement("div", { className: "container alert alert-warning" },
12
+ react_1.default.createElement("div", { className: "row" },
13
+ react_1.default.createElement("div", { className: "col-2 col-sm-1" },
14
+ react_1.default.createElement("i", { className: "fa fa-exclamation-triangle fa-2x" })),
15
+ react_1.default.createElement("div", { className: "col-7 col-sm-8" },
16
+ react_1.default.createElement("h5", null, message)),
17
+ react_1.default.createElement("div", { className: "col-3 col-sm-3 text-right" }, typeof onRetry === "undefined" ? null : (react_1.default.createElement("button", { className: "btn btn-primary btn-sm", onClick: onRetry, type: "button" },
18
+ react_1.default.createElement("span", { className: "hidden-sm-down" }, utility_1.words.TryAgain),
19
+ react_1.default.createElement("span", { className: "visible-up d-md-none" },
20
+ react_1.default.createElement("i", { className: "fa fa-refresh" }))))))));
21
+ };
22
+ exports.ErrorMessage = ErrorMessage;
23
+ var LargeErrorMessage = function (_a) {
24
+ var message = _a.message, onRetry = _a.onRetry, details = _a.details, itemNotFound = _a.itemNotFound;
25
+ return (react_1.default.createElement("div", { className: "container mt-5" },
26
+ react_1.default.createElement("div", { className: "row" },
27
+ react_1.default.createElement("div", { className: "offset-md-1 offset-xl-2 col-md-2 col-xl-1 text-warning text-center" },
28
+ react_1.default.createElement("i", { className: "fa fa-exclamation-triangle fa-5x" })),
29
+ react_1.default.createElement("div", { className: "col-md-8 col-xl-5" },
30
+ react_1.default.createElement("h3", null, message),
31
+ react_1.default.createElement("div", { className: "mt-3 text-muted" }, itemNotFound ? utility_1.words.ErrorNeverExisted : details || utility_1.words.ErrorConnection),
32
+ react_1.default.createElement("div", { className: "text-right mt-3" }, typeof onRetry === "undefined" ? null : (react_1.default.createElement("button", { className: "btn btn-primary", onClick: onRetry, type: "button" }, utility_1.words.TryAgain)))))));
33
+ };
34
+ exports.LargeErrorMessage = LargeErrorMessage;
35
+ //# sourceMappingURL=Error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Error.js","sourceRoot":"","sources":["../../src/Messages/Error.tsx"],"names":[],"mappings":";;;;;;AAMA,gDAA0B;AAC1B,sCAAmC;AAE5B,IAAM,YAAY,GAAG,UAAC,EAGT;QAFlB,OAAO,aAAA,EACP,OAAO,aAAA;IACgB,OAAA,CACvB,uCAAK,SAAS,EAAC,+BAA+B;QAC5C,uCAAK,SAAS,EAAC,KAAK;YAClB,uCAAK,SAAS,EAAC,gBAAgB;gBAC7B,qCAAG,SAAS,EAAC,kCAAkC,GAAG,CAC9C;YACN,uCAAK,SAAS,EAAC,gBAAgB;gBAC7B,0CACG,OAAO,CACL,CACD;YACN,uCAAK,SAAS,EAAC,2BAA2B,IACvC,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACvC,0CAAQ,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ;gBACxE,wCAAM,SAAS,EAAC,gBAAgB,IAC7B,eAAK,CAAC,QAAQ,CACV;gBACP,wCAAM,SAAS,EAAC,sBAAsB;oBACpC,qCAAG,SAAS,EAAC,eAAe,GAAG,CAC1B,CACA,CACV,CACG,CACF,CACF,CACP;AAzBwB,CAyBxB,CAAC;AA5BW,QAAA,YAAY,gBA4BvB;AACK,IAAM,iBAAiB,GAAG,UAAC,EAKd;QAJlB,OAAO,aAAA,EACP,OAAO,aAAA,EACP,OAAO,aAAA,EACP,YAAY,kBAAA;IACW,OAAA,CACvB,uCAAK,SAAS,EAAC,gBAAgB;QAC7B,uCAAK,SAAS,EAAC,KAAK;YAClB,uCAAK,SAAS,EAAC,oEAAoE;gBACjF,qCAAG,SAAS,EAAC,kCAAkC,GAAG,CAC9C;YACN,uCAAK,SAAS,EAAC,mBAAmB;gBAChC,0CACG,OAAO,CACL;gBACL,uCAAK,SAAS,EAAC,iBAAiB,IAC7B,YAAY,CAAC,CAAC,CAAC,eAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,IAAI,eAAK,CAAC,eAAe,CACtE;gBACN,uCAAK,SAAS,EAAC,iBAAiB,IAC7B,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACvC,0CAAQ,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,IAChE,eAAK,CAAC,QAAQ,CACR,CACV,CACG,CACF,CACF,CACF,CACP;AAvBwB,CAuBxB,CAAC;AA5BW,QAAA,iBAAiB,qBA4B5B"}
@@ -0,0 +1,7 @@
1
+ declare type LoadingMessagePropTypes = {
2
+ readonly className?: string;
3
+ readonly message?: string;
4
+ readonly sm?: boolean;
5
+ };
6
+ export declare const LoadingMessage: ({ message, sm, className, }: LoadingMessagePropTypes) => JSX.Element;
7
+ export {};
@@ -1,70 +1,32 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.LoadingMessage = undefined;
7
-
8
- var _react = require("react");
9
-
10
- var _react2 = _interopRequireDefault(_react);
11
-
12
- var _utility = require("../utility");
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- var LoadingMessage = exports.LoadingMessage = function LoadingMessage(_ref) {
17
- var message = _ref.message,
18
- sm = _ref.sm,
19
- className = _ref.className;
20
-
21
-
22
- var isSmall = sm === true;
23
-
24
- var getMessage = function getMessage() {
25
- if (message === "") {
26
- return null;
27
- }
28
-
29
- return message;
30
- };
31
-
32
- if (isSmall) {
33
- return _react2.default.createElement(
34
- "div",
35
- { className: "text-center " + (className || "") + " mb-1" },
36
- _react2.default.createElement(
37
- "div",
38
- { className: "font-weight-bold d-inline" },
39
- getMessage()
40
- ),
41
- _react2.default.createElement(
42
- "div",
43
- { className: "loading-sm d-inline-block" },
44
- _react2.default.createElement("div", null),
45
- _react2.default.createElement("div", null),
46
- _react2.default.createElement("div", null),
47
- _react2.default.createElement("div", null)
48
- )
49
- );
50
- }
51
-
52
- return _react2.default.createElement(
53
- "div",
54
- { className: "text-center my-4 " + (className || "") },
55
- _react2.default.createElement(
56
- "div",
57
- { className: "spinner-border text-primary", role: "status" },
58
- _react2.default.createElement(
59
- "span",
60
- { className: "sr-only" },
61
- _utility.words.LoadingMessage
62
- )
63
- ),
64
- _react2.default.createElement(
65
- "div",
66
- { className: "text-fancy mt-1" },
67
- message
68
- )
69
- );
70
- };
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LoadingMessage = void 0;
7
+ var react_1 = __importDefault(require("react"));
8
+ var utility_1 = require("../utility");
9
+ var LoadingMessage = function (_a) {
10
+ var message = _a.message, sm = _a.sm, className = _a.className;
11
+ var isSmall = sm === true, getMessage = function () {
12
+ if (message === "") {
13
+ return null;
14
+ }
15
+ return message;
16
+ };
17
+ if (isSmall) {
18
+ return (react_1.default.createElement("div", { className: "text-center ".concat(className || "", " mb-1") },
19
+ react_1.default.createElement("div", { className: "font-weight-bold d-inline" }, getMessage()),
20
+ react_1.default.createElement("div", { className: "loading-sm d-inline-block" },
21
+ react_1.default.createElement("div", null),
22
+ react_1.default.createElement("div", null),
23
+ react_1.default.createElement("div", null),
24
+ react_1.default.createElement("div", null))));
25
+ }
26
+ return (react_1.default.createElement("div", { className: "text-center my-4 ".concat(className || "") },
27
+ react_1.default.createElement("div", { className: "spinner-border text-primary", role: "status" },
28
+ react_1.default.createElement("span", { className: "sr-only" }, utility_1.words.LoadingData)),
29
+ react_1.default.createElement("div", { className: "text-fancy mt-1" }, message)));
30
+ };
31
+ exports.LoadingMessage = LoadingMessage;
32
+ //# sourceMappingURL=Loading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Loading.js","sourceRoot":"","sources":["../../src/Messages/Loading.tsx"],"names":[],"mappings":";;;;;;AAKA,gDAA0B;AAC1B,sCAAmC;AAE5B,IAAM,cAAc,GAAG,UAAC,EAIL;QAHxB,OAAO,aAAA,EACP,EAAE,QAAA,EACF,SAAS,eAAA;IAET,IAAM,OAAO,GAAG,EAAE,KAAK,IAAI,EAEzB,UAAU,GAAG;QACX,IAAI,OAAO,KAAK,EAAE,EAAE;YAClB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEJ,IAAI,OAAO,EAAE;QACX,OAAO,CACL,uCAAK,SAAS,EAAE,sBAAe,SAAS,IAAI,EAAE,UAAO;YACnD,uCAAK,SAAS,EAAC,2BAA2B,IACvC,UAAU,EAAE,CACT;YACN,uCAAK,SAAS,EAAC,2BAA2B;gBAAC,0CAAO;gBAAA,0CAAO;gBAAA,0CAAO;gBAAA,0CAAO,CAAM,CACzE,CACP,CAAC;KACH;IAED,OAAO,CACL,uCAAK,SAAS,EAAE,2BAAoB,SAAS,IAAI,EAAE,CAAE;QACnD,uCAAK,SAAS,EAAC,6BAA6B,EAAC,IAAI,EAAC,QAAQ;YACxD,wCAAM,SAAS,EAAC,SAAS,IAAE,eAAK,CAAC,WAAW,CAAQ,CAChD;QACN,uCAAK,SAAS,EAAC,iBAAiB,IAAE,OAAO,CAAO,CAC5C,CACP,CAAC;AACJ,CAAC,CAAC;AAlCW,QAAA,cAAc,kBAkCzB"}
@@ -0,0 +1,2 @@
1
+ export * from "./Error";
2
+ export * from "./Loading";
package/Messages/index.js CHANGED
@@ -1,29 +1,15 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _Error = require("./Error");
8
-
9
- Object.keys(_Error).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- Object.defineProperty(exports, key, {
12
- enumerable: true,
13
- get: function get() {
14
- return _Error[key];
15
- }
16
- });
17
- });
18
-
19
- var _Loading = require("./Loading");
20
-
21
- Object.keys(_Loading).forEach(function (key) {
22
- if (key === "default" || key === "__esModule") return;
23
- Object.defineProperty(exports, key, {
24
- enumerable: true,
25
- get: function get() {
26
- return _Loading[key];
27
- }
28
- });
29
- });
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./Error"), exports);
14
+ __exportStar(require("./Loading"), exports);
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Messages/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAwB;AACxB,4CAA0B"}
@@ -0,0 +1,10 @@
1
+ declare type ModalRootPropTypes = {
2
+ readonly list: any;
3
+ };
4
+ import React from "react";
5
+ declare class ModalRoot extends React.Component<ModalRootPropTypes> {
6
+ shouldComponentUpdate(nextProps: ModalRootPropTypes): boolean;
7
+ render(): any;
8
+ }
9
+ declare const _default: import("react-redux").ConnectedComponent<typeof ModalRoot, import("react-redux").Omit<React.ClassAttributes<ModalRoot> & ModalRootPropTypes, "list">>;
10
+ export default _default;
package/Modal/Root.js CHANGED
@@ -1,81 +1,63 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8
-
9
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
10
-
11
- var _reactRedux = require("react-redux");
12
-
13
- var _react = require("react");
14
-
15
- var _react2 = _interopRequireDefault(_react);
16
-
17
- var _getComponent = require("./getComponent");
18
-
19
- var _getComponent2 = _interopRequireDefault(_getComponent);
20
-
21
- var _reducer = require("./reducer");
22
-
23
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
-
25
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
26
-
27
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
28
-
29
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
30
-
31
- var mapStateToProps = function mapStateToProps(state) {
32
- return {
33
- list: _reducer.selectors.getModals(state)
34
- };
35
- };
36
-
37
- var ModalRoot = function (_React$Component) {
38
- _inherits(ModalRoot, _React$Component);
39
-
40
- function ModalRoot() {
41
- _classCallCheck(this, ModalRoot);
42
-
43
- return _possibleConstructorReturn(this, (ModalRoot.__proto__ || Object.getPrototypeOf(ModalRoot)).apply(this, arguments));
44
- }
45
-
46
- _createClass(ModalRoot, [{
47
- key: "shouldComponentUpdate",
48
- value: function shouldComponentUpdate(nextProps) {
49
- return this.props.list !== nextProps.list;
50
- }
51
- }, {
52
- key: "render",
53
- value: function render() {
54
- var list = this.props.list;
55
-
56
-
57
- if (list.size === 0) {
58
- return null;
59
- }
60
-
61
- return list.map(function (current, index) {
62
- var modalType = current.get("type"),
63
- Component = (0, _getComponent2.default)(modalType);
64
-
65
- if (typeof Component === "undefined") {
66
- return _react2.default.createElement(
67
- "div",
68
- null,
69
- "No MODAL component for the type [" + modalType + "] in Modal/components.jsx"
70
- );
71
- }
72
-
73
- return _react2.default.createElement(Component, _extends({ key: index }, current.get("props").toJS()));
74
- });
75
- }
76
- }]);
77
-
78
- return ModalRoot;
79
- }(_react2.default.Component);
80
-
81
- exports.default = (0, _reactRedux.connect)(mapStateToProps)(ModalRoot);
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ var react_redux_1 = require("react-redux");
33
+ var react_1 = __importDefault(require("react"));
34
+ var getComponent_1 = __importDefault(require("./getComponent"));
35
+ var reducer_1 = require("./reducer");
36
+ var mapStateToProps = function (state) { return ({
37
+ list: reducer_1.selectors.getModals(state),
38
+ }); };
39
+ var ModalRoot = /** @class */ (function (_super) {
40
+ __extends(ModalRoot, _super);
41
+ function ModalRoot() {
42
+ return _super !== null && _super.apply(this, arguments) || this;
43
+ }
44
+ ModalRoot.prototype.shouldComponentUpdate = function (nextProps) {
45
+ return this.props.list !== nextProps.list;
46
+ };
47
+ ModalRoot.prototype.render = function () {
48
+ var list = this.props.list;
49
+ if (list.size === 0) {
50
+ return null;
51
+ }
52
+ return list.map(function (current, index) {
53
+ var modalType = current.get("type"), Component = (0, getComponent_1.default)(modalType);
54
+ if (typeof Component === "undefined") {
55
+ return (react_1.default.createElement("div", null, "No MODAL component for the type [".concat(modalType, "] in Modal/components.jsx")));
56
+ }
57
+ return react_1.default.createElement(Component, __assign({ key: index }, current.get("props").toJS()));
58
+ });
59
+ };
60
+ return ModalRoot;
61
+ }(react_1.default.Component));
62
+ exports.default = (0, react_redux_1.connect)(mapStateToProps)(ModalRoot);
63
+ //# sourceMappingURL=Root.js.map