@social-mail/social-mail-client 1.2.352 → 1.2.354

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.2.352",
3
+ "version": "1.2.354",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -38,56 +38,65 @@ export default class ContactUsApp extends AtomControl {
38
38
  captcha.code = "";
39
39
 
40
40
  this.renderer = <div>
41
- <Form>
42
- <FormField label="Your Name"
43
- error={Bind.oneWay(() => (this.model.name) ? "" : "Name is required")}>
44
- <input value={Bind.twoWaysImmediate(() => this.model.name)}/>
45
- </FormField>
46
- <FormField
47
- label="Your Email"
48
- error={Bind.oneWay(() => (this.model.email || this.model.phone) ? "" : "Email or Phone is required")}>
49
- <input value={Bind.twoWaysImmediate(() => this.model.email)}/>
50
- </FormField>
51
- <FormField label="Your Phone"
52
- error={Bind.oneWay(() => (this.model.email || this.model.phone) ? "" : "Email or Phone is required")}>
53
- <input value={Bind.twoWaysImmediate(() => this.model.phone)}/>
54
- </FormField>
55
- <FormField label="Subject"
56
- error={Bind.oneWay(() => (this.model.name) ? "" : "Name is required")}>
57
- <input value={Bind.twoWaysImmediate(() => this.model.subject)}/>
58
- </FormField>
59
- <FormField label="Questions">
60
- <textarea
61
- rows="8"
62
- value={Bind.twoWaysImmediate(() => this.model.subject)}/>
63
- </FormField>
64
- <FormField
65
- label="Verify Code"
66
- error={Bind.oneWay(() => this.model.captcha.code ? "" : "Code is required")}>
67
- <div data-layout="vertical-flex">
68
- <img src={`/api/users/captcha/${this.model.captcha.id}/${this.model.captcha.accessCode}`} />
69
- <input type="tel" value={Bind.twoWaysImmediate(() => this.model.captcha.code)}/>
70
- </div>
71
- </FormField>
72
- <FormField label="">
73
- <EmailIconTextButton
74
- data-submit-event="send-email"
75
- text="Send Email"
76
- />
77
- </FormField>
78
- </Form>
41
+ <div data-layout="center-all">
42
+ <Form>
43
+ <FormField label="Your Name"
44
+ error={Bind.oneWay(() => (this.model.name) ? "" : "Name is required")}>
45
+ <input value={Bind.twoWaysImmediate(() => this.model.name)}/>
46
+ </FormField>
47
+ <FormField
48
+ label="Your Email"
49
+ error={Bind.oneWay(() => (this.model.email || this.model.phone) ? "" : "Email or Phone is required")}>
50
+ <input value={Bind.twoWaysImmediate(() => this.model.email)}/>
51
+ </FormField>
52
+ <FormField label="Your Phone"
53
+ error={Bind.oneWay(() => (this.model.email || this.model.phone) ? "" : "Email or Phone is required")}>
54
+ <input value={Bind.twoWaysImmediate(() => this.model.phone)}/>
55
+ </FormField>
56
+ <FormField label="Subject"
57
+ error={Bind.oneWay(() => (this.model.name) ? "" : "Name is required")}>
58
+ <input value={Bind.twoWaysImmediate(() => this.model.subject)}/>
59
+ </FormField>
60
+ <FormField label="Questions">
61
+ <textarea
62
+ rows="8"
63
+ value={Bind.twoWaysImmediate(() => this.model.subject)}/>
64
+ </FormField>
65
+ <FormField
66
+ label="Verify Code"
67
+ error={Bind.oneWay(() => this.model.captcha.code ? "" : "Code is required")}>
68
+ <div>
69
+ <div data-layout="vertical-flex">
70
+ <img src={`/api/users/captcha/${this.model.captcha.id}/${this.model.captcha.accessCode}`} />
71
+ <input type="tel" value={Bind.twoWaysImmediate(() => this.model.captcha.code)}/>
72
+ </div>
73
+ </div>
74
+ </FormField>
75
+ <FormField label="">
76
+ <div>
77
+ <EmailIconTextButton
78
+ data-submit-event="send-email"
79
+ text="Send Email"
80
+ />
81
+ </div>
82
+ </FormField>
83
+ </Form>
84
+ </div>
79
85
  </div>;
80
86
  }
81
87
 
82
88
  @Action({
83
- onEvent: "send-email",
84
- success: "Email sent successfully."
89
+ onEvent: "send-email"
85
90
  })
86
91
  async sendEmail() {
87
92
  await FetchBuilder.post("/api/site/contact")
88
93
  .jsonBody(this.model)
89
94
  .responseAsJson<any>();
90
- await this.init();
95
+ this.renderer = <div>
96
+ <div data-layout="center-all">
97
+ <div>Email sent successfully.</div>
98
+ </div>
99
+ </div>;
91
100
  }
92
101
 
93
102
  }