@steedos/webapp 2.2.18 → 2.2.21

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 (169) hide show
  1. package/package.json +4 -4
  2. package/lib/action_types/errors.js +0 -13
  3. package/lib/action_types/errors.js.map +0 -1
  4. package/lib/action_types/general.js +0 -38
  5. package/lib/action_types/general.js.map +0 -1
  6. package/lib/action_types/index.js +0 -15
  7. package/lib/action_types/index.js.map +0 -1
  8. package/lib/action_types/spaces.js +0 -26
  9. package/lib/action_types/spaces.js.map +0 -1
  10. package/lib/action_types/users.js +0 -51
  11. package/lib/action_types/users.js.map +0 -1
  12. package/lib/actions/errors.js +0 -111
  13. package/lib/actions/errors.js.map +0 -1
  14. package/lib/actions/general.js +0 -64
  15. package/lib/actions/general.js.map +0 -1
  16. package/lib/actions/global_actions.js +0 -215
  17. package/lib/actions/global_actions.js.map +0 -1
  18. package/lib/actions/helpers.js +0 -228
  19. package/lib/actions/helpers.js.map +0 -1
  20. package/lib/actions/i18n.js +0 -55
  21. package/lib/actions/i18n.js.map +0 -1
  22. package/lib/actions/requests.js +0 -13
  23. package/lib/actions/requests.js.map +0 -1
  24. package/lib/actions/root.js +0 -135
  25. package/lib/actions/root.js.map +0 -1
  26. package/lib/actions/settings.js +0 -72
  27. package/lib/actions/settings.js.map +0 -1
  28. package/lib/actions/spaces.js +0 -159
  29. package/lib/actions/spaces.js.map +0 -1
  30. package/lib/actions/users.js +0 -386
  31. package/lib/actions/users.js.map +0 -1
  32. package/lib/client/accounts.events.js +0 -37
  33. package/lib/client/accounts.events.js.map +0 -1
  34. package/lib/client/client4.js +0 -507
  35. package/lib/client/client4.js.map +0 -1
  36. package/lib/client/fetch_etag.js +0 -35
  37. package/lib/client/fetch_etag.js.map +0 -1
  38. package/lib/client/i18n.js +0 -17
  39. package/lib/client/i18n.js.map +0 -1
  40. package/lib/client/index.js +0 -31
  41. package/lib/client/index.js.map +0 -1
  42. package/lib/client/signup.events.js +0 -76
  43. package/lib/client/signup.events.js.map +0 -1
  44. package/lib/components/Background.js +0 -49
  45. package/lib/components/Background.js.map +0 -1
  46. package/lib/components/Card.js +0 -115
  47. package/lib/components/Card.js.map +0 -1
  48. package/lib/components/FormError.js +0 -129
  49. package/lib/components/FormError.js.map +0 -1
  50. package/lib/components/GlobalMessage.js +0 -94
  51. package/lib/components/GlobalMessage.js.map +0 -1
  52. package/lib/components/Initialized.js +0 -85
  53. package/lib/components/Initialized.js.map +0 -1
  54. package/lib/components/InputPassword.js +0 -70
  55. package/lib/components/InputPassword.js.map +0 -1
  56. package/lib/components/Loading.js +0 -84
  57. package/lib/components/Loading.js.map +0 -1
  58. package/lib/components/LocalizedInput.js +0 -39
  59. package/lib/components/LocalizedInput.js.map +0 -1
  60. package/lib/components/LoggedIn.js +0 -82
  61. package/lib/components/LoggedIn.js.map +0 -1
  62. package/lib/components/Logo.js +0 -42
  63. package/lib/components/Logo.js.map +0 -1
  64. package/lib/components/Navbar.js +0 -130
  65. package/lib/components/Navbar.js.map +0 -1
  66. package/lib/components/ResetPassword.js +0 -160
  67. package/lib/components/ResetPassword.js.map +0 -1
  68. package/lib/components/amis.js +0 -14
  69. package/lib/components/amis.js.map +0 -1
  70. package/lib/components/countdown.js +0 -83
  71. package/lib/components/countdown.js.map +0 -1
  72. package/lib/components/index.js +0 -19
  73. package/lib/components/index.js.map +0 -1
  74. package/lib/components/intl_provider/index.js +0 -28
  75. package/lib/components/intl_provider/index.js.map +0 -1
  76. package/lib/components/intl_provider/intl_provider.js +0 -97
  77. package/lib/components/intl_provider/intl_provider.js.map +0 -1
  78. package/lib/exports.js +0 -21
  79. package/lib/exports.js.map +0 -1
  80. package/lib/i18n/en.json +0 -104
  81. package/lib/i18n/i18n.js +0 -62
  82. package/lib/i18n/i18n.js.map +0 -1
  83. package/lib/i18n/zh-CN.json +0 -126
  84. package/lib/index.js +0 -18
  85. package/lib/index.js.map +0 -1
  86. package/lib/pages/CreateTenant.js +0 -176
  87. package/lib/pages/CreateTenant.js.map +0 -1
  88. package/lib/pages/Home.js +0 -153
  89. package/lib/pages/Home.js.map +0 -1
  90. package/lib/pages/Init.js +0 -174
  91. package/lib/pages/Init.js.map +0 -1
  92. package/lib/pages/Login.js +0 -432
  93. package/lib/pages/Login.js.map +0 -1
  94. package/lib/pages/Logout.js +0 -78
  95. package/lib/pages/Logout.js.map +0 -1
  96. package/lib/pages/Preference.js +0 -148
  97. package/lib/pages/Preference.js.map +0 -1
  98. package/lib/pages/SelectSpace.js +0 -123
  99. package/lib/pages/SelectSpace.js.map +0 -1
  100. package/lib/pages/Signup.js +0 -435
  101. package/lib/pages/Signup.js.map +0 -1
  102. package/lib/pages/VerifyEmail.js +0 -308
  103. package/lib/pages/VerifyEmail.js.map +0 -1
  104. package/lib/pages/VerifyMobile.js +0 -308
  105. package/lib/pages/VerifyMobile.js.map +0 -1
  106. package/lib/pages/index.js +0 -19
  107. package/lib/pages/index.js.map +0 -1
  108. package/lib/pages/updatePassword.js +0 -203
  109. package/lib/pages/updatePassword.js.map +0 -1
  110. package/lib/reducers/entities/general.js +0 -69
  111. package/lib/reducers/entities/general.js.map +0 -1
  112. package/lib/reducers/entities/index.js +0 -15
  113. package/lib/reducers/entities/index.js.map +0 -1
  114. package/lib/reducers/entities/spaces.js +0 -32
  115. package/lib/reducers/entities/spaces.js.map +0 -1
  116. package/lib/reducers/entities/users.js +0 -73
  117. package/lib/reducers/entities/users.js.map +0 -1
  118. package/lib/reducers/i18n.js +0 -34
  119. package/lib/reducers/i18n.js.map +0 -1
  120. package/lib/reducers/index.js +0 -17
  121. package/lib/reducers/index.js.map +0 -1
  122. package/lib/reducers/requests.js +0 -13
  123. package/lib/reducers/requests.js.map +0 -1
  124. package/lib/reducers/settings.js +0 -14
  125. package/lib/reducers/settings.js.map +0 -1
  126. package/lib/root.js +0 -152
  127. package/lib/root.js.map +0 -1
  128. package/lib/selectors/entities/spaces.js +0 -28
  129. package/lib/selectors/entities/spaces.js.map +0 -1
  130. package/lib/selectors/entities/users.js +0 -16
  131. package/lib/selectors/entities/users.js.map +0 -1
  132. package/lib/selectors/i18n.js +0 -48
  133. package/lib/selectors/i18n.js.map +0 -1
  134. package/lib/selectors/index.js +0 -36
  135. package/lib/selectors/index.js.map +0 -1
  136. package/lib/selectors/settings.js +0 -9
  137. package/lib/selectors/settings.js.map +0 -1
  138. package/lib/stores/initial_state.js +0 -30
  139. package/lib/stores/initial_state.js.map +0 -1
  140. package/lib/stores/local_storage_store.js +0 -78
  141. package/lib/stores/local_storage_store.js.map +0 -1
  142. package/lib/stores/redux_store.js +0 -99
  143. package/lib/stores/redux_store.js.map +0 -1
  144. package/lib/types/actions.js +0 -19
  145. package/lib/types/actions.js.map +0 -1
  146. package/lib/types/client4.js +0 -3
  147. package/lib/types/client4.js.map +0 -1
  148. package/lib/types/errors.js +0 -3
  149. package/lib/types/errors.js.map +0 -1
  150. package/lib/types/general.js +0 -4
  151. package/lib/types/general.js.map +0 -1
  152. package/lib/types/spaces.js +0 -3
  153. package/lib/types/spaces.js.map +0 -1
  154. package/lib/types/store.js +0 -3
  155. package/lib/types/store.js.map +0 -1
  156. package/lib/types/users.js +0 -3
  157. package/lib/types/users.js.map +0 -1
  158. package/lib/types/utilities.js +0 -3
  159. package/lib/types/utilities.js.map +0 -1
  160. package/lib/utils/hash_history.js +0 -6
  161. package/lib/utils/hash_history.js.map +0 -1
  162. package/lib/utils/helpers.js +0 -20
  163. package/lib/utils/helpers.js.map +0 -1
  164. package/lib/utils/key_mirror.js +0 -35
  165. package/lib/utils/key_mirror.js.map +0 -1
  166. package/lib/utils/sentry.js +0 -50
  167. package/lib/utils/sentry.js.map +0 -1
  168. package/lib/utils/utils.js +0 -106
  169. package/lib/utils/utils.js.map +0 -1
@@ -1,228 +0,0 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (_) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
- var __read = (this && this.__read) || function (o, n) {
54
- var m = typeof Symbol === "function" && o[Symbol.iterator];
55
- if (!m) return o;
56
- var i = m.call(o), r, ar = [], e;
57
- try {
58
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
59
- }
60
- catch (error) { e = { error: error }; }
61
- finally {
62
- try {
63
- if (r && !r.done && (m = i["return"])) m.call(i);
64
- }
65
- finally { if (e) throw e.error; }
66
- }
67
- return ar;
68
- };
69
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
70
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
71
- if (ar || !(i in from)) {
72
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
73
- ar[i] = from[i];
74
- }
75
- }
76
- return to.concat(ar || Array.prototype.slice.call(from));
77
- };
78
- Object.defineProperty(exports, "__esModule", { value: true });
79
- exports.FormattedError = exports.debounce = exports.bindClientFunc = exports.requestFailure = exports.requestSuccess = exports.requestData = exports.forceLogoutIfNecessary = void 0;
80
- // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
81
- // See LICENSE.txt for license information.
82
- var client_1 = require("../client");
83
- var action_types_1 = require("../action_types");
84
- var actions_1 = require("../types/actions");
85
- var errors_1 = require("./errors");
86
- var HTTP_UNAUTHORIZED = 401;
87
- function forceLogoutIfNecessary(err, dispatch, getState) {
88
- var currentUserId = getState().entities.users.currentUserId;
89
- if ('status_code' in err && err.status_code === HTTP_UNAUTHORIZED && err.url && err.url.indexOf('/login') === -1 && currentUserId) {
90
- client_1.Client4.setToken('');
91
- dispatch({ type: action_types_1.UserTypes.LOGOUT_SUCCESS, data: {} });
92
- }
93
- }
94
- exports.forceLogoutIfNecessary = forceLogoutIfNecessary;
95
- function dispatcher(type, data, dispatch) {
96
- if (type.indexOf('SUCCESS') === -1) { // we don't want to pass the data for the request types
97
- dispatch(requestSuccess(type, data));
98
- }
99
- else {
100
- dispatch(requestData(type));
101
- }
102
- }
103
- function requestData(type) {
104
- return {
105
- type: type,
106
- data: null,
107
- };
108
- }
109
- exports.requestData = requestData;
110
- function requestSuccess(type, data) {
111
- return {
112
- type: type,
113
- data: data,
114
- };
115
- }
116
- exports.requestSuccess = requestSuccess;
117
- function requestFailure(type, error) {
118
- return {
119
- type: type,
120
- error: error,
121
- };
122
- }
123
- exports.requestFailure = requestFailure;
124
- /**
125
- * Returns an ActionFunc which calls a specfied (client) function and
126
- * dispatches the specifed actions on request, success or failure.
127
- *
128
- * @export
129
- * @param {Object} obj an object for destructirung required properties
130
- * @param {() => Promise<mixed>} obj.clientFunc clientFunc to execute
131
- * @param {ActionType} obj.onRequest ActionType to dispatch on request
132
- * @param {(ActionType | Array<ActionType>)} obj.onSuccess ActionType to dispatch on success
133
- * @param {ActionType} obj.onFailure ActionType to dispatch on failure
134
- * @param {...Array<any>} obj.params
135
- * @returns {ActionFunc} ActionFunc
136
- */
137
- function bindClientFunc(_a) {
138
- var _this = this;
139
- var clientFunc = _a.clientFunc, onRequest = _a.onRequest, onSuccess = _a.onSuccess, onFailure = _a.onFailure, _b = _a.params, params = _b === void 0 ? [] : _b;
140
- return function (dispatch, getState) { return __awaiter(_this, void 0, void 0, function () {
141
- var data, error_1, actions;
142
- return __generator(this, function (_a) {
143
- switch (_a.label) {
144
- case 0:
145
- if (onRequest) {
146
- dispatch(requestData(onRequest));
147
- }
148
- data = null;
149
- _a.label = 1;
150
- case 1:
151
- _a.trys.push([1, 3, , 4]);
152
- return [4 /*yield*/, clientFunc.apply(void 0, __spreadArray([], __read(params), false))];
153
- case 2:
154
- data = _a.sent();
155
- return [3 /*break*/, 4];
156
- case 3:
157
- error_1 = _a.sent();
158
- forceLogoutIfNecessary(error_1, dispatch, getState);
159
- actions = [(0, errors_1.logError)(error_1)];
160
- if (onFailure) {
161
- actions.push(requestFailure(onFailure, error_1));
162
- }
163
- dispatch((0, actions_1.batchActions)(actions));
164
- return [2 /*return*/, { error: error_1 }];
165
- case 4:
166
- if (Array.isArray(onSuccess)) {
167
- onSuccess.forEach(function (s) {
168
- dispatcher(s, data, dispatch);
169
- });
170
- }
171
- else if (onSuccess) {
172
- dispatcher(onSuccess, data, dispatch);
173
- }
174
- return [2 /*return*/, { data: data }];
175
- }
176
- });
177
- }); };
178
- }
179
- exports.bindClientFunc = bindClientFunc;
180
- // Debounce function based on underscores modified to use es6 and a cb
181
- function debounce(func, wait, immediate, cb) {
182
- //let timeout: NodeJS.Timeout|null;
183
- var timeout;
184
- return function fx() {
185
- var _this = this;
186
- var args = [];
187
- for (var _i = 0; _i < arguments.length; _i++) {
188
- args[_i] = arguments[_i];
189
- }
190
- var runLater = function () {
191
- timeout = null;
192
- if (!immediate) {
193
- Reflect.apply(func, _this, args);
194
- if (cb) {
195
- cb();
196
- }
197
- }
198
- };
199
- var callNow = immediate && !timeout;
200
- if (timeout) {
201
- clearTimeout(timeout);
202
- }
203
- timeout = setTimeout(runLater, wait);
204
- if (callNow) {
205
- Reflect.apply(func, this, args);
206
- if (cb) {
207
- cb();
208
- }
209
- }
210
- };
211
- }
212
- exports.debounce = debounce;
213
- var FormattedError = /** @class */ (function (_super) {
214
- __extends(FormattedError, _super);
215
- function FormattedError(id, defaultMessage, values) {
216
- if (values === void 0) { values = {}; }
217
- var _this = _super.call(this, defaultMessage) || this;
218
- _this.intl = {
219
- id: id,
220
- defaultMessage: defaultMessage,
221
- values: values,
222
- };
223
- return _this;
224
- }
225
- return FormattedError;
226
- }(Error));
227
- exports.FormattedError = FormattedError;
228
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/actions/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mEAAmE;AACnE,2CAA2C;AAC3C,oCAAkC;AAClC,gDAA0C;AAG1C,4CAA6G;AAE7G,mCAAkC;AAGlC,IAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,SAAgB,sBAAsB,CAAC,GAAiB,EAAE,QAAsB,EAAE,QAAsB;IAC7F,IAAA,aAAa,GAAI,QAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,cAA7B,CAA8B;IAElD,IAAI,aAAa,IAAI,GAAG,IAAI,GAAG,CAAC,WAAW,KAAK,iBAAiB,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,aAAa,EAAE;QAC/H,gBAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACrB,QAAQ,CAAC,EAAC,IAAI,EAAE,wBAAS,CAAC,cAAc,EAAE,IAAI,EAAE,EAAE,EAAC,CAAC,CAAC;KACxD;AACL,CAAC;AAPD,wDAOC;AAED,SAAS,UAAU,CAAC,IAAgB,EAAE,IAAS,EAAE,QAAsB;IACnE,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,uDAAuD;QACzF,QAAQ,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;KACxC;SAAM;QACH,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;KAC/B;AACL,CAAC;AAED,SAAgB,WAAW,CAAC,IAAgB;IACxC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CAAC,SAMxB;QALG,KAAI,CAAC,IAAI,GAAG;YACR,EAAE,IAAA;YACF,cAAc,gBAAA;YACd,MAAM,QAAA;SACT,CAAC;;IACN,CAAC;IACL,qBAAC;AAAD,CAAC,AAfD,CAAoC,KAAK,GAexC;AAfY,wCAAc"}
@@ -1,55 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.loadTranslations = void 0;
23
- var I18n = __importStar(require("../i18n/i18n"));
24
- var client_1 = require("../client");
25
- function loadTranslations(locale, url) {
26
- // console.log('loadTranslations', locale,url);
27
- var translations = {};
28
- // No need to go to the server for EN
29
- if (locale === 'en') {
30
- var en = I18n.getAllLanguages()[locale].translations;
31
- Object.assign(translations, en);
32
- return {
33
- type: "RECEIVED_TRANSLATIONS",
34
- data: {
35
- locale: locale,
36
- translations: translations
37
- },
38
- };
39
- }
40
- return function (dispatch) {
41
- client_1.Client4.doFetch(url).then(function (translations) {
42
- dispatch({
43
- type: "RECEIVED_TRANSLATIONS",
44
- data: {
45
- locale: locale,
46
- translations: translations,
47
- },
48
- });
49
- }).catch(function (error) {
50
- console.warn('Actions - loadTranslations - recreived error: ', error);
51
- }); // eslint-disable-line no-empty-function
52
- };
53
- }
54
- exports.loadTranslations = loadTranslations;
55
- //# sourceMappingURL=i18n.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/actions/i18n.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAqC;AACrC,oCAAkC;AAElC,SAAgB,gBAAgB,CAAC,MAAM,EAAE,GAAG;IACxC,+CAA+C;IAC/C,IAAM,YAAY,GAAG,EAAE,CAAC;IACxB,qCAAqC;IACrC,IAAI,MAAM,KAAK,IAAI,EAAE;QACjB,IAAM,EAAE,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QAChC,OAAO;YACC,IAAI,EAAE,uBAAuB;YAC7B,IAAI,EAAE;gBACF,MAAM,QAAA;gBACN,YAAY,cAAA;aACf;SACR,CAAA;KACJ;IAED,OAAO,UAAC,QAAQ;QACZ,gBAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,UAAC,YAAY;YACnC,QAAQ,CAAC;gBACL,IAAI,EAAC,uBAAuB;gBAC5B,IAAI,EAAE;oBACF,MAAM,QAAA;oBACN,YAAY,cAAA;iBACf;aACJ,CAAC,CAAC;QACP,CAAC,CAAC,CAAC,KAAK,CAAC,UAAC,KAAK;YACX,OAAO,CAAC,IAAI,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAA;QACzE,CAAC,CAAC,CAAC,CAAC,wCAAwC;IAChD,CAAC,CAAA;AACL,CAAC;AA7BD,4CA6BC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.requests = void 0;
4
- function requests(status) {
5
- return function (dispatch) {
6
- dispatch({
7
- type: "change",
8
- data: status,
9
- });
10
- };
11
- }
12
- exports.requests = requests;
13
- //# sourceMappingURL=requests.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requests.js","sourceRoot":"","sources":["../../src/actions/requests.js"],"names":[],"mappings":";;;AAAA,SAAgB,QAAQ,CAAC,MAAM;IAC3B,OAAO,UAAC,QAAQ;QACZ,QAAQ,CAAC;YACL,IAAI,EAAC,QAAQ;YACb,IAAI,EAAE,MAAM;SACf,CAAC,CAAC;IACP,CAAC,CAAA;AACL,CAAC;AAPD,4BAOC"}
@@ -1,135 +0,0 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
- return new (P || (P = Promise))(function (resolve, reject) {
24
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- var __generator = (this && this.__generator) || function (thisArg, body) {
31
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
32
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
33
- function verb(n) { return function (v) { return step([n, v]); }; }
34
- function step(op) {
35
- if (f) throw new TypeError("Generator is already executing.");
36
- while (_) try {
37
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
38
- if (y = 0, t) op = [op[0] & 2, t.value];
39
- switch (op[0]) {
40
- case 0: case 1: t = op; break;
41
- case 4: _.label++; return { value: op[1], done: false };
42
- case 5: _.label++; y = op[1]; op = [0]; continue;
43
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
44
- default:
45
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
46
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
47
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
48
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
49
- if (t[2]) _.ops.pop();
50
- _.trys.pop(); continue;
51
- }
52
- op = body.call(thisArg, _);
53
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
54
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
55
- }
56
- };
57
- var __importDefault = (this && this.__importDefault) || function (mod) {
58
- return (mod && mod.__esModule) ? mod : { "default": mod };
59
- };
60
- Object.defineProperty(exports, "__esModule", { value: true });
61
- exports.initServer = exports.loadMeAndConfig = void 0;
62
- var UserActions = __importStar(require("../actions/users"));
63
- var settings_1 = require("../actions/settings");
64
- var local_storage_store_1 = __importDefault(require("../stores/local_storage_store"));
65
- var client_1 = require("../client");
66
- function loadMeAndConfig() {
67
- var _this = this;
68
- return function (dispatch) { return __awaiter(_this, void 0, void 0, function () {
69
- var token, promises, resolvedPromises, _a, _b;
70
- return __generator(this, function (_c) {
71
- switch (_c.label) {
72
- case 0:
73
- token = local_storage_store_1.default.getItem('token');
74
- if (token)
75
- client_1.Client4.setToken(token);
76
- promises = [
77
- dispatch((0, settings_1.loadSettings)()),
78
- // dispatch(getLicenseConfig()),
79
- ];
80
- return [4 /*yield*/, Promise.all(promises)];
81
- case 1:
82
- resolvedPromises = _c.sent();
83
- if (!local_storage_store_1.default.getWasLoggedIn()) return [3 /*break*/, 3];
84
- _b = (_a = resolvedPromises).push;
85
- return [4 /*yield*/, dispatch(UserActions.loadMe())];
86
- case 2:
87
- _b.apply(_a, [_c.sent()]);
88
- _c.label = 3;
89
- case 3: return [2 /*return*/, resolvedPromises];
90
- }
91
- });
92
- }); };
93
- }
94
- exports.loadMeAndConfig = loadMeAndConfig;
95
- function initServer(spaceId, apiKey) {
96
- var _this = this;
97
- return function (dispatch) { return __awaiter(_this, void 0, void 0, function () {
98
- var promises, resolvedPromises, result, _a, _b;
99
- var _this = this;
100
- return __generator(this, function (_c) {
101
- switch (_c.label) {
102
- case 0:
103
- promises = [
104
- dispatch(function () { return __awaiter(_this, void 0, void 0, function () {
105
- return __generator(this, function (_a) {
106
- switch (_a.label) {
107
- case 0: return [4 /*yield*/, client_1.Client4.doFetch("".concat(client_1.Client4.getBaseRoute(), "/initServer"), {
108
- method: 'POST', body: JSON.stringify({
109
- spaceId: spaceId,
110
- apiKey: apiKey
111
- })
112
- })];
113
- case 1: return [2 /*return*/, _a.sent()];
114
- }
115
- });
116
- }); }),
117
- ];
118
- return [4 /*yield*/, Promise.all(promises)];
119
- case 1:
120
- resolvedPromises = _c.sent();
121
- result = resolvedPromises[0];
122
- if (result && result.success != true) {
123
- return [2 /*return*/, { error: result.error }];
124
- }
125
- _b = (_a = resolvedPromises).push;
126
- return [4 /*yield*/, dispatch((0, settings_1.loadSettings)())];
127
- case 2:
128
- _b.apply(_a, [_c.sent()]);
129
- return [2 /*return*/, resolvedPromises];
130
- }
131
- });
132
- }); };
133
- }
134
- exports.initServer = initServer;
135
- //# sourceMappingURL=root.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root.js","sourceRoot":"","sources":["../../src/actions/root.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4DAAgD;AAChD,gDAAmD;AACnD,sFAA8D;AAC9D,oCAAkC;AAElC,SAAgB,eAAe;IAA/B,iBAqBC;IApBC,OAAO,UAAO,QAAQ;;;;;oBAEZ,KAAK,GAAG,6BAAiB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;oBAChD,IAAI,KAAK;wBACP,gBAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oBAGpB,QAAQ,GAAG;wBACb,QAAQ,CAAC,IAAA,uBAAY,GAAE,CAAC;wBACxB,gCAAgC;qBACnC,CAAC;oBAGuB,qBAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAA;;oBAA9C,gBAAgB,GAAG,SAA2B;yBAChD,6BAAiB,CAAC,cAAc,EAAE,EAAlC,wBAAkC;oBACpC,KAAA,CAAA,KAAA,gBAAgB,CAAA,CAAC,IAAI,CAAA;oBAAC,qBAAM,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAA;;oBAA1D,cAAsB,SAAoC,EAAC,CAAC;;wBAG9D,sBAAO,gBAAgB,EAAC;;;SAC3B,CAAC;AACJ,CAAC;AArBD,0CAqBC;AAED,SAAgB,UAAU,CAAC,OAAO,EAAE,MAAM;IAA1C,iBAoBC;IAnBC,OAAO,UAAO,QAAQ;;;;;;oBACd,QAAQ,GAAG;wBACf,QAAQ,CAAC;;;4CACA,qBAAM,gBAAO,CAAC,OAAO,CAAC,UAAG,gBAAO,CAAC,YAAY,EAAE,gBAAa,EAAE;4CACnE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gDACnC,OAAO,SAAA;gDACP,MAAM,QAAA;6CACP,CAAC;yCACH,CAAC,EAAA;4CALF,sBAAO,SAKL,EAAC;;;6BACJ,CAAC;qBACH,CAAC;oBACuB,qBAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAA;;oBAA9C,gBAAgB,GAAG,SAA2B;oBAC9C,MAAM,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;oBACnC,IAAI,MAAM,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE;wBACpC,sBAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAC;qBAChC;oBACD,KAAA,CAAA,KAAA,gBAAgB,CAAA,CAAC,IAAI,CAAA;oBAAC,qBAAM,QAAQ,CAAC,IAAA,uBAAY,GAAE,CAAC,EAAA;;oBAApD,cAAsB,SAA8B,EAAC,CAAC;oBACtD,sBAAO,gBAAgB,EAAC;;;SACzB,CAAC;AACJ,CAAC;AApBD,gCAoBC"}
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.loadSettings = void 0;
40
- var client_1 = require("../client");
41
- var action_types_1 = require("../action_types");
42
- var helpers_1 = require("./helpers");
43
- function loadSettings() {
44
- var _this = this;
45
- return function (dispatch, getState) { return __awaiter(_this, void 0, void 0, function () {
46
- var data, error_1;
47
- return __generator(this, function (_a) {
48
- switch (_a.label) {
49
- case 0:
50
- _a.trys.push([0, 2, , 3]);
51
- return [4 /*yield*/, client_1.Client4.getSettings()];
52
- case 1:
53
- data = _a.sent();
54
- return [3 /*break*/, 3];
55
- case 2:
56
- error_1 = _a.sent();
57
- (0, helpers_1.forceLogoutIfNecessary)(error_1, dispatch, getState);
58
- return [2 /*return*/, { error: error_1 }];
59
- case 3:
60
- client_1.Client4.setEnableLogging(data.EnableDeveloper === 'true');
61
- client_1.Client4.setDiagnosticId(data.DiagnosticId);
62
- dispatch({
63
- type: action_types_1.GeneralTypes.RECEIVED_SETTINGS,
64
- data: data,
65
- });
66
- return [2 /*return*/, { data: data }];
67
- }
68
- });
69
- }); };
70
- }
71
- exports.loadSettings = loadSettings;
72
- //# sourceMappingURL=settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/actions/settings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,oCAAoC;AAGpC,gDAA+C;AAC/C,qCAAiF;AAGjF,SAAgB,YAAY;IAA5B,iBAoBC;IAnBG,OAAO,UAAO,QAAsB,EAAE,QAAsB;;;;;;oBAG7C,qBAAM,gBAAO,CAAC,WAAW,EAAE,EAAA;;oBAAlC,IAAI,GAAG,SAA2B,CAAC;;;;oBAEnC,IAAA,gCAAsB,EAAC,OAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;oBAClD,sBAAO,EAAC,KAAK,SAAA,EAAC,EAAC;;oBAGnB,gBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,eAAe,KAAK,MAAM,CAAC,CAAC;oBAC1D,gBAAO,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;oBAE3C,QAAQ,CAAC;wBACL,IAAI,EAAE,2BAAY,CAAC,iBAAiB;wBACpC,IAAI,EAAE,IAAI;qBACb,CAAC,CAAC;oBAEH,sBAAO,EAAC,IAAI,MAAA,EAAC,EAAC;;;SACjB,CAAC;AACN,CAAC;AApBD,oCAoBC"}