@feelflow/ffid-sdk 2.8.0 → 2.9.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.
@@ -619,7 +619,7 @@ function createMembersMethods(deps) {
619
619
  }
620
620
 
621
621
  // src/client/version-check.ts
622
- var SDK_VERSION = "2.8.0";
622
+ var SDK_VERSION = "2.9.0";
623
623
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
624
624
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
625
625
  function sdkHeaders() {
@@ -3434,6 +3434,29 @@ function defaultCategories() {
3434
3434
  label: DEFAULT_CATEGORY_LABELS_JA[value]
3435
3435
  }));
3436
3436
  }
3437
+ function renderCategoryOptions(options) {
3438
+ const hasAnyGroup = options.some((o) => !!o.group);
3439
+ if (!hasAnyGroup) {
3440
+ return options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value));
3441
+ }
3442
+ const ungrouped = options.filter((o) => !o.group);
3443
+ const groupKeys = [];
3444
+ const groupLabelByKey = /* @__PURE__ */ new Map();
3445
+ const itemsByKey = /* @__PURE__ */ new Map();
3446
+ for (const opt of options) {
3447
+ if (!opt.group) continue;
3448
+ if (!itemsByKey.has(opt.group)) {
3449
+ groupKeys.push(opt.group);
3450
+ itemsByKey.set(opt.group, []);
3451
+ groupLabelByKey.set(opt.group, opt.groupLabel ?? opt.group);
3452
+ }
3453
+ itemsByKey.get(opt.group).push(opt);
3454
+ }
3455
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3456
+ ungrouped.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value)),
3457
+ groupKeys.map((key) => /* @__PURE__ */ jsx("optgroup", { label: groupLabelByKey.get(key) ?? key, children: itemsByKey.get(key).map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value)) }, key))
3458
+ ] });
3459
+ }
3437
3460
  var labelStyle = {
3438
3461
  display: "block",
3439
3462
  fontSize: FONT_SIZE_SM,
@@ -3473,6 +3496,7 @@ var submitButtonStyle = {
3473
3496
  borderRadius: BORDER_RADIUS_MD,
3474
3497
  cursor: "pointer"
3475
3498
  };
3499
+ var SUBMIT_BUTTON_OPACITY_PENDING = 0.6;
3476
3500
  function FFIDInquiryForm({
3477
3501
  mode,
3478
3502
  prefill,
@@ -3486,12 +3510,16 @@ function FFIDInquiryForm({
3486
3510
  turnstileToken = null,
3487
3511
  turnstileSlot,
3488
3512
  onSubmit,
3513
+ onChange,
3514
+ separateLegalCheckboxes = false,
3489
3515
  locale = "ja",
3490
3516
  className
3491
3517
  }) {
3492
3518
  const isAuth = mode === "authenticated";
3519
+ const isNameReadOnly = isAuth && !!prefill?.name;
3520
+ const isEmailReadOnly = isAuth;
3493
3521
  const categoryOptions = useMemo(
3494
- () => categories ?? defaultCategories(),
3522
+ () => categories && categories.length > 0 ? categories : defaultCategories(),
3495
3523
  [categories]
3496
3524
  );
3497
3525
  const initialOrgId = useMemo(() => {
@@ -3500,23 +3528,83 @@ function FFIDInquiryForm({
3500
3528
  if (organizations.length === 1) return organizations[0].id;
3501
3529
  return null;
3502
3530
  }, [isAuth, organizations, preselectedOrganizationId]);
3531
+ const initialCategory = useMemo(() => {
3532
+ const fallback = categoryOptions[0]?.value ?? "general";
3533
+ const requested = prefill?.category;
3534
+ if (!requested) return fallback;
3535
+ return categoryOptions.some((opt) => opt.value === requested) ? requested : fallback;
3536
+ }, [categoryOptions, prefill?.category]);
3503
3537
  const [name, setName] = useState(prefill?.name ?? "");
3504
3538
  const [email, setEmail] = useState(prefill?.email ?? "");
3505
- const [company, setCompany] = useState("");
3506
- const [phone, setPhone] = useState("");
3507
- const [category, setCategory] = useState(categoryOptions[0]?.value ?? "general");
3508
- const [message, setMessage] = useState("");
3539
+ const [company, setCompany] = useState(isAuth ? "" : prefill?.company ?? "");
3540
+ const [phone, setPhone] = useState(isAuth ? "" : prefill?.phone ?? "");
3541
+ const [category, setCategory] = useState(initialCategory);
3542
+ const [message, setMessage] = useState(prefill?.message ?? "");
3509
3543
  const [organizationId, setOrganizationId] = useState(initialOrgId);
3510
3544
  const [inquiryFollowup, setInquiryFollowup] = useState(false);
3511
3545
  const [general, setGeneral] = useState(false);
3512
3546
  const [agreedLegal, setAgreedLegal] = useState(false);
3547
+ const [agreedTerms, setAgreedTerms] = useState(false);
3548
+ const [agreedPrivacy, setAgreedPrivacy] = useState(false);
3513
3549
  const [submitting, setSubmitting] = useState(false);
3514
3550
  const [formError, setFormError] = useState(null);
3515
3551
  const [successMessage, setSuccessMessage] = useState(null);
3552
+ const [hydrated, setHydrated] = useState(false);
3553
+ useEffect(() => {
3554
+ setHydrated(true);
3555
+ }, []);
3556
+ const onChangeRef = useRef(onChange);
3557
+ useEffect(() => {
3558
+ onChangeRef.current = onChange;
3559
+ }, [onChange]);
3560
+ useEffect(() => {
3561
+ onChangeRef.current?.({
3562
+ name: name.trim(),
3563
+ email: email.trim(),
3564
+ company: company.trim() || null,
3565
+ phone: phone.trim() || null,
3566
+ category,
3567
+ message: message.trim(),
3568
+ organizationId,
3569
+ inquiryFollowupOptIn: inquiryFollowup,
3570
+ generalNewsletterOptIn: general,
3571
+ termsVersion,
3572
+ privacyVersion,
3573
+ turnstileToken: turnstileToken ?? null,
3574
+ locale
3575
+ });
3576
+ }, [
3577
+ name,
3578
+ email,
3579
+ company,
3580
+ phone,
3581
+ category,
3582
+ message,
3583
+ organizationId,
3584
+ inquiryFollowup,
3585
+ general,
3586
+ termsVersion,
3587
+ privacyVersion,
3588
+ turnstileToken,
3589
+ locale
3590
+ ]);
3516
3591
  async function handleSubmit(e) {
3517
3592
  e.preventDefault();
3518
3593
  setFormError(null);
3519
- if (!agreedLegal) {
3594
+ if (separateLegalCheckboxes) {
3595
+ if (!agreedTerms && !agreedPrivacy) {
3596
+ setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3597
+ return;
3598
+ }
3599
+ if (!agreedTerms) {
3600
+ setFormError("\u5229\u7528\u898F\u7D04\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3601
+ return;
3602
+ }
3603
+ if (!agreedPrivacy) {
3604
+ setFormError("\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3605
+ return;
3606
+ }
3607
+ } else if (!agreedLegal) {
3520
3608
  setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3521
3609
  return;
3522
3610
  }
@@ -3553,12 +3641,13 @@ function FFIDInquiryForm({
3553
3641
  );
3554
3642
  setMessage("");
3555
3643
  } else {
3556
- setFormError(result.message);
3644
+ setFormError(
3645
+ result.message ?? "\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3646
+ );
3557
3647
  }
3558
3648
  } catch (err) {
3559
- setFormError(
3560
- err instanceof Error ? err.message : "\u9001\u4FE1\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3561
- );
3649
+ console.error("[FFIDInquiryForm] onSubmit threw", err);
3650
+ setFormError("\u9001\u4FE1\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002");
3562
3651
  } finally {
3563
3652
  setSubmitting(false);
3564
3653
  }
@@ -3582,188 +3671,257 @@ function FFIDInquiryForm({
3582
3671
  );
3583
3672
  }
3584
3673
  const showOrgBlock = isAuth && organizations.length >= 1;
3585
- return /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className, noValidate: true, children: [
3586
- showOrgBlock && /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3587
- /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3588
- /* @__PURE__ */ jsxs(
3589
- "select",
3590
- {
3591
- id: "ffid-inquiry-org",
3592
- style: inputStyle,
3593
- value: organizationId ?? "",
3594
- onChange: (e) => setOrganizationId(e.target.value || null),
3595
- children: [
3596
- /* @__PURE__ */ jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3597
- organizations.map((org) => /* @__PURE__ */ jsxs("option", { value: org.id, children: [
3598
- org.name,
3599
- " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3600
- ] }, org.id))
3601
- ]
3602
- }
3603
- )
3604
- ] }),
3605
- /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3606
- /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3607
- /* @__PURE__ */ jsx(
3608
- "input",
3609
- {
3610
- id: "ffid-inquiry-name",
3611
- style: isAuth ? readOnlyStyle : inputStyle,
3612
- type: "text",
3613
- value: name,
3614
- onChange: (e) => setName(e.target.value),
3615
- readOnly: isAuth,
3616
- required: true
3617
- }
3618
- )
3619
- ] }),
3620
- /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3621
- /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3622
- /* @__PURE__ */ jsx(
3623
- "input",
3624
- {
3625
- id: "ffid-inquiry-email",
3626
- style: isAuth ? readOnlyStyle : inputStyle,
3627
- type: "email",
3628
- value: email,
3629
- onChange: (e) => setEmail(e.target.value),
3630
- readOnly: isAuth,
3631
- required: true
3632
- }
3633
- )
3634
- ] }),
3635
- !isAuth && /* @__PURE__ */ jsxs(Fragment, { children: [
3636
- /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3637
- /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3638
- /* @__PURE__ */ jsx(
3639
- "input",
3640
- {
3641
- id: "ffid-inquiry-company",
3642
- style: inputStyle,
3643
- type: "text",
3644
- value: company,
3645
- onChange: (e) => setCompany(e.target.value)
3646
- }
3647
- )
3648
- ] }),
3649
- /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3650
- /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3674
+ return /* @__PURE__ */ jsxs(
3675
+ "form",
3676
+ {
3677
+ onSubmit: handleSubmit,
3678
+ className,
3679
+ noValidate: true,
3680
+ "data-hydrated": hydrated ? "true" : void 0,
3681
+ children: [
3682
+ showOrgBlock && /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3683
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3684
+ /* @__PURE__ */ jsxs(
3685
+ "select",
3686
+ {
3687
+ id: "ffid-inquiry-org",
3688
+ style: inputStyle,
3689
+ value: organizationId ?? "",
3690
+ onChange: (e) => setOrganizationId(e.target.value || null),
3691
+ children: [
3692
+ /* @__PURE__ */ jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3693
+ organizations.map((org) => /* @__PURE__ */ jsxs("option", { value: org.id, children: [
3694
+ org.name,
3695
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3696
+ ] }, org.id))
3697
+ ]
3698
+ }
3699
+ )
3700
+ ] }),
3701
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3702
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3703
+ /* @__PURE__ */ jsx(
3704
+ "input",
3705
+ {
3706
+ id: "ffid-inquiry-name",
3707
+ style: isNameReadOnly ? readOnlyStyle : inputStyle,
3708
+ type: "text",
3709
+ value: name,
3710
+ onChange: (e) => setName(e.target.value),
3711
+ readOnly: isNameReadOnly,
3712
+ required: true
3713
+ }
3714
+ )
3715
+ ] }),
3716
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3717
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3718
+ /* @__PURE__ */ jsx(
3719
+ "input",
3720
+ {
3721
+ id: "ffid-inquiry-email",
3722
+ style: isEmailReadOnly ? readOnlyStyle : inputStyle,
3723
+ type: "email",
3724
+ value: email,
3725
+ onChange: (e) => setEmail(e.target.value),
3726
+ readOnly: isEmailReadOnly,
3727
+ required: true
3728
+ }
3729
+ )
3730
+ ] }),
3731
+ !isAuth && /* @__PURE__ */ jsxs(Fragment, { children: [
3732
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3733
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3734
+ /* @__PURE__ */ jsx(
3735
+ "input",
3736
+ {
3737
+ id: "ffid-inquiry-company",
3738
+ style: inputStyle,
3739
+ type: "text",
3740
+ value: company,
3741
+ onChange: (e) => setCompany(e.target.value)
3742
+ }
3743
+ )
3744
+ ] }),
3745
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3746
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3747
+ /* @__PURE__ */ jsx(
3748
+ "input",
3749
+ {
3750
+ id: "ffid-inquiry-phone",
3751
+ style: inputStyle,
3752
+ type: "tel",
3753
+ value: phone,
3754
+ onChange: (e) => setPhone(e.target.value)
3755
+ }
3756
+ )
3757
+ ] })
3758
+ ] }),
3759
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3760
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3761
+ /* @__PURE__ */ jsx(
3762
+ "select",
3763
+ {
3764
+ id: "ffid-inquiry-category",
3765
+ style: inputStyle,
3766
+ value: category,
3767
+ onChange: (e) => setCategory(e.target.value),
3768
+ children: renderCategoryOptions(categoryOptions)
3769
+ }
3770
+ )
3771
+ ] }),
3772
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3773
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3774
+ /* @__PURE__ */ jsx(
3775
+ "textarea",
3776
+ {
3777
+ id: "ffid-inquiry-message",
3778
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3779
+ value: message,
3780
+ onChange: (e) => setMessage(e.target.value),
3781
+ required: true,
3782
+ maxLength: 1e4
3783
+ }
3784
+ )
3785
+ ] }),
3786
+ /* @__PURE__ */ jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3787
+ /* @__PURE__ */ jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3788
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3789
+ /* @__PURE__ */ jsx(
3790
+ "input",
3791
+ {
3792
+ type: "checkbox",
3793
+ checked: inquiryFollowup,
3794
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3795
+ }
3796
+ ),
3797
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u304A\u554F\u3044\u5408\u308F\u305B\u306B\u95A2\u9023\u3059\u308B\u6848\u5185\u3092\u53D7\u3051\u53D6\u308B" })
3798
+ ] }),
3799
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3800
+ /* @__PURE__ */ jsx(
3801
+ "input",
3802
+ {
3803
+ type: "checkbox",
3804
+ checked: general,
3805
+ onChange: (e) => setGeneral(e.target.checked)
3806
+ }
3807
+ ),
3808
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3809
+ ] })
3810
+ ] }),
3811
+ separateLegalCheckboxes ? /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3812
+ /* @__PURE__ */ jsxs(
3813
+ "label",
3814
+ {
3815
+ style: {
3816
+ display: "flex",
3817
+ alignItems: "flex-start",
3818
+ gap: SPACING_SM,
3819
+ marginBottom: SPACING_SM
3820
+ },
3821
+ children: [
3822
+ /* @__PURE__ */ jsx(
3823
+ "input",
3824
+ {
3825
+ type: "checkbox",
3826
+ checked: agreedTerms,
3827
+ onChange: (e) => setAgreedTerms(e.target.checked),
3828
+ required: true
3829
+ }
3830
+ ),
3831
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3832
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3833
+ "\u5229\u7528\u898F\u7D04 (v",
3834
+ termsVersion,
3835
+ ")"
3836
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3837
+ "\u5229\u7528\u898F\u7D04 (v",
3838
+ termsVersion,
3839
+ ")"
3840
+ ] }),
3841
+ " ",
3842
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3843
+ ] })
3844
+ ]
3845
+ }
3846
+ ),
3847
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3848
+ /* @__PURE__ */ jsx(
3849
+ "input",
3850
+ {
3851
+ type: "checkbox",
3852
+ checked: agreedPrivacy,
3853
+ onChange: (e) => setAgreedPrivacy(e.target.checked),
3854
+ required: true
3855
+ }
3856
+ ),
3857
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3858
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3859
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3860
+ privacyVersion,
3861
+ ")"
3862
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3863
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3864
+ privacyVersion,
3865
+ ")"
3866
+ ] }),
3867
+ " ",
3868
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3869
+ ] })
3870
+ ] })
3871
+ ] }) : /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3872
+ /* @__PURE__ */ jsx(
3873
+ "input",
3874
+ {
3875
+ type: "checkbox",
3876
+ checked: agreedLegal,
3877
+ onChange: (e) => setAgreedLegal(e.target.checked),
3878
+ required: true
3879
+ }
3880
+ ),
3881
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3882
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3883
+ "\u5229\u7528\u898F\u7D04 (v",
3884
+ termsVersion,
3885
+ ")"
3886
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3887
+ "\u5229\u7528\u898F\u7D04 (v",
3888
+ termsVersion,
3889
+ ")"
3890
+ ] }),
3891
+ " ",
3892
+ "\u3068",
3893
+ " ",
3894
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3895
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3896
+ privacyVersion,
3897
+ ")"
3898
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3899
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3900
+ privacyVersion,
3901
+ ")"
3902
+ ] }),
3903
+ " ",
3904
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3905
+ ] })
3906
+ ] }) }),
3907
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3908
+ formError && /* @__PURE__ */ jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3651
3909
  /* @__PURE__ */ jsx(
3652
- "input",
3910
+ "button",
3653
3911
  {
3654
- id: "ffid-inquiry-phone",
3655
- style: inputStyle,
3656
- type: "tel",
3657
- value: phone,
3658
- onChange: (e) => setPhone(e.target.value)
3912
+ type: "submit",
3913
+ style: {
3914
+ ...submitButtonStyle,
3915
+ opacity: submitting ? SUBMIT_BUTTON_OPACITY_PENDING : 1,
3916
+ cursor: submitting ? "not-allowed" : "pointer"
3917
+ },
3918
+ disabled: submitting,
3919
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3659
3920
  }
3660
3921
  )
3661
- ] })
3662
- ] }),
3663
- /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3664
- /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3665
- /* @__PURE__ */ jsx(
3666
- "select",
3667
- {
3668
- id: "ffid-inquiry-category",
3669
- style: inputStyle,
3670
- value: category,
3671
- onChange: (e) => setCategory(e.target.value),
3672
- children: categoryOptions.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value))
3673
- }
3674
- )
3675
- ] }),
3676
- /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3677
- /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3678
- /* @__PURE__ */ jsx(
3679
- "textarea",
3680
- {
3681
- id: "ffid-inquiry-message",
3682
- style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3683
- value: message,
3684
- onChange: (e) => setMessage(e.target.value),
3685
- required: true,
3686
- maxLength: 1e4
3687
- }
3688
- )
3689
- ] }),
3690
- /* @__PURE__ */ jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3691
- /* @__PURE__ */ jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3692
- /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3693
- /* @__PURE__ */ jsx(
3694
- "input",
3695
- {
3696
- type: "checkbox",
3697
- checked: inquiryFollowup,
3698
- onChange: (e) => setInquiryFollowup(e.target.checked)
3699
- }
3700
- ),
3701
- /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u304A\u554F\u3044\u5408\u308F\u305B\u306B\u95A2\u9023\u3059\u308B\u6848\u5185\u3092\u53D7\u3051\u53D6\u308B" })
3702
- ] }),
3703
- /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3704
- /* @__PURE__ */ jsx(
3705
- "input",
3706
- {
3707
- type: "checkbox",
3708
- checked: general,
3709
- onChange: (e) => setGeneral(e.target.checked)
3710
- }
3711
- ),
3712
- /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3713
- ] })
3714
- ] }),
3715
- /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3716
- /* @__PURE__ */ jsx(
3717
- "input",
3718
- {
3719
- type: "checkbox",
3720
- checked: agreedLegal,
3721
- onChange: (e) => setAgreedLegal(e.target.checked),
3722
- required: true
3723
- }
3724
- ),
3725
- /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3726
- termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3727
- "\u5229\u7528\u898F\u7D04 (v",
3728
- termsVersion,
3729
- ")"
3730
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3731
- "\u5229\u7528\u898F\u7D04 (v",
3732
- termsVersion,
3733
- ")"
3734
- ] }),
3735
- " ",
3736
- "\u3068",
3737
- " ",
3738
- privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3739
- "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3740
- privacyVersion,
3741
- ")"
3742
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3743
- "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3744
- privacyVersion,
3745
- ")"
3746
- ] }),
3747
- " ",
3748
- "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3749
- ] })
3750
- ] }) }),
3751
- !isAuth && turnstileSlot && /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3752
- formError && /* @__PURE__ */ jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3753
- /* @__PURE__ */ jsx(
3754
- "button",
3755
- {
3756
- type: "submit",
3757
- style: {
3758
- ...submitButtonStyle,
3759
- opacity: submitting ? 0.6 : 1,
3760
- cursor: submitting ? "not-allowed" : "pointer"
3761
- },
3762
- disabled: submitting,
3763
- children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3764
- }
3765
- )
3766
- ] });
3922
+ ]
3923
+ }
3924
+ );
3767
3925
  }
3768
3926
 
3769
3927
  export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkGB5OHEVY_cjs = require('../chunk-GB5OHEVY.cjs');
3
+ var chunk2LD6Y65W_cjs = require('../chunk-2LD6Y65W.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkGB5OHEVY_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunk2LD6Y65W_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkGB5OHEVY_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunk2LD6Y65W_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkGB5OHEVY_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunk2LD6Y65W_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkGB5OHEVY_cjs.FFIDLoginButton; }
21
+ get: function () { return chunk2LD6Y65W_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkGB5OHEVY_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunk2LD6Y65W_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkGB5OHEVY_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunk2LD6Y65W_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkGB5OHEVY_cjs.FFIDUserMenu; }
33
+ get: function () { return chunk2LD6Y65W_cjs.FFIDUserMenu; }
34
34
  });
@@ -1,3 +1,3 @@
1
- export { E as FFIDAnnouncementBadge, a6 as FFIDAnnouncementBadgeClassNames, a7 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a8 as FFIDAnnouncementListClassNames, a9 as FFIDAnnouncementListProps, N as FFIDInquiryForm, O as FFIDInquiryFormOrganization, P as FFIDInquiryFormPrefill, Q as FFIDInquiryFormProps, R as FFIDInquiryFormSubmitData, S as FFIDInquiryFormSubmitResult, U as FFIDLoginButton, aa as FFIDLoginButtonProps, _ as FFIDOrganizationSwitcher, ab as FFIDOrganizationSwitcherClassNames, ac as FFIDOrganizationSwitcherProps, a0 as FFIDSubscriptionBadge, ad as FFIDSubscriptionBadgeClassNames, ae as FFIDSubscriptionBadgeProps, a2 as FFIDUserMenu, af as FFIDUserMenuClassNames, ag as FFIDUserMenuProps } from '../index-BBAzyBFG.cjs';
1
+ export { H as FFIDAnnouncementBadge, ab as FFIDAnnouncementBadgeClassNames, ac as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ad as FFIDAnnouncementListClassNames, ae as FFIDAnnouncementListProps, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormOrganization, T as FFIDInquiryFormPrefill, U as FFIDInquiryFormProps, V as FFIDInquiryFormSubmitData, W as FFIDInquiryFormSubmitResult, Y as FFIDLoginButton, af as FFIDLoginButtonProps, a2 as FFIDOrganizationSwitcher, ag as FFIDOrganizationSwitcherClassNames, ah as FFIDOrganizationSwitcherProps, a4 as FFIDSubscriptionBadge, ai as FFIDSubscriptionBadgeClassNames, aj as FFIDSubscriptionBadgeProps, a6 as FFIDUserMenu, ak as FFIDUserMenuClassNames, al as FFIDUserMenuProps } from '../index-R2ALICqm.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';