@mj-biz-apps/orders-ng 5.34.1 → 5.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31706,17 +31706,30 @@ function ReadCheckoutAccount(raw) {
31706
31706
  Outcome: a["Outcome"],
31707
31707
  Message: typeof a["Message"] === "string" && a["Message"] ? a["Message"] : void 0,
31708
31708
  CanSetPassword: a["CanSetPassword"] === true,
31709
- VerificationRequired: a["Outcome"] === "Created"
31709
+ VerificationRequired: a["Outcome"] === "Created",
31710
+ ...a["Outcome"] === "Created" ? readHostWording(a) : {}
31710
31711
  };
31711
31712
  }
31713
+ function readHostWording(a) {
31714
+ const wording = {};
31715
+ const note = a["VerificationNote"];
31716
+ if (note === null || typeof note === "string")
31717
+ wording.VerificationNote = note?.trim() ? note : null;
31718
+ const passwordSet = a["PasswordSetMessage"];
31719
+ if (typeof passwordSet === "string" && passwordSet.trim())
31720
+ wording.PasswordSetMessage = passwordSet;
31721
+ return wording;
31722
+ }
31712
31723
  var VERIFY_NOTE = "We are sending a link to your e-mail. Use it to verify your account before you sign in.";
31724
+ var PASSWORD_SET_MESSAGE = "Your password is set. Check your e-mail for the link to verify your account, then sign in with the e-mail you used here.";
31713
31725
  function VerificationNote(account) {
31714
- return account?.VerificationRequired ? VERIFY_NOTE : null;
31726
+ if (!account?.VerificationRequired)
31727
+ return null;
31728
+ return account.VerificationNote === void 0 ? VERIFY_NOTE : account.VerificationNote;
31715
31729
  }
31716
31730
  function AccountMessage(account, passwordSet) {
31717
- if (passwordSet) {
31718
- return "Your password is set. Check your e-mail for the link to verify your account, then sign in with the e-mail you used here.";
31719
- }
31731
+ if (passwordSet)
31732
+ return account.PasswordSetMessage ?? PASSWORD_SET_MESSAGE;
31720
31733
  if (account.Message)
31721
31734
  return account.Message;
31722
31735
  if (account.Outcome === "Exists")
@@ -12,18 +12,18 @@ export interface CheckoutAccountView {
12
12
  Outcome: CheckoutAccountOutcome;
13
13
  Message?: string;
14
14
  CanSetPassword: boolean;
15
- /**
16
- * The buyer must verify the e-mail before the account signs in. True for every `Created`
17
- * account: the `CheckoutAccountStep` contract keeps a created account unable to sign in until
18
- * the host has verified the e-mail (#395).
19
- */
15
+ /** True for every `Created` account, which gets the verification note. */
20
16
  VerificationRequired?: boolean;
17
+ /** The host's verification note: absent for the default, `null` for none. */
18
+ VerificationNote?: string | null;
19
+ /** The host's wording once the password is set; absent for the default. */
20
+ PasswordSetMessage?: string;
21
21
  }
22
22
  /** Shown when the account step could not be reached or did not answer. */
23
23
  export declare const ACCOUNT_STEP_FAILED: CheckoutAccountView;
24
24
  /** The account the server reported, or null when the response carries none (no step registered). */
25
25
  export declare function ReadCheckoutAccount(raw: unknown): CheckoutAccountView | null;
26
- /** The note shown with the password form of a created account. */
26
+ /** The note shown with the password form of a created account: the host's, or the default. */
27
27
  export declare function VerificationNote(account: CheckoutAccountView | null): string | null;
28
28
  /** The line shown under the confirmation when no password form is showing. */
29
29
  export declare function AccountMessage(account: CheckoutAccountView, passwordSet: boolean): string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-account.d.ts","sourceRoot":"","sources":["../../../src/lib/checkout-widget/checkout-account.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErE,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,sBAAsB,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,0EAA0E;AAC1E,eAAO,MAAM,mBAAmB,EAAE,mBAAkE,CAAC;AAErG,oGAAoG;AACpG,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAU5E;AAID,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,O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AM,GAAG,IAAI,CAGnF;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAMhG;AAED,iHAAiH;AACjH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIxF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,EAAE,SAAS,UAAQ,GAAG,OAAO,CAG3F;AAED,oGAAoG;AACpG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAAG,OAAO,CAE7E"}
@@ -21,18 +21,31 @@ export function ReadCheckoutAccount(raw) {
21
21
  Message: typeof a['Message'] === 'string' && a['Message'] ? a['Message'] : undefined,
22
22
  CanSetPassword: a['CanSetPassword'] === true,
23
23
  VerificationRequired: a['Outcome'] === 'Created',
24
+ ...(a['Outcome'] === 'Created' ? readHostWording(a) : {}),
24
25
  };
25
26
  }
27
+ function readHostWording(a) {
28
+ const wording = {};
29
+ const note = a['VerificationNote'];
30
+ if (note === null || typeof note === 'string')
31
+ wording.VerificationNote = note?.trim() ? note : null;
32
+ const passwordSet = a['PasswordSetMessage'];
33
+ if (typeof passwordSet === 'string' && passwordSet.trim())
34
+ wording.PasswordSetMessage = passwordSet;
35
+ return wording;
36
+ }
26
37
  const VERIFY_NOTE = 'We are sending a link to your e-mail. Use it to verify your account before you sign in.';
27
- /** The note shown with the password form of a created account. */
38
+ const PASSWORD_SET_MESSAGE = 'Your password is set. Check your e-mail for the link to verify your account, then sign in with the e-mail you used here.';
39
+ /** The note shown with the password form of a created account: the host's, or the default. */
28
40
  export function VerificationNote(account) {
29
- return account?.VerificationRequired ? VERIFY_NOTE : null;
41
+ if (!account?.VerificationRequired)
42
+ return null;
43
+ return account.VerificationNote === undefined ? VERIFY_NOTE : account.VerificationNote;
30
44
  }
31
45
  /** The line shown under the confirmation when no password form is showing. */
32
46
  export function AccountMessage(account, passwordSet) {
33
- if (passwordSet) {
34
- return 'Your password is set. Check your e-mail for the link to verify your account, then sign in with the e-mail you used here.';
35
- }
47
+ if (passwordSet)
48
+ return account.PasswordSetMessage ?? PASSWORD_SET_MESSAGE;
36
49
  if (account.Message)
37
50
  return account.Message;
38
51
  if (account.Outcome === 'Exists')
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-account.js","sourceRoot":"","sources":["../../../src/lib/checkout-widget/checkout-account.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH,0EAA0E;AAC1E,MAAM,CAAC,MAAM,mBAAmB,GAAwB,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;AAErG,oGAAoG;AACpG,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC5C,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACjD,MAAM,CAAC,GAAG,GAA8B,CAAC;IACzC,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACtG,OAAO;QACH,OAAO,EAAE,CAAC,CAAC,SAAS,CAAC;QACrB,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;QACpF,cAAc,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,IAAI;QAC5C,oBAAoB,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,SAAS;KACnD,CAAC;AACN,CAAC;AAED,MAAM,WAAW,GAAG,yFAAyF,CAAC;AAE9G,kEAAkE;A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;IAC9E,IAAI,SAAS,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,CAAC,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC;AACnE,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,gBAAgB,CAAC,OAAmC;IAChE,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;AACjF,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mj-biz-apps/orders-ng",
3
3
  "type": "module",
4
- "version": "5.34.1",
4
+ "version": "5.35.0",
5
5
  "description": "BizApps Orders Angular bootstrap - generated form components and module for the unified order-management Open App",
6
6
  "main": "dist/public-api.js",
7
7
  "types": "dist/public-api.d.ts",
@@ -15,7 +15,7 @@
15
15
  "author": "MemberJunction.com",
16
16
  "license": "BUSL-1.1",
17
17
  "dependencies": {
18
- "@mj-biz-apps/orders-entities": "^5.34.1",
18
+ "@mj-biz-apps/orders-entities": "^5.35.0",
19
19
  "ag-grid-angular": "^35.0.1",
20
20
  "ag-grid-community": "^35.0.1"
21
21
  },