@feelflow/ffid-sdk 2.8.0 → 2.10.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.10.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,17 @@ function FFIDInquiryForm({
3486
3510
  turnstileToken = null,
3487
3511
  turnstileSlot,
3488
3512
  onSubmit,
3513
+ onChange,
3514
+ separateLegalCheckboxes = false,
3515
+ messagePlaceholder,
3489
3516
  locale = "ja",
3490
3517
  className
3491
3518
  }) {
3492
3519
  const isAuth = mode === "authenticated";
3520
+ const isNameReadOnly = isAuth && !!prefill?.name;
3521
+ const isEmailReadOnly = isAuth;
3493
3522
  const categoryOptions = useMemo(
3494
- () => categories ?? defaultCategories(),
3523
+ () => categories && categories.length > 0 ? categories : defaultCategories(),
3495
3524
  [categories]
3496
3525
  );
3497
3526
  const initialOrgId = useMemo(() => {
@@ -3500,23 +3529,88 @@ function FFIDInquiryForm({
3500
3529
  if (organizations.length === 1) return organizations[0].id;
3501
3530
  return null;
3502
3531
  }, [isAuth, organizations, preselectedOrganizationId]);
3532
+ const initialCategory = useMemo(() => {
3533
+ const fallback = categoryOptions[0]?.value ?? "general";
3534
+ const requested = prefill?.category;
3535
+ if (!requested) return fallback;
3536
+ return categoryOptions.some((opt) => opt.value === requested) ? requested : fallback;
3537
+ }, [categoryOptions, prefill?.category]);
3503
3538
  const [name, setName] = useState(prefill?.name ?? "");
3504
3539
  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("");
3540
+ const [company, setCompany] = useState(isAuth ? "" : prefill?.company ?? "");
3541
+ const [phone, setPhone] = useState(isAuth ? "" : prefill?.phone ?? "");
3542
+ const [category, setCategory] = useState(initialCategory);
3543
+ const [message, setMessage] = useState(prefill?.message ?? "");
3509
3544
  const [organizationId, setOrganizationId] = useState(initialOrgId);
3510
3545
  const [inquiryFollowup, setInquiryFollowup] = useState(false);
3511
3546
  const [general, setGeneral] = useState(false);
3512
3547
  const [agreedLegal, setAgreedLegal] = useState(false);
3548
+ const [agreedTerms, setAgreedTerms] = useState(false);
3549
+ const [agreedPrivacy, setAgreedPrivacy] = useState(false);
3513
3550
  const [submitting, setSubmitting] = useState(false);
3514
3551
  const [formError, setFormError] = useState(null);
3515
3552
  const [successMessage, setSuccessMessage] = useState(null);
3553
+ const resolvedMessagePlaceholder = useMemo(() => {
3554
+ if (messagePlaceholder === void 0) return void 0;
3555
+ if (typeof messagePlaceholder === "string") return messagePlaceholder;
3556
+ return messagePlaceholder({ category });
3557
+ }, [messagePlaceholder, category]);
3558
+ const [hydrated, setHydrated] = useState(false);
3559
+ useEffect(() => {
3560
+ setHydrated(true);
3561
+ }, []);
3562
+ const onChangeRef = useRef(onChange);
3563
+ useEffect(() => {
3564
+ onChangeRef.current = onChange;
3565
+ }, [onChange]);
3566
+ useEffect(() => {
3567
+ onChangeRef.current?.({
3568
+ name: name.trim(),
3569
+ email: email.trim(),
3570
+ company: company.trim() || null,
3571
+ phone: phone.trim() || null,
3572
+ category,
3573
+ message: message.trim(),
3574
+ organizationId,
3575
+ inquiryFollowupOptIn: inquiryFollowup,
3576
+ generalNewsletterOptIn: general,
3577
+ termsVersion,
3578
+ privacyVersion,
3579
+ turnstileToken: turnstileToken ?? null,
3580
+ locale
3581
+ });
3582
+ }, [
3583
+ name,
3584
+ email,
3585
+ company,
3586
+ phone,
3587
+ category,
3588
+ message,
3589
+ organizationId,
3590
+ inquiryFollowup,
3591
+ general,
3592
+ termsVersion,
3593
+ privacyVersion,
3594
+ turnstileToken,
3595
+ locale
3596
+ ]);
3516
3597
  async function handleSubmit(e) {
3517
3598
  e.preventDefault();
3518
3599
  setFormError(null);
3519
- if (!agreedLegal) {
3600
+ if (separateLegalCheckboxes) {
3601
+ if (!agreedTerms && !agreedPrivacy) {
3602
+ 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");
3603
+ return;
3604
+ }
3605
+ if (!agreedTerms) {
3606
+ setFormError("\u5229\u7528\u898F\u7D04\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3607
+ return;
3608
+ }
3609
+ if (!agreedPrivacy) {
3610
+ setFormError("\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3611
+ return;
3612
+ }
3613
+ } else if (!agreedLegal) {
3520
3614
  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
3615
  return;
3522
3616
  }
@@ -3553,12 +3647,13 @@ function FFIDInquiryForm({
3553
3647
  );
3554
3648
  setMessage("");
3555
3649
  } else {
3556
- setFormError(result.message);
3650
+ setFormError(
3651
+ 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"
3652
+ );
3557
3653
  }
3558
3654
  } 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
- );
3655
+ console.error("[FFIDInquiryForm] onSubmit threw", err);
3656
+ 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
3657
  } finally {
3563
3658
  setSubmitting(false);
3564
3659
  }
@@ -3582,188 +3677,258 @@ function FFIDInquiryForm({
3582
3677
  );
3583
3678
  }
3584
3679
  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)" }),
3680
+ return /* @__PURE__ */ jsxs(
3681
+ "form",
3682
+ {
3683
+ onSubmit: handleSubmit,
3684
+ className,
3685
+ noValidate: true,
3686
+ "data-hydrated": hydrated ? "true" : void 0,
3687
+ children: [
3688
+ showOrgBlock && /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3689
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3690
+ /* @__PURE__ */ jsxs(
3691
+ "select",
3692
+ {
3693
+ id: "ffid-inquiry-org",
3694
+ style: inputStyle,
3695
+ value: organizationId ?? "",
3696
+ onChange: (e) => setOrganizationId(e.target.value || null),
3697
+ children: [
3698
+ /* @__PURE__ */ jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3699
+ organizations.map((org) => /* @__PURE__ */ jsxs("option", { value: org.id, children: [
3700
+ org.name,
3701
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3702
+ ] }, org.id))
3703
+ ]
3704
+ }
3705
+ )
3706
+ ] }),
3707
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3708
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3709
+ /* @__PURE__ */ jsx(
3710
+ "input",
3711
+ {
3712
+ id: "ffid-inquiry-name",
3713
+ style: isNameReadOnly ? readOnlyStyle : inputStyle,
3714
+ type: "text",
3715
+ value: name,
3716
+ onChange: (e) => setName(e.target.value),
3717
+ readOnly: isNameReadOnly,
3718
+ required: true
3719
+ }
3720
+ )
3721
+ ] }),
3722
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3723
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3724
+ /* @__PURE__ */ jsx(
3725
+ "input",
3726
+ {
3727
+ id: "ffid-inquiry-email",
3728
+ style: isEmailReadOnly ? readOnlyStyle : inputStyle,
3729
+ type: "email",
3730
+ value: email,
3731
+ onChange: (e) => setEmail(e.target.value),
3732
+ readOnly: isEmailReadOnly,
3733
+ required: true
3734
+ }
3735
+ )
3736
+ ] }),
3737
+ !isAuth && /* @__PURE__ */ jsxs(Fragment, { children: [
3738
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3739
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3740
+ /* @__PURE__ */ jsx(
3741
+ "input",
3742
+ {
3743
+ id: "ffid-inquiry-company",
3744
+ style: inputStyle,
3745
+ type: "text",
3746
+ value: company,
3747
+ onChange: (e) => setCompany(e.target.value)
3748
+ }
3749
+ )
3750
+ ] }),
3751
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3752
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3753
+ /* @__PURE__ */ jsx(
3754
+ "input",
3755
+ {
3756
+ id: "ffid-inquiry-phone",
3757
+ style: inputStyle,
3758
+ type: "tel",
3759
+ value: phone,
3760
+ onChange: (e) => setPhone(e.target.value)
3761
+ }
3762
+ )
3763
+ ] })
3764
+ ] }),
3765
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3766
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3767
+ /* @__PURE__ */ jsx(
3768
+ "select",
3769
+ {
3770
+ id: "ffid-inquiry-category",
3771
+ style: inputStyle,
3772
+ value: category,
3773
+ onChange: (e) => setCategory(e.target.value),
3774
+ children: renderCategoryOptions(categoryOptions)
3775
+ }
3776
+ )
3777
+ ] }),
3778
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3779
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3780
+ /* @__PURE__ */ jsx(
3781
+ "textarea",
3782
+ {
3783
+ id: "ffid-inquiry-message",
3784
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3785
+ value: message,
3786
+ onChange: (e) => setMessage(e.target.value),
3787
+ placeholder: resolvedMessagePlaceholder,
3788
+ required: true,
3789
+ maxLength: 1e4
3790
+ }
3791
+ )
3792
+ ] }),
3793
+ /* @__PURE__ */ jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3794
+ /* @__PURE__ */ jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3795
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3796
+ /* @__PURE__ */ jsx(
3797
+ "input",
3798
+ {
3799
+ type: "checkbox",
3800
+ checked: inquiryFollowup,
3801
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3802
+ }
3803
+ ),
3804
+ /* @__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" })
3805
+ ] }),
3806
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3807
+ /* @__PURE__ */ jsx(
3808
+ "input",
3809
+ {
3810
+ type: "checkbox",
3811
+ checked: general,
3812
+ onChange: (e) => setGeneral(e.target.checked)
3813
+ }
3814
+ ),
3815
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3816
+ ] })
3817
+ ] }),
3818
+ separateLegalCheckboxes ? /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3819
+ /* @__PURE__ */ jsxs(
3820
+ "label",
3821
+ {
3822
+ style: {
3823
+ display: "flex",
3824
+ alignItems: "flex-start",
3825
+ gap: SPACING_SM,
3826
+ marginBottom: SPACING_SM
3827
+ },
3828
+ children: [
3829
+ /* @__PURE__ */ jsx(
3830
+ "input",
3831
+ {
3832
+ type: "checkbox",
3833
+ checked: agreedTerms,
3834
+ onChange: (e) => setAgreedTerms(e.target.checked),
3835
+ required: true
3836
+ }
3837
+ ),
3838
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3839
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3840
+ "\u5229\u7528\u898F\u7D04 (v",
3841
+ termsVersion,
3842
+ ")"
3843
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3844
+ "\u5229\u7528\u898F\u7D04 (v",
3845
+ termsVersion,
3846
+ ")"
3847
+ ] }),
3848
+ " ",
3849
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3850
+ ] })
3851
+ ]
3852
+ }
3853
+ ),
3854
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3855
+ /* @__PURE__ */ jsx(
3856
+ "input",
3857
+ {
3858
+ type: "checkbox",
3859
+ checked: agreedPrivacy,
3860
+ onChange: (e) => setAgreedPrivacy(e.target.checked),
3861
+ required: true
3862
+ }
3863
+ ),
3864
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3865
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3866
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3867
+ privacyVersion,
3868
+ ")"
3869
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3870
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3871
+ privacyVersion,
3872
+ ")"
3873
+ ] }),
3874
+ " ",
3875
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3876
+ ] })
3877
+ ] })
3878
+ ] }) : /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3879
+ /* @__PURE__ */ jsx(
3880
+ "input",
3881
+ {
3882
+ type: "checkbox",
3883
+ checked: agreedLegal,
3884
+ onChange: (e) => setAgreedLegal(e.target.checked),
3885
+ required: true
3886
+ }
3887
+ ),
3888
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3889
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3890
+ "\u5229\u7528\u898F\u7D04 (v",
3891
+ termsVersion,
3892
+ ")"
3893
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3894
+ "\u5229\u7528\u898F\u7D04 (v",
3895
+ termsVersion,
3896
+ ")"
3897
+ ] }),
3898
+ " ",
3899
+ "\u3068",
3900
+ " ",
3901
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3902
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3903
+ privacyVersion,
3904
+ ")"
3905
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3906
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3907
+ privacyVersion,
3908
+ ")"
3909
+ ] }),
3910
+ " ",
3911
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3912
+ ] })
3913
+ ] }) }),
3914
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3915
+ formError && /* @__PURE__ */ jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3651
3916
  /* @__PURE__ */ jsx(
3652
- "input",
3917
+ "button",
3653
3918
  {
3654
- id: "ffid-inquiry-phone",
3655
- style: inputStyle,
3656
- type: "tel",
3657
- value: phone,
3658
- onChange: (e) => setPhone(e.target.value)
3919
+ type: "submit",
3920
+ style: {
3921
+ ...submitButtonStyle,
3922
+ opacity: submitting ? SUBMIT_BUTTON_OPACITY_PENDING : 1,
3923
+ cursor: submitting ? "not-allowed" : "pointer"
3924
+ },
3925
+ disabled: submitting,
3926
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3659
3927
  }
3660
3928
  )
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
- ] });
3929
+ ]
3930
+ }
3931
+ );
3767
3932
  }
3768
3933
 
3769
3934
  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 chunk55KLWKM7_cjs = require('../chunk-55KLWKM7.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 chunk55KLWKM7_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 chunk55KLWKM7_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 chunk55KLWKM7_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 chunk55KLWKM7_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 chunk55KLWKM7_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 chunk55KLWKM7_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 chunk55KLWKM7_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, ac as FFIDAnnouncementBadgeClassNames, ad as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ae as FFIDAnnouncementListClassNames, af as FFIDAnnouncementListProps, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormOrganization, T as FFIDInquiryFormPlaceholderContext, U as FFIDInquiryFormPrefill, V as FFIDInquiryFormProps, W as FFIDInquiryFormSubmitData, X as FFIDInquiryFormSubmitResult, Z as FFIDLoginButton, ag as FFIDLoginButtonProps, a3 as FFIDOrganizationSwitcher, ah as FFIDOrganizationSwitcherClassNames, ai as FFIDOrganizationSwitcherProps, a5 as FFIDSubscriptionBadge, aj as FFIDSubscriptionBadgeClassNames, ak as FFIDSubscriptionBadgeProps, a7 as FFIDUserMenu, al as FFIDUserMenuClassNames, am as FFIDUserMenuProps } from '../index-BSuGxrqG.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';