@social-mail/social-mail-client 1.2.147 → 1.2.148

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 (49) hide show
  1. package/content/json/countries.json +1577 -0
  2. package/dist/admin/AdminAppIndex.pack.js +430 -11
  3. package/dist/admin/AdminAppIndex.pack.js.map +1 -1
  4. package/dist/admin/AdminAppIndex.pack.min.js +45 -4
  5. package/dist/admin/AdminAppIndex.pack.min.js.map +1 -1
  6. package/dist/common/controls/countries/CountrySelect.d.ts +4 -0
  7. package/dist/common/controls/countries/CountrySelect.d.ts.map +1 -0
  8. package/dist/common/controls/countries/CountrySelect.js +49 -0
  9. package/dist/common/controls/countries/CountrySelect.js.map +1 -0
  10. package/dist/common/controls/phone-editor/PhoneEditor.d.ts +5 -0
  11. package/dist/common/controls/phone-editor/PhoneEditor.d.ts.map +1 -0
  12. package/dist/common/controls/phone-editor/PhoneEditor.js +25 -0
  13. package/dist/common/controls/phone-editor/PhoneEditor.js.map +1 -0
  14. package/dist/common/pages/user/forgot/ForgotPassword.d.ts +24 -0
  15. package/dist/common/pages/user/forgot/ForgotPassword.d.ts.map +1 -0
  16. package/dist/common/pages/user/forgot/ForgotPassword.js +219 -0
  17. package/dist/common/pages/user/forgot/ForgotPassword.js.map +1 -0
  18. package/dist/common/pages/user/login/LoginPage.d.ts +1 -0
  19. package/dist/common/pages/user/login/LoginPage.d.ts.map +1 -1
  20. package/dist/common/pages/user/login/LoginPage.js +67 -6
  21. package/dist/common/pages/user/login/LoginPage.js.map +1 -1
  22. package/dist/public/channel/ChannelView.pack.js +8 -4
  23. package/dist/public/channel/ChannelView.pack.js.map +1 -1
  24. package/dist/public/channel/ChannelView.pack.min.js +3 -3
  25. package/dist/public/channel/ChannelView.pack.min.js.map +1 -1
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/dist/web/AppIndex.pack.js +430 -11
  28. package/dist/web/AppIndex.pack.js.map +1 -1
  29. package/dist/web/AppIndex.pack.min.js +45 -4
  30. package/dist/web/AppIndex.pack.min.js.map +1 -1
  31. package/node_modules/@web-atoms/core/dist/services/FetchBuilder.d.ts.map +1 -1
  32. package/node_modules/@web-atoms/core/dist/services/FetchBuilder.js +2 -1
  33. package/node_modules/@web-atoms/core/dist/services/FetchBuilder.js.map +1 -1
  34. package/node_modules/@web-atoms/core/dist/services/http/JsonError.d.ts.map +1 -1
  35. package/node_modules/@web-atoms/core/dist/services/http/JsonError.js +5 -2
  36. package/node_modules/@web-atoms/core/dist/services/http/JsonError.js.map +1 -1
  37. package/node_modules/@web-atoms/core/dist/tsconfig.tsbuildinfo +1 -1
  38. package/node_modules/@web-atoms/core/package.json +1 -1
  39. package/node_modules/@web-atoms/core/src/services/FetchBuilder.ts +5 -1
  40. package/node_modules/@web-atoms/core/src/services/http/JsonError.ts +3 -2
  41. package/node_modules/@web-atoms/module-loader/package.json +1 -1
  42. package/node_modules/@web-atoms/module-loader/umd/src/AmdLoader.ts +1 -1
  43. package/node_modules/@web-atoms/module-loader/umd.js +1 -1
  44. package/node_modules/@web-atoms/module-loader/umd.js.map +1 -1
  45. package/package.json +3 -3
  46. package/src/common/controls/countries/CountrySelect.tsx +39 -0
  47. package/src/common/controls/phone-editor/PhoneEditor.tsx +12 -0
  48. package/src/common/pages/user/forgot/ForgotPassword.tsx +229 -0
  49. package/src/common/pages/user/login/LoginPage.tsx +60 -4
@@ -0,0 +1,4 @@
1
+ export declare const CountrySelect: (a: any) => any;
2
+ export declare const isdForCountry: (countryCode: string) => Promise<string>;
3
+ export declare const formatForCountry: (countryCode: string) => Promise<string>;
4
+ //# sourceMappingURL=CountrySelect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CountrySelect.d.ts","sourceRoot":"","sources":["../../../../src/common/controls/countries/CountrySelect.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,aAAa,iBAIZ,CAAA;AAEd,eAAO,MAAM,aAAa,gBAAuB,MAAM,oBACiB,CAAC;AAEzE,eAAO,MAAM,gBAAgB,gBAAuB,MAAM,oBAUzD,CAAC"}
@@ -0,0 +1,49 @@
1
+ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/basic/DropDown", "@web-atoms/core/dist/services/FetchBuilder", "@web-atoms/core/dist/core/types"], function (_export, _context) {
2
+ "use strict";
3
+
4
+ var __awaiter, Bind, XNode, DropDown, FetchBuilder, UMD, countriesPromise, loadCountries, CountrySelect, isdForCountry, formatForCountry;
5
+ return {
6
+ setters: [function (_tslib) {
7
+ __awaiter = _tslib.__awaiter;
8
+ }, function (_webAtomsCoreDistCoreBind) {
9
+ Bind = _webAtomsCoreDistCoreBind.default;
10
+ }, function (_webAtomsCoreDistCoreXNode) {
11
+ XNode = _webAtomsCoreDistCoreXNode.default;
12
+ }, function (_webAtomsWebControlsDistBasicDropDown) {
13
+ DropDown = _webAtomsWebControlsDistBasicDropDown.default;
14
+ }, function (_webAtomsCoreDistServicesFetchBuilder) {
15
+ FetchBuilder = _webAtomsCoreDistServicesFetchBuilder.default;
16
+ }, function (_webAtomsCoreDistCoreTypes) {
17
+ UMD = _webAtomsCoreDistCoreTypes.UMD;
18
+ }],
19
+ execute: function () {
20
+ ;
21
+ loadCountries = () => countriesPromise !== null && countriesPromise !== void 0 ? countriesPromise : countriesPromise = FetchBuilder.get(UMD.resolvePath("@social-mail/social-mail-client/content/json/countries.json")).responseAsJson();
22
+ _export("CountrySelect", CountrySelect = a => XNode.create(DropDown, Object.assign({
23
+ labelPath: item => {
24
+ var _a;
25
+ return ((_a = item.isdCode) === null || _a === void 0 ? void 0 : _a.startsWith("+")) ? item.isdCode : `+${item.isdCode} ${item.value}`;
26
+ },
27
+ valuePath: item => item.value,
28
+ items: Bind.oneTimeAsync(() => loadCountries())
29
+ }, a)));
30
+ _export("isdForCountry", isdForCountry = countryCode => __awaiter(void 0, void 0, void 0, function* () {
31
+ return (yield loadCountries()).find(x => x.value === countryCode).isdCode;
32
+ }));
33
+ _export("formatForCountry", formatForCountry = countryCode => __awaiter(void 0, void 0, void 0, function* () {
34
+ const countries = yield loadCountries();
35
+ const country = countries.find(c => c.value === countryCode);
36
+ if (country) {
37
+ const {
38
+ phoneFormat
39
+ } = country;
40
+ if (phoneFormat && phoneFormat !== "0.0") {
41
+ return phoneFormat;
42
+ }
43
+ }
44
+ return "####.####.####";
45
+ }));
46
+ }
47
+ };
48
+ });
49
+ //# sourceMappingURL=CountrySelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Bind","_webAtomsCoreDistCoreBind","default","_webAtomsCoreDistCoreXNode","XNode","_webAtomsWebControlsDistBasicDropDown","DropDown","_webAtomsCoreDistServicesFetchBuilder","FetchBuilder","_webAtomsCoreDistCoreTypes","UMD","execute","loadCountries","countriesPromise","get","resolvePath","responseAsJson","_export","CountrySelect","a","create","Object","assign","labelPath","item","_a","isdCode","startsWith","value","valuePath","items","oneTimeAsync","isdForCountry","countryCode","__awaiter","find","x","formatForCountry","countries","country","c","phoneFormat"],"sources":["../../../../src/common/controls/countries/CountrySelect.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;MAAOA,IAAI,GAAAC,yBAAA,CAAAC,OAAA;IAAA,aAAAC,0BAAA;MACJC,KAAK,GAAAD,0BAAA,CAAAD,OAAA;IAAA,aAAAG,qCAAA;MACLC,QAAQ,GAAAD,qCAAA,CAAAH,OAAA;IAAA,aAAAK,qCAAA;MACRC,YAAY,GAAAD,qCAAA,CAAAL,OAAA;IAAA,aAAAO,0BAAA;MACVC,GAAG,GAAAD,0BAAA,CAAHC,GAAG;IAAA;IAAAC,OAAA,WAAAA,CAAA;MAQX;MAIKC,aAAa,GAAGA,CAAA,KAAMC,gBAAgB,aAAhBA,gBAAgB,cAAhBA,gBAAgB,GAAhBA,gBAAgB,GAAKL,YAAY,CAACM,GAAG,CAACJ,GAAG,CAACK,WAAW,CAAC,6DAA6D,CAAC,CAAC,CAC5IC,cAAc,EAAc;MAAAC,OAAA,kBAEpBC,aAAa,GAAIC,CAAC,IAAKf,KAAA,CAAAgB,MAAA,CAACd,QAAQ,EAAAe,MAAA,CAAAC,MAAA;QACzCC,SAAS,EAAGC,IAAI,IAAI;UAAA,IAAAC,EAAA;UAAC,SAAAA,EAAA,GAAAD,IAAI,CAACE,OAAO,cAAAD,EAAA,uBAAAA,EAAA,CAAEE,UAAU,CAAC,GAAG,CAAC,IAAGH,IAAI,CAACE,OAAO,GAAG,IAAIF,IAAI,CAACE,OAAO,IAAIF,IAAI,CAACI,KAAK,EAAE;QAAA;QACpGC,SAAS,EAAGL,IAAI,IAAKA,IAAI,CAACI,KAAK;QAC/BE,KAAK,EAAE9B,IAAI,CAAC+B,YAAY,CAAC,MAAMnB,aAAa,EAAE;MAAC,GACzCO,CAAC,EAAG;MAAAF,OAAA,kBAEDe,aAAa,GAAUC,WAAmB,IAAIC,SAAA;QACvD,QAAC,MAAMtB,aAAa,EAAE,EAAEuB,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACR,KAAK,KAAKK,WAAW,CAAC,CAACP,OAAO;MAAA;MAAAT,OAAA,qBAE3DoB,gBAAgB,GAAUJ,WAAmB,IAAIC,SAAA;QAC1D,MAAMI,SAAS,GAAG,MAAM1B,aAAa,EAAE;QACvC,MAAM2B,OAAO,GAAGD,SAAS,CAACH,IAAI,CAAEK,CAAC,IAAKA,CAAC,CAACZ,KAAK,KAAKK,WAAW,CAAC;QAC9D,IAAIM,OAAO,EAAE;UACT,MAAM;YAAEE;UAAW,CAAE,GAAGF,OAAO;UAC/B,IAAIE,WAAW,IAAIA,WAAW,KAAK,KAAK,EAAE;YACtC,OAAOA,WAAW;;;QAG1B,OAAO,gBAAgB;MAC3B,CAAC;IAAA;EAAA;AAAA"}
@@ -0,0 +1,5 @@
1
+ import { AtomControl } from "@web-atoms/core/dist/web/controls/AtomControl";
2
+ export default class PhoneEditor extends AtomControl {
3
+ protected preCreate(): void;
4
+ }
5
+ //# sourceMappingURL=PhoneEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhoneEditor.d.ts","sourceRoot":"","sources":["../../../../src/common/controls/phone-editor/PhoneEditor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAG5E,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAChD,SAAS,CAAC,SAAS,IAAI,IAAI;CAM9B"}
@@ -0,0 +1,25 @@
1
+ System.register(["@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/web/controls/AtomControl", "../countries/CountrySelect"], function (_export, _context) {
2
+ "use strict";
3
+
4
+ var XNode, AtomControl, CountrySelect, PhoneEditor;
5
+ _export("default", void 0);
6
+ return {
7
+ setters: [function (_webAtomsCoreDistCoreXNode) {
8
+ XNode = _webAtomsCoreDistCoreXNode.default;
9
+ }, function (_webAtomsCoreDistWebControlsAtomControl) {
10
+ AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
11
+ }, function (_countriesCountrySelect) {
12
+ CountrySelect = _countriesCountrySelect.CountrySelect;
13
+ }],
14
+ execute: function () {
15
+ _export("default", PhoneEditor = class PhoneEditor extends AtomControl {
16
+ preCreate() {
17
+ this.render(XNode.create("div", {
18
+ "data-layout": "row"
19
+ }, XNode.create(CountrySelect, null)));
20
+ }
21
+ });
22
+ }
23
+ };
24
+ });
25
+ //# sourceMappingURL=PhoneEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PhoneEditor","_export","setters","_webAtomsCoreDistCoreXNode","XNode","default","_webAtomsCoreDistWebControlsAtomControl","AtomControl","_countriesCountrySelect","CountrySelect","execute","preCreate","render","create"],"sources":["../../../../src/common/controls/phone-editor/PhoneEditor.tsx"],"sourcesContent":[null],"mappings":";;;yCAIqBA,WAAY;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,0BAAA;MAJ1BC,KAAK,GAAAD,0BAAA,CAAAE,OAAA;IAAA,aAAAC,uCAAA;MACHC,WAAW,GAAAD,uCAAA,CAAXC,WAAW;IAAA,aAAAC,uBAAA;MACXC,aAAa,GAAAD,uBAAA,CAAbC,aAAa;IAAA;IAAAC,OAAA,WAAAA,CAAA;MAAAT,OAAA,YAEDD,WAAY,GAAnB,MAAOA,WAAY,SAAQO,WAAW;QACtCI,SAASA,CAAA;UACf,IAAI,CAACC,MAAM,CAACR,KAAA,CAAAS,MAAA;YAAA,eAAiB;UAAK,GAC9BT,KAAA,CAAAS,MAAA,CAACJ,aAAa,OACR,CACJ,CAAC;QACX;OACH;IAAA;EAAA;AAAA"}
@@ -0,0 +1,24 @@
1
+ import { ContentPage } from "@web-atoms/web-controls/dist/mobile-app/MobileApp";
2
+ interface IVerification {
3
+ id?: string;
4
+ code?: string;
5
+ verified?: string;
6
+ }
7
+ export default class ForgotPassword extends ContentPage {
8
+ model: {
9
+ username: string;
10
+ password: string;
11
+ passwordAgain: string;
12
+ phoneNumber: string;
13
+ country: string;
14
+ phoneNumberText: string;
15
+ captcha: IVerification;
16
+ phone: IVerification;
17
+ };
18
+ init(): Promise<void>;
19
+ resetPassword(): Promise<void>;
20
+ askCode(): void;
21
+ askPasswords(): void;
22
+ }
23
+ export {};
24
+ //# sourceMappingURL=ForgotPassword.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ForgotPassword.d.ts","sourceRoot":"","sources":["../../../../../src/common/pages/user/forgot/ForgotPassword.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AA4BhF,UAAU,aAAa;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IAEnD,KAAK,EAAE;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,aAAa,CAAC;QACvB,KAAK,EAAE,aAAa,CAAC;KACxB,CAaC;IAEI,IAAI;IAyDJ,aAAa;IAyDnB,OAAO;IAqBP,YAAY;CA4Bf"}
@@ -0,0 +1,219 @@
1
+ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/style/styled", "@web-atoms/web-controls/dist/basic/Form", "@web-atoms/web-controls/dist/basic/FormField", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "../../../controls/countries/CountrySelect", "@web-atoms/web-controls/dist/basic/MaskedInput", "@web-atoms/core/dist/services/FetchBuilder", "@web-atoms/core/dist/view-model/Action", "@web-atoms/core/dist/web/services/PopupService", "@web-atoms/web-controls/dist/basic/PasswordBox"], function (_export, _context) {
2
+ "use strict";
3
+
4
+ var __awaiter, __decorate, __metadata, Bind, XNode, styled, Form, FormField, ContentPage, CountrySelect, formatForCountry, isdForCountry, MaskedInput, FetchBuilder, Action, PopupService, PasswordBox, ForgotPassword, css;
5
+ _export("default", void 0);
6
+ return {
7
+ setters: [function (_tslib) {
8
+ __awaiter = _tslib.__awaiter;
9
+ __decorate = _tslib.__decorate;
10
+ __metadata = _tslib.__metadata;
11
+ }, function (_webAtomsCoreDistCoreBind) {
12
+ Bind = _webAtomsCoreDistCoreBind.default;
13
+ }, function (_webAtomsCoreDistCoreXNode) {
14
+ XNode = _webAtomsCoreDistCoreXNode.default;
15
+ }, function (_webAtomsCoreDistStyleStyled) {
16
+ styled = _webAtomsCoreDistStyleStyled.default;
17
+ }, function (_webAtomsWebControlsDistBasicForm) {
18
+ Form = _webAtomsWebControlsDistBasicForm.default;
19
+ }, function (_webAtomsWebControlsDistBasicFormField) {
20
+ FormField = _webAtomsWebControlsDistBasicFormField.default;
21
+ }, function (_webAtomsWebControlsDistMobileAppMobileApp) {
22
+ ContentPage = _webAtomsWebControlsDistMobileAppMobileApp.ContentPage;
23
+ }, function (_controlsCountriesCountrySelect) {
24
+ CountrySelect = _controlsCountriesCountrySelect.CountrySelect;
25
+ formatForCountry = _controlsCountriesCountrySelect.formatForCountry;
26
+ isdForCountry = _controlsCountriesCountrySelect.isdForCountry;
27
+ }, function (_webAtomsWebControlsDistBasicMaskedInput) {
28
+ MaskedInput = _webAtomsWebControlsDistBasicMaskedInput.default;
29
+ }, function (_webAtomsCoreDistServicesFetchBuilder) {
30
+ FetchBuilder = _webAtomsCoreDistServicesFetchBuilder.default;
31
+ }, function (_webAtomsCoreDistViewModelAction) {
32
+ Action = _webAtomsCoreDistViewModelAction.default;
33
+ }, function (_webAtomsCoreDistWebServicesPopupService) {
34
+ PopupService = _webAtomsCoreDistWebServicesPopupService.default;
35
+ }, function (_webAtomsWebControlsDistBasicPasswordBox) {
36
+ PasswordBox = _webAtomsWebControlsDistBasicPasswordBox.default;
37
+ }],
38
+ execute: function () {
39
+ css = styled.css`
40
+ & [data-border=frame] {
41
+ padding: 10px;
42
+ border-radius: 10px;
43
+ gap: 10px;
44
+
45
+ & h3 {
46
+ margin-block-start: 20px;
47
+ margin-block-end: 20px;
48
+ }
49
+
50
+ & input {
51
+ outline: none;
52
+ border: none;
53
+ border-bottom: solid 1px #80808080;
54
+ min-width: 250px;
55
+ }
56
+ }
57
+ `.installLocal();
58
+ _export("default", ForgotPassword = class ForgotPassword extends ContentPage {
59
+ constructor() {
60
+ super(...arguments);
61
+ this.model = {
62
+ username: "",
63
+ password: "",
64
+ passwordAgain: "",
65
+ phoneNumber: "",
66
+ country: "US",
67
+ phoneNumberText: "",
68
+ phone: {
69
+ code: ""
70
+ },
71
+ captcha: {
72
+ code: ""
73
+ }
74
+ };
75
+ }
76
+ init() {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ this.hideToolbar = true;
79
+ this.title = "Reset Password";
80
+ const {
81
+ id
82
+ } = yield FetchBuilder.put("/api/users/captcha").responseAsJson();
83
+ this.model.captcha.id = id;
84
+ this.render(XNode.create("div", {
85
+ class: css
86
+ }, XNode.create("div", {
87
+ "data-layout": "center-all"
88
+ }, XNode.create(Form, {
89
+ "data-border": "frame"
90
+ }, XNode.create("h3", null, "To reset password, enter following."), XNode.create(FormField, {
91
+ label: "Username"
92
+ }, XNode.create("input", {
93
+ autofocus: true,
94
+ value: Bind.twoWaysImmediate(() => this.model.username)
95
+ })), XNode.create(FormField, {
96
+ label: "Phone Number"
97
+ }, XNode.create("div", {
98
+ "data-layout": "row"
99
+ }, XNode.create(CountrySelect, {
100
+ value: Bind.twoWaysImmediate(() => this.model.country)
101
+ }), XNode.create(MaskedInput, {
102
+ "data-mask": Bind.oneWayAsync(() => formatForCountry(this.model.country)),
103
+ value: Bind.twoWaysImmediate(() => this.model.phoneNumberText)
104
+ }))), XNode.create(FormField, {
105
+ label: "Captcha"
106
+ }, XNode.create("img", {
107
+ src: `/api/users/captcha/${id}`
108
+ })), XNode.create(FormField, {
109
+ label: "Enter 5 Digit Code"
110
+ }, XNode.create("input", {
111
+ type: "tel",
112
+ value: Bind.twoWaysImmediate(() => this.model.captcha.code)
113
+ })), XNode.create("div", {
114
+ "data-layout": "row"
115
+ }, XNode.create("button", {
116
+ "data-layout": "go-button",
117
+ "data-submit-event": "ask-code"
118
+ }, "Next"))))));
119
+ });
120
+ }
121
+ resetPassword() {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ const {
124
+ model
125
+ } = this;
126
+ if (model.phone.verified) {
127
+ if (!model.password) {
128
+ throw new Error("Password is required");
129
+ }
130
+ }
131
+ if (model.password) {
132
+ if (model.password.length < 7) {
133
+ throw new Error("Password is cannot be less than 7 characters");
134
+ }
135
+ if (/\s/i.test(model.password)) {
136
+ throw new Error("Password must not any whitespace characters");
137
+ }
138
+ if (model.passwordAgain !== model.password) {
139
+ throw new Error("Passwords do not match");
140
+ }
141
+ }
142
+ const isdCode = yield isdForCountry(model.country);
143
+ const phoneNumber = model.phoneNumberText.replace(/[^0-9]/g, "");
144
+ model.phoneNumber = isdCode.startsWith("+") ? isdCode + phoneNumber : `+${isdCode}${phoneNumber}`;
145
+ const {
146
+ userID,
147
+ phone,
148
+ captcha
149
+ } = yield FetchBuilder.post("/api/users/password/reset/").jsonBody(this.model).responseAsJson();
150
+ if (captcha === null || captcha === void 0 ? void 0 : captcha.verified) {
151
+ model.captcha.verified = captcha.verified;
152
+ }
153
+ if (userID) {
154
+ yield PopupService.alert({
155
+ message: "Password has been reset successully, please login with your new password."
156
+ });
157
+ location.href = "/";
158
+ return;
159
+ }
160
+ if (phone.verified) {
161
+ this.model.phone.verified = phone.verified;
162
+ this.askPasswords();
163
+ return;
164
+ }
165
+ if (phone.id) {
166
+ this.model.phone.id = phone.id;
167
+ }
168
+ this.askCode();
169
+ });
170
+ }
171
+ askCode() {
172
+ this.renderer = XNode.create("div", {
173
+ class: css
174
+ }, XNode.create("div", {
175
+ "data-layout": "center-all"
176
+ }, XNode.create(Form, {
177
+ "data-border": "frame"
178
+ }, XNode.create("h3", null, "Enter verification code."), XNode.create(FormField, {
179
+ label: "Code"
180
+ }, XNode.create("input", {
181
+ type: "tel",
182
+ value: Bind.twoWaysImmediate(() => this.model.phone.code)
183
+ })), XNode.create("div", {
184
+ "data-layout": "row"
185
+ }, XNode.create("button", {
186
+ "data-layout": "go-button",
187
+ "data-submit-event": "ask-code"
188
+ }, "Next")))));
189
+ }
190
+ askPasswords() {
191
+ this.renderer = XNode.create("div", {
192
+ class: css
193
+ }, XNode.create("div", {
194
+ "data-layout": "center-all"
195
+ }, XNode.create(Form, {
196
+ "data-border": "frame"
197
+ }, XNode.create("h3", null, "Enter new password."), XNode.create(FormField, {
198
+ label: "Password"
199
+ }, XNode.create(PasswordBox, {
200
+ value: Bind.twoWaysImmediate(() => this.model.password)
201
+ })), XNode.create(FormField, {
202
+ label: "Password Again"
203
+ }, XNode.create(PasswordBox, {
204
+ value: Bind.twoWaysImmediate(() => this.model.passwordAgain)
205
+ })), XNode.create("div", {
206
+ "data-layout": "row"
207
+ }, XNode.create("button", {
208
+ "data-layout": "go-button",
209
+ "data-submit-event": "ask-code"
210
+ }, "Next")))));
211
+ }
212
+ });
213
+ __decorate([Action({
214
+ onEvent: "ask-code"
215
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], ForgotPassword.prototype, "resetPassword", null);
216
+ }
217
+ };
218
+ });
219
+ //# sourceMappingURL=ForgotPassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ForgotPassword","css","_export","setters","_tslib","Bind","_webAtomsCoreDistCoreBind","default","_webAtomsCoreDistCoreXNode","XNode","_webAtomsCoreDistStyleStyled","styled","_webAtomsWebControlsDistBasicForm","Form","_webAtomsWebControlsDistBasicFormField","FormField","_webAtomsWebControlsDistMobileAppMobileApp","ContentPage","_controlsCountriesCountrySelect","CountrySelect","formatForCountry","isdForCountry","_webAtomsWebControlsDistBasicMaskedInput","MaskedInput","_webAtomsCoreDistServicesFetchBuilder","FetchBuilder","_webAtomsCoreDistViewModelAction","Action","_webAtomsCoreDistWebServicesPopupService","PopupService","_webAtomsWebControlsDistBasicPasswordBox","PasswordBox","execute","installLocal","constructor","model","username","password","passwordAgain","phoneNumber","country","phoneNumberText","phone","code","captcha","init","hideToolbar","title","id","put","responseAsJson","render","create","class","label","autofocus","value","twoWaysImmediate","oneWayAsync","src","type","resetPassword","verified","Error","length","test","isdCode","replace","startsWith","userID","post","jsonBody","alert","message","location","href","askPasswords","askCode","renderer","__decorate","onEvent"],"sources":["../../../../../src/common/pages/user/forgot/ForgotPassword.tsx"],"sourcesContent":[null],"mappings":";;;0MAuCqBA,cAAe,EAAAC,GAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;;;MAvC7BC,IAAI,GAAAC,yBAAA,CAAAC,OAAA;IAAA,aAAAC,0BAAA;MACJC,KAAK,GAAAD,0BAAA,CAAAD,OAAA;IAA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,EAAE;MAAU,CAAC,CAAC,E,qKAwD9B;IAAA;EAAA;AAAA"}
@@ -7,5 +7,6 @@ export default class LoginPage extends ContentPage {
7
7
  init(): Promise<void>;
8
8
  login(): Promise<void>;
9
9
  showChangePassword(): Promise<void>;
10
+ forgotPassword(): Promise<void>;
10
11
  }
11
12
  //# sourceMappingURL=LoginPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoginPage.d.ts","sourceRoot":"","sources":["../../../../../src/common/pages/user/login/LoginPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AA0BhF,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAG9C,OAAO,CAAC,WAAW,CAAe;IAElC,OAAO,CAAC,KAAK,CAAgB;IAE7B,OAAO,CAAC,QAAQ,CAAC,CAAc;IAE/B,OAAO,CAAC,QAAQ,CAAU;IAEpB,IAAI;IA8BJ,KAAK;IAsCL,kBAAkB;CAuC3B"}
1
+ {"version":3,"file":"LoginPage.d.ts","sourceRoot":"","sources":["../../../../../src/common/pages/user/login/LoginPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAkDhF,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAG9C,OAAO,CAAC,WAAW,CAAe;IAElC,OAAO,CAAC,KAAK,CAAgB;IAE7B,OAAO,CAAC,QAAQ,CAAC,CAAc;IAE/B,OAAO,CAAC,QAAQ,CAAU;IAEpB,IAAI;IAmDJ,KAAK;IAsCL,kBAAkB;IAwClB,cAAc;CAUvB"}
@@ -1,7 +1,7 @@
1
- System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/web-controls/dist/basic/Form", "@web-atoms/web-controls/dist/basic/FormField", "../../../../model/model", "@web-atoms/core/dist/core/Bind", "@web-atoms/web-controls/dist/basic/PasswordBox", "@web-atoms/core/dist/view-model/Action", "@web-atoms/core/dist/core/InjectProperty", "../../../../services/LoginService", "../../../controls/password/PasswordStrength", "../../../validators/Validators", "@web-atoms/web-controls/dist/basic/ToggleButtonBar", "../../../controls/buttons/IconButton"], function (_export, _context) {
1
+ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-controls/dist/mobile-app/MobileApp", "@web-atoms/web-controls/dist/basic/Form", "@web-atoms/web-controls/dist/basic/FormField", "../../../../model/model", "@web-atoms/core/dist/core/Bind", "@web-atoms/web-controls/dist/basic/PasswordBox", "@web-atoms/core/dist/view-model/Action", "@web-atoms/core/dist/core/InjectProperty", "../../../../services/LoginService", "../../../controls/password/PasswordStrength", "../../../validators/Validators", "@web-atoms/web-controls/dist/basic/ToggleButtonBar", "../../../controls/buttons/IconButton", "@web-atoms/core/dist/style/styled", "@web-atoms/web-controls/dist/PageNavigator", "../forgot/ForgotPassword", "@web-atoms/core/dist/web/services/PopupService"], function (_export, _context) {
2
2
  "use strict";
3
3
 
4
- var __awaiter, __decorate, __metadata, XNode, ContentPage, Form, FormField, LoginSession, Bind, PasswordBox, Action, InjectProperty, LoginService, PasswordStrength, Validators, ToggleButtonBar, SaveIconTextButton, LoginPage, authTypes;
4
+ var __awaiter, __decorate, __metadata, XNode, ContentPage, Form, FormField, LoginSession, Bind, PasswordBox, Action, InjectProperty, LoginService, PasswordStrength, Validators, ToggleButtonBar, SaveIconTextButton, styled, PageNavigator, ForgotPassword, PopupService, LoginPage, css, authTypes;
5
5
  _export("default", void 0);
6
6
  return {
7
7
  setters: [function (_tslib) {
@@ -36,8 +36,35 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-con
36
36
  ToggleButtonBar = _webAtomsWebControlsDistBasicToggleButtonBar.default;
37
37
  }, function (_controlsButtonsIconButton) {
38
38
  SaveIconTextButton = _controlsButtonsIconButton.SaveIconTextButton;
39
+ }, function (_webAtomsCoreDistStyleStyled) {
40
+ styled = _webAtomsCoreDistStyleStyled.default;
41
+ }, function (_webAtomsWebControlsDistPageNavigator) {
42
+ PageNavigator = _webAtomsWebControlsDistPageNavigator.default;
43
+ }, function (_forgotForgotPassword) {
44
+ ForgotPassword = _forgotForgotPassword.default;
45
+ }, function (_webAtomsCoreDistWebServicesPopupService) {
46
+ PopupService = _webAtomsCoreDistWebServicesPopupService.default;
39
47
  }],
40
48
  execute: function () {
49
+ css = styled.css`
50
+ & [data-border=frame] {
51
+ padding: 10px;
52
+ border-radius: 10px;
53
+ gap: 10px;
54
+
55
+ & h3 {
56
+ margin-block-start: 20px;
57
+ margin-block-end: 20px;
58
+ }
59
+
60
+ & input {
61
+ outline: none;
62
+ border: none;
63
+ border-bottom: solid 1px #80808080;
64
+ min-width: 250px;
65
+ }
66
+ }
67
+ `.installLocal();
41
68
  authTypes = [{
42
69
  label: "Authenticator (TOTP)",
43
70
  value: "totp"
@@ -53,26 +80,46 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-con
53
80
  }
54
81
  init() {
55
82
  return __awaiter(this, void 0, void 0, function* () {
83
+ this.footerRenderer = () => XNode.create("div", {
84
+ "data-layout": "row"
85
+ }, XNode.create("a", {
86
+ target: "_blank",
87
+ "data-margin-left": "auto",
88
+ href: "https://socialmail.me"
89
+ }, "Social Mail"));
90
+ this.hideToolbar = true;
56
91
  this.model = LoginSession.create({});
57
92
  this.model.userName = "";
58
93
  this.model.checkPassword = "";
59
94
  this.model.timeToken = "";
60
95
  this.model.oneTimePassword = "";
61
- this.render(XNode.create("div", null, XNode.create("div", {
96
+ this.render(XNode.create("div", {
97
+ class: css
98
+ }, XNode.create("div", {
62
99
  "data-layout": "center-all"
63
- }, XNode.create(Form, null, XNode.create(FormField, {
100
+ }, XNode.create(Form, {
101
+ "data-border": "frame"
102
+ }, XNode.create("h3", null, "Sign in to continue"), XNode.create(FormField, {
64
103
  label: "Username"
65
104
  }, XNode.create("input", {
105
+ autofocus: true,
66
106
  value: Bind.twoWaysImmediate(() => this.model.userName)
67
107
  })), XNode.create(FormField, {
68
108
  label: "Password"
69
109
  }, XNode.create(PasswordBox, {
70
110
  value: Bind.twoWaysImmediate(() => this.model.checkPassword)
71
- })), XNode.create("div", null, XNode.create("button", {
111
+ })), XNode.create("div", {
112
+ "data-layout": "row"
113
+ }, XNode.create("button", {
72
114
  "data-layout": "accent-button",
73
115
  "data-submit-event": "login",
74
116
  text: "Login"
75
- }))))));
117
+ })), XNode.create("div", {
118
+ "data-layout": "row"
119
+ }, XNode.create("span", {
120
+ "data-click-event": "forgot-password",
121
+ "data-layout": "link"
122
+ }, "Forgot password?"))))));
76
123
  });
77
124
  }
78
125
  login() {
@@ -139,11 +186,25 @@ System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/web-con
139
186
  })))));
140
187
  });
141
188
  }
189
+ forgotPassword() {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ if (/socialmail\.me/i.test(location.href)) {
192
+ PageNavigator.openPage(ForgotPassword);
193
+ return;
194
+ }
195
+ yield PopupService.alert({
196
+ message: "Please contact your administrator"
197
+ });
198
+ });
199
+ }
142
200
  });
143
201
  __decorate([InjectProperty, __metadata("design:type", LoginService)], LoginPage.prototype, "userService", void 0);
144
202
  __decorate([Action({
145
203
  onEvent: "login"
146
204
  }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], LoginPage.prototype, "login", null);
205
+ __decorate([Action({
206
+ onEvent: "forgot-password"
207
+ }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise)], LoginPage.prototype, "forgotPassword", null);
147
208
  }
148
209
  };
149
210
  });
@@ -1 +1 @@
1
- {"version":3,"names":["LoginPage","authTypes","_export","setters","_tslib","XNode","_webAtomsCoreDistCoreXNode","default","_webAtomsWebControlsDistMobileAppMobileApp","ContentPage","_webAtomsWebControlsDistBasicForm","Form","_webAtomsWebControlsDistBasicFormField","FormField","_modelModel","LoginSession","_webAtomsCoreDistCoreBind","Bind","_webAtomsWebControlsDistBasicPasswordBox","PasswordBox","_webAtomsCoreDistViewModelAction","Action","_webAtomsCoreDistCoreInjectProperty","InjectProperty","_servicesLoginService","LoginService","_controlsPasswordPasswordStrength","PasswordStrength","_validatorsValidators","Validators","_webAtomsWebControlsDistBasicToggleButtonBar","ToggleButtonBar","_controlsButtonsIconButton","SaveIconTextButton","execute","label","value","constructor","password","authType","init","model","create","userName","checkPassword","timeToken","oneTimePassword","render","twoWaysImmediate","text","login","status","userService","showChangePassword","renderer","items","twoWays","oneWay","type","event-click","newPassword","required","error","isValidPassword","__decorate","onEvent"],"sources":["../../../../../src/common/pages/user/login/LoginPage.tsx"],"sourcesContent":[null],"mappings":";;;wNA2BqBA,SAAU,EAAAC,SAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;;;MA3BxBC,KAAK,GAAAC,0BAAA,CAAAC,OAAA;IAAA,aAAAC,0CAAA;MACHC,WAAW,GAAAD,0CAAA,CAAXC,WAAW;IAAA,aAAAC,iCAAA;MACbC,IAAI,GAAAD,iCAAA,CAAAH,OAAA;IAAA,aAAAK,sCAAA;MACJC,SAAS,GAAAD,sCAAA,CAAAL,OAAA;IAAA,aAAAO,WAAA;MACQC,YAAY,GAAAD,WAAA,CAAZC,YAAY;IAAA,aAAAC,yBAAA;MAC7BC,IAAI,GAAAD,yBAAA,CAAAT,OAAA;IAAA,aAAAW,wCAAA;MACJC,WAAW,GAAAD,wCAAA,CAAAX,OAAA;IAAA,aAAAa,gCAAA;MACXC,MAAM,GAAAD,gCAAA,CAAAb,OAAA;IAAA,aAAAe,mCAAA;MACNC,cAAc,GAAAD,mCAAA,CAAAf,OAAA;IAAA,aAAAiB,qBAAA;MACdC,YAAY,GAAAD,qBAAA,CAAAjB,OAAA;IAAA,aAAAmB,iCAAA;MAGZC,gBAAgB,GAAAD,iCAAA,CAAAnB,OAAA;IAAA,aAAAqB,qBAAA;MACdC,UAAU,GAAAD,qBAAA,CAAVC,UAAU;IA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ACtB0B,QAAQ,EAAE,IAAI;cACdC,KAAK,EAAE7C,IAAI,CAACwC,MAAM,CAAC,MAAM,IAAI,CAAChB,KAAK,CAACmB,WAAW,KAAK,IAAI,CAACtB,QAAQ,GAAG,wBAAwB,GAAG,EAAE;YAAC,GAClGjC,KAAA,CAAAqC,MAAA,CAACvB,WAAW;cACRiB,KAAK,EAAEnB,IAAI,CAAC+B,gBAAgB,CAAC,MAAM,IAAI,CAACP,KAAK,CAACmB,WAAW;YAAC,EACxD,CACE,EACZvD,KAAA,CAAAqC,MAAA;cAAA,eAAiB;YAAa,GAC1BrC,KAAA,CAAAqC,MAAA;cAAA,qBACsB,OAAO;cACzBO,IAAI,EAAC;YAAyB,EAAE,CAClC,CACH,CACL,CACJ;UAEV,CAAC;;OAEJ;MApHGe,UAAA,EAACzC,cAAc,E,0BACME,YAAY,E,6CAAC;MAsC5BuC,UAAA,EADL3C,MAAM,CAAC;QAAE4C,OAAO,EAAE;MAAO,CAAE,CAAC,E,wJAqC5B;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["LoginPage","css","authTypes","_export","setters","_tslib","XNode","_webAtomsCoreDistCoreXNode","default","_webAtomsWebControlsDistMobileAppMobileApp","ContentPage","_webAtomsWebControlsDistBasicForm","Form","_webAtomsWebControlsDistBasicFormField","FormField","_modelModel","LoginSession","_webAtomsCoreDistCoreBind","Bind","_webAtomsWebControlsDistBasicPasswordBox","PasswordBox","_webAtomsCoreDistViewModelAction","Action","_webAtomsCoreDistCoreInjectProperty","InjectProperty","_servicesLoginService","LoginService","_controlsPasswordPasswordStrength","PasswordStrength","_validatorsValidators","Validators","_webAtomsWebControlsDistBasicToggleButtonBar","ToggleButtonBar","_controlsButtonsIconButton","SaveIconTextButton","_webAtomsCoreDistStyleStyled","styled","_webAtomsWebControlsDistPageNavigator","PageNavigator","_forgotForgotPassword","ForgotPassword","_webAtomsCoreDistWebServicesPopupService","PopupService","execute","installLocal","label","value","constructor","password","authType","init","footerRenderer","create","target","href","hideToolbar","model","userName","checkPassword","timeToken","oneTimePassword","render","class","autofocus","twoWaysImmediate","text","login","status","userService","showChangePassword","renderer","items","twoWays","oneWay","type","event-click","newPassword","required","error","isValidPassword","forgotPassword","test","location","openPage","alert","message","__decorate","onEvent"],"sources":["../../../../../src/common/pages/user/login/LoginPage.tsx"],"sourcesContent":[null],"mappings":";;;6QAmDqBA,SAAU,EAAAC,GAAA,EAAAC,SAAA;EAAAC,OAAA;EAAA;IAAAC,OAAA,aAAAC,MAAA;;;;;MAnDxBC,KAAK,GAAAC,0BAAA,CAAAC,OAAA;IAAA,aAAAC,0CAAA;MACHC,WAAW,GAAAD,0CAAA,CAAXC,WAAW;IAAA,aAAAC,iCAAA;MACbC,IAAI,GAAAD,iCAAA,CAAAH,OAAA;IAAA,aAAAK,sCAAA;MACJC,SAAS,GAAAD,sCAAA,CAAAL,OAAA;IAAA,aAAAO,WAAA;MACQC,YAAY,GAAAD,WAAA,CAAZC,YAAY;IAAA,aAAAC,yBAAA;MAC7BC,IAAI,GAAAD,yBAAA,CAAAT,OAAA;IAAA,aAAAW,wCAAA;MACJC,WAAW,GAAAD,wCAAA,CAAAX,OAAA;IAAA,aAAAa,gCAAA;MACXC,MAAM,GAAAD,gCAAA,CAAAb,OAAA;IAAA,aAAAe,mCAAA;MACNC,cAAc,GAAAD,mCAAA,CAAAf,OAAA;IAAA,aAAAiB,qBAAA;MACdC,YAAY,GAAAD,qBAAA,CAAAjB,OAAA;IAAA,aAAAmB,iCAAA;MAGZC,gBAAgB,GAAAD,iCAAA,CAAAnB,OAAA;IAAA,aAAAqB,qBAAA;MACdC,UAAU,GAAAD,qBAAA,CAAVC,UAAU;IAAA,aAAAC,4CAAA;MACZC,eAAe,GAAAD,4CAAA,CAAAvB,OAAA;IAAA,aAAAyB,0BAAA;MACbC,kBAAkB,GAAAD,0BAAA,CAAlBC,kBAAkB;IAAA,aAAAC,4BAAA;MACpBC,MAAM,GAAAD,4BAAA,CAAA3B,OAAA;IAAA,aA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6C,QAAQ,CAAC3C,cAAc,CAAC;cACtC;;YAEJ,MAAME,YAAY,CAAC0C,KAAK,CAAC;cACrBC,OAAO,EAAE;aACZ,CAAC;UACN,CAAC;;OAEJ;MApJGC,UAAA,EAAC9D,cAAc,E,0BACME,YAAY,E,6CAAC;MA2D5B4D,UAAA,EADLhE,MAAM,CAAC;QAAEiE,OAAO,EAAE;MAAO,CAAE,CAAC,E,wJAqC5B;MA0CKD,UAAA,EADLhE,MAAM,CAAC;QAAEiE,OAAO,EAAE;MAAiB,CAAC,CAAC,E,iKASrC;IAAA;EAAA;AAAA"}
@@ -1434,7 +1434,7 @@ class AmdLoader {
1434
1434
  path = path + "/" + name;
1435
1435
  const i = name.lastIndexOf("/");
1436
1436
  const fileName = name.substring(i + 1);
1437
- if (!/\.(js|jpg|jpeg|gif|png|mp4|mp3|css|html|svg|webp|webm)$/i.test(fileName)) {
1437
+ if (!/\.(js|jpg|jpeg|gif|png|mp4|mp3|css|html|svg|webp|webm|json)$/i.test(fileName)) {
1438
1438
  path = path + defExt;
1439
1439
  }
1440
1440
  return path;
@@ -8341,8 +8341,11 @@ System.register([], function (_export, _context) {
8341
8341
  }
8342
8342
  get details() {
8343
8343
  var _a;
8344
- if (this.json.paramErrors) {
8345
- return this.errors.map(x => `${x.name}: ${x.reason}`).join("\n");
8344
+ const {
8345
+ errors
8346
+ } = this;
8347
+ if (errors.length) {
8348
+ return errors.map(x => `${x.name}: ${x.reason}`).join("\n");
8346
8349
  }
8347
8350
  return (_a = this.json) === null || _a === void 0 ? void 0 : _a.details;
8348
8351
  }
@@ -10348,6 +10351,7 @@ System.register(["tslib", "./http/JsonError"], function (_export, _context) {
10348
10351
  return fetch(this.request.url, this.request);
10349
10352
  }
10350
10353
  ensureSuccess(r) {
10354
+ var _a, _b, _c, _d;
10351
10355
  return __awaiter(this, void 0, void 0, function* () {
10352
10356
  if (r.status <= 300) {
10353
10357
  return;
@@ -10355,7 +10359,7 @@ System.register(["tslib", "./http/JsonError"], function (_export, _context) {
10355
10359
  const type = r.headers.get("content-type");
10356
10360
  if (/\/json/i.test(type)) {
10357
10361
  const json = yield r.json();
10358
- throw new JsonError(`Failed for ${this.request.url}`, json);
10362
+ throw new JsonError((_d = (_c = (_b = (_a = json.title) !== null && _a !== void 0 ? _a : json.detail) !== null && _b !== void 0 ? _b : json.message) !== null && _c !== void 0 ? _c : json.exceptionMessage) !== null && _d !== void 0 ? _d : "Json Server Error", json);
10359
10363
  }
10360
10364
  const text = yield r.text();
10361
10365
  throw new Error(`Failed for ${this.request.url}\n${text}`);