@saasquatch/mint-components 1.12.0-10 → 1.12.0-11

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.
@@ -6733,7 +6733,6 @@ const style$6 = {
6733
6733
  },
6734
6734
  PhoneInputsSection: {
6735
6735
  display: "flex",
6736
- alignItems: "flex-end",
6737
6736
  flexDirection: "column",
6738
6737
  gap: "4px",
6739
6738
  "& p": {
@@ -6744,7 +6743,6 @@ const style$6 = {
6744
6743
  },
6745
6744
  PhoneInputsContainer: {
6746
6745
  display: "flex",
6747
- alignItems: "flex-end",
6748
6746
  gap: "4px",
6749
6747
  width: "100%",
6750
6748
  "& #phoneNumber": {
@@ -6885,10 +6883,7 @@ const UserInfoFormView = (props) => {
6885
6883
  index.h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
6886
6884
  _b.dial_code));
6887
6885
  })),
6888
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: ({ value }) =>
6889
- // Naive phone number validation
6890
- sqmInvoiceTableView.validateBillingField(/[a-zA-Z]+/, value) &&
6891
- sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError), disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6886
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: true, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6892
6887
  class: classes.ErrorInput,
6893
6888
  helpText: sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
6894
6889
  }
@@ -14,7 +14,7 @@ const useVerificationEmail = require('./useVerificationEmail-6aacdb71.js');
14
14
 
15
15
  const UpsertUserEmailMutation = index_module.dist.gql `
16
16
  mutation upsertUser($userInput: UserInput!) {
17
- user(userInput: $userInput) {
17
+ upsertUser(userInput: $userInput) {
18
18
  id
19
19
  accountId
20
20
  email
@@ -44,7 +44,7 @@ function useUpsertUserEmail() {
44
44
  const upsertUserEmail = async (email) => {
45
45
  try {
46
46
  const result = await request({
47
- user: {
47
+ userInput: {
48
48
  id: user.id,
49
49
  accountId: user.accountId,
50
50
  email,
@@ -214,7 +214,7 @@ function WidgetEmailVerificationView(props) {
214
214
  index.h(sqmTextSpanView.TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
215
215
  index.h("sl-form", { "onSl-submit": callbacks.submitEmail },
216
216
  index.h("div", { class: sheet.classes.InputsContainer },
217
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email, type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
217
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email || "", type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
218
218
  ? {
219
219
  class: sheet.classes.ErrorInput,
220
220
  helpText: text.emailValidationErrorText,
@@ -81,7 +81,7 @@ export function WidgetEmailVerificationView(props) {
81
81
  h(TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
82
82
  h("sl-form", { "onSl-submit": callbacks.submitEmail },
83
83
  h("div", { class: sheet.classes.InputsContainer },
84
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email, type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
84
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email || "", type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
85
85
  ? {
86
86
  class: sheet.classes.ErrorInput,
87
87
  helpText: text.emailValidationErrorText,
@@ -5,7 +5,7 @@ import { SHOW_CODE_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE } from "../keys";
5
5
  import { useVerificationEmail } from "../useVerificationEmail";
6
6
  export const UpsertUserEmailMutation = gql `
7
7
  mutation upsertUser($userInput: UserInput!) {
8
- user(userInput: $userInput) {
8
+ upsertUser(userInput: $userInput) {
9
9
  id
10
10
  accountId
11
11
  email
@@ -35,7 +35,7 @@ export function useUpsertUserEmail() {
35
35
  const upsertUserEmail = async (email) => {
36
36
  try {
37
37
  const result = await request({
38
- user: {
38
+ userInput: {
39
39
  id: user.id,
40
40
  accountId: user.accountId,
41
41
  email,
@@ -85,7 +85,6 @@ const style = {
85
85
  },
86
86
  PhoneInputsSection: {
87
87
  display: "flex",
88
- alignItems: "flex-end",
89
88
  flexDirection: "column",
90
89
  gap: "4px",
91
90
  "& p": {
@@ -96,7 +95,6 @@ const style = {
96
95
  },
97
96
  PhoneInputsContainer: {
98
97
  display: "flex",
99
- alignItems: "flex-end",
100
98
  gap: "4px",
101
99
  width: "100%",
102
100
  "& #phoneNumber": {
@@ -237,10 +235,7 @@ export const UserInfoFormView = (props) => {
237
235
  h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
238
236
  _b.dial_code));
239
237
  })),
240
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: ({ value }) =>
241
- // Naive phone number validation
242
- validateBillingField(/[a-zA-Z]+/, value) &&
243
- formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError), disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
238
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: true, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
244
239
  class: classes.ErrorInput,
245
240
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
246
241
  }
@@ -6729,7 +6729,6 @@ const style$6 = {
6729
6729
  },
6730
6730
  PhoneInputsSection: {
6731
6731
  display: "flex",
6732
- alignItems: "flex-end",
6733
6732
  flexDirection: "column",
6734
6733
  gap: "4px",
6735
6734
  "& p": {
@@ -6740,7 +6739,6 @@ const style$6 = {
6740
6739
  },
6741
6740
  PhoneInputsContainer: {
6742
6741
  display: "flex",
6743
- alignItems: "flex-end",
6744
6742
  gap: "4px",
6745
6743
  width: "100%",
6746
6744
  "& #phoneNumber": {
@@ -6881,10 +6879,7 @@ const UserInfoFormView = (props) => {
6881
6879
  h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
6882
6880
  _b.dial_code));
6883
6881
  })),
6884
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: ({ value }) =>
6885
- // Naive phone number validation
6886
- validateBillingField(/[a-zA-Z]+/, value) &&
6887
- formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError), disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6882
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: true, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6888
6883
  class: classes.ErrorInput,
6889
6884
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
6890
6885
  }
@@ -10,7 +10,7 @@ import { u as useVerificationEmail } from './useVerificationEmail-c32696ba.js';
10
10
 
11
11
  const UpsertUserEmailMutation = dist.gql `
12
12
  mutation upsertUser($userInput: UserInput!) {
13
- user(userInput: $userInput) {
13
+ upsertUser(userInput: $userInput) {
14
14
  id
15
15
  accountId
16
16
  email
@@ -40,7 +40,7 @@ function useUpsertUserEmail() {
40
40
  const upsertUserEmail = async (email) => {
41
41
  try {
42
42
  const result = await request({
43
- user: {
43
+ userInput: {
44
44
  id: user.id,
45
45
  accountId: user.accountId,
46
46
  email,
@@ -210,7 +210,7 @@ function WidgetEmailVerificationView(props) {
210
210
  h(TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
211
211
  h("sl-form", { "onSl-submit": callbacks.submitEmail },
212
212
  h("div", { class: sheet.classes.InputsContainer },
213
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email, type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
213
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.emailLabel, value: states.email || "", type: "email", id: "email", name: "email", disabled: !!states.email || states.loading }, (states.error
214
214
  ? {
215
215
  class: sheet.classes.ErrorInput,
216
216
  helpText: text.emailValidationErrorText,